@trycourier/courier 6.1.0 → 6.1.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/Client.js +1 -1
- package/README.md +5 -5
- package/api/resources/audiences/client/Client.js +5 -5
- package/api/resources/auditEvents/client/Client.js +2 -2
- package/api/resources/authTokens/client/Client.js +1 -1
- package/api/resources/automations/client/Client.d.ts +15 -0
- package/api/resources/automations/client/Client.js +17 -2
- package/api/resources/automations/types/AccessorType.d.ts +6 -0
- package/api/resources/automations/types/AccessorType.js +5 -0
- package/api/resources/automations/types/AutomationAddToBatchMaxItemsType.d.ts +4 -0
- package/api/resources/automations/types/AutomationAddToBatchMaxItemsType.js +5 -0
- package/api/resources/automations/types/AutomationAddToBatchRetain.d.ts +34 -0
- package/api/resources/automations/types/AutomationAddToBatchRetain.js +5 -0
- package/api/resources/automations/types/AutomationAddToBatchRetainType.d.ts +10 -0
- package/api/resources/automations/types/AutomationAddToBatchRetainType.js +12 -0
- package/api/resources/automations/types/AutomationAddToBatchScope.d.ts +9 -0
- package/api/resources/automations/types/AutomationAddToBatchScope.js +11 -0
- package/api/resources/automations/types/AutomationAddToBatchStep.d.ts +39 -0
- package/api/resources/automations/types/AutomationAddToBatchStep.js +5 -0
- package/api/resources/automations/types/AutomationAddToDigestStep.d.ts +16 -0
- package/api/resources/automations/types/AutomationAddToDigestStep.js +5 -0
- package/api/resources/automations/types/AutomationDelayStep.d.ts +3 -0
- package/api/resources/automations/types/AutomationFetchDataStep.d.ts +31 -0
- package/api/resources/automations/types/AutomationFetchDataStep.js +5 -0
- package/api/resources/automations/types/AutomationFetchDataWebhook.d.ts +11 -0
- package/api/resources/automations/types/AutomationFetchDataWebhook.js +5 -0
- package/api/resources/automations/types/AutomationFetchDataWebhookMethod.d.ts +8 -0
- package/api/resources/automations/types/AutomationFetchDataWebhookMethod.js +10 -0
- package/api/resources/automations/types/AutomationStepOption.d.ts +1 -1
- package/api/resources/automations/types/AutomationThrottleOnThrottle.d.ts +7 -0
- package/api/resources/automations/types/AutomationThrottleOnThrottle.js +5 -0
- package/api/resources/automations/types/AutomationThrottleScope.d.ts +9 -0
- package/api/resources/automations/types/AutomationThrottleScope.js +11 -0
- package/api/resources/automations/types/AutomationThrottleStep.d.ts +31 -0
- package/api/resources/automations/types/AutomationThrottleStep.js +5 -0
- package/api/resources/automations/types/index.d.ts +13 -1
- package/api/resources/automations/types/index.js +13 -1
- package/api/resources/brands/client/Client.js +5 -5
- package/api/resources/bulk/client/Client.js +5 -5
- package/api/resources/lists/client/Client.js +10 -10
- package/api/resources/messages/client/Client.js +42 -12
- package/api/resources/messages/client/requests/ListMessagesRequest.d.ts +23 -3
- package/api/resources/messages/types/MessageStatus.d.ts +4 -0
- package/api/resources/messages/types/MessageStatus.js +1 -0
- package/api/resources/notifications/client/Client.js +8 -8
- package/api/resources/profiles/client/Client.js +7 -7
- package/api/resources/send/types/BaseMessageSendTo.d.ts +8 -0
- package/api/resources/send/types/BaseMessageSendTo.js +5 -0
- package/api/resources/send/types/ContentMessage.d.ts +1 -3
- package/api/resources/send/types/Recipient.d.ts +1 -1
- package/api/resources/send/types/RecipientData.d.ts +4 -0
- package/api/resources/send/types/RecipientData.js +5 -0
- package/api/resources/send/types/TemplateMessage.d.ts +1 -3
- package/api/resources/send/types/index.d.ts +2 -0
- package/api/resources/send/types/index.js +2 -0
- package/api/resources/templates/client/Client.js +1 -1
- package/api/resources/tenants/client/Client.js +5 -5
- package/api/resources/translations/client/Client.js +2 -2
- package/api/resources/users/resources/preferences/client/Client.d.ts +9 -0
- package/api/resources/users/resources/preferences/client/Client.js +12 -3
- package/api/resources/users/resources/preferences/client/requests/UserPreferencesUpdateParams.d.ts +11 -5
- package/api/resources/users/resources/preferences/types/TopicPreferenceUpdate.d.ts +10 -0
- package/api/resources/users/resources/preferences/types/TopicPreferenceUpdate.js +5 -0
- package/api/resources/users/resources/preferences/types/index.d.ts +1 -0
- package/api/resources/users/resources/preferences/types/index.js +1 -0
- package/api/resources/users/resources/tenants/client/Client.js +5 -5
- package/api/resources/users/resources/tokens/client/Client.js +5 -5
- package/dist/Client.js +1 -1
- package/dist/api/resources/audiences/client/Client.js +5 -5
- package/dist/api/resources/auditEvents/client/Client.js +2 -2
- package/dist/api/resources/authTokens/client/Client.js +1 -1
- package/dist/api/resources/automations/client/Client.d.ts +15 -0
- package/dist/api/resources/automations/client/Client.js +17 -2
- package/dist/api/resources/automations/types/AccessorType.d.ts +6 -0
- package/dist/api/resources/automations/types/AccessorType.js +5 -0
- package/dist/api/resources/automations/types/AutomationAddToBatchMaxItemsType.d.ts +4 -0
- package/dist/api/resources/automations/types/AutomationAddToBatchMaxItemsType.js +5 -0
- package/dist/api/resources/automations/types/AutomationAddToBatchRetain.d.ts +34 -0
- package/dist/api/resources/automations/types/AutomationAddToBatchRetain.js +5 -0
- package/dist/api/resources/automations/types/AutomationAddToBatchRetainType.d.ts +10 -0
- package/dist/api/resources/automations/types/AutomationAddToBatchRetainType.js +12 -0
- package/dist/api/resources/automations/types/AutomationAddToBatchScope.d.ts +9 -0
- package/dist/api/resources/automations/types/AutomationAddToBatchScope.js +11 -0
- package/dist/api/resources/automations/types/AutomationAddToBatchStep.d.ts +39 -0
- package/dist/api/resources/automations/types/AutomationAddToBatchStep.js +5 -0
- package/dist/api/resources/automations/types/AutomationAddToDigestStep.d.ts +16 -0
- package/dist/api/resources/automations/types/AutomationAddToDigestStep.js +5 -0
- package/dist/api/resources/automations/types/AutomationDelayStep.d.ts +3 -0
- package/dist/api/resources/automations/types/AutomationFetchDataStep.d.ts +31 -0
- package/dist/api/resources/automations/types/AutomationFetchDataStep.js +5 -0
- package/dist/api/resources/automations/types/AutomationFetchDataWebhook.d.ts +11 -0
- package/dist/api/resources/automations/types/AutomationFetchDataWebhook.js +5 -0
- package/dist/api/resources/automations/types/AutomationFetchDataWebhookMethod.d.ts +8 -0
- package/dist/api/resources/automations/types/AutomationFetchDataWebhookMethod.js +10 -0
- package/dist/api/resources/automations/types/AutomationStepOption.d.ts +1 -1
- package/dist/api/resources/automations/types/AutomationThrottleOnThrottle.d.ts +7 -0
- package/dist/api/resources/automations/types/AutomationThrottleOnThrottle.js +5 -0
- package/dist/api/resources/automations/types/AutomationThrottleScope.d.ts +9 -0
- package/dist/api/resources/automations/types/AutomationThrottleScope.js +11 -0
- package/dist/api/resources/automations/types/AutomationThrottleStep.d.ts +31 -0
- package/dist/api/resources/automations/types/AutomationThrottleStep.js +5 -0
- package/dist/api/resources/automations/types/index.d.ts +13 -1
- package/dist/api/resources/automations/types/index.js +13 -1
- package/dist/api/resources/brands/client/Client.js +5 -5
- package/dist/api/resources/bulk/client/Client.js +5 -5
- package/dist/api/resources/lists/client/Client.js +10 -10
- package/dist/api/resources/messages/client/Client.js +42 -12
- package/dist/api/resources/messages/client/requests/ListMessagesRequest.d.ts +23 -3
- package/dist/api/resources/messages/types/MessageStatus.d.ts +4 -0
- package/dist/api/resources/messages/types/MessageStatus.js +1 -0
- package/dist/api/resources/notifications/client/Client.js +8 -8
- package/dist/api/resources/profiles/client/Client.js +7 -7
- package/dist/api/resources/send/types/BaseMessageSendTo.d.ts +8 -0
- package/dist/api/resources/send/types/BaseMessageSendTo.js +5 -0
- package/dist/api/resources/send/types/ContentMessage.d.ts +1 -3
- package/dist/api/resources/send/types/Recipient.d.ts +1 -1
- package/dist/api/resources/send/types/RecipientData.d.ts +4 -0
- package/dist/api/resources/send/types/RecipientData.js +5 -0
- package/dist/api/resources/send/types/TemplateMessage.d.ts +1 -3
- package/dist/api/resources/send/types/index.d.ts +2 -0
- package/dist/api/resources/send/types/index.js +2 -0
- package/dist/api/resources/templates/client/Client.js +1 -1
- package/dist/api/resources/tenants/client/Client.js +5 -5
- package/dist/api/resources/translations/client/Client.js +2 -2
- package/dist/api/resources/users/resources/preferences/client/Client.d.ts +9 -0
- package/dist/api/resources/users/resources/preferences/client/Client.js +12 -3
- package/dist/api/resources/users/resources/preferences/client/requests/UserPreferencesUpdateParams.d.ts +11 -5
- package/dist/api/resources/users/resources/preferences/types/TopicPreferenceUpdate.d.ts +10 -0
- package/dist/api/resources/users/resources/preferences/types/TopicPreferenceUpdate.js +5 -0
- package/dist/api/resources/users/resources/preferences/types/index.d.ts +1 -0
- package/dist/api/resources/users/resources/preferences/types/index.js +1 -0
- package/dist/api/resources/users/resources/tenants/client/Client.js +5 -5
- package/dist/api/resources/users/resources/tokens/client/Client.js +5 -5
- package/package.json +1 -1
- package/api/resources/automations/types/AutomationStepAction.d.ts +0 -12
- package/api/resources/automations/types/AutomationStepAction.js +0 -14
- package/dist/api/resources/automations/types/AutomationStepAction.d.ts +0 -12
- package/dist/api/resources/automations/types/AutomationStepAction.js +0 -14
|
@@ -62,7 +62,7 @@ class Notifications {
|
|
|
62
62
|
Authorization: yield this._getAuthorizationHeader(),
|
|
63
63
|
"X-Fern-Language": "JavaScript",
|
|
64
64
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
65
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
65
|
+
"X-Fern-SDK-Version": "v6.1.1",
|
|
66
66
|
},
|
|
67
67
|
contentType: "application/json",
|
|
68
68
|
queryParameters: _queryParams,
|
|
@@ -103,7 +103,7 @@ class Notifications {
|
|
|
103
103
|
Authorization: yield this._getAuthorizationHeader(),
|
|
104
104
|
"X-Fern-Language": "JavaScript",
|
|
105
105
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
106
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
106
|
+
"X-Fern-SDK-Version": "v6.1.1",
|
|
107
107
|
},
|
|
108
108
|
contentType: "application/json",
|
|
109
109
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -143,7 +143,7 @@ class Notifications {
|
|
|
143
143
|
Authorization: yield this._getAuthorizationHeader(),
|
|
144
144
|
"X-Fern-Language": "JavaScript",
|
|
145
145
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
146
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
146
|
+
"X-Fern-SDK-Version": "v6.1.1",
|
|
147
147
|
},
|
|
148
148
|
contentType: "application/json",
|
|
149
149
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -183,7 +183,7 @@ class Notifications {
|
|
|
183
183
|
Authorization: yield this._getAuthorizationHeader(),
|
|
184
184
|
"X-Fern-Language": "JavaScript",
|
|
185
185
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
186
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
186
|
+
"X-Fern-SDK-Version": "v6.1.1",
|
|
187
187
|
},
|
|
188
188
|
contentType: "application/json",
|
|
189
189
|
body: request,
|
|
@@ -224,7 +224,7 @@ class Notifications {
|
|
|
224
224
|
Authorization: yield this._getAuthorizationHeader(),
|
|
225
225
|
"X-Fern-Language": "JavaScript",
|
|
226
226
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
227
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
227
|
+
"X-Fern-SDK-Version": "v6.1.1",
|
|
228
228
|
},
|
|
229
229
|
contentType: "application/json",
|
|
230
230
|
body: request,
|
|
@@ -265,7 +265,7 @@ class Notifications {
|
|
|
265
265
|
Authorization: yield this._getAuthorizationHeader(),
|
|
266
266
|
"X-Fern-Language": "JavaScript",
|
|
267
267
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
268
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
268
|
+
"X-Fern-SDK-Version": "v6.1.1",
|
|
269
269
|
},
|
|
270
270
|
contentType: "application/json",
|
|
271
271
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -305,7 +305,7 @@ class Notifications {
|
|
|
305
305
|
Authorization: yield this._getAuthorizationHeader(),
|
|
306
306
|
"X-Fern-Language": "JavaScript",
|
|
307
307
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
308
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
308
|
+
"X-Fern-SDK-Version": "v6.1.1",
|
|
309
309
|
},
|
|
310
310
|
contentType: "application/json",
|
|
311
311
|
body: request,
|
|
@@ -346,7 +346,7 @@ class Notifications {
|
|
|
346
346
|
Authorization: yield this._getAuthorizationHeader(),
|
|
347
347
|
"X-Fern-Language": "JavaScript",
|
|
348
348
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
349
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
349
|
+
"X-Fern-SDK-Version": "v6.1.1",
|
|
350
350
|
},
|
|
351
351
|
contentType: "application/json",
|
|
352
352
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -62,7 +62,7 @@ class Profiles {
|
|
|
62
62
|
Authorization: yield this._getAuthorizationHeader(),
|
|
63
63
|
"X-Fern-Language": "JavaScript",
|
|
64
64
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
65
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
65
|
+
"X-Fern-SDK-Version": "v6.1.1",
|
|
66
66
|
},
|
|
67
67
|
contentType: "application/json",
|
|
68
68
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -111,7 +111,7 @@ class Profiles {
|
|
|
111
111
|
Authorization: yield this._getAuthorizationHeader(),
|
|
112
112
|
"X-Fern-Language": "JavaScript",
|
|
113
113
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
114
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
114
|
+
"X-Fern-SDK-Version": "v6.1.1",
|
|
115
115
|
"Idempotency-Key": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey) != null ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey : undefined,
|
|
116
116
|
"X-Idempotency-Expiration": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry) != null
|
|
117
117
|
? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry.toString()
|
|
@@ -168,7 +168,7 @@ class Profiles {
|
|
|
168
168
|
Authorization: yield this._getAuthorizationHeader(),
|
|
169
169
|
"X-Fern-Language": "JavaScript",
|
|
170
170
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
171
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
171
|
+
"X-Fern-SDK-Version": "v6.1.1",
|
|
172
172
|
},
|
|
173
173
|
contentType: "application/json",
|
|
174
174
|
body: request,
|
|
@@ -218,7 +218,7 @@ class Profiles {
|
|
|
218
218
|
Authorization: yield this._getAuthorizationHeader(),
|
|
219
219
|
"X-Fern-Language": "JavaScript",
|
|
220
220
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
221
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
221
|
+
"X-Fern-SDK-Version": "v6.1.1",
|
|
222
222
|
},
|
|
223
223
|
contentType: "application/json",
|
|
224
224
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -272,7 +272,7 @@ class Profiles {
|
|
|
272
272
|
Authorization: yield this._getAuthorizationHeader(),
|
|
273
273
|
"X-Fern-Language": "JavaScript",
|
|
274
274
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
275
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
275
|
+
"X-Fern-SDK-Version": "v6.1.1",
|
|
276
276
|
},
|
|
277
277
|
contentType: "application/json",
|
|
278
278
|
queryParameters: _queryParams,
|
|
@@ -322,7 +322,7 @@ class Profiles {
|
|
|
322
322
|
Authorization: yield this._getAuthorizationHeader(),
|
|
323
323
|
"X-Fern-Language": "JavaScript",
|
|
324
324
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
325
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
325
|
+
"X-Fern-SDK-Version": "v6.1.1",
|
|
326
326
|
"Idempotency-Key": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey) != null ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey : undefined,
|
|
327
327
|
"X-Idempotency-Expiration": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry) != null
|
|
328
328
|
? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry.toString()
|
|
@@ -376,7 +376,7 @@ class Profiles {
|
|
|
376
376
|
Authorization: yield this._getAuthorizationHeader(),
|
|
377
377
|
"X-Fern-Language": "JavaScript",
|
|
378
378
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
379
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
379
|
+
"X-Fern-SDK-Version": "v6.1.1",
|
|
380
380
|
},
|
|
381
381
|
contentType: "application/json",
|
|
382
382
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -6,12 +6,10 @@ import * as Courier from "../../..";
|
|
|
6
6
|
* The message property has the following primary top-level properties. They define the destination and content of the message.
|
|
7
7
|
* Additional advanced configuration fields [are defined below](https://www.courier.com/docs/reference/send/message/#other-message-properties).
|
|
8
8
|
*/
|
|
9
|
-
export interface ContentMessage extends Courier.BaseMessage {
|
|
9
|
+
export interface ContentMessage extends Courier.BaseMessage, Courier.BaseMessageSendTo {
|
|
10
10
|
/**
|
|
11
11
|
* Describes the content of the message in a way that will work for email, push,
|
|
12
12
|
* chat, or any channel. Either this or template must be specified.
|
|
13
13
|
*/
|
|
14
14
|
content: Courier.Content;
|
|
15
|
-
/** The recipient or a list of recipients of the message */
|
|
16
|
-
to: Courier.MessageRecipient;
|
|
17
15
|
}
|
|
@@ -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 "../../..";
|
|
5
|
-
export declare type Recipient = Courier.AudienceRecipient | Courier.ListRecipient | Courier.ListPatternRecipient | Courier.UserRecipient | Courier.SlackRecipient | Courier.MsTeamsRecipient;
|
|
5
|
+
export declare type Recipient = Courier.AudienceRecipient | Courier.ListRecipient | Courier.ListPatternRecipient | Courier.UserRecipient | Courier.SlackRecipient | Courier.MsTeamsRecipient | Courier.RecipientData;
|
|
@@ -2,12 +2,10 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
import * as Courier from "../../..";
|
|
5
|
-
export interface TemplateMessage extends Courier.BaseMessage {
|
|
5
|
+
export interface TemplateMessage extends Courier.BaseMessage, Courier.BaseMessageSendTo {
|
|
6
6
|
/**
|
|
7
7
|
* The id of the notification template to be rendered and sent to the recipient(s).
|
|
8
8
|
* This field or the content field must be supplied.
|
|
9
9
|
*/
|
|
10
10
|
template: string;
|
|
11
|
-
/** The recipient or a list of recipients of the message */
|
|
12
|
-
to: Courier.MessageRecipient;
|
|
13
11
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from "./Message";
|
|
2
2
|
export * from "./TemplateMessage";
|
|
3
3
|
export * from "./ContentMessage";
|
|
4
|
+
export * from "./BaseMessageSendTo";
|
|
4
5
|
export * from "./BaseMessage";
|
|
5
6
|
export * from "./MessageRecipient";
|
|
6
7
|
export * from "./Recipient";
|
|
@@ -17,6 +18,7 @@ export * from "./InvalidUserRecipient";
|
|
|
17
18
|
export * from "./UserRecipientType";
|
|
18
19
|
export * from "./UserRecipient";
|
|
19
20
|
export * from "./MessageData";
|
|
21
|
+
export * from "./RecipientData";
|
|
20
22
|
export * from "./AudienceFilter";
|
|
21
23
|
export * from "./MessageContext";
|
|
22
24
|
export * from "./ListFilter";
|
|
@@ -17,6 +17,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./Message"), exports);
|
|
18
18
|
__exportStar(require("./TemplateMessage"), exports);
|
|
19
19
|
__exportStar(require("./ContentMessage"), exports);
|
|
20
|
+
__exportStar(require("./BaseMessageSendTo"), exports);
|
|
20
21
|
__exportStar(require("./BaseMessage"), exports);
|
|
21
22
|
__exportStar(require("./MessageRecipient"), exports);
|
|
22
23
|
__exportStar(require("./Recipient"), exports);
|
|
@@ -33,6 +34,7 @@ __exportStar(require("./InvalidUserRecipient"), exports);
|
|
|
33
34
|
__exportStar(require("./UserRecipientType"), exports);
|
|
34
35
|
__exportStar(require("./UserRecipient"), exports);
|
|
35
36
|
__exportStar(require("./MessageData"), exports);
|
|
37
|
+
__exportStar(require("./RecipientData"), exports);
|
|
36
38
|
__exportStar(require("./AudienceFilter"), exports);
|
|
37
39
|
__exportStar(require("./MessageContext"), exports);
|
|
38
40
|
__exportStar(require("./ListFilter"), exports);
|
|
@@ -65,7 +65,7 @@ class Templates {
|
|
|
65
65
|
Authorization: yield this._getAuthorizationHeader(),
|
|
66
66
|
"X-Fern-Language": "JavaScript",
|
|
67
67
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
68
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
68
|
+
"X-Fern-SDK-Version": "v6.1.1",
|
|
69
69
|
},
|
|
70
70
|
contentType: "application/json",
|
|
71
71
|
queryParameters: _queryParams,
|
|
@@ -61,7 +61,7 @@ class Tenants {
|
|
|
61
61
|
Authorization: yield this._getAuthorizationHeader(),
|
|
62
62
|
"X-Fern-Language": "JavaScript",
|
|
63
63
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
64
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
64
|
+
"X-Fern-SDK-Version": "v6.1.1",
|
|
65
65
|
},
|
|
66
66
|
contentType: "application/json",
|
|
67
67
|
body: request,
|
|
@@ -110,7 +110,7 @@ class Tenants {
|
|
|
110
110
|
Authorization: yield this._getAuthorizationHeader(),
|
|
111
111
|
"X-Fern-Language": "JavaScript",
|
|
112
112
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
113
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
113
|
+
"X-Fern-SDK-Version": "v6.1.1",
|
|
114
114
|
},
|
|
115
115
|
contentType: "application/json",
|
|
116
116
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -163,7 +163,7 @@ class Tenants {
|
|
|
163
163
|
Authorization: yield this._getAuthorizationHeader(),
|
|
164
164
|
"X-Fern-Language": "JavaScript",
|
|
165
165
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
166
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
166
|
+
"X-Fern-SDK-Version": "v6.1.1",
|
|
167
167
|
},
|
|
168
168
|
contentType: "application/json",
|
|
169
169
|
queryParameters: _queryParams,
|
|
@@ -204,7 +204,7 @@ class Tenants {
|
|
|
204
204
|
Authorization: yield this._getAuthorizationHeader(),
|
|
205
205
|
"X-Fern-Language": "JavaScript",
|
|
206
206
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
207
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
207
|
+
"X-Fern-SDK-Version": "v6.1.1",
|
|
208
208
|
},
|
|
209
209
|
contentType: "application/json",
|
|
210
210
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -255,7 +255,7 @@ class Tenants {
|
|
|
255
255
|
Authorization: yield this._getAuthorizationHeader(),
|
|
256
256
|
"X-Fern-Language": "JavaScript",
|
|
257
257
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
258
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
258
|
+
"X-Fern-SDK-Version": "v6.1.1",
|
|
259
259
|
},
|
|
260
260
|
contentType: "application/json",
|
|
261
261
|
queryParameters: _queryParams,
|
|
@@ -62,7 +62,7 @@ class Translations {
|
|
|
62
62
|
Authorization: yield this._getAuthorizationHeader(),
|
|
63
63
|
"X-Fern-Language": "JavaScript",
|
|
64
64
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
65
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
65
|
+
"X-Fern-SDK-Version": "v6.1.1",
|
|
66
66
|
},
|
|
67
67
|
contentType: "application/json",
|
|
68
68
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -111,7 +111,7 @@ class Translations {
|
|
|
111
111
|
Authorization: yield this._getAuthorizationHeader(),
|
|
112
112
|
"X-Fern-Language": "JavaScript",
|
|
113
113
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
114
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
114
|
+
"X-Fern-SDK-Version": "v6.1.1",
|
|
115
115
|
},
|
|
116
116
|
contentType: "application/json",
|
|
117
117
|
body: request,
|
|
@@ -31,6 +31,15 @@ export declare class Preferences {
|
|
|
31
31
|
/**
|
|
32
32
|
* Update or Create user preferences for a specific subscription topic.
|
|
33
33
|
* @throws {@link Courier.BadRequestError}
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* await courier.users.preferences.update("abc-123", "74Q4QGFBEX481DP6JRPMV751H4XT", {
|
|
37
|
+
* topic: {
|
|
38
|
+
* status: Courier.PreferenceStatus.OptedIn,
|
|
39
|
+
* has_custom_routing: true,
|
|
40
|
+
* custom_routing: [Courier.ChannelClassification.Inbox, Courier.ChannelClassification.Email]
|
|
41
|
+
* }
|
|
42
|
+
* })
|
|
34
43
|
*/
|
|
35
44
|
update(userId: string, topicId: string, request: Courier.users.UserPreferencesUpdateParams, requestOptions?: Preferences.RequestOptions): Promise<Courier.users.UserPreferencesUpdateResponse>;
|
|
36
45
|
protected _getAuthorizationHeader(): Promise<string>;
|
|
@@ -62,7 +62,7 @@ class Preferences {
|
|
|
62
62
|
Authorization: yield this._getAuthorizationHeader(),
|
|
63
63
|
"X-Fern-Language": "JavaScript",
|
|
64
64
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
65
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
65
|
+
"X-Fern-SDK-Version": "v6.1.1",
|
|
66
66
|
},
|
|
67
67
|
contentType: "application/json",
|
|
68
68
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -111,7 +111,7 @@ class Preferences {
|
|
|
111
111
|
Authorization: yield this._getAuthorizationHeader(),
|
|
112
112
|
"X-Fern-Language": "JavaScript",
|
|
113
113
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
114
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
114
|
+
"X-Fern-SDK-Version": "v6.1.1",
|
|
115
115
|
},
|
|
116
116
|
contentType: "application/json",
|
|
117
117
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -149,6 +149,15 @@ class Preferences {
|
|
|
149
149
|
/**
|
|
150
150
|
* Update or Create user preferences for a specific subscription topic.
|
|
151
151
|
* @throws {@link Courier.BadRequestError}
|
|
152
|
+
*
|
|
153
|
+
* @example
|
|
154
|
+
* await courier.users.preferences.update("abc-123", "74Q4QGFBEX481DP6JRPMV751H4XT", {
|
|
155
|
+
* topic: {
|
|
156
|
+
* status: Courier.PreferenceStatus.OptedIn,
|
|
157
|
+
* has_custom_routing: true,
|
|
158
|
+
* custom_routing: [Courier.ChannelClassification.Inbox, Courier.ChannelClassification.Email]
|
|
159
|
+
* }
|
|
160
|
+
* })
|
|
152
161
|
*/
|
|
153
162
|
update(userId, topicId, request, requestOptions) {
|
|
154
163
|
var _a, _b;
|
|
@@ -160,7 +169,7 @@ class Preferences {
|
|
|
160
169
|
Authorization: yield this._getAuthorizationHeader(),
|
|
161
170
|
"X-Fern-Language": "JavaScript",
|
|
162
171
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
163
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
172
|
+
"X-Fern-SDK-Version": "v6.1.1",
|
|
164
173
|
},
|
|
165
174
|
contentType: "application/json",
|
|
166
175
|
body: request,
|
|
@@ -2,10 +2,16 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
import * as Courier from "../../../../../..";
|
|
5
|
+
/**
|
|
6
|
+
* @example
|
|
7
|
+
* {
|
|
8
|
+
* topic: {
|
|
9
|
+
* status: Courier.PreferenceStatus.OptedIn,
|
|
10
|
+
* has_custom_routing: true,
|
|
11
|
+
* custom_routing: [Courier.ChannelClassification.Inbox, Courier.ChannelClassification.Email]
|
|
12
|
+
* }
|
|
13
|
+
* }
|
|
14
|
+
*/
|
|
5
15
|
export interface UserPreferencesUpdateParams {
|
|
6
|
-
|
|
7
|
-
/** The Channels a user has chosen to receive notifications through for this topic */
|
|
8
|
-
custom_routing?: Courier.ChannelClassification[];
|
|
9
|
-
default_status: Courier.PreferenceStatus;
|
|
10
|
-
has_custom_routing?: boolean;
|
|
16
|
+
topic: Courier.users.TopicPreferenceUpdate;
|
|
11
17
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Courier from "../../../../..";
|
|
5
|
+
export interface TopicPreferenceUpdate {
|
|
6
|
+
status: Courier.PreferenceStatus;
|
|
7
|
+
/** The Channels a user has chosen to receive notifications through for this topic */
|
|
8
|
+
custom_routing?: Courier.ChannelClassification[];
|
|
9
|
+
has_custom_routing?: boolean;
|
|
10
|
+
}
|
|
@@ -17,4 +17,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./UserPreferencesListResponse"), exports);
|
|
18
18
|
__exportStar(require("./UserPreferencesGetResponse"), exports);
|
|
19
19
|
__exportStar(require("./TopicPreference"), exports);
|
|
20
|
+
__exportStar(require("./TopicPreferenceUpdate"), exports);
|
|
20
21
|
__exportStar(require("./UserPreferencesUpdateResponse"), exports);
|
|
@@ -64,7 +64,7 @@ class Tenants {
|
|
|
64
64
|
Authorization: yield this._getAuthorizationHeader(),
|
|
65
65
|
"X-Fern-Language": "JavaScript",
|
|
66
66
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
67
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
67
|
+
"X-Fern-SDK-Version": "v6.1.1",
|
|
68
68
|
},
|
|
69
69
|
contentType: "application/json",
|
|
70
70
|
body: request,
|
|
@@ -112,7 +112,7 @@ class Tenants {
|
|
|
112
112
|
Authorization: yield this._getAuthorizationHeader(),
|
|
113
113
|
"X-Fern-Language": "JavaScript",
|
|
114
114
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
115
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
115
|
+
"X-Fern-SDK-Version": "v6.1.1",
|
|
116
116
|
},
|
|
117
117
|
contentType: "application/json",
|
|
118
118
|
body: request,
|
|
@@ -156,7 +156,7 @@ class Tenants {
|
|
|
156
156
|
Authorization: yield this._getAuthorizationHeader(),
|
|
157
157
|
"X-Fern-Language": "JavaScript",
|
|
158
158
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
159
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
159
|
+
"X-Fern-SDK-Version": "v6.1.1",
|
|
160
160
|
},
|
|
161
161
|
contentType: "application/json",
|
|
162
162
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -199,7 +199,7 @@ class Tenants {
|
|
|
199
199
|
Authorization: yield this._getAuthorizationHeader(),
|
|
200
200
|
"X-Fern-Language": "JavaScript",
|
|
201
201
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
202
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
202
|
+
"X-Fern-SDK-Version": "v6.1.1",
|
|
203
203
|
},
|
|
204
204
|
contentType: "application/json",
|
|
205
205
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -250,7 +250,7 @@ class Tenants {
|
|
|
250
250
|
Authorization: yield this._getAuthorizationHeader(),
|
|
251
251
|
"X-Fern-Language": "JavaScript",
|
|
252
252
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
253
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
253
|
+
"X-Fern-SDK-Version": "v6.1.1",
|
|
254
254
|
},
|
|
255
255
|
contentType: "application/json",
|
|
256
256
|
queryParameters: _queryParams,
|
|
@@ -62,7 +62,7 @@ class Tokens {
|
|
|
62
62
|
Authorization: yield this._getAuthorizationHeader(),
|
|
63
63
|
"X-Fern-Language": "JavaScript",
|
|
64
64
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
65
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
65
|
+
"X-Fern-SDK-Version": "v6.1.1",
|
|
66
66
|
},
|
|
67
67
|
contentType: "application/json",
|
|
68
68
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -111,7 +111,7 @@ class Tokens {
|
|
|
111
111
|
Authorization: yield this._getAuthorizationHeader(),
|
|
112
112
|
"X-Fern-Language": "JavaScript",
|
|
113
113
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
114
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
114
|
+
"X-Fern-SDK-Version": "v6.1.1",
|
|
115
115
|
},
|
|
116
116
|
contentType: "application/json",
|
|
117
117
|
body: request,
|
|
@@ -161,7 +161,7 @@ class Tokens {
|
|
|
161
161
|
Authorization: yield this._getAuthorizationHeader(),
|
|
162
162
|
"X-Fern-Language": "JavaScript",
|
|
163
163
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
164
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
164
|
+
"X-Fern-SDK-Version": "v6.1.1",
|
|
165
165
|
},
|
|
166
166
|
contentType: "application/json",
|
|
167
167
|
body: request,
|
|
@@ -211,7 +211,7 @@ class Tokens {
|
|
|
211
211
|
Authorization: yield this._getAuthorizationHeader(),
|
|
212
212
|
"X-Fern-Language": "JavaScript",
|
|
213
213
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
214
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
214
|
+
"X-Fern-SDK-Version": "v6.1.1",
|
|
215
215
|
},
|
|
216
216
|
contentType: "application/json",
|
|
217
217
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -260,7 +260,7 @@ class Tokens {
|
|
|
260
260
|
Authorization: yield this._getAuthorizationHeader(),
|
|
261
261
|
"X-Fern-Language": "JavaScript",
|
|
262
262
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
263
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
263
|
+
"X-Fern-SDK-Version": "v6.1.1",
|
|
264
264
|
},
|
|
265
265
|
contentType: "application/json",
|
|
266
266
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
package/package.json
CHANGED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
export declare type AutomationStepAction = "cancel" | "delay" | "invoke" | "send" | "send-list" | "update-profile";
|
|
5
|
-
export declare const AutomationStepAction: {
|
|
6
|
-
readonly Cancel: "cancel";
|
|
7
|
-
readonly Delay: "delay";
|
|
8
|
-
readonly Invoke: "invoke";
|
|
9
|
-
readonly Send: "send";
|
|
10
|
-
readonly SendList: "send-list";
|
|
11
|
-
readonly UpdateProfile: "update-profile";
|
|
12
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
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.AutomationStepAction = void 0;
|
|
7
|
-
exports.AutomationStepAction = {
|
|
8
|
-
Cancel: "cancel",
|
|
9
|
-
Delay: "delay",
|
|
10
|
-
Invoke: "invoke",
|
|
11
|
-
Send: "send",
|
|
12
|
-
SendList: "send-list",
|
|
13
|
-
UpdateProfile: "update-profile",
|
|
14
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
export declare type AutomationStepAction = "cancel" | "delay" | "invoke" | "send" | "send-list" | "update-profile";
|
|
5
|
-
export declare const AutomationStepAction: {
|
|
6
|
-
readonly Cancel: "cancel";
|
|
7
|
-
readonly Delay: "delay";
|
|
8
|
-
readonly Invoke: "invoke";
|
|
9
|
-
readonly Send: "send";
|
|
10
|
-
readonly SendList: "send-list";
|
|
11
|
-
readonly UpdateProfile: "update-profile";
|
|
12
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
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.AutomationStepAction = void 0;
|
|
7
|
-
exports.AutomationStepAction = {
|
|
8
|
-
Cancel: "cancel",
|
|
9
|
-
Delay: "delay",
|
|
10
|
-
Invoke: "invoke",
|
|
11
|
-
Send: "send",
|
|
12
|
-
SendList: "send-list",
|
|
13
|
-
UpdateProfile: "update-profile",
|
|
14
|
-
};
|