@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,760 @@
1
+ import { APIResource } from "../core/resource.js";
2
+ import { APIPromise } from "../core/api-promise.js";
3
+ import { RequestOptions } from "../internal/request-options.js";
4
+ export declare class Usages extends APIResource {
5
+ /**
6
+ * Provide usage data for the given filters. Such as consumed compute units, number
7
+ * of assets generated, etc. Maximum time range with custom startDate and endDate
8
+ * is 120 days. Granularity is calculated based on the time range.
9
+ */
10
+ list(query?: UsageListParams | null | undefined, options?: RequestOptions): APIPromise<UsageListResponse>;
11
+ }
12
+ export interface UsageListResponse {
13
+ activity?: Array<UsageListResponse.Activity>;
14
+ consumption?: Array<UsageListResponse.Consumption>;
15
+ entities?: UsageListResponse.Entities;
16
+ modelUsages?: Array<UsageListResponse.ModelUsage>;
17
+ usages?: Array<UsageListResponse.Usage>;
18
+ }
19
+ export declare namespace UsageListResponse {
20
+ /**
21
+ * Activity entries listed in the activities results order by time DESC Default
22
+ * limit of 100 entries. If you have 100 entries in your result, you can use the
23
+ * activityOffset parameter to get the next page of results. We recommend you to
24
+ * make the same request with type=activity only (to avoid reload everything) And
25
+ * apply the activityOffset=100 to get the next page of results. Contains basic
26
+ * infos about each relevant actions
27
+ */
28
+ interface Activity {
29
+ /**
30
+ * The action name
31
+ */
32
+ action: 'asset' | 'asset-privacy' | 'background-removal' | 'captioning' | 'collection' | 'collection-assets' | 'collection-models' | 'controlnet' | 'controlnet-img2img' | 'controlnet-inpaint' | 'controlnet-ip-adapter' | 'controlnet-texture' | 'copy-asset' | 'copy-model' | 'creative-unit-cost' | 'creative-unit-discount' | 'custom' | 'delete-asset' | 'delete-collection' | 'delete-collection-assets' | 'delete-collection-models' | 'delete-inference-image' | 'delete-model' | 'delete-model-preset' | 'delete-oscu-auto-refill' | 'delete-project-member' | 'delete-subscription' | 'delete-team-api-key' | 'delete-team-invitations' | 'delete-team-member' | 'delete-training-images' | 'describe-style' | 'detection' | 'download-assets' | 'download-model' | 'embed' | 'generative-fill' | 'image-prompt-editing' | 'images-generation' | 'img2img' | 'img2img-ip-adapter' | 'img2img-texture' | 'inference' | 'inpaint' | 'inpaint-ip-adapter' | 'model' | 'model-preset' | 'models-training' | 'oscu' | 'patch' | 'pixelate' | 'project' | 'project-member' | 'reframe' | 'repaint' | 'restyle' | 'segmentation' | 'skybox-base-360' | 'skybox-upscale-360' | 'start-train' | 'subscription' | 'subscription-seats' | 'tag-asset' | 'tag-model' | 'team-api-key' | 'team-member' | 'texture' | 'train-succeeded' | 'training-images-to-model' | 'transfer-model' | 'txt2img' | 'txt2img-ip-adapter' | 'update-asset' | 'update-collection' | 'update-model' | 'update-model-description' | 'update-model-examples' | 'update-oscu-auto-refill' | 'update-project' | 'update-subscription' | 'update-team' | 'update-team-member' | 'upscale' | 'vectorization';
33
+ /**
34
+ * The additional data of the action
35
+ */
36
+ data: Activity.Data;
37
+ /**
38
+ * The projectId of the project for this action
39
+ */
40
+ projectId: string;
41
+ /**
42
+ * The UTC ISO date of the point
43
+ */
44
+ time: string;
45
+ /**
46
+ * The unique identifier of the user for this action
47
+ */
48
+ userId: string;
49
+ /**
50
+ * The Compute Units cost for this action
51
+ */
52
+ creativeUnitsCost?: number;
53
+ }
54
+ namespace Activity {
55
+ /**
56
+ * The additional data of the action
57
+ */
58
+ interface Data {
59
+ /**
60
+ * The asset for this action
61
+ */
62
+ assetId?: string;
63
+ /**
64
+ * The collection for this action
65
+ */
66
+ collectionId?: string;
67
+ /**
68
+ * Whether the action is an API key action
69
+ */
70
+ isApiKey?: boolean;
71
+ /**
72
+ * The job for this action
73
+ */
74
+ jobId?: string;
75
+ /**
76
+ * The model for this action
77
+ */
78
+ modelId?: string;
79
+ }
80
+ }
81
+ /**
82
+ * Consumption entries sorted in descending order by consumption value.
83
+ *
84
+ * There is no limit on the number of entries
85
+ */
86
+ interface Consumption {
87
+ /**
88
+ * The unique identifier of the user
89
+ */
90
+ userId: string;
91
+ /**
92
+ * The Compute Units consumption for the user
93
+ */
94
+ value: number;
95
+ }
96
+ interface Entities {
97
+ assets?: Array<Entities.Asset>;
98
+ collections?: Array<Entities.Collection>;
99
+ jobs?: Array<Entities.Job>;
100
+ models?: Array<Entities.Model>;
101
+ users?: Array<Entities.User>;
102
+ }
103
+ namespace Entities {
104
+ interface Asset {
105
+ /**
106
+ * The asset ID
107
+ */
108
+ id: string;
109
+ /**
110
+ * The kind of the asset
111
+ */
112
+ kind: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
113
+ /**
114
+ * Partial metadata of the asset
115
+ */
116
+ metadata: Asset.Metadata;
117
+ /**
118
+ * The properties of the asset
119
+ */
120
+ properties: Asset.Properties;
121
+ /**
122
+ * The source of the asset
123
+ */
124
+ source: '3d23d' | '3d23d:texture' | '3d:texture' | '3d:texture:albedo' | '3d:texture:metallic' | '3d:texture:mtl' | '3d:texture:normal' | '3d:texture:roughness' | 'audio2audio' | 'background-removal' | 'canvas' | 'canvas-drawing' | 'canvas-export' | 'detection' | 'generative-fill' | 'image-prompt-editing' | 'img23d' | 'img2img' | 'img2video' | 'inference-control-net' | 'inference-control-net-img' | 'inference-control-net-inpainting' | 'inference-control-net-inpainting-ip-adapter' | 'inference-control-net-ip-adapter' | 'inference-control-net-reference' | 'inference-control-net-texture' | 'inference-img' | 'inference-img-ip-adapter' | 'inference-img-texture' | 'inference-in-paint' | 'inference-in-paint-ip-adapter' | 'inference-reference' | 'inference-reference-texture' | 'inference-txt' | 'inference-txt-ip-adapter' | 'inference-txt-texture' | 'patch' | 'pixelization' | 'reframe' | 'restyle' | 'segment' | 'segmentation-image' | 'segmentation-mask' | 'skybox-3d' | 'skybox-base-360' | 'skybox-hdri' | 'texture' | 'texture:albedo' | 'texture:ao' | 'texture:edge' | 'texture:height' | 'texture:metallic' | 'texture:normal' | 'texture:smoothness' | 'txt23d' | 'txt2audio' | 'txt2img' | 'txt2video' | 'unknown' | 'uploaded' | 'uploaded-3d' | 'uploaded-audio' | 'uploaded-avatar' | 'uploaded-video' | 'upscale' | 'upscale-skybox' | 'upscale-texture' | 'upscale-video' | 'vectorization' | 'video2img' | 'video2video';
125
+ }
126
+ namespace Asset {
127
+ /**
128
+ * Partial metadata of the asset
129
+ */
130
+ interface Metadata {
131
+ /**
132
+ * The type of the asset
133
+ */
134
+ type: '3d-texture' | '3d-texture-albedo' | '3d-texture-metallic' | '3d-texture-mtl' | '3d-texture-normal' | '3d-texture-roughness' | '3d23d' | '3d23d-texture' | 'audio2audio' | 'background-removal' | 'canvas' | 'canvas-drawing' | 'canvas-export' | 'detection' | 'generative-fill' | 'image-prompt-editing' | 'img23d' | 'img2img' | 'img2video' | 'inference-controlnet' | 'inference-controlnet-img2img' | 'inference-controlnet-inpaint' | 'inference-controlnet-inpaint-ip-adapter' | 'inference-controlnet-ip-adapter' | 'inference-controlnet-reference' | 'inference-controlnet-texture' | 'inference-img2img' | 'inference-img2img-ip-adapter' | 'inference-img2img-texture' | 'inference-inpaint' | 'inference-inpaint-ip-adapter' | 'inference-reference' | 'inference-reference-texture' | 'inference-txt2img' | 'inference-txt2img-ip-adapter' | 'inference-txt2img-texture' | 'patch' | 'pixelization' | 'reframe' | 'restyle' | 'segment' | 'segmentation-image' | 'segmentation-mask' | 'skybox-3d' | 'skybox-base-360' | 'skybox-hdri' | 'texture' | 'texture-albedo' | 'texture-ao' | 'texture-edge' | 'texture-height' | 'texture-metallic' | 'texture-normal' | 'texture-smoothness' | 'txt23d' | 'txt2audio' | 'txt2img' | 'txt2video' | 'unknown' | 'uploaded' | 'uploaded-3d' | 'uploaded-audio' | 'uploaded-avatar' | 'uploaded-video' | 'upscale' | 'upscale-skybox' | 'upscale-texture' | 'upscale-video' | 'vectorization' | 'video2img' | 'video2video';
135
+ }
136
+ /**
137
+ * The properties of the asset
138
+ */
139
+ interface Properties {
140
+ size: number;
141
+ /**
142
+ * Number of animation frames if animations exist
143
+ */
144
+ animationFrameCount?: number;
145
+ /**
146
+ * Bitrate of the media in bits per second
147
+ */
148
+ bitrate?: number;
149
+ /**
150
+ * Number of bones if skeleton exists
151
+ */
152
+ boneCount?: number;
153
+ /**
154
+ * Number of channels of the audio
155
+ */
156
+ channels?: number;
157
+ /**
158
+ * Classification of the audio
159
+ */
160
+ classification?: 'effect' | 'interview' | 'music' | 'other' | 'sound' | 'speech' | 'text' | 'unknown';
161
+ /**
162
+ * Codec name of the media
163
+ */
164
+ codecName?: string;
165
+ /**
166
+ * Description of the audio
167
+ */
168
+ description?: string;
169
+ /**
170
+ * Bounding box dimensions [width, height, depth]
171
+ */
172
+ dimensions?: Array<unknown>;
173
+ /**
174
+ * Duration of the media in seconds
175
+ */
176
+ duration?: number;
177
+ /**
178
+ * Number of faces/triangles in the mesh
179
+ */
180
+ faceCount?: number;
181
+ /**
182
+ * Format of the mesh file (e.g. 'glb', etc.)
183
+ */
184
+ format?: string;
185
+ /**
186
+ * Frame rate of the video in frames per second
187
+ */
188
+ frameRate?: number;
189
+ /**
190
+ * Whether the mesh has animations
191
+ */
192
+ hasAnimations?: boolean;
193
+ /**
194
+ * Whether the mesh has normal vectors
195
+ */
196
+ hasNormals?: boolean;
197
+ /**
198
+ * Whether the mesh has bones/skeleton
199
+ */
200
+ hasSkeleton?: boolean;
201
+ /**
202
+ * Whether the mesh has UV coordinates
203
+ */
204
+ hasUVs?: boolean;
205
+ height?: number;
206
+ /**
207
+ * Number of frames in the video
208
+ */
209
+ nbFrames?: number;
210
+ /**
211
+ * Sample rate of the media in Hz
212
+ */
213
+ sampleRate?: number;
214
+ /**
215
+ * Transcription of the audio
216
+ */
217
+ transcription?: Properties.Transcription;
218
+ /**
219
+ * Number of vertices in the mesh
220
+ */
221
+ vertexCount?: number;
222
+ width?: number;
223
+ }
224
+ namespace Properties {
225
+ /**
226
+ * Transcription of the audio
227
+ */
228
+ interface Transcription {
229
+ text: string;
230
+ }
231
+ }
232
+ }
233
+ interface Collection {
234
+ /**
235
+ * The collection ID
236
+ */
237
+ id: string;
238
+ /**
239
+ * The name of the collection
240
+ */
241
+ name: string;
242
+ }
243
+ interface Job {
244
+ /**
245
+ * The job ID
246
+ */
247
+ id: string;
248
+ /**
249
+ * The job type
250
+ */
251
+ jobType: 'assets-download' | 'canvas-export' | 'caption' | 'caption-llava' | 'custom' | 'describe-style' | 'detection' | 'embed' | 'flux' | 'flux-model-training' | 'generate-prompt' | 'image-generation' | 'image-prompt-editing' | 'inference' | 'mesh-preview-rendering' | 'model-download' | 'model-import' | 'model-training' | 'openai-image-generation' | 'patch-image' | 'pixelate' | 'reframe' | 'remove-background' | 'repaint' | 'restyle' | 'segment' | 'skybox-3d' | 'skybox-base-360' | 'skybox-hdri' | 'skybox-upscale-360' | 'texture' | 'translate' | 'upload' | 'upscale' | 'upscale-skybox' | 'upscale-texture' | 'vectorize' | 'workflow';
252
+ /**
253
+ * The metadata of the job
254
+ */
255
+ metadata: Job.Metadata;
256
+ /**
257
+ * The status of the job
258
+ */
259
+ status: 'canceled' | 'failure' | 'finalizing' | 'in-progress' | 'pending' | 'queued' | 'success' | 'warming-up';
260
+ }
261
+ namespace Job {
262
+ /**
263
+ * The metadata of the job
264
+ */
265
+ interface Metadata {
266
+ /**
267
+ * List of produced assets for this job
268
+ */
269
+ assetIds?: Array<string>;
270
+ /**
271
+ * The flow of the job. Only available for workflow jobs.
272
+ */
273
+ flow?: Array<Metadata.Flow>;
274
+ /**
275
+ * The inputs for the job
276
+ */
277
+ input?: unknown;
278
+ /**
279
+ * The output of the job
280
+ */
281
+ output?: unknown;
282
+ /**
283
+ * The workflow ID of the job if job is part of a workflow.
284
+ */
285
+ workflowId?: string;
286
+ /**
287
+ * The workflow job ID of the job if job is part of a workflow job.
288
+ */
289
+ workflowJobId?: string;
290
+ }
291
+ namespace Metadata {
292
+ interface Flow {
293
+ /**
294
+ * The id of the node.
295
+ */
296
+ id: string;
297
+ /**
298
+ * The status of the node. Only available for WorkflowJob nodes.
299
+ */
300
+ status: 'failure' | 'pending' | 'processing' | 'skipped' | 'success';
301
+ /**
302
+ * The type of the job for the node.
303
+ */
304
+ type: 'custom-model' | 'generate-prompt' | 'logic' | 'remove-background' | 'transform' | 'user-approval' | 'workflow';
305
+ /**
306
+ * List of produced assets for this node.
307
+ */
308
+ assets?: Array<Flow.Asset>;
309
+ /**
310
+ * The nodes that this node depends on. Only available for nodes that have
311
+ * dependencies. Mainly used for user approval nodes.
312
+ */
313
+ dependsOn?: Array<string>;
314
+ /**
315
+ * The inputs of the node.
316
+ */
317
+ inputs?: Array<Flow.Input>;
318
+ /**
319
+ * If the flow is part of a WorkflowJob, this is the jobId for the node. jobId is
320
+ * only available for nodes started. A node "Pending" for a running workflow job is
321
+ * not started.
322
+ */
323
+ jobId?: string;
324
+ /**
325
+ * The logic of the node. Only available for logic nodes.
326
+ */
327
+ logic?: Flow.Logic;
328
+ /**
329
+ * The type of the logic for the node. Only available for logic nodes.
330
+ */
331
+ logicType?: 'if-else';
332
+ /**
333
+ * The model id for the node. Mainly used for custom model tasks.
334
+ */
335
+ modelId?: string;
336
+ /**
337
+ * The workflow id for the node. Mainly used for workflow tasks.
338
+ */
339
+ workflowId?: string;
340
+ }
341
+ namespace Flow {
342
+ interface Asset {
343
+ assetId: string;
344
+ url: string;
345
+ }
346
+ /**
347
+ * This is used to run the flow.
348
+ */
349
+ interface Input {
350
+ /**
351
+ * The name that must be user to call the model through the API
352
+ */
353
+ name: string;
354
+ /**
355
+ * The data type of the input
356
+ */
357
+ type: 'boolean' | 'file' | 'file_array' | 'inputs_array' | 'model' | 'model_array' | 'number' | 'number_array' | 'string' | 'string_array';
358
+ /**
359
+ * The allowed values for the input. For \`string\` or \`number\` types, creates a
360
+ * single-select dropdown. For \`string_array\` type, creates a multi-select
361
+ * dropdown.
362
+ */
363
+ allowedValues?: Array<unknown>;
364
+ /**
365
+ * Specifies the background behavior for the input. Only available for \`file\` and
366
+ * \`file_array\` input types with kind \`image\`.
367
+ */
368
+ backgroundBehavior?: 'opaque' | 'transparent';
369
+ /**
370
+ * Whether the input is a color or not. Only available for \`string\` input type.
371
+ */
372
+ color?: boolean;
373
+ /**
374
+ * Whether this input affects the model's cost calculation
375
+ */
376
+ costImpact?: boolean;
377
+ /**
378
+ * Help text displayed in the UI to provide additional information about the input
379
+ */
380
+ description?: string;
381
+ /**
382
+ * Used to visually group inputs together in the UI. Inputs with the same group
383
+ * value appear consecutively in the UI.
384
+ */
385
+ group?: string;
386
+ /**
387
+ * Hint text displayed in the UI as a tooltip to guide the user
388
+ */
389
+ hint?: string;
390
+ /**
391
+ * The list of inputs which form an object within a container array. All inputs are
392
+ * the same as the current object. This is only available for type inputs_array
393
+ * inputs.
394
+ */
395
+ inputs?: Array<unknown>;
396
+ /**
397
+ * The asset kind of the input. Only taken into account for \`file\` and
398
+ * \`file_array\` input types.
399
+ */
400
+ kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
401
+ /**
402
+ * The label displayed in the UI for this input
403
+ */
404
+ label?: string;
405
+ /**
406
+ * The name of the file input field to use as the mask source
407
+ */
408
+ maskFrom?: string;
409
+ /**
410
+ * The maximum allowed value. Only available for \`number\` and \`array\` input
411
+ * types.
412
+ */
413
+ max?: number;
414
+ /**
415
+ * The maximum allowed length for \`string\` inputs. Also applies to each item in
416
+ * \`string_array\`.
417
+ */
418
+ maxLength?: number;
419
+ /**
420
+ * The minimum allowed value. Only available for \`number\` and array input types.
421
+ */
422
+ min?: number;
423
+ /**
424
+ * The minimum allowed length for string inputs. Also applies to each item in
425
+ * \`string_array\`.
426
+ */
427
+ minLength?: number;
428
+ /**
429
+ * The allowed model types for this input. Example: \`["flux.1-lora"]\`. Only
430
+ * available for \`model_array\` input type.
431
+ */
432
+ modelTypes?: Array<'custom' | 'flux.1' | 'flux.1-composition' | 'flux.1-kontext-dev' | 'flux.1-kontext-lora' | 'flux.1-krea-dev' | 'flux.1-krea-lora' | 'flux.1-lora' | 'flux.1-pro' | 'flux.1.1-pro-ultra' | 'flux1.1-pro' | 'gpt-image-1' | 'sd-1_5' | 'sd-1_5-composition' | 'sd-1_5-lora' | 'sd-xl' | 'sd-xl-composition' | 'sd-xl-lora'>;
433
+ /**
434
+ * Whether this input represents a parent asset to assign to the produced assets.
435
+ * Only available for \`file\` and \`file_array\` input types.
436
+ *
437
+ * For \`file_array\`, the parent asset is the first item in the array.
438
+ */
439
+ parent?: boolean;
440
+ /**
441
+ * Placeholder text for the input. Only available for 'string' input type.
442
+ */
443
+ placeholder?: string;
444
+ /**
445
+ * Whether the input is a prompt. When true, displays as a text area with prompt
446
+ * spark feature. Only available for \`string\` input type.
447
+ */
448
+ prompt?: boolean;
449
+ /**
450
+ * Whether the input is used with prompt spark. Only available for \`string\` input
451
+ * type.
452
+ */
453
+ promptSpark?: boolean;
454
+ /**
455
+ * The reference to another input or output of the same workflow. Must have at
456
+ * least one of node or conditional.
457
+ */
458
+ ref?: Input.Ref;
459
+ /**
460
+ * Set of rules that describes when this input is required:
461
+ *
462
+ * - \`always\`: Input is always required
463
+ * - \`ifNotDefined\`: Input is required when another specified input is not
464
+ * defined
465
+ * - \`ifDefined\`: Input is required when another specified input is defined
466
+ * - \`conditionalValues\`: Input is required when another input has a specific
467
+ * value
468
+ *
469
+ * By default, the input is not required.
470
+ */
471
+ required?: Input.Required;
472
+ /**
473
+ * The step increment for numeric inputs. Only available for \`number\` input type.
474
+ */
475
+ step?: number;
476
+ }
477
+ namespace Input {
478
+ /**
479
+ * The reference to another input or output of the same workflow. Must have at
480
+ * least one of node or conditional.
481
+ */
482
+ interface Ref {
483
+ /**
484
+ * The conditional nodes to reference. If the conditional nodes are successful, the
485
+ * node will be successful. If the conditional nodes are skipped, the node will be
486
+ * skipped. Contains an array of node ids used to check the status of the nodes.
487
+ */
488
+ conditional?: Array<string>;
489
+ /**
490
+ * This is the desired node output value if ref is an if/else node.
491
+ */
492
+ equal?: string;
493
+ /**
494
+ * The name of the input or output to reference. If the type is 'workflow', the
495
+ * name is the name of the input of the workflow is required If the type is 'node',
496
+ * the name is not mandatory, except if you want all outputs of the node. To get
497
+ * all outputs of a node, you can use the name 'all'.
498
+ */
499
+ name?: string;
500
+ /**
501
+ * The node id or 'workflow' if the source is a workflow input.
502
+ */
503
+ node?: string;
504
+ }
505
+ /**
506
+ * Set of rules that describes when this input is required:
507
+ *
508
+ * - \`always\`: Input is always required
509
+ * - \`ifNotDefined\`: Input is required when another specified input is not
510
+ * defined
511
+ * - \`ifDefined\`: Input is required when another specified input is defined
512
+ * - \`conditionalValues\`: Input is required when another input has a specific
513
+ * value
514
+ *
515
+ * By default, the input is not required.
516
+ */
517
+ interface Required {
518
+ /**
519
+ * Whether the input is always required
520
+ */
521
+ always?: boolean;
522
+ /**
523
+ * Makes this input required when another input has a specific value:
524
+ *
525
+ * - Key: name of the input to check
526
+ * - Value: operation and allowed values that trigger the requirement
527
+ */
528
+ conditionalValues?: unknown;
529
+ /**
530
+ * Makes this input required when another input is defined:
531
+ *
532
+ * - Key: name of the input that must be defined
533
+ * - Value: message to display when this input is required
534
+ */
535
+ ifDefined?: unknown;
536
+ /**
537
+ * Makes this input required when another input is not defined:
538
+ *
539
+ * - Key: name of the input that must be undefined
540
+ * - Value: message to display when this input is required
541
+ */
542
+ ifNotDefined?: unknown;
543
+ }
544
+ }
545
+ /**
546
+ * The logic of the node. Only available for logic nodes.
547
+ */
548
+ interface Logic {
549
+ /**
550
+ * The cases of the logic. Only available for if/else nodes.
551
+ */
552
+ cases?: Array<Logic.Case>;
553
+ /**
554
+ * The default case of the logic. Contains the id/output of the node to execute if
555
+ * no case is matched. Only available for if/else nodes.
556
+ */
557
+ default?: string;
558
+ /**
559
+ * The transform of the logic. Only available for transform nodes.
560
+ */
561
+ transform?: string;
562
+ }
563
+ namespace Logic {
564
+ interface Case {
565
+ condition: string;
566
+ value: string;
567
+ }
568
+ }
569
+ }
570
+ }
571
+ }
572
+ interface Model {
573
+ /**
574
+ * The model ID
575
+ */
576
+ id: string;
577
+ /**
578
+ * The name of the model
579
+ */
580
+ name: string;
581
+ /**
582
+ * The short description of the model
583
+ */
584
+ shortDescription?: string;
585
+ }
586
+ interface User {
587
+ /**
588
+ * The user ID
589
+ */
590
+ id: string;
591
+ /**
592
+ * Whether the user is an API key
593
+ */
594
+ isApiKey: boolean;
595
+ /**
596
+ * The API key ID
597
+ *
598
+ * Will be available:
599
+ *
600
+ * - if the user is an API key
601
+ */
602
+ apiKeyId?: string;
603
+ /**
604
+ * The API key status
605
+ *
606
+ * Will be available:
607
+ *
608
+ * - if the user is an API key
609
+ */
610
+ apiKeyStatus?: 'active' | 'deleted' | 'inactive';
611
+ /**
612
+ * The user avatar
613
+ *
614
+ * Will be available:
615
+ *
616
+ * - if the user hasn't left the Scenario platform
617
+ * - if the user isn't an API key
618
+ */
619
+ avatar?: User.Avatar;
620
+ /**
621
+ * The email of the user
622
+ *
623
+ * Will be available:
624
+ *
625
+ * - if the user hasn't left the Scenario platform
626
+ * - if the user isn't an API key
627
+ */
628
+ email?: string;
629
+ /**
630
+ * The full name of the user
631
+ *
632
+ * Will be available:
633
+ *
634
+ * - if the user hasn't left the Scenario platform
635
+ * - if the user isn't an API key
636
+ */
637
+ fullName?: string;
638
+ }
639
+ namespace User {
640
+ /**
641
+ * The user avatar
642
+ *
643
+ * Will be available:
644
+ *
645
+ * - if the user hasn't left the Scenario platform
646
+ * - if the user isn't an API key
647
+ */
648
+ interface Avatar {
649
+ /**
650
+ * ID of the asset used as thumbnail if provided, otherwise undefined
651
+ */
652
+ assetId?: string;
653
+ /**
654
+ * Signed URL of the assetId or free url if assetId is undefined
655
+ */
656
+ url?: string;
657
+ }
658
+ }
659
+ }
660
+ interface ModelUsage {
661
+ modelId: string;
662
+ /**
663
+ * The data points
664
+ */
665
+ points: Array<ModelUsage.Point>;
666
+ }
667
+ namespace ModelUsage {
668
+ interface Point {
669
+ /**
670
+ * Cost for model usage
671
+ */
672
+ cost: number;
673
+ /**
674
+ * The discount for model usage
675
+ */
676
+ discount: number;
677
+ /**
678
+ * Number of jobs for the model usage
679
+ */
680
+ jobs: number;
681
+ /**
682
+ * The UTC ISO date of the point
683
+ */
684
+ time: string;
685
+ }
686
+ }
687
+ interface Usage {
688
+ /**
689
+ * Granularity for points (example: "1d", "1h", "1m", "15m")
690
+ */
691
+ granularity: '15m' | '1d' | '1h' | '1m' | '30m' | '5m' | '7d';
692
+ /**
693
+ * The usage data points
694
+ */
695
+ points: Array<Usage.Point>;
696
+ /**
697
+ * Name of the usage points (example: "images-generation", "generators-training",
698
+ * "background-removal", "upscale", ...)
699
+ */
700
+ usageName: 'background-removal' | 'captioning' | 'creative-unit-cost' | 'creative-unit-discount' | 'custom' | 'detection' | 'image-prompt-editing' | 'images-generation' | 'models-training' | 'patch' | 'pixelate' | 'repaint' | 'restyle' | 'segmentation' | 'skybox-base-360' | 'skybox-upscale-360' | 'texture' | 'upscale' | 'vectorization';
701
+ }
702
+ namespace Usage {
703
+ interface Point {
704
+ /**
705
+ * The UTC ISO date of the point
706
+ */
707
+ time: string;
708
+ /**
709
+ * Value of the point
710
+ */
711
+ value: string;
712
+ }
713
+ }
714
+ }
715
+ export interface UsageListParams {
716
+ /**
717
+ * The offset for the activity data. Default is 0. If bad offset or empty, 0 will
718
+ * be returned. Must be a positive integer.
719
+ */
720
+ activityOffset?: string;
721
+ /**
722
+ * The end date of the usage in ISO 8601 format. If not provided, use default
723
+ * timeRange. If provided, startDate is required.
724
+ */
725
+ endDate?: string;
726
+ /**
727
+ * The project ids for filtering the usage data. If not provided, use all projects.
728
+ * Can be one or more comma separated values.
729
+ */
730
+ projectIds?: string;
731
+ /**
732
+ * The start date of the usage in ISO 8601 format. If not provided, use default
733
+ * timeRange. If provided, endDate is required.
734
+ */
735
+ startDate?: string;
736
+ /**
737
+ * The time range of the usage. If not provided, use default timeRange. If
738
+ * startDate and endDate provided, timeRange is ignored.
739
+ */
740
+ timeRange?: string;
741
+ /**
742
+ * The type of the usage data. Can be one or more comma separated values. Default
743
+ * is all types. If bad type or empty, all types will be returned.
744
+ */
745
+ type?: string;
746
+ /**
747
+ * The unique identifier of the user for the usage. If not provided, returns all
748
+ * usages for the team.
749
+ */
750
+ userId?: string;
751
+ /**
752
+ * The unique identifiers of the users for filtering the usage data. If not
753
+ * provided, use all users. Can be one or more comma separated values.
754
+ */
755
+ userIds?: string;
756
+ }
757
+ export declare namespace Usages {
758
+ export { type UsageListResponse as UsageListResponse, type UsageListParams as UsageListParams };
759
+ }
760
+ //# sourceMappingURL=usages.d.ts.map