@messagebird/sdk 0.23.0 → 0.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -292,6 +292,176 @@ interface PaginatedPromise<T> extends Promise<CursorPage<T>>, AsyncIterable<T> {
292
292
  }
293
293
  //#endregion
294
294
  //#region src/generated/types.gen.d.ts
295
+ /**
296
+ * ISO 4217 three-letter currency code.
297
+ */
298
+ type CurrencyCode = string;
299
+ type Money = {
300
+ /**
301
+ * Decimal amount as a string, in major currency units.
302
+ */
303
+ amount: string;
304
+ /**
305
+ * ISO 4217 currency code.
306
+ */
307
+ currency_code: CurrencyCode;
308
+ };
309
+ type VoiceMediaQuality = {
310
+ /**
311
+ * Mean opinion score, the single number for how the call sounded, from 1 (unintelligible) to 5 (as good as being in the same room). Anything at or above 4.0 is what most people would call a clear line, and below 3.5 is where callers start asking each other to repeat themselves. The three other fields are the impairments that move it.
312
+ *
313
+ */
314
+ readonly mos: number;
315
+ /**
316
+ * Variation in the arrival time of the audio packets, in milliseconds. Audio arriving unevenly is heard as choppiness even when no packets are lost at all.
317
+ */
318
+ readonly jitter_ms: number;
319
+ /**
320
+ * Percentage of audio packets that never arrived. Heard as brief gaps or clipped words, and the impairment that degrades a call fastest.
321
+ */
322
+ readonly packet_loss_pct: number;
323
+ /**
324
+ * Round-trip time between the two ends, in milliseconds. It does not distort the audio, but above roughly 300 ms the two parties start talking over each other.
325
+ */
326
+ readonly round_trip_time_ms: number;
327
+ };
328
+ /**
329
+ * Why Bird refused the call before dialing a carrier. Every refusal is signalled
330
+ * to your PBX as `503`, so `sip_response_code` alone cannot tell these causes
331
+ * apart. This field is where the cause lives.
332
+ *
333
+ * Most of them you can fix yourself:
334
+ *
335
+ * - `source_not_allowed`: the call came from an IP address that is not in the
336
+ * trunk's allowed-address list. Add the address your PBX sends from.
337
+ * - `caller_id_not_verified`: the number in the `From` header is not a verified
338
+ * caller ID for this workspace. Verify it, or present a number you have
339
+ * already verified.
340
+ * - `destination_not_enabled`: you have not turned on calling to this
341
+ * destination country. Enable it in your voice destination settings.
342
+ * - `insufficient_balance`: your wallet did not cover the call. Top up, or turn
343
+ * on automatic top-ups.
344
+ * - `daily_spend_exceeded`: the call would have passed your organization's daily
345
+ * voice spend limit. The limit resets at the start of the next UTC day.
346
+ * - `concurrent_calls_exceeded`: you already have as many calls in progress as
347
+ * your account allows. Wait for one to end, or ask support to raise the limit.
348
+ * - `calls_per_second_exceeded`: you placed calls faster than your account
349
+ * allows. Slow the rate you dial at, then retry.
350
+ *
351
+ * The rest need Bird to act, so contact support and quote the call `id`:
352
+ *
353
+ * - `routing_not_configured`: no dial plan is attached to this trunk yet.
354
+ * Expected on a trunk that was just created.
355
+ * - `no_route_found`: a dial plan is attached, but no rule in it covers this
356
+ * destination.
357
+ * - `destination_blocked`: the destination is blocked by Bird's routing
358
+ * configuration.
359
+ * - `call_not_permitted`: the call could not be priced for your account.
360
+ *
361
+ */
362
+ type VoiceCallRejectionReason = "source_not_allowed" | "caller_id_not_verified" | "routing_not_configured" | "no_route_found" | "destination_blocked" | "destination_not_enabled" | "insufficient_balance" | "daily_spend_exceeded" | "concurrent_calls_exceeded" | "calls_per_second_exceeded" | "call_not_permitted";
363
+ /**
364
+ * Call status.
365
+ *
366
+ * A call that has ended carries answered, no_answer, failed, rejected, or unknown. A call that is still up carries ringing before it is picked up and in_progress once it is; both are what the `status` filter on the call list selects on to show calls happening right now.
367
+ *
368
+ * busy and canceled are declared ahead of the feature that produces them, so their arrival is not a breaking contract change: they come with inbound termination, and today both outcomes are folded into failed.
369
+ *
370
+ */
371
+ type VoiceCallStatus = "answered" | "no_answer" | "busy" | "canceled" | "failed" | "rejected" | "unknown" | "ringing" | "in_progress";
372
+ type SipTrunkId = string;
373
+ type AuditLogActor = {
374
+ /**
375
+ * Actor identifier.
376
+ */
377
+ id: string;
378
+ /**
379
+ * Actor type (e.g. user, api_key, system).
380
+ */
381
+ type: string;
382
+ /**
383
+ * Display name of the actor — the user's email address for user actors, or the API key's name for API-key actors. Absent when it could not be resolved.
384
+ *
385
+ */
386
+ readonly display_name?: string | null;
387
+ };
388
+ /**
389
+ * Whether the call originated from your PBX (outbound) or arrived from a remote party (inbound).
390
+ */
391
+ type VoiceCallDirection = "inbound" | "outbound";
392
+ type WorkspaceId = string;
393
+ type VoiceSessionId = string;
394
+ type VoiceCallId = string;
395
+ type VoiceCall = {
396
+ /**
397
+ * Unique identifier for this call record.
398
+ */
399
+ readonly id: VoiceCallId;
400
+ /**
401
+ * Session identifier shared across all legs of a multi-party or transferred call. Use this to correlate related call records. Null when session correlation is not available for the call.
402
+ */
403
+ readonly session_id?: VoiceSessionId | null;
404
+ readonly workspace_id: WorkspaceId;
405
+ readonly direction: VoiceCallDirection;
406
+ /**
407
+ * Calling party number in E.164 format.
408
+ */
409
+ readonly from: string;
410
+ /**
411
+ * Called party number in E.164 format.
412
+ */
413
+ readonly to: string;
414
+ /**
415
+ * Who placed the call. Either the API key whose credentials it used, or the user who placed it from a browser or the Bird CLI. Absent when the call was admitted by its source IP address alone, since no credential identifies a caller there, and for calls placed before Bird started recording this.
416
+ */
417
+ readonly actor?: AuditLogActor;
418
+ /**
419
+ * Identifier of the SIP trunk that originated this call. Null when no trunk is associated.
420
+ */
421
+ readonly sip_trunk_id?: SipTrunkId | null;
422
+ readonly status: VoiceCallStatus;
423
+ /**
424
+ * Final SIP response code received from the carrier. Null when no SIP response was received, for example on timeout or DNS failure.
425
+ */
426
+ readonly sip_response_code?: number | null;
427
+ /**
428
+ * Why Bird refused the call before dialing a carrier. Absent when Bird did not refuse it, meaning the call either connected or it failed at the carrier, where `sip_response_code` is the whole story.
429
+ */
430
+ readonly rejection_reason?: VoiceCallRejectionReason;
431
+ /**
432
+ * When the call was initiated.
433
+ */
434
+ readonly started_at: string;
435
+ /**
436
+ * When the call was answered (200 OK received). Null for unanswered calls.
437
+ */
438
+ readonly answered_at?: string | null;
439
+ /**
440
+ * When the call ended (BYE or final non-2xx response). Null for calls that ended abnormally without a recorded end event.
441
+ */
442
+ readonly ended_at?: string | null;
443
+ /**
444
+ * Total call duration in milliseconds, measured from the first INVITE to the BYE or final response. Null while the call is still in progress and has no final duration yet.
445
+ */
446
+ readonly duration_ms?: number | null;
447
+ /**
448
+ * Post-dial delay in milliseconds: how long the caller heard nothing between dialing and the phone starting to ring at the other end. High values are what callers experience as the call "not going through". Absent when the call never rang, either because it failed first or because the carrier answered it immediately.
449
+ *
450
+ */
451
+ readonly pdd_ms?: number;
452
+ /**
453
+ * Billable duration in milliseconds, measured from answer to call end. Zero for unanswered calls, and null while the call is still in progress.
454
+ */
455
+ readonly billable_ms?: number | null;
456
+ /**
457
+ * How the audio sounded, as opposed to whether the call connected. Absent when the call carried no audio, or when the far end reported nothing to measure from.
458
+ */
459
+ media_quality?: VoiceMediaQuality;
460
+ /**
461
+ * Amount billed for this call, net of tax, at full precision. Absent until the call has been rated; unanswered or unpriced calls have no cost.
462
+ */
463
+ cost?: Money;
464
+ };
295
465
  /**
296
466
  * Payload of the whatsapp.sent event.
297
467
  */
@@ -327,7 +497,6 @@ type WhatsAppAddress = {
327
497
  */
328
498
  bsuid?: string;
329
499
  };
330
- type WorkspaceId = string;
331
500
  type WhatsAppMessageId = string;
332
501
  /**
333
502
  * Identity fields shared by every WhatsApp lifecycle event payload.
@@ -507,12 +676,6 @@ type EventWhatsAppAccepted = {
507
676
  * Payload of the voice_call.initiated event.
508
677
  */
509
678
  type EventVoiceCallInitiatedData = EventVoiceBase;
510
- /**
511
- * Whether the call originated from your PBX (outbound) or arrived from a remote party (inbound).
512
- */
513
- type VoiceCallDirection = "inbound" | "outbound";
514
- type VoiceSessionId = string;
515
- type VoiceCallId = string;
516
679
  /**
517
680
  * Identity fields shared by every voice call lifecycle event payload.
518
681
  */
@@ -553,15 +716,6 @@ type EventVoiceCallInitiated = {
553
716
  timestamp: string;
554
717
  data: EventVoiceCallInitiatedData;
555
718
  };
556
- /**
557
- * Call status.
558
- *
559
- * A call that has ended carries answered, no_answer, failed, rejected, or unknown. A call that is still up carries ringing before it is picked up and in_progress once it is; both are what the `status` filter on the call list selects on to show calls happening right now.
560
- *
561
- * busy and canceled are declared ahead of the feature that produces them, so their arrival is not a breaking contract change: they come with inbound termination, and today both outcomes are folded into failed.
562
- *
563
- */
564
- type VoiceCallStatus = "answered" | "no_answer" | "busy" | "canceled" | "failed" | "rejected" | "unknown" | "ringing" | "in_progress";
565
719
  /**
566
720
  * Payload of the voice_call.ended event.
567
721
  */
@@ -844,10 +998,10 @@ type EventSmsUndeliveredData = EventSmsBase & {
844
998
  error: SmsError;
845
999
  };
846
1000
  /**
847
- * Bird-stable failure reason. `invalid_destination`: the number is not assigned, ported out, or malformed. `unreachable`: handset off or out of coverage. `blocked_by_carrier`: the carrier filtered the message. `blocked_by_recipient`: the recipient device blocked the sender. `landline_unreachable`: the destination is a landline that does not accept SMS. `content_rejected`: the carrier rejected the content. `sender_unregistered`: the sender is not registered for the destination. `recipient_opted_out`: the recipient is on a suppression list. `provider_unavailable`: an upstream failure after retries. `insufficient_balance`: the workspace wallet had insufficient balance to send the message. `unknown`: an unmapped failure.
1001
+ * Bird-stable failure reason. Open enum: Bird adds reasons as the carrier platform's own buckets are covered, so treat an unrecognized value as a future reason rather than an error. `invalid_destination`: the number is not assigned, ported out, or malformed. `unreachable`: handset off or out of coverage. `blocked_by_carrier`: the carrier filtered the message. `blocked_by_recipient`: the recipient device blocked the sender. `landline_unreachable`: the destination is a landline that does not accept SMS. `content_rejected`: the carrier rejected the content. `sender_unregistered`: the sender is not registered for the destination. `recipient_opted_out`: the recipient is on a suppression list. `provider_unavailable`: an upstream failure after retries. `insufficient_balance`: the workspace wallet had insufficient balance to send the message. `unknown`: an unmapped failure.
848
1002
  *
849
1003
  */
850
- type SmsErrorCode = "invalid_destination" | "unreachable" | "blocked_by_carrier" | "blocked_by_recipient" | "landline_unreachable" | "content_rejected" | "sender_unregistered" | "recipient_opted_out" | "provider_unavailable" | "insufficient_balance" | "unknown";
1004
+ type SmsErrorCode = "invalid_destination" | "unreachable" | "blocked_by_carrier" | "blocked_by_recipient" | "landline_unreachable" | "content_rejected" | "sender_unregistered" | "recipient_opted_out" | "provider_unavailable" | "insufficient_balance" | "unknown" | (string & {});
851
1005
  /**
852
1006
  * Failure detail for a message that could not be delivered or was rejected.
853
1007
  */
@@ -858,7 +1012,7 @@ type SmsError = {
858
1012
  */
859
1013
  description: string;
860
1014
  /**
861
- * Raw carrier-supplied error code, when available, for low-level debugging.
1015
+ * Raw provider-supplied error code, finer-grained than the `code` that normalizes it. Not a Bird-defined value, so quote it to support when asking why a message failed. Null when the provider sent none, including any failure decided before one was reached.
862
1016
  */
863
1017
  carrier_error_code?: string | null;
864
1018
  /**
@@ -866,6 +1020,31 @@ type SmsError = {
866
1020
  */
867
1021
  occurred_at: string;
868
1022
  } | null;
1023
+ /**
1024
+ * What was charged for a message, split into the components that make it up. Null until at least one component has been priced.
1025
+ *
1026
+ */
1027
+ type MessageCost = {
1028
+ /**
1029
+ * Total charged, as a decimal string: the sum of the components below. Net of tax, which applies to your wallet balance rather than to an individual charge.
1030
+ *
1031
+ */
1032
+ readonly amount: string;
1033
+ /**
1034
+ * ISO 4217 currency code. Every component is denominated in this currency.
1035
+ */
1036
+ readonly currency_code: CurrencyCode;
1037
+ /**
1038
+ * What Bird charged to carry the message, as a decimal string. Null when this component was not priced; `"0.00000"` when it priced at zero.
1039
+ *
1040
+ */
1041
+ readonly transaction_amount: string | null;
1042
+ /**
1043
+ * Third-party fees Bird passes on, as a decimal string, such as US 10DLC carrier surcharges. Null when this component was not priced; `"0.00000"` when it priced at zero.
1044
+ *
1045
+ */
1046
+ readonly passthrough_amount: string | null;
1047
+ } | null;
869
1048
  type SmsMessageId = string;
870
1049
  /**
871
1050
  * Identity fields shared by every SMS lifecycle event payload.
@@ -880,11 +1059,13 @@ type EventSmsBase = {
880
1059
  */
881
1060
  workspace_id: WorkspaceId;
882
1061
  /**
883
- * Recipient phone number in E.164 format.
1062
+ * Where the message went. On an outbound message this is the recipient's phone number in E.164 format; on an inbound one it is your own number that received it.
1063
+ *
884
1064
  */
885
1065
  to: string;
886
1066
  /**
887
- * Sender the message was sent from an E.164 number, an alphanumeric sender ID, or a short code.
1067
+ * Where the message came from. On an outbound message this is the sender you sent it from: an E.164 number, an alphanumeric sender ID, or a short code. On an inbound one it is the phone number that sent it to you.
1068
+ *
888
1069
  */
889
1070
  from: string;
890
1071
  /**
@@ -899,6 +1080,13 @@ type EventSmsBase = {
899
1080
  metadata: {
900
1081
  [key: string]: unknown;
901
1082
  } | null;
1083
+ /**
1084
+ * What the message had cost as of this event, split into Bird's charge and any third-party fees passed through. Null on an event that priced nothing.
1085
+ *
1086
+ * Components are named so you can merge them per component rather than replacing the object: webhook delivery is not ordered, so an older event arriving late would otherwise overwrite a newer figure. Take the latest `occurred_at` you have seen for each component. `amount` is the sum of the components in THIS payload, not a settled total.
1087
+ *
1088
+ */
1089
+ cost?: MessageCost;
902
1090
  };
903
1091
  /**
904
1092
  * The carrier reported a non-permanent failure to deliver the message.
@@ -990,7 +1178,12 @@ type EventSmsFailed = {
990
1178
  /**
991
1179
  * Payload of the sms.expired event.
992
1180
  */
993
- type EventSmsExpiredData = EventSmsBase;
1181
+ type EventSmsExpiredData = EventSmsBase & {
1182
+ /**
1183
+ * Why the message was still undelivered when its validity period elapsed. Typically `unreachable`, the handset having stayed off or out of coverage for the whole window.
1184
+ */
1185
+ error: SmsError;
1186
+ };
994
1187
  /**
995
1188
  * The message's validity period elapsed before it could be delivered.
996
1189
  */
@@ -4127,36 +4320,70 @@ type WhatsAppMessageSendRequest = {
4127
4320
  };
4128
4321
  };
4129
4322
  /**
4130
- * The kind of value a template parameter accepts. `text` (the only kind today) is a plain string substituted into the placeholder. Open enum: more kinds may be added over time.
4323
+ * The values that fill one block of one carousel card.
4324
+ */
4325
+ type WhatsAppMessageTemplateCardComponent = {
4326
+ /**
4327
+ * Which part of the card this fills in: `header` for the card's image or video, `body` for its text, `button` for a button's variable.
4328
+ *
4329
+ */
4330
+ type: string;
4331
+ /**
4332
+ * The values that fill this part's placeholders, in placeholder order.
4333
+ */
4334
+ parameters?: Array<WhatsAppMessageTemplateComponentParameter>;
4335
+ };
4336
+ /**
4337
+ * The kind of value a template parameter carries, which follows the block it fills. `text` is a plain string substituted into a placeholder, including a coupon button's code, which the recipient copies from the button. `image`, `video`, `gif` and `document` carry a media header's file in `url`, each matching its header's `format`. `location` fills a location header and carries a point on the map. Open enum: more kinds may be added over time.
4131
4338
  *
4132
4339
  */
4133
- type WhatsAppTemplateParameterType$1 = "text" | (string & {});
4340
+ type WhatsAppTemplateParameterType$1 = "text" | "image" | "video" | "gif" | "document" | "location" | (string & {});
4134
4341
  type WhatsAppMessageTemplateComponentParameter = {
4135
4342
  /**
4136
- * The kind of value this parameter carries. `text` is the only kind today.
4343
+ * The kind of value this parameter carries, which decides which of the fields below to send.
4137
4344
  */
4138
4345
  type: WhatsAppTemplateParameterType$1;
4139
4346
  /**
4140
- * The value substituted into the placeholder, as a plain string.
4347
+ * The value substituted into the placeholder, as a plain string. Send it on a `text` parameter.
4141
4348
  */
4142
- text: string;
4349
+ text?: string;
4350
+ /**
4351
+ * Public `https` URL of the file a media header shows. Send it on an `image`, `video`, `gif` or `document` parameter. WhatsApp fetches it at send time, so it must still be reachable then, the same way a free-form media message's `url` must.
4352
+ *
4353
+ */
4354
+ url?: string;
4143
4355
  /**
4144
4356
  * Required when the template declares named parameters: the placeholder this value fills (for example `first_name`), matching exactly one of the names the template declares. Name every parameter in that case; order does not matter once names are supplied. Omit this field for a positional template, which takes its values in `{{n}}` order instead. Sending the wrong set of names, or leaving one out that the template requires, returns a `422` `WhatsAppTemplateParameterMismatch`.
4145
4357
  *
4146
4358
  */
4147
4359
  name?: string;
4148
4360
  };
4361
+ /**
4362
+ * The values that fill one card of a carousel. Cards fill in the order the template was approved with, so send one entry per card and keep them in that order.
4363
+ *
4364
+ */
4365
+ type WhatsAppMessageTemplateCard = {
4366
+ /**
4367
+ * The values that fill this card's blocks.
4368
+ */
4369
+ components: Array<WhatsAppMessageTemplateCardComponent>;
4370
+ };
4149
4371
  type WhatsAppMessageTemplateComponent = {
4150
4372
  /**
4151
- * Which part of the template this fills in: `body` for the main text, `button` for a button's variable, `header` for the header. Bird manages header values itself, so a `header` entry supplied on a send is ignored.
4373
+ * Which part of the template this fills in: `body` for the main text, `button` for a button's variable, `header` for the header's text, media or location, `carousel` for the cards.
4152
4374
  *
4153
4375
  */
4154
4376
  type: string;
4155
4377
  /**
4156
- * The values that fill this part's placeholders. A positional template takes them in `{{n}}` placeholder order; a template with named parameters requires each parameter's `name` to match one the template declares, and order then carries no meaning.
4378
+ * The values that fill this part's placeholders. A positional template takes them in `{{n}}` placeholder order; a template with named parameters requires each parameter's `name` to match one the template declares, and order then carries no meaning. Send it on every part except `carousel`, which carries its values on `cards`.
4157
4379
  *
4158
4380
  */
4159
4381
  parameters?: Array<WhatsAppMessageTemplateComponentParameter>;
4382
+ /**
4383
+ * The values that fill each card of a carousel. Send it only on a `carousel` part. A carousel sends exactly the number of cards its template was approved with, so every card needs an entry.
4384
+ *
4385
+ */
4386
+ cards?: Array<WhatsAppMessageTemplateCard>;
4160
4387
  };
4161
4388
  /**
4162
4389
  * A language tag in BCP-47 form, for example `en` or `pt-BR`.
@@ -4178,7 +4405,7 @@ type WhatsAppTemplateSend = unknown & {
4178
4405
  */
4179
4406
  slug?: TemplateSlug;
4180
4407
  /**
4181
- * Which of the template's languages to send, as a BCP-47 tag (for example `en` or `pt-BR`). Meta's underscore form (`pt_BR`) is accepted and normalized; the accepted message echoes the canonical BCP-47 form. May be omitted when the template has a single language; when it is stocked in several, omitting the language returns a `422` that names the available tags.
4408
+ * Which of the template's languages to send, as a BCP-47 tag (for example `en` or `pt-BR`). Meta's underscore form (`pt_BR`) is accepted and normalized; the accepted message echoes the canonical BCP-47 form. May be omitted, in which case the template's default language is sent. A language the template is not stocked in returns a `422` that names the available tags.
4182
4409
  *
4183
4410
  */
4184
4411
  language?: LanguageTag;
@@ -4189,21 +4416,7 @@ type WhatsAppTemplateSend = unknown & {
4189
4416
  components?: Array<WhatsAppMessageTemplateComponent>;
4190
4417
  };
4191
4418
  /**
4192
- * ISO 4217 three-letter currency code.
4193
- */
4194
- type CurrencyCode = string;
4195
- type Money = {
4196
- /**
4197
- * Decimal amount as a string, in major currency units.
4198
- */
4199
- amount: string;
4200
- /**
4201
- * ISO 4217 currency code.
4202
- */
4203
- currency_code: CurrencyCode;
4204
- };
4205
- /**
4206
- * Delivery status. `accepted` (the initial status of an outbound send) means Bird accepted the request and it is queued for sending. `sent` means it was handed to the WhatsApp network. `delivered` is confirmed delivery to the recipient's device. `failed` is a terminal permanent failure. `rejected` means Bird refused the message before sending it to WhatsApp, because the recipient is on the workspace's suppression list, the wallet had insufficient balance, or the destination is unpriced. A rejected message was not sent and not charged. There is no `read` status: a read receipt is reported as `read_at` and a `whatsapp.read` event, not a status value. The remaining values are reserved and not returned today: `scheduled` (queued to send at a future time), `canceled` (a scheduled message canceled before sending), and `received` (a message a contact sent you).
4419
+ * Delivery status. `accepted` (the initial status of an outbound send) means Bird accepted the request and it is queued for sending. `sent` means it was handed to the WhatsApp network. `delivered` is confirmed delivery to the recipient's device. `failed` is a terminal permanent failure. `rejected` means Bird refused the message before sending it to WhatsApp, because the recipient is on the workspace's suppression list, the wallet had insufficient balance, or the destination is unpriced. A rejected message was not sent and not charged. There is no `read` status: a read receipt is reported as `read_at` and a `whatsapp.read` event, not a status value. `received` is the status of an inbound message, one a contact sent you. The remaining values are reserved and not returned today: `scheduled` (queued to send at a future time) and `canceled` (a scheduled message canceled before sending).
4207
4420
  *
4208
4421
  */
4209
4422
  type WhatsAppMessageStatus = "scheduled" | "accepted" | "sent" | "delivered" | "failed" | "rejected" | "canceled" | "received";
@@ -4278,7 +4491,10 @@ type WhatsAppMessage = {
4278
4491
  * When the message was read by the recipient. Null until then.
4279
4492
  */
4280
4493
  readonly read_at?: string | null;
4281
- cost?: Money | null;
4494
+ /**
4495
+ * What the message cost, split into Bird's charge and any third-party fees passed through. Null on an inbound message, which is never priced, on an outbound message that has not been priced yet, and on one rejected before pricing. The rate depends on the message category and the recipient's country.
4496
+ */
4497
+ readonly cost?: MessageCost;
4282
4498
  /**
4283
4499
  * Structured `{name, value}` filter labels applied to this message.
4284
4500
  */
@@ -4290,6 +4506,9 @@ type WhatsAppMessage = {
4290
4506
  [key: string]: unknown;
4291
4507
  };
4292
4508
  };
4509
+ type VerificationNextChannelRequest = {
4510
+ to: VerificationTo;
4511
+ };
4293
4512
  type VerificationCheckResult = {
4294
4513
  /**
4295
4514
  * Whether the submitted passcode verified this verification. `true` means the passcode was correct and the verification is now complete; `false` means it did not verify, and `reason` says why. A verification that has already reached a final state is no longer checkable and returns `404`.
@@ -4324,7 +4543,7 @@ type Verification = {
4324
4543
  readonly reason?: VerificationTerminalReason$1 | null;
4325
4544
  readonly to: VerificationTo;
4326
4545
  /**
4327
- * The channels this verification uses to deliver the passcode, in attempt order: the first entry is tried first and later entries are fallbacks. An email recipient is verified over email; a phone recipient is verified over SMS.
4546
+ * The channels this verification uses to deliver the passcode, in attempt order: the first entry is tried first and later entries are fallbacks. An email recipient is verified over email; a phone recipient is verified over the phone channels enabled for its destination country, in the order that country's configuration sets.
4328
4547
  */
4329
4548
  readonly channels: Array<VerificationChannelEntry>;
4330
4549
  /**
@@ -4393,7 +4612,7 @@ type SmsTemplateVersionId = string;
4393
4612
  */
4394
4613
  type TemplateVariable = {
4395
4614
  /**
4396
- * The parameters key this slot is filled with.
4615
+ * The parameter key this slot is filled with.
4397
4616
  */
4398
4617
  readonly key: string;
4399
4618
  /**
@@ -4402,7 +4621,7 @@ type TemplateVariable = {
4402
4621
  */
4403
4622
  readonly type: string;
4404
4623
  /**
4405
- * Whether the slot must be supplied when sending. Advisory for email templates, where a missing value renders as empty rather than rejecting the send.
4624
+ * Whether the slot must be supplied when sending. A send that leaves a required slot unset is rejected.
4406
4625
  *
4407
4626
  */
4408
4627
  readonly required: boolean;
@@ -4507,31 +4726,6 @@ type SmsBatchSummary = {
4507
4726
  */
4508
4727
  accepted_count: number;
4509
4728
  };
4510
- /**
4511
- * What was charged for a message, split into the components that make it up. Null until at least one component has been priced.
4512
- *
4513
- */
4514
- type MessageCost = {
4515
- /**
4516
- * Total charged, as a decimal string: the sum of the components below. Net of tax, which applies to your wallet balance rather than to an individual charge.
4517
- *
4518
- */
4519
- readonly amount: string;
4520
- /**
4521
- * ISO 4217 currency code. Every component is denominated in this currency.
4522
- */
4523
- readonly currency_code: CurrencyCode;
4524
- /**
4525
- * What Bird charged to carry the message, as a decimal string. Null when this component was not priced; `"0.00000"` when it priced at zero.
4526
- *
4527
- */
4528
- readonly transaction_amount: string | null;
4529
- /**
4530
- * Third-party fees Bird passes on, as a decimal string, such as US 10DLC carrier surcharges. Null when this component was not priced; `"0.00000"` when it priced at zero.
4531
- *
4532
- */
4533
- readonly passthrough_amount: string | null;
4534
- } | null;
4535
4729
  /**
4536
4730
  * Segment breakdown for the message body. Segment count drives billing.
4537
4731
  */
@@ -4567,18 +4761,20 @@ type SmsMessage = {
4567
4761
  readonly direction: "outbound" | "inbound";
4568
4762
  readonly status: SmsMessageStatus;
4569
4763
  /**
4570
- * Recipient phone number in E.164 format.
4764
+ * Where the message went. On an outbound message this is the recipient's phone number in E.164 format; on an inbound one it is your own number that received it.
4765
+ *
4571
4766
  */
4572
4767
  to: string;
4573
4768
  /**
4574
- * Sender the message was sent from: an E.164 number, an alphanumeric sender ID, or a short code.
4769
+ * Where the message came from. On an outbound message this is the sender you sent it from (an E.164 number, an alphanumeric sender ID, or a short code); on an inbound one it is the phone number that sent it to you.
4770
+ *
4575
4771
  */
4576
4772
  from: string;
4577
4773
  /**
4578
- * The message body as sent. For a template send, this is the rendered text after parameter substitution. When `category` is `authentication` (a message carrying a one-time code), this is `**REDACTED**`: the code still reaches the recipient, Bird just does not persist it for later reads.
4774
+ * The message body. Every message carries body text, attachments, or both, so this is absent only on a received message that carried attachments and no text. For a template send, this is the rendered text after parameter substitution. When `category` is `authentication` (a message carrying a one-time code), this is `**REDACTED**`: the code still reaches the recipient, Bird just does not persist it for later reads.
4579
4775
  *
4580
4776
  */
4581
- text: string;
4777
+ text?: string;
4582
4778
  /**
4583
4779
  * Content classification supplied on the send. Null for inbound messages.
4584
4780
  */
@@ -4606,15 +4802,15 @@ type SmsMessage = {
4606
4802
  */
4607
4803
  readonly validity_period?: number;
4608
4804
  /**
4609
- * Carrier that handled the message, when known. Populated once a delivery receipt identifies it.
4805
+ * Carrier that handled the message. Absent until a delivery receipt identifies it, and on a received message the carrier reports it only where a carrier fee applies.
4610
4806
  */
4611
- readonly carrier?: string | null;
4807
+ readonly carrier?: string;
4612
4808
  /**
4613
- * Mobile country code and mobile network code of the carrier, when known.
4809
+ * Mobile country code and mobile network code of the carrier. Absent until the carrier is identified.
4614
4810
  */
4615
- readonly mcc_mnc?: string | null;
4811
+ readonly mcc_mnc?: string;
4616
4812
  /**
4617
- * Failure detail on a terminally failed or rejected message. Present only when the message failed.
4813
+ * Failure detail on a message that failed, was rejected, was not delivered, or expired. Absent otherwise.
4618
4814
  */
4619
4815
  last_error?: SmsError;
4620
4816
  /**
@@ -4790,11 +4986,11 @@ type Contact = {
4790
4986
  */
4791
4987
  phone: string | null;
4792
4988
  /**
4793
- * The contact's first name. Available in broadcast templates as the `contact.first_name` variable.
4989
+ * The contact's first name. Available in broadcast templates as `bird.contact.first_name`.
4794
4990
  */
4795
4991
  first_name?: string | null;
4796
4992
  /**
4797
- * The contact's last name. Available in broadcast templates as the `contact.last_name` variable.
4993
+ * The contact's last name. Available in broadcast templates as `bird.contact.last_name`.
4798
4994
  */
4799
4995
  last_name?: string | null;
4800
4996
  /**
@@ -4802,12 +4998,16 @@ type Contact = {
4802
4998
  */
4803
4999
  external_id?: string | null;
4804
5000
  /**
4805
- * Custom property values for this contact, available as template variables in broadcasts. Each key is a property created via the contact properties API, and each value is a string, number, boolean, or RFC 3339 datetime matching the property's declared type (strings up to 500 characters). Total size is capped at 2 KB serialized. Values stored under a property that was later archived remain readable here.
5001
+ * Custom property values for this contact, available in broadcast templates as `bird.contact.<key>`. Each key is a property created via the contact properties API, and each value is a string, number, boolean, or RFC 3339 datetime matching the property's declared type (strings up to 500 characters). Total size is capped at 2 KB serialized. Values stored under a property that was later archived remain readable here.
4806
5002
  *
4807
5003
  */
4808
5004
  data?: {
4809
5005
  [key: string]: unknown;
4810
5006
  };
5007
+ /**
5008
+ * The audiences this contact belongs to, most-recently-joined first. Only present when listing contacts; omitted from every other contact operation.
5009
+ */
5010
+ readonly audiences?: Array<AudienceRef>;
4811
5011
  } & Timestamps;
4812
5012
  type AudienceMember = {
4813
5013
  contact: Contact;
@@ -4853,7 +5053,7 @@ type ContactPropertyUpdateRequest = {
4853
5053
  };
4854
5054
  type ContactPropertyCreateRequest = {
4855
5055
  /**
4856
- * The property key, used as the key in contact data and as the template variable name in broadcasts. Lowercase letters, digits, and underscores, starting with a letter. Cannot be changed after creation.
5056
+ * The property key, used as the key in contact data and as the attribute in the `bird.contact.<key>` broadcast template variable. Lowercase letters, digits, and underscores, starting with a letter. Cannot be changed after creation.
4857
5057
  */
4858
5058
  key: string;
4859
5059
  type: ContactPropertyType;
@@ -4876,7 +5076,7 @@ type ContactProperty = {
4876
5076
  */
4877
5077
  readonly id: ContactPropertyId;
4878
5078
  /**
4879
- * The property key, used as the key in contact data and as the template variable name in broadcasts. Lowercase letters, digits, and underscores, starting with a letter. Cannot be changed after creation.
5079
+ * The property key, used as the key in contact data and as the attribute in the `bird.contact.<key>` broadcast template variable. Lowercase letters, digits, and underscores, starting with a letter. Cannot be changed after creation.
4880
5080
  */
4881
5081
  key: string;
4882
5082
  type: ContactPropertyType;
@@ -5050,6 +5250,10 @@ type ContactCreateRequest = {
5050
5250
  [key: string]: unknown;
5051
5251
  };
5052
5252
  };
5253
+ /**
5254
+ * Which identifier a contact has on file, `email` for an email address or `phone` for a phone number.
5255
+ */
5256
+ type ContactIdentifierFilter = "email" | "phone";
5053
5257
  type EmailMessageBatchResponse = {
5054
5258
  /**
5055
5259
  * One entry per message in the batch, in submission order.
@@ -5111,7 +5315,7 @@ type EmailTemplateSend = unknown & {
5111
5315
  */
5112
5316
  language?: LanguageTag;
5113
5317
  /**
5114
- * Values for the template's variables, keyed by variable name. A token with no matching value renders empty. Nest values to fill dotted tokens: `{"contact": {"first_name": "Ada"}}` fills `{{ contact.first_name }}`. Send everything the template's `variables` lists rather than only what you expect the chosen language to use: languages need not reference the same variables, and a value no language uses is ignored. Cap: 16 KB serialized.
5318
+ * Values for the template's parameters, keyed by parameter name. A parameter name is a single word, and every parameter the template's `variables` lists needs a value here: a send that omits one is rejected rather than delivered with a blank. Send everything `variables` lists rather than only what you expect the chosen language to use, since languages need not reference the same parameters and a value no language uses is ignored. Cap: 16 KB serialized.
5115
5319
  *
5116
5320
  */
5117
5321
  parameters?: {
@@ -5172,7 +5376,7 @@ type EmailMessageSendRequest = {
5172
5376
  [key: string]: unknown;
5173
5377
  };
5174
5378
  /**
5175
- * Template variables used to personalize inline content. Tokens in the subject and body (e.g. `{{ first_name }}`) are replaced with these values at send time. Shared across all recipients of this send. A token with no matching key renders empty. Cap: 16 KB serialized. When sending a stored `template`, put the values in `template.parameters` instead.
5379
+ * Parameter values used to personalize inline content. A parameter is a single word, and a token in the subject or body (for example `{{ animal }}`) is replaced with the value of that name at send time. Shared across all recipients of this send. A token with no matching key renders empty. Cap: 16 KB serialized. When sending a stored `template`, put the values in `template.parameters` instead.
5176
5380
  *
5177
5381
  */
5178
5382
  parameters?: {
@@ -5791,6 +5995,10 @@ type ListContactsData = {
5791
5995
  * Case-insensitive substring match against the contact's email address, first name, last name, or phone number. Phone matching is over the digits of the international form, so a full pasted number, a formatted number, or trailing digits all match; a national form with a leading trunk zero does not.
5792
5996
  */
5793
5997
  q?: string;
5998
+ /**
5999
+ * Filter to contacts that have a specific identifier on file.
6000
+ */
6001
+ identifier?: ContactIdentifierFilter;
5794
6002
  /**
5795
6003
  * Maximum number of items to return per page.
5796
6004
  */
@@ -6223,6 +6431,31 @@ type CreateVerificationCheckData = {
6223
6431
  query?: never;
6224
6432
  url: "/v1/verify/verifications/check";
6225
6433
  };
6434
+ type CreateVerificationNextChannelData = {
6435
+ body: VerificationNextChannelRequest;
6436
+ headers?: {
6437
+ /**
6438
+ * Workspace context. Required for session auth; derived from API key otherwise.
6439
+ */
6440
+ "X-Workspace-Id"?: string;
6441
+ /**
6442
+ * Client-supplied deduplication key. When present, the server replays the original response for any duplicate request with the same key within the idempotency TTL window (3 hours by default).
6443
+ * Two distinct 409 errors signal misuse:
6444
+ * - `request_in_progress` (E01004): the same key is currently being
6445
+ * processed by a concurrent request. Wait briefly and retry; the lock
6446
+ * expires within 30 seconds.
6447
+ * - `idempotency_key_reuse` (E01005): the same key has already completed
6448
+ * against a different request body or method. Generate a new key.
6449
+ *
6450
+ * Recommended key format is `<event-type>/<entity-id>` (e.g. `welcome-user/usr_abc123`).
6451
+ *
6452
+ */
6453
+ "Idempotency-Key"?: string;
6454
+ };
6455
+ path?: never;
6456
+ query?: never;
6457
+ url: "/v1/verify/verifications/next-channel";
6458
+ };
6226
6459
  type ListWhatsAppMessagesData = {
6227
6460
  body?: never;
6228
6461
  path?: never;
@@ -7384,6 +7617,64 @@ type ReplyEmailThreadMessageData = {
7384
7617
  query?: never;
7385
7618
  url: "/v1/email/threads/{thread_id}/messages/{message_id}/reply";
7386
7619
  };
7620
+ type ListVoiceCallsData = {
7621
+ body?: never;
7622
+ path?: never;
7623
+ query?: {
7624
+ /**
7625
+ * Return only calls in this direction.
7626
+ */
7627
+ direction?: VoiceCallDirection;
7628
+ /**
7629
+ * Return only calls with one of these statuses, comma-separated. In-flight and final statuses may be combined freely.
7630
+ *
7631
+ */
7632
+ status?: Array<VoiceCallStatus>;
7633
+ /**
7634
+ * Return only calls belonging to this session, which is how the legs of one multi-party or transferred call are correlated.
7635
+ */
7636
+ session_id?: VoiceSessionId;
7637
+ /**
7638
+ * Return only calls carried by this SIP trunk.
7639
+ */
7640
+ sip_trunk_id?: SipTrunkId;
7641
+ /**
7642
+ * Return only calls placed from this calling party number, matched as a whole number rather than as a fragment. Give it in international form: `+14155551234`, `14155551234`, and `0014155551234` all select the same calls, because a call record keeps the number exactly as the calling equipment presented it. A number given without a country code matches only calls recorded in that same form, since it names a different number in every country. Use `number` instead to match part of a number, or either side of the call.
7643
+ *
7644
+ */
7645
+ from?: string;
7646
+ /**
7647
+ * Return only calls placed to this called party number, matched as a whole number rather than as a fragment. Give it in international form: `+16505559876`, `16505559876`, and `0016505559876` all select the same calls, because a call record keeps the number exactly as the calling equipment presented it. A number given without a country code matches only calls recorded in that same form, since it names a different number in every country. Use `number` instead to match part of a number, or either side of the call.
7648
+ *
7649
+ */
7650
+ to?: string;
7651
+ /**
7652
+ * Return only calls where the calling or called number contains this value. Matches a partial number, so a country or area-code prefix returns every call to or from it. Combines with `from`/`to`, which match one side exactly.
7653
+ */
7654
+ number?: string;
7655
+ /**
7656
+ * Return only calls that started at or after this instant, inclusive. RFC 3339 timestamp.
7657
+ */
7658
+ started_after?: string;
7659
+ /**
7660
+ * Return only calls that started at or before this instant, inclusive. RFC 3339 timestamp.
7661
+ */
7662
+ started_before?: string;
7663
+ /**
7664
+ * Maximum number of items to return per page.
7665
+ */
7666
+ limit?: number;
7667
+ /**
7668
+ * Cursor from the `next_cursor` field of a previous list response. Returns items immediately after the cursor position in the current sort order.
7669
+ */
7670
+ starting_after?: string;
7671
+ /**
7672
+ * Cursor from the `prev_cursor` field of a previous list response. Returns items immediately before the cursor position in the current sort order.
7673
+ */
7674
+ ending_before?: string;
7675
+ };
7676
+ url: "/v1/voice/calls";
7677
+ };
7387
7678
  //#endregion
7388
7679
  //#region src/generated/core/auth.gen.d.ts
7389
7680
  type AuthToken = string | undefined;
@@ -8710,12 +9001,36 @@ declare class WhatsappResource extends WhatsappResourceBase {
8710
9001
  send(params: WhatsappSendParams, options?: RequestOptions): APIPromise<WhatsAppMessage>;
8711
9002
  }
8712
9003
  //#endregion
9004
+ //#region src/resources/voice.gen.d.ts
9005
+ type VoiceListQuery = NonNullable<ListVoiceCallsData["query"]>;
9006
+ declare class VoiceResource extends Resource {
9007
+ /**
9008
+ * List the workspace's calls, newest first. Filter to `ringing`/`in_progress` for the calls in progress right now, to final statuses for completed records, or to any mix of the two. Use `from`/`to` for one known party number in international form, and `number` to search either side by fragment. These are per-call records: for rates and totals over a period use voice_stats_summary rather than summing them here, and voice_get to follow one call to settlement.
9009
+ *
9010
+ * @example Iterate the calls happening right now
9011
+ * for await (const call of bird.voice.list({ status: ["ringing", "in_progress"] })) {
9012
+ * console.log(call.id, call.status);
9013
+ * }
9014
+ */
9015
+ list(query?: VoiceListQuery, options?: RequestOptions): PaginatedPromise<VoiceCall>;
9016
+ /**
9017
+ * Fetch one call by id, at any point in its lifecycle. A call still ringing or connected carries no economics yet: `duration_ms`, `billable_ms`, `ended_at`, and `cost` are null until it ends, and this same id then answers with the settled record. Poll here to watch one known call; use voice_list to find calls in the first place. When a call was refused, `rejection_reason` names the gate that turned it away.
9018
+ *
9019
+ * @example Read one call back
9020
+ * const call = await bird.voice.get("vcl_01k0p3v9wera3v6q6xw3e9y2mh");
9021
+ * // A call still ringing or connected carries no economics yet.
9022
+ * call.status; // "answered" | "no_answer" | "ringing" | …
9023
+ */
9024
+ get(callId: string, options?: RequestOptions): APIPromise<VoiceCall>;
9025
+ }
9026
+ //#endregion
8713
9027
  //#region src/resources/verifyVerifications.gen.d.ts
8714
9028
  type VerifyVerificationsCreateParams = NonNullable<CreateVerificationData["body"]>;
8715
9029
  type VerifyVerificationsCheckParams = NonNullable<CreateVerificationCheckData["body"]>;
9030
+ type VerifyVerificationsNextChannelParams = NonNullable<CreateVerificationNextChannelData["body"]>;
8716
9031
  declare class VerifyVerificationsResource extends Resource {
8717
9032
  /**
8718
- * Start a verification: generate a one-time passcode and send it to the recipient in `to` (a phone number over SMS, an email address over email, or both; with both, it is sent over one channel and fails over to the other, not to both at once). Calling again for the same recipient reuses the in-progress verification and sends a fresh code after the resend cooldown; it does not start a second one, so use this both to send and to resend. The passcode is never returned; submit what the recipient enters with verify_verifications_check. SMS delivery draws on the workspace's SMS balance.
9033
+ * Start a verification: generate a one-time passcode and send it to the recipient in `to` (a phone number over the phone channels enabled for its destination country; an email address over email; or both). It is sent over one channel at a time and fails over to the next in the plan, never over two at once. Calling again for the same recipient reuses the in-progress verification and sends a fresh code after the resend cooldown; it does not start a second one, so use this both to send and to resend. The passcode is never returned; submit what the recipient enters with verify_verifications_check. SMS delivery draws on the workspace's SMS balance.
8719
9034
  *
8720
9035
  * @example Start a verification over SMS
8721
9036
  * const verification = await bird.verify.verifications.create({
@@ -8735,6 +9050,16 @@ declare class VerifyVerificationsResource extends Resource {
8735
9050
  * console.log(result.success);
8736
9051
  */
8737
9052
  check(params: VerifyVerificationsCheckParams, options?: RequestOptions): APIPromise<VerificationCheckResult>;
9053
+ /**
9054
+ * Advance an in-progress verification to the next channel in its plan and send a fresh passcode there: the "I didn't receive my code" action. The verification is identified by the same `to` recipient used to start it, with no verification id needed. The send bypasses the resend cooldown, and earlier passcodes stay valid. Returns the verification with `last_channel` set to the channel the new code went to; when concurrent advances race for the same recipient, the response reflects committed state: `last_channel` names the most recent completed send, and the racing call that completed the newer send is authoritative. A plan with no further channel returns a 422 named NoNextChannel, after which only re-creating the verification will resend.
9055
+ *
9056
+ * @example Send the code again on the next channel
9057
+ * const verification = await bird.verify.verifications.nextChannel({
9058
+ * to: { phone_number: "+15551234567" },
9059
+ * });
9060
+ * console.log(verification.last_channel);
9061
+ */
9062
+ nextChannel(params: VerifyVerificationsNextChannelParams, options?: RequestOptions): APIPromise<Verification>;
8738
9063
  }
8739
9064
  //#endregion
8740
9065
  //#region src/resources/verify.d.ts
@@ -8981,6 +9306,8 @@ declare class BirdClient<const O extends BirdClientOptions = BirdClientOptions>
8981
9306
  readonly smsTemplates: SmsTemplatesResource;
8982
9307
  /** The WhatsApp channel — `bird.whatsapp.send(...)`, `.get(...)`, `.list(...)`, `.listEvents(...)`. */
8983
9308
  readonly whatsapp: WhatsappResource;
9309
+ /** The Voice call log — `bird.voice.list(...)`, `.get(...)`. Calls are placed by your own SIP equipment, so this is a read surface. */
9310
+ readonly voice: VoiceResource;
8984
9311
  /** The Verify product — `bird.verify.verifications.create(...)`, `.check(...)`. */
8985
9312
  readonly verify: VerifyResource;
8986
9313
  /** Contacts — `bird.contacts.create(...)`, `.list(...)`, `.get(...)`, `.batch(...)`, … */
@@ -9097,6 +9424,26 @@ declare const EmailEventType: {
9097
9424
  };
9098
9425
  /** A known EmailEventType value. */
9099
9426
  type EmailEventTypeValue = (typeof EmailEventType)[keyof typeof EmailEventType];
9427
+ /**
9428
+ * Values of SMSErrorCode known at this SDK version. The wire value is an open
9429
+ * string: a value added by a newer server deserializes unchanged, so switch on
9430
+ * these with a `default` branch rather than treating the set as closed.
9431
+ */
9432
+ declare const SMSErrorCode: {
9433
+ readonly BlockedByCarrier: "blocked_by_carrier";
9434
+ readonly BlockedByRecipient: "blocked_by_recipient";
9435
+ readonly ContentRejected: "content_rejected";
9436
+ readonly InsufficientBalance: "insufficient_balance";
9437
+ readonly InvalidDestination: "invalid_destination";
9438
+ readonly LandlineUnreachable: "landline_unreachable";
9439
+ readonly ProviderUnavailable: "provider_unavailable";
9440
+ readonly RecipientOptedOut: "recipient_opted_out";
9441
+ readonly SenderUnregistered: "sender_unregistered";
9442
+ readonly Unknown: "unknown";
9443
+ readonly Unreachable: "unreachable";
9444
+ };
9445
+ /** A known SMSErrorCode value. */
9446
+ type SMSErrorCodeValue = (typeof SMSErrorCode)[keyof typeof SMSErrorCode];
9100
9447
  /**
9101
9448
  * Values of VerificationAttemptFailureReason known at this SDK version. The wire value is an open
9102
9449
  * string: a value added by a newer server deserializes unchanged, so switch on
@@ -9169,10 +9516,15 @@ type WhatsAppTemplateCategoryValue = (typeof WhatsAppTemplateCategory)[keyof typ
9169
9516
  * these with a `default` branch rather than treating the set as closed.
9170
9517
  */
9171
9518
  declare const WhatsAppTemplateParameterType: {
9519
+ readonly Document: "document";
9520
+ readonly Gif: "gif";
9521
+ readonly Image: "image";
9522
+ readonly Location: "location";
9172
9523
  readonly Text: "text";
9524
+ readonly Video: "video";
9173
9525
  };
9174
9526
  /** A known WhatsAppTemplateParameterType value. */
9175
9527
  type WhatsAppTemplateParameterTypeValue = (typeof WhatsAppTemplateParameterType)[keyof typeof WhatsAppTemplateParameterType];
9176
9528
  //#endregion
9177
- export { type APIPromise, type Audience, type AudienceAddContactsParams, type AudienceCreateParams, type AudienceListContactsQuery, type AudienceListQuery, type AudienceMember, type AudienceRemoveContactsParams, type AudienceUpdateParams, BirdAPIError, BirdAuthError, BirdBadRequestError, BirdBillingError, BirdClient, type BirdClientOptions, BirdConflictError, BirdConnectionError, BirdError, BirdInternalError, BirdMisdirectedError, BirdNotFoundError, BirdNotImplementedError, BirdPayloadTooLargeError, BirdPermissionError, BirdPreconditionError, BirdRateLimitError, type BirdRequest, type BirdResponse, BirdServiceUnavailableError, BirdTimeoutError, BirdValidationError, type BirdWebhookEvent, BirdWebhookVerificationError, type Contact, type ContactBatchParams, type ContactCreateParams, type ContactListQuery, type ContactProperty, type ContactPropertyCreateParams, type ContactPropertyListQuery, type ContactPropertyUpdateParams, type ContactUpdateParams, type ContactUpsertResult, type CursorPage, type DnsRecord, type Domain, type DomainCapabilities, type DomainCreateParams, type DomainDkim, type DomainListQuery, type DomainUpdateParams, type EmailChannelDefaults, EmailEventType, type EmailEventTypeValue, type EmailListQuery, type EmailMailboxLabelList, type EmailMailboxesCreateParams, type EmailMailboxesListQuery, type EmailMailboxesMessagesCreateParams, type EmailMailboxesReceiveRulesCreateParams, type EmailMailboxesReceiveRulesListQuery, type EmailMailboxesStatsQuery, type EmailMailboxesUpdateParams, type EmailMailboxesUpdateQuery, type EmailMessage, type EmailSendBatchParams, type EmailSendBatchResult, type EmailSendParams, type EmailStatsByBounceCodeQuery, type EmailStatsByBounceCodeResponse, type EmailStatsByBroadcastQuery, type EmailStatsByBroadcastResponse, type EmailStatsByCategoryQuery, type EmailStatsByCategoryResponse, type EmailStatsByClientQuery, type EmailStatsByClientResponse, type EmailStatsByComplaintTypeQuery, type EmailStatsByComplaintTypeResponse, type EmailStatsByLocationQuery, type EmailStatsByLocationResponse, type EmailStatsByMailboxProviderQuery, type EmailStatsByMailboxProviderRegionQuery, type EmailStatsByMailboxProviderRegionResponse, type EmailStatsByMailboxProviderResponse, type EmailStatsByRecipientDomainQuery, type EmailStatsByRecipientDomainResponse, type EmailStatsBySendingDomainQuery, type EmailStatsBySendingDomainResponse, type EmailStatsBySendingIpQuery, type EmailStatsBySendingIpResponse, type EmailStatsByTagQuery, type EmailStatsByTemplateQuery, type EmailStatsByTemplateResponse, type EmailStatsDailyQuery, type EmailStatsHourlyQuery, type EmailStatsResponse, type EmailStatsSummary, type EmailStatsSummaryQuery, type EmailStatsTagsResponse, type EmailThread, type EmailThreadMessage, type EmailThreadMessageAttachmentList, type EmailThreadMessageBody, type EmailThreadsDeleteQuery, type EmailThreadsListQuery, type EmailThreadsMessagesListQuery, type EmailThreadsMessagesReplyParams, type EmailThreadsUpdateParams, type ErrorDetail, type ErrorNextAction, type Mailbox, type MailboxStatsResponse, type PaginatedPromise, type RealtimeBatchPublishResult, type RealtimeChannelGetQuery, type RealtimeChannelInclude, type RealtimeChannelInfo, type RealtimeChannelListItem, type RealtimeChannelListQuery, type RealtimeChannelMember, type RealtimeChannelMembers, type RealtimeChannelsList, type RealtimeOptions, type RealtimePublishBatchParams, type RealtimePublishParams, type RealtimePublishResult, type ReceiveRule, type RequestOptions, type SafeResult, type SmsListQuery, type SmsMessage, type SmsSendBatchParams, type SmsSendBatchResult, type SmsSendParams, type SmsTemplate, type SmsTemplateList, type SmsTemplateListQuery, type UnmetGate, type Verification, VerificationAttemptFailureReason, type VerificationAttemptFailureReasonValue, VerificationChannel, type VerificationChannelValue, type VerificationCheckResult, VerificationTerminalReason, type VerificationTerminalReasonValue, type VerifyVerificationsCheckParams, type VerifyVerificationsCreateParams, WebhookEventType, type WebhookEventTypeValue, type WebhookHeaders, type WebhookOptions, WhatsAppErrorCode, type WhatsAppErrorCodeValue, type WhatsAppEventList, type WhatsAppMessage, WhatsAppTemplateCategory, type WhatsAppTemplateCategoryValue, WhatsAppTemplateParameterType, type WhatsAppTemplateParameterTypeValue, type WhatsappListEventsQuery, type WhatsappListQuery, type WhatsappSendParams, baseUrlForRegion, regionFromApiKey };
9529
+ export { type APIPromise, type Audience, type AudienceAddContactsParams, type AudienceCreateParams, type AudienceListContactsQuery, type AudienceListQuery, type AudienceMember, type AudienceRemoveContactsParams, type AudienceUpdateParams, BirdAPIError, BirdAuthError, BirdBadRequestError, BirdBillingError, BirdClient, type BirdClientOptions, BirdConflictError, BirdConnectionError, BirdError, BirdInternalError, BirdMisdirectedError, BirdNotFoundError, BirdNotImplementedError, BirdPayloadTooLargeError, BirdPermissionError, BirdPreconditionError, BirdRateLimitError, type BirdRequest, type BirdResponse, BirdServiceUnavailableError, BirdTimeoutError, BirdValidationError, type BirdWebhookEvent, BirdWebhookVerificationError, type Contact, type ContactBatchParams, type ContactCreateParams, type ContactListQuery, type ContactProperty, type ContactPropertyCreateParams, type ContactPropertyListQuery, type ContactPropertyUpdateParams, type ContactUpdateParams, type ContactUpsertResult, type CursorPage, type DnsRecord, type Domain, type DomainCapabilities, type DomainCreateParams, type DomainDkim, type DomainListQuery, type DomainUpdateParams, type EmailChannelDefaults, EmailEventType, type EmailEventTypeValue, type EmailListQuery, type EmailMailboxLabelList, type EmailMailboxesCreateParams, type EmailMailboxesListQuery, type EmailMailboxesMessagesCreateParams, type EmailMailboxesReceiveRulesCreateParams, type EmailMailboxesReceiveRulesListQuery, type EmailMailboxesStatsQuery, type EmailMailboxesUpdateParams, type EmailMailboxesUpdateQuery, type EmailMessage, type EmailSendBatchParams, type EmailSendBatchResult, type EmailSendParams, type EmailStatsByBounceCodeQuery, type EmailStatsByBounceCodeResponse, type EmailStatsByBroadcastQuery, type EmailStatsByBroadcastResponse, type EmailStatsByCategoryQuery, type EmailStatsByCategoryResponse, type EmailStatsByClientQuery, type EmailStatsByClientResponse, type EmailStatsByComplaintTypeQuery, type EmailStatsByComplaintTypeResponse, type EmailStatsByLocationQuery, type EmailStatsByLocationResponse, type EmailStatsByMailboxProviderQuery, type EmailStatsByMailboxProviderRegionQuery, type EmailStatsByMailboxProviderRegionResponse, type EmailStatsByMailboxProviderResponse, type EmailStatsByRecipientDomainQuery, type EmailStatsByRecipientDomainResponse, type EmailStatsBySendingDomainQuery, type EmailStatsBySendingDomainResponse, type EmailStatsBySendingIpQuery, type EmailStatsBySendingIpResponse, type EmailStatsByTagQuery, type EmailStatsByTemplateQuery, type EmailStatsByTemplateResponse, type EmailStatsDailyQuery, type EmailStatsHourlyQuery, type EmailStatsResponse, type EmailStatsSummary, type EmailStatsSummaryQuery, type EmailStatsTagsResponse, type EmailThread, type EmailThreadMessage, type EmailThreadMessageAttachmentList, type EmailThreadMessageBody, type EmailThreadsDeleteQuery, type EmailThreadsListQuery, type EmailThreadsMessagesListQuery, type EmailThreadsMessagesReplyParams, type EmailThreadsUpdateParams, type ErrorDetail, type ErrorNextAction, type Mailbox, type MailboxStatsResponse, type PaginatedPromise, type RealtimeBatchPublishResult, type RealtimeChannelGetQuery, type RealtimeChannelInclude, type RealtimeChannelInfo, type RealtimeChannelListItem, type RealtimeChannelListQuery, type RealtimeChannelMember, type RealtimeChannelMembers, type RealtimeChannelsList, type RealtimeOptions, type RealtimePublishBatchParams, type RealtimePublishParams, type RealtimePublishResult, type ReceiveRule, type RequestOptions, SMSErrorCode, type SMSErrorCodeValue, type SafeResult, type SmsListQuery, type SmsMessage, type SmsSendBatchParams, type SmsSendBatchResult, type SmsSendParams, type SmsTemplate, type SmsTemplateList, type SmsTemplateListQuery, type UnmetGate, type Verification, VerificationAttemptFailureReason, type VerificationAttemptFailureReasonValue, VerificationChannel, type VerificationChannelValue, type VerificationCheckResult, VerificationTerminalReason, type VerificationTerminalReasonValue, type VerifyVerificationsCheckParams, type VerifyVerificationsCreateParams, type VerifyVerificationsNextChannelParams, WebhookEventType, type WebhookEventTypeValue, type WebhookHeaders, type WebhookOptions, WhatsAppErrorCode, type WhatsAppErrorCodeValue, type WhatsAppEventList, type WhatsAppMessage, WhatsAppTemplateCategory, type WhatsAppTemplateCategoryValue, WhatsAppTemplateParameterType, type WhatsAppTemplateParameterTypeValue, type WhatsappListEventsQuery, type WhatsappListQuery, type WhatsappSendParams, baseUrlForRegion, regionFromApiKey };
9178
9530
  //# sourceMappingURL=index.d.mts.map