@trycourier/courier 6.1.2 → 6.2.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.d.ts +3 -0
- package/Client.js +22 -17
- 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 +0 -60
- package/api/resources/notifications/client/Client.js +6 -150
- package/api/resources/notifications/client/requests/index.d.ts +0 -2
- package/api/resources/profiles/client/Client.js +7 -7
- 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.d.ts +9 -0
- package/api/resources/users/resources/tokens/client/Client.js +55 -5
- package/dist/Client.d.ts +3 -0
- package/dist/Client.js +22 -17
- 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/TrackAcceptedResponse.d.ts +7 -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 +0 -60
- package/dist/api/resources/notifications/client/Client.js +6 -150
- package/dist/api/resources/notifications/client/requests/index.d.ts +0 -2
- package/dist/api/resources/profiles/client/Client.js +7 -7
- 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.d.ts +9 -0
- package/dist/api/resources/users/resources/tokens/client/Client.js +55 -5
- 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/dist/api/resources/notifications/client/requests/NotificationDraftUpdateVariationsParams.d.ts +0 -33
- package/dist/api/resources/notifications/client/requests/NotificationUpdateVariationsParams.d.ts +0 -33
- /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/dist/api/resources/{notifications/client/requests/NotificationDraftUpdateVariationsParams.js → inbound/types/InboundTrackEvent.js} +0 -0
- /package/dist/api/resources/{notifications/client/requests/NotificationUpdateVariationsParams.js → inbound/types/TrackAcceptedResponse.js} +0 -0
package/dist/api/resources/users/resources/preferences/types/UserPreferencesListResponse.d.ts
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as Courier from "../../../../../index";
|
|
5
5
|
export interface UserPreferencesListResponse {
|
|
6
|
+
/** Deprecated - Paging not implemented on this endpoint */
|
|
6
7
|
paging: Courier.Paging;
|
|
7
8
|
/** The Preferences associated with the user_id. */
|
|
8
9
|
items: Courier.users.TopicPreference[];
|
|
@@ -82,7 +82,7 @@ class Tenants {
|
|
|
82
82
|
Authorization: yield this._getAuthorizationHeader(),
|
|
83
83
|
"X-Fern-Language": "JavaScript",
|
|
84
84
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
85
|
-
"X-Fern-SDK-Version": "v6.1
|
|
85
|
+
"X-Fern-SDK-Version": "v6.2.1",
|
|
86
86
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
87
87
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
88
88
|
},
|
|
@@ -146,7 +146,7 @@ class Tenants {
|
|
|
146
146
|
Authorization: yield this._getAuthorizationHeader(),
|
|
147
147
|
"X-Fern-Language": "JavaScript",
|
|
148
148
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
149
|
-
"X-Fern-SDK-Version": "v6.1
|
|
149
|
+
"X-Fern-SDK-Version": "v6.2.1",
|
|
150
150
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
151
151
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
152
152
|
},
|
|
@@ -198,7 +198,7 @@ class Tenants {
|
|
|
198
198
|
Authorization: yield this._getAuthorizationHeader(),
|
|
199
199
|
"X-Fern-Language": "JavaScript",
|
|
200
200
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
201
|
-
"X-Fern-SDK-Version": "v6.1
|
|
201
|
+
"X-Fern-SDK-Version": "v6.2.1",
|
|
202
202
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
203
203
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
204
204
|
},
|
|
@@ -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.2.1",
|
|
254
254
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
255
255
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
256
256
|
},
|
|
@@ -313,7 +313,7 @@ class Tenants {
|
|
|
313
313
|
Authorization: yield this._getAuthorizationHeader(),
|
|
314
314
|
"X-Fern-Language": "JavaScript",
|
|
315
315
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
316
|
-
"X-Fern-SDK-Version": "v6.1
|
|
316
|
+
"X-Fern-SDK-Version": "v6.2.1",
|
|
317
317
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
318
318
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
319
319
|
},
|
|
@@ -106,5 +106,14 @@ export declare class Tokens {
|
|
|
106
106
|
* await courier.users.tokens.list("string")
|
|
107
107
|
*/
|
|
108
108
|
list(userId: string, requestOptions?: Tokens.RequestOptions): Promise<Courier.users.GetAllTokensResponse>;
|
|
109
|
+
/**
|
|
110
|
+
* @param {string} userId - The user's ID. This can be any uniquely identifiable string.
|
|
111
|
+
* @param {string} token - The full token string.
|
|
112
|
+
* @param {Tokens.RequestOptions} requestOptions - Request-specific configuration.
|
|
113
|
+
*
|
|
114
|
+
* @example
|
|
115
|
+
* await courier.users.tokens.delete("string", "string")
|
|
116
|
+
*/
|
|
117
|
+
delete(userId: string, token: string, requestOptions?: Tokens.RequestOptions): Promise<void>;
|
|
109
118
|
protected _getAuthorizationHeader(): Promise<string>;
|
|
110
119
|
}
|
|
@@ -69,7 +69,7 @@ class Tokens {
|
|
|
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
|
|
72
|
+
"X-Fern-SDK-Version": "v6.2.1",
|
|
73
73
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
74
74
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
75
75
|
},
|
|
@@ -150,7 +150,7 @@ class Tokens {
|
|
|
150
150
|
Authorization: yield this._getAuthorizationHeader(),
|
|
151
151
|
"X-Fern-Language": "JavaScript",
|
|
152
152
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
153
|
-
"X-Fern-SDK-Version": "v6.1
|
|
153
|
+
"X-Fern-SDK-Version": "v6.2.1",
|
|
154
154
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
155
155
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
156
156
|
},
|
|
@@ -213,7 +213,7 @@ class Tokens {
|
|
|
213
213
|
Authorization: yield this._getAuthorizationHeader(),
|
|
214
214
|
"X-Fern-Language": "JavaScript",
|
|
215
215
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
216
|
-
"X-Fern-SDK-Version": "v6.1
|
|
216
|
+
"X-Fern-SDK-Version": "v6.2.1",
|
|
217
217
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
218
218
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
219
219
|
},
|
|
@@ -273,7 +273,7 @@ class Tokens {
|
|
|
273
273
|
Authorization: yield this._getAuthorizationHeader(),
|
|
274
274
|
"X-Fern-Language": "JavaScript",
|
|
275
275
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
276
|
-
"X-Fern-SDK-Version": "v6.1
|
|
276
|
+
"X-Fern-SDK-Version": "v6.2.1",
|
|
277
277
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
278
278
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
279
279
|
},
|
|
@@ -331,7 +331,7 @@ class Tokens {
|
|
|
331
331
|
Authorization: yield this._getAuthorizationHeader(),
|
|
332
332
|
"X-Fern-Language": "JavaScript",
|
|
333
333
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
334
|
-
"X-Fern-SDK-Version": "v6.1
|
|
334
|
+
"X-Fern-SDK-Version": "v6.2.1",
|
|
335
335
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
336
336
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
337
337
|
},
|
|
@@ -368,6 +368,56 @@ class Tokens {
|
|
|
368
368
|
}
|
|
369
369
|
});
|
|
370
370
|
}
|
|
371
|
+
/**
|
|
372
|
+
* @param {string} userId - The user's ID. This can be any uniquely identifiable string.
|
|
373
|
+
* @param {string} token - The full token string.
|
|
374
|
+
* @param {Tokens.RequestOptions} requestOptions - Request-specific configuration.
|
|
375
|
+
*
|
|
376
|
+
* @example
|
|
377
|
+
* await courier.users.tokens.delete("string", "string")
|
|
378
|
+
*/
|
|
379
|
+
delete(userId, token, requestOptions) {
|
|
380
|
+
var _a, _b;
|
|
381
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
382
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
383
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CourierEnvironment.Production, `/users/${encodeURIComponent(userId)}/tokens/${encodeURIComponent(token)}`),
|
|
384
|
+
method: "DELETE",
|
|
385
|
+
headers: {
|
|
386
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
387
|
+
"X-Fern-Language": "JavaScript",
|
|
388
|
+
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
389
|
+
"X-Fern-SDK-Version": "v6.2.1",
|
|
390
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
391
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
392
|
+
},
|
|
393
|
+
contentType: "application/json",
|
|
394
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
395
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
396
|
+
});
|
|
397
|
+
if (_response.ok) {
|
|
398
|
+
return;
|
|
399
|
+
}
|
|
400
|
+
if (_response.error.reason === "status-code") {
|
|
401
|
+
throw new errors.CourierError({
|
|
402
|
+
statusCode: _response.error.statusCode,
|
|
403
|
+
body: _response.error.body,
|
|
404
|
+
});
|
|
405
|
+
}
|
|
406
|
+
switch (_response.error.reason) {
|
|
407
|
+
case "non-json":
|
|
408
|
+
throw new errors.CourierError({
|
|
409
|
+
statusCode: _response.error.statusCode,
|
|
410
|
+
body: _response.error.rawBody,
|
|
411
|
+
});
|
|
412
|
+
case "timeout":
|
|
413
|
+
throw new errors.CourierTimeoutError();
|
|
414
|
+
case "unknown":
|
|
415
|
+
throw new errors.CourierError({
|
|
416
|
+
message: _response.error.errorMessage,
|
|
417
|
+
});
|
|
418
|
+
}
|
|
419
|
+
});
|
|
420
|
+
}
|
|
371
421
|
_getAuthorizationHeader() {
|
|
372
422
|
var _a;
|
|
373
423
|
return __awaiter(this, void 0, void 0, function* () {
|
package/package.json
CHANGED
package/api/resources/notifications/client/requests/NotificationDraftUpdateVariationsParams.d.ts
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
import * as Courier from "../../../../index";
|
|
5
|
-
/**
|
|
6
|
-
* @example
|
|
7
|
-
* {
|
|
8
|
-
* blocks: [{
|
|
9
|
-
* alias: "string",
|
|
10
|
-
* context: "string",
|
|
11
|
-
* id: "string",
|
|
12
|
-
* type: Courier.BlockType.Action,
|
|
13
|
-
* content: "string",
|
|
14
|
-
* locales: {
|
|
15
|
-
* "string": "string"
|
|
16
|
-
* },
|
|
17
|
-
* checksum: "string"
|
|
18
|
-
* }],
|
|
19
|
-
* channels: [{
|
|
20
|
-
* id: "string",
|
|
21
|
-
* type: "string",
|
|
22
|
-
* content: {},
|
|
23
|
-
* locales: {
|
|
24
|
-
* "string": {}
|
|
25
|
-
* },
|
|
26
|
-
* checksum: "string"
|
|
27
|
-
* }]
|
|
28
|
-
* }
|
|
29
|
-
*/
|
|
30
|
-
export interface NotificationDraftUpdateVariationsParams {
|
|
31
|
-
blocks?: Courier.NotificationBlock[];
|
|
32
|
-
channels?: Courier.NotificationChannel[];
|
|
33
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
import * as Courier from "../../../../index";
|
|
5
|
-
/**
|
|
6
|
-
* @example
|
|
7
|
-
* {
|
|
8
|
-
* blocks: [{
|
|
9
|
-
* alias: "string",
|
|
10
|
-
* context: "string",
|
|
11
|
-
* id: "string",
|
|
12
|
-
* type: Courier.BlockType.Action,
|
|
13
|
-
* content: "string",
|
|
14
|
-
* locales: {
|
|
15
|
-
* "string": "string"
|
|
16
|
-
* },
|
|
17
|
-
* checksum: "string"
|
|
18
|
-
* }],
|
|
19
|
-
* channels: [{
|
|
20
|
-
* id: "string",
|
|
21
|
-
* type: "string",
|
|
22
|
-
* content: {},
|
|
23
|
-
* locales: {
|
|
24
|
-
* "string": {}
|
|
25
|
-
* },
|
|
26
|
-
* checksum: "string"
|
|
27
|
-
* }]
|
|
28
|
-
* }
|
|
29
|
-
*/
|
|
30
|
-
export interface NotificationUpdateVariationsParams {
|
|
31
|
-
blocks?: Courier.NotificationBlock[];
|
|
32
|
-
channels?: Courier.NotificationChannel[];
|
|
33
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
import * as Courier from "../../../../index";
|
|
5
|
-
/**
|
|
6
|
-
* @example
|
|
7
|
-
* {
|
|
8
|
-
* blocks: [{
|
|
9
|
-
* alias: "string",
|
|
10
|
-
* context: "string",
|
|
11
|
-
* id: "string",
|
|
12
|
-
* type: Courier.BlockType.Action,
|
|
13
|
-
* content: "string",
|
|
14
|
-
* locales: {
|
|
15
|
-
* "string": "string"
|
|
16
|
-
* },
|
|
17
|
-
* checksum: "string"
|
|
18
|
-
* }],
|
|
19
|
-
* channels: [{
|
|
20
|
-
* id: "string",
|
|
21
|
-
* type: "string",
|
|
22
|
-
* content: {},
|
|
23
|
-
* locales: {
|
|
24
|
-
* "string": {}
|
|
25
|
-
* },
|
|
26
|
-
* checksum: "string"
|
|
27
|
-
* }]
|
|
28
|
-
* }
|
|
29
|
-
*/
|
|
30
|
-
export interface NotificationDraftUpdateVariationsParams {
|
|
31
|
-
blocks?: Courier.NotificationBlock[];
|
|
32
|
-
channels?: Courier.NotificationChannel[];
|
|
33
|
-
}
|
package/dist/api/resources/notifications/client/requests/NotificationUpdateVariationsParams.d.ts
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
import * as Courier from "../../../../index";
|
|
5
|
-
/**
|
|
6
|
-
* @example
|
|
7
|
-
* {
|
|
8
|
-
* blocks: [{
|
|
9
|
-
* alias: "string",
|
|
10
|
-
* context: "string",
|
|
11
|
-
* id: "string",
|
|
12
|
-
* type: Courier.BlockType.Action,
|
|
13
|
-
* content: "string",
|
|
14
|
-
* locales: {
|
|
15
|
-
* "string": "string"
|
|
16
|
-
* },
|
|
17
|
-
* checksum: "string"
|
|
18
|
-
* }],
|
|
19
|
-
* channels: [{
|
|
20
|
-
* id: "string",
|
|
21
|
-
* type: "string",
|
|
22
|
-
* content: {},
|
|
23
|
-
* locales: {
|
|
24
|
-
* "string": {}
|
|
25
|
-
* },
|
|
26
|
-
* checksum: "string"
|
|
27
|
-
* }]
|
|
28
|
-
* }
|
|
29
|
-
*/
|
|
30
|
-
export interface NotificationUpdateVariationsParams {
|
|
31
|
-
blocks?: Courier.NotificationBlock[];
|
|
32
|
-
channels?: Courier.NotificationChannel[];
|
|
33
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|