@d-id/client-sdk 1.1.15 → 1.1.16-staging.70

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.
@@ -1,4 +1,4 @@
1
- import { c as x, a as N, S as O, C as g, b as U, d as P, e as $, A as T, f as q, T as J } from "./index-DC-HTOF-.js";
1
+ import { c as x, a as N, S as O, C as g, b as U, d as P, e as $, A as T, f as q, T as J } from "./index-BjgMVt64.js";
2
2
  function Q(u, p, h, i) {
3
3
  const w = x(u, `${p}/v2/agents/${h}`, i);
4
4
  return {
@@ -1,7 +1,7 @@
1
1
  import { Agent, AgentPayload, Auth, Chat, ChatPayload, ChatResponse, RatingEntity, RatingPayload, STTTokenResponse } from '../types/index';
2
2
  import { RequestOptions } from './apiClient';
3
3
 
4
- export declare function createAgentsApi(auth: Auth, host?: string, onError?: (error: Error, errorData: object) => void): {
4
+ export declare function createAgentsApi(auth: Auth, host?: string, onError?: (error: Error, errorData: object) => void, externalId?: string): {
5
5
  create(payload: AgentPayload, options?: RequestOptions): Promise<Agent>;
6
6
  getAgents(tag?: string, options?: RequestOptions): Promise<Agent[]>;
7
7
  getById(id: string, options?: RequestOptions): Promise<Agent>;
@@ -3,7 +3,7 @@ import { Auth } from '../types/auth';
3
3
  export type RequestOptions = RequestInit & {
4
4
  skipErrorHandler?: boolean;
5
5
  };
6
- export declare function createClient(auth: Auth, host?: string, onError?: (error: Error, errorData: object) => void): {
6
+ export declare function createClient(auth: Auth, host?: string, onError?: (error: Error, errorData: object) => void, externalId?: string): {
7
7
  get<T = any>(url: string, options?: RequestOptions): Promise<T>;
8
8
  post<T = any>(url: string, body?: any, options?: RequestOptions): Promise<T>;
9
9
  delete<T = any>(url: string, body?: any, options?: RequestOptions): Promise<T>;
@@ -1,4 +1,4 @@
1
1
  import { Auth } from '../types/auth';
2
2
 
3
- export declare function getExternalId(): string;
4
- export declare function getAuthHeader(auth: Auth): string;
3
+ export declare function getExternalId(externalId?: string): string;
4
+ export declare function getAuthHeader(auth: Auth, externalId?: string): string;
@@ -0,0 +1 @@
1
+ export {};
@@ -1,4 +1,4 @@
1
- import { Agent, AgentManager, AgentManagerOptions, Auth, Chat, ChatMode, CreateStreamOptions, Message } from '../../types';
1
+ import { AgentManager, AgentManagerOptions, Chat, ChatMode, CreateStreamOptions, Message } from '../../types';
2
2
  import { SocketManager } from '../socket-manager';
3
3
  import { StreamingManager } from '../streaming-manager';
4
4
 
@@ -22,4 +22,3 @@ export interface AgentManagerItems {
22
22
  * const agentManager = await createAgentManager('id-agent123', { auth: { type: 'key', clientKey: '123', externalId: '123' } });
23
23
  */
24
24
  export declare function createAgentManager(agent: string, options: AgentManagerOptions): Promise<AgentManager>;
25
- export declare function getAgent(agentId: string, auth: Auth, baseURL?: string): Promise<Agent>;
@@ -0,0 +1 @@
1
+ export {};
@@ -2,7 +2,7 @@ export interface AnalyticsOptions {
2
2
  token: string;
3
3
  agentId: string;
4
4
  isEnabled?: boolean;
5
- distinctId?: string;
5
+ externalId?: string;
6
6
  mixpanelAdditionalProperties?: Record<string, any>;
7
7
  }
8
8
  export interface Analytics {
@@ -9,4 +9,4 @@ export interface SocketManager {
9
9
  export declare function createSocketManager(auth: Auth, host: string, callbacks: {
10
10
  onMessage: ChatProgressCallback;
11
11
  onError?: (error: Error) => void;
12
- }): Promise<SocketManager>;
12
+ }, externalId?: string): Promise<SocketManager>;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Advanced functionality tests for streaming manager
3
+ * Tests complex scenarios, edge cases, and advanced features
4
+ */
5
+ export {};
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Business flow tests for streaming manager
3
+ * Tests critical end-to-end workflows and configurations
4
+ */
5
+ export {};
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Disconnect and cleanup tests for streaming manager
3
+ * Tests disconnection workflows, cleanup, and error handling
4
+ */
5
+ export {};
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Edge cases and branch coverage tests for streaming manager
3
+ * Tests detailed edge cases, error conditions, and branch coverage scenarios
4
+ */
5
+ export {};
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Core functionality tests for streaming manager
3
+ * Tests basic streaming manager creation, connection, and operations
4
+ */
5
+ export {};
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Utility function tests for streaming manager
3
+ * Tests helper functions like mapConnectionState and parseDataChannelMessage
4
+ */
5
+ export {};
@@ -134,10 +134,7 @@ export interface AgentManagerOptions {
134
134
  enableAnalitics?: boolean;
135
135
  mixpanelKey?: string;
136
136
  mixpanelAdditionalProperties?: Record<string, any>;
137
- /**
138
- * Unique ID of agent user used in analytics. Pass it to override the default way to get distinctId
139
- */
140
- distinctId?: string;
137
+ externalId?: string;
141
138
  streamOptions?: StreamOptions;
142
139
  initialMessages?: Message[];
143
140
  persistentChat?: boolean;
@@ -62,7 +62,6 @@ export interface ManagerCallbacks {
62
62
  }
63
63
  export type ManagerCallbackKeys = keyof ManagerCallbacks;
64
64
  export interface StreamEndUserData {
65
- distinct_id?: string;
66
65
  plan?: string;
67
66
  }
68
67
  export interface TalkStreamOptions extends CreateTalkStreamRequest {
@@ -1,5 +1,6 @@
1
1
  export declare enum Providers {
2
2
  Amazon = "amazon",
3
+ AzureOpenAi = "azure-openai",
3
4
  Microsoft = "microsoft",
4
5
  Afflorithmics = "afflorithmics",
5
6
  Elevenlabs = "elevenlabs"
@@ -76,6 +77,12 @@ export interface Microsoft_tts_provider {
76
77
  */
77
78
  voice_language?: string;
78
79
  }
80
+ /**
81
+ * AzureOpenAi provider details, contains the provider type and requested voice id and style
82
+ */
83
+ export interface AzureOpenAi_tts_provider extends Omit<Microsoft_tts_provider, 'type'> {
84
+ type: Providers.AzureOpenAi;
85
+ }
79
86
  /**
80
87
  * Amazon provider details, contains the provider type and requested voice id
81
88
  */
@@ -141,6 +148,6 @@ export interface VoiceConfigAfflorithmics {
141
148
  */
142
149
  voiceIntelligence?: boolean;
143
150
  }
144
- export type TextToSpeechProviders = Microsoft_tts_provider | Afflorithmics_tts_provider | Elevenlabs_tts_provider;
151
+ export type TextToSpeechProviders = Microsoft_tts_provider | AzureOpenAi_tts_provider | Afflorithmics_tts_provider | Elevenlabs_tts_provider;
145
152
  export type ExtendedTextToSpeechProviders = TextToSpeechProviders | Amazon_tts_provider;
146
- export type StreamTextToSpeechProviders = Microsoft_tts_provider | Afflorithmics_tts_provider | Elevenlabs_tts_provider | Amazon_tts_provider;
153
+ export type StreamTextToSpeechProviders = Microsoft_tts_provider | AzureOpenAi_tts_provider | Afflorithmics_tts_provider | Elevenlabs_tts_provider | Amazon_tts_provider;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@d-id/client-sdk",
3
3
  "private": false,
4
- "version": "1.1.15",
4
+ "version": "1.1.16-staging.70",
5
5
  "type": "module",
6
6
  "description": "d-id client sdk",
7
7
  "repository": {