@trycourier/courier 7.2.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 +123 -0
- package/LICENSE +1 -1
- package/README.md +34 -345
- package/client.d.mts +50 -9
- package/client.d.mts.map +1 -1
- package/client.d.ts +50 -9
- 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 +301 -49
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +301 -49
- 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 +7 -12
- package/resources/users/tokens.d.mts.map +1 -1
- package/resources/users/tokens.d.ts +7 -12
- package/resources/users/tokens.d.ts.map +1 -1
- package/resources/users/tokens.js +3 -6
- package/resources/users/tokens.js.map +1 -1
- package/resources/users/tokens.mjs +3 -6
- package/resources/users/tokens.mjs.map +1 -1
- package/src/client.ts +88 -15
- 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 +402 -46
- 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 +8 -14
- 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
|
@@ -1,13 +1,65 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
+
import * as Shared from './shared';
|
|
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
|
+
|
|
3
15
|
export type Alignment = 'center' | 'left' | 'right' | 'full';
|
|
4
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
|
+
|
|
5
53
|
export type ChannelClassification = 'direct_message' | 'email' | 'push' | 'sms' | 'webhook' | 'inbox';
|
|
6
54
|
|
|
7
55
|
export interface ChannelPreference {
|
|
8
56
|
channel: ChannelClassification;
|
|
9
57
|
}
|
|
10
58
|
|
|
59
|
+
export type DeviceType = string;
|
|
60
|
+
|
|
61
|
+
export type Discord = SendToChannel | SendDirectMessage;
|
|
62
|
+
|
|
11
63
|
export interface ElementalActionNodeWithType extends ElementalBaseNode {
|
|
12
64
|
type?: 'action';
|
|
13
65
|
}
|
|
@@ -39,7 +91,7 @@ export interface ElementalChannelNode extends ElementalBaseNode {
|
|
|
39
91
|
* The channel the contents of this element should be applied to. Can be `email`,
|
|
40
92
|
* `push`, `direct_message`, `sms` or a provider such as slack
|
|
41
93
|
*/
|
|
42
|
-
channel
|
|
94
|
+
channel?: string;
|
|
43
95
|
|
|
44
96
|
/**
|
|
45
97
|
* Raw data to apply to the channel. If `elements` has not been specified, `raw` is
|
|
@@ -71,8 +123,6 @@ export interface ElementalContent {
|
|
|
71
123
|
* For example, "2022-01-01"
|
|
72
124
|
*/
|
|
73
125
|
version: string;
|
|
74
|
-
|
|
75
|
-
brand?: string | null;
|
|
76
126
|
}
|
|
77
127
|
|
|
78
128
|
/**
|
|
@@ -131,6 +181,81 @@ export interface ElementalTextNodeWithType extends ElementalBaseNode {
|
|
|
131
181
|
type?: 'text';
|
|
132
182
|
}
|
|
133
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
|
+
|
|
134
259
|
export interface MessageContext {
|
|
135
260
|
/**
|
|
136
261
|
* Tenant id used to load brand/default preferences/context.
|
|
@@ -146,6 +271,30 @@ export interface MessageRouting {
|
|
|
146
271
|
|
|
147
272
|
export type MessageRoutingChannel = string | MessageRouting;
|
|
148
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
|
+
|
|
149
298
|
export interface NotificationPreferenceDetails {
|
|
150
299
|
status: PreferenceStatus;
|
|
151
300
|
|
|
@@ -154,6 +303,23 @@ export interface NotificationPreferenceDetails {
|
|
|
154
303
|
rules?: Array<Rule> | null;
|
|
155
304
|
}
|
|
156
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
|
+
|
|
157
323
|
export interface Paging {
|
|
158
324
|
more: boolean;
|
|
159
325
|
|
|
@@ -172,15 +338,192 @@ export interface Preference {
|
|
|
172
338
|
|
|
173
339
|
export type PreferenceStatus = 'OPTED_IN' | 'OPTED_OUT' | 'REQUIRED';
|
|
174
340
|
|
|
175
|
-
export interface
|
|
176
|
-
|
|
341
|
+
export interface RecipientPreferences {
|
|
342
|
+
categories?: { [key: string]: NotificationPreferenceDetails } | null;
|
|
343
|
+
|
|
344
|
+
notifications?: { [key: string]: NotificationPreferenceDetails } | null;
|
|
345
|
+
}
|
|
346
|
+
|
|
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;
|
|
177
391
|
|
|
178
|
-
|
|
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;
|
|
448
|
+
|
|
449
|
+
/**
|
|
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.
|
|
452
|
+
*/
|
|
453
|
+
custom?: { [key: string]: unknown } | null;
|
|
454
|
+
|
|
455
|
+
discord?: Discord | null;
|
|
456
|
+
|
|
457
|
+
email?: string | null;
|
|
458
|
+
|
|
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;
|
|
474
|
+
|
|
475
|
+
locale?: string | null;
|
|
476
|
+
|
|
477
|
+
middle_name?: string | null;
|
|
478
|
+
|
|
479
|
+
ms_teams?: MsTeams | null;
|
|
480
|
+
|
|
481
|
+
name?: string | null;
|
|
482
|
+
|
|
483
|
+
nickname?: string | null;
|
|
484
|
+
|
|
485
|
+
phone_number?: string | null;
|
|
486
|
+
|
|
487
|
+
phone_number_verified?: boolean | null;
|
|
488
|
+
|
|
489
|
+
picture?: string | null;
|
|
490
|
+
|
|
491
|
+
preferred_name?: string | null;
|
|
492
|
+
|
|
493
|
+
profile?: string | null;
|
|
494
|
+
|
|
495
|
+
slack?: Slack | null;
|
|
496
|
+
|
|
497
|
+
sub?: string | null;
|
|
498
|
+
|
|
499
|
+
target_arn?: string | null;
|
|
500
|
+
|
|
501
|
+
updated_at?: string | null;
|
|
502
|
+
|
|
503
|
+
website?: string | null;
|
|
179
504
|
|
|
180
|
-
|
|
505
|
+
zoneinfo?: string | null;
|
|
181
506
|
}
|
|
182
507
|
|
|
183
|
-
export
|
|
508
|
+
export namespace UserProfile {
|
|
509
|
+
export interface Address {
|
|
510
|
+
country: string;
|
|
511
|
+
|
|
512
|
+
formatted: string;
|
|
513
|
+
|
|
514
|
+
locality: string;
|
|
515
|
+
|
|
516
|
+
postal_code: string;
|
|
517
|
+
|
|
518
|
+
region: string;
|
|
519
|
+
|
|
520
|
+
street_address: string;
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
export type UserProfileFirebaseToken = string | Array<string>;
|
|
525
|
+
|
|
526
|
+
export interface UserRecipient {
|
|
184
527
|
/**
|
|
185
528
|
* Deprecated - Use `tenant_id` instead.
|
|
186
529
|
*/
|
|
@@ -213,7 +556,7 @@ export interface Recipient {
|
|
|
213
556
|
*/
|
|
214
557
|
phone_number?: string | null;
|
|
215
558
|
|
|
216
|
-
preferences?:
|
|
559
|
+
preferences?: UserRecipient.Preferences | null;
|
|
217
560
|
|
|
218
561
|
/**
|
|
219
562
|
* The id of the tenant the user is associated with.
|
|
@@ -227,75 +570,88 @@ export interface Recipient {
|
|
|
227
570
|
user_id?: string | null;
|
|
228
571
|
}
|
|
229
572
|
|
|
230
|
-
export
|
|
231
|
-
|
|
573
|
+
export namespace UserRecipient {
|
|
574
|
+
export interface Preferences {
|
|
575
|
+
notifications: { [key: string]: Shared.Preference };
|
|
232
576
|
|
|
233
|
-
|
|
577
|
+
categories?: { [key: string]: Shared.Preference } | null;
|
|
578
|
+
|
|
579
|
+
templateId?: string | null;
|
|
580
|
+
}
|
|
234
581
|
}
|
|
235
582
|
|
|
236
|
-
export interface
|
|
237
|
-
|
|
583
|
+
export interface Utm {
|
|
584
|
+
campaign?: string | null;
|
|
238
585
|
|
|
239
|
-
|
|
586
|
+
content?: string | null;
|
|
587
|
+
|
|
588
|
+
medium?: string | null;
|
|
589
|
+
|
|
590
|
+
source?: string | null;
|
|
591
|
+
|
|
592
|
+
term?: string | null;
|
|
240
593
|
}
|
|
241
594
|
|
|
242
|
-
export type
|
|
595
|
+
export type WebhookAuthMode = 'none' | 'basic' | 'bearer';
|
|
243
596
|
|
|
244
|
-
export interface
|
|
597
|
+
export interface WebhookAuthentication {
|
|
245
598
|
/**
|
|
246
|
-
*
|
|
599
|
+
* The authentication mode to use. Defaults to 'none' if not specified.
|
|
247
600
|
*/
|
|
248
|
-
|
|
601
|
+
mode: WebhookAuthMode;
|
|
249
602
|
|
|
250
603
|
/**
|
|
251
|
-
*
|
|
604
|
+
* Token for bearer authentication.
|
|
252
605
|
*/
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
data?: { [key: string]: unknown } | null;
|
|
606
|
+
token?: string | null;
|
|
256
607
|
|
|
257
608
|
/**
|
|
258
|
-
*
|
|
609
|
+
* Password for basic authentication.
|
|
259
610
|
*/
|
|
260
|
-
|
|
611
|
+
password?: string | null;
|
|
261
612
|
|
|
262
613
|
/**
|
|
263
|
-
*
|
|
614
|
+
* Username for basic authentication.
|
|
264
615
|
*/
|
|
265
|
-
|
|
616
|
+
username?: string | null;
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
export type WebhookMethod = 'POST' | 'PUT';
|
|
266
620
|
|
|
621
|
+
export interface WebhookProfile {
|
|
267
622
|
/**
|
|
268
|
-
* The
|
|
623
|
+
* The URL to send the webhook request to.
|
|
269
624
|
*/
|
|
270
|
-
|
|
625
|
+
url: string;
|
|
271
626
|
|
|
272
627
|
/**
|
|
273
|
-
*
|
|
628
|
+
* Authentication configuration for the webhook request.
|
|
274
629
|
*/
|
|
275
|
-
|
|
630
|
+
authentication?: WebhookAuthentication | null;
|
|
276
631
|
|
|
277
|
-
|
|
632
|
+
/**
|
|
633
|
+
* Custom headers to include in the webhook request.
|
|
634
|
+
*/
|
|
635
|
+
headers?: { [key: string]: string } | null;
|
|
278
636
|
|
|
279
637
|
/**
|
|
280
|
-
* The
|
|
638
|
+
* The HTTP method to use for the webhook request. Defaults to POST if not
|
|
639
|
+
* specified.
|
|
281
640
|
*/
|
|
282
|
-
|
|
641
|
+
method?: WebhookMethod | null;
|
|
283
642
|
|
|
284
643
|
/**
|
|
285
|
-
*
|
|
286
|
-
*
|
|
644
|
+
* Specifies what profile information is included in the request payload. Defaults
|
|
645
|
+
* to 'limited' if not specified.
|
|
287
646
|
*/
|
|
288
|
-
|
|
647
|
+
profile?: WebhookProfileType | null;
|
|
289
648
|
}
|
|
290
649
|
|
|
291
|
-
export
|
|
292
|
-
campaign?: string | null;
|
|
293
|
-
|
|
294
|
-
content?: string | null;
|
|
650
|
+
export type WebhookProfileType = 'limited' | 'expanded';
|
|
295
651
|
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
652
|
+
/**
|
|
653
|
+
* Send via webhook
|
|
654
|
+
*/
|
|
655
|
+
export interface WebhookRecipient {
|
|
656
|
+
webhook: WebhookProfile;
|
|
301
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';
|