@voice-ai-labs/web-sdk 0.2.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/LICENSE +21 -0
- package/README.md +219 -0
- package/dist/__tests__/setup.d.ts +2 -0
- package/dist/__tests__/setup.d.ts.map +1 -0
- package/dist/__tests__/setup.js +13 -0
- package/dist/__tests__/setup.js.map +1 -0
- package/dist/client/agents.d.ts +202 -0
- package/dist/client/agents.d.ts.map +1 -0
- package/dist/client/agents.js +233 -0
- package/dist/client/agents.js.map +1 -0
- package/dist/client/analytics.d.ts +77 -0
- package/dist/client/analytics.d.ts.map +1 -0
- package/dist/client/analytics.js +95 -0
- package/dist/client/analytics.js.map +1 -0
- package/dist/client/base.d.ts +69 -0
- package/dist/client/base.d.ts.map +1 -0
- package/dist/client/base.js +210 -0
- package/dist/client/base.js.map +1 -0
- package/dist/client/index.d.ts +71 -0
- package/dist/client/index.d.ts.map +1 -0
- package/dist/client/index.js +73 -0
- package/dist/client/index.js.map +1 -0
- package/dist/client/knowledge-base.d.ts +110 -0
- package/dist/client/knowledge-base.d.ts.map +1 -0
- package/dist/client/knowledge-base.js +126 -0
- package/dist/client/knowledge-base.js.map +1 -0
- package/dist/client/phone-numbers.d.ts +116 -0
- package/dist/client/phone-numbers.d.ts.map +1 -0
- package/dist/client/phone-numbers.js +143 -0
- package/dist/client/phone-numbers.js.map +1 -0
- package/dist/components/VoiceAgentWidget.d.ts +80 -0
- package/dist/components/VoiceAgentWidget.d.ts.map +1 -0
- package/dist/components/VoiceAgentWidget.js +407 -0
- package/dist/components/VoiceAgentWidget.js.map +1 -0
- package/dist/components/index.d.ts +14 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/index.js +13 -0
- package/dist/components/index.js.map +1 -0
- package/dist/index.d.ts +184 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.esm.js +28724 -0
- package/dist/index.esm.js.map +1 -0
- package/dist/index.js +28732 -0
- package/dist/index.js.map +1 -0
- package/dist/types.d.ts +453 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +13 -0
- package/dist/types.js.map +1 -0
- package/package.json +50 -0
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,453 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Type definitions for Voice.AI Web SDK
|
|
3
|
+
*
|
|
4
|
+
* This file contains all TypeScript types for the SDK including:
|
|
5
|
+
* - Agent Connection types (real-time voice)
|
|
6
|
+
* - Agent Management types
|
|
7
|
+
* - Analytics types
|
|
8
|
+
* - Knowledge Base types
|
|
9
|
+
* - Phone Number types
|
|
10
|
+
* - Common types (pagination, errors)
|
|
11
|
+
*/
|
|
12
|
+
export interface ConnectionDetails {
|
|
13
|
+
serverUrl: string;
|
|
14
|
+
participantToken: string;
|
|
15
|
+
callId: string;
|
|
16
|
+
}
|
|
17
|
+
export interface ConnectionOptions {
|
|
18
|
+
/** API base URL (default: auto-detect or provided) */
|
|
19
|
+
apiUrl?: string;
|
|
20
|
+
/** API key for authentication */
|
|
21
|
+
apiKey?: string;
|
|
22
|
+
/** Agent ID to connect to */
|
|
23
|
+
agentId?: string;
|
|
24
|
+
/** Agent configuration (for custom/preset agents) */
|
|
25
|
+
agentConfig?: Record<string, any>;
|
|
26
|
+
/** Metadata to pass to the agent */
|
|
27
|
+
metadata?: string;
|
|
28
|
+
/** Environment data */
|
|
29
|
+
environment?: string | Record<string, any>;
|
|
30
|
+
/** Enable automatic microphone publishing (default: true) */
|
|
31
|
+
autoPublishMic?: boolean;
|
|
32
|
+
/** Audio capture options */
|
|
33
|
+
audioOptions?: AudioCaptureOptions;
|
|
34
|
+
/** Enable pre-connect audio buffering (default: true) - improves mobile timing */
|
|
35
|
+
preConnectBuffer?: boolean;
|
|
36
|
+
}
|
|
37
|
+
export interface TranscriptionSegment {
|
|
38
|
+
/** Unique ID for this transcription segment/stream */
|
|
39
|
+
id: string;
|
|
40
|
+
text: string;
|
|
41
|
+
role: 'user' | 'assistant';
|
|
42
|
+
timestamp: number;
|
|
43
|
+
isFinal: boolean;
|
|
44
|
+
}
|
|
45
|
+
export interface ConnectionStatus {
|
|
46
|
+
connected: boolean;
|
|
47
|
+
connecting: boolean;
|
|
48
|
+
error?: string;
|
|
49
|
+
callId?: string;
|
|
50
|
+
}
|
|
51
|
+
export type AgentState = 'disconnected' | 'connecting' | 'initializing' | 'listening' | 'thinking' | 'speaking';
|
|
52
|
+
export interface AgentStateInfo {
|
|
53
|
+
state: AgentState;
|
|
54
|
+
agentParticipantId?: string;
|
|
55
|
+
}
|
|
56
|
+
export interface AudioLevelInfo {
|
|
57
|
+
level: number;
|
|
58
|
+
isSpeaking: boolean;
|
|
59
|
+
}
|
|
60
|
+
export interface MicrophoneState {
|
|
61
|
+
enabled: boolean;
|
|
62
|
+
muted: boolean;
|
|
63
|
+
}
|
|
64
|
+
export type TranscriptionHandler = (segment: TranscriptionSegment) => void;
|
|
65
|
+
export type ConnectionStatusHandler = (status: ConnectionStatus) => void;
|
|
66
|
+
export type ErrorHandler = (error: Error) => void;
|
|
67
|
+
export type AgentStateHandler = (state: AgentStateInfo) => void;
|
|
68
|
+
export type AudioLevelHandler = (level: AudioLevelInfo) => void;
|
|
69
|
+
export type MicrophoneStateHandler = (state: MicrophoneState) => void;
|
|
70
|
+
export interface AudioCaptureOptions {
|
|
71
|
+
echoCancellation?: boolean;
|
|
72
|
+
noiseSuppression?: boolean;
|
|
73
|
+
autoGainControl?: boolean;
|
|
74
|
+
sampleRate?: number;
|
|
75
|
+
channelCount?: number;
|
|
76
|
+
voiceIsolation?: boolean;
|
|
77
|
+
[key: string]: any;
|
|
78
|
+
}
|
|
79
|
+
/** Pagination metadata returned by list endpoints */
|
|
80
|
+
export interface PaginationMeta {
|
|
81
|
+
current_page: number;
|
|
82
|
+
total_pages: number;
|
|
83
|
+
total_items: number;
|
|
84
|
+
limit: number;
|
|
85
|
+
has_next: boolean;
|
|
86
|
+
has_previous: boolean;
|
|
87
|
+
}
|
|
88
|
+
/** Pagination options for list requests */
|
|
89
|
+
export interface PaginationOptions {
|
|
90
|
+
/** Page number (1-based) */
|
|
91
|
+
page?: number;
|
|
92
|
+
/** Items per page (max 100) */
|
|
93
|
+
limit?: number;
|
|
94
|
+
}
|
|
95
|
+
/** Standard error response from API */
|
|
96
|
+
export interface ErrorResponse {
|
|
97
|
+
error: string;
|
|
98
|
+
detail?: string;
|
|
99
|
+
code?: string;
|
|
100
|
+
}
|
|
101
|
+
/** Validation error detail */
|
|
102
|
+
export interface ValidationErrorDetail {
|
|
103
|
+
loc: (string | number)[];
|
|
104
|
+
msg: string;
|
|
105
|
+
type: string;
|
|
106
|
+
}
|
|
107
|
+
/** HTTP Validation Error response */
|
|
108
|
+
export interface HTTPValidationError {
|
|
109
|
+
detail: ValidationErrorDetail[];
|
|
110
|
+
}
|
|
111
|
+
/** TTS parameters for agent voice configuration */
|
|
112
|
+
export interface TTSParams {
|
|
113
|
+
/** Voice ID to use for text-to-speech generation */
|
|
114
|
+
voice_id?: string | null;
|
|
115
|
+
/** TTS model to use. If not provided, automatically selected based on language.
|
|
116
|
+
* Examples: 'voiceai-tts-v1-latest', 'voiceai-tts-multilingual-v1-latest' */
|
|
117
|
+
model?: string | null;
|
|
118
|
+
/** Language code (ISO 639-1 format, e.g., 'en', 'es', 'fr').
|
|
119
|
+
* Use 'auto' for ASR-detected language at runtime (requires multilingual model).
|
|
120
|
+
* Defaults to 'en' if not set. */
|
|
121
|
+
language?: string | null;
|
|
122
|
+
/** Sampling temperature (0.0-2.0). Higher values make output more random. */
|
|
123
|
+
temperature?: number | null;
|
|
124
|
+
/** Nucleus sampling parameter (0.0-1.0). Controls diversity of output. */
|
|
125
|
+
top_p?: number | null;
|
|
126
|
+
}
|
|
127
|
+
/** MCP Server configuration */
|
|
128
|
+
export interface MCPServerConfig {
|
|
129
|
+
/** Human-readable name for the server (required) */
|
|
130
|
+
name: string;
|
|
131
|
+
/** Description of the server's purpose or tools */
|
|
132
|
+
description?: string | null;
|
|
133
|
+
/** MCP server endpoint URL (required). URLs ending with '/mcp' use streamable HTTP transport. */
|
|
134
|
+
url: string;
|
|
135
|
+
/** Authentication type (default: 'none') */
|
|
136
|
+
auth_type?: 'none' | 'bearer_token' | 'api_key' | 'custom_headers' | null;
|
|
137
|
+
/** Token for 'bearer_token' or 'api_key' authentication */
|
|
138
|
+
auth_token?: string | null;
|
|
139
|
+
/** HTTP headers for authentication or custom configuration */
|
|
140
|
+
headers?: Record<string, string> | null;
|
|
141
|
+
}
|
|
142
|
+
/** Public agent configuration */
|
|
143
|
+
export interface PublicAgentConfig {
|
|
144
|
+
/** Agent system prompt */
|
|
145
|
+
prompt?: string | null;
|
|
146
|
+
/** Initial greeting message */
|
|
147
|
+
greeting?: string | null;
|
|
148
|
+
/** LLM temperature (default: 0.7) */
|
|
149
|
+
llm_temperature?: number | null;
|
|
150
|
+
/** LLM model (default: gemini-2.5-flash-lite) */
|
|
151
|
+
llm_model?: string | null;
|
|
152
|
+
/** Minimum TTS sentence length (default: 20) */
|
|
153
|
+
tts_min_sentence_len?: number | null;
|
|
154
|
+
/** TTS parameters */
|
|
155
|
+
tts_params?: TTSParams | null;
|
|
156
|
+
/** Minimum silence duration (default: 0.55) */
|
|
157
|
+
min_silence_duration?: number | null;
|
|
158
|
+
/** Minimum speech duration (default: 0.1) */
|
|
159
|
+
min_speech_duration?: number | null;
|
|
160
|
+
/** User silence timeout (default: 10.0) */
|
|
161
|
+
user_silence_timeout?: number | null;
|
|
162
|
+
/** Maximum call duration in seconds (default: 900) */
|
|
163
|
+
max_call_duration_seconds?: number | null;
|
|
164
|
+
/** Allow interruptions (default: true) */
|
|
165
|
+
allow_interruptions?: boolean | null;
|
|
166
|
+
/** Allow interruptions on greeting (default: false) */
|
|
167
|
+
allow_interruptions_on_greeting?: boolean | null;
|
|
168
|
+
/** Minimum words required for interruption (default: 1) */
|
|
169
|
+
min_interruption_words?: number | null;
|
|
170
|
+
/** Enable automatic noise reduction (default: true) */
|
|
171
|
+
auto_noise_reduction?: boolean | null;
|
|
172
|
+
/** Whether agent can end calls via tool or timeout (default: false) */
|
|
173
|
+
allow_agent_to_end_call?: boolean | null;
|
|
174
|
+
/** Whether agent can skip turns and yield conversation control (default: false) */
|
|
175
|
+
allow_agent_to_skip_turn?: boolean | null;
|
|
176
|
+
/** Minimum endpointing delay (default: 0.5) */
|
|
177
|
+
min_endpointing_delay?: number | null;
|
|
178
|
+
/** Maximum endpointing delay (default: 3.0) */
|
|
179
|
+
max_endpointing_delay?: number | null;
|
|
180
|
+
/** VAD activation threshold (default: 0.6) */
|
|
181
|
+
vad_activation_threshold?: number | null;
|
|
182
|
+
/** Phone number in E.164 format */
|
|
183
|
+
phone_number?: string | null;
|
|
184
|
+
/** MCP servers configuration */
|
|
185
|
+
mcp_servers?: MCPServerConfig[] | null;
|
|
186
|
+
}
|
|
187
|
+
/** Agent category */
|
|
188
|
+
export type AgentCategory = 'business' | 'playground';
|
|
189
|
+
/** Agent playground visibility */
|
|
190
|
+
export type AgentPlaygroundVisibility = 'public' | 'unlisted';
|
|
191
|
+
/** Agent object */
|
|
192
|
+
export interface Agent {
|
|
193
|
+
/** Unique agent identifier */
|
|
194
|
+
agent_id: string;
|
|
195
|
+
/** Agent name */
|
|
196
|
+
name: string;
|
|
197
|
+
/** Agent configuration */
|
|
198
|
+
config: PublicAgentConfig;
|
|
199
|
+
/** Agent status (default: paused) */
|
|
200
|
+
status: string;
|
|
201
|
+
/** Status code (default: 1) */
|
|
202
|
+
status_code: number;
|
|
203
|
+
/** Associated knowledge base ID */
|
|
204
|
+
kb_id?: number | null;
|
|
205
|
+
/** Creation timestamp */
|
|
206
|
+
created_at: string;
|
|
207
|
+
/** Last update timestamp */
|
|
208
|
+
updated_at: string;
|
|
209
|
+
}
|
|
210
|
+
/** Request to create a new agent */
|
|
211
|
+
export interface CreateAgentRequest {
|
|
212
|
+
/** Agent name (cannot be empty) */
|
|
213
|
+
name: string;
|
|
214
|
+
/** Agent configuration */
|
|
215
|
+
config: PublicAgentConfig;
|
|
216
|
+
/** Knowledge base ID to assign (optional) */
|
|
217
|
+
kb_id?: number | null;
|
|
218
|
+
}
|
|
219
|
+
/** Request to update an agent */
|
|
220
|
+
export interface UpdateAgentRequest {
|
|
221
|
+
/** New agent name */
|
|
222
|
+
name?: string | null;
|
|
223
|
+
/** Updated configuration */
|
|
224
|
+
config?: PublicAgentConfig | null;
|
|
225
|
+
/** Knowledge base ID (set to null to remove) */
|
|
226
|
+
kb_id?: number | null;
|
|
227
|
+
}
|
|
228
|
+
/** Response from deploying an agent */
|
|
229
|
+
export interface AgentDeployResponse {
|
|
230
|
+
agent: Agent;
|
|
231
|
+
message: string;
|
|
232
|
+
sip_status?: string | null;
|
|
233
|
+
sip_details?: Record<string, any> | null;
|
|
234
|
+
}
|
|
235
|
+
/** Response from pausing an agent */
|
|
236
|
+
export interface AgentPauseResponse {
|
|
237
|
+
agent: Agent;
|
|
238
|
+
}
|
|
239
|
+
/** Response from deleting/disabling an agent */
|
|
240
|
+
export interface AgentDeleteResponse {
|
|
241
|
+
agent: Agent;
|
|
242
|
+
message?: string | null;
|
|
243
|
+
}
|
|
244
|
+
/** Agent connection status response */
|
|
245
|
+
export interface AgentConnectionStatusResponse {
|
|
246
|
+
agent_id: string;
|
|
247
|
+
name: string;
|
|
248
|
+
voice_id: string;
|
|
249
|
+
status: string;
|
|
250
|
+
status_code: number;
|
|
251
|
+
call_allowed: boolean;
|
|
252
|
+
call_validation_details?: Record<string, any> | null;
|
|
253
|
+
}
|
|
254
|
+
/** Agent status summary */
|
|
255
|
+
export interface AgentStatusSummary {
|
|
256
|
+
deployed: number;
|
|
257
|
+
paused: number;
|
|
258
|
+
disabled: number;
|
|
259
|
+
}
|
|
260
|
+
/** Agent stats summary response */
|
|
261
|
+
export interface AgentStatsSummaryResponse {
|
|
262
|
+
total_agents: number;
|
|
263
|
+
status_summary: AgentStatusSummary;
|
|
264
|
+
}
|
|
265
|
+
/** Request to initialize agent from template */
|
|
266
|
+
export interface InitAgentRequest {
|
|
267
|
+
agent_template?: string | null;
|
|
268
|
+
name?: string | null;
|
|
269
|
+
}
|
|
270
|
+
/** Response from initializing agent from template */
|
|
271
|
+
export interface InitAgentResponse {
|
|
272
|
+
agent_template: PublicAgentConfig;
|
|
273
|
+
available_types: string[];
|
|
274
|
+
description: string;
|
|
275
|
+
}
|
|
276
|
+
/** Paginated agent response */
|
|
277
|
+
export interface PaginatedAgentResponse {
|
|
278
|
+
items: Agent[];
|
|
279
|
+
pagination: PaginationMeta;
|
|
280
|
+
}
|
|
281
|
+
/** List agents options */
|
|
282
|
+
export interface ListAgentsOptions extends PaginationOptions {
|
|
283
|
+
/** List of statuses to show (default: deployed and paused) */
|
|
284
|
+
show_statuses?: string[];
|
|
285
|
+
}
|
|
286
|
+
/** Call history item */
|
|
287
|
+
export interface CallHistoryItem {
|
|
288
|
+
id: number;
|
|
289
|
+
agent_id?: string | null;
|
|
290
|
+
agent_name?: string | null;
|
|
291
|
+
call_timestamp: string;
|
|
292
|
+
call_duration_seconds: number;
|
|
293
|
+
credits_used: number;
|
|
294
|
+
has_transcript: boolean;
|
|
295
|
+
call_type?: string | null;
|
|
296
|
+
from_number?: string | null;
|
|
297
|
+
to_number?: string | null;
|
|
298
|
+
transcription_summary?: string | null;
|
|
299
|
+
transcription_stats?: Record<string, any> | null;
|
|
300
|
+
}
|
|
301
|
+
/** Paginated call history response */
|
|
302
|
+
export interface PaginatedCallHistoryResponse {
|
|
303
|
+
items: CallHistoryItem[];
|
|
304
|
+
pagination: PaginationMeta;
|
|
305
|
+
}
|
|
306
|
+
/** Options for getting call history */
|
|
307
|
+
export interface GetCallHistoryOptions extends PaginationOptions {
|
|
308
|
+
/** Filter calls after this date (ISO format UTC) */
|
|
309
|
+
start_date?: string;
|
|
310
|
+
/** Filter calls before this date (ISO format UTC) */
|
|
311
|
+
end_date?: string;
|
|
312
|
+
/** Filter calls by agent ID(s) */
|
|
313
|
+
agent_ids?: string[];
|
|
314
|
+
}
|
|
315
|
+
/** Transcript URL response */
|
|
316
|
+
export interface TranscriptResponse {
|
|
317
|
+
url: string;
|
|
318
|
+
}
|
|
319
|
+
/** Document for knowledge base */
|
|
320
|
+
export interface KnowledgeBaseDocument {
|
|
321
|
+
/** Document text content (required) */
|
|
322
|
+
content: string;
|
|
323
|
+
/** Optional metadata dictionary */
|
|
324
|
+
metadata?: Record<string, any> | null;
|
|
325
|
+
}
|
|
326
|
+
/** Request to create a knowledge base */
|
|
327
|
+
export interface CreateKnowledgeBaseRequest {
|
|
328
|
+
/** Knowledge base name */
|
|
329
|
+
name?: string | null;
|
|
330
|
+
/** Knowledge base description */
|
|
331
|
+
description?: string | null;
|
|
332
|
+
/** List of documents (at least one required) */
|
|
333
|
+
documents: KnowledgeBaseDocument[];
|
|
334
|
+
}
|
|
335
|
+
/** Request to update a knowledge base */
|
|
336
|
+
export interface UpdateKnowledgeBaseRequest {
|
|
337
|
+
/** New name */
|
|
338
|
+
name?: string | null;
|
|
339
|
+
/** New description */
|
|
340
|
+
description?: string | null;
|
|
341
|
+
/** Documents to replace all existing (if provided) */
|
|
342
|
+
documents?: KnowledgeBaseDocument[] | null;
|
|
343
|
+
}
|
|
344
|
+
/** Knowledge base response (without documents) */
|
|
345
|
+
export interface KnowledgeBaseResponse {
|
|
346
|
+
kb_id: number;
|
|
347
|
+
name?: string | null;
|
|
348
|
+
description?: string | null;
|
|
349
|
+
document_count: number;
|
|
350
|
+
created_at: string;
|
|
351
|
+
updated_at: string;
|
|
352
|
+
message?: string | null;
|
|
353
|
+
}
|
|
354
|
+
/** Knowledge base with documents */
|
|
355
|
+
export interface KnowledgeBaseWithDocuments extends KnowledgeBaseResponse {
|
|
356
|
+
documents: Record<string, any>[];
|
|
357
|
+
}
|
|
358
|
+
/** Paginated knowledge base response */
|
|
359
|
+
export interface PaginatedKnowledgeBaseResponse {
|
|
360
|
+
items: KnowledgeBaseResponse[];
|
|
361
|
+
pagination: PaginationMeta;
|
|
362
|
+
}
|
|
363
|
+
/** Request to assign knowledge base to agent */
|
|
364
|
+
export interface AssignKnowledgeBaseRequest {
|
|
365
|
+
kb_id: number;
|
|
366
|
+
}
|
|
367
|
+
/** Phone number information */
|
|
368
|
+
export interface PhoneNumberInfo {
|
|
369
|
+
phone_number: string;
|
|
370
|
+
status: string;
|
|
371
|
+
assigned_to_agent_id?: string | null;
|
|
372
|
+
assigned_to_agent_name?: string | null;
|
|
373
|
+
}
|
|
374
|
+
/** Available phone number from search */
|
|
375
|
+
export interface AvailablePhoneNumber {
|
|
376
|
+
phone_number: string;
|
|
377
|
+
locality?: string | null;
|
|
378
|
+
region?: string | null;
|
|
379
|
+
country_code: string;
|
|
380
|
+
}
|
|
381
|
+
/** Request to search phone numbers */
|
|
382
|
+
export interface SearchPhoneNumbersRequest {
|
|
383
|
+
/** Country code (e.g., 'US', 'CA', default: 'US') */
|
|
384
|
+
country_code?: string;
|
|
385
|
+
/** 3-digit area code (e.g., '415') */
|
|
386
|
+
area_code?: string | null;
|
|
387
|
+
/** Provider: 'twilio' or 'telnyx' (default: 'twilio') */
|
|
388
|
+
provider?: string;
|
|
389
|
+
}
|
|
390
|
+
/** Response from searching phone numbers */
|
|
391
|
+
export interface SearchPhoneNumbersResponse {
|
|
392
|
+
results: AvailablePhoneNumber[];
|
|
393
|
+
total_results: number;
|
|
394
|
+
}
|
|
395
|
+
/** Request to select/purchase or release a phone number */
|
|
396
|
+
export interface PurchasePhoneNumberRequest {
|
|
397
|
+
/** Exact phone number (e.g., '+15551234567') */
|
|
398
|
+
phone_number: string;
|
|
399
|
+
/** Provider: 'twilio' or 'telnyx' (default: 'twilio') */
|
|
400
|
+
provider?: string;
|
|
401
|
+
}
|
|
402
|
+
/** Response from selecting or releasing a phone number */
|
|
403
|
+
export interface PurchasePhoneNumberResponse {
|
|
404
|
+
phone_number: string;
|
|
405
|
+
status: string;
|
|
406
|
+
}
|
|
407
|
+
/** All phone numbers response (non-paginated) */
|
|
408
|
+
export interface AllPhoneNumbersResponse {
|
|
409
|
+
phone_numbers: PhoneNumberInfo[];
|
|
410
|
+
total_numbers: number;
|
|
411
|
+
total_available: number;
|
|
412
|
+
total_assigned: number;
|
|
413
|
+
}
|
|
414
|
+
/** Paginated phone numbers response */
|
|
415
|
+
export interface PaginatedPhoneNumberResponse {
|
|
416
|
+
items: AvailablePhoneNumber[];
|
|
417
|
+
pagination: PaginationMeta;
|
|
418
|
+
}
|
|
419
|
+
/** Paginated all phone numbers response */
|
|
420
|
+
export interface PaginatedAllPhoneNumbersResponse {
|
|
421
|
+
items: PhoneNumberInfo[];
|
|
422
|
+
pagination: PaginationMeta;
|
|
423
|
+
}
|
|
424
|
+
/** Request for connection details */
|
|
425
|
+
export interface ConnectionDetailsRequest {
|
|
426
|
+
agent_id?: string | null;
|
|
427
|
+
metadata?: string | null;
|
|
428
|
+
environment?: string | null;
|
|
429
|
+
}
|
|
430
|
+
/** Response with connection details */
|
|
431
|
+
export interface ConnectionDetailsResponse {
|
|
432
|
+
server_url: string;
|
|
433
|
+
participant_token: string;
|
|
434
|
+
call_id: string;
|
|
435
|
+
}
|
|
436
|
+
/** End call response */
|
|
437
|
+
export interface EndCallResponse {
|
|
438
|
+
call_id: string;
|
|
439
|
+
status: string;
|
|
440
|
+
ended_at: string;
|
|
441
|
+
actual_duration_seconds: number;
|
|
442
|
+
credits_used: number;
|
|
443
|
+
}
|
|
444
|
+
/** Configuration for VoiceAI SDK */
|
|
445
|
+
export interface VoiceAIConfig {
|
|
446
|
+
/** API key for authentication (required) */
|
|
447
|
+
apiKey: string;
|
|
448
|
+
/** API base URL (optional, defaults to production) */
|
|
449
|
+
apiUrl?: string;
|
|
450
|
+
}
|
|
451
|
+
/** @deprecated Use VoiceAIConfig instead */
|
|
452
|
+
export type VoiceAIClientConfig = VoiceAIConfig;
|
|
453
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[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Ae,EAAE,CAAC;IACjC,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,uCAAuC;AACvC,MAAM,WAAW,4BAA4B;IAC3C,KAAK,EAAE,oBAAoB,EAAE,CAAC;IAC9B,UAAU,EAAE,cAAc,CAAC;CAC5B;AAED,2CAA2C;AAC3C,MAAM,WAAW,gCAAgC;IAC/C,KAAK,EAAE,eAAe,EAAE,CAAC;IACzB,UAAU,EAAE,cAAc,CAAC;CAC5B;AAMD,qCAAqC;AACrC,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B;AAED,uCAAuC;AACvC,MAAM,WAAW,yBAAyB;IACxC,UAAU,EAAE,MAAM,CAAC;IACnB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,wBAAwB;AACxB,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,uBAAuB,EAAE,MAAM,CAAC;IAChC,YAAY,EAAE,MAAM,CAAC;CACtB;AAMD,oCAAoC;AACpC,MAAM,WAAW,aAAa;IAC5B,4CAA4C;IAC5C,MAAM,EAAE,MAAM,CAAC;IACf,sDAAsD;IACtD,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,4CAA4C;AAC5C,MAAM,MAAM,mBAAmB,GAAG,aAAa,CAAC"}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Type definitions for Voice.AI Web SDK
|
|
3
|
+
*
|
|
4
|
+
* This file contains all TypeScript types for the SDK including:
|
|
5
|
+
* - Agent Connection types (real-time voice)
|
|
6
|
+
* - Agent Management types
|
|
7
|
+
* - Analytics types
|
|
8
|
+
* - Knowledge Base types
|
|
9
|
+
* - Phone Number types
|
|
10
|
+
* - Common types (pagination, errors)
|
|
11
|
+
*/
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG"}
|
package/package.json
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@voice-ai-labs/web-sdk",
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "Web SDK for Voice.AI - Easy integration of voice agents into JavaScript applications",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"module": "dist/index.esm.js",
|
|
8
|
+
"types": "dist/index.d.ts",
|
|
9
|
+
"files": [
|
|
10
|
+
"dist"
|
|
11
|
+
],
|
|
12
|
+
"scripts": {
|
|
13
|
+
"build": "tsc && rollup -c",
|
|
14
|
+
"dev": "pnpm dlx http-server . -p 3000 -o /demo/test.html",
|
|
15
|
+
"watch": "tsc --watch",
|
|
16
|
+
"test": "vitest --run",
|
|
17
|
+
"test:watch": "vitest",
|
|
18
|
+
"test:coverage": "vitest --run --coverage",
|
|
19
|
+
"prepublishOnly": "pnpm run build",
|
|
20
|
+
"clean": "rm -rf dist"
|
|
21
|
+
},
|
|
22
|
+
"keywords": [
|
|
23
|
+
"voice",
|
|
24
|
+
"ai",
|
|
25
|
+
"voice-agent",
|
|
26
|
+
"sdk"
|
|
27
|
+
],
|
|
28
|
+
"author": "",
|
|
29
|
+
"license": "MIT",
|
|
30
|
+
"repository": {
|
|
31
|
+
"type": "git",
|
|
32
|
+
"url": "https://github.com/voice-ai/web-sdk.git"
|
|
33
|
+
},
|
|
34
|
+
"bugs": {
|
|
35
|
+
"url": "https://github.com/voice-ai/web-sdk/issues"
|
|
36
|
+
},
|
|
37
|
+
"homepage": "https://voice.ai",
|
|
38
|
+
"dependencies": {},
|
|
39
|
+
"devDependencies": {
|
|
40
|
+
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
41
|
+
"@rollup/plugin-typescript": "^11.1.5",
|
|
42
|
+
"@types/node": "^20.17.13",
|
|
43
|
+
"@vitest/coverage-v8": "^2.1.8",
|
|
44
|
+
"jsdom": "^25.0.1",
|
|
45
|
+
"livekit-client": "^2.8.0",
|
|
46
|
+
"rollup": "^4.9.0",
|
|
47
|
+
"typescript": "^5.7.3",
|
|
48
|
+
"vitest": "^2.1.8"
|
|
49
|
+
}
|
|
50
|
+
}
|