@trycourier/courier 4.6.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.
- package/lib/accounts/types.d.ts +7 -0
- package/lib/send/types.d.ts +12 -0
- package/package.json +1 -1
package/lib/accounts/types.d.ts
CHANGED
|
@@ -3,6 +3,13 @@ export interface IAccount {
|
|
|
3
3
|
id: string;
|
|
4
4
|
name: string;
|
|
5
5
|
parent_account_id?: string;
|
|
6
|
+
default_preferences?: {
|
|
7
|
+
items: Array<{
|
|
8
|
+
id: string;
|
|
9
|
+
status: "OPTED_IN" | "OPTED_OUT" | "REQUIRED";
|
|
10
|
+
type: "subscription_topic";
|
|
11
|
+
}>;
|
|
12
|
+
};
|
|
6
13
|
properties?: {
|
|
7
14
|
[key: string]: any;
|
|
8
15
|
};
|
package/lib/send/types.d.ts
CHANGED
|
@@ -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;
|