@scenario-labs/sdk 3.2.0 → 3.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (516) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/client.d.mts +20 -5
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +20 -5
  5. package/client.d.ts.map +1 -1
  6. package/client.js +9 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +9 -0
  9. package/client.mjs.map +1 -1
  10. package/core/pagination.d.mts +42 -0
  11. package/core/pagination.d.mts.map +1 -1
  12. package/core/pagination.d.ts +42 -0
  13. package/core/pagination.d.ts.map +1 -1
  14. package/core/pagination.js +79 -1
  15. package/core/pagination.js.map +1 -1
  16. package/core/pagination.mjs +75 -0
  17. package/core/pagination.mjs.map +1 -1
  18. package/internal/utils/values.d.mts +6 -0
  19. package/internal/utils/values.d.mts.map +1 -1
  20. package/internal/utils/values.d.ts +6 -0
  21. package/internal/utils/values.d.ts.map +1 -1
  22. package/internal/utils/values.js +11 -0
  23. package/internal/utils/values.js.map +1 -1
  24. package/internal/utils/values.mjs +10 -0
  25. package/internal/utils/values.mjs.map +1 -1
  26. package/lib/generate.js +7 -7
  27. package/lib/generate.js.map +1 -1
  28. package/lib/generate.mjs +7 -7
  29. package/lib/generate.mjs.map +1 -1
  30. package/lib/job.d.mts +1 -1
  31. package/lib/job.d.mts.map +1 -1
  32. package/lib/job.d.ts +1 -1
  33. package/lib/job.d.ts.map +1 -1
  34. package/lib/job.js +5 -6
  35. package/lib/job.js.map +1 -1
  36. package/lib/job.mjs +6 -7
  37. package/lib/job.mjs.map +1 -1
  38. package/lib/models.d.mts.map +1 -1
  39. package/lib/models.d.ts.map +1 -1
  40. package/lib/models.js +7 -5
  41. package/lib/models.js.map +1 -1
  42. package/lib/models.mjs +8 -6
  43. package/lib/models.mjs.map +1 -1
  44. package/lib/query.d.mts +21 -0
  45. package/lib/query.d.mts.map +1 -0
  46. package/lib/query.d.ts +21 -0
  47. package/lib/query.d.ts.map +1 -0
  48. package/lib/query.js +36 -0
  49. package/lib/query.js.map +1 -0
  50. package/lib/query.mjs +33 -0
  51. package/lib/query.mjs.map +1 -0
  52. package/lib/scenario.d.mts +3 -0
  53. package/lib/scenario.d.mts.map +1 -1
  54. package/lib/scenario.d.ts +3 -0
  55. package/lib/scenario.d.ts.map +1 -1
  56. package/lib/scenario.js +6 -0
  57. package/lib/scenario.js.map +1 -1
  58. package/lib/scenario.mjs +6 -0
  59. package/lib/scenario.mjs.map +1 -1
  60. package/lib/scope.d.mts +27 -7
  61. package/lib/scope.d.mts.map +1 -1
  62. package/lib/scope.d.ts +27 -7
  63. package/lib/scope.d.ts.map +1 -1
  64. package/lib/scope.js +40 -7
  65. package/lib/scope.js.map +1 -1
  66. package/lib/scope.mjs +37 -7
  67. package/lib/scope.mjs.map +1 -1
  68. package/lib/upload.d.mts +1 -1
  69. package/lib/upload.d.mts.map +1 -1
  70. package/lib/upload.d.ts +1 -1
  71. package/lib/upload.d.ts.map +1 -1
  72. package/lib/upload.js +6 -7
  73. package/lib/upload.js.map +1 -1
  74. package/lib/upload.mjs +7 -8
  75. package/lib/upload.mjs.map +1 -1
  76. package/lib/workflow.d.mts.map +1 -1
  77. package/lib/workflow.d.ts.map +1 -1
  78. package/lib/workflow.js +8 -6
  79. package/lib/workflow.js.map +1 -1
  80. package/lib/workflow.mjs +9 -7
  81. package/lib/workflow.mjs.map +1 -1
  82. package/lib/workflow_validator.d.mts +5 -0
  83. package/lib/workflow_validator.d.mts.map +1 -1
  84. package/lib/workflow_validator.d.ts +5 -0
  85. package/lib/workflow_validator.d.ts.map +1 -1
  86. package/lib/workflow_validator.js +113 -0
  87. package/lib/workflow_validator.js.map +1 -1
  88. package/lib/workflow_validator.mjs +113 -0
  89. package/lib/workflow_validator.mjs.map +1 -1
  90. package/package.json +1 -1
  91. package/resources/assets/assets.d.mts +130 -31
  92. package/resources/assets/assets.d.mts.map +1 -1
  93. package/resources/assets/assets.d.ts +130 -31
  94. package/resources/assets/assets.d.ts.map +1 -1
  95. package/resources/assets/assets.js +34 -11
  96. package/resources/assets/assets.js.map +1 -1
  97. package/resources/assets/assets.mjs +34 -11
  98. package/resources/assets/assets.mjs.map +1 -1
  99. package/resources/assets/download.d.mts +24 -5
  100. package/resources/assets/download.d.mts.map +1 -1
  101. package/resources/assets/download.d.ts +24 -5
  102. package/resources/assets/download.d.ts.map +1 -1
  103. package/resources/assets/download.js +15 -3
  104. package/resources/assets/download.js.map +1 -1
  105. package/resources/assets/download.mjs +15 -3
  106. package/resources/assets/download.mjs.map +1 -1
  107. package/resources/collections/assets.d.mts.map +1 -1
  108. package/resources/collections/assets.d.ts.map +1 -1
  109. package/resources/collections/assets.js +3 -2
  110. package/resources/collections/assets.js.map +1 -1
  111. package/resources/collections/assets.mjs +3 -2
  112. package/resources/collections/assets.mjs.map +1 -1
  113. package/resources/collections/collections.d.mts.map +1 -1
  114. package/resources/collections/collections.d.ts.map +1 -1
  115. package/resources/collections/collections.js +20 -5
  116. package/resources/collections/collections.js.map +1 -1
  117. package/resources/collections/collections.mjs +20 -5
  118. package/resources/collections/collections.mjs.map +1 -1
  119. package/resources/collections/models.d.mts.map +1 -1
  120. package/resources/collections/models.d.ts.map +1 -1
  121. package/resources/collections/models.js +3 -2
  122. package/resources/collections/models.js.map +1 -1
  123. package/resources/collections/models.mjs +3 -2
  124. package/resources/collections/models.mjs.map +1 -1
  125. package/resources/generate.d.mts +1719 -225
  126. package/resources/generate.d.mts.map +1 -1
  127. package/resources/generate.d.ts +1719 -225
  128. package/resources/generate.d.ts.map +1 -1
  129. package/resources/generate.js +65 -8
  130. package/resources/generate.js.map +1 -1
  131. package/resources/generate.mjs +65 -8
  132. package/resources/generate.mjs.map +1 -1
  133. package/resources/index.d.mts +5 -2
  134. package/resources/index.d.mts.map +1 -1
  135. package/resources/index.d.ts +5 -2
  136. package/resources/index.d.ts.map +1 -1
  137. package/resources/index.js +7 -1
  138. package/resources/index.js.map +1 -1
  139. package/resources/index.mjs +3 -0
  140. package/resources/index.mjs.map +1 -1
  141. package/resources/jobs.d.mts +176 -74
  142. package/resources/jobs.d.mts.map +1 -1
  143. package/resources/jobs.d.ts +176 -74
  144. package/resources/jobs.d.ts.map +1 -1
  145. package/resources/jobs.js +16 -4
  146. package/resources/jobs.js.map +1 -1
  147. package/resources/jobs.mjs +16 -4
  148. package/resources/jobs.mjs.map +1 -1
  149. package/resources/models/description.d.mts +2 -2
  150. package/resources/models/description.d.mts.map +1 -1
  151. package/resources/models/description.d.ts +2 -2
  152. package/resources/models/description.d.ts.map +1 -1
  153. package/resources/models/description.js +6 -2
  154. package/resources/models/description.js.map +1 -1
  155. package/resources/models/description.mjs +6 -2
  156. package/resources/models/description.mjs.map +1 -1
  157. package/resources/models/examples.d.mts +120 -48
  158. package/resources/models/examples.d.mts.map +1 -1
  159. package/resources/models/examples.d.ts +120 -48
  160. package/resources/models/examples.d.ts.map +1 -1
  161. package/resources/models/examples.js +6 -2
  162. package/resources/models/examples.js.map +1 -1
  163. package/resources/models/examples.mjs +6 -2
  164. package/resources/models/examples.mjs.map +1 -1
  165. package/resources/models/index.d.mts +3 -0
  166. package/resources/models/index.d.mts.map +1 -1
  167. package/resources/models/index.d.ts +3 -0
  168. package/resources/models/index.d.ts.map +1 -1
  169. package/resources/models/index.js +7 -1
  170. package/resources/models/index.js.map +1 -1
  171. package/resources/models/index.mjs +3 -0
  172. package/resources/models/index.mjs.map +1 -1
  173. package/resources/models/models.d.mts +215 -77
  174. package/resources/models/models.d.mts.map +1 -1
  175. package/resources/models/models.d.ts +215 -77
  176. package/resources/models/models.d.ts.map +1 -1
  177. package/resources/models/models.js +52 -11
  178. package/resources/models/models.js.map +1 -1
  179. package/resources/models/models.mjs +52 -11
  180. package/resources/models/models.mjs.map +1 -1
  181. package/resources/models/presets.d.mts +1016 -0
  182. package/resources/models/presets.d.mts.map +1 -0
  183. package/resources/models/presets.d.ts +1016 -0
  184. package/resources/models/presets.d.ts.map +1 -0
  185. package/resources/models/presets.js +52 -0
  186. package/resources/models/presets.js.map +1 -0
  187. package/resources/models/presets.mjs +48 -0
  188. package/resources/models/presets.mjs.map +1 -0
  189. package/resources/models/prompt-guide.d.mts +64 -0
  190. package/resources/models/prompt-guide.d.mts.map +1 -0
  191. package/resources/models/prompt-guide.d.ts +64 -0
  192. package/resources/models/prompt-guide.d.ts.map +1 -0
  193. package/resources/models/prompt-guide.js +31 -0
  194. package/resources/models/prompt-guide.js.map +1 -0
  195. package/resources/models/prompt-guide.mjs +27 -0
  196. package/resources/models/prompt-guide.mjs.map +1 -0
  197. package/resources/models/scores.d.mts +278 -0
  198. package/resources/models/scores.d.mts.map +1 -0
  199. package/resources/models/scores.d.ts +278 -0
  200. package/resources/models/scores.d.ts.map +1 -0
  201. package/resources/models/scores.js +29 -0
  202. package/resources/models/scores.js.map +1 -0
  203. package/resources/models/scores.mjs +25 -0
  204. package/resources/models/scores.mjs.map +1 -0
  205. package/resources/models/train.d.mts +108 -45
  206. package/resources/models/train.d.mts.map +1 -1
  207. package/resources/models/train.d.ts +108 -45
  208. package/resources/models/train.d.ts.map +1 -1
  209. package/resources/models/train.js +3 -2
  210. package/resources/models/train.js.map +1 -1
  211. package/resources/models/train.mjs +3 -2
  212. package/resources/models/train.mjs.map +1 -1
  213. package/resources/models/training-images.d.mts.map +1 -1
  214. package/resources/models/training-images.d.ts.map +1 -1
  215. package/resources/models/training-images.js +5 -4
  216. package/resources/models/training-images.js.map +1 -1
  217. package/resources/models/training-images.mjs +5 -4
  218. package/resources/models/training-images.mjs.map +1 -1
  219. package/resources/projects/api-keys.d.mts +54 -0
  220. package/resources/projects/api-keys.d.mts.map +1 -0
  221. package/resources/projects/api-keys.d.ts +54 -0
  222. package/resources/projects/api-keys.d.ts.map +1 -0
  223. package/resources/projects/api-keys.js +23 -0
  224. package/resources/projects/api-keys.js.map +1 -0
  225. package/resources/projects/api-keys.mjs +19 -0
  226. package/resources/projects/api-keys.mjs.map +1 -0
  227. package/resources/projects/brief.d.mts +149 -0
  228. package/resources/projects/brief.d.mts.map +1 -0
  229. package/resources/projects/brief.d.ts +149 -0
  230. package/resources/projects/brief.d.ts.map +1 -0
  231. package/resources/projects/brief.js +28 -0
  232. package/resources/projects/brief.js.map +1 -0
  233. package/resources/projects/brief.mjs +24 -0
  234. package/resources/projects/brief.mjs.map +1 -0
  235. package/resources/projects/index.d.mts +9 -0
  236. package/resources/projects/index.d.mts.map +1 -0
  237. package/resources/projects/index.d.ts +9 -0
  238. package/resources/projects/index.d.ts.map +1 -0
  239. package/resources/projects/index.js +21 -0
  240. package/resources/projects/index.js.map +1 -0
  241. package/resources/projects/index.mjs +10 -0
  242. package/resources/projects/index.mjs.map +1 -0
  243. package/resources/projects/instructions.d.mts +102 -0
  244. package/resources/projects/instructions.d.mts.map +1 -0
  245. package/resources/projects/instructions.d.ts +102 -0
  246. package/resources/projects/instructions.d.ts.map +1 -0
  247. package/resources/projects/instructions.js +24 -0
  248. package/resources/projects/instructions.js.map +1 -0
  249. package/resources/projects/instructions.mjs +20 -0
  250. package/resources/projects/instructions.mjs.map +1 -0
  251. package/resources/projects/members.d.mts +788 -0
  252. package/resources/projects/members.d.mts.map +1 -0
  253. package/resources/projects/members.d.ts +788 -0
  254. package/resources/projects/members.d.ts.map +1 -0
  255. package/resources/projects/members.js +30 -0
  256. package/resources/projects/members.js.map +1 -0
  257. package/resources/projects/members.mjs +26 -0
  258. package/resources/projects/members.mjs.map +1 -0
  259. package/resources/projects/memory.d.mts +102 -0
  260. package/resources/projects/memory.d.mts.map +1 -0
  261. package/resources/projects/memory.d.ts +102 -0
  262. package/resources/projects/memory.d.ts.map +1 -0
  263. package/resources/projects/memory.js +24 -0
  264. package/resources/projects/memory.js.map +1 -0
  265. package/resources/projects/memory.mjs +20 -0
  266. package/resources/projects/memory.mjs.map +1 -0
  267. package/resources/projects/projects.d.mts +1129 -0
  268. package/resources/projects/projects.d.mts.map +1 -0
  269. package/resources/projects/projects.d.ts +1129 -0
  270. package/resources/projects/projects.d.ts.map +1 -0
  271. package/resources/projects/projects.js +79 -0
  272. package/resources/projects/projects.js.map +1 -0
  273. package/resources/projects/projects.mjs +74 -0
  274. package/resources/projects/projects.mjs.map +1 -0
  275. package/resources/projects/watermark.d.mts +459 -0
  276. package/resources/projects/watermark.d.mts.map +1 -0
  277. package/resources/projects/watermark.d.ts +459 -0
  278. package/resources/projects/watermark.d.ts.map +1 -0
  279. package/resources/projects/watermark.js +46 -0
  280. package/resources/projects/watermark.js.map +1 -0
  281. package/resources/projects/watermark.mjs +42 -0
  282. package/resources/projects/watermark.mjs.map +1 -0
  283. package/resources/projects/webhook-endpoints/events.d.mts +87 -0
  284. package/resources/projects/webhook-endpoints/events.d.mts.map +1 -0
  285. package/resources/projects/webhook-endpoints/events.d.ts +87 -0
  286. package/resources/projects/webhook-endpoints/events.d.ts.map +1 -0
  287. package/resources/projects/webhook-endpoints/events.js +28 -0
  288. package/resources/projects/webhook-endpoints/events.js.map +1 -0
  289. package/resources/projects/webhook-endpoints/events.mjs +24 -0
  290. package/resources/projects/webhook-endpoints/events.mjs.map +1 -0
  291. package/resources/projects/webhook-endpoints/index.d.mts +3 -0
  292. package/resources/projects/webhook-endpoints/index.d.mts.map +1 -0
  293. package/resources/projects/webhook-endpoints/index.d.ts +3 -0
  294. package/resources/projects/webhook-endpoints/index.d.ts.map +1 -0
  295. package/resources/projects/webhook-endpoints/index.js +9 -0
  296. package/resources/projects/webhook-endpoints/index.js.map +1 -0
  297. package/resources/projects/webhook-endpoints/index.mjs +4 -0
  298. package/resources/projects/webhook-endpoints/index.mjs.map +1 -0
  299. package/resources/projects/webhook-endpoints/webhook-endpoints.d.mts +249 -0
  300. package/resources/projects/webhook-endpoints/webhook-endpoints.d.mts.map +1 -0
  301. package/resources/projects/webhook-endpoints/webhook-endpoints.d.ts +249 -0
  302. package/resources/projects/webhook-endpoints/webhook-endpoints.d.ts.map +1 -0
  303. package/resources/projects/webhook-endpoints/webhook-endpoints.js +44 -0
  304. package/resources/projects/webhook-endpoints/webhook-endpoints.js.map +1 -0
  305. package/resources/projects/webhook-endpoints/webhook-endpoints.mjs +39 -0
  306. package/resources/projects/webhook-endpoints/webhook-endpoints.mjs.map +1 -0
  307. package/resources/projects/webhook-endpoints.d.mts +2 -0
  308. package/resources/projects/webhook-endpoints.d.mts.map +1 -0
  309. package/resources/projects/webhook-endpoints.d.ts +2 -0
  310. package/resources/projects/webhook-endpoints.d.ts.map +1 -0
  311. package/resources/projects/webhook-endpoints.js +6 -0
  312. package/resources/projects/webhook-endpoints.js.map +1 -0
  313. package/resources/projects/webhook-endpoints.mjs +3 -0
  314. package/resources/projects/webhook-endpoints.mjs.map +1 -0
  315. package/resources/projects.d.mts +2 -0
  316. package/resources/projects.d.mts.map +1 -0
  317. package/resources/projects.d.ts +2 -0
  318. package/resources/projects.d.ts.map +1 -0
  319. package/resources/projects.js +6 -0
  320. package/resources/projects.js.map +1 -0
  321. package/resources/projects.mjs +3 -0
  322. package/resources/projects.mjs.map +1 -0
  323. package/resources/recommendations.d.mts +1107 -0
  324. package/resources/recommendations.d.mts.map +1 -0
  325. package/resources/recommendations.d.ts +1107 -0
  326. package/resources/recommendations.d.ts.map +1 -0
  327. package/resources/recommendations.js +17 -0
  328. package/resources/recommendations.js.map +1 -0
  329. package/resources/recommendations.mjs +13 -0
  330. package/resources/recommendations.mjs.map +1 -0
  331. package/resources/search.d.mts.map +1 -1
  332. package/resources/search.d.ts.map +1 -1
  333. package/resources/search.js +4 -3
  334. package/resources/search.js.map +1 -1
  335. package/resources/search.mjs +4 -3
  336. package/resources/search.mjs.map +1 -1
  337. package/resources/tags.d.mts.map +1 -1
  338. package/resources/tags.d.ts.map +1 -1
  339. package/resources/tags.js +5 -1
  340. package/resources/tags.js.map +1 -1
  341. package/resources/tags.mjs +5 -1
  342. package/resources/tags.mjs.map +1 -1
  343. package/resources/teams/brief.d.mts +149 -0
  344. package/resources/teams/brief.d.mts.map +1 -0
  345. package/resources/teams/brief.d.ts +149 -0
  346. package/resources/teams/brief.d.ts.map +1 -0
  347. package/resources/teams/brief.js +28 -0
  348. package/resources/teams/brief.js.map +1 -0
  349. package/resources/teams/brief.mjs +24 -0
  350. package/resources/teams/brief.mjs.map +1 -0
  351. package/resources/teams/index.d.mts +7 -0
  352. package/resources/teams/index.d.mts.map +1 -0
  353. package/resources/teams/index.d.ts +7 -0
  354. package/resources/teams/index.d.ts.map +1 -0
  355. package/resources/teams/index.js +17 -0
  356. package/resources/teams/index.js.map +1 -0
  357. package/resources/teams/index.mjs +8 -0
  358. package/resources/teams/index.mjs.map +1 -0
  359. package/resources/teams/ip-filters.d.mts +115 -0
  360. package/resources/teams/ip-filters.d.mts.map +1 -0
  361. package/resources/teams/ip-filters.d.ts +115 -0
  362. package/resources/teams/ip-filters.d.ts.map +1 -0
  363. package/resources/teams/ip-filters.js +45 -0
  364. package/resources/teams/ip-filters.js.map +1 -0
  365. package/resources/teams/ip-filters.mjs +41 -0
  366. package/resources/teams/ip-filters.mjs.map +1 -0
  367. package/resources/teams/members.d.mts +204 -0
  368. package/resources/teams/members.d.mts.map +1 -0
  369. package/resources/teams/members.d.ts +204 -0
  370. package/resources/teams/members.d.ts.map +1 -0
  371. package/resources/teams/members.js +30 -0
  372. package/resources/teams/members.js.map +1 -0
  373. package/resources/teams/members.mjs +26 -0
  374. package/resources/teams/members.mjs.map +1 -0
  375. package/resources/teams/teams.d.mts +878 -0
  376. package/resources/teams/teams.d.mts.map +1 -0
  377. package/resources/teams/teams.d.ts +878 -0
  378. package/resources/teams/teams.d.ts.map +1 -0
  379. package/resources/teams/teams.js +66 -0
  380. package/resources/teams/teams.js.map +1 -0
  381. package/resources/teams/teams.mjs +61 -0
  382. package/resources/teams/teams.mjs.map +1 -0
  383. package/resources/teams/watermark.d.mts +459 -0
  384. package/resources/teams/watermark.d.mts.map +1 -0
  385. package/resources/teams/watermark.d.ts +459 -0
  386. package/resources/teams/watermark.d.ts.map +1 -0
  387. package/resources/teams/watermark.js +46 -0
  388. package/resources/teams/watermark.js.map +1 -0
  389. package/resources/teams/watermark.mjs +42 -0
  390. package/resources/teams/watermark.mjs.map +1 -0
  391. package/resources/teams/webhook-endpoints/events.d.mts +87 -0
  392. package/resources/teams/webhook-endpoints/events.d.mts.map +1 -0
  393. package/resources/teams/webhook-endpoints/events.d.ts +87 -0
  394. package/resources/teams/webhook-endpoints/events.d.ts.map +1 -0
  395. package/resources/teams/webhook-endpoints/events.js +28 -0
  396. package/resources/teams/webhook-endpoints/events.js.map +1 -0
  397. package/resources/teams/webhook-endpoints/events.mjs +24 -0
  398. package/resources/teams/webhook-endpoints/events.mjs.map +1 -0
  399. package/resources/teams/webhook-endpoints/index.d.mts +3 -0
  400. package/resources/teams/webhook-endpoints/index.d.mts.map +1 -0
  401. package/resources/teams/webhook-endpoints/index.d.ts +3 -0
  402. package/resources/teams/webhook-endpoints/index.d.ts.map +1 -0
  403. package/resources/teams/webhook-endpoints/index.js +9 -0
  404. package/resources/teams/webhook-endpoints/index.js.map +1 -0
  405. package/resources/teams/webhook-endpoints/index.mjs +4 -0
  406. package/resources/teams/webhook-endpoints/index.mjs.map +1 -0
  407. package/resources/teams/webhook-endpoints/webhook-endpoints.d.mts +250 -0
  408. package/resources/teams/webhook-endpoints/webhook-endpoints.d.mts.map +1 -0
  409. package/resources/teams/webhook-endpoints/webhook-endpoints.d.ts +250 -0
  410. package/resources/teams/webhook-endpoints/webhook-endpoints.d.ts.map +1 -0
  411. package/resources/teams/webhook-endpoints/webhook-endpoints.js +45 -0
  412. package/resources/teams/webhook-endpoints/webhook-endpoints.js.map +1 -0
  413. package/resources/teams/webhook-endpoints/webhook-endpoints.mjs +40 -0
  414. package/resources/teams/webhook-endpoints/webhook-endpoints.mjs.map +1 -0
  415. package/resources/teams/webhook-endpoints.d.mts +2 -0
  416. package/resources/teams/webhook-endpoints.d.mts.map +1 -0
  417. package/resources/teams/webhook-endpoints.d.ts +2 -0
  418. package/resources/teams/webhook-endpoints.d.ts.map +1 -0
  419. package/resources/teams/webhook-endpoints.js +6 -0
  420. package/resources/teams/webhook-endpoints.js.map +1 -0
  421. package/resources/teams/webhook-endpoints.mjs +3 -0
  422. package/resources/teams/webhook-endpoints.mjs.map +1 -0
  423. package/resources/teams.d.mts +2 -0
  424. package/resources/teams.d.mts.map +1 -0
  425. package/resources/teams.d.ts +2 -0
  426. package/resources/teams.d.ts.map +1 -0
  427. package/resources/teams.js +6 -0
  428. package/resources/teams.js.map +1 -0
  429. package/resources/teams.mjs +3 -0
  430. package/resources/teams.mjs.map +1 -0
  431. package/resources/uploads.d.mts.map +1 -1
  432. package/resources/uploads.d.ts.map +1 -1
  433. package/resources/uploads.js +15 -3
  434. package/resources/uploads.js.map +1 -1
  435. package/resources/uploads.mjs +15 -3
  436. package/resources/uploads.mjs.map +1 -1
  437. package/resources/usages.d.mts +51 -24
  438. package/resources/usages.d.mts.map +1 -1
  439. package/resources/usages.d.ts +51 -24
  440. package/resources/usages.d.ts.map +1 -1
  441. package/resources/usages.js +2 -1
  442. package/resources/usages.js.map +1 -1
  443. package/resources/usages.mjs +2 -1
  444. package/resources/usages.mjs.map +1 -1
  445. package/resources/workflows.d.mts +1381 -280
  446. package/resources/workflows.d.mts.map +1 -1
  447. package/resources/workflows.d.ts +1381 -280
  448. package/resources/workflows.d.ts.map +1 -1
  449. package/resources/workflows.js +39 -8
  450. package/resources/workflows.js.map +1 -1
  451. package/resources/workflows.mjs +39 -8
  452. package/resources/workflows.mjs.map +1 -1
  453. package/src/client.ts +101 -0
  454. package/src/core/pagination.ts +144 -0
  455. package/src/internal/utils/values.ts +10 -0
  456. package/src/lib/generate.ts +7 -7
  457. package/src/lib/job.ts +9 -7
  458. package/src/lib/models.ts +8 -6
  459. package/src/lib/query.ts +42 -0
  460. package/src/lib/scenario.ts +8 -0
  461. package/src/lib/scope.ts +42 -7
  462. package/src/lib/upload.ts +10 -8
  463. package/src/lib/workflow.ts +9 -7
  464. package/src/lib/workflow_validator.ts +115 -0
  465. package/src/resources/assets/assets.ts +192 -33
  466. package/src/resources/assets/download.ts +43 -8
  467. package/src/resources/collections/assets.ts +3 -2
  468. package/src/resources/collections/collections.ts +20 -5
  469. package/src/resources/collections/models.ts +3 -2
  470. package/src/resources/generate.ts +2350 -186
  471. package/src/resources/index.ts +34 -0
  472. package/src/resources/jobs.ts +204 -74
  473. package/src/resources/models/description.ts +10 -2
  474. package/src/resources/models/examples.ts +140 -46
  475. package/src/resources/models/index.ts +25 -0
  476. package/src/resources/models/models.ts +326 -88
  477. package/src/resources/models/presets.ts +1335 -0
  478. package/src/resources/models/prompt-guide.ts +102 -0
  479. package/src/resources/models/scores.ts +383 -0
  480. package/src/resources/models/train.ts +121 -46
  481. package/src/resources/models/training-images.ts +5 -4
  482. package/src/resources/projects/api-keys.ts +86 -0
  483. package/src/resources/projects/brief.ts +197 -0
  484. package/src/resources/projects/index.ts +71 -0
  485. package/src/resources/projects/instructions.ts +134 -0
  486. package/src/resources/projects/members.ts +958 -0
  487. package/src/resources/projects/memory.ts +134 -0
  488. package/src/resources/projects/projects.ts +1478 -0
  489. package/src/resources/projects/watermark.ts +590 -0
  490. package/src/resources/projects/webhook-endpoints/events.ts +179 -0
  491. package/src/resources/projects/webhook-endpoints/index.ts +19 -0
  492. package/src/resources/projects/webhook-endpoints/webhook-endpoints.ts +452 -0
  493. package/src/resources/projects/webhook-endpoints.ts +3 -0
  494. package/src/resources/projects.ts +3 -0
  495. package/src/resources/recommendations.ts +1502 -0
  496. package/src/resources/search.ts +4 -3
  497. package/src/resources/tags.ts +5 -1
  498. package/src/resources/teams/brief.ts +193 -0
  499. package/src/resources/teams/index.ts +62 -0
  500. package/src/resources/teams/ip-filters.ts +177 -0
  501. package/src/resources/teams/members.ts +282 -0
  502. package/src/resources/teams/teams.ts +1255 -0
  503. package/src/resources/teams/watermark.ts +590 -0
  504. package/src/resources/teams/webhook-endpoints/events.ts +179 -0
  505. package/src/resources/teams/webhook-endpoints/index.ts +19 -0
  506. package/src/resources/teams/webhook-endpoints/webhook-endpoints.ts +453 -0
  507. package/src/resources/teams/webhook-endpoints.ts +3 -0
  508. package/src/resources/teams.ts +3 -0
  509. package/src/resources/uploads.ts +15 -3
  510. package/src/resources/usages.ts +58 -23
  511. package/src/resources/workflows.ts +1707 -241
  512. package/src/version.ts +1 -1
  513. package/version.d.mts +1 -1
  514. package/version.d.ts +1 -1
  515. package/version.js +1 -1
  516. package/version.mjs +1 -1
@@ -4,6 +4,7 @@ import { APIResource } from '../../core/resource';
4
4
  import { APIPromise } from '../../core/api-promise';
5
5
  import { RequestOptions } from '../../internal/request-options';
6
6
  import { path } from '../../internal/utils/path';
7
+ import { omitUndefined } from '../../internal/utils/values';
7
8
 
8
9
  export class Train extends APIResource {
9
10
  /**
@@ -16,9 +17,9 @@ export class Train extends APIResource {
16
17
  ): APIPromise<TrainActionResponse> {
17
18
  const { projectId, ...body } = params;
18
19
  return this._client.post(path`/models/${modelID}/train/action`, {
19
- query: { projectId },
20
20
  body,
21
21
  ...options,
22
+ query: { projectId, ...omitUndefined(options?.query) },
22
23
  });
23
24
  }
24
25
 
@@ -32,9 +33,9 @@ export class Train extends APIResource {
32
33
  ): APIPromise<TrainTriggerResponse> {
33
34
  const { dryRun, originalAssets, projectId, trainingImagesCount, ...body } = params;
34
35
  return this._client.put(path`/models/${modelID}/train`, {
35
- query: { dryRun, originalAssets, projectId, trainingImagesCount },
36
36
  body,
37
37
  ...options,
38
+ query: { dryRun, originalAssets, projectId, trainingImagesCount, ...omitUndefined(options?.query) },
38
39
  });
39
40
  }
40
41
  }
@@ -179,8 +180,8 @@ export namespace TrainActionResponse {
179
180
  updatedAt: string;
180
181
 
181
182
  /**
182
- * The access restrictions of the model 0: Free plan 25: Creator plan 50: Pro plan
183
- * 75: Team plan 100: Enterprise plan
183
+ * The access restrictions of the model 0: Free plan 25: Starter plan 50: Pro plan
184
+ * 75: Max plan 100: Enterprise plan
184
185
  */
185
186
  accessRestrictions?: 0 | 100 | 25 | 50 | 75;
186
187
 
@@ -229,6 +230,12 @@ export namespace TrainActionResponse {
229
230
  */
230
231
  inputs?: Array<Model.Input>;
231
232
 
233
+ /**
234
+ * The ID of the job that trained the model, returned to the model owner only
235
+ * (example: "job_ocZCnG1Df35XRL1QyCZSRxAG8")
236
+ */
237
+ jobId?: string;
238
+
232
239
  /**
233
240
  * The model keyword, this is a legacy parameter, please use conceptPrompt in
234
241
  * parameters
@@ -618,8 +625,7 @@ export namespace TrainActionResponse {
618
625
  * - \`ifNotDefined\`: Input is required when another specified input is not
619
626
  * defined
620
627
  * - \`ifDefined\`: Input is required when another specified input is defined
621
- * - \`conditionalValues\`: Input is required when another input has a specific
622
- * value
628
+ * - \`conditional\`: Input is required when other inputs have specific values
623
629
  *
624
630
  * By default, the input is not required.
625
631
  */
@@ -639,8 +645,7 @@ export namespace TrainActionResponse {
639
645
  * - \`ifNotDefined\`: Input is required when another specified input is not
640
646
  * defined
641
647
  * - \`ifDefined\`: Input is required when another specified input is defined
642
- * - \`conditionalValues\`: Input is required when another input has a specific
643
- * value
648
+ * - \`conditional\`: Input is required when other inputs have specific values
644
649
  *
645
650
  * By default, the input is not required.
646
651
  */
@@ -651,12 +656,9 @@ export namespace TrainActionResponse {
651
656
  always?: boolean;
652
657
 
653
658
  /**
654
- * Makes this input required when another input has a specific value:
655
- *
656
- * - Key: name of the input to check
657
- * - Value: operation and allowed values that trigger the requirement
659
+ * Makes this input required when other inputs have one of the listed values
658
660
  */
659
- conditionalValues?: unknown;
661
+ conditional?: Required.Conditional;
660
662
 
661
663
  /**
662
664
  * Makes this input required when another input is defined:
@@ -674,6 +676,26 @@ export namespace TrainActionResponse {
674
676
  */
675
677
  ifNotDefined?: unknown;
676
678
  }
679
+
680
+ export namespace Required {
681
+ /**
682
+ * Makes this input required when other inputs have one of the listed values
683
+ */
684
+ export interface Conditional {
685
+ /**
686
+ * The conditions to check:
687
+ *
688
+ * - Key: name of the input to check
689
+ * - Value: values of that input that satisfy the condition
690
+ */
691
+ values: unknown;
692
+
693
+ /**
694
+ * How the conditions combine: \`and\` (all must match) or \`or\` (any must match)
695
+ */
696
+ operator?: 'and' | 'or';
697
+ }
698
+ }
677
699
  }
678
700
 
679
701
  /**
@@ -1581,6 +1603,7 @@ export namespace TrainTriggerResponse {
1581
1603
  | 'remove-background'
1582
1604
  | 'transform'
1583
1605
  | 'user-approval'
1606
+ | 'user-selection'
1584
1607
  | 'workflow';
1585
1608
 
1586
1609
  /**
@@ -1611,14 +1634,15 @@ export namespace TrainTriggerResponse {
1611
1634
  includeOutputsInWorkflowJob?: true;
1612
1635
 
1613
1636
  /**
1614
- * The inputs of the node.
1637
+ * The inputs of the node. For a user-selection node, the array input's `min`/`max`
1638
+ * bound how many items the user may pick (defaults: 1 and 100); conditional
1639
+ * connections may be present as additional inputs.
1615
1640
  */
1616
1641
  inputs?: Array<Flow.Input>;
1617
1642
 
1618
1643
  /**
1619
- * Statically-configured items for a List node. The node outputs this array as-is
1620
- * when executed. Only available for List nodes. The values can be strings,
1621
- * numbers, or asset IDs.
1644
+ * Statically-configured items for a List node, or the frozen candidate list of a
1645
+ * UserSelection node. The values can be strings, numbers, or asset IDs.
1622
1646
  */
1623
1647
  items?: Array<string>;
1624
1648
 
@@ -1898,8 +1922,7 @@ export namespace TrainTriggerResponse {
1898
1922
  * - \`ifNotDefined\`: Input is required when another specified input is not
1899
1923
  * defined
1900
1924
  * - \`ifDefined\`: Input is required when another specified input is defined
1901
- * - \`conditionalValues\`: Input is required when another input has a specific
1902
- * value
1925
+ * - \`conditional\`: Input is required when other inputs have specific values
1903
1926
  *
1904
1927
  * By default, the input is not required.
1905
1928
  */
@@ -2129,8 +2152,7 @@ export namespace TrainTriggerResponse {
2129
2152
  * - \`ifNotDefined\`: Input is required when another specified input is not
2130
2153
  * defined
2131
2154
  * - \`ifDefined\`: Input is required when another specified input is defined
2132
- * - \`conditionalValues\`: Input is required when another input has a specific
2133
- * value
2155
+ * - \`conditional\`: Input is required when other inputs have specific values
2134
2156
  *
2135
2157
  * By default, the input is not required.
2136
2158
  */
@@ -2187,8 +2209,7 @@ export namespace TrainTriggerResponse {
2187
2209
  * - \`ifNotDefined\`: Input is required when another specified input is not
2188
2210
  * defined
2189
2211
  * - \`ifDefined\`: Input is required when another specified input is defined
2190
- * - \`conditionalValues\`: Input is required when another input has a specific
2191
- * value
2212
+ * - \`conditional\`: Input is required when other inputs have specific values
2192
2213
  *
2193
2214
  * By default, the input is not required.
2194
2215
  */
@@ -2199,12 +2220,9 @@ export namespace TrainTriggerResponse {
2199
2220
  always?: boolean;
2200
2221
 
2201
2222
  /**
2202
- * Makes this input required when another input has a specific value:
2203
- *
2204
- * - Key: name of the input to check
2205
- * - Value: operation and allowed values that trigger the requirement
2223
+ * Makes this input required when other inputs have one of the listed values
2206
2224
  */
2207
- conditionalValues?: unknown;
2225
+ conditional?: Required.Conditional;
2208
2226
 
2209
2227
  /**
2210
2228
  * Makes this input required when another input is defined:
@@ -2222,6 +2240,26 @@ export namespace TrainTriggerResponse {
2222
2240
  */
2223
2241
  ifNotDefined?: unknown;
2224
2242
  }
2243
+
2244
+ export namespace Required {
2245
+ /**
2246
+ * Makes this input required when other inputs have one of the listed values
2247
+ */
2248
+ export interface Conditional {
2249
+ /**
2250
+ * The conditions to check:
2251
+ *
2252
+ * - Key: name of the input to check
2253
+ * - Value: values of that input that satisfy the condition
2254
+ */
2255
+ values: unknown;
2256
+
2257
+ /**
2258
+ * How the conditions combine: \`and\` (all must match) or \`or\` (any must match)
2259
+ */
2260
+ operator?: 'and' | 'or';
2261
+ }
2262
+ }
2225
2263
  }
2226
2264
 
2227
2265
  /**
@@ -2262,8 +2300,7 @@ export namespace TrainTriggerResponse {
2262
2300
  * - \`ifNotDefined\`: Input is required when another specified input is not
2263
2301
  * defined
2264
2302
  * - \`ifDefined\`: Input is required when another specified input is defined
2265
- * - \`conditionalValues\`: Input is required when another input has a specific
2266
- * value
2303
+ * - \`conditional\`: Input is required when other inputs have specific values
2267
2304
  *
2268
2305
  * By default, the input is not required.
2269
2306
  */
@@ -2274,12 +2311,9 @@ export namespace TrainTriggerResponse {
2274
2311
  always?: boolean;
2275
2312
 
2276
2313
  /**
2277
- * Makes this input required when another input has a specific value:
2278
- *
2279
- * - Key: name of the input to check
2280
- * - Value: operation and allowed values that trigger the requirement
2314
+ * Makes this input required when other inputs have one of the listed values
2281
2315
  */
2282
- conditionalValues?: unknown;
2316
+ conditional?: Required.Conditional;
2283
2317
 
2284
2318
  /**
2285
2319
  * Makes this input required when another input is defined:
@@ -2297,6 +2331,26 @@ export namespace TrainTriggerResponse {
2297
2331
  */
2298
2332
  ifNotDefined?: unknown;
2299
2333
  }
2334
+
2335
+ export namespace Required {
2336
+ /**
2337
+ * Makes this input required when other inputs have one of the listed values
2338
+ */
2339
+ export interface Conditional {
2340
+ /**
2341
+ * The conditions to check:
2342
+ *
2343
+ * - Key: name of the input to check
2344
+ * - Value: values of that input that satisfy the condition
2345
+ */
2346
+ values: unknown;
2347
+
2348
+ /**
2349
+ * How the conditions combine: \`and\` (all must match) or \`or\` (any must match)
2350
+ */
2351
+ operator?: 'and' | 'or';
2352
+ }
2353
+ }
2300
2354
  }
2301
2355
 
2302
2356
  /**
@@ -2544,8 +2598,8 @@ export namespace TrainTriggerResponse {
2544
2598
  updatedAt: string;
2545
2599
 
2546
2600
  /**
2547
- * The access restrictions of the model 0: Free plan 25: Creator plan 50: Pro plan
2548
- * 75: Team plan 100: Enterprise plan
2601
+ * The access restrictions of the model 0: Free plan 25: Starter plan 50: Pro plan
2602
+ * 75: Max plan 100: Enterprise plan
2549
2603
  */
2550
2604
  accessRestrictions?: 0 | 100 | 25 | 50 | 75;
2551
2605
 
@@ -2594,6 +2648,12 @@ export namespace TrainTriggerResponse {
2594
2648
  */
2595
2649
  inputs?: Array<Model.Input>;
2596
2650
 
2651
+ /**
2652
+ * The ID of the job that trained the model, returned to the model owner only
2653
+ * (example: "job_ocZCnG1Df35XRL1QyCZSRxAG8")
2654
+ */
2655
+ jobId?: string;
2656
+
2597
2657
  /**
2598
2658
  * The model keyword, this is a legacy parameter, please use conceptPrompt in
2599
2659
  * parameters
@@ -2983,8 +3043,7 @@ export namespace TrainTriggerResponse {
2983
3043
  * - \`ifNotDefined\`: Input is required when another specified input is not
2984
3044
  * defined
2985
3045
  * - \`ifDefined\`: Input is required when another specified input is defined
2986
- * - \`conditionalValues\`: Input is required when another input has a specific
2987
- * value
3046
+ * - \`conditional\`: Input is required when other inputs have specific values
2988
3047
  *
2989
3048
  * By default, the input is not required.
2990
3049
  */
@@ -3004,8 +3063,7 @@ export namespace TrainTriggerResponse {
3004
3063
  * - \`ifNotDefined\`: Input is required when another specified input is not
3005
3064
  * defined
3006
3065
  * - \`ifDefined\`: Input is required when another specified input is defined
3007
- * - \`conditionalValues\`: Input is required when another input has a specific
3008
- * value
3066
+ * - \`conditional\`: Input is required when other inputs have specific values
3009
3067
  *
3010
3068
  * By default, the input is not required.
3011
3069
  */
@@ -3016,12 +3074,9 @@ export namespace TrainTriggerResponse {
3016
3074
  always?: boolean;
3017
3075
 
3018
3076
  /**
3019
- * Makes this input required when another input has a specific value:
3020
- *
3021
- * - Key: name of the input to check
3022
- * - Value: operation and allowed values that trigger the requirement
3077
+ * Makes this input required when other inputs have one of the listed values
3023
3078
  */
3024
- conditionalValues?: unknown;
3079
+ conditional?: Required.Conditional;
3025
3080
 
3026
3081
  /**
3027
3082
  * Makes this input required when another input is defined:
@@ -3039,6 +3094,26 @@ export namespace TrainTriggerResponse {
3039
3094
  */
3040
3095
  ifNotDefined?: unknown;
3041
3096
  }
3097
+
3098
+ export namespace Required {
3099
+ /**
3100
+ * Makes this input required when other inputs have one of the listed values
3101
+ */
3102
+ export interface Conditional {
3103
+ /**
3104
+ * The conditions to check:
3105
+ *
3106
+ * - Key: name of the input to check
3107
+ * - Value: values of that input that satisfy the condition
3108
+ */
3109
+ values: unknown;
3110
+
3111
+ /**
3112
+ * How the conditions combine: \`and\` (all must match) or \`or\` (any must match)
3113
+ */
3114
+ operator?: 'and' | 'or';
3115
+ }
3116
+ }
3042
3117
  }
3043
3118
 
3044
3119
  /**
@@ -4,6 +4,7 @@ import { APIResource } from '../../core/resource';
4
4
  import { APIPromise } from '../../core/api-promise';
5
5
  import { RequestOptions } from '../../internal/request-options';
6
6
  import { path } from '../../internal/utils/path';
7
+ import { omitUndefined } from '../../internal/utils/values';
7
8
 
8
9
  export class TrainingImages extends APIResource {
9
10
  /**
@@ -16,8 +17,8 @@ export class TrainingImages extends APIResource {
16
17
  ): APIPromise<unknown> {
17
18
  const { modelId, projectId } = params;
18
19
  return this._client.delete(path`/models/${modelId}/training-images/${trainingImageID}`, {
19
- query: { projectId },
20
20
  ...options,
21
+ query: { projectId, ...omitUndefined(options?.query) },
21
22
  });
22
23
  }
23
24
 
@@ -31,9 +32,9 @@ export class TrainingImages extends APIResource {
31
32
  ): APIPromise<TrainingImageAddResponse> {
32
33
  const { originalAssets, projectId, ...body } = params;
33
34
  return this._client.post(path`/models/${modelID}/training-images`, {
34
- query: { originalAssets, projectId },
35
35
  body,
36
36
  ...options,
37
+ query: { originalAssets, projectId, ...omitUndefined(options?.query) },
37
38
  });
38
39
  }
39
40
 
@@ -47,9 +48,9 @@ export class TrainingImages extends APIResource {
47
48
  ): APIPromise<TrainingImageReplaceResponse> {
48
49
  const { modelId, originalAssets, projectId, ...body } = params;
49
50
  return this._client.put(path`/models/${modelId}/training-images/${trainingImageID}`, {
50
- query: { originalAssets, projectId },
51
51
  body,
52
52
  ...options,
53
+ query: { originalAssets, projectId, ...omitUndefined(options?.query) },
53
54
  });
54
55
  }
55
56
 
@@ -63,9 +64,9 @@ export class TrainingImages extends APIResource {
63
64
  ): APIPromise<TrainingImageReplacePairsResponse> {
64
65
  const { body, projectId } = params;
65
66
  return this._client.put(path`/models/${modelID}/training-images/pairs`, {
66
- query: { projectId },
67
67
  body: body,
68
68
  ...options,
69
+ query: { projectId, ...omitUndefined(options?.query) },
69
70
  });
70
71
  }
71
72
  }
@@ -0,0 +1,86 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../core/resource';
4
+ import { APIPromise } from '../../core/api-promise';
5
+ import { RequestOptions } from '../../internal/request-options';
6
+ import { path } from '../../internal/utils/path';
7
+
8
+ export class APIKeys extends APIResource {
9
+ /**
10
+ * Create an API key for a particular project
11
+ */
12
+ create(
13
+ projectID: string,
14
+ body: APIKeyCreateParams,
15
+ options?: RequestOptions,
16
+ ): APIPromise<APIKeyCreateResponse> {
17
+ return this._client.post(path`/projects/${projectID}/api-keys`, { body, ...options });
18
+ }
19
+
20
+ /**
21
+ * Delete a particular api key
22
+ */
23
+ delete(keyID: string, params: APIKeyDeleteParams, options?: RequestOptions): APIPromise<unknown> {
24
+ const { projectId } = params;
25
+ return this._client.delete(path`/projects/${projectId}/api-keys/${keyID}`, options);
26
+ }
27
+ }
28
+
29
+ export interface APIKeyCreateResponse {
30
+ id: string;
31
+
32
+ authorId: string;
33
+
34
+ createdAt: string;
35
+
36
+ ownerType: 'project' | 'team';
37
+
38
+ secret: string;
39
+
40
+ /**
41
+ * The key's member id (`apiu_...`), taken by the member routes; the api-keys
42
+ * routes take `id`.
43
+ */
44
+ userId: string;
45
+
46
+ ownerId?: string;
47
+
48
+ teamId?: string;
49
+ }
50
+
51
+ export type APIKeyDeleteResponse = unknown;
52
+
53
+ export interface APIKeyCreateParams {
54
+ /**
55
+ * Optional spending cap (CU) for this key over the billing period: a value >= 0 to
56
+ * cap, or -1 for unlimited. Omit to inherit the default.
57
+ */
58
+ maxConsumption?: number;
59
+
60
+ /**
61
+ * The API Key name
62
+ */
63
+ name?: string;
64
+
65
+ /**
66
+ * Project role: a built-in role (admin | editor | reader) or a custom inline
67
+ * ";"-separated scope list (e.g. "assets.read;workflows.run"). Defaults to editor.
68
+ */
69
+ role?: string;
70
+ }
71
+
72
+ export interface APIKeyDeleteParams {
73
+ /**
74
+ * The project Id on which the api key exists
75
+ */
76
+ projectId: string;
77
+ }
78
+
79
+ export declare namespace APIKeys {
80
+ export {
81
+ type APIKeyCreateResponse as APIKeyCreateResponse,
82
+ type APIKeyDeleteResponse as APIKeyDeleteResponse,
83
+ type APIKeyCreateParams as APIKeyCreateParams,
84
+ type APIKeyDeleteParams as APIKeyDeleteParams,
85
+ };
86
+ }
@@ -0,0 +1,197 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../core/resource';
4
+ import { APIPromise } from '../../core/api-promise';
5
+ import { RequestOptions } from '../../internal/request-options';
6
+ import { path } from '../../internal/utils/path';
7
+
8
+ export class Brief extends APIResource {
9
+ /**
10
+ * Get the project's Quality Gate brief
11
+ */
12
+ retrieve(projectID: string, options?: RequestOptions): APIPromise<BriefRetrieveResponse> {
13
+ return this._client.get(path`/projects/${projectID}/brief`, options);
14
+ }
15
+
16
+ /**
17
+ * Create or update the project's Quality Gate brief
18
+ */
19
+ update(
20
+ projectID: string,
21
+ body: BriefUpdateParams,
22
+ options?: RequestOptions,
23
+ ): APIPromise<BriefUpdateResponse> {
24
+ return this._client.put(path`/projects/${projectID}/brief`, { body, ...options });
25
+ }
26
+
27
+ /**
28
+ * Delete the project's Quality Gate brief
29
+ */
30
+ delete(projectID: string, options?: RequestOptions): APIPromise<BriefDeleteResponse> {
31
+ return this._client.delete(path`/projects/${projectID}/brief`, options);
32
+ }
33
+ }
34
+
35
+ export interface BriefRetrieveResponse {
36
+ /**
37
+ * A brand-style / project-rules / campaign-context brief stored at one scope.
38
+ */
39
+ brief: BriefRetrieveResponse.Brief;
40
+ }
41
+
42
+ export namespace BriefRetrieveResponse {
43
+ /**
44
+ * A brand-style / project-rules / campaign-context brief stored at one scope.
45
+ */
46
+ export interface Brief {
47
+ /**
48
+ * Stable identifier derived from level + scopeId
49
+ */
50
+ id: string;
51
+
52
+ /**
53
+ * Free-text brief: brand style, rules, campaign context
54
+ */
55
+ body: string;
56
+
57
+ /**
58
+ * ISO-8601 creation timestamp
59
+ */
60
+ createdAt: string;
61
+
62
+ /**
63
+ * User id that last wrote the brief
64
+ */
65
+ createdBy: string;
66
+
67
+ /**
68
+ * Whether the brief is applied during verification
69
+ */
70
+ enabled: boolean;
71
+
72
+ /**
73
+ * Scope this brief applies to: team or project
74
+ */
75
+ level: 'project' | 'team';
76
+
77
+ /**
78
+ * Reference assets the verifier compares the image against
79
+ */
80
+ referenceAssetIds: Array<string>;
81
+
82
+ /**
83
+ * The id of the team or project that owns this brief
84
+ */
85
+ scopeId: string;
86
+
87
+ /**
88
+ * ISO-8601 last-update timestamp
89
+ */
90
+ updatedAt: string;
91
+
92
+ /**
93
+ * Threshold strictness applied when verifying against this scope
94
+ */
95
+ sensitivity?: 'high' | 'low' | 'medium';
96
+ }
97
+ }
98
+
99
+ export interface BriefUpdateResponse {
100
+ /**
101
+ * A brand-style / project-rules / campaign-context brief stored at one scope.
102
+ */
103
+ brief: BriefUpdateResponse.Brief;
104
+ }
105
+
106
+ export namespace BriefUpdateResponse {
107
+ /**
108
+ * A brand-style / project-rules / campaign-context brief stored at one scope.
109
+ */
110
+ export interface Brief {
111
+ /**
112
+ * Stable identifier derived from level + scopeId
113
+ */
114
+ id: string;
115
+
116
+ /**
117
+ * Free-text brief: brand style, rules, campaign context
118
+ */
119
+ body: string;
120
+
121
+ /**
122
+ * ISO-8601 creation timestamp
123
+ */
124
+ createdAt: string;
125
+
126
+ /**
127
+ * User id that last wrote the brief
128
+ */
129
+ createdBy: string;
130
+
131
+ /**
132
+ * Whether the brief is applied during verification
133
+ */
134
+ enabled: boolean;
135
+
136
+ /**
137
+ * Scope this brief applies to: team or project
138
+ */
139
+ level: 'project' | 'team';
140
+
141
+ /**
142
+ * Reference assets the verifier compares the image against
143
+ */
144
+ referenceAssetIds: Array<string>;
145
+
146
+ /**
147
+ * The id of the team or project that owns this brief
148
+ */
149
+ scopeId: string;
150
+
151
+ /**
152
+ * ISO-8601 last-update timestamp
153
+ */
154
+ updatedAt: string;
155
+
156
+ /**
157
+ * Threshold strictness applied when verifying against this scope
158
+ */
159
+ sensitivity?: 'high' | 'low' | 'medium';
160
+ }
161
+ }
162
+
163
+ export interface BriefDeleteResponse {
164
+ deleted: boolean;
165
+ }
166
+
167
+ export interface BriefUpdateParams {
168
+ /**
169
+ * Free-text brief content
170
+ */
171
+ body: string;
172
+
173
+ /**
174
+ * Whether the brief is applied during verification (default true)
175
+ */
176
+ enabled?: boolean;
177
+
178
+ /**
179
+ * Reference assets the verifier compares against (max 10). Send [] to clear.
180
+ */
181
+ referenceAssetIds?: Array<string>;
182
+
183
+ /**
184
+ * Threshold strictness stored for this scope: low, medium, or high. Applied to
185
+ * verifications unless the verify call passes its own sensitivity.
186
+ */
187
+ sensitivity?: 'high' | 'low' | 'medium';
188
+ }
189
+
190
+ export declare namespace Brief {
191
+ export {
192
+ type BriefRetrieveResponse as BriefRetrieveResponse,
193
+ type BriefUpdateResponse as BriefUpdateResponse,
194
+ type BriefDeleteResponse as BriefDeleteResponse,
195
+ type BriefUpdateParams as BriefUpdateParams,
196
+ };
197
+ }