@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # @messagebird/sdk
2
2
 
3
- The official TypeScript SDK for the [Bird](https://bird.com) API fully typed, edge-ready, ESM.
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
- * Per-component cost breakdown. Returned on single-message reads; omitted from list rows.
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 SmsCostBreakdown = {
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
- * Carrier surcharge component as a decimal string (for example US 10DLC fees). `0.0000` when none applies.
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
- carrier_surcharge: string;
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 for the cost amount. Omitted when the cost is not denominated in a currency (for example a zero-priced internal send).
4521
+ * ISO 4217 currency code. Every component is denominated in this currency.
4537
4522
  */
4538
- readonly currency_code?: CurrencyCode;
4523
+ readonly currency_code: CurrencyCode;
4539
4524
  /**
4540
- * Total cost as a decimal string: the per-segment rate multiplied by the segment count, plus any surcharges.
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 amount: string;
4528
+ readonly transaction_amount: string | null;
4543
4529
  /**
4544
- * Per-component cost breakdown. Returned on single-message reads; omitted from list rows.
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
- breakdown?: SmsCostBreakdown;
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
- * Cost of the message. Null until the message has been priced.
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?: SmsCost;
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.22.0`,
5112
+ "User-Agent": `bird-sdk-js/0.23.0`,
5113
5113
  "Bird-Surface": "sdk-js",
5114
- "Bird-Version": "0.22.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.22.0",
4
- "description": "Official TypeScript SDK for the Bird API.",
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
- "email",
14
- "webhooks",
13
+ "api",
15
14
  "sdk",
16
- "api"
15
+ "email",
16
+ "sms",
17
+ "whatsapp",
18
+ "verify",
19
+ "realtime",
20
+ "webhooks"
17
21
  ],
18
22
  "repository": {
19
23
  "type": "git",