@trycourier/courier 7.3.0 → 7.7.1
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 +115 -0
- package/LICENSE +1 -1
- package/README.md +34 -345
- package/client.d.mts +50 -8
- package/client.d.mts.map +1 -1
- package/client.d.ts +50 -8
- package/client.d.ts.map +1 -1
- package/client.js +17 -4
- package/client.js.map +1 -1
- package/client.mjs +18 -5
- package/client.mjs.map +1 -1
- package/internal/parse.d.mts.map +1 -1
- package/internal/parse.d.ts.map +1 -1
- package/internal/parse.js +5 -0
- package/internal/parse.js.map +1 -1
- package/internal/parse.mjs +5 -0
- package/internal/parse.mjs.map +1 -1
- package/internal/utils/query.d.mts +2 -0
- package/internal/utils/query.d.mts.map +1 -0
- package/internal/utils/query.d.ts +2 -0
- package/internal/utils/query.d.ts.map +1 -0
- package/internal/utils/query.js +10 -0
- package/internal/utils/query.js.map +1 -0
- package/internal/utils/query.mjs +6 -0
- package/internal/utils/query.mjs.map +1 -0
- package/internal/utils.d.mts +1 -0
- package/internal/utils.d.ts +1 -0
- package/internal/utils.js +1 -0
- package/internal/utils.js.map +1 -1
- package/internal/utils.mjs +1 -0
- package/package.json +1 -1
- package/resources/audiences.d.mts +11 -33
- package/resources/audiences.d.mts.map +1 -1
- package/resources/audiences.d.ts +11 -33
- package/resources/audiences.d.ts.map +1 -1
- package/resources/automations/automations.d.mts +54 -1
- package/resources/automations/automations.d.mts.map +1 -1
- package/resources/automations/automations.d.ts +54 -1
- package/resources/automations/automations.d.ts.map +1 -1
- package/resources/automations/automations.js +12 -0
- package/resources/automations/automations.js.map +1 -1
- package/resources/automations/automations.mjs +12 -0
- package/resources/automations/automations.mjs.map +1 -1
- package/resources/automations/index.d.mts +1 -1
- package/resources/automations/index.d.mts.map +1 -1
- package/resources/automations/index.d.ts +1 -1
- package/resources/automations/index.d.ts.map +1 -1
- package/resources/automations/index.js.map +1 -1
- package/resources/automations/index.mjs +1 -1
- package/resources/automations/index.mjs.map +1 -1
- package/resources/bulk.d.mts +80 -39
- package/resources/bulk.d.mts.map +1 -1
- package/resources/bulk.d.ts +80 -39
- package/resources/bulk.d.ts.map +1 -1
- package/resources/bulk.js +12 -2
- package/resources/bulk.js.map +1 -1
- package/resources/bulk.mjs +12 -2
- package/resources/bulk.mjs.map +1 -1
- package/resources/inbound.d.mts +1 -1
- package/resources/inbound.d.ts +1 -1
- package/resources/index.d.mts +3 -3
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +3 -3
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/lists/subscriptions.d.mts +1 -1
- package/resources/lists/subscriptions.d.ts +1 -1
- package/resources/notifications/checks.d.mts +2 -2
- package/resources/notifications/checks.d.ts +2 -2
- package/resources/send.d.mts +8 -2
- package/resources/send.d.mts.map +1 -1
- package/resources/send.d.ts +8 -2
- package/resources/send.d.ts.map +1 -1
- package/resources/send.js +1 -1
- package/resources/send.mjs +1 -1
- package/resources/shared.d.mts +290 -52
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +290 -52
- package/resources/shared.d.ts.map +1 -1
- package/resources/tenants/index.d.mts +2 -2
- package/resources/tenants/index.d.mts.map +1 -1
- package/resources/tenants/index.d.ts +2 -2
- package/resources/tenants/index.d.ts.map +1 -1
- package/resources/tenants/index.js +2 -2
- package/resources/tenants/index.js.map +1 -1
- package/resources/tenants/index.mjs +1 -1
- package/resources/tenants/index.mjs.map +1 -1
- package/resources/tenants/preferences/items.d.mts +2 -2
- package/resources/tenants/preferences/items.d.ts +2 -2
- package/resources/tenants/templates/index.d.mts +3 -0
- package/resources/tenants/templates/index.d.mts.map +1 -0
- package/resources/tenants/templates/index.d.ts +3 -0
- package/resources/tenants/templates/index.d.ts.map +1 -0
- package/resources/tenants/templates/index.js +9 -0
- package/resources/tenants/templates/index.js.map +1 -0
- package/resources/tenants/templates/index.mjs +4 -0
- package/resources/tenants/templates/index.mjs.map +1 -0
- package/resources/tenants/templates/templates.d.mts +159 -0
- package/resources/tenants/templates/templates.d.mts.map +1 -0
- package/resources/tenants/templates/templates.d.ts +159 -0
- package/resources/tenants/templates/templates.d.ts.map +1 -0
- package/resources/tenants/templates/templates.js +91 -0
- package/resources/tenants/templates/templates.js.map +1 -0
- package/resources/tenants/templates/templates.mjs +86 -0
- package/resources/tenants/templates/templates.mjs.map +1 -0
- package/resources/tenants/templates/versions.d.mts +39 -0
- package/resources/tenants/templates/versions.d.mts.map +1 -0
- package/resources/tenants/templates/versions.d.ts +39 -0
- package/resources/tenants/templates/versions.d.ts.map +1 -0
- package/resources/tenants/templates/versions.js +32 -0
- package/resources/tenants/templates/versions.js.map +1 -0
- package/resources/tenants/templates/versions.mjs +28 -0
- package/resources/tenants/templates/versions.mjs.map +1 -0
- package/resources/tenants/templates.d.mts +1 -90
- package/resources/tenants/templates.d.mts.map +1 -1
- package/resources/tenants/templates.d.ts +1 -90
- package/resources/tenants/templates.d.ts.map +1 -1
- package/resources/tenants/templates.js +2 -34
- package/resources/tenants/templates.js.map +1 -1
- package/resources/tenants/templates.mjs +1 -32
- package/resources/tenants/templates.mjs.map +1 -1
- package/resources/tenants/tenants.d.mts +147 -5
- package/resources/tenants/tenants.d.mts.map +1 -1
- package/resources/tenants/tenants.d.ts +147 -5
- package/resources/tenants/tenants.d.ts.map +1 -1
- package/resources/tenants/tenants.js +2 -2
- package/resources/tenants/tenants.js.map +1 -1
- package/resources/tenants/tenants.mjs +2 -2
- package/resources/tenants/tenants.mjs.map +1 -1
- package/resources/translations.d.mts +1 -1
- package/resources/translations.d.ts +1 -1
- package/resources/users/preferences.d.mts +1 -1
- package/resources/users/preferences.d.ts +1 -1
- package/resources/users/tenants.d.mts +1 -1
- package/resources/users/tenants.d.ts +1 -1
- package/resources/users/tokens.d.mts +3 -8
- package/resources/users/tokens.d.mts.map +1 -1
- package/resources/users/tokens.d.ts +3 -8
- package/resources/users/tokens.d.ts.map +1 -1
- package/resources/users/tokens.js +2 -3
- package/resources/users/tokens.js.map +1 -1
- package/resources/users/tokens.mjs +2 -3
- package/resources/users/tokens.mjs.map +1 -1
- package/src/client.ts +88 -14
- package/src/internal/parse.ts +6 -0
- package/src/internal/utils/query.ts +7 -0
- package/src/internal/utils.ts +1 -0
- package/src/resources/audiences.ts +11 -69
- package/src/resources/automations/automations.ts +74 -1
- package/src/resources/automations/index.ts +7 -1
- package/src/resources/bulk.ts +71 -32
- package/src/resources/inbound.ts +1 -1
- package/src/resources/index.ts +12 -3
- package/src/resources/lists/subscriptions.ts +1 -1
- package/src/resources/notifications/checks.ts +2 -2
- package/src/resources/send.ts +28 -2
- package/src/resources/shared.ts +391 -49
- package/src/resources/tenants/index.ts +8 -1
- package/src/resources/tenants/preferences/items.ts +2 -2
- package/src/resources/tenants/templates/index.ts +11 -0
- package/src/resources/tenants/templates/templates.ts +222 -0
- package/src/resources/tenants/templates/versions.ts +55 -0
- package/src/resources/tenants/templates.ts +1 -122
- package/src/resources/tenants/tenants.ts +179 -3
- package/src/resources/translations.ts +1 -1
- package/src/resources/users/preferences.ts +1 -1
- package/src/resources/users/tenants.ts +1 -1
- package/src/resources/users/tokens.ts +4 -10
- 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
package/src/resources/send.ts
CHANGED
|
@@ -13,7 +13,7 @@ export class Send extends APIResource {
|
|
|
13
13
|
* ```ts
|
|
14
14
|
* const response = await client.send.message({
|
|
15
15
|
* message: {
|
|
16
|
-
* to: { user_id: '
|
|
16
|
+
* to: { user_id: 'user_id' },
|
|
17
17
|
* template: 'template_id',
|
|
18
18
|
* data: { foo: 'bar' },
|
|
19
19
|
* },
|
|
@@ -89,7 +89,26 @@ export namespace SendMessageParams {
|
|
|
89
89
|
/**
|
|
90
90
|
* The recipient or a list of recipients of the message
|
|
91
91
|
*/
|
|
92
|
-
to?:
|
|
92
|
+
to?:
|
|
93
|
+
| Shared.UserRecipient
|
|
94
|
+
| Shared.AudienceRecipient
|
|
95
|
+
| Shared.ListRecipient
|
|
96
|
+
| Shared.ListPatternRecipient
|
|
97
|
+
| Shared.SlackRecipient
|
|
98
|
+
| Shared.MsTeamsRecipient
|
|
99
|
+
| Shared.PagerdutyRecipient
|
|
100
|
+
| Shared.WebhookRecipient
|
|
101
|
+
| Array<
|
|
102
|
+
| Shared.UserRecipient
|
|
103
|
+
| Shared.AudienceRecipient
|
|
104
|
+
| Shared.ListRecipient
|
|
105
|
+
| Shared.ListPatternRecipient
|
|
106
|
+
| Shared.SlackRecipient
|
|
107
|
+
| Shared.MsTeamsRecipient
|
|
108
|
+
| Shared.PagerdutyRecipient
|
|
109
|
+
| Shared.WebhookRecipient
|
|
110
|
+
>
|
|
111
|
+
| null;
|
|
93
112
|
}
|
|
94
113
|
|
|
95
114
|
export namespace Message {
|
|
@@ -142,6 +161,13 @@ export namespace SendMessageParams {
|
|
|
142
161
|
*/
|
|
143
162
|
duration?: number | null;
|
|
144
163
|
|
|
164
|
+
/**
|
|
165
|
+
* IANA timezone identifier (e.g., "America/Los_Angeles", "UTC"). Used when
|
|
166
|
+
* resolving opening hours expressions. Takes precedence over user profile timezone
|
|
167
|
+
* settings.
|
|
168
|
+
*/
|
|
169
|
+
timezone?: string | null;
|
|
170
|
+
|
|
145
171
|
/**
|
|
146
172
|
* ISO 8601 timestamp or opening_hours-like format.
|
|
147
173
|
*/
|
package/src/resources/shared.ts
CHANGED
|
@@ -2,14 +2,64 @@
|
|
|
2
2
|
|
|
3
3
|
import * as Shared from './shared';
|
|
4
4
|
|
|
5
|
+
export interface AirshipProfile {
|
|
6
|
+
audience: AirshipProfileAudience;
|
|
7
|
+
|
|
8
|
+
device_types: Array<DeviceType>;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface AirshipProfileAudience {
|
|
12
|
+
named_user: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
5
15
|
export type Alignment = 'center' | 'left' | 'right' | 'full';
|
|
6
16
|
|
|
17
|
+
export interface AudienceFilter {
|
|
18
|
+
/**
|
|
19
|
+
* Send to users only if they are member of the account
|
|
20
|
+
*/
|
|
21
|
+
operator: 'MEMBER_OF';
|
|
22
|
+
|
|
23
|
+
path: 'account_id';
|
|
24
|
+
|
|
25
|
+
value: string;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Filter configuration for audience membership containing an array of filter rules
|
|
30
|
+
*/
|
|
31
|
+
export interface AudienceFilterConfig {
|
|
32
|
+
/**
|
|
33
|
+
* Array of filter rules (single conditions or nested groups)
|
|
34
|
+
*/
|
|
35
|
+
filters: Array<FilterConfig>;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Send to all users in an audience
|
|
40
|
+
*/
|
|
41
|
+
export interface AudienceRecipient {
|
|
42
|
+
/**
|
|
43
|
+
* A unique identifier associated with an Audience. A message will be sent to each
|
|
44
|
+
* user in the audience.
|
|
45
|
+
*/
|
|
46
|
+
audience_id: string;
|
|
47
|
+
|
|
48
|
+
data?: { [key: string]: unknown } | null;
|
|
49
|
+
|
|
50
|
+
filters?: Array<AudienceFilter> | null;
|
|
51
|
+
}
|
|
52
|
+
|
|
7
53
|
export type ChannelClassification = 'direct_message' | 'email' | 'push' | 'sms' | 'webhook' | 'inbox';
|
|
8
54
|
|
|
9
55
|
export interface ChannelPreference {
|
|
10
56
|
channel: ChannelClassification;
|
|
11
57
|
}
|
|
12
58
|
|
|
59
|
+
export type DeviceType = string;
|
|
60
|
+
|
|
61
|
+
export type Discord = SendToChannel | SendDirectMessage;
|
|
62
|
+
|
|
13
63
|
export interface ElementalActionNodeWithType extends ElementalBaseNode {
|
|
14
64
|
type?: 'action';
|
|
15
65
|
}
|
|
@@ -41,7 +91,7 @@ export interface ElementalChannelNode extends ElementalBaseNode {
|
|
|
41
91
|
* The channel the contents of this element should be applied to. Can be `email`,
|
|
42
92
|
* `push`, `direct_message`, `sms` or a provider such as slack
|
|
43
93
|
*/
|
|
44
|
-
channel
|
|
94
|
+
channel?: string;
|
|
45
95
|
|
|
46
96
|
/**
|
|
47
97
|
* Raw data to apply to the channel. If `elements` has not been specified, `raw` is
|
|
@@ -73,8 +123,6 @@ export interface ElementalContent {
|
|
|
73
123
|
* For example, "2022-01-01"
|
|
74
124
|
*/
|
|
75
125
|
version: string;
|
|
76
|
-
|
|
77
|
-
brand?: string | null;
|
|
78
126
|
}
|
|
79
127
|
|
|
80
128
|
/**
|
|
@@ -133,6 +181,81 @@ export interface ElementalTextNodeWithType extends ElementalBaseNode {
|
|
|
133
181
|
type?: 'text';
|
|
134
182
|
}
|
|
135
183
|
|
|
184
|
+
export type Expo = Token | MultipleTokens;
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* A filter rule that can be either a single condition (with path/value) or a
|
|
188
|
+
* nested group (with filters array). Use comparison operators (EQ, GT, etc.) for
|
|
189
|
+
* single conditions, and logical operators (AND, OR) for nested groups.
|
|
190
|
+
*/
|
|
191
|
+
export interface FilterConfig {
|
|
192
|
+
/**
|
|
193
|
+
* The operator for this filter. Use comparison operators (EQ, GT, LT, GTE, LTE,
|
|
194
|
+
* NEQ, EXISTS, INCLUDES, STARTS_WITH, ENDS_WITH, IS_BEFORE, IS_AFTER, OMIT) for
|
|
195
|
+
* single conditions, or logical operators (AND, OR) for nested filter groups.
|
|
196
|
+
*/
|
|
197
|
+
operator: string;
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* Nested filter rules to combine with AND/OR. Required for nested filter groups,
|
|
201
|
+
* not used for single filter conditions.
|
|
202
|
+
*/
|
|
203
|
+
filters?: Array<FilterConfig>;
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* The attribute path from the user profile to filter on. Required for single
|
|
207
|
+
* filter conditions, not used for nested filter groups.
|
|
208
|
+
*/
|
|
209
|
+
path?: string;
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* The value to compare against. Required for single filter conditions, not used
|
|
213
|
+
* for nested filter groups.
|
|
214
|
+
*/
|
|
215
|
+
value?: string;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
export interface Intercom {
|
|
219
|
+
from: string;
|
|
220
|
+
|
|
221
|
+
to: IntercomRecipient;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
export interface IntercomRecipient {
|
|
225
|
+
id: string;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
export interface ListFilter {
|
|
229
|
+
/**
|
|
230
|
+
* Send to users only if they are member of the account
|
|
231
|
+
*/
|
|
232
|
+
operator: 'MEMBER_OF';
|
|
233
|
+
|
|
234
|
+
path: 'account_id';
|
|
235
|
+
|
|
236
|
+
value: string;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* Send to users in lists matching a pattern
|
|
241
|
+
*/
|
|
242
|
+
export interface ListPatternRecipient {
|
|
243
|
+
data?: { [key: string]: unknown } | null;
|
|
244
|
+
|
|
245
|
+
list_pattern?: string | null;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
/**
|
|
249
|
+
* Send to all users in a specific list
|
|
250
|
+
*/
|
|
251
|
+
export interface ListRecipient {
|
|
252
|
+
data?: { [key: string]: unknown } | null;
|
|
253
|
+
|
|
254
|
+
filters?: Array<ListFilter> | null;
|
|
255
|
+
|
|
256
|
+
list_id?: string | null;
|
|
257
|
+
}
|
|
258
|
+
|
|
136
259
|
export interface MessageContext {
|
|
137
260
|
/**
|
|
138
261
|
* Tenant id used to load brand/default preferences/context.
|
|
@@ -148,6 +271,30 @@ export interface MessageRouting {
|
|
|
148
271
|
|
|
149
272
|
export type MessageRoutingChannel = string | MessageRouting;
|
|
150
273
|
|
|
274
|
+
export type MsTeams =
|
|
275
|
+
| SendToMsTeamsUserID
|
|
276
|
+
| SendToMsTeamsEmail
|
|
277
|
+
| SendToMsTeamsChannelID
|
|
278
|
+
| SendToMsTeamsConversationID
|
|
279
|
+
| SendToMsTeamsChannelName;
|
|
280
|
+
|
|
281
|
+
export interface MsTeamsBaseProperties {
|
|
282
|
+
service_url: string;
|
|
283
|
+
|
|
284
|
+
tenant_id: string;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* Send via Microsoft Teams
|
|
289
|
+
*/
|
|
290
|
+
export interface MsTeamsRecipient {
|
|
291
|
+
ms_teams: MsTeams;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
export interface MultipleTokens {
|
|
295
|
+
tokens: Array<Token>;
|
|
296
|
+
}
|
|
297
|
+
|
|
151
298
|
export interface NotificationPreferenceDetails {
|
|
152
299
|
status: PreferenceStatus;
|
|
153
300
|
|
|
@@ -156,6 +303,23 @@ export interface NotificationPreferenceDetails {
|
|
|
156
303
|
rules?: Array<Rule> | null;
|
|
157
304
|
}
|
|
158
305
|
|
|
306
|
+
export interface Pagerduty {
|
|
307
|
+
event_action?: string | null;
|
|
308
|
+
|
|
309
|
+
routing_key?: string | null;
|
|
310
|
+
|
|
311
|
+
severity?: string | null;
|
|
312
|
+
|
|
313
|
+
source?: string | null;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
/**
|
|
317
|
+
* Send via PagerDuty
|
|
318
|
+
*/
|
|
319
|
+
export interface PagerdutyRecipient {
|
|
320
|
+
pagerduty: Pagerduty;
|
|
321
|
+
}
|
|
322
|
+
|
|
159
323
|
export interface Paging {
|
|
160
324
|
more: boolean;
|
|
161
325
|
|
|
@@ -174,76 +338,190 @@ export interface Preference {
|
|
|
174
338
|
|
|
175
339
|
export type PreferenceStatus = 'OPTED_IN' | 'OPTED_OUT' | 'REQUIRED';
|
|
176
340
|
|
|
177
|
-
export interface
|
|
178
|
-
|
|
179
|
-
* Deprecated - Use `tenant_id` instead.
|
|
180
|
-
*/
|
|
181
|
-
account_id?: string | null;
|
|
341
|
+
export interface RecipientPreferences {
|
|
342
|
+
categories?: { [key: string]: NotificationPreferenceDetails } | null;
|
|
182
343
|
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
*/
|
|
186
|
-
context?: MessageContext | null;
|
|
344
|
+
notifications?: { [key: string]: NotificationPreferenceDetails } | null;
|
|
345
|
+
}
|
|
187
346
|
|
|
188
|
-
|
|
347
|
+
export interface Rule {
|
|
348
|
+
until: string;
|
|
349
|
+
|
|
350
|
+
start?: string | null;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
export interface SendDirectMessage {
|
|
354
|
+
user_id: string;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
export interface SendToChannel {
|
|
358
|
+
channel_id: string;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
export interface SendToMsTeamsChannelID {
|
|
362
|
+
channel_id: string;
|
|
363
|
+
|
|
364
|
+
service_url: string;
|
|
365
|
+
|
|
366
|
+
tenant_id: string;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
export interface SendToMsTeamsChannelName {
|
|
370
|
+
channel_name: string;
|
|
371
|
+
|
|
372
|
+
service_url: string;
|
|
373
|
+
|
|
374
|
+
team_id: string;
|
|
375
|
+
|
|
376
|
+
tenant_id: string;
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
export interface SendToMsTeamsConversationID {
|
|
380
|
+
conversation_id: string;
|
|
381
|
+
|
|
382
|
+
service_url: string;
|
|
383
|
+
|
|
384
|
+
tenant_id: string;
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
export interface SendToMsTeamsEmail {
|
|
388
|
+
email: string;
|
|
389
|
+
|
|
390
|
+
service_url: string;
|
|
391
|
+
|
|
392
|
+
tenant_id: string;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
export interface SendToMsTeamsUserID {
|
|
396
|
+
service_url: string;
|
|
397
|
+
|
|
398
|
+
tenant_id: string;
|
|
399
|
+
|
|
400
|
+
user_id: string;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
export interface SendToSlackChannel {
|
|
404
|
+
access_token: string;
|
|
405
|
+
|
|
406
|
+
channel: string;
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
export interface SendToSlackEmail {
|
|
410
|
+
access_token: string;
|
|
411
|
+
|
|
412
|
+
email: string;
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
export interface SendToSlackUserID {
|
|
416
|
+
access_token: string;
|
|
417
|
+
|
|
418
|
+
user_id: string;
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
export type Slack = SendToSlackChannel | SendToSlackEmail | SendToSlackUserID;
|
|
422
|
+
|
|
423
|
+
export interface SlackBaseProperties {
|
|
424
|
+
access_token: string;
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
/**
|
|
428
|
+
* Send via Slack (channel, email, or user_id)
|
|
429
|
+
*/
|
|
430
|
+
export interface SlackRecipient {
|
|
431
|
+
slack: Slack;
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
export type TextStyle = 'text' | 'h1' | 'h2' | 'subtext';
|
|
435
|
+
|
|
436
|
+
export interface Token {
|
|
437
|
+
token: string;
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
export interface UserProfile {
|
|
441
|
+
address?: UserProfile.Address | null;
|
|
442
|
+
|
|
443
|
+
airship?: AirshipProfile | null;
|
|
444
|
+
|
|
445
|
+
apn?: string | null;
|
|
446
|
+
|
|
447
|
+
birthdate?: string | null;
|
|
189
448
|
|
|
190
449
|
/**
|
|
191
|
-
*
|
|
450
|
+
* A free form object. Due to a limitation of the API Explorer, you can only enter
|
|
451
|
+
* string key/values below, but this API accepts more complex object structures.
|
|
192
452
|
*/
|
|
453
|
+
custom?: { [key: string]: unknown } | null;
|
|
454
|
+
|
|
455
|
+
discord?: Discord | null;
|
|
456
|
+
|
|
193
457
|
email?: string | null;
|
|
194
458
|
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
459
|
+
email_verified?: boolean | null;
|
|
460
|
+
|
|
461
|
+
expo?: Expo | null;
|
|
462
|
+
|
|
463
|
+
facebookPSID?: string | null;
|
|
464
|
+
|
|
465
|
+
family_name?: string | null;
|
|
466
|
+
|
|
467
|
+
firebaseToken?: UserProfileFirebaseToken | null;
|
|
468
|
+
|
|
469
|
+
gender?: string | null;
|
|
470
|
+
|
|
471
|
+
given_name?: string | null;
|
|
472
|
+
|
|
473
|
+
intercom?: Intercom | null;
|
|
199
474
|
|
|
200
|
-
/**
|
|
201
|
-
* The user's preferred ISO 639-1 language code.
|
|
202
|
-
*/
|
|
203
475
|
locale?: string | null;
|
|
204
476
|
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
477
|
+
middle_name?: string | null;
|
|
478
|
+
|
|
479
|
+
ms_teams?: MsTeams | null;
|
|
480
|
+
|
|
481
|
+
name?: string | null;
|
|
482
|
+
|
|
483
|
+
nickname?: string | null;
|
|
484
|
+
|
|
208
485
|
phone_number?: string | null;
|
|
209
486
|
|
|
210
|
-
|
|
487
|
+
phone_number_verified?: boolean | null;
|
|
211
488
|
|
|
212
|
-
|
|
213
|
-
* The id of the tenant the user is associated with.
|
|
214
|
-
*/
|
|
215
|
-
tenant_id?: string | null;
|
|
489
|
+
picture?: string | null;
|
|
216
490
|
|
|
217
|
-
|
|
218
|
-
* The user's unique identifier. Typically, this will match the user id of a user
|
|
219
|
-
* in your system.
|
|
220
|
-
*/
|
|
221
|
-
user_id?: string | null;
|
|
222
|
-
}
|
|
491
|
+
preferred_name?: string | null;
|
|
223
492
|
|
|
224
|
-
|
|
225
|
-
export interface Preferences {
|
|
226
|
-
notifications: { [key: string]: Shared.Preference };
|
|
493
|
+
profile?: string | null;
|
|
227
494
|
|
|
228
|
-
|
|
495
|
+
slack?: Slack | null;
|
|
229
496
|
|
|
230
|
-
|
|
231
|
-
}
|
|
232
|
-
}
|
|
497
|
+
sub?: string | null;
|
|
233
498
|
|
|
234
|
-
|
|
235
|
-
categories?: { [key: string]: NotificationPreferenceDetails } | null;
|
|
499
|
+
target_arn?: string | null;
|
|
236
500
|
|
|
237
|
-
|
|
501
|
+
updated_at?: string | null;
|
|
502
|
+
|
|
503
|
+
website?: string | null;
|
|
504
|
+
|
|
505
|
+
zoneinfo?: string | null;
|
|
238
506
|
}
|
|
239
507
|
|
|
240
|
-
export
|
|
241
|
-
|
|
508
|
+
export namespace UserProfile {
|
|
509
|
+
export interface Address {
|
|
510
|
+
country: string;
|
|
242
511
|
|
|
243
|
-
|
|
512
|
+
formatted: string;
|
|
513
|
+
|
|
514
|
+
locality: string;
|
|
515
|
+
|
|
516
|
+
postal_code: string;
|
|
517
|
+
|
|
518
|
+
region: string;
|
|
519
|
+
|
|
520
|
+
street_address: string;
|
|
521
|
+
}
|
|
244
522
|
}
|
|
245
523
|
|
|
246
|
-
export type
|
|
524
|
+
export type UserProfileFirebaseToken = string | Array<string>;
|
|
247
525
|
|
|
248
526
|
export interface UserRecipient {
|
|
249
527
|
/**
|
|
@@ -313,3 +591,67 @@ export interface Utm {
|
|
|
313
591
|
|
|
314
592
|
term?: string | null;
|
|
315
593
|
}
|
|
594
|
+
|
|
595
|
+
export type WebhookAuthMode = 'none' | 'basic' | 'bearer';
|
|
596
|
+
|
|
597
|
+
export interface WebhookAuthentication {
|
|
598
|
+
/**
|
|
599
|
+
* The authentication mode to use. Defaults to 'none' if not specified.
|
|
600
|
+
*/
|
|
601
|
+
mode: WebhookAuthMode;
|
|
602
|
+
|
|
603
|
+
/**
|
|
604
|
+
* Token for bearer authentication.
|
|
605
|
+
*/
|
|
606
|
+
token?: string | null;
|
|
607
|
+
|
|
608
|
+
/**
|
|
609
|
+
* Password for basic authentication.
|
|
610
|
+
*/
|
|
611
|
+
password?: string | null;
|
|
612
|
+
|
|
613
|
+
/**
|
|
614
|
+
* Username for basic authentication.
|
|
615
|
+
*/
|
|
616
|
+
username?: string | null;
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
export type WebhookMethod = 'POST' | 'PUT';
|
|
620
|
+
|
|
621
|
+
export interface WebhookProfile {
|
|
622
|
+
/**
|
|
623
|
+
* The URL to send the webhook request to.
|
|
624
|
+
*/
|
|
625
|
+
url: string;
|
|
626
|
+
|
|
627
|
+
/**
|
|
628
|
+
* Authentication configuration for the webhook request.
|
|
629
|
+
*/
|
|
630
|
+
authentication?: WebhookAuthentication | null;
|
|
631
|
+
|
|
632
|
+
/**
|
|
633
|
+
* Custom headers to include in the webhook request.
|
|
634
|
+
*/
|
|
635
|
+
headers?: { [key: string]: string } | null;
|
|
636
|
+
|
|
637
|
+
/**
|
|
638
|
+
* The HTTP method to use for the webhook request. Defaults to POST if not
|
|
639
|
+
* specified.
|
|
640
|
+
*/
|
|
641
|
+
method?: WebhookMethod | null;
|
|
642
|
+
|
|
643
|
+
/**
|
|
644
|
+
* Specifies what profile information is included in the request payload. Defaults
|
|
645
|
+
* to 'limited' if not specified.
|
|
646
|
+
*/
|
|
647
|
+
profile?: WebhookProfileType | null;
|
|
648
|
+
}
|
|
649
|
+
|
|
650
|
+
export type WebhookProfileType = 'limited' | 'expanded';
|
|
651
|
+
|
|
652
|
+
/**
|
|
653
|
+
* Send via webhook
|
|
654
|
+
*/
|
|
655
|
+
export interface WebhookRecipient {
|
|
656
|
+
webhook: WebhookProfile;
|
|
657
|
+
}
|
|
@@ -6,14 +6,21 @@ export {
|
|
|
6
6
|
type TemplateListResponse,
|
|
7
7
|
type TemplateRetrieveParams,
|
|
8
8
|
type TemplateListParams,
|
|
9
|
-
|
|
9
|
+
type TemplatePublishParams,
|
|
10
|
+
type TemplateReplaceParams,
|
|
11
|
+
} from './templates/index';
|
|
10
12
|
export {
|
|
11
13
|
Tenants,
|
|
12
14
|
type BaseTemplateTenantAssociation,
|
|
13
15
|
type DefaultPreferences,
|
|
16
|
+
type PostTenantTemplatePublishRequest,
|
|
17
|
+
type PostTenantTemplatePublishResponse,
|
|
18
|
+
type PutTenantTemplateRequest,
|
|
19
|
+
type PutTenantTemplateResponse,
|
|
14
20
|
type SubscriptionTopicNew,
|
|
15
21
|
type Tenant,
|
|
16
22
|
type TenantAssociation,
|
|
23
|
+
type TenantTemplateInput,
|
|
17
24
|
type TenantListResponse,
|
|
18
25
|
type TenantListUsersResponse,
|
|
19
26
|
type TenantUpdateParams,
|
|
@@ -56,7 +56,7 @@ export interface ItemUpdateParams {
|
|
|
56
56
|
tenant_id: string;
|
|
57
57
|
|
|
58
58
|
/**
|
|
59
|
-
* Body param
|
|
59
|
+
* Body param
|
|
60
60
|
*/
|
|
61
61
|
status: 'OPTED_OUT' | 'OPTED_IN' | 'REQUIRED';
|
|
62
62
|
|
|
@@ -68,7 +68,7 @@ export interface ItemUpdateParams {
|
|
|
68
68
|
|
|
69
69
|
/**
|
|
70
70
|
* Body param: Override channel routing with custom preferences. This will override
|
|
71
|
-
* any template
|
|
71
|
+
* any template preferences that are set, but a user can still customize their
|
|
72
72
|
* preferences
|
|
73
73
|
*/
|
|
74
74
|
has_custom_routing?: boolean | null;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
export {
|
|
4
|
+
Templates,
|
|
5
|
+
type TemplateListResponse,
|
|
6
|
+
type TemplateRetrieveParams,
|
|
7
|
+
type TemplateListParams,
|
|
8
|
+
type TemplatePublishParams,
|
|
9
|
+
type TemplateReplaceParams,
|
|
10
|
+
} from './templates';
|
|
11
|
+
export { Versions, type VersionRetrieveParams } from './versions';
|