@gtmi/ramp-dialog-client 0.0.1 → 0.0.2
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.
- package/dist/es/index.d.mts +851 -50
- package/dist/es/index.mjs +242 -2
- package/package.json +1 -1
- package/src/generated/index.ts +88 -0
- package/src/generated/sdk.gen.ts +230 -0
- package/src/generated/types.gen.ts +668 -48
- package/src/generated/zod.gen.ts +168 -0
|
@@ -4,6 +4,11 @@ export type ClientOptions = {
|
|
|
4
4
|
baseUrl: `${string}://${string}` | (string & {});
|
|
5
5
|
};
|
|
6
6
|
|
|
7
|
+
export type ErrorResponse = {
|
|
8
|
+
error?: string;
|
|
9
|
+
details?: string;
|
|
10
|
+
};
|
|
11
|
+
|
|
7
12
|
export type GetApiActiveConversationsByCustomerNumberData = {
|
|
8
13
|
body?: never;
|
|
9
14
|
path: {
|
|
@@ -15,18 +20,34 @@ export type GetApiActiveConversationsByCustomerNumberData = {
|
|
|
15
20
|
|
|
16
21
|
export type GetApiActiveConversationsByCustomerNumberErrors = {
|
|
17
22
|
/**
|
|
18
|
-
*
|
|
23
|
+
* "missing_customerNumber" when the path param is absent
|
|
19
24
|
*/
|
|
20
|
-
|
|
25
|
+
400: ErrorResponse;
|
|
26
|
+
/**
|
|
27
|
+
* Unauthorized — requires an authenticated session
|
|
28
|
+
*/
|
|
29
|
+
401: unknown;
|
|
30
|
+
/**
|
|
31
|
+
* "upstream_error" (status mirrors the upstream response) or "proxy_error" on unexpected failure
|
|
32
|
+
*/
|
|
33
|
+
500: ErrorResponse;
|
|
21
34
|
};
|
|
22
35
|
|
|
36
|
+
export type GetApiActiveConversationsByCustomerNumberError =
|
|
37
|
+
GetApiActiveConversationsByCustomerNumberErrors[keyof GetApiActiveConversationsByCustomerNumberErrors];
|
|
38
|
+
|
|
23
39
|
export type GetApiActiveConversationsByCustomerNumberResponses = {
|
|
24
40
|
/**
|
|
25
|
-
*
|
|
41
|
+
* Proxied active-conversations payload from the agent server
|
|
26
42
|
*/
|
|
27
|
-
200:
|
|
43
|
+
200: {
|
|
44
|
+
[key: string]: unknown;
|
|
45
|
+
};
|
|
28
46
|
};
|
|
29
47
|
|
|
48
|
+
export type GetApiActiveConversationsByCustomerNumberResponse =
|
|
49
|
+
GetApiActiveConversationsByCustomerNumberResponses[keyof GetApiActiveConversationsByCustomerNumberResponses];
|
|
50
|
+
|
|
30
51
|
export type GetApiActiveConversationsAgentByAgentNumberData = {
|
|
31
52
|
body?: never;
|
|
32
53
|
path: {
|
|
@@ -38,18 +59,34 @@ export type GetApiActiveConversationsAgentByAgentNumberData = {
|
|
|
38
59
|
|
|
39
60
|
export type GetApiActiveConversationsAgentByAgentNumberErrors = {
|
|
40
61
|
/**
|
|
41
|
-
*
|
|
62
|
+
* "missing_agentNumber" when the path param is absent
|
|
42
63
|
*/
|
|
43
|
-
|
|
64
|
+
400: ErrorResponse;
|
|
65
|
+
/**
|
|
66
|
+
* Unauthorized — requires an authenticated session
|
|
67
|
+
*/
|
|
68
|
+
401: unknown;
|
|
69
|
+
/**
|
|
70
|
+
* "upstream_error" (status mirrors the upstream response) or "proxy_error" on unexpected failure
|
|
71
|
+
*/
|
|
72
|
+
500: ErrorResponse;
|
|
44
73
|
};
|
|
45
74
|
|
|
75
|
+
export type GetApiActiveConversationsAgentByAgentNumberError =
|
|
76
|
+
GetApiActiveConversationsAgentByAgentNumberErrors[keyof GetApiActiveConversationsAgentByAgentNumberErrors];
|
|
77
|
+
|
|
46
78
|
export type GetApiActiveConversationsAgentByAgentNumberResponses = {
|
|
47
79
|
/**
|
|
48
|
-
*
|
|
80
|
+
* Proxied active-conversations-by-agent payload from the agent server
|
|
49
81
|
*/
|
|
50
|
-
200:
|
|
82
|
+
200: {
|
|
83
|
+
[key: string]: unknown;
|
|
84
|
+
};
|
|
51
85
|
};
|
|
52
86
|
|
|
87
|
+
export type GetApiActiveConversationsAgentByAgentNumberResponse =
|
|
88
|
+
GetApiActiveConversationsAgentByAgentNumberResponses[keyof GetApiActiveConversationsAgentByAgentNumberResponses];
|
|
89
|
+
|
|
53
90
|
export type PostApiActiveConversationsAgentClaimData = {
|
|
54
91
|
body: {
|
|
55
92
|
[key: string]: unknown;
|
|
@@ -61,18 +98,37 @@ export type PostApiActiveConversationsAgentClaimData = {
|
|
|
61
98
|
|
|
62
99
|
export type PostApiActiveConversationsAgentClaimErrors = {
|
|
63
100
|
/**
|
|
64
|
-
*
|
|
101
|
+
* "missing_conversationId" when the request body lacks a conversationId
|
|
65
102
|
*/
|
|
66
|
-
|
|
103
|
+
400: ErrorResponse;
|
|
104
|
+
/**
|
|
105
|
+
* Unauthorized — requires an authenticated session
|
|
106
|
+
*/
|
|
107
|
+
401: unknown;
|
|
108
|
+
/**
|
|
109
|
+
* "upstream_error" (status mirrors the upstream response) or "proxy_error" on unexpected failure
|
|
110
|
+
*/
|
|
111
|
+
500: ErrorResponse;
|
|
67
112
|
};
|
|
68
113
|
|
|
114
|
+
export type PostApiActiveConversationsAgentClaimError =
|
|
115
|
+
PostApiActiveConversationsAgentClaimErrors[keyof PostApiActiveConversationsAgentClaimErrors];
|
|
116
|
+
|
|
69
117
|
export type PostApiActiveConversationsAgentClaimResponses = {
|
|
70
118
|
/**
|
|
71
119
|
* Success
|
|
72
120
|
*/
|
|
73
|
-
200:
|
|
121
|
+
200: {
|
|
122
|
+
/**
|
|
123
|
+
* Always true; claim was forwarded to the agent server
|
|
124
|
+
*/
|
|
125
|
+
success: boolean;
|
|
126
|
+
};
|
|
74
127
|
};
|
|
75
128
|
|
|
129
|
+
export type PostApiActiveConversationsAgentClaimResponse =
|
|
130
|
+
PostApiActiveConversationsAgentClaimResponses[keyof PostApiActiveConversationsAgentClaimResponses];
|
|
131
|
+
|
|
76
132
|
export type PostApiClearData = {
|
|
77
133
|
body: {
|
|
78
134
|
[key: string]: unknown;
|
|
@@ -84,18 +140,28 @@ export type PostApiClearData = {
|
|
|
84
140
|
|
|
85
141
|
export type PostApiClearErrors = {
|
|
86
142
|
/**
|
|
87
|
-
*
|
|
143
|
+
* Unauthorized — requires an authenticated session
|
|
88
144
|
*/
|
|
89
|
-
|
|
145
|
+
401: unknown;
|
|
146
|
+
/**
|
|
147
|
+
* "missing_upstream" when DIALOG_BACKEND_BASE_URL is not configured, or "proxy_error" on unexpected failure
|
|
148
|
+
*/
|
|
149
|
+
500: ErrorResponse;
|
|
90
150
|
};
|
|
91
151
|
|
|
152
|
+
export type PostApiClearError = PostApiClearErrors[keyof PostApiClearErrors];
|
|
153
|
+
|
|
92
154
|
export type PostApiClearResponses = {
|
|
93
155
|
/**
|
|
94
|
-
*
|
|
156
|
+
* Proxied JSON body from the dialog backend's /api/clear (status code mirrors the upstream response)
|
|
95
157
|
*/
|
|
96
|
-
200:
|
|
158
|
+
200: {
|
|
159
|
+
[key: string]: unknown;
|
|
160
|
+
};
|
|
97
161
|
};
|
|
98
162
|
|
|
163
|
+
export type PostApiClearResponse = PostApiClearResponses[keyof PostApiClearResponses];
|
|
164
|
+
|
|
99
165
|
export type PostApiConversationMemoryProfilesLookupData = {
|
|
100
166
|
body: {
|
|
101
167
|
[key: string]: unknown;
|
|
@@ -107,18 +173,36 @@ export type PostApiConversationMemoryProfilesLookupData = {
|
|
|
107
173
|
|
|
108
174
|
export type PostApiConversationMemoryProfilesLookupErrors = {
|
|
109
175
|
/**
|
|
110
|
-
*
|
|
176
|
+
* "idType and value are required" when the request body is missing required fields
|
|
111
177
|
*/
|
|
112
|
-
|
|
178
|
+
400: ErrorResponse;
|
|
179
|
+
/**
|
|
180
|
+
* Unauthorized — requires an authenticated session
|
|
181
|
+
*/
|
|
182
|
+
401: unknown;
|
|
183
|
+
/**
|
|
184
|
+
* Either { error: string } when TWILIO_CONVERSATION_MEMORY_STORE_ID is not configured or on an unexpected "proxy_error", or { error: <upstream body> } when the upstream call fails (status mirrors the upstream response)
|
|
185
|
+
*/
|
|
186
|
+
500: {
|
|
187
|
+
[key: string]: unknown;
|
|
188
|
+
};
|
|
113
189
|
};
|
|
114
190
|
|
|
191
|
+
export type PostApiConversationMemoryProfilesLookupError =
|
|
192
|
+
PostApiConversationMemoryProfilesLookupErrors[keyof PostApiConversationMemoryProfilesLookupErrors];
|
|
193
|
+
|
|
115
194
|
export type PostApiConversationMemoryProfilesLookupResponses = {
|
|
116
195
|
/**
|
|
117
|
-
*
|
|
196
|
+
* Proxied profiles-lookup payload from the api server
|
|
118
197
|
*/
|
|
119
|
-
200:
|
|
198
|
+
200: {
|
|
199
|
+
[key: string]: unknown;
|
|
200
|
+
};
|
|
120
201
|
};
|
|
121
202
|
|
|
203
|
+
export type PostApiConversationMemoryProfilesLookupResponse =
|
|
204
|
+
PostApiConversationMemoryProfilesLookupResponses[keyof PostApiConversationMemoryProfilesLookupResponses];
|
|
205
|
+
|
|
122
206
|
export type PostApiConversationMemoryRecallData = {
|
|
123
207
|
body: {
|
|
124
208
|
[key: string]: unknown;
|
|
@@ -130,18 +214,36 @@ export type PostApiConversationMemoryRecallData = {
|
|
|
130
214
|
|
|
131
215
|
export type PostApiConversationMemoryRecallErrors = {
|
|
132
216
|
/**
|
|
133
|
-
*
|
|
217
|
+
* "profileId is required" when the request body is missing required fields
|
|
134
218
|
*/
|
|
135
|
-
|
|
219
|
+
400: ErrorResponse;
|
|
220
|
+
/**
|
|
221
|
+
* Unauthorized — requires an authenticated session
|
|
222
|
+
*/
|
|
223
|
+
401: unknown;
|
|
224
|
+
/**
|
|
225
|
+
* Either { error: string } when TWILIO_CONVERSATION_MEMORY_STORE_ID is not configured or on an unexpected "proxy_error", or { error: <upstream body> } when the upstream call fails (status mirrors the upstream response)
|
|
226
|
+
*/
|
|
227
|
+
500: {
|
|
228
|
+
[key: string]: unknown;
|
|
229
|
+
};
|
|
136
230
|
};
|
|
137
231
|
|
|
232
|
+
export type PostApiConversationMemoryRecallError =
|
|
233
|
+
PostApiConversationMemoryRecallErrors[keyof PostApiConversationMemoryRecallErrors];
|
|
234
|
+
|
|
138
235
|
export type PostApiConversationMemoryRecallResponses = {
|
|
139
236
|
/**
|
|
140
|
-
*
|
|
237
|
+
* Proxied conversation-memory recall payload from the api server
|
|
141
238
|
*/
|
|
142
|
-
200:
|
|
239
|
+
200: {
|
|
240
|
+
[key: string]: unknown;
|
|
241
|
+
};
|
|
143
242
|
};
|
|
144
243
|
|
|
244
|
+
export type PostApiConversationMemoryRecallResponse =
|
|
245
|
+
PostApiConversationMemoryRecallResponses[keyof PostApiConversationMemoryRecallResponses];
|
|
246
|
+
|
|
145
247
|
export type DeleteApiConversationMemoryResetData = {
|
|
146
248
|
body?: never;
|
|
147
249
|
path?: never;
|
|
@@ -153,18 +255,36 @@ export type DeleteApiConversationMemoryResetData = {
|
|
|
153
255
|
|
|
154
256
|
export type DeleteApiConversationMemoryResetErrors = {
|
|
155
257
|
/**
|
|
156
|
-
*
|
|
258
|
+
* "profileId is required" when the query param is missing
|
|
157
259
|
*/
|
|
158
|
-
|
|
260
|
+
400: ErrorResponse;
|
|
261
|
+
/**
|
|
262
|
+
* Unauthorized — requires an authenticated session
|
|
263
|
+
*/
|
|
264
|
+
401: unknown;
|
|
265
|
+
/**
|
|
266
|
+
* Either { error: string } when TWILIO_CONVERSATION_MEMORY_STORE_ID is not configured or on an unexpected "proxy_error", or { error: <upstream body> } when the upstream call fails (status mirrors the upstream response)
|
|
267
|
+
*/
|
|
268
|
+
500: {
|
|
269
|
+
[key: string]: unknown;
|
|
270
|
+
};
|
|
159
271
|
};
|
|
160
272
|
|
|
273
|
+
export type DeleteApiConversationMemoryResetError =
|
|
274
|
+
DeleteApiConversationMemoryResetErrors[keyof DeleteApiConversationMemoryResetErrors];
|
|
275
|
+
|
|
161
276
|
export type DeleteApiConversationMemoryResetResponses = {
|
|
162
277
|
/**
|
|
163
|
-
*
|
|
278
|
+
* Proxied conversation-memory reset payload from the api server
|
|
164
279
|
*/
|
|
165
|
-
200:
|
|
280
|
+
200: {
|
|
281
|
+
[key: string]: unknown;
|
|
282
|
+
};
|
|
166
283
|
};
|
|
167
284
|
|
|
285
|
+
export type DeleteApiConversationMemoryResetResponse =
|
|
286
|
+
DeleteApiConversationMemoryResetResponses[keyof DeleteApiConversationMemoryResetResponses];
|
|
287
|
+
|
|
168
288
|
export type GetApiCountryConfigsData = {
|
|
169
289
|
body?: never;
|
|
170
290
|
path?: never;
|
|
@@ -174,18 +294,30 @@ export type GetApiCountryConfigsData = {
|
|
|
174
294
|
|
|
175
295
|
export type GetApiCountryConfigsErrors = {
|
|
176
296
|
/**
|
|
177
|
-
*
|
|
297
|
+
* Unauthorized — requires an authenticated session
|
|
178
298
|
*/
|
|
179
|
-
|
|
299
|
+
401: unknown;
|
|
300
|
+
/**
|
|
301
|
+
* "upstream_error" (status mirrors the upstream response) or "proxy_error" on unexpected failure
|
|
302
|
+
*/
|
|
303
|
+
500: ErrorResponse;
|
|
180
304
|
};
|
|
181
305
|
|
|
306
|
+
export type GetApiCountryConfigsError =
|
|
307
|
+
GetApiCountryConfigsErrors[keyof GetApiCountryConfigsErrors];
|
|
308
|
+
|
|
182
309
|
export type GetApiCountryConfigsResponses = {
|
|
183
310
|
/**
|
|
184
|
-
*
|
|
311
|
+
* Proxied country-configs payload from the agent server
|
|
185
312
|
*/
|
|
186
|
-
200:
|
|
313
|
+
200: {
|
|
314
|
+
[key: string]: unknown;
|
|
315
|
+
};
|
|
187
316
|
};
|
|
188
317
|
|
|
318
|
+
export type GetApiCountryConfigsResponse =
|
|
319
|
+
GetApiCountryConfigsResponses[keyof GetApiCountryConfigsResponses];
|
|
320
|
+
|
|
189
321
|
export type DeleteApiKillConversationByPhoneData = {
|
|
190
322
|
body?: never;
|
|
191
323
|
path: {
|
|
@@ -197,18 +329,34 @@ export type DeleteApiKillConversationByPhoneData = {
|
|
|
197
329
|
|
|
198
330
|
export type DeleteApiKillConversationByPhoneErrors = {
|
|
199
331
|
/**
|
|
200
|
-
*
|
|
332
|
+
* "missing_phone" when the path param is absent
|
|
201
333
|
*/
|
|
202
|
-
|
|
334
|
+
400: ErrorResponse;
|
|
335
|
+
/**
|
|
336
|
+
* Unauthorized — requires an authenticated session
|
|
337
|
+
*/
|
|
338
|
+
401: unknown;
|
|
339
|
+
/**
|
|
340
|
+
* "proxy_error" on unexpected failure
|
|
341
|
+
*/
|
|
342
|
+
500: ErrorResponse;
|
|
203
343
|
};
|
|
204
344
|
|
|
345
|
+
export type DeleteApiKillConversationByPhoneError =
|
|
346
|
+
DeleteApiKillConversationByPhoneErrors[keyof DeleteApiKillConversationByPhoneErrors];
|
|
347
|
+
|
|
205
348
|
export type DeleteApiKillConversationByPhoneResponses = {
|
|
206
349
|
/**
|
|
207
|
-
*
|
|
350
|
+
* Proxied kill-conversation payload from the agent server (status mirrors the upstream response)
|
|
208
351
|
*/
|
|
209
|
-
200:
|
|
352
|
+
200: {
|
|
353
|
+
[key: string]: unknown;
|
|
354
|
+
};
|
|
210
355
|
};
|
|
211
356
|
|
|
357
|
+
export type DeleteApiKillConversationByPhoneResponse =
|
|
358
|
+
DeleteApiKillConversationByPhoneResponses[keyof DeleteApiKillConversationByPhoneResponses];
|
|
359
|
+
|
|
212
360
|
export type DeleteApiLiveNumbersData = {
|
|
213
361
|
body?: never;
|
|
214
362
|
path?: never;
|
|
@@ -218,18 +366,34 @@ export type DeleteApiLiveNumbersData = {
|
|
|
218
366
|
|
|
219
367
|
export type DeleteApiLiveNumbersErrors = {
|
|
220
368
|
/**
|
|
221
|
-
*
|
|
369
|
+
* "Phone number is required" when the request body is missing phoneNumber
|
|
222
370
|
*/
|
|
223
|
-
|
|
371
|
+
400: ErrorResponse;
|
|
372
|
+
/**
|
|
373
|
+
* Unauthorized — requires an authenticated session
|
|
374
|
+
*/
|
|
375
|
+
401: unknown;
|
|
376
|
+
/**
|
|
377
|
+
* "upstream_error" (status mirrors the upstream response) or "proxy_error" on unexpected failure
|
|
378
|
+
*/
|
|
379
|
+
500: ErrorResponse;
|
|
224
380
|
};
|
|
225
381
|
|
|
382
|
+
export type DeleteApiLiveNumbersError =
|
|
383
|
+
DeleteApiLiveNumbersErrors[keyof DeleteApiLiveNumbersErrors];
|
|
384
|
+
|
|
226
385
|
export type DeleteApiLiveNumbersResponses = {
|
|
227
386
|
/**
|
|
228
|
-
*
|
|
387
|
+
* Proxied live-numbers deletion payload from the agent server
|
|
229
388
|
*/
|
|
230
|
-
200:
|
|
389
|
+
200: {
|
|
390
|
+
[key: string]: unknown;
|
|
391
|
+
};
|
|
231
392
|
};
|
|
232
393
|
|
|
394
|
+
export type DeleteApiLiveNumbersResponse =
|
|
395
|
+
DeleteApiLiveNumbersResponses[keyof DeleteApiLiveNumbersResponses];
|
|
396
|
+
|
|
233
397
|
export type GetApiMessagesData = {
|
|
234
398
|
body?: never;
|
|
235
399
|
path?: never;
|
|
@@ -241,6 +405,10 @@ export type GetApiMessagesData = {
|
|
|
241
405
|
};
|
|
242
406
|
|
|
243
407
|
export type GetApiMessagesErrors = {
|
|
408
|
+
/**
|
|
409
|
+
* Unauthorized — requires an authenticated session
|
|
410
|
+
*/
|
|
411
|
+
401: unknown;
|
|
244
412
|
/**
|
|
245
413
|
* Internal server error
|
|
246
414
|
*/
|
|
@@ -251,9 +419,34 @@ export type GetApiMessagesResponses = {
|
|
|
251
419
|
/**
|
|
252
420
|
* Success
|
|
253
421
|
*/
|
|
254
|
-
200:
|
|
422
|
+
200: {
|
|
423
|
+
/**
|
|
424
|
+
* True if the upstream logging backend was reachable and returned ok; false on upstream failure, fetch error, or when no backend is configured
|
|
425
|
+
*/
|
|
426
|
+
success: boolean;
|
|
427
|
+
/**
|
|
428
|
+
* Array of DialogMessage records (empty when no backend is configured or on failure)
|
|
429
|
+
*/
|
|
430
|
+
messages: Array<{
|
|
431
|
+
[key: string]: unknown;
|
|
432
|
+
}>;
|
|
433
|
+
/**
|
|
434
|
+
* DialogCustomerProfile object, or null when no backend is configured or on failure
|
|
435
|
+
*/
|
|
436
|
+
customerProfile: {
|
|
437
|
+
[key: string]: unknown;
|
|
438
|
+
};
|
|
439
|
+
/**
|
|
440
|
+
* Passthrough field from the upstream response; undefined when no backend is configured or on failure
|
|
441
|
+
*/
|
|
442
|
+
realtimeCintel: {
|
|
443
|
+
[key: string]: unknown;
|
|
444
|
+
};
|
|
445
|
+
};
|
|
255
446
|
};
|
|
256
447
|
|
|
448
|
+
export type GetApiMessagesResponse = GetApiMessagesResponses[keyof GetApiMessagesResponses];
|
|
449
|
+
|
|
257
450
|
export type PostApiRealTimeCintelUiData = {
|
|
258
451
|
body: {
|
|
259
452
|
[key: string]: unknown;
|
|
@@ -265,18 +458,30 @@ export type PostApiRealTimeCintelUiData = {
|
|
|
265
458
|
|
|
266
459
|
export type PostApiRealTimeCintelUiErrors = {
|
|
267
460
|
/**
|
|
268
|
-
*
|
|
461
|
+
* Unauthorized — requires an authenticated session
|
|
269
462
|
*/
|
|
270
|
-
|
|
463
|
+
401: unknown;
|
|
464
|
+
/**
|
|
465
|
+
* "proxy_error" on unexpected failure
|
|
466
|
+
*/
|
|
467
|
+
500: ErrorResponse;
|
|
271
468
|
};
|
|
272
469
|
|
|
470
|
+
export type PostApiRealTimeCintelUiError =
|
|
471
|
+
PostApiRealTimeCintelUiErrors[keyof PostApiRealTimeCintelUiErrors];
|
|
472
|
+
|
|
273
473
|
export type PostApiRealTimeCintelUiResponses = {
|
|
274
474
|
/**
|
|
275
|
-
*
|
|
475
|
+
* Map of intelligenceOperatorId to the operator's parsed uiType; operators whose fetch failed or had no uiType are silently omitted
|
|
276
476
|
*/
|
|
277
|
-
200:
|
|
477
|
+
200: {
|
|
478
|
+
[key: string]: unknown;
|
|
479
|
+
};
|
|
278
480
|
};
|
|
279
481
|
|
|
482
|
+
export type PostApiRealTimeCintelUiResponse =
|
|
483
|
+
PostApiRealTimeCintelUiResponses[keyof PostApiRealTimeCintelUiResponses];
|
|
484
|
+
|
|
280
485
|
export type GetApiSyncTokenData = {
|
|
281
486
|
body?: never;
|
|
282
487
|
path?: never;
|
|
@@ -286,18 +491,28 @@ export type GetApiSyncTokenData = {
|
|
|
286
491
|
|
|
287
492
|
export type GetApiSyncTokenErrors = {
|
|
288
493
|
/**
|
|
289
|
-
*
|
|
494
|
+
* Unauthorized — requires an authenticated session
|
|
290
495
|
*/
|
|
291
|
-
|
|
496
|
+
401: unknown;
|
|
497
|
+
/**
|
|
498
|
+
* "upstream_error" (status mirrors the upstream response) or "proxy_error" on unexpected failure
|
|
499
|
+
*/
|
|
500
|
+
500: ErrorResponse;
|
|
292
501
|
};
|
|
293
502
|
|
|
503
|
+
export type GetApiSyncTokenError = GetApiSyncTokenErrors[keyof GetApiSyncTokenErrors];
|
|
504
|
+
|
|
294
505
|
export type GetApiSyncTokenResponses = {
|
|
295
506
|
/**
|
|
296
|
-
*
|
|
507
|
+
* Proxied sync token payload from the api server
|
|
297
508
|
*/
|
|
298
|
-
200:
|
|
509
|
+
200: {
|
|
510
|
+
[key: string]: unknown;
|
|
511
|
+
};
|
|
299
512
|
};
|
|
300
513
|
|
|
514
|
+
export type GetApiSyncTokenResponse = GetApiSyncTokenResponses[keyof GetApiSyncTokenResponses];
|
|
515
|
+
|
|
301
516
|
export type PostApiTelemetryData = {
|
|
302
517
|
body?: never;
|
|
303
518
|
path?: never;
|
|
@@ -308,15 +523,420 @@ export type PostApiTelemetryData = {
|
|
|
308
523
|
};
|
|
309
524
|
|
|
310
525
|
export type PostApiTelemetryErrors = {
|
|
526
|
+
/**
|
|
527
|
+
* "Invalid ddforward parameter." when the ddforward query param is missing or doesn't start with "/api/"
|
|
528
|
+
*/
|
|
529
|
+
400: ErrorResponse;
|
|
530
|
+
/**
|
|
531
|
+
* Unauthorized — requires an authenticated session
|
|
532
|
+
*/
|
|
533
|
+
401: unknown;
|
|
311
534
|
/**
|
|
312
535
|
* Internal server error
|
|
313
536
|
*/
|
|
314
537
|
500: unknown;
|
|
315
538
|
};
|
|
316
539
|
|
|
540
|
+
export type PostApiTelemetryError = PostApiTelemetryErrors[keyof PostApiTelemetryErrors];
|
|
541
|
+
|
|
317
542
|
export type PostApiTelemetryResponses = {
|
|
318
543
|
/**
|
|
319
544
|
* Success
|
|
320
545
|
*/
|
|
321
546
|
200: unknown;
|
|
547
|
+
/**
|
|
548
|
+
* Empty body; status code is passed through from the Datadog intake response (202 on success, or the catch handler's hardcoded 202 if the forward fetch itself throws)
|
|
549
|
+
*/
|
|
550
|
+
202: {
|
|
551
|
+
[key: string]: unknown;
|
|
552
|
+
};
|
|
553
|
+
};
|
|
554
|
+
|
|
555
|
+
export type PostApiTelemetryResponse = PostApiTelemetryResponses[keyof PostApiTelemetryResponses];
|
|
556
|
+
|
|
557
|
+
export type PostApiWebchatChatData = {
|
|
558
|
+
body: {
|
|
559
|
+
[key: string]: unknown;
|
|
560
|
+
};
|
|
561
|
+
path?: never;
|
|
562
|
+
query?: never;
|
|
563
|
+
url: '/api/webchat/chat';
|
|
564
|
+
};
|
|
565
|
+
|
|
566
|
+
export type PostApiWebchatChatErrors = {
|
|
567
|
+
/**
|
|
568
|
+
* "proxy_error" if the upstream call fails
|
|
569
|
+
*/
|
|
570
|
+
500: ErrorResponse;
|
|
571
|
+
};
|
|
572
|
+
|
|
573
|
+
export type PostApiWebchatChatError = PostApiWebchatChatErrors[keyof PostApiWebchatChatErrors];
|
|
574
|
+
|
|
575
|
+
export type PostApiWebchatChatResponses = {
|
|
576
|
+
/**
|
|
577
|
+
* Proxied response from the agent chat service
|
|
578
|
+
*/
|
|
579
|
+
200: {
|
|
580
|
+
[key: string]: unknown;
|
|
581
|
+
};
|
|
582
|
+
};
|
|
583
|
+
|
|
584
|
+
export type PostApiWebchatChatResponse =
|
|
585
|
+
PostApiWebchatChatResponses[keyof PostApiWebchatChatResponses];
|
|
586
|
+
|
|
587
|
+
export type GetApiWebchatConversationsTokenData = {
|
|
588
|
+
body?: never;
|
|
589
|
+
path?: never;
|
|
590
|
+
query?: {
|
|
591
|
+
/**
|
|
592
|
+
* Conversation participant identity (required)
|
|
593
|
+
*/
|
|
594
|
+
identity?: string;
|
|
595
|
+
};
|
|
596
|
+
url: '/api/webchat/conversations/token';
|
|
597
|
+
};
|
|
598
|
+
|
|
599
|
+
export type GetApiWebchatConversationsTokenErrors = {
|
|
600
|
+
/**
|
|
601
|
+
* Missing identity query param
|
|
602
|
+
*/
|
|
603
|
+
400: ErrorResponse;
|
|
604
|
+
/**
|
|
605
|
+
* "proxy_error" if the upstream call fails
|
|
606
|
+
*/
|
|
607
|
+
500: ErrorResponse;
|
|
608
|
+
};
|
|
609
|
+
|
|
610
|
+
export type GetApiWebchatConversationsTokenError =
|
|
611
|
+
GetApiWebchatConversationsTokenErrors[keyof GetApiWebchatConversationsTokenErrors];
|
|
612
|
+
|
|
613
|
+
export type GetApiWebchatConversationsTokenResponses = {
|
|
614
|
+
/**
|
|
615
|
+
* Proxied response from the API conversations-token service
|
|
616
|
+
*/
|
|
617
|
+
200: {
|
|
618
|
+
[key: string]: unknown;
|
|
619
|
+
};
|
|
620
|
+
};
|
|
621
|
+
|
|
622
|
+
export type GetApiWebchatConversationsTokenResponse =
|
|
623
|
+
GetApiWebchatConversationsTokenResponses[keyof GetApiWebchatConversationsTokenResponses];
|
|
624
|
+
|
|
625
|
+
export type PostApiWebchatConversationsTokenData = {
|
|
626
|
+
body: {
|
|
627
|
+
[key: string]: unknown;
|
|
628
|
+
};
|
|
629
|
+
path?: never;
|
|
630
|
+
query?: {
|
|
631
|
+
/**
|
|
632
|
+
* Conversation participant identity (required)
|
|
633
|
+
*/
|
|
634
|
+
identity?: string;
|
|
635
|
+
};
|
|
636
|
+
url: '/api/webchat/conversations/token';
|
|
637
|
+
};
|
|
638
|
+
|
|
639
|
+
export type PostApiWebchatConversationsTokenErrors = {
|
|
640
|
+
/**
|
|
641
|
+
* Missing identity in request body
|
|
642
|
+
*/
|
|
643
|
+
400: ErrorResponse;
|
|
644
|
+
/**
|
|
645
|
+
* "proxy_error" if the upstream call fails
|
|
646
|
+
*/
|
|
647
|
+
500: ErrorResponse;
|
|
648
|
+
};
|
|
649
|
+
|
|
650
|
+
export type PostApiWebchatConversationsTokenError =
|
|
651
|
+
PostApiWebchatConversationsTokenErrors[keyof PostApiWebchatConversationsTokenErrors];
|
|
652
|
+
|
|
653
|
+
export type PostApiWebchatConversationsTokenResponses = {
|
|
654
|
+
/**
|
|
655
|
+
* Proxied response from the API conversations-token service
|
|
656
|
+
*/
|
|
657
|
+
200: {
|
|
658
|
+
[key: string]: unknown;
|
|
659
|
+
};
|
|
660
|
+
};
|
|
661
|
+
|
|
662
|
+
export type PostApiWebchatConversationsTokenResponse =
|
|
663
|
+
PostApiWebchatConversationsTokenResponses[keyof PostApiWebchatConversationsTokenResponses];
|
|
664
|
+
|
|
665
|
+
export type PostApiWebchatEndChatData = {
|
|
666
|
+
body: {
|
|
667
|
+
[key: string]: unknown;
|
|
668
|
+
};
|
|
669
|
+
path?: never;
|
|
670
|
+
query?: never;
|
|
671
|
+
url: '/api/webchat/end-chat';
|
|
672
|
+
};
|
|
673
|
+
|
|
674
|
+
export type PostApiWebchatEndChatErrors = {
|
|
675
|
+
/**
|
|
676
|
+
* Missing customerNumber in request body
|
|
677
|
+
*/
|
|
678
|
+
400: ErrorResponse;
|
|
679
|
+
/**
|
|
680
|
+
* "proxy_error" if the upstream call fails
|
|
681
|
+
*/
|
|
682
|
+
500: ErrorResponse;
|
|
683
|
+
};
|
|
684
|
+
|
|
685
|
+
export type PostApiWebchatEndChatError =
|
|
686
|
+
PostApiWebchatEndChatErrors[keyof PostApiWebchatEndChatErrors];
|
|
687
|
+
|
|
688
|
+
export type PostApiWebchatEndChatResponses = {
|
|
689
|
+
/**
|
|
690
|
+
* Proxied response from the agent live-numbers delete service
|
|
691
|
+
*/
|
|
692
|
+
200: {
|
|
693
|
+
[key: string]: unknown;
|
|
694
|
+
};
|
|
695
|
+
};
|
|
696
|
+
|
|
697
|
+
export type PostApiWebchatEndChatResponse =
|
|
698
|
+
PostApiWebchatEndChatResponses[keyof PostApiWebchatEndChatResponses];
|
|
699
|
+
|
|
700
|
+
export type PostApiWebchatLiveAgentChatData = {
|
|
701
|
+
body: {
|
|
702
|
+
[key: string]: unknown;
|
|
703
|
+
};
|
|
704
|
+
path?: never;
|
|
705
|
+
query?: never;
|
|
706
|
+
url: '/api/webchat/live-agent-chat';
|
|
707
|
+
};
|
|
708
|
+
|
|
709
|
+
export type PostApiWebchatLiveAgentChatErrors = {
|
|
710
|
+
/**
|
|
711
|
+
* "proxy_error" if the upstream call fails
|
|
712
|
+
*/
|
|
713
|
+
500: ErrorResponse;
|
|
714
|
+
};
|
|
715
|
+
|
|
716
|
+
export type PostApiWebchatLiveAgentChatError =
|
|
717
|
+
PostApiWebchatLiveAgentChatErrors[keyof PostApiWebchatLiveAgentChatErrors];
|
|
718
|
+
|
|
719
|
+
export type PostApiWebchatLiveAgentChatResponses = {
|
|
720
|
+
/**
|
|
721
|
+
* Proxied response from the API live-agent-webchat-connect service
|
|
722
|
+
*/
|
|
723
|
+
200: {
|
|
724
|
+
[key: string]: unknown;
|
|
725
|
+
};
|
|
726
|
+
};
|
|
727
|
+
|
|
728
|
+
export type PostApiWebchatLiveAgentChatResponse =
|
|
729
|
+
PostApiWebchatLiveAgentChatResponses[keyof PostApiWebchatLiveAgentChatResponses];
|
|
730
|
+
|
|
731
|
+
export type PostApiWebchatLiveAgentWebchatConnectData = {
|
|
732
|
+
body: {
|
|
733
|
+
[key: string]: unknown;
|
|
734
|
+
};
|
|
735
|
+
path?: never;
|
|
736
|
+
query?: never;
|
|
737
|
+
url: '/api/webchat/live-agent-webchat-connect';
|
|
738
|
+
};
|
|
739
|
+
|
|
740
|
+
export type PostApiWebchatLiveAgentWebchatConnectErrors = {
|
|
741
|
+
/**
|
|
742
|
+
* "proxy_error" if the upstream call fails
|
|
743
|
+
*/
|
|
744
|
+
500: ErrorResponse;
|
|
745
|
+
};
|
|
746
|
+
|
|
747
|
+
export type PostApiWebchatLiveAgentWebchatConnectError =
|
|
748
|
+
PostApiWebchatLiveAgentWebchatConnectErrors[keyof PostApiWebchatLiveAgentWebchatConnectErrors];
|
|
749
|
+
|
|
750
|
+
export type PostApiWebchatLiveAgentWebchatConnectResponses = {
|
|
751
|
+
/**
|
|
752
|
+
* Proxied response from the API live-agent-webchat-connect service
|
|
753
|
+
*/
|
|
754
|
+
200: {
|
|
755
|
+
[key: string]: unknown;
|
|
756
|
+
};
|
|
322
757
|
};
|
|
758
|
+
|
|
759
|
+
export type PostApiWebchatLiveAgentWebchatConnectResponse =
|
|
760
|
+
PostApiWebchatLiveAgentWebchatConnectResponses[keyof PostApiWebchatLiveAgentWebchatConnectResponses];
|
|
761
|
+
|
|
762
|
+
export type PostApiWebchatLiveAgentWebchatEndData = {
|
|
763
|
+
body: {
|
|
764
|
+
[key: string]: unknown;
|
|
765
|
+
};
|
|
766
|
+
path?: never;
|
|
767
|
+
query?: never;
|
|
768
|
+
url: '/api/webchat/live-agent-webchat-end';
|
|
769
|
+
};
|
|
770
|
+
|
|
771
|
+
export type PostApiWebchatLiveAgentWebchatEndErrors = {
|
|
772
|
+
/**
|
|
773
|
+
* "proxy_error" if the upstream call fails
|
|
774
|
+
*/
|
|
775
|
+
500: ErrorResponse;
|
|
776
|
+
};
|
|
777
|
+
|
|
778
|
+
export type PostApiWebchatLiveAgentWebchatEndError =
|
|
779
|
+
PostApiWebchatLiveAgentWebchatEndErrors[keyof PostApiWebchatLiveAgentWebchatEndErrors];
|
|
780
|
+
|
|
781
|
+
export type PostApiWebchatLiveAgentWebchatEndResponses = {
|
|
782
|
+
/**
|
|
783
|
+
* Proxied response from the API live-agent-webchat-end service
|
|
784
|
+
*/
|
|
785
|
+
200: {
|
|
786
|
+
[key: string]: unknown;
|
|
787
|
+
};
|
|
788
|
+
};
|
|
789
|
+
|
|
790
|
+
export type PostApiWebchatLiveAgentWebchatEndResponse =
|
|
791
|
+
PostApiWebchatLiveAgentWebchatEndResponses[keyof PostApiWebchatLiveAgentWebchatEndResponses];
|
|
792
|
+
|
|
793
|
+
export type PostApiWebchatUiConfigData = {
|
|
794
|
+
body: {
|
|
795
|
+
[key: string]: unknown;
|
|
796
|
+
};
|
|
797
|
+
path?: never;
|
|
798
|
+
query?: never;
|
|
799
|
+
url: '/api/webchat/ui-config';
|
|
800
|
+
};
|
|
801
|
+
|
|
802
|
+
export type PostApiWebchatUiConfigErrors = {
|
|
803
|
+
/**
|
|
804
|
+
* Both or neither of customerNumber/objectID were provided
|
|
805
|
+
*/
|
|
806
|
+
400: ErrorResponse;
|
|
807
|
+
/**
|
|
808
|
+
* "ui_config_error" if template lookup fails
|
|
809
|
+
*/
|
|
810
|
+
500: ErrorResponse;
|
|
811
|
+
};
|
|
812
|
+
|
|
813
|
+
export type PostApiWebchatUiConfigError =
|
|
814
|
+
PostApiWebchatUiConfigErrors[keyof PostApiWebchatUiConfigErrors];
|
|
815
|
+
|
|
816
|
+
export type PostApiWebchatUiConfigResponses = {
|
|
817
|
+
/**
|
|
818
|
+
* Success
|
|
819
|
+
*/
|
|
820
|
+
200: {
|
|
821
|
+
/**
|
|
822
|
+
* Dialog UI customization config from the template (or null)
|
|
823
|
+
*/
|
|
824
|
+
ui: {
|
|
825
|
+
[key: string]: unknown;
|
|
826
|
+
};
|
|
827
|
+
/**
|
|
828
|
+
* Dialog link map from the template (or null)
|
|
829
|
+
*/
|
|
830
|
+
linkMap: {
|
|
831
|
+
[key: string]: unknown;
|
|
832
|
+
};
|
|
833
|
+
/**
|
|
834
|
+
* Whether the chat link should be hidden (or null)
|
|
835
|
+
*/
|
|
836
|
+
hideChatLink: boolean;
|
|
837
|
+
/**
|
|
838
|
+
* Resolved Algolia objectID for the template (or null)
|
|
839
|
+
*/
|
|
840
|
+
templateObjectId: string;
|
|
841
|
+
/**
|
|
842
|
+
* Default language code for the template, e.g. 'es-ES' (or null)
|
|
843
|
+
*/
|
|
844
|
+
templateLanguage: string;
|
|
845
|
+
/**
|
|
846
|
+
* Representative customer number resolved from objectID lookups (or null)
|
|
847
|
+
*/
|
|
848
|
+
resolvedCustomerNumber: string;
|
|
849
|
+
/**
|
|
850
|
+
* Agent phone number resolved from objectID lookups (or null)
|
|
851
|
+
*/
|
|
852
|
+
resolvedAgentNumber: string;
|
|
853
|
+
/**
|
|
854
|
+
* Template title (or null)
|
|
855
|
+
*/
|
|
856
|
+
templateTitle: string;
|
|
857
|
+
/**
|
|
858
|
+
* Dialog UI customization config from the template (or null)
|
|
859
|
+
*/
|
|
860
|
+
dialogConfig: {
|
|
861
|
+
[key: string]: unknown;
|
|
862
|
+
};
|
|
863
|
+
/**
|
|
864
|
+
* Dialog runtime settings (trait mappings, feature flags) (or null)
|
|
865
|
+
*/
|
|
866
|
+
dialogSettings: {
|
|
867
|
+
[key: string]: unknown;
|
|
868
|
+
};
|
|
869
|
+
};
|
|
870
|
+
};
|
|
871
|
+
|
|
872
|
+
export type PostApiWebchatUiConfigResponse =
|
|
873
|
+
PostApiWebchatUiConfigResponses[keyof PostApiWebchatUiConfigResponses];
|
|
874
|
+
|
|
875
|
+
export type GetApiWebchatVoiceTokenData = {
|
|
876
|
+
body?: never;
|
|
877
|
+
path?: never;
|
|
878
|
+
query?: {
|
|
879
|
+
/**
|
|
880
|
+
* Voice grant identity (required)
|
|
881
|
+
*/
|
|
882
|
+
identity?: string;
|
|
883
|
+
};
|
|
884
|
+
url: '/api/webchat/voice-token';
|
|
885
|
+
};
|
|
886
|
+
|
|
887
|
+
export type GetApiWebchatVoiceTokenErrors = {
|
|
888
|
+
/**
|
|
889
|
+
* Missing identity query param
|
|
890
|
+
*/
|
|
891
|
+
400: ErrorResponse;
|
|
892
|
+
/**
|
|
893
|
+
* "proxy_error" if the upstream call fails
|
|
894
|
+
*/
|
|
895
|
+
500: ErrorResponse;
|
|
896
|
+
};
|
|
897
|
+
|
|
898
|
+
export type GetApiWebchatVoiceTokenError =
|
|
899
|
+
GetApiWebchatVoiceTokenErrors[keyof GetApiWebchatVoiceTokenErrors];
|
|
900
|
+
|
|
901
|
+
export type GetApiWebchatVoiceTokenResponses = {
|
|
902
|
+
/**
|
|
903
|
+
* Proxied response from the API voice-token service
|
|
904
|
+
*/
|
|
905
|
+
200: {
|
|
906
|
+
[key: string]: unknown;
|
|
907
|
+
};
|
|
908
|
+
};
|
|
909
|
+
|
|
910
|
+
export type GetApiWebchatVoiceTokenResponse =
|
|
911
|
+
GetApiWebchatVoiceTokenResponses[keyof GetApiWebchatVoiceTokenResponses];
|
|
912
|
+
|
|
913
|
+
export type PostApiWebchatWebchatSendData = {
|
|
914
|
+
body: {
|
|
915
|
+
[key: string]: unknown;
|
|
916
|
+
};
|
|
917
|
+
path?: never;
|
|
918
|
+
query?: never;
|
|
919
|
+
url: '/api/webchat/webchat-send';
|
|
920
|
+
};
|
|
921
|
+
|
|
922
|
+
export type PostApiWebchatWebchatSendErrors = {
|
|
923
|
+
/**
|
|
924
|
+
* "proxy_error" if the upstream call fails
|
|
925
|
+
*/
|
|
926
|
+
500: ErrorResponse;
|
|
927
|
+
};
|
|
928
|
+
|
|
929
|
+
export type PostApiWebchatWebchatSendError =
|
|
930
|
+
PostApiWebchatWebchatSendErrors[keyof PostApiWebchatWebchatSendErrors];
|
|
931
|
+
|
|
932
|
+
export type PostApiWebchatWebchatSendResponses = {
|
|
933
|
+
/**
|
|
934
|
+
* Proxied response from the agent chat service
|
|
935
|
+
*/
|
|
936
|
+
200: {
|
|
937
|
+
[key: string]: unknown;
|
|
938
|
+
};
|
|
939
|
+
};
|
|
940
|
+
|
|
941
|
+
export type PostApiWebchatWebchatSendResponse =
|
|
942
|
+
PostApiWebchatWebchatSendResponses[keyof PostApiWebchatWebchatSendResponses];
|