@messagebird/sdk 0.21.2 → 0.22.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
@@ -6277,6 +6277,10 @@ type ListWhatsAppMessagesData = {
6277
6277
  * Filter by business-scoped user ID (Meta identifier).
6278
6278
  */
6279
6279
  bsuid?: string;
6280
+ /**
6281
+ * Filter by category.
6282
+ */
6283
+ category?: WhatsAppTemplateCategory$1;
6280
6284
  /**
6281
6285
  * Filter by tag. Accepts `name` to match any message carrying that tag name, or `name:value` to match a specific tag pair (e.g. `category:welcome`). Repeat the parameter to AND-combine several tag filters.
6282
6286
  *
@@ -8676,7 +8680,7 @@ declare class WhatsappResourceBase extends Resource {
8676
8680
  */
8677
8681
  get(messageId: string, options?: RequestOptions): APIPromise<WhatsAppMessage>;
8678
8682
  /**
8679
- * List WhatsApp messages, newest first, as a cursor page ({data, next_cursor, …}). Pass next_cursor back as starting_after to fetch the next page. Filter by direction, status, contact phone number, bsuid, or tag. Use whatsapp_get for one message's current state.
8683
+ * List WhatsApp messages, newest first, as a cursor page ({data, next_cursor, …}). Pass next_cursor back as starting_after to fetch the next page. Filter by direction, status, contact phone number, bsuid, template category, or tag. Use whatsapp_get for one message's current state.
8680
8684
  *
8681
8685
  * @example Iterate delivered messages
8682
8686
  * for await (const msg of bird.whatsapp.list({ status: ["delivered"] })) {
package/dist/index.mjs CHANGED
@@ -2140,7 +2140,7 @@ const createVerificationCheck = (options) => (options.client ?? client).post({
2140
2140
  /**
2141
2141
  * List WhatsApp messages
2142
2142
  *
2143
- * Returns the workspace's WhatsApp messages as a cursor-paginated list, newest first. Filter by direction, status, contact phone number, business-scoped user ID, tag, or creation time; pass the response's `next_cursor` back as `starting_after` to fetch the next page. To follow a single message's delivery, use [Get a WhatsApp message](/docs/api/reference/get-whats-app-message) instead.
2143
+ * Returns the workspace's WhatsApp messages as a cursor-paginated list, newest first. Filter by direction, status, contact phone number, business-scoped user ID, template category, tag, or creation time; pass the response's `next_cursor` back as `starting_after` to fetch the next page. To follow a single message's delivery, use [Get a WhatsApp message](/docs/api/reference/get-whats-app-message) instead.
2144
2144
  *
2145
2145
  */
2146
2146
  const listWhatsAppMessages = (options) => (options?.client ?? client).get({
@@ -4701,7 +4701,7 @@ var WhatsappResourceBase = class extends Resource {
4701
4701
  }));
4702
4702
  }
4703
4703
  /**
4704
- * List WhatsApp messages, newest first, as a cursor page ({data, next_cursor, …}). Pass next_cursor back as starting_after to fetch the next page. Filter by direction, status, contact phone number, bsuid, or tag. Use whatsapp_get for one message's current state.
4704
+ * List WhatsApp messages, newest first, as a cursor page ({data, next_cursor, …}). Pass next_cursor back as starting_after to fetch the next page. Filter by direction, status, contact phone number, bsuid, template category, or tag. Use whatsapp_get for one message's current state.
4705
4705
  *
4706
4706
  * @example Iterate delivered messages
4707
4707
  * for await (const msg of bird.whatsapp.list({ status: ["delivered"] })) {
@@ -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.21.2`,
5112
+ "User-Agent": `bird-sdk-js/0.22.0`,
5113
5113
  "Bird-Surface": "sdk-js",
5114
- "Bird-Version": "0.21.2"
5114
+ "Bird-Version": "0.22.0"
5115
5115
  };
5116
5116
  const caller = detectCaller();
5117
5117
  if (caller) this.#headers["Bird-Caller"] = caller;