@trycourier/courier 6.1.3 → 6.2.2

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 (143) hide show
  1. package/Client.d.ts +4 -0
  2. package/Client.js +23 -17
  3. package/api/client/requests/SendMessageRequest.d.ts +1 -0
  4. package/api/resources/audiences/client/Client.js +5 -5
  5. package/api/resources/auditEvents/client/Client.js +2 -2
  6. package/api/resources/authTokens/client/Client.js +1 -1
  7. package/api/resources/automations/client/Client.js +2 -2
  8. package/api/resources/brands/client/Client.js +5 -5
  9. package/api/resources/bulk/client/Client.js +5 -5
  10. package/api/resources/inbound/client/Client.d.ts +43 -0
  11. package/api/resources/inbound/client/Client.js +134 -0
  12. package/api/resources/inbound/client/index.d.ts +1 -0
  13. package/api/resources/inbound/client/index.js +2 -0
  14. package/api/resources/inbound/index.d.ts +2 -0
  15. package/api/resources/inbound/index.js +18 -0
  16. package/api/resources/inbound/types/InboundTrackEvent.d.ts +13 -0
  17. package/api/resources/inbound/types/TrackAcceptedResponse.d.ts +7 -0
  18. package/api/resources/inbound/types/index.d.ts +2 -0
  19. package/api/resources/inbound/types/index.js +18 -0
  20. package/api/resources/index.d.ts +2 -0
  21. package/api/resources/index.js +3 -1
  22. package/api/resources/lists/client/Client.js +10 -10
  23. package/api/resources/messages/client/Client.js +6 -6
  24. package/api/resources/notifications/client/Client.d.ts +2 -61
  25. package/api/resources/notifications/client/Client.js +12 -152
  26. package/api/resources/notifications/client/requests/NotificationListParams.d.ts +6 -1
  27. package/api/resources/notifications/client/requests/index.d.ts +0 -2
  28. package/api/resources/notifications/types/Notification.d.ts +1 -0
  29. package/api/resources/profiles/client/Client.js +7 -7
  30. package/api/resources/profiles/types/Pagerduty.d.ts +9 -0
  31. package/api/resources/profiles/types/UserProfile.d.ts +1 -1
  32. package/api/resources/profiles/types/UserProfileFirebaseToken.d.ts +4 -0
  33. package/api/resources/profiles/types/WebhookAuthMode.d.ts +9 -0
  34. package/api/resources/profiles/types/WebhookAuthMode.js +11 -0
  35. package/api/resources/profiles/types/WebhookAuthentication.d.ts +14 -0
  36. package/api/resources/profiles/types/WebhookMethod.d.ts +8 -0
  37. package/api/resources/profiles/types/WebhookMethod.js +10 -0
  38. package/api/resources/profiles/types/WebhookProfile.d.ts +16 -0
  39. package/api/resources/profiles/types/WebhookProfileType.d.ts +8 -0
  40. package/api/resources/profiles/types/WebhookProfileType.js +10 -0
  41. package/api/resources/profiles/types/index.d.ts +7 -0
  42. package/api/resources/profiles/types/index.js +7 -0
  43. package/api/resources/send/types/BaseMessage.d.ts +1 -0
  44. package/api/resources/send/types/Channel.d.ts +1 -1
  45. package/api/resources/send/types/MessagePreferences.d.ts +7 -0
  46. package/api/resources/send/types/MessagePreferences.js +5 -0
  47. package/api/resources/send/types/PagerdutyRecipient.d.ts +7 -0
  48. package/api/resources/send/types/PagerdutyRecipient.js +5 -0
  49. package/api/resources/send/types/Recipient.d.ts +1 -1
  50. package/api/resources/send/types/WebhookRecipient.d.ts +7 -0
  51. package/api/resources/send/types/WebhookRecipient.js +5 -0
  52. package/api/resources/send/types/index.d.ts +3 -2
  53. package/api/resources/send/types/index.js +3 -2
  54. package/api/resources/templates/client/Client.js +1 -1
  55. package/api/resources/tenants/client/Client.js +7 -7
  56. package/api/resources/translations/client/Client.js +2 -2
  57. package/api/resources/users/resources/preferences/client/Client.js +3 -3
  58. package/api/resources/users/resources/preferences/types/UserPreferencesListResponse.d.ts +1 -0
  59. package/api/resources/users/resources/tenants/client/Client.js +5 -5
  60. package/api/resources/users/resources/tokens/client/Client.js +6 -6
  61. package/dist/Client.d.ts +4 -0
  62. package/dist/Client.js +23 -17
  63. package/dist/api/client/requests/SendMessageRequest.d.ts +1 -0
  64. package/dist/api/resources/audiences/client/Client.js +5 -5
  65. package/dist/api/resources/auditEvents/client/Client.js +2 -2
  66. package/dist/api/resources/authTokens/client/Client.js +1 -1
  67. package/dist/api/resources/automations/client/Client.js +2 -2
  68. package/dist/api/resources/brands/client/Client.js +5 -5
  69. package/dist/api/resources/bulk/client/Client.js +5 -5
  70. package/dist/api/resources/inbound/client/Client.d.ts +43 -0
  71. package/dist/api/resources/inbound/client/Client.js +134 -0
  72. package/dist/api/resources/inbound/client/index.d.ts +1 -0
  73. package/dist/api/resources/inbound/client/index.js +2 -0
  74. package/dist/api/resources/inbound/index.d.ts +2 -0
  75. package/dist/api/resources/inbound/index.js +18 -0
  76. package/dist/api/resources/inbound/types/InboundTrackEvent.d.ts +13 -0
  77. package/dist/api/resources/inbound/types/InboundTrackEvent.js +5 -0
  78. package/dist/api/resources/inbound/types/TrackAcceptedResponse.d.ts +7 -0
  79. package/dist/api/resources/inbound/types/TrackAcceptedResponse.js +5 -0
  80. package/dist/api/resources/inbound/types/index.d.ts +2 -0
  81. package/dist/api/resources/inbound/types/index.js +18 -0
  82. package/dist/api/resources/index.d.ts +2 -0
  83. package/dist/api/resources/index.js +3 -1
  84. package/dist/api/resources/lists/client/Client.js +10 -10
  85. package/dist/api/resources/messages/client/Client.js +6 -6
  86. package/dist/api/resources/notifications/client/Client.d.ts +2 -61
  87. package/dist/api/resources/notifications/client/Client.js +12 -152
  88. package/dist/api/resources/notifications/client/requests/NotificationListParams.d.ts +6 -1
  89. package/dist/api/resources/notifications/client/requests/index.d.ts +0 -2
  90. package/dist/api/resources/notifications/types/Notification.d.ts +1 -0
  91. package/dist/api/resources/profiles/client/Client.js +7 -7
  92. package/dist/api/resources/profiles/types/Pagerduty.d.ts +9 -0
  93. package/dist/api/resources/profiles/types/Pagerduty.js +5 -0
  94. package/dist/api/resources/profiles/types/UserProfile.d.ts +1 -1
  95. package/dist/api/resources/profiles/types/UserProfileFirebaseToken.d.ts +4 -0
  96. package/dist/api/resources/profiles/types/UserProfileFirebaseToken.js +5 -0
  97. package/dist/api/resources/profiles/types/WebhookAuthMode.d.ts +9 -0
  98. package/dist/api/resources/profiles/types/WebhookAuthMode.js +11 -0
  99. package/dist/api/resources/profiles/types/WebhookAuthentication.d.ts +14 -0
  100. package/dist/api/resources/profiles/types/WebhookAuthentication.js +5 -0
  101. package/dist/api/resources/profiles/types/WebhookMethod.d.ts +8 -0
  102. package/dist/api/resources/profiles/types/WebhookMethod.js +10 -0
  103. package/dist/api/resources/profiles/types/WebhookProfile.d.ts +16 -0
  104. package/dist/api/resources/profiles/types/WebhookProfile.js +5 -0
  105. package/dist/api/resources/profiles/types/WebhookProfileType.d.ts +8 -0
  106. package/dist/api/resources/profiles/types/WebhookProfileType.js +10 -0
  107. package/dist/api/resources/profiles/types/index.d.ts +7 -0
  108. package/dist/api/resources/profiles/types/index.js +7 -0
  109. package/dist/api/resources/send/types/BaseMessage.d.ts +1 -0
  110. package/dist/api/resources/send/types/Channel.d.ts +1 -1
  111. package/dist/api/resources/send/types/MessagePreferences.d.ts +7 -0
  112. package/dist/api/resources/send/types/MessagePreferences.js +5 -0
  113. package/dist/api/resources/send/types/PagerdutyRecipient.d.ts +7 -0
  114. package/dist/api/resources/send/types/PagerdutyRecipient.js +5 -0
  115. package/dist/api/resources/send/types/Recipient.d.ts +1 -1
  116. package/dist/api/resources/send/types/WebhookRecipient.d.ts +7 -0
  117. package/dist/api/resources/send/types/WebhookRecipient.js +5 -0
  118. package/dist/api/resources/send/types/index.d.ts +3 -2
  119. package/dist/api/resources/send/types/index.js +3 -2
  120. package/dist/api/resources/templates/client/Client.js +1 -1
  121. package/dist/api/resources/tenants/client/Client.js +7 -7
  122. package/dist/api/resources/translations/client/Client.js +2 -2
  123. package/dist/api/resources/users/resources/preferences/client/Client.js +3 -3
  124. package/dist/api/resources/users/resources/preferences/types/UserPreferencesListResponse.d.ts +1 -0
  125. package/dist/api/resources/users/resources/tenants/client/Client.js +5 -5
  126. package/dist/api/resources/users/resources/tokens/client/Client.js +6 -6
  127. package/package.json +1 -1
  128. package/api/resources/notifications/client/requests/NotificationDraftUpdateVariationsParams.d.ts +0 -33
  129. package/api/resources/notifications/client/requests/NotificationUpdateVariationsParams.d.ts +0 -33
  130. package/api/resources/send/types/MessageChannelEmailOverride.d.ts +0 -16
  131. package/api/resources/send/types/Override.d.ts +0 -8
  132. package/api/resources/send/types/Override.js +0 -10
  133. package/dist/api/resources/notifications/client/requests/NotificationDraftUpdateVariationsParams.d.ts +0 -33
  134. package/dist/api/resources/notifications/client/requests/NotificationUpdateVariationsParams.d.ts +0 -33
  135. package/dist/api/resources/send/types/MessageChannelEmailOverride.d.ts +0 -16
  136. package/dist/api/resources/send/types/Override.d.ts +0 -8
  137. package/dist/api/resources/send/types/Override.js +0 -10
  138. /package/api/resources/{notifications/client/requests/NotificationDraftUpdateVariationsParams.js → inbound/types/InboundTrackEvent.js} +0 -0
  139. /package/api/resources/{notifications/client/requests/NotificationUpdateVariationsParams.js → inbound/types/TrackAcceptedResponse.js} +0 -0
  140. /package/api/resources/{send/types/MessageChannelEmailOverride.js → profiles/types/Pagerduty.js} +0 -0
  141. /package/{dist/api/resources/notifications/client/requests/NotificationDraftUpdateVariationsParams.js → api/resources/profiles/types/UserProfileFirebaseToken.js} +0 -0
  142. /package/{dist/api/resources/notifications/client/requests/NotificationUpdateVariationsParams.js → api/resources/profiles/types/WebhookAuthentication.js} +0 -0
  143. /package/{dist/api/resources/send/types/MessageChannelEmailOverride.js → api/resources/profiles/types/WebhookProfile.js} +0 -0
@@ -53,17 +53,21 @@ class Notifications {
53
53
  *
54
54
  * @example
55
55
  * await courier.notifications.list({
56
- * cursor: "string"
56
+ * cursor: "string",
57
+ * notes: true
57
58
  * })
58
59
  */
59
60
  list(request = {}, requestOptions) {
60
61
  var _a, _b;
61
62
  return __awaiter(this, void 0, void 0, function* () {
62
- const { cursor } = request;
63
+ const { cursor, notes } = request;
63
64
  const _queryParams = {};
64
65
  if (cursor != null) {
65
66
  _queryParams["cursor"] = cursor;
66
67
  }
68
+ if (notes != null) {
69
+ _queryParams["notes"] = notes.toString();
70
+ }
67
71
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
68
72
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CourierEnvironment.Production, "/notifications"),
69
73
  method: "GET",
@@ -71,7 +75,7 @@ class Notifications {
71
75
  Authorization: yield this._getAuthorizationHeader(),
72
76
  "X-Fern-Language": "JavaScript",
73
77
  "X-Fern-SDK-Name": "@trycourier/courier",
74
- "X-Fern-SDK-Version": "v6.1.3",
78
+ "X-Fern-SDK-Version": "v6.2.2",
75
79
  "X-Fern-Runtime": core.RUNTIME.type,
76
80
  "X-Fern-Runtime-Version": core.RUNTIME.version,
77
81
  },
@@ -121,7 +125,7 @@ class Notifications {
121
125
  Authorization: yield this._getAuthorizationHeader(),
122
126
  "X-Fern-Language": "JavaScript",
123
127
  "X-Fern-SDK-Name": "@trycourier/courier",
124
- "X-Fern-SDK-Version": "v6.1.3",
128
+ "X-Fern-SDK-Version": "v6.2.2",
125
129
  "X-Fern-Runtime": core.RUNTIME.type,
126
130
  "X-Fern-Runtime-Version": core.RUNTIME.version,
127
131
  },
@@ -170,7 +174,7 @@ class Notifications {
170
174
  Authorization: yield this._getAuthorizationHeader(),
171
175
  "X-Fern-Language": "JavaScript",
172
176
  "X-Fern-SDK-Name": "@trycourier/courier",
173
- "X-Fern-SDK-Version": "v6.1.3",
177
+ "X-Fern-SDK-Version": "v6.2.2",
174
178
  "X-Fern-Runtime": core.RUNTIME.type,
175
179
  "X-Fern-Runtime-Version": core.RUNTIME.version,
176
180
  },
@@ -202,150 +206,6 @@ class Notifications {
202
206
  }
203
207
  });
204
208
  }
205
- /**
206
- * @param {string} id
207
- * @param {Courier.NotificationUpdateVariationsParams} request
208
- * @param {Notifications.RequestOptions} requestOptions - Request-specific configuration.
209
- *
210
- * @example
211
- * await courier.notifications.updateVariations("string", {
212
- * blocks: [{
213
- * alias: "string",
214
- * context: "string",
215
- * id: "string",
216
- * type: Courier.BlockType.Action,
217
- * content: "string",
218
- * locales: {
219
- * "string": "string"
220
- * },
221
- * checksum: "string"
222
- * }],
223
- * channels: [{
224
- * id: "string",
225
- * type: "string",
226
- * content: {},
227
- * locales: {
228
- * "string": {}
229
- * },
230
- * checksum: "string"
231
- * }]
232
- * })
233
- */
234
- updateVariations(id, request = {}, requestOptions) {
235
- var _a, _b;
236
- return __awaiter(this, void 0, void 0, function* () {
237
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
238
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CourierEnvironment.Production, `/notifications/${encodeURIComponent(id)}/variations`),
239
- method: "POST",
240
- headers: {
241
- Authorization: yield this._getAuthorizationHeader(),
242
- "X-Fern-Language": "JavaScript",
243
- "X-Fern-SDK-Name": "@trycourier/courier",
244
- "X-Fern-SDK-Version": "v6.1.3",
245
- "X-Fern-Runtime": core.RUNTIME.type,
246
- "X-Fern-Runtime-Version": core.RUNTIME.version,
247
- },
248
- contentType: "application/json",
249
- body: request,
250
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
251
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
252
- });
253
- if (_response.ok) {
254
- return;
255
- }
256
- if (_response.error.reason === "status-code") {
257
- throw new errors.CourierError({
258
- statusCode: _response.error.statusCode,
259
- body: _response.error.body,
260
- });
261
- }
262
- switch (_response.error.reason) {
263
- case "non-json":
264
- throw new errors.CourierError({
265
- statusCode: _response.error.statusCode,
266
- body: _response.error.rawBody,
267
- });
268
- case "timeout":
269
- throw new errors.CourierTimeoutError();
270
- case "unknown":
271
- throw new errors.CourierError({
272
- message: _response.error.errorMessage,
273
- });
274
- }
275
- });
276
- }
277
- /**
278
- * @param {string} id
279
- * @param {Courier.NotificationDraftUpdateVariationsParams} request
280
- * @param {Notifications.RequestOptions} requestOptions - Request-specific configuration.
281
- *
282
- * @example
283
- * await courier.notifications.updateDraftVariations("string", {
284
- * blocks: [{
285
- * alias: "string",
286
- * context: "string",
287
- * id: "string",
288
- * type: Courier.BlockType.Action,
289
- * content: "string",
290
- * locales: {
291
- * "string": "string"
292
- * },
293
- * checksum: "string"
294
- * }],
295
- * channels: [{
296
- * id: "string",
297
- * type: "string",
298
- * content: {},
299
- * locales: {
300
- * "string": {}
301
- * },
302
- * checksum: "string"
303
- * }]
304
- * })
305
- */
306
- updateDraftVariations(id, request = {}, requestOptions) {
307
- var _a, _b;
308
- return __awaiter(this, void 0, void 0, function* () {
309
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
310
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CourierEnvironment.Production, `/notifications/${encodeURIComponent(id)}/draft/variations`),
311
- method: "POST",
312
- headers: {
313
- Authorization: yield this._getAuthorizationHeader(),
314
- "X-Fern-Language": "JavaScript",
315
- "X-Fern-SDK-Name": "@trycourier/courier",
316
- "X-Fern-SDK-Version": "v6.1.3",
317
- "X-Fern-Runtime": core.RUNTIME.type,
318
- "X-Fern-Runtime-Version": core.RUNTIME.version,
319
- },
320
- contentType: "application/json",
321
- body: request,
322
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
323
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
324
- });
325
- if (_response.ok) {
326
- return;
327
- }
328
- if (_response.error.reason === "status-code") {
329
- throw new errors.CourierError({
330
- statusCode: _response.error.statusCode,
331
- body: _response.error.body,
332
- });
333
- }
334
- switch (_response.error.reason) {
335
- case "non-json":
336
- throw new errors.CourierError({
337
- statusCode: _response.error.statusCode,
338
- body: _response.error.rawBody,
339
- });
340
- case "timeout":
341
- throw new errors.CourierTimeoutError();
342
- case "unknown":
343
- throw new errors.CourierError({
344
- message: _response.error.errorMessage,
345
- });
346
- }
347
- });
348
- }
349
209
  /**
350
210
  * @param {string} id
351
211
  * @param {string} submissionId
@@ -364,7 +224,7 @@ class Notifications {
364
224
  Authorization: yield this._getAuthorizationHeader(),
365
225
  "X-Fern-Language": "JavaScript",
366
226
  "X-Fern-SDK-Name": "@trycourier/courier",
367
- "X-Fern-SDK-Version": "v6.1.3",
227
+ "X-Fern-SDK-Version": "v6.2.2",
368
228
  "X-Fern-Runtime": core.RUNTIME.type,
369
229
  "X-Fern-Runtime-Version": core.RUNTIME.version,
370
230
  },
@@ -421,7 +281,7 @@ class Notifications {
421
281
  Authorization: yield this._getAuthorizationHeader(),
422
282
  "X-Fern-Language": "JavaScript",
423
283
  "X-Fern-SDK-Name": "@trycourier/courier",
424
- "X-Fern-SDK-Version": "v6.1.3",
284
+ "X-Fern-SDK-Version": "v6.2.2",
425
285
  "X-Fern-Runtime": core.RUNTIME.type,
426
286
  "X-Fern-Runtime-Version": core.RUNTIME.version,
427
287
  },
@@ -472,7 +332,7 @@ class Notifications {
472
332
  Authorization: yield this._getAuthorizationHeader(),
473
333
  "X-Fern-Language": "JavaScript",
474
334
  "X-Fern-SDK-Name": "@trycourier/courier",
475
- "X-Fern-SDK-Version": "v6.1.3",
335
+ "X-Fern-SDK-Version": "v6.2.2",
476
336
  "X-Fern-Runtime": core.RUNTIME.type,
477
337
  "X-Fern-Runtime-Version": core.RUNTIME.version,
478
338
  },
@@ -4,9 +4,14 @@
4
4
  /**
5
5
  * @example
6
6
  * {
7
- * cursor: "string"
7
+ * cursor: "string",
8
+ * notes: true
8
9
  * }
9
10
  */
10
11
  export interface NotificationListParams {
11
12
  cursor?: string;
13
+ /**
14
+ * Retrieve the notes from the Notification template settings.
15
+ */
16
+ notes?: boolean;
12
17
  }
@@ -1,4 +1,2 @@
1
1
  export { type NotificationListParams } from "./NotificationListParams";
2
- export { type NotificationUpdateVariationsParams } from "./NotificationUpdateVariationsParams";
3
- export { type NotificationDraftUpdateVariationsParams } from "./NotificationDraftUpdateVariationsParams";
4
2
  export { type SubmissionChecksReplaceParams } from "./SubmissionChecksReplaceParams";
@@ -10,4 +10,5 @@ export interface Notification {
10
10
  tags?: Courier.NotificationTag;
11
11
  title?: string;
12
12
  topic_id: string;
13
+ note: string;
13
14
  }
@@ -69,7 +69,7 @@ class Profiles {
69
69
  Authorization: yield this._getAuthorizationHeader(),
70
70
  "X-Fern-Language": "JavaScript",
71
71
  "X-Fern-SDK-Name": "@trycourier/courier",
72
- "X-Fern-SDK-Version": "v6.1.3",
72
+ "X-Fern-SDK-Version": "v6.2.2",
73
73
  "X-Fern-Runtime": core.RUNTIME.type,
74
74
  "X-Fern-Runtime-Version": core.RUNTIME.version,
75
75
  },
@@ -134,7 +134,7 @@ class Profiles {
134
134
  Authorization: yield this._getAuthorizationHeader(),
135
135
  "X-Fern-Language": "JavaScript",
136
136
  "X-Fern-SDK-Name": "@trycourier/courier",
137
- "X-Fern-SDK-Version": "v6.1.3",
137
+ "X-Fern-SDK-Version": "v6.2.2",
138
138
  "X-Fern-Runtime": core.RUNTIME.type,
139
139
  "X-Fern-Runtime-Version": core.RUNTIME.version,
140
140
  "Idempotency-Key": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey) != null ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey : undefined,
@@ -205,7 +205,7 @@ class Profiles {
205
205
  Authorization: yield this._getAuthorizationHeader(),
206
206
  "X-Fern-Language": "JavaScript",
207
207
  "X-Fern-SDK-Name": "@trycourier/courier",
208
- "X-Fern-SDK-Version": "v6.1.3",
208
+ "X-Fern-SDK-Version": "v6.2.2",
209
209
  "X-Fern-Runtime": core.RUNTIME.type,
210
210
  "X-Fern-Runtime-Version": core.RUNTIME.version,
211
211
  },
@@ -264,7 +264,7 @@ class Profiles {
264
264
  Authorization: yield this._getAuthorizationHeader(),
265
265
  "X-Fern-Language": "JavaScript",
266
266
  "X-Fern-SDK-Name": "@trycourier/courier",
267
- "X-Fern-SDK-Version": "v6.1.3",
267
+ "X-Fern-SDK-Version": "v6.2.2",
268
268
  "X-Fern-Runtime": core.RUNTIME.type,
269
269
  "X-Fern-Runtime-Version": core.RUNTIME.version,
270
270
  },
@@ -330,7 +330,7 @@ class Profiles {
330
330
  Authorization: yield this._getAuthorizationHeader(),
331
331
  "X-Fern-Language": "JavaScript",
332
332
  "X-Fern-SDK-Name": "@trycourier/courier",
333
- "X-Fern-SDK-Version": "v6.1.3",
333
+ "X-Fern-SDK-Version": "v6.2.2",
334
334
  "X-Fern-Runtime": core.RUNTIME.type,
335
335
  "X-Fern-Runtime-Version": core.RUNTIME.version,
336
336
  },
@@ -392,7 +392,7 @@ class Profiles {
392
392
  Authorization: yield this._getAuthorizationHeader(),
393
393
  "X-Fern-Language": "JavaScript",
394
394
  "X-Fern-SDK-Name": "@trycourier/courier",
395
- "X-Fern-SDK-Version": "v6.1.3",
395
+ "X-Fern-SDK-Version": "v6.2.2",
396
396
  "X-Fern-Runtime": core.RUNTIME.type,
397
397
  "X-Fern-Runtime-Version": core.RUNTIME.version,
398
398
  "Idempotency-Key": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey) != null ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey : undefined,
@@ -453,7 +453,7 @@ class Profiles {
453
453
  Authorization: yield this._getAuthorizationHeader(),
454
454
  "X-Fern-Language": "JavaScript",
455
455
  "X-Fern-SDK-Name": "@trycourier/courier",
456
- "X-Fern-SDK-Version": "v6.1.3",
456
+ "X-Fern-SDK-Version": "v6.2.2",
457
457
  "X-Fern-Runtime": core.RUNTIME.type,
458
458
  "X-Fern-Runtime-Version": core.RUNTIME.version,
459
459
  },
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface Pagerduty {
5
+ routing_key?: string;
6
+ event_action?: string;
7
+ severity?: string;
8
+ source?: string;
9
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -31,7 +31,7 @@ export interface UserProfile {
31
31
  discord: Courier.Discord;
32
32
  expo: Courier.Expo;
33
33
  facebookPSID: string;
34
- firebaseToken: string;
34
+ firebaseToken: Courier.UserProfileFirebaseToken;
35
35
  intercom: Courier.Intercom;
36
36
  slack: Courier.Slack;
37
37
  ms_teams: Courier.MsTeams;
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export declare type UserProfileFirebaseToken = string | string[];
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export declare type WebhookAuthMode = "none" | "basic" | "bearer";
5
+ export declare const WebhookAuthMode: {
6
+ readonly None: "none";
7
+ readonly Basic: "basic";
8
+ readonly Bearer: "bearer";
9
+ };
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.WebhookAuthMode = void 0;
7
+ exports.WebhookAuthMode = {
8
+ None: "none",
9
+ Basic: "basic",
10
+ Bearer: "bearer",
11
+ };
@@ -0,0 +1,14 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Courier from "../../../index";
5
+ export interface WebhookAuthentication {
6
+ /** The authentication mode to use. Defaults to 'none' if not specified. */
7
+ mode: Courier.WebhookAuthMode;
8
+ /** Username for basic authentication. */
9
+ username?: string;
10
+ /** Password for basic authentication. */
11
+ password?: string;
12
+ /** Token for bearer authentication. */
13
+ token?: string;
14
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export declare type WebhookMethod = "POST" | "PUT";
5
+ export declare const WebhookMethod: {
6
+ readonly Post: "POST";
7
+ readonly Put: "PUT";
8
+ };
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.WebhookMethod = void 0;
7
+ exports.WebhookMethod = {
8
+ Post: "POST",
9
+ Put: "PUT",
10
+ };
@@ -0,0 +1,16 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Courier from "../../../index";
5
+ export interface WebhookProfile {
6
+ /** The URL to send the webhook request to. */
7
+ url: string;
8
+ /** The HTTP method to use for the webhook request. Defaults to POST if not specified. */
9
+ method?: Courier.WebhookMethod;
10
+ /** Custom headers to include in the webhook request. */
11
+ headers?: Record<string, string>;
12
+ /** Authentication configuration for the webhook request. */
13
+ authentication?: Courier.WebhookAuthentication;
14
+ /** Specifies what profile information is included in the request payload. Defaults to 'limited' if not specified. */
15
+ profile?: Courier.WebhookProfileType;
16
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export declare type WebhookProfileType = "limited" | "expanded";
5
+ export declare const WebhookProfileType: {
6
+ readonly Limited: "limited";
7
+ readonly Expanded: "expanded";
8
+ };
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.WebhookProfileType = void 0;
7
+ exports.WebhookProfileType = {
8
+ Limited: "limited",
9
+ Expanded: "expanded",
10
+ };
@@ -1,5 +1,6 @@
1
1
  export * from "./Address";
2
2
  export * from "./UserProfile";
3
+ export * from "./UserProfileFirebaseToken";
3
4
  export * from "./AirshipProfile";
4
5
  export * from "./AirshipProfileAudience";
5
6
  export * from "./DeviceType";
@@ -14,6 +15,7 @@ export * from "./MultipleTokens";
14
15
  export * from "./Intercom";
15
16
  export * from "./IntercomRecipient";
16
17
  export * from "./Slack";
18
+ export * from "./Pagerduty";
17
19
  export * from "./SlackBaseProperties";
18
20
  export * from "./SendToSlackChannel";
19
21
  export * from "./SendToSlackEmail";
@@ -35,3 +37,8 @@ export * from "./SubscribeToListsResponse";
35
37
  export * from "./DeleteListSubscriptionResponse";
36
38
  export * from "./GetListSubscriptionsList";
37
39
  export * from "./GetListSubscriptionsResponse";
40
+ export * from "./WebhookProfile";
41
+ export * from "./WebhookMethod";
42
+ export * from "./WebhookAuthentication";
43
+ export * from "./WebhookAuthMode";
44
+ export * from "./WebhookProfileType";
@@ -16,6 +16,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./Address"), exports);
18
18
  __exportStar(require("./UserProfile"), exports);
19
+ __exportStar(require("./UserProfileFirebaseToken"), exports);
19
20
  __exportStar(require("./AirshipProfile"), exports);
20
21
  __exportStar(require("./AirshipProfileAudience"), exports);
21
22
  __exportStar(require("./DeviceType"), exports);
@@ -30,6 +31,7 @@ __exportStar(require("./MultipleTokens"), exports);
30
31
  __exportStar(require("./Intercom"), exports);
31
32
  __exportStar(require("./IntercomRecipient"), exports);
32
33
  __exportStar(require("./Slack"), exports);
34
+ __exportStar(require("./Pagerduty"), exports);
33
35
  __exportStar(require("./SlackBaseProperties"), exports);
34
36
  __exportStar(require("./SendToSlackChannel"), exports);
35
37
  __exportStar(require("./SendToSlackEmail"), exports);
@@ -51,3 +53,8 @@ __exportStar(require("./SubscribeToListsResponse"), exports);
51
53
  __exportStar(require("./DeleteListSubscriptionResponse"), exports);
52
54
  __exportStar(require("./GetListSubscriptionsList"), exports);
53
55
  __exportStar(require("./GetListSubscriptionsResponse"), exports);
56
+ __exportStar(require("./WebhookProfile"), exports);
57
+ __exportStar(require("./WebhookMethod"), exports);
58
+ __exportStar(require("./WebhookAuthentication"), exports);
59
+ __exportStar(require("./WebhookAuthMode"), exports);
60
+ __exportStar(require("./WebhookProfileType"), exports);
@@ -15,6 +15,7 @@ export interface BaseMessage {
15
15
  context?: Courier.MessageContext;
16
16
  /** Metadata such as utm tracking attached with the notification through this channel. */
17
17
  metadata?: Courier.MessageMetadata;
18
+ preferences?: Courier.MessagePreferences;
18
19
  /** An object whose keys are valid provider identifiers which map to an object. */
19
20
  providers?: Courier.MessageProviders;
20
21
  routing?: Courier.Routing;
@@ -27,6 +27,6 @@ export interface Channel {
27
27
  if?: string;
28
28
  timeouts?: Courier.Timeouts;
29
29
  /** Channel specific overrides. */
30
- override?: Courier.Override;
30
+ override?: Record<string, any>;
31
31
  metadata?: Courier.ChannelMetadata;
32
32
  }
@@ -0,0 +1,7 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface MessagePreferences {
5
+ /** The ID of the subscription topic you want to apply to the message. If this is a templated message, it will override the subscription topic if already associated */
6
+ subscription_topic_id: string;
7
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,7 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Courier from "../../../index";
5
+ export interface PagerdutyRecipient {
6
+ pagerduty: Courier.Pagerduty;
7
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -2,4 +2,4 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  import * as Courier from "../../../index";
5
- export declare type Recipient = Courier.AudienceRecipient | Courier.ListRecipient | Courier.ListPatternRecipient | Courier.UserRecipient | Courier.SlackRecipient | Courier.MsTeamsRecipient | Courier.RecipientData;
5
+ export declare type Recipient = Courier.AudienceRecipient | Courier.ListRecipient | Courier.ListPatternRecipient | Courier.UserRecipient | Courier.SlackRecipient | Courier.MsTeamsRecipient | Courier.RecipientData | Courier.PagerdutyRecipient | Courier.WebhookRecipient;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Courier from "../../../index";
5
+ export interface WebhookRecipient {
6
+ webhook: Courier.WebhookProfile;
7
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -5,6 +5,8 @@ export * from "./BaseMessageSendTo";
5
5
  export * from "./BaseMessage";
6
6
  export * from "./MessageRecipient";
7
7
  export * from "./Recipient";
8
+ export * from "./WebhookRecipient";
9
+ export * from "./PagerdutyRecipient";
8
10
  export * from "./SlackRecipient";
9
11
  export * from "./MsTeamsRecipient";
10
12
  export * from "./AudienceRecipient";
@@ -33,8 +35,6 @@ export * from "./Timeout";
33
35
  export * from "./Criteria";
34
36
  export * from "./RoutingMethod";
35
37
  export * from "./Timeouts";
36
- export * from "./Override";
37
- export * from "./MessageChannelEmailOverride";
38
38
  export * from "./Attachment";
39
39
  export * from "./MessageMetadata";
40
40
  export * from "./Utm";
@@ -80,6 +80,7 @@ export * from "./Preferences";
80
80
  export * from "./RoutingStrategyProvider";
81
81
  export * from "./Metadata";
82
82
  export * from "./RoutingStrategyChannel";
83
+ export * from "./MessagePreferences";
83
84
  export * from "./MessageProviders";
84
85
  export * from "./MessageProvidersType";
85
86
  export * from "./RoutingChannel";