@runwayml/sdk 3.16.0 → 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 (61) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/client.d.mts +6 -0
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +6 -0
  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/index.d.mts +2 -0
  28. package/resources/index.d.mts.map +1 -1
  29. package/resources/index.d.ts +2 -0
  30. package/resources/index.d.ts.map +1 -1
  31. package/resources/index.js +5 -1
  32. package/resources/index.js.map +1 -1
  33. package/resources/index.mjs +2 -0
  34. package/resources/index.mjs.map +1 -1
  35. package/resources/workflow-invocations.d.mts +195 -0
  36. package/resources/workflow-invocations.d.mts.map +1 -0
  37. package/resources/workflow-invocations.d.ts +195 -0
  38. package/resources/workflow-invocations.d.ts.map +1 -0
  39. package/resources/workflow-invocations.js +19 -0
  40. package/resources/workflow-invocations.js.map +1 -0
  41. package/resources/workflow-invocations.mjs +15 -0
  42. package/resources/workflow-invocations.mjs.map +1 -0
  43. package/resources/workflows.d.mts +171 -0
  44. package/resources/workflows.d.mts.map +1 -0
  45. package/resources/workflows.d.ts +171 -0
  46. package/resources/workflows.d.ts.map +1 -0
  47. package/resources/workflows.js +31 -0
  48. package/resources/workflows.js.map +1 -0
  49. package/resources/workflows.mjs +27 -0
  50. package/resources/workflows.mjs.map +1 -0
  51. package/src/client.ts +25 -0
  52. package/src/index.ts +3 -0
  53. package/src/lib/polling.ts +81 -0
  54. package/src/resources/index.ts +8 -0
  55. package/src/resources/workflow-invocations.ts +236 -0
  56. package/src/resources/workflows.ts +222 -0
  57. package/src/version.ts +1 -1
  58. package/version.d.mts +1 -1
  59. package/version.d.ts +1 -1
  60. package/version.js +1 -1
  61. package/version.mjs +1 -1
package/lib/polling.js CHANGED
@@ -1,7 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AbortError = exports.TaskTimedOutError = exports.TaskFailedError = void 0;
3
+ exports.WorkflowInvocationTimedOutError = exports.WorkflowInvocationFailedError = exports.AbortError = exports.TaskTimedOutError = exports.TaskFailedError = void 0;
4
4
  exports.wrapAsWaitableResource = wrapAsWaitableResource;
5
+ exports.wrapAsWaitableWorkflowInvocation = wrapAsWaitableWorkflowInvocation;
5
6
  const POLL_TIME = 6000; // 6 seconds
6
7
  const POLL_JITTER = 3000; // 3 seconds
7
8
  class TaskFailedError extends Error {
@@ -28,6 +29,22 @@ class AbortError extends Error {
28
29
  }
29
30
  }
30
31
  exports.AbortError = AbortError;
32
+ class WorkflowInvocationFailedError extends Error {
33
+ constructor(invocationDetails) {
34
+ super('failure' in invocationDetails ? invocationDetails.failure : 'Workflow invocation cancelled');
35
+ this.invocationDetails = invocationDetails;
36
+ this.name = 'WorkflowInvocationFailedError';
37
+ }
38
+ }
39
+ exports.WorkflowInvocationFailedError = WorkflowInvocationFailedError;
40
+ class WorkflowInvocationTimedOutError extends Error {
41
+ constructor(invocationDetails) {
42
+ super('Workflow invocation timed out');
43
+ this.invocationDetails = invocationDetails;
44
+ this.name = 'WorkflowInvocationTimedOutError';
45
+ }
46
+ }
47
+ exports.WorkflowInvocationTimedOutError = WorkflowInvocationTimedOutError;
31
48
  function wrapAsWaitableResource(client) {
32
49
  return (responsePromise, skipInitialWait = false) => {
33
50
  return Object.defineProperty(responsePromise, 'waitForTaskOutput', {
@@ -64,4 +81,40 @@ function wrapAsWaitableResource(client) {
64
81
  });
65
82
  };
66
83
  }
84
+ function wrapAsWaitableWorkflowInvocation(client) {
85
+ return (responsePromise, skipInitialWait = false) => {
86
+ return Object.defineProperty(responsePromise, 'waitForTaskOutput', {
87
+ value: async (options) => {
88
+ const wait = () => new Promise((resolve) => setTimeout(resolve, POLL_TIME + Math.random() * POLL_JITTER - POLL_JITTER / 2));
89
+ if (!skipInitialWait) {
90
+ await wait();
91
+ }
92
+ const { timeout = 60 * 10 * 1000 } = options ?? {};
93
+ const output = await responsePromise;
94
+ const startTime = Date.now();
95
+ let details;
96
+ do {
97
+ if (options?.abortSignal?.aborted) {
98
+ throw new AbortError();
99
+ }
100
+ details = await client.workflowInvocations.retrieve(output.id);
101
+ if (details.status === 'SUCCEEDED') {
102
+ return details;
103
+ }
104
+ if (details.status === 'FAILED' || details.status === 'CANCELLED') {
105
+ throw new WorkflowInvocationFailedError(details);
106
+ }
107
+ await wait();
108
+ if (timeout != null && Date.now() - startTime > timeout && !options?.abortSignal?.aborted) {
109
+ throw new WorkflowInvocationTimedOutError(details);
110
+ }
111
+ } while (['THROTTLED', 'PENDING', 'RUNNING'].includes(details.status));
112
+ throw new WorkflowInvocationTimedOutError(details);
113
+ },
114
+ writable: false,
115
+ enumerable: false,
116
+ configurable: false,
117
+ });
118
+ };
119
+ }
67
120
  //# sourceMappingURL=polling.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"polling.js","sourceRoot":"","sources":["../src/lib/polling.ts"],"names":[],"mappings":";;;AA+DA,wDA6CC;AAxGD,MAAM,SAAS,GAAG,IAAI,CAAC,CAAC,YAAY;AACpC,MAAM,WAAW,GAAG,IAAI,CAAC,CAAC,YAAY;AAEtC,MAAa,eAAgB,SAAQ,KAAK;IAExC,YAAY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D,GAAG,CAAC;oBACF,IAAI,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,CAAC;wBAClC,MAAM,IAAI,UAAU,EAAE,CAAC;oBACzB,CAAC;oBACD,OAAO,GAAG,MAAM,MAAM,CAAC,mBAAmB,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;oBAC/D,IAAI,OAAO,CAAC,MAAM,KAAK,WAAW,EAAE,CAAC;wBACnC,OAAO,OAAO,CAAC;oBACjB,CAAC;oBACD,IAAI,OAAO,CAAC,MAAM,KAAK,QAAQ,IAAI,OAAO,CAAC,MAAM,KAAK,WAAW,EAAE,CAAC;wBAClE,MAAM,IAAI,6BAA6B,CAAC,OAAO,CAAC,CAAC;oBACnD,CAAC;oBACD,MAAM,IAAI,EAAE,CAAC;oBACb,IAAI,OAAO,IAAI,IAAI,IAAI,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,GAAG,OAAO,IAAI,CAAC,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,CAAC;wBAC1F,MAAM,IAAI,+BAA+B,CAAC,OAAO,CAAC,CAAC;oBACrD,CAAC;gBACH,CAAC,QAAQ,CAAC,WAAW,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;gBACvE,MAAM,IAAI,+BAA+B,CAAC,OAAO,CAAC,CAAC;YACrD,CAAC;YACD,QAAQ,EAAE,KAAK;YACf,UAAU,EAAE,KAAK;YACjB,YAAY,EAAE,KAAK;SACpB,CAEA,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC"}
package/lib/polling.mjs CHANGED
@@ -21,6 +21,20 @@ export class AbortError extends Error {
21
21
  this.name = 'AbortError';
22
22
  }
23
23
  }
24
+ export class WorkflowInvocationFailedError extends Error {
25
+ constructor(invocationDetails) {
26
+ super('failure' in invocationDetails ? invocationDetails.failure : 'Workflow invocation cancelled');
27
+ this.invocationDetails = invocationDetails;
28
+ this.name = 'WorkflowInvocationFailedError';
29
+ }
30
+ }
31
+ export class WorkflowInvocationTimedOutError extends Error {
32
+ constructor(invocationDetails) {
33
+ super('Workflow invocation timed out');
34
+ this.invocationDetails = invocationDetails;
35
+ this.name = 'WorkflowInvocationTimedOutError';
36
+ }
37
+ }
24
38
  export function wrapAsWaitableResource(client) {
25
39
  return (responsePromise, skipInitialWait = false) => {
26
40
  return Object.defineProperty(responsePromise, 'waitForTaskOutput', {
@@ -57,4 +71,40 @@ export function wrapAsWaitableResource(client) {
57
71
  });
58
72
  };
59
73
  }
74
+ export function wrapAsWaitableWorkflowInvocation(client) {
75
+ return (responsePromise, skipInitialWait = false) => {
76
+ return Object.defineProperty(responsePromise, 'waitForTaskOutput', {
77
+ value: async (options) => {
78
+ const wait = () => new Promise((resolve) => setTimeout(resolve, POLL_TIME + Math.random() * POLL_JITTER - POLL_JITTER / 2));
79
+ if (!skipInitialWait) {
80
+ await wait();
81
+ }
82
+ const { timeout = 60 * 10 * 1000 } = options ?? {};
83
+ const output = await responsePromise;
84
+ const startTime = Date.now();
85
+ let details;
86
+ do {
87
+ if (options?.abortSignal?.aborted) {
88
+ throw new AbortError();
89
+ }
90
+ details = await client.workflowInvocations.retrieve(output.id);
91
+ if (details.status === 'SUCCEEDED') {
92
+ return details;
93
+ }
94
+ if (details.status === 'FAILED' || details.status === 'CANCELLED') {
95
+ throw new WorkflowInvocationFailedError(details);
96
+ }
97
+ await wait();
98
+ if (timeout != null && Date.now() - startTime > timeout && !options?.abortSignal?.aborted) {
99
+ throw new WorkflowInvocationTimedOutError(details);
100
+ }
101
+ } while (['THROTTLED', 'PENDING', 'RUNNING'].includes(details.status));
102
+ throw new WorkflowInvocationTimedOutError(details);
103
+ },
104
+ writable: false,
105
+ enumerable: false,
106
+ configurable: false,
107
+ });
108
+ };
109
+ }
60
110
  //# sourceMappingURL=polling.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"polling.mjs","sourceRoot":"","sources":["../src/lib/polling.ts"],"names":[],"mappings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S,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;gBAC7B,IAAI,OAA2C,CAAC;gBAChD,GAAG,CAAC;oBACF,IAAI,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,CAAC;wBAClC,MAAM,IAAI,UAAU,EAAE,CAAC;oBACzB,CAAC;oBACD,OAAO,GAAG,MAAM,MAAM,CAAC,mBAAmB,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;oBAC/D,IAAI,OAAO,CAAC,MAAM,KAAK,WAAW,EAAE,CAAC;wBACnC,OAAO,OAAO,CAAC;oBACjB,CAAC;oBACD,IAAI,OAAO,CAAC,MAAM,KAAK,QAAQ,IAAI,OAAO,CAAC,MAAM,KAAK,WAAW,EAAE,CAAC;wBAClE,MAAM,IAAI,6BAA6B,CAAC,OAAO,CAAC,CAAC;oBACnD,CAAC;oBACD,MAAM,IAAI,EAAE,CAAC;oBACb,IAAI,OAAO,IAAI,IAAI,IAAI,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,GAAG,OAAO,IAAI,CAAC,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,CAAC;wBAC1F,MAAM,IAAI,+BAA+B,CAAC,OAAO,CAAC,CAAC;oBACrD,CAAC;gBACH,CAAC,QAAQ,CAAC,WAAW,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;gBACvE,MAAM,IAAI,+BAA+B,CAAC,OAAO,CAAC,CAAC;YACrD,CAAC;YACD,QAAQ,EAAE,KAAK;YACf,UAAU,EAAE,KAAK;YACjB,YAAY,EAAE,KAAK;SACpB,CAEA,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@runwayml/sdk",
3
- "version": "3.16.0",
3
+ "version": "3.17.0",
4
4
  "description": "The official TypeScript library for the RunwayML API",
5
5
  "author": "RunwayML <dev-feedback@runwayml.com>",
6
6
  "types": "./index.d.ts",
@@ -14,5 +14,7 @@ export { VideoToVideo, type VideoToVideoCreateResponse, type VideoToVideoCreateP
14
14
  export { VoiceDubbing, type VoiceDubbingCreateResponse, type VoiceDubbingCreateParams, } from "./voice-dubbing.mjs";
15
15
  export { VoiceIsolation, type VoiceIsolationCreateResponse, type VoiceIsolationCreateParams, } from "./voice-isolation.mjs";
16
16
  export { Voices, type VoiceCreateResponse, type VoiceRetrieveResponse, type VoiceListResponse, type VoicePreviewResponse, type VoiceCreateParams, type VoiceListParams, type VoicePreviewParams, type VoiceListResponsesCursorPage, } from "./voices.mjs";
17
+ export { WorkflowInvocations, type WorkflowInvocationRetrieveResponse } from "./workflow-invocations.mjs";
18
+ export { Workflows, type WorkflowRetrieveResponse, type WorkflowListResponse, type WorkflowRunResponse, type WorkflowRunParams, } from "./workflows.mjs";
17
19
  export { Uploads, type UploadCreateEphemeralResponse, type UploadsCreateEphemeralParams } from "./uploads.mjs";
18
20
  //# sourceMappingURL=index.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"OAEO,EACL,OAAO,EACP,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,EAC3B,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,6BAA6B,GACnC;OACM,EACL,oBAAoB,EACpB,KAAK,kCAAkC,EACvC,KAAK,gCAAgC,GACtC;OACM,EACL,SAAS,EACT,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,+BAA+B,GACrC;OACM,EACL,YAAY,EACZ,KAAK,0BAA0B,EAC/B,KAAK,wBAAwB,GAC9B;OACM,EACL,YAAY,EACZ,KAAK,4BAA4B,EACjC,KAAK,iCAAiC,EACtC,KAAK,+BAA+B,GACrC;OACM,EACL,gBAAgB,EAChB,KAAK,6BAA6B,EAClC,KAAK,+BAA+B,EACpC,KAAK,2BAA2B,GACjC;OACM,EAAE,WAAW,EAAE,KAAK,yBAAyB,EAAE,KAAK,uBAAuB,EAAE;OAC7E,EACL,cAAc,EACd,KAAK,4BAA4B,EACjC,KAAK,0BAA0B,GAChC;OACM,EAAE,KAAK,EAAE,KAAK,oBAAoB,EAAE;OACpC,EAAE,WAAW,EAAE,KAAK,yBAAyB,EAAE,KAAK,uBAAuB,EAAE;OAC7E,EACL,YAAY,EACZ,KAAK,0BAA0B,EAC/B,KAAK,wBAAwB,GAC9B;OACM,EAAE,WAAW,EAAE,KAAK,yBAAyB,EAAE,KAAK,uBAAuB,EAAE;OAC7E,EACL,YAAY,EACZ,KAAK,0BAA0B,EAC/B,KAAK,wBAAwB,GAC9B;OACM,EACL,YAAY,EACZ,KAAK,0BAA0B,EAC/B,KAAK,wBAAwB,GAC9B;OACM,EACL,cAAc,EACd,KAAK,4BAA4B,EACjC,KAAK,0BAA0B,GAChC;OACM,EACL,MAAM,EACN,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,EACzB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,kBAAkB,EACvB,KAAK,4BAA4B,GAClC;OACM,EAAE,OAAO,EAAE,KAAK,6BAA6B,EAAE,KAAK,4BAA4B,EAAE"}
1
+ {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"OAEO,EACL,OAAO,EACP,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,EAC3B,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,6BAA6B,GACnC;OACM,EACL,oBAAoB,EACpB,KAAK,kCAA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AS,EACT,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,GACvB;OACM,EAAE,OAAO,EAAE,KAAK,6BAA6B,EAAE,KAAK,4BAA4B,EAAE"}
@@ -14,5 +14,7 @@ export { VideoToVideo, type VideoToVideoCreateResponse, type VideoToVideoCreateP
14
14
  export { VoiceDubbing, type VoiceDubbingCreateResponse, type VoiceDubbingCreateParams, } from "./voice-dubbing.js";
15
15
  export { VoiceIsolation, type VoiceIsolationCreateResponse, type VoiceIsolationCreateParams, } from "./voice-isolation.js";
16
16
  export { Voices, type VoiceCreateResponse, type VoiceRetrieveResponse, type VoiceListResponse, type VoicePreviewResponse, type VoiceCreateParams, type VoiceListParams, type VoicePreviewParams, type VoiceListResponsesCursorPage, } from "./voices.js";
17
+ export { WorkflowInvocations, type WorkflowInvocationRetrieveResponse } from "./workflow-invocations.js";
18
+ export { Workflows, type WorkflowRetrieveResponse, type WorkflowListResponse, type WorkflowRunResponse, type WorkflowRunParams, } from "./workflows.js";
17
19
  export { Uploads, type UploadCreateEphemeralResponse, type UploadsCreateEphemeralParams } from "./uploads.js";
18
20
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"OAEO,EACL,OAAO,EACP,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,EAC3B,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,6BAA6B,GACnC;OACM,EACL,oBAAoB,EACpB,KAAK,kCAAkC,EACvC,KAAK,gCAAgC,GACtC;OACM,EACL,SAAS,EACT,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,+BAA+B,GACrC;OACM,EACL,YAAY,EACZ,KAAK,0BAA0B,EAC/B,KAAK,wBAAwB,GAC9B;OACM,EACL,YAAY,EACZ,KAAK,4BAA4B,EACjC,KAAK,iCAAiC,EACtC,KAAK,+BAA+B,GACrC;OACM,EACL,gBAAgB,EAChB,KAAK,6BAA6B,EAClC,KAAK,+BAA+B,EACpC,KAAK,2BAA2B,GACjC;OACM,EAAE,WAAW,EAAE,KAAK,yBAAyB,EAAE,KAAK,uBAAuB,EAAE;OAC7E,EACL,cAAc,EACd,KAAK,4BAA4B,EACjC,KAAK,0BAA0B,GAChC;OACM,EAAE,KAAK,EAAE,KAAK,oBAAoB,EAAE;OACpC,EAAE,WAAW,EAAE,KAAK,yBAAyB,EAAE,KAAK,uBAAuB,EAAE;OAC7E,EACL,YAAY,EACZ,KAAK,0BAA0B,EAC/B,KAAK,wBAAwB,GAC9B;OACM,EAAE,WAAW,EAAE,KAAK,yBAAyB,EAAE,KAAK,uBAAuB,EAAE;OAC7E,EACL,YAAY,EACZ,KAAK,0BAA0B,EAC/B,KAAK,wBAAwB,GAC9B;OACM,EACL,YAAY,EACZ,KAAK,0BAA0B,EAC/B,KAAK,wBAAwB,GAC9B;OACM,EACL,cAAc,EACd,KAAK,4BAA4B,EACjC,KAAK,0BAA0B,GAChC;OACM,EACL,MAAM,EACN,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,EACzB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,kBAAkB,EACvB,KAAK,4BAA4B,GAClC;OACM,EAAE,OAAO,EAAE,KAAK,6BAA6B,EAAE,KAAK,4BAA4B,EAAE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"OAEO,EACL,OAAO,EACP,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,EAC3B,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB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KAAK,eAAe,EACpB,KAAK,kBAAkB,EACvB,KAAK,4BAA4B,GAClC;OACM,EAAE,mBAAmB,EAAE,KAAK,kCAAkC,EAAE;OAChE,EACL,SAAS,EACT,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,GACvB;OACM,EAAE,OAAO,EAAE,KAAK,6BAA6B,EAAE,KAAK,4BAA4B,EAAE"}
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.Uploads = exports.Voices = exports.VoiceIsolation = exports.VoiceDubbing = exports.VideoToVideo = exports.TextToVideo = exports.TextToSpeech = exports.TextToImage = exports.Tasks = exports.SpeechToSpeech = exports.SoundEffect = exports.RealtimeSessions = exports.Organization = exports.ImageToVideo = exports.Documents = exports.CharacterPerformance = exports.Avatars = void 0;
4
+ exports.Uploads = exports.Workflows = exports.WorkflowInvocations = exports.Voices = exports.VoiceIsolation = exports.VoiceDubbing = exports.VideoToVideo = exports.TextToVideo = exports.TextToSpeech = exports.TextToImage = exports.Tasks = exports.SpeechToSpeech = exports.SoundEffect = exports.RealtimeSessions = exports.Organization = exports.ImageToVideo = exports.Documents = exports.CharacterPerformance = exports.Avatars = void 0;
5
5
  var avatars_1 = require("./avatars.js");
6
6
  Object.defineProperty(exports, "Avatars", { enumerable: true, get: function () { return avatars_1.Avatars; } });
7
7
  var character_performance_1 = require("./character-performance.js");
@@ -34,6 +34,10 @@ var voice_isolation_1 = require("./voice-isolation.js");
34
34
  Object.defineProperty(exports, "VoiceIsolation", { enumerable: true, get: function () { return voice_isolation_1.VoiceIsolation; } });
35
35
  var voices_1 = require("./voices.js");
36
36
  Object.defineProperty(exports, "Voices", { enumerable: true, get: function () { return voices_1.Voices; } });
37
+ var workflow_invocations_1 = require("./workflow-invocations.js");
38
+ Object.defineProperty(exports, "WorkflowInvocations", { enumerable: true, get: function () { return workflow_invocations_1.WorkflowInvocations; } });
39
+ var workflows_1 = require("./workflows.js");
40
+ Object.defineProperty(exports, "Workflows", { enumerable: true, get: function () { return workflows_1.Workflows; } });
37
41
  var uploads_1 = require("./uploads.js");
38
42
  Object.defineProperty(exports, "Uploads", { enumerable: true, get: function () { return uploads_1.Uploads; } });
39
43
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wCAUmB;AATjB,kGAAA,OAAO,OAAA;AAUT,oEAIiC;AAH/B,6HAAA,oBAAoB,OAAA;AAItB,4CASqB;AARnB,sGAAA,SAAS,OAAA;AASX,sDAI0B;AAHxB,8GAAA,YAAY,OAAA;AAId,kDAKwB;AAJtB,4GAAA,YAAY,OAAA;AAKd,4DAK6B;AAJ3B,qHAAA,gBAAgB,OAAA;AAKlB,kDAA2G;AAAlG,2GAAA,WAAW,OAAA;AACpB,0DAI4B;AAH1B,kHAAA,cAAc,OAAA;AAIhB,oCAA2D;AAAlD,8FAAA,KAAK,OAAA;AACd,oDAA4G;AAAnG,4GAAA,WAAW,OAAA;AACpB,sDAI0B;AAHxB,8GAAA,YAAY,OAAA;AAId,oDAA4G;AAAnG,4GAAA,WAAW,OAAA;AACpB,sDAI0B;AAHxB,8GAAA,YAAY,OAAA;AAId,oDAIyB;AAHvB,6GAAA,YAAY,OAAA;AAId,wDAI2B;AAHzB,iHAAA,cAAc,OAAA;AAIhB,sCAUkB;AAThB,gGAAA,MAAM,OAAA;AAUR,wCAA2G;AAAlG,kGAAA,OAAO,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wCAUmB;AATjB,kGAAA,OAAO,OAAA;AAUT,oEAIiC;AAH/B,6HAAA,oBAAoB,OAAA;AAItB,4CASqB;AARnB,sGAAA,SAAS,OAAA;AASX,sDAI0B;AAHxB,8GAAA,YAAY,OAAA;AAId,kDAKwB;AAJtB,4GAAA,YAAY,OAAA;AAKd,4DAK6B;AAJ3B,qHAAA,gBAAgB,OAAA;AAKlB,kDAA2G;AAAlG,2GAAA,WAAW,OAAA;AACpB,0DAI4B;AAH1B,kHAAA,cAAc,OAAA;AAIhB,oCAA2D;AAAlD,8FAAA,KAAK,OAAA;AACd,oDAA4G;AAAnG,4GAAA,WAAW,OAAA;AACpB,sDAI0B;AAHxB,8GAAA,YAAY,OAAA;AAId,oDAA4G;AAAnG,4GAAA,WAAW,OAAA;AACpB,sDAI0B;AAHxB,8GAAA,YAAY,OAAA;AAId,oDAIyB;AAHvB,6GAAA,YAAY,OAAA;AAId,wDAI2B;AAHzB,iHAAA,cAAc,OAAA;AAIhB,sCAUkB;AAThB,gGAAA,MAAM,OAAA;AAUR,kEAAsG;AAA7F,2HAAA,mBAAmB,OAAA;AAC5B,4CAMqB;AALnB,sGAAA,SAAS,OAAA;AAMX,wCAA2G;AAAlG,kGAAA,OAAO,OAAA"}
@@ -15,5 +15,7 @@ export { VideoToVideo, } from "./video-to-video.mjs";
15
15
  export { VoiceDubbing, } from "./voice-dubbing.mjs";
16
16
  export { VoiceIsolation, } from "./voice-isolation.mjs";
17
17
  export { Voices, } from "./voices.mjs";
18
+ export { WorkflowInvocations } from "./workflow-invocations.mjs";
19
+ export { Workflows, } from "./workflows.mjs";
18
20
  export { Uploads } from "./uploads.mjs";
19
21
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,OAAO,GASR;OACM,EACL,oBAAoB,GAGrB;OACM,EACL,SAAS,GAQV;OACM,EACL,YAAY,GAGb;OACM,EACL,YAAY,GAIb;OACM,EACL,gBAAgB,GAIjB;OACM,EAAE,WAAW,EAAgE;OAC7E,EACL,cAAc,GAGf;OACM,EAAE,KAAK,EAA6B;OACpC,EAAE,WAAW,EAAgE;OAC7E,EACL,YAAY,GAGb;OACM,EAAE,WAAW,EAAgE;OAC7E,EACL,YAAY,GAGb;OACM,EACL,YAAY,GAGb;OACM,EACL,cAAc,GAGf;OACM,EACL,MAAM,GASP;OACM,EAAE,OAAO,EAAyE"}
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,OAAO,GASR;OACM,EACL,oBAAoB,GAGrB;OACM,EACL,SAAS,GAQV;OACM,EACL,YAAY,GAGb;OACM,EACL,YAAY,GAIb;OACM,EACL,gBAAgB,GAIjB;OACM,EAAE,WAAW,EAAgE;OAC7E,EACL,cAAc,GAGf;OACM,EAAE,KAAK,EAA6B;OACpC,EAAE,WAAW,EAAgE;OAC7E,EACL,YAAY,GAGb;OACM,EAAE,WAAW,EAAgE;OAC7E,EACL,YAAY,GAGb;OACM,EACL,YAAY,GAGb;OACM,EACL,cAAc,GAGf;OACM,EACL,MAAM,GASP;OACM,EAAE,mBAAmB,EAA2C;OAChE,EACL,SAAS,GAKV;OACM,EAAE,OAAO,EAAyE"}
@@ -0,0 +1,195 @@
1
+ import { APIResource } from "../core/resource.mjs";
2
+ import { RequestOptions } from "../internal/request-options.mjs";
3
+ import { APIPromiseWithAwaitableWorkflowInvocation } from "../lib/polling.mjs";
4
+ export declare class WorkflowInvocations extends APIResource {
5
+ /**
6
+ * Return details about a workflow invocation. Consumers of this API should not
7
+ * expect updates more frequent than once every five seconds for a given workflow
8
+ * invocation.
9
+ */
10
+ retrieve(id: string, options?: RequestOptions): APIPromiseWithAwaitableWorkflowInvocation<WorkflowInvocationRetrieveResponse>;
11
+ }
12
+ /**
13
+ * A pending workflow invocation
14
+ */
15
+ export type WorkflowInvocationRetrieveResponse = WorkflowInvocationRetrieveResponse.Pending | WorkflowInvocationRetrieveResponse.Throttled | WorkflowInvocationRetrieveResponse.Cancelled | WorkflowInvocationRetrieveResponse.Running | WorkflowInvocationRetrieveResponse.Failed | WorkflowInvocationRetrieveResponse.Succeeded;
16
+ export declare namespace WorkflowInvocationRetrieveResponse {
17
+ /**
18
+ * A pending workflow invocation
19
+ */
20
+ interface Pending {
21
+ /**
22
+ * The ID of the workflow invocation being returned.
23
+ */
24
+ id: string;
25
+ /**
26
+ * The timestamp that the workflow invocation was submitted at.
27
+ */
28
+ createdAt: string;
29
+ status: 'PENDING';
30
+ }
31
+ /**
32
+ * A throttled workflow invocation
33
+ */
34
+ interface Throttled {
35
+ /**
36
+ * The ID of the workflow invocation being returned.
37
+ */
38
+ id: string;
39
+ /**
40
+ * The timestamp that the workflow invocation was submitted at.
41
+ */
42
+ createdAt: string;
43
+ status: 'THROTTLED';
44
+ }
45
+ /**
46
+ * A cancelled or deleted workflow invocation
47
+ */
48
+ interface Cancelled {
49
+ /**
50
+ * The ID of the workflow invocation being returned.
51
+ */
52
+ id: string;
53
+ /**
54
+ * The timestamp that the workflow invocation was submitted at.
55
+ */
56
+ createdAt: string;
57
+ status: 'CANCELLED';
58
+ }
59
+ /**
60
+ * A running workflow invocation
61
+ */
62
+ interface Running {
63
+ /**
64
+ * The ID of the workflow invocation being returned.
65
+ */
66
+ id: string;
67
+ /**
68
+ * The timestamp that the workflow invocation was submitted at.
69
+ */
70
+ createdAt: string;
71
+ /**
72
+ * A record mapping workflow node IDs to arrays of output URLs for nodes that have
73
+ * already completed. This allows streaming partial results while the workflow is
74
+ * still running.
75
+ */
76
+ output: {
77
+ [key: string]: Array<string>;
78
+ };
79
+ /**
80
+ * A number between 0 and 1 representing the overall workflow execution progress.
81
+ */
82
+ progress: number;
83
+ status: 'RUNNING';
84
+ /**
85
+ * A record mapping workflow node IDs to their error details. Only present when one
86
+ * or more nodes have errored.
87
+ */
88
+ nodeErrors?: {
89
+ [key: string]: Running.NodeErrors;
90
+ };
91
+ }
92
+ namespace Running {
93
+ interface NodeErrors {
94
+ /**
95
+ * A human-readable description of the node error.
96
+ */
97
+ message: string;
98
+ /**
99
+ * The human-readable name of the node that errored.
100
+ */
101
+ nodeName?: string;
102
+ }
103
+ }
104
+ /**
105
+ * A failed workflow invocation
106
+ */
107
+ interface Failed {
108
+ /**
109
+ * The ID of the workflow invocation being returned.
110
+ */
111
+ id: string;
112
+ /**
113
+ * The timestamp that the workflow invocation was submitted at.
114
+ */
115
+ createdAt: string;
116
+ /**
117
+ * A human-friendly reason for the failure. We do not recommend returning this to
118
+ * users directly without adding context.
119
+ */
120
+ failure: string;
121
+ status: 'FAILED';
122
+ /**
123
+ * A machine-readable error code for the failure. See
124
+ * https://docs.dev.runwayml.com/errors/task-failures/ for more information.
125
+ */
126
+ failureCode?: string;
127
+ /**
128
+ * A record mapping workflow node IDs to their error details. Only present when one
129
+ * or more nodes have errored.
130
+ */
131
+ nodeErrors?: {
132
+ [key: string]: Failed.NodeErrors;
133
+ };
134
+ }
135
+ namespace Failed {
136
+ interface NodeErrors {
137
+ /**
138
+ * A human-readable description of the node error.
139
+ */
140
+ message: string;
141
+ /**
142
+ * The human-readable name of the node that errored.
143
+ */
144
+ nodeName?: string;
145
+ }
146
+ }
147
+ /**
148
+ * A succeeded workflow invocation
149
+ */
150
+ interface Succeeded {
151
+ /**
152
+ * The ID of the workflow invocation being returned.
153
+ */
154
+ id: string;
155
+ /**
156
+ * The timestamp that the workflow invocation was submitted at.
157
+ */
158
+ createdAt: string;
159
+ /**
160
+ * A record mapping workflow node IDs to arrays of output URLs. Each key is the
161
+ * UUID of a workflow node that produced output, and each value is an array of URLs
162
+ * for that node's artifacts. These URLs will expire within 24-48 hours; fetch the
163
+ * invocation again to get fresh URLs. It is expected that you download the assets
164
+ * at these URLs and store them in your own storage system.
165
+ */
166
+ output: {
167
+ [key: string]: Array<string>;
168
+ };
169
+ status: 'SUCCEEDED';
170
+ /**
171
+ * A record mapping workflow node IDs to their error details. Even when the overall
172
+ * workflow succeeds, individual nodes may have encountered non-fatal errors. Only
173
+ * present when one or more nodes have errored.
174
+ */
175
+ nodeErrors?: {
176
+ [key: string]: Succeeded.NodeErrors;
177
+ };
178
+ }
179
+ namespace Succeeded {
180
+ interface NodeErrors {
181
+ /**
182
+ * A human-readable description of the node error.
183
+ */
184
+ message: string;
185
+ /**
186
+ * The human-readable name of the node that errored.
187
+ */
188
+ nodeName?: string;
189
+ }
190
+ }
191
+ }
192
+ export declare namespace WorkflowInvocations {
193
+ export { type WorkflowInvocationRetrieveResponse as WorkflowInvocationRetrieveResponse };
194
+ }
195
+ //# sourceMappingURL=workflow-invocations.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflow-invocations.d.mts","sourceRoot":"","sources":["../src/resources/workflow-invocations.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,cAAc,EAAE;OAElB,EAAE,yCAAyC,EAAoC;AAEtF,qBAAa,mBAAoB,SAAQ,WAAW;IAClD;;;;OAIG;IACH,QAAQ,CACN,EAAE,EAAE,MAAM,EACV,OAAO,CAAC,EAAE,cAAc,GACvB,yCAAyC,CAAC,kCAAkC,CAAC;CAMjF;AAED;;GAEG;AACH,MAAM,MAAM,kCAAkC,GAC1C,kCAAkC,CAAC,OAAO,GAC1C,kCAAkC,CAAC,SAAS,GAC5C,kCAAkC,CAAC,SAAS,GAC5C,kCAAkC,CAAC,OAAO,GAC1C,kCAAkC,CAAC,MAAM,GACzC,kCAAkC,CAAC,SAAS,CAAC;AAEjD,yBAAiB,kCAAkC,CAAC;IAClD;;OAEG;IACH,UAAiB,OAAO;QACtB;;WAEG;QACH,EAAE,EAAE,MAAM,CAAC;QAEX;;WAEG;QACH,SAAS,EAAE,MAAM,CAAC;QAElB,MAAM,EAAE,SAAS,CAAC;KACnB;IAED;;OAEG;IACH,UAAiB,SAAS;QACxB;;WAEG;QACH,EAAE,EAAE,MAAM,CAAC;QAEX;;WAEG;QACH,SAAS,EAAE,MAAM,CAAC;QAElB,MAAM,EAAE,WAAW,CAAC;KACrB;IAED;;OAEG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AS;QACxB;;WAEG;QACH,EAAE,EAAE,MAAM,CAAC;QAEX;;WAEG;QACH,SAAS,EAAE,MAAM,CAAC;QAElB;;;;;;WAMG;QACH,MAAM,EAAE;YAAE,CAAC,GAAG,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAA;SAAE,CAAC;QAEzC,MAAM,EAAE,WAAW,CAAC;QAEpB;;;;WAIG;QACH,UAAU,CAAC,EAAE;YAAE,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAC,UAAU,CAAA;SAAE,CAAC;KACtD;IAED,UAAiB,SAAS,CAAC;QACzB,UAAiB,UAAU;YACzB;;eAEG;YACH,OAAO,EAAE,MAAM,CAAC;YAEhB;;eAEG;YACH,QAAQ,CAAC,EAAE,MAAM,CAAC;SACnB;KACF;CACF;AAED,MAAM,CAAC,OAAO,WAAW,mBAAmB,CAAC;IAC3C,OAAO,EAAE,KAAK,kCAAkC,IAAI,kCAAkC,EAAE,CAAC;CAC1F"}
@@ -0,0 +1,195 @@
1
+ import { APIResource } from "../core/resource.js";
2
+ import { RequestOptions } from "../internal/request-options.js";
3
+ import { APIPromiseWithAwaitableWorkflowInvocation } from "../lib/polling.js";
4
+ export declare class WorkflowInvocations extends APIResource {
5
+ /**
6
+ * Return details about a workflow invocation. Consumers of this API should not
7
+ * expect updates more frequent than once every five seconds for a given workflow
8
+ * invocation.
9
+ */
10
+ retrieve(id: string, options?: RequestOptions): APIPromiseWithAwaitableWorkflowInvocation<WorkflowInvocationRetrieveResponse>;
11
+ }
12
+ /**
13
+ * A pending workflow invocation
14
+ */
15
+ export type WorkflowInvocationRetrieveResponse = WorkflowInvocationRetrieveResponse.Pending | WorkflowInvocationRetrieveResponse.Throttled | WorkflowInvocationRetrieveResponse.Cancelled | WorkflowInvocationRetrieveResponse.Running | WorkflowInvocationRetrieveResponse.Failed | WorkflowInvocationRetrieveResponse.Succeeded;
16
+ export declare namespace WorkflowInvocationRetrieveResponse {
17
+ /**
18
+ * A pending workflow invocation
19
+ */
20
+ interface Pending {
21
+ /**
22
+ * The ID of the workflow invocation being returned.
23
+ */
24
+ id: string;
25
+ /**
26
+ * The timestamp that the workflow invocation was submitted at.
27
+ */
28
+ createdAt: string;
29
+ status: 'PENDING';
30
+ }
31
+ /**
32
+ * A throttled workflow invocation
33
+ */
34
+ interface Throttled {
35
+ /**
36
+ * The ID of the workflow invocation being returned.
37
+ */
38
+ id: string;
39
+ /**
40
+ * The timestamp that the workflow invocation was submitted at.
41
+ */
42
+ createdAt: string;
43
+ status: 'THROTTLED';
44
+ }
45
+ /**
46
+ * A cancelled or deleted workflow invocation
47
+ */
48
+ interface Cancelled {
49
+ /**
50
+ * The ID of the workflow invocation being returned.
51
+ */
52
+ id: string;
53
+ /**
54
+ * The timestamp that the workflow invocation was submitted at.
55
+ */
56
+ createdAt: string;
57
+ status: 'CANCELLED';
58
+ }
59
+ /**
60
+ * A running workflow invocation
61
+ */
62
+ interface Running {
63
+ /**
64
+ * The ID of the workflow invocation being returned.
65
+ */
66
+ id: string;
67
+ /**
68
+ * The timestamp that the workflow invocation was submitted at.
69
+ */
70
+ createdAt: string;
71
+ /**
72
+ * A record mapping workflow node IDs to arrays of output URLs for nodes that have
73
+ * already completed. This allows streaming partial results while the workflow is
74
+ * still running.
75
+ */
76
+ output: {
77
+ [key: string]: Array<string>;
78
+ };
79
+ /**
80
+ * A number between 0 and 1 representing the overall workflow execution progress.
81
+ */
82
+ progress: number;
83
+ status: 'RUNNING';
84
+ /**
85
+ * A record mapping workflow node IDs to their error details. Only present when one
86
+ * or more nodes have errored.
87
+ */
88
+ nodeErrors?: {
89
+ [key: string]: Running.NodeErrors;
90
+ };
91
+ }
92
+ namespace Running {
93
+ interface NodeErrors {
94
+ /**
95
+ * A human-readable description of the node error.
96
+ */
97
+ message: string;
98
+ /**
99
+ * The human-readable name of the node that errored.
100
+ */
101
+ nodeName?: string;
102
+ }
103
+ }
104
+ /**
105
+ * A failed workflow invocation
106
+ */
107
+ interface Failed {
108
+ /**
109
+ * The ID of the workflow invocation being returned.
110
+ */
111
+ id: string;
112
+ /**
113
+ * The timestamp that the workflow invocation was submitted at.
114
+ */
115
+ createdAt: string;
116
+ /**
117
+ * A human-friendly reason for the failure. We do not recommend returning this to
118
+ * users directly without adding context.
119
+ */
120
+ failure: string;
121
+ status: 'FAILED';
122
+ /**
123
+ * A machine-readable error code for the failure. See
124
+ * https://docs.dev.runwayml.com/errors/task-failures/ for more information.
125
+ */
126
+ failureCode?: string;
127
+ /**
128
+ * A record mapping workflow node IDs to their error details. Only present when one
129
+ * or more nodes have errored.
130
+ */
131
+ nodeErrors?: {
132
+ [key: string]: Failed.NodeErrors;
133
+ };
134
+ }
135
+ namespace Failed {
136
+ interface NodeErrors {
137
+ /**
138
+ * A human-readable description of the node error.
139
+ */
140
+ message: string;
141
+ /**
142
+ * The human-readable name of the node that errored.
143
+ */
144
+ nodeName?: string;
145
+ }
146
+ }
147
+ /**
148
+ * A succeeded workflow invocation
149
+ */
150
+ interface Succeeded {
151
+ /**
152
+ * The ID of the workflow invocation being returned.
153
+ */
154
+ id: string;
155
+ /**
156
+ * The timestamp that the workflow invocation was submitted at.
157
+ */
158
+ createdAt: string;
159
+ /**
160
+ * A record mapping workflow node IDs to arrays of output URLs. Each key is the
161
+ * UUID of a workflow node that produced output, and each value is an array of URLs
162
+ * for that node's artifacts. These URLs will expire within 24-48 hours; fetch the
163
+ * invocation again to get fresh URLs. It is expected that you download the assets
164
+ * at these URLs and store them in your own storage system.
165
+ */
166
+ output: {
167
+ [key: string]: Array<string>;
168
+ };
169
+ status: 'SUCCEEDED';
170
+ /**
171
+ * A record mapping workflow node IDs to their error details. Even when the overall
172
+ * workflow succeeds, individual nodes may have encountered non-fatal errors. Only
173
+ * present when one or more nodes have errored.
174
+ */
175
+ nodeErrors?: {
176
+ [key: string]: Succeeded.NodeErrors;
177
+ };
178
+ }
179
+ namespace Succeeded {
180
+ interface NodeErrors {
181
+ /**
182
+ * A human-readable description of the node error.
183
+ */
184
+ message: string;
185
+ /**
186
+ * The human-readable name of the node that errored.
187
+ */
188
+ nodeName?: string;
189
+ }
190
+ }
191
+ }
192
+ export declare namespace WorkflowInvocations {
193
+ export { type WorkflowInvocationRetrieveResponse as WorkflowInvocationRetrieveResponse };
194
+ }
195
+ //# sourceMappingURL=workflow-invocations.d.ts.map