Skip to content

feat(types): expose language_code in SyncTranscriptResponse and auth_time_ms in DictationResponse - #190

Open
pylrn wants to merge 1 commit into
AssemblyAI:mainfrom
pylrn:feat/sync-language-code-dictation-auth-time
Open

pylrn wants to merge 1 commit into
AssemblyAI:mainfrom
pylrn:feat/sync-language-code-dictation-auth-time

Conversation

@pylrn

@pylrn pylrn commented Sep 25, 2026

Copy link
Copy Markdown

Summary

Surfaces two response fields returned by AssemblyAI's synchronous transcription and dictation services that were previously omitted from the Node SDK TypeScript types:

  1. language_code?: string in SyncTranscriptResponse:
    The sync transcription backend returns an ISO 639-1 language_code in the JSON response (e.g. "en", "es"). Exposing it allows callers to inspect which language the model detected or transcribed in, especially when language_codes was not explicitly provided in the request configuration. (Parity with Python SDK PR #257).

  2. auth_time_ms?: number in DictationResponse:
    The Dictation API returns auth_time_ms as the authentication and API key validation portion of request_time_ms. While request_time_ms and sync_time_ms were already typed, auth_time_ms was omitted. (Parity with Python SDK PR #263).

Both fields are optional (undefined when absent) to preserve backwards compatibility with responses from older deployments.

Changes

  • src/types/sync/index.ts: Add language_code?: string; to SyncTranscriptResponse
  • src/types/dictation/index.ts: Add auth_time_ms?: number; to DictationResponse
  • tests/unit/sync.test.ts: Add unit tests for language_code presence and omission
  • tests/unit/dictation.test.ts: Add unit tests for auth_time_ms presence and omission
  • CLAUDE.md: Update DictationResponse breakdown documentation
  • package.json: Bump version 4.41.5 → 4.41.6 for version bump check
  • CHANGELOG.md: Add [4.41.6] entry

Testing

  • Unit tests: pnpm test:unit tests/unit/sync.test.ts tests/unit/dictation.test.ts tests/unit/exports.test.ts (113/113 passing)
  • Lint & types: pnpm lint (eslint, tsc, prettier format, publint) all clean
  • Build: pnpm build creates all distribution bundles cleanly

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant