Skip to content

Releases: corticph/corti-sdk-javascript

v1.0.0-rc.8

17 Apr 12:31
2abc6b2

Choose a tag to compare

v1.0.0-rc.8 Pre-release
Pre-release
SDK regeneration

v1.0.0

16 Apr 10:52
6a6d0bb

Choose a tag to compare

Overview

This release delivers a broad SDK refresh with improved API coverage, stronger authentication workflows, and more reliable real-time streaming behavior. It also includes a few compatibility-impacting updates, so please review breaking changes before upgrading.

❗ Breaking changes

  • Auth token model/type rename: Auth request/response types changed from AuthGetTokenRequest/GetTokenResponse to OAuth-style token types, so code referencing old auth types will fail to compile.
    • Migration: Replace Corti.AuthGetTokenRequest with Corti.OAuthTokenRequest and Corti.GetTokenResponse with Corti.AuthTokenResponse; update token request payloads to OAuth grant-specific shapes.
    • Example:
      • Before:
        const req: Corti.AuthGetTokenRequest = { clientId, clientSecret };
        const res: Corti.GetTokenResponse = await auth.getToken(req);
      • After:
        const req: Corti.OAuthTokenRequest = { clientId, clientSecret };
        const res: Corti.AuthTokenResponse = await auth.getToken(req);
  • getEnvironment is no longer exported from the package root: Root-level imports of getEnvironment are no longer available.
    • Migration: Import from the utils subpath export instead of @corti/sdk.
    • Example:
      • Before:
        import { getEnvironment } from "@corti/sdk";
      • After:
        import { getEnvironment } from "@corti/sdk/utils";
  • connect(...) behavior changed for configured realtime sockets: CustomStream.connect(...) and CustomTranscribe.connect(...) now wait for config acknowledgement by default (awaitConfiguration: true) when configuration is provided, which changes when the socket becomes usable and can affect message timing/visibility in existing listeners.
    • If you want old behavior (immediate socket access): Opt out with awaitConfiguration: false and keep your existing config-status handling flow.
      • Example:
        const socket = await client.stream.connect({
          id,
          configuration,
          awaitConfiguration: false,
        });
    • If you want new behavior (ack-safe default): Keep awaitConfiguration as true, remove CONFIG_ACCEPTED/other config-status handling from .on("message"), and start sending audio only after await connect(...) resolves.
      • Example:
        const socket = await client.stream.connect({ id, configuration });
        startAudio();
  • Socket config status kinds changed: StreamConfigStatusMessageType.ConfigTimeout is no longer part of the stream config status kind union, so code that explicitly matches this kind can fail type checks or miss fallback handling.
    • Migration: Update stream message-kind handling to rely on currently exported kinds (ConfigAccepted, ConfigDenied, ConfigMissing, ConfigNotProvided, ConfigAlreadyReceived) and keep a default/fallback branch for unknown future kinds.
    • Example:
      • Before:
        if (msg.type === StreamConfigStatusMessageType.ConfigTimeout) {
          retry();
        }
      • After:
        if (
          msg.type === StreamConfigStatusMessageType.ConfigDenied ||
          msg.type === StreamConfigStatusMessageType.ConfigMissing ||
          msg.type === StreamConfigStatusMessageType.ConfigNotProvided
        ) {
          retry();
        } else {
          // fallback
        }

Changes

  • feat(auth): extended CortiAuth with flow-specific methods getCodeFlowToken, getPkceFlowToken, getRopcFlowToken, and refreshToken.
  • feat(auth): added AuthClient.token(tenantName, request) for POST /{tenantName}/protocol/openid-connect/token with AuthTokenRequestBody.
  • feat(client): extended CortiClient auth support to handle multiple flows through auth options (client_credentials, authorization_code, pkce, ropc, and token-derivable auth).
  • feat(client): added CortiClient.getAuthHeaders() to return resolved Authorization and Tenant-Name headers.
  • feat(utils): added @corti/sdk/utils subpath exports for getEnvironment, decodeToken, generateCodeChallenge, and generateCodeVerifier.
  • feat(agents): expanded exported agent typing surface with new symbols including AgentsCreateExpertReferenceType, AgentsCreateExpertType, AgentsMessageKind, and AgentsValidationErrorResponse.
  • feat(errors): added UnprocessableEntityError and mapped 422 responses (for example in agents.getRegistryExperts(...)) to typed SDK errors.
  • feat(agents): added custom agents convenience support for card URL retrieval (agents.getCardUrl(...)).
  • feat(stream): added retention policy type support via StreamConfigXCortiRetentionPolicy (retain/none) on stream configuration.
  • fix(stream): CustomStream.connect() now treats StreamConfigStatusMessageType.ConfigAlreadyReceived as accepted and handles ConfigNotProvided/ConfigMissing as config failures consistently.
  • fix(transcribe): CustomTranscribe.connect() now treats TranscribeConfigStatusMessageType.ConfigAlreadyReceived as accepted and handles ConfigMissing as a config failure.
  • feat(codes): extended CommonCodingSystemEnum with icd10int-inpatient, icd10int-outpatient, icd10uk-inpatient, and icd10uk-outpatient.

v1.0.0-rc.7

16 Apr 10:23

Choose a tag to compare

v1.0.0-rc.7 Pre-release
Pre-release
feat: enhance stream and transcribe message handling for additional c…

v1.0.0-rc.6

14 Apr 08:36

Choose a tag to compare

v1.0.0-rc.6 Pre-release
Pre-release
chore:  tsdoc comments

v1.0.0-rc.5

09 Apr 15:05

Choose a tag to compare

v1.0.0-rc.5 Pre-release
Pre-release
feat: introduce new authentication types and refactor auth handling i…

v1.0.0-rc.4

08 Apr 13:29

Choose a tag to compare

v1.0.0-rc.4 Pre-release
Pre-release
fix: set tenantName to null to avoid header rewriting issues

v1.0.0-rc.3

08 Apr 13:20

Choose a tag to compare

v1.0.0-rc.3 Pre-release
Pre-release
fix: tenantName was empty in auth URL

v1.0.0-rc.2

08 Apr 13:00

Choose a tag to compare

v1.0.0-rc.2 Pre-release
Pre-release
chore: remove unused imports and clean up header names

v1.0.0-rc.1

08 Apr 12:53

Choose a tag to compare

v1.0.0-rc.1 Pre-release
Pre-release
feat: enhance CortiAuth with tenant name support and strip Fern headers

v1.0.0-rc

08 Apr 11:00

Choose a tag to compare

v1.0.0-rc Pre-release
Pre-release
feat: add tests for code prediction and stream connection with xCorti…