@rippling/rippling-sdk 0.2.0-alpha.107 → 0.2.0-alpha.108
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 +7 -1
- package/client.d.mts.map +1 -1
- package/client.d.ts +7 -1
- package/client.d.ts.map +1 -1
- package/client.js +7 -1
- package/client.js.map +1 -1
- package/client.mjs +7 -1
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- 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 +3 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +3 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +8 -4
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +3 -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/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 +46 -12
- package/src/resources/card-transactions.ts +718 -0
- package/src/resources/earning-types.ts +52 -10
- package/src/resources/index.ts +15 -1
- package/src/resources/reimbursements.ts +1157 -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
|
@@ -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';
|