@messagebird/sdk 0.22.0 → 0.23.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/README.md +1 -1
- package/dist/index.d.mts +16 -29
- package/dist/index.mjs +2 -2
- package/package.json +9 -5
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @messagebird/sdk
|
|
2
2
|
|
|
3
|
-
The official TypeScript SDK for the [Bird](https://bird.com) API
|
|
3
|
+
The official TypeScript SDK for the [Bird](https://bird.com) API: email, SMS, WhatsApp, verification, and Realtime, over one typed client. Fully typed, edge-ready, ESM.
|
|
4
4
|
|
|
5
5
|
📚 **Documentation:** https://bird.com/docs/sdks/typescript
|
|
6
6
|
|
package/dist/index.d.mts
CHANGED
|
@@ -4508,42 +4508,29 @@ type SmsBatchSummary = {
|
|
|
4508
4508
|
accepted_count: number;
|
|
4509
4509
|
};
|
|
4510
4510
|
/**
|
|
4511
|
-
*
|
|
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
|
+
*
|
|
4512
4513
|
*/
|
|
4513
|
-
type
|
|
4514
|
-
/**
|
|
4515
|
-
* Per-segment price as a decimal string.
|
|
4516
|
-
*/
|
|
4517
|
-
per_segment: string;
|
|
4518
|
-
/**
|
|
4519
|
-
* Number of billable segments.
|
|
4520
|
-
*/
|
|
4521
|
-
segments: number;
|
|
4522
|
-
/**
|
|
4523
|
-
* ISO 3166-1 alpha-2 destination country the price was resolved for.
|
|
4524
|
-
*/
|
|
4525
|
-
country_code: string;
|
|
4514
|
+
type MessageCost = {
|
|
4526
4515
|
/**
|
|
4527
|
-
*
|
|
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
|
+
*
|
|
4528
4518
|
*/
|
|
4529
|
-
|
|
4530
|
-
};
|
|
4531
|
-
/**
|
|
4532
|
-
* Cost of the message. Null until the message has been priced; the cost is populated as the message is processed, not at the moment it is accepted.
|
|
4533
|
-
*/
|
|
4534
|
-
type SmsCost = {
|
|
4519
|
+
readonly amount: string;
|
|
4535
4520
|
/**
|
|
4536
|
-
* ISO 4217 currency code
|
|
4521
|
+
* ISO 4217 currency code. Every component is denominated in this currency.
|
|
4537
4522
|
*/
|
|
4538
|
-
readonly currency_code
|
|
4523
|
+
readonly currency_code: CurrencyCode;
|
|
4539
4524
|
/**
|
|
4540
|
-
*
|
|
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
|
+
*
|
|
4541
4527
|
*/
|
|
4542
|
-
readonly
|
|
4528
|
+
readonly transaction_amount: string | null;
|
|
4543
4529
|
/**
|
|
4544
|
-
*
|
|
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
|
+
*
|
|
4545
4532
|
*/
|
|
4546
|
-
|
|
4533
|
+
readonly passthrough_amount: string | null;
|
|
4547
4534
|
} | null;
|
|
4548
4535
|
/**
|
|
4549
4536
|
* Segment breakdown for the message body. Segment count drives billing.
|
|
@@ -4601,9 +4588,9 @@ type SmsMessage = {
|
|
|
4601
4588
|
*/
|
|
4602
4589
|
segments: SmsSegments;
|
|
4603
4590
|
/**
|
|
4604
|
-
*
|
|
4591
|
+
* What the message cost, split into Bird's charge and any third-party fees passed through. Null until the message has been priced.
|
|
4605
4592
|
*/
|
|
4606
|
-
cost?:
|
|
4593
|
+
cost?: MessageCost;
|
|
4607
4594
|
/**
|
|
4608
4595
|
* Structured `{name, value}` filter labels applied to this message.
|
|
4609
4596
|
*/
|
package/dist/index.mjs
CHANGED
|
@@ -5109,9 +5109,9 @@ var BirdClient = class {
|
|
|
5109
5109
|
this.#headers = {
|
|
5110
5110
|
...opts.defaultHeaders,
|
|
5111
5111
|
Authorization: `Bearer ${opts.apiKey}`,
|
|
5112
|
-
"User-Agent": `bird-sdk-js/0.
|
|
5112
|
+
"User-Agent": `bird-sdk-js/0.23.0`,
|
|
5113
5113
|
"Bird-Surface": "sdk-js",
|
|
5114
|
-
"Bird-Version": "0.
|
|
5114
|
+
"Bird-Version": "0.23.0"
|
|
5115
5115
|
};
|
|
5116
5116
|
const caller = detectCaller();
|
|
5117
5117
|
if (caller) this.#headers["Bird-Caller"] = caller;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@messagebird/sdk",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.23.0",
|
|
4
|
+
"description": "The official TypeScript SDK for the Bird API: email, SMS, WhatsApp, verification, and Realtime on one typed client.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Bird",
|
|
7
7
|
"homepage": "https://bird.com/docs/sdks/typescript",
|
|
@@ -10,10 +10,14 @@
|
|
|
10
10
|
},
|
|
11
11
|
"keywords": [
|
|
12
12
|
"bird",
|
|
13
|
-
"
|
|
14
|
-
"webhooks",
|
|
13
|
+
"api",
|
|
15
14
|
"sdk",
|
|
16
|
-
"
|
|
15
|
+
"email",
|
|
16
|
+
"sms",
|
|
17
|
+
"whatsapp",
|
|
18
|
+
"verify",
|
|
19
|
+
"realtime",
|
|
20
|
+
"webhooks"
|
|
17
21
|
],
|
|
18
22
|
"repository": {
|
|
19
23
|
"type": "git",
|