@deepgram/sdk 5.0.0-alpha.2 → 5.0.0-beta.1
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/LICENSE +1 -1
- package/dist/browser/index.global.js +674 -1135
- package/dist/cjs/BaseClient.d.ts +7 -7
- package/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/Client.d.ts +1 -2
- package/dist/cjs/CustomClient.d.ts +9 -1
- package/dist/cjs/CustomClient.js +346 -232
- package/dist/cjs/api/resources/agent/client/Client.d.ts +1 -2
- package/dist/cjs/api/resources/agent/resources/v1/client/Client.d.ts +1 -2
- package/dist/cjs/api/resources/agent/resources/v1/client/Socket.d.ts +8 -8
- package/dist/cjs/api/resources/agent/resources/v1/client/Socket.js +9 -9
- package/dist/cjs/api/resources/agent/resources/v1/resources/settings/client/Client.d.ts +1 -2
- package/dist/cjs/api/resources/agent/resources/v1/resources/settings/resources/think/client/Client.d.ts +1 -2
- package/dist/cjs/api/resources/agent/resources/v1/resources/settings/resources/think/resources/models/client/Client.d.ts +1 -2
- package/dist/cjs/api/resources/agent/resources/v1/types/AgentV1Settings.d.ts +3 -43
- package/dist/cjs/api/resources/agent/resources/v1/types/AgentV1SettingsAgentListenProvider.d.ts +26 -0
- package/dist/cjs/api/resources/agent/resources/v1/types/AgentV1SettingsAgentListenProvider.js +3 -0
- package/dist/cjs/api/resources/agent/resources/v1/types/AgentV1SettingsAgentSpeakEndpointProvider.d.ts +28 -13
- package/dist/cjs/api/resources/agent/resources/v1/types/AgentV1SettingsAgentSpeakEndpointProvider.js +19 -17
- package/dist/cjs/api/resources/agent/resources/v1/types/AgentV1SettingsAgentSpeakOneItemProvider.d.ts +28 -13
- package/dist/cjs/api/resources/agent/resources/v1/types/AgentV1SettingsAgentSpeakOneItemProvider.js +19 -17
- package/dist/cjs/api/resources/agent/resources/v1/types/AgentV1SettingsAgentThinkProvider.d.ts +115 -0
- package/dist/cjs/api/resources/agent/resources/v1/types/AgentV1SettingsAgentThinkProvider.js +57 -0
- package/dist/cjs/api/resources/agent/resources/v1/types/AgentV1UpdateSpeakSpeakProvider.d.ts +18 -3
- package/dist/cjs/api/resources/agent/resources/v1/types/AgentV1UpdateSpeakSpeakProvider.js +2 -0
- package/dist/cjs/api/resources/agent/resources/v1/types/index.d.ts +2 -0
- package/dist/cjs/api/resources/agent/resources/v1/types/index.js +2 -0
- package/dist/cjs/api/resources/auth/client/Client.d.ts +1 -2
- package/dist/cjs/api/resources/auth/resources/v1/client/Client.d.ts +1 -2
- package/dist/cjs/api/resources/auth/resources/v1/resources/tokens/client/Client.d.ts +1 -2
- package/dist/cjs/api/resources/listen/client/Client.d.ts +1 -2
- package/dist/cjs/api/resources/listen/resources/v1/client/Client.d.ts +1 -2
- package/dist/cjs/api/resources/listen/resources/v1/client/Client.js +29 -80
- package/dist/cjs/api/resources/listen/resources/v1/client/Socket.d.ts +4 -4
- package/dist/cjs/api/resources/listen/resources/v1/client/Socket.js +5 -5
- package/dist/cjs/api/resources/listen/resources/v1/resources/media/client/Client.d.ts +1 -2
- package/dist/cjs/api/resources/listen/resources/v1/resources/media/client/Client.js +76 -298
- package/dist/cjs/api/resources/listen/resources/v1/types/ListenV1Results.d.ts +3 -3
- package/dist/cjs/api/resources/listen/resources/v2/client/Client.d.ts +1 -2
- package/dist/cjs/api/resources/listen/resources/v2/client/Client.js +11 -26
- package/dist/cjs/api/resources/listen/resources/v2/client/Socket.d.ts +2 -2
- package/dist/cjs/api/resources/listen/resources/v2/client/Socket.js +3 -3
- package/dist/cjs/api/resources/manage/client/Client.d.ts +1 -2
- package/dist/cjs/api/resources/manage/resources/v1/client/Client.d.ts +1 -2
- package/dist/cjs/api/resources/manage/resources/v1/resources/models/client/Client.d.ts +1 -2
- package/dist/cjs/api/resources/manage/resources/v1/resources/models/client/Client.js +3 -4
- package/dist/cjs/api/resources/manage/resources/v1/resources/projects/client/Client.d.ts +1 -2
- package/dist/cjs/api/resources/manage/resources/v1/resources/projects/client/Client.js +4 -7
- package/dist/cjs/api/resources/manage/resources/v1/resources/projects/resources/billing/client/Client.d.ts +1 -2
- package/dist/cjs/api/resources/manage/resources/v1/resources/projects/resources/billing/resources/balances/client/Client.d.ts +1 -2
- package/dist/cjs/api/resources/manage/resources/v1/resources/projects/resources/billing/resources/breakdown/client/Client.d.ts +1 -2
- package/dist/cjs/api/resources/manage/resources/v1/resources/projects/resources/billing/resources/breakdown/client/Client.js +9 -27
- package/dist/cjs/api/resources/manage/resources/v1/resources/projects/resources/billing/resources/fields/client/Client.d.ts +1 -2
- package/dist/cjs/api/resources/manage/resources/v1/resources/projects/resources/billing/resources/fields/client/Client.js +4 -7
- package/dist/cjs/api/resources/manage/resources/v1/resources/projects/resources/billing/resources/purchases/client/Client.d.ts +1 -2
- package/dist/cjs/api/resources/manage/resources/v1/resources/projects/resources/billing/resources/purchases/client/Client.js +3 -4
- package/dist/cjs/api/resources/manage/resources/v1/resources/projects/resources/keys/client/Client.d.ts +1 -2
- package/dist/cjs/api/resources/manage/resources/v1/resources/projects/resources/keys/client/Client.js +3 -4
- package/dist/cjs/api/resources/manage/resources/v1/resources/projects/resources/members/client/Client.d.ts +1 -2
- package/dist/cjs/api/resources/manage/resources/v1/resources/projects/resources/members/resources/invites/client/Client.d.ts +1 -2
- package/dist/cjs/api/resources/manage/resources/v1/resources/projects/resources/members/resources/scopes/client/Client.d.ts +1 -2
- package/dist/cjs/api/resources/manage/resources/v1/resources/projects/resources/models/client/Client.d.ts +1 -2
- package/dist/cjs/api/resources/manage/resources/v1/resources/projects/resources/models/client/Client.js +3 -4
- package/dist/cjs/api/resources/manage/resources/v1/resources/projects/resources/requests/client/Client.d.ts +1 -2
- package/dist/cjs/api/resources/manage/resources/v1/resources/projects/resources/requests/client/Client.js +12 -31
- package/dist/cjs/api/resources/manage/resources/v1/resources/projects/resources/usage/client/Client.d.ts +1 -2
- package/dist/cjs/api/resources/manage/resources/v1/resources/projects/resources/usage/client/Client.js +46 -133
- package/dist/cjs/api/resources/manage/resources/v1/resources/projects/resources/usage/resources/breakdown/client/Client.d.ts +1 -2
- package/dist/cjs/api/resources/manage/resources/v1/resources/projects/resources/usage/resources/breakdown/client/Client.js +47 -136
- package/dist/cjs/api/resources/manage/resources/v1/resources/projects/resources/usage/resources/fields/client/Client.d.ts +1 -2
- package/dist/cjs/api/resources/manage/resources/v1/resources/projects/resources/usage/resources/fields/client/Client.js +4 -7
- package/dist/cjs/api/resources/read/client/Client.d.ts +1 -2
- package/dist/cjs/api/resources/read/resources/v1/client/Client.d.ts +1 -2
- package/dist/cjs/api/resources/read/resources/v1/resources/text/client/Client.d.ts +1 -2
- package/dist/cjs/api/resources/read/resources/v1/resources/text/client/Client.js +14 -52
- package/dist/cjs/api/resources/selfHosted/client/Client.d.ts +1 -2
- package/dist/cjs/api/resources/selfHosted/resources/v1/client/Client.d.ts +1 -2
- package/dist/cjs/api/resources/selfHosted/resources/v1/resources/distributionCredentials/client/Client.d.ts +1 -2
- package/dist/cjs/api/resources/selfHosted/resources/v1/resources/distributionCredentials/client/Client.js +4 -12
- package/dist/cjs/api/resources/speak/client/Client.d.ts +1 -2
- package/dist/cjs/api/resources/speak/resources/v1/client/Client.d.ts +1 -2
- package/dist/cjs/api/resources/speak/resources/v1/client/Client.js +6 -13
- package/dist/cjs/api/resources/speak/resources/v1/client/Socket.d.ts +4 -4
- package/dist/cjs/api/resources/speak/resources/v1/client/Socket.js +4 -4
- package/dist/cjs/api/resources/speak/resources/v1/resources/audio/client/Client.d.ts +1 -2
- package/dist/cjs/api/resources/speak/resources/v1/resources/audio/client/Client.js +11 -33
- package/dist/cjs/api/types/SpeakV1SampleRate.d.ts +1 -1
- package/dist/cjs/api/types/SpeakV1SampleRate.js +1 -1
- package/dist/cjs/auth/HeaderAuthProvider.d.ts +14 -8
- package/dist/cjs/auth/HeaderAuthProvider.js +19 -9
- package/dist/cjs/core/fetcher/EndpointSupplier.d.ts +2 -2
- package/dist/cjs/core/fetcher/Fetcher.d.ts +1 -2
- package/dist/cjs/core/headers.d.ts +2 -2
- package/dist/cjs/core/websocket/ws.d.ts +1 -1
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.d.mts +7 -7
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/Client.d.mts +1 -2
- package/dist/esm/CustomClient.d.mts +9 -1
- package/dist/esm/CustomClient.mjs +347 -233
- package/dist/esm/api/resources/agent/client/Client.d.mts +1 -2
- package/dist/esm/api/resources/agent/resources/v1/client/Client.d.mts +1 -2
- package/dist/esm/api/resources/agent/resources/v1/client/Socket.d.mts +8 -8
- package/dist/esm/api/resources/agent/resources/v1/client/Socket.mjs +9 -9
- package/dist/esm/api/resources/agent/resources/v1/resources/settings/client/Client.d.mts +1 -2
- package/dist/esm/api/resources/agent/resources/v1/resources/settings/resources/think/client/Client.d.mts +1 -2
- package/dist/esm/api/resources/agent/resources/v1/resources/settings/resources/think/resources/models/client/Client.d.mts +1 -2
- package/dist/esm/api/resources/agent/resources/v1/types/AgentV1Settings.d.mts +3 -43
- package/dist/esm/api/resources/agent/resources/v1/types/AgentV1SettingsAgentListenProvider.d.mts +26 -0
- package/dist/esm/api/resources/agent/resources/v1/types/AgentV1SettingsAgentListenProvider.mjs +2 -0
- package/dist/esm/api/resources/agent/resources/v1/types/AgentV1SettingsAgentSpeakEndpointProvider.d.mts +28 -13
- package/dist/esm/api/resources/agent/resources/v1/types/AgentV1SettingsAgentSpeakEndpointProvider.mjs +19 -17
- package/dist/esm/api/resources/agent/resources/v1/types/AgentV1SettingsAgentSpeakOneItemProvider.d.mts +28 -13
- package/dist/esm/api/resources/agent/resources/v1/types/AgentV1SettingsAgentSpeakOneItemProvider.mjs +19 -17
- package/dist/esm/api/resources/agent/resources/v1/types/AgentV1SettingsAgentThinkProvider.d.mts +115 -0
- package/dist/esm/api/resources/agent/resources/v1/types/AgentV1SettingsAgentThinkProvider.mjs +54 -0
- package/dist/esm/api/resources/agent/resources/v1/types/AgentV1UpdateSpeakSpeakProvider.d.mts +18 -3
- package/dist/esm/api/resources/agent/resources/v1/types/AgentV1UpdateSpeakSpeakProvider.mjs +2 -0
- package/dist/esm/api/resources/agent/resources/v1/types/index.d.mts +2 -0
- package/dist/esm/api/resources/agent/resources/v1/types/index.mjs +2 -0
- package/dist/esm/api/resources/auth/client/Client.d.mts +1 -2
- package/dist/esm/api/resources/auth/resources/v1/client/Client.d.mts +1 -2
- package/dist/esm/api/resources/auth/resources/v1/resources/tokens/client/Client.d.mts +1 -2
- package/dist/esm/api/resources/listen/client/Client.d.mts +1 -2
- package/dist/esm/api/resources/listen/resources/v1/client/Client.d.mts +1 -2
- package/dist/esm/api/resources/listen/resources/v1/client/Client.mjs +29 -80
- package/dist/esm/api/resources/listen/resources/v1/client/Socket.d.mts +4 -4
- package/dist/esm/api/resources/listen/resources/v1/client/Socket.mjs +5 -5
- package/dist/esm/api/resources/listen/resources/v1/resources/media/client/Client.d.mts +1 -2
- package/dist/esm/api/resources/listen/resources/v1/resources/media/client/Client.mjs +76 -298
- package/dist/esm/api/resources/listen/resources/v1/types/ListenV1Results.d.mts +3 -3
- package/dist/esm/api/resources/listen/resources/v2/client/Client.d.mts +1 -2
- package/dist/esm/api/resources/listen/resources/v2/client/Client.mjs +11 -26
- package/dist/esm/api/resources/listen/resources/v2/client/Socket.d.mts +2 -2
- package/dist/esm/api/resources/listen/resources/v2/client/Socket.mjs +3 -3
- package/dist/esm/api/resources/manage/client/Client.d.mts +1 -2
- package/dist/esm/api/resources/manage/resources/v1/client/Client.d.mts +1 -2
- package/dist/esm/api/resources/manage/resources/v1/resources/models/client/Client.d.mts +1 -2
- package/dist/esm/api/resources/manage/resources/v1/resources/models/client/Client.mjs +3 -4
- package/dist/esm/api/resources/manage/resources/v1/resources/projects/client/Client.d.mts +1 -2
- package/dist/esm/api/resources/manage/resources/v1/resources/projects/client/Client.mjs +4 -7
- package/dist/esm/api/resources/manage/resources/v1/resources/projects/resources/billing/client/Client.d.mts +1 -2
- package/dist/esm/api/resources/manage/resources/v1/resources/projects/resources/billing/resources/balances/client/Client.d.mts +1 -2
- package/dist/esm/api/resources/manage/resources/v1/resources/projects/resources/billing/resources/breakdown/client/Client.d.mts +1 -2
- package/dist/esm/api/resources/manage/resources/v1/resources/projects/resources/billing/resources/breakdown/client/Client.mjs +9 -27
- package/dist/esm/api/resources/manage/resources/v1/resources/projects/resources/billing/resources/fields/client/Client.d.mts +1 -2
- package/dist/esm/api/resources/manage/resources/v1/resources/projects/resources/billing/resources/fields/client/Client.mjs +4 -7
- package/dist/esm/api/resources/manage/resources/v1/resources/projects/resources/billing/resources/purchases/client/Client.d.mts +1 -2
- package/dist/esm/api/resources/manage/resources/v1/resources/projects/resources/billing/resources/purchases/client/Client.mjs +3 -4
- package/dist/esm/api/resources/manage/resources/v1/resources/projects/resources/keys/client/Client.d.mts +1 -2
- package/dist/esm/api/resources/manage/resources/v1/resources/projects/resources/keys/client/Client.mjs +3 -4
- package/dist/esm/api/resources/manage/resources/v1/resources/projects/resources/members/client/Client.d.mts +1 -2
- package/dist/esm/api/resources/manage/resources/v1/resources/projects/resources/members/resources/invites/client/Client.d.mts +1 -2
- package/dist/esm/api/resources/manage/resources/v1/resources/projects/resources/members/resources/scopes/client/Client.d.mts +1 -2
- package/dist/esm/api/resources/manage/resources/v1/resources/projects/resources/models/client/Client.d.mts +1 -2
- package/dist/esm/api/resources/manage/resources/v1/resources/projects/resources/models/client/Client.mjs +3 -4
- package/dist/esm/api/resources/manage/resources/v1/resources/projects/resources/requests/client/Client.d.mts +1 -2
- package/dist/esm/api/resources/manage/resources/v1/resources/projects/resources/requests/client/Client.mjs +12 -31
- package/dist/esm/api/resources/manage/resources/v1/resources/projects/resources/usage/client/Client.d.mts +1 -2
- package/dist/esm/api/resources/manage/resources/v1/resources/projects/resources/usage/client/Client.mjs +46 -133
- package/dist/esm/api/resources/manage/resources/v1/resources/projects/resources/usage/resources/breakdown/client/Client.d.mts +1 -2
- package/dist/esm/api/resources/manage/resources/v1/resources/projects/resources/usage/resources/breakdown/client/Client.mjs +47 -136
- package/dist/esm/api/resources/manage/resources/v1/resources/projects/resources/usage/resources/fields/client/Client.d.mts +1 -2
- package/dist/esm/api/resources/manage/resources/v1/resources/projects/resources/usage/resources/fields/client/Client.mjs +4 -7
- package/dist/esm/api/resources/read/client/Client.d.mts +1 -2
- package/dist/esm/api/resources/read/resources/v1/client/Client.d.mts +1 -2
- package/dist/esm/api/resources/read/resources/v1/resources/text/client/Client.d.mts +1 -2
- package/dist/esm/api/resources/read/resources/v1/resources/text/client/Client.mjs +14 -52
- package/dist/esm/api/resources/selfHosted/client/Client.d.mts +1 -2
- package/dist/esm/api/resources/selfHosted/resources/v1/client/Client.d.mts +1 -2
- package/dist/esm/api/resources/selfHosted/resources/v1/resources/distributionCredentials/client/Client.d.mts +1 -2
- package/dist/esm/api/resources/selfHosted/resources/v1/resources/distributionCredentials/client/Client.mjs +4 -12
- package/dist/esm/api/resources/speak/client/Client.d.mts +1 -2
- package/dist/esm/api/resources/speak/resources/v1/client/Client.d.mts +1 -2
- package/dist/esm/api/resources/speak/resources/v1/client/Client.mjs +6 -13
- package/dist/esm/api/resources/speak/resources/v1/client/Socket.d.mts +4 -4
- package/dist/esm/api/resources/speak/resources/v1/client/Socket.mjs +4 -4
- package/dist/esm/api/resources/speak/resources/v1/resources/audio/client/Client.d.mts +1 -2
- package/dist/esm/api/resources/speak/resources/v1/resources/audio/client/Client.mjs +11 -33
- package/dist/esm/api/types/SpeakV1SampleRate.d.mts +1 -1
- package/dist/esm/api/types/SpeakV1SampleRate.mjs +1 -1
- package/dist/esm/auth/HeaderAuthProvider.d.mts +14 -8
- package/dist/esm/auth/HeaderAuthProvider.mjs +19 -9
- package/dist/esm/core/fetcher/EndpointSupplier.d.mts +2 -2
- package/dist/esm/core/fetcher/Fetcher.d.mts +1 -2
- package/dist/esm/core/headers.d.mts +2 -2
- package/dist/esm/core/websocket/ws.d.mts +1 -1
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +11 -10
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { EndpointMetadata } from "./EndpointMetadata.js";
|
|
2
2
|
import type { Supplier } from "./Supplier.js";
|
|
3
3
|
type EndpointSupplierFn<T> = (arg: {
|
|
4
|
-
endpointMetadata
|
|
4
|
+
endpointMetadata?: EndpointMetadata;
|
|
5
5
|
}) => T | Promise<T>;
|
|
6
6
|
export type EndpointSupplier<T> = Supplier<T> | EndpointSupplierFn<T>;
|
|
7
7
|
export declare const EndpointSupplier: {
|
|
8
8
|
get: <T>(supplier: EndpointSupplier<T>, arg: {
|
|
9
|
-
endpointMetadata
|
|
9
|
+
endpointMetadata?: EndpointMetadata;
|
|
10
10
|
}) => Promise<T>;
|
|
11
11
|
};
|
|
12
12
|
export {};
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { type LogConfig, type Logger } from "../logging/logger.js";
|
|
2
2
|
import type { APIResponse } from "./APIResponse.js";
|
|
3
3
|
import type { EndpointMetadata } from "./EndpointMetadata.js";
|
|
4
|
-
import { EndpointSupplier } from "./EndpointSupplier.js";
|
|
5
4
|
export type FetchFunction = <R = unknown>(args: Fetcher.Args) => Promise<APIResponse<R, Fetcher.Error>>;
|
|
6
5
|
export declare namespace Fetcher {
|
|
7
6
|
interface Args {
|
|
8
7
|
url: string;
|
|
9
8
|
method: string;
|
|
10
9
|
contentType?: string;
|
|
11
|
-
headers?: Record<string,
|
|
10
|
+
headers?: Record<string, unknown>;
|
|
12
11
|
queryParameters?: Record<string, unknown>;
|
|
13
12
|
body?: unknown;
|
|
14
13
|
timeoutMs?: number;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare function mergeHeaders
|
|
2
|
-
export declare function mergeOnlyDefinedHeaders
|
|
1
|
+
export declare function mergeHeaders(...headersArray: (Record<string, unknown> | null | undefined)[]): Record<string, unknown>;
|
|
2
|
+
export declare function mergeOnlyDefinedHeaders(...headersArray: (Record<string, unknown> | null | undefined)[]): Record<string, unknown>;
|
|
@@ -8,7 +8,7 @@ export declare namespace ReconnectingWebSocket {
|
|
|
8
8
|
protocols?: string | string[];
|
|
9
9
|
options?: ReconnectingWebSocket.Options;
|
|
10
10
|
headers?: Record<string, unknown>;
|
|
11
|
-
queryParameters?: Record<string,
|
|
11
|
+
queryParameters?: Record<string, unknown>;
|
|
12
12
|
}
|
|
13
13
|
type Options = {
|
|
14
14
|
WebSocket?: any;
|
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.259";
|
package/dist/cjs/version.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import { HeaderAuthProvider } from "./auth/HeaderAuthProvider.mjs";
|
|
1
2
|
import * as core from "./core/index.mjs";
|
|
2
3
|
import type * as environments from "./environments.mjs";
|
|
3
|
-
export
|
|
4
|
+
export type BaseClientOptions = {
|
|
4
5
|
environment?: core.Supplier<environments.DeepgramEnvironment | environments.DeepgramEnvironmentUrls>;
|
|
5
6
|
/** Specify a custom URL to connect the client to. */
|
|
6
7
|
baseUrl?: core.Supplier<string>;
|
|
7
|
-
apiKey?: core.Supplier<string | undefined>;
|
|
8
8
|
/** Additional headers to include in requests. */
|
|
9
9
|
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
10
10
|
/** The default maximum time to wait for a response in seconds. */
|
|
@@ -16,7 +16,7 @@ export interface BaseClientOptions {
|
|
|
16
16
|
fetcher?: core.FetchFunction;
|
|
17
17
|
/** Configure logging for the client. */
|
|
18
18
|
logging?: core.logging.LogConfig | core.logging.Logger;
|
|
19
|
-
}
|
|
19
|
+
} & HeaderAuthProvider.AuthOptions;
|
|
20
20
|
export interface BaseRequestOptions {
|
|
21
21
|
/** The maximum time to wait for a response in seconds. */
|
|
22
22
|
timeoutInSeconds?: number;
|
|
@@ -29,12 +29,12 @@ export interface BaseRequestOptions {
|
|
|
29
29
|
/** Additional headers to include in the request. */
|
|
30
30
|
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
31
31
|
}
|
|
32
|
-
export type NormalizedClientOptions<T extends BaseClientOptions> = T & {
|
|
32
|
+
export type NormalizedClientOptions<T extends BaseClientOptions = BaseClientOptions> = T & {
|
|
33
33
|
logging: core.logging.Logger;
|
|
34
34
|
authProvider?: core.AuthProvider;
|
|
35
35
|
};
|
|
36
|
-
export type NormalizedClientOptionsWithAuth<T extends BaseClientOptions> = NormalizedClientOptions<T> & {
|
|
36
|
+
export type NormalizedClientOptionsWithAuth<T extends BaseClientOptions = BaseClientOptions> = NormalizedClientOptions<T> & {
|
|
37
37
|
authProvider: core.AuthProvider;
|
|
38
38
|
};
|
|
39
|
-
export declare function normalizeClientOptions<T extends BaseClientOptions>(options: T): NormalizedClientOptions<T>;
|
|
40
|
-
export declare function normalizeClientOptionsWithAuth<T extends BaseClientOptions>(options: T): NormalizedClientOptionsWithAuth<T>;
|
|
39
|
+
export declare function normalizeClientOptions<T extends BaseClientOptions = BaseClientOptions>(options: T): NormalizedClientOptions<T>;
|
|
40
|
+
export declare function normalizeClientOptionsWithAuth<T extends BaseClientOptions = BaseClientOptions>(options: T): NormalizedClientOptionsWithAuth<T>;
|
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.259",
|
|
10
|
+
"User-Agent": "/0.0.259",
|
|
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);
|
package/dist/esm/Client.d.mts
CHANGED
|
@@ -8,8 +8,7 @@ import { SpeakClient } from "./api/resources/speak/client/Client.mjs";
|
|
|
8
8
|
import type { BaseClientOptions, BaseRequestOptions } from "./BaseClient.mjs";
|
|
9
9
|
import { type NormalizedClientOptionsWithAuth } from "./BaseClient.mjs";
|
|
10
10
|
export declare namespace DeepgramClient {
|
|
11
|
-
|
|
12
|
-
}
|
|
11
|
+
type Options = BaseClientOptions;
|
|
13
12
|
interface RequestOptions extends BaseRequestOptions {
|
|
14
13
|
}
|
|
15
14
|
}
|
|
@@ -2,6 +2,7 @@ import { DeepgramClient } from "./Client";
|
|
|
2
2
|
import type { AgentClient } from "./api/resources/agent/client/Client.mjs";
|
|
3
3
|
import type { ListenClient } from "./api/resources/listen/client/Client.mjs";
|
|
4
4
|
import type { SpeakClient } from "./api/resources/speak/client/Client.mjs";
|
|
5
|
+
import * as core from "./core/index.mjs";
|
|
5
6
|
/**
|
|
6
7
|
* Custom wrapper around DeepgramClient that ensures the custom websocket implementation
|
|
7
8
|
* from ws.ts is always used, even if the auto-generated code changes.
|
|
@@ -10,7 +11,14 @@ export declare class CustomDeepgramClient extends DeepgramClient {
|
|
|
10
11
|
private _customAgent;
|
|
11
12
|
private _customListen;
|
|
12
13
|
private _customSpeak;
|
|
13
|
-
|
|
14
|
+
private readonly _sessionId;
|
|
15
|
+
constructor(options?: DeepgramClient.Options & {
|
|
16
|
+
accessToken?: core.Supplier<string | undefined>;
|
|
17
|
+
});
|
|
18
|
+
/**
|
|
19
|
+
* Get the session ID that was generated for this client instance.
|
|
20
|
+
*/
|
|
21
|
+
get sessionId(): string;
|
|
14
22
|
/**
|
|
15
23
|
* Override the agent getter to return a wrapped client that ensures
|
|
16
24
|
* the custom websocket implementation is used.
|