@messagebird/sdk 0.42.0 → 0.42.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 CHANGED
@@ -1545,12 +1545,24 @@ type SmsSegments = {
1545
1545
  */
1546
1546
  readonly count: number;
1547
1547
  /**
1548
- * Encoding used for the body. The `GSM_7BIT` encoding fits 160 characters in one segment, or 153 per part in a multi-segment message. The `UCS2` encoding applies when the body contains a character outside the GSM 03.38 alphabet, including emoji, CJK, and some accented characters. It fits 70 characters in one segment, or 67 per part in a multi-segment message.
1548
+ * Encoding used for the body. The `GSM_7BIT` encoding fits 160 septets
1549
+ * (seven-bit units) in one segment, or 153 per part in a multi-segment
1550
+ * message. The `UCS2` encoding applies when the body contains a character
1551
+ * outside the GSM 03.38 alphabet, including emoji, CJK, and some accented
1552
+ * characters. It fits 70 UTF-16 code units in one segment, or 67 per part.
1553
+ *
1554
+ * Neither limit counts characters, and both alphabets have characters that
1555
+ * cost two units. Under `GSM_7BIT` there are ten such entries, and they are
1556
+ * the whole set: `^`, `{`, `}`, `\`, `[`, `]`, `~`, `|`, `€`, and the form
1557
+ * feed control. Eighty of those fill a single segment. Under `UCS2` an emoji
1558
+ * outside the Basic Multilingual Plane is a surrogate pair costing two code
1559
+ * units, so 35 of those fill a single segment.
1549
1560
  *
1550
1561
  */
1551
1562
  readonly encoding: "GSM_7BIT" | "UCS2";
1552
1563
  /**
1553
- * Character count of the body under the selected encoding.
1564
+ * Character count of the body, counted in Unicode code points under either encoding. This is not the segment measure: a `GSM_7BIT` extended-table character counts once here but costs two septets, and a `UCS2` emoji outside the Basic Multilingual Plane counts once here but costs two of the segment's 70 code units.
1565
+ *
1554
1566
  */
1555
1567
  readonly characters: number;
1556
1568
  };
@@ -8686,7 +8698,7 @@ type PublishRealtimeAppEventData = {
8686
8698
  body: RealtimePublish;
8687
8699
  headers?: {
8688
8700
  /**
8689
- * Workspace context for the request. Required for dashboard authentication; API-key requests derive the workspace from the key.
8701
+ * Workspace context for the request. Required for dashboard authentication. An API key or access token carries its own workspace, so send either that workspace or no header at all; a different one is rejected.
8690
8702
  */
8691
8703
  "X-Workspace-Id"?: string;
8692
8704
  /**
@@ -8717,7 +8729,7 @@ type PublishRealtimeAppBatchData = {
8717
8729
  body: RealtimeBatchPublish;
8718
8730
  headers?: {
8719
8731
  /**
8720
- * Workspace context for the request. Required for dashboard authentication; API-key requests derive the workspace from the key.
8732
+ * Workspace context for the request. Required for dashboard authentication. An API key or access token carries its own workspace, so send either that workspace or no header at all; a different one is rejected.
8721
8733
  */
8722
8734
  "X-Workspace-Id"?: string;
8723
8735
  /**
@@ -8748,7 +8760,7 @@ type ListRealtimeAppChannelsData = {
8748
8760
  body?: never;
8749
8761
  headers?: {
8750
8762
  /**
8751
- * Workspace context for the request. Required for dashboard authentication; API-key requests derive the workspace from the key.
8763
+ * Workspace context for the request. Required for dashboard authentication. An API key or access token carries its own workspace, so send either that workspace or no header at all; a different one is rejected.
8752
8764
  */
8753
8765
  "X-Workspace-Id"?: string;
8754
8766
  };
@@ -8774,7 +8786,7 @@ type GetRealtimeAppChannelData = {
8774
8786
  body?: never;
8775
8787
  headers?: {
8776
8788
  /**
8777
- * Workspace context for the request. Required for dashboard authentication; API-key requests derive the workspace from the key.
8789
+ * Workspace context for the request. Required for dashboard authentication. An API key or access token carries its own workspace, so send either that workspace or no header at all; a different one is rejected.
8778
8790
  */
8779
8791
  "X-Workspace-Id"?: string;
8780
8792
  };
@@ -8800,7 +8812,7 @@ type SendRealtimeAppMemberEventData = {
8800
8812
  body: RealtimeMemberPublish;
8801
8813
  headers?: {
8802
8814
  /**
8803
- * Workspace context for the request. Required for dashboard authentication; API-key requests derive the workspace from the key.
8815
+ * Workspace context for the request. Required for dashboard authentication. An API key or access token carries its own workspace, so send either that workspace or no header at all; a different one is rejected.
8804
8816
  */
8805
8817
  "X-Workspace-Id"?: string;
8806
8818
  /**
@@ -9427,7 +9439,7 @@ type ListSmsKeywordRulesData = {
9427
9439
  body?: never;
9428
9440
  headers?: {
9429
9441
  /**
9430
- * Workspace context for the request. Required for dashboard authentication; API-key requests derive the workspace from the key.
9442
+ * Workspace context for the request. Required for dashboard authentication. An API key or access token carries its own workspace, so send either that workspace or no header at all; a different one is rejected.
9431
9443
  */
9432
9444
  "X-Workspace-Id"?: string;
9433
9445
  };
@@ -9464,7 +9476,7 @@ type CreateSmsKeywordRuleData = {
9464
9476
  body: SmsKeywordRuleCreate;
9465
9477
  headers?: {
9466
9478
  /**
9467
- * Workspace context for the request. Required for dashboard authentication; API-key requests derive the workspace from the key.
9479
+ * Workspace context for the request. Required for dashboard authentication. An API key or access token carries its own workspace, so send either that workspace or no header at all; a different one is rejected.
9468
9480
  */
9469
9481
  "X-Workspace-Id"?: string;
9470
9482
  /**
@@ -9490,7 +9502,7 @@ type UpdateSmsKeywordRuleData = {
9490
9502
  body: SmsKeywordRuleUpdate;
9491
9503
  headers?: {
9492
9504
  /**
9493
- * Workspace context for the request. Required for dashboard authentication; API-key requests derive the workspace from the key.
9505
+ * Workspace context for the request. Required for dashboard authentication. An API key or access token carries its own workspace, so send either that workspace or no header at all; a different one is rejected.
9494
9506
  */
9495
9507
  "X-Workspace-Id"?: string;
9496
9508
  /**
@@ -10035,7 +10047,7 @@ type CreatePhoneNumberLookupData = {
10035
10047
  body: PhoneNumberLookupRequest;
10036
10048
  headers?: {
10037
10049
  /**
10038
- * Workspace context for the request. Required for dashboard authentication; API-key requests derive the workspace from the key.
10050
+ * Workspace context for the request. Required for dashboard authentication. An API key or access token carries its own workspace, so send either that workspace or no header at all; a different one is rejected.
10039
10051
  */
10040
10052
  "X-Workspace-Id"?: string;
10041
10053
  /**
@@ -10061,7 +10073,7 @@ type CreateEmailLookupData = {
10061
10073
  body: EmailLookupRequest;
10062
10074
  headers?: {
10063
10075
  /**
10064
- * Workspace context for the request. Required for dashboard authentication; API-key requests derive the workspace from the key.
10076
+ * Workspace context for the request. Required for dashboard authentication. An API key or access token carries its own workspace, so send either that workspace or no header at all; a different one is rejected.
10065
10077
  */
10066
10078
  "X-Workspace-Id"?: string;
10067
10079
  /**
@@ -10087,7 +10099,7 @@ type CreateVerificationData = {
10087
10099
  body: VerificationCreateRequest;
10088
10100
  headers?: {
10089
10101
  /**
10090
- * Workspace context for the request. Required for dashboard authentication; API-key requests derive the workspace from the key.
10102
+ * Workspace context for the request. Required for dashboard authentication. An API key or access token carries its own workspace, so send either that workspace or no header at all; a different one is rejected.
10091
10103
  */
10092
10104
  "X-Workspace-Id"?: string;
10093
10105
  /**
@@ -10113,7 +10125,7 @@ type CreateVerificationCheckData = {
10113
10125
  body: VerificationCheckRequest;
10114
10126
  headers?: {
10115
10127
  /**
10116
- * Workspace context for the request. Required for dashboard authentication; API-key requests derive the workspace from the key.
10128
+ * Workspace context for the request. Required for dashboard authentication. An API key or access token carries its own workspace, so send either that workspace or no header at all; a different one is rejected.
10117
10129
  */
10118
10130
  "X-Workspace-Id"?: string;
10119
10131
  /**
@@ -10139,7 +10151,7 @@ type CreateVerificationNextChannelData = {
10139
10151
  body: VerificationNextChannelRequest;
10140
10152
  headers?: {
10141
10153
  /**
10142
- * Workspace context for the request. Required for dashboard authentication; API-key requests derive the workspace from the key.
10154
+ * Workspace context for the request. Required for dashboard authentication. An API key or access token carries its own workspace, so send either that workspace or no header at all; a different one is rejected.
10143
10155
  */
10144
10156
  "X-Workspace-Id"?: string;
10145
10157
  /**
@@ -11350,7 +11362,7 @@ type ListWorkspaceNumbersData = {
11350
11362
  body?: never;
11351
11363
  headers?: {
11352
11364
  /**
11353
- * Workspace context for the request. Required for dashboard authentication; API-key requests derive the workspace from the key.
11365
+ * Workspace context for the request. Required for dashboard authentication. An API key or access token carries its own workspace, so send either that workspace or no header at all; a different one is rejected.
11354
11366
  */
11355
11367
  "X-Workspace-Id"?: string;
11356
11368
  };
@@ -11395,7 +11407,7 @@ type ListAvailableNumbersData = {
11395
11407
  body?: never;
11396
11408
  headers?: {
11397
11409
  /**
11398
- * Workspace context for the request. Required for dashboard authentication; API-key requests derive the workspace from the key.
11410
+ * Workspace context for the request. Required for dashboard authentication. An API key or access token carries its own workspace, so send either that workspace or no header at all; a different one is rejected.
11399
11411
  */
11400
11412
  "X-Workspace-Id"?: string;
11401
11413
  };
@@ -11436,7 +11448,7 @@ type ListNumbersOrdersData = {
11436
11448
  body?: never;
11437
11449
  headers?: {
11438
11450
  /**
11439
- * Workspace context for the request. Required for dashboard authentication; API-key requests derive the workspace from the key.
11451
+ * Workspace context for the request. Required for dashboard authentication. An API key or access token carries its own workspace, so send either that workspace or no header at all; a different one is rejected.
11440
11452
  */
11441
11453
  "X-Workspace-Id"?: string;
11442
11454
  };
@@ -11465,7 +11477,7 @@ type CreateNumbersOrderData = {
11465
11477
  body: NumbersOrderCreate;
11466
11478
  headers?: {
11467
11479
  /**
11468
- * Workspace context for the request. Required for dashboard authentication; API-key requests derive the workspace from the key.
11480
+ * Workspace context for the request. Required for dashboard authentication. An API key or access token carries its own workspace, so send either that workspace or no header at all; a different one is rejected.
11469
11481
  */
11470
11482
  "X-Workspace-Id"?: string;
11471
11483
  /**
package/dist/index.mjs CHANGED
@@ -7420,9 +7420,9 @@ var BirdClient = class {
7420
7420
  this.#headers = {
7421
7421
  ...opts.defaultHeaders,
7422
7422
  Authorization: `Bearer ${opts.apiKey}`,
7423
- "User-Agent": `bird-sdk-js/0.42.0`,
7423
+ "User-Agent": `bird-sdk-js/0.42.1`,
7424
7424
  "Bird-Surface": "sdk-js",
7425
- "Bird-Version": "0.42.0"
7425
+ "Bird-Version": "0.42.1"
7426
7426
  };
7427
7427
  const caller = detectCaller();
7428
7428
  if (caller) this.#headers["Bird-Caller"] = caller;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@messagebird/sdk",
3
- "version": "0.42.0",
3
+ "version": "0.42.1",
4
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",