retell-sdk 5.10.3 → 5.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.
Files changed (52) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/README.md +2 -2
  3. package/client.d.mts +6 -3
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +6 -3
  6. package/client.d.ts.map +1 -1
  7. package/client.js +3 -3
  8. package/client.js.map +1 -1
  9. package/client.mjs +3 -3
  10. package/client.mjs.map +1 -1
  11. package/package.json +1 -1
  12. package/resources/agent.d.mts +316 -3
  13. package/resources/agent.d.mts.map +1 -1
  14. package/resources/agent.d.ts +316 -3
  15. package/resources/agent.d.ts.map +1 -1
  16. package/resources/batch-call.d.mts +105 -1
  17. package/resources/batch-call.d.mts.map +1 -1
  18. package/resources/batch-call.d.ts +105 -1
  19. package/resources/batch-call.d.ts.map +1 -1
  20. package/resources/call.d.mts +315 -3
  21. package/resources/call.d.mts.map +1 -1
  22. package/resources/call.d.ts +315 -3
  23. package/resources/call.d.ts.map +1 -1
  24. package/resources/chat-agent.d.mts +255 -3
  25. package/resources/chat-agent.d.mts.map +1 -1
  26. package/resources/chat-agent.d.ts +255 -3
  27. package/resources/chat-agent.d.ts.map +1 -1
  28. package/resources/conversation-flow-component.d.mts +2164 -730
  29. package/resources/conversation-flow-component.d.mts.map +1 -1
  30. package/resources/conversation-flow-component.d.ts +2164 -730
  31. package/resources/conversation-flow-component.d.ts.map +1 -1
  32. package/resources/conversation-flow.d.mts +13562 -10694
  33. package/resources/conversation-flow.d.mts.map +1 -1
  34. package/resources/conversation-flow.d.ts +13562 -10694
  35. package/resources/conversation-flow.d.ts.map +1 -1
  36. package/resources/llm.d.mts +246 -0
  37. package/resources/llm.d.mts.map +1 -1
  38. package/resources/llm.d.ts +246 -0
  39. package/resources/llm.d.ts.map +1 -1
  40. package/src/client.ts +11 -4
  41. package/src/resources/agent.ts +376 -0
  42. package/src/resources/batch-call.ts +125 -0
  43. package/src/resources/call.ts +375 -0
  44. package/src/resources/chat-agent.ts +300 -0
  45. package/src/resources/conversation-flow-component.ts +8295 -6198
  46. package/src/resources/conversation-flow.ts +9667 -5473
  47. package/src/resources/llm.ts +288 -0
  48. package/src/version.ts +1 -1
  49. package/version.d.mts +1 -1
  50. package/version.d.ts +1 -1
  51. package/version.js +1 -1
  52. package/version.mjs +1 -1
@@ -2733,6 +2733,11 @@ export namespace CallCreatePhoneCallParams {
2733
2733
  */
2734
2734
  guardrail_config?: Agent.GuardrailConfig;
2735
2735
 
2736
+ /**
2737
+ * Toggle behavior presets on/off to influence agent response style and behaviors.
2738
+ */
2739
+ handbook_config?: Agent.HandbookConfig;
2740
+
2736
2741
  /**
2737
2742
  * Controls how sensitive the agent is to user interruptions. Value ranging from
2738
2743
  * [0,1]. Lower value means it will take longer / more words for user to interrupt
@@ -2867,6 +2872,7 @@ export namespace CallCreatePhoneCallParams {
2867
2872
  | Agent.EnumAnalysisData
2868
2873
  | Agent.BooleanAnalysisData
2869
2874
  | Agent.NumberAnalysisData
2875
+ | Agent.CallPresetAnalysisData
2870
2876
  > | null;
2871
2877
 
2872
2878
  /**
@@ -2952,6 +2958,12 @@ export namespace CallCreatePhoneCallParams {
2952
2958
  */
2953
2959
  stt_mode?: 'fast' | 'accurate' | 'custom';
2954
2960
 
2961
+ /**
2962
+ * IANA timezone for the agent (e.g. America/New_York). Defaults to
2963
+ * America/Los_Angeles if not set.
2964
+ */
2965
+ timezone?: string | null;
2966
+
2955
2967
  user_dtmf_options?: Agent.UserDtmfOptions | null;
2956
2968
 
2957
2969
  /**
@@ -3120,6 +3132,58 @@ export namespace CallCreatePhoneCallParams {
3120
3132
  > | null;
3121
3133
  }
3122
3134
 
3135
+ /**
3136
+ * Toggle behavior presets on/off to influence agent response style and behaviors.
3137
+ */
3138
+ export interface HandbookConfig {
3139
+ /**
3140
+ * When asked, acknowledge being a virtual assistant.
3141
+ */
3142
+ ai_disclosure?: boolean;
3143
+
3144
+ /**
3145
+ * Professional call center rep baseline.
3146
+ */
3147
+ default_personality?: boolean;
3148
+
3149
+ /**
3150
+ * Repeat back and confirm important details (voice only).
3151
+ */
3152
+ echo_verification?: boolean;
3153
+
3154
+ /**
3155
+ * Warm acknowledgment of caller concerns.
3156
+ */
3157
+ high_empathy?: boolean;
3158
+
3159
+ /**
3160
+ * Spell using NATO phonetic alphabet style (voice only).
3161
+ */
3162
+ nato_phonetic_alphabet?: boolean;
3163
+
3164
+ /**
3165
+ * Sprinkle natural speech fillers like "um", "you know" for a more human,
3166
+ * conversational tone.
3167
+ */
3168
+ natural_filler_words?: boolean;
3169
+
3170
+ /**
3171
+ * Stay within prompt/context scope, don't invent details.
3172
+ */
3173
+ scope_boundaries?: boolean;
3174
+
3175
+ /**
3176
+ * Treat near-match similar words as same entity to reduce impact of transcription
3177
+ * error (voice only).
3178
+ */
3179
+ smart_matching?: boolean;
3180
+
3181
+ /**
3182
+ * Convert numbers/dates/currency to spoken forms (voice only).
3183
+ */
3184
+ speech_normalization?: boolean;
3185
+ }
3186
+
3123
3187
  /**
3124
3188
  * If this option is set, the call will try to detect IVR in the first 3 minutes of
3125
3189
  * the call. Actions defined will be applied when the IVR is detected. Set this to
@@ -3181,6 +3245,13 @@ export namespace CallCreatePhoneCallParams {
3181
3245
  */
3182
3246
  type: 'string';
3183
3247
 
3248
+ /**
3249
+ * Optional instruction to help decide whether this field needs to be populated in
3250
+ * the analysis. If not set, the field is always included. If required is true,
3251
+ * this is ignored.
3252
+ */
3253
+ conditional_prompt?: string;
3254
+
3184
3255
  /**
3185
3256
  * Examples of the variable value to teach model the style and syntax.
3186
3257
  */
@@ -3214,6 +3285,13 @@ export namespace CallCreatePhoneCallParams {
3214
3285
  */
3215
3286
  type: 'enum';
3216
3287
 
3288
+ /**
3289
+ * Optional instruction to help decide whether this field needs to be populated in
3290
+ * the analysis. If not set, the field is always included. If required is true,
3291
+ * this is ignored.
3292
+ */
3293
+ conditional_prompt?: string;
3294
+
3217
3295
  /**
3218
3296
  * Whether this data is required. If true and the data is not extracted, the call
3219
3297
  * will be marked as unsuccessful.
@@ -3237,6 +3315,13 @@ export namespace CallCreatePhoneCallParams {
3237
3315
  */
3238
3316
  type: 'boolean';
3239
3317
 
3318
+ /**
3319
+ * Optional instruction to help decide whether this field needs to be populated in
3320
+ * the analysis. If not set, the field is always included. If required is true,
3321
+ * this is ignored.
3322
+ */
3323
+ conditional_prompt?: string;
3324
+
3240
3325
  /**
3241
3326
  * Whether this data is required. If true and the data is not extracted, the call
3242
3327
  * will be marked as unsuccessful.
@@ -3260,6 +3345,13 @@ export namespace CallCreatePhoneCallParams {
3260
3345
  */
3261
3346
  type: 'number';
3262
3347
 
3348
+ /**
3349
+ * Optional instruction to help decide whether this field needs to be populated in
3350
+ * the analysis. If not set, the field is always included. If required is true,
3351
+ * this is ignored.
3352
+ */
3353
+ conditional_prompt?: string;
3354
+
3263
3355
  /**
3264
3356
  * Whether this data is required. If true and the data is not extracted, the call
3265
3357
  * will be marked as unsuccessful.
@@ -3267,6 +3359,39 @@ export namespace CallCreatePhoneCallParams {
3267
3359
  required?: boolean;
3268
3360
  }
3269
3361
 
3362
+ /**
3363
+ * System preset for post-call analysis (voice agents). Use in
3364
+ * post_call_analysis_data to override prompts or mark fields optional.
3365
+ */
3366
+ export interface CallPresetAnalysisData {
3367
+ /**
3368
+ * Preset identifier for voice agent analysis.
3369
+ */
3370
+ name: 'call_summary' | 'call_successful' | 'user_sentiment';
3371
+
3372
+ /**
3373
+ * Identifies this item as a system preset.
3374
+ */
3375
+ type: 'system-presets';
3376
+
3377
+ /**
3378
+ * Optional instruction to help decide whether this field needs to be populated. If
3379
+ * not set, the field is always included.
3380
+ */
3381
+ conditional_prompt?: string;
3382
+
3383
+ /**
3384
+ * Prompt or description for this preset.
3385
+ */
3386
+ description?: string;
3387
+
3388
+ /**
3389
+ * If false, this field is optional in the analysis. If true or unset, the field is
3390
+ * required.
3391
+ */
3392
+ required?: boolean;
3393
+ }
3394
+
3270
3395
  export interface PronunciationDictionary {
3271
3396
  /**
3272
3397
  * The phonetic alphabet to be used for pronunciation.
@@ -3862,6 +3987,11 @@ export namespace CallCreateWebCallParams {
3862
3987
  */
3863
3988
  guardrail_config?: Agent.GuardrailConfig;
3864
3989
 
3990
+ /**
3991
+ * Toggle behavior presets on/off to influence agent response style and behaviors.
3992
+ */
3993
+ handbook_config?: Agent.HandbookConfig;
3994
+
3865
3995
  /**
3866
3996
  * Controls how sensitive the agent is to user interruptions. Value ranging from
3867
3997
  * [0,1]. Lower value means it will take longer / more words for user to interrupt
@@ -3996,6 +4126,7 @@ export namespace CallCreateWebCallParams {
3996
4126
  | Agent.EnumAnalysisData
3997
4127
  | Agent.BooleanAnalysisData
3998
4128
  | Agent.NumberAnalysisData
4129
+ | Agent.CallPresetAnalysisData
3999
4130
  > | null;
4000
4131
 
4001
4132
  /**
@@ -4081,6 +4212,12 @@ export namespace CallCreateWebCallParams {
4081
4212
  */
4082
4213
  stt_mode?: 'fast' | 'accurate' | 'custom';
4083
4214
 
4215
+ /**
4216
+ * IANA timezone for the agent (e.g. America/New_York). Defaults to
4217
+ * America/Los_Angeles if not set.
4218
+ */
4219
+ timezone?: string | null;
4220
+
4084
4221
  user_dtmf_options?: Agent.UserDtmfOptions | null;
4085
4222
 
4086
4223
  /**
@@ -4249,6 +4386,58 @@ export namespace CallCreateWebCallParams {
4249
4386
  > | null;
4250
4387
  }
4251
4388
 
4389
+ /**
4390
+ * Toggle behavior presets on/off to influence agent response style and behaviors.
4391
+ */
4392
+ export interface HandbookConfig {
4393
+ /**
4394
+ * When asked, acknowledge being a virtual assistant.
4395
+ */
4396
+ ai_disclosure?: boolean;
4397
+
4398
+ /**
4399
+ * Professional call center rep baseline.
4400
+ */
4401
+ default_personality?: boolean;
4402
+
4403
+ /**
4404
+ * Repeat back and confirm important details (voice only).
4405
+ */
4406
+ echo_verification?: boolean;
4407
+
4408
+ /**
4409
+ * Warm acknowledgment of caller concerns.
4410
+ */
4411
+ high_empathy?: boolean;
4412
+
4413
+ /**
4414
+ * Spell using NATO phonetic alphabet style (voice only).
4415
+ */
4416
+ nato_phonetic_alphabet?: boolean;
4417
+
4418
+ /**
4419
+ * Sprinkle natural speech fillers like "um", "you know" for a more human,
4420
+ * conversational tone.
4421
+ */
4422
+ natural_filler_words?: boolean;
4423
+
4424
+ /**
4425
+ * Stay within prompt/context scope, don't invent details.
4426
+ */
4427
+ scope_boundaries?: boolean;
4428
+
4429
+ /**
4430
+ * Treat near-match similar words as same entity to reduce impact of transcription
4431
+ * error (voice only).
4432
+ */
4433
+ smart_matching?: boolean;
4434
+
4435
+ /**
4436
+ * Convert numbers/dates/currency to spoken forms (voice only).
4437
+ */
4438
+ speech_normalization?: boolean;
4439
+ }
4440
+
4252
4441
  /**
4253
4442
  * If this option is set, the call will try to detect IVR in the first 3 minutes of
4254
4443
  * the call. Actions defined will be applied when the IVR is detected. Set this to
@@ -4310,6 +4499,13 @@ export namespace CallCreateWebCallParams {
4310
4499
  */
4311
4500
  type: 'string';
4312
4501
 
4502
+ /**
4503
+ * Optional instruction to help decide whether this field needs to be populated in
4504
+ * the analysis. If not set, the field is always included. If required is true,
4505
+ * this is ignored.
4506
+ */
4507
+ conditional_prompt?: string;
4508
+
4313
4509
  /**
4314
4510
  * Examples of the variable value to teach model the style and syntax.
4315
4511
  */
@@ -4343,6 +4539,13 @@ export namespace CallCreateWebCallParams {
4343
4539
  */
4344
4540
  type: 'enum';
4345
4541
 
4542
+ /**
4543
+ * Optional instruction to help decide whether this field needs to be populated in
4544
+ * the analysis. If not set, the field is always included. If required is true,
4545
+ * this is ignored.
4546
+ */
4547
+ conditional_prompt?: string;
4548
+
4346
4549
  /**
4347
4550
  * Whether this data is required. If true and the data is not extracted, the call
4348
4551
  * will be marked as unsuccessful.
@@ -4366,6 +4569,13 @@ export namespace CallCreateWebCallParams {
4366
4569
  */
4367
4570
  type: 'boolean';
4368
4571
 
4572
+ /**
4573
+ * Optional instruction to help decide whether this field needs to be populated in
4574
+ * the analysis. If not set, the field is always included. If required is true,
4575
+ * this is ignored.
4576
+ */
4577
+ conditional_prompt?: string;
4578
+
4369
4579
  /**
4370
4580
  * Whether this data is required. If true and the data is not extracted, the call
4371
4581
  * will be marked as unsuccessful.
@@ -4389,6 +4599,13 @@ export namespace CallCreateWebCallParams {
4389
4599
  */
4390
4600
  type: 'number';
4391
4601
 
4602
+ /**
4603
+ * Optional instruction to help decide whether this field needs to be populated in
4604
+ * the analysis. If not set, the field is always included. If required is true,
4605
+ * this is ignored.
4606
+ */
4607
+ conditional_prompt?: string;
4608
+
4392
4609
  /**
4393
4610
  * Whether this data is required. If true and the data is not extracted, the call
4394
4611
  * will be marked as unsuccessful.
@@ -4396,6 +4613,39 @@ export namespace CallCreateWebCallParams {
4396
4613
  required?: boolean;
4397
4614
  }
4398
4615
 
4616
+ /**
4617
+ * System preset for post-call analysis (voice agents). Use in
4618
+ * post_call_analysis_data to override prompts or mark fields optional.
4619
+ */
4620
+ export interface CallPresetAnalysisData {
4621
+ /**
4622
+ * Preset identifier for voice agent analysis.
4623
+ */
4624
+ name: 'call_summary' | 'call_successful' | 'user_sentiment';
4625
+
4626
+ /**
4627
+ * Identifies this item as a system preset.
4628
+ */
4629
+ type: 'system-presets';
4630
+
4631
+ /**
4632
+ * Optional instruction to help decide whether this field needs to be populated. If
4633
+ * not set, the field is always included.
4634
+ */
4635
+ conditional_prompt?: string;
4636
+
4637
+ /**
4638
+ * Prompt or description for this preset.
4639
+ */
4640
+ description?: string;
4641
+
4642
+ /**
4643
+ * If false, this field is optional in the analysis. If true or unset, the field is
4644
+ * required.
4645
+ */
4646
+ required?: boolean;
4647
+ }
4648
+
4399
4649
  export interface PronunciationDictionary {
4400
4650
  /**
4401
4651
  * The phonetic alphabet to be used for pronunciation.
@@ -4991,6 +5241,11 @@ export namespace CallRegisterPhoneCallParams {
4991
5241
  */
4992
5242
  guardrail_config?: Agent.GuardrailConfig;
4993
5243
 
5244
+ /**
5245
+ * Toggle behavior presets on/off to influence agent response style and behaviors.
5246
+ */
5247
+ handbook_config?: Agent.HandbookConfig;
5248
+
4994
5249
  /**
4995
5250
  * Controls how sensitive the agent is to user interruptions. Value ranging from
4996
5251
  * [0,1]. Lower value means it will take longer / more words for user to interrupt
@@ -5125,6 +5380,7 @@ export namespace CallRegisterPhoneCallParams {
5125
5380
  | Agent.EnumAnalysisData
5126
5381
  | Agent.BooleanAnalysisData
5127
5382
  | Agent.NumberAnalysisData
5383
+ | Agent.CallPresetAnalysisData
5128
5384
  > | null;
5129
5385
 
5130
5386
  /**
@@ -5210,6 +5466,12 @@ export namespace CallRegisterPhoneCallParams {
5210
5466
  */
5211
5467
  stt_mode?: 'fast' | 'accurate' | 'custom';
5212
5468
 
5469
+ /**
5470
+ * IANA timezone for the agent (e.g. America/New_York). Defaults to
5471
+ * America/Los_Angeles if not set.
5472
+ */
5473
+ timezone?: string | null;
5474
+
5213
5475
  user_dtmf_options?: Agent.UserDtmfOptions | null;
5214
5476
 
5215
5477
  /**
@@ -5378,6 +5640,58 @@ export namespace CallRegisterPhoneCallParams {
5378
5640
  > | null;
5379
5641
  }
5380
5642
 
5643
+ /**
5644
+ * Toggle behavior presets on/off to influence agent response style and behaviors.
5645
+ */
5646
+ export interface HandbookConfig {
5647
+ /**
5648
+ * When asked, acknowledge being a virtual assistant.
5649
+ */
5650
+ ai_disclosure?: boolean;
5651
+
5652
+ /**
5653
+ * Professional call center rep baseline.
5654
+ */
5655
+ default_personality?: boolean;
5656
+
5657
+ /**
5658
+ * Repeat back and confirm important details (voice only).
5659
+ */
5660
+ echo_verification?: boolean;
5661
+
5662
+ /**
5663
+ * Warm acknowledgment of caller concerns.
5664
+ */
5665
+ high_empathy?: boolean;
5666
+
5667
+ /**
5668
+ * Spell using NATO phonetic alphabet style (voice only).
5669
+ */
5670
+ nato_phonetic_alphabet?: boolean;
5671
+
5672
+ /**
5673
+ * Sprinkle natural speech fillers like "um", "you know" for a more human,
5674
+ * conversational tone.
5675
+ */
5676
+ natural_filler_words?: boolean;
5677
+
5678
+ /**
5679
+ * Stay within prompt/context scope, don't invent details.
5680
+ */
5681
+ scope_boundaries?: boolean;
5682
+
5683
+ /**
5684
+ * Treat near-match similar words as same entity to reduce impact of transcription
5685
+ * error (voice only).
5686
+ */
5687
+ smart_matching?: boolean;
5688
+
5689
+ /**
5690
+ * Convert numbers/dates/currency to spoken forms (voice only).
5691
+ */
5692
+ speech_normalization?: boolean;
5693
+ }
5694
+
5381
5695
  /**
5382
5696
  * If this option is set, the call will try to detect IVR in the first 3 minutes of
5383
5697
  * the call. Actions defined will be applied when the IVR is detected. Set this to
@@ -5439,6 +5753,13 @@ export namespace CallRegisterPhoneCallParams {
5439
5753
  */
5440
5754
  type: 'string';
5441
5755
 
5756
+ /**
5757
+ * Optional instruction to help decide whether this field needs to be populated in
5758
+ * the analysis. If not set, the field is always included. If required is true,
5759
+ * this is ignored.
5760
+ */
5761
+ conditional_prompt?: string;
5762
+
5442
5763
  /**
5443
5764
  * Examples of the variable value to teach model the style and syntax.
5444
5765
  */
@@ -5472,6 +5793,13 @@ export namespace CallRegisterPhoneCallParams {
5472
5793
  */
5473
5794
  type: 'enum';
5474
5795
 
5796
+ /**
5797
+ * Optional instruction to help decide whether this field needs to be populated in
5798
+ * the analysis. If not set, the field is always included. If required is true,
5799
+ * this is ignored.
5800
+ */
5801
+ conditional_prompt?: string;
5802
+
5475
5803
  /**
5476
5804
  * Whether this data is required. If true and the data is not extracted, the call
5477
5805
  * will be marked as unsuccessful.
@@ -5495,6 +5823,13 @@ export namespace CallRegisterPhoneCallParams {
5495
5823
  */
5496
5824
  type: 'boolean';
5497
5825
 
5826
+ /**
5827
+ * Optional instruction to help decide whether this field needs to be populated in
5828
+ * the analysis. If not set, the field is always included. If required is true,
5829
+ * this is ignored.
5830
+ */
5831
+ conditional_prompt?: string;
5832
+
5498
5833
  /**
5499
5834
  * Whether this data is required. If true and the data is not extracted, the call
5500
5835
  * will be marked as unsuccessful.
@@ -5518,6 +5853,13 @@ export namespace CallRegisterPhoneCallParams {
5518
5853
  */
5519
5854
  type: 'number';
5520
5855
 
5856
+ /**
5857
+ * Optional instruction to help decide whether this field needs to be populated in
5858
+ * the analysis. If not set, the field is always included. If required is true,
5859
+ * this is ignored.
5860
+ */
5861
+ conditional_prompt?: string;
5862
+
5521
5863
  /**
5522
5864
  * Whether this data is required. If true and the data is not extracted, the call
5523
5865
  * will be marked as unsuccessful.
@@ -5525,6 +5867,39 @@ export namespace CallRegisterPhoneCallParams {
5525
5867
  required?: boolean;
5526
5868
  }
5527
5869
 
5870
+ /**
5871
+ * System preset for post-call analysis (voice agents). Use in
5872
+ * post_call_analysis_data to override prompts or mark fields optional.
5873
+ */
5874
+ export interface CallPresetAnalysisData {
5875
+ /**
5876
+ * Preset identifier for voice agent analysis.
5877
+ */
5878
+ name: 'call_summary' | 'call_successful' | 'user_sentiment';
5879
+
5880
+ /**
5881
+ * Identifies this item as a system preset.
5882
+ */
5883
+ type: 'system-presets';
5884
+
5885
+ /**
5886
+ * Optional instruction to help decide whether this field needs to be populated. If
5887
+ * not set, the field is always included.
5888
+ */
5889
+ conditional_prompt?: string;
5890
+
5891
+ /**
5892
+ * Prompt or description for this preset.
5893
+ */
5894
+ description?: string;
5895
+
5896
+ /**
5897
+ * If false, this field is optional in the analysis. If true or unset, the field is
5898
+ * required.
5899
+ */
5900
+ required?: boolean;
5901
+ }
5902
+
5528
5903
  export interface PronunciationDictionary {
5529
5904
  /**
5530
5905
  * The phonetic alphabet to be used for pronunciation.