retell-sdk 5.63.0 → 5.65.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 (147) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/README.md +29 -0
  3. package/client.d.mts +20 -8
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +20 -8
  6. package/client.d.ts.map +1 -1
  7. package/client.js +12 -0
  8. package/client.js.map +1 -1
  9. package/client.mjs +12 -0
  10. package/client.mjs.map +1 -1
  11. package/package.json +1 -1
  12. package/resources/agent.d.mts +102 -12
  13. package/resources/agent.d.mts.map +1 -1
  14. package/resources/agent.d.ts +102 -12
  15. package/resources/agent.d.ts.map +1 -1
  16. package/resources/agent.js +32 -4
  17. package/resources/agent.js.map +1 -1
  18. package/resources/agent.mjs +32 -4
  19. package/resources/agent.mjs.map +1 -1
  20. package/resources/app.d.mts +439 -0
  21. package/resources/app.d.mts.map +1 -0
  22. package/resources/app.d.ts +439 -0
  23. package/resources/app.d.ts.map +1 -0
  24. package/resources/app.js +69 -0
  25. package/resources/app.js.map +1 -0
  26. package/resources/app.mjs +65 -0
  27. package/resources/app.mjs.map +1 -0
  28. package/resources/asset.d.mts +53 -0
  29. package/resources/asset.d.mts.map +1 -0
  30. package/resources/asset.d.ts +53 -0
  31. package/resources/asset.d.ts.map +1 -0
  32. package/resources/asset.js +20 -0
  33. package/resources/asset.js.map +1 -0
  34. package/resources/asset.mjs +16 -0
  35. package/resources/asset.mjs.map +1 -0
  36. package/resources/batch-call.d.mts +4 -2
  37. package/resources/batch-call.d.mts.map +1 -1
  38. package/resources/batch-call.d.ts +4 -2
  39. package/resources/batch-call.d.ts.map +1 -1
  40. package/resources/call.d.mts +221 -27
  41. package/resources/call.d.mts.map +1 -1
  42. package/resources/call.d.ts +221 -27
  43. package/resources/call.d.ts.map +1 -1
  44. package/resources/call.js +37 -5
  45. package/resources/call.js.map +1 -1
  46. package/resources/call.mjs +37 -5
  47. package/resources/call.mjs.map +1 -1
  48. package/resources/chat-agent.d.mts +4 -10
  49. package/resources/chat-agent.d.mts.map +1 -1
  50. package/resources/chat-agent.d.ts +4 -10
  51. package/resources/chat-agent.d.ts.map +1 -1
  52. package/resources/chat-agent.js +2 -8
  53. package/resources/chat-agent.js.map +1 -1
  54. package/resources/chat-agent.mjs +2 -8
  55. package/resources/chat-agent.mjs.map +1 -1
  56. package/resources/chat.d.mts +24 -11
  57. package/resources/chat.d.mts.map +1 -1
  58. package/resources/chat.d.ts +24 -11
  59. package/resources/chat.d.ts.map +1 -1
  60. package/resources/contact.d.mts +669 -0
  61. package/resources/contact.d.mts.map +1 -0
  62. package/resources/contact.d.ts +669 -0
  63. package/resources/contact.d.ts.map +1 -0
  64. package/resources/contact.js +100 -0
  65. package/resources/contact.js.map +1 -0
  66. package/resources/contact.mjs +96 -0
  67. package/resources/contact.mjs.map +1 -0
  68. package/resources/conversation-flow-component.d.mts +56 -8
  69. package/resources/conversation-flow-component.d.mts.map +1 -1
  70. package/resources/conversation-flow-component.d.ts +56 -8
  71. package/resources/conversation-flow-component.d.ts.map +1 -1
  72. package/resources/conversation-flow.d.mts +120 -16
  73. package/resources/conversation-flow.d.mts.map +1 -1
  74. package/resources/conversation-flow.d.ts +120 -16
  75. package/resources/conversation-flow.d.ts.map +1 -1
  76. package/resources/conversation-flow.js +3 -1
  77. package/resources/conversation-flow.js.map +1 -1
  78. package/resources/conversation-flow.mjs +3 -1
  79. package/resources/conversation-flow.mjs.map +1 -1
  80. package/resources/crm.d.mts +226 -0
  81. package/resources/crm.d.mts.map +1 -0
  82. package/resources/crm.d.ts +226 -0
  83. package/resources/crm.d.ts.map +1 -0
  84. package/resources/crm.js +46 -0
  85. package/resources/crm.js.map +1 -0
  86. package/resources/crm.mjs +42 -0
  87. package/resources/crm.mjs.map +1 -0
  88. package/resources/export-request.d.mts +2 -2
  89. package/resources/export-request.d.mts.map +1 -1
  90. package/resources/export-request.d.ts +2 -2
  91. package/resources/export-request.d.ts.map +1 -1
  92. package/resources/index.d.mts +8 -4
  93. package/resources/index.d.mts.map +1 -1
  94. package/resources/index.d.ts +8 -4
  95. package/resources/index.d.ts.map +1 -1
  96. package/resources/index.js +9 -1
  97. package/resources/index.js.map +1 -1
  98. package/resources/index.mjs +4 -0
  99. package/resources/index.mjs.map +1 -1
  100. package/resources/knowledge-base.d.mts +16 -8
  101. package/resources/knowledge-base.d.mts.map +1 -1
  102. package/resources/knowledge-base.d.ts +16 -8
  103. package/resources/knowledge-base.d.ts.map +1 -1
  104. package/resources/llm.d.mts +66 -10
  105. package/resources/llm.d.mts.map +1 -1
  106. package/resources/llm.d.ts +66 -10
  107. package/resources/llm.d.ts.map +1 -1
  108. package/resources/llm.js +3 -1
  109. package/resources/llm.js.map +1 -1
  110. package/resources/llm.mjs +3 -1
  111. package/resources/llm.mjs.map +1 -1
  112. package/resources/phone-number.d.mts +14 -8
  113. package/resources/phone-number.d.mts.map +1 -1
  114. package/resources/phone-number.d.ts +14 -8
  115. package/resources/phone-number.d.ts.map +1 -1
  116. package/resources/tests.d.mts +6 -6
  117. package/resources/tests.d.mts.map +1 -1
  118. package/resources/tests.d.ts +6 -6
  119. package/resources/tests.d.ts.map +1 -1
  120. package/resources/voice.d.mts +4 -4
  121. package/resources/voice.d.mts.map +1 -1
  122. package/resources/voice.d.ts +4 -4
  123. package/resources/voice.d.ts.map +1 -1
  124. package/src/client.ts +116 -0
  125. package/src/resources/agent.ts +141 -9
  126. package/src/resources/app.ts +593 -0
  127. package/src/resources/asset.ts +69 -0
  128. package/src/resources/batch-call.ts +6 -1
  129. package/src/resources/call.ts +289 -25
  130. package/src/resources/chat-agent.ts +4 -10
  131. package/src/resources/chat.ts +28 -11
  132. package/src/resources/contact.ts +910 -0
  133. package/src/resources/conversation-flow-component.ts +56 -8
  134. package/src/resources/conversation-flow.ts +127 -15
  135. package/src/resources/crm.ts +298 -0
  136. package/src/resources/export-request.ts +2 -2
  137. package/src/resources/index.ts +50 -0
  138. package/src/resources/knowledge-base.ts +16 -8
  139. package/src/resources/llm.ts +73 -9
  140. package/src/resources/phone-number.ts +14 -8
  141. package/src/resources/tests.ts +6 -6
  142. package/src/resources/voice.ts +4 -4
  143. package/src/version.ts +1 -1
  144. package/version.d.mts +1 -1
  145. package/version.d.ts +1 -1
  146. package/version.js +1 -1
  147. package/version.mjs +1 -1
@@ -148,17 +148,30 @@ export class Agent extends APIResource {
148
148
  }
149
149
 
150
150
  /**
151
- * Get all versions of an agent
151
+ * Get agent versions. Large version histories may be truncated.
152
+ *
153
+ * @deprecated
154
+ */
155
+ getVersions(agentID: string, options?: RequestOptions): APIPromise<AgentGetVersionsResponse> {
156
+ return this._client.get(path`/get-agent-versions/${agentID}`, options);
157
+ }
158
+
159
+ /**
160
+ * List stored versions of a voice or chat agent with pagination.
152
161
  *
153
162
  * @example
154
163
  * ```ts
155
- * const agentResponses = await client.agent.getVersions(
164
+ * const response = await client.agent.listVersions(
156
165
  * '16b980523634a6dc504898cda492e939',
157
166
  * );
158
167
  * ```
159
168
  */
160
- getVersions(agentID: string, options?: RequestOptions): APIPromise<AgentGetVersionsResponse> {
161
- return this._client.get(path`/get-agent-versions/${agentID}`, options);
169
+ listVersions(
170
+ agentID: string,
171
+ query: AgentListVersionsParams | null | undefined = {},
172
+ options?: RequestOptions,
173
+ ): APIPromise<AgentListVersionsResponse> {
174
+ return this._client.get(path`/list-agent-versions/${agentID}`, { query, ...options });
162
175
  }
163
176
 
164
177
  /**
@@ -176,6 +189,31 @@ export class Agent extends APIResource {
176
189
  headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
177
190
  });
178
191
  }
192
+
193
+ /**
194
+ * Remove references to resources that no longer exist in your workspace from an
195
+ * agent draft version and its response engine — tools whose app connection has
196
+ * been deleted, unknown knowledge bases, and deleted shared components — and remap
197
+ * voices that are no longer accessible to a default voice. If the agent's response
198
+ * engine version has been published, the engine is left untouched and only
199
+ * agent-level references are repaired. Repairing an agent with nothing to fix is a
200
+ * no-op.
201
+ *
202
+ * @example
203
+ * ```ts
204
+ * const response = await client.agent.repair(
205
+ * '16b980523634a6dc504898cda492e939',
206
+ * );
207
+ * ```
208
+ */
209
+ repair(
210
+ agentID: string,
211
+ params: AgentRepairParams | null | undefined = {},
212
+ options?: RequestOptions,
213
+ ): APIPromise<AgentRepairResponse> {
214
+ const { version } = params ?? {};
215
+ return this._client.post(path`/repair-agent/${agentID}`, { query: { version }, ...options });
216
+ }
179
217
  }
180
218
 
181
219
  export interface AgentResponse {
@@ -741,6 +779,7 @@ export interface AgentResponse {
741
779
  | 'sonic-3'
742
780
  | 'sonic-3-latest'
743
781
  | 'sonic-3.5'
782
+ | 'sonic-3.6'
744
783
  | 'tts-1'
745
784
  | 'gpt-4o-mini-tts'
746
785
  | 'speech-02-turbo'
@@ -748,6 +787,8 @@ export interface AgentResponse {
748
787
  | 's1'
749
788
  | 's2-pro'
750
789
  | 's2.1-pro'
790
+ | 'inworld-tts-2'
791
+ | 'inworld-tts-2-flash'
751
792
  | null;
752
793
 
753
794
  /**
@@ -882,7 +923,9 @@ export namespace AgentResponse {
882
923
  export interface CustomSttConfig {
883
924
  /**
884
925
  * Endpointing timeout in milliseconds. Minimum is 100 for Azure, 10 for Deepgram,
885
- * 500 for Soniox, 100 for AssemblyAI.
926
+ * 500 for Soniox, 100 for AssemblyAI. For AssemblyAI, this sets min_turn_silence
927
+ * (100-3000 ms). max_turn_silence adds half of this value, rounded to the nearest
928
+ * millisecond and bounded to 500-1000 ms, with a total cap of 3000 ms.
886
929
  */
887
930
  endpointing_ms: number;
888
931
 
@@ -1290,9 +1333,9 @@ export interface AgentListResponse {
1290
1333
  /**
1291
1334
  * Whether more results are available.
1292
1335
  */
1293
- has_more?: boolean;
1336
+ has_more: boolean;
1294
1337
 
1295
- items?: Array<AgentListResponse.Item>;
1338
+ items: Array<AgentListResponse.Item>;
1296
1339
 
1297
1340
  /**
1298
1341
  * Pagination key for the next page.
@@ -1339,6 +1382,56 @@ export type AgentCreateVersionResponse = AgentResponse | ChatAgentAPI.ChatAgentR
1339
1382
 
1340
1383
  export type AgentGetVersionsResponse = Array<AgentResponse>;
1341
1384
 
1385
+ export interface AgentListVersionsResponse {
1386
+ /**
1387
+ * Whether more results are available.
1388
+ */
1389
+ has_more: boolean;
1390
+
1391
+ items: Array<AgentListVersionsResponse.Item>;
1392
+
1393
+ /**
1394
+ * Pagination key for the next page.
1395
+ */
1396
+ pagination_key?: string;
1397
+ }
1398
+
1399
+ export namespace AgentListVersionsResponse {
1400
+ export interface Item {
1401
+ /**
1402
+ * Whether the agent version is published.
1403
+ */
1404
+ is_published: boolean;
1405
+
1406
+ /**
1407
+ * Last modification timestamp in milliseconds since epoch.
1408
+ */
1409
+ last_modification_timestamp: number;
1410
+
1411
+ /**
1412
+ * Version number of the agent.
1413
+ */
1414
+ version: number;
1415
+
1416
+ /**
1417
+ * Version that this agent version was based on.
1418
+ */
1419
+ base_version?: number;
1420
+
1421
+ /**
1422
+ * Optional description of the agent version.
1423
+ */
1424
+ version_description?: string;
1425
+
1426
+ /**
1427
+ * Optional title of the agent version.
1428
+ */
1429
+ version_title?: string;
1430
+ }
1431
+ }
1432
+
1433
+ export type AgentRepairResponse = AgentResponse | ChatAgentAPI.ChatAgentResponse;
1434
+
1342
1435
  export interface AgentCreateParams {
1343
1436
  /**
1344
1437
  * The Response Engine to attach to the agent. It is used to generate responses for
@@ -1871,6 +1964,7 @@ export interface AgentCreateParams {
1871
1964
  | 'sonic-3'
1872
1965
  | 'sonic-3-latest'
1873
1966
  | 'sonic-3.5'
1967
+ | 'sonic-3.6'
1874
1968
  | 'tts-1'
1875
1969
  | 'gpt-4o-mini-tts'
1876
1970
  | 'speech-02-turbo'
@@ -1878,6 +1972,8 @@ export interface AgentCreateParams {
1878
1972
  | 's1'
1879
1973
  | 's2-pro'
1880
1974
  | 's2.1-pro'
1975
+ | 'inworld-tts-2'
1976
+ | 'inworld-tts-2-flash'
1881
1977
  | null;
1882
1978
 
1883
1979
  /**
@@ -2012,7 +2108,9 @@ export namespace AgentCreateParams {
2012
2108
  export interface CustomSttConfig {
2013
2109
  /**
2014
2110
  * Endpointing timeout in milliseconds. Minimum is 100 for Azure, 10 for Deepgram,
2015
- * 500 for Soniox, 100 for AssemblyAI.
2111
+ * 500 for Soniox, 100 for AssemblyAI. For AssemblyAI, this sets min_turn_silence
2112
+ * (100-3000 ms). max_turn_silence adds half of this value, rounded to the nearest
2113
+ * millisecond and bounded to 500-1000 ms, with a total cap of 3000 ms.
2016
2114
  */
2017
2115
  endpointing_ms: number;
2018
2116
 
@@ -2973,6 +3071,7 @@ export interface AgentUpdateParams {
2973
3071
  | 'sonic-3'
2974
3072
  | 'sonic-3-latest'
2975
3073
  | 'sonic-3.5'
3074
+ | 'sonic-3.6'
2976
3075
  | 'tts-1'
2977
3076
  | 'gpt-4o-mini-tts'
2978
3077
  | 'speech-02-turbo'
@@ -2980,6 +3079,8 @@ export interface AgentUpdateParams {
2980
3079
  | 's1'
2981
3080
  | 's2-pro'
2982
3081
  | 's2.1-pro'
3082
+ | 'inworld-tts-2'
3083
+ | 'inworld-tts-2-flash'
2983
3084
  | null;
2984
3085
 
2985
3086
  /**
@@ -3068,7 +3169,9 @@ export namespace AgentUpdateParams {
3068
3169
  export interface CustomSttConfig {
3069
3170
  /**
3070
3171
  * Endpointing timeout in milliseconds. Minimum is 100 for Azure, 10 for Deepgram,
3071
- * 500 for Soniox, 100 for AssemblyAI.
3172
+ * 500 for Soniox, 100 for AssemblyAI. For AssemblyAI, this sets min_turn_silence
3173
+ * (100-3000 ms). max_turn_silence adds half of this value, rounded to the nearest
3174
+ * millisecond and bounded to 500-1000 ms, with a total cap of 3000 ms.
3072
3175
  */
3073
3176
  endpointing_ms: number;
3074
3177
 
@@ -3583,6 +3686,23 @@ export interface AgentDeleteVersionParams {
3583
3686
  version: number;
3584
3687
  }
3585
3688
 
3689
+ export interface AgentListVersionsParams {
3690
+ /**
3691
+ * Maximum number of items to return.
3692
+ */
3693
+ limit?: number;
3694
+
3695
+ /**
3696
+ * Pagination key for fetching the next page.
3697
+ */
3698
+ pagination_key?: string;
3699
+
3700
+ /**
3701
+ * Sort order for results.
3702
+ */
3703
+ sort_order?: 'ascending' | 'descending';
3704
+ }
3705
+
3586
3706
  export interface AgentPublishParams {
3587
3707
  version: number;
3588
3708
 
@@ -3594,18 +3714,30 @@ export interface AgentPublishParams {
3594
3714
  version_title?: string;
3595
3715
  }
3596
3716
 
3717
+ export interface AgentRepairParams {
3718
+ /**
3719
+ * Optional version of the agent to repair. Default to latest version. Published
3720
+ * versions are immutable and cannot be repaired.
3721
+ */
3722
+ version?: string | number;
3723
+ }
3724
+
3597
3725
  export declare namespace Agent {
3598
3726
  export {
3599
3727
  type AgentResponse as AgentResponse,
3600
3728
  type AgentListResponse as AgentListResponse,
3601
3729
  type AgentCreateVersionResponse as AgentCreateVersionResponse,
3602
3730
  type AgentGetVersionsResponse as AgentGetVersionsResponse,
3731
+ type AgentListVersionsResponse as AgentListVersionsResponse,
3732
+ type AgentRepairResponse as AgentRepairResponse,
3603
3733
  type AgentCreateParams as AgentCreateParams,
3604
3734
  type AgentRetrieveParams as AgentRetrieveParams,
3605
3735
  type AgentUpdateParams as AgentUpdateParams,
3606
3736
  type AgentListParams as AgentListParams,
3607
3737
  type AgentCreateVersionParams as AgentCreateVersionParams,
3608
3738
  type AgentDeleteVersionParams as AgentDeleteVersionParams,
3739
+ type AgentListVersionsParams as AgentListVersionsParams,
3609
3740
  type AgentPublishParams as AgentPublishParams,
3741
+ type AgentRepairParams as AgentRepairParams,
3610
3742
  };
3611
3743
  }