@nodaro/sdk 2.29.0 → 2.31.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 (716) hide show
  1. package/README.md +31 -0
  2. package/dist/chunk-2DZWWIJ4.cjs +32 -0
  3. package/dist/chunk-2DZWWIJ4.cjs.map +1 -0
  4. package/dist/chunk-34PU2DAT.cjs +118 -0
  5. package/dist/chunk-34PU2DAT.cjs.map +1 -0
  6. package/dist/chunk-37Y5QAVA.js +3 -0
  7. package/dist/chunk-37Y5QAVA.js.map +1 -0
  8. package/dist/chunk-37YCKZX4.cjs +4 -0
  9. package/dist/chunk-37YCKZX4.cjs.map +1 -0
  10. package/dist/chunk-3B47IHB3.cjs +65 -0
  11. package/dist/chunk-3B47IHB3.cjs.map +1 -0
  12. package/dist/chunk-3BELHJBN.cjs +4 -0
  13. package/dist/chunk-3BELHJBN.cjs.map +1 -0
  14. package/dist/chunk-3PPSGM5X.js +3 -0
  15. package/dist/chunk-3PPSGM5X.js.map +1 -0
  16. package/dist/chunk-3QBH2VE2.cjs +80 -0
  17. package/dist/chunk-3QBH2VE2.cjs.map +1 -0
  18. package/dist/chunk-3QFTP5P5.js +102 -0
  19. package/dist/chunk-3QFTP5P5.js.map +1 -0
  20. package/dist/chunk-43FVH6LJ.cjs +123 -0
  21. package/dist/chunk-43FVH6LJ.cjs.map +1 -0
  22. package/dist/chunk-43NO4SGC.cjs +4 -0
  23. package/dist/chunk-43NO4SGC.cjs.map +1 -0
  24. package/dist/chunk-45CK55BH.cjs +4 -0
  25. package/dist/chunk-45CK55BH.cjs.map +1 -0
  26. package/dist/chunk-4NLVBYMW.js +280 -0
  27. package/dist/chunk-4NLVBYMW.js.map +1 -0
  28. package/dist/chunk-4WRDR4GN.js +102 -0
  29. package/dist/chunk-4WRDR4GN.js.map +1 -0
  30. package/dist/chunk-4WWSHV5G.cjs +4 -0
  31. package/dist/chunk-4WWSHV5G.cjs.map +1 -0
  32. package/dist/chunk-53SXNN3A.js +80 -0
  33. package/dist/chunk-53SXNN3A.js.map +1 -0
  34. package/dist/chunk-5ALNFATQ.cjs +27 -0
  35. package/dist/chunk-5ALNFATQ.cjs.map +1 -0
  36. package/dist/chunk-5UQNMNUE.cjs +4 -0
  37. package/dist/chunk-5UQNMNUE.cjs.map +1 -0
  38. package/dist/chunk-5WAI7VGO.js +184 -0
  39. package/dist/chunk-5WAI7VGO.js.map +1 -0
  40. package/dist/chunk-65E3JBFZ.js +52 -0
  41. package/dist/chunk-65E3JBFZ.js.map +1 -0
  42. package/dist/chunk-6JFNBAKV.js +3 -0
  43. package/dist/chunk-6JFNBAKV.js.map +1 -0
  44. package/dist/chunk-6OC6OKLY.cjs +4 -0
  45. package/dist/chunk-6OC6OKLY.cjs.map +1 -0
  46. package/dist/chunk-6OGGJQVA.js +25 -0
  47. package/dist/chunk-6OGGJQVA.js.map +1 -0
  48. package/dist/chunk-7A7HYFGM.js +3 -0
  49. package/dist/chunk-7A7HYFGM.js.map +1 -0
  50. package/dist/chunk-7ISSKQ6S.cjs +106 -0
  51. package/dist/chunk-7ISSKQ6S.cjs.map +1 -0
  52. package/dist/chunk-7LSFG2AF.js +194 -0
  53. package/dist/chunk-7LSFG2AF.js.map +1 -0
  54. package/dist/chunk-7MYKT2L4.cjs +4 -0
  55. package/dist/chunk-7MYKT2L4.cjs.map +1 -0
  56. package/dist/chunk-7QOCWJKD.cjs +25 -0
  57. package/dist/chunk-7QOCWJKD.cjs.map +1 -0
  58. package/dist/chunk-A2ZAFAWC.cjs +4 -0
  59. package/dist/chunk-A2ZAFAWC.cjs.map +1 -0
  60. package/dist/chunk-A3S55XGF.cjs +54 -0
  61. package/dist/chunk-A3S55XGF.cjs.map +1 -0
  62. package/dist/chunk-A3THLBFG.js +3 -0
  63. package/dist/chunk-A3THLBFG.js.map +1 -0
  64. package/dist/chunk-AJVSMNPZ.js +78 -0
  65. package/dist/chunk-AJVSMNPZ.js.map +1 -0
  66. package/dist/chunk-ALSLZG3U.js +124 -0
  67. package/dist/chunk-ALSLZG3U.js.map +1 -0
  68. package/dist/chunk-ALUUBPDG.cjs +4 -0
  69. package/dist/chunk-ALUUBPDG.cjs.map +1 -0
  70. package/dist/chunk-AO3W45LT.cjs +4 -0
  71. package/dist/chunk-AO3W45LT.cjs.map +1 -0
  72. package/dist/chunk-AUDHV3OE.js +3 -0
  73. package/dist/chunk-AUDHV3OE.js.map +1 -0
  74. package/dist/chunk-BAL576G2.cjs +4 -0
  75. package/dist/chunk-BAL576G2.cjs.map +1 -0
  76. package/dist/chunk-BFMKPELU.cjs +212 -0
  77. package/dist/chunk-BFMKPELU.cjs.map +1 -0
  78. package/dist/chunk-BKP6F2IX.js +3 -0
  79. package/dist/chunk-BKP6F2IX.js.map +1 -0
  80. package/dist/chunk-BLA44UCM.js +32 -0
  81. package/dist/chunk-BLA44UCM.js.map +1 -0
  82. package/dist/chunk-BPWUWUZ3.cjs +20 -0
  83. package/dist/chunk-BPWUWUZ3.cjs.map +1 -0
  84. package/dist/chunk-BRV7Z4GD.cjs +17 -0
  85. package/dist/chunk-BRV7Z4GD.cjs.map +1 -0
  86. package/dist/chunk-BU5A6K4C.js +122 -0
  87. package/dist/chunk-BU5A6K4C.js.map +1 -0
  88. package/dist/chunk-C22RJDW3.js +3 -0
  89. package/dist/chunk-C22RJDW3.js.map +1 -0
  90. package/dist/chunk-CGNVHN4V.js +3 -0
  91. package/dist/chunk-CGNVHN4V.js.map +1 -0
  92. package/dist/chunk-CJFIOVBA.js +3 -0
  93. package/dist/chunk-CJFIOVBA.js.map +1 -0
  94. package/dist/chunk-CJLLIVSB.cjs +4 -0
  95. package/dist/chunk-CJLLIVSB.cjs.map +1 -0
  96. package/dist/chunk-CK3AMMSC.js +194 -0
  97. package/dist/chunk-CK3AMMSC.js.map +1 -0
  98. package/dist/chunk-COCKKMNP.cjs +205 -0
  99. package/dist/chunk-COCKKMNP.cjs.map +1 -0
  100. package/dist/chunk-CR5E2SF3.cjs +212 -0
  101. package/dist/chunk-CR5E2SF3.cjs.map +1 -0
  102. package/dist/chunk-CRCPRZFN.js +3 -0
  103. package/dist/chunk-CRCPRZFN.js.map +1 -0
  104. package/dist/chunk-CYRFD6KR.cjs +4 -0
  105. package/dist/chunk-CYRFD6KR.cjs.map +1 -0
  106. package/dist/chunk-D3PW7AHZ.js +3 -0
  107. package/dist/chunk-D3PW7AHZ.js.map +1 -0
  108. package/dist/chunk-DKEYSJCE.cjs +82 -0
  109. package/dist/chunk-DKEYSJCE.cjs.map +1 -0
  110. package/dist/chunk-DPSMVOM3.js +15 -0
  111. package/dist/chunk-DPSMVOM3.js.map +1 -0
  112. package/dist/chunk-E2ZXHS6E.js +20 -0
  113. package/dist/chunk-E2ZXHS6E.js.map +1 -0
  114. package/dist/chunk-E37CVHWW.js +33 -0
  115. package/dist/chunk-E37CVHWW.js.map +1 -0
  116. package/dist/chunk-E5BM4BLO.js +78 -0
  117. package/dist/chunk-E5BM4BLO.js.map +1 -0
  118. package/dist/chunk-EHRWTYGR.cjs +4 -0
  119. package/dist/chunk-EHRWTYGR.cjs.map +1 -0
  120. package/dist/chunk-EJSGJDZY.js +212 -0
  121. package/dist/chunk-EJSGJDZY.js.map +1 -0
  122. package/dist/chunk-ELSOVJPF.js +3 -0
  123. package/dist/chunk-ELSOVJPF.js.map +1 -0
  124. package/dist/chunk-ERLXU47J.js +29 -0
  125. package/dist/chunk-ERLXU47J.js.map +1 -0
  126. package/dist/chunk-ES2E65HT.js +3 -0
  127. package/dist/chunk-ES2E65HT.js.map +1 -0
  128. package/dist/chunk-EXLAHZKF.js +3 -0
  129. package/dist/chunk-EXLAHZKF.js.map +1 -0
  130. package/dist/chunk-FHEYAW5H.js +3 -0
  131. package/dist/chunk-FHEYAW5H.js.map +1 -0
  132. package/dist/chunk-GA4LZZKQ.cjs +104 -0
  133. package/dist/chunk-GA4LZZKQ.cjs.map +1 -0
  134. package/dist/chunk-GAZJ2PA3.js +3 -0
  135. package/dist/chunk-GAZJ2PA3.js.map +1 -0
  136. package/dist/chunk-GB6C5OEZ.cjs +32 -0
  137. package/dist/chunk-GB6C5OEZ.cjs.map +1 -0
  138. package/dist/chunk-GD24ZRFD.js +3 -0
  139. package/dist/chunk-GD24ZRFD.js.map +1 -0
  140. package/dist/chunk-GI7LROLL.cjs +4 -0
  141. package/dist/chunk-GI7LROLL.cjs.map +1 -0
  142. package/dist/chunk-GRFLPEM2.cjs +16 -0
  143. package/dist/chunk-GRFLPEM2.cjs.map +1 -0
  144. package/dist/chunk-GVIFLUYZ.cjs +40 -0
  145. package/dist/chunk-GVIFLUYZ.cjs.map +1 -0
  146. package/dist/chunk-H7VQTG4M.js +35 -0
  147. package/dist/chunk-H7VQTG4M.js.map +1 -0
  148. package/dist/chunk-HAKYPZLB.cjs +242 -0
  149. package/dist/chunk-HAKYPZLB.cjs.map +1 -0
  150. package/dist/chunk-HFBR6G36.js +3 -0
  151. package/dist/chunk-HFBR6G36.js.map +1 -0
  152. package/dist/chunk-HGCVWOGK.cjs +209 -0
  153. package/dist/chunk-HGCVWOGK.cjs.map +1 -0
  154. package/dist/chunk-HLHR3R4P.js +3 -0
  155. package/dist/chunk-HLHR3R4P.js.map +1 -0
  156. package/dist/chunk-HRXXGGSJ.js +3 -0
  157. package/dist/chunk-HRXXGGSJ.js.map +1 -0
  158. package/dist/chunk-I3TYBAOX.js +3 -0
  159. package/dist/chunk-I3TYBAOX.js.map +1 -0
  160. package/dist/chunk-I4A5VJRL.js +352 -0
  161. package/dist/chunk-I4A5VJRL.js.map +1 -0
  162. package/dist/chunk-I6CXC345.js +102 -0
  163. package/dist/chunk-I6CXC345.js.map +1 -0
  164. package/dist/chunk-IGOPUMEX.cjs +4 -0
  165. package/dist/chunk-IGOPUMEX.cjs.map +1 -0
  166. package/dist/chunk-IHKIYVZQ.js +30 -0
  167. package/dist/chunk-IHKIYVZQ.js.map +1 -0
  168. package/dist/chunk-IMC2M5YM.cjs +12 -0
  169. package/dist/chunk-IMC2M5YM.cjs.map +1 -0
  170. package/dist/chunk-IQ6KWSXP.js +3 -0
  171. package/dist/chunk-IQ6KWSXP.js.map +1 -0
  172. package/dist/chunk-IS26FJO7.cjs +4 -0
  173. package/dist/chunk-IS26FJO7.cjs.map +1 -0
  174. package/dist/chunk-J4WFSKY6.js +50 -0
  175. package/dist/chunk-J4WFSKY6.js.map +1 -0
  176. package/dist/chunk-J5LGGCAS.cjs +126 -0
  177. package/dist/chunk-J5LGGCAS.cjs.map +1 -0
  178. package/dist/chunk-JDEZHITT.js +43 -0
  179. package/dist/chunk-JDEZHITT.js.map +1 -0
  180. package/dist/chunk-JGS6YBDW.js +260 -0
  181. package/dist/chunk-JGS6YBDW.js.map +1 -0
  182. package/dist/chunk-JMOKD6ZP.js +46 -0
  183. package/dist/chunk-JMOKD6ZP.js.map +1 -0
  184. package/dist/chunk-JOX5BJ6K.cjs +4 -0
  185. package/dist/chunk-JOX5BJ6K.cjs.map +1 -0
  186. package/dist/chunk-JTAW54UM.js +116 -0
  187. package/dist/chunk-JTAW54UM.js.map +1 -0
  188. package/dist/chunk-K4RQOSJH.js +203 -0
  189. package/dist/chunk-K4RQOSJH.js.map +1 -0
  190. package/dist/chunk-KAIE6WJB.cjs +4 -0
  191. package/dist/chunk-KAIE6WJB.cjs.map +1 -0
  192. package/dist/chunk-KEDPGWIK.cjs +4 -0
  193. package/dist/chunk-KEDPGWIK.cjs.map +1 -0
  194. package/dist/chunk-KG4R454Z.js +18 -0
  195. package/dist/chunk-KG4R454Z.js.map +1 -0
  196. package/dist/chunk-KGKCAGRD.cjs +22 -0
  197. package/dist/chunk-KGKCAGRD.cjs.map +1 -0
  198. package/dist/chunk-KNMW722T.cjs +48 -0
  199. package/dist/chunk-KNMW722T.cjs.map +1 -0
  200. package/dist/chunk-KTTL7BND.cjs +4 -0
  201. package/dist/chunk-KTTL7BND.cjs.map +1 -0
  202. package/dist/chunk-KXEWTYS4.cjs +80 -0
  203. package/dist/chunk-KXEWTYS4.cjs.map +1 -0
  204. package/dist/chunk-KZQKFBRN.js +3 -0
  205. package/dist/chunk-KZQKFBRN.js.map +1 -0
  206. package/dist/chunk-LAWYFC4G.cjs +37 -0
  207. package/dist/chunk-LAWYFC4G.cjs.map +1 -0
  208. package/dist/chunk-LHP2CWHD.js +228 -0
  209. package/dist/chunk-LHP2CWHD.js.map +1 -0
  210. package/dist/chunk-LHRQXWI5.js +3 -0
  211. package/dist/chunk-LHRQXWI5.js.map +1 -0
  212. package/dist/chunk-LKH5M44B.cjs +114 -0
  213. package/dist/chunk-LKH5M44B.cjs.map +1 -0
  214. package/dist/chunk-LLNNHLCE.cjs +4 -0
  215. package/dist/chunk-LLNNHLCE.cjs.map +1 -0
  216. package/dist/chunk-LWZLWSXD.cjs +4 -0
  217. package/dist/chunk-LWZLWSXD.cjs.map +1 -0
  218. package/dist/chunk-M6Y5TOYE.js +3 -0
  219. package/dist/chunk-M6Y5TOYE.js.map +1 -0
  220. package/dist/chunk-MBFUMWI5.cjs +31 -0
  221. package/dist/chunk-MBFUMWI5.cjs.map +1 -0
  222. package/dist/chunk-MEKI37WI.js +3 -0
  223. package/dist/chunk-MEKI37WI.js.map +1 -0
  224. package/dist/chunk-MQ74AKA2.cjs +200 -0
  225. package/dist/chunk-MQ74AKA2.cjs.map +1 -0
  226. package/dist/chunk-N6GLZOE4.cjs +282 -0
  227. package/dist/chunk-N6GLZOE4.cjs.map +1 -0
  228. package/dist/chunk-NBVARNVA.cjs +38 -0
  229. package/dist/chunk-NBVARNVA.cjs.map +1 -0
  230. package/dist/chunk-NCCBS6GU.js +42 -0
  231. package/dist/chunk-NCCBS6GU.js.map +1 -0
  232. package/dist/chunk-NGKODS3J.cjs +52 -0
  233. package/dist/chunk-NGKODS3J.cjs.map +1 -0
  234. package/dist/chunk-NJVSKUL2.cjs +4 -0
  235. package/dist/chunk-NJVSKUL2.cjs.map +1 -0
  236. package/dist/chunk-NLQQHJ25.cjs +104 -0
  237. package/dist/chunk-NLQQHJ25.cjs.map +1 -0
  238. package/dist/chunk-NNHWH7ER.js +181 -0
  239. package/dist/chunk-NNHWH7ER.js.map +1 -0
  240. package/dist/chunk-NX67YIF3.js +3 -0
  241. package/dist/chunk-NX67YIF3.js.map +1 -0
  242. package/dist/chunk-OA6FWYZF.cjs +4 -0
  243. package/dist/chunk-OA6FWYZF.cjs.map +1 -0
  244. package/dist/chunk-OJDBSKC2.js +3 -0
  245. package/dist/chunk-OJDBSKC2.js.map +1 -0
  246. package/dist/chunk-OLPA44QJ.js +3 -0
  247. package/dist/chunk-OLPA44QJ.js.map +1 -0
  248. package/dist/chunk-OMH7ATOQ.js +3 -0
  249. package/dist/chunk-OMH7ATOQ.js.map +1 -0
  250. package/dist/chunk-OPR4TULG.js +3 -0
  251. package/dist/chunk-OPR4TULG.js.map +1 -0
  252. package/dist/chunk-OSX2GVZ2.cjs +34 -0
  253. package/dist/chunk-OSX2GVZ2.cjs.map +1 -0
  254. package/dist/chunk-OXQKE5EG.cjs +282 -0
  255. package/dist/chunk-OXQKE5EG.cjs.map +1 -0
  256. package/dist/chunk-P6E4QDJN.js +30 -0
  257. package/dist/chunk-P6E4QDJN.js.map +1 -0
  258. package/dist/chunk-PEMLIAPZ.cjs +64 -0
  259. package/dist/chunk-PEMLIAPZ.cjs.map +1 -0
  260. package/dist/chunk-PGYQ754I.js +3 -0
  261. package/dist/chunk-PGYQ754I.js.map +1 -0
  262. package/dist/chunk-PHKYIWE4.cjs +16 -0
  263. package/dist/chunk-PHKYIWE4.cjs.map +1 -0
  264. package/dist/chunk-PMTM26LL.js +3 -0
  265. package/dist/chunk-PMTM26LL.js.map +1 -0
  266. package/dist/chunk-PY4OEKNX.cjs +4 -0
  267. package/dist/chunk-PY4OEKNX.cjs.map +1 -0
  268. package/dist/chunk-PZS2EXDR.cjs +4 -0
  269. package/dist/chunk-PZS2EXDR.cjs.map +1 -0
  270. package/dist/chunk-QITJGSFA.js +210 -0
  271. package/dist/chunk-QITJGSFA.js.map +1 -0
  272. package/dist/chunk-QRHJEITQ.cjs +4 -0
  273. package/dist/chunk-QRHJEITQ.cjs.map +1 -0
  274. package/dist/chunk-QUFU5RJ7.cjs +4 -0
  275. package/dist/chunk-QUFU5RJ7.cjs.map +1 -0
  276. package/dist/chunk-QVQCKOBM.js +3 -0
  277. package/dist/chunk-QVQCKOBM.js.map +1 -0
  278. package/dist/chunk-R63TTR35.cjs +200 -0
  279. package/dist/chunk-R63TTR35.cjs.map +1 -0
  280. package/dist/chunk-RA42NMWV.cjs +4 -0
  281. package/dist/chunk-RA42NMWV.cjs.map +1 -0
  282. package/dist/chunk-RAZN6C5R.cjs +12 -0
  283. package/dist/chunk-RAZN6C5R.cjs.map +1 -0
  284. package/dist/chunk-REUFPWM7.cjs +233 -0
  285. package/dist/chunk-REUFPWM7.cjs.map +1 -0
  286. package/dist/chunk-RHETJOUM.cjs +4 -0
  287. package/dist/chunk-RHETJOUM.cjs.map +1 -0
  288. package/dist/chunk-RJIJVVXS.js +3 -0
  289. package/dist/chunk-RJIJVVXS.js.map +1 -0
  290. package/dist/chunk-RKVRCNMB.js +3 -0
  291. package/dist/chunk-RKVRCNMB.js.map +1 -0
  292. package/dist/chunk-SBV5MWEL.cjs +53 -0
  293. package/dist/chunk-SBV5MWEL.cjs.map +1 -0
  294. package/dist/chunk-SFB4YLCS.js +121 -0
  295. package/dist/chunk-SFB4YLCS.js.map +1 -0
  296. package/dist/chunk-SLPD47SR.js +3 -0
  297. package/dist/chunk-SLPD47SR.js.map +1 -0
  298. package/dist/chunk-SS3B6PHT.cjs +35 -0
  299. package/dist/chunk-SS3B6PHT.cjs.map +1 -0
  300. package/dist/chunk-SUCHGNYT.js +3 -0
  301. package/dist/chunk-SUCHGNYT.js.map +1 -0
  302. package/dist/chunk-SYVNY3AH.cjs +44 -0
  303. package/dist/chunk-SYVNY3AH.cjs.map +1 -0
  304. package/dist/chunk-T3SYREY4.js +29 -0
  305. package/dist/chunk-T3SYREY4.js.map +1 -0
  306. package/dist/chunk-T7N7DFQJ.js +198 -0
  307. package/dist/chunk-T7N7DFQJ.js.map +1 -0
  308. package/dist/chunk-TRCENAIY.cjs +4 -0
  309. package/dist/chunk-TRCENAIY.cjs.map +1 -0
  310. package/dist/chunk-TVENC6PH.js +186 -0
  311. package/dist/chunk-TVENC6PH.js.map +1 -0
  312. package/dist/chunk-U4T3Z3K7.cjs +325 -0
  313. package/dist/chunk-U4T3Z3K7.cjs.map +1 -0
  314. package/dist/chunk-UI2NXUML.cjs +187 -0
  315. package/dist/chunk-UI2NXUML.cjs.map +1 -0
  316. package/dist/chunk-UIFFNTUX.js +3 -0
  317. package/dist/chunk-UIFFNTUX.js.map +1 -0
  318. package/dist/chunk-V4GPQ6Y2.js +3 -0
  319. package/dist/chunk-V4GPQ6Y2.js.map +1 -0
  320. package/dist/chunk-VGTRKXF2.js +93 -0
  321. package/dist/chunk-VGTRKXF2.js.map +1 -0
  322. package/dist/chunk-VGWOIWRQ.cjs +202 -0
  323. package/dist/chunk-VGWOIWRQ.cjs.map +1 -0
  324. package/dist/chunk-VLCNNA76.cjs +4 -0
  325. package/dist/chunk-VLCNNA76.cjs.map +1 -0
  326. package/dist/chunk-VPAUN75Q.js +3 -0
  327. package/dist/chunk-VPAUN75Q.js.map +1 -0
  328. package/dist/chunk-VT237QF2.js +3 -0
  329. package/dist/chunk-VT237QF2.js.map +1 -0
  330. package/dist/chunk-VV4TZG5S.js +321 -0
  331. package/dist/chunk-VV4TZG5S.js.map +1 -0
  332. package/dist/chunk-VYK6MBL4.cjs +4 -0
  333. package/dist/chunk-VYK6MBL4.cjs.map +1 -0
  334. package/dist/chunk-W33CKW6Q.cjs +4 -0
  335. package/dist/chunk-W33CKW6Q.cjs.map +1 -0
  336. package/dist/chunk-W5VHATSR.cjs +31 -0
  337. package/dist/chunk-W5VHATSR.cjs.map +1 -0
  338. package/dist/chunk-W7YI5UT3.js +3 -0
  339. package/dist/chunk-W7YI5UT3.js.map +1 -0
  340. package/dist/chunk-WEQWU2IC.js +34 -0
  341. package/dist/chunk-WEQWU2IC.js.map +1 -0
  342. package/dist/chunk-WK4VXPPZ.cjs +104 -0
  343. package/dist/chunk-WK4VXPPZ.cjs.map +1 -0
  344. package/dist/chunk-WSA4LMWR.cjs +96 -0
  345. package/dist/chunk-WSA4LMWR.cjs.map +1 -0
  346. package/dist/chunk-WUIEZ6Z4.cjs +360 -0
  347. package/dist/chunk-WUIEZ6Z4.cjs.map +1 -0
  348. package/dist/chunk-WUKIJJG2.cjs +45 -0
  349. package/dist/chunk-WUKIJJG2.cjs.map +1 -0
  350. package/dist/chunk-WVFAQBS7.js +29 -0
  351. package/dist/chunk-WVFAQBS7.js.map +1 -0
  352. package/dist/chunk-X7RDNMN7.js +3 -0
  353. package/dist/chunk-X7RDNMN7.js.map +1 -0
  354. package/dist/chunk-X7XP5WBP.cjs +4 -0
  355. package/dist/chunk-X7XP5WBP.cjs.map +1 -0
  356. package/dist/chunk-XQAIEPAZ.js +104 -0
  357. package/dist/chunk-XQAIEPAZ.js.map +1 -0
  358. package/dist/chunk-XWKNE6DH.cjs +4 -0
  359. package/dist/chunk-XWKNE6DH.cjs.map +1 -0
  360. package/dist/chunk-Y6V6CBY5.js +23 -0
  361. package/dist/chunk-Y6V6CBY5.js.map +1 -0
  362. package/dist/chunk-Y6VDCZPB.js +62 -0
  363. package/dist/chunk-Y6VDCZPB.js.map +1 -0
  364. package/dist/chunk-YDRXBRW2.cjs +184 -0
  365. package/dist/chunk-YDRXBRW2.cjs.map +1 -0
  366. package/dist/chunk-YFS2LMG4.cjs +124 -0
  367. package/dist/chunk-YFS2LMG4.cjs.map +1 -0
  368. package/dist/chunk-YN6CBIIB.js +63 -0
  369. package/dist/chunk-YN6CBIIB.js.map +1 -0
  370. package/dist/chunk-YOJ2XNQX.cjs +4 -0
  371. package/dist/chunk-YOJ2XNQX.cjs.map +1 -0
  372. package/dist/chunk-YOOZB4RL.js +3 -0
  373. package/dist/chunk-YOOZB4RL.js.map +1 -0
  374. package/dist/chunk-YVU2M7MI.js +34 -0
  375. package/dist/chunk-YVU2M7MI.js.map +1 -0
  376. package/dist/chunk-YXBZRB5H.cjs +4 -0
  377. package/dist/chunk-YXBZRB5H.cjs.map +1 -0
  378. package/dist/chunk-Z3ZKFI2M.js +43 -0
  379. package/dist/chunk-Z3ZKFI2M.js.map +1 -0
  380. package/dist/chunk-Z5GLY4R3.js +112 -0
  381. package/dist/chunk-Z5GLY4R3.js.map +1 -0
  382. package/dist/chunk-Z5OMWAQX.js +3 -0
  383. package/dist/chunk-Z5OMWAQX.js.map +1 -0
  384. package/dist/chunk-Z7LGWNI7.js +38 -0
  385. package/dist/chunk-Z7LGWNI7.js.map +1 -0
  386. package/dist/chunk-ZCWKX4V6.cjs +38 -0
  387. package/dist/chunk-ZCWKX4V6.cjs.map +1 -0
  388. package/dist/chunk-ZE5RISBZ.cjs +4 -0
  389. package/dist/chunk-ZE5RISBZ.cjs.map +1 -0
  390. package/dist/chunk-ZH4F2P2G.js +3 -0
  391. package/dist/chunk-ZH4F2P2G.js.map +1 -0
  392. package/dist/chunk-ZJGFLJ2Z.cjs +4 -0
  393. package/dist/chunk-ZJGFLJ2Z.cjs.map +1 -0
  394. package/dist/chunk-ZKBHD27K.cjs +4 -0
  395. package/dist/chunk-ZKBHD27K.cjs.map +1 -0
  396. package/dist/chunk-ZQPLRNKX.cjs +4 -0
  397. package/dist/chunk-ZQPLRNKX.cjs.map +1 -0
  398. package/dist/chunk-ZQQABQMH.cjs +31 -0
  399. package/dist/chunk-ZQQABQMH.cjs.map +1 -0
  400. package/dist/chunk-ZXJQSFIA.js +200 -0
  401. package/dist/chunk-ZXJQSFIA.js.map +1 -0
  402. package/dist/developer-apps-zSQXWmEG.d.cts +294 -0
  403. package/dist/developer-apps-zSQXWmEG.d.ts +294 -0
  404. package/dist/entries/apps.cjs +13 -0
  405. package/dist/entries/apps.cjs.map +1 -0
  406. package/dist/entries/apps.d.cts +300 -0
  407. package/dist/entries/apps.d.ts +300 -0
  408. package/dist/entries/apps.js +4 -0
  409. package/dist/entries/apps.js.map +1 -0
  410. package/dist/entries/audio.cjs +13 -0
  411. package/dist/entries/audio.cjs.map +1 -0
  412. package/dist/entries/audio.d.cts +200 -0
  413. package/dist/entries/audio.d.ts +200 -0
  414. package/dist/entries/audio.js +4 -0
  415. package/dist/entries/audio.js.map +1 -0
  416. package/dist/entries/billing.cjs +13 -0
  417. package/dist/entries/billing.cjs.map +1 -0
  418. package/dist/entries/billing.d.cts +208 -0
  419. package/dist/entries/billing.d.ts +208 -0
  420. package/dist/entries/billing.js +4 -0
  421. package/dist/entries/billing.js.map +1 -0
  422. package/dist/entries/catalogs.cjs +13 -0
  423. package/dist/entries/catalogs.cjs.map +1 -0
  424. package/dist/entries/catalogs.d.cts +82 -0
  425. package/dist/entries/catalogs.d.ts +82 -0
  426. package/dist/entries/catalogs.js +4 -0
  427. package/dist/entries/catalogs.js.map +1 -0
  428. package/dist/entries/characters.cjs +45 -0
  429. package/dist/entries/characters.cjs.map +1 -0
  430. package/dist/entries/characters.d.cts +741 -0
  431. package/dist/entries/characters.d.ts +741 -0
  432. package/dist/entries/characters.js +4 -0
  433. package/dist/entries/characters.js.map +1 -0
  434. package/dist/entries/client.cjs +78 -0
  435. package/dist/entries/client.cjs.map +1 -0
  436. package/dist/entries/client.d.cts +147 -0
  437. package/dist/entries/client.d.ts +147 -0
  438. package/dist/entries/client.js +53 -0
  439. package/dist/entries/client.js.map +1 -0
  440. package/dist/entries/collections.cjs +13 -0
  441. package/dist/entries/collections.cjs.map +1 -0
  442. package/dist/entries/collections.d.cts +77 -0
  443. package/dist/entries/collections.d.ts +77 -0
  444. package/dist/entries/collections.js +4 -0
  445. package/dist/entries/collections.js.map +1 -0
  446. package/dist/entries/community.cjs +13 -0
  447. package/dist/entries/community.cjs.map +1 -0
  448. package/dist/entries/community.d.cts +87 -0
  449. package/dist/entries/community.d.ts +87 -0
  450. package/dist/entries/community.js +4 -0
  451. package/dist/entries/community.js.map +1 -0
  452. package/dist/entries/competitors.cjs +13 -0
  453. package/dist/entries/competitors.cjs.map +1 -0
  454. package/dist/entries/competitors.d.cts +96 -0
  455. package/dist/entries/competitors.d.ts +96 -0
  456. package/dist/entries/competitors.js +4 -0
  457. package/dist/entries/competitors.js.map +1 -0
  458. package/dist/entries/copilot.cjs +15 -0
  459. package/dist/entries/copilot.cjs.map +1 -0
  460. package/dist/entries/copilot.d.cts +296 -0
  461. package/dist/entries/copilot.d.ts +296 -0
  462. package/dist/entries/copilot.js +6 -0
  463. package/dist/entries/copilot.js.map +1 -0
  464. package/dist/entries/core.cjs +26 -0
  465. package/dist/entries/core.cjs.map +1 -0
  466. package/dist/entries/core.d.cts +3 -0
  467. package/dist/entries/core.d.ts +3 -0
  468. package/dist/entries/core.js +5 -0
  469. package/dist/entries/core.js.map +1 -0
  470. package/dist/entries/creatures.cjs +29 -0
  471. package/dist/entries/creatures.cjs.map +1 -0
  472. package/dist/entries/creatures.d.cts +594 -0
  473. package/dist/entries/creatures.d.ts +594 -0
  474. package/dist/entries/creatures.js +4 -0
  475. package/dist/entries/creatures.js.map +1 -0
  476. package/dist/entries/credits.cjs +13 -0
  477. package/dist/entries/credits.cjs.map +1 -0
  478. package/dist/entries/credits.d.cts +229 -0
  479. package/dist/entries/credits.d.ts +229 -0
  480. package/dist/entries/credits.js +4 -0
  481. package/dist/entries/credits.js.map +1 -0
  482. package/dist/entries/developer-apps.cjs +13 -0
  483. package/dist/entries/developer-apps.cjs.map +1 -0
  484. package/dist/entries/developer-apps.d.cts +3 -0
  485. package/dist/entries/developer-apps.d.ts +3 -0
  486. package/dist/entries/developer-apps.js +4 -0
  487. package/dist/entries/developer-apps.js.map +1 -0
  488. package/dist/entries/edit.cjs +34 -0
  489. package/dist/entries/edit.cjs.map +1 -0
  490. package/dist/entries/edit.d.cts +705 -0
  491. package/dist/entries/edit.d.ts +705 -0
  492. package/dist/entries/edit.js +5 -0
  493. package/dist/entries/edit.js.map +1 -0
  494. package/dist/entries/errors.cjs +93 -0
  495. package/dist/entries/errors.cjs.map +1 -0
  496. package/dist/entries/errors.d.cts +338 -0
  497. package/dist/entries/errors.d.ts +338 -0
  498. package/dist/entries/errors.js +4 -0
  499. package/dist/entries/errors.js.map +1 -0
  500. package/dist/entries/executions.cjs +21 -0
  501. package/dist/entries/executions.cjs.map +1 -0
  502. package/dist/entries/executions.d.cts +120 -0
  503. package/dist/entries/executions.d.ts +120 -0
  504. package/dist/entries/executions.js +4 -0
  505. package/dist/entries/executions.js.map +1 -0
  506. package/dist/entries/gallery.cjs +13 -0
  507. package/dist/entries/gallery.cjs.map +1 -0
  508. package/dist/entries/gallery.d.cts +85 -0
  509. package/dist/entries/gallery.d.ts +85 -0
  510. package/dist/entries/gallery.js +4 -0
  511. package/dist/entries/gallery.js.map +1 -0
  512. package/dist/entries/jobs.cjs +13 -0
  513. package/dist/entries/jobs.cjs.map +1 -0
  514. package/dist/entries/jobs.d.cts +252 -0
  515. package/dist/entries/jobs.d.ts +252 -0
  516. package/dist/entries/jobs.js +4 -0
  517. package/dist/entries/jobs.js.map +1 -0
  518. package/dist/entries/library.cjs +13 -0
  519. package/dist/entries/library.cjs.map +1 -0
  520. package/dist/entries/library.d.cts +109 -0
  521. package/dist/entries/library.d.ts +109 -0
  522. package/dist/entries/library.js +4 -0
  523. package/dist/entries/library.js.map +1 -0
  524. package/dist/entries/llm.cjs +13 -0
  525. package/dist/entries/llm.cjs.map +1 -0
  526. package/dist/entries/llm.d.cts +98 -0
  527. package/dist/entries/llm.d.ts +98 -0
  528. package/dist/entries/llm.js +4 -0
  529. package/dist/entries/llm.js.map +1 -0
  530. package/dist/entries/locations.cjs +25 -0
  531. package/dist/entries/locations.cjs.map +1 -0
  532. package/dist/entries/locations.d.cts +573 -0
  533. package/dist/entries/locations.d.ts +573 -0
  534. package/dist/entries/locations.js +4 -0
  535. package/dist/entries/locations.js.map +1 -0
  536. package/dist/entries/media.cjs +15 -0
  537. package/dist/entries/media.cjs.map +1 -0
  538. package/dist/entries/media.d.cts +548 -0
  539. package/dist/entries/media.d.ts +548 -0
  540. package/dist/entries/media.js +6 -0
  541. package/dist/entries/media.js.map +1 -0
  542. package/dist/entries/models.cjs +13 -0
  543. package/dist/entries/models.cjs.map +1 -0
  544. package/dist/entries/models.d.cts +92 -0
  545. package/dist/entries/models.d.ts +92 -0
  546. package/dist/entries/models.js +4 -0
  547. package/dist/entries/models.js.map +1 -0
  548. package/dist/entries/moodboards.cjs +21 -0
  549. package/dist/entries/moodboards.cjs.map +1 -0
  550. package/dist/entries/moodboards.d.cts +77 -0
  551. package/dist/entries/moodboards.d.ts +77 -0
  552. package/dist/entries/moodboards.js +4 -0
  553. package/dist/entries/moodboards.js.map +1 -0
  554. package/dist/entries/node-presets.cjs +13 -0
  555. package/dist/entries/node-presets.cjs.map +1 -0
  556. package/dist/entries/node-presets.d.cts +217 -0
  557. package/dist/entries/node-presets.d.ts +217 -0
  558. package/dist/entries/node-presets.js +4 -0
  559. package/dist/entries/node-presets.js.map +1 -0
  560. package/dist/entries/nodes.cjs +22 -0
  561. package/dist/entries/nodes.cjs.map +1 -0
  562. package/dist/entries/nodes.d.cts +18 -0
  563. package/dist/entries/nodes.d.ts +18 -0
  564. package/dist/entries/nodes.js +5 -0
  565. package/dist/entries/nodes.js.map +1 -0
  566. package/dist/entries/oauth.cjs +13 -0
  567. package/dist/entries/oauth.cjs.map +1 -0
  568. package/dist/entries/oauth.d.cts +69 -0
  569. package/dist/entries/oauth.d.ts +69 -0
  570. package/dist/entries/oauth.js +4 -0
  571. package/dist/entries/oauth.js.map +1 -0
  572. package/dist/entries/objects.cjs +29 -0
  573. package/dist/entries/objects.cjs.map +1 -0
  574. package/dist/entries/objects.d.cts +544 -0
  575. package/dist/entries/objects.d.ts +544 -0
  576. package/dist/entries/objects.js +4 -0
  577. package/dist/entries/objects.js.map +1 -0
  578. package/dist/entries/organizations.cjs +21 -0
  579. package/dist/entries/organizations.cjs.map +1 -0
  580. package/dist/entries/organizations.d.cts +164 -0
  581. package/dist/entries/organizations.d.ts +164 -0
  582. package/dist/entries/organizations.js +4 -0
  583. package/dist/entries/organizations.js.map +1 -0
  584. package/dist/entries/palettes.cjs +21 -0
  585. package/dist/entries/palettes.cjs.map +1 -0
  586. package/dist/entries/palettes.d.cts +69 -0
  587. package/dist/entries/palettes.d.ts +69 -0
  588. package/dist/entries/palettes.js +4 -0
  589. package/dist/entries/palettes.js.map +1 -0
  590. package/dist/entries/picker-catalogs.cjs +13 -0
  591. package/dist/entries/picker-catalogs.cjs.map +1 -0
  592. package/dist/entries/picker-catalogs.d.cts +148 -0
  593. package/dist/entries/picker-catalogs.d.ts +148 -0
  594. package/dist/entries/picker-catalogs.js +4 -0
  595. package/dist/entries/picker-catalogs.js.map +1 -0
  596. package/dist/entries/pipelines.cjs +13 -0
  597. package/dist/entries/pipelines.cjs.map +1 -0
  598. package/dist/entries/pipelines.d.cts +255 -0
  599. package/dist/entries/pipelines.d.ts +255 -0
  600. package/dist/entries/pipelines.js +4 -0
  601. package/dist/entries/pipelines.js.map +1 -0
  602. package/dist/entries/projects.cjs +13 -0
  603. package/dist/entries/projects.cjs.map +1 -0
  604. package/dist/entries/projects.d.cts +49 -0
  605. package/dist/entries/projects.d.ts +49 -0
  606. package/dist/entries/projects.js +4 -0
  607. package/dist/entries/projects.js.map +1 -0
  608. package/dist/entries/prompt-helper.cjs +13 -0
  609. package/dist/entries/prompt-helper.cjs.map +1 -0
  610. package/dist/entries/prompt-helper.d.cts +73 -0
  611. package/dist/entries/prompt-helper.d.ts +73 -0
  612. package/dist/entries/prompt-helper.js +4 -0
  613. package/dist/entries/prompt-helper.js.map +1 -0
  614. package/dist/entries/recast.cjs +17 -0
  615. package/dist/entries/recast.cjs.map +1 -0
  616. package/dist/entries/recast.d.cts +229 -0
  617. package/dist/entries/recast.d.ts +229 -0
  618. package/dist/entries/recast.js +4 -0
  619. package/dist/entries/recast.js.map +1 -0
  620. package/dist/entries/reduce.cjs +13 -0
  621. package/dist/entries/reduce.cjs.map +1 -0
  622. package/dist/entries/reduce.d.cts +56 -0
  623. package/dist/entries/reduce.d.ts +56 -0
  624. package/dist/entries/reduce.js +4 -0
  625. package/dist/entries/reduce.js.map +1 -0
  626. package/dist/entries/saved-posts.cjs +13 -0
  627. package/dist/entries/saved-posts.cjs.map +1 -0
  628. package/dist/entries/saved-posts.d.cts +33 -0
  629. package/dist/entries/saved-posts.d.ts +33 -0
  630. package/dist/entries/saved-posts.js +4 -0
  631. package/dist/entries/saved-posts.js.map +1 -0
  632. package/dist/entries/scene3d.cjs +17 -0
  633. package/dist/entries/scene3d.cjs.map +1 -0
  634. package/dist/entries/scene3d.d.cts +131 -0
  635. package/dist/entries/scene3d.d.ts +131 -0
  636. package/dist/entries/scene3d.js +4 -0
  637. package/dist/entries/scene3d.js.map +1 -0
  638. package/dist/entries/sessions.cjs +13 -0
  639. package/dist/entries/sessions.cjs.map +1 -0
  640. package/dist/entries/sessions.d.cts +122 -0
  641. package/dist/entries/sessions.d.ts +122 -0
  642. package/dist/entries/sessions.js +4 -0
  643. package/dist/entries/sessions.js.map +1 -0
  644. package/dist/entries/shots.cjs +13 -0
  645. package/dist/entries/shots.cjs.map +1 -0
  646. package/dist/entries/shots.d.cts +78 -0
  647. package/dist/entries/shots.d.ts +78 -0
  648. package/dist/entries/shots.js +4 -0
  649. package/dist/entries/shots.js.map +1 -0
  650. package/dist/entries/studio.cjs +22 -0
  651. package/dist/entries/studio.cjs.map +1 -0
  652. package/dist/entries/studio.d.cts +281 -0
  653. package/dist/entries/studio.d.ts +281 -0
  654. package/dist/entries/studio.js +5 -0
  655. package/dist/entries/studio.js.map +1 -0
  656. package/dist/entries/templates.cjs +13 -0
  657. package/dist/entries/templates.cjs.map +1 -0
  658. package/dist/entries/templates.d.cts +110 -0
  659. package/dist/entries/templates.d.ts +110 -0
  660. package/dist/entries/templates.js +4 -0
  661. package/dist/entries/templates.js.map +1 -0
  662. package/dist/entries/tutorials.cjs +13 -0
  663. package/dist/entries/tutorials.cjs.map +1 -0
  664. package/dist/entries/tutorials.d.cts +63 -0
  665. package/dist/entries/tutorials.d.ts +63 -0
  666. package/dist/entries/tutorials.js +4 -0
  667. package/dist/entries/tutorials.js.map +1 -0
  668. package/dist/entries/uploads.cjs +13 -0
  669. package/dist/entries/uploads.cjs.map +1 -0
  670. package/dist/entries/uploads.d.cts +44 -0
  671. package/dist/entries/uploads.d.ts +44 -0
  672. package/dist/entries/uploads.js +4 -0
  673. package/dist/entries/uploads.js.map +1 -0
  674. package/dist/entries/video-pro.cjs +13 -0
  675. package/dist/entries/video-pro.cjs.map +1 -0
  676. package/dist/entries/video-pro.d.cts +60 -0
  677. package/dist/entries/video-pro.d.ts +60 -0
  678. package/dist/entries/video-pro.js +4 -0
  679. package/dist/entries/video-pro.js.map +1 -0
  680. package/dist/entries/voices.cjs +13 -0
  681. package/dist/entries/voices.cjs.map +1 -0
  682. package/dist/entries/voices.d.cts +498 -0
  683. package/dist/entries/voices.d.ts +498 -0
  684. package/dist/entries/voices.js +4 -0
  685. package/dist/entries/voices.js.map +1 -0
  686. package/dist/entries/webhooks.cjs +21 -0
  687. package/dist/entries/webhooks.cjs.map +1 -0
  688. package/dist/entries/webhooks.d.cts +64 -0
  689. package/dist/entries/webhooks.d.ts +64 -0
  690. package/dist/entries/webhooks.js +4 -0
  691. package/dist/entries/webhooks.js.map +1 -0
  692. package/dist/entries/workflows.cjs +13 -0
  693. package/dist/entries/workflows.cjs.map +1 -0
  694. package/dist/entries/workflows.d.cts +393 -0
  695. package/dist/entries/workflows.d.ts +393 -0
  696. package/dist/entries/workflows.js +4 -0
  697. package/dist/entries/workflows.js.map +1 -0
  698. package/dist/entries/workspaces.cjs +13 -0
  699. package/dist/entries/workspaces.cjs.map +1 -0
  700. package/dist/entries/workspaces.d.cts +124 -0
  701. package/dist/entries/workspaces.d.ts +124 -0
  702. package/dist/entries/workspaces.js +4 -0
  703. package/dist/entries/workspaces.js.map +1 -0
  704. package/dist/index.cjs +501 -5192
  705. package/dist/index.cjs.map +1 -1
  706. package/dist/index.d.cts +66 -10894
  707. package/dist/index.d.ts +66 -10894
  708. package/dist/index.js +100 -5074
  709. package/dist/index.js.map +1 -1
  710. package/dist/nodes-BPvrAoUs.d.cts +1264 -0
  711. package/dist/nodes-C2zu3uqn.d.ts +1264 -0
  712. package/dist/studio-productions-DUHvdSvk.d.cts +572 -0
  713. package/dist/studio-productions-vbCNSbtf.d.ts +572 -0
  714. package/dist/webhooks-BJawEIz8.d.ts +198 -0
  715. package/dist/webhooks-Dn_DtNTD.d.cts +198 -0
  716. package/package.json +253 -3
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/errors.ts"],"names":[],"mappings":";AAEO,IAAM,WAAA,GAAN,cAA0B,KAAA,CAAM;AAAA,EACrC,WAAA,CACE,OAAA,EACgB,IAAA,EACA,MAAA,EAChB;AACA,IAAA,KAAA,CAAM,OAAO,CAAA;AAHG,IAAA,IAAA,CAAA,IAAA,GAAA,IAAA;AACA,IAAA,IAAA,CAAA,MAAA,GAAA,MAAA;AAGhB,IAAA,IAAA,CAAK,IAAA,GAAO,aAAA;AAAA,EACd;AAAA,EALkB,IAAA;AAAA,EACA,MAAA;AAKpB;AAEO,IAAM,iBAAA,GAAN,cAAgC,WAAA,CAAY;AAAA,EACjD,WAAA,CAAY,UAAU,yBAAA,EAA2B;AAC/C,IAAA,KAAA,CAAM,OAAA,EAAS,gBAAgB,GAAG,CAAA;AAClC,IAAA,IAAA,CAAK,IAAA,GAAO,mBAAA;AAAA,EACd;AACF;AAEO,IAAM,cAAA,GAAN,cAA6B,WAAA,CAAY;AAAA,EAC9C,WAAA,CAAY,OAAA,GAAU,WAAA,EAA6B,YAAA,EAAuB;AACxE,IAAA,KAAA,CAAM,OAAA,EAAS,aAAa,GAAG,CAAA;AADkB,IAAA,IAAA,CAAA,YAAA,GAAA,YAAA;AAEjD,IAAA,IAAA,CAAK,IAAA,GAAO,gBAAA;AAAA,EACd;AAAA,EAHmD,YAAA;AAIrD;AAEO,IAAM,aAAA,GAAN,cA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F;AACA,EAAA,IAAI,MAAA,KAAW,KAAK,MAAM,IAAI,qBAAqB,IAAA,CAAK,OAAA,EAAS,SAAS,UAAU,CAAA;AACpF,EAAA,MAAM,IAAI,WAAA,CAAY,OAAA,EAAS,IAAA,EAAM,MAAM,CAAA;AAC7C","file":"chunk-JGS6YBDW.js","sourcesContent":["import type { StudioOpsResponse } from \"./resources/studio-productions.js\"\n\nexport class NodaroError extends Error {\n constructor(\n message: string,\n public readonly code: string,\n public readonly status: number,\n ) {\n super(message)\n this.name = \"NodaroError\"\n }\n}\n\nexport class UnauthorizedError extends NodaroError {\n constructor(message = \"Authentication required\") {\n super(message, \"unauthorized\", 401)\n this.name = \"UnauthorizedError\"\n }\n}\n\nexport class ForbiddenError extends NodaroError {\n constructor(message = \"Forbidden\", public readonly missingScope?: string) {\n super(message, \"forbidden\", 403)\n this.name = \"ForbiddenError\"\n }\n}\n\nexport class NotFoundError extends NodaroError {\n constructor(message = \"Not found\") {\n super(message, \"not_found\", 404)\n this.name = \"NotFoundError\"\n }\n}\n\nexport class RateLimitedError extends NodaroError {\n constructor(message = \"Rate limited\") {\n super(message, \"rate_limited\", 429)\n this.name = \"RateLimitedError\"\n }\n}\n\nexport class InsufficientCreditsError extends NodaroError {\n constructor(\n message = \"Insufficient credits\",\n public readonly required?: number,\n public readonly available?: number,\n ) {\n super(message, \"insufficient_credits\", 402)\n this.name = \"InsufficientCreditsError\"\n }\n}\n\nexport class StorageExceededError extends NodaroError {\n constructor(message = \"Storage exceeded\", public readonly limitBytes?: number) {\n super(message, \"storage_exceeded\", 413)\n this.name = \"StorageExceededError\"\n }\n}\n\n/**\n * Optimistic-concurrency rejection (HTTP 409 `workflow_conflict`): the workflow\n * was written by another tab/device after the state carried in\n * `expectedUpdatedAt`/`expectedVersion` was read. `currentRecord` — when the\n * server includes it — is the full current workflow: merge your changes onto it\n * and retry with its fresh `updatedAt`, no follow-up GET needed.\n */\nexport class WorkflowConflictError extends NodaroError {\n constructor(\n message = \"Workflow was updated by another writer\",\n public readonly currentUpdatedAt?: string,\n public readonly currentVersion?: number,\n public readonly currentRecord?: Record<string, unknown>,\n /**\n * The wire code this conflict actually arrived with.\n *\n * `production_busy` is the studio production routes' own 409: the row\n * changed under a read-modify-write and the server exhausted its retries.\n * It is the same situation and the same remedy — re-read and apply again —\n * so it is the same ERROR, and a caller catching `WorkflowConflictError`\n * handles both. The code stays truthful because a caller that logs or\n * branches on it should see what the server said, not what the class is\n * usually called.\n */\n code: WorkflowConflictCode = \"workflow_conflict\",\n ) {\n super(message, code, 409)\n this.name = \"WorkflowConflictError\"\n }\n}\n\n/** The 409 codes that mean \"somebody else wrote first; re-read and retry\". */\nexport type WorkflowConflictCode = \"workflow_conflict\" | \"production_busy\"\n\n/**\n * A studio operation batch was refused, and the error names WHICH operation\n * (`opIndex`, zero-based) was wrong. Nothing in the batch was written: a batch\n * applies atomically or not at all, so fix that one operation and send the\n * whole batch again.\n *\n * Selected by SHAPE — any 4xx carrying a numeric `opIndex` — not by a list of\n * codes, so a new refusal reason (`op_invalid`, `op_target_missing`, whatever\n * the server adds next) reaches the caller as this error without an SDK\n * release. `code` is whatever the server sent.\n */\nexport class StudioOpError extends NodaroError {\n constructor(\n message: string,\n code: string,\n status: number,\n /** Zero-based index into the `ops` array that was sent. */\n public readonly opIndex: number,\n ) {\n super(message, code, status)\n this.name = \"StudioOpError\"\n }\n}\n\n/** The 409 codes whose answer names the job to turn to instead (a top-level `jobId`). */\nconst CONTINUATION_REFUSAL_CODES: ReadonlySet<string> = new Set([\n \"already_running\",\n \"continuation_superseded\",\n \"render_final_already_rendered\",\n])\n\n/**\n * A 409 that names the job to turn to instead: continuing a use-case run\n * (`client.edit.continueUseCase`) answers `already_running` (a continuation is\n * under way, or one that already completed — follow `jobId`),\n * `continuation_superseded` (a later continuation failed too — continue\n * `jobId` instead) or `render_final_already_rendered` (a Render final with this\n * very edit already completed — `jobId` holds the result). `code` and `status`\n * are what the server sent. Selected for exactly those three codes when the\n * answer carries a top-level `jobId`; every other 409 stays a plain\n * `NodaroError`.\n */\nexport class ContinuationRefusedError extends NodaroError {\n constructor(\n message: string,\n code: string,\n /** The job the refusal names. */\n public readonly jobId: string,\n ) {\n super(message, code, 409)\n this.name = \"ContinuationRefusedError\"\n }\n}\n\n/**\n * The one run that finishes a continuation held at a Preview review (the\n * `next` of {@link ContinuationPreviewPendingError}): pass these three fields\n * to `client.workflows.run`. It continues that execution, runs each held render\n * at Final and each held Tighten Episode continuing the run that made its\n * Preview, then every node after them.\n */\nexport interface HeldFinalRun {\n continueFromExecutionId: string\n /** The nodes it runs, in canvas order. */\n nodeIds: string[]\n /** For this run only: each held render at Final, each held use-case node's `useCaseContinue`. */\n inputOverrides: Record<string, Record<string, unknown>>\n}\n\n/**\n * HTTP 409 `continuation_preview_pending`: a continue-from-failed\n * (`client.workflows.run` with `continueMode: \"from-failed\"`) whose run's\n * newest later continuation completed by stopping at a Preview review, so\n * continuing again would stop there too. `executionId` is that continuation;\n * `renderNodeIds` the Apply EDL renders and `reviewNodeIds` the Tighten Episode\n * nodes holding it; `next` the run that finishes them — send it first\n * (`client.workflows.run(workflowId, error.next)`), then continue. Absent only\n * when the server could not name it. For a single held render, `next` is that\n * render's `client.workflows.renderFinal`.\n */\nexport class ContinuationPreviewPendingError extends NodaroError {\n constructor(\n message: string,\n public readonly executionId: string,\n public readonly renderNodeIds: readonly string[],\n public readonly reviewNodeIds: readonly string[],\n public readonly next?: HeldFinalRun,\n ) {\n super(message, \"continuation_preview_pending\", 409)\n this.name = \"ContinuationPreviewPendingError\"\n }\n}\n\nconst stringList = (v: unknown): string[] => (Array.isArray(v) ? v.filter((id): id is string => typeof id === \"string\") : [])\n\n/** A `next` as the server sends it, or undefined for anything else. */\nfunction heldFinalRunOf(v: unknown): HeldFinalRun | undefined {\n if (!v || typeof v !== \"object\") return undefined\n const r = v as Record<string, unknown>\n if (typeof r.continueFromExecutionId !== \"string\" || !Array.isArray(r.nodeIds)) return undefined\n if (!r.inputOverrides || typeof r.inputOverrides !== \"object\" || Array.isArray(r.inputOverrides)) return undefined\n return {\n continueFromExecutionId: r.continueFromExecutionId,\n nodeIds: stringList(r.nodeIds),\n inputOverrides: r.inputOverrides as Record<string, Record<string, unknown>>,\n }\n}\n\n/**\n * HTTP 409 `already_running` that names the execution under way (a top-level\n * `executionId`): the run you asked to start or continue is still running —\n * follow `executionId` (`client.executions.get`) instead of starting it again.\n * Sent by the workflow run route and by an app run's Retry\n * (`client.apps.resume`). An `already_running` that names a job instead stays\n * {@link ContinuationRefusedError}; one that names nothing, a plain\n * `NodaroError`.\n */\nexport class AlreadyRunningError extends NodaroError {\n constructor(\n message: string,\n /** The execution under way. */\n public readonly executionId: string,\n ) {\n super(message, \"already_running\", 409)\n this.name = \"AlreadyRunningError\"\n }\n}\n\n/**\n * HTTP 409 `app_run_version_changed`: a Retry of a failed app run\n * (`client.apps.resume`) refused because the app is on another version than\n * the one the run ran — continuing would mix them. `runVersion` is the run's\n * version, `appVersion` the one you are on (the `version` you sent, else the\n * app's latest). Start the run over (`client.apps.run`) to run `appVersion`,\n * or send `{ version: runVersion }` to continue on the run's own version.\n * Nothing was written or billed. Selected by code; the two numbers are\n * `undefined` when the answer does not carry them.\n */\nexport class AppRunVersionChangedError extends NodaroError {\n constructor(\n message: string,\n public readonly runVersion?: number,\n public readonly appVersion?: number,\n ) {\n super(message, \"app_run_version_changed\", 409)\n this.name = \"AppRunVersionChangedError\"\n }\n}\n\n/**\n * HTTP 422 `job_blocked`. A job policy registered by this deployment refused\n * the generation **before it ran** — no job was created, nothing was reserved\n * and nothing was charged. `message` is the policy's user-safe text: show it\n * as-is. Do not retry the identical request; whether the same input would be\n * judged differently is the deployment's policy's business.\n *\n * Only occurs on deployments that register a job policy. Selected by `code`,\n * not by status, the same way `workflow_conflict` narrows a 409 above — any\n * other 422 stays a plain `NodaroError`.\n */\nexport class JobBlockedError extends NodaroError {\n constructor(message = \"Blocked by this deployment's content policy\") {\n super(message, \"job_blocked\", 422)\n this.name = \"JobBlockedError\"\n }\n}\n\n/**\n * A job reached a terminal `failed`/`cancelled` status while being awaited by\n * `nodes.runAndWait` / `nodes.runMany`. Not an HTTP-level error (the polls\n * themselves succeeded), so `status` is 0 — distinguish it by type/`code`.\n * Carries the job's own `error_message` (as the message) and `jobId`.\n */\nexport class JobFailedError extends NodaroError {\n constructor(\n message: string,\n public readonly jobId: string,\n /** The terminal status that triggered the failure (`failed` | `cancelled`). */\n public readonly jobStatus: \"failed\" | \"cancelled\" = \"failed\",\n ) {\n super(message, \"job_failed\", 0)\n this.name = \"JobFailedError\"\n }\n}\n\n/**\n * `nodes.runAndWait` polled past its `maxMs` deadline without the job reaching\n * a terminal status. Not an HTTP error — `status` is 0; catch by type/`code`.\n */\nexport class JobTimeoutError extends NodaroError {\n constructor(\n message: string,\n public readonly jobId: string,\n /** The wall-clock deadline (ms) that was exceeded. */\n public readonly timeoutMs: number,\n ) {\n super(message, \"job_timeout\", 0)\n this.name = \"JobTimeoutError\"\n }\n}\n\n/**\n * The caller's `AbortSignal` fired while `nodes.runAndWait` was polling (or it\n * was already aborted on entry). Polling stops and this rejects. Not an HTTP\n * error — `status` is 0; catch by type/`code`.\n */\nexport class JobAbortedError extends NodaroError {\n constructor(message = \"Aborted\", public readonly jobId?: string) {\n super(message, \"job_aborted\", 0)\n this.name = \"JobAbortedError\"\n }\n}\n\n/**\n * A batch preview was asked for and this deployment cannot give one, so\n * NOTHING was sent: the batch is still unapplied and the production untouched.\n *\n * A preview is two requests because the route's body is parsed in strip mode —\n * a deployment that predates the preview silently DROPS the flag and APPLIES\n * the batch. So the SDK asks with an EMPTY batch first and sends the real one\n * only when that answer carries the `dryRun` marker. This is what it throws\n * when the answer does not: whatever the older deployment made of an empty\n * batch, the caller's batch never left.\n *\n * The remedy is a deployment that serves the preview — there is nothing to\n * retry here. To apply the batch instead, send it without the flag.\n *\n * A deployment that REFUSES the empty batch outright throws its own error\n * instead of this one, which is the right way round: the route's message says\n * more than \"unavailable\" does.\n *\n * Not an HTTP error: the request itself succeeded and answered the older shape.\n * `status` is 0; catch by type/`code`.\n */\nexport class StudioPreviewUnavailable extends NodaroError {\n constructor(\n message = \"This deployment does not preview operation batches; nothing was sent\",\n ) {\n super(message, \"studio_preview_unavailable\", 0)\n this.name = \"StudioPreviewUnavailable\"\n }\n}\n\n/**\n * A batch preview was asked for and the batch was APPLIED instead. The\n * production is written; this is the opposite of {@link\n * StudioPreviewUnavailable}, where nothing was sent.\n *\n * How it happens: the preview's proving ping and the batch are two requests,\n * and a fleet mid-rollout can serve them from different deployments. The ping\n * answers the marker, the batch reaches a deployment that predates the preview,\n * parses in strip mode, drops the flag and writes. The SDK cannot recall that\n * request — by the time the answer comes back the change has landed — so it\n * refuses to call the result a preview, which is the only thing still in its\n * gift. `receipts` and `warnings` are on both shapes, so an unchecked reply\n * would have shown a person what ALREADY happened under the heading of what\n * would.\n *\n * `applied` is what the route answered: the ordinary apply reply, whose\n * `production` and `version` are now the truth. Adopt them the way a plain\n * apply's caller does — do NOT re-send the batch, and do not present it for\n * approval.\n *\n * Not an HTTP error: the request succeeded, at the wrong thing. `status` is 0.\n */\nexport class StudioPreviewAppliedError extends NodaroError {\n constructor(\n /**\n * The apply reply the route sent back, as it sent it. An answer this\n * package does not recognise arrives here unchanged rather than being\n * dressed up: it is what the deployment said about a batch it took.\n *\n * `undefined` when the answer carried no body at all — a 204, an empty\n * envelope. The refusal still fires, because a non-preview answer is never\n * handed back as a preview, but there is nothing to report and the SDK will\n * not invent it: whether the batch was applied is unknown from here, and\n * the caller settles it by re-reading the production.\n */\n public readonly applied: StudioOpsResponse | undefined,\n message = applied\n ? \"Asked for a preview and this deployment APPLIED the batch; the change is written — see `applied`\"\n : \"Asked for a preview and this deployment answered with neither one nor a body to read; the batch may have been applied — re-read the production before deciding anything\",\n ) {\n super(message, \"studio_preview_applied\", 0)\n this.name = \"StudioPreviewAppliedError\"\n }\n}\n\n/**\n * The awaited job entered `pending_review`: a job policy registered by this\n * deployment held its output for a human reviewer. `pending_review` is\n * IN-FLIGHT, not terminal, so `nodes.runAndWait` / `nodes.runMany` end the\n * poll on the first tick they observe it rather than burning `maxMs` on a\n * status that no longer moves on its own.\n *\n * This does NOT cancel the job — the output exists, a human is reviewing it,\n * and the credit reservation stays `reserved` for the whole hold. Do not\n * re-run the request (a duplicate would be held too): re-fetch with\n * `jobs.get(jobId)` later, or surface \"awaiting review\" to your user and poll\n * `jobs.getStatus()` yourself. It resolves to `completed` (approved), `failed`\n * (rejected, with `error_hint.kind === \"policy-block\"`) or `cancelled`.\n *\n * Not an HTTP error — `status` is 0; catch by type/`code`.\n */\nexport class JobHeldError extends NodaroError {\n constructor(\n message: string,\n public readonly jobId: string,\n ) {\n super(message, \"job_held\", 0)\n this.name = \"JobHeldError\"\n }\n}\n\n/** The `{ error: { code, message, … } }` envelope every current route sends. */\ninterface ApiErrorEnvelope {\n code?: string\n message?: string\n missingScope?: string\n required?: number\n available?: number\n limitBytes?: number\n opIndex?: number\n [key: string]: unknown\n}\n\ninterface ApiErrorBody {\n /** The envelope — or, on an older route, a bare string (see {@link readErrorBody}). */\n error?: ApiErrorEnvelope | string\n /** A top-level message: an older route's, a bare validation answer's, or the server framework's own. */\n message?: unknown\n /** OAuth's human text (RFC 6749 §5.2), beside a bare-string `error`. */\n error_description?: unknown\n /** A bare validation answer's per-field issues (`{ message, issues }`). */\n issues?: unknown\n /** A refusal that names another job (see {@link ContinuationRefusedError}). */\n jobId?: unknown\n /** `continuation_preview_pending`: the held continuation, what holds it, and the run that finishes it. */\n executionId?: unknown\n renderNodeIds?: unknown\n reviewNodeIds?: unknown\n next?: unknown\n /** The credit guard's 402 sends its figures beside the envelope: what the run needs… */\n required?: unknown\n /** …and what the caller has (withheld on a deployment-paid instance). */\n balance?: unknown\n /** `app_run_version_changed`: the version the run ran, and the one the caller is on. */\n runVersion?: unknown\n appVersion?: unknown\n}\n\nconst finite = (v: unknown): number | undefined => (typeof v === \"number\" && Number.isFinite(v) ? v : undefined)\n\n/** A machine code as an older route writes it: lower snake_case, never a sentence or a reason phrase. */\nconst BARE_CODE = /^[a-z][a-z0-9_]*$/\n\nconst nonEmpty = (v: unknown): string | undefined => (typeof v === \"string\" && v.length > 0 ? v : undefined)\n\n/**\n * Where a body keeps its code and its human message. Most routes send the\n * envelope `{ error: { code, message } }`; three other shapes reach the SDK\n * too, and each is read for what it says rather than collapsed into\n * `internal_error` / \"Request failed\":\n *\n * - an older route's bare string, `{ error: \"<code>\", message?, … }` (character\n * training, a few profile and billing routes), and OAuth's\n * `{ error: \"<code>\", error_description }`. A snake_case string is the code;\n * a sentence (`\"Profile not found\"`) is the message.\n * - a bare validation answer, `{ message, issues: [...] }`: `validation_error`.\n * - the server framework's own answer, `{ statusCode, error: \"<reason phrase>\",\n * message }` (a route it does not have): the reason phrase is neither, the\n * message is kept — so \"no such route\" stays distinguishable from \"no such\n * resource\".\n *\n * At HTTP 500 and above only the CODE is read from outside the envelope. Text\n * there can be whatever the server failed with: the framework's own answer to\n * an uncaught throw is `{ statusCode: 500, error: \"Internal Server Error\",\n * message: <the raw error> }`, and the server's sanitizer rewrites only the\n * `internal_error` envelope. The envelope's own message is a route's chosen\n * sentence and is read at every status, as before.\n *\n * `message` is undefined when the body carries no human text it may show, so a\n * typed class keeps its own default (\"Not found\").\n */\nfunction readErrorBody(status: number, body: ApiErrorBody): { code: string | undefined; message: string | undefined; envelope: ApiErrorEnvelope } {\n const raw = body.error\n const envelope: ApiErrorEnvelope = raw && typeof raw === \"object\" ? raw : {}\n const bare = typeof raw === \"string\" ? raw : undefined\n const bareCode = bare !== undefined && BARE_CODE.test(bare) ? bare : undefined\n // Words with a space between them are human text: an older route's sentence,\n // or the framework's reason phrase — which always arrives with a real\n // `message`, read first. A single capitalised word (\"Unauthorized\") is a\n // reason phrase alone and says nothing the status does not.\n const bareSentence = bare !== undefined && bareCode === undefined && /\\s/.test(bare.trim()) ? bare : undefined\n const code =\n nonEmpty(envelope.code) ??\n bareCode ??\n (status === 400 && raw === undefined && Array.isArray(body.issues) ? \"validation_error\" : undefined)\n const outside = status >= 500 ? undefined : (nonEmpty(body.message) ?? nonEmpty(body.error_description) ?? bareSentence)\n const message = nonEmpty(envelope.message) ?? outside\n return { code, message, envelope }\n}\n\nexport function throwFromResponse(status: number, body: ApiErrorBody): never {\n // A body that is not an object (an empty answer, `null`, a bare string) still\n // throws by its status.\n const parsed: ApiErrorBody = body && typeof body === \"object\" ? body : {}\n const read = readErrorBody(status, parsed)\n const envelope = read.envelope\n const code = read.code ?? \"internal_error\"\n // A typed class falls back to its own default; a generic error to the code\n // it carries, which says more than \"Request failed\" does.\n const message = read.message ?? (read.code ? read.code : \"Request failed\")\n if (status === 401) throw new UnauthorizedError(read.message)\n if (status === 409 && (code === \"workflow_conflict\" || code === \"production_busy\")) {\n throw new WorkflowConflictError(\n read.message,\n envelope.currentUpdatedAt as string | undefined,\n envelope.currentVersion as number | undefined,\n envelope.currentRecord as Record<string, unknown> | undefined,\n code,\n )\n }\n // By shape, not by code — see StudioOpError. Only the studio operations route\n // sends an op index, so this cannot capture anyone else's 400.\n if (status >= 400 && status < 500 && typeof envelope.opIndex === \"number\") {\n throw new StudioOpError(message, code, status, envelope.opIndex)\n }\n if (status === 409 && CONTINUATION_REFUSAL_CODES.has(code) && typeof parsed.jobId === \"string\") {\n throw new ContinuationRefusedError(message, code, parsed.jobId)\n }\n if (status === 409 && code === \"continuation_preview_pending\" && typeof parsed.executionId === \"string\") {\n throw new ContinuationPreviewPendingError(\n message,\n parsed.executionId,\n stringList(parsed.renderNodeIds),\n stringList(parsed.reviewNodeIds),\n heldFinalRunOf(parsed.next),\n )\n }\n if (status === 409 && code === \"already_running\" && typeof parsed.executionId === \"string\") {\n throw new AlreadyRunningError(message, parsed.executionId)\n }\n if (status === 409 && code === \"app_run_version_changed\") {\n throw new AppRunVersionChangedError(message, finite(parsed.runVersion), finite(parsed.appVersion))\n }\n if (status === 422 && code === \"job_blocked\") throw new JobBlockedError(read.message)\n if (status === 403 && code === \"insufficient_scope\") {\n throw new ForbiddenError(read.message, envelope.missingScope)\n }\n if (status === 403) throw new ForbiddenError(read.message)\n // A 404 the framework answered itself (no route at that path) carries its\n // message at the top level, not under `error`; `readErrorBody` keeps it so\n // callers can tell \"no such route\" from \"no such resource\".\n if (status === 404) throw new NotFoundError(read.message)\n if (status === 429) throw new RateLimitedError(read.message)\n if (status === 402) {\n // The credit guard puts `required` / `balance` beside the envelope; an\n // envelope that carries them (`required` / `available`) is read first.\n throw new InsufficientCreditsError(\n read.message,\n finite(envelope.required) ?? finite(parsed.required),\n finite(envelope.available) ?? finite(parsed.balance),\n )\n }\n if (status === 413) throw new StorageExceededError(read.message, envelope.limitBytes)\n throw new NodaroError(message, code, status)\n}\n"]}
@@ -0,0 +1,46 @@
1
+ import { throwFromResponse, NodaroError } from './chunk-JGS6YBDW.js';
2
+
3
+ // src/sse.ts
4
+ async function* readSseStream(res, opts = {}) {
5
+ if (!res.ok) {
6
+ let errBody = {};
7
+ try {
8
+ errBody = await res.json();
9
+ } catch {
10
+ }
11
+ throwFromResponse(res.status, errBody);
12
+ }
13
+ if (!res.body) {
14
+ throw new NodaroError(`${opts.label ?? "event stream"} has no response body`, "empty_stream", res.status);
15
+ }
16
+ const reader = res.body.getReader();
17
+ const decoder = new TextDecoder();
18
+ let buffer = "";
19
+ try {
20
+ for (; ; ) {
21
+ const { done, value } = await reader.read();
22
+ if (done) break;
23
+ buffer += decoder.decode(value, { stream: true });
24
+ let sep;
25
+ while ((sep = buffer.indexOf("\n\n")) >= 0) {
26
+ const frame = buffer.slice(0, sep);
27
+ buffer = buffer.slice(sep + 2);
28
+ for (const line of frame.split("\n")) {
29
+ if (!line.startsWith("data:")) continue;
30
+ try {
31
+ yield JSON.parse(line.slice(5).trim());
32
+ } catch {
33
+ }
34
+ }
35
+ }
36
+ }
37
+ } finally {
38
+ reader.releaseLock();
39
+ await res.body.cancel().catch(() => {
40
+ });
41
+ }
42
+ }
43
+
44
+ export { readSseStream };
45
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A,CAAO,KAAA,CAAM,GAAA,GAAM,CAAC,CAAA;AAC7B,QAAA,KAAA,MAAW,IAAA,IAAQ,KAAA,CAAM,KAAA,CAAM,IAAI,CAAA,EAAG;AACpC,UAAA,IAAI,CAAC,IAAA,CAAK,UAAA,CAAW,OAAO,CAAA,EAAG;AAC/B,UAAA,IAAI;AACF,YAAA,MAAM,KAAK,KAAA,CAAM,IAAA,CAAK,MAAM,CAAC,CAAA,CAAE,MAAM,CAAA;AAAA,UACvC,CAAA,CAAA,MAAQ;AAAA,UAER;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,EACF,CAAA,SAAE;AAEA,IAAA,MAAA,CAAO,WAAA,EAAY;AACnB,IAAA,MAAM,GAAA,CAAI,IAAA,CAAK,MAAA,EAAO,CAAE,MAAM,MAAM;AAAA,IAAC,CAAC,CAAA;AAAA,EACxC;AACF","file":"chunk-JMOKD6ZP.js","sourcesContent":["import { NodaroError, throwFromResponse } from \"./errors.js\"\n\n/**\n * The ONE server-sent-event reader in this package.\n *\n * Every streaming route here writes the same minimal shape — `data: <json>\\n\\n`\n * frames, with the event kind INSIDE the JSON rather than on an `event:` line —\n * so one reader serves them all, and a second hand-rolled parse loop is the\n * thing this file exists to prevent. Deliberately minimal, matching the\n * server's writer rather than the whole SSE grammar: split on blank lines,\n * JSON-parse each `data:` line on its own, skip what does not parse (the next\n * frame re-reports state), and ignore every other line — keepalive comments\n * (`: keepalive`) included.\n *\n * Frames are separated by a bare `\\n\\n` and each `data:` line is parsed on its\n * own, exactly as the server writes them. Both halves are literal: a stream\n * whose frames arrive CRLF-terminated, or whose JSON was split across two\n * `data:` lines, yields NOTHING rather than erroring — so an intermediary that\n * normalises line endings would show up as an empty stream, not a parse\n * failure. The server's writer produces neither shape.\n *\n * No timeout is applied. The caller owns the lifetime: pass the `AbortSignal`\n * to the `fetch` that produced `res`, or just stop iterating — the `finally`\n * cancels the body, which ends the HTTP request.\n */\nexport async function* readSseStream<T>(\n res: Response,\n opts: {\n /** Names the stream in the \"no response body\" error. */\n label?: string\n } = {},\n): AsyncGenerator<T, void, undefined> {\n if (!res.ok) {\n let errBody: Record<string, unknown> = {}\n try {\n errBody = (await res.json()) as Record<string, unknown>\n } catch {\n // Empty/non-JSON body — fall through with empty errBody\n }\n throwFromResponse(res.status, errBody)\n }\n if (!res.body) {\n throw new NodaroError(`${opts.label ?? \"event stream\"} has no response body`, \"empty_stream\", res.status)\n }\n\n const reader = res.body.getReader()\n const decoder = new TextDecoder()\n let buffer = \"\"\n try {\n for (;;) {\n const { done, value } = await reader.read()\n if (done) break\n buffer += decoder.decode(value, { stream: true })\n let sep: number\n while ((sep = buffer.indexOf(\"\\n\\n\")) >= 0) {\n const frame = buffer.slice(0, sep)\n buffer = buffer.slice(sep + 2)\n for (const line of frame.split(\"\\n\")) {\n if (!line.startsWith(\"data:\")) continue\n try {\n yield JSON.parse(line.slice(5).trim()) as T\n } catch {\n // Skip malformed frames — the next tick re-reports full state.\n }\n }\n }\n }\n } finally {\n // Ends the HTTP request when the consumer breaks out of the loop early.\n reader.releaseLock()\n await res.body.cancel().catch(() => {})\n }\n}\n"]}
@@ -0,0 +1,4 @@
1
+ 'use strict';
2
+
3
+ //# sourceMappingURL=chunk-JOX5BJ6K.cjs.map
4
+ //# sourceMappingURL=chunk-JOX5BJ6K.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"chunk-JOX5BJ6K.cjs"}
@@ -0,0 +1,116 @@
1
+ // src/resources/node-presets.ts
2
+ var PresetsResource = class {
3
+ constructor(client) {
4
+ this.client = client;
5
+ }
6
+ client;
7
+ /**
8
+ * `GET /v1/node-presets` → your custom presets, newest first. Pass `nodeType`
9
+ * (e.g. `"generate-image"`) to filter to one node type.
10
+ */
11
+ async list(nodeType) {
12
+ const qs = nodeType ? `?nodeType=${encodeURIComponent(nodeType)}` : "";
13
+ const res = await this.client.request("GET", `/v1/node-presets${qs}`);
14
+ return res.data;
15
+ }
16
+ /**
17
+ * `GET /v1/node-preset-groups` → your preset folders/sections, in display
18
+ * order. Pass `nodeType` to filter to one node type.
19
+ */
20
+ async listGroups(nodeType) {
21
+ const qs = nodeType ? `?nodeType=${encodeURIComponent(nodeType)}` : "";
22
+ const res = await this.client.request("GET", `/v1/node-preset-groups${qs}`);
23
+ return res.data;
24
+ }
25
+ /**
26
+ * `GET /v1/node-presets/factory` → the built-in catalog for `nodeType`. These
27
+ * ship with the app (no account needed to exist), so they're a good starting
28
+ * point for "what configs are available".
29
+ *
30
+ * Login is optional: the catalog is public, so this works on a client with
31
+ * no credential at all (`auth: { getToken: async () => null }`) — show the
32
+ * names, example pictures (`previewUrl`) and photo counts (`minReferences`,
33
+ * `needsImage`) to a visitor who is not signed in, and ask for a login only
34
+ * when they generate. Your OWN presets (`list()`) still need a token.
35
+ */
36
+ listFactory(nodeType) {
37
+ return this.client.request(
38
+ "GET",
39
+ `/v1/node-presets/factory?nodeType=${encodeURIComponent(nodeType)}`
40
+ );
41
+ }
42
+ /** `POST /v1/node-presets` → the new preset. */
43
+ async create(input) {
44
+ const res = await this.client.request("POST", "/v1/node-presets", { body: input });
45
+ return res.data;
46
+ }
47
+ /**
48
+ * `PATCH /v1/node-presets/:id` → the updated preset. Pass the `updatedAt` you
49
+ * read as `expectedUpdatedAt` to refuse (409 `conflict`) a change made
50
+ * elsewhere since.
51
+ */
52
+ async update(id, patch, opts = {}) {
53
+ const body = opts.expectedUpdatedAt ? { ...patch, expectedUpdatedAt: opts.expectedUpdatedAt } : patch;
54
+ const res = await this.client.request("PATCH", `/v1/node-presets/${encodeURIComponent(id)}`, { body });
55
+ return res.data;
56
+ }
57
+ /** `DELETE /v1/node-presets/:id` (404 when it is not yours). `expectedUpdatedAt` as on `update`. */
58
+ async delete(id, opts = {}) {
59
+ const res = await this.client.request("DELETE", `/v1/node-presets/${encodeURIComponent(id)}`, {
60
+ query: { expectedUpdatedAt: opts.expectedUpdatedAt }
61
+ });
62
+ return res.data;
63
+ }
64
+ /**
65
+ * `POST /v1/node-presets/import` — up to 500 presets in one call. A name you
66
+ * already use gets an "(imported N)" suffix; a preset whose data is empty
67
+ * after stripping runtime keys is skipped.
68
+ */
69
+ async import(presets) {
70
+ const res = await this.client.request("POST", "/v1/node-presets/import", { body: { presets } });
71
+ return res.data;
72
+ }
73
+ /** `POST /v1/node-presets/reorder` — positions (and group membership) for many presets and groups at once. */
74
+ async reorder(input) {
75
+ const res = await this.client.request("POST", "/v1/node-presets/reorder", { body: input });
76
+ return res.data;
77
+ }
78
+ /** `GET /v1/node-presets/favorites` → your favorite preset ids for `nodeType`, newest first. */
79
+ async favorites(nodeType) {
80
+ const res = await this.client.request("GET", "/v1/node-presets/favorites", { query: { nodeType } });
81
+ return res.data;
82
+ }
83
+ /** `POST /v1/node-presets/favorites` — idempotent. */
84
+ async addFavorite(input) {
85
+ const res = await this.client.request("POST", "/v1/node-presets/favorites", { body: input });
86
+ return res.data;
87
+ }
88
+ /** `DELETE /v1/node-presets/favorites` — idempotent. */
89
+ async removeFavorite(input) {
90
+ const res = await this.client.request("DELETE", "/v1/node-presets/favorites", {
91
+ query: { nodeType: input.nodeType, presetId: input.presetId }
92
+ });
93
+ return res.data;
94
+ }
95
+ /** `POST /v1/node-preset-groups` → the new folder or section. */
96
+ async createGroup(input) {
97
+ const res = await this.client.request("POST", "/v1/node-preset-groups", { body: input });
98
+ return res.data;
99
+ }
100
+ /** `PATCH /v1/node-preset-groups/:id` → the renamed or moved group. */
101
+ async updateGroup(id, patch) {
102
+ const res = await this.client.request("PATCH", `/v1/node-preset-groups/${encodeURIComponent(id)}`, {
103
+ body: patch
104
+ });
105
+ return res.data;
106
+ }
107
+ /** `DELETE /v1/node-preset-groups/:id` — its presets move out of the group; none are deleted. */
108
+ async deleteGroup(id) {
109
+ const res = await this.client.request("DELETE", `/v1/node-preset-groups/${encodeURIComponent(id)}`);
110
+ return res.data;
111
+ }
112
+ };
113
+
114
+ export { PresetsResource };
115
+ //# sourceMappingURL=chunk-JT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,EAAY,KAAA,EAA6D;AACzF,IAAA,MAAM,GAAA,GAAM,MAAM,IAAA,CAAK,MAAA,CAAO,OAAA,CAAmC,SAAS,CAAA,uBAAA,EAA0B,kBAAA,CAAmB,EAAE,CAAC,CAAA,CAAA,EAAI;AAAA,MAC5H,IAAA,EAAM;AAAA,KACP,CAAA;AACD,IAAA,OAAO,GAAA,CAAI,IAAA;AAAA,EACb;AAAA;AAAA,EAGA,MAAM,YAAY,EAAA,EAAwC;AACxD,IAAA,MAAM,GAAA,GAAM,MAAM,IAAA,CAAK,MAAA,CAAO,OAAA,CAAqC,UAAU,CAAA,uBAAA,EAA0B,kBAAA,CAAmB,EAAE,CAAC,CAAA,CAAE,CAAA;AAC/H,IAAA,OAAO,GAAA,CAAI,IAAA;AAAA,EACb;AACF","file":"chunk-JTAW54UM.js","sourcesContent":["import type { NodaroClientCore } from \"../core.js\"\nimport type { FactoryPreset } from \"@nodaro/prompts/presets\"\n\n/**\n * A user's saved custom preset (`GET /v1/node-presets`). Mirrors the backend's\n * camelCase row shape. `data` is captured node config — merge it into a node's\n * data when building/running a workflow to \"apply\" the preset.\n */\nexport interface NodePreset {\n id: string\n nodeType: string\n name: string\n description?: string\n data: Record<string, unknown>\n groupId?: string\n tags: string[]\n sortOrder: number\n /**\n * How many connected reference images the preset works from (0 = none),\n * counted from the `{image:N}` tokens in its prompt. Absent from servers that\n * predate it.\n */\n minReferences?: number\n /** `minReferences > 0` — the preset works from a connected photo. */\n needsImage?: boolean\n /** The example picture stored with the preset, or null. */\n previewUrl?: string | null\n createdAt: string\n updatedAt: string\n}\n\n/** A user's preset folder/section (`GET /v1/node-preset-groups`). */\nexport interface NodePresetGroup {\n id: string\n nodeType: string\n name: string\n kind: \"folder\" | \"section\"\n sortOrder: number\n createdAt: string\n updatedAt: string\n}\n\n/**\n * One built-in preset as `GET /v1/node-presets/factory` serves it: the\n * catalog entry plus what a client needs to present it.\n */\nexport interface FactoryPresetEntry extends FactoryPreset {\n /**\n * How many connected reference images the preset works from (0 = none):\n * Reference Sheet, Portrait Transformations, Edits and every template using\n * `{image:N}` need at least one. Absent from servers that predate it.\n */\n minReferences?: number\n /** `minReferences > 0` — the preset works from a connected photo. */\n needsImage?: boolean\n /**\n * An example picture of what the preset makes — an absolute URL on the\n * server you asked — or null while the preset has none.\n */\n previewUrl?: string | null\n}\n\n/**\n * Result of `GET /v1/node-presets/factory` — the built-in (factory) catalog for\n * a node type.\n */\nexport interface FactoryPresetsResult {\n data: FactoryPresetEntry[]\n}\n\n/** `POST /v1/node-presets` body. */\nexport interface CreateNodePresetInput {\n /** The node type the preset configures, e.g. `\"generate-image\"`. */\n nodeType: string\n /** Unique per node type (case-insensitive); a duplicate answers 409 `name_taken`. */\n name: string\n description?: string\n /** Node config (≤ 64 KB). Runtime keys (results, job ids, labels) are stripped. */\n data: Record<string, unknown>\n /** One of your preset groups, or null for none. */\n groupId?: string | null\n tags?: string[]\n sortOrder?: number\n /**\n * An example picture: an image stored on this platform (an upload or a\n * generated result) that already exists. Anything else answers 400.\n */\n previewUrl?: string | null\n}\n\n/** `PATCH /v1/node-presets/:id` body — every field optional; `previewUrl: null` removes the picture. */\nexport type UpdateNodePresetInput = Partial<Omit<CreateNodePresetInput, \"nodeType\">>\n\n/** One entry of `POST /v1/node-presets/import` (the `presets export` envelope's entries fit). */\nexport interface ImportNodePresetInput {\n nodeType: string\n name: string\n description?: string\n data: Record<string, unknown>\n previewUrl?: string | null\n}\n\n/** `POST /v1/node-presets/reorder` body. */\nexport interface ReorderNodePresetsInput {\n groups?: Array<{ id: string; sortOrder: number }>\n /** `groupId` moves the preset into one of your groups (null = out of any group). */\n presets?: Array<{ id: string; groupId?: string | null; sortOrder: number }>\n}\n\n/** A favorite: a factory preset id (`\"generate-image/character-board\"`) or one of your preset ids. */\nexport interface NodePresetFavoriteInput {\n nodeType: string\n presetId: string\n}\n\n/** `POST /v1/node-preset-groups` body. */\nexport interface CreateNodePresetGroupInput {\n nodeType: string\n name: string\n /** A collapsible `\"folder\"` (default) or a flat `\"section\"` header. */\n kind?: \"folder\" | \"section\"\n sortOrder?: number\n}\n\n/** `PATCH /v1/node-preset-groups/:id` body. */\nexport interface UpdateNodePresetGroupInput {\n name?: string\n sortOrder?: number\n}\n\n/**\n * Node presets — reusable, named node configurations: your own presets and\n * folders, your favorites, and the built-in factory catalog.\n *\n * To *use* a preset, take its `data` and merge it into a node's config when you\n * create/update a workflow. `needsImage` / `minReferences` say how many photos\n * it works from; `previewUrl` is an example picture (null when there is none).\n *\n * The factory catalog (`listFactory`) is public: no token needed. Reads of\n * your own library need the `presets:read` scope for an OAuth app token;\n * writes (create, update, delete, import, reorder, favorites, groups) need\n * `assets:write`. Your own API key needs neither — but a key limited to some\n * workflows cannot reach your own presets (it reads the factory catalog as\n * anyone can).\n */\nexport class PresetsResource {\n constructor(private client: NodaroClientCore) {}\n\n /**\n * `GET /v1/node-presets` → your custom presets, newest first. Pass `nodeType`\n * (e.g. `\"generate-image\"`) to filter to one node type.\n */\n async list(nodeType?: string): Promise<NodePreset[]> {\n const qs = nodeType ? `?nodeType=${encodeURIComponent(nodeType)}` : \"\"\n const res = await this.client.request<{ data: NodePreset[] }>(\"GET\", `/v1/node-presets${qs}`)\n return res.data\n }\n\n /**\n * `GET /v1/node-preset-groups` → your preset folders/sections, in display\n * order. Pass `nodeType` to filter to one node type.\n */\n async listGroups(nodeType?: string): Promise<NodePresetGroup[]> {\n const qs = nodeType ? `?nodeType=${encodeURIComponent(nodeType)}` : \"\"\n const res = await this.client.request<{ data: NodePresetGroup[] }>(\"GET\", `/v1/node-preset-groups${qs}`)\n return res.data\n }\n\n /**\n * `GET /v1/node-presets/factory` → the built-in catalog for `nodeType`. These\n * ship with the app (no account needed to exist), so they're a good starting\n * point for \"what configs are available\".\n *\n * Login is optional: the catalog is public, so this works on a client with\n * no credential at all (`auth: { getToken: async () => null }`) — show the\n * names, example pictures (`previewUrl`) and photo counts (`minReferences`,\n * `needsImage`) to a visitor who is not signed in, and ask for a login only\n * when they generate. Your OWN presets (`list()`) still need a token.\n */\n listFactory(nodeType: string): Promise<FactoryPresetsResult> {\n return this.client.request<FactoryPresetsResult>(\n \"GET\",\n `/v1/node-presets/factory?nodeType=${encodeURIComponent(nodeType)}`,\n )\n }\n\n /** `POST /v1/node-presets` → the new preset. */\n async create(input: CreateNodePresetInput): Promise<NodePreset> {\n const res = await this.client.request<{ data: NodePreset }>(\"POST\", \"/v1/node-presets\", { body: input })\n return res.data\n }\n\n /**\n * `PATCH /v1/node-presets/:id` → the updated preset. Pass the `updatedAt` you\n * read as `expectedUpdatedAt` to refuse (409 `conflict`) a change made\n * elsewhere since.\n */\n async update(id: string, patch: UpdateNodePresetInput, opts: { expectedUpdatedAt?: string } = {}): Promise<NodePreset> {\n const body = opts.expectedUpdatedAt ? { ...patch, expectedUpdatedAt: opts.expectedUpdatedAt } : patch\n const res = await this.client.request<{ data: NodePreset }>(\"PATCH\", `/v1/node-presets/${encodeURIComponent(id)}`, { body })\n return res.data\n }\n\n /** `DELETE /v1/node-presets/:id` (404 when it is not yours). `expectedUpdatedAt` as on `update`. */\n async delete(id: string, opts: { expectedUpdatedAt?: string } = {}): Promise<{ success: true }> {\n const res = await this.client.request<{ data: { success: true } }>(\"DELETE\", `/v1/node-presets/${encodeURIComponent(id)}`, {\n query: { expectedUpdatedAt: opts.expectedUpdatedAt },\n })\n return res.data\n }\n\n /**\n * `POST /v1/node-presets/import` — up to 500 presets in one call. A name you\n * already use gets an \"(imported N)\" suffix; a preset whose data is empty\n * after stripping runtime keys is skipped.\n */\n async import(presets: ImportNodePresetInput[]): Promise<{ imported: number }> {\n const res = await this.client.request<{ data: { imported: number } }>(\"POST\", \"/v1/node-presets/import\", { body: { presets } })\n return res.data\n }\n\n /** `POST /v1/node-presets/reorder` — positions (and group membership) for many presets and groups at once. */\n async reorder(input: ReorderNodePresetsInput): Promise<{ ok: true }> {\n const res = await this.client.request<{ data: { ok: true } }>(\"POST\", \"/v1/node-presets/reorder\", { body: input })\n return res.data\n }\n\n /** `GET /v1/node-presets/favorites` → your favorite preset ids for `nodeType`, newest first. */\n async favorites(nodeType: string): Promise<string[]> {\n const res = await this.client.request<{ data: string[] }>(\"GET\", \"/v1/node-presets/favorites\", { query: { nodeType } })\n return res.data\n }\n\n /** `POST /v1/node-presets/favorites` — idempotent. */\n async addFavorite(input: NodePresetFavoriteInput): Promise<{ success: true }> {\n const res = await this.client.request<{ data: { success: true } }>(\"POST\", \"/v1/node-presets/favorites\", { body: input })\n return res.data\n }\n\n /** `DELETE /v1/node-presets/favorites` — idempotent. */\n async removeFavorite(input: NodePresetFavoriteInput): Promise<{ success: true }> {\n const res = await this.client.request<{ data: { success: true } }>(\"DELETE\", \"/v1/node-presets/favorites\", {\n query: { nodeType: input.nodeType, presetId: input.presetId },\n })\n return res.data\n }\n\n /** `POST /v1/node-preset-groups` → the new folder or section. */\n async createGroup(input: CreateNodePresetGroupInput): Promise<NodePresetGroup> {\n const res = await this.client.request<{ data: NodePresetGroup }>(\"POST\", \"/v1/node-preset-groups\", { body: input })\n return res.data\n }\n\n /** `PATCH /v1/node-preset-groups/:id` → the renamed or moved group. */\n async updateGroup(id: string, patch: UpdateNodePresetGroupInput): Promise<NodePresetGroup> {\n const res = await this.client.request<{ data: NodePresetGroup }>(\"PATCH\", `/v1/node-preset-groups/${encodeURIComponent(id)}`, {\n body: patch,\n })\n return res.data\n }\n\n /** `DELETE /v1/node-preset-groups/:id` — its presets move out of the group; none are deleted. */\n async deleteGroup(id: string): Promise<{ success: true }> {\n const res = await this.client.request<{ data: { success: true } }>(\"DELETE\", `/v1/node-preset-groups/${encodeURIComponent(id)}`)\n return res.data\n }\n}\n"]}
@@ -0,0 +1,203 @@
1
+ // src/resources/pipelines.ts
2
+ var PipelinesResource = class {
3
+ constructor(client) {
4
+ this.client = client;
5
+ }
6
+ client;
7
+ /**
8
+ * Start a new pipeline (headless film generation) — the programmatic
9
+ * equivalent of the studio's "Create film". In Auto mode the engine
10
+ * self-advances to completion; poll {@link get} for status and
11
+ * {@link getTimeline} for the assembled output. In manual/guided mode, drive
12
+ * it with {@link pendingApprovals} + {@link approveStage} /
13
+ * {@link approveSubGate} / {@link acceptMatchCutBreak}.
14
+ *
15
+ * Requires `pipelines:execute` scope. Returns the new pipeline id.
16
+ */
17
+ create(input) {
18
+ return this.client.request("POST", "/v1/pipelines", { body: input });
19
+ }
20
+ /**
21
+ * Fetch current pipeline state: `status`, `current_stage`, credit counters,
22
+ * `mode`, and `failure_reason` (set when `status='failed'`). Poll this to
23
+ * track a headless Auto run to completion. Requires `pipelines:read`.
24
+ */
25
+ get(id) {
26
+ return this.client.request(
27
+ "GET",
28
+ `/v1/pipelines/${encodeURIComponent(id)}`
29
+ );
30
+ }
31
+ /** List the caller's pipelines (most recent first). Requires `pipelines:read`. */
32
+ list() {
33
+ return this.client.request("GET", "/v1/pipelines");
34
+ }
35
+ /**
36
+ * Cancel a running pipeline. Unspent reserved credits refund. Idempotent on
37
+ * an already-terminal pipeline. Requires `pipelines:execute`.
38
+ */
39
+ cancel(id) {
40
+ return this.client.request(
41
+ "POST",
42
+ `/v1/pipelines/${encodeURIComponent(id)}/cancel`,
43
+ { body: {} }
44
+ );
45
+ }
46
+ /**
47
+ * Stages currently `awaiting_approval`. Empty in a clean Auto run (the engine
48
+ * self-approves); populated in manual/guided mode at each gate. Requires
49
+ * `pipelines:read`.
50
+ */
51
+ pendingApprovals(id) {
52
+ return this.client.request(
53
+ "GET",
54
+ `/v1/pipelines/${encodeURIComponent(id)}/pending-approvals`
55
+ );
56
+ }
57
+ /**
58
+ * Approve a stage so the engine advances to the next one. An optional `edits`
59
+ * JSON-Patch is applied to the stage output before approval. Requires
60
+ * `pipelines:approve`.
61
+ */
62
+ approveStage(id, stage, edits) {
63
+ return this.client.request(
64
+ "POST",
65
+ `/v1/pipelines/${encodeURIComponent(id)}/stages/${encodeURIComponent(stage)}/approve`,
66
+ { body: edits ? { edits } : {} }
67
+ );
68
+ }
69
+ /**
70
+ * Reject a stage with feedback; the engine re-runs it incorporating the note.
71
+ * Requires `pipelines:approve`.
72
+ */
73
+ rejectStage(id, stage, feedback) {
74
+ return this.client.request(
75
+ "POST",
76
+ `/v1/pipelines/${encodeURIComponent(id)}/stages/${encodeURIComponent(stage)}/reject`,
77
+ { body: { feedback } }
78
+ );
79
+ }
80
+ /**
81
+ * Approve a Stage 7 (`animate_audio_edit`) sub-gate — `silent_cut_preview`
82
+ * or `dialogue_recheck` — so the orchestrator resumes from the next
83
+ * sub-step. Stage 6's `match_cut_break_pending` is not approved here: accept
84
+ * each break with {@link acceptMatchCutBreak}. Requires `pipelines:approve`.
85
+ */
86
+ approveSubGate(id, gate) {
87
+ return this.client.request(
88
+ "POST",
89
+ `/v1/pipelines/${encodeURIComponent(id)}/sub-gates/${encodeURIComponent(gate)}/approve`,
90
+ { body: {} }
91
+ );
92
+ }
93
+ /**
94
+ * Accept one match-cut break Stage 6 (`scene_images`) flagged. While any
95
+ * break is pending, the stage pauses at the `match_cut_break_pending`
96
+ * sub-gate, and its output lists the pending shot ids; accepting the last
97
+ * one resumes the stage. `sceneId` is the scene entity that holds the shot.
98
+ * Requires `pipelines:approve`.
99
+ */
100
+ acceptMatchCutBreak(id, sceneId, shotId) {
101
+ return this.client.request(
102
+ "POST",
103
+ `/v1/pipelines/${encodeURIComponent(id)}/entities/${encodeURIComponent(sceneId)}/helpers/accept_match_cut_break`,
104
+ { body: { shotId } }
105
+ );
106
+ }
107
+ /**
108
+ * Read a single stage's `status`, `output`, and `critic_feedback`. Useful for
109
+ * inspecting the script/plan before approving. Requires `pipelines:read`.
110
+ */
111
+ getStage(id, stage) {
112
+ return this.client.request(
113
+ "GET",
114
+ `/v1/pipelines/${encodeURIComponent(id)}/stages/${encodeURIComponent(stage)}`
115
+ );
116
+ }
117
+ /**
118
+ * Assembled timeline — ordered scene composites + durations + audio URLs +
119
+ * live animate progress. The output a headless caller renders or hands to a
120
+ * downstream editor. Requires `pipelines:read`.
121
+ */
122
+ getTimeline(id) {
123
+ return this.client.request(
124
+ "GET",
125
+ `/v1/pipelines/${encodeURIComponent(id)}/timeline`
126
+ );
127
+ }
128
+ /**
129
+ * Branch a completed pipeline into a new pipeline that re-runs from the
130
+ * given stage. The original pipeline's upstream stages and entities are
131
+ * cloned into the new pipeline; downstream stages are created by the
132
+ * orchestrator as it advances.
133
+ *
134
+ * Requires `pipelines:execute` scope.
135
+ * The source pipeline must have `status='completed'`.
136
+ *
137
+ * @returns 201 with `{ pipelineId, clonedStages, clonedEntities }`.
138
+ */
139
+ branch(id, input) {
140
+ return this.client.request(
141
+ "POST",
142
+ `/v1/pipelines/${encodeURIComponent(id)}/branch`,
143
+ { body: input }
144
+ );
145
+ }
146
+ /**
147
+ * Send a chat message to the Showrunner Refinement Director (Guided Mode).
148
+ * Persists user + assistant turns; returns the assistant's reply and an
149
+ * optional `proposed_change` the user can `applyChatProposal` to commit.
150
+ *
151
+ * Requires `pipelines:approve` scope. The pipeline must have
152
+ * `mode='guided'` and the stage must be `awaiting_approval`.
153
+ *
154
+ * Only the Script stage ships a wired specialist in Phase 1D.2b — the other
155
+ * chat-enabled stages (`shot_list`, `post_merge`) return 501 until 1D.2d.
156
+ */
157
+ chatStage(pipelineId, stage, message) {
158
+ return this.client.request(
159
+ "POST",
160
+ `/v1/pipelines/${encodeURIComponent(pipelineId)}/stages/${encodeURIComponent(stage)}/chat`,
161
+ { body: { message } }
162
+ );
163
+ }
164
+ /**
165
+ * Accept a proposed change from a prior assistant turn. Routes through
166
+ * `applyStageEdit` (validates JSON Patch + per-stage schema +
167
+ * reference-integrity, inserts a new pipeline_stage_attempts row, CAS-flips
168
+ * the stage to approved, emits `chat:proposal_applied` SSE).
169
+ *
170
+ * Requires `pipelines:approve` scope.
171
+ *
172
+ * Returns `{ applied: true, attemptId, newOutput }` on success, or
173
+ * `{ applied: false, error }` on recoverable failures (the backend already
174
+ * inserted a follow-up assistant turn with a hint). Hard failures
175
+ * (`patch_invalid`, `stage_not_awaiting`) throw via the standard error
176
+ * pipeline (HTTP 409).
177
+ */
178
+ applyChatProposal(pipelineId, stage, turnId) {
179
+ return this.client.request(
180
+ "POST",
181
+ `/v1/pipelines/${encodeURIComponent(pipelineId)}/stages/${encodeURIComponent(stage)}/chat/turns/${encodeURIComponent(turnId)}/apply`,
182
+ { body: {} }
183
+ );
184
+ }
185
+ /**
186
+ * Fetch the chat history for a stage. Returns an empty array when no turns
187
+ * exist yet (e.g., stage has not been started or the user hasn't sent any
188
+ * messages). Used by the frontend chat panel on initial mount; subsequent
189
+ * updates arrive via SSE (`chat:turn` events).
190
+ *
191
+ * Requires `pipelines:read` scope.
192
+ */
193
+ getStageChat(pipelineId, stage) {
194
+ return this.client.request(
195
+ "GET",
196
+ `/v1/pipelines/${encodeURIComponent(pipelineId)}/stages/${encodeURIComponent(stage)}/chat`
197
+ );
198
+ }
199
+ };
200
+
201
+ export { PipelinesResource };
202
+ //# sourceMappingURL=chunk-K4RQOSJH.js.map
203
+ //# sourceMappingURL=chunk-K4RQOSJH.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/resources/pipelines.ts"],"names":[],"mappings":";AAsHO,IAAM,oBAAN,MAAwB;AAAA,EAC7B,YAAoB,MAAA,EAA0B;AAA1B,IAAA,IAAA,CAAA,MAAA,GAAA,MAAA;AAAA,EAA2B;AAAA,EAA3B,MAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAYpB,OAAO,KAAA,EAA+C;AACpD,IAAA,OAAO,IAAA,CAAK,OAAO,OAAA,CAAQ,MAAA,EAAQ,iBAAiB,EAAE,IAAA,EAAM,OAAO,CAAA;AAAA,EACrE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,IAAI,EAAA,EAAqC;AACvC,IAAA,OAAO,KAAK,MAAA,CAAO,OAAA;AAAA,MACjB,KAAA;AAAA,MACA,CAAA,cAAA,EAAiB,kBAAA,CAAmB,EAAE,CAAC,CAAA;AAAA,K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AK,CAAC,CAAA,KAAA;AAAA,KACrF;AAAA,EACF;AACF","file":"chunk-K4RQOSJH.js","sourcesContent":["import type { NodaroClientCore } from \"../core.js\"\nimport type { PipelineInput, PipelineStageName, PipelineStatus, PipelineMode, SubGateName, AnimateSubGate, ChatEnabledStage, ProposedChange } from \"@nodaro/shared/pipeline\"\n\nexport type {\n PipelineInput,\n PipelineStageName,\n PipelineStatus,\n PipelineMode,\n SubGateName,\n AnimateSubGate,\n ChatEnabledStage,\n ProposedChange,\n}\n\n/**\n * Owner-scoped pipeline record returned by `get` / `list` (the server strips\n * `user_id`). Mirrors the public field set of `GET /v1/pipelines/:id`.\n */\nexport interface PipelineRecord {\n id: string\n status: PipelineStatus\n current_stage: string | null\n spent_credits: number\n reserved_credits: number\n upfront_credit_estimate: number\n branched_from_pipeline_id: string | null\n branched_from_stage: string | null\n mode: PipelineMode | null\n failure_reason: string | null\n current_progress_message: string | null\n}\n\n/** One stage currently awaiting approval (from `pendingApprovals`). */\nexport interface PendingApproval {\n stage_name: PipelineStageName\n /** Stage output snapshot; shape varies by stage. */\n output: unknown\n}\n\n/**\n * Assembled timeline (`GET /v1/pipelines/:id/timeline`) — ordered scene\n * composites + their durations, plus optional music/narration and live\n * per-shot animate progress. The data the studio turns into a render.\n */\nexport interface PipelineTimeline {\n fps: number\n width: number\n height: number\n scenes: Array<{ compositeUrl: string; durationSeconds: number }>\n musicUrl?: string\n narrationUrl?: string\n animateProgress?: {\n totalShots: number\n shotsDone: number\n percent: number\n }\n}\n\nexport interface BranchPipelineInput {\n /** The stage to re-run from. Upstream stages are cloned as approved. */\n fromStage: PipelineStageName\n}\n\nexport interface BranchPipelineResult {\n /** The id of the newly created pipeline. */\n pipelineId: string\n /** Stage names that were cloned as 'approved' (stages before `fromStage`). */\n clonedStages: string[]\n /** Number of entity rows cloned into the new pipeline. */\n clonedEntities: number\n}\n\n/**\n * A single chat turn returned by `getStageChat`. Mirrors the\n * `pipeline_chat_turns` row shape selected by the GET handler.\n *\n * `@nodaro/shared` does not yet export a Zod schema for the full row; it only\n * exports `ChatTurnResponseSchema` (the LLM response shape) and the\n * `ProposedChange` discriminated union. Define the wire-format row locally so\n * callers get end-to-end typing today without re-shaping the backend payload.\n */\nexport interface ChatTurn {\n id: string\n turn_n: number\n role: \"user\" | \"assistant\"\n content: string\n proposed_change: ProposedChange | null\n llm_call_id: string | null\n applied_to_attempt_id: string | null\n created_at: string\n}\n\n/**\n * Result of `chatStage` — the assistant turn that was just persisted. The\n * route always echoes the assistant message back so callers can render the\n * reply without a follow-up GET (SSE is the secondary delivery channel).\n */\nexport interface ChatStageResult {\n turnId: string\n role: \"assistant\"\n content: string\n proposed_change: ProposedChange | null\n}\n\n/**\n * Result of `applyChatProposal`. Discriminated on `applied`:\n *\n * - `applied: true` — `applyStageEdit` validated + persisted a new attempt and\n * flipped the stage to approved. `newOutput` is the post-patch artifact.\n * - `applied: false` — recoverable failure (schema_invalid or\n * reference_integrity_failed); the backend has already inserted a follow-up\n * assistant turn with a human-readable hint so the user can iterate via\n * chat. Hard failures throw via the client's error pipeline (409).\n */\nexport type ApplyChatProposalResult =\n | { applied: true; attemptId: string; newOutput: unknown }\n | { applied: false; error: { code: string; detail?: unknown } }\n\nexport class PipelinesResource {\n constructor(private client: NodaroClientCore) {}\n\n /**\n * Start a new pipeline (headless film generation) — the programmatic\n * equivalent of the studio's \"Create film\". In Auto mode the engine\n * self-advances to completion; poll {@link get} for status and\n * {@link getTimeline} for the assembled output. In manual/guided mode, drive\n * it with {@link pendingApprovals} + {@link approveStage} /\n * {@link approveSubGate} / {@link acceptMatchCutBreak}.\n *\n * Requires `pipelines:execute` scope. Returns the new pipeline id.\n */\n create(input: PipelineInput): Promise<{ id: string }> {\n return this.client.request(\"POST\", \"/v1/pipelines\", { body: input })\n }\n\n /**\n * Fetch current pipeline state: `status`, `current_stage`, credit counters,\n * `mode`, and `failure_reason` (set when `status='failed'`). Poll this to\n * track a headless Auto run to completion. Requires `pipelines:read`.\n */\n get(id: string): Promise<PipelineRecord> {\n return this.client.request(\n \"GET\",\n `/v1/pipelines/${encodeURIComponent(id)}`,\n )\n }\n\n /** List the caller's pipelines (most recent first). Requires `pipelines:read`. */\n list(): Promise<PipelineRecord[]> {\n return this.client.request(\"GET\", \"/v1/pipelines\")\n }\n\n /**\n * Cancel a running pipeline. Unspent reserved credits refund. Idempotent on\n * an already-terminal pipeline. Requires `pipelines:execute`.\n */\n cancel(id: string): Promise<{ ok: true }> {\n return this.client.request(\n \"POST\",\n `/v1/pipelines/${encodeURIComponent(id)}/cancel`,\n { body: {} },\n )\n }\n\n /**\n * Stages currently `awaiting_approval`. Empty in a clean Auto run (the engine\n * self-approves); populated in manual/guided mode at each gate. Requires\n * `pipelines:read`.\n */\n pendingApprovals(id: string): Promise<PendingApproval[]> {\n return this.client.request(\n \"GET\",\n `/v1/pipelines/${encodeURIComponent(id)}/pending-approvals`,\n )\n }\n\n /**\n * Approve a stage so the engine advances to the next one. An optional `edits`\n * JSON-Patch is applied to the stage output before approval. Requires\n * `pipelines:approve`.\n */\n approveStage(\n id: string,\n stage: PipelineStageName,\n edits?: unknown,\n ): Promise<{ ok: true }> {\n return this.client.request(\n \"POST\",\n `/v1/pipelines/${encodeURIComponent(id)}/stages/${encodeURIComponent(stage)}/approve`,\n { body: edits ? { edits } : {} },\n )\n }\n\n /**\n * Reject a stage with feedback; the engine re-runs it incorporating the note.\n * Requires `pipelines:approve`.\n */\n rejectStage(\n id: string,\n stage: PipelineStageName,\n feedback: string,\n ): Promise<{ ok: true }> {\n return this.client.request(\n \"POST\",\n `/v1/pipelines/${encodeURIComponent(id)}/stages/${encodeURIComponent(stage)}/reject`,\n { body: { feedback } },\n )\n }\n\n /**\n * Approve a Stage 7 (`animate_audio_edit`) sub-gate — `silent_cut_preview`\n * or `dialogue_recheck` — so the orchestrator resumes from the next\n * sub-step. Stage 6's `match_cut_break_pending` is not approved here: accept\n * each break with {@link acceptMatchCutBreak}. Requires `pipelines:approve`.\n */\n approveSubGate(\n id: string,\n gate: AnimateSubGate,\n ): Promise<{ ok: true; gate: AnimateSubGate; resumed_at: string }> {\n return this.client.request(\n \"POST\",\n `/v1/pipelines/${encodeURIComponent(id)}/sub-gates/${encodeURIComponent(gate)}/approve`,\n { body: {} },\n )\n }\n\n /**\n * Accept one match-cut break Stage 6 (`scene_images`) flagged. While any\n * break is pending, the stage pauses at the `match_cut_break_pending`\n * sub-gate, and its output lists the pending shot ids; accepting the last\n * one resumes the stage. `sceneId` is the scene entity that holds the shot.\n * Requires `pipelines:approve`.\n */\n acceptMatchCutBreak(\n id: string,\n sceneId: string,\n shotId: string,\n ): Promise<{ ok: true; pendingRemaining: number }> {\n return this.client.request(\n \"POST\",\n `/v1/pipelines/${encodeURIComponent(id)}/entities/${encodeURIComponent(sceneId)}/helpers/accept_match_cut_break`,\n { body: { shotId } },\n )\n }\n\n /**\n * Read a single stage's `status`, `output`, and `critic_feedback`. Useful for\n * inspecting the script/plan before approving. Requires `pipelines:read`.\n */\n getStage(\n id: string,\n stage: PipelineStageName,\n ): Promise<{ status: string; output: unknown; critic_feedback: unknown }> {\n return this.client.request(\n \"GET\",\n `/v1/pipelines/${encodeURIComponent(id)}/stages/${encodeURIComponent(stage)}`,\n )\n }\n\n /**\n * Assembled timeline — ordered scene composites + durations + audio URLs +\n * live animate progress. The output a headless caller renders or hands to a\n * downstream editor. Requires `pipelines:read`.\n */\n getTimeline(id: string): Promise<PipelineTimeline> {\n return this.client.request(\n \"GET\",\n `/v1/pipelines/${encodeURIComponent(id)}/timeline`,\n )\n }\n\n /**\n * Branch a completed pipeline into a new pipeline that re-runs from the\n * given stage. The original pipeline's upstream stages and entities are\n * cloned into the new pipeline; downstream stages are created by the\n * orchestrator as it advances.\n *\n * Requires `pipelines:execute` scope.\n * The source pipeline must have `status='completed'`.\n *\n * @returns 201 with `{ pipelineId, clonedStages, clonedEntities }`.\n */\n branch(id: string, input: BranchPipelineInput): Promise<BranchPipelineResult> {\n return this.client.request(\n \"POST\",\n `/v1/pipelines/${encodeURIComponent(id)}/branch`,\n { body: input },\n )\n }\n\n /**\n * Send a chat message to the Showrunner Refinement Director (Guided Mode).\n * Persists user + assistant turns; returns the assistant's reply and an\n * optional `proposed_change` the user can `applyChatProposal` to commit.\n *\n * Requires `pipelines:approve` scope. The pipeline must have\n * `mode='guided'` and the stage must be `awaiting_approval`.\n *\n * Only the Script stage ships a wired specialist in Phase 1D.2b — the other\n * chat-enabled stages (`shot_list`, `post_merge`) return 501 until 1D.2d.\n */\n chatStage(\n pipelineId: string,\n stage: ChatEnabledStage,\n message: string,\n ): Promise<ChatStageResult> {\n return this.client.request(\n \"POST\",\n `/v1/pipelines/${encodeURIComponent(pipelineId)}/stages/${encodeURIComponent(stage)}/chat`,\n { body: { message } },\n )\n }\n\n /**\n * Accept a proposed change from a prior assistant turn. Routes through\n * `applyStageEdit` (validates JSON Patch + per-stage schema +\n * reference-integrity, inserts a new pipeline_stage_attempts row, CAS-flips\n * the stage to approved, emits `chat:proposal_applied` SSE).\n *\n * Requires `pipelines:approve` scope.\n *\n * Returns `{ applied: true, attemptId, newOutput }` on success, or\n * `{ applied: false, error }` on recoverable failures (the backend already\n * inserted a follow-up assistant turn with a hint). Hard failures\n * (`patch_invalid`, `stage_not_awaiting`) throw via the standard error\n * pipeline (HTTP 409).\n */\n applyChatProposal(\n pipelineId: string,\n stage: ChatEnabledStage,\n turnId: string,\n ): Promise<ApplyChatProposalResult> {\n return this.client.request(\n \"POST\",\n `/v1/pipelines/${encodeURIComponent(pipelineId)}/stages/${encodeURIComponent(stage)}/chat/turns/${encodeURIComponent(turnId)}/apply`,\n { body: {} },\n )\n }\n\n /**\n * Fetch the chat history for a stage. Returns an empty array when no turns\n * exist yet (e.g., stage has not been started or the user hasn't sent any\n * messages). Used by the frontend chat panel on initial mount; subsequent\n * updates arrive via SSE (`chat:turn` events).\n *\n * Requires `pipelines:read` scope.\n */\n getStageChat(\n pipelineId: string,\n stage: ChatEnabledStage,\n ): Promise<{ turns: ChatTurn[] }> {\n return this.client.request(\n \"GET\",\n `/v1/pipelines/${encodeURIComponent(pipelineId)}/stages/${encodeURIComponent(stage)}/chat`,\n )\n }\n}\n"]}
@@ -0,0 +1,4 @@
1
+ 'use strict';
2
+
3
+ //# sourceMappingURL=chunk-KAIE6WJB.cjs.map
4
+ //# sourceMappingURL=chunk-KAIE6WJB.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"chunk-KAIE6WJB.cjs"}
@@ -0,0 +1,4 @@
1
+ 'use strict';
2
+
3
+ //# sourceMappingURL=chunk-KEDPGWIK.cjs.map
4
+ //# sourceMappingURL=chunk-KEDPGWIK.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"chunk-KEDPGWIK.cjs"}
@@ -0,0 +1,18 @@
1
+ // src/resources/catalogs.ts
2
+ var CatalogsResource = class {
3
+ constructor(client) {
4
+ this.client = client;
5
+ }
6
+ client;
7
+ /** Every catalog, projected & pack-composed (honors the deployment's
8
+ * registered vendored packs). Cached publicly 5 min. `data` is absent
9
+ * when the deployment registered no packs (`curated: false`). */
10
+ list(opts = {}) {
11
+ const qs = opts.detail ? `?detail=${opts.detail}` : "";
12
+ return this.client.request("GET", `/v1/catalogs${qs}`);
13
+ }
14
+ };
15
+
16
+ export { CatalogsResource };
17
+ //# sourceMappingURL=chunk-KG4R454Z.js.map
18
+ //# sourceMappingURL=chunk-KG4R454Z.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/resources/catalogs.ts"],"names":[],"mappings":";AAuEO,IAAM,mBAAN,MAAuB;AAAA,EAC5B,YAAoB,MAAA,EAA0B;AAA1B,IAAA,IAAA,CAAA,MAAA,GAAA,MAAA;AAAA,EAA2B;AAAA,EAA3B,MAAA;AAAA;AAAA;AAAA;AAAA,EAKpB,IAAA,CAAK,IAAA,GAAwC,EAAC,EAAkC;AAC9E,IAAA,MAAM,KAAK,IAAA,CAAK,MAAA,GAAS,CAAA,QAAA,EAAW,IAAA,CAAK,MAAM,CAAA,CAAA,GAAK,EAAA;AACpD,IAAA,OAAO,KAAK,MAAA,CAAO,OAAA,CAAQ,KAAA,EAAO,CAAA,YAAA,EAAe,EAAE,CAAA,CAAE,CAAA;AAAA,EACvD;AACF","file":"chunk-KG4R454Z.js","sourcesContent":["import type { NodaroClientCore } from \"../core.js\"\n\n/**\n * Catalog projection types. Mirror `@nodaro/shared`'s `ProjectedCatalog` so the\n * SDK stays dependency-free (same convention as `picker-catalogs.ts`). Tag-free\n * by design — the deferred `CatalogPolicy` never crosses the wire.\n */\nexport interface ProjectedCatalogOption {\n id: string\n label: string\n description?: string\n category?: string\n /** The prompt fragment this id injects downstream. Present only when detail=\"full\". */\n promptHint?: string\n /**\n * Short professional term injected by compact hint mode; `label` is for\n * display. Present at BOTH detail levels — a thin client renders `label`\n * and injects `term`. Empty for a no-op (\"auto\"/\"none\") entry that injects\n * nothing.\n */\n term?: string\n icon?: string\n /**\n * Absolute URL of the option's picture — a photo, 3D emoji, flag or (Nodaro\n * Cloud only) rendered look preview — on the installation's own host, or the\n * Nodaro CDN for look previews. Absent when the option has no picture. Use it\n * as given: file names carry a content hash, so it can be cached for good.\n */\n imageUrl?: string\n}\nexport interface ProjectedCatalogDimension {\n field: string\n label: string\n options: ProjectedCatalogOption[]\n}\nexport interface ProjectedCatalog {\n nodeType: string\n label: string\n catalogId: string\n kind: \"single\" | \"multi\"\n valueField?: string\n defaultValue?: string\n categoryOrder?: string[]\n categoryLabels?: Record<string, string>\n detail: \"compact\" | \"full\"\n options?: ProjectedCatalogOption[]\n fields?: string[]\n dimensions?: ProjectedCatalogDimension[]\n /** person and styling: the topics their settings are grouped under, in order, each with its picture. */\n sections?: ProjectedCatalogSection[]\n}\n\n/** A topic a multi-dim catalog's settings are grouped under in the editor (person, styling). */\nexport interface ProjectedCatalogSection {\n label: string\n fields: string[]\n imageUrl?: string\n}\n\n/**\n * `GET /v1/catalogs`. `data` is present only when the deployment registered\n * catalog packs (`curated: true`); with none the catalogs are the bundled\n * ones — read them per picker with `client.pickerCatalogs.get(nodeType)`.\n */\nexport interface CatalogsListResponse {\n curated: boolean\n packs: number\n version: number\n data?: ProjectedCatalog[]\n}\n\nexport class CatalogsResource {\n constructor(private client: NodaroClientCore) {}\n\n /** Every catalog, projected & pack-composed (honors the deployment's\n * registered vendored packs). Cached publicly 5 min. `data` is absent\n * when the deployment registered no packs (`curated: false`). */\n list(opts: { detail?: \"compact\" | \"full\" } = {}): Promise<CatalogsListResponse> {\n const qs = opts.detail ? `?detail=${opts.detail}` : \"\"\n return this.client.request(\"GET\", `/v1/catalogs${qs}`)\n }\n}\n"]}
@@ -0,0 +1,22 @@
1
+ 'use strict';
2
+
3
+ // src/resources/prompt-helper.ts
4
+ var PromptHelperResource = class {
5
+ constructor(client) {
6
+ this.client = client;
7
+ }
8
+ client;
9
+ analyze(input) {
10
+ return this.client.request("POST", "/v1/prompt-helper/wizard", { body: { action: "analyze", ...input } });
11
+ }
12
+ generate(input) {
13
+ return this.client.request("POST", "/v1/prompt-helper/wizard", { body: { action: "generate", ...input } });
14
+ }
15
+ enhance(input) {
16
+ return this.client.request("POST", "/v1/prompt-helper/wizard", { body: { action: "enhance", ...input } });
17
+ }
18
+ };
19
+
20
+ exports.PromptHelperResource = PromptHelperResource;
21
+ //# sourceMappingURL=chunk-KGKCAGRD.cjs.map
22
+ //# sourceMappingURL=chunk-KGKCAGRD.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/resources/prompt-helper.ts"],"names":[],"mappings":";;;AAqEO,IAAM,uBAAN,MAA2B;AAAA,EAChC,YAAoB,MAAA,EAA0B;AAA1B,IAAA,IAAA,CAAA,MAAA,GAAA,MAAA;AAAA,EAA2B;AAAA,EAA3B,MAAA;AAAA,EAEpB,QAAQ,KAAA,EAA6C;AACnD,IAAA,OAAO,IAAA,CAAK,MAAA,CAAO,OAAA,CAAQ,MAAA,EAAQ,0BAAA,EAA4B,EAAE,IAAA,EAAM,EAAE,MAAA,EAAQ,SAAA,EAAW,GAAG,KAAA,IAAS,CAAA;AAAA,EAC1G;AAAA,EAEA,SAAS,KAAA,EAA6C;AACpD,IAAA,OAAO,IAAA,CAAK,MAAA,CAAO,OAAA,CAAQ,MAAA,EAAQ,0BAAA,EAA4B,EAAE,IAAA,EAAM,EAAE,MAAA,EAAQ,UAAA,EAAY,GAAG,KAAA,IAAS,CAAA;AAAA,EAC3G;AAAA,EAEA,QAAQ,KAAA,EAA4C;AAClD,IAAA,OAAO,IAAA,CAAK,MAAA,CAAO,OAAA,CAAQ,MAAA,EAAQ,0BAAA,EAA4B,EAAE,IAAA,EAAM,EAAE,MAAA,EAAQ,SAAA,EAAW,GAAG,KAAA,IAAS,CAAA;AAAA,EAC1G;AACF","file":"chunk-KGKCAGRD.cjs","sourcesContent":["import type { NodaroClientCore } from \"../core.js\"\nimport type { WizardQuestion, WizardSelection, RecommendedModel, WizardNodeContext } from \"@nodaro/prompts/doctrine\"\nexport type { WizardQuestion, WizardOption, WizardSelection, RecommendedModel, WizardNodeContext } from \"@nodaro/prompts/doctrine\"\n\n// Re-export the canonical wizard types (SSOT in @nodaro/shared).\n\ninterface CommonInput {\n nodeType: string\n provider?: string\n style?: string\n aspectRatio?: string\n duration?: number\n llmModel?: string\n /** Reasoning effort level (model-dependent). */\n reasoningEffort?: string\n /**\n * Gemini and Claude models. Runs the request on the provider's own API so\n * `temperature`, `maxTokens` and the full reasoning range actually take\n * effect — on the default lane those levers are not reliably honoured.\n * Bills one credit rung up (a premium model moves to premium-direct). A model without a direct lane returns\n * `400 advanced_mode_unsupported`.\n */\n advancedMode?: boolean\n /** Sampling temperature. Only honoured when `advancedMode` is true. */\n temperature?: number\n /** Output token cap. Only honoured when `advancedMode` is true. */\n maxTokens?: number\n nodeContext?: WizardNodeContext\n userPreference?: string\n /** Associates this call with a workflow execution. Read server-side before Zod. */\n workflowId?: string\n}\n\nexport interface AnalyzeInput extends CommonInput {\n /** The user's rough idea. Omit to build questions from scratch. */\n prompt?: string\n}\nexport interface AnalyzeResult {\n jobId: string\n questions: WizardQuestion[]\n}\n\nexport interface GenerateInput extends CommonInput {\n /** The chosen answers from analyze. */\n selections: WizardSelection[]\n /** The user's original rough idea, woven into the generated prompt. */\n originalPrompt?: string\n}\n\nexport interface EnhanceInput extends CommonInput {\n /** The rough idea to improve one-shot. Omit to build from scratch. */\n prompt?: string\n}\n\nexport interface PromptResult {\n jobId: string\n prompt: string\n recommendedModel?: RecommendedModel\n}\n\n/**\n * AI Prompt Wizard — help write/improve prompts for generation nodes.\n *\n * - `analyze` -> guided questions, `generate` -> prompt from selections (the\n * 2-step human flow), or `enhance` -> one-shot \"improve this prompt\".\n *\n * All three delegate to `POST /v1/prompt-helper/wizard`. Throws `NodaroError`\n * on 4xx/5xx (e.g. `validation_error`, `malformed_response`).\n */\nexport class PromptHelperResource {\n constructor(private client: NodaroClientCore) {}\n\n analyze(input: AnalyzeInput): Promise<AnalyzeResult> {\n return this.client.request(\"POST\", \"/v1/prompt-helper/wizard\", { body: { action: \"analyze\", ...input } })\n }\n\n generate(input: GenerateInput): Promise<PromptResult> {\n return this.client.request(\"POST\", \"/v1/prompt-helper/wizard\", { body: { action: \"generate\", ...input } })\n }\n\n enhance(input: EnhanceInput): Promise<PromptResult> {\n return this.client.request(\"POST\", \"/v1/prompt-helper/wizard\", { body: { action: \"enhance\", ...input } })\n }\n}\n"]}