@gtmi/ramp-site-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.
@@ -4,6 +4,84 @@ 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
+
12
+ export type CalledByData = {
13
+ phoneNumber?: string;
14
+ timestamp?: number;
15
+ direction?: string;
16
+ objectId?: string;
17
+ };
18
+
19
+ export type Campaign = {
20
+ email?: string;
21
+ companyName?: string;
22
+ objectID?: string;
23
+ encryptedObjectId?: string;
24
+ agentNumber?: string;
25
+ tag?: string;
26
+ createdAt?: string;
27
+ numCalls?: string;
28
+ shortLink?: string;
29
+ };
30
+
31
+ export type ConversationMemoryRecallResponse = {
32
+ communications?: string;
33
+ observations?: string;
34
+ summaries?: string;
35
+ meta?: string;
36
+ queryTime?: string;
37
+ };
38
+
39
+ export type Operator = {
40
+ id?: string;
41
+ displayName?: string;
42
+ description?: string;
43
+ version?: string;
44
+ availability?: string;
45
+ author?: string;
46
+ prompt?: string;
47
+ outputFormat?: string;
48
+ outputSchema?: string;
49
+ trainingExamples?: string;
50
+ context?: string;
51
+ parameters?: string;
52
+ };
53
+
54
+ export type IntelligenceConfiguration = {
55
+ accountId?: string;
56
+ dateCreated?: string;
57
+ dateUpdated?: string;
58
+ description?: string;
59
+ displayName?: string;
60
+ id?: string;
61
+ rules?: string;
62
+ version?: string;
63
+ };
64
+
65
+ export type LockedTemplateData = {
66
+ agentNumber?: string;
67
+ countryCode?: string;
68
+ dateShared?: string;
69
+ dateExpires?: string;
70
+ objectID?: string;
71
+ templateName?: string;
72
+ userEmail?: string;
73
+ webrtcUrl?: string;
74
+ };
75
+
76
+ export type SupportedRegion = {
77
+ isoCountry?: string;
78
+ numberType?: string;
79
+ bundleSid?: string;
80
+ label?: string;
81
+ flag?: string;
82
+ capabilities?: string;
83
+ };
84
+
7
85
  export type PostApiAlgoliaSecuredKeyData = {
8
86
  body?: never;
9
87
  path?: never;
@@ -13,18 +91,41 @@ export type PostApiAlgoliaSecuredKeyData = {
13
91
 
14
92
  export type PostApiAlgoliaSecuredKeyErrors = {
15
93
  /**
16
- * Internal server error
94
+ * Not authenticated
17
95
  */
18
- 500: unknown;
96
+ 401: ErrorResponse;
97
+ /**
98
+ * Algolia configuration missing, or key generation failed
99
+ */
100
+ 500: ErrorResponse;
19
101
  };
20
102
 
103
+ export type PostApiAlgoliaSecuredKeyError =
104
+ PostApiAlgoliaSecuredKeyErrors[keyof PostApiAlgoliaSecuredKeyErrors];
105
+
21
106
  export type PostApiAlgoliaSecuredKeyResponses = {
22
107
  /**
23
108
  * Success
24
109
  */
25
- 200: unknown;
110
+ 200: {
111
+ /**
112
+ * Unix timestamp (ms) when the secured key expires
113
+ */
114
+ expiresAt: number;
115
+ /**
116
+ * Base64-encoded Algolia secured API key
117
+ */
118
+ securedKey: string;
119
+ /**
120
+ * Email of the authenticated user the key was scoped to
121
+ */
122
+ userEmail: string;
123
+ };
26
124
  };
27
125
 
126
+ export type PostApiAlgoliaSecuredKeyResponse =
127
+ PostApiAlgoliaSecuredKeyResponses[keyof PostApiAlgoliaSecuredKeyResponses];
128
+
28
129
  export type GetApiCampaignData = {
29
130
  body?: never;
30
131
  path?: never;
@@ -34,22 +135,39 @@ export type GetApiCampaignData = {
34
135
 
35
136
  export type GetApiCampaignErrors = {
36
137
  /**
37
- * Unauthorized
138
+ * Unauthorized — requires an authenticated session
38
139
  */
39
140
  401: unknown;
40
141
  /**
41
- * Internal server error
142
+ * Error fetching campaigns
42
143
  */
43
- 500: unknown;
144
+ 500: ErrorResponse;
44
145
  };
45
146
 
147
+ export type GetApiCampaignError = GetApiCampaignErrors[keyof GetApiCampaignErrors];
148
+
46
149
  export type GetApiCampaignResponses = {
47
150
  /**
48
151
  * Success
49
152
  */
50
- 200: unknown;
153
+ 200: {
154
+ /**
155
+ * Call history data, present when includeCalledBy is set
156
+ */
157
+ calledByData: Array<CalledByData>;
158
+ /**
159
+ * Matching campaign templates
160
+ */
161
+ campaigns: Array<Campaign>;
162
+ /**
163
+ * Total number of matching campaigns
164
+ */
165
+ total: number;
166
+ };
51
167
  };
52
168
 
169
+ export type GetApiCampaignResponse = GetApiCampaignResponses[keyof GetApiCampaignResponses];
170
+
53
171
  export type DeleteApiConversationMemoryConversationSummariesData = {
54
172
  body?: never;
55
173
  path?: never;
@@ -62,22 +180,40 @@ export type DeleteApiConversationMemoryConversationSummariesData = {
62
180
 
63
181
  export type DeleteApiConversationMemoryConversationSummariesErrors = {
64
182
  /**
65
- * Unauthorized
183
+ * Missing required profileId or summaryId
184
+ */
185
+ 400: ErrorResponse;
186
+ /**
187
+ * Unauthorized — requires an authenticated session
66
188
  */
67
189
  401: unknown;
68
190
  /**
69
- * Internal server error
191
+ * Conversation Memory store not configured, or internal server error
70
192
  */
71
- 500: unknown;
193
+ 500: ErrorResponse;
72
194
  };
73
195
 
196
+ export type DeleteApiConversationMemoryConversationSummariesError =
197
+ DeleteApiConversationMemoryConversationSummariesErrors[keyof DeleteApiConversationMemoryConversationSummariesErrors];
198
+
74
199
  export type DeleteApiConversationMemoryConversationSummariesResponses = {
75
200
  /**
76
- * Success
201
+ * Upstream summary data (single summary or paginated list) from the Conversation Memory API
77
202
  */
78
- 200: unknown;
203
+ 200: {
204
+ [key: string]: unknown;
205
+ };
206
+ /**
207
+ * Upstream confirmation payload from the Conversation Memory API
208
+ */
209
+ 202: {
210
+ [key: string]: unknown;
211
+ };
79
212
  };
80
213
 
214
+ export type DeleteApiConversationMemoryConversationSummariesResponse =
215
+ DeleteApiConversationMemoryConversationSummariesResponses[keyof DeleteApiConversationMemoryConversationSummariesResponses];
216
+
81
217
  export type GetApiConversationMemoryConversationSummariesData = {
82
218
  body?: never;
83
219
  path?: never;
@@ -92,22 +228,34 @@ export type GetApiConversationMemoryConversationSummariesData = {
92
228
 
93
229
  export type GetApiConversationMemoryConversationSummariesErrors = {
94
230
  /**
95
- * Unauthorized
231
+ * Missing required profileId
232
+ */
233
+ 400: ErrorResponse;
234
+ /**
235
+ * Unauthorized — requires an authenticated session
96
236
  */
97
237
  401: unknown;
98
238
  /**
99
- * Internal server error
239
+ * Conversation Memory store not configured, or internal server error
100
240
  */
101
- 500: unknown;
241
+ 500: ErrorResponse;
102
242
  };
103
243
 
244
+ export type GetApiConversationMemoryConversationSummariesError =
245
+ GetApiConversationMemoryConversationSummariesErrors[keyof GetApiConversationMemoryConversationSummariesErrors];
246
+
104
247
  export type GetApiConversationMemoryConversationSummariesResponses = {
105
248
  /**
106
- * Success
249
+ * Upstream summary data (single summary or paginated list) from the Conversation Memory API
107
250
  */
108
- 200: unknown;
251
+ 200: {
252
+ [key: string]: unknown;
253
+ };
109
254
  };
110
255
 
256
+ export type GetApiConversationMemoryConversationSummariesResponse =
257
+ GetApiConversationMemoryConversationSummariesResponses[keyof GetApiConversationMemoryConversationSummariesResponses];
258
+
111
259
  export type PatchApiConversationMemoryConversationSummariesData = {
112
260
  body: {
113
261
  [key: string]: unknown;
@@ -122,22 +270,40 @@ export type PatchApiConversationMemoryConversationSummariesData = {
122
270
 
123
271
  export type PatchApiConversationMemoryConversationSummariesErrors = {
124
272
  /**
125
- * Unauthorized
273
+ * Missing required profileId/summaryId, or no update fields provided
274
+ */
275
+ 400: ErrorResponse;
276
+ /**
277
+ * Unauthorized — requires an authenticated session
126
278
  */
127
279
  401: unknown;
128
280
  /**
129
- * Internal server error
281
+ * Conversation Memory store not configured, or internal server error
130
282
  */
131
- 500: unknown;
283
+ 500: ErrorResponse;
132
284
  };
133
285
 
286
+ export type PatchApiConversationMemoryConversationSummariesError =
287
+ PatchApiConversationMemoryConversationSummariesErrors[keyof PatchApiConversationMemoryConversationSummariesErrors];
288
+
134
289
  export type PatchApiConversationMemoryConversationSummariesResponses = {
135
290
  /**
136
- * Success
291
+ * Upstream summary data (single summary or paginated list) from the Conversation Memory API
137
292
  */
138
- 200: unknown;
293
+ 200: {
294
+ [key: string]: unknown;
295
+ };
296
+ /**
297
+ * Upstream confirmation payload from the Conversation Memory API
298
+ */
299
+ 202: {
300
+ [key: string]: unknown;
301
+ };
139
302
  };
140
303
 
304
+ export type PatchApiConversationMemoryConversationSummariesResponse =
305
+ PatchApiConversationMemoryConversationSummariesResponses[keyof PatchApiConversationMemoryConversationSummariesResponses];
306
+
141
307
  export type PostApiConversationMemoryConversationSummariesData = {
142
308
  body: {
143
309
  [key: string]: unknown;
@@ -149,22 +315,40 @@ export type PostApiConversationMemoryConversationSummariesData = {
149
315
 
150
316
  export type PostApiConversationMemoryConversationSummariesErrors = {
151
317
  /**
152
- * Unauthorized
318
+ * Missing required profileId or summaries
319
+ */
320
+ 400: ErrorResponse;
321
+ /**
322
+ * Unauthorized — requires an authenticated session
153
323
  */
154
324
  401: unknown;
155
325
  /**
156
- * Internal server error
326
+ * Conversation Memory store not configured, or internal server error
157
327
  */
158
- 500: unknown;
328
+ 500: ErrorResponse;
159
329
  };
160
330
 
331
+ export type PostApiConversationMemoryConversationSummariesError =
332
+ PostApiConversationMemoryConversationSummariesErrors[keyof PostApiConversationMemoryConversationSummariesErrors];
333
+
161
334
  export type PostApiConversationMemoryConversationSummariesResponses = {
162
335
  /**
163
- * Success
336
+ * Upstream summary data (single summary or paginated list) from the Conversation Memory API
164
337
  */
165
- 200: unknown;
338
+ 200: {
339
+ [key: string]: unknown;
340
+ };
341
+ /**
342
+ * Upstream confirmation payload from the Conversation Memory API
343
+ */
344
+ 202: {
345
+ [key: string]: unknown;
346
+ };
166
347
  };
167
348
 
349
+ export type PostApiConversationMemoryConversationSummariesResponse =
350
+ PostApiConversationMemoryConversationSummariesResponses[keyof PostApiConversationMemoryConversationSummariesResponses];
351
+
168
352
  export type DeleteApiConversationMemoryIdentifiersData = {
169
353
  body?: never;
170
354
  path?: never;
@@ -179,50 +363,80 @@ export type DeleteApiConversationMemoryIdentifiersData = {
179
363
 
180
364
  export type DeleteApiConversationMemoryIdentifiersErrors = {
181
365
  /**
182
- * Unauthorized
366
+ * Missing required profileId or idType
367
+ */
368
+ 400: ErrorResponse;
369
+ /**
370
+ * Unauthorized — requires an authenticated session
183
371
  */
184
372
  401: unknown;
185
373
  /**
186
- * Internal server error
374
+ * Conversation Memory store not configured, or internal server error
187
375
  */
188
- 500: unknown;
376
+ 500: ErrorResponse;
189
377
  };
190
378
 
379
+ export type DeleteApiConversationMemoryIdentifiersError =
380
+ DeleteApiConversationMemoryIdentifiersErrors[keyof DeleteApiConversationMemoryIdentifiersErrors];
381
+
191
382
  export type DeleteApiConversationMemoryIdentifiersResponses = {
192
383
  /**
193
- * Success
384
+ * Upstream identifier data (single value or list) from the Conversation Memory API
194
385
  */
195
- 200: unknown;
386
+ 200: {
387
+ [key: string]: unknown;
388
+ };
389
+ /**
390
+ * Upstream confirmation payload from the Conversation Memory API
391
+ */
392
+ 202: {
393
+ [key: string]: unknown;
394
+ };
196
395
  };
197
396
 
397
+ export type DeleteApiConversationMemoryIdentifiersResponse =
398
+ DeleteApiConversationMemoryIdentifiersResponses[keyof DeleteApiConversationMemoryIdentifiersResponses];
399
+
198
400
  export type GetApiConversationMemoryIdentifiersData = {
199
401
  body?: never;
200
402
  path?: never;
201
403
  query: {
202
404
  profileId: string;
203
- idType: string;
405
+ idType?: string;
204
406
  };
205
407
  url: '/api/conversation-memory/identifiers';
206
408
  };
207
409
 
208
410
  export type GetApiConversationMemoryIdentifiersErrors = {
209
411
  /**
210
- * Unauthorized
412
+ * Missing required profileId
413
+ */
414
+ 400: ErrorResponse;
415
+ /**
416
+ * Unauthorized — requires an authenticated session
211
417
  */
212
418
  401: unknown;
213
419
  /**
214
- * Internal server error
420
+ * Conversation Memory store not configured, or internal server error
215
421
  */
216
- 500: unknown;
422
+ 500: ErrorResponse;
217
423
  };
218
424
 
425
+ export type GetApiConversationMemoryIdentifiersError =
426
+ GetApiConversationMemoryIdentifiersErrors[keyof GetApiConversationMemoryIdentifiersErrors];
427
+
219
428
  export type GetApiConversationMemoryIdentifiersResponses = {
220
429
  /**
221
- * Success
430
+ * Upstream identifier data (single value or list) from the Conversation Memory API
222
431
  */
223
- 200: unknown;
432
+ 200: {
433
+ [key: string]: unknown;
434
+ };
224
435
  };
225
436
 
437
+ export type GetApiConversationMemoryIdentifiersResponse =
438
+ GetApiConversationMemoryIdentifiersResponses[keyof GetApiConversationMemoryIdentifiersResponses];
439
+
226
440
  export type PatchApiConversationMemoryIdentifiersData = {
227
441
  body: {
228
442
  [key: string]: unknown;
@@ -239,54 +453,85 @@ export type PatchApiConversationMemoryIdentifiersData = {
239
453
 
240
454
  export type PatchApiConversationMemoryIdentifiersErrors = {
241
455
  /**
242
- * Unauthorized
456
+ * Missing required profileId, idType, oldValue, or newValue
457
+ */
458
+ 400: ErrorResponse;
459
+ /**
460
+ * Unauthorized — requires an authenticated session
243
461
  */
244
462
  401: unknown;
245
463
  /**
246
- * Internal server error
464
+ * Conversation Memory store not configured, or internal server error
247
465
  */
248
- 500: unknown;
466
+ 500: ErrorResponse;
249
467
  };
250
468
 
469
+ export type PatchApiConversationMemoryIdentifiersError =
470
+ PatchApiConversationMemoryIdentifiersErrors[keyof PatchApiConversationMemoryIdentifiersErrors];
471
+
251
472
  export type PatchApiConversationMemoryIdentifiersResponses = {
252
473
  /**
253
- * Success
474
+ * Upstream identifier data (single value or list) from the Conversation Memory API
254
475
  */
255
- 200: unknown;
476
+ 200: {
477
+ [key: string]: unknown;
478
+ };
479
+ /**
480
+ * Upstream confirmation payload from the Conversation Memory API
481
+ */
482
+ 202: {
483
+ [key: string]: unknown;
484
+ };
256
485
  };
257
486
 
487
+ export type PatchApiConversationMemoryIdentifiersResponse =
488
+ PatchApiConversationMemoryIdentifiersResponses[keyof PatchApiConversationMemoryIdentifiersResponses];
489
+
258
490
  export type PostApiConversationMemoryIdentifiersData = {
259
491
  body: {
260
492
  [key: string]: unknown;
261
493
  };
262
494
  path?: never;
263
- query: {
264
- profileId: string;
265
- idType: string;
266
- removeAll?: string;
267
- value: string;
268
- };
495
+ query?: never;
269
496
  url: '/api/conversation-memory/identifiers';
270
497
  };
271
498
 
272
499
  export type PostApiConversationMemoryIdentifiersErrors = {
273
500
  /**
274
- * Unauthorized
501
+ * Missing required profileId, idType, or value
502
+ */
503
+ 400: ErrorResponse;
504
+ /**
505
+ * Unauthorized — requires an authenticated session
275
506
  */
276
507
  401: unknown;
277
508
  /**
278
- * Internal server error
509
+ * Conversation Memory store not configured, or internal server error
279
510
  */
280
- 500: unknown;
511
+ 500: ErrorResponse;
281
512
  };
282
513
 
514
+ export type PostApiConversationMemoryIdentifiersError =
515
+ PostApiConversationMemoryIdentifiersErrors[keyof PostApiConversationMemoryIdentifiersErrors];
516
+
283
517
  export type PostApiConversationMemoryIdentifiersResponses = {
284
518
  /**
285
- * Success
519
+ * Upstream identifier data (single value or list) from the Conversation Memory API
286
520
  */
287
- 200: unknown;
521
+ 200: {
522
+ [key: string]: unknown;
523
+ };
524
+ /**
525
+ * Upstream confirmation payload from the Conversation Memory API
526
+ */
527
+ 202: {
528
+ [key: string]: unknown;
529
+ };
288
530
  };
289
531
 
532
+ export type PostApiConversationMemoryIdentifiersResponse =
533
+ PostApiConversationMemoryIdentifiersResponses[keyof PostApiConversationMemoryIdentifiersResponses];
534
+
290
535
  export type DeleteApiConversationMemoryObservationsData = {
291
536
  body?: never;
292
537
  path?: never;
@@ -299,22 +544,40 @@ export type DeleteApiConversationMemoryObservationsData = {
299
544
 
300
545
  export type DeleteApiConversationMemoryObservationsErrors = {
301
546
  /**
302
- * Unauthorized
547
+ * Missing required profileId or observationId
548
+ */
549
+ 400: ErrorResponse;
550
+ /**
551
+ * Unauthorized — requires an authenticated session
303
552
  */
304
553
  401: unknown;
305
554
  /**
306
- * Internal server error
555
+ * Conversation Memory store not configured, or internal server error
307
556
  */
308
- 500: unknown;
557
+ 500: ErrorResponse;
309
558
  };
310
559
 
560
+ export type DeleteApiConversationMemoryObservationsError =
561
+ DeleteApiConversationMemoryObservationsErrors[keyof DeleteApiConversationMemoryObservationsErrors];
562
+
311
563
  export type DeleteApiConversationMemoryObservationsResponses = {
312
564
  /**
313
- * Success
565
+ * Upstream observation data (single observation or paginated list) from the Conversation Memory API
314
566
  */
315
- 200: unknown;
567
+ 200: {
568
+ [key: string]: unknown;
569
+ };
570
+ /**
571
+ * Upstream confirmation payload from the Conversation Memory API
572
+ */
573
+ 202: {
574
+ [key: string]: unknown;
575
+ };
316
576
  };
317
577
 
578
+ export type DeleteApiConversationMemoryObservationsResponse =
579
+ DeleteApiConversationMemoryObservationsResponses[keyof DeleteApiConversationMemoryObservationsResponses];
580
+
318
581
  export type GetApiConversationMemoryObservationsData = {
319
582
  body?: never;
320
583
  path?: never;
@@ -333,22 +596,34 @@ export type GetApiConversationMemoryObservationsData = {
333
596
 
334
597
  export type GetApiConversationMemoryObservationsErrors = {
335
598
  /**
336
- * Unauthorized
599
+ * Missing required profileId
600
+ */
601
+ 400: ErrorResponse;
602
+ /**
603
+ * Unauthorized — requires an authenticated session
337
604
  */
338
605
  401: unknown;
339
606
  /**
340
- * Internal server error
607
+ * Conversation Memory store not configured, or internal server error
341
608
  */
342
- 500: unknown;
609
+ 500: ErrorResponse;
343
610
  };
344
611
 
612
+ export type GetApiConversationMemoryObservationsError =
613
+ GetApiConversationMemoryObservationsErrors[keyof GetApiConversationMemoryObservationsErrors];
614
+
345
615
  export type GetApiConversationMemoryObservationsResponses = {
346
616
  /**
347
- * Success
617
+ * Upstream observation data (single observation or paginated list) from the Conversation Memory API
348
618
  */
349
- 200: unknown;
619
+ 200: {
620
+ [key: string]: unknown;
621
+ };
350
622
  };
351
623
 
624
+ export type GetApiConversationMemoryObservationsResponse =
625
+ GetApiConversationMemoryObservationsResponses[keyof GetApiConversationMemoryObservationsResponses];
626
+
352
627
  export type PatchApiConversationMemoryObservationsData = {
353
628
  body: {
354
629
  [key: string]: unknown;
@@ -363,51 +638,85 @@ export type PatchApiConversationMemoryObservationsData = {
363
638
 
364
639
  export type PatchApiConversationMemoryObservationsErrors = {
365
640
  /**
366
- * Unauthorized
641
+ * Missing required fields (profileId, observationId, content, source, occurredAt)
642
+ */
643
+ 400: ErrorResponse;
644
+ /**
645
+ * Unauthorized — requires an authenticated session
367
646
  */
368
647
  401: unknown;
369
648
  /**
370
- * Internal server error
649
+ * Conversation Memory store not configured, or internal server error
371
650
  */
372
- 500: unknown;
651
+ 500: ErrorResponse;
373
652
  };
374
653
 
654
+ export type PatchApiConversationMemoryObservationsError =
655
+ PatchApiConversationMemoryObservationsErrors[keyof PatchApiConversationMemoryObservationsErrors];
656
+
375
657
  export type PatchApiConversationMemoryObservationsResponses = {
376
658
  /**
377
- * Success
659
+ * Upstream observation data (single observation or paginated list) from the Conversation Memory API
378
660
  */
379
- 200: unknown;
661
+ 200: {
662
+ [key: string]: unknown;
663
+ };
664
+ /**
665
+ * Upstream confirmation payload from the Conversation Memory API
666
+ */
667
+ 202: {
668
+ [key: string]: unknown;
669
+ };
380
670
  };
381
671
 
672
+ export type PatchApiConversationMemoryObservationsResponse =
673
+ PatchApiConversationMemoryObservationsResponses[keyof PatchApiConversationMemoryObservationsResponses];
674
+
382
675
  export type PostApiConversationMemoryObservationsData = {
383
676
  body: {
384
677
  [key: string]: unknown;
385
678
  };
386
679
  path?: never;
387
- query: {
388
- profileId: string;
389
- };
680
+ query?: never;
390
681
  url: '/api/conversation-memory/observations';
391
682
  };
392
683
 
393
684
  export type PostApiConversationMemoryObservationsErrors = {
394
685
  /**
395
- * Unauthorized
686
+ * Missing required profileId or observations
687
+ */
688
+ 400: ErrorResponse;
689
+ /**
690
+ * Unauthorized — requires an authenticated session
396
691
  */
397
692
  401: unknown;
398
693
  /**
399
- * Internal server error
694
+ * Conversation Memory store not configured, or internal server error
400
695
  */
401
- 500: unknown;
696
+ 500: ErrorResponse;
402
697
  };
403
698
 
699
+ export type PostApiConversationMemoryObservationsError =
700
+ PostApiConversationMemoryObservationsErrors[keyof PostApiConversationMemoryObservationsErrors];
701
+
404
702
  export type PostApiConversationMemoryObservationsResponses = {
405
703
  /**
406
- * Success
704
+ * Upstream observation data (single observation or paginated list) from the Conversation Memory API
407
705
  */
408
- 200: unknown;
706
+ 200: {
707
+ [key: string]: unknown;
708
+ };
709
+ /**
710
+ * Upstream confirmation payload from the Conversation Memory API
711
+ */
712
+ 202: {
713
+ [key: string]: unknown;
714
+ };
409
715
  };
410
716
 
717
+ export type PostApiConversationMemoryObservationsResponse =
718
+ PostApiConversationMemoryObservationsResponses[keyof PostApiConversationMemoryObservationsResponses];
719
+
411
720
  export type DeleteApiConversationMemoryProfilesData = {
412
721
  body?: never;
413
722
  path?: never;
@@ -419,22 +728,40 @@ export type DeleteApiConversationMemoryProfilesData = {
419
728
 
420
729
  export type DeleteApiConversationMemoryProfilesErrors = {
421
730
  /**
422
- * Unauthorized
731
+ * Missing required profileId
732
+ */
733
+ 400: ErrorResponse;
734
+ /**
735
+ * Unauthorized — requires an authenticated session
423
736
  */
424
737
  401: unknown;
425
738
  /**
426
- * Internal server error
739
+ * Conversation Memory store not configured, or internal server error
427
740
  */
428
- 500: unknown;
741
+ 500: ErrorResponse;
429
742
  };
430
743
 
744
+ export type DeleteApiConversationMemoryProfilesError =
745
+ DeleteApiConversationMemoryProfilesErrors[keyof DeleteApiConversationMemoryProfilesErrors];
746
+
431
747
  export type DeleteApiConversationMemoryProfilesResponses = {
432
748
  /**
433
- * Success
749
+ * Upstream profile data (single profile or paginated list) from the Conversation Memory API
434
750
  */
435
- 200: unknown;
751
+ 200: {
752
+ [key: string]: unknown;
753
+ };
754
+ /**
755
+ * Upstream confirmation payload from the Conversation Memory API
756
+ */
757
+ 202: {
758
+ [key: string]: unknown;
759
+ };
436
760
  };
437
761
 
762
+ export type DeleteApiConversationMemoryProfilesResponse =
763
+ DeleteApiConversationMemoryProfilesResponses[keyof DeleteApiConversationMemoryProfilesResponses];
764
+
438
765
  export type GetApiConversationMemoryProfilesData = {
439
766
  body?: never;
440
767
  path?: never;
@@ -450,22 +777,30 @@ export type GetApiConversationMemoryProfilesData = {
450
777
 
451
778
  export type GetApiConversationMemoryProfilesErrors = {
452
779
  /**
453
- * Unauthorized
780
+ * Unauthorized — requires an authenticated session
454
781
  */
455
782
  401: unknown;
456
783
  /**
457
- * Internal server error
784
+ * Conversation Memory store not configured, or internal server error
458
785
  */
459
- 500: unknown;
786
+ 500: ErrorResponse;
460
787
  };
461
788
 
789
+ export type GetApiConversationMemoryProfilesError =
790
+ GetApiConversationMemoryProfilesErrors[keyof GetApiConversationMemoryProfilesErrors];
791
+
462
792
  export type GetApiConversationMemoryProfilesResponses = {
463
793
  /**
464
- * Success
794
+ * Upstream profile data (single profile or paginated list) from the Conversation Memory API
465
795
  */
466
- 200: unknown;
796
+ 200: {
797
+ [key: string]: unknown;
798
+ };
467
799
  };
468
800
 
801
+ export type GetApiConversationMemoryProfilesResponse =
802
+ GetApiConversationMemoryProfilesResponses[keyof GetApiConversationMemoryProfilesResponses];
803
+
469
804
  export type PatchApiConversationMemoryProfilesData = {
470
805
  body: {
471
806
  [key: string]: unknown;
@@ -479,51 +814,87 @@ export type PatchApiConversationMemoryProfilesData = {
479
814
 
480
815
  export type PatchApiConversationMemoryProfilesErrors = {
481
816
  /**
482
- * Unauthorized
817
+ * Missing required profileId or traits
818
+ */
819
+ 400: ErrorResponse;
820
+ /**
821
+ * Unauthorized — requires an authenticated session
483
822
  */
484
823
  401: unknown;
485
824
  /**
486
- * Internal server error
825
+ * Conversation Memory store not configured, or internal server error
487
826
  */
488
- 500: unknown;
827
+ 500: ErrorResponse;
489
828
  };
490
829
 
830
+ export type PatchApiConversationMemoryProfilesError =
831
+ PatchApiConversationMemoryProfilesErrors[keyof PatchApiConversationMemoryProfilesErrors];
832
+
491
833
  export type PatchApiConversationMemoryProfilesResponses = {
492
834
  /**
493
- * Success
835
+ * Upstream profile data (single profile or paginated list) from the Conversation Memory API
494
836
  */
495
- 200: unknown;
837
+ 200: {
838
+ [key: string]: unknown;
839
+ };
840
+ /**
841
+ * Upstream confirmation payload from the Conversation Memory API
842
+ */
843
+ 202: {
844
+ [key: string]: unknown;
845
+ };
496
846
  };
497
847
 
848
+ export type PatchApiConversationMemoryProfilesResponse =
849
+ PatchApiConversationMemoryProfilesResponses[keyof PatchApiConversationMemoryProfilesResponses];
850
+
498
851
  export type PostApiConversationMemoryProfilesData = {
499
852
  body: {
500
853
  [key: string]: unknown;
501
854
  };
502
855
  path?: never;
503
- query: {
504
- profileId: string;
856
+ query?: {
857
+ profileId?: string;
505
858
  };
506
859
  url: '/api/conversation-memory/profiles';
507
860
  };
508
861
 
509
862
  export type PostApiConversationMemoryProfilesErrors = {
510
863
  /**
511
- * Unauthorized
864
+ * Missing required traits
865
+ */
866
+ 400: ErrorResponse;
867
+ /**
868
+ * Unauthorized — requires an authenticated session
512
869
  */
513
870
  401: unknown;
514
871
  /**
515
- * Internal server error
872
+ * Conversation Memory store not configured, or internal server error
516
873
  */
517
- 500: unknown;
874
+ 500: ErrorResponse;
518
875
  };
519
876
 
877
+ export type PostApiConversationMemoryProfilesError =
878
+ PostApiConversationMemoryProfilesErrors[keyof PostApiConversationMemoryProfilesErrors];
879
+
520
880
  export type PostApiConversationMemoryProfilesResponses = {
521
881
  /**
522
- * Success
882
+ * Upstream profile data (single profile or paginated list) from the Conversation Memory API
523
883
  */
524
- 200: unknown;
884
+ 200: {
885
+ [key: string]: unknown;
886
+ };
887
+ /**
888
+ * Upstream confirmation payload from the Conversation Memory API
889
+ */
890
+ 202: {
891
+ [key: string]: unknown;
892
+ };
525
893
  };
526
894
 
895
+ export type PostApiConversationMemoryProfilesResponse =
896
+ PostApiConversationMemoryProfilesResponses[keyof PostApiConversationMemoryProfilesResponses];
897
+
527
898
  export type PostApiConversationMemoryProfilesLookupData = {
528
899
  body: {
529
900
  [key: string]: unknown;
@@ -535,22 +906,34 @@ export type PostApiConversationMemoryProfilesLookupData = {
535
906
 
536
907
  export type PostApiConversationMemoryProfilesLookupErrors = {
537
908
  /**
538
- * Unauthorized
909
+ * Missing required idType or value
910
+ */
911
+ 400: ErrorResponse;
912
+ /**
913
+ * Unauthorized — requires an authenticated session
539
914
  */
540
915
  401: unknown;
541
916
  /**
542
- * Internal server error
917
+ * Conversation Memory store not configured, or internal server error
543
918
  */
544
- 500: unknown;
919
+ 500: ErrorResponse;
545
920
  };
546
921
 
922
+ export type PostApiConversationMemoryProfilesLookupError =
923
+ PostApiConversationMemoryProfilesLookupErrors[keyof PostApiConversationMemoryProfilesLookupErrors];
924
+
547
925
  export type PostApiConversationMemoryProfilesLookupResponses = {
548
926
  /**
549
- * Success
927
+ * Upstream profile lookup result from the Conversation Memory API
550
928
  */
551
- 200: unknown;
929
+ 200: {
930
+ [key: string]: unknown;
931
+ };
552
932
  };
553
933
 
934
+ export type PostApiConversationMemoryProfilesLookupResponse =
935
+ PostApiConversationMemoryProfilesLookupResponses[keyof PostApiConversationMemoryProfilesLookupResponses];
936
+
554
937
  export type PostApiConversationMemoryRecallData = {
555
938
  body: {
556
939
  [key: string]: unknown;
@@ -562,22 +945,32 @@ export type PostApiConversationMemoryRecallData = {
562
945
 
563
946
  export type PostApiConversationMemoryRecallErrors = {
564
947
  /**
565
- * Unauthorized
948
+ * Missing required profileId or query
949
+ */
950
+ 400: ErrorResponse;
951
+ /**
952
+ * Unauthorized — requires an authenticated session
566
953
  */
567
954
  401: unknown;
568
955
  /**
569
- * Internal server error
956
+ * Conversation Memory store not configured, or internal server error
570
957
  */
571
- 500: unknown;
958
+ 500: ErrorResponse;
572
959
  };
573
960
 
961
+ export type PostApiConversationMemoryRecallError =
962
+ PostApiConversationMemoryRecallErrors[keyof PostApiConversationMemoryRecallErrors];
963
+
574
964
  export type PostApiConversationMemoryRecallResponses = {
575
965
  /**
576
- * Success
966
+ * Recalled communications, observations, and summaries matching the query
577
967
  */
578
- 200: unknown;
968
+ 200: ConversationMemoryRecallResponse;
579
969
  };
580
970
 
971
+ export type PostApiConversationMemoryRecallResponse =
972
+ PostApiConversationMemoryRecallResponses[keyof PostApiConversationMemoryRecallResponses];
973
+
581
974
  export type DeleteApiConversationMemoryResetData = {
582
975
  body?: never;
583
976
  path?: never;
@@ -589,22 +982,34 @@ export type DeleteApiConversationMemoryResetData = {
589
982
 
590
983
  export type DeleteApiConversationMemoryResetErrors = {
591
984
  /**
592
- * Unauthorized
985
+ * Missing required profileId
593
986
  */
594
- 401: unknown;
987
+ 400: ErrorResponse;
595
988
  /**
596
- * Internal server error
989
+ * Unauthorized requires an authenticated session
597
990
  */
598
- 500: unknown;
991
+ 401: unknown;
992
+ /**
993
+ * Conversation Memory store not configured, or internal server error
994
+ */
995
+ 500: ErrorResponse;
599
996
  };
600
997
 
998
+ export type DeleteApiConversationMemoryResetError =
999
+ DeleteApiConversationMemoryResetErrors[keyof DeleteApiConversationMemoryResetErrors];
1000
+
601
1001
  export type DeleteApiConversationMemoryResetResponses = {
602
1002
  /**
603
- * Success
1003
+ * Upstream confirmation payload from the Conversation Memory API
604
1004
  */
605
- 200: unknown;
1005
+ 200: {
1006
+ [key: string]: unknown;
1007
+ };
606
1008
  };
607
1009
 
1010
+ export type DeleteApiConversationMemoryResetResponse =
1011
+ DeleteApiConversationMemoryResetResponses[keyof DeleteApiConversationMemoryResetResponses];
1012
+
608
1013
  export type GetApiConversationMemoryTraitGroupsData = {
609
1014
  body?: never;
610
1015
  path?: never;
@@ -619,22 +1024,30 @@ export type GetApiConversationMemoryTraitGroupsData = {
619
1024
 
620
1025
  export type GetApiConversationMemoryTraitGroupsErrors = {
621
1026
  /**
622
- * Unauthorized
1027
+ * Unauthorized — requires an authenticated session
623
1028
  */
624
1029
  401: unknown;
625
1030
  /**
626
- * Internal server error
1031
+ * Conversation Memory store not configured, or internal server error
627
1032
  */
628
- 500: unknown;
1033
+ 500: ErrorResponse;
629
1034
  };
630
1035
 
1036
+ export type GetApiConversationMemoryTraitGroupsError =
1037
+ GetApiConversationMemoryTraitGroupsErrors[keyof GetApiConversationMemoryTraitGroupsErrors];
1038
+
631
1039
  export type GetApiConversationMemoryTraitGroupsResponses = {
632
1040
  /**
633
- * Success
1041
+ * Upstream trait group data (single group or paginated list) from the Conversation Memory API
634
1042
  */
635
- 200: unknown;
1043
+ 200: {
1044
+ [key: string]: unknown;
1045
+ };
636
1046
  };
637
1047
 
1048
+ export type GetApiConversationMemoryTraitGroupsResponse =
1049
+ GetApiConversationMemoryTraitGroupsResponses[keyof GetApiConversationMemoryTraitGroupsResponses];
1050
+
638
1051
  export type PatchApiConversationMemoryTraitGroupsData = {
639
1052
  body: {
640
1053
  [key: string]: unknown;
@@ -646,22 +1059,40 @@ export type PatchApiConversationMemoryTraitGroupsData = {
646
1059
 
647
1060
  export type PatchApiConversationMemoryTraitGroupsErrors = {
648
1061
  /**
649
- * Unauthorized
1062
+ * Missing required traitGroupName
1063
+ */
1064
+ 400: ErrorResponse;
1065
+ /**
1066
+ * Unauthorized — requires an authenticated session
650
1067
  */
651
1068
  401: unknown;
652
1069
  /**
653
- * Internal server error
1070
+ * Conversation Memory store not configured, or internal server error
654
1071
  */
655
- 500: unknown;
1072
+ 500: ErrorResponse;
656
1073
  };
657
1074
 
1075
+ export type PatchApiConversationMemoryTraitGroupsError =
1076
+ PatchApiConversationMemoryTraitGroupsErrors[keyof PatchApiConversationMemoryTraitGroupsErrors];
1077
+
658
1078
  export type PatchApiConversationMemoryTraitGroupsResponses = {
659
1079
  /**
660
- * Success
1080
+ * Upstream trait group data (single group or paginated list) from the Conversation Memory API
661
1081
  */
662
- 200: unknown;
1082
+ 200: {
1083
+ [key: string]: unknown;
1084
+ };
1085
+ /**
1086
+ * Upstream confirmation payload from the Conversation Memory API
1087
+ */
1088
+ 202: {
1089
+ [key: string]: unknown;
1090
+ };
663
1091
  };
664
1092
 
1093
+ export type PatchApiConversationMemoryTraitGroupsResponse =
1094
+ PatchApiConversationMemoryTraitGroupsResponses[keyof PatchApiConversationMemoryTraitGroupsResponses];
1095
+
665
1096
  export type PostApiConversationMemoryTraitGroupsData = {
666
1097
  body: {
667
1098
  [key: string]: unknown;
@@ -673,22 +1104,40 @@ export type PostApiConversationMemoryTraitGroupsData = {
673
1104
 
674
1105
  export type PostApiConversationMemoryTraitGroupsErrors = {
675
1106
  /**
676
- * Unauthorized
1107
+ * Missing required displayName
1108
+ */
1109
+ 400: ErrorResponse;
1110
+ /**
1111
+ * Unauthorized — requires an authenticated session
677
1112
  */
678
1113
  401: unknown;
679
1114
  /**
680
- * Internal server error
1115
+ * Conversation Memory store not configured, or internal server error
681
1116
  */
682
- 500: unknown;
1117
+ 500: ErrorResponse;
683
1118
  };
684
1119
 
1120
+ export type PostApiConversationMemoryTraitGroupsError =
1121
+ PostApiConversationMemoryTraitGroupsErrors[keyof PostApiConversationMemoryTraitGroupsErrors];
1122
+
685
1123
  export type PostApiConversationMemoryTraitGroupsResponses = {
686
1124
  /**
687
- * Success
1125
+ * Upstream trait group data (single group or paginated list) from the Conversation Memory API
688
1126
  */
689
- 200: unknown;
1127
+ 200: {
1128
+ [key: string]: unknown;
1129
+ };
1130
+ /**
1131
+ * Upstream confirmation payload from the Conversation Memory API
1132
+ */
1133
+ 202: {
1134
+ [key: string]: unknown;
1135
+ };
690
1136
  };
691
1137
 
1138
+ export type PostApiConversationMemoryTraitGroupsResponse =
1139
+ PostApiConversationMemoryTraitGroupsResponses[keyof PostApiConversationMemoryTraitGroupsResponses];
1140
+
692
1141
  export type GetApiConversationMemoryTraitsData = {
693
1142
  body?: never;
694
1143
  path?: never;
@@ -704,22 +1153,34 @@ export type GetApiConversationMemoryTraitsData = {
704
1153
 
705
1154
  export type GetApiConversationMemoryTraitsErrors = {
706
1155
  /**
707
- * Unauthorized
1156
+ * Missing required profileId
1157
+ */
1158
+ 400: ErrorResponse;
1159
+ /**
1160
+ * Unauthorized — requires an authenticated session
708
1161
  */
709
1162
  401: unknown;
710
1163
  /**
711
- * Internal server error
1164
+ * Conversation Memory store not configured, or internal server error
712
1165
  */
713
- 500: unknown;
1166
+ 500: ErrorResponse;
714
1167
  };
715
1168
 
1169
+ export type GetApiConversationMemoryTraitsError =
1170
+ GetApiConversationMemoryTraitsErrors[keyof GetApiConversationMemoryTraitsErrors];
1171
+
716
1172
  export type GetApiConversationMemoryTraitsResponses = {
717
1173
  /**
718
- * Success
1174
+ * Upstream paginated trait data from the Conversation Memory API
719
1175
  */
720
- 200: unknown;
1176
+ 200: {
1177
+ [key: string]: unknown;
1178
+ };
721
1179
  };
722
1180
 
1181
+ export type GetApiConversationMemoryTraitsResponse =
1182
+ GetApiConversationMemoryTraitsResponses[keyof GetApiConversationMemoryTraitsResponses];
1183
+
723
1184
  export type DeleteApiConversationalIntelligenceOperatorData = {
724
1185
  body?: never;
725
1186
  path?: never;
@@ -731,22 +1192,34 @@ export type DeleteApiConversationalIntelligenceOperatorData = {
731
1192
 
732
1193
  export type DeleteApiConversationalIntelligenceOperatorErrors = {
733
1194
  /**
734
- * Unauthorized
1195
+ * Missing intelligenceOperatorId
1196
+ */
1197
+ 400: ErrorResponse;
1198
+ /**
1199
+ * Unauthorized — requires an authenticated session
735
1200
  */
736
1201
  401: unknown;
737
1202
  /**
738
1203
  * Internal server error
739
1204
  */
740
- 500: unknown;
1205
+ 500: ErrorResponse;
741
1206
  };
742
1207
 
1208
+ export type DeleteApiConversationalIntelligenceOperatorError =
1209
+ DeleteApiConversationalIntelligenceOperatorErrors[keyof DeleteApiConversationalIntelligenceOperatorErrors];
1210
+
743
1211
  export type DeleteApiConversationalIntelligenceOperatorResponses = {
744
1212
  /**
745
- * Success
1213
+ * `{ success: true }` when the upstream returned no content, otherwise the deleted operator object as-is
746
1214
  */
747
- 200: unknown;
1215
+ 200: {
1216
+ [key: string]: unknown;
1217
+ };
748
1218
  };
749
1219
 
1220
+ export type DeleteApiConversationalIntelligenceOperatorResponse =
1221
+ DeleteApiConversationalIntelligenceOperatorResponses[keyof DeleteApiConversationalIntelligenceOperatorResponses];
1222
+
750
1223
  export type GetApiConversationalIntelligenceOperatorData = {
751
1224
  body?: never;
752
1225
  path?: never;
@@ -759,22 +1232,30 @@ export type GetApiConversationalIntelligenceOperatorData = {
759
1232
 
760
1233
  export type GetApiConversationalIntelligenceOperatorErrors = {
761
1234
  /**
762
- * Unauthorized
1235
+ * Unauthorized — requires an authenticated session
763
1236
  */
764
1237
  401: unknown;
765
1238
  /**
766
1239
  * Internal server error
767
1240
  */
768
- 500: unknown;
1241
+ 500: ErrorResponse;
769
1242
  };
770
1243
 
1244
+ export type GetApiConversationalIntelligenceOperatorError =
1245
+ GetApiConversationalIntelligenceOperatorErrors[keyof GetApiConversationalIntelligenceOperatorErrors];
1246
+
771
1247
  export type GetApiConversationalIntelligenceOperatorResponses = {
772
1248
  /**
773
- * Success
1249
+ * A single Operator (when intelligenceOperatorId is provided) or an OperatorList (paginated), proxied from the upstream API
774
1250
  */
775
- 200: unknown;
1251
+ 200: {
1252
+ [key: string]: unknown;
1253
+ };
776
1254
  };
777
1255
 
1256
+ export type GetApiConversationalIntelligenceOperatorResponse =
1257
+ GetApiConversationalIntelligenceOperatorResponses[keyof GetApiConversationalIntelligenceOperatorResponses];
1258
+
778
1259
  export type PostApiConversationalIntelligenceOperatorData = {
779
1260
  body: {
780
1261
  [key: string]: unknown;
@@ -788,22 +1269,28 @@ export type PostApiConversationalIntelligenceOperatorData = {
788
1269
 
789
1270
  export type PostApiConversationalIntelligenceOperatorErrors = {
790
1271
  /**
791
- * Unauthorized
1272
+ * Unauthorized — requires an authenticated session
792
1273
  */
793
1274
  401: unknown;
794
1275
  /**
795
1276
  * Internal server error
796
1277
  */
797
- 500: unknown;
1278
+ 500: ErrorResponse;
798
1279
  };
799
1280
 
1281
+ export type PostApiConversationalIntelligenceOperatorError =
1282
+ PostApiConversationalIntelligenceOperatorErrors[keyof PostApiConversationalIntelligenceOperatorErrors];
1283
+
800
1284
  export type PostApiConversationalIntelligenceOperatorResponses = {
801
1285
  /**
802
- * Success
1286
+ * The created operator object
803
1287
  */
804
- 200: unknown;
1288
+ 200: Operator;
805
1289
  };
806
1290
 
1291
+ export type PostApiConversationalIntelligenceOperatorResponse =
1292
+ PostApiConversationalIntelligenceOperatorResponses[keyof PostApiConversationalIntelligenceOperatorResponses];
1293
+
807
1294
  export type PutApiConversationalIntelligenceOperatorData = {
808
1295
  body: {
809
1296
  [key: string]: unknown;
@@ -817,22 +1304,28 @@ export type PutApiConversationalIntelligenceOperatorData = {
817
1304
 
818
1305
  export type PutApiConversationalIntelligenceOperatorErrors = {
819
1306
  /**
820
- * Unauthorized
1307
+ * Unauthorized — requires an authenticated session
821
1308
  */
822
1309
  401: unknown;
823
1310
  /**
824
1311
  * Internal server error
825
1312
  */
826
- 500: unknown;
1313
+ 500: ErrorResponse;
827
1314
  };
828
1315
 
1316
+ export type PutApiConversationalIntelligenceOperatorError =
1317
+ PutApiConversationalIntelligenceOperatorErrors[keyof PutApiConversationalIntelligenceOperatorErrors];
1318
+
829
1319
  export type PutApiConversationalIntelligenceOperatorResponses = {
830
1320
  /**
831
- * Success
1321
+ * The updated operator object
832
1322
  */
833
- 200: unknown;
1323
+ 200: Operator;
834
1324
  };
835
1325
 
1326
+ export type PutApiConversationalIntelligenceOperatorResponse =
1327
+ PutApiConversationalIntelligenceOperatorResponses[keyof PutApiConversationalIntelligenceOperatorResponses];
1328
+
836
1329
  export type DeleteApiConversationsDeleteData = {
837
1330
  body?: never;
838
1331
  path?: never;
@@ -842,22 +1335,45 @@ export type DeleteApiConversationsDeleteData = {
842
1335
 
843
1336
  export type DeleteApiConversationsDeleteErrors = {
844
1337
  /**
845
- * Unauthorized
1338
+ * Missing required objectID
1339
+ */
1340
+ 400: ErrorResponse;
1341
+ /**
1342
+ * Unauthorized — requires an authenticated session
846
1343
  */
847
1344
  401: unknown;
848
1345
  /**
849
- * Internal server error
1346
+ * Failed to delete conversation
850
1347
  */
851
- 500: unknown;
1348
+ 500: ErrorResponse;
852
1349
  };
853
1350
 
1351
+ export type DeleteApiConversationsDeleteError =
1352
+ DeleteApiConversationsDeleteErrors[keyof DeleteApiConversationsDeleteErrors];
1353
+
854
1354
  export type DeleteApiConversationsDeleteResponses = {
855
1355
  /**
856
1356
  * Success
857
1357
  */
858
- 200: unknown;
1358
+ 200: {
1359
+ /**
1360
+ * Always true on successful deletion
1361
+ */
1362
+ success: boolean;
1363
+ /**
1364
+ * Confirmation message
1365
+ */
1366
+ message: string;
1367
+ /**
1368
+ * The deleted template's objectID
1369
+ */
1370
+ objectID: string;
1371
+ };
859
1372
  };
860
1373
 
1374
+ export type DeleteApiConversationsDeleteResponse =
1375
+ DeleteApiConversationsDeleteResponses[keyof DeleteApiConversationsDeleteResponses];
1376
+
861
1377
  export type PostApiConversationsSaveData = {
862
1378
  body: {
863
1379
  [key: string]: unknown;
@@ -869,22 +1385,49 @@ export type PostApiConversationsSaveData = {
869
1385
 
870
1386
  export type PostApiConversationsSaveErrors = {
871
1387
  /**
872
- * Unauthorized
1388
+ * Unauthorized — requires an authenticated session
873
1389
  */
874
1390
  401: unknown;
875
1391
  /**
876
- * Internal server error
1392
+ * Failed to save conversation
877
1393
  */
878
- 500: unknown;
1394
+ 500: ErrorResponse;
879
1395
  };
880
1396
 
1397
+ export type PostApiConversationsSaveError =
1398
+ PostApiConversationsSaveErrors[keyof PostApiConversationsSaveErrors];
1399
+
881
1400
  export type PostApiConversationsSaveResponses = {
882
1401
  /**
883
1402
  * Success
884
1403
  */
885
- 200: unknown;
1404
+ 200: {
1405
+ /**
1406
+ * Confirmation message
1407
+ */
1408
+ message: string;
1409
+ /**
1410
+ * The saved template's objectID
1411
+ */
1412
+ objectID: string;
1413
+ /**
1414
+ * Always true on successful save
1415
+ */
1416
+ success: boolean;
1417
+ /**
1418
+ * Present only when a new CINTEL configuration was created for this template
1419
+ */
1420
+ intelligenceConfigurationId: string;
1421
+ /**
1422
+ * Present only when the target worker was auto-resolved from the user's email
1423
+ */
1424
+ crTargetWorker: string;
1425
+ };
886
1426
  };
887
1427
 
1428
+ export type PostApiConversationsSaveResponse =
1429
+ PostApiConversationsSaveResponses[keyof PostApiConversationsSaveResponses];
1430
+
888
1431
  export type PostApiConversationsShareData = {
889
1432
  body: {
890
1433
  [key: string]: unknown;
@@ -896,22 +1439,49 @@ export type PostApiConversationsShareData = {
896
1439
 
897
1440
  export type PostApiConversationsShareErrors = {
898
1441
  /**
899
- * Unauthorized
1442
+ * Missing required objectID/recipientEmail, or invalid email address
1443
+ */
1444
+ 400: ErrorResponse;
1445
+ /**
1446
+ * Unauthorized — requires an authenticated session
900
1447
  */
901
1448
  401: unknown;
902
1449
  /**
903
- * Internal server error
1450
+ * Source template not found
904
1451
  */
905
- 500: unknown;
1452
+ 404: ErrorResponse;
1453
+ /**
1454
+ * Failed to share template
1455
+ */
1456
+ 500: ErrorResponse;
906
1457
  };
907
1458
 
1459
+ export type PostApiConversationsShareError =
1460
+ PostApiConversationsShareErrors[keyof PostApiConversationsShareErrors];
1461
+
908
1462
  export type PostApiConversationsShareResponses = {
909
1463
  /**
910
1464
  * Success
911
1465
  */
912
- 200: unknown;
1466
+ 200: {
1467
+ /**
1468
+ * Confirmation message
1469
+ */
1470
+ message: string;
1471
+ /**
1472
+ * The objectID of the newly created shared copy
1473
+ */
1474
+ newObjectID: string;
1475
+ /**
1476
+ * Always true on successful share
1477
+ */
1478
+ success: boolean;
1479
+ };
913
1480
  };
914
1481
 
1482
+ export type PostApiConversationsShareResponse =
1483
+ PostApiConversationsShareResponses[keyof PostApiConversationsShareResponses];
1484
+
915
1485
  export type GetApiCountryConfigsData = {
916
1486
  body?: never;
917
1487
  path?: never;
@@ -921,22 +1491,35 @@ export type GetApiCountryConfigsData = {
921
1491
 
922
1492
  export type GetApiCountryConfigsErrors = {
923
1493
  /**
924
- * Unauthorized
1494
+ * Unauthorized — requires an authenticated session
925
1495
  */
926
1496
  401: unknown;
927
1497
  /**
928
- * Internal server error
1498
+ * Error fetching country configs
929
1499
  */
930
- 500: unknown;
1500
+ 500: ErrorResponse;
931
1501
  };
932
1502
 
1503
+ export type GetApiCountryConfigsError =
1504
+ GetApiCountryConfigsErrors[keyof GetApiCountryConfigsErrors];
1505
+
933
1506
  export type GetApiCountryConfigsResponses = {
934
1507
  /**
935
1508
  * Success
936
1509
  */
937
- 200: unknown;
1510
+ 200: {
1511
+ /**
1512
+ * Array of country configurations
1513
+ */
1514
+ configs: Array<{
1515
+ [key: string]: unknown;
1516
+ }>;
1517
+ };
938
1518
  };
939
1519
 
1520
+ export type GetApiCountryConfigsResponse =
1521
+ GetApiCountryConfigsResponses[keyof GetApiCountryConfigsResponses];
1522
+
940
1523
  export type PostApiCreateExternalFlexConnectionData = {
941
1524
  body: {
942
1525
  [key: string]: unknown;
@@ -947,19 +1530,66 @@ export type PostApiCreateExternalFlexConnectionData = {
947
1530
  };
948
1531
 
949
1532
  export type PostApiCreateExternalFlexConnectionErrors = {
1533
+ /**
1534
+ * Bad Request
1535
+ */
1536
+ 400: {
1537
+ /**
1538
+ * Always false
1539
+ */
1540
+ success: boolean;
1541
+ /**
1542
+ * Always "Invalid JSON in request"
1543
+ */
1544
+ error: string;
1545
+ };
1546
+ /**
1547
+ * Unauthorized — requires an authenticated session
1548
+ */
1549
+ 401: unknown;
950
1550
  /**
951
1551
  * Internal server error
952
1552
  */
953
- 500: unknown;
1553
+ 500: {
1554
+ /**
1555
+ * Always false
1556
+ */
1557
+ success: boolean;
1558
+ /**
1559
+ * Error message
1560
+ */
1561
+ error: string;
1562
+ };
1563
+ /**
1564
+ * Response
1565
+ */
1566
+ 502: {
1567
+ /**
1568
+ * Always false
1569
+ */
1570
+ success: boolean;
1571
+ /**
1572
+ * Always "Invalid JSON from upstream"
1573
+ */
1574
+ error: string;
1575
+ };
954
1576
  };
955
1577
 
1578
+ export type PostApiCreateExternalFlexConnectionError =
1579
+ PostApiCreateExternalFlexConnectionErrors[keyof PostApiCreateExternalFlexConnectionErrors];
1580
+
956
1581
  export type PostApiCreateExternalFlexConnectionResponses = {
957
1582
  /**
958
- * Success
1583
+ * Proxied response from the upstream API (shape depends on upstream; non-2xx upstream statuses are also passed through as-is)
959
1584
  */
960
- 200: unknown;
1585
+ 200: {
1586
+ [key: string]: unknown;
1587
+ };
961
1588
  };
962
1589
 
1590
+ export type PostApiCreateExternalFlexConnectionResponse =
1591
+ PostApiCreateExternalFlexConnectionResponses[keyof PostApiCreateExternalFlexConnectionResponses];
1592
+
963
1593
  export type PostApiEnhancePromptData = {
964
1594
  body: {
965
1595
  [key: string]: unknown;
@@ -971,22 +1601,37 @@ export type PostApiEnhancePromptData = {
971
1601
 
972
1602
  export type PostApiEnhancePromptErrors = {
973
1603
  /**
974
- * Unauthorized
1604
+ * Unauthorized — requires an authenticated session
975
1605
  */
976
1606
  401: unknown;
977
1607
  /**
978
- * Internal server error
1608
+ * Failed to enhance prompt with AI
979
1609
  */
980
- 500: unknown;
1610
+ 500: ErrorResponse;
981
1611
  };
982
1612
 
1613
+ export type PostApiEnhancePromptError =
1614
+ PostApiEnhancePromptErrors[keyof PostApiEnhancePromptErrors];
1615
+
983
1616
  export type PostApiEnhancePromptResponses = {
984
1617
  /**
985
1618
  * Success
986
1619
  */
987
- 200: unknown;
1620
+ 200: {
1621
+ /**
1622
+ * The AI-enhanced context/background text
1623
+ */
1624
+ enhancedContext: string;
1625
+ /**
1626
+ * The AI-enhanced instructions text
1627
+ */
1628
+ enhancedInstructions: string;
1629
+ };
988
1630
  };
989
1631
 
1632
+ export type PostApiEnhancePromptResponse =
1633
+ PostApiEnhancePromptResponses[keyof PostApiEnhancePromptResponses];
1634
+
990
1635
  export type PostApiGenerateTagsData = {
991
1636
  body: {
992
1637
  [key: string]: unknown;
@@ -998,7 +1643,7 @@ export type PostApiGenerateTagsData = {
998
1643
 
999
1644
  export type PostApiGenerateTagsErrors = {
1000
1645
  /**
1001
- * Unauthorized
1646
+ * Unauthorized — requires an authenticated session
1002
1647
  */
1003
1648
  401: unknown;
1004
1649
  /**
@@ -1011,9 +1656,17 @@ export type PostApiGenerateTagsResponses = {
1011
1656
  /**
1012
1657
  * Success
1013
1658
  */
1014
- 200: unknown;
1659
+ 200: {
1660
+ /**
1661
+ * Generated tags (empty array if no input fields, generation failed, or AI response was unparseable)
1662
+ */
1663
+ tags: Array<string>;
1664
+ };
1015
1665
  };
1016
1666
 
1667
+ export type PostApiGenerateTagsResponse =
1668
+ PostApiGenerateTagsResponses[keyof PostApiGenerateTagsResponses];
1669
+
1017
1670
  export type PostApiIncrementViewCountData = {
1018
1671
  body: {
1019
1672
  [key: string]: unknown;
@@ -1025,22 +1678,49 @@ export type PostApiIncrementViewCountData = {
1025
1678
 
1026
1679
  export type PostApiIncrementViewCountErrors = {
1027
1680
  /**
1028
- * Unauthorized
1681
+ * Missing or invalid objectID
1682
+ */
1683
+ 400: ErrorResponse;
1684
+ /**
1685
+ * Unauthorized — requires an authenticated session
1029
1686
  */
1030
1687
  401: unknown;
1031
1688
  /**
1032
- * Internal server error
1689
+ * Record not found
1033
1690
  */
1034
- 500: unknown;
1691
+ 404: ErrorResponse;
1692
+ /**
1693
+ * Failed to increment view count
1694
+ */
1695
+ 500: ErrorResponse;
1035
1696
  };
1036
1697
 
1698
+ export type PostApiIncrementViewCountError =
1699
+ PostApiIncrementViewCountErrors[keyof PostApiIncrementViewCountErrors];
1700
+
1037
1701
  export type PostApiIncrementViewCountResponses = {
1038
1702
  /**
1039
1703
  * Success
1040
1704
  */
1041
- 200: unknown;
1705
+ 200: {
1706
+ /**
1707
+ * The template's objectID
1708
+ */
1709
+ objectID: string;
1710
+ /**
1711
+ * Always true on successful increment
1712
+ */
1713
+ success: boolean;
1714
+ /**
1715
+ * The new view count after incrementing
1716
+ */
1717
+ viewCount: number;
1718
+ };
1042
1719
  };
1043
1720
 
1721
+ export type PostApiIncrementViewCountResponse =
1722
+ PostApiIncrementViewCountResponses[keyof PostApiIncrementViewCountResponses];
1723
+
1044
1724
  export type GetApiIntelligenceConfigurationData = {
1045
1725
  body?: never;
1046
1726
  path?: never;
@@ -1053,22 +1733,30 @@ export type GetApiIntelligenceConfigurationData = {
1053
1733
 
1054
1734
  export type GetApiIntelligenceConfigurationErrors = {
1055
1735
  /**
1056
- * Unauthorized
1736
+ * Unauthorized — requires an authenticated session
1057
1737
  */
1058
1738
  401: unknown;
1059
1739
  /**
1060
1740
  * Internal server error
1061
1741
  */
1062
- 500: unknown;
1742
+ 500: ErrorResponse;
1063
1743
  };
1064
1744
 
1745
+ export type GetApiIntelligenceConfigurationError =
1746
+ GetApiIntelligenceConfigurationErrors[keyof GetApiIntelligenceConfigurationErrors];
1747
+
1065
1748
  export type GetApiIntelligenceConfigurationResponses = {
1066
1749
  /**
1067
- * Success
1750
+ * A single IntelligenceConfiguration (when intelligenceConfigurationId is provided) or a paginated list
1068
1751
  */
1069
- 200: unknown;
1752
+ 200: {
1753
+ [key: string]: unknown;
1754
+ };
1070
1755
  };
1071
1756
 
1757
+ export type GetApiIntelligenceConfigurationResponse =
1758
+ GetApiIntelligenceConfigurationResponses[keyof GetApiIntelligenceConfigurationResponses];
1759
+
1072
1760
  export type PostApiIntelligenceConfigurationData = {
1073
1761
  body: {
1074
1762
  [key: string]: unknown;
@@ -1080,22 +1768,28 @@ export type PostApiIntelligenceConfigurationData = {
1080
1768
 
1081
1769
  export type PostApiIntelligenceConfigurationErrors = {
1082
1770
  /**
1083
- * Unauthorized
1771
+ * Unauthorized — requires an authenticated session
1084
1772
  */
1085
1773
  401: unknown;
1086
1774
  /**
1087
1775
  * Internal server error
1088
1776
  */
1089
- 500: unknown;
1777
+ 500: ErrorResponse;
1090
1778
  };
1091
1779
 
1780
+ export type PostApiIntelligenceConfigurationError =
1781
+ PostApiIntelligenceConfigurationErrors[keyof PostApiIntelligenceConfigurationErrors];
1782
+
1092
1783
  export type PostApiIntelligenceConfigurationResponses = {
1093
1784
  /**
1094
- * Success
1785
+ * The created configuration
1095
1786
  */
1096
- 200: unknown;
1787
+ 200: IntelligenceConfiguration;
1097
1788
  };
1098
1789
 
1790
+ export type PostApiIntelligenceConfigurationResponse =
1791
+ PostApiIntelligenceConfigurationResponses[keyof PostApiIntelligenceConfigurationResponses];
1792
+
1099
1793
  export type PutApiIntelligenceConfigurationData = {
1100
1794
  body: {
1101
1795
  [key: string]: unknown;
@@ -1107,42 +1801,27 @@ export type PutApiIntelligenceConfigurationData = {
1107
1801
 
1108
1802
  export type PutApiIntelligenceConfigurationErrors = {
1109
1803
  /**
1110
- * Unauthorized
1804
+ * Unauthorized — requires an authenticated session
1111
1805
  */
1112
1806
  401: unknown;
1113
1807
  /**
1114
1808
  * Internal server error
1115
1809
  */
1116
- 500: unknown;
1117
- };
1118
-
1119
- export type PutApiIntelligenceConfigurationResponses = {
1120
- /**
1121
- * Success
1122
- */
1123
- 200: unknown;
1810
+ 500: ErrorResponse;
1124
1811
  };
1125
1812
 
1126
- export type GetApiInternalNavData = {
1127
- body?: never;
1128
- path?: never;
1129
- query?: never;
1130
- url: '/api/internal-nav';
1131
- };
1813
+ export type PutApiIntelligenceConfigurationError =
1814
+ PutApiIntelligenceConfigurationErrors[keyof PutApiIntelligenceConfigurationErrors];
1132
1815
 
1133
- export type GetApiInternalNavErrors = {
1816
+ export type PutApiIntelligenceConfigurationResponses = {
1134
1817
  /**
1135
- * Internal server error
1818
+ * The updated configuration
1136
1819
  */
1137
- 500: unknown;
1820
+ 200: IntelligenceConfiguration;
1138
1821
  };
1139
1822
 
1140
- export type GetApiInternalNavResponses = {
1141
- /**
1142
- * Success
1143
- */
1144
- 200: unknown;
1145
- };
1823
+ export type PutApiIntelligenceConfigurationResponse =
1824
+ PutApiIntelligenceConfigurationResponses[keyof PutApiIntelligenceConfigurationResponses];
1146
1825
 
1147
1826
  export type GetApiIsvLogoData = {
1148
1827
  body?: never;
@@ -1155,18 +1834,47 @@ export type GetApiIsvLogoData = {
1155
1834
 
1156
1835
  export type GetApiIsvLogoErrors = {
1157
1836
  /**
1158
- * Internal server error
1837
+ * Missing or empty "company" query parameter
1159
1838
  */
1160
- 500: unknown;
1839
+ 400: ErrorResponse;
1840
+ /**
1841
+ * Logo not found for company
1842
+ */
1843
+ 404: ErrorResponse;
1844
+ /**
1845
+ * Failed to lookup ISV logo
1846
+ */
1847
+ 500: ErrorResponse;
1848
+ /**
1849
+ * Logo URL missing in mapping record
1850
+ */
1851
+ 502: ErrorResponse;
1161
1852
  };
1162
1853
 
1854
+ export type GetApiIsvLogoError = GetApiIsvLogoErrors[keyof GetApiIsvLogoErrors];
1855
+
1163
1856
  export type GetApiIsvLogoResponses = {
1164
1857
  /**
1165
1858
  * Success
1166
1859
  */
1167
- 200: unknown;
1860
+ 200: {
1861
+ /**
1862
+ * Matched company name
1863
+ */
1864
+ company: string;
1865
+ /**
1866
+ * URL of the company's logo
1867
+ */
1868
+ logoUrl: string;
1869
+ /**
1870
+ * Algolia objectID of the matched mapping record
1871
+ */
1872
+ objectID: string;
1873
+ };
1168
1874
  };
1169
1875
 
1876
+ export type GetApiIsvLogoResponse = GetApiIsvLogoResponses[keyof GetApiIsvLogoResponses];
1877
+
1170
1878
  export type DeleteApiLeadGenData = {
1171
1879
  body?: never;
1172
1880
  path?: never;
@@ -1176,22 +1884,32 @@ export type DeleteApiLeadGenData = {
1176
1884
 
1177
1885
  export type DeleteApiLeadGenErrors = {
1178
1886
  /**
1179
- * Unauthorized
1887
+ * Missing required objectID or agentNumber
1888
+ */
1889
+ 400: ErrorResponse;
1890
+ /**
1891
+ * Unauthorized — requires an authenticated session
1180
1892
  */
1181
1893
  401: unknown;
1182
1894
  /**
1183
- * Internal server error
1895
+ * Failed to delete lead gen, or internal server error
1184
1896
  */
1185
- 500: unknown;
1897
+ 500: ErrorResponse;
1186
1898
  };
1187
1899
 
1900
+ export type DeleteApiLeadGenError = DeleteApiLeadGenErrors[keyof DeleteApiLeadGenErrors];
1901
+
1188
1902
  export type DeleteApiLeadGenResponses = {
1189
1903
  /**
1190
- * Success
1904
+ * Proxied response from the upstream lead-gen API (shape depends on upstream)
1191
1905
  */
1192
- 200: unknown;
1906
+ 200: {
1907
+ [key: string]: unknown;
1908
+ };
1193
1909
  };
1194
1910
 
1911
+ export type DeleteApiLeadGenResponse = DeleteApiLeadGenResponses[keyof DeleteApiLeadGenResponses];
1912
+
1195
1913
  export type GetApiLeadGenData = {
1196
1914
  body?: never;
1197
1915
  path?: never;
@@ -1204,22 +1922,35 @@ export type GetApiLeadGenData = {
1204
1922
 
1205
1923
  export type GetApiLeadGenErrors = {
1206
1924
  /**
1207
- * Unauthorized
1925
+ * Missing required objectID or agentNumber
1926
+ */
1927
+ 400: ErrorResponse;
1928
+ /**
1929
+ * Unauthorized — requires an authenticated session
1208
1930
  */
1209
1931
  401: unknown;
1210
1932
  /**
1211
1933
  * Internal server error
1212
1934
  */
1213
- 500: unknown;
1935
+ 500: ErrorResponse;
1214
1936
  };
1215
1937
 
1938
+ export type GetApiLeadGenError = GetApiLeadGenErrors[keyof GetApiLeadGenErrors];
1939
+
1216
1940
  export type GetApiLeadGenResponses = {
1217
1941
  /**
1218
1942
  * Success
1219
1943
  */
1220
- 200: unknown;
1944
+ 200: {
1945
+ /**
1946
+ * Locked templates matching the lookup key
1947
+ */
1948
+ templates: Array<LockedTemplateData>;
1949
+ };
1221
1950
  };
1222
1951
 
1952
+ export type GetApiLeadGenResponse = GetApiLeadGenResponses[keyof GetApiLeadGenResponses];
1953
+
1223
1954
  export type PatchApiLeadGenData = {
1224
1955
  body: {
1225
1956
  [key: string]: unknown;
@@ -1231,22 +1962,32 @@ export type PatchApiLeadGenData = {
1231
1962
 
1232
1963
  export type PatchApiLeadGenErrors = {
1233
1964
  /**
1234
- * Unauthorized
1965
+ * Missing required objectID or agentNumber
1966
+ */
1967
+ 400: ErrorResponse;
1968
+ /**
1969
+ * Unauthorized — requires an authenticated session
1235
1970
  */
1236
1971
  401: unknown;
1237
1972
  /**
1238
- * Internal server error
1973
+ * Failed to update lead gen, or internal server error
1239
1974
  */
1240
- 500: unknown;
1975
+ 500: ErrorResponse;
1241
1976
  };
1242
1977
 
1978
+ export type PatchApiLeadGenError = PatchApiLeadGenErrors[keyof PatchApiLeadGenErrors];
1979
+
1243
1980
  export type PatchApiLeadGenResponses = {
1244
1981
  /**
1245
- * Success
1982
+ * Proxied response from the upstream lead-gen API (shape depends on upstream)
1246
1983
  */
1247
- 200: unknown;
1984
+ 200: {
1985
+ [key: string]: unknown;
1986
+ };
1248
1987
  };
1249
1988
 
1989
+ export type PatchApiLeadGenResponse = PatchApiLeadGenResponses[keyof PatchApiLeadGenResponses];
1990
+
1250
1991
  export type PostApiLeadGenData = {
1251
1992
  body: {
1252
1993
  [key: string]: unknown;
@@ -1258,22 +1999,32 @@ export type PostApiLeadGenData = {
1258
1999
 
1259
2000
  export type PostApiLeadGenErrors = {
1260
2001
  /**
1261
- * Unauthorized
2002
+ * Missing required objectID or agentNumber
2003
+ */
2004
+ 400: ErrorResponse;
2005
+ /**
2006
+ * Unauthorized — requires an authenticated session
1262
2007
  */
1263
2008
  401: unknown;
1264
2009
  /**
1265
- * Internal server error
2010
+ * Failed to create lead gen, or internal server error
1266
2011
  */
1267
- 500: unknown;
2012
+ 500: ErrorResponse;
1268
2013
  };
1269
2014
 
2015
+ export type PostApiLeadGenError = PostApiLeadGenErrors[keyof PostApiLeadGenErrors];
2016
+
1270
2017
  export type PostApiLeadGenResponses = {
1271
2018
  /**
1272
- * Success
2019
+ * Proxied response from the upstream lead-gen API (shape depends on upstream)
1273
2020
  */
1274
- 200: unknown;
2021
+ 200: {
2022
+ [key: string]: unknown;
2023
+ };
1275
2024
  };
1276
2025
 
2026
+ export type PostApiLeadGenResponse = PostApiLeadGenResponses[keyof PostApiLeadGenResponses];
2027
+
1277
2028
  export type DeleteApiLinkShortenerData = {
1278
2029
  body?: never;
1279
2030
  path?: never;
@@ -1285,22 +2036,34 @@ export type DeleteApiLinkShortenerData = {
1285
2036
 
1286
2037
  export type DeleteApiLinkShortenerErrors = {
1287
2038
  /**
1288
- * Unauthorized
2039
+ * Missing required code query param
2040
+ */
2041
+ 400: ErrorResponse;
2042
+ /**
2043
+ * Unauthorized — requires an authenticated session
1289
2044
  */
1290
2045
  401: unknown;
1291
2046
  /**
1292
- * Internal server error
2047
+ * Failed to delete link, or internal server error
1293
2048
  */
1294
- 500: unknown;
2049
+ 500: ErrorResponse;
1295
2050
  };
1296
2051
 
2052
+ export type DeleteApiLinkShortenerError =
2053
+ DeleteApiLinkShortenerErrors[keyof DeleteApiLinkShortenerErrors];
2054
+
1297
2055
  export type DeleteApiLinkShortenerResponses = {
1298
2056
  /**
1299
- * Success
2057
+ * Proxied response from the upstream link-shortener API (shape depends on upstream)
1300
2058
  */
1301
- 200: unknown;
2059
+ 200: {
2060
+ [key: string]: unknown;
2061
+ };
1302
2062
  };
1303
2063
 
2064
+ export type DeleteApiLinkShortenerResponse =
2065
+ DeleteApiLinkShortenerResponses[keyof DeleteApiLinkShortenerResponses];
2066
+
1304
2067
  export type GetApiLinkShortenerData = {
1305
2068
  body?: never;
1306
2069
  path?: never;
@@ -1312,22 +2075,29 @@ export type GetApiLinkShortenerData = {
1312
2075
 
1313
2076
  export type GetApiLinkShortenerErrors = {
1314
2077
  /**
1315
- * Unauthorized
2078
+ * Unauthorized — requires an authenticated session
1316
2079
  */
1317
2080
  401: unknown;
1318
2081
  /**
1319
- * Internal server error
2082
+ * Failed to fetch links, or internal server error
1320
2083
  */
1321
- 500: unknown;
2084
+ 500: ErrorResponse;
1322
2085
  };
1323
2086
 
2087
+ export type GetApiLinkShortenerError = GetApiLinkShortenerErrors[keyof GetApiLinkShortenerErrors];
2088
+
1324
2089
  export type GetApiLinkShortenerResponses = {
1325
2090
  /**
1326
- * Success
2091
+ * Proxied response from the upstream link-shortener API (shape depends on upstream)
1327
2092
  */
1328
- 200: unknown;
2093
+ 200: {
2094
+ [key: string]: unknown;
2095
+ };
1329
2096
  };
1330
2097
 
2098
+ export type GetApiLinkShortenerResponse =
2099
+ GetApiLinkShortenerResponses[keyof GetApiLinkShortenerResponses];
2100
+
1331
2101
  export type PatchApiLinkShortenerData = {
1332
2102
  body: {
1333
2103
  [key: string]: unknown;
@@ -1341,22 +2111,30 @@ export type PatchApiLinkShortenerData = {
1341
2111
 
1342
2112
  export type PatchApiLinkShortenerErrors = {
1343
2113
  /**
1344
- * Unauthorized
2114
+ * Unauthorized — requires an authenticated session
1345
2115
  */
1346
2116
  401: unknown;
1347
2117
  /**
1348
- * Internal server error
2118
+ * Failed to persist short link, or internal server error
1349
2119
  */
1350
- 500: unknown;
2120
+ 500: ErrorResponse;
1351
2121
  };
1352
2122
 
2123
+ export type PatchApiLinkShortenerError =
2124
+ PatchApiLinkShortenerErrors[keyof PatchApiLinkShortenerErrors];
2125
+
1353
2126
  export type PatchApiLinkShortenerResponses = {
1354
2127
  /**
1355
- * Success
2128
+ * Proxied response from the upstream link-shortener API (shape depends on upstream)
1356
2129
  */
1357
- 200: unknown;
2130
+ 200: {
2131
+ [key: string]: unknown;
2132
+ };
1358
2133
  };
1359
2134
 
2135
+ export type PatchApiLinkShortenerResponse =
2136
+ PatchApiLinkShortenerResponses[keyof PatchApiLinkShortenerResponses];
2137
+
1360
2138
  export type PostApiLinkShortenerData = {
1361
2139
  body: {
1362
2140
  [key: string]: unknown;
@@ -1370,22 +2148,30 @@ export type PostApiLinkShortenerData = {
1370
2148
 
1371
2149
  export type PostApiLinkShortenerErrors = {
1372
2150
  /**
1373
- * Unauthorized
2151
+ * Unauthorized — requires an authenticated session
1374
2152
  */
1375
2153
  401: unknown;
1376
2154
  /**
1377
- * Internal server error
2155
+ * Failed to shorten URLs, or internal server error
1378
2156
  */
1379
- 500: unknown;
2157
+ 500: ErrorResponse;
1380
2158
  };
1381
2159
 
2160
+ export type PostApiLinkShortenerError =
2161
+ PostApiLinkShortenerErrors[keyof PostApiLinkShortenerErrors];
2162
+
1382
2163
  export type PostApiLinkShortenerResponses = {
1383
2164
  /**
1384
- * Success
2165
+ * Proxied response from the upstream link-shortener API (shape depends on upstream)
1385
2166
  */
1386
- 200: unknown;
2167
+ 200: {
2168
+ [key: string]: unknown;
2169
+ };
1387
2170
  };
1388
2171
 
2172
+ export type PostApiLinkShortenerResponse =
2173
+ PostApiLinkShortenerResponses[keyof PostApiLinkShortenerResponses];
2174
+
1389
2175
  export type DeleteApiLiveNumbersData = {
1390
2176
  body?: never;
1391
2177
  path?: never;
@@ -1395,22 +2181,51 @@ export type DeleteApiLiveNumbersData = {
1395
2181
 
1396
2182
  export type DeleteApiLiveNumbersErrors = {
1397
2183
  /**
1398
- * Unauthorized
2184
+ * Missing required phoneNumber
2185
+ */
2186
+ 400: ErrorResponse;
2187
+ /**
2188
+ * Unauthorized — requires an authenticated session
1399
2189
  */
1400
2190
  401: unknown;
1401
2191
  /**
1402
- * Internal server error
2192
+ * Upstream server error, or internal server error
1403
2193
  */
1404
- 500: unknown;
2194
+ 500: ErrorResponse;
1405
2195
  };
1406
2196
 
2197
+ export type DeleteApiLiveNumbersError =
2198
+ DeleteApiLiveNumbersErrors[keyof DeleteApiLiveNumbersErrors];
2199
+
1407
2200
  export type DeleteApiLiveNumbersResponses = {
1408
2201
  /**
1409
2202
  * Success
1410
2203
  */
1411
- 200: unknown;
2204
+ 200: {
2205
+ /**
2206
+ * Always true on success; additional upstream confirmation fields are merged in (shape depends on upstream)
2207
+ */
2208
+ success: boolean;
2209
+ /**
2210
+ * Live phone numbers for the requested country
2211
+ */
2212
+ liveNumbers: Array<{
2213
+ [key: string]: unknown;
2214
+ }>;
2215
+ /**
2216
+ * Count of liveNumbers
2217
+ */
2218
+ totalCount: number;
2219
+ /**
2220
+ * ISO timestamp the response was generated
2221
+ */
2222
+ timestamp: string;
2223
+ };
1412
2224
  };
1413
2225
 
2226
+ export type DeleteApiLiveNumbersResponse =
2227
+ DeleteApiLiveNumbersResponses[keyof DeleteApiLiveNumbersResponses];
2228
+
1414
2229
  export type GetApiLiveNumbersData = {
1415
2230
  body?: never;
1416
2231
  path?: never;
@@ -1422,22 +2237,46 @@ export type GetApiLiveNumbersData = {
1422
2237
 
1423
2238
  export type GetApiLiveNumbersErrors = {
1424
2239
  /**
1425
- * Unauthorized
2240
+ * Unauthorized — requires an authenticated session
1426
2241
  */
1427
2242
  401: unknown;
1428
2243
  /**
1429
- * Internal server error
2244
+ * Upstream server error, or internal server error
1430
2245
  */
1431
- 500: unknown;
2246
+ 500: ErrorResponse;
1432
2247
  };
1433
2248
 
2249
+ export type GetApiLiveNumbersError = GetApiLiveNumbersErrors[keyof GetApiLiveNumbersErrors];
2250
+
1434
2251
  export type GetApiLiveNumbersResponses = {
1435
2252
  /**
1436
2253
  * Success
1437
2254
  */
1438
- 200: unknown;
2255
+ 200: {
2256
+ /**
2257
+ * Always true on success
2258
+ */
2259
+ success: boolean;
2260
+ /**
2261
+ * Live phone numbers for the requested country
2262
+ */
2263
+ liveNumbers: Array<{
2264
+ [key: string]: unknown;
2265
+ }>;
2266
+ /**
2267
+ * Count of liveNumbers
2268
+ */
2269
+ totalCount: number;
2270
+ /**
2271
+ * ISO timestamp the response was generated
2272
+ */
2273
+ timestamp: string;
2274
+ };
1439
2275
  };
1440
2276
 
2277
+ export type GetApiLiveNumbersResponse =
2278
+ GetApiLiveNumbersResponses[keyof GetApiLiveNumbersResponses];
2279
+
1441
2280
  export type PostApiOutboundCallData = {
1442
2281
  body: {
1443
2282
  [key: string]: unknown;
@@ -1449,22 +2288,33 @@ export type PostApiOutboundCallData = {
1449
2288
 
1450
2289
  export type PostApiOutboundCallErrors = {
1451
2290
  /**
1452
- * Unauthorized
2291
+ * Missing required to or from fields
2292
+ */
2293
+ 400: ErrorResponse;
2294
+ /**
2295
+ * Unauthorized — requires an authenticated session
1453
2296
  */
1454
2297
  401: unknown;
1455
2298
  /**
1456
- * Internal server error
2299
+ * Failed to initiate call, or internal server error
1457
2300
  */
1458
- 500: unknown;
2301
+ 500: ErrorResponse;
1459
2302
  };
1460
2303
 
2304
+ export type PostApiOutboundCallError = PostApiOutboundCallErrors[keyof PostApiOutboundCallErrors];
2305
+
1461
2306
  export type PostApiOutboundCallResponses = {
1462
2307
  /**
1463
- * Success
2308
+ * Proxied response from the upstream agent outbound-call API (shape depends on upstream)
1464
2309
  */
1465
- 200: unknown;
2310
+ 200: {
2311
+ [key: string]: unknown;
2312
+ };
1466
2313
  };
1467
2314
 
2315
+ export type PostApiOutboundCallResponse =
2316
+ PostApiOutboundCallResponses[keyof PostApiOutboundCallResponses];
2317
+
1468
2318
  export type PostApiOutboundCommunicationTextData = {
1469
2319
  body: {
1470
2320
  [key: string]: unknown;
@@ -1476,22 +2326,34 @@ export type PostApiOutboundCommunicationTextData = {
1476
2326
 
1477
2327
  export type PostApiOutboundCommunicationTextErrors = {
1478
2328
  /**
1479
- * Unauthorized
2329
+ * Missing required to field
2330
+ */
2331
+ 400: ErrorResponse;
2332
+ /**
2333
+ * Unauthorized — requires an authenticated session
1480
2334
  */
1481
2335
  401: unknown;
1482
2336
  /**
1483
- * Internal server error
2337
+ * Failed to send message, or internal server error
1484
2338
  */
1485
- 500: unknown;
2339
+ 500: ErrorResponse;
1486
2340
  };
1487
2341
 
2342
+ export type PostApiOutboundCommunicationTextError =
2343
+ PostApiOutboundCommunicationTextErrors[keyof PostApiOutboundCommunicationTextErrors];
2344
+
1488
2345
  export type PostApiOutboundCommunicationTextResponses = {
1489
2346
  /**
1490
- * Success
2347
+ * Proxied response from the upstream agent outbound-communication-text API (shape depends on upstream)
1491
2348
  */
1492
- 200: unknown;
2349
+ 200: {
2350
+ [key: string]: unknown;
2351
+ };
1493
2352
  };
1494
2353
 
2354
+ export type PostApiOutboundCommunicationTextResponse =
2355
+ PostApiOutboundCommunicationTextResponses[keyof PostApiOutboundCommunicationTextResponses];
2356
+
1495
2357
  export type GetApiPhoneLogsByPhoneNumberData = {
1496
2358
  body?: never;
1497
2359
  path: {
@@ -1504,19 +2366,35 @@ export type GetApiPhoneLogsByPhoneNumberData = {
1504
2366
  };
1505
2367
 
1506
2368
  export type GetApiPhoneLogsByPhoneNumberErrors = {
2369
+ /**
2370
+ * No call logs found for this phone number
2371
+ */
2372
+ 404: ErrorResponse;
2373
+ /**
2374
+ * Too many requests for this phone number
2375
+ */
2376
+ 429: ErrorResponse;
1507
2377
  /**
1508
2378
  * Internal server error
1509
2379
  */
1510
- 500: unknown;
2380
+ 500: ErrorResponse;
1511
2381
  };
1512
2382
 
2383
+ export type GetApiPhoneLogsByPhoneNumberError =
2384
+ GetApiPhoneLogsByPhoneNumberErrors[keyof GetApiPhoneLogsByPhoneNumberErrors];
2385
+
1513
2386
  export type GetApiPhoneLogsByPhoneNumberResponses = {
1514
2387
  /**
1515
- * Success
2388
+ * Phone call logs for the requested number, proxied from the upstream agent API
1516
2389
  */
1517
- 200: unknown;
2390
+ 200: {
2391
+ [key: string]: unknown;
2392
+ };
1518
2393
  };
1519
2394
 
2395
+ export type GetApiPhoneLogsByPhoneNumberResponse =
2396
+ GetApiPhoneLogsByPhoneNumberResponses[keyof GetApiPhoneLogsByPhoneNumberResponses];
2397
+
1520
2398
  export type GetApiRecentlyActiveNumbersData = {
1521
2399
  body?: never;
1522
2400
  path?: never;
@@ -1528,22 +2406,47 @@ export type GetApiRecentlyActiveNumbersData = {
1528
2406
 
1529
2407
  export type GetApiRecentlyActiveNumbersErrors = {
1530
2408
  /**
1531
- * Unauthorized
2409
+ * Unauthorized — requires an authenticated session
1532
2410
  */
1533
2411
  401: unknown;
1534
2412
  /**
1535
2413
  * Internal server error
1536
2414
  */
1537
- 500: unknown;
2415
+ 500: ErrorResponse;
1538
2416
  };
1539
2417
 
2418
+ export type GetApiRecentlyActiveNumbersError =
2419
+ GetApiRecentlyActiveNumbersErrors[keyof GetApiRecentlyActiveNumbersErrors];
2420
+
1540
2421
  export type GetApiRecentlyActiveNumbersResponses = {
1541
2422
  /**
1542
2423
  * Success
1543
2424
  */
1544
- 200: unknown;
2425
+ 200: {
2426
+ /**
2427
+ * Always true on success
2428
+ */
2429
+ success: boolean;
2430
+ /**
2431
+ * Recently active phone numbers
2432
+ */
2433
+ activeNumbers: Array<{
2434
+ [key: string]: unknown;
2435
+ }>;
2436
+ /**
2437
+ * Count of activeNumbers
2438
+ */
2439
+ totalCount: number;
2440
+ /**
2441
+ * ISO timestamp the response was generated
2442
+ */
2443
+ timestamp: string;
2444
+ };
1545
2445
  };
1546
2446
 
2447
+ export type GetApiRecentlyActiveNumbersResponse =
2448
+ GetApiRecentlyActiveNumbersResponses[keyof GetApiRecentlyActiveNumbersResponses];
2449
+
1547
2450
  export type PostApiSegmentIdentifyData = {
1548
2451
  body: {
1549
2452
  [key: string]: unknown;
@@ -1555,22 +2458,37 @@ export type PostApiSegmentIdentifyData = {
1555
2458
 
1556
2459
  export type PostApiSegmentIdentifyErrors = {
1557
2460
  /**
1558
- * Unauthorized
2461
+ * Missing required identifier, missing Segment write key, or invalid JSON body
2462
+ */
2463
+ 400: ErrorResponse;
2464
+ /**
2465
+ * Unauthorized — requires an authenticated session
1559
2466
  */
1560
2467
  401: unknown;
1561
2468
  /**
1562
- * Internal server error
2469
+ * Segment API error, or internal server error
1563
2470
  */
1564
- 500: unknown;
2471
+ 500: ErrorResponse;
1565
2472
  };
1566
2473
 
2474
+ export type PostApiSegmentIdentifyError =
2475
+ PostApiSegmentIdentifyErrors[keyof PostApiSegmentIdentifyErrors];
2476
+
1567
2477
  export type PostApiSegmentIdentifyResponses = {
1568
2478
  /**
1569
2479
  * Success
1570
2480
  */
1571
- 200: unknown;
2481
+ 200: {
2482
+ /**
2483
+ * Always "Event tracked successfully"
2484
+ */
2485
+ message: string;
2486
+ };
1572
2487
  };
1573
2488
 
2489
+ export type PostApiSegmentIdentifyResponse =
2490
+ PostApiSegmentIdentifyResponses[keyof PostApiSegmentIdentifyResponses];
2491
+
1574
2492
  export type PostApiSegmentProfileData = {
1575
2493
  body: {
1576
2494
  [key: string]: unknown;
@@ -1582,21 +2500,64 @@ export type PostApiSegmentProfileData = {
1582
2500
 
1583
2501
  export type PostApiSegmentProfileErrors = {
1584
2502
  /**
1585
- * Unauthorized
2503
+ * Missing required identifier/token/space, or invalid JSON body
2504
+ */
2505
+ 400: ErrorResponse;
2506
+ /**
2507
+ * Unauthorized — requires an authenticated session
1586
2508
  */
1587
2509
  401: unknown;
1588
2510
  /**
1589
- * Internal server error
2511
+ * Profile not found
1590
2512
  */
1591
- 500: unknown;
2513
+ 404: ErrorResponse;
2514
+ /**
2515
+ * Segment profile error, or internal server error
2516
+ */
2517
+ 500: ErrorResponse;
1592
2518
  };
1593
2519
 
2520
+ export type PostApiSegmentProfileError =
2521
+ PostApiSegmentProfileErrors[keyof PostApiSegmentProfileErrors];
2522
+
1594
2523
  export type PostApiSegmentProfileResponses = {
1595
2524
  /**
1596
2525
  * Success
1597
2526
  */
1598
- 200: unknown;
1599
- };
2527
+ 200: {
2528
+ /**
2529
+ * Resolved user_id, when one was found via external IDs
2530
+ */
2531
+ canonicalUserId: string;
2532
+ /**
2533
+ * The customer's Segment traits
2534
+ */
2535
+ data: {
2536
+ [key: string]: unknown;
2537
+ };
2538
+ /**
2539
+ * The identifier value originally supplied
2540
+ */
2541
+ identifier: string;
2542
+ /**
2543
+ * External identifiers associated with the profile
2544
+ */
2545
+ identifiers: Array<{
2546
+ [key: string]: unknown;
2547
+ }>;
2548
+ /**
2549
+ * Which identifier type ("user_id" or "phone") successfully matched
2550
+ */
2551
+ matchedKey: string;
2552
+ /**
2553
+ * Always "Profile retrieved successfully"
2554
+ */
2555
+ message: string;
2556
+ };
2557
+ };
2558
+
2559
+ export type PostApiSegmentProfileResponse =
2560
+ PostApiSegmentProfileResponses[keyof PostApiSegmentProfileResponses];
1600
2561
 
1601
2562
  export type GetApiSessionData = {
1602
2563
  body?: never;
@@ -1609,16 +2570,35 @@ export type GetApiSessionErrors = {
1609
2570
  /**
1610
2571
  * Internal server error
1611
2572
  */
1612
- 500: unknown;
2573
+ 500: ErrorResponse;
1613
2574
  };
1614
2575
 
2576
+ export type GetApiSessionError = GetApiSessionErrors[keyof GetApiSessionErrors];
2577
+
1615
2578
  export type GetApiSessionResponses = {
1616
2579
  /**
1617
2580
  * Success
1618
2581
  */
1619
- 200: unknown;
2582
+ 200: {
2583
+ /**
2584
+ * Whether the request has an active session
2585
+ */
2586
+ authenticated: boolean;
2587
+ /**
2588
+ * The session user, or null if not authenticated
2589
+ */
2590
+ user: {
2591
+ [key: string]: unknown;
2592
+ };
2593
+ /**
2594
+ * ISO timestamp the response was generated
2595
+ */
2596
+ timestamp: string;
2597
+ };
1620
2598
  };
1621
2599
 
2600
+ export type GetApiSessionResponse = GetApiSessionResponses[keyof GetApiSessionResponses];
2601
+
1622
2602
  export type GetApiSupportedRegionsData = {
1623
2603
  body?: never;
1624
2604
  path?: never;
@@ -1628,22 +2608,33 @@ export type GetApiSupportedRegionsData = {
1628
2608
 
1629
2609
  export type GetApiSupportedRegionsErrors = {
1630
2610
  /**
1631
- * Unauthorized
2611
+ * Unauthorized — requires an authenticated session
1632
2612
  */
1633
2613
  401: unknown;
1634
2614
  /**
1635
2615
  * Internal server error
1636
2616
  */
1637
- 500: unknown;
2617
+ 500: ErrorResponse;
1638
2618
  };
1639
2619
 
2620
+ export type GetApiSupportedRegionsError =
2621
+ GetApiSupportedRegionsErrors[keyof GetApiSupportedRegionsErrors];
2622
+
1640
2623
  export type GetApiSupportedRegionsResponses = {
1641
2624
  /**
1642
2625
  * Success
1643
2626
  */
1644
- 200: unknown;
2627
+ 200: {
2628
+ /**
2629
+ * Regions a phone number can be purchased in
2630
+ */
2631
+ regions: Array<SupportedRegion>;
2632
+ };
1645
2633
  };
1646
2634
 
2635
+ export type GetApiSupportedRegionsResponse =
2636
+ GetApiSupportedRegionsResponses[keyof GetApiSupportedRegionsResponses];
2637
+
1647
2638
  export type PostApiTagsData = {
1648
2639
  body: {
1649
2640
  [key: string]: unknown;
@@ -1655,18 +2646,37 @@ export type PostApiTagsData = {
1655
2646
 
1656
2647
  export type PostApiTagsErrors = {
1657
2648
  /**
1658
- * Internal server error
2649
+ * Missing/invalid tag, or tag shorter than 2 characters
1659
2650
  */
1660
- 500: unknown;
2651
+ 400: ErrorResponse;
2652
+ /**
2653
+ * Failed to save tag
2654
+ */
2655
+ 500: ErrorResponse;
1661
2656
  };
1662
2657
 
2658
+ export type PostApiTagsError = PostApiTagsErrors[keyof PostApiTagsErrors];
2659
+
1663
2660
  export type PostApiTagsResponses = {
1664
2661
  /**
1665
2662
  * Success
1666
2663
  */
1667
- 200: unknown;
2664
+ 200: {
2665
+ /**
2666
+ * Always true on successful save
2667
+ */
2668
+ success: boolean;
2669
+ /**
2670
+ * The saved tag record (`{ isTag, objectID, value }`)
2671
+ */
2672
+ tag: {
2673
+ [key: string]: unknown;
2674
+ };
2675
+ };
1668
2676
  };
1669
2677
 
2678
+ export type PostApiTagsResponse = PostApiTagsResponses[keyof PostApiTagsResponses];
2679
+
1670
2680
  export type PostApiTelemetryData = {
1671
2681
  body?: never;
1672
2682
  path?: never;
@@ -1677,19 +2687,33 @@ export type PostApiTelemetryData = {
1677
2687
  };
1678
2688
 
1679
2689
  export type PostApiTelemetryErrors = {
2690
+ /**
2691
+ * Invalid or missing ddforward parameter
2692
+ */
2693
+ 400: ErrorResponse;
1680
2694
  /**
1681
2695
  * Internal server error
1682
2696
  */
1683
2697
  500: unknown;
1684
2698
  };
1685
2699
 
2700
+ export type PostApiTelemetryError = PostApiTelemetryErrors[keyof PostApiTelemetryErrors];
2701
+
1686
2702
  export type PostApiTelemetryResponses = {
1687
2703
  /**
1688
2704
  * Success
1689
2705
  */
1690
2706
  200: unknown;
2707
+ /**
2708
+ * Empty body; status mirrors the upstream Datadog intake response (202 on success, or on proxy fetch failure since telemetry is best-effort)
2709
+ */
2710
+ 202: {
2711
+ [key: string]: unknown;
2712
+ };
1691
2713
  };
1692
2714
 
2715
+ export type PostApiTelemetryResponse = PostApiTelemetryResponses[keyof PostApiTelemetryResponses];
2716
+
1693
2717
  export type DeleteApiTemplateData = {
1694
2718
  body?: never;
1695
2719
  path?: never;
@@ -1701,22 +2725,29 @@ export type DeleteApiTemplateData = {
1701
2725
 
1702
2726
  export type DeleteApiTemplateErrors = {
1703
2727
  /**
1704
- * Unauthorized
2728
+ * Unauthorized — requires an authenticated session
1705
2729
  */
1706
2730
  401: unknown;
1707
2731
  /**
1708
2732
  * Internal server error
1709
2733
  */
1710
- 500: unknown;
2734
+ 500: ErrorResponse;
1711
2735
  };
1712
2736
 
2737
+ export type DeleteApiTemplateError = DeleteApiTemplateErrors[keyof DeleteApiTemplateErrors];
2738
+
1713
2739
  export type DeleteApiTemplateResponses = {
1714
2740
  /**
1715
- * Success
2741
+ * Proxied response from the upstream template API (shape depends on upstream)
1716
2742
  */
1717
- 200: unknown;
2743
+ 200: {
2744
+ [key: string]: unknown;
2745
+ };
1718
2746
  };
1719
2747
 
2748
+ export type DeleteApiTemplateResponse =
2749
+ DeleteApiTemplateResponses[keyof DeleteApiTemplateResponses];
2750
+
1720
2751
  export type PostApiTemplateAutogenData = {
1721
2752
  body: {
1722
2753
  [key: string]: unknown;
@@ -1728,22 +2759,30 @@ export type PostApiTemplateAutogenData = {
1728
2759
 
1729
2760
  export type PostApiTemplateAutogenErrors = {
1730
2761
  /**
1731
- * Unauthorized
2762
+ * Unauthorized — requires an authenticated session
1732
2763
  */
1733
2764
  401: unknown;
1734
2765
  /**
1735
2766
  * Internal server error
1736
2767
  */
1737
- 500: unknown;
2768
+ 500: ErrorResponse;
1738
2769
  };
1739
2770
 
2771
+ export type PostApiTemplateAutogenError =
2772
+ PostApiTemplateAutogenErrors[keyof PostApiTemplateAutogenErrors];
2773
+
1740
2774
  export type PostApiTemplateAutogenResponses = {
1741
2775
  /**
1742
- * Success
2776
+ * Proxied response from the upstream template-autogen API (shape depends on upstream)
1743
2777
  */
1744
- 200: unknown;
2778
+ 200: {
2779
+ [key: string]: unknown;
2780
+ };
1745
2781
  };
1746
2782
 
2783
+ export type PostApiTemplateAutogenResponse =
2784
+ PostApiTemplateAutogenResponses[keyof PostApiTemplateAutogenResponses];
2785
+
1747
2786
  export type PostApiVerifyCheckData = {
1748
2787
  body: {
1749
2788
  [key: string]: unknown;
@@ -1755,18 +2794,36 @@ export type PostApiVerifyCheckData = {
1755
2794
 
1756
2795
  export type PostApiVerifyCheckErrors = {
1757
2796
  /**
1758
- * Internal server error
2797
+ * Missing required to or code
1759
2798
  */
1760
- 500: unknown;
2799
+ 400: ErrorResponse;
2800
+ /**
2801
+ * Unable to verify code
2802
+ */
2803
+ 500: ErrorResponse;
1761
2804
  };
1762
2805
 
2806
+ export type PostApiVerifyCheckError = PostApiVerifyCheckErrors[keyof PostApiVerifyCheckErrors];
2807
+
1763
2808
  export type PostApiVerifyCheckResponses = {
1764
2809
  /**
1765
2810
  * Success
1766
2811
  */
1767
- 200: unknown;
2812
+ 200: {
2813
+ /**
2814
+ * Whether the code was approved
2815
+ */
2816
+ verified: boolean;
2817
+ /**
2818
+ * Present alongside `verified: false` when the code is invalid
2819
+ */
2820
+ error: string;
2821
+ };
1768
2822
  };
1769
2823
 
2824
+ export type PostApiVerifyCheckResponse =
2825
+ PostApiVerifyCheckResponses[keyof PostApiVerifyCheckResponses];
2826
+
1770
2827
  export type PostApiVerifySendData = {
1771
2828
  body: {
1772
2829
  [key: string]: unknown;
@@ -1778,14 +2835,419 @@ export type PostApiVerifySendData = {
1778
2835
 
1779
2836
  export type PostApiVerifySendErrors = {
1780
2837
  /**
1781
- * Internal server error
2838
+ * Missing required phone or email
1782
2839
  */
1783
- 500: unknown;
2840
+ 400: ErrorResponse;
2841
+ /**
2842
+ * Failed to send verification code
2843
+ */
2844
+ 500: ErrorResponse;
1784
2845
  };
1785
2846
 
2847
+ export type PostApiVerifySendError = PostApiVerifySendErrors[keyof PostApiVerifySendErrors];
2848
+
1786
2849
  export type PostApiVerifySendResponses = {
1787
2850
  /**
1788
2851
  * Success
1789
2852
  */
1790
- 200: unknown;
2853
+ 200: {
2854
+ /**
2855
+ * The channel the verification was sent over ("sms" or "email")
2856
+ */
2857
+ channel: string;
2858
+ /**
2859
+ * The Twilio Verify verification SID
2860
+ */
2861
+ sid: string;
2862
+ };
2863
+ };
2864
+
2865
+ export type PostApiVerifySendResponse =
2866
+ PostApiVerifySendResponses[keyof PostApiVerifySendResponses];
2867
+
2868
+ export type PostApiWebchatChatData = {
2869
+ body: {
2870
+ [key: string]: unknown;
2871
+ };
2872
+ path?: never;
2873
+ query?: never;
2874
+ url: '/api/webchat/chat';
2875
+ };
2876
+
2877
+ export type PostApiWebchatChatErrors = {
2878
+ /**
2879
+ * "proxy_error" if the upstream call fails
2880
+ */
2881
+ 500: ErrorResponse;
2882
+ };
2883
+
2884
+ export type PostApiWebchatChatError = PostApiWebchatChatErrors[keyof PostApiWebchatChatErrors];
2885
+
2886
+ export type PostApiWebchatChatResponses = {
2887
+ /**
2888
+ * Proxied response from the agent chat service
2889
+ */
2890
+ 200: {
2891
+ [key: string]: unknown;
2892
+ };
1791
2893
  };
2894
+
2895
+ export type PostApiWebchatChatResponse =
2896
+ PostApiWebchatChatResponses[keyof PostApiWebchatChatResponses];
2897
+
2898
+ export type PostApiWebchatConversationData = {
2899
+ body: {
2900
+ [key: string]: unknown;
2901
+ };
2902
+ path?: never;
2903
+ query?: never;
2904
+ url: '/api/webchat/conversation';
2905
+ };
2906
+
2907
+ export type PostApiWebchatConversationErrors = {
2908
+ /**
2909
+ * "proxy_error" if the upstream call fails
2910
+ */
2911
+ 500: ErrorResponse;
2912
+ };
2913
+
2914
+ export type PostApiWebchatConversationError =
2915
+ PostApiWebchatConversationErrors[keyof PostApiWebchatConversationErrors];
2916
+
2917
+ export type PostApiWebchatConversationResponses = {
2918
+ /**
2919
+ * Proxied response from the agent conversation service
2920
+ */
2921
+ 200: {
2922
+ [key: string]: unknown;
2923
+ };
2924
+ };
2925
+
2926
+ export type PostApiWebchatConversationResponse =
2927
+ PostApiWebchatConversationResponses[keyof PostApiWebchatConversationResponses];
2928
+
2929
+ export type GetApiWebchatConversationsTokenData = {
2930
+ body?: never;
2931
+ path?: never;
2932
+ query?: {
2933
+ /**
2934
+ * Conversation participant identity (required)
2935
+ */
2936
+ identity?: string;
2937
+ };
2938
+ url: '/api/webchat/conversations/token';
2939
+ };
2940
+
2941
+ export type GetApiWebchatConversationsTokenErrors = {
2942
+ /**
2943
+ * Missing identity query param
2944
+ */
2945
+ 400: ErrorResponse;
2946
+ /**
2947
+ * "proxy_error" if the upstream call fails
2948
+ */
2949
+ 500: ErrorResponse;
2950
+ };
2951
+
2952
+ export type GetApiWebchatConversationsTokenError =
2953
+ GetApiWebchatConversationsTokenErrors[keyof GetApiWebchatConversationsTokenErrors];
2954
+
2955
+ export type GetApiWebchatConversationsTokenResponses = {
2956
+ /**
2957
+ * Proxied response from the API conversations-token service
2958
+ */
2959
+ 200: {
2960
+ [key: string]: unknown;
2961
+ };
2962
+ };
2963
+
2964
+ export type GetApiWebchatConversationsTokenResponse =
2965
+ GetApiWebchatConversationsTokenResponses[keyof GetApiWebchatConversationsTokenResponses];
2966
+
2967
+ export type PostApiWebchatConversationsTokenData = {
2968
+ body: {
2969
+ [key: string]: unknown;
2970
+ };
2971
+ path?: never;
2972
+ query?: {
2973
+ /**
2974
+ * Conversation participant identity (required)
2975
+ */
2976
+ identity?: string;
2977
+ };
2978
+ url: '/api/webchat/conversations/token';
2979
+ };
2980
+
2981
+ export type PostApiWebchatConversationsTokenErrors = {
2982
+ /**
2983
+ * Missing identity in request body
2984
+ */
2985
+ 400: ErrorResponse;
2986
+ /**
2987
+ * "proxy_error" if the upstream call fails
2988
+ */
2989
+ 500: ErrorResponse;
2990
+ };
2991
+
2992
+ export type PostApiWebchatConversationsTokenError =
2993
+ PostApiWebchatConversationsTokenErrors[keyof PostApiWebchatConversationsTokenErrors];
2994
+
2995
+ export type PostApiWebchatConversationsTokenResponses = {
2996
+ /**
2997
+ * Proxied response from the API conversations-token service
2998
+ */
2999
+ 200: {
3000
+ [key: string]: unknown;
3001
+ };
3002
+ };
3003
+
3004
+ export type PostApiWebchatConversationsTokenResponse =
3005
+ PostApiWebchatConversationsTokenResponses[keyof PostApiWebchatConversationsTokenResponses];
3006
+
3007
+ export type PostApiWebchatEndChatData = {
3008
+ body: {
3009
+ [key: string]: unknown;
3010
+ };
3011
+ path?: never;
3012
+ query?: never;
3013
+ url: '/api/webchat/end-chat';
3014
+ };
3015
+
3016
+ export type PostApiWebchatEndChatErrors = {
3017
+ /**
3018
+ * Missing customerNumber in request body
3019
+ */
3020
+ 400: ErrorResponse;
3021
+ /**
3022
+ * "proxy_error" if the upstream call fails
3023
+ */
3024
+ 500: ErrorResponse;
3025
+ };
3026
+
3027
+ export type PostApiWebchatEndChatError =
3028
+ PostApiWebchatEndChatErrors[keyof PostApiWebchatEndChatErrors];
3029
+
3030
+ export type PostApiWebchatEndChatResponses = {
3031
+ /**
3032
+ * Proxied response from the agent live-numbers delete service
3033
+ */
3034
+ 200: {
3035
+ [key: string]: unknown;
3036
+ };
3037
+ };
3038
+
3039
+ export type PostApiWebchatEndChatResponse =
3040
+ PostApiWebchatEndChatResponses[keyof PostApiWebchatEndChatResponses];
3041
+
3042
+ export type PostApiWebchatLiveAgentWebchatConnectData = {
3043
+ body: {
3044
+ [key: string]: unknown;
3045
+ };
3046
+ path?: never;
3047
+ query?: never;
3048
+ url: '/api/webchat/live-agent-webchat-connect';
3049
+ };
3050
+
3051
+ export type PostApiWebchatLiveAgentWebchatConnectErrors = {
3052
+ /**
3053
+ * "proxy_error" if the upstream call fails
3054
+ */
3055
+ 500: ErrorResponse;
3056
+ };
3057
+
3058
+ export type PostApiWebchatLiveAgentWebchatConnectError =
3059
+ PostApiWebchatLiveAgentWebchatConnectErrors[keyof PostApiWebchatLiveAgentWebchatConnectErrors];
3060
+
3061
+ export type PostApiWebchatLiveAgentWebchatConnectResponses = {
3062
+ /**
3063
+ * Proxied response from the API live-agent-webchat-connect service
3064
+ */
3065
+ 200: {
3066
+ [key: string]: unknown;
3067
+ };
3068
+ };
3069
+
3070
+ export type PostApiWebchatLiveAgentWebchatConnectResponse =
3071
+ PostApiWebchatLiveAgentWebchatConnectResponses[keyof PostApiWebchatLiveAgentWebchatConnectResponses];
3072
+
3073
+ export type PostApiWebchatLiveAgentWebchatEndData = {
3074
+ body: {
3075
+ [key: string]: unknown;
3076
+ };
3077
+ path?: never;
3078
+ query?: never;
3079
+ url: '/api/webchat/live-agent-webchat-end';
3080
+ };
3081
+
3082
+ export type PostApiWebchatLiveAgentWebchatEndErrors = {
3083
+ /**
3084
+ * "proxy_error" if the upstream call fails
3085
+ */
3086
+ 500: ErrorResponse;
3087
+ };
3088
+
3089
+ export type PostApiWebchatLiveAgentWebchatEndError =
3090
+ PostApiWebchatLiveAgentWebchatEndErrors[keyof PostApiWebchatLiveAgentWebchatEndErrors];
3091
+
3092
+ export type PostApiWebchatLiveAgentWebchatEndResponses = {
3093
+ /**
3094
+ * Proxied response from the API live-agent-webchat-end service
3095
+ */
3096
+ 200: {
3097
+ [key: string]: unknown;
3098
+ };
3099
+ };
3100
+
3101
+ export type PostApiWebchatLiveAgentWebchatEndResponse =
3102
+ PostApiWebchatLiveAgentWebchatEndResponses[keyof PostApiWebchatLiveAgentWebchatEndResponses];
3103
+
3104
+ export type PostApiWebchatUiConfigData = {
3105
+ body: {
3106
+ [key: string]: unknown;
3107
+ };
3108
+ path?: never;
3109
+ query?: never;
3110
+ url: '/api/webchat/ui-config';
3111
+ };
3112
+
3113
+ export type PostApiWebchatUiConfigErrors = {
3114
+ /**
3115
+ * Both or neither of customerNumber/objectID were provided
3116
+ */
3117
+ 400: ErrorResponse;
3118
+ /**
3119
+ * "ui_config_error" if template lookup fails
3120
+ */
3121
+ 500: ErrorResponse;
3122
+ };
3123
+
3124
+ export type PostApiWebchatUiConfigError =
3125
+ PostApiWebchatUiConfigErrors[keyof PostApiWebchatUiConfigErrors];
3126
+
3127
+ export type PostApiWebchatUiConfigResponses = {
3128
+ /**
3129
+ * Success
3130
+ */
3131
+ 200: {
3132
+ /**
3133
+ * Dialog UI customization config from the template (or null)
3134
+ */
3135
+ ui: {
3136
+ [key: string]: unknown;
3137
+ };
3138
+ /**
3139
+ * Dialog link map from the template (or null)
3140
+ */
3141
+ linkMap: {
3142
+ [key: string]: unknown;
3143
+ };
3144
+ /**
3145
+ * Whether the chat link should be hidden (or null)
3146
+ */
3147
+ hideChatLink: boolean;
3148
+ /**
3149
+ * Resolved Algolia objectID for the template (or null)
3150
+ */
3151
+ templateObjectId: string;
3152
+ /**
3153
+ * Default language code for the template, e.g. 'es-ES' (or null)
3154
+ */
3155
+ templateLanguage: string;
3156
+ /**
3157
+ * Representative customer number resolved from objectID lookups (or null)
3158
+ */
3159
+ resolvedCustomerNumber: string;
3160
+ /**
3161
+ * Agent phone number resolved from objectID lookups (or null)
3162
+ */
3163
+ resolvedAgentNumber: string;
3164
+ /**
3165
+ * Template title (or null)
3166
+ */
3167
+ templateTitle: string;
3168
+ /**
3169
+ * Dialog UI customization config from the template (or null)
3170
+ */
3171
+ dialogConfig: {
3172
+ [key: string]: unknown;
3173
+ };
3174
+ /**
3175
+ * Dialog runtime settings (trait mappings, feature flags) (or null)
3176
+ */
3177
+ dialogSettings: {
3178
+ [key: string]: unknown;
3179
+ };
3180
+ };
3181
+ };
3182
+
3183
+ export type PostApiWebchatUiConfigResponse =
3184
+ PostApiWebchatUiConfigResponses[keyof PostApiWebchatUiConfigResponses];
3185
+
3186
+ export type GetApiWebchatVoiceTokenData = {
3187
+ body?: never;
3188
+ path?: never;
3189
+ query?: {
3190
+ /**
3191
+ * Voice grant identity (required)
3192
+ */
3193
+ identity?: string;
3194
+ };
3195
+ url: '/api/webchat/voice-token';
3196
+ };
3197
+
3198
+ export type GetApiWebchatVoiceTokenErrors = {
3199
+ /**
3200
+ * Missing identity query param
3201
+ */
3202
+ 400: ErrorResponse;
3203
+ /**
3204
+ * "proxy_error" if the upstream call fails
3205
+ */
3206
+ 500: ErrorResponse;
3207
+ };
3208
+
3209
+ export type GetApiWebchatVoiceTokenError =
3210
+ GetApiWebchatVoiceTokenErrors[keyof GetApiWebchatVoiceTokenErrors];
3211
+
3212
+ export type GetApiWebchatVoiceTokenResponses = {
3213
+ /**
3214
+ * Proxied response from the API voice-token service
3215
+ */
3216
+ 200: {
3217
+ [key: string]: unknown;
3218
+ };
3219
+ };
3220
+
3221
+ export type GetApiWebchatVoiceTokenResponse =
3222
+ GetApiWebchatVoiceTokenResponses[keyof GetApiWebchatVoiceTokenResponses];
3223
+
3224
+ export type PostApiWebchatWebchatSendData = {
3225
+ body: {
3226
+ [key: string]: unknown;
3227
+ };
3228
+ path?: never;
3229
+ query?: never;
3230
+ url: '/api/webchat/webchat-send';
3231
+ };
3232
+
3233
+ export type PostApiWebchatWebchatSendErrors = {
3234
+ /**
3235
+ * "proxy_error" if the upstream call fails
3236
+ */
3237
+ 500: ErrorResponse;
3238
+ };
3239
+
3240
+ export type PostApiWebchatWebchatSendError =
3241
+ PostApiWebchatWebchatSendErrors[keyof PostApiWebchatWebchatSendErrors];
3242
+
3243
+ export type PostApiWebchatWebchatSendResponses = {
3244
+ /**
3245
+ * Proxied response from the agent chat service
3246
+ */
3247
+ 200: {
3248
+ [key: string]: unknown;
3249
+ };
3250
+ };
3251
+
3252
+ export type PostApiWebchatWebchatSendResponse =
3253
+ PostApiWebchatWebchatSendResponses[keyof PostApiWebchatWebchatSendResponses];