@trycourier/courier 7.10.1 → 7.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +35 -0
- package/api-promise.d.mts +1 -0
- package/api-promise.d.mts.map +1 -1
- package/api-promise.d.ts +1 -0
- package/api-promise.d.ts.map +1 -1
- package/api-promise.mjs +1 -0
- package/api-promise.mjs.map +1 -1
- package/client.d.mts +4 -4
- package/client.d.mts.map +1 -1
- package/client.d.ts +4 -4
- package/client.d.ts.map +1 -1
- package/client.js +12 -1
- package/client.js.map +1 -1
- package/client.mjs +12 -1
- package/client.mjs.map +1 -1
- package/core/api-promise.d.mts.map +1 -1
- package/core/api-promise.d.ts.map +1 -1
- package/core/api-promise.mjs.map +1 -1
- package/core/error.mjs.map +1 -1
- package/core/resource.d.mts.map +1 -1
- package/core/resource.d.ts.map +1 -1
- package/core/uploads.d.mts.map +1 -1
- package/core/uploads.d.ts.map +1 -1
- package/core/uploads.mjs.map +1 -1
- package/error.d.mts +1 -0
- package/error.d.mts.map +1 -1
- package/error.d.ts +1 -0
- package/error.d.ts.map +1 -1
- package/error.mjs +1 -0
- package/error.mjs.map +1 -1
- package/index.d.mts.map +1 -1
- package/index.d.ts.map +1 -1
- package/index.mjs.map +1 -1
- package/internal/detect-platform.mjs.map +1 -1
- package/internal/headers.mjs.map +1 -1
- package/internal/parse.d.mts.map +1 -1
- package/internal/parse.d.ts.map +1 -1
- package/internal/parse.mjs.map +1 -1
- package/internal/qs/formats.d.mts.map +1 -1
- package/internal/qs/formats.d.ts.map +1 -1
- package/internal/qs/index.d.mts +2 -2
- package/internal/qs/index.d.mts.map +1 -1
- package/internal/qs/index.d.ts +2 -2
- package/internal/qs/index.d.ts.map +1 -1
- package/internal/qs/index.mjs.map +1 -1
- package/internal/qs/stringify.d.mts.map +1 -1
- package/internal/qs/stringify.d.ts.map +1 -1
- package/internal/qs/stringify.mjs.map +1 -1
- package/internal/qs/utils.d.mts.map +1 -1
- package/internal/qs/utils.d.ts.map +1 -1
- package/internal/qs/utils.mjs.map +1 -1
- package/internal/request-options.d.mts.map +1 -1
- package/internal/request-options.d.ts.map +1 -1
- package/internal/shims.d.mts +6 -0
- package/internal/shims.d.mts.map +1 -1
- package/internal/shims.d.ts +6 -0
- package/internal/shims.d.ts.map +1 -1
- package/internal/to-file.d.mts.map +1 -1
- package/internal/to-file.d.ts.map +1 -1
- package/internal/to-file.mjs.map +1 -1
- package/internal/types.d.mts +10 -10
- package/internal/types.d.mts.map +1 -1
- package/internal/types.d.ts +10 -10
- package/internal/types.d.ts.map +1 -1
- package/internal/uploads.d.mts.map +1 -1
- package/internal/uploads.d.ts.map +1 -1
- package/internal/uploads.mjs.map +1 -1
- package/internal/utils/base64.mjs.map +1 -1
- package/internal/utils/log.d.mts.map +1 -1
- package/internal/utils/log.d.ts.map +1 -1
- package/internal/utils/log.js +2 -0
- package/internal/utils/log.js.map +1 -1
- package/internal/utils/log.mjs +2 -0
- package/internal/utils/log.mjs.map +1 -1
- package/internal/utils/path.mjs.map +1 -1
- package/internal/utils/query.mjs.map +1 -1
- package/internal/utils/values.mjs.map +1 -1
- package/internal/utils.d.mts.map +1 -1
- package/internal/utils.d.ts.map +1 -1
- package/internal/utils.mjs.map +1 -1
- package/package.json +1 -1
- package/resource.d.mts +1 -0
- package/resource.d.mts.map +1 -1
- package/resource.d.ts +1 -0
- package/resource.d.ts.map +1 -1
- package/resource.mjs +1 -0
- package/resource.mjs.map +1 -1
- package/resources/audiences.d.mts.map +1 -1
- package/resources/audiences.d.ts.map +1 -1
- package/resources/audiences.mjs.map +1 -1
- package/resources/audit-events.d.mts.map +1 -1
- package/resources/audit-events.d.ts.map +1 -1
- package/resources/audit-events.mjs.map +1 -1
- package/resources/auth.d.mts.map +1 -1
- package/resources/auth.d.ts.map +1 -1
- package/resources/auth.mjs.map +1 -1
- package/resources/automations/automations.d.mts.map +1 -1
- package/resources/automations/automations.d.ts.map +1 -1
- package/resources/automations/automations.mjs.map +1 -1
- package/resources/automations/index.d.mts.map +1 -1
- package/resources/automations/index.d.ts.map +1 -1
- package/resources/automations/index.mjs.map +1 -1
- package/resources/automations/invoke.d.mts.map +1 -1
- package/resources/automations/invoke.d.ts.map +1 -1
- package/resources/automations/invoke.mjs.map +1 -1
- package/resources/automations.d.mts.map +1 -1
- package/resources/automations.d.ts.map +1 -1
- package/resources/automations.mjs.map +1 -1
- package/resources/brands.d.mts.map +1 -1
- package/resources/brands.d.ts.map +1 -1
- package/resources/brands.mjs.map +1 -1
- package/resources/bulk.d.mts.map +1 -1
- package/resources/bulk.d.ts.map +1 -1
- package/resources/bulk.mjs.map +1 -1
- package/resources/inbound.d.mts.map +1 -1
- package/resources/inbound.d.ts.map +1 -1
- package/resources/inbound.mjs.map +1 -1
- package/resources/index.d.mts +2 -2
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +2 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/journeys/index.d.mts +3 -0
- package/resources/journeys/index.d.mts.map +1 -0
- package/resources/journeys/index.d.ts +3 -0
- package/resources/journeys/index.d.ts.map +1 -0
- package/resources/journeys/index.js +9 -0
- package/resources/journeys/index.js.map +1 -0
- package/resources/journeys/index.mjs +4 -0
- package/resources/journeys/index.mjs.map +1 -0
- package/resources/journeys/journeys.d.mts +752 -0
- package/resources/journeys/journeys.d.mts.map +1 -0
- package/resources/journeys/journeys.d.ts +752 -0
- package/resources/journeys/journeys.d.ts.map +1 -0
- package/resources/journeys/journeys.js +148 -0
- package/resources/journeys/journeys.js.map +1 -0
- package/resources/journeys/journeys.mjs +143 -0
- package/resources/journeys/journeys.mjs.map +1 -0
- package/resources/journeys/templates.d.mts +219 -0
- package/resources/journeys/templates.d.mts.map +1 -0
- package/resources/journeys/templates.d.ts +219 -0
- package/resources/journeys/templates.d.ts.map +1 -0
- package/resources/journeys/templates.js +142 -0
- package/resources/journeys/templates.js.map +1 -0
- package/resources/journeys/templates.mjs +138 -0
- package/resources/journeys/templates.mjs.map +1 -0
- package/resources/journeys.d.mts +1 -142
- package/resources/journeys.d.mts.map +1 -1
- package/resources/journeys.d.ts +1 -142
- package/resources/journeys.d.ts.map +1 -1
- package/resources/journeys.js +2 -34
- package/resources/journeys.js.map +1 -1
- package/resources/journeys.mjs +1 -32
- package/resources/journeys.mjs.map +1 -1
- package/resources/lists/index.d.mts.map +1 -1
- package/resources/lists/index.d.ts.map +1 -1
- package/resources/lists/index.mjs.map +1 -1
- package/resources/lists/lists.d.mts.map +1 -1
- package/resources/lists/lists.d.ts.map +1 -1
- package/resources/lists/lists.mjs.map +1 -1
- package/resources/lists/subscriptions.d.mts.map +1 -1
- package/resources/lists/subscriptions.d.ts.map +1 -1
- package/resources/lists/subscriptions.mjs.map +1 -1
- package/resources/lists.d.mts.map +1 -1
- package/resources/lists.d.ts.map +1 -1
- package/resources/lists.mjs.map +1 -1
- package/resources/messages.d.mts.map +1 -1
- package/resources/messages.d.ts.map +1 -1
- package/resources/messages.mjs.map +1 -1
- package/resources/notifications/checks.d.mts +13 -1
- package/resources/notifications/checks.d.mts.map +1 -1
- package/resources/notifications/checks.d.ts +13 -1
- package/resources/notifications/checks.d.ts.map +1 -1
- package/resources/notifications/checks.js +6 -0
- package/resources/notifications/checks.js.map +1 -1
- package/resources/notifications/checks.mjs +6 -0
- package/resources/notifications/checks.mjs.map +1 -1
- package/resources/notifications/index.d.mts +1 -1
- package/resources/notifications/index.d.mts.map +1 -1
- package/resources/notifications/index.d.ts +1 -1
- package/resources/notifications/index.d.ts.map +1 -1
- package/resources/notifications/index.mjs.map +1 -1
- package/resources/notifications/notifications.d.mts +48 -62
- package/resources/notifications/notifications.d.mts.map +1 -1
- package/resources/notifications/notifications.d.ts +48 -62
- package/resources/notifications/notifications.d.ts.map +1 -1
- package/resources/notifications/notifications.js +3 -3
- package/resources/notifications/notifications.js.map +1 -1
- package/resources/notifications/notifications.mjs +3 -3
- package/resources/notifications/notifications.mjs.map +1 -1
- package/resources/notifications.d.mts.map +1 -1
- package/resources/notifications.d.ts.map +1 -1
- package/resources/notifications.mjs.map +1 -1
- package/resources/profiles/index.d.mts.map +1 -1
- package/resources/profiles/index.d.ts.map +1 -1
- package/resources/profiles/index.mjs.map +1 -1
- package/resources/profiles/lists.d.mts.map +1 -1
- package/resources/profiles/lists.d.ts.map +1 -1
- package/resources/profiles/lists.mjs.map +1 -1
- package/resources/profiles/profiles.d.mts.map +1 -1
- package/resources/profiles/profiles.d.ts.map +1 -1
- package/resources/profiles/profiles.mjs.map +1 -1
- package/resources/profiles.d.mts.map +1 -1
- package/resources/profiles.d.ts.map +1 -1
- package/resources/profiles.mjs.map +1 -1
- package/resources/providers/catalog.d.mts.map +1 -1
- package/resources/providers/catalog.d.ts.map +1 -1
- package/resources/providers/catalog.mjs.map +1 -1
- package/resources/providers/index.d.mts.map +1 -1
- package/resources/providers/index.d.ts.map +1 -1
- package/resources/providers/index.mjs.map +1 -1
- package/resources/providers/providers.d.mts.map +1 -1
- package/resources/providers/providers.d.ts.map +1 -1
- package/resources/providers/providers.mjs.map +1 -1
- package/resources/providers.d.mts.map +1 -1
- package/resources/providers.d.ts.map +1 -1
- package/resources/providers.mjs.map +1 -1
- package/resources/requests.d.mts.map +1 -1
- package/resources/requests.d.ts.map +1 -1
- package/resources/requests.mjs.map +1 -1
- package/resources/routing-strategies.d.mts.map +1 -1
- package/resources/routing-strategies.d.ts.map +1 -1
- package/resources/routing-strategies.mjs.map +1 -1
- package/resources/send.d.mts.map +1 -1
- package/resources/send.d.ts.map +1 -1
- package/resources/send.mjs.map +1 -1
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts.map +1 -1
- package/resources/tenants/index.d.mts +1 -1
- package/resources/tenants/index.d.mts.map +1 -1
- package/resources/tenants/index.d.ts +1 -1
- package/resources/tenants/index.d.ts.map +1 -1
- package/resources/tenants/index.js.map +1 -1
- package/resources/tenants/index.mjs.map +1 -1
- package/resources/tenants/preferences/index.d.mts.map +1 -1
- package/resources/tenants/preferences/index.d.ts.map +1 -1
- package/resources/tenants/preferences/index.mjs.map +1 -1
- package/resources/tenants/preferences/items.d.mts.map +1 -1
- package/resources/tenants/preferences/items.d.ts.map +1 -1
- package/resources/tenants/preferences/items.mjs.map +1 -1
- package/resources/tenants/preferences/preferences.d.mts.map +1 -1
- package/resources/tenants/preferences/preferences.d.ts.map +1 -1
- package/resources/tenants/preferences/preferences.mjs.map +1 -1
- package/resources/tenants/preferences.d.mts.map +1 -1
- package/resources/tenants/preferences.d.ts.map +1 -1
- package/resources/tenants/preferences.mjs.map +1 -1
- package/resources/tenants/templates/index.d.mts +1 -1
- package/resources/tenants/templates/index.d.mts.map +1 -1
- package/resources/tenants/templates/index.d.ts +1 -1
- package/resources/tenants/templates/index.d.ts.map +1 -1
- package/resources/tenants/templates/index.js.map +1 -1
- package/resources/tenants/templates/index.mjs.map +1 -1
- package/resources/tenants/templates/templates.d.mts +23 -1
- package/resources/tenants/templates/templates.d.mts.map +1 -1
- package/resources/tenants/templates/templates.d.ts +23 -1
- package/resources/tenants/templates/templates.d.ts.map +1 -1
- package/resources/tenants/templates/templates.js +23 -0
- package/resources/tenants/templates/templates.js.map +1 -1
- package/resources/tenants/templates/templates.mjs +23 -0
- package/resources/tenants/templates/templates.mjs.map +1 -1
- package/resources/tenants/templates/versions.d.mts.map +1 -1
- package/resources/tenants/templates/versions.d.ts.map +1 -1
- package/resources/tenants/templates/versions.mjs.map +1 -1
- package/resources/tenants/templates.d.mts.map +1 -1
- package/resources/tenants/templates.d.ts.map +1 -1
- package/resources/tenants/templates.mjs.map +1 -1
- package/resources/tenants/tenants.d.mts +2 -2
- package/resources/tenants/tenants.d.mts.map +1 -1
- package/resources/tenants/tenants.d.ts +2 -2
- package/resources/tenants/tenants.d.ts.map +1 -1
- package/resources/tenants/tenants.js.map +1 -1
- package/resources/tenants/tenants.mjs.map +1 -1
- package/resources/tenants.d.mts.map +1 -1
- package/resources/tenants.d.ts.map +1 -1
- package/resources/tenants.mjs.map +1 -1
- package/resources/translations.d.mts.map +1 -1
- package/resources/translations.d.ts.map +1 -1
- package/resources/translations.mjs.map +1 -1
- package/resources/users/index.d.mts.map +1 -1
- package/resources/users/index.d.ts.map +1 -1
- package/resources/users/index.mjs.map +1 -1
- package/resources/users/preferences.d.mts.map +1 -1
- package/resources/users/preferences.d.ts.map +1 -1
- package/resources/users/preferences.mjs.map +1 -1
- package/resources/users/tenants.d.mts.map +1 -1
- package/resources/users/tenants.d.ts.map +1 -1
- package/resources/users/tenants.mjs.map +1 -1
- package/resources/users/tokens.d.mts.map +1 -1
- package/resources/users/tokens.d.ts.map +1 -1
- package/resources/users/tokens.mjs.map +1 -1
- package/resources/users/users.d.mts.map +1 -1
- package/resources/users/users.d.ts.map +1 -1
- package/resources/users/users.mjs.map +1 -1
- package/resources/users.d.mts.map +1 -1
- package/resources/users.d.ts.map +1 -1
- package/resources/users.mjs.map +1 -1
- package/resources.d.mts.map +1 -1
- package/resources.d.ts.map +1 -1
- package/resources.mjs.map +1 -1
- package/src/client.ts +89 -11
- package/src/internal/types.ts +6 -8
- package/src/internal/utils/log.ts +2 -0
- package/src/resources/index.ts +35 -2
- package/src/resources/journeys/index.ts +54 -0
- package/src/resources/journeys/journeys.ts +1047 -0
- package/src/resources/journeys/templates.ts +318 -0
- package/src/resources/journeys.ts +1 -172
- package/src/resources/notifications/checks.ts +13 -1
- package/src/resources/notifications/index.ts +1 -1
- package/src/resources/notifications/notifications.ts +55 -73
- package/src/resources/tenants/index.ts +1 -0
- package/src/resources/tenants/templates/index.ts +1 -0
- package/src/resources/tenants/templates/templates.ts +32 -0
- package/src/resources/tenants/tenants.ts +2 -0
- package/src/version.ts +1 -1
- package/uploads.d.mts +1 -0
- package/uploads.d.mts.map +1 -1
- package/uploads.d.ts +1 -0
- package/uploads.d.ts.map +1 -1
- package/uploads.mjs +1 -0
- package/uploads.mjs.map +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../core/resource';
|
|
4
|
-
import * as NotificationsAPI from './notifications';
|
|
5
4
|
import * as Shared from '../shared';
|
|
6
5
|
import * as ChecksAPI from './checks';
|
|
7
6
|
import {
|
|
@@ -26,7 +25,7 @@ export class Notifications extends APIResource {
|
|
|
26
25
|
*
|
|
27
26
|
* @example
|
|
28
27
|
* ```ts
|
|
29
|
-
* const
|
|
28
|
+
* const notificationTemplateResponse =
|
|
30
29
|
* await client.notifications.create({
|
|
31
30
|
* notification: {
|
|
32
31
|
* name: 'Welcome Email',
|
|
@@ -43,10 +42,7 @@ export class Notifications extends APIResource {
|
|
|
43
42
|
* });
|
|
44
43
|
* ```
|
|
45
44
|
*/
|
|
46
|
-
create(
|
|
47
|
-
body: NotificationCreateParams,
|
|
48
|
-
options?: RequestOptions,
|
|
49
|
-
): APIPromise<NotificationTemplateGetResponse> {
|
|
45
|
+
create(body: NotificationCreateParams, options?: RequestOptions): APIPromise<NotificationTemplateResponse> {
|
|
50
46
|
return this._client.post('/notifications', { body, ...options });
|
|
51
47
|
}
|
|
52
48
|
|
|
@@ -56,7 +52,7 @@ export class Notifications extends APIResource {
|
|
|
56
52
|
*
|
|
57
53
|
* @example
|
|
58
54
|
* ```ts
|
|
59
|
-
* const
|
|
55
|
+
* const notificationTemplateResponse =
|
|
60
56
|
* await client.notifications.retrieve('id');
|
|
61
57
|
* ```
|
|
62
58
|
*/
|
|
@@ -64,7 +60,7 @@ export class Notifications extends APIResource {
|
|
|
64
60
|
id: string,
|
|
65
61
|
query: NotificationRetrieveParams | null | undefined = {},
|
|
66
62
|
options?: RequestOptions,
|
|
67
|
-
): APIPromise<
|
|
63
|
+
): APIPromise<NotificationTemplateResponse> {
|
|
68
64
|
return this._client.get(path`/notifications/${id}`, { query, ...options });
|
|
69
65
|
}
|
|
70
66
|
|
|
@@ -217,7 +213,7 @@ export class Notifications extends APIResource {
|
|
|
217
213
|
*
|
|
218
214
|
* @example
|
|
219
215
|
* ```ts
|
|
220
|
-
* const
|
|
216
|
+
* const notificationTemplateResponse =
|
|
221
217
|
* await client.notifications.replace('id', {
|
|
222
218
|
* notification: {
|
|
223
219
|
* name: 'Updated Name',
|
|
@@ -238,7 +234,7 @@ export class Notifications extends APIResource {
|
|
|
238
234
|
id: string,
|
|
239
235
|
body: NotificationReplaceParams,
|
|
240
236
|
options?: RequestOptions,
|
|
241
|
-
): APIPromise<
|
|
237
|
+
): APIPromise<NotificationTemplateResponse> {
|
|
242
238
|
return this._client.put(path`/notifications/${id}`, { body, ...options });
|
|
243
239
|
}
|
|
244
240
|
|
|
@@ -513,8 +509,8 @@ export namespace NotificationLocalePutRequest {
|
|
|
513
509
|
*/
|
|
514
510
|
export interface NotificationTemplateCreateRequest {
|
|
515
511
|
/**
|
|
516
|
-
*
|
|
517
|
-
*
|
|
512
|
+
* Core template fields used in POST and PUT request bodies (nested under a
|
|
513
|
+
* `notification` key) and returned at the top level in responses.
|
|
518
514
|
*/
|
|
519
515
|
notification: NotificationTemplatePayload;
|
|
520
516
|
|
|
@@ -526,58 +522,8 @@ export interface NotificationTemplateCreateRequest {
|
|
|
526
522
|
}
|
|
527
523
|
|
|
528
524
|
/**
|
|
529
|
-
*
|
|
530
|
-
*
|
|
531
|
-
*/
|
|
532
|
-
export interface NotificationTemplateGetResponse {
|
|
533
|
-
/**
|
|
534
|
-
* Epoch milliseconds when the template was created.
|
|
535
|
-
*/
|
|
536
|
-
created: number;
|
|
537
|
-
|
|
538
|
-
/**
|
|
539
|
-
* User ID of the creator.
|
|
540
|
-
*/
|
|
541
|
-
creator: string;
|
|
542
|
-
|
|
543
|
-
/**
|
|
544
|
-
* Full document shape used in POST and PUT request bodies, and returned inside the
|
|
545
|
-
* GET response envelope.
|
|
546
|
-
*/
|
|
547
|
-
notification: NotificationTemplateGetResponse.Notification;
|
|
548
|
-
|
|
549
|
-
/**
|
|
550
|
-
* The template state. Always uppercase.
|
|
551
|
-
*/
|
|
552
|
-
state: 'DRAFT' | 'PUBLISHED';
|
|
553
|
-
|
|
554
|
-
/**
|
|
555
|
-
* Epoch milliseconds of last update.
|
|
556
|
-
*/
|
|
557
|
-
updated?: number;
|
|
558
|
-
|
|
559
|
-
/**
|
|
560
|
-
* User ID of the last updater.
|
|
561
|
-
*/
|
|
562
|
-
updater?: string;
|
|
563
|
-
}
|
|
564
|
-
|
|
565
|
-
export namespace NotificationTemplateGetResponse {
|
|
566
|
-
/**
|
|
567
|
-
* Full document shape used in POST and PUT request bodies, and returned inside the
|
|
568
|
-
* GET response envelope.
|
|
569
|
-
*/
|
|
570
|
-
export interface Notification extends NotificationsAPI.NotificationTemplatePayload {
|
|
571
|
-
/**
|
|
572
|
-
* The template ID.
|
|
573
|
-
*/
|
|
574
|
-
id: string;
|
|
575
|
-
}
|
|
576
|
-
}
|
|
577
|
-
|
|
578
|
-
/**
|
|
579
|
-
* Full document shape used in POST and PUT request bodies, and returned inside the
|
|
580
|
-
* GET response envelope.
|
|
525
|
+
* Core template fields used in POST and PUT request bodies (nested under a
|
|
526
|
+
* `notification` key) and returned at the top level in responses.
|
|
581
527
|
*/
|
|
582
528
|
export interface NotificationTemplatePayload {
|
|
583
529
|
/**
|
|
@@ -645,6 +591,42 @@ export interface NotificationTemplatePublishRequest {
|
|
|
645
591
|
version?: string;
|
|
646
592
|
}
|
|
647
593
|
|
|
594
|
+
/**
|
|
595
|
+
* Response for GET /notifications/{id}, POST /notifications, and PUT
|
|
596
|
+
* /notifications/{id}. Returns all template fields at the top level.
|
|
597
|
+
*/
|
|
598
|
+
export interface NotificationTemplateResponse extends NotificationTemplatePayload {
|
|
599
|
+
/**
|
|
600
|
+
* The template ID.
|
|
601
|
+
*/
|
|
602
|
+
id: string;
|
|
603
|
+
|
|
604
|
+
/**
|
|
605
|
+
* Epoch milliseconds when the template was created.
|
|
606
|
+
*/
|
|
607
|
+
created: number;
|
|
608
|
+
|
|
609
|
+
/**
|
|
610
|
+
* User ID of the creator.
|
|
611
|
+
*/
|
|
612
|
+
creator: string;
|
|
613
|
+
|
|
614
|
+
/**
|
|
615
|
+
* The template state. Always uppercase.
|
|
616
|
+
*/
|
|
617
|
+
state: 'DRAFT' | 'PUBLISHED';
|
|
618
|
+
|
|
619
|
+
/**
|
|
620
|
+
* Epoch milliseconds of last update.
|
|
621
|
+
*/
|
|
622
|
+
updated?: number;
|
|
623
|
+
|
|
624
|
+
/**
|
|
625
|
+
* User ID of the last updater.
|
|
626
|
+
*/
|
|
627
|
+
updater?: string;
|
|
628
|
+
}
|
|
629
|
+
|
|
648
630
|
/**
|
|
649
631
|
* Template state. Defaults to `DRAFT`.
|
|
650
632
|
*/
|
|
@@ -689,8 +671,8 @@ export interface NotificationTemplateSummary {
|
|
|
689
671
|
*/
|
|
690
672
|
export interface NotificationTemplateUpdateRequest {
|
|
691
673
|
/**
|
|
692
|
-
*
|
|
693
|
-
*
|
|
674
|
+
* Core template fields used in POST and PUT request bodies (nested under a
|
|
675
|
+
* `notification` key) and returned at the top level in responses.
|
|
694
676
|
*/
|
|
695
677
|
notification: NotificationTemplatePayload;
|
|
696
678
|
|
|
@@ -753,14 +735,14 @@ export namespace NotificationListResponse {
|
|
|
753
735
|
*/
|
|
754
736
|
event_ids: Array<string>;
|
|
755
737
|
|
|
756
|
-
note: string;
|
|
757
|
-
|
|
758
738
|
routing: Shared.MessageRouting;
|
|
759
739
|
|
|
760
740
|
topic_id: string;
|
|
761
741
|
|
|
762
742
|
updated_at: number;
|
|
763
743
|
|
|
744
|
+
note?: string;
|
|
745
|
+
|
|
764
746
|
tags?: Notification.Tags | null;
|
|
765
747
|
|
|
766
748
|
title?: string | null;
|
|
@@ -789,8 +771,8 @@ export type NotificationRetrieveContentResponse = NotificationContentGetResponse
|
|
|
789
771
|
|
|
790
772
|
export interface NotificationCreateParams {
|
|
791
773
|
/**
|
|
792
|
-
*
|
|
793
|
-
*
|
|
774
|
+
* Core template fields used in POST and PUT request bodies (nested under a
|
|
775
|
+
* `notification` key) and returned at the top level in responses.
|
|
794
776
|
*/
|
|
795
777
|
notification: NotificationTemplatePayload;
|
|
796
778
|
|
|
@@ -946,8 +928,8 @@ export namespace NotificationPutLocaleParams {
|
|
|
946
928
|
|
|
947
929
|
export interface NotificationReplaceParams {
|
|
948
930
|
/**
|
|
949
|
-
*
|
|
950
|
-
*
|
|
931
|
+
* Core template fields used in POST and PUT request bodies (nested under a
|
|
932
|
+
* `notification` key) and returned at the top level in responses.
|
|
951
933
|
*/
|
|
952
934
|
notification: NotificationTemplatePayload;
|
|
953
935
|
|
|
@@ -980,9 +962,9 @@ export declare namespace Notifications {
|
|
|
980
962
|
type NotificationGetContent as NotificationGetContent,
|
|
981
963
|
type NotificationLocalePutRequest as NotificationLocalePutRequest,
|
|
982
964
|
type NotificationTemplateCreateRequest as NotificationTemplateCreateRequest,
|
|
983
|
-
type NotificationTemplateGetResponse as NotificationTemplateGetResponse,
|
|
984
965
|
type NotificationTemplatePayload as NotificationTemplatePayload,
|
|
985
966
|
type NotificationTemplatePublishRequest as NotificationTemplatePublishRequest,
|
|
967
|
+
type NotificationTemplateResponse as NotificationTemplateResponse,
|
|
986
968
|
type NotificationTemplateState as NotificationTemplateState,
|
|
987
969
|
type NotificationTemplateSummary as NotificationTemplateSummary,
|
|
988
970
|
type NotificationTemplateUpdateRequest as NotificationTemplateUpdateRequest,
|
|
@@ -6,6 +6,7 @@ import * as TenantsAPI from '../tenants';
|
|
|
6
6
|
import * as VersionsAPI from './versions';
|
|
7
7
|
import { VersionRetrieveParams, Versions } from './versions';
|
|
8
8
|
import { APIPromise } from '../../../core/api-promise';
|
|
9
|
+
import { buildHeaders } from '../../../internal/headers';
|
|
9
10
|
import { RequestOptions } from '../../../internal/request-options';
|
|
10
11
|
import { path } from '../../../internal/utils/path';
|
|
11
12
|
|
|
@@ -50,6 +51,29 @@ export class Templates extends APIResource {
|
|
|
50
51
|
return this._client.get(path`/tenants/${tenantID}/templates`, { query, ...options });
|
|
51
52
|
}
|
|
52
53
|
|
|
54
|
+
/**
|
|
55
|
+
* Deletes the tenant's notification template with the given `template_id`.
|
|
56
|
+
*
|
|
57
|
+
* Returns **204 No Content** with an empty body on success.
|
|
58
|
+
*
|
|
59
|
+
* Returns **404** if there is no template with this ID for the tenant, including a
|
|
60
|
+
* second `DELETE` after a successful removal.
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
* ```ts
|
|
64
|
+
* await client.tenants.templates.delete('template_id', {
|
|
65
|
+
* tenant_id: 'tenant_id',
|
|
66
|
+
* });
|
|
67
|
+
* ```
|
|
68
|
+
*/
|
|
69
|
+
delete(templateID: string, params: TemplateDeleteParams, options?: RequestOptions): APIPromise<void> {
|
|
70
|
+
const { tenant_id } = params;
|
|
71
|
+
return this._client.delete(path`/tenants/${tenant_id}/templates/${templateID}`, {
|
|
72
|
+
...options,
|
|
73
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
|
|
53
77
|
/**
|
|
54
78
|
* Publishes a specific version of a notification template for a tenant.
|
|
55
79
|
*
|
|
@@ -174,6 +198,13 @@ export interface TemplateListParams {
|
|
|
174
198
|
limit?: number | null;
|
|
175
199
|
}
|
|
176
200
|
|
|
201
|
+
export interface TemplateDeleteParams {
|
|
202
|
+
/**
|
|
203
|
+
* Id of the tenant that owns the template.
|
|
204
|
+
*/
|
|
205
|
+
tenant_id: string;
|
|
206
|
+
}
|
|
207
|
+
|
|
177
208
|
export interface TemplatePublishParams {
|
|
178
209
|
/**
|
|
179
210
|
* Path param: Id of the tenant that owns the template.
|
|
@@ -214,6 +245,7 @@ export declare namespace Templates {
|
|
|
214
245
|
type TemplateListResponse as TemplateListResponse,
|
|
215
246
|
type TemplateRetrieveParams as TemplateRetrieveParams,
|
|
216
247
|
type TemplateListParams as TemplateListParams,
|
|
248
|
+
type TemplateDeleteParams as TemplateDeleteParams,
|
|
217
249
|
type TemplatePublishParams as TemplatePublishParams,
|
|
218
250
|
type TemplateReplaceParams as TemplateReplaceParams,
|
|
219
251
|
};
|
|
@@ -7,6 +7,7 @@ import * as PreferencesAPI from './preferences/preferences';
|
|
|
7
7
|
import { Preferences } from './preferences/preferences';
|
|
8
8
|
import * as TemplatesAPI from './templates/templates';
|
|
9
9
|
import {
|
|
10
|
+
TemplateDeleteParams,
|
|
10
11
|
TemplateListParams,
|
|
11
12
|
TemplateListResponse,
|
|
12
13
|
TemplatePublishParams,
|
|
@@ -463,6 +464,7 @@ export declare namespace Tenants {
|
|
|
463
464
|
type TemplateListResponse as TemplateListResponse,
|
|
464
465
|
type TemplateRetrieveParams as TemplateRetrieveParams,
|
|
465
466
|
type TemplateListParams as TemplateListParams,
|
|
467
|
+
type TemplateDeleteParams as TemplateDeleteParams,
|
|
466
468
|
type TemplatePublishParams as TemplatePublishParams,
|
|
467
469
|
type TemplateReplaceParams as TemplateReplaceParams,
|
|
468
470
|
};
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '7.
|
|
1
|
+
export const VERSION = '7.11.0'; // x-release-please-version
|
package/uploads.d.mts
CHANGED
package/uploads.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uploads.d.mts","sourceRoot":"","sources":["src/uploads.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"uploads.d.mts","sourceRoot":"","sources":["src/uploads.ts"],"names":[],"mappings":"AAAA,qDAAqD;AACrD,mCAA+B"}
|
package/uploads.d.ts
CHANGED
package/uploads.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uploads.d.ts","sourceRoot":"","sources":["src/uploads.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"uploads.d.ts","sourceRoot":"","sources":["src/uploads.ts"],"names":[],"mappings":"AAAA,qDAAqD;AACrD,kCAA+B"}
|
package/uploads.mjs
CHANGED
package/uploads.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uploads.mjs","sourceRoot":"","sources":["src/uploads.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"uploads.mjs","sourceRoot":"","sources":["src/uploads.ts"],"names":[],"mappings":"AAAA,qDAAqD;AACrD,mCAA+B"}
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "7.
|
|
1
|
+
export declare const VERSION = "7.11.0";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "7.
|
|
1
|
+
export declare const VERSION = "7.11.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '7.
|
|
1
|
+
export const VERSION = '7.11.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|