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
@@ -0,0 +1,298 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../core/resource';
4
+ import { APIPromise } from '../core/api-promise';
5
+ import { RequestOptions } from '../internal/request-options';
6
+
7
+ export class CRM extends APIResource {
8
+ /**
9
+ * Get the organization's CRM configuration: which CRM app is linked, the custom
10
+ * contact fields defined for it, and how post-call analysis data is written back
11
+ * to contacts. Returns an empty configuration when nothing has been set up yet.
12
+ */
13
+ getConfig(options?: RequestOptions): APIPromise<CRMConfig> {
14
+ return this._client.get('/get-crm-config', options);
15
+ }
16
+
17
+ /**
18
+ * Get the contact schema of the connected CRM: the fields available on its contact
19
+ * object, which are the values that sync mappings can reference.
20
+ */
21
+ getSchema(
22
+ query: CRMGetSchemaParams | null | undefined = {},
23
+ options?: RequestOptions,
24
+ ): APIPromise<CRMGetSchemaResponse> {
25
+ return this._client.get('/get-crm-schema', { query, ...options });
26
+ }
27
+
28
+ /**
29
+ * Get the status of the organization's contact sync, whether it was started
30
+ * manually or by the schedule. Returns status `idle` when no sync is running.
31
+ */
32
+ getSyncJobStatus(options?: RequestOptions): APIPromise<CRMGetSyncJobStatusResponse> {
33
+ return this._client.get('/get-sync-job-status', options);
34
+ }
35
+
36
+ /**
37
+ * Start a contact sync with the linked CRM app immediately, instead of waiting for
38
+ * the scheduled sync. One sync runs per organization at a time: starting another
39
+ * while one is in flight is rejected. Poll get-sync-job-status for progress.
40
+ */
41
+ runSyncJob(options?: RequestOptions): APIPromise<CRMRunSyncJobResponse> {
42
+ return this._client.post('/run-sync-job', options);
43
+ }
44
+
45
+ /**
46
+ * Update the organization's CRM configuration. Omitted fields stay as they are; a
47
+ * field that is sent replaces its stored value in full.
48
+ */
49
+ updateConfig(body: CRMUpdateConfigParams, options?: RequestOptions): APIPromise<CRMConfig> {
50
+ return this._client.post('/update-crm-config', { body, ...options });
51
+ }
52
+ }
53
+
54
+ export interface CRMConfig {
55
+ org_id: string;
56
+
57
+ /**
58
+ * The connected CRM integration app ID.
59
+ */
60
+ app_id?: string;
61
+
62
+ /**
63
+ * Preferred display order of contact fields, for clients that render contacts as a
64
+ * table. Not used by the API itself.
65
+ */
66
+ contact_columns_order?: Array<string>;
67
+
68
+ /**
69
+ * Tags available to contacts in this organization.
70
+ */
71
+ contact_tags?: Array<string>;
72
+
73
+ crm_analysis_data_mappings?: Array<CRMConfig.CRMAnalysisDataMapping>;
74
+
75
+ custom_fields?: Array<CRMConfig.CustomField>;
76
+
77
+ /**
78
+ * Epoch milliseconds of the last successful sync.
79
+ */
80
+ last_sync_timestamp?: number;
81
+ }
82
+
83
+ export namespace CRMConfig {
84
+ export interface CRMAnalysisDataMapping {
85
+ /**
86
+ * Name of the post-call analysis field to read the value from. A value that does
87
+ * not match the contact field's type is skipped rather than failing the
88
+ * conversation.
89
+ */
90
+ analysis_data_name: string;
91
+
92
+ /**
93
+ * Contact field to write to. Must be an existing built-in or custom contact field,
94
+ * and cannot be phone_number, which identifies the contact.
95
+ */
96
+ field_name: string;
97
+
98
+ /**
99
+ * How to reconcile the new value with what the contact already holds. `overwrite`
100
+ * always replaces it, `fill_if_empty` writes only when the field is empty, and
101
+ * `merge` combines the existing text with the new value. `merge` is available on
102
+ * string fields only.
103
+ */
104
+ update_mode: 'overwrite' | 'fill_if_empty' | 'merge';
105
+ }
106
+
107
+ export interface CustomField {
108
+ name: string;
109
+
110
+ type: 'string' | 'number' | 'boolean' | 'date' | 'datetime' | 'enum';
111
+
112
+ description?: string;
113
+
114
+ /**
115
+ * Display label for the field.
116
+ */
117
+ label?: string;
118
+
119
+ /**
120
+ * Allowed values. Required when `type` is `enum`, where a value is rejected unless
121
+ * it appears here; ignored for every other type.
122
+ */
123
+ options?: Array<string>;
124
+ }
125
+ }
126
+
127
+ export interface CRMGetSchemaResponse {
128
+ fields: Array<CRMGetSchemaResponse.Field>;
129
+
130
+ /**
131
+ * CRM provider name.
132
+ */
133
+ provider: string;
134
+ }
135
+
136
+ export namespace CRMGetSchemaResponse {
137
+ export interface Field {
138
+ name: string;
139
+
140
+ type: 'string' | 'number' | 'boolean' | 'date' | 'datetime' | 'enum';
141
+
142
+ description?: string;
143
+
144
+ /**
145
+ * Display label for the field.
146
+ */
147
+ label?: string;
148
+
149
+ /**
150
+ * Allowed values. Required when `type` is `enum`, where a value is rejected unless
151
+ * it appears here; ignored for every other type.
152
+ */
153
+ options?: Array<string>;
154
+ }
155
+ }
156
+
157
+ export interface CRMGetSyncJobStatusResponse {
158
+ status: 'queued' | 'running' | 'idle';
159
+
160
+ /**
161
+ * Number of items that errored so far.
162
+ */
163
+ failed?: number;
164
+
165
+ /**
166
+ * Epoch milliseconds when the job started.
167
+ */
168
+ start_timestamp?: number;
169
+
170
+ /**
171
+ * Number of items processed successfully so far.
172
+ */
173
+ succeeded?: number;
174
+
175
+ /**
176
+ * Whether the job was started by an explicit API call (`manual`) or by the
177
+ * scheduled sync (`cron`).
178
+ */
179
+ triggered_by?: 'manual' | 'cron';
180
+ }
181
+
182
+ export interface CRMRunSyncJobResponse {
183
+ status: 'queued' | 'running' | 'idle';
184
+
185
+ /**
186
+ * Number of items that errored so far.
187
+ */
188
+ failed?: number;
189
+
190
+ /**
191
+ * Epoch milliseconds when the job started.
192
+ */
193
+ start_timestamp?: number;
194
+
195
+ /**
196
+ * Number of items processed successfully so far.
197
+ */
198
+ succeeded?: number;
199
+
200
+ /**
201
+ * Whether the job was started by an explicit API call (`manual`) or by the
202
+ * scheduled sync (`cron`).
203
+ */
204
+ triggered_by?: 'manual' | 'cron';
205
+ }
206
+
207
+ export interface CRMGetSchemaParams {
208
+ /**
209
+ * ID of the CRM app to read the schema from. Defaults to the app linked in the
210
+ * organization's CRM configuration. Naming a different app additionally requires
211
+ * the App.Read scope.
212
+ */
213
+ app_id?: string;
214
+ }
215
+
216
+ export interface CRMUpdateConfigParams {
217
+ /**
218
+ * ID of the CRM app to link. Pass null to unlink, which stops syncing. Changing it
219
+ * resets the sync cursor, so the next sync re-reads every contact from the new
220
+ * CRM.
221
+ */
222
+ app_id?: string | null;
223
+
224
+ /**
225
+ * Preferred display order of contact fields, for clients that render contacts as a
226
+ * table. Not used by the API itself.
227
+ */
228
+ contact_columns_order?: Array<string>;
229
+
230
+ /**
231
+ * Replaces the stored list.
232
+ */
233
+ crm_analysis_data_mappings?: Array<CRMUpdateConfigParams.CRMAnalysisDataMapping>;
234
+
235
+ /**
236
+ * Replaces the stored list. Names must be snake_case and cannot collide with a
237
+ * built-in contact field or start with `contact`/`external`. Removing a field that
238
+ * an analysis data mapping still targets is rejected — send
239
+ * crm_analysis_data_mappings in the same request to retarget or drop those
240
+ * mappings.
241
+ */
242
+ custom_fields?: Array<CRMUpdateConfigParams.CustomField>;
243
+ }
244
+
245
+ export namespace CRMUpdateConfigParams {
246
+ export interface CRMAnalysisDataMapping {
247
+ /**
248
+ * Name of the post-call analysis field to read the value from. A value that does
249
+ * not match the contact field's type is skipped rather than failing the
250
+ * conversation.
251
+ */
252
+ analysis_data_name: string;
253
+
254
+ /**
255
+ * Contact field to write to. Must be an existing built-in or custom contact field,
256
+ * and cannot be phone_number, which identifies the contact.
257
+ */
258
+ field_name: string;
259
+
260
+ /**
261
+ * How to reconcile the new value with what the contact already holds. `overwrite`
262
+ * always replaces it, `fill_if_empty` writes only when the field is empty, and
263
+ * `merge` combines the existing text with the new value. `merge` is available on
264
+ * string fields only.
265
+ */
266
+ update_mode: 'overwrite' | 'fill_if_empty' | 'merge';
267
+ }
268
+
269
+ export interface CustomField {
270
+ name: string;
271
+
272
+ type: 'string' | 'number' | 'boolean' | 'date' | 'datetime' | 'enum';
273
+
274
+ description?: string;
275
+
276
+ /**
277
+ * Display label for the field.
278
+ */
279
+ label?: string;
280
+
281
+ /**
282
+ * Allowed values. Required when `type` is `enum`, where a value is rejected unless
283
+ * it appears here; ignored for every other type.
284
+ */
285
+ options?: Array<string>;
286
+ }
287
+ }
288
+
289
+ export declare namespace CRM {
290
+ export {
291
+ type CRMConfig as CRMConfig,
292
+ type CRMGetSchemaResponse as CRMGetSchemaResponse,
293
+ type CRMGetSyncJobStatusResponse as CRMGetSyncJobStatusResponse,
294
+ type CRMRunSyncJobResponse as CRMRunSyncJobResponse,
295
+ type CRMGetSchemaParams as CRMGetSchemaParams,
296
+ type CRMUpdateConfigParams as CRMUpdateConfigParams,
297
+ };
298
+ }
@@ -20,9 +20,9 @@ export interface ExportRequestListResponse {
20
20
  /**
21
21
  * Whether more results are available.
22
22
  */
23
- has_more?: boolean;
23
+ has_more: boolean;
24
24
 
25
- items?: Array<ExportRequestListResponse.Item>;
25
+ items: Array<ExportRequestListResponse.Item>;
26
26
 
27
27
  /**
28
28
  * Pagination key for the next page.
@@ -6,27 +6,57 @@ export {
6
6
  type AgentListResponse,
7
7
  type AgentCreateVersionResponse,
8
8
  type AgentGetVersionsResponse,
9
+ type AgentListVersionsResponse,
10
+ type AgentRepairResponse,
9
11
  type AgentCreateParams,
10
12
  type AgentRetrieveParams,
11
13
  type AgentUpdateParams,
12
14
  type AgentListParams,
13
15
  type AgentCreateVersionParams,
14
16
  type AgentDeleteVersionParams,
17
+ type AgentListVersionsParams,
15
18
  type AgentPublishParams,
19
+ type AgentRepairParams,
16
20
  } from './agent';
21
+ export {
22
+ App,
23
+ type AppResponse,
24
+ type AppListResponse,
25
+ type AppListUsagesResponse,
26
+ type AppTestAuthResponse,
27
+ type AppCreateParams,
28
+ type AppUpdateParams,
29
+ type AppListParams,
30
+ type AppDeleteParams,
31
+ type AppListUsagesParams,
32
+ } from './app';
33
+ export { Asset, type AssetCreateResponse, type AssetCreateParams } from './asset';
17
34
  export { BatchCall, type BatchCallResponse, type BatchCallCreateBatchCallParams } from './batch-call';
35
+ export {
36
+ CRM,
37
+ type CRMConfig,
38
+ type CRMGetSchemaResponse,
39
+ type CRMGetSyncJobStatusResponse,
40
+ type CRMRunSyncJobResponse,
41
+ type CRMGetSchemaParams,
42
+ type CRMUpdateConfigParams,
43
+ } from './crm';
18
44
  export {
19
45
  Call,
20
46
  type CallResponse,
47
+ type CreateWebCallResponse,
21
48
  type PhoneCallResponse,
22
49
  type WebCallResponse,
23
50
  type CallListResponse,
51
+ type CallListenLiveResponse,
52
+ type CallTakeOverLiveResponse,
24
53
  type CallUpdateLiveResponse,
25
54
  type CallUpdateParams,
26
55
  type CallListParams,
27
56
  type CallCreatePhoneCallParams,
28
57
  type CallCreateWebCallParams,
29
58
  type CallRegisterPhoneCallParams,
59
+ type CallTakeOverLiveParams,
30
60
  type CallUpdateLiveParams,
31
61
  } from './call';
32
62
  export {
@@ -55,6 +85,24 @@ export {
55
85
  type ChatAgentPublishParams,
56
86
  } from './chat-agent';
57
87
  export { Concurrency, type ConcurrencyRetrieveResponse } from './concurrency';
88
+ export {
89
+ Contact,
90
+ type ContactResponse,
91
+ type ContactListResponse,
92
+ type ContactBackfillAnalysisDataResponse,
93
+ type ContactCreateImportResponse,
94
+ type ContactGetBackfillJobStatusResponse,
95
+ type ContactGetImportResponse,
96
+ type ContactListConversationsResponse,
97
+ type ContactUploadImportFileResponse,
98
+ type ContactCreateParams,
99
+ type ContactUpdateParams,
100
+ type ContactListParams,
101
+ type ContactBackfillAnalysisDataParams,
102
+ type ContactCreateImportParams,
103
+ type ContactListConversationsParams,
104
+ type ContactUploadImportFileParams,
105
+ } from './contact';
58
106
  export {
59
107
  ConversationFlow,
60
108
  type ConversationFlowResponse,
@@ -63,6 +111,7 @@ export {
63
111
  type ConversationFlowRetrieveParams,
64
112
  type ConversationFlowUpdateParams,
65
113
  type ConversationFlowListParams,
114
+ type ConversationFlowDeleteParams,
66
115
  } from './conversation-flow';
67
116
  export {
68
117
  ConversationFlowComponent,
@@ -94,6 +143,7 @@ export {
94
143
  type LlmRetrieveParams,
95
144
  type LlmUpdateParams,
96
145
  type LlmListParams,
146
+ type LlmDeleteParams,
97
147
  } from './llm';
98
148
  export {
99
149
  McpTool,
@@ -125,16 +125,24 @@ export interface KnowledgeBaseResponse {
125
125
  knowledge_base_name: string;
126
126
 
127
127
  /**
128
- * Status of the knowledge base. When it's created and being processed, it's
129
- * "in_progress". When the processing is done, it's "complete". When there's an
130
- * error in processing, it's "error". When it is during kb updating, it's
131
- * "refreshing_in_progress".
128
+ * Current processing state of the knowledge base:
129
+ *
130
+ * - `in_progress`: Initial indexing is running. Source metadata may be incomplete
131
+ * until indexing finishes.
132
+ * - `complete`: Initial indexing or the latest update or refresh finished.
133
+ * Individual source failures may still be reported in `error_messages`.
134
+ * - `error`: Initial indexing failed. Source metadata may be incomplete.
135
+ * - `refreshing_in_progress`: An existing knowledge base is being updated. This
136
+ * includes indexing newly added sources or running a manual or automatic refresh
137
+ * that re-indexes URLs, Google Drive files, Microsoft OneDrive files, and pages
138
+ * from auto-crawling paths. Previously indexed sources remain available during
139
+ * the update, and the source list may change when it finishes.
132
140
  */
133
141
  status: 'in_progress' | 'complete' | 'error' | 'refreshing_in_progress';
134
142
 
135
143
  /**
136
- * Whether to enable auto refresh for the knowledge base urls. If set to true, will
137
- * retrieve the data from the specified url every 12 hours.
144
+ * Whether eligible URL and connected-file sources refresh automatically on a daily
145
+ * cadence.
138
146
  */
139
147
  enable_auto_refresh?: boolean;
140
148
 
@@ -243,8 +251,8 @@ export interface KnowledgeBaseCreateParams {
243
251
  knowledge_base_name: string;
244
252
 
245
253
  /**
246
- * Whether to enable auto refresh for the knowledge base urls. If set to true, will
247
- * retrieve the data from the specified url every 12 hours.
254
+ * Whether to refresh eligible URL and connected-file sources automatically on a
255
+ * daily cadence.
248
256
  */
249
257
  enable_auto_refresh?: boolean;
250
258
 
@@ -77,8 +77,14 @@ export class Llm extends APIResource {
77
77
  * await client.llm.delete('oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD');
78
78
  * ```
79
79
  */
80
- delete(llmID: string, options?: RequestOptions): APIPromise<void> {
80
+ delete(
81
+ llmID: string,
82
+ params: LlmDeleteParams | null | undefined = {},
83
+ options?: RequestOptions,
84
+ ): APIPromise<void> {
85
+ const { force_delete } = params ?? {};
81
86
  return this._client.delete(path`/delete-retell-llm/${llmID}`, {
87
+ query: { force_delete },
82
88
  ...options,
83
89
  headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
84
90
  });
@@ -662,6 +668,9 @@ export namespace LlmResponse {
662
668
  }
663
669
  }
664
670
 
671
+ /**
672
+ * @deprecated
673
+ */
665
674
  export interface CheckAvailabilityCalTool {
666
675
  /**
667
676
  * Cal.com Api key that have access to the cal.com event you want to check
@@ -702,6 +711,9 @@ export namespace LlmResponse {
702
711
  timezone?: string;
703
712
  }
704
713
 
714
+ /**
715
+ * @deprecated
716
+ */
705
717
  export interface BookAppointmentCalTool {
706
718
  /**
707
719
  * Cal.com Api key that have access to the cal.com event you want to book
@@ -792,7 +804,9 @@ export namespace LlmResponse {
792
804
  keep_current_language?: boolean;
793
805
 
794
806
  /**
795
- * If true, keep the current voice when swapping agents. Defaults to false.
807
+ * If true, keep the current voice and ambient sound settings when swapping agents.
808
+ * Otherwise, use the destination agent's voice and ambient sound settings.
809
+ * Defaults to false.
796
810
  */
797
811
  keep_current_voice?: boolean;
798
812
 
@@ -1972,6 +1986,9 @@ export namespace LlmResponse {
1972
1986
  }
1973
1987
  }
1974
1988
 
1989
+ /**
1990
+ * @deprecated
1991
+ */
1975
1992
  export interface CheckAvailabilityCalTool {
1976
1993
  /**
1977
1994
  * Cal.com Api key that have access to the cal.com event you want to check
@@ -2012,6 +2029,9 @@ export namespace LlmResponse {
2012
2029
  timezone?: string;
2013
2030
  }
2014
2031
 
2032
+ /**
2033
+ * @deprecated
2034
+ */
2015
2035
  export interface BookAppointmentCalTool {
2016
2036
  /**
2017
2037
  * Cal.com Api key that have access to the cal.com event you want to book
@@ -2102,7 +2122,9 @@ export namespace LlmResponse {
2102
2122
  keep_current_language?: boolean;
2103
2123
 
2104
2124
  /**
2105
- * If true, keep the current voice when swapping agents. Defaults to false.
2125
+ * If true, keep the current voice and ambient sound settings when swapping agents.
2126
+ * Otherwise, use the destination agent's voice and ambient sound settings.
2127
+ * Defaults to false.
2106
2128
  */
2107
2129
  keep_current_voice?: boolean;
2108
2130
 
@@ -2750,9 +2772,9 @@ export interface LlmListResponse {
2750
2772
  /**
2751
2773
  * Whether more results are available.
2752
2774
  */
2753
- has_more?: boolean;
2775
+ has_more: boolean;
2754
2776
 
2755
- items?: Array<LlmResponse>;
2777
+ items: Array<LlmResponse>;
2756
2778
 
2757
2779
  /**
2758
2780
  * Pagination key for the next page.
@@ -3316,6 +3338,9 @@ export namespace LlmCreateParams {
3316
3338
  }
3317
3339
  }
3318
3340
 
3341
+ /**
3342
+ * @deprecated
3343
+ */
3319
3344
  export interface CheckAvailabilityCalTool {
3320
3345
  /**
3321
3346
  * Cal.com Api key that have access to the cal.com event you want to check
@@ -3356,6 +3381,9 @@ export namespace LlmCreateParams {
3356
3381
  timezone?: string;
3357
3382
  }
3358
3383
 
3384
+ /**
3385
+ * @deprecated
3386
+ */
3359
3387
  export interface BookAppointmentCalTool {
3360
3388
  /**
3361
3389
  * Cal.com Api key that have access to the cal.com event you want to book
@@ -3446,7 +3474,9 @@ export namespace LlmCreateParams {
3446
3474
  keep_current_language?: boolean;
3447
3475
 
3448
3476
  /**
3449
- * If true, keep the current voice when swapping agents. Defaults to false.
3477
+ * If true, keep the current voice and ambient sound settings when swapping agents.
3478
+ * Otherwise, use the destination agent's voice and ambient sound settings.
3479
+ * Defaults to false.
3450
3480
  */
3451
3481
  keep_current_voice?: boolean;
3452
3482
 
@@ -4626,6 +4656,9 @@ export namespace LlmCreateParams {
4626
4656
  }
4627
4657
  }
4628
4658
 
4659
+ /**
4660
+ * @deprecated
4661
+ */
4629
4662
  export interface CheckAvailabilityCalTool {
4630
4663
  /**
4631
4664
  * Cal.com Api key that have access to the cal.com event you want to check
@@ -4666,6 +4699,9 @@ export namespace LlmCreateParams {
4666
4699
  timezone?: string;
4667
4700
  }
4668
4701
 
4702
+ /**
4703
+ * @deprecated
4704
+ */
4669
4705
  export interface BookAppointmentCalTool {
4670
4706
  /**
4671
4707
  * Cal.com Api key that have access to the cal.com event you want to book
@@ -4756,7 +4792,9 @@ export namespace LlmCreateParams {
4756
4792
  keep_current_language?: boolean;
4757
4793
 
4758
4794
  /**
4759
- * If true, keep the current voice when swapping agents. Defaults to false.
4795
+ * If true, keep the current voice and ambient sound settings when swapping agents.
4796
+ * Otherwise, use the destination agent's voice and ambient sound settings.
4797
+ * Defaults to false.
4760
4798
  */
4761
4799
  keep_current_voice?: boolean;
4762
4800
 
@@ -5972,6 +6010,9 @@ export namespace LlmUpdateParams {
5972
6010
  }
5973
6011
  }
5974
6012
 
6013
+ /**
6014
+ * @deprecated
6015
+ */
5975
6016
  export interface CheckAvailabilityCalTool {
5976
6017
  /**
5977
6018
  * Cal.com Api key that have access to the cal.com event you want to check
@@ -6012,6 +6053,9 @@ export namespace LlmUpdateParams {
6012
6053
  timezone?: string;
6013
6054
  }
6014
6055
 
6056
+ /**
6057
+ * @deprecated
6058
+ */
6015
6059
  export interface BookAppointmentCalTool {
6016
6060
  /**
6017
6061
  * Cal.com Api key that have access to the cal.com event you want to book
@@ -6102,7 +6146,9 @@ export namespace LlmUpdateParams {
6102
6146
  keep_current_language?: boolean;
6103
6147
 
6104
6148
  /**
6105
- * If true, keep the current voice when swapping agents. Defaults to false.
6149
+ * If true, keep the current voice and ambient sound settings when swapping agents.
6150
+ * Otherwise, use the destination agent's voice and ambient sound settings.
6151
+ * Defaults to false.
6106
6152
  */
6107
6153
  keep_current_voice?: boolean;
6108
6154
 
@@ -7282,6 +7328,9 @@ export namespace LlmUpdateParams {
7282
7328
  }
7283
7329
  }
7284
7330
 
7331
+ /**
7332
+ * @deprecated
7333
+ */
7285
7334
  export interface CheckAvailabilityCalTool {
7286
7335
  /**
7287
7336
  * Cal.com Api key that have access to the cal.com event you want to check
@@ -7322,6 +7371,9 @@ export namespace LlmUpdateParams {
7322
7371
  timezone?: string;
7323
7372
  }
7324
7373
 
7374
+ /**
7375
+ * @deprecated
7376
+ */
7325
7377
  export interface BookAppointmentCalTool {
7326
7378
  /**
7327
7379
  * Cal.com Api key that have access to the cal.com event you want to book
@@ -7412,7 +7464,9 @@ export namespace LlmUpdateParams {
7412
7464
  keep_current_language?: boolean;
7413
7465
 
7414
7466
  /**
7415
- * If true, keep the current voice when swapping agents. Defaults to false.
7467
+ * If true, keep the current voice and ambient sound settings when swapping agents.
7468
+ * Otherwise, use the destination agent's voice and ambient sound settings.
7469
+ * Defaults to false.
7416
7470
  */
7417
7471
  keep_current_voice?: boolean;
7418
7472
 
@@ -8073,6 +8127,15 @@ export interface LlmListParams {
8073
8127
  sort_order?: 'ascending' | 'descending';
8074
8128
  }
8075
8129
 
8130
+ export interface LlmDeleteParams {
8131
+ /**
8132
+ * By default the deletion is rejected with a 400 if any agent still uses this
8133
+ * Retell LLM as its response engine. Set to true to delete it anyway, which leaves
8134
+ * those agents pointing at a Retell LLM that no longer exists.
8135
+ */
8136
+ force_delete?: boolean;
8137
+ }
8138
+
8076
8139
  export declare namespace Llm {
8077
8140
  export {
8078
8141
  type LlmResponse as LlmResponse,
@@ -8081,5 +8144,6 @@ export declare namespace Llm {
8081
8144
  type LlmRetrieveParams as LlmRetrieveParams,
8082
8145
  type LlmUpdateParams as LlmUpdateParams,
8083
8146
  type LlmListParams as LlmListParams,
8147
+ type LlmDeleteParams as LlmDeleteParams,
8084
8148
  };
8085
8149
  }