diff --git a/.fern/metadata.json b/.fern/metadata.json index 7c906e18..07220b61 100644 --- a/.fern/metadata.json +++ b/.fern/metadata.json @@ -1,5 +1,5 @@ { - "cliVersion": "4.3.0", + "cliVersion": "4.46.0", "generatorName": "fernapi/fern-typescript-node-sdk", "generatorVersion": "3.53.3", "generatorConfig": { @@ -9,10 +9,8 @@ "skipResponseValidation": true, "includeApiReference": true, "shouldGenerateWebsocketClients": true, - "enableForwardCompatibleEnums": true, - "packageJson": { - "name": "@deepgram/sdk" - } + "enableForwardCompatibleEnums": true }, - "sdkVersion": "5.0.0" + "originGitCommit": "af946f60773987d08b8c117585b6dba834e317c6", + "sdkVersion": "5.0.1" } diff --git a/context7.json b/context7.json deleted file mode 100644 index 7714df0e..00000000 --- a/context7.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "url": "https://context7.com/deepgram/deepgram-js-sdk", - "public_key": "pk_hu7APZeIXQ14hNyaCBm0A" -} diff --git a/package.json b/package.json index a001cc39..fb96bfc4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@deepgram/sdk", - "version": "5.0.0", + "version": "5.0.1", "private": false, "repository": { "type": "git", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a7c79aab..ddf8312b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -10,7 +10,7 @@ importers: dependencies: ws: specifier: ^8.16.0 - version: 8.19.0 + version: 8.20.0 devDependencies: '@biomejs/biome': specifier: 2.4.3 @@ -1148,8 +1148,8 @@ packages: resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} engines: {node: '>=10'} - ws@8.19.0: - resolution: {integrity: sha512-blAT2mjOEIi0ZzruJfIhb3nps74PRWTCz1IjglWEEpQl5XS/UNama6u2/rjFkDDouqr4L67ry+1aGIALViWjDg==} + ws@8.20.0: + resolution: {integrity: sha512-sAt8BhgNbzCtgGbt2OxmpuryO63ZoDk/sqaB/znQm94T4fCEsy/yV+7CdC1kJhOU9lboAEU7R3kquuycDoibVA==} engines: {node: '>=10.0.0'} peerDependencies: bufferutil: ^4.0.1 @@ -2174,7 +2174,7 @@ snapshots: string-width: 4.2.3 strip-ansi: 6.0.1 - ws@8.19.0: {} + ws@8.20.0: {} y18n@5.0.8: {} diff --git a/src/BaseClient.ts b/src/BaseClient.ts index 0c5c9340..25ae78ab 100644 --- a/src/BaseClient.ts +++ b/src/BaseClient.ts @@ -52,8 +52,8 @@ export function normalizeClientOptions | undefined; + } + | undefined; + functions?: + | { + name?: string | undefined; + description?: string | undefined; + parameters?: Record | undefined; + endpoint?: + | { + url?: string | undefined; + method?: string | undefined; + headers?: Record | undefined; + } + | undefined; + }[] + | undefined; + prompt?: string | undefined; + context_length?: ("max" | number) | undefined; + }[]; + export type Speak = + | { + provider: Deepgram.agent.AgentV1SettingsAgentSpeakEndpointProvider; + endpoint?: + | { + url?: string | undefined; + headers?: Record | undefined; + } + | undefined; + } + | { + provider: Deepgram.agent.AgentV1SettingsAgentSpeakOneItemProvider; + endpoint?: + | { + url?: string | undefined; + headers?: Record | undefined; + } + | undefined; + }[]; } } diff --git a/src/api/resources/agent/resources/v1/types/AgentV1SettingsAgentSpeakEndpointProvider.ts b/src/api/resources/agent/resources/v1/types/AgentV1SettingsAgentSpeakEndpointProvider.ts new file mode 100644 index 00000000..cfa0d0b1 --- /dev/null +++ b/src/api/resources/agent/resources/v1/types/AgentV1SettingsAgentSpeakEndpointProvider.ts @@ -0,0 +1,219 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Deepgram from "../../../../../index.js"; + +export type AgentV1SettingsAgentSpeakEndpointProvider = + | Deepgram.agent.AgentV1SettingsAgentSpeakEndpointProvider.Deepgram + | Deepgram.agent.AgentV1SettingsAgentSpeakEndpointProvider.ElevenLabs + | Deepgram.agent.AgentV1SettingsAgentSpeakEndpointProvider.Cartesia + | Deepgram.agent.AgentV1SettingsAgentSpeakEndpointProvider.OpenAi + | Deepgram.agent.AgentV1SettingsAgentSpeakEndpointProvider.AwsPolly; + +export namespace AgentV1SettingsAgentSpeakEndpointProvider { + export interface Deepgram { + type: "deepgram"; + /** The REST API version for the Deepgram text-to-speech API */ + version?: "v1" | undefined; + /** Deepgram TTS model */ + model: Deepgram.Model; + } + + export namespace Deepgram { + /** Deepgram TTS model */ + export const Model = { + AuraAsteriaEn: "aura-asteria-en", + AuraLunaEn: "aura-luna-en", + AuraStellaEn: "aura-stella-en", + AuraAthenaEn: "aura-athena-en", + AuraHeraEn: "aura-hera-en", + AuraOrionEn: "aura-orion-en", + AuraArcasEn: "aura-arcas-en", + AuraPerseusEn: "aura-perseus-en", + AuraAngusEn: "aura-angus-en", + AuraOrpheusEn: "aura-orpheus-en", + AuraHeliosEn: "aura-helios-en", + AuraZeusEn: "aura-zeus-en", + Aura2AmaltheaEn: "aura-2-amalthea-en", + Aura2AndromedaEn: "aura-2-andromeda-en", + Aura2ApolloEn: "aura-2-apollo-en", + Aura2ArcasEn: "aura-2-arcas-en", + Aura2AriesEn: "aura-2-aries-en", + Aura2AsteriaEn: "aura-2-asteria-en", + Aura2AthenaEn: "aura-2-athena-en", + Aura2AtlasEn: "aura-2-atlas-en", + Aura2AuroraEn: "aura-2-aurora-en", + Aura2CallistaEn: "aura-2-callista-en", + Aura2CoraEn: "aura-2-cora-en", + Aura2CordeliaEn: "aura-2-cordelia-en", + Aura2DeliaEn: "aura-2-delia-en", + Aura2DracoEn: "aura-2-draco-en", + Aura2ElectraEn: "aura-2-electra-en", + Aura2HarmoniaEn: "aura-2-harmonia-en", + Aura2HelenaEn: "aura-2-helena-en", + Aura2HeraEn: "aura-2-hera-en", + Aura2HermesEn: "aura-2-hermes-en", + Aura2HyperionEn: "aura-2-hyperion-en", + Aura2IrisEn: "aura-2-iris-en", + Aura2JanusEn: "aura-2-janus-en", + Aura2JunoEn: "aura-2-juno-en", + Aura2JupiterEn: "aura-2-jupiter-en", + Aura2LunaEn: "aura-2-luna-en", + Aura2MarsEn: "aura-2-mars-en", + Aura2MinervaEn: "aura-2-minerva-en", + Aura2NeptuneEn: "aura-2-neptune-en", + Aura2OdysseusEn: "aura-2-odysseus-en", + Aura2OpheliaEn: "aura-2-ophelia-en", + Aura2OrionEn: "aura-2-orion-en", + Aura2OrpheusEn: "aura-2-orpheus-en", + Aura2PandoraEn: "aura-2-pandora-en", + Aura2PhoebeEn: "aura-2-phoebe-en", + Aura2PlutoEn: "aura-2-pluto-en", + Aura2SaturnEn: "aura-2-saturn-en", + Aura2SeleneEn: "aura-2-selene-en", + Aura2ThaliaEn: "aura-2-thalia-en", + Aura2TheiaEn: "aura-2-theia-en", + Aura2VestaEn: "aura-2-vesta-en", + Aura2ZeusEn: "aura-2-zeus-en", + Aura2SirioEs: "aura-2-sirio-es", + Aura2NestorEs: "aura-2-nestor-es", + Aura2CarinaEs: "aura-2-carina-es", + Aura2CelesteEs: "aura-2-celeste-es", + Aura2AlvaroEs: "aura-2-alvaro-es", + Aura2DianaEs: "aura-2-diana-es", + Aura2AquilaEs: "aura-2-aquila-es", + Aura2SelenaEs: "aura-2-selena-es", + Aura2EstrellaEs: "aura-2-estrella-es", + Aura2JavierEs: "aura-2-javier-es", + } as const; + export type Model = (typeof Model)[keyof typeof Model] | string; + } + + export interface ElevenLabs { + type: "eleven_labs"; + /** The REST API version for the ElevenLabs text-to-speech API */ + version?: "v1" | undefined; + /** Eleven Labs model ID */ + model_id: ElevenLabs.ModelId; + /** Optional language to use, e.g. 'en-US'. Corresponds to the `language_code` parameter in the ElevenLabs API */ + language?: string | undefined; + /** Use the `language` field instead. */ + language_code?: string | undefined; + } + + export namespace ElevenLabs { + /** Eleven Labs model ID */ + export const ModelId = { + ElevenTurboV25: "eleven_turbo_v2_5", + ElevenMonolingualV1: "eleven_monolingual_v1", + ElevenMultilingualV2: "eleven_multilingual_v2", + } as const; + export type ModelId = (typeof ModelId)[keyof typeof ModelId] | string; + } + + export interface Cartesia { + type: "cartesia"; + /** The API version header for the Cartesia text-to-speech API */ + version?: "2025-03-17" | undefined; + /** Cartesia model ID */ + model_id: Cartesia.ModelId; + voice: Cartesia.Voice; + /** Cartesia language code */ + language?: string | undefined; + } + + export namespace Cartesia { + /** Cartesia model ID */ + export const ModelId = { + Sonic2: "sonic-2", + SonicMultilingual: "sonic-multilingual", + } as const; + export type ModelId = (typeof ModelId)[keyof typeof ModelId] | string; + + export interface Voice { + /** Cartesia voice mode */ + mode: string; + /** Cartesia voice ID */ + id: string; + } + } + + export interface OpenAi { + type: "open_ai"; + /** The REST API version for the OpenAI text-to-speech API */ + version?: "v1" | undefined; + /** OpenAI TTS model */ + model: AgentV1SettingsAgentSpeakEndpointProviderOpenAi.Model; + /** OpenAI voice */ + voice: AgentV1SettingsAgentSpeakEndpointProviderOpenAi.Voice; + } + + export namespace AgentV1SettingsAgentSpeakEndpointProviderOpenAi { + /** OpenAI TTS model */ + export const Model = { + Tts1: "tts-1", + Tts1Hd: "tts-1-hd", + } as const; + export type Model = (typeof Model)[keyof typeof Model] | string; + /** OpenAI voice */ + export const Voice = { + Alloy: "alloy", + Echo: "echo", + Fable: "fable", + Onyx: "onyx", + Nova: "nova", + Shimmer: "shimmer", + } as const; + export type Voice = (typeof Voice)[keyof typeof Voice] | string; + } + + export interface AwsPolly { + type: "aws_polly"; + /** AWS Polly voice name */ + voice: AgentV1SettingsAgentSpeakEndpointProviderAwsPolly.Voice; + /** Language code to use, e.g. 'en-US'. Corresponds to the `language_code` parameter in the AWS Polly API */ + language: string; + /** Use the `language` field instead. */ + language_code?: string | undefined; + engine: AgentV1SettingsAgentSpeakEndpointProviderAwsPolly.Engine; + credentials: AgentV1SettingsAgentSpeakEndpointProviderAwsPolly.Credentials; + } + + export namespace AgentV1SettingsAgentSpeakEndpointProviderAwsPolly { + /** AWS Polly voice name */ + export const Voice = { + Matthew: "Matthew", + Joanna: "Joanna", + Amy: "Amy", + Emma: "Emma", + Brian: "Brian", + Arthur: "Arthur", + Aria: "Aria", + Ayanda: "Ayanda", + } as const; + export type Voice = (typeof Voice)[keyof typeof Voice] | string; + export const Engine = { + Generative: "generative", + LongForm: "long-form", + Standard: "standard", + Neural: "neural", + } as const; + export type Engine = (typeof Engine)[keyof typeof Engine] | string; + + export interface Credentials { + type: Credentials.Type; + region: string; + access_key_id: string; + secret_access_key: string; + /** Required for STS only */ + session_token?: string | undefined; + } + + export namespace Credentials { + export const Type = { + Sts: "sts", + Iam: "iam", + } as const; + export type Type = (typeof Type)[keyof typeof Type] | string; + } + } +} diff --git a/src/api/resources/agent/resources/v1/types/AgentV1SettingsAgentSpeakOneItemProvider.ts b/src/api/resources/agent/resources/v1/types/AgentV1SettingsAgentSpeakOneItemProvider.ts new file mode 100644 index 00000000..c38f2a50 --- /dev/null +++ b/src/api/resources/agent/resources/v1/types/AgentV1SettingsAgentSpeakOneItemProvider.ts @@ -0,0 +1,219 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Deepgram from "../../../../../index.js"; + +export type AgentV1SettingsAgentSpeakOneItemProvider = + | Deepgram.agent.AgentV1SettingsAgentSpeakOneItemProvider.Deepgram + | Deepgram.agent.AgentV1SettingsAgentSpeakOneItemProvider.ElevenLabs + | Deepgram.agent.AgentV1SettingsAgentSpeakOneItemProvider.Cartesia + | Deepgram.agent.AgentV1SettingsAgentSpeakOneItemProvider.OpenAi + | Deepgram.agent.AgentV1SettingsAgentSpeakOneItemProvider.AwsPolly; + +export namespace AgentV1SettingsAgentSpeakOneItemProvider { + export interface Deepgram { + type: "deepgram"; + /** The REST API version for the Deepgram text-to-speech API */ + version?: "v1" | undefined; + /** Deepgram TTS model */ + model: Deepgram.Model; + } + + export namespace Deepgram { + /** Deepgram TTS model */ + export const Model = { + AuraAsteriaEn: "aura-asteria-en", + AuraLunaEn: "aura-luna-en", + AuraStellaEn: "aura-stella-en", + AuraAthenaEn: "aura-athena-en", + AuraHeraEn: "aura-hera-en", + AuraOrionEn: "aura-orion-en", + AuraArcasEn: "aura-arcas-en", + AuraPerseusEn: "aura-perseus-en", + AuraAngusEn: "aura-angus-en", + AuraOrpheusEn: "aura-orpheus-en", + AuraHeliosEn: "aura-helios-en", + AuraZeusEn: "aura-zeus-en", + Aura2AmaltheaEn: "aura-2-amalthea-en", + Aura2AndromedaEn: "aura-2-andromeda-en", + Aura2ApolloEn: "aura-2-apollo-en", + Aura2ArcasEn: "aura-2-arcas-en", + Aura2AriesEn: "aura-2-aries-en", + Aura2AsteriaEn: "aura-2-asteria-en", + Aura2AthenaEn: "aura-2-athena-en", + Aura2AtlasEn: "aura-2-atlas-en", + Aura2AuroraEn: "aura-2-aurora-en", + Aura2CallistaEn: "aura-2-callista-en", + Aura2CoraEn: "aura-2-cora-en", + Aura2CordeliaEn: "aura-2-cordelia-en", + Aura2DeliaEn: "aura-2-delia-en", + Aura2DracoEn: "aura-2-draco-en", + Aura2ElectraEn: "aura-2-electra-en", + Aura2HarmoniaEn: "aura-2-harmonia-en", + Aura2HelenaEn: "aura-2-helena-en", + Aura2HeraEn: "aura-2-hera-en", + Aura2HermesEn: "aura-2-hermes-en", + Aura2HyperionEn: "aura-2-hyperion-en", + Aura2IrisEn: "aura-2-iris-en", + Aura2JanusEn: "aura-2-janus-en", + Aura2JunoEn: "aura-2-juno-en", + Aura2JupiterEn: "aura-2-jupiter-en", + Aura2LunaEn: "aura-2-luna-en", + Aura2MarsEn: "aura-2-mars-en", + Aura2MinervaEn: "aura-2-minerva-en", + Aura2NeptuneEn: "aura-2-neptune-en", + Aura2OdysseusEn: "aura-2-odysseus-en", + Aura2OpheliaEn: "aura-2-ophelia-en", + Aura2OrionEn: "aura-2-orion-en", + Aura2OrpheusEn: "aura-2-orpheus-en", + Aura2PandoraEn: "aura-2-pandora-en", + Aura2PhoebeEn: "aura-2-phoebe-en", + Aura2PlutoEn: "aura-2-pluto-en", + Aura2SaturnEn: "aura-2-saturn-en", + Aura2SeleneEn: "aura-2-selene-en", + Aura2ThaliaEn: "aura-2-thalia-en", + Aura2TheiaEn: "aura-2-theia-en", + Aura2VestaEn: "aura-2-vesta-en", + Aura2ZeusEn: "aura-2-zeus-en", + Aura2SirioEs: "aura-2-sirio-es", + Aura2NestorEs: "aura-2-nestor-es", + Aura2CarinaEs: "aura-2-carina-es", + Aura2CelesteEs: "aura-2-celeste-es", + Aura2AlvaroEs: "aura-2-alvaro-es", + Aura2DianaEs: "aura-2-diana-es", + Aura2AquilaEs: "aura-2-aquila-es", + Aura2SelenaEs: "aura-2-selena-es", + Aura2EstrellaEs: "aura-2-estrella-es", + Aura2JavierEs: "aura-2-javier-es", + } as const; + export type Model = (typeof Model)[keyof typeof Model] | string; + } + + export interface ElevenLabs { + type: "eleven_labs"; + /** The REST API version for the ElevenLabs text-to-speech API */ + version?: "v1" | undefined; + /** Eleven Labs model ID */ + model_id: ElevenLabs.ModelId; + /** Optional language to use, e.g. 'en-US'. Corresponds to the `language_code` parameter in the ElevenLabs API */ + language?: string | undefined; + /** Use the `language` field instead. */ + language_code?: string | undefined; + } + + export namespace ElevenLabs { + /** Eleven Labs model ID */ + export const ModelId = { + ElevenTurboV25: "eleven_turbo_v2_5", + ElevenMonolingualV1: "eleven_monolingual_v1", + ElevenMultilingualV2: "eleven_multilingual_v2", + } as const; + export type ModelId = (typeof ModelId)[keyof typeof ModelId] | string; + } + + export interface Cartesia { + type: "cartesia"; + /** The API version header for the Cartesia text-to-speech API */ + version?: "2025-03-17" | undefined; + /** Cartesia model ID */ + model_id: Cartesia.ModelId; + voice: Cartesia.Voice; + /** Cartesia language code */ + language?: string | undefined; + } + + export namespace Cartesia { + /** Cartesia model ID */ + export const ModelId = { + Sonic2: "sonic-2", + SonicMultilingual: "sonic-multilingual", + } as const; + export type ModelId = (typeof ModelId)[keyof typeof ModelId] | string; + + export interface Voice { + /** Cartesia voice mode */ + mode: string; + /** Cartesia voice ID */ + id: string; + } + } + + export interface OpenAi { + type: "open_ai"; + /** The REST API version for the OpenAI text-to-speech API */ + version?: "v1" | undefined; + /** OpenAI TTS model */ + model: AgentV1SettingsAgentSpeakOneItemProviderOpenAi.Model; + /** OpenAI voice */ + voice: AgentV1SettingsAgentSpeakOneItemProviderOpenAi.Voice; + } + + export namespace AgentV1SettingsAgentSpeakOneItemProviderOpenAi { + /** OpenAI TTS model */ + export const Model = { + Tts1: "tts-1", + Tts1Hd: "tts-1-hd", + } as const; + export type Model = (typeof Model)[keyof typeof Model] | string; + /** OpenAI voice */ + export const Voice = { + Alloy: "alloy", + Echo: "echo", + Fable: "fable", + Onyx: "onyx", + Nova: "nova", + Shimmer: "shimmer", + } as const; + export type Voice = (typeof Voice)[keyof typeof Voice] | string; + } + + export interface AwsPolly { + type: "aws_polly"; + /** AWS Polly voice name */ + voice: AgentV1SettingsAgentSpeakOneItemProviderAwsPolly.Voice; + /** Language code to use, e.g. 'en-US'. Corresponds to the `language_code` parameter in the AWS Polly API */ + language: string; + /** Use the `language` field instead. */ + language_code?: string | undefined; + engine: AgentV1SettingsAgentSpeakOneItemProviderAwsPolly.Engine; + credentials: AgentV1SettingsAgentSpeakOneItemProviderAwsPolly.Credentials; + } + + export namespace AgentV1SettingsAgentSpeakOneItemProviderAwsPolly { + /** AWS Polly voice name */ + export const Voice = { + Matthew: "Matthew", + Joanna: "Joanna", + Amy: "Amy", + Emma: "Emma", + Brian: "Brian", + Arthur: "Arthur", + Aria: "Aria", + Ayanda: "Ayanda", + } as const; + export type Voice = (typeof Voice)[keyof typeof Voice] | string; + export const Engine = { + Generative: "generative", + LongForm: "long-form", + Standard: "standard", + Neural: "neural", + } as const; + export type Engine = (typeof Engine)[keyof typeof Engine] | string; + + export interface Credentials { + type: Credentials.Type; + region: string; + access_key_id: string; + secret_access_key: string; + /** Required for STS only */ + session_token?: string | undefined; + } + + export namespace Credentials { + export const Type = { + Sts: "sts", + Iam: "iam", + } as const; + export type Type = (typeof Type)[keyof typeof Type] | string; + } + } +} diff --git a/src/api/resources/agent/resources/v1/types/AgentV1ThinkUpdated.ts b/src/api/resources/agent/resources/v1/types/AgentV1ThinkUpdated.ts deleted file mode 100644 index 27fa649c..00000000 --- a/src/api/resources/agent/resources/v1/types/AgentV1ThinkUpdated.ts +++ /dev/null @@ -1,6 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -export interface AgentV1ThinkUpdated { - /** Message type identifier for think update confirmation */ - type: "ThinkUpdated"; -} diff --git a/src/api/resources/agent/resources/v1/types/AgentV1UpdateSpeak.ts b/src/api/resources/agent/resources/v1/types/AgentV1UpdateSpeak.ts index b62c6ea7..52f494d9 100644 --- a/src/api/resources/agent/resources/v1/types/AgentV1UpdateSpeak.ts +++ b/src/api/resources/agent/resources/v1/types/AgentV1UpdateSpeak.ts @@ -9,5 +9,23 @@ export interface AgentV1UpdateSpeak { } export namespace AgentV1UpdateSpeak { - export type Speak = Deepgram.SpeakSettingsV1 | Deepgram.SpeakSettingsV1[]; + export type Speak = + | { + provider: Deepgram.agent.AgentV1UpdateSpeakSpeakEndpointProvider; + endpoint?: + | { + url?: string | undefined; + headers?: Record | undefined; + } + | undefined; + } + | { + provider: Deepgram.agent.AgentV1UpdateSpeakSpeakOneItemProvider; + endpoint?: + | { + url?: string | undefined; + headers?: Record | undefined; + } + | undefined; + }[]; } diff --git a/src/api/resources/agent/resources/v1/types/AgentV1UpdateSpeakSpeakEndpointProvider.ts b/src/api/resources/agent/resources/v1/types/AgentV1UpdateSpeakSpeakEndpointProvider.ts new file mode 100644 index 00000000..b8274775 --- /dev/null +++ b/src/api/resources/agent/resources/v1/types/AgentV1UpdateSpeakSpeakEndpointProvider.ts @@ -0,0 +1,219 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Deepgram from "../../../../../index.js"; + +export type AgentV1UpdateSpeakSpeakEndpointProvider = + | Deepgram.agent.AgentV1UpdateSpeakSpeakEndpointProvider.Deepgram + | Deepgram.agent.AgentV1UpdateSpeakSpeakEndpointProvider.ElevenLabs + | Deepgram.agent.AgentV1UpdateSpeakSpeakEndpointProvider.Cartesia + | Deepgram.agent.AgentV1UpdateSpeakSpeakEndpointProvider.OpenAi + | Deepgram.agent.AgentV1UpdateSpeakSpeakEndpointProvider.AwsPolly; + +export namespace AgentV1UpdateSpeakSpeakEndpointProvider { + export interface Deepgram { + type: "deepgram"; + /** The REST API version for the Deepgram text-to-speech API */ + version?: "v1" | undefined; + /** Deepgram TTS model */ + model: AgentV1UpdateSpeakSpeakEndpointProviderDeepgram.Model; + } + + export namespace AgentV1UpdateSpeakSpeakEndpointProviderDeepgram { + /** Deepgram TTS model */ + export const Model = { + AuraAsteriaEn: "aura-asteria-en", + AuraLunaEn: "aura-luna-en", + AuraStellaEn: "aura-stella-en", + AuraAthenaEn: "aura-athena-en", + AuraHeraEn: "aura-hera-en", + AuraOrionEn: "aura-orion-en", + AuraArcasEn: "aura-arcas-en", + AuraPerseusEn: "aura-perseus-en", + AuraAngusEn: "aura-angus-en", + AuraOrpheusEn: "aura-orpheus-en", + AuraHeliosEn: "aura-helios-en", + AuraZeusEn: "aura-zeus-en", + Aura2AmaltheaEn: "aura-2-amalthea-en", + Aura2AndromedaEn: "aura-2-andromeda-en", + Aura2ApolloEn: "aura-2-apollo-en", + Aura2ArcasEn: "aura-2-arcas-en", + Aura2AriesEn: "aura-2-aries-en", + Aura2AsteriaEn: "aura-2-asteria-en", + Aura2AthenaEn: "aura-2-athena-en", + Aura2AtlasEn: "aura-2-atlas-en", + Aura2AuroraEn: "aura-2-aurora-en", + Aura2CallistaEn: "aura-2-callista-en", + Aura2CoraEn: "aura-2-cora-en", + Aura2CordeliaEn: "aura-2-cordelia-en", + Aura2DeliaEn: "aura-2-delia-en", + Aura2DracoEn: "aura-2-draco-en", + Aura2ElectraEn: "aura-2-electra-en", + Aura2HarmoniaEn: "aura-2-harmonia-en", + Aura2HelenaEn: "aura-2-helena-en", + Aura2HeraEn: "aura-2-hera-en", + Aura2HermesEn: "aura-2-hermes-en", + Aura2HyperionEn: "aura-2-hyperion-en", + Aura2IrisEn: "aura-2-iris-en", + Aura2JanusEn: "aura-2-janus-en", + Aura2JunoEn: "aura-2-juno-en", + Aura2JupiterEn: "aura-2-jupiter-en", + Aura2LunaEn: "aura-2-luna-en", + Aura2MarsEn: "aura-2-mars-en", + Aura2MinervaEn: "aura-2-minerva-en", + Aura2NeptuneEn: "aura-2-neptune-en", + Aura2OdysseusEn: "aura-2-odysseus-en", + Aura2OpheliaEn: "aura-2-ophelia-en", + Aura2OrionEn: "aura-2-orion-en", + Aura2OrpheusEn: "aura-2-orpheus-en", + Aura2PandoraEn: "aura-2-pandora-en", + Aura2PhoebeEn: "aura-2-phoebe-en", + Aura2PlutoEn: "aura-2-pluto-en", + Aura2SaturnEn: "aura-2-saturn-en", + Aura2SeleneEn: "aura-2-selene-en", + Aura2ThaliaEn: "aura-2-thalia-en", + Aura2TheiaEn: "aura-2-theia-en", + Aura2VestaEn: "aura-2-vesta-en", + Aura2ZeusEn: "aura-2-zeus-en", + Aura2SirioEs: "aura-2-sirio-es", + Aura2NestorEs: "aura-2-nestor-es", + Aura2CarinaEs: "aura-2-carina-es", + Aura2CelesteEs: "aura-2-celeste-es", + Aura2AlvaroEs: "aura-2-alvaro-es", + Aura2DianaEs: "aura-2-diana-es", + Aura2AquilaEs: "aura-2-aquila-es", + Aura2SelenaEs: "aura-2-selena-es", + Aura2EstrellaEs: "aura-2-estrella-es", + Aura2JavierEs: "aura-2-javier-es", + } as const; + export type Model = (typeof Model)[keyof typeof Model] | string; + } + + export interface ElevenLabs { + type: "eleven_labs"; + /** The REST API version for the ElevenLabs text-to-speech API */ + version?: "v1" | undefined; + /** Eleven Labs model ID */ + model_id: AgentV1UpdateSpeakSpeakEndpointProviderElevenLabs.ModelId; + /** Optional language to use, e.g. 'en-US'. Corresponds to the `language_code` parameter in the ElevenLabs API */ + language?: string | undefined; + /** Use the `language` field instead. */ + language_code?: string | undefined; + } + + export namespace AgentV1UpdateSpeakSpeakEndpointProviderElevenLabs { + /** Eleven Labs model ID */ + export const ModelId = { + ElevenTurboV25: "eleven_turbo_v2_5", + ElevenMonolingualV1: "eleven_monolingual_v1", + ElevenMultilingualV2: "eleven_multilingual_v2", + } as const; + export type ModelId = (typeof ModelId)[keyof typeof ModelId] | string; + } + + export interface Cartesia { + type: "cartesia"; + /** The API version header for the Cartesia text-to-speech API */ + version?: "2025-03-17" | undefined; + /** Cartesia model ID */ + model_id: AgentV1UpdateSpeakSpeakEndpointProviderCartesia.ModelId; + voice: AgentV1UpdateSpeakSpeakEndpointProviderCartesia.Voice; + /** Cartesia language code */ + language?: string | undefined; + } + + export namespace AgentV1UpdateSpeakSpeakEndpointProviderCartesia { + /** Cartesia model ID */ + export const ModelId = { + Sonic2: "sonic-2", + SonicMultilingual: "sonic-multilingual", + } as const; + export type ModelId = (typeof ModelId)[keyof typeof ModelId] | string; + + export interface Voice { + /** Cartesia voice mode */ + mode: string; + /** Cartesia voice ID */ + id: string; + } + } + + export interface OpenAi { + type: "open_ai"; + /** The REST API version for the OpenAI text-to-speech API */ + version?: "v1" | undefined; + /** OpenAI TTS model */ + model: AgentV1UpdateSpeakSpeakEndpointProviderOpenAi.Model; + /** OpenAI voice */ + voice: AgentV1UpdateSpeakSpeakEndpointProviderOpenAi.Voice; + } + + export namespace AgentV1UpdateSpeakSpeakEndpointProviderOpenAi { + /** OpenAI TTS model */ + export const Model = { + Tts1: "tts-1", + Tts1Hd: "tts-1-hd", + } as const; + export type Model = (typeof Model)[keyof typeof Model] | string; + /** OpenAI voice */ + export const Voice = { + Alloy: "alloy", + Echo: "echo", + Fable: "fable", + Onyx: "onyx", + Nova: "nova", + Shimmer: "shimmer", + } as const; + export type Voice = (typeof Voice)[keyof typeof Voice] | string; + } + + export interface AwsPolly { + type: "aws_polly"; + /** AWS Polly voice name */ + voice: AgentV1UpdateSpeakSpeakEndpointProviderAwsPolly.Voice; + /** Language code to use, e.g. 'en-US'. Corresponds to the `language_code` parameter in the AWS Polly API */ + language: string; + /** Use the `language` field instead. */ + language_code?: string | undefined; + engine: AgentV1UpdateSpeakSpeakEndpointProviderAwsPolly.Engine; + credentials: AgentV1UpdateSpeakSpeakEndpointProviderAwsPolly.Credentials; + } + + export namespace AgentV1UpdateSpeakSpeakEndpointProviderAwsPolly { + /** AWS Polly voice name */ + export const Voice = { + Matthew: "Matthew", + Joanna: "Joanna", + Amy: "Amy", + Emma: "Emma", + Brian: "Brian", + Arthur: "Arthur", + Aria: "Aria", + Ayanda: "Ayanda", + } as const; + export type Voice = (typeof Voice)[keyof typeof Voice] | string; + export const Engine = { + Generative: "generative", + LongForm: "long-form", + Standard: "standard", + Neural: "neural", + } as const; + export type Engine = (typeof Engine)[keyof typeof Engine] | string; + + export interface Credentials { + type: Credentials.Type; + region: string; + access_key_id: string; + secret_access_key: string; + /** Required for STS only */ + session_token?: string | undefined; + } + + export namespace Credentials { + export const Type = { + Sts: "sts", + Iam: "iam", + } as const; + export type Type = (typeof Type)[keyof typeof Type] | string; + } + } +} diff --git a/src/api/resources/agent/resources/v1/types/AgentV1UpdateSpeakSpeakOneItemProvider.ts b/src/api/resources/agent/resources/v1/types/AgentV1UpdateSpeakSpeakOneItemProvider.ts new file mode 100644 index 00000000..97709f59 --- /dev/null +++ b/src/api/resources/agent/resources/v1/types/AgentV1UpdateSpeakSpeakOneItemProvider.ts @@ -0,0 +1,219 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Deepgram from "../../../../../index.js"; + +export type AgentV1UpdateSpeakSpeakOneItemProvider = + | Deepgram.agent.AgentV1UpdateSpeakSpeakOneItemProvider.Deepgram + | Deepgram.agent.AgentV1UpdateSpeakSpeakOneItemProvider.ElevenLabs + | Deepgram.agent.AgentV1UpdateSpeakSpeakOneItemProvider.Cartesia + | Deepgram.agent.AgentV1UpdateSpeakSpeakOneItemProvider.OpenAi + | Deepgram.agent.AgentV1UpdateSpeakSpeakOneItemProvider.AwsPolly; + +export namespace AgentV1UpdateSpeakSpeakOneItemProvider { + export interface Deepgram { + type: "deepgram"; + /** The REST API version for the Deepgram text-to-speech API */ + version?: "v1" | undefined; + /** Deepgram TTS model */ + model: AgentV1UpdateSpeakSpeakOneItemProviderDeepgram.Model; + } + + export namespace AgentV1UpdateSpeakSpeakOneItemProviderDeepgram { + /** Deepgram TTS model */ + export const Model = { + AuraAsteriaEn: "aura-asteria-en", + AuraLunaEn: "aura-luna-en", + AuraStellaEn: "aura-stella-en", + AuraAthenaEn: "aura-athena-en", + AuraHeraEn: "aura-hera-en", + AuraOrionEn: "aura-orion-en", + AuraArcasEn: "aura-arcas-en", + AuraPerseusEn: "aura-perseus-en", + AuraAngusEn: "aura-angus-en", + AuraOrpheusEn: "aura-orpheus-en", + AuraHeliosEn: "aura-helios-en", + AuraZeusEn: "aura-zeus-en", + Aura2AmaltheaEn: "aura-2-amalthea-en", + Aura2AndromedaEn: "aura-2-andromeda-en", + Aura2ApolloEn: "aura-2-apollo-en", + Aura2ArcasEn: "aura-2-arcas-en", + Aura2AriesEn: "aura-2-aries-en", + Aura2AsteriaEn: "aura-2-asteria-en", + Aura2AthenaEn: "aura-2-athena-en", + Aura2AtlasEn: "aura-2-atlas-en", + Aura2AuroraEn: "aura-2-aurora-en", + Aura2CallistaEn: "aura-2-callista-en", + Aura2CoraEn: "aura-2-cora-en", + Aura2CordeliaEn: "aura-2-cordelia-en", + Aura2DeliaEn: "aura-2-delia-en", + Aura2DracoEn: "aura-2-draco-en", + Aura2ElectraEn: "aura-2-electra-en", + Aura2HarmoniaEn: "aura-2-harmonia-en", + Aura2HelenaEn: "aura-2-helena-en", + Aura2HeraEn: "aura-2-hera-en", + Aura2HermesEn: "aura-2-hermes-en", + Aura2HyperionEn: "aura-2-hyperion-en", + Aura2IrisEn: "aura-2-iris-en", + Aura2JanusEn: "aura-2-janus-en", + Aura2JunoEn: "aura-2-juno-en", + Aura2JupiterEn: "aura-2-jupiter-en", + Aura2LunaEn: "aura-2-luna-en", + Aura2MarsEn: "aura-2-mars-en", + Aura2MinervaEn: "aura-2-minerva-en", + Aura2NeptuneEn: "aura-2-neptune-en", + Aura2OdysseusEn: "aura-2-odysseus-en", + Aura2OpheliaEn: "aura-2-ophelia-en", + Aura2OrionEn: "aura-2-orion-en", + Aura2OrpheusEn: "aura-2-orpheus-en", + Aura2PandoraEn: "aura-2-pandora-en", + Aura2PhoebeEn: "aura-2-phoebe-en", + Aura2PlutoEn: "aura-2-pluto-en", + Aura2SaturnEn: "aura-2-saturn-en", + Aura2SeleneEn: "aura-2-selene-en", + Aura2ThaliaEn: "aura-2-thalia-en", + Aura2TheiaEn: "aura-2-theia-en", + Aura2VestaEn: "aura-2-vesta-en", + Aura2ZeusEn: "aura-2-zeus-en", + Aura2SirioEs: "aura-2-sirio-es", + Aura2NestorEs: "aura-2-nestor-es", + Aura2CarinaEs: "aura-2-carina-es", + Aura2CelesteEs: "aura-2-celeste-es", + Aura2AlvaroEs: "aura-2-alvaro-es", + Aura2DianaEs: "aura-2-diana-es", + Aura2AquilaEs: "aura-2-aquila-es", + Aura2SelenaEs: "aura-2-selena-es", + Aura2EstrellaEs: "aura-2-estrella-es", + Aura2JavierEs: "aura-2-javier-es", + } as const; + export type Model = (typeof Model)[keyof typeof Model] | string; + } + + export interface ElevenLabs { + type: "eleven_labs"; + /** The REST API version for the ElevenLabs text-to-speech API */ + version?: "v1" | undefined; + /** Eleven Labs model ID */ + model_id: AgentV1UpdateSpeakSpeakOneItemProviderElevenLabs.ModelId; + /** Optional language to use, e.g. 'en-US'. Corresponds to the `language_code` parameter in the ElevenLabs API */ + language?: string | undefined; + /** Use the `language` field instead. */ + language_code?: string | undefined; + } + + export namespace AgentV1UpdateSpeakSpeakOneItemProviderElevenLabs { + /** Eleven Labs model ID */ + export const ModelId = { + ElevenTurboV25: "eleven_turbo_v2_5", + ElevenMonolingualV1: "eleven_monolingual_v1", + ElevenMultilingualV2: "eleven_multilingual_v2", + } as const; + export type ModelId = (typeof ModelId)[keyof typeof ModelId] | string; + } + + export interface Cartesia { + type: "cartesia"; + /** The API version header for the Cartesia text-to-speech API */ + version?: "2025-03-17" | undefined; + /** Cartesia model ID */ + model_id: AgentV1UpdateSpeakSpeakOneItemProviderCartesia.ModelId; + voice: AgentV1UpdateSpeakSpeakOneItemProviderCartesia.Voice; + /** Cartesia language code */ + language?: string | undefined; + } + + export namespace AgentV1UpdateSpeakSpeakOneItemProviderCartesia { + /** Cartesia model ID */ + export const ModelId = { + Sonic2: "sonic-2", + SonicMultilingual: "sonic-multilingual", + } as const; + export type ModelId = (typeof ModelId)[keyof typeof ModelId] | string; + + export interface Voice { + /** Cartesia voice mode */ + mode: string; + /** Cartesia voice ID */ + id: string; + } + } + + export interface OpenAi { + type: "open_ai"; + /** The REST API version for the OpenAI text-to-speech API */ + version?: "v1" | undefined; + /** OpenAI TTS model */ + model: AgentV1UpdateSpeakSpeakOneItemProviderOpenAi.Model; + /** OpenAI voice */ + voice: AgentV1UpdateSpeakSpeakOneItemProviderOpenAi.Voice; + } + + export namespace AgentV1UpdateSpeakSpeakOneItemProviderOpenAi { + /** OpenAI TTS model */ + export const Model = { + Tts1: "tts-1", + Tts1Hd: "tts-1-hd", + } as const; + export type Model = (typeof Model)[keyof typeof Model] | string; + /** OpenAI voice */ + export const Voice = { + Alloy: "alloy", + Echo: "echo", + Fable: "fable", + Onyx: "onyx", + Nova: "nova", + Shimmer: "shimmer", + } as const; + export type Voice = (typeof Voice)[keyof typeof Voice] | string; + } + + export interface AwsPolly { + type: "aws_polly"; + /** AWS Polly voice name */ + voice: AgentV1UpdateSpeakSpeakOneItemProviderAwsPolly.Voice; + /** Language code to use, e.g. 'en-US'. Corresponds to the `language_code` parameter in the AWS Polly API */ + language: string; + /** Use the `language` field instead. */ + language_code?: string | undefined; + engine: AgentV1UpdateSpeakSpeakOneItemProviderAwsPolly.Engine; + credentials: AgentV1UpdateSpeakSpeakOneItemProviderAwsPolly.Credentials; + } + + export namespace AgentV1UpdateSpeakSpeakOneItemProviderAwsPolly { + /** AWS Polly voice name */ + export const Voice = { + Matthew: "Matthew", + Joanna: "Joanna", + Amy: "Amy", + Emma: "Emma", + Brian: "Brian", + Arthur: "Arthur", + Aria: "Aria", + Ayanda: "Ayanda", + } as const; + export type Voice = (typeof Voice)[keyof typeof Voice] | string; + export const Engine = { + Generative: "generative", + LongForm: "long-form", + Standard: "standard", + Neural: "neural", + } as const; + export type Engine = (typeof Engine)[keyof typeof Engine] | string; + + export interface Credentials { + type: Credentials.Type; + region: string; + access_key_id: string; + secret_access_key: string; + /** Required for STS only */ + session_token?: string | undefined; + } + + export namespace Credentials { + export const Type = { + Sts: "sts", + Iam: "iam", + } as const; + export type Type = (typeof Type)[keyof typeof Type] | string; + } + } +} diff --git a/src/api/resources/agent/resources/v1/types/AgentV1UpdateThink.ts b/src/api/resources/agent/resources/v1/types/AgentV1UpdateThink.ts deleted file mode 100644 index d1069494..00000000 --- a/src/api/resources/agent/resources/v1/types/AgentV1UpdateThink.ts +++ /dev/null @@ -1,13 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -import type * as Deepgram from "../../../../../index.js"; - -export interface AgentV1UpdateThink { - /** Message type identifier for updating the think model */ - type: "UpdateThink"; - think: AgentV1UpdateThink.Think; -} - -export namespace AgentV1UpdateThink { - export type Think = Deepgram.ThinkSettingsV1 | Deepgram.ThinkSettingsV1[]; -} diff --git a/src/api/resources/agent/resources/v1/types/index.ts b/src/api/resources/agent/resources/v1/types/index.ts index ddbe1a3a..c81c1398 100644 --- a/src/api/resources/agent/resources/v1/types/index.ts +++ b/src/api/resources/agent/resources/v1/types/index.ts @@ -13,12 +13,14 @@ export * from "./AgentV1ReceiveFunctionCallResponse.js"; export * from "./AgentV1SendFunctionCallResponse.js"; export * from "./AgentV1Settings.js"; export * from "./AgentV1SettingsAgentListenProvider.js"; +export * from "./AgentV1SettingsAgentSpeakEndpointProvider.js"; +export * from "./AgentV1SettingsAgentSpeakOneItemProvider.js"; export * from "./AgentV1SettingsApplied.js"; export * from "./AgentV1SpeakUpdated.js"; -export * from "./AgentV1ThinkUpdated.js"; export * from "./AgentV1UpdatePrompt.js"; export * from "./AgentV1UpdateSpeak.js"; -export * from "./AgentV1UpdateThink.js"; +export * from "./AgentV1UpdateSpeakSpeakEndpointProvider.js"; +export * from "./AgentV1UpdateSpeakSpeakOneItemProvider.js"; export * from "./AgentV1UserStartedSpeaking.js"; export * from "./AgentV1Warning.js"; export * from "./AgentV1Welcome.js"; diff --git a/src/api/resources/listen/resources/v2/client/Socket.ts b/src/api/resources/listen/resources/v2/client/Socket.ts index 7eb467dc..0dbeb31d 100644 --- a/src/api/resources/listen/resources/v2/client/Socket.ts +++ b/src/api/resources/listen/resources/v2/client/Socket.ts @@ -12,8 +12,6 @@ export declare namespace V2Socket { export type Response = | Deepgram.listen.ListenV2Connected | Deepgram.listen.ListenV2TurnInfo - | Deepgram.listen.ListenV2ConfigureSuccess - | Deepgram.listen.ListenV2ConfigureFailure | Deepgram.listen.ListenV2FatalError; type EventHandlers = { open?: () => void; @@ -79,11 +77,6 @@ export class V2Socket { this.sendJson(message); } - public sendListenV2Configure(message: Deepgram.listen.ListenV2Configure): void { - this.assertSocketIsOpen(); - this.sendJson(message); - } - /** Connect to the websocket and register event handlers. */ public connect(): V2Socket { this.socket.reconnect(); @@ -142,9 +135,7 @@ export class V2Socket { } /** Send a JSON payload to the websocket. */ - protected sendJson( - payload: string | Deepgram.listen.ListenV2CloseStream | Deepgram.listen.ListenV2Configure, - ): void { + protected sendJson(payload: string | Deepgram.listen.ListenV2CloseStream): void { const jsonPayload = toJson(payload); this.socket.send(jsonPayload); } diff --git a/src/api/resources/listen/resources/v2/types/ListenV2Configure.ts b/src/api/resources/listen/resources/v2/types/ListenV2Configure.ts deleted file mode 100644 index 9761a105..00000000 --- a/src/api/resources/listen/resources/v2/types/ListenV2Configure.ts +++ /dev/null @@ -1,26 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -import type * as Deepgram from "../../../../../index.js"; - -export interface ListenV2Configure { - /** Message type identifier */ - type: "Configure"; - /** - * Updates each parameter, if it is supplied. If a particular threshold parameter - * is not supplied, the configuration continues using the currently configured value. - */ - thresholds?: ListenV2Configure.Thresholds | undefined; - keyterms?: Deepgram.ListenV2Keyterm | undefined; -} - -export namespace ListenV2Configure { - /** - * Updates each parameter, if it is supplied. If a particular threshold parameter - * is not supplied, the configuration continues using the currently configured value. - */ - export interface Thresholds { - eager_eot_threshold?: Deepgram.ListenV2EagerEotThreshold | undefined; - eot_threshold?: Deepgram.ListenV2EotThreshold | undefined; - eot_timeout_ms?: Deepgram.ListenV2EotTimeoutMs | undefined; - } -} diff --git a/src/api/resources/listen/resources/v2/types/ListenV2ConfigureFailure.ts b/src/api/resources/listen/resources/v2/types/ListenV2ConfigureFailure.ts deleted file mode 100644 index 186de83b..00000000 --- a/src/api/resources/listen/resources/v2/types/ListenV2ConfigureFailure.ts +++ /dev/null @@ -1,14 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -export interface ListenV2ConfigureFailure { - /** Message type identifier */ - type: "ConfigureFailure"; - /** The unique identifier of the request */ - request_id: string; - /** - * Starts at `0` and increments for each message the server sends - * to the client. This includes messages of other types, like - * `TurnInfo` messages. - */ - sequence_id: number; -} diff --git a/src/api/resources/listen/resources/v2/types/ListenV2ConfigureSuccess.ts b/src/api/resources/listen/resources/v2/types/ListenV2ConfigureSuccess.ts deleted file mode 100644 index 123dd2be..00000000 --- a/src/api/resources/listen/resources/v2/types/ListenV2ConfigureSuccess.ts +++ /dev/null @@ -1,34 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -import type * as Deepgram from "../../../../../index.js"; - -export interface ListenV2ConfigureSuccess { - /** Message type identifier */ - type: "ConfigureSuccess"; - /** The unique identifier of the request */ - request_id: string; - /** - * Updates each parameter, if it is supplied. If a particular threshold parameter - * is not supplied, the configuration continues using the currently configured value. - */ - thresholds: ListenV2ConfigureSuccess.Thresholds; - keyterms: Deepgram.ListenV2Keyterm; - /** - * Starts at `0` and increments for each message the server sends - * to the client. This includes messages of other types, like - * `TurnInfo` messages. - */ - sequence_id: number; -} - -export namespace ListenV2ConfigureSuccess { - /** - * Updates each parameter, if it is supplied. If a particular threshold parameter - * is not supplied, the configuration continues using the currently configured value. - */ - export interface Thresholds { - eager_eot_threshold?: Deepgram.ListenV2EagerEotThreshold | undefined; - eot_threshold?: Deepgram.ListenV2EotThreshold | undefined; - eot_timeout_ms?: Deepgram.ListenV2EotTimeoutMs | undefined; - } -} diff --git a/src/api/resources/listen/resources/v2/types/index.ts b/src/api/resources/listen/resources/v2/types/index.ts index 7efffe05..c7c89438 100644 --- a/src/api/resources/listen/resources/v2/types/index.ts +++ b/src/api/resources/listen/resources/v2/types/index.ts @@ -1,7 +1,4 @@ export * from "./ListenV2CloseStream.js"; -export * from "./ListenV2Configure.js"; -export * from "./ListenV2ConfigureFailure.js"; -export * from "./ListenV2ConfigureSuccess.js"; export * from "./ListenV2Connected.js"; export * from "./ListenV2FatalError.js"; export * from "./ListenV2TurnInfo.js"; diff --git a/src/api/resources/speak/resources/v1/types/SpeakV1Metadata.ts b/src/api/resources/speak/resources/v1/types/SpeakV1Metadata.ts index a50372fe..20576eab 100644 --- a/src/api/resources/speak/resources/v1/types/SpeakV1Metadata.ts +++ b/src/api/resources/speak/resources/v1/types/SpeakV1Metadata.ts @@ -7,10 +7,8 @@ export interface SpeakV1Metadata { request_id: string; /** Name of the model being used */ model_name: string; - /** Version of the primary model being used */ + /** Version of the model being used */ model_version: string; - /** Unique identifier for the primary model used */ + /** Unique identifier for the model */ model_uuid: string; - /** List of unique identifiers for any additional models used to serve the request */ - additional_model_uuids?: string[] | undefined; } diff --git a/src/api/types/Anthropic.ts b/src/api/types/Anthropic.ts index 1db2df2e..693a1fd0 100644 --- a/src/api/types/Anthropic.ts +++ b/src/api/types/Anthropic.ts @@ -1,20 +1,3 @@ // This file was auto-generated by Fern from our API Definition. -export interface Anthropic { - type: "anthropic"; - /** The REST API version for the Anthropic Messages API */ - version?: "v1" | undefined; - /** Anthropic model to use */ - model: Anthropic.Model; - /** Anthropic temperature (0-1) */ - temperature?: number | undefined; -} - -export namespace Anthropic { - /** Anthropic model to use */ - export const Model = { - Claude35HaikuLatest: "claude-3-5-haiku-latest", - ClaudeSonnet420250514: "claude-sonnet-4-20250514", - } as const; - export type Model = (typeof Model)[keyof typeof Model] | string; -} +export type Anthropic = unknown; diff --git a/src/api/types/AwsBedrockThinkProvider.ts b/src/api/types/AwsBedrockThinkProvider.ts index 5df55751..f7206050 100644 --- a/src/api/types/AwsBedrockThinkProvider.ts +++ b/src/api/types/AwsBedrockThinkProvider.ts @@ -1,45 +1,3 @@ // This file was auto-generated by Fern from our API Definition. -export interface AwsBedrockThinkProvider { - type: "aws_bedrock"; - /** AWS Bedrock model to use */ - model: AwsBedrockThinkProvider.Model; - /** AWS Bedrock temperature (0-2) */ - temperature?: number | undefined; - /** AWS credentials type (STS short-lived or IAM long-lived) */ - credentials?: AwsBedrockThinkProvider.Credentials | undefined; -} - -export namespace AwsBedrockThinkProvider { - /** AWS Bedrock model to use */ - export const Model = { - AnthropicClaude35Sonnet20240620V10: "anthropic/claude-3-5-sonnet-20240620-v1:0", - AnthropicClaude35Haiku20240307V10: "anthropic/claude-3-5-haiku-20240307-v1:0", - } as const; - export type Model = (typeof Model)[keyof typeof Model] | string; - - /** - * AWS credentials type (STS short-lived or IAM long-lived) - */ - export interface Credentials { - /** AWS credentials type (STS short-lived or IAM long-lived) */ - type?: Credentials.Type | undefined; - /** AWS region */ - region?: string | undefined; - /** AWS access key */ - access_key_id?: string | undefined; - /** AWS secret access key */ - secret_access_key?: string | undefined; - /** AWS session token (required for STS only) */ - session_token?: string | undefined; - } - - export namespace Credentials { - /** AWS credentials type (STS short-lived or IAM long-lived) */ - export const Type = { - Sts: "sts", - Iam: "iam", - } as const; - export type Type = (typeof Type)[keyof typeof Type] | string; - } -} +export type AwsBedrockThinkProvider = unknown; diff --git a/src/api/types/AwsPollySpeakProvider.ts b/src/api/types/AwsPollySpeakProvider.ts index ff616e21..f71cf44a 100644 --- a/src/api/types/AwsPollySpeakProvider.ts +++ b/src/api/types/AwsPollySpeakProvider.ts @@ -1,52 +1,3 @@ // This file was auto-generated by Fern from our API Definition. -export interface AwsPollySpeakProvider { - type: "aws_polly"; - /** AWS Polly voice name */ - voice: AwsPollySpeakProvider.Voice; - /** Language code to use, e.g. 'en-US'. Corresponds to the `language_code` parameter in the AWS Polly API */ - language: string; - /** Use the `language` field instead. */ - language_code?: string | undefined; - engine: AwsPollySpeakProvider.Engine; - credentials: AwsPollySpeakProvider.Credentials; -} - -export namespace AwsPollySpeakProvider { - /** AWS Polly voice name */ - export const Voice = { - Matthew: "Matthew", - Joanna: "Joanna", - Amy: "Amy", - Emma: "Emma", - Brian: "Brian", - Arthur: "Arthur", - Aria: "Aria", - Ayanda: "Ayanda", - } as const; - export type Voice = (typeof Voice)[keyof typeof Voice] | string; - export const Engine = { - Generative: "generative", - LongForm: "long-form", - Standard: "standard", - Neural: "neural", - } as const; - export type Engine = (typeof Engine)[keyof typeof Engine] | string; - - export interface Credentials { - type: Credentials.Type; - region: string; - access_key_id: string; - secret_access_key: string; - /** Required for STS only */ - session_token?: string | undefined; - } - - export namespace Credentials { - export const Type = { - Sts: "sts", - Iam: "iam", - } as const; - export type Type = (typeof Type)[keyof typeof Type] | string; - } -} +export type AwsPollySpeakProvider = unknown; diff --git a/src/api/types/Cartesia.ts b/src/api/types/Cartesia.ts index e3de482f..143b2876 100644 --- a/src/api/types/Cartesia.ts +++ b/src/api/types/Cartesia.ts @@ -1,28 +1,3 @@ // This file was auto-generated by Fern from our API Definition. -export interface Cartesia { - type: "cartesia"; - /** The API version header for the Cartesia text-to-speech API */ - version?: "2025-03-17" | undefined; - /** Cartesia model ID */ - model_id: Cartesia.ModelId; - voice: Cartesia.Voice; - /** Cartesia language code */ - language?: string | undefined; -} - -export namespace Cartesia { - /** Cartesia model ID */ - export const ModelId = { - Sonic2: "sonic-2", - SonicMultilingual: "sonic-multilingual", - } as const; - export type ModelId = (typeof ModelId)[keyof typeof ModelId] | string; - - export interface Voice { - /** Cartesia voice mode */ - mode: string; - /** Cartesia voice ID */ - id: string; - } -} +export type Cartesia = unknown; diff --git a/src/api/types/Deepgram.ts b/src/api/types/Deepgram.ts index a161a99a..6e75060c 100644 --- a/src/api/types/Deepgram.ts +++ b/src/api/types/Deepgram.ts @@ -1,79 +1,3 @@ // This file was auto-generated by Fern from our API Definition. -export interface Deepgram { - type: "deepgram"; - /** The REST API version for the Deepgram text-to-speech API */ - version?: "v1" | undefined; - /** Deepgram TTS model */ - model: Deepgram.Model; -} - -export namespace Deepgram { - /** Deepgram TTS model */ - export const Model = { - AuraAsteriaEn: "aura-asteria-en", - AuraLunaEn: "aura-luna-en", - AuraStellaEn: "aura-stella-en", - AuraAthenaEn: "aura-athena-en", - AuraHeraEn: "aura-hera-en", - AuraOrionEn: "aura-orion-en", - AuraArcasEn: "aura-arcas-en", - AuraPerseusEn: "aura-perseus-en", - AuraAngusEn: "aura-angus-en", - AuraOrpheusEn: "aura-orpheus-en", - AuraHeliosEn: "aura-helios-en", - AuraZeusEn: "aura-zeus-en", - Aura2AmaltheaEn: "aura-2-amalthea-en", - Aura2AndromedaEn: "aura-2-andromeda-en", - Aura2ApolloEn: "aura-2-apollo-en", - Aura2ArcasEn: "aura-2-arcas-en", - Aura2AriesEn: "aura-2-aries-en", - Aura2AsteriaEn: "aura-2-asteria-en", - Aura2AthenaEn: "aura-2-athena-en", - Aura2AtlasEn: "aura-2-atlas-en", - Aura2AuroraEn: "aura-2-aurora-en", - Aura2CallistaEn: "aura-2-callista-en", - Aura2CoraEn: "aura-2-cora-en", - Aura2CordeliaEn: "aura-2-cordelia-en", - Aura2DeliaEn: "aura-2-delia-en", - Aura2DracoEn: "aura-2-draco-en", - Aura2ElectraEn: "aura-2-electra-en", - Aura2HarmoniaEn: "aura-2-harmonia-en", - Aura2HelenaEn: "aura-2-helena-en", - Aura2HeraEn: "aura-2-hera-en", - Aura2HermesEn: "aura-2-hermes-en", - Aura2HyperionEn: "aura-2-hyperion-en", - Aura2IrisEn: "aura-2-iris-en", - Aura2JanusEn: "aura-2-janus-en", - Aura2JunoEn: "aura-2-juno-en", - Aura2JupiterEn: "aura-2-jupiter-en", - Aura2LunaEn: "aura-2-luna-en", - Aura2MarsEn: "aura-2-mars-en", - Aura2MinervaEn: "aura-2-minerva-en", - Aura2NeptuneEn: "aura-2-neptune-en", - Aura2OdysseusEn: "aura-2-odysseus-en", - Aura2OpheliaEn: "aura-2-ophelia-en", - Aura2OrionEn: "aura-2-orion-en", - Aura2OrpheusEn: "aura-2-orpheus-en", - Aura2PandoraEn: "aura-2-pandora-en", - Aura2PhoebeEn: "aura-2-phoebe-en", - Aura2PlutoEn: "aura-2-pluto-en", - Aura2SaturnEn: "aura-2-saturn-en", - Aura2SeleneEn: "aura-2-selene-en", - Aura2ThaliaEn: "aura-2-thalia-en", - Aura2TheiaEn: "aura-2-theia-en", - Aura2VestaEn: "aura-2-vesta-en", - Aura2ZeusEn: "aura-2-zeus-en", - Aura2SirioEs: "aura-2-sirio-es", - Aura2NestorEs: "aura-2-nestor-es", - Aura2CarinaEs: "aura-2-carina-es", - Aura2CelesteEs: "aura-2-celeste-es", - Aura2AlvaroEs: "aura-2-alvaro-es", - Aura2DianaEs: "aura-2-diana-es", - Aura2AquilaEs: "aura-2-aquila-es", - Aura2SelenaEs: "aura-2-selena-es", - Aura2EstrellaEs: "aura-2-estrella-es", - Aura2JavierEs: "aura-2-javier-es", - } as const; - export type Model = (typeof Model)[keyof typeof Model] | string; -} +export type Deepgram = unknown; diff --git a/src/api/types/ElevenLabsSpeakProvider.ts b/src/api/types/ElevenLabsSpeakProvider.ts index 5b397f48..f244a3c2 100644 --- a/src/api/types/ElevenLabsSpeakProvider.ts +++ b/src/api/types/ElevenLabsSpeakProvider.ts @@ -1,23 +1,3 @@ // This file was auto-generated by Fern from our API Definition. -export interface ElevenLabsSpeakProvider { - type: "eleven_labs"; - /** The REST API version for the ElevenLabs text-to-speech API */ - version?: "v1" | undefined; - /** Eleven Labs model ID */ - model_id: ElevenLabsSpeakProvider.ModelId; - /** Optional language to use, e.g. 'en-US'. Corresponds to the `language_code` parameter in the ElevenLabs API */ - language?: string | undefined; - /** Use the `language` field instead. */ - language_code?: string | undefined; -} - -export namespace ElevenLabsSpeakProvider { - /** Eleven Labs model ID */ - export const ModelId = { - ElevenTurboV25: "eleven_turbo_v2_5", - ElevenMonolingualV1: "eleven_monolingual_v1", - ElevenMultilingualV2: "eleven_multilingual_v2", - } as const; - export type ModelId = (typeof ModelId)[keyof typeof ModelId] | string; -} +export type ElevenLabsSpeakProvider = unknown; diff --git a/src/api/types/Google.ts b/src/api/types/Google.ts index 67d8a6ec..f6f46645 100644 --- a/src/api/types/Google.ts +++ b/src/api/types/Google.ts @@ -1,21 +1,3 @@ // This file was auto-generated by Fern from our API Definition. -export interface Google { - type: "google"; - /** The REST API version for the Google generative language API */ - version?: "v1beta" | undefined; - /** Google model to use */ - model: Google.Model; - /** Google temperature (0-2) */ - temperature?: number | undefined; -} - -export namespace Google { - /** Google model to use */ - export const Model = { - Gemini20Flash: "gemini-2.0-flash", - Gemini20FlashLite: "gemini-2.0-flash-lite", - Gemini25Flash: "gemini-2.5-flash", - } as const; - export type Model = (typeof Model)[keyof typeof Model] | string; -} +export type Google = unknown; diff --git a/src/api/types/Groq.ts b/src/api/types/Groq.ts index 9d9748f3..8d5d34b3 100644 --- a/src/api/types/Groq.ts +++ b/src/api/types/Groq.ts @@ -1,11 +1,3 @@ // This file was auto-generated by Fern from our API Definition. -export interface Groq { - type: "groq"; - /** The REST API version for the Groq's chat completions API (mostly OpenAI-compatible) */ - version?: "v1" | undefined; - /** Groq model to use */ - model: "openai/gpt-oss-20b"; - /** Groq temperature (0-2) */ - temperature?: number | undefined; -} +export type Groq = unknown; diff --git a/src/api/types/ListenV1Callback.ts b/src/api/types/ListenV1Callback.ts index d9046700..c6dff70d 100644 --- a/src/api/types/ListenV1Callback.ts +++ b/src/api/types/ListenV1Callback.ts @@ -1,3 +1,6 @@ // This file was auto-generated by Fern from our API Definition. +/** + * URL to which we'll make the callback request + */ export type ListenV1Callback = unknown; diff --git a/src/api/types/ListenV1Channels.ts b/src/api/types/ListenV1Channels.ts index 362953e4..354f7af1 100644 --- a/src/api/types/ListenV1Channels.ts +++ b/src/api/types/ListenV1Channels.ts @@ -1,3 +1,6 @@ // This file was auto-generated by Fern from our API Definition. +/** + * The number of channels in the submitted audio + */ export type ListenV1Channels = unknown; diff --git a/src/api/types/ListenV1Endpointing.ts b/src/api/types/ListenV1Endpointing.ts index 2b313a03..cc6a9049 100644 --- a/src/api/types/ListenV1Endpointing.ts +++ b/src/api/types/ListenV1Endpointing.ts @@ -1,3 +1,6 @@ // This file was auto-generated by Fern from our API Definition. +/** + * Indicates how long Deepgram will wait to detect whether a speaker has finished speaking or pauses for a significant period of time. When set to a value, the streaming endpoint immediately finalizes the transcription for the processed time range and returns the transcript with a speech_final parameter set to true. Can also be set to false to disable endpointing + */ export type ListenV1Endpointing = unknown; diff --git a/src/api/types/ListenV1Extra.ts b/src/api/types/ListenV1Extra.ts index 8457e361..c81e1193 100644 --- a/src/api/types/ListenV1Extra.ts +++ b/src/api/types/ListenV1Extra.ts @@ -1,3 +1,6 @@ // This file was auto-generated by Fern from our API Definition. +/** + * Arbitrary key-value pairs that are attached to the API response for usage in downstream processing + */ export type ListenV1Extra = unknown; diff --git a/src/api/types/ListenV1Keyterm.ts b/src/api/types/ListenV1Keyterm.ts index 6446ffc3..0f9911aa 100644 --- a/src/api/types/ListenV1Keyterm.ts +++ b/src/api/types/ListenV1Keyterm.ts @@ -1,3 +1,6 @@ // This file was auto-generated by Fern from our API Definition. +/** + * Key term prompting can boost specialized terminology and brands. Only compatible with Nova-3 + */ export type ListenV1Keyterm = unknown; diff --git a/src/api/types/ListenV1Keywords.ts b/src/api/types/ListenV1Keywords.ts index 0d88bed7..06f90204 100644 --- a/src/api/types/ListenV1Keywords.ts +++ b/src/api/types/ListenV1Keywords.ts @@ -1,3 +1,6 @@ // This file was auto-generated by Fern from our API Definition. +/** + * Keywords can boost or suppress specialized terminology and brands + */ export type ListenV1Keywords = unknown; diff --git a/src/api/types/ListenV1Language.ts b/src/api/types/ListenV1Language.ts index 1f614f5a..a159407e 100644 --- a/src/api/types/ListenV1Language.ts +++ b/src/api/types/ListenV1Language.ts @@ -1,3 +1,6 @@ // This file was auto-generated by Fern from our API Definition. +/** + * The [BCP-47 language tag](https://tools.ietf.org/html/bcp47) that hints at the primary spoken language. Depending on the Model you choose only certain languages are available + */ export type ListenV1Language = unknown; diff --git a/src/api/types/ListenV1MipOptOut.ts b/src/api/types/ListenV1MipOptOut.ts index 8d86f80a..d016e8f6 100644 --- a/src/api/types/ListenV1MipOptOut.ts +++ b/src/api/types/ListenV1MipOptOut.ts @@ -1,3 +1,6 @@ // This file was auto-generated by Fern from our API Definition. +/** + * Opts out requests from the Deepgram Model Improvement Program. Refer to our Docs for pricing impacts before setting this to true. https://dpgr.am/deepgram-mip + */ export type ListenV1MipOptOut = unknown; diff --git a/src/api/types/ListenV1Replace.ts b/src/api/types/ListenV1Replace.ts index 9acccf5b..f12f2109 100644 --- a/src/api/types/ListenV1Replace.ts +++ b/src/api/types/ListenV1Replace.ts @@ -1,3 +1,6 @@ // This file was auto-generated by Fern from our API Definition. +/** + * Search for terms or phrases in submitted audio and replaces them + */ export type ListenV1Replace = unknown; diff --git a/src/api/types/ListenV1SampleRate.ts b/src/api/types/ListenV1SampleRate.ts index d37e86c8..5d704a76 100644 --- a/src/api/types/ListenV1SampleRate.ts +++ b/src/api/types/ListenV1SampleRate.ts @@ -1,3 +1,6 @@ // This file was auto-generated by Fern from our API Definition. +/** + * Sample rate of submitted audio. Required (and only read) when a value is provided for encoding + */ export type ListenV1SampleRate = unknown; diff --git a/src/api/types/ListenV1Search.ts b/src/api/types/ListenV1Search.ts index 3383114d..7953f17a 100644 --- a/src/api/types/ListenV1Search.ts +++ b/src/api/types/ListenV1Search.ts @@ -1,3 +1,6 @@ // This file was auto-generated by Fern from our API Definition. +/** + * Search for terms or phrases in submitted audio + */ export type ListenV1Search = unknown; diff --git a/src/api/types/ListenV1Tag.ts b/src/api/types/ListenV1Tag.ts index b1adf7c5..d434608c 100644 --- a/src/api/types/ListenV1Tag.ts +++ b/src/api/types/ListenV1Tag.ts @@ -1,3 +1,6 @@ // This file was auto-generated by Fern from our API Definition. +/** + * Label your requests for the purpose of identification during usage reporting + */ export type ListenV1Tag = unknown; diff --git a/src/api/types/ListenV1UtteranceEndMs.ts b/src/api/types/ListenV1UtteranceEndMs.ts index 31dcad6f..8fe22a4a 100644 --- a/src/api/types/ListenV1UtteranceEndMs.ts +++ b/src/api/types/ListenV1UtteranceEndMs.ts @@ -1,3 +1,6 @@ // This file was auto-generated by Fern from our API Definition. +/** + * Indicates how long Deepgram will wait to send an UtteranceEnd message after a word has been transcribed. Use with interim_results + */ export type ListenV1UtteranceEndMs = unknown; diff --git a/src/api/types/ListenV1Version.ts b/src/api/types/ListenV1Version.ts index 5a11acdd..cd648458 100644 --- a/src/api/types/ListenV1Version.ts +++ b/src/api/types/ListenV1Version.ts @@ -1,3 +1,6 @@ // This file was auto-generated by Fern from our API Definition. +/** + * Version of an AI model to use + */ export type ListenV1Version = unknown; diff --git a/src/api/types/ListenV2EagerEotThreshold.ts b/src/api/types/ListenV2EagerEotThreshold.ts index ebb8480a..8f28cef2 100644 --- a/src/api/types/ListenV2EagerEotThreshold.ts +++ b/src/api/types/ListenV2EagerEotThreshold.ts @@ -1,3 +1,8 @@ // This file was auto-generated by Fern from our API Definition. +/** + * End-of-turn confidence required to fire an eager end-of-turn event. + * When set, enables `EagerEndOfTurn` and `TurnResumed` events. Valid + * Values 0.3 - 0.9. + */ export type ListenV2EagerEotThreshold = unknown; diff --git a/src/api/types/ListenV2EotThreshold.ts b/src/api/types/ListenV2EotThreshold.ts index 272c229c..79b8eb6f 100644 --- a/src/api/types/ListenV2EotThreshold.ts +++ b/src/api/types/ListenV2EotThreshold.ts @@ -1,3 +1,7 @@ // This file was auto-generated by Fern from our API Definition. +/** + * End-of-turn confidence required to finish a turn. Valid Values 0.5 - + * 0.9. + */ export type ListenV2EotThreshold = unknown; diff --git a/src/api/types/ListenV2EotTimeoutMs.ts b/src/api/types/ListenV2EotTimeoutMs.ts index f61e2e56..ebc50d51 100644 --- a/src/api/types/ListenV2EotTimeoutMs.ts +++ b/src/api/types/ListenV2EotTimeoutMs.ts @@ -1,3 +1,7 @@ // This file was auto-generated by Fern from our API Definition. +/** + * A turn will be finished when this much time has passed after speech, + * regardless of EOT confidence. + */ export type ListenV2EotTimeoutMs = unknown; diff --git a/src/api/types/ListenV2MipOptOut.ts b/src/api/types/ListenV2MipOptOut.ts index 75085a59..fdc17da7 100644 --- a/src/api/types/ListenV2MipOptOut.ts +++ b/src/api/types/ListenV2MipOptOut.ts @@ -1,3 +1,8 @@ // This file was auto-generated by Fern from our API Definition. +/** + * Opts out requests from the Deepgram Model Improvement Program. Refer + * to our Docs for pricing impacts before setting this to true. + * https://dpgr.am/deepgram-mip + */ export type ListenV2MipOptOut = unknown; diff --git a/src/api/types/ListenV2SampleRate.ts b/src/api/types/ListenV2SampleRate.ts index 178ecdf6..47a79c2e 100644 --- a/src/api/types/ListenV2SampleRate.ts +++ b/src/api/types/ListenV2SampleRate.ts @@ -1,3 +1,6 @@ // This file was auto-generated by Fern from our API Definition. +/** + * Sample rate of the audio stream in Hz. Required if sending non-containerized/raw audio. If sending containerized audio, this parameter should be omitted. + */ export type ListenV2SampleRate = unknown; diff --git a/src/api/types/ListenV2Tag.ts b/src/api/types/ListenV2Tag.ts index 18aee426..22ef2d07 100644 --- a/src/api/types/ListenV2Tag.ts +++ b/src/api/types/ListenV2Tag.ts @@ -1,3 +1,7 @@ // This file was auto-generated by Fern from our API Definition. +/** + * Label your requests for the purpose of identification during usage + * reporting + */ export type ListenV2Tag = unknown; diff --git a/src/api/types/OpenAiSpeakProvider.ts b/src/api/types/OpenAiSpeakProvider.ts index 2a5d9c6f..3ec99c45 100644 --- a/src/api/types/OpenAiSpeakProvider.ts +++ b/src/api/types/OpenAiSpeakProvider.ts @@ -1,30 +1,3 @@ // This file was auto-generated by Fern from our API Definition. -export interface OpenAiSpeakProvider { - type: "open_ai"; - /** The REST API version for the OpenAI text-to-speech API */ - version?: "v1" | undefined; - /** OpenAI TTS model */ - model: OpenAiSpeakProvider.Model; - /** OpenAI voice */ - voice: OpenAiSpeakProvider.Voice; -} - -export namespace OpenAiSpeakProvider { - /** OpenAI TTS model */ - export const Model = { - Tts1: "tts-1", - Tts1Hd: "tts-1-hd", - } as const; - export type Model = (typeof Model)[keyof typeof Model] | string; - /** OpenAI voice */ - export const Voice = { - Alloy: "alloy", - Echo: "echo", - Fable: "fable", - Onyx: "onyx", - Nova: "nova", - Shimmer: "shimmer", - } as const; - export type Voice = (typeof Voice)[keyof typeof Voice] | string; -} +export type OpenAiSpeakProvider = unknown; diff --git a/src/api/types/OpenAiThinkProvider.ts b/src/api/types/OpenAiThinkProvider.ts index 63ccd456..8ac0972b 100644 --- a/src/api/types/OpenAiThinkProvider.ts +++ b/src/api/types/OpenAiThinkProvider.ts @@ -1,26 +1,3 @@ // This file was auto-generated by Fern from our API Definition. -export interface OpenAiThinkProvider { - type: "open_ai"; - /** The REST API version for the OpenAI chat completions API */ - version?: "v1" | undefined; - /** OpenAI model to use */ - model: OpenAiThinkProvider.Model; - /** OpenAI temperature (0-2) */ - temperature?: number | undefined; -} - -export namespace OpenAiThinkProvider { - /** OpenAI model to use */ - export const Model = { - Gpt5: "gpt-5", - Gpt5Mini: "gpt-5-mini", - Gpt5Nano: "gpt-5-nano", - Gpt41: "gpt-4.1", - Gpt41Mini: "gpt-4.1-mini", - Gpt41Nano: "gpt-4.1-nano", - Gpt4O: "gpt-4o", - Gpt4OMini: "gpt-4o-mini", - } as const; - export type Model = (typeof Model)[keyof typeof Model] | string; -} +export type OpenAiThinkProvider = unknown; diff --git a/src/api/types/SpeakSettingsV1.ts b/src/api/types/SpeakSettingsV1.ts index ff263718..95dd3069 100644 --- a/src/api/types/SpeakSettingsV1.ts +++ b/src/api/types/SpeakSettingsV1.ts @@ -1,24 +1,3 @@ // This file was auto-generated by Fern from our API Definition. -import type * as Deepgram from "../index.js"; - -export interface SpeakSettingsV1 { - provider: Deepgram.SpeakSettingsV1Provider; - /** - * Optional if provider is Deepgram. Required for non-Deepgram TTS providers. - * When present, must include url field and headers object. Valid schemes are https and wss with wss only supported for Eleven Labs. - */ - endpoint?: SpeakSettingsV1.Endpoint | undefined; -} - -export namespace SpeakSettingsV1 { - /** - * Optional if provider is Deepgram. Required for non-Deepgram TTS providers. - * When present, must include url field and headers object. Valid schemes are https and wss with wss only supported for Eleven Labs. - */ - export interface Endpoint { - /** Custom TTS endpoint URL. Cannot contain `output_format` or `model_id` query parameters when the provider is Eleven Labs. */ - url?: string | undefined; - headers?: Record | undefined; - } -} +export type SpeakSettingsV1 = unknown; diff --git a/src/api/types/SpeakSettingsV1Provider.ts b/src/api/types/SpeakSettingsV1Provider.ts deleted file mode 100644 index 5d933f18..00000000 --- a/src/api/types/SpeakSettingsV1Provider.ts +++ /dev/null @@ -1,32 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -import type * as Deepgram from "../index.js"; - -export type SpeakSettingsV1Provider = - | Deepgram.SpeakSettingsV1Provider.Deepgram - | Deepgram.SpeakSettingsV1Provider.ElevenLabs - | Deepgram.SpeakSettingsV1Provider.Cartesia - | Deepgram.SpeakSettingsV1Provider.OpenAi - | Deepgram.SpeakSettingsV1Provider.AwsPolly; - -export namespace SpeakSettingsV1Provider { - export interface Deepgram extends Deepgram.Deepgram { - type: "deepgram"; - } - - export interface ElevenLabs extends Deepgram.ElevenLabsSpeakProvider { - type: "eleven_labs"; - } - - export interface Cartesia extends Deepgram.Cartesia { - type: "cartesia"; - } - - export interface OpenAi extends Deepgram.OpenAiSpeakProvider { - type: "open_ai"; - } - - export interface AwsPolly extends Deepgram.AwsPollySpeakProvider { - type: "aws_polly"; - } -} diff --git a/src/api/types/SpeakV1MipOptOut.ts b/src/api/types/SpeakV1MipOptOut.ts index 51bda46f..344b1721 100644 --- a/src/api/types/SpeakV1MipOptOut.ts +++ b/src/api/types/SpeakV1MipOptOut.ts @@ -1,3 +1,6 @@ // This file was auto-generated by Fern from our API Definition. +/** + * Opts out requests from the Deepgram Model Improvement Program. Refer to our Docs for pricing impacts before setting this to true. https://dpgr.am/deepgram-mip + */ export type SpeakV1MipOptOut = unknown; diff --git a/src/api/types/ThinkSettingsV1.ts b/src/api/types/ThinkSettingsV1.ts index 37ea1f3b..da4ed980 100644 --- a/src/api/types/ThinkSettingsV1.ts +++ b/src/api/types/ThinkSettingsV1.ts @@ -1,58 +1,5 @@ // This file was auto-generated by Fern from our API Definition. -import type * as Deepgram from "../index.js"; - export interface ThinkSettingsV1 { - provider: Deepgram.ThinkSettingsV1Provider; - /** Optional for non-Deepgram LLM providers. When present, must include url field and headers object */ - endpoint?: ThinkSettingsV1.Endpoint | undefined; - functions?: ThinkSettingsV1.Functions.Item[] | undefined; - prompt?: string | undefined; - /** Specifies the number of characters retained in context between user messages, agent responses, and function calls. This setting is only configurable when a custom think endpoint is used */ - context_length?: ThinkSettingsV1.ContextLength | undefined; -} - -export namespace ThinkSettingsV1 { - /** - * Optional for non-Deepgram LLM providers. When present, must include url field and headers object - */ - export interface Endpoint { - /** Custom LLM endpoint URL */ - url?: string | undefined; - /** Custom headers for the endpoint */ - headers?: Record | undefined; - } - - export type Functions = Functions.Item[]; - - export namespace Functions { - export interface Item { - /** Function name */ - name?: string | undefined; - /** Function description */ - description?: string | undefined; - /** Function parameters */ - parameters?: Record | undefined; - /** The Function endpoint to call. if not passed, function is called client-side */ - endpoint?: Item.Endpoint | undefined; - } - - export namespace Item { - /** - * The Function endpoint to call. if not passed, function is called client-side - */ - export interface Endpoint { - /** Endpoint URL */ - url?: string | undefined; - /** HTTP method */ - method?: string | undefined; - headers?: Record | undefined; - } - } - } - - /** - * Specifies the number of characters retained in context between user messages, agent responses, and function calls. This setting is only configurable when a custom think endpoint is used - */ - export type ContextLength = "max" | number; + context_length?: unknown | undefined; } diff --git a/src/api/types/ThinkSettingsV1Provider.ts b/src/api/types/ThinkSettingsV1Provider.ts deleted file mode 100644 index 81de87ff..00000000 --- a/src/api/types/ThinkSettingsV1Provider.ts +++ /dev/null @@ -1,32 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -import type * as Deepgram from "../index.js"; - -export type ThinkSettingsV1Provider = - | Deepgram.ThinkSettingsV1Provider.OpenAi - | Deepgram.ThinkSettingsV1Provider.AwsBedrock - | Deepgram.ThinkSettingsV1Provider.Anthropic - | Deepgram.ThinkSettingsV1Provider.Google - | Deepgram.ThinkSettingsV1Provider.Groq; - -export namespace ThinkSettingsV1Provider { - export interface OpenAi extends Deepgram.OpenAiThinkProvider { - type: "open_ai"; - } - - export interface AwsBedrock extends Deepgram.AwsBedrockThinkProvider { - type: "aws_bedrock"; - } - - export interface Anthropic extends Deepgram.Anthropic { - type: "anthropic"; - } - - export interface Google extends Deepgram.Google { - type: "google"; - } - - export interface Groq extends Deepgram.Groq { - type: "groq"; - } -} diff --git a/src/api/types/UsageBreakdownV1Response.ts b/src/api/types/UsageBreakdownV1Response.ts index 3e112b72..5c03feab 100644 --- a/src/api/types/UsageBreakdownV1Response.ts +++ b/src/api/types/UsageBreakdownV1Response.ts @@ -50,8 +50,7 @@ export namespace UsageBreakdownV1Response { endpoint?: string | undefined; /** Optional feature set identifier */ feature_set?: string | undefined; - /** Optional models identifier */ - models?: string | undefined; + models?: (string | undefined)[] | undefined; /** Optional method identifier */ method?: string | undefined; /** Optional tags */ diff --git a/src/api/types/index.ts b/src/api/types/index.ts index 6e15f166..8a2d562b 100644 --- a/src/api/types/index.ts +++ b/src/api/types/index.ts @@ -102,14 +102,12 @@ export * from "./SharedIntents.js"; export * from "./SharedSentiments.js"; export * from "./SharedTopics.js"; export * from "./SpeakSettingsV1.js"; -export * from "./SpeakSettingsV1Provider.js"; export * from "./SpeakV1Encoding.js"; export * from "./SpeakV1MipOptOut.js"; export * from "./SpeakV1Model.js"; export * from "./SpeakV1Response.js"; export * from "./SpeakV1SampleRate.js"; export * from "./ThinkSettingsV1.js"; -export * from "./ThinkSettingsV1Provider.js"; export * from "./UpdateProjectMemberScopesV1Response.js"; export * from "./UpdateProjectV1Response.js"; export * from "./UsageBreakdownV1Response.js"; diff --git a/src/version.ts b/src/version.ts index 486d377d..25cf4d29 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const SDK_VERSION = "4.11.4"; +export const SDK_VERSION = "5.0.1"; diff --git a/tests/wire/manage/v1/projects/usage/breakdown.test.ts b/tests/wire/manage/v1/projects/usage/breakdown.test.ts index 40c51fe3..b06b97fd 100644 --- a/tests/wire/manage/v1/projects/usage/breakdown.test.ts +++ b/tests/wire/manage/v1/projects/usage/breakdown.test.ts @@ -32,7 +32,7 @@ describe("BreakdownClient", () => { accessor: "123456789012345678901234", endpoint: "listen", feature_set: "punctuate", - models: "Nova-2", + models: ["Nova-2"], method: "async", tags: "tag1", deployment: "self-hosted", @@ -117,7 +117,7 @@ describe("BreakdownClient", () => { accessor: "123456789012345678901234", endpoint: "listen", feature_set: "punctuate", - models: "Nova-2", + models: ["Nova-2"], method: "async", tags: "tag1", deployment: "self-hosted",