retell-sdk 5.62.0 → 5.64.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 (103) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/client.d.mts +15 -6
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +15 -6
  5. package/client.d.ts.map +1 -1
  6. package/client.js +9 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +9 -0
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/agent.d.mts +64 -4
  12. package/resources/agent.d.mts.map +1 -1
  13. package/resources/agent.d.ts +64 -4
  14. package/resources/agent.d.ts.map +1 -1
  15. package/resources/agent.js +13 -4
  16. package/resources/agent.js.map +1 -1
  17. package/resources/agent.mjs +13 -4
  18. package/resources/agent.mjs.map +1 -1
  19. package/resources/app.d.mts +457 -0
  20. package/resources/app.d.mts.map +1 -0
  21. package/resources/app.d.ts +457 -0
  22. package/resources/app.d.ts.map +1 -0
  23. package/resources/app.js +67 -0
  24. package/resources/app.js.map +1 -0
  25. package/resources/app.mjs +63 -0
  26. package/resources/app.mjs.map +1 -0
  27. package/resources/call.d.mts +66 -6
  28. package/resources/call.d.mts.map +1 -1
  29. package/resources/call.d.ts +66 -6
  30. package/resources/call.d.ts.map +1 -1
  31. package/resources/chat-agent.d.mts +2 -8
  32. package/resources/chat-agent.d.mts.map +1 -1
  33. package/resources/chat-agent.d.ts +2 -8
  34. package/resources/chat-agent.d.ts.map +1 -1
  35. package/resources/chat-agent.js +2 -8
  36. package/resources/chat-agent.js.map +1 -1
  37. package/resources/chat-agent.mjs +2 -8
  38. package/resources/chat-agent.mjs.map +1 -1
  39. package/resources/contact.d.mts +541 -0
  40. package/resources/contact.d.mts.map +1 -0
  41. package/resources/contact.d.ts +541 -0
  42. package/resources/contact.d.ts.map +1 -0
  43. package/resources/contact.js +77 -0
  44. package/resources/contact.js.map +1 -0
  45. package/resources/contact.mjs +73 -0
  46. package/resources/contact.mjs.map +1 -0
  47. package/resources/conversation-flow-component.d.mts +18 -6
  48. package/resources/conversation-flow-component.d.mts.map +1 -1
  49. package/resources/conversation-flow-component.d.ts +18 -6
  50. package/resources/conversation-flow-component.d.ts.map +1 -1
  51. package/resources/conversation-flow.d.mts +46 -14
  52. package/resources/conversation-flow.d.mts.map +1 -1
  53. package/resources/conversation-flow.d.ts +46 -14
  54. package/resources/conversation-flow.d.ts.map +1 -1
  55. package/resources/conversation-flow.js +3 -1
  56. package/resources/conversation-flow.js.map +1 -1
  57. package/resources/conversation-flow.mjs +3 -1
  58. package/resources/conversation-flow.mjs.map +1 -1
  59. package/resources/crm.d.mts +222 -0
  60. package/resources/crm.d.mts.map +1 -0
  61. package/resources/crm.d.ts +222 -0
  62. package/resources/crm.d.ts.map +1 -0
  63. package/resources/crm.js +46 -0
  64. package/resources/crm.js.map +1 -0
  65. package/resources/crm.mjs +42 -0
  66. package/resources/crm.mjs.map +1 -0
  67. package/resources/index.d.mts +6 -3
  68. package/resources/index.d.mts.map +1 -1
  69. package/resources/index.d.ts +6 -3
  70. package/resources/index.d.ts.map +1 -1
  71. package/resources/index.js +7 -1
  72. package/resources/index.js.map +1 -1
  73. package/resources/index.mjs +3 -0
  74. package/resources/index.mjs.map +1 -1
  75. package/resources/knowledge-base.d.mts +12 -4
  76. package/resources/knowledge-base.d.mts.map +1 -1
  77. package/resources/knowledge-base.d.ts +12 -4
  78. package/resources/knowledge-base.d.ts.map +1 -1
  79. package/resources/llm.d.mts +28 -8
  80. package/resources/llm.d.mts.map +1 -1
  81. package/resources/llm.d.ts +28 -8
  82. package/resources/llm.d.ts.map +1 -1
  83. package/resources/llm.js +3 -1
  84. package/resources/llm.js.map +1 -1
  85. package/resources/llm.mjs +3 -1
  86. package/resources/llm.mjs.map +1 -1
  87. package/src/client.ts +85 -0
  88. package/src/resources/agent.ts +85 -4
  89. package/src/resources/app.ts +622 -0
  90. package/src/resources/call.ts +93 -7
  91. package/src/resources/chat-agent.ts +2 -8
  92. package/src/resources/contact.ts +732 -0
  93. package/src/resources/conversation-flow-component.ts +18 -6
  94. package/src/resources/conversation-flow.ts +53 -13
  95. package/src/resources/crm.ts +293 -0
  96. package/src/resources/index.ts +38 -0
  97. package/src/resources/knowledge-base.ts +12 -4
  98. package/src/resources/llm.ts +35 -7
  99. package/src/version.ts +1 -1
  100. package/version.d.mts +1 -1
  101. package/version.d.ts +1 -1
  102. package/version.js +1 -1
  103. package/version.mjs +1 -1
@@ -2141,7 +2141,9 @@ export namespace ConversationFlowComponentResponse {
2141
2141
  keep_current_language?: boolean;
2142
2142
 
2143
2143
  /**
2144
- * If true, keep the current voice when swapping agents. Defaults to false.
2144
+ * If true, keep the current voice and ambient sound settings when swapping agents.
2145
+ * Otherwise, use the destination agent's voice and ambient sound settings.
2146
+ * Defaults to false.
2145
2147
  */
2146
2148
  keep_current_voice?: boolean;
2147
2149
 
@@ -6641,7 +6643,9 @@ export namespace ConversationFlowComponentResponse {
6641
6643
  keep_current_language?: boolean;
6642
6644
 
6643
6645
  /**
6644
- * If true, keep the current voice when swapping agents. Defaults to false.
6646
+ * If true, keep the current voice and ambient sound settings when swapping agents.
6647
+ * Otherwise, use the destination agent's voice and ambient sound settings.
6648
+ * Defaults to false.
6645
6649
  */
6646
6650
  keep_current_voice?: boolean;
6647
6651
 
@@ -10790,7 +10794,9 @@ export namespace ConversationFlowComponentCreateParams {
10790
10794
  keep_current_language?: boolean;
10791
10795
 
10792
10796
  /**
10793
- * If true, keep the current voice when swapping agents. Defaults to false.
10797
+ * If true, keep the current voice and ambient sound settings when swapping agents.
10798
+ * Otherwise, use the destination agent's voice and ambient sound settings.
10799
+ * Defaults to false.
10794
10800
  */
10795
10801
  keep_current_voice?: boolean;
10796
10802
 
@@ -15290,7 +15296,9 @@ export namespace ConversationFlowComponentCreateParams {
15290
15296
  keep_current_language?: boolean;
15291
15297
 
15292
15298
  /**
15293
- * If true, keep the current voice when swapping agents. Defaults to false.
15299
+ * If true, keep the current voice and ambient sound settings when swapping agents.
15300
+ * Otherwise, use the destination agent's voice and ambient sound settings.
15301
+ * Defaults to false.
15294
15302
  */
15295
15303
  keep_current_voice?: boolean;
15296
15304
 
@@ -19459,7 +19467,9 @@ export namespace ConversationFlowComponentUpdateParams {
19459
19467
  keep_current_language?: boolean;
19460
19468
 
19461
19469
  /**
19462
- * If true, keep the current voice when swapping agents. Defaults to false.
19470
+ * If true, keep the current voice and ambient sound settings when swapping agents.
19471
+ * Otherwise, use the destination agent's voice and ambient sound settings.
19472
+ * Defaults to false.
19463
19473
  */
19464
19474
  keep_current_voice?: boolean;
19465
19475
 
@@ -23959,7 +23969,9 @@ export namespace ConversationFlowComponentUpdateParams {
23959
23969
  keep_current_language?: boolean;
23960
23970
 
23961
23971
  /**
23962
- * If true, keep the current voice when swapping agents. Defaults to false.
23972
+ * If true, keep the current voice and ambient sound settings when swapping agents.
23973
+ * Otherwise, use the destination agent's voice and ambient sound settings.
23974
+ * Defaults to false.
23963
23975
  */
23964
23976
  keep_current_voice?: boolean;
23965
23977
 
@@ -103,8 +103,14 @@ export class ConversationFlow extends APIResource {
103
103
  * );
104
104
  * ```
105
105
  */
106
- delete(conversationFlowID: string, options?: RequestOptions): APIPromise<void> {
106
+ delete(
107
+ conversationFlowID: string,
108
+ params: ConversationFlowDeleteParams | null | undefined = {},
109
+ options?: RequestOptions,
110
+ ): APIPromise<void> {
111
+ const { force_delete } = params ?? {};
107
112
  return this._client.delete(path`/delete-conversation-flow/${conversationFlowID}`, {
113
+ query: { force_delete },
108
114
  ...options,
109
115
  headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
110
116
  });
@@ -2271,7 +2277,9 @@ export namespace ConversationFlowResponse {
2271
2277
  keep_current_language?: boolean;
2272
2278
 
2273
2279
  /**
2274
- * If true, keep the current voice when swapping agents. Defaults to false.
2280
+ * If true, keep the current voice and ambient sound settings when swapping agents.
2281
+ * Otherwise, use the destination agent's voice and ambient sound settings.
2282
+ * Defaults to false.
2275
2283
  */
2276
2284
  keep_current_voice?: boolean;
2277
2285
 
@@ -6771,7 +6779,9 @@ export namespace ConversationFlowResponse {
6771
6779
  keep_current_language?: boolean;
6772
6780
 
6773
6781
  /**
6774
- * If true, keep the current voice when swapping agents. Defaults to false.
6782
+ * If true, keep the current voice and ambient sound settings when swapping agents.
6783
+ * Otherwise, use the destination agent's voice and ambient sound settings.
6784
+ * Defaults to false.
6775
6785
  */
6776
6786
  keep_current_voice?: boolean;
6777
6787
 
@@ -10926,7 +10936,9 @@ export namespace ConversationFlowResponse {
10926
10936
  keep_current_language?: boolean;
10927
10937
 
10928
10938
  /**
10929
- * If true, keep the current voice when swapping agents. Defaults to false.
10939
+ * If true, keep the current voice and ambient sound settings when swapping agents.
10940
+ * Otherwise, use the destination agent's voice and ambient sound settings.
10941
+ * Defaults to false.
10930
10942
  */
10931
10943
  keep_current_voice?: boolean;
10932
10944
 
@@ -15426,7 +15438,9 @@ export namespace ConversationFlowResponse {
15426
15438
  keep_current_language?: boolean;
15427
15439
 
15428
15440
  /**
15429
- * If true, keep the current voice when swapping agents. Defaults to false.
15441
+ * If true, keep the current voice and ambient sound settings when swapping agents.
15442
+ * Otherwise, use the destination agent's voice and ambient sound settings.
15443
+ * Defaults to false.
15430
15444
  */
15431
15445
  keep_current_voice?: boolean;
15432
15446
 
@@ -19642,7 +19656,9 @@ export namespace ConversationFlowCreateParams {
19642
19656
  keep_current_language?: boolean;
19643
19657
 
19644
19658
  /**
19645
- * If true, keep the current voice when swapping agents. Defaults to false.
19659
+ * If true, keep the current voice and ambient sound settings when swapping agents.
19660
+ * Otherwise, use the destination agent's voice and ambient sound settings.
19661
+ * Defaults to false.
19646
19662
  */
19647
19663
  keep_current_voice?: boolean;
19648
19664
 
@@ -24142,7 +24158,9 @@ export namespace ConversationFlowCreateParams {
24142
24158
  keep_current_language?: boolean;
24143
24159
 
24144
24160
  /**
24145
- * If true, keep the current voice when swapping agents. Defaults to false.
24161
+ * If true, keep the current voice and ambient sound settings when swapping agents.
24162
+ * Otherwise, use the destination agent's voice and ambient sound settings.
24163
+ * Defaults to false.
24146
24164
  */
24147
24165
  keep_current_voice?: boolean;
24148
24166
 
@@ -27956,7 +27974,9 @@ export namespace ConversationFlowCreateParams {
27956
27974
  keep_current_language?: boolean;
27957
27975
 
27958
27976
  /**
27959
- * If true, keep the current voice when swapping agents. Defaults to false.
27977
+ * If true, keep the current voice and ambient sound settings when swapping agents.
27978
+ * Otherwise, use the destination agent's voice and ambient sound settings.
27979
+ * Defaults to false.
27960
27980
  */
27961
27981
  keep_current_voice?: boolean;
27962
27982
 
@@ -32456,7 +32476,9 @@ export namespace ConversationFlowCreateParams {
32456
32476
  keep_current_language?: boolean;
32457
32477
 
32458
32478
  /**
32459
- * If true, keep the current voice when swapping agents. Defaults to false.
32479
+ * If true, keep the current voice and ambient sound settings when swapping agents.
32480
+ * Otherwise, use the destination agent's voice and ambient sound settings.
32481
+ * Defaults to false.
32460
32482
  */
32461
32483
  keep_current_voice?: boolean;
32462
32484
 
@@ -37068,7 +37090,9 @@ export namespace ConversationFlowUpdateParams {
37068
37090
  keep_current_language?: boolean;
37069
37091
 
37070
37092
  /**
37071
- * If true, keep the current voice when swapping agents. Defaults to false.
37093
+ * If true, keep the current voice and ambient sound settings when swapping agents.
37094
+ * Otherwise, use the destination agent's voice and ambient sound settings.
37095
+ * Defaults to false.
37072
37096
  */
37073
37097
  keep_current_voice?: boolean;
37074
37098
 
@@ -41568,7 +41592,9 @@ export namespace ConversationFlowUpdateParams {
41568
41592
  keep_current_language?: boolean;
41569
41593
 
41570
41594
  /**
41571
- * If true, keep the current voice when swapping agents. Defaults to false.
41595
+ * If true, keep the current voice and ambient sound settings when swapping agents.
41596
+ * Otherwise, use the destination agent's voice and ambient sound settings.
41597
+ * Defaults to false.
41572
41598
  */
41573
41599
  keep_current_voice?: boolean;
41574
41600
 
@@ -45723,7 +45749,9 @@ export namespace ConversationFlowUpdateParams {
45723
45749
  keep_current_language?: boolean;
45724
45750
 
45725
45751
  /**
45726
- * If true, keep the current voice when swapping agents. Defaults to false.
45752
+ * If true, keep the current voice and ambient sound settings when swapping agents.
45753
+ * Otherwise, use the destination agent's voice and ambient sound settings.
45754
+ * Defaults to false.
45727
45755
  */
45728
45756
  keep_current_voice?: boolean;
45729
45757
 
@@ -50223,7 +50251,9 @@ export namespace ConversationFlowUpdateParams {
50223
50251
  keep_current_language?: boolean;
50224
50252
 
50225
50253
  /**
50226
- * If true, keep the current voice when swapping agents. Defaults to false.
50254
+ * If true, keep the current voice and ambient sound settings when swapping agents.
50255
+ * Otherwise, use the destination agent's voice and ambient sound settings.
50256
+ * Defaults to false.
50227
50257
  */
50228
50258
  keep_current_voice?: boolean;
50229
50259
 
@@ -52325,6 +52355,15 @@ export interface ConversationFlowListParams {
52325
52355
  sort_order?: 'ascending' | 'descending';
52326
52356
  }
52327
52357
 
52358
+ export interface ConversationFlowDeleteParams {
52359
+ /**
52360
+ * By default the deletion is rejected with a 400 if any agent still uses this
52361
+ * conversation flow as its response engine. Set to true to delete it anyway, which
52362
+ * leaves those agents pointing at a conversation flow that no longer exists.
52363
+ */
52364
+ force_delete?: boolean;
52365
+ }
52366
+
52328
52367
  export declare namespace ConversationFlow {
52329
52368
  export {
52330
52369
  type ConversationFlowResponse as ConversationFlowResponse,
@@ -52333,5 +52372,6 @@ export declare namespace ConversationFlow {
52333
52372
  type ConversationFlowRetrieveParams as ConversationFlowRetrieveParams,
52334
52373
  type ConversationFlowUpdateParams as ConversationFlowUpdateParams,
52335
52374
  type ConversationFlowListParams as ConversationFlowListParams,
52375
+ type ConversationFlowDeleteParams as ConversationFlowDeleteParams,
52336
52376
  };
52337
52377
  }
@@ -0,0 +1,293 @@
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
+ crm_analysis_data_mappings?: Array<CRMConfig.CRMAnalysisDataMapping>;
69
+
70
+ custom_fields?: Array<CRMConfig.CustomField>;
71
+
72
+ /**
73
+ * Epoch milliseconds of the last successful sync.
74
+ */
75
+ last_sync_timestamp?: number;
76
+ }
77
+
78
+ export namespace CRMConfig {
79
+ export interface CRMAnalysisDataMapping {
80
+ /**
81
+ * Name of the post-call analysis field to read the value from. A value that does
82
+ * not match the contact field's type is skipped rather than failing the
83
+ * conversation.
84
+ */
85
+ analysis_data_name: string;
86
+
87
+ /**
88
+ * Contact field to write to. Must be an existing built-in or custom contact field,
89
+ * and cannot be phone_number, which identifies the contact.
90
+ */
91
+ field_name: string;
92
+
93
+ /**
94
+ * How to reconcile the new value with what the contact already holds. `overwrite`
95
+ * always replaces it, `fill_if_empty` writes only when the field is empty, and
96
+ * `merge` combines the existing text with the new value. `merge` is available on
97
+ * string fields only.
98
+ */
99
+ update_mode: 'overwrite' | 'fill_if_empty' | 'merge';
100
+ }
101
+
102
+ export interface CustomField {
103
+ name: string;
104
+
105
+ type: 'string' | 'number' | 'boolean' | 'date' | 'datetime' | 'enum';
106
+
107
+ description?: string;
108
+
109
+ /**
110
+ * Display label for the field.
111
+ */
112
+ label?: string;
113
+
114
+ /**
115
+ * Allowed values. Required when `type` is `enum`, where a value is rejected unless
116
+ * it appears here; ignored for every other type.
117
+ */
118
+ options?: Array<string>;
119
+ }
120
+ }
121
+
122
+ export interface CRMGetSchemaResponse {
123
+ fields: Array<CRMGetSchemaResponse.Field>;
124
+
125
+ /**
126
+ * CRM provider name.
127
+ */
128
+ provider: string;
129
+ }
130
+
131
+ export namespace CRMGetSchemaResponse {
132
+ export interface Field {
133
+ name: string;
134
+
135
+ type: 'string' | 'number' | 'boolean' | 'date' | 'datetime' | 'enum';
136
+
137
+ description?: string;
138
+
139
+ /**
140
+ * Display label for the field.
141
+ */
142
+ label?: string;
143
+
144
+ /**
145
+ * Allowed values. Required when `type` is `enum`, where a value is rejected unless
146
+ * it appears here; ignored for every other type.
147
+ */
148
+ options?: Array<string>;
149
+ }
150
+ }
151
+
152
+ export interface CRMGetSyncJobStatusResponse {
153
+ status: 'queued' | 'running' | 'idle';
154
+
155
+ /**
156
+ * Number of items that errored so far.
157
+ */
158
+ failed?: number;
159
+
160
+ /**
161
+ * Epoch milliseconds when the job started.
162
+ */
163
+ start_timestamp?: number;
164
+
165
+ /**
166
+ * Number of items processed successfully so far.
167
+ */
168
+ succeeded?: number;
169
+
170
+ /**
171
+ * Whether the job was started by an explicit API call (`manual`) or by the
172
+ * scheduled sync (`cron`).
173
+ */
174
+ triggered_by?: 'manual' | 'cron';
175
+ }
176
+
177
+ export interface CRMRunSyncJobResponse {
178
+ status: 'queued' | 'running' | 'idle';
179
+
180
+ /**
181
+ * Number of items that errored so far.
182
+ */
183
+ failed?: number;
184
+
185
+ /**
186
+ * Epoch milliseconds when the job started.
187
+ */
188
+ start_timestamp?: number;
189
+
190
+ /**
191
+ * Number of items processed successfully so far.
192
+ */
193
+ succeeded?: number;
194
+
195
+ /**
196
+ * Whether the job was started by an explicit API call (`manual`) or by the
197
+ * scheduled sync (`cron`).
198
+ */
199
+ triggered_by?: 'manual' | 'cron';
200
+ }
201
+
202
+ export interface CRMGetSchemaParams {
203
+ /**
204
+ * ID of the CRM app to read the schema from. Defaults to the app linked in the
205
+ * organization's CRM configuration. Naming a different app additionally requires
206
+ * the App.Read scope.
207
+ */
208
+ app_id?: string;
209
+ }
210
+
211
+ export interface CRMUpdateConfigParams {
212
+ /**
213
+ * ID of the CRM app to link. Pass null to unlink, which stops syncing. Changing it
214
+ * resets the sync cursor, so the next sync re-reads every contact from the new
215
+ * CRM.
216
+ */
217
+ app_id?: string | null;
218
+
219
+ /**
220
+ * Preferred display order of contact fields, for clients that render contacts as a
221
+ * table. Not used by the API itself.
222
+ */
223
+ contact_columns_order?: Array<string>;
224
+
225
+ /**
226
+ * Replaces the stored list.
227
+ */
228
+ crm_analysis_data_mappings?: Array<CRMUpdateConfigParams.CRMAnalysisDataMapping>;
229
+
230
+ /**
231
+ * Replaces the stored list. Names must be snake_case and cannot collide with a
232
+ * built-in contact field or start with `contact`/`external`. Removing a field that
233
+ * an analysis data mapping still targets is rejected — send
234
+ * crm_analysis_data_mappings in the same request to retarget or drop those
235
+ * mappings.
236
+ */
237
+ custom_fields?: Array<CRMUpdateConfigParams.CustomField>;
238
+ }
239
+
240
+ export namespace CRMUpdateConfigParams {
241
+ export interface CRMAnalysisDataMapping {
242
+ /**
243
+ * Name of the post-call analysis field to read the value from. A value that does
244
+ * not match the contact field's type is skipped rather than failing the
245
+ * conversation.
246
+ */
247
+ analysis_data_name: string;
248
+
249
+ /**
250
+ * Contact field to write to. Must be an existing built-in or custom contact field,
251
+ * and cannot be phone_number, which identifies the contact.
252
+ */
253
+ field_name: string;
254
+
255
+ /**
256
+ * How to reconcile the new value with what the contact already holds. `overwrite`
257
+ * always replaces it, `fill_if_empty` writes only when the field is empty, and
258
+ * `merge` combines the existing text with the new value. `merge` is available on
259
+ * string fields only.
260
+ */
261
+ update_mode: 'overwrite' | 'fill_if_empty' | 'merge';
262
+ }
263
+
264
+ export interface CustomField {
265
+ name: string;
266
+
267
+ type: 'string' | 'number' | 'boolean' | 'date' | 'datetime' | 'enum';
268
+
269
+ description?: string;
270
+
271
+ /**
272
+ * Display label for the field.
273
+ */
274
+ label?: string;
275
+
276
+ /**
277
+ * Allowed values. Required when `type` is `enum`, where a value is rejected unless
278
+ * it appears here; ignored for every other type.
279
+ */
280
+ options?: Array<string>;
281
+ }
282
+ }
283
+
284
+ export declare namespace CRM {
285
+ export {
286
+ type CRMConfig as CRMConfig,
287
+ type CRMGetSchemaResponse as CRMGetSchemaResponse,
288
+ type CRMGetSyncJobStatusResponse as CRMGetSyncJobStatusResponse,
289
+ type CRMRunSyncJobResponse as CRMRunSyncJobResponse,
290
+ type CRMGetSchemaParams as CRMGetSchemaParams,
291
+ type CRMUpdateConfigParams as CRMUpdateConfigParams,
292
+ };
293
+ }
@@ -6,15 +6,38 @@ export {
6
6
  type AgentListResponse,
7
7
  type AgentCreateVersionResponse,
8
8
  type AgentGetVersionsResponse,
9
+ type AgentListVersionsResponse,
9
10
  type AgentCreateParams,
10
11
  type AgentRetrieveParams,
11
12
  type AgentUpdateParams,
12
13
  type AgentListParams,
13
14
  type AgentCreateVersionParams,
14
15
  type AgentDeleteVersionParams,
16
+ type AgentListVersionsParams,
15
17
  type AgentPublishParams,
16
18
  } from './agent';
19
+ export {
20
+ App,
21
+ type AppResponse,
22
+ type AppListResponse,
23
+ type AppListUsagesResponse,
24
+ type AppTestAuthResponse,
25
+ type AppCreateParams,
26
+ type AppUpdateParams,
27
+ type AppListParams,
28
+ type AppDeleteParams,
29
+ type AppListUsagesParams,
30
+ } from './app';
17
31
  export { BatchCall, type BatchCallResponse, type BatchCallCreateBatchCallParams } from './batch-call';
32
+ export {
33
+ CRM,
34
+ type CRMConfig,
35
+ type CRMGetSchemaResponse,
36
+ type CRMGetSyncJobStatusResponse,
37
+ type CRMRunSyncJobResponse,
38
+ type CRMGetSchemaParams,
39
+ type CRMUpdateConfigParams,
40
+ } from './crm';
18
41
  export {
19
42
  Call,
20
43
  type CallResponse,
@@ -55,6 +78,19 @@ export {
55
78
  type ChatAgentPublishParams,
56
79
  } from './chat-agent';
57
80
  export { Concurrency, type ConcurrencyRetrieveResponse } from './concurrency';
81
+ export {
82
+ Contact,
83
+ type ContactResponse,
84
+ type ContactListResponse,
85
+ type ContactBackfillAnalysisDataResponse,
86
+ type ContactGetBackfillJobStatusResponse,
87
+ type ContactListConversationsResponse,
88
+ type ContactCreateParams,
89
+ type ContactUpdateParams,
90
+ type ContactListParams,
91
+ type ContactBackfillAnalysisDataParams,
92
+ type ContactListConversationsParams,
93
+ } from './contact';
58
94
  export {
59
95
  ConversationFlow,
60
96
  type ConversationFlowResponse,
@@ -63,6 +99,7 @@ export {
63
99
  type ConversationFlowRetrieveParams,
64
100
  type ConversationFlowUpdateParams,
65
101
  type ConversationFlowListParams,
102
+ type ConversationFlowDeleteParams,
66
103
  } from './conversation-flow';
67
104
  export {
68
105
  ConversationFlowComponent,
@@ -94,6 +131,7 @@ export {
94
131
  type LlmRetrieveParams,
95
132
  type LlmUpdateParams,
96
133
  type LlmListParams,
134
+ type LlmDeleteParams,
97
135
  } from './llm';
98
136
  export {
99
137
  McpTool,
@@ -125,10 +125,18 @@ 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, and pages from auto-crawling paths.
138
+ * Previously indexed sources remain available during the update, and the source
139
+ * list may change when it finishes.
132
140
  */
133
141
  status: 'in_progress' | 'complete' | 'error' | 'refreshing_in_progress';
134
142