retell-sdk 4.10.0 → 4.12.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.
@@ -134,6 +134,14 @@ export interface AgentResponse {
134
134
  */
135
135
  backchannel_words?: Array<string> | null;
136
136
 
137
+ /**
138
+ * If set, will delay the first message by the specified amount of milliseconds, so
139
+ * that it gives user more time to prepare to take the call. Valid range is [0,
140
+ * 5000]. If not set or set to 0, agent will speak immediately. Only applicable
141
+ * when agent speaks first.
142
+ */
143
+ begin_message_delay_ms?: number;
144
+
137
145
  /**
138
146
  * Provide a customized list of keywords to bias the transcriber model, so that
139
147
  * these words are more likely to get transcribed. Commonly used for names, brands,
@@ -234,8 +242,8 @@ export interface AgentResponse {
234
242
 
235
243
  /**
236
244
  * Whether this agent opts out of sensitive data storage like transcript,
237
- * recording, logging. These data can still be accessed securely via webhooks. If
238
- * not set, default value of false will apply.
245
+ * recording, logging, inbound/outbound phone numbers, etc. These data can still be
246
+ * accessed securely via webhooks. If not set, default value of false will apply.
239
247
  */
240
248
  opt_out_sensitive_data_storage?: boolean;
241
249
 
@@ -283,16 +291,18 @@ export interface AgentResponse {
283
291
  /**
284
292
  * Optionally set the voice model used for the selected voice. Currently only
285
293
  * elevenlab voices have voice model selections. Set to null to remove voice model
286
- * selection, and default ones will apply. Supported voice models are:
287
- *
288
- * - `eleven_turbo_v2`: Fast english only model, supports pronunciation tags.
289
- *
290
- * - `eleven_turbo_v2_5`: Multilingual model with lowest latency.
291
- *
292
- * - `eleven_multilingual_v2`: Multilingual model with rich emotion and nice
293
- * accent.
294
- */
295
- voice_model?: 'eleven_turbo_v2' | 'eleven_turbo_v2_5' | 'eleven_multilingual_v2' | null;
294
+ * selection, and default ones will apply. Check out the dashboard for details on
295
+ * each voice model.
296
+ */
297
+ voice_model?:
298
+ | 'eleven_turbo_v2'
299
+ | 'eleven_flash_v2'
300
+ | 'eleven_turbo_v2_5'
301
+ | 'eleven_flash_v2_5'
302
+ | 'eleven_multilingual_v2'
303
+ | 'Play3.0-mini'
304
+ | 'PlayDialog'
305
+ | null;
296
306
 
297
307
  /**
298
308
  * Controls speed of voice. Value ranging from [0.5,2]. Lower value means slower
@@ -539,6 +549,14 @@ export interface AgentCreateParams {
539
549
  */
540
550
  backchannel_words?: Array<string> | null;
541
551
 
552
+ /**
553
+ * If set, will delay the first message by the specified amount of milliseconds, so
554
+ * that it gives user more time to prepare to take the call. Valid range is [0,
555
+ * 5000]. If not set or set to 0, agent will speak immediately. Only applicable
556
+ * when agent speaks first.
557
+ */
558
+ begin_message_delay_ms?: number;
559
+
542
560
  /**
543
561
  * Provide a customized list of keywords to bias the transcriber model, so that
544
562
  * these words are more likely to get transcribed. Commonly used for names, brands,
@@ -639,8 +657,8 @@ export interface AgentCreateParams {
639
657
 
640
658
  /**
641
659
  * Whether this agent opts out of sensitive data storage like transcript,
642
- * recording, logging. These data can still be accessed securely via webhooks. If
643
- * not set, default value of false will apply.
660
+ * recording, logging, inbound/outbound phone numbers, etc. These data can still be
661
+ * accessed securely via webhooks. If not set, default value of false will apply.
644
662
  */
645
663
  opt_out_sensitive_data_storage?: boolean;
646
664
 
@@ -688,16 +706,18 @@ export interface AgentCreateParams {
688
706
  /**
689
707
  * Optionally set the voice model used for the selected voice. Currently only
690
708
  * elevenlab voices have voice model selections. Set to null to remove voice model
691
- * selection, and default ones will apply. Supported voice models are:
692
- *
693
- * - `eleven_turbo_v2`: Fast english only model, supports pronunciation tags.
694
- *
695
- * - `eleven_turbo_v2_5`: Multilingual model with lowest latency.
696
- *
697
- * - `eleven_multilingual_v2`: Multilingual model with rich emotion and nice
698
- * accent.
699
- */
700
- voice_model?: 'eleven_turbo_v2' | 'eleven_turbo_v2_5' | 'eleven_multilingual_v2' | null;
709
+ * selection, and default ones will apply. Check out the dashboard for details on
710
+ * each voice model.
711
+ */
712
+ voice_model?:
713
+ | 'eleven_turbo_v2'
714
+ | 'eleven_flash_v2'
715
+ | 'eleven_turbo_v2_5'
716
+ | 'eleven_flash_v2_5'
717
+ | 'eleven_multilingual_v2'
718
+ | 'Play3.0-mini'
719
+ | 'PlayDialog'
720
+ | null;
701
721
 
702
722
  /**
703
723
  * Controls speed of voice. Value ranging from [0.5,2]. Lower value means slower
@@ -931,6 +951,14 @@ export interface AgentUpdateParams {
931
951
  */
932
952
  backchannel_words?: Array<string> | null;
933
953
 
954
+ /**
955
+ * If set, will delay the first message by the specified amount of milliseconds, so
956
+ * that it gives user more time to prepare to take the call. Valid range is [0,
957
+ * 5000]. If not set or set to 0, agent will speak immediately. Only applicable
958
+ * when agent speaks first.
959
+ */
960
+ begin_message_delay_ms?: number;
961
+
934
962
  /**
935
963
  * Provide a customized list of keywords to bias the transcriber model, so that
936
964
  * these words are more likely to get transcribed. Commonly used for names, brands,
@@ -1031,8 +1059,8 @@ export interface AgentUpdateParams {
1031
1059
 
1032
1060
  /**
1033
1061
  * Whether this agent opts out of sensitive data storage like transcript,
1034
- * recording, logging. These data can still be accessed securely via webhooks. If
1035
- * not set, default value of false will apply.
1062
+ * recording, logging, inbound/outbound phone numbers, etc. These data can still be
1063
+ * accessed securely via webhooks. If not set, default value of false will apply.
1036
1064
  */
1037
1065
  opt_out_sensitive_data_storage?: boolean;
1038
1066
 
@@ -1091,16 +1119,18 @@ export interface AgentUpdateParams {
1091
1119
  /**
1092
1120
  * Optionally set the voice model used for the selected voice. Currently only
1093
1121
  * elevenlab voices have voice model selections. Set to null to remove voice model
1094
- * selection, and default ones will apply. Supported voice models are:
1095
- *
1096
- * - `eleven_turbo_v2`: Fast english only model, supports pronunciation tags.
1097
- *
1098
- * - `eleven_turbo_v2_5`: Multilingual model with lowest latency.
1099
- *
1100
- * - `eleven_multilingual_v2`: Multilingual model with rich emotion and nice
1101
- * accent.
1102
- */
1103
- voice_model?: 'eleven_turbo_v2' | 'eleven_turbo_v2_5' | 'eleven_multilingual_v2' | null;
1122
+ * selection, and default ones will apply. Check out the dashboard for details on
1123
+ * each voice model.
1124
+ */
1125
+ voice_model?:
1126
+ | 'eleven_turbo_v2'
1127
+ | 'eleven_flash_v2'
1128
+ | 'eleven_turbo_v2_5'
1129
+ | 'eleven_flash_v2_5'
1130
+ | 'eleven_multilingual_v2'
1131
+ | 'Play3.0-mini'
1132
+ | 'PlayDialog'
1133
+ | null;
1104
1134
 
1105
1135
  /**
1106
1136
  * Controls speed of voice. Value ranging from [0.5,2]. Lower value means slower
@@ -104,6 +104,11 @@ export interface PhoneCallResponse {
104
104
  */
105
105
  call_analysis?: PhoneCallResponse.CallAnalysis;
106
106
 
107
+ /**
108
+ * Cost of the call, including all the products and their costs and discount.
109
+ */
110
+ call_cost?: PhoneCallResponse.CallCost;
111
+
107
112
  /**
108
113
  * The reason for the disconnection of the call. Read details desciption about
109
114
  * reasons listed here at
@@ -243,6 +248,55 @@ export namespace PhoneCallResponse {
243
248
  user_sentiment?: 'Negative' | 'Positive' | 'Neutral' | 'Unknown';
244
249
  }
245
250
 
251
+ /**
252
+ * Cost of the call, including all the products and their costs and discount.
253
+ */
254
+ export interface CallCost {
255
+ /**
256
+ * Combined cost of all individual costs in cents
257
+ */
258
+ combined_cost: number;
259
+
260
+ /**
261
+ * List of products with their unit prices and costs in cents
262
+ */
263
+ product_costs: Array<CallCost.ProductCost>;
264
+
265
+ /**
266
+ * Total duration of the call in seconds
267
+ */
268
+ total_duration_seconds: number;
269
+
270
+ /**
271
+ * Total unit duration price of all products in cents per second
272
+ */
273
+ total_duration_unit_price: number;
274
+
275
+ /**
276
+ * Total one time price of all products in cents per call
277
+ */
278
+ total_one_time_price: number;
279
+ }
280
+
281
+ export namespace CallCost {
282
+ export interface ProductCost {
283
+ /**
284
+ * Cost for the product in cents for the duration of the call.
285
+ */
286
+ cost: number;
287
+
288
+ /**
289
+ * Product name that has a cost associated with it.
290
+ */
291
+ product: string;
292
+
293
+ /**
294
+ * Unit price of the product in cents per second.
295
+ */
296
+ unitPrice: number;
297
+ }
298
+ }
299
+
246
300
  /**
247
301
  * Latency tracking of the call, available after call ends. Not all fields here
248
302
  * will be available, as it depends on the type of call and feature used.
@@ -737,6 +791,11 @@ export interface WebCallResponse {
737
791
  */
738
792
  call_analysis?: WebCallResponse.CallAnalysis;
739
793
 
794
+ /**
795
+ * Cost of the call, including all the products and their costs and discount.
796
+ */
797
+ call_cost?: WebCallResponse.CallCost;
798
+
740
799
  /**
741
800
  * The reason for the disconnection of the call. Read details desciption about
742
801
  * reasons listed here at
@@ -876,6 +935,55 @@ export namespace WebCallResponse {
876
935
  user_sentiment?: 'Negative' | 'Positive' | 'Neutral' | 'Unknown';
877
936
  }
878
937
 
938
+ /**
939
+ * Cost of the call, including all the products and their costs and discount.
940
+ */
941
+ export interface CallCost {
942
+ /**
943
+ * Combined cost of all individual costs in cents
944
+ */
945
+ combined_cost: number;
946
+
947
+ /**
948
+ * List of products with their unit prices and costs in cents
949
+ */
950
+ product_costs: Array<CallCost.ProductCost>;
951
+
952
+ /**
953
+ * Total duration of the call in seconds
954
+ */
955
+ total_duration_seconds: number;
956
+
957
+ /**
958
+ * Total unit duration price of all products in cents per second
959
+ */
960
+ total_duration_unit_price: number;
961
+
962
+ /**
963
+ * Total one time price of all products in cents per call
964
+ */
965
+ total_one_time_price: number;
966
+ }
967
+
968
+ export namespace CallCost {
969
+ export interface ProductCost {
970
+ /**
971
+ * Cost for the product in cents for the duration of the call.
972
+ */
973
+ cost: number;
974
+
975
+ /**
976
+ * Product name that has a cost associated with it.
977
+ */
978
+ product: string;
979
+
980
+ /**
981
+ * Unit price of the product in cents per second.
982
+ */
983
+ unitPrice: number;
984
+ }
985
+ }
986
+
879
987
  /**
880
988
  * Latency tracking of the call, available after call ends. Not all fields here
881
989
  * will be available, as it depends on the type of call and feature used.
@@ -1354,29 +1462,111 @@ export interface CallListParams {
1354
1462
  export namespace CallListParams {
1355
1463
  export interface FilterCriteria {
1356
1464
  /**
1357
- * Inclusive. Filter calls that end on or after this timestamp.
1465
+ * Only retrieve calls that are made with specific agent(s).
1358
1466
  */
1359
- after_end_timestamp?: number;
1467
+ agent_id?: Array<string>;
1360
1468
 
1361
1469
  /**
1362
- * Inclusive. Filter calls that start on or after this timestamp.
1470
+ * Only retrieve calls with specific call status(es).
1363
1471
  */
1364
- after_start_timestamp?: number;
1472
+ call_status?: Array<'registered' | 'ongoing' | 'ended' | 'error'>;
1365
1473
 
1366
1474
  /**
1367
- * Only retrieve calls that are made with specific agent(s).
1475
+ * Only retrieve calls with specific call successful(s).
1368
1476
  */
1369
- agent_id?: Array<string>;
1477
+ call_successful?: Array<boolean>;
1478
+
1479
+ /**
1480
+ * Only retrieve calls with specific call type(s).
1481
+ */
1482
+ call_type?: Array<'web_call' | 'phone_call'>;
1483
+
1484
+ /**
1485
+ * Only retrieve calls with specific direction(s).
1486
+ */
1487
+ direction?: Array<'inbound' | 'outbound'>;
1488
+
1489
+ /**
1490
+ * Only retrieve calls with specific disconnection reason(s).
1491
+ */
1492
+ disconnection_reason?: Array<
1493
+ | 'user_hangup'
1494
+ | 'agent_hangup'
1495
+ | 'call_transfer'
1496
+ | 'voicemail_reached'
1497
+ | 'inactivity'
1498
+ | 'machine_detected'
1499
+ | 'max_duration_reached'
1500
+ | 'concurrency_limit_reached'
1501
+ | 'no_valid_payment'
1502
+ | 'scam_detected'
1503
+ | 'error_inbound_webhook'
1504
+ | 'dial_busy'
1505
+ | 'dial_failed'
1506
+ | 'dial_no_answer'
1507
+ | 'error_llm_websocket_open'
1508
+ | 'error_llm_websocket_lost_connection'
1509
+ | 'error_llm_websocket_runtime'
1510
+ | 'error_llm_websocket_corrupt_payload'
1511
+ | 'error_frontend_corrupted_payload'
1512
+ | 'error_twilio'
1513
+ | 'error_no_audio_received'
1514
+ | 'error_asr'
1515
+ | 'error_retell'
1516
+ | 'error_unknown'
1517
+ | 'error_user_not_joined'
1518
+ | 'registered_call_timeout'
1519
+ >;
1370
1520
 
1371
1521
  /**
1372
- * Exclusive. Filter calls that end before this timestamp.
1522
+ * Only retrieve calls with specific range of duration(s).
1373
1523
  */
1374
- before_end_timestamp?: number;
1524
+ duration_ms?: FilterCriteria.DurationMs;
1375
1525
 
1376
1526
  /**
1377
- * Exclusive. Filter calls that start before this timestamp.
1527
+ * Only retrieve calls with specific from number(s).
1378
1528
  */
1379
- before_start_timestamp?: number;
1529
+ from_number?: Array<string>;
1530
+
1531
+ /**
1532
+ * Only retrieve calls that are in voicemail or not in voicemail.
1533
+ */
1534
+ in_voicemail?: Array<boolean>;
1535
+
1536
+ /**
1537
+ * Only retrieve calls with specific range of start timestamp(s).
1538
+ */
1539
+ start_timestamp?: FilterCriteria.StartTimestamp;
1540
+
1541
+ /**
1542
+ * Only retrieve calls with specific to number(s).
1543
+ */
1544
+ to_number?: Array<string>;
1545
+
1546
+ /**
1547
+ * Only retrieve calls with specific user sentiment(s).
1548
+ */
1549
+ user_sentiment?: Array<'Negative' | 'Positive' | 'Neutral' | 'Unknown'>;
1550
+ }
1551
+
1552
+ export namespace FilterCriteria {
1553
+ /**
1554
+ * Only retrieve calls with specific range of duration(s).
1555
+ */
1556
+ export interface DurationMs {
1557
+ lower_threshold?: number;
1558
+
1559
+ upper_threshold?: number;
1560
+ }
1561
+
1562
+ /**
1563
+ * Only retrieve calls with specific range of start timestamp(s).
1564
+ */
1565
+ export interface StartTimestamp {
1566
+ lower_threshold?: number;
1567
+
1568
+ upper_threshold?: number;
1569
+ }
1380
1570
  }
1381
1571
  }
1382
1572
 
@@ -104,7 +104,7 @@ export interface LlmResponse {
104
104
  /**
105
105
  * Select the underlying text LLM. If not set, would default to gpt-4o.
106
106
  */
107
- model?: 'gpt-4o' | 'gpt-4o-mini' | 'claude-3.5-sonnet' | 'claude-3-haiku' | null;
107
+ model?: 'gpt-4o' | 'gpt-4o-mini' | 'claude-3.5-sonnet' | 'claude-3-haiku' | 'claude-3.5-haiku' | null;
108
108
 
109
109
  /**
110
110
  * If set, will control the randomness of the response. Value ranging from [0,1].
@@ -118,7 +118,7 @@ export interface LlmResponse {
118
118
  * Select the underlying speech to speech model. Can only set this or model, not
119
119
  * both.
120
120
  */
121
- s2s_model?: 'gpt-4o-realtime' | null;
121
+ s2s_model?: 'gpt-4o-realtime' | 'gpt-4o-mini-realtime' | null;
122
122
 
123
123
  /**
124
124
  * Name of the starting state. Required if states is not empty.
@@ -829,7 +829,7 @@ export interface LlmCreateParams {
829
829
  /**
830
830
  * Select the underlying text LLM. If not set, would default to gpt-4o.
831
831
  */
832
- model?: 'gpt-4o' | 'gpt-4o-mini' | 'claude-3.5-sonnet' | 'claude-3-haiku' | null;
832
+ model?: 'gpt-4o' | 'gpt-4o-mini' | 'claude-3.5-sonnet' | 'claude-3-haiku' | 'claude-3.5-haiku' | null;
833
833
 
834
834
  /**
835
835
  * If set, will control the randomness of the response. Value ranging from [0,1].
@@ -843,7 +843,7 @@ export interface LlmCreateParams {
843
843
  * Select the underlying speech to speech model. Can only set this or model, not
844
844
  * both.
845
845
  */
846
- s2s_model?: 'gpt-4o-realtime' | null;
846
+ s2s_model?: 'gpt-4o-realtime' | 'gpt-4o-mini-realtime' | null;
847
847
 
848
848
  /**
849
849
  * Name of the starting state. Required if states is not empty.
@@ -1552,7 +1552,7 @@ export interface LlmUpdateParams {
1552
1552
  /**
1553
1553
  * Select the underlying text LLM. If not set, would default to gpt-4o.
1554
1554
  */
1555
- model?: 'gpt-4o' | 'gpt-4o-mini' | 'claude-3.5-sonnet' | 'claude-3-haiku' | null;
1555
+ model?: 'gpt-4o' | 'gpt-4o-mini' | 'claude-3.5-sonnet' | 'claude-3-haiku' | 'claude-3.5-haiku' | null;
1556
1556
 
1557
1557
  /**
1558
1558
  * If set, will control the randomness of the response. Value ranging from [0,1].
@@ -1566,7 +1566,7 @@ export interface LlmUpdateParams {
1566
1566
  * Select the underlying speech to speech model. Can only set this or model, not
1567
1567
  * both.
1568
1568
  */
1569
- s2s_model?: 'gpt-4o-realtime' | null;
1569
+ s2s_model?: 'gpt-4o-realtime' | 'gpt-4o-mini-realtime' | null;
1570
1570
 
1571
1571
  /**
1572
1572
  * Name of the starting state. Required if states is not empty.
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '4.10.0'; // x-release-please-version
1
+ export const VERSION = '4.12.0'; // x-release-please-version
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "4.10.0";
1
+ export declare const VERSION = "4.12.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '4.10.0'; // x-release-please-version
4
+ exports.VERSION = '4.12.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '4.10.0'; // x-release-please-version
1
+ export const VERSION = '4.12.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map