@trycourier/courier 4.7.0 → 4.8.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.
@@ -3,10 +3,11 @@ export interface IAccount {
3
3
  id: string;
4
4
  name: string;
5
5
  parent_account_id?: string;
6
- preferences?: {
7
- topics: Array<{
8
- defaultStatus: "OPTED_IN" | "OPTED_OUT" | "REQUIRED";
6
+ default_preferences?: {
7
+ items: Array<{
9
8
  id: string;
9
+ status: "OPTED_IN" | "OPTED_OUT" | "REQUIRED";
10
+ type: "subscription_topic";
10
11
  }>;
11
12
  };
12
13
  properties?: {
@@ -200,9 +200,15 @@ interface InvalidListRecipient {
200
200
  declare type ListRecipientType = Record<string, unknown> & {
201
201
  [key in keyof InvalidListRecipient]?: never;
202
202
  };
203
+ export interface ListFilter {
204
+ operator: "MEMBER_OF";
205
+ path: "account_id";
206
+ value: string;
207
+ }
203
208
  export interface ListRecipient extends ListRecipientType {
204
209
  list_id?: string;
205
210
  data?: MessageData;
211
+ filters?: ListFilter[];
206
212
  }
207
213
  interface InvalidListPatternRecipient {
208
214
  user_id: string;
@@ -222,9 +228,15 @@ interface InvalidUserRecipient {
222
228
  declare type UserRecipientType = Record<string, unknown> & {
223
229
  [key in keyof InvalidUserRecipient]?: never;
224
230
  };
231
+ export interface AudienceFilter {
232
+ operator: "MEMBER_OF";
233
+ path: "account_id";
234
+ value: string;
235
+ }
225
236
  export interface AudienceRecipient {
226
237
  audience_id: string;
227
238
  data?: MessageData;
239
+ filters?: AudienceFilter[];
228
240
  }
229
241
  export interface UserRecipient extends UserRecipientType {
230
242
  account_id?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trycourier/courier",
3
- "version": "4.7.0",
3
+ "version": "4.8.0",
4
4
  "description": "A node.js module for communicating with the Courier REST API.",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",