@runwayml/sdk 4.20.0 → 4.21.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 (58) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/package.json +1 -1
  3. package/resources/image-to-video.d.mts +38 -1
  4. package/resources/image-to-video.d.mts.map +1 -1
  5. package/resources/image-to-video.d.ts +38 -1
  6. package/resources/image-to-video.d.ts.map +1 -1
  7. package/resources/organization/organization.d.mts +6 -4
  8. package/resources/organization/organization.d.mts.map +1 -1
  9. package/resources/organization/organization.d.ts +6 -4
  10. package/resources/organization/organization.d.ts.map +1 -1
  11. package/resources/organization/organization.js.map +1 -1
  12. package/resources/organization/organization.mjs.map +1 -1
  13. package/resources/organization/webapp/audit-logs.d.mts +42 -15
  14. package/resources/organization/webapp/audit-logs.d.mts.map +1 -1
  15. package/resources/organization/webapp/audit-logs.d.ts +42 -15
  16. package/resources/organization/webapp/audit-logs.d.ts.map +1 -1
  17. package/resources/text-to-image.d.mts +142 -47
  18. package/resources/text-to-image.d.mts.map +1 -1
  19. package/resources/text-to-image.d.ts +142 -47
  20. package/resources/text-to-image.d.ts.map +1 -1
  21. package/resources/text-to-speech.d.mts +67 -1
  22. package/resources/text-to-speech.d.mts.map +1 -1
  23. package/resources/text-to-speech.d.ts +67 -1
  24. package/resources/text-to-speech.d.ts.map +1 -1
  25. package/resources/text-to-video.d.mts +17 -1
  26. package/resources/text-to-video.d.mts.map +1 -1
  27. package/resources/text-to-video.d.ts +17 -1
  28. package/resources/text-to-video.d.ts.map +1 -1
  29. package/resources/video-to-hdr.d.mts +19 -10
  30. package/resources/video-to-hdr.d.mts.map +1 -1
  31. package/resources/video-to-hdr.d.ts +19 -10
  32. package/resources/video-to-hdr.d.ts.map +1 -1
  33. package/resources/video-upscale.d.mts +49 -33
  34. package/resources/video-upscale.d.mts.map +1 -1
  35. package/resources/video-upscale.d.ts +49 -33
  36. package/resources/video-upscale.d.ts.map +1 -1
  37. package/resources/workflow-invocations.d.mts +56 -4
  38. package/resources/workflow-invocations.d.mts.map +1 -1
  39. package/resources/workflow-invocations.d.ts +56 -4
  40. package/resources/workflow-invocations.d.ts.map +1 -1
  41. package/resources/workflow-invocations.js +3 -1
  42. package/resources/workflow-invocations.js.map +1 -1
  43. package/resources/workflow-invocations.mjs +3 -1
  44. package/resources/workflow-invocations.mjs.map +1 -1
  45. package/src/resources/image-to-video.ts +46 -1
  46. package/src/resources/organization/organization.ts +14 -2
  47. package/src/resources/organization/webapp/audit-logs.ts +85 -15
  48. package/src/resources/text-to-image.ts +262 -85
  49. package/src/resources/text-to-speech.ts +130 -0
  50. package/src/resources/text-to-video.ts +43 -1
  51. package/src/resources/video-to-hdr.ts +19 -10
  52. package/src/resources/video-upscale.ts +55 -33
  53. package/src/resources/workflow-invocations.ts +63 -4
  54. package/src/version.ts +1 -1
  55. package/version.d.mts +1 -1
  56. package/version.d.ts +1 -1
  57. package/version.js +1 -1
  58. package/version.mjs +1 -1
@@ -53,46 +53,68 @@ export namespace VideoUpscaleCreateResponse {
53
53
  }
54
54
  }
55
55
 
56
- export interface VideoUpscaleCreateParams {
57
- model: 'magnific_video_upscaler_creative';
56
+ export type VideoUpscaleCreateParams =
57
+ | VideoUpscaleCreateParams.MagnificVideoUpscalerCreative
58
+ | VideoUpscaleCreateParams.EnhanceFrameRate;
58
59
 
59
- /**
60
- * A HTTPS URL, Runway upload URI, or base64 data URI (e.g.
61
- * `data:video/mp4;base64,...`, up to 5MB) containing an encoded video. See
62
- * [our docs](/assets/inputs#videos) on video inputs for more information.
63
- */
64
- videoUri: string;
60
+ export declare namespace VideoUpscaleCreateParams {
61
+ export interface MagnificVideoUpscalerCreative {
62
+ model: 'magnific_video_upscaler_creative';
65
63
 
66
- /**
67
- * How much AI-generated detail to add during upscaling, from 0 (faithful) to 100.
68
- */
69
- creativity?: number;
64
+ /**
65
+ * A HTTPS URL, Runway upload URI, or base64 data URI (e.g.
66
+ * `data:video/mp4;base64,...`, up to 5MB) containing an encoded video. See
67
+ * [our docs](/assets/inputs#videos) on video inputs for more information.
68
+ */
69
+ videoUri: string;
70
70
 
71
- /**
72
- * Processing style: `vivid` for enhanced color and detail, `natural` for faithful
73
- * reproduction.
74
- */
75
- flavor?: 'vivid' | 'natural';
71
+ /**
72
+ * How much AI-generated detail to add during upscaling, from 0 (faithful) to 100.
73
+ */
74
+ creativity?: number;
76
75
 
77
- /**
78
- * Whether to increase the output frame rate.
79
- */
80
- fpsBoost?: boolean;
76
+ /**
77
+ * Processing style: `vivid` for enhanced color and detail, `natural` for faithful
78
+ * reproduction.
79
+ */
80
+ flavor?: 'vivid' | 'natural';
81
81
 
82
- /**
83
- * Target output resolution from 720p to 4k. Defaults to `2k`.
84
- */
85
- resolution?: '720p' | '1k' | '2k' | '4k';
82
+ /**
83
+ * Whether to increase the output frame rate.
84
+ */
85
+ fpsBoost?: boolean;
86
86
 
87
- /**
88
- * Sharpness intensity from 0 (none) to 100.
89
- */
90
- sharpen?: number;
87
+ /**
88
+ * Target output resolution from 720p to 4k. Defaults to `2k`.
89
+ */
90
+ resolution?: '720p' | '1k' | '2k' | '4k';
91
91
 
92
- /**
93
- * Grain and texture enhancement from 0 to 100.
94
- */
95
- smartGrain?: number;
92
+ /**
93
+ * Sharpness intensity from 0 (none) to 100.
94
+ */
95
+ sharpen?: number;
96
+
97
+ /**
98
+ * Grain and texture enhancement from 0 to 100.
99
+ */
100
+ smartGrain?: number;
101
+ }
102
+
103
+ export interface EnhanceFrameRate {
104
+ model: 'enhance_frame_rate';
105
+
106
+ /**
107
+ * The output frame rate.
108
+ */
109
+ targetFramerate: '24' | '25' | '30' | '48' | '50' | '60' | '120' | '23_98' | '29_97' | '59_94';
110
+
111
+ /**
112
+ * A HTTPS URL, Runway upload URI, or base64 data URI (e.g.
113
+ * `data:video/mp4;base64,...`, up to 5MB) containing an encoded video. See
114
+ * [our docs](/assets/inputs#videos) on video inputs for more information.
115
+ */
116
+ videoUri: string;
117
+ }
96
118
  }
97
119
 
98
120
  export declare namespace VideoUpscale {
@@ -9,7 +9,9 @@ export class WorkflowInvocations extends APIResource {
9
9
  /**
10
10
  * Return details about a workflow invocation. Consumers of this API should not
11
11
  * expect updates more frequent than once every five seconds for a given workflow
12
- * invocation.
12
+ * invocation. A `SUCCEEDED` invocation may still have had individual nodes fail,
13
+ * so check `nodeErrors` to detect a partial run rather than relying on `status`
14
+ * alone.
13
15
  */
14
16
  retrieve(
15
17
  id: string,
@@ -127,6 +129,14 @@ export namespace WorkflowInvocationRetrieveResponse {
127
129
  */
128
130
  message: string;
129
131
 
132
+ /**
133
+ * A machine-readable error code for the node failure. See
134
+ * https://docs.dev.runwayml.com/errors/task-failures/ for more information. Absent
135
+ * for nodes that failed before generation began, such as an input validation
136
+ * error.
137
+ */
138
+ failureCode?: string;
139
+
130
140
  /**
131
141
  * The human-readable name of the node that errored.
132
142
  */
@@ -156,6 +166,12 @@ export namespace WorkflowInvocationRetrieveResponse {
156
166
 
157
167
  status: 'FAILED';
158
168
 
169
+ /**
170
+ * Omitted until every descendant task is terminal, so a later GET cannot return a
171
+ * larger value.
172
+ */
173
+ cost?: Failed.Cost;
174
+
159
175
  /**
160
176
  * A machine-readable error code for the failure. See
161
177
  * https://docs.dev.runwayml.com/errors/task-failures/ for more information.
@@ -170,12 +186,31 @@ export namespace WorkflowInvocationRetrieveResponse {
170
186
  }
171
187
 
172
188
  export namespace Failed {
189
+ /**
190
+ * Omitted until every descendant task is terminal, so a later GET cannot return a
191
+ * larger value.
192
+ */
193
+ export interface Cost {
194
+ /**
195
+ * Credits charged for this task.
196
+ */
197
+ credits: number;
198
+ }
199
+
173
200
  export interface NodeErrors {
174
201
  /**
175
202
  * A human-readable description of the node error.
176
203
  */
177
204
  message: string;
178
205
 
206
+ /**
207
+ * A machine-readable error code for the node failure. See
208
+ * https://docs.dev.runwayml.com/errors/task-failures/ for more information. Absent
209
+ * for nodes that failed before generation began, such as an input validation
210
+ * error.
211
+ */
212
+ failureCode?: string;
213
+
179
214
  /**
180
215
  * The human-readable name of the node that errored.
181
216
  */
@@ -209,20 +244,44 @@ export namespace WorkflowInvocationRetrieveResponse {
209
244
  status: 'SUCCEEDED';
210
245
 
211
246
  /**
212
- * A record mapping workflow node IDs to their error details. Even when the overall
213
- * workflow succeeds, individual nodes may have encountered non-fatal errors. Only
214
- * present when one or more nodes have errored.
247
+ * Omitted until every descendant task is terminal, so a later GET cannot return a
248
+ * larger value.
249
+ */
250
+ cost?: Succeeded.Cost;
251
+
252
+ /**
253
+ * A record mapping workflow node IDs to their error details. Only present when one
254
+ * or more nodes have errored.
215
255
  */
216
256
  nodeErrors?: { [key: string]: Succeeded.NodeErrors };
217
257
  }
218
258
 
219
259
  export namespace Succeeded {
260
+ /**
261
+ * Omitted until every descendant task is terminal, so a later GET cannot return a
262
+ * larger value.
263
+ */
264
+ export interface Cost {
265
+ /**
266
+ * Credits charged for this task.
267
+ */
268
+ credits: number;
269
+ }
270
+
220
271
  export interface NodeErrors {
221
272
  /**
222
273
  * A human-readable description of the node error.
223
274
  */
224
275
  message: string;
225
276
 
277
+ /**
278
+ * A machine-readable error code for the node failure. See
279
+ * https://docs.dev.runwayml.com/errors/task-failures/ for more information. Absent
280
+ * for nodes that failed before generation began, such as an input validation
281
+ * error.
282
+ */
283
+ failureCode?: string;
284
+
226
285
  /**
227
286
  * The human-readable name of the node that errored.
228
287
  */
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '4.20.0'; // x-release-please-version
1
+ export const VERSION = '4.21.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "4.20.0";
1
+ export declare const VERSION = "4.21.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "4.20.0";
1
+ export declare const VERSION = "4.21.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 = '4.20.0'; // x-release-please-version
4
+ exports.VERSION = '4.21.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '4.20.0'; // x-release-please-version
1
+ export const VERSION = '4.21.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map