fix: correct context.platform doc comment, bump to 2.30.1 - #37
Merged
Conversation
The doc comment described platform as a coarse category ("chat",
"social_media", "gaming") when the SDK actually treats it as a free-text
app name and appends its own identifier before sending it ("MyApp" ->
"MyApp - Node SDK"). A client integration following the old doc's examples
got the wrong dashboard attribution. Corrected on ContextInput and every
other input type with the same platform field.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Client report:
context.platform's doc comment said "Platform type (e.g. "chat", "social_media", "gaming")" while the SDK actually treats the value as a free-text app/product name and appends its own identifier before sending it (resolvePlatform:"MyApp"→"MyApp - Node SDK"). An integrator following the doc's examples would send a bare category string instead of an identifiable app name, silently getting the wrong dashboard attribution.Corrected the doc comment on
ContextInput.platformand every other input type carrying the same field (image/video/voice/document/synthetic-content inputs, batch item context, voice-stream config context) to describe the actual behavior.No runtime behavior change — types and doc comments only. Bumped to 2.30.1 since the corrected JSDoc only reaches consumers through the compiled
.d.tsfiles, which requires a new publish.Test plan
tsc --noEmitcleannpm run buildclean — verified the corrected doc comment compiles intodist/types/safety.d.ts