@talqing/sdk 0.11.0 → 0.13.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.
@@ -195,7 +195,7 @@ export type AgentConfig = {
195
195
  /**
196
196
  * Greeting
197
197
  *
198
- * The opening line, spoken on connect and on the way in from a handoff; empty or null makes the agent wait for the caller to speak first. Voice and video only. Supports the same substitutions as the prompt, plus `{{consent.notice}}`, the recording disclosure's place in the line.
198
+ * The opening line, spoken on connect and on the way in from a handoff; empty or null makes the agent wait for the caller to speak first. Voice and video only. Supports the same substitutions as the prompt, plus `{{recording.notice}}`, the recording notice's place in the line.
199
199
  */
200
200
  greeting?: string | null;
201
201
  /**
@@ -210,6 +210,12 @@ export type AgentConfig = {
210
210
  * Where this agent may hand the conversation next. Each entry becomes one tool the model can call, so routing quality lives in its `description`. A target is a stored agent (`agent_id`) or a member of the team defined on the call.
211
211
  */
212
212
  handoffs?: Array<HandoffTarget>;
213
+ /**
214
+ * Inbound Webhook
215
+ *
216
+ * Before an inbound call or channel chat starts, ask the workspace's inbound webhook for its vars, secrets, overrides, metadata and userdata. Refused if it does not answer.
217
+ */
218
+ inbound_webhook?: boolean;
213
219
  keypad_input?: KeypadInputSpec;
214
220
  /**
215
221
  * Language
@@ -333,7 +339,7 @@ export type AgentOverride = {
333
339
  /**
334
340
  * Greeting
335
341
  *
336
- * The opening line, spoken on connect and on the way in from a handoff; empty or null makes the agent wait for the caller to speak first. Voice and video only. Supports the same substitutions as the prompt, plus `{{consent.notice}}`, the recording disclosure's place in the line.
342
+ * The opening line, spoken on connect and on the way in from a handoff; empty or null makes the agent wait for the caller to speak first. Voice and video only. Supports the same substitutions as the prompt, plus `{{recording.notice}}`, the recording notice's place in the line.
337
343
  */
338
344
  greeting?: string | null;
339
345
  /**
@@ -348,6 +354,12 @@ export type AgentOverride = {
348
354
  * Where this agent may hand the conversation next. Each entry becomes one tool the model can call, so routing quality lives in its `description`. A target is a stored agent (`agent_id`) or a member of the team defined on the call.
349
355
  */
350
356
  handoffs?: Array<HandoffTarget> | null;
357
+ /**
358
+ * Inbound Webhook
359
+ *
360
+ * Before an inbound call or channel chat starts, ask the workspace's inbound webhook for its vars, secrets, overrides, metadata and userdata. Refused if it does not answer.
361
+ */
362
+ inbound_webhook?: boolean | null;
351
363
  keypad_input?: KeypadInputSpecOverride | null;
352
364
  /**
353
365
  * Language
@@ -1215,6 +1227,20 @@ export type BuiltinToolSpec = {
1215
1227
  type: string;
1216
1228
  };
1217
1229
 
1230
+ /**
1231
+ * ButtonTap
1232
+ */
1233
+ export type ButtonTap = {
1234
+ /**
1235
+ * Payload
1236
+ */
1237
+ payload?: string | null;
1238
+ /**
1239
+ * Text
1240
+ */
1241
+ text: string;
1242
+ };
1243
+
1218
1244
  /**
1219
1245
  * CallBatchCounts
1220
1246
  */
@@ -1549,6 +1575,14 @@ export type CallSessionResponse = {
1549
1575
  * Livekit Room
1550
1576
  */
1551
1577
  livekit_room: string | null;
1578
+ /**
1579
+ * Metadata
1580
+ *
1581
+ * Your own labels for this session, set by your inbound webhook.
1582
+ */
1583
+ metadata: {
1584
+ [key: string]: string;
1585
+ };
1552
1586
  /**
1553
1587
  * Phone Number Id
1554
1588
  */
@@ -1687,6 +1721,14 @@ export type CallSummaryResponse = {
1687
1721
  * Message Count
1688
1722
  */
1689
1723
  message_count?: number;
1724
+ /**
1725
+ * Metadata
1726
+ *
1727
+ * Your own labels for this session, set by your inbound webhook.
1728
+ */
1729
+ metadata: {
1730
+ [key: string]: string;
1731
+ };
1690
1732
  /**
1691
1733
  * Outcome
1692
1734
  */
@@ -1951,6 +1993,14 @@ export type ChatResponse = {
1951
1993
  * Id
1952
1994
  */
1953
1995
  id: string;
1996
+ /**
1997
+ * Metadata
1998
+ *
1999
+ * Your own labels for this session, set by your inbound webhook.
2000
+ */
2001
+ metadata: {
2002
+ [key: string]: string;
2003
+ };
1954
2004
  /**
1955
2005
  * Started At
1956
2006
  */
@@ -2209,10 +2259,24 @@ export type ConversationItemResponse = {
2209
2259
  * Attachments
2210
2260
  */
2211
2261
  attachments: Array<ConversationAttachment>;
2262
+ /**
2263
+ * Who at your business posted this.
2264
+ */
2265
+ author: ItemAuthor | null;
2266
+ /**
2267
+ * Channel
2268
+ *
2269
+ * How this item reached us or the person; null for notes and instructions.
2270
+ */
2271
+ channel: 'phone_call' | 'whatsapp_call' | 'whatsapp_message' | 'web_call' | 'chat' | 'telegram' | 'stream' | 'copilot' | null;
2212
2272
  /**
2213
2273
  * Client Message Id
2214
2274
  */
2215
2275
  client_message_id: string | null;
2276
+ /**
2277
+ * What the person sent besides text; null for plain text.
2278
+ */
2279
+ content: InboundContent | null;
2216
2280
  /**
2217
2281
  * Conversation Id
2218
2282
  */
@@ -2225,7 +2289,7 @@ export type ConversationItemResponse = {
2225
2289
  /**
2226
2290
  * Delivery Status
2227
2291
  */
2228
- delivery_status: 'not_applicable' | 'pending' | 'sending' | 'sent' | 'failed' | 'skipped';
2292
+ delivery_status: 'not_applicable' | 'pending' | 'held' | 'sending' | 'queued' | 'sent' | 'delivered' | 'read' | 'undelivered' | 'failed' | 'skipped' | 'expired';
2229
2293
  /**
2230
2294
  * Direction
2231
2295
  */
@@ -2238,6 +2302,16 @@ export type ConversationItemResponse = {
2238
2302
  * Id
2239
2303
  */
2240
2304
  id: string;
2305
+ /**
2306
+ * Idempotency Key
2307
+ */
2308
+ idempotency_key: string | null;
2309
+ /**
2310
+ * Images Not Kept
2311
+ *
2312
+ * Images the person sent that were not stored, and why.
2313
+ */
2314
+ images_not_kept: Array<ImageNotKept>;
2241
2315
  latency: ReplyLatency | null;
2242
2316
  /**
2243
2317
  * Metadata
@@ -2250,6 +2324,12 @@ export type ConversationItemResponse = {
2250
2324
  * Origin
2251
2325
  */
2252
2326
  origin: 'speech' | 'typed' | 'keypad' | null;
2327
+ /**
2328
+ * Post Type
2329
+ *
2330
+ * What was posted through the API; null for everything else.
2331
+ */
2332
+ post_type: 'template' | 'agent_text' | 'note' | 'instruction' | null;
2253
2333
  /**
2254
2334
  * Provider Message Id
2255
2335
  */
@@ -2272,10 +2352,6 @@ export type ConversationItemResponse = {
2272
2352
  * Session Id
2273
2353
  */
2274
2354
  session_id: string | null;
2275
- /**
2276
- * Source
2277
- */
2278
- source: string | null;
2279
2355
  /**
2280
2356
  * Text
2281
2357
  */
@@ -2312,32 +2388,46 @@ export type ConversationItemResponse = {
2312
2388
  * The contact this conversation belongs to: key, binding, and what we know.
2313
2389
  */
2314
2390
  export type ConversationRefSummary = {
2315
- /**
2316
- * Bind Id
2317
- */
2318
- bind_id?: string | null;
2319
2391
  /**
2320
2392
  * Contact Key
2321
2393
  */
2322
- contact_key?: string | null;
2394
+ contact_key: string;
2323
2395
  /**
2324
2396
  * Display Name
2325
2397
  */
2326
- display_name?: string | null;
2398
+ display_name: string | null;
2327
2399
  /**
2328
2400
  * Integration Id
2329
2401
  */
2330
- integration_id?: string | null;
2402
+ integration_id: string | null;
2331
2403
  /**
2332
2404
  * Kind
2333
2405
  */
2334
- kind?: string | null;
2406
+ kind: 'phone' | 'integration' | 'stream' | 'web';
2335
2407
  /**
2336
2408
  * Metadata
2337
2409
  */
2338
- metadata?: {
2410
+ metadata: {
2339
2411
  [key: string]: unknown;
2340
2412
  };
2413
+ /**
2414
+ * Number
2415
+ *
2416
+ * Your number, on a phone contact.
2417
+ */
2418
+ number: string | null;
2419
+ /**
2420
+ * Peer
2421
+ *
2422
+ * Their number, on a phone contact.
2423
+ */
2424
+ peer: string | null;
2425
+ /**
2426
+ * Whatsapp Window Expires At
2427
+ *
2428
+ * When free-form WhatsApp messages stop being allowed; null if they never contacted you on WhatsApp.
2429
+ */
2430
+ whatsapp_window_expires_at: string | null;
2341
2431
  };
2342
2432
 
2343
2433
  /**
@@ -2467,6 +2557,14 @@ export type ConversationSessionResponse = {
2467
2557
  * Integration Id
2468
2558
  */
2469
2559
  integration_id: string | null;
2560
+ /**
2561
+ * Metadata
2562
+ *
2563
+ * Your own labels for this session, set by your inbound webhook.
2564
+ */
2565
+ metadata: {
2566
+ [key: string]: string;
2567
+ };
2470
2568
  metrics: SessionMetrics;
2471
2569
  /**
2472
2570
  * Started At
@@ -2984,7 +3082,7 @@ export type CreateCallBatchRequest = {
2984
3082
  /**
2985
3083
  * Vars
2986
3084
  *
2987
- * Values for the variables the agents on this session declare, read as {{vars.name}} in a prompt, a greeting and a tool. They override each agent's declared default and reach every agent the session runs, including a handoff target. Unlike `userdata`, which describes the PERSON and is kept on their contact record, these describe THIS session and are gone with it. Strings only; an empty string is a deliberate blank, not a request for the default. The model can see them, so put credentials in a workspace secret and read {{secrets.NAME}} from a tool instead.
3085
+ * Values for the variables the agents on this session declare, read as {{vars.name}} in a prompt, a greeting and a tool. They override each agent's declared default and reach every agent the session runs, including a handoff target. Unlike `userdata`, which describes the PERSON and is kept on their contact record, these describe THIS session and are gone with it. Strings only; an empty string is a deliberate blank, not a request for the default. The model can see them, so credentials go in `secrets` (this session's own, where the request takes them) or a workspace secret, read as {{secrets.NAME}} by a tool.
2988
3086
  */
2989
3087
  vars?: {
2990
3088
  [key: string]: string;
@@ -2996,7 +3094,8 @@ export type CreateCallBatchRequest = {
2996
3094
  *
2997
3095
  * Who the chat is with, what it starts knowing, and what runs.
2998
3096
  *
2999
- * `vars` comes from `AgentPlanRequest` and is fixed for the life of the chat.
3097
+ * `vars` comes from `AgentPlanRequest` and `secrets` from `SessionSecretsField`;
3098
+ * both are fixed for the life of the chat.
3000
3099
  */
3001
3100
  export type CreateChatRequest = {
3002
3101
  /**
@@ -3027,6 +3126,14 @@ export type CreateChatRequest = {
3027
3126
  * Contact Key
3028
3127
  */
3029
3128
  contact_key?: string | null;
3129
+ /**
3130
+ * Secrets
3131
+ *
3132
+ * Secrets for this session only, read by tools as {{secrets.NAME}}; a name here overrides the workspace secret. Never shown to the model or returned.
3133
+ */
3134
+ secrets?: {
3135
+ [key: string]: string;
3136
+ } | null;
3030
3137
  /**
3031
3138
  * Userdata
3032
3139
  */
@@ -3036,7 +3143,7 @@ export type CreateChatRequest = {
3036
3143
  /**
3037
3144
  * Vars
3038
3145
  *
3039
- * Values for the variables the agents on this session declare, read as {{vars.name}} in a prompt, a greeting and a tool. They override each agent's declared default and reach every agent the session runs, including a handoff target. Unlike `userdata`, which describes the PERSON and is kept on their contact record, these describe THIS session and are gone with it. Strings only; an empty string is a deliberate blank, not a request for the default. The model can see them, so put credentials in a workspace secret and read {{secrets.NAME}} from a tool instead.
3146
+ * Values for the variables the agents on this session declare, read as {{vars.name}} in a prompt, a greeting and a tool. They override each agent's declared default and reach every agent the session runs, including a handoff target. Unlike `userdata`, which describes the PERSON and is kept on their contact record, these describe THIS session and are gone with it. Strings only; an empty string is a deliberate blank, not a request for the default. The model can see them, so credentials go in `secrets` (this session's own, where the request takes them) or a workspace secret, read as {{secrets.NAME}} by a tool.
3040
3147
  */
3041
3148
  vars?: {
3042
3149
  [key: string]: string;
@@ -3160,7 +3267,7 @@ export type CreateEmailSendRequest = {
3160
3267
  /**
3161
3268
  * From Email
3162
3269
  */
3163
- from_email?: string | null;
3270
+ from_email?: string;
3164
3271
  /**
3165
3272
  * From Name
3166
3273
  */
@@ -3182,7 +3289,7 @@ export type CreateEmailSendRequest = {
3182
3289
  /**
3183
3290
  * Send Attempts
3184
3291
  */
3185
- send_attempts?: number | null;
3292
+ send_attempts?: number;
3186
3293
  /**
3187
3294
  * Send Daily Cap
3188
3295
  */
@@ -3194,11 +3301,11 @@ export type CreateEmailSendRequest = {
3194
3301
  /**
3195
3302
  * Send Gap Seconds
3196
3303
  */
3197
- send_gap_seconds?: number | null;
3304
+ send_gap_seconds?: number;
3198
3305
  /**
3199
3306
  * Send Retry After Minutes
3200
3307
  */
3201
- send_retry_after_minutes?: number | null;
3308
+ send_retry_after_minutes?: number;
3202
3309
  /**
3203
3310
  * Start At
3204
3311
  */
@@ -3206,7 +3313,7 @@ export type CreateEmailSendRequest = {
3206
3313
  /**
3207
3314
  * Timezone
3208
3315
  */
3209
- timezone?: string | null;
3316
+ timezone?: string;
3210
3317
  window?: TimeWindow | null;
3211
3318
  };
3212
3319
 
@@ -3371,6 +3478,98 @@ export type CreateTaskRequest = {
3371
3478
  config: TaskConfig;
3372
3479
  };
3373
3480
 
3481
+ /**
3482
+ * CreateTaskRunBatchRequest
3483
+ */
3484
+ export type CreateTaskRunBatchRequest = {
3485
+ /**
3486
+ * Runs
3487
+ */
3488
+ runs: Array<RunItem>;
3489
+ /**
3490
+ * A complete task definition, run and stored nowhere else.
3491
+ */
3492
+ task?: TaskConfig | null;
3493
+ /**
3494
+ * Task Id
3495
+ *
3496
+ * A task in this workspace. Exclusive with `task`.
3497
+ */
3498
+ task_id?: string | null;
3499
+ /**
3500
+ * Changes for this run only: objects deep-merge, lists replace, null clears.
3501
+ */
3502
+ task_override?: TaskPatch | null;
3503
+ /**
3504
+ * Task Version
3505
+ *
3506
+ * Which version of `task_id` to run. Omit for the published one; `"draft"` runs the unpublished config, held to the publish checks.
3507
+ */
3508
+ task_version?: number | 'draft' | null;
3509
+ };
3510
+
3511
+ /**
3512
+ * CreateTaskRunRequest
3513
+ */
3514
+ export type CreateTaskRunRequest = {
3515
+ /**
3516
+ * Background
3517
+ *
3518
+ * Queue the run and return at once (202) instead of waiting for its result.
3519
+ */
3520
+ background?: boolean;
3521
+ /**
3522
+ * Files
3523
+ *
3524
+ * One PDF per declared `file` input, by name.
3525
+ */
3526
+ files?: {
3527
+ [key: string]: FileInput;
3528
+ };
3529
+ /**
3530
+ * Idempotency Key
3531
+ *
3532
+ * Resending the same key returns the existing run instead of starting another.
3533
+ */
3534
+ idempotency_key?: string | null;
3535
+ /**
3536
+ * Metadata
3537
+ *
3538
+ * Up to 16 string labels of your own, for filtering.
3539
+ */
3540
+ metadata?: {
3541
+ [key: string]: unknown | string;
3542
+ };
3543
+ /**
3544
+ * A complete task definition, run and stored nowhere else.
3545
+ */
3546
+ task?: TaskConfig | null;
3547
+ /**
3548
+ * Task Id
3549
+ *
3550
+ * A task in this workspace. Exclusive with `task`.
3551
+ */
3552
+ task_id?: string | null;
3553
+ /**
3554
+ * Changes for this run only: objects deep-merge, lists replace, null clears.
3555
+ */
3556
+ task_override?: TaskPatch | null;
3557
+ /**
3558
+ * Task Version
3559
+ *
3560
+ * Which version of `task_id` to run. Omit for the published one; `"draft"` runs the unpublished config, held to the publish checks.
3561
+ */
3562
+ task_version?: number | 'draft' | null;
3563
+ /**
3564
+ * Vars
3565
+ *
3566
+ * Values for the task's text inputs, by name. Undeclared names are refused.
3567
+ */
3568
+ vars?: {
3569
+ [key: string]: string;
3570
+ };
3571
+ };
3572
+
3374
3573
  /**
3375
3574
  * CreateTelephonyAccountRequest
3376
3575
  */
@@ -3462,11 +3661,11 @@ export type CreateWhatsAppBatchRequest = {
3462
3661
  *
3463
3662
  * Sends per row, the first included, while Meta's per-person limit holds it back.
3464
3663
  */
3465
- delivery_attempts?: number | null;
3664
+ delivery_attempts?: number;
3466
3665
  /**
3467
3666
  * Delivery Retry After Hours
3468
3667
  */
3469
- delivery_retry_after_hours?: number | null;
3668
+ delivery_retry_after_hours?: number;
3470
3669
  /**
3471
3670
  * Integration Id
3472
3671
  *
@@ -3494,7 +3693,7 @@ export type CreateWhatsAppBatchRequest = {
3494
3693
  /**
3495
3694
  * Send Gap Seconds
3496
3695
  */
3497
- send_gap_seconds?: number | null;
3696
+ send_gap_seconds?: number;
3498
3697
  /**
3499
3698
  * Template Id
3500
3699
  *
@@ -3504,7 +3703,7 @@ export type CreateWhatsAppBatchRequest = {
3504
3703
  /**
3505
3704
  * Timezone
3506
3705
  */
3507
- timezone?: string | null;
3706
+ timezone?: string;
3508
3707
  /**
3509
3708
  * To Column
3510
3709
  *
@@ -3604,6 +3803,14 @@ export type CreditLedgerEntryResponse = {
3604
3803
  * Balance After
3605
3804
  */
3606
3805
  balance_after: number;
3806
+ /**
3807
+ * Channel
3808
+ */
3809
+ channel: 'voice' | 'video' | 'text' | null;
3810
+ /**
3811
+ * Conversation Id
3812
+ */
3813
+ conversation_id: string | null;
3607
3814
  /**
3608
3815
  * Created At
3609
3816
  */
@@ -3662,14 +3869,49 @@ export type DeleteRecipientsRequest = {
3662
3869
  recipient_ids: Array<string>;
3663
3870
  };
3664
3871
 
3872
+ /**
3873
+ * DeleteTaskRunsRequest
3874
+ */
3875
+ export type DeleteTaskRunsRequest = {
3876
+ /**
3877
+ * Metadata
3878
+ *
3879
+ * Runs whose metadata contains all of these pairs.
3880
+ */
3881
+ metadata: {
3882
+ [key: string]: unknown | string;
3883
+ };
3884
+ /**
3885
+ * Task Id
3886
+ */
3887
+ task_id?: string | null;
3888
+ };
3889
+
3890
+ /**
3891
+ * DeleteTaskRunsResponse
3892
+ */
3893
+ export type DeleteTaskRunsResponse = {
3894
+ /**
3895
+ * Count
3896
+ */
3897
+ count: number;
3898
+ };
3899
+
3665
3900
  /**
3666
3901
  * DeliveryError
3667
3902
  *
3668
3903
  * Outbound delivery failure detail (provider HTTP / shadow-mode skips).
3669
3904
  *
3670
- * Writers always store `{"message": ...}` (see services.messaging.delivery).
3905
+ * Writers always store `{"message": ...}`, plus the provider's `code` when it
3906
+ * gave one (see services.messaging.delivery).
3671
3907
  */
3672
3908
  export type DeliveryError = {
3909
+ /**
3910
+ * Code
3911
+ *
3912
+ * The provider's error code, if any.
3913
+ */
3914
+ code: string | null;
3673
3915
  /**
3674
3916
  * Message
3675
3917
  */
@@ -4322,9 +4564,15 @@ export type EndpointingSpecOverride = {
4322
4564
  * of individual `errors` (used wherever we surface many problems at once,
4323
4565
  * including tool publish, op-tree checks, and request validation). The global
4324
4566
  * exception handlers normalize every API error to
4325
- * `{detail: {message, errors}}`, so SDKs can parse one shape consistently.
4567
+ * `{detail: {message, errors, code}}`, so SDKs can parse one shape consistently.
4326
4568
  */
4327
4569
  export type ErrorBody = {
4570
+ /**
4571
+ * Code
4572
+ *
4573
+ * A stable identifier for this error, when it has one.
4574
+ */
4575
+ code?: string | null;
4328
4576
  /**
4329
4577
  * Errors
4330
4578
  */
@@ -4555,6 +4803,30 @@ export type FieldMap = {
4555
4803
  to: string;
4556
4804
  };
4557
4805
 
4806
+ /**
4807
+ * FileInput
4808
+ *
4809
+ * One PDF for a `file` input: a public https URL, or the bytes as a data URL.
4810
+ */
4811
+ export type FileInput = {
4812
+ /**
4813
+ * Data Url
4814
+ *
4815
+ * `data:application/pdf;base64,<bytes>`, up to 20 MB decoded.
4816
+ */
4817
+ data_url?: string | null;
4818
+ /**
4819
+ * Filename
4820
+ */
4821
+ filename?: string | null;
4822
+ /**
4823
+ * Url
4824
+ *
4825
+ * An https URL the run downloads.
4826
+ */
4827
+ url?: string | null;
4828
+ };
4829
+
4558
4830
  /**
4559
4831
  * FixedDailyCap
4560
4832
  *
@@ -5067,6 +5339,16 @@ export type IfOperation = {
5067
5339
  then?: Array<HttpOperation | CodeOperation | FrontendRpcOperation | IfOperation | SetVariableOperation | SayOperation | GenerateReplyOperation | AddMessageOperation | EndCallOperation | HandoffOperation | TransferOperation | SendDtmfOperation> | null;
5068
5340
  };
5069
5341
 
5342
+ /**
5343
+ * ImageNotKept
5344
+ */
5345
+ export type ImageNotKept = {
5346
+ /**
5347
+ * Reason
5348
+ */
5349
+ reason: string;
5350
+ };
5351
+
5070
5352
  /**
5071
5353
  * ImportPhoneNumbersRequest
5072
5354
  */
@@ -5128,6 +5410,25 @@ export type ImportedNumberResult = {
5128
5410
  phone_number?: PhoneNumberResponse | null;
5129
5411
  };
5130
5412
 
5413
+ /**
5414
+ * InboundContent
5415
+ *
5416
+ * What the person sent besides text.
5417
+ */
5418
+ export type InboundContent = {
5419
+ button: ButtonTap;
5420
+ /**
5421
+ * Kind
5422
+ */
5423
+ kind: 'button';
5424
+ /**
5425
+ * Replied To
5426
+ *
5427
+ * Provider id of the message this answers, e.g. the template.
5428
+ */
5429
+ replied_to?: string | null;
5430
+ };
5431
+
5131
5432
  /**
5132
5433
  * InboundImage
5133
5434
  *
@@ -5144,6 +5445,36 @@ export type InboundImage = {
5144
5445
  filename?: string | null;
5145
5446
  };
5146
5447
 
5448
+ /**
5449
+ * InboundWebhookResponse
5450
+ *
5451
+ * The workspace's inbound session webhook.
5452
+ */
5453
+ export type InboundWebhookResponse = {
5454
+ /**
5455
+ * Created At
5456
+ */
5457
+ created_at: string;
5458
+ /**
5459
+ * Secret
5460
+ *
5461
+ * The signing secret, only when it was just created or rotated.
5462
+ */
5463
+ secret: string | null;
5464
+ /**
5465
+ * Secret Hint
5466
+ */
5467
+ secret_hint: string;
5468
+ /**
5469
+ * Updated At
5470
+ */
5471
+ updated_at: string;
5472
+ /**
5473
+ * Url
5474
+ */
5475
+ url: string;
5476
+ };
5477
+
5147
5478
  /**
5148
5479
  * InlineFaq
5149
5480
  *
@@ -5637,9 +5968,25 @@ export type InterruptionSpecOverride = {
5637
5968
  };
5638
5969
 
5639
5970
  /**
5640
- * ItemCreatedEvent
5971
+ * ItemAuthor
5641
5972
  *
5642
- * One new item, in the same shape `list_conversation_items` returns it.
5973
+ * Who at your business posted an item.
5974
+ */
5975
+ export type ItemAuthor = {
5976
+ /**
5977
+ * Id
5978
+ */
5979
+ id: string;
5980
+ /**
5981
+ * Name
5982
+ */
5983
+ name: string;
5984
+ };
5985
+
5986
+ /**
5987
+ * ItemCreatedEvent
5988
+ *
5989
+ * One new item, in the same shape `list_conversation_items` returns it.
5643
5990
  */
5644
5991
  export type ItemCreatedEvent = {
5645
5992
  /**
@@ -5654,10 +6001,24 @@ export type ItemCreatedEvent = {
5654
6001
  * Attachments
5655
6002
  */
5656
6003
  attachments: Array<ConversationAttachment>;
6004
+ /**
6005
+ * Who at your business posted this.
6006
+ */
6007
+ author: ItemAuthor | null;
6008
+ /**
6009
+ * Channel
6010
+ *
6011
+ * How this item reached us or the person; null for notes and instructions.
6012
+ */
6013
+ channel: 'phone_call' | 'whatsapp_call' | 'whatsapp_message' | 'web_call' | 'chat' | 'telegram' | 'stream' | 'copilot' | null;
5657
6014
  /**
5658
6015
  * Client Message Id
5659
6016
  */
5660
6017
  client_message_id: string | null;
6018
+ /**
6019
+ * What the person sent besides text; null for plain text.
6020
+ */
6021
+ content: InboundContent | null;
5661
6022
  /**
5662
6023
  * Conversation Id
5663
6024
  */
@@ -5670,7 +6031,7 @@ export type ItemCreatedEvent = {
5670
6031
  /**
5671
6032
  * Delivery Status
5672
6033
  */
5673
- delivery_status: 'not_applicable' | 'pending' | 'sending' | 'sent' | 'failed' | 'skipped';
6034
+ delivery_status: 'not_applicable' | 'pending' | 'held' | 'sending' | 'queued' | 'sent' | 'delivered' | 'read' | 'undelivered' | 'failed' | 'skipped' | 'expired';
5674
6035
  /**
5675
6036
  * Direction
5676
6037
  */
@@ -5687,6 +6048,16 @@ export type ItemCreatedEvent = {
5687
6048
  * Id
5688
6049
  */
5689
6050
  id: string;
6051
+ /**
6052
+ * Idempotency Key
6053
+ */
6054
+ idempotency_key: string | null;
6055
+ /**
6056
+ * Images Not Kept
6057
+ *
6058
+ * Images the person sent that were not stored, and why.
6059
+ */
6060
+ images_not_kept: Array<ImageNotKept>;
5690
6061
  latency: ReplyLatency | null;
5691
6062
  /**
5692
6063
  * Metadata
@@ -5699,6 +6070,12 @@ export type ItemCreatedEvent = {
5699
6070
  * Origin
5700
6071
  */
5701
6072
  origin: 'speech' | 'typed' | 'keypad' | null;
6073
+ /**
6074
+ * Post Type
6075
+ *
6076
+ * What was posted through the API; null for everything else.
6077
+ */
6078
+ post_type: 'template' | 'agent_text' | 'note' | 'instruction' | null;
5702
6079
  /**
5703
6080
  * Provider Message Id
5704
6081
  */
@@ -5721,10 +6098,6 @@ export type ItemCreatedEvent = {
5721
6098
  * Session Id
5722
6099
  */
5723
6100
  session_id: string | null;
5724
- /**
5725
- * Source
5726
- */
5727
- source: string | null;
5728
6101
  /**
5729
6102
  * Text
5730
6103
  */
@@ -5758,13 +6131,13 @@ export type ItemCreatedEvent = {
5758
6131
  /**
5759
6132
  * ItemDeliveryUpdatedEvent
5760
6133
  *
5761
- * An outbound item reached the provider, or failed to.
6134
+ * An outbound item's delivery moved: claimed, sent, held, a receipt, or a failure.
5762
6135
  */
5763
6136
  export type ItemDeliveryUpdatedEvent = {
5764
6137
  /**
5765
6138
  * Delivery Status
5766
6139
  */
5767
- delivery_status: 'not_applicable' | 'pending' | 'sending' | 'sent' | 'failed' | 'skipped';
6140
+ delivery_status: 'not_applicable' | 'pending' | 'held' | 'sending' | 'queued' | 'sent' | 'delivered' | 'read' | 'undelivered' | 'failed' | 'skipped' | 'expired';
5768
6141
  /**
5769
6142
  * Error
5770
6143
  */
@@ -7070,12 +7443,20 @@ export type OkResponse = {
7070
7443
  ok?: boolean;
7071
7444
  };
7072
7445
 
7446
+ /**
7447
+ * OpenerPolicy
7448
+ */
7449
+ export type OpenerPolicy = {
7450
+ opener: TemplateSend;
7451
+ };
7452
+
7073
7453
  /**
7074
7454
  * OutboundCallRequest
7075
7455
  *
7076
7456
  * One phone call: who to dial, from which of your numbers, and what runs.
7077
7457
  *
7078
- * `vars` comes from `AgentPlanRequest` and lasts exactly as long as this call.
7458
+ * `vars` comes from `AgentPlanRequest` and `secrets` from `SessionSecretsField`;
7459
+ * both last exactly as long as this call.
7079
7460
  */
7080
7461
  export type OutboundCallRequest = {
7081
7462
  /**
@@ -7106,6 +7487,14 @@ export type OutboundCallRequest = {
7106
7487
  * From Phone Number Id
7107
7488
  */
7108
7489
  from_phone_number_id: string;
7490
+ /**
7491
+ * Secrets
7492
+ *
7493
+ * Secrets for this session only, read by tools as {{secrets.NAME}}; a name here overrides the workspace secret. Never shown to the model or returned.
7494
+ */
7495
+ secrets?: {
7496
+ [key: string]: string;
7497
+ } | null;
7109
7498
  /**
7110
7499
  * To
7111
7500
  */
@@ -7119,7 +7508,7 @@ export type OutboundCallRequest = {
7119
7508
  /**
7120
7509
  * Vars
7121
7510
  *
7122
- * Values for the variables the agents on this session declare, read as {{vars.name}} in a prompt, a greeting and a tool. They override each agent's declared default and reach every agent the session runs, including a handoff target. Unlike `userdata`, which describes the PERSON and is kept on their contact record, these describe THIS session and are gone with it. Strings only; an empty string is a deliberate blank, not a request for the default. The model can see them, so put credentials in a workspace secret and read {{secrets.NAME}} from a tool instead.
7511
+ * Values for the variables the agents on this session declare, read as {{vars.name}} in a prompt, a greeting and a tool. They override each agent's declared default and reach every agent the session runs, including a handoff target. Unlike `userdata`, which describes the PERSON and is kept on their contact record, these describe THIS session and are gone with it. Strings only; an empty string is a deliberate blank, not a request for the default. The model can see them, so credentials go in `secrets` (this session's own, where the request takes them) or a workspace secret, read as {{secrets.NAME}} by a tool.
7123
7512
  */
7124
7513
  vars?: {
7125
7514
  [key: string]: string;
@@ -7681,9 +8070,9 @@ export type PageTaskResponse = {
7681
8070
  };
7682
8071
 
7683
8072
  /**
7684
- * Page[TaskRunResponse]
8073
+ * Page[TaskRunSummary]
7685
8074
  */
7686
- export type PageTaskRunResponse = {
8075
+ export type PageTaskRunSummary = {
7687
8076
  /**
7688
8077
  * Has More
7689
8078
  */
@@ -7691,7 +8080,7 @@ export type PageTaskRunResponse = {
7691
8080
  /**
7692
8081
  * Items
7693
8082
  */
7694
- items: Array<TaskRunResponse>;
8083
+ items: Array<TaskRunSummary>;
7695
8084
  /**
7696
8085
  * Limit
7697
8086
  */
@@ -7850,7 +8239,7 @@ export type PatchCallBatchRequest = {
7850
8239
  /**
7851
8240
  * Agent Id
7852
8241
  */
7853
- agent_id?: string | null;
8242
+ agent_id?: string;
7854
8243
  calling_window?: TimeWindow | null;
7855
8244
  /**
7856
8245
  * Dial Daily Cap
@@ -7863,27 +8252,27 @@ export type PatchCallBatchRequest = {
7863
8252
  /**
7864
8253
  * Dial Gap Seconds
7865
8254
  */
7866
- dial_gap_seconds?: number | null;
8255
+ dial_gap_seconds?: number;
7867
8256
  /**
7868
8257
  * From Phone Number Id
7869
8258
  */
7870
- from_phone_number_id?: string | null;
8259
+ from_phone_number_id?: string;
7871
8260
  /**
7872
8261
  * Max Attempts
7873
8262
  */
7874
- max_attempts?: number | null;
8263
+ max_attempts?: number;
7875
8264
  /**
7876
8265
  * Max Concurrency
7877
8266
  */
7878
- max_concurrency?: number | null;
8267
+ max_concurrency?: number;
7879
8268
  /**
7880
8269
  * Name
7881
8270
  */
7882
- name?: string | null;
8271
+ name?: string;
7883
8272
  /**
7884
8273
  * Retry After Minutes
7885
8274
  */
7886
- retry_after_minutes?: number | null;
8275
+ retry_after_minutes?: number;
7887
8276
  /**
7888
8277
  * Start At
7889
8278
  */
@@ -7891,7 +8280,7 @@ export type PatchCallBatchRequest = {
7891
8280
  /**
7892
8281
  * Timezone
7893
8282
  */
7894
- timezone?: string | null;
8283
+ timezone?: string;
7895
8284
  };
7896
8285
 
7897
8286
  /**
@@ -7903,7 +8292,7 @@ export type PatchConversationRequest = {
7903
8292
  */
7904
8293
  metadata?: {
7905
8294
  [key: string]: unknown;
7906
- } | null;
8295
+ };
7907
8296
  /**
7908
8297
  * Summary
7909
8298
  */
@@ -7913,7 +8302,7 @@ export type PatchConversationRequest = {
7913
8302
  */
7914
8303
  userdata?: {
7915
8304
  [key: string]: unknown;
7916
- } | null;
8305
+ };
7917
8306
  };
7918
8307
 
7919
8308
  /**
@@ -7935,28 +8324,31 @@ export type PatchEmailBatchRequest = {
7935
8324
  /**
7936
8325
  * Body Format
7937
8326
  */
7938
- body_format?: 'text' | 'html' | null;
8327
+ body_format?: 'text' | 'html';
7939
8328
  /**
7940
8329
  * Draft Attempts
7941
8330
  */
7942
- draft_attempts?: number | null;
8331
+ draft_attempts?: number;
7943
8332
  /**
7944
8333
  * Draft Concurrency
7945
8334
  */
7946
- draft_concurrency?: number | null;
8335
+ draft_concurrency?: number;
7947
8336
  /**
7948
8337
  * Draft Gap Seconds
7949
8338
  */
7950
- draft_gap_seconds?: number | null;
8339
+ draft_gap_seconds?: number;
7951
8340
  /**
7952
8341
  * Draft Retry After Minutes
7953
8342
  */
7954
- draft_retry_after_minutes?: number | null;
7955
- field_map?: FieldMap | null;
8343
+ draft_retry_after_minutes?: number;
8344
+ /**
8345
+ * Field Map
8346
+ */
8347
+ field_map?: FieldMap;
7956
8348
  /**
7957
8349
  * From Email
7958
8350
  */
7959
- from_email?: string | null;
8351
+ from_email?: string;
7960
8352
  /**
7961
8353
  * From Name
7962
8354
  */
@@ -7964,7 +8356,7 @@ export type PatchEmailBatchRequest = {
7964
8356
  /**
7965
8357
  * Name
7966
8358
  */
7967
- name?: string | null;
8359
+ name?: string;
7968
8360
  /**
7969
8361
  * Reply To
7970
8362
  */
@@ -7972,7 +8364,7 @@ export type PatchEmailBatchRequest = {
7972
8364
  /**
7973
8365
  * Send Attempts
7974
8366
  */
7975
- send_attempts?: number | null;
8367
+ send_attempts?: number;
7976
8368
  /**
7977
8369
  * Send Daily Cap
7978
8370
  */
@@ -7984,11 +8376,11 @@ export type PatchEmailBatchRequest = {
7984
8376
  /**
7985
8377
  * Send Gap Seconds
7986
8378
  */
7987
- send_gap_seconds?: number | null;
8379
+ send_gap_seconds?: number;
7988
8380
  /**
7989
8381
  * Send Retry After Minutes
7990
8382
  */
7991
- send_retry_after_minutes?: number | null;
8383
+ send_retry_after_minutes?: number;
7992
8384
  /**
7993
8385
  * Start At
7994
8386
  */
@@ -7996,7 +8388,7 @@ export type PatchEmailBatchRequest = {
7996
8388
  /**
7997
8389
  * Timezone
7998
8390
  */
7999
- timezone?: string | null;
8391
+ timezone?: string;
8000
8392
  window?: TimeWindow | null;
8001
8393
  };
8002
8394
 
@@ -8033,7 +8425,7 @@ export type PatchEmailSendRequest = {
8033
8425
  /**
8034
8426
  * Send Attempts
8035
8427
  */
8036
- send_attempts?: number | null;
8428
+ send_attempts?: number;
8037
8429
  /**
8038
8430
  * Send Daily Cap
8039
8431
  */
@@ -8045,11 +8437,11 @@ export type PatchEmailSendRequest = {
8045
8437
  /**
8046
8438
  * Send Gap Seconds
8047
8439
  */
8048
- send_gap_seconds?: number | null;
8440
+ send_gap_seconds?: number;
8049
8441
  /**
8050
8442
  * Send Retry After Minutes
8051
8443
  */
8052
- send_retry_after_minutes?: number | null;
8444
+ send_retry_after_minutes?: number;
8053
8445
  /**
8054
8446
  * Start At
8055
8447
  */
@@ -8057,7 +8449,7 @@ export type PatchEmailSendRequest = {
8057
8449
  /**
8058
8450
  * Timezone
8059
8451
  */
8060
- timezone?: string | null;
8452
+ timezone?: string;
8061
8453
  window?: TimeWindow | null;
8062
8454
  };
8063
8455
 
@@ -8068,47 +8460,47 @@ export type PatchIntegrationRequest = {
8068
8460
  /**
8069
8461
  * Allowed Tools
8070
8462
  */
8071
- allowed_tools?: Array<string> | null;
8463
+ allowed_tools?: Array<string>;
8072
8464
  /**
8073
8465
  * Credentials Ref
8074
8466
  */
8075
- credentials_ref?: string | null;
8467
+ credentials_ref?: string;
8076
8468
  /**
8077
8469
  * Display Name
8078
8470
  */
8079
- display_name?: string | null;
8471
+ display_name?: string;
8080
8472
  /**
8081
8473
  * Mcp Config
8082
8474
  */
8083
8475
  mcp_config?: {
8084
8476
  [key: string]: unknown;
8085
- } | null;
8477
+ };
8086
8478
  /**
8087
8479
  * Metadata
8088
8480
  */
8089
8481
  metadata?: {
8090
8482
  [key: string]: unknown;
8091
- } | null;
8483
+ };
8092
8484
  /**
8093
8485
  * Provider Account Info
8094
8486
  */
8095
8487
  provider_account_info?: {
8096
8488
  [key: string]: unknown;
8097
- } | null;
8489
+ };
8098
8490
  /**
8099
8491
  * Status
8100
8492
  */
8101
- status?: 'active' | 'disabled' | 'needs_reconnect' | 'error' | null;
8493
+ status?: 'active' | 'disabled' | 'needs_reconnect' | 'error';
8102
8494
  /**
8103
8495
  * Tools Namespace
8104
8496
  */
8105
- tools_namespace?: string | null;
8497
+ tools_namespace?: string;
8106
8498
  /**
8107
8499
  * Webhook Config
8108
8500
  */
8109
8501
  webhook_config?: {
8110
8502
  [key: string]: unknown;
8111
- } | null;
8503
+ };
8112
8504
  };
8113
8505
 
8114
8506
  /**
@@ -8122,13 +8514,13 @@ export type PatchIntegrationTriggerRequest = {
8122
8514
  /**
8123
8515
  * Enabled
8124
8516
  */
8125
- enabled?: boolean | null;
8517
+ enabled?: boolean;
8126
8518
  /**
8127
8519
  * Metadata
8128
8520
  */
8129
8521
  metadata?: {
8130
8522
  [key: string]: unknown;
8131
- } | null;
8523
+ };
8132
8524
  /**
8133
8525
  * Provider Subscription Ref
8134
8526
  */
@@ -8136,15 +8528,15 @@ export type PatchIntegrationTriggerRequest = {
8136
8528
  /**
8137
8529
  * Reply Mode
8138
8530
  */
8139
- reply_mode?: 'public_reply' | 'internal_note' | 'none' | null;
8531
+ reply_mode?: 'public_reply' | 'internal_note' | 'none';
8140
8532
  /**
8141
8533
  * Status
8142
8534
  */
8143
- status?: 'active' | 'disabled' | 'needs_setup' | 'error' | null;
8535
+ status?: 'active' | 'disabled' | 'needs_setup' | 'error';
8144
8536
  /**
8145
8537
  * Trigger Type
8146
8538
  */
8147
- trigger_type?: 'telegram.message.inbound' | 'whatsapp.message.inbound' | 'whatsapp.call.inbound' | null;
8539
+ trigger_type?: 'telegram.message.inbound' | 'whatsapp.message.inbound' | 'whatsapp.call.inbound';
8148
8540
  };
8149
8541
 
8150
8542
  /**
@@ -8154,11 +8546,11 @@ export type PatchPhoneNumberRequest = {
8154
8546
  /**
8155
8547
  * Can Inbound
8156
8548
  */
8157
- can_inbound?: boolean | null;
8549
+ can_inbound?: boolean;
8158
8550
  /**
8159
8551
  * Can Outbound
8160
8552
  */
8161
- can_outbound?: boolean | null;
8553
+ can_outbound?: boolean;
8162
8554
  /**
8163
8555
  * Label
8164
8556
  */
@@ -8166,11 +8558,11 @@ export type PatchPhoneNumberRequest = {
8166
8558
  /**
8167
8559
  * Region
8168
8560
  */
8169
- region?: 'us' | 'in' | null;
8561
+ region?: 'us' | 'in';
8170
8562
  /**
8171
8563
  * Status
8172
8564
  */
8173
- status?: 'disabled' | 'pending' | null;
8565
+ status?: 'disabled' | 'pending';
8174
8566
  };
8175
8567
 
8176
8568
  /**
@@ -8180,19 +8572,19 @@ export type PatchStreamConnectionRequest = {
8180
8572
  /**
8181
8573
  * Agent Id
8182
8574
  */
8183
- agent_id?: string | null;
8575
+ agent_id?: string;
8184
8576
  /**
8185
8577
  * Name
8186
8578
  */
8187
- name?: string | null;
8579
+ name?: string;
8188
8580
  /**
8189
8581
  * Region
8190
8582
  */
8191
- region?: 'us' | 'in' | null;
8583
+ region?: 'us' | 'in';
8192
8584
  /**
8193
8585
  * Status
8194
8586
  */
8195
- status?: 'active' | 'disabled' | null;
8587
+ status?: 'active' | 'disabled';
8196
8588
  };
8197
8589
 
8198
8590
  /**
@@ -8214,29 +8606,29 @@ export type PatchTelephonyAccountRequest = {
8214
8606
  */
8215
8607
  account_info?: {
8216
8608
  [key: string]: unknown;
8217
- } | null;
8609
+ };
8218
8610
  /**
8219
8611
  * Console Setup Confirmed
8220
8612
  */
8221
- console_setup_confirmed?: boolean | null;
8613
+ console_setup_confirmed?: boolean;
8222
8614
  /**
8223
8615
  * Console Setup Region
8224
8616
  */
8225
- console_setup_region?: 'us' | 'in' | null;
8617
+ console_setup_region?: 'us' | 'in';
8226
8618
  /**
8227
8619
  * Credentials
8228
8620
  */
8229
8621
  credentials?: {
8230
8622
  [key: string]: string;
8231
- } | null;
8623
+ };
8232
8624
  /**
8233
8625
  * Display Name
8234
8626
  */
8235
- display_name?: string | null;
8627
+ display_name?: string;
8236
8628
  /**
8237
8629
  * Status
8238
8630
  */
8239
- status?: 'disabled' | 'connected' | null;
8631
+ status?: 'disabled' | 'connected';
8240
8632
  };
8241
8633
 
8242
8634
  /**
@@ -8246,33 +8638,33 @@ export type PatchToolRequest = {
8246
8638
  /**
8247
8639
  * Description
8248
8640
  */
8249
- description?: string | null;
8641
+ description?: string;
8250
8642
  /**
8251
8643
  * Disable Interruptions
8252
8644
  */
8253
- disable_interruptions?: boolean | null;
8645
+ disable_interruptions?: boolean;
8254
8646
  /**
8255
8647
  * Json Schema
8256
8648
  */
8257
8649
  json_schema?: {
8258
8650
  [key: string]: unknown;
8259
- } | null;
8651
+ };
8260
8652
  /**
8261
8653
  * Long Running Task
8262
8654
  */
8263
- long_running_task?: boolean | null;
8655
+ long_running_task?: boolean;
8264
8656
  /**
8265
8657
  * Name
8266
8658
  */
8267
- name?: string | null;
8659
+ name?: string;
8268
8660
  /**
8269
8661
  * Operations
8270
8662
  */
8271
- operations?: Array<HttpOperation | CodeOperation | FrontendRpcOperation | IfOperation | SetVariableOperation | SayOperation | GenerateReplyOperation | AddMessageOperation | EndCallOperation | HandoffOperation | TransferOperation | SendDtmfOperation> | null;
8663
+ operations?: Array<HttpOperation | CodeOperation | FrontendRpcOperation | IfOperation | SetVariableOperation | SayOperation | GenerateReplyOperation | AddMessageOperation | EndCallOperation | HandoffOperation | TransferOperation | SendDtmfOperation>;
8272
8664
  /**
8273
8665
  * Silent
8274
8666
  */
8275
- silent?: boolean | null;
8667
+ silent?: boolean;
8276
8668
  };
8277
8669
 
8278
8670
  /**
@@ -8282,15 +8674,15 @@ export type PatchWebhookRequest = {
8282
8674
  /**
8283
8675
  * Status
8284
8676
  */
8285
- status?: 'active' | 'disabled' | null;
8677
+ status?: 'active' | 'disabled';
8286
8678
  /**
8287
8679
  * Subscribed Events
8288
8680
  */
8289
- subscribed_events?: Array<string> | null;
8681
+ subscribed_events?: Array<string>;
8290
8682
  /**
8291
8683
  * Url
8292
8684
  */
8293
- url?: string | null;
8685
+ url?: string;
8294
8686
  };
8295
8687
 
8296
8688
  /**
@@ -8304,15 +8696,15 @@ export type PatchWhatsAppBatchRequest = {
8304
8696
  *
8305
8697
  * Sends per row, the first included, while Meta's per-person limit holds it back.
8306
8698
  */
8307
- delivery_attempts?: number | null;
8699
+ delivery_attempts?: number;
8308
8700
  /**
8309
8701
  * Delivery Retry After Hours
8310
8702
  */
8311
- delivery_retry_after_hours?: number | null;
8703
+ delivery_retry_after_hours?: number;
8312
8704
  /**
8313
8705
  * Name
8314
8706
  */
8315
- name?: string | null;
8707
+ name?: string;
8316
8708
  /**
8317
8709
  * Send Daily Cap
8318
8710
  *
@@ -8326,7 +8718,7 @@ export type PatchWhatsAppBatchRequest = {
8326
8718
  /**
8327
8719
  * Send Gap Seconds
8328
8720
  */
8329
- send_gap_seconds?: number | null;
8721
+ send_gap_seconds?: number;
8330
8722
  /**
8331
8723
  * Start At
8332
8724
  */
@@ -8334,13 +8726,13 @@ export type PatchWhatsAppBatchRequest = {
8334
8726
  /**
8335
8727
  * Timezone
8336
8728
  */
8337
- timezone?: string | null;
8729
+ timezone?: string;
8338
8730
  /**
8339
8731
  * Variable Map
8340
8732
  */
8341
8733
  variable_map?: {
8342
8734
  [key: string]: string;
8343
- } | null;
8735
+ };
8344
8736
  window?: TimeWindow | null;
8345
8737
  };
8346
8738
 
@@ -8471,6 +8863,78 @@ export type PlatformFeePerMinute = {
8471
8863
  voice: number;
8472
8864
  };
8473
8865
 
8866
+ /**
8867
+ * PostItemRequest
8868
+ */
8869
+ export type PostItemRequest = {
8870
+ /**
8871
+ * Who at your business posted this; shown in transcripts, never sent to the person or shown to the agent.
8872
+ */
8873
+ author?: ItemAuthor | null;
8874
+ /**
8875
+ * Idempotency Key
8876
+ */
8877
+ idempotency_key?: string | null;
8878
+ /**
8879
+ * On Window Closed
8880
+ *
8881
+ * fail refuses free text outside WhatsApp's 24h window; an opener sends that template and holds the message until they reply.
8882
+ */
8883
+ on_window_closed?: 'fail' | OpenerPolicy;
8884
+ /**
8885
+ * For `template` only.
8886
+ */
8887
+ template?: TemplateSend | null;
8888
+ /**
8889
+ * Text
8890
+ *
8891
+ * For the other three types.
8892
+ */
8893
+ text?: string | null;
8894
+ /**
8895
+ * The conversation, or your number and theirs to reach a person with no conversation yet.
8896
+ */
8897
+ to: PostTarget;
8898
+ /**
8899
+ * Type
8900
+ *
8901
+ * template and agent_text are delivered; note is never delivered; instruct has the agent write and send a message.
8902
+ */
8903
+ type: 'template' | 'agent_text' | 'note' | 'instruct';
8904
+ /**
8905
+ * Userdata
8906
+ *
8907
+ * Merged into the person's userdata and given to the agent that answers their reply.
8908
+ */
8909
+ userdata?: {
8910
+ [key: string]: unknown;
8911
+ } | null;
8912
+ };
8913
+
8914
+ /**
8915
+ * PostTarget
8916
+ *
8917
+ * `conversation_id`, or `number` and `peer`.
8918
+ */
8919
+ export type PostTarget = {
8920
+ /**
8921
+ * Conversation Id
8922
+ */
8923
+ conversation_id?: string | null;
8924
+ /**
8925
+ * Number
8926
+ *
8927
+ * Your business number, E.164.
8928
+ */
8929
+ number?: string | null;
8930
+ /**
8931
+ * Peer
8932
+ *
8933
+ * The person's number.
8934
+ */
8935
+ peer?: string | null;
8936
+ };
8937
+
8474
8938
  /**
8475
8939
  * PreemptiveGenerationSpec
8476
8940
  *
@@ -9291,30 +9755,24 @@ export type RecordingResponse = {
9291
9755
  /**
9292
9756
  * RecordingSpec
9293
9757
  *
9294
- * Whether calls with this agent are recorded, and what the caller is told.
9758
+ * Whether calls with this agent are recorded, and whether the caller is told.
9295
9759
  *
9296
9760
  * On by default: one stereo file per call, kept until the workspace's
9297
9761
  * retention policy deletes it.
9298
9762
  */
9299
9763
  export type RecordingSpec = {
9300
- /**
9301
- * Consent
9302
- *
9303
- * Set to 'disclosure' to tell the caller the call is recorded. The greeting must then contain `{{consent.notice}}` to say where, and the agent gains a tool to stop recording if the caller objects.
9304
- */
9305
- consent?: 'off' | 'disclosure';
9306
- /**
9307
- * Consent Notice
9308
- *
9309
- * The sentence `{{consent.notice}}` resolves to in the greeting.
9310
- */
9311
- consent_notice?: string;
9312
9764
  /**
9313
9765
  * Enabled
9314
9766
  *
9315
9767
  * Record the call audio. Voice and video agents only.
9316
9768
  */
9317
9769
  enabled?: boolean;
9770
+ /**
9771
+ * Notice
9772
+ *
9773
+ * Spoken where the greeting places {{recording.notice}}, uninterruptibly. Null: no notice.
9774
+ */
9775
+ notice?: string | null;
9318
9776
  };
9319
9777
 
9320
9778
  /**
@@ -9323,24 +9781,18 @@ export type RecordingSpec = {
9323
9781
  * A partial RecordingSpec: only the fields this call changes. Absent keeps the base value, an explicit null clears it, objects deep-merge and lists replace.
9324
9782
  */
9325
9783
  export type RecordingSpecOverride = {
9326
- /**
9327
- * Consent
9328
- *
9329
- * Set to 'disclosure' to tell the caller the call is recorded. The greeting must then contain `{{consent.notice}}` to say where, and the agent gains a tool to stop recording if the caller objects.
9330
- */
9331
- consent?: 'off' | 'disclosure' | null;
9332
- /**
9333
- * Consent Notice
9334
- *
9335
- * The sentence `{{consent.notice}}` resolves to in the greeting.
9336
- */
9337
- consent_notice?: string | null;
9338
9784
  /**
9339
9785
  * Enabled
9340
9786
  *
9341
9787
  * Record the call audio. Voice and video agents only.
9342
9788
  */
9343
9789
  enabled?: boolean | null;
9790
+ /**
9791
+ * Notice
9792
+ *
9793
+ * Spoken where the greeting places {{recording.notice}}, uninterruptibly. Null: no notice.
9794
+ */
9795
+ notice?: string | null;
9344
9796
  };
9345
9797
 
9346
9798
  /**
@@ -9348,7 +9800,7 @@ export type RecordingSpecOverride = {
9348
9800
  *
9349
9801
  * What a reader should do about it. `available` is the only playable one.
9350
9802
  */
9351
- export type RecordingState = 'none' | 'available' | 'pending' | 'expired' | 'failed' | 'not_shared' | 'consent_withdrawn' | 'deleted';
9803
+ export type RecordingState = 'none' | 'available' | 'pending' | 'expired' | 'failed' | 'not_shared' | 'deleted';
9352
9804
 
9353
9805
  /**
9354
9806
  * RedraftRequest
@@ -9467,6 +9919,14 @@ export type ResumeCallRequest = {
9467
9919
  * Region
9468
9920
  */
9469
9921
  region?: 'us' | 'in';
9922
+ /**
9923
+ * Secrets
9924
+ *
9925
+ * Secrets to add or replace for the resumed call; the dropped call's are kept.
9926
+ */
9927
+ secrets?: {
9928
+ [key: string]: string;
9929
+ } | null;
9470
9930
  };
9471
9931
 
9472
9932
  /**
@@ -9498,6 +9958,44 @@ export type Routes = {
9498
9958
  tts: RoutedTTS;
9499
9959
  };
9500
9960
 
9961
+ /**
9962
+ * RunItem
9963
+ *
9964
+ * One run's inputs and labels.
9965
+ */
9966
+ export type RunItem = {
9967
+ /**
9968
+ * Files
9969
+ *
9970
+ * One PDF per declared `file` input, by name.
9971
+ */
9972
+ files?: {
9973
+ [key: string]: FileInput;
9974
+ };
9975
+ /**
9976
+ * Idempotency Key
9977
+ *
9978
+ * Resending the same key returns the existing run instead of starting another.
9979
+ */
9980
+ idempotency_key?: string | null;
9981
+ /**
9982
+ * Metadata
9983
+ *
9984
+ * Up to 16 string labels of your own, for filtering.
9985
+ */
9986
+ metadata?: {
9987
+ [key: string]: unknown | string;
9988
+ };
9989
+ /**
9990
+ * Vars
9991
+ *
9992
+ * Values for the task's text inputs, by name. Undeclared names are refused.
9993
+ */
9994
+ vars?: {
9995
+ [key: string]: string;
9996
+ };
9997
+ };
9998
+
9501
9999
  /**
9502
10000
  * RunStepResponse
9503
10001
  *
@@ -9540,26 +10038,6 @@ export type RunStepResponse = {
9540
10038
  status: string;
9541
10039
  };
9542
10040
 
9543
- /**
9544
- * RunTaskRequest
9545
- */
9546
- export type RunTaskRequest = {
9547
- /**
9548
- * Vars
9549
- *
9550
- * Values for the variables this task declares, by name. A `required` variable with no value and no default is refused before the run starts; a name the task does not declare is refused too, rather than silently dropped.
9551
- */
9552
- vars?: {
9553
- [key: string]: string;
9554
- };
9555
- /**
9556
- * Version
9557
- *
9558
- * Which definition to run. Omitted runs the published version. A number runs that frozen version. 'draft' runs the unpublished config, validated and tool-pinned at request time and refused with the publish errors if it does not hold together.
9559
- */
9560
- version?: number | 'draft' | null;
9561
- };
9562
-
9563
10041
  /**
9564
10042
  * RunToolRequest
9565
10043
  */
@@ -9570,6 +10048,14 @@ export type RunToolRequest = {
9570
10048
  arguments?: {
9571
10049
  [key: string]: unknown;
9572
10050
  };
10051
+ /**
10052
+ * Secrets
10053
+ *
10054
+ * Session secrets for this run; override workspace secrets of the same name.
10055
+ */
10056
+ secrets?: {
10057
+ [key: string]: string;
10058
+ } | null;
9573
10059
  /**
9574
10060
  * Timezone
9575
10061
  *
@@ -10035,11 +10521,11 @@ export type SendWhatsAppBatchRequest = {
10035
10521
  *
10036
10522
  * Sends per row, the first included, while Meta's per-person limit holds it back.
10037
10523
  */
10038
- delivery_attempts?: number | null;
10524
+ delivery_attempts?: number;
10039
10525
  /**
10040
10526
  * Delivery Retry After Hours
10041
10527
  */
10042
- delivery_retry_after_hours?: number | null;
10528
+ delivery_retry_after_hours?: number;
10043
10529
  /**
10044
10530
  * Send Daily Cap
10045
10531
  *
@@ -10053,7 +10539,7 @@ export type SendWhatsAppBatchRequest = {
10053
10539
  /**
10054
10540
  * Send Gap Seconds
10055
10541
  */
10056
- send_gap_seconds?: number | null;
10542
+ send_gap_seconds?: number;
10057
10543
  /**
10058
10544
  * Start At
10059
10545
  */
@@ -10061,7 +10547,7 @@ export type SendWhatsAppBatchRequest = {
10061
10547
  /**
10062
10548
  * Timezone
10063
10549
  */
10064
- timezone?: string | null;
10550
+ timezone?: string;
10065
10551
  window?: TimeWindow | null;
10066
10552
  };
10067
10553
 
@@ -10178,6 +10664,18 @@ export type SessionUsage = {
10178
10664
  tts: Array<TTSUsage>;
10179
10665
  };
10180
10666
 
10667
+ /**
10668
+ * SetInboundWebhookRequest
10669
+ */
10670
+ export type SetInboundWebhookRequest = {
10671
+ /**
10672
+ * Url
10673
+ *
10674
+ * An https URL on your server.
10675
+ */
10676
+ url: string;
10677
+ };
10678
+
10181
10679
  /**
10182
10680
  * SetProviderKeyRequest
10183
10681
  */
@@ -10474,6 +10972,12 @@ export type StreamResponse = {
10474
10972
  * One `{{system_vars.*}}` variable the platform fills in.
10475
10973
  */
10476
10974
  export type SystemVarResponse = {
10975
+ /**
10976
+ * Channels
10977
+ *
10978
+ * The session channels this has a value on; empty means every one.
10979
+ */
10980
+ channels: Array<'phone_call' | 'whatsapp_call' | 'whatsapp_message' | 'web_call' | 'chat' | 'telegram' | 'stream'>;
10477
10981
  /**
10478
10982
  * Description
10479
10983
  */
@@ -10486,10 +10990,6 @@ export type SystemVarResponse = {
10486
10990
  * Key
10487
10991
  */
10488
10992
  key: string;
10489
- /**
10490
- * Voice Only
10491
- */
10492
- voice_only: boolean;
10493
10993
  };
10494
10994
 
10495
10995
  /**
@@ -10876,7 +11376,7 @@ export type TTSUsageResponse = {
10876
11376
  *
10877
11377
  * It declares no channel, no media and no greeting. Entered by an agent it
10878
11378
  * speaks with that call's voice and hears with its ears; run on its own from
10879
- * `POST /tasks/{id}/run` it is an LLM with tools and nobody to talk to. Which
11379
+ * `POST /task-runs` it is an LLM with tools and nobody to talk to. Which
10880
11380
  * of the two happens is the caller's, never the task's.
10881
11381
  */
10882
11382
  export type TaskConfig = {
@@ -10917,7 +11417,7 @@ export type TaskConfig = {
10917
11417
  /**
10918
11418
  * Output
10919
11419
  *
10920
- * The typed value this task produces. The model is given a `submit_result` tool built from these fields and told that calling it is how the run finishes. Publishing needs at least one; a draft may be empty.
11420
+ * The typed value this task produces: up to 25 top-level fields, nesting up to 4 levels and 100 fields in all. The model finishes by calling a `submit_result` tool built from them. Publishing needs at least one.
10921
11421
  */
10922
11422
  output?: Array<TaskOutputField>;
10923
11423
  /**
@@ -10961,9 +11461,7 @@ export type TaskConfig = {
10961
11461
  /**
10962
11462
  * TaskOutputField
10963
11463
  *
10964
- * One value the model must produce.
10965
- *
10966
- * Flat scalars only — no arrays and no nested objects.
11464
+ * One value the model must produce: a scalar, an object of named fields, or an array.
10967
11465
  */
10968
11466
  export type TaskOutputField = {
10969
11467
  /**
@@ -10973,13 +11471,29 @@ export type TaskOutputField = {
10973
11471
  */
10974
11472
  description: string;
10975
11473
  /**
10976
- * Name
11474
+ * Enum
10977
11475
  *
10978
- * Identifier for this value, as it appears in the run's `output` and anywhere the run is consumed. Lower-case letters, digits and underscores.
11476
+ * Allowed values. Strings only.
10979
11477
  */
10980
- name: string;
11478
+ enum?: Array<string> | null;
10981
11479
  /**
10982
- * Required
11480
+ * Fields
11481
+ *
11482
+ * An object's fields.
11483
+ */
11484
+ fields?: Array<TaskOutputField> | null;
11485
+ /**
11486
+ * An array's element.
11487
+ */
11488
+ items?: TaskOutputItem | null;
11489
+ /**
11490
+ * Name
11491
+ *
11492
+ * Identifier for this value, as it appears in the run's `output` and anywhere the run is consumed. Lower-case letters, digits and underscores.
11493
+ */
11494
+ name: string;
11495
+ /**
11496
+ * Required
10983
11497
  *
10984
11498
  * Refuse a null for this field. Turn it off for a value the model may legitimately fail to find, and say in the description when to send null.
10985
11499
  */
@@ -10987,9 +11501,43 @@ export type TaskOutputField = {
10987
11501
  /**
10988
11502
  * Type
10989
11503
  *
10990
- * The shape of the value. Anything that is not a number or a yes/no is a string.
11504
+ * The shape of the value. `object` takes `fields`; `array` takes `items`.
10991
11505
  */
10992
- type?: 'string' | 'boolean' | 'integer' | 'number';
11506
+ type?: 'string' | 'boolean' | 'integer' | 'number' | 'object' | 'array';
11507
+ };
11508
+
11509
+ /**
11510
+ * TaskOutputItem
11511
+ *
11512
+ * What an array holds: one element's shape. Unnamed, and never null.
11513
+ */
11514
+ export type TaskOutputItem = {
11515
+ /**
11516
+ * Description
11517
+ *
11518
+ * What one element is.
11519
+ */
11520
+ description?: string;
11521
+ /**
11522
+ * Enum
11523
+ *
11524
+ * Allowed values. Strings only.
11525
+ */
11526
+ enum?: Array<string> | null;
11527
+ /**
11528
+ * Fields
11529
+ *
11530
+ * An object element's fields.
11531
+ */
11532
+ fields?: Array<TaskOutputField> | null;
11533
+ /**
11534
+ * A nested array's element.
11535
+ */
11536
+ items?: TaskOutputItem | null;
11537
+ /**
11538
+ * Type
11539
+ */
11540
+ type?: 'string' | 'boolean' | 'integer' | 'number' | 'object' | 'array';
10993
11541
  };
10994
11542
 
10995
11543
  /**
@@ -11035,7 +11583,7 @@ export type TaskPatch = {
11035
11583
  /**
11036
11584
  * Output
11037
11585
  *
11038
- * The typed value this task produces. The model is given a `submit_result` tool built from these fields and told that calling it is how the run finishes. Publishing needs at least one; a draft may be empty.
11586
+ * The typed value this task produces: up to 25 top-level fields, nesting up to 4 levels and 100 fields in all. The model finishes by calling a `submit_result` tool built from them. Publishing needs at least one.
11039
11587
  */
11040
11588
  output?: Array<TaskOutputField> | null;
11041
11589
  /**
@@ -11112,6 +11660,38 @@ export type TaskResponse = {
11112
11660
  versions: Array<TaskVersionResponse> | null;
11113
11661
  };
11114
11662
 
11663
+ /**
11664
+ * TaskRunBatchItem
11665
+ */
11666
+ export type TaskRunBatchItem = {
11667
+ /**
11668
+ * Deduplicated
11669
+ */
11670
+ deduplicated: boolean;
11671
+ /**
11672
+ * Id
11673
+ */
11674
+ id: string;
11675
+ /**
11676
+ * Idempotency Key
11677
+ */
11678
+ idempotency_key: string | null;
11679
+ /**
11680
+ * Status
11681
+ */
11682
+ status: 'queued' | 'running' | 'completed' | 'failed' | 'canceled';
11683
+ };
11684
+
11685
+ /**
11686
+ * TaskRunBatchResponse
11687
+ */
11688
+ export type TaskRunBatchResponse = {
11689
+ /**
11690
+ * Runs
11691
+ */
11692
+ runs: Array<TaskRunBatchItem>;
11693
+ };
11694
+
11115
11695
  /**
11116
11696
  * TaskRunError
11117
11697
  */
@@ -11123,21 +11703,104 @@ export type TaskRunError = {
11123
11703
  /**
11124
11704
  * Type
11125
11705
  */
11126
- type: 'missing_vars' | 'no_output' | 'step_limit' | 'timeout' | 'provider_error' | 'configuration' | 'platform' | 'canceled';
11706
+ type: 'invalid_input' | 'no_output' | 'step_limit' | 'timeout' | 'provider_error' | 'configuration' | 'platform' | 'canceled';
11707
+ };
11708
+
11709
+ /**
11710
+ * TaskRunFile
11711
+ *
11712
+ * What one PDF input turned into before the model read it.
11713
+ */
11714
+ export type TaskRunFile = {
11715
+ /**
11716
+ * Bytes
11717
+ */
11718
+ bytes: number;
11719
+ /**
11720
+ * Filename
11721
+ */
11722
+ filename: string | null;
11723
+ /**
11724
+ * Images
11725
+ */
11726
+ images: Array<TaskRunImage>;
11727
+ /**
11728
+ * Input
11729
+ */
11730
+ input: string;
11731
+ /**
11732
+ * Pages
11733
+ */
11734
+ pages: number;
11735
+ /**
11736
+ * Text
11737
+ */
11738
+ text: string;
11739
+ };
11740
+
11741
+ /**
11742
+ * TaskRunImage
11743
+ *
11744
+ * A scanned page, as the model saw it.
11745
+ */
11746
+ export type TaskRunImage = {
11747
+ /**
11748
+ * Height
11749
+ */
11750
+ height: number;
11751
+ /**
11752
+ * Page
11753
+ */
11754
+ page: number;
11755
+ /**
11756
+ * Url
11757
+ */
11758
+ url: string;
11759
+ /**
11760
+ * Url Expires At
11761
+ */
11762
+ url_expires_at: string;
11763
+ /**
11764
+ * Width
11765
+ */
11766
+ width: number;
11127
11767
  };
11128
11768
 
11129
11769
  /**
11130
11770
  * TaskRunResponse
11771
+ *
11772
+ * One run in full: the config it ran, its inputs, its trace and its usage.
11131
11773
  */
11132
11774
  export type TaskRunResponse = {
11133
11775
  /**
11134
11776
  * Attempts
11135
11777
  */
11136
11778
  attempts: number;
11779
+ /**
11780
+ * Background
11781
+ */
11782
+ background: boolean;
11137
11783
  /**
11138
11784
  * Billing Status
11139
11785
  */
11140
11786
  billing_status: string;
11787
+ /**
11788
+ * Cancel Requested At
11789
+ */
11790
+ cancel_requested_at: string | null;
11791
+ config: TaskConfig | null;
11792
+ /**
11793
+ * Content Deleted At
11794
+ */
11795
+ content_deleted_at: string | null;
11796
+ /**
11797
+ * Content Expires At
11798
+ */
11799
+ content_expires_at: string | null;
11800
+ /**
11801
+ * Created At
11802
+ */
11803
+ created_at: string;
11141
11804
  /**
11142
11805
  * Duration Ms
11143
11806
  */
@@ -11147,14 +11810,28 @@ export type TaskRunResponse = {
11147
11810
  */
11148
11811
  ended_at: string | null;
11149
11812
  error: TaskRunError | null;
11813
+ /**
11814
+ * Files
11815
+ */
11816
+ files: Array<TaskRunFile>;
11150
11817
  /**
11151
11818
  * Id
11152
11819
  */
11153
11820
  id: string;
11821
+ /**
11822
+ * Idempotency Key
11823
+ */
11824
+ idempotency_key: string | null;
11154
11825
  /**
11155
11826
  * Max Steps
11156
11827
  */
11157
11828
  max_steps: number;
11829
+ /**
11830
+ * Metadata
11831
+ */
11832
+ metadata: {
11833
+ [key: string]: string;
11834
+ };
11158
11835
  /**
11159
11836
  * Output
11160
11837
  */
@@ -11168,11 +11845,11 @@ export type TaskRunResponse = {
11168
11845
  /**
11169
11846
  * Started At
11170
11847
  */
11171
- started_at: string;
11848
+ started_at: string | null;
11172
11849
  /**
11173
11850
  * Status
11174
11851
  */
11175
- status: 'running' | 'completed' | 'failed';
11852
+ status: 'queued' | 'running' | 'completed' | 'failed' | 'canceled';
11176
11853
  /**
11177
11854
  * Steps Used
11178
11855
  */
@@ -11193,6 +11870,10 @@ export type TaskRunResponse = {
11193
11870
  * Trace
11194
11871
  */
11195
11872
  trace: Array<TraceStepResponse>;
11873
+ /**
11874
+ * Tries
11875
+ */
11876
+ tries: number;
11196
11877
  /**
11197
11878
  * Usage
11198
11879
  */
@@ -11208,34 +11889,90 @@ export type TaskRunResponse = {
11208
11889
  /**
11209
11890
  * TaskRunSummary
11210
11891
  *
11211
- * A run, as the list page shows it: what happened, when, and what it cost.
11892
+ * A run without its trace, config or inputs: the list item, the
11893
+ * `task_run.completed` webhook body and a task's `last_run`, one shape for all three.
11212
11894
  *
11213
11895
  * `error` is the same object a full run carries rather than a bare type, so
11214
- * one reader answers "how did it go" for both — a summary that spelled the
11215
- * same fact differently would be two shapes for one question.
11896
+ * one reader answers "how did it go" for both.
11216
11897
  */
11217
11898
  export type TaskRunSummary = {
11899
+ /**
11900
+ * Background
11901
+ */
11902
+ background: boolean;
11903
+ /**
11904
+ * Billing Status
11905
+ */
11906
+ billing_status: string;
11907
+ /**
11908
+ * Content Deleted At
11909
+ */
11910
+ content_deleted_at: string | null;
11911
+ /**
11912
+ * Content Expires At
11913
+ */
11914
+ content_expires_at: string | null;
11915
+ /**
11916
+ * Created At
11917
+ */
11918
+ created_at: string;
11218
11919
  /**
11219
11920
  * Duration Ms
11220
11921
  */
11221
- duration_ms?: number | null;
11222
- error?: TaskRunError | null;
11922
+ duration_ms: number | null;
11923
+ /**
11924
+ * Ended At
11925
+ */
11926
+ ended_at: string | null;
11927
+ error: TaskRunError | null;
11223
11928
  /**
11224
11929
  * Id
11225
11930
  */
11226
11931
  id: string;
11932
+ /**
11933
+ * Idempotency Key
11934
+ */
11935
+ idempotency_key: string | null;
11936
+ /**
11937
+ * Metadata
11938
+ */
11939
+ metadata: {
11940
+ [key: string]: string;
11941
+ };
11942
+ /**
11943
+ * Output
11944
+ */
11945
+ output: {
11946
+ [key: string]: unknown;
11947
+ } | null;
11227
11948
  /**
11228
11949
  * Provider Cost
11229
11950
  */
11230
- provider_cost?: number | null;
11951
+ provider_cost: number | null;
11231
11952
  /**
11232
11953
  * Started At
11233
11954
  */
11234
- started_at: string;
11955
+ started_at: string | null;
11235
11956
  /**
11236
11957
  * Status
11237
11958
  */
11238
- status: 'running' | 'completed' | 'failed';
11959
+ status: 'queued' | 'running' | 'completed' | 'failed' | 'canceled';
11960
+ /**
11961
+ * Task Id
11962
+ */
11963
+ task_id: string | null;
11964
+ /**
11965
+ * Task Name
11966
+ */
11967
+ task_name: string | null;
11968
+ /**
11969
+ * Task Version
11970
+ */
11971
+ task_version: number | null;
11972
+ /**
11973
+ * Tries
11974
+ */
11975
+ tries: number;
11239
11976
  };
11240
11977
 
11241
11978
  /**
@@ -11555,6 +12292,84 @@ export type TelephonySetupStep = {
11555
12292
  user_confirmable: boolean;
11556
12293
  };
11557
12294
 
12295
+ /**
12296
+ * TemplateSend
12297
+ */
12298
+ export type TemplateSend = {
12299
+ /**
12300
+ * Id
12301
+ *
12302
+ * Twilio Content SID (HX…) or Gupshup template id.
12303
+ */
12304
+ id: string;
12305
+ /**
12306
+ * Variables
12307
+ *
12308
+ * Every placeholder, button variables included.
12309
+ */
12310
+ variables?: {
12311
+ [key: string]: string;
12312
+ };
12313
+ };
12314
+
12315
+ /**
12316
+ * TestInboundWebhookRequest
12317
+ */
12318
+ export type TestInboundWebhookRequest = {
12319
+ /**
12320
+ * Channel
12321
+ */
12322
+ channel: 'phone_call' | 'whatsapp_call' | 'whatsapp_message' | 'telegram';
12323
+ /**
12324
+ * Number
12325
+ *
12326
+ * Your number, as `to`.
12327
+ */
12328
+ number: string;
12329
+ /**
12330
+ * Peer
12331
+ *
12332
+ * Theirs, as `from`.
12333
+ */
12334
+ peer: string;
12335
+ };
12336
+
12337
+ /**
12338
+ * TestInboundWebhookResponse
12339
+ *
12340
+ * What your server answered to a sample `session.request`.
12341
+ */
12342
+ export type TestInboundWebhookResponse = {
12343
+ /**
12344
+ * Duration Ms
12345
+ */
12346
+ duration_ms: number;
12347
+ /**
12348
+ * Errors
12349
+ */
12350
+ errors: Array<string>;
12351
+ /**
12352
+ * Response
12353
+ *
12354
+ * The JSON object your server returned.
12355
+ */
12356
+ response: {
12357
+ [key: string]: unknown;
12358
+ } | null;
12359
+ /**
12360
+ * Status Code
12361
+ *
12362
+ * Null when no HTTP response arrived.
12363
+ */
12364
+ status_code: number | null;
12365
+ /**
12366
+ * Valid
12367
+ *
12368
+ * Whether a real session would have accepted this answer.
12369
+ */
12370
+ valid: boolean;
12371
+ };
12372
+
11558
12373
  /**
11559
12374
  * TimeWindow
11560
12375
  *
@@ -11593,7 +12408,8 @@ export type TimeWindow = {
11593
12408
  *
11594
12409
  * One browser call: who is on it, what it starts knowing, and what runs.
11595
12410
  *
11596
- * `vars` comes from `AgentPlanRequest` and lasts exactly as long as this call.
12411
+ * `vars` comes from `AgentPlanRequest` and `secrets` from `SessionSecretsField`;
12412
+ * both last exactly as long as this call.
11597
12413
  */
11598
12414
  export type TokenRequest = {
11599
12415
  /**
@@ -11628,6 +12444,14 @@ export type TokenRequest = {
11628
12444
  * Region
11629
12445
  */
11630
12446
  region?: 'us' | 'in';
12447
+ /**
12448
+ * Secrets
12449
+ *
12450
+ * Secrets for this session only, read by tools as {{secrets.NAME}}; a name here overrides the workspace secret. Never shown to the model or returned.
12451
+ */
12452
+ secrets?: {
12453
+ [key: string]: string;
12454
+ } | null;
11631
12455
  /**
11632
12456
  * Userdata
11633
12457
  */
@@ -11637,7 +12461,7 @@ export type TokenRequest = {
11637
12461
  /**
11638
12462
  * Vars
11639
12463
  *
11640
- * Values for the variables the agents on this session declare, read as {{vars.name}} in a prompt, a greeting and a tool. They override each agent's declared default and reach every agent the session runs, including a handoff target. Unlike `userdata`, which describes the PERSON and is kept on their contact record, these describe THIS session and are gone with it. Strings only; an empty string is a deliberate blank, not a request for the default. The model can see them, so put credentials in a workspace secret and read {{secrets.NAME}} from a tool instead.
12464
+ * Values for the variables the agents on this session declare, read as {{vars.name}} in a prompt, a greeting and a tool. They override each agent's declared default and reach every agent the session runs, including a handoff target. Unlike `userdata`, which describes the PERSON and is kept on their contact record, these describe THIS session and are gone with it. Strings only; an empty string is a deliberate blank, not a request for the default. The model can see them, so credentials go in `secrets` (this session's own, where the request takes them) or a workspace secret, read as {{secrets.NAME}} by a tool.
11641
12465
  */
11642
12466
  vars?: {
11643
12467
  [key: string]: string;
@@ -12159,11 +12983,11 @@ export type UpdateFaqEntryRequest = {
12159
12983
  /**
12160
12984
  * Answer
12161
12985
  */
12162
- answer?: string | null;
12986
+ answer?: string;
12163
12987
  /**
12164
12988
  * Question
12165
12989
  */
12166
- question?: string | null;
12990
+ question?: string;
12167
12991
  };
12168
12992
 
12169
12993
  /**
@@ -12248,6 +13072,18 @@ export type VarDeclaration = {
12248
13072
  * Refuse the session rather than resolve this to nothing; a `default` satisfies it. An inbound phone call carries no request to supply values, so a voice agent requiring a variable with no default cannot be assigned to a phone number.
12249
13073
  */
12250
13074
  required?: boolean;
13075
+ /**
13076
+ * Type
13077
+ *
13078
+ * 'file' takes a PDF on a task run. Tasks only.
13079
+ */
13080
+ type?: 'text' | 'file';
13081
+ /**
13082
+ * Untrusted
13083
+ *
13084
+ * Third-party content: given to the model as data, never templated. Tasks only.
13085
+ */
13086
+ untrusted?: boolean;
12251
13087
  };
12252
13088
 
12253
13089
  /**
@@ -13740,8 +14576,14 @@ export type CallsListData = {
13740
14576
  * only calls placed by this outbound batch, retries included
13741
14577
  */
13742
14578
  batch_id?: string | null;
13743
- };
13744
- url: '/v1/calls';
14579
+ /**
14580
+ * Metadata
14581
+ *
14582
+ * `key:value` pairs, all must match.
14583
+ */
14584
+ metadata?: Array<string>;
14585
+ };
14586
+ url: '/v1/calls';
13745
14587
  };
13746
14588
 
13747
14589
  export type CallsListErrors = {
@@ -15251,6 +16093,12 @@ export type ChatsListData = {
15251
16093
  * Status
15252
16094
  */
15253
16095
  status?: 'open' | 'ended' | 'all';
16096
+ /**
16097
+ * Metadata
16098
+ *
16099
+ * `key:value` pairs, all must match.
16100
+ */
16101
+ metadata?: Array<string>;
15254
16102
  };
15255
16103
  url: '/v1/chats';
15256
16104
  };
@@ -15851,6 +16699,55 @@ export type ConversationsListResults = {
15851
16699
 
15852
16700
  export type ConversationsListResult = ConversationsListResults[keyof ConversationsListResults];
15853
16701
 
16702
+ export type ConversationsItemsCreateData = {
16703
+ body: PostItemRequest;
16704
+ path?: never;
16705
+ query?: never;
16706
+ url: '/v1/conversations/items';
16707
+ };
16708
+
16709
+ export type ConversationsItemsCreateErrors = {
16710
+ /**
16711
+ * Well-formed, but rejected by a rule; `detail.errors` lists each problem.
16712
+ */
16713
+ 400: ErrorResponse;
16714
+ /**
16715
+ * Missing credential, or one that is revoked or no longer a member of this organization.
16716
+ */
16717
+ 401: ErrorResponse;
16718
+ /**
16719
+ * Authenticated, but this organization role may not perform the operation.
16720
+ */
16721
+ 403: ErrorResponse;
16722
+ /**
16723
+ * The resource's current state forbids this — a name already taken, a job already running.
16724
+ */
16725
+ 409: ErrorResponse;
16726
+ /**
16727
+ * The request did not match this operation's schema; `detail.errors` lists each field.
16728
+ */
16729
+ 422: ErrorResponse;
16730
+ /**
16731
+ * Unexpected error. Every error this API returns carries this body.
16732
+ */
16733
+ default: ErrorResponse;
16734
+ };
16735
+
16736
+ export type ConversationsItemsCreateError = ConversationsItemsCreateErrors[keyof ConversationsItemsCreateErrors];
16737
+
16738
+ export type ConversationsItemsCreateResults = {
16739
+ /**
16740
+ * Idempotent replay.
16741
+ */
16742
+ 200: ConversationItemResponse;
16743
+ /**
16744
+ * Successful Response
16745
+ */
16746
+ 201: ConversationItemResponse;
16747
+ };
16748
+
16749
+ export type ConversationsItemsCreateResult = ConversationsItemsCreateResults[keyof ConversationsItemsCreateResults];
16750
+
15854
16751
  export type ConversationsGetData = {
15855
16752
  body?: never;
15856
16753
  path: {
@@ -18032,6 +18929,207 @@ export type FaqsEntriesUpdateResults = {
18032
18929
 
18033
18930
  export type FaqsEntriesUpdateResult = FaqsEntriesUpdateResults[keyof FaqsEntriesUpdateResults];
18034
18931
 
18932
+ export type InboundWebhookDeleteData = {
18933
+ body?: never;
18934
+ path?: never;
18935
+ query?: never;
18936
+ url: '/v1/inbound-webhook';
18937
+ };
18938
+
18939
+ export type InboundWebhookDeleteErrors = {
18940
+ /**
18941
+ * Well-formed, but rejected by a rule; `detail.errors` lists each problem.
18942
+ */
18943
+ 400: ErrorResponse;
18944
+ /**
18945
+ * Missing credential, or one that is revoked or no longer a member of this organization.
18946
+ */
18947
+ 401: ErrorResponse;
18948
+ /**
18949
+ * Authenticated, but this organization role may not perform the operation.
18950
+ */
18951
+ 403: ErrorResponse;
18952
+ /**
18953
+ * The resource's current state forbids this — a name already taken, a job already running.
18954
+ */
18955
+ 409: ErrorResponse;
18956
+ /**
18957
+ * Unexpected error. Every error this API returns carries this body.
18958
+ */
18959
+ default: ErrorResponse;
18960
+ };
18961
+
18962
+ export type InboundWebhookDeleteError = InboundWebhookDeleteErrors[keyof InboundWebhookDeleteErrors];
18963
+
18964
+ export type InboundWebhookDeleteResults = {
18965
+ /**
18966
+ * Successful Response
18967
+ */
18968
+ 200: OkResponse;
18969
+ };
18970
+
18971
+ export type InboundWebhookDeleteResult = InboundWebhookDeleteResults[keyof InboundWebhookDeleteResults];
18972
+
18973
+ export type InboundWebhookGetData = {
18974
+ body?: never;
18975
+ path?: never;
18976
+ query?: never;
18977
+ url: '/v1/inbound-webhook';
18978
+ };
18979
+
18980
+ export type InboundWebhookGetErrors = {
18981
+ /**
18982
+ * Missing credential, or one that is revoked or no longer a member of this organization.
18983
+ */
18984
+ 401: ErrorResponse;
18985
+ /**
18986
+ * Unexpected error. Every error this API returns carries this body.
18987
+ */
18988
+ default: ErrorResponse;
18989
+ };
18990
+
18991
+ export type InboundWebhookGetError = InboundWebhookGetErrors[keyof InboundWebhookGetErrors];
18992
+
18993
+ export type InboundWebhookGetResults = {
18994
+ /**
18995
+ * Successful Response
18996
+ */
18997
+ 200: InboundWebhookResponse;
18998
+ };
18999
+
19000
+ export type InboundWebhookGetResult = InboundWebhookGetResults[keyof InboundWebhookGetResults];
19001
+
19002
+ export type InboundWebhookSetData = {
19003
+ body: SetInboundWebhookRequest;
19004
+ path?: never;
19005
+ query?: never;
19006
+ url: '/v1/inbound-webhook';
19007
+ };
19008
+
19009
+ export type InboundWebhookSetErrors = {
19010
+ /**
19011
+ * Well-formed, but rejected by a rule; `detail.errors` lists each problem.
19012
+ */
19013
+ 400: ErrorResponse;
19014
+ /**
19015
+ * Missing credential, or one that is revoked or no longer a member of this organization.
19016
+ */
19017
+ 401: ErrorResponse;
19018
+ /**
19019
+ * Authenticated, but this organization role may not perform the operation.
19020
+ */
19021
+ 403: ErrorResponse;
19022
+ /**
19023
+ * The resource's current state forbids this — a name already taken, a job already running.
19024
+ */
19025
+ 409: ErrorResponse;
19026
+ /**
19027
+ * The request did not match this operation's schema; `detail.errors` lists each field.
19028
+ */
19029
+ 422: ErrorResponse;
19030
+ /**
19031
+ * Unexpected error. Every error this API returns carries this body.
19032
+ */
19033
+ default: ErrorResponse;
19034
+ };
19035
+
19036
+ export type InboundWebhookSetError = InboundWebhookSetErrors[keyof InboundWebhookSetErrors];
19037
+
19038
+ export type InboundWebhookSetResults = {
19039
+ /**
19040
+ * Successful Response
19041
+ */
19042
+ 200: InboundWebhookResponse;
19043
+ };
19044
+
19045
+ export type InboundWebhookSetResult = InboundWebhookSetResults[keyof InboundWebhookSetResults];
19046
+
19047
+ export type InboundWebhookRotateSecretData = {
19048
+ body?: never;
19049
+ path?: never;
19050
+ query?: never;
19051
+ url: '/v1/inbound-webhook/rotate-secret';
19052
+ };
19053
+
19054
+ export type InboundWebhookRotateSecretErrors = {
19055
+ /**
19056
+ * Well-formed, but rejected by a rule; `detail.errors` lists each problem.
19057
+ */
19058
+ 400: ErrorResponse;
19059
+ /**
19060
+ * Missing credential, or one that is revoked or no longer a member of this organization.
19061
+ */
19062
+ 401: ErrorResponse;
19063
+ /**
19064
+ * Authenticated, but this organization role may not perform the operation.
19065
+ */
19066
+ 403: ErrorResponse;
19067
+ /**
19068
+ * The resource's current state forbids this — a name already taken, a job already running.
19069
+ */
19070
+ 409: ErrorResponse;
19071
+ /**
19072
+ * Unexpected error. Every error this API returns carries this body.
19073
+ */
19074
+ default: ErrorResponse;
19075
+ };
19076
+
19077
+ export type InboundWebhookRotateSecretError = InboundWebhookRotateSecretErrors[keyof InboundWebhookRotateSecretErrors];
19078
+
19079
+ export type InboundWebhookRotateSecretResults = {
19080
+ /**
19081
+ * Successful Response
19082
+ */
19083
+ 200: InboundWebhookResponse;
19084
+ };
19085
+
19086
+ export type InboundWebhookRotateSecretResult = InboundWebhookRotateSecretResults[keyof InboundWebhookRotateSecretResults];
19087
+
19088
+ export type InboundWebhookTestData = {
19089
+ body: TestInboundWebhookRequest;
19090
+ path?: never;
19091
+ query?: never;
19092
+ url: '/v1/inbound-webhook/test';
19093
+ };
19094
+
19095
+ export type InboundWebhookTestErrors = {
19096
+ /**
19097
+ * Well-formed, but rejected by a rule; `detail.errors` lists each problem.
19098
+ */
19099
+ 400: ErrorResponse;
19100
+ /**
19101
+ * Missing credential, or one that is revoked or no longer a member of this organization.
19102
+ */
19103
+ 401: ErrorResponse;
19104
+ /**
19105
+ * Authenticated, but this organization role may not perform the operation.
19106
+ */
19107
+ 403: ErrorResponse;
19108
+ /**
19109
+ * The resource's current state forbids this — a name already taken, a job already running.
19110
+ */
19111
+ 409: ErrorResponse;
19112
+ /**
19113
+ * The request did not match this operation's schema; `detail.errors` lists each field.
19114
+ */
19115
+ 422: ErrorResponse;
19116
+ /**
19117
+ * Unexpected error. Every error this API returns carries this body.
19118
+ */
19119
+ default: ErrorResponse;
19120
+ };
19121
+
19122
+ export type InboundWebhookTestError = InboundWebhookTestErrors[keyof InboundWebhookTestErrors];
19123
+
19124
+ export type InboundWebhookTestResults = {
19125
+ /**
19126
+ * Successful Response
19127
+ */
19128
+ 200: TestInboundWebhookResponse;
19129
+ };
19130
+
19131
+ export type InboundWebhookTestResult = InboundWebhookTestResults[keyof InboundWebhookTestResults];
19132
+
18035
19133
  export type IntegrationsListData = {
18036
19134
  body?: never;
18037
19135
  path?: never;
@@ -19090,10 +20188,32 @@ export type TelephonyStreamsUpdateResults = {
19090
20188
 
19091
20189
  export type TelephonyStreamsUpdateResult = TelephonyStreamsUpdateResults[keyof TelephonyStreamsUpdateResults];
19092
20190
 
19093
- export type TasksListData = {
20191
+ export type TaskRunsListData = {
19094
20192
  body?: never;
19095
20193
  path?: never;
19096
20194
  query?: {
20195
+ /**
20196
+ * Task Id
20197
+ */
20198
+ task_id?: string | null;
20199
+ /**
20200
+ * Status
20201
+ */
20202
+ status?: 'queued' | 'running' | 'completed' | 'failed' | 'canceled' | null;
20203
+ /**
20204
+ * Metadata
20205
+ *
20206
+ * `key:value` pairs, all must match.
20207
+ */
20208
+ metadata?: Array<string>;
20209
+ /**
20210
+ * Created After
20211
+ */
20212
+ created_after?: string | null;
20213
+ /**
20214
+ * Created Before
20215
+ */
20216
+ created_before?: string | null;
19097
20217
  /**
19098
20218
  * Limit
19099
20219
  */
@@ -19103,10 +20223,10 @@ export type TasksListData = {
19103
20223
  */
19104
20224
  offset?: number;
19105
20225
  };
19106
- url: '/v1/tasks';
20226
+ url: '/v1/task-runs';
19107
20227
  };
19108
20228
 
19109
- export type TasksListErrors = {
20229
+ export type TaskRunsListErrors = {
19110
20230
  /**
19111
20231
  * Missing credential, or one that is revoked or no longer a member of this organization.
19112
20232
  */
@@ -19121,25 +20241,25 @@ export type TasksListErrors = {
19121
20241
  default: ErrorResponse;
19122
20242
  };
19123
20243
 
19124
- export type TasksListError = TasksListErrors[keyof TasksListErrors];
20244
+ export type TaskRunsListError = TaskRunsListErrors[keyof TaskRunsListErrors];
19125
20245
 
19126
- export type TasksListResults = {
20246
+ export type TaskRunsListResults = {
19127
20247
  /**
19128
20248
  * Successful Response
19129
20249
  */
19130
- 200: PageTaskResponse;
20250
+ 200: PageTaskRunSummary;
19131
20251
  };
19132
20252
 
19133
- export type TasksListResult = TasksListResults[keyof TasksListResults];
20253
+ export type TaskRunsListResult = TaskRunsListResults[keyof TaskRunsListResults];
19134
20254
 
19135
- export type TasksCreateData = {
19136
- body: CreateTaskRequest;
20255
+ export type TaskRunsCreateData = {
20256
+ body: CreateTaskRunRequest;
19137
20257
  path?: never;
19138
20258
  query?: never;
19139
- url: '/v1/tasks';
20259
+ url: '/v1/task-runs';
19140
20260
  };
19141
20261
 
19142
- export type TasksCreateErrors = {
20262
+ export type TaskRunsCreateErrors = {
19143
20263
  /**
19144
20264
  * Well-formed, but rejected by a rule; `detail.errors` lists each problem.
19145
20265
  */
@@ -19166,30 +20286,124 @@ export type TasksCreateErrors = {
19166
20286
  default: ErrorResponse;
19167
20287
  };
19168
20288
 
19169
- export type TasksCreateError = TasksCreateErrors[keyof TasksCreateErrors];
20289
+ export type TaskRunsCreateError = TaskRunsCreateErrors[keyof TaskRunsCreateErrors];
19170
20290
 
19171
- export type TasksCreateResults = {
20291
+ export type TaskRunsCreateResults = {
19172
20292
  /**
19173
20293
  * Successful Response
19174
20294
  */
19175
- 201: TaskResponse;
20295
+ 200: TaskRunResponse;
20296
+ /**
20297
+ * Queued (`background: true`).
20298
+ */
20299
+ 202: TaskRunResponse;
19176
20300
  };
19177
20301
 
19178
- export type TasksCreateResult = TasksCreateResults[keyof TasksCreateResults];
20302
+ export type TaskRunsCreateResult = TaskRunsCreateResults[keyof TaskRunsCreateResults];
19179
20303
 
19180
- export type TasksDeleteData = {
20304
+ export type TaskRunsCreateBatchData = {
20305
+ body: CreateTaskRunBatchRequest;
20306
+ path?: never;
20307
+ query?: never;
20308
+ url: '/v1/task-runs/batch';
20309
+ };
20310
+
20311
+ export type TaskRunsCreateBatchErrors = {
20312
+ /**
20313
+ * Well-formed, but rejected by a rule; `detail.errors` lists each problem.
20314
+ */
20315
+ 400: ErrorResponse;
20316
+ /**
20317
+ * Missing credential, or one that is revoked or no longer a member of this organization.
20318
+ */
20319
+ 401: ErrorResponse;
20320
+ /**
20321
+ * Authenticated, but this organization role may not perform the operation.
20322
+ */
20323
+ 403: ErrorResponse;
20324
+ /**
20325
+ * The resource's current state forbids this — a name already taken, a job already running.
20326
+ */
20327
+ 409: ErrorResponse;
20328
+ /**
20329
+ * The request did not match this operation's schema; `detail.errors` lists each field.
20330
+ */
20331
+ 422: ErrorResponse;
20332
+ /**
20333
+ * Unexpected error. Every error this API returns carries this body.
20334
+ */
20335
+ default: ErrorResponse;
20336
+ };
20337
+
20338
+ export type TaskRunsCreateBatchError = TaskRunsCreateBatchErrors[keyof TaskRunsCreateBatchErrors];
20339
+
20340
+ export type TaskRunsCreateBatchResults = {
20341
+ /**
20342
+ * Successful Response
20343
+ */
20344
+ 202: TaskRunBatchResponse;
20345
+ };
20346
+
20347
+ export type TaskRunsCreateBatchResult = TaskRunsCreateBatchResults[keyof TaskRunsCreateBatchResults];
20348
+
20349
+ export type TaskRunsDeleteManyData = {
20350
+ body: DeleteTaskRunsRequest;
20351
+ path?: never;
20352
+ query?: never;
20353
+ url: '/v1/task-runs/delete';
20354
+ };
20355
+
20356
+ export type TaskRunsDeleteManyErrors = {
20357
+ /**
20358
+ * Well-formed, but rejected by a rule; `detail.errors` lists each problem.
20359
+ */
20360
+ 400: ErrorResponse;
20361
+ /**
20362
+ * Missing credential, or one that is revoked or no longer a member of this organization.
20363
+ */
20364
+ 401: ErrorResponse;
20365
+ /**
20366
+ * Authenticated, but this organization role may not perform the operation.
20367
+ */
20368
+ 403: ErrorResponse;
20369
+ /**
20370
+ * The resource's current state forbids this — a name already taken, a job already running.
20371
+ */
20372
+ 409: ErrorResponse;
20373
+ /**
20374
+ * The request did not match this operation's schema; `detail.errors` lists each field.
20375
+ */
20376
+ 422: ErrorResponse;
20377
+ /**
20378
+ * Unexpected error. Every error this API returns carries this body.
20379
+ */
20380
+ default: ErrorResponse;
20381
+ };
20382
+
20383
+ export type TaskRunsDeleteManyError = TaskRunsDeleteManyErrors[keyof TaskRunsDeleteManyErrors];
20384
+
20385
+ export type TaskRunsDeleteManyResults = {
20386
+ /**
20387
+ * Successful Response
20388
+ */
20389
+ 202: DeleteTaskRunsResponse;
20390
+ };
20391
+
20392
+ export type TaskRunsDeleteManyResult = TaskRunsDeleteManyResults[keyof TaskRunsDeleteManyResults];
20393
+
20394
+ export type TaskRunsDeleteData = {
19181
20395
  body?: never;
19182
20396
  path: {
19183
20397
  /**
19184
- * Task Id
20398
+ * Run Id
19185
20399
  */
19186
- task_id: string;
20400
+ run_id: string;
19187
20401
  };
19188
20402
  query?: never;
19189
- url: '/v1/tasks/{task_id}';
20403
+ url: '/v1/task-runs/{run_id}';
19190
20404
  };
19191
20405
 
19192
- export type TasksDeleteErrors = {
20406
+ export type TaskRunsDeleteErrors = {
19193
20407
  /**
19194
20408
  * Well-formed, but rejected by a rule; `detail.errors` lists each problem.
19195
20409
  */
@@ -19220,30 +20434,28 @@ export type TasksDeleteErrors = {
19220
20434
  default: ErrorResponse;
19221
20435
  };
19222
20436
 
19223
- export type TasksDeleteError = TasksDeleteErrors[keyof TasksDeleteErrors];
20437
+ export type TaskRunsDeleteError = TaskRunsDeleteErrors[keyof TaskRunsDeleteErrors];
19224
20438
 
19225
- export type TasksDeleteResults = {
20439
+ export type TaskRunsDeleteResults = {
19226
20440
  /**
19227
- * Successful Response
20441
+ * Deletion scheduled. No body.
19228
20442
  */
19229
- 200: OkResponse;
20443
+ 202: unknown;
19230
20444
  };
19231
20445
 
19232
- export type TasksDeleteResult = TasksDeleteResults[keyof TasksDeleteResults];
19233
-
19234
- export type TasksGetData = {
20446
+ export type TaskRunsGetData = {
19235
20447
  body?: never;
19236
20448
  path: {
19237
20449
  /**
19238
- * Task Id
20450
+ * Run Id
19239
20451
  */
19240
- task_id: string;
20452
+ run_id: string;
19241
20453
  };
19242
20454
  query?: never;
19243
- url: '/v1/tasks/{task_id}';
20455
+ url: '/v1/task-runs/{run_id}';
19244
20456
  };
19245
20457
 
19246
- export type TasksGetErrors = {
20458
+ export type TaskRunsGetErrors = {
19247
20459
  /**
19248
20460
  * Missing credential, or one that is revoked or no longer a member of this organization.
19249
20461
  */
@@ -19262,30 +20474,30 @@ export type TasksGetErrors = {
19262
20474
  default: ErrorResponse;
19263
20475
  };
19264
20476
 
19265
- export type TasksGetError = TasksGetErrors[keyof TasksGetErrors];
20477
+ export type TaskRunsGetError = TaskRunsGetErrors[keyof TaskRunsGetErrors];
19266
20478
 
19267
- export type TasksGetResults = {
20479
+ export type TaskRunsGetResults = {
19268
20480
  /**
19269
20481
  * Successful Response
19270
20482
  */
19271
- 200: TaskResponse;
20483
+ 200: TaskRunResponse;
19272
20484
  };
19273
20485
 
19274
- export type TasksGetResult = TasksGetResults[keyof TasksGetResults];
20486
+ export type TaskRunsGetResult = TaskRunsGetResults[keyof TaskRunsGetResults];
19275
20487
 
19276
- export type TasksUpdateData = {
19277
- body: PatchTaskRequest;
20488
+ export type TaskRunsCancelData = {
20489
+ body?: never;
19278
20490
  path: {
19279
20491
  /**
19280
- * Task Id
20492
+ * Run Id
19281
20493
  */
19282
- task_id: string;
20494
+ run_id: string;
19283
20495
  };
19284
20496
  query?: never;
19285
- url: '/v1/tasks/{task_id}';
20497
+ url: '/v1/task-runs/{run_id}/cancel';
19286
20498
  };
19287
20499
 
19288
- export type TasksUpdateErrors = {
20500
+ export type TaskRunsCancelErrors = {
19289
20501
  /**
19290
20502
  * Well-formed, but rejected by a rule; `detail.errors` lists each problem.
19291
20503
  */
@@ -19316,18 +20528,105 @@ export type TasksUpdateErrors = {
19316
20528
  default: ErrorResponse;
19317
20529
  };
19318
20530
 
19319
- export type TasksUpdateError = TasksUpdateErrors[keyof TasksUpdateErrors];
20531
+ export type TaskRunsCancelError = TaskRunsCancelErrors[keyof TaskRunsCancelErrors];
19320
20532
 
19321
- export type TasksUpdateResults = {
20533
+ export type TaskRunsCancelResults = {
19322
20534
  /**
19323
20535
  * Successful Response
19324
20536
  */
19325
- 200: TaskResponse;
20537
+ 200: TaskRunResponse;
19326
20538
  };
19327
20539
 
19328
- export type TasksUpdateResult = TasksUpdateResults[keyof TasksUpdateResults];
20540
+ export type TaskRunsCancelResult = TaskRunsCancelResults[keyof TaskRunsCancelResults];
19329
20541
 
19330
- export type TasksPublishData = {
20542
+ export type TasksListData = {
20543
+ body?: never;
20544
+ path?: never;
20545
+ query?: {
20546
+ /**
20547
+ * Limit
20548
+ */
20549
+ limit?: number;
20550
+ /**
20551
+ * Offset
20552
+ */
20553
+ offset?: number;
20554
+ };
20555
+ url: '/v1/tasks';
20556
+ };
20557
+
20558
+ export type TasksListErrors = {
20559
+ /**
20560
+ * Missing credential, or one that is revoked or no longer a member of this organization.
20561
+ */
20562
+ 401: ErrorResponse;
20563
+ /**
20564
+ * The request did not match this operation's schema; `detail.errors` lists each field.
20565
+ */
20566
+ 422: ErrorResponse;
20567
+ /**
20568
+ * Unexpected error. Every error this API returns carries this body.
20569
+ */
20570
+ default: ErrorResponse;
20571
+ };
20572
+
20573
+ export type TasksListError = TasksListErrors[keyof TasksListErrors];
20574
+
20575
+ export type TasksListResults = {
20576
+ /**
20577
+ * Successful Response
20578
+ */
20579
+ 200: PageTaskResponse;
20580
+ };
20581
+
20582
+ export type TasksListResult = TasksListResults[keyof TasksListResults];
20583
+
20584
+ export type TasksCreateData = {
20585
+ body: CreateTaskRequest;
20586
+ path?: never;
20587
+ query?: never;
20588
+ url: '/v1/tasks';
20589
+ };
20590
+
20591
+ export type TasksCreateErrors = {
20592
+ /**
20593
+ * Well-formed, but rejected by a rule; `detail.errors` lists each problem.
20594
+ */
20595
+ 400: ErrorResponse;
20596
+ /**
20597
+ * Missing credential, or one that is revoked or no longer a member of this organization.
20598
+ */
20599
+ 401: ErrorResponse;
20600
+ /**
20601
+ * Authenticated, but this organization role may not perform the operation.
20602
+ */
20603
+ 403: ErrorResponse;
20604
+ /**
20605
+ * The resource's current state forbids this — a name already taken, a job already running.
20606
+ */
20607
+ 409: ErrorResponse;
20608
+ /**
20609
+ * The request did not match this operation's schema; `detail.errors` lists each field.
20610
+ */
20611
+ 422: ErrorResponse;
20612
+ /**
20613
+ * Unexpected error. Every error this API returns carries this body.
20614
+ */
20615
+ default: ErrorResponse;
20616
+ };
20617
+
20618
+ export type TasksCreateError = TasksCreateErrors[keyof TasksCreateErrors];
20619
+
20620
+ export type TasksCreateResults = {
20621
+ /**
20622
+ * Successful Response
20623
+ */
20624
+ 201: TaskResponse;
20625
+ };
20626
+
20627
+ export type TasksCreateResult = TasksCreateResults[keyof TasksCreateResults];
20628
+
20629
+ export type TasksDeleteData = {
19331
20630
  body?: never;
19332
20631
  path: {
19333
20632
  /**
@@ -19336,10 +20635,10 @@ export type TasksPublishData = {
19336
20635
  task_id: string;
19337
20636
  };
19338
20637
  query?: never;
19339
- url: '/v1/tasks/{task_id}/publish';
20638
+ url: '/v1/tasks/{task_id}';
19340
20639
  };
19341
20640
 
19342
- export type TasksPublishErrors = {
20641
+ export type TasksDeleteErrors = {
19343
20642
  /**
19344
20643
  * Well-formed, but rejected by a rule; `detail.errors` lists each problem.
19345
20644
  */
@@ -19370,18 +20669,18 @@ export type TasksPublishErrors = {
19370
20669
  default: ErrorResponse;
19371
20670
  };
19372
20671
 
19373
- export type TasksPublishError = TasksPublishErrors[keyof TasksPublishErrors];
20672
+ export type TasksDeleteError = TasksDeleteErrors[keyof TasksDeleteErrors];
19374
20673
 
19375
- export type TasksPublishResults = {
20674
+ export type TasksDeleteResults = {
19376
20675
  /**
19377
20676
  * Successful Response
19378
20677
  */
19379
- 200: PublishTaskResponse;
20678
+ 200: OkResponse;
19380
20679
  };
19381
20680
 
19382
- export type TasksPublishResult = TasksPublishResults[keyof TasksPublishResults];
20681
+ export type TasksDeleteResult = TasksDeleteResults[keyof TasksDeleteResults];
19383
20682
 
19384
- export type TasksRunsListData = {
20683
+ export type TasksGetData = {
19385
20684
  body?: never;
19386
20685
  path: {
19387
20686
  /**
@@ -19389,20 +20688,11 @@ export type TasksRunsListData = {
19389
20688
  */
19390
20689
  task_id: string;
19391
20690
  };
19392
- query?: {
19393
- /**
19394
- * Limit
19395
- */
19396
- limit?: number;
19397
- /**
19398
- * Offset
19399
- */
19400
- offset?: number;
19401
- };
19402
- url: '/v1/tasks/{task_id}/runs';
20691
+ query?: never;
20692
+ url: '/v1/tasks/{task_id}';
19403
20693
  };
19404
20694
 
19405
- export type TasksRunsListErrors = {
20695
+ export type TasksGetErrors = {
19406
20696
  /**
19407
20697
  * Missing credential, or one that is revoked or no longer a member of this organization.
19408
20698
  */
@@ -19421,19 +20711,19 @@ export type TasksRunsListErrors = {
19421
20711
  default: ErrorResponse;
19422
20712
  };
19423
20713
 
19424
- export type TasksRunsListError = TasksRunsListErrors[keyof TasksRunsListErrors];
20714
+ export type TasksGetError = TasksGetErrors[keyof TasksGetErrors];
19425
20715
 
19426
- export type TasksRunsListResults = {
20716
+ export type TasksGetResults = {
19427
20717
  /**
19428
20718
  * Successful Response
19429
20719
  */
19430
- 200: PageTaskRunResponse;
20720
+ 200: TaskResponse;
19431
20721
  };
19432
20722
 
19433
- export type TasksRunsListResult = TasksRunsListResults[keyof TasksRunsListResults];
20723
+ export type TasksGetResult = TasksGetResults[keyof TasksGetResults];
19434
20724
 
19435
- export type TasksRunsCreateData = {
19436
- body: RunTaskRequest;
20725
+ export type TasksUpdateData = {
20726
+ body: PatchTaskRequest;
19437
20727
  path: {
19438
20728
  /**
19439
20729
  * Task Id
@@ -19441,10 +20731,10 @@ export type TasksRunsCreateData = {
19441
20731
  task_id: string;
19442
20732
  };
19443
20733
  query?: never;
19444
- url: '/v1/tasks/{task_id}/runs';
20734
+ url: '/v1/tasks/{task_id}';
19445
20735
  };
19446
20736
 
19447
- export type TasksRunsCreateErrors = {
20737
+ export type TasksUpdateErrors = {
19448
20738
  /**
19449
20739
  * Well-formed, but rejected by a rule; `detail.errors` lists each problem.
19450
20740
  */
@@ -19475,42 +20765,50 @@ export type TasksRunsCreateErrors = {
19475
20765
  default: ErrorResponse;
19476
20766
  };
19477
20767
 
19478
- export type TasksRunsCreateError = TasksRunsCreateErrors[keyof TasksRunsCreateErrors];
20768
+ export type TasksUpdateError = TasksUpdateErrors[keyof TasksUpdateErrors];
19479
20769
 
19480
- export type TasksRunsCreateResults = {
20770
+ export type TasksUpdateResults = {
19481
20771
  /**
19482
20772
  * Successful Response
19483
20773
  */
19484
- 200: TaskRunResponse;
20774
+ 200: TaskResponse;
19485
20775
  };
19486
20776
 
19487
- export type TasksRunsCreateResult = TasksRunsCreateResults[keyof TasksRunsCreateResults];
20777
+ export type TasksUpdateResult = TasksUpdateResults[keyof TasksUpdateResults];
19488
20778
 
19489
- export type TasksRunsGetData = {
20779
+ export type TasksPublishData = {
19490
20780
  body?: never;
19491
20781
  path: {
19492
20782
  /**
19493
20783
  * Task Id
19494
20784
  */
19495
20785
  task_id: string;
19496
- /**
19497
- * Run Id
19498
- */
19499
- run_id: string;
19500
20786
  };
19501
20787
  query?: never;
19502
- url: '/v1/tasks/{task_id}/runs/{run_id}';
20788
+ url: '/v1/tasks/{task_id}/publish';
19503
20789
  };
19504
20790
 
19505
- export type TasksRunsGetErrors = {
20791
+ export type TasksPublishErrors = {
20792
+ /**
20793
+ * Well-formed, but rejected by a rule; `detail.errors` lists each problem.
20794
+ */
20795
+ 400: ErrorResponse;
19506
20796
  /**
19507
20797
  * Missing credential, or one that is revoked or no longer a member of this organization.
19508
20798
  */
19509
20799
  401: ErrorResponse;
20800
+ /**
20801
+ * Authenticated, but this organization role may not perform the operation.
20802
+ */
20803
+ 403: ErrorResponse;
19510
20804
  /**
19511
20805
  * No such resource in this organization.
19512
20806
  */
19513
20807
  404: ErrorResponse;
20808
+ /**
20809
+ * The resource's current state forbids this — a name already taken, a job already running.
20810
+ */
20811
+ 409: ErrorResponse;
19514
20812
  /**
19515
20813
  * The request did not match this operation's schema; `detail.errors` lists each field.
19516
20814
  */
@@ -19521,16 +20819,16 @@ export type TasksRunsGetErrors = {
19521
20819
  default: ErrorResponse;
19522
20820
  };
19523
20821
 
19524
- export type TasksRunsGetError = TasksRunsGetErrors[keyof TasksRunsGetErrors];
20822
+ export type TasksPublishError = TasksPublishErrors[keyof TasksPublishErrors];
19525
20823
 
19526
- export type TasksRunsGetResults = {
20824
+ export type TasksPublishResults = {
19527
20825
  /**
19528
20826
  * Successful Response
19529
20827
  */
19530
- 200: TaskRunResponse;
20828
+ 200: PublishTaskResponse;
19531
20829
  };
19532
20830
 
19533
- export type TasksRunsGetResult = TasksRunsGetResults[keyof TasksRunsGetResults];
20831
+ export type TasksPublishResult = TasksPublishResults[keyof TasksPublishResults];
19534
20832
 
19535
20833
  export type TasksValidateData = {
19536
20834
  body?: never;