@messagebird/sdk 0.7.3 → 0.7.4

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
@@ -2189,6 +2189,25 @@ type AudienceContactsAddRequest = {
2189
2189
  */
2190
2190
  contact_ids: Array<ContactId>;
2191
2191
  };
2192
+ type AudienceId = string;
2193
+ /**
2194
+ * A compact reference to an audience -- its ID and display name.
2195
+ */
2196
+ type AudienceRef = {
2197
+ /**
2198
+ * Audience ID.
2199
+ */
2200
+ readonly id: AudienceId;
2201
+ /**
2202
+ * The audience's display name.
2203
+ */
2204
+ name: string;
2205
+ };
2206
+ /**
2207
+ * A channel a contact can be reached on. Open enum — `email` is present when the contact has an email address; more values (`sms`, `whatsapp`, `voice`) are added as contacts gain identifiers for other channels. Treat any unrecognized value as a future channel rather than an error. Slugs match `ChannelSlug`.
2208
+ *
2209
+ */
2210
+ type ContactChannel = string;
2192
2211
  type Contact = {
2193
2212
  /**
2194
2213
  * Contact ID.
@@ -2217,6 +2236,11 @@ type Contact = {
2217
2236
  data?: {
2218
2237
  [key: string]: unknown;
2219
2238
  };
2239
+ /**
2240
+ * Channels this contact can be reached on, derived from the identifiers it has. A contact with an email address includes `email`. More values are added as a contact gains identifiers for other channels.
2241
+ *
2242
+ */
2243
+ readonly channels?: Array<ContactChannel>;
2220
2244
  } & Timestamps;
2221
2245
  type AudienceMember = {
2222
2246
  contact: Contact;
@@ -2224,6 +2248,10 @@ type AudienceMember = {
2224
2248
  * When this contact joined the audience. Members are listed in join order, most recent first.
2225
2249
  */
2226
2250
  readonly joined_at: string;
2251
+ /**
2252
+ * The audiences this contact belongs to, including the one being listed, most-recently-joined first.
2253
+ */
2254
+ readonly audiences?: Array<AudienceRef>;
2227
2255
  };
2228
2256
  type AudienceUpdateRequest = {
2229
2257
  /**
@@ -2293,7 +2321,6 @@ type ContactProperty = {
2293
2321
  */
2294
2322
  readonly archived?: boolean;
2295
2323
  } & Timestamps;
2296
- type AudienceId = string;
2297
2324
  type Audience = {
2298
2325
  /**
2299
2326
  * Audience ID.
@@ -2904,6 +2931,10 @@ type ListAudienceContactsData = {
2904
2931
  audience_id: AudienceId;
2905
2932
  };
2906
2933
  query?: {
2934
+ /**
2935
+ * Case-insensitive substring match against the member's email address.
2936
+ */
2937
+ search?: string;
2907
2938
  /**
2908
2939
  * Maximum number of items to return per page.
2909
2940
  */
package/dist/index.mjs CHANGED
@@ -2931,9 +2931,9 @@ var BirdClient = class {
2931
2931
  this.#headers = {
2932
2932
  ...opts.defaultHeaders,
2933
2933
  Authorization: `Bearer ${opts.apiKey}`,
2934
- "User-Agent": `bird-sdk-js/0.7.3`,
2934
+ "User-Agent": `bird-sdk-js/0.7.4`,
2935
2935
  "Bird-Surface": "sdk-js",
2936
- "Bird-Version": "0.7.3"
2936
+ "Bird-Version": "0.7.4"
2937
2937
  };
2938
2938
  const caller = detectCaller();
2939
2939
  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.7.3",
3
+ "version": "0.7.4",
4
4
  "description": "Official TypeScript SDK for the Bird API.",
5
5
  "license": "MIT",
6
6
  "author": "Bird",