getricky 0.1.5 → 0.1.7

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.
@@ -562,6 +562,140 @@ export type Template = {
562
562
  [key: string]: unknown;
563
563
  }>;
564
564
  };
565
+ /**
566
+ * One approved WhatsApp template sent to many numbers.
567
+ */
568
+ export type Broadcast = {
569
+ /**
570
+ * Broadcast ID.
571
+ */
572
+ id: string;
573
+ /**
574
+ * WhatsApp channel it is sent from.
575
+ */
576
+ channel_id: string;
577
+ /**
578
+ * The approved template every recipient receives.
579
+ */
580
+ template: {
581
+ /**
582
+ * Template ID at Meta.
583
+ */
584
+ id: string;
585
+ /**
586
+ * Template name.
587
+ */
588
+ name: string;
589
+ /**
590
+ * Language code.
591
+ */
592
+ language: string;
593
+ };
594
+ /**
595
+ * How the recipient list was built: a contact filter, chosen contacts, or phone numbers. The list itself is fixed when the broadcast is created.
596
+ */
597
+ audience: {
598
+ type: 'filter';
599
+ tag_id: string | null;
600
+ /**
601
+ * Only contacts at this stage; null for any.
602
+ */
603
+ lifecycle_stage: string | null;
604
+ /**
605
+ * Only contacts whose name, phone, email or company contains it.
606
+ */
607
+ query: string | null;
608
+ } | {
609
+ type: 'contacts';
610
+ } | {
611
+ type: 'phones';
612
+ };
613
+ /**
614
+ * `scheduled` waits for `scheduled_at`; `queued` and `sending` are on their way; `completed` once every message was handed to WhatsApp; `canceled` before it started.
615
+ */
616
+ status: 'scheduled' | 'queued' | 'sending' | 'completed' | 'canceled';
617
+ /**
618
+ * Recipients in each delivery status. Each recipient counts once, in its current one.
619
+ */
620
+ counts: {
621
+ /**
622
+ * Numbers the broadcast goes to.
623
+ */
624
+ recipients: number;
625
+ /**
626
+ * Not sent yet, or WhatsApp has not answered yet.
627
+ */
628
+ pending: number;
629
+ /**
630
+ * Accepted by WhatsApp, not yet delivered.
631
+ */
632
+ sent: number;
633
+ /**
634
+ * Delivered to the phone, not yet read.
635
+ */
636
+ delivered: number;
637
+ /**
638
+ * Read by the recipient.
639
+ */
640
+ read: number;
641
+ /**
642
+ * Not delivered; each recipient says why.
643
+ */
644
+ failed: number;
645
+ };
646
+ /**
647
+ * When it starts sending; null if it was sent at once.
648
+ */
649
+ scheduled_at: string | null;
650
+ /**
651
+ * When it was canceled; null otherwise.
652
+ */
653
+ canceled_at: string | null;
654
+ /**
655
+ * When the last message was handed to WhatsApp.
656
+ */
657
+ completed_at: string | null;
658
+ /**
659
+ * Member who created it, or who created the API key.
660
+ */
661
+ created_by_user_id: string;
662
+ /**
663
+ * When it was created.
664
+ */
665
+ created_at: string;
666
+ };
667
+ /**
668
+ * One number of a broadcast and where its message stands.
669
+ */
670
+ export type BroadcastRecipient = {
671
+ /**
672
+ * Recipient ID.
673
+ */
674
+ id: string;
675
+ /**
676
+ * Number in E.164.
677
+ */
678
+ phone: string;
679
+ contact_id: string | null;
680
+ /**
681
+ * `pending` until WhatsApp accepts or refuses the message; then `sent`, `delivered` and `read` as WhatsApp reports them, or `failed`.
682
+ */
683
+ status: 'pending' | 'sent' | 'delivered' | 'read' | 'failed';
684
+ /**
685
+ * Why it failed; null unless `failed`.
686
+ */
687
+ failure_reason: string | null;
688
+ conversation_id: string | null;
689
+ message_id: string | null;
690
+ /**
691
+ * When the broadcast handed the message to WhatsApp or recorded why it could not.
692
+ */
693
+ processed_at: string | null;
694
+ /**
695
+ * When WhatsApp reported the latest status of the message; null before.
696
+ */
697
+ status_updated_at: string | null;
698
+ };
565
699
  /**
566
700
  * A webhook subscription.
567
701
  */
@@ -2054,6 +2188,113 @@ export type ResolutionsReport = {
2054
2188
  */
2055
2189
  generated_at: string;
2056
2190
  };
2191
+ /**
2192
+ * The result of checking a template draft without submitting it.
2193
+ */
2194
+ export type TemplateValidation = {
2195
+ /**
2196
+ * Whether `POST /templates` would submit this draft to Meta.
2197
+ */
2198
+ valid: boolean;
2199
+ /**
2200
+ * Every problem found; empty when the draft is valid.
2201
+ */
2202
+ errors: Array<{
2203
+ /**
2204
+ * The request field the problem is in.
2205
+ */
2206
+ param: string;
2207
+ /**
2208
+ * What to change.
2209
+ */
2210
+ message: string;
2211
+ }>;
2212
+ /**
2213
+ * The components Ricky would submit, in the WhatsApp Cloud API format; null when the draft is invalid.
2214
+ */
2215
+ components: Array<{
2216
+ [key: string]: unknown;
2217
+ }> | null;
2218
+ };
2219
+ /**
2220
+ * A template Meta deleted.
2221
+ */
2222
+ export type DeletedTemplate = {
2223
+ /**
2224
+ * Template ID at Meta.
2225
+ */
2226
+ id: string;
2227
+ deleted: true;
2228
+ };
2229
+ /**
2230
+ * A WhatsApp number, with its status, quality and messaging limit at Meta.
2231
+ */
2232
+ export type WhatsAppNumber = {
2233
+ /**
2234
+ * Channel ID.
2235
+ */
2236
+ id: string;
2237
+ /**
2238
+ * Name shown in Ricky.
2239
+ */
2240
+ name: string;
2241
+ /**
2242
+ * Phone in E.164.
2243
+ */
2244
+ phone_number: string | null;
2245
+ /**
2246
+ * Business name Meta approved for the number.
2247
+ */
2248
+ verified_name: string | null;
2249
+ /**
2250
+ * Phone number ID at Meta.
2251
+ */
2252
+ phone_number_id: string | null;
2253
+ /**
2254
+ * WhatsApp Business Account that owns the number.
2255
+ */
2256
+ whatsapp_business_account_id: string | null;
2257
+ /**
2258
+ * `coexistence` when the number also stays on the WhatsApp Business app; `dedicated` otherwise.
2259
+ */
2260
+ connection_mode: 'dedicated' | 'coexistence' | null;
2261
+ /**
2262
+ * Status of the number at Meta, as Meta reports it, for example `CONNECTED`.
2263
+ */
2264
+ status: string | null;
2265
+ /**
2266
+ * When the number was disconnected from Ricky; null while connected.
2267
+ */
2268
+ disconnected_at: string | null;
2269
+ /**
2270
+ * Whether Meta lets the number send: `available`, `limited` or `blocked`.
2271
+ */
2272
+ messaging_health: 'available' | 'limited' | 'blocked';
2273
+ /**
2274
+ * Quality rating at Meta: `GREEN`, `YELLOW`, `RED` or `UNKNOWN`.
2275
+ */
2276
+ quality_rating: string | null;
2277
+ /**
2278
+ * Messaging limit tier at Meta, for example `TIER_1K` or `TIER_UNLIMITED`.
2279
+ */
2280
+ messaging_limit: string | null;
2281
+ /**
2282
+ * Whether Ricky receives the messages sent to the number.
2283
+ */
2284
+ inbound_processing_enabled: boolean | null;
2285
+ /**
2286
+ * Whether customers can call the number and reach the AI agent.
2287
+ */
2288
+ calls_enabled: boolean | null;
2289
+ /**
2290
+ * When it was connected.
2291
+ */
2292
+ connected_at: string | null;
2293
+ /**
2294
+ * When Ricky last read its details from Meta.
2295
+ */
2296
+ last_synced_at: string | null;
2297
+ };
2057
2298
  /**
2058
2299
  * An automation Ricky runs for the organization.
2059
2300
  */
@@ -2789,6 +3030,50 @@ export type RotateWebhookSecret = {
2789
3030
  */
2790
3031
  expire_previous_after_hours?: number;
2791
3032
  };
3033
+ /**
3034
+ * Sends an approved template to many numbers, now or at a set time.
3035
+ */
3036
+ export type CreateBroadcast = {
3037
+ /**
3038
+ * WhatsApp channel to send from. See `GET /channels`.
3039
+ */
3040
+ channel_id: string;
3041
+ template: TemplateMessage;
3042
+ /**
3043
+ * Who receives it. `filter` takes every contact matching all the filters you send (no filter: every contact); `contacts` and `phones` take the ones you list. Ricky uses each contact’s phone, or its WhatsApp number, skips contacts without one and sends once per number, up to 5,000.
3044
+ */
3045
+ audience: {
3046
+ type: 'filter';
3047
+ /**
3048
+ * Only contacts with this tag.
3049
+ */
3050
+ tag_id?: string;
3051
+ /**
3052
+ * Only contacts at this stage.
3053
+ */
3054
+ lifecycle_stage?: 'subscriber' | 'lead' | 'marketing_qualified' | 'sales_qualified' | 'opportunity' | 'customer' | 'evangelist' | 'other';
3055
+ /**
3056
+ * Only contacts whose name, phone, email or company contains it.
3057
+ */
3058
+ query?: string;
3059
+ } | {
3060
+ type: 'contacts';
3061
+ /**
3062
+ * Contacts of the organization.
3063
+ */
3064
+ contact_ids: Array<string>;
3065
+ } | {
3066
+ type: 'phones';
3067
+ /**
3068
+ * Numbers with country code, for example `+50760001234`.
3069
+ */
3070
+ phones: Array<string>;
3071
+ };
3072
+ /**
3073
+ * When to start sending, up to 7 days ahead. Omit it to send now.
3074
+ */
3075
+ scheduled_at?: string;
3076
+ };
2792
3077
  /**
2793
3078
  * Adds and removes the same tags on many contacts. Their other tags stay.
2794
3079
  */
@@ -3148,78 +3433,317 @@ export type UpdateKnowledgeFile = {
3148
3433
  send_enabled?: boolean;
3149
3434
  };
3150
3435
  /**
3151
- * Creates a conversation workflow as a `draft`. Activating it is a separate call.
3436
+ * A template draft. Ricky checks it as `POST /templates/validate` does, then submits it.
3152
3437
  */
3153
- export type CreateWorkflow = {
3438
+ export type CreateTemplate = {
3154
3439
  /**
3155
- * Display name.
3440
+ * WhatsApp channel whose business account will own the template.
3441
+ */
3442
+ channel_id: string;
3443
+ /**
3444
+ * Lowercase letters, digits and underscores, starting with a letter.
3156
3445
  */
3157
3446
  name: string;
3158
3447
  /**
3159
- * Reacts to a conversation with messages, questions, waits and assignments.
3448
+ * Language code, for example `es` or `en_US`.
3160
3449
  */
3161
- definition: {
3450
+ language: string;
3451
+ /**
3452
+ * `UTILITY` for updates on something the customer asked for; `MARKETING` otherwise.
3453
+ */
3454
+ category: 'MARKETING' | 'UTILITY';
3455
+ /**
3456
+ * How variables are written: `{{first_name}}` or `{{1}}`. It cannot change later.
3457
+ */
3458
+ parameter_format?: 'NAMED' | 'POSITIONAL';
3459
+ /**
3460
+ * `TEXT` or `LOCATION`. Send `null` for no header.
3461
+ */
3462
+ header?: {
3463
+ type: 'TEXT';
3162
3464
  /**
3163
- * `conversation_opened` runs when a conversation opens; `first_message_received` when the first message from the contact in a conversation arrives.
3465
+ * Header text; at most one variable.
3164
3466
  */
3165
- trigger: 'conversation_opened' | 'first_message_received';
3467
+ text: string;
3166
3468
  /**
3167
- * Channels it listens to. See `GET /channels`.
3469
+ * Example value of the header variable; required when it has one.
3168
3470
  */
3169
- channel_ids: Array<string>;
3471
+ example?: string;
3472
+ } | {
3473
+ type: 'LOCATION';
3474
+ } | null;
3475
+ /**
3476
+ * The message text.
3477
+ */
3478
+ body: {
3170
3479
  /**
3171
- * When it runs; null runs at any hour.
3480
+ * Body text. Variables are `{{1}}`, `{{2}}`… for `POSITIONAL` and `{{first_name}}` for `NAMED`; not at the very start or end.
3172
3481
  */
3173
- condition: {
3174
- kind: 'inside_business_hours';
3175
- business_hours: {
3176
- /**
3177
- * Opening time, `HH:MM`.
3178
- */
3179
- start: string;
3180
- /**
3181
- * Closing time, `HH:MM`.
3182
- */
3183
- end: string;
3184
- /**
3185
- * IANA time zone, for example `America/Panama`.
3186
- */
3187
- timezone: string;
3188
- /**
3189
- * Open days, 0 for Sunday to 6 for Saturday.
3190
- */
3191
- weekdays: Array<number>;
3192
- };
3193
- } | {
3194
- kind: 'outside_business_hours';
3195
- business_hours: {
3196
- /**
3197
- * Opening time, `HH:MM`.
3198
- */
3199
- start: string;
3200
- /**
3201
- * Closing time, `HH:MM`.
3202
- */
3203
- end: string;
3204
- /**
3205
- * IANA time zone, for example `America/Panama`.
3206
- */
3207
- timezone: string;
3208
- /**
3209
- * Open days, 0 for Sunday to 6 for Saturday.
3210
- */
3211
- weekdays: Array<number>;
3212
- };
3213
- } | null;
3482
+ text: string;
3214
3483
  /**
3215
- * The steps and how they connect.
3484
+ * An example value for every variable, keyed by its number or name without braces. Meta reviews them.
3216
3485
  */
3217
- flow: {
3218
- /**
3219
- * ID of the first step.
3220
- */
3221
- entry: string;
3222
- /**
3486
+ examples?: {
3487
+ [key: string]: string;
3488
+ };
3489
+ };
3490
+ /**
3491
+ * Footer text, without variables.
3492
+ */
3493
+ footer?: string | null;
3494
+ /**
3495
+ * Quick replies, at most two links and one phone. Quick replies cannot sit between the other buttons.
3496
+ */
3497
+ buttons?: Array<{
3498
+ type: 'QUICK_REPLY';
3499
+ text: string;
3500
+ } | {
3501
+ type: 'URL';
3502
+ text: string;
3503
+ /**
3504
+ * Link the button opens; it may end in the variable `{{1}}`.
3505
+ */
3506
+ url: string;
3507
+ /**
3508
+ * Example URL for a link with `{{1}}`; required when it has one.
3509
+ */
3510
+ example?: string;
3511
+ } | {
3512
+ type: 'PHONE_NUMBER';
3513
+ text: string;
3514
+ /**
3515
+ * Phone the button calls, with country code.
3516
+ */
3517
+ phone_number: string;
3518
+ }>;
3519
+ };
3520
+ /**
3521
+ * The body of `POST /templates`; `channel_id` is optional here.
3522
+ */
3523
+ export type ValidateTemplate = {
3524
+ /**
3525
+ * WhatsApp channel whose business account will own the template.
3526
+ */
3527
+ channel_id?: string;
3528
+ /**
3529
+ * Lowercase letters, digits and underscores, starting with a letter.
3530
+ */
3531
+ name: string;
3532
+ /**
3533
+ * Language code, for example `es` or `en_US`.
3534
+ */
3535
+ language: string;
3536
+ /**
3537
+ * `UTILITY` for updates on something the customer asked for; `MARKETING` otherwise.
3538
+ */
3539
+ category: 'MARKETING' | 'UTILITY';
3540
+ /**
3541
+ * How variables are written: `{{first_name}}` or `{{1}}`. It cannot change later.
3542
+ */
3543
+ parameter_format?: 'NAMED' | 'POSITIONAL';
3544
+ /**
3545
+ * `TEXT` or `LOCATION`. Send `null` for no header.
3546
+ */
3547
+ header?: {
3548
+ type: 'TEXT';
3549
+ /**
3550
+ * Header text; at most one variable.
3551
+ */
3552
+ text: string;
3553
+ /**
3554
+ * Example value of the header variable; required when it has one.
3555
+ */
3556
+ example?: string;
3557
+ } | {
3558
+ type: 'LOCATION';
3559
+ } | null;
3560
+ /**
3561
+ * The message text.
3562
+ */
3563
+ body: {
3564
+ /**
3565
+ * Body text. Variables are `{{1}}`, `{{2}}`… for `POSITIONAL` and `{{first_name}}` for `NAMED`; not at the very start or end.
3566
+ */
3567
+ text: string;
3568
+ /**
3569
+ * An example value for every variable, keyed by its number or name without braces. Meta reviews them.
3570
+ */
3571
+ examples?: {
3572
+ [key: string]: string;
3573
+ };
3574
+ };
3575
+ /**
3576
+ * Footer text, without variables.
3577
+ */
3578
+ footer?: string | null;
3579
+ /**
3580
+ * Quick replies, at most two links and one phone. Quick replies cannot sit between the other buttons.
3581
+ */
3582
+ buttons?: Array<{
3583
+ type: 'QUICK_REPLY';
3584
+ text: string;
3585
+ } | {
3586
+ type: 'URL';
3587
+ text: string;
3588
+ /**
3589
+ * Link the button opens; it may end in the variable `{{1}}`.
3590
+ */
3591
+ url: string;
3592
+ /**
3593
+ * Example URL for a link with `{{1}}`; required when it has one.
3594
+ */
3595
+ example?: string;
3596
+ } | {
3597
+ type: 'PHONE_NUMBER';
3598
+ text: string;
3599
+ /**
3600
+ * Phone the button calls, with country code.
3601
+ */
3602
+ phone_number: string;
3603
+ }>;
3604
+ };
3605
+ /**
3606
+ * Only the parts you send change; `buttons` replaces every button. Name, language and `parameter_format` cannot change.
3607
+ */
3608
+ export type UpdateTemplate = {
3609
+ /**
3610
+ * `UTILITY` for updates on something the customer asked for; `MARKETING` otherwise.
3611
+ */
3612
+ category?: 'MARKETING' | 'UTILITY';
3613
+ /**
3614
+ * `TEXT` or `LOCATION`. Send `null` for no header.
3615
+ */
3616
+ header?: {
3617
+ type: 'TEXT';
3618
+ /**
3619
+ * Header text; at most one variable.
3620
+ */
3621
+ text: string;
3622
+ /**
3623
+ * Example value of the header variable; required when it has one.
3624
+ */
3625
+ example?: string;
3626
+ } | {
3627
+ type: 'LOCATION';
3628
+ } | null;
3629
+ /**
3630
+ * The message text.
3631
+ */
3632
+ body?: {
3633
+ /**
3634
+ * Body text. Variables are `{{1}}`, `{{2}}`… for `POSITIONAL` and `{{first_name}}` for `NAMED`; not at the very start or end.
3635
+ */
3636
+ text: string;
3637
+ /**
3638
+ * An example value for every variable, keyed by its number or name without braces. Meta reviews them.
3639
+ */
3640
+ examples?: {
3641
+ [key: string]: string;
3642
+ };
3643
+ };
3644
+ /**
3645
+ * Footer text, without variables.
3646
+ */
3647
+ footer?: string | null;
3648
+ /**
3649
+ * Quick replies, at most two links and one phone. Quick replies cannot sit between the other buttons.
3650
+ */
3651
+ buttons?: Array<{
3652
+ type: 'QUICK_REPLY';
3653
+ text: string;
3654
+ } | {
3655
+ type: 'URL';
3656
+ text: string;
3657
+ /**
3658
+ * Link the button opens; it may end in the variable `{{1}}`.
3659
+ */
3660
+ url: string;
3661
+ /**
3662
+ * Example URL for a link with `{{1}}`; required when it has one.
3663
+ */
3664
+ example?: string;
3665
+ } | {
3666
+ type: 'PHONE_NUMBER';
3667
+ text: string;
3668
+ /**
3669
+ * Phone the button calls, with country code.
3670
+ */
3671
+ phone_number: string;
3672
+ }>;
3673
+ };
3674
+ /**
3675
+ * Creates a conversation workflow as a `draft`. Activating it is a separate call.
3676
+ */
3677
+ export type CreateWorkflow = {
3678
+ /**
3679
+ * Display name.
3680
+ */
3681
+ name: string;
3682
+ /**
3683
+ * Reacts to a conversation with messages, questions, waits and assignments.
3684
+ */
3685
+ definition: {
3686
+ /**
3687
+ * `conversation_opened` runs when a conversation opens; `first_message_received` when the first message from the contact in a conversation arrives.
3688
+ */
3689
+ trigger: 'conversation_opened' | 'first_message_received';
3690
+ /**
3691
+ * Channels it listens to. See `GET /channels`.
3692
+ */
3693
+ channel_ids: Array<string>;
3694
+ /**
3695
+ * When it runs; null runs at any hour.
3696
+ */
3697
+ condition: {
3698
+ kind: 'inside_business_hours';
3699
+ business_hours: {
3700
+ /**
3701
+ * Opening time, `HH:MM`.
3702
+ */
3703
+ start: string;
3704
+ /**
3705
+ * Closing time, `HH:MM`.
3706
+ */
3707
+ end: string;
3708
+ /**
3709
+ * IANA time zone, for example `America/Panama`.
3710
+ */
3711
+ timezone: string;
3712
+ /**
3713
+ * Open days, 0 for Sunday to 6 for Saturday.
3714
+ */
3715
+ weekdays: Array<number>;
3716
+ };
3717
+ } | {
3718
+ kind: 'outside_business_hours';
3719
+ business_hours: {
3720
+ /**
3721
+ * Opening time, `HH:MM`.
3722
+ */
3723
+ start: string;
3724
+ /**
3725
+ * Closing time, `HH:MM`.
3726
+ */
3727
+ end: string;
3728
+ /**
3729
+ * IANA time zone, for example `America/Panama`.
3730
+ */
3731
+ timezone: string;
3732
+ /**
3733
+ * Open days, 0 for Sunday to 6 for Saturday.
3734
+ */
3735
+ weekdays: Array<number>;
3736
+ };
3737
+ } | null;
3738
+ /**
3739
+ * The steps and how they connect.
3740
+ */
3741
+ flow: {
3742
+ /**
3743
+ * ID of the first step.
3744
+ */
3745
+ entry: string;
3746
+ /**
3223
3747
  * One step. `assign_user`, `assign_agent` and `close_conversation` end the flow after they run.
3224
3748
  */
3225
3749
  steps: Array<{
@@ -4816,48 +5340,6 @@ export type CreateTagResponses = {
4816
5340
  };
4817
5341
  };
4818
5342
  export type CreateTagResponse = CreateTagResponses[keyof CreateTagResponses];
4819
- export type ListTemplatesData = {
4820
- body?: never;
4821
- path?: never;
4822
- query?: never;
4823
- url: '/templates';
4824
- };
4825
- export type ListTemplatesErrors = {
4826
- /**
4827
- * `unauthorized`: The `Authorization` header is missing, malformed, expired or revoked.
4828
- */
4829
- 401: Error;
4830
- /**
4831
- * `insufficient_scope`: The key lacks the scope this operation requires.
4832
- */
4833
- 403: Error;
4834
- /**
4835
- * `rate_limited`: More than 120 requests this minute with this key; see `Retry-After`.
4836
- */
4837
- 429: Error;
4838
- /**
4839
- * `internal_error`: Ricky failed. Retry a read. Before retrying a write, read the resource: the same `Idempotency-Key` answers `request_processing`.
4840
- */
4841
- 500: Error;
4842
- /**
4843
- * `upstream_error`: The messaging provider failed. Retry later.
4844
- */
4845
- 502: Error;
4846
- };
4847
- export type ListTemplatesError = ListTemplatesErrors[keyof ListTemplatesErrors];
4848
- export type ListTemplatesResponses = {
4849
- /**
4850
- * Success.
4851
- */
4852
- 200: {
4853
- data: Array<Template>;
4854
- /**
4855
- * Pass as `cursor` for the next page; null on the last page.
4856
- */
4857
- next_cursor: string | null;
4858
- };
4859
- };
4860
- export type ListTemplatesResponse = ListTemplatesResponses[keyof ListTemplatesResponses];
4861
5343
  export type ListWebhooksData = {
4862
5344
  body?: never;
4863
5345
  path?: never;
@@ -8003,6 +8485,751 @@ export type UpdateQuickReplyResponses = {
8003
8485
  };
8004
8486
  };
8005
8487
  export type UpdateQuickReplyResponse = UpdateQuickReplyResponses[keyof UpdateQuickReplyResponses];
8488
+ export type ListTemplatesData = {
8489
+ body?: never;
8490
+ path?: never;
8491
+ query?: never;
8492
+ url: '/templates';
8493
+ };
8494
+ export type ListTemplatesErrors = {
8495
+ /**
8496
+ * `unauthorized`: The `Authorization` header is missing, malformed, expired or revoked.
8497
+ */
8498
+ 401: Error;
8499
+ /**
8500
+ * `insufficient_scope`: The key lacks the scope this operation requires.
8501
+ */
8502
+ 403: Error;
8503
+ /**
8504
+ * `rate_limited`: More than 120 requests this minute with this key; see `Retry-After`.
8505
+ */
8506
+ 429: Error;
8507
+ /**
8508
+ * `internal_error`: Ricky failed. Retry a read. Before retrying a write, read the resource: the same `Idempotency-Key` answers `request_processing`.
8509
+ */
8510
+ 500: Error;
8511
+ /**
8512
+ * `upstream_error`: The messaging provider failed. Retry later.
8513
+ */
8514
+ 502: Error;
8515
+ };
8516
+ export type ListTemplatesError = ListTemplatesErrors[keyof ListTemplatesErrors];
8517
+ export type ListTemplatesResponses = {
8518
+ /**
8519
+ * Success.
8520
+ */
8521
+ 200: {
8522
+ data: Array<Template>;
8523
+ /**
8524
+ * Pass as `cursor` for the next page; null on the last page.
8525
+ */
8526
+ next_cursor: string | null;
8527
+ };
8528
+ };
8529
+ export type ListTemplatesResponse = ListTemplatesResponses[keyof ListTemplatesResponses];
8530
+ export type CreateTemplateData = {
8531
+ body: CreateTemplate;
8532
+ headers?: {
8533
+ /**
8534
+ * Optional. A value you choose, unique per logical write, 8–200 characters: a UUID or an ID from your system such as `order-10482-ready`. Retrying with the same key and body replays the first response instead of repeating the write.
8535
+ */
8536
+ 'Idempotency-Key'?: string;
8537
+ };
8538
+ path?: never;
8539
+ query?: never;
8540
+ url: '/templates';
8541
+ };
8542
+ export type CreateTemplateErrors = {
8543
+ /**
8544
+ * `invalid_json`: The body is not valid JSON.
8545
+ *
8546
+ * `invalid_input`: A parameter or body field is invalid; `param` names it when known.
8547
+ */
8548
+ 400: Error;
8549
+ /**
8550
+ * `unauthorized`: The `Authorization` header is missing, malformed, expired or revoked.
8551
+ */
8552
+ 401: Error;
8553
+ /**
8554
+ * `insufficient_scope`: The key lacks the scope this operation requires.
8555
+ */
8556
+ 403: Error;
8557
+ /**
8558
+ * `not_found`: The resource does not exist in this organization.
8559
+ */
8560
+ 404: Error;
8561
+ /**
8562
+ * `idempotency_conflict`: The `Idempotency-Key` was used for a different request.
8563
+ *
8564
+ * `request_processing`: A request with this `Idempotency-Key` is still processing or ended in an unknown state.
8565
+ */
8566
+ 409: Error;
8567
+ /**
8568
+ * `body_too_large`: The JSON body exceeds 64 KiB.
8569
+ */
8570
+ 413: Error;
8571
+ /**
8572
+ * `unsupported_media_type`: The body must be `application/json`.
8573
+ */
8574
+ 415: Error;
8575
+ /**
8576
+ * `rule_violation`: The request breaks a business rule; `message` says which.
8577
+ */
8578
+ 422: Error;
8579
+ /**
8580
+ * `rate_limited`: More than 120 requests this minute with this key; see `Retry-After`.
8581
+ */
8582
+ 429: Error;
8583
+ /**
8584
+ * `internal_error`: Ricky failed. Retry a read. Before retrying a write, read the resource: the same `Idempotency-Key` answers `request_processing`.
8585
+ */
8586
+ 500: Error;
8587
+ /**
8588
+ * `upstream_error`: The messaging provider failed. Retry later.
8589
+ */
8590
+ 502: Error;
8591
+ };
8592
+ export type CreateTemplateError = CreateTemplateErrors[keyof CreateTemplateErrors];
8593
+ export type CreateTemplateResponses = {
8594
+ /**
8595
+ * Success.
8596
+ */
8597
+ 201: {
8598
+ data: Template;
8599
+ };
8600
+ };
8601
+ export type CreateTemplateResponse = CreateTemplateResponses[keyof CreateTemplateResponses];
8602
+ export type DeleteTemplateData = {
8603
+ body?: never;
8604
+ headers?: {
8605
+ /**
8606
+ * Optional. A value you choose, unique per logical write, 8–200 characters: a UUID or an ID from your system such as `order-10482-ready`. Retrying with the same key and body replays the first response instead of repeating the write.
8607
+ */
8608
+ 'Idempotency-Key'?: string;
8609
+ };
8610
+ path: {
8611
+ /**
8612
+ * Template ID.
8613
+ */
8614
+ template_id: string;
8615
+ };
8616
+ query?: never;
8617
+ url: '/templates/{template_id}';
8618
+ };
8619
+ export type DeleteTemplateErrors = {
8620
+ /**
8621
+ * `invalid_input`: A parameter or body field is invalid; `param` names it when known.
8622
+ */
8623
+ 400: Error;
8624
+ /**
8625
+ * `unauthorized`: The `Authorization` header is missing, malformed, expired or revoked.
8626
+ */
8627
+ 401: Error;
8628
+ /**
8629
+ * `insufficient_scope`: The key lacks the scope this operation requires.
8630
+ */
8631
+ 403: Error;
8632
+ /**
8633
+ * `not_found`: The resource does not exist in this organization.
8634
+ */
8635
+ 404: Error;
8636
+ /**
8637
+ * `idempotency_conflict`: The `Idempotency-Key` was used for a different request.
8638
+ *
8639
+ * `request_processing`: A request with this `Idempotency-Key` is still processing or ended in an unknown state.
8640
+ *
8641
+ * `conflict`: The resource changed in a way that prevents the operation.
8642
+ */
8643
+ 409: Error;
8644
+ /**
8645
+ * `rule_violation`: The request breaks a business rule; `message` says which.
8646
+ */
8647
+ 422: Error;
8648
+ /**
8649
+ * `rate_limited`: More than 120 requests this minute with this key; see `Retry-After`.
8650
+ */
8651
+ 429: Error;
8652
+ /**
8653
+ * `internal_error`: Ricky failed. Retry a read. Before retrying a write, read the resource: the same `Idempotency-Key` answers `request_processing`.
8654
+ */
8655
+ 500: Error;
8656
+ /**
8657
+ * `upstream_error`: The messaging provider failed. Retry later.
8658
+ */
8659
+ 502: Error;
8660
+ };
8661
+ export type DeleteTemplateError = DeleteTemplateErrors[keyof DeleteTemplateErrors];
8662
+ export type DeleteTemplateResponses = {
8663
+ /**
8664
+ * Success.
8665
+ */
8666
+ 200: {
8667
+ data: DeletedTemplate;
8668
+ };
8669
+ };
8670
+ export type DeleteTemplateResponse = DeleteTemplateResponses[keyof DeleteTemplateResponses];
8671
+ export type GetTemplateData = {
8672
+ body?: never;
8673
+ path: {
8674
+ /**
8675
+ * Template ID.
8676
+ */
8677
+ template_id: string;
8678
+ };
8679
+ query?: never;
8680
+ url: '/templates/{template_id}';
8681
+ };
8682
+ export type GetTemplateErrors = {
8683
+ /**
8684
+ * `invalid_input`: A parameter or body field is invalid; `param` names it when known.
8685
+ */
8686
+ 400: Error;
8687
+ /**
8688
+ * `unauthorized`: The `Authorization` header is missing, malformed, expired or revoked.
8689
+ */
8690
+ 401: Error;
8691
+ /**
8692
+ * `insufficient_scope`: The key lacks the scope this operation requires.
8693
+ */
8694
+ 403: Error;
8695
+ /**
8696
+ * `not_found`: The resource does not exist in this organization.
8697
+ */
8698
+ 404: Error;
8699
+ /**
8700
+ * `conflict`: The resource changed in a way that prevents the operation.
8701
+ */
8702
+ 409: Error;
8703
+ /**
8704
+ * `rate_limited`: More than 120 requests this minute with this key; see `Retry-After`.
8705
+ */
8706
+ 429: Error;
8707
+ /**
8708
+ * `internal_error`: Ricky failed. Retry a read. Before retrying a write, read the resource: the same `Idempotency-Key` answers `request_processing`.
8709
+ */
8710
+ 500: Error;
8711
+ /**
8712
+ * `upstream_error`: The messaging provider failed. Retry later.
8713
+ */
8714
+ 502: Error;
8715
+ };
8716
+ export type GetTemplateError = GetTemplateErrors[keyof GetTemplateErrors];
8717
+ export type GetTemplateResponses = {
8718
+ /**
8719
+ * Success.
8720
+ */
8721
+ 200: {
8722
+ data: Template;
8723
+ };
8724
+ };
8725
+ export type GetTemplateResponse = GetTemplateResponses[keyof GetTemplateResponses];
8726
+ export type UpdateTemplateData = {
8727
+ body: UpdateTemplate;
8728
+ headers?: {
8729
+ /**
8730
+ * Optional. A value you choose, unique per logical write, 8–200 characters: a UUID or an ID from your system such as `order-10482-ready`. Retrying with the same key and body replays the first response instead of repeating the write.
8731
+ */
8732
+ 'Idempotency-Key'?: string;
8733
+ };
8734
+ path: {
8735
+ /**
8736
+ * Template ID.
8737
+ */
8738
+ template_id: string;
8739
+ };
8740
+ query?: never;
8741
+ url: '/templates/{template_id}';
8742
+ };
8743
+ export type UpdateTemplateErrors = {
8744
+ /**
8745
+ * `invalid_json`: The body is not valid JSON.
8746
+ *
8747
+ * `invalid_input`: A parameter or body field is invalid; `param` names it when known.
8748
+ */
8749
+ 400: Error;
8750
+ /**
8751
+ * `unauthorized`: The `Authorization` header is missing, malformed, expired or revoked.
8752
+ */
8753
+ 401: Error;
8754
+ /**
8755
+ * `insufficient_scope`: The key lacks the scope this operation requires.
8756
+ */
8757
+ 403: Error;
8758
+ /**
8759
+ * `not_found`: The resource does not exist in this organization.
8760
+ */
8761
+ 404: Error;
8762
+ /**
8763
+ * `idempotency_conflict`: The `Idempotency-Key` was used for a different request.
8764
+ *
8765
+ * `request_processing`: A request with this `Idempotency-Key` is still processing or ended in an unknown state.
8766
+ *
8767
+ * `conflict`: The resource changed in a way that prevents the operation.
8768
+ */
8769
+ 409: Error;
8770
+ /**
8771
+ * `body_too_large`: The JSON body exceeds 64 KiB.
8772
+ */
8773
+ 413: Error;
8774
+ /**
8775
+ * `unsupported_media_type`: The body must be `application/json`.
8776
+ */
8777
+ 415: Error;
8778
+ /**
8779
+ * `rule_violation`: The request breaks a business rule; `message` says which.
8780
+ */
8781
+ 422: Error;
8782
+ /**
8783
+ * `rate_limited`: More than 120 requests this minute with this key; see `Retry-After`.
8784
+ */
8785
+ 429: Error;
8786
+ /**
8787
+ * `internal_error`: Ricky failed. Retry a read. Before retrying a write, read the resource: the same `Idempotency-Key` answers `request_processing`.
8788
+ */
8789
+ 500: Error;
8790
+ /**
8791
+ * `upstream_error`: The messaging provider failed. Retry later.
8792
+ */
8793
+ 502: Error;
8794
+ };
8795
+ export type UpdateTemplateError = UpdateTemplateErrors[keyof UpdateTemplateErrors];
8796
+ export type UpdateTemplateResponses = {
8797
+ /**
8798
+ * Success.
8799
+ */
8800
+ 200: {
8801
+ data: Template;
8802
+ };
8803
+ };
8804
+ export type UpdateTemplateResponse = UpdateTemplateResponses[keyof UpdateTemplateResponses];
8805
+ export type ValidateTemplateData = {
8806
+ body: ValidateTemplate;
8807
+ path?: never;
8808
+ query?: never;
8809
+ url: '/templates/validate';
8810
+ };
8811
+ export type ValidateTemplateErrors = {
8812
+ /**
8813
+ * `invalid_json`: The body is not valid JSON.
8814
+ *
8815
+ * `invalid_input`: A parameter or body field is invalid; `param` names it when known.
8816
+ */
8817
+ 400: Error;
8818
+ /**
8819
+ * `unauthorized`: The `Authorization` header is missing, malformed, expired or revoked.
8820
+ */
8821
+ 401: Error;
8822
+ /**
8823
+ * `insufficient_scope`: The key lacks the scope this operation requires.
8824
+ */
8825
+ 403: Error;
8826
+ /**
8827
+ * `body_too_large`: The JSON body exceeds 64 KiB.
8828
+ */
8829
+ 413: Error;
8830
+ /**
8831
+ * `unsupported_media_type`: The body must be `application/json`.
8832
+ */
8833
+ 415: Error;
8834
+ /**
8835
+ * `rate_limited`: More than 120 requests this minute with this key; see `Retry-After`.
8836
+ */
8837
+ 429: Error;
8838
+ /**
8839
+ * `internal_error`: Ricky failed. Retry a read. Before retrying a write, read the resource: the same `Idempotency-Key` answers `request_processing`.
8840
+ */
8841
+ 500: Error;
8842
+ };
8843
+ export type ValidateTemplateError = ValidateTemplateErrors[keyof ValidateTemplateErrors];
8844
+ export type ValidateTemplateResponses = {
8845
+ /**
8846
+ * Success.
8847
+ */
8848
+ 200: {
8849
+ data: TemplateValidation;
8850
+ };
8851
+ };
8852
+ export type ValidateTemplateResponse = ValidateTemplateResponses[keyof ValidateTemplateResponses];
8853
+ export type ListWhatsAppNumbersData = {
8854
+ body?: never;
8855
+ path?: never;
8856
+ query?: never;
8857
+ url: '/whatsapp-numbers';
8858
+ };
8859
+ export type ListWhatsAppNumbersErrors = {
8860
+ /**
8861
+ * `unauthorized`: The `Authorization` header is missing, malformed, expired or revoked.
8862
+ */
8863
+ 401: Error;
8864
+ /**
8865
+ * `insufficient_scope`: The key lacks the scope this operation requires.
8866
+ */
8867
+ 403: Error;
8868
+ /**
8869
+ * `rate_limited`: More than 120 requests this minute with this key; see `Retry-After`.
8870
+ */
8871
+ 429: Error;
8872
+ /**
8873
+ * `internal_error`: Ricky failed. Retry a read. Before retrying a write, read the resource: the same `Idempotency-Key` answers `request_processing`.
8874
+ */
8875
+ 500: Error;
8876
+ };
8877
+ export type ListWhatsAppNumbersError = ListWhatsAppNumbersErrors[keyof ListWhatsAppNumbersErrors];
8878
+ export type ListWhatsAppNumbersResponses = {
8879
+ /**
8880
+ * Success.
8881
+ */
8882
+ 200: {
8883
+ data: Array<WhatsAppNumber>;
8884
+ /**
8885
+ * Pass as `cursor` for the next page; null on the last page.
8886
+ */
8887
+ next_cursor: string | null;
8888
+ };
8889
+ };
8890
+ export type ListWhatsAppNumbersResponse = ListWhatsAppNumbersResponses[keyof ListWhatsAppNumbersResponses];
8891
+ export type GetWhatsAppNumberData = {
8892
+ body?: never;
8893
+ path: {
8894
+ /**
8895
+ * Channel ID.
8896
+ */
8897
+ channel_id: string;
8898
+ };
8899
+ query?: never;
8900
+ url: '/whatsapp-numbers/{channel_id}';
8901
+ };
8902
+ export type GetWhatsAppNumberErrors = {
8903
+ /**
8904
+ * `invalid_input`: A parameter or body field is invalid; `param` names it when known.
8905
+ */
8906
+ 400: Error;
8907
+ /**
8908
+ * `unauthorized`: The `Authorization` header is missing, malformed, expired or revoked.
8909
+ */
8910
+ 401: Error;
8911
+ /**
8912
+ * `insufficient_scope`: The key lacks the scope this operation requires.
8913
+ */
8914
+ 403: Error;
8915
+ /**
8916
+ * `not_found`: The resource does not exist in this organization.
8917
+ */
8918
+ 404: Error;
8919
+ /**
8920
+ * `rate_limited`: More than 120 requests this minute with this key; see `Retry-After`.
8921
+ */
8922
+ 429: Error;
8923
+ /**
8924
+ * `internal_error`: Ricky failed. Retry a read. Before retrying a write, read the resource: the same `Idempotency-Key` answers `request_processing`.
8925
+ */
8926
+ 500: Error;
8927
+ };
8928
+ export type GetWhatsAppNumberError = GetWhatsAppNumberErrors[keyof GetWhatsAppNumberErrors];
8929
+ export type GetWhatsAppNumberResponses = {
8930
+ /**
8931
+ * Success.
8932
+ */
8933
+ 200: {
8934
+ data: WhatsAppNumber;
8935
+ };
8936
+ };
8937
+ export type GetWhatsAppNumberResponse = GetWhatsAppNumberResponses[keyof GetWhatsAppNumberResponses];
8938
+ export type ListBroadcastsData = {
8939
+ body?: never;
8940
+ path?: never;
8941
+ query?: {
8942
+ /**
8943
+ * Items per page.
8944
+ */
8945
+ page_size?: number;
8946
+ /**
8947
+ * `next_cursor` from the previous page. Use it unchanged.
8948
+ */
8949
+ cursor?: string;
8950
+ };
8951
+ url: '/broadcasts';
8952
+ };
8953
+ export type ListBroadcastsErrors = {
8954
+ /**
8955
+ * `invalid_input`: A parameter or body field is invalid; `param` names it when known.
8956
+ */
8957
+ 400: Error;
8958
+ /**
8959
+ * `unauthorized`: The `Authorization` header is missing, malformed, expired or revoked.
8960
+ */
8961
+ 401: Error;
8962
+ /**
8963
+ * `insufficient_scope`: The key lacks the scope this operation requires.
8964
+ */
8965
+ 403: Error;
8966
+ /**
8967
+ * `rate_limited`: More than 120 requests this minute with this key; see `Retry-After`.
8968
+ */
8969
+ 429: Error;
8970
+ /**
8971
+ * `internal_error`: Ricky failed. Retry a read. Before retrying a write, read the resource: the same `Idempotency-Key` answers `request_processing`.
8972
+ */
8973
+ 500: Error;
8974
+ };
8975
+ export type ListBroadcastsError = ListBroadcastsErrors[keyof ListBroadcastsErrors];
8976
+ export type ListBroadcastsResponses = {
8977
+ /**
8978
+ * Success.
8979
+ */
8980
+ 200: {
8981
+ data: Array<Broadcast>;
8982
+ /**
8983
+ * Pass as `cursor` for the next page; null on the last page.
8984
+ */
8985
+ next_cursor: string | null;
8986
+ };
8987
+ };
8988
+ export type ListBroadcastsResponse = ListBroadcastsResponses[keyof ListBroadcastsResponses];
8989
+ export type CreateBroadcastData = {
8990
+ body: CreateBroadcast;
8991
+ headers?: {
8992
+ /**
8993
+ * Optional. A value you choose, unique per logical write, 8–200 characters: a UUID or an ID from your system such as `order-10482-ready`. Retrying with the same key and body replays the first response instead of repeating the write.
8994
+ */
8995
+ 'Idempotency-Key'?: string;
8996
+ };
8997
+ path?: never;
8998
+ query?: never;
8999
+ url: '/broadcasts';
9000
+ };
9001
+ export type CreateBroadcastErrors = {
9002
+ /**
9003
+ * `invalid_json`: The body is not valid JSON.
9004
+ *
9005
+ * `invalid_input`: A parameter or body field is invalid; `param` names it when known.
9006
+ */
9007
+ 400: Error;
9008
+ /**
9009
+ * `unauthorized`: The `Authorization` header is missing, malformed, expired or revoked.
9010
+ */
9011
+ 401: Error;
9012
+ /**
9013
+ * `insufficient_scope`: The key lacks the scope this operation requires.
9014
+ */
9015
+ 403: Error;
9016
+ /**
9017
+ * `not_found`: The resource does not exist in this organization.
9018
+ */
9019
+ 404: Error;
9020
+ /**
9021
+ * `idempotency_conflict`: The `Idempotency-Key` was used for a different request.
9022
+ *
9023
+ * `request_processing`: A request with this `Idempotency-Key` is still processing or ended in an unknown state.
9024
+ */
9025
+ 409: Error;
9026
+ /**
9027
+ * `body_too_large`: The JSON body exceeds 64 KiB.
9028
+ */
9029
+ 413: Error;
9030
+ /**
9031
+ * `unsupported_media_type`: The body must be `application/json`.
9032
+ */
9033
+ 415: Error;
9034
+ /**
9035
+ * `rule_violation`: The request breaks a business rule; `message` says which.
9036
+ */
9037
+ 422: Error;
9038
+ /**
9039
+ * `rate_limited`: More than 120 requests this minute with this key; see `Retry-After`.
9040
+ */
9041
+ 429: Error;
9042
+ /**
9043
+ * `internal_error`: Ricky failed. Retry a read. Before retrying a write, read the resource: the same `Idempotency-Key` answers `request_processing`.
9044
+ */
9045
+ 500: Error;
9046
+ /**
9047
+ * `upstream_error`: The messaging provider failed. Retry later.
9048
+ */
9049
+ 502: Error;
9050
+ };
9051
+ export type CreateBroadcastError = CreateBroadcastErrors[keyof CreateBroadcastErrors];
9052
+ export type CreateBroadcastResponses = {
9053
+ /**
9054
+ * Success.
9055
+ */
9056
+ 201: {
9057
+ data: Broadcast;
9058
+ };
9059
+ };
9060
+ export type CreateBroadcastResponse = CreateBroadcastResponses[keyof CreateBroadcastResponses];
9061
+ export type GetBroadcastData = {
9062
+ body?: never;
9063
+ path: {
9064
+ /**
9065
+ * Broadcast ID.
9066
+ */
9067
+ broadcast_id: string;
9068
+ };
9069
+ query?: never;
9070
+ url: '/broadcasts/{broadcast_id}';
9071
+ };
9072
+ export type GetBroadcastErrors = {
9073
+ /**
9074
+ * `invalid_input`: A parameter or body field is invalid; `param` names it when known.
9075
+ */
9076
+ 400: Error;
9077
+ /**
9078
+ * `unauthorized`: The `Authorization` header is missing, malformed, expired or revoked.
9079
+ */
9080
+ 401: Error;
9081
+ /**
9082
+ * `insufficient_scope`: The key lacks the scope this operation requires.
9083
+ */
9084
+ 403: Error;
9085
+ /**
9086
+ * `not_found`: The resource does not exist in this organization.
9087
+ */
9088
+ 404: Error;
9089
+ /**
9090
+ * `rate_limited`: More than 120 requests this minute with this key; see `Retry-After`.
9091
+ */
9092
+ 429: Error;
9093
+ /**
9094
+ * `internal_error`: Ricky failed. Retry a read. Before retrying a write, read the resource: the same `Idempotency-Key` answers `request_processing`.
9095
+ */
9096
+ 500: Error;
9097
+ };
9098
+ export type GetBroadcastError = GetBroadcastErrors[keyof GetBroadcastErrors];
9099
+ export type GetBroadcastResponses = {
9100
+ /**
9101
+ * Success.
9102
+ */
9103
+ 200: {
9104
+ data: Broadcast;
9105
+ };
9106
+ };
9107
+ export type GetBroadcastResponse = GetBroadcastResponses[keyof GetBroadcastResponses];
9108
+ export type CancelBroadcastData = {
9109
+ body?: never;
9110
+ headers?: {
9111
+ /**
9112
+ * Optional. A value you choose, unique per logical write, 8–200 characters: a UUID or an ID from your system such as `order-10482-ready`. Retrying with the same key and body replays the first response instead of repeating the write.
9113
+ */
9114
+ 'Idempotency-Key'?: string;
9115
+ };
9116
+ path: {
9117
+ /**
9118
+ * Broadcast ID.
9119
+ */
9120
+ broadcast_id: string;
9121
+ };
9122
+ query?: never;
9123
+ url: '/broadcasts/{broadcast_id}/cancel';
9124
+ };
9125
+ export type CancelBroadcastErrors = {
9126
+ /**
9127
+ * `invalid_input`: A parameter or body field is invalid; `param` names it when known.
9128
+ */
9129
+ 400: Error;
9130
+ /**
9131
+ * `unauthorized`: The `Authorization` header is missing, malformed, expired or revoked.
9132
+ */
9133
+ 401: Error;
9134
+ /**
9135
+ * `insufficient_scope`: The key lacks the scope this operation requires.
9136
+ */
9137
+ 403: Error;
9138
+ /**
9139
+ * `not_found`: The resource does not exist in this organization.
9140
+ */
9141
+ 404: Error;
9142
+ /**
9143
+ * `idempotency_conflict`: The `Idempotency-Key` was used for a different request.
9144
+ *
9145
+ * `request_processing`: A request with this `Idempotency-Key` is still processing or ended in an unknown state.
9146
+ *
9147
+ * `conflict`: The resource changed in a way that prevents the operation.
9148
+ */
9149
+ 409: Error;
9150
+ /**
9151
+ * `rate_limited`: More than 120 requests this minute with this key; see `Retry-After`.
9152
+ */
9153
+ 429: Error;
9154
+ /**
9155
+ * `internal_error`: Ricky failed. Retry a read. Before retrying a write, read the resource: the same `Idempotency-Key` answers `request_processing`.
9156
+ */
9157
+ 500: Error;
9158
+ };
9159
+ export type CancelBroadcastError = CancelBroadcastErrors[keyof CancelBroadcastErrors];
9160
+ export type CancelBroadcastResponses = {
9161
+ /**
9162
+ * Success.
9163
+ */
9164
+ 200: {
9165
+ data: Broadcast;
9166
+ };
9167
+ };
9168
+ export type CancelBroadcastResponse = CancelBroadcastResponses[keyof CancelBroadcastResponses];
9169
+ export type ListBroadcastRecipientsData = {
9170
+ body?: never;
9171
+ path: {
9172
+ /**
9173
+ * Broadcast ID.
9174
+ */
9175
+ broadcast_id: string;
9176
+ };
9177
+ query?: {
9178
+ /**
9179
+ * Items per page.
9180
+ */
9181
+ page_size?: number;
9182
+ /**
9183
+ * `next_cursor` from the previous page. Use it unchanged.
9184
+ */
9185
+ cursor?: string;
9186
+ /**
9187
+ * Only recipients in this delivery status.
9188
+ */
9189
+ status?: 'pending' | 'sent' | 'delivered' | 'read' | 'failed';
9190
+ };
9191
+ url: '/broadcasts/{broadcast_id}/recipients';
9192
+ };
9193
+ export type ListBroadcastRecipientsErrors = {
9194
+ /**
9195
+ * `invalid_input`: A parameter or body field is invalid; `param` names it when known.
9196
+ */
9197
+ 400: Error;
9198
+ /**
9199
+ * `unauthorized`: The `Authorization` header is missing, malformed, expired or revoked.
9200
+ */
9201
+ 401: Error;
9202
+ /**
9203
+ * `insufficient_scope`: The key lacks the scope this operation requires.
9204
+ */
9205
+ 403: Error;
9206
+ /**
9207
+ * `not_found`: The resource does not exist in this organization.
9208
+ */
9209
+ 404: Error;
9210
+ /**
9211
+ * `rate_limited`: More than 120 requests this minute with this key; see `Retry-After`.
9212
+ */
9213
+ 429: Error;
9214
+ /**
9215
+ * `internal_error`: Ricky failed. Retry a read. Before retrying a write, read the resource: the same `Idempotency-Key` answers `request_processing`.
9216
+ */
9217
+ 500: Error;
9218
+ };
9219
+ export type ListBroadcastRecipientsError = ListBroadcastRecipientsErrors[keyof ListBroadcastRecipientsErrors];
9220
+ export type ListBroadcastRecipientsResponses = {
9221
+ /**
9222
+ * Success.
9223
+ */
9224
+ 200: {
9225
+ data: Array<BroadcastRecipient>;
9226
+ /**
9227
+ * Pass as `cursor` for the next page; null on the last page.
9228
+ */
9229
+ next_cursor: string | null;
9230
+ };
9231
+ };
9232
+ export type ListBroadcastRecipientsResponse = ListBroadcastRecipientsResponses[keyof ListBroadcastRecipientsResponses];
8006
9233
  export type WebhookMessageReceivedWebhookPayload = WebhookEvent;
8007
9234
  export type WebhookMessageReceivedWebhookRequest = {
8008
9235
  body: WebhookMessageReceivedWebhookPayload;