@knocklabs/node 1.20.0 → 1.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/CHANGELOG.md +28 -0
- package/client.d.mts +7 -1
- package/client.d.mts.map +1 -1
- package/client.d.ts +7 -1
- package/client.d.ts.map +1 -1
- package/client.js +6 -1
- package/client.js.map +1 -1
- package/client.mjs +6 -1
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/messages/messages.d.mts +38 -1
- package/resources/messages/messages.d.mts.map +1 -1
- package/resources/messages/messages.d.ts +38 -1
- package/resources/messages/messages.d.ts.map +1 -1
- package/resources/messages/messages.js.map +1 -1
- package/resources/messages/messages.mjs.map +1 -1
- package/resources/objects/bulk.d.mts +5 -19
- package/resources/objects/bulk.d.mts.map +1 -1
- package/resources/objects/bulk.d.ts +5 -19
- package/resources/objects/bulk.d.ts.map +1 -1
- package/resources/objects/bulk.js +1 -19
- package/resources/objects/bulk.js.map +1 -1
- package/resources/objects/bulk.mjs +1 -19
- package/resources/objects/bulk.mjs.map +1 -1
- package/resources/objects/objects.d.mts +40 -17
- package/resources/objects/objects.d.mts.map +1 -1
- package/resources/objects/objects.d.ts +40 -17
- package/resources/objects/objects.d.ts.map +1 -1
- package/resources/objects/objects.js +8 -4
- package/resources/objects/objects.js.map +1 -1
- package/resources/objects/objects.mjs +8 -4
- package/resources/objects/objects.mjs.map +1 -1
- package/resources/recipients/channel-data.d.mts +140 -31
- package/resources/recipients/channel-data.d.mts.map +1 -1
- package/resources/recipients/channel-data.d.ts +140 -31
- package/resources/recipients/channel-data.d.ts.map +1 -1
- package/resources/recipients/index.d.mts +2 -2
- package/resources/recipients/index.d.mts.map +1 -1
- package/resources/recipients/index.d.ts +2 -2
- package/resources/recipients/index.d.ts.map +1 -1
- package/resources/recipients/index.js.map +1 -1
- package/resources/recipients/index.mjs.map +1 -1
- package/resources/recipients/preferences.d.mts +57 -1
- package/resources/recipients/preferences.d.mts.map +1 -1
- package/resources/recipients/preferences.d.ts +57 -1
- package/resources/recipients/preferences.d.ts.map +1 -1
- package/resources/recipients/recipients.d.mts +4 -4
- package/resources/recipients/recipients.d.mts.map +1 -1
- package/resources/recipients/recipients.d.ts +4 -4
- package/resources/recipients/recipients.d.ts.map +1 -1
- package/resources/recipients/recipients.js.map +1 -1
- package/resources/recipients/recipients.mjs.map +1 -1
- package/resources/tenants/bulk.d.mts +1 -1
- package/resources/tenants/bulk.d.ts +1 -1
- package/resources/tenants/bulk.js +1 -1
- package/resources/tenants/bulk.mjs +1 -1
- package/resources/tenants/tenants.d.mts +9 -0
- package/resources/tenants/tenants.d.mts.map +1 -1
- package/resources/tenants/tenants.d.ts +9 -0
- package/resources/tenants/tenants.d.ts.map +1 -1
- package/resources/tenants/tenants.js +1 -0
- package/resources/tenants/tenants.js.map +1 -1
- package/resources/tenants/tenants.mjs +1 -0
- package/resources/tenants/tenants.mjs.map +1 -1
- package/resources/users/bulk.d.mts +13 -0
- package/resources/users/bulk.d.mts.map +1 -1
- package/resources/users/bulk.d.ts +13 -0
- package/resources/users/bulk.d.ts.map +1 -1
- package/resources/users/bulk.js +13 -0
- package/resources/users/bulk.js.map +1 -1
- package/resources/users/bulk.mjs +13 -0
- package/resources/users/bulk.mjs.map +1 -1
- package/resources/users/feeds.d.mts +7 -0
- package/resources/users/feeds.d.mts.map +1 -1
- package/resources/users/feeds.d.ts +7 -0
- package/resources/users/feeds.d.ts.map +1 -1
- package/resources/users/guides.d.mts +90 -21
- package/resources/users/guides.d.mts.map +1 -1
- package/resources/users/guides.d.ts +90 -21
- package/resources/users/guides.d.ts.map +1 -1
- package/resources/users/users.d.mts +37 -13
- package/resources/users/users.d.mts.map +1 -1
- package/resources/users/users.d.ts +37 -13
- package/resources/users/users.d.ts.map +1 -1
- package/resources/users/users.js +13 -0
- package/resources/users/users.js.map +1 -1
- package/resources/users/users.mjs +13 -0
- package/resources/users/users.mjs.map +1 -1
- package/src/client.ts +12 -0
- package/src/resources/messages/messages.ts +46 -1
- package/src/resources/objects/bulk.ts +6 -19
- package/src/resources/objects/objects.ts +44 -20
- package/src/resources/recipients/channel-data.ts +173 -41
- package/src/resources/recipients/index.ts +6 -2
- package/src/resources/recipients/preferences.ts +54 -0
- package/src/resources/recipients/recipients.ts +12 -4
- package/src/resources/tenants/bulk.ts +1 -1
- package/src/resources/tenants/tenants.ts +11 -0
- package/src/resources/users/bulk.ts +13 -0
- package/src/resources/users/feeds.ts +8 -0
- package/src/resources/users/guides.ts +118 -19
- package/src/resources/users/users.ts +39 -16
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -4,6 +4,53 @@ import { APIResource } from '../../core/resource';
|
|
|
4
4
|
|
|
5
5
|
export class ChannelData extends APIResource {}
|
|
6
6
|
|
|
7
|
+
/**
|
|
8
|
+
* AWS SNS push channel data.
|
|
9
|
+
*/
|
|
10
|
+
export interface AwsSnsPushChannelDataDevicesOnly {
|
|
11
|
+
/**
|
|
12
|
+
* A list of devices. Each device contains a target_arn, and optionally a locale
|
|
13
|
+
* and timezone.
|
|
14
|
+
*/
|
|
15
|
+
devices: Array<AwsSnsPushChannelDataDevicesOnly.Device>;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export namespace AwsSnsPushChannelDataDevicesOnly {
|
|
19
|
+
export interface Device {
|
|
20
|
+
/**
|
|
21
|
+
* The ARN of a platform endpoint associated with a platform application and a
|
|
22
|
+
* device token. See
|
|
23
|
+
* [Setting up an Amazon SNS platform endpoint for mobile notifications](https://docs.aws.amazon.com/sns/latest/dg/mobile-platform-endpoint.html).
|
|
24
|
+
*/
|
|
25
|
+
target_arn: string;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* The locale of the object. Used for
|
|
29
|
+
* [message localization](/concepts/translations).
|
|
30
|
+
*/
|
|
31
|
+
locale?: string | null;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* The timezone of the object. Must be a
|
|
35
|
+
* valid [tz database time zone string](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
|
|
36
|
+
* Used
|
|
37
|
+
* for [recurring schedules](/concepts/schedules#scheduling-workflows-with-recurring-schedules-for-recipients).
|
|
38
|
+
*/
|
|
39
|
+
timezone?: string | null;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* AWS SNS push channel data.
|
|
45
|
+
*/
|
|
46
|
+
export interface AwsSnsPushChannelDataTargetArnsOnly {
|
|
47
|
+
/**
|
|
48
|
+
* A list of platform endpoint ARNs. See
|
|
49
|
+
* [Setting up an Amazon SNS platform endpoint for mobile notifications](https://docs.aws.amazon.com/sns/latest/dg/mobile-platform-endpoint.html).
|
|
50
|
+
*/
|
|
51
|
+
target_arns: Array<string>;
|
|
52
|
+
}
|
|
53
|
+
|
|
7
54
|
/**
|
|
8
55
|
* Channel data for a given channel type.
|
|
9
56
|
*/
|
|
@@ -22,12 +69,12 @@ export interface ChannelData {
|
|
|
22
69
|
* Channel data for a given channel type.
|
|
23
70
|
*/
|
|
24
71
|
data:
|
|
25
|
-
|
|
|
72
|
+
| ChannelData.PushChannelDataFull
|
|
73
|
+
| ChannelData.AwssnsPushChannelDataFull
|
|
74
|
+
| OneSignalChannelDataPlayerIDsOnly
|
|
26
75
|
| SlackChannelData
|
|
27
76
|
| MsTeamsChannelData
|
|
28
|
-
| DiscordChannelData
|
|
29
|
-
| OneSignalChannelData
|
|
30
|
-
| ChannelData.AwsSnsPushChannelData;
|
|
77
|
+
| DiscordChannelData;
|
|
31
78
|
|
|
32
79
|
/**
|
|
33
80
|
* The type of provider.
|
|
@@ -45,16 +92,86 @@ export interface ChannelData {
|
|
|
45
92
|
}
|
|
46
93
|
|
|
47
94
|
export namespace ChannelData {
|
|
95
|
+
/**
|
|
96
|
+
* Push channel data.
|
|
97
|
+
*/
|
|
98
|
+
export interface PushChannelDataFull {
|
|
99
|
+
/**
|
|
100
|
+
* A list of devices. Each device contains a token, and optionally a locale and
|
|
101
|
+
* timezone.
|
|
102
|
+
*/
|
|
103
|
+
devices: Array<PushChannelDataFull.Device>;
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* A list of push channel tokens.
|
|
107
|
+
*/
|
|
108
|
+
tokens: Array<string>;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export namespace PushChannelDataFull {
|
|
112
|
+
export interface Device {
|
|
113
|
+
/**
|
|
114
|
+
* The device token to send the push notification to.
|
|
115
|
+
*/
|
|
116
|
+
token: string;
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* The locale of the object. Used for
|
|
120
|
+
* [message localization](/concepts/translations).
|
|
121
|
+
*/
|
|
122
|
+
locale?: string | null;
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* The timezone of the object. Must be a
|
|
126
|
+
* valid [tz database time zone string](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
|
|
127
|
+
* Used
|
|
128
|
+
* for [recurring schedules](/concepts/schedules#scheduling-workflows-with-recurring-schedules-for-recipients).
|
|
129
|
+
*/
|
|
130
|
+
timezone?: string | null;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
48
134
|
/**
|
|
49
135
|
* AWS SNS push channel data.
|
|
50
136
|
*/
|
|
51
|
-
export interface
|
|
137
|
+
export interface AwssnsPushChannelDataFull {
|
|
138
|
+
/**
|
|
139
|
+
* A list of devices. Each device contains a target_arn, and optionally a locale
|
|
140
|
+
* and timezone.
|
|
141
|
+
*/
|
|
142
|
+
devices: Array<AwssnsPushChannelDataFull.Device>;
|
|
143
|
+
|
|
52
144
|
/**
|
|
53
145
|
* A list of platform endpoint ARNs. See
|
|
54
146
|
* [Setting up an Amazon SNS platform endpoint for mobile notifications](https://docs.aws.amazon.com/sns/latest/dg/mobile-platform-endpoint.html).
|
|
55
147
|
*/
|
|
56
148
|
target_arns: Array<string>;
|
|
57
149
|
}
|
|
150
|
+
|
|
151
|
+
export namespace AwssnsPushChannelDataFull {
|
|
152
|
+
export interface Device {
|
|
153
|
+
/**
|
|
154
|
+
* The ARN of a platform endpoint associated with a platform application and a
|
|
155
|
+
* device token. See
|
|
156
|
+
* [Setting up an Amazon SNS platform endpoint for mobile notifications](https://docs.aws.amazon.com/sns/latest/dg/mobile-platform-endpoint.html).
|
|
157
|
+
*/
|
|
158
|
+
target_arn: string;
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* The locale of the object. Used for
|
|
162
|
+
* [message localization](/concepts/translations).
|
|
163
|
+
*/
|
|
164
|
+
locale?: string | null;
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* The timezone of the object. Must be a
|
|
168
|
+
* valid [tz database time zone string](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
|
|
169
|
+
* Used
|
|
170
|
+
* for [recurring schedules](/concepts/schedules#scheduling-workflows-with-recurring-schedules-for-recipients).
|
|
171
|
+
*/
|
|
172
|
+
timezone?: string | null;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
58
175
|
}
|
|
59
176
|
|
|
60
177
|
/**
|
|
@@ -65,27 +182,16 @@ export interface ChannelDataRequest {
|
|
|
65
182
|
* Channel data for a given channel type.
|
|
66
183
|
*/
|
|
67
184
|
data:
|
|
68
|
-
|
|
|
69
|
-
|
|
|
70
|
-
|
|
|
185
|
+
| PushChannelDataTokensOnly
|
|
186
|
+
| PushChannelDataDevicesOnly
|
|
187
|
+
| AwsSnsPushChannelDataTargetArnsOnly
|
|
188
|
+
| AwsSnsPushChannelDataDevicesOnly
|
|
189
|
+
| OneSignalChannelDataPlayerIDsOnly
|
|
71
190
|
| SlackChannelData
|
|
72
191
|
| MsTeamsChannelData
|
|
73
192
|
| DiscordChannelData;
|
|
74
193
|
}
|
|
75
194
|
|
|
76
|
-
export namespace ChannelDataRequest {
|
|
77
|
-
/**
|
|
78
|
-
* AWS SNS push channel data.
|
|
79
|
-
*/
|
|
80
|
-
export interface AwsSnsPushChannelData {
|
|
81
|
-
/**
|
|
82
|
-
* A list of platform endpoint ARNs. See
|
|
83
|
-
* [Setting up an Amazon SNS platform endpoint for mobile notifications](https://docs.aws.amazon.com/sns/latest/dg/mobile-platform-endpoint.html).
|
|
84
|
-
*/
|
|
85
|
-
target_arns: Array<string>;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
|
|
89
195
|
/**
|
|
90
196
|
* Discord channel data.
|
|
91
197
|
*/
|
|
@@ -137,27 +243,16 @@ export namespace DiscordChannelData {
|
|
|
137
243
|
*/
|
|
138
244
|
export type InlineChannelDataRequest = {
|
|
139
245
|
[key: string]:
|
|
140
|
-
|
|
|
141
|
-
|
|
|
142
|
-
|
|
|
246
|
+
| PushChannelDataTokensOnly
|
|
247
|
+
| PushChannelDataDevicesOnly
|
|
248
|
+
| AwsSnsPushChannelDataTargetArnsOnly
|
|
249
|
+
| AwsSnsPushChannelDataDevicesOnly
|
|
250
|
+
| OneSignalChannelDataPlayerIDsOnly
|
|
143
251
|
| SlackChannelData
|
|
144
252
|
| MsTeamsChannelData
|
|
145
253
|
| DiscordChannelData;
|
|
146
254
|
};
|
|
147
255
|
|
|
148
|
-
export namespace InlineChannelDataRequest {
|
|
149
|
-
/**
|
|
150
|
-
* AWS SNS push channel data.
|
|
151
|
-
*/
|
|
152
|
-
export interface AwsSnsPushChannelData {
|
|
153
|
-
/**
|
|
154
|
-
* A list of platform endpoint ARNs. See
|
|
155
|
-
* [Setting up an Amazon SNS platform endpoint for mobile notifications](https://docs.aws.amazon.com/sns/latest/dg/mobile-platform-endpoint.html).
|
|
156
|
-
*/
|
|
157
|
-
target_arns: Array<string>;
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
|
|
161
256
|
/**
|
|
162
257
|
* Microsoft Teams channel data.
|
|
163
258
|
*/
|
|
@@ -227,7 +322,7 @@ export namespace MsTeamsChannelData {
|
|
|
227
322
|
/**
|
|
228
323
|
* OneSignal channel data.
|
|
229
324
|
*/
|
|
230
|
-
export interface
|
|
325
|
+
export interface OneSignalChannelDataPlayerIDsOnly {
|
|
231
326
|
/**
|
|
232
327
|
* A list of OneSignal player IDs.
|
|
233
328
|
*/
|
|
@@ -237,7 +332,41 @@ export interface OneSignalChannelData {
|
|
|
237
332
|
/**
|
|
238
333
|
* Push channel data.
|
|
239
334
|
*/
|
|
240
|
-
export interface
|
|
335
|
+
export interface PushChannelDataDevicesOnly {
|
|
336
|
+
/**
|
|
337
|
+
* A list of devices. Each device contains a token, and optionally a locale and
|
|
338
|
+
* timezone.
|
|
339
|
+
*/
|
|
340
|
+
devices: Array<PushChannelDataDevicesOnly.Device>;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
export namespace PushChannelDataDevicesOnly {
|
|
344
|
+
export interface Device {
|
|
345
|
+
/**
|
|
346
|
+
* The device token to send the push notification to.
|
|
347
|
+
*/
|
|
348
|
+
token: string;
|
|
349
|
+
|
|
350
|
+
/**
|
|
351
|
+
* The locale of the object. Used for
|
|
352
|
+
* [message localization](/concepts/translations).
|
|
353
|
+
*/
|
|
354
|
+
locale?: string | null;
|
|
355
|
+
|
|
356
|
+
/**
|
|
357
|
+
* The timezone of the object. Must be a
|
|
358
|
+
* valid [tz database time zone string](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
|
|
359
|
+
* Used
|
|
360
|
+
* for [recurring schedules](/concepts/schedules#scheduling-workflows-with-recurring-schedules-for-recipients).
|
|
361
|
+
*/
|
|
362
|
+
timezone?: string | null;
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
/**
|
|
367
|
+
* Push channel data.
|
|
368
|
+
*/
|
|
369
|
+
export interface PushChannelDataTokensOnly {
|
|
241
370
|
/**
|
|
242
371
|
* A list of push channel tokens.
|
|
243
372
|
*/
|
|
@@ -303,13 +432,16 @@ export namespace SlackChannelData {
|
|
|
303
432
|
|
|
304
433
|
export declare namespace ChannelData {
|
|
305
434
|
export {
|
|
435
|
+
type AwsSnsPushChannelDataDevicesOnly as AwsSnsPushChannelDataDevicesOnly,
|
|
436
|
+
type AwsSnsPushChannelDataTargetArnsOnly as AwsSnsPushChannelDataTargetArnsOnly,
|
|
306
437
|
type ChannelData as ChannelData,
|
|
307
438
|
type ChannelDataRequest as ChannelDataRequest,
|
|
308
439
|
type DiscordChannelData as DiscordChannelData,
|
|
309
440
|
type InlineChannelDataRequest as InlineChannelDataRequest,
|
|
310
441
|
type MsTeamsChannelData as MsTeamsChannelData,
|
|
311
|
-
type
|
|
312
|
-
type
|
|
442
|
+
type OneSignalChannelDataPlayerIDsOnly as OneSignalChannelDataPlayerIDsOnly,
|
|
443
|
+
type PushChannelDataDevicesOnly as PushChannelDataDevicesOnly,
|
|
444
|
+
type PushChannelDataTokensOnly as PushChannelDataTokensOnly,
|
|
313
445
|
type SlackChannelData as SlackChannelData,
|
|
314
446
|
};
|
|
315
447
|
}
|
|
@@ -2,18 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
export {
|
|
4
4
|
ChannelData,
|
|
5
|
+
type AwsSnsPushChannelDataDevicesOnly,
|
|
6
|
+
type AwsSnsPushChannelDataTargetArnsOnly,
|
|
5
7
|
type ChannelDataRequest,
|
|
6
8
|
type DiscordChannelData,
|
|
7
9
|
type InlineChannelDataRequest,
|
|
8
10
|
type MsTeamsChannelData,
|
|
9
|
-
type
|
|
10
|
-
type
|
|
11
|
+
type OneSignalChannelDataPlayerIDsOnly,
|
|
12
|
+
type PushChannelDataDevicesOnly,
|
|
13
|
+
type PushChannelDataTokensOnly,
|
|
11
14
|
type SlackChannelData,
|
|
12
15
|
} from './channel-data';
|
|
13
16
|
export {
|
|
14
17
|
Preferences,
|
|
15
18
|
type InlinePreferenceSetRequest,
|
|
16
19
|
type PreferenceSet,
|
|
20
|
+
type PreferenceSetChannelSetting,
|
|
17
21
|
type PreferenceSetChannelTypeSetting,
|
|
18
22
|
type PreferenceSetChannelTypes,
|
|
19
23
|
type PreferenceSetRequest,
|
|
@@ -34,6 +34,17 @@ export interface PreferenceSet {
|
|
|
34
34
|
*/
|
|
35
35
|
channel_types?: PreferenceSetChannelTypes | null;
|
|
36
36
|
|
|
37
|
+
/**
|
|
38
|
+
* Channel preferences.
|
|
39
|
+
*/
|
|
40
|
+
channels?: { [key: string]: boolean | PreferenceSetChannelSetting } | null;
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Whether the recipient is subscribed to commercial communications. When false,
|
|
44
|
+
* the recipient will not receive commercial workflow notifications.
|
|
45
|
+
*/
|
|
46
|
+
commercial_subscribed?: boolean | null;
|
|
47
|
+
|
|
37
48
|
/**
|
|
38
49
|
* An object where the key is the workflow key and the values are the preference
|
|
39
50
|
* settings for that workflow.
|
|
@@ -52,6 +63,11 @@ export namespace PreferenceSet {
|
|
|
52
63
|
*/
|
|
53
64
|
channel_types?: PreferencesAPI.PreferenceSetChannelTypes | null;
|
|
54
65
|
|
|
66
|
+
/**
|
|
67
|
+
* Channel preferences.
|
|
68
|
+
*/
|
|
69
|
+
channels?: { [key: string]: boolean | PreferencesAPI.PreferenceSetChannelSetting } | null;
|
|
70
|
+
|
|
55
71
|
/**
|
|
56
72
|
* A list of conditions to apply to a channel type.
|
|
57
73
|
*/
|
|
@@ -68,6 +84,11 @@ export namespace PreferenceSet {
|
|
|
68
84
|
*/
|
|
69
85
|
channel_types?: PreferencesAPI.PreferenceSetChannelTypes | null;
|
|
70
86
|
|
|
87
|
+
/**
|
|
88
|
+
* Channel preferences.
|
|
89
|
+
*/
|
|
90
|
+
channels?: { [key: string]: boolean | PreferencesAPI.PreferenceSetChannelSetting } | null;
|
|
91
|
+
|
|
71
92
|
/**
|
|
72
93
|
* A list of conditions to apply to a channel type.
|
|
73
94
|
*/
|
|
@@ -75,6 +96,17 @@ export namespace PreferenceSet {
|
|
|
75
96
|
}
|
|
76
97
|
}
|
|
77
98
|
|
|
99
|
+
/**
|
|
100
|
+
* A set of settings for a specific channel. Currently, this can only be a list of
|
|
101
|
+
* conditions to apply.
|
|
102
|
+
*/
|
|
103
|
+
export interface PreferenceSetChannelSetting {
|
|
104
|
+
/**
|
|
105
|
+
* A list of conditions to apply to a specific channel.
|
|
106
|
+
*/
|
|
107
|
+
conditions: Array<Shared.Condition>;
|
|
108
|
+
}
|
|
109
|
+
|
|
78
110
|
/**
|
|
79
111
|
* A set of settings for a channel type. Currently, this can only be a list of
|
|
80
112
|
* conditions to apply.
|
|
@@ -144,6 +176,17 @@ export interface PreferenceSetRequest {
|
|
|
144
176
|
*/
|
|
145
177
|
channel_types?: PreferenceSetChannelTypes | null;
|
|
146
178
|
|
|
179
|
+
/**
|
|
180
|
+
* Channel preferences.
|
|
181
|
+
*/
|
|
182
|
+
channels?: { [key: string]: boolean | PreferenceSetChannelSetting } | null;
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* Whether the recipient is subscribed to commercial communications. When false,
|
|
186
|
+
* the recipient will not receive commercial workflow notifications.
|
|
187
|
+
*/
|
|
188
|
+
commercial_subscribed?: boolean | null;
|
|
189
|
+
|
|
147
190
|
/**
|
|
148
191
|
* An object where the key is the workflow key and the values are the preference
|
|
149
192
|
* settings for that workflow.
|
|
@@ -164,6 +207,11 @@ export namespace PreferenceSetRequest {
|
|
|
164
207
|
*/
|
|
165
208
|
channel_types?: PreferencesAPI.PreferenceSetChannelTypes | null;
|
|
166
209
|
|
|
210
|
+
/**
|
|
211
|
+
* Channel preferences.
|
|
212
|
+
*/
|
|
213
|
+
channels?: { [key: string]: boolean | PreferencesAPI.PreferenceSetChannelSetting } | null;
|
|
214
|
+
|
|
167
215
|
/**
|
|
168
216
|
* A list of conditions to apply to a channel type.
|
|
169
217
|
*/
|
|
@@ -180,6 +228,11 @@ export namespace PreferenceSetRequest {
|
|
|
180
228
|
*/
|
|
181
229
|
channel_types?: PreferencesAPI.PreferenceSetChannelTypes | null;
|
|
182
230
|
|
|
231
|
+
/**
|
|
232
|
+
* Channel preferences.
|
|
233
|
+
*/
|
|
234
|
+
channels?: { [key: string]: boolean | PreferencesAPI.PreferenceSetChannelSetting } | null;
|
|
235
|
+
|
|
183
236
|
/**
|
|
184
237
|
* A list of conditions to apply to a channel type.
|
|
185
238
|
*/
|
|
@@ -191,6 +244,7 @@ export declare namespace Preferences {
|
|
|
191
244
|
export {
|
|
192
245
|
type InlinePreferenceSetRequest as InlinePreferenceSetRequest,
|
|
193
246
|
type PreferenceSet as PreferenceSet,
|
|
247
|
+
type PreferenceSetChannelSetting as PreferenceSetChannelSetting,
|
|
194
248
|
type PreferenceSetChannelTypeSetting as PreferenceSetChannelTypeSetting,
|
|
195
249
|
type PreferenceSetChannelTypes as PreferenceSetChannelTypes,
|
|
196
250
|
type PreferenceSetRequest as PreferenceSetRequest,
|
|
@@ -4,19 +4,23 @@ import { APIResource } from '../../core/resource';
|
|
|
4
4
|
import * as ObjectsAPI from '../objects/objects';
|
|
5
5
|
import * as ChannelDataAPI from './channel-data';
|
|
6
6
|
import {
|
|
7
|
+
AwsSnsPushChannelDataDevicesOnly,
|
|
8
|
+
AwsSnsPushChannelDataTargetArnsOnly,
|
|
7
9
|
ChannelData,
|
|
8
10
|
ChannelDataRequest,
|
|
9
11
|
DiscordChannelData,
|
|
10
12
|
InlineChannelDataRequest,
|
|
11
13
|
MsTeamsChannelData,
|
|
12
|
-
|
|
13
|
-
|
|
14
|
+
OneSignalChannelDataPlayerIDsOnly,
|
|
15
|
+
PushChannelDataDevicesOnly,
|
|
16
|
+
PushChannelDataTokensOnly,
|
|
14
17
|
SlackChannelData,
|
|
15
18
|
} from './channel-data';
|
|
16
19
|
import * as PreferencesAPI from './preferences';
|
|
17
20
|
import {
|
|
18
21
|
InlinePreferenceSetRequest,
|
|
19
22
|
PreferenceSet,
|
|
23
|
+
PreferenceSetChannelSetting,
|
|
20
24
|
PreferenceSetChannelTypeSetting,
|
|
21
25
|
PreferenceSetChannelTypes,
|
|
22
26
|
PreferenceSetRequest,
|
|
@@ -83,6 +87,7 @@ export declare namespace Recipients {
|
|
|
83
87
|
Preferences as Preferences,
|
|
84
88
|
type InlinePreferenceSetRequest as InlinePreferenceSetRequest,
|
|
85
89
|
type PreferenceSet as PreferenceSet,
|
|
90
|
+
type PreferenceSetChannelSetting as PreferenceSetChannelSetting,
|
|
86
91
|
type PreferenceSetChannelTypeSetting as PreferenceSetChannelTypeSetting,
|
|
87
92
|
type PreferenceSetChannelTypes as PreferenceSetChannelTypes,
|
|
88
93
|
type PreferenceSetRequest as PreferenceSetRequest,
|
|
@@ -90,12 +95,15 @@ export declare namespace Recipients {
|
|
|
90
95
|
|
|
91
96
|
export {
|
|
92
97
|
type ChannelData as ChannelData,
|
|
98
|
+
type AwsSnsPushChannelDataDevicesOnly as AwsSnsPushChannelDataDevicesOnly,
|
|
99
|
+
type AwsSnsPushChannelDataTargetArnsOnly as AwsSnsPushChannelDataTargetArnsOnly,
|
|
93
100
|
type ChannelDataRequest as ChannelDataRequest,
|
|
94
101
|
type DiscordChannelData as DiscordChannelData,
|
|
95
102
|
type InlineChannelDataRequest as InlineChannelDataRequest,
|
|
96
103
|
type MsTeamsChannelData as MsTeamsChannelData,
|
|
97
|
-
type
|
|
98
|
-
type
|
|
104
|
+
type OneSignalChannelDataPlayerIDsOnly as OneSignalChannelDataPlayerIDsOnly,
|
|
105
|
+
type PushChannelDataDevicesOnly as PushChannelDataDevicesOnly,
|
|
106
|
+
type PushChannelDataTokensOnly as PushChannelDataTokensOnly,
|
|
99
107
|
type SlackChannelData as SlackChannelData,
|
|
100
108
|
};
|
|
101
109
|
}
|
|
@@ -66,6 +66,7 @@ export class Tenants extends APIResource {
|
|
|
66
66
|
* @example
|
|
67
67
|
* ```ts
|
|
68
68
|
* const tenant = await client.tenants.set('id', {
|
|
69
|
+
* name: 'Jurassic Park',
|
|
69
70
|
* settings: {
|
|
70
71
|
* branding: {
|
|
71
72
|
* icon_url:
|
|
@@ -179,6 +180,11 @@ export interface TenantRequest {
|
|
|
179
180
|
*/
|
|
180
181
|
channel_data?: ChannelDataAPI.InlineChannelDataRequest | null;
|
|
181
182
|
|
|
183
|
+
/**
|
|
184
|
+
* An optional name for the tenant.
|
|
185
|
+
*/
|
|
186
|
+
name?: string | null;
|
|
187
|
+
|
|
182
188
|
/**
|
|
183
189
|
* Inline set preferences for a recipient, where the key is the preference set id.
|
|
184
190
|
* Preferences that are set inline will be merged into any existing preferences
|
|
@@ -258,6 +264,11 @@ export interface TenantSetParams {
|
|
|
258
264
|
*/
|
|
259
265
|
channel_data?: ChannelDataAPI.InlineChannelDataRequest | null;
|
|
260
266
|
|
|
267
|
+
/**
|
|
268
|
+
* An optional name for the tenant.
|
|
269
|
+
*/
|
|
270
|
+
name?: string | null;
|
|
271
|
+
|
|
261
272
|
/**
|
|
262
273
|
* The settings for the tenant. Includes branding and preference set.
|
|
263
274
|
*/
|
|
@@ -63,6 +63,19 @@ export class Bulk extends APIResource {
|
|
|
63
63
|
* transactional: { channel_types: { email: false } },
|
|
64
64
|
* },
|
|
65
65
|
* channel_types: { email: true },
|
|
66
|
+
* channels: {
|
|
67
|
+
* '2f641633-95d3-4555-9222-9f1eb7888a80': {
|
|
68
|
+
* conditions: [
|
|
69
|
+
* {
|
|
70
|
+
* argument: 'US',
|
|
71
|
+
* operator: 'equal_to',
|
|
72
|
+
* variable: 'recipient.country_code',
|
|
73
|
+
* },
|
|
74
|
+
* ],
|
|
75
|
+
* },
|
|
76
|
+
* 'aef6e715-df82-4ab6-b61e-b743e249f7b6': true,
|
|
77
|
+
* },
|
|
78
|
+
* commercial_subscribed: true,
|
|
66
79
|
* workflows: {
|
|
67
80
|
* 'dinosaurs-loose': {
|
|
68
81
|
* channel_types: { email: false },
|
|
@@ -291,6 +291,14 @@ export interface FeedListItemsParams extends EntriesCursorParams {
|
|
|
291
291
|
*/
|
|
292
292
|
has_tenant?: boolean;
|
|
293
293
|
|
|
294
|
+
/**
|
|
295
|
+
* The locale to render the feed items in. Must be in the IETF 5646 format (e.g.
|
|
296
|
+
* `en-US`). When not provided, will default to the locale that the feed items were
|
|
297
|
+
* rendered in. Only available for enterprise plan customers using custom
|
|
298
|
+
* translations.
|
|
299
|
+
*/
|
|
300
|
+
locale?: string;
|
|
301
|
+
|
|
294
302
|
/**
|
|
295
303
|
* The workflow key associated with the message in the feed.
|
|
296
304
|
*/
|