@voice-ai-labs/web-sdk 0.2.0 → 0.3.0

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/README.md CHANGED
@@ -1,6 +1,6 @@
1
- # Voice.AI Web SDK
1
+ # Voice.ai Web SDK
2
2
 
3
- The official Voice.AI SDK for JavaScript/TypeScript applications.
3
+ The official Voice.ai SDK for JavaScript/TypeScript applications.
4
4
 
5
5
  ## Installation
6
6
 
@@ -34,6 +34,7 @@ The SDK provides a unified interface for:
34
34
 
35
35
  - **Real-time Voice** - Connect to voice agents with live transcription
36
36
  - **Agent Management** - Create, update, deploy, and manage agents
37
+ - **Webhooks** - Receive real-time notifications for call events
37
38
  - **Analytics** - Access call history and transcripts
38
39
  - **Knowledge Base** - Manage RAG documents for your agents
39
40
  - **Phone Numbers** - Search and manage phone numbers
@@ -197,6 +198,101 @@ const myNumbers = await voiceai.phoneNumbers.list();
197
198
  await voiceai.phoneNumbers.release('+14155551234');
198
199
  ```
199
200
 
201
+ ## Webhooks
202
+
203
+ Configure webhooks to receive real-time notifications when call events occur.
204
+
205
+ ### Configure Webhook Events
206
+
207
+ ```typescript
208
+ // Create agent with webhook events
209
+ const agent = await voiceai.agents.create({
210
+ name: 'Support Agent',
211
+ config: {
212
+ prompt: 'You are a helpful support agent.',
213
+ webhooks: {
214
+ events: {
215
+ url: 'https://your-server.com/webhooks/voice-events',
216
+ secret: 'your-hmac-secret', // Optional: for signature verification
217
+ events: ['call.started', 'call.completed'], // Or omit for all events
218
+ timeout: 5,
219
+ enabled: true
220
+ }
221
+ }
222
+ }
223
+ });
224
+
225
+ // Update webhook config on existing agent
226
+ await voiceai.agents.update(agentId, {
227
+ config: {
228
+ webhooks: {
229
+ events: {
230
+ url: 'https://your-server.com/webhooks',
231
+ events: ['call.completed'], // Only receive call.completed
232
+ enabled: true
233
+ }
234
+ }
235
+ }
236
+ });
237
+ ```
238
+
239
+ ### Event Types
240
+
241
+ | Event | Description |
242
+ |-------|-------------|
243
+ | `call.started` | Call connected, agent ready |
244
+ | `call.completed` | Call ended, includes transcript and usage data |
245
+
246
+ ### Webhook Payload
247
+
248
+ Your server receives POST requests with this structure:
249
+
250
+ ```typescript
251
+ interface WebhookEvent {
252
+ event: 'call.started' | 'call.completed' | 'test';
253
+ timestamp: string; // ISO 8601
254
+ call_id: string;
255
+ agent_id: string;
256
+ data: {
257
+ call_type: 'web' | 'sip_inbound' | 'sip_outbound';
258
+ // call.started: started_at, from_number?, to_number?
259
+ // call.completed: duration_seconds, credits_used, transcript_uri, transcript_summary
260
+ };
261
+ }
262
+ ```
263
+
264
+ ### Signature Verification
265
+
266
+ If you configure a `secret`, verify the HMAC-SHA256 signature:
267
+
268
+ ```typescript
269
+ import crypto from 'crypto';
270
+
271
+ function verifyWebhook(body: string, headers: Headers, secret: string): boolean {
272
+ const signature = headers.get('x-webhook-signature');
273
+ const timestamp = headers.get('x-webhook-timestamp');
274
+
275
+ if (!signature || !timestamp) return false;
276
+
277
+ const message = `${timestamp}.${body}`;
278
+ const expected = crypto.createHmac('sha256', secret).update(message).digest('hex');
279
+
280
+ return crypto.timingSafeEqual(Buffer.from(expected), Buffer.from(signature));
281
+ }
282
+ ```
283
+
284
+ ### Webhook Types
285
+
286
+ ```typescript
287
+ import type {
288
+ WebhookEventsConfig,
289
+ PublicWebhookEventsConfig,
290
+ WebhooksConfig,
291
+ WebhookEvent,
292
+ WebhookTestResponse,
293
+ } from '@voice-ai-labs/web-sdk';
294
+ ```
295
+
200
296
  ## TypeScript
201
297
 
202
298
  Full TypeScript support with exported types:
@@ -207,6 +303,8 @@ import VoiceAI, {
207
303
  type TranscriptionSegment,
208
304
  type ConnectionStatus,
209
305
  type TTSParams,
306
+ type WebhookEventsConfig,
307
+ type WebhookEvent,
210
308
  } from '@voice-ai-labs/web-sdk';
211
309
  ```
212
310
 
@@ -1,12 +1,12 @@
1
1
  /**
2
- * Base HTTP Client for Voice.AI API
2
+ * Base HTTP Client for Voice.ai API
3
3
  *
4
4
  * Provides common functionality for all API clients including:
5
5
  * - Authentication via Bearer token
6
6
  * - Error handling and response parsing
7
7
  * - Common HTTP methods (GET, POST, PUT, PATCH, DELETE)
8
8
  */
9
- /** Error thrown by Voice.AI API client */
9
+ /** Error thrown by Voice.ai API client */
10
10
  export declare class VoiceAIError extends Error {
11
11
  readonly status?: number | undefined;
12
12
  readonly code?: string | undefined;
@@ -1,12 +1,12 @@
1
1
  /**
2
- * Base HTTP Client for Voice.AI API
2
+ * Base HTTP Client for Voice.ai API
3
3
  *
4
4
  * Provides common functionality for all API clients including:
5
5
  * - Authentication via Bearer token
6
6
  * - Error handling and response parsing
7
7
  * - Common HTTP methods (GET, POST, PUT, PATCH, DELETE)
8
8
  */
9
- /** Error thrown by Voice.AI API client */
9
+ /** Error thrown by Voice.ai API client */
10
10
  export class VoiceAIError extends Error {
11
11
  constructor(message, status, code, detail) {
12
12
  super(message);
@@ -1,7 +1,7 @@
1
1
  /**
2
- * VoiceAIClient - Main API Client for Voice.AI Agent API
2
+ * VoiceAIClient - Main API Client for Voice.ai Agent API
3
3
  *
4
- * Provides access to Voice.AI Agent API functionality through sub-clients:
4
+ * Provides access to Voice.ai Agent API functionality through sub-clients:
5
5
  * - agents: Agent management (create, update, deploy, pause, delete)
6
6
  * - analytics: Call history and stats
7
7
  * - knowledgeBase: Knowledge base management for RAG
@@ -29,14 +29,14 @@
29
29
  * const history = await client.analytics.getCallHistory();
30
30
  * ```
31
31
  */
32
- import type { VoiceAIClientConfig } from '../types';
32
+ import type { VoiceAIConfig } from '../types';
33
33
  import { AgentClient } from './agents';
34
34
  import { AnalyticsClient } from './analytics';
35
35
  import { KnowledgeBaseClient } from './knowledge-base';
36
36
  import { PhoneNumberClient } from './phone-numbers';
37
37
  export { VoiceAIError } from './base';
38
38
  /**
39
- * Main API client for Voice.AI Agent API
39
+ * Main API client for Voice.ai Agent API
40
40
  */
41
41
  export declare class VoiceAIClient {
42
42
  /** Agent management client */
@@ -62,7 +62,7 @@ export declare class VoiceAIClient {
62
62
  * });
63
63
  * ```
64
64
  */
65
- constructor(config: VoiceAIClientConfig);
65
+ constructor(config: VoiceAIConfig);
66
66
  }
67
67
  export { AgentClient } from './agents';
68
68
  export { AnalyticsClient } from './analytics';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEpD,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAEtC;;GAEG;AACH,qBAAa,aAAa;IACxB,8BAA8B;IAC9B,SAAgB,MAAM,EAAE,WAAW,CAAC;IAEpC,uBAAuB;IACvB,SAAgB,SAAS,EAAE,eAAe,CAAC;IAE3C,4BAA4B;IAC5B,SAAgB,aAAa,EAAE,mBAAmB,CAAC;IAEnD,qCAAqC;IACrC,SAAgB,YAAY,EAAE,iBAAiB,CAAC;IAEhD,sBAAsB;IACtB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,eAAe,CAAiC;IAExE;;;;;;;;;;;;OAYG;gBACS,MAAM,EAAE,mBAAmB;CAaxC;AAGD,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEpD,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAEtC;;GAEG;AACH,qBAAa,aAAa;IACxB,8BAA8B;IAC9B,SAAgB,MAAM,EAAE,WAAW,CAAC;IAEpC,uBAAuB;IACvB,SAAgB,SAAS,EAAE,eAAe,CAAC;IAE3C,4BAA4B;IAC5B,SAAgB,aAAa,EAAE,mBAAmB,CAAC;IAEnD,qCAAqC;IACrC,SAAgB,YAAY,EAAE,iBAAiB,CAAC;IAEhD,sBAAsB;IACtB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,eAAe,CAAiC;IAExE;;;;;;;;;;;;OAYG;gBACS,MAAM,EAAE,aAAa;CAalC;AAGD,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC"}
@@ -1,7 +1,7 @@
1
1
  /**
2
- * VoiceAIClient - Main API Client for Voice.AI Agent API
2
+ * VoiceAIClient - Main API Client for Voice.ai Agent API
3
3
  *
4
- * Provides access to Voice.AI Agent API functionality through sub-clients:
4
+ * Provides access to Voice.ai Agent API functionality through sub-clients:
5
5
  * - agents: Agent management (create, update, deploy, pause, delete)
6
6
  * - analytics: Call history and stats
7
7
  * - knowledgeBase: Knowledge base management for RAG
@@ -35,7 +35,7 @@ import { KnowledgeBaseClient } from './knowledge-base';
35
35
  import { PhoneNumberClient } from './phone-numbers';
36
36
  export { VoiceAIError } from './base';
37
37
  /**
38
- * Main API client for Voice.AI Agent API
38
+ * Main API client for Voice.ai Agent API
39
39
  */
40
40
  export class VoiceAIClient {
41
41
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAGH,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEpD,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAEtC;;GAEG;AACH,MAAM,OAAO,aAAa;IAgBxB;;;;;;;;;;;;OAYG;IACH,YAAY,MAA2B;QACrC,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;YACnB,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC;QACzC,CAAC;QAED,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,IAAI,aAAa,CAAC,eAAe,CAAC;QAC9D,MAAM,YAAY,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC;QAEvD,IAAI,CAAC,MAAM,GAAG,IAAI,WAAW,CAAC,YAAY,CAAC,CAAC;QAC5C,IAAI,CAAC,SAAS,GAAG,IAAI,eAAe,CAAC,YAAY,CAAC,CAAC;QACnD,IAAI,CAAC,aAAa,GAAG,IAAI,mBAAmB,CAAC,YAAY,CAAC,CAAC;QAC3D,IAAI,CAAC,YAAY,GAAG,IAAI,iBAAiB,CAAC,YAAY,CAAC,CAAC;IAC1D,CAA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,iBAAiB,CAAC,YAAY,CAAC,CAAC;IAC1D,CAAC;;AA5BD,sBAAsB;AACE,6BAAe,GAAG,6BAA6B,CAAC;AA8B1E,mDAAmD;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC"}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * VoiceAgentWidget - UI widget for Voice.AI
2
+ * VoiceAgentWidget - UI widget for Voice.ai
3
3
  *
4
4
  * Features:
5
5
  * - Click to connect/disconnect
@@ -1,5 +1,5 @@
1
1
  /**
2
- * VoiceAgentWidget - UI widget for Voice.AI
2
+ * VoiceAgentWidget - UI widget for Voice.ai
3
3
  *
4
4
  * Features:
5
5
  * - Click to connect/disconnect
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
- * Voice.AI Web SDK
2
+ * Voice.ai Web SDK
3
3
  *
4
- * A single, unified SDK for Voice.AI services.
4
+ * A single, unified SDK for Voice.ai services.
5
5
  *
6
6
  * @example
7
7
  * ```typescript
@@ -26,7 +26,7 @@ import { KnowledgeBaseClient } from './client/knowledge-base';
26
26
  import { PhoneNumberClient } from './client/phone-numbers';
27
27
  import type { ConnectionOptions, ConnectionStatus, TranscriptionHandler, ConnectionStatusHandler, ErrorHandler, AudioCaptureOptions, AgentStateInfo, MicrophoneState, AgentStateHandler, AudioLevelHandler, MicrophoneStateHandler, VoiceAIConfig } from './types';
28
28
  /**
29
- * VoiceAI - The unified Voice.AI SDK
29
+ * VoiceAI - The unified Voice.ai SDK
30
30
  *
31
31
  * Provides both real-time voice agent connections and REST API access
32
32
  * through a single, easy-to-use interface.
@@ -76,7 +76,7 @@ export declare class VoiceAI {
76
76
  * Create a new VoiceAI client
77
77
  *
78
78
  * @param config - Configuration options
79
- * @param config.apiKey - Your Voice.AI API key (required)
79
+ * @param config.apiKey - Your Voice.ai API key (required)
80
80
  * @param config.apiUrl - Custom API URL (optional, defaults to production)
81
81
  */
82
82
  constructor(config: VoiceAIConfig);
@@ -171,7 +171,7 @@ export declare class VoiceAI {
171
171
  export default VoiceAI;
172
172
  /** Error class for API errors */
173
173
  export { VoiceAIError } from './client/base';
174
- export type { VoiceAIConfig, ConnectionOptions, ConnectionDetails, ConnectionStatus, TranscriptionSegment, TranscriptionHandler, ConnectionStatusHandler, ErrorHandler, AgentStateHandler, AudioLevelHandler, MicrophoneStateHandler, AgentState, AgentStateInfo, AudioLevelInfo, MicrophoneState, AudioCaptureOptions, TTSParams, MCPServerConfig, PublicAgentConfig, Agent, CreateAgentRequest, UpdateAgentRequest, AgentDeployResponse, AgentPauseResponse, AgentDeleteResponse, AgentConnectionStatusResponse, InitAgentRequest, InitAgentResponse, PaginatedAgentResponse, ListAgentsOptions, CallHistoryItem, PaginatedCallHistoryResponse, GetCallHistoryOptions, TranscriptResponse, KnowledgeBaseDocument, CreateKnowledgeBaseRequest, UpdateKnowledgeBaseRequest, KnowledgeBaseResponse, KnowledgeBaseWithDocuments, PaginatedKnowledgeBaseResponse, PhoneNumberInfo, AvailablePhoneNumber, SearchPhoneNumbersRequest, SearchPhoneNumbersResponse, PurchasePhoneNumberRequest, PurchasePhoneNumberResponse, AllPhoneNumbersResponse, PaginationMeta, PaginationOptions, ErrorResponse, } from './types';
174
+ export type { VoiceAIConfig, ConnectionOptions, ConnectionDetails, ConnectionStatus, TranscriptionSegment, TranscriptionHandler, ConnectionStatusHandler, ErrorHandler, AgentStateHandler, AudioLevelHandler, MicrophoneStateHandler, AgentState, AgentStateInfo, AudioLevelInfo, MicrophoneState, AudioCaptureOptions, TTSParams, MCPServerConfig, AgentConfig, Agent, CreateAgentRequest, UpdateAgentRequest, AgentDeployResponse, AgentPauseResponse, AgentDeleteResponse, AgentConnectionStatusResponse, InitAgentRequest, InitAgentResponse, PaginatedAgentResponse, ListAgentsOptions, WebhookEventType, WebhookEventsConfig, WebhooksConfig, WebhookEvent, WebhookTestResponse, CallHistoryItem, PaginatedCallHistoryResponse, GetCallHistoryOptions, TranscriptResponse, KnowledgeBaseDocument, CreateKnowledgeBaseRequest, UpdateKnowledgeBaseRequest, KnowledgeBaseResponse, KnowledgeBaseWithDocuments, PaginatedKnowledgeBaseResponse, PhoneNumberInfo, AvailablePhoneNumber, SearchPhoneNumbersRequest, SearchPhoneNumbersResponse, PurchasePhoneNumberRequest, PurchasePhoneNumberResponse, AllPhoneNumbersResponse, PaginationMeta, PaginationOptions, ErrorResponse, } from './types';
175
175
  /**
176
176
  * Generate optimized audio capture options for voice agents
177
177
  *
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAGH,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,KAAK,EACV,iBAAiB,EAGjB,gBAAgB,EAChB,oBAAoB,EACpB,uBAAuB,EACvB,YAAY,EACZ,mBAAmB,EAEnB,cAAc,EAEd,eAAe,EACf,iBAAiB,EACjB,iBAAiB,EACjB,sBAAsB,EACtB,aAAa,EACd,MAAM,SAAS,CAAC;AAKjB;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,qBAAa,OAAO;IAKlB,sEAAsE;IACtE,SAAgB,MAAM,EAAE,WAAW,CAAC;IAEpC,mDAAmD;IACnD,SAAgB,SAAS,EAAE,eAAe,CAAC;IAE3C,4CAA4C;IAC5C,SAAgB,aAAa,EAAE,mBAAmB,CAAC;IAEnD,4DAA4D;IAC5D,SAAgB,YA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0B,EAC1B,8BAA8B,EAG9B,eAAe,EACf,oBAAoB,EACpB,yBAAyB,EACzB,0BAA0B,EAC1B,0BAA0B,EAC1B,2BAA2B,EAC3B,uBAAuB,EAGvB,cAAc,EACd,iBAAiB,EACjB,aAAa,GACd,MAAM,SAAS,CAAC;AAMjB;;;;;GAKG;AACH,wBAAgB,2BAA2B,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,GAAG,mBAAmB,CAmBvG;AAMD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,YAAY,EAAE,uBAAuB,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC"}
package/dist/index.esm.js CHANGED
@@ -26896,14 +26896,14 @@ class JWSSignatureVerificationFailed extends JOSEError {
26896
26896
  _defineProperty(JWSSignatureVerificationFailed, "code", 'ERR_JWS_SIGNATURE_VERIFICATION_FAILED');
26897
26897
 
26898
26898
  /**
26899
- * Base HTTP Client for Voice.AI API
26899
+ * Base HTTP Client for Voice.ai API
26900
26900
  *
26901
26901
  * Provides common functionality for all API clients including:
26902
26902
  * - Authentication via Bearer token
26903
26903
  * - Error handling and response parsing
26904
26904
  * - Common HTTP methods (GET, POST, PUT, PATCH, DELETE)
26905
26905
  */
26906
- /** Error thrown by Voice.AI API client */
26906
+ /** Error thrown by Voice.ai API client */
26907
26907
  class VoiceAIError extends Error {
26908
26908
  constructor(message, status, code, detail) {
26909
26909
  super(message);
@@ -27699,7 +27699,7 @@ class PhoneNumberClient extends BaseClient {
27699
27699
  }
27700
27700
 
27701
27701
  /**
27702
- * VoiceAgentWidget - UI widget for Voice.AI
27702
+ * VoiceAgentWidget - UI widget for Voice.ai
27703
27703
  *
27704
27704
  * Features:
27705
27705
  * - Click to connect/disconnect
@@ -28106,9 +28106,9 @@ VoiceAgentWidget.DEFAULT_THEME = {
28106
28106
  };
28107
28107
 
28108
28108
  /**
28109
- * Voice.AI Web SDK
28109
+ * Voice.ai Web SDK
28110
28110
  *
28111
- * A single, unified SDK for Voice.AI services.
28111
+ * A single, unified SDK for Voice.ai services.
28112
28112
  *
28113
28113
  * @example
28114
28114
  * ```typescript
@@ -28130,7 +28130,7 @@ VoiceAgentWidget.DEFAULT_THEME = {
28130
28130
  /** Default API URL */
28131
28131
  const DEFAULT_API_URL = 'https://dev.voice.ai/api/v1';
28132
28132
  /**
28133
- * VoiceAI - The unified Voice.AI SDK
28133
+ * VoiceAI - The unified Voice.ai SDK
28134
28134
  *
28135
28135
  * Provides both real-time voice agent connections and REST API access
28136
28136
  * through a single, easy-to-use interface.
@@ -28158,7 +28158,7 @@ class VoiceAI {
28158
28158
  * Create a new VoiceAI client
28159
28159
  *
28160
28160
  * @param config - Configuration options
28161
- * @param config.apiKey - Your Voice.AI API key (required)
28161
+ * @param config.apiKey - Your Voice.ai API key (required)
28162
28162
  * @param config.apiUrl - Custom API URL (optional, defaults to production)
28163
28163
  */
28164
28164
  constructor(config) {