@scenario-labs/sdk 3.2.0 → 3.3.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 (516) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/client.d.mts +20 -5
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +20 -5
  5. package/client.d.ts.map +1 -1
  6. package/client.js +9 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +9 -0
  9. package/client.mjs.map +1 -1
  10. package/core/pagination.d.mts +42 -0
  11. package/core/pagination.d.mts.map +1 -1
  12. package/core/pagination.d.ts +42 -0
  13. package/core/pagination.d.ts.map +1 -1
  14. package/core/pagination.js +79 -1
  15. package/core/pagination.js.map +1 -1
  16. package/core/pagination.mjs +75 -0
  17. package/core/pagination.mjs.map +1 -1
  18. package/internal/utils/values.d.mts +6 -0
  19. package/internal/utils/values.d.mts.map +1 -1
  20. package/internal/utils/values.d.ts +6 -0
  21. package/internal/utils/values.d.ts.map +1 -1
  22. package/internal/utils/values.js +11 -0
  23. package/internal/utils/values.js.map +1 -1
  24. package/internal/utils/values.mjs +10 -0
  25. package/internal/utils/values.mjs.map +1 -1
  26. package/lib/generate.js +7 -7
  27. package/lib/generate.js.map +1 -1
  28. package/lib/generate.mjs +7 -7
  29. package/lib/generate.mjs.map +1 -1
  30. package/lib/job.d.mts +1 -1
  31. package/lib/job.d.mts.map +1 -1
  32. package/lib/job.d.ts +1 -1
  33. package/lib/job.d.ts.map +1 -1
  34. package/lib/job.js +5 -6
  35. package/lib/job.js.map +1 -1
  36. package/lib/job.mjs +6 -7
  37. package/lib/job.mjs.map +1 -1
  38. package/lib/models.d.mts.map +1 -1
  39. package/lib/models.d.ts.map +1 -1
  40. package/lib/models.js +7 -5
  41. package/lib/models.js.map +1 -1
  42. package/lib/models.mjs +8 -6
  43. package/lib/models.mjs.map +1 -1
  44. package/lib/query.d.mts +21 -0
  45. package/lib/query.d.mts.map +1 -0
  46. package/lib/query.d.ts +21 -0
  47. package/lib/query.d.ts.map +1 -0
  48. package/lib/query.js +36 -0
  49. package/lib/query.js.map +1 -0
  50. package/lib/query.mjs +33 -0
  51. package/lib/query.mjs.map +1 -0
  52. package/lib/scenario.d.mts +3 -0
  53. package/lib/scenario.d.mts.map +1 -1
  54. package/lib/scenario.d.ts +3 -0
  55. package/lib/scenario.d.ts.map +1 -1
  56. package/lib/scenario.js +6 -0
  57. package/lib/scenario.js.map +1 -1
  58. package/lib/scenario.mjs +6 -0
  59. package/lib/scenario.mjs.map +1 -1
  60. package/lib/scope.d.mts +27 -7
  61. package/lib/scope.d.mts.map +1 -1
  62. package/lib/scope.d.ts +27 -7
  63. package/lib/scope.d.ts.map +1 -1
  64. package/lib/scope.js +40 -7
  65. package/lib/scope.js.map +1 -1
  66. package/lib/scope.mjs +37 -7
  67. package/lib/scope.mjs.map +1 -1
  68. package/lib/upload.d.mts +1 -1
  69. package/lib/upload.d.mts.map +1 -1
  70. package/lib/upload.d.ts +1 -1
  71. package/lib/upload.d.ts.map +1 -1
  72. package/lib/upload.js +6 -7
  73. package/lib/upload.js.map +1 -1
  74. package/lib/upload.mjs +7 -8
  75. package/lib/upload.mjs.map +1 -1
  76. package/lib/workflow.d.mts.map +1 -1
  77. package/lib/workflow.d.ts.map +1 -1
  78. package/lib/workflow.js +8 -6
  79. package/lib/workflow.js.map +1 -1
  80. package/lib/workflow.mjs +9 -7
  81. package/lib/workflow.mjs.map +1 -1
  82. package/lib/workflow_validator.d.mts +5 -0
  83. package/lib/workflow_validator.d.mts.map +1 -1
  84. package/lib/workflow_validator.d.ts +5 -0
  85. package/lib/workflow_validator.d.ts.map +1 -1
  86. package/lib/workflow_validator.js +113 -0
  87. package/lib/workflow_validator.js.map +1 -1
  88. package/lib/workflow_validator.mjs +113 -0
  89. package/lib/workflow_validator.mjs.map +1 -1
  90. package/package.json +1 -1
  91. package/resources/assets/assets.d.mts +130 -31
  92. package/resources/assets/assets.d.mts.map +1 -1
  93. package/resources/assets/assets.d.ts +130 -31
  94. package/resources/assets/assets.d.ts.map +1 -1
  95. package/resources/assets/assets.js +34 -11
  96. package/resources/assets/assets.js.map +1 -1
  97. package/resources/assets/assets.mjs +34 -11
  98. package/resources/assets/assets.mjs.map +1 -1
  99. package/resources/assets/download.d.mts +24 -5
  100. package/resources/assets/download.d.mts.map +1 -1
  101. package/resources/assets/download.d.ts +24 -5
  102. package/resources/assets/download.d.ts.map +1 -1
  103. package/resources/assets/download.js +15 -3
  104. package/resources/assets/download.js.map +1 -1
  105. package/resources/assets/download.mjs +15 -3
  106. package/resources/assets/download.mjs.map +1 -1
  107. package/resources/collections/assets.d.mts.map +1 -1
  108. package/resources/collections/assets.d.ts.map +1 -1
  109. package/resources/collections/assets.js +3 -2
  110. package/resources/collections/assets.js.map +1 -1
  111. package/resources/collections/assets.mjs +3 -2
  112. package/resources/collections/assets.mjs.map +1 -1
  113. package/resources/collections/collections.d.mts.map +1 -1
  114. package/resources/collections/collections.d.ts.map +1 -1
  115. package/resources/collections/collections.js +20 -5
  116. package/resources/collections/collections.js.map +1 -1
  117. package/resources/collections/collections.mjs +20 -5
  118. package/resources/collections/collections.mjs.map +1 -1
  119. package/resources/collections/models.d.mts.map +1 -1
  120. package/resources/collections/models.d.ts.map +1 -1
  121. package/resources/collections/models.js +3 -2
  122. package/resources/collections/models.js.map +1 -1
  123. package/resources/collections/models.mjs +3 -2
  124. package/resources/collections/models.mjs.map +1 -1
  125. package/resources/generate.d.mts +1719 -225
  126. package/resources/generate.d.mts.map +1 -1
  127. package/resources/generate.d.ts +1719 -225
  128. package/resources/generate.d.ts.map +1 -1
  129. package/resources/generate.js +65 -8
  130. package/resources/generate.js.map +1 -1
  131. package/resources/generate.mjs +65 -8
  132. package/resources/generate.mjs.map +1 -1
  133. package/resources/index.d.mts +5 -2
  134. package/resources/index.d.mts.map +1 -1
  135. package/resources/index.d.ts +5 -2
  136. package/resources/index.d.ts.map +1 -1
  137. package/resources/index.js +7 -1
  138. package/resources/index.js.map +1 -1
  139. package/resources/index.mjs +3 -0
  140. package/resources/index.mjs.map +1 -1
  141. package/resources/jobs.d.mts +176 -74
  142. package/resources/jobs.d.mts.map +1 -1
  143. package/resources/jobs.d.ts +176 -74
  144. package/resources/jobs.d.ts.map +1 -1
  145. package/resources/jobs.js +16 -4
  146. package/resources/jobs.js.map +1 -1
  147. package/resources/jobs.mjs +16 -4
  148. package/resources/jobs.mjs.map +1 -1
  149. package/resources/models/description.d.mts +2 -2
  150. package/resources/models/description.d.mts.map +1 -1
  151. package/resources/models/description.d.ts +2 -2
  152. package/resources/models/description.d.ts.map +1 -1
  153. package/resources/models/description.js +6 -2
  154. package/resources/models/description.js.map +1 -1
  155. package/resources/models/description.mjs +6 -2
  156. package/resources/models/description.mjs.map +1 -1
  157. package/resources/models/examples.d.mts +120 -48
  158. package/resources/models/examples.d.mts.map +1 -1
  159. package/resources/models/examples.d.ts +120 -48
  160. package/resources/models/examples.d.ts.map +1 -1
  161. package/resources/models/examples.js +6 -2
  162. package/resources/models/examples.js.map +1 -1
  163. package/resources/models/examples.mjs +6 -2
  164. package/resources/models/examples.mjs.map +1 -1
  165. package/resources/models/index.d.mts +3 -0
  166. package/resources/models/index.d.mts.map +1 -1
  167. package/resources/models/index.d.ts +3 -0
  168. package/resources/models/index.d.ts.map +1 -1
  169. package/resources/models/index.js +7 -1
  170. package/resources/models/index.js.map +1 -1
  171. package/resources/models/index.mjs +3 -0
  172. package/resources/models/index.mjs.map +1 -1
  173. package/resources/models/models.d.mts +215 -77
  174. package/resources/models/models.d.mts.map +1 -1
  175. package/resources/models/models.d.ts +215 -77
  176. package/resources/models/models.d.ts.map +1 -1
  177. package/resources/models/models.js +52 -11
  178. package/resources/models/models.js.map +1 -1
  179. package/resources/models/models.mjs +52 -11
  180. package/resources/models/models.mjs.map +1 -1
  181. package/resources/models/presets.d.mts +1016 -0
  182. package/resources/models/presets.d.mts.map +1 -0
  183. package/resources/models/presets.d.ts +1016 -0
  184. package/resources/models/presets.d.ts.map +1 -0
  185. package/resources/models/presets.js +52 -0
  186. package/resources/models/presets.js.map +1 -0
  187. package/resources/models/presets.mjs +48 -0
  188. package/resources/models/presets.mjs.map +1 -0
  189. package/resources/models/prompt-guide.d.mts +64 -0
  190. package/resources/models/prompt-guide.d.mts.map +1 -0
  191. package/resources/models/prompt-guide.d.ts +64 -0
  192. package/resources/models/prompt-guide.d.ts.map +1 -0
  193. package/resources/models/prompt-guide.js +31 -0
  194. package/resources/models/prompt-guide.js.map +1 -0
  195. package/resources/models/prompt-guide.mjs +27 -0
  196. package/resources/models/prompt-guide.mjs.map +1 -0
  197. package/resources/models/scores.d.mts +278 -0
  198. package/resources/models/scores.d.mts.map +1 -0
  199. package/resources/models/scores.d.ts +278 -0
  200. package/resources/models/scores.d.ts.map +1 -0
  201. package/resources/models/scores.js +29 -0
  202. package/resources/models/scores.js.map +1 -0
  203. package/resources/models/scores.mjs +25 -0
  204. package/resources/models/scores.mjs.map +1 -0
  205. package/resources/models/train.d.mts +108 -45
  206. package/resources/models/train.d.mts.map +1 -1
  207. package/resources/models/train.d.ts +108 -45
  208. package/resources/models/train.d.ts.map +1 -1
  209. package/resources/models/train.js +3 -2
  210. package/resources/models/train.js.map +1 -1
  211. package/resources/models/train.mjs +3 -2
  212. package/resources/models/train.mjs.map +1 -1
  213. package/resources/models/training-images.d.mts.map +1 -1
  214. package/resources/models/training-images.d.ts.map +1 -1
  215. package/resources/models/training-images.js +5 -4
  216. package/resources/models/training-images.js.map +1 -1
  217. package/resources/models/training-images.mjs +5 -4
  218. package/resources/models/training-images.mjs.map +1 -1
  219. package/resources/projects/api-keys.d.mts +54 -0
  220. package/resources/projects/api-keys.d.mts.map +1 -0
  221. package/resources/projects/api-keys.d.ts +54 -0
  222. package/resources/projects/api-keys.d.ts.map +1 -0
  223. package/resources/projects/api-keys.js +23 -0
  224. package/resources/projects/api-keys.js.map +1 -0
  225. package/resources/projects/api-keys.mjs +19 -0
  226. package/resources/projects/api-keys.mjs.map +1 -0
  227. package/resources/projects/brief.d.mts +149 -0
  228. package/resources/projects/brief.d.mts.map +1 -0
  229. package/resources/projects/brief.d.ts +149 -0
  230. package/resources/projects/brief.d.ts.map +1 -0
  231. package/resources/projects/brief.js +28 -0
  232. package/resources/projects/brief.js.map +1 -0
  233. package/resources/projects/brief.mjs +24 -0
  234. package/resources/projects/brief.mjs.map +1 -0
  235. package/resources/projects/index.d.mts +9 -0
  236. package/resources/projects/index.d.mts.map +1 -0
  237. package/resources/projects/index.d.ts +9 -0
  238. package/resources/projects/index.d.ts.map +1 -0
  239. package/resources/projects/index.js +21 -0
  240. package/resources/projects/index.js.map +1 -0
  241. package/resources/projects/index.mjs +10 -0
  242. package/resources/projects/index.mjs.map +1 -0
  243. package/resources/projects/instructions.d.mts +102 -0
  244. package/resources/projects/instructions.d.mts.map +1 -0
  245. package/resources/projects/instructions.d.ts +102 -0
  246. package/resources/projects/instructions.d.ts.map +1 -0
  247. package/resources/projects/instructions.js +24 -0
  248. package/resources/projects/instructions.js.map +1 -0
  249. package/resources/projects/instructions.mjs +20 -0
  250. package/resources/projects/instructions.mjs.map +1 -0
  251. package/resources/projects/members.d.mts +788 -0
  252. package/resources/projects/members.d.mts.map +1 -0
  253. package/resources/projects/members.d.ts +788 -0
  254. package/resources/projects/members.d.ts.map +1 -0
  255. package/resources/projects/members.js +30 -0
  256. package/resources/projects/members.js.map +1 -0
  257. package/resources/projects/members.mjs +26 -0
  258. package/resources/projects/members.mjs.map +1 -0
  259. package/resources/projects/memory.d.mts +102 -0
  260. package/resources/projects/memory.d.mts.map +1 -0
  261. package/resources/projects/memory.d.ts +102 -0
  262. package/resources/projects/memory.d.ts.map +1 -0
  263. package/resources/projects/memory.js +24 -0
  264. package/resources/projects/memory.js.map +1 -0
  265. package/resources/projects/memory.mjs +20 -0
  266. package/resources/projects/memory.mjs.map +1 -0
  267. package/resources/projects/projects.d.mts +1129 -0
  268. package/resources/projects/projects.d.mts.map +1 -0
  269. package/resources/projects/projects.d.ts +1129 -0
  270. package/resources/projects/projects.d.ts.map +1 -0
  271. package/resources/projects/projects.js +79 -0
  272. package/resources/projects/projects.js.map +1 -0
  273. package/resources/projects/projects.mjs +74 -0
  274. package/resources/projects/projects.mjs.map +1 -0
  275. package/resources/projects/watermark.d.mts +459 -0
  276. package/resources/projects/watermark.d.mts.map +1 -0
  277. package/resources/projects/watermark.d.ts +459 -0
  278. package/resources/projects/watermark.d.ts.map +1 -0
  279. package/resources/projects/watermark.js +46 -0
  280. package/resources/projects/watermark.js.map +1 -0
  281. package/resources/projects/watermark.mjs +42 -0
  282. package/resources/projects/watermark.mjs.map +1 -0
  283. package/resources/projects/webhook-endpoints/events.d.mts +87 -0
  284. package/resources/projects/webhook-endpoints/events.d.mts.map +1 -0
  285. package/resources/projects/webhook-endpoints/events.d.ts +87 -0
  286. package/resources/projects/webhook-endpoints/events.d.ts.map +1 -0
  287. package/resources/projects/webhook-endpoints/events.js +28 -0
  288. package/resources/projects/webhook-endpoints/events.js.map +1 -0
  289. package/resources/projects/webhook-endpoints/events.mjs +24 -0
  290. package/resources/projects/webhook-endpoints/events.mjs.map +1 -0
  291. package/resources/projects/webhook-endpoints/index.d.mts +3 -0
  292. package/resources/projects/webhook-endpoints/index.d.mts.map +1 -0
  293. package/resources/projects/webhook-endpoints/index.d.ts +3 -0
  294. package/resources/projects/webhook-endpoints/index.d.ts.map +1 -0
  295. package/resources/projects/webhook-endpoints/index.js +9 -0
  296. package/resources/projects/webhook-endpoints/index.js.map +1 -0
  297. package/resources/projects/webhook-endpoints/index.mjs +4 -0
  298. package/resources/projects/webhook-endpoints/index.mjs.map +1 -0
  299. package/resources/projects/webhook-endpoints/webhook-endpoints.d.mts +249 -0
  300. package/resources/projects/webhook-endpoints/webhook-endpoints.d.mts.map +1 -0
  301. package/resources/projects/webhook-endpoints/webhook-endpoints.d.ts +249 -0
  302. package/resources/projects/webhook-endpoints/webhook-endpoints.d.ts.map +1 -0
  303. package/resources/projects/webhook-endpoints/webhook-endpoints.js +44 -0
  304. package/resources/projects/webhook-endpoints/webhook-endpoints.js.map +1 -0
  305. package/resources/projects/webhook-endpoints/webhook-endpoints.mjs +39 -0
  306. package/resources/projects/webhook-endpoints/webhook-endpoints.mjs.map +1 -0
  307. package/resources/projects/webhook-endpoints.d.mts +2 -0
  308. package/resources/projects/webhook-endpoints.d.mts.map +1 -0
  309. package/resources/projects/webhook-endpoints.d.ts +2 -0
  310. package/resources/projects/webhook-endpoints.d.ts.map +1 -0
  311. package/resources/projects/webhook-endpoints.js +6 -0
  312. package/resources/projects/webhook-endpoints.js.map +1 -0
  313. package/resources/projects/webhook-endpoints.mjs +3 -0
  314. package/resources/projects/webhook-endpoints.mjs.map +1 -0
  315. package/resources/projects.d.mts +2 -0
  316. package/resources/projects.d.mts.map +1 -0
  317. package/resources/projects.d.ts +2 -0
  318. package/resources/projects.d.ts.map +1 -0
  319. package/resources/projects.js +6 -0
  320. package/resources/projects.js.map +1 -0
  321. package/resources/projects.mjs +3 -0
  322. package/resources/projects.mjs.map +1 -0
  323. package/resources/recommendations.d.mts +1107 -0
  324. package/resources/recommendations.d.mts.map +1 -0
  325. package/resources/recommendations.d.ts +1107 -0
  326. package/resources/recommendations.d.ts.map +1 -0
  327. package/resources/recommendations.js +17 -0
  328. package/resources/recommendations.js.map +1 -0
  329. package/resources/recommendations.mjs +13 -0
  330. package/resources/recommendations.mjs.map +1 -0
  331. package/resources/search.d.mts.map +1 -1
  332. package/resources/search.d.ts.map +1 -1
  333. package/resources/search.js +4 -3
  334. package/resources/search.js.map +1 -1
  335. package/resources/search.mjs +4 -3
  336. package/resources/search.mjs.map +1 -1
  337. package/resources/tags.d.mts.map +1 -1
  338. package/resources/tags.d.ts.map +1 -1
  339. package/resources/tags.js +5 -1
  340. package/resources/tags.js.map +1 -1
  341. package/resources/tags.mjs +5 -1
  342. package/resources/tags.mjs.map +1 -1
  343. package/resources/teams/brief.d.mts +149 -0
  344. package/resources/teams/brief.d.mts.map +1 -0
  345. package/resources/teams/brief.d.ts +149 -0
  346. package/resources/teams/brief.d.ts.map +1 -0
  347. package/resources/teams/brief.js +28 -0
  348. package/resources/teams/brief.js.map +1 -0
  349. package/resources/teams/brief.mjs +24 -0
  350. package/resources/teams/brief.mjs.map +1 -0
  351. package/resources/teams/index.d.mts +7 -0
  352. package/resources/teams/index.d.mts.map +1 -0
  353. package/resources/teams/index.d.ts +7 -0
  354. package/resources/teams/index.d.ts.map +1 -0
  355. package/resources/teams/index.js +17 -0
  356. package/resources/teams/index.js.map +1 -0
  357. package/resources/teams/index.mjs +8 -0
  358. package/resources/teams/index.mjs.map +1 -0
  359. package/resources/teams/ip-filters.d.mts +115 -0
  360. package/resources/teams/ip-filters.d.mts.map +1 -0
  361. package/resources/teams/ip-filters.d.ts +115 -0
  362. package/resources/teams/ip-filters.d.ts.map +1 -0
  363. package/resources/teams/ip-filters.js +45 -0
  364. package/resources/teams/ip-filters.js.map +1 -0
  365. package/resources/teams/ip-filters.mjs +41 -0
  366. package/resources/teams/ip-filters.mjs.map +1 -0
  367. package/resources/teams/members.d.mts +204 -0
  368. package/resources/teams/members.d.mts.map +1 -0
  369. package/resources/teams/members.d.ts +204 -0
  370. package/resources/teams/members.d.ts.map +1 -0
  371. package/resources/teams/members.js +30 -0
  372. package/resources/teams/members.js.map +1 -0
  373. package/resources/teams/members.mjs +26 -0
  374. package/resources/teams/members.mjs.map +1 -0
  375. package/resources/teams/teams.d.mts +878 -0
  376. package/resources/teams/teams.d.mts.map +1 -0
  377. package/resources/teams/teams.d.ts +878 -0
  378. package/resources/teams/teams.d.ts.map +1 -0
  379. package/resources/teams/teams.js +66 -0
  380. package/resources/teams/teams.js.map +1 -0
  381. package/resources/teams/teams.mjs +61 -0
  382. package/resources/teams/teams.mjs.map +1 -0
  383. package/resources/teams/watermark.d.mts +459 -0
  384. package/resources/teams/watermark.d.mts.map +1 -0
  385. package/resources/teams/watermark.d.ts +459 -0
  386. package/resources/teams/watermark.d.ts.map +1 -0
  387. package/resources/teams/watermark.js +46 -0
  388. package/resources/teams/watermark.js.map +1 -0
  389. package/resources/teams/watermark.mjs +42 -0
  390. package/resources/teams/watermark.mjs.map +1 -0
  391. package/resources/teams/webhook-endpoints/events.d.mts +87 -0
  392. package/resources/teams/webhook-endpoints/events.d.mts.map +1 -0
  393. package/resources/teams/webhook-endpoints/events.d.ts +87 -0
  394. package/resources/teams/webhook-endpoints/events.d.ts.map +1 -0
  395. package/resources/teams/webhook-endpoints/events.js +28 -0
  396. package/resources/teams/webhook-endpoints/events.js.map +1 -0
  397. package/resources/teams/webhook-endpoints/events.mjs +24 -0
  398. package/resources/teams/webhook-endpoints/events.mjs.map +1 -0
  399. package/resources/teams/webhook-endpoints/index.d.mts +3 -0
  400. package/resources/teams/webhook-endpoints/index.d.mts.map +1 -0
  401. package/resources/teams/webhook-endpoints/index.d.ts +3 -0
  402. package/resources/teams/webhook-endpoints/index.d.ts.map +1 -0
  403. package/resources/teams/webhook-endpoints/index.js +9 -0
  404. package/resources/teams/webhook-endpoints/index.js.map +1 -0
  405. package/resources/teams/webhook-endpoints/index.mjs +4 -0
  406. package/resources/teams/webhook-endpoints/index.mjs.map +1 -0
  407. package/resources/teams/webhook-endpoints/webhook-endpoints.d.mts +250 -0
  408. package/resources/teams/webhook-endpoints/webhook-endpoints.d.mts.map +1 -0
  409. package/resources/teams/webhook-endpoints/webhook-endpoints.d.ts +250 -0
  410. package/resources/teams/webhook-endpoints/webhook-endpoints.d.ts.map +1 -0
  411. package/resources/teams/webhook-endpoints/webhook-endpoints.js +45 -0
  412. package/resources/teams/webhook-endpoints/webhook-endpoints.js.map +1 -0
  413. package/resources/teams/webhook-endpoints/webhook-endpoints.mjs +40 -0
  414. package/resources/teams/webhook-endpoints/webhook-endpoints.mjs.map +1 -0
  415. package/resources/teams/webhook-endpoints.d.mts +2 -0
  416. package/resources/teams/webhook-endpoints.d.mts.map +1 -0
  417. package/resources/teams/webhook-endpoints.d.ts +2 -0
  418. package/resources/teams/webhook-endpoints.d.ts.map +1 -0
  419. package/resources/teams/webhook-endpoints.js +6 -0
  420. package/resources/teams/webhook-endpoints.js.map +1 -0
  421. package/resources/teams/webhook-endpoints.mjs +3 -0
  422. package/resources/teams/webhook-endpoints.mjs.map +1 -0
  423. package/resources/teams.d.mts +2 -0
  424. package/resources/teams.d.mts.map +1 -0
  425. package/resources/teams.d.ts +2 -0
  426. package/resources/teams.d.ts.map +1 -0
  427. package/resources/teams.js +6 -0
  428. package/resources/teams.js.map +1 -0
  429. package/resources/teams.mjs +3 -0
  430. package/resources/teams.mjs.map +1 -0
  431. package/resources/uploads.d.mts.map +1 -1
  432. package/resources/uploads.d.ts.map +1 -1
  433. package/resources/uploads.js +15 -3
  434. package/resources/uploads.js.map +1 -1
  435. package/resources/uploads.mjs +15 -3
  436. package/resources/uploads.mjs.map +1 -1
  437. package/resources/usages.d.mts +51 -24
  438. package/resources/usages.d.mts.map +1 -1
  439. package/resources/usages.d.ts +51 -24
  440. package/resources/usages.d.ts.map +1 -1
  441. package/resources/usages.js +2 -1
  442. package/resources/usages.js.map +1 -1
  443. package/resources/usages.mjs +2 -1
  444. package/resources/usages.mjs.map +1 -1
  445. package/resources/workflows.d.mts +1381 -280
  446. package/resources/workflows.d.mts.map +1 -1
  447. package/resources/workflows.d.ts +1381 -280
  448. package/resources/workflows.d.ts.map +1 -1
  449. package/resources/workflows.js +39 -8
  450. package/resources/workflows.js.map +1 -1
  451. package/resources/workflows.mjs +39 -8
  452. package/resources/workflows.mjs.map +1 -1
  453. package/src/client.ts +101 -0
  454. package/src/core/pagination.ts +144 -0
  455. package/src/internal/utils/values.ts +10 -0
  456. package/src/lib/generate.ts +7 -7
  457. package/src/lib/job.ts +9 -7
  458. package/src/lib/models.ts +8 -6
  459. package/src/lib/query.ts +42 -0
  460. package/src/lib/scenario.ts +8 -0
  461. package/src/lib/scope.ts +42 -7
  462. package/src/lib/upload.ts +10 -8
  463. package/src/lib/workflow.ts +9 -7
  464. package/src/lib/workflow_validator.ts +115 -0
  465. package/src/resources/assets/assets.ts +192 -33
  466. package/src/resources/assets/download.ts +43 -8
  467. package/src/resources/collections/assets.ts +3 -2
  468. package/src/resources/collections/collections.ts +20 -5
  469. package/src/resources/collections/models.ts +3 -2
  470. package/src/resources/generate.ts +2350 -186
  471. package/src/resources/index.ts +34 -0
  472. package/src/resources/jobs.ts +204 -74
  473. package/src/resources/models/description.ts +10 -2
  474. package/src/resources/models/examples.ts +140 -46
  475. package/src/resources/models/index.ts +25 -0
  476. package/src/resources/models/models.ts +326 -88
  477. package/src/resources/models/presets.ts +1335 -0
  478. package/src/resources/models/prompt-guide.ts +102 -0
  479. package/src/resources/models/scores.ts +383 -0
  480. package/src/resources/models/train.ts +121 -46
  481. package/src/resources/models/training-images.ts +5 -4
  482. package/src/resources/projects/api-keys.ts +86 -0
  483. package/src/resources/projects/brief.ts +197 -0
  484. package/src/resources/projects/index.ts +71 -0
  485. package/src/resources/projects/instructions.ts +134 -0
  486. package/src/resources/projects/members.ts +958 -0
  487. package/src/resources/projects/memory.ts +134 -0
  488. package/src/resources/projects/projects.ts +1478 -0
  489. package/src/resources/projects/watermark.ts +590 -0
  490. package/src/resources/projects/webhook-endpoints/events.ts +179 -0
  491. package/src/resources/projects/webhook-endpoints/index.ts +19 -0
  492. package/src/resources/projects/webhook-endpoints/webhook-endpoints.ts +452 -0
  493. package/src/resources/projects/webhook-endpoints.ts +3 -0
  494. package/src/resources/projects.ts +3 -0
  495. package/src/resources/recommendations.ts +1502 -0
  496. package/src/resources/search.ts +4 -3
  497. package/src/resources/tags.ts +5 -1
  498. package/src/resources/teams/brief.ts +193 -0
  499. package/src/resources/teams/index.ts +62 -0
  500. package/src/resources/teams/ip-filters.ts +177 -0
  501. package/src/resources/teams/members.ts +282 -0
  502. package/src/resources/teams/teams.ts +1255 -0
  503. package/src/resources/teams/watermark.ts +590 -0
  504. package/src/resources/teams/webhook-endpoints/events.ts +179 -0
  505. package/src/resources/teams/webhook-endpoints/index.ts +19 -0
  506. package/src/resources/teams/webhook-endpoints/webhook-endpoints.ts +453 -0
  507. package/src/resources/teams/webhook-endpoints.ts +3 -0
  508. package/src/resources/teams.ts +3 -0
  509. package/src/resources/uploads.ts +15 -3
  510. package/src/resources/usages.ts +58 -23
  511. package/src/resources/workflows.ts +1707 -241
  512. package/src/version.ts +1 -1
  513. package/version.d.mts +1 -1
  514. package/version.d.ts +1 -1
  515. package/version.js +1 -1
  516. package/version.mjs +1 -1
@@ -5,6 +5,7 @@ import { APIPromise } from '../core/api-promise';
5
5
  import { PagePromise, WorkflowsCursor, type WorkflowsCursorParams } from '../core/pagination';
6
6
  import { RequestOptions } from '../internal/request-options';
7
7
  import { path } from '../internal/utils/path';
8
+ import { omitUndefined } from '../internal/utils/values';
8
9
 
9
10
  export class Workflows extends APIResource {
10
11
  /**
@@ -12,7 +13,11 @@ export class Workflows extends APIResource {
12
13
  */
13
14
  create(params: WorkflowCreateParams, options?: RequestOptions): APIPromise<WorkflowCreateResponse> {
14
15
  const { projectId, ...body } = params;
15
- return this._client.post('/workflows', { query: { projectId }, body, ...options });
16
+ return this._client.post('/workflows', {
17
+ body,
18
+ ...options,
19
+ query: { projectId, ...omitUndefined(options?.query) },
20
+ });
16
21
  }
17
22
 
18
23
  /**
@@ -23,7 +28,10 @@ export class Workflows extends APIResource {
23
28
  query: WorkflowRetrieveParams | null | undefined = {},
24
29
  options?: RequestOptions,
25
30
  ): APIPromise<WorkflowRetrieveResponse> {
26
- return this._client.get(path`/workflows/${workflowID}`, { query, ...options });
31
+ return this._client.get(path`/workflows/${workflowID}`, {
32
+ ...options,
33
+ query: { ...query, ...omitUndefined(options?.query) },
34
+ });
27
35
  }
28
36
 
29
37
  /**
@@ -35,7 +43,11 @@ export class Workflows extends APIResource {
35
43
  options?: RequestOptions,
36
44
  ): APIPromise<WorkflowUpdateResponse> {
37
45
  const { projectId, ...body } = params;
38
- return this._client.put(path`/workflows/${workflowID}`, { query: { projectId }, body, ...options });
46
+ return this._client.put(path`/workflows/${workflowID}`, {
47
+ body,
48
+ ...options,
49
+ query: { projectId, ...omitUndefined(options?.query) },
50
+ });
39
51
  }
40
52
 
41
53
  /**
@@ -46,8 +58,8 @@ export class Workflows extends APIResource {
46
58
  options?: RequestOptions,
47
59
  ): PagePromise<WorkflowListResponsesWorkflowsCursor, WorkflowListResponse> {
48
60
  return this._client.getAPIList('/workflows', WorkflowsCursor<WorkflowListResponse>, {
49
- query,
50
61
  ...options,
62
+ query: { ...query, ...omitUndefined(options?.query) },
51
63
  });
52
64
  }
53
65
 
@@ -60,7 +72,10 @@ export class Workflows extends APIResource {
60
72
  options?: RequestOptions,
61
73
  ): APIPromise<unknown> {
62
74
  const { projectId } = params ?? {};
63
- return this._client.delete(path`/workflows/${workflowID}`, { query: { projectId }, ...options });
75
+ return this._client.delete(path`/workflows/${workflowID}`, {
76
+ ...options,
77
+ query: { projectId, ...omitUndefined(options?.query) },
78
+ });
64
79
  }
65
80
 
66
81
  /**
@@ -71,7 +86,10 @@ export class Workflows extends APIResource {
71
86
  query: WorkflowGetTagsParams | null | undefined = {},
72
87
  options?: RequestOptions,
73
88
  ): APIPromise<WorkflowGetTagsResponse> {
74
- return this._client.get('/workflows/tags', { query, ...options });
89
+ return this._client.get('/workflows/tags', {
90
+ ...options,
91
+ query: { ...query, ...omitUndefined(options?.query) },
92
+ });
75
93
  }
76
94
 
77
95
  /**
@@ -84,9 +102,9 @@ export class Workflows extends APIResource {
84
102
  ): APIPromise<WorkflowRunResponse> {
85
103
  const { body, dryRun, projectId } = params;
86
104
  return this._client.put(path`/workflows/${workflowID}/run`, {
87
- query: { dryRun, projectId },
88
105
  body: body,
89
106
  ...options,
107
+ query: { dryRun, projectId, ...omitUndefined(options?.query) },
90
108
  });
91
109
  }
92
110
 
@@ -103,9 +121,27 @@ export class Workflows extends APIResource {
103
121
  ): APIPromise<WorkflowUserApprovalResponse> {
104
122
  const { projectId, ...body } = params;
105
123
  return this._client.put(path`/workflows/${workflowID}/user-approval`, {
106
- query: { projectId },
107
124
  body,
108
125
  ...options,
126
+ query: { projectId, ...omitUndefined(options?.query) },
127
+ });
128
+ }
129
+
130
+ /**
131
+ * Respond to a user-selection node in a workflow. Pass action="select" with
132
+ * selectedIndices to pick items and resume the workflow, or action="reject" to
133
+ * mark the node Rejected and cancel the workflow.
134
+ */
135
+ userSelection(
136
+ workflowID: string,
137
+ params: WorkflowUserSelectionParams,
138
+ options?: RequestOptions,
139
+ ): APIPromise<WorkflowUserSelectionResponse> {
140
+ const { projectId, ...body } = params;
141
+ return this._client.put(path`/workflows/${workflowID}/user-selection`, {
142
+ body,
143
+ ...options,
144
+ query: { projectId, ...omitUndefined(options?.query) },
109
145
  });
110
146
  }
111
147
 
@@ -280,6 +316,7 @@ export namespace WorkflowCreateResponse {
280
316
  | 'remove-background'
281
317
  | 'transform'
282
318
  | 'user-approval'
319
+ | 'user-selection'
283
320
  | 'workflow';
284
321
 
285
322
  /**
@@ -305,14 +342,15 @@ export namespace WorkflowCreateResponse {
305
342
  includeOutputsInWorkflowJob?: true;
306
343
 
307
344
  /**
308
- * The inputs of the node.
345
+ * The inputs of the node. For a user-selection node, the array input's `min`/`max`
346
+ * bound how many items the user may pick (defaults: 1 and 100); conditional
347
+ * connections may be present as additional inputs.
309
348
  */
310
349
  inputs?: Array<Flow.Input>;
311
350
 
312
351
  /**
313
- * Statically-configured items for a List node. The node outputs this array as-is
314
- * when executed. Only available for List nodes. The values can be strings,
315
- * numbers, or asset IDs.
352
+ * Statically-configured items for a List node, or the frozen candidate list of a
353
+ * UserSelection node. The values can be strings, numbers, or asset IDs.
316
354
  */
317
355
  items?: Array<string>;
318
356
 
@@ -574,8 +612,7 @@ export namespace WorkflowCreateResponse {
574
612
  * - \`ifNotDefined\`: Input is required when another specified input is not
575
613
  * defined
576
614
  * - \`ifDefined\`: Input is required when another specified input is defined
577
- * - \`conditionalValues\`: Input is required when another input has a specific
578
- * value
615
+ * - \`conditional\`: Input is required when other inputs have specific values
579
616
  *
580
617
  * By default, the input is not required.
581
618
  */
@@ -805,8 +842,7 @@ export namespace WorkflowCreateResponse {
805
842
  * - \`ifNotDefined\`: Input is required when another specified input is not
806
843
  * defined
807
844
  * - \`ifDefined\`: Input is required when another specified input is defined
808
- * - \`conditionalValues\`: Input is required when another input has a specific
809
- * value
845
+ * - \`conditional\`: Input is required when other inputs have specific values
810
846
  *
811
847
  * By default, the input is not required.
812
848
  */
@@ -863,8 +899,7 @@ export namespace WorkflowCreateResponse {
863
899
  * - \`ifNotDefined\`: Input is required when another specified input is not
864
900
  * defined
865
901
  * - \`ifDefined\`: Input is required when another specified input is defined
866
- * - \`conditionalValues\`: Input is required when another input has a specific
867
- * value
902
+ * - \`conditional\`: Input is required when other inputs have specific values
868
903
  *
869
904
  * By default, the input is not required.
870
905
  */
@@ -875,12 +910,9 @@ export namespace WorkflowCreateResponse {
875
910
  always?: boolean;
876
911
 
877
912
  /**
878
- * Makes this input required when another input has a specific value:
879
- *
880
- * - Key: name of the input to check
881
- * - Value: operation and allowed values that trigger the requirement
913
+ * Makes this input required when other inputs have one of the listed values
882
914
  */
883
- conditionalValues?: unknown;
915
+ conditional?: Required.Conditional;
884
916
 
885
917
  /**
886
918
  * Makes this input required when another input is defined:
@@ -898,6 +930,26 @@ export namespace WorkflowCreateResponse {
898
930
  */
899
931
  ifNotDefined?: unknown;
900
932
  }
933
+
934
+ export namespace Required {
935
+ /**
936
+ * Makes this input required when other inputs have one of the listed values
937
+ */
938
+ export interface Conditional {
939
+ /**
940
+ * The conditions to check:
941
+ *
942
+ * - Key: name of the input to check
943
+ * - Value: values of that input that satisfy the condition
944
+ */
945
+ values: unknown;
946
+
947
+ /**
948
+ * How the conditions combine: \`and\` (all must match) or \`or\` (any must match)
949
+ */
950
+ operator?: 'and' | 'or';
951
+ }
952
+ }
901
953
  }
902
954
 
903
955
  /**
@@ -938,8 +990,7 @@ export namespace WorkflowCreateResponse {
938
990
  * - \`ifNotDefined\`: Input is required when another specified input is not
939
991
  * defined
940
992
  * - \`ifDefined\`: Input is required when another specified input is defined
941
- * - \`conditionalValues\`: Input is required when another input has a specific
942
- * value
993
+ * - \`conditional\`: Input is required when other inputs have specific values
943
994
  *
944
995
  * By default, the input is not required.
945
996
  */
@@ -950,12 +1001,9 @@ export namespace WorkflowCreateResponse {
950
1001
  always?: boolean;
951
1002
 
952
1003
  /**
953
- * Makes this input required when another input has a specific value:
954
- *
955
- * - Key: name of the input to check
956
- * - Value: operation and allowed values that trigger the requirement
1004
+ * Makes this input required when other inputs have one of the listed values
957
1005
  */
958
- conditionalValues?: unknown;
1006
+ conditional?: Required.Conditional;
959
1007
 
960
1008
  /**
961
1009
  * Makes this input required when another input is defined:
@@ -973,6 +1021,26 @@ export namespace WorkflowCreateResponse {
973
1021
  */
974
1022
  ifNotDefined?: unknown;
975
1023
  }
1024
+
1025
+ export namespace Required {
1026
+ /**
1027
+ * Makes this input required when other inputs have one of the listed values
1028
+ */
1029
+ export interface Conditional {
1030
+ /**
1031
+ * The conditions to check:
1032
+ *
1033
+ * - Key: name of the input to check
1034
+ * - Value: values of that input that satisfy the condition
1035
+ */
1036
+ values: unknown;
1037
+
1038
+ /**
1039
+ * How the conditions combine: \`and\` (all must match) or \`or\` (any must match)
1040
+ */
1041
+ operator?: 'and' | 'or';
1042
+ }
1043
+ }
976
1044
  }
977
1045
 
978
1046
  /**
@@ -1212,8 +1280,7 @@ export namespace WorkflowCreateResponse {
1212
1280
  * - \`ifNotDefined\`: Input is required when another specified input is not
1213
1281
  * defined
1214
1282
  * - \`ifDefined\`: Input is required when another specified input is defined
1215
- * - \`conditionalValues\`: Input is required when another input has a specific
1216
- * value
1283
+ * - \`conditional\`: Input is required when other inputs have specific values
1217
1284
  *
1218
1285
  * By default, the input is not required.
1219
1286
  */
@@ -1233,8 +1300,7 @@ export namespace WorkflowCreateResponse {
1233
1300
  * - \`ifNotDefined\`: Input is required when another specified input is not
1234
1301
  * defined
1235
1302
  * - \`ifDefined\`: Input is required when another specified input is defined
1236
- * - \`conditionalValues\`: Input is required when another input has a specific
1237
- * value
1303
+ * - \`conditional\`: Input is required when other inputs have specific values
1238
1304
  *
1239
1305
  * By default, the input is not required.
1240
1306
  */
@@ -1245,12 +1311,9 @@ export namespace WorkflowCreateResponse {
1245
1311
  always?: boolean;
1246
1312
 
1247
1313
  /**
1248
- * Makes this input required when another input has a specific value:
1249
- *
1250
- * - Key: name of the input to check
1251
- * - Value: operation and allowed values that trigger the requirement
1314
+ * Makes this input required when other inputs have one of the listed values
1252
1315
  */
1253
- conditionalValues?: unknown;
1316
+ conditional?: Required.Conditional;
1254
1317
 
1255
1318
  /**
1256
1319
  * Makes this input required when another input is defined:
@@ -1268,6 +1331,26 @@ export namespace WorkflowCreateResponse {
1268
1331
  */
1269
1332
  ifNotDefined?: unknown;
1270
1333
  }
1334
+
1335
+ export namespace Required {
1336
+ /**
1337
+ * Makes this input required when other inputs have one of the listed values
1338
+ */
1339
+ export interface Conditional {
1340
+ /**
1341
+ * The conditions to check:
1342
+ *
1343
+ * - Key: name of the input to check
1344
+ * - Value: values of that input that satisfy the condition
1345
+ */
1346
+ values: unknown;
1347
+
1348
+ /**
1349
+ * How the conditions combine: \`and\` (all must match) or \`or\` (any must match)
1350
+ */
1351
+ operator?: 'and' | 'or';
1352
+ }
1353
+ }
1271
1354
  }
1272
1355
 
1273
1356
  /**
@@ -1615,6 +1698,7 @@ export namespace WorkflowRetrieveResponse {
1615
1698
  | 'remove-background'
1616
1699
  | 'transform'
1617
1700
  | 'user-approval'
1701
+ | 'user-selection'
1618
1702
  | 'workflow';
1619
1703
 
1620
1704
  /**
@@ -1640,14 +1724,15 @@ export namespace WorkflowRetrieveResponse {
1640
1724
  includeOutputsInWorkflowJob?: true;
1641
1725
 
1642
1726
  /**
1643
- * The inputs of the node.
1727
+ * The inputs of the node. For a user-selection node, the array input's `min`/`max`
1728
+ * bound how many items the user may pick (defaults: 1 and 100); conditional
1729
+ * connections may be present as additional inputs.
1644
1730
  */
1645
1731
  inputs?: Array<Flow.Input>;
1646
1732
 
1647
1733
  /**
1648
- * Statically-configured items for a List node. The node outputs this array as-is
1649
- * when executed. Only available for List nodes. The values can be strings,
1650
- * numbers, or asset IDs.
1734
+ * Statically-configured items for a List node, or the frozen candidate list of a
1735
+ * UserSelection node. The values can be strings, numbers, or asset IDs.
1651
1736
  */
1652
1737
  items?: Array<string>;
1653
1738
 
@@ -1909,8 +1994,7 @@ export namespace WorkflowRetrieveResponse {
1909
1994
  * - \`ifNotDefined\`: Input is required when another specified input is not
1910
1995
  * defined
1911
1996
  * - \`ifDefined\`: Input is required when another specified input is defined
1912
- * - \`conditionalValues\`: Input is required when another input has a specific
1913
- * value
1997
+ * - \`conditional\`: Input is required when other inputs have specific values
1914
1998
  *
1915
1999
  * By default, the input is not required.
1916
2000
  */
@@ -2140,8 +2224,7 @@ export namespace WorkflowRetrieveResponse {
2140
2224
  * - \`ifNotDefined\`: Input is required when another specified input is not
2141
2225
  * defined
2142
2226
  * - \`ifDefined\`: Input is required when another specified input is defined
2143
- * - \`conditionalValues\`: Input is required when another input has a specific
2144
- * value
2227
+ * - \`conditional\`: Input is required when other inputs have specific values
2145
2228
  *
2146
2229
  * By default, the input is not required.
2147
2230
  */
@@ -2198,8 +2281,7 @@ export namespace WorkflowRetrieveResponse {
2198
2281
  * - \`ifNotDefined\`: Input is required when another specified input is not
2199
2282
  * defined
2200
2283
  * - \`ifDefined\`: Input is required when another specified input is defined
2201
- * - \`conditionalValues\`: Input is required when another input has a specific
2202
- * value
2284
+ * - \`conditional\`: Input is required when other inputs have specific values
2203
2285
  *
2204
2286
  * By default, the input is not required.
2205
2287
  */
@@ -2210,12 +2292,9 @@ export namespace WorkflowRetrieveResponse {
2210
2292
  always?: boolean;
2211
2293
 
2212
2294
  /**
2213
- * Makes this input required when another input has a specific value:
2214
- *
2215
- * - Key: name of the input to check
2216
- * - Value: operation and allowed values that trigger the requirement
2295
+ * Makes this input required when other inputs have one of the listed values
2217
2296
  */
2218
- conditionalValues?: unknown;
2297
+ conditional?: Required.Conditional;
2219
2298
 
2220
2299
  /**
2221
2300
  * Makes this input required when another input is defined:
@@ -2233,6 +2312,26 @@ export namespace WorkflowRetrieveResponse {
2233
2312
  */
2234
2313
  ifNotDefined?: unknown;
2235
2314
  }
2315
+
2316
+ export namespace Required {
2317
+ /**
2318
+ * Makes this input required when other inputs have one of the listed values
2319
+ */
2320
+ export interface Conditional {
2321
+ /**
2322
+ * The conditions to check:
2323
+ *
2324
+ * - Key: name of the input to check
2325
+ * - Value: values of that input that satisfy the condition
2326
+ */
2327
+ values: unknown;
2328
+
2329
+ /**
2330
+ * How the conditions combine: \`and\` (all must match) or \`or\` (any must match)
2331
+ */
2332
+ operator?: 'and' | 'or';
2333
+ }
2334
+ }
2236
2335
  }
2237
2336
 
2238
2337
  /**
@@ -2273,8 +2372,7 @@ export namespace WorkflowRetrieveResponse {
2273
2372
  * - \`ifNotDefined\`: Input is required when another specified input is not
2274
2373
  * defined
2275
2374
  * - \`ifDefined\`: Input is required when another specified input is defined
2276
- * - \`conditionalValues\`: Input is required when another input has a specific
2277
- * value
2375
+ * - \`conditional\`: Input is required when other inputs have specific values
2278
2376
  *
2279
2377
  * By default, the input is not required.
2280
2378
  */
@@ -2285,12 +2383,9 @@ export namespace WorkflowRetrieveResponse {
2285
2383
  always?: boolean;
2286
2384
 
2287
2385
  /**
2288
- * Makes this input required when another input has a specific value:
2289
- *
2290
- * - Key: name of the input to check
2291
- * - Value: operation and allowed values that trigger the requirement
2386
+ * Makes this input required when other inputs have one of the listed values
2292
2387
  */
2293
- conditionalValues?: unknown;
2388
+ conditional?: Required.Conditional;
2294
2389
 
2295
2390
  /**
2296
2391
  * Makes this input required when another input is defined:
@@ -2308,6 +2403,26 @@ export namespace WorkflowRetrieveResponse {
2308
2403
  */
2309
2404
  ifNotDefined?: unknown;
2310
2405
  }
2406
+
2407
+ export namespace Required {
2408
+ /**
2409
+ * Makes this input required when other inputs have one of the listed values
2410
+ */
2411
+ export interface Conditional {
2412
+ /**
2413
+ * The conditions to check:
2414
+ *
2415
+ * - Key: name of the input to check
2416
+ * - Value: values of that input that satisfy the condition
2417
+ */
2418
+ values: unknown;
2419
+
2420
+ /**
2421
+ * How the conditions combine: \`and\` (all must match) or \`or\` (any must match)
2422
+ */
2423
+ operator?: 'and' | 'or';
2424
+ }
2425
+ }
2311
2426
  }
2312
2427
 
2313
2428
  /**
@@ -2547,8 +2662,7 @@ export namespace WorkflowRetrieveResponse {
2547
2662
  * - \`ifNotDefined\`: Input is required when another specified input is not
2548
2663
  * defined
2549
2664
  * - \`ifDefined\`: Input is required when another specified input is defined
2550
- * - \`conditionalValues\`: Input is required when another input has a specific
2551
- * value
2665
+ * - \`conditional\`: Input is required when other inputs have specific values
2552
2666
  *
2553
2667
  * By default, the input is not required.
2554
2668
  */
@@ -2568,8 +2682,7 @@ export namespace WorkflowRetrieveResponse {
2568
2682
  * - \`ifNotDefined\`: Input is required when another specified input is not
2569
2683
  * defined
2570
2684
  * - \`ifDefined\`: Input is required when another specified input is defined
2571
- * - \`conditionalValues\`: Input is required when another input has a specific
2572
- * value
2685
+ * - \`conditional\`: Input is required when other inputs have specific values
2573
2686
  *
2574
2687
  * By default, the input is not required.
2575
2688
  */
@@ -2580,12 +2693,9 @@ export namespace WorkflowRetrieveResponse {
2580
2693
  always?: boolean;
2581
2694
 
2582
2695
  /**
2583
- * Makes this input required when another input has a specific value:
2584
- *
2585
- * - Key: name of the input to check
2586
- * - Value: operation and allowed values that trigger the requirement
2696
+ * Makes this input required when other inputs have one of the listed values
2587
2697
  */
2588
- conditionalValues?: unknown;
2698
+ conditional?: Required.Conditional;
2589
2699
 
2590
2700
  /**
2591
2701
  * Makes this input required when another input is defined:
@@ -2603,6 +2713,26 @@ export namespace WorkflowRetrieveResponse {
2603
2713
  */
2604
2714
  ifNotDefined?: unknown;
2605
2715
  }
2716
+
2717
+ export namespace Required {
2718
+ /**
2719
+ * Makes this input required when other inputs have one of the listed values
2720
+ */
2721
+ export interface Conditional {
2722
+ /**
2723
+ * The conditions to check:
2724
+ *
2725
+ * - Key: name of the input to check
2726
+ * - Value: values of that input that satisfy the condition
2727
+ */
2728
+ values: unknown;
2729
+
2730
+ /**
2731
+ * How the conditions combine: \`and\` (all must match) or \`or\` (any must match)
2732
+ */
2733
+ operator?: 'and' | 'or';
2734
+ }
2735
+ }
2606
2736
  }
2607
2737
 
2608
2738
  /**
@@ -2950,6 +3080,7 @@ export namespace WorkflowUpdateResponse {
2950
3080
  | 'remove-background'
2951
3081
  | 'transform'
2952
3082
  | 'user-approval'
3083
+ | 'user-selection'
2953
3084
  | 'workflow';
2954
3085
 
2955
3086
  /**
@@ -2975,14 +3106,15 @@ export namespace WorkflowUpdateResponse {
2975
3106
  includeOutputsInWorkflowJob?: true;
2976
3107
 
2977
3108
  /**
2978
- * The inputs of the node.
3109
+ * The inputs of the node. For a user-selection node, the array input's `min`/`max`
3110
+ * bound how many items the user may pick (defaults: 1 and 100); conditional
3111
+ * connections may be present as additional inputs.
2979
3112
  */
2980
3113
  inputs?: Array<Flow.Input>;
2981
3114
 
2982
3115
  /**
2983
- * Statically-configured items for a List node. The node outputs this array as-is
2984
- * when executed. Only available for List nodes. The values can be strings,
2985
- * numbers, or asset IDs.
3116
+ * Statically-configured items for a List node, or the frozen candidate list of a
3117
+ * UserSelection node. The values can be strings, numbers, or asset IDs.
2986
3118
  */
2987
3119
  items?: Array<string>;
2988
3120
 
@@ -3244,8 +3376,7 @@ export namespace WorkflowUpdateResponse {
3244
3376
  * - \`ifNotDefined\`: Input is required when another specified input is not
3245
3377
  * defined
3246
3378
  * - \`ifDefined\`: Input is required when another specified input is defined
3247
- * - \`conditionalValues\`: Input is required when another input has a specific
3248
- * value
3379
+ * - \`conditional\`: Input is required when other inputs have specific values
3249
3380
  *
3250
3381
  * By default, the input is not required.
3251
3382
  */
@@ -3475,8 +3606,7 @@ export namespace WorkflowUpdateResponse {
3475
3606
  * - \`ifNotDefined\`: Input is required when another specified input is not
3476
3607
  * defined
3477
3608
  * - \`ifDefined\`: Input is required when another specified input is defined
3478
- * - \`conditionalValues\`: Input is required when another input has a specific
3479
- * value
3609
+ * - \`conditional\`: Input is required when other inputs have specific values
3480
3610
  *
3481
3611
  * By default, the input is not required.
3482
3612
  */
@@ -3533,8 +3663,7 @@ export namespace WorkflowUpdateResponse {
3533
3663
  * - \`ifNotDefined\`: Input is required when another specified input is not
3534
3664
  * defined
3535
3665
  * - \`ifDefined\`: Input is required when another specified input is defined
3536
- * - \`conditionalValues\`: Input is required when another input has a specific
3537
- * value
3666
+ * - \`conditional\`: Input is required when other inputs have specific values
3538
3667
  *
3539
3668
  * By default, the input is not required.
3540
3669
  */
@@ -3545,12 +3674,9 @@ export namespace WorkflowUpdateResponse {
3545
3674
  always?: boolean;
3546
3675
 
3547
3676
  /**
3548
- * Makes this input required when another input has a specific value:
3549
- *
3550
- * - Key: name of the input to check
3551
- * - Value: operation and allowed values that trigger the requirement
3677
+ * Makes this input required when other inputs have one of the listed values
3552
3678
  */
3553
- conditionalValues?: unknown;
3679
+ conditional?: Required.Conditional;
3554
3680
 
3555
3681
  /**
3556
3682
  * Makes this input required when another input is defined:
@@ -3568,6 +3694,26 @@ export namespace WorkflowUpdateResponse {
3568
3694
  */
3569
3695
  ifNotDefined?: unknown;
3570
3696
  }
3697
+
3698
+ export namespace Required {
3699
+ /**
3700
+ * Makes this input required when other inputs have one of the listed values
3701
+ */
3702
+ export interface Conditional {
3703
+ /**
3704
+ * The conditions to check:
3705
+ *
3706
+ * - Key: name of the input to check
3707
+ * - Value: values of that input that satisfy the condition
3708
+ */
3709
+ values: unknown;
3710
+
3711
+ /**
3712
+ * How the conditions combine: \`and\` (all must match) or \`or\` (any must match)
3713
+ */
3714
+ operator?: 'and' | 'or';
3715
+ }
3716
+ }
3571
3717
  }
3572
3718
 
3573
3719
  /**
@@ -3608,8 +3754,7 @@ export namespace WorkflowUpdateResponse {
3608
3754
  * - \`ifNotDefined\`: Input is required when another specified input is not
3609
3755
  * defined
3610
3756
  * - \`ifDefined\`: Input is required when another specified input is defined
3611
- * - \`conditionalValues\`: Input is required when another input has a specific
3612
- * value
3757
+ * - \`conditional\`: Input is required when other inputs have specific values
3613
3758
  *
3614
3759
  * By default, the input is not required.
3615
3760
  */
@@ -3620,12 +3765,9 @@ export namespace WorkflowUpdateResponse {
3620
3765
  always?: boolean;
3621
3766
 
3622
3767
  /**
3623
- * Makes this input required when another input has a specific value:
3624
- *
3625
- * - Key: name of the input to check
3626
- * - Value: operation and allowed values that trigger the requirement
3768
+ * Makes this input required when other inputs have one of the listed values
3627
3769
  */
3628
- conditionalValues?: unknown;
3770
+ conditional?: Required.Conditional;
3629
3771
 
3630
3772
  /**
3631
3773
  * Makes this input required when another input is defined:
@@ -3643,6 +3785,26 @@ export namespace WorkflowUpdateResponse {
3643
3785
  */
3644
3786
  ifNotDefined?: unknown;
3645
3787
  }
3788
+
3789
+ export namespace Required {
3790
+ /**
3791
+ * Makes this input required when other inputs have one of the listed values
3792
+ */
3793
+ export interface Conditional {
3794
+ /**
3795
+ * The conditions to check:
3796
+ *
3797
+ * - Key: name of the input to check
3798
+ * - Value: values of that input that satisfy the condition
3799
+ */
3800
+ values: unknown;
3801
+
3802
+ /**
3803
+ * How the conditions combine: \`and\` (all must match) or \`or\` (any must match)
3804
+ */
3805
+ operator?: 'and' | 'or';
3806
+ }
3807
+ }
3646
3808
  }
3647
3809
 
3648
3810
  /**
@@ -3882,8 +4044,7 @@ export namespace WorkflowUpdateResponse {
3882
4044
  * - \`ifNotDefined\`: Input is required when another specified input is not
3883
4045
  * defined
3884
4046
  * - \`ifDefined\`: Input is required when another specified input is defined
3885
- * - \`conditionalValues\`: Input is required when another input has a specific
3886
- * value
4047
+ * - \`conditional\`: Input is required when other inputs have specific values
3887
4048
  *
3888
4049
  * By default, the input is not required.
3889
4050
  */
@@ -3903,8 +4064,7 @@ export namespace WorkflowUpdateResponse {
3903
4064
  * - \`ifNotDefined\`: Input is required when another specified input is not
3904
4065
  * defined
3905
4066
  * - \`ifDefined\`: Input is required when another specified input is defined
3906
- * - \`conditionalValues\`: Input is required when another input has a specific
3907
- * value
4067
+ * - \`conditional\`: Input is required when other inputs have specific values
3908
4068
  *
3909
4069
  * By default, the input is not required.
3910
4070
  */
@@ -3915,12 +4075,9 @@ export namespace WorkflowUpdateResponse {
3915
4075
  always?: boolean;
3916
4076
 
3917
4077
  /**
3918
- * Makes this input required when another input has a specific value:
3919
- *
3920
- * - Key: name of the input to check
3921
- * - Value: operation and allowed values that trigger the requirement
4078
+ * Makes this input required when other inputs have one of the listed values
3922
4079
  */
3923
- conditionalValues?: unknown;
4080
+ conditional?: Required.Conditional;
3924
4081
 
3925
4082
  /**
3926
4083
  * Makes this input required when another input is defined:
@@ -3938,6 +4095,26 @@ export namespace WorkflowUpdateResponse {
3938
4095
  */
3939
4096
  ifNotDefined?: unknown;
3940
4097
  }
4098
+
4099
+ export namespace Required {
4100
+ /**
4101
+ * Makes this input required when other inputs have one of the listed values
4102
+ */
4103
+ export interface Conditional {
4104
+ /**
4105
+ * The conditions to check:
4106
+ *
4107
+ * - Key: name of the input to check
4108
+ * - Value: values of that input that satisfy the condition
4109
+ */
4110
+ values: unknown;
4111
+
4112
+ /**
4113
+ * How the conditions combine: \`and\` (all must match) or \`or\` (any must match)
4114
+ */
4115
+ operator?: 'and' | 'or';
4116
+ }
4117
+ }
3941
4118
  }
3942
4119
 
3943
4120
  /**
@@ -4476,8 +4653,7 @@ export namespace WorkflowListResponse {
4476
4653
  * - \`ifNotDefined\`: Input is required when another specified input is not
4477
4654
  * defined
4478
4655
  * - \`ifDefined\`: Input is required when another specified input is defined
4479
- * - \`conditionalValues\`: Input is required when another input has a specific
4480
- * value
4656
+ * - \`conditional\`: Input is required when other inputs have specific values
4481
4657
  *
4482
4658
  * By default, the input is not required.
4483
4659
  */
@@ -4497,8 +4673,7 @@ export namespace WorkflowListResponse {
4497
4673
  * - \`ifNotDefined\`: Input is required when another specified input is not
4498
4674
  * defined
4499
4675
  * - \`ifDefined\`: Input is required when another specified input is defined
4500
- * - \`conditionalValues\`: Input is required when another input has a specific
4501
- * value
4676
+ * - \`conditional\`: Input is required when other inputs have specific values
4502
4677
  *
4503
4678
  * By default, the input is not required.
4504
4679
  */
@@ -4509,12 +4684,9 @@ export namespace WorkflowListResponse {
4509
4684
  always?: boolean;
4510
4685
 
4511
4686
  /**
4512
- * Makes this input required when another input has a specific value:
4513
- *
4514
- * - Key: name of the input to check
4515
- * - Value: operation and allowed values that trigger the requirement
4687
+ * Makes this input required when other inputs have one of the listed values
4516
4688
  */
4517
- conditionalValues?: unknown;
4689
+ conditional?: Required.Conditional;
4518
4690
 
4519
4691
  /**
4520
4692
  * Makes this input required when another input is defined:
@@ -4532,6 +4704,26 @@ export namespace WorkflowListResponse {
4532
4704
  */
4533
4705
  ifNotDefined?: unknown;
4534
4706
  }
4707
+
4708
+ export namespace Required {
4709
+ /**
4710
+ * Makes this input required when other inputs have one of the listed values
4711
+ */
4712
+ export interface Conditional {
4713
+ /**
4714
+ * The conditions to check:
4715
+ *
4716
+ * - Key: name of the input to check
4717
+ * - Value: values of that input that satisfy the condition
4718
+ */
4719
+ values: unknown;
4720
+
4721
+ /**
4722
+ * How the conditions combine: \`and\` (all must match) or \`or\` (any must match)
4723
+ */
4724
+ operator?: 'and' | 'or';
4725
+ }
4726
+ }
4535
4727
  }
4536
4728
 
4537
4729
  /**
@@ -4585,6 +4777,7 @@ export namespace WorkflowListResponse {
4585
4777
  | 'remove-background'
4586
4778
  | 'transform'
4587
4779
  | 'user-approval'
4780
+ | 'user-selection'
4588
4781
  | 'workflow';
4589
4782
 
4590
4783
  /**
@@ -4610,14 +4803,15 @@ export namespace WorkflowListResponse {
4610
4803
  includeOutputsInWorkflowJob?: true;
4611
4804
 
4612
4805
  /**
4613
- * The inputs of the node.
4806
+ * The inputs of the node. For a user-selection node, the array input's `min`/`max`
4807
+ * bound how many items the user may pick (defaults: 1 and 100); conditional
4808
+ * connections may be present as additional inputs.
4614
4809
  */
4615
4810
  inputs?: Array<Flow.Input>;
4616
4811
 
4617
4812
  /**
4618
- * Statically-configured items for a List node. The node outputs this array as-is
4619
- * when executed. Only available for List nodes. The values can be strings,
4620
- * numbers, or asset IDs.
4813
+ * Statically-configured items for a List node, or the frozen candidate list of a
4814
+ * UserSelection node. The values can be strings, numbers, or asset IDs.
4621
4815
  */
4622
4816
  items?: Array<string>;
4623
4817
 
@@ -4879,8 +5073,7 @@ export namespace WorkflowListResponse {
4879
5073
  * - \`ifNotDefined\`: Input is required when another specified input is not
4880
5074
  * defined
4881
5075
  * - \`ifDefined\`: Input is required when another specified input is defined
4882
- * - \`conditionalValues\`: Input is required when another input has a specific
4883
- * value
5076
+ * - \`conditional\`: Input is required when other inputs have specific values
4884
5077
  *
4885
5078
  * By default, the input is not required.
4886
5079
  */
@@ -5110,8 +5303,7 @@ export namespace WorkflowListResponse {
5110
5303
  * - \`ifNotDefined\`: Input is required when another specified input is not
5111
5304
  * defined
5112
5305
  * - \`ifDefined\`: Input is required when another specified input is defined
5113
- * - \`conditionalValues\`: Input is required when another input has a specific
5114
- * value
5306
+ * - \`conditional\`: Input is required when other inputs have specific values
5115
5307
  *
5116
5308
  * By default, the input is not required.
5117
5309
  */
@@ -5168,8 +5360,7 @@ export namespace WorkflowListResponse {
5168
5360
  * - \`ifNotDefined\`: Input is required when another specified input is not
5169
5361
  * defined
5170
5362
  * - \`ifDefined\`: Input is required when another specified input is defined
5171
- * - \`conditionalValues\`: Input is required when another input has a specific
5172
- * value
5363
+ * - \`conditional\`: Input is required when other inputs have specific values
5173
5364
  *
5174
5365
  * By default, the input is not required.
5175
5366
  */
@@ -5180,12 +5371,9 @@ export namespace WorkflowListResponse {
5180
5371
  always?: boolean;
5181
5372
 
5182
5373
  /**
5183
- * Makes this input required when another input has a specific value:
5184
- *
5185
- * - Key: name of the input to check
5186
- * - Value: operation and allowed values that trigger the requirement
5374
+ * Makes this input required when other inputs have one of the listed values
5187
5375
  */
5188
- conditionalValues?: unknown;
5376
+ conditional?: Required.Conditional;
5189
5377
 
5190
5378
  /**
5191
5379
  * Makes this input required when another input is defined:
@@ -5203,6 +5391,26 @@ export namespace WorkflowListResponse {
5203
5391
  */
5204
5392
  ifNotDefined?: unknown;
5205
5393
  }
5394
+
5395
+ export namespace Required {
5396
+ /**
5397
+ * Makes this input required when other inputs have one of the listed values
5398
+ */
5399
+ export interface Conditional {
5400
+ /**
5401
+ * The conditions to check:
5402
+ *
5403
+ * - Key: name of the input to check
5404
+ * - Value: values of that input that satisfy the condition
5405
+ */
5406
+ values: unknown;
5407
+
5408
+ /**
5409
+ * How the conditions combine: \`and\` (all must match) or \`or\` (any must match)
5410
+ */
5411
+ operator?: 'and' | 'or';
5412
+ }
5413
+ }
5206
5414
  }
5207
5415
 
5208
5416
  /**
@@ -5243,8 +5451,7 @@ export namespace WorkflowListResponse {
5243
5451
  * - \`ifNotDefined\`: Input is required when another specified input is not
5244
5452
  * defined
5245
5453
  * - \`ifDefined\`: Input is required when another specified input is defined
5246
- * - \`conditionalValues\`: Input is required when another input has a specific
5247
- * value
5454
+ * - \`conditional\`: Input is required when other inputs have specific values
5248
5455
  *
5249
5456
  * By default, the input is not required.
5250
5457
  */
@@ -5255,12 +5462,9 @@ export namespace WorkflowListResponse {
5255
5462
  always?: boolean;
5256
5463
 
5257
5464
  /**
5258
- * Makes this input required when another input has a specific value:
5259
- *
5260
- * - Key: name of the input to check
5261
- * - Value: operation and allowed values that trigger the requirement
5465
+ * Makes this input required when other inputs have one of the listed values
5262
5466
  */
5263
- conditionalValues?: unknown;
5467
+ conditional?: Required.Conditional;
5264
5468
 
5265
5469
  /**
5266
5470
  * Makes this input required when another input is defined:
@@ -5278,6 +5482,26 @@ export namespace WorkflowListResponse {
5278
5482
  */
5279
5483
  ifNotDefined?: unknown;
5280
5484
  }
5485
+
5486
+ export namespace Required {
5487
+ /**
5488
+ * Makes this input required when other inputs have one of the listed values
5489
+ */
5490
+ export interface Conditional {
5491
+ /**
5492
+ * The conditions to check:
5493
+ *
5494
+ * - Key: name of the input to check
5495
+ * - Value: values of that input that satisfy the condition
5496
+ */
5497
+ values: unknown;
5498
+
5499
+ /**
5500
+ * How the conditions combine: \`and\` (all must match) or \`or\` (any must match)
5501
+ */
5502
+ operator?: 'and' | 'or';
5503
+ }
5504
+ }
5281
5505
  }
5282
5506
 
5283
5507
  /**
@@ -5663,6 +5887,7 @@ export namespace WorkflowRunResponse {
5663
5887
  | 'remove-background'
5664
5888
  | 'transform'
5665
5889
  | 'user-approval'
5890
+ | 'user-selection'
5666
5891
  | 'workflow';
5667
5892
 
5668
5893
  /**
@@ -5693,14 +5918,15 @@ export namespace WorkflowRunResponse {
5693
5918
  includeOutputsInWorkflowJob?: true;
5694
5919
 
5695
5920
  /**
5696
- * The inputs of the node.
5921
+ * The inputs of the node. For a user-selection node, the array input's `min`/`max`
5922
+ * bound how many items the user may pick (defaults: 1 and 100); conditional
5923
+ * connections may be present as additional inputs.
5697
5924
  */
5698
5925
  inputs?: Array<Flow.Input>;
5699
5926
 
5700
5927
  /**
5701
- * Statically-configured items for a List node. The node outputs this array as-is
5702
- * when executed. Only available for List nodes. The values can be strings,
5703
- * numbers, or asset IDs.
5928
+ * Statically-configured items for a List node, or the frozen candidate list of a
5929
+ * UserSelection node. The values can be strings, numbers, or asset IDs.
5704
5930
  */
5705
5931
  items?: Array<string>;
5706
5932
 
@@ -5980,8 +6206,7 @@ export namespace WorkflowRunResponse {
5980
6206
  * - \`ifNotDefined\`: Input is required when another specified input is not
5981
6207
  * defined
5982
6208
  * - \`ifDefined\`: Input is required when another specified input is defined
5983
- * - \`conditionalValues\`: Input is required when another input has a specific
5984
- * value
6209
+ * - \`conditional\`: Input is required when other inputs have specific values
5985
6210
  *
5986
6211
  * By default, the input is not required.
5987
6212
  */
@@ -6211,8 +6436,7 @@ export namespace WorkflowRunResponse {
6211
6436
  * - \`ifNotDefined\`: Input is required when another specified input is not
6212
6437
  * defined
6213
6438
  * - \`ifDefined\`: Input is required when another specified input is defined
6214
- * - \`conditionalValues\`: Input is required when another input has a specific
6215
- * value
6439
+ * - \`conditional\`: Input is required when other inputs have specific values
6216
6440
  *
6217
6441
  * By default, the input is not required.
6218
6442
  */
@@ -6269,8 +6493,7 @@ export namespace WorkflowRunResponse {
6269
6493
  * - \`ifNotDefined\`: Input is required when another specified input is not
6270
6494
  * defined
6271
6495
  * - \`ifDefined\`: Input is required when another specified input is defined
6272
- * - \`conditionalValues\`: Input is required when another input has a specific
6273
- * value
6496
+ * - \`conditional\`: Input is required when other inputs have specific values
6274
6497
  *
6275
6498
  * By default, the input is not required.
6276
6499
  */
@@ -6281,12 +6504,9 @@ export namespace WorkflowRunResponse {
6281
6504
  always?: boolean;
6282
6505
 
6283
6506
  /**
6284
- * Makes this input required when another input has a specific value:
6285
- *
6286
- * - Key: name of the input to check
6287
- * - Value: operation and allowed values that trigger the requirement
6507
+ * Makes this input required when other inputs have one of the listed values
6288
6508
  */
6289
- conditionalValues?: unknown;
6509
+ conditional?: Required.Conditional;
6290
6510
 
6291
6511
  /**
6292
6512
  * Makes this input required when another input is defined:
@@ -6304,6 +6524,26 @@ export namespace WorkflowRunResponse {
6304
6524
  */
6305
6525
  ifNotDefined?: unknown;
6306
6526
  }
6527
+
6528
+ export namespace Required {
6529
+ /**
6530
+ * Makes this input required when other inputs have one of the listed values
6531
+ */
6532
+ export interface Conditional {
6533
+ /**
6534
+ * The conditions to check:
6535
+ *
6536
+ * - Key: name of the input to check
6537
+ * - Value: values of that input that satisfy the condition
6538
+ */
6539
+ values: unknown;
6540
+
6541
+ /**
6542
+ * How the conditions combine: \`and\` (all must match) or \`or\` (any must match)
6543
+ */
6544
+ operator?: 'and' | 'or';
6545
+ }
6546
+ }
6307
6547
  }
6308
6548
 
6309
6549
  /**
@@ -6344,8 +6584,7 @@ export namespace WorkflowRunResponse {
6344
6584
  * - \`ifNotDefined\`: Input is required when another specified input is not
6345
6585
  * defined
6346
6586
  * - \`ifDefined\`: Input is required when another specified input is defined
6347
- * - \`conditionalValues\`: Input is required when another input has a specific
6348
- * value
6587
+ * - \`conditional\`: Input is required when other inputs have specific values
6349
6588
  *
6350
6589
  * By default, the input is not required.
6351
6590
  */
@@ -6356,12 +6595,9 @@ export namespace WorkflowRunResponse {
6356
6595
  always?: boolean;
6357
6596
 
6358
6597
  /**
6359
- * Makes this input required when another input has a specific value:
6360
- *
6361
- * - Key: name of the input to check
6362
- * - Value: operation and allowed values that trigger the requirement
6598
+ * Makes this input required when other inputs have one of the listed values
6363
6599
  */
6364
- conditionalValues?: unknown;
6600
+ conditional?: Required.Conditional;
6365
6601
 
6366
6602
  /**
6367
6603
  * Makes this input required when another input is defined:
@@ -6379,6 +6615,26 @@ export namespace WorkflowRunResponse {
6379
6615
  */
6380
6616
  ifNotDefined?: unknown;
6381
6617
  }
6618
+
6619
+ export namespace Required {
6620
+ /**
6621
+ * Makes this input required when other inputs have one of the listed values
6622
+ */
6623
+ export interface Conditional {
6624
+ /**
6625
+ * The conditions to check:
6626
+ *
6627
+ * - Key: name of the input to check
6628
+ * - Value: values of that input that satisfy the condition
6629
+ */
6630
+ values: unknown;
6631
+
6632
+ /**
6633
+ * How the conditions combine: \`and\` (all must match) or \`or\` (any must match)
6634
+ */
6635
+ operator?: 'and' | 'or';
6636
+ }
6637
+ }
6382
6638
  }
6383
6639
 
6384
6640
  /**
@@ -6649,6 +6905,7 @@ export namespace WorkflowRunResponse {
6649
6905
  | 'remove-background'
6650
6906
  | 'transform'
6651
6907
  | 'user-approval'
6908
+ | 'user-selection'
6652
6909
  | 'workflow';
6653
6910
 
6654
6911
  /**
@@ -6674,14 +6931,15 @@ export namespace WorkflowRunResponse {
6674
6931
  includeOutputsInWorkflowJob?: true;
6675
6932
 
6676
6933
  /**
6677
- * The inputs of the node.
6934
+ * The inputs of the node. For a user-selection node, the array input's `min`/`max`
6935
+ * bound how many items the user may pick (defaults: 1 and 100); conditional
6936
+ * connections may be present as additional inputs.
6678
6937
  */
6679
6938
  inputs?: Array<Flow.Input>;
6680
6939
 
6681
6940
  /**
6682
- * Statically-configured items for a List node. The node outputs this array as-is
6683
- * when executed. Only available for List nodes. The values can be strings,
6684
- * numbers, or asset IDs.
6941
+ * Statically-configured items for a List node, or the frozen candidate list of a
6942
+ * UserSelection node. The values can be strings, numbers, or asset IDs.
6685
6943
  */
6686
6944
  items?: Array<string>;
6687
6945
 
@@ -6943,8 +7201,7 @@ export namespace WorkflowRunResponse {
6943
7201
  * - \`ifNotDefined\`: Input is required when another specified input is not
6944
7202
  * defined
6945
7203
  * - \`ifDefined\`: Input is required when another specified input is defined
6946
- * - \`conditionalValues\`: Input is required when another input has a specific
6947
- * value
7204
+ * - \`conditional\`: Input is required when other inputs have specific values
6948
7205
  *
6949
7206
  * By default, the input is not required.
6950
7207
  */
@@ -7174,8 +7431,7 @@ export namespace WorkflowRunResponse {
7174
7431
  * - \`ifNotDefined\`: Input is required when another specified input is not
7175
7432
  * defined
7176
7433
  * - \`ifDefined\`: Input is required when another specified input is defined
7177
- * - \`conditionalValues\`: Input is required when another input has a specific
7178
- * value
7434
+ * - \`conditional\`: Input is required when other inputs have specific values
7179
7435
  *
7180
7436
  * By default, the input is not required.
7181
7437
  */
@@ -7232,8 +7488,7 @@ export namespace WorkflowRunResponse {
7232
7488
  * - \`ifNotDefined\`: Input is required when another specified input is not
7233
7489
  * defined
7234
7490
  * - \`ifDefined\`: Input is required when another specified input is defined
7235
- * - \`conditionalValues\`: Input is required when another input has a specific
7236
- * value
7491
+ * - \`conditional\`: Input is required when other inputs have specific values
7237
7492
  *
7238
7493
  * By default, the input is not required.
7239
7494
  */
@@ -7244,12 +7499,9 @@ export namespace WorkflowRunResponse {
7244
7499
  always?: boolean;
7245
7500
 
7246
7501
  /**
7247
- * Makes this input required when another input has a specific value:
7248
- *
7249
- * - Key: name of the input to check
7250
- * - Value: operation and allowed values that trigger the requirement
7502
+ * Makes this input required when other inputs have one of the listed values
7251
7503
  */
7252
- conditionalValues?: unknown;
7504
+ conditional?: Required.Conditional;
7253
7505
 
7254
7506
  /**
7255
7507
  * Makes this input required when another input is defined:
@@ -7267,6 +7519,26 @@ export namespace WorkflowRunResponse {
7267
7519
  */
7268
7520
  ifNotDefined?: unknown;
7269
7521
  }
7522
+
7523
+ export namespace Required {
7524
+ /**
7525
+ * Makes this input required when other inputs have one of the listed values
7526
+ */
7527
+ export interface Conditional {
7528
+ /**
7529
+ * The conditions to check:
7530
+ *
7531
+ * - Key: name of the input to check
7532
+ * - Value: values of that input that satisfy the condition
7533
+ */
7534
+ values: unknown;
7535
+
7536
+ /**
7537
+ * How the conditions combine: \`and\` (all must match) or \`or\` (any must match)
7538
+ */
7539
+ operator?: 'and' | 'or';
7540
+ }
7541
+ }
7270
7542
  }
7271
7543
 
7272
7544
  /**
@@ -7307,8 +7579,7 @@ export namespace WorkflowRunResponse {
7307
7579
  * - \`ifNotDefined\`: Input is required when another specified input is not
7308
7580
  * defined
7309
7581
  * - \`ifDefined\`: Input is required when another specified input is defined
7310
- * - \`conditionalValues\`: Input is required when another input has a specific
7311
- * value
7582
+ * - \`conditional\`: Input is required when other inputs have specific values
7312
7583
  *
7313
7584
  * By default, the input is not required.
7314
7585
  */
@@ -7319,12 +7590,9 @@ export namespace WorkflowRunResponse {
7319
7590
  always?: boolean;
7320
7591
 
7321
7592
  /**
7322
- * Makes this input required when another input has a specific value:
7323
- *
7324
- * - Key: name of the input to check
7325
- * - Value: operation and allowed values that trigger the requirement
7593
+ * Makes this input required when other inputs have one of the listed values
7326
7594
  */
7327
- conditionalValues?: unknown;
7595
+ conditional?: Required.Conditional;
7328
7596
 
7329
7597
  /**
7330
7598
  * Makes this input required when another input is defined:
@@ -7342,6 +7610,26 @@ export namespace WorkflowRunResponse {
7342
7610
  */
7343
7611
  ifNotDefined?: unknown;
7344
7612
  }
7613
+
7614
+ export namespace Required {
7615
+ /**
7616
+ * Makes this input required when other inputs have one of the listed values
7617
+ */
7618
+ export interface Conditional {
7619
+ /**
7620
+ * The conditions to check:
7621
+ *
7622
+ * - Key: name of the input to check
7623
+ * - Value: values of that input that satisfy the condition
7624
+ */
7625
+ values: unknown;
7626
+
7627
+ /**
7628
+ * How the conditions combine: \`and\` (all must match) or \`or\` (any must match)
7629
+ */
7630
+ operator?: 'and' | 'or';
7631
+ }
7632
+ }
7345
7633
  }
7346
7634
 
7347
7635
  /**
@@ -7581,8 +7869,7 @@ export namespace WorkflowRunResponse {
7581
7869
  * - \`ifNotDefined\`: Input is required when another specified input is not
7582
7870
  * defined
7583
7871
  * - \`ifDefined\`: Input is required when another specified input is defined
7584
- * - \`conditionalValues\`: Input is required when another input has a specific
7585
- * value
7872
+ * - \`conditional\`: Input is required when other inputs have specific values
7586
7873
  *
7587
7874
  * By default, the input is not required.
7588
7875
  */
@@ -7602,8 +7889,7 @@ export namespace WorkflowRunResponse {
7602
7889
  * - \`ifNotDefined\`: Input is required when another specified input is not
7603
7890
  * defined
7604
7891
  * - \`ifDefined\`: Input is required when another specified input is defined
7605
- * - \`conditionalValues\`: Input is required when another input has a specific
7606
- * value
7892
+ * - \`conditional\`: Input is required when other inputs have specific values
7607
7893
  *
7608
7894
  * By default, the input is not required.
7609
7895
  */
@@ -7614,12 +7900,9 @@ export namespace WorkflowRunResponse {
7614
7900
  always?: boolean;
7615
7901
 
7616
7902
  /**
7617
- * Makes this input required when another input has a specific value:
7618
- *
7619
- * - Key: name of the input to check
7620
- * - Value: operation and allowed values that trigger the requirement
7903
+ * Makes this input required when other inputs have one of the listed values
7621
7904
  */
7622
- conditionalValues?: unknown;
7905
+ conditional?: Required.Conditional;
7623
7906
 
7624
7907
  /**
7625
7908
  * Makes this input required when another input is defined:
@@ -7637,6 +7920,26 @@ export namespace WorkflowRunResponse {
7637
7920
  */
7638
7921
  ifNotDefined?: unknown;
7639
7922
  }
7923
+
7924
+ export namespace Required {
7925
+ /**
7926
+ * Makes this input required when other inputs have one of the listed values
7927
+ */
7928
+ export interface Conditional {
7929
+ /**
7930
+ * The conditions to check:
7931
+ *
7932
+ * - Key: name of the input to check
7933
+ * - Value: values of that input that satisfy the condition
7934
+ */
7935
+ values: unknown;
7936
+
7937
+ /**
7938
+ * How the conditions combine: \`and\` (all must match) or \`or\` (any must match)
7939
+ */
7940
+ operator?: 'and' | 'or';
7941
+ }
7942
+ }
7640
7943
  }
7641
7944
 
7642
7945
  /**
@@ -8010,6 +8313,7 @@ export namespace WorkflowUserApprovalResponse {
8010
8313
  | 'remove-background'
8011
8314
  | 'transform'
8012
8315
  | 'user-approval'
8316
+ | 'user-selection'
8013
8317
  | 'workflow';
8014
8318
 
8015
8319
  /**
@@ -8040,14 +8344,15 @@ export namespace WorkflowUserApprovalResponse {
8040
8344
  includeOutputsInWorkflowJob?: true;
8041
8345
 
8042
8346
  /**
8043
- * The inputs of the node.
8347
+ * The inputs of the node. For a user-selection node, the array input's `min`/`max`
8348
+ * bound how many items the user may pick (defaults: 1 and 100); conditional
8349
+ * connections may be present as additional inputs.
8044
8350
  */
8045
8351
  inputs?: Array<Flow.Input>;
8046
8352
 
8047
8353
  /**
8048
- * Statically-configured items for a List node. The node outputs this array as-is
8049
- * when executed. Only available for List nodes. The values can be strings,
8050
- * numbers, or asset IDs.
8354
+ * Statically-configured items for a List node, or the frozen candidate list of a
8355
+ * UserSelection node. The values can be strings, numbers, or asset IDs.
8051
8356
  */
8052
8357
  items?: Array<string>;
8053
8358
 
@@ -8327,8 +8632,7 @@ export namespace WorkflowUserApprovalResponse {
8327
8632
  * - \`ifNotDefined\`: Input is required when another specified input is not
8328
8633
  * defined
8329
8634
  * - \`ifDefined\`: Input is required when another specified input is defined
8330
- * - \`conditionalValues\`: Input is required when another input has a specific
8331
- * value
8635
+ * - \`conditional\`: Input is required when other inputs have specific values
8332
8636
  *
8333
8637
  * By default, the input is not required.
8334
8638
  */
@@ -8558,8 +8862,7 @@ export namespace WorkflowUserApprovalResponse {
8558
8862
  * - \`ifNotDefined\`: Input is required when another specified input is not
8559
8863
  * defined
8560
8864
  * - \`ifDefined\`: Input is required when another specified input is defined
8561
- * - \`conditionalValues\`: Input is required when another input has a specific
8562
- * value
8865
+ * - \`conditional\`: Input is required when other inputs have specific values
8563
8866
  *
8564
8867
  * By default, the input is not required.
8565
8868
  */
@@ -8616,8 +8919,7 @@ export namespace WorkflowUserApprovalResponse {
8616
8919
  * - \`ifNotDefined\`: Input is required when another specified input is not
8617
8920
  * defined
8618
8921
  * - \`ifDefined\`: Input is required when another specified input is defined
8619
- * - \`conditionalValues\`: Input is required when another input has a specific
8620
- * value
8922
+ * - \`conditional\`: Input is required when other inputs have specific values
8621
8923
  *
8622
8924
  * By default, the input is not required.
8623
8925
  */
@@ -8628,12 +8930,9 @@ export namespace WorkflowUserApprovalResponse {
8628
8930
  always?: boolean;
8629
8931
 
8630
8932
  /**
8631
- * Makes this input required when another input has a specific value:
8632
- *
8633
- * - Key: name of the input to check
8634
- * - Value: operation and allowed values that trigger the requirement
8933
+ * Makes this input required when other inputs have one of the listed values
8635
8934
  */
8636
- conditionalValues?: unknown;
8935
+ conditional?: Required.Conditional;
8637
8936
 
8638
8937
  /**
8639
8938
  * Makes this input required when another input is defined:
@@ -8651,10 +8950,1080 @@ export namespace WorkflowUserApprovalResponse {
8651
8950
  */
8652
8951
  ifNotDefined?: unknown;
8653
8952
  }
8654
- }
8655
8953
 
8656
- /**
8657
- * The reference to another input or output of the same workflow. Must have at
8954
+ export namespace Required {
8955
+ /**
8956
+ * Makes this input required when other inputs have one of the listed values
8957
+ */
8958
+ export interface Conditional {
8959
+ /**
8960
+ * The conditions to check:
8961
+ *
8962
+ * - Key: name of the input to check
8963
+ * - Value: values of that input that satisfy the condition
8964
+ */
8965
+ values: unknown;
8966
+
8967
+ /**
8968
+ * How the conditions combine: \`and\` (all must match) or \`or\` (any must match)
8969
+ */
8970
+ operator?: 'and' | 'or';
8971
+ }
8972
+ }
8973
+ }
8974
+
8975
+ /**
8976
+ * The reference to another input or output of the same workflow. Must have at
8977
+ * least one of node or conditional.
8978
+ */
8979
+ export interface Ref {
8980
+ /**
8981
+ * The conditional nodes to reference. If the conditional nodes are successful, the
8982
+ * node will be successful. If the conditional nodes are skipped, the node will be
8983
+ * skipped. Contains an array of node ids used to check the status of the nodes.
8984
+ */
8985
+ conditional?: Array<string>;
8986
+
8987
+ /**
8988
+ * This is the desired node output value if ref is an if/else node.
8989
+ */
8990
+ equal?: string;
8991
+
8992
+ /**
8993
+ * The name of the input or output to reference. If the type is 'workflow', the
8994
+ * name is the name of the input of the workflow is required If the type is 'node',
8995
+ * the name is not mandatory, except if you want all outputs of the node. To get
8996
+ * all outputs of a node, you can use the name 'all'.
8997
+ */
8998
+ name?: string;
8999
+
9000
+ /**
9001
+ * The node id or 'workflow' if the source is a workflow input.
9002
+ */
9003
+ node?: string;
9004
+ }
9005
+
9006
+ /**
9007
+ * Set of rules that describes when this input is required:
9008
+ *
9009
+ * - \`always\`: Input is always required
9010
+ * - \`ifNotDefined\`: Input is required when another specified input is not
9011
+ * defined
9012
+ * - \`ifDefined\`: Input is required when another specified input is defined
9013
+ * - \`conditional\`: Input is required when other inputs have specific values
9014
+ *
9015
+ * By default, the input is not required.
9016
+ */
9017
+ export interface Required {
9018
+ /**
9019
+ * Whether the input is always required
9020
+ */
9021
+ always?: boolean;
9022
+
9023
+ /**
9024
+ * Makes this input required when other inputs have one of the listed values
9025
+ */
9026
+ conditional?: Required.Conditional;
9027
+
9028
+ /**
9029
+ * Makes this input required when another input is defined:
9030
+ *
9031
+ * - Key: name of the input that must be defined
9032
+ * - Value: message to display when this input is required
9033
+ */
9034
+ ifDefined?: unknown;
9035
+
9036
+ /**
9037
+ * Makes this input required when another input is not defined:
9038
+ *
9039
+ * - Key: name of the input that must be undefined
9040
+ * - Value: message to display when this input is required
9041
+ */
9042
+ ifNotDefined?: unknown;
9043
+ }
9044
+
9045
+ export namespace Required {
9046
+ /**
9047
+ * Makes this input required when other inputs have one of the listed values
9048
+ */
9049
+ export interface Conditional {
9050
+ /**
9051
+ * The conditions to check:
9052
+ *
9053
+ * - Key: name of the input to check
9054
+ * - Value: values of that input that satisfy the condition
9055
+ */
9056
+ values: unknown;
9057
+
9058
+ /**
9059
+ * How the conditions combine: \`and\` (all must match) or \`or\` (any must match)
9060
+ */
9061
+ operator?: 'and' | 'or';
9062
+ }
9063
+ }
9064
+ }
9065
+
9066
+ /**
9067
+ * The logic of the node. Only available for logic nodes.
9068
+ */
9069
+ export interface Logic {
9070
+ /**
9071
+ * The cases of the logic. Only available for if/else nodes.
9072
+ */
9073
+ cases?: Array<Logic.Case>;
9074
+
9075
+ /**
9076
+ * The default case of the logic. Contains the id/output of the node to execute if
9077
+ * no case is matched. Only available for if/else nodes.
9078
+ */
9079
+ default?: string;
9080
+
9081
+ /**
9082
+ * The transform of the logic. Only available for transform nodes.
9083
+ */
9084
+ transform?: string;
9085
+ }
9086
+
9087
+ export namespace Logic {
9088
+ export interface Case {
9089
+ condition: string;
9090
+
9091
+ value: string;
9092
+ }
9093
+ }
9094
+ }
9095
+ }
9096
+
9097
+ export interface StatusHistory {
9098
+ date: string;
9099
+
9100
+ status:
9101
+ | 'canceled'
9102
+ | 'failure'
9103
+ | 'finalizing'
9104
+ | 'in-progress'
9105
+ | 'pending'
9106
+ | 'queued'
9107
+ | 'success'
9108
+ | 'warming-up';
9109
+ }
9110
+
9111
+ /**
9112
+ * The billing of the job
9113
+ */
9114
+ export interface Billing {
9115
+ cuCost: number;
9116
+
9117
+ cuDiscount: number;
9118
+
9119
+ /**
9120
+ * Compute Units charged for the ADD-ONS of this job, per action — the fees paid on
9121
+ * top of the generation itself, such as `quality-gate`.
9122
+ *
9123
+ * `cuCost` above is the main action alone, so the job's total is `cuCost` plus the
9124
+ * values here.
9125
+ *
9126
+ * Two caveats when displaying it:
9127
+ *
9128
+ * - These are a remaining refundable balance, not a receipt: a job that failed or
9129
+ * was cancelled has had its add-ons refunded, so they read 0 while `cuCost`
9130
+ * still shows the main action's original charge.
9131
+ * - `ip-detection` is part of the shape but is never populated today: that fee is
9132
+ * charged outside the job and reported once, as
9133
+ * `ipDetection.creativeUnitsCharged`, in the response of the request that ran
9134
+ * it.
9135
+ *
9136
+ * Absent when the job paid for no add-on.
9137
+ */
9138
+ cuCostDetails?: Billing.CuCostDetails;
9139
+
9140
+ /**
9141
+ * When true, the credits charged for this job are not automatically refunded if
9142
+ * the generation fails, because the model used does not support refund-on-failure.
9143
+ * Absent or false means a failed generation is refunded as usual.
9144
+ */
9145
+ disableRefund?: boolean;
9146
+ }
9147
+
9148
+ export namespace Billing {
9149
+ /**
9150
+ * Compute Units charged for the ADD-ONS of this job, per action — the fees paid on
9151
+ * top of the generation itself, such as `quality-gate`.
9152
+ *
9153
+ * `cuCost` above is the main action alone, so the job's total is `cuCost` plus the
9154
+ * values here.
9155
+ *
9156
+ * Two caveats when displaying it:
9157
+ *
9158
+ * - These are a remaining refundable balance, not a receipt: a job that failed or
9159
+ * was cancelled has had its add-ons refunded, so they read 0 while `cuCost`
9160
+ * still shows the main action's original charge.
9161
+ * - `ip-detection` is part of the shape but is never populated today: that fee is
9162
+ * charged outside the job and reported once, as
9163
+ * `ipDetection.creativeUnitsCharged`, in the response of the request that ran
9164
+ * it.
9165
+ *
9166
+ * Absent when the job paid for no add-on.
9167
+ */
9168
+ export interface CuCostDetails {
9169
+ 'ip-detection'?: number;
9170
+
9171
+ 'quality-gate'?: number;
9172
+ }
9173
+ }
9174
+ }
9175
+ }
9176
+
9177
+ export interface WorkflowUserSelectionResponse {
9178
+ job: WorkflowUserSelectionResponse.Job;
9179
+ }
9180
+
9181
+ export namespace WorkflowUserSelectionResponse {
9182
+ export interface Job {
9183
+ /**
9184
+ * The job creation date as an ISO string (example: "2023-02-03T11:19:41.579Z")
9185
+ */
9186
+ createdAt: string;
9187
+
9188
+ /**
9189
+ * The job ID (example: "job_ocZCnG1Df35XRL1QyCZSRxAG8")
9190
+ */
9191
+ jobId: string;
9192
+
9193
+ /**
9194
+ * The type of job
9195
+ */
9196
+ jobType:
9197
+ | 'assets-download'
9198
+ | 'canvas-export'
9199
+ | 'caption'
9200
+ | 'caption-llava'
9201
+ | 'custom'
9202
+ | 'describe-style'
9203
+ | 'detection'
9204
+ | 'embed'
9205
+ | 'flux'
9206
+ | 'flux-model-training'
9207
+ | 'generate-prompt'
9208
+ | 'image-generation'
9209
+ | 'image-prompt-editing'
9210
+ | 'inference'
9211
+ | 'mesh-preview-rendering'
9212
+ | 'model-download'
9213
+ | 'model-import'
9214
+ | 'model-training'
9215
+ | 'musubi-model-training'
9216
+ | 'openai-image-generation'
9217
+ | 'patch-image'
9218
+ | 'pixelate'
9219
+ | 'reframe'
9220
+ | 'remove-background'
9221
+ | 'repaint'
9222
+ | 'restyle'
9223
+ | 'segment'
9224
+ | 'skybox-3d'
9225
+ | 'skybox-base-360'
9226
+ | 'skybox-hdri'
9227
+ | 'skybox-upscale-360'
9228
+ | 'splat'
9229
+ | 'texture'
9230
+ | 'translate'
9231
+ | 'upload'
9232
+ | 'upscale'
9233
+ | 'upscale-skybox'
9234
+ | 'upscale-texture'
9235
+ | 'vectorize'
9236
+ | 'workflow';
9237
+
9238
+ /**
9239
+ * Metadata of the job with some additional information
9240
+ */
9241
+ metadata: Job.Metadata;
9242
+
9243
+ /**
9244
+ * Progress of the job (between 0 and 1)
9245
+ */
9246
+ progress: number;
9247
+
9248
+ /**
9249
+ * The current status of the job
9250
+ */
9251
+ status:
9252
+ | 'canceled'
9253
+ | 'failure'
9254
+ | 'finalizing'
9255
+ | 'in-progress'
9256
+ | 'pending'
9257
+ | 'queued'
9258
+ | 'success'
9259
+ | 'warming-up';
9260
+
9261
+ /**
9262
+ * The history of the different statuses the job went through with the ISO string
9263
+ * date of when the job reached each statuses.
9264
+ */
9265
+ statusHistory: Array<Job.StatusHistory>;
9266
+
9267
+ /**
9268
+ * The job last update date as an ISO string (example: "2023-02-03T11:19:41.579Z")
9269
+ */
9270
+ updatedAt: string;
9271
+
9272
+ /**
9273
+ * The author user ID (example: "dcf121faaa1a0a0bbbd9ca1b73d62aea")
9274
+ */
9275
+ authorId?: string;
9276
+
9277
+ /**
9278
+ * The billing of the job
9279
+ */
9280
+ billing?: Job.Billing;
9281
+
9282
+ /**
9283
+ * The owner ID (example: "team_U3Qmc8PCdWXwAQJ4Dvw4tV6D")
9284
+ */
9285
+ ownerId?: string;
9286
+ }
9287
+
9288
+ export namespace Job {
9289
+ /**
9290
+ * Metadata of the job with some additional information
9291
+ */
9292
+ export interface Metadata {
9293
+ /**
9294
+ * List of produced assets for this job
9295
+ */
9296
+ assetIds?: Array<string>;
9297
+
9298
+ /**
9299
+ * Eventual error for the job
9300
+ */
9301
+ error?: string | null;
9302
+
9303
+ /**
9304
+ * The flow of the job. Only available for workflow jobs.
9305
+ */
9306
+ flow?: Array<Metadata.Flow>;
9307
+
9308
+ /**
9309
+ * Actionable hint for the user explaining what went wrong and how to resolve it.
9310
+ */
9311
+ hint?: string;
9312
+
9313
+ /**
9314
+ * The inputs for the job
9315
+ */
9316
+ input?: { [key: string]: unknown };
9317
+
9318
+ /**
9319
+ * May contain the output of the job for specific custom models jobs. Only
9320
+ * available for custom models which generate non-assets outputs. Example: LLM text
9321
+ * results.
9322
+ */
9323
+ output?: { [key: string]: unknown };
9324
+
9325
+ /**
9326
+ * For voice-clone jobs: the ID of the model being trained.
9327
+ */
9328
+ outputModelId?: string;
9329
+
9330
+ /**
9331
+ * The workflow ID of the job if job is part of a workflow.
9332
+ */
9333
+ workflowId?: string;
9334
+
9335
+ /**
9336
+ * The workflow job ID of the job if job is part of a workflow job.
9337
+ */
9338
+ workflowJobId?: string;
9339
+ }
9340
+
9341
+ export namespace Metadata {
9342
+ export interface Flow {
9343
+ /**
9344
+ * The id of the node.
9345
+ */
9346
+ id: string;
9347
+
9348
+ /**
9349
+ * The status of the node. Only available for WorkflowJob nodes.
9350
+ */
9351
+ status: 'failure' | 'pending' | 'processing' | 'rejected' | 'skipped' | 'success';
9352
+
9353
+ /**
9354
+ * The type of the job for the node.
9355
+ */
9356
+ type:
9357
+ | 'custom-model'
9358
+ | 'for-each'
9359
+ | 'generate-prompt'
9360
+ | 'list'
9361
+ | 'logic'
9362
+ | 'model'
9363
+ | 'remove-background'
9364
+ | 'transform'
9365
+ | 'user-approval'
9366
+ | 'user-selection'
9367
+ | 'workflow';
9368
+
9369
+ /**
9370
+ * List of produced assets for this node.
9371
+ */
9372
+ assets?: Array<Flow.Asset>;
9373
+
9374
+ /**
9375
+ * Fixed number of iterations for a ForEach node. When set, the loop runs exactly
9376
+ * `count` times regardless of array input. When not set, the loop iterates over
9377
+ * the resolved array input. Only available for ForEach nodes.
9378
+ */
9379
+ count?: number;
9380
+
9381
+ /**
9382
+ * The nodes that this node depends on. Only available for nodes that have
9383
+ * dependencies. Mainly used for user approval nodes.
9384
+ */
9385
+ dependsOn?: Array<string>;
9386
+
9387
+ /**
9388
+ * If true, the outputs of this node will be included in the workflow job's final
9389
+ * output. Only applicable to producing nodes (custom-model, inference, etc.). By
9390
+ * default, only last nodes (nodes not referenced by other nodes) contribute to
9391
+ * outputs. Set this to true to also include intermediate nodes in the final
9392
+ * output. Note: This should only be set to `true` or left undefined.
9393
+ */
9394
+ includeOutputsInWorkflowJob?: true;
9395
+
9396
+ /**
9397
+ * The inputs of the node. For a user-selection node, the array input's `min`/`max`
9398
+ * bound how many items the user may pick (defaults: 1 and 100); conditional
9399
+ * connections may be present as additional inputs.
9400
+ */
9401
+ inputs?: Array<Flow.Input>;
9402
+
9403
+ /**
9404
+ * Statically-configured items for a List node, or the frozen candidate list of a
9405
+ * UserSelection node. The values can be strings, numbers, or asset IDs.
9406
+ */
9407
+ items?: Array<string>;
9408
+
9409
+ /**
9410
+ * Zero-based index of the iteration this node copy belongs to. Set on
9411
+ * dynamically-created copies of loop body nodes.
9412
+ */
9413
+ iterationIndex?: number;
9414
+
9415
+ /**
9416
+ * If the flow is part of a WorkflowJob, this is the jobId for the node. jobId is
9417
+ * only available for nodes started. A node "Pending" for a running workflow job is
9418
+ * not started.
9419
+ */
9420
+ jobId?: string;
9421
+
9422
+ /**
9423
+ * The logic of the node. Only available for logic nodes.
9424
+ */
9425
+ logic?: Flow.Logic;
9426
+
9427
+ /**
9428
+ * The type of the logic for the node. Only available for logic nodes.
9429
+ */
9430
+ logicType?: 'if-else';
9431
+
9432
+ /**
9433
+ * IDs of the body template nodes that belong to this ForEach loop. At runtime
9434
+ * these templates are cloned once per iteration and marked Skipped. Only available
9435
+ * for ForEach nodes.
9436
+ */
9437
+ loopBodyNodeIds?: Array<string>;
9438
+
9439
+ /**
9440
+ * ID of the ForEach node that spawned this iteration copy. Set on
9441
+ * dynamically-created copies of loop body nodes.
9442
+ */
9443
+ loopNodeId?: string;
9444
+
9445
+ /**
9446
+ * The model id for the node. Mainly used for custom model tasks.
9447
+ */
9448
+ modelId?: string;
9449
+
9450
+ /**
9451
+ * The output of the node. Only available for logic nodes.
9452
+ */
9453
+ output?: unknown;
9454
+
9455
+ /**
9456
+ * The workflow id for the node. Mainly used for workflow tasks.
9457
+ */
9458
+ workflowId?: string;
9459
+ }
9460
+
9461
+ export namespace Flow {
9462
+ export interface Asset {
9463
+ assetId: string;
9464
+
9465
+ url: string;
9466
+ }
9467
+
9468
+ /**
9469
+ * This is used to run the flow.
9470
+ */
9471
+ export interface Input {
9472
+ /**
9473
+ * The name that must be user to call the model through the API
9474
+ */
9475
+ name: string;
9476
+
9477
+ /**
9478
+ * The data type of the input
9479
+ */
9480
+ type:
9481
+ | 'boolean'
9482
+ | 'file'
9483
+ | 'file_array'
9484
+ | 'inputs_array'
9485
+ | 'model'
9486
+ | 'model_array'
9487
+ | 'number'
9488
+ | 'number_array'
9489
+ | 'string'
9490
+ | 'string_array';
9491
+
9492
+ /**
9493
+ * The allowed values for the input. For \`string\` or \`number\` types, creates a
9494
+ * single-select dropdown. For \`string_array\` type, creates a multi-select
9495
+ * dropdown.
9496
+ */
9497
+ allowedValues?: Array<unknown>;
9498
+
9499
+ /**
9500
+ * Specifies the background behavior for the input. Only available for \`file\` and
9501
+ * \`file_array\` input types with kind \`image\`.
9502
+ */
9503
+ backgroundBehavior?: 'opaque' | 'transparent';
9504
+
9505
+ /**
9506
+ * Whether the input is a color or not. Only available for \`string\` input type.
9507
+ */
9508
+ color?: boolean;
9509
+
9510
+ /**
9511
+ * Whether this input affects the model's cost calculation
9512
+ */
9513
+ costImpact?: boolean;
9514
+
9515
+ /**
9516
+ * The default value for the input
9517
+ */
9518
+ default?: unknown;
9519
+
9520
+ /**
9521
+ * Help text displayed in the UI to provide additional information about the input
9522
+ */
9523
+ description?: string;
9524
+
9525
+ /**
9526
+ * Used to visually group inputs together in the UI. Inputs with the same group
9527
+ * value appear consecutively in the UI.
9528
+ */
9529
+ group?: string;
9530
+
9531
+ /**
9532
+ * Hint text displayed in the UI as a tooltip to guide the user
9533
+ */
9534
+ hint?: string;
9535
+
9536
+ /**
9537
+ * The list of inputs which form an object within a container array. All inputs are
9538
+ * the same as the current object. This is only available for type inputs_array
9539
+ * inputs.
9540
+ */
9541
+ inputs?: Array<{ [key: string]: unknown }>;
9542
+
9543
+ /**
9544
+ * The configured items for inputs_array type inputs. Each item is an array of
9545
+ * SubNodeInput that need ref/value resolution. Only available for inputs_array
9546
+ * type.
9547
+ */
9548
+ items?: Array<Array<Input.Item>>;
9549
+
9550
+ /**
9551
+ * The asset kind of the input. Only taken into account for \`file\` and
9552
+ * \`file_array\` input types. If model provides multiple kinds, the input will be
9553
+ * not able to create the asset on the flight on API side with dataurl without
9554
+ * data:kind, prefix \`file\` and \`file_array\` inputs always expose a kind: when
9555
+ * a model does not declare one, \`image\` is returned, which is the kind used at
9556
+ * generation time.
9557
+ */
9558
+ kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'text' | 'video';
9559
+
9560
+ /**
9561
+ * The label displayed in the UI for this input
9562
+ */
9563
+ label?: string;
9564
+
9565
+ /**
9566
+ * The name of the file input field to use as the mask source
9567
+ */
9568
+ maskFrom?: string;
9569
+
9570
+ /**
9571
+ * The maximum allowed value. Only available for \`number\` and \`array\` input
9572
+ * types.
9573
+ */
9574
+ max?: number;
9575
+
9576
+ /**
9577
+ * The maximum allowed media duration in seconds. Only applies to \`file\` and
9578
+ * \`file_array\` input types for video and audio assets. Validated against
9579
+ * \`asset.properties.duration\` at job creation time.
9580
+ */
9581
+ maxDuration?: number;
9582
+
9583
+ /**
9584
+ * The maximum allowed length for \`string\` and \`model\` inputs, in characters.
9585
+ * For the array types (\`string_array\`, \`model_array\`) it bounds the NUMBER OF
9586
+ * ITEMS instead — the length of each item is not constrained.
9587
+ */
9588
+ maxLength?: number;
9589
+
9590
+ /**
9591
+ * The maximum allowed file size in bytes. Only applies to \`file\` and
9592
+ * \`file_array\` input types. Validated against \`asset.properties.size\` at job
9593
+ * creation time.
9594
+ */
9595
+ maxSize?: number;
9596
+
9597
+ /**
9598
+ * The minimum allowed value. Only available for \`number\` and array input types.
9599
+ */
9600
+ min?: number;
9601
+
9602
+ /**
9603
+ * The minimum allowed length for \`string\` and \`model\` inputs, in characters.
9604
+ * For the array types (\`string_array\`, \`model_array\`) it bounds the NUMBER OF
9605
+ * ITEMS instead — the length of each item is not constrained.
9606
+ */
9607
+ minLength?: number;
9608
+
9609
+ /**
9610
+ * The allowed model types for this input. Example: \`["flux.1-lora"]\`. Only
9611
+ * available for \`model_array\` input type.
9612
+ */
9613
+ modelTypes?: Array<
9614
+ | 'custom'
9615
+ | 'elevenlabs-voice'
9616
+ | 'flux.1'
9617
+ | 'flux.1-composition'
9618
+ | 'flux.1-kontext-dev'
9619
+ | 'flux.1-kontext-lora'
9620
+ | 'flux.1-krea-dev'
9621
+ | 'flux.1-krea-lora'
9622
+ | 'flux.1-lora'
9623
+ | 'flux.1-pro'
9624
+ | 'flux.1.1-pro-ultra'
9625
+ | 'flux.2-dev-edit-lora'
9626
+ | 'flux.2-dev-lora'
9627
+ | 'flux.2-klein-4b-edit-lora'
9628
+ | 'flux.2-klein-4b-lora'
9629
+ | 'flux.2-klein-9b-edit-lora'
9630
+ | 'flux.2-klein-9b-lora'
9631
+ | 'flux.2-klein-base-4b-edit-lora'
9632
+ | 'flux.2-klein-base-4b-lora'
9633
+ | 'flux.2-klein-base-9b-edit-lora'
9634
+ | 'flux.2-klein-base-9b-lora'
9635
+ | 'flux1.1-pro'
9636
+ | 'gpt-image-1'
9637
+ | 'qwen-image-2512-lora'
9638
+ | 'qwen-image-edit-2509-lora'
9639
+ | 'qwen-image-edit-2511-lora'
9640
+ | 'qwen-image-edit-lora'
9641
+ | 'qwen-image-lora'
9642
+ | 'zimage-de-turbo-lora'
9643
+ | 'zimage-lora'
9644
+ | 'zimage-turbo-lora'
9645
+ >;
9646
+
9647
+ /**
9648
+ * Whether this input represents a parent asset to assign to the produced assets.
9649
+ * Only available for \`file\` and \`file_array\` input types.
9650
+ *
9651
+ * For \`file_array\`, the parent asset is the first item in the array.
9652
+ */
9653
+ parent?: boolean;
9654
+
9655
+ /**
9656
+ * Placeholder text for the input. Only available for 'string' input type.
9657
+ */
9658
+ placeholder?: string;
9659
+
9660
+ /**
9661
+ * Whether the input is a prompt. When true, displays as a text area with prompt
9662
+ * spark feature. Only available for \`string\` input type.
9663
+ */
9664
+ prompt?: boolean;
9665
+
9666
+ /**
9667
+ * Whether the input is used with prompt spark. Only available for \`string\` input
9668
+ * type.
9669
+ */
9670
+ promptSpark?: boolean;
9671
+
9672
+ /**
9673
+ * The reference to another input or output of the same workflow. Must have at
9674
+ * least one of node or conditional.
9675
+ */
9676
+ ref?: Input.Ref;
9677
+
9678
+ /**
9679
+ * Set of rules that describes when this input is required:
9680
+ *
9681
+ * - \`always\`: Input is always required
9682
+ * - \`ifNotDefined\`: Input is required when another specified input is not
9683
+ * defined
9684
+ * - \`ifDefined\`: Input is required when another specified input is defined
9685
+ * - \`conditional\`: Input is required when other inputs have specific values
9686
+ *
9687
+ * By default, the input is not required.
9688
+ */
9689
+ required?: Input.Required;
9690
+
9691
+ /**
9692
+ * The step increment for numeric inputs. Only available for \`number\` input type.
9693
+ */
9694
+ step?: number;
9695
+
9696
+ /**
9697
+ * The value of the input. This is the value of the input that will be used to run
9698
+ * the node. Only available for flows managed by a WorkflowJob.
9699
+ */
9700
+ value?: unknown;
9701
+ }
9702
+
9703
+ export namespace Input {
9704
+ /**
9705
+ * A sub-input within an inputs_array item. Same as NodeInput but without the
9706
+ * recursive items field.
9707
+ */
9708
+ export interface Item {
9709
+ /**
9710
+ * The name that must be user to call the model through the API
9711
+ */
9712
+ name: string;
9713
+
9714
+ /**
9715
+ * The data type of the input
9716
+ */
9717
+ type:
9718
+ | 'boolean'
9719
+ | 'file'
9720
+ | 'file_array'
9721
+ | 'inputs_array'
9722
+ | 'model'
9723
+ | 'model_array'
9724
+ | 'number'
9725
+ | 'number_array'
9726
+ | 'string'
9727
+ | 'string_array';
9728
+
9729
+ /**
9730
+ * The allowed values for the input. For \`string\` or \`number\` types, creates a
9731
+ * single-select dropdown. For \`string_array\` type, creates a multi-select
9732
+ * dropdown.
9733
+ */
9734
+ allowedValues?: Array<unknown>;
9735
+
9736
+ /**
9737
+ * Specifies the background behavior for the input. Only available for \`file\` and
9738
+ * \`file_array\` input types with kind \`image\`.
9739
+ */
9740
+ backgroundBehavior?: 'opaque' | 'transparent';
9741
+
9742
+ /**
9743
+ * Whether the input is a color or not. Only available for \`string\` input type.
9744
+ */
9745
+ color?: boolean;
9746
+
9747
+ /**
9748
+ * Whether this input affects the model's cost calculation
9749
+ */
9750
+ costImpact?: boolean;
9751
+
9752
+ /**
9753
+ * The default value for the input
9754
+ */
9755
+ default?: unknown;
9756
+
9757
+ /**
9758
+ * Help text displayed in the UI to provide additional information about the input
9759
+ */
9760
+ description?: string;
9761
+
9762
+ /**
9763
+ * Used to visually group inputs together in the UI. Inputs with the same group
9764
+ * value appear consecutively in the UI.
9765
+ */
9766
+ group?: string;
9767
+
9768
+ /**
9769
+ * Hint text displayed in the UI as a tooltip to guide the user
9770
+ */
9771
+ hint?: string;
9772
+
9773
+ /**
9774
+ * The list of inputs which form an object within a container array. All inputs are
9775
+ * the same as the current object. This is only available for type inputs_array
9776
+ * inputs.
9777
+ */
9778
+ inputs?: Array<{ [key: string]: unknown }>;
9779
+
9780
+ /**
9781
+ * The asset kind of the input. Only taken into account for \`file\` and
9782
+ * \`file_array\` input types. If model provides multiple kinds, the input will be
9783
+ * not able to create the asset on the flight on API side with dataurl without
9784
+ * data:kind, prefix \`file\` and \`file_array\` inputs always expose a kind: when
9785
+ * a model does not declare one, \`image\` is returned, which is the kind used at
9786
+ * generation time.
9787
+ */
9788
+ kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'text' | 'video';
9789
+
9790
+ /**
9791
+ * The label displayed in the UI for this input
9792
+ */
9793
+ label?: string;
9794
+
9795
+ /**
9796
+ * The name of the file input field to use as the mask source
9797
+ */
9798
+ maskFrom?: string;
9799
+
9800
+ /**
9801
+ * The maximum allowed value. Only available for \`number\` and \`array\` input
9802
+ * types.
9803
+ */
9804
+ max?: number;
9805
+
9806
+ /**
9807
+ * The maximum allowed media duration in seconds. Only applies to \`file\` and
9808
+ * \`file_array\` input types for video and audio assets. Validated against
9809
+ * \`asset.properties.duration\` at job creation time.
9810
+ */
9811
+ maxDuration?: number;
9812
+
9813
+ /**
9814
+ * The maximum allowed length for \`string\` and \`model\` inputs, in characters.
9815
+ * For the array types (\`string_array\`, \`model_array\`) it bounds the NUMBER OF
9816
+ * ITEMS instead — the length of each item is not constrained.
9817
+ */
9818
+ maxLength?: number;
9819
+
9820
+ /**
9821
+ * The maximum allowed file size in bytes. Only applies to \`file\` and
9822
+ * \`file_array\` input types. Validated against \`asset.properties.size\` at job
9823
+ * creation time.
9824
+ */
9825
+ maxSize?: number;
9826
+
9827
+ /**
9828
+ * The minimum allowed value. Only available for \`number\` and array input types.
9829
+ */
9830
+ min?: number;
9831
+
9832
+ /**
9833
+ * The minimum allowed length for \`string\` and \`model\` inputs, in characters.
9834
+ * For the array types (\`string_array\`, \`model_array\`) it bounds the NUMBER OF
9835
+ * ITEMS instead — the length of each item is not constrained.
9836
+ */
9837
+ minLength?: number;
9838
+
9839
+ /**
9840
+ * The allowed model types for this input. Example: \`["flux.1-lora"]\`. Only
9841
+ * available for \`model_array\` input type.
9842
+ */
9843
+ modelTypes?: Array<
9844
+ | 'custom'
9845
+ | 'elevenlabs-voice'
9846
+ | 'flux.1'
9847
+ | 'flux.1-composition'
9848
+ | 'flux.1-kontext-dev'
9849
+ | 'flux.1-kontext-lora'
9850
+ | 'flux.1-krea-dev'
9851
+ | 'flux.1-krea-lora'
9852
+ | 'flux.1-lora'
9853
+ | 'flux.1-pro'
9854
+ | 'flux.1.1-pro-ultra'
9855
+ | 'flux.2-dev-edit-lora'
9856
+ | 'flux.2-dev-lora'
9857
+ | 'flux.2-klein-4b-edit-lora'
9858
+ | 'flux.2-klein-4b-lora'
9859
+ | 'flux.2-klein-9b-edit-lora'
9860
+ | 'flux.2-klein-9b-lora'
9861
+ | 'flux.2-klein-base-4b-edit-lora'
9862
+ | 'flux.2-klein-base-4b-lora'
9863
+ | 'flux.2-klein-base-9b-edit-lora'
9864
+ | 'flux.2-klein-base-9b-lora'
9865
+ | 'flux1.1-pro'
9866
+ | 'gpt-image-1'
9867
+ | 'qwen-image-2512-lora'
9868
+ | 'qwen-image-edit-2509-lora'
9869
+ | 'qwen-image-edit-2511-lora'
9870
+ | 'qwen-image-edit-lora'
9871
+ | 'qwen-image-lora'
9872
+ | 'zimage-de-turbo-lora'
9873
+ | 'zimage-lora'
9874
+ | 'zimage-turbo-lora'
9875
+ >;
9876
+
9877
+ /**
9878
+ * Whether this input represents a parent asset to assign to the produced assets.
9879
+ * Only available for \`file\` and \`file_array\` input types.
9880
+ *
9881
+ * For \`file_array\`, the parent asset is the first item in the array.
9882
+ */
9883
+ parent?: boolean;
9884
+
9885
+ /**
9886
+ * Placeholder text for the input. Only available for 'string' input type.
9887
+ */
9888
+ placeholder?: string;
9889
+
9890
+ /**
9891
+ * Whether the input is a prompt. When true, displays as a text area with prompt
9892
+ * spark feature. Only available for \`string\` input type.
9893
+ */
9894
+ prompt?: boolean;
9895
+
9896
+ /**
9897
+ * Whether the input is used with prompt spark. Only available for \`string\` input
9898
+ * type.
9899
+ */
9900
+ promptSpark?: boolean;
9901
+
9902
+ /**
9903
+ * The reference to another input or output of the same workflow. Must have at
9904
+ * least one of node or conditional.
9905
+ */
9906
+ ref?: Item.Ref;
9907
+
9908
+ /**
9909
+ * Set of rules that describes when this input is required:
9910
+ *
9911
+ * - \`always\`: Input is always required
9912
+ * - \`ifNotDefined\`: Input is required when another specified input is not
9913
+ * defined
9914
+ * - \`ifDefined\`: Input is required when another specified input is defined
9915
+ * - \`conditional\`: Input is required when other inputs have specific values
9916
+ *
9917
+ * By default, the input is not required.
9918
+ */
9919
+ required?: Item.Required;
9920
+
9921
+ /**
9922
+ * The step increment for numeric inputs. Only available for \`number\` input type.
9923
+ */
9924
+ step?: number;
9925
+
9926
+ /**
9927
+ * The value of the input. This is the value of the input that will be used to run
9928
+ * the node. Only available for flows managed by a WorkflowJob.
9929
+ */
9930
+ value?: unknown;
9931
+ }
9932
+
9933
+ export namespace Item {
9934
+ /**
9935
+ * The reference to another input or output of the same workflow. Must have at
9936
+ * least one of node or conditional.
9937
+ */
9938
+ export interface Ref {
9939
+ /**
9940
+ * The conditional nodes to reference. If the conditional nodes are successful, the
9941
+ * node will be successful. If the conditional nodes are skipped, the node will be
9942
+ * skipped. Contains an array of node ids used to check the status of the nodes.
9943
+ */
9944
+ conditional?: Array<string>;
9945
+
9946
+ /**
9947
+ * This is the desired node output value if ref is an if/else node.
9948
+ */
9949
+ equal?: string;
9950
+
9951
+ /**
9952
+ * The name of the input or output to reference. If the type is 'workflow', the
9953
+ * name is the name of the input of the workflow is required If the type is 'node',
9954
+ * the name is not mandatory, except if you want all outputs of the node. To get
9955
+ * all outputs of a node, you can use the name 'all'.
9956
+ */
9957
+ name?: string;
9958
+
9959
+ /**
9960
+ * The node id or 'workflow' if the source is a workflow input.
9961
+ */
9962
+ node?: string;
9963
+ }
9964
+
9965
+ /**
9966
+ * Set of rules that describes when this input is required:
9967
+ *
9968
+ * - \`always\`: Input is always required
9969
+ * - \`ifNotDefined\`: Input is required when another specified input is not
9970
+ * defined
9971
+ * - \`ifDefined\`: Input is required when another specified input is defined
9972
+ * - \`conditional\`: Input is required when other inputs have specific values
9973
+ *
9974
+ * By default, the input is not required.
9975
+ */
9976
+ export interface Required {
9977
+ /**
9978
+ * Whether the input is always required
9979
+ */
9980
+ always?: boolean;
9981
+
9982
+ /**
9983
+ * Makes this input required when other inputs have one of the listed values
9984
+ */
9985
+ conditional?: Required.Conditional;
9986
+
9987
+ /**
9988
+ * Makes this input required when another input is defined:
9989
+ *
9990
+ * - Key: name of the input that must be defined
9991
+ * - Value: message to display when this input is required
9992
+ */
9993
+ ifDefined?: unknown;
9994
+
9995
+ /**
9996
+ * Makes this input required when another input is not defined:
9997
+ *
9998
+ * - Key: name of the input that must be undefined
9999
+ * - Value: message to display when this input is required
10000
+ */
10001
+ ifNotDefined?: unknown;
10002
+ }
10003
+
10004
+ export namespace Required {
10005
+ /**
10006
+ * Makes this input required when other inputs have one of the listed values
10007
+ */
10008
+ export interface Conditional {
10009
+ /**
10010
+ * The conditions to check:
10011
+ *
10012
+ * - Key: name of the input to check
10013
+ * - Value: values of that input that satisfy the condition
10014
+ */
10015
+ values: unknown;
10016
+
10017
+ /**
10018
+ * How the conditions combine: \`and\` (all must match) or \`or\` (any must match)
10019
+ */
10020
+ operator?: 'and' | 'or';
10021
+ }
10022
+ }
10023
+ }
10024
+
10025
+ /**
10026
+ * The reference to another input or output of the same workflow. Must have at
8658
10027
  * least one of node or conditional.
8659
10028
  */
8660
10029
  export interface Ref {
@@ -8691,8 +10060,7 @@ export namespace WorkflowUserApprovalResponse {
8691
10060
  * - \`ifNotDefined\`: Input is required when another specified input is not
8692
10061
  * defined
8693
10062
  * - \`ifDefined\`: Input is required when another specified input is defined
8694
- * - \`conditionalValues\`: Input is required when another input has a specific
8695
- * value
10063
+ * - \`conditional\`: Input is required when other inputs have specific values
8696
10064
  *
8697
10065
  * By default, the input is not required.
8698
10066
  */
@@ -8703,12 +10071,9 @@ export namespace WorkflowUserApprovalResponse {
8703
10071
  always?: boolean;
8704
10072
 
8705
10073
  /**
8706
- * Makes this input required when another input has a specific value:
8707
- *
8708
- * - Key: name of the input to check
8709
- * - Value: operation and allowed values that trigger the requirement
10074
+ * Makes this input required when other inputs have one of the listed values
8710
10075
  */
8711
- conditionalValues?: unknown;
10076
+ conditional?: Required.Conditional;
8712
10077
 
8713
10078
  /**
8714
10079
  * Makes this input required when another input is defined:
@@ -8726,6 +10091,26 @@ export namespace WorkflowUserApprovalResponse {
8726
10091
  */
8727
10092
  ifNotDefined?: unknown;
8728
10093
  }
10094
+
10095
+ export namespace Required {
10096
+ /**
10097
+ * Makes this input required when other inputs have one of the listed values
10098
+ */
10099
+ export interface Conditional {
10100
+ /**
10101
+ * The conditions to check:
10102
+ *
10103
+ * - Key: name of the input to check
10104
+ * - Value: values of that input that satisfy the condition
10105
+ */
10106
+ values: unknown;
10107
+
10108
+ /**
10109
+ * How the conditions combine: \`and\` (all must match) or \`or\` (any must match)
10110
+ */
10111
+ operator?: 'and' | 'or';
10112
+ }
10113
+ }
8729
10114
  }
8730
10115
 
8731
10116
  /**
@@ -8975,6 +10360,7 @@ export namespace WorkflowUpdateParams {
8975
10360
  | 'remove-background'
8976
10361
  | 'transform'
8977
10362
  | 'user-approval'
10363
+ | 'user-selection'
8978
10364
  | 'workflow';
8979
10365
 
8980
10366
  /**
@@ -9000,14 +10386,15 @@ export namespace WorkflowUpdateParams {
9000
10386
  includeOutputsInWorkflowJob?: true;
9001
10387
 
9002
10388
  /**
9003
- * The inputs of the node.
10389
+ * The inputs of the node. For a user-selection node, the array input's `min`/`max`
10390
+ * bound how many items the user may pick (defaults: 1 and 100); conditional
10391
+ * connections may be present as additional inputs.
9004
10392
  */
9005
10393
  inputs?: Array<Flow.Input>;
9006
10394
 
9007
10395
  /**
9008
- * Statically-configured items for a List node. The node outputs this array as-is
9009
- * when executed. Only available for List nodes. The values can be strings,
9010
- * numbers, or asset IDs.
10396
+ * Statically-configured items for a List node, or the frozen candidate list of a
10397
+ * UserSelection node. The values can be strings, numbers, or asset IDs.
9011
10398
  */
9012
10399
  items?: Array<string>;
9013
10400
 
@@ -9269,8 +10656,7 @@ export namespace WorkflowUpdateParams {
9269
10656
  * - \`ifNotDefined\`: Input is required when another specified input is not
9270
10657
  * defined
9271
10658
  * - \`ifDefined\`: Input is required when another specified input is defined
9272
- * - \`conditionalValues\`: Input is required when another input has a specific
9273
- * value
10659
+ * - \`conditional\`: Input is required when other inputs have specific values
9274
10660
  *
9275
10661
  * By default, the input is not required.
9276
10662
  */
@@ -9500,8 +10886,7 @@ export namespace WorkflowUpdateParams {
9500
10886
  * - \`ifNotDefined\`: Input is required when another specified input is not
9501
10887
  * defined
9502
10888
  * - \`ifDefined\`: Input is required when another specified input is defined
9503
- * - \`conditionalValues\`: Input is required when another input has a specific
9504
- * value
10889
+ * - \`conditional\`: Input is required when other inputs have specific values
9505
10890
  *
9506
10891
  * By default, the input is not required.
9507
10892
  */
@@ -9558,8 +10943,7 @@ export namespace WorkflowUpdateParams {
9558
10943
  * - \`ifNotDefined\`: Input is required when another specified input is not
9559
10944
  * defined
9560
10945
  * - \`ifDefined\`: Input is required when another specified input is defined
9561
- * - \`conditionalValues\`: Input is required when another input has a specific
9562
- * value
10946
+ * - \`conditional\`: Input is required when other inputs have specific values
9563
10947
  *
9564
10948
  * By default, the input is not required.
9565
10949
  */
@@ -9570,12 +10954,9 @@ export namespace WorkflowUpdateParams {
9570
10954
  always?: boolean;
9571
10955
 
9572
10956
  /**
9573
- * Makes this input required when another input has a specific value:
9574
- *
9575
- * - Key: name of the input to check
9576
- * - Value: operation and allowed values that trigger the requirement
10957
+ * Makes this input required when other inputs have one of the listed values
9577
10958
  */
9578
- conditionalValues?: unknown;
10959
+ conditional?: Required.Conditional;
9579
10960
 
9580
10961
  /**
9581
10962
  * Makes this input required when another input is defined:
@@ -9593,6 +10974,26 @@ export namespace WorkflowUpdateParams {
9593
10974
  */
9594
10975
  ifNotDefined?: unknown;
9595
10976
  }
10977
+
10978
+ export namespace Required {
10979
+ /**
10980
+ * Makes this input required when other inputs have one of the listed values
10981
+ */
10982
+ export interface Conditional {
10983
+ /**
10984
+ * The conditions to check:
10985
+ *
10986
+ * - Key: name of the input to check
10987
+ * - Value: values of that input that satisfy the condition
10988
+ */
10989
+ values: unknown;
10990
+
10991
+ /**
10992
+ * How the conditions combine: \`and\` (all must match) or \`or\` (any must match)
10993
+ */
10994
+ operator?: 'and' | 'or';
10995
+ }
10996
+ }
9596
10997
  }
9597
10998
 
9598
10999
  /**
@@ -9633,8 +11034,7 @@ export namespace WorkflowUpdateParams {
9633
11034
  * - \`ifNotDefined\`: Input is required when another specified input is not
9634
11035
  * defined
9635
11036
  * - \`ifDefined\`: Input is required when another specified input is defined
9636
- * - \`conditionalValues\`: Input is required when another input has a specific
9637
- * value
11037
+ * - \`conditional\`: Input is required when other inputs have specific values
9638
11038
  *
9639
11039
  * By default, the input is not required.
9640
11040
  */
@@ -9645,12 +11045,9 @@ export namespace WorkflowUpdateParams {
9645
11045
  always?: boolean;
9646
11046
 
9647
11047
  /**
9648
- * Makes this input required when another input has a specific value:
9649
- *
9650
- * - Key: name of the input to check
9651
- * - Value: operation and allowed values that trigger the requirement
11048
+ * Makes this input required when other inputs have one of the listed values
9652
11049
  */
9653
- conditionalValues?: unknown;
11050
+ conditional?: Required.Conditional;
9654
11051
 
9655
11052
  /**
9656
11053
  * Makes this input required when another input is defined:
@@ -9668,6 +11065,26 @@ export namespace WorkflowUpdateParams {
9668
11065
  */
9669
11066
  ifNotDefined?: unknown;
9670
11067
  }
11068
+
11069
+ export namespace Required {
11070
+ /**
11071
+ * Makes this input required when other inputs have one of the listed values
11072
+ */
11073
+ export interface Conditional {
11074
+ /**
11075
+ * The conditions to check:
11076
+ *
11077
+ * - Key: name of the input to check
11078
+ * - Value: values of that input that satisfy the condition
11079
+ */
11080
+ values: unknown;
11081
+
11082
+ /**
11083
+ * How the conditions combine: \`and\` (all must match) or \`or\` (any must match)
11084
+ */
11085
+ operator?: 'and' | 'or';
11086
+ }
11087
+ }
9671
11088
  }
9672
11089
 
9673
11090
  /**
@@ -9907,8 +11324,7 @@ export namespace WorkflowUpdateParams {
9907
11324
  * - \`ifNotDefined\`: Input is required when another specified input is not
9908
11325
  * defined
9909
11326
  * - \`ifDefined\`: Input is required when another specified input is defined
9910
- * - \`conditionalValues\`: Input is required when another input has a specific
9911
- * value
11327
+ * - \`conditional\`: Input is required when other inputs have specific values
9912
11328
  *
9913
11329
  * By default, the input is not required.
9914
11330
  */
@@ -9928,8 +11344,7 @@ export namespace WorkflowUpdateParams {
9928
11344
  * - \`ifNotDefined\`: Input is required when another specified input is not
9929
11345
  * defined
9930
11346
  * - \`ifDefined\`: Input is required when another specified input is defined
9931
- * - \`conditionalValues\`: Input is required when another input has a specific
9932
- * value
11347
+ * - \`conditional\`: Input is required when other inputs have specific values
9933
11348
  *
9934
11349
  * By default, the input is not required.
9935
11350
  */
@@ -9940,12 +11355,9 @@ export namespace WorkflowUpdateParams {
9940
11355
  always?: boolean;
9941
11356
 
9942
11357
  /**
9943
- * Makes this input required when another input has a specific value:
9944
- *
9945
- * - Key: name of the input to check
9946
- * - Value: operation and allowed values that trigger the requirement
11358
+ * Makes this input required when other inputs have one of the listed values
9947
11359
  */
9948
- conditionalValues?: unknown;
11360
+ conditional?: Required.Conditional;
9949
11361
 
9950
11362
  /**
9951
11363
  * Makes this input required when another input is defined:
@@ -9963,6 +11375,26 @@ export namespace WorkflowUpdateParams {
9963
11375
  */
9964
11376
  ifNotDefined?: unknown;
9965
11377
  }
11378
+
11379
+ export namespace Required {
11380
+ /**
11381
+ * Makes this input required when other inputs have one of the listed values
11382
+ */
11383
+ export interface Conditional {
11384
+ /**
11385
+ * The conditions to check:
11386
+ *
11387
+ * - Key: name of the input to check
11388
+ * - Value: values of that input that satisfy the condition
11389
+ */
11390
+ values: unknown;
11391
+
11392
+ /**
11393
+ * How the conditions combine: \`and\` (all must match) or \`or\` (any must match)
11394
+ */
11395
+ operator?: 'and' | 'or';
11396
+ }
11397
+ }
9966
11398
  }
9967
11399
  }
9968
11400
 
@@ -10082,6 +11514,38 @@ export interface WorkflowUserApprovalParams {
10082
11514
  action?: 'approve' | 'reject';
10083
11515
  }
10084
11516
 
11517
+ export interface WorkflowUserSelectionParams {
11518
+ /**
11519
+ * Query param: The projectId used for ownership resource management. Either to
11520
+ * assert ownership or to set the owner of the resource(s)
11521
+ */
11522
+ projectId: string;
11523
+
11524
+ /**
11525
+ * Body param: Decision taken on the selection node. "select" persists the picked
11526
+ * items and advances the workflow; "reject" marks it Rejected and cancels the
11527
+ * workflow.
11528
+ */
11529
+ action: 'select' | 'reject';
11530
+
11531
+ /**
11532
+ * Body param: The ID of the user selection node to act on in the workflow
11533
+ */
11534
+ nodeId: string;
11535
+
11536
+ /**
11537
+ * Body param: The ID of the workflow job that contains the user selection node
11538
+ */
11539
+ workflowJobId: string;
11540
+
11541
+ /**
11542
+ * Body param: Zero-based indices into the node's `items` (the candidate list
11543
+ * frozen when the node started processing). Required when action is "select".
11544
+ * Order is preserved in the node output.
11545
+ */
11546
+ selectedIndices?: Array<number>;
11547
+ }
11548
+
10085
11549
  export interface WorkflowApproveUserParams {
10086
11550
  /**
10087
11551
  * Query param: The projectId used for ownership resource management. Either to
@@ -10118,6 +11582,7 @@ export declare namespace Workflows {
10118
11582
  type WorkflowGetTagsResponse as WorkflowGetTagsResponse,
10119
11583
  type WorkflowRunResponse as WorkflowRunResponse,
10120
11584
  type WorkflowUserApprovalResponse as WorkflowUserApprovalResponse,
11585
+ type WorkflowUserSelectionResponse as WorkflowUserSelectionResponse,
10121
11586
  type WorkflowListResponsesWorkflowsCursor as WorkflowListResponsesWorkflowsCursor,
10122
11587
  type WorkflowCreateParams as WorkflowCreateParams,
10123
11588
  type WorkflowRetrieveParams as WorkflowRetrieveParams,
@@ -10127,6 +11592,7 @@ export declare namespace Workflows {
10127
11592
  type WorkflowGetTagsParams as WorkflowGetTagsParams,
10128
11593
  type WorkflowRunParams as WorkflowRunParams,
10129
11594
  type WorkflowUserApprovalParams as WorkflowUserApprovalParams,
11595
+ type WorkflowUserSelectionParams as WorkflowUserSelectionParams,
10130
11596
  type WorkflowApproveUserParams as WorkflowApproveUserParams,
10131
11597
  };
10132
11598
  }