@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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"journeys.d.ts","sourceRoot":"","sources":["../../src/resources/journeys/journeys.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,KAAK,WAAW,sBAAmB;AAC1C,OAAO,KAAK,MAAM,qBAAkB;AACpC,OAAO,KAAK,YAAY,uBAAoB;AAC5C,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,kBAAkB,EAClB,0BAA0B,EAC1B,qBAAqB,EACrB,qBAAqB,EACrB,sBAAsB,EACtB,SAAS,EACV,uBAAoB;AACrB,OAAO,EAAE,UAAU,EAAE,kCAA+B;AAEpD,OAAO,EAAE,cAAc,EAAE,0CAAuC;AAGhE,qBAAa,QAAS,SAAQ,WAAW;IACvC,SAAS,EAAE,YAAY,CAAC,SAAS,CAA4C;IAE7E;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,MAAM,CAAC,IAAI,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,eAAe,CAAC;IAIxF;;;;;;;;OAQG;IACH,QAAQ,CACN,UAAU,EAAE,MAAM,EAClB,KAAK,GAAE,qBAAqB,GAAG,IAAI,GAAG,SAAc,EACpD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,eAAe,CAAC;IAI9B;;;;;;;OAOG;IACH,IAAI,CACF,KAAK,GAAE,iBAAiB,GAAG,IAAI,GAAG,SAAc,EAChD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,oBAAoB,CAAC;IAInC;;;;;;;;OAQG;IACH,OAAO,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;IAOvE;;;;;;;;;;;;;;OAcG;IACH,MAAM,CACJ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AAe,EACvC,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,YAAY,IAAI,YAAY,EACjC,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,oBAAoB,IAAI,oBAAoB,GAClD,CAAC;IAEF,OAAO,EACL,SAAS,IAAI,SAAS,EACtB,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,qBAAqB,IAAI,qBAAqB,GACpD,CAAC;CACH"}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Journeys = void 0;
|
|
5
|
+
const tslib_1 = require("../../internal/tslib.js");
|
|
6
|
+
const resource_1 = require("../../core/resource.js");
|
|
7
|
+
const TemplatesAPI = tslib_1.__importStar(require("./templates.js"));
|
|
8
|
+
const templates_1 = require("./templates.js");
|
|
9
|
+
const headers_1 = require("../../internal/headers.js");
|
|
10
|
+
const path_1 = require("../../internal/utils/path.js");
|
|
11
|
+
class Journeys extends resource_1.APIResource {
|
|
12
|
+
constructor() {
|
|
13
|
+
super(...arguments);
|
|
14
|
+
this.templates = new TemplatesAPI.Templates(this._client);
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Create a journey. Defaults to `DRAFT` state; pass `state: "PUBLISHED"` to
|
|
18
|
+
* publish on create. Send nodes are not allowed on `POST`. The standard flow is:
|
|
19
|
+
* create the journey shell here, add notification templates with
|
|
20
|
+
* `POST /journeys/{templateId}/templates`, then wire them into the journey with
|
|
21
|
+
* `PUT /journeys/{templateId}`. Call `POST /journeys/{templateId}/publish` to
|
|
22
|
+
* publish a draft after the fact.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```ts
|
|
26
|
+
* const journeyResponse = await client.journeys.create({
|
|
27
|
+
* name: 'Welcome Journey',
|
|
28
|
+
* nodes: [
|
|
29
|
+
* {
|
|
30
|
+
* id: 'trigger-1',
|
|
31
|
+
* type: 'trigger',
|
|
32
|
+
* trigger_type: 'api',
|
|
33
|
+
* },
|
|
34
|
+
* { id: 'send-1', type: 'send' },
|
|
35
|
+
* ],
|
|
36
|
+
* enabled: true,
|
|
37
|
+
* state: 'DRAFT',
|
|
38
|
+
* });
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
create(body, options) {
|
|
42
|
+
return this._client.post('/journeys', { body, ...options });
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Fetch a journey by id. Pass `?version=draft` (default `published`) to retrieve
|
|
46
|
+
* the working draft, or `?version=vN` to retrieve a historical version.
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* ```ts
|
|
50
|
+
* const journeyResponse = await client.journeys.retrieve('x');
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
retrieve(templateID, query = {}, options) {
|
|
54
|
+
return this._client.get((0, path_1.path) `/journeys/${templateID}`, { query, ...options });
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Get the list of journeys.
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* ```ts
|
|
61
|
+
* const journeysListResponse = await client.journeys.list();
|
|
62
|
+
* ```
|
|
63
|
+
*/
|
|
64
|
+
list(query = {}, options) {
|
|
65
|
+
return this._client.get('/journeys', { query, ...options });
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Archive a journey. Archived journeys cannot be invoked. Existing journey runs
|
|
69
|
+
* continue to completion.
|
|
70
|
+
*
|
|
71
|
+
* @example
|
|
72
|
+
* ```ts
|
|
73
|
+
* await client.journeys.archive('x');
|
|
74
|
+
* ```
|
|
75
|
+
*/
|
|
76
|
+
archive(templateID, options) {
|
|
77
|
+
return this._client.delete((0, path_1.path) `/journeys/${templateID}`, {
|
|
78
|
+
...options,
|
|
79
|
+
headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Invoke a journey by id or alias to start a new run. The response includes a
|
|
84
|
+
* `runId` identifying the run.
|
|
85
|
+
*
|
|
86
|
+
* @example
|
|
87
|
+
* ```ts
|
|
88
|
+
* const journeysInvokeResponse = await client.journeys.invoke(
|
|
89
|
+
* 'templateId',
|
|
90
|
+
* {
|
|
91
|
+
* data: { order_id: 'order-456', amount: 99.99 },
|
|
92
|
+
* user_id: 'user-123',
|
|
93
|
+
* },
|
|
94
|
+
* );
|
|
95
|
+
* ```
|
|
96
|
+
*/
|
|
97
|
+
invoke(templateID, body, options) {
|
|
98
|
+
return this._client.post((0, path_1.path) `/journeys/${templateID}/invoke`, { body, ...options });
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* List published versions of a journey, ordered most recent first.
|
|
102
|
+
*
|
|
103
|
+
* @example
|
|
104
|
+
* ```ts
|
|
105
|
+
* const journeyVersionsListResponse =
|
|
106
|
+
* await client.journeys.listVersions('x');
|
|
107
|
+
* ```
|
|
108
|
+
*/
|
|
109
|
+
listVersions(templateID, options) {
|
|
110
|
+
return this._client.get((0, path_1.path) `/journeys/${templateID}/versions`, options);
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Publish the current draft as a new version. Body is optional; pass
|
|
114
|
+
* `{ "version": "vN" }` to roll back to a prior version instead. Returns 404 if
|
|
115
|
+
* the journey has no draft to publish.
|
|
116
|
+
*
|
|
117
|
+
* @example
|
|
118
|
+
* ```ts
|
|
119
|
+
* const journeyResponse = await client.journeys.publish('x');
|
|
120
|
+
* ```
|
|
121
|
+
*/
|
|
122
|
+
publish(templateID, body = {}, options) {
|
|
123
|
+
return this._client.post((0, path_1.path) `/journeys/${templateID}/publish`, { body, ...options });
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Replace the journey draft. Updates the working draft only; call
|
|
127
|
+
* `POST /journeys/{templateId}/publish` to make it live, or pass
|
|
128
|
+
* `state: "PUBLISHED"` in this request to publish immediately. Send-node
|
|
129
|
+
* `template` ids must already exist and be scoped to this journey, and node ids
|
|
130
|
+
* must not be claimed by another journey.
|
|
131
|
+
*
|
|
132
|
+
* @example
|
|
133
|
+
* ```ts
|
|
134
|
+
* const journeyResponse = await client.journeys.replace('x', {
|
|
135
|
+
* name: 'Welcome Journey v2',
|
|
136
|
+
* nodes: [],
|
|
137
|
+
* enabled: true,
|
|
138
|
+
* state: 'DRAFT',
|
|
139
|
+
* });
|
|
140
|
+
* ```
|
|
141
|
+
*/
|
|
142
|
+
replace(templateID, body, options) {
|
|
143
|
+
return this._client.put((0, path_1.path) `/journeys/${templateID}`, { body, ...options });
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
exports.Journeys = Journeys;
|
|
147
|
+
Journeys.Templates = templates_1.Templates;
|
|
148
|
+
//# sourceMappingURL=journeys.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"journeys.js","sourceRoot":"","sources":["../../src/resources/journeys/journeys.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAGlD,qEAA4C;AAC5C,8CASqB;AAErB,uDAAsD;AAEtD,uDAAiD;AAEjD,MAAa,QAAS,SAAQ,sBAAW;IAAzC;;QACE,cAAS,GAA2B,IAAI,YAAY,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IA6J/E,CAAC;IA3JC;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,MAAM,CAAC,IAAyB,EAAE,OAAwB;QACxD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC9D,CAAC;IAED;;;;;;;;OAQG;IACH,QAAQ,CACN,UAAkB,EAClB,QAAkD,EAAE,EACpD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,aAAa,UAAU,EAAE,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAChF,CAAC;IAED;;;;;;;OAOG;IACH,IAAI,CACF,QAA8C,EAAE,EAChD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC9D,CAAC;IAED;;;;;;;;OAQG;IACH,OAAO,CAAC,UAAkB,EAAE,OAAwB;QAClD,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,aAAa,UAAU,EAAE,EAAE;YACxD,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,MAAM,CACJ,UAAkB,EAClB,IAAyB,EACzB,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,aAAa,UAAU,SAAS,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvF,CAAC;IAED;;;;;;;;OAQG;IACH,YAAY,CAAC,UAAkB,EAAE,OAAwB;QACvD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,aAAa,UAAU,WAAW,EAAE,OAAO,CAAC,CAAC;IAC3E,CAAC;IAED;;;;;;;;;OASG;IACH,OAAO,CACL,UAAkB,EAClB,OAAgD,EAAE,EAClD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,aAAa,UAAU,UAAU,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACxF,CAAC;IAED;;;;;;;;;;;;;;;;OAgBG;IACH,OAAO,CACL,UAAkB,EAClB,IAA0B,EAC1B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,aAAa,UAAU,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/E,CAAC;CACF;AA9JD,4BA8JC;AA4yBD,QAAQ,CAAC,SAAS,GAAG,qBAAS,CAAC"}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
3
|
+
import * as TemplatesAPI from "./templates.mjs";
|
|
4
|
+
import { Templates, } from "./templates.mjs";
|
|
5
|
+
import { buildHeaders } from "../../internal/headers.mjs";
|
|
6
|
+
import { path } from "../../internal/utils/path.mjs";
|
|
7
|
+
export class Journeys extends APIResource {
|
|
8
|
+
constructor() {
|
|
9
|
+
super(...arguments);
|
|
10
|
+
this.templates = new TemplatesAPI.Templates(this._client);
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Create a journey. Defaults to `DRAFT` state; pass `state: "PUBLISHED"` to
|
|
14
|
+
* publish on create. Send nodes are not allowed on `POST`. The standard flow is:
|
|
15
|
+
* create the journey shell here, add notification templates with
|
|
16
|
+
* `POST /journeys/{templateId}/templates`, then wire them into the journey with
|
|
17
|
+
* `PUT /journeys/{templateId}`. Call `POST /journeys/{templateId}/publish` to
|
|
18
|
+
* publish a draft after the fact.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```ts
|
|
22
|
+
* const journeyResponse = await client.journeys.create({
|
|
23
|
+
* name: 'Welcome Journey',
|
|
24
|
+
* nodes: [
|
|
25
|
+
* {
|
|
26
|
+
* id: 'trigger-1',
|
|
27
|
+
* type: 'trigger',
|
|
28
|
+
* trigger_type: 'api',
|
|
29
|
+
* },
|
|
30
|
+
* { id: 'send-1', type: 'send' },
|
|
31
|
+
* ],
|
|
32
|
+
* enabled: true,
|
|
33
|
+
* state: 'DRAFT',
|
|
34
|
+
* });
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
create(body, options) {
|
|
38
|
+
return this._client.post('/journeys', { body, ...options });
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Fetch a journey by id. Pass `?version=draft` (default `published`) to retrieve
|
|
42
|
+
* the working draft, or `?version=vN` to retrieve a historical version.
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* ```ts
|
|
46
|
+
* const journeyResponse = await client.journeys.retrieve('x');
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
retrieve(templateID, query = {}, options) {
|
|
50
|
+
return this._client.get(path `/journeys/${templateID}`, { query, ...options });
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Get the list of journeys.
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* ```ts
|
|
57
|
+
* const journeysListResponse = await client.journeys.list();
|
|
58
|
+
* ```
|
|
59
|
+
*/
|
|
60
|
+
list(query = {}, options) {
|
|
61
|
+
return this._client.get('/journeys', { query, ...options });
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Archive a journey. Archived journeys cannot be invoked. Existing journey runs
|
|
65
|
+
* continue to completion.
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* ```ts
|
|
69
|
+
* await client.journeys.archive('x');
|
|
70
|
+
* ```
|
|
71
|
+
*/
|
|
72
|
+
archive(templateID, options) {
|
|
73
|
+
return this._client.delete(path `/journeys/${templateID}`, {
|
|
74
|
+
...options,
|
|
75
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Invoke a journey by id or alias to start a new run. The response includes a
|
|
80
|
+
* `runId` identifying the run.
|
|
81
|
+
*
|
|
82
|
+
* @example
|
|
83
|
+
* ```ts
|
|
84
|
+
* const journeysInvokeResponse = await client.journeys.invoke(
|
|
85
|
+
* 'templateId',
|
|
86
|
+
* {
|
|
87
|
+
* data: { order_id: 'order-456', amount: 99.99 },
|
|
88
|
+
* user_id: 'user-123',
|
|
89
|
+
* },
|
|
90
|
+
* );
|
|
91
|
+
* ```
|
|
92
|
+
*/
|
|
93
|
+
invoke(templateID, body, options) {
|
|
94
|
+
return this._client.post(path `/journeys/${templateID}/invoke`, { body, ...options });
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* List published versions of a journey, ordered most recent first.
|
|
98
|
+
*
|
|
99
|
+
* @example
|
|
100
|
+
* ```ts
|
|
101
|
+
* const journeyVersionsListResponse =
|
|
102
|
+
* await client.journeys.listVersions('x');
|
|
103
|
+
* ```
|
|
104
|
+
*/
|
|
105
|
+
listVersions(templateID, options) {
|
|
106
|
+
return this._client.get(path `/journeys/${templateID}/versions`, options);
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Publish the current draft as a new version. Body is optional; pass
|
|
110
|
+
* `{ "version": "vN" }` to roll back to a prior version instead. Returns 404 if
|
|
111
|
+
* the journey has no draft to publish.
|
|
112
|
+
*
|
|
113
|
+
* @example
|
|
114
|
+
* ```ts
|
|
115
|
+
* const journeyResponse = await client.journeys.publish('x');
|
|
116
|
+
* ```
|
|
117
|
+
*/
|
|
118
|
+
publish(templateID, body = {}, options) {
|
|
119
|
+
return this._client.post(path `/journeys/${templateID}/publish`, { body, ...options });
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Replace the journey draft. Updates the working draft only; call
|
|
123
|
+
* `POST /journeys/{templateId}/publish` to make it live, or pass
|
|
124
|
+
* `state: "PUBLISHED"` in this request to publish immediately. Send-node
|
|
125
|
+
* `template` ids must already exist and be scoped to this journey, and node ids
|
|
126
|
+
* must not be claimed by another journey.
|
|
127
|
+
*
|
|
128
|
+
* @example
|
|
129
|
+
* ```ts
|
|
130
|
+
* const journeyResponse = await client.journeys.replace('x', {
|
|
131
|
+
* name: 'Welcome Journey v2',
|
|
132
|
+
* nodes: [],
|
|
133
|
+
* enabled: true,
|
|
134
|
+
* state: 'DRAFT',
|
|
135
|
+
* });
|
|
136
|
+
* ```
|
|
137
|
+
*/
|
|
138
|
+
replace(templateID, body, options) {
|
|
139
|
+
return this._client.put(path `/journeys/${templateID}`, { body, ...options });
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
Journeys.Templates = Templates;
|
|
143
|
+
//# sourceMappingURL=journeys.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"journeys.mjs","sourceRoot":"","sources":["../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AC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,MAAM,CACJ,UAAkB,EAClB,IAAyB,EACzB,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,aAAa,UAAU,SAAS,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvF,CAAC;IAED;;;;;;;;OAQG;IACH,YAAY,CAAC,UAAkB,EAAE,OAAwB;QACvD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,aAAa,UAAU,WAAW,EAAE,OAAO,CAAC,CAAC;IAC3E,CAAC;IAED;;;;;;;;;OASG;IACH,OAAO,CACL,UAAkB,EAClB,OAAgD,EAAE,EAClD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,aAAa,UAAU,UAAU,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACxF,CAAC;IAED;;;;;;;;;;;;;;;;OAgBG;IACH,OAAO,CACL,UAAkB,EAClB,IAA0B,EAC1B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,aAAa,UAAU,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/E,CAAC;CACF;AA4yBD,QAAQ,CAAC,SAAS,GAAG,SAAS,CAAC"}
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
2
|
+
import * as Shared from "../shared.mjs";
|
|
3
|
+
import * as JourneysAPI from "./journeys.mjs";
|
|
4
|
+
import * as NotificationsAPI from "../notifications/notifications.mjs";
|
|
5
|
+
import { APIPromise } from "../../core/api-promise.mjs";
|
|
6
|
+
import { RequestOptions } from "../../internal/request-options.mjs";
|
|
7
|
+
export declare class Templates extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Create a notification template scoped to this journey. Defaults to `DRAFT`
|
|
10
|
+
* state; pass `state: "PUBLISHED"` to publish on create.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* const journeyTemplateGetResponse =
|
|
15
|
+
* await client.journeys.templates.create('x', {
|
|
16
|
+
* channel: 'email',
|
|
17
|
+
* notification: {
|
|
18
|
+
* name: 'Welcome email',
|
|
19
|
+
* tags: [],
|
|
20
|
+
* brand: null,
|
|
21
|
+
* subscription: null,
|
|
22
|
+
* content: {
|
|
23
|
+
* version: '2022-01-01',
|
|
24
|
+
* elements: [{ type: 'text' }],
|
|
25
|
+
* },
|
|
26
|
+
* },
|
|
27
|
+
* });
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
create(templateID: string, body: TemplateCreateParams, options?: RequestOptions): APIPromise<JourneysAPI.JourneyTemplateGetResponse>;
|
|
31
|
+
/**
|
|
32
|
+
* Fetch a journey-scoped notification template by id. Pass `?version=draft`
|
|
33
|
+
* (default `published`) to retrieve the working draft, or `?version=vN` for a
|
|
34
|
+
* historical version.
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```ts
|
|
38
|
+
* const journeyTemplateGetResponse =
|
|
39
|
+
* await client.journeys.templates.retrieve('x', {
|
|
40
|
+
* templateId: 'x',
|
|
41
|
+
* });
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
retrieve(notificationID: string, params: TemplateRetrieveParams, options?: RequestOptions): APIPromise<JourneysAPI.JourneyTemplateGetResponse>;
|
|
45
|
+
/**
|
|
46
|
+
* List notification templates scoped to this journey. Journey-scoped notification
|
|
47
|
+
* templates can only be referenced from `send` nodes within the same journey.
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* ```ts
|
|
51
|
+
* const journeyTemplateListResponse =
|
|
52
|
+
* await client.journeys.templates.list('x');
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
55
|
+
list(templateID: string, query?: TemplateListParams | null | undefined, options?: RequestOptions): APIPromise<JourneysAPI.JourneyTemplateListResponse>;
|
|
56
|
+
/**
|
|
57
|
+
* Archive the journey-scoped notification template. Archived templates cannot be
|
|
58
|
+
* sent.
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* ```ts
|
|
62
|
+
* await client.journeys.templates.archive('x', {
|
|
63
|
+
* templateId: 'x',
|
|
64
|
+
* });
|
|
65
|
+
* ```
|
|
66
|
+
*/
|
|
67
|
+
archive(notificationID: string, params: TemplateArchiveParams, options?: RequestOptions): APIPromise<void>;
|
|
68
|
+
/**
|
|
69
|
+
* List published versions of the journey-scoped notification template, ordered
|
|
70
|
+
* most recent first.
|
|
71
|
+
*
|
|
72
|
+
* @example
|
|
73
|
+
* ```ts
|
|
74
|
+
* const notificationTemplateVersionListResponse =
|
|
75
|
+
* await client.journeys.templates.listVersions('x', {
|
|
76
|
+
* templateId: 'x',
|
|
77
|
+
* });
|
|
78
|
+
* ```
|
|
79
|
+
*/
|
|
80
|
+
listVersions(notificationID: string, params: TemplateListVersionsParams, options?: RequestOptions): APIPromise<NotificationsAPI.NotificationTemplateVersionListResponse>;
|
|
81
|
+
/**
|
|
82
|
+
* Publish the current draft of the journey-scoped notification template as a new
|
|
83
|
+
* version. Optionally roll back to a prior version by passing
|
|
84
|
+
* `{ "version": "vN" }`.
|
|
85
|
+
*
|
|
86
|
+
* @example
|
|
87
|
+
* ```ts
|
|
88
|
+
* await client.journeys.templates.publish('x', {
|
|
89
|
+
* templateId: 'x',
|
|
90
|
+
* });
|
|
91
|
+
* ```
|
|
92
|
+
*/
|
|
93
|
+
publish(notificationID: string, params: TemplatePublishParams, options?: RequestOptions): APIPromise<void>;
|
|
94
|
+
/**
|
|
95
|
+
* Replace the journey-scoped notification template draft.
|
|
96
|
+
*
|
|
97
|
+
* @example
|
|
98
|
+
* ```ts
|
|
99
|
+
* const journeyTemplateGetResponse =
|
|
100
|
+
* await client.journeys.templates.replace('x', {
|
|
101
|
+
* templateId: 'x',
|
|
102
|
+
* notification: {
|
|
103
|
+
* brand: { id: 'id' },
|
|
104
|
+
* content: { elements: [{}], version: '2022-01-01' },
|
|
105
|
+
* name: 'name',
|
|
106
|
+
* subscription: { topic_id: 'topic_id' },
|
|
107
|
+
* tags: ['string'],
|
|
108
|
+
* },
|
|
109
|
+
* });
|
|
110
|
+
* ```
|
|
111
|
+
*/
|
|
112
|
+
replace(notificationID: string, params: TemplateReplaceParams, options?: RequestOptions): APIPromise<JourneysAPI.JourneyTemplateGetResponse>;
|
|
113
|
+
}
|
|
114
|
+
export interface TemplateCreateParams {
|
|
115
|
+
channel: string;
|
|
116
|
+
notification: TemplateCreateParams.Notification;
|
|
117
|
+
providerKey?: string;
|
|
118
|
+
state?: string;
|
|
119
|
+
}
|
|
120
|
+
export declare namespace TemplateCreateParams {
|
|
121
|
+
interface Notification {
|
|
122
|
+
brand: Notification.Brand | null;
|
|
123
|
+
content: Notification.Content;
|
|
124
|
+
name: string;
|
|
125
|
+
subscription: Notification.Subscription | null;
|
|
126
|
+
tags: Array<string>;
|
|
127
|
+
}
|
|
128
|
+
namespace Notification {
|
|
129
|
+
interface Brand {
|
|
130
|
+
id: string;
|
|
131
|
+
}
|
|
132
|
+
interface Content {
|
|
133
|
+
elements: Array<Shared.ElementalNode>;
|
|
134
|
+
version: '2022-01-01';
|
|
135
|
+
scope?: 'default' | 'strict';
|
|
136
|
+
}
|
|
137
|
+
interface Subscription {
|
|
138
|
+
topic_id: string;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
export interface TemplateRetrieveParams {
|
|
143
|
+
/**
|
|
144
|
+
* Journey id
|
|
145
|
+
*/
|
|
146
|
+
templateId: string;
|
|
147
|
+
}
|
|
148
|
+
export interface TemplateListParams {
|
|
149
|
+
/**
|
|
150
|
+
* Pagination cursor from a prior response.
|
|
151
|
+
*/
|
|
152
|
+
cursor?: string;
|
|
153
|
+
/**
|
|
154
|
+
* Page size. Minimum 1, maximum 100.
|
|
155
|
+
*/
|
|
156
|
+
limit?: number;
|
|
157
|
+
}
|
|
158
|
+
export interface TemplateArchiveParams {
|
|
159
|
+
/**
|
|
160
|
+
* Journey id
|
|
161
|
+
*/
|
|
162
|
+
templateId: string;
|
|
163
|
+
}
|
|
164
|
+
export interface TemplateListVersionsParams {
|
|
165
|
+
/**
|
|
166
|
+
* Journey id
|
|
167
|
+
*/
|
|
168
|
+
templateId: string;
|
|
169
|
+
}
|
|
170
|
+
export interface TemplatePublishParams {
|
|
171
|
+
/**
|
|
172
|
+
* Path param: Journey id
|
|
173
|
+
*/
|
|
174
|
+
templateId: string;
|
|
175
|
+
/**
|
|
176
|
+
* Body param
|
|
177
|
+
*/
|
|
178
|
+
version?: string;
|
|
179
|
+
}
|
|
180
|
+
export interface TemplateReplaceParams {
|
|
181
|
+
/**
|
|
182
|
+
* Path param: Journey id
|
|
183
|
+
*/
|
|
184
|
+
templateId: string;
|
|
185
|
+
/**
|
|
186
|
+
* Body param
|
|
187
|
+
*/
|
|
188
|
+
notification: TemplateReplaceParams.Notification;
|
|
189
|
+
/**
|
|
190
|
+
* Body param
|
|
191
|
+
*/
|
|
192
|
+
state?: string;
|
|
193
|
+
}
|
|
194
|
+
export declare namespace TemplateReplaceParams {
|
|
195
|
+
interface Notification {
|
|
196
|
+
brand: Notification.Brand | null;
|
|
197
|
+
content: Notification.Content;
|
|
198
|
+
name: string;
|
|
199
|
+
subscription: Notification.Subscription | null;
|
|
200
|
+
tags: Array<string>;
|
|
201
|
+
}
|
|
202
|
+
namespace Notification {
|
|
203
|
+
interface Brand {
|
|
204
|
+
id: string;
|
|
205
|
+
}
|
|
206
|
+
interface Content {
|
|
207
|
+
elements: Array<Shared.ElementalNode>;
|
|
208
|
+
version: '2022-01-01';
|
|
209
|
+
scope?: 'default' | 'strict';
|
|
210
|
+
}
|
|
211
|
+
interface Subscription {
|
|
212
|
+
topic_id: string;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
export declare namespace Templates {
|
|
217
|
+
export { type TemplateCreateParams as TemplateCreateParams, type TemplateRetrieveParams as TemplateRetrieveParams, type TemplateListParams as TemplateListParams, type TemplateArchiveParams as TemplateArchiveParams, type TemplateListVersionsParams as TemplateListVersionsParams, type TemplatePublishParams as TemplatePublishParams, type TemplateReplaceParams as TemplateReplaceParams, };
|
|
218
|
+
}
|
|
219
|
+
//# sourceMappingURL=templates.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"templates.d.mts","sourceRoot":"","sources":["../../src/resources/journeys/templates.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,KAAK,MAAM,sBAAkB;AACpC,OAAO,KAAK,WAAW,uBAAmB;AAC1C,OAAO,KAAK,gBAAgB,2CAAuC;AACnE,OAAO,EAAE,UAAU,EAAE,mCAA+B;AAEpD,OAAO,EAAE,cAAc,EAAE,2CAAuC;AAGhE,qBAAa,SAAU,SAAQ,WAAW;IACxC;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,MAAM,CACJ,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE,oBAAoB,EAC1B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,WAAW,CAAC,0BAA0B,CAAC;IAIrD;;;;;;;;;;;;OAYG;IACH,QAAQ,CACN,cAAc,EAAE,MAAM,EACtB,MAAM,EAAE,sBAAsB,EAC9B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,WAAW,CAAC,0BAA0B,CAAC;IAKrD;;;;;;;;;OASG;IACH,IAAI,CACF,UAAU,EAAE,MAAM,EAClB,KAAK,GAAE,kBAAkB,GAAG,IAAI,GAAG,SAAc,EACjD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,WAAW,CAAC,2BAA2B,CAAC;IAItD;;;;;;;;;;OAUG;IACH,OAAO,CAAC,cAAc,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