retell-sdk 5.11.0 → 5.13.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 +39 -0
- package/README.md +2 -2
- package/client.d.mts +6 -3
- package/client.d.mts.map +1 -1
- package/client.d.ts +6 -3
- package/client.d.ts.map +1 -1
- package/client.js +3 -3
- package/client.js.map +1 -1
- package/client.mjs +3 -3
- package/client.mjs.map +1 -1
- package/internal/utils/env.js +2 -2
- package/internal/utils/env.js.map +1 -1
- package/internal/utils/env.mjs +2 -2
- package/internal/utils/env.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/agent.d.mts +22 -45
- package/resources/agent.d.mts.map +1 -1
- package/resources/agent.d.ts +22 -45
- package/resources/agent.d.ts.map +1 -1
- package/resources/batch-call.d.mts +8 -17
- package/resources/batch-call.d.mts.map +1 -1
- package/resources/batch-call.d.ts +8 -17
- package/resources/batch-call.d.ts.map +1 -1
- package/resources/call.d.mts +55 -54
- package/resources/call.d.mts.map +1 -1
- package/resources/call.d.ts +55 -54
- package/resources/call.d.ts.map +1 -1
- package/resources/chat-agent.d.mts +10 -6
- package/resources/chat-agent.d.mts.map +1 -1
- package/resources/chat-agent.d.ts +10 -6
- package/resources/chat-agent.d.ts.map +1 -1
- package/resources/chat.d.mts +90 -76
- package/resources/chat.d.mts.map +1 -1
- package/resources/chat.d.ts +90 -76
- package/resources/chat.d.ts.map +1 -1
- package/resources/conversation-flow-component.d.mts +207 -48
- package/resources/conversation-flow-component.d.mts.map +1 -1
- package/resources/conversation-flow-component.d.ts +207 -48
- package/resources/conversation-flow-component.d.ts.map +1 -1
- package/resources/conversation-flow.d.mts +417 -99
- package/resources/conversation-flow.d.mts.map +1 -1
- package/resources/conversation-flow.d.ts +417 -99
- package/resources/conversation-flow.d.ts.map +1 -1
- package/resources/llm.d.mts +153 -9
- package/resources/llm.d.mts.map +1 -1
- package/resources/llm.d.ts +153 -9
- package/resources/llm.d.ts.map +1 -1
- package/resources/phone-number.d.mts +22 -125
- package/resources/phone-number.d.mts.map +1 -1
- package/resources/phone-number.d.ts +22 -125
- package/resources/phone-number.d.ts.map +1 -1
- package/resources/phone-number.js +14 -2
- package/resources/phone-number.js.map +1 -1
- package/resources/phone-number.mjs +14 -2
- package/resources/phone-number.mjs.map +1 -1
- package/resources/tests.d.mts +4 -8
- package/resources/tests.d.mts.map +1 -1
- package/resources/tests.d.ts +4 -8
- package/resources/tests.d.ts.map +1 -1
- package/src/client.ts +11 -4
- package/src/internal/utils/env.ts +2 -2
- package/src/resources/agent.ts +23 -42
- package/src/resources/batch-call.ts +9 -15
- package/src/resources/call.ts +64 -47
- package/src/resources/chat-agent.ts +11 -3
- package/src/resources/chat.ts +106 -90
- package/src/resources/conversation-flow-component.ts +300 -48
- package/src/resources/conversation-flow.ts +606 -99
- package/src/resources/llm.ts +201 -6
- package/src/resources/phone-number.ts +22 -141
- package/src/resources/tests.ts +7 -9
- 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
|
@@ -187,11 +187,11 @@ export interface ChatResponse {
|
|
|
187
187
|
* Transcript of the chat weaved with tool call invocation and results.
|
|
188
188
|
*/
|
|
189
189
|
message_with_tool_calls?: Array<
|
|
190
|
-
| ChatResponse.
|
|
191
|
-
| ChatResponse.
|
|
192
|
-
| ChatResponse.
|
|
193
|
-
| ChatResponse.
|
|
194
|
-
| ChatResponse.
|
|
190
|
+
| ChatResponse.MessageBase
|
|
191
|
+
| ChatResponse.ToolCallInvocationMessageBase
|
|
192
|
+
| ChatResponse.ToolCallResultMessageBase
|
|
193
|
+
| ChatResponse.NodeTransitionMessageBase
|
|
194
|
+
| ChatResponse.StateTransitionMessageBase
|
|
195
195
|
>;
|
|
196
196
|
|
|
197
197
|
/**
|
|
@@ -291,39 +291,34 @@ export namespace ChatResponse {
|
|
|
291
291
|
}
|
|
292
292
|
}
|
|
293
293
|
|
|
294
|
-
export interface
|
|
294
|
+
export interface MessageBase {
|
|
295
295
|
/**
|
|
296
296
|
* Content of the message
|
|
297
297
|
*/
|
|
298
298
|
content: string;
|
|
299
299
|
|
|
300
300
|
/**
|
|
301
|
-
*
|
|
301
|
+
* Documents whether this message is sent by agent or user.
|
|
302
302
|
*/
|
|
303
|
-
|
|
303
|
+
role: 'agent' | 'user';
|
|
304
304
|
|
|
305
305
|
/**
|
|
306
|
-
*
|
|
306
|
+
* Create timestamp of the message
|
|
307
307
|
*/
|
|
308
|
-
|
|
308
|
+
created_timestamp?: number;
|
|
309
309
|
|
|
310
310
|
/**
|
|
311
|
-
*
|
|
311
|
+
* Unique id of the message
|
|
312
312
|
*/
|
|
313
|
-
|
|
313
|
+
message_id?: string;
|
|
314
314
|
}
|
|
315
315
|
|
|
316
|
-
export interface
|
|
316
|
+
export interface ToolCallInvocationMessageBase {
|
|
317
317
|
/**
|
|
318
318
|
* Arguments for this tool call, it's a stringified JSON object.
|
|
319
319
|
*/
|
|
320
320
|
arguments: string;
|
|
321
321
|
|
|
322
|
-
/**
|
|
323
|
-
* Unique id of the message
|
|
324
|
-
*/
|
|
325
|
-
message_id: string;
|
|
326
|
-
|
|
327
322
|
/**
|
|
328
323
|
* Name of the function in this tool call.
|
|
329
324
|
*/
|
|
@@ -344,6 +339,11 @@ export namespace ChatResponse {
|
|
|
344
339
|
*/
|
|
345
340
|
created_timestamp?: number;
|
|
346
341
|
|
|
342
|
+
/**
|
|
343
|
+
* Unique id of the message
|
|
344
|
+
*/
|
|
345
|
+
message_id?: string;
|
|
346
|
+
|
|
347
347
|
/**
|
|
348
348
|
* Optional thought signature from Google Gemini thinking models. This is used
|
|
349
349
|
* internally to maintain reasoning chain in multi-turn function calling.
|
|
@@ -351,22 +351,12 @@ export namespace ChatResponse {
|
|
|
351
351
|
thought_signature?: string;
|
|
352
352
|
}
|
|
353
353
|
|
|
354
|
-
export interface
|
|
354
|
+
export interface ToolCallResultMessageBase {
|
|
355
355
|
/**
|
|
356
356
|
* Result of the tool call, can be a string, a stringified json, etc.
|
|
357
357
|
*/
|
|
358
358
|
content: string;
|
|
359
359
|
|
|
360
|
-
/**
|
|
361
|
-
* Create timestamp of the message
|
|
362
|
-
*/
|
|
363
|
-
created_timestamp: number;
|
|
364
|
-
|
|
365
|
-
/**
|
|
366
|
-
* Unique id of the message
|
|
367
|
-
*/
|
|
368
|
-
message_id: string;
|
|
369
|
-
|
|
370
360
|
/**
|
|
371
361
|
* This is the result of a tool call.
|
|
372
362
|
*/
|
|
@@ -378,27 +368,32 @@ export namespace ChatResponse {
|
|
|
378
368
|
tool_call_id: string;
|
|
379
369
|
|
|
380
370
|
/**
|
|
381
|
-
*
|
|
371
|
+
* Create timestamp of the message
|
|
382
372
|
*/
|
|
383
|
-
|
|
384
|
-
}
|
|
373
|
+
created_timestamp?: number;
|
|
385
374
|
|
|
386
|
-
export interface NodeTransitionMessage {
|
|
387
375
|
/**
|
|
388
|
-
*
|
|
376
|
+
* Unique id of the message
|
|
389
377
|
*/
|
|
390
|
-
|
|
378
|
+
message_id?: string;
|
|
391
379
|
|
|
392
380
|
/**
|
|
393
|
-
*
|
|
381
|
+
* Whether the tool call was successful.
|
|
394
382
|
*/
|
|
395
|
-
|
|
383
|
+
successful?: boolean;
|
|
384
|
+
}
|
|
396
385
|
|
|
386
|
+
export interface NodeTransitionMessageBase {
|
|
397
387
|
/**
|
|
398
388
|
* This is a node transition.
|
|
399
389
|
*/
|
|
400
390
|
role: 'node_transition';
|
|
401
391
|
|
|
392
|
+
/**
|
|
393
|
+
* Create timestamp of the message
|
|
394
|
+
*/
|
|
395
|
+
created_timestamp?: number;
|
|
396
|
+
|
|
402
397
|
/**
|
|
403
398
|
* Former node id
|
|
404
399
|
*/
|
|
@@ -409,6 +404,11 @@ export namespace ChatResponse {
|
|
|
409
404
|
*/
|
|
410
405
|
former_node_name?: string;
|
|
411
406
|
|
|
407
|
+
/**
|
|
408
|
+
* Unique id of the message
|
|
409
|
+
*/
|
|
410
|
+
message_id?: string;
|
|
411
|
+
|
|
412
412
|
/**
|
|
413
413
|
* New node id
|
|
414
414
|
*/
|
|
@@ -418,29 +418,37 @@ export namespace ChatResponse {
|
|
|
418
418
|
* New node name
|
|
419
419
|
*/
|
|
420
420
|
new_node_name?: string;
|
|
421
|
-
}
|
|
422
421
|
|
|
423
|
-
export interface StateTransitionMessage {
|
|
424
422
|
/**
|
|
425
|
-
*
|
|
423
|
+
* How this node was reached. "global" means a global node transition,
|
|
424
|
+
* "global_go_back" means returning from a global node, "interrupt_go_back" means
|
|
425
|
+
* going back due to user interruption, and "normal" means a regular edge
|
|
426
|
+
* transition.
|
|
426
427
|
*/
|
|
427
|
-
|
|
428
|
+
transition_type?: 'global' | 'global_go_back' | 'interrupt_go_back' | 'normal';
|
|
429
|
+
}
|
|
428
430
|
|
|
431
|
+
export interface StateTransitionMessageBase {
|
|
429
432
|
/**
|
|
430
|
-
*
|
|
433
|
+
* This is a state transition.
|
|
431
434
|
*/
|
|
432
|
-
|
|
435
|
+
role: 'state_transition';
|
|
433
436
|
|
|
434
437
|
/**
|
|
435
|
-
*
|
|
438
|
+
* Create timestamp of the message
|
|
436
439
|
*/
|
|
437
|
-
|
|
440
|
+
created_timestamp?: number;
|
|
438
441
|
|
|
439
442
|
/**
|
|
440
443
|
* Former state name
|
|
441
444
|
*/
|
|
442
445
|
former_state_name?: string;
|
|
443
446
|
|
|
447
|
+
/**
|
|
448
|
+
* Unique id of the message
|
|
449
|
+
*/
|
|
450
|
+
message_id?: string;
|
|
451
|
+
|
|
444
452
|
/**
|
|
445
453
|
* New state name
|
|
446
454
|
*/
|
|
@@ -457,48 +465,43 @@ export interface ChatCreateChatCompletionResponse {
|
|
|
457
465
|
* messages.
|
|
458
466
|
*/
|
|
459
467
|
messages: Array<
|
|
460
|
-
| ChatCreateChatCompletionResponse.
|
|
461
|
-
| ChatCreateChatCompletionResponse.
|
|
462
|
-
| ChatCreateChatCompletionResponse.
|
|
463
|
-
| ChatCreateChatCompletionResponse.
|
|
464
|
-
| ChatCreateChatCompletionResponse.
|
|
468
|
+
| ChatCreateChatCompletionResponse.MessageBase
|
|
469
|
+
| ChatCreateChatCompletionResponse.ToolCallInvocationMessageBase
|
|
470
|
+
| ChatCreateChatCompletionResponse.ToolCallResultMessageBase
|
|
471
|
+
| ChatCreateChatCompletionResponse.NodeTransitionMessageBase
|
|
472
|
+
| ChatCreateChatCompletionResponse.StateTransitionMessageBase
|
|
465
473
|
>;
|
|
466
474
|
}
|
|
467
475
|
|
|
468
476
|
export namespace ChatCreateChatCompletionResponse {
|
|
469
|
-
export interface
|
|
477
|
+
export interface MessageBase {
|
|
470
478
|
/**
|
|
471
479
|
* Content of the message
|
|
472
480
|
*/
|
|
473
481
|
content: string;
|
|
474
482
|
|
|
475
483
|
/**
|
|
476
|
-
*
|
|
484
|
+
* Documents whether this message is sent by agent or user.
|
|
477
485
|
*/
|
|
478
|
-
|
|
486
|
+
role: 'agent' | 'user';
|
|
479
487
|
|
|
480
488
|
/**
|
|
481
|
-
*
|
|
489
|
+
* Create timestamp of the message
|
|
482
490
|
*/
|
|
483
|
-
|
|
491
|
+
created_timestamp?: number;
|
|
484
492
|
|
|
485
493
|
/**
|
|
486
|
-
*
|
|
494
|
+
* Unique id of the message
|
|
487
495
|
*/
|
|
488
|
-
|
|
496
|
+
message_id?: string;
|
|
489
497
|
}
|
|
490
498
|
|
|
491
|
-
export interface
|
|
499
|
+
export interface ToolCallInvocationMessageBase {
|
|
492
500
|
/**
|
|
493
501
|
* Arguments for this tool call, it's a stringified JSON object.
|
|
494
502
|
*/
|
|
495
503
|
arguments: string;
|
|
496
504
|
|
|
497
|
-
/**
|
|
498
|
-
* Unique id of the message
|
|
499
|
-
*/
|
|
500
|
-
message_id: string;
|
|
501
|
-
|
|
502
505
|
/**
|
|
503
506
|
* Name of the function in this tool call.
|
|
504
507
|
*/
|
|
@@ -519,6 +522,11 @@ export namespace ChatCreateChatCompletionResponse {
|
|
|
519
522
|
*/
|
|
520
523
|
created_timestamp?: number;
|
|
521
524
|
|
|
525
|
+
/**
|
|
526
|
+
* Unique id of the message
|
|
527
|
+
*/
|
|
528
|
+
message_id?: string;
|
|
529
|
+
|
|
522
530
|
/**
|
|
523
531
|
* Optional thought signature from Google Gemini thinking models. This is used
|
|
524
532
|
* internally to maintain reasoning chain in multi-turn function calling.
|
|
@@ -526,22 +534,12 @@ export namespace ChatCreateChatCompletionResponse {
|
|
|
526
534
|
thought_signature?: string;
|
|
527
535
|
}
|
|
528
536
|
|
|
529
|
-
export interface
|
|
537
|
+
export interface ToolCallResultMessageBase {
|
|
530
538
|
/**
|
|
531
539
|
* Result of the tool call, can be a string, a stringified json, etc.
|
|
532
540
|
*/
|
|
533
541
|
content: string;
|
|
534
542
|
|
|
535
|
-
/**
|
|
536
|
-
* Create timestamp of the message
|
|
537
|
-
*/
|
|
538
|
-
created_timestamp: number;
|
|
539
|
-
|
|
540
|
-
/**
|
|
541
|
-
* Unique id of the message
|
|
542
|
-
*/
|
|
543
|
-
message_id: string;
|
|
544
|
-
|
|
545
543
|
/**
|
|
546
544
|
* This is the result of a tool call.
|
|
547
545
|
*/
|
|
@@ -553,27 +551,32 @@ export namespace ChatCreateChatCompletionResponse {
|
|
|
553
551
|
tool_call_id: string;
|
|
554
552
|
|
|
555
553
|
/**
|
|
556
|
-
*
|
|
554
|
+
* Create timestamp of the message
|
|
557
555
|
*/
|
|
558
|
-
|
|
559
|
-
}
|
|
556
|
+
created_timestamp?: number;
|
|
560
557
|
|
|
561
|
-
export interface NodeTransitionMessage {
|
|
562
558
|
/**
|
|
563
|
-
*
|
|
559
|
+
* Unique id of the message
|
|
564
560
|
*/
|
|
565
|
-
|
|
561
|
+
message_id?: string;
|
|
566
562
|
|
|
567
563
|
/**
|
|
568
|
-
*
|
|
564
|
+
* Whether the tool call was successful.
|
|
569
565
|
*/
|
|
570
|
-
|
|
566
|
+
successful?: boolean;
|
|
567
|
+
}
|
|
571
568
|
|
|
569
|
+
export interface NodeTransitionMessageBase {
|
|
572
570
|
/**
|
|
573
571
|
* This is a node transition.
|
|
574
572
|
*/
|
|
575
573
|
role: 'node_transition';
|
|
576
574
|
|
|
575
|
+
/**
|
|
576
|
+
* Create timestamp of the message
|
|
577
|
+
*/
|
|
578
|
+
created_timestamp?: number;
|
|
579
|
+
|
|
577
580
|
/**
|
|
578
581
|
* Former node id
|
|
579
582
|
*/
|
|
@@ -584,6 +587,11 @@ export namespace ChatCreateChatCompletionResponse {
|
|
|
584
587
|
*/
|
|
585
588
|
former_node_name?: string;
|
|
586
589
|
|
|
590
|
+
/**
|
|
591
|
+
* Unique id of the message
|
|
592
|
+
*/
|
|
593
|
+
message_id?: string;
|
|
594
|
+
|
|
587
595
|
/**
|
|
588
596
|
* New node id
|
|
589
597
|
*/
|
|
@@ -593,29 +601,37 @@ export namespace ChatCreateChatCompletionResponse {
|
|
|
593
601
|
* New node name
|
|
594
602
|
*/
|
|
595
603
|
new_node_name?: string;
|
|
596
|
-
}
|
|
597
604
|
|
|
598
|
-
export interface StateTransitionMessage {
|
|
599
605
|
/**
|
|
600
|
-
*
|
|
606
|
+
* How this node was reached. "global" means a global node transition,
|
|
607
|
+
* "global_go_back" means returning from a global node, "interrupt_go_back" means
|
|
608
|
+
* going back due to user interruption, and "normal" means a regular edge
|
|
609
|
+
* transition.
|
|
601
610
|
*/
|
|
602
|
-
|
|
611
|
+
transition_type?: 'global' | 'global_go_back' | 'interrupt_go_back' | 'normal';
|
|
612
|
+
}
|
|
603
613
|
|
|
614
|
+
export interface StateTransitionMessageBase {
|
|
604
615
|
/**
|
|
605
|
-
*
|
|
616
|
+
* This is a state transition.
|
|
606
617
|
*/
|
|
607
|
-
|
|
618
|
+
role: 'state_transition';
|
|
608
619
|
|
|
609
620
|
/**
|
|
610
|
-
*
|
|
621
|
+
* Create timestamp of the message
|
|
611
622
|
*/
|
|
612
|
-
|
|
623
|
+
created_timestamp?: number;
|
|
613
624
|
|
|
614
625
|
/**
|
|
615
626
|
* Former state name
|
|
616
627
|
*/
|
|
617
628
|
former_state_name?: string;
|
|
618
629
|
|
|
630
|
+
/**
|
|
631
|
+
* Unique id of the message
|
|
632
|
+
*/
|
|
633
|
+
message_id?: string;
|
|
634
|
+
|
|
619
635
|
/**
|
|
620
636
|
* New state name
|
|
621
637
|
*/
|