@runwayml/sdk 3.15.1 → 3.17.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.
Files changed (85) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/client.d.mts +8 -2
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +8 -2
  5. package/client.d.ts.map +1 -1
  6. package/client.js +6 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +6 -0
  9. package/client.mjs.map +1 -1
  10. package/index.d.mts +1 -1
  11. package/index.d.mts.map +1 -1
  12. package/index.d.ts +1 -1
  13. package/index.d.ts.map +1 -1
  14. package/index.js +3 -1
  15. package/index.js.map +1 -1
  16. package/index.mjs +1 -1
  17. package/index.mjs.map +1 -1
  18. package/lib/polling.d.mts +22 -0
  19. package/lib/polling.d.mts.map +1 -1
  20. package/lib/polling.d.ts +22 -0
  21. package/lib/polling.d.ts.map +1 -1
  22. package/lib/polling.js +54 -1
  23. package/lib/polling.js.map +1 -1
  24. package/lib/polling.mjs +50 -0
  25. package/lib/polling.mjs.map +1 -1
  26. package/package.json +1 -1
  27. package/resources/documents.d.mts +23 -1
  28. package/resources/documents.d.mts.map +1 -1
  29. package/resources/documents.d.ts +23 -1
  30. package/resources/documents.d.ts.map +1 -1
  31. package/resources/documents.js +18 -0
  32. package/resources/documents.js.map +1 -1
  33. package/resources/documents.mjs +18 -0
  34. package/resources/documents.mjs.map +1 -1
  35. package/resources/image-to-video.d.mts +41 -41
  36. package/resources/image-to-video.d.mts.map +1 -1
  37. package/resources/image-to-video.d.ts +41 -41
  38. package/resources/image-to-video.d.ts.map +1 -1
  39. package/resources/index.d.mts +3 -1
  40. package/resources/index.d.mts.map +1 -1
  41. package/resources/index.d.ts +3 -1
  42. package/resources/index.d.ts.map +1 -1
  43. package/resources/index.js +5 -1
  44. package/resources/index.js.map +1 -1
  45. package/resources/index.mjs +2 -0
  46. package/resources/index.mjs.map +1 -1
  47. package/resources/organization.d.mts +2 -2
  48. package/resources/organization.d.mts.map +1 -1
  49. package/resources/organization.d.ts +2 -2
  50. package/resources/organization.d.ts.map +1 -1
  51. package/resources/realtime-sessions.d.mts +10 -0
  52. package/resources/realtime-sessions.d.mts.map +1 -1
  53. package/resources/realtime-sessions.d.ts +10 -0
  54. package/resources/realtime-sessions.d.ts.map +1 -1
  55. package/resources/workflow-invocations.d.mts +195 -0
  56. package/resources/workflow-invocations.d.mts.map +1 -0
  57. package/resources/workflow-invocations.d.ts +195 -0
  58. package/resources/workflow-invocations.d.ts.map +1 -0
  59. package/resources/workflow-invocations.js +19 -0
  60. package/resources/workflow-invocations.js.map +1 -0
  61. package/resources/workflow-invocations.mjs +15 -0
  62. package/resources/workflow-invocations.mjs.map +1 -0
  63. package/resources/workflows.d.mts +171 -0
  64. package/resources/workflows.d.mts.map +1 -0
  65. package/resources/workflows.d.ts +171 -0
  66. package/resources/workflows.d.ts.map +1 -0
  67. package/resources/workflows.js +31 -0
  68. package/resources/workflows.js.map +1 -0
  69. package/resources/workflows.mjs +27 -0
  70. package/resources/workflows.mjs.map +1 -0
  71. package/src/client.ts +27 -0
  72. package/src/index.ts +3 -0
  73. package/src/lib/polling.ts +81 -0
  74. package/src/resources/documents.ts +36 -0
  75. package/src/resources/image-to-video.ts +48 -48
  76. package/src/resources/index.ts +9 -0
  77. package/src/resources/organization.ts +2 -0
  78. package/src/resources/realtime-sessions.ts +12 -0
  79. package/src/resources/workflow-invocations.ts +236 -0
  80. package/src/resources/workflows.ts +222 -0
  81. package/src/version.ts +1 -1
  82. package/version.d.mts +1 -1
  83. package/version.d.ts +1 -1
  84. package/version.js +1 -1
  85. 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.15.1'; // x-release-please-version
1
+ export const VERSION = '3.17.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "3.15.1";
1
+ export declare const VERSION = "3.17.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "3.15.1";
1
+ export declare const VERSION = "3.17.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '3.15.1'; // x-release-please-version
4
+ exports.VERSION = '3.17.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '3.15.1'; // x-release-please-version
1
+ export const VERSION = '3.17.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map