retell-sdk 6.0.1 → 6.1.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/CHANGELOG.md +12 -0
- package/client.d.mts +2 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +2 -2
- package/client.d.ts.map +1 -1
- package/client.js.map +1 -1
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/agent.d.mts +3222 -526
- package/resources/agent.d.mts.map +1 -1
- package/resources/agent.d.ts +3222 -526
- package/resources/agent.d.ts.map +1 -1
- package/resources/app.d.mts +122 -5
- package/resources/app.d.mts.map +1 -1
- package/resources/app.d.ts +122 -5
- package/resources/app.d.ts.map +1 -1
- package/resources/app.js +17 -1
- package/resources/app.js.map +1 -1
- package/resources/app.mjs +17 -1
- package/resources/app.mjs.map +1 -1
- package/resources/batch-call.d.mts +912 -13
- package/resources/batch-call.d.mts.map +1 -1
- package/resources/batch-call.d.ts +912 -13
- package/resources/batch-call.d.ts.map +1 -1
- package/resources/call.d.mts +7843 -3792
- package/resources/call.d.mts.map +1 -1
- package/resources/call.d.ts +7843 -3792
- package/resources/call.d.ts.map +1 -1
- package/resources/call.js +1 -1
- package/resources/call.mjs +1 -1
- package/resources/chat-agent.d.mts +3125 -453
- package/resources/chat-agent.d.mts.map +1 -1
- package/resources/chat-agent.d.ts +3125 -453
- package/resources/chat-agent.d.ts.map +1 -1
- package/resources/chat.d.mts +892 -26
- package/resources/chat.d.mts.map +1 -1
- package/resources/chat.d.ts +892 -26
- package/resources/chat.d.ts.map +1 -1
- package/resources/contact.d.mts +162 -20
- package/resources/contact.d.mts.map +1 -1
- package/resources/contact.d.ts +162 -20
- package/resources/contact.d.ts.map +1 -1
- package/resources/contact.js +98 -4
- package/resources/contact.js.map +1 -1
- package/resources/contact.mjs +98 -4
- package/resources/contact.mjs.map +1 -1
- package/resources/conversation-flow-component.d.mts +3282 -243
- package/resources/conversation-flow-component.d.mts.map +1 -1
- package/resources/conversation-flow-component.d.ts +3282 -243
- package/resources/conversation-flow-component.d.ts.map +1 -1
- package/resources/conversation-flow.d.mts +7347 -1269
- package/resources/conversation-flow.d.mts.map +1 -1
- package/resources/conversation-flow.d.ts +7347 -1269
- package/resources/conversation-flow.d.ts.map +1 -1
- package/resources/crm.d.mts +37 -5
- package/resources/crm.d.mts.map +1 -1
- package/resources/crm.d.ts +37 -5
- package/resources/crm.d.ts.map +1 -1
- package/resources/identity.d.mts +4 -0
- package/resources/identity.d.mts.map +1 -1
- package/resources/identity.d.ts +4 -0
- package/resources/identity.d.ts.map +1 -1
- package/resources/index.d.mts +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/llm.d.mts +867 -9
- package/resources/llm.d.mts.map +1 -1
- package/resources/llm.d.ts +867 -9
- package/resources/llm.d.ts.map +1 -1
- package/resources/tests.d.mts +3 -3
- package/resources/tests.d.mts.map +1 -1
- package/resources/tests.d.ts +3 -3
- package/resources/tests.d.ts.map +1 -1
- package/src/client.ts +4 -0
- package/src/resources/agent.ts +4786 -1504
- package/src/resources/app.ts +144 -4
- package/src/resources/batch-call.ts +1115 -10
- package/src/resources/call.ts +9825 -4806
- package/src/resources/chat-agent.ts +3958 -698
- package/src/resources/chat.ts +1133 -50
- package/src/resources/contact.ts +168 -20
- package/src/resources/conversation-flow-component.ts +4466 -191
- package/src/resources/conversation-flow.ts +9084 -525
- package/src/resources/crm.ts +44 -5
- package/src/resources/identity.ts +5 -0
- package/src/resources/index.ts +2 -0
- package/src/resources/llm.ts +1045 -46
- package/src/resources/tests.ts +21 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/src/resources/chat.ts
CHANGED
|
@@ -237,6 +237,37 @@ export interface ChatResponse {
|
|
|
237
237
|
*/
|
|
238
238
|
metadata?: unknown;
|
|
239
239
|
|
|
240
|
+
/**
|
|
241
|
+
* Tool call invocations and results of integration tools run after post-chat
|
|
242
|
+
* analysis (post-session). Stored separately from the main transcript. Available
|
|
243
|
+
* after chat ends if post-session integration tools ran.
|
|
244
|
+
*/
|
|
245
|
+
post_session_message_with_tool_calls?: Array<
|
|
246
|
+
| ChatResponse.MessageBase
|
|
247
|
+
| ChatResponse.ToolCallInvocationMessageBase
|
|
248
|
+
| ChatResponse.ToolCallResultMessageBase
|
|
249
|
+
| ChatResponse.NodeTransitionMessageBase
|
|
250
|
+
| ChatResponse.StateTransitionMessageBase
|
|
251
|
+
| ChatResponse.InjectedMessageBase
|
|
252
|
+
| ChatResponse.SMSMessageBase
|
|
253
|
+
>;
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* Tool call invocations and results of integration tools run before the chat's
|
|
257
|
+
* first message (pre-session). Stored separately from the main transcript.
|
|
258
|
+
* Available once pre-session integration tools have run (from the chat's first
|
|
259
|
+
* turn).
|
|
260
|
+
*/
|
|
261
|
+
pre_session_message_with_tool_calls?: Array<
|
|
262
|
+
| ChatResponse.MessageBase
|
|
263
|
+
| ChatResponse.ToolCallInvocationMessageBase
|
|
264
|
+
| ChatResponse.ToolCallResultMessageBase
|
|
265
|
+
| ChatResponse.NodeTransitionMessageBase
|
|
266
|
+
| ChatResponse.StateTransitionMessageBase
|
|
267
|
+
| ChatResponse.InjectedMessageBase
|
|
268
|
+
| ChatResponse.SMSMessageBase
|
|
269
|
+
>;
|
|
270
|
+
|
|
240
271
|
/**
|
|
241
272
|
* Add optional dynamic variables in key value pairs of string that injects into
|
|
242
273
|
* your Response Engine prompt and tool description. Only applicable for Response
|
|
@@ -244,86 +275,1128 @@ export interface ChatResponse {
|
|
|
244
275
|
*/
|
|
245
276
|
retell_llm_dynamic_variables?: { [key: string]: string };
|
|
246
277
|
|
|
247
|
-
/**
|
|
248
|
-
*
|
|
249
|
-
*
|
|
250
|
-
|
|
251
|
-
|
|
278
|
+
/**
|
|
279
|
+
* Post-session integration tool call invocations and results, without PII.
|
|
280
|
+
* Available after chat ends if post-session integration tools ran and PII
|
|
281
|
+
* scrubbing is enabled.
|
|
282
|
+
*/
|
|
283
|
+
scrubbed_post_session_message_with_tool_calls?: Array<
|
|
284
|
+
| ChatResponse.MessageBase
|
|
285
|
+
| ChatResponse.ToolCallInvocationMessageBase
|
|
286
|
+
| ChatResponse.ToolCallResultMessageBase
|
|
287
|
+
| ChatResponse.NodeTransitionMessageBase
|
|
288
|
+
| ChatResponse.StateTransitionMessageBase
|
|
289
|
+
| ChatResponse.InjectedMessageBase
|
|
290
|
+
| ChatResponse.SMSMessageBase
|
|
291
|
+
>;
|
|
292
|
+
|
|
293
|
+
/**
|
|
294
|
+
* Pre-session integration tool call invocations and results, without PII.
|
|
295
|
+
* Available after chat ends if pre-session integration tools ran and PII scrubbing
|
|
296
|
+
* is enabled.
|
|
297
|
+
*/
|
|
298
|
+
scrubbed_pre_session_message_with_tool_calls?: Array<
|
|
299
|
+
| ChatResponse.MessageBase
|
|
300
|
+
| ChatResponse.ToolCallInvocationMessageBase
|
|
301
|
+
| ChatResponse.ToolCallResultMessageBase
|
|
302
|
+
| ChatResponse.NodeTransitionMessageBase
|
|
303
|
+
| ChatResponse.StateTransitionMessageBase
|
|
304
|
+
| ChatResponse.InjectedMessageBase
|
|
305
|
+
| ChatResponse.SMSMessageBase
|
|
306
|
+
>;
|
|
307
|
+
|
|
308
|
+
/**
|
|
309
|
+
* Begin timestamp (milliseconds since epoch) of the chat. Available after chat
|
|
310
|
+
* starts.
|
|
311
|
+
*/
|
|
312
|
+
start_timestamp?: number;
|
|
313
|
+
|
|
314
|
+
/**
|
|
315
|
+
* Transcription of the chat.
|
|
316
|
+
*/
|
|
317
|
+
transcript?: string;
|
|
318
|
+
|
|
319
|
+
/**
|
|
320
|
+
* The version of the agent
|
|
321
|
+
*/
|
|
322
|
+
version?: number | null;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
export namespace ChatResponse {
|
|
326
|
+
/**
|
|
327
|
+
* Post chat analysis that includes information such as sentiment, status, summary,
|
|
328
|
+
* and custom defined data to extract. Available after chat ends. Subscribe to
|
|
329
|
+
* `chat_analyzed` webhook event type to receive it once ready.
|
|
330
|
+
*/
|
|
331
|
+
export interface ChatAnalysis {
|
|
332
|
+
/**
|
|
333
|
+
* Whether the agent seems to have a successful chat with the user, where the agent
|
|
334
|
+
* finishes the task, and the call was complete without being cutoff.
|
|
335
|
+
*/
|
|
336
|
+
chat_successful?: boolean;
|
|
337
|
+
|
|
338
|
+
/**
|
|
339
|
+
* A high level summary of the chat.
|
|
340
|
+
*/
|
|
341
|
+
chat_summary?: string;
|
|
342
|
+
|
|
343
|
+
/**
|
|
344
|
+
* Custom analysis data that was extracted based on the schema defined in chat
|
|
345
|
+
* agent post chat analysis data. Can be empty if nothing is specified.
|
|
346
|
+
*/
|
|
347
|
+
custom_analysis_data?: unknown;
|
|
348
|
+
|
|
349
|
+
/**
|
|
350
|
+
* Sentiment of the user in the chat.
|
|
351
|
+
*/
|
|
352
|
+
user_sentiment?: 'Negative' | 'Positive' | 'Neutral' | 'Unknown';
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
export interface ChatCost {
|
|
356
|
+
/**
|
|
357
|
+
* Combined cost of all individual costs in cents
|
|
358
|
+
*/
|
|
359
|
+
combined_cost?: number;
|
|
360
|
+
|
|
361
|
+
/**
|
|
362
|
+
* List of products with their unit prices and costs in cents
|
|
363
|
+
*/
|
|
364
|
+
product_costs?: Array<ChatCost.ProductCost>;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
export namespace ChatCost {
|
|
368
|
+
export interface ProductCost {
|
|
369
|
+
/**
|
|
370
|
+
* Cost for the product in cents for the duration of the call.
|
|
371
|
+
*/
|
|
372
|
+
cost: number;
|
|
373
|
+
|
|
374
|
+
/**
|
|
375
|
+
* Product name that has a cost associated with it.
|
|
376
|
+
*/
|
|
377
|
+
product: string;
|
|
378
|
+
|
|
379
|
+
/**
|
|
380
|
+
* True if this cost item is for a transfer segment.
|
|
381
|
+
*/
|
|
382
|
+
is_transfer_leg_cost?: boolean;
|
|
383
|
+
|
|
384
|
+
/**
|
|
385
|
+
* Unit price of the product in cents per second.
|
|
386
|
+
*/
|
|
387
|
+
unit_price?: number;
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
export interface MessageBase {
|
|
392
|
+
/**
|
|
393
|
+
* Content of the message
|
|
394
|
+
*/
|
|
395
|
+
content: string;
|
|
396
|
+
|
|
397
|
+
/**
|
|
398
|
+
* Documents whether this message is sent by agent or user.
|
|
399
|
+
*/
|
|
400
|
+
role: 'agent' | 'user';
|
|
401
|
+
|
|
402
|
+
/**
|
|
403
|
+
* Create timestamp of the message
|
|
404
|
+
*/
|
|
405
|
+
created_timestamp?: number;
|
|
406
|
+
|
|
407
|
+
/**
|
|
408
|
+
* Unique id of the message
|
|
409
|
+
*/
|
|
410
|
+
message_id?: string;
|
|
411
|
+
|
|
412
|
+
/**
|
|
413
|
+
* Multimedia attachments received with this message (MMS). Display only; a textual
|
|
414
|
+
* summary of each attachment is already included in content. Response only —
|
|
415
|
+
* supplying it in a request has no effect and is silently ignored. Omitted from
|
|
416
|
+
* PII-scrubbed messages.
|
|
417
|
+
*/
|
|
418
|
+
multimedia?: Array<MessageBase.Multimedia>;
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
export namespace MessageBase {
|
|
422
|
+
export interface Multimedia {
|
|
423
|
+
/**
|
|
424
|
+
* URL of the multimedia attachment.
|
|
425
|
+
*/
|
|
426
|
+
url: string;
|
|
427
|
+
|
|
428
|
+
/**
|
|
429
|
+
* Optional textual summary of the attachment.
|
|
430
|
+
*/
|
|
431
|
+
summary?: string;
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
export interface ToolCallInvocationMessageBase {
|
|
436
|
+
/**
|
|
437
|
+
* Arguments for this tool call, it's a stringified JSON object.
|
|
438
|
+
*/
|
|
439
|
+
arguments: string;
|
|
440
|
+
|
|
441
|
+
/**
|
|
442
|
+
* Name of the function in this tool call.
|
|
443
|
+
*/
|
|
444
|
+
name: string;
|
|
445
|
+
|
|
446
|
+
/**
|
|
447
|
+
* This is a tool call invocation.
|
|
448
|
+
*/
|
|
449
|
+
role: 'tool_call_invocation';
|
|
450
|
+
|
|
451
|
+
/**
|
|
452
|
+
* Tool call id, globally unique.
|
|
453
|
+
*/
|
|
454
|
+
tool_call_id: string;
|
|
455
|
+
|
|
456
|
+
/**
|
|
457
|
+
* Create timestamp of the message
|
|
458
|
+
*/
|
|
459
|
+
created_timestamp?: number;
|
|
460
|
+
|
|
461
|
+
/**
|
|
462
|
+
* Unique id of the message
|
|
463
|
+
*/
|
|
464
|
+
message_id?: string;
|
|
465
|
+
|
|
466
|
+
/**
|
|
467
|
+
* Optional thought signature from Google Gemini thinking models. This is used
|
|
468
|
+
* internally to maintain reasoning chain in multi-turn function calling.
|
|
469
|
+
*/
|
|
470
|
+
thought_signature?: string;
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
export interface ToolCallResultMessageBase {
|
|
474
|
+
/**
|
|
475
|
+
* Result of the tool call, can be a string, a stringified json, etc.
|
|
476
|
+
*/
|
|
477
|
+
content: string;
|
|
478
|
+
|
|
479
|
+
/**
|
|
480
|
+
* This is the result of a tool call.
|
|
481
|
+
*/
|
|
482
|
+
role: 'tool_call_result';
|
|
483
|
+
|
|
484
|
+
/**
|
|
485
|
+
* Tool call id, globally unique.
|
|
486
|
+
*/
|
|
487
|
+
tool_call_id: string;
|
|
488
|
+
|
|
489
|
+
/**
|
|
490
|
+
* Create timestamp of the message
|
|
491
|
+
*/
|
|
492
|
+
created_timestamp?: number;
|
|
493
|
+
|
|
494
|
+
/**
|
|
495
|
+
* Unique id of the message
|
|
496
|
+
*/
|
|
497
|
+
message_id?: string;
|
|
498
|
+
|
|
499
|
+
/**
|
|
500
|
+
* Whether the tool call was successful.
|
|
501
|
+
*/
|
|
502
|
+
successful?: boolean;
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
export interface NodeTransitionMessageBase {
|
|
506
|
+
/**
|
|
507
|
+
* This is a node transition.
|
|
508
|
+
*/
|
|
509
|
+
role: 'node_transition';
|
|
510
|
+
|
|
511
|
+
/**
|
|
512
|
+
* Create timestamp of the message
|
|
513
|
+
*/
|
|
514
|
+
created_timestamp?: number;
|
|
515
|
+
|
|
516
|
+
/**
|
|
517
|
+
* Former node id
|
|
518
|
+
*/
|
|
519
|
+
former_node_id?: string;
|
|
520
|
+
|
|
521
|
+
/**
|
|
522
|
+
* Former node name
|
|
523
|
+
*/
|
|
524
|
+
former_node_name?: string;
|
|
525
|
+
|
|
526
|
+
/**
|
|
527
|
+
* Unique id of the message
|
|
528
|
+
*/
|
|
529
|
+
message_id?: string;
|
|
530
|
+
|
|
531
|
+
/**
|
|
532
|
+
* New node id
|
|
533
|
+
*/
|
|
534
|
+
new_node_id?: string;
|
|
535
|
+
|
|
536
|
+
/**
|
|
537
|
+
* New node name
|
|
538
|
+
*/
|
|
539
|
+
new_node_name?: string;
|
|
540
|
+
|
|
541
|
+
/**
|
|
542
|
+
* How this node was reached. "global" means a global node transition,
|
|
543
|
+
* "global_go_back" means returning from a global node, "interrupt_go_back" means
|
|
544
|
+
* going back due to user interruption, and "normal" means a regular edge
|
|
545
|
+
* transition.
|
|
546
|
+
*/
|
|
547
|
+
transition_type?: 'global' | 'global_go_back' | 'interrupt_go_back' | 'normal';
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
export interface StateTransitionMessageBase {
|
|
551
|
+
/**
|
|
552
|
+
* This is a state transition.
|
|
553
|
+
*/
|
|
554
|
+
role: 'state_transition';
|
|
555
|
+
|
|
556
|
+
/**
|
|
557
|
+
* Create timestamp of the message
|
|
558
|
+
*/
|
|
559
|
+
created_timestamp?: number;
|
|
560
|
+
|
|
561
|
+
/**
|
|
562
|
+
* Former state name
|
|
563
|
+
*/
|
|
564
|
+
former_state_name?: string;
|
|
565
|
+
|
|
566
|
+
/**
|
|
567
|
+
* Unique id of the message
|
|
568
|
+
*/
|
|
569
|
+
message_id?: string;
|
|
570
|
+
|
|
571
|
+
/**
|
|
572
|
+
* New state name
|
|
573
|
+
*/
|
|
574
|
+
new_state_name?: string;
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
export interface InjectedMessageBase {
|
|
578
|
+
/**
|
|
579
|
+
* The injected context text.
|
|
580
|
+
*/
|
|
581
|
+
content: string;
|
|
582
|
+
|
|
583
|
+
/**
|
|
584
|
+
* External context injected into the conversation via the update-live-call API.
|
|
585
|
+
* Not spoken by either party.
|
|
586
|
+
*/
|
|
587
|
+
role: 'injected';
|
|
588
|
+
|
|
589
|
+
/**
|
|
590
|
+
* Create timestamp of the message
|
|
591
|
+
*/
|
|
592
|
+
created_timestamp?: number;
|
|
593
|
+
|
|
594
|
+
/**
|
|
595
|
+
* Unique id of the message
|
|
596
|
+
*/
|
|
597
|
+
message_id?: string;
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
export interface SMSMessageBase {
|
|
601
|
+
/**
|
|
602
|
+
* Text content of the SMS message.
|
|
603
|
+
*/
|
|
604
|
+
content: string;
|
|
605
|
+
|
|
606
|
+
/**
|
|
607
|
+
* SMS message exchanged during the call (for example received from the user).
|
|
608
|
+
* Woven into the transcript and shown to the agent, but not part of the spoken
|
|
609
|
+
* conversation.
|
|
610
|
+
*/
|
|
611
|
+
role: 'sms';
|
|
612
|
+
|
|
613
|
+
/**
|
|
614
|
+
* Create timestamp of the message
|
|
615
|
+
*/
|
|
616
|
+
created_timestamp?: number;
|
|
617
|
+
|
|
618
|
+
/**
|
|
619
|
+
* Unique id of the message
|
|
620
|
+
*/
|
|
621
|
+
message_id?: string;
|
|
622
|
+
|
|
623
|
+
/**
|
|
624
|
+
* Multimedia attachments (MMS). Display only; not relayed into the spoken
|
|
625
|
+
* conversation.
|
|
626
|
+
*/
|
|
627
|
+
multimedia?: Array<SMSMessageBase.Multimedia>;
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
export namespace SMSMessageBase {
|
|
631
|
+
export interface Multimedia {
|
|
632
|
+
/**
|
|
633
|
+
* URL of the multimedia attachment.
|
|
634
|
+
*/
|
|
635
|
+
url: string;
|
|
636
|
+
|
|
637
|
+
/**
|
|
638
|
+
* Optional textual summary of the attachment.
|
|
639
|
+
*/
|
|
640
|
+
summary?: string;
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
|
|
644
|
+
export interface MessageBase {
|
|
645
|
+
/**
|
|
646
|
+
* Content of the message
|
|
647
|
+
*/
|
|
648
|
+
content: string;
|
|
649
|
+
|
|
650
|
+
/**
|
|
651
|
+
* Documents whether this message is sent by agent or user.
|
|
652
|
+
*/
|
|
653
|
+
role: 'agent' | 'user';
|
|
654
|
+
|
|
655
|
+
/**
|
|
656
|
+
* Create timestamp of the message
|
|
657
|
+
*/
|
|
658
|
+
created_timestamp?: number;
|
|
659
|
+
|
|
660
|
+
/**
|
|
661
|
+
* Unique id of the message
|
|
662
|
+
*/
|
|
663
|
+
message_id?: string;
|
|
664
|
+
|
|
665
|
+
/**
|
|
666
|
+
* Multimedia attachments received with this message (MMS). Display only; a textual
|
|
667
|
+
* summary of each attachment is already included in content. Response only —
|
|
668
|
+
* supplying it in a request has no effect and is silently ignored. Omitted from
|
|
669
|
+
* PII-scrubbed messages.
|
|
670
|
+
*/
|
|
671
|
+
multimedia?: Array<MessageBase.Multimedia>;
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
export namespace MessageBase {
|
|
675
|
+
export interface Multimedia {
|
|
676
|
+
/**
|
|
677
|
+
* URL of the multimedia attachment.
|
|
678
|
+
*/
|
|
679
|
+
url: string;
|
|
680
|
+
|
|
681
|
+
/**
|
|
682
|
+
* Optional textual summary of the attachment.
|
|
683
|
+
*/
|
|
684
|
+
summary?: string;
|
|
685
|
+
}
|
|
686
|
+
}
|
|
687
|
+
|
|
688
|
+
export interface ToolCallInvocationMessageBase {
|
|
689
|
+
/**
|
|
690
|
+
* Arguments for this tool call, it's a stringified JSON object.
|
|
691
|
+
*/
|
|
692
|
+
arguments: string;
|
|
693
|
+
|
|
694
|
+
/**
|
|
695
|
+
* Name of the function in this tool call.
|
|
696
|
+
*/
|
|
697
|
+
name: string;
|
|
698
|
+
|
|
699
|
+
/**
|
|
700
|
+
* This is a tool call invocation.
|
|
701
|
+
*/
|
|
702
|
+
role: 'tool_call_invocation';
|
|
703
|
+
|
|
704
|
+
/**
|
|
705
|
+
* Tool call id, globally unique.
|
|
706
|
+
*/
|
|
707
|
+
tool_call_id: string;
|
|
708
|
+
|
|
709
|
+
/**
|
|
710
|
+
* Create timestamp of the message
|
|
711
|
+
*/
|
|
712
|
+
created_timestamp?: number;
|
|
713
|
+
|
|
714
|
+
/**
|
|
715
|
+
* Unique id of the message
|
|
716
|
+
*/
|
|
717
|
+
message_id?: string;
|
|
718
|
+
|
|
719
|
+
/**
|
|
720
|
+
* Optional thought signature from Google Gemini thinking models. This is used
|
|
721
|
+
* internally to maintain reasoning chain in multi-turn function calling.
|
|
722
|
+
*/
|
|
723
|
+
thought_signature?: string;
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
export interface ToolCallResultMessageBase {
|
|
727
|
+
/**
|
|
728
|
+
* Result of the tool call, can be a string, a stringified json, etc.
|
|
729
|
+
*/
|
|
730
|
+
content: string;
|
|
731
|
+
|
|
732
|
+
/**
|
|
733
|
+
* This is the result of a tool call.
|
|
734
|
+
*/
|
|
735
|
+
role: 'tool_call_result';
|
|
736
|
+
|
|
737
|
+
/**
|
|
738
|
+
* Tool call id, globally unique.
|
|
739
|
+
*/
|
|
740
|
+
tool_call_id: string;
|
|
741
|
+
|
|
742
|
+
/**
|
|
743
|
+
* Create timestamp of the message
|
|
744
|
+
*/
|
|
745
|
+
created_timestamp?: number;
|
|
746
|
+
|
|
747
|
+
/**
|
|
748
|
+
* Unique id of the message
|
|
749
|
+
*/
|
|
750
|
+
message_id?: string;
|
|
751
|
+
|
|
752
|
+
/**
|
|
753
|
+
* Whether the tool call was successful.
|
|
754
|
+
*/
|
|
755
|
+
successful?: boolean;
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
export interface NodeTransitionMessageBase {
|
|
759
|
+
/**
|
|
760
|
+
* This is a node transition.
|
|
761
|
+
*/
|
|
762
|
+
role: 'node_transition';
|
|
763
|
+
|
|
764
|
+
/**
|
|
765
|
+
* Create timestamp of the message
|
|
766
|
+
*/
|
|
767
|
+
created_timestamp?: number;
|
|
768
|
+
|
|
769
|
+
/**
|
|
770
|
+
* Former node id
|
|
771
|
+
*/
|
|
772
|
+
former_node_id?: string;
|
|
773
|
+
|
|
774
|
+
/**
|
|
775
|
+
* Former node name
|
|
776
|
+
*/
|
|
777
|
+
former_node_name?: string;
|
|
778
|
+
|
|
779
|
+
/**
|
|
780
|
+
* Unique id of the message
|
|
781
|
+
*/
|
|
782
|
+
message_id?: string;
|
|
783
|
+
|
|
784
|
+
/**
|
|
785
|
+
* New node id
|
|
786
|
+
*/
|
|
787
|
+
new_node_id?: string;
|
|
788
|
+
|
|
789
|
+
/**
|
|
790
|
+
* New node name
|
|
791
|
+
*/
|
|
792
|
+
new_node_name?: string;
|
|
793
|
+
|
|
794
|
+
/**
|
|
795
|
+
* How this node was reached. "global" means a global node transition,
|
|
796
|
+
* "global_go_back" means returning from a global node, "interrupt_go_back" means
|
|
797
|
+
* going back due to user interruption, and "normal" means a regular edge
|
|
798
|
+
* transition.
|
|
799
|
+
*/
|
|
800
|
+
transition_type?: 'global' | 'global_go_back' | 'interrupt_go_back' | 'normal';
|
|
801
|
+
}
|
|
802
|
+
|
|
803
|
+
export interface StateTransitionMessageBase {
|
|
804
|
+
/**
|
|
805
|
+
* This is a state transition.
|
|
806
|
+
*/
|
|
807
|
+
role: 'state_transition';
|
|
808
|
+
|
|
809
|
+
/**
|
|
810
|
+
* Create timestamp of the message
|
|
811
|
+
*/
|
|
812
|
+
created_timestamp?: number;
|
|
813
|
+
|
|
814
|
+
/**
|
|
815
|
+
* Former state name
|
|
816
|
+
*/
|
|
817
|
+
former_state_name?: string;
|
|
818
|
+
|
|
819
|
+
/**
|
|
820
|
+
* Unique id of the message
|
|
821
|
+
*/
|
|
822
|
+
message_id?: string;
|
|
823
|
+
|
|
824
|
+
/**
|
|
825
|
+
* New state name
|
|
826
|
+
*/
|
|
827
|
+
new_state_name?: string;
|
|
828
|
+
}
|
|
829
|
+
|
|
830
|
+
export interface InjectedMessageBase {
|
|
831
|
+
/**
|
|
832
|
+
* The injected context text.
|
|
833
|
+
*/
|
|
834
|
+
content: string;
|
|
835
|
+
|
|
836
|
+
/**
|
|
837
|
+
* External context injected into the conversation via the update-live-call API.
|
|
838
|
+
* Not spoken by either party.
|
|
839
|
+
*/
|
|
840
|
+
role: 'injected';
|
|
841
|
+
|
|
842
|
+
/**
|
|
843
|
+
* Create timestamp of the message
|
|
844
|
+
*/
|
|
845
|
+
created_timestamp?: number;
|
|
846
|
+
|
|
847
|
+
/**
|
|
848
|
+
* Unique id of the message
|
|
849
|
+
*/
|
|
850
|
+
message_id?: string;
|
|
851
|
+
}
|
|
852
|
+
|
|
853
|
+
export interface SMSMessageBase {
|
|
854
|
+
/**
|
|
855
|
+
* Text content of the SMS message.
|
|
856
|
+
*/
|
|
857
|
+
content: string;
|
|
858
|
+
|
|
859
|
+
/**
|
|
860
|
+
* SMS message exchanged during the call (for example received from the user).
|
|
861
|
+
* Woven into the transcript and shown to the agent, but not part of the spoken
|
|
862
|
+
* conversation.
|
|
863
|
+
*/
|
|
864
|
+
role: 'sms';
|
|
865
|
+
|
|
866
|
+
/**
|
|
867
|
+
* Create timestamp of the message
|
|
868
|
+
*/
|
|
869
|
+
created_timestamp?: number;
|
|
870
|
+
|
|
871
|
+
/**
|
|
872
|
+
* Unique id of the message
|
|
873
|
+
*/
|
|
874
|
+
message_id?: string;
|
|
875
|
+
|
|
876
|
+
/**
|
|
877
|
+
* Multimedia attachments (MMS). Display only; not relayed into the spoken
|
|
878
|
+
* conversation.
|
|
879
|
+
*/
|
|
880
|
+
multimedia?: Array<SMSMessageBase.Multimedia>;
|
|
881
|
+
}
|
|
882
|
+
|
|
883
|
+
export namespace SMSMessageBase {
|
|
884
|
+
export interface Multimedia {
|
|
885
|
+
/**
|
|
886
|
+
* URL of the multimedia attachment.
|
|
887
|
+
*/
|
|
888
|
+
url: string;
|
|
889
|
+
|
|
890
|
+
/**
|
|
891
|
+
* Optional textual summary of the attachment.
|
|
892
|
+
*/
|
|
893
|
+
summary?: string;
|
|
894
|
+
}
|
|
895
|
+
}
|
|
896
|
+
|
|
897
|
+
export interface MessageBase {
|
|
898
|
+
/**
|
|
899
|
+
* Content of the message
|
|
900
|
+
*/
|
|
901
|
+
content: string;
|
|
902
|
+
|
|
903
|
+
/**
|
|
904
|
+
* Documents whether this message is sent by agent or user.
|
|
905
|
+
*/
|
|
906
|
+
role: 'agent' | 'user';
|
|
907
|
+
|
|
908
|
+
/**
|
|
909
|
+
* Create timestamp of the message
|
|
910
|
+
*/
|
|
911
|
+
created_timestamp?: number;
|
|
912
|
+
|
|
913
|
+
/**
|
|
914
|
+
* Unique id of the message
|
|
915
|
+
*/
|
|
916
|
+
message_id?: string;
|
|
917
|
+
|
|
918
|
+
/**
|
|
919
|
+
* Multimedia attachments received with this message (MMS). Display only; a textual
|
|
920
|
+
* summary of each attachment is already included in content. Response only —
|
|
921
|
+
* supplying it in a request has no effect and is silently ignored. Omitted from
|
|
922
|
+
* PII-scrubbed messages.
|
|
923
|
+
*/
|
|
924
|
+
multimedia?: Array<MessageBase.Multimedia>;
|
|
925
|
+
}
|
|
926
|
+
|
|
927
|
+
export namespace MessageBase {
|
|
928
|
+
export interface Multimedia {
|
|
929
|
+
/**
|
|
930
|
+
* URL of the multimedia attachment.
|
|
931
|
+
*/
|
|
932
|
+
url: string;
|
|
933
|
+
|
|
934
|
+
/**
|
|
935
|
+
* Optional textual summary of the attachment.
|
|
936
|
+
*/
|
|
937
|
+
summary?: string;
|
|
938
|
+
}
|
|
939
|
+
}
|
|
940
|
+
|
|
941
|
+
export interface ToolCallInvocationMessageBase {
|
|
942
|
+
/**
|
|
943
|
+
* Arguments for this tool call, it's a stringified JSON object.
|
|
944
|
+
*/
|
|
945
|
+
arguments: string;
|
|
946
|
+
|
|
947
|
+
/**
|
|
948
|
+
* Name of the function in this tool call.
|
|
949
|
+
*/
|
|
950
|
+
name: string;
|
|
951
|
+
|
|
952
|
+
/**
|
|
953
|
+
* This is a tool call invocation.
|
|
954
|
+
*/
|
|
955
|
+
role: 'tool_call_invocation';
|
|
956
|
+
|
|
957
|
+
/**
|
|
958
|
+
* Tool call id, globally unique.
|
|
959
|
+
*/
|
|
960
|
+
tool_call_id: string;
|
|
961
|
+
|
|
962
|
+
/**
|
|
963
|
+
* Create timestamp of the message
|
|
964
|
+
*/
|
|
965
|
+
created_timestamp?: number;
|
|
966
|
+
|
|
967
|
+
/**
|
|
968
|
+
* Unique id of the message
|
|
969
|
+
*/
|
|
970
|
+
message_id?: string;
|
|
971
|
+
|
|
972
|
+
/**
|
|
973
|
+
* Optional thought signature from Google Gemini thinking models. This is used
|
|
974
|
+
* internally to maintain reasoning chain in multi-turn function calling.
|
|
975
|
+
*/
|
|
976
|
+
thought_signature?: string;
|
|
977
|
+
}
|
|
978
|
+
|
|
979
|
+
export interface ToolCallResultMessageBase {
|
|
980
|
+
/**
|
|
981
|
+
* Result of the tool call, can be a string, a stringified json, etc.
|
|
982
|
+
*/
|
|
983
|
+
content: string;
|
|
984
|
+
|
|
985
|
+
/**
|
|
986
|
+
* This is the result of a tool call.
|
|
987
|
+
*/
|
|
988
|
+
role: 'tool_call_result';
|
|
989
|
+
|
|
990
|
+
/**
|
|
991
|
+
* Tool call id, globally unique.
|
|
992
|
+
*/
|
|
993
|
+
tool_call_id: string;
|
|
994
|
+
|
|
995
|
+
/**
|
|
996
|
+
* Create timestamp of the message
|
|
997
|
+
*/
|
|
998
|
+
created_timestamp?: number;
|
|
999
|
+
|
|
1000
|
+
/**
|
|
1001
|
+
* Unique id of the message
|
|
1002
|
+
*/
|
|
1003
|
+
message_id?: string;
|
|
1004
|
+
|
|
1005
|
+
/**
|
|
1006
|
+
* Whether the tool call was successful.
|
|
1007
|
+
*/
|
|
1008
|
+
successful?: boolean;
|
|
1009
|
+
}
|
|
1010
|
+
|
|
1011
|
+
export interface NodeTransitionMessageBase {
|
|
1012
|
+
/**
|
|
1013
|
+
* This is a node transition.
|
|
1014
|
+
*/
|
|
1015
|
+
role: 'node_transition';
|
|
1016
|
+
|
|
1017
|
+
/**
|
|
1018
|
+
* Create timestamp of the message
|
|
1019
|
+
*/
|
|
1020
|
+
created_timestamp?: number;
|
|
1021
|
+
|
|
1022
|
+
/**
|
|
1023
|
+
* Former node id
|
|
1024
|
+
*/
|
|
1025
|
+
former_node_id?: string;
|
|
1026
|
+
|
|
1027
|
+
/**
|
|
1028
|
+
* Former node name
|
|
1029
|
+
*/
|
|
1030
|
+
former_node_name?: string;
|
|
1031
|
+
|
|
1032
|
+
/**
|
|
1033
|
+
* Unique id of the message
|
|
1034
|
+
*/
|
|
1035
|
+
message_id?: string;
|
|
1036
|
+
|
|
1037
|
+
/**
|
|
1038
|
+
* New node id
|
|
1039
|
+
*/
|
|
1040
|
+
new_node_id?: string;
|
|
1041
|
+
|
|
1042
|
+
/**
|
|
1043
|
+
* New node name
|
|
1044
|
+
*/
|
|
1045
|
+
new_node_name?: string;
|
|
1046
|
+
|
|
1047
|
+
/**
|
|
1048
|
+
* How this node was reached. "global" means a global node transition,
|
|
1049
|
+
* "global_go_back" means returning from a global node, "interrupt_go_back" means
|
|
1050
|
+
* going back due to user interruption, and "normal" means a regular edge
|
|
1051
|
+
* transition.
|
|
1052
|
+
*/
|
|
1053
|
+
transition_type?: 'global' | 'global_go_back' | 'interrupt_go_back' | 'normal';
|
|
1054
|
+
}
|
|
1055
|
+
|
|
1056
|
+
export interface StateTransitionMessageBase {
|
|
1057
|
+
/**
|
|
1058
|
+
* This is a state transition.
|
|
1059
|
+
*/
|
|
1060
|
+
role: 'state_transition';
|
|
1061
|
+
|
|
1062
|
+
/**
|
|
1063
|
+
* Create timestamp of the message
|
|
1064
|
+
*/
|
|
1065
|
+
created_timestamp?: number;
|
|
1066
|
+
|
|
1067
|
+
/**
|
|
1068
|
+
* Former state name
|
|
1069
|
+
*/
|
|
1070
|
+
former_state_name?: string;
|
|
1071
|
+
|
|
1072
|
+
/**
|
|
1073
|
+
* Unique id of the message
|
|
1074
|
+
*/
|
|
1075
|
+
message_id?: string;
|
|
1076
|
+
|
|
1077
|
+
/**
|
|
1078
|
+
* New state name
|
|
1079
|
+
*/
|
|
1080
|
+
new_state_name?: string;
|
|
1081
|
+
}
|
|
1082
|
+
|
|
1083
|
+
export interface InjectedMessageBase {
|
|
1084
|
+
/**
|
|
1085
|
+
* The injected context text.
|
|
1086
|
+
*/
|
|
1087
|
+
content: string;
|
|
1088
|
+
|
|
1089
|
+
/**
|
|
1090
|
+
* External context injected into the conversation via the update-live-call API.
|
|
1091
|
+
* Not spoken by either party.
|
|
1092
|
+
*/
|
|
1093
|
+
role: 'injected';
|
|
1094
|
+
|
|
1095
|
+
/**
|
|
1096
|
+
* Create timestamp of the message
|
|
1097
|
+
*/
|
|
1098
|
+
created_timestamp?: number;
|
|
1099
|
+
|
|
1100
|
+
/**
|
|
1101
|
+
* Unique id of the message
|
|
1102
|
+
*/
|
|
1103
|
+
message_id?: string;
|
|
1104
|
+
}
|
|
1105
|
+
|
|
1106
|
+
export interface SMSMessageBase {
|
|
1107
|
+
/**
|
|
1108
|
+
* Text content of the SMS message.
|
|
1109
|
+
*/
|
|
1110
|
+
content: string;
|
|
1111
|
+
|
|
1112
|
+
/**
|
|
1113
|
+
* SMS message exchanged during the call (for example received from the user).
|
|
1114
|
+
* Woven into the transcript and shown to the agent, but not part of the spoken
|
|
1115
|
+
* conversation.
|
|
1116
|
+
*/
|
|
1117
|
+
role: 'sms';
|
|
1118
|
+
|
|
1119
|
+
/**
|
|
1120
|
+
* Create timestamp of the message
|
|
1121
|
+
*/
|
|
1122
|
+
created_timestamp?: number;
|
|
1123
|
+
|
|
1124
|
+
/**
|
|
1125
|
+
* Unique id of the message
|
|
1126
|
+
*/
|
|
1127
|
+
message_id?: string;
|
|
1128
|
+
|
|
1129
|
+
/**
|
|
1130
|
+
* Multimedia attachments (MMS). Display only; not relayed into the spoken
|
|
1131
|
+
* conversation.
|
|
1132
|
+
*/
|
|
1133
|
+
multimedia?: Array<SMSMessageBase.Multimedia>;
|
|
1134
|
+
}
|
|
1135
|
+
|
|
1136
|
+
export namespace SMSMessageBase {
|
|
1137
|
+
export interface Multimedia {
|
|
1138
|
+
/**
|
|
1139
|
+
* URL of the multimedia attachment.
|
|
1140
|
+
*/
|
|
1141
|
+
url: string;
|
|
1142
|
+
|
|
1143
|
+
/**
|
|
1144
|
+
* Optional textual summary of the attachment.
|
|
1145
|
+
*/
|
|
1146
|
+
summary?: string;
|
|
1147
|
+
}
|
|
1148
|
+
}
|
|
1149
|
+
|
|
1150
|
+
export interface MessageBase {
|
|
1151
|
+
/**
|
|
1152
|
+
* Content of the message
|
|
1153
|
+
*/
|
|
1154
|
+
content: string;
|
|
1155
|
+
|
|
1156
|
+
/**
|
|
1157
|
+
* Documents whether this message is sent by agent or user.
|
|
1158
|
+
*/
|
|
1159
|
+
role: 'agent' | 'user';
|
|
1160
|
+
|
|
1161
|
+
/**
|
|
1162
|
+
* Create timestamp of the message
|
|
1163
|
+
*/
|
|
1164
|
+
created_timestamp?: number;
|
|
1165
|
+
|
|
1166
|
+
/**
|
|
1167
|
+
* Unique id of the message
|
|
1168
|
+
*/
|
|
1169
|
+
message_id?: string;
|
|
1170
|
+
|
|
1171
|
+
/**
|
|
1172
|
+
* Multimedia attachments received with this message (MMS). Display only; a textual
|
|
1173
|
+
* summary of each attachment is already included in content. Response only —
|
|
1174
|
+
* supplying it in a request has no effect and is silently ignored. Omitted from
|
|
1175
|
+
* PII-scrubbed messages.
|
|
1176
|
+
*/
|
|
1177
|
+
multimedia?: Array<MessageBase.Multimedia>;
|
|
1178
|
+
}
|
|
252
1179
|
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
1180
|
+
export namespace MessageBase {
|
|
1181
|
+
export interface Multimedia {
|
|
1182
|
+
/**
|
|
1183
|
+
* URL of the multimedia attachment.
|
|
1184
|
+
*/
|
|
1185
|
+
url: string;
|
|
257
1186
|
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
}
|
|
1187
|
+
/**
|
|
1188
|
+
* Optional textual summary of the attachment.
|
|
1189
|
+
*/
|
|
1190
|
+
summary?: string;
|
|
1191
|
+
}
|
|
1192
|
+
}
|
|
263
1193
|
|
|
264
|
-
export
|
|
265
|
-
/**
|
|
266
|
-
* Post chat analysis that includes information such as sentiment, status, summary,
|
|
267
|
-
* and custom defined data to extract. Available after chat ends. Subscribe to
|
|
268
|
-
* `chat_analyzed` webhook event type to receive it once ready.
|
|
269
|
-
*/
|
|
270
|
-
export interface ChatAnalysis {
|
|
1194
|
+
export interface ToolCallInvocationMessageBase {
|
|
271
1195
|
/**
|
|
272
|
-
*
|
|
273
|
-
* finishes the task, and the call was complete without being cutoff.
|
|
1196
|
+
* Arguments for this tool call, it's a stringified JSON object.
|
|
274
1197
|
*/
|
|
275
|
-
|
|
1198
|
+
arguments: string;
|
|
276
1199
|
|
|
277
1200
|
/**
|
|
278
|
-
*
|
|
1201
|
+
* Name of the function in this tool call.
|
|
279
1202
|
*/
|
|
280
|
-
|
|
1203
|
+
name: string;
|
|
281
1204
|
|
|
282
1205
|
/**
|
|
283
|
-
*
|
|
284
|
-
* agent post chat analysis data. Can be empty if nothing is specified.
|
|
1206
|
+
* This is a tool call invocation.
|
|
285
1207
|
*/
|
|
286
|
-
|
|
1208
|
+
role: 'tool_call_invocation';
|
|
287
1209
|
|
|
288
1210
|
/**
|
|
289
|
-
*
|
|
1211
|
+
* Tool call id, globally unique.
|
|
290
1212
|
*/
|
|
291
|
-
|
|
1213
|
+
tool_call_id: string;
|
|
1214
|
+
|
|
1215
|
+
/**
|
|
1216
|
+
* Create timestamp of the message
|
|
1217
|
+
*/
|
|
1218
|
+
created_timestamp?: number;
|
|
1219
|
+
|
|
1220
|
+
/**
|
|
1221
|
+
* Unique id of the message
|
|
1222
|
+
*/
|
|
1223
|
+
message_id?: string;
|
|
1224
|
+
|
|
1225
|
+
/**
|
|
1226
|
+
* Optional thought signature from Google Gemini thinking models. This is used
|
|
1227
|
+
* internally to maintain reasoning chain in multi-turn function calling.
|
|
1228
|
+
*/
|
|
1229
|
+
thought_signature?: string;
|
|
292
1230
|
}
|
|
293
1231
|
|
|
294
|
-
export interface
|
|
1232
|
+
export interface ToolCallResultMessageBase {
|
|
295
1233
|
/**
|
|
296
|
-
*
|
|
1234
|
+
* Result of the tool call, can be a string, a stringified json, etc.
|
|
297
1235
|
*/
|
|
298
|
-
|
|
1236
|
+
content: string;
|
|
299
1237
|
|
|
300
1238
|
/**
|
|
301
|
-
*
|
|
1239
|
+
* This is the result of a tool call.
|
|
302
1240
|
*/
|
|
303
|
-
|
|
1241
|
+
role: 'tool_call_result';
|
|
1242
|
+
|
|
1243
|
+
/**
|
|
1244
|
+
* Tool call id, globally unique.
|
|
1245
|
+
*/
|
|
1246
|
+
tool_call_id: string;
|
|
1247
|
+
|
|
1248
|
+
/**
|
|
1249
|
+
* Create timestamp of the message
|
|
1250
|
+
*/
|
|
1251
|
+
created_timestamp?: number;
|
|
1252
|
+
|
|
1253
|
+
/**
|
|
1254
|
+
* Unique id of the message
|
|
1255
|
+
*/
|
|
1256
|
+
message_id?: string;
|
|
1257
|
+
|
|
1258
|
+
/**
|
|
1259
|
+
* Whether the tool call was successful.
|
|
1260
|
+
*/
|
|
1261
|
+
successful?: boolean;
|
|
304
1262
|
}
|
|
305
1263
|
|
|
306
|
-
export
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
cost: number;
|
|
1264
|
+
export interface NodeTransitionMessageBase {
|
|
1265
|
+
/**
|
|
1266
|
+
* This is a node transition.
|
|
1267
|
+
*/
|
|
1268
|
+
role: 'node_transition';
|
|
312
1269
|
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
1270
|
+
/**
|
|
1271
|
+
* Create timestamp of the message
|
|
1272
|
+
*/
|
|
1273
|
+
created_timestamp?: number;
|
|
1274
|
+
|
|
1275
|
+
/**
|
|
1276
|
+
* Former node id
|
|
1277
|
+
*/
|
|
1278
|
+
former_node_id?: string;
|
|
1279
|
+
|
|
1280
|
+
/**
|
|
1281
|
+
* Former node name
|
|
1282
|
+
*/
|
|
1283
|
+
former_node_name?: string;
|
|
1284
|
+
|
|
1285
|
+
/**
|
|
1286
|
+
* Unique id of the message
|
|
1287
|
+
*/
|
|
1288
|
+
message_id?: string;
|
|
1289
|
+
|
|
1290
|
+
/**
|
|
1291
|
+
* New node id
|
|
1292
|
+
*/
|
|
1293
|
+
new_node_id?: string;
|
|
1294
|
+
|
|
1295
|
+
/**
|
|
1296
|
+
* New node name
|
|
1297
|
+
*/
|
|
1298
|
+
new_node_name?: string;
|
|
1299
|
+
|
|
1300
|
+
/**
|
|
1301
|
+
* How this node was reached. "global" means a global node transition,
|
|
1302
|
+
* "global_go_back" means returning from a global node, "interrupt_go_back" means
|
|
1303
|
+
* going back due to user interruption, and "normal" means a regular edge
|
|
1304
|
+
* transition.
|
|
1305
|
+
*/
|
|
1306
|
+
transition_type?: 'global' | 'global_go_back' | 'interrupt_go_back' | 'normal';
|
|
1307
|
+
}
|
|
1308
|
+
|
|
1309
|
+
export interface StateTransitionMessageBase {
|
|
1310
|
+
/**
|
|
1311
|
+
* This is a state transition.
|
|
1312
|
+
*/
|
|
1313
|
+
role: 'state_transition';
|
|
1314
|
+
|
|
1315
|
+
/**
|
|
1316
|
+
* Create timestamp of the message
|
|
1317
|
+
*/
|
|
1318
|
+
created_timestamp?: number;
|
|
1319
|
+
|
|
1320
|
+
/**
|
|
1321
|
+
* Former state name
|
|
1322
|
+
*/
|
|
1323
|
+
former_state_name?: string;
|
|
1324
|
+
|
|
1325
|
+
/**
|
|
1326
|
+
* Unique id of the message
|
|
1327
|
+
*/
|
|
1328
|
+
message_id?: string;
|
|
1329
|
+
|
|
1330
|
+
/**
|
|
1331
|
+
* New state name
|
|
1332
|
+
*/
|
|
1333
|
+
new_state_name?: string;
|
|
1334
|
+
}
|
|
1335
|
+
|
|
1336
|
+
export interface InjectedMessageBase {
|
|
1337
|
+
/**
|
|
1338
|
+
* The injected context text.
|
|
1339
|
+
*/
|
|
1340
|
+
content: string;
|
|
1341
|
+
|
|
1342
|
+
/**
|
|
1343
|
+
* External context injected into the conversation via the update-live-call API.
|
|
1344
|
+
* Not spoken by either party.
|
|
1345
|
+
*/
|
|
1346
|
+
role: 'injected';
|
|
1347
|
+
|
|
1348
|
+
/**
|
|
1349
|
+
* Create timestamp of the message
|
|
1350
|
+
*/
|
|
1351
|
+
created_timestamp?: number;
|
|
1352
|
+
|
|
1353
|
+
/**
|
|
1354
|
+
* Unique id of the message
|
|
1355
|
+
*/
|
|
1356
|
+
message_id?: string;
|
|
1357
|
+
}
|
|
1358
|
+
|
|
1359
|
+
export interface SMSMessageBase {
|
|
1360
|
+
/**
|
|
1361
|
+
* Text content of the SMS message.
|
|
1362
|
+
*/
|
|
1363
|
+
content: string;
|
|
1364
|
+
|
|
1365
|
+
/**
|
|
1366
|
+
* SMS message exchanged during the call (for example received from the user).
|
|
1367
|
+
* Woven into the transcript and shown to the agent, but not part of the spoken
|
|
1368
|
+
* conversation.
|
|
1369
|
+
*/
|
|
1370
|
+
role: 'sms';
|
|
1371
|
+
|
|
1372
|
+
/**
|
|
1373
|
+
* Create timestamp of the message
|
|
1374
|
+
*/
|
|
1375
|
+
created_timestamp?: number;
|
|
1376
|
+
|
|
1377
|
+
/**
|
|
1378
|
+
* Unique id of the message
|
|
1379
|
+
*/
|
|
1380
|
+
message_id?: string;
|
|
1381
|
+
|
|
1382
|
+
/**
|
|
1383
|
+
* Multimedia attachments (MMS). Display only; not relayed into the spoken
|
|
1384
|
+
* conversation.
|
|
1385
|
+
*/
|
|
1386
|
+
multimedia?: Array<SMSMessageBase.Multimedia>;
|
|
1387
|
+
}
|
|
317
1388
|
|
|
1389
|
+
export namespace SMSMessageBase {
|
|
1390
|
+
export interface Multimedia {
|
|
318
1391
|
/**
|
|
319
|
-
*
|
|
1392
|
+
* URL of the multimedia attachment.
|
|
320
1393
|
*/
|
|
321
|
-
|
|
1394
|
+
url: string;
|
|
322
1395
|
|
|
323
1396
|
/**
|
|
324
|
-
*
|
|
1397
|
+
* Optional textual summary of the attachment.
|
|
325
1398
|
*/
|
|
326
|
-
|
|
1399
|
+
summary?: string;
|
|
327
1400
|
}
|
|
328
1401
|
}
|
|
329
1402
|
|
|
@@ -1418,6 +2491,7 @@ export namespace ChatListParams {
|
|
|
1418
2491
|
value: Array<
|
|
1419
2492
|
| 'user_hangup'
|
|
1420
2493
|
| 'agent_hangup'
|
|
2494
|
+
| 'user_requested_dnc'
|
|
1421
2495
|
| 'call_transfer'
|
|
1422
2496
|
| 'voicemail_reached'
|
|
1423
2497
|
| 'ivr_reached'
|
|
@@ -1426,6 +2500,8 @@ export namespace ChatListParams {
|
|
|
1426
2500
|
| 'concurrency_limit_reached'
|
|
1427
2501
|
| 'no_concurrency_fallback'
|
|
1428
2502
|
| 'no_valid_payment'
|
|
2503
|
+
| 'credit_exhausted'
|
|
2504
|
+
| 'budget_reached'
|
|
1429
2505
|
| 'scam_detected'
|
|
1430
2506
|
| 'dial_busy'
|
|
1431
2507
|
| 'dial_failed'
|
|
@@ -1435,6 +2511,7 @@ export namespace ChatListParams {
|
|
|
1435
2511
|
| 'telephony_provider_unavailable'
|
|
1436
2512
|
| 'sip_routing_error'
|
|
1437
2513
|
| 'marked_as_spam'
|
|
2514
|
+
| 'network_blocked'
|
|
1438
2515
|
| 'user_declined'
|
|
1439
2516
|
| 'error_llm_websocket_open'
|
|
1440
2517
|
| 'error_llm_websocket_lost_connection'
|
|
@@ -1582,6 +2659,12 @@ export interface ChatCreateSMSChatParams {
|
|
|
1582
2659
|
*/
|
|
1583
2660
|
to_number: string;
|
|
1584
2661
|
|
|
2662
|
+
/**
|
|
2663
|
+
* If true, the chat is rejected with a 400 error when the contact for to_number is
|
|
2664
|
+
* marked do_not_call. If omitted, the default value is false.
|
|
2665
|
+
*/
|
|
2666
|
+
honor_internal_dnc?: boolean;
|
|
2667
|
+
|
|
1585
2668
|
/**
|
|
1586
2669
|
* An arbitrary object for storage purpose only. You can put anything here like
|
|
1587
2670
|
* your internal customer id associated with the chat. Not used for processing. You
|