@talqing/sdk 0.4.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
@@ -1628,33 +1628,6 @@ export type CallToolResponse = {
1628
1628
  silent?: boolean;
1629
1629
  };
1630
1630
 
1631
- /**
1632
- * CallingWindow
1633
- *
1634
- * The hours a batch may dial in, on the batch's own clock.
1635
- *
1636
- * A window that crosses midnight (``21:00``–``06:00``) is valid and means
1637
- * exactly what an evening consumer-calling window means: the day check applies
1638
- * to the *start* side, so ``21:00``–``06:00`` on ``days: [5]`` runs Friday
1639
- * 21:00 through Saturday 06:00.
1640
- */
1641
- export type CallingWindow = {
1642
- /**
1643
- * Days
1644
- *
1645
- * ISO weekdays the window opens on, 1 = Monday.
1646
- */
1647
- days?: Array<number>;
1648
- /**
1649
- * End
1650
- */
1651
- end: string;
1652
- /**
1653
- * Start
1654
- */
1655
- start: string;
1656
- };
1657
-
1658
1631
  /**
1659
1632
  * CatalogResponse
1660
1633
  */
@@ -2495,7 +2468,7 @@ export type CreateCallBatchRequest = {
2495
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.
2496
2469
  */
2497
2470
  agent_version?: number | 'draft' | null;
2498
- calling_window?: CallingWindow | null;
2471
+ calling_window?: TimeWindow | null;
2499
2472
  /**
2500
2473
  * From Phone Number Id
2501
2474
  */
@@ -2546,12 +2519,27 @@ export type CreateEmailBatchRequest = {
2546
2519
  * Body Format
2547
2520
  */
2548
2521
  body_format?: 'text' | 'html';
2549
- 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;
2550
2538
  field_map: FieldMap;
2551
2539
  /**
2552
2540
  * From Email
2553
2541
  *
2554
- * 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.
2555
2543
  */
2556
2544
  from_email: string;
2557
2545
  /**
@@ -2564,14 +2552,6 @@ export type CreateEmailBatchRequest = {
2564
2552
  * A connected Resend account.
2565
2553
  */
2566
2554
  integration_id: string;
2567
- /**
2568
- * Max Attempts
2569
- */
2570
- max_attempts?: number;
2571
- /**
2572
- * Max Concurrency
2573
- */
2574
- max_concurrency?: number;
2575
2555
  /**
2576
2556
  * Name
2577
2557
  */
@@ -2585,15 +2565,25 @@ export type CreateEmailBatchRequest = {
2585
2565
  */
2586
2566
  reply_to?: string | null;
2587
2567
  /**
2588
- * Retry After Minutes
2568
+ * Send Attempts
2589
2569
  */
2590
- 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;
2591
2577
  /**
2592
- * Send Sleep Seconds
2578
+ * Send Gap Seconds
2593
2579
  *
2594
- * 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.
2595
2581
  */
2596
- send_sleep_seconds?: number;
2582
+ send_gap_seconds?: number;
2583
+ /**
2584
+ * Send Retry After Minutes
2585
+ */
2586
+ send_retry_after_minutes?: number;
2597
2587
  /**
2598
2588
  * Start At
2599
2589
  */
@@ -2608,6 +2598,88 @@ export type CreateEmailBatchRequest = {
2608
2598
  * Timezone
2609
2599
  */
2610
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;
2611
2683
  };
2612
2684
 
2613
2685
  /**
@@ -3073,6 +3145,26 @@ export type DeliveryResultResponse = {
3073
3145
  webhook_id: string;
3074
3146
  };
3075
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
+
3076
3168
  /**
3077
3169
  * EmailBatchCounts
3078
3170
  */
@@ -3131,16 +3223,35 @@ export type EmailBatchResponse = {
3131
3223
  * Body Format
3132
3224
  */
3133
3225
  body_format: 'text' | 'html';
3134
- calling_window: CallingWindow | null;
3135
3226
  counts: EmailBatchCounts;
3136
3227
  /**
3137
3228
  * Created At
3138
3229
  */
3139
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;
3140
3247
  /**
3141
3248
  * Drafted At
3142
3249
  */
3143
3250
  drafted_at: string | null;
3251
+ /**
3252
+ * Drafted Versions
3253
+ */
3254
+ drafted_versions: Array<DraftedVersion>;
3144
3255
  /**
3145
3256
  * Failure Reason
3146
3257
  */
@@ -3170,14 +3281,6 @@ export type EmailBatchResponse = {
3170
3281
  * Integration Name
3171
3282
  */
3172
3283
  integration_name: string | null;
3173
- /**
3174
- * Max Attempts
3175
- */
3176
- max_attempts: number;
3177
- /**
3178
- * Max Concurrency
3179
- */
3180
- max_concurrency: number;
3181
3284
  /**
3182
3285
  * Name
3183
3286
  */
@@ -3194,18 +3297,34 @@ export type EmailBatchResponse = {
3194
3297
  * Provider Cost
3195
3298
  */
3196
3299
  provider_cost: number | null;
3300
+ /**
3301
+ * Published Task Version
3302
+ */
3303
+ published_task_version: number | null;
3197
3304
  /**
3198
3305
  * Reply To
3199
3306
  */
3200
3307
  reply_to: string | null;
3201
3308
  /**
3202
- * Retry After Minutes
3309
+ * Send Attempts
3203
3310
  */
3204
- 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;
3205
3324
  /**
3206
- * Send Sleep Seconds
3325
+ * Sent Today
3207
3326
  */
3208
- send_sleep_seconds: number;
3327
+ sent_today: number;
3209
3328
  /**
3210
3329
  * Start At
3211
3330
  */
@@ -3230,6 +3349,7 @@ export type EmailBatchResponse = {
3230
3349
  * Timezone
3231
3350
  */
3232
3351
  timezone: string;
3352
+ window: TimeWindow | null;
3233
3353
  };
3234
3354
 
3235
3355
  /**
@@ -3310,9 +3430,9 @@ export type EmailRecipientResponse = {
3310
3430
  */
3311
3431
  send_attempts: number;
3312
3432
  /**
3313
- * Send Job Id
3433
+ * Send Run Id
3314
3434
  */
3315
- send_job_id: string | null;
3435
+ send_run_id: string | null;
3316
3436
  /**
3317
3437
  * Sent At
3318
3438
  */
@@ -3333,6 +3453,10 @@ export type EmailRecipientResponse = {
3333
3453
  * Task Run Id
3334
3454
  */
3335
3455
  task_run_id: string | null;
3456
+ /**
3457
+ * Task Version
3458
+ */
3459
+ task_version: number | null;
3336
3460
  /**
3337
3461
  * To Email
3338
3462
  */
@@ -3343,6 +3467,122 @@ export type EmailRecipientResponse = {
3343
3467
  updated_at: string;
3344
3468
  };
3345
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
+
3346
3586
  /**
3347
3587
  * EndCallConfig
3348
3588
  *
@@ -6398,9 +6638,9 @@ export type PageEmailRecipientResponse = {
6398
6638
  };
6399
6639
 
6400
6640
  /**
6401
- * Page[IntegrationCatalogItem]
6641
+ * Page[EmailSendResponse]
6402
6642
  */
6403
- export type PageIntegrationCatalogItem = {
6643
+ export type PageEmailSendResponse = {
6404
6644
  /**
6405
6645
  * Has More
6406
6646
  */
@@ -6408,7 +6648,7 @@ export type PageIntegrationCatalogItem = {
6408
6648
  /**
6409
6649
  * Items
6410
6650
  */
6411
- items: Array<IntegrationCatalogItem>;
6651
+ items: Array<EmailSendResponse>;
6412
6652
  /**
6413
6653
  * Limit
6414
6654
  */
@@ -6420,9 +6660,9 @@ export type PageIntegrationCatalogItem = {
6420
6660
  };
6421
6661
 
6422
6662
  /**
6423
- * Page[IntegrationResponse]
6663
+ * Page[IntegrationCatalogItem]
6424
6664
  */
6425
- export type PageIntegrationResponse = {
6665
+ export type PageIntegrationCatalogItem = {
6426
6666
  /**
6427
6667
  * Has More
6428
6668
  */
@@ -6430,7 +6670,7 @@ export type PageIntegrationResponse = {
6430
6670
  /**
6431
6671
  * Items
6432
6672
  */
6433
- items: Array<IntegrationResponse>;
6673
+ items: Array<IntegrationCatalogItem>;
6434
6674
  /**
6435
6675
  * Limit
6436
6676
  */
@@ -6442,9 +6682,9 @@ export type PageIntegrationResponse = {
6442
6682
  };
6443
6683
 
6444
6684
  /**
6445
- * Page[IntegrationTriggerResponse]
6685
+ * Page[IntegrationResponse]
6446
6686
  */
6447
- export type PageIntegrationTriggerResponse = {
6687
+ export type PageIntegrationResponse = {
6448
6688
  /**
6449
6689
  * Has More
6450
6690
  */
@@ -6452,7 +6692,7 @@ export type PageIntegrationTriggerResponse = {
6452
6692
  /**
6453
6693
  * Items
6454
6694
  */
6455
- items: Array<IntegrationTriggerResponse>;
6695
+ items: Array<IntegrationResponse>;
6456
6696
  /**
6457
6697
  * Limit
6458
6698
  */
@@ -6464,9 +6704,31 @@ export type PageIntegrationTriggerResponse = {
6464
6704
  };
6465
6705
 
6466
6706
  /**
6467
- * Page[KBPageResponse]
6707
+ * Page[IntegrationTriggerResponse]
6468
6708
  */
6469
- export type PageKBPageResponse = {
6709
+ export type PageIntegrationTriggerResponse = {
6710
+ /**
6711
+ * Has More
6712
+ */
6713
+ has_more: boolean;
6714
+ /**
6715
+ * Items
6716
+ */
6717
+ items: Array<IntegrationTriggerResponse>;
6718
+ /**
6719
+ * Limit
6720
+ */
6721
+ limit: number;
6722
+ /**
6723
+ * Offset
6724
+ */
6725
+ offset: number;
6726
+ };
6727
+
6728
+ /**
6729
+ * Page[KBPageResponse]
6730
+ */
6731
+ export type PageKBPageResponse = {
6470
6732
  /**
6471
6733
  * Has More
6472
6734
  */
@@ -6721,7 +6983,7 @@ export type PatchCallBatchRequest = {
6721
6983
  * Agent Id
6722
6984
  */
6723
6985
  agent_id?: string | null;
6724
- calling_window?: CallingWindow | null;
6986
+ calling_window?: TimeWindow | null;
6725
6987
  /**
6726
6988
  * From Phone Number Id
6727
6989
  */
@@ -6779,21 +7041,37 @@ export type PatchConversationRequest = {
6779
7041
  *
6780
7042
  * Policy edits.
6781
7043
  *
6782
- * ``calling_window`` and ``start_at`` accept an explicit ``null`` to *clear*
6783
- * them — "draft at any hour", "start on the next pass" which is why the
6784
- * service reads ``model_fields_set`` rather than treating absent and null the
6785
- * same way. Every other field keeps the usual PATCH rule: absent means
6786
- * 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.
6787
7049
  *
6788
7050
  * Pacing stays editable at any time; identity does not once anything has been
6789
- * 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.
6790
7053
  */
6791
7054
  export type PatchEmailBatchRequest = {
6792
7055
  /**
6793
7056
  * Body Format
6794
7057
  */
6795
7058
  body_format?: 'text' | 'html' | null;
6796
- 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;
6797
7075
  field_map?: FieldMap | null;
6798
7076
  /**
6799
7077
  * From Email
@@ -6803,14 +7081,6 @@ export type PatchEmailBatchRequest = {
6803
7081
  * From Name
6804
7082
  */
6805
7083
  from_name?: string | null;
6806
- /**
6807
- * Max Attempts
6808
- */
6809
- max_attempts?: number | null;
6810
- /**
6811
- * Max Concurrency
6812
- */
6813
- max_concurrency?: number | null;
6814
7084
  /**
6815
7085
  * Name
6816
7086
  */
@@ -6820,13 +7090,21 @@ export type PatchEmailBatchRequest = {
6820
7090
  */
6821
7091
  reply_to?: string | null;
6822
7092
  /**
6823
- * Retry After Minutes
7093
+ * Send Attempts
6824
7094
  */
6825
- retry_after_minutes?: number | null;
7095
+ send_attempts?: number | null;
7096
+ /**
7097
+ * Send Daily Cap
7098
+ */
7099
+ send_daily_cap?: number | null;
6826
7100
  /**
6827
- * Send Sleep Seconds
7101
+ * Send Gap Seconds
6828
7102
  */
6829
- send_sleep_seconds?: number | null;
7103
+ send_gap_seconds?: number | null;
7104
+ /**
7105
+ * Send Retry After Minutes
7106
+ */
7107
+ send_retry_after_minutes?: number | null;
6830
7108
  /**
6831
7109
  * Start At
6832
7110
  */
@@ -6835,6 +7113,7 @@ export type PatchEmailBatchRequest = {
6835
7113
  * Timezone
6836
7114
  */
6837
7115
  timezone?: string | null;
7116
+ window?: TimeWindow | null;
6838
7117
  };
6839
7118
 
6840
7119
  /**
@@ -6856,6 +7135,45 @@ export type PatchEmailRecipientRequest = {
6856
7135
  };
6857
7136
  };
6858
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
+
6859
7177
  /**
6860
7178
  * PatchIntegrationRequest
6861
7179
  */
@@ -7538,6 +7856,28 @@ export type PublishResponse = {
7538
7856
  warnings?: Array<string>;
7539
7857
  };
7540
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
+
7541
7881
  /**
7542
7882
  * PublishToolRequest
7543
7883
  */
@@ -7881,20 +8221,12 @@ export type RealtimeUsageResponse = {
7881
8221
  * RecipientActionResponse
7882
8222
  *
7883
8223
  * Skip-and-report, never a partial silent accept.
7884
- *
7885
- * ``job_id`` is set by `send` alone, so a client can tie a batch of rows that
7886
- * are visibly stuck to the `scheduled_jobs` row the scheduler is complaining
7887
- * about.
7888
8224
  */
7889
8225
  export type RecipientActionResponse = {
7890
8226
  /**
7891
8227
  * Affected
7892
8228
  */
7893
8229
  affected: number;
7894
- /**
7895
- * Job Id
7896
- */
7897
- job_id: string | null;
7898
8230
  /**
7899
8231
  * Rejected
7900
8232
  */
@@ -8011,6 +8343,42 @@ export type RecordingSpecOverride = {
8011
8343
  */
8012
8344
  export type RecordingState = 'none' | 'available' | 'pending' | 'expired' | 'failed' | 'not_shared' | 'consent_withdrawn' | 'deleted';
8013
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
+
8014
8382
  /**
8015
8383
  * RejectedRecipient
8016
8384
  */
@@ -8105,6 +8473,12 @@ export type RunTaskRequest = {
8105
8473
  vars?: {
8106
8474
  [key: string]: string;
8107
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;
8108
8482
  };
8109
8483
 
8110
8484
  /**
@@ -8485,11 +8859,11 @@ export type SecretResponse = {
8485
8859
  /**
8486
8860
  * SelectRecipientsRequest
8487
8861
  *
8488
- * What `skip`, `restore` and `retry` accept — either shape.
8862
+ * What `skip` and `restore` accept — either shape.
8489
8863
  *
8490
- * These keep their bulk shorthand because the rule is about irreversibility,
8491
- * not about bulk: skipping four thousand rows is undone by restoring them,
8492
- * 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.
8493
8867
  */
8494
8868
  export type SelectRecipientsRequest = {
8495
8869
  /**
@@ -8499,39 +8873,11 @@ export type SelectRecipientsRequest = {
8499
8873
  /**
8500
8874
  * Selection
8501
8875
  *
8502
- * 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.
8503
8877
  */
8504
8878
  selection?: 'all_eligible' | null;
8505
8879
  };
8506
8880
 
8507
- /**
8508
- * SendEmailBatchRequest
8509
- *
8510
- * The ONLY shape `send` accepts. 1..50 ids, named.
8511
- *
8512
- * There is deliberately no `selection` shorthand here — see
8513
- * ``MAX_SEND_PER_PRESS``. The three sender fields apply to THIS press alone;
8514
- * each omitted one falls back to the batch's, and none of them writes back.
8515
- */
8516
- export type SendEmailBatchRequest = {
8517
- /**
8518
- * From Email
8519
- */
8520
- from_email?: string | null;
8521
- /**
8522
- * From Name
8523
- */
8524
- from_name?: string | null;
8525
- /**
8526
- * Recipient Ids
8527
- */
8528
- recipient_ids: Array<string>;
8529
- /**
8530
- * Reply To
8531
- */
8532
- reply_to?: string | null;
8533
- };
8534
-
8535
8881
  /**
8536
8882
  * SendMessageRequest
8537
8883
  */
@@ -9179,7 +9525,7 @@ export type TTSUsageResponse = {
9179
9525
  /**
9180
9526
  * TaskConfig
9181
9527
  *
9182
- * The task definition. One saved config no versions, no publish step.
9528
+ * The task definition the draft you edit, and what publishing freezes.
9183
9529
  */
9184
9530
  export type TaskConfig = {
9185
9531
  llm?: LLMSpec;
@@ -9204,9 +9550,9 @@ export type TaskConfig = {
9204
9550
  /**
9205
9551
  * Output
9206
9552
  *
9207
- * 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.
9208
9554
  */
9209
- output: Array<TaskOutputField>;
9555
+ output?: Array<TaskOutputField>;
9210
9556
  /**
9211
9557
  * Prompt
9212
9558
  *
@@ -9228,7 +9574,7 @@ export type TaskConfig = {
9228
9574
  /**
9229
9575
  * Tools
9230
9576
  *
9231
- * 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.
9232
9578
  */
9233
9579
  tools?: Array<ToolSelection>;
9234
9580
  /**
@@ -9285,10 +9631,22 @@ export type TaskResponse = {
9285
9631
  */
9286
9632
  id: string;
9287
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;
9288
9642
  /**
9289
9643
  * Updated At
9290
9644
  */
9291
9645
  updated_at: string;
9646
+ /**
9647
+ * Versions
9648
+ */
9649
+ versions: Array<TaskVersionResponse> | null;
9292
9650
  };
9293
9651
 
9294
9652
  /**
@@ -9302,7 +9660,7 @@ export type TaskRunError = {
9302
9660
  /**
9303
9661
  * Type
9304
9662
  */
9305
- 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';
9306
9664
  };
9307
9665
 
9308
9666
  /**
@@ -9364,6 +9722,10 @@ export type TaskRunResponse = {
9364
9722
  * Task Name
9365
9723
  */
9366
9724
  task_name: string | null;
9725
+ /**
9726
+ * Task Version
9727
+ */
9728
+ task_version: number | null;
9367
9729
  /**
9368
9730
  * Trace
9369
9731
  */
@@ -9414,22 +9776,49 @@ export type TaskRunSummary = {
9414
9776
  };
9415
9777
 
9416
9778
  /**
9417
- * TaskWriteResponse
9779
+ * TaskVersionDetailResponse
9780
+ *
9781
+ * One frozen version, unpacked: the definition that ran, beside its metadata.
9418
9782
  *
9419
- * 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.
9420
9786
  *
9421
- * `warnings` is the half of validation that must not become a 400 — a prompt
9422
- * that never mentions `submit_result`, a credential built out of `{{args.…}}`.
9423
- * There is no publish screen to show them on, so they come back beside the
9424
- * saved task; dropping them would lose the one signal that catches a task which
9425
- * 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`.
9426
9789
  */
9427
- export type TaskWriteResponse = {
9428
- task: TaskResponse;
9790
+ export type TaskVersionDetailResponse = {
9791
+ config: TaskConfig;
9429
9792
  /**
9430
- * Warnings
9793
+ * Published At
9431
9794
  */
9432
- 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;
9433
9822
  };
9434
9823
 
9435
9824
  /**
@@ -9710,6 +10099,39 @@ export type TextMessageResponse = {
9710
10099
  item: ConversationItemResponse;
9711
10100
  };
9712
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
+
9713
10135
  /**
9714
10136
  * TocResultResponse
9715
10137
  */
@@ -13930,8 +14352,8 @@ export type EmailBatchesRecipientsUpdateResults = {
13930
14352
 
13931
14353
  export type EmailBatchesRecipientsUpdateResult = EmailBatchesRecipientsUpdateResults[keyof EmailBatchesRecipientsUpdateResults];
13932
14354
 
13933
- export type EmailBatchesRecipientsRestoreData = {
13934
- body: SelectRecipientsRequest;
14355
+ export type EmailBatchesRecipientsRedraftData = {
14356
+ body: RedraftRequest;
13935
14357
  path: {
13936
14358
  /**
13937
14359
  * Batch Id
@@ -13939,10 +14361,10 @@ export type EmailBatchesRecipientsRestoreData = {
13939
14361
  batch_id: string;
13940
14362
  };
13941
14363
  query?: never;
13942
- url: '/v1/email/batches/{batch_id}/restore';
14364
+ url: '/v1/email/batches/{batch_id}/redraft';
13943
14365
  };
13944
14366
 
13945
- export type EmailBatchesRecipientsRestoreErrors = {
14367
+ export type EmailBatchesRecipientsRedraftErrors = {
13946
14368
  /**
13947
14369
  * Well-formed, but rejected by a rule; `detail.errors` lists each problem.
13948
14370
  */
@@ -13973,19 +14395,19 @@ export type EmailBatchesRecipientsRestoreErrors = {
13973
14395
  default: ErrorResponse;
13974
14396
  };
13975
14397
 
13976
- export type EmailBatchesRecipientsRestoreError = EmailBatchesRecipientsRestoreErrors[keyof EmailBatchesRecipientsRestoreErrors];
14398
+ export type EmailBatchesRecipientsRedraftError = EmailBatchesRecipientsRedraftErrors[keyof EmailBatchesRecipientsRedraftErrors];
13977
14399
 
13978
- export type EmailBatchesRecipientsRestoreResults = {
14400
+ export type EmailBatchesRecipientsRedraftResults = {
13979
14401
  /**
13980
14402
  * Successful Response
13981
14403
  */
13982
14404
  200: RecipientActionResponse;
13983
14405
  };
13984
14406
 
13985
- export type EmailBatchesRecipientsRestoreResult = EmailBatchesRecipientsRestoreResults[keyof EmailBatchesRecipientsRestoreResults];
14407
+ export type EmailBatchesRecipientsRedraftResult = EmailBatchesRecipientsRedraftResults[keyof EmailBatchesRecipientsRedraftResults];
13986
14408
 
13987
- export type EmailBatchesResumeData = {
13988
- body?: never;
14409
+ export type EmailBatchesRecipientsRestoreData = {
14410
+ body: SelectRecipientsRequest;
13989
14411
  path: {
13990
14412
  /**
13991
14413
  * Batch Id
@@ -13993,10 +14415,10 @@ export type EmailBatchesResumeData = {
13993
14415
  batch_id: string;
13994
14416
  };
13995
14417
  query?: never;
13996
- url: '/v1/email/batches/{batch_id}/resume';
14418
+ url: '/v1/email/batches/{batch_id}/restore';
13997
14419
  };
13998
14420
 
13999
- export type EmailBatchesResumeErrors = {
14421
+ export type EmailBatchesRecipientsRestoreErrors = {
14000
14422
  /**
14001
14423
  * Well-formed, but rejected by a rule; `detail.errors` lists each problem.
14002
14424
  */
@@ -14027,19 +14449,19 @@ export type EmailBatchesResumeErrors = {
14027
14449
  default: ErrorResponse;
14028
14450
  };
14029
14451
 
14030
- export type EmailBatchesResumeError = EmailBatchesResumeErrors[keyof EmailBatchesResumeErrors];
14452
+ export type EmailBatchesRecipientsRestoreError = EmailBatchesRecipientsRestoreErrors[keyof EmailBatchesRecipientsRestoreErrors];
14031
14453
 
14032
- export type EmailBatchesResumeResults = {
14454
+ export type EmailBatchesRecipientsRestoreResults = {
14033
14455
  /**
14034
14456
  * Successful Response
14035
14457
  */
14036
- 200: EmailBatchResponse;
14458
+ 200: RecipientActionResponse;
14037
14459
  };
14038
14460
 
14039
- export type EmailBatchesResumeResult = EmailBatchesResumeResults[keyof EmailBatchesResumeResults];
14461
+ export type EmailBatchesRecipientsRestoreResult = EmailBatchesRecipientsRestoreResults[keyof EmailBatchesRecipientsRestoreResults];
14040
14462
 
14041
- export type EmailBatchesRecipientsRetryData = {
14042
- body: SelectRecipientsRequest;
14463
+ export type EmailBatchesResumeData = {
14464
+ body?: never;
14043
14465
  path: {
14044
14466
  /**
14045
14467
  * Batch Id
@@ -14047,10 +14469,10 @@ export type EmailBatchesRecipientsRetryData = {
14047
14469
  batch_id: string;
14048
14470
  };
14049
14471
  query?: never;
14050
- url: '/v1/email/batches/{batch_id}/retry';
14472
+ url: '/v1/email/batches/{batch_id}/resume';
14051
14473
  };
14052
14474
 
14053
- export type EmailBatchesRecipientsRetryErrors = {
14475
+ export type EmailBatchesResumeErrors = {
14054
14476
  /**
14055
14477
  * Well-formed, but rejected by a rule; `detail.errors` lists each problem.
14056
14478
  */
@@ -14081,42 +14503,93 @@ export type EmailBatchesRecipientsRetryErrors = {
14081
14503
  default: ErrorResponse;
14082
14504
  };
14083
14505
 
14084
- export type EmailBatchesRecipientsRetryError = EmailBatchesRecipientsRetryErrors[keyof EmailBatchesRecipientsRetryErrors];
14506
+ export type EmailBatchesResumeError = EmailBatchesResumeErrors[keyof EmailBatchesResumeErrors];
14085
14507
 
14086
- export type EmailBatchesRecipientsRetryResults = {
14508
+ export type EmailBatchesResumeResults = {
14087
14509
  /**
14088
14510
  * Successful Response
14089
14511
  */
14090
- 200: RecipientActionResponse;
14512
+ 200: EmailBatchResponse;
14091
14513
  };
14092
14514
 
14093
- export type EmailBatchesRecipientsRetryResult = EmailBatchesRecipientsRetryResults[keyof EmailBatchesRecipientsRetryResults];
14515
+ export type EmailBatchesResumeResult = EmailBatchesResumeResults[keyof EmailBatchesResumeResults];
14094
14516
 
14095
- export type EmailBatchesRecipientsSendData = {
14096
- body: SendEmailBatchRequest;
14517
+ export type EmailBatchesSendsListData = {
14518
+ body?: never;
14097
14519
  path: {
14098
14520
  /**
14099
14521
  * Batch Id
14100
14522
  */
14101
14523
  batch_id: string;
14102
14524
  };
14103
- query?: never;
14104
- url: '/v1/email/batches/{batch_id}/send';
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';
14105
14536
  };
14106
14537
 
14107
- export type EmailBatchesRecipientsSendErrors = {
14108
- /**
14109
- * Well-formed, but rejected by a rule; `detail.errors` lists each problem.
14110
- */
14111
- 400: ErrorResponse;
14538
+ export type EmailBatchesSendsListErrors = {
14112
14539
  /**
14113
14540
  * Missing credential, or one that is revoked or no longer a member of this organization.
14114
14541
  */
14115
14542
  401: ErrorResponse;
14116
14543
  /**
14117
- * Authenticated, but this organization role may not perform the operation.
14544
+ * No such resource in this organization.
14118
14545
  */
14119
- 403: ErrorResponse;
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;
14120
14593
  /**
14121
14594
  * No such resource in this organization.
14122
14595
  */
@@ -14135,16 +14608,294 @@ export type EmailBatchesRecipientsSendErrors = {
14135
14608
  default: ErrorResponse;
14136
14609
  };
14137
14610
 
14138
- export type EmailBatchesRecipientsSendError = EmailBatchesRecipientsSendErrors[keyof EmailBatchesRecipientsSendErrors];
14611
+ export type EmailBatchesSendsCreateError = EmailBatchesSendsCreateErrors[keyof EmailBatchesSendsCreateErrors];
14139
14612
 
14140
- export type EmailBatchesRecipientsSendResults = {
14613
+ export type EmailBatchesSendsCreateResults = {
14141
14614
  /**
14142
14615
  * Successful Response
14143
14616
  */
14144
- 200: RecipientActionResponse;
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;
14647
+ /**
14648
+ * The request did not match this operation's schema; `detail.errors` lists each field.
14649
+ */
14650
+ 422: ErrorResponse;
14651
+ /**
14652
+ * Unexpected error. Every error this API returns carries this body.
14653
+ */
14654
+ default: ErrorResponse;
14655
+ };
14656
+
14657
+ export type EmailBatchesSendsGetError = EmailBatchesSendsGetErrors[keyof EmailBatchesSendsGetErrors];
14658
+
14659
+ export type EmailBatchesSendsGetResults = {
14660
+ /**
14661
+ * Successful Response
14662
+ */
14663
+ 200: EmailSendResponse;
14664
+ };
14665
+
14666
+ export type EmailBatchesSendsGetResult = EmailBatchesSendsGetResults[keyof EmailBatchesSendsGetResults];
14667
+
14668
+ export type EmailBatchesSendsUpdateData = {
14669
+ body: PatchEmailSendRequest;
14670
+ path: {
14671
+ /**
14672
+ * Batch Id
14673
+ */
14674
+ batch_id: string;
14675
+ /**
14676
+ * Send Id
14677
+ */
14678
+ send_id: string;
14679
+ };
14680
+ query?: never;
14681
+ url: '/v1/email/batches/{batch_id}/sends/{send_id}';
14682
+ };
14683
+
14684
+ export type EmailBatchesSendsUpdateErrors = {
14685
+ /**
14686
+ * Well-formed, but rejected by a rule; `detail.errors` lists each problem.
14687
+ */
14688
+ 400: ErrorResponse;
14689
+ /**
14690
+ * Missing credential, or one that is revoked or no longer a member of this organization.
14691
+ */
14692
+ 401: ErrorResponse;
14693
+ /**
14694
+ * Authenticated, but this organization role may not perform the operation.
14695
+ */
14696
+ 403: ErrorResponse;
14697
+ /**
14698
+ * No such resource in this organization.
14699
+ */
14700
+ 404: ErrorResponse;
14701
+ /**
14702
+ * The resource's current state forbids this — a name already taken, a job already running.
14703
+ */
14704
+ 409: ErrorResponse;
14705
+ /**
14706
+ * The request did not match this operation's schema; `detail.errors` lists each field.
14707
+ */
14708
+ 422: ErrorResponse;
14709
+ /**
14710
+ * Unexpected error. Every error this API returns carries this body.
14711
+ */
14712
+ default: ErrorResponse;
14713
+ };
14714
+
14715
+ export type EmailBatchesSendsUpdateError = EmailBatchesSendsUpdateErrors[keyof EmailBatchesSendsUpdateErrors];
14716
+
14717
+ export type EmailBatchesSendsUpdateResults = {
14718
+ /**
14719
+ * Successful Response
14720
+ */
14721
+ 200: EmailSendResponse;
14722
+ };
14723
+
14724
+ export type EmailBatchesSendsUpdateResult = EmailBatchesSendsUpdateResults[keyof EmailBatchesSendsUpdateResults];
14725
+
14726
+ export type EmailBatchesSendsCancelData = {
14727
+ body?: never;
14728
+ path: {
14729
+ /**
14730
+ * Batch Id
14731
+ */
14732
+ batch_id: string;
14733
+ /**
14734
+ * Send Id
14735
+ */
14736
+ send_id: string;
14737
+ };
14738
+ query?: never;
14739
+ url: '/v1/email/batches/{batch_id}/sends/{send_id}/cancel';
14740
+ };
14741
+
14742
+ export type EmailBatchesSendsCancelErrors = {
14743
+ /**
14744
+ * Well-formed, but rejected by a rule; `detail.errors` lists each problem.
14745
+ */
14746
+ 400: ErrorResponse;
14747
+ /**
14748
+ * Missing credential, or one that is revoked or no longer a member of this organization.
14749
+ */
14750
+ 401: ErrorResponse;
14751
+ /**
14752
+ * Authenticated, but this organization role may not perform the operation.
14753
+ */
14754
+ 403: ErrorResponse;
14755
+ /**
14756
+ * No such resource in this organization.
14757
+ */
14758
+ 404: ErrorResponse;
14759
+ /**
14760
+ * The resource's current state forbids this — a name already taken, a job already running.
14761
+ */
14762
+ 409: ErrorResponse;
14763
+ /**
14764
+ * The request did not match this operation's schema; `detail.errors` lists each field.
14765
+ */
14766
+ 422: ErrorResponse;
14767
+ /**
14768
+ * Unexpected error. Every error this API returns carries this body.
14769
+ */
14770
+ default: ErrorResponse;
14145
14771
  };
14146
14772
 
14147
- export type EmailBatchesRecipientsSendResult = EmailBatchesRecipientsSendResults[keyof EmailBatchesRecipientsSendResults];
14773
+ export type EmailBatchesSendsCancelError = EmailBatchesSendsCancelErrors[keyof EmailBatchesSendsCancelErrors];
14774
+
14775
+ export type EmailBatchesSendsCancelResults = {
14776
+ /**
14777
+ * Successful Response
14778
+ */
14779
+ 200: EmailSendResponse;
14780
+ };
14781
+
14782
+ export type EmailBatchesSendsCancelResult = EmailBatchesSendsCancelResults[keyof EmailBatchesSendsCancelResults];
14783
+
14784
+ export type EmailBatchesSendsPauseData = {
14785
+ body?: never;
14786
+ path: {
14787
+ /**
14788
+ * Batch Id
14789
+ */
14790
+ batch_id: string;
14791
+ /**
14792
+ * Send Id
14793
+ */
14794
+ send_id: string;
14795
+ };
14796
+ query?: never;
14797
+ url: '/v1/email/batches/{batch_id}/sends/{send_id}/pause';
14798
+ };
14799
+
14800
+ export type EmailBatchesSendsPauseErrors = {
14801
+ /**
14802
+ * Well-formed, but rejected by a rule; `detail.errors` lists each problem.
14803
+ */
14804
+ 400: ErrorResponse;
14805
+ /**
14806
+ * Missing credential, or one that is revoked or no longer a member of this organization.
14807
+ */
14808
+ 401: ErrorResponse;
14809
+ /**
14810
+ * Authenticated, but this organization role may not perform the operation.
14811
+ */
14812
+ 403: ErrorResponse;
14813
+ /**
14814
+ * No such resource in this organization.
14815
+ */
14816
+ 404: ErrorResponse;
14817
+ /**
14818
+ * The resource's current state forbids this — a name already taken, a job already running.
14819
+ */
14820
+ 409: ErrorResponse;
14821
+ /**
14822
+ * The request did not match this operation's schema; `detail.errors` lists each field.
14823
+ */
14824
+ 422: ErrorResponse;
14825
+ /**
14826
+ * Unexpected error. Every error this API returns carries this body.
14827
+ */
14828
+ default: ErrorResponse;
14829
+ };
14830
+
14831
+ export type EmailBatchesSendsPauseError = EmailBatchesSendsPauseErrors[keyof EmailBatchesSendsPauseErrors];
14832
+
14833
+ export type EmailBatchesSendsPauseResults = {
14834
+ /**
14835
+ * Successful Response
14836
+ */
14837
+ 200: EmailSendResponse;
14838
+ };
14839
+
14840
+ export type EmailBatchesSendsPauseResult = EmailBatchesSendsPauseResults[keyof EmailBatchesSendsPauseResults];
14841
+
14842
+ export type EmailBatchesSendsResumeData = {
14843
+ body?: never;
14844
+ path: {
14845
+ /**
14846
+ * Batch Id
14847
+ */
14848
+ batch_id: string;
14849
+ /**
14850
+ * Send Id
14851
+ */
14852
+ send_id: string;
14853
+ };
14854
+ query?: never;
14855
+ url: '/v1/email/batches/{batch_id}/sends/{send_id}/resume';
14856
+ };
14857
+
14858
+ export type EmailBatchesSendsResumeErrors = {
14859
+ /**
14860
+ * Well-formed, but rejected by a rule; `detail.errors` lists each problem.
14861
+ */
14862
+ 400: ErrorResponse;
14863
+ /**
14864
+ * Missing credential, or one that is revoked or no longer a member of this organization.
14865
+ */
14866
+ 401: ErrorResponse;
14867
+ /**
14868
+ * Authenticated, but this organization role may not perform the operation.
14869
+ */
14870
+ 403: ErrorResponse;
14871
+ /**
14872
+ * No such resource in this organization.
14873
+ */
14874
+ 404: ErrorResponse;
14875
+ /**
14876
+ * The resource's current state forbids this — a name already taken, a job already running.
14877
+ */
14878
+ 409: ErrorResponse;
14879
+ /**
14880
+ * The request did not match this operation's schema; `detail.errors` lists each field.
14881
+ */
14882
+ 422: ErrorResponse;
14883
+ /**
14884
+ * Unexpected error. Every error this API returns carries this body.
14885
+ */
14886
+ default: ErrorResponse;
14887
+ };
14888
+
14889
+ export type EmailBatchesSendsResumeError = EmailBatchesSendsResumeErrors[keyof EmailBatchesSendsResumeErrors];
14890
+
14891
+ export type EmailBatchesSendsResumeResults = {
14892
+ /**
14893
+ * Successful Response
14894
+ */
14895
+ 200: EmailSendResponse;
14896
+ };
14897
+
14898
+ export type EmailBatchesSendsResumeResult = EmailBatchesSendsResumeResults[keyof EmailBatchesSendsResumeResults];
14148
14899
 
14149
14900
  export type EmailBatchesRecipientsSkipData = {
14150
14901
  body: SelectRecipientsRequest;
@@ -15739,7 +16490,7 @@ export type TasksCreateResults = {
15739
16490
  /**
15740
16491
  * Successful Response
15741
16492
  */
15742
- 201: TaskWriteResponse;
16493
+ 201: TaskResponse;
15743
16494
  };
15744
16495
 
15745
16496
  export type TasksCreateResult = TasksCreateResults[keyof TasksCreateResults];
@@ -15889,11 +16640,65 @@ export type TasksUpdateResults = {
15889
16640
  /**
15890
16641
  * Successful Response
15891
16642
  */
15892
- 200: TaskWriteResponse;
16643
+ 200: TaskResponse;
15893
16644
  };
15894
16645
 
15895
16646
  export type TasksUpdateResult = TasksUpdateResults[keyof TasksUpdateResults];
15896
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
+
15897
16702
  export type TasksRunsListData = {
15898
16703
  body?: never;
15899
16704
  path: {
@@ -16045,6 +16850,164 @@ export type TasksRunsGetResults = {
16045
16850
 
16046
16851
  export type TasksRunsGetResult = TasksRunsGetResults[keyof TasksRunsGetResults];
16047
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
+
16048
17011
  export type TelephonyAccountsListData = {
16049
17012
  body?: never;
16050
17013
  path?: never;