@trycourier/courier 9.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 +8 -0
- package/client.d.mts +4 -4
- package/client.d.mts.map +1 -1
- package/client.d.ts +4 -4
- package/client.d.ts.map +1 -1
- package/client.js.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/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 +24 -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/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
|
@@ -0,0 +1,55 @@
|
|
|
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
|
+
* Build, version, publish, invoke, and cancel multi-step notification workflows, along with the templates scoped to them.
|
|
6
|
+
*/
|
|
7
|
+
export class Runs extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Fetch one Journey run by id. Returns `404` for an unknown run, a run belonging
|
|
10
|
+
* to another workspace, a run past the 95-day retention window, or an Automation
|
|
11
|
+
* run id — the same body in every case, so the response never reveals whether a
|
|
12
|
+
* run exists elsewhere.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* const journeyRunResponse =
|
|
17
|
+
* await client.journeys.runs.retrieve('x');
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
retrieve(runID, options) {
|
|
21
|
+
return this._client.get(path `/journeys/runs/${runID}`, options);
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* List runs of the workspace's Journeys, newest first, filtered by status,
|
|
25
|
+
* Journey, or date range and paged by cursor. Runs of v2 Automations are listed by
|
|
26
|
+
* `GET /automations/runs` instead — the two surfaces never return each other's
|
|
27
|
+
* runs. Runs are retained for 95 days.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```ts
|
|
31
|
+
* const journeyRunListResponse =
|
|
32
|
+
* await client.journeys.runs.list();
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
list(query = {}, options) {
|
|
36
|
+
return this._client.get('/journeys/runs', { query, ...options });
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* List the per-node state of one Journey run, in full — this endpoint is not
|
|
40
|
+
* paginated. Each step's `node_id` is the id of the node in the published Journey,
|
|
41
|
+
* so a step maps directly onto the Journey graph. `message_id` is present on send
|
|
42
|
+
* steps that produced a message; follow it to `GET /messages/{message_id}` for
|
|
43
|
+
* delivery status.
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* ```ts
|
|
47
|
+
* const journeyRunStepsResponse =
|
|
48
|
+
* await client.journeys.runs.listSteps('x');
|
|
49
|
+
* ```
|
|
50
|
+
*/
|
|
51
|
+
listSteps(runID, options) {
|
|
52
|
+
return this._client.get(path `/journeys/runs/${runID}/steps`, options);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=runs.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runs.mjs","sourceRoot":"","sources":["../../src/resources/journeys/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,QAAQ,CAAC,KAAa,EAAE,OAAwB;QAC9C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,kBAAkB,KAAK,EAAE,EAAE,OAAO,CAAC,CAAC;IAClE,CAAC;IAED;;;;;;;;;;;OAWG;IACH,IAAI,CACF,QAA0C,EAAE,EAC5C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,gBAAgB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnE,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,SAAS,CAAC,KAAa,EAAE,OAAwB;QAC/C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,kBAAkB,KAAK,QAAQ,EAAE,OAAO,CAAC,CAAC;IACxE,CAAC;CACF"}
|
|
@@ -157,6 +157,18 @@ export interface TopicPreference {
|
|
|
157
157
|
* custom_routing) rather than the topic's default routing.
|
|
158
158
|
*/
|
|
159
159
|
has_custom_routing?: boolean | null;
|
|
160
|
+
/**
|
|
161
|
+
* The unique identifier of the section this topic belongs to. Always present when
|
|
162
|
+
* listing a user's preferences; omitted by the single-topic read when the topic
|
|
163
|
+
* has no resolvable section.
|
|
164
|
+
*/
|
|
165
|
+
section_id?: string;
|
|
166
|
+
/**
|
|
167
|
+
* The display name of the section this topic belongs to. Always present when
|
|
168
|
+
* listing a user's preferences; omitted by the single-topic read when the topic
|
|
169
|
+
* has no resolvable section.
|
|
170
|
+
*/
|
|
171
|
+
section_name?: string;
|
|
160
172
|
}
|
|
161
173
|
export interface PreferenceRetrieveResponse {
|
|
162
174
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preferences.d.mts","sourceRoot":"","sources":["../../src/resources/users/preferences.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,KAAK,MAAM,sBAAkB;AACpC,OAAO,EAAE,UAAU,EAAE,mCAA+B;AAEpD,OAAO,EAAE,cAAc,EAAE,2CAAuC;AAGhE;;GAEG;AACH,qBAAa,WAAY,SAAQ,WAAW;IAC1C;;;;;;;;;;OAUG;IACH,QAAQ,CACN,MAAM,EAAE,MAAM,EACd,KAAK,GAAE,wBAAwB,GAAG,IAAI,GAAG,SAAc,EACvD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,0BAA0B,CAAC;IAIzC;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,WAAW,CACT,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,2BAA2B,EACnC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,6BAA6B,CAAC;IAK5C;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,UAAU,CACR,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,0BAA0B,EAClC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,4BAA4B,CAAC;IAuB3C;;;;;;;;;;OAUG;IACH,WAAW,CACT,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,2BAA2B,EACnC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,IAAI,CAAC;IASnB;;;;;;;;;;;OAWG;IACH,aAAa,CACX,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,6BAA6B,EACrC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,+BAA+B,CAAC;IAK9C;;;;;;;;;;;;;;;;;;;OAmBG;IACH,mBAAmB,CACjB,OAAO,EAAE,MAAM,EACf,MAAM,EA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,CAAC;IAEjD;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAED,yBAAiB,mCAAmC,CAAC;IACnD,UAAiB,KAAK;QACpB;;;;WAIG;QACH,MAAM,EAAE,MAAM,CAAC,gBAAgB,CAAC;QAEhC;;;WAGG;QACH,cAAc,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,qBAAqB,CAAC,GAAG,IAAI,CAAC;QAE5D;;;WAGG;QACH,kBAAkB,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;KACrC;CACF;AAED,MAAM,CAAC,OAAO,WAAW,WAAW,CAAC;IACnC,OAAO,EACL,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,qCAAqC,IAAI,qCAAqC,EACnF,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,mCAAmC,IAAI,mCAAmC,GAChF,CAAC;CACH"}
|
|
@@ -157,6 +157,18 @@ export interface TopicPreference {
|
|
|
157
157
|
* custom_routing) rather than the topic's default routing.
|
|
158
158
|
*/
|
|
159
159
|
has_custom_routing?: boolean | null;
|
|
160
|
+
/**
|
|
161
|
+
* The unique identifier of the section this topic belongs to. Always present when
|
|
162
|
+
* listing a user's preferences; omitted by the single-topic read when the topic
|
|
163
|
+
* has no resolvable section.
|
|
164
|
+
*/
|
|
165
|
+
section_id?: string;
|
|
166
|
+
/**
|
|
167
|
+
* The display name of the section this topic belongs to. Always present when
|
|
168
|
+
* listing a user's preferences; omitted by the single-topic read when the topic
|
|
169
|
+
* has no resolvable section.
|
|
170
|
+
*/
|
|
171
|
+
section_name?: string;
|
|
160
172
|
}
|
|
161
173
|
export interface PreferenceRetrieveResponse {
|
|
162
174
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preferences.d.ts","sourceRoot":"","sources":["../../src/resources/users/preferences.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,KAAK,MAAM,qBAAkB;AACpC,OAAO,EAAE,UAAU,EAAE,kCAA+B;AAEpD,OAAO,EAAE,cAAc,EAAE,0CAAuC;AAGhE;;GAEG;AACH,qBAAa,WAAY,SAAQ,WAAW;IAC1C;;;;;;;;;;OAUG;IACH,QAAQ,CACN,MAAM,EAAE,MAAM,EACd,KAAK,GAAE,wBAAwB,GAAG,IAAI,GAAG,SAAc,EACvD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,0BAA0B,CAAC;IAIzC;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,WAAW,CACT,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,2BAA2B,EACnC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,6BAA6B,CAAC;IAK5C;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,UAAU,CACR,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,0BAA0B,EAClC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,4BAA4B,CAAC;IAuB3C;;;;;;;;;;OAUG;IACH,WAAW,CACT,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,2BAA2B,EACnC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,IAAI,CAAC;IASnB;;;;;;;;;;;OAWG;IACH,aAAa,CACX,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,6BAA6B,EACrC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,+BAA+B,CAAC;IA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AGG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,KAAK,EAAE,mCAAmC,CAAC,KAAK,CAAC;IAEjD;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAED,yBAAiB,mCAAmC,CAAC;IACnD,UAAiB,KAAK;QACpB;;;;WAIG;QACH,MAAM,EAAE,MAAM,CAAC,gBAAgB,CAAC;QAEhC;;;WAGG;QACH,cAAc,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,qBAAqB,CAAC,GAAG,IAAI,CAAC;QAE5D;;;WAGG;QACH,kBAAkB,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;KACrC;CACF;AAED,MAAM,CAAC,OAAO,WAAW,WAAW,CAAC;IACnC,OAAO,EACL,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,qCAAqC,IAAI,qCAAqC,EACnF,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,mCAAmC,IAAI,mCAAmC,GAChF,CAAC;CACH"}
|
package/src/client.ts
CHANGED
|
@@ -119,6 +119,10 @@ import {
|
|
|
119
119
|
import {
|
|
120
120
|
AutomationInvokeResponse,
|
|
121
121
|
AutomationListParams,
|
|
122
|
+
AutomationRunListItem,
|
|
123
|
+
AutomationRunListResponse,
|
|
124
|
+
AutomationRunStep,
|
|
125
|
+
AutomationRunStepsResponse,
|
|
122
126
|
AutomationTemplate,
|
|
123
127
|
AutomationTemplateListResponse,
|
|
124
128
|
Automations,
|
|
@@ -136,6 +140,7 @@ import {
|
|
|
136
140
|
Journey,
|
|
137
141
|
JourneyAINode,
|
|
138
142
|
JourneyAPIInvokeTriggerNode,
|
|
143
|
+
JourneyAudienceTriggerNode,
|
|
139
144
|
JourneyCancelParams,
|
|
140
145
|
JourneyConditionAtom,
|
|
141
146
|
JourneyConditionGroup,
|
|
@@ -158,6 +163,12 @@ import {
|
|
|
158
163
|
JourneyReplaceParams,
|
|
159
164
|
JourneyResponse,
|
|
160
165
|
JourneyRetrieveParams,
|
|
166
|
+
JourneyRun,
|
|
167
|
+
JourneyRunListItem,
|
|
168
|
+
JourneyRunListResponse,
|
|
169
|
+
JourneyRunResponse,
|
|
170
|
+
JourneyRunStep,
|
|
171
|
+
JourneyRunStepsResponse,
|
|
161
172
|
JourneySegmentTriggerNode,
|
|
162
173
|
JourneySendNode,
|
|
163
174
|
JourneyState,
|
|
@@ -171,6 +182,7 @@ import {
|
|
|
171
182
|
JourneyThrottleStaticNode,
|
|
172
183
|
JourneyVersionItem,
|
|
173
184
|
JourneyVersionsListResponse,
|
|
185
|
+
JourneyWebhookTriggerNode,
|
|
174
186
|
Journeys,
|
|
175
187
|
JourneysInvokeRequest,
|
|
176
188
|
JourneysInvokeResponse,
|
|
@@ -1141,6 +1153,10 @@ export declare namespace Courier {
|
|
|
1141
1153
|
export {
|
|
1142
1154
|
Automations as Automations,
|
|
1143
1155
|
type AutomationInvokeResponse as AutomationInvokeResponse,
|
|
1156
|
+
type AutomationRunListItem as AutomationRunListItem,
|
|
1157
|
+
type AutomationRunListResponse as AutomationRunListResponse,
|
|
1158
|
+
type AutomationRunStep as AutomationRunStep,
|
|
1159
|
+
type AutomationRunStepsResponse as AutomationRunStepsResponse,
|
|
1144
1160
|
type AutomationTemplate as AutomationTemplate,
|
|
1145
1161
|
type AutomationTemplateListResponse as AutomationTemplateListResponse,
|
|
1146
1162
|
type AutomationListParams as AutomationListParams,
|
|
@@ -1154,6 +1170,7 @@ export declare namespace Courier {
|
|
|
1154
1170
|
type Journey as Journey,
|
|
1155
1171
|
type JourneyAINode as JourneyAINode,
|
|
1156
1172
|
type JourneyAPIInvokeTriggerNode as JourneyAPIInvokeTriggerNode,
|
|
1173
|
+
type JourneyAudienceTriggerNode as JourneyAudienceTriggerNode,
|
|
1157
1174
|
type JourneyConditionAtom as JourneyConditionAtom,
|
|
1158
1175
|
type JourneyConditionGroup as JourneyConditionGroup,
|
|
1159
1176
|
type JourneyConditionNestedGroup as JourneyConditionNestedGroup,
|
|
@@ -1169,6 +1186,12 @@ export declare namespace Courier {
|
|
|
1169
1186
|
type JourneyNode as JourneyNode,
|
|
1170
1187
|
type JourneyPublishRequest as JourneyPublishRequest,
|
|
1171
1188
|
type JourneyResponse as JourneyResponse,
|
|
1189
|
+
type JourneyRun as JourneyRun,
|
|
1190
|
+
type JourneyRunListItem as JourneyRunListItem,
|
|
1191
|
+
type JourneyRunListResponse as JourneyRunListResponse,
|
|
1192
|
+
type JourneyRunResponse as JourneyRunResponse,
|
|
1193
|
+
type JourneyRunStep as JourneyRunStep,
|
|
1194
|
+
type JourneyRunStepsResponse as JourneyRunStepsResponse,
|
|
1172
1195
|
type JourneySegmentTriggerNode as JourneySegmentTriggerNode,
|
|
1173
1196
|
type JourneySendNode as JourneySendNode,
|
|
1174
1197
|
type JourneyState as JourneyState,
|
|
@@ -1182,6 +1205,7 @@ export declare namespace Courier {
|
|
|
1182
1205
|
type JourneyThrottleStaticNode as JourneyThrottleStaticNode,
|
|
1183
1206
|
type JourneyVersionItem as JourneyVersionItem,
|
|
1184
1207
|
type JourneyVersionsListResponse as JourneyVersionsListResponse,
|
|
1208
|
+
type JourneyWebhookTriggerNode as JourneyWebhookTriggerNode,
|
|
1185
1209
|
type JourneysInvokeRequest as JourneysInvokeRequest,
|
|
1186
1210
|
type JourneysInvokeResponse as JourneysInvokeResponse,
|
|
1187
1211
|
type JourneysListResponse as JourneysListResponse,
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
import { APIResource } from '../../core/resource';
|
|
4
4
|
import * as InvokeAPI from './invoke';
|
|
5
5
|
import { Invoke, InvokeInvokeAdHocParams, InvokeInvokeByTemplateParams } from './invoke';
|
|
6
|
+
import * as RunsAPI from './runs';
|
|
7
|
+
import { RunListParams, Runs } from './runs';
|
|
6
8
|
import { APIPromise } from '../../core/api-promise';
|
|
7
9
|
import { RequestOptions } from '../../internal/request-options';
|
|
8
10
|
|
|
@@ -11,6 +13,7 @@ import { RequestOptions } from '../../internal/request-options';
|
|
|
11
13
|
*/
|
|
12
14
|
export class Automations extends APIResource {
|
|
13
15
|
invoke: InvokeAPI.Invoke = new InvokeAPI.Invoke(this._client);
|
|
16
|
+
runs: RunsAPI.Runs = new RunsAPI.Runs(this._client);
|
|
14
17
|
|
|
15
18
|
/**
|
|
16
19
|
* Lists the workspace's saved automation templates, each with its id and a cursor
|
|
@@ -34,6 +37,97 @@ export interface AutomationInvokeResponse {
|
|
|
34
37
|
runId: string;
|
|
35
38
|
}
|
|
36
39
|
|
|
40
|
+
/**
|
|
41
|
+
* An Automation run as it appears in a list response.
|
|
42
|
+
*/
|
|
43
|
+
export interface AutomationRunListItem {
|
|
44
|
+
/**
|
|
45
|
+
* A unique identifier representing the run.
|
|
46
|
+
*/
|
|
47
|
+
run_id: string;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Internal provenance strings describing what started the run, e.g.
|
|
51
|
+
* `invoke/<template_id>` or `segment/page/Pricing Page`. Diagnostic only — the
|
|
52
|
+
* format is unstable and should not be parsed.
|
|
53
|
+
*/
|
|
54
|
+
source: Array<string>;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* When the run started, as an ISO 8601 timestamp.
|
|
58
|
+
*/
|
|
59
|
+
created_at?: string;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* The state of the run: `PROCESSING`, `PROCESSED`, `WAITING`, `CANCELED`, `ERROR`,
|
|
63
|
+
* `THROTTLED`, or `NOT PROCESSED`. Not an enum — new values have been added
|
|
64
|
+
* before.
|
|
65
|
+
*/
|
|
66
|
+
status?: string;
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* The id of the Automation Template this run belongs to.
|
|
70
|
+
*/
|
|
71
|
+
template_id?: string;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* A page of Automation runs.
|
|
76
|
+
*/
|
|
77
|
+
export interface AutomationRunListResponse {
|
|
78
|
+
runs: Array<AutomationRunListItem>;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Pass back as `cursor` to fetch the next page. Absent on the last page.
|
|
82
|
+
*/
|
|
83
|
+
next_cursor?: string;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* One executed step of an Automation run.
|
|
88
|
+
*/
|
|
89
|
+
export interface AutomationRunStep {
|
|
90
|
+
/**
|
|
91
|
+
* The kind of step that ran, e.g. `send`, `delay`, or `update-profile`.
|
|
92
|
+
*/
|
|
93
|
+
action: string;
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* The state of the step: the seven run statuses, plus `SKIPPED` and `COMPUTING`.
|
|
97
|
+
* Not an enum — new values have been added before.
|
|
98
|
+
*/
|
|
99
|
+
status: string;
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* When the step started, as an ISO 8601 timestamp.
|
|
103
|
+
*/
|
|
104
|
+
created_at?: string;
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* The message this step produced, present on send steps. Pass it to
|
|
108
|
+
* `GET /messages/{message_id}` for delivery status. A send to a List or an
|
|
109
|
+
* Audience yields one id for the request, not one per recipient.
|
|
110
|
+
*/
|
|
111
|
+
message_id?: string;
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* A unique identifier representing the step.
|
|
115
|
+
*/
|
|
116
|
+
step_id?: string;
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* When the step last changed state, as an ISO 8601 timestamp.
|
|
120
|
+
*/
|
|
121
|
+
updated_at?: string;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Every step of an Automation run. Not paginated.
|
|
126
|
+
*/
|
|
127
|
+
export interface AutomationRunStepsResponse {
|
|
128
|
+
steps: Array<AutomationRunStep>;
|
|
129
|
+
}
|
|
130
|
+
|
|
37
131
|
export interface AutomationTemplate {
|
|
38
132
|
/**
|
|
39
133
|
* The unique identifier of the automation template.
|
|
@@ -85,10 +179,15 @@ export interface AutomationListParams {
|
|
|
85
179
|
}
|
|
86
180
|
|
|
87
181
|
Automations.Invoke = Invoke;
|
|
182
|
+
Automations.Runs = Runs;
|
|
88
183
|
|
|
89
184
|
export declare namespace Automations {
|
|
90
185
|
export {
|
|
91
186
|
type AutomationInvokeResponse as AutomationInvokeResponse,
|
|
187
|
+
type AutomationRunListItem as AutomationRunListItem,
|
|
188
|
+
type AutomationRunListResponse as AutomationRunListResponse,
|
|
189
|
+
type AutomationRunStep as AutomationRunStep,
|
|
190
|
+
type AutomationRunStepsResponse as AutomationRunStepsResponse,
|
|
92
191
|
type AutomationTemplate as AutomationTemplate,
|
|
93
192
|
type AutomationTemplateListResponse as AutomationTemplateListResponse,
|
|
94
193
|
type AutomationListParams as AutomationListParams,
|
|
@@ -99,4 +198,6 @@ export declare namespace Automations {
|
|
|
99
198
|
type InvokeInvokeAdHocParams as InvokeInvokeAdHocParams,
|
|
100
199
|
type InvokeInvokeByTemplateParams as InvokeInvokeByTemplateParams,
|
|
101
200
|
};
|
|
201
|
+
|
|
202
|
+
export { Runs as Runs, type RunListParams as RunListParams };
|
|
102
203
|
}
|
|
@@ -3,8 +3,13 @@
|
|
|
3
3
|
export {
|
|
4
4
|
Automations,
|
|
5
5
|
type AutomationInvokeResponse,
|
|
6
|
+
type AutomationRunListItem,
|
|
7
|
+
type AutomationRunListResponse,
|
|
8
|
+
type AutomationRunStep,
|
|
9
|
+
type AutomationRunStepsResponse,
|
|
6
10
|
type AutomationTemplate,
|
|
7
11
|
type AutomationTemplateListResponse,
|
|
8
12
|
type AutomationListParams,
|
|
9
13
|
} from './automations';
|
|
10
14
|
export { Invoke, type InvokeInvokeAdHocParams, type InvokeInvokeByTemplateParams } from './invoke';
|
|
15
|
+
export { Runs, type RunListParams } from './runs';
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../core/resource';
|
|
4
|
+
import * as AutomationsAPI from './automations';
|
|
5
|
+
import { APIPromise } from '../../core/api-promise';
|
|
6
|
+
import { RequestOptions } from '../../internal/request-options';
|
|
7
|
+
import { path } from '../../internal/utils/path';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Invoke a stored automation template or an ad hoc automation defined in the request.
|
|
11
|
+
*/
|
|
12
|
+
export class Runs extends APIResource {
|
|
13
|
+
/**
|
|
14
|
+
* List runs of the workspace's v2 Automations, newest first, filtered by status,
|
|
15
|
+
* Template, or date range and paged by cursor. Journey (v3) runs are listed by
|
|
16
|
+
* `GET /journeys/runs` instead — the two surfaces never return each other's runs.
|
|
17
|
+
* Runs are retained for 95 days.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```ts
|
|
21
|
+
* const automationRunListResponse =
|
|
22
|
+
* await client.automations.runs.list();
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
list(
|
|
26
|
+
query: RunListParams | null | undefined = {},
|
|
27
|
+
options?: RequestOptions,
|
|
28
|
+
): APIPromise<AutomationsAPI.AutomationRunListResponse> {
|
|
29
|
+
return this._client.get('/automations/runs', { query, ...options });
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* List the per-step state of one Automation run, in full — this endpoint is not
|
|
34
|
+
* paginated. `message_id` is present on send steps that produced a message; follow
|
|
35
|
+
* it to `GET /messages/{message_id}` for delivery status. A send to a List or an
|
|
36
|
+
* Audience yields one `message_id` for the request, not one per recipient.
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* ```ts
|
|
40
|
+
* const automationRunStepsResponse =
|
|
41
|
+
* await client.automations.runs.listSteps('x');
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
listSteps(id: string, options?: RequestOptions): APIPromise<AutomationsAPI.AutomationRunStepsResponse> {
|
|
45
|
+
return this._client.get(path`/automations/runs/${id}/steps`, options);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export interface RunListParams {
|
|
50
|
+
/**
|
|
51
|
+
* A cursor token for pagination. Use the `next_cursor` from the previous response
|
|
52
|
+
* to fetch the next page of results. Treat it as opaque.
|
|
53
|
+
*/
|
|
54
|
+
cursor?: string;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* An inclusive upper bound on `created_at`, in the same format as `start_date`.
|
|
58
|
+
*/
|
|
59
|
+
end_date?: string;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* The number of runs to return per page, between `1` and `50`. Defaults to `20`.
|
|
63
|
+
* Values outside the range are clamped, and a non-numeric value falls back to
|
|
64
|
+
* `20`.
|
|
65
|
+
*/
|
|
66
|
+
limit?: string;
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* An inclusive lower bound on `created_at`, as an ISO 8601 date or timestamp (e.g.
|
|
70
|
+
* `2026-08-18` or `2026-08-18T20:06:36.259Z`). Any other format returns `400`.
|
|
71
|
+
*/
|
|
72
|
+
start_date?: string;
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* A comma-separated list of run statuses to filter on, e.g. `PROCESSED,ERROR`.
|
|
76
|
+
*/
|
|
77
|
+
status?: string;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* A comma-separated list of Automation Template ids to filter on.
|
|
81
|
+
*/
|
|
82
|
+
template_id?: string;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export declare namespace Runs {
|
|
86
|
+
export { type RunListParams as RunListParams };
|
|
87
|
+
}
|
package/src/resources/index.ts
CHANGED
|
@@ -21,6 +21,10 @@ export { Auth, type AuthIssueTokenResponse, type AuthIssueTokenParams } from './
|
|
|
21
21
|
export {
|
|
22
22
|
Automations,
|
|
23
23
|
type AutomationInvokeResponse,
|
|
24
|
+
type AutomationRunListItem,
|
|
25
|
+
type AutomationRunListResponse,
|
|
26
|
+
type AutomationRunStep,
|
|
27
|
+
type AutomationRunStepsResponse,
|
|
24
28
|
type AutomationTemplate,
|
|
25
29
|
type AutomationTemplateListResponse,
|
|
26
30
|
type AutomationListParams,
|
|
@@ -89,6 +93,7 @@ export {
|
|
|
89
93
|
type Journey,
|
|
90
94
|
type JourneyAINode,
|
|
91
95
|
type JourneyAPIInvokeTriggerNode,
|
|
96
|
+
type JourneyAudienceTriggerNode,
|
|
92
97
|
type JourneyConditionAtom,
|
|
93
98
|
type JourneyConditionGroup,
|
|
94
99
|
type JourneyConditionNestedGroup,
|
|
@@ -104,6 +109,12 @@ export {
|
|
|
104
109
|
type JourneyNode,
|
|
105
110
|
type JourneyPublishRequest,
|
|
106
111
|
type JourneyResponse,
|
|
112
|
+
type JourneyRun,
|
|
113
|
+
type JourneyRunListItem,
|
|
114
|
+
type JourneyRunListResponse,
|
|
115
|
+
type JourneyRunResponse,
|
|
116
|
+
type JourneyRunStep,
|
|
117
|
+
type JourneyRunStepsResponse,
|
|
107
118
|
type JourneySegmentTriggerNode,
|
|
108
119
|
type JourneySendNode,
|
|
109
120
|
type JourneyState,
|
|
@@ -117,6 +128,7 @@ export {
|
|
|
117
128
|
type JourneyThrottleStaticNode,
|
|
118
129
|
type JourneyVersionItem,
|
|
119
130
|
type JourneyVersionsListResponse,
|
|
131
|
+
type JourneyWebhookTriggerNode,
|
|
120
132
|
type JourneysInvokeRequest,
|
|
121
133
|
type JourneysInvokeResponse,
|
|
122
134
|
type JourneysListResponse,
|
|
@@ -8,6 +8,7 @@ export {
|
|
|
8
8
|
type Journey,
|
|
9
9
|
type JourneyAINode,
|
|
10
10
|
type JourneyAPIInvokeTriggerNode,
|
|
11
|
+
type JourneyAudienceTriggerNode,
|
|
11
12
|
type JourneyConditionAtom,
|
|
12
13
|
type JourneyConditionGroup,
|
|
13
14
|
type JourneyConditionNestedGroup,
|
|
@@ -23,6 +24,12 @@ export {
|
|
|
23
24
|
type JourneyNode,
|
|
24
25
|
type JourneyPublishRequest,
|
|
25
26
|
type JourneyResponse,
|
|
27
|
+
type JourneyRun,
|
|
28
|
+
type JourneyRunListItem,
|
|
29
|
+
type JourneyRunListResponse,
|
|
30
|
+
type JourneyRunResponse,
|
|
31
|
+
type JourneyRunStep,
|
|
32
|
+
type JourneyRunStepsResponse,
|
|
26
33
|
type JourneySegmentTriggerNode,
|
|
27
34
|
type JourneySendNode,
|
|
28
35
|
type JourneyState,
|
|
@@ -36,6 +43,7 @@ export {
|
|
|
36
43
|
type JourneyThrottleStaticNode,
|
|
37
44
|
type JourneyVersionItem,
|
|
38
45
|
type JourneyVersionsListResponse,
|
|
46
|
+
type JourneyWebhookTriggerNode,
|
|
39
47
|
type JourneysInvokeRequest,
|
|
40
48
|
type JourneysInvokeResponse,
|
|
41
49
|
type JourneysListResponse,
|
|
@@ -47,6 +55,7 @@ export {
|
|
|
47
55
|
type JourneyPublishParams,
|
|
48
56
|
type JourneyReplaceParams,
|
|
49
57
|
} from './journeys';
|
|
58
|
+
export { Runs, type RunListParams } from './runs';
|
|
50
59
|
export {
|
|
51
60
|
Templates,
|
|
52
61
|
type TemplateCreateParams,
|