@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.
@@ -182,7 +182,7 @@ export type AgentConfig = {
182
182
  /**
183
183
  * Greeting
184
184
  *
185
- * 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.
185
+ * 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.
186
186
  */
187
187
  greeting?: string | null;
188
188
  /**
@@ -197,6 +197,12 @@ export type AgentConfig = {
197
197
  * 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.
198
198
  */
199
199
  handoffs?: Array<HandoffTarget>;
200
+ /**
201
+ * Inbound Webhook
202
+ *
203
+ * 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.
204
+ */
205
+ inbound_webhook?: boolean;
200
206
  keypad_input?: KeypadInputSpec;
201
207
  /**
202
208
  * Language
@@ -318,7 +324,7 @@ export type AgentOverride = {
318
324
  /**
319
325
  * Greeting
320
326
  *
321
- * 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.
327
+ * 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.
322
328
  */
323
329
  greeting?: string | null;
324
330
  /**
@@ -333,6 +339,12 @@ export type AgentOverride = {
333
339
  * 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.
334
340
  */
335
341
  handoffs?: Array<HandoffTarget> | null;
342
+ /**
343
+ * Inbound Webhook
344
+ *
345
+ * 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.
346
+ */
347
+ inbound_webhook?: boolean | null;
336
348
  keypad_input?: KeypadInputSpecOverride | null;
337
349
  /**
338
350
  * Language
@@ -1169,6 +1181,19 @@ export type BuiltinToolSpec = {
1169
1181
  */
1170
1182
  type: string;
1171
1183
  };
1184
+ /**
1185
+ * ButtonTap
1186
+ */
1187
+ export type ButtonTap = {
1188
+ /**
1189
+ * Payload
1190
+ */
1191
+ payload?: string | null;
1192
+ /**
1193
+ * Text
1194
+ */
1195
+ text: string;
1196
+ };
1172
1197
  /**
1173
1198
  * CallBatchCounts
1174
1199
  */
@@ -1498,6 +1523,14 @@ export type CallSessionResponse = {
1498
1523
  * Livekit Room
1499
1524
  */
1500
1525
  livekit_room: string | null;
1526
+ /**
1527
+ * Metadata
1528
+ *
1529
+ * Your own labels for this session, set by your inbound webhook.
1530
+ */
1531
+ metadata: {
1532
+ [key: string]: string;
1533
+ };
1501
1534
  /**
1502
1535
  * Phone Number Id
1503
1536
  */
@@ -1634,6 +1667,14 @@ export type CallSummaryResponse = {
1634
1667
  * Message Count
1635
1668
  */
1636
1669
  message_count?: number;
1670
+ /**
1671
+ * Metadata
1672
+ *
1673
+ * Your own labels for this session, set by your inbound webhook.
1674
+ */
1675
+ metadata: {
1676
+ [key: string]: string;
1677
+ };
1637
1678
  /**
1638
1679
  * Outcome
1639
1680
  */
@@ -1891,6 +1932,14 @@ export type ChatResponse = {
1891
1932
  * Id
1892
1933
  */
1893
1934
  id: string;
1935
+ /**
1936
+ * Metadata
1937
+ *
1938
+ * Your own labels for this session, set by your inbound webhook.
1939
+ */
1940
+ metadata: {
1941
+ [key: string]: string;
1942
+ };
1894
1943
  /**
1895
1944
  * Started At
1896
1945
  */
@@ -2140,10 +2189,24 @@ export type ConversationItemResponse = {
2140
2189
  * Attachments
2141
2190
  */
2142
2191
  attachments: Array<ConversationAttachment>;
2192
+ /**
2193
+ * Who at your business posted this.
2194
+ */
2195
+ author: ItemAuthor | null;
2196
+ /**
2197
+ * Channel
2198
+ *
2199
+ * How this item reached us or the person; null for notes and instructions.
2200
+ */
2201
+ channel: 'phone_call' | 'whatsapp_call' | 'whatsapp_message' | 'web_call' | 'chat' | 'telegram' | 'stream' | 'copilot' | null;
2143
2202
  /**
2144
2203
  * Client Message Id
2145
2204
  */
2146
2205
  client_message_id: string | null;
2206
+ /**
2207
+ * What the person sent besides text; null for plain text.
2208
+ */
2209
+ content: InboundContent | null;
2147
2210
  /**
2148
2211
  * Conversation Id
2149
2212
  */
@@ -2156,7 +2219,7 @@ export type ConversationItemResponse = {
2156
2219
  /**
2157
2220
  * Delivery Status
2158
2221
  */
2159
- delivery_status: 'not_applicable' | 'pending' | 'sending' | 'sent' | 'failed' | 'skipped';
2222
+ delivery_status: 'not_applicable' | 'pending' | 'held' | 'sending' | 'queued' | 'sent' | 'delivered' | 'read' | 'undelivered' | 'failed' | 'skipped' | 'expired';
2160
2223
  /**
2161
2224
  * Direction
2162
2225
  */
@@ -2169,6 +2232,16 @@ export type ConversationItemResponse = {
2169
2232
  * Id
2170
2233
  */
2171
2234
  id: string;
2235
+ /**
2236
+ * Idempotency Key
2237
+ */
2238
+ idempotency_key: string | null;
2239
+ /**
2240
+ * Images Not Kept
2241
+ *
2242
+ * Images the person sent that were not stored, and why.
2243
+ */
2244
+ images_not_kept: Array<ImageNotKept>;
2172
2245
  latency: ReplyLatency | null;
2173
2246
  /**
2174
2247
  * Metadata
@@ -2181,6 +2254,12 @@ export type ConversationItemResponse = {
2181
2254
  * Origin
2182
2255
  */
2183
2256
  origin: 'speech' | 'typed' | 'keypad' | null;
2257
+ /**
2258
+ * Post Type
2259
+ *
2260
+ * What was posted through the API; null for everything else.
2261
+ */
2262
+ post_type: 'template' | 'agent_text' | 'note' | 'instruction' | null;
2184
2263
  /**
2185
2264
  * Provider Message Id
2186
2265
  */
@@ -2203,10 +2282,6 @@ export type ConversationItemResponse = {
2203
2282
  * Session Id
2204
2283
  */
2205
2284
  session_id: string | null;
2206
- /**
2207
- * Source
2208
- */
2209
- source: string | null;
2210
2285
  /**
2211
2286
  * Text
2212
2287
  */
@@ -2242,32 +2317,46 @@ export type ConversationItemResponse = {
2242
2317
  * The contact this conversation belongs to: key, binding, and what we know.
2243
2318
  */
2244
2319
  export type ConversationRefSummary = {
2245
- /**
2246
- * Bind Id
2247
- */
2248
- bind_id?: string | null;
2249
2320
  /**
2250
2321
  * Contact Key
2251
2322
  */
2252
- contact_key?: string | null;
2323
+ contact_key: string;
2253
2324
  /**
2254
2325
  * Display Name
2255
2326
  */
2256
- display_name?: string | null;
2327
+ display_name: string | null;
2257
2328
  /**
2258
2329
  * Integration Id
2259
2330
  */
2260
- integration_id?: string | null;
2331
+ integration_id: string | null;
2261
2332
  /**
2262
2333
  * Kind
2263
2334
  */
2264
- kind?: string | null;
2335
+ kind: 'phone' | 'integration' | 'stream' | 'web';
2265
2336
  /**
2266
2337
  * Metadata
2267
2338
  */
2268
- metadata?: {
2339
+ metadata: {
2269
2340
  [key: string]: unknown;
2270
2341
  };
2342
+ /**
2343
+ * Number
2344
+ *
2345
+ * Your number, on a phone contact.
2346
+ */
2347
+ number: string | null;
2348
+ /**
2349
+ * Peer
2350
+ *
2351
+ * Their number, on a phone contact.
2352
+ */
2353
+ peer: string | null;
2354
+ /**
2355
+ * Whatsapp Window Expires At
2356
+ *
2357
+ * When free-form WhatsApp messages stop being allowed; null if they never contacted you on WhatsApp.
2358
+ */
2359
+ whatsapp_window_expires_at: string | null;
2271
2360
  };
2272
2361
  /**
2273
2362
  * ConversationResponse
@@ -2395,6 +2484,14 @@ export type ConversationSessionResponse = {
2395
2484
  * Integration Id
2396
2485
  */
2397
2486
  integration_id: string | null;
2487
+ /**
2488
+ * Metadata
2489
+ *
2490
+ * Your own labels for this session, set by your inbound webhook.
2491
+ */
2492
+ metadata: {
2493
+ [key: string]: string;
2494
+ };
2398
2495
  metrics: SessionMetrics;
2399
2496
  /**
2400
2497
  * Started At
@@ -2896,7 +2993,7 @@ export type CreateCallBatchRequest = {
2896
2993
  /**
2897
2994
  * Vars
2898
2995
  *
2899
- * 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.
2996
+ * 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.
2900
2997
  */
2901
2998
  vars?: {
2902
2999
  [key: string]: string;
@@ -2907,7 +3004,8 @@ export type CreateCallBatchRequest = {
2907
3004
  *
2908
3005
  * Who the chat is with, what it starts knowing, and what runs.
2909
3006
  *
2910
- * `vars` comes from `AgentPlanRequest` and is fixed for the life of the chat.
3007
+ * `vars` comes from `AgentPlanRequest` and `secrets` from `SessionSecretsField`;
3008
+ * both are fixed for the life of the chat.
2911
3009
  */
2912
3010
  export type CreateChatRequest = {
2913
3011
  /**
@@ -2938,6 +3036,14 @@ export type CreateChatRequest = {
2938
3036
  * Contact Key
2939
3037
  */
2940
3038
  contact_key?: string | null;
3039
+ /**
3040
+ * Secrets
3041
+ *
3042
+ * 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.
3043
+ */
3044
+ secrets?: {
3045
+ [key: string]: string;
3046
+ } | null;
2941
3047
  /**
2942
3048
  * Userdata
2943
3049
  */
@@ -2947,7 +3053,7 @@ export type CreateChatRequest = {
2947
3053
  /**
2948
3054
  * Vars
2949
3055
  *
2950
- * 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.
3056
+ * 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.
2951
3057
  */
2952
3058
  vars?: {
2953
3059
  [key: string]: string;
@@ -3069,7 +3175,7 @@ export type CreateEmailSendRequest = {
3069
3175
  /**
3070
3176
  * From Email
3071
3177
  */
3072
- from_email?: string | null;
3178
+ from_email?: string;
3073
3179
  /**
3074
3180
  * From Name
3075
3181
  */
@@ -3091,7 +3197,7 @@ export type CreateEmailSendRequest = {
3091
3197
  /**
3092
3198
  * Send Attempts
3093
3199
  */
3094
- send_attempts?: number | null;
3200
+ send_attempts?: number;
3095
3201
  /**
3096
3202
  * Send Daily Cap
3097
3203
  */
@@ -3103,11 +3209,11 @@ export type CreateEmailSendRequest = {
3103
3209
  /**
3104
3210
  * Send Gap Seconds
3105
3211
  */
3106
- send_gap_seconds?: number | null;
3212
+ send_gap_seconds?: number;
3107
3213
  /**
3108
3214
  * Send Retry After Minutes
3109
3215
  */
3110
- send_retry_after_minutes?: number | null;
3216
+ send_retry_after_minutes?: number;
3111
3217
  /**
3112
3218
  * Start At
3113
3219
  */
@@ -3115,7 +3221,7 @@ export type CreateEmailSendRequest = {
3115
3221
  /**
3116
3222
  * Timezone
3117
3223
  */
3118
- timezone?: string | null;
3224
+ timezone?: string;
3119
3225
  window?: TimeWindow | null;
3120
3226
  };
3121
3227
  /**
@@ -3272,6 +3378,96 @@ export type CreateStreamConnectionRequest = {
3272
3378
  export type CreateTaskRequest = {
3273
3379
  config: TaskConfig;
3274
3380
  };
3381
+ /**
3382
+ * CreateTaskRunBatchRequest
3383
+ */
3384
+ export type CreateTaskRunBatchRequest = {
3385
+ /**
3386
+ * Runs
3387
+ */
3388
+ runs: Array<RunItem>;
3389
+ /**
3390
+ * A complete task definition, run and stored nowhere else.
3391
+ */
3392
+ task?: TaskConfig | null;
3393
+ /**
3394
+ * Task Id
3395
+ *
3396
+ * A task in this workspace. Exclusive with `task`.
3397
+ */
3398
+ task_id?: string | null;
3399
+ /**
3400
+ * Changes for this run only: objects deep-merge, lists replace, null clears.
3401
+ */
3402
+ task_override?: TaskPatch | null;
3403
+ /**
3404
+ * Task Version
3405
+ *
3406
+ * Which version of `task_id` to run. Omit for the published one; `"draft"` runs the unpublished config, held to the publish checks.
3407
+ */
3408
+ task_version?: number | 'draft' | null;
3409
+ };
3410
+ /**
3411
+ * CreateTaskRunRequest
3412
+ */
3413
+ export type CreateTaskRunRequest = {
3414
+ /**
3415
+ * Background
3416
+ *
3417
+ * Queue the run and return at once (202) instead of waiting for its result.
3418
+ */
3419
+ background?: boolean;
3420
+ /**
3421
+ * Files
3422
+ *
3423
+ * One PDF per declared `file` input, by name.
3424
+ */
3425
+ files?: {
3426
+ [key: string]: FileInput;
3427
+ };
3428
+ /**
3429
+ * Idempotency Key
3430
+ *
3431
+ * Resending the same key returns the existing run instead of starting another.
3432
+ */
3433
+ idempotency_key?: string | null;
3434
+ /**
3435
+ * Metadata
3436
+ *
3437
+ * Up to 16 string labels of your own, for filtering.
3438
+ */
3439
+ metadata?: {
3440
+ [key: string]: unknown | string;
3441
+ };
3442
+ /**
3443
+ * A complete task definition, run and stored nowhere else.
3444
+ */
3445
+ task?: TaskConfig | null;
3446
+ /**
3447
+ * Task Id
3448
+ *
3449
+ * A task in this workspace. Exclusive with `task`.
3450
+ */
3451
+ task_id?: string | null;
3452
+ /**
3453
+ * Changes for this run only: objects deep-merge, lists replace, null clears.
3454
+ */
3455
+ task_override?: TaskPatch | null;
3456
+ /**
3457
+ * Task Version
3458
+ *
3459
+ * Which version of `task_id` to run. Omit for the published one; `"draft"` runs the unpublished config, held to the publish checks.
3460
+ */
3461
+ task_version?: number | 'draft' | null;
3462
+ /**
3463
+ * Vars
3464
+ *
3465
+ * Values for the task's text inputs, by name. Undeclared names are refused.
3466
+ */
3467
+ vars?: {
3468
+ [key: string]: string;
3469
+ };
3470
+ };
3275
3471
  /**
3276
3472
  * CreateTelephonyAccountRequest
3277
3473
  */
@@ -3360,11 +3556,11 @@ export type CreateWhatsAppBatchRequest = {
3360
3556
  *
3361
3557
  * Sends per row, the first included, while Meta's per-person limit holds it back.
3362
3558
  */
3363
- delivery_attempts?: number | null;
3559
+ delivery_attempts?: number;
3364
3560
  /**
3365
3561
  * Delivery Retry After Hours
3366
3562
  */
3367
- delivery_retry_after_hours?: number | null;
3563
+ delivery_retry_after_hours?: number;
3368
3564
  /**
3369
3565
  * Integration Id
3370
3566
  *
@@ -3392,7 +3588,7 @@ export type CreateWhatsAppBatchRequest = {
3392
3588
  /**
3393
3589
  * Send Gap Seconds
3394
3590
  */
3395
- send_gap_seconds?: number | null;
3591
+ send_gap_seconds?: number;
3396
3592
  /**
3397
3593
  * Template Id
3398
3594
  *
@@ -3402,7 +3598,7 @@ export type CreateWhatsAppBatchRequest = {
3402
3598
  /**
3403
3599
  * Timezone
3404
3600
  */
3405
- timezone?: string | null;
3601
+ timezone?: string;
3406
3602
  /**
3407
3603
  * To Column
3408
3604
  *
@@ -3498,6 +3694,14 @@ export type CreditLedgerEntryResponse = {
3498
3694
  * Balance After
3499
3695
  */
3500
3696
  balance_after: number;
3697
+ /**
3698
+ * Channel
3699
+ */
3700
+ channel: 'voice' | 'video' | 'text' | null;
3701
+ /**
3702
+ * Conversation Id
3703
+ */
3704
+ conversation_id: string | null;
3501
3705
  /**
3502
3706
  * Created At
3503
3707
  */
@@ -3553,14 +3757,47 @@ export type DeleteRecipientsRequest = {
3553
3757
  */
3554
3758
  recipient_ids: Array<string>;
3555
3759
  };
3760
+ /**
3761
+ * DeleteTaskRunsRequest
3762
+ */
3763
+ export type DeleteTaskRunsRequest = {
3764
+ /**
3765
+ * Metadata
3766
+ *
3767
+ * Runs whose metadata contains all of these pairs.
3768
+ */
3769
+ metadata: {
3770
+ [key: string]: unknown | string;
3771
+ };
3772
+ /**
3773
+ * Task Id
3774
+ */
3775
+ task_id?: string | null;
3776
+ };
3777
+ /**
3778
+ * DeleteTaskRunsResponse
3779
+ */
3780
+ export type DeleteTaskRunsResponse = {
3781
+ /**
3782
+ * Count
3783
+ */
3784
+ count: number;
3785
+ };
3556
3786
  /**
3557
3787
  * DeliveryError
3558
3788
  *
3559
3789
  * Outbound delivery failure detail (provider HTTP / shadow-mode skips).
3560
3790
  *
3561
- * Writers always store `{"message": ...}` (see services.messaging.delivery).
3791
+ * Writers always store `{"message": ...}`, plus the provider's `code` when it
3792
+ * gave one (see services.messaging.delivery).
3562
3793
  */
3563
3794
  export type DeliveryError = {
3795
+ /**
3796
+ * Code
3797
+ *
3798
+ * The provider's error code, if any.
3799
+ */
3800
+ code: string | null;
3564
3801
  /**
3565
3802
  * Message
3566
3803
  */
@@ -4197,9 +4434,15 @@ export type EndpointingSpecOverride = {
4197
4434
  * of individual `errors` (used wherever we surface many problems at once,
4198
4435
  * including tool publish, op-tree checks, and request validation). The global
4199
4436
  * exception handlers normalize every API error to
4200
- * `{detail: {message, errors}}`, so SDKs can parse one shape consistently.
4437
+ * `{detail: {message, errors, code}}`, so SDKs can parse one shape consistently.
4201
4438
  */
4202
4439
  export type ErrorBody = {
4440
+ /**
4441
+ * Code
4442
+ *
4443
+ * A stable identifier for this error, when it has one.
4444
+ */
4445
+ code?: string | null;
4203
4446
  /**
4204
4447
  * Errors
4205
4448
  */
@@ -4418,6 +4661,29 @@ export type FieldMap = {
4418
4661
  */
4419
4662
  to: string;
4420
4663
  };
4664
+ /**
4665
+ * FileInput
4666
+ *
4667
+ * One PDF for a `file` input: a public https URL, or the bytes as a data URL.
4668
+ */
4669
+ export type FileInput = {
4670
+ /**
4671
+ * Data Url
4672
+ *
4673
+ * `data:application/pdf;base64,<bytes>`, up to 20 MB decoded.
4674
+ */
4675
+ data_url?: string | null;
4676
+ /**
4677
+ * Filename
4678
+ */
4679
+ filename?: string | null;
4680
+ /**
4681
+ * Url
4682
+ *
4683
+ * An https URL the run downloads.
4684
+ */
4685
+ url?: string | null;
4686
+ };
4421
4687
  /**
4422
4688
  * FixedDailyCap
4423
4689
  *
@@ -4914,6 +5180,15 @@ export type IfOperation = {
4914
5180
  */
4915
5181
  then?: Array<HttpOperation | CodeOperation | FrontendRpcOperation | IfOperation | SetVariableOperation | SayOperation | GenerateReplyOperation | AddMessageOperation | EndCallOperation | HandoffOperation | TransferOperation | SendDtmfOperation> | null;
4916
5182
  };
5183
+ /**
5184
+ * ImageNotKept
5185
+ */
5186
+ export type ImageNotKept = {
5187
+ /**
5188
+ * Reason
5189
+ */
5190
+ reason: string;
5191
+ };
4917
5192
  /**
4918
5193
  * ImportPhoneNumbersRequest
4919
5194
  */
@@ -4972,6 +5247,24 @@ export type ImportedNumberResult = {
4972
5247
  ok: boolean;
4973
5248
  phone_number?: PhoneNumberResponse | null;
4974
5249
  };
5250
+ /**
5251
+ * InboundContent
5252
+ *
5253
+ * What the person sent besides text.
5254
+ */
5255
+ export type InboundContent = {
5256
+ button: ButtonTap;
5257
+ /**
5258
+ * Kind
5259
+ */
5260
+ kind: 'button';
5261
+ /**
5262
+ * Replied To
5263
+ *
5264
+ * Provider id of the message this answers, e.g. the template.
5265
+ */
5266
+ replied_to?: string | null;
5267
+ };
4975
5268
  /**
4976
5269
  * InboundImage
4977
5270
  *
@@ -4987,6 +5280,35 @@ export type InboundImage = {
4987
5280
  */
4988
5281
  filename?: string | null;
4989
5282
  };
5283
+ /**
5284
+ * InboundWebhookResponse
5285
+ *
5286
+ * The workspace's inbound session webhook.
5287
+ */
5288
+ export type InboundWebhookResponse = {
5289
+ /**
5290
+ * Created At
5291
+ */
5292
+ created_at: string;
5293
+ /**
5294
+ * Secret
5295
+ *
5296
+ * The signing secret, only when it was just created or rotated.
5297
+ */
5298
+ secret: string | null;
5299
+ /**
5300
+ * Secret Hint
5301
+ */
5302
+ secret_hint: string;
5303
+ /**
5304
+ * Updated At
5305
+ */
5306
+ updated_at: string;
5307
+ /**
5308
+ * Url
5309
+ */
5310
+ url: string;
5311
+ };
4990
5312
  /**
4991
5313
  * InlineFaq
4992
5314
  *
@@ -5466,27 +5788,56 @@ export type InterruptionSpecOverride = {
5466
5788
  resume_false_interruption?: boolean | null;
5467
5789
  };
5468
5790
  /**
5469
- * ItemCreatedEvent
5791
+ * ItemAuthor
5470
5792
  *
5471
- * One new item, in the same shape `list_conversation_items` returns it.
5793
+ * Who at your business posted an item.
5472
5794
  */
5473
- export type ItemCreatedEvent = {
5795
+ export type ItemAuthor = {
5474
5796
  /**
5475
- * Agent Id
5797
+ * Id
5476
5798
  */
5477
- agent_id: string | null;
5799
+ id: string;
5478
5800
  /**
5479
- * Agent Version
5801
+ * Name
5480
5802
  */
5481
- agent_version: number | 'draft' | null;
5482
- /**
5803
+ name: string;
5804
+ };
5805
+ /**
5806
+ * ItemCreatedEvent
5807
+ *
5808
+ * One new item, in the same shape `list_conversation_items` returns it.
5809
+ */
5810
+ export type ItemCreatedEvent = {
5811
+ /**
5812
+ * Agent Id
5813
+ */
5814
+ agent_id: string | null;
5815
+ /**
5816
+ * Agent Version
5817
+ */
5818
+ agent_version: number | 'draft' | null;
5819
+ /**
5483
5820
  * Attachments
5484
5821
  */
5485
5822
  attachments: Array<ConversationAttachment>;
5823
+ /**
5824
+ * Who at your business posted this.
5825
+ */
5826
+ author: ItemAuthor | null;
5827
+ /**
5828
+ * Channel
5829
+ *
5830
+ * How this item reached us or the person; null for notes and instructions.
5831
+ */
5832
+ channel: 'phone_call' | 'whatsapp_call' | 'whatsapp_message' | 'web_call' | 'chat' | 'telegram' | 'stream' | 'copilot' | null;
5486
5833
  /**
5487
5834
  * Client Message Id
5488
5835
  */
5489
5836
  client_message_id: string | null;
5837
+ /**
5838
+ * What the person sent besides text; null for plain text.
5839
+ */
5840
+ content: InboundContent | null;
5490
5841
  /**
5491
5842
  * Conversation Id
5492
5843
  */
@@ -5499,7 +5850,7 @@ export type ItemCreatedEvent = {
5499
5850
  /**
5500
5851
  * Delivery Status
5501
5852
  */
5502
- delivery_status: 'not_applicable' | 'pending' | 'sending' | 'sent' | 'failed' | 'skipped';
5853
+ delivery_status: 'not_applicable' | 'pending' | 'held' | 'sending' | 'queued' | 'sent' | 'delivered' | 'read' | 'undelivered' | 'failed' | 'skipped' | 'expired';
5503
5854
  /**
5504
5855
  * Direction
5505
5856
  */
@@ -5516,6 +5867,16 @@ export type ItemCreatedEvent = {
5516
5867
  * Id
5517
5868
  */
5518
5869
  id: string;
5870
+ /**
5871
+ * Idempotency Key
5872
+ */
5873
+ idempotency_key: string | null;
5874
+ /**
5875
+ * Images Not Kept
5876
+ *
5877
+ * Images the person sent that were not stored, and why.
5878
+ */
5879
+ images_not_kept: Array<ImageNotKept>;
5519
5880
  latency: ReplyLatency | null;
5520
5881
  /**
5521
5882
  * Metadata
@@ -5528,6 +5889,12 @@ export type ItemCreatedEvent = {
5528
5889
  * Origin
5529
5890
  */
5530
5891
  origin: 'speech' | 'typed' | 'keypad' | null;
5892
+ /**
5893
+ * Post Type
5894
+ *
5895
+ * What was posted through the API; null for everything else.
5896
+ */
5897
+ post_type: 'template' | 'agent_text' | 'note' | 'instruction' | null;
5531
5898
  /**
5532
5899
  * Provider Message Id
5533
5900
  */
@@ -5550,10 +5917,6 @@ export type ItemCreatedEvent = {
5550
5917
  * Session Id
5551
5918
  */
5552
5919
  session_id: string | null;
5553
- /**
5554
- * Source
5555
- */
5556
- source: string | null;
5557
5920
  /**
5558
5921
  * Text
5559
5922
  */
@@ -5586,13 +5949,13 @@ export type ItemCreatedEvent = {
5586
5949
  /**
5587
5950
  * ItemDeliveryUpdatedEvent
5588
5951
  *
5589
- * An outbound item reached the provider, or failed to.
5952
+ * An outbound item's delivery moved: claimed, sent, held, a receipt, or a failure.
5590
5953
  */
5591
5954
  export type ItemDeliveryUpdatedEvent = {
5592
5955
  /**
5593
5956
  * Delivery Status
5594
5957
  */
5595
- delivery_status: 'not_applicable' | 'pending' | 'sending' | 'sent' | 'failed' | 'skipped';
5958
+ delivery_status: 'not_applicable' | 'pending' | 'held' | 'sending' | 'queued' | 'sent' | 'delivered' | 'read' | 'undelivered' | 'failed' | 'skipped' | 'expired';
5596
5959
  /**
5597
5960
  * Error
5598
5961
  */
@@ -6855,12 +7218,19 @@ export type OkResponse = {
6855
7218
  */
6856
7219
  ok?: boolean;
6857
7220
  };
7221
+ /**
7222
+ * OpenerPolicy
7223
+ */
7224
+ export type OpenerPolicy = {
7225
+ opener: TemplateSend;
7226
+ };
6858
7227
  /**
6859
7228
  * OutboundCallRequest
6860
7229
  *
6861
7230
  * One phone call: who to dial, from which of your numbers, and what runs.
6862
7231
  *
6863
- * `vars` comes from `AgentPlanRequest` and lasts exactly as long as this call.
7232
+ * `vars` comes from `AgentPlanRequest` and `secrets` from `SessionSecretsField`;
7233
+ * both last exactly as long as this call.
6864
7234
  */
6865
7235
  export type OutboundCallRequest = {
6866
7236
  /**
@@ -6891,6 +7261,14 @@ export type OutboundCallRequest = {
6891
7261
  * From Phone Number Id
6892
7262
  */
6893
7263
  from_phone_number_id: string;
7264
+ /**
7265
+ * Secrets
7266
+ *
7267
+ * 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.
7268
+ */
7269
+ secrets?: {
7270
+ [key: string]: string;
7271
+ } | null;
6894
7272
  /**
6895
7273
  * To
6896
7274
  */
@@ -6904,7 +7282,7 @@ export type OutboundCallRequest = {
6904
7282
  /**
6905
7283
  * Vars
6906
7284
  *
6907
- * 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.
7285
+ * 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.
6908
7286
  */
6909
7287
  vars?: {
6910
7288
  [key: string]: string;
@@ -7439,9 +7817,9 @@ export type PageTaskResponse = {
7439
7817
  offset: number;
7440
7818
  };
7441
7819
  /**
7442
- * Page[TaskRunResponse]
7820
+ * Page[TaskRunSummary]
7443
7821
  */
7444
- export type PageTaskRunResponse = {
7822
+ export type PageTaskRunSummary = {
7445
7823
  /**
7446
7824
  * Has More
7447
7825
  */
@@ -7449,7 +7827,7 @@ export type PageTaskRunResponse = {
7449
7827
  /**
7450
7828
  * Items
7451
7829
  */
7452
- items: Array<TaskRunResponse>;
7830
+ items: Array<TaskRunSummary>;
7453
7831
  /**
7454
7832
  * Limit
7455
7833
  */
@@ -7601,7 +7979,7 @@ export type PatchCallBatchRequest = {
7601
7979
  /**
7602
7980
  * Agent Id
7603
7981
  */
7604
- agent_id?: string | null;
7982
+ agent_id?: string;
7605
7983
  calling_window?: TimeWindow | null;
7606
7984
  /**
7607
7985
  * Dial Daily Cap
@@ -7614,27 +7992,27 @@ export type PatchCallBatchRequest = {
7614
7992
  /**
7615
7993
  * Dial Gap Seconds
7616
7994
  */
7617
- dial_gap_seconds?: number | null;
7995
+ dial_gap_seconds?: number;
7618
7996
  /**
7619
7997
  * From Phone Number Id
7620
7998
  */
7621
- from_phone_number_id?: string | null;
7999
+ from_phone_number_id?: string;
7622
8000
  /**
7623
8001
  * Max Attempts
7624
8002
  */
7625
- max_attempts?: number | null;
8003
+ max_attempts?: number;
7626
8004
  /**
7627
8005
  * Max Concurrency
7628
8006
  */
7629
- max_concurrency?: number | null;
8007
+ max_concurrency?: number;
7630
8008
  /**
7631
8009
  * Name
7632
8010
  */
7633
- name?: string | null;
8011
+ name?: string;
7634
8012
  /**
7635
8013
  * Retry After Minutes
7636
8014
  */
7637
- retry_after_minutes?: number | null;
8015
+ retry_after_minutes?: number;
7638
8016
  /**
7639
8017
  * Start At
7640
8018
  */
@@ -7642,7 +8020,7 @@ export type PatchCallBatchRequest = {
7642
8020
  /**
7643
8021
  * Timezone
7644
8022
  */
7645
- timezone?: string | null;
8023
+ timezone?: string;
7646
8024
  };
7647
8025
  /**
7648
8026
  * PatchConversationRequest
@@ -7653,7 +8031,7 @@ export type PatchConversationRequest = {
7653
8031
  */
7654
8032
  metadata?: {
7655
8033
  [key: string]: unknown;
7656
- } | null;
8034
+ };
7657
8035
  /**
7658
8036
  * Summary
7659
8037
  */
@@ -7663,7 +8041,7 @@ export type PatchConversationRequest = {
7663
8041
  */
7664
8042
  userdata?: {
7665
8043
  [key: string]: unknown;
7666
- } | null;
8044
+ };
7667
8045
  };
7668
8046
  /**
7669
8047
  * PatchEmailBatchRequest
@@ -7684,28 +8062,31 @@ export type PatchEmailBatchRequest = {
7684
8062
  /**
7685
8063
  * Body Format
7686
8064
  */
7687
- body_format?: 'text' | 'html' | null;
8065
+ body_format?: 'text' | 'html';
7688
8066
  /**
7689
8067
  * Draft Attempts
7690
8068
  */
7691
- draft_attempts?: number | null;
8069
+ draft_attempts?: number;
7692
8070
  /**
7693
8071
  * Draft Concurrency
7694
8072
  */
7695
- draft_concurrency?: number | null;
8073
+ draft_concurrency?: number;
7696
8074
  /**
7697
8075
  * Draft Gap Seconds
7698
8076
  */
7699
- draft_gap_seconds?: number | null;
8077
+ draft_gap_seconds?: number;
7700
8078
  /**
7701
8079
  * Draft Retry After Minutes
7702
8080
  */
7703
- draft_retry_after_minutes?: number | null;
7704
- field_map?: FieldMap | null;
8081
+ draft_retry_after_minutes?: number;
8082
+ /**
8083
+ * Field Map
8084
+ */
8085
+ field_map?: FieldMap;
7705
8086
  /**
7706
8087
  * From Email
7707
8088
  */
7708
- from_email?: string | null;
8089
+ from_email?: string;
7709
8090
  /**
7710
8091
  * From Name
7711
8092
  */
@@ -7713,7 +8094,7 @@ export type PatchEmailBatchRequest = {
7713
8094
  /**
7714
8095
  * Name
7715
8096
  */
7716
- name?: string | null;
8097
+ name?: string;
7717
8098
  /**
7718
8099
  * Reply To
7719
8100
  */
@@ -7721,7 +8102,7 @@ export type PatchEmailBatchRequest = {
7721
8102
  /**
7722
8103
  * Send Attempts
7723
8104
  */
7724
- send_attempts?: number | null;
8105
+ send_attempts?: number;
7725
8106
  /**
7726
8107
  * Send Daily Cap
7727
8108
  */
@@ -7733,11 +8114,11 @@ export type PatchEmailBatchRequest = {
7733
8114
  /**
7734
8115
  * Send Gap Seconds
7735
8116
  */
7736
- send_gap_seconds?: number | null;
8117
+ send_gap_seconds?: number;
7737
8118
  /**
7738
8119
  * Send Retry After Minutes
7739
8120
  */
7740
- send_retry_after_minutes?: number | null;
8121
+ send_retry_after_minutes?: number;
7741
8122
  /**
7742
8123
  * Start At
7743
8124
  */
@@ -7745,7 +8126,7 @@ export type PatchEmailBatchRequest = {
7745
8126
  /**
7746
8127
  * Timezone
7747
8128
  */
7748
- timezone?: string | null;
8129
+ timezone?: string;
7749
8130
  window?: TimeWindow | null;
7750
8131
  };
7751
8132
  /**
@@ -7780,7 +8161,7 @@ export type PatchEmailSendRequest = {
7780
8161
  /**
7781
8162
  * Send Attempts
7782
8163
  */
7783
- send_attempts?: number | null;
8164
+ send_attempts?: number;
7784
8165
  /**
7785
8166
  * Send Daily Cap
7786
8167
  */
@@ -7792,11 +8173,11 @@ export type PatchEmailSendRequest = {
7792
8173
  /**
7793
8174
  * Send Gap Seconds
7794
8175
  */
7795
- send_gap_seconds?: number | null;
8176
+ send_gap_seconds?: number;
7796
8177
  /**
7797
8178
  * Send Retry After Minutes
7798
8179
  */
7799
- send_retry_after_minutes?: number | null;
8180
+ send_retry_after_minutes?: number;
7800
8181
  /**
7801
8182
  * Start At
7802
8183
  */
@@ -7804,7 +8185,7 @@ export type PatchEmailSendRequest = {
7804
8185
  /**
7805
8186
  * Timezone
7806
8187
  */
7807
- timezone?: string | null;
8188
+ timezone?: string;
7808
8189
  window?: TimeWindow | null;
7809
8190
  };
7810
8191
  /**
@@ -7814,47 +8195,47 @@ export type PatchIntegrationRequest = {
7814
8195
  /**
7815
8196
  * Allowed Tools
7816
8197
  */
7817
- allowed_tools?: Array<string> | null;
8198
+ allowed_tools?: Array<string>;
7818
8199
  /**
7819
8200
  * Credentials Ref
7820
8201
  */
7821
- credentials_ref?: string | null;
8202
+ credentials_ref?: string;
7822
8203
  /**
7823
8204
  * Display Name
7824
8205
  */
7825
- display_name?: string | null;
8206
+ display_name?: string;
7826
8207
  /**
7827
8208
  * Mcp Config
7828
8209
  */
7829
8210
  mcp_config?: {
7830
8211
  [key: string]: unknown;
7831
- } | null;
8212
+ };
7832
8213
  /**
7833
8214
  * Metadata
7834
8215
  */
7835
8216
  metadata?: {
7836
8217
  [key: string]: unknown;
7837
- } | null;
8218
+ };
7838
8219
  /**
7839
8220
  * Provider Account Info
7840
8221
  */
7841
8222
  provider_account_info?: {
7842
8223
  [key: string]: unknown;
7843
- } | null;
8224
+ };
7844
8225
  /**
7845
8226
  * Status
7846
8227
  */
7847
- status?: 'active' | 'disabled' | 'needs_reconnect' | 'error' | null;
8228
+ status?: 'active' | 'disabled' | 'needs_reconnect' | 'error';
7848
8229
  /**
7849
8230
  * Tools Namespace
7850
8231
  */
7851
- tools_namespace?: string | null;
8232
+ tools_namespace?: string;
7852
8233
  /**
7853
8234
  * Webhook Config
7854
8235
  */
7855
8236
  webhook_config?: {
7856
8237
  [key: string]: unknown;
7857
- } | null;
8238
+ };
7858
8239
  };
7859
8240
  /**
7860
8241
  * PatchIntegrationTriggerRequest
@@ -7867,13 +8248,13 @@ export type PatchIntegrationTriggerRequest = {
7867
8248
  /**
7868
8249
  * Enabled
7869
8250
  */
7870
- enabled?: boolean | null;
8251
+ enabled?: boolean;
7871
8252
  /**
7872
8253
  * Metadata
7873
8254
  */
7874
8255
  metadata?: {
7875
8256
  [key: string]: unknown;
7876
- } | null;
8257
+ };
7877
8258
  /**
7878
8259
  * Provider Subscription Ref
7879
8260
  */
@@ -7881,15 +8262,15 @@ export type PatchIntegrationTriggerRequest = {
7881
8262
  /**
7882
8263
  * Reply Mode
7883
8264
  */
7884
- reply_mode?: 'public_reply' | 'internal_note' | 'none' | null;
8265
+ reply_mode?: 'public_reply' | 'internal_note' | 'none';
7885
8266
  /**
7886
8267
  * Status
7887
8268
  */
7888
- status?: 'active' | 'disabled' | 'needs_setup' | 'error' | null;
8269
+ status?: 'active' | 'disabled' | 'needs_setup' | 'error';
7889
8270
  /**
7890
8271
  * Trigger Type
7891
8272
  */
7892
- trigger_type?: 'telegram.message.inbound' | 'whatsapp.message.inbound' | 'whatsapp.call.inbound' | null;
8273
+ trigger_type?: 'telegram.message.inbound' | 'whatsapp.message.inbound' | 'whatsapp.call.inbound';
7893
8274
  };
7894
8275
  /**
7895
8276
  * PatchPhoneNumberRequest
@@ -7898,11 +8279,11 @@ export type PatchPhoneNumberRequest = {
7898
8279
  /**
7899
8280
  * Can Inbound
7900
8281
  */
7901
- can_inbound?: boolean | null;
8282
+ can_inbound?: boolean;
7902
8283
  /**
7903
8284
  * Can Outbound
7904
8285
  */
7905
- can_outbound?: boolean | null;
8286
+ can_outbound?: boolean;
7906
8287
  /**
7907
8288
  * Label
7908
8289
  */
@@ -7910,11 +8291,11 @@ export type PatchPhoneNumberRequest = {
7910
8291
  /**
7911
8292
  * Region
7912
8293
  */
7913
- region?: 'us' | 'in' | null;
8294
+ region?: 'us' | 'in';
7914
8295
  /**
7915
8296
  * Status
7916
8297
  */
7917
- status?: 'disabled' | 'pending' | null;
8298
+ status?: 'disabled' | 'pending';
7918
8299
  };
7919
8300
  /**
7920
8301
  * PatchStreamConnectionRequest
@@ -7923,19 +8304,19 @@ export type PatchStreamConnectionRequest = {
7923
8304
  /**
7924
8305
  * Agent Id
7925
8306
  */
7926
- agent_id?: string | null;
8307
+ agent_id?: string;
7927
8308
  /**
7928
8309
  * Name
7929
8310
  */
7930
- name?: string | null;
8311
+ name?: string;
7931
8312
  /**
7932
8313
  * Region
7933
8314
  */
7934
- region?: 'us' | 'in' | null;
8315
+ region?: 'us' | 'in';
7935
8316
  /**
7936
8317
  * Status
7937
8318
  */
7938
- status?: 'active' | 'disabled' | null;
8319
+ status?: 'active' | 'disabled';
7939
8320
  };
7940
8321
  /**
7941
8322
  * PatchTaskRequest
@@ -7955,29 +8336,29 @@ export type PatchTelephonyAccountRequest = {
7955
8336
  */
7956
8337
  account_info?: {
7957
8338
  [key: string]: unknown;
7958
- } | null;
8339
+ };
7959
8340
  /**
7960
8341
  * Console Setup Confirmed
7961
8342
  */
7962
- console_setup_confirmed?: boolean | null;
8343
+ console_setup_confirmed?: boolean;
7963
8344
  /**
7964
8345
  * Console Setup Region
7965
8346
  */
7966
- console_setup_region?: 'us' | 'in' | null;
8347
+ console_setup_region?: 'us' | 'in';
7967
8348
  /**
7968
8349
  * Credentials
7969
8350
  */
7970
8351
  credentials?: {
7971
8352
  [key: string]: string;
7972
- } | null;
8353
+ };
7973
8354
  /**
7974
8355
  * Display Name
7975
8356
  */
7976
- display_name?: string | null;
8357
+ display_name?: string;
7977
8358
  /**
7978
8359
  * Status
7979
8360
  */
7980
- status?: 'disabled' | 'connected' | null;
8361
+ status?: 'disabled' | 'connected';
7981
8362
  };
7982
8363
  /**
7983
8364
  * PatchToolRequest
@@ -7986,33 +8367,33 @@ export type PatchToolRequest = {
7986
8367
  /**
7987
8368
  * Description
7988
8369
  */
7989
- description?: string | null;
8370
+ description?: string;
7990
8371
  /**
7991
8372
  * Disable Interruptions
7992
8373
  */
7993
- disable_interruptions?: boolean | null;
8374
+ disable_interruptions?: boolean;
7994
8375
  /**
7995
8376
  * Json Schema
7996
8377
  */
7997
8378
  json_schema?: {
7998
8379
  [key: string]: unknown;
7999
- } | null;
8380
+ };
8000
8381
  /**
8001
8382
  * Long Running Task
8002
8383
  */
8003
- long_running_task?: boolean | null;
8384
+ long_running_task?: boolean;
8004
8385
  /**
8005
8386
  * Name
8006
8387
  */
8007
- name?: string | null;
8388
+ name?: string;
8008
8389
  /**
8009
8390
  * Operations
8010
8391
  */
8011
- operations?: Array<HttpOperation | CodeOperation | FrontendRpcOperation | IfOperation | SetVariableOperation | SayOperation | GenerateReplyOperation | AddMessageOperation | EndCallOperation | HandoffOperation | TransferOperation | SendDtmfOperation> | null;
8392
+ operations?: Array<HttpOperation | CodeOperation | FrontendRpcOperation | IfOperation | SetVariableOperation | SayOperation | GenerateReplyOperation | AddMessageOperation | EndCallOperation | HandoffOperation | TransferOperation | SendDtmfOperation>;
8012
8393
  /**
8013
8394
  * Silent
8014
8395
  */
8015
- silent?: boolean | null;
8396
+ silent?: boolean;
8016
8397
  };
8017
8398
  /**
8018
8399
  * PatchWebhookRequest
@@ -8021,15 +8402,15 @@ export type PatchWebhookRequest = {
8021
8402
  /**
8022
8403
  * Status
8023
8404
  */
8024
- status?: 'active' | 'disabled' | null;
8405
+ status?: 'active' | 'disabled';
8025
8406
  /**
8026
8407
  * Subscribed Events
8027
8408
  */
8028
- subscribed_events?: Array<string> | null;
8409
+ subscribed_events?: Array<string>;
8029
8410
  /**
8030
8411
  * Url
8031
8412
  */
8032
- url?: string | null;
8413
+ url?: string;
8033
8414
  };
8034
8415
  /**
8035
8416
  * PatchWhatsAppBatchRequest
@@ -8042,15 +8423,15 @@ export type PatchWhatsAppBatchRequest = {
8042
8423
  *
8043
8424
  * Sends per row, the first included, while Meta's per-person limit holds it back.
8044
8425
  */
8045
- delivery_attempts?: number | null;
8426
+ delivery_attempts?: number;
8046
8427
  /**
8047
8428
  * Delivery Retry After Hours
8048
8429
  */
8049
- delivery_retry_after_hours?: number | null;
8430
+ delivery_retry_after_hours?: number;
8050
8431
  /**
8051
8432
  * Name
8052
8433
  */
8053
- name?: string | null;
8434
+ name?: string;
8054
8435
  /**
8055
8436
  * Send Daily Cap
8056
8437
  *
@@ -8064,7 +8445,7 @@ export type PatchWhatsAppBatchRequest = {
8064
8445
  /**
8065
8446
  * Send Gap Seconds
8066
8447
  */
8067
- send_gap_seconds?: number | null;
8448
+ send_gap_seconds?: number;
8068
8449
  /**
8069
8450
  * Start At
8070
8451
  */
@@ -8072,13 +8453,13 @@ export type PatchWhatsAppBatchRequest = {
8072
8453
  /**
8073
8454
  * Timezone
8074
8455
  */
8075
- timezone?: string | null;
8456
+ timezone?: string;
8076
8457
  /**
8077
8458
  * Variable Map
8078
8459
  */
8079
8460
  variable_map?: {
8080
8461
  [key: string]: string;
8081
- } | null;
8462
+ };
8082
8463
  window?: TimeWindow | null;
8083
8464
  };
8084
8465
  /**
@@ -8204,6 +8585,76 @@ export type PlatformFeePerMinute = {
8204
8585
  */
8205
8586
  voice: number;
8206
8587
  };
8588
+ /**
8589
+ * PostItemRequest
8590
+ */
8591
+ export type PostItemRequest = {
8592
+ /**
8593
+ * Who at your business posted this; shown in transcripts, never sent to the person or shown to the agent.
8594
+ */
8595
+ author?: ItemAuthor | null;
8596
+ /**
8597
+ * Idempotency Key
8598
+ */
8599
+ idempotency_key?: string | null;
8600
+ /**
8601
+ * On Window Closed
8602
+ *
8603
+ * fail refuses free text outside WhatsApp's 24h window; an opener sends that template and holds the message until they reply.
8604
+ */
8605
+ on_window_closed?: 'fail' | OpenerPolicy;
8606
+ /**
8607
+ * For `template` only.
8608
+ */
8609
+ template?: TemplateSend | null;
8610
+ /**
8611
+ * Text
8612
+ *
8613
+ * For the other three types.
8614
+ */
8615
+ text?: string | null;
8616
+ /**
8617
+ * The conversation, or your number and theirs to reach a person with no conversation yet.
8618
+ */
8619
+ to: PostTarget;
8620
+ /**
8621
+ * Type
8622
+ *
8623
+ * template and agent_text are delivered; note is never delivered; instruct has the agent write and send a message.
8624
+ */
8625
+ type: 'template' | 'agent_text' | 'note' | 'instruct';
8626
+ /**
8627
+ * Userdata
8628
+ *
8629
+ * Merged into the person's userdata and given to the agent that answers their reply.
8630
+ */
8631
+ userdata?: {
8632
+ [key: string]: unknown;
8633
+ } | null;
8634
+ };
8635
+ /**
8636
+ * PostTarget
8637
+ *
8638
+ * `conversation_id`, or `number` and `peer`.
8639
+ */
8640
+ export type PostTarget = {
8641
+ /**
8642
+ * Conversation Id
8643
+ */
8644
+ conversation_id?: string | null;
8645
+ /**
8646
+ * Number
8647
+ *
8648
+ * Your business number, E.164.
8649
+ */
8650
+ number?: string | null;
8651
+ /**
8652
+ * Peer
8653
+ *
8654
+ * The person's number.
8655
+ */
8656
+ peer?: string | null;
8657
+ };
8207
8658
  /**
8208
8659
  * PreemptiveGenerationSpec
8209
8660
  *
@@ -8998,30 +9449,24 @@ export type RecordingResponse = {
8998
9449
  /**
8999
9450
  * RecordingSpec
9000
9451
  *
9001
- * Whether calls with this agent are recorded, and what the caller is told.
9452
+ * Whether calls with this agent are recorded, and whether the caller is told.
9002
9453
  *
9003
9454
  * On by default: one stereo file per call, kept until the workspace's
9004
9455
  * retention policy deletes it.
9005
9456
  */
9006
9457
  export type RecordingSpec = {
9007
- /**
9008
- * Consent
9009
- *
9010
- * 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.
9011
- */
9012
- consent?: 'off' | 'disclosure';
9013
- /**
9014
- * Consent Notice
9015
- *
9016
- * The sentence `{{consent.notice}}` resolves to in the greeting.
9017
- */
9018
- consent_notice?: string;
9019
9458
  /**
9020
9459
  * Enabled
9021
9460
  *
9022
9461
  * Record the call audio. Voice and video agents only.
9023
9462
  */
9024
9463
  enabled?: boolean;
9464
+ /**
9465
+ * Notice
9466
+ *
9467
+ * Spoken where the greeting places {{recording.notice}}, uninterruptibly. Null: no notice.
9468
+ */
9469
+ notice?: string | null;
9025
9470
  };
9026
9471
  /**
9027
9472
  * RecordingSpecOverride
@@ -9029,31 +9474,25 @@ export type RecordingSpec = {
9029
9474
  * 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.
9030
9475
  */
9031
9476
  export type RecordingSpecOverride = {
9032
- /**
9033
- * Consent
9034
- *
9035
- * 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.
9036
- */
9037
- consent?: 'off' | 'disclosure' | null;
9038
- /**
9039
- * Consent Notice
9040
- *
9041
- * The sentence `{{consent.notice}}` resolves to in the greeting.
9042
- */
9043
- consent_notice?: string | null;
9044
9477
  /**
9045
9478
  * Enabled
9046
9479
  *
9047
9480
  * Record the call audio. Voice and video agents only.
9048
9481
  */
9049
9482
  enabled?: boolean | null;
9483
+ /**
9484
+ * Notice
9485
+ *
9486
+ * Spoken where the greeting places {{recording.notice}}, uninterruptibly. Null: no notice.
9487
+ */
9488
+ notice?: string | null;
9050
9489
  };
9051
9490
  /**
9052
9491
  * RecordingState
9053
9492
  *
9054
9493
  * What a reader should do about it. `available` is the only playable one.
9055
9494
  */
9056
- export type RecordingState = 'none' | 'available' | 'pending' | 'expired' | 'failed' | 'not_shared' | 'consent_withdrawn' | 'deleted';
9495
+ export type RecordingState = 'none' | 'available' | 'pending' | 'expired' | 'failed' | 'not_shared' | 'deleted';
9057
9496
  /**
9058
9497
  * RedraftRequest
9059
9498
  *
@@ -9166,6 +9605,14 @@ export type ResumeCallRequest = {
9166
9605
  * Region
9167
9606
  */
9168
9607
  region?: 'us' | 'in';
9608
+ /**
9609
+ * Secrets
9610
+ *
9611
+ * Secrets to add or replace for the resumed call; the dropped call's are kept.
9612
+ */
9613
+ secrets?: {
9614
+ [key: string]: string;
9615
+ } | null;
9169
9616
  };
9170
9617
  /**
9171
9618
  * RoutedTTS
@@ -9194,6 +9641,43 @@ export type RoutedTTS = {
9194
9641
  export type Routes = {
9195
9642
  tts: RoutedTTS;
9196
9643
  };
9644
+ /**
9645
+ * RunItem
9646
+ *
9647
+ * One run's inputs and labels.
9648
+ */
9649
+ export type RunItem = {
9650
+ /**
9651
+ * Files
9652
+ *
9653
+ * One PDF per declared `file` input, by name.
9654
+ */
9655
+ files?: {
9656
+ [key: string]: FileInput;
9657
+ };
9658
+ /**
9659
+ * Idempotency Key
9660
+ *
9661
+ * Resending the same key returns the existing run instead of starting another.
9662
+ */
9663
+ idempotency_key?: string | null;
9664
+ /**
9665
+ * Metadata
9666
+ *
9667
+ * Up to 16 string labels of your own, for filtering.
9668
+ */
9669
+ metadata?: {
9670
+ [key: string]: unknown | string;
9671
+ };
9672
+ /**
9673
+ * Vars
9674
+ *
9675
+ * Values for the task's text inputs, by name. Undeclared names are refused.
9676
+ */
9677
+ vars?: {
9678
+ [key: string]: string;
9679
+ };
9680
+ };
9197
9681
  /**
9198
9682
  * RunStepResponse
9199
9683
  *
@@ -9235,25 +9719,6 @@ export type RunStepResponse = {
9235
9719
  */
9236
9720
  status: string;
9237
9721
  };
9238
- /**
9239
- * RunTaskRequest
9240
- */
9241
- export type RunTaskRequest = {
9242
- /**
9243
- * Vars
9244
- *
9245
- * 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.
9246
- */
9247
- vars?: {
9248
- [key: string]: string;
9249
- };
9250
- /**
9251
- * Version
9252
- *
9253
- * 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.
9254
- */
9255
- version?: number | 'draft' | null;
9256
- };
9257
9722
  /**
9258
9723
  * RunToolRequest
9259
9724
  */
@@ -9264,6 +9729,14 @@ export type RunToolRequest = {
9264
9729
  arguments?: {
9265
9730
  [key: string]: unknown;
9266
9731
  };
9732
+ /**
9733
+ * Secrets
9734
+ *
9735
+ * Session secrets for this run; override workspace secrets of the same name.
9736
+ */
9737
+ secrets?: {
9738
+ [key: string]: string;
9739
+ } | null;
9267
9740
  /**
9268
9741
  * Timezone
9269
9742
  *
@@ -9709,11 +10182,11 @@ export type SendWhatsAppBatchRequest = {
9709
10182
  *
9710
10183
  * Sends per row, the first included, while Meta's per-person limit holds it back.
9711
10184
  */
9712
- delivery_attempts?: number | null;
10185
+ delivery_attempts?: number;
9713
10186
  /**
9714
10187
  * Delivery Retry After Hours
9715
10188
  */
9716
- delivery_retry_after_hours?: number | null;
10189
+ delivery_retry_after_hours?: number;
9717
10190
  /**
9718
10191
  * Send Daily Cap
9719
10192
  *
@@ -9727,7 +10200,7 @@ export type SendWhatsAppBatchRequest = {
9727
10200
  /**
9728
10201
  * Send Gap Seconds
9729
10202
  */
9730
- send_gap_seconds?: number | null;
10203
+ send_gap_seconds?: number;
9731
10204
  /**
9732
10205
  * Start At
9733
10206
  */
@@ -9735,7 +10208,7 @@ export type SendWhatsAppBatchRequest = {
9735
10208
  /**
9736
10209
  * Timezone
9737
10210
  */
9738
- timezone?: string | null;
10211
+ timezone?: string;
9739
10212
  window?: TimeWindow | null;
9740
10213
  };
9741
10214
  /**
@@ -9847,6 +10320,17 @@ export type SessionUsage = {
9847
10320
  */
9848
10321
  tts: Array<TTSUsage>;
9849
10322
  };
10323
+ /**
10324
+ * SetInboundWebhookRequest
10325
+ */
10326
+ export type SetInboundWebhookRequest = {
10327
+ /**
10328
+ * Url
10329
+ *
10330
+ * An https URL on your server.
10331
+ */
10332
+ url: string;
10333
+ };
9850
10334
  /**
9851
10335
  * SetProviderKeyRequest
9852
10336
  */
@@ -10131,6 +10615,12 @@ export type StreamResponse = {
10131
10615
  * One `{{system_vars.*}}` variable the platform fills in.
10132
10616
  */
10133
10617
  export type SystemVarResponse = {
10618
+ /**
10619
+ * Channels
10620
+ *
10621
+ * The session channels this has a value on; empty means every one.
10622
+ */
10623
+ channels: Array<'phone_call' | 'whatsapp_call' | 'whatsapp_message' | 'web_call' | 'chat' | 'telegram' | 'stream'>;
10134
10624
  /**
10135
10625
  * Description
10136
10626
  */
@@ -10143,10 +10633,6 @@ export type SystemVarResponse = {
10143
10633
  * Key
10144
10634
  */
10145
10635
  key: string;
10146
- /**
10147
- * Voice Only
10148
- */
10149
- voice_only: boolean;
10150
10636
  };
10151
10637
  /**
10152
10638
  * TTSCatalogEntryResponse
@@ -10523,7 +11009,7 @@ export type TTSUsageResponse = {
10523
11009
  *
10524
11010
  * It declares no channel, no media and no greeting. Entered by an agent it
10525
11011
  * speaks with that call's voice and hears with its ears; run on its own from
10526
- * `POST /tasks/{id}/run` it is an LLM with tools and nobody to talk to. Which
11012
+ * `POST /task-runs` it is an LLM with tools and nobody to talk to. Which
10527
11013
  * of the two happens is the caller's, never the task's.
10528
11014
  */
10529
11015
  export type TaskConfig = {
@@ -10564,7 +11050,7 @@ export type TaskConfig = {
10564
11050
  /**
10565
11051
  * Output
10566
11052
  *
10567
- * 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.
11053
+ * 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.
10568
11054
  */
10569
11055
  output?: Array<TaskOutputField>;
10570
11056
  /**
@@ -10607,9 +11093,7 @@ export type TaskConfig = {
10607
11093
  /**
10608
11094
  * TaskOutputField
10609
11095
  *
10610
- * One value the model must produce.
10611
- *
10612
- * Flat scalars only — no arrays and no nested objects.
11096
+ * One value the model must produce: a scalar, an object of named fields, or an array.
10613
11097
  */
10614
11098
  export type TaskOutputField = {
10615
11099
  /**
@@ -10618,6 +11102,22 @@ export type TaskOutputField = {
10618
11102
  * What the model should put here, and what to send when it cannot find out. This is the field's description in the tool schema, so it is literally the prompt for this value.
10619
11103
  */
10620
11104
  description: string;
11105
+ /**
11106
+ * Enum
11107
+ *
11108
+ * Allowed values. Strings only.
11109
+ */
11110
+ enum?: Array<string> | null;
11111
+ /**
11112
+ * Fields
11113
+ *
11114
+ * An object's fields.
11115
+ */
11116
+ fields?: Array<TaskOutputField> | null;
11117
+ /**
11118
+ * An array's element.
11119
+ */
11120
+ items?: TaskOutputItem | null;
10621
11121
  /**
10622
11122
  * Name
10623
11123
  *
@@ -10633,9 +11133,42 @@ export type TaskOutputField = {
10633
11133
  /**
10634
11134
  * Type
10635
11135
  *
10636
- * The shape of the value. Anything that is not a number or a yes/no is a string.
11136
+ * The shape of the value. `object` takes `fields`; `array` takes `items`.
10637
11137
  */
10638
- type?: 'string' | 'boolean' | 'integer' | 'number';
11138
+ type?: 'string' | 'boolean' | 'integer' | 'number' | 'object' | 'array';
11139
+ };
11140
+ /**
11141
+ * TaskOutputItem
11142
+ *
11143
+ * What an array holds: one element's shape. Unnamed, and never null.
11144
+ */
11145
+ export type TaskOutputItem = {
11146
+ /**
11147
+ * Description
11148
+ *
11149
+ * What one element is.
11150
+ */
11151
+ description?: string;
11152
+ /**
11153
+ * Enum
11154
+ *
11155
+ * Allowed values. Strings only.
11156
+ */
11157
+ enum?: Array<string> | null;
11158
+ /**
11159
+ * Fields
11160
+ *
11161
+ * An object element's fields.
11162
+ */
11163
+ fields?: Array<TaskOutputField> | null;
11164
+ /**
11165
+ * A nested array's element.
11166
+ */
11167
+ items?: TaskOutputItem | null;
11168
+ /**
11169
+ * Type
11170
+ */
11171
+ type?: 'string' | 'boolean' | 'integer' | 'number' | 'object' | 'array';
10639
11172
  };
10640
11173
  /**
10641
11174
  * TaskPatch
@@ -10680,7 +11213,7 @@ export type TaskPatch = {
10680
11213
  /**
10681
11214
  * Output
10682
11215
  *
10683
- * 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.
11216
+ * 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.
10684
11217
  */
10685
11218
  output?: Array<TaskOutputField> | null;
10686
11219
  /**
@@ -10755,6 +11288,36 @@ export type TaskResponse = {
10755
11288
  */
10756
11289
  versions: Array<TaskVersionResponse> | null;
10757
11290
  };
11291
+ /**
11292
+ * TaskRunBatchItem
11293
+ */
11294
+ export type TaskRunBatchItem = {
11295
+ /**
11296
+ * Deduplicated
11297
+ */
11298
+ deduplicated: boolean;
11299
+ /**
11300
+ * Id
11301
+ */
11302
+ id: string;
11303
+ /**
11304
+ * Idempotency Key
11305
+ */
11306
+ idempotency_key: string | null;
11307
+ /**
11308
+ * Status
11309
+ */
11310
+ status: 'queued' | 'running' | 'completed' | 'failed' | 'canceled';
11311
+ };
11312
+ /**
11313
+ * TaskRunBatchResponse
11314
+ */
11315
+ export type TaskRunBatchResponse = {
11316
+ /**
11317
+ * Runs
11318
+ */
11319
+ runs: Array<TaskRunBatchItem>;
11320
+ };
10758
11321
  /**
10759
11322
  * TaskRunError
10760
11323
  */
@@ -10766,20 +11329,101 @@ export type TaskRunError = {
10766
11329
  /**
10767
11330
  * Type
10768
11331
  */
10769
- type: 'missing_vars' | 'no_output' | 'step_limit' | 'timeout' | 'provider_error' | 'configuration' | 'platform' | 'canceled';
11332
+ type: 'invalid_input' | 'no_output' | 'step_limit' | 'timeout' | 'provider_error' | 'configuration' | 'platform' | 'canceled';
11333
+ };
11334
+ /**
11335
+ * TaskRunFile
11336
+ *
11337
+ * What one PDF input turned into before the model read it.
11338
+ */
11339
+ export type TaskRunFile = {
11340
+ /**
11341
+ * Bytes
11342
+ */
11343
+ bytes: number;
11344
+ /**
11345
+ * Filename
11346
+ */
11347
+ filename: string | null;
11348
+ /**
11349
+ * Images
11350
+ */
11351
+ images: Array<TaskRunImage>;
11352
+ /**
11353
+ * Input
11354
+ */
11355
+ input: string;
11356
+ /**
11357
+ * Pages
11358
+ */
11359
+ pages: number;
11360
+ /**
11361
+ * Text
11362
+ */
11363
+ text: string;
11364
+ };
11365
+ /**
11366
+ * TaskRunImage
11367
+ *
11368
+ * A scanned page, as the model saw it.
11369
+ */
11370
+ export type TaskRunImage = {
11371
+ /**
11372
+ * Height
11373
+ */
11374
+ height: number;
11375
+ /**
11376
+ * Page
11377
+ */
11378
+ page: number;
11379
+ /**
11380
+ * Url
11381
+ */
11382
+ url: string;
11383
+ /**
11384
+ * Url Expires At
11385
+ */
11386
+ url_expires_at: string;
11387
+ /**
11388
+ * Width
11389
+ */
11390
+ width: number;
10770
11391
  };
10771
11392
  /**
10772
11393
  * TaskRunResponse
11394
+ *
11395
+ * One run in full: the config it ran, its inputs, its trace and its usage.
10773
11396
  */
10774
11397
  export type TaskRunResponse = {
10775
11398
  /**
10776
11399
  * Attempts
10777
11400
  */
10778
11401
  attempts: number;
11402
+ /**
11403
+ * Background
11404
+ */
11405
+ background: boolean;
10779
11406
  /**
10780
11407
  * Billing Status
10781
11408
  */
10782
11409
  billing_status: string;
11410
+ /**
11411
+ * Cancel Requested At
11412
+ */
11413
+ cancel_requested_at: string | null;
11414
+ config: TaskConfig | null;
11415
+ /**
11416
+ * Content Deleted At
11417
+ */
11418
+ content_deleted_at: string | null;
11419
+ /**
11420
+ * Content Expires At
11421
+ */
11422
+ content_expires_at: string | null;
11423
+ /**
11424
+ * Created At
11425
+ */
11426
+ created_at: string;
10783
11427
  /**
10784
11428
  * Duration Ms
10785
11429
  */
@@ -10789,14 +11433,28 @@ export type TaskRunResponse = {
10789
11433
  */
10790
11434
  ended_at: string | null;
10791
11435
  error: TaskRunError | null;
11436
+ /**
11437
+ * Files
11438
+ */
11439
+ files: Array<TaskRunFile>;
10792
11440
  /**
10793
11441
  * Id
10794
11442
  */
10795
11443
  id: string;
11444
+ /**
11445
+ * Idempotency Key
11446
+ */
11447
+ idempotency_key: string | null;
10796
11448
  /**
10797
11449
  * Max Steps
10798
11450
  */
10799
11451
  max_steps: number;
11452
+ /**
11453
+ * Metadata
11454
+ */
11455
+ metadata: {
11456
+ [key: string]: string;
11457
+ };
10800
11458
  /**
10801
11459
  * Output
10802
11460
  */
@@ -10810,11 +11468,11 @@ export type TaskRunResponse = {
10810
11468
  /**
10811
11469
  * Started At
10812
11470
  */
10813
- started_at: string;
11471
+ started_at: string | null;
10814
11472
  /**
10815
11473
  * Status
10816
11474
  */
10817
- status: 'running' | 'completed' | 'failed';
11475
+ status: 'queued' | 'running' | 'completed' | 'failed' | 'canceled';
10818
11476
  /**
10819
11477
  * Steps Used
10820
11478
  */
@@ -10835,6 +11493,10 @@ export type TaskRunResponse = {
10835
11493
  * Trace
10836
11494
  */
10837
11495
  trace: Array<TraceStepResponse>;
11496
+ /**
11497
+ * Tries
11498
+ */
11499
+ tries: number;
10838
11500
  /**
10839
11501
  * Usage
10840
11502
  */
@@ -10849,34 +11511,90 @@ export type TaskRunResponse = {
10849
11511
  /**
10850
11512
  * TaskRunSummary
10851
11513
  *
10852
- * A run, as the list page shows it: what happened, when, and what it cost.
11514
+ * A run without its trace, config or inputs: the list item, the
11515
+ * `task_run.completed` webhook body and a task's `last_run`, one shape for all three.
10853
11516
  *
10854
11517
  * `error` is the same object a full run carries rather than a bare type, so
10855
- * one reader answers "how did it go" for both — a summary that spelled the
10856
- * same fact differently would be two shapes for one question.
11518
+ * one reader answers "how did it go" for both.
10857
11519
  */
10858
11520
  export type TaskRunSummary = {
11521
+ /**
11522
+ * Background
11523
+ */
11524
+ background: boolean;
11525
+ /**
11526
+ * Billing Status
11527
+ */
11528
+ billing_status: string;
11529
+ /**
11530
+ * Content Deleted At
11531
+ */
11532
+ content_deleted_at: string | null;
11533
+ /**
11534
+ * Content Expires At
11535
+ */
11536
+ content_expires_at: string | null;
11537
+ /**
11538
+ * Created At
11539
+ */
11540
+ created_at: string;
10859
11541
  /**
10860
11542
  * Duration Ms
10861
11543
  */
10862
- duration_ms?: number | null;
10863
- error?: TaskRunError | null;
11544
+ duration_ms: number | null;
11545
+ /**
11546
+ * Ended At
11547
+ */
11548
+ ended_at: string | null;
11549
+ error: TaskRunError | null;
10864
11550
  /**
10865
11551
  * Id
10866
11552
  */
10867
11553
  id: string;
11554
+ /**
11555
+ * Idempotency Key
11556
+ */
11557
+ idempotency_key: string | null;
11558
+ /**
11559
+ * Metadata
11560
+ */
11561
+ metadata: {
11562
+ [key: string]: string;
11563
+ };
11564
+ /**
11565
+ * Output
11566
+ */
11567
+ output: {
11568
+ [key: string]: unknown;
11569
+ } | null;
10868
11570
  /**
10869
11571
  * Provider Cost
10870
11572
  */
10871
- provider_cost?: number | null;
11573
+ provider_cost: number | null;
10872
11574
  /**
10873
11575
  * Started At
10874
11576
  */
10875
- started_at: string;
11577
+ started_at: string | null;
10876
11578
  /**
10877
11579
  * Status
10878
11580
  */
10879
- status: 'running' | 'completed' | 'failed';
11581
+ status: 'queued' | 'running' | 'completed' | 'failed' | 'canceled';
11582
+ /**
11583
+ * Task Id
11584
+ */
11585
+ task_id: string | null;
11586
+ /**
11587
+ * Task Name
11588
+ */
11589
+ task_name: string | null;
11590
+ /**
11591
+ * Task Version
11592
+ */
11593
+ task_version: number | null;
11594
+ /**
11595
+ * Tries
11596
+ */
11597
+ tries: number;
10880
11598
  };
10881
11599
  /**
10882
11600
  * TaskSelection
@@ -11187,6 +11905,81 @@ export type TelephonySetupStep = {
11187
11905
  */
11188
11906
  user_confirmable: boolean;
11189
11907
  };
11908
+ /**
11909
+ * TemplateSend
11910
+ */
11911
+ export type TemplateSend = {
11912
+ /**
11913
+ * Id
11914
+ *
11915
+ * Twilio Content SID (HX…) or Gupshup template id.
11916
+ */
11917
+ id: string;
11918
+ /**
11919
+ * Variables
11920
+ *
11921
+ * Every placeholder, button variables included.
11922
+ */
11923
+ variables?: {
11924
+ [key: string]: string;
11925
+ };
11926
+ };
11927
+ /**
11928
+ * TestInboundWebhookRequest
11929
+ */
11930
+ export type TestInboundWebhookRequest = {
11931
+ /**
11932
+ * Channel
11933
+ */
11934
+ channel: 'phone_call' | 'whatsapp_call' | 'whatsapp_message' | 'telegram';
11935
+ /**
11936
+ * Number
11937
+ *
11938
+ * Your number, as `to`.
11939
+ */
11940
+ number: string;
11941
+ /**
11942
+ * Peer
11943
+ *
11944
+ * Theirs, as `from`.
11945
+ */
11946
+ peer: string;
11947
+ };
11948
+ /**
11949
+ * TestInboundWebhookResponse
11950
+ *
11951
+ * What your server answered to a sample `session.request`.
11952
+ */
11953
+ export type TestInboundWebhookResponse = {
11954
+ /**
11955
+ * Duration Ms
11956
+ */
11957
+ duration_ms: number;
11958
+ /**
11959
+ * Errors
11960
+ */
11961
+ errors: Array<string>;
11962
+ /**
11963
+ * Response
11964
+ *
11965
+ * The JSON object your server returned.
11966
+ */
11967
+ response: {
11968
+ [key: string]: unknown;
11969
+ } | null;
11970
+ /**
11971
+ * Status Code
11972
+ *
11973
+ * Null when no HTTP response arrived.
11974
+ */
11975
+ status_code: number | null;
11976
+ /**
11977
+ * Valid
11978
+ *
11979
+ * Whether a real session would have accepted this answer.
11980
+ */
11981
+ valid: boolean;
11982
+ };
11190
11983
  /**
11191
11984
  * TimeWindow
11192
11985
  *
@@ -11224,7 +12017,8 @@ export type TimeWindow = {
11224
12017
  *
11225
12018
  * One browser call: who is on it, what it starts knowing, and what runs.
11226
12019
  *
11227
- * `vars` comes from `AgentPlanRequest` and lasts exactly as long as this call.
12020
+ * `vars` comes from `AgentPlanRequest` and `secrets` from `SessionSecretsField`;
12021
+ * both last exactly as long as this call.
11228
12022
  */
11229
12023
  export type TokenRequest = {
11230
12024
  /**
@@ -11259,6 +12053,14 @@ export type TokenRequest = {
11259
12053
  * Region
11260
12054
  */
11261
12055
  region?: 'us' | 'in';
12056
+ /**
12057
+ * Secrets
12058
+ *
12059
+ * 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.
12060
+ */
12061
+ secrets?: {
12062
+ [key: string]: string;
12063
+ } | null;
11262
12064
  /**
11263
12065
  * Userdata
11264
12066
  */
@@ -11268,7 +12070,7 @@ export type TokenRequest = {
11268
12070
  /**
11269
12071
  * Vars
11270
12072
  *
11271
- * 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.
12073
+ * 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.
11272
12074
  */
11273
12075
  vars?: {
11274
12076
  [key: string]: string;
@@ -11772,11 +12574,11 @@ export type UpdateFaqEntryRequest = {
11772
12574
  /**
11773
12575
  * Answer
11774
12576
  */
11775
- answer?: string | null;
12577
+ answer?: string;
11776
12578
  /**
11777
12579
  * Question
11778
12580
  */
11779
- question?: string | null;
12581
+ question?: string;
11780
12582
  };
11781
12583
  /**
11782
12584
  * UpdateFaqRequest
@@ -11857,6 +12659,18 @@ export type VarDeclaration = {
11857
12659
  * 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.
11858
12660
  */
11859
12661
  required?: boolean;
12662
+ /**
12663
+ * Type
12664
+ *
12665
+ * 'file' takes a PDF on a task run. Tasks only.
12666
+ */
12667
+ type?: 'text' | 'file';
12668
+ /**
12669
+ * Untrusted
12670
+ *
12671
+ * Third-party content: given to the model as data, never templated. Tasks only.
12672
+ */
12673
+ untrusted?: boolean;
11860
12674
  };
11861
12675
  /**
11862
12676
  * VerifiedSendersResponse
@@ -13248,6 +14062,12 @@ export type CallsListData = {
13248
14062
  * only calls placed by this outbound batch, retries included
13249
14063
  */
13250
14064
  batch_id?: string | null;
14065
+ /**
14066
+ * Metadata
14067
+ *
14068
+ * `key:value` pairs, all must match.
14069
+ */
14070
+ metadata?: Array<string>;
13251
14071
  };
13252
14072
  url: '/v1/calls';
13253
14073
  };
@@ -14610,6 +15430,12 @@ export type ChatsListData = {
14610
15430
  * Status
14611
15431
  */
14612
15432
  status?: 'open' | 'ended' | 'all';
15433
+ /**
15434
+ * Metadata
15435
+ *
15436
+ * `key:value` pairs, all must match.
15437
+ */
15438
+ metadata?: Array<string>;
14613
15439
  };
14614
15440
  url: '/v1/chats';
14615
15441
  };
@@ -15151,24 +15977,68 @@ export type ConversationsListResults = {
15151
15977
  200: PageConversationResponse;
15152
15978
  };
15153
15979
  export type ConversationsListResult = ConversationsListResults[keyof ConversationsListResults];
15154
- export type ConversationsGetData = {
15155
- body?: never;
15156
- path: {
15157
- /**
15158
- * Conversation Id
15159
- */
15160
- conversation_id: string;
15161
- };
15980
+ export type ConversationsItemsCreateData = {
15981
+ body: PostItemRequest;
15982
+ path?: never;
15162
15983
  query?: never;
15163
- url: '/v1/conversations/{conversation_id}';
15984
+ url: '/v1/conversations/items';
15164
15985
  };
15165
- export type ConversationsGetErrors = {
15986
+ export type ConversationsItemsCreateErrors = {
15987
+ /**
15988
+ * Well-formed, but rejected by a rule; `detail.errors` lists each problem.
15989
+ */
15990
+ 400: ErrorResponse;
15166
15991
  /**
15167
15992
  * Missing credential, or one that is revoked or no longer a member of this organization.
15168
15993
  */
15169
15994
  401: ErrorResponse;
15170
15995
  /**
15171
- * No such resource in this organization.
15996
+ * Authenticated, but this organization role may not perform the operation.
15997
+ */
15998
+ 403: ErrorResponse;
15999
+ /**
16000
+ * The resource's current state forbids this — a name already taken, a job already running.
16001
+ */
16002
+ 409: ErrorResponse;
16003
+ /**
16004
+ * The request did not match this operation's schema; `detail.errors` lists each field.
16005
+ */
16006
+ 422: ErrorResponse;
16007
+ /**
16008
+ * Unexpected error. Every error this API returns carries this body.
16009
+ */
16010
+ default: ErrorResponse;
16011
+ };
16012
+ export type ConversationsItemsCreateError = ConversationsItemsCreateErrors[keyof ConversationsItemsCreateErrors];
16013
+ export type ConversationsItemsCreateResults = {
16014
+ /**
16015
+ * Idempotent replay.
16016
+ */
16017
+ 200: ConversationItemResponse;
16018
+ /**
16019
+ * Successful Response
16020
+ */
16021
+ 201: ConversationItemResponse;
16022
+ };
16023
+ export type ConversationsItemsCreateResult = ConversationsItemsCreateResults[keyof ConversationsItemsCreateResults];
16024
+ export type ConversationsGetData = {
16025
+ body?: never;
16026
+ path: {
16027
+ /**
16028
+ * Conversation Id
16029
+ */
16030
+ conversation_id: string;
16031
+ };
16032
+ query?: never;
16033
+ url: '/v1/conversations/{conversation_id}';
16034
+ };
16035
+ export type ConversationsGetErrors = {
16036
+ /**
16037
+ * Missing credential, or one that is revoked or no longer a member of this organization.
16038
+ */
16039
+ 401: ErrorResponse;
16040
+ /**
16041
+ * No such resource in this organization.
15172
16042
  */
15173
16043
  404: ErrorResponse;
15174
16044
  /**
@@ -17122,6 +17992,182 @@ export type FaqsEntriesUpdateResults = {
17122
17992
  200: FaqEntry;
17123
17993
  };
17124
17994
  export type FaqsEntriesUpdateResult = FaqsEntriesUpdateResults[keyof FaqsEntriesUpdateResults];
17995
+ export type InboundWebhookDeleteData = {
17996
+ body?: never;
17997
+ path?: never;
17998
+ query?: never;
17999
+ url: '/v1/inbound-webhook';
18000
+ };
18001
+ export type InboundWebhookDeleteErrors = {
18002
+ /**
18003
+ * Well-formed, but rejected by a rule; `detail.errors` lists each problem.
18004
+ */
18005
+ 400: ErrorResponse;
18006
+ /**
18007
+ * Missing credential, or one that is revoked or no longer a member of this organization.
18008
+ */
18009
+ 401: ErrorResponse;
18010
+ /**
18011
+ * Authenticated, but this organization role may not perform the operation.
18012
+ */
18013
+ 403: ErrorResponse;
18014
+ /**
18015
+ * The resource's current state forbids this — a name already taken, a job already running.
18016
+ */
18017
+ 409: ErrorResponse;
18018
+ /**
18019
+ * Unexpected error. Every error this API returns carries this body.
18020
+ */
18021
+ default: ErrorResponse;
18022
+ };
18023
+ export type InboundWebhookDeleteError = InboundWebhookDeleteErrors[keyof InboundWebhookDeleteErrors];
18024
+ export type InboundWebhookDeleteResults = {
18025
+ /**
18026
+ * Successful Response
18027
+ */
18028
+ 200: OkResponse;
18029
+ };
18030
+ export type InboundWebhookDeleteResult = InboundWebhookDeleteResults[keyof InboundWebhookDeleteResults];
18031
+ export type InboundWebhookGetData = {
18032
+ body?: never;
18033
+ path?: never;
18034
+ query?: never;
18035
+ url: '/v1/inbound-webhook';
18036
+ };
18037
+ export type InboundWebhookGetErrors = {
18038
+ /**
18039
+ * Missing credential, or one that is revoked or no longer a member of this organization.
18040
+ */
18041
+ 401: ErrorResponse;
18042
+ /**
18043
+ * Unexpected error. Every error this API returns carries this body.
18044
+ */
18045
+ default: ErrorResponse;
18046
+ };
18047
+ export type InboundWebhookGetError = InboundWebhookGetErrors[keyof InboundWebhookGetErrors];
18048
+ export type InboundWebhookGetResults = {
18049
+ /**
18050
+ * Successful Response
18051
+ */
18052
+ 200: InboundWebhookResponse;
18053
+ };
18054
+ export type InboundWebhookGetResult = InboundWebhookGetResults[keyof InboundWebhookGetResults];
18055
+ export type InboundWebhookSetData = {
18056
+ body: SetInboundWebhookRequest;
18057
+ path?: never;
18058
+ query?: never;
18059
+ url: '/v1/inbound-webhook';
18060
+ };
18061
+ export type InboundWebhookSetErrors = {
18062
+ /**
18063
+ * Well-formed, but rejected by a rule; `detail.errors` lists each problem.
18064
+ */
18065
+ 400: ErrorResponse;
18066
+ /**
18067
+ * Missing credential, or one that is revoked or no longer a member of this organization.
18068
+ */
18069
+ 401: ErrorResponse;
18070
+ /**
18071
+ * Authenticated, but this organization role may not perform the operation.
18072
+ */
18073
+ 403: ErrorResponse;
18074
+ /**
18075
+ * The resource's current state forbids this — a name already taken, a job already running.
18076
+ */
18077
+ 409: ErrorResponse;
18078
+ /**
18079
+ * The request did not match this operation's schema; `detail.errors` lists each field.
18080
+ */
18081
+ 422: ErrorResponse;
18082
+ /**
18083
+ * Unexpected error. Every error this API returns carries this body.
18084
+ */
18085
+ default: ErrorResponse;
18086
+ };
18087
+ export type InboundWebhookSetError = InboundWebhookSetErrors[keyof InboundWebhookSetErrors];
18088
+ export type InboundWebhookSetResults = {
18089
+ /**
18090
+ * Successful Response
18091
+ */
18092
+ 200: InboundWebhookResponse;
18093
+ };
18094
+ export type InboundWebhookSetResult = InboundWebhookSetResults[keyof InboundWebhookSetResults];
18095
+ export type InboundWebhookRotateSecretData = {
18096
+ body?: never;
18097
+ path?: never;
18098
+ query?: never;
18099
+ url: '/v1/inbound-webhook/rotate-secret';
18100
+ };
18101
+ export type InboundWebhookRotateSecretErrors = {
18102
+ /**
18103
+ * Well-formed, but rejected by a rule; `detail.errors` lists each problem.
18104
+ */
18105
+ 400: ErrorResponse;
18106
+ /**
18107
+ * Missing credential, or one that is revoked or no longer a member of this organization.
18108
+ */
18109
+ 401: ErrorResponse;
18110
+ /**
18111
+ * Authenticated, but this organization role may not perform the operation.
18112
+ */
18113
+ 403: ErrorResponse;
18114
+ /**
18115
+ * The resource's current state forbids this — a name already taken, a job already running.
18116
+ */
18117
+ 409: ErrorResponse;
18118
+ /**
18119
+ * Unexpected error. Every error this API returns carries this body.
18120
+ */
18121
+ default: ErrorResponse;
18122
+ };
18123
+ export type InboundWebhookRotateSecretError = InboundWebhookRotateSecretErrors[keyof InboundWebhookRotateSecretErrors];
18124
+ export type InboundWebhookRotateSecretResults = {
18125
+ /**
18126
+ * Successful Response
18127
+ */
18128
+ 200: InboundWebhookResponse;
18129
+ };
18130
+ export type InboundWebhookRotateSecretResult = InboundWebhookRotateSecretResults[keyof InboundWebhookRotateSecretResults];
18131
+ export type InboundWebhookTestData = {
18132
+ body: TestInboundWebhookRequest;
18133
+ path?: never;
18134
+ query?: never;
18135
+ url: '/v1/inbound-webhook/test';
18136
+ };
18137
+ export type InboundWebhookTestErrors = {
18138
+ /**
18139
+ * Well-formed, but rejected by a rule; `detail.errors` lists each problem.
18140
+ */
18141
+ 400: ErrorResponse;
18142
+ /**
18143
+ * Missing credential, or one that is revoked or no longer a member of this organization.
18144
+ */
18145
+ 401: ErrorResponse;
18146
+ /**
18147
+ * Authenticated, but this organization role may not perform the operation.
18148
+ */
18149
+ 403: ErrorResponse;
18150
+ /**
18151
+ * The resource's current state forbids this — a name already taken, a job already running.
18152
+ */
18153
+ 409: ErrorResponse;
18154
+ /**
18155
+ * The request did not match this operation's schema; `detail.errors` lists each field.
18156
+ */
18157
+ 422: ErrorResponse;
18158
+ /**
18159
+ * Unexpected error. Every error this API returns carries this body.
18160
+ */
18161
+ default: ErrorResponse;
18162
+ };
18163
+ export type InboundWebhookTestError = InboundWebhookTestErrors[keyof InboundWebhookTestErrors];
18164
+ export type InboundWebhookTestResults = {
18165
+ /**
18166
+ * Successful Response
18167
+ */
18168
+ 200: TestInboundWebhookResponse;
18169
+ };
18170
+ export type InboundWebhookTestResult = InboundWebhookTestResults[keyof InboundWebhookTestResults];
17125
18171
  export type IntegrationsListData = {
17126
18172
  body?: never;
17127
18173
  path?: never;
@@ -18070,10 +19116,32 @@ export type TelephonyStreamsUpdateResults = {
18070
19116
  200: StreamConnectionResponse;
18071
19117
  };
18072
19118
  export type TelephonyStreamsUpdateResult = TelephonyStreamsUpdateResults[keyof TelephonyStreamsUpdateResults];
18073
- export type TasksListData = {
19119
+ export type TaskRunsListData = {
18074
19120
  body?: never;
18075
19121
  path?: never;
18076
19122
  query?: {
19123
+ /**
19124
+ * Task Id
19125
+ */
19126
+ task_id?: string | null;
19127
+ /**
19128
+ * Status
19129
+ */
19130
+ status?: 'queued' | 'running' | 'completed' | 'failed' | 'canceled' | null;
19131
+ /**
19132
+ * Metadata
19133
+ *
19134
+ * `key:value` pairs, all must match.
19135
+ */
19136
+ metadata?: Array<string>;
19137
+ /**
19138
+ * Created After
19139
+ */
19140
+ created_after?: string | null;
19141
+ /**
19142
+ * Created Before
19143
+ */
19144
+ created_before?: string | null;
18077
19145
  /**
18078
19146
  * Limit
18079
19147
  */
@@ -18083,9 +19151,9 @@ export type TasksListData = {
18083
19151
  */
18084
19152
  offset?: number;
18085
19153
  };
18086
- url: '/v1/tasks';
19154
+ url: '/v1/task-runs';
18087
19155
  };
18088
- export type TasksListErrors = {
19156
+ export type TaskRunsListErrors = {
18089
19157
  /**
18090
19158
  * Missing credential, or one that is revoked or no longer a member of this organization.
18091
19159
  */
@@ -18099,21 +19167,21 @@ export type TasksListErrors = {
18099
19167
  */
18100
19168
  default: ErrorResponse;
18101
19169
  };
18102
- export type TasksListError = TasksListErrors[keyof TasksListErrors];
18103
- export type TasksListResults = {
19170
+ export type TaskRunsListError = TaskRunsListErrors[keyof TaskRunsListErrors];
19171
+ export type TaskRunsListResults = {
18104
19172
  /**
18105
19173
  * Successful Response
18106
19174
  */
18107
- 200: PageTaskResponse;
19175
+ 200: PageTaskRunSummary;
18108
19176
  };
18109
- export type TasksListResult = TasksListResults[keyof TasksListResults];
18110
- export type TasksCreateData = {
18111
- body: CreateTaskRequest;
19177
+ export type TaskRunsListResult = TaskRunsListResults[keyof TaskRunsListResults];
19178
+ export type TaskRunsCreateData = {
19179
+ body: CreateTaskRunRequest;
18112
19180
  path?: never;
18113
19181
  query?: never;
18114
- url: '/v1/tasks';
19182
+ url: '/v1/task-runs';
18115
19183
  };
18116
- export type TasksCreateErrors = {
19184
+ export type TaskRunsCreateErrors = {
18117
19185
  /**
18118
19186
  * Well-formed, but rejected by a rule; `detail.errors` lists each problem.
18119
19187
  */
@@ -18139,26 +19207,110 @@ export type TasksCreateErrors = {
18139
19207
  */
18140
19208
  default: ErrorResponse;
18141
19209
  };
18142
- export type TasksCreateError = TasksCreateErrors[keyof TasksCreateErrors];
18143
- export type TasksCreateResults = {
19210
+ export type TaskRunsCreateError = TaskRunsCreateErrors[keyof TaskRunsCreateErrors];
19211
+ export type TaskRunsCreateResults = {
18144
19212
  /**
18145
19213
  * Successful Response
18146
19214
  */
18147
- 201: TaskResponse;
19215
+ 200: TaskRunResponse;
19216
+ /**
19217
+ * Queued (`background: true`).
19218
+ */
19219
+ 202: TaskRunResponse;
18148
19220
  };
18149
- export type TasksCreateResult = TasksCreateResults[keyof TasksCreateResults];
18150
- export type TasksDeleteData = {
19221
+ export type TaskRunsCreateResult = TaskRunsCreateResults[keyof TaskRunsCreateResults];
19222
+ export type TaskRunsCreateBatchData = {
19223
+ body: CreateTaskRunBatchRequest;
19224
+ path?: never;
19225
+ query?: never;
19226
+ url: '/v1/task-runs/batch';
19227
+ };
19228
+ export type TaskRunsCreateBatchErrors = {
19229
+ /**
19230
+ * Well-formed, but rejected by a rule; `detail.errors` lists each problem.
19231
+ */
19232
+ 400: ErrorResponse;
19233
+ /**
19234
+ * Missing credential, or one that is revoked or no longer a member of this organization.
19235
+ */
19236
+ 401: ErrorResponse;
19237
+ /**
19238
+ * Authenticated, but this organization role may not perform the operation.
19239
+ */
19240
+ 403: ErrorResponse;
19241
+ /**
19242
+ * The resource's current state forbids this — a name already taken, a job already running.
19243
+ */
19244
+ 409: ErrorResponse;
19245
+ /**
19246
+ * The request did not match this operation's schema; `detail.errors` lists each field.
19247
+ */
19248
+ 422: ErrorResponse;
19249
+ /**
19250
+ * Unexpected error. Every error this API returns carries this body.
19251
+ */
19252
+ default: ErrorResponse;
19253
+ };
19254
+ export type TaskRunsCreateBatchError = TaskRunsCreateBatchErrors[keyof TaskRunsCreateBatchErrors];
19255
+ export type TaskRunsCreateBatchResults = {
19256
+ /**
19257
+ * Successful Response
19258
+ */
19259
+ 202: TaskRunBatchResponse;
19260
+ };
19261
+ export type TaskRunsCreateBatchResult = TaskRunsCreateBatchResults[keyof TaskRunsCreateBatchResults];
19262
+ export type TaskRunsDeleteManyData = {
19263
+ body: DeleteTaskRunsRequest;
19264
+ path?: never;
19265
+ query?: never;
19266
+ url: '/v1/task-runs/delete';
19267
+ };
19268
+ export type TaskRunsDeleteManyErrors = {
19269
+ /**
19270
+ * Well-formed, but rejected by a rule; `detail.errors` lists each problem.
19271
+ */
19272
+ 400: ErrorResponse;
19273
+ /**
19274
+ * Missing credential, or one that is revoked or no longer a member of this organization.
19275
+ */
19276
+ 401: ErrorResponse;
19277
+ /**
19278
+ * Authenticated, but this organization role may not perform the operation.
19279
+ */
19280
+ 403: ErrorResponse;
19281
+ /**
19282
+ * The resource's current state forbids this — a name already taken, a job already running.
19283
+ */
19284
+ 409: ErrorResponse;
19285
+ /**
19286
+ * The request did not match this operation's schema; `detail.errors` lists each field.
19287
+ */
19288
+ 422: ErrorResponse;
19289
+ /**
19290
+ * Unexpected error. Every error this API returns carries this body.
19291
+ */
19292
+ default: ErrorResponse;
19293
+ };
19294
+ export type TaskRunsDeleteManyError = TaskRunsDeleteManyErrors[keyof TaskRunsDeleteManyErrors];
19295
+ export type TaskRunsDeleteManyResults = {
19296
+ /**
19297
+ * Successful Response
19298
+ */
19299
+ 202: DeleteTaskRunsResponse;
19300
+ };
19301
+ export type TaskRunsDeleteManyResult = TaskRunsDeleteManyResults[keyof TaskRunsDeleteManyResults];
19302
+ export type TaskRunsDeleteData = {
18151
19303
  body?: never;
18152
19304
  path: {
18153
19305
  /**
18154
- * Task Id
19306
+ * Run Id
18155
19307
  */
18156
- task_id: string;
19308
+ run_id: string;
18157
19309
  };
18158
19310
  query?: never;
18159
- url: '/v1/tasks/{task_id}';
19311
+ url: '/v1/task-runs/{run_id}';
18160
19312
  };
18161
- export type TasksDeleteErrors = {
19313
+ export type TaskRunsDeleteErrors = {
18162
19314
  /**
18163
19315
  * Well-formed, but rejected by a rule; `detail.errors` lists each problem.
18164
19316
  */
@@ -18188,26 +19340,25 @@ export type TasksDeleteErrors = {
18188
19340
  */
18189
19341
  default: ErrorResponse;
18190
19342
  };
18191
- export type TasksDeleteError = TasksDeleteErrors[keyof TasksDeleteErrors];
18192
- export type TasksDeleteResults = {
19343
+ export type TaskRunsDeleteError = TaskRunsDeleteErrors[keyof TaskRunsDeleteErrors];
19344
+ export type TaskRunsDeleteResults = {
18193
19345
  /**
18194
- * Successful Response
19346
+ * Deletion scheduled. No body.
18195
19347
  */
18196
- 200: OkResponse;
19348
+ 202: unknown;
18197
19349
  };
18198
- export type TasksDeleteResult = TasksDeleteResults[keyof TasksDeleteResults];
18199
- export type TasksGetData = {
19350
+ export type TaskRunsGetData = {
18200
19351
  body?: never;
18201
19352
  path: {
18202
19353
  /**
18203
- * Task Id
19354
+ * Run Id
18204
19355
  */
18205
- task_id: string;
19356
+ run_id: string;
18206
19357
  };
18207
19358
  query?: never;
18208
- url: '/v1/tasks/{task_id}';
19359
+ url: '/v1/task-runs/{run_id}';
18209
19360
  };
18210
- export type TasksGetErrors = {
19361
+ export type TaskRunsGetErrors = {
18211
19362
  /**
18212
19363
  * Missing credential, or one that is revoked or no longer a member of this organization.
18213
19364
  */
@@ -18225,26 +19376,26 @@ export type TasksGetErrors = {
18225
19376
  */
18226
19377
  default: ErrorResponse;
18227
19378
  };
18228
- export type TasksGetError = TasksGetErrors[keyof TasksGetErrors];
18229
- export type TasksGetResults = {
19379
+ export type TaskRunsGetError = TaskRunsGetErrors[keyof TaskRunsGetErrors];
19380
+ export type TaskRunsGetResults = {
18230
19381
  /**
18231
19382
  * Successful Response
18232
19383
  */
18233
- 200: TaskResponse;
19384
+ 200: TaskRunResponse;
18234
19385
  };
18235
- export type TasksGetResult = TasksGetResults[keyof TasksGetResults];
18236
- export type TasksUpdateData = {
18237
- body: PatchTaskRequest;
19386
+ export type TaskRunsGetResult = TaskRunsGetResults[keyof TaskRunsGetResults];
19387
+ export type TaskRunsCancelData = {
19388
+ body?: never;
18238
19389
  path: {
18239
19390
  /**
18240
- * Task Id
19391
+ * Run Id
18241
19392
  */
18242
- task_id: string;
19393
+ run_id: string;
18243
19394
  };
18244
19395
  query?: never;
18245
- url: '/v1/tasks/{task_id}';
19396
+ url: '/v1/task-runs/{run_id}/cancel';
18246
19397
  };
18247
- export type TasksUpdateErrors = {
19398
+ export type TaskRunsCancelErrors = {
18248
19399
  /**
18249
19400
  * Well-formed, but rejected by a rule; `detail.errors` lists each problem.
18250
19401
  */
@@ -18274,15 +19425,92 @@ export type TasksUpdateErrors = {
18274
19425
  */
18275
19426
  default: ErrorResponse;
18276
19427
  };
18277
- export type TasksUpdateError = TasksUpdateErrors[keyof TasksUpdateErrors];
18278
- export type TasksUpdateResults = {
19428
+ export type TaskRunsCancelError = TaskRunsCancelErrors[keyof TaskRunsCancelErrors];
19429
+ export type TaskRunsCancelResults = {
18279
19430
  /**
18280
19431
  * Successful Response
18281
19432
  */
18282
- 200: TaskResponse;
19433
+ 200: TaskRunResponse;
18283
19434
  };
18284
- export type TasksUpdateResult = TasksUpdateResults[keyof TasksUpdateResults];
18285
- export type TasksPublishData = {
19435
+ export type TaskRunsCancelResult = TaskRunsCancelResults[keyof TaskRunsCancelResults];
19436
+ export type TasksListData = {
19437
+ body?: never;
19438
+ path?: never;
19439
+ query?: {
19440
+ /**
19441
+ * Limit
19442
+ */
19443
+ limit?: number;
19444
+ /**
19445
+ * Offset
19446
+ */
19447
+ offset?: number;
19448
+ };
19449
+ url: '/v1/tasks';
19450
+ };
19451
+ export type TasksListErrors = {
19452
+ /**
19453
+ * Missing credential, or one that is revoked or no longer a member of this organization.
19454
+ */
19455
+ 401: ErrorResponse;
19456
+ /**
19457
+ * The request did not match this operation's schema; `detail.errors` lists each field.
19458
+ */
19459
+ 422: ErrorResponse;
19460
+ /**
19461
+ * Unexpected error. Every error this API returns carries this body.
19462
+ */
19463
+ default: ErrorResponse;
19464
+ };
19465
+ export type TasksListError = TasksListErrors[keyof TasksListErrors];
19466
+ export type TasksListResults = {
19467
+ /**
19468
+ * Successful Response
19469
+ */
19470
+ 200: PageTaskResponse;
19471
+ };
19472
+ export type TasksListResult = TasksListResults[keyof TasksListResults];
19473
+ export type TasksCreateData = {
19474
+ body: CreateTaskRequest;
19475
+ path?: never;
19476
+ query?: never;
19477
+ url: '/v1/tasks';
19478
+ };
19479
+ export type TasksCreateErrors = {
19480
+ /**
19481
+ * Well-formed, but rejected by a rule; `detail.errors` lists each problem.
19482
+ */
19483
+ 400: ErrorResponse;
19484
+ /**
19485
+ * Missing credential, or one that is revoked or no longer a member of this organization.
19486
+ */
19487
+ 401: ErrorResponse;
19488
+ /**
19489
+ * Authenticated, but this organization role may not perform the operation.
19490
+ */
19491
+ 403: ErrorResponse;
19492
+ /**
19493
+ * The resource's current state forbids this — a name already taken, a job already running.
19494
+ */
19495
+ 409: ErrorResponse;
19496
+ /**
19497
+ * The request did not match this operation's schema; `detail.errors` lists each field.
19498
+ */
19499
+ 422: ErrorResponse;
19500
+ /**
19501
+ * Unexpected error. Every error this API returns carries this body.
19502
+ */
19503
+ default: ErrorResponse;
19504
+ };
19505
+ export type TasksCreateError = TasksCreateErrors[keyof TasksCreateErrors];
19506
+ export type TasksCreateResults = {
19507
+ /**
19508
+ * Successful Response
19509
+ */
19510
+ 201: TaskResponse;
19511
+ };
19512
+ export type TasksCreateResult = TasksCreateResults[keyof TasksCreateResults];
19513
+ export type TasksDeleteData = {
18286
19514
  body?: never;
18287
19515
  path: {
18288
19516
  /**
@@ -18291,9 +19519,9 @@ export type TasksPublishData = {
18291
19519
  task_id: string;
18292
19520
  };
18293
19521
  query?: never;
18294
- url: '/v1/tasks/{task_id}/publish';
19522
+ url: '/v1/tasks/{task_id}';
18295
19523
  };
18296
- export type TasksPublishErrors = {
19524
+ export type TasksDeleteErrors = {
18297
19525
  /**
18298
19526
  * Well-formed, but rejected by a rule; `detail.errors` lists each problem.
18299
19527
  */
@@ -18323,15 +19551,15 @@ export type TasksPublishErrors = {
18323
19551
  */
18324
19552
  default: ErrorResponse;
18325
19553
  };
18326
- export type TasksPublishError = TasksPublishErrors[keyof TasksPublishErrors];
18327
- export type TasksPublishResults = {
19554
+ export type TasksDeleteError = TasksDeleteErrors[keyof TasksDeleteErrors];
19555
+ export type TasksDeleteResults = {
18328
19556
  /**
18329
19557
  * Successful Response
18330
19558
  */
18331
- 200: PublishTaskResponse;
19559
+ 200: OkResponse;
18332
19560
  };
18333
- export type TasksPublishResult = TasksPublishResults[keyof TasksPublishResults];
18334
- export type TasksRunsListData = {
19561
+ export type TasksDeleteResult = TasksDeleteResults[keyof TasksDeleteResults];
19562
+ export type TasksGetData = {
18335
19563
  body?: never;
18336
19564
  path: {
18337
19565
  /**
@@ -18339,19 +19567,10 @@ export type TasksRunsListData = {
18339
19567
  */
18340
19568
  task_id: string;
18341
19569
  };
18342
- query?: {
18343
- /**
18344
- * Limit
18345
- */
18346
- limit?: number;
18347
- /**
18348
- * Offset
18349
- */
18350
- offset?: number;
18351
- };
18352
- url: '/v1/tasks/{task_id}/runs';
19570
+ query?: never;
19571
+ url: '/v1/tasks/{task_id}';
18353
19572
  };
18354
- export type TasksRunsListErrors = {
19573
+ export type TasksGetErrors = {
18355
19574
  /**
18356
19575
  * Missing credential, or one that is revoked or no longer a member of this organization.
18357
19576
  */
@@ -18369,16 +19588,16 @@ export type TasksRunsListErrors = {
18369
19588
  */
18370
19589
  default: ErrorResponse;
18371
19590
  };
18372
- export type TasksRunsListError = TasksRunsListErrors[keyof TasksRunsListErrors];
18373
- export type TasksRunsListResults = {
19591
+ export type TasksGetError = TasksGetErrors[keyof TasksGetErrors];
19592
+ export type TasksGetResults = {
18374
19593
  /**
18375
19594
  * Successful Response
18376
19595
  */
18377
- 200: PageTaskRunResponse;
19596
+ 200: TaskResponse;
18378
19597
  };
18379
- export type TasksRunsListResult = TasksRunsListResults[keyof TasksRunsListResults];
18380
- export type TasksRunsCreateData = {
18381
- body: RunTaskRequest;
19598
+ export type TasksGetResult = TasksGetResults[keyof TasksGetResults];
19599
+ export type TasksUpdateData = {
19600
+ body: PatchTaskRequest;
18382
19601
  path: {
18383
19602
  /**
18384
19603
  * Task Id
@@ -18386,9 +19605,9 @@ export type TasksRunsCreateData = {
18386
19605
  task_id: string;
18387
19606
  };
18388
19607
  query?: never;
18389
- url: '/v1/tasks/{task_id}/runs';
19608
+ url: '/v1/tasks/{task_id}';
18390
19609
  };
18391
- export type TasksRunsCreateErrors = {
19610
+ export type TasksUpdateErrors = {
18392
19611
  /**
18393
19612
  * Well-formed, but rejected by a rule; `detail.errors` lists each problem.
18394
19613
  */
@@ -18418,38 +19637,46 @@ export type TasksRunsCreateErrors = {
18418
19637
  */
18419
19638
  default: ErrorResponse;
18420
19639
  };
18421
- export type TasksRunsCreateError = TasksRunsCreateErrors[keyof TasksRunsCreateErrors];
18422
- export type TasksRunsCreateResults = {
19640
+ export type TasksUpdateError = TasksUpdateErrors[keyof TasksUpdateErrors];
19641
+ export type TasksUpdateResults = {
18423
19642
  /**
18424
19643
  * Successful Response
18425
19644
  */
18426
- 200: TaskRunResponse;
19645
+ 200: TaskResponse;
18427
19646
  };
18428
- export type TasksRunsCreateResult = TasksRunsCreateResults[keyof TasksRunsCreateResults];
18429
- export type TasksRunsGetData = {
19647
+ export type TasksUpdateResult = TasksUpdateResults[keyof TasksUpdateResults];
19648
+ export type TasksPublishData = {
18430
19649
  body?: never;
18431
19650
  path: {
18432
19651
  /**
18433
19652
  * Task Id
18434
19653
  */
18435
19654
  task_id: string;
18436
- /**
18437
- * Run Id
18438
- */
18439
- run_id: string;
18440
19655
  };
18441
19656
  query?: never;
18442
- url: '/v1/tasks/{task_id}/runs/{run_id}';
19657
+ url: '/v1/tasks/{task_id}/publish';
18443
19658
  };
18444
- export type TasksRunsGetErrors = {
19659
+ export type TasksPublishErrors = {
19660
+ /**
19661
+ * Well-formed, but rejected by a rule; `detail.errors` lists each problem.
19662
+ */
19663
+ 400: ErrorResponse;
18445
19664
  /**
18446
19665
  * Missing credential, or one that is revoked or no longer a member of this organization.
18447
19666
  */
18448
19667
  401: ErrorResponse;
19668
+ /**
19669
+ * Authenticated, but this organization role may not perform the operation.
19670
+ */
19671
+ 403: ErrorResponse;
18449
19672
  /**
18450
19673
  * No such resource in this organization.
18451
19674
  */
18452
19675
  404: ErrorResponse;
19676
+ /**
19677
+ * The resource's current state forbids this — a name already taken, a job already running.
19678
+ */
19679
+ 409: ErrorResponse;
18453
19680
  /**
18454
19681
  * The request did not match this operation's schema; `detail.errors` lists each field.
18455
19682
  */
@@ -18459,14 +19686,14 @@ export type TasksRunsGetErrors = {
18459
19686
  */
18460
19687
  default: ErrorResponse;
18461
19688
  };
18462
- export type TasksRunsGetError = TasksRunsGetErrors[keyof TasksRunsGetErrors];
18463
- export type TasksRunsGetResults = {
19689
+ export type TasksPublishError = TasksPublishErrors[keyof TasksPublishErrors];
19690
+ export type TasksPublishResults = {
18464
19691
  /**
18465
19692
  * Successful Response
18466
19693
  */
18467
- 200: TaskRunResponse;
19694
+ 200: PublishTaskResponse;
18468
19695
  };
18469
- export type TasksRunsGetResult = TasksRunsGetResults[keyof TasksRunsGetResults];
19696
+ export type TasksPublishResult = TasksPublishResults[keyof TasksPublishResults];
18470
19697
  export type TasksValidateData = {
18471
19698
  body?: never;
18472
19699
  path: {