@scenario-labs/sdk 0.3.0 → 1.1.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 (232) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/README.md +40 -8
  3. package/client.d.mts +36 -16
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +36 -16
  6. package/client.d.ts.map +1 -1
  7. package/client.js +10 -0
  8. package/client.js.map +1 -1
  9. package/client.mjs +10 -0
  10. package/client.mjs.map +1 -1
  11. package/core/pagination.d.mts +153 -0
  12. package/core/pagination.d.mts.map +1 -0
  13. package/core/pagination.d.ts +153 -0
  14. package/core/pagination.d.ts.map +1 -0
  15. package/core/pagination.js +276 -0
  16. package/core/pagination.js.map +1 -0
  17. package/core/pagination.mjs +263 -0
  18. package/core/pagination.mjs.map +1 -0
  19. package/index.d.mts +5 -1
  20. package/index.d.mts.map +1 -1
  21. package/index.d.ts +5 -1
  22. package/index.d.ts.map +1 -1
  23. package/index.js +14 -1
  24. package/index.js.map +1 -1
  25. package/index.mjs +5 -1
  26. package/index.mjs.map +1 -1
  27. package/lib/asset.d.mts +55 -0
  28. package/lib/asset.d.mts.map +1 -0
  29. package/lib/asset.d.ts +55 -0
  30. package/lib/asset.d.ts.map +1 -0
  31. package/lib/asset.js +60 -0
  32. package/lib/asset.js.map +1 -0
  33. package/lib/asset.mjs +54 -0
  34. package/lib/asset.mjs.map +1 -0
  35. package/lib/job.d.mts +13 -1
  36. package/lib/job.d.mts.map +1 -1
  37. package/lib/job.d.ts +13 -1
  38. package/lib/job.d.ts.map +1 -1
  39. package/lib/job.js +18 -1
  40. package/lib/job.js.map +1 -1
  41. package/lib/job.mjs +16 -0
  42. package/lib/job.mjs.map +1 -1
  43. package/lib/models.d.mts +34 -2
  44. package/lib/models.d.mts.map +1 -1
  45. package/lib/models.d.ts +34 -2
  46. package/lib/models.d.ts.map +1 -1
  47. package/lib/models.js +39 -2
  48. package/lib/models.js.map +1 -1
  49. package/lib/models.mjs +37 -1
  50. package/lib/models.mjs.map +1 -1
  51. package/lib/scenario.d.mts +14 -0
  52. package/lib/scenario.d.mts.map +1 -1
  53. package/lib/scenario.d.ts +14 -0
  54. package/lib/scenario.d.ts.map +1 -1
  55. package/lib/scenario.js +14 -0
  56. package/lib/scenario.js.map +1 -1
  57. package/lib/scenario.mjs +14 -0
  58. package/lib/scenario.mjs.map +1 -1
  59. package/lib/upload.d.mts +143 -0
  60. package/lib/upload.d.mts.map +1 -0
  61. package/lib/upload.d.ts +143 -0
  62. package/lib/upload.d.ts.map +1 -0
  63. package/lib/upload.js +242 -0
  64. package/lib/upload.js.map +1 -0
  65. package/lib/upload.mjs +203 -0
  66. package/lib/upload.mjs.map +1 -0
  67. package/lib/workflow.d.mts +13 -2
  68. package/lib/workflow.d.mts.map +1 -1
  69. package/lib/workflow.d.ts +13 -2
  70. package/lib/workflow.d.ts.map +1 -1
  71. package/lib/workflow.js +17 -4
  72. package/lib/workflow.js.map +1 -1
  73. package/lib/workflow.mjs +17 -4
  74. package/lib/workflow.mjs.map +1 -1
  75. package/lib/workflow_import_validator.d.mts +40 -0
  76. package/lib/workflow_import_validator.d.mts.map +1 -0
  77. package/lib/workflow_import_validator.d.ts +40 -0
  78. package/lib/workflow_import_validator.d.ts.map +1 -0
  79. package/lib/workflow_import_validator.js +69 -0
  80. package/lib/workflow_import_validator.js.map +1 -0
  81. package/lib/workflow_import_validator.mjs +64 -0
  82. package/lib/workflow_import_validator.mjs.map +1 -0
  83. package/package.json +11 -1
  84. package/pagination.d.mts +2 -0
  85. package/pagination.d.mts.map +1 -0
  86. package/pagination.d.ts +2 -0
  87. package/pagination.d.ts.map +1 -0
  88. package/pagination.js +6 -0
  89. package/pagination.js.map +1 -0
  90. package/pagination.mjs +2 -0
  91. package/pagination.mjs.map +1 -0
  92. package/resources/assets/assets.d.mts +646 -669
  93. package/resources/assets/assets.d.mts.map +1 -1
  94. package/resources/assets/assets.d.ts +646 -669
  95. package/resources/assets/assets.d.ts.map +1 -1
  96. package/resources/assets/assets.js +3 -2
  97. package/resources/assets/assets.js.map +1 -1
  98. package/resources/assets/assets.mjs +3 -2
  99. package/resources/assets/assets.mjs.map +1 -1
  100. package/resources/assets/index.d.mts +1 -1
  101. package/resources/assets/index.d.mts.map +1 -1
  102. package/resources/assets/index.d.ts +1 -1
  103. package/resources/assets/index.d.ts.map +1 -1
  104. package/resources/assets/index.js.map +1 -1
  105. package/resources/assets/index.mjs.map +1 -1
  106. package/resources/assets/public.d.mts +12 -12
  107. package/resources/assets/public.d.mts.map +1 -1
  108. package/resources/assets/public.d.ts +12 -12
  109. package/resources/assets/public.d.ts.map +1 -1
  110. package/resources/collections/collections.d.mts +38 -49
  111. package/resources/collections/collections.d.mts.map +1 -1
  112. package/resources/collections/collections.d.ts +38 -49
  113. package/resources/collections/collections.d.ts.map +1 -1
  114. package/resources/collections/collections.js +5 -1
  115. package/resources/collections/collections.js.map +1 -1
  116. package/resources/collections/collections.mjs +5 -1
  117. package/resources/collections/collections.mjs.map +1 -1
  118. package/resources/collections/index.d.mts +1 -1
  119. package/resources/collections/index.d.mts.map +1 -1
  120. package/resources/collections/index.d.ts +1 -1
  121. package/resources/collections/index.d.ts.map +1 -1
  122. package/resources/collections/index.js.map +1 -1
  123. package/resources/collections/index.mjs.map +1 -1
  124. package/resources/generate.d.mts +1027 -242
  125. package/resources/generate.d.mts.map +1 -1
  126. package/resources/generate.d.ts +1027 -242
  127. package/resources/generate.d.ts.map +1 -1
  128. package/resources/generate.js +7 -0
  129. package/resources/generate.js.map +1 -1
  130. package/resources/generate.mjs +7 -0
  131. package/resources/generate.mjs.map +1 -1
  132. package/resources/index.d.mts +8 -8
  133. package/resources/index.d.mts.map +1 -1
  134. package/resources/index.d.ts +8 -8
  135. package/resources/index.d.ts.map +1 -1
  136. package/resources/index.js.map +1 -1
  137. package/resources/index.mjs.map +1 -1
  138. package/resources/jobs.d.mts +369 -380
  139. package/resources/jobs.d.mts.map +1 -1
  140. package/resources/jobs.d.ts +369 -380
  141. package/resources/jobs.d.ts.map +1 -1
  142. package/resources/jobs.js +2 -1
  143. package/resources/jobs.js.map +1 -1
  144. package/resources/jobs.mjs +2 -1
  145. package/resources/jobs.mjs.map +1 -1
  146. package/resources/models/description.d.mts +2 -2
  147. package/resources/models/description.d.mts.map +1 -1
  148. package/resources/models/description.d.ts +2 -2
  149. package/resources/models/description.d.ts.map +1 -1
  150. package/resources/models/examples.d.mts +4 -4
  151. package/resources/models/examples.d.mts.map +1 -1
  152. package/resources/models/examples.d.ts +4 -4
  153. package/resources/models/examples.d.ts.map +1 -1
  154. package/resources/models/index.d.mts +1 -1
  155. package/resources/models/index.d.mts.map +1 -1
  156. package/resources/models/index.d.ts +1 -1
  157. package/resources/models/index.d.ts.map +1 -1
  158. package/resources/models/index.js.map +1 -1
  159. package/resources/models/index.mjs.map +1 -1
  160. package/resources/models/models.d.mts +845 -856
  161. package/resources/models/models.d.mts.map +1 -1
  162. package/resources/models/models.d.ts +845 -856
  163. package/resources/models/models.d.ts.map +1 -1
  164. package/resources/models/models.js +2 -1
  165. package/resources/models/models.js.map +1 -1
  166. package/resources/models/models.mjs +2 -1
  167. package/resources/models/models.mjs.map +1 -1
  168. package/resources/models/train.d.mts +2 -2
  169. package/resources/models/train.d.mts.map +1 -1
  170. package/resources/models/train.d.ts +2 -2
  171. package/resources/models/train.d.ts.map +1 -1
  172. package/resources/search.d.mts +215 -295
  173. package/resources/search.d.mts.map +1 -1
  174. package/resources/search.d.ts +215 -295
  175. package/resources/search.d.ts.map +1 -1
  176. package/resources/search.js +9 -2
  177. package/resources/search.js.map +1 -1
  178. package/resources/search.mjs +9 -2
  179. package/resources/search.mjs.map +1 -1
  180. package/resources/tags.d.mts +23 -35
  181. package/resources/tags.d.mts.map +1 -1
  182. package/resources/tags.d.ts +23 -35
  183. package/resources/tags.d.ts.map +1 -1
  184. package/resources/tags.js +2 -1
  185. package/resources/tags.js.map +1 -1
  186. package/resources/tags.mjs +2 -1
  187. package/resources/tags.mjs.map +1 -1
  188. package/resources/usages.d.mts +3 -3
  189. package/resources/usages.d.mts.map +1 -1
  190. package/resources/usages.d.ts +3 -3
  191. package/resources/usages.d.ts.map +1 -1
  192. package/resources/workflows.d.mts +688 -704
  193. package/resources/workflows.d.mts.map +1 -1
  194. package/resources/workflows.d.ts +688 -704
  195. package/resources/workflows.d.ts.map +1 -1
  196. package/resources/workflows.js +5 -1
  197. package/resources/workflows.js.map +1 -1
  198. package/resources/workflows.mjs +5 -1
  199. package/resources/workflows.mjs.map +1 -1
  200. package/src/client.ts +107 -2
  201. package/src/core/pagination.ts +497 -0
  202. package/src/index.ts +11 -1
  203. package/src/lib/asset.ts +85 -0
  204. package/src/lib/job.ts +28 -1
  205. package/src/lib/models.ts +62 -2
  206. package/src/lib/scenario.ts +14 -0
  207. package/src/lib/upload.ts +344 -0
  208. package/src/lib/workflow.ts +29 -4
  209. package/src/lib/workflow_import_validator.ts +104 -0
  210. package/src/pagination.ts +2 -0
  211. package/src/resources/assets/assets.ts +930 -909
  212. package/src/resources/assets/index.ts +2 -0
  213. package/src/resources/assets/public.ts +17 -7
  214. package/src/resources/collections/collections.ts +45 -54
  215. package/src/resources/collections/index.ts +1 -0
  216. package/src/resources/generate.ts +1227 -136
  217. package/src/resources/index.ts +11 -1
  218. package/src/resources/jobs.ts +613 -622
  219. package/src/resources/models/description.ts +4 -0
  220. package/src/resources/models/examples.ts +8 -0
  221. package/src/resources/models/index.ts +1 -0
  222. package/src/resources/models/models.ts +1066 -1064
  223. package/src/resources/models/train.ts +4 -0
  224. package/src/resources/search.ts +239 -327
  225. package/src/resources/tags.ts +32 -39
  226. package/src/resources/usages.ts +5 -0
  227. package/src/resources/workflows.ts +850 -864
  228. package/src/version.ts +1 -1
  229. package/version.d.mts +1 -1
  230. package/version.d.ts +1 -1
  231. package/version.js +1 -1
  232. package/version.mjs +1 -1
@@ -2,6 +2,7 @@
2
2
 
3
3
  import { APIResource } from '../core/resource';
4
4
  import { APIPromise } from '../core/api-promise';
5
+ import { PagePromise, WorkflowsCursor, type WorkflowsCursorParams } from '../core/pagination';
5
6
  import { RequestOptions } from '../internal/request-options';
6
7
  import { path } from '../internal/utils/path';
7
8
 
@@ -37,8 +38,11 @@ export class Workflows extends APIResource {
37
38
  list(
38
39
  query: WorkflowListParams | null | undefined = {},
39
40
  options?: RequestOptions,
40
- ): APIPromise<WorkflowListResponse> {
41
- return this._client.get('/workflows', { query, ...options });
41
+ ): PagePromise<WorkflowListResponsesWorkflowsCursor, WorkflowListResponse> {
42
+ return this._client.getAPIList('/workflows', WorkflowsCursor<WorkflowListResponse>, {
43
+ query,
44
+ ...options,
45
+ });
42
46
  }
43
47
 
44
48
  /**
@@ -87,6 +91,8 @@ export class Workflows extends APIResource {
87
91
  }
88
92
  }
89
93
 
94
+ export type WorkflowListResponsesWorkflowsCursor = WorkflowsCursor<WorkflowListResponse>;
95
+
90
96
  export interface WorkflowCreateResponse {
91
97
  workflow: WorkflowCreateResponse.Workflow;
92
98
  }
@@ -4002,254 +4008,472 @@ export namespace WorkflowUpdateResponse {
4002
4008
  }
4003
4009
  }
4004
4010
 
4005
- /**
4006
- * Returns a paginated list of workflows. Supports both public access (via the
4007
- * `Authorization` header set to `public-auth-token`) and authenticated user access
4008
- * (including API keys). Public responses exclude some attributes.
4009
- */
4010
4011
  export interface WorkflowListResponse {
4011
- workflows: Array<WorkflowListResponse.Workflow>;
4012
+ /**
4013
+ * Unique identifier of the workflow.
4014
+ */
4015
+ id: string;
4012
4016
 
4013
4017
  /**
4014
- * A token to query the next page of workflows
4018
+ * User that created the workflow.
4015
4019
  */
4016
- nextPaginationToken?: string;
4017
- }
4020
+ authorId: string;
4018
4021
 
4019
- export namespace WorkflowListResponse {
4020
- export interface Workflow {
4021
- /**
4022
- * Unique identifier of the workflow.
4023
- */
4024
- id: string;
4022
+ /**
4023
+ * ISO string
4024
+ */
4025
+ createdAt: string;
4025
4026
 
4026
- /**
4027
- * User that created the workflow.
4028
- */
4029
- authorId: string;
4027
+ /**
4028
+ * Full description of what the workflow does.
4029
+ */
4030
+ description: string;
4030
4031
 
4031
- /**
4032
- * ISO string
4033
- */
4034
- createdAt: string;
4032
+ /**
4033
+ * The UI data about the workflow. This is managed by scenario webapp.
4034
+ */
4035
+ editorInfo: { [key: string]: unknown };
4035
4036
 
4036
- /**
4037
- * Full description of what the workflow does.
4038
- */
4039
- description: string;
4037
+ /**
4038
+ * The flow of the workflow.
4039
+ */
4040
+ flow: Array<WorkflowListResponse.Flow>;
4040
4041
 
4041
- /**
4042
- * The UI data about the workflow. This is managed by scenario webapp.
4043
- */
4044
- editorInfo: { [key: string]: unknown };
4042
+ /**
4043
+ * The inputs of the workflow.
4044
+ */
4045
+ inputs: Array<WorkflowListResponse.Input>;
4045
4046
 
4046
- /**
4047
- * The flow of the workflow.
4048
- */
4049
- flow: Array<Workflow.Flow>;
4047
+ /**
4048
+ * Human-readable name of the workflow.
4049
+ */
4050
+ name: string;
4050
4051
 
4051
- /**
4052
- * The inputs of the workflow.
4053
- */
4054
- inputs: Array<Workflow.Input>;
4052
+ /**
4053
+ * Project that owns the workflow.
4054
+ */
4055
+ ownerId: string;
4055
4056
 
4056
- /**
4057
- * Human-readable name of the workflow.
4058
- */
4059
- name: string;
4057
+ /**
4058
+ * Visibility setting for the workflow.
4059
+ */
4060
+ privacy: 'private' | 'public' | 'unlisted';
4060
4061
 
4061
- /**
4062
- * Project that owns the workflow.
4063
- */
4064
- ownerId: string;
4062
+ /**
4063
+ * Short summary of the workflow.
4064
+ */
4065
+ shortDescription: string;
4065
4066
 
4066
- /**
4067
- * Visibility setting for the workflow.
4068
- */
4069
- privacy: 'private' | 'public' | 'unlisted';
4067
+ /**
4068
+ * Current lifecycle status (draft, ready, deleted).
4069
+ */
4070
+ status: 'deleted' | 'draft' | 'ready';
4070
4071
 
4071
- /**
4072
- * Short summary of the workflow.
4073
- */
4074
- shortDescription: string;
4072
+ /**
4073
+ * The tag set of the workflow.
4074
+ */
4075
+ tagSet: Array<string>;
4076
+
4077
+ /**
4078
+ * ISO string
4079
+ */
4080
+ updatedAt: string;
4081
+
4082
+ /**
4083
+ * A representation of an asset after being processed by the workflow
4084
+ */
4085
+ after?: WorkflowListResponse.After;
4086
+
4087
+ /**
4088
+ * A representation of an asset before being processed by the workflow
4089
+ */
4090
+ before?: WorkflowListResponse.Before;
4091
+
4092
+ /**
4093
+ * Embedding is a map of embedding version into embedding date
4094
+ */
4095
+ embedding?: unknown;
4096
+
4097
+ /**
4098
+ * Whether the workflow is locked. Locked workflows cannot be modified or deleted
4099
+ * except by the author or a project admin.
4100
+ */
4101
+ isLocked?: boolean;
4075
4102
 
4103
+ lastIndexedAt?: string;
4104
+
4105
+ /**
4106
+ * The type of indexing operation to perform in MeiliSearch
4107
+ */
4108
+ lastIndexingType?: 'CREATE' | 'DELETE' | 'UPDATE';
4109
+
4110
+ /**
4111
+ * Timestamp when the workflow flow was last saved as a Ready (App) snapshot. Used
4112
+ * to compute the WorkflowNodes snapshot key. Only set for workflows that have been
4113
+ * in the Ready state.
4114
+ */
4115
+ lastReadyFlowUpdatedAt?: string;
4116
+
4117
+ /**
4118
+ * ISO string timestamp when lock state was last changed.
4119
+ */
4120
+ lockedStateChangedAt?: string;
4121
+
4122
+ /**
4123
+ * UserId of the user who last changed the lock state.
4124
+ */
4125
+ lockedStateChangedBy?: string;
4126
+
4127
+ /**
4128
+ * Asset kinds produced by this workflow (if specified).
4129
+ */
4130
+ outputAssetKinds?: Array<'3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video'>;
4131
+
4132
+ /**
4133
+ * Currently the thumbnail is identical to the after asset.
4134
+ */
4135
+ thumbnail?: WorkflowListResponse.Thumbnail;
4136
+
4137
+ /**
4138
+ * The UI configuration for the workflow. This is managed by scenario webapp.
4139
+ */
4140
+ uiConfig?: WorkflowListResponse.UiConfig;
4141
+ }
4142
+
4143
+ export namespace WorkflowListResponse {
4144
+ export interface Flow {
4076
4145
  /**
4077
- * Current lifecycle status (draft, ready, deleted).
4146
+ * The id of the node.
4078
4147
  */
4079
- status: 'deleted' | 'draft' | 'ready';
4148
+ id: string;
4080
4149
 
4081
4150
  /**
4082
- * The tag set of the workflow.
4151
+ * The type of the job for the node.
4083
4152
  */
4084
- tagSet: Array<string>;
4153
+ type:
4154
+ | 'custom-model'
4155
+ | 'for-each'
4156
+ | 'generate-prompt'
4157
+ | 'list'
4158
+ | 'logic'
4159
+ | 'model'
4160
+ | 'remove-background'
4161
+ | 'transform'
4162
+ | 'user-approval'
4163
+ | 'workflow';
4085
4164
 
4086
4165
  /**
4087
- * ISO string
4166
+ * Fixed number of iterations for a ForEach node. When set, the loop runs exactly
4167
+ * `count` times regardless of array input. When not set, the loop iterates over
4168
+ * the resolved array input. Only available for ForEach nodes.
4088
4169
  */
4089
- updatedAt: string;
4170
+ count?: number;
4090
4171
 
4091
4172
  /**
4092
- * A representation of an asset after being processed by the workflow
4173
+ * The nodes that this node depends on. Only available for nodes that have
4174
+ * dependencies. Mainly used for user approval nodes.
4093
4175
  */
4094
- after?: Workflow.After;
4176
+ dependsOn?: Array<string>;
4095
4177
 
4096
4178
  /**
4097
- * A representation of an asset before being processed by the workflow
4179
+ * If true, the outputs of this node will be included in the workflow job's final
4180
+ * output. Only applicable to producing nodes (custom-model, inference, etc.). By
4181
+ * default, only last nodes (nodes not referenced by other nodes) contribute to
4182
+ * outputs. Set this to true to also include intermediate nodes in the final
4183
+ * output. Note: This should only be set to `true` or left undefined.
4098
4184
  */
4099
- before?: Workflow.Before;
4185
+ includeOutputsInWorkflowJob?: true;
4100
4186
 
4101
4187
  /**
4102
- * Embedding is a map of embedding version into embedding date
4188
+ * The inputs of the node.
4103
4189
  */
4104
- embedding?: unknown;
4190
+ inputs?: Array<Flow.Input>;
4105
4191
 
4106
4192
  /**
4107
- * Whether the workflow is locked. Locked workflows cannot be modified or deleted
4108
- * except by the author or a project admin.
4193
+ * Statically-configured items for a List node. The node outputs this array as-is
4194
+ * when executed. Only available for List nodes. The values can be strings,
4195
+ * numbers, or asset IDs.
4109
4196
  */
4110
- isLocked?: boolean;
4111
-
4112
- lastIndexedAt?: string;
4197
+ items?: Array<string>;
4113
4198
 
4114
4199
  /**
4115
- * The type of indexing operation to perform in MeiliSearch
4200
+ * Zero-based index of the iteration this node copy belongs to. Set on
4201
+ * dynamically-created copies of loop body nodes.
4116
4202
  */
4117
- lastIndexingType?: 'CREATE' | 'DELETE' | 'UPDATE';
4203
+ iterationIndex?: number;
4118
4204
 
4119
4205
  /**
4120
- * Timestamp when the workflow flow was last saved as a Ready (App) snapshot. Used
4121
- * to compute the WorkflowNodes snapshot key. Only set for workflows that have been
4122
- * in the Ready state.
4206
+ * The logic of the node. Only available for logic nodes.
4123
4207
  */
4124
- lastReadyFlowUpdatedAt?: string;
4208
+ logic?: Flow.Logic;
4125
4209
 
4126
4210
  /**
4127
- * ISO string timestamp when lock state was last changed.
4211
+ * The type of the logic for the node. Only available for logic nodes.
4128
4212
  */
4129
- lockedStateChangedAt?: string;
4213
+ logicType?: 'if-else';
4130
4214
 
4131
4215
  /**
4132
- * UserId of the user who last changed the lock state.
4216
+ * IDs of the body template nodes that belong to this ForEach loop. At runtime
4217
+ * these templates are cloned once per iteration and marked Skipped. Only available
4218
+ * for ForEach nodes.
4133
4219
  */
4134
- lockedStateChangedBy?: string;
4220
+ loopBodyNodeIds?: Array<string>;
4135
4221
 
4136
4222
  /**
4137
- * Asset kinds produced by this workflow (if specified).
4223
+ * ID of the ForEach node that spawned this iteration copy. Set on
4224
+ * dynamically-created copies of loop body nodes.
4138
4225
  */
4139
- outputAssetKinds?: Array<'3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video'>;
4226
+ loopNodeId?: string;
4140
4227
 
4141
4228
  /**
4142
- * Currently the thumbnail is identical to the after asset.
4229
+ * The model id for the node. Mainly used for custom model tasks.
4143
4230
  */
4144
- thumbnail?: Workflow.Thumbnail;
4231
+ modelId?: string;
4145
4232
 
4146
4233
  /**
4147
- * The UI configuration for the workflow. This is managed by scenario webapp.
4234
+ * The workflow id for the node. Mainly used for workflow tasks.
4148
4235
  */
4149
- uiConfig?: Workflow.UiConfig;
4236
+ workflowId?: string;
4150
4237
  }
4151
4238
 
4152
- export namespace Workflow {
4153
- export interface Flow {
4239
+ export namespace Flow {
4240
+ /**
4241
+ * This is used to run the flow.
4242
+ */
4243
+ export interface Input {
4154
4244
  /**
4155
- * The id of the node.
4245
+ * The name that must be user to call the model through the API
4156
4246
  */
4157
- id: string;
4247
+ name: string;
4158
4248
 
4159
4249
  /**
4160
- * The type of the job for the node.
4250
+ * The data type of the input
4161
4251
  */
4162
4252
  type:
4163
- | 'custom-model'
4164
- | 'for-each'
4165
- | 'generate-prompt'
4166
- | 'list'
4167
- | 'logic'
4253
+ | 'boolean'
4254
+ | 'file'
4255
+ | 'file_array'
4256
+ | 'inputs_array'
4168
4257
  | 'model'
4169
- | 'remove-background'
4170
- | 'transform'
4171
- | 'user-approval'
4172
- | 'workflow';
4258
+ | 'model_array'
4259
+ | 'number'
4260
+ | 'number_array'
4261
+ | 'string'
4262
+ | 'string_array';
4173
4263
 
4174
4264
  /**
4175
- * Fixed number of iterations for a ForEach node. When set, the loop runs exactly
4176
- * `count` times regardless of array input. When not set, the loop iterates over
4177
- * the resolved array input. Only available for ForEach nodes.
4265
+ * The allowed values for the input. For \`string\` or \`number\` types, creates a
4266
+ * single-select dropdown. For \`string_array\` type, creates a multi-select
4267
+ * dropdown.
4178
4268
  */
4179
- count?: number;
4269
+ allowedValues?: Array<unknown>;
4180
4270
 
4181
4271
  /**
4182
- * The nodes that this node depends on. Only available for nodes that have
4183
- * dependencies. Mainly used for user approval nodes.
4272
+ * Specifies the background behavior for the input. Only available for \`file\` and
4273
+ * \`file_array\` input types with kind \`image\`.
4184
4274
  */
4185
- dependsOn?: Array<string>;
4275
+ backgroundBehavior?: 'opaque' | 'transparent';
4186
4276
 
4187
4277
  /**
4188
- * If true, the outputs of this node will be included in the workflow job's final
4189
- * output. Only applicable to producing nodes (custom-model, inference, etc.). By
4190
- * default, only last nodes (nodes not referenced by other nodes) contribute to
4191
- * outputs. Set this to true to also include intermediate nodes in the final
4192
- * output. Note: This should only be set to `true` or left undefined.
4278
+ * Whether the input is a color or not. Only available for \`string\` input type.
4193
4279
  */
4194
- includeOutputsInWorkflowJob?: true;
4280
+ color?: boolean;
4195
4281
 
4196
4282
  /**
4197
- * The inputs of the node.
4283
+ * Whether this input affects the model's cost calculation
4198
4284
  */
4199
- inputs?: Array<Flow.Input>;
4285
+ costImpact?: boolean;
4200
4286
 
4201
4287
  /**
4202
- * Statically-configured items for a List node. The node outputs this array as-is
4203
- * when executed. Only available for List nodes. The values can be strings,
4204
- * numbers, or asset IDs.
4288
+ * The default value for the input
4205
4289
  */
4206
- items?: Array<string>;
4290
+ default?: unknown;
4207
4291
 
4208
4292
  /**
4209
- * Zero-based index of the iteration this node copy belongs to. Set on
4210
- * dynamically-created copies of loop body nodes.
4293
+ * Help text displayed in the UI to provide additional information about the input
4211
4294
  */
4212
- iterationIndex?: number;
4295
+ description?: string;
4213
4296
 
4214
4297
  /**
4215
- * The logic of the node. Only available for logic nodes.
4298
+ * Used to visually group inputs together in the UI. Inputs with the same group
4299
+ * value appear consecutively in the UI.
4216
4300
  */
4217
- logic?: Flow.Logic;
4301
+ group?: string;
4218
4302
 
4219
4303
  /**
4220
- * The type of the logic for the node. Only available for logic nodes.
4304
+ * Hint text displayed in the UI as a tooltip to guide the user
4221
4305
  */
4222
- logicType?: 'if-else';
4306
+ hint?: string;
4223
4307
 
4224
4308
  /**
4225
- * IDs of the body template nodes that belong to this ForEach loop. At runtime
4226
- * these templates are cloned once per iteration and marked Skipped. Only available
4227
- * for ForEach nodes.
4309
+ * The list of inputs which form an object within a container array. All inputs are
4310
+ * the same as the current object. This is only available for type inputs_array
4311
+ * inputs.
4228
4312
  */
4229
- loopBodyNodeIds?: Array<string>;
4313
+ inputs?: Array<{ [key: string]: unknown }>;
4230
4314
 
4231
4315
  /**
4232
- * ID of the ForEach node that spawned this iteration copy. Set on
4233
- * dynamically-created copies of loop body nodes.
4316
+ * The configured items for inputs_array type inputs. Each item is an array of
4317
+ * SubNodeInput that need ref/value resolution. Only available for inputs_array
4318
+ * type.
4234
4319
  */
4235
- loopNodeId?: string;
4320
+ items?: Array<Array<Input.Item>>;
4236
4321
 
4237
4322
  /**
4238
- * The model id for the node. Mainly used for custom model tasks.
4323
+ * The asset kind of the input. Only taken into account for \`file\` and
4324
+ * \`file_array\` input types. If model provides multiple kinds, the input will be
4325
+ * not able to create the asset on the flight on API side with dataurl without
4326
+ * data:kind, prefix
4239
4327
  */
4240
- modelId?: string;
4328
+ kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
4241
4329
 
4242
4330
  /**
4243
- * The workflow id for the node. Mainly used for workflow tasks.
4331
+ * The label displayed in the UI for this input
4244
4332
  */
4245
- workflowId?: string;
4333
+ label?: string;
4334
+
4335
+ /**
4336
+ * The name of the file input field to use as the mask source
4337
+ */
4338
+ maskFrom?: string;
4339
+
4340
+ /**
4341
+ * The maximum allowed value. Only available for \`number\` and \`array\` input
4342
+ * types.
4343
+ */
4344
+ max?: number;
4345
+
4346
+ /**
4347
+ * The maximum allowed length for \`string\` inputs. Also applies to each item in
4348
+ * \`string_array\`.
4349
+ */
4350
+ maxLength?: number;
4351
+
4352
+ /**
4353
+ * The maximum allowed file size in bytes. Only applies to \`file\` and
4354
+ * \`file_array\` input types. Validated against \`asset.properties.size\` at job
4355
+ * creation time.
4356
+ */
4357
+ maxSize?: number;
4358
+
4359
+ /**
4360
+ * The minimum allowed value. Only available for \`number\` and array input types.
4361
+ */
4362
+ min?: number;
4363
+
4364
+ /**
4365
+ * The minimum allowed length for string inputs. Also applies to each item in
4366
+ * \`string_array\`.
4367
+ */
4368
+ minLength?: number;
4369
+
4370
+ /**
4371
+ * The allowed model types for this input. Example: \`["flux.1-lora"]\`. Only
4372
+ * available for \`model_array\` input type.
4373
+ */
4374
+ modelTypes?: Array<
4375
+ | 'custom'
4376
+ | 'elevenlabs-voice'
4377
+ | 'flux.1'
4378
+ | 'flux.1-composition'
4379
+ | 'flux.1-kontext-dev'
4380
+ | 'flux.1-kontext-lora'
4381
+ | 'flux.1-krea-dev'
4382
+ | 'flux.1-krea-lora'
4383
+ | 'flux.1-lora'
4384
+ | 'flux.1-pro'
4385
+ | 'flux.1.1-pro-ultra'
4386
+ | 'flux.2-dev-edit-lora'
4387
+ | 'flux.2-dev-lora'
4388
+ | 'flux.2-klein-4b-edit-lora'
4389
+ | 'flux.2-klein-4b-lora'
4390
+ | 'flux.2-klein-9b-edit-lora'
4391
+ | 'flux.2-klein-9b-lora'
4392
+ | 'flux.2-klein-base-4b-edit-lora'
4393
+ | 'flux.2-klein-base-4b-lora'
4394
+ | 'flux.2-klein-base-9b-edit-lora'
4395
+ | 'flux.2-klein-base-9b-lora'
4396
+ | 'flux1.1-pro'
4397
+ | 'gpt-image-1'
4398
+ | 'qwen-image-2512-lora'
4399
+ | 'qwen-image-edit-2509-lora'
4400
+ | 'qwen-image-edit-2511-lora'
4401
+ | 'qwen-image-edit-lora'
4402
+ | 'qwen-image-lora'
4403
+ | 'sd-1_5'
4404
+ | 'sd-1_5-composition'
4405
+ | 'sd-1_5-lora'
4406
+ | 'sd-xl'
4407
+ | 'sd-xl-composition'
4408
+ | 'sd-xl-lora'
4409
+ | 'zimage-de-turbo-lora'
4410
+ | 'zimage-lora'
4411
+ | 'zimage-turbo-lora'
4412
+ >;
4413
+
4414
+ /**
4415
+ * Whether this input represents a parent asset to assign to the produced assets.
4416
+ * Only available for \`file\` and \`file_array\` input types.
4417
+ *
4418
+ * For \`file_array\`, the parent asset is the first item in the array.
4419
+ */
4420
+ parent?: boolean;
4421
+
4422
+ /**
4423
+ * Placeholder text for the input. Only available for 'string' input type.
4424
+ */
4425
+ placeholder?: string;
4426
+
4427
+ /**
4428
+ * Whether the input is a prompt. When true, displays as a text area with prompt
4429
+ * spark feature. Only available for \`string\` input type.
4430
+ */
4431
+ prompt?: boolean;
4432
+
4433
+ /**
4434
+ * Whether the input is used with prompt spark. Only available for \`string\` input
4435
+ * type.
4436
+ */
4437
+ promptSpark?: boolean;
4438
+
4439
+ /**
4440
+ * The reference to another input or output of the same workflow. Must have at
4441
+ * least one of node or conditional.
4442
+ */
4443
+ ref?: Input.Ref;
4444
+
4445
+ /**
4446
+ * Set of rules that describes when this input is required:
4447
+ *
4448
+ * - \`always\`: Input is always required
4449
+ * - \`ifNotDefined\`: Input is required when another specified input is not
4450
+ * defined
4451
+ * - \`ifDefined\`: Input is required when another specified input is defined
4452
+ * - \`conditionalValues\`: Input is required when another input has a specific
4453
+ * value
4454
+ *
4455
+ * By default, the input is not required.
4456
+ */
4457
+ required?: Input.Required;
4458
+
4459
+ /**
4460
+ * The step increment for numeric inputs. Only available for \`number\` input type.
4461
+ */
4462
+ step?: number;
4463
+
4464
+ /**
4465
+ * The value of the input. This is the value of the input that will be used to run
4466
+ * the node. Only available for flows managed by a WorkflowJob.
4467
+ */
4468
+ value?: unknown;
4246
4469
  }
4247
4470
 
4248
- export namespace Flow {
4471
+ export namespace Input {
4249
4472
  /**
4250
- * This is used to run the flow.
4473
+ * A sub-input within an inputs_array item. Same as NodeInput but without the
4474
+ * recursive items field.
4251
4475
  */
4252
- export interface Input {
4476
+ export interface Item {
4253
4477
  /**
4254
4478
  * The name that must be user to call the model through the API
4255
4479
  */
@@ -4321,13 +4545,6 @@ export namespace WorkflowListResponse {
4321
4545
  */
4322
4546
  inputs?: Array<{ [key: string]: unknown }>;
4323
4547
 
4324
- /**
4325
- * The configured items for inputs_array type inputs. Each item is an array of
4326
- * SubNodeInput that need ref/value resolution. Only available for inputs_array
4327
- * type.
4328
- */
4329
- items?: Array<Array<Input.Item>>;
4330
-
4331
4548
  /**
4332
4549
  * The asset kind of the input. Only taken into account for \`file\` and
4333
4550
  * \`file_array\` input types. If model provides multiple kinds, the input will be
@@ -4449,7 +4666,7 @@ export namespace WorkflowListResponse {
4449
4666
  * The reference to another input or output of the same workflow. Must have at
4450
4667
  * least one of node or conditional.
4451
4668
  */
4452
- ref?: Input.Ref;
4669
+ ref?: Item.Ref;
4453
4670
 
4454
4671
  /**
4455
4672
  * Set of rules that describes when this input is required:
@@ -4463,7 +4680,7 @@ export namespace WorkflowListResponse {
4463
4680
  *
4464
4681
  * By default, the input is not required.
4465
4682
  */
4466
- required?: Input.Required;
4683
+ required?: Item.Required;
4467
4684
 
4468
4685
  /**
4469
4686
  * The step increment for numeric inputs. Only available for \`number\` input type.
@@ -4477,842 +4694,615 @@ export namespace WorkflowListResponse {
4477
4694
  value?: unknown;
4478
4695
  }
4479
4696
 
4480
- export namespace Input {
4697
+ export namespace Item {
4481
4698
  /**
4482
- * A sub-input within an inputs_array item. Same as NodeInput but without the
4483
- * recursive items field.
4699
+ * The reference to another input or output of the same workflow. Must have at
4700
+ * least one of node or conditional.
4484
4701
  */
4485
- export interface Item {
4486
- /**
4487
- * The name that must be user to call the model through the API
4488
- */
4489
- name: string;
4490
-
4702
+ export interface Ref {
4491
4703
  /**
4492
- * The data type of the input
4704
+ * The conditional nodes to reference. If the conditional nodes are successful, the
4705
+ * node will be successful. If the conditional nodes are skipped, the node will be
4706
+ * skipped. Contains an array of node ids used to check the status of the nodes.
4493
4707
  */
4494
- type:
4495
- | 'boolean'
4496
- | 'file'
4497
- | 'file_array'
4498
- | 'inputs_array'
4499
- | 'model'
4500
- | 'model_array'
4501
- | 'number'
4502
- | 'number_array'
4503
- | 'string'
4504
- | 'string_array';
4708
+ conditional?: Array<string>;
4505
4709
 
4506
4710
  /**
4507
- * The allowed values for the input. For \`string\` or \`number\` types, creates a
4508
- * single-select dropdown. For \`string_array\` type, creates a multi-select
4509
- * dropdown.
4711
+ * This is the desired node output value if ref is an if/else node.
4510
4712
  */
4511
- allowedValues?: Array<unknown>;
4713
+ equal?: string;
4512
4714
 
4513
4715
  /**
4514
- * Specifies the background behavior for the input. Only available for \`file\` and
4515
- * \`file_array\` input types with kind \`image\`.
4716
+ * The name of the input or output to reference. If the type is 'workflow', the
4717
+ * name is the name of the input of the workflow is required If the type is 'node',
4718
+ * the name is not mandatory, except if you want all outputs of the node. To get
4719
+ * all outputs of a node, you can use the name 'all'.
4516
4720
  */
4517
- backgroundBehavior?: 'opaque' | 'transparent';
4721
+ name?: string;
4518
4722
 
4519
4723
  /**
4520
- * Whether the input is a color or not. Only available for \`string\` input type.
4724
+ * The node id or 'workflow' if the source is a workflow input.
4521
4725
  */
4522
- color?: boolean;
4523
-
4524
- /**
4525
- * Whether this input affects the model's cost calculation
4526
- */
4527
- costImpact?: boolean;
4528
-
4529
- /**
4530
- * The default value for the input
4531
- */
4532
- default?: unknown;
4533
-
4534
- /**
4535
- * Help text displayed in the UI to provide additional information about the input
4536
- */
4537
- description?: string;
4726
+ node?: string;
4727
+ }
4538
4728
 
4729
+ /**
4730
+ * Set of rules that describes when this input is required:
4731
+ *
4732
+ * - \`always\`: Input is always required
4733
+ * - \`ifNotDefined\`: Input is required when another specified input is not
4734
+ * defined
4735
+ * - \`ifDefined\`: Input is required when another specified input is defined
4736
+ * - \`conditionalValues\`: Input is required when another input has a specific
4737
+ * value
4738
+ *
4739
+ * By default, the input is not required.
4740
+ */
4741
+ export interface Required {
4539
4742
  /**
4540
- * Used to visually group inputs together in the UI. Inputs with the same group
4541
- * value appear consecutively in the UI.
4743
+ * Whether the input is always required
4542
4744
  */
4543
- group?: string;
4745
+ always?: boolean;
4544
4746
 
4545
4747
  /**
4546
- * Hint text displayed in the UI as a tooltip to guide the user
4748
+ * Makes this input required when another input has a specific value:
4749
+ *
4750
+ * - Key: name of the input to check
4751
+ * - Value: operation and allowed values that trigger the requirement
4547
4752
  */
4548
- hint?: string;
4753
+ conditionalValues?: unknown;
4549
4754
 
4550
4755
  /**
4551
- * The list of inputs which form an object within a container array. All inputs are
4552
- * the same as the current object. This is only available for type inputs_array
4553
- * inputs.
4756
+ * Makes this input required when another input is defined:
4757
+ *
4758
+ * - Key: name of the input that must be defined
4759
+ * - Value: message to display when this input is required
4554
4760
  */
4555
- inputs?: Array<{ [key: string]: unknown }>;
4761
+ ifDefined?: unknown;
4556
4762
 
4557
4763
  /**
4558
- * The asset kind of the input. Only taken into account for \`file\` and
4559
- * \`file_array\` input types. If model provides multiple kinds, the input will be
4560
- * not able to create the asset on the flight on API side with dataurl without
4561
- * data:kind, prefix
4764
+ * Makes this input required when another input is not defined:
4765
+ *
4766
+ * - Key: name of the input that must be undefined
4767
+ * - Value: message to display when this input is required
4562
4768
  */
4563
- kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
4769
+ ifNotDefined?: unknown;
4770
+ }
4771
+ }
4564
4772
 
4565
- /**
4566
- * The label displayed in the UI for this input
4567
- */
4568
- label?: string;
4773
+ /**
4774
+ * The reference to another input or output of the same workflow. Must have at
4775
+ * least one of node or conditional.
4776
+ */
4777
+ export interface Ref {
4778
+ /**
4779
+ * The conditional nodes to reference. If the conditional nodes are successful, the
4780
+ * node will be successful. If the conditional nodes are skipped, the node will be
4781
+ * skipped. Contains an array of node ids used to check the status of the nodes.
4782
+ */
4783
+ conditional?: Array<string>;
4569
4784
 
4570
- /**
4571
- * The name of the file input field to use as the mask source
4572
- */
4573
- maskFrom?: string;
4785
+ /**
4786
+ * This is the desired node output value if ref is an if/else node.
4787
+ */
4788
+ equal?: string;
4574
4789
 
4575
- /**
4576
- * The maximum allowed value. Only available for \`number\` and \`array\` input
4577
- * types.
4578
- */
4579
- max?: number;
4790
+ /**
4791
+ * The name of the input or output to reference. If the type is 'workflow', the
4792
+ * name is the name of the input of the workflow is required If the type is 'node',
4793
+ * the name is not mandatory, except if you want all outputs of the node. To get
4794
+ * all outputs of a node, you can use the name 'all'.
4795
+ */
4796
+ name?: string;
4580
4797
 
4581
- /**
4582
- * The maximum allowed length for \`string\` inputs. Also applies to each item in
4583
- * \`string_array\`.
4584
- */
4585
- maxLength?: number;
4798
+ /**
4799
+ * The node id or 'workflow' if the source is a workflow input.
4800
+ */
4801
+ node?: string;
4802
+ }
4586
4803
 
4587
- /**
4588
- * The maximum allowed file size in bytes. Only applies to \`file\` and
4589
- * \`file_array\` input types. Validated against \`asset.properties.size\` at job
4590
- * creation time.
4591
- */
4592
- maxSize?: number;
4804
+ /**
4805
+ * Set of rules that describes when this input is required:
4806
+ *
4807
+ * - \`always\`: Input is always required
4808
+ * - \`ifNotDefined\`: Input is required when another specified input is not
4809
+ * defined
4810
+ * - \`ifDefined\`: Input is required when another specified input is defined
4811
+ * - \`conditionalValues\`: Input is required when another input has a specific
4812
+ * value
4813
+ *
4814
+ * By default, the input is not required.
4815
+ */
4816
+ export interface Required {
4817
+ /**
4818
+ * Whether the input is always required
4819
+ */
4820
+ always?: boolean;
4593
4821
 
4594
- /**
4595
- * The minimum allowed value. Only available for \`number\` and array input types.
4596
- */
4597
- min?: number;
4822
+ /**
4823
+ * Makes this input required when another input has a specific value:
4824
+ *
4825
+ * - Key: name of the input to check
4826
+ * - Value: operation and allowed values that trigger the requirement
4827
+ */
4828
+ conditionalValues?: unknown;
4598
4829
 
4599
- /**
4600
- * The minimum allowed length for string inputs. Also applies to each item in
4601
- * \`string_array\`.
4602
- */
4603
- minLength?: number;
4830
+ /**
4831
+ * Makes this input required when another input is defined:
4832
+ *
4833
+ * - Key: name of the input that must be defined
4834
+ * - Value: message to display when this input is required
4835
+ */
4836
+ ifDefined?: unknown;
4604
4837
 
4605
- /**
4606
- * The allowed model types for this input. Example: \`["flux.1-lora"]\`. Only
4607
- * available for \`model_array\` input type.
4608
- */
4609
- modelTypes?: Array<
4610
- | 'custom'
4611
- | 'elevenlabs-voice'
4612
- | 'flux.1'
4613
- | 'flux.1-composition'
4614
- | 'flux.1-kontext-dev'
4615
- | 'flux.1-kontext-lora'
4616
- | 'flux.1-krea-dev'
4617
- | 'flux.1-krea-lora'
4618
- | 'flux.1-lora'
4619
- | 'flux.1-pro'
4620
- | 'flux.1.1-pro-ultra'
4621
- | 'flux.2-dev-edit-lora'
4622
- | 'flux.2-dev-lora'
4623
- | 'flux.2-klein-4b-edit-lora'
4624
- | 'flux.2-klein-4b-lora'
4625
- | 'flux.2-klein-9b-edit-lora'
4626
- | 'flux.2-klein-9b-lora'
4627
- | 'flux.2-klein-base-4b-edit-lora'
4628
- | 'flux.2-klein-base-4b-lora'
4629
- | 'flux.2-klein-base-9b-edit-lora'
4630
- | 'flux.2-klein-base-9b-lora'
4631
- | 'flux1.1-pro'
4632
- | 'gpt-image-1'
4633
- | 'qwen-image-2512-lora'
4634
- | 'qwen-image-edit-2509-lora'
4635
- | 'qwen-image-edit-2511-lora'
4636
- | 'qwen-image-edit-lora'
4637
- | 'qwen-image-lora'
4638
- | 'sd-1_5'
4639
- | 'sd-1_5-composition'
4640
- | 'sd-1_5-lora'
4641
- | 'sd-xl'
4642
- | 'sd-xl-composition'
4643
- | 'sd-xl-lora'
4644
- | 'zimage-de-turbo-lora'
4645
- | 'zimage-lora'
4646
- | 'zimage-turbo-lora'
4647
- >;
4838
+ /**
4839
+ * Makes this input required when another input is not defined:
4840
+ *
4841
+ * - Key: name of the input that must be undefined
4842
+ * - Value: message to display when this input is required
4843
+ */
4844
+ ifNotDefined?: unknown;
4845
+ }
4846
+ }
4648
4847
 
4649
- /**
4650
- * Whether this input represents a parent asset to assign to the produced assets.
4651
- * Only available for \`file\` and \`file_array\` input types.
4652
- *
4653
- * For \`file_array\`, the parent asset is the first item in the array.
4654
- */
4655
- parent?: boolean;
4848
+ /**
4849
+ * The logic of the node. Only available for logic nodes.
4850
+ */
4851
+ export interface Logic {
4852
+ /**
4853
+ * The cases of the logic. Only available for if/else nodes.
4854
+ */
4855
+ cases?: Array<Logic.Case>;
4656
4856
 
4657
- /**
4658
- * Placeholder text for the input. Only available for 'string' input type.
4659
- */
4660
- placeholder?: string;
4857
+ /**
4858
+ * The default case of the logic. Contains the id/output of the node to execute if
4859
+ * no case is matched. Only available for if/else nodes.
4860
+ */
4861
+ default?: string;
4661
4862
 
4662
- /**
4663
- * Whether the input is a prompt. When true, displays as a text area with prompt
4664
- * spark feature. Only available for \`string\` input type.
4665
- */
4666
- prompt?: boolean;
4863
+ /**
4864
+ * The transform of the logic. Only available for transform nodes.
4865
+ */
4866
+ transform?: string;
4867
+ }
4667
4868
 
4668
- /**
4669
- * Whether the input is used with prompt spark. Only available for \`string\` input
4670
- * type.
4671
- */
4672
- promptSpark?: boolean;
4869
+ export namespace Logic {
4870
+ export interface Case {
4871
+ condition: string;
4673
4872
 
4674
- /**
4675
- * The reference to another input or output of the same workflow. Must have at
4676
- * least one of node or conditional.
4677
- */
4678
- ref?: Item.Ref;
4873
+ value: string;
4874
+ }
4875
+ }
4876
+ }
4679
4877
 
4680
- /**
4681
- * Set of rules that describes when this input is required:
4682
- *
4683
- * - \`always\`: Input is always required
4684
- * - \`ifNotDefined\`: Input is required when another specified input is not
4685
- * defined
4686
- * - \`ifDefined\`: Input is required when another specified input is defined
4687
- * - \`conditionalValues\`: Input is required when another input has a specific
4688
- * value
4689
- *
4690
- * By default, the input is not required.
4691
- */
4692
- required?: Item.Required;
4878
+ /**
4879
+ * Defines the input parameters for a model. Use this to understand the available
4880
+ * input parameters for a given `modelId` when calling
4881
+ * `POST /generate/custom/{modelId}`. See {@link
4882
+ * https://docs.scenario.com/docs/video-generation} for examples.
4883
+ */
4884
+ export interface Input {
4885
+ /**
4886
+ * The name that must be user to call the model through the API
4887
+ */
4888
+ name: string;
4693
4889
 
4694
- /**
4695
- * The step increment for numeric inputs. Only available for \`number\` input type.
4696
- */
4697
- step?: number;
4890
+ /**
4891
+ * The data type of the input
4892
+ */
4893
+ type:
4894
+ | 'boolean'
4895
+ | 'file'
4896
+ | 'file_array'
4897
+ | 'inputs_array'
4898
+ | 'model'
4899
+ | 'model_array'
4900
+ | 'number'
4901
+ | 'number_array'
4902
+ | 'string'
4903
+ | 'string_array';
4698
4904
 
4699
- /**
4700
- * The value of the input. This is the value of the input that will be used to run
4701
- * the node. Only available for flows managed by a WorkflowJob.
4702
- */
4703
- value?: unknown;
4704
- }
4905
+ /**
4906
+ * The allowed values for the input. For \`string\` or \`number\` types, creates a
4907
+ * single-select dropdown. For \`string_array\` type, creates a multi-select
4908
+ * dropdown.
4909
+ */
4910
+ allowedValues?: Array<unknown>;
4705
4911
 
4706
- export namespace Item {
4707
- /**
4708
- * The reference to another input or output of the same workflow. Must have at
4709
- * least one of node or conditional.
4710
- */
4711
- export interface Ref {
4712
- /**
4713
- * The conditional nodes to reference. If the conditional nodes are successful, the
4714
- * node will be successful. If the conditional nodes are skipped, the node will be
4715
- * skipped. Contains an array of node ids used to check the status of the nodes.
4716
- */
4717
- conditional?: Array<string>;
4912
+ /**
4913
+ * Specifies the background behavior for the input. Only available for \`file\` and
4914
+ * \`file_array\` input types with kind \`image\`.
4915
+ */
4916
+ backgroundBehavior?: 'opaque' | 'transparent';
4718
4917
 
4719
- /**
4720
- * This is the desired node output value if ref is an if/else node.
4721
- */
4722
- equal?: string;
4918
+ /**
4919
+ * Whether the input is a color or not. Only available for \`string\` input type.
4920
+ */
4921
+ color?: boolean;
4723
4922
 
4724
- /**
4725
- * The name of the input or output to reference. If the type is 'workflow', the
4726
- * name is the name of the input of the workflow is required If the type is 'node',
4727
- * the name is not mandatory, except if you want all outputs of the node. To get
4728
- * all outputs of a node, you can use the name 'all'.
4729
- */
4730
- name?: string;
4923
+ /**
4924
+ * Whether this input affects the model's cost calculation
4925
+ */
4926
+ costImpact?: boolean;
4731
4927
 
4732
- /**
4733
- * The node id or 'workflow' if the source is a workflow input.
4734
- */
4735
- node?: string;
4736
- }
4928
+ /**
4929
+ * The default value for the input
4930
+ */
4931
+ default?: unknown;
4737
4932
 
4738
- /**
4739
- * Set of rules that describes when this input is required:
4740
- *
4741
- * - \`always\`: Input is always required
4742
- * - \`ifNotDefined\`: Input is required when another specified input is not
4743
- * defined
4744
- * - \`ifDefined\`: Input is required when another specified input is defined
4745
- * - \`conditionalValues\`: Input is required when another input has a specific
4746
- * value
4747
- *
4748
- * By default, the input is not required.
4749
- */
4750
- export interface Required {
4751
- /**
4752
- * Whether the input is always required
4753
- */
4754
- always?: boolean;
4933
+ /**
4934
+ * Help text displayed in the UI to provide additional information about the input
4935
+ */
4936
+ description?: string;
4755
4937
 
4756
- /**
4757
- * Makes this input required when another input has a specific value:
4758
- *
4759
- * - Key: name of the input to check
4760
- * - Value: operation and allowed values that trigger the requirement
4761
- */
4762
- conditionalValues?: unknown;
4938
+ /**
4939
+ * Used to visually group inputs together in the UI. Inputs with the same group
4940
+ * value appear consecutively in the UI.
4941
+ */
4942
+ group?: string;
4763
4943
 
4764
- /**
4765
- * Makes this input required when another input is defined:
4766
- *
4767
- * - Key: name of the input that must be defined
4768
- * - Value: message to display when this input is required
4769
- */
4770
- ifDefined?: unknown;
4944
+ /**
4945
+ * Hint text displayed in the UI as a tooltip to guide the user
4946
+ */
4947
+ hint?: string;
4771
4948
 
4772
- /**
4773
- * Makes this input required when another input is not defined:
4774
- *
4775
- * - Key: name of the input that must be undefined
4776
- * - Value: message to display when this input is required
4777
- */
4778
- ifNotDefined?: unknown;
4779
- }
4780
- }
4949
+ /**
4950
+ * The list of inputs which form an object within a container array. All inputs are
4951
+ * the same as the current object. This is only available for type inputs_array
4952
+ * inputs.
4953
+ */
4954
+ inputs?: Array<{ [key: string]: unknown }>;
4781
4955
 
4782
- /**
4783
- * The reference to another input or output of the same workflow. Must have at
4784
- * least one of node or conditional.
4785
- */
4786
- export interface Ref {
4787
- /**
4788
- * The conditional nodes to reference. If the conditional nodes are successful, the
4789
- * node will be successful. If the conditional nodes are skipped, the node will be
4790
- * skipped. Contains an array of node ids used to check the status of the nodes.
4791
- */
4792
- conditional?: Array<string>;
4956
+ /**
4957
+ * The asset kind of the input. Only taken into account for \`file\` and
4958
+ * \`file_array\` input types. If model provides multiple kinds, the input will be
4959
+ * not able to create the asset on the flight on API side with dataurl without
4960
+ * data:kind, prefix
4961
+ */
4962
+ kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
4793
4963
 
4794
- /**
4795
- * This is the desired node output value if ref is an if/else node.
4796
- */
4797
- equal?: string;
4964
+ /**
4965
+ * The label displayed in the UI for this input
4966
+ */
4967
+ label?: string;
4798
4968
 
4799
- /**
4800
- * The name of the input or output to reference. If the type is 'workflow', the
4801
- * name is the name of the input of the workflow is required If the type is 'node',
4802
- * the name is not mandatory, except if you want all outputs of the node. To get
4803
- * all outputs of a node, you can use the name 'all'.
4804
- */
4805
- name?: string;
4969
+ /**
4970
+ * The name of the file input field to use as the mask source
4971
+ */
4972
+ maskFrom?: string;
4806
4973
 
4807
- /**
4808
- * The node id or 'workflow' if the source is a workflow input.
4809
- */
4810
- node?: string;
4811
- }
4974
+ /**
4975
+ * The maximum allowed value. Only available for \`number\` and \`array\` input
4976
+ * types.
4977
+ */
4978
+ max?: number;
4812
4979
 
4813
- /**
4814
- * Set of rules that describes when this input is required:
4815
- *
4816
- * - \`always\`: Input is always required
4817
- * - \`ifNotDefined\`: Input is required when another specified input is not
4818
- * defined
4819
- * - \`ifDefined\`: Input is required when another specified input is defined
4820
- * - \`conditionalValues\`: Input is required when another input has a specific
4821
- * value
4822
- *
4823
- * By default, the input is not required.
4824
- */
4825
- export interface Required {
4826
- /**
4827
- * Whether the input is always required
4828
- */
4829
- always?: boolean;
4980
+ /**
4981
+ * The maximum allowed length for \`string\` inputs. Also applies to each item in
4982
+ * \`string_array\`.
4983
+ */
4984
+ maxLength?: number;
4830
4985
 
4831
- /**
4832
- * Makes this input required when another input has a specific value:
4833
- *
4834
- * - Key: name of the input to check
4835
- * - Value: operation and allowed values that trigger the requirement
4836
- */
4837
- conditionalValues?: unknown;
4986
+ /**
4987
+ * The maximum allowed file size in bytes. Only applies to \`file\` and
4988
+ * \`file_array\` input types. Validated against \`asset.properties.size\` at job
4989
+ * creation time.
4990
+ */
4991
+ maxSize?: number;
4838
4992
 
4839
- /**
4840
- * Makes this input required when another input is defined:
4841
- *
4842
- * - Key: name of the input that must be defined
4843
- * - Value: message to display when this input is required
4844
- */
4845
- ifDefined?: unknown;
4846
-
4847
- /**
4848
- * Makes this input required when another input is not defined:
4849
- *
4850
- * - Key: name of the input that must be undefined
4851
- * - Value: message to display when this input is required
4852
- */
4853
- ifNotDefined?: unknown;
4854
- }
4855
- }
4856
-
4857
- /**
4858
- * The logic of the node. Only available for logic nodes.
4859
- */
4860
- export interface Logic {
4861
- /**
4862
- * The cases of the logic. Only available for if/else nodes.
4863
- */
4864
- cases?: Array<Logic.Case>;
4865
-
4866
- /**
4867
- * The default case of the logic. Contains the id/output of the node to execute if
4868
- * no case is matched. Only available for if/else nodes.
4869
- */
4870
- default?: string;
4871
-
4872
- /**
4873
- * The transform of the logic. Only available for transform nodes.
4874
- */
4875
- transform?: string;
4876
- }
4877
-
4878
- export namespace Logic {
4879
- export interface Case {
4880
- condition: string;
4881
-
4882
- value: string;
4883
- }
4884
- }
4885
- }
4993
+ /**
4994
+ * The minimum allowed value. Only available for \`number\` and array input types.
4995
+ */
4996
+ min?: number;
4886
4997
 
4887
4998
  /**
4888
- * Defines the input parameters for a model. Use this to understand the available
4889
- * input parameters for a given `modelId` when calling
4890
- * `POST /generate/custom/{modelId}`. See {@link
4891
- * https://docs.scenario.com/docs/video-generation} for examples.
4999
+ * The minimum allowed length for string inputs. Also applies to each item in
5000
+ * \`string_array\`.
4892
5001
  */
4893
- export interface Input {
4894
- /**
4895
- * The name that must be user to call the model through the API
4896
- */
4897
- name: string;
4898
-
4899
- /**
4900
- * The data type of the input
4901
- */
4902
- type:
4903
- | 'boolean'
4904
- | 'file'
4905
- | 'file_array'
4906
- | 'inputs_array'
4907
- | 'model'
4908
- | 'model_array'
4909
- | 'number'
4910
- | 'number_array'
4911
- | 'string'
4912
- | 'string_array';
4913
-
4914
- /**
4915
- * The allowed values for the input. For \`string\` or \`number\` types, creates a
4916
- * single-select dropdown. For \`string_array\` type, creates a multi-select
4917
- * dropdown.
4918
- */
4919
- allowedValues?: Array<unknown>;
4920
-
4921
- /**
4922
- * Specifies the background behavior for the input. Only available for \`file\` and
4923
- * \`file_array\` input types with kind \`image\`.
4924
- */
4925
- backgroundBehavior?: 'opaque' | 'transparent';
4926
-
4927
- /**
4928
- * Whether the input is a color or not. Only available for \`string\` input type.
4929
- */
4930
- color?: boolean;
4931
-
4932
- /**
4933
- * Whether this input affects the model's cost calculation
4934
- */
4935
- costImpact?: boolean;
4936
-
4937
- /**
4938
- * The default value for the input
4939
- */
4940
- default?: unknown;
4941
-
4942
- /**
4943
- * Help text displayed in the UI to provide additional information about the input
4944
- */
4945
- description?: string;
4946
-
4947
- /**
4948
- * Used to visually group inputs together in the UI. Inputs with the same group
4949
- * value appear consecutively in the UI.
4950
- */
4951
- group?: string;
4952
-
4953
- /**
4954
- * Hint text displayed in the UI as a tooltip to guide the user
4955
- */
4956
- hint?: string;
4957
-
4958
- /**
4959
- * The list of inputs which form an object within a container array. All inputs are
4960
- * the same as the current object. This is only available for type inputs_array
4961
- * inputs.
4962
- */
4963
- inputs?: Array<{ [key: string]: unknown }>;
4964
-
4965
- /**
4966
- * The asset kind of the input. Only taken into account for \`file\` and
4967
- * \`file_array\` input types. If model provides multiple kinds, the input will be
4968
- * not able to create the asset on the flight on API side with dataurl without
4969
- * data:kind, prefix
4970
- */
4971
- kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
4972
-
4973
- /**
4974
- * The label displayed in the UI for this input
4975
- */
4976
- label?: string;
4977
-
4978
- /**
4979
- * The name of the file input field to use as the mask source
4980
- */
4981
- maskFrom?: string;
4982
-
4983
- /**
4984
- * The maximum allowed value. Only available for \`number\` and \`array\` input
4985
- * types.
4986
- */
4987
- max?: number;
4988
-
4989
- /**
4990
- * The maximum allowed length for \`string\` inputs. Also applies to each item in
4991
- * \`string_array\`.
4992
- */
4993
- maxLength?: number;
5002
+ minLength?: number;
4994
5003
 
4995
- /**
4996
- * The maximum allowed file size in bytes. Only applies to \`file\` and
4997
- * \`file_array\` input types. Validated against \`asset.properties.size\` at job
4998
- * creation time.
4999
- */
5000
- maxSize?: number;
5004
+ /**
5005
+ * The allowed model types for this input. Example: \`["flux.1-lora"]\`. Only
5006
+ * available for \`model_array\` input type.
5007
+ */
5008
+ modelTypes?: Array<
5009
+ | 'custom'
5010
+ | 'elevenlabs-voice'
5011
+ | 'flux.1'
5012
+ | 'flux.1-composition'
5013
+ | 'flux.1-kontext-dev'
5014
+ | 'flux.1-kontext-lora'
5015
+ | 'flux.1-krea-dev'
5016
+ | 'flux.1-krea-lora'
5017
+ | 'flux.1-lora'
5018
+ | 'flux.1-pro'
5019
+ | 'flux.1.1-pro-ultra'
5020
+ | 'flux.2-dev-edit-lora'
5021
+ | 'flux.2-dev-lora'
5022
+ | 'flux.2-klein-4b-edit-lora'
5023
+ | 'flux.2-klein-4b-lora'
5024
+ | 'flux.2-klein-9b-edit-lora'
5025
+ | 'flux.2-klein-9b-lora'
5026
+ | 'flux.2-klein-base-4b-edit-lora'
5027
+ | 'flux.2-klein-base-4b-lora'
5028
+ | 'flux.2-klein-base-9b-edit-lora'
5029
+ | 'flux.2-klein-base-9b-lora'
5030
+ | 'flux1.1-pro'
5031
+ | 'gpt-image-1'
5032
+ | 'qwen-image-2512-lora'
5033
+ | 'qwen-image-edit-2509-lora'
5034
+ | 'qwen-image-edit-2511-lora'
5035
+ | 'qwen-image-edit-lora'
5036
+ | 'qwen-image-lora'
5037
+ | 'sd-1_5'
5038
+ | 'sd-1_5-composition'
5039
+ | 'sd-1_5-lora'
5040
+ | 'sd-xl'
5041
+ | 'sd-xl-composition'
5042
+ | 'sd-xl-lora'
5043
+ | 'zimage-de-turbo-lora'
5044
+ | 'zimage-lora'
5045
+ | 'zimage-turbo-lora'
5046
+ >;
5001
5047
 
5002
- /**
5003
- * The minimum allowed value. Only available for \`number\` and array input types.
5004
- */
5005
- min?: number;
5048
+ /**
5049
+ * Whether this input represents a parent asset to assign to the produced assets.
5050
+ * Only available for \`file\` and \`file_array\` input types.
5051
+ *
5052
+ * For \`file_array\`, the parent asset is the first item in the array.
5053
+ */
5054
+ parent?: boolean;
5006
5055
 
5007
- /**
5008
- * The minimum allowed length for string inputs. Also applies to each item in
5009
- * \`string_array\`.
5010
- */
5011
- minLength?: number;
5056
+ /**
5057
+ * Placeholder text for the input. Only available for 'string' input type.
5058
+ */
5059
+ placeholder?: string;
5012
5060
 
5013
- /**
5014
- * The allowed model types for this input. Example: \`["flux.1-lora"]\`. Only
5015
- * available for \`model_array\` input type.
5016
- */
5017
- modelTypes?: Array<
5018
- | 'custom'
5019
- | 'elevenlabs-voice'
5020
- | 'flux.1'
5021
- | 'flux.1-composition'
5022
- | 'flux.1-kontext-dev'
5023
- | 'flux.1-kontext-lora'
5024
- | 'flux.1-krea-dev'
5025
- | 'flux.1-krea-lora'
5026
- | 'flux.1-lora'
5027
- | 'flux.1-pro'
5028
- | 'flux.1.1-pro-ultra'
5029
- | 'flux.2-dev-edit-lora'
5030
- | 'flux.2-dev-lora'
5031
- | 'flux.2-klein-4b-edit-lora'
5032
- | 'flux.2-klein-4b-lora'
5033
- | 'flux.2-klein-9b-edit-lora'
5034
- | 'flux.2-klein-9b-lora'
5035
- | 'flux.2-klein-base-4b-edit-lora'
5036
- | 'flux.2-klein-base-4b-lora'
5037
- | 'flux.2-klein-base-9b-edit-lora'
5038
- | 'flux.2-klein-base-9b-lora'
5039
- | 'flux1.1-pro'
5040
- | 'gpt-image-1'
5041
- | 'qwen-image-2512-lora'
5042
- | 'qwen-image-edit-2509-lora'
5043
- | 'qwen-image-edit-2511-lora'
5044
- | 'qwen-image-edit-lora'
5045
- | 'qwen-image-lora'
5046
- | 'sd-1_5'
5047
- | 'sd-1_5-composition'
5048
- | 'sd-1_5-lora'
5049
- | 'sd-xl'
5050
- | 'sd-xl-composition'
5051
- | 'sd-xl-lora'
5052
- | 'zimage-de-turbo-lora'
5053
- | 'zimage-lora'
5054
- | 'zimage-turbo-lora'
5055
- >;
5061
+ /**
5062
+ * Whether the input is a prompt. When true, displays as a text area with prompt
5063
+ * spark feature. Only available for \`string\` input type.
5064
+ */
5065
+ prompt?: boolean;
5056
5066
 
5057
- /**
5058
- * Whether this input represents a parent asset to assign to the produced assets.
5059
- * Only available for \`file\` and \`file_array\` input types.
5060
- *
5061
- * For \`file_array\`, the parent asset is the first item in the array.
5062
- */
5063
- parent?: boolean;
5067
+ /**
5068
+ * Whether the input is used with prompt spark. Only available for \`string\` input
5069
+ * type.
5070
+ */
5071
+ promptSpark?: boolean;
5064
5072
 
5065
- /**
5066
- * Placeholder text for the input. Only available for 'string' input type.
5067
- */
5068
- placeholder?: string;
5073
+ /**
5074
+ * Set of rules that describes when this input is required:
5075
+ *
5076
+ * - \`always\`: Input is always required
5077
+ * - \`ifNotDefined\`: Input is required when another specified input is not
5078
+ * defined
5079
+ * - \`ifDefined\`: Input is required when another specified input is defined
5080
+ * - \`conditionalValues\`: Input is required when another input has a specific
5081
+ * value
5082
+ *
5083
+ * By default, the input is not required.
5084
+ */
5085
+ required?: Input.Required;
5069
5086
 
5070
- /**
5071
- * Whether the input is a prompt. When true, displays as a text area with prompt
5072
- * spark feature. Only available for \`string\` input type.
5073
- */
5074
- prompt?: boolean;
5087
+ /**
5088
+ * The step increment for numeric inputs. Only available for \`number\` input type.
5089
+ */
5090
+ step?: number;
5091
+ }
5075
5092
 
5093
+ export namespace Input {
5094
+ /**
5095
+ * Set of rules that describes when this input is required:
5096
+ *
5097
+ * - \`always\`: Input is always required
5098
+ * - \`ifNotDefined\`: Input is required when another specified input is not
5099
+ * defined
5100
+ * - \`ifDefined\`: Input is required when another specified input is defined
5101
+ * - \`conditionalValues\`: Input is required when another input has a specific
5102
+ * value
5103
+ *
5104
+ * By default, the input is not required.
5105
+ */
5106
+ export interface Required {
5076
5107
  /**
5077
- * Whether the input is used with prompt spark. Only available for \`string\` input
5078
- * type.
5108
+ * Whether the input is always required
5079
5109
  */
5080
- promptSpark?: boolean;
5110
+ always?: boolean;
5081
5111
 
5082
5112
  /**
5083
- * Set of rules that describes when this input is required:
5084
- *
5085
- * - \`always\`: Input is always required
5086
- * - \`ifNotDefined\`: Input is required when another specified input is not
5087
- * defined
5088
- * - \`ifDefined\`: Input is required when another specified input is defined
5089
- * - \`conditionalValues\`: Input is required when another input has a specific
5090
- * value
5113
+ * Makes this input required when another input has a specific value:
5091
5114
  *
5092
- * By default, the input is not required.
5115
+ * - Key: name of the input to check
5116
+ * - Value: operation and allowed values that trigger the requirement
5093
5117
  */
5094
- required?: Input.Required;
5118
+ conditionalValues?: unknown;
5095
5119
 
5096
5120
  /**
5097
- * The step increment for numeric inputs. Only available for \`number\` input type.
5121
+ * Makes this input required when another input is defined:
5122
+ *
5123
+ * - Key: name of the input that must be defined
5124
+ * - Value: message to display when this input is required
5098
5125
  */
5099
- step?: number;
5100
- }
5126
+ ifDefined?: unknown;
5101
5127
 
5102
- export namespace Input {
5103
5128
  /**
5104
- * Set of rules that describes when this input is required:
5105
- *
5106
- * - \`always\`: Input is always required
5107
- * - \`ifNotDefined\`: Input is required when another specified input is not
5108
- * defined
5109
- * - \`ifDefined\`: Input is required when another specified input is defined
5110
- * - \`conditionalValues\`: Input is required when another input has a specific
5111
- * value
5129
+ * Makes this input required when another input is not defined:
5112
5130
  *
5113
- * By default, the input is not required.
5131
+ * - Key: name of the input that must be undefined
5132
+ * - Value: message to display when this input is required
5114
5133
  */
5115
- export interface Required {
5116
- /**
5117
- * Whether the input is always required
5118
- */
5119
- always?: boolean;
5134
+ ifNotDefined?: unknown;
5135
+ }
5136
+ }
5120
5137
 
5121
- /**
5122
- * Makes this input required when another input has a specific value:
5123
- *
5124
- * - Key: name of the input to check
5125
- * - Value: operation and allowed values that trigger the requirement
5126
- */
5127
- conditionalValues?: unknown;
5138
+ /**
5139
+ * A representation of an asset after being processed by the workflow
5140
+ */
5141
+ export interface After {
5142
+ /**
5143
+ * The AssetId of the image used as a thumbnail for your model (example:
5144
+ * "asset_GTrL3mq4SXWyMxkOHRxlpw")
5145
+ */
5146
+ assetId: string;
5128
5147
 
5129
- /**
5130
- * Makes this input required when another input is defined:
5131
- *
5132
- * - Key: name of the input that must be defined
5133
- * - Value: message to display when this input is required
5134
- */
5135
- ifDefined?: unknown;
5148
+ /**
5149
+ * The url of the image used as a thumbnail for your model
5150
+ */
5151
+ url: string;
5152
+ }
5136
5153
 
5137
- /**
5138
- * Makes this input required when another input is not defined:
5139
- *
5140
- * - Key: name of the input that must be undefined
5141
- * - Value: message to display when this input is required
5142
- */
5143
- ifNotDefined?: unknown;
5144
- }
5145
- }
5154
+ /**
5155
+ * A representation of an asset before being processed by the workflow
5156
+ */
5157
+ export interface Before {
5158
+ /**
5159
+ * The AssetId of the image used as a thumbnail for your model (example:
5160
+ * "asset_GTrL3mq4SXWyMxkOHRxlpw")
5161
+ */
5162
+ assetId: string;
5146
5163
 
5147
5164
  /**
5148
- * A representation of an asset after being processed by the workflow
5165
+ * The url of the image used as a thumbnail for your model
5149
5166
  */
5150
- export interface After {
5151
- /**
5152
- * The AssetId of the image used as a thumbnail for your model (example:
5153
- * "asset_GTrL3mq4SXWyMxkOHRxlpw")
5154
- */
5155
- assetId: string;
5167
+ url: string;
5168
+ }
5156
5169
 
5157
- /**
5158
- * The url of the image used as a thumbnail for your model
5159
- */
5160
- url: string;
5161
- }
5170
+ /**
5171
+ * Currently the thumbnail is identical to the after asset.
5172
+ */
5173
+ export interface Thumbnail {
5174
+ assetId: string;
5175
+
5176
+ url: string;
5177
+ }
5162
5178
 
5179
+ /**
5180
+ * The UI configuration for the workflow. This is managed by scenario webapp.
5181
+ */
5182
+ export interface UiConfig {
5163
5183
  /**
5164
- * A representation of an asset before being processed by the workflow
5184
+ * Configuration for the input properties
5165
5185
  */
5166
- export interface Before {
5167
- /**
5168
- * The AssetId of the image used as a thumbnail for your model (example:
5169
- * "asset_GTrL3mq4SXWyMxkOHRxlpw")
5170
- */
5171
- assetId: string;
5186
+ inputProperties?: { [key: string]: UiConfig.InputProperties };
5172
5187
 
5173
- /**
5174
- * The url of the image used as a thumbnail for your model
5175
- */
5176
- url: string;
5177
- }
5188
+ /**
5189
+ * Configuration for the loras component
5190
+ */
5191
+ lorasComponent?: UiConfig.LorasComponent;
5178
5192
 
5179
5193
  /**
5180
- * Currently the thumbnail is identical to the after asset.
5194
+ * Configuration for the presets
5181
5195
  */
5182
- export interface Thumbnail {
5183
- assetId: string;
5196
+ presets?: Array<UiConfig.Preset>;
5184
5197
 
5185
- url: string;
5198
+ /**
5199
+ * Configuration for the resolution component
5200
+ */
5201
+ resolutionComponent?: UiConfig.ResolutionComponent;
5202
+
5203
+ /**
5204
+ * Configuration for the selects
5205
+ */
5206
+ selects?: { [key: string]: unknown };
5207
+
5208
+ /**
5209
+ * Configuration for the trigger generate button
5210
+ */
5211
+ triggerGenerate?: UiConfig.TriggerGenerate;
5212
+ }
5213
+
5214
+ export namespace UiConfig {
5215
+ export interface InputProperties {
5216
+ collapsed?: boolean;
5186
5217
  }
5187
5218
 
5188
5219
  /**
5189
- * The UI configuration for the workflow. This is managed by scenario webapp.
5220
+ * Configuration for the loras component
5190
5221
  */
5191
- export interface UiConfig {
5222
+ export interface LorasComponent {
5192
5223
  /**
5193
- * Configuration for the input properties
5224
+ * The label of the component
5194
5225
  */
5195
- inputProperties?: { [key: string]: UiConfig.InputProperties };
5226
+ label: string;
5196
5227
 
5197
5228
  /**
5198
- * Configuration for the loras component
5229
+ * The input name of the model (model_array)
5199
5230
  */
5200
- lorasComponent?: UiConfig.LorasComponent;
5231
+ modelInput: string;
5201
5232
 
5202
5233
  /**
5203
- * Configuration for the presets
5234
+ * The input name of the scale (number_array)
5204
5235
  */
5205
- presets?: Array<UiConfig.Preset>;
5236
+ scaleInput: string;
5206
5237
 
5207
5238
  /**
5208
- * Configuration for the resolution component
5239
+ * The input model id (example: a composition or a single LoRA modelId) If
5240
+ * specified, the model id will be attached to the output asset as a metadata If
5241
+ * the model-decomposer parser is specified on it, modelInput and scaleInput will
5242
+ * be automatically populated
5209
5243
  */
5210
- resolutionComponent?: UiConfig.ResolutionComponent;
5244
+ modelIdInput?: string;
5245
+ }
5211
5246
 
5247
+ export interface Preset {
5248
+ fields: Array<string>;
5249
+
5250
+ presets: unknown;
5251
+ }
5252
+
5253
+ /**
5254
+ * Configuration for the resolution component
5255
+ */
5256
+ export interface ResolutionComponent {
5212
5257
  /**
5213
- * Configuration for the selects
5258
+ * The input name of the height
5214
5259
  */
5215
- selects?: { [key: string]: unknown };
5260
+ heightInput: string;
5216
5261
 
5217
5262
  /**
5218
- * Configuration for the trigger generate button
5263
+ * The label of the component
5219
5264
  */
5220
- triggerGenerate?: UiConfig.TriggerGenerate;
5221
- }
5222
-
5223
- export namespace UiConfig {
5224
- export interface InputProperties {
5225
- collapsed?: boolean;
5226
- }
5265
+ label: string;
5227
5266
 
5228
5267
  /**
5229
- * Configuration for the loras component
5268
+ * The resolution presets
5230
5269
  */
5231
- export interface LorasComponent {
5232
- /**
5233
- * The label of the component
5234
- */
5235
- label: string;
5236
-
5237
- /**
5238
- * The input name of the model (model_array)
5239
- */
5240
- modelInput: string;
5241
-
5242
- /**
5243
- * The input name of the scale (number_array)
5244
- */
5245
- scaleInput: string;
5246
-
5247
- /**
5248
- * The input model id (example: a composition or a single LoRA modelId) If
5249
- * specified, the model id will be attached to the output asset as a metadata If
5250
- * the model-decomposer parser is specified on it, modelInput and scaleInput will
5251
- * be automatically populated
5252
- */
5253
- modelIdInput?: string;
5254
- }
5255
-
5256
- export interface Preset {
5257
- fields: Array<string>;
5258
-
5259
- presets: unknown;
5260
- }
5270
+ presets: Array<ResolutionComponent.Preset>;
5261
5271
 
5262
5272
  /**
5263
- * Configuration for the resolution component
5273
+ * The input name of the width
5264
5274
  */
5265
- export interface ResolutionComponent {
5266
- /**
5267
- * The input name of the height
5268
- */
5269
- heightInput: string;
5275
+ widthInput: string;
5276
+ }
5270
5277
 
5271
- /**
5272
- * The label of the component
5273
- */
5274
- label: string;
5278
+ export namespace ResolutionComponent {
5279
+ export interface Preset {
5280
+ height: number;
5275
5281
 
5276
- /**
5277
- * The resolution presets
5278
- */
5279
- presets: Array<ResolutionComponent.Preset>;
5282
+ label: string;
5280
5283
 
5281
- /**
5282
- * The input name of the width
5283
- */
5284
- widthInput: string;
5284
+ width: number;
5285
5285
  }
5286
+ }
5286
5287
 
5287
- export namespace ResolutionComponent {
5288
- export interface Preset {
5289
- height: number;
5290
-
5291
- label: string;
5292
-
5293
- width: number;
5294
- }
5295
- }
5288
+ /**
5289
+ * Configuration for the trigger generate button
5290
+ */
5291
+ export interface TriggerGenerate {
5292
+ label: string;
5296
5293
 
5297
5294
  /**
5298
- * Configuration for the trigger generate button
5295
+ * The 'name' of the input where the trigger generate button will be displayed
5296
+ * (after the input). Do not specify both position and after.
5299
5297
  */
5300
- export interface TriggerGenerate {
5301
- label: string;
5302
-
5303
- /**
5304
- * The 'name' of the input where the trigger generate button will be displayed
5305
- * (after the input). Do not specify both position and after.
5306
- */
5307
- after?: string;
5298
+ after?: string;
5308
5299
 
5309
- /**
5310
- * The position of the trigger generate button. If position specified, the button
5311
- * will be displayed at the specified position. Do not specify both position and
5312
- * after.
5313
- */
5314
- position?: 'bottom' | 'top';
5315
- }
5300
+ /**
5301
+ * The position of the trigger generate button. If position specified, the button
5302
+ * will be displayed at the specified position. Do not specify both position and
5303
+ * after.
5304
+ */
5305
+ position?: 'bottom' | 'top';
5316
5306
  }
5317
5307
  }
5318
5308
  }
@@ -9614,18 +9604,13 @@ export namespace WorkflowUpdateParams {
9614
9604
  }
9615
9605
  }
9616
9606
 
9617
- export interface WorkflowListParams {
9607
+ export interface WorkflowListParams extends WorkflowsCursorParams {
9618
9608
  /**
9619
9609
  * The number of items to return in the response. The default value is 10, maximum
9620
9610
  * value is 200, minimum value is 1
9621
9611
  */
9622
9612
  pageSize?: number;
9623
9613
 
9624
- /**
9625
- * A token you received in a previous request to query the next page of items
9626
- */
9627
- paginationToken?: string;
9628
-
9629
9614
  /**
9630
9615
  * The privacy of the workflows to return. The default value is `private`, possible
9631
9616
  * values are `private`, `public` and `unlisted`. Default value is `private`.
@@ -9681,6 +9666,7 @@ export declare namespace Workflows {
9681
9666
  type WorkflowApproveUserResponse as WorkflowApproveUserResponse,
9682
9667
  type WorkflowGetTagsResponse as WorkflowGetTagsResponse,
9683
9668
  type WorkflowRunResponse as WorkflowRunResponse,
9669
+ type WorkflowListResponsesWorkflowsCursor as WorkflowListResponsesWorkflowsCursor,
9684
9670
  type WorkflowCreateParams as WorkflowCreateParams,
9685
9671
  type WorkflowUpdateParams as WorkflowUpdateParams,
9686
9672
  type WorkflowListParams as WorkflowListParams,