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
@@ -329,6 +329,11 @@ export interface AgentResponse {
329
329
  */
330
330
  guardrail_config?: AgentResponse.GuardrailConfig;
331
331
 
332
+ /**
333
+ * Toggle behavior presets on/off to influence agent response style and behaviors.
334
+ */
335
+ handbook_config?: AgentResponse.HandbookConfig;
336
+
332
337
  /**
333
338
  * Controls how sensitive the agent is to user interruptions. Value ranging from
334
339
  * [0,1]. Lower value means it will take longer / more words for user to interrupt
@@ -468,6 +473,7 @@ export interface AgentResponse {
468
473
  | AgentResponse.EnumAnalysisData
469
474
  | AgentResponse.BooleanAnalysisData
470
475
  | AgentResponse.NumberAnalysisData
476
+ | AgentResponse.CallPresetAnalysisData
471
477
  > | null;
472
478
 
473
479
  /**
@@ -543,6 +549,12 @@ export interface AgentResponse {
543
549
  */
544
550
  stt_mode?: 'fast' | 'accurate' | 'custom';
545
551
 
552
+ /**
553
+ * IANA timezone for the agent (e.g. America/New_York). Defaults to
554
+ * America/Los_Angeles if not set.
555
+ */
556
+ timezone?: string | null;
557
+
546
558
  user_dtmf_options?: AgentResponse.UserDtmfOptions | null;
547
559
 
548
560
  /**
@@ -751,6 +763,58 @@ export namespace AgentResponse {
751
763
  > | null;
752
764
  }
753
765
 
766
+ /**
767
+ * Toggle behavior presets on/off to influence agent response style and behaviors.
768
+ */
769
+ export interface HandbookConfig {
770
+ /**
771
+ * When asked, acknowledge being a virtual assistant.
772
+ */
773
+ ai_disclosure?: boolean;
774
+
775
+ /**
776
+ * Professional call center rep baseline.
777
+ */
778
+ default_personality?: boolean;
779
+
780
+ /**
781
+ * Repeat back and confirm important details (voice only).
782
+ */
783
+ echo_verification?: boolean;
784
+
785
+ /**
786
+ * Warm acknowledgment of caller concerns.
787
+ */
788
+ high_empathy?: boolean;
789
+
790
+ /**
791
+ * Spell using NATO phonetic alphabet style (voice only).
792
+ */
793
+ nato_phonetic_alphabet?: boolean;
794
+
795
+ /**
796
+ * Sprinkle natural speech fillers like "um", "you know" for a more human,
797
+ * conversational tone.
798
+ */
799
+ natural_filler_words?: boolean;
800
+
801
+ /**
802
+ * Stay within prompt/context scope, don't invent details.
803
+ */
804
+ scope_boundaries?: boolean;
805
+
806
+ /**
807
+ * Treat near-match similar words as same entity to reduce impact of transcription
808
+ * error (voice only).
809
+ */
810
+ smart_matching?: boolean;
811
+
812
+ /**
813
+ * Convert numbers/dates/currency to spoken forms (voice only).
814
+ */
815
+ speech_normalization?: boolean;
816
+ }
817
+
754
818
  /**
755
819
  * If this option is set, the call will try to detect IVR in the first 3 minutes of
756
820
  * the call. Actions defined will be applied when the IVR is detected. Set this to
@@ -812,6 +876,13 @@ export namespace AgentResponse {
812
876
  */
813
877
  type: 'string';
814
878
 
879
+ /**
880
+ * Optional instruction to help decide whether this field needs to be populated in
881
+ * the analysis. If not set, the field is always included. If required is true,
882
+ * this is ignored.
883
+ */
884
+ conditional_prompt?: string;
885
+
815
886
  /**
816
887
  * Examples of the variable value to teach model the style and syntax.
817
888
  */
@@ -845,6 +916,13 @@ export namespace AgentResponse {
845
916
  */
846
917
  type: 'enum';
847
918
 
919
+ /**
920
+ * Optional instruction to help decide whether this field needs to be populated in
921
+ * the analysis. If not set, the field is always included. If required is true,
922
+ * this is ignored.
923
+ */
924
+ conditional_prompt?: string;
925
+
848
926
  /**
849
927
  * Whether this data is required. If true and the data is not extracted, the call
850
928
  * will be marked as unsuccessful.
@@ -868,6 +946,13 @@ export namespace AgentResponse {
868
946
  */
869
947
  type: 'boolean';
870
948
 
949
+ /**
950
+ * Optional instruction to help decide whether this field needs to be populated in
951
+ * the analysis. If not set, the field is always included. If required is true,
952
+ * this is ignored.
953
+ */
954
+ conditional_prompt?: string;
955
+
871
956
  /**
872
957
  * Whether this data is required. If true and the data is not extracted, the call
873
958
  * will be marked as unsuccessful.
@@ -891,6 +976,13 @@ export namespace AgentResponse {
891
976
  */
892
977
  type: 'number';
893
978
 
979
+ /**
980
+ * Optional instruction to help decide whether this field needs to be populated in
981
+ * the analysis. If not set, the field is always included. If required is true,
982
+ * this is ignored.
983
+ */
984
+ conditional_prompt?: string;
985
+
894
986
  /**
895
987
  * Whether this data is required. If true and the data is not extracted, the call
896
988
  * will be marked as unsuccessful.
@@ -898,6 +990,39 @@ export namespace AgentResponse {
898
990
  required?: boolean;
899
991
  }
900
992
 
993
+ /**
994
+ * System preset for post-call analysis (voice agents). Use in
995
+ * post_call_analysis_data to override prompts or mark fields optional.
996
+ */
997
+ export interface CallPresetAnalysisData {
998
+ /**
999
+ * Preset identifier for voice agent analysis.
1000
+ */
1001
+ name: 'call_summary' | 'call_successful' | 'user_sentiment';
1002
+
1003
+ /**
1004
+ * Identifies this item as a system preset.
1005
+ */
1006
+ type: 'system-presets';
1007
+
1008
+ /**
1009
+ * Optional instruction to help decide whether this field needs to be populated. If
1010
+ * not set, the field is always included.
1011
+ */
1012
+ conditional_prompt?: string;
1013
+
1014
+ /**
1015
+ * Prompt or description for this preset.
1016
+ */
1017
+ description?: string;
1018
+
1019
+ /**
1020
+ * If false, this field is optional in the analysis. If true or unset, the field is
1021
+ * required.
1022
+ */
1023
+ required?: boolean;
1024
+ }
1025
+
901
1026
  export interface PronunciationDictionary {
902
1027
  /**
903
1028
  * The phonetic alphabet to be used for pronunciation.
@@ -1173,6 +1298,11 @@ export interface AgentCreateParams {
1173
1298
  */
1174
1299
  guardrail_config?: AgentCreateParams.GuardrailConfig;
1175
1300
 
1301
+ /**
1302
+ * Toggle behavior presets on/off to influence agent response style and behaviors.
1303
+ */
1304
+ handbook_config?: AgentCreateParams.HandbookConfig;
1305
+
1176
1306
  /**
1177
1307
  * Controls how sensitive the agent is to user interruptions. Value ranging from
1178
1308
  * [0,1]. Lower value means it will take longer / more words for user to interrupt
@@ -1307,6 +1437,7 @@ export interface AgentCreateParams {
1307
1437
  | AgentCreateParams.EnumAnalysisData
1308
1438
  | AgentCreateParams.BooleanAnalysisData
1309
1439
  | AgentCreateParams.NumberAnalysisData
1440
+ | AgentCreateParams.CallPresetAnalysisData
1310
1441
  > | null;
1311
1442
 
1312
1443
  /**
@@ -1382,6 +1513,12 @@ export interface AgentCreateParams {
1382
1513
  */
1383
1514
  stt_mode?: 'fast' | 'accurate' | 'custom';
1384
1515
 
1516
+ /**
1517
+ * IANA timezone for the agent (e.g. America/New_York). Defaults to
1518
+ * America/Los_Angeles if not set.
1519
+ */
1520
+ timezone?: string | null;
1521
+
1385
1522
  user_dtmf_options?: AgentCreateParams.UserDtmfOptions | null;
1386
1523
 
1387
1524
  /**
@@ -1590,6 +1727,58 @@ export namespace AgentCreateParams {
1590
1727
  > | null;
1591
1728
  }
1592
1729
 
1730
+ /**
1731
+ * Toggle behavior presets on/off to influence agent response style and behaviors.
1732
+ */
1733
+ export interface HandbookConfig {
1734
+ /**
1735
+ * When asked, acknowledge being a virtual assistant.
1736
+ */
1737
+ ai_disclosure?: boolean;
1738
+
1739
+ /**
1740
+ * Professional call center rep baseline.
1741
+ */
1742
+ default_personality?: boolean;
1743
+
1744
+ /**
1745
+ * Repeat back and confirm important details (voice only).
1746
+ */
1747
+ echo_verification?: boolean;
1748
+
1749
+ /**
1750
+ * Warm acknowledgment of caller concerns.
1751
+ */
1752
+ high_empathy?: boolean;
1753
+
1754
+ /**
1755
+ * Spell using NATO phonetic alphabet style (voice only).
1756
+ */
1757
+ nato_phonetic_alphabet?: boolean;
1758
+
1759
+ /**
1760
+ * Sprinkle natural speech fillers like "um", "you know" for a more human,
1761
+ * conversational tone.
1762
+ */
1763
+ natural_filler_words?: boolean;
1764
+
1765
+ /**
1766
+ * Stay within prompt/context scope, don't invent details.
1767
+ */
1768
+ scope_boundaries?: boolean;
1769
+
1770
+ /**
1771
+ * Treat near-match similar words as same entity to reduce impact of transcription
1772
+ * error (voice only).
1773
+ */
1774
+ smart_matching?: boolean;
1775
+
1776
+ /**
1777
+ * Convert numbers/dates/currency to spoken forms (voice only).
1778
+ */
1779
+ speech_normalization?: boolean;
1780
+ }
1781
+
1593
1782
  /**
1594
1783
  * If this option is set, the call will try to detect IVR in the first 3 minutes of
1595
1784
  * the call. Actions defined will be applied when the IVR is detected. Set this to
@@ -1651,6 +1840,13 @@ export namespace AgentCreateParams {
1651
1840
  */
1652
1841
  type: 'string';
1653
1842
 
1843
+ /**
1844
+ * Optional instruction to help decide whether this field needs to be populated in
1845
+ * the analysis. If not set, the field is always included. If required is true,
1846
+ * this is ignored.
1847
+ */
1848
+ conditional_prompt?: string;
1849
+
1654
1850
  /**
1655
1851
  * Examples of the variable value to teach model the style and syntax.
1656
1852
  */
@@ -1684,6 +1880,13 @@ export namespace AgentCreateParams {
1684
1880
  */
1685
1881
  type: 'enum';
1686
1882
 
1883
+ /**
1884
+ * Optional instruction to help decide whether this field needs to be populated in
1885
+ * the analysis. If not set, the field is always included. If required is true,
1886
+ * this is ignored.
1887
+ */
1888
+ conditional_prompt?: string;
1889
+
1687
1890
  /**
1688
1891
  * Whether this data is required. If true and the data is not extracted, the call
1689
1892
  * will be marked as unsuccessful.
@@ -1707,6 +1910,13 @@ export namespace AgentCreateParams {
1707
1910
  */
1708
1911
  type: 'boolean';
1709
1912
 
1913
+ /**
1914
+ * Optional instruction to help decide whether this field needs to be populated in
1915
+ * the analysis. If not set, the field is always included. If required is true,
1916
+ * this is ignored.
1917
+ */
1918
+ conditional_prompt?: string;
1919
+
1710
1920
  /**
1711
1921
  * Whether this data is required. If true and the data is not extracted, the call
1712
1922
  * will be marked as unsuccessful.
@@ -1730,6 +1940,13 @@ export namespace AgentCreateParams {
1730
1940
  */
1731
1941
  type: 'number';
1732
1942
 
1943
+ /**
1944
+ * Optional instruction to help decide whether this field needs to be populated in
1945
+ * the analysis. If not set, the field is always included. If required is true,
1946
+ * this is ignored.
1947
+ */
1948
+ conditional_prompt?: string;
1949
+
1733
1950
  /**
1734
1951
  * Whether this data is required. If true and the data is not extracted, the call
1735
1952
  * will be marked as unsuccessful.
@@ -1737,6 +1954,39 @@ export namespace AgentCreateParams {
1737
1954
  required?: boolean;
1738
1955
  }
1739
1956
 
1957
+ /**
1958
+ * System preset for post-call analysis (voice agents). Use in
1959
+ * post_call_analysis_data to override prompts or mark fields optional.
1960
+ */
1961
+ export interface CallPresetAnalysisData {
1962
+ /**
1963
+ * Preset identifier for voice agent analysis.
1964
+ */
1965
+ name: 'call_summary' | 'call_successful' | 'user_sentiment';
1966
+
1967
+ /**
1968
+ * Identifies this item as a system preset.
1969
+ */
1970
+ type: 'system-presets';
1971
+
1972
+ /**
1973
+ * Optional instruction to help decide whether this field needs to be populated. If
1974
+ * not set, the field is always included.
1975
+ */
1976
+ conditional_prompt?: string;
1977
+
1978
+ /**
1979
+ * Prompt or description for this preset.
1980
+ */
1981
+ description?: string;
1982
+
1983
+ /**
1984
+ * If false, this field is optional in the analysis. If true or unset, the field is
1985
+ * required.
1986
+ */
1987
+ required?: boolean;
1988
+ }
1989
+
1740
1990
  export interface PronunciationDictionary {
1741
1991
  /**
1742
1992
  * The phonetic alphabet to be used for pronunciation.
@@ -2008,6 +2258,12 @@ export interface AgentUpdateParams {
2008
2258
  */
2009
2259
  guardrail_config?: AgentUpdateParams.GuardrailConfig;
2010
2260
 
2261
+ /**
2262
+ * Body param: Toggle behavior presets on/off to influence agent response style and
2263
+ * behaviors.
2264
+ */
2265
+ handbook_config?: AgentUpdateParams.HandbookConfig;
2266
+
2011
2267
  /**
2012
2268
  * Body param: Controls how sensitive the agent is to user interruptions. Value
2013
2269
  * ranging from [0,1]. Lower value means it will take longer / more words for user
@@ -2142,6 +2398,7 @@ export interface AgentUpdateParams {
2142
2398
  | AgentUpdateParams.EnumAnalysisData
2143
2399
  | AgentUpdateParams.BooleanAnalysisData
2144
2400
  | AgentUpdateParams.NumberAnalysisData
2401
+ | AgentUpdateParams.CallPresetAnalysisData
2145
2402
  > | null;
2146
2403
 
2147
2404
  /**
@@ -2229,6 +2486,12 @@ export interface AgentUpdateParams {
2229
2486
  */
2230
2487
  stt_mode?: 'fast' | 'accurate' | 'custom';
2231
2488
 
2489
+ /**
2490
+ * Body param: IANA timezone for the agent (e.g. America/New_York). Defaults to
2491
+ * America/Los_Angeles if not set.
2492
+ */
2493
+ timezone?: string | null;
2494
+
2232
2495
  /**
2233
2496
  * Body param
2234
2497
  */
@@ -2402,6 +2665,58 @@ export namespace AgentUpdateParams {
2402
2665
  > | null;
2403
2666
  }
2404
2667
 
2668
+ /**
2669
+ * Toggle behavior presets on/off to influence agent response style and behaviors.
2670
+ */
2671
+ export interface HandbookConfig {
2672
+ /**
2673
+ * When asked, acknowledge being a virtual assistant.
2674
+ */
2675
+ ai_disclosure?: boolean;
2676
+
2677
+ /**
2678
+ * Professional call center rep baseline.
2679
+ */
2680
+ default_personality?: boolean;
2681
+
2682
+ /**
2683
+ * Repeat back and confirm important details (voice only).
2684
+ */
2685
+ echo_verification?: boolean;
2686
+
2687
+ /**
2688
+ * Warm acknowledgment of caller concerns.
2689
+ */
2690
+ high_empathy?: boolean;
2691
+
2692
+ /**
2693
+ * Spell using NATO phonetic alphabet style (voice only).
2694
+ */
2695
+ nato_phonetic_alphabet?: boolean;
2696
+
2697
+ /**
2698
+ * Sprinkle natural speech fillers like "um", "you know" for a more human,
2699
+ * conversational tone.
2700
+ */
2701
+ natural_filler_words?: boolean;
2702
+
2703
+ /**
2704
+ * Stay within prompt/context scope, don't invent details.
2705
+ */
2706
+ scope_boundaries?: boolean;
2707
+
2708
+ /**
2709
+ * Treat near-match similar words as same entity to reduce impact of transcription
2710
+ * error (voice only).
2711
+ */
2712
+ smart_matching?: boolean;
2713
+
2714
+ /**
2715
+ * Convert numbers/dates/currency to spoken forms (voice only).
2716
+ */
2717
+ speech_normalization?: boolean;
2718
+ }
2719
+
2405
2720
  /**
2406
2721
  * If this option is set, the call will try to detect IVR in the first 3 minutes of
2407
2722
  * the call. Actions defined will be applied when the IVR is detected. Set this to
@@ -2463,6 +2778,13 @@ export namespace AgentUpdateParams {
2463
2778
  */
2464
2779
  type: 'string';
2465
2780
 
2781
+ /**
2782
+ * Optional instruction to help decide whether this field needs to be populated in
2783
+ * the analysis. If not set, the field is always included. If required is true,
2784
+ * this is ignored.
2785
+ */
2786
+ conditional_prompt?: string;
2787
+
2466
2788
  /**
2467
2789
  * Examples of the variable value to teach model the style and syntax.
2468
2790
  */
@@ -2496,6 +2818,13 @@ export namespace AgentUpdateParams {
2496
2818
  */
2497
2819
  type: 'enum';
2498
2820
 
2821
+ /**
2822
+ * Optional instruction to help decide whether this field needs to be populated in
2823
+ * the analysis. If not set, the field is always included. If required is true,
2824
+ * this is ignored.
2825
+ */
2826
+ conditional_prompt?: string;
2827
+
2499
2828
  /**
2500
2829
  * Whether this data is required. If true and the data is not extracted, the call
2501
2830
  * will be marked as unsuccessful.
@@ -2519,6 +2848,13 @@ export namespace AgentUpdateParams {
2519
2848
  */
2520
2849
  type: 'boolean';
2521
2850
 
2851
+ /**
2852
+ * Optional instruction to help decide whether this field needs to be populated in
2853
+ * the analysis. If not set, the field is always included. If required is true,
2854
+ * this is ignored.
2855
+ */
2856
+ conditional_prompt?: string;
2857
+
2522
2858
  /**
2523
2859
  * Whether this data is required. If true and the data is not extracted, the call
2524
2860
  * will be marked as unsuccessful.
@@ -2542,6 +2878,13 @@ export namespace AgentUpdateParams {
2542
2878
  */
2543
2879
  type: 'number';
2544
2880
 
2881
+ /**
2882
+ * Optional instruction to help decide whether this field needs to be populated in
2883
+ * the analysis. If not set, the field is always included. If required is true,
2884
+ * this is ignored.
2885
+ */
2886
+ conditional_prompt?: string;
2887
+
2545
2888
  /**
2546
2889
  * Whether this data is required. If true and the data is not extracted, the call
2547
2890
  * will be marked as unsuccessful.
@@ -2549,6 +2892,39 @@ export namespace AgentUpdateParams {
2549
2892
  required?: boolean;
2550
2893
  }
2551
2894
 
2895
+ /**
2896
+ * System preset for post-call analysis (voice agents). Use in
2897
+ * post_call_analysis_data to override prompts or mark fields optional.
2898
+ */
2899
+ export interface CallPresetAnalysisData {
2900
+ /**
2901
+ * Preset identifier for voice agent analysis.
2902
+ */
2903
+ name: 'call_summary' | 'call_successful' | 'user_sentiment';
2904
+
2905
+ /**
2906
+ * Identifies this item as a system preset.
2907
+ */
2908
+ type: 'system-presets';
2909
+
2910
+ /**
2911
+ * Optional instruction to help decide whether this field needs to be populated. If
2912
+ * not set, the field is always included.
2913
+ */
2914
+ conditional_prompt?: string;
2915
+
2916
+ /**
2917
+ * Prompt or description for this preset.
2918
+ */
2919
+ description?: string;
2920
+
2921
+ /**
2922
+ * If false, this field is optional in the analysis. If true or unset, the field is
2923
+ * required.
2924
+ */
2925
+ required?: boolean;
2926
+ }
2927
+
2552
2928
  export interface PronunciationDictionary {
2553
2929
  /**
2554
2930
  * The phonetic alphabet to be used for pronunciation.