@talqing/sdk 0.5.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,6 +4,41 @@ export type ClientOptions = {
4
4
  baseUrl: `${string}://${string}` | (string & {});
5
5
  };
6
6
 
7
+ /**
8
+ * AddEmailRecipientsRequest
9
+ */
10
+ export type AddEmailRecipientsRequest = {
11
+ /**
12
+ * Recipients
13
+ */
14
+ recipients: Array<EmailRecipientInput>;
15
+ };
16
+
17
+ /**
18
+ * AddEmailRecipientsResponse
19
+ *
20
+ * `standing_send_id` is the send of every row that will mail the new rows
21
+ * without review, or null when they wait for review.
22
+ */
23
+ export type AddEmailRecipientsResponse = {
24
+ /**
25
+ * Added
26
+ */
27
+ added: number;
28
+ /**
29
+ * Skipped
30
+ */
31
+ skipped: Array<SkippedEmailRecipient>;
32
+ /**
33
+ * Standing Send Id
34
+ */
35
+ standing_send_id: string | null;
36
+ /**
37
+ * Total Recipients
38
+ */
39
+ total_recipients: number;
40
+ };
41
+
7
42
  /**
8
43
  * AddMessageConfig
9
44
  */
@@ -44,9 +79,10 @@ export type AddRecipientsRequest = {
44
79
  *
45
80
  * What appending to a batch did.
46
81
  *
47
- * Numbers already in the batch are skipped and reported rather than rejected:
48
- * re-uploading a list the operator re-exported is the normal case, and the
49
- * never-call-twice guarantee doing its job is not a user error.
82
+ * Numbers already in the batch, or repeated in the request, are skipped and
83
+ * reported rather than rejected: re-uploading a list the operator re-exported
84
+ * is the normal case, and the never-call-twice guarantee doing its job is not a
85
+ * user error.
50
86
  */
51
87
  export type AddRecipientsResponse = {
52
88
  /**
@@ -91,6 +127,34 @@ export type AddVoiceResponse = {
91
127
  voice_id: string;
92
128
  };
93
129
 
130
+ /**
131
+ * AddWhatsAppRecipientsRequest
132
+ */
133
+ export type AddWhatsAppRecipientsRequest = {
134
+ /**
135
+ * Recipients
136
+ */
137
+ recipients: Array<WhatsAppRecipientInput>;
138
+ };
139
+
140
+ /**
141
+ * AddWhatsAppRecipientsResponse
142
+ */
143
+ export type AddWhatsAppRecipientsResponse = {
144
+ /**
145
+ * Added
146
+ */
147
+ added: number;
148
+ /**
149
+ * Skipped
150
+ */
151
+ skipped: Array<SkippedWhatsAppRecipient>;
152
+ /**
153
+ * Total Recipients
154
+ */
155
+ total_recipients: number;
156
+ };
157
+
94
158
  /**
95
159
  * AgentConfig
96
160
  *
@@ -1358,7 +1422,7 @@ export type CallDetailResponse = {
1358
1422
  /**
1359
1423
  * Transcript
1360
1424
  */
1361
- transcript: Array<TranscriptItemResponse>;
1425
+ transcript: Array<ConversationItemResponse>;
1362
1426
  usage: UsageResponse;
1363
1427
  /**
1364
1428
  * Vars
@@ -1773,6 +1837,27 @@ export type CatalogResponse = {
1773
1837
  turn_detector_languages: Array<LanguageOption>;
1774
1838
  };
1775
1839
 
1840
+ /**
1841
+ * ChatDetailResponse
1842
+ *
1843
+ * One chat with what explains it: health, priced lines, vars and trace.
1844
+ */
1845
+ export type ChatDetailResponse = {
1846
+ chat: ChatResponse;
1847
+ cost: CostDetailResponse | null;
1848
+ /**
1849
+ * Events
1850
+ */
1851
+ events: Array<SessionEventResponse>;
1852
+ snapshot: HealthSnapshotResponse;
1853
+ /**
1854
+ * Vars
1855
+ */
1856
+ vars: {
1857
+ [key: string]: string;
1858
+ };
1859
+ };
1860
+
1776
1861
  /**
1777
1862
  * ChatMessageRequest
1778
1863
  *
@@ -2083,7 +2168,7 @@ export type ConversationItemResponse = {
2083
2168
  /**
2084
2169
  * Agent Version
2085
2170
  */
2086
- agent_version: number | null;
2171
+ agent_version: number | 'draft' | null;
2087
2172
  /**
2088
2173
  * Attachments
2089
2174
  */
@@ -2113,6 +2198,7 @@ export type ConversationItemResponse = {
2113
2198
  * Id
2114
2199
  */
2115
2200
  id: string;
2201
+ latency: ReplyLatency | null;
2116
2202
  /**
2117
2203
  * Metadata
2118
2204
  */
@@ -2120,6 +2206,10 @@ export type ConversationItemResponse = {
2120
2206
  [key: string]: unknown;
2121
2207
  };
2122
2208
  metrics: TurnMetrics | null;
2209
+ /**
2210
+ * Origin
2211
+ */
2212
+ origin: 'speech' | 'typed' | 'keypad' | null;
2123
2213
  /**
2124
2214
  * Provider Message Id
2125
2215
  */
@@ -2281,14 +2371,16 @@ export type ConversationResponse = {
2281
2371
  * One agent execution within a conversation: a call, or a chat.
2282
2372
  */
2283
2373
  export type ConversationSessionResponse = {
2374
+ agent: AgentMetadata;
2284
2375
  /**
2285
- * Agent Id
2376
+ * Agent Version
2286
2377
  */
2287
- agent_id: string | null;
2378
+ agent_version: number | 'draft' | null;
2288
2379
  /**
2289
2380
  * Agent Version Id
2290
2381
  */
2291
2382
  agent_version_id: string | null;
2383
+ analysis: AnalysisResponse;
2292
2384
  /**
2293
2385
  * Channel
2294
2386
  */
@@ -2297,6 +2389,10 @@ export type ConversationSessionResponse = {
2297
2389
  * Close Reason
2298
2390
  */
2299
2391
  close_reason: string | null;
2392
+ /**
2393
+ * Close Reason Label
2394
+ */
2395
+ close_reason_label: string | null;
2300
2396
  /**
2301
2397
  * Conversation Id
2302
2398
  */
@@ -2305,11 +2401,15 @@ export type ConversationSessionResponse = {
2305
2401
  * Conversation Ref Id
2306
2402
  */
2307
2403
  conversation_ref_id: string | null;
2308
- cost: SessionCostResponse | null;
2404
+ cost: CostResponse | null;
2309
2405
  /**
2310
2406
  * Created At
2311
2407
  */
2312
2408
  created_at: string;
2409
+ /**
2410
+ * Duration S
2411
+ */
2412
+ duration_s: number | null;
2313
2413
  /**
2314
2414
  * Ended At
2315
2415
  */
@@ -2324,18 +2424,6 @@ export type ConversationSessionResponse = {
2324
2424
  */
2325
2425
  integration_id: string | null;
2326
2426
  metrics: SessionMetrics;
2327
- /**
2328
- * Outcome
2329
- */
2330
- outcome: 'success' | 'failure' | 'unknown' | null;
2331
- /**
2332
- * Output Item Ids
2333
- */
2334
- output_item_ids: Array<string>;
2335
- /**
2336
- * Session Id
2337
- */
2338
- session_id: string | null;
2339
2427
  /**
2340
2428
  * Started At
2341
2429
  */
@@ -2344,18 +2432,10 @@ export type ConversationSessionResponse = {
2344
2432
  * Status
2345
2433
  */
2346
2434
  status: string;
2347
- /**
2348
- * Summary
2349
- */
2350
- summary: string | null;
2351
2435
  /**
2352
2436
  * Trigger Id
2353
2437
  */
2354
2438
  trigger_id: string | null;
2355
- /**
2356
- * Trigger Item Ids
2357
- */
2358
- trigger_item_ids: Array<string>;
2359
2439
  /**
2360
2440
  * Type
2361
2441
  */
@@ -2443,6 +2523,48 @@ export type ConversationSpecOverride = {
2443
2523
  summary_limit?: number | null;
2444
2524
  };
2445
2525
 
2526
+ /**
2527
+ * ConversationTraceEventResponse
2528
+ *
2529
+ * One trace row of a conversation, and the session it belongs to.
2530
+ */
2531
+ export type ConversationTraceEventResponse = {
2532
+ /**
2533
+ * Created At
2534
+ */
2535
+ created_at: string;
2536
+ /**
2537
+ * Payload
2538
+ */
2539
+ payload: {
2540
+ [key: string]: unknown;
2541
+ };
2542
+ /**
2543
+ * Seq
2544
+ */
2545
+ seq: number;
2546
+ /**
2547
+ * Session Id
2548
+ */
2549
+ session_id: string;
2550
+ /**
2551
+ * Type
2552
+ */
2553
+ type: string;
2554
+ };
2555
+
2556
+ /**
2557
+ * ConversationTraceResponse
2558
+ *
2559
+ * A conversation's trace over one window, oldest first.
2560
+ */
2561
+ export type ConversationTraceResponse = {
2562
+ /**
2563
+ * Events
2564
+ */
2565
+ events: Array<ConversationTraceEventResponse>;
2566
+ };
2567
+
2446
2568
  /**
2447
2569
  * CopilotFunctionCallItem
2448
2570
  *
@@ -4389,6 +4511,22 @@ export type HandoffTarget = {
4389
4511
  summary_prompt?: string | null;
4390
4512
  };
4391
4513
 
4514
+ /**
4515
+ * HealthIssue
4516
+ *
4517
+ * One problem found, and what kind it is.
4518
+ */
4519
+ export type HealthIssue = {
4520
+ /**
4521
+ * Kind
4522
+ */
4523
+ kind: 'failed' | 'never_ready' | 'provider_errors' | 'provider_failover' | 'tool_failures' | 'tools_unfinished' | 'slow_tools' | 'slow_responses' | 'slow_after_filler' | 'connection' | 'noise_cancellation' | 'unpriceable';
4524
+ /**
4525
+ * Message
4526
+ */
4527
+ message: string;
4528
+ };
4529
+
4392
4530
  /**
4393
4531
  * HealthResponse
4394
4532
  *
@@ -4438,10 +4576,6 @@ export type HealthSnapshotResponse = {
4438
4576
  * Duration Seconds
4439
4577
  */
4440
4578
  duration_seconds: number | null;
4441
- /**
4442
- * End Of Turn Avg Ms
4443
- */
4444
- end_of_turn_avg_ms: number | null;
4445
4579
  /**
4446
4580
  * Errors
4447
4581
  */
@@ -4465,7 +4599,7 @@ export type HealthSnapshotResponse = {
4465
4599
  /**
4466
4600
  * Issues
4467
4601
  */
4468
- issues: Array<string>;
4602
+ issues: Array<HealthIssue>;
4469
4603
  /**
4470
4604
  * Noise Cancellation Failed
4471
4605
  */
@@ -4492,6 +4626,14 @@ export type HealthSnapshotResponse = {
4492
4626
  */
4493
4627
  providers: Array<string>;
4494
4628
  response_latency: LatencyStats;
4629
+ /**
4630
+ * Response Stages
4631
+ */
4632
+ response_stages: Array<LatencyStage>;
4633
+ /**
4634
+ * Slow Replies After Filler
4635
+ */
4636
+ slow_replies_after_filler: number;
4495
4637
  /**
4496
4638
  * Slow Response Threshold Ms
4497
4639
  */
@@ -4528,18 +4670,6 @@ export type HealthSnapshotResponse = {
4528
4670
  * Total Cost Usd
4529
4671
  */
4530
4672
  total_cost_usd: number | null;
4531
- /**
4532
- * Transcription Avg Ms
4533
- */
4534
- transcription_avg_ms: number | null;
4535
- /**
4536
- * Ttfb Avg Ms
4537
- */
4538
- ttfb_avg_ms: number | null;
4539
- /**
4540
- * Ttft Avg Ms
4541
- */
4542
- ttft_avg_ms: number | null;
4543
4673
  /**
4544
4674
  * Tts Audio Ms
4545
4675
  */
@@ -5236,7 +5366,7 @@ export type ItemCreatedEvent = {
5236
5366
  /**
5237
5367
  * Agent Version
5238
5368
  */
5239
- agent_version: number | null;
5369
+ agent_version: number | 'draft' | null;
5240
5370
  /**
5241
5371
  * Attachments
5242
5372
  */
@@ -5270,6 +5400,7 @@ export type ItemCreatedEvent = {
5270
5400
  * Id
5271
5401
  */
5272
5402
  id: string;
5403
+ latency: ReplyLatency | null;
5273
5404
  /**
5274
5405
  * Metadata
5275
5406
  */
@@ -5277,6 +5408,10 @@ export type ItemCreatedEvent = {
5277
5408
  [key: string]: unknown;
5278
5409
  };
5279
5410
  metrics: TurnMetrics | null;
5411
+ /**
5412
+ * Origin
5413
+ */
5414
+ origin: 'speech' | 'typed' | 'keypad' | null;
5280
5415
  /**
5281
5416
  * Provider Message Id
5282
5417
  */
@@ -6124,6 +6259,26 @@ export type LanguageOption = {
6124
6259
  name: string;
6125
6260
  };
6126
6261
 
6262
+ /**
6263
+ * LatencyStage
6264
+ *
6265
+ * One leg of a wait: what the time went on.
6266
+ */
6267
+ export type LatencyStage = {
6268
+ /**
6269
+ * Kind
6270
+ */
6271
+ kind: 'stt' | 'endpoint' | 'hook' | 'llm_step' | 'tool' | 'llm' | 'tts' | 'other';
6272
+ /**
6273
+ * Label
6274
+ */
6275
+ label: string;
6276
+ /**
6277
+ * Ms
6278
+ */
6279
+ ms: number;
6280
+ };
6281
+
6127
6282
  /**
6128
6283
  * LatencyStats
6129
6284
  */
@@ -7756,7 +7911,7 @@ export type PageWhatsAppRecipientResponse = {
7756
7911
  /**
7757
7912
  * PatchCallBatchRequest
7758
7913
  *
7759
- * Policy edits, allowed while a batch is `scheduled`, `running` or `paused`.
7914
+ * Policy edits, allowed while a batch is `scheduled`, `running`, `paused` or `completed`.
7760
7915
  *
7761
7916
  * ``calling_window`` and ``start_at`` accept an explicit ``null`` to *clear*
7762
7917
  * them — "dial at any hour", "start on the next pass" — which is why the
@@ -9314,6 +9469,26 @@ export type RemoteNumber = {
9314
9469
  provider_number_id?: string | null;
9315
9470
  };
9316
9471
 
9472
+ /**
9473
+ * ReplyLatency
9474
+ *
9475
+ * How long the caller waited for this reply, in the order it was spent.
9476
+ */
9477
+ export type ReplyLatency = {
9478
+ /**
9479
+ * Kind
9480
+ */
9481
+ kind: 'response' | 'reply' | 'after_filler';
9482
+ /**
9483
+ * Stages
9484
+ */
9485
+ stages: Array<LatencyStage>;
9486
+ /**
9487
+ * Total Ms
9488
+ */
9489
+ total_ms: number;
9490
+ };
9491
+
9317
9492
  /**
9318
9493
  * RunStepResponse
9319
9494
  *
@@ -9899,30 +10074,6 @@ export type SendWhatsAppBatchRequest = {
9899
10074
  window?: TimeWindow | null;
9900
10075
  };
9901
10076
 
9902
- /**
9903
- * SessionCostResponse
9904
- *
9905
- * Priced money columns for one session. Absent when billing has not run.
9906
- */
9907
- export type SessionCostResponse = {
9908
- /**
9909
- * Duration S
9910
- */
9911
- duration_s?: number | null;
9912
- /**
9913
- * Platform Fee
9914
- */
9915
- platform_fee: number;
9916
- /**
9917
- * Provider Cost
9918
- */
9919
- provider_cost: number;
9920
- /**
9921
- * Total Charge
9922
- */
9923
- total_charge: number;
9924
- };
9925
-
9926
10077
  /**
9927
10078
  * SessionError
9928
10079
  *
@@ -9975,6 +10126,7 @@ export type SessionEventResponse = {
9975
10126
  * Latency averages are milliseconds over every message that reported the
9976
10127
  * metric (same rule as call detail / workspace observability). Turn-level
9977
10128
  * samples live on conversation_items.metrics for workspace daily aggregates.
10129
+ * On a chat, `e2e_latency` is a message arriving → the first token back.
9978
10130
  */
9979
10131
  export type SessionMetrics = {
9980
10132
  /**
@@ -10130,6 +10282,27 @@ export type SilenceSpecOverride = {
10130
10282
  timeout?: number | null;
10131
10283
  };
10132
10284
 
10285
+ /**
10286
+ * SkippedEmailRecipient
10287
+ *
10288
+ * A row of the request that will not be drafted. `row_number` is its 1-based
10289
+ * position in the request; `recipient_id` is null when it was not stored.
10290
+ */
10291
+ export type SkippedEmailRecipient = {
10292
+ /**
10293
+ * Reason
10294
+ */
10295
+ reason: string;
10296
+ /**
10297
+ * Recipient Id
10298
+ */
10299
+ recipient_id: string | null;
10300
+ /**
10301
+ * Row Number
10302
+ */
10303
+ row_number: number;
10304
+ };
10305
+
10133
10306
  /**
10134
10307
  * SkippedRecipient
10135
10308
  */
@@ -10148,6 +10321,27 @@ export type SkippedRecipient = {
10148
10321
  to: string;
10149
10322
  };
10150
10323
 
10324
+ /**
10325
+ * SkippedWhatsAppRecipient
10326
+ *
10327
+ * A row of the request that will not be sent. `row_number` is its 1-based
10328
+ * position in the request; `recipient_id` is null when it was not stored.
10329
+ */
10330
+ export type SkippedWhatsAppRecipient = {
10331
+ /**
10332
+ * Reason
10333
+ */
10334
+ reason: string;
10335
+ /**
10336
+ * Recipient Id
10337
+ */
10338
+ recipient_id: string | null;
10339
+ /**
10340
+ * Row Number
10341
+ */
10342
+ row_number: number;
10343
+ };
10344
+
10151
10345
  /**
10152
10346
  * StoredAgentPlan
10153
10347
  *
@@ -11639,67 +11833,21 @@ export type TraceStepResponse = {
11639
11833
  };
11640
11834
 
11641
11835
  /**
11642
- * TranscriptItemResponse
11836
+ * TransferConfig
11643
11837
  */
11644
- export type TranscriptItemResponse = {
11838
+ export type TransferConfig = {
11645
11839
  /**
11646
- * Agent Id
11840
+ * Destination
11841
+ *
11842
+ * A literal phone number in full international format, e.g. +14155550101.
11647
11843
  */
11648
- agent_id: string | null;
11844
+ destination: string;
11649
11845
  /**
11650
- * Agent Version
11846
+ * Mode
11651
11847
  */
11652
- agent_version: number | 'draft' | null;
11848
+ mode?: 'cold' | 'warm';
11653
11849
  /**
11654
- * Attachments
11655
- */
11656
- attachments: Array<ConversationAttachment>;
11657
- /**
11658
- * Data
11659
- */
11660
- data: {
11661
- [key: string]: unknown;
11662
- } | null;
11663
- /**
11664
- * Id
11665
- */
11666
- id: string;
11667
- /**
11668
- * Item Id
11669
- */
11670
- item_id: string;
11671
- /**
11672
- * Metrics
11673
- */
11674
- metrics: {
11675
- [key: string]: unknown;
11676
- } | null;
11677
- /**
11678
- * Timestamp
11679
- */
11680
- timestamp: string;
11681
- /**
11682
- * Type
11683
- */
11684
- type: 'message' | 'function_call' | 'function_call_output' | 'agent_handoff' | 'agent_config_update';
11685
- };
11686
-
11687
- /**
11688
- * TransferConfig
11689
- */
11690
- export type TransferConfig = {
11691
- /**
11692
- * Destination
11693
- *
11694
- * A literal phone number in full international format, e.g. +14155550101.
11695
- */
11696
- destination: string;
11697
- /**
11698
- * Mode
11699
- */
11700
- mode?: 'cold' | 'warm';
11701
- /**
11702
- * On Failure
11850
+ * On Failure
11703
11851
  */
11704
11852
  on_failure?: 'continue' | 'end_call';
11705
11853
  /**
@@ -15113,6 +15261,156 @@ export type ChatsGetResults = {
15113
15261
 
15114
15262
  export type ChatsGetResult = ChatsGetResults[keyof ChatsGetResults];
15115
15263
 
15264
+ export type ChatsAnalysisRerunData = {
15265
+ body?: never;
15266
+ path: {
15267
+ /**
15268
+ * Chat Id
15269
+ */
15270
+ chat_id: string;
15271
+ };
15272
+ query?: never;
15273
+ url: '/v1/chats/{chat_id}/analysis';
15274
+ };
15275
+
15276
+ export type ChatsAnalysisRerunErrors = {
15277
+ /**
15278
+ * Well-formed, but rejected by a rule; `detail.errors` lists each problem.
15279
+ */
15280
+ 400: ErrorResponse;
15281
+ /**
15282
+ * Missing credential, or one that is revoked or no longer a member of this organization.
15283
+ */
15284
+ 401: ErrorResponse;
15285
+ /**
15286
+ * Authenticated, but this organization role may not perform the operation.
15287
+ */
15288
+ 403: ErrorResponse;
15289
+ /**
15290
+ * No such resource in this organization.
15291
+ */
15292
+ 404: ErrorResponse;
15293
+ /**
15294
+ * The resource's current state forbids this — a name already taken, a job already running.
15295
+ */
15296
+ 409: ErrorResponse;
15297
+ /**
15298
+ * The request did not match this operation's schema; `detail.errors` lists each field.
15299
+ */
15300
+ 422: ErrorResponse;
15301
+ /**
15302
+ * Unexpected error. Every error this API returns carries this body.
15303
+ */
15304
+ default: ErrorResponse;
15305
+ };
15306
+
15307
+ export type ChatsAnalysisRerunError = ChatsAnalysisRerunErrors[keyof ChatsAnalysisRerunErrors];
15308
+
15309
+ export type ChatsAnalysisRerunResults = {
15310
+ /**
15311
+ * Successful Response
15312
+ */
15313
+ 200: ChatResponse;
15314
+ };
15315
+
15316
+ export type ChatsAnalysisRerunResult = ChatsAnalysisRerunResults[keyof ChatsAnalysisRerunResults];
15317
+
15318
+ export type ChatsAnalysisPreviewData = {
15319
+ body: PreviewAnalysisRequest;
15320
+ path: {
15321
+ /**
15322
+ * Chat Id
15323
+ */
15324
+ chat_id: string;
15325
+ };
15326
+ query?: never;
15327
+ url: '/v1/chats/{chat_id}/analysis/preview';
15328
+ };
15329
+
15330
+ export type ChatsAnalysisPreviewErrors = {
15331
+ /**
15332
+ * Well-formed, but rejected by a rule; `detail.errors` lists each problem.
15333
+ */
15334
+ 400: ErrorResponse;
15335
+ /**
15336
+ * Missing credential, or one that is revoked or no longer a member of this organization.
15337
+ */
15338
+ 401: ErrorResponse;
15339
+ /**
15340
+ * Authenticated, but this organization role may not perform the operation.
15341
+ */
15342
+ 403: ErrorResponse;
15343
+ /**
15344
+ * No such resource in this organization.
15345
+ */
15346
+ 404: ErrorResponse;
15347
+ /**
15348
+ * The resource's current state forbids this — a name already taken, a job already running.
15349
+ */
15350
+ 409: ErrorResponse;
15351
+ /**
15352
+ * The request did not match this operation's schema; `detail.errors` lists each field.
15353
+ */
15354
+ 422: ErrorResponse;
15355
+ /**
15356
+ * Unexpected error. Every error this API returns carries this body.
15357
+ */
15358
+ default: ErrorResponse;
15359
+ };
15360
+
15361
+ export type ChatsAnalysisPreviewError = ChatsAnalysisPreviewErrors[keyof ChatsAnalysisPreviewErrors];
15362
+
15363
+ export type ChatsAnalysisPreviewResults = {
15364
+ /**
15365
+ * Successful Response
15366
+ */
15367
+ 200: PreviewAnalysisResponse;
15368
+ };
15369
+
15370
+ export type ChatsAnalysisPreviewResult = ChatsAnalysisPreviewResults[keyof ChatsAnalysisPreviewResults];
15371
+
15372
+ export type ChatsDetailData = {
15373
+ body?: never;
15374
+ path: {
15375
+ /**
15376
+ * Chat Id
15377
+ */
15378
+ chat_id: string;
15379
+ };
15380
+ query?: never;
15381
+ url: '/v1/chats/{chat_id}/detail';
15382
+ };
15383
+
15384
+ export type ChatsDetailErrors = {
15385
+ /**
15386
+ * Missing credential, or one that is revoked or no longer a member of this organization.
15387
+ */
15388
+ 401: ErrorResponse;
15389
+ /**
15390
+ * No such resource in this organization.
15391
+ */
15392
+ 404: ErrorResponse;
15393
+ /**
15394
+ * The request did not match this operation's schema; `detail.errors` lists each field.
15395
+ */
15396
+ 422: ErrorResponse;
15397
+ /**
15398
+ * Unexpected error. Every error this API returns carries this body.
15399
+ */
15400
+ default: ErrorResponse;
15401
+ };
15402
+
15403
+ export type ChatsDetailError = ChatsDetailErrors[keyof ChatsDetailErrors];
15404
+
15405
+ export type ChatsDetailResults = {
15406
+ /**
15407
+ * Successful Response
15408
+ */
15409
+ 200: ChatDetailResponse;
15410
+ };
15411
+
15412
+ export type ChatsDetailResult = ChatsDetailResults[keyof ChatsDetailResults];
15413
+
15116
15414
  export type ChatsEndData = {
15117
15415
  body?: never;
15118
15416
  path: {
@@ -15696,6 +15994,61 @@ export type ConversationsSnapshotResults = {
15696
15994
 
15697
15995
  export type ConversationsSnapshotResult = ConversationsSnapshotResults[keyof ConversationsSnapshotResults];
15698
15996
 
15997
+ export type ConversationsTraceData = {
15998
+ body?: never;
15999
+ path: {
16000
+ /**
16001
+ * Conversation Id
16002
+ */
16003
+ conversation_id: string;
16004
+ };
16005
+ query?: {
16006
+ /**
16007
+ * After
16008
+ *
16009
+ * Only events at or after this.
16010
+ */
16011
+ after?: string | null;
16012
+ /**
16013
+ * Before
16014
+ *
16015
+ * Only events before this.
16016
+ */
16017
+ before?: string | null;
16018
+ };
16019
+ url: '/v1/conversations/{conversation_id}/trace';
16020
+ };
16021
+
16022
+ export type ConversationsTraceErrors = {
16023
+ /**
16024
+ * Missing credential, or one that is revoked or no longer a member of this organization.
16025
+ */
16026
+ 401: ErrorResponse;
16027
+ /**
16028
+ * No such resource in this organization.
16029
+ */
16030
+ 404: ErrorResponse;
16031
+ /**
16032
+ * The request did not match this operation's schema; `detail.errors` lists each field.
16033
+ */
16034
+ 422: ErrorResponse;
16035
+ /**
16036
+ * Unexpected error. Every error this API returns carries this body.
16037
+ */
16038
+ default: ErrorResponse;
16039
+ };
16040
+
16041
+ export type ConversationsTraceError = ConversationsTraceErrors[keyof ConversationsTraceErrors];
16042
+
16043
+ export type ConversationsTraceResults = {
16044
+ /**
16045
+ * Successful Response
16046
+ */
16047
+ 200: ConversationTraceResponse;
16048
+ };
16049
+
16050
+ export type ConversationsTraceResult = ConversationsTraceResults[keyof ConversationsTraceResults];
16051
+
15699
16052
  export type CopilotAgentsSendData = {
15700
16053
  body: SendMessageRequest;
15701
16054
  path: {
@@ -16516,6 +16869,60 @@ export type EmailBatchesRecipientsListResults = {
16516
16869
 
16517
16870
  export type EmailBatchesRecipientsListResult = EmailBatchesRecipientsListResults[keyof EmailBatchesRecipientsListResults];
16518
16871
 
16872
+ export type EmailBatchesRecipientsAddData = {
16873
+ body: AddEmailRecipientsRequest;
16874
+ path: {
16875
+ /**
16876
+ * Batch Id
16877
+ */
16878
+ batch_id: string;
16879
+ };
16880
+ query?: never;
16881
+ url: '/v1/email/batches/{batch_id}/recipients';
16882
+ };
16883
+
16884
+ export type EmailBatchesRecipientsAddErrors = {
16885
+ /**
16886
+ * Well-formed, but rejected by a rule; `detail.errors` lists each problem.
16887
+ */
16888
+ 400: ErrorResponse;
16889
+ /**
16890
+ * Missing credential, or one that is revoked or no longer a member of this organization.
16891
+ */
16892
+ 401: ErrorResponse;
16893
+ /**
16894
+ * Authenticated, but this organization role may not perform the operation.
16895
+ */
16896
+ 403: ErrorResponse;
16897
+ /**
16898
+ * No such resource in this organization.
16899
+ */
16900
+ 404: ErrorResponse;
16901
+ /**
16902
+ * The resource's current state forbids this — a name already taken, a job already running.
16903
+ */
16904
+ 409: ErrorResponse;
16905
+ /**
16906
+ * The request did not match this operation's schema; `detail.errors` lists each field.
16907
+ */
16908
+ 422: ErrorResponse;
16909
+ /**
16910
+ * Unexpected error. Every error this API returns carries this body.
16911
+ */
16912
+ default: ErrorResponse;
16913
+ };
16914
+
16915
+ export type EmailBatchesRecipientsAddError = EmailBatchesRecipientsAddErrors[keyof EmailBatchesRecipientsAddErrors];
16916
+
16917
+ export type EmailBatchesRecipientsAddResults = {
16918
+ /**
16919
+ * Successful Response
16920
+ */
16921
+ 200: AddEmailRecipientsResponse;
16922
+ };
16923
+
16924
+ export type EmailBatchesRecipientsAddResult = EmailBatchesRecipientsAddResults[keyof EmailBatchesRecipientsAddResults];
16925
+
16519
16926
  export type EmailBatchesRecipientsUpdateData = {
16520
16927
  body: PatchEmailRecipientRequest;
16521
16928
  path: {
@@ -21482,6 +21889,60 @@ export type WhatsappBatchesRecipientsListResults = {
21482
21889
 
21483
21890
  export type WhatsappBatchesRecipientsListResult = WhatsappBatchesRecipientsListResults[keyof WhatsappBatchesRecipientsListResults];
21484
21891
 
21892
+ export type WhatsappBatchesRecipientsAddData = {
21893
+ body: AddWhatsAppRecipientsRequest;
21894
+ path: {
21895
+ /**
21896
+ * Batch Id
21897
+ */
21898
+ batch_id: string;
21899
+ };
21900
+ query?: never;
21901
+ url: '/v1/whatsapp/batches/{batch_id}/recipients';
21902
+ };
21903
+
21904
+ export type WhatsappBatchesRecipientsAddErrors = {
21905
+ /**
21906
+ * Well-formed, but rejected by a rule; `detail.errors` lists each problem.
21907
+ */
21908
+ 400: ErrorResponse;
21909
+ /**
21910
+ * Missing credential, or one that is revoked or no longer a member of this organization.
21911
+ */
21912
+ 401: ErrorResponse;
21913
+ /**
21914
+ * Authenticated, but this organization role may not perform the operation.
21915
+ */
21916
+ 403: ErrorResponse;
21917
+ /**
21918
+ * No such resource in this organization.
21919
+ */
21920
+ 404: ErrorResponse;
21921
+ /**
21922
+ * The resource's current state forbids this — a name already taken, a job already running.
21923
+ */
21924
+ 409: ErrorResponse;
21925
+ /**
21926
+ * The request did not match this operation's schema; `detail.errors` lists each field.
21927
+ */
21928
+ 422: ErrorResponse;
21929
+ /**
21930
+ * Unexpected error. Every error this API returns carries this body.
21931
+ */
21932
+ default: ErrorResponse;
21933
+ };
21934
+
21935
+ export type WhatsappBatchesRecipientsAddError = WhatsappBatchesRecipientsAddErrors[keyof WhatsappBatchesRecipientsAddErrors];
21936
+
21937
+ export type WhatsappBatchesRecipientsAddResults = {
21938
+ /**
21939
+ * Successful Response
21940
+ */
21941
+ 200: AddWhatsAppRecipientsResponse;
21942
+ };
21943
+
21944
+ export type WhatsappBatchesRecipientsAddResult = WhatsappBatchesRecipientsAddResults[keyof WhatsappBatchesRecipientsAddResults];
21945
+
21485
21946
  export type WhatsappBatchesRecipientsRestoreData = {
21486
21947
  body: SelectRecipientsRequest;
21487
21948
  path: {