@trycourier/courier 7.3.0 → 7.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.
Files changed (190) hide show
  1. package/CHANGELOG.md +136 -0
  2. package/LICENSE +1 -1
  3. package/README.md +34 -345
  4. package/client.d.mts +53 -8
  5. package/client.d.mts.map +1 -1
  6. package/client.d.ts +53 -8
  7. package/client.d.ts.map +1 -1
  8. package/client.js +26 -9
  9. package/client.js.map +1 -1
  10. package/client.mjs +27 -10
  11. package/client.mjs.map +1 -1
  12. package/internal/parse.d.mts.map +1 -1
  13. package/internal/parse.d.ts.map +1 -1
  14. package/internal/parse.js +5 -0
  15. package/internal/parse.js.map +1 -1
  16. package/internal/parse.mjs +5 -0
  17. package/internal/parse.mjs.map +1 -1
  18. package/internal/utils/query.d.mts +2 -0
  19. package/internal/utils/query.d.mts.map +1 -0
  20. package/internal/utils/query.d.ts +2 -0
  21. package/internal/utils/query.d.ts.map +1 -0
  22. package/internal/utils/query.js +10 -0
  23. package/internal/utils/query.js.map +1 -0
  24. package/internal/utils/query.mjs +6 -0
  25. package/internal/utils/query.mjs.map +1 -0
  26. package/internal/utils.d.mts +1 -0
  27. package/internal/utils.d.ts +1 -0
  28. package/internal/utils.js +1 -0
  29. package/internal/utils.js.map +1 -1
  30. package/internal/utils.mjs +1 -0
  31. package/package.json +12 -1
  32. package/resources/audiences.d.mts +11 -33
  33. package/resources/audiences.d.mts.map +1 -1
  34. package/resources/audiences.d.ts +11 -33
  35. package/resources/audiences.d.ts.map +1 -1
  36. package/resources/automations/automations.d.mts +54 -1
  37. package/resources/automations/automations.d.mts.map +1 -1
  38. package/resources/automations/automations.d.ts +54 -1
  39. package/resources/automations/automations.d.ts.map +1 -1
  40. package/resources/automations/automations.js +12 -0
  41. package/resources/automations/automations.js.map +1 -1
  42. package/resources/automations/automations.mjs +12 -0
  43. package/resources/automations/automations.mjs.map +1 -1
  44. package/resources/automations/index.d.mts +1 -1
  45. package/resources/automations/index.d.mts.map +1 -1
  46. package/resources/automations/index.d.ts +1 -1
  47. package/resources/automations/index.d.ts.map +1 -1
  48. package/resources/automations/index.js.map +1 -1
  49. package/resources/automations/index.mjs +1 -1
  50. package/resources/automations/index.mjs.map +1 -1
  51. package/resources/bulk.d.mts +80 -39
  52. package/resources/bulk.d.mts.map +1 -1
  53. package/resources/bulk.d.ts +80 -39
  54. package/resources/bulk.d.ts.map +1 -1
  55. package/resources/bulk.js +12 -2
  56. package/resources/bulk.js.map +1 -1
  57. package/resources/bulk.mjs +12 -2
  58. package/resources/bulk.mjs.map +1 -1
  59. package/resources/inbound.d.mts +1 -1
  60. package/resources/inbound.d.ts +1 -1
  61. package/resources/index.d.mts +4 -3
  62. package/resources/index.d.mts.map +1 -1
  63. package/resources/index.d.ts +4 -3
  64. package/resources/index.d.ts.map +1 -1
  65. package/resources/index.js +3 -1
  66. package/resources/index.js.map +1 -1
  67. package/resources/index.mjs +2 -1
  68. package/resources/index.mjs.map +1 -1
  69. package/resources/journeys.d.mts +143 -0
  70. package/resources/journeys.d.mts.map +1 -0
  71. package/resources/journeys.d.ts +143 -0
  72. package/resources/journeys.d.ts.map +1 -0
  73. package/resources/journeys.js +38 -0
  74. package/resources/journeys.js.map +1 -0
  75. package/resources/journeys.mjs +34 -0
  76. package/resources/journeys.mjs.map +1 -0
  77. package/resources/lists/subscriptions.d.mts +1 -1
  78. package/resources/lists/subscriptions.d.ts +1 -1
  79. package/resources/messages.d.mts +20 -20
  80. package/resources/messages.d.mts.map +1 -1
  81. package/resources/messages.d.ts +20 -20
  82. package/resources/messages.d.ts.map +1 -1
  83. package/resources/notifications/checks.d.mts +2 -2
  84. package/resources/notifications/checks.d.ts +2 -2
  85. package/resources/send.d.mts +8 -2
  86. package/resources/send.d.mts.map +1 -1
  87. package/resources/send.d.ts +8 -2
  88. package/resources/send.d.ts.map +1 -1
  89. package/resources/send.js +1 -1
  90. package/resources/send.mjs +1 -1
  91. package/resources/shared.d.mts +290 -52
  92. package/resources/shared.d.mts.map +1 -1
  93. package/resources/shared.d.ts +290 -52
  94. package/resources/shared.d.ts.map +1 -1
  95. package/resources/tenants/index.d.mts +2 -2
  96. package/resources/tenants/index.d.mts.map +1 -1
  97. package/resources/tenants/index.d.ts +2 -2
  98. package/resources/tenants/index.d.ts.map +1 -1
  99. package/resources/tenants/index.js +2 -2
  100. package/resources/tenants/index.js.map +1 -1
  101. package/resources/tenants/index.mjs +1 -1
  102. package/resources/tenants/index.mjs.map +1 -1
  103. package/resources/tenants/preferences/items.d.mts +2 -2
  104. package/resources/tenants/preferences/items.d.ts +2 -2
  105. package/resources/tenants/templates/index.d.mts +3 -0
  106. package/resources/tenants/templates/index.d.mts.map +1 -0
  107. package/resources/tenants/templates/index.d.ts +3 -0
  108. package/resources/tenants/templates/index.d.ts.map +1 -0
  109. package/resources/tenants/templates/index.js +9 -0
  110. package/resources/tenants/templates/index.js.map +1 -0
  111. package/resources/tenants/templates/index.mjs +4 -0
  112. package/resources/tenants/templates/index.mjs.map +1 -0
  113. package/resources/tenants/templates/templates.d.mts +159 -0
  114. package/resources/tenants/templates/templates.d.mts.map +1 -0
  115. package/resources/tenants/templates/templates.d.ts +159 -0
  116. package/resources/tenants/templates/templates.d.ts.map +1 -0
  117. package/resources/tenants/templates/templates.js +91 -0
  118. package/resources/tenants/templates/templates.js.map +1 -0
  119. package/resources/tenants/templates/templates.mjs +86 -0
  120. package/resources/tenants/templates/templates.mjs.map +1 -0
  121. package/resources/tenants/templates/versions.d.mts +39 -0
  122. package/resources/tenants/templates/versions.d.mts.map +1 -0
  123. package/resources/tenants/templates/versions.d.ts +39 -0
  124. package/resources/tenants/templates/versions.d.ts.map +1 -0
  125. package/resources/tenants/templates/versions.js +32 -0
  126. package/resources/tenants/templates/versions.js.map +1 -0
  127. package/resources/tenants/templates/versions.mjs +28 -0
  128. package/resources/tenants/templates/versions.mjs.map +1 -0
  129. package/resources/tenants/templates.d.mts +1 -90
  130. package/resources/tenants/templates.d.mts.map +1 -1
  131. package/resources/tenants/templates.d.ts +1 -90
  132. package/resources/tenants/templates.d.ts.map +1 -1
  133. package/resources/tenants/templates.js +2 -34
  134. package/resources/tenants/templates.js.map +1 -1
  135. package/resources/tenants/templates.mjs +1 -32
  136. package/resources/tenants/templates.mjs.map +1 -1
  137. package/resources/tenants/tenants.d.mts +147 -5
  138. package/resources/tenants/tenants.d.mts.map +1 -1
  139. package/resources/tenants/tenants.d.ts +147 -5
  140. package/resources/tenants/tenants.d.ts.map +1 -1
  141. package/resources/tenants/tenants.js +2 -2
  142. package/resources/tenants/tenants.js.map +1 -1
  143. package/resources/tenants/tenants.mjs +2 -2
  144. package/resources/tenants/tenants.mjs.map +1 -1
  145. package/resources/translations.d.mts +1 -1
  146. package/resources/translations.d.ts +1 -1
  147. package/resources/users/preferences.d.mts +1 -1
  148. package/resources/users/preferences.d.ts +1 -1
  149. package/resources/users/tenants.d.mts +1 -1
  150. package/resources/users/tenants.d.ts +1 -1
  151. package/resources/users/tokens.d.mts +3 -8
  152. package/resources/users/tokens.d.mts.map +1 -1
  153. package/resources/users/tokens.d.ts +3 -8
  154. package/resources/users/tokens.d.ts.map +1 -1
  155. package/resources/users/tokens.js +2 -3
  156. package/resources/users/tokens.js.map +1 -1
  157. package/resources/users/tokens.mjs +2 -3
  158. package/resources/users/tokens.mjs.map +1 -1
  159. package/src/client.ts +115 -19
  160. package/src/internal/parse.ts +6 -0
  161. package/src/internal/utils/query.ts +7 -0
  162. package/src/internal/utils.ts +1 -0
  163. package/src/resources/audiences.ts +11 -69
  164. package/src/resources/automations/automations.ts +74 -1
  165. package/src/resources/automations/index.ts +7 -1
  166. package/src/resources/bulk.ts +71 -32
  167. package/src/resources/inbound.ts +1 -1
  168. package/src/resources/index.ts +21 -3
  169. package/src/resources/journeys.ts +174 -0
  170. package/src/resources/lists/subscriptions.ts +1 -1
  171. package/src/resources/messages.ts +24 -24
  172. package/src/resources/notifications/checks.ts +2 -2
  173. package/src/resources/send.ts +28 -2
  174. package/src/resources/shared.ts +391 -49
  175. package/src/resources/tenants/index.ts +8 -1
  176. package/src/resources/tenants/preferences/items.ts +2 -2
  177. package/src/resources/tenants/templates/index.ts +11 -0
  178. package/src/resources/tenants/templates/templates.ts +222 -0
  179. package/src/resources/tenants/templates/versions.ts +55 -0
  180. package/src/resources/tenants/templates.ts +1 -122
  181. package/src/resources/tenants/tenants.ts +179 -3
  182. package/src/resources/translations.ts +1 -1
  183. package/src/resources/users/preferences.ts +1 -1
  184. package/src/resources/users/tenants.ts +1 -1
  185. package/src/resources/users/tokens.ts +4 -10
  186. package/src/version.ts +1 -1
  187. package/version.d.mts +1 -1
  188. package/version.d.ts +1 -1
  189. package/version.js +1 -1
  190. package/version.mjs +1 -1
@@ -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: string;
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 Recipient {
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
- * Context such as tenant_id to send the notification with.
185
- */
186
- context?: MessageContext | null;
344
+ notifications?: { [key: string]: NotificationPreferenceDetails } | null;
345
+ }
187
346
 
188
- data?: { [key: string]: unknown } | null;
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
- * The user's email address.
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
- * The id of the list to send the message to.
197
- */
198
- list_id?: string | null;
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
- * The user's phone number.
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
- preferences?: Recipient.Preferences | null;
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
- export namespace Recipient {
225
- export interface Preferences {
226
- notifications: { [key: string]: Shared.Preference };
493
+ profile?: string | null;
227
494
 
228
- categories?: { [key: string]: Shared.Preference } | null;
495
+ slack?: Slack | null;
229
496
 
230
- templateId?: string | null;
231
- }
232
- }
497
+ sub?: string | null;
233
498
 
234
- export interface RecipientPreferences {
235
- categories?: { [key: string]: NotificationPreferenceDetails } | null;
499
+ target_arn?: string | null;
236
500
 
237
- notifications?: { [key: string]: NotificationPreferenceDetails } | null;
501
+ updated_at?: string | null;
502
+
503
+ website?: string | null;
504
+
505
+ zoneinfo?: string | null;
238
506
  }
239
507
 
240
- export interface Rule {
241
- until: string;
508
+ export namespace UserProfile {
509
+ export interface Address {
510
+ country: string;
242
511
 
243
- start?: string | null;
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 TextStyle = 'text' | 'h1' | 'h2' | 'subtext';
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
- } from './templates';
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 prefernces that are set, but a user can still customize their
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';