@runwayml/sdk 3.16.0 → 3.18.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 +46 -0
- package/client.d.mts +6 -0
- package/client.d.mts.map +1 -1
- package/client.d.ts +6 -0
- package/client.d.ts.map +1 -1
- package/client.js +6 -0
- package/client.js.map +1 -1
- package/client.mjs +6 -0
- package/client.mjs.map +1 -1
- package/index.d.mts +1 -1
- package/index.d.mts.map +1 -1
- package/index.d.ts +1 -1
- package/index.d.ts.map +1 -1
- package/index.js +3 -1
- package/index.js.map +1 -1
- package/index.mjs +1 -1
- package/index.mjs.map +1 -1
- package/lib/polling.d.mts +22 -0
- package/lib/polling.d.mts.map +1 -1
- package/lib/polling.d.ts +22 -0
- package/lib/polling.d.ts.map +1 -1
- package/lib/polling.js +54 -1
- package/lib/polling.js.map +1 -1
- package/lib/polling.mjs +50 -0
- package/lib/polling.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/index.d.mts +2 -0
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +2 -0
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +5 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +2 -0
- package/resources/index.mjs.map +1 -1
- package/resources/realtime-sessions.d.mts +274 -0
- package/resources/realtime-sessions.d.mts.map +1 -1
- package/resources/realtime-sessions.d.ts +274 -0
- package/resources/realtime-sessions.d.ts.map +1 -1
- package/resources/workflow-invocations.d.mts +195 -0
- package/resources/workflow-invocations.d.mts.map +1 -0
- package/resources/workflow-invocations.d.ts +195 -0
- package/resources/workflow-invocations.d.ts.map +1 -0
- package/resources/workflow-invocations.js +19 -0
- package/resources/workflow-invocations.js.map +1 -0
- package/resources/workflow-invocations.mjs +15 -0
- package/resources/workflow-invocations.mjs.map +1 -0
- package/resources/workflows.d.mts +171 -0
- package/resources/workflows.d.mts.map +1 -0
- package/resources/workflows.d.ts +171 -0
- package/resources/workflows.d.ts.map +1 -0
- package/resources/workflows.js +31 -0
- package/resources/workflows.js.map +1 -0
- package/resources/workflows.mjs +27 -0
- package/resources/workflows.mjs.map +1 -0
- package/src/client.ts +25 -0
- package/src/index.ts +3 -0
- package/src/lib/polling.ts +81 -0
- package/src/resources/index.ts +8 -0
- package/src/resources/realtime-sessions.ts +354 -0
- package/src/resources/workflow-invocations.ts +236 -0
- package/src/resources/workflows.ts +222 -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,222 @@
|
|
|
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
|
+
export class Workflows extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Returns details about a specific published workflow, including its graph schema.
|
|
11
|
+
*/
|
|
12
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<WorkflowRetrieveResponse> {
|
|
13
|
+
return this._client.get(path`/v1/workflows/${id}`, options);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Returns a list of all published workflows for the authenticated user, grouped by
|
|
18
|
+
* source workflow with their published versions.
|
|
19
|
+
*/
|
|
20
|
+
list(options?: RequestOptions): APIPromise<WorkflowListResponse> {
|
|
21
|
+
return this._client.get('/v1/workflows', options);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Start a new task to execute a published workflow. You can optionally provide
|
|
26
|
+
* custom input values via `nodeOutputs` to override the defaults defined in the
|
|
27
|
+
* workflow graph.
|
|
28
|
+
*/
|
|
29
|
+
run(
|
|
30
|
+
id: string,
|
|
31
|
+
body: WorkflowRunParams | null | undefined = {},
|
|
32
|
+
options?: RequestOptions,
|
|
33
|
+
): APIPromise<WorkflowRunResponse> {
|
|
34
|
+
return this._client.post(path`/v1/workflows/${id}`, { body, ...options });
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface WorkflowRetrieveResponse {
|
|
39
|
+
/**
|
|
40
|
+
* The globally unique ID of the published workflow.
|
|
41
|
+
*/
|
|
42
|
+
id: string;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* When this version was published
|
|
46
|
+
*/
|
|
47
|
+
createdAt: string;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* The description of the published workflow.
|
|
51
|
+
*/
|
|
52
|
+
description: string | null;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* The workflow graph definition.
|
|
56
|
+
*/
|
|
57
|
+
graph: WorkflowRetrieveResponse.Graph;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* The name of the published workflow.
|
|
61
|
+
*/
|
|
62
|
+
name: string;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* When this version was last updated
|
|
66
|
+
*/
|
|
67
|
+
updatedAt: string;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* A monotonically increasing version number. Each workflow version for the same
|
|
71
|
+
* published workflow has a unique version number.
|
|
72
|
+
*/
|
|
73
|
+
version: number;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export namespace WorkflowRetrieveResponse {
|
|
77
|
+
/**
|
|
78
|
+
* The workflow graph definition.
|
|
79
|
+
*/
|
|
80
|
+
export interface Graph {
|
|
81
|
+
/**
|
|
82
|
+
* The list of edges connecting nodes in the workflow graph.
|
|
83
|
+
*/
|
|
84
|
+
edges: Array<unknown>;
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* The list of nodes in the workflow graph.
|
|
88
|
+
*/
|
|
89
|
+
nodes: Array<unknown>;
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* The schema version of the workflow graph format.
|
|
93
|
+
*/
|
|
94
|
+
version: number;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export interface WorkflowListResponse {
|
|
99
|
+
/**
|
|
100
|
+
* A list of published workflows grouped by source workflow.
|
|
101
|
+
*/
|
|
102
|
+
data: Array<WorkflowListResponse.Data>;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export namespace WorkflowListResponse {
|
|
106
|
+
/**
|
|
107
|
+
* A published workflow with all its available versions.
|
|
108
|
+
*/
|
|
109
|
+
export interface Data {
|
|
110
|
+
/**
|
|
111
|
+
* The name of the published workflow.
|
|
112
|
+
*/
|
|
113
|
+
name: string;
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* The published versions of this workflow, newest first.
|
|
117
|
+
*/
|
|
118
|
+
versions: Array<Data.Version>;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export namespace Data {
|
|
122
|
+
/**
|
|
123
|
+
* A specific published version of a workflow.
|
|
124
|
+
*/
|
|
125
|
+
export interface Version {
|
|
126
|
+
/**
|
|
127
|
+
* The globally unique ID of this published workflow version.
|
|
128
|
+
*/
|
|
129
|
+
id: string;
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* When this version was published
|
|
133
|
+
*/
|
|
134
|
+
createdAt: string;
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* A monotonically increasing version number. Each workflow version for the same
|
|
138
|
+
* published workflow has a unique version number.
|
|
139
|
+
*/
|
|
140
|
+
version: number;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export interface WorkflowRunResponse {
|
|
146
|
+
/**
|
|
147
|
+
* The ID of the workflow invocation that was created.
|
|
148
|
+
*/
|
|
149
|
+
id: string;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
export interface WorkflowRunParams {
|
|
153
|
+
/**
|
|
154
|
+
* Optional node outputs to override default values. Keys are node IDs from the
|
|
155
|
+
* workflow graph, values are objects mapping output keys to typed values.
|
|
156
|
+
*/
|
|
157
|
+
nodeOutputs?: {
|
|
158
|
+
[key: string]: {
|
|
159
|
+
[key: string]:
|
|
160
|
+
| WorkflowRunParams.Primitive
|
|
161
|
+
| WorkflowRunParams.Image
|
|
162
|
+
| WorkflowRunParams.Video
|
|
163
|
+
| WorkflowRunParams.Audio;
|
|
164
|
+
};
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
export namespace WorkflowRunParams {
|
|
169
|
+
/**
|
|
170
|
+
* A primitive value (string, number, or boolean)
|
|
171
|
+
*/
|
|
172
|
+
export interface Primitive {
|
|
173
|
+
type: 'primitive';
|
|
174
|
+
|
|
175
|
+
value: string | number | boolean;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* An image asset
|
|
180
|
+
*/
|
|
181
|
+
export interface Image {
|
|
182
|
+
type: 'image';
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* A HTTPS URL.
|
|
186
|
+
*/
|
|
187
|
+
uri: string;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* A video asset
|
|
192
|
+
*/
|
|
193
|
+
export interface Video {
|
|
194
|
+
type: 'video';
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* A HTTPS URL.
|
|
198
|
+
*/
|
|
199
|
+
uri: string;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* An audio asset
|
|
204
|
+
*/
|
|
205
|
+
export interface Audio {
|
|
206
|
+
type: 'audio';
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* A HTTPS URL.
|
|
210
|
+
*/
|
|
211
|
+
uri: string;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
export declare namespace Workflows {
|
|
216
|
+
export {
|
|
217
|
+
type WorkflowRetrieveResponse as WorkflowRetrieveResponse,
|
|
218
|
+
type WorkflowListResponse as WorkflowListResponse,
|
|
219
|
+
type WorkflowRunResponse as WorkflowRunResponse,
|
|
220
|
+
type WorkflowRunParams as WorkflowRunParams,
|
|
221
|
+
};
|
|
222
|
+
}
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '3.
|
|
1
|
+
export const VERSION = '3.18.0'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "3.
|
|
1
|
+
export declare const VERSION = "3.18.0";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "3.
|
|
1
|
+
export declare const VERSION = "3.18.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '3.
|
|
1
|
+
export const VERSION = '3.18.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|