@messagebird/sdk 0.48.0 → 0.50.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
@@ -1057,7 +1057,7 @@ type EmailMessageSendRequest = {
1057
1057
  */
1058
1058
  attachments?: Array<EmailAttachment>;
1059
1059
  /**
1060
- * Schedule the message to send at a future time instead of immediately. Must be at least 30 seconds and at most 30 days ahead. Outside that range the request is rejected with `422`. The message returns with status `accepted` and shows as `scheduled` on reads until it sends. Cancel it before then with the message cancel endpoint. Scheduled sends count against your plan's monthly scheduled-email allowance. Exceeding it is rejected with a `422`. A scheduled message has inline content: `scheduled_at` and `template` are mutually exclusive, and combining them is rejected with a `422`. This field is accepted only on a single send. Batch items reject it.
1060
+ * Schedule the message to send at a future time instead of immediately. Must be at least 30 seconds and at most 30 days ahead. Outside that range the request is rejected with `422`. The message returns with status `accepted` and shows as `scheduled` on reads until it sends. Cancel it before then with the message cancel endpoint. Scheduled sends count against your plan's monthly scheduled-email allowance. Exceeding it is rejected with a `422`. A scheduled message has inline content: `scheduled_at` and `template` are mutually exclusive, and combining them is rejected with a `422`. Batch items take this field too, so one batch can mix scheduled and immediate messages.
1061
1061
  *
1062
1062
  */
1063
1063
  scheduled_at?: string;
package/dist/index.mjs CHANGED
@@ -1502,7 +1502,7 @@ const createEmailMessage = (options) => (options.client ?? client).post({
1502
1502
  /**
1503
1503
  * Create a batch of email messages
1504
1504
  *
1505
- * Accepts up to 100 independent email messages and queues them for delivery. All items are validated before any are queued: if one fails validation, the entire batch is rejected. Field-level validation failures and business-rule failures, such as sending from a domain that is not verified, both return `422`. None of the items can set `scheduled_at`; schedule a single message with [Create an email message](/docs/api/reference/create-email-message) instead. Suppression is evaluated per recipient after acceptance, never as a synchronous error. The `202` response returns one entry per message in submission order, each with its own `id` you can use to fetch that message or match it against webhook events. Attachments are allowed per message. Each message must stay within the 20 MB estimated generated message-size cap, and the serialized JSON request body for the whole batch has a hard 20 MB cap.
1505
+ * Accepts up to 100 independent email messages and queues them for delivery. All items are validated before any are queued: if one fails validation, the entire batch is rejected. Field-level validation failures and business-rule failures, such as sending from a domain that is not verified, both return `422`. An item can set `scheduled_at` to send it later, on the same terms as a single scheduled send, and one batch can mix scheduled and immediate messages. Cancel a scheduled item before it sends with [Cancel an email message](/docs/api/reference/cancel-email-message). Suppression is evaluated per recipient after acceptance, never as a synchronous error. The `202` response returns one entry per message in submission order, each with its own `id` you can use to fetch that message or match it against webhook events. Attachments are allowed per message. Each message must stay within the 20 MB estimated generated message-size cap, and the serialized JSON request body for the whole batch has a hard 20 MB cap.
1506
1506
  *
1507
1507
  */
1508
1508
  const createEmailMessageBatch = (options) => (options.client ?? client).post({
@@ -7927,9 +7927,9 @@ var BirdClient = class {
7927
7927
  this.#headers = {
7928
7928
  ...opts.defaultHeaders,
7929
7929
  ...opts.apiKey ? { Authorization: `Bearer ${opts.apiKey}` } : {},
7930
- "User-Agent": `bird-sdk-js/0.48.0`,
7930
+ "User-Agent": `bird-sdk-js/0.50.0`,
7931
7931
  "Bird-Surface": "sdk-js",
7932
- "Bird-Version": "0.48.0"
7932
+ "Bird-Version": "0.50.0"
7933
7933
  };
7934
7934
  const caller = detectCaller();
7935
7935
  if (caller) this.#headers["Bird-Caller"] = caller;