@deepgram/sdk 5.0.0-beta.2 → 5.0.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/index.global.js +304 -451
- package/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/CustomClient.js +124 -0
- package/dist/cjs/api/resources/agent/resources/v1/types/AgentV1ConversationText.d.ts +1 -1
- package/dist/cjs/api/resources/agent/resources/v1/types/AgentV1Settings.d.ts +24 -54
- package/dist/cjs/api/resources/agent/resources/v1/types/AgentV1SettingsAgentListenProvider.d.ts +1 -1
- package/dist/cjs/api/resources/agent/resources/v1/types/AgentV1UpdateSpeak.d.ts +2 -18
- package/dist/cjs/api/resources/agent/resources/v1/types/index.d.ts +0 -4
- package/dist/cjs/api/resources/agent/resources/v1/types/index.js +0 -4
- package/dist/cjs/api/resources/listen/resources/v1/client/Client.d.ts +1 -0
- package/dist/cjs/api/resources/listen/resources/v1/client/Client.js +2 -1
- package/dist/cjs/api/resources/listen/resources/v1/resources/media/types/MediaTranscribeRequestCallbackMethod.d.ts +1 -1
- package/dist/cjs/api/resources/listen/resources/v1/resources/media/types/MediaTranscribeRequestCustomIntentMode.d.ts +1 -1
- package/dist/cjs/api/resources/listen/resources/v1/resources/media/types/MediaTranscribeRequestCustomTopicMode.d.ts +1 -1
- package/dist/cjs/api/resources/listen/resources/v1/resources/media/types/MediaTranscribeRequestEncoding.d.ts +1 -1
- package/dist/cjs/api/resources/listen/resources/v1/resources/media/types/MediaTranscribeRequestModel.d.ts +1 -1
- package/dist/cjs/api/resources/listen/resources/v1/resources/media/types/MediaTranscribeRequestSummarize.d.ts +1 -1
- package/dist/cjs/api/resources/listen/resources/v1/resources/media/types/MediaTranscribeRequestVersion.d.ts +1 -1
- package/dist/cjs/api/resources/listen/resources/v1/types/ListenV1CloseStream.d.ts +1 -1
- package/dist/cjs/api/resources/listen/resources/v1/types/ListenV1Finalize.d.ts +1 -1
- package/dist/cjs/api/resources/listen/resources/v1/types/ListenV1KeepAlive.d.ts +1 -1
- package/dist/cjs/api/resources/listen/resources/v1/types/ListenV1Results.d.ts +19 -0
- package/dist/cjs/api/resources/listen/resources/v2/types/ListenV2CloseStream.d.ts +1 -1
- package/dist/cjs/api/resources/listen/resources/v2/types/ListenV2TurnInfo.d.ts +1 -1
- package/dist/cjs/api/resources/manage/resources/v1/resources/projects/resources/billing/resources/breakdown/types/BreakdownListRequestDeployment.d.ts +1 -1
- package/dist/cjs/api/resources/manage/resources/v1/resources/projects/resources/billing/resources/breakdown/types/BreakdownListRequestGroupingItem.d.ts +1 -1
- package/dist/cjs/api/resources/manage/resources/v1/resources/projects/resources/keys/types/KeysListRequestStatus.d.ts +1 -1
- package/dist/cjs/api/resources/manage/resources/v1/resources/projects/resources/requests/client/Client.js +2 -2
- package/dist/cjs/api/resources/manage/resources/v1/resources/projects/resources/requests/types/RequestsListRequestDeployment.d.ts +1 -1
- package/dist/cjs/api/resources/manage/resources/v1/resources/projects/resources/requests/types/RequestsListRequestEndpoint.d.ts +1 -1
- package/dist/cjs/api/resources/manage/resources/v1/resources/projects/resources/requests/types/RequestsListRequestMethod.d.ts +1 -1
- package/dist/cjs/api/resources/manage/resources/v1/resources/projects/resources/requests/types/RequestsListRequestStatus.d.ts +1 -1
- package/dist/cjs/api/resources/manage/resources/v1/resources/projects/resources/usage/resources/breakdown/types/BreakdownGetRequestDeployment.d.ts +1 -1
- package/dist/cjs/api/resources/manage/resources/v1/resources/projects/resources/usage/resources/breakdown/types/BreakdownGetRequestEndpoint.d.ts +1 -1
- package/dist/cjs/api/resources/manage/resources/v1/resources/projects/resources/usage/resources/breakdown/types/BreakdownGetRequestGrouping.d.ts +1 -1
- package/dist/cjs/api/resources/manage/resources/v1/resources/projects/resources/usage/resources/breakdown/types/BreakdownGetRequestMethod.d.ts +1 -1
- package/dist/cjs/api/resources/manage/resources/v1/resources/projects/resources/usage/types/UsageGetRequestDeployment.d.ts +1 -1
- package/dist/cjs/api/resources/manage/resources/v1/resources/projects/resources/usage/types/UsageGetRequestEndpoint.d.ts +1 -1
- package/dist/cjs/api/resources/manage/resources/v1/resources/projects/resources/usage/types/UsageGetRequestMethod.d.ts +1 -1
- package/dist/cjs/api/resources/read/resources/v1/resources/text/types/TextAnalyzeRequestCallbackMethod.d.ts +1 -1
- package/dist/cjs/api/resources/read/resources/v1/resources/text/types/TextAnalyzeRequestCustomIntentMode.d.ts +1 -1
- package/dist/cjs/api/resources/read/resources/v1/resources/text/types/TextAnalyzeRequestCustomTopicMode.d.ts +1 -1
- package/dist/cjs/api/resources/read/resources/v1/resources/text/types/TextAnalyzeRequestSummarize.d.ts +1 -1
- package/dist/cjs/api/resources/selfHosted/resources/v1/resources/distributionCredentials/types/DistributionCredentialsCreateRequestScopesItem.d.ts +1 -1
- package/dist/cjs/api/resources/speak/resources/v1/resources/audio/types/AudioGenerateRequestCallbackMethod.d.ts +1 -1
- package/dist/cjs/api/resources/speak/resources/v1/resources/audio/types/AudioGenerateRequestContainer.d.ts +1 -1
- package/dist/cjs/api/resources/speak/resources/v1/resources/audio/types/AudioGenerateRequestEncoding.d.ts +1 -1
- package/dist/cjs/api/resources/speak/resources/v1/resources/audio/types/AudioGenerateRequestModel.d.ts +1 -1
- package/dist/cjs/api/resources/speak/resources/v1/types/SpeakV1Clear.d.ts +1 -1
- package/dist/cjs/api/resources/speak/resources/v1/types/SpeakV1Cleared.d.ts +1 -1
- package/dist/cjs/api/resources/speak/resources/v1/types/SpeakV1Close.d.ts +1 -1
- package/dist/cjs/api/resources/speak/resources/v1/types/SpeakV1Flush.d.ts +1 -1
- package/dist/cjs/api/resources/speak/resources/v1/types/SpeakV1Flushed.d.ts +1 -1
- package/dist/cjs/api/types/AgentThinkModelsV1Response.d.ts +3 -3
- package/dist/cjs/api/types/Anthropic.d.ts +17 -0
- package/dist/cjs/api/types/Anthropic.js +12 -0
- package/dist/cjs/api/types/AwsBedrockThinkProvider.d.ts +40 -0
- package/dist/cjs/api/types/AwsBedrockThinkProvider.js +20 -0
- package/dist/cjs/api/types/AwsPollySpeakProvider.d.ts +47 -0
- package/dist/cjs/api/types/AwsPollySpeakProvider.js +31 -0
- package/dist/cjs/api/types/Cartesia.d.ts +24 -0
- package/dist/cjs/api/types/Cartesia.js +12 -0
- package/dist/cjs/api/types/Deepgram.d.ts +76 -0
- package/dist/cjs/api/types/Deepgram.js +73 -0
- package/dist/cjs/api/types/ElevenLabsSpeakProvider.d.ts +20 -0
- package/dist/cjs/api/types/ElevenLabsSpeakProvider.js +13 -0
- package/dist/cjs/api/types/Google.d.ts +18 -0
- package/dist/cjs/api/types/Google.js +13 -0
- package/dist/cjs/api/types/Groq.d.ts +9 -0
- package/dist/cjs/api/types/Groq.js +3 -0
- package/dist/cjs/api/types/ListBillingFieldsV1Response.d.ts +1 -1
- package/dist/cjs/api/types/ListenV1CallbackMethod.d.ts +1 -1
- package/dist/cjs/api/types/ListenV1DetectEntities.d.ts +6 -0
- package/dist/cjs/api/types/ListenV1DetectEntities.js +9 -0
- package/dist/cjs/api/types/ListenV1Diarize.d.ts +1 -1
- package/dist/cjs/api/types/ListenV1Dictation.d.ts +1 -1
- package/dist/cjs/api/types/ListenV1Encoding.d.ts +1 -1
- package/dist/cjs/api/types/ListenV1InterimResults.d.ts +1 -1
- package/dist/cjs/api/types/ListenV1Model.d.ts +1 -1
- package/dist/cjs/api/types/ListenV1Multichannel.d.ts +1 -1
- package/dist/cjs/api/types/ListenV1Numerals.d.ts +1 -1
- package/dist/cjs/api/types/ListenV1ProfanityFilter.d.ts +1 -1
- package/dist/cjs/api/types/ListenV1Punctuate.d.ts +1 -1
- package/dist/cjs/api/types/ListenV1Redact.d.ts +1 -1
- package/dist/cjs/api/types/ListenV1ResponseResultsChannelsItem.d.ts +12 -0
- package/dist/cjs/api/types/ListenV1SmartFormat.d.ts +1 -1
- package/dist/cjs/api/types/ListenV1VadEvents.d.ts +1 -1
- package/dist/cjs/api/types/ListenV2Encoding.d.ts +1 -1
- package/dist/cjs/api/types/OpenAi.d.ts +27 -0
- package/dist/cjs/api/types/OpenAi.js +21 -0
- package/dist/cjs/api/types/SpeakSettingsV1.d.ts +20 -0
- package/dist/cjs/api/types/SpeakSettingsV1.js +3 -0
- package/dist/cjs/api/types/SpeakSettingsV1Provider.d.ts +19 -0
- package/dist/cjs/api/types/SpeakSettingsV1Provider.js +3 -0
- package/dist/cjs/api/types/SpeakV1Encoding.d.ts +1 -1
- package/dist/cjs/api/types/SpeakV1Model.d.ts +1 -1
- package/dist/cjs/api/types/SpeakV1SampleRate.d.ts +1 -1
- package/dist/cjs/api/types/ThinkSettingsV1.d.ts +50 -0
- package/dist/cjs/api/types/ThinkSettingsV1.js +3 -0
- package/dist/cjs/api/types/index.d.ts +13 -0
- package/dist/cjs/api/types/index.js +13 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/CustomClient.mjs +124 -0
- package/dist/esm/api/resources/agent/resources/v1/types/AgentV1ConversationText.d.mts +1 -1
- package/dist/esm/api/resources/agent/resources/v1/types/AgentV1Settings.d.mts +24 -54
- package/dist/esm/api/resources/agent/resources/v1/types/AgentV1SettingsAgentListenProvider.d.mts +1 -1
- package/dist/esm/api/resources/agent/resources/v1/types/AgentV1UpdateSpeak.d.mts +2 -18
- package/dist/esm/api/resources/agent/resources/v1/types/index.d.mts +0 -4
- package/dist/esm/api/resources/agent/resources/v1/types/index.mjs +0 -4
- package/dist/esm/api/resources/listen/resources/v1/client/Client.d.mts +1 -0
- package/dist/esm/api/resources/listen/resources/v1/client/Client.mjs +2 -1
- package/dist/esm/api/resources/listen/resources/v1/resources/media/types/MediaTranscribeRequestCallbackMethod.d.mts +1 -1
- package/dist/esm/api/resources/listen/resources/v1/resources/media/types/MediaTranscribeRequestCustomIntentMode.d.mts +1 -1
- package/dist/esm/api/resources/listen/resources/v1/resources/media/types/MediaTranscribeRequestCustomTopicMode.d.mts +1 -1
- package/dist/esm/api/resources/listen/resources/v1/resources/media/types/MediaTranscribeRequestEncoding.d.mts +1 -1
- package/dist/esm/api/resources/listen/resources/v1/resources/media/types/MediaTranscribeRequestModel.d.mts +1 -1
- package/dist/esm/api/resources/listen/resources/v1/resources/media/types/MediaTranscribeRequestSummarize.d.mts +1 -1
- package/dist/esm/api/resources/listen/resources/v1/resources/media/types/MediaTranscribeRequestVersion.d.mts +1 -1
- package/dist/esm/api/resources/listen/resources/v1/types/ListenV1CloseStream.d.mts +1 -1
- package/dist/esm/api/resources/listen/resources/v1/types/ListenV1Finalize.d.mts +1 -1
- package/dist/esm/api/resources/listen/resources/v1/types/ListenV1KeepAlive.d.mts +1 -1
- package/dist/esm/api/resources/listen/resources/v1/types/ListenV1Results.d.mts +19 -0
- package/dist/esm/api/resources/listen/resources/v2/types/ListenV2CloseStream.d.mts +1 -1
- package/dist/esm/api/resources/listen/resources/v2/types/ListenV2TurnInfo.d.mts +1 -1
- package/dist/esm/api/resources/manage/resources/v1/resources/projects/resources/billing/resources/breakdown/types/BreakdownListRequestDeployment.d.mts +1 -1
- package/dist/esm/api/resources/manage/resources/v1/resources/projects/resources/billing/resources/breakdown/types/BreakdownListRequestGroupingItem.d.mts +1 -1
- package/dist/esm/api/resources/manage/resources/v1/resources/projects/resources/keys/types/KeysListRequestStatus.d.mts +1 -1
- package/dist/esm/api/resources/manage/resources/v1/resources/projects/resources/requests/client/Client.mjs +2 -2
- package/dist/esm/api/resources/manage/resources/v1/resources/projects/resources/requests/types/RequestsListRequestDeployment.d.mts +1 -1
- package/dist/esm/api/resources/manage/resources/v1/resources/projects/resources/requests/types/RequestsListRequestEndpoint.d.mts +1 -1
- package/dist/esm/api/resources/manage/resources/v1/resources/projects/resources/requests/types/RequestsListRequestMethod.d.mts +1 -1
- package/dist/esm/api/resources/manage/resources/v1/resources/projects/resources/requests/types/RequestsListRequestStatus.d.mts +1 -1
- package/dist/esm/api/resources/manage/resources/v1/resources/projects/resources/usage/resources/breakdown/types/BreakdownGetRequestDeployment.d.mts +1 -1
- package/dist/esm/api/resources/manage/resources/v1/resources/projects/resources/usage/resources/breakdown/types/BreakdownGetRequestEndpoint.d.mts +1 -1
- package/dist/esm/api/resources/manage/resources/v1/resources/projects/resources/usage/resources/breakdown/types/BreakdownGetRequestGrouping.d.mts +1 -1
- package/dist/esm/api/resources/manage/resources/v1/resources/projects/resources/usage/resources/breakdown/types/BreakdownGetRequestMethod.d.mts +1 -1
- package/dist/esm/api/resources/manage/resources/v1/resources/projects/resources/usage/types/UsageGetRequestDeployment.d.mts +1 -1
- package/dist/esm/api/resources/manage/resources/v1/resources/projects/resources/usage/types/UsageGetRequestEndpoint.d.mts +1 -1
- package/dist/esm/api/resources/manage/resources/v1/resources/projects/resources/usage/types/UsageGetRequestMethod.d.mts +1 -1
- package/dist/esm/api/resources/read/resources/v1/resources/text/types/TextAnalyzeRequestCallbackMethod.d.mts +1 -1
- package/dist/esm/api/resources/read/resources/v1/resources/text/types/TextAnalyzeRequestCustomIntentMode.d.mts +1 -1
- package/dist/esm/api/resources/read/resources/v1/resources/text/types/TextAnalyzeRequestCustomTopicMode.d.mts +1 -1
- package/dist/esm/api/resources/read/resources/v1/resources/text/types/TextAnalyzeRequestSummarize.d.mts +1 -1
- package/dist/esm/api/resources/selfHosted/resources/v1/resources/distributionCredentials/types/DistributionCredentialsCreateRequestScopesItem.d.mts +1 -1
- package/dist/esm/api/resources/speak/resources/v1/resources/audio/types/AudioGenerateRequestCallbackMethod.d.mts +1 -1
- package/dist/esm/api/resources/speak/resources/v1/resources/audio/types/AudioGenerateRequestContainer.d.mts +1 -1
- package/dist/esm/api/resources/speak/resources/v1/resources/audio/types/AudioGenerateRequestEncoding.d.mts +1 -1
- package/dist/esm/api/resources/speak/resources/v1/resources/audio/types/AudioGenerateRequestModel.d.mts +1 -1
- package/dist/esm/api/resources/speak/resources/v1/types/SpeakV1Clear.d.mts +1 -1
- package/dist/esm/api/resources/speak/resources/v1/types/SpeakV1Cleared.d.mts +1 -1
- package/dist/esm/api/resources/speak/resources/v1/types/SpeakV1Close.d.mts +1 -1
- package/dist/esm/api/resources/speak/resources/v1/types/SpeakV1Flush.d.mts +1 -1
- package/dist/esm/api/resources/speak/resources/v1/types/SpeakV1Flushed.d.mts +1 -1
- package/dist/esm/api/types/AgentThinkModelsV1Response.d.mts +3 -3
- package/dist/esm/api/types/Anthropic.d.mts +17 -0
- package/dist/esm/api/types/Anthropic.mjs +9 -0
- package/dist/esm/api/types/AwsBedrockThinkProvider.d.mts +40 -0
- package/dist/esm/api/types/AwsBedrockThinkProvider.mjs +17 -0
- package/dist/esm/api/types/AwsPollySpeakProvider.d.mts +47 -0
- package/dist/esm/api/types/AwsPollySpeakProvider.mjs +28 -0
- package/dist/esm/api/types/Cartesia.d.mts +24 -0
- package/dist/esm/api/types/Cartesia.mjs +9 -0
- package/dist/esm/api/types/Deepgram.d.mts +76 -0
- package/dist/esm/api/types/Deepgram.mjs +70 -0
- package/dist/esm/api/types/ElevenLabsSpeakProvider.d.mts +20 -0
- package/dist/esm/api/types/ElevenLabsSpeakProvider.mjs +10 -0
- package/dist/esm/api/types/Google.d.mts +18 -0
- package/dist/esm/api/types/Google.mjs +10 -0
- package/dist/esm/api/types/Groq.d.mts +9 -0
- package/dist/esm/api/types/Groq.mjs +2 -0
- package/dist/esm/api/types/ListBillingFieldsV1Response.d.mts +1 -1
- package/dist/esm/api/types/ListenV1CallbackMethod.d.mts +1 -1
- package/dist/esm/api/types/ListenV1DetectEntities.d.mts +6 -0
- package/dist/esm/api/types/ListenV1DetectEntities.mjs +6 -0
- package/dist/esm/api/types/ListenV1Diarize.d.mts +1 -1
- package/dist/esm/api/types/ListenV1Dictation.d.mts +1 -1
- package/dist/esm/api/types/ListenV1Encoding.d.mts +1 -1
- package/dist/esm/api/types/ListenV1InterimResults.d.mts +1 -1
- package/dist/esm/api/types/ListenV1Model.d.mts +1 -1
- package/dist/esm/api/types/ListenV1Multichannel.d.mts +1 -1
- package/dist/esm/api/types/ListenV1Numerals.d.mts +1 -1
- package/dist/esm/api/types/ListenV1ProfanityFilter.d.mts +1 -1
- package/dist/esm/api/types/ListenV1Punctuate.d.mts +1 -1
- package/dist/esm/api/types/ListenV1Redact.d.mts +1 -1
- package/dist/esm/api/types/ListenV1ResponseResultsChannelsItem.d.mts +12 -0
- package/dist/esm/api/types/ListenV1SmartFormat.d.mts +1 -1
- package/dist/esm/api/types/ListenV1VadEvents.d.mts +1 -1
- package/dist/esm/api/types/ListenV2Encoding.d.mts +1 -1
- package/dist/esm/api/types/OpenAi.d.mts +27 -0
- package/dist/esm/api/types/OpenAi.mjs +18 -0
- package/dist/esm/api/types/SpeakSettingsV1.d.mts +20 -0
- package/dist/esm/api/types/SpeakSettingsV1.mjs +2 -0
- package/dist/esm/api/types/SpeakSettingsV1Provider.d.mts +19 -0
- package/dist/esm/api/types/SpeakSettingsV1Provider.mjs +2 -0
- package/dist/esm/api/types/SpeakV1Encoding.d.mts +1 -1
- package/dist/esm/api/types/SpeakV1Model.d.mts +1 -1
- package/dist/esm/api/types/SpeakV1SampleRate.d.mts +1 -1
- package/dist/esm/api/types/ThinkSettingsV1.d.mts +50 -0
- package/dist/esm/api/types/ThinkSettingsV1.mjs +2 -0
- package/dist/esm/api/types/index.d.mts +13 -0
- package/dist/esm/api/types/index.mjs +13 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +2 -2
|
@@ -3,4 +3,4 @@ export declare const ListenV1Diarize: {
|
|
|
3
3
|
readonly True: "true";
|
|
4
4
|
readonly False: "false";
|
|
5
5
|
};
|
|
6
|
-
export type ListenV1Diarize = (typeof ListenV1Diarize)[keyof typeof ListenV1Diarize];
|
|
6
|
+
export type ListenV1Diarize = (typeof ListenV1Diarize)[keyof typeof ListenV1Diarize] | string;
|
|
@@ -3,4 +3,4 @@ export declare const ListenV1Dictation: {
|
|
|
3
3
|
readonly True: "true";
|
|
4
4
|
readonly False: "false";
|
|
5
5
|
};
|
|
6
|
-
export type ListenV1Dictation = (typeof ListenV1Dictation)[keyof typeof ListenV1Dictation];
|
|
6
|
+
export type ListenV1Dictation = (typeof ListenV1Dictation)[keyof typeof ListenV1Dictation] | string;
|
|
@@ -12,4 +12,4 @@ export declare const ListenV1Encoding: {
|
|
|
12
12
|
readonly Speex: "speex";
|
|
13
13
|
readonly G729: "g729";
|
|
14
14
|
};
|
|
15
|
-
export type ListenV1Encoding = (typeof ListenV1Encoding)[keyof typeof ListenV1Encoding];
|
|
15
|
+
export type ListenV1Encoding = (typeof ListenV1Encoding)[keyof typeof ListenV1Encoding] | string;
|
|
@@ -3,4 +3,4 @@ export declare const ListenV1InterimResults: {
|
|
|
3
3
|
readonly True: "true";
|
|
4
4
|
readonly False: "false";
|
|
5
5
|
};
|
|
6
|
-
export type ListenV1InterimResults = (typeof ListenV1InterimResults)[keyof typeof ListenV1InterimResults];
|
|
6
|
+
export type ListenV1InterimResults = (typeof ListenV1InterimResults)[keyof typeof ListenV1InterimResults] | string;
|
|
@@ -31,4 +31,4 @@ export declare const ListenV1Model: {
|
|
|
31
31
|
readonly Video: "video";
|
|
32
32
|
readonly Custom: "custom";
|
|
33
33
|
};
|
|
34
|
-
export type ListenV1Model = (typeof ListenV1Model)[keyof typeof ListenV1Model];
|
|
34
|
+
export type ListenV1Model = (typeof ListenV1Model)[keyof typeof ListenV1Model] | string;
|
|
@@ -3,4 +3,4 @@ export declare const ListenV1Multichannel: {
|
|
|
3
3
|
readonly True: "true";
|
|
4
4
|
readonly False: "false";
|
|
5
5
|
};
|
|
6
|
-
export type ListenV1Multichannel = (typeof ListenV1Multichannel)[keyof typeof ListenV1Multichannel];
|
|
6
|
+
export type ListenV1Multichannel = (typeof ListenV1Multichannel)[keyof typeof ListenV1Multichannel] | string;
|
|
@@ -3,4 +3,4 @@ export declare const ListenV1Numerals: {
|
|
|
3
3
|
readonly True: "true";
|
|
4
4
|
readonly False: "false";
|
|
5
5
|
};
|
|
6
|
-
export type ListenV1Numerals = (typeof ListenV1Numerals)[keyof typeof ListenV1Numerals];
|
|
6
|
+
export type ListenV1Numerals = (typeof ListenV1Numerals)[keyof typeof ListenV1Numerals] | string;
|
|
@@ -3,4 +3,4 @@ export declare const ListenV1ProfanityFilter: {
|
|
|
3
3
|
readonly True: "true";
|
|
4
4
|
readonly False: "false";
|
|
5
5
|
};
|
|
6
|
-
export type ListenV1ProfanityFilter = (typeof ListenV1ProfanityFilter)[keyof typeof ListenV1ProfanityFilter];
|
|
6
|
+
export type ListenV1ProfanityFilter = (typeof ListenV1ProfanityFilter)[keyof typeof ListenV1ProfanityFilter] | string;
|
|
@@ -3,4 +3,4 @@ export declare const ListenV1Punctuate: {
|
|
|
3
3
|
readonly True: "true";
|
|
4
4
|
readonly False: "false";
|
|
5
5
|
};
|
|
6
|
-
export type ListenV1Punctuate = (typeof ListenV1Punctuate)[keyof typeof ListenV1Punctuate];
|
|
6
|
+
export type ListenV1Punctuate = (typeof ListenV1Punctuate)[keyof typeof ListenV1Punctuate] | string;
|
|
@@ -7,4 +7,4 @@ export declare const ListenV1Redact: {
|
|
|
7
7
|
readonly AggressiveNumbers: "aggressive_numbers";
|
|
8
8
|
readonly Ssn: "ssn";
|
|
9
9
|
};
|
|
10
|
-
export type ListenV1Redact = (typeof ListenV1Redact)[keyof typeof ListenV1Redact];
|
|
10
|
+
export type ListenV1Redact = (typeof ListenV1Redact)[keyof typeof ListenV1Redact] | string;
|
|
@@ -29,6 +29,7 @@ export declare namespace ListenV1ResponseResultsChannelsItem {
|
|
|
29
29
|
confidence?: number;
|
|
30
30
|
words?: Item.Words.Item[];
|
|
31
31
|
paragraphs?: Item.Paragraphs;
|
|
32
|
+
entities?: Item.Entities.Item[];
|
|
32
33
|
summaries?: Item.Summaries.Item[];
|
|
33
34
|
topics?: Item.Topics.Item[];
|
|
34
35
|
}
|
|
@@ -68,6 +69,17 @@ export declare namespace ListenV1ResponseResultsChannelsItem {
|
|
|
68
69
|
}
|
|
69
70
|
}
|
|
70
71
|
}
|
|
72
|
+
type Entities = Entities.Item[];
|
|
73
|
+
namespace Entities {
|
|
74
|
+
interface Item {
|
|
75
|
+
label?: string;
|
|
76
|
+
value?: string;
|
|
77
|
+
raw_value?: string;
|
|
78
|
+
confidence?: number;
|
|
79
|
+
start_word?: number;
|
|
80
|
+
end_word?: number;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
71
83
|
type Summaries = Summaries.Item[];
|
|
72
84
|
namespace Summaries {
|
|
73
85
|
interface Item {
|
|
@@ -3,4 +3,4 @@ export declare const ListenV1SmartFormat: {
|
|
|
3
3
|
readonly True: "true";
|
|
4
4
|
readonly False: "false";
|
|
5
5
|
};
|
|
6
|
-
export type ListenV1SmartFormat = (typeof ListenV1SmartFormat)[keyof typeof ListenV1SmartFormat];
|
|
6
|
+
export type ListenV1SmartFormat = (typeof ListenV1SmartFormat)[keyof typeof ListenV1SmartFormat] | string;
|
|
@@ -3,4 +3,4 @@ export declare const ListenV1VadEvents: {
|
|
|
3
3
|
readonly True: "true";
|
|
4
4
|
readonly False: "false";
|
|
5
5
|
};
|
|
6
|
-
export type ListenV1VadEvents = (typeof ListenV1VadEvents)[keyof typeof ListenV1VadEvents];
|
|
6
|
+
export type ListenV1VadEvents = (typeof ListenV1VadEvents)[keyof typeof ListenV1VadEvents] | string;
|
|
@@ -7,4 +7,4 @@ export declare const ListenV2Encoding: {
|
|
|
7
7
|
readonly Opus: "opus";
|
|
8
8
|
readonly OggOpus: "ogg-opus";
|
|
9
9
|
};
|
|
10
|
-
export type ListenV2Encoding = (typeof ListenV2Encoding)[keyof typeof ListenV2Encoding];
|
|
10
|
+
export type ListenV2Encoding = (typeof ListenV2Encoding)[keyof typeof ListenV2Encoding] | string;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export interface OpenAi {
|
|
2
|
+
type: "open_ai";
|
|
3
|
+
/** The REST API version for the OpenAI text-to-speech API */
|
|
4
|
+
version?: "v1";
|
|
5
|
+
/** OpenAI TTS model */
|
|
6
|
+
model: OpenAi.Model;
|
|
7
|
+
/** OpenAI voice */
|
|
8
|
+
voice: OpenAi.Voice;
|
|
9
|
+
}
|
|
10
|
+
export declare namespace OpenAi {
|
|
11
|
+
/** OpenAI TTS model */
|
|
12
|
+
const Model: {
|
|
13
|
+
readonly Tts1: "tts-1";
|
|
14
|
+
readonly Tts1Hd: "tts-1-hd";
|
|
15
|
+
};
|
|
16
|
+
type Model = (typeof Model)[keyof typeof Model] | string;
|
|
17
|
+
/** OpenAI voice */
|
|
18
|
+
const Voice: {
|
|
19
|
+
readonly Alloy: "alloy";
|
|
20
|
+
readonly Echo: "echo";
|
|
21
|
+
readonly Fable: "fable";
|
|
22
|
+
readonly Onyx: "onyx";
|
|
23
|
+
readonly Nova: "nova";
|
|
24
|
+
readonly Shimmer: "shimmer";
|
|
25
|
+
};
|
|
26
|
+
type Voice = (typeof Voice)[keyof typeof Voice] | string;
|
|
27
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.OpenAi = void 0;
|
|
5
|
+
var OpenAi;
|
|
6
|
+
(function (OpenAi) {
|
|
7
|
+
/** OpenAI TTS model */
|
|
8
|
+
OpenAi.Model = {
|
|
9
|
+
Tts1: "tts-1",
|
|
10
|
+
Tts1Hd: "tts-1-hd",
|
|
11
|
+
};
|
|
12
|
+
/** OpenAI voice */
|
|
13
|
+
OpenAi.Voice = {
|
|
14
|
+
Alloy: "alloy",
|
|
15
|
+
Echo: "echo",
|
|
16
|
+
Fable: "fable",
|
|
17
|
+
Onyx: "onyx",
|
|
18
|
+
Nova: "nova",
|
|
19
|
+
Shimmer: "shimmer",
|
|
20
|
+
};
|
|
21
|
+
})(OpenAi || (exports.OpenAi = OpenAi = {}));
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type * as Deepgram from "../index.js";
|
|
2
|
+
export interface SpeakSettingsV1 {
|
|
3
|
+
provider: Deepgram.SpeakSettingsV1Provider;
|
|
4
|
+
/**
|
|
5
|
+
* Optional if provider is Deepgram. Required for non-Deepgram TTS providers.
|
|
6
|
+
* When present, must include url field and headers object. Valid schemes are https and wss with wss only supported for Eleven Labs.
|
|
7
|
+
*/
|
|
8
|
+
endpoint?: SpeakSettingsV1.Endpoint;
|
|
9
|
+
}
|
|
10
|
+
export declare namespace SpeakSettingsV1 {
|
|
11
|
+
/**
|
|
12
|
+
* Optional if provider is Deepgram. Required for non-Deepgram TTS providers.
|
|
13
|
+
* When present, must include url field and headers object. Valid schemes are https and wss with wss only supported for Eleven Labs.
|
|
14
|
+
*/
|
|
15
|
+
interface Endpoint {
|
|
16
|
+
/** Custom TTS endpoint URL. Cannot contain `output_format` or `model_id` query parameters when the provider is Eleven Labs. */
|
|
17
|
+
url?: string;
|
|
18
|
+
headers?: Record<string, string>;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type * as Deepgram from "../index.js";
|
|
2
|
+
export type SpeakSettingsV1Provider = Deepgram.SpeakSettingsV1Provider.Deepgram | Deepgram.SpeakSettingsV1Provider.ElevenLabs | Deepgram.SpeakSettingsV1Provider.Cartesia | Deepgram.SpeakSettingsV1Provider.OpenAi | Deepgram.SpeakSettingsV1Provider.AwsPolly;
|
|
3
|
+
export declare namespace SpeakSettingsV1Provider {
|
|
4
|
+
interface Deepgram extends Deepgram.Deepgram {
|
|
5
|
+
type: "deepgram";
|
|
6
|
+
}
|
|
7
|
+
interface ElevenLabs extends Deepgram.ElevenLabsSpeakProvider {
|
|
8
|
+
type: "eleven_labs";
|
|
9
|
+
}
|
|
10
|
+
interface Cartesia extends Deepgram.Cartesia {
|
|
11
|
+
type: "cartesia";
|
|
12
|
+
}
|
|
13
|
+
interface OpenAi extends Deepgram.OpenAi {
|
|
14
|
+
type: "open_ai";
|
|
15
|
+
}
|
|
16
|
+
interface AwsPolly extends Deepgram.AwsPollySpeakProvider {
|
|
17
|
+
type: "aws_polly";
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -4,4 +4,4 @@ export declare const SpeakV1Encoding: {
|
|
|
4
4
|
readonly Mulaw: "mulaw";
|
|
5
5
|
readonly Alaw: "alaw";
|
|
6
6
|
};
|
|
7
|
-
export type SpeakV1Encoding = (typeof SpeakV1Encoding)[keyof typeof SpeakV1Encoding];
|
|
7
|
+
export type SpeakV1Encoding = (typeof SpeakV1Encoding)[keyof typeof SpeakV1Encoding] | string;
|
|
@@ -64,4 +64,4 @@ export declare const SpeakV1Model: {
|
|
|
64
64
|
readonly Aura2EstrellaEs: "aura-2-estrella-es";
|
|
65
65
|
readonly Aura2JavierEs: "aura-2-javier-es";
|
|
66
66
|
};
|
|
67
|
-
export type SpeakV1Model = (typeof SpeakV1Model)[keyof typeof SpeakV1Model];
|
|
67
|
+
export type SpeakV1Model = (typeof SpeakV1Model)[keyof typeof SpeakV1Model] | string;
|
|
@@ -6,4 +6,4 @@ export declare const SpeakV1SampleRate: {
|
|
|
6
6
|
readonly ThirtyTwoThousand: "32000";
|
|
7
7
|
readonly FortyEightThousand: "48000";
|
|
8
8
|
};
|
|
9
|
-
export type SpeakV1SampleRate = (typeof SpeakV1SampleRate)[keyof typeof SpeakV1SampleRate];
|
|
9
|
+
export type SpeakV1SampleRate = (typeof SpeakV1SampleRate)[keyof typeof SpeakV1SampleRate] | string;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
export interface ThinkSettingsV1 {
|
|
2
|
+
/** Think provider configuration (OpenAI, AWS Bedrock, Anthropic, Google, or Groq) */
|
|
3
|
+
provider: Record<string, unknown>;
|
|
4
|
+
/** Optional for non-Deepgram LLM providers. When present, must include url field and headers object */
|
|
5
|
+
endpoint?: ThinkSettingsV1.Endpoint;
|
|
6
|
+
functions?: ThinkSettingsV1.Functions.Item[];
|
|
7
|
+
prompt?: string;
|
|
8
|
+
/** 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 */
|
|
9
|
+
context_length?: ThinkSettingsV1.ContextLength;
|
|
10
|
+
}
|
|
11
|
+
export declare namespace ThinkSettingsV1 {
|
|
12
|
+
/**
|
|
13
|
+
* Optional for non-Deepgram LLM providers. When present, must include url field and headers object
|
|
14
|
+
*/
|
|
15
|
+
interface Endpoint {
|
|
16
|
+
/** Custom LLM endpoint URL */
|
|
17
|
+
url?: string;
|
|
18
|
+
/** Custom headers for the endpoint */
|
|
19
|
+
headers?: Record<string, string>;
|
|
20
|
+
}
|
|
21
|
+
type Functions = Functions.Item[];
|
|
22
|
+
namespace Functions {
|
|
23
|
+
interface Item {
|
|
24
|
+
/** Function name */
|
|
25
|
+
name?: string;
|
|
26
|
+
/** Function description */
|
|
27
|
+
description?: string;
|
|
28
|
+
/** Function parameters */
|
|
29
|
+
parameters?: Record<string, unknown>;
|
|
30
|
+
/** The Function endpoint to call. if not passed, function is called client-side */
|
|
31
|
+
endpoint?: Item.Endpoint;
|
|
32
|
+
}
|
|
33
|
+
namespace Item {
|
|
34
|
+
/**
|
|
35
|
+
* The Function endpoint to call. if not passed, function is called client-side
|
|
36
|
+
*/
|
|
37
|
+
interface Endpoint {
|
|
38
|
+
/** Endpoint URL */
|
|
39
|
+
url?: string;
|
|
40
|
+
/** HTTP method */
|
|
41
|
+
method?: string;
|
|
42
|
+
headers?: Record<string, string>;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* 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
|
|
48
|
+
*/
|
|
49
|
+
type ContextLength = "max" | number;
|
|
50
|
+
}
|
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
export * from "./AgentThinkModelsV1Response.js";
|
|
2
|
+
export * from "./Anthropic.js";
|
|
3
|
+
export * from "./AwsBedrockThinkProvider.js";
|
|
4
|
+
export * from "./AwsPollySpeakProvider.js";
|
|
2
5
|
export * from "./BillingBreakdownV1Response.js";
|
|
6
|
+
export * from "./Cartesia.js";
|
|
3
7
|
export * from "./CreateKeyV1RequestOne.js";
|
|
4
8
|
export * from "./CreateKeyV1Response.js";
|
|
5
9
|
export * from "./CreateProjectDistributionCredentialsV1Response.js";
|
|
6
10
|
export * from "./CreateProjectInviteV1Response.js";
|
|
11
|
+
export * from "./Deepgram.js";
|
|
7
12
|
export * from "./DeleteProjectInviteV1Response.js";
|
|
8
13
|
export * from "./DeleteProjectKeyV1Response.js";
|
|
9
14
|
export * from "./DeleteProjectMemberV1Response.js";
|
|
10
15
|
export * from "./DeleteProjectV1Response.js";
|
|
16
|
+
export * from "./ElevenLabsSpeakProvider.js";
|
|
11
17
|
export * from "./ErrorResponse.js";
|
|
12
18
|
export * from "./ErrorResponseLegacyError.js";
|
|
13
19
|
export * from "./ErrorResponseModernError.js";
|
|
@@ -18,13 +24,16 @@ export * from "./GetProjectDistributionCredentialsV1Response.js";
|
|
|
18
24
|
export * from "./GetProjectKeyV1Response.js";
|
|
19
25
|
export * from "./GetProjectRequestV1Response.js";
|
|
20
26
|
export * from "./GetProjectV1Response.js";
|
|
27
|
+
export * from "./Google.js";
|
|
21
28
|
export * from "./GrantV1Response.js";
|
|
29
|
+
export * from "./Groq.js";
|
|
22
30
|
export * from "./LeaveProjectV1Response.js";
|
|
23
31
|
export * from "./ListBillingFieldsV1Response.js";
|
|
24
32
|
export * from "./ListenV1AcceptedResponse.js";
|
|
25
33
|
export * from "./ListenV1Callback.js";
|
|
26
34
|
export * from "./ListenV1CallbackMethod.js";
|
|
27
35
|
export * from "./ListenV1Channels.js";
|
|
36
|
+
export * from "./ListenV1DetectEntities.js";
|
|
28
37
|
export * from "./ListenV1Diarize.js";
|
|
29
38
|
export * from "./ListenV1Dictation.js";
|
|
30
39
|
export * from "./ListenV1Encoding.js";
|
|
@@ -79,6 +88,7 @@ export * from "./ListProjectMembersV1Response.js";
|
|
|
79
88
|
export * from "./ListProjectPurchasesV1Response.js";
|
|
80
89
|
export * from "./ListProjectRequestsV1Response.js";
|
|
81
90
|
export * from "./ListProjectsV1Response.js";
|
|
91
|
+
export * from "./OpenAi.js";
|
|
82
92
|
export * from "./ProjectRequestResponse.js";
|
|
83
93
|
export * from "./ReadV1Request.js";
|
|
84
94
|
export * from "./ReadV1RequestText.js";
|
|
@@ -90,11 +100,14 @@ export * from "./ReadV1ResponseResultsSummary.js";
|
|
|
90
100
|
export * from "./SharedIntents.js";
|
|
91
101
|
export * from "./SharedSentiments.js";
|
|
92
102
|
export * from "./SharedTopics.js";
|
|
103
|
+
export * from "./SpeakSettingsV1.js";
|
|
104
|
+
export * from "./SpeakSettingsV1Provider.js";
|
|
93
105
|
export * from "./SpeakV1Encoding.js";
|
|
94
106
|
export * from "./SpeakV1MipOptOut.js";
|
|
95
107
|
export * from "./SpeakV1Model.js";
|
|
96
108
|
export * from "./SpeakV1Response.js";
|
|
97
109
|
export * from "./SpeakV1SampleRate.js";
|
|
110
|
+
export * from "./ThinkSettingsV1.js";
|
|
98
111
|
export * from "./UpdateProjectMemberScopesV1Response.js";
|
|
99
112
|
export * from "./UpdateProjectV1Response.js";
|
|
100
113
|
export * from "./UsageBreakdownV1Response.js";
|
|
@@ -15,15 +15,21 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./AgentThinkModelsV1Response.js"), exports);
|
|
18
|
+
__exportStar(require("./Anthropic.js"), exports);
|
|
19
|
+
__exportStar(require("./AwsBedrockThinkProvider.js"), exports);
|
|
20
|
+
__exportStar(require("./AwsPollySpeakProvider.js"), exports);
|
|
18
21
|
__exportStar(require("./BillingBreakdownV1Response.js"), exports);
|
|
22
|
+
__exportStar(require("./Cartesia.js"), exports);
|
|
19
23
|
__exportStar(require("./CreateKeyV1RequestOne.js"), exports);
|
|
20
24
|
__exportStar(require("./CreateKeyV1Response.js"), exports);
|
|
21
25
|
__exportStar(require("./CreateProjectDistributionCredentialsV1Response.js"), exports);
|
|
22
26
|
__exportStar(require("./CreateProjectInviteV1Response.js"), exports);
|
|
27
|
+
__exportStar(require("./Deepgram.js"), exports);
|
|
23
28
|
__exportStar(require("./DeleteProjectInviteV1Response.js"), exports);
|
|
24
29
|
__exportStar(require("./DeleteProjectKeyV1Response.js"), exports);
|
|
25
30
|
__exportStar(require("./DeleteProjectMemberV1Response.js"), exports);
|
|
26
31
|
__exportStar(require("./DeleteProjectV1Response.js"), exports);
|
|
32
|
+
__exportStar(require("./ElevenLabsSpeakProvider.js"), exports);
|
|
27
33
|
__exportStar(require("./ErrorResponse.js"), exports);
|
|
28
34
|
__exportStar(require("./ErrorResponseLegacyError.js"), exports);
|
|
29
35
|
__exportStar(require("./ErrorResponseModernError.js"), exports);
|
|
@@ -34,13 +40,16 @@ __exportStar(require("./GetProjectDistributionCredentialsV1Response.js"), export
|
|
|
34
40
|
__exportStar(require("./GetProjectKeyV1Response.js"), exports);
|
|
35
41
|
__exportStar(require("./GetProjectRequestV1Response.js"), exports);
|
|
36
42
|
__exportStar(require("./GetProjectV1Response.js"), exports);
|
|
43
|
+
__exportStar(require("./Google.js"), exports);
|
|
37
44
|
__exportStar(require("./GrantV1Response.js"), exports);
|
|
45
|
+
__exportStar(require("./Groq.js"), exports);
|
|
38
46
|
__exportStar(require("./LeaveProjectV1Response.js"), exports);
|
|
39
47
|
__exportStar(require("./ListBillingFieldsV1Response.js"), exports);
|
|
40
48
|
__exportStar(require("./ListenV1AcceptedResponse.js"), exports);
|
|
41
49
|
__exportStar(require("./ListenV1Callback.js"), exports);
|
|
42
50
|
__exportStar(require("./ListenV1CallbackMethod.js"), exports);
|
|
43
51
|
__exportStar(require("./ListenV1Channels.js"), exports);
|
|
52
|
+
__exportStar(require("./ListenV1DetectEntities.js"), exports);
|
|
44
53
|
__exportStar(require("./ListenV1Diarize.js"), exports);
|
|
45
54
|
__exportStar(require("./ListenV1Dictation.js"), exports);
|
|
46
55
|
__exportStar(require("./ListenV1Encoding.js"), exports);
|
|
@@ -95,6 +104,7 @@ __exportStar(require("./ListProjectMembersV1Response.js"), exports);
|
|
|
95
104
|
__exportStar(require("./ListProjectPurchasesV1Response.js"), exports);
|
|
96
105
|
__exportStar(require("./ListProjectRequestsV1Response.js"), exports);
|
|
97
106
|
__exportStar(require("./ListProjectsV1Response.js"), exports);
|
|
107
|
+
__exportStar(require("./OpenAi.js"), exports);
|
|
98
108
|
__exportStar(require("./ProjectRequestResponse.js"), exports);
|
|
99
109
|
__exportStar(require("./ReadV1Request.js"), exports);
|
|
100
110
|
__exportStar(require("./ReadV1RequestText.js"), exports);
|
|
@@ -106,11 +116,14 @@ __exportStar(require("./ReadV1ResponseResultsSummary.js"), exports);
|
|
|
106
116
|
__exportStar(require("./SharedIntents.js"), exports);
|
|
107
117
|
__exportStar(require("./SharedSentiments.js"), exports);
|
|
108
118
|
__exportStar(require("./SharedTopics.js"), exports);
|
|
119
|
+
__exportStar(require("./SpeakSettingsV1.js"), exports);
|
|
120
|
+
__exportStar(require("./SpeakSettingsV1Provider.js"), exports);
|
|
109
121
|
__exportStar(require("./SpeakV1Encoding.js"), exports);
|
|
110
122
|
__exportStar(require("./SpeakV1MipOptOut.js"), exports);
|
|
111
123
|
__exportStar(require("./SpeakV1Model.js"), exports);
|
|
112
124
|
__exportStar(require("./SpeakV1Response.js"), exports);
|
|
113
125
|
__exportStar(require("./SpeakV1SampleRate.js"), exports);
|
|
126
|
+
__exportStar(require("./ThinkSettingsV1.js"), exports);
|
|
114
127
|
__exportStar(require("./UpdateProjectMemberScopesV1Response.js"), exports);
|
|
115
128
|
__exportStar(require("./UpdateProjectV1Response.js"), exports);
|
|
116
129
|
__exportStar(require("./UsageBreakdownV1Response.js"), exports);
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.0.
|
|
1
|
+
export declare const SDK_VERSION = "0.0.283";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/BaseClient.mjs
CHANGED
|
@@ -6,8 +6,8 @@ export function normalizeClientOptions(options) {
|
|
|
6
6
|
const headers = mergeHeaders({
|
|
7
7
|
"X-Fern-Language": "JavaScript",
|
|
8
8
|
"X-Fern-SDK-Name": "",
|
|
9
|
-
"X-Fern-SDK-Version": "0.0.
|
|
10
|
-
"User-Agent": "/0.0.
|
|
9
|
+
"X-Fern-SDK-Version": "0.0.283",
|
|
10
|
+
"User-Agent": "/0.0.283",
|
|
11
11
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
12
12
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
13
13
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
|
@@ -337,6 +337,26 @@ function setupBinaryHandling(socket, eventHandlers) {
|
|
|
337
337
|
socket.addEventListener("message", binaryAwareHandler);
|
|
338
338
|
return binaryAwareHandler;
|
|
339
339
|
}
|
|
340
|
+
/**
|
|
341
|
+
* Helper to prevent duplicate event listeners on WebSocket connections.
|
|
342
|
+
* This removes all event listeners that were registered by the auto-generated
|
|
343
|
+
* Socket class constructor, preventing duplicate event firing when connect() is called.
|
|
344
|
+
*/
|
|
345
|
+
function preventDuplicateEventListeners(socket, handlers) {
|
|
346
|
+
// Remove the handlers that were added by the auto-generated constructor
|
|
347
|
+
if (handlers.handleOpen) {
|
|
348
|
+
socket.removeEventListener("open", handlers.handleOpen);
|
|
349
|
+
}
|
|
350
|
+
if (handlers.handleMessage) {
|
|
351
|
+
socket.removeEventListener("message", handlers.handleMessage);
|
|
352
|
+
}
|
|
353
|
+
if (handlers.handleClose) {
|
|
354
|
+
socket.removeEventListener("close", handlers.handleClose);
|
|
355
|
+
}
|
|
356
|
+
if (handlers.handleError) {
|
|
357
|
+
socket.removeEventListener("error", handlers.handleError);
|
|
358
|
+
}
|
|
359
|
+
}
|
|
340
360
|
/**
|
|
341
361
|
* Helper function to reset socket connection state before connecting.
|
|
342
362
|
* Ensures _connectLock is reset if the socket is in CLOSED state.
|
|
@@ -407,6 +427,24 @@ class WrappedAgentV1Client extends AgentV1Client {
|
|
|
407
427
|
return new WrappedAgentV1Socket({ socket });
|
|
408
428
|
});
|
|
409
429
|
}
|
|
430
|
+
/**
|
|
431
|
+
* Creates a WebSocket connection object without actually connecting.
|
|
432
|
+
* This is an alias for connect() with clearer naming - the returned socket
|
|
433
|
+
* is not connected until you call socket.connect().
|
|
434
|
+
*
|
|
435
|
+
* Usage:
|
|
436
|
+
* ```typescript
|
|
437
|
+
* const socket = await client.agent.v1.createConnection();
|
|
438
|
+
* socket.on('open', () => console.log('Connected!'));
|
|
439
|
+
* socket.on('message', (msg) => console.log('Message:', msg));
|
|
440
|
+
* socket.connect(); // Actually initiates the connection
|
|
441
|
+
* ```
|
|
442
|
+
*/
|
|
443
|
+
createConnection() {
|
|
444
|
+
return __awaiter(this, arguments, void 0, function* (args = {}) {
|
|
445
|
+
return this.connect(args);
|
|
446
|
+
});
|
|
447
|
+
}
|
|
410
448
|
}
|
|
411
449
|
/**
|
|
412
450
|
* Wrapper for Agent V1Socket that handles binary messages correctly.
|
|
@@ -425,6 +463,14 @@ class WrappedAgentV1Socket extends AgentV1Socket {
|
|
|
425
463
|
this.binaryAwareHandler = setupBinaryHandling(this.socket, this.eventHandlers);
|
|
426
464
|
}
|
|
427
465
|
connect() {
|
|
466
|
+
// Remove duplicate listeners before calling super.connect()
|
|
467
|
+
const socketAny = this;
|
|
468
|
+
preventDuplicateEventListeners(this.socket, {
|
|
469
|
+
handleOpen: socketAny.handleOpen,
|
|
470
|
+
handleMessage: socketAny.handleMessage,
|
|
471
|
+
handleClose: socketAny.handleClose,
|
|
472
|
+
handleError: socketAny.handleError
|
|
473
|
+
});
|
|
428
474
|
resetSocketConnectionState(this.socket);
|
|
429
475
|
super.connect();
|
|
430
476
|
// Re-setup binary handling in case connect() re-registered handlers
|
|
@@ -513,6 +559,24 @@ class WrappedListenV1Client extends ListenV1Client {
|
|
|
513
559
|
return new WrappedListenV1Socket({ socket });
|
|
514
560
|
});
|
|
515
561
|
}
|
|
562
|
+
/**
|
|
563
|
+
* Creates a WebSocket connection object without actually connecting.
|
|
564
|
+
* This is an alias for connect() with clearer naming - the returned socket
|
|
565
|
+
* is not connected until you call socket.connect().
|
|
566
|
+
*
|
|
567
|
+
* Usage:
|
|
568
|
+
* ```typescript
|
|
569
|
+
* const socket = await client.listen.v1.createConnection({ model: 'nova-3' });
|
|
570
|
+
* socket.on('open', () => console.log('Connected!'));
|
|
571
|
+
* socket.on('message', (msg) => console.log('Transcript:', msg));
|
|
572
|
+
* socket.connect(); // Actually initiates the connection
|
|
573
|
+
* ```
|
|
574
|
+
*/
|
|
575
|
+
createConnection(args) {
|
|
576
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
577
|
+
return this.connect(args);
|
|
578
|
+
});
|
|
579
|
+
}
|
|
516
580
|
}
|
|
517
581
|
/**
|
|
518
582
|
* Wrapper for Listen V1Socket that handles binary messages correctly.
|
|
@@ -531,6 +595,14 @@ class WrappedListenV1Socket extends ListenV1Socket {
|
|
|
531
595
|
this.binaryAwareHandler = setupBinaryHandling(this.socket, this.eventHandlers);
|
|
532
596
|
}
|
|
533
597
|
connect() {
|
|
598
|
+
// Remove duplicate listeners before calling super.connect()
|
|
599
|
+
const socketAny = this;
|
|
600
|
+
preventDuplicateEventListeners(this.socket, {
|
|
601
|
+
handleOpen: socketAny.handleOpen,
|
|
602
|
+
handleMessage: socketAny.handleMessage,
|
|
603
|
+
handleClose: socketAny.handleClose,
|
|
604
|
+
handleError: socketAny.handleError
|
|
605
|
+
});
|
|
534
606
|
resetSocketConnectionState(this.socket);
|
|
535
607
|
super.connect();
|
|
536
608
|
this.setupBinaryHandling();
|
|
@@ -580,6 +652,24 @@ class WrappedListenV2Client extends ListenV2Client {
|
|
|
580
652
|
return new WrappedListenV2Socket({ socket });
|
|
581
653
|
});
|
|
582
654
|
}
|
|
655
|
+
/**
|
|
656
|
+
* Creates a WebSocket connection object without actually connecting.
|
|
657
|
+
* This is an alias for connect() with clearer naming - the returned socket
|
|
658
|
+
* is not connected until you call socket.connect().
|
|
659
|
+
*
|
|
660
|
+
* Usage:
|
|
661
|
+
* ```typescript
|
|
662
|
+
* const socket = await client.listen.v2.createConnection({ model: 'flux-general-en' });
|
|
663
|
+
* socket.on('open', () => console.log('Connected!'));
|
|
664
|
+
* socket.on('message', (msg) => console.log('Transcript:', msg));
|
|
665
|
+
* socket.connect(); // Actually initiates the connection
|
|
666
|
+
* ```
|
|
667
|
+
*/
|
|
668
|
+
createConnection(args) {
|
|
669
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
670
|
+
return this.connect(args);
|
|
671
|
+
});
|
|
672
|
+
}
|
|
583
673
|
}
|
|
584
674
|
/**
|
|
585
675
|
* Wrapper for Listen V2Socket that handles binary messages correctly and adds ping support.
|
|
@@ -599,6 +689,14 @@ class WrappedListenV2Socket extends ListenV2Socket {
|
|
|
599
689
|
this.binaryAwareHandler = setupBinaryHandling(this.socket, this.eventHandlers);
|
|
600
690
|
}
|
|
601
691
|
connect() {
|
|
692
|
+
// Remove duplicate listeners before calling super.connect()
|
|
693
|
+
const socketAny = this;
|
|
694
|
+
preventDuplicateEventListeners(this.socket, {
|
|
695
|
+
handleOpen: socketAny.handleOpen,
|
|
696
|
+
handleMessage: socketAny.handleMessage,
|
|
697
|
+
handleClose: socketAny.handleClose,
|
|
698
|
+
handleError: socketAny.handleError
|
|
699
|
+
});
|
|
602
700
|
resetSocketConnectionState(this.socket);
|
|
603
701
|
super.connect();
|
|
604
702
|
this.setupBinaryHandling();
|
|
@@ -669,6 +767,24 @@ class WrappedSpeakV1Client extends SpeakV1Client {
|
|
|
669
767
|
return new WrappedSpeakV1Socket({ socket });
|
|
670
768
|
});
|
|
671
769
|
}
|
|
770
|
+
/**
|
|
771
|
+
* Creates a WebSocket connection object without actually connecting.
|
|
772
|
+
* This is an alias for connect() with clearer naming - the returned socket
|
|
773
|
+
* is not connected until you call socket.connect().
|
|
774
|
+
*
|
|
775
|
+
* Usage:
|
|
776
|
+
* ```typescript
|
|
777
|
+
* const socket = await client.speak.v1.createConnection({ model: 'aura-asteria-en' });
|
|
778
|
+
* socket.on('open', () => console.log('Connected!'));
|
|
779
|
+
* socket.on('message', (audioData) => console.log('Audio received'));
|
|
780
|
+
* socket.connect(); // Actually initiates the connection
|
|
781
|
+
* ```
|
|
782
|
+
*/
|
|
783
|
+
createConnection(args) {
|
|
784
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
785
|
+
return this.connect(args);
|
|
786
|
+
});
|
|
787
|
+
}
|
|
672
788
|
}
|
|
673
789
|
/**
|
|
674
790
|
* Wrapper for Speak V1Socket that handles binary messages correctly.
|
|
@@ -687,6 +803,14 @@ class WrappedSpeakV1Socket extends SpeakV1Socket {
|
|
|
687
803
|
this.binaryAwareHandler = setupBinaryHandling(this.socket, this.eventHandlers);
|
|
688
804
|
}
|
|
689
805
|
connect() {
|
|
806
|
+
// Remove duplicate listeners before calling super.connect()
|
|
807
|
+
const socketAny = this;
|
|
808
|
+
preventDuplicateEventListeners(this.socket, {
|
|
809
|
+
handleOpen: socketAny.handleOpen,
|
|
810
|
+
handleMessage: socketAny.handleMessage,
|
|
811
|
+
handleClose: socketAny.handleClose,
|
|
812
|
+
handleError: socketAny.handleError
|
|
813
|
+
});
|
|
690
814
|
resetSocketConnectionState(this.socket);
|
|
691
815
|
super.connect();
|
|
692
816
|
this.setupBinaryHandling();
|