retell-sdk 5.22.0 → 5.24.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 (107) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/client.d.mts +10 -10
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +10 -10
  5. package/client.d.ts.map +1 -1
  6. package/client.js.map +1 -1
  7. package/client.mjs.map +1 -1
  8. package/package.json +1 -1
  9. package/resources/agent.d.mts +17 -4
  10. package/resources/agent.d.mts.map +1 -1
  11. package/resources/agent.d.ts +17 -4
  12. package/resources/agent.d.ts.map +1 -1
  13. package/resources/agent.js +15 -0
  14. package/resources/agent.js.map +1 -1
  15. package/resources/agent.mjs +15 -0
  16. package/resources/agent.mjs.map +1 -1
  17. package/resources/batch-call.d.mts +2 -2
  18. package/resources/batch-call.d.mts.map +1 -1
  19. package/resources/batch-call.d.ts +2 -2
  20. package/resources/batch-call.d.ts.map +1 -1
  21. package/resources/call.d.mts +1754 -120
  22. package/resources/call.d.mts.map +1 -1
  23. package/resources/call.d.ts +1754 -120
  24. package/resources/call.d.ts.map +1 -1
  25. package/resources/call.js +7 -4
  26. package/resources/call.js.map +1 -1
  27. package/resources/call.mjs +7 -4
  28. package/resources/call.mjs.map +1 -1
  29. package/resources/chat-agent.d.mts +16 -1
  30. package/resources/chat-agent.d.mts.map +1 -1
  31. package/resources/chat-agent.d.ts +16 -1
  32. package/resources/chat-agent.d.ts.map +1 -1
  33. package/resources/chat-agent.js +17 -0
  34. package/resources/chat-agent.js.map +1 -1
  35. package/resources/chat-agent.mjs +17 -0
  36. package/resources/chat-agent.mjs.map +1 -1
  37. package/resources/chat.d.mts +38 -12
  38. package/resources/chat.d.mts.map +1 -1
  39. package/resources/chat.d.ts +38 -12
  40. package/resources/chat.d.ts.map +1 -1
  41. package/resources/chat.js +8 -5
  42. package/resources/chat.js.map +1 -1
  43. package/resources/chat.mjs +8 -5
  44. package/resources/chat.mjs.map +1 -1
  45. package/resources/conversation-flow-component.d.mts +33 -5
  46. package/resources/conversation-flow-component.d.mts.map +1 -1
  47. package/resources/conversation-flow-component.d.ts +33 -5
  48. package/resources/conversation-flow-component.d.ts.map +1 -1
  49. package/resources/conversation-flow-component.js +8 -4
  50. package/resources/conversation-flow-component.js.map +1 -1
  51. package/resources/conversation-flow-component.mjs +8 -4
  52. package/resources/conversation-flow-component.mjs.map +1 -1
  53. package/resources/conversation-flow.d.mts +21 -14
  54. package/resources/conversation-flow.d.mts.map +1 -1
  55. package/resources/conversation-flow.d.ts +21 -14
  56. package/resources/conversation-flow.d.ts.map +1 -1
  57. package/resources/conversation-flow.js +7 -3
  58. package/resources/conversation-flow.js.map +1 -1
  59. package/resources/conversation-flow.mjs +7 -3
  60. package/resources/conversation-flow.mjs.map +1 -1
  61. package/resources/index.d.mts +5 -5
  62. package/resources/index.d.mts.map +1 -1
  63. package/resources/index.d.ts +5 -5
  64. package/resources/index.d.ts.map +1 -1
  65. package/resources/index.js.map +1 -1
  66. package/resources/index.mjs.map +1 -1
  67. package/resources/llm.d.mts +23 -15
  68. package/resources/llm.d.mts.map +1 -1
  69. package/resources/llm.d.ts +23 -15
  70. package/resources/llm.d.ts.map +1 -1
  71. package/resources/llm.js +6 -3
  72. package/resources/llm.js.map +1 -1
  73. package/resources/llm.mjs +6 -3
  74. package/resources/llm.mjs.map +1 -1
  75. package/resources/phone-number.d.mts +32 -5
  76. package/resources/phone-number.d.mts.map +1 -1
  77. package/resources/phone-number.d.ts +32 -5
  78. package/resources/phone-number.d.ts.map +1 -1
  79. package/resources/phone-number.js +7 -4
  80. package/resources/phone-number.js.map +1 -1
  81. package/resources/phone-number.mjs +7 -4
  82. package/resources/phone-number.mjs.map +1 -1
  83. package/resources/tests.d.mts +64 -14
  84. package/resources/tests.d.mts.map +1 -1
  85. package/resources/tests.d.ts +64 -14
  86. package/resources/tests.d.ts.map +1 -1
  87. package/resources/tests.js +7 -13
  88. package/resources/tests.js.map +1 -1
  89. package/resources/tests.mjs +7 -13
  90. package/resources/tests.mjs.map +1 -1
  91. package/src/client.ts +10 -0
  92. package/src/resources/agent.ts +29 -0
  93. package/src/resources/batch-call.ts +3 -1
  94. package/src/resources/call.ts +2207 -118
  95. package/src/resources/chat-agent.ts +25 -0
  96. package/src/resources/chat.ts +42 -17
  97. package/src/resources/conversation-flow-component.ts +42 -5
  98. package/src/resources/conversation-flow.ts +24 -15
  99. package/src/resources/index.ts +5 -0
  100. package/src/resources/llm.ts +26 -16
  101. package/src/resources/phone-number.ts +41 -5
  102. package/src/resources/tests.ts +83 -16
  103. package/src/version.ts +1 -1
  104. package/version.d.mts +1 -1
  105. package/version.d.ts +1 -1
  106. package/version.js +1 -1
  107. package/version.mjs +1 -1
package/src/client.ts CHANGED
@@ -24,6 +24,7 @@ import {
24
24
  AgentGetVersionsResponse,
25
25
  AgentListParams,
26
26
  AgentListResponse,
27
+ AgentPublishParams,
27
28
  AgentResponse,
28
29
  AgentRetrieveParams,
29
30
  AgentUpdateParams,
@@ -58,6 +59,7 @@ import {
58
59
  ChatAgentGetVersionsResponse,
59
60
  ChatAgentListParams,
60
61
  ChatAgentListResponse,
62
+ ChatAgentPublishParams,
61
63
  ChatAgentResponse,
62
64
  ChatAgentRetrieveParams,
63
65
  ChatAgentUpdateParams,
@@ -75,6 +77,7 @@ import {
75
77
  import {
76
78
  ConversationFlowComponent,
77
79
  ConversationFlowComponentCreateParams,
80
+ ConversationFlowComponentListParams,
78
81
  ConversationFlowComponentListResponse,
79
82
  ConversationFlowComponentResponse,
80
83
  ConversationFlowComponentUpdateParams,
@@ -111,6 +114,7 @@ import {
111
114
  PhoneNumber,
112
115
  PhoneNumberCreateParams,
113
116
  PhoneNumberImportParams,
117
+ PhoneNumberListParams,
114
118
  PhoneNumberListResponse,
115
119
  PhoneNumberResponse,
116
120
  PhoneNumberUpdateParams,
@@ -126,6 +130,7 @@ import {
126
130
  TestListBatchTestsResponse,
127
131
  TestListTestCaseDefinitionsParams,
128
132
  TestListTestCaseDefinitionsResponse,
133
+ TestListTestRunsParams,
129
134
  TestListTestRunsResponse,
130
135
  TestUpdateTestCaseDefinitionParams,
131
136
  Tests,
@@ -923,6 +928,7 @@ export declare namespace Retell {
923
928
  type PhoneNumberListResponse as PhoneNumberListResponse,
924
929
  type PhoneNumberCreateParams as PhoneNumberCreateParams,
925
930
  type PhoneNumberUpdateParams as PhoneNumberUpdateParams,
931
+ type PhoneNumberListParams as PhoneNumberListParams,
926
932
  type PhoneNumberImportParams as PhoneNumberImportParams,
927
933
  };
928
934
 
@@ -935,6 +941,7 @@ export declare namespace Retell {
935
941
  type AgentRetrieveParams as AgentRetrieveParams,
936
942
  type AgentUpdateParams as AgentUpdateParams,
937
943
  type AgentListParams as AgentListParams,
944
+ type AgentPublishParams as AgentPublishParams,
938
945
  };
939
946
 
940
947
  export {
@@ -946,6 +953,7 @@ export declare namespace Retell {
946
953
  type ChatAgentRetrieveParams as ChatAgentRetrieveParams,
947
954
  type ChatAgentUpdateParams as ChatAgentUpdateParams,
948
955
  type ChatAgentListParams as ChatAgentListParams,
956
+ type ChatAgentPublishParams as ChatAgentPublishParams,
949
957
  };
950
958
 
951
959
  export {
@@ -974,6 +982,7 @@ export declare namespace Retell {
974
982
  type ConversationFlowComponentListResponse as ConversationFlowComponentListResponse,
975
983
  type ConversationFlowComponentCreateParams as ConversationFlowComponentCreateParams,
976
984
  type ConversationFlowComponentUpdateParams as ConversationFlowComponentUpdateParams,
985
+ type ConversationFlowComponentListParams as ConversationFlowComponentListParams,
977
986
  };
978
987
 
979
988
  export {
@@ -1021,6 +1030,7 @@ export declare namespace Retell {
1021
1030
  type TestCreateTestCaseDefinitionParams as TestCreateTestCaseDefinitionParams,
1022
1031
  type TestListBatchTestsParams as TestListBatchTestsParams,
1023
1032
  type TestListTestCaseDefinitionsParams as TestListTestCaseDefinitionsParams,
1033
+ type TestListTestRunsParams as TestListTestRunsParams,
1024
1034
  type TestUpdateTestCaseDefinitionParams as TestUpdateTestCaseDefinitionParams,
1025
1035
  };
1026
1036
 
@@ -104,6 +104,22 @@ export class Agent extends APIResource {
104
104
  getVersions(agentID: string, options?: RequestOptions): APIPromise<AgentGetVersionsResponse> {
105
105
  return this._client.get(path`/get-agent-versions/${agentID}`, options);
106
106
  }
107
+
108
+ /**
109
+ * Publish an existing draft version in place.
110
+ *
111
+ * @example
112
+ * ```ts
113
+ * await client.agent.publish('agent_xxx', { version: 15 });
114
+ * ```
115
+ */
116
+ publish(agentID: string, body: AgentPublishParams, options?: RequestOptions): APIPromise<void> {
117
+ return this._client.post(path`/publish-agent-version/${agentID}`, {
118
+ body,
119
+ ...options,
120
+ headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
121
+ });
122
+ }
107
123
  }
108
124
 
109
125
  export interface AgentResponse {
@@ -654,12 +670,14 @@ export interface AgentResponse {
654
670
  | 'eleven_v3'
655
671
  | 'sonic-3'
656
672
  | 'sonic-3-latest'
673
+ | 'sonic-3.5'
657
674
  | 'tts-1'
658
675
  | 'gpt-4o-mini-tts'
659
676
  | 'speech-02-turbo'
660
677
  | 'speech-2.8-turbo'
661
678
  | 's1'
662
679
  | 's2-pro'
680
+ | 's2.1-pro'
663
681
  | null;
664
682
 
665
683
  /**
@@ -1723,12 +1741,14 @@ export interface AgentCreateParams {
1723
1741
  | 'eleven_v3'
1724
1742
  | 'sonic-3'
1725
1743
  | 'sonic-3-latest'
1744
+ | 'sonic-3.5'
1726
1745
  | 'tts-1'
1727
1746
  | 'gpt-4o-mini-tts'
1728
1747
  | 'speech-02-turbo'
1729
1748
  | 'speech-2.8-turbo'
1730
1749
  | 's1'
1731
1750
  | 's2-pro'
1751
+ | 's2.1-pro'
1732
1752
  | null;
1733
1753
 
1734
1754
  /**
@@ -2812,12 +2832,14 @@ export interface AgentUpdateParams {
2812
2832
  | 'eleven_v3'
2813
2833
  | 'sonic-3'
2814
2834
  | 'sonic-3-latest'
2835
+ | 'sonic-3.5'
2815
2836
  | 'tts-1'
2816
2837
  | 'gpt-4o-mini-tts'
2817
2838
  | 'speech-02-turbo'
2818
2839
  | 'speech-2.8-turbo'
2819
2840
  | 's1'
2820
2841
  | 's2-pro'
2842
+ | 's2.1-pro'
2821
2843
  | null;
2822
2844
 
2823
2845
  /**
@@ -3387,6 +3409,12 @@ export interface AgentListParams {
3387
3409
  pagination_key_version?: number;
3388
3410
  }
3389
3411
 
3412
+ export interface AgentPublishParams {
3413
+ version: number;
3414
+
3415
+ version_description?: string;
3416
+ }
3417
+
3390
3418
  export declare namespace Agent {
3391
3419
  export {
3392
3420
  type AgentResponse as AgentResponse,
@@ -3396,5 +3424,6 @@ export declare namespace Agent {
3396
3424
  type AgentRetrieveParams as AgentRetrieveParams,
3397
3425
  type AgentUpdateParams as AgentUpdateParams,
3398
3426
  type AgentListParams as AgentListParams,
3427
+ type AgentPublishParams as AgentPublishParams,
3399
3428
  };
3400
3429
  }
@@ -743,12 +743,14 @@ export namespace BatchCallCreateBatchCallParams {
743
743
  | 'eleven_v3'
744
744
  | 'sonic-3'
745
745
  | 'sonic-3-latest'
746
+ | 'sonic-3.5'
746
747
  | 'tts-1'
747
748
  | 'gpt-4o-mini-tts'
748
749
  | 'speech-02-turbo'
749
750
  | 'speech-2.8-turbo'
750
751
  | 's1'
751
752
  | 's2-pro'
753
+ | 's2.1-pro'
752
754
  | null;
753
755
 
754
756
  /**
@@ -1469,7 +1471,7 @@ export namespace BatchCallCreateBatchCallParams {
1469
1471
  * Select the underlying speech to speech model. Can only set this or model, not
1470
1472
  * both.
1471
1473
  */
1472
- s2s_model?: 'gpt-realtime-1.5' | 'gpt-realtime' | 'gpt-realtime-mini' | null;
1474
+ s2s_model?: 'gpt-realtime-2' | 'gpt-realtime-1.5' | 'gpt-realtime' | 'gpt-realtime-mini' | null;
1473
1475
 
1474
1476
  /**
1475
1477
  * The speaker who starts the conversation. Required. Must be either 'user' or