@trycourier/courier 7.21.0 → 7.23.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 +24 -0
- package/client.d.mts +60 -0
- package/client.d.mts.map +1 -1
- package/client.d.ts +60 -0
- package/client.d.ts.map +1 -1
- package/client.js +60 -0
- package/client.js.map +1 -1
- package/client.mjs +60 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/audiences.d.mts +13 -5
- package/resources/audiences.d.mts.map +1 -1
- package/resources/audiences.d.ts +13 -5
- package/resources/audiences.d.ts.map +1 -1
- package/resources/audiences.js +13 -5
- package/resources/audiences.js.map +1 -1
- package/resources/audiences.mjs +13 -5
- package/resources/audiences.mjs.map +1 -1
- package/resources/audit-events.d.mts +7 -2
- package/resources/audit-events.d.mts.map +1 -1
- package/resources/audit-events.d.ts +7 -2
- package/resources/audit-events.d.ts.map +1 -1
- package/resources/audit-events.js +7 -2
- package/resources/audit-events.js.map +1 -1
- package/resources/audit-events.mjs +7 -2
- package/resources/audit-events.mjs.map +1 -1
- package/resources/auth.d.mts +5 -1
- package/resources/auth.d.mts.map +1 -1
- package/resources/auth.d.ts +5 -1
- package/resources/auth.d.ts.map +1 -1
- package/resources/auth.js +5 -1
- package/resources/auth.js.map +1 -1
- package/resources/auth.mjs +5 -1
- package/resources/auth.mjs.map +1 -1
- package/resources/automations/automations.d.mts +5 -1
- package/resources/automations/automations.d.mts.map +1 -1
- package/resources/automations/automations.d.ts +5 -1
- package/resources/automations/automations.d.ts.map +1 -1
- package/resources/automations/automations.js +5 -1
- package/resources/automations/automations.js.map +1 -1
- package/resources/automations/automations.mjs +5 -1
- package/resources/automations/automations.mjs.map +1 -1
- package/resources/automations/invoke.d.mts +74 -7
- package/resources/automations/invoke.d.mts.map +1 -1
- package/resources/automations/invoke.d.ts +74 -7
- package/resources/automations/invoke.d.ts.map +1 -1
- package/resources/automations/invoke.js +38 -9
- package/resources/automations/invoke.js.map +1 -1
- package/resources/automations/invoke.mjs +38 -9
- package/resources/automations/invoke.mjs.map +1 -1
- package/resources/brands.d.mts +42 -7
- package/resources/brands.d.mts.map +1 -1
- package/resources/brands.d.ts +42 -7
- package/resources/brands.d.ts.map +1 -1
- package/resources/brands.js +28 -8
- package/resources/brands.js.map +1 -1
- package/resources/brands.mjs +28 -8
- package/resources/brands.mjs.map +1 -1
- package/resources/broadcasts.d.mts +381 -0
- package/resources/broadcasts.d.mts.map +1 -0
- package/resources/broadcasts.d.ts +381 -0
- package/resources/broadcasts.d.ts.map +1 -0
- package/resources/broadcasts.js +181 -0
- package/resources/broadcasts.js.map +1 -0
- package/resources/broadcasts.mjs +177 -0
- package/resources/broadcasts.mjs.map +1 -0
- package/resources/digests/schedules.d.mts +5 -3
- package/resources/digests/schedules.d.mts.map +1 -1
- package/resources/digests/schedules.d.ts +5 -3
- package/resources/digests/schedules.d.ts.map +1 -1
- package/resources/digests/schedules.js +5 -3
- package/resources/digests/schedules.js.map +1 -1
- package/resources/digests/schedules.mjs +5 -3
- package/resources/digests/schedules.mjs.map +1 -1
- package/resources/inbound.d.mts +5 -1
- package/resources/inbound.d.mts.map +1 -1
- package/resources/inbound.d.ts +5 -1
- package/resources/inbound.d.ts.map +1 -1
- package/resources/inbound.js +5 -1
- package/resources/inbound.js.map +1 -1
- package/resources/inbound.mjs +5 -1
- package/resources/inbound.mjs.map +1 -1
- package/resources/inbox/inbox.d.mts +10 -0
- package/resources/inbox/inbox.d.mts.map +1 -0
- package/resources/inbox/inbox.d.ts +10 -0
- package/resources/inbox/inbox.d.ts.map +1 -0
- package/resources/inbox/inbox.js +17 -0
- package/resources/inbox/inbox.js.map +1 -0
- package/resources/inbox/inbox.mjs +12 -0
- package/resources/inbox/inbox.mjs.map +1 -0
- package/resources/inbox/index.d.mts +3 -0
- package/resources/inbox/index.d.mts.map +1 -0
- package/resources/inbox/index.d.ts +3 -0
- package/resources/inbox/index.d.ts.map +1 -0
- package/resources/inbox/index.js +9 -0
- package/resources/inbox/index.js.map +1 -0
- package/resources/inbox/index.mjs +4 -0
- package/resources/inbox/index.mjs.map +1 -0
- package/resources/inbox/messages.d.mts +23 -0
- package/resources/inbox/messages.d.mts.map +1 -0
- package/resources/inbox/messages.d.ts +23 -0
- package/resources/inbox/messages.d.ts.map +1 -0
- package/resources/inbox/messages.js +34 -0
- package/resources/inbox/messages.js.map +1 -0
- package/resources/inbox/messages.mjs +30 -0
- package/resources/inbox/messages.mjs.map +1 -0
- package/resources/inbox.d.mts +2 -0
- package/resources/inbox.d.mts.map +1 -0
- package/resources/inbox.d.ts +2 -0
- package/resources/inbox.d.ts.map +1 -0
- package/resources/inbox.js +6 -0
- package/resources/inbox.js.map +1 -0
- package/resources/inbox.mjs +3 -0
- package/resources/inbox.mjs.map +1 -0
- package/resources/index.d.mts +2 -0
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +2 -0
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +5 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +2 -0
- package/resources/index.mjs.map +1 -1
- package/resources/journeys/journeys.d.mts +130 -39
- package/resources/journeys/journeys.d.mts.map +1 -1
- package/resources/journeys/journeys.d.ts +130 -39
- package/resources/journeys/journeys.d.ts.map +1 -1
- package/resources/journeys/journeys.js +79 -34
- package/resources/journeys/journeys.js.map +1 -1
- package/resources/journeys/journeys.mjs +79 -34
- package/resources/journeys/journeys.mjs.map +1 -1
- package/resources/journeys/templates.d.mts +60 -17
- package/resources/journeys/templates.d.mts.map +1 -1
- package/resources/journeys/templates.d.ts +60 -17
- package/resources/journeys/templates.d.ts.map +1 -1
- package/resources/journeys/templates.js +41 -20
- package/resources/journeys/templates.js.map +1 -1
- package/resources/journeys/templates.mjs +41 -20
- package/resources/journeys/templates.mjs.map +1 -1
- package/resources/lists/lists.d.mts +40 -5
- package/resources/lists/lists.d.mts.map +1 -1
- package/resources/lists/lists.d.ts +40 -5
- package/resources/lists/lists.d.ts.map +1 -1
- package/resources/lists/lists.js +40 -5
- package/resources/lists/lists.js.map +1 -1
- package/resources/lists/lists.mjs +40 -5
- package/resources/lists/lists.mjs.map +1 -1
- package/resources/lists/subscriptions.d.mts +65 -5
- package/resources/lists/subscriptions.d.mts.map +1 -1
- package/resources/lists/subscriptions.d.ts +65 -5
- package/resources/lists/subscriptions.d.ts.map +1 -1
- package/resources/lists/subscriptions.js +57 -6
- package/resources/lists/subscriptions.js.map +1 -1
- package/resources/lists/subscriptions.mjs +57 -6
- package/resources/lists/subscriptions.mjs.map +1 -1
- package/resources/messages.d.mts +15 -14
- package/resources/messages.d.mts.map +1 -1
- package/resources/messages.d.ts +15 -14
- package/resources/messages.d.ts.map +1 -1
- package/resources/messages.js +15 -14
- package/resources/messages.js.map +1 -1
- package/resources/messages.mjs +15 -14
- package/resources/messages.mjs.map +1 -1
- package/resources/notifications/checks.d.mts +9 -3
- package/resources/notifications/checks.d.mts.map +1 -1
- package/resources/notifications/checks.d.ts +9 -3
- package/resources/notifications/checks.d.ts.map +1 -1
- package/resources/notifications/checks.js +9 -3
- package/resources/notifications/checks.js.map +1 -1
- package/resources/notifications/checks.mjs +9 -3
- package/resources/notifications/checks.mjs.map +1 -1
- package/resources/notifications/notifications.d.mts +62 -29
- package/resources/notifications/notifications.d.mts.map +1 -1
- package/resources/notifications/notifications.d.ts +62 -29
- package/resources/notifications/notifications.d.ts.map +1 -1
- package/resources/notifications/notifications.js +49 -26
- package/resources/notifications/notifications.js.map +1 -1
- package/resources/notifications/notifications.mjs +49 -26
- package/resources/notifications/notifications.mjs.map +1 -1
- package/resources/profiles/lists.d.mts +49 -5
- package/resources/profiles/lists.d.mts.map +1 -1
- package/resources/profiles/lists.d.ts +49 -5
- package/resources/profiles/lists.d.ts.map +1 -1
- package/resources/profiles/lists.js +45 -6
- package/resources/profiles/lists.js.map +1 -1
- package/resources/profiles/lists.mjs +45 -6
- package/resources/profiles/lists.mjs.map +1 -1
- package/resources/profiles/profiles.d.mts +70 -11
- package/resources/profiles/profiles.d.mts.map +1 -1
- package/resources/profiles/profiles.d.ts +70 -11
- package/resources/profiles/profiles.d.ts.map +1 -1
- package/resources/profiles/profiles.js +65 -12
- package/resources/profiles/profiles.js.map +1 -1
- package/resources/profiles/profiles.mjs +65 -12
- package/resources/profiles/profiles.mjs.map +1 -1
- package/resources/providers/catalog.d.mts +10 -4
- package/resources/providers/catalog.d.mts.map +1 -1
- package/resources/providers/catalog.d.ts +10 -4
- package/resources/providers/catalog.d.ts.map +1 -1
- package/resources/providers/catalog.js +10 -4
- package/resources/providers/catalog.js.map +1 -1
- package/resources/providers/catalog.mjs +10 -4
- package/resources/providers/catalog.mjs.map +1 -1
- package/resources/providers/providers.d.mts +68 -22
- package/resources/providers/providers.d.mts.map +1 -1
- package/resources/providers/providers.d.ts +68 -22
- package/resources/providers/providers.d.ts.map +1 -1
- package/resources/providers/providers.js +57 -14
- package/resources/providers/providers.js.map +1 -1
- package/resources/providers/providers.mjs +57 -14
- package/resources/providers/providers.mjs.map +1 -1
- package/resources/requests.d.mts +5 -1
- package/resources/requests.d.mts.map +1 -1
- package/resources/requests.d.ts +5 -1
- package/resources/requests.d.ts.map +1 -1
- package/resources/requests.js +5 -1
- package/resources/requests.js.map +1 -1
- package/resources/requests.mjs +5 -1
- package/resources/requests.mjs.map +1 -1
- package/resources/routing-strategies.d.mts +30 -11
- package/resources/routing-strategies.d.mts.map +1 -1
- package/resources/routing-strategies.d.ts +30 -11
- package/resources/routing-strategies.d.ts.map +1 -1
- package/resources/routing-strategies.js +22 -6
- package/resources/routing-strategies.js.map +1 -1
- package/resources/routing-strategies.mjs +22 -6
- package/resources/routing-strategies.mjs.map +1 -1
- package/resources/send.d.mts +24 -4
- package/resources/send.d.mts.map +1 -1
- package/resources/send.d.ts +24 -4
- package/resources/send.d.ts.map +1 -1
- package/resources/send.js +21 -3
- package/resources/send.js.map +1 -1
- package/resources/send.mjs +21 -3
- package/resources/send.mjs.map +1 -1
- package/resources/tenants/preferences/items.d.mts +7 -2
- package/resources/tenants/preferences/items.d.mts.map +1 -1
- package/resources/tenants/preferences/items.d.ts +7 -2
- package/resources/tenants/preferences/items.d.ts.map +1 -1
- package/resources/tenants/preferences/items.js +7 -2
- package/resources/tenants/preferences/items.js.map +1 -1
- package/resources/tenants/preferences/items.mjs +7 -2
- package/resources/tenants/preferences/items.mjs.map +1 -1
- package/resources/tenants/templates/templates.d.mts +13 -19
- package/resources/tenants/templates/templates.d.mts.map +1 -1
- package/resources/tenants/templates/templates.d.ts +13 -19
- package/resources/tenants/templates/templates.d.ts.map +1 -1
- package/resources/tenants/templates/templates.js +13 -19
- package/resources/tenants/templates/templates.js.map +1 -1
- package/resources/tenants/templates/templates.mjs +13 -19
- package/resources/tenants/templates/templates.mjs.map +1 -1
- package/resources/tenants/templates/versions.d.mts +5 -7
- package/resources/tenants/templates/versions.d.mts.map +1 -1
- package/resources/tenants/templates/versions.d.ts +5 -7
- package/resources/tenants/templates/versions.d.ts.map +1 -1
- package/resources/tenants/templates/versions.js +5 -7
- package/resources/tenants/templates/versions.js.map +1 -1
- package/resources/tenants/templates/versions.mjs +5 -7
- package/resources/tenants/templates/versions.mjs.map +1 -1
- package/resources/tenants/tenants.d.mts +13 -5
- package/resources/tenants/tenants.d.mts.map +1 -1
- package/resources/tenants/tenants.d.ts +13 -5
- package/resources/tenants/tenants.d.ts.map +1 -1
- package/resources/tenants/tenants.js +13 -5
- package/resources/tenants/tenants.js.map +1 -1
- package/resources/tenants/tenants.mjs +13 -5
- package/resources/tenants/tenants.mjs.map +1 -1
- package/resources/translations.d.mts +7 -2
- package/resources/translations.d.mts.map +1 -1
- package/resources/translations.d.ts +7 -2
- package/resources/translations.d.ts.map +1 -1
- package/resources/translations.js +7 -2
- package/resources/translations.js.map +1 -1
- package/resources/translations.mjs +7 -2
- package/resources/translations.mjs.map +1 -1
- package/resources/users/preferences.d.mts +64 -42
- package/resources/users/preferences.d.mts.map +1 -1
- package/resources/users/preferences.d.ts +64 -42
- package/resources/users/preferences.d.ts.map +1 -1
- package/resources/users/preferences.js +30 -42
- package/resources/users/preferences.js.map +1 -1
- package/resources/users/preferences.mjs +30 -42
- package/resources/users/preferences.mjs.map +1 -1
- package/resources/users/tenants.d.mts +13 -10
- package/resources/users/tenants.d.mts.map +1 -1
- package/resources/users/tenants.d.ts +13 -10
- package/resources/users/tenants.d.ts.map +1 -1
- package/resources/users/tenants.js +13 -10
- package/resources/users/tenants.js.map +1 -1
- package/resources/users/tenants.mjs +13 -10
- package/resources/users/tenants.mjs.map +1 -1
- package/resources/users/tokens.d.mts +15 -6
- package/resources/users/tokens.d.mts.map +1 -1
- package/resources/users/tokens.d.ts +15 -6
- package/resources/users/tokens.d.ts.map +1 -1
- package/resources/users/tokens.js +15 -6
- package/resources/users/tokens.js.map +1 -1
- package/resources/users/tokens.mjs +15 -6
- package/resources/users/tokens.mjs.map +1 -1
- package/resources/workspace-preferences/topics.d.mts +40 -18
- package/resources/workspace-preferences/topics.d.mts.map +1 -1
- package/resources/workspace-preferences/topics.d.ts +40 -18
- package/resources/workspace-preferences/topics.d.ts.map +1 -1
- package/resources/workspace-preferences/topics.js +26 -11
- package/resources/workspace-preferences/topics.js.map +1 -1
- package/resources/workspace-preferences/topics.mjs +26 -11
- package/resources/workspace-preferences/topics.mjs.map +1 -1
- package/resources/workspace-preferences/workspace-preferences.d.mts +56 -19
- package/resources/workspace-preferences/workspace-preferences.d.mts.map +1 -1
- package/resources/workspace-preferences/workspace-preferences.d.ts +56 -19
- package/resources/workspace-preferences/workspace-preferences.d.ts.map +1 -1
- package/resources/workspace-preferences/workspace-preferences.js +41 -13
- package/resources/workspace-preferences/workspace-preferences.js.map +1 -1
- package/resources/workspace-preferences/workspace-preferences.mjs +41 -13
- package/resources/workspace-preferences/workspace-preferences.mjs.map +1 -1
- package/src/client.ts +96 -0
- package/src/resources/audiences.ts +13 -5
- package/src/resources/audit-events.ts +7 -2
- package/src/resources/auth.ts +5 -1
- package/src/resources/automations/automations.ts +5 -1
- package/src/resources/automations/invoke.ts +115 -9
- package/src/resources/brands.ts +62 -8
- package/src/resources/broadcasts.ts +489 -0
- package/src/resources/digests/schedules.ts +5 -3
- package/src/resources/inbound.ts +5 -1
- package/src/resources/inbox/inbox.ts +15 -0
- package/src/resources/inbox/index.ts +4 -0
- package/src/resources/inbox/messages.ts +40 -0
- package/src/resources/inbox.ts +3 -0
- package/src/resources/index.ts +18 -0
- package/src/resources/journeys/journeys.ts +212 -43
- package/src/resources/journeys/templates.ts +98 -20
- package/src/resources/lists/lists.ts +40 -5
- package/src/resources/lists/subscriptions.ts +82 -6
- package/src/resources/messages.ts +15 -14
- package/src/resources/notifications/checks.ts +9 -3
- package/src/resources/notifications/notifications.ts +102 -31
- package/src/resources/profiles/lists.ts +70 -6
- package/src/resources/profiles/profiles.ts +90 -12
- package/src/resources/providers/catalog.ts +10 -4
- package/src/resources/providers/providers.ts +86 -21
- package/src/resources/requests.ts +5 -1
- package/src/resources/routing-strategies.ts +50 -12
- package/src/resources/send.ts +45 -5
- package/src/resources/tenants/preferences/items.ts +7 -2
- package/src/resources/tenants/templates/templates.ts +13 -19
- package/src/resources/tenants/templates/versions.ts +5 -7
- package/src/resources/tenants/tenants.ts +13 -5
- package/src/resources/translations.ts +7 -2
- package/src/resources/users/preferences.ts +86 -44
- package/src/resources/users/tenants.ts +13 -10
- package/src/resources/users/tokens.ts +15 -6
- package/src/resources/workspace-preferences/topics.ts +60 -19
- package/src/resources/workspace-preferences/workspace-preferences.ts +96 -21
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -4,15 +4,20 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
4
4
|
exports.AuditEvents = void 0;
|
|
5
5
|
const resource_1 = require("../core/resource.js");
|
|
6
6
|
const path_1 = require("../internal/utils/path.js");
|
|
7
|
+
/**
|
|
8
|
+
* Read the audit trail of configuration and access changes in your workspace.
|
|
9
|
+
*/
|
|
7
10
|
class AuditEvents extends resource_1.APIResource {
|
|
8
11
|
/**
|
|
9
|
-
*
|
|
12
|
+
* Returns one audit event by id, including the actor who performed it, the target
|
|
13
|
+
* they changed, the source, the event type, and a timestamp.
|
|
10
14
|
*/
|
|
11
15
|
retrieve(auditEventID, options) {
|
|
12
16
|
return this._client.get((0, path_1.path) `/audit-events/${auditEventID}`, options);
|
|
13
17
|
}
|
|
14
18
|
/**
|
|
15
|
-
*
|
|
19
|
+
* Returns the workspace's audit event log with cursor paging. Each event records
|
|
20
|
+
* the actor, target, source, type, and timestamp of a change.
|
|
16
21
|
*/
|
|
17
22
|
list(query = {}, options) {
|
|
18
23
|
return this._client.get('/audit-events', { query, ...options });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audit-events.js","sourceRoot":"","sources":["../src/resources/audit-events.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C,oDAA8C;AAE9C,MAAa,WAAY,SAAQ,sBAAW;IAC1C
|
|
1
|
+
{"version":3,"file":"audit-events.js","sourceRoot":"","sources":["../src/resources/audit-events.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C,oDAA8C;AAE9C;;GAEG;AACH,MAAa,WAAY,SAAQ,sBAAW;IAC1C;;;OAGG;IACH,QAAQ,CAAC,YAAoB,EAAE,OAAwB;QACrD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,iBAAiB,YAAY,EAAE,EAAE,OAAO,CAAC,CAAC;IACxE,CAAC;IAED;;;OAGG;IACH,IAAI,CACF,QAAiD,EAAE,EACnD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAClE,CAAC;CACF;AAnBD,kCAmBC"}
|
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
import { APIResource } from "../core/resource.mjs";
|
|
3
3
|
import { path } from "../internal/utils/path.mjs";
|
|
4
|
+
/**
|
|
5
|
+
* Read the audit trail of configuration and access changes in your workspace.
|
|
6
|
+
*/
|
|
4
7
|
export class AuditEvents extends APIResource {
|
|
5
8
|
/**
|
|
6
|
-
*
|
|
9
|
+
* Returns one audit event by id, including the actor who performed it, the target
|
|
10
|
+
* they changed, the source, the event type, and a timestamp.
|
|
7
11
|
*/
|
|
8
12
|
retrieve(auditEventID, options) {
|
|
9
13
|
return this._client.get(path `/audit-events/${auditEventID}`, options);
|
|
10
14
|
}
|
|
11
15
|
/**
|
|
12
|
-
*
|
|
16
|
+
* Returns the workspace's audit event log with cursor paging. Each event records
|
|
17
|
+
* the actor, target, source, type, and timestamp of a change.
|
|
13
18
|
*/
|
|
14
19
|
list(query = {}, options) {
|
|
15
20
|
return this._client.get('/audit-events', { query, ...options });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audit-events.mjs","sourceRoot":"","sources":["../src/resources/audit-events.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAI/C,OAAO,EAAE,IAAI,EAAE,mCAA+B;AAE9C,MAAM,OAAO,WAAY,SAAQ,WAAW;IAC1C
|
|
1
|
+
{"version":3,"file":"audit-events.mjs","sourceRoot":"","sources":["../src/resources/audit-events.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAI/C,OAAO,EAAE,IAAI,EAAE,mCAA+B;AAE9C;;GAEG;AACH,MAAM,OAAO,WAAY,SAAQ,WAAW;IAC1C;;;OAGG;IACH,QAAQ,CAAC,YAAoB,EAAE,OAAwB;QACrD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,iBAAiB,YAAY,EAAE,EAAE,OAAO,CAAC,CAAC;IACxE,CAAC;IAED;;;OAGG;IACH,IAAI,CACF,QAAiD,EAAE,EACnD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAClE,CAAC;CACF"}
|
package/resources/auth.d.mts
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import { APIResource } from "../core/resource.mjs";
|
|
2
2
|
import { APIPromise } from "../core/api-promise.mjs";
|
|
3
3
|
import { RequestOptions } from "../internal/request-options.mjs";
|
|
4
|
+
/**
|
|
5
|
+
* Issue scoped, short-lived JWTs so client-side SDKs — Inbox, Preferences, and the embedded designer — can call Courier as a single user. Server-side requests authenticate with your workspace API key instead.
|
|
6
|
+
*/
|
|
4
7
|
export declare class Auth extends APIResource {
|
|
5
8
|
/**
|
|
6
|
-
* Returns a
|
|
9
|
+
* Returns a JWT for authenticating client-side SDKs such as the Inbox. You supply
|
|
10
|
+
* the scope and an expires_in duration, both required.
|
|
7
11
|
*
|
|
8
12
|
* @example
|
|
9
13
|
* ```ts
|
package/resources/auth.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.mts","sourceRoot":"","sources":["../src/resources/auth.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,gCAA4B;AACjD,OAAO,EAAE,cAAc,EAAE,wCAAoC;AAE7D,qBAAa,IAAK,SAAQ,WAAW;IACnC
|
|
1
|
+
{"version":3,"file":"auth.d.mts","sourceRoot":"","sources":["../src/resources/auth.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,gCAA4B;AACjD,OAAO,EAAE,cAAc,EAAE,wCAAoC;AAE7D;;GAEG;AACH,qBAAa,IAAK,SAAQ,WAAW;IACnC;;;;;;;;;;;;OAYG;IACH,UAAU,CAAC,IAAI,EAAE,oBAAoB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,sBAAsB,CAAC;CAGrG;AAED,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,oBAAoB;IACnC;;;;;;;;;;;OAWG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;;;;;;;;;;;;;;;;OAiBG;IACH,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,CAAC,OAAO,WAAW,IAAI,CAAC;IAC5B,OAAO,EACL,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,oBAAoB,IAAI,oBAAoB,GAClD,CAAC;CACH"}
|
package/resources/auth.d.ts
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import { APIResource } from "../core/resource.js";
|
|
2
2
|
import { APIPromise } from "../core/api-promise.js";
|
|
3
3
|
import { RequestOptions } from "../internal/request-options.js";
|
|
4
|
+
/**
|
|
5
|
+
* Issue scoped, short-lived JWTs so client-side SDKs — Inbox, Preferences, and the embedded designer — can call Courier as a single user. Server-side requests authenticate with your workspace API key instead.
|
|
6
|
+
*/
|
|
4
7
|
export declare class Auth extends APIResource {
|
|
5
8
|
/**
|
|
6
|
-
* Returns a
|
|
9
|
+
* Returns a JWT for authenticating client-side SDKs such as the Inbox. You supply
|
|
10
|
+
* the scope and an expires_in duration, both required.
|
|
7
11
|
*
|
|
8
12
|
* @example
|
|
9
13
|
* ```ts
|
package/resources/auth.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../src/resources/auth.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,+BAA4B;AACjD,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAE7D,qBAAa,IAAK,SAAQ,WAAW;IACnC
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../src/resources/auth.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,+BAA4B;AACjD,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAE7D;;GAEG;AACH,qBAAa,IAAK,SAAQ,WAAW;IACnC;;;;;;;;;;;;OAYG;IACH,UAAU,CAAC,IAAI,EAAE,oBAAoB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,sBAAsB,CAAC;CAGrG;AAED,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,oBAAoB;IACnC;;;;;;;;;;;OAWG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;;;;;;;;;;;;;;;;OAiBG;IACH,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,CAAC,OAAO,WAAW,IAAI,CAAC;IAC5B,OAAO,EACL,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,oBAAoB,IAAI,oBAAoB,GAClD,CAAC;CACH"}
|
package/resources/auth.js
CHANGED
|
@@ -3,9 +3,13 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.Auth = void 0;
|
|
5
5
|
const resource_1 = require("../core/resource.js");
|
|
6
|
+
/**
|
|
7
|
+
* Issue scoped, short-lived JWTs so client-side SDKs — Inbox, Preferences, and the embedded designer — can call Courier as a single user. Server-side requests authenticate with your workspace API key instead.
|
|
8
|
+
*/
|
|
6
9
|
class Auth extends resource_1.APIResource {
|
|
7
10
|
/**
|
|
8
|
-
* Returns a
|
|
11
|
+
* Returns a JWT for authenticating client-side SDKs such as the Inbox. You supply
|
|
12
|
+
* the scope and an expires_in duration, both required.
|
|
9
13
|
*
|
|
10
14
|
* @example
|
|
11
15
|
* ```ts
|
package/resources/auth.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../src/resources/auth.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C,MAAa,IAAK,SAAQ,sBAAW;IACnC
|
|
1
|
+
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../src/resources/auth.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C;;GAEG;AACH,MAAa,IAAK,SAAQ,sBAAW;IACnC;;;;;;;;;;;;OAYG;IACH,UAAU,CAAC,IAA0B,EAAE,OAAwB;QAC7D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,mBAAmB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtE,CAAC;CACF;AAjBD,oBAiBC"}
|
package/resources/auth.mjs
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
import { APIResource } from "../core/resource.mjs";
|
|
3
|
+
/**
|
|
4
|
+
* Issue scoped, short-lived JWTs so client-side SDKs — Inbox, Preferences, and the embedded designer — can call Courier as a single user. Server-side requests authenticate with your workspace API key instead.
|
|
5
|
+
*/
|
|
3
6
|
export class Auth extends APIResource {
|
|
4
7
|
/**
|
|
5
|
-
* Returns a
|
|
8
|
+
* Returns a JWT for authenticating client-side SDKs such as the Inbox. You supply
|
|
9
|
+
* the scope and an expires_in duration, both required.
|
|
6
10
|
*
|
|
7
11
|
* @example
|
|
8
12
|
* ```ts
|
package/resources/auth.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.mjs","sourceRoot":"","sources":["../src/resources/auth.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAI/C,MAAM,OAAO,IAAK,SAAQ,WAAW;IACnC
|
|
1
|
+
{"version":3,"file":"auth.mjs","sourceRoot":"","sources":["../src/resources/auth.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAI/C;;GAEG;AACH,MAAM,OAAO,IAAK,SAAQ,WAAW;IACnC;;;;;;;;;;;;OAYG;IACH,UAAU,CAAC,IAA0B,EAAE,OAAwB;QAC7D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,mBAAmB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtE,CAAC;CACF"}
|
|
@@ -3,10 +3,14 @@ import * as InvokeAPI from "./invoke.mjs";
|
|
|
3
3
|
import { Invoke, InvokeInvokeAdHocParams, InvokeInvokeByTemplateParams } from "./invoke.mjs";
|
|
4
4
|
import { APIPromise } from "../../core/api-promise.mjs";
|
|
5
5
|
import { RequestOptions } from "../../internal/request-options.mjs";
|
|
6
|
+
/**
|
|
7
|
+
* Invoke a stored automation template or an ad hoc automation defined in the request.
|
|
8
|
+
*/
|
|
6
9
|
export declare class Automations extends APIResource {
|
|
7
10
|
invoke: InvokeAPI.Invoke;
|
|
8
11
|
/**
|
|
9
|
-
*
|
|
12
|
+
* Lists the workspace's saved automation templates, each with its id and a cursor
|
|
13
|
+
* for paging to the next page of results.
|
|
10
14
|
*
|
|
11
15
|
* @example
|
|
12
16
|
* ```ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"automations.d.mts","sourceRoot":"","sources":["../../src/resources/automations/automations.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,KAAK,SAAS,qBAAiB;AACtC,OAAO,EAAE,MAAM,EAAE,uBAAuB,EAAE,4BAA4B,EAAE,qBAAiB;AACzF,OAAO,EAAE,UAAU,EAAE,mCAA+B;AACpD,OAAO,EAAE,cAAc,EAAE,2CAAuC;AAEhE,qBAAa,WAAY,SAAQ,WAAW;IAC1C,MAAM,EAAE,SAAS,CAAC,MAAM,CAAsC;IAE9D
|
|
1
|
+
{"version":3,"file":"automations.d.mts","sourceRoot":"","sources":["../../src/resources/automations/automations.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,KAAK,SAAS,qBAAiB;AACtC,OAAO,EAAE,MAAM,EAAE,uBAAuB,EAAE,4BAA4B,EAAE,qBAAiB;AACzF,OAAO,EAAE,UAAU,EAAE,mCAA+B;AACpD,OAAO,EAAE,cAAc,EAAE,2CAAuC;AAEhE;;GAEG;AACH,qBAAa,WAAY,SAAQ,WAAW;IAC1C,MAAM,EAAE,SAAS,CAAC,MAAM,CAAsC;IAE9D;;;;;;;;;OASG;IACH,IAAI,CACF,KAAK,GAAE,oBAAoB,GAAG,IAAI,GAAG,SAAc,EACnD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,8BAA8B,CAAC;CAG9C;AAED,MAAM,WAAW,wBAAwB;IACvC,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC;IAE/B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,8BAA8B;IAC7C;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,SAAS,CAAC,EAAE,KAAK,CAAC,kBAAkB,CAAC,CAAC;CACvC;AAED,MAAM,WAAW,oBAAoB;IACnC;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;OAGG;IACH,OAAO,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC;CACjC;AAID,MAAM,CAAC,OAAO,WAAW,WAAW,CAAC;IACnC,OAAO,EACL,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,oBAAoB,IAAI,oBAAoB,GAClD,CAAC;IAEF,OAAO,EACL,MAAM,IAAI,MAAM,EAChB,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,4BAA4B,IAAI,4BAA4B,GAClE,CAAC;CACH"}
|
|
@@ -3,10 +3,14 @@ import * as InvokeAPI from "./invoke.js";
|
|
|
3
3
|
import { Invoke, InvokeInvokeAdHocParams, InvokeInvokeByTemplateParams } from "./invoke.js";
|
|
4
4
|
import { APIPromise } from "../../core/api-promise.js";
|
|
5
5
|
import { RequestOptions } from "../../internal/request-options.js";
|
|
6
|
+
/**
|
|
7
|
+
* Invoke a stored automation template or an ad hoc automation defined in the request.
|
|
8
|
+
*/
|
|
6
9
|
export declare class Automations extends APIResource {
|
|
7
10
|
invoke: InvokeAPI.Invoke;
|
|
8
11
|
/**
|
|
9
|
-
*
|
|
12
|
+
* Lists the workspace's saved automation templates, each with its id and a cursor
|
|
13
|
+
* for paging to the next page of results.
|
|
10
14
|
*
|
|
11
15
|
* @example
|
|
12
16
|
* ```ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"automations.d.ts","sourceRoot":"","sources":["../../src/resources/automations/automations.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,KAAK,SAAS,oBAAiB;AACtC,OAAO,EAAE,MAAM,EAAE,uBAAuB,EAAE,4BAA4B,EAAE,oBAAiB;AACzF,OAAO,EAAE,UAAU,EAAE,kCAA+B;AACpD,OAAO,EAAE,cAAc,EAAE,0CAAuC;AAEhE,qBAAa,WAAY,SAAQ,WAAW;IAC1C,MAAM,EAAE,SAAS,CAAC,MAAM,CAAsC;IAE9D
|
|
1
|
+
{"version":3,"file":"automations.d.ts","sourceRoot":"","sources":["../../src/res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AA8B,IAAI,8BAA8B,EACrE,KAAK,oBAAoB,IAAI,oBAAoB,GAClD,CAAC;IAEF,OAAO,EACL,MAAM,IAAI,MAAM,EAChB,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,4BAA4B,IAAI,4BAA4B,GAClE,CAAC;CACH"}
|
|
@@ -6,13 +6,17 @@ const tslib_1 = require("../../internal/tslib.js");
|
|
|
6
6
|
const resource_1 = require("../../core/resource.js");
|
|
7
7
|
const InvokeAPI = tslib_1.__importStar(require("./invoke.js"));
|
|
8
8
|
const invoke_1 = require("./invoke.js");
|
|
9
|
+
/**
|
|
10
|
+
* Invoke a stored automation template or an ad hoc automation defined in the request.
|
|
11
|
+
*/
|
|
9
12
|
class Automations extends resource_1.APIResource {
|
|
10
13
|
constructor() {
|
|
11
14
|
super(...arguments);
|
|
12
15
|
this.invoke = new InvokeAPI.Invoke(this._client);
|
|
13
16
|
}
|
|
14
17
|
/**
|
|
15
|
-
*
|
|
18
|
+
* Lists the workspace's saved automation templates, each with its id and a cursor
|
|
19
|
+
* for paging to the next page of results.
|
|
16
20
|
*
|
|
17
21
|
* @example
|
|
18
22
|
* ```ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"automations.js","sourceRoot":"","sources":["../../src/resources/automations/automations.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAClD,+DAAsC;AACtC,wCAAyF;AAIzF,MAAa,WAAY,SAAQ,sBAAW;IAA5C;;QACE,WAAM,GAAqB,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"automations.js","sourceRoot":"","sources":["../../src/resources/automations/automations.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAClD,+DAAsC;AACtC,wCAAyF;AAIzF;;GAEG;AACH,MAAa,WAAY,SAAQ,sBAAW;IAA5C;;QACE,WAAM,GAAqB,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAkBhE,CAAC;IAhBC;;;;;;;;;OASG;IACH,IAAI,CACF,QAAiD,EAAE,EACnD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjE,CAAC;CACF;AAnBD,kCAmBC;AAwDD,WAAW,CAAC,MAAM,GAAG,eAAM,CAAC"}
|
|
@@ -2,13 +2,17 @@
|
|
|
2
2
|
import { APIResource } from "../../core/resource.mjs";
|
|
3
3
|
import * as InvokeAPI from "./invoke.mjs";
|
|
4
4
|
import { Invoke } from "./invoke.mjs";
|
|
5
|
+
/**
|
|
6
|
+
* Invoke a stored automation template or an ad hoc automation defined in the request.
|
|
7
|
+
*/
|
|
5
8
|
export class Automations extends APIResource {
|
|
6
9
|
constructor() {
|
|
7
10
|
super(...arguments);
|
|
8
11
|
this.invoke = new InvokeAPI.Invoke(this._client);
|
|
9
12
|
}
|
|
10
13
|
/**
|
|
11
|
-
*
|
|
14
|
+
* Lists the workspace's saved automation templates, each with its id and a cursor
|
|
15
|
+
* for paging to the next page of results.
|
|
12
16
|
*
|
|
13
17
|
* @example
|
|
14
18
|
* ```ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"automations.mjs","sourceRoot":"","sources":["../../src/resources/automations/automations.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,KAAK,SAAS,qBAAiB;AACtC,OAAO,EAAE,MAAM,EAAyD,qBAAiB;AAIzF,MAAM,OAAO,WAAY,SAAQ,WAAW;IAA5C;;QACE,WAAM,GAAqB,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"automations.mjs","sourceRoot":"","sources":["../../src/resources/automations/automations.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,KAAK,SAAS,qBAAiB;AACtC,OAAO,EAAE,MAAM,EAAyD,qBAAiB;AAIzF;;GAEG;AACH,MAAM,OAAO,WAAY,SAAQ,WAAW;IAA5C;;QACE,WAAM,GAAqB,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAkBhE,CAAC;IAhBC;;;;;;;;;OASG;IACH,IAAI,CACF,QAAiD,EAAE,EACnD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjE,CAAC;CACF;AAwDD,WAAW,CAAC,MAAM,GAAG,MAAM,CAAC"}
|
|
@@ -2,12 +2,13 @@ import { APIResource } from "../../core/resource.mjs";
|
|
|
2
2
|
import * as AutomationsAPI from "./automations.mjs";
|
|
3
3
|
import { APIPromise } from "../../core/api-promise.mjs";
|
|
4
4
|
import { RequestOptions } from "../../internal/request-options.mjs";
|
|
5
|
+
/**
|
|
6
|
+
* Invoke a stored automation template or an ad hoc automation defined in the request.
|
|
7
|
+
*/
|
|
5
8
|
export declare class Invoke extends APIResource {
|
|
6
9
|
/**
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* checkout the ad hoc automation guide
|
|
10
|
-
* [here](https://www.courier.com/docs/automations/steps/).
|
|
10
|
+
* Runs a series of automation steps supplied inline, without a saved template, and
|
|
11
|
+
* returns a runId.
|
|
11
12
|
*
|
|
12
13
|
* @example
|
|
13
14
|
* ```ts
|
|
@@ -29,9 +30,10 @@ export declare class Invoke extends APIResource {
|
|
|
29
30
|
* });
|
|
30
31
|
* ```
|
|
31
32
|
*/
|
|
32
|
-
invokeAdHoc(
|
|
33
|
+
invokeAdHoc(params: InvokeInvokeAdHocParams, options?: RequestOptions): APIPromise<AutomationsAPI.AutomationInvokeResponse>;
|
|
33
34
|
/**
|
|
34
|
-
*
|
|
35
|
+
* Starts an automation run from a saved template for one recipient, with optional
|
|
36
|
+
* data and profile, and returns a runId.
|
|
35
37
|
*
|
|
36
38
|
* @example
|
|
37
39
|
* ```ts
|
|
@@ -42,19 +44,53 @@ export declare class Invoke extends APIResource {
|
|
|
42
44
|
* );
|
|
43
45
|
* ```
|
|
44
46
|
*/
|
|
45
|
-
invokeByTemplate(templateID: string,
|
|
47
|
+
invokeByTemplate(templateID: string, params: InvokeInvokeByTemplateParams, options?: RequestOptions): APIPromise<AutomationsAPI.AutomationInvokeResponse>;
|
|
46
48
|
}
|
|
47
49
|
export interface InvokeInvokeAdHocParams {
|
|
50
|
+
/**
|
|
51
|
+
* Body param
|
|
52
|
+
*/
|
|
48
53
|
automation: InvokeInvokeAdHocParams.Automation;
|
|
54
|
+
/**
|
|
55
|
+
* Body param
|
|
56
|
+
*/
|
|
49
57
|
brand?: string | null;
|
|
58
|
+
/**
|
|
59
|
+
* Body param
|
|
60
|
+
*/
|
|
50
61
|
data?: {
|
|
51
62
|
[key: string]: unknown;
|
|
52
63
|
} | null;
|
|
64
|
+
/**
|
|
65
|
+
* Body param
|
|
66
|
+
*/
|
|
53
67
|
profile?: {
|
|
54
68
|
[key: string]: unknown;
|
|
55
69
|
} | null;
|
|
70
|
+
/**
|
|
71
|
+
* Body param
|
|
72
|
+
*/
|
|
56
73
|
recipient?: string | null;
|
|
74
|
+
/**
|
|
75
|
+
* Body param
|
|
76
|
+
*/
|
|
57
77
|
template?: string | null;
|
|
78
|
+
/**
|
|
79
|
+
* Header param: A unique key that makes this request idempotent. If Courier
|
|
80
|
+
* receives another request with the same `Idempotency-Key`, it returns the stored
|
|
81
|
+
* response from the first request without performing the operation again
|
|
82
|
+
* (including the original status code and any error). Use it to safely retry
|
|
83
|
+
* `POST` requests after network failures without risking duplicate sends. The key
|
|
84
|
+
* is scoped to this endpoint.
|
|
85
|
+
*/
|
|
86
|
+
'Idempotency-Key'?: string;
|
|
87
|
+
/**
|
|
88
|
+
* Header param: How long the idempotency key remains valid, as a Unix epoch
|
|
89
|
+
* timestamp in seconds or an ISO 8601 date string. Only applies when
|
|
90
|
+
* `Idempotency-Key` is provided. If omitted, the key is retained for 25 hours; the
|
|
91
|
+
* maximum is 1 year.
|
|
92
|
+
*/
|
|
93
|
+
'x-idempotency-expiration'?: string;
|
|
58
94
|
}
|
|
59
95
|
export declare namespace InvokeInvokeAdHocParams {
|
|
60
96
|
interface Automation {
|
|
@@ -121,15 +157,46 @@ export declare namespace InvokeInvokeAdHocParams {
|
|
|
121
157
|
}
|
|
122
158
|
}
|
|
123
159
|
export interface InvokeInvokeByTemplateParams {
|
|
160
|
+
/**
|
|
161
|
+
* Body param
|
|
162
|
+
*/
|
|
124
163
|
recipient: string | null;
|
|
164
|
+
/**
|
|
165
|
+
* Body param
|
|
166
|
+
*/
|
|
125
167
|
brand?: string | null;
|
|
168
|
+
/**
|
|
169
|
+
* Body param
|
|
170
|
+
*/
|
|
126
171
|
data?: {
|
|
127
172
|
[key: string]: unknown;
|
|
128
173
|
} | null;
|
|
174
|
+
/**
|
|
175
|
+
* Body param
|
|
176
|
+
*/
|
|
129
177
|
profile?: {
|
|
130
178
|
[key: string]: unknown;
|
|
131
179
|
} | null;
|
|
180
|
+
/**
|
|
181
|
+
* Body param
|
|
182
|
+
*/
|
|
132
183
|
template?: string | null;
|
|
184
|
+
/**
|
|
185
|
+
* Header param: A unique key that makes this request idempotent. If Courier
|
|
186
|
+
* receives another request with the same `Idempotency-Key`, it returns the stored
|
|
187
|
+
* response from the first request without performing the operation again
|
|
188
|
+
* (including the original status code and any error). Use it to safely retry
|
|
189
|
+
* `POST` requests after network failures without risking duplicate sends. The key
|
|
190
|
+
* is scoped to this endpoint.
|
|
191
|
+
*/
|
|
192
|
+
'Idempotency-Key'?: string;
|
|
193
|
+
/**
|
|
194
|
+
* Header param: How long the idempotency key remains valid, as a Unix epoch
|
|
195
|
+
* timestamp in seconds or an ISO 8601 date string. Only applies when
|
|
196
|
+
* `Idempotency-Key` is provided. If omitted, the key is retained for 25 hours; the
|
|
197
|
+
* maximum is 1 year.
|
|
198
|
+
*/
|
|
199
|
+
'x-idempotency-expiration'?: string;
|
|
133
200
|
}
|
|
134
201
|
export declare namespace Invoke {
|
|
135
202
|
export { type InvokeInvokeAdHocParams as InvokeInvokeAdHocParams, type InvokeInvokeByTemplateParams as InvokeInvokeByTemplateParams, };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invoke.d.mts","sourceRoot":"","sources":["../../src/resources/automations/invoke.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,KAAK,cAAc,0BAAsB;AAChD,OAAO,EAAE,UAAU,EAAE,mCAA+B;
|
|
1
|
+
{"version":3,"file":"invoke.d.mts","sourceRoot":"","sources":["../../src/resources/automations/invoke.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,KAAK,cAAc,0BAAsB;AAChD,OAAO,EAAE,UAAU,EAAE,mCAA+B;AAEpD,OAAO,EAAE,cAAc,EAAE,2CAAuC;AAGhE;;GAEG;AACH,qBAAa,MAAO,SAAQ,WAAW;IACrC;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,WAAW,CACT,MAAM,EAAE,uBAAuB,EAC/B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,cAAc,CAAC,wBAAwB,CAAC;IAqBtD;;;;;;;;;;;;OAYG;IACH,gBAAgB,CACd,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,4BAA4B,EACpC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,cAAc,CAAC,wBAAwB,CAAC;CAoBvD;AAED,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH,UAAU,EAAE,uBAAuB,CAAC,UAAU,CAAC;IAE/C;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAA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I,CAAC;aAC5C;SACF;QAED,UAAiB,oBAAoB;YACnC,MAAM,EAAE,QAAQ,CAAC;YAEjB,QAAQ,EAAE,MAAM,CAAC;SAClB;KACF;CACF;AAED,MAAM,WAAW,4BAA4B;IAC3C;;OAEG;IACH,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAEzB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEtB;;OAEG;IACH,IAAI,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,GAAG,IAAI,CAAC;IAEzC;;OAEG;IACH,OAAO,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,GAAG,IAAI,CAAC;IAE5C;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEzB;;;;;;;OAOG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B;;;;;OAKG;IACH,0BAA0B,CAAC,EAAE,MAAM,CAAC;CACrC;AAED,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EACL,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,4BAA4B,IAAI,4BAA4B,GAClE,CAAC;CACH"}
|
|
@@ -2,12 +2,13 @@ import { APIResource } from "../../core/resource.js";
|
|
|
2
2
|
import * as AutomationsAPI from "./automations.js";
|
|
3
3
|
import { APIPromise } from "../../core/api-promise.js";
|
|
4
4
|
import { RequestOptions } from "../../internal/request-options.js";
|
|
5
|
+
/**
|
|
6
|
+
* Invoke a stored automation template or an ad hoc automation defined in the request.
|
|
7
|
+
*/
|
|
5
8
|
export declare class Invoke extends APIResource {
|
|
6
9
|
/**
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* checkout the ad hoc automation guide
|
|
10
|
-
* [here](https://www.courier.com/docs/automations/steps/).
|
|
10
|
+
* Runs a series of automation steps supplied inline, without a saved template, and
|
|
11
|
+
* returns a runId.
|
|
11
12
|
*
|
|
12
13
|
* @example
|
|
13
14
|
* ```ts
|
|
@@ -29,9 +30,10 @@ export declare class Invoke extends APIResource {
|
|
|
29
30
|
* });
|
|
30
31
|
* ```
|
|
31
32
|
*/
|
|
32
|
-
invokeAdHoc(
|
|
33
|
+
invokeAdHoc(params: InvokeInvokeAdHocParams, options?: RequestOptions): APIPromise<AutomationsAPI.AutomationInvokeResponse>;
|
|
33
34
|
/**
|
|
34
|
-
*
|
|
35
|
+
* Starts an automation run from a saved template for one recipient, with optional
|
|
36
|
+
* data and profile, and returns a runId.
|
|
35
37
|
*
|
|
36
38
|
* @example
|
|
37
39
|
* ```ts
|
|
@@ -42,19 +44,53 @@ export declare class Invoke extends APIResource {
|
|
|
42
44
|
* );
|
|
43
45
|
* ```
|
|
44
46
|
*/
|
|
45
|
-
invokeByTemplate(templateID: string,
|
|
47
|
+
invokeByTemplate(templateID: string, params: InvokeInvokeByTemplateParams, options?: RequestOptions): APIPromise<AutomationsAPI.AutomationInvokeResponse>;
|
|
46
48
|
}
|
|
47
49
|
export interface InvokeInvokeAdHocParams {
|
|
50
|
+
/**
|
|
51
|
+
* Body param
|
|
52
|
+
*/
|
|
48
53
|
automation: InvokeInvokeAdHocParams.Automation;
|
|
54
|
+
/**
|
|
55
|
+
* Body param
|
|
56
|
+
*/
|
|
49
57
|
brand?: string | null;
|
|
58
|
+
/**
|
|
59
|
+
* Body param
|
|
60
|
+
*/
|
|
50
61
|
data?: {
|
|
51
62
|
[key: string]: unknown;
|
|
52
63
|
} | null;
|
|
64
|
+
/**
|
|
65
|
+
* Body param
|
|
66
|
+
*/
|
|
53
67
|
profile?: {
|
|
54
68
|
[key: string]: unknown;
|
|
55
69
|
} | null;
|
|
70
|
+
/**
|
|
71
|
+
* Body param
|
|
72
|
+
*/
|
|
56
73
|
recipient?: string | null;
|
|
74
|
+
/**
|
|
75
|
+
* Body param
|
|
76
|
+
*/
|
|
57
77
|
template?: string | null;
|
|
78
|
+
/**
|
|
79
|
+
* Header param: A unique key that makes this request idempotent. If Courier
|
|
80
|
+
* receives another request with the same `Idempotency-Key`, it returns the stored
|
|
81
|
+
* response from the first request without performing the operation again
|
|
82
|
+
* (including the original status code and any error). Use it to safely retry
|
|
83
|
+
* `POST` requests after network failures without risking duplicate sends. The key
|
|
84
|
+
* is scoped to this endpoint.
|
|
85
|
+
*/
|
|
86
|
+
'Idempotency-Key'?: string;
|
|
87
|
+
/**
|
|
88
|
+
* Header param: How long the idempotency key remains valid, as a Unix epoch
|
|
89
|
+
* timestamp in seconds or an ISO 8601 date string. Only applies when
|
|
90
|
+
* `Idempotency-Key` is provided. If omitted, the key is retained for 25 hours; the
|
|
91
|
+
* maximum is 1 year.
|
|
92
|
+
*/
|
|
93
|
+
'x-idempotency-expiration'?: string;
|
|
58
94
|
}
|
|
59
95
|
export declare namespace InvokeInvokeAdHocParams {
|
|
60
96
|
interface Automation {
|
|
@@ -121,15 +157,46 @@ export declare namespace InvokeInvokeAdHocParams {
|
|
|
121
157
|
}
|
|
122
158
|
}
|
|
123
159
|
export interface InvokeInvokeByTemplateParams {
|
|
160
|
+
/**
|
|
161
|
+
* Body param
|
|
162
|
+
*/
|
|
124
163
|
recipient: string | null;
|
|
164
|
+
/**
|
|
165
|
+
* Body param
|
|
166
|
+
*/
|
|
125
167
|
brand?: string | null;
|
|
168
|
+
/**
|
|
169
|
+
* Body param
|
|
170
|
+
*/
|
|
126
171
|
data?: {
|
|
127
172
|
[key: string]: unknown;
|
|
128
173
|
} | null;
|
|
174
|
+
/**
|
|
175
|
+
* Body param
|
|
176
|
+
*/
|
|
129
177
|
profile?: {
|
|
130
178
|
[key: string]: unknown;
|
|
131
179
|
} | null;
|
|
180
|
+
/**
|
|
181
|
+
* Body param
|
|
182
|
+
*/
|
|
132
183
|
template?: string | null;
|
|
184
|
+
/**
|
|
185
|
+
* Header param: A unique key that makes this request idempotent. If Courier
|
|
186
|
+
* receives another request with the same `Idempotency-Key`, it returns the stored
|
|
187
|
+
* response from the first request without performing the operation again
|
|
188
|
+
* (including the original status code and any error). Use it to safely retry
|
|
189
|
+
* `POST` requests after network failures without risking duplicate sends. The key
|
|
190
|
+
* is scoped to this endpoint.
|
|
191
|
+
*/
|
|
192
|
+
'Idempotency-Key'?: string;
|
|
193
|
+
/**
|
|
194
|
+
* Header param: How long the idempotency key remains valid, as a Unix epoch
|
|
195
|
+
* timestamp in seconds or an ISO 8601 date string. Only applies when
|
|
196
|
+
* `Idempotency-Key` is provided. If omitted, the key is retained for 25 hours; the
|
|
197
|
+
* maximum is 1 year.
|
|
198
|
+
*/
|
|
199
|
+
'x-idempotency-expiration'?: string;
|
|
133
200
|
}
|
|
134
201
|
export declare namespace Invoke {
|
|
135
202
|
export { type InvokeInvokeAdHocParams as InvokeInvokeAdHocParams, type InvokeInvokeByTemplateParams as InvokeInvokeByTemplateParams, };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invoke.d.ts","sourceRoot":"","sources":["../../src/resources/automations/invoke.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,KAAK,cAAc,yBAAsB;AAChD,OAAO,EAAE,UAAU,EAAE,kCAA+B;
|
|
1
|
+
{"version":3,"file":"invoke.d.ts","sourceRoot":"","sources":["../../src/resources/automations/invoke.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,KAAK,cAAc,yBAAsB;AAChD,OAAO,EAAE,UAAU,EAAE,kCAA+B;AAEpD,OAAO,EAAE,cAAc,EAAE,0CAAuC;AAGhE;;GAEG;AACH,qBAAa,MAAO,SAAQ,WAAW;IACrC;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,WAAW,CACT,MAAM,EAAE,uBAAuB,EAC/B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,cAAc,CAAC,wBAAwB,CAAC;IAqBtD;;;;;;;;;;;;OAYG;IAC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AC;YACvC,UAAiB,OAAO;gBACtB,MAAM,EAAE,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,CAAC;gBAEpD,GAAG,EAAE,MAAM,CAAC;gBAEZ,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;gBAErB,OAAO,CAAC,EAAE;oBAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;iBAAE,GAAG,IAAI,CAAC;aAC5C;SACF;QAED,UAAiB,oBAAoB;YACnC,MAAM,EAAE,QAAQ,CAAC;YAEjB,QAAQ,EAAE,MAAM,CAAC;SAClB;KACF;CACF;AAED,MAAM,WAAW,4BAA4B;IAC3C;;OAEG;IACH,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAEzB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEtB;;OAEG;IACH,IAAI,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,GAAG,IAAI,CAAC;IAEzC;;OAEG;IACH,OAAO,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,GAAG,IAAI,CAAC;IAE5C;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEzB;;;;;;;OAOG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B;;;;;OAKG;IACH,0BAA0B,CAAC,EAAE,MAAM,CAAC;CACrC;AAED,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EACL,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,4BAA4B,IAAI,4BAA4B,GAClE,CAAC;CACH"}
|
|
@@ -3,13 +3,15 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.Invoke = void 0;
|
|
5
5
|
const resource_1 = require("../../core/resource.js");
|
|
6
|
+
const headers_1 = require("../../internal/headers.js");
|
|
6
7
|
const path_1 = require("../../internal/utils/path.js");
|
|
8
|
+
/**
|
|
9
|
+
* Invoke a stored automation template or an ad hoc automation defined in the request.
|
|
10
|
+
*/
|
|
7
11
|
class Invoke extends resource_1.APIResource {
|
|
8
12
|
/**
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* checkout the ad hoc automation guide
|
|
12
|
-
* [here](https://www.courier.com/docs/automations/steps/).
|
|
13
|
+
* Runs a series of automation steps supplied inline, without a saved template, and
|
|
14
|
+
* returns a runId.
|
|
13
15
|
*
|
|
14
16
|
* @example
|
|
15
17
|
* ```ts
|
|
@@ -31,11 +33,25 @@ class Invoke extends resource_1.APIResource {
|
|
|
31
33
|
* });
|
|
32
34
|
* ```
|
|
33
35
|
*/
|
|
34
|
-
invokeAdHoc(
|
|
35
|
-
|
|
36
|
+
invokeAdHoc(params, options) {
|
|
37
|
+
const { 'Idempotency-Key': idempotencyKey, 'x-idempotency-expiration': xIdempotencyExpiration, ...body } = params;
|
|
38
|
+
return this._client.post('/automations/invoke', {
|
|
39
|
+
body,
|
|
40
|
+
...options,
|
|
41
|
+
headers: (0, headers_1.buildHeaders)([
|
|
42
|
+
{
|
|
43
|
+
...(idempotencyKey != null ? { 'Idempotency-Key': idempotencyKey } : undefined),
|
|
44
|
+
...(xIdempotencyExpiration != null ?
|
|
45
|
+
{ 'x-idempotency-expiration': xIdempotencyExpiration }
|
|
46
|
+
: undefined),
|
|
47
|
+
},
|
|
48
|
+
options?.headers,
|
|
49
|
+
]),
|
|
50
|
+
});
|
|
36
51
|
}
|
|
37
52
|
/**
|
|
38
|
-
*
|
|
53
|
+
* Starts an automation run from a saved template for one recipient, with optional
|
|
54
|
+
* data and profile, and returns a runId.
|
|
39
55
|
*
|
|
40
56
|
* @example
|
|
41
57
|
* ```ts
|
|
@@ -46,8 +62,21 @@ class Invoke extends resource_1.APIResource {
|
|
|
46
62
|
* );
|
|
47
63
|
* ```
|
|
48
64
|
*/
|
|
49
|
-
invokeByTemplate(templateID,
|
|
50
|
-
|
|
65
|
+
invokeByTemplate(templateID, params, options) {
|
|
66
|
+
const { 'Idempotency-Key': idempotencyKey, 'x-idempotency-expiration': xIdempotencyExpiration, ...body } = params;
|
|
67
|
+
return this._client.post((0, path_1.path) `/automations/${templateID}/invoke`, {
|
|
68
|
+
body,
|
|
69
|
+
...options,
|
|
70
|
+
headers: (0, headers_1.buildHeaders)([
|
|
71
|
+
{
|
|
72
|
+
...(idempotencyKey != null ? { 'Idempotency-Key': idempotencyKey } : undefined),
|
|
73
|
+
...(xIdempotencyExpiration != null ?
|
|
74
|
+
{ 'x-idempotency-expiration': xIdempotencyExpiration }
|
|
75
|
+
: undefined),
|
|
76
|
+
},
|
|
77
|
+
options?.headers,
|
|
78
|
+
]),
|
|
79
|
+
});
|
|
51
80
|
}
|
|
52
81
|
}
|
|
53
82
|
exports.Invoke = Invoke;
|