@rippling/rippling-sdk 0.2.0-alpha.107 → 0.2.0-alpha.109
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/client.d.mts +10 -1
- package/client.d.mts.map +1 -1
- package/client.d.ts +10 -1
- package/client.d.ts.map +1 -1
- package/client.js +10 -1
- package/client.js.map +1 -1
- package/client.mjs +10 -1
- package/client.mjs.map +1 -1
- package/lib/charts/builders.d.mts +18 -19
- package/lib/charts/builders.d.mts.map +1 -1
- package/lib/charts/builders.d.ts +18 -19
- package/lib/charts/builders.d.ts.map +1 -1
- package/lib/charts/builders.js +35 -28
- package/lib/charts/builders.js.map +1 -1
- package/lib/charts/builders.mjs +35 -28
- package/lib/charts/builders.mjs.map +1 -1
- package/lib/charts/describe.d.mts +6 -7
- package/lib/charts/describe.d.mts.map +1 -1
- package/lib/charts/describe.d.ts +6 -7
- package/lib/charts/describe.d.ts.map +1 -1
- package/lib/charts/describe.js +26 -27
- package/lib/charts/describe.js.map +1 -1
- package/lib/charts/describe.mjs +27 -28
- package/lib/charts/describe.mjs.map +1 -1
- package/lib/charts/errors.d.mts +2 -6
- package/lib/charts/errors.d.mts.map +1 -1
- package/lib/charts/errors.d.ts +2 -6
- package/lib/charts/errors.d.ts.map +1 -1
- package/lib/charts/errors.js +2 -6
- package/lib/charts/errors.js.map +1 -1
- package/lib/charts/errors.mjs +2 -6
- package/lib/charts/errors.mjs.map +1 -1
- package/lib/charts/evaluate.d.mts +5 -7
- package/lib/charts/evaluate.d.mts.map +1 -1
- package/lib/charts/evaluate.d.ts +5 -7
- package/lib/charts/evaluate.d.ts.map +1 -1
- package/lib/charts/evaluate.js +21 -35
- package/lib/charts/evaluate.js.map +1 -1
- package/lib/charts/evaluate.mjs +22 -36
- package/lib/charts/evaluate.mjs.map +1 -1
- package/lib/charts/schema.d.mts +8 -97
- package/lib/charts/schema.d.mts.map +1 -1
- package/lib/charts/schema.d.ts +8 -97
- package/lib/charts/schema.d.ts.map +1 -1
- package/lib/charts/schema.js +186 -65
- package/lib/charts/schema.js.map +1 -1
- package/lib/charts/schema.mjs +185 -65
- package/lib/charts/schema.mjs.map +1 -1
- package/lib/charts/types.d.mts +40 -25
- package/lib/charts/types.d.mts.map +1 -1
- package/lib/charts/types.d.ts +40 -25
- package/lib/charts/types.d.ts.map +1 -1
- package/lib/charts/types.js +8 -10
- package/lib/charts/types.js.map +1 -1
- package/lib/charts/types.mjs +8 -10
- package/lib/charts/types.mjs.map +1 -1
- package/lib/charts/visualization-grammar.d.mts +66 -0
- package/lib/charts/visualization-grammar.d.mts.map +1 -0
- package/lib/charts/visualization-grammar.d.ts +66 -0
- package/lib/charts/visualization-grammar.d.ts.map +1 -0
- package/lib/charts/visualization-grammar.js +70 -0
- package/lib/charts/visualization-grammar.js.map +1 -0
- package/lib/charts/visualization-grammar.mjs +67 -0
- package/lib/charts/visualization-grammar.mjs.map +1 -0
- package/lib/charts/vocabulary.d.mts +7 -0
- package/lib/charts/vocabulary.d.mts.map +1 -0
- package/lib/charts/vocabulary.d.ts +7 -0
- package/lib/charts/vocabulary.d.ts.map +1 -0
- package/lib/charts/vocabulary.js +10 -0
- package/lib/charts/vocabulary.js.map +1 -0
- package/lib/charts/vocabulary.mjs +7 -0
- package/lib/charts/vocabulary.mjs.map +1 -0
- package/lib/charts.d.mts +3 -3
- package/lib/charts.d.mts.map +1 -1
- package/lib/charts.d.ts +3 -3
- package/lib/charts.d.ts.map +1 -1
- package/lib/charts.js +2 -1
- package/lib/charts.js.map +1 -1
- package/lib/charts.mjs +1 -1
- package/lib/charts.mjs.map +1 -1
- package/package.json +4 -2
- package/resources/card-transactions.d.mts +579 -0
- package/resources/card-transactions.d.mts.map +1 -0
- package/resources/card-transactions.d.ts +579 -0
- package/resources/card-transactions.d.ts.map +1 -0
- package/resources/card-transactions.js +116 -0
- package/resources/card-transactions.js.map +1 -0
- package/resources/card-transactions.mjs +112 -0
- package/resources/card-transactions.mjs.map +1 -0
- package/resources/earning-types.d.mts +50 -10
- package/resources/earning-types.d.mts.map +1 -1
- package/resources/earning-types.d.ts +50 -10
- package/resources/earning-types.d.ts.map +1 -1
- package/resources/earning-types.js +21 -2
- package/resources/earning-types.js.map +1 -1
- package/resources/earning-types.mjs +21 -2
- package/resources/earning-types.mjs.map +1 -1
- package/resources/index.d.mts +4 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +4 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +10 -4
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +4 -1
- package/resources/index.mjs.map +1 -1
- package/resources/reimbursements.d.mts +954 -0
- package/resources/reimbursements.d.mts.map +1 -0
- package/resources/reimbursements.d.ts +954 -0
- package/resources/reimbursements.d.ts.map +1 -0
- package/resources/reimbursements.js +140 -0
- package/resources/reimbursements.js.map +1 -0
- package/resources/reimbursements.mjs +136 -0
- package/resources/reimbursements.mjs.map +1 -0
- package/resources/spend-categories.d.mts +140 -0
- package/resources/spend-categories.d.mts.map +1 -0
- package/resources/spend-categories.d.ts +140 -0
- package/resources/spend-categories.d.ts.map +1 -0
- package/resources/spend-categories.js +83 -0
- package/resources/spend-categories.js.map +1 -0
- package/resources/spend-categories.mjs +79 -0
- package/resources/spend-categories.mjs.map +1 -0
- package/resources/workflows/executions.d.mts +153 -0
- package/resources/workflows/executions.d.mts.map +1 -0
- package/resources/workflows/executions.d.ts +153 -0
- package/resources/workflows/executions.d.ts.map +1 -0
- package/resources/workflows/executions.js +74 -0
- package/resources/workflows/executions.js.map +1 -0
- package/resources/workflows/executions.mjs +70 -0
- package/resources/workflows/executions.mjs.map +1 -0
- package/resources/workflows/index.d.mts +3 -0
- package/resources/workflows/index.d.mts.map +1 -0
- package/resources/workflows/index.d.ts +3 -0
- package/resources/workflows/index.d.ts.map +1 -0
- package/resources/workflows/index.js +9 -0
- package/resources/workflows/index.js.map +1 -0
- package/resources/workflows/index.mjs +4 -0
- package/resources/workflows/index.mjs.map +1 -0
- package/resources/workflows/workflows.d.mts +977 -0
- package/resources/workflows/workflows.d.mts.map +1 -0
- package/resources/workflows/workflows.d.ts +977 -0
- package/resources/workflows/workflows.d.ts.map +1 -0
- package/resources/workflows/workflows.js +246 -0
- package/resources/workflows/workflows.js.map +1 -0
- package/resources/workflows/workflows.mjs +241 -0
- package/resources/workflows/workflows.mjs.map +1 -0
- package/resources/workflows.d.mts +1 -972
- package/resources/workflows.d.mts.map +1 -1
- package/resources/workflows.d.ts +1 -972
- package/resources/workflows.d.ts.map +1 -1
- package/resources/workflows.js +2 -234
- package/resources/workflows.js.map +1 -1
- package/resources/workflows.mjs +1 -232
- package/resources/workflows.mjs.map +1 -1
- package/src/client.ts +63 -12
- package/src/lib/charts/README.md +35 -28
- package/src/lib/charts/agent-reference.md +73 -0
- package/src/lib/charts/builders.ts +51 -35
- package/src/lib/charts/capabilities.json +96 -0
- package/src/lib/charts/describe.ts +31 -29
- package/src/lib/charts/errors.ts +2 -6
- package/src/lib/charts/evaluate.ts +25 -38
- package/src/lib/charts/schema.ts +232 -66
- package/src/lib/charts/types.ts +42 -31
- package/src/lib/charts/visualization-grammar.ts +67 -0
- package/src/lib/charts/vocabulary.ts +7 -0
- package/src/lib/charts.ts +8 -1
- package/src/resources/card-transactions.ts +718 -0
- package/src/resources/earning-types.ts +52 -10
- package/src/resources/index.ts +22 -1
- package/src/resources/reimbursements.ts +1157 -0
- package/src/resources/spend-categories.ts +175 -0
- package/src/resources/workflows/executions.ts +191 -0
- package/src/resources/workflows/index.ts +15 -0
- package/src/resources/workflows/workflows.ts +1661 -0
- package/src/resources/workflows.ts +1 -1647
- 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
- package/lib/charts/guards.d.mts +0 -15
- package/lib/charts/guards.d.mts.map +0 -1
- package/lib/charts/guards.d.ts +0 -15
- package/lib/charts/guards.d.ts.map +0 -1
- package/lib/charts/guards.js +0 -38
- package/lib/charts/guards.js.map +0 -1
- package/lib/charts/guards.mjs +0 -34
- package/lib/charts/guards.mjs.map +0 -1
- package/src/lib/charts/guards.ts +0 -42
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../core/resource';
|
|
4
|
+
import * as BusinessPartnersAPI from './business-partners';
|
|
5
|
+
import { APIPromise } from '../core/api-promise';
|
|
6
|
+
import { PageCursorURL, PagePromise } from '../core/pagination';
|
|
7
|
+
import { RequestOptions } from '../internal/request-options';
|
|
8
|
+
import { path } from '../internal/utils/path';
|
|
9
|
+
|
|
10
|
+
export class SpendCategories extends APIResource {
|
|
11
|
+
/**
|
|
12
|
+
* A list of spend categories.
|
|
13
|
+
*
|
|
14
|
+
* - Requires: `Internal Testing`
|
|
15
|
+
* - Filterable fields: `name`
|
|
16
|
+
* - Sortable fields: `id`, `created_at`, `updated_at`
|
|
17
|
+
*
|
|
18
|
+
* @example HTTP
|
|
19
|
+
* Representative request and response shapes.
|
|
20
|
+
* ```
|
|
21
|
+
* GET /spend-categories/?filter=filter&order_by=order_by&limit=50&cursor=cursor HTTP/1.1
|
|
22
|
+
* Host: rest.ripplingapis.com
|
|
23
|
+
* Accept: application/json
|
|
24
|
+
* Rippling-Api-Version: 2024-08-01
|
|
25
|
+
*
|
|
26
|
+
* HTTP/1.1 200 OK
|
|
27
|
+
* Content-Type: application/json
|
|
28
|
+
*
|
|
29
|
+
* {
|
|
30
|
+
* "__meta": {
|
|
31
|
+
* "redacted_fields": [
|
|
32
|
+
* {
|
|
33
|
+
* "name": "date_of_birth",
|
|
34
|
+
* "reason": "Insufficient entitlements"
|
|
35
|
+
* }
|
|
36
|
+
* ]
|
|
37
|
+
* },
|
|
38
|
+
* "results": [
|
|
39
|
+
* {
|
|
40
|
+
* "id": "string",
|
|
41
|
+
* "created_at": "string",
|
|
42
|
+
* "updated_at": "string",
|
|
43
|
+
* "name": "string",
|
|
44
|
+
* "active": false
|
|
45
|
+
* }
|
|
46
|
+
* ],
|
|
47
|
+
* "next_link": "string"
|
|
48
|
+
* }
|
|
49
|
+
* ```
|
|
50
|
+
*/
|
|
51
|
+
list(
|
|
52
|
+
query: SpendCategoryListParams | null | undefined = {},
|
|
53
|
+
options?: RequestOptions,
|
|
54
|
+
): PagePromise<SpendCategoryListResponsesPageCursorURL, SpendCategoryListResponse> {
|
|
55
|
+
return this._client.getAPIList('/spend-categories/', PageCursorURL<SpendCategoryListResponse>, {
|
|
56
|
+
query,
|
|
57
|
+
...options,
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Retrieve a specific spend category
|
|
63
|
+
*
|
|
64
|
+
* @example HTTP
|
|
65
|
+
* Representative request and response shapes.
|
|
66
|
+
* ```
|
|
67
|
+
* GET /spend-categories/{id}/ HTTP/1.1
|
|
68
|
+
* Host: rest.ripplingapis.com
|
|
69
|
+
* Accept: application/json
|
|
70
|
+
* Rippling-Api-Version: 2024-08-01
|
|
71
|
+
*
|
|
72
|
+
* HTTP/1.1 200 OK
|
|
73
|
+
* Content-Type: application/json
|
|
74
|
+
*
|
|
75
|
+
* {
|
|
76
|
+
* "__meta": {
|
|
77
|
+
* "redacted_fields": [
|
|
78
|
+
* {}
|
|
79
|
+
* ]
|
|
80
|
+
* }
|
|
81
|
+
* }
|
|
82
|
+
* ```
|
|
83
|
+
*/
|
|
84
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<SpendCategoryRetrieveResponse> {
|
|
85
|
+
return this._client.get(path`/spend-categories/${id}/`, options);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export type SpendCategoryListResponsesPageCursorURL = PageCursorURL<SpendCategoryListResponse>;
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* A Spend category used to classify transaction line items.
|
|
93
|
+
*
|
|
94
|
+
* Inactive categories are included so historical transactions can still resolve their category.
|
|
95
|
+
*/
|
|
96
|
+
export interface SpendCategoryListResponse {
|
|
97
|
+
/**
|
|
98
|
+
* Identifier field
|
|
99
|
+
*/
|
|
100
|
+
id: string;
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Record creation date
|
|
104
|
+
*/
|
|
105
|
+
created_at: string;
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Record update date
|
|
109
|
+
*/
|
|
110
|
+
updated_at: string;
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Whether the category is active. Inactive categories remain available for
|
|
114
|
+
* historical references.
|
|
115
|
+
*/
|
|
116
|
+
active?: boolean;
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Name of the Spend category.
|
|
120
|
+
*/
|
|
121
|
+
name?: string;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Meta information for the response.
|
|
126
|
+
*/
|
|
127
|
+
export interface SpendCategoryRetrieveResponse extends BusinessPartnersAPI.Meta {
|
|
128
|
+
/**
|
|
129
|
+
* Identifier field
|
|
130
|
+
*/
|
|
131
|
+
id: string;
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Record creation date
|
|
135
|
+
*/
|
|
136
|
+
created_at: string;
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Record update date
|
|
140
|
+
*/
|
|
141
|
+
updated_at: string;
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* Whether the category is active. Inactive categories remain available for
|
|
145
|
+
* historical references.
|
|
146
|
+
*/
|
|
147
|
+
active?: boolean;
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* Name of the Spend category.
|
|
151
|
+
*/
|
|
152
|
+
name?: string;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export interface SpendCategoryListParams {
|
|
156
|
+
cursor?: string;
|
|
157
|
+
|
|
158
|
+
filter?: string;
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* The maximum number of results to return. Defaults to 50. Maximum is 100.
|
|
162
|
+
*/
|
|
163
|
+
limit?: number;
|
|
164
|
+
|
|
165
|
+
order_by?: string;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
export declare namespace SpendCategories {
|
|
169
|
+
export {
|
|
170
|
+
type SpendCategoryListResponse as SpendCategoryListResponse,
|
|
171
|
+
type SpendCategoryRetrieveResponse as SpendCategoryRetrieveResponse,
|
|
172
|
+
type SpendCategoryListResponsesPageCursorURL as SpendCategoryListResponsesPageCursorURL,
|
|
173
|
+
type SpendCategoryListParams as SpendCategoryListParams,
|
|
174
|
+
};
|
|
175
|
+
}
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../core/resource';
|
|
4
|
+
import { APIPromise } from '../../core/api-promise';
|
|
5
|
+
import { RequestOptions } from '../../internal/request-options';
|
|
6
|
+
import { path } from '../../internal/utils/path';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Execute workflow actions like sending emails, Slack messages, and notifications
|
|
10
|
+
*/
|
|
11
|
+
export class Executions extends APIResource {
|
|
12
|
+
/**
|
|
13
|
+
* Launches a new execution of the workflow's current published version. The
|
|
14
|
+
* workflow must use a manual trigger and be published and enabled, and the
|
|
15
|
+
* caller's role must have permission to run it. The request body must be empty:
|
|
16
|
+
* manual workflow executions accept no input parameters. Executions are not
|
|
17
|
+
* idempotent: every successful call starts a real execution with real side effects
|
|
18
|
+
* (messages, callbacks), and a duplicate request starts a second execution. Do not
|
|
19
|
+
* retry automatically; check an execution's status with GET
|
|
20
|
+
* /workflows/{id}/executions/{execution_id} instead.
|
|
21
|
+
*
|
|
22
|
+
* @example HTTP
|
|
23
|
+
* Representative request and response shapes.
|
|
24
|
+
* ```
|
|
25
|
+
* POST /workflows/{id}/executions/ HTTP/1.1
|
|
26
|
+
* Host: rest.ripplingapis.com
|
|
27
|
+
* Accept: application/json
|
|
28
|
+
* Rippling-Api-Version: 2024-08-01
|
|
29
|
+
*
|
|
30
|
+
* HTTP/1.1 201 Created
|
|
31
|
+
* Content-Type: application/json
|
|
32
|
+
*
|
|
33
|
+
* {
|
|
34
|
+
* "id": "string",
|
|
35
|
+
* "workflow_id": "string",
|
|
36
|
+
* "version_id": "string",
|
|
37
|
+
* "status": "pending",
|
|
38
|
+
* "created_at": "2025-01-01T00:00:00Z"
|
|
39
|
+
* }
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
create(id: string, options?: RequestOptions): APIPromise<ExecutionCreateResponse> {
|
|
43
|
+
return this._client.post(path`/workflows/${id}/executions/`, options);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Returns a workflow execution's current status. Poll until the status reaches a
|
|
48
|
+
* terminal value (`completed`, `failed`, or `cancelled`); all other values are
|
|
49
|
+
* transitional.
|
|
50
|
+
*
|
|
51
|
+
* @example HTTP
|
|
52
|
+
* Representative request and response shapes.
|
|
53
|
+
* ```
|
|
54
|
+
* GET /workflows/{id}/executions/{execution_id}/ HTTP/1.1
|
|
55
|
+
* Host: rest.ripplingapis.com
|
|
56
|
+
* Accept: application/json
|
|
57
|
+
* Rippling-Api-Version: 2024-08-01
|
|
58
|
+
*
|
|
59
|
+
* HTTP/1.1 200 OK
|
|
60
|
+
* Content-Type: application/json
|
|
61
|
+
*
|
|
62
|
+
* {
|
|
63
|
+
* "id": "string",
|
|
64
|
+
* "workflow_id": "string",
|
|
65
|
+
* "version_id": "string",
|
|
66
|
+
* "status": "pending",
|
|
67
|
+
* "created_at": "2025-01-01T00:00:00Z"
|
|
68
|
+
* }
|
|
69
|
+
* ```
|
|
70
|
+
*/
|
|
71
|
+
retrieve(id: string, executionID: string, options?: RequestOptions): APIPromise<ExecutionRetrieveResponse> {
|
|
72
|
+
return this._client.get(path`/workflows/${id}/executions/${executionID}/`, options);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* A single execution of a workflow: one launch of the workflow's current published
|
|
78
|
+
* version, with a status to poll until it reaches a terminal value.
|
|
79
|
+
*/
|
|
80
|
+
export interface ExecutionCreateResponse {
|
|
81
|
+
/**
|
|
82
|
+
* Unique identifier for this workflow execution. Poll it with GET
|
|
83
|
+
* /workflows/{id}/executions/{execution_id}.
|
|
84
|
+
*/
|
|
85
|
+
id: string;
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* When the workflow was launched, in UTC (ISO 8601).
|
|
89
|
+
*/
|
|
90
|
+
created_at: string;
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* The execution status. Transitional values are `pending`, `in_progress`,
|
|
94
|
+
* `waiting_for_response`, and `cancellation_pending`; terminal values are
|
|
95
|
+
* `completed`, `failed`, and `cancelled`. Poll until the status reaches a terminal
|
|
96
|
+
* value.
|
|
97
|
+
*
|
|
98
|
+
* - `pending`: The execution is queued and has not started.
|
|
99
|
+
* - `in_progress`: The workflow is executing.
|
|
100
|
+
* - `waiting_for_response`: The execution is paused on a human input or approval
|
|
101
|
+
* step.
|
|
102
|
+
* - `cancellation_pending`: A cancellation was requested and is being applied.
|
|
103
|
+
* - `completed`: Every step finished successfully.
|
|
104
|
+
* - `failed`: The execution stopped on an error.
|
|
105
|
+
* - `cancelled`: The execution was cancelled before completing.
|
|
106
|
+
* - `unknown`: The status could not be mapped. Contact support if this persists.
|
|
107
|
+
*/
|
|
108
|
+
status:
|
|
109
|
+
| 'pending'
|
|
110
|
+
| 'in_progress'
|
|
111
|
+
| 'completed'
|
|
112
|
+
| 'failed'
|
|
113
|
+
| 'cancelled'
|
|
114
|
+
| 'cancellation_pending'
|
|
115
|
+
| 'waiting_for_response'
|
|
116
|
+
| 'unknown';
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* The workflow version that ran. An execution always runs the workflow's current
|
|
120
|
+
* published version; the current version_id is available from GET /workflows/{id}.
|
|
121
|
+
*/
|
|
122
|
+
version_id: string;
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* The ID of the workflow this execution belongs to. Matches the {id} path
|
|
126
|
+
* parameter.
|
|
127
|
+
*/
|
|
128
|
+
workflow_id: string;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* A single execution of a workflow: one launch of the workflow's current published
|
|
133
|
+
* version, with a status to poll until it reaches a terminal value.
|
|
134
|
+
*/
|
|
135
|
+
export interface ExecutionRetrieveResponse {
|
|
136
|
+
/**
|
|
137
|
+
* Unique identifier for this workflow execution. Poll it with GET
|
|
138
|
+
* /workflows/{id}/executions/{execution_id}.
|
|
139
|
+
*/
|
|
140
|
+
id: string;
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* When the workflow was launched, in UTC (ISO 8601).
|
|
144
|
+
*/
|
|
145
|
+
created_at: string;
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* The execution status. Transitional values are `pending`, `in_progress`,
|
|
149
|
+
* `waiting_for_response`, and `cancellation_pending`; terminal values are
|
|
150
|
+
* `completed`, `failed`, and `cancelled`. Poll until the status reaches a terminal
|
|
151
|
+
* value.
|
|
152
|
+
*
|
|
153
|
+
* - `pending`: The execution is queued and has not started.
|
|
154
|
+
* - `in_progress`: The workflow is executing.
|
|
155
|
+
* - `waiting_for_response`: The execution is paused on a human input or approval
|
|
156
|
+
* step.
|
|
157
|
+
* - `cancellation_pending`: A cancellation was requested and is being applied.
|
|
158
|
+
* - `completed`: Every step finished successfully.
|
|
159
|
+
* - `failed`: The execution stopped on an error.
|
|
160
|
+
* - `cancelled`: The execution was cancelled before completing.
|
|
161
|
+
* - `unknown`: The status could not be mapped. Contact support if this persists.
|
|
162
|
+
*/
|
|
163
|
+
status:
|
|
164
|
+
| 'pending'
|
|
165
|
+
| 'in_progress'
|
|
166
|
+
| 'completed'
|
|
167
|
+
| 'failed'
|
|
168
|
+
| 'cancelled'
|
|
169
|
+
| 'cancellation_pending'
|
|
170
|
+
| 'waiting_for_response'
|
|
171
|
+
| 'unknown';
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* The workflow version that ran. An execution always runs the workflow's current
|
|
175
|
+
* published version; the current version_id is available from GET /workflows/{id}.
|
|
176
|
+
*/
|
|
177
|
+
version_id: string;
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* The ID of the workflow this execution belongs to. Matches the {id} path
|
|
181
|
+
* parameter.
|
|
182
|
+
*/
|
|
183
|
+
workflow_id: string;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
export declare namespace Executions {
|
|
187
|
+
export {
|
|
188
|
+
type ExecutionCreateResponse as ExecutionCreateResponse,
|
|
189
|
+
type ExecutionRetrieveResponse as ExecutionRetrieveResponse,
|
|
190
|
+
};
|
|
191
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
export { Executions, type ExecutionCreateResponse, type ExecutionRetrieveResponse } from './executions';
|
|
4
|
+
export {
|
|
5
|
+
Workflows,
|
|
6
|
+
type WorkflowListResponse,
|
|
7
|
+
type WorkflowCreateResponse,
|
|
8
|
+
type WorkflowRetrieveResponse,
|
|
9
|
+
type WorkflowUpdateResponse,
|
|
10
|
+
type WorkflowListParams,
|
|
11
|
+
type WorkflowCreateParams,
|
|
12
|
+
type WorkflowRetrieveParams,
|
|
13
|
+
type WorkflowUpdateParams,
|
|
14
|
+
type WorkflowListResponsesPageCursorURL,
|
|
15
|
+
} from './workflows';
|