@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.
- package/Client.d.ts +4 -0
- package/Client.js +23 -17
- package/api/client/requests/SendMessageRequest.d.ts +1 -0
- 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.js +2 -2
- package/api/resources/brands/client/Client.js +5 -5
- package/api/resources/bulk/client/Client.js +5 -5
- package/api/resources/inbound/client/Client.d.ts +43 -0
- package/api/resources/inbound/client/Client.js +134 -0
- package/api/resources/inbound/client/index.d.ts +1 -0
- package/api/resources/inbound/client/index.js +2 -0
- package/api/resources/inbound/index.d.ts +2 -0
- package/api/resources/inbound/index.js +18 -0
- package/api/resources/inbound/types/InboundTrackEvent.d.ts +13 -0
- package/api/resources/inbound/types/TrackAcceptedResponse.d.ts +7 -0
- package/api/resources/inbound/types/index.d.ts +2 -0
- package/api/resources/inbound/types/index.js +18 -0
- package/api/resources/index.d.ts +2 -0
- package/api/resources/index.js +3 -1
- package/api/resources/lists/client/Client.js +10 -10
- package/api/resources/messages/client/Client.js +6 -6
- package/api/resources/notifications/client/Client.d.ts +2 -61
- package/api/resources/notifications/client/Client.js +12 -152
- package/api/resources/notifications/client/requests/NotificationListParams.d.ts +6 -1
- package/api/resources/notifications/client/requests/index.d.ts +0 -2
- package/api/resources/notifications/types/Notification.d.ts +1 -0
- package/api/resources/profiles/client/Client.js +7 -7
- package/api/resources/profiles/types/Pagerduty.d.ts +9 -0
- package/api/resources/profiles/types/UserProfile.d.ts +1 -1
- package/api/resources/profiles/types/UserProfileFirebaseToken.d.ts +4 -0
- package/api/resources/profiles/types/WebhookAuthMode.d.ts +9 -0
- package/api/resources/profiles/types/WebhookAuthMode.js +11 -0
- package/api/resources/profiles/types/WebhookAuthentication.d.ts +14 -0
- package/api/resources/profiles/types/WebhookMethod.d.ts +8 -0
- package/api/resources/profiles/types/WebhookMethod.js +10 -0
- package/api/resources/profiles/types/WebhookProfile.d.ts +16 -0
- package/api/resources/profiles/types/WebhookProfileType.d.ts +8 -0
- package/api/resources/profiles/types/WebhookProfileType.js +10 -0
- package/api/resources/profiles/types/index.d.ts +7 -0
- package/api/resources/profiles/types/index.js +7 -0
- package/api/resources/send/types/BaseMessage.d.ts +1 -0
- package/api/resources/send/types/Channel.d.ts +1 -1
- package/api/resources/send/types/MessagePreferences.d.ts +7 -0
- package/api/resources/send/types/MessagePreferences.js +5 -0
- package/api/resources/send/types/PagerdutyRecipient.d.ts +7 -0
- package/api/resources/send/types/PagerdutyRecipient.js +5 -0
- package/api/resources/send/types/Recipient.d.ts +1 -1
- package/api/resources/send/types/WebhookRecipient.d.ts +7 -0
- package/api/resources/send/types/WebhookRecipient.js +5 -0
- package/api/resources/send/types/index.d.ts +3 -2
- package/api/resources/send/types/index.js +3 -2
- package/api/resources/templates/client/Client.js +1 -1
- package/api/resources/tenants/client/Client.js +7 -7
- package/api/resources/translations/client/Client.js +2 -2
- package/api/resources/users/resources/preferences/client/Client.js +3 -3
- package/api/resources/users/resources/preferences/types/UserPreferencesListResponse.d.ts +1 -0
- package/api/resources/users/resources/tenants/client/Client.js +5 -5
- package/api/resources/users/resources/tokens/client/Client.js +6 -6
- package/dist/Client.d.ts +4 -0
- package/dist/Client.js +23 -17
- package/dist/api/client/requests/SendMessageRequest.d.ts +1 -0
- 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.js +2 -2
- package/dist/api/resources/brands/client/Client.js +5 -5
- package/dist/api/resources/bulk/client/Client.js +5 -5
- package/dist/api/resources/inbound/client/Client.d.ts +43 -0
- package/dist/api/resources/inbound/client/Client.js +134 -0
- package/dist/api/resources/inbound/client/index.d.ts +1 -0
- package/dist/api/resources/inbound/client/index.js +2 -0
- package/dist/api/resources/inbound/index.d.ts +2 -0
- package/dist/api/resources/inbound/index.js +18 -0
- package/dist/api/resources/inbound/types/InboundTrackEvent.d.ts +13 -0
- package/dist/api/resources/inbound/types/InboundTrackEvent.js +5 -0
- package/dist/api/resources/inbound/types/TrackAcceptedResponse.d.ts +7 -0
- package/dist/api/resources/inbound/types/TrackAcceptedResponse.js +5 -0
- package/dist/api/resources/inbound/types/index.d.ts +2 -0
- package/dist/api/resources/inbound/types/index.js +18 -0
- package/dist/api/resources/index.d.ts +2 -0
- package/dist/api/resources/index.js +3 -1
- package/dist/api/resources/lists/client/Client.js +10 -10
- package/dist/api/resources/messages/client/Client.js +6 -6
- package/dist/api/resources/notifications/client/Client.d.ts +2 -61
- package/dist/api/resources/notifications/client/Client.js +12 -152
- package/dist/api/resources/notifications/client/requests/NotificationListParams.d.ts +6 -1
- package/dist/api/resources/notifications/client/requests/index.d.ts +0 -2
- package/dist/api/resources/notifications/types/Notification.d.ts +1 -0
- package/dist/api/resources/profiles/client/Client.js +7 -7
- package/dist/api/resources/profiles/types/Pagerduty.d.ts +9 -0
- package/dist/api/resources/profiles/types/Pagerduty.js +5 -0
- package/dist/api/resources/profiles/types/UserProfile.d.ts +1 -1
- package/dist/api/resources/profiles/types/UserProfileFirebaseToken.d.ts +4 -0
- package/dist/api/resources/profiles/types/UserProfileFirebaseToken.js +5 -0
- package/dist/api/resources/profiles/types/WebhookAuthMode.d.ts +9 -0
- package/dist/api/resources/profiles/types/WebhookAuthMode.js +11 -0
- package/dist/api/resources/profiles/types/WebhookAuthentication.d.ts +14 -0
- package/dist/api/resources/profiles/types/WebhookAuthentication.js +5 -0
- package/dist/api/resources/profiles/types/WebhookMethod.d.ts +8 -0
- package/dist/api/resources/profiles/types/WebhookMethod.js +10 -0
- package/dist/api/resources/profiles/types/WebhookProfile.d.ts +16 -0
- package/dist/api/resources/profiles/types/WebhookProfile.js +5 -0
- package/dist/api/resources/profiles/types/WebhookProfileType.d.ts +8 -0
- package/dist/api/resources/profiles/types/WebhookProfileType.js +10 -0
- package/dist/api/resources/profiles/types/index.d.ts +7 -0
- package/dist/api/resources/profiles/types/index.js +7 -0
- package/dist/api/resources/send/types/BaseMessage.d.ts +1 -0
- package/dist/api/resources/send/types/Channel.d.ts +1 -1
- package/dist/api/resources/send/types/MessagePreferences.d.ts +7 -0
- package/dist/api/resources/send/types/MessagePreferences.js +5 -0
- package/dist/api/resources/send/types/PagerdutyRecipient.d.ts +7 -0
- package/dist/api/resources/send/types/PagerdutyRecipient.js +5 -0
- package/dist/api/resources/send/types/Recipient.d.ts +1 -1
- package/dist/api/resources/send/types/WebhookRecipient.d.ts +7 -0
- package/dist/api/resources/send/types/WebhookRecipient.js +5 -0
- package/dist/api/resources/send/types/index.d.ts +3 -2
- package/dist/api/resources/send/types/index.js +3 -2
- package/dist/api/resources/templates/client/Client.js +1 -1
- package/dist/api/resources/tenants/client/Client.js +7 -7
- package/dist/api/resources/translations/client/Client.js +2 -2
- package/dist/api/resources/users/resources/preferences/client/Client.js +3 -3
- package/dist/api/resources/users/resources/preferences/types/UserPreferencesListResponse.d.ts +1 -0
- package/dist/api/resources/users/resources/tenants/client/Client.js +5 -5
- package/dist/api/resources/users/resources/tokens/client/Client.js +6 -6
- package/package.json +1 -1
- package/api/resources/notifications/client/requests/NotificationDraftUpdateVariationsParams.d.ts +0 -33
- package/api/resources/notifications/client/requests/NotificationUpdateVariationsParams.d.ts +0 -33
- package/api/resources/send/types/MessageChannelEmailOverride.d.ts +0 -16
- package/api/resources/send/types/Override.d.ts +0 -8
- package/api/resources/send/types/Override.js +0 -10
- package/dist/api/resources/notifications/client/requests/NotificationDraftUpdateVariationsParams.d.ts +0 -33
- package/dist/api/resources/notifications/client/requests/NotificationUpdateVariationsParams.d.ts +0 -33
- package/dist/api/resources/send/types/MessageChannelEmailOverride.d.ts +0 -16
- package/dist/api/resources/send/types/Override.d.ts +0 -8
- package/dist/api/resources/send/types/Override.js +0 -10
- /package/api/resources/{notifications/client/requests/NotificationDraftUpdateVariationsParams.js → inbound/types/InboundTrackEvent.js} +0 -0
- /package/api/resources/{notifications/client/requests/NotificationUpdateVariationsParams.js → inbound/types/TrackAcceptedResponse.js} +0 -0
- /package/api/resources/{send/types/MessageChannelEmailOverride.js → profiles/types/Pagerduty.js} +0 -0
- /package/{dist/api/resources/notifications/client/requests/NotificationDraftUpdateVariationsParams.js → api/resources/profiles/types/UserProfileFirebaseToken.js} +0 -0
- /package/{dist/api/resources/notifications/client/requests/NotificationUpdateVariationsParams.js → api/resources/profiles/types/WebhookAuthentication.js} +0 -0
- /package/{dist/api/resources/send/types/MessageChannelEmailOverride.js → api/resources/profiles/types/WebhookProfile.js} +0 -0
|
@@ -79,7 +79,7 @@ class Automations {
|
|
|
79
79
|
Authorization: yield this._getAuthorizationHeader(),
|
|
80
80
|
"X-Fern-Language": "JavaScript",
|
|
81
81
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
82
|
-
"X-Fern-SDK-Version": "v6.
|
|
82
|
+
"X-Fern-SDK-Version": "v6.2.2",
|
|
83
83
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
84
84
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
85
85
|
"Idempotency-Key": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey) != null ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey : undefined,
|
|
@@ -151,7 +151,7 @@ class Automations {
|
|
|
151
151
|
Authorization: yield this._getAuthorizationHeader(),
|
|
152
152
|
"X-Fern-Language": "JavaScript",
|
|
153
153
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
154
|
-
"X-Fern-SDK-Version": "v6.
|
|
154
|
+
"X-Fern-SDK-Version": "v6.2.2",
|
|
155
155
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
156
156
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
157
157
|
"Idempotency-Key": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey) != null ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey : undefined,
|
|
@@ -74,7 +74,7 @@ class Brands {
|
|
|
74
74
|
Authorization: yield this._getAuthorizationHeader(),
|
|
75
75
|
"X-Fern-Language": "JavaScript",
|
|
76
76
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
77
|
-
"X-Fern-SDK-Version": "v6.
|
|
77
|
+
"X-Fern-SDK-Version": "v6.2.2",
|
|
78
78
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
79
79
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
80
80
|
"Idempotency-Key": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey) != null ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey : undefined,
|
|
@@ -137,7 +137,7 @@ class Brands {
|
|
|
137
137
|
Authorization: yield this._getAuthorizationHeader(),
|
|
138
138
|
"X-Fern-Language": "JavaScript",
|
|
139
139
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
140
|
-
"X-Fern-SDK-Version": "v6.
|
|
140
|
+
"X-Fern-SDK-Version": "v6.2.2",
|
|
141
141
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
142
142
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
143
143
|
},
|
|
@@ -195,7 +195,7 @@ class Brands {
|
|
|
195
195
|
Authorization: yield this._getAuthorizationHeader(),
|
|
196
196
|
"X-Fern-Language": "JavaScript",
|
|
197
197
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
198
|
-
"X-Fern-SDK-Version": "v6.
|
|
198
|
+
"X-Fern-SDK-Version": "v6.2.2",
|
|
199
199
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
200
200
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
201
201
|
},
|
|
@@ -249,7 +249,7 @@ class Brands {
|
|
|
249
249
|
Authorization: yield this._getAuthorizationHeader(),
|
|
250
250
|
"X-Fern-Language": "JavaScript",
|
|
251
251
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
252
|
-
"X-Fern-SDK-Version": "v6.
|
|
252
|
+
"X-Fern-SDK-Version": "v6.2.2",
|
|
253
253
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
254
254
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
255
255
|
},
|
|
@@ -322,7 +322,7 @@ class Brands {
|
|
|
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.
|
|
325
|
+
"X-Fern-SDK-Version": "v6.2.2",
|
|
326
326
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
327
327
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
328
328
|
},
|
|
@@ -86,7 +86,7 @@ class Bulk {
|
|
|
86
86
|
Authorization: yield this._getAuthorizationHeader(),
|
|
87
87
|
"X-Fern-Language": "JavaScript",
|
|
88
88
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
89
|
-
"X-Fern-SDK-Version": "v6.
|
|
89
|
+
"X-Fern-SDK-Version": "v6.2.2",
|
|
90
90
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
91
91
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
92
92
|
"Idempotency-Key": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey) != null ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey : undefined,
|
|
@@ -158,7 +158,7 @@ class Bulk {
|
|
|
158
158
|
Authorization: yield this._getAuthorizationHeader(),
|
|
159
159
|
"X-Fern-Language": "JavaScript",
|
|
160
160
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
161
|
-
"X-Fern-SDK-Version": "v6.
|
|
161
|
+
"X-Fern-SDK-Version": "v6.2.2",
|
|
162
162
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
163
163
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
164
164
|
"Idempotency-Key": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey) != null ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey : undefined,
|
|
@@ -214,7 +214,7 @@ class Bulk {
|
|
|
214
214
|
Authorization: yield this._getAuthorizationHeader(),
|
|
215
215
|
"X-Fern-Language": "JavaScript",
|
|
216
216
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
217
|
-
"X-Fern-SDK-Version": "v6.
|
|
217
|
+
"X-Fern-SDK-Version": "v6.2.2",
|
|
218
218
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
219
219
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
220
220
|
"Idempotency-Key": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey) != null ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey : undefined,
|
|
@@ -274,7 +274,7 @@ class Bulk {
|
|
|
274
274
|
Authorization: yield this._getAuthorizationHeader(),
|
|
275
275
|
"X-Fern-Language": "JavaScript",
|
|
276
276
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
277
|
-
"X-Fern-SDK-Version": "v6.
|
|
277
|
+
"X-Fern-SDK-Version": "v6.2.2",
|
|
278
278
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
279
279
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
280
280
|
},
|
|
@@ -332,7 +332,7 @@ class Bulk {
|
|
|
332
332
|
Authorization: yield this._getAuthorizationHeader(),
|
|
333
333
|
"X-Fern-Language": "JavaScript",
|
|
334
334
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
335
|
-
"X-Fern-SDK-Version": "v6.
|
|
335
|
+
"X-Fern-SDK-Version": "v6.2.2",
|
|
336
336
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
337
337
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
338
338
|
},
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as environments from "../../../../environments";
|
|
5
|
+
import * as core from "../../../../core";
|
|
6
|
+
import * as Courier from "../../../index";
|
|
7
|
+
export declare namespace Inbound {
|
|
8
|
+
interface Options {
|
|
9
|
+
environment?: core.Supplier<environments.CourierEnvironment | string>;
|
|
10
|
+
authorizationToken?: core.Supplier<core.BearerToken | undefined>;
|
|
11
|
+
fetcher?: core.FetchFunction;
|
|
12
|
+
}
|
|
13
|
+
interface RequestOptions {
|
|
14
|
+
timeoutInSeconds?: number;
|
|
15
|
+
maxRetries?: number;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
export declare class Inbound {
|
|
19
|
+
protected readonly _options: Inbound.Options;
|
|
20
|
+
constructor(_options?: Inbound.Options);
|
|
21
|
+
/**
|
|
22
|
+
* @param {Courier.InboundTrackEvent} request
|
|
23
|
+
* @param {Inbound.RequestOptions} requestOptions - Request-specific configuration.
|
|
24
|
+
*
|
|
25
|
+
* @throws {@link Courier.BadRequestError}
|
|
26
|
+
* @throws {@link Courier.ConflictError}
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* await courier.inbound.track({
|
|
30
|
+
* event: "New Order Placed",
|
|
31
|
+
* messageId: "4c62c457-b329-4bea-9bfc-17bba86c393f",
|
|
32
|
+
* userId: "1234",
|
|
33
|
+
* type: "track",
|
|
34
|
+
* properties: {
|
|
35
|
+
* "order_id": 123,
|
|
36
|
+
* "total_orders": 5,
|
|
37
|
+
* "last_order_id": 122
|
|
38
|
+
* }
|
|
39
|
+
* })
|
|
40
|
+
*/
|
|
41
|
+
track(request: Courier.InboundTrackEvent, requestOptions?: Inbound.RequestOptions): Promise<Courier.TrackAcceptedResponse>;
|
|
42
|
+
protected _getAuthorizationHeader(): Promise<string>;
|
|
43
|
+
}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
+
__setModuleDefault(result, mod);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
28
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
29
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
30
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
31
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
32
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
33
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
34
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
38
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
39
|
+
};
|
|
40
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
|
+
exports.Inbound = void 0;
|
|
42
|
+
const environments = __importStar(require("../../../../environments"));
|
|
43
|
+
const core = __importStar(require("../../../../core"));
|
|
44
|
+
const Courier = __importStar(require("../../../index"));
|
|
45
|
+
const url_join_1 = __importDefault(require("url-join"));
|
|
46
|
+
const errors = __importStar(require("../../../../errors/index"));
|
|
47
|
+
class Inbound {
|
|
48
|
+
constructor(_options = {}) {
|
|
49
|
+
this._options = _options;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* @param {Courier.InboundTrackEvent} request
|
|
53
|
+
* @param {Inbound.RequestOptions} requestOptions - Request-specific configuration.
|
|
54
|
+
*
|
|
55
|
+
* @throws {@link Courier.BadRequestError}
|
|
56
|
+
* @throws {@link Courier.ConflictError}
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* await courier.inbound.track({
|
|
60
|
+
* event: "New Order Placed",
|
|
61
|
+
* messageId: "4c62c457-b329-4bea-9bfc-17bba86c393f",
|
|
62
|
+
* userId: "1234",
|
|
63
|
+
* type: "track",
|
|
64
|
+
* properties: {
|
|
65
|
+
* "order_id": 123,
|
|
66
|
+
* "total_orders": 5,
|
|
67
|
+
* "last_order_id": 122
|
|
68
|
+
* }
|
|
69
|
+
* })
|
|
70
|
+
*/
|
|
71
|
+
track(request, requestOptions) {
|
|
72
|
+
var _a, _b;
|
|
73
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
74
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
75
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CourierEnvironment.Production, "/inbound/courier"),
|
|
76
|
+
method: "POST",
|
|
77
|
+
headers: {
|
|
78
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
79
|
+
"X-Fern-Language": "JavaScript",
|
|
80
|
+
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
81
|
+
"X-Fern-SDK-Version": "v6.2.2",
|
|
82
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
83
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
84
|
+
},
|
|
85
|
+
contentType: "application/json",
|
|
86
|
+
body: request,
|
|
87
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
88
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
89
|
+
});
|
|
90
|
+
if (_response.ok) {
|
|
91
|
+
return _response.body;
|
|
92
|
+
}
|
|
93
|
+
if (_response.error.reason === "status-code") {
|
|
94
|
+
switch (_response.error.statusCode) {
|
|
95
|
+
case 400:
|
|
96
|
+
throw new Courier.BadRequestError(_response.error.body);
|
|
97
|
+
case 409:
|
|
98
|
+
throw new Courier.ConflictError(_response.error.body);
|
|
99
|
+
default:
|
|
100
|
+
throw new errors.CourierError({
|
|
101
|
+
statusCode: _response.error.statusCode,
|
|
102
|
+
body: _response.error.body,
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
switch (_response.error.reason) {
|
|
107
|
+
case "non-json":
|
|
108
|
+
throw new errors.CourierError({
|
|
109
|
+
statusCode: _response.error.statusCode,
|
|
110
|
+
body: _response.error.rawBody,
|
|
111
|
+
});
|
|
112
|
+
case "timeout":
|
|
113
|
+
throw new errors.CourierTimeoutError();
|
|
114
|
+
case "unknown":
|
|
115
|
+
throw new errors.CourierError({
|
|
116
|
+
message: _response.error.errorMessage,
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
_getAuthorizationHeader() {
|
|
122
|
+
var _a;
|
|
123
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
124
|
+
const bearer = (_a = (yield core.Supplier.get(this._options.authorizationToken))) !== null && _a !== void 0 ? _a : process === null || process === void 0 ? void 0 : process.env["COURIER_AUTH_TOKEN"];
|
|
125
|
+
if (bearer == null) {
|
|
126
|
+
throw new errors.CourierError({
|
|
127
|
+
message: "Please specify COURIER_AUTH_TOKEN when instantiating the client.",
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
return `Bearer ${bearer}`;
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
exports.Inbound = Inbound;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./types"), exports);
|
|
18
|
+
__exportStar(require("./client"), exports);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
export interface InboundTrackEvent {
|
|
5
|
+
/** A descriptive name of the event. This name will appear as a trigger in the Courier Automation Trigger node. */
|
|
6
|
+
event: string;
|
|
7
|
+
/** A required unique identifier that will be used to de-duplicate requests. If not unique, will respond with 409 Conflict status */
|
|
8
|
+
messageId: string;
|
|
9
|
+
properties: Record<string, any>;
|
|
10
|
+
type: "track";
|
|
11
|
+
/** The user id assocatiated with the track */
|
|
12
|
+
userId?: string;
|
|
13
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./InboundTrackEvent"), exports);
|
|
18
|
+
__exportStar(require("./TrackAcceptedResponse"), exports);
|
|
@@ -12,6 +12,8 @@ export * as commons from "./commons";
|
|
|
12
12
|
export * from "./commons/types";
|
|
13
13
|
export * as bulk from "./bulk";
|
|
14
14
|
export * from "./bulk/types";
|
|
15
|
+
export * as inbound from "./inbound";
|
|
16
|
+
export * from "./inbound/types";
|
|
15
17
|
export * as lists from "./lists";
|
|
16
18
|
export * from "./lists/types";
|
|
17
19
|
export * as messages from "./messages";
|
|
@@ -26,7 +26,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
26
26
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.translations = exports.users = exports.tenants = exports.templates = exports.send = exports.profiles = exports.notifications = exports.messages = exports.lists = exports.bulk = exports.commons = exports.brands = exports.automations = exports.authTokens = exports.auditEvents = exports.audiences = void 0;
|
|
29
|
+
exports.translations = exports.users = exports.tenants = exports.templates = exports.send = exports.profiles = exports.notifications = exports.messages = exports.lists = exports.inbound = exports.bulk = exports.commons = exports.brands = exports.automations = exports.authTokens = exports.auditEvents = exports.audiences = void 0;
|
|
30
30
|
exports.audiences = __importStar(require("./audiences"));
|
|
31
31
|
__exportStar(require("./audiences/types"), exports);
|
|
32
32
|
exports.auditEvents = __importStar(require("./auditEvents"));
|
|
@@ -41,6 +41,8 @@ exports.commons = __importStar(require("./commons"));
|
|
|
41
41
|
__exportStar(require("./commons/types"), exports);
|
|
42
42
|
exports.bulk = __importStar(require("./bulk"));
|
|
43
43
|
__exportStar(require("./bulk/types"), exports);
|
|
44
|
+
exports.inbound = __importStar(require("./inbound"));
|
|
45
|
+
__exportStar(require("./inbound/types"), exports);
|
|
44
46
|
exports.lists = __importStar(require("./lists"));
|
|
45
47
|
__exportStar(require("./lists/types"), exports);
|
|
46
48
|
exports.messages = __importStar(require("./messages"));
|
|
@@ -80,7 +80,7 @@ class Lists {
|
|
|
80
80
|
Authorization: yield this._getAuthorizationHeader(),
|
|
81
81
|
"X-Fern-Language": "JavaScript",
|
|
82
82
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
83
|
-
"X-Fern-SDK-Version": "v6.
|
|
83
|
+
"X-Fern-SDK-Version": "v6.2.2",
|
|
84
84
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
85
85
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
86
86
|
},
|
|
@@ -139,7 +139,7 @@ class Lists {
|
|
|
139
139
|
Authorization: yield this._getAuthorizationHeader(),
|
|
140
140
|
"X-Fern-Language": "JavaScript",
|
|
141
141
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
142
|
-
"X-Fern-SDK-Version": "v6.
|
|
142
|
+
"X-Fern-SDK-Version": "v6.2.2",
|
|
143
143
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
144
144
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
145
145
|
},
|
|
@@ -224,7 +224,7 @@ class Lists {
|
|
|
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.
|
|
227
|
+
"X-Fern-SDK-Version": "v6.2.2",
|
|
228
228
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
229
229
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
230
230
|
},
|
|
@@ -276,7 +276,7 @@ class Lists {
|
|
|
276
276
|
Authorization: yield this._getAuthorizationHeader(),
|
|
277
277
|
"X-Fern-Language": "JavaScript",
|
|
278
278
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
279
|
-
"X-Fern-SDK-Version": "v6.
|
|
279
|
+
"X-Fern-SDK-Version": "v6.2.2",
|
|
280
280
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
281
281
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
282
282
|
},
|
|
@@ -327,7 +327,7 @@ class Lists {
|
|
|
327
327
|
Authorization: yield this._getAuthorizationHeader(),
|
|
328
328
|
"X-Fern-Language": "JavaScript",
|
|
329
329
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
330
|
-
"X-Fern-SDK-Version": "v6.
|
|
330
|
+
"X-Fern-SDK-Version": "v6.2.2",
|
|
331
331
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
332
332
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
333
333
|
},
|
|
@@ -388,7 +388,7 @@ class Lists {
|
|
|
388
388
|
Authorization: yield this._getAuthorizationHeader(),
|
|
389
389
|
"X-Fern-Language": "JavaScript",
|
|
390
390
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
391
|
-
"X-Fern-SDK-Version": "v6.
|
|
391
|
+
"X-Fern-SDK-Version": "v6.2.2",
|
|
392
392
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
393
393
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
394
394
|
},
|
|
@@ -478,7 +478,7 @@ class Lists {
|
|
|
478
478
|
Authorization: yield this._getAuthorizationHeader(),
|
|
479
479
|
"X-Fern-Language": "JavaScript",
|
|
480
480
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
481
|
-
"X-Fern-SDK-Version": "v6.
|
|
481
|
+
"X-Fern-SDK-Version": "v6.2.2",
|
|
482
482
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
483
483
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
484
484
|
},
|
|
@@ -568,7 +568,7 @@ class Lists {
|
|
|
568
568
|
Authorization: yield this._getAuthorizationHeader(),
|
|
569
569
|
"X-Fern-Language": "JavaScript",
|
|
570
570
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
571
|
-
"X-Fern-SDK-Version": "v6.
|
|
571
|
+
"X-Fern-SDK-Version": "v6.2.2",
|
|
572
572
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
573
573
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
574
574
|
"Idempotency-Key": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey) != null ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey : undefined,
|
|
@@ -656,7 +656,7 @@ class Lists {
|
|
|
656
656
|
Authorization: yield this._getAuthorizationHeader(),
|
|
657
657
|
"X-Fern-Language": "JavaScript",
|
|
658
658
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
659
|
-
"X-Fern-SDK-Version": "v6.
|
|
659
|
+
"X-Fern-SDK-Version": "v6.2.2",
|
|
660
660
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
661
661
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
662
662
|
},
|
|
@@ -711,7 +711,7 @@ class Lists {
|
|
|
711
711
|
Authorization: yield this._getAuthorizationHeader(),
|
|
712
712
|
"X-Fern-Language": "JavaScript",
|
|
713
713
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
714
|
-
"X-Fern-SDK-Version": "v6.
|
|
714
|
+
"X-Fern-SDK-Version": "v6.2.2",
|
|
715
715
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
716
716
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
717
717
|
},
|
|
@@ -141,7 +141,7 @@ class Messages {
|
|
|
141
141
|
Authorization: yield this._getAuthorizationHeader(),
|
|
142
142
|
"X-Fern-Language": "JavaScript",
|
|
143
143
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
144
|
-
"X-Fern-SDK-Version": "v6.
|
|
144
|
+
"X-Fern-SDK-Version": "v6.2.2",
|
|
145
145
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
146
146
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
147
147
|
},
|
|
@@ -196,7 +196,7 @@ class Messages {
|
|
|
196
196
|
Authorization: yield this._getAuthorizationHeader(),
|
|
197
197
|
"X-Fern-Language": "JavaScript",
|
|
198
198
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
199
|
-
"X-Fern-SDK-Version": "v6.
|
|
199
|
+
"X-Fern-SDK-Version": "v6.2.2",
|
|
200
200
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
201
201
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
202
202
|
},
|
|
@@ -254,7 +254,7 @@ class Messages {
|
|
|
254
254
|
Authorization: yield this._getAuthorizationHeader(),
|
|
255
255
|
"X-Fern-Language": "JavaScript",
|
|
256
256
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
257
|
-
"X-Fern-SDK-Version": "v6.
|
|
257
|
+
"X-Fern-SDK-Version": "v6.2.2",
|
|
258
258
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
259
259
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
260
260
|
"Idempotency-Key": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey) != null ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey : undefined,
|
|
@@ -318,7 +318,7 @@ class Messages {
|
|
|
318
318
|
Authorization: yield this._getAuthorizationHeader(),
|
|
319
319
|
"X-Fern-Language": "JavaScript",
|
|
320
320
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
321
|
-
"X-Fern-SDK-Version": "v6.
|
|
321
|
+
"X-Fern-SDK-Version": "v6.2.2",
|
|
322
322
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
323
323
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
324
324
|
},
|
|
@@ -378,7 +378,7 @@ class Messages {
|
|
|
378
378
|
Authorization: yield this._getAuthorizationHeader(),
|
|
379
379
|
"X-Fern-Language": "JavaScript",
|
|
380
380
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
381
|
-
"X-Fern-SDK-Version": "v6.
|
|
381
|
+
"X-Fern-SDK-Version": "v6.2.2",
|
|
382
382
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
383
383
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
384
384
|
},
|
|
@@ -434,7 +434,7 @@ class Messages {
|
|
|
434
434
|
Authorization: yield this._getAuthorizationHeader(),
|
|
435
435
|
"X-Fern-Language": "JavaScript",
|
|
436
436
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
437
|
-
"X-Fern-SDK-Version": "v6.
|
|
437
|
+
"X-Fern-SDK-Version": "v6.2.2",
|
|
438
438
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
439
439
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
440
440
|
},
|
|
@@ -24,7 +24,8 @@ export declare class Notifications {
|
|
|
24
24
|
*
|
|
25
25
|
* @example
|
|
26
26
|
* await courier.notifications.list({
|
|
27
|
-
* cursor: "string"
|
|
27
|
+
* cursor: "string",
|
|
28
|
+
* notes: true
|
|
28
29
|
* })
|
|
29
30
|
*/
|
|
30
31
|
list(request?: Courier.NotificationListParams, requestOptions?: Notifications.RequestOptions): Promise<Courier.NotificationListResponse>;
|
|
@@ -44,66 +45,6 @@ export declare class Notifications {
|
|
|
44
45
|
* await courier.notifications.getDraftContent("string")
|
|
45
46
|
*/
|
|
46
47
|
getDraftContent(id: string, requestOptions?: Notifications.RequestOptions): Promise<Courier.NotificationGetContentResponse>;
|
|
47
|
-
/**
|
|
48
|
-
* @param {string} id
|
|
49
|
-
* @param {Courier.NotificationUpdateVariationsParams} request
|
|
50
|
-
* @param {Notifications.RequestOptions} requestOptions - Request-specific configuration.
|
|
51
|
-
*
|
|
52
|
-
* @example
|
|
53
|
-
* await courier.notifications.updateVariations("string", {
|
|
54
|
-
* blocks: [{
|
|
55
|
-
* alias: "string",
|
|
56
|
-
* context: "string",
|
|
57
|
-
* id: "string",
|
|
58
|
-
* type: Courier.BlockType.Action,
|
|
59
|
-
* content: "string",
|
|
60
|
-
* locales: {
|
|
61
|
-
* "string": "string"
|
|
62
|
-
* },
|
|
63
|
-
* checksum: "string"
|
|
64
|
-
* }],
|
|
65
|
-
* channels: [{
|
|
66
|
-
* id: "string",
|
|
67
|
-
* type: "string",
|
|
68
|
-
* content: {},
|
|
69
|
-
* locales: {
|
|
70
|
-
* "string": {}
|
|
71
|
-
* },
|
|
72
|
-
* checksum: "string"
|
|
73
|
-
* }]
|
|
74
|
-
* })
|
|
75
|
-
*/
|
|
76
|
-
updateVariations(id: string, request?: Courier.NotificationUpdateVariationsParams, requestOptions?: Notifications.RequestOptions): Promise<void>;
|
|
77
|
-
/**
|
|
78
|
-
* @param {string} id
|
|
79
|
-
* @param {Courier.NotificationDraftUpdateVariationsParams} request
|
|
80
|
-
* @param {Notifications.RequestOptions} requestOptions - Request-specific configuration.
|
|
81
|
-
*
|
|
82
|
-
* @example
|
|
83
|
-
* await courier.notifications.updateDraftVariations("string", {
|
|
84
|
-
* blocks: [{
|
|
85
|
-
* alias: "string",
|
|
86
|
-
* context: "string",
|
|
87
|
-
* id: "string",
|
|
88
|
-
* type: Courier.BlockType.Action,
|
|
89
|
-
* content: "string",
|
|
90
|
-
* locales: {
|
|
91
|
-
* "string": "string"
|
|
92
|
-
* },
|
|
93
|
-
* checksum: "string"
|
|
94
|
-
* }],
|
|
95
|
-
* channels: [{
|
|
96
|
-
* id: "string",
|
|
97
|
-
* type: "string",
|
|
98
|
-
* content: {},
|
|
99
|
-
* locales: {
|
|
100
|
-
* "string": {}
|
|
101
|
-
* },
|
|
102
|
-
* checksum: "string"
|
|
103
|
-
* }]
|
|
104
|
-
* })
|
|
105
|
-
*/
|
|
106
|
-
updateDraftVariations(id: string, request?: Courier.NotificationDraftUpdateVariationsParams, requestOptions?: Notifications.RequestOptions): Promise<void>;
|
|
107
48
|
/**
|
|
108
49
|
* @param {string} id
|
|
109
50
|
* @param {string} submissionId
|