@messagebird/sdk 0.24.0 → 0.25.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +170 -56
- package/dist/index.mjs +34 -7
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -872,9 +872,9 @@ type EventVerifyVerificationCreated = {
|
|
|
872
872
|
data: EventVerifyVerificationCreatedData;
|
|
873
873
|
};
|
|
874
874
|
/**
|
|
875
|
-
* Why a passcode send did not deliver. Open enum — new reasons may be added over time, so treat any unrecognized value as a future reason rather than an error. Emitted reasons are `carrier_rejected` (SMS), `hard_bounce` (email, permanent bounce), `soft_bounce` (email, transient bounce such as a full mailbox), `undelivered` (a generic delivery failure), `channel_unavailable` (the channel could not be used and the verification failed over),
|
|
875
|
+
* Why a passcode send did not deliver. Open enum — new reasons may be added over time, so treat any unrecognized value as a future reason rather than an error. Emitted reasons are `carrier_rejected` (SMS), `hard_bounce` (email, permanent bounce), `soft_bounce` (email, transient bounce such as a full mailbox), `undelivered` (a generic delivery failure), `channel_unavailable` (the channel could not be used and the verification failed over), `channel_disabled` (Bird has temporarily stopped sending over that channel, so the verification moved on to the next one), and `delivery_timeout` (no delivery confirmation arrived before the channel's timeout, so the verification failed over).
|
|
876
876
|
*/
|
|
877
|
-
type VerificationAttemptFailureReason$1 = "carrier_rejected" | "hard_bounce" | "soft_bounce" | "undelivered" | "channel_unavailable" | "channel_disabled" | (string & {});
|
|
877
|
+
type VerificationAttemptFailureReason$1 = "carrier_rejected" | "hard_bounce" | "soft_bounce" | "undelivered" | "channel_unavailable" | "channel_disabled" | "delivery_timeout" | (string & {});
|
|
878
878
|
/**
|
|
879
879
|
* Payload of the verify.attempt.undelivered event.
|
|
880
880
|
*/
|
|
@@ -998,10 +998,10 @@ type EventSmsUndeliveredData = EventSmsBase & {
|
|
|
998
998
|
error: SmsError;
|
|
999
999
|
};
|
|
1000
1000
|
/**
|
|
1001
|
-
* 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.
|
|
1002
1002
|
*
|
|
1003
1003
|
*/
|
|
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";
|
|
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 & {});
|
|
1005
1005
|
/**
|
|
1006
1006
|
* Failure detail for a message that could not be delivered or was rejected.
|
|
1007
1007
|
*/
|
|
@@ -1012,7 +1012,7 @@ type SmsError = {
|
|
|
1012
1012
|
*/
|
|
1013
1013
|
description: string;
|
|
1014
1014
|
/**
|
|
1015
|
-
* Raw
|
|
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.
|
|
1016
1016
|
*/
|
|
1017
1017
|
carrier_error_code?: string | null;
|
|
1018
1018
|
/**
|
|
@@ -1107,13 +1107,13 @@ type EventSmsUndelivered = {
|
|
|
1107
1107
|
*/
|
|
1108
1108
|
type EventSmsSentData = EventSmsBase & {
|
|
1109
1109
|
/**
|
|
1110
|
-
* Carrier that handled the message
|
|
1110
|
+
* Carrier that handled the message. Absent when the carrier does not report one.
|
|
1111
1111
|
*/
|
|
1112
|
-
carrier
|
|
1112
|
+
carrier?: string;
|
|
1113
1113
|
/**
|
|
1114
|
-
* Mobile country code and mobile network code of the carrier
|
|
1114
|
+
* Mobile country code and mobile network code of the carrier. Absent when the carrier does not report one.
|
|
1115
1115
|
*/
|
|
1116
|
-
mcc_mnc
|
|
1116
|
+
mcc_mnc?: string;
|
|
1117
1117
|
};
|
|
1118
1118
|
/**
|
|
1119
1119
|
* Bird handed the message to the carrier for delivery.
|
|
@@ -1152,6 +1152,65 @@ type EventSmsRejected = {
|
|
|
1152
1152
|
timestamp: string;
|
|
1153
1153
|
data: EventSmsRejectedData;
|
|
1154
1154
|
};
|
|
1155
|
+
/**
|
|
1156
|
+
* Payload of the sms.received event.
|
|
1157
|
+
*/
|
|
1158
|
+
type EventSmsReceivedData = EventSmsBase & unknown & {
|
|
1159
|
+
/**
|
|
1160
|
+
* The message body, so you can act on it without a follow-up read. Absent when the message carried only attachments and no text of its own.
|
|
1161
|
+
*
|
|
1162
|
+
*/
|
|
1163
|
+
text?: string;
|
|
1164
|
+
/**
|
|
1165
|
+
* Segment breakdown of the received body.
|
|
1166
|
+
*/
|
|
1167
|
+
segments: SmsSegments;
|
|
1168
|
+
/**
|
|
1169
|
+
* Carrier the message came in over. Absent where the carrier does not report one.
|
|
1170
|
+
*/
|
|
1171
|
+
carrier?: string;
|
|
1172
|
+
/**
|
|
1173
|
+
* Mobile country code and mobile network code of the carrier. Absent when not known.
|
|
1174
|
+
*/
|
|
1175
|
+
mcc_mnc?: string;
|
|
1176
|
+
/**
|
|
1177
|
+
* Subject line. Absent when the message carried none.
|
|
1178
|
+
*/
|
|
1179
|
+
subject?: string;
|
|
1180
|
+
};
|
|
1181
|
+
/**
|
|
1182
|
+
* Segment breakdown for the message body. Segment count drives billing.
|
|
1183
|
+
*/
|
|
1184
|
+
type SmsSegments = {
|
|
1185
|
+
/**
|
|
1186
|
+
* Number of segments the body is split into. Each segment is a billable unit.
|
|
1187
|
+
*/
|
|
1188
|
+
readonly count: number;
|
|
1189
|
+
/**
|
|
1190
|
+
* Encoding used for the body. `GSM_7BIT` fits 160 characters in a single segment (153 per part when multi-segment); `UCS2` is used when the body contains any character outside the GSM 03.38 alphabet (emoji, CJK, some accented characters) and fits 70 characters in a single segment (67 per part when multi-segment).
|
|
1191
|
+
*
|
|
1192
|
+
*/
|
|
1193
|
+
readonly encoding: "GSM_7BIT" | "UCS2";
|
|
1194
|
+
/**
|
|
1195
|
+
* Character count of the body under the selected encoding.
|
|
1196
|
+
*/
|
|
1197
|
+
readonly characters: number;
|
|
1198
|
+
};
|
|
1199
|
+
/**
|
|
1200
|
+
* Event type.
|
|
1201
|
+
*/
|
|
1202
|
+
type SmsReceivedEventType = "sms.received";
|
|
1203
|
+
/**
|
|
1204
|
+
* A message was received on one of your numbers.
|
|
1205
|
+
*/
|
|
1206
|
+
type EventSmsReceived = {
|
|
1207
|
+
type: SmsReceivedEventType;
|
|
1208
|
+
/**
|
|
1209
|
+
* Time the sender sent the message.
|
|
1210
|
+
*/
|
|
1211
|
+
timestamp: string;
|
|
1212
|
+
data: EventSmsReceivedData;
|
|
1213
|
+
};
|
|
1155
1214
|
/**
|
|
1156
1215
|
* Payload of the sms.failed event.
|
|
1157
1216
|
*/
|
|
@@ -1178,7 +1237,12 @@ type EventSmsFailed = {
|
|
|
1178
1237
|
/**
|
|
1179
1238
|
* Payload of the sms.expired event.
|
|
1180
1239
|
*/
|
|
1181
|
-
type EventSmsExpiredData = EventSmsBase
|
|
1240
|
+
type EventSmsExpiredData = EventSmsBase & {
|
|
1241
|
+
/**
|
|
1242
|
+
* 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.
|
|
1243
|
+
*/
|
|
1244
|
+
error: SmsError;
|
|
1245
|
+
};
|
|
1182
1246
|
/**
|
|
1183
1247
|
* The message's validity period elapsed before it could be delivered.
|
|
1184
1248
|
*/
|
|
@@ -1198,13 +1262,13 @@ type EventSmsExpired = {
|
|
|
1198
1262
|
*/
|
|
1199
1263
|
type EventSmsDeliveredData = EventSmsBase & {
|
|
1200
1264
|
/**
|
|
1201
|
-
* Carrier that delivered the message
|
|
1265
|
+
* Carrier that delivered the message. Absent when the carrier does not report one.
|
|
1202
1266
|
*/
|
|
1203
|
-
carrier
|
|
1267
|
+
carrier?: string;
|
|
1204
1268
|
/**
|
|
1205
|
-
* Mobile country code and mobile network code of the carrier
|
|
1269
|
+
* Mobile country code and mobile network code of the carrier. Absent when the carrier does not report one.
|
|
1206
1270
|
*/
|
|
1207
|
-
mcc_mnc
|
|
1271
|
+
mcc_mnc?: string;
|
|
1208
1272
|
};
|
|
1209
1273
|
/**
|
|
1210
1274
|
* The carrier confirmed delivery of the message to the recipient handset.
|
|
@@ -1223,7 +1287,12 @@ type EventSmsDelivered = {
|
|
|
1223
1287
|
/**
|
|
1224
1288
|
* Payload of the sms.accepted event.
|
|
1225
1289
|
*/
|
|
1226
|
-
type EventSmsAcceptedData = EventSmsBase
|
|
1290
|
+
type EventSmsAcceptedData = EventSmsBase & {
|
|
1291
|
+
/**
|
|
1292
|
+
* Segment breakdown of the body Bird accepted, which is what the send is billed on.
|
|
1293
|
+
*/
|
|
1294
|
+
segments: SmsSegments;
|
|
1295
|
+
};
|
|
1227
1296
|
/**
|
|
1228
1297
|
* Bird accepted the SMS send request and queued it for processing.
|
|
1229
1298
|
*/
|
|
@@ -2137,6 +2206,8 @@ type WebhookEvent = ({
|
|
|
2137
2206
|
} & EventSmsExpired) | ({
|
|
2138
2207
|
type: "sms.failed";
|
|
2139
2208
|
} & EventSmsFailed) | ({
|
|
2209
|
+
type: "sms.received";
|
|
2210
|
+
} & EventSmsReceived) | ({
|
|
2140
2211
|
type: "sms.rejected";
|
|
2141
2212
|
} & EventSmsRejected) | ({
|
|
2142
2213
|
type: "sms.sent";
|
|
@@ -4315,36 +4386,70 @@ type WhatsAppMessageSendRequest = {
|
|
|
4315
4386
|
};
|
|
4316
4387
|
};
|
|
4317
4388
|
/**
|
|
4318
|
-
* The
|
|
4389
|
+
* The values that fill one block of one carousel card.
|
|
4390
|
+
*/
|
|
4391
|
+
type WhatsAppMessageTemplateCardComponent = {
|
|
4392
|
+
/**
|
|
4393
|
+
* 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.
|
|
4394
|
+
*
|
|
4395
|
+
*/
|
|
4396
|
+
type: string;
|
|
4397
|
+
/**
|
|
4398
|
+
* The values that fill this part's placeholders, in placeholder order.
|
|
4399
|
+
*/
|
|
4400
|
+
parameters?: Array<WhatsAppMessageTemplateComponentParameter>;
|
|
4401
|
+
};
|
|
4402
|
+
/**
|
|
4403
|
+
* 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.
|
|
4319
4404
|
*
|
|
4320
4405
|
*/
|
|
4321
|
-
type WhatsAppTemplateParameterType$1 = "text" | (string & {});
|
|
4406
|
+
type WhatsAppTemplateParameterType$1 = "text" | "image" | "video" | "gif" | "document" | "location" | (string & {});
|
|
4322
4407
|
type WhatsAppMessageTemplateComponentParameter = {
|
|
4323
4408
|
/**
|
|
4324
|
-
* The kind of value this parameter carries
|
|
4409
|
+
* The kind of value this parameter carries, which decides which of the fields below to send.
|
|
4325
4410
|
*/
|
|
4326
4411
|
type: WhatsAppTemplateParameterType$1;
|
|
4327
4412
|
/**
|
|
4328
|
-
* The value substituted into the placeholder, as a plain string.
|
|
4413
|
+
* The value substituted into the placeholder, as a plain string. Send it on a `text` parameter.
|
|
4329
4414
|
*/
|
|
4330
|
-
text
|
|
4415
|
+
text?: string;
|
|
4416
|
+
/**
|
|
4417
|
+
* 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.
|
|
4418
|
+
*
|
|
4419
|
+
*/
|
|
4420
|
+
url?: string;
|
|
4331
4421
|
/**
|
|
4332
4422
|
* 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`.
|
|
4333
4423
|
*
|
|
4334
4424
|
*/
|
|
4335
4425
|
name?: string;
|
|
4336
4426
|
};
|
|
4427
|
+
/**
|
|
4428
|
+
* 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.
|
|
4429
|
+
*
|
|
4430
|
+
*/
|
|
4431
|
+
type WhatsAppMessageTemplateCard = {
|
|
4432
|
+
/**
|
|
4433
|
+
* The values that fill this card's blocks.
|
|
4434
|
+
*/
|
|
4435
|
+
components: Array<WhatsAppMessageTemplateCardComponent>;
|
|
4436
|
+
};
|
|
4337
4437
|
type WhatsAppMessageTemplateComponent = {
|
|
4338
4438
|
/**
|
|
4339
|
-
* Which part of the template this fills in: `body` for the main text, `button` for a button's variable, `header` for the header
|
|
4439
|
+
* 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.
|
|
4340
4440
|
*
|
|
4341
4441
|
*/
|
|
4342
4442
|
type: string;
|
|
4343
4443
|
/**
|
|
4344
|
-
* 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.
|
|
4444
|
+
* 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`.
|
|
4345
4445
|
*
|
|
4346
4446
|
*/
|
|
4347
4447
|
parameters?: Array<WhatsAppMessageTemplateComponentParameter>;
|
|
4448
|
+
/**
|
|
4449
|
+
* 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.
|
|
4450
|
+
*
|
|
4451
|
+
*/
|
|
4452
|
+
cards?: Array<WhatsAppMessageTemplateCard>;
|
|
4348
4453
|
};
|
|
4349
4454
|
/**
|
|
4350
4455
|
* A language tag in BCP-47 form, for example `en` or `pt-BR`.
|
|
@@ -4366,7 +4471,7 @@ type WhatsAppTemplateSend = unknown & {
|
|
|
4366
4471
|
*/
|
|
4367
4472
|
slug?: TemplateSlug;
|
|
4368
4473
|
/**
|
|
4369
|
-
* 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
|
|
4474
|
+
* 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.
|
|
4370
4475
|
*
|
|
4371
4476
|
*/
|
|
4372
4477
|
language?: LanguageTag;
|
|
@@ -4377,7 +4482,7 @@ type WhatsAppTemplateSend = unknown & {
|
|
|
4377
4482
|
components?: Array<WhatsAppMessageTemplateComponent>;
|
|
4378
4483
|
};
|
|
4379
4484
|
/**
|
|
4380
|
-
* 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)
|
|
4485
|
+
* 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).
|
|
4381
4486
|
*
|
|
4382
4487
|
*/
|
|
4383
4488
|
type WhatsAppMessageStatus = "scheduled" | "accepted" | "sent" | "delivered" | "failed" | "rejected" | "canceled" | "received";
|
|
@@ -4453,7 +4558,7 @@ type WhatsAppMessage = {
|
|
|
4453
4558
|
*/
|
|
4454
4559
|
readonly read_at?: string | null;
|
|
4455
4560
|
/**
|
|
4456
|
-
* What the message cost, split into Bird's charge and any third-party fees passed through. Null
|
|
4561
|
+
* 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.
|
|
4457
4562
|
*/
|
|
4458
4563
|
readonly cost?: MessageCost;
|
|
4459
4564
|
/**
|
|
@@ -4573,7 +4678,7 @@ type SmsTemplateVersionId = string;
|
|
|
4573
4678
|
*/
|
|
4574
4679
|
type TemplateVariable = {
|
|
4575
4680
|
/**
|
|
4576
|
-
* The
|
|
4681
|
+
* The parameter key this slot is filled with.
|
|
4577
4682
|
*/
|
|
4578
4683
|
readonly key: string;
|
|
4579
4684
|
/**
|
|
@@ -4582,7 +4687,7 @@ type TemplateVariable = {
|
|
|
4582
4687
|
*/
|
|
4583
4688
|
readonly type: string;
|
|
4584
4689
|
/**
|
|
4585
|
-
* Whether the slot must be supplied when sending.
|
|
4690
|
+
* Whether the slot must be supplied when sending. A send that leaves a required slot unset is rejected.
|
|
4586
4691
|
*
|
|
4587
4692
|
*/
|
|
4588
4693
|
readonly required: boolean;
|
|
@@ -4687,24 +4792,6 @@ type SmsBatchSummary = {
|
|
|
4687
4792
|
*/
|
|
4688
4793
|
accepted_count: number;
|
|
4689
4794
|
};
|
|
4690
|
-
/**
|
|
4691
|
-
* Segment breakdown for the message body. Segment count drives billing.
|
|
4692
|
-
*/
|
|
4693
|
-
type SmsSegments = {
|
|
4694
|
-
/**
|
|
4695
|
-
* Number of segments the body is split into. Each segment is a billable unit.
|
|
4696
|
-
*/
|
|
4697
|
-
readonly count: number;
|
|
4698
|
-
/**
|
|
4699
|
-
* Encoding used for the body. `GSM_7BIT` fits 160 characters in a single segment (153 per part when multi-segment); `UCS2` is used when the body contains any character outside the GSM 03.38 alphabet (emoji, CJK, some accented characters) and fits 70 characters in a single segment (67 per part when multi-segment).
|
|
4700
|
-
*
|
|
4701
|
-
*/
|
|
4702
|
-
readonly encoding: "GSM_7BIT" | "UCS2";
|
|
4703
|
-
/**
|
|
4704
|
-
* Character count of the body under the selected encoding.
|
|
4705
|
-
*/
|
|
4706
|
-
readonly characters: number;
|
|
4707
|
-
};
|
|
4708
4795
|
/**
|
|
4709
4796
|
* Delivery status. `accepted` (the initial status of an outbound send) means Bird accepted the request and it is awaiting handoff to the carrier network. `sent` means it was handed to the carrier and is awaiting a delivery receipt. `delivered` is confirmed delivery. `undelivered` is a non-permanent non-delivery (handset off or unreachable). `failed` is a terminal permanent failure. `rejected` means Bird refused it before it reached the carrier (for example insufficient balance). `expired` means the validity period elapsed without a terminal receipt. `scheduled` means the message is queued to send at a future time and has not been dispatched yet, and `canceled` means a scheduled message was canceled before it was sent. `received` applies to inbound messages.
|
|
4710
4797
|
*
|
|
@@ -4771,7 +4858,7 @@ type SmsMessage = {
|
|
|
4771
4858
|
*/
|
|
4772
4859
|
readonly mcc_mnc?: string;
|
|
4773
4860
|
/**
|
|
4774
|
-
* Failure detail on a
|
|
4861
|
+
* Failure detail on a message that failed, was rejected, was not delivered, or expired. Absent otherwise.
|
|
4775
4862
|
*/
|
|
4776
4863
|
last_error?: SmsError;
|
|
4777
4864
|
/**
|
|
@@ -4947,11 +5034,11 @@ type Contact = {
|
|
|
4947
5034
|
*/
|
|
4948
5035
|
phone: string | null;
|
|
4949
5036
|
/**
|
|
4950
|
-
* The contact's first name. Available in broadcast templates as
|
|
5037
|
+
* The contact's first name. Available in broadcast templates as `bird.contact.first_name`.
|
|
4951
5038
|
*/
|
|
4952
5039
|
first_name?: string | null;
|
|
4953
5040
|
/**
|
|
4954
|
-
* The contact's last name. Available in broadcast templates as
|
|
5041
|
+
* The contact's last name. Available in broadcast templates as `bird.contact.last_name`.
|
|
4955
5042
|
*/
|
|
4956
5043
|
last_name?: string | null;
|
|
4957
5044
|
/**
|
|
@@ -4959,7 +5046,7 @@ type Contact = {
|
|
|
4959
5046
|
*/
|
|
4960
5047
|
external_id?: string | null;
|
|
4961
5048
|
/**
|
|
4962
|
-
* Custom property values for this contact, available
|
|
5049
|
+
* 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.
|
|
4963
5050
|
*
|
|
4964
5051
|
*/
|
|
4965
5052
|
data?: {
|
|
@@ -5014,7 +5101,7 @@ type ContactPropertyUpdateRequest = {
|
|
|
5014
5101
|
};
|
|
5015
5102
|
type ContactPropertyCreateRequest = {
|
|
5016
5103
|
/**
|
|
5017
|
-
* The property key, used as the key in contact data and as the
|
|
5104
|
+
* 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.
|
|
5018
5105
|
*/
|
|
5019
5106
|
key: string;
|
|
5020
5107
|
type: ContactPropertyType;
|
|
@@ -5037,7 +5124,7 @@ type ContactProperty = {
|
|
|
5037
5124
|
*/
|
|
5038
5125
|
readonly id: ContactPropertyId;
|
|
5039
5126
|
/**
|
|
5040
|
-
* The property key, used as the key in contact data and as the
|
|
5127
|
+
* 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.
|
|
5041
5128
|
*/
|
|
5042
5129
|
key: string;
|
|
5043
5130
|
type: ContactPropertyType;
|
|
@@ -5276,7 +5363,7 @@ type EmailTemplateSend = unknown & {
|
|
|
5276
5363
|
*/
|
|
5277
5364
|
language?: LanguageTag;
|
|
5278
5365
|
/**
|
|
5279
|
-
* Values for the template's
|
|
5366
|
+
* 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.
|
|
5280
5367
|
*
|
|
5281
5368
|
*/
|
|
5282
5369
|
parameters?: {
|
|
@@ -5337,7 +5424,7 @@ type EmailMessageSendRequest = {
|
|
|
5337
5424
|
[key: string]: unknown;
|
|
5338
5425
|
};
|
|
5339
5426
|
/**
|
|
5340
|
-
*
|
|
5427
|
+
* 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.
|
|
5341
5428
|
*
|
|
5342
5429
|
*/
|
|
5343
5430
|
parameters?: {
|
|
@@ -7587,7 +7674,7 @@ type ListVoiceCallsData = {
|
|
|
7587
7674
|
*/
|
|
7588
7675
|
direction?: VoiceCallDirection;
|
|
7589
7676
|
/**
|
|
7590
|
-
* Return only calls with one of these statuses, comma-separated.
|
|
7677
|
+
* Return only calls with one of these statuses, comma-separated. In-flight and final statuses may be combined freely.
|
|
7591
7678
|
*
|
|
7592
7679
|
*/
|
|
7593
7680
|
status?: Array<VoiceCallStatus>;
|
|
@@ -8966,7 +9053,7 @@ declare class WhatsappResource extends WhatsappResourceBase {
|
|
|
8966
9053
|
type VoiceListQuery = NonNullable<ListVoiceCallsData["query"]>;
|
|
8967
9054
|
declare class VoiceResource extends Resource {
|
|
8968
9055
|
/**
|
|
8969
|
-
* List the workspace's calls, newest first. Filter to `ringing`/`in_progress` for the calls in progress right now,
|
|
9056
|
+
* 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.
|
|
8970
9057
|
*
|
|
8971
9058
|
* @example Iterate the calls happening right now
|
|
8972
9059
|
* for await (const call of bird.voice.list({ status: ["ringing", "in_progress"] })) {
|
|
@@ -9340,6 +9427,7 @@ declare const WebhookEventType: {
|
|
|
9340
9427
|
readonly SmsDelivered: "sms.delivered";
|
|
9341
9428
|
readonly SmsExpired: "sms.expired";
|
|
9342
9429
|
readonly SmsFailed: "sms.failed";
|
|
9430
|
+
readonly SmsReceived: "sms.received";
|
|
9343
9431
|
readonly SmsRejected: "sms.rejected";
|
|
9344
9432
|
readonly SmsSent: "sms.sent";
|
|
9345
9433
|
readonly SmsUndelivered: "sms.undelivered";
|
|
@@ -9385,6 +9473,26 @@ declare const EmailEventType: {
|
|
|
9385
9473
|
};
|
|
9386
9474
|
/** A known EmailEventType value. */
|
|
9387
9475
|
type EmailEventTypeValue = (typeof EmailEventType)[keyof typeof EmailEventType];
|
|
9476
|
+
/**
|
|
9477
|
+
* Values of SMSErrorCode known at this SDK version. The wire value is an open
|
|
9478
|
+
* string: a value added by a newer server deserializes unchanged, so switch on
|
|
9479
|
+
* these with a `default` branch rather than treating the set as closed.
|
|
9480
|
+
*/
|
|
9481
|
+
declare const SMSErrorCode: {
|
|
9482
|
+
readonly BlockedByCarrier: "blocked_by_carrier";
|
|
9483
|
+
readonly BlockedByRecipient: "blocked_by_recipient";
|
|
9484
|
+
readonly ContentRejected: "content_rejected";
|
|
9485
|
+
readonly InsufficientBalance: "insufficient_balance";
|
|
9486
|
+
readonly InvalidDestination: "invalid_destination";
|
|
9487
|
+
readonly LandlineUnreachable: "landline_unreachable";
|
|
9488
|
+
readonly ProviderUnavailable: "provider_unavailable";
|
|
9489
|
+
readonly RecipientOptedOut: "recipient_opted_out";
|
|
9490
|
+
readonly SenderUnregistered: "sender_unregistered";
|
|
9491
|
+
readonly Unknown: "unknown";
|
|
9492
|
+
readonly Unreachable: "unreachable";
|
|
9493
|
+
};
|
|
9494
|
+
/** A known SMSErrorCode value. */
|
|
9495
|
+
type SMSErrorCodeValue = (typeof SMSErrorCode)[keyof typeof SMSErrorCode];
|
|
9388
9496
|
/**
|
|
9389
9497
|
* Values of VerificationAttemptFailureReason known at this SDK version. The wire value is an open
|
|
9390
9498
|
* string: a value added by a newer server deserializes unchanged, so switch on
|
|
@@ -9394,6 +9502,7 @@ declare const VerificationAttemptFailureReason: {
|
|
|
9394
9502
|
readonly CarrierRejected: "carrier_rejected";
|
|
9395
9503
|
readonly ChannelDisabled: "channel_disabled";
|
|
9396
9504
|
readonly ChannelUnavailable: "channel_unavailable";
|
|
9505
|
+
readonly DeliveryTimeout: "delivery_timeout";
|
|
9397
9506
|
readonly HardBounce: "hard_bounce";
|
|
9398
9507
|
readonly SoftBounce: "soft_bounce";
|
|
9399
9508
|
readonly Undelivered: "undelivered";
|
|
@@ -9457,10 +9566,15 @@ type WhatsAppTemplateCategoryValue = (typeof WhatsAppTemplateCategory)[keyof typ
|
|
|
9457
9566
|
* these with a `default` branch rather than treating the set as closed.
|
|
9458
9567
|
*/
|
|
9459
9568
|
declare const WhatsAppTemplateParameterType: {
|
|
9569
|
+
readonly Document: "document";
|
|
9570
|
+
readonly Gif: "gif";
|
|
9571
|
+
readonly Image: "image";
|
|
9572
|
+
readonly Location: "location";
|
|
9460
9573
|
readonly Text: "text";
|
|
9574
|
+
readonly Video: "video";
|
|
9461
9575
|
};
|
|
9462
9576
|
/** A known WhatsAppTemplateParameterType value. */
|
|
9463
9577
|
type WhatsAppTemplateParameterTypeValue = (typeof WhatsAppTemplateParameterType)[keyof typeof WhatsAppTemplateParameterType];
|
|
9464
9578
|
//#endregion
|
|
9465
|
-
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, 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 };
|
|
9579
|
+
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 };
|
|
9466
9580
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.mjs
CHANGED
|
@@ -3189,9 +3189,9 @@ const listMailboxLabels = (options) => (options.client ?? client).get({
|
|
|
3189
3189
|
*
|
|
3190
3190
|
* Returns a paginated list of the workspace's calls, ordered by start time descending.
|
|
3191
3191
|
*
|
|
3192
|
-
* The `status` filter selects
|
|
3192
|
+
* The `status` filter selects where in the lifecycle you look, and any combination is a single page: in-flight statuses (`ringing`, `in_progress`), final ones, or both together. Omit it and you get completed calls, which is what this list has always returned.
|
|
3193
3193
|
*
|
|
3194
|
-
*
|
|
3194
|
+
* A call in flight carries no economics yet: `duration_ms`, `billable_ms`, `ended_at`, and `cost` are null until it ends. It keeps the same `id` throughout, so the same call answers under one identity from the first ring to settlement.
|
|
3195
3195
|
*
|
|
3196
3196
|
*/
|
|
3197
3197
|
const listVoiceCalls = (options) => (options?.client ?? client).get({
|
|
@@ -4841,7 +4841,7 @@ var WhatsappResource = class extends WhatsappResourceBase {
|
|
|
4841
4841
|
//#region src/resources/voice.gen.ts
|
|
4842
4842
|
var VoiceResource = class extends Resource {
|
|
4843
4843
|
/**
|
|
4844
|
-
* List the workspace's calls, newest first. Filter to `ringing`/`in_progress` for the calls in progress right now,
|
|
4844
|
+
* 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.
|
|
4845
4845
|
*
|
|
4846
4846
|
* @example Iterate the calls happening right now
|
|
4847
4847
|
* for await (const call of bird.voice.list({ status: ["ringing", "in_progress"] })) {
|
|
@@ -5238,9 +5238,9 @@ var BirdClient = class {
|
|
|
5238
5238
|
this.#headers = {
|
|
5239
5239
|
...opts.defaultHeaders,
|
|
5240
5240
|
Authorization: `Bearer ${opts.apiKey}`,
|
|
5241
|
-
"User-Agent": `bird-sdk-js/0.
|
|
5241
|
+
"User-Agent": `bird-sdk-js/0.25.1`,
|
|
5242
5242
|
"Bird-Surface": "sdk-js",
|
|
5243
|
-
"Bird-Version": "0.
|
|
5243
|
+
"Bird-Version": "0.25.1"
|
|
5244
5244
|
};
|
|
5245
5245
|
const caller = detectCaller();
|
|
5246
5246
|
if (caller) this.#headers["Bird-Caller"] = caller;
|
|
@@ -5364,6 +5364,7 @@ const WebhookEventType = {
|
|
|
5364
5364
|
SmsDelivered: "sms.delivered",
|
|
5365
5365
|
SmsExpired: "sms.expired",
|
|
5366
5366
|
SmsFailed: "sms.failed",
|
|
5367
|
+
SmsReceived: "sms.received",
|
|
5367
5368
|
SmsRejected: "sms.rejected",
|
|
5368
5369
|
SmsSent: "sms.sent",
|
|
5369
5370
|
SmsUndelivered: "sms.undelivered",
|
|
@@ -5406,6 +5407,24 @@ const EmailEventType = {
|
|
|
5406
5407
|
EmailUnsubscribed: "email.unsubscribed"
|
|
5407
5408
|
};
|
|
5408
5409
|
/**
|
|
5410
|
+
* Values of SMSErrorCode known at this SDK version. The wire value is an open
|
|
5411
|
+
* string: a value added by a newer server deserializes unchanged, so switch on
|
|
5412
|
+
* these with a `default` branch rather than treating the set as closed.
|
|
5413
|
+
*/
|
|
5414
|
+
const SMSErrorCode = {
|
|
5415
|
+
BlockedByCarrier: "blocked_by_carrier",
|
|
5416
|
+
BlockedByRecipient: "blocked_by_recipient",
|
|
5417
|
+
ContentRejected: "content_rejected",
|
|
5418
|
+
InsufficientBalance: "insufficient_balance",
|
|
5419
|
+
InvalidDestination: "invalid_destination",
|
|
5420
|
+
LandlineUnreachable: "landline_unreachable",
|
|
5421
|
+
ProviderUnavailable: "provider_unavailable",
|
|
5422
|
+
RecipientOptedOut: "recipient_opted_out",
|
|
5423
|
+
SenderUnregistered: "sender_unregistered",
|
|
5424
|
+
Unknown: "unknown",
|
|
5425
|
+
Unreachable: "unreachable"
|
|
5426
|
+
};
|
|
5427
|
+
/**
|
|
5409
5428
|
* Values of VerificationAttemptFailureReason known at this SDK version. The wire value is an open
|
|
5410
5429
|
* string: a value added by a newer server deserializes unchanged, so switch on
|
|
5411
5430
|
* these with a `default` branch rather than treating the set as closed.
|
|
@@ -5414,6 +5433,7 @@ const VerificationAttemptFailureReason = {
|
|
|
5414
5433
|
CarrierRejected: "carrier_rejected",
|
|
5415
5434
|
ChannelDisabled: "channel_disabled",
|
|
5416
5435
|
ChannelUnavailable: "channel_unavailable",
|
|
5436
|
+
DeliveryTimeout: "delivery_timeout",
|
|
5417
5437
|
HardBounce: "hard_bounce",
|
|
5418
5438
|
SoftBounce: "soft_bounce",
|
|
5419
5439
|
Undelivered: "undelivered"
|
|
@@ -5466,8 +5486,15 @@ const WhatsAppTemplateCategory = {
|
|
|
5466
5486
|
* string: a value added by a newer server deserializes unchanged, so switch on
|
|
5467
5487
|
* these with a `default` branch rather than treating the set as closed.
|
|
5468
5488
|
*/
|
|
5469
|
-
const WhatsAppTemplateParameterType = {
|
|
5489
|
+
const WhatsAppTemplateParameterType = {
|
|
5490
|
+
Document: "document",
|
|
5491
|
+
Gif: "gif",
|
|
5492
|
+
Image: "image",
|
|
5493
|
+
Location: "location",
|
|
5494
|
+
Text: "text",
|
|
5495
|
+
Video: "video"
|
|
5496
|
+
};
|
|
5470
5497
|
//#endregion
|
|
5471
|
-
export { BirdAPIError, BirdAuthError, BirdBadRequestError, BirdBillingError, BirdClient, BirdConflictError, BirdConnectionError, BirdError, BirdInternalError, BirdMisdirectedError, BirdNotFoundError, BirdNotImplementedError, BirdPayloadTooLargeError, BirdPermissionError, BirdPreconditionError, BirdRateLimitError, BirdServiceUnavailableError, BirdTimeoutError, BirdValidationError, BirdWebhookVerificationError, EmailEventType, VerificationAttemptFailureReason, VerificationChannel, VerificationTerminalReason, WebhookEventType, WhatsAppErrorCode, WhatsAppTemplateCategory, WhatsAppTemplateParameterType, baseUrlForRegion, regionFromApiKey };
|
|
5498
|
+
export { BirdAPIError, BirdAuthError, BirdBadRequestError, BirdBillingError, BirdClient, BirdConflictError, BirdConnectionError, BirdError, BirdInternalError, BirdMisdirectedError, BirdNotFoundError, BirdNotImplementedError, BirdPayloadTooLargeError, BirdPermissionError, BirdPreconditionError, BirdRateLimitError, BirdServiceUnavailableError, BirdTimeoutError, BirdValidationError, BirdWebhookVerificationError, EmailEventType, SMSErrorCode, VerificationAttemptFailureReason, VerificationChannel, VerificationTerminalReason, WebhookEventType, WhatsAppErrorCode, WhatsAppTemplateCategory, WhatsAppTemplateParameterType, baseUrlForRegion, regionFromApiKey };
|
|
5472
5499
|
|
|
5473
5500
|
//# sourceMappingURL=index.mjs.map
|