@trycourier/courier 8.0.0 → 9.1.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 +19 -0
- package/client.d.mts +5 -4
- package/client.d.mts.map +1 -1
- package/client.d.ts +5 -4
- package/client.d.ts.map +1 -1
- package/client.js.map +1 -1
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/automations/automations.d.mts +82 -1
- package/resources/automations/automations.d.mts.map +1 -1
- package/resources/automations/automations.d.ts +82 -1
- package/resources/automations/automations.d.ts.map +1 -1
- package/resources/automations/automations.js +4 -0
- package/resources/automations/automations.js.map +1 -1
- package/resources/automations/automations.mjs +4 -0
- package/resources/automations/automations.mjs.map +1 -1
- package/resources/automations/index.d.mts +2 -1
- package/resources/automations/index.d.mts.map +1 -1
- package/resources/automations/index.d.ts +2 -1
- package/resources/automations/index.d.ts.map +1 -1
- package/resources/automations/index.js +3 -1
- package/resources/automations/index.js.map +1 -1
- package/resources/automations/index.mjs +1 -0
- package/resources/automations/index.mjs.map +1 -1
- package/resources/automations/runs.d.mts +69 -0
- package/resources/automations/runs.d.mts.map +1 -0
- package/resources/automations/runs.d.ts +69 -0
- package/resources/automations/runs.d.ts.map +1 -0
- package/resources/automations/runs.js +43 -0
- package/resources/automations/runs.js.map +1 -0
- package/resources/automations/runs.mjs +39 -0
- package/resources/automations/runs.mjs.map +1 -0
- 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.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/journeys/index.d.mts +2 -1
- package/resources/journeys/index.d.mts.map +1 -1
- package/resources/journeys/index.d.ts +2 -1
- package/resources/journeys/index.d.ts.map +1 -1
- package/resources/journeys/index.js +3 -1
- package/resources/journeys/index.js.map +1 -1
- package/resources/journeys/index.mjs +1 -0
- package/resources/journeys/index.mjs.map +1 -1
- package/resources/journeys/journeys.d.mts +183 -4
- package/resources/journeys/journeys.d.mts.map +1 -1
- package/resources/journeys/journeys.d.ts +183 -4
- package/resources/journeys/journeys.d.ts.map +1 -1
- package/resources/journeys/journeys.js +4 -0
- package/resources/journeys/journeys.js.map +1 -1
- package/resources/journeys/journeys.mjs +4 -0
- package/resources/journeys/journeys.mjs.map +1 -1
- package/resources/journeys/runs.d.mts +83 -0
- package/resources/journeys/runs.d.mts.map +1 -0
- package/resources/journeys/runs.d.ts +83 -0
- package/resources/journeys/runs.d.ts.map +1 -0
- package/resources/journeys/runs.js +59 -0
- package/resources/journeys/runs.js.map +1 -0
- package/resources/journeys/runs.mjs +55 -0
- package/resources/journeys/runs.mjs.map +1 -0
- package/resources/notifications/notifications.d.mts +0 -12
- package/resources/notifications/notifications.d.mts.map +1 -1
- package/resources/notifications/notifications.d.ts +0 -12
- package/resources/notifications/notifications.d.ts.map +1 -1
- package/resources/notifications/notifications.js +0 -14
- package/resources/notifications/notifications.js.map +1 -1
- package/resources/notifications/notifications.mjs +0 -14
- package/resources/notifications/notifications.mjs.map +1 -1
- package/resources/shared.d.mts +23 -2
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +23 -2
- package/resources/shared.d.ts.map +1 -1
- package/resources/users/preferences.d.mts +12 -0
- package/resources/users/preferences.d.mts.map +1 -1
- package/resources/users/preferences.d.ts +12 -0
- package/resources/users/preferences.d.ts.map +1 -1
- package/src/client.ts +25 -0
- package/src/resources/automations/automations.ts +101 -0
- package/src/resources/automations/index.ts +5 -0
- package/src/resources/automations/runs.ts +87 -0
- package/src/resources/index.ts +12 -0
- package/src/resources/journeys/index.ts +9 -0
- package/src/resources/journeys/journeys.ts +226 -2
- package/src/resources/journeys/runs.ts +104 -0
- package/src/resources/notifications/notifications.ts +0 -15
- package/src/resources/shared.ts +24 -2
- package/src/resources/users/preferences.ts +14 -0
- 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
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { APIResource } from "../../core/resource.mjs";
|
|
2
2
|
import * as InvokeAPI from "./invoke.mjs";
|
|
3
3
|
import { Invoke, InvokeInvokeAdHocParams, InvokeInvokeByTemplateParams } from "./invoke.mjs";
|
|
4
|
+
import * as RunsAPI from "./runs.mjs";
|
|
5
|
+
import { RunListParams, Runs } from "./runs.mjs";
|
|
4
6
|
import { APIPromise } from "../../core/api-promise.mjs";
|
|
5
7
|
import { RequestOptions } from "../../internal/request-options.mjs";
|
|
6
8
|
/**
|
|
@@ -8,6 +10,7 @@ import { RequestOptions } from "../../internal/request-options.mjs";
|
|
|
8
10
|
*/
|
|
9
11
|
export declare class Automations extends APIResource {
|
|
10
12
|
invoke: InvokeAPI.Invoke;
|
|
13
|
+
runs: RunsAPI.Runs;
|
|
11
14
|
/**
|
|
12
15
|
* Lists the workspace's saved automation templates, each with its id and a cursor
|
|
13
16
|
* for paging to the next page of results.
|
|
@@ -23,6 +26,83 @@ export declare class Automations extends APIResource {
|
|
|
23
26
|
export interface AutomationInvokeResponse {
|
|
24
27
|
runId: string;
|
|
25
28
|
}
|
|
29
|
+
/**
|
|
30
|
+
* An Automation run as it appears in a list response.
|
|
31
|
+
*/
|
|
32
|
+
export interface AutomationRunListItem {
|
|
33
|
+
/**
|
|
34
|
+
* A unique identifier representing the run.
|
|
35
|
+
*/
|
|
36
|
+
run_id: string;
|
|
37
|
+
/**
|
|
38
|
+
* Internal provenance strings describing what started the run, e.g.
|
|
39
|
+
* `invoke/<template_id>` or `segment/page/Pricing Page`. Diagnostic only — the
|
|
40
|
+
* format is unstable and should not be parsed.
|
|
41
|
+
*/
|
|
42
|
+
source: Array<string>;
|
|
43
|
+
/**
|
|
44
|
+
* When the run started, as an ISO 8601 timestamp.
|
|
45
|
+
*/
|
|
46
|
+
created_at?: string;
|
|
47
|
+
/**
|
|
48
|
+
* The state of the run: `PROCESSING`, `PROCESSED`, `WAITING`, `CANCELED`, `ERROR`,
|
|
49
|
+
* `THROTTLED`, or `NOT PROCESSED`. Not an enum — new values have been added
|
|
50
|
+
* before.
|
|
51
|
+
*/
|
|
52
|
+
status?: string;
|
|
53
|
+
/**
|
|
54
|
+
* The id of the Automation Template this run belongs to.
|
|
55
|
+
*/
|
|
56
|
+
template_id?: string;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* A page of Automation runs.
|
|
60
|
+
*/
|
|
61
|
+
export interface AutomationRunListResponse {
|
|
62
|
+
runs: Array<AutomationRunListItem>;
|
|
63
|
+
/**
|
|
64
|
+
* Pass back as `cursor` to fetch the next page. Absent on the last page.
|
|
65
|
+
*/
|
|
66
|
+
next_cursor?: string;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* One executed step of an Automation run.
|
|
70
|
+
*/
|
|
71
|
+
export interface AutomationRunStep {
|
|
72
|
+
/**
|
|
73
|
+
* The kind of step that ran, e.g. `send`, `delay`, or `update-profile`.
|
|
74
|
+
*/
|
|
75
|
+
action: string;
|
|
76
|
+
/**
|
|
77
|
+
* The state of the step: the seven run statuses, plus `SKIPPED` and `COMPUTING`.
|
|
78
|
+
* Not an enum — new values have been added before.
|
|
79
|
+
*/
|
|
80
|
+
status: string;
|
|
81
|
+
/**
|
|
82
|
+
* When the step started, as an ISO 8601 timestamp.
|
|
83
|
+
*/
|
|
84
|
+
created_at?: string;
|
|
85
|
+
/**
|
|
86
|
+
* The message this step produced, present on send steps. Pass it to
|
|
87
|
+
* `GET /messages/{message_id}` for delivery status. A send to a List or an
|
|
88
|
+
* Audience yields one id for the request, not one per recipient.
|
|
89
|
+
*/
|
|
90
|
+
message_id?: string;
|
|
91
|
+
/**
|
|
92
|
+
* A unique identifier representing the step.
|
|
93
|
+
*/
|
|
94
|
+
step_id?: string;
|
|
95
|
+
/**
|
|
96
|
+
* When the step last changed state, as an ISO 8601 timestamp.
|
|
97
|
+
*/
|
|
98
|
+
updated_at?: string;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Every step of an Automation run. Not paginated.
|
|
102
|
+
*/
|
|
103
|
+
export interface AutomationRunStepsResponse {
|
|
104
|
+
steps: Array<AutomationRunStep>;
|
|
105
|
+
}
|
|
26
106
|
export interface AutomationTemplate {
|
|
27
107
|
/**
|
|
28
108
|
* The unique identifier of the automation template.
|
|
@@ -65,7 +145,8 @@ export interface AutomationListParams {
|
|
|
65
145
|
version?: 'published' | 'draft';
|
|
66
146
|
}
|
|
67
147
|
export declare namespace Automations {
|
|
68
|
-
export { type AutomationInvokeResponse as AutomationInvokeResponse, type AutomationTemplate as AutomationTemplate, type AutomationTemplateListResponse as AutomationTemplateListResponse, type AutomationListParams as AutomationListParams, };
|
|
148
|
+
export { type AutomationInvokeResponse as AutomationInvokeResponse, type AutomationRunListItem as AutomationRunListItem, type AutomationRunListResponse as AutomationRunListResponse, type AutomationRunStep as AutomationRunStep, type AutomationRunStepsResponse as AutomationRunStepsResponse, type AutomationTemplate as AutomationTemplate, type AutomationTemplateListResponse as AutomationTemplateListResponse, type AutomationListParams as AutomationListParams, };
|
|
69
149
|
export { Invoke as Invoke, type InvokeInvokeAdHocParams as InvokeInvokeAdHocParams, type InvokeInvokeByTemplateParams as InvokeInvokeByTemplateParams, };
|
|
150
|
+
export { Runs as Runs, type RunListParams as RunListParams };
|
|
70
151
|
}
|
|
71
152
|
//# sourceMappingURL=automations.d.mts.map
|
|
@@ -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;;GAEG;AACH,qBAAa,WAAY,SAAQ,WAAW;IAC1C,MAAM,EAAE,SAAS,CAAC,MAAM,CAAsC;
|
|
1
|
+
{"version":3,"file":"automations.d.mts","sourceRoot":"","sources":["../../src/resources/automations/automations.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { APIResource } from "../../core/resource.js";
|
|
2
2
|
import * as InvokeAPI from "./invoke.js";
|
|
3
3
|
import { Invoke, InvokeInvokeAdHocParams, InvokeInvokeByTemplateParams } from "./invoke.js";
|
|
4
|
+
import * as RunsAPI from "./runs.js";
|
|
5
|
+
import { RunListParams, Runs } from "./runs.js";
|
|
4
6
|
import { APIPromise } from "../../core/api-promise.js";
|
|
5
7
|
import { RequestOptions } from "../../internal/request-options.js";
|
|
6
8
|
/**
|
|
@@ -8,6 +10,7 @@ import { RequestOptions } from "../../internal/request-options.js";
|
|
|
8
10
|
*/
|
|
9
11
|
export declare class Automations extends APIResource {
|
|
10
12
|
invoke: InvokeAPI.Invoke;
|
|
13
|
+
runs: RunsAPI.Runs;
|
|
11
14
|
/**
|
|
12
15
|
* Lists the workspace's saved automation templates, each with its id and a cursor
|
|
13
16
|
* for paging to the next page of results.
|
|
@@ -23,6 +26,83 @@ export declare class Automations extends APIResource {
|
|
|
23
26
|
export interface AutomationInvokeResponse {
|
|
24
27
|
runId: string;
|
|
25
28
|
}
|
|
29
|
+
/**
|
|
30
|
+
* An Automation run as it appears in a list response.
|
|
31
|
+
*/
|
|
32
|
+
export interface AutomationRunListItem {
|
|
33
|
+
/**
|
|
34
|
+
* A unique identifier representing the run.
|
|
35
|
+
*/
|
|
36
|
+
run_id: string;
|
|
37
|
+
/**
|
|
38
|
+
* Internal provenance strings describing what started the run, e.g.
|
|
39
|
+
* `invoke/<template_id>` or `segment/page/Pricing Page`. Diagnostic only — the
|
|
40
|
+
* format is unstable and should not be parsed.
|
|
41
|
+
*/
|
|
42
|
+
source: Array<string>;
|
|
43
|
+
/**
|
|
44
|
+
* When the run started, as an ISO 8601 timestamp.
|
|
45
|
+
*/
|
|
46
|
+
created_at?: string;
|
|
47
|
+
/**
|
|
48
|
+
* The state of the run: `PROCESSING`, `PROCESSED`, `WAITING`, `CANCELED`, `ERROR`,
|
|
49
|
+
* `THROTTLED`, or `NOT PROCESSED`. Not an enum — new values have been added
|
|
50
|
+
* before.
|
|
51
|
+
*/
|
|
52
|
+
status?: string;
|
|
53
|
+
/**
|
|
54
|
+
* The id of the Automation Template this run belongs to.
|
|
55
|
+
*/
|
|
56
|
+
template_id?: string;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* A page of Automation runs.
|
|
60
|
+
*/
|
|
61
|
+
export interface AutomationRunListResponse {
|
|
62
|
+
runs: Array<AutomationRunListItem>;
|
|
63
|
+
/**
|
|
64
|
+
* Pass back as `cursor` to fetch the next page. Absent on the last page.
|
|
65
|
+
*/
|
|
66
|
+
next_cursor?: string;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* One executed step of an Automation run.
|
|
70
|
+
*/
|
|
71
|
+
export interface AutomationRunStep {
|
|
72
|
+
/**
|
|
73
|
+
* The kind of step that ran, e.g. `send`, `delay`, or `update-profile`.
|
|
74
|
+
*/
|
|
75
|
+
action: string;
|
|
76
|
+
/**
|
|
77
|
+
* The state of the step: the seven run statuses, plus `SKIPPED` and `COMPUTING`.
|
|
78
|
+
* Not an enum — new values have been added before.
|
|
79
|
+
*/
|
|
80
|
+
status: string;
|
|
81
|
+
/**
|
|
82
|
+
* When the step started, as an ISO 8601 timestamp.
|
|
83
|
+
*/
|
|
84
|
+
created_at?: string;
|
|
85
|
+
/**
|
|
86
|
+
* The message this step produced, present on send steps. Pass it to
|
|
87
|
+
* `GET /messages/{message_id}` for delivery status. A send to a List or an
|
|
88
|
+
* Audience yields one id for the request, not one per recipient.
|
|
89
|
+
*/
|
|
90
|
+
message_id?: string;
|
|
91
|
+
/**
|
|
92
|
+
* A unique identifier representing the step.
|
|
93
|
+
*/
|
|
94
|
+
step_id?: string;
|
|
95
|
+
/**
|
|
96
|
+
* When the step last changed state, as an ISO 8601 timestamp.
|
|
97
|
+
*/
|
|
98
|
+
updated_at?: string;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Every step of an Automation run. Not paginated.
|
|
102
|
+
*/
|
|
103
|
+
export interface AutomationRunStepsResponse {
|
|
104
|
+
steps: Array<AutomationRunStep>;
|
|
105
|
+
}
|
|
26
106
|
export interface AutomationTemplate {
|
|
27
107
|
/**
|
|
28
108
|
* The unique identifier of the automation template.
|
|
@@ -65,7 +145,8 @@ export interface AutomationListParams {
|
|
|
65
145
|
version?: 'published' | 'draft';
|
|
66
146
|
}
|
|
67
147
|
export declare namespace Automations {
|
|
68
|
-
export { type AutomationInvokeResponse as AutomationInvokeResponse, type AutomationTemplate as AutomationTemplate, type AutomationTemplateListResponse as AutomationTemplateListResponse, type AutomationListParams as AutomationListParams, };
|
|
148
|
+
export { type AutomationInvokeResponse as AutomationInvokeResponse, type AutomationRunListItem as AutomationRunListItem, type AutomationRunListResponse as AutomationRunListResponse, type AutomationRunStep as AutomationRunStep, type AutomationRunStepsResponse as AutomationRunStepsResponse, type AutomationTemplate as AutomationTemplate, type AutomationTemplateListResponse as AutomationTemplateListResponse, type AutomationListParams as AutomationListParams, };
|
|
69
149
|
export { Invoke as Invoke, type InvokeInvokeAdHocParams as InvokeInvokeAdHocParams, type InvokeInvokeByTemplateParams as InvokeInvokeByTemplateParams, };
|
|
150
|
+
export { Runs as Runs, type RunListParams as RunListParams };
|
|
70
151
|
}
|
|
71
152
|
//# sourceMappingURL=automations.d.ts.map
|
|
@@ -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;;GAEG;AACH,qBAAa,WAAY,SAAQ,WAAW;IAC1C,MAAM,EAAE,SAAS,CAAC,MAAM,CAAsC;
|
|
1
|
+
{"version":3,"file":"automations.d.ts","sourceRoot":"","sources":["../../src/resources/automations/automations.ts"],"names":[],"mappings":"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"}
|
|
@@ -6,6 +6,8 @@ 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
|
+
const RunsAPI = tslib_1.__importStar(require("./runs.js"));
|
|
10
|
+
const runs_1 = require("./runs.js");
|
|
9
11
|
/**
|
|
10
12
|
* Invoke a stored automation template or an ad hoc automation defined in the request.
|
|
11
13
|
*/
|
|
@@ -13,6 +15,7 @@ class Automations extends resource_1.APIResource {
|
|
|
13
15
|
constructor() {
|
|
14
16
|
super(...arguments);
|
|
15
17
|
this.invoke = new InvokeAPI.Invoke(this._client);
|
|
18
|
+
this.runs = new RunsAPI.Runs(this._client);
|
|
16
19
|
}
|
|
17
20
|
/**
|
|
18
21
|
* Lists the workspace's saved automation templates, each with its id and a cursor
|
|
@@ -30,4 +33,5 @@ class Automations extends resource_1.APIResource {
|
|
|
30
33
|
}
|
|
31
34
|
exports.Automations = Automations;
|
|
32
35
|
Automations.Invoke = invoke_1.Invoke;
|
|
36
|
+
Automations.Runs = runs_1.Runs;
|
|
33
37
|
//# sourceMappingURL=automations.js.map
|
|
@@ -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;
|
|
1
|
+
{"version":3,"file":"automations.js","sourceRoot":"","sources":["../../src/resources/automations/automations.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAClD,+DAAsC;AACtC,wCAAyF;AACzF,2DAAkC;AAClC,oCAA6C;AAI7C;;GAEG;AACH,MAAa,WAAY,SAAQ,sBAAW;IAA5C;;QACE,WAAM,GAAqB,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC9D,SAAI,GAAiB,IAAI,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAkBtD,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;AApBD,kCAoBC;AAmJD,WAAW,CAAC,MAAM,GAAG,eAAM,CAAC;AAC5B,WAAW,CAAC,IAAI,GAAG,WAAI,CAAC"}
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
import { APIResource } from "../../core/resource.mjs";
|
|
3
3
|
import * as InvokeAPI from "./invoke.mjs";
|
|
4
4
|
import { Invoke } from "./invoke.mjs";
|
|
5
|
+
import * as RunsAPI from "./runs.mjs";
|
|
6
|
+
import { Runs } from "./runs.mjs";
|
|
5
7
|
/**
|
|
6
8
|
* Invoke a stored automation template or an ad hoc automation defined in the request.
|
|
7
9
|
*/
|
|
@@ -9,6 +11,7 @@ export class Automations extends APIResource {
|
|
|
9
11
|
constructor() {
|
|
10
12
|
super(...arguments);
|
|
11
13
|
this.invoke = new InvokeAPI.Invoke(this._client);
|
|
14
|
+
this.runs = new RunsAPI.Runs(this._client);
|
|
12
15
|
}
|
|
13
16
|
/**
|
|
14
17
|
* Lists the workspace's saved automation templates, each with its id and a cursor
|
|
@@ -25,4 +28,5 @@ export class Automations extends APIResource {
|
|
|
25
28
|
}
|
|
26
29
|
}
|
|
27
30
|
Automations.Invoke = Invoke;
|
|
31
|
+
Automations.Runs = Runs;
|
|
28
32
|
//# sourceMappingURL=automations.mjs.map
|
|
@@ -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;
|
|
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;AACzF,OAAO,KAAK,OAAO,mBAAe;AAClC,OAAO,EAAiB,IAAI,EAAE,mBAAe;AAI7C;;GAEG;AACH,MAAM,OAAO,WAAY,SAAQ,WAAW;IAA5C;;QACE,WAAM,GAAqB,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC9D,SAAI,GAAiB,IAAI,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAkBtD,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;AAmJD,WAAW,CAAC,MAAM,GAAG,MAAM,CAAC;AAC5B,WAAW,CAAC,IAAI,GAAG,IAAI,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
export { Automations, type AutomationInvokeResponse, type AutomationTemplate, type AutomationTemplateListResponse, type AutomationListParams, } from "./automations.mjs";
|
|
1
|
+
export { Automations, type AutomationInvokeResponse, type AutomationRunListItem, type AutomationRunListResponse, type AutomationRunStep, type AutomationRunStepsResponse, type AutomationTemplate, type AutomationTemplateListResponse, type AutomationListParams, } from "./automations.mjs";
|
|
2
2
|
export { Invoke, type InvokeInvokeAdHocParams, type InvokeInvokeByTemplateParams } from "./invoke.mjs";
|
|
3
|
+
export { Runs, type RunListParams } from "./runs.mjs";
|
|
3
4
|
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/resources/automations/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,WAAW,EACX,KAAK,wBAAwB,EAC7B,KAAK,kBAAkB,EACvB,KAAK,8BAA8B,EACnC,KAAK,oBAAoB,GAC1B,0BAAsB;AACvB,OAAO,EAAE,MAAM,EAAE,KAAK,uBAAuB,EAAE,KAAK,4BAA4B,EAAE,qBAAiB"}
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/resources/automations/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,WAAW,EACX,KAAK,wBAAwB,EAC7B,KAAK,qBAAqB,EAC1B,KAAK,yBAAyB,EAC9B,KAAK,iBAAiB,EACtB,KAAK,0BAA0B,EAC/B,KAAK,kBAAkB,EACvB,KAAK,8BAA8B,EACnC,KAAK,oBAAoB,GAC1B,0BAAsB;AACvB,OAAO,EAAE,MAAM,EAAE,KAAK,uBAAuB,EAAE,KAAK,4BAA4B,EAAE,qBAAiB;AACnG,OAAO,EAAE,IAAI,EAAE,KAAK,aAAa,EAAE,mBAAe"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
export { Automations, type AutomationInvokeResponse, type AutomationTemplate, type AutomationTemplateListResponse, type AutomationListParams, } from "./automations.js";
|
|
1
|
+
export { Automations, type AutomationInvokeResponse, type AutomationRunListItem, type AutomationRunListResponse, type AutomationRunStep, type AutomationRunStepsResponse, type AutomationTemplate, type AutomationTemplateListResponse, type AutomationListParams, } from "./automations.js";
|
|
2
2
|
export { Invoke, type InvokeInvokeAdHocParams, type InvokeInvokeByTemplateParams } from "./invoke.js";
|
|
3
|
+
export { Runs, type RunListParams } from "./runs.js";
|
|
3
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/automations/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,WAAW,EACX,KAAK,wBAAwB,EAC7B,KAAK,kBAAkB,EACvB,KAAK,8BAA8B,EACnC,KAAK,oBAAoB,GAC1B,yBAAsB;AACvB,OAAO,EAAE,MAAM,EAAE,KAAK,uBAAuB,EAAE,KAAK,4BAA4B,EAAE,oBAAiB"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/automations/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,WAAW,EACX,KAAK,wBAAwB,EAC7B,KAAK,qBAAqB,EAC1B,KAAK,yBAAyB,EAC9B,KAAK,iBAAiB,EACtB,KAAK,0BAA0B,EAC/B,KAAK,kBAAkB,EACvB,KAAK,8BAA8B,EACnC,KAAK,oBAAoB,GAC1B,yBAAsB;AACvB,OAAO,EAAE,MAAM,EAAE,KAAK,uBAAuB,EAAE,KAAK,4BAA4B,EAAE,oBAAiB;AACnG,OAAO,EAAE,IAAI,EAAE,KAAK,aAAa,EAAE,kBAAe"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.Invoke = exports.Automations = void 0;
|
|
4
|
+
exports.Runs = exports.Invoke = exports.Automations = void 0;
|
|
5
5
|
var automations_1 = require("./automations.js");
|
|
6
6
|
Object.defineProperty(exports, "Automations", { enumerable: true, get: function () { return automations_1.Automations; } });
|
|
7
7
|
var invoke_1 = require("./invoke.js");
|
|
8
8
|
Object.defineProperty(exports, "Invoke", { enumerable: true, get: function () { return invoke_1.Invoke; } });
|
|
9
|
+
var runs_1 = require("./runs.js");
|
|
10
|
+
Object.defineProperty(exports, "Runs", { enumerable: true, get: function () { return runs_1.Runs; } });
|
|
9
11
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/automations/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/automations/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,gDAUuB;AATrB,0GAAA,WAAW,OAAA;AAUb,sCAAmG;AAA1F,gGAAA,MAAM,OAAA;AACf,kCAAkD;AAAzC,4FAAA,IAAI,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/automations/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EACL,WAAW,
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/automations/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EACL,WAAW,GASZ,0BAAsB;AACvB,OAAO,EAAE,MAAM,EAAmE,qBAAiB;AACnG,OAAO,EAAE,IAAI,EAAsB,mBAAe"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
2
|
+
import * as AutomationsAPI from "./automations.mjs";
|
|
3
|
+
import { APIPromise } from "../../core/api-promise.mjs";
|
|
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
|
+
*/
|
|
8
|
+
export declare class Runs extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* List runs of the workspace's v2 Automations, newest first, filtered by status,
|
|
11
|
+
* Template, or date range and paged by cursor. Journey (v3) runs are listed by
|
|
12
|
+
* `GET /journeys/runs` instead — the two surfaces never return each other's runs.
|
|
13
|
+
* Runs are retained for 95 days.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```ts
|
|
17
|
+
* const automationRunListResponse =
|
|
18
|
+
* await client.automations.runs.list();
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
list(query?: RunListParams | null | undefined, options?: RequestOptions): APIPromise<AutomationsAPI.AutomationRunListResponse>;
|
|
22
|
+
/**
|
|
23
|
+
* List the per-step state of one Automation run, in full — this endpoint is not
|
|
24
|
+
* paginated. `message_id` is present on send steps that produced a message; follow
|
|
25
|
+
* it to `GET /messages/{message_id}` for delivery status. A send to a List or an
|
|
26
|
+
* Audience yields one `message_id` for the request, not one per recipient.
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```ts
|
|
30
|
+
* const automationRunStepsResponse =
|
|
31
|
+
* await client.automations.runs.listSteps('x');
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
listSteps(id: string, options?: RequestOptions): APIPromise<AutomationsAPI.AutomationRunStepsResponse>;
|
|
35
|
+
}
|
|
36
|
+
export interface RunListParams {
|
|
37
|
+
/**
|
|
38
|
+
* A cursor token for pagination. Use the `next_cursor` from the previous response
|
|
39
|
+
* to fetch the next page of results. Treat it as opaque.
|
|
40
|
+
*/
|
|
41
|
+
cursor?: string;
|
|
42
|
+
/**
|
|
43
|
+
* An inclusive upper bound on `created_at`, in the same format as `start_date`.
|
|
44
|
+
*/
|
|
45
|
+
end_date?: string;
|
|
46
|
+
/**
|
|
47
|
+
* The number of runs to return per page, between `1` and `50`. Defaults to `20`.
|
|
48
|
+
* Values outside the range are clamped, and a non-numeric value falls back to
|
|
49
|
+
* `20`.
|
|
50
|
+
*/
|
|
51
|
+
limit?: string;
|
|
52
|
+
/**
|
|
53
|
+
* An inclusive lower bound on `created_at`, as an ISO 8601 date or timestamp (e.g.
|
|
54
|
+
* `2026-08-18` or `2026-08-18T20:06:36.259Z`). Any other format returns `400`.
|
|
55
|
+
*/
|
|
56
|
+
start_date?: string;
|
|
57
|
+
/**
|
|
58
|
+
* A comma-separated list of run statuses to filter on, e.g. `PROCESSED,ERROR`.
|
|
59
|
+
*/
|
|
60
|
+
status?: string;
|
|
61
|
+
/**
|
|
62
|
+
* A comma-separated list of Automation Template ids to filter on.
|
|
63
|
+
*/
|
|
64
|
+
template_id?: string;
|
|
65
|
+
}
|
|
66
|
+
export declare namespace Runs {
|
|
67
|
+
export { type RunListParams as RunListParams };
|
|
68
|
+
}
|
|
69
|
+
//# sourceMappingURL=runs.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runs.d.mts","sourceRoot":"","sources":["../../src/resources/automations/runs.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,KAAK,cAAc,0BAAsB;AAChD,OAAO,EAAE,UAAU,EAAE,mCAA+B;AACpD,OAAO,EAAE,cAAc,EAAE,2CAAuC;AAGhE;;GAEG;AACH,qBAAa,IAAK,SAAQ,WAAW;IACnC;;;;;;;;;;;OAWG;IACH,IAAI,CACF,KAAK,GAAE,aAAa,GAAG,IAAI,GAAG,SAAc,EAC5C,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,cAAc,CAAC,yBAAyB,CAAC;IAIvD;;;;;;;;;;;OAWG;IACH,SAAS,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,cAAc,CAAC,0BAA0B,CAAC;CAGvG;AAED,MAAM,WAAW,aAAa;IAC5B;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,CAAC,OAAO,WAAW,IAAI,CAAC;IAC5B,OAAO,EAAE,KAAK,aAAa,IAAI,aAAa,EAAE,CAAC;CAChD"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { APIResource } from "../../core/resource.js";
|
|
2
|
+
import * as AutomationsAPI from "./automations.js";
|
|
3
|
+
import { APIPromise } from "../../core/api-promise.js";
|
|
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
|
+
*/
|
|
8
|
+
export declare class Runs extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* List runs of the workspace's v2 Automations, newest first, filtered by status,
|
|
11
|
+
* Template, or date range and paged by cursor. Journey (v3) runs are listed by
|
|
12
|
+
* `GET /journeys/runs` instead — the two surfaces never return each other's runs.
|
|
13
|
+
* Runs are retained for 95 days.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```ts
|
|
17
|
+
* const automationRunListResponse =
|
|
18
|
+
* await client.automations.runs.list();
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
list(query?: RunListParams | null | undefined, options?: RequestOptions): APIPromise<AutomationsAPI.AutomationRunListResponse>;
|
|
22
|
+
/**
|
|
23
|
+
* List the per-step state of one Automation run, in full — this endpoint is not
|
|
24
|
+
* paginated. `message_id` is present on send steps that produced a message; follow
|
|
25
|
+
* it to `GET /messages/{message_id}` for delivery status. A send to a List or an
|
|
26
|
+
* Audience yields one `message_id` for the request, not one per recipient.
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```ts
|
|
30
|
+
* const automationRunStepsResponse =
|
|
31
|
+
* await client.automations.runs.listSteps('x');
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
listSteps(id: string, options?: RequestOptions): APIPromise<AutomationsAPI.AutomationRunStepsResponse>;
|
|
35
|
+
}
|
|
36
|
+
export interface RunListParams {
|
|
37
|
+
/**
|
|
38
|
+
* A cursor token for pagination. Use the `next_cursor` from the previous response
|
|
39
|
+
* to fetch the next page of results. Treat it as opaque.
|
|
40
|
+
*/
|
|
41
|
+
cursor?: string;
|
|
42
|
+
/**
|
|
43
|
+
* An inclusive upper bound on `created_at`, in the same format as `start_date`.
|
|
44
|
+
*/
|
|
45
|
+
end_date?: string;
|
|
46
|
+
/**
|
|
47
|
+
* The number of runs to return per page, between `1` and `50`. Defaults to `20`.
|
|
48
|
+
* Values outside the range are clamped, and a non-numeric value falls back to
|
|
49
|
+
* `20`.
|
|
50
|
+
*/
|
|
51
|
+
limit?: string;
|
|
52
|
+
/**
|
|
53
|
+
* An inclusive lower bound on `created_at`, as an ISO 8601 date or timestamp (e.g.
|
|
54
|
+
* `2026-08-18` or `2026-08-18T20:06:36.259Z`). Any other format returns `400`.
|
|
55
|
+
*/
|
|
56
|
+
start_date?: string;
|
|
57
|
+
/**
|
|
58
|
+
* A comma-separated list of run statuses to filter on, e.g. `PROCESSED,ERROR`.
|
|
59
|
+
*/
|
|
60
|
+
status?: string;
|
|
61
|
+
/**
|
|
62
|
+
* A comma-separated list of Automation Template ids to filter on.
|
|
63
|
+
*/
|
|
64
|
+
template_id?: string;
|
|
65
|
+
}
|
|
66
|
+
export declare namespace Runs {
|
|
67
|
+
export { type RunListParams as RunListParams };
|
|
68
|
+
}
|
|
69
|
+
//# sourceMappingURL=runs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runs.d.ts","sourceRoot":"","sources":["../../src/resources/automations/runs.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,KAAK,cAAc,yBAAsB;AAChD,OAAO,EAAE,UAAU,EAAE,kCAA+B;AACpD,OAAO,EAAE,cAAc,EAAE,0CAAuC;AAGhE;;GAEG;AACH,qBAAa,IAAK,SAAQ,WAAW;IACnC;;;;;;;;;;;OAWG;IACH,IAAI,CACF,KAAK,GAAE,aAAa,GAAG,IAAI,GAAG,SAAc,EAC5C,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,cAAc,CAAC,yBAAyB,CAAC;IAIvD;;;;;;;;;;;OAWG;IACH,SAAS,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,cAAc,CAAC,0BAA0B,CAAC;CAGvG;AAED,MAAM,WAAW,aAAa;IAC5B;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,CAAC,OAAO,WAAW,IAAI,CAAC;IAC5B,OAAO,EAAE,KAAK,aAAa,IAAI,aAAa,EAAE,CAAC;CAChD"}
|
|
@@ -0,0 +1,43 @@
|
|
|
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.Runs = void 0;
|
|
5
|
+
const resource_1 = require("../../core/resource.js");
|
|
6
|
+
const path_1 = require("../../internal/utils/path.js");
|
|
7
|
+
/**
|
|
8
|
+
* Invoke a stored automation template or an ad hoc automation defined in the request.
|
|
9
|
+
*/
|
|
10
|
+
class Runs extends resource_1.APIResource {
|
|
11
|
+
/**
|
|
12
|
+
* List runs of the workspace's v2 Automations, newest first, filtered by status,
|
|
13
|
+
* Template, or date range and paged by cursor. Journey (v3) runs are listed by
|
|
14
|
+
* `GET /journeys/runs` instead — the two surfaces never return each other's runs.
|
|
15
|
+
* Runs are retained for 95 days.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```ts
|
|
19
|
+
* const automationRunListResponse =
|
|
20
|
+
* await client.automations.runs.list();
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
list(query = {}, options) {
|
|
24
|
+
return this._client.get('/automations/runs', { query, ...options });
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* List the per-step state of one Automation run, in full — this endpoint is not
|
|
28
|
+
* paginated. `message_id` is present on send steps that produced a message; follow
|
|
29
|
+
* it to `GET /messages/{message_id}` for delivery status. A send to a List or an
|
|
30
|
+
* Audience yields one `message_id` for the request, not one per recipient.
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```ts
|
|
34
|
+
* const automationRunStepsResponse =
|
|
35
|
+
* await client.automations.runs.listSteps('x');
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
listSteps(id, options) {
|
|
39
|
+
return this._client.get((0, path_1.path) `/automations/runs/${id}/steps`, options);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
exports.Runs = Runs;
|
|
43
|
+
//# sourceMappingURL=runs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runs.js","sourceRoot":"","sources":["../../src/resources/automations/runs.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAIlD,uDAAiD;AAEjD;;GAEG;AACH,MAAa,IAAK,SAAQ,sBAAW;IACnC;;;;;;;;;;;OAWG;IACH,IAAI,CACF,QAA0C,EAAE,EAC5C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtE,CAAC;IAED;;;;;;;;;;;OAWG;IACH,SAAS,CAAC,EAAU,EAAE,OAAwB;QAC5C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,qBAAqB,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;IACxE,CAAC;CACF;AAnCD,oBAmCC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
3
|
+
import { path } from "../../internal/utils/path.mjs";
|
|
4
|
+
/**
|
|
5
|
+
* Invoke a stored automation template or an ad hoc automation defined in the request.
|
|
6
|
+
*/
|
|
7
|
+
export class Runs extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* List runs of the workspace's v2 Automations, newest first, filtered by status,
|
|
10
|
+
* Template, or date range and paged by cursor. Journey (v3) runs are listed by
|
|
11
|
+
* `GET /journeys/runs` instead — the two surfaces never return each other's runs.
|
|
12
|
+
* Runs are retained for 95 days.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* const automationRunListResponse =
|
|
17
|
+
* await client.automations.runs.list();
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
list(query = {}, options) {
|
|
21
|
+
return this._client.get('/automations/runs', { query, ...options });
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* List the per-step state of one Automation run, in full — this endpoint is not
|
|
25
|
+
* paginated. `message_id` is present on send steps that produced a message; follow
|
|
26
|
+
* it to `GET /messages/{message_id}` for delivery status. A send to a List or an
|
|
27
|
+
* Audience yields one `message_id` for the request, not one per recipient.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```ts
|
|
31
|
+
* const automationRunStepsResponse =
|
|
32
|
+
* await client.automations.runs.listSteps('x');
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
listSteps(id, options) {
|
|
36
|
+
return this._client.get(path `/automations/runs/${id}/steps`, options);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=runs.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runs.mjs","sourceRoot":"","sources":["../../src/resources/automations/runs.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAIlD,OAAO,EAAE,IAAI,EAAE,sCAAkC;AAEjD;;GAEG;AACH,MAAM,OAAO,IAAK,SAAQ,WAAW;IACnC;;;;;;;;;;;OAWG;IACH,IAAI,CACF,QAA0C,EAAE,EAC5C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtE,CAAC;IAED;;;;;;;;;;;OAWG;IACH,SAAS,CAAC,EAAU,EAAE,OAAwB;QAC5C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,qBAAqB,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;IACxE,CAAC;CACF"}
|
package/resources/index.d.mts
CHANGED
|
@@ -2,13 +2,13 @@ export * from "./shared.mjs";
|
|
|
2
2
|
export { Audiences, type Audience, type AudienceUpdateResponse, type AudienceListResponse, type AudienceListMembersResponse, type AudienceUpdateParams, type AudienceListParams, type AudienceListMembersParams, } from "./audiences.mjs";
|
|
3
3
|
export { AuditEvents, type AuditEvent, type AuditEventListResponse, type AuditEventListParams, } from "./audit-events.mjs";
|
|
4
4
|
export { Auth, type AuthIssueTokenResponse, type AuthIssueTokenParams } from "./auth.mjs";
|
|
5
|
-
export { Automations, type AutomationInvokeResponse, type AutomationTemplate, type AutomationTemplateListResponse, type AutomationListParams, } from "./automations/automations.mjs";
|
|
5
|
+
export { Automations, type AutomationInvokeResponse, type AutomationRunListItem, type AutomationRunListResponse, type AutomationRunStep, type AutomationRunStepsResponse, type AutomationTemplate, type AutomationTemplateListResponse, type AutomationListParams, } from "./automations/automations.mjs";
|
|
6
6
|
export { Brands, type Brand, type BrandColors, type BrandSettings, type BrandSettingsEmail, type BrandSettingsInApp, type BrandSnippet, type BrandSnippets, type BrandTemplate, type EmailFooter, type EmailHead, type EmailHeader, type Icons, type Logo, type WidgetBackground, type BrandListResponse, type BrandCreateParams, type BrandUpdateParams, type BrandListParams, } from "./brands.mjs";
|
|
7
7
|
export { Broadcasts, type Broadcast, type BroadcastListResponse, type BroadcastSchedule, type CreateBroadcastRequest, type ScheduleBroadcastRequest, type SendBroadcastRequest, type UpdateBroadcastRequest, type BroadcastCreateParams, type BroadcastUpdateParams, type BroadcastListParams, type BroadcastPutContentParams, type BroadcastRetrieveContentParams, type BroadcastScheduleParams, type BroadcastSendParams, } from "./broadcasts.mjs";
|
|
8
8
|
export { Bulk, type InboundBulkMessage, type InboundBulkMessageUser, type BulkCreateJobResponse, type BulkListUsersResponse, type BulkRetrieveJobResponse, type BulkAddUsersParams, type BulkCreateJobParams, type BulkListUsersParams, } from "./bulk.mjs";
|
|
9
9
|
export { Digests, type DigestCategory, type DigestInstance, type DigestInstanceListResponse, } from "./digests/digests.mjs";
|
|
10
10
|
export { Inbound, type InboundTrackEventResponse, type InboundTrackEventParams } from "./inbound.mjs";
|
|
11
|
-
export { Journeys, type CancelJourneyRequest, type CancelJourneyResponse, type CreateJourneyRequest, type Journey, type JourneyAINode, type JourneyAPIInvokeTriggerNode, type JourneyConditionAtom, type JourneyConditionGroup, type JourneyConditionNestedGroup, type JourneyConditionsField, type JourneyDelayDurationNode, type JourneyDelayUntilNode, type JourneyExitNode, type JourneyExperiment, type JourneyExperimentVariant, type JourneyFetchGetDeleteNode, type JourneyFetchPostPutNode, type JourneyMergeStrategy, type JourneyNode, type JourneyPublishRequest, type JourneyResponse, type JourneySegmentTriggerNode, type JourneySendNode, type JourneyState, type JourneyTemplateCreateRequest, type JourneyTemplateGetResponse, type JourneyTemplateListResponse, type JourneyTemplatePublishRequest, type JourneyTemplateReplaceRequest, type JourneyTemplateSummary, type JourneyThrottleDynamicNode, type JourneyThrottleStaticNode, type JourneyVersionItem, type JourneyVersionsListResponse, type JourneysInvokeRequest, type JourneysInvokeResponse, type JourneysListResponse, type JourneyCreateParams, type JourneyRetrieveParams, type JourneyListParams, type JourneyCancelParams, type JourneyInvokeParams, type JourneyPublishParams, type JourneyReplaceParams, } from "./journeys/journeys.mjs";
|
|
11
|
+
export { Journeys, type CancelJourneyRequest, type CancelJourneyResponse, type CreateJourneyRequest, type Journey, type JourneyAINode, type JourneyAPIInvokeTriggerNode, type JourneyAudienceTriggerNode, type JourneyConditionAtom, type JourneyConditionGroup, type JourneyConditionNestedGroup, type JourneyConditionsField, type JourneyDelayDurationNode, type JourneyDelayUntilNode, type JourneyExitNode, type JourneyExperiment, type JourneyExperimentVariant, type JourneyFetchGetDeleteNode, type JourneyFetchPostPutNode, type JourneyMergeStrategy, type JourneyNode, type JourneyPublishRequest, type JourneyResponse, type JourneyRun, type JourneyRunListItem, type JourneyRunListResponse, type JourneyRunResponse, type JourneyRunStep, type JourneyRunStepsResponse, type JourneySegmentTriggerNode, type JourneySendNode, type JourneyState, type JourneyTemplateCreateRequest, type JourneyTemplateGetResponse, type JourneyTemplateListResponse, type JourneyTemplatePublishRequest, type JourneyTemplateReplaceRequest, type JourneyTemplateSummary, type JourneyThrottleDynamicNode, type JourneyThrottleStaticNode, type JourneyVersionItem, type JourneyVersionsListResponse, type JourneyWebhookTriggerNode, type JourneysInvokeRequest, type JourneysInvokeResponse, type JourneysListResponse, type JourneyCreateParams, type JourneyRetrieveParams, type JourneyListParams, type JourneyCancelParams, type JourneyInvokeParams, type JourneyPublishParams, type JourneyReplaceParams, } from "./journeys/journeys.mjs";
|
|
12
12
|
export { Lists, type PutSubscriptionsRecipient, type SubscriptionList, type ListListResponse, type ListUpdateParams, type ListListParams, type ListRestoreParams, } from "./lists/lists.mjs";
|
|
13
13
|
export { Messages, type MessageDetails, type MessageRetrieveResponse, type MessageListResponse, type MessageContentResponse, type MessageHistoryResponse, type MessageResendResponse, type MessageListParams, type MessageHistoryParams, } from "./messages.mjs";
|
|
14
14
|
export { Notifications, type BaseCheck, type Check, type ElementWithChecksums, type NotificationContentGetResponse, type NotificationContentMutationResponse, type NotificationContentPutRequest, type NotificationElementPutRequest, type NotificationGetContent, type NotificationLocalePutRequest, type NotificationTemplateAlias, type NotificationTemplateCreateRequest, type NotificationTemplatePayload, type NotificationTemplatePublishRequest, type NotificationTemplateResponse, type NotificationTemplateState, type NotificationTemplateSummary, type NotificationTemplateUpdateRequest, type NotificationTemplateVersionListResponse, type NotificationTemplateWritePayload, type VersionNode, type NotificationListResponse, type NotificationRetrieveContentResponse, type NotificationCreateParams, type NotificationRetrieveParams, type NotificationListParams, type NotificationListVersionsParams, type NotificationPublishParams, type NotificationPutContentParams, type NotificationPutElementParams, type NotificationPutLocaleParams, type NotificationReplaceParams, type NotificationRetrieveContentParams, } from "./notifications/notifications.mjs";
|