retell-sdk 5.35.0 → 5.37.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.
Files changed (50) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/package.json +1 -1
  3. package/resources/agent.d.mts +98 -49
  4. package/resources/agent.d.mts.map +1 -1
  5. package/resources/agent.d.ts +98 -49
  6. package/resources/agent.d.ts.map +1 -1
  7. package/resources/agent.js +1 -4
  8. package/resources/agent.js.map +1 -1
  9. package/resources/agent.mjs +1 -4
  10. package/resources/agent.mjs.map +1 -1
  11. package/resources/batch-call.d.mts +31 -15
  12. package/resources/batch-call.d.mts.map +1 -1
  13. package/resources/batch-call.d.ts +31 -15
  14. package/resources/batch-call.d.ts.map +1 -1
  15. package/resources/call.d.mts +141 -49
  16. package/resources/call.d.mts.map +1 -1
  17. package/resources/call.d.ts +141 -49
  18. package/resources/call.d.ts.map +1 -1
  19. package/resources/chat-agent.d.mts +18 -4
  20. package/resources/chat-agent.d.mts.map +1 -1
  21. package/resources/chat-agent.d.ts +18 -4
  22. package/resources/chat-agent.d.ts.map +1 -1
  23. package/resources/chat-agent.js +1 -4
  24. package/resources/chat-agent.js.map +1 -1
  25. package/resources/chat-agent.mjs +1 -4
  26. package/resources/chat-agent.mjs.map +1 -1
  27. package/resources/conversation-flow-component.d.mts +459 -0
  28. package/resources/conversation-flow-component.d.mts.map +1 -1
  29. package/resources/conversation-flow-component.d.ts +459 -0
  30. package/resources/conversation-flow-component.d.ts.map +1 -1
  31. package/resources/conversation-flow.d.mts +1507 -589
  32. package/resources/conversation-flow.d.mts.map +1 -1
  33. package/resources/conversation-flow.d.ts +1507 -589
  34. package/resources/conversation-flow.d.ts.map +1 -1
  35. package/resources/tests.d.mts +4 -2
  36. package/resources/tests.d.mts.map +1 -1
  37. package/resources/tests.d.ts +4 -2
  38. package/resources/tests.d.ts.map +1 -1
  39. package/src/resources/agent.ts +147 -55
  40. package/src/resources/batch-call.ts +47 -17
  41. package/src/resources/call.ts +194 -55
  42. package/src/resources/chat-agent.ts +22 -4
  43. package/src/resources/conversation-flow-component.ts +699 -15
  44. package/src/resources/conversation-flow.ts +1556 -188
  45. package/src/resources/tests.ts +4 -2
  46. package/src/version.ts +1 -1
  47. package/version.d.mts +1 -1
  48. package/version.d.ts +1 -1
  49. package/version.js +1 -1
  50. package/version.mjs +1 -1
@@ -199,6 +199,17 @@ export interface PhoneCallResponse {
199
199
  */
200
200
  agent_name?: string;
201
201
 
202
+ /**
203
+ * Tag pointing at the agent version used for this call, captured at call creation
204
+ * time and frozen thereafter (unaffected by later tag reassignments). Populated
205
+ * whether the caller dispatched by tag, numeric version, "latest", or
206
+ * "latest_published" — when the caller specified a tag, that tag wins; otherwise
207
+ * the most-recently- assigned tag on the resolved version is used. Absent when no
208
+ * tag points at the resolved version (or for calls created before this field was
209
+ * introduced).
210
+ */
211
+ agent_tag?: string | null;
212
+
202
213
  /**
203
214
  * Post call analysis that includes information such as sentiment, status, summary,
204
215
  * and custom defined data to extract. Available after call ends. Subscribe to
@@ -1390,6 +1401,17 @@ export interface WebCallResponse {
1390
1401
  */
1391
1402
  agent_name?: string;
1392
1403
 
1404
+ /**
1405
+ * Tag pointing at the agent version used for this call, captured at call creation
1406
+ * time and frozen thereafter (unaffected by later tag reassignments). Populated
1407
+ * whether the caller dispatched by tag, numeric version, "latest", or
1408
+ * "latest_published" — when the caller specified a tag, that tag wins; otherwise
1409
+ * the most-recently- assigned tag on the resolved version is used. Absent when no
1410
+ * tag points at the resolved version (or for calls created before this field was
1411
+ * introduced).
1412
+ */
1413
+ agent_tag?: string | null;
1414
+
1393
1415
  /**
1394
1416
  * Post call analysis that includes information such as sentiment, status, summary,
1395
1417
  * and custom defined data to extract. Available after call ends. Subscribe to
@@ -2585,6 +2607,17 @@ export namespace CallListResponse {
2585
2607
  */
2586
2608
  agent_name?: string;
2587
2609
 
2610
+ /**
2611
+ * Tag pointing at the agent version used for this call, captured at call creation
2612
+ * time and frozen thereafter (unaffected by later tag reassignments). Populated
2613
+ * whether the caller dispatched by tag, numeric version, "latest", or
2614
+ * "latest_published" — when the caller specified a tag, that tag wins; otherwise
2615
+ * the most-recently- assigned tag on the resolved version is used. Absent when no
2616
+ * tag points at the resolved version (or for calls created before this field was
2617
+ * introduced).
2618
+ */
2619
+ agent_tag?: string | null;
2620
+
2588
2621
  /**
2589
2622
  * Post call analysis that includes information such as sentiment, status, summary,
2590
2623
  * and custom defined data to extract. Available after call ends. Subscribe to
@@ -3299,6 +3332,17 @@ export namespace CallListResponse {
3299
3332
  */
3300
3333
  agent_name?: string;
3301
3334
 
3335
+ /**
3336
+ * Tag pointing at the agent version used for this call, captured at call creation
3337
+ * time and frozen thereafter (unaffected by later tag reassignments). Populated
3338
+ * whether the caller dispatched by tag, numeric version, "latest", or
3339
+ * "latest_published" — when the caller specified a tag, that tag wins; otherwise
3340
+ * the most-recently- assigned tag on the resolved version is used. Absent when no
3341
+ * tag points at the resolved version (or for calls created before this field was
3342
+ * introduced).
3343
+ */
3344
+ agent_tag?: string | null;
3345
+
3302
3346
  /**
3303
3347
  * Post call analysis that includes information such as sentiment, status, summary,
3304
3348
  * and custom defined data to extract. Available after call ends. Subscribe to
@@ -4241,12 +4285,45 @@ export namespace CallCreatePhoneCallParams {
4241
4285
  */
4242
4286
  enable_dynamic_voice_speed?: boolean;
4243
4287
 
4288
+ /**
4289
+ * Master toggle for expressive mode. When true, the agent may add expressive voice
4290
+ * tags to the audio it generates. Only applicable for platform voices. If unset,
4291
+ * defaults to false.
4292
+ */
4293
+ enable_expressive_mode?: boolean;
4294
+
4244
4295
  /**
4245
4296
  * If users stay silent for a period after agent speech, end the call. The minimum
4246
4297
  * value allowed is 10,000 ms (10 s). By default, this is set to 600000 (10 min).
4247
4298
  */
4248
4299
  end_call_after_silence_ms?: number;
4249
4300
 
4301
+ /**
4302
+ * The expressive voice tags Retell pre-teaches the model to use when
4303
+ * enable_expressive_mode is true. Custom tags defined in the system prompt are
4304
+ * still allowed. If empty, the agent follows general expressive guidance without a
4305
+ * fixed tag set.
4306
+ */
4307
+ expressive_emotion_tags?: Array<
4308
+ | 'empathetic'
4309
+ | 'excited'
4310
+ | 'happy'
4311
+ | 'curious'
4312
+ | 'surprised'
4313
+ | 'sigh'
4314
+ | 'clear throat'
4315
+ | 'pause'
4316
+ | 'long pause'
4317
+ | 'emphasis'
4318
+ >;
4319
+
4320
+ /**
4321
+ * Custom expressive voice guidance to use instead of the default Retell expressive
4322
+ * prompt when enable_expressive_mode is true. If omitted or blank, the default
4323
+ * expressive prompt will be used.
4324
+ */
4325
+ expressive_mode_prompt?: string | null;
4326
+
4250
4327
  /**
4251
4328
  * When TTS provider for the selected voice is experiencing outages, we would use
4252
4329
  * fallback voices listed here for the agent. Voice id and the fallback voice ids
@@ -4553,6 +4630,11 @@ export namespace CallCreatePhoneCallParams {
4553
4630
  */
4554
4631
  version_description?: string | null;
4555
4632
 
4633
+ /**
4634
+ * Optional title of the agent version. Used for your own reference.
4635
+ */
4636
+ version_title?: string | null;
4637
+
4556
4638
  /**
4557
4639
  * If set, determines the vocabulary set to use for transcription. This setting
4558
4640
  * only applies for English agents, for non English agent, this setting is a no-op.
@@ -4611,21 +4693,6 @@ export namespace CallCreatePhoneCallParams {
4611
4693
  */
4612
4694
  voice_temperature?: number;
4613
4695
 
4614
- /**
4615
- * Configures when to stop running voicemail detection, as it becomes unlikely to
4616
- * hit voicemail after a couple minutes, and keep running it will only have
4617
- * negative impact. The minimum value allowed is 5,000 ms (5 s), and maximum value
4618
- * allowed is 180,000 (3 minutes). By default, this is set to 30,000 (30 s).
4619
- */
4620
- voicemail_detection_timeout_ms?: number;
4621
-
4622
- /**
4623
- * The message to be played when the call enters a voicemail. Note that this
4624
- * feature is only available for phone calls. If you want to hangup after hitting
4625
- * voicemail, set this to empty string.
4626
- */
4627
- voicemail_message?: string;
4628
-
4629
4696
  /**
4630
4697
  * If this option is set, the call will try to detect voicemail in the first 3
4631
4698
  * minutes of the call. Actions defined (hangup, or leave a message) will be
@@ -4697,14 +4764,14 @@ export namespace CallCreatePhoneCallParams {
4697
4764
  export interface CustomSttConfig {
4698
4765
  /**
4699
4766
  * Endpointing timeout in milliseconds. Minimum is 100 for Azure, 10 for Deepgram,
4700
- * 500 for Soniox
4767
+ * 500 for Soniox, 100 for AssemblyAI.
4701
4768
  */
4702
4769
  endpointing_ms: number;
4703
4770
 
4704
4771
  /**
4705
4772
  * ASR provider name.
4706
4773
  */
4707
- provider: 'azure' | 'deepgram' | 'soniox';
4774
+ provider: 'azure' | 'deepgram' | 'soniox' | 'assemblyai';
4708
4775
  }
4709
4776
 
4710
4777
  /**
@@ -4745,6 +4812,13 @@ export namespace CallCreatePhoneCallParams {
4745
4812
  */
4746
4813
  ai_disclosure?: boolean;
4747
4814
 
4815
+ /**
4816
+ * Enables Conversational Personality. When true, the agent uses the Conversational
4817
+ * Personality handbook preset, skips Professional Rep Personality during prompt
4818
+ * assembly, and enables internal colloquial rewrite behavior.
4819
+ */
4820
+ conversational_personality?: boolean;
4821
+
4748
4822
  /**
4749
4823
  * Professional call center rep baseline.
4750
4824
  */
@@ -5600,12 +5674,45 @@ export namespace CallRegisterPhoneCallParams {
5600
5674
  */
5601
5675
  enable_dynamic_voice_speed?: boolean;
5602
5676
 
5677
+ /**
5678
+ * Master toggle for expressive mode. When true, the agent may add expressive voice
5679
+ * tags to the audio it generates. Only applicable for platform voices. If unset,
5680
+ * defaults to false.
5681
+ */
5682
+ enable_expressive_mode?: boolean;
5683
+
5603
5684
  /**
5604
5685
  * If users stay silent for a period after agent speech, end the call. The minimum
5605
5686
  * value allowed is 10,000 ms (10 s). By default, this is set to 600000 (10 min).
5606
5687
  */
5607
5688
  end_call_after_silence_ms?: number;
5608
5689
 
5690
+ /**
5691
+ * The expressive voice tags Retell pre-teaches the model to use when
5692
+ * enable_expressive_mode is true. Custom tags defined in the system prompt are
5693
+ * still allowed. If empty, the agent follows general expressive guidance without a
5694
+ * fixed tag set.
5695
+ */
5696
+ expressive_emotion_tags?: Array<
5697
+ | 'empathetic'
5698
+ | 'excited'
5699
+ | 'happy'
5700
+ | 'curious'
5701
+ | 'surprised'
5702
+ | 'sigh'
5703
+ | 'clear throat'
5704
+ | 'pause'
5705
+ | 'long pause'
5706
+ | 'emphasis'
5707
+ >;
5708
+
5709
+ /**
5710
+ * Custom expressive voice guidance to use instead of the default Retell expressive
5711
+ * prompt when enable_expressive_mode is true. If omitted or blank, the default
5712
+ * expressive prompt will be used.
5713
+ */
5714
+ expressive_mode_prompt?: string | null;
5715
+
5609
5716
  /**
5610
5717
  * When TTS provider for the selected voice is experiencing outages, we would use
5611
5718
  * fallback voices listed here for the agent. Voice id and the fallback voice ids
@@ -5912,6 +6019,11 @@ export namespace CallRegisterPhoneCallParams {
5912
6019
  */
5913
6020
  version_description?: string | null;
5914
6021
 
6022
+ /**
6023
+ * Optional title of the agent version. Used for your own reference.
6024
+ */
6025
+ version_title?: string | null;
6026
+
5915
6027
  /**
5916
6028
  * If set, determines the vocabulary set to use for transcription. This setting
5917
6029
  * only applies for English agents, for non English agent, this setting is a no-op.
@@ -5970,21 +6082,6 @@ export namespace CallRegisterPhoneCallParams {
5970
6082
  */
5971
6083
  voice_temperature?: number;
5972
6084
 
5973
- /**
5974
- * Configures when to stop running voicemail detection, as it becomes unlikely to
5975
- * hit voicemail after a couple minutes, and keep running it will only have
5976
- * negative impact. The minimum value allowed is 5,000 ms (5 s), and maximum value
5977
- * allowed is 180,000 (3 minutes). By default, this is set to 30,000 (30 s).
5978
- */
5979
- voicemail_detection_timeout_ms?: number;
5980
-
5981
- /**
5982
- * The message to be played when the call enters a voicemail. Note that this
5983
- * feature is only available for phone calls. If you want to hangup after hitting
5984
- * voicemail, set this to empty string.
5985
- */
5986
- voicemail_message?: string;
5987
-
5988
6085
  /**
5989
6086
  * If this option is set, the call will try to detect voicemail in the first 3
5990
6087
  * minutes of the call. Actions defined (hangup, or leave a message) will be
@@ -6056,14 +6153,14 @@ export namespace CallRegisterPhoneCallParams {
6056
6153
  export interface CustomSttConfig {
6057
6154
  /**
6058
6155
  * Endpointing timeout in milliseconds. Minimum is 100 for Azure, 10 for Deepgram,
6059
- * 500 for Soniox
6156
+ * 500 for Soniox, 100 for AssemblyAI.
6060
6157
  */
6061
6158
  endpointing_ms: number;
6062
6159
 
6063
6160
  /**
6064
6161
  * ASR provider name.
6065
6162
  */
6066
- provider: 'azure' | 'deepgram' | 'soniox';
6163
+ provider: 'azure' | 'deepgram' | 'soniox' | 'assemblyai';
6067
6164
  }
6068
6165
 
6069
6166
  /**
@@ -6104,6 +6201,13 @@ export namespace CallRegisterPhoneCallParams {
6104
6201
  */
6105
6202
  ai_disclosure?: boolean;
6106
6203
 
6204
+ /**
6205
+ * Enables Conversational Personality. When true, the agent uses the Conversational
6206
+ * Personality handbook preset, skips Professional Rep Personality during prompt
6207
+ * assembly, and enables internal colloquial rewrite behavior.
6208
+ */
6209
+ conversational_personality?: boolean;
6210
+
6107
6211
  /**
6108
6212
  * Professional call center rep baseline.
6109
6213
  */
@@ -6959,12 +7063,45 @@ export namespace CallCreateWebCallParams {
6959
7063
  */
6960
7064
  enable_dynamic_voice_speed?: boolean;
6961
7065
 
7066
+ /**
7067
+ * Master toggle for expressive mode. When true, the agent may add expressive voice
7068
+ * tags to the audio it generates. Only applicable for platform voices. If unset,
7069
+ * defaults to false.
7070
+ */
7071
+ enable_expressive_mode?: boolean;
7072
+
6962
7073
  /**
6963
7074
  * If users stay silent for a period after agent speech, end the call. The minimum
6964
7075
  * value allowed is 10,000 ms (10 s). By default, this is set to 600000 (10 min).
6965
7076
  */
6966
7077
  end_call_after_silence_ms?: number;
6967
7078
 
7079
+ /**
7080
+ * The expressive voice tags Retell pre-teaches the model to use when
7081
+ * enable_expressive_mode is true. Custom tags defined in the system prompt are
7082
+ * still allowed. If empty, the agent follows general expressive guidance without a
7083
+ * fixed tag set.
7084
+ */
7085
+ expressive_emotion_tags?: Array<
7086
+ | 'empathetic'
7087
+ | 'excited'
7088
+ | 'happy'
7089
+ | 'curious'
7090
+ | 'surprised'
7091
+ | 'sigh'
7092
+ | 'clear throat'
7093
+ | 'pause'
7094
+ | 'long pause'
7095
+ | 'emphasis'
7096
+ >;
7097
+
7098
+ /**
7099
+ * Custom expressive voice guidance to use instead of the default Retell expressive
7100
+ * prompt when enable_expressive_mode is true. If omitted or blank, the default
7101
+ * expressive prompt will be used.
7102
+ */
7103
+ expressive_mode_prompt?: string | null;
7104
+
6968
7105
  /**
6969
7106
  * When TTS provider for the selected voice is experiencing outages, we would use
6970
7107
  * fallback voices listed here for the agent. Voice id and the fallback voice ids
@@ -7271,6 +7408,11 @@ export namespace CallCreateWebCallParams {
7271
7408
  */
7272
7409
  version_description?: string | null;
7273
7410
 
7411
+ /**
7412
+ * Optional title of the agent version. Used for your own reference.
7413
+ */
7414
+ version_title?: string | null;
7415
+
7274
7416
  /**
7275
7417
  * If set, determines the vocabulary set to use for transcription. This setting
7276
7418
  * only applies for English agents, for non English agent, this setting is a no-op.
@@ -7329,21 +7471,6 @@ export namespace CallCreateWebCallParams {
7329
7471
  */
7330
7472
  voice_temperature?: number;
7331
7473
 
7332
- /**
7333
- * Configures when to stop running voicemail detection, as it becomes unlikely to
7334
- * hit voicemail after a couple minutes, and keep running it will only have
7335
- * negative impact. The minimum value allowed is 5,000 ms (5 s), and maximum value
7336
- * allowed is 180,000 (3 minutes). By default, this is set to 30,000 (30 s).
7337
- */
7338
- voicemail_detection_timeout_ms?: number;
7339
-
7340
- /**
7341
- * The message to be played when the call enters a voicemail. Note that this
7342
- * feature is only available for phone calls. If you want to hangup after hitting
7343
- * voicemail, set this to empty string.
7344
- */
7345
- voicemail_message?: string;
7346
-
7347
7474
  /**
7348
7475
  * If this option is set, the call will try to detect voicemail in the first 3
7349
7476
  * minutes of the call. Actions defined (hangup, or leave a message) will be
@@ -7415,14 +7542,14 @@ export namespace CallCreateWebCallParams {
7415
7542
  export interface CustomSttConfig {
7416
7543
  /**
7417
7544
  * Endpointing timeout in milliseconds. Minimum is 100 for Azure, 10 for Deepgram,
7418
- * 500 for Soniox
7545
+ * 500 for Soniox, 100 for AssemblyAI.
7419
7546
  */
7420
7547
  endpointing_ms: number;
7421
7548
 
7422
7549
  /**
7423
7550
  * ASR provider name.
7424
7551
  */
7425
- provider: 'azure' | 'deepgram' | 'soniox';
7552
+ provider: 'azure' | 'deepgram' | 'soniox' | 'assemblyai';
7426
7553
  }
7427
7554
 
7428
7555
  /**
@@ -7463,6 +7590,13 @@ export namespace CallCreateWebCallParams {
7463
7590
  */
7464
7591
  ai_disclosure?: boolean;
7465
7592
 
7593
+ /**
7594
+ * Enables Conversational Personality. When true, the agent uses the Conversational
7595
+ * Personality handbook preset, skips Professional Rep Personality during prompt
7596
+ * assembly, and enables internal colloquial rewrite behavior.
7597
+ */
7598
+ conversational_personality?: boolean;
7599
+
7466
7600
  /**
7467
7601
  * Professional call center rep baseline.
7468
7602
  */
@@ -8849,19 +8983,24 @@ export namespace CallListParams {
8849
8983
 
8850
8984
  export interface ToolCall {
8851
8985
  /**
8852
- * The tool call name to filter on.
8986
+ * Filter by tool call latency in milliseconds.
8853
8987
  */
8854
- name: string;
8988
+ latency_ms?: ToolCall.NumberFilter | ToolCall.RangeFilter;
8855
8989
 
8856
8990
  /**
8857
- * Filter by tool call latency in milliseconds.
8991
+ * The tool call name to filter on.
8858
8992
  */
8859
- latency_ms?: ToolCall.NumberFilter | ToolCall.RangeFilter;
8993
+ name?: string;
8860
8994
 
8861
8995
  /**
8862
8996
  * Filter by tool call success status.
8863
8997
  */
8864
8998
  success?: ToolCall.Success;
8999
+
9000
+ /**
9001
+ * The tool call type to filter on.
9002
+ */
9003
+ type?: string;
8865
9004
  }
8866
9005
 
8867
9006
  export namespace ToolCall {
@@ -46,10 +46,7 @@ export class ChatAgent extends APIResource {
46
46
  /**
47
47
  * List all chat agents
48
48
  *
49
- * @example
50
- * ```ts
51
- * const chatAgentResponses = await client.chatAgent.list();
52
- * ```
49
+ * @deprecated
53
50
  */
54
51
  list(
55
52
  query: ChatAgentListParams | null | undefined = {},
@@ -475,6 +472,11 @@ export interface ChatAgentResponse {
475
472
  */
476
473
  version?: number;
477
474
 
475
+ /**
476
+ * Optional title of the chat agent version. Used for your own reference.
477
+ */
478
+ version_title?: string | null;
479
+
478
480
  /**
479
481
  * Which webhook events this agent should receive. If not set, defaults to
480
482
  * chat_started, chat_ended, chat_analyzed.
@@ -1074,6 +1076,11 @@ export interface ChatAgentCreateParams {
1074
1076
  */
1075
1077
  timezone?: string | null;
1076
1078
 
1079
+ /**
1080
+ * Optional title of the chat agent version. Used for your own reference.
1081
+ */
1082
+ version_title?: string | null;
1083
+
1077
1084
  /**
1078
1085
  * Which webhook events this agent should receive. If not set, defaults to
1079
1086
  * chat_started, chat_ended, chat_analyzed.
@@ -1710,6 +1717,12 @@ export interface ChatAgentUpdateParams {
1710
1717
  */
1711
1718
  timezone?: string | null;
1712
1719
 
1720
+ /**
1721
+ * Body param: Optional title of the chat agent version. Used for your own
1722
+ * reference.
1723
+ */
1724
+ version_title?: string | null;
1725
+
1713
1726
  /**
1714
1727
  * Body param: Which webhook events this agent should receive. If not set, defaults
1715
1728
  * to chat_started, chat_ended, chat_analyzed.
@@ -2033,6 +2046,11 @@ export interface ChatAgentPublishParams {
2033
2046
  version: number;
2034
2047
 
2035
2048
  version_description?: string;
2049
+
2050
+ /**
2051
+ * Optional title of the agent version. Used for your own reference.
2052
+ */
2053
+ version_title?: string;
2036
2054
  }
2037
2055
 
2038
2056
  export interface ChatAgentCreateVersionParams {