From 6d3fcc31d011a7370933da9aa32ad9f0752bc9d1 Mon Sep 17 00:00:00 2001 From: AssemblyAI Date: Wed, 10 Jul 2024 12:12:07 +0200 Subject: [PATCH] Project import generated by Copybara. GitOrigin-RevId: bd60027b002ee11ac036c7dc6faaf70c317ef842 --- CHANGELOG.md | 5 ++++- package.json | 2 +- src/types/openapi.generated.ts | 37 +++++++++++++++++++++++++--------- 3 files changed, 33 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 82892f0..de85aa9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,11 @@ # Changelog -## [4.5.1] +## [4.6.0] - Add more TSDoc comments for `RealtimeService` documentation +- Add new LeMUR models +- Add `TranscriptWebhookNotification` which is a union of `TranscriptReadyNotification` or `RedactedAudioNotification` +- Add `RedactedAudioNotification` which represents the body of the PII redacted audio webhook notification. ## [4.5.0] diff --git a/package.json b/package.json index c151806..6a9aa57 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "assemblyai", - "version": "4.5.0", + "version": "4.6.0", "description": "The AssemblyAI JavaScript SDK provides an easy-to-use interface for interacting with the AssemblyAI API, which supports async and real-time transcription, as well as the latest LeMUR models.", "engines": { "node": ">=18" diff --git a/src/types/openapi.generated.ts b/src/types/openapi.generated.ts index fcd0fef..fde73cd 100644 --- a/src/types/openapi.generated.ts +++ b/src/types/openapi.generated.ts @@ -632,7 +632,6 @@ export type LemurBaseParams = { >; /** * The model that is used for the final prompt after compression is performed. - * Defaults to "default". * * @defaultValue "default */ @@ -687,10 +686,16 @@ export type LemurBaseResponse = { * */ export type LemurModel = + | "anthropic/claude-3-5-sonnet" + | "anthropic/claude-3-opus" + | "anthropic/claude-3-haiku" + | "anthropic/claude-3-sonnet" + | "anthropic/claude-2-1" + | "anthropic/claude-2" | "default" + | "anthropic/claude-instant-1-2" | "basic" - | "assemblyai/mistral-7b" - | "anthropic/claude-2-1"; + | "assemblyai/mistral-7b"; /** * @example @@ -1168,6 +1173,11 @@ export type RealtimeTemporaryTokenResponse = { token: string; }; +/** + * The notification when the redacted audio is ready. + */ +export type RedactedAudioNotification = RedactedAudioResponse; + /** * @example * ```js @@ -2506,15 +2516,17 @@ export type Transcript = { */ webhook_auth: boolean; /** - * The header name which should be sent back with webhook calls + * The header name to be sent with the transcript completed or failed webhook requests */ webhook_auth_header_name?: string | null; /** - * The status code we received from your server when delivering your webhook, if a webhook URL was provided + * The status code we received from your server when delivering the transcript completed or failed webhook request, if a webhook URL was provided */ webhook_status_code?: number | null; /** - * The URL to which we send webhooks upon transcription completion + * The URL to which we send webhook requests. + * We sends two different types of webhook requests. + * One request when a transcript is completed or failed, and one request when the redacted audio is ready if redact_pii_audio is enabled. */ webhook_url?: string | null; /** @@ -2931,17 +2943,17 @@ export type TranscriptOptionalParams = { */ topics?: string[]; /** - * The header name which should be sent back with webhook calls + * The header name to be sent with the transcript completed or failed webhook requests * @defaultValue null */ webhook_auth_header_name?: string | null; /** - * Specify a header name and value to send back with a webhook call for added security + * The header value to send back with the transcript completed or failed webhook requests for added security * @defaultValue null */ webhook_auth_header_value?: string | null; /** - * The URL to which AssemblyAI send webhooks upon transcription completion + * The URL to which we send webhook requests. We sends two different types of webhook requests. One request when a transcript is completed or failed, and one request when the redacted audio is ready if redact_pii_audio is enabled. */ webhook_url?: string; /** @@ -3292,6 +3304,13 @@ export type TranscriptUtterance = { words: TranscriptWord[]; }; +/** + * The notifications sent to the webhook URL. + */ +export type TranscriptWebhookNotification = + | TranscriptReadyNotification + | RedactedAudioNotification; + /** * @example * ```js