@talqing/sdk 0.3.0 → 0.4.1

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.
@@ -1172,7 +1172,7 @@ export type CallBatchResponse = {
1172
1172
  */
1173
1173
  agent_name: string | null;
1174
1174
  agent_plan?: StoredAgentPlan | null;
1175
- calling_window: CallingWindow | null;
1175
+ calling_window: TimeWindow | null;
1176
1176
  counts: CallBatchCounts;
1177
1177
  /**
1178
1178
  * Created At
@@ -1564,20 +1564,10 @@ export type CallTeamMemberResponse = {
1564
1564
 
1565
1565
  /**
1566
1566
  * CallTokenResponse
1567
+ *
1568
+ * How to join this call, and which call it is.
1567
1569
  */
1568
1570
  export type CallTokenResponse = {
1569
- /**
1570
- * Agent Version
1571
- */
1572
- agent_version?: number | null;
1573
- /**
1574
- * Contact Key
1575
- */
1576
- contact_key: string;
1577
- /**
1578
- * Conversation Id
1579
- */
1580
- conversation_id: string;
1581
1571
  /**
1582
1572
  * Participant Token
1583
1573
  */
@@ -1593,7 +1583,7 @@ export type CallTokenResponse = {
1593
1583
  /**
1594
1584
  * Warnings
1595
1585
  */
1596
- warnings?: Array<string>;
1586
+ warnings: Array<string>;
1597
1587
  };
1598
1588
 
1599
1589
  /**
@@ -1638,33 +1628,6 @@ export type CallToolResponse = {
1638
1628
  silent?: boolean;
1639
1629
  };
1640
1630
 
1641
- /**
1642
- * CallingWindow
1643
- *
1644
- * The hours a batch may dial in, on the batch's own clock.
1645
- *
1646
- * A window that crosses midnight (``21:00``–``06:00``) is valid and means
1647
- * exactly what an evening consumer-calling window means: the day check applies
1648
- * to the *start* side, so ``21:00``–``06:00`` on ``days: [5]`` runs Friday
1649
- * 21:00 through Saturday 06:00.
1650
- */
1651
- export type CallingWindow = {
1652
- /**
1653
- * Days
1654
- *
1655
- * ISO weekdays the window opens on, 1 = Monday.
1656
- */
1657
- days?: Array<number>;
1658
- /**
1659
- * End
1660
- */
1661
- end: string;
1662
- /**
1663
- * Start
1664
- */
1665
- start: string;
1666
- };
1667
-
1668
1631
  /**
1669
1632
  * CatalogResponse
1670
1633
  */
@@ -1743,6 +1706,11 @@ export type CodeConfig = {
1743
1706
 
1744
1707
  /**
1745
1708
  * CodeOperation
1709
+ *
1710
+ * Run TypeScript to transform or shape data an `http` operation cannot.
1711
+ *
1712
+ * Its sandbox has `fetch`, but reaching an API with it instead of an `http`
1713
+ * operation costs a V8 isolate per call and hides the request from the editor.
1746
1714
  */
1747
1715
  export type CodeOperation = {
1748
1716
  /**
@@ -2500,7 +2468,7 @@ export type CreateCallBatchRequest = {
2500
2468
  * Which version of `agent_id` to run. Omit for the published one. `"draft"` runs the unpublished working copy — validated and tool-pinned at request time, and refused with the publish errors if it does not hold together.
2501
2469
  */
2502
2470
  agent_version?: number | 'draft' | null;
2503
- calling_window?: CallingWindow | null;
2471
+ calling_window?: TimeWindow | null;
2504
2472
  /**
2505
2473
  * From Phone Number Id
2506
2474
  */
@@ -2551,12 +2519,27 @@ export type CreateEmailBatchRequest = {
2551
2519
  * Body Format
2552
2520
  */
2553
2521
  body_format?: 'text' | 'html';
2554
- calling_window?: CallingWindow | null;
2522
+ /**
2523
+ * Draft Attempts
2524
+ */
2525
+ draft_attempts?: number;
2526
+ /**
2527
+ * Draft Concurrency
2528
+ */
2529
+ draft_concurrency?: number;
2530
+ /**
2531
+ * Draft Gap Seconds
2532
+ */
2533
+ draft_gap_seconds?: number;
2534
+ /**
2535
+ * Draft Retry After Minutes
2536
+ */
2537
+ draft_retry_after_minutes?: number;
2555
2538
  field_map: FieldMap;
2556
2539
  /**
2557
2540
  * From Email
2558
2541
  *
2559
- * The default sending address. Its domain must be verified on that Resend account; a single send may override this for that press alone.
2542
+ * The default sending address. Its domain must be verified on that Resend account; a send may override this for its own rows alone.
2560
2543
  */
2561
2544
  from_email: string;
2562
2545
  /**
@@ -2569,14 +2552,6 @@ export type CreateEmailBatchRequest = {
2569
2552
  * A connected Resend account.
2570
2553
  */
2571
2554
  integration_id: string;
2572
- /**
2573
- * Max Attempts
2574
- */
2575
- max_attempts?: number;
2576
- /**
2577
- * Max Concurrency
2578
- */
2579
- max_concurrency?: number;
2580
2555
  /**
2581
2556
  * Name
2582
2557
  */
@@ -2590,15 +2565,25 @@ export type CreateEmailBatchRequest = {
2590
2565
  */
2591
2566
  reply_to?: string | null;
2592
2567
  /**
2593
- * Retry After Minutes
2568
+ * Send Attempts
2594
2569
  */
2595
- retry_after_minutes?: number;
2570
+ send_attempts?: number;
2571
+ /**
2572
+ * Send Daily Cap
2573
+ *
2574
+ * Emails this batch may send per local day, across all of its sends. Null is uncapped.
2575
+ */
2576
+ send_daily_cap?: number | null;
2596
2577
  /**
2597
- * Send Sleep Seconds
2578
+ * Send Gap Seconds
2598
2579
  *
2599
- * Seconds slept after each email within one send. One press of 50 rows takes about `50 x this` seconds.
2580
+ * Minimum seconds between STARTING two emails. 60 means one a minute.
2600
2581
  */
2601
- send_sleep_seconds?: number;
2582
+ send_gap_seconds?: number;
2583
+ /**
2584
+ * Send Retry After Minutes
2585
+ */
2586
+ send_retry_after_minutes?: number;
2602
2587
  /**
2603
2588
  * Start At
2604
2589
  */
@@ -2613,6 +2598,88 @@ export type CreateEmailBatchRequest = {
2613
2598
  * Timezone
2614
2599
  */
2615
2600
  timezone: string;
2601
+ /**
2602
+ * When email may LEAVE. Inherited by every send this batch creates.
2603
+ */
2604
+ window?: TimeWindow | null;
2605
+ };
2606
+
2607
+ /**
2608
+ * CreateEmailSendRequest
2609
+ *
2610
+ * Send these rows. **This is the call that mails real people.**
2611
+ *
2612
+ * Name ``recipient_ids`` or pass ``selection: "all_drafts"``. Everything else
2613
+ * defaults to the batch's own setting; ``window`` and ``send_daily_cap`` accept
2614
+ * an explicit ``null`` to mean "no window" and "uncapped" rather than
2615
+ * "inherit", so the service reads ``model_fields_set``.
2616
+ *
2617
+ * The sender applies to THIS send alone and never writes back to the batch.
2618
+ */
2619
+ export type CreateEmailSendRequest = {
2620
+ /**
2621
+ * From Email
2622
+ */
2623
+ from_email?: string | null;
2624
+ /**
2625
+ * From Name
2626
+ */
2627
+ from_name?: string | null;
2628
+ /**
2629
+ * Recipient Ids
2630
+ */
2631
+ recipient_ids?: Array<string> | null;
2632
+ /**
2633
+ * Reply To
2634
+ */
2635
+ reply_to?: string | null;
2636
+ /**
2637
+ * Selection
2638
+ */
2639
+ selection?: 'all_drafts' | null;
2640
+ /**
2641
+ * Send Attempts
2642
+ */
2643
+ send_attempts?: number | null;
2644
+ /**
2645
+ * Send Daily Cap
2646
+ */
2647
+ send_daily_cap?: number | null;
2648
+ /**
2649
+ * Send Gap Seconds
2650
+ */
2651
+ send_gap_seconds?: number | null;
2652
+ /**
2653
+ * Send Retry After Minutes
2654
+ */
2655
+ send_retry_after_minutes?: number | null;
2656
+ /**
2657
+ * Start At
2658
+ */
2659
+ start_at?: string | null;
2660
+ /**
2661
+ * Timezone
2662
+ */
2663
+ timezone?: string | null;
2664
+ window?: TimeWindow | null;
2665
+ };
2666
+
2667
+ /**
2668
+ * CreateEmailSendResponse
2669
+ *
2670
+ * The send that was created, and every row that did not go into it.
2671
+ *
2672
+ * Two halves rather than one, because they answer different questions and a
2673
+ * caller needs both: what is now scheduled to go out, and which rows it
2674
+ * refused and why. If NOTHING in the selection could be sent there is no send
2675
+ * to describe, so that case is a 400 naming the reasons instead.
2676
+ */
2677
+ export type CreateEmailSendResponse = {
2678
+ /**
2679
+ * Rejected
2680
+ */
2681
+ rejected: Array<RejectedRecipient>;
2682
+ send: EmailSendResponse;
2616
2683
  };
2617
2684
 
2618
2685
  /**
@@ -3078,6 +3145,26 @@ export type DeliveryResultResponse = {
3078
3145
  webhook_id: string;
3079
3146
  };
3080
3147
 
3148
+ /**
3149
+ * DraftedVersion
3150
+ *
3151
+ * How many of this batch's rows were written by one version of its task.
3152
+ *
3153
+ * The batch page's whole answer to "did my edit change anything": a list that
3154
+ * reads "1 204 rows on v2, 96 on v3" names both the improvement and exactly
3155
+ * which rows are still on the old prompt.
3156
+ */
3157
+ export type DraftedVersion = {
3158
+ /**
3159
+ * Count
3160
+ */
3161
+ count: number;
3162
+ /**
3163
+ * Version
3164
+ */
3165
+ version: number;
3166
+ };
3167
+
3081
3168
  /**
3082
3169
  * EmailBatchCounts
3083
3170
  */
@@ -3136,16 +3223,35 @@ export type EmailBatchResponse = {
3136
3223
  * Body Format
3137
3224
  */
3138
3225
  body_format: 'text' | 'html';
3139
- calling_window: CallingWindow | null;
3140
3226
  counts: EmailBatchCounts;
3141
3227
  /**
3142
3228
  * Created At
3143
3229
  */
3144
3230
  created_at: string;
3231
+ /**
3232
+ * Draft Attempts
3233
+ */
3234
+ draft_attempts: number;
3235
+ /**
3236
+ * Draft Concurrency
3237
+ */
3238
+ draft_concurrency: number;
3239
+ /**
3240
+ * Draft Gap Seconds
3241
+ */
3242
+ draft_gap_seconds: number;
3243
+ /**
3244
+ * Draft Retry After Minutes
3245
+ */
3246
+ draft_retry_after_minutes: number;
3145
3247
  /**
3146
3248
  * Drafted At
3147
3249
  */
3148
3250
  drafted_at: string | null;
3251
+ /**
3252
+ * Drafted Versions
3253
+ */
3254
+ drafted_versions: Array<DraftedVersion>;
3149
3255
  /**
3150
3256
  * Failure Reason
3151
3257
  */
@@ -3175,14 +3281,6 @@ export type EmailBatchResponse = {
3175
3281
  * Integration Name
3176
3282
  */
3177
3283
  integration_name: string | null;
3178
- /**
3179
- * Max Attempts
3180
- */
3181
- max_attempts: number;
3182
- /**
3183
- * Max Concurrency
3184
- */
3185
- max_concurrency: number;
3186
3284
  /**
3187
3285
  * Name
3188
3286
  */
@@ -3199,18 +3297,34 @@ export type EmailBatchResponse = {
3199
3297
  * Provider Cost
3200
3298
  */
3201
3299
  provider_cost: number | null;
3300
+ /**
3301
+ * Published Task Version
3302
+ */
3303
+ published_task_version: number | null;
3202
3304
  /**
3203
3305
  * Reply To
3204
3306
  */
3205
3307
  reply_to: string | null;
3206
3308
  /**
3207
- * Retry After Minutes
3309
+ * Send Attempts
3208
3310
  */
3209
- retry_after_minutes: number;
3311
+ send_attempts: number;
3312
+ /**
3313
+ * Send Daily Cap
3314
+ */
3315
+ send_daily_cap: number | null;
3316
+ /**
3317
+ * Send Gap Seconds
3318
+ */
3319
+ send_gap_seconds: number;
3320
+ /**
3321
+ * Send Retry After Minutes
3322
+ */
3323
+ send_retry_after_minutes: number;
3210
3324
  /**
3211
- * Send Sleep Seconds
3325
+ * Sent Today
3212
3326
  */
3213
- send_sleep_seconds: number;
3327
+ sent_today: number;
3214
3328
  /**
3215
3329
  * Start At
3216
3330
  */
@@ -3235,6 +3349,7 @@ export type EmailBatchResponse = {
3235
3349
  * Timezone
3236
3350
  */
3237
3351
  timezone: string;
3352
+ window: TimeWindow | null;
3238
3353
  };
3239
3354
 
3240
3355
  /**
@@ -3315,9 +3430,9 @@ export type EmailRecipientResponse = {
3315
3430
  */
3316
3431
  send_attempts: number;
3317
3432
  /**
3318
- * Send Job Id
3433
+ * Send Run Id
3319
3434
  */
3320
- send_job_id: string | null;
3435
+ send_run_id: string | null;
3321
3436
  /**
3322
3437
  * Sent At
3323
3438
  */
@@ -3338,6 +3453,10 @@ export type EmailRecipientResponse = {
3338
3453
  * Task Run Id
3339
3454
  */
3340
3455
  task_run_id: string | null;
3456
+ /**
3457
+ * Task Version
3458
+ */
3459
+ task_version: number | null;
3341
3460
  /**
3342
3461
  * To Email
3343
3462
  */
@@ -3348,6 +3467,122 @@ export type EmailRecipientResponse = {
3348
3467
  updated_at: string;
3349
3468
  };
3350
3469
 
3470
+ /**
3471
+ * EmailSendCounts
3472
+ *
3473
+ * Where this send's rows are.
3474
+ *
3475
+ * ``total`` is what the send was created with and never changes — a send's row
3476
+ * set is immutable — so ``returned`` is what is left once every other bucket is
3477
+ * accounted for: the rows a cancel or a failure handed back as drafts.
3478
+ */
3479
+ export type EmailSendCounts = {
3480
+ /**
3481
+ * Queued
3482
+ */
3483
+ queued: number;
3484
+ /**
3485
+ * Returned
3486
+ */
3487
+ returned: number;
3488
+ /**
3489
+ * Send Failed
3490
+ */
3491
+ send_failed: number;
3492
+ /**
3493
+ * Sending
3494
+ */
3495
+ sending: number;
3496
+ /**
3497
+ * Sent
3498
+ */
3499
+ sent: number;
3500
+ /**
3501
+ * Skipped
3502
+ */
3503
+ skipped: number;
3504
+ /**
3505
+ * Total
3506
+ */
3507
+ total: number;
3508
+ };
3509
+
3510
+ /**
3511
+ * EmailSendResponse
3512
+ */
3513
+ export type EmailSendResponse = {
3514
+ /**
3515
+ * Batch Id
3516
+ */
3517
+ batch_id: string;
3518
+ counts: EmailSendCounts;
3519
+ /**
3520
+ * Created At
3521
+ */
3522
+ created_at: string;
3523
+ /**
3524
+ * Failure Reason
3525
+ */
3526
+ failure_reason: string | null;
3527
+ /**
3528
+ * Finished At
3529
+ */
3530
+ finished_at: string | null;
3531
+ /**
3532
+ * From Email
3533
+ */
3534
+ from_email: string;
3535
+ /**
3536
+ * From Name
3537
+ */
3538
+ from_name: string | null;
3539
+ /**
3540
+ * Id
3541
+ */
3542
+ id: string;
3543
+ /**
3544
+ * Next Send At
3545
+ */
3546
+ next_send_at: string | null;
3547
+ /**
3548
+ * Reply To
3549
+ */
3550
+ reply_to: string | null;
3551
+ /**
3552
+ * Send Attempts
3553
+ */
3554
+ send_attempts: number;
3555
+ /**
3556
+ * Send Daily Cap
3557
+ */
3558
+ send_daily_cap: number | null;
3559
+ /**
3560
+ * Send Gap Seconds
3561
+ */
3562
+ send_gap_seconds: number;
3563
+ /**
3564
+ * Send Retry After Minutes
3565
+ */
3566
+ send_retry_after_minutes: number;
3567
+ /**
3568
+ * Start At
3569
+ */
3570
+ start_at: string | null;
3571
+ /**
3572
+ * Started At
3573
+ */
3574
+ started_at: string | null;
3575
+ /**
3576
+ * Status
3577
+ */
3578
+ status: 'scheduled' | 'sending' | 'paused' | 'sent' | 'canceled' | 'failed';
3579
+ /**
3580
+ * Timezone
3581
+ */
3582
+ timezone: string;
3583
+ window: TimeWindow | null;
3584
+ };
3585
+
3351
3586
  /**
3352
3587
  * EndCallConfig
3353
3588
  *
@@ -3557,9 +3792,29 @@ export type FrontendRpcOperation = {
3557
3792
  };
3558
3793
 
3559
3794
  /**
3560
- * GenerateReplyConfig
3795
+ * FunctionArgumentsResponse
3561
3796
  */
3562
- export type GenerateReplyConfig = {
3797
+ export type FunctionArgumentsResponse = {
3798
+ /**
3799
+ * Description
3800
+ */
3801
+ description: string;
3802
+ /**
3803
+ * Json Schema
3804
+ */
3805
+ json_schema: {
3806
+ [key: string]: unknown;
3807
+ };
3808
+ /**
3809
+ * Name
3810
+ */
3811
+ name: string;
3812
+ };
3813
+
3814
+ /**
3815
+ * GenerateReplyConfig
3816
+ */
3817
+ export type GenerateReplyConfig = {
3563
3818
  /**
3564
3819
  * Instructions
3565
3820
  */
@@ -3888,6 +4143,8 @@ export type HttpConfig = {
3888
4143
 
3889
4144
  /**
3890
4145
  * HttpOperation
4146
+ *
4147
+ * Call a REST API. The right operation for any plain request/response call.
3891
4148
  */
3892
4149
  export type HttpOperation = {
3893
4150
  /**
@@ -6070,28 +6327,18 @@ export type OutboundCallRequest = {
6070
6327
 
6071
6328
  /**
6072
6329
  * OutboundCallResponse
6330
+ *
6331
+ * Which call this is, and what resolving it complained about.
6073
6332
  */
6074
6333
  export type OutboundCallResponse = {
6075
- /**
6076
- * Agent Version
6077
- */
6078
- agent_version?: number | null;
6079
- /**
6080
- * Conversation Id
6081
- */
6082
- conversation_id: string;
6083
6334
  /**
6084
6335
  * Session Id
6085
6336
  */
6086
6337
  session_id: string;
6087
- /**
6088
- * Status
6089
- */
6090
- status: string;
6091
6338
  /**
6092
6339
  * Warnings
6093
6340
  */
6094
- warnings?: Array<string>;
6341
+ warnings: Array<string>;
6095
6342
  };
6096
6343
 
6097
6344
  /**
@@ -6390,6 +6637,28 @@ export type PageEmailRecipientResponse = {
6390
6637
  offset: number;
6391
6638
  };
6392
6639
 
6640
+ /**
6641
+ * Page[EmailSendResponse]
6642
+ */
6643
+ export type PageEmailSendResponse = {
6644
+ /**
6645
+ * Has More
6646
+ */
6647
+ has_more: boolean;
6648
+ /**
6649
+ * Items
6650
+ */
6651
+ items: Array<EmailSendResponse>;
6652
+ /**
6653
+ * Limit
6654
+ */
6655
+ limit: number;
6656
+ /**
6657
+ * Offset
6658
+ */
6659
+ offset: number;
6660
+ };
6661
+
6393
6662
  /**
6394
6663
  * Page[IntegrationCatalogItem]
6395
6664
  */
@@ -6714,7 +6983,7 @@ export type PatchCallBatchRequest = {
6714
6983
  * Agent Id
6715
6984
  */
6716
6985
  agent_id?: string | null;
6717
- calling_window?: CallingWindow | null;
6986
+ calling_window?: TimeWindow | null;
6718
6987
  /**
6719
6988
  * From Phone Number Id
6720
6989
  */
@@ -6772,21 +7041,37 @@ export type PatchConversationRequest = {
6772
7041
  *
6773
7042
  * Policy edits.
6774
7043
  *
6775
- * ``calling_window`` and ``start_at`` accept an explicit ``null`` to *clear*
6776
- * them — "draft at any hour", "start on the next pass" which is why the
6777
- * service reads ``model_fields_set`` rather than treating absent and null the
6778
- * same way. Every other field keeps the usual PATCH rule: absent means
6779
- * unchanged.
7044
+ * ``window``, ``start_at`` and ``send_daily_cap`` accept an explicit ``null``
7045
+ * to *clear* them — "send at any hour", "start on the next pass", "no daily
7046
+ * ceiling" — which is why the service reads ``model_fields_set`` rather than
7047
+ * treating absent and null the same way. Every other field keeps the usual
7048
+ * PATCH rule: absent means unchanged.
6780
7049
  *
6781
7050
  * Pacing stays editable at any time; identity does not once anything has been
6782
- * sent (see ``service.patch_batch``).
7051
+ * sent (see ``service.patch_batch``). The sending group here is the DEFAULT for
7052
+ * the next send — a run already created carries its own copy.
6783
7053
  */
6784
7054
  export type PatchEmailBatchRequest = {
6785
7055
  /**
6786
7056
  * Body Format
6787
7057
  */
6788
7058
  body_format?: 'text' | 'html' | null;
6789
- calling_window?: CallingWindow | null;
7059
+ /**
7060
+ * Draft Attempts
7061
+ */
7062
+ draft_attempts?: number | null;
7063
+ /**
7064
+ * Draft Concurrency
7065
+ */
7066
+ draft_concurrency?: number | null;
7067
+ /**
7068
+ * Draft Gap Seconds
7069
+ */
7070
+ draft_gap_seconds?: number | null;
7071
+ /**
7072
+ * Draft Retry After Minutes
7073
+ */
7074
+ draft_retry_after_minutes?: number | null;
6790
7075
  field_map?: FieldMap | null;
6791
7076
  /**
6792
7077
  * From Email
@@ -6796,14 +7081,6 @@ export type PatchEmailBatchRequest = {
6796
7081
  * From Name
6797
7082
  */
6798
7083
  from_name?: string | null;
6799
- /**
6800
- * Max Attempts
6801
- */
6802
- max_attempts?: number | null;
6803
- /**
6804
- * Max Concurrency
6805
- */
6806
- max_concurrency?: number | null;
6807
7084
  /**
6808
7085
  * Name
6809
7086
  */
@@ -6813,13 +7090,21 @@ export type PatchEmailBatchRequest = {
6813
7090
  */
6814
7091
  reply_to?: string | null;
6815
7092
  /**
6816
- * Retry After Minutes
7093
+ * Send Attempts
6817
7094
  */
6818
- retry_after_minutes?: number | null;
7095
+ send_attempts?: number | null;
7096
+ /**
7097
+ * Send Daily Cap
7098
+ */
7099
+ send_daily_cap?: number | null;
7100
+ /**
7101
+ * Send Gap Seconds
7102
+ */
7103
+ send_gap_seconds?: number | null;
6819
7104
  /**
6820
- * Send Sleep Seconds
7105
+ * Send Retry After Minutes
6821
7106
  */
6822
- send_sleep_seconds?: number | null;
7107
+ send_retry_after_minutes?: number | null;
6823
7108
  /**
6824
7109
  * Start At
6825
7110
  */
@@ -6828,6 +7113,7 @@ export type PatchEmailBatchRequest = {
6828
7113
  * Timezone
6829
7114
  */
6830
7115
  timezone?: string | null;
7116
+ window?: TimeWindow | null;
6831
7117
  };
6832
7118
 
6833
7119
  /**
@@ -6849,6 +7135,45 @@ export type PatchEmailRecipientRequest = {
6849
7135
  };
6850
7136
  };
6851
7137
 
7138
+ /**
7139
+ * PatchEmailSendRequest
7140
+ *
7141
+ * Re-steer one send: its pacing, its hours, its ceiling, its start time.
7142
+ *
7143
+ * It never edits the sender, and it never edits the row set in either
7144
+ * direction. To change what a scheduled send contains, cancel it — every unsent
7145
+ * row comes back as a draft — and create another. A second way to move a row
7146
+ * out of a send would be a second state machine to keep correct for something
7147
+ * cancel already covers.
7148
+ */
7149
+ export type PatchEmailSendRequest = {
7150
+ /**
7151
+ * Send Attempts
7152
+ */
7153
+ send_attempts?: number | null;
7154
+ /**
7155
+ * Send Daily Cap
7156
+ */
7157
+ send_daily_cap?: number | null;
7158
+ /**
7159
+ * Send Gap Seconds
7160
+ */
7161
+ send_gap_seconds?: number | null;
7162
+ /**
7163
+ * Send Retry After Minutes
7164
+ */
7165
+ send_retry_after_minutes?: number | null;
7166
+ /**
7167
+ * Start At
7168
+ */
7169
+ start_at?: string | null;
7170
+ /**
7171
+ * Timezone
7172
+ */
7173
+ timezone?: string | null;
7174
+ window?: TimeWindow | null;
7175
+ };
7176
+
6852
7177
  /**
6853
7178
  * PatchIntegrationRequest
6854
7179
  */
@@ -7531,6 +7856,28 @@ export type PublishResponse = {
7531
7856
  warnings?: Array<string>;
7532
7857
  };
7533
7858
 
7859
+ /**
7860
+ * PublishTaskResponse
7861
+ */
7862
+ export type PublishTaskResponse = {
7863
+ /**
7864
+ * Published At
7865
+ */
7866
+ published_at: string;
7867
+ /**
7868
+ * Task Id
7869
+ */
7870
+ task_id: string;
7871
+ /**
7872
+ * Version
7873
+ */
7874
+ version: number;
7875
+ /**
7876
+ * Warnings
7877
+ */
7878
+ warnings?: Array<string>;
7879
+ };
7880
+
7534
7881
  /**
7535
7882
  * PublishToolRequest
7536
7883
  */
@@ -7874,20 +8221,12 @@ export type RealtimeUsageResponse = {
7874
8221
  * RecipientActionResponse
7875
8222
  *
7876
8223
  * Skip-and-report, never a partial silent accept.
7877
- *
7878
- * ``job_id`` is set by `send` alone, so a client can tie a batch of rows that
7879
- * are visibly stuck to the `scheduled_jobs` row the scheduler is complaining
7880
- * about.
7881
8224
  */
7882
8225
  export type RecipientActionResponse = {
7883
8226
  /**
7884
8227
  * Affected
7885
8228
  */
7886
8229
  affected: number;
7887
- /**
7888
- * Job Id
7889
- */
7890
- job_id: string | null;
7891
8230
  /**
7892
8231
  * Rejected
7893
8232
  */
@@ -8004,6 +8343,42 @@ export type RecordingSpecOverride = {
8004
8343
  */
8005
8344
  export type RecordingState = 'none' | 'available' | 'pending' | 'expired' | 'failed' | 'not_shared' | 'consent_withdrawn' | 'deleted';
8006
8345
 
8346
+ /**
8347
+ * RedraftRequest
8348
+ *
8349
+ * Draft these rows again, from scratch.
8350
+ *
8351
+ * One verb for "write this row again", whatever put it in the state it is in —
8352
+ * a failed attempt, a prompt that has since improved, a draft nobody liked.
8353
+ * Four selections, and they differ in what they REFUSE as much as in what they
8354
+ * move, because a redraft discards a draft the tenant has already paid for:
8355
+ *
8356
+ * - ``all`` — every row in the batch. Rows already sent or queued come back in
8357
+ * ``rejected``, by name, so a bulk press cannot quietly do less than it said.
8358
+ * - ``failed`` — rows whose drafting failed.
8359
+ * - ``not_sent`` — every row that has not left and is not about to, with
8360
+ * nothing rejected.
8361
+ * - ``stale_version`` — rows drafted by a task version older than the one
8362
+ * published now. The selection that makes "watch the output, improve the
8363
+ * task, publish, redraft the rest" a workflow rather than a wish.
8364
+ */
8365
+ export type RedraftRequest = {
8366
+ /**
8367
+ * Clear Overrides
8368
+ *
8369
+ * Also discard the cells a person edited by hand. Off by default.
8370
+ */
8371
+ clear_overrides?: boolean;
8372
+ /**
8373
+ * Recipient Ids
8374
+ */
8375
+ recipient_ids?: Array<string> | null;
8376
+ /**
8377
+ * Selection
8378
+ */
8379
+ selection?: 'all' | 'failed' | 'not_sent' | 'stale_version' | null;
8380
+ };
8381
+
8007
8382
  /**
8008
8383
  * RejectedRecipient
8009
8384
  */
@@ -8098,6 +8473,12 @@ export type RunTaskRequest = {
8098
8473
  vars?: {
8099
8474
  [key: string]: string;
8100
8475
  };
8476
+ /**
8477
+ * Version
8478
+ *
8479
+ * 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.
8480
+ */
8481
+ version?: number | 'draft' | null;
8101
8482
  };
8102
8483
 
8103
8484
  /**
@@ -8478,11 +8859,11 @@ export type SecretResponse = {
8478
8859
  /**
8479
8860
  * SelectRecipientsRequest
8480
8861
  *
8481
- * What `skip`, `restore` and `retry` accept — either shape.
8862
+ * What `skip` and `restore` accept — either shape.
8482
8863
  *
8483
- * These keep their bulk shorthand because the rule is about irreversibility,
8484
- * not about bulk: skipping four thousand rows is undone by restoring them,
8485
- * and making curation tedious pushes an operator toward not curating.
8864
+ * Both are reversible, which is why both take a bulk shorthand: skipping four
8865
+ * thousand rows is undone by restoring them, and making curation tedious pushes
8866
+ * an operator toward not curating.
8486
8867
  */
8487
8868
  export type SelectRecipientsRequest = {
8488
8869
  /**
@@ -8492,39 +8873,11 @@ export type SelectRecipientsRequest = {
8492
8873
  /**
8493
8874
  * Selection
8494
8875
  *
8495
- * Every row this verb can act on: `draft` for skip, `skipped` for restore, `draft_failed` for retry.
8876
+ * Every row this verb can act on: `draft` for skip, `skipped` for restore.
8496
8877
  */
8497
8878
  selection?: 'all_eligible' | null;
8498
8879
  };
8499
8880
 
8500
- /**
8501
- * SendEmailBatchRequest
8502
- *
8503
- * The ONLY shape `send` accepts. 1..50 ids, named.
8504
- *
8505
- * There is deliberately no `selection` shorthand here — see
8506
- * ``MAX_SEND_PER_PRESS``. The three sender fields apply to THIS press alone;
8507
- * each omitted one falls back to the batch's, and none of them writes back.
8508
- */
8509
- export type SendEmailBatchRequest = {
8510
- /**
8511
- * From Email
8512
- */
8513
- from_email?: string | null;
8514
- /**
8515
- * From Name
8516
- */
8517
- from_name?: string | null;
8518
- /**
8519
- * Recipient Ids
8520
- */
8521
- recipient_ids: Array<string>;
8522
- /**
8523
- * Reply To
8524
- */
8525
- reply_to?: string | null;
8526
- };
8527
-
8528
8881
  /**
8529
8882
  * SendMessageRequest
8530
8883
  */
@@ -9172,7 +9525,7 @@ export type TTSUsageResponse = {
9172
9525
  /**
9173
9526
  * TaskConfig
9174
9527
  *
9175
- * The task definition. One saved config no versions, no publish step.
9528
+ * The task definition the draft you edit, and what publishing freezes.
9176
9529
  */
9177
9530
  export type TaskConfig = {
9178
9531
  llm?: LLMSpec;
@@ -9197,9 +9550,9 @@ export type TaskConfig = {
9197
9550
  /**
9198
9551
  * Output
9199
9552
  *
9200
- * 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.
9553
+ * 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.
9201
9554
  */
9202
- output: Array<TaskOutputField>;
9555
+ output?: Array<TaskOutputField>;
9203
9556
  /**
9204
9557
  * Prompt
9205
9558
  *
@@ -9221,7 +9574,7 @@ export type TaskConfig = {
9221
9574
  /**
9222
9575
  * Tools
9223
9576
  *
9224
- * Tools the model may call during the run. A task never pins a tool version - republishing a tool changes every task that uses it, immediately.
9577
+ * Tools the model may call during the run. Publishing pins each one to the tool version live at that moment, so republishing a tool does not change this task until the task is published again.
9225
9578
  */
9226
9579
  tools?: Array<ToolSelection>;
9227
9580
  /**
@@ -9278,10 +9631,22 @@ export type TaskResponse = {
9278
9631
  */
9279
9632
  id: string;
9280
9633
  last_run: TaskRunSummary | null;
9634
+ /**
9635
+ * Published At
9636
+ */
9637
+ published_at: string | null;
9638
+ /**
9639
+ * Published Version
9640
+ */
9641
+ published_version: number | null;
9281
9642
  /**
9282
9643
  * Updated At
9283
9644
  */
9284
9645
  updated_at: string;
9646
+ /**
9647
+ * Versions
9648
+ */
9649
+ versions: Array<TaskVersionResponse> | null;
9285
9650
  };
9286
9651
 
9287
9652
  /**
@@ -9295,7 +9660,7 @@ export type TaskRunError = {
9295
9660
  /**
9296
9661
  * Type
9297
9662
  */
9298
- type: 'missing_vars' | 'no_output' | 'step_limit' | 'timeout' | 'provider_error' | 'configuration' | 'platform';
9663
+ type: 'missing_vars' | 'no_output' | 'step_limit' | 'timeout' | 'provider_error' | 'configuration' | 'platform' | 'canceled';
9299
9664
  };
9300
9665
 
9301
9666
  /**
@@ -9357,6 +9722,10 @@ export type TaskRunResponse = {
9357
9722
  * Task Name
9358
9723
  */
9359
9724
  task_name: string | null;
9725
+ /**
9726
+ * Task Version
9727
+ */
9728
+ task_version: number | null;
9360
9729
  /**
9361
9730
  * Trace
9362
9731
  */
@@ -9407,22 +9776,49 @@ export type TaskRunSummary = {
9407
9776
  };
9408
9777
 
9409
9778
  /**
9410
- * TaskWriteResponse
9779
+ * TaskVersionDetailResponse
9780
+ *
9781
+ * One frozen version, unpacked: the definition that ran, beside its metadata.
9411
9782
  *
9412
- * What `create` and `update` return.
9783
+ * `config` comes back through `TaskConfig` rather than as raw JSONB, so a
9784
+ * version and the draft are normalized by the same validator and a diff of the
9785
+ * two cannot report a difference a default invented.
9413
9786
  *
9414
- * `warnings` is the half of validation that must not become a 400 — a prompt
9415
- * that never mentions `submit_result`, a credential built out of `{{args.…}}`.
9416
- * There is no publish screen to show them on, so they come back beside the
9417
- * saved task; dropping them would lose the one signal that catches a task which
9418
- * saves cleanly and then fails every run.
9787
+ * It is the whole definition: the tool versions this publish pinned live in
9788
+ * `config.tools`, and their definitions in `tool_versions`.
9419
9789
  */
9420
- export type TaskWriteResponse = {
9421
- task: TaskResponse;
9790
+ export type TaskVersionDetailResponse = {
9791
+ config: TaskConfig;
9422
9792
  /**
9423
- * Warnings
9793
+ * Published At
9424
9794
  */
9425
- warnings: Array<string>;
9795
+ published_at: string;
9796
+ /**
9797
+ * Published By
9798
+ */
9799
+ published_by?: string | null;
9800
+ /**
9801
+ * Version
9802
+ */
9803
+ version: number;
9804
+ };
9805
+
9806
+ /**
9807
+ * TaskVersionResponse
9808
+ */
9809
+ export type TaskVersionResponse = {
9810
+ /**
9811
+ * Published At
9812
+ */
9813
+ published_at: string;
9814
+ /**
9815
+ * Published By
9816
+ */
9817
+ published_by?: string | null;
9818
+ /**
9819
+ * Version
9820
+ */
9821
+ version: number;
9426
9822
  };
9427
9823
 
9428
9824
  /**
@@ -9703,6 +10099,39 @@ export type TextMessageResponse = {
9703
10099
  item: ConversationItemResponse;
9704
10100
  };
9705
10101
 
10102
+ /**
10103
+ * TimeWindow
10104
+ *
10105
+ * The hours a list may run in, on the list's own clock.
10106
+ *
10107
+ * Shared rather than duplicated, for the same reason ``window_state`` is: a
10108
+ * call batch and an email send run store the same three values under the same
10109
+ * names and must not each get their own copy of the rules. The field that
10110
+ * carries one is named for what it gates — ``calling_window`` on a campaign,
10111
+ * ``window`` on an email batch and its runs.
10112
+ *
10113
+ * A window that crosses midnight (``21:00``-``06:00``) is valid and means
10114
+ * exactly what an evening consumer-calling window means: the day check applies
10115
+ * to the *start* side, so ``21:00``-``06:00`` on ``days: [5]`` runs Friday
10116
+ * 21:00 through Saturday 06:00.
10117
+ */
10118
+ export type TimeWindow = {
10119
+ /**
10120
+ * Days
10121
+ *
10122
+ * ISO weekdays the window opens on, 1 = Monday.
10123
+ */
10124
+ days?: Array<number>;
10125
+ /**
10126
+ * End
10127
+ */
10128
+ end: string;
10129
+ /**
10130
+ * Start
10131
+ */
10132
+ start: string;
10133
+ };
10134
+
9706
10135
  /**
9707
10136
  * TocResultResponse
9708
10137
  */
@@ -13901,7 +14330,320 @@ export type EmailBatchesRecipientsUpdateErrors = {
13901
14330
  /**
13902
14331
  * The resource's current state forbids this — a name already taken, a job already running.
13903
14332
  */
13904
- 409: ErrorResponse;
14333
+ 409: ErrorResponse;
14334
+ /**
14335
+ * The request did not match this operation's schema; `detail.errors` lists each field.
14336
+ */
14337
+ 422: ErrorResponse;
14338
+ /**
14339
+ * Unexpected error. Every error this API returns carries this body.
14340
+ */
14341
+ default: ErrorResponse;
14342
+ };
14343
+
14344
+ export type EmailBatchesRecipientsUpdateError = EmailBatchesRecipientsUpdateErrors[keyof EmailBatchesRecipientsUpdateErrors];
14345
+
14346
+ export type EmailBatchesRecipientsUpdateResults = {
14347
+ /**
14348
+ * Successful Response
14349
+ */
14350
+ 200: EmailRecipientResponse;
14351
+ };
14352
+
14353
+ export type EmailBatchesRecipientsUpdateResult = EmailBatchesRecipientsUpdateResults[keyof EmailBatchesRecipientsUpdateResults];
14354
+
14355
+ export type EmailBatchesRecipientsRedraftData = {
14356
+ body: RedraftRequest;
14357
+ path: {
14358
+ /**
14359
+ * Batch Id
14360
+ */
14361
+ batch_id: string;
14362
+ };
14363
+ query?: never;
14364
+ url: '/v1/email/batches/{batch_id}/redraft';
14365
+ };
14366
+
14367
+ export type EmailBatchesRecipientsRedraftErrors = {
14368
+ /**
14369
+ * Well-formed, but rejected by a rule; `detail.errors` lists each problem.
14370
+ */
14371
+ 400: ErrorResponse;
14372
+ /**
14373
+ * Missing credential, or one that is revoked or no longer a member of this organization.
14374
+ */
14375
+ 401: ErrorResponse;
14376
+ /**
14377
+ * Authenticated, but this organization role may not perform the operation.
14378
+ */
14379
+ 403: ErrorResponse;
14380
+ /**
14381
+ * No such resource in this organization.
14382
+ */
14383
+ 404: ErrorResponse;
14384
+ /**
14385
+ * The resource's current state forbids this — a name already taken, a job already running.
14386
+ */
14387
+ 409: ErrorResponse;
14388
+ /**
14389
+ * The request did not match this operation's schema; `detail.errors` lists each field.
14390
+ */
14391
+ 422: ErrorResponse;
14392
+ /**
14393
+ * Unexpected error. Every error this API returns carries this body.
14394
+ */
14395
+ default: ErrorResponse;
14396
+ };
14397
+
14398
+ export type EmailBatchesRecipientsRedraftError = EmailBatchesRecipientsRedraftErrors[keyof EmailBatchesRecipientsRedraftErrors];
14399
+
14400
+ export type EmailBatchesRecipientsRedraftResults = {
14401
+ /**
14402
+ * Successful Response
14403
+ */
14404
+ 200: RecipientActionResponse;
14405
+ };
14406
+
14407
+ export type EmailBatchesRecipientsRedraftResult = EmailBatchesRecipientsRedraftResults[keyof EmailBatchesRecipientsRedraftResults];
14408
+
14409
+ export type EmailBatchesRecipientsRestoreData = {
14410
+ body: SelectRecipientsRequest;
14411
+ path: {
14412
+ /**
14413
+ * Batch Id
14414
+ */
14415
+ batch_id: string;
14416
+ };
14417
+ query?: never;
14418
+ url: '/v1/email/batches/{batch_id}/restore';
14419
+ };
14420
+
14421
+ export type EmailBatchesRecipientsRestoreErrors = {
14422
+ /**
14423
+ * Well-formed, but rejected by a rule; `detail.errors` lists each problem.
14424
+ */
14425
+ 400: ErrorResponse;
14426
+ /**
14427
+ * Missing credential, or one that is revoked or no longer a member of this organization.
14428
+ */
14429
+ 401: ErrorResponse;
14430
+ /**
14431
+ * Authenticated, but this organization role may not perform the operation.
14432
+ */
14433
+ 403: ErrorResponse;
14434
+ /**
14435
+ * No such resource in this organization.
14436
+ */
14437
+ 404: ErrorResponse;
14438
+ /**
14439
+ * The resource's current state forbids this — a name already taken, a job already running.
14440
+ */
14441
+ 409: ErrorResponse;
14442
+ /**
14443
+ * The request did not match this operation's schema; `detail.errors` lists each field.
14444
+ */
14445
+ 422: ErrorResponse;
14446
+ /**
14447
+ * Unexpected error. Every error this API returns carries this body.
14448
+ */
14449
+ default: ErrorResponse;
14450
+ };
14451
+
14452
+ export type EmailBatchesRecipientsRestoreError = EmailBatchesRecipientsRestoreErrors[keyof EmailBatchesRecipientsRestoreErrors];
14453
+
14454
+ export type EmailBatchesRecipientsRestoreResults = {
14455
+ /**
14456
+ * Successful Response
14457
+ */
14458
+ 200: RecipientActionResponse;
14459
+ };
14460
+
14461
+ export type EmailBatchesRecipientsRestoreResult = EmailBatchesRecipientsRestoreResults[keyof EmailBatchesRecipientsRestoreResults];
14462
+
14463
+ export type EmailBatchesResumeData = {
14464
+ body?: never;
14465
+ path: {
14466
+ /**
14467
+ * Batch Id
14468
+ */
14469
+ batch_id: string;
14470
+ };
14471
+ query?: never;
14472
+ url: '/v1/email/batches/{batch_id}/resume';
14473
+ };
14474
+
14475
+ export type EmailBatchesResumeErrors = {
14476
+ /**
14477
+ * Well-formed, but rejected by a rule; `detail.errors` lists each problem.
14478
+ */
14479
+ 400: ErrorResponse;
14480
+ /**
14481
+ * Missing credential, or one that is revoked or no longer a member of this organization.
14482
+ */
14483
+ 401: ErrorResponse;
14484
+ /**
14485
+ * Authenticated, but this organization role may not perform the operation.
14486
+ */
14487
+ 403: ErrorResponse;
14488
+ /**
14489
+ * No such resource in this organization.
14490
+ */
14491
+ 404: ErrorResponse;
14492
+ /**
14493
+ * The resource's current state forbids this — a name already taken, a job already running.
14494
+ */
14495
+ 409: ErrorResponse;
14496
+ /**
14497
+ * The request did not match this operation's schema; `detail.errors` lists each field.
14498
+ */
14499
+ 422: ErrorResponse;
14500
+ /**
14501
+ * Unexpected error. Every error this API returns carries this body.
14502
+ */
14503
+ default: ErrorResponse;
14504
+ };
14505
+
14506
+ export type EmailBatchesResumeError = EmailBatchesResumeErrors[keyof EmailBatchesResumeErrors];
14507
+
14508
+ export type EmailBatchesResumeResults = {
14509
+ /**
14510
+ * Successful Response
14511
+ */
14512
+ 200: EmailBatchResponse;
14513
+ };
14514
+
14515
+ export type EmailBatchesResumeResult = EmailBatchesResumeResults[keyof EmailBatchesResumeResults];
14516
+
14517
+ export type EmailBatchesSendsListData = {
14518
+ body?: never;
14519
+ path: {
14520
+ /**
14521
+ * Batch Id
14522
+ */
14523
+ batch_id: string;
14524
+ };
14525
+ query?: {
14526
+ /**
14527
+ * Limit
14528
+ */
14529
+ limit?: number;
14530
+ /**
14531
+ * Offset
14532
+ */
14533
+ offset?: number;
14534
+ };
14535
+ url: '/v1/email/batches/{batch_id}/sends';
14536
+ };
14537
+
14538
+ export type EmailBatchesSendsListErrors = {
14539
+ /**
14540
+ * Missing credential, or one that is revoked or no longer a member of this organization.
14541
+ */
14542
+ 401: ErrorResponse;
14543
+ /**
14544
+ * No such resource in this organization.
14545
+ */
14546
+ 404: ErrorResponse;
14547
+ /**
14548
+ * The request did not match this operation's schema; `detail.errors` lists each field.
14549
+ */
14550
+ 422: ErrorResponse;
14551
+ /**
14552
+ * Unexpected error. Every error this API returns carries this body.
14553
+ */
14554
+ default: ErrorResponse;
14555
+ };
14556
+
14557
+ export type EmailBatchesSendsListError = EmailBatchesSendsListErrors[keyof EmailBatchesSendsListErrors];
14558
+
14559
+ export type EmailBatchesSendsListResults = {
14560
+ /**
14561
+ * Successful Response
14562
+ */
14563
+ 200: PageEmailSendResponse;
14564
+ };
14565
+
14566
+ export type EmailBatchesSendsListResult = EmailBatchesSendsListResults[keyof EmailBatchesSendsListResults];
14567
+
14568
+ export type EmailBatchesSendsCreateData = {
14569
+ body: CreateEmailSendRequest;
14570
+ path: {
14571
+ /**
14572
+ * Batch Id
14573
+ */
14574
+ batch_id: string;
14575
+ };
14576
+ query?: never;
14577
+ url: '/v1/email/batches/{batch_id}/sends';
14578
+ };
14579
+
14580
+ export type EmailBatchesSendsCreateErrors = {
14581
+ /**
14582
+ * Well-formed, but rejected by a rule; `detail.errors` lists each problem.
14583
+ */
14584
+ 400: ErrorResponse;
14585
+ /**
14586
+ * Missing credential, or one that is revoked or no longer a member of this organization.
14587
+ */
14588
+ 401: ErrorResponse;
14589
+ /**
14590
+ * Authenticated, but this organization role may not perform the operation.
14591
+ */
14592
+ 403: ErrorResponse;
14593
+ /**
14594
+ * No such resource in this organization.
14595
+ */
14596
+ 404: ErrorResponse;
14597
+ /**
14598
+ * The resource's current state forbids this — a name already taken, a job already running.
14599
+ */
14600
+ 409: ErrorResponse;
14601
+ /**
14602
+ * The request did not match this operation's schema; `detail.errors` lists each field.
14603
+ */
14604
+ 422: ErrorResponse;
14605
+ /**
14606
+ * Unexpected error. Every error this API returns carries this body.
14607
+ */
14608
+ default: ErrorResponse;
14609
+ };
14610
+
14611
+ export type EmailBatchesSendsCreateError = EmailBatchesSendsCreateErrors[keyof EmailBatchesSendsCreateErrors];
14612
+
14613
+ export type EmailBatchesSendsCreateResults = {
14614
+ /**
14615
+ * Successful Response
14616
+ */
14617
+ 201: CreateEmailSendResponse;
14618
+ };
14619
+
14620
+ export type EmailBatchesSendsCreateResult = EmailBatchesSendsCreateResults[keyof EmailBatchesSendsCreateResults];
14621
+
14622
+ export type EmailBatchesSendsGetData = {
14623
+ body?: never;
14624
+ path: {
14625
+ /**
14626
+ * Batch Id
14627
+ */
14628
+ batch_id: string;
14629
+ /**
14630
+ * Send Id
14631
+ */
14632
+ send_id: string;
14633
+ };
14634
+ query?: never;
14635
+ url: '/v1/email/batches/{batch_id}/sends/{send_id}';
14636
+ };
14637
+
14638
+ export type EmailBatchesSendsGetErrors = {
14639
+ /**
14640
+ * Missing credential, or one that is revoked or no longer a member of this organization.
14641
+ */
14642
+ 401: ErrorResponse;
14643
+ /**
14644
+ * No such resource in this organization.
14645
+ */
14646
+ 404: ErrorResponse;
13905
14647
  /**
13906
14648
  * The request did not match this operation's schema; `detail.errors` lists each field.
13907
14649
  */
@@ -13912,30 +14654,34 @@ export type EmailBatchesRecipientsUpdateErrors = {
13912
14654
  default: ErrorResponse;
13913
14655
  };
13914
14656
 
13915
- export type EmailBatchesRecipientsUpdateError = EmailBatchesRecipientsUpdateErrors[keyof EmailBatchesRecipientsUpdateErrors];
14657
+ export type EmailBatchesSendsGetError = EmailBatchesSendsGetErrors[keyof EmailBatchesSendsGetErrors];
13916
14658
 
13917
- export type EmailBatchesRecipientsUpdateResults = {
14659
+ export type EmailBatchesSendsGetResults = {
13918
14660
  /**
13919
14661
  * Successful Response
13920
14662
  */
13921
- 200: EmailRecipientResponse;
14663
+ 200: EmailSendResponse;
13922
14664
  };
13923
14665
 
13924
- export type EmailBatchesRecipientsUpdateResult = EmailBatchesRecipientsUpdateResults[keyof EmailBatchesRecipientsUpdateResults];
14666
+ export type EmailBatchesSendsGetResult = EmailBatchesSendsGetResults[keyof EmailBatchesSendsGetResults];
13925
14667
 
13926
- export type EmailBatchesRecipientsRestoreData = {
13927
- body: SelectRecipientsRequest;
14668
+ export type EmailBatchesSendsUpdateData = {
14669
+ body: PatchEmailSendRequest;
13928
14670
  path: {
13929
14671
  /**
13930
14672
  * Batch Id
13931
14673
  */
13932
14674
  batch_id: string;
14675
+ /**
14676
+ * Send Id
14677
+ */
14678
+ send_id: string;
13933
14679
  };
13934
14680
  query?: never;
13935
- url: '/v1/email/batches/{batch_id}/restore';
14681
+ url: '/v1/email/batches/{batch_id}/sends/{send_id}';
13936
14682
  };
13937
14683
 
13938
- export type EmailBatchesRecipientsRestoreErrors = {
14684
+ export type EmailBatchesSendsUpdateErrors = {
13939
14685
  /**
13940
14686
  * Well-formed, but rejected by a rule; `detail.errors` lists each problem.
13941
14687
  */
@@ -13966,30 +14712,34 @@ export type EmailBatchesRecipientsRestoreErrors = {
13966
14712
  default: ErrorResponse;
13967
14713
  };
13968
14714
 
13969
- export type EmailBatchesRecipientsRestoreError = EmailBatchesRecipientsRestoreErrors[keyof EmailBatchesRecipientsRestoreErrors];
14715
+ export type EmailBatchesSendsUpdateError = EmailBatchesSendsUpdateErrors[keyof EmailBatchesSendsUpdateErrors];
13970
14716
 
13971
- export type EmailBatchesRecipientsRestoreResults = {
14717
+ export type EmailBatchesSendsUpdateResults = {
13972
14718
  /**
13973
14719
  * Successful Response
13974
14720
  */
13975
- 200: RecipientActionResponse;
14721
+ 200: EmailSendResponse;
13976
14722
  };
13977
14723
 
13978
- export type EmailBatchesRecipientsRestoreResult = EmailBatchesRecipientsRestoreResults[keyof EmailBatchesRecipientsRestoreResults];
14724
+ export type EmailBatchesSendsUpdateResult = EmailBatchesSendsUpdateResults[keyof EmailBatchesSendsUpdateResults];
13979
14725
 
13980
- export type EmailBatchesResumeData = {
14726
+ export type EmailBatchesSendsCancelData = {
13981
14727
  body?: never;
13982
14728
  path: {
13983
14729
  /**
13984
14730
  * Batch Id
13985
14731
  */
13986
14732
  batch_id: string;
14733
+ /**
14734
+ * Send Id
14735
+ */
14736
+ send_id: string;
13987
14737
  };
13988
14738
  query?: never;
13989
- url: '/v1/email/batches/{batch_id}/resume';
14739
+ url: '/v1/email/batches/{batch_id}/sends/{send_id}/cancel';
13990
14740
  };
13991
14741
 
13992
- export type EmailBatchesResumeErrors = {
14742
+ export type EmailBatchesSendsCancelErrors = {
13993
14743
  /**
13994
14744
  * Well-formed, but rejected by a rule; `detail.errors` lists each problem.
13995
14745
  */
@@ -14020,30 +14770,34 @@ export type EmailBatchesResumeErrors = {
14020
14770
  default: ErrorResponse;
14021
14771
  };
14022
14772
 
14023
- export type EmailBatchesResumeError = EmailBatchesResumeErrors[keyof EmailBatchesResumeErrors];
14773
+ export type EmailBatchesSendsCancelError = EmailBatchesSendsCancelErrors[keyof EmailBatchesSendsCancelErrors];
14024
14774
 
14025
- export type EmailBatchesResumeResults = {
14775
+ export type EmailBatchesSendsCancelResults = {
14026
14776
  /**
14027
14777
  * Successful Response
14028
14778
  */
14029
- 200: EmailBatchResponse;
14779
+ 200: EmailSendResponse;
14030
14780
  };
14031
14781
 
14032
- export type EmailBatchesResumeResult = EmailBatchesResumeResults[keyof EmailBatchesResumeResults];
14782
+ export type EmailBatchesSendsCancelResult = EmailBatchesSendsCancelResults[keyof EmailBatchesSendsCancelResults];
14033
14783
 
14034
- export type EmailBatchesRecipientsRetryData = {
14035
- body: SelectRecipientsRequest;
14784
+ export type EmailBatchesSendsPauseData = {
14785
+ body?: never;
14036
14786
  path: {
14037
14787
  /**
14038
14788
  * Batch Id
14039
14789
  */
14040
14790
  batch_id: string;
14791
+ /**
14792
+ * Send Id
14793
+ */
14794
+ send_id: string;
14041
14795
  };
14042
14796
  query?: never;
14043
- url: '/v1/email/batches/{batch_id}/retry';
14797
+ url: '/v1/email/batches/{batch_id}/sends/{send_id}/pause';
14044
14798
  };
14045
14799
 
14046
- export type EmailBatchesRecipientsRetryErrors = {
14800
+ export type EmailBatchesSendsPauseErrors = {
14047
14801
  /**
14048
14802
  * Well-formed, but rejected by a rule; `detail.errors` lists each problem.
14049
14803
  */
@@ -14074,30 +14828,34 @@ export type EmailBatchesRecipientsRetryErrors = {
14074
14828
  default: ErrorResponse;
14075
14829
  };
14076
14830
 
14077
- export type EmailBatchesRecipientsRetryError = EmailBatchesRecipientsRetryErrors[keyof EmailBatchesRecipientsRetryErrors];
14831
+ export type EmailBatchesSendsPauseError = EmailBatchesSendsPauseErrors[keyof EmailBatchesSendsPauseErrors];
14078
14832
 
14079
- export type EmailBatchesRecipientsRetryResults = {
14833
+ export type EmailBatchesSendsPauseResults = {
14080
14834
  /**
14081
14835
  * Successful Response
14082
14836
  */
14083
- 200: RecipientActionResponse;
14837
+ 200: EmailSendResponse;
14084
14838
  };
14085
14839
 
14086
- export type EmailBatchesRecipientsRetryResult = EmailBatchesRecipientsRetryResults[keyof EmailBatchesRecipientsRetryResults];
14840
+ export type EmailBatchesSendsPauseResult = EmailBatchesSendsPauseResults[keyof EmailBatchesSendsPauseResults];
14087
14841
 
14088
- export type EmailBatchesRecipientsSendData = {
14089
- body: SendEmailBatchRequest;
14842
+ export type EmailBatchesSendsResumeData = {
14843
+ body?: never;
14090
14844
  path: {
14091
14845
  /**
14092
14846
  * Batch Id
14093
14847
  */
14094
14848
  batch_id: string;
14849
+ /**
14850
+ * Send Id
14851
+ */
14852
+ send_id: string;
14095
14853
  };
14096
14854
  query?: never;
14097
- url: '/v1/email/batches/{batch_id}/send';
14855
+ url: '/v1/email/batches/{batch_id}/sends/{send_id}/resume';
14098
14856
  };
14099
14857
 
14100
- export type EmailBatchesRecipientsSendErrors = {
14858
+ export type EmailBatchesSendsResumeErrors = {
14101
14859
  /**
14102
14860
  * Well-formed, but rejected by a rule; `detail.errors` lists each problem.
14103
14861
  */
@@ -14128,16 +14886,16 @@ export type EmailBatchesRecipientsSendErrors = {
14128
14886
  default: ErrorResponse;
14129
14887
  };
14130
14888
 
14131
- export type EmailBatchesRecipientsSendError = EmailBatchesRecipientsSendErrors[keyof EmailBatchesRecipientsSendErrors];
14889
+ export type EmailBatchesSendsResumeError = EmailBatchesSendsResumeErrors[keyof EmailBatchesSendsResumeErrors];
14132
14890
 
14133
- export type EmailBatchesRecipientsSendResults = {
14891
+ export type EmailBatchesSendsResumeResults = {
14134
14892
  /**
14135
14893
  * Successful Response
14136
14894
  */
14137
- 200: RecipientActionResponse;
14895
+ 200: EmailSendResponse;
14138
14896
  };
14139
14897
 
14140
- export type EmailBatchesRecipientsSendResult = EmailBatchesRecipientsSendResults[keyof EmailBatchesRecipientsSendResults];
14898
+ export type EmailBatchesSendsResumeResult = EmailBatchesSendsResumeResults[keyof EmailBatchesSendsResumeResults];
14141
14899
 
14142
14900
  export type EmailBatchesRecipientsSkipData = {
14143
14901
  body: SelectRecipientsRequest;
@@ -15425,6 +16183,48 @@ export type ObservabilityGetResults = {
15425
16183
 
15426
16184
  export type ObservabilityGetResult = ObservabilityGetResults[keyof ObservabilityGetResults];
15427
16185
 
16186
+ export type SchemasFunctionsGetData = {
16187
+ body?: never;
16188
+ path: {
16189
+ /**
16190
+ * Name
16191
+ */
16192
+ name: string;
16193
+ };
16194
+ query?: never;
16195
+ url: '/v1/schemas/functions/{name}';
16196
+ };
16197
+
16198
+ export type SchemasFunctionsGetErrors = {
16199
+ /**
16200
+ * Missing credential, or one that is revoked or no longer a member of this organization.
16201
+ */
16202
+ 401: ErrorResponse;
16203
+ /**
16204
+ * No such resource in this organization.
16205
+ */
16206
+ 404: ErrorResponse;
16207
+ /**
16208
+ * The request did not match this operation's schema; `detail.errors` lists each field.
16209
+ */
16210
+ 422: ErrorResponse;
16211
+ /**
16212
+ * Unexpected error. Every error this API returns carries this body.
16213
+ */
16214
+ default: ErrorResponse;
16215
+ };
16216
+
16217
+ export type SchemasFunctionsGetError = SchemasFunctionsGetErrors[keyof SchemasFunctionsGetErrors];
16218
+
16219
+ export type SchemasFunctionsGetResults = {
16220
+ /**
16221
+ * Successful Response
16222
+ */
16223
+ 200: FunctionArgumentsResponse;
16224
+ };
16225
+
16226
+ export type SchemasFunctionsGetResult = SchemasFunctionsGetResults[keyof SchemasFunctionsGetResults];
16227
+
15428
16228
  export type SchemasGetData = {
15429
16229
  body?: never;
15430
16230
  path: {
@@ -15690,7 +16490,7 @@ export type TasksCreateResults = {
15690
16490
  /**
15691
16491
  * Successful Response
15692
16492
  */
15693
- 201: TaskWriteResponse;
16493
+ 201: TaskResponse;
15694
16494
  };
15695
16495
 
15696
16496
  export type TasksCreateResult = TasksCreateResults[keyof TasksCreateResults];
@@ -15840,11 +16640,65 @@ export type TasksUpdateResults = {
15840
16640
  /**
15841
16641
  * Successful Response
15842
16642
  */
15843
- 200: TaskWriteResponse;
16643
+ 200: TaskResponse;
15844
16644
  };
15845
16645
 
15846
16646
  export type TasksUpdateResult = TasksUpdateResults[keyof TasksUpdateResults];
15847
16647
 
16648
+ export type TasksPublishData = {
16649
+ body?: never;
16650
+ path: {
16651
+ /**
16652
+ * Task Id
16653
+ */
16654
+ task_id: string;
16655
+ };
16656
+ query?: never;
16657
+ url: '/v1/tasks/{task_id}/publish';
16658
+ };
16659
+
16660
+ export type TasksPublishErrors = {
16661
+ /**
16662
+ * Well-formed, but rejected by a rule; `detail.errors` lists each problem.
16663
+ */
16664
+ 400: ErrorResponse;
16665
+ /**
16666
+ * Missing credential, or one that is revoked or no longer a member of this organization.
16667
+ */
16668
+ 401: ErrorResponse;
16669
+ /**
16670
+ * Authenticated, but this organization role may not perform the operation.
16671
+ */
16672
+ 403: ErrorResponse;
16673
+ /**
16674
+ * No such resource in this organization.
16675
+ */
16676
+ 404: ErrorResponse;
16677
+ /**
16678
+ * The resource's current state forbids this — a name already taken, a job already running.
16679
+ */
16680
+ 409: ErrorResponse;
16681
+ /**
16682
+ * The request did not match this operation's schema; `detail.errors` lists each field.
16683
+ */
16684
+ 422: ErrorResponse;
16685
+ /**
16686
+ * Unexpected error. Every error this API returns carries this body.
16687
+ */
16688
+ default: ErrorResponse;
16689
+ };
16690
+
16691
+ export type TasksPublishError = TasksPublishErrors[keyof TasksPublishErrors];
16692
+
16693
+ export type TasksPublishResults = {
16694
+ /**
16695
+ * Successful Response
16696
+ */
16697
+ 200: PublishTaskResponse;
16698
+ };
16699
+
16700
+ export type TasksPublishResult = TasksPublishResults[keyof TasksPublishResults];
16701
+
15848
16702
  export type TasksRunsListData = {
15849
16703
  body?: never;
15850
16704
  path: {
@@ -15996,6 +16850,164 @@ export type TasksRunsGetResults = {
15996
16850
 
15997
16851
  export type TasksRunsGetResult = TasksRunsGetResults[keyof TasksRunsGetResults];
15998
16852
 
16853
+ export type TasksValidateData = {
16854
+ body?: never;
16855
+ path: {
16856
+ /**
16857
+ * Task Id
16858
+ */
16859
+ task_id: string;
16860
+ };
16861
+ query?: never;
16862
+ url: '/v1/tasks/{task_id}/validate';
16863
+ };
16864
+
16865
+ export type TasksValidateErrors = {
16866
+ /**
16867
+ * Well-formed, but rejected by a rule; `detail.errors` lists each problem.
16868
+ */
16869
+ 400: ErrorResponse;
16870
+ /**
16871
+ * Missing credential, or one that is revoked or no longer a member of this organization.
16872
+ */
16873
+ 401: ErrorResponse;
16874
+ /**
16875
+ * Authenticated, but this organization role may not perform the operation.
16876
+ */
16877
+ 403: ErrorResponse;
16878
+ /**
16879
+ * No such resource in this organization.
16880
+ */
16881
+ 404: ErrorResponse;
16882
+ /**
16883
+ * The resource's current state forbids this — a name already taken, a job already running.
16884
+ */
16885
+ 409: ErrorResponse;
16886
+ /**
16887
+ * The request did not match this operation's schema; `detail.errors` lists each field.
16888
+ */
16889
+ 422: ErrorResponse;
16890
+ /**
16891
+ * Unexpected error. Every error this API returns carries this body.
16892
+ */
16893
+ default: ErrorResponse;
16894
+ };
16895
+
16896
+ export type TasksValidateError = TasksValidateErrors[keyof TasksValidateErrors];
16897
+
16898
+ export type TasksValidateResults = {
16899
+ /**
16900
+ * Successful Response
16901
+ */
16902
+ 200: ValidateResponse;
16903
+ };
16904
+
16905
+ export type TasksValidateResult = TasksValidateResults[keyof TasksValidateResults];
16906
+
16907
+ export type TasksVersionsGetData = {
16908
+ body?: never;
16909
+ path: {
16910
+ /**
16911
+ * Task Id
16912
+ */
16913
+ task_id: string;
16914
+ /**
16915
+ * Version
16916
+ */
16917
+ version: number;
16918
+ };
16919
+ query?: never;
16920
+ url: '/v1/tasks/{task_id}/versions/{version}';
16921
+ };
16922
+
16923
+ export type TasksVersionsGetErrors = {
16924
+ /**
16925
+ * Missing credential, or one that is revoked or no longer a member of this organization.
16926
+ */
16927
+ 401: ErrorResponse;
16928
+ /**
16929
+ * No such resource in this organization.
16930
+ */
16931
+ 404: ErrorResponse;
16932
+ /**
16933
+ * The request did not match this operation's schema; `detail.errors` lists each field.
16934
+ */
16935
+ 422: ErrorResponse;
16936
+ /**
16937
+ * Unexpected error. Every error this API returns carries this body.
16938
+ */
16939
+ default: ErrorResponse;
16940
+ };
16941
+
16942
+ export type TasksVersionsGetError = TasksVersionsGetErrors[keyof TasksVersionsGetErrors];
16943
+
16944
+ export type TasksVersionsGetResults = {
16945
+ /**
16946
+ * Successful Response
16947
+ */
16948
+ 200: TaskVersionDetailResponse;
16949
+ };
16950
+
16951
+ export type TasksVersionsGetResult = TasksVersionsGetResults[keyof TasksVersionsGetResults];
16952
+
16953
+ export type TasksVersionsRollbackData = {
16954
+ body?: never;
16955
+ path: {
16956
+ /**
16957
+ * Task Id
16958
+ */
16959
+ task_id: string;
16960
+ /**
16961
+ * Version
16962
+ */
16963
+ version: number;
16964
+ };
16965
+ query?: never;
16966
+ url: '/v1/tasks/{task_id}/versions/{version}/rollback';
16967
+ };
16968
+
16969
+ export type TasksVersionsRollbackErrors = {
16970
+ /**
16971
+ * Well-formed, but rejected by a rule; `detail.errors` lists each problem.
16972
+ */
16973
+ 400: ErrorResponse;
16974
+ /**
16975
+ * Missing credential, or one that is revoked or no longer a member of this organization.
16976
+ */
16977
+ 401: ErrorResponse;
16978
+ /**
16979
+ * Authenticated, but this organization role may not perform the operation.
16980
+ */
16981
+ 403: ErrorResponse;
16982
+ /**
16983
+ * No such resource in this organization.
16984
+ */
16985
+ 404: ErrorResponse;
16986
+ /**
16987
+ * The resource's current state forbids this — a name already taken, a job already running.
16988
+ */
16989
+ 409: ErrorResponse;
16990
+ /**
16991
+ * The request did not match this operation's schema; `detail.errors` lists each field.
16992
+ */
16993
+ 422: ErrorResponse;
16994
+ /**
16995
+ * Unexpected error. Every error this API returns carries this body.
16996
+ */
16997
+ default: ErrorResponse;
16998
+ };
16999
+
17000
+ export type TasksVersionsRollbackError = TasksVersionsRollbackErrors[keyof TasksVersionsRollbackErrors];
17001
+
17002
+ export type TasksVersionsRollbackResults = {
17003
+ /**
17004
+ * Successful Response
17005
+ */
17006
+ 200: TaskResponse;
17007
+ };
17008
+
17009
+ export type TasksVersionsRollbackResult = TasksVersionsRollbackResults[keyof TasksVersionsRollbackResults];
17010
+
15999
17011
  export type TelephonyAccountsListData = {
16000
17012
  body?: never;
16001
17013
  path?: never;