@kognitivedev/cloud-voice 0.2.29
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/.turbo/turbo-build.log +2 -0
- package/.turbo/turbo-test.log +13 -0
- package/CHANGELOG.md +10 -0
- package/README.md +226 -0
- package/dist/browser.d.ts +7 -0
- package/dist/browser.js +301 -0
- package/dist/client.d.ts +219 -0
- package/dist/client.js +535 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +15 -0
- package/dist/server.d.ts +58 -0
- package/dist/server.js +92 -0
- package/dist/server.test.d.ts +1 -0
- package/dist/server.test.js +78 -0
- package/dist/sse.d.ts +7 -0
- package/dist/sse.js +75 -0
- package/dist/types.d.ts +865 -0
- package/dist/types.js +2 -0
- package/package.json +52 -0
- package/src/__tests__/browser.test.ts +196 -0
- package/src/__tests__/client.test.ts +482 -0
- package/src/__tests__/server.test.ts +84 -0
- package/src/browser.ts +342 -0
- package/src/client.ts +610 -0
- package/src/index.ts +100 -0
- package/src/server.ts +140 -0
- package/src/sse.ts +57 -0
- package/src/types.ts +927 -0
- package/tsconfig.json +14 -0
- package/vitest.config.ts +8 -0
package/src/types.ts
ADDED
|
@@ -0,0 +1,927 @@
|
|
|
1
|
+
import type { HttpTransportConfig, LogLevel } from "@kognitivedev/client-core";
|
|
2
|
+
|
|
3
|
+
export type { LogLevel };
|
|
4
|
+
|
|
5
|
+
export interface CloudVoiceClientConfig extends HttpTransportConfig {}
|
|
6
|
+
|
|
7
|
+
export type CloudVoiceAgentStatus = "draft" | "published" | "archived";
|
|
8
|
+
export type CloudVoiceSessionStatus = "created" | "connecting" | "active" | "completed" | "cancelled" | "error";
|
|
9
|
+
export type CloudVoiceChannel = "web" | "iframe" | "script" | "phone" | "sip" | "outbound";
|
|
10
|
+
export type CloudVoiceProvider = "openai-realtime" | "gemini-live" | "kognitive-voice" | "xai-realtime";
|
|
11
|
+
export type CloudVoiceTransport = "webrtc" | "websocket";
|
|
12
|
+
export type CloudVoiceToolType = "cloud_flow" | "web_search" | "knowledge_base" | "platform_action" | "calendar_action" | "appointment_action" | "cloud_voice_agent" | "external_webhook" | "sip_transfer" | "code_defined_tool";
|
|
13
|
+
export type CloudVoiceCustomVoiceSource = "imported" | "api_clone";
|
|
14
|
+
export type CloudVoiceCustomVoiceVerificationStatus = "verified" | "unverified" | "error" | string;
|
|
15
|
+
|
|
16
|
+
export interface CloudVoiceCustomVoiceConsent {
|
|
17
|
+
accepted: boolean;
|
|
18
|
+
country?: string;
|
|
19
|
+
state?: string;
|
|
20
|
+
consentAcceptedAt?: string;
|
|
21
|
+
consentTextVersion?: string;
|
|
22
|
+
actor?: string | null;
|
|
23
|
+
ip?: string | null;
|
|
24
|
+
userAgent?: string | null;
|
|
25
|
+
[key: string]: unknown;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface CloudVoiceCustomVoiceRecord {
|
|
29
|
+
id: string;
|
|
30
|
+
projectId: string;
|
|
31
|
+
provider: "xai-realtime" | string;
|
|
32
|
+
voiceId: string;
|
|
33
|
+
name: string | null;
|
|
34
|
+
description: string | null;
|
|
35
|
+
gender: string | null;
|
|
36
|
+
accent: string | null;
|
|
37
|
+
age: string | null;
|
|
38
|
+
language: string | null;
|
|
39
|
+
useCase: string | null;
|
|
40
|
+
tone: string | null;
|
|
41
|
+
source: CloudVoiceCustomVoiceSource | string;
|
|
42
|
+
verificationStatus: CloudVoiceCustomVoiceVerificationStatus;
|
|
43
|
+
consent: Record<string, unknown>;
|
|
44
|
+
xaiMetadata: Record<string, unknown>;
|
|
45
|
+
lastVerifiedAt: string | Date | null;
|
|
46
|
+
createdAt: string | Date;
|
|
47
|
+
updatedAt: string | Date;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export interface ImportCloudVoiceCustomVoiceInput {
|
|
51
|
+
voiceId: string;
|
|
52
|
+
name?: string | null;
|
|
53
|
+
consent: CloudVoiceCustomVoiceConsent;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export interface CloneCloudVoiceCustomVoiceInput {
|
|
57
|
+
file: Blob;
|
|
58
|
+
fileName?: string;
|
|
59
|
+
name?: string;
|
|
60
|
+
description?: string;
|
|
61
|
+
gender?: "male" | "female" | "neutral" | string;
|
|
62
|
+
accent?: string;
|
|
63
|
+
age?: "young" | "middle-aged" | "old" | string;
|
|
64
|
+
language?: string;
|
|
65
|
+
useCase?: "conversational" | "narration" | "characters" | "educational" | "advertisement" | "social_media" | "entertainment" | string;
|
|
66
|
+
tone?: "warm" | "casual" | "professional" | "friendly" | "authoritative" | "expressive" | "calm" | string;
|
|
67
|
+
consent: CloudVoiceCustomVoiceConsent;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export interface UpdateCloudVoiceCustomVoiceInput {
|
|
71
|
+
name?: string | null;
|
|
72
|
+
description?: string | null;
|
|
73
|
+
gender?: string | null;
|
|
74
|
+
accent?: string | null;
|
|
75
|
+
age?: string | null;
|
|
76
|
+
language?: string | null;
|
|
77
|
+
useCase?: string | null;
|
|
78
|
+
tone?: string | null;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export interface CloudVoiceChannelSettings {
|
|
82
|
+
web: boolean;
|
|
83
|
+
iframe: boolean;
|
|
84
|
+
script: boolean;
|
|
85
|
+
phone: boolean;
|
|
86
|
+
sip: boolean;
|
|
87
|
+
outbound: boolean;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export interface CloudVoiceWidgetConfig {
|
|
91
|
+
title: string;
|
|
92
|
+
subtitle?: string;
|
|
93
|
+
layout?: "expanded" | "compact";
|
|
94
|
+
accentColor?: string;
|
|
95
|
+
backgroundColor?: string;
|
|
96
|
+
surfaceColor?: string;
|
|
97
|
+
textColor?: string;
|
|
98
|
+
mutedColor?: string;
|
|
99
|
+
ctaLabel?: string;
|
|
100
|
+
launcher?: "button" | "inline";
|
|
101
|
+
position?: "bottom-right" | "bottom-left";
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export interface CloudVoiceHumanizationConfig {
|
|
105
|
+
enabled?: boolean;
|
|
106
|
+
openingMode?: "auto" | "wait";
|
|
107
|
+
openingStyle?: "brief" | "warm" | "professional";
|
|
108
|
+
fillerStyle?: "off" | "light" | "natural";
|
|
109
|
+
backchannelFrequency?: "off" | "low" | "medium";
|
|
110
|
+
disfluency?: "off" | "rare";
|
|
111
|
+
toolLatencyFillerMs?: number;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export interface CloudVoiceSpeechConfig extends Record<string, unknown> {
|
|
115
|
+
language?: string;
|
|
116
|
+
accent?: string;
|
|
117
|
+
style?: string;
|
|
118
|
+
pace?: string;
|
|
119
|
+
emotion?: string;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export interface CloudVoiceNodeVoiceSettings extends Record<string, unknown> {
|
|
123
|
+
speed?: number;
|
|
124
|
+
pitch?: number;
|
|
125
|
+
backgroundNoise?: boolean;
|
|
126
|
+
fillerWords?: boolean;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export interface CloudVoiceNodeModelSettings extends Record<string, unknown> {
|
|
130
|
+
temperature?: number;
|
|
131
|
+
maxOutputTokens?: number;
|
|
132
|
+
sentimentGuardrails?: boolean;
|
|
133
|
+
recordTranscript?: boolean;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export type CloudVoiceTelephonyProvider = "telnyx" | "cm_com" | "didww" | "sinch" | "bird" | "sip_custom" | string;
|
|
137
|
+
|
|
138
|
+
export type CloudVoiceTelephonyDestination =
|
|
139
|
+
| { type: "phone_number"; phoneNumber: string; connectionId?: string; callerId?: string; metadata?: Record<string, unknown> }
|
|
140
|
+
| { type: "sip_uri"; uri: string; connectionId?: string; transport?: "udp" | "tcp" | "tls"; metadata?: Record<string, unknown> }
|
|
141
|
+
| { type: "extension"; extension: string; connectionId: string; metadata?: Record<string, unknown> }
|
|
142
|
+
| { type: "queue"; queueId: string; metadata?: Record<string, unknown> }
|
|
143
|
+
| { type: "browser_queue"; queueId?: string; label?: string; metadata?: Record<string, unknown> };
|
|
144
|
+
|
|
145
|
+
export type CloudVoiceTransferMode = "blind" | "attended" | "warm";
|
|
146
|
+
|
|
147
|
+
export interface CloudVoiceTransferPolicy {
|
|
148
|
+
mode?: CloudVoiceTransferMode;
|
|
149
|
+
timeoutSeconds?: number;
|
|
150
|
+
fallback?: "return_to_ai" | "alternate_destination" | "voicemail" | "hangup";
|
|
151
|
+
fallbackDestinationId?: string;
|
|
152
|
+
announceBeforeTransfer?: boolean;
|
|
153
|
+
allowSipRefer?: boolean;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
export interface CloudVoiceTransferDestination {
|
|
157
|
+
id: string;
|
|
158
|
+
name: string;
|
|
159
|
+
provider?: CloudVoiceTelephonyProvider;
|
|
160
|
+
destination: CloudVoiceTelephonyDestination;
|
|
161
|
+
policy?: CloudVoiceTransferPolicy;
|
|
162
|
+
metadata?: Record<string, unknown>;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
export interface CloudVoiceSipConfig {
|
|
166
|
+
enabled?: boolean;
|
|
167
|
+
defaultConnectionId?: string;
|
|
168
|
+
defaultProvider?: CloudVoiceTelephonyProvider;
|
|
169
|
+
inboundRouting?: {
|
|
170
|
+
mode: "agent" | "flow" | "queue";
|
|
171
|
+
agentId?: string;
|
|
172
|
+
flowId?: string;
|
|
173
|
+
queueId?: string;
|
|
174
|
+
};
|
|
175
|
+
transferPolicy?: CloudVoiceTransferPolicy;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
export interface CloudVoiceToolBinding {
|
|
179
|
+
id: string;
|
|
180
|
+
type: CloudVoiceToolType;
|
|
181
|
+
name: string;
|
|
182
|
+
description?: string;
|
|
183
|
+
inputSchema?: Record<string, unknown>;
|
|
184
|
+
outputSchema?: Record<string, unknown>;
|
|
185
|
+
parameterBindings?: Record<string, { parameter: string }>;
|
|
186
|
+
ui?: {
|
|
187
|
+
type?: "card" | "status" | "table" | "timeline" | "custom";
|
|
188
|
+
title?: string;
|
|
189
|
+
description?: string;
|
|
190
|
+
renderer?: string;
|
|
191
|
+
config?: Record<string, unknown>;
|
|
192
|
+
};
|
|
193
|
+
config: Record<string, unknown>;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
export interface CloudVoiceToolCatalogSource {
|
|
197
|
+
id: string;
|
|
198
|
+
projectId: string;
|
|
199
|
+
sourceKey: string;
|
|
200
|
+
sourceType: "platform" | "bridge" | string;
|
|
201
|
+
name: string;
|
|
202
|
+
status: string;
|
|
203
|
+
hasBridgeAuthorization?: boolean;
|
|
204
|
+
metadata?: Record<string, unknown>;
|
|
205
|
+
lastSyncedAt?: string | Date;
|
|
206
|
+
createdAt?: string | Date;
|
|
207
|
+
updatedAt?: string | Date;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
export interface CloudVoiceToolCatalogEntry {
|
|
211
|
+
id: string;
|
|
212
|
+
projectId: string;
|
|
213
|
+
sourceId: string;
|
|
214
|
+
source?: CloudVoiceToolCatalogSource;
|
|
215
|
+
sourceKey: string;
|
|
216
|
+
toolId: string;
|
|
217
|
+
name: string;
|
|
218
|
+
description?: string | null;
|
|
219
|
+
origin: "platform_defined" | "code_defined" | string;
|
|
220
|
+
bindingType: CloudVoiceToolType | string;
|
|
221
|
+
inputSchema: Record<string, unknown>;
|
|
222
|
+
outputSchema?: Record<string, unknown>;
|
|
223
|
+
requireApproval: boolean;
|
|
224
|
+
status: string;
|
|
225
|
+
config: Record<string, unknown>;
|
|
226
|
+
metadata?: Record<string, unknown>;
|
|
227
|
+
lastSyncedAt?: string | Date;
|
|
228
|
+
createdAt?: string | Date;
|
|
229
|
+
updatedAt?: string | Date;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
export interface CloudVoiceToolCatalog {
|
|
233
|
+
sources: CloudVoiceToolCatalogSource[];
|
|
234
|
+
tools: CloudVoiceToolCatalogEntry[];
|
|
235
|
+
count: number;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
export interface SyncCloudVoiceToolCatalogInput {
|
|
239
|
+
sourceKey: string;
|
|
240
|
+
name?: string;
|
|
241
|
+
bridgeUrl: string;
|
|
242
|
+
bridgeAuthorization?: string | null;
|
|
243
|
+
bridgeToken?: string | null;
|
|
244
|
+
metadata?: Record<string, unknown>;
|
|
245
|
+
tools: Array<{
|
|
246
|
+
id: string;
|
|
247
|
+
name?: string;
|
|
248
|
+
description?: string;
|
|
249
|
+
inputSchema?: Record<string, unknown>;
|
|
250
|
+
outputSchema?: Record<string, unknown>;
|
|
251
|
+
requireApproval?: boolean;
|
|
252
|
+
metadata?: Record<string, unknown>;
|
|
253
|
+
}>;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
export type CloudVoiceFlowNodeType = "initial" | "case" | "tool" | "transfer" | "end" | string;
|
|
257
|
+
|
|
258
|
+
export interface CloudVoiceFlowNodeOutput {
|
|
259
|
+
id: string;
|
|
260
|
+
label: string;
|
|
261
|
+
description?: string;
|
|
262
|
+
desc?: string;
|
|
263
|
+
condition?: string;
|
|
264
|
+
icon?: string;
|
|
265
|
+
metadata?: Record<string, unknown>;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
export interface CloudVoiceFlowNode {
|
|
269
|
+
id: string;
|
|
270
|
+
type: CloudVoiceFlowNodeType;
|
|
271
|
+
title?: string;
|
|
272
|
+
prompt?: string;
|
|
273
|
+
firstMessage?: string;
|
|
274
|
+
language?: string;
|
|
275
|
+
maxDuration?: string | number;
|
|
276
|
+
provider?: CloudVoiceProvider;
|
|
277
|
+
model?: string;
|
|
278
|
+
voice?: string;
|
|
279
|
+
transport?: CloudVoiceTransport;
|
|
280
|
+
providerOptions?: Record<string, unknown>;
|
|
281
|
+
transcription?: Record<string, unknown> | null;
|
|
282
|
+
turnDetection?: Record<string, unknown> | null;
|
|
283
|
+
inputNoiseReduction?: Record<string, unknown> | null;
|
|
284
|
+
humanization?: CloudVoiceHumanizationConfig;
|
|
285
|
+
speech?: CloudVoiceSpeechConfig;
|
|
286
|
+
phoneNumberIds?: string[];
|
|
287
|
+
voiceSettings?: CloudVoiceNodeVoiceSettings;
|
|
288
|
+
modelSettings?: CloudVoiceNodeModelSettings;
|
|
289
|
+
outputs?: CloudVoiceFlowNodeOutput[];
|
|
290
|
+
toolId?: string;
|
|
291
|
+
toolIds?: string[];
|
|
292
|
+
transferTarget?: string;
|
|
293
|
+
transferDestinationId?: string;
|
|
294
|
+
transferMode?: CloudVoiceTransferMode;
|
|
295
|
+
metadata?: Record<string, unknown>;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
export interface CloudVoiceFlowEdge {
|
|
299
|
+
id?: string;
|
|
300
|
+
from: string;
|
|
301
|
+
fromPort?: string | null;
|
|
302
|
+
to: string;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
export interface CloudVoiceFlowGraph {
|
|
306
|
+
version?: 1;
|
|
307
|
+
startNodeId?: string;
|
|
308
|
+
nodes: CloudVoiceFlowNode[];
|
|
309
|
+
edges: CloudVoiceFlowEdge[];
|
|
310
|
+
metadata?: Record<string, unknown>;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
export interface CloudVoiceAgentMetadata extends Record<string, unknown> {
|
|
314
|
+
flowGraph?: CloudVoiceFlowGraph;
|
|
315
|
+
speech?: CloudVoiceSpeechConfig;
|
|
316
|
+
sip?: CloudVoiceSipConfig;
|
|
317
|
+
transferDestinations?: CloudVoiceTransferDestination[];
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
export type CloudVoiceParameterType = "string" | "number" | "boolean" | "json" | "phone" | "email";
|
|
321
|
+
export type CloudVoiceParameterSource = "system" | "session" | "call" | "custom";
|
|
322
|
+
export type CloudVoiceParameterPreset =
|
|
323
|
+
| "user_id"
|
|
324
|
+
| "session_id"
|
|
325
|
+
| "agent_slug"
|
|
326
|
+
| "channel"
|
|
327
|
+
| "phone"
|
|
328
|
+
| "caller_phone"
|
|
329
|
+
| "from_phone"
|
|
330
|
+
| "to_phone"
|
|
331
|
+
| "provider"
|
|
332
|
+
| "provider_call_id"
|
|
333
|
+
| "call_direction"
|
|
334
|
+
| "phone_number_id"
|
|
335
|
+
| "embed_origin";
|
|
336
|
+
export type CloudVoiceParameterValueMap = Record<string, unknown>;
|
|
337
|
+
|
|
338
|
+
export interface CloudVoiceParameterDefinition {
|
|
339
|
+
key: string;
|
|
340
|
+
label: string;
|
|
341
|
+
type: CloudVoiceParameterType;
|
|
342
|
+
required?: boolean;
|
|
343
|
+
description?: string;
|
|
344
|
+
defaultValue?: unknown;
|
|
345
|
+
enum?: unknown[];
|
|
346
|
+
source?: CloudVoiceParameterSource;
|
|
347
|
+
preset?: CloudVoiceParameterPreset;
|
|
348
|
+
sensitive?: boolean;
|
|
349
|
+
jsonSchema?: Record<string, unknown>;
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
export interface CloudVoiceAgentConfig {
|
|
353
|
+
instructions: string;
|
|
354
|
+
provider: CloudVoiceProvider;
|
|
355
|
+
model: string;
|
|
356
|
+
voice: string;
|
|
357
|
+
transport: CloudVoiceTransport;
|
|
358
|
+
memoryEnabled?: boolean;
|
|
359
|
+
providerOptions?: Record<string, unknown>;
|
|
360
|
+
transcription?: Record<string, unknown> | null;
|
|
361
|
+
turnDetection?: Record<string, unknown> | null;
|
|
362
|
+
inputNoiseReduction?: Record<string, unknown> | null;
|
|
363
|
+
tools: CloudVoiceToolBinding[];
|
|
364
|
+
knowledgeBases: Array<{ pipelineId: string; name?: string; topK?: number }>;
|
|
365
|
+
webSearch?: { enabled?: boolean; maxResults?: number; maxPages?: number };
|
|
366
|
+
widget: CloudVoiceWidgetConfig;
|
|
367
|
+
channels: CloudVoiceChannelSettings;
|
|
368
|
+
humanization?: CloudVoiceHumanizationConfig;
|
|
369
|
+
parameters?: CloudVoiceParameterDefinition[];
|
|
370
|
+
metadata?: CloudVoiceAgentMetadata;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
export interface CloudVoiceAgentConfigInput {
|
|
374
|
+
instructions?: string;
|
|
375
|
+
provider?: CloudVoiceProvider;
|
|
376
|
+
model?: string;
|
|
377
|
+
voice?: string;
|
|
378
|
+
transport?: CloudVoiceTransport;
|
|
379
|
+
memoryEnabled?: boolean;
|
|
380
|
+
providerOptions?: Record<string, unknown>;
|
|
381
|
+
transcription?: Record<string, unknown> | null;
|
|
382
|
+
turnDetection?: Record<string, unknown> | null;
|
|
383
|
+
inputNoiseReduction?: Record<string, unknown> | null;
|
|
384
|
+
tools?: CloudVoiceToolBinding[];
|
|
385
|
+
knowledgeBases?: Array<{ pipelineId: string; name?: string; topK?: number }>;
|
|
386
|
+
webSearch?: { enabled?: boolean; maxResults?: number; maxPages?: number };
|
|
387
|
+
widget?: Partial<CloudVoiceWidgetConfig>;
|
|
388
|
+
channels?: Partial<CloudVoiceChannelSettings>;
|
|
389
|
+
humanization?: CloudVoiceHumanizationConfig;
|
|
390
|
+
metadata?: CloudVoiceAgentMetadata;
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
export interface CloudVoiceAgentRecord {
|
|
394
|
+
id: string;
|
|
395
|
+
projectId: string;
|
|
396
|
+
name: string;
|
|
397
|
+
slug: string;
|
|
398
|
+
description: string | null;
|
|
399
|
+
status: CloudVoiceAgentStatus | string;
|
|
400
|
+
draftConfig: CloudVoiceAgentConfig;
|
|
401
|
+
publishedConfig: CloudVoiceAgentConfig | null;
|
|
402
|
+
draftVersion: number;
|
|
403
|
+
publishedVersion: number | null;
|
|
404
|
+
publishedAt: string | Date | null;
|
|
405
|
+
createdAt: string | Date;
|
|
406
|
+
updatedAt: string | Date;
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
export interface CreateCloudVoiceAgentInput {
|
|
410
|
+
projectId?: string;
|
|
411
|
+
name: string;
|
|
412
|
+
slug: string;
|
|
413
|
+
description?: string | null;
|
|
414
|
+
config?: CloudVoiceAgentConfigInput;
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
export interface UpdateCloudVoiceAgentInput {
|
|
418
|
+
name?: string;
|
|
419
|
+
slug?: string;
|
|
420
|
+
description?: string | null;
|
|
421
|
+
status?: CloudVoiceAgentStatus;
|
|
422
|
+
config?: CloudVoiceAgentConfigInput;
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
export interface UseCloudVoiceAgentInput {
|
|
426
|
+
name?: string;
|
|
427
|
+
description?: string | null;
|
|
428
|
+
status?: CloudVoiceAgentStatus;
|
|
429
|
+
config?: CloudVoiceAgentConfigInput;
|
|
430
|
+
publish?: boolean;
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
export type UseCloudVoiceAgentAction = "created" | "updated" | "used";
|
|
434
|
+
|
|
435
|
+
export interface UseCloudVoiceAgentResult {
|
|
436
|
+
action: UseCloudVoiceAgentAction;
|
|
437
|
+
agent: CloudVoiceAgentRecord;
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
export interface CloudVoiceSessionRecord {
|
|
441
|
+
id: string;
|
|
442
|
+
projectId: string;
|
|
443
|
+
agentId: string | null;
|
|
444
|
+
agentSlug: string;
|
|
445
|
+
agentVersion: number | null;
|
|
446
|
+
channel: CloudVoiceChannel | string;
|
|
447
|
+
status: CloudVoiceSessionStatus | string;
|
|
448
|
+
userId: string;
|
|
449
|
+
sessionId: string;
|
|
450
|
+
sessionDbId: string | null;
|
|
451
|
+
traceDbId: string | null;
|
|
452
|
+
provider: string;
|
|
453
|
+
modelId: string;
|
|
454
|
+
voice: string | null;
|
|
455
|
+
transport: string;
|
|
456
|
+
callId: string | null;
|
|
457
|
+
resourceId: Record<string, unknown>;
|
|
458
|
+
parameters?: CloudVoiceParameterValueMap;
|
|
459
|
+
metadata: Record<string, unknown>;
|
|
460
|
+
startedAt: string | Date;
|
|
461
|
+
connectedAt: string | Date | null;
|
|
462
|
+
endedAt: string | Date | null;
|
|
463
|
+
durationMs: number | null;
|
|
464
|
+
outcomeStatus: string | null;
|
|
465
|
+
outcomeReason: string | null;
|
|
466
|
+
outcomeConfidence: number | null;
|
|
467
|
+
outcomeJudgeResultId?: string | null;
|
|
468
|
+
outcomeUpdatedAt?: string | Date | null;
|
|
469
|
+
errorMessage: string | null;
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
export interface CreateCloudVoiceSessionInput {
|
|
473
|
+
agentSlug?: string;
|
|
474
|
+
agent?: string;
|
|
475
|
+
channel?: CloudVoiceChannel;
|
|
476
|
+
userId?: string;
|
|
477
|
+
resourceId?: Record<string, unknown>;
|
|
478
|
+
parameters?: CloudVoiceParameterValueMap;
|
|
479
|
+
metadata?: Record<string, unknown>;
|
|
480
|
+
clientTools?: CloudVoiceClientToolManifest[];
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
export interface CloudVoicePhoneConnectionRecord {
|
|
484
|
+
id: string;
|
|
485
|
+
projectId: string;
|
|
486
|
+
provider: "twilio" | string;
|
|
487
|
+
name: string;
|
|
488
|
+
accountSid: string | null;
|
|
489
|
+
status: string;
|
|
490
|
+
hasAuthToken: boolean;
|
|
491
|
+
metadata: Record<string, unknown>;
|
|
492
|
+
createdAt: string | Date;
|
|
493
|
+
updatedAt: string | Date;
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
export interface CloudVoiceSipDiagnostics {
|
|
497
|
+
bridge?: CloudVoicePhoneBridgeHealth;
|
|
498
|
+
registrations?: Record<string, unknown>;
|
|
499
|
+
diagnostics?: Record<string, unknown>;
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
export interface CloudVoicePhoneNumberRecord {
|
|
503
|
+
id: string;
|
|
504
|
+
projectId: string;
|
|
505
|
+
connectionId: string | null;
|
|
506
|
+
provider: "twilio" | string;
|
|
507
|
+
phoneNumber: string;
|
|
508
|
+
label: string | null;
|
|
509
|
+
providerNumberId: string | null;
|
|
510
|
+
inboundEnabled: boolean;
|
|
511
|
+
outboundEnabled: boolean;
|
|
512
|
+
inboundAgentId: string | null;
|
|
513
|
+
inboundAgentSlug: string | null;
|
|
514
|
+
inboundFlowId: string | null;
|
|
515
|
+
inboundFlowSlug: string | null;
|
|
516
|
+
allocationMode: "exclusive" | "shared_outbound" | "shared_inbound" | "shared_both" | string;
|
|
517
|
+
maxProjects: number;
|
|
518
|
+
priceTier: string;
|
|
519
|
+
capabilities: Record<string, unknown>;
|
|
520
|
+
status: string;
|
|
521
|
+
metadata: Record<string, unknown>;
|
|
522
|
+
assignments?: CloudVoicePhoneNumberProjectAssignmentRecord[];
|
|
523
|
+
createdAt: string | Date;
|
|
524
|
+
updatedAt: string | Date;
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
export interface CloudVoicePhoneNumberProjectAssignmentRecord {
|
|
528
|
+
id: string;
|
|
529
|
+
phoneNumberId: string;
|
|
530
|
+
projectId: string;
|
|
531
|
+
status: string;
|
|
532
|
+
direction: "inbound" | "outbound" | "both" | string;
|
|
533
|
+
maxProjects: number;
|
|
534
|
+
priceTier: string;
|
|
535
|
+
inboundAgentId: string | null;
|
|
536
|
+
inboundAgentSlug: string | null;
|
|
537
|
+
inboundFlowId: string | null;
|
|
538
|
+
inboundFlowSlug: string | null;
|
|
539
|
+
routingMetadata: Record<string, unknown>;
|
|
540
|
+
createdAt: string | Date;
|
|
541
|
+
updatedAt: string | Date;
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
export interface CreateCloudVoicePhoneConnectionInput {
|
|
545
|
+
provider?: string;
|
|
546
|
+
name?: string;
|
|
547
|
+
accountSid?: string | null;
|
|
548
|
+
authToken?: string | null;
|
|
549
|
+
status?: string;
|
|
550
|
+
metadata?: Record<string, unknown>;
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
export interface CreateCloudVoicePhoneNumberInput {
|
|
554
|
+
connectionId?: string | null;
|
|
555
|
+
phoneNumber: string;
|
|
556
|
+
label?: string | null;
|
|
557
|
+
providerNumberId?: string | null;
|
|
558
|
+
inboundEnabled?: boolean;
|
|
559
|
+
outboundEnabled?: boolean;
|
|
560
|
+
inboundAgentSlug?: string | null;
|
|
561
|
+
agentSlug?: string | null;
|
|
562
|
+
inboundFlowSlug?: string | null;
|
|
563
|
+
flowSlug?: string | null;
|
|
564
|
+
allocationMode?: "exclusive" | "shared_outbound" | "shared_inbound" | "shared_both" | string;
|
|
565
|
+
maxProjects?: number;
|
|
566
|
+
priceTier?: string;
|
|
567
|
+
capabilities?: Record<string, unknown>;
|
|
568
|
+
metadata?: Record<string, unknown>;
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
export interface UpdateCloudVoicePhoneNumberInput extends Partial<CreateCloudVoicePhoneNumberInput> {
|
|
572
|
+
id: string;
|
|
573
|
+
status?: string;
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
export interface CloudVoiceCallLegRecord {
|
|
577
|
+
id: string;
|
|
578
|
+
projectId: string;
|
|
579
|
+
sessionId: string | null;
|
|
580
|
+
connectionId: string | null;
|
|
581
|
+
phoneNumberId: string | null;
|
|
582
|
+
provider: "twilio" | string;
|
|
583
|
+
providerCallId: string | null;
|
|
584
|
+
direction: "inbound" | "outbound" | string;
|
|
585
|
+
fromNumber: string;
|
|
586
|
+
toNumber: string;
|
|
587
|
+
status: string;
|
|
588
|
+
metadata: Record<string, unknown>;
|
|
589
|
+
startedAt: string | Date;
|
|
590
|
+
answeredAt: string | Date | null;
|
|
591
|
+
endedAt: string | Date | null;
|
|
592
|
+
createdAt: string | Date;
|
|
593
|
+
updatedAt: string | Date;
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
export interface CloudVoiceLiveCallTranscriptMessage {
|
|
597
|
+
id: string;
|
|
598
|
+
who: "agent" | "caller" | "manager" | "system";
|
|
599
|
+
text: string;
|
|
600
|
+
t: string;
|
|
601
|
+
tool?: string | null;
|
|
602
|
+
eventType: string;
|
|
603
|
+
createdAt: string | Date;
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
export interface CloudVoiceCallJudgeResult {
|
|
607
|
+
id: string;
|
|
608
|
+
judgeId: string;
|
|
609
|
+
judgeName: string;
|
|
610
|
+
outputType: string;
|
|
611
|
+
resultValue: string | null;
|
|
612
|
+
resultNumeric: number | null;
|
|
613
|
+
resultTags: unknown;
|
|
614
|
+
status: string;
|
|
615
|
+
errorMessage: string | null;
|
|
616
|
+
createdAt: string | Date;
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
export type CloudVoiceHandoffMode = "browser" | "carrier";
|
|
620
|
+
export type CloudVoiceHandoffStatus = "requested" | "briefing" | "listening" | "accepted" | "active" | "returned_to_ai" | "completed" | "cancelled" | "failed";
|
|
621
|
+
export type CloudVoiceHandoffAction = "listen" | "takeover" | "return_to_ai" | "cancel" | "carrier_transfer";
|
|
622
|
+
|
|
623
|
+
export interface CloudVoiceHandoffRecord {
|
|
624
|
+
id: string;
|
|
625
|
+
projectId: string;
|
|
626
|
+
sessionId: string;
|
|
627
|
+
callLegId: string | null;
|
|
628
|
+
mode: CloudVoiceHandoffMode | string;
|
|
629
|
+
status: CloudVoiceHandoffStatus | string;
|
|
630
|
+
destinationId: string | null;
|
|
631
|
+
requestedBy: string;
|
|
632
|
+
acceptedBy: string | null;
|
|
633
|
+
summary: string | null;
|
|
634
|
+
errorMessage: string | null;
|
|
635
|
+
metadata: Record<string, unknown>;
|
|
636
|
+
startedAt: string | Date;
|
|
637
|
+
acceptedAt: string | Date | null;
|
|
638
|
+
endedAt: string | Date | null;
|
|
639
|
+
createdAt: string | Date;
|
|
640
|
+
updatedAt: string | Date;
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
export interface CloudVoiceLiveCallHandoffState {
|
|
644
|
+
current: CloudVoiceHandoffRecord | null;
|
|
645
|
+
status: CloudVoiceHandoffStatus | "none" | string;
|
|
646
|
+
mode: CloudVoiceHandoffMode | null | string;
|
|
647
|
+
summaryPreview: string | null;
|
|
648
|
+
activeManagerCount: number;
|
|
649
|
+
availableActions: CloudVoiceHandoffAction[];
|
|
650
|
+
recordingStatus: string;
|
|
651
|
+
recordingAssetCount: number;
|
|
652
|
+
transcriptStatus: string;
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
export type CloudVoiceRecordingAssetKind = "mixed" | "user_input" | "assistant_output" | "manager_input";
|
|
656
|
+
|
|
657
|
+
export interface CloudVoiceRecordingAsset {
|
|
658
|
+
id: string;
|
|
659
|
+
kind: CloudVoiceRecordingAssetKind | string;
|
|
660
|
+
mimeType: string;
|
|
661
|
+
byteSize: number;
|
|
662
|
+
durationMs?: number | null;
|
|
663
|
+
sampleRate?: number | null;
|
|
664
|
+
channels?: number | null;
|
|
665
|
+
checksum?: string | null;
|
|
666
|
+
storageKey: string;
|
|
667
|
+
metadata?: Record<string, unknown>;
|
|
668
|
+
playbackUrl?: string | null;
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
export interface CreateCloudVoiceHandoffInput {
|
|
672
|
+
mode?: CloudVoiceHandoffMode;
|
|
673
|
+
destinationId?: string | null;
|
|
674
|
+
requestedBy?: string;
|
|
675
|
+
managerId?: string;
|
|
676
|
+
reason?: string;
|
|
677
|
+
metadata?: Record<string, unknown>;
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
export interface AcceptCloudVoiceHandoffInput {
|
|
681
|
+
managerId?: string;
|
|
682
|
+
announce?: boolean;
|
|
683
|
+
metadata?: Record<string, unknown>;
|
|
684
|
+
}
|
|
685
|
+
|
|
686
|
+
export interface CancelCloudVoiceHandoffInput {
|
|
687
|
+
reason?: string;
|
|
688
|
+
returnToAi?: boolean;
|
|
689
|
+
metadata?: Record<string, unknown>;
|
|
690
|
+
}
|
|
691
|
+
|
|
692
|
+
export interface CloudVoiceListenTokenResult {
|
|
693
|
+
token: string;
|
|
694
|
+
expiresAt: string;
|
|
695
|
+
wsUrl: string;
|
|
696
|
+
sessionId: string;
|
|
697
|
+
callLegId: string | null;
|
|
698
|
+
scopes: Array<"listen" | "takeover">;
|
|
699
|
+
}
|
|
700
|
+
|
|
701
|
+
export interface CloudVoiceLiveCallRecord {
|
|
702
|
+
id: string;
|
|
703
|
+
callLegId: string;
|
|
704
|
+
sessionId: string | null;
|
|
705
|
+
sessionPublicId: string | null;
|
|
706
|
+
projectId: string;
|
|
707
|
+
agentId: string | null;
|
|
708
|
+
agentSlug: string | null;
|
|
709
|
+
agentName: string;
|
|
710
|
+
callerNumber: string;
|
|
711
|
+
callerName: string | null;
|
|
712
|
+
fromNumber: string;
|
|
713
|
+
toNumber: string;
|
|
714
|
+
direction: string;
|
|
715
|
+
provider: string;
|
|
716
|
+
providerCallId: string | null;
|
|
717
|
+
status: string;
|
|
718
|
+
sessionStatus: string | null;
|
|
719
|
+
outcomeStatus: string | null;
|
|
720
|
+
outcomeReason: string | null;
|
|
721
|
+
outcomeConfidence: number | null;
|
|
722
|
+
stateLabel: string;
|
|
723
|
+
startedAt: string | Date;
|
|
724
|
+
answeredAt: string | Date | null;
|
|
725
|
+
endedAt: string | Date | null;
|
|
726
|
+
durationSeconds: number;
|
|
727
|
+
costCents: number | null;
|
|
728
|
+
costUsd: number | null;
|
|
729
|
+
sentiment: number | null;
|
|
730
|
+
latestEventType: string | null;
|
|
731
|
+
latestMessage: string | null;
|
|
732
|
+
latestEventAt: string | Date | null;
|
|
733
|
+
audioActive: boolean;
|
|
734
|
+
parameters?: CloudVoiceParameterValueMap;
|
|
735
|
+
metadata: Record<string, unknown>;
|
|
736
|
+
transcript: CloudVoiceLiveCallTranscriptMessage[];
|
|
737
|
+
judgeResults: CloudVoiceCallJudgeResult[];
|
|
738
|
+
handoff: CloudVoiceLiveCallHandoffState;
|
|
739
|
+
}
|
|
740
|
+
|
|
741
|
+
export interface CloudVoiceCallOutcome {
|
|
742
|
+
status: string;
|
|
743
|
+
reason: string | null;
|
|
744
|
+
confidence: number | null;
|
|
745
|
+
}
|
|
746
|
+
|
|
747
|
+
export type CloudVoiceCallOutcomeSource = "determiner" | "derived";
|
|
748
|
+
|
|
749
|
+
export interface CloudVoiceCallWaitResult {
|
|
750
|
+
call: CloudVoiceLiveCallRecord;
|
|
751
|
+
status: string;
|
|
752
|
+
outcome: CloudVoiceCallOutcome;
|
|
753
|
+
outcomeSource: CloudVoiceCallOutcomeSource;
|
|
754
|
+
}
|
|
755
|
+
|
|
756
|
+
export interface CloudVoiceCallStatusChange {
|
|
757
|
+
call: CloudVoiceLiveCallRecord;
|
|
758
|
+
status: string;
|
|
759
|
+
previousStatus?: string;
|
|
760
|
+
sessionStatus: string | null;
|
|
761
|
+
stateLabel: string;
|
|
762
|
+
latestEventType: string | null;
|
|
763
|
+
outcomeStatus: string | null;
|
|
764
|
+
}
|
|
765
|
+
|
|
766
|
+
export interface CloudVoiceCallWaitOptions {
|
|
767
|
+
intervalMs?: number;
|
|
768
|
+
timeoutMs?: number;
|
|
769
|
+
onStatusChange?: (event: CloudVoiceCallStatusChange) => void;
|
|
770
|
+
onEvent?: (event: CloudVoiceCallStatusChange) => void;
|
|
771
|
+
}
|
|
772
|
+
|
|
773
|
+
export interface CloudVoicePhoneBridgeHealth {
|
|
774
|
+
enabled: boolean;
|
|
775
|
+
online: boolean;
|
|
776
|
+
status: "online" | "offline" | "unknown";
|
|
777
|
+
checkedAt: string;
|
|
778
|
+
port: number;
|
|
779
|
+
internalUrl: string;
|
|
780
|
+
publicBaseUrl: string | null;
|
|
781
|
+
mediaPath: string;
|
|
782
|
+
error?: string;
|
|
783
|
+
details?: Record<string, unknown>;
|
|
784
|
+
}
|
|
785
|
+
|
|
786
|
+
export interface CreateCloudVoiceOutboundCallInput {
|
|
787
|
+
agentSlug?: string;
|
|
788
|
+
agent?: string;
|
|
789
|
+
fromNumberId: string;
|
|
790
|
+
to: string;
|
|
791
|
+
userId?: string;
|
|
792
|
+
parameters?: CloudVoiceParameterValueMap;
|
|
793
|
+
metadata?: Record<string, unknown>;
|
|
794
|
+
simulate?: boolean;
|
|
795
|
+
}
|
|
796
|
+
|
|
797
|
+
export interface CloudVoiceClientToolManifest {
|
|
798
|
+
id: string;
|
|
799
|
+
name?: string;
|
|
800
|
+
description?: string;
|
|
801
|
+
inputSchema?: Record<string, unknown>;
|
|
802
|
+
}
|
|
803
|
+
|
|
804
|
+
export type CloudVoiceClientToolState = "input-available" | "output-available" | "error";
|
|
805
|
+
|
|
806
|
+
export interface CloudVoiceClientToolRenderContext<TInput = unknown, TOutput = unknown> {
|
|
807
|
+
toolName: string;
|
|
808
|
+
toolCallId: string;
|
|
809
|
+
input?: TInput;
|
|
810
|
+
output?: TOutput;
|
|
811
|
+
error?: string;
|
|
812
|
+
state: CloudVoiceClientToolState;
|
|
813
|
+
}
|
|
814
|
+
|
|
815
|
+
export interface CloudVoiceClientToolExecuteContext {
|
|
816
|
+
toolName: string;
|
|
817
|
+
toolCallId: string;
|
|
818
|
+
callId?: string;
|
|
819
|
+
sessionId?: string;
|
|
820
|
+
}
|
|
821
|
+
|
|
822
|
+
export type CloudVoiceClientToolRenderer<TInput = unknown, TOutput = unknown> = (
|
|
823
|
+
context: CloudVoiceClientToolRenderContext<TInput, TOutput>,
|
|
824
|
+
) => unknown;
|
|
825
|
+
|
|
826
|
+
export interface CloudVoiceClientToolDefinition<TInput = unknown, TOutput = unknown> {
|
|
827
|
+
name?: string;
|
|
828
|
+
description?: string;
|
|
829
|
+
inputSchema?: Record<string, unknown>;
|
|
830
|
+
execute?: (
|
|
831
|
+
input: TInput,
|
|
832
|
+
context: CloudVoiceClientToolExecuteContext,
|
|
833
|
+
) => Promise<TOutput> | TOutput;
|
|
834
|
+
render?: CloudVoiceClientToolRenderer<TInput, TOutput>;
|
|
835
|
+
}
|
|
836
|
+
|
|
837
|
+
export type CloudVoiceClientTool<TInput = unknown, TOutput = unknown> =
|
|
838
|
+
| CloudVoiceClientToolDefinition<TInput, TOutput>
|
|
839
|
+
| CloudVoiceClientToolRenderer<TInput, TOutput>;
|
|
840
|
+
|
|
841
|
+
export type CloudVoiceClientTools = Record<string, CloudVoiceClientTool>;
|
|
842
|
+
|
|
843
|
+
export interface CloudVoiceSessionEventRecord {
|
|
844
|
+
id: string;
|
|
845
|
+
sessionId: string;
|
|
846
|
+
projectId: string;
|
|
847
|
+
sequence: number;
|
|
848
|
+
eventType: string;
|
|
849
|
+
role: string | null;
|
|
850
|
+
message: string | null;
|
|
851
|
+
payload: Record<string, unknown>;
|
|
852
|
+
createdAt: string | Date;
|
|
853
|
+
}
|
|
854
|
+
|
|
855
|
+
export interface CloudVoiceSessionBootstrap {
|
|
856
|
+
sessionId?: string;
|
|
857
|
+
callId?: string;
|
|
858
|
+
transport?: {
|
|
859
|
+
type: "webrtc" | "websocket";
|
|
860
|
+
url: string;
|
|
861
|
+
sessionId?: string;
|
|
862
|
+
callId?: string;
|
|
863
|
+
headers?: Record<string, string>;
|
|
864
|
+
provider?: string;
|
|
865
|
+
};
|
|
866
|
+
session: CloudVoiceSessionRecord;
|
|
867
|
+
prepare: Record<string, unknown>;
|
|
868
|
+
credentials: {
|
|
869
|
+
value: string;
|
|
870
|
+
kind?: string;
|
|
871
|
+
raw?: unknown;
|
|
872
|
+
};
|
|
873
|
+
endpoints: {
|
|
874
|
+
events: string;
|
|
875
|
+
stream: string;
|
|
876
|
+
cancel: string;
|
|
877
|
+
toolBase: string;
|
|
878
|
+
};
|
|
879
|
+
}
|
|
880
|
+
|
|
881
|
+
export interface CloudVoiceEmbedConfig {
|
|
882
|
+
agent: {
|
|
883
|
+
id: string;
|
|
884
|
+
slug: string;
|
|
885
|
+
name: string;
|
|
886
|
+
description: string | null;
|
|
887
|
+
publishedVersion: number | null;
|
|
888
|
+
widget: Record<string, unknown>;
|
|
889
|
+
};
|
|
890
|
+
theme: Record<string, unknown>;
|
|
891
|
+
}
|
|
892
|
+
|
|
893
|
+
export interface CloudVoiceEmbedOptions {
|
|
894
|
+
baseUrl: string;
|
|
895
|
+
publicKey: string;
|
|
896
|
+
agent: string;
|
|
897
|
+
userId?: string;
|
|
898
|
+
parameters?: CloudVoiceParameterValueMap;
|
|
899
|
+
target?: HTMLElement | string;
|
|
900
|
+
tools?: CloudVoiceClientTools;
|
|
901
|
+
toolTarget?: HTMLElement | string;
|
|
902
|
+
onToolState?: (state: CloudVoiceClientToolRenderContext) => void;
|
|
903
|
+
style?: {
|
|
904
|
+
theme?: "default" | "minimal" | "solid" | "glass";
|
|
905
|
+
accentColor?: string;
|
|
906
|
+
backgroundColor?: string;
|
|
907
|
+
surfaceColor?: string;
|
|
908
|
+
textColor?: string;
|
|
909
|
+
mutedColor?: string;
|
|
910
|
+
width?: string;
|
|
911
|
+
padding?: string;
|
|
912
|
+
gap?: string;
|
|
913
|
+
radius?: string;
|
|
914
|
+
panelRadius?: string;
|
|
915
|
+
buttonRadius?: string;
|
|
916
|
+
orbSize?: string;
|
|
917
|
+
shadow?: "none" | "soft" | "strong";
|
|
918
|
+
align?: "center" | "bottom" | "top";
|
|
919
|
+
density?: "compact" | "comfortable";
|
|
920
|
+
};
|
|
921
|
+
iframe?: {
|
|
922
|
+
width?: string;
|
|
923
|
+
height?: string;
|
|
924
|
+
title?: string;
|
|
925
|
+
style?: Partial<CSSStyleDeclaration> | Record<string, string>;
|
|
926
|
+
};
|
|
927
|
+
}
|