@scenario-labs/sdk 0.1.2

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 (588) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/LICENSE +201 -0
  3. package/README.md +358 -0
  4. package/api-promise.d.mts +2 -0
  5. package/api-promise.d.mts.map +1 -0
  6. package/api-promise.d.ts +2 -0
  7. package/api-promise.d.ts.map +1 -0
  8. package/api-promise.js +6 -0
  9. package/api-promise.js.map +1 -0
  10. package/api-promise.mjs +2 -0
  11. package/api-promise.mjs.map +1 -0
  12. package/client.d.mts +208 -0
  13. package/client.d.mts.map +1 -0
  14. package/client.d.ts +208 -0
  15. package/client.d.ts.map +1 -0
  16. package/client.js +492 -0
  17. package/client.js.map +1 -0
  18. package/client.mjs +488 -0
  19. package/client.mjs.map +1 -0
  20. package/core/api-promise.d.mts +46 -0
  21. package/core/api-promise.d.mts.map +1 -0
  22. package/core/api-promise.d.ts +46 -0
  23. package/core/api-promise.d.ts.map +1 -0
  24. package/core/api-promise.js +74 -0
  25. package/core/api-promise.js.map +1 -0
  26. package/core/api-promise.mjs +70 -0
  27. package/core/api-promise.mjs.map +1 -0
  28. package/core/error.d.mts +46 -0
  29. package/core/error.d.mts.map +1 -0
  30. package/core/error.d.ts +46 -0
  31. package/core/error.d.ts.map +1 -0
  32. package/core/error.js +113 -0
  33. package/core/error.js.map +1 -0
  34. package/core/error.mjs +97 -0
  35. package/core/error.mjs.map +1 -0
  36. package/core/resource.d.mts +6 -0
  37. package/core/resource.d.mts.map +1 -0
  38. package/core/resource.d.ts +6 -0
  39. package/core/resource.d.ts.map +1 -0
  40. package/core/resource.js +11 -0
  41. package/core/resource.js.map +1 -0
  42. package/core/resource.mjs +7 -0
  43. package/core/resource.mjs.map +1 -0
  44. package/core/uploads.d.mts +3 -0
  45. package/core/uploads.d.mts.map +1 -0
  46. package/core/uploads.d.ts +3 -0
  47. package/core/uploads.d.ts.map +1 -0
  48. package/core/uploads.js +6 -0
  49. package/core/uploads.js.map +1 -0
  50. package/core/uploads.mjs +2 -0
  51. package/core/uploads.mjs.map +1 -0
  52. package/error.d.mts +2 -0
  53. package/error.d.mts.map +1 -0
  54. package/error.d.ts +2 -0
  55. package/error.d.ts.map +1 -0
  56. package/error.js +6 -0
  57. package/error.js.map +1 -0
  58. package/error.mjs +2 -0
  59. package/error.mjs.map +1 -0
  60. package/index.d.mts +6 -0
  61. package/index.d.mts.map +1 -0
  62. package/index.d.ts +6 -0
  63. package/index.d.ts.map +1 -0
  64. package/index.js +30 -0
  65. package/index.js.map +1 -0
  66. package/index.mjs +7 -0
  67. package/index.mjs.map +1 -0
  68. package/internal/builtin-types.d.mts +73 -0
  69. package/internal/builtin-types.d.mts.map +1 -0
  70. package/internal/builtin-types.d.ts +73 -0
  71. package/internal/builtin-types.d.ts.map +1 -0
  72. package/internal/builtin-types.js +4 -0
  73. package/internal/builtin-types.js.map +1 -0
  74. package/internal/builtin-types.mjs +3 -0
  75. package/internal/builtin-types.mjs.map +1 -0
  76. package/internal/detect-platform.d.mts +15 -0
  77. package/internal/detect-platform.d.mts.map +1 -0
  78. package/internal/detect-platform.d.ts +15 -0
  79. package/internal/detect-platform.d.ts.map +1 -0
  80. package/internal/detect-platform.js +162 -0
  81. package/internal/detect-platform.js.map +1 -0
  82. package/internal/detect-platform.mjs +157 -0
  83. package/internal/detect-platform.mjs.map +1 -0
  84. package/internal/errors.d.mts +3 -0
  85. package/internal/errors.d.mts.map +1 -0
  86. package/internal/errors.d.ts +3 -0
  87. package/internal/errors.d.ts.map +1 -0
  88. package/internal/errors.js +41 -0
  89. package/internal/errors.js.map +1 -0
  90. package/internal/errors.mjs +36 -0
  91. package/internal/errors.mjs.map +1 -0
  92. package/internal/headers.d.mts +20 -0
  93. package/internal/headers.d.mts.map +1 -0
  94. package/internal/headers.d.ts +20 -0
  95. package/internal/headers.d.ts.map +1 -0
  96. package/internal/headers.js +79 -0
  97. package/internal/headers.js.map +1 -0
  98. package/internal/headers.mjs +74 -0
  99. package/internal/headers.mjs.map +1 -0
  100. package/internal/parse.d.mts +12 -0
  101. package/internal/parse.d.mts.map +1 -0
  102. package/internal/parse.d.ts +12 -0
  103. package/internal/parse.d.ts.map +1 -0
  104. package/internal/parse.js +40 -0
  105. package/internal/parse.js.map +1 -0
  106. package/internal/parse.mjs +37 -0
  107. package/internal/parse.mjs.map +1 -0
  108. package/internal/qs/formats.d.mts +7 -0
  109. package/internal/qs/formats.d.mts.map +1 -0
  110. package/internal/qs/formats.d.ts +7 -0
  111. package/internal/qs/formats.d.ts.map +1 -0
  112. package/internal/qs/formats.js +13 -0
  113. package/internal/qs/formats.js.map +1 -0
  114. package/internal/qs/formats.mjs +9 -0
  115. package/internal/qs/formats.mjs.map +1 -0
  116. package/internal/qs/index.d.mts +10 -0
  117. package/internal/qs/index.d.mts.map +1 -0
  118. package/internal/qs/index.d.ts +10 -0
  119. package/internal/qs/index.d.ts.map +1 -0
  120. package/internal/qs/index.js +14 -0
  121. package/internal/qs/index.js.map +1 -0
  122. package/internal/qs/index.mjs +10 -0
  123. package/internal/qs/index.mjs.map +1 -0
  124. package/internal/qs/stringify.d.mts +3 -0
  125. package/internal/qs/stringify.d.mts.map +1 -0
  126. package/internal/qs/stringify.d.ts +3 -0
  127. package/internal/qs/stringify.d.ts.map +1 -0
  128. package/internal/qs/stringify.js +277 -0
  129. package/internal/qs/stringify.js.map +1 -0
  130. package/internal/qs/stringify.mjs +274 -0
  131. package/internal/qs/stringify.mjs.map +1 -0
  132. package/internal/qs/types.d.mts +57 -0
  133. package/internal/qs/types.d.mts.map +1 -0
  134. package/internal/qs/types.d.ts +57 -0
  135. package/internal/qs/types.d.ts.map +1 -0
  136. package/internal/qs/types.js +3 -0
  137. package/internal/qs/types.js.map +1 -0
  138. package/internal/qs/types.mjs +2 -0
  139. package/internal/qs/types.mjs.map +1 -0
  140. package/internal/qs/utils.d.mts +15 -0
  141. package/internal/qs/utils.d.mts.map +1 -0
  142. package/internal/qs/utils.d.ts +15 -0
  143. package/internal/qs/utils.d.ts.map +1 -0
  144. package/internal/qs/utils.js +230 -0
  145. package/internal/qs/utils.js.map +1 -0
  146. package/internal/qs/utils.mjs +217 -0
  147. package/internal/qs/utils.mjs.map +1 -0
  148. package/internal/request-options.d.mts +75 -0
  149. package/internal/request-options.d.mts.map +1 -0
  150. package/internal/request-options.d.ts +75 -0
  151. package/internal/request-options.d.ts.map +1 -0
  152. package/internal/request-options.js +14 -0
  153. package/internal/request-options.js.map +1 -0
  154. package/internal/request-options.mjs +10 -0
  155. package/internal/request-options.mjs.map +1 -0
  156. package/internal/shim-types.d.mts +17 -0
  157. package/internal/shim-types.d.mts.map +1 -0
  158. package/internal/shim-types.d.ts +17 -0
  159. package/internal/shim-types.d.ts.map +1 -0
  160. package/internal/shim-types.js +4 -0
  161. package/internal/shim-types.js.map +1 -0
  162. package/internal/shim-types.mjs +3 -0
  163. package/internal/shim-types.mjs.map +1 -0
  164. package/internal/shims.d.mts +20 -0
  165. package/internal/shims.d.mts.map +1 -0
  166. package/internal/shims.d.ts +20 -0
  167. package/internal/shims.d.ts.map +1 -0
  168. package/internal/shims.js +92 -0
  169. package/internal/shims.js.map +1 -0
  170. package/internal/shims.mjs +85 -0
  171. package/internal/shims.mjs.map +1 -0
  172. package/internal/to-file.d.mts +45 -0
  173. package/internal/to-file.d.mts.map +1 -0
  174. package/internal/to-file.d.ts +45 -0
  175. package/internal/to-file.d.ts.map +1 -0
  176. package/internal/to-file.js +91 -0
  177. package/internal/to-file.js.map +1 -0
  178. package/internal/to-file.mjs +88 -0
  179. package/internal/to-file.mjs.map +1 -0
  180. package/internal/tslib.js +81 -0
  181. package/internal/tslib.mjs +17 -0
  182. package/internal/types.d.mts +69 -0
  183. package/internal/types.d.mts.map +1 -0
  184. package/internal/types.d.ts +69 -0
  185. package/internal/types.d.ts.map +1 -0
  186. package/internal/types.js +4 -0
  187. package/internal/types.js.map +1 -0
  188. package/internal/types.mjs +3 -0
  189. package/internal/types.mjs.map +1 -0
  190. package/internal/uploads.d.mts +42 -0
  191. package/internal/uploads.d.mts.map +1 -0
  192. package/internal/uploads.d.ts +42 -0
  193. package/internal/uploads.d.ts.map +1 -0
  194. package/internal/uploads.js +141 -0
  195. package/internal/uploads.js.map +1 -0
  196. package/internal/uploads.mjs +131 -0
  197. package/internal/uploads.mjs.map +1 -0
  198. package/internal/utils/base64.d.mts +3 -0
  199. package/internal/utils/base64.d.mts.map +1 -0
  200. package/internal/utils/base64.d.ts +3 -0
  201. package/internal/utils/base64.d.ts.map +1 -0
  202. package/internal/utils/base64.js +38 -0
  203. package/internal/utils/base64.js.map +1 -0
  204. package/internal/utils/base64.mjs +33 -0
  205. package/internal/utils/base64.mjs.map +1 -0
  206. package/internal/utils/bytes.d.mts +4 -0
  207. package/internal/utils/bytes.d.mts.map +1 -0
  208. package/internal/utils/bytes.d.ts +4 -0
  209. package/internal/utils/bytes.d.ts.map +1 -0
  210. package/internal/utils/bytes.js +31 -0
  211. package/internal/utils/bytes.js.map +1 -0
  212. package/internal/utils/bytes.mjs +26 -0
  213. package/internal/utils/bytes.mjs.map +1 -0
  214. package/internal/utils/env.d.mts +9 -0
  215. package/internal/utils/env.d.mts.map +1 -0
  216. package/internal/utils/env.d.ts +9 -0
  217. package/internal/utils/env.d.ts.map +1 -0
  218. package/internal/utils/env.js +22 -0
  219. package/internal/utils/env.js.map +1 -0
  220. package/internal/utils/env.mjs +18 -0
  221. package/internal/utils/env.mjs.map +1 -0
  222. package/internal/utils/log.d.mts +37 -0
  223. package/internal/utils/log.d.mts.map +1 -0
  224. package/internal/utils/log.d.ts +37 -0
  225. package/internal/utils/log.d.ts.map +1 -0
  226. package/internal/utils/log.js +85 -0
  227. package/internal/utils/log.js.map +1 -0
  228. package/internal/utils/log.mjs +79 -0
  229. package/internal/utils/log.mjs.map +1 -0
  230. package/internal/utils/path.d.mts +15 -0
  231. package/internal/utils/path.d.mts.map +1 -0
  232. package/internal/utils/path.d.ts +15 -0
  233. package/internal/utils/path.d.ts.map +1 -0
  234. package/internal/utils/path.js +79 -0
  235. package/internal/utils/path.js.map +1 -0
  236. package/internal/utils/path.mjs +74 -0
  237. package/internal/utils/path.mjs.map +1 -0
  238. package/internal/utils/query.d.mts +2 -0
  239. package/internal/utils/query.d.mts.map +1 -0
  240. package/internal/utils/query.d.ts +2 -0
  241. package/internal/utils/query.d.ts.map +1 -0
  242. package/internal/utils/query.js +10 -0
  243. package/internal/utils/query.js.map +1 -0
  244. package/internal/utils/query.mjs +6 -0
  245. package/internal/utils/query.mjs.map +1 -0
  246. package/internal/utils/sleep.d.mts +2 -0
  247. package/internal/utils/sleep.d.mts.map +1 -0
  248. package/internal/utils/sleep.d.ts +2 -0
  249. package/internal/utils/sleep.d.ts.map +1 -0
  250. package/internal/utils/sleep.js +7 -0
  251. package/internal/utils/sleep.js.map +1 -0
  252. package/internal/utils/sleep.mjs +3 -0
  253. package/internal/utils/sleep.mjs.map +1 -0
  254. package/internal/utils/uuid.d.mts +5 -0
  255. package/internal/utils/uuid.d.mts.map +1 -0
  256. package/internal/utils/uuid.d.ts +5 -0
  257. package/internal/utils/uuid.d.ts.map +1 -0
  258. package/internal/utils/uuid.js +19 -0
  259. package/internal/utils/uuid.js.map +1 -0
  260. package/internal/utils/uuid.mjs +15 -0
  261. package/internal/utils/uuid.mjs.map +1 -0
  262. package/internal/utils/values.d.mts +18 -0
  263. package/internal/utils/values.d.mts.map +1 -0
  264. package/internal/utils/values.d.ts +18 -0
  265. package/internal/utils/values.d.ts.map +1 -0
  266. package/internal/utils/values.js +112 -0
  267. package/internal/utils/values.js.map +1 -0
  268. package/internal/utils/values.mjs +94 -0
  269. package/internal/utils/values.mjs.map +1 -0
  270. package/internal/utils.d.mts +8 -0
  271. package/internal/utils.d.mts.map +1 -0
  272. package/internal/utils.d.ts +8 -0
  273. package/internal/utils.d.ts.map +1 -0
  274. package/internal/utils.js +12 -0
  275. package/internal/utils.js.map +1 -0
  276. package/internal/utils.mjs +9 -0
  277. package/internal/utils.mjs.map +1 -0
  278. package/package.json +143 -0
  279. package/resource.d.mts +2 -0
  280. package/resource.d.mts.map +1 -0
  281. package/resource.d.ts +2 -0
  282. package/resource.d.ts.map +1 -0
  283. package/resource.js +6 -0
  284. package/resource.js.map +1 -0
  285. package/resource.mjs +2 -0
  286. package/resource.mjs.map +1 -0
  287. package/resources/assets/assets.d.mts +6397 -0
  288. package/resources/assets/assets.d.mts.map +1 -0
  289. package/resources/assets/assets.d.ts +6397 -0
  290. package/resources/assets/assets.d.ts.map +1 -0
  291. package/resources/assets/assets.js +98 -0
  292. package/resources/assets/assets.js.map +1 -0
  293. package/resources/assets/assets.mjs +93 -0
  294. package/resources/assets/assets.mjs.map +1 -0
  295. package/resources/assets/download.d.mts +87 -0
  296. package/resources/assets/download.d.mts.map +1 -0
  297. package/resources/assets/download.d.ts +87 -0
  298. package/resources/assets/download.d.ts.map +1 -0
  299. package/resources/assets/download.js +28 -0
  300. package/resources/assets/download.js.map +1 -0
  301. package/resources/assets/download.mjs +24 -0
  302. package/resources/assets/download.mjs.map +1 -0
  303. package/resources/assets/index.d.mts +4 -0
  304. package/resources/assets/index.d.mts.map +1 -0
  305. package/resources/assets/index.d.ts +4 -0
  306. package/resources/assets/index.d.ts.map +1 -0
  307. package/resources/assets/index.js +11 -0
  308. package/resources/assets/index.js.map +1 -0
  309. package/resources/assets/index.mjs +5 -0
  310. package/resources/assets/index.mjs.map +1 -0
  311. package/resources/assets/public.d.mts +1535 -0
  312. package/resources/assets/public.d.mts.map +1 -0
  313. package/resources/assets/public.d.ts +1535 -0
  314. package/resources/assets/public.d.ts.map +1 -0
  315. package/resources/assets/public.js +28 -0
  316. package/resources/assets/public.js.map +1 -0
  317. package/resources/assets/public.mjs +24 -0
  318. package/resources/assets/public.mjs.map +1 -0
  319. package/resources/assets.d.mts +2 -0
  320. package/resources/assets.d.mts.map +1 -0
  321. package/resources/assets.d.ts +2 -0
  322. package/resources/assets.d.ts.map +1 -0
  323. package/resources/assets.js +6 -0
  324. package/resources/assets.js.map +1 -0
  325. package/resources/assets.mjs +3 -0
  326. package/resources/assets.mjs.map +1 -0
  327. package/resources/collections/assets.d.mts +119 -0
  328. package/resources/collections/assets.d.mts.map +1 -0
  329. package/resources/collections/assets.d.ts +119 -0
  330. package/resources/collections/assets.d.ts.map +1 -0
  331. package/resources/collections/assets.js +22 -0
  332. package/resources/collections/assets.js.map +1 -0
  333. package/resources/collections/assets.mjs +18 -0
  334. package/resources/collections/assets.mjs.map +1 -0
  335. package/resources/collections/collections.d.mts +250 -0
  336. package/resources/collections/collections.d.mts.map +1 -0
  337. package/resources/collections/collections.d.ts +250 -0
  338. package/resources/collections/collections.d.ts.map +1 -0
  339. package/resources/collections/collections.js +52 -0
  340. package/resources/collections/collections.js.map +1 -0
  341. package/resources/collections/collections.mjs +47 -0
  342. package/resources/collections/collections.mjs.map +1 -0
  343. package/resources/collections/index.d.mts +4 -0
  344. package/resources/collections/index.d.mts.map +1 -0
  345. package/resources/collections/index.d.ts +4 -0
  346. package/resources/collections/index.d.ts.map +1 -0
  347. package/resources/collections/index.js +11 -0
  348. package/resources/collections/index.js.map +1 -0
  349. package/resources/collections/index.mjs +5 -0
  350. package/resources/collections/index.mjs.map +1 -0
  351. package/resources/collections/models.d.mts +119 -0
  352. package/resources/collections/models.d.mts.map +1 -0
  353. package/resources/collections/models.d.ts +119 -0
  354. package/resources/collections/models.d.ts.map +1 -0
  355. package/resources/collections/models.js +22 -0
  356. package/resources/collections/models.js.map +1 -0
  357. package/resources/collections/models.mjs +18 -0
  358. package/resources/collections/models.mjs.map +1 -0
  359. package/resources/collections.d.mts +2 -0
  360. package/resources/collections.d.mts.map +1 -0
  361. package/resources/collections.d.ts +2 -0
  362. package/resources/collections.d.ts.map +1 -0
  363. package/resources/collections.js +6 -0
  364. package/resources/collections.js.map +1 -0
  365. package/resources/collections.mjs +3 -0
  366. package/resources/collections.mjs.map +1 -0
  367. package/resources/generate.d.mts +3804 -0
  368. package/resources/generate.d.mts.map +1 -0
  369. package/resources/generate.d.ts +3804 -0
  370. package/resources/generate.d.ts.map +1 -0
  371. package/resources/generate.js +70 -0
  372. package/resources/generate.js.map +1 -0
  373. package/resources/generate.mjs +66 -0
  374. package/resources/generate.mjs.map +1 -0
  375. package/resources/index.d.mts +12 -0
  376. package/resources/index.d.mts.map +1 -0
  377. package/resources/index.d.ts +12 -0
  378. package/resources/index.d.ts.map +1 -0
  379. package/resources/index.js +27 -0
  380. package/resources/index.js.map +1 -0
  381. package/resources/index.mjs +13 -0
  382. package/resources/index.mjs.map +1 -0
  383. package/resources/jobs.d.mts +1191 -0
  384. package/resources/jobs.d.mts.map +1 -0
  385. package/resources/jobs.d.ts +1191 -0
  386. package/resources/jobs.d.ts.map +1 -0
  387. package/resources/jobs.js +31 -0
  388. package/resources/jobs.js.map +1 -0
  389. package/resources/jobs.mjs +27 -0
  390. package/resources/jobs.mjs.map +1 -0
  391. package/resources/models/description.d.mts +490 -0
  392. package/resources/models/description.d.mts.map +1 -0
  393. package/resources/models/description.d.ts +490 -0
  394. package/resources/models/description.d.ts.map +1 -0
  395. package/resources/models/description.js +27 -0
  396. package/resources/models/description.js.map +1 -0
  397. package/resources/models/description.mjs +23 -0
  398. package/resources/models/description.mjs.map +1 -0
  399. package/resources/models/examples.d.mts +2819 -0
  400. package/resources/models/examples.d.mts.map +1 -0
  401. package/resources/models/examples.d.ts +2819 -0
  402. package/resources/models/examples.d.ts.map +1 -0
  403. package/resources/models/examples.js +27 -0
  404. package/resources/models/examples.js.map +1 -0
  405. package/resources/models/examples.mjs +23 -0
  406. package/resources/models/examples.mjs.map +1 -0
  407. package/resources/models/index.d.mts +6 -0
  408. package/resources/models/index.d.mts.map +1 -0
  409. package/resources/models/index.d.ts +6 -0
  410. package/resources/models/index.d.ts.map +1 -0
  411. package/resources/models/index.js +15 -0
  412. package/resources/models/index.js.map +1 -0
  413. package/resources/models/index.mjs +7 -0
  414. package/resources/models/index.mjs.map +1 -0
  415. package/resources/models/models.d.mts +6676 -0
  416. package/resources/models/models.d.mts.map +1 -0
  417. package/resources/models/models.d.ts +6676 -0
  418. package/resources/models/models.d.ts.map +1 -0
  419. package/resources/models/models.js +107 -0
  420. package/resources/models/models.js.map +1 -0
  421. package/resources/models/models.mjs +102 -0
  422. package/resources/models/models.mjs.map +1 -0
  423. package/resources/models/train.d.mts +2334 -0
  424. package/resources/models/train.d.mts.map +1 -0
  425. package/resources/models/train.d.ts +2334 -0
  426. package/resources/models/train.d.ts.map +1 -0
  427. package/resources/models/train.js +27 -0
  428. package/resources/models/train.js.map +1 -0
  429. package/resources/models/train.mjs +23 -0
  430. package/resources/models/train.mjs.map +1 -0
  431. package/resources/models/training-images.d.mts +214 -0
  432. package/resources/models/training-images.d.mts.map +1 -0
  433. package/resources/models/training-images.d.ts +214 -0
  434. package/resources/models/training-images.d.ts.map +1 -0
  435. package/resources/models/training-images.js +46 -0
  436. package/resources/models/training-images.js.map +1 -0
  437. package/resources/models/training-images.mjs +42 -0
  438. package/resources/models/training-images.mjs.map +1 -0
  439. package/resources/models.d.mts +2 -0
  440. package/resources/models.d.mts.map +1 -0
  441. package/resources/models.d.ts +2 -0
  442. package/resources/models.d.ts.map +1 -0
  443. package/resources/models.js +6 -0
  444. package/resources/models.js.map +1 -0
  445. package/resources/models.mjs +3 -0
  446. package/resources/models.mjs.map +1 -0
  447. package/resources/oscu.d.mts +25 -0
  448. package/resources/oscu.d.mts.map +1 -0
  449. package/resources/oscu.d.ts +25 -0
  450. package/resources/oscu.d.ts.map +1 -0
  451. package/resources/oscu.js +16 -0
  452. package/resources/oscu.js.map +1 -0
  453. package/resources/oscu.mjs +12 -0
  454. package/resources/oscu.mjs.map +1 -0
  455. package/resources/search.d.mts +595 -0
  456. package/resources/search.d.mts.map +1 -0
  457. package/resources/search.d.ts +595 -0
  458. package/resources/search.d.ts.map +1 -0
  459. package/resources/search.js +29 -0
  460. package/resources/search.js.map +1 -0
  461. package/resources/search.mjs +25 -0
  462. package/resources/search.mjs.map +1 -0
  463. package/resources/tags.d.mts +55 -0
  464. package/resources/tags.d.mts.map +1 -0
  465. package/resources/tags.d.ts +55 -0
  466. package/resources/tags.d.ts.map +1 -0
  467. package/resources/tags.js +15 -0
  468. package/resources/tags.js.map +1 -0
  469. package/resources/tags.mjs +11 -0
  470. package/resources/tags.mjs.map +1 -0
  471. package/resources/uploads.d.mts +250 -0
  472. package/resources/uploads.d.mts.map +1 -0
  473. package/resources/uploads.d.ts +250 -0
  474. package/resources/uploads.d.ts.map +1 -0
  475. package/resources/uploads.js +29 -0
  476. package/resources/uploads.js.map +1 -0
  477. package/resources/uploads.mjs +25 -0
  478. package/resources/uploads.mjs.map +1 -0
  479. package/resources/usages.d.mts +760 -0
  480. package/resources/usages.d.mts.map +1 -0
  481. package/resources/usages.d.ts +760 -0
  482. package/resources/usages.d.ts.map +1 -0
  483. package/resources/usages.js +17 -0
  484. package/resources/usages.js.map +1 -0
  485. package/resources/usages.mjs +13 -0
  486. package/resources/usages.mjs.map +1 -0
  487. package/resources/workflows.d.mts +4539 -0
  488. package/resources/workflows.d.mts.map +1 -0
  489. package/resources/workflows.d.ts +4539 -0
  490. package/resources/workflows.d.ts.map +1 -0
  491. package/resources/workflows.js +64 -0
  492. package/resources/workflows.js.map +1 -0
  493. package/resources/workflows.mjs +60 -0
  494. package/resources/workflows.mjs.map +1 -0
  495. package/resources.d.mts +2 -0
  496. package/resources.d.mts.map +1 -0
  497. package/resources.d.ts +2 -0
  498. package/resources.d.ts.map +1 -0
  499. package/resources.js +5 -0
  500. package/resources.js.map +1 -0
  501. package/resources.mjs +2 -0
  502. package/resources.mjs.map +1 -0
  503. package/src/api-promise.ts +2 -0
  504. package/src/client.ts +999 -0
  505. package/src/core/README.md +3 -0
  506. package/src/core/api-promise.ts +92 -0
  507. package/src/core/error.ts +130 -0
  508. package/src/core/resource.ts +11 -0
  509. package/src/core/uploads.ts +2 -0
  510. package/src/error.ts +2 -0
  511. package/src/index.ts +22 -0
  512. package/src/internal/README.md +3 -0
  513. package/src/internal/builtin-types.ts +93 -0
  514. package/src/internal/detect-platform.ts +196 -0
  515. package/src/internal/errors.ts +33 -0
  516. package/src/internal/headers.ts +97 -0
  517. package/src/internal/parse.ts +56 -0
  518. package/src/internal/qs/LICENSE.md +13 -0
  519. package/src/internal/qs/README.md +3 -0
  520. package/src/internal/qs/formats.ts +10 -0
  521. package/src/internal/qs/index.ts +13 -0
  522. package/src/internal/qs/stringify.ts +385 -0
  523. package/src/internal/qs/types.ts +71 -0
  524. package/src/internal/qs/utils.ts +265 -0
  525. package/src/internal/request-options.ts +91 -0
  526. package/src/internal/shim-types.ts +26 -0
  527. package/src/internal/shims.ts +107 -0
  528. package/src/internal/to-file.ts +154 -0
  529. package/src/internal/types.ts +95 -0
  530. package/src/internal/uploads.ts +187 -0
  531. package/src/internal/utils/base64.ts +40 -0
  532. package/src/internal/utils/bytes.ts +32 -0
  533. package/src/internal/utils/env.ts +18 -0
  534. package/src/internal/utils/log.ts +126 -0
  535. package/src/internal/utils/path.ts +88 -0
  536. package/src/internal/utils/query.ts +7 -0
  537. package/src/internal/utils/sleep.ts +3 -0
  538. package/src/internal/utils/uuid.ts +17 -0
  539. package/src/internal/utils/values.ts +105 -0
  540. package/src/internal/utils.ts +9 -0
  541. package/src/lib/.keep +4 -0
  542. package/src/resource.ts +2 -0
  543. package/src/resources/assets/assets.ts +9939 -0
  544. package/src/resources/assets/download.ts +138 -0
  545. package/src/resources/assets/index.ts +41 -0
  546. package/src/resources/assets/public.ts +2329 -0
  547. package/src/resources/assets.ts +3 -0
  548. package/src/resources/collections/assets.ts +163 -0
  549. package/src/resources/collections/collections.ts +357 -0
  550. package/src/resources/collections/index.ts +27 -0
  551. package/src/resources/collections/models.ts +163 -0
  552. package/src/resources/collections.ts +3 -0
  553. package/src/resources/generate.ts +5478 -0
  554. package/src/resources/index.ts +122 -0
  555. package/src/resources/jobs.ts +1712 -0
  556. package/src/resources/models/description.ts +800 -0
  557. package/src/resources/models/examples.ts +4125 -0
  558. package/src/resources/models/index.ts +58 -0
  559. package/src/resources/models/models.ts +8619 -0
  560. package/src/resources/models/train.ts +3034 -0
  561. package/src/resources/models/training-images.ts +304 -0
  562. package/src/resources/models.ts +3 -0
  563. package/src/resources/oscu.ts +35 -0
  564. package/src/resources/search.ts +731 -0
  565. package/src/resources/tags.ts +69 -0
  566. package/src/resources/uploads.ts +369 -0
  567. package/src/resources/usages.ts +1242 -0
  568. package/src/resources/workflows.ts +6019 -0
  569. package/src/resources.ts +1 -0
  570. package/src/tsconfig.json +11 -0
  571. package/src/uploads.ts +2 -0
  572. package/src/version.ts +1 -0
  573. package/uploads.d.mts +2 -0
  574. package/uploads.d.mts.map +1 -0
  575. package/uploads.d.ts +2 -0
  576. package/uploads.d.ts.map +1 -0
  577. package/uploads.js +6 -0
  578. package/uploads.js.map +1 -0
  579. package/uploads.mjs +2 -0
  580. package/uploads.mjs.map +1 -0
  581. package/version.d.mts +2 -0
  582. package/version.d.mts.map +1 -0
  583. package/version.d.ts +2 -0
  584. package/version.d.ts.map +1 -0
  585. package/version.js +5 -0
  586. package/version.js.map +1 -0
  587. package/version.mjs +2 -0
  588. package/version.mjs.map +1 -0
@@ -0,0 +1,1712 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../core/resource';
4
+ import { APIPromise } from '../core/api-promise';
5
+ import { RequestOptions } from '../internal/request-options';
6
+ import { path } from '../internal/utils/path';
7
+
8
+ export class Jobs extends APIResource {
9
+ /**
10
+ * Get job data by job ID
11
+ */
12
+ retrieve(jobID: string, options?: RequestOptions): APIPromise<JobRetrieveResponse> {
13
+ return this._client.get(path`/jobs/${jobID}`, options);
14
+ }
15
+
16
+ /**
17
+ * List all jobs matching the given filters. A job is a synchronous operation or an
18
+ * asynchronous task such as a training, a generation, etc. It offers a unified
19
+ * view of all operations running on the platform along with their status and
20
+ * results.
21
+ */
22
+ list(query: JobListParams | null | undefined = {}, options?: RequestOptions): APIPromise<JobListResponse> {
23
+ return this._client.get('/jobs', { query, ...options });
24
+ }
25
+
26
+ /**
27
+ * Trigger an action on a job: cancel
28
+ */
29
+ triggerAction(
30
+ jobID: string,
31
+ body: JobTriggerActionParams,
32
+ options?: RequestOptions,
33
+ ): APIPromise<JobTriggerActionResponse> {
34
+ return this._client.post(path`/jobs/${jobID}/action`, { body, ...options });
35
+ }
36
+ }
37
+
38
+ export interface JobRetrieveResponse {
39
+ job: JobRetrieveResponse.Job;
40
+ }
41
+
42
+ export namespace JobRetrieveResponse {
43
+ export interface Job {
44
+ /**
45
+ * The job creation date as an ISO string (example: "2023-02-03T11:19:41.579Z")
46
+ */
47
+ createdAt: string;
48
+
49
+ /**
50
+ * The job ID (example: "job_ocZCnG1Df35XRL1QyCZSRxAG8")
51
+ */
52
+ jobId: string;
53
+
54
+ /**
55
+ * The type of job
56
+ */
57
+ jobType:
58
+ | 'assets-download'
59
+ | 'canvas-export'
60
+ | 'caption'
61
+ | 'caption-llava'
62
+ | 'custom'
63
+ | 'describe-style'
64
+ | 'detection'
65
+ | 'embed'
66
+ | 'flux'
67
+ | 'flux-model-training'
68
+ | 'generate-prompt'
69
+ | 'image-generation'
70
+ | 'image-prompt-editing'
71
+ | 'inference'
72
+ | 'mesh-preview-rendering'
73
+ | 'model-download'
74
+ | 'model-import'
75
+ | 'model-training'
76
+ | 'openai-image-generation'
77
+ | 'patch-image'
78
+ | 'pixelate'
79
+ | 'reframe'
80
+ | 'remove-background'
81
+ | 'repaint'
82
+ | 'restyle'
83
+ | 'segment'
84
+ | 'skybox-3d'
85
+ | 'skybox-base-360'
86
+ | 'skybox-hdri'
87
+ | 'skybox-upscale-360'
88
+ | 'texture'
89
+ | 'translate'
90
+ | 'upload'
91
+ | 'upscale'
92
+ | 'upscale-skybox'
93
+ | 'upscale-texture'
94
+ | 'vectorize'
95
+ | 'workflow';
96
+
97
+ /**
98
+ * Metadata of the job with some additional information
99
+ */
100
+ metadata: Job.Metadata;
101
+
102
+ /**
103
+ * Progress of the job (between 0 and 1)
104
+ */
105
+ progress: number;
106
+
107
+ /**
108
+ * The current status of the job
109
+ */
110
+ status:
111
+ | 'canceled'
112
+ | 'failure'
113
+ | 'finalizing'
114
+ | 'in-progress'
115
+ | 'pending'
116
+ | 'queued'
117
+ | 'success'
118
+ | 'warming-up';
119
+
120
+ /**
121
+ * The history of the different statuses the job went through with the ISO string
122
+ * date of when the job reached each statuses.
123
+ */
124
+ statusHistory: Array<Job.StatusHistory>;
125
+
126
+ /**
127
+ * The job last update date as an ISO string (example: "2023-02-03T11:19:41.579Z")
128
+ */
129
+ updatedAt: string;
130
+
131
+ /**
132
+ * The author user ID (example: "dcf121faaa1a0a0bbbd9ca1b73d62aea")
133
+ */
134
+ authorId?: string;
135
+
136
+ /**
137
+ * The billing of the job
138
+ */
139
+ billing?: Job.Billing;
140
+
141
+ /**
142
+ * The owner ID (example: "team_U3Qmc8PCdWXwAQJ4Dvw4tV6D")
143
+ */
144
+ ownerId?: string;
145
+ }
146
+
147
+ export namespace Job {
148
+ /**
149
+ * Metadata of the job with some additional information
150
+ */
151
+ export interface Metadata {
152
+ /**
153
+ * List of produced assets for this job
154
+ */
155
+ assetIds?: Array<string>;
156
+
157
+ /**
158
+ * The flow of the job. Only available for workflow jobs.
159
+ */
160
+ flow?: Array<Metadata.Flow>;
161
+
162
+ /**
163
+ * The inputs for the job
164
+ */
165
+ input?: unknown;
166
+
167
+ /**
168
+ * The output of the job
169
+ */
170
+ output?: unknown;
171
+
172
+ /**
173
+ * The workflow ID of the job if job is part of a workflow.
174
+ */
175
+ workflowId?: string;
176
+
177
+ /**
178
+ * The workflow job ID of the job if job is part of a workflow job.
179
+ */
180
+ workflowJobId?: string;
181
+ }
182
+
183
+ export namespace Metadata {
184
+ export interface Flow {
185
+ /**
186
+ * The id of the node.
187
+ */
188
+ id: string;
189
+
190
+ /**
191
+ * The status of the node. Only available for WorkflowJob nodes.
192
+ */
193
+ status: 'failure' | 'pending' | 'processing' | 'skipped' | 'success';
194
+
195
+ /**
196
+ * The type of the job for the node.
197
+ */
198
+ type:
199
+ | 'custom-model'
200
+ | 'generate-prompt'
201
+ | 'logic'
202
+ | 'remove-background'
203
+ | 'transform'
204
+ | 'user-approval'
205
+ | 'workflow';
206
+
207
+ /**
208
+ * List of produced assets for this node.
209
+ */
210
+ assets?: Array<Flow.Asset>;
211
+
212
+ /**
213
+ * The nodes that this node depends on. Only available for nodes that have
214
+ * dependencies. Mainly used for user approval nodes.
215
+ */
216
+ dependsOn?: Array<string>;
217
+
218
+ /**
219
+ * The inputs of the node.
220
+ */
221
+ inputs?: Array<Flow.Input>;
222
+
223
+ /**
224
+ * If the flow is part of a WorkflowJob, this is the jobId for the node. jobId is
225
+ * only available for nodes started. A node "Pending" for a running workflow job is
226
+ * not started.
227
+ */
228
+ jobId?: string;
229
+
230
+ /**
231
+ * The logic of the node. Only available for logic nodes.
232
+ */
233
+ logic?: Flow.Logic;
234
+
235
+ /**
236
+ * The type of the logic for the node. Only available for logic nodes.
237
+ */
238
+ logicType?: 'if-else';
239
+
240
+ /**
241
+ * The model id for the node. Mainly used for custom model tasks.
242
+ */
243
+ modelId?: string;
244
+
245
+ /**
246
+ * The workflow id for the node. Mainly used for workflow tasks.
247
+ */
248
+ workflowId?: string;
249
+ }
250
+
251
+ export namespace Flow {
252
+ export interface Asset {
253
+ assetId: string;
254
+
255
+ url: string;
256
+ }
257
+
258
+ /**
259
+ * This is used to run the flow.
260
+ */
261
+ export interface Input {
262
+ /**
263
+ * The name that must be user to call the model through the API
264
+ */
265
+ name: string;
266
+
267
+ /**
268
+ * The data type of the input
269
+ */
270
+ type:
271
+ | 'boolean'
272
+ | 'file'
273
+ | 'file_array'
274
+ | 'inputs_array'
275
+ | 'model'
276
+ | 'model_array'
277
+ | 'number'
278
+ | 'number_array'
279
+ | 'string'
280
+ | 'string_array';
281
+
282
+ /**
283
+ * The allowed values for the input. For \`string\` or \`number\` types, creates a
284
+ * single-select dropdown. For \`string_array\` type, creates a multi-select
285
+ * dropdown.
286
+ */
287
+ allowedValues?: Array<unknown>;
288
+
289
+ /**
290
+ * Specifies the background behavior for the input. Only available for \`file\` and
291
+ * \`file_array\` input types with kind \`image\`.
292
+ */
293
+ backgroundBehavior?: 'opaque' | 'transparent';
294
+
295
+ /**
296
+ * Whether the input is a color or not. Only available for \`string\` input type.
297
+ */
298
+ color?: boolean;
299
+
300
+ /**
301
+ * Whether this input affects the model's cost calculation
302
+ */
303
+ costImpact?: boolean;
304
+
305
+ /**
306
+ * Help text displayed in the UI to provide additional information about the input
307
+ */
308
+ description?: string;
309
+
310
+ /**
311
+ * Used to visually group inputs together in the UI. Inputs with the same group
312
+ * value appear consecutively in the UI.
313
+ */
314
+ group?: string;
315
+
316
+ /**
317
+ * Hint text displayed in the UI as a tooltip to guide the user
318
+ */
319
+ hint?: string;
320
+
321
+ /**
322
+ * The list of inputs which form an object within a container array. All inputs are
323
+ * the same as the current object. This is only available for type inputs_array
324
+ * inputs.
325
+ */
326
+ inputs?: Array<unknown>;
327
+
328
+ /**
329
+ * The asset kind of the input. Only taken into account for \`file\` and
330
+ * \`file_array\` input types.
331
+ */
332
+ kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
333
+
334
+ /**
335
+ * The label displayed in the UI for this input
336
+ */
337
+ label?: string;
338
+
339
+ /**
340
+ * The name of the file input field to use as the mask source
341
+ */
342
+ maskFrom?: string;
343
+
344
+ /**
345
+ * The maximum allowed value. Only available for \`number\` and \`array\` input
346
+ * types.
347
+ */
348
+ max?: number;
349
+
350
+ /**
351
+ * The maximum allowed length for \`string\` inputs. Also applies to each item in
352
+ * \`string_array\`.
353
+ */
354
+ maxLength?: number;
355
+
356
+ /**
357
+ * The minimum allowed value. Only available for \`number\` and array input types.
358
+ */
359
+ min?: number;
360
+
361
+ /**
362
+ * The minimum allowed length for string inputs. Also applies to each item in
363
+ * \`string_array\`.
364
+ */
365
+ minLength?: number;
366
+
367
+ /**
368
+ * The allowed model types for this input. Example: \`["flux.1-lora"]\`. Only
369
+ * available for \`model_array\` input type.
370
+ */
371
+ modelTypes?: Array<
372
+ | 'custom'
373
+ | 'flux.1'
374
+ | 'flux.1-composition'
375
+ | 'flux.1-kontext-dev'
376
+ | 'flux.1-kontext-lora'
377
+ | 'flux.1-krea-dev'
378
+ | 'flux.1-krea-lora'
379
+ | 'flux.1-lora'
380
+ | 'flux.1-pro'
381
+ | 'flux.1.1-pro-ultra'
382
+ | 'flux1.1-pro'
383
+ | 'gpt-image-1'
384
+ | 'sd-1_5'
385
+ | 'sd-1_5-composition'
386
+ | 'sd-1_5-lora'
387
+ | 'sd-xl'
388
+ | 'sd-xl-composition'
389
+ | 'sd-xl-lora'
390
+ >;
391
+
392
+ /**
393
+ * Whether this input represents a parent asset to assign to the produced assets.
394
+ * Only available for \`file\` and \`file_array\` input types.
395
+ *
396
+ * For \`file_array\`, the parent asset is the first item in the array.
397
+ */
398
+ parent?: boolean;
399
+
400
+ /**
401
+ * Placeholder text for the input. Only available for 'string' input type.
402
+ */
403
+ placeholder?: string;
404
+
405
+ /**
406
+ * Whether the input is a prompt. When true, displays as a text area with prompt
407
+ * spark feature. Only available for \`string\` input type.
408
+ */
409
+ prompt?: boolean;
410
+
411
+ /**
412
+ * Whether the input is used with prompt spark. Only available for \`string\` input
413
+ * type.
414
+ */
415
+ promptSpark?: boolean;
416
+
417
+ /**
418
+ * The reference to another input or output of the same workflow. Must have at
419
+ * least one of node or conditional.
420
+ */
421
+ ref?: Input.Ref;
422
+
423
+ /**
424
+ * Set of rules that describes when this input is required:
425
+ *
426
+ * - \`always\`: Input is always required
427
+ * - \`ifNotDefined\`: Input is required when another specified input is not
428
+ * defined
429
+ * - \`ifDefined\`: Input is required when another specified input is defined
430
+ * - \`conditionalValues\`: Input is required when another input has a specific
431
+ * value
432
+ *
433
+ * By default, the input is not required.
434
+ */
435
+ required?: Input.Required;
436
+
437
+ /**
438
+ * The step increment for numeric inputs. Only available for \`number\` input type.
439
+ */
440
+ step?: number;
441
+ }
442
+
443
+ export namespace Input {
444
+ /**
445
+ * The reference to another input or output of the same workflow. Must have at
446
+ * least one of node or conditional.
447
+ */
448
+ export interface Ref {
449
+ /**
450
+ * The conditional nodes to reference. If the conditional nodes are successful, the
451
+ * node will be successful. If the conditional nodes are skipped, the node will be
452
+ * skipped. Contains an array of node ids used to check the status of the nodes.
453
+ */
454
+ conditional?: Array<string>;
455
+
456
+ /**
457
+ * This is the desired node output value if ref is an if/else node.
458
+ */
459
+ equal?: string;
460
+
461
+ /**
462
+ * The name of the input or output to reference. If the type is 'workflow', the
463
+ * name is the name of the input of the workflow is required If the type is 'node',
464
+ * the name is not mandatory, except if you want all outputs of the node. To get
465
+ * all outputs of a node, you can use the name 'all'.
466
+ */
467
+ name?: string;
468
+
469
+ /**
470
+ * The node id or 'workflow' if the source is a workflow input.
471
+ */
472
+ node?: string;
473
+ }
474
+
475
+ /**
476
+ * Set of rules that describes when this input is required:
477
+ *
478
+ * - \`always\`: Input is always required
479
+ * - \`ifNotDefined\`: Input is required when another specified input is not
480
+ * defined
481
+ * - \`ifDefined\`: Input is required when another specified input is defined
482
+ * - \`conditionalValues\`: Input is required when another input has a specific
483
+ * value
484
+ *
485
+ * By default, the input is not required.
486
+ */
487
+ export interface Required {
488
+ /**
489
+ * Whether the input is always required
490
+ */
491
+ always?: boolean;
492
+
493
+ /**
494
+ * Makes this input required when another input has a specific value:
495
+ *
496
+ * - Key: name of the input to check
497
+ * - Value: operation and allowed values that trigger the requirement
498
+ */
499
+ conditionalValues?: unknown;
500
+
501
+ /**
502
+ * Makes this input required when another input is defined:
503
+ *
504
+ * - Key: name of the input that must be defined
505
+ * - Value: message to display when this input is required
506
+ */
507
+ ifDefined?: unknown;
508
+
509
+ /**
510
+ * Makes this input required when another input is not defined:
511
+ *
512
+ * - Key: name of the input that must be undefined
513
+ * - Value: message to display when this input is required
514
+ */
515
+ ifNotDefined?: unknown;
516
+ }
517
+ }
518
+
519
+ /**
520
+ * The logic of the node. Only available for logic nodes.
521
+ */
522
+ export interface Logic {
523
+ /**
524
+ * The cases of the logic. Only available for if/else nodes.
525
+ */
526
+ cases?: Array<Logic.Case>;
527
+
528
+ /**
529
+ * The default case of the logic. Contains the id/output of the node to execute if
530
+ * no case is matched. Only available for if/else nodes.
531
+ */
532
+ default?: string;
533
+
534
+ /**
535
+ * The transform of the logic. Only available for transform nodes.
536
+ */
537
+ transform?: string;
538
+ }
539
+
540
+ export namespace Logic {
541
+ export interface Case {
542
+ condition: string;
543
+
544
+ value: string;
545
+ }
546
+ }
547
+ }
548
+ }
549
+
550
+ export interface StatusHistory {
551
+ date: string;
552
+
553
+ status:
554
+ | 'canceled'
555
+ | 'failure'
556
+ | 'finalizing'
557
+ | 'in-progress'
558
+ | 'pending'
559
+ | 'queued'
560
+ | 'success'
561
+ | 'warming-up';
562
+ }
563
+
564
+ /**
565
+ * The billing of the job
566
+ */
567
+ export interface Billing {
568
+ cuCost: number;
569
+
570
+ cuDiscount: number;
571
+ }
572
+ }
573
+ }
574
+
575
+ export interface JobListResponse {
576
+ jobs: Array<JobListResponse.Job>;
577
+
578
+ /**
579
+ * A token to query the next page of jobs
580
+ */
581
+ nextPaginationToken?: string;
582
+ }
583
+
584
+ export namespace JobListResponse {
585
+ export interface Job {
586
+ /**
587
+ * The job creation date as an ISO string (example: "2023-02-03T11:19:41.579Z")
588
+ */
589
+ createdAt: string;
590
+
591
+ /**
592
+ * The job ID (example: "job_ocZCnG1Df35XRL1QyCZSRxAG8")
593
+ */
594
+ jobId: string;
595
+
596
+ /**
597
+ * The type of job
598
+ */
599
+ jobType:
600
+ | 'assets-download'
601
+ | 'canvas-export'
602
+ | 'caption'
603
+ | 'caption-llava'
604
+ | 'custom'
605
+ | 'describe-style'
606
+ | 'detection'
607
+ | 'embed'
608
+ | 'flux'
609
+ | 'flux-model-training'
610
+ | 'generate-prompt'
611
+ | 'image-generation'
612
+ | 'image-prompt-editing'
613
+ | 'inference'
614
+ | 'mesh-preview-rendering'
615
+ | 'model-download'
616
+ | 'model-import'
617
+ | 'model-training'
618
+ | 'openai-image-generation'
619
+ | 'patch-image'
620
+ | 'pixelate'
621
+ | 'reframe'
622
+ | 'remove-background'
623
+ | 'repaint'
624
+ | 'restyle'
625
+ | 'segment'
626
+ | 'skybox-3d'
627
+ | 'skybox-base-360'
628
+ | 'skybox-hdri'
629
+ | 'skybox-upscale-360'
630
+ | 'texture'
631
+ | 'translate'
632
+ | 'upload'
633
+ | 'upscale'
634
+ | 'upscale-skybox'
635
+ | 'upscale-texture'
636
+ | 'vectorize'
637
+ | 'workflow';
638
+
639
+ /**
640
+ * Metadata of the job with some additional information
641
+ */
642
+ metadata: Job.Metadata;
643
+
644
+ /**
645
+ * Progress of the job (between 0 and 1)
646
+ */
647
+ progress: number;
648
+
649
+ /**
650
+ * The current status of the job
651
+ */
652
+ status:
653
+ | 'canceled'
654
+ | 'failure'
655
+ | 'finalizing'
656
+ | 'in-progress'
657
+ | 'pending'
658
+ | 'queued'
659
+ | 'success'
660
+ | 'warming-up';
661
+
662
+ /**
663
+ * The history of the different statuses the job went through with the ISO string
664
+ * date of when the job reached each statuses.
665
+ */
666
+ statusHistory: Array<Job.StatusHistory>;
667
+
668
+ /**
669
+ * The job last update date as an ISO string (example: "2023-02-03T11:19:41.579Z")
670
+ */
671
+ updatedAt: string;
672
+
673
+ /**
674
+ * The author user ID (example: "dcf121faaa1a0a0bbbd9ca1b73d62aea")
675
+ */
676
+ authorId?: string;
677
+
678
+ /**
679
+ * The billing of the job
680
+ */
681
+ billing?: Job.Billing;
682
+
683
+ /**
684
+ * The owner ID (example: "team_U3Qmc8PCdWXwAQJ4Dvw4tV6D")
685
+ */
686
+ ownerId?: string;
687
+ }
688
+
689
+ export namespace Job {
690
+ /**
691
+ * Metadata of the job with some additional information
692
+ */
693
+ export interface Metadata {
694
+ /**
695
+ * List of produced assets for this job
696
+ */
697
+ assetIds?: Array<string>;
698
+
699
+ /**
700
+ * The flow of the job. Only available for workflow jobs.
701
+ */
702
+ flow?: Array<Metadata.Flow>;
703
+
704
+ /**
705
+ * The inputs for the job
706
+ */
707
+ input?: unknown;
708
+
709
+ /**
710
+ * The output of the job
711
+ */
712
+ output?: unknown;
713
+
714
+ /**
715
+ * The workflow ID of the job if job is part of a workflow.
716
+ */
717
+ workflowId?: string;
718
+
719
+ /**
720
+ * The workflow job ID of the job if job is part of a workflow job.
721
+ */
722
+ workflowJobId?: string;
723
+ }
724
+
725
+ export namespace Metadata {
726
+ export interface Flow {
727
+ /**
728
+ * The id of the node.
729
+ */
730
+ id: string;
731
+
732
+ /**
733
+ * The status of the node. Only available for WorkflowJob nodes.
734
+ */
735
+ status: 'failure' | 'pending' | 'processing' | 'skipped' | 'success';
736
+
737
+ /**
738
+ * The type of the job for the node.
739
+ */
740
+ type:
741
+ | 'custom-model'
742
+ | 'generate-prompt'
743
+ | 'logic'
744
+ | 'remove-background'
745
+ | 'transform'
746
+ | 'user-approval'
747
+ | 'workflow';
748
+
749
+ /**
750
+ * List of produced assets for this node.
751
+ */
752
+ assets?: Array<Flow.Asset>;
753
+
754
+ /**
755
+ * The nodes that this node depends on. Only available for nodes that have
756
+ * dependencies. Mainly used for user approval nodes.
757
+ */
758
+ dependsOn?: Array<string>;
759
+
760
+ /**
761
+ * The inputs of the node.
762
+ */
763
+ inputs?: Array<Flow.Input>;
764
+
765
+ /**
766
+ * If the flow is part of a WorkflowJob, this is the jobId for the node. jobId is
767
+ * only available for nodes started. A node "Pending" for a running workflow job is
768
+ * not started.
769
+ */
770
+ jobId?: string;
771
+
772
+ /**
773
+ * The logic of the node. Only available for logic nodes.
774
+ */
775
+ logic?: Flow.Logic;
776
+
777
+ /**
778
+ * The type of the logic for the node. Only available for logic nodes.
779
+ */
780
+ logicType?: 'if-else';
781
+
782
+ /**
783
+ * The model id for the node. Mainly used for custom model tasks.
784
+ */
785
+ modelId?: string;
786
+
787
+ /**
788
+ * The workflow id for the node. Mainly used for workflow tasks.
789
+ */
790
+ workflowId?: string;
791
+ }
792
+
793
+ export namespace Flow {
794
+ export interface Asset {
795
+ assetId: string;
796
+
797
+ url: string;
798
+ }
799
+
800
+ /**
801
+ * This is used to run the flow.
802
+ */
803
+ export interface Input {
804
+ /**
805
+ * The name that must be user to call the model through the API
806
+ */
807
+ name: string;
808
+
809
+ /**
810
+ * The data type of the input
811
+ */
812
+ type:
813
+ | 'boolean'
814
+ | 'file'
815
+ | 'file_array'
816
+ | 'inputs_array'
817
+ | 'model'
818
+ | 'model_array'
819
+ | 'number'
820
+ | 'number_array'
821
+ | 'string'
822
+ | 'string_array';
823
+
824
+ /**
825
+ * The allowed values for the input. For \`string\` or \`number\` types, creates a
826
+ * single-select dropdown. For \`string_array\` type, creates a multi-select
827
+ * dropdown.
828
+ */
829
+ allowedValues?: Array<unknown>;
830
+
831
+ /**
832
+ * Specifies the background behavior for the input. Only available for \`file\` and
833
+ * \`file_array\` input types with kind \`image\`.
834
+ */
835
+ backgroundBehavior?: 'opaque' | 'transparent';
836
+
837
+ /**
838
+ * Whether the input is a color or not. Only available for \`string\` input type.
839
+ */
840
+ color?: boolean;
841
+
842
+ /**
843
+ * Whether this input affects the model's cost calculation
844
+ */
845
+ costImpact?: boolean;
846
+
847
+ /**
848
+ * Help text displayed in the UI to provide additional information about the input
849
+ */
850
+ description?: string;
851
+
852
+ /**
853
+ * Used to visually group inputs together in the UI. Inputs with the same group
854
+ * value appear consecutively in the UI.
855
+ */
856
+ group?: string;
857
+
858
+ /**
859
+ * Hint text displayed in the UI as a tooltip to guide the user
860
+ */
861
+ hint?: string;
862
+
863
+ /**
864
+ * The list of inputs which form an object within a container array. All inputs are
865
+ * the same as the current object. This is only available for type inputs_array
866
+ * inputs.
867
+ */
868
+ inputs?: Array<unknown>;
869
+
870
+ /**
871
+ * The asset kind of the input. Only taken into account for \`file\` and
872
+ * \`file_array\` input types.
873
+ */
874
+ kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
875
+
876
+ /**
877
+ * The label displayed in the UI for this input
878
+ */
879
+ label?: string;
880
+
881
+ /**
882
+ * The name of the file input field to use as the mask source
883
+ */
884
+ maskFrom?: string;
885
+
886
+ /**
887
+ * The maximum allowed value. Only available for \`number\` and \`array\` input
888
+ * types.
889
+ */
890
+ max?: number;
891
+
892
+ /**
893
+ * The maximum allowed length for \`string\` inputs. Also applies to each item in
894
+ * \`string_array\`.
895
+ */
896
+ maxLength?: number;
897
+
898
+ /**
899
+ * The minimum allowed value. Only available for \`number\` and array input types.
900
+ */
901
+ min?: number;
902
+
903
+ /**
904
+ * The minimum allowed length for string inputs. Also applies to each item in
905
+ * \`string_array\`.
906
+ */
907
+ minLength?: number;
908
+
909
+ /**
910
+ * The allowed model types for this input. Example: \`["flux.1-lora"]\`. Only
911
+ * available for \`model_array\` input type.
912
+ */
913
+ modelTypes?: Array<
914
+ | 'custom'
915
+ | 'flux.1'
916
+ | 'flux.1-composition'
917
+ | 'flux.1-kontext-dev'
918
+ | 'flux.1-kontext-lora'
919
+ | 'flux.1-krea-dev'
920
+ | 'flux.1-krea-lora'
921
+ | 'flux.1-lora'
922
+ | 'flux.1-pro'
923
+ | 'flux.1.1-pro-ultra'
924
+ | 'flux1.1-pro'
925
+ | 'gpt-image-1'
926
+ | 'sd-1_5'
927
+ | 'sd-1_5-composition'
928
+ | 'sd-1_5-lora'
929
+ | 'sd-xl'
930
+ | 'sd-xl-composition'
931
+ | 'sd-xl-lora'
932
+ >;
933
+
934
+ /**
935
+ * Whether this input represents a parent asset to assign to the produced assets.
936
+ * Only available for \`file\` and \`file_array\` input types.
937
+ *
938
+ * For \`file_array\`, the parent asset is the first item in the array.
939
+ */
940
+ parent?: boolean;
941
+
942
+ /**
943
+ * Placeholder text for the input. Only available for 'string' input type.
944
+ */
945
+ placeholder?: string;
946
+
947
+ /**
948
+ * Whether the input is a prompt. When true, displays as a text area with prompt
949
+ * spark feature. Only available for \`string\` input type.
950
+ */
951
+ prompt?: boolean;
952
+
953
+ /**
954
+ * Whether the input is used with prompt spark. Only available for \`string\` input
955
+ * type.
956
+ */
957
+ promptSpark?: boolean;
958
+
959
+ /**
960
+ * The reference to another input or output of the same workflow. Must have at
961
+ * least one of node or conditional.
962
+ */
963
+ ref?: Input.Ref;
964
+
965
+ /**
966
+ * Set of rules that describes when this input is required:
967
+ *
968
+ * - \`always\`: Input is always required
969
+ * - \`ifNotDefined\`: Input is required when another specified input is not
970
+ * defined
971
+ * - \`ifDefined\`: Input is required when another specified input is defined
972
+ * - \`conditionalValues\`: Input is required when another input has a specific
973
+ * value
974
+ *
975
+ * By default, the input is not required.
976
+ */
977
+ required?: Input.Required;
978
+
979
+ /**
980
+ * The step increment for numeric inputs. Only available for \`number\` input type.
981
+ */
982
+ step?: number;
983
+ }
984
+
985
+ export namespace Input {
986
+ /**
987
+ * The reference to another input or output of the same workflow. Must have at
988
+ * least one of node or conditional.
989
+ */
990
+ export interface Ref {
991
+ /**
992
+ * The conditional nodes to reference. If the conditional nodes are successful, the
993
+ * node will be successful. If the conditional nodes are skipped, the node will be
994
+ * skipped. Contains an array of node ids used to check the status of the nodes.
995
+ */
996
+ conditional?: Array<string>;
997
+
998
+ /**
999
+ * This is the desired node output value if ref is an if/else node.
1000
+ */
1001
+ equal?: string;
1002
+
1003
+ /**
1004
+ * The name of the input or output to reference. If the type is 'workflow', the
1005
+ * name is the name of the input of the workflow is required If the type is 'node',
1006
+ * the name is not mandatory, except if you want all outputs of the node. To get
1007
+ * all outputs of a node, you can use the name 'all'.
1008
+ */
1009
+ name?: string;
1010
+
1011
+ /**
1012
+ * The node id or 'workflow' if the source is a workflow input.
1013
+ */
1014
+ node?: string;
1015
+ }
1016
+
1017
+ /**
1018
+ * Set of rules that describes when this input is required:
1019
+ *
1020
+ * - \`always\`: Input is always required
1021
+ * - \`ifNotDefined\`: Input is required when another specified input is not
1022
+ * defined
1023
+ * - \`ifDefined\`: Input is required when another specified input is defined
1024
+ * - \`conditionalValues\`: Input is required when another input has a specific
1025
+ * value
1026
+ *
1027
+ * By default, the input is not required.
1028
+ */
1029
+ export interface Required {
1030
+ /**
1031
+ * Whether the input is always required
1032
+ */
1033
+ always?: boolean;
1034
+
1035
+ /**
1036
+ * Makes this input required when another input has a specific value:
1037
+ *
1038
+ * - Key: name of the input to check
1039
+ * - Value: operation and allowed values that trigger the requirement
1040
+ */
1041
+ conditionalValues?: unknown;
1042
+
1043
+ /**
1044
+ * Makes this input required when another input is defined:
1045
+ *
1046
+ * - Key: name of the input that must be defined
1047
+ * - Value: message to display when this input is required
1048
+ */
1049
+ ifDefined?: unknown;
1050
+
1051
+ /**
1052
+ * Makes this input required when another input is not defined:
1053
+ *
1054
+ * - Key: name of the input that must be undefined
1055
+ * - Value: message to display when this input is required
1056
+ */
1057
+ ifNotDefined?: unknown;
1058
+ }
1059
+ }
1060
+
1061
+ /**
1062
+ * The logic of the node. Only available for logic nodes.
1063
+ */
1064
+ export interface Logic {
1065
+ /**
1066
+ * The cases of the logic. Only available for if/else nodes.
1067
+ */
1068
+ cases?: Array<Logic.Case>;
1069
+
1070
+ /**
1071
+ * The default case of the logic. Contains the id/output of the node to execute if
1072
+ * no case is matched. Only available for if/else nodes.
1073
+ */
1074
+ default?: string;
1075
+
1076
+ /**
1077
+ * The transform of the logic. Only available for transform nodes.
1078
+ */
1079
+ transform?: string;
1080
+ }
1081
+
1082
+ export namespace Logic {
1083
+ export interface Case {
1084
+ condition: string;
1085
+
1086
+ value: string;
1087
+ }
1088
+ }
1089
+ }
1090
+ }
1091
+
1092
+ export interface StatusHistory {
1093
+ date: string;
1094
+
1095
+ status:
1096
+ | 'canceled'
1097
+ | 'failure'
1098
+ | 'finalizing'
1099
+ | 'in-progress'
1100
+ | 'pending'
1101
+ | 'queued'
1102
+ | 'success'
1103
+ | 'warming-up';
1104
+ }
1105
+
1106
+ /**
1107
+ * The billing of the job
1108
+ */
1109
+ export interface Billing {
1110
+ cuCost: number;
1111
+
1112
+ cuDiscount: number;
1113
+ }
1114
+ }
1115
+ }
1116
+
1117
+ export interface JobTriggerActionResponse {
1118
+ job: JobTriggerActionResponse.Job;
1119
+ }
1120
+
1121
+ export namespace JobTriggerActionResponse {
1122
+ export interface Job {
1123
+ /**
1124
+ * The job creation date as an ISO string (example: "2023-02-03T11:19:41.579Z")
1125
+ */
1126
+ createdAt: string;
1127
+
1128
+ /**
1129
+ * The job ID (example: "job_ocZCnG1Df35XRL1QyCZSRxAG8")
1130
+ */
1131
+ jobId: string;
1132
+
1133
+ /**
1134
+ * The type of job
1135
+ */
1136
+ jobType:
1137
+ | 'assets-download'
1138
+ | 'canvas-export'
1139
+ | 'caption'
1140
+ | 'caption-llava'
1141
+ | 'custom'
1142
+ | 'describe-style'
1143
+ | 'detection'
1144
+ | 'embed'
1145
+ | 'flux'
1146
+ | 'flux-model-training'
1147
+ | 'generate-prompt'
1148
+ | 'image-generation'
1149
+ | 'image-prompt-editing'
1150
+ | 'inference'
1151
+ | 'mesh-preview-rendering'
1152
+ | 'model-download'
1153
+ | 'model-import'
1154
+ | 'model-training'
1155
+ | 'openai-image-generation'
1156
+ | 'patch-image'
1157
+ | 'pixelate'
1158
+ | 'reframe'
1159
+ | 'remove-background'
1160
+ | 'repaint'
1161
+ | 'restyle'
1162
+ | 'segment'
1163
+ | 'skybox-3d'
1164
+ | 'skybox-base-360'
1165
+ | 'skybox-hdri'
1166
+ | 'skybox-upscale-360'
1167
+ | 'texture'
1168
+ | 'translate'
1169
+ | 'upload'
1170
+ | 'upscale'
1171
+ | 'upscale-skybox'
1172
+ | 'upscale-texture'
1173
+ | 'vectorize'
1174
+ | 'workflow';
1175
+
1176
+ /**
1177
+ * Metadata of the job with some additional information
1178
+ */
1179
+ metadata: Job.Metadata;
1180
+
1181
+ /**
1182
+ * Progress of the job (between 0 and 1)
1183
+ */
1184
+ progress: number;
1185
+
1186
+ /**
1187
+ * The current status of the job
1188
+ */
1189
+ status:
1190
+ | 'canceled'
1191
+ | 'failure'
1192
+ | 'finalizing'
1193
+ | 'in-progress'
1194
+ | 'pending'
1195
+ | 'queued'
1196
+ | 'success'
1197
+ | 'warming-up';
1198
+
1199
+ /**
1200
+ * The history of the different statuses the job went through with the ISO string
1201
+ * date of when the job reached each statuses.
1202
+ */
1203
+ statusHistory: Array<Job.StatusHistory>;
1204
+
1205
+ /**
1206
+ * The job last update date as an ISO string (example: "2023-02-03T11:19:41.579Z")
1207
+ */
1208
+ updatedAt: string;
1209
+
1210
+ /**
1211
+ * The author user ID (example: "dcf121faaa1a0a0bbbd9ca1b73d62aea")
1212
+ */
1213
+ authorId?: string;
1214
+
1215
+ /**
1216
+ * The billing of the job
1217
+ */
1218
+ billing?: Job.Billing;
1219
+
1220
+ /**
1221
+ * The owner ID (example: "team_U3Qmc8PCdWXwAQJ4Dvw4tV6D")
1222
+ */
1223
+ ownerId?: string;
1224
+ }
1225
+
1226
+ export namespace Job {
1227
+ /**
1228
+ * Metadata of the job with some additional information
1229
+ */
1230
+ export interface Metadata {
1231
+ /**
1232
+ * List of produced assets for this job
1233
+ */
1234
+ assetIds?: Array<string>;
1235
+
1236
+ /**
1237
+ * The flow of the job. Only available for workflow jobs.
1238
+ */
1239
+ flow?: Array<Metadata.Flow>;
1240
+
1241
+ /**
1242
+ * The inputs for the job
1243
+ */
1244
+ input?: unknown;
1245
+
1246
+ /**
1247
+ * The output of the job
1248
+ */
1249
+ output?: unknown;
1250
+
1251
+ /**
1252
+ * The workflow ID of the job if job is part of a workflow.
1253
+ */
1254
+ workflowId?: string;
1255
+
1256
+ /**
1257
+ * The workflow job ID of the job if job is part of a workflow job.
1258
+ */
1259
+ workflowJobId?: string;
1260
+ }
1261
+
1262
+ export namespace Metadata {
1263
+ export interface Flow {
1264
+ /**
1265
+ * The id of the node.
1266
+ */
1267
+ id: string;
1268
+
1269
+ /**
1270
+ * The status of the node. Only available for WorkflowJob nodes.
1271
+ */
1272
+ status: 'failure' | 'pending' | 'processing' | 'skipped' | 'success';
1273
+
1274
+ /**
1275
+ * The type of the job for the node.
1276
+ */
1277
+ type:
1278
+ | 'custom-model'
1279
+ | 'generate-prompt'
1280
+ | 'logic'
1281
+ | 'remove-background'
1282
+ | 'transform'
1283
+ | 'user-approval'
1284
+ | 'workflow';
1285
+
1286
+ /**
1287
+ * List of produced assets for this node.
1288
+ */
1289
+ assets?: Array<Flow.Asset>;
1290
+
1291
+ /**
1292
+ * The nodes that this node depends on. Only available for nodes that have
1293
+ * dependencies. Mainly used for user approval nodes.
1294
+ */
1295
+ dependsOn?: Array<string>;
1296
+
1297
+ /**
1298
+ * The inputs of the node.
1299
+ */
1300
+ inputs?: Array<Flow.Input>;
1301
+
1302
+ /**
1303
+ * If the flow is part of a WorkflowJob, this is the jobId for the node. jobId is
1304
+ * only available for nodes started. A node "Pending" for a running workflow job is
1305
+ * not started.
1306
+ */
1307
+ jobId?: string;
1308
+
1309
+ /**
1310
+ * The logic of the node. Only available for logic nodes.
1311
+ */
1312
+ logic?: Flow.Logic;
1313
+
1314
+ /**
1315
+ * The type of the logic for the node. Only available for logic nodes.
1316
+ */
1317
+ logicType?: 'if-else';
1318
+
1319
+ /**
1320
+ * The model id for the node. Mainly used for custom model tasks.
1321
+ */
1322
+ modelId?: string;
1323
+
1324
+ /**
1325
+ * The workflow id for the node. Mainly used for workflow tasks.
1326
+ */
1327
+ workflowId?: string;
1328
+ }
1329
+
1330
+ export namespace Flow {
1331
+ export interface Asset {
1332
+ assetId: string;
1333
+
1334
+ url: string;
1335
+ }
1336
+
1337
+ /**
1338
+ * This is used to run the flow.
1339
+ */
1340
+ export interface Input {
1341
+ /**
1342
+ * The name that must be user to call the model through the API
1343
+ */
1344
+ name: string;
1345
+
1346
+ /**
1347
+ * The data type of the input
1348
+ */
1349
+ type:
1350
+ | 'boolean'
1351
+ | 'file'
1352
+ | 'file_array'
1353
+ | 'inputs_array'
1354
+ | 'model'
1355
+ | 'model_array'
1356
+ | 'number'
1357
+ | 'number_array'
1358
+ | 'string'
1359
+ | 'string_array';
1360
+
1361
+ /**
1362
+ * The allowed values for the input. For \`string\` or \`number\` types, creates a
1363
+ * single-select dropdown. For \`string_array\` type, creates a multi-select
1364
+ * dropdown.
1365
+ */
1366
+ allowedValues?: Array<unknown>;
1367
+
1368
+ /**
1369
+ * Specifies the background behavior for the input. Only available for \`file\` and
1370
+ * \`file_array\` input types with kind \`image\`.
1371
+ */
1372
+ backgroundBehavior?: 'opaque' | 'transparent';
1373
+
1374
+ /**
1375
+ * Whether the input is a color or not. Only available for \`string\` input type.
1376
+ */
1377
+ color?: boolean;
1378
+
1379
+ /**
1380
+ * Whether this input affects the model's cost calculation
1381
+ */
1382
+ costImpact?: boolean;
1383
+
1384
+ /**
1385
+ * Help text displayed in the UI to provide additional information about the input
1386
+ */
1387
+ description?: string;
1388
+
1389
+ /**
1390
+ * Used to visually group inputs together in the UI. Inputs with the same group
1391
+ * value appear consecutively in the UI.
1392
+ */
1393
+ group?: string;
1394
+
1395
+ /**
1396
+ * Hint text displayed in the UI as a tooltip to guide the user
1397
+ */
1398
+ hint?: string;
1399
+
1400
+ /**
1401
+ * The list of inputs which form an object within a container array. All inputs are
1402
+ * the same as the current object. This is only available for type inputs_array
1403
+ * inputs.
1404
+ */
1405
+ inputs?: Array<unknown>;
1406
+
1407
+ /**
1408
+ * The asset kind of the input. Only taken into account for \`file\` and
1409
+ * \`file_array\` input types.
1410
+ */
1411
+ kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
1412
+
1413
+ /**
1414
+ * The label displayed in the UI for this input
1415
+ */
1416
+ label?: string;
1417
+
1418
+ /**
1419
+ * The name of the file input field to use as the mask source
1420
+ */
1421
+ maskFrom?: string;
1422
+
1423
+ /**
1424
+ * The maximum allowed value. Only available for \`number\` and \`array\` input
1425
+ * types.
1426
+ */
1427
+ max?: number;
1428
+
1429
+ /**
1430
+ * The maximum allowed length for \`string\` inputs. Also applies to each item in
1431
+ * \`string_array\`.
1432
+ */
1433
+ maxLength?: number;
1434
+
1435
+ /**
1436
+ * The minimum allowed value. Only available for \`number\` and array input types.
1437
+ */
1438
+ min?: number;
1439
+
1440
+ /**
1441
+ * The minimum allowed length for string inputs. Also applies to each item in
1442
+ * \`string_array\`.
1443
+ */
1444
+ minLength?: number;
1445
+
1446
+ /**
1447
+ * The allowed model types for this input. Example: \`["flux.1-lora"]\`. Only
1448
+ * available for \`model_array\` input type.
1449
+ */
1450
+ modelTypes?: Array<
1451
+ | 'custom'
1452
+ | 'flux.1'
1453
+ | 'flux.1-composition'
1454
+ | 'flux.1-kontext-dev'
1455
+ | 'flux.1-kontext-lora'
1456
+ | 'flux.1-krea-dev'
1457
+ | 'flux.1-krea-lora'
1458
+ | 'flux.1-lora'
1459
+ | 'flux.1-pro'
1460
+ | 'flux.1.1-pro-ultra'
1461
+ | 'flux1.1-pro'
1462
+ | 'gpt-image-1'
1463
+ | 'sd-1_5'
1464
+ | 'sd-1_5-composition'
1465
+ | 'sd-1_5-lora'
1466
+ | 'sd-xl'
1467
+ | 'sd-xl-composition'
1468
+ | 'sd-xl-lora'
1469
+ >;
1470
+
1471
+ /**
1472
+ * Whether this input represents a parent asset to assign to the produced assets.
1473
+ * Only available for \`file\` and \`file_array\` input types.
1474
+ *
1475
+ * For \`file_array\`, the parent asset is the first item in the array.
1476
+ */
1477
+ parent?: boolean;
1478
+
1479
+ /**
1480
+ * Placeholder text for the input. Only available for 'string' input type.
1481
+ */
1482
+ placeholder?: string;
1483
+
1484
+ /**
1485
+ * Whether the input is a prompt. When true, displays as a text area with prompt
1486
+ * spark feature. Only available for \`string\` input type.
1487
+ */
1488
+ prompt?: boolean;
1489
+
1490
+ /**
1491
+ * Whether the input is used with prompt spark. Only available for \`string\` input
1492
+ * type.
1493
+ */
1494
+ promptSpark?: boolean;
1495
+
1496
+ /**
1497
+ * The reference to another input or output of the same workflow. Must have at
1498
+ * least one of node or conditional.
1499
+ */
1500
+ ref?: Input.Ref;
1501
+
1502
+ /**
1503
+ * Set of rules that describes when this input is required:
1504
+ *
1505
+ * - \`always\`: Input is always required
1506
+ * - \`ifNotDefined\`: Input is required when another specified input is not
1507
+ * defined
1508
+ * - \`ifDefined\`: Input is required when another specified input is defined
1509
+ * - \`conditionalValues\`: Input is required when another input has a specific
1510
+ * value
1511
+ *
1512
+ * By default, the input is not required.
1513
+ */
1514
+ required?: Input.Required;
1515
+
1516
+ /**
1517
+ * The step increment for numeric inputs. Only available for \`number\` input type.
1518
+ */
1519
+ step?: number;
1520
+ }
1521
+
1522
+ export namespace Input {
1523
+ /**
1524
+ * The reference to another input or output of the same workflow. Must have at
1525
+ * least one of node or conditional.
1526
+ */
1527
+ export interface Ref {
1528
+ /**
1529
+ * The conditional nodes to reference. If the conditional nodes are successful, the
1530
+ * node will be successful. If the conditional nodes are skipped, the node will be
1531
+ * skipped. Contains an array of node ids used to check the status of the nodes.
1532
+ */
1533
+ conditional?: Array<string>;
1534
+
1535
+ /**
1536
+ * This is the desired node output value if ref is an if/else node.
1537
+ */
1538
+ equal?: string;
1539
+
1540
+ /**
1541
+ * The name of the input or output to reference. If the type is 'workflow', the
1542
+ * name is the name of the input of the workflow is required If the type is 'node',
1543
+ * the name is not mandatory, except if you want all outputs of the node. To get
1544
+ * all outputs of a node, you can use the name 'all'.
1545
+ */
1546
+ name?: string;
1547
+
1548
+ /**
1549
+ * The node id or 'workflow' if the source is a workflow input.
1550
+ */
1551
+ node?: string;
1552
+ }
1553
+
1554
+ /**
1555
+ * Set of rules that describes when this input is required:
1556
+ *
1557
+ * - \`always\`: Input is always required
1558
+ * - \`ifNotDefined\`: Input is required when another specified input is not
1559
+ * defined
1560
+ * - \`ifDefined\`: Input is required when another specified input is defined
1561
+ * - \`conditionalValues\`: Input is required when another input has a specific
1562
+ * value
1563
+ *
1564
+ * By default, the input is not required.
1565
+ */
1566
+ export interface Required {
1567
+ /**
1568
+ * Whether the input is always required
1569
+ */
1570
+ always?: boolean;
1571
+
1572
+ /**
1573
+ * Makes this input required when another input has a specific value:
1574
+ *
1575
+ * - Key: name of the input to check
1576
+ * - Value: operation and allowed values that trigger the requirement
1577
+ */
1578
+ conditionalValues?: unknown;
1579
+
1580
+ /**
1581
+ * Makes this input required when another input is defined:
1582
+ *
1583
+ * - Key: name of the input that must be defined
1584
+ * - Value: message to display when this input is required
1585
+ */
1586
+ ifDefined?: unknown;
1587
+
1588
+ /**
1589
+ * Makes this input required when another input is not defined:
1590
+ *
1591
+ * - Key: name of the input that must be undefined
1592
+ * - Value: message to display when this input is required
1593
+ */
1594
+ ifNotDefined?: unknown;
1595
+ }
1596
+ }
1597
+
1598
+ /**
1599
+ * The logic of the node. Only available for logic nodes.
1600
+ */
1601
+ export interface Logic {
1602
+ /**
1603
+ * The cases of the logic. Only available for if/else nodes.
1604
+ */
1605
+ cases?: Array<Logic.Case>;
1606
+
1607
+ /**
1608
+ * The default case of the logic. Contains the id/output of the node to execute if
1609
+ * no case is matched. Only available for if/else nodes.
1610
+ */
1611
+ default?: string;
1612
+
1613
+ /**
1614
+ * The transform of the logic. Only available for transform nodes.
1615
+ */
1616
+ transform?: string;
1617
+ }
1618
+
1619
+ export namespace Logic {
1620
+ export interface Case {
1621
+ condition: string;
1622
+
1623
+ value: string;
1624
+ }
1625
+ }
1626
+ }
1627
+ }
1628
+
1629
+ export interface StatusHistory {
1630
+ date: string;
1631
+
1632
+ status:
1633
+ | 'canceled'
1634
+ | 'failure'
1635
+ | 'finalizing'
1636
+ | 'in-progress'
1637
+ | 'pending'
1638
+ | 'queued'
1639
+ | 'success'
1640
+ | 'warming-up';
1641
+ }
1642
+
1643
+ /**
1644
+ * The billing of the job
1645
+ */
1646
+ export interface Billing {
1647
+ cuCost: number;
1648
+
1649
+ cuDiscount: number;
1650
+ }
1651
+ }
1652
+ }
1653
+
1654
+ export interface JobListParams {
1655
+ /**
1656
+ * The authorId of the jobs to return. Optional.
1657
+ */
1658
+ authorId?: string;
1659
+
1660
+ /**
1661
+ * If false, jobs containing the hideResults param will be not returned. Optional.
1662
+ */
1663
+ hideResults?: string;
1664
+
1665
+ /**
1666
+ * The number of items to return in the response. The default value is 10, maximum
1667
+ * value is 200, minimum value is 1
1668
+ */
1669
+ pageSize?: string;
1670
+
1671
+ /**
1672
+ * A token you received in a previous request to query the next page of items
1673
+ */
1674
+ paginationToken?: string;
1675
+
1676
+ /**
1677
+ * The status of the jobs to return. Optional.
1678
+ */
1679
+ status?: string;
1680
+
1681
+ /**
1682
+ * The type of the jobs to return. If "types" is defined, "type" will be ignored.
1683
+ * Optional.
1684
+ */
1685
+ type?: string;
1686
+
1687
+ /**
1688
+ * The types of the jobs to return. If "types" is defined, "type" will be ignored.
1689
+ * Optional.
1690
+ */
1691
+ types?: string;
1692
+
1693
+ workflowId?: string;
1694
+ }
1695
+
1696
+ export interface JobTriggerActionParams {
1697
+ /**
1698
+ * The action to execute on the job, such as canceling it. Today only cancel on
1699
+ * inference jobs is supported.
1700
+ */
1701
+ action?: 'cancel';
1702
+ }
1703
+
1704
+ export declare namespace Jobs {
1705
+ export {
1706
+ type JobRetrieveResponse as JobRetrieveResponse,
1707
+ type JobListResponse as JobListResponse,
1708
+ type JobTriggerActionResponse as JobTriggerActionResponse,
1709
+ type JobListParams as JobListParams,
1710
+ type JobTriggerActionParams as JobTriggerActionParams,
1711
+ };
1712
+ }