feat(types): expose language_code in SyncTranscriptResponse and auth_time_ms in DictationResponse - #190
Open
pylrn wants to merge 1 commit into
Open
feat(types): expose language_code in SyncTranscriptResponse and auth_time_ms in DictationResponse#190pylrn wants to merge 1 commit into
pylrn wants to merge 1 commit into
Conversation
…time_ms in DictationResponse
This branch has not been deployed
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
Surfaces two response fields returned by AssemblyAI's synchronous transcription and dictation services that were previously omitted from the Node SDK TypeScript types:
language_code?: stringinSyncTranscriptResponse:The sync transcription backend returns an ISO 639-1
language_codein the JSON response (e.g."en","es"). Exposing it allows callers to inspect which language the model detected or transcribed in, especially whenlanguage_codeswas not explicitly provided in the request configuration. (Parity with Python SDK PR #257).auth_time_ms?: numberinDictationResponse:The Dictation API returns
auth_time_msas the authentication and API key validation portion ofrequest_time_ms. Whilerequest_time_msandsync_time_mswere already typed,auth_time_mswas omitted. (Parity with Python SDK PR #263).Both fields are optional (
undefinedwhen absent) to preserve backwards compatibility with responses from older deployments.Changes
src/types/sync/index.ts: Addlanguage_code?: string;toSyncTranscriptResponsesrc/types/dictation/index.ts: Addauth_time_ms?: number;toDictationResponsetests/unit/sync.test.ts: Add unit tests forlanguage_codepresence and omissiontests/unit/dictation.test.ts: Add unit tests forauth_time_mspresence and omissionCLAUDE.md: UpdateDictationResponsebreakdown documentationpackage.json: Bump version4.41.5→4.41.6for version bump checkCHANGELOG.md: Add[4.41.6]entryTesting
pnpm test:unit tests/unit/sync.test.ts tests/unit/dictation.test.ts tests/unit/exports.test.ts(113/113 passing)pnpm lint(eslint, tsc, prettier format, publint) all cleanpnpm buildcreates all distribution bundles cleanly