retell-sdk 4.9.0 → 4.11.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.
@@ -137,32 +137,16 @@ export interface PhoneCallResponse {
137
137
  | 'error_user_not_joined'
138
138
  | 'registered_call_timeout';
139
139
 
140
- /**
141
- * End to end latency (from user stops talking to agent start talking) tracking of
142
- * the call, available after call ends. This latency does not account for the
143
- * network trip time from Retell server to user frontend. The latency is tracked
144
- * every time turn change between user and agent.
145
- */
146
- e2e_latency?: PhoneCallResponse.E2ELatency;
147
-
148
140
  /**
149
141
  * End timestamp (milliseconds since epoch) of the call. Available after call ends.
150
142
  */
151
143
  end_timestamp?: number;
152
144
 
153
145
  /**
154
- * LLM latency (from issue of LLM call to first token received) tracking of the
155
- * call, available after call ends. When using custom LLM. this latency includes
156
- * LLM websocket roundtrip time between user server and Retell server.
157
- */
158
- llm_latency?: PhoneCallResponse.LlmLatency;
159
-
160
- /**
161
- * LLM websocket roundtrip latency (between user server and Retell server) tracking
162
- * of the call, available after call ends. Only populated for calls using custom
163
- * LLM.
146
+ * Latency tracking of the call, available after call ends. Not all fields here
147
+ * will be available, as it depends on the type of call and feature used.
164
148
  */
165
- llm_websocket_network_rtt_latency?: PhoneCallResponse.LlmWebsocketNetworkRttLatency;
149
+ latency?: PhoneCallResponse.Latency;
166
150
 
167
151
  /**
168
152
  * An arbitrary object for storage purpose only. You can put anything here like
@@ -260,130 +244,333 @@ export namespace PhoneCallResponse {
260
244
  }
261
245
 
262
246
  /**
263
- * End to end latency (from user stops talking to agent start talking) tracking of
264
- * the call, available after call ends. This latency does not account for the
265
- * network trip time from Retell server to user frontend. The latency is tracked
266
- * every time turn change between user and agent.
247
+ * Latency tracking of the call, available after call ends. Not all fields here
248
+ * will be available, as it depends on the type of call and feature used.
267
249
  */
268
- export interface E2ELatency {
250
+ export interface Latency {
269
251
  /**
270
- * Maximum latency in the call, measured in milliseconds.
252
+ * End to end latency (from user stops talking to agent start talking) tracking of
253
+ * the call. This latency does not account for the network trip time from Retell
254
+ * server to user frontend. The latency is tracked every time turn change between
255
+ * user and agent.
271
256
  */
272
- max?: number;
257
+ e2e?: Latency.E2E;
273
258
 
274
259
  /**
275
- * Minimum latency in the call, measured in milliseconds.
260
+ * Knowledge base latency (from the triggering of knowledge base retrival to all
261
+ * relevant context received) tracking of the call. Only populated when using
262
+ * knowledge base feature for the agent of the call.
276
263
  */
277
- min?: number;
264
+ knowledge_base?: Latency.KnowledgeBase;
278
265
 
279
266
  /**
280
- * Number of data points (number of times latency is tracked).
267
+ * LLM latency (from issue of LLM call to first speakable chunk received) tracking
268
+ * of the call. When using custom LLM. this latency includes LLM websocket
269
+ * roundtrip time between user server and Retell server.
281
270
  */
282
- num?: number;
271
+ llm?: Latency.Llm;
283
272
 
284
273
  /**
285
- * 50 percentile of latency, measured in milliseconds.
274
+ * LLM websocket roundtrip latency (between user server and Retell server) tracking
275
+ * of the call. Only populated for calls using custom LLM.
286
276
  */
287
- p50?: number;
277
+ llm_websocket_network_rtt?: Latency.LlmWebsocketNetworkRtt;
288
278
 
289
279
  /**
290
- * 90 percentile of latency, measured in milliseconds.
280
+ * Speech-to-speech latency (from requesting responses of a S2S model to first byte
281
+ * received) tracking of the call. Only populated for calls that uses S2S model
282
+ * like Realtime API.
291
283
  */
292
- p90?: number;
284
+ s2s?: Latency.S2s;
293
285
 
294
286
  /**
295
- * 95 percentile of latency, measured in milliseconds.
287
+ * Text-to-speech latency (from the triggering of TTS to first byte received)
288
+ * tracking of the call.
296
289
  */
297
- p95?: number;
298
-
299
- /**
300
- * 99 percentile of latency, measured in milliseconds.
301
- */
302
- p99?: number;
290
+ tts?: Latency.Tts;
303
291
  }
304
292
 
305
- /**
306
- * LLM latency (from issue of LLM call to first token received) tracking of the
307
- * call, available after call ends. When using custom LLM. this latency includes
308
- * LLM websocket roundtrip time between user server and Retell server.
309
- */
310
- export interface LlmLatency {
293
+ export namespace Latency {
311
294
  /**
312
- * Maximum latency in the call, measured in milliseconds.
295
+ * End to end latency (from user stops talking to agent start talking) tracking of
296
+ * the call. This latency does not account for the network trip time from Retell
297
+ * server to user frontend. The latency is tracked every time turn change between
298
+ * user and agent.
313
299
  */
314
- max?: number;
300
+ export interface E2E {
301
+ /**
302
+ * Maximum latency in the call, measured in milliseconds.
303
+ */
304
+ max?: number;
315
305
 
316
- /**
317
- * Minimum latency in the call, measured in milliseconds.
318
- */
319
- min?: number;
306
+ /**
307
+ * Minimum latency in the call, measured in milliseconds.
308
+ */
309
+ min?: number;
320
310
 
321
- /**
322
- * Number of data points (number of times latency is tracked).
323
- */
324
- num?: number;
311
+ /**
312
+ * Number of data points (number of times latency is tracked).
313
+ */
314
+ num?: number;
325
315
 
326
- /**
327
- * 50 percentile of latency, measured in milliseconds.
328
- */
329
- p50?: number;
316
+ /**
317
+ * 50 percentile of latency, measured in milliseconds.
318
+ */
319
+ p50?: number;
330
320
 
331
- /**
332
- * 90 percentile of latency, measured in milliseconds.
333
- */
334
- p90?: number;
321
+ /**
322
+ * 90 percentile of latency, measured in milliseconds.
323
+ */
324
+ p90?: number;
335
325
 
336
- /**
337
- * 95 percentile of latency, measured in milliseconds.
338
- */
339
- p95?: number;
326
+ /**
327
+ * 95 percentile of latency, measured in milliseconds.
328
+ */
329
+ p95?: number;
340
330
 
341
- /**
342
- * 99 percentile of latency, measured in milliseconds.
343
- */
344
- p99?: number;
345
- }
331
+ /**
332
+ * 99 percentile of latency, measured in milliseconds.
333
+ */
334
+ p99?: number;
346
335
 
347
- /**
348
- * LLM websocket roundtrip latency (between user server and Retell server) tracking
349
- * of the call, available after call ends. Only populated for calls using custom
350
- * LLM.
351
- */
352
- export interface LlmWebsocketNetworkRttLatency {
353
- /**
354
- * Maximum latency in the call, measured in milliseconds.
355
- */
356
- max?: number;
336
+ /**
337
+ * All the latency data points in the call, measured in milliseconds.
338
+ */
339
+ values?: Array<number>;
340
+ }
357
341
 
358
342
  /**
359
- * Minimum latency in the call, measured in milliseconds.
343
+ * Knowledge base latency (from the triggering of knowledge base retrival to all
344
+ * relevant context received) tracking of the call. Only populated when using
345
+ * knowledge base feature for the agent of the call.
360
346
  */
361
- min?: number;
347
+ export interface KnowledgeBase {
348
+ /**
349
+ * Maximum latency in the call, measured in milliseconds.
350
+ */
351
+ max?: number;
362
352
 
363
- /**
364
- * Number of data points (number of times latency is tracked).
365
- */
366
- num?: number;
353
+ /**
354
+ * Minimum latency in the call, measured in milliseconds.
355
+ */
356
+ min?: number;
357
+
358
+ /**
359
+ * Number of data points (number of times latency is tracked).
360
+ */
361
+ num?: number;
362
+
363
+ /**
364
+ * 50 percentile of latency, measured in milliseconds.
365
+ */
366
+ p50?: number;
367
+
368
+ /**
369
+ * 90 percentile of latency, measured in milliseconds.
370
+ */
371
+ p90?: number;
372
+
373
+ /**
374
+ * 95 percentile of latency, measured in milliseconds.
375
+ */
376
+ p95?: number;
377
+
378
+ /**
379
+ * 99 percentile of latency, measured in milliseconds.
380
+ */
381
+ p99?: number;
382
+
383
+ /**
384
+ * All the latency data points in the call, measured in milliseconds.
385
+ */
386
+ values?: Array<number>;
387
+ }
367
388
 
368
389
  /**
369
- * 50 percentile of latency, measured in milliseconds.
390
+ * LLM latency (from issue of LLM call to first speakable chunk received) tracking
391
+ * of the call. When using custom LLM. this latency includes LLM websocket
392
+ * roundtrip time between user server and Retell server.
370
393
  */
371
- p50?: number;
394
+ export interface Llm {
395
+ /**
396
+ * Maximum latency in the call, measured in milliseconds.
397
+ */
398
+ max?: number;
399
+
400
+ /**
401
+ * Minimum latency in the call, measured in milliseconds.
402
+ */
403
+ min?: number;
404
+
405
+ /**
406
+ * Number of data points (number of times latency is tracked).
407
+ */
408
+ num?: number;
409
+
410
+ /**
411
+ * 50 percentile of latency, measured in milliseconds.
412
+ */
413
+ p50?: number;
414
+
415
+ /**
416
+ * 90 percentile of latency, measured in milliseconds.
417
+ */
418
+ p90?: number;
419
+
420
+ /**
421
+ * 95 percentile of latency, measured in milliseconds.
422
+ */
423
+ p95?: number;
424
+
425
+ /**
426
+ * 99 percentile of latency, measured in milliseconds.
427
+ */
428
+ p99?: number;
429
+
430
+ /**
431
+ * All the latency data points in the call, measured in milliseconds.
432
+ */
433
+ values?: Array<number>;
434
+ }
372
435
 
373
436
  /**
374
- * 90 percentile of latency, measured in milliseconds.
437
+ * LLM websocket roundtrip latency (between user server and Retell server) tracking
438
+ * of the call. Only populated for calls using custom LLM.
375
439
  */
376
- p90?: number;
440
+ export interface LlmWebsocketNetworkRtt {
441
+ /**
442
+ * Maximum latency in the call, measured in milliseconds.
443
+ */
444
+ max?: number;
445
+
446
+ /**
447
+ * Minimum latency in the call, measured in milliseconds.
448
+ */
449
+ min?: number;
450
+
451
+ /**
452
+ * Number of data points (number of times latency is tracked).
453
+ */
454
+ num?: number;
455
+
456
+ /**
457
+ * 50 percentile of latency, measured in milliseconds.
458
+ */
459
+ p50?: number;
460
+
461
+ /**
462
+ * 90 percentile of latency, measured in milliseconds.
463
+ */
464
+ p90?: number;
465
+
466
+ /**
467
+ * 95 percentile of latency, measured in milliseconds.
468
+ */
469
+ p95?: number;
470
+
471
+ /**
472
+ * 99 percentile of latency, measured in milliseconds.
473
+ */
474
+ p99?: number;
475
+
476
+ /**
477
+ * All the latency data points in the call, measured in milliseconds.
478
+ */
479
+ values?: Array<number>;
480
+ }
377
481
 
378
482
  /**
379
- * 95 percentile of latency, measured in milliseconds.
483
+ * Speech-to-speech latency (from requesting responses of a S2S model to first byte
484
+ * received) tracking of the call. Only populated for calls that uses S2S model
485
+ * like Realtime API.
380
486
  */
381
- p95?: number;
487
+ export interface S2s {
488
+ /**
489
+ * Maximum latency in the call, measured in milliseconds.
490
+ */
491
+ max?: number;
492
+
493
+ /**
494
+ * Minimum latency in the call, measured in milliseconds.
495
+ */
496
+ min?: number;
497
+
498
+ /**
499
+ * Number of data points (number of times latency is tracked).
500
+ */
501
+ num?: number;
502
+
503
+ /**
504
+ * 50 percentile of latency, measured in milliseconds.
505
+ */
506
+ p50?: number;
507
+
508
+ /**
509
+ * 90 percentile of latency, measured in milliseconds.
510
+ */
511
+ p90?: number;
512
+
513
+ /**
514
+ * 95 percentile of latency, measured in milliseconds.
515
+ */
516
+ p95?: number;
517
+
518
+ /**
519
+ * 99 percentile of latency, measured in milliseconds.
520
+ */
521
+ p99?: number;
522
+
523
+ /**
524
+ * All the latency data points in the call, measured in milliseconds.
525
+ */
526
+ values?: Array<number>;
527
+ }
382
528
 
383
529
  /**
384
- * 99 percentile of latency, measured in milliseconds.
530
+ * Text-to-speech latency (from the triggering of TTS to first byte received)
531
+ * tracking of the call.
385
532
  */
386
- p99?: number;
533
+ export interface Tts {
534
+ /**
535
+ * Maximum latency in the call, measured in milliseconds.
536
+ */
537
+ max?: number;
538
+
539
+ /**
540
+ * Minimum latency in the call, measured in milliseconds.
541
+ */
542
+ min?: number;
543
+
544
+ /**
545
+ * Number of data points (number of times latency is tracked).
546
+ */
547
+ num?: number;
548
+
549
+ /**
550
+ * 50 percentile of latency, measured in milliseconds.
551
+ */
552
+ p50?: number;
553
+
554
+ /**
555
+ * 90 percentile of latency, measured in milliseconds.
556
+ */
557
+ p90?: number;
558
+
559
+ /**
560
+ * 95 percentile of latency, measured in milliseconds.
561
+ */
562
+ p95?: number;
563
+
564
+ /**
565
+ * 99 percentile of latency, measured in milliseconds.
566
+ */
567
+ p99?: number;
568
+
569
+ /**
570
+ * All the latency data points in the call, measured in milliseconds.
571
+ */
572
+ values?: Array<number>;
573
+ }
387
574
  }
388
575
 
389
576
  export interface TranscriptObject {
@@ -583,32 +770,16 @@ export interface WebCallResponse {
583
770
  | 'error_user_not_joined'
584
771
  | 'registered_call_timeout';
585
772
 
586
- /**
587
- * End to end latency (from user stops talking to agent start talking) tracking of
588
- * the call, available after call ends. This latency does not account for the
589
- * network trip time from Retell server to user frontend. The latency is tracked
590
- * every time turn change between user and agent.
591
- */
592
- e2e_latency?: WebCallResponse.E2ELatency;
593
-
594
773
  /**
595
774
  * End timestamp (milliseconds since epoch) of the call. Available after call ends.
596
775
  */
597
776
  end_timestamp?: number;
598
777
 
599
778
  /**
600
- * LLM latency (from issue of LLM call to first token received) tracking of the
601
- * call, available after call ends. When using custom LLM. this latency includes
602
- * LLM websocket roundtrip time between user server and Retell server.
603
- */
604
- llm_latency?: WebCallResponse.LlmLatency;
605
-
606
- /**
607
- * LLM websocket roundtrip latency (between user server and Retell server) tracking
608
- * of the call, available after call ends. Only populated for calls using custom
609
- * LLM.
779
+ * Latency tracking of the call, available after call ends. Not all fields here
780
+ * will be available, as it depends on the type of call and feature used.
610
781
  */
611
- llm_websocket_network_rtt_latency?: WebCallResponse.LlmWebsocketNetworkRttLatency;
782
+ latency?: WebCallResponse.Latency;
612
783
 
613
784
  /**
614
785
  * An arbitrary object for storage purpose only. You can put anything here like
@@ -706,130 +877,333 @@ export namespace WebCallResponse {
706
877
  }
707
878
 
708
879
  /**
709
- * End to end latency (from user stops talking to agent start talking) tracking of
710
- * the call, available after call ends. This latency does not account for the
711
- * network trip time from Retell server to user frontend. The latency is tracked
712
- * every time turn change between user and agent.
880
+ * Latency tracking of the call, available after call ends. Not all fields here
881
+ * will be available, as it depends on the type of call and feature used.
713
882
  */
714
- export interface E2ELatency {
883
+ export interface Latency {
715
884
  /**
716
- * Maximum latency in the call, measured in milliseconds.
885
+ * End to end latency (from user stops talking to agent start talking) tracking of
886
+ * the call. This latency does not account for the network trip time from Retell
887
+ * server to user frontend. The latency is tracked every time turn change between
888
+ * user and agent.
717
889
  */
718
- max?: number;
890
+ e2e?: Latency.E2E;
719
891
 
720
892
  /**
721
- * Minimum latency in the call, measured in milliseconds.
893
+ * Knowledge base latency (from the triggering of knowledge base retrival to all
894
+ * relevant context received) tracking of the call. Only populated when using
895
+ * knowledge base feature for the agent of the call.
722
896
  */
723
- min?: number;
897
+ knowledge_base?: Latency.KnowledgeBase;
724
898
 
725
899
  /**
726
- * Number of data points (number of times latency is tracked).
900
+ * LLM latency (from issue of LLM call to first speakable chunk received) tracking
901
+ * of the call. When using custom LLM. this latency includes LLM websocket
902
+ * roundtrip time between user server and Retell server.
727
903
  */
728
- num?: number;
904
+ llm?: Latency.Llm;
729
905
 
730
906
  /**
731
- * 50 percentile of latency, measured in milliseconds.
907
+ * LLM websocket roundtrip latency (between user server and Retell server) tracking
908
+ * of the call. Only populated for calls using custom LLM.
732
909
  */
733
- p50?: number;
910
+ llm_websocket_network_rtt?: Latency.LlmWebsocketNetworkRtt;
734
911
 
735
912
  /**
736
- * 90 percentile of latency, measured in milliseconds.
913
+ * Speech-to-speech latency (from requesting responses of a S2S model to first byte
914
+ * received) tracking of the call. Only populated for calls that uses S2S model
915
+ * like Realtime API.
737
916
  */
738
- p90?: number;
917
+ s2s?: Latency.S2s;
739
918
 
740
919
  /**
741
- * 95 percentile of latency, measured in milliseconds.
920
+ * Text-to-speech latency (from the triggering of TTS to first byte received)
921
+ * tracking of the call.
742
922
  */
743
- p95?: number;
744
-
745
- /**
746
- * 99 percentile of latency, measured in milliseconds.
747
- */
748
- p99?: number;
923
+ tts?: Latency.Tts;
749
924
  }
750
925
 
751
- /**
752
- * LLM latency (from issue of LLM call to first token received) tracking of the
753
- * call, available after call ends. When using custom LLM. this latency includes
754
- * LLM websocket roundtrip time between user server and Retell server.
755
- */
756
- export interface LlmLatency {
926
+ export namespace Latency {
757
927
  /**
758
- * Maximum latency in the call, measured in milliseconds.
928
+ * End to end latency (from user stops talking to agent start talking) tracking of
929
+ * the call. This latency does not account for the network trip time from Retell
930
+ * server to user frontend. The latency is tracked every time turn change between
931
+ * user and agent.
759
932
  */
760
- max?: number;
933
+ export interface E2E {
934
+ /**
935
+ * Maximum latency in the call, measured in milliseconds.
936
+ */
937
+ max?: number;
761
938
 
762
- /**
763
- * Minimum latency in the call, measured in milliseconds.
764
- */
765
- min?: number;
939
+ /**
940
+ * Minimum latency in the call, measured in milliseconds.
941
+ */
942
+ min?: number;
766
943
 
767
- /**
768
- * Number of data points (number of times latency is tracked).
769
- */
770
- num?: number;
944
+ /**
945
+ * Number of data points (number of times latency is tracked).
946
+ */
947
+ num?: number;
771
948
 
772
- /**
773
- * 50 percentile of latency, measured in milliseconds.
774
- */
775
- p50?: number;
949
+ /**
950
+ * 50 percentile of latency, measured in milliseconds.
951
+ */
952
+ p50?: number;
776
953
 
777
- /**
778
- * 90 percentile of latency, measured in milliseconds.
779
- */
780
- p90?: number;
954
+ /**
955
+ * 90 percentile of latency, measured in milliseconds.
956
+ */
957
+ p90?: number;
781
958
 
782
- /**
783
- * 95 percentile of latency, measured in milliseconds.
784
- */
785
- p95?: number;
959
+ /**
960
+ * 95 percentile of latency, measured in milliseconds.
961
+ */
962
+ p95?: number;
786
963
 
787
- /**
788
- * 99 percentile of latency, measured in milliseconds.
789
- */
790
- p99?: number;
791
- }
964
+ /**
965
+ * 99 percentile of latency, measured in milliseconds.
966
+ */
967
+ p99?: number;
792
968
 
793
- /**
794
- * LLM websocket roundtrip latency (between user server and Retell server) tracking
795
- * of the call, available after call ends. Only populated for calls using custom
796
- * LLM.
797
- */
798
- export interface LlmWebsocketNetworkRttLatency {
799
- /**
800
- * Maximum latency in the call, measured in milliseconds.
801
- */
802
- max?: number;
969
+ /**
970
+ * All the latency data points in the call, measured in milliseconds.
971
+ */
972
+ values?: Array<number>;
973
+ }
803
974
 
804
975
  /**
805
- * Minimum latency in the call, measured in milliseconds.
976
+ * Knowledge base latency (from the triggering of knowledge base retrival to all
977
+ * relevant context received) tracking of the call. Only populated when using
978
+ * knowledge base feature for the agent of the call.
806
979
  */
807
- min?: number;
980
+ export interface KnowledgeBase {
981
+ /**
982
+ * Maximum latency in the call, measured in milliseconds.
983
+ */
984
+ max?: number;
808
985
 
809
- /**
810
- * Number of data points (number of times latency is tracked).
811
- */
812
- num?: number;
986
+ /**
987
+ * Minimum latency in the call, measured in milliseconds.
988
+ */
989
+ min?: number;
990
+
991
+ /**
992
+ * Number of data points (number of times latency is tracked).
993
+ */
994
+ num?: number;
995
+
996
+ /**
997
+ * 50 percentile of latency, measured in milliseconds.
998
+ */
999
+ p50?: number;
1000
+
1001
+ /**
1002
+ * 90 percentile of latency, measured in milliseconds.
1003
+ */
1004
+ p90?: number;
1005
+
1006
+ /**
1007
+ * 95 percentile of latency, measured in milliseconds.
1008
+ */
1009
+ p95?: number;
1010
+
1011
+ /**
1012
+ * 99 percentile of latency, measured in milliseconds.
1013
+ */
1014
+ p99?: number;
1015
+
1016
+ /**
1017
+ * All the latency data points in the call, measured in milliseconds.
1018
+ */
1019
+ values?: Array<number>;
1020
+ }
813
1021
 
814
1022
  /**
815
- * 50 percentile of latency, measured in milliseconds.
1023
+ * LLM latency (from issue of LLM call to first speakable chunk received) tracking
1024
+ * of the call. When using custom LLM. this latency includes LLM websocket
1025
+ * roundtrip time between user server and Retell server.
816
1026
  */
817
- p50?: number;
1027
+ export interface Llm {
1028
+ /**
1029
+ * Maximum latency in the call, measured in milliseconds.
1030
+ */
1031
+ max?: number;
1032
+
1033
+ /**
1034
+ * Minimum latency in the call, measured in milliseconds.
1035
+ */
1036
+ min?: number;
1037
+
1038
+ /**
1039
+ * Number of data points (number of times latency is tracked).
1040
+ */
1041
+ num?: number;
1042
+
1043
+ /**
1044
+ * 50 percentile of latency, measured in milliseconds.
1045
+ */
1046
+ p50?: number;
1047
+
1048
+ /**
1049
+ * 90 percentile of latency, measured in milliseconds.
1050
+ */
1051
+ p90?: number;
1052
+
1053
+ /**
1054
+ * 95 percentile of latency, measured in milliseconds.
1055
+ */
1056
+ p95?: number;
1057
+
1058
+ /**
1059
+ * 99 percentile of latency, measured in milliseconds.
1060
+ */
1061
+ p99?: number;
1062
+
1063
+ /**
1064
+ * All the latency data points in the call, measured in milliseconds.
1065
+ */
1066
+ values?: Array<number>;
1067
+ }
818
1068
 
819
1069
  /**
820
- * 90 percentile of latency, measured in milliseconds.
1070
+ * LLM websocket roundtrip latency (between user server and Retell server) tracking
1071
+ * of the call. Only populated for calls using custom LLM.
821
1072
  */
822
- p90?: number;
1073
+ export interface LlmWebsocketNetworkRtt {
1074
+ /**
1075
+ * Maximum latency in the call, measured in milliseconds.
1076
+ */
1077
+ max?: number;
1078
+
1079
+ /**
1080
+ * Minimum latency in the call, measured in milliseconds.
1081
+ */
1082
+ min?: number;
1083
+
1084
+ /**
1085
+ * Number of data points (number of times latency is tracked).
1086
+ */
1087
+ num?: number;
1088
+
1089
+ /**
1090
+ * 50 percentile of latency, measured in milliseconds.
1091
+ */
1092
+ p50?: number;
1093
+
1094
+ /**
1095
+ * 90 percentile of latency, measured in milliseconds.
1096
+ */
1097
+ p90?: number;
1098
+
1099
+ /**
1100
+ * 95 percentile of latency, measured in milliseconds.
1101
+ */
1102
+ p95?: number;
1103
+
1104
+ /**
1105
+ * 99 percentile of latency, measured in milliseconds.
1106
+ */
1107
+ p99?: number;
1108
+
1109
+ /**
1110
+ * All the latency data points in the call, measured in milliseconds.
1111
+ */
1112
+ values?: Array<number>;
1113
+ }
823
1114
 
824
1115
  /**
825
- * 95 percentile of latency, measured in milliseconds.
1116
+ * Speech-to-speech latency (from requesting responses of a S2S model to first byte
1117
+ * received) tracking of the call. Only populated for calls that uses S2S model
1118
+ * like Realtime API.
826
1119
  */
827
- p95?: number;
1120
+ export interface S2s {
1121
+ /**
1122
+ * Maximum latency in the call, measured in milliseconds.
1123
+ */
1124
+ max?: number;
1125
+
1126
+ /**
1127
+ * Minimum latency in the call, measured in milliseconds.
1128
+ */
1129
+ min?: number;
1130
+
1131
+ /**
1132
+ * Number of data points (number of times latency is tracked).
1133
+ */
1134
+ num?: number;
1135
+
1136
+ /**
1137
+ * 50 percentile of latency, measured in milliseconds.
1138
+ */
1139
+ p50?: number;
1140
+
1141
+ /**
1142
+ * 90 percentile of latency, measured in milliseconds.
1143
+ */
1144
+ p90?: number;
1145
+
1146
+ /**
1147
+ * 95 percentile of latency, measured in milliseconds.
1148
+ */
1149
+ p95?: number;
1150
+
1151
+ /**
1152
+ * 99 percentile of latency, measured in milliseconds.
1153
+ */
1154
+ p99?: number;
1155
+
1156
+ /**
1157
+ * All the latency data points in the call, measured in milliseconds.
1158
+ */
1159
+ values?: Array<number>;
1160
+ }
828
1161
 
829
1162
  /**
830
- * 99 percentile of latency, measured in milliseconds.
1163
+ * Text-to-speech latency (from the triggering of TTS to first byte received)
1164
+ * tracking of the call.
831
1165
  */
832
- p99?: number;
1166
+ export interface Tts {
1167
+ /**
1168
+ * Maximum latency in the call, measured in milliseconds.
1169
+ */
1170
+ max?: number;
1171
+
1172
+ /**
1173
+ * Minimum latency in the call, measured in milliseconds.
1174
+ */
1175
+ min?: number;
1176
+
1177
+ /**
1178
+ * Number of data points (number of times latency is tracked).
1179
+ */
1180
+ num?: number;
1181
+
1182
+ /**
1183
+ * 50 percentile of latency, measured in milliseconds.
1184
+ */
1185
+ p50?: number;
1186
+
1187
+ /**
1188
+ * 90 percentile of latency, measured in milliseconds.
1189
+ */
1190
+ p90?: number;
1191
+
1192
+ /**
1193
+ * 95 percentile of latency, measured in milliseconds.
1194
+ */
1195
+ p95?: number;
1196
+
1197
+ /**
1198
+ * 99 percentile of latency, measured in milliseconds.
1199
+ */
1200
+ p99?: number;
1201
+
1202
+ /**
1203
+ * All the latency data points in the call, measured in milliseconds.
1204
+ */
1205
+ values?: Array<number>;
1206
+ }
833
1207
  }
834
1208
 
835
1209
  export interface TranscriptObject {
@@ -980,29 +1354,111 @@ export interface CallListParams {
980
1354
  export namespace CallListParams {
981
1355
  export interface FilterCriteria {
982
1356
  /**
983
- * Inclusive. Filter calls that end on or after this timestamp.
1357
+ * Only retrieve calls that are made with specific agent(s).
984
1358
  */
985
- after_end_timestamp?: number;
1359
+ agent_id?: Array<string>;
986
1360
 
987
1361
  /**
988
- * Inclusive. Filter calls that start on or after this timestamp.
1362
+ * Only retrieve calls with specific call status(es).
989
1363
  */
990
- after_start_timestamp?: number;
1364
+ call_status?: Array<'registered' | 'ongoing' | 'ended' | 'error'>;
991
1365
 
992
1366
  /**
993
- * Only retrieve calls that are made with specific agent(s).
1367
+ * Only retrieve calls with specific call successful(s).
994
1368
  */
995
- agent_id?: Array<string>;
1369
+ call_successful?: Array<boolean>;
1370
+
1371
+ /**
1372
+ * Only retrieve calls with specific call type(s).
1373
+ */
1374
+ call_type?: Array<'web_call' | 'phone_call'>;
1375
+
1376
+ /**
1377
+ * Only retrieve calls with specific direction(s).
1378
+ */
1379
+ direction?: Array<'inbound' | 'outbound'>;
1380
+
1381
+ /**
1382
+ * Only retrieve calls with specific disconnection reason(s).
1383
+ */
1384
+ disconnection_reason?: Array<
1385
+ | 'user_hangup'
1386
+ | 'agent_hangup'
1387
+ | 'call_transfer'
1388
+ | 'voicemail_reached'
1389
+ | 'inactivity'
1390
+ | 'machine_detected'
1391
+ | 'max_duration_reached'
1392
+ | 'concurrency_limit_reached'
1393
+ | 'no_valid_payment'
1394
+ | 'scam_detected'
1395
+ | 'error_inbound_webhook'
1396
+ | 'dial_busy'
1397
+ | 'dial_failed'
1398
+ | 'dial_no_answer'
1399
+ | 'error_llm_websocket_open'
1400
+ | 'error_llm_websocket_lost_connection'
1401
+ | 'error_llm_websocket_runtime'
1402
+ | 'error_llm_websocket_corrupt_payload'
1403
+ | 'error_frontend_corrupted_payload'
1404
+ | 'error_twilio'
1405
+ | 'error_no_audio_received'
1406
+ | 'error_asr'
1407
+ | 'error_retell'
1408
+ | 'error_unknown'
1409
+ | 'error_user_not_joined'
1410
+ | 'registered_call_timeout'
1411
+ >;
996
1412
 
997
1413
  /**
998
- * Exclusive. Filter calls that end before this timestamp.
1414
+ * Only retrieve calls with specific range of duration(s).
999
1415
  */
1000
- before_end_timestamp?: number;
1416
+ duration_ms?: FilterCriteria.DurationMs;
1001
1417
 
1002
1418
  /**
1003
- * Exclusive. Filter calls that start before this timestamp.
1419
+ * Only retrieve calls with specific from number(s).
1004
1420
  */
1005
- before_start_timestamp?: number;
1421
+ from_number?: Array<string>;
1422
+
1423
+ /**
1424
+ * Only retrieve calls that are in voicemail or not in voicemail.
1425
+ */
1426
+ in_voicemail?: Array<boolean>;
1427
+
1428
+ /**
1429
+ * Only retrieve calls with specific range of start timestamp(s).
1430
+ */
1431
+ start_timestamp?: FilterCriteria.StartTimestamp;
1432
+
1433
+ /**
1434
+ * Only retrieve calls with specific to number(s).
1435
+ */
1436
+ to_number?: Array<string>;
1437
+
1438
+ /**
1439
+ * Only retrieve calls with specific user sentiment(s).
1440
+ */
1441
+ user_sentiment?: Array<'Negative' | 'Positive' | 'Neutral' | 'Unknown'>;
1442
+ }
1443
+
1444
+ export namespace FilterCriteria {
1445
+ /**
1446
+ * Only retrieve calls with specific range of duration(s).
1447
+ */
1448
+ export interface DurationMs {
1449
+ lower_threshold?: number;
1450
+
1451
+ upper_threshold?: number;
1452
+ }
1453
+
1454
+ /**
1455
+ * Only retrieve calls with specific range of start timestamp(s).
1456
+ */
1457
+ export interface StartTimestamp {
1458
+ lower_threshold?: number;
1459
+
1460
+ upper_threshold?: number;
1461
+ }
1006
1462
  }
1007
1463
  }
1008
1464