@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,1242 @@
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
+
7
+ export class Usages extends APIResource {
8
+ /**
9
+ * Provide usage data for the given filters. Such as consumed compute units, number
10
+ * of assets generated, etc. Maximum time range with custom startDate and endDate
11
+ * is 120 days. Granularity is calculated based on the time range.
12
+ */
13
+ list(
14
+ query: UsageListParams | null | undefined = {},
15
+ options?: RequestOptions,
16
+ ): APIPromise<UsageListResponse> {
17
+ return this._client.get('/usages', { query, ...options });
18
+ }
19
+ }
20
+
21
+ export interface UsageListResponse {
22
+ activity?: Array<UsageListResponse.Activity>;
23
+
24
+ consumption?: Array<UsageListResponse.Consumption>;
25
+
26
+ entities?: UsageListResponse.Entities;
27
+
28
+ modelUsages?: Array<UsageListResponse.ModelUsage>;
29
+
30
+ usages?: Array<UsageListResponse.Usage>;
31
+ }
32
+
33
+ export namespace UsageListResponse {
34
+ /**
35
+ * Activity entries listed in the activities results order by time DESC Default
36
+ * limit of 100 entries. If you have 100 entries in your result, you can use the
37
+ * activityOffset parameter to get the next page of results. We recommend you to
38
+ * make the same request with type=activity only (to avoid reload everything) And
39
+ * apply the activityOffset=100 to get the next page of results. Contains basic
40
+ * infos about each relevant actions
41
+ */
42
+ export interface Activity {
43
+ /**
44
+ * The action name
45
+ */
46
+ action:
47
+ | 'asset'
48
+ | 'asset-privacy'
49
+ | 'background-removal'
50
+ | 'captioning'
51
+ | 'collection'
52
+ | 'collection-assets'
53
+ | 'collection-models'
54
+ | 'controlnet'
55
+ | 'controlnet-img2img'
56
+ | 'controlnet-inpaint'
57
+ | 'controlnet-ip-adapter'
58
+ | 'controlnet-texture'
59
+ | 'copy-asset'
60
+ | 'copy-model'
61
+ | 'creative-unit-cost'
62
+ | 'creative-unit-discount'
63
+ | 'custom'
64
+ | 'delete-asset'
65
+ | 'delete-collection'
66
+ | 'delete-collection-assets'
67
+ | 'delete-collection-models'
68
+ | 'delete-inference-image'
69
+ | 'delete-model'
70
+ | 'delete-model-preset'
71
+ | 'delete-oscu-auto-refill'
72
+ | 'delete-project-member'
73
+ | 'delete-subscription'
74
+ | 'delete-team-api-key'
75
+ | 'delete-team-invitations'
76
+ | 'delete-team-member'
77
+ | 'delete-training-images'
78
+ | 'describe-style'
79
+ | 'detection'
80
+ | 'download-assets'
81
+ | 'download-model'
82
+ | 'embed'
83
+ | 'generative-fill'
84
+ | 'image-prompt-editing'
85
+ | 'images-generation'
86
+ | 'img2img'
87
+ | 'img2img-ip-adapter'
88
+ | 'img2img-texture'
89
+ | 'inference'
90
+ | 'inpaint'
91
+ | 'inpaint-ip-adapter'
92
+ | 'model'
93
+ | 'model-preset'
94
+ | 'models-training'
95
+ | 'oscu'
96
+ | 'patch'
97
+ | 'pixelate'
98
+ | 'project'
99
+ | 'project-member'
100
+ | 'reframe'
101
+ | 'repaint'
102
+ | 'restyle'
103
+ | 'segmentation'
104
+ | 'skybox-base-360'
105
+ | 'skybox-upscale-360'
106
+ | 'start-train'
107
+ | 'subscription'
108
+ | 'subscription-seats'
109
+ | 'tag-asset'
110
+ | 'tag-model'
111
+ | 'team-api-key'
112
+ | 'team-member'
113
+ | 'texture'
114
+ | 'train-succeeded'
115
+ | 'training-images-to-model'
116
+ | 'transfer-model'
117
+ | 'txt2img'
118
+ | 'txt2img-ip-adapter'
119
+ | 'update-asset'
120
+ | 'update-collection'
121
+ | 'update-model'
122
+ | 'update-model-description'
123
+ | 'update-model-examples'
124
+ | 'update-oscu-auto-refill'
125
+ | 'update-project'
126
+ | 'update-subscription'
127
+ | 'update-team'
128
+ | 'update-team-member'
129
+ | 'upscale'
130
+ | 'vectorization';
131
+
132
+ /**
133
+ * The additional data of the action
134
+ */
135
+ data: Activity.Data;
136
+
137
+ /**
138
+ * The projectId of the project for this action
139
+ */
140
+ projectId: string;
141
+
142
+ /**
143
+ * The UTC ISO date of the point
144
+ */
145
+ time: string;
146
+
147
+ /**
148
+ * The unique identifier of the user for this action
149
+ */
150
+ userId: string;
151
+
152
+ /**
153
+ * The Compute Units cost for this action
154
+ */
155
+ creativeUnitsCost?: number;
156
+ }
157
+
158
+ export namespace Activity {
159
+ /**
160
+ * The additional data of the action
161
+ */
162
+ export interface Data {
163
+ /**
164
+ * The asset for this action
165
+ */
166
+ assetId?: string;
167
+
168
+ /**
169
+ * The collection for this action
170
+ */
171
+ collectionId?: string;
172
+
173
+ /**
174
+ * Whether the action is an API key action
175
+ */
176
+ isApiKey?: boolean;
177
+
178
+ /**
179
+ * The job for this action
180
+ */
181
+ jobId?: string;
182
+
183
+ /**
184
+ * The model for this action
185
+ */
186
+ modelId?: string;
187
+ }
188
+ }
189
+
190
+ /**
191
+ * Consumption entries sorted in descending order by consumption value.
192
+ *
193
+ * There is no limit on the number of entries
194
+ */
195
+ export interface Consumption {
196
+ /**
197
+ * The unique identifier of the user
198
+ */
199
+ userId: string;
200
+
201
+ /**
202
+ * The Compute Units consumption for the user
203
+ */
204
+ value: number;
205
+ }
206
+
207
+ export interface Entities {
208
+ assets?: Array<Entities.Asset>;
209
+
210
+ collections?: Array<Entities.Collection>;
211
+
212
+ jobs?: Array<Entities.Job>;
213
+
214
+ models?: Array<Entities.Model>;
215
+
216
+ users?: Array<Entities.User>;
217
+ }
218
+
219
+ export namespace Entities {
220
+ export interface Asset {
221
+ /**
222
+ * The asset ID
223
+ */
224
+ id: string;
225
+
226
+ /**
227
+ * The kind of the asset
228
+ */
229
+ kind: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
230
+
231
+ /**
232
+ * Partial metadata of the asset
233
+ */
234
+ metadata: Asset.Metadata;
235
+
236
+ /**
237
+ * The properties of the asset
238
+ */
239
+ properties: Asset.Properties;
240
+
241
+ /**
242
+ * The source of the asset
243
+ */
244
+ source:
245
+ | '3d23d'
246
+ | '3d23d:texture'
247
+ | '3d:texture'
248
+ | '3d:texture:albedo'
249
+ | '3d:texture:metallic'
250
+ | '3d:texture:mtl'
251
+ | '3d:texture:normal'
252
+ | '3d:texture:roughness'
253
+ | 'audio2audio'
254
+ | 'background-removal'
255
+ | 'canvas'
256
+ | 'canvas-drawing'
257
+ | 'canvas-export'
258
+ | 'detection'
259
+ | 'generative-fill'
260
+ | 'image-prompt-editing'
261
+ | 'img23d'
262
+ | 'img2img'
263
+ | 'img2video'
264
+ | 'inference-control-net'
265
+ | 'inference-control-net-img'
266
+ | 'inference-control-net-inpainting'
267
+ | 'inference-control-net-inpainting-ip-adapter'
268
+ | 'inference-control-net-ip-adapter'
269
+ | 'inference-control-net-reference'
270
+ | 'inference-control-net-texture'
271
+ | 'inference-img'
272
+ | 'inference-img-ip-adapter'
273
+ | 'inference-img-texture'
274
+ | 'inference-in-paint'
275
+ | 'inference-in-paint-ip-adapter'
276
+ | 'inference-reference'
277
+ | 'inference-reference-texture'
278
+ | 'inference-txt'
279
+ | 'inference-txt-ip-adapter'
280
+ | 'inference-txt-texture'
281
+ | 'patch'
282
+ | 'pixelization'
283
+ | 'reframe'
284
+ | 'restyle'
285
+ | 'segment'
286
+ | 'segmentation-image'
287
+ | 'segmentation-mask'
288
+ | 'skybox-3d'
289
+ | 'skybox-base-360'
290
+ | 'skybox-hdri'
291
+ | 'texture'
292
+ | 'texture:albedo'
293
+ | 'texture:ao'
294
+ | 'texture:edge'
295
+ | 'texture:height'
296
+ | 'texture:metallic'
297
+ | 'texture:normal'
298
+ | 'texture:smoothness'
299
+ | 'txt23d'
300
+ | 'txt2audio'
301
+ | 'txt2img'
302
+ | 'txt2video'
303
+ | 'unknown'
304
+ | 'uploaded'
305
+ | 'uploaded-3d'
306
+ | 'uploaded-audio'
307
+ | 'uploaded-avatar'
308
+ | 'uploaded-video'
309
+ | 'upscale'
310
+ | 'upscale-skybox'
311
+ | 'upscale-texture'
312
+ | 'upscale-video'
313
+ | 'vectorization'
314
+ | 'video2img'
315
+ | 'video2video';
316
+ }
317
+
318
+ export namespace Asset {
319
+ /**
320
+ * Partial metadata of the asset
321
+ */
322
+ export interface Metadata {
323
+ /**
324
+ * The type of the asset
325
+ */
326
+ type:
327
+ | '3d-texture'
328
+ | '3d-texture-albedo'
329
+ | '3d-texture-metallic'
330
+ | '3d-texture-mtl'
331
+ | '3d-texture-normal'
332
+ | '3d-texture-roughness'
333
+ | '3d23d'
334
+ | '3d23d-texture'
335
+ | 'audio2audio'
336
+ | 'background-removal'
337
+ | 'canvas'
338
+ | 'canvas-drawing'
339
+ | 'canvas-export'
340
+ | 'detection'
341
+ | 'generative-fill'
342
+ | 'image-prompt-editing'
343
+ | 'img23d'
344
+ | 'img2img'
345
+ | 'img2video'
346
+ | 'inference-controlnet'
347
+ | 'inference-controlnet-img2img'
348
+ | 'inference-controlnet-inpaint'
349
+ | 'inference-controlnet-inpaint-ip-adapter'
350
+ | 'inference-controlnet-ip-adapter'
351
+ | 'inference-controlnet-reference'
352
+ | 'inference-controlnet-texture'
353
+ | 'inference-img2img'
354
+ | 'inference-img2img-ip-adapter'
355
+ | 'inference-img2img-texture'
356
+ | 'inference-inpaint'
357
+ | 'inference-inpaint-ip-adapter'
358
+ | 'inference-reference'
359
+ | 'inference-reference-texture'
360
+ | 'inference-txt2img'
361
+ | 'inference-txt2img-ip-adapter'
362
+ | 'inference-txt2img-texture'
363
+ | 'patch'
364
+ | 'pixelization'
365
+ | 'reframe'
366
+ | 'restyle'
367
+ | 'segment'
368
+ | 'segmentation-image'
369
+ | 'segmentation-mask'
370
+ | 'skybox-3d'
371
+ | 'skybox-base-360'
372
+ | 'skybox-hdri'
373
+ | 'texture'
374
+ | 'texture-albedo'
375
+ | 'texture-ao'
376
+ | 'texture-edge'
377
+ | 'texture-height'
378
+ | 'texture-metallic'
379
+ | 'texture-normal'
380
+ | 'texture-smoothness'
381
+ | 'txt23d'
382
+ | 'txt2audio'
383
+ | 'txt2img'
384
+ | 'txt2video'
385
+ | 'unknown'
386
+ | 'uploaded'
387
+ | 'uploaded-3d'
388
+ | 'uploaded-audio'
389
+ | 'uploaded-avatar'
390
+ | 'uploaded-video'
391
+ | 'upscale'
392
+ | 'upscale-skybox'
393
+ | 'upscale-texture'
394
+ | 'upscale-video'
395
+ | 'vectorization'
396
+ | 'video2img'
397
+ | 'video2video';
398
+ }
399
+
400
+ /**
401
+ * The properties of the asset
402
+ */
403
+ export interface Properties {
404
+ size: number;
405
+
406
+ /**
407
+ * Number of animation frames if animations exist
408
+ */
409
+ animationFrameCount?: number;
410
+
411
+ /**
412
+ * Bitrate of the media in bits per second
413
+ */
414
+ bitrate?: number;
415
+
416
+ /**
417
+ * Number of bones if skeleton exists
418
+ */
419
+ boneCount?: number;
420
+
421
+ /**
422
+ * Number of channels of the audio
423
+ */
424
+ channels?: number;
425
+
426
+ /**
427
+ * Classification of the audio
428
+ */
429
+ classification?: 'effect' | 'interview' | 'music' | 'other' | 'sound' | 'speech' | 'text' | 'unknown';
430
+
431
+ /**
432
+ * Codec name of the media
433
+ */
434
+ codecName?: string;
435
+
436
+ /**
437
+ * Description of the audio
438
+ */
439
+ description?: string;
440
+
441
+ /**
442
+ * Bounding box dimensions [width, height, depth]
443
+ */
444
+ dimensions?: Array<unknown>;
445
+
446
+ /**
447
+ * Duration of the media in seconds
448
+ */
449
+ duration?: number;
450
+
451
+ /**
452
+ * Number of faces/triangles in the mesh
453
+ */
454
+ faceCount?: number;
455
+
456
+ /**
457
+ * Format of the mesh file (e.g. 'glb', etc.)
458
+ */
459
+ format?: string;
460
+
461
+ /**
462
+ * Frame rate of the video in frames per second
463
+ */
464
+ frameRate?: number;
465
+
466
+ /**
467
+ * Whether the mesh has animations
468
+ */
469
+ hasAnimations?: boolean;
470
+
471
+ /**
472
+ * Whether the mesh has normal vectors
473
+ */
474
+ hasNormals?: boolean;
475
+
476
+ /**
477
+ * Whether the mesh has bones/skeleton
478
+ */
479
+ hasSkeleton?: boolean;
480
+
481
+ /**
482
+ * Whether the mesh has UV coordinates
483
+ */
484
+ hasUVs?: boolean;
485
+
486
+ height?: number;
487
+
488
+ /**
489
+ * Number of frames in the video
490
+ */
491
+ nbFrames?: number;
492
+
493
+ /**
494
+ * Sample rate of the media in Hz
495
+ */
496
+ sampleRate?: number;
497
+
498
+ /**
499
+ * Transcription of the audio
500
+ */
501
+ transcription?: Properties.Transcription;
502
+
503
+ /**
504
+ * Number of vertices in the mesh
505
+ */
506
+ vertexCount?: number;
507
+
508
+ width?: number;
509
+ }
510
+
511
+ export namespace Properties {
512
+ /**
513
+ * Transcription of the audio
514
+ */
515
+ export interface Transcription {
516
+ text: string;
517
+ }
518
+ }
519
+ }
520
+
521
+ export interface Collection {
522
+ /**
523
+ * The collection ID
524
+ */
525
+ id: string;
526
+
527
+ /**
528
+ * The name of the collection
529
+ */
530
+ name: string;
531
+ }
532
+
533
+ export interface Job {
534
+ /**
535
+ * The job ID
536
+ */
537
+ id: string;
538
+
539
+ /**
540
+ * The job type
541
+ */
542
+ jobType:
543
+ | 'assets-download'
544
+ | 'canvas-export'
545
+ | 'caption'
546
+ | 'caption-llava'
547
+ | 'custom'
548
+ | 'describe-style'
549
+ | 'detection'
550
+ | 'embed'
551
+ | 'flux'
552
+ | 'flux-model-training'
553
+ | 'generate-prompt'
554
+ | 'image-generation'
555
+ | 'image-prompt-editing'
556
+ | 'inference'
557
+ | 'mesh-preview-rendering'
558
+ | 'model-download'
559
+ | 'model-import'
560
+ | 'model-training'
561
+ | 'openai-image-generation'
562
+ | 'patch-image'
563
+ | 'pixelate'
564
+ | 'reframe'
565
+ | 'remove-background'
566
+ | 'repaint'
567
+ | 'restyle'
568
+ | 'segment'
569
+ | 'skybox-3d'
570
+ | 'skybox-base-360'
571
+ | 'skybox-hdri'
572
+ | 'skybox-upscale-360'
573
+ | 'texture'
574
+ | 'translate'
575
+ | 'upload'
576
+ | 'upscale'
577
+ | 'upscale-skybox'
578
+ | 'upscale-texture'
579
+ | 'vectorize'
580
+ | 'workflow';
581
+
582
+ /**
583
+ * The metadata of the job
584
+ */
585
+ metadata: Job.Metadata;
586
+
587
+ /**
588
+ * The status of the job
589
+ */
590
+ status:
591
+ | 'canceled'
592
+ | 'failure'
593
+ | 'finalizing'
594
+ | 'in-progress'
595
+ | 'pending'
596
+ | 'queued'
597
+ | 'success'
598
+ | 'warming-up';
599
+ }
600
+
601
+ export namespace Job {
602
+ /**
603
+ * The metadata of the job
604
+ */
605
+ export interface Metadata {
606
+ /**
607
+ * List of produced assets for this job
608
+ */
609
+ assetIds?: Array<string>;
610
+
611
+ /**
612
+ * The flow of the job. Only available for workflow jobs.
613
+ */
614
+ flow?: Array<Metadata.Flow>;
615
+
616
+ /**
617
+ * The inputs for the job
618
+ */
619
+ input?: unknown;
620
+
621
+ /**
622
+ * The output of the job
623
+ */
624
+ output?: unknown;
625
+
626
+ /**
627
+ * The workflow ID of the job if job is part of a workflow.
628
+ */
629
+ workflowId?: string;
630
+
631
+ /**
632
+ * The workflow job ID of the job if job is part of a workflow job.
633
+ */
634
+ workflowJobId?: string;
635
+ }
636
+
637
+ export namespace Metadata {
638
+ export interface Flow {
639
+ /**
640
+ * The id of the node.
641
+ */
642
+ id: string;
643
+
644
+ /**
645
+ * The status of the node. Only available for WorkflowJob nodes.
646
+ */
647
+ status: 'failure' | 'pending' | 'processing' | 'skipped' | 'success';
648
+
649
+ /**
650
+ * The type of the job for the node.
651
+ */
652
+ type:
653
+ | 'custom-model'
654
+ | 'generate-prompt'
655
+ | 'logic'
656
+ | 'remove-background'
657
+ | 'transform'
658
+ | 'user-approval'
659
+ | 'workflow';
660
+
661
+ /**
662
+ * List of produced assets for this node.
663
+ */
664
+ assets?: Array<Flow.Asset>;
665
+
666
+ /**
667
+ * The nodes that this node depends on. Only available for nodes that have
668
+ * dependencies. Mainly used for user approval nodes.
669
+ */
670
+ dependsOn?: Array<string>;
671
+
672
+ /**
673
+ * The inputs of the node.
674
+ */
675
+ inputs?: Array<Flow.Input>;
676
+
677
+ /**
678
+ * If the flow is part of a WorkflowJob, this is the jobId for the node. jobId is
679
+ * only available for nodes started. A node "Pending" for a running workflow job is
680
+ * not started.
681
+ */
682
+ jobId?: string;
683
+
684
+ /**
685
+ * The logic of the node. Only available for logic nodes.
686
+ */
687
+ logic?: Flow.Logic;
688
+
689
+ /**
690
+ * The type of the logic for the node. Only available for logic nodes.
691
+ */
692
+ logicType?: 'if-else';
693
+
694
+ /**
695
+ * The model id for the node. Mainly used for custom model tasks.
696
+ */
697
+ modelId?: string;
698
+
699
+ /**
700
+ * The workflow id for the node. Mainly used for workflow tasks.
701
+ */
702
+ workflowId?: string;
703
+ }
704
+
705
+ export namespace Flow {
706
+ export interface Asset {
707
+ assetId: string;
708
+
709
+ url: string;
710
+ }
711
+
712
+ /**
713
+ * This is used to run the flow.
714
+ */
715
+ export interface Input {
716
+ /**
717
+ * The name that must be user to call the model through the API
718
+ */
719
+ name: string;
720
+
721
+ /**
722
+ * The data type of the input
723
+ */
724
+ type:
725
+ | 'boolean'
726
+ | 'file'
727
+ | 'file_array'
728
+ | 'inputs_array'
729
+ | 'model'
730
+ | 'model_array'
731
+ | 'number'
732
+ | 'number_array'
733
+ | 'string'
734
+ | 'string_array';
735
+
736
+ /**
737
+ * The allowed values for the input. For \`string\` or \`number\` types, creates a
738
+ * single-select dropdown. For \`string_array\` type, creates a multi-select
739
+ * dropdown.
740
+ */
741
+ allowedValues?: Array<unknown>;
742
+
743
+ /**
744
+ * Specifies the background behavior for the input. Only available for \`file\` and
745
+ * \`file_array\` input types with kind \`image\`.
746
+ */
747
+ backgroundBehavior?: 'opaque' | 'transparent';
748
+
749
+ /**
750
+ * Whether the input is a color or not. Only available for \`string\` input type.
751
+ */
752
+ color?: boolean;
753
+
754
+ /**
755
+ * Whether this input affects the model's cost calculation
756
+ */
757
+ costImpact?: boolean;
758
+
759
+ /**
760
+ * Help text displayed in the UI to provide additional information about the input
761
+ */
762
+ description?: string;
763
+
764
+ /**
765
+ * Used to visually group inputs together in the UI. Inputs with the same group
766
+ * value appear consecutively in the UI.
767
+ */
768
+ group?: string;
769
+
770
+ /**
771
+ * Hint text displayed in the UI as a tooltip to guide the user
772
+ */
773
+ hint?: string;
774
+
775
+ /**
776
+ * The list of inputs which form an object within a container array. All inputs are
777
+ * the same as the current object. This is only available for type inputs_array
778
+ * inputs.
779
+ */
780
+ inputs?: Array<unknown>;
781
+
782
+ /**
783
+ * The asset kind of the input. Only taken into account for \`file\` and
784
+ * \`file_array\` input types.
785
+ */
786
+ kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
787
+
788
+ /**
789
+ * The label displayed in the UI for this input
790
+ */
791
+ label?: string;
792
+
793
+ /**
794
+ * The name of the file input field to use as the mask source
795
+ */
796
+ maskFrom?: string;
797
+
798
+ /**
799
+ * The maximum allowed value. Only available for \`number\` and \`array\` input
800
+ * types.
801
+ */
802
+ max?: number;
803
+
804
+ /**
805
+ * The maximum allowed length for \`string\` inputs. Also applies to each item in
806
+ * \`string_array\`.
807
+ */
808
+ maxLength?: number;
809
+
810
+ /**
811
+ * The minimum allowed value. Only available for \`number\` and array input types.
812
+ */
813
+ min?: number;
814
+
815
+ /**
816
+ * The minimum allowed length for string inputs. Also applies to each item in
817
+ * \`string_array\`.
818
+ */
819
+ minLength?: number;
820
+
821
+ /**
822
+ * The allowed model types for this input. Example: \`["flux.1-lora"]\`. Only
823
+ * available for \`model_array\` input type.
824
+ */
825
+ modelTypes?: Array<
826
+ | 'custom'
827
+ | 'flux.1'
828
+ | 'flux.1-composition'
829
+ | 'flux.1-kontext-dev'
830
+ | 'flux.1-kontext-lora'
831
+ | 'flux.1-krea-dev'
832
+ | 'flux.1-krea-lora'
833
+ | 'flux.1-lora'
834
+ | 'flux.1-pro'
835
+ | 'flux.1.1-pro-ultra'
836
+ | 'flux1.1-pro'
837
+ | 'gpt-image-1'
838
+ | 'sd-1_5'
839
+ | 'sd-1_5-composition'
840
+ | 'sd-1_5-lora'
841
+ | 'sd-xl'
842
+ | 'sd-xl-composition'
843
+ | 'sd-xl-lora'
844
+ >;
845
+
846
+ /**
847
+ * Whether this input represents a parent asset to assign to the produced assets.
848
+ * Only available for \`file\` and \`file_array\` input types.
849
+ *
850
+ * For \`file_array\`, the parent asset is the first item in the array.
851
+ */
852
+ parent?: boolean;
853
+
854
+ /**
855
+ * Placeholder text for the input. Only available for 'string' input type.
856
+ */
857
+ placeholder?: string;
858
+
859
+ /**
860
+ * Whether the input is a prompt. When true, displays as a text area with prompt
861
+ * spark feature. Only available for \`string\` input type.
862
+ */
863
+ prompt?: boolean;
864
+
865
+ /**
866
+ * Whether the input is used with prompt spark. Only available for \`string\` input
867
+ * type.
868
+ */
869
+ promptSpark?: boolean;
870
+
871
+ /**
872
+ * The reference to another input or output of the same workflow. Must have at
873
+ * least one of node or conditional.
874
+ */
875
+ ref?: Input.Ref;
876
+
877
+ /**
878
+ * Set of rules that describes when this input is required:
879
+ *
880
+ * - \`always\`: Input is always required
881
+ * - \`ifNotDefined\`: Input is required when another specified input is not
882
+ * defined
883
+ * - \`ifDefined\`: Input is required when another specified input is defined
884
+ * - \`conditionalValues\`: Input is required when another input has a specific
885
+ * value
886
+ *
887
+ * By default, the input is not required.
888
+ */
889
+ required?: Input.Required;
890
+
891
+ /**
892
+ * The step increment for numeric inputs. Only available for \`number\` input type.
893
+ */
894
+ step?: number;
895
+ }
896
+
897
+ export namespace Input {
898
+ /**
899
+ * The reference to another input or output of the same workflow. Must have at
900
+ * least one of node or conditional.
901
+ */
902
+ export interface Ref {
903
+ /**
904
+ * The conditional nodes to reference. If the conditional nodes are successful, the
905
+ * node will be successful. If the conditional nodes are skipped, the node will be
906
+ * skipped. Contains an array of node ids used to check the status of the nodes.
907
+ */
908
+ conditional?: Array<string>;
909
+
910
+ /**
911
+ * This is the desired node output value if ref is an if/else node.
912
+ */
913
+ equal?: string;
914
+
915
+ /**
916
+ * The name of the input or output to reference. If the type is 'workflow', the
917
+ * name is the name of the input of the workflow is required If the type is 'node',
918
+ * the name is not mandatory, except if you want all outputs of the node. To get
919
+ * all outputs of a node, you can use the name 'all'.
920
+ */
921
+ name?: string;
922
+
923
+ /**
924
+ * The node id or 'workflow' if the source is a workflow input.
925
+ */
926
+ node?: string;
927
+ }
928
+
929
+ /**
930
+ * Set of rules that describes when this input is required:
931
+ *
932
+ * - \`always\`: Input is always required
933
+ * - \`ifNotDefined\`: Input is required when another specified input is not
934
+ * defined
935
+ * - \`ifDefined\`: Input is required when another specified input is defined
936
+ * - \`conditionalValues\`: Input is required when another input has a specific
937
+ * value
938
+ *
939
+ * By default, the input is not required.
940
+ */
941
+ export interface Required {
942
+ /**
943
+ * Whether the input is always required
944
+ */
945
+ always?: boolean;
946
+
947
+ /**
948
+ * Makes this input required when another input has a specific value:
949
+ *
950
+ * - Key: name of the input to check
951
+ * - Value: operation and allowed values that trigger the requirement
952
+ */
953
+ conditionalValues?: unknown;
954
+
955
+ /**
956
+ * Makes this input required when another input is defined:
957
+ *
958
+ * - Key: name of the input that must be defined
959
+ * - Value: message to display when this input is required
960
+ */
961
+ ifDefined?: unknown;
962
+
963
+ /**
964
+ * Makes this input required when another input is not defined:
965
+ *
966
+ * - Key: name of the input that must be undefined
967
+ * - Value: message to display when this input is required
968
+ */
969
+ ifNotDefined?: unknown;
970
+ }
971
+ }
972
+
973
+ /**
974
+ * The logic of the node. Only available for logic nodes.
975
+ */
976
+ export interface Logic {
977
+ /**
978
+ * The cases of the logic. Only available for if/else nodes.
979
+ */
980
+ cases?: Array<Logic.Case>;
981
+
982
+ /**
983
+ * The default case of the logic. Contains the id/output of the node to execute if
984
+ * no case is matched. Only available for if/else nodes.
985
+ */
986
+ default?: string;
987
+
988
+ /**
989
+ * The transform of the logic. Only available for transform nodes.
990
+ */
991
+ transform?: string;
992
+ }
993
+
994
+ export namespace Logic {
995
+ export interface Case {
996
+ condition: string;
997
+
998
+ value: string;
999
+ }
1000
+ }
1001
+ }
1002
+ }
1003
+ }
1004
+
1005
+ export interface Model {
1006
+ /**
1007
+ * The model ID
1008
+ */
1009
+ id: string;
1010
+
1011
+ /**
1012
+ * The name of the model
1013
+ */
1014
+ name: string;
1015
+
1016
+ /**
1017
+ * The short description of the model
1018
+ */
1019
+ shortDescription?: string;
1020
+ }
1021
+
1022
+ export interface User {
1023
+ /**
1024
+ * The user ID
1025
+ */
1026
+ id: string;
1027
+
1028
+ /**
1029
+ * Whether the user is an API key
1030
+ */
1031
+ isApiKey: boolean;
1032
+
1033
+ /**
1034
+ * The API key ID
1035
+ *
1036
+ * Will be available:
1037
+ *
1038
+ * - if the user is an API key
1039
+ */
1040
+ apiKeyId?: string;
1041
+
1042
+ /**
1043
+ * The API key status
1044
+ *
1045
+ * Will be available:
1046
+ *
1047
+ * - if the user is an API key
1048
+ */
1049
+ apiKeyStatus?: 'active' | 'deleted' | 'inactive';
1050
+
1051
+ /**
1052
+ * The user avatar
1053
+ *
1054
+ * Will be available:
1055
+ *
1056
+ * - if the user hasn't left the Scenario platform
1057
+ * - if the user isn't an API key
1058
+ */
1059
+ avatar?: User.Avatar;
1060
+
1061
+ /**
1062
+ * The email of the user
1063
+ *
1064
+ * Will be available:
1065
+ *
1066
+ * - if the user hasn't left the Scenario platform
1067
+ * - if the user isn't an API key
1068
+ */
1069
+ email?: string;
1070
+
1071
+ /**
1072
+ * The full name of the user
1073
+ *
1074
+ * Will be available:
1075
+ *
1076
+ * - if the user hasn't left the Scenario platform
1077
+ * - if the user isn't an API key
1078
+ */
1079
+ fullName?: string;
1080
+ }
1081
+
1082
+ export namespace User {
1083
+ /**
1084
+ * The user avatar
1085
+ *
1086
+ * Will be available:
1087
+ *
1088
+ * - if the user hasn't left the Scenario platform
1089
+ * - if the user isn't an API key
1090
+ */
1091
+ export interface Avatar {
1092
+ /**
1093
+ * ID of the asset used as thumbnail if provided, otherwise undefined
1094
+ */
1095
+ assetId?: string;
1096
+
1097
+ /**
1098
+ * Signed URL of the assetId or free url if assetId is undefined
1099
+ */
1100
+ url?: string;
1101
+ }
1102
+ }
1103
+ }
1104
+
1105
+ export interface ModelUsage {
1106
+ modelId: string;
1107
+
1108
+ /**
1109
+ * The data points
1110
+ */
1111
+ points: Array<ModelUsage.Point>;
1112
+ }
1113
+
1114
+ export namespace ModelUsage {
1115
+ export interface Point {
1116
+ /**
1117
+ * Cost for model usage
1118
+ */
1119
+ cost: number;
1120
+
1121
+ /**
1122
+ * The discount for model usage
1123
+ */
1124
+ discount: number;
1125
+
1126
+ /**
1127
+ * Number of jobs for the model usage
1128
+ */
1129
+ jobs: number;
1130
+
1131
+ /**
1132
+ * The UTC ISO date of the point
1133
+ */
1134
+ time: string;
1135
+ }
1136
+ }
1137
+
1138
+ export interface Usage {
1139
+ /**
1140
+ * Granularity for points (example: "1d", "1h", "1m", "15m")
1141
+ */
1142
+ granularity: '15m' | '1d' | '1h' | '1m' | '30m' | '5m' | '7d';
1143
+
1144
+ /**
1145
+ * The usage data points
1146
+ */
1147
+ points: Array<Usage.Point>;
1148
+
1149
+ /**
1150
+ * Name of the usage points (example: "images-generation", "generators-training",
1151
+ * "background-removal", "upscale", ...)
1152
+ */
1153
+ usageName:
1154
+ | 'background-removal'
1155
+ | 'captioning'
1156
+ | 'creative-unit-cost'
1157
+ | 'creative-unit-discount'
1158
+ | 'custom'
1159
+ | 'detection'
1160
+ | 'image-prompt-editing'
1161
+ | 'images-generation'
1162
+ | 'models-training'
1163
+ | 'patch'
1164
+ | 'pixelate'
1165
+ | 'repaint'
1166
+ | 'restyle'
1167
+ | 'segmentation'
1168
+ | 'skybox-base-360'
1169
+ | 'skybox-upscale-360'
1170
+ | 'texture'
1171
+ | 'upscale'
1172
+ | 'vectorization';
1173
+ }
1174
+
1175
+ export namespace Usage {
1176
+ export interface Point {
1177
+ /**
1178
+ * The UTC ISO date of the point
1179
+ */
1180
+ time: string;
1181
+
1182
+ /**
1183
+ * Value of the point
1184
+ */
1185
+ value: string;
1186
+ }
1187
+ }
1188
+ }
1189
+
1190
+ export interface UsageListParams {
1191
+ /**
1192
+ * The offset for the activity data. Default is 0. If bad offset or empty, 0 will
1193
+ * be returned. Must be a positive integer.
1194
+ */
1195
+ activityOffset?: string;
1196
+
1197
+ /**
1198
+ * The end date of the usage in ISO 8601 format. If not provided, use default
1199
+ * timeRange. If provided, startDate is required.
1200
+ */
1201
+ endDate?: string;
1202
+
1203
+ /**
1204
+ * The project ids for filtering the usage data. If not provided, use all projects.
1205
+ * Can be one or more comma separated values.
1206
+ */
1207
+ projectIds?: string;
1208
+
1209
+ /**
1210
+ * The start date of the usage in ISO 8601 format. If not provided, use default
1211
+ * timeRange. If provided, endDate is required.
1212
+ */
1213
+ startDate?: string;
1214
+
1215
+ /**
1216
+ * The time range of the usage. If not provided, use default timeRange. If
1217
+ * startDate and endDate provided, timeRange is ignored.
1218
+ */
1219
+ timeRange?: string;
1220
+
1221
+ /**
1222
+ * The type of the usage data. Can be one or more comma separated values. Default
1223
+ * is all types. If bad type or empty, all types will be returned.
1224
+ */
1225
+ type?: string;
1226
+
1227
+ /**
1228
+ * The unique identifier of the user for the usage. If not provided, returns all
1229
+ * usages for the team.
1230
+ */
1231
+ userId?: string;
1232
+
1233
+ /**
1234
+ * The unique identifiers of the users for filtering the usage data. If not
1235
+ * provided, use all users. Can be one or more comma separated values.
1236
+ */
1237
+ userIds?: string;
1238
+ }
1239
+
1240
+ export declare namespace Usages {
1241
+ export { type UsageListResponse as UsageListResponse, type UsageListParams as UsageListParams };
1242
+ }