@messagebird/sdk 0.34.0 → 0.35.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
@@ -368,6 +368,8 @@ type WebhookEvent = ({
368
368
  } & EventSmsSent) | ({
369
369
  type: "sms.undelivered";
370
370
  } & EventSmsUndelivered) | ({
371
+ type: "sms_suppression.created";
372
+ } & EventSmsSuppressionCreated) | ({
371
373
  type: "verify.attempt.delivered";
372
374
  } & EventVerifyAttemptDelivered) | ({
373
375
  type: "verify.attempt.sent";
@@ -7353,6 +7355,43 @@ type EventSmsUndelivered = {
7353
7355
  timestamp: string;
7354
7356
  data: EventSmsUndeliveredData;
7355
7357
  };
7358
+ /**
7359
+ * Always `sms_suppression.created` for this event.
7360
+ */
7361
+ type SmsSuppressionCreatedEventType = "sms_suppression.created";
7362
+ /**
7363
+ * Payload of the sms_suppression.created event.
7364
+ */
7365
+ type EventSmsSuppressionCreatedData = {
7366
+ /**
7367
+ * The suppression episode that was opened.
7368
+ */
7369
+ suppression_id: SmsSuppressionId;
7370
+ /**
7371
+ * The subscriber, in E.164 format.
7372
+ */
7373
+ destination: string;
7374
+ /**
7375
+ * The sender this stops. An SMS suppression is the exact (sender, recipient) pair, so your other senders still reach this subscriber.
7376
+ */
7377
+ originator: string;
7378
+ reason: SmsSuppressionReason;
7379
+ /**
7380
+ * The workspace the suppression belongs to.
7381
+ */
7382
+ workspace_id: WorkspaceId;
7383
+ };
7384
+ /**
7385
+ * A destination was added to the workspace's SMS suppression ledger: a subscriber's STOP, a carrier opt-out, or a manual add.
7386
+ */
7387
+ type EventSmsSuppressionCreated = {
7388
+ type: SmsSuppressionCreatedEventType;
7389
+ /**
7390
+ * When the episode's opening statement took effect (`effective_at`).
7391
+ */
7392
+ timestamp: string;
7393
+ data: EventSmsSuppressionCreatedData;
7394
+ };
7356
7395
  /**
7357
7396
  * Identity fields shared by every Verify lifecycle event payload.
7358
7397
  */
@@ -13285,6 +13324,7 @@ declare const WebhookEventType: {
13285
13324
  readonly SmsReceived: "sms.received";
13286
13325
  readonly SmsRejected: "sms.rejected";
13287
13326
  readonly SmsSent: "sms.sent";
13327
+ readonly SmsSuppressionCreated: "sms_suppression.created";
13288
13328
  readonly SmsUndelivered: "sms.undelivered";
13289
13329
  readonly VerifyAttemptDelivered: "verify.attempt.delivered";
13290
13330
  readonly VerifyAttemptSent: "verify.attempt.sent";
package/dist/index.mjs CHANGED
@@ -7132,9 +7132,9 @@ var BirdClient = class {
7132
7132
  this.#headers = {
7133
7133
  ...opts.defaultHeaders,
7134
7134
  Authorization: `Bearer ${opts.apiKey}`,
7135
- "User-Agent": `bird-sdk-js/0.34.0`,
7135
+ "User-Agent": `bird-sdk-js/0.35.0`,
7136
7136
  "Bird-Surface": "sdk-js",
7137
- "Bird-Version": "0.34.0"
7137
+ "Bird-Version": "0.35.0"
7138
7138
  };
7139
7139
  const caller = detectCaller();
7140
7140
  if (caller) this.#headers["Bird-Caller"] = caller;
@@ -7265,6 +7265,7 @@ const WebhookEventType = {
7265
7265
  SmsReceived: "sms.received",
7266
7266
  SmsRejected: "sms.rejected",
7267
7267
  SmsSent: "sms.sent",
7268
+ SmsSuppressionCreated: "sms_suppression.created",
7268
7269
  SmsUndelivered: "sms.undelivered",
7269
7270
  VerifyAttemptDelivered: "verify.attempt.delivered",
7270
7271
  VerifyAttemptSent: "verify.attempt.sent",