@nodaro/sdk 2.29.0 → 2.32.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-4CXB7RA6.js +104 -0
  27. package/dist/chunk-4CXB7RA6.js.map +1 -0
  28. package/dist/chunk-4NLVBYMW.js +280 -0
  29. package/dist/chunk-4NLVBYMW.js.map +1 -0
  30. package/dist/chunk-4WRDR4GN.js +102 -0
  31. package/dist/chunk-4WRDR4GN.js.map +1 -0
  32. package/dist/chunk-4WWSHV5G.cjs +4 -0
  33. package/dist/chunk-4WWSHV5G.cjs.map +1 -0
  34. package/dist/chunk-53SXNN3A.js +80 -0
  35. package/dist/chunk-53SXNN3A.js.map +1 -0
  36. package/dist/chunk-5ALNFATQ.cjs +27 -0
  37. package/dist/chunk-5ALNFATQ.cjs.map +1 -0
  38. package/dist/chunk-5UQNMNUE.cjs +4 -0
  39. package/dist/chunk-5UQNMNUE.cjs.map +1 -0
  40. package/dist/chunk-65E3JBFZ.js +52 -0
  41. package/dist/chunk-65E3JBFZ.js.map +1 -0
  42. package/dist/chunk-6ECW23GA.js +214 -0
  43. package/dist/chunk-6ECW23GA.js.map +1 -0
  44. package/dist/chunk-6JFNBAKV.js +3 -0
  45. package/dist/chunk-6JFNBAKV.js.map +1 -0
  46. package/dist/chunk-6OC6OKLY.cjs +4 -0
  47. package/dist/chunk-6OC6OKLY.cjs.map +1 -0
  48. package/dist/chunk-6OGGJQVA.js +25 -0
  49. package/dist/chunk-6OGGJQVA.js.map +1 -0
  50. package/dist/chunk-7A7HYFGM.js +3 -0
  51. package/dist/chunk-7A7HYFGM.js.map +1 -0
  52. package/dist/chunk-7CK6I4CT.cjs +16 -0
  53. package/dist/chunk-7CK6I4CT.cjs.map +1 -0
  54. package/dist/chunk-7LSFG2AF.js +194 -0
  55. package/dist/chunk-7LSFG2AF.js.map +1 -0
  56. package/dist/chunk-7MYKT2L4.cjs +4 -0
  57. package/dist/chunk-7MYKT2L4.cjs.map +1 -0
  58. package/dist/chunk-7QOCWJKD.cjs +25 -0
  59. package/dist/chunk-7QOCWJKD.cjs.map +1 -0
  60. package/dist/chunk-A2ZAFAWC.cjs +4 -0
  61. package/dist/chunk-A2ZAFAWC.cjs.map +1 -0
  62. package/dist/chunk-A3S55XGF.cjs +54 -0
  63. package/dist/chunk-A3S55XGF.cjs.map +1 -0
  64. package/dist/chunk-A3THLBFG.js +3 -0
  65. package/dist/chunk-A3THLBFG.js.map +1 -0
  66. package/dist/chunk-AJVSMNPZ.js +78 -0
  67. package/dist/chunk-AJVSMNPZ.js.map +1 -0
  68. package/dist/chunk-ALSLZG3U.js +124 -0
  69. package/dist/chunk-ALSLZG3U.js.map +1 -0
  70. package/dist/chunk-ALUUBPDG.cjs +4 -0
  71. package/dist/chunk-ALUUBPDG.cjs.map +1 -0
  72. package/dist/chunk-AO3W45LT.cjs +4 -0
  73. package/dist/chunk-AO3W45LT.cjs.map +1 -0
  74. package/dist/chunk-AUDHV3OE.js +3 -0
  75. package/dist/chunk-AUDHV3OE.js.map +1 -0
  76. package/dist/chunk-B7RG6AUQ.cjs +216 -0
  77. package/dist/chunk-B7RG6AUQ.cjs.map +1 -0
  78. package/dist/chunk-BAL576G2.cjs +4 -0
  79. package/dist/chunk-BAL576G2.cjs.map +1 -0
  80. package/dist/chunk-BKP6F2IX.js +3 -0
  81. package/dist/chunk-BKP6F2IX.js.map +1 -0
  82. package/dist/chunk-BLA44UCM.js +32 -0
  83. package/dist/chunk-BLA44UCM.js.map +1 -0
  84. package/dist/chunk-BPWUWUZ3.cjs +20 -0
  85. package/dist/chunk-BPWUWUZ3.cjs.map +1 -0
  86. package/dist/chunk-BRV7Z4GD.cjs +17 -0
  87. package/dist/chunk-BRV7Z4GD.cjs.map +1 -0
  88. package/dist/chunk-BU5A6K4C.js +122 -0
  89. package/dist/chunk-BU5A6K4C.js.map +1 -0
  90. package/dist/chunk-C22RJDW3.js +3 -0
  91. package/dist/chunk-C22RJDW3.js.map +1 -0
  92. package/dist/chunk-CGNVHN4V.js +3 -0
  93. package/dist/chunk-CGNVHN4V.js.map +1 -0
  94. package/dist/chunk-CJFIOVBA.js +3 -0
  95. package/dist/chunk-CJFIOVBA.js.map +1 -0
  96. package/dist/chunk-CJLLIVSB.cjs +4 -0
  97. package/dist/chunk-CJLLIVSB.cjs.map +1 -0
  98. package/dist/chunk-CK3AMMSC.js +194 -0
  99. package/dist/chunk-CK3AMMSC.js.map +1 -0
  100. package/dist/chunk-COCKKMNP.cjs +205 -0
  101. package/dist/chunk-COCKKMNP.cjs.map +1 -0
  102. package/dist/chunk-CR5E2SF3.cjs +212 -0
  103. package/dist/chunk-CR5E2SF3.cjs.map +1 -0
  104. package/dist/chunk-CRCPRZFN.js +3 -0
  105. package/dist/chunk-CRCPRZFN.js.map +1 -0
  106. package/dist/chunk-CYRFD6KR.cjs +4 -0
  107. package/dist/chunk-CYRFD6KR.cjs.map +1 -0
  108. package/dist/chunk-D3PW7AHZ.js +3 -0
  109. package/dist/chunk-D3PW7AHZ.js.map +1 -0
  110. package/dist/chunk-DKEYSJCE.cjs +82 -0
  111. package/dist/chunk-DKEYSJCE.cjs.map +1 -0
  112. package/dist/chunk-DPSMVOM3.js +15 -0
  113. package/dist/chunk-DPSMVOM3.js.map +1 -0
  114. package/dist/chunk-E2ZXHS6E.js +20 -0
  115. package/dist/chunk-E2ZXHS6E.js.map +1 -0
  116. package/dist/chunk-E37CVHWW.js +33 -0
  117. package/dist/chunk-E37CVHWW.js.map +1 -0
  118. package/dist/chunk-E5BM4BLO.js +78 -0
  119. package/dist/chunk-E5BM4BLO.js.map +1 -0
  120. package/dist/chunk-EHRWTYGR.cjs +4 -0
  121. package/dist/chunk-EHRWTYGR.cjs.map +1 -0
  122. package/dist/chunk-EJSGJDZY.js +212 -0
  123. package/dist/chunk-EJSGJDZY.js.map +1 -0
  124. package/dist/chunk-ELSOVJPF.js +3 -0
  125. package/dist/chunk-ELSOVJPF.js.map +1 -0
  126. package/dist/chunk-ERLXU47J.js +29 -0
  127. package/dist/chunk-ERLXU47J.js.map +1 -0
  128. package/dist/chunk-ES2E65HT.js +3 -0
  129. package/dist/chunk-ES2E65HT.js.map +1 -0
  130. package/dist/chunk-EXLAHZKF.js +3 -0
  131. package/dist/chunk-EXLAHZKF.js.map +1 -0
  132. package/dist/chunk-FB3S2FON.cjs +233 -0
  133. package/dist/chunk-FB3S2FON.cjs.map +1 -0
  134. package/dist/chunk-FHEYAW5H.js +3 -0
  135. package/dist/chunk-FHEYAW5H.js.map +1 -0
  136. package/dist/chunk-GA4LZZKQ.cjs +104 -0
  137. package/dist/chunk-GA4LZZKQ.cjs.map +1 -0
  138. package/dist/chunk-GAZJ2PA3.js +3 -0
  139. package/dist/chunk-GAZJ2PA3.js.map +1 -0
  140. package/dist/chunk-GB6C5OEZ.cjs +32 -0
  141. package/dist/chunk-GB6C5OEZ.cjs.map +1 -0
  142. package/dist/chunk-GB724HW2.cjs +106 -0
  143. package/dist/chunk-GB724HW2.cjs.map +1 -0
  144. package/dist/chunk-GD24ZRFD.js +3 -0
  145. package/dist/chunk-GD24ZRFD.js.map +1 -0
  146. package/dist/chunk-GI7LROLL.cjs +4 -0
  147. package/dist/chunk-GI7LROLL.cjs.map +1 -0
  148. package/dist/chunk-GRFLPEM2.cjs +16 -0
  149. package/dist/chunk-GRFLPEM2.cjs.map +1 -0
  150. package/dist/chunk-GVIFLUYZ.cjs +40 -0
  151. package/dist/chunk-GVIFLUYZ.cjs.map +1 -0
  152. package/dist/chunk-GWCOKNST.js +228 -0
  153. package/dist/chunk-GWCOKNST.js.map +1 -0
  154. package/dist/chunk-H7VQTG4M.js +35 -0
  155. package/dist/chunk-H7VQTG4M.js.map +1 -0
  156. package/dist/chunk-HAKYPZLB.cjs +242 -0
  157. package/dist/chunk-HAKYPZLB.cjs.map +1 -0
  158. package/dist/chunk-HFBR6G36.js +3 -0
  159. package/dist/chunk-HFBR6G36.js.map +1 -0
  160. package/dist/chunk-HGCVWOGK.cjs +209 -0
  161. package/dist/chunk-HGCVWOGK.cjs.map +1 -0
  162. package/dist/chunk-HLHR3R4P.js +3 -0
  163. package/dist/chunk-HLHR3R4P.js.map +1 -0
  164. package/dist/chunk-HRXXGGSJ.js +3 -0
  165. package/dist/chunk-HRXXGGSJ.js.map +1 -0
  166. package/dist/chunk-I3TYBAOX.js +3 -0
  167. package/dist/chunk-I3TYBAOX.js.map +1 -0
  168. package/dist/chunk-I4A5VJRL.js +352 -0
  169. package/dist/chunk-I4A5VJRL.js.map +1 -0
  170. package/dist/chunk-I6CXC345.js +102 -0
  171. package/dist/chunk-I6CXC345.js.map +1 -0
  172. package/dist/chunk-IGOPUMEX.cjs +4 -0
  173. package/dist/chunk-IGOPUMEX.cjs.map +1 -0
  174. package/dist/chunk-IHKIYVZQ.js +30 -0
  175. package/dist/chunk-IHKIYVZQ.js.map +1 -0
  176. package/dist/chunk-IMC2M5YM.cjs +12 -0
  177. package/dist/chunk-IMC2M5YM.cjs.map +1 -0
  178. package/dist/chunk-IQ6KWSXP.js +3 -0
  179. package/dist/chunk-IQ6KWSXP.js.map +1 -0
  180. package/dist/chunk-IS26FJO7.cjs +4 -0
  181. package/dist/chunk-IS26FJO7.cjs.map +1 -0
  182. package/dist/chunk-J4WFSKY6.js +50 -0
  183. package/dist/chunk-J4WFSKY6.js.map +1 -0
  184. package/dist/chunk-J5LGGCAS.cjs +126 -0
  185. package/dist/chunk-J5LGGCAS.cjs.map +1 -0
  186. package/dist/chunk-JDEZHITT.js +43 -0
  187. package/dist/chunk-JDEZHITT.js.map +1 -0
  188. package/dist/chunk-JGS6YBDW.js +260 -0
  189. package/dist/chunk-JGS6YBDW.js.map +1 -0
  190. package/dist/chunk-JMOKD6ZP.js +46 -0
  191. package/dist/chunk-JMOKD6ZP.js.map +1 -0
  192. package/dist/chunk-JOX5BJ6K.cjs +4 -0
  193. package/dist/chunk-JOX5BJ6K.cjs.map +1 -0
  194. package/dist/chunk-JTAW54UM.js +116 -0
  195. package/dist/chunk-JTAW54UM.js.map +1 -0
  196. package/dist/chunk-K4RQOSJH.js +203 -0
  197. package/dist/chunk-K4RQOSJH.js.map +1 -0
  198. package/dist/chunk-KAIE6WJB.cjs +4 -0
  199. package/dist/chunk-KAIE6WJB.cjs.map +1 -0
  200. package/dist/chunk-KEDPGWIK.cjs +4 -0
  201. package/dist/chunk-KEDPGWIK.cjs.map +1 -0
  202. package/dist/chunk-KG4R454Z.js +18 -0
  203. package/dist/chunk-KG4R454Z.js.map +1 -0
  204. package/dist/chunk-KGKCAGRD.cjs +22 -0
  205. package/dist/chunk-KGKCAGRD.cjs.map +1 -0
  206. package/dist/chunk-KNMW722T.cjs +48 -0
  207. package/dist/chunk-KNMW722T.cjs.map +1 -0
  208. package/dist/chunk-KTTL7BND.cjs +4 -0
  209. package/dist/chunk-KTTL7BND.cjs.map +1 -0
  210. package/dist/chunk-KXEWTYS4.cjs +80 -0
  211. package/dist/chunk-KXEWTYS4.cjs.map +1 -0
  212. package/dist/chunk-KZQKFBRN.js +3 -0
  213. package/dist/chunk-KZQKFBRN.js.map +1 -0
  214. package/dist/chunk-LAWYFC4G.cjs +37 -0
  215. package/dist/chunk-LAWYFC4G.cjs.map +1 -0
  216. package/dist/chunk-LHRQXWI5.js +3 -0
  217. package/dist/chunk-LHRQXWI5.js.map +1 -0
  218. package/dist/chunk-LKH5M44B.cjs +114 -0
  219. package/dist/chunk-LKH5M44B.cjs.map +1 -0
  220. package/dist/chunk-LLNNHLCE.cjs +4 -0
  221. package/dist/chunk-LLNNHLCE.cjs.map +1 -0
  222. package/dist/chunk-LWZLWSXD.cjs +4 -0
  223. package/dist/chunk-LWZLWSXD.cjs.map +1 -0
  224. package/dist/chunk-M6Y5TOYE.js +3 -0
  225. package/dist/chunk-M6Y5TOYE.js.map +1 -0
  226. package/dist/chunk-MBFUMWI5.cjs +31 -0
  227. package/dist/chunk-MBFUMWI5.cjs.map +1 -0
  228. package/dist/chunk-MEKI37WI.js +3 -0
  229. package/dist/chunk-MEKI37WI.js.map +1 -0
  230. package/dist/chunk-MQ74AKA2.cjs +200 -0
  231. package/dist/chunk-MQ74AKA2.cjs.map +1 -0
  232. package/dist/chunk-N6GLZOE4.cjs +282 -0
  233. package/dist/chunk-N6GLZOE4.cjs.map +1 -0
  234. package/dist/chunk-NBVARNVA.cjs +38 -0
  235. package/dist/chunk-NBVARNVA.cjs.map +1 -0
  236. package/dist/chunk-NCCBS6GU.js +42 -0
  237. package/dist/chunk-NCCBS6GU.js.map +1 -0
  238. package/dist/chunk-NGKODS3J.cjs +52 -0
  239. package/dist/chunk-NGKODS3J.cjs.map +1 -0
  240. package/dist/chunk-NJVSKUL2.cjs +4 -0
  241. package/dist/chunk-NJVSKUL2.cjs.map +1 -0
  242. package/dist/chunk-NLQQHJ25.cjs +104 -0
  243. package/dist/chunk-NLQQHJ25.cjs.map +1 -0
  244. package/dist/chunk-NNHWH7ER.js +181 -0
  245. package/dist/chunk-NNHWH7ER.js.map +1 -0
  246. package/dist/chunk-NX67YIF3.js +3 -0
  247. package/dist/chunk-NX67YIF3.js.map +1 -0
  248. package/dist/chunk-OA6FWYZF.cjs +4 -0
  249. package/dist/chunk-OA6FWYZF.cjs.map +1 -0
  250. package/dist/chunk-OJDBSKC2.js +3 -0
  251. package/dist/chunk-OJDBSKC2.js.map +1 -0
  252. package/dist/chunk-OLPA44QJ.js +3 -0
  253. package/dist/chunk-OLPA44QJ.js.map +1 -0
  254. package/dist/chunk-OMH7ATOQ.js +3 -0
  255. package/dist/chunk-OMH7ATOQ.js.map +1 -0
  256. package/dist/chunk-OPR4TULG.js +3 -0
  257. package/dist/chunk-OPR4TULG.js.map +1 -0
  258. package/dist/chunk-OSX2GVZ2.cjs +34 -0
  259. package/dist/chunk-OSX2GVZ2.cjs.map +1 -0
  260. package/dist/chunk-OXQKE5EG.cjs +282 -0
  261. package/dist/chunk-OXQKE5EG.cjs.map +1 -0
  262. package/dist/chunk-P6E4QDJN.js +30 -0
  263. package/dist/chunk-P6E4QDJN.js.map +1 -0
  264. package/dist/chunk-PEMLIAPZ.cjs +64 -0
  265. package/dist/chunk-PEMLIAPZ.cjs.map +1 -0
  266. package/dist/chunk-PGYQ754I.js +3 -0
  267. package/dist/chunk-PGYQ754I.js.map +1 -0
  268. package/dist/chunk-PHEA6FVQ.js +184 -0
  269. package/dist/chunk-PHEA6FVQ.js.map +1 -0
  270. package/dist/chunk-PMTM26LL.js +3 -0
  271. package/dist/chunk-PMTM26LL.js.map +1 -0
  272. package/dist/chunk-PY4OEKNX.cjs +4 -0
  273. package/dist/chunk-PY4OEKNX.cjs.map +1 -0
  274. package/dist/chunk-PZS2EXDR.cjs +4 -0
  275. package/dist/chunk-PZS2EXDR.cjs.map +1 -0
  276. package/dist/chunk-QRHJEITQ.cjs +4 -0
  277. package/dist/chunk-QRHJEITQ.cjs.map +1 -0
  278. package/dist/chunk-QUFU5RJ7.cjs +4 -0
  279. package/dist/chunk-QUFU5RJ7.cjs.map +1 -0
  280. package/dist/chunk-QVQCKOBM.js +3 -0
  281. package/dist/chunk-QVQCKOBM.js.map +1 -0
  282. package/dist/chunk-R63TTR35.cjs +200 -0
  283. package/dist/chunk-R63TTR35.cjs.map +1 -0
  284. package/dist/chunk-RA42NMWV.cjs +4 -0
  285. package/dist/chunk-RA42NMWV.cjs.map +1 -0
  286. package/dist/chunk-RAZN6C5R.cjs +12 -0
  287. package/dist/chunk-RAZN6C5R.cjs.map +1 -0
  288. package/dist/chunk-RHETJOUM.cjs +4 -0
  289. package/dist/chunk-RHETJOUM.cjs.map +1 -0
  290. package/dist/chunk-RJIJVVXS.js +3 -0
  291. package/dist/chunk-RJIJVVXS.js.map +1 -0
  292. package/dist/chunk-RKVRCNMB.js +3 -0
  293. package/dist/chunk-RKVRCNMB.js.map +1 -0
  294. package/dist/chunk-S7JQKNVT.cjs +187 -0
  295. package/dist/chunk-S7JQKNVT.cjs.map +1 -0
  296. package/dist/chunk-SBV5MWEL.cjs +53 -0
  297. package/dist/chunk-SBV5MWEL.cjs.map +1 -0
  298. package/dist/chunk-SFB4YLCS.js +121 -0
  299. package/dist/chunk-SFB4YLCS.js.map +1 -0
  300. package/dist/chunk-SLPD47SR.js +3 -0
  301. package/dist/chunk-SLPD47SR.js.map +1 -0
  302. package/dist/chunk-SS3B6PHT.cjs +35 -0
  303. package/dist/chunk-SS3B6PHT.cjs.map +1 -0
  304. package/dist/chunk-SUCHGNYT.js +3 -0
  305. package/dist/chunk-SUCHGNYT.js.map +1 -0
  306. package/dist/chunk-SYVNY3AH.cjs +44 -0
  307. package/dist/chunk-SYVNY3AH.cjs.map +1 -0
  308. package/dist/chunk-T3SYREY4.js +29 -0
  309. package/dist/chunk-T3SYREY4.js.map +1 -0
  310. package/dist/chunk-T7N7DFQJ.js +198 -0
  311. package/dist/chunk-T7N7DFQJ.js.map +1 -0
  312. package/dist/chunk-TRCENAIY.cjs +4 -0
  313. package/dist/chunk-TRCENAIY.cjs.map +1 -0
  314. package/dist/chunk-TVENC6PH.js +186 -0
  315. package/dist/chunk-TVENC6PH.js.map +1 -0
  316. package/dist/chunk-U4T3Z3K7.cjs +325 -0
  317. package/dist/chunk-U4T3Z3K7.cjs.map +1 -0
  318. package/dist/chunk-UIFFNTUX.js +3 -0
  319. package/dist/chunk-UIFFNTUX.js.map +1 -0
  320. package/dist/chunk-V4GPQ6Y2.js +3 -0
  321. package/dist/chunk-V4GPQ6Y2.js.map +1 -0
  322. package/dist/chunk-VGTRKXF2.js +93 -0
  323. package/dist/chunk-VGTRKXF2.js.map +1 -0
  324. package/dist/chunk-VGWOIWRQ.cjs +202 -0
  325. package/dist/chunk-VGWOIWRQ.cjs.map +1 -0
  326. package/dist/chunk-VLCNNA76.cjs +4 -0
  327. package/dist/chunk-VLCNNA76.cjs.map +1 -0
  328. package/dist/chunk-VPAUN75Q.js +3 -0
  329. package/dist/chunk-VPAUN75Q.js.map +1 -0
  330. package/dist/chunk-VT237QF2.js +3 -0
  331. package/dist/chunk-VT237QF2.js.map +1 -0
  332. package/dist/chunk-VV4TZG5S.js +321 -0
  333. package/dist/chunk-VV4TZG5S.js.map +1 -0
  334. package/dist/chunk-VYK6MBL4.cjs +4 -0
  335. package/dist/chunk-VYK6MBL4.cjs.map +1 -0
  336. package/dist/chunk-W33CKW6Q.cjs +4 -0
  337. package/dist/chunk-W33CKW6Q.cjs.map +1 -0
  338. package/dist/chunk-W5VHATSR.cjs +31 -0
  339. package/dist/chunk-W5VHATSR.cjs.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-XWKNE6DH.cjs +4 -0
  357. package/dist/chunk-XWKNE6DH.cjs.map +1 -0
  358. package/dist/chunk-Y6V6CBY5.js +23 -0
  359. package/dist/chunk-Y6V6CBY5.js.map +1 -0
  360. package/dist/chunk-Y6VDCZPB.js +62 -0
  361. package/dist/chunk-Y6VDCZPB.js.map +1 -0
  362. package/dist/chunk-YDRXBRW2.cjs +184 -0
  363. package/dist/chunk-YDRXBRW2.cjs.map +1 -0
  364. package/dist/chunk-YFS2LMG4.cjs +124 -0
  365. package/dist/chunk-YFS2LMG4.cjs.map +1 -0
  366. package/dist/chunk-YN6CBIIB.js +63 -0
  367. package/dist/chunk-YN6CBIIB.js.map +1 -0
  368. package/dist/chunk-YOJ2XNQX.cjs +4 -0
  369. package/dist/chunk-YOJ2XNQX.cjs.map +1 -0
  370. package/dist/chunk-YOOZB4RL.js +3 -0
  371. package/dist/chunk-YOOZB4RL.js.map +1 -0
  372. package/dist/chunk-YVU2M7MI.js +34 -0
  373. package/dist/chunk-YVU2M7MI.js.map +1 -0
  374. package/dist/chunk-YXBZRB5H.cjs +4 -0
  375. package/dist/chunk-YXBZRB5H.cjs.map +1 -0
  376. package/dist/chunk-Z3ZKFI2M.js +43 -0
  377. package/dist/chunk-Z3ZKFI2M.js.map +1 -0
  378. package/dist/chunk-Z5GLY4R3.js +112 -0
  379. package/dist/chunk-Z5GLY4R3.js.map +1 -0
  380. package/dist/chunk-Z5OMWAQX.js +3 -0
  381. package/dist/chunk-Z5OMWAQX.js.map +1 -0
  382. package/dist/chunk-Z7LGWNI7.js +38 -0
  383. package/dist/chunk-Z7LGWNI7.js.map +1 -0
  384. package/dist/chunk-ZCWKX4V6.cjs +38 -0
  385. package/dist/chunk-ZCWKX4V6.cjs.map +1 -0
  386. package/dist/chunk-ZE5RISBZ.cjs +4 -0
  387. package/dist/chunk-ZE5RISBZ.cjs.map +1 -0
  388. package/dist/chunk-ZH4F2P2G.js +3 -0
  389. package/dist/chunk-ZH4F2P2G.js.map +1 -0
  390. package/dist/chunk-ZJGFLJ2Z.cjs +4 -0
  391. package/dist/chunk-ZJGFLJ2Z.cjs.map +1 -0
  392. package/dist/chunk-ZKBHD27K.cjs +4 -0
  393. package/dist/chunk-ZKBHD27K.cjs.map +1 -0
  394. package/dist/chunk-ZQPLRNKX.cjs +4 -0
  395. package/dist/chunk-ZQPLRNKX.cjs.map +1 -0
  396. package/dist/chunk-ZQQABQMH.cjs +31 -0
  397. package/dist/chunk-ZQQABQMH.cjs.map +1 -0
  398. package/dist/chunk-ZXJQSFIA.js +200 -0
  399. package/dist/chunk-ZXJQSFIA.js.map +1 -0
  400. package/dist/chunk-ZYPH2FPT.js +3 -0
  401. package/dist/chunk-ZYPH2FPT.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 +237 -0
  479. package/dist/entries/credits.d.ts +237 -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 +67 -10895
  707. package/dist/index.d.ts +67 -10895
  708. package/dist/index.js +100 -5074
  709. package/dist/index.js.map +1 -1
  710. package/dist/nodes-C-wrO6Sg.d.ts +1364 -0
  711. package/dist/nodes-J8ByUN8z.d.cts +1364 -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,23 @@
1
+ // src/resources/models.ts
2
+ var ModelsResource = class {
3
+ constructor(client) {
4
+ this.client = client;
5
+ }
6
+ client;
7
+ /** Browse the models available on this instance — capability sheets,
8
+ * per-variant credit pricing, prompt tips, and the `doctrineCovered`
9
+ * truth flag. Public endpoint; cached 5 minutes. */
10
+ list(opts = {}) {
11
+ const qs = new URLSearchParams();
12
+ if (opts.kind) qs.set("kind", opts.kind);
13
+ if (opts.mode) qs.set("mode", opts.mode);
14
+ if (opts.family) qs.set("family", opts.family);
15
+ if (opts.featuredOnly) qs.set("featuredOnly", "true");
16
+ const query = qs.toString();
17
+ return this.client.request("GET", `/v1/models${query ? `?${query}` : ""}`);
18
+ }
19
+ };
20
+
21
+ export { ModelsResource };
22
+ //# sourceMappingURL=chunk-Y6V6CBY5.js.map
23
+ //# sourceMappingURL=chunk-Y6V6CBY5.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/resources/models.ts"],"names":[],"mappings":";AAyEO,IAAM,iBAAN,MAAqB;AAAA,EAC1B,YAAoB,MAAA,EAA0B;AAA1B,IAAA,IAAA,CAAA,MAAA,GAAA,MAAA;AAAA,EAA2B;AAAA,EAA3B,MAAA;AAAA;AAAA;AAAA;AAAA,EAKpB,IAAA,CAAK,IAAA,GAA0B,EAAC,EAA8B;AAC5D,IAAA,MAAM,EAAA,GAAK,IAAI,eAAA,EAAgB;AAC/B,IAAA,IAAI,KAAK,IAAA,EAAM,EAAA,CAAG,GAAA,CAAI,MAAA,EAAQ,KAAK,IAAI,CAAA;AACvC,IAAA,IAAI,KAAK,IAAA,EAAM,EAAA,CAAG,GAAA,CAAI,MAAA,EAAQ,KAAK,IAAI,CAAA;AACvC,IAAA,IAAI,KAAK,MAAA,EAAQ,EAAA,CAAG,GAAA,CAAI,QAAA,EAAU,KAAK,MAAM,CAAA;AAC7C,IAAA,IAAI,IAAA,CAAK,YAAA,EAAc,EAAA,CAAG,GAAA,CAAI,gBAAgB,MAAM,CAAA;AACpD,IAAA,MAAM,KAAA,GAAQ,GAAG,QAAA,EAAS;AAC1B,IAAA,OAAO,IAAA,CAAK,MAAA,CAAO,OAAA,CAAQ,KAAA,EAAO,CAAA,UAAA,EAAa,QAAQ,CAAA,CAAA,EAAI,KAAK,CAAA,CAAA,GAAK,EAAE,CAAA,CAAE,CAAA;AAAA,EAC3E;AACF","file":"chunk-Y6V6CBY5.js","sourcesContent":["import type { NodaroClientCore } from \"../core.js\"\n\n/**\n * The company that made a model. `id` is stable — one id per company, the\n * company's name lowercased and hyphenated (`\"google\"`, `\"black-forest-labs\"`)\n * — so an app may key its own assets on it; a newer server can add makers, so\n * handle an id you do not know. `name` is the company's display name.\n */\nexport interface ModelMaker {\n id: string\n name: string\n}\n\n/**\n * Model-catalog types. Mirrors the backend's `GET /v1/models` projection\n * (itself shared with the MCP `list_models` tool) so the SDK stays\n * dependency-free — same convention as `PickerCatalog` / `NodeDescriptor`.\n */\nexport interface ModelSummary {\n id: string\n label: string\n /** The company that made the model. Not the same as the family it is\n * grouped under: a few families name a lab or a product line (Tongyi-MAI\n * and HappyHorse are Alibaba's, Depth Anything is ByteDance's). Absent on\n * an older server. */\n maker?: ModelMaker\n /** The maker's official mark (an SVG) on this deployment's media CDN, or\n * null when the deployment does not publish one for this maker — draw a\n * fallback (the maker's name or initial) then. The address carries its\n * file's version, so a replaced mark arrives under a new address. Absent\n * on an older server. */\n logoUrl?: string | null\n description: string\n modes: string[]\n useCases: string[]\n /** Per-variant credit pricing: the credits a run of each variant is\n * charged, the figure on the node's Run button. Cloud only — editions\n * without a credit system (community/business) omit the field entirely. */\n pricing?: Array<{ identifier: string; credits: number; note?: string }>\n featured?: boolean\n features?: string[]\n aspectRatios?: string[]\n resolutions?: string[]\n qualities?: string[]\n durations?: number[]\n /** Compact per-model prompting tips (present when a doctrine exists). */\n promptTips?: string[]\n /** TRUE only when a sourced per-family prompt doctrine exists for this\n * model — gate \"vendor doctrine · real rewrite\" badges on this and show\n * a generic label otherwise (never overclaim). */\n doctrineCovered: boolean\n}\n\nexport interface ModelFamilyGroup {\n family: string\n models: ModelSummary[]\n}\n\nexport interface ModelsListResult {\n sections: Array<{ kind: \"image\" | \"video\" | \"audio\"; families: ModelFamilyGroup[] }>\n recommendations: Array<{ id: string; title: string; modelIds: string[]; reason?: string } & Record<string, unknown>>\n totalModels: number\n}\n\nexport interface ListModelsOptions {\n kind?: \"image\" | \"video\" | \"audio\"\n /** Operation filter, e.g. \"t2v\", \"i2v\", \"t2i\". */\n mode?: string\n /** Vendor / lab name, e.g. \"Google\", \"Bytedance\". */\n family?: string\n featuredOnly?: boolean\n}\n\nexport class ModelsResource {\n constructor(private client: NodaroClientCore) {}\n\n /** Browse the models available on this instance — capability sheets,\n * per-variant credit pricing, prompt tips, and the `doctrineCovered`\n * truth flag. Public endpoint; cached 5 minutes. */\n list(opts: ListModelsOptions = {}): Promise<ModelsListResult> {\n const qs = new URLSearchParams()\n if (opts.kind) qs.set(\"kind\", opts.kind)\n if (opts.mode) qs.set(\"mode\", opts.mode)\n if (opts.family) qs.set(\"family\", opts.family)\n if (opts.featuredOnly) qs.set(\"featuredOnly\", \"true\")\n const query = qs.toString()\n return this.client.request(\"GET\", `/v1/models${query ? `?${query}` : \"\"}`)\n }\n}\n"]}
@@ -0,0 +1,62 @@
1
+ // src/resources/sessions.ts
2
+ var SessionsResource = class {
3
+ constructor(client) {
4
+ this.client = client;
5
+ }
6
+ client;
7
+ /**
8
+ * Create a session. Send its `id` as `sessionId` on a generation request
9
+ * (`nodes.run("generate-image", { sessionId, … })`, video, speech, music) and
10
+ * the job is born in it.
11
+ */
12
+ create(input) {
13
+ return this.client.request("POST", "/v1/sessions", { body: input });
14
+ }
15
+ /** Your sessions, newest first. */
16
+ list(params = {}) {
17
+ const query = {};
18
+ if (params.projectId) query.projectId = params.projectId;
19
+ if (params.tool) query.tool = params.tool;
20
+ if (params.includeArchived) query.includeArchived = "true";
21
+ if (params.limit !== void 0) query.limit = String(params.limit);
22
+ if (params.cursor) query.cursor = params.cursor;
23
+ return this.client.request("GET", "/v1/sessions", { query });
24
+ }
25
+ get(id) {
26
+ return this.client.request("GET", `/v1/sessions/${encodeURIComponent(id)}`);
27
+ }
28
+ /** Rename or archive a session, or pick its cover. Its project cannot change. */
29
+ update(id, input) {
30
+ return this.client.request("PATCH", `/v1/sessions/${encodeURIComponent(id)}`, { body: input });
31
+ }
32
+ /** Delete a session and its links. Its jobs are kept, and stay in every other session holding them. */
33
+ delete(id) {
34
+ return this.client.request("DELETE", `/v1/sessions/${encodeURIComponent(id)}`);
35
+ }
36
+ /** The session's items, born-in and imported, newest first. */
37
+ items(id, params = {}) {
38
+ const query = {};
39
+ if (params.limit !== void 0) query.limit = String(params.limit);
40
+ if (params.cursor) query.cursor = params.cursor;
41
+ return this.client.request("GET", `/v1/sessions/${encodeURIComponent(id)}/items`, { query });
42
+ }
43
+ /**
44
+ * Import some of your own jobs into a session — a link, not a copy (up to 100
45
+ * a call). All-or-nothing: if any id is not one of your jobs, nothing is
46
+ * imported and the call fails with 404. Items already there are left as they are.
47
+ */
48
+ importItems(id, input) {
49
+ return this.client.request("POST", `/v1/sessions/${encodeURIComponent(id)}/items`, { body: input });
50
+ }
51
+ /** Remove one item from a session. Only the link goes: the job, and every other session holding it, stay. */
52
+ removeItem(id, jobId) {
53
+ return this.client.request(
54
+ "DELETE",
55
+ `/v1/sessions/${encodeURIComponent(id)}/items/${encodeURIComponent(jobId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CAAO,OAAA;AAAA,MACjB,QAAA;AAAA,MACA,gBAAgB,kBAAA,CAAmB,EAAE,CAAC,CAAA,OAAA,EAAU,kBAAA,CAAmB,KAAK,CAAC,CAAA;AAAA,KAC3E;AAAA,EACF;AACF","file":"chunk-Y6VDCZPB.js","sourcesContent":["import type { NodaroClientCore } from \"../core.js\"\nimport type { Job } from \"./jobs.js\"\n\n/**\n * A generation session: one run of work in a creation tool (Create Image,\n * Video, Music), optionally inside a project. Its project is fixed at\n * creation — to get an item into another project, import it into a session\n * there.\n */\nexport interface GenerationSession {\n id: string\n /** Null when the session has no project, or its project was deleted. */\n projectId: string | null\n /** Null = untitled; a UI may fall back to the first prompt. */\n title: string | null\n /** The creation tool that owns the session, e.g. `\"create-image\"`. */\n tool: string\n createdAt: string\n /** The latest activity: an item added, or an edit. */\n updatedAt: string\n archivedAt: string | null\n /** The item picked as the session's cover (`update(id, { coverJobId })`); `null` = automatic. */\n coverJobId: string | null\n itemCount: number\n /** Up to four image links: the cover's image first when one is set, then the\n * newest completed items. */\n previewUrls: string[]\n}\n\nexport interface CreateSessionInput {\n /** One of your projects (on the side of the workspace line you are on). */\n projectId?: string\n title?: string\n /** Lowercase letters, digits and dashes, at most 40 — e.g. `\"create-image\"`. */\n tool: string\n}\n\nexport interface UpdateSessionInput {\n /** `null` makes the session untitled again. */\n title?: string | null\n archived?: boolean\n /** One of the session's items to lead its previews (404 if it is not an\n * item of this session); `null` goes back to automatic. */\n coverJobId?: string | null\n}\n\nexport interface ListSessionsParams {\n projectId?: string\n tool?: string\n /** Archived sessions are left out unless this is true. */\n includeArchived?: boolean\n /** Page size, 1–100 (server default 50). */\n limit?: number\n /** The previous page's `next`. */\n cursor?: string\n}\n\n/** One item of a session's feed: a link to one of your jobs. */\nexport interface SessionItem {\n jobId: string\n addedAt: string\n /** True when imported from elsewhere rather than born in this session. */\n imported: boolean\n importedFrom: { sessionId: string; title: string | null } | null\n job: Job\n}\n\nexport interface ListSessionItemsParams {\n limit?: number\n cursor?: string\n}\n\nexport interface SessionPage<T> {\n data: T[]\n /** Pass back as `cursor` for the next page; `null` on the last one. */\n next: string | null\n}\n\nexport class SessionsResource {\n constructor(private client: NodaroClientCore) {}\n\n /**\n * Create a session. Send its `id` as `sessionId` on a generation request\n * (`nodes.run(\"generate-image\", { sessionId, … })`, video, speech, music) and\n * the job is born in it.\n */\n create(input: CreateSessionInput): Promise<{ data: GenerationSession }> {\n return this.client.request(\"POST\", \"/v1/sessions\", { body: input })\n }\n\n /** Your sessions, newest first. */\n list(params: ListSessionsParams = {}): Promise<SessionPage<GenerationSession>> {\n const query: Record<string, string> = {}\n if (params.projectId) query.projectId = params.projectId\n if (params.tool) query.tool = params.tool\n if (params.includeArchived) query.includeArchived = \"true\"\n if (params.limit !== undefined) query.limit = String(params.limit)\n if (params.cursor) query.cursor = params.cursor\n return this.client.request(\"GET\", \"/v1/sessions\", { query })\n }\n\n get(id: string): Promise<{ data: GenerationSession }> {\n return this.client.request(\"GET\", `/v1/sessions/${encodeURIComponent(id)}`)\n }\n\n /** Rename or archive a session, or pick its cover. Its project cannot change. */\n update(id: string, input: UpdateSessionInput): Promise<{ data: GenerationSession }> {\n return this.client.request(\"PATCH\", `/v1/sessions/${encodeURIComponent(id)}`, { body: input })\n }\n\n /** Delete a session and its links. Its jobs are kept, and stay in every other session holding them. */\n delete(id: string): Promise<{ success: true }> {\n return this.client.request(\"DELETE\", `/v1/sessions/${encodeURIComponent(id)}`)\n }\n\n /** The session's items, born-in and imported, newest first. */\n items(id: string, params: ListSessionItemsParams = {}): Promise<SessionPage<SessionItem>> {\n const query: Record<string, string> = {}\n if (params.limit !== undefined) query.limit = String(params.limit)\n if (params.cursor) query.cursor = params.cursor\n return this.client.request(\"GET\", `/v1/sessions/${encodeURIComponent(id)}/items`, { query })\n }\n\n /**\n * Import some of your own jobs into a session — a link, not a copy (up to 100\n * a call). All-or-nothing: if any id is not one of your jobs, nothing is\n * imported and the call fails with 404. Items already there are left as they are.\n */\n importItems(id: string, input: { jobIds: string[] }): Promise<{ data: { imported: number; requested: number } }> {\n return this.client.request(\"POST\", `/v1/sessions/${encodeURIComponent(id)}/items`, { body: input })\n }\n\n /** Remove one item from a session. Only the link goes: the job, and every other session holding it, stay. */\n removeItem(id: string, jobId: string): Promise<{ success: true }> {\n return this.client.request(\n \"DELETE\",\n `/v1/sessions/${encodeURIComponent(id)}/items/${encodeURIComponent(jobId)}`,\n )\n }\n}\n"]}
@@ -0,0 +1,184 @@
1
+ 'use strict';
2
+
3
+ var scene3d = require('@nodaro/shared/scene3d');
4
+
5
+ // src/resources/scene3d-types.ts
6
+ var SCENE3D_DELIVERY_ASSET_USAGE = {
7
+ poster: "poster",
8
+ "validation-report": "validation",
9
+ "shot-still": "shot-still",
10
+ /** The recipe a run that never compiled was refused for. See {@link Scene3DDeliveryAsset}. */
11
+ "source-json": "checkpoint"
12
+ };
13
+ function newIdempotencyKey() {
14
+ const random = globalThis.crypto?.randomUUID?.();
15
+ return `sdk-pro3d-${random ?? `${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 12)}`}`;
16
+ }
17
+ var Scene3DResource = class {
18
+ /** Every operation runs a platform node, so the client must carry `nodes` too. */
19
+ constructor(client) {
20
+ this.client = client;
21
+ }
22
+ client;
23
+ capabilities() {
24
+ return this.client.request("GET", "/v1/3d-scene/capabilities");
25
+ }
26
+ /** Current access to both the delivery and its source is required on every read. */
27
+ getDelivery(jobId) {
28
+ return this.client.request("GET", `/v1/3d-scene/deliveries/${encodeURIComponent(jobId)}`);
29
+ }
30
+ /**
31
+ * The bytes of one descriptor the delivery listed.
32
+ *
33
+ * Checked against {@link SCENE3D_DELIVERY_ASSET_USAGE} rather than a hardcoded pair, which
34
+ * is why a `shot-still` now works: the route has served stills since they existed, and this
35
+ * guard refused them. `source-json` — the recipe a refused run was kept for — is on the same
36
+ * map; the server still decides whether THIS caller may read it.
37
+ */
38
+ deliveryAssetBytes(jobId, asset, options) {
39
+ if (SCENE3D_DELIVERY_ASSET_USAGE[asset.kind] !== asset.usage) {
40
+ throw new Error("This asset is not available through the delivery endpoint");
41
+ }
42
+ if (!Number.isSafeInteger(asset.byteLength) || asset.byteLength < 1 || asset.byteLength > scene3d.SCENE3D_V2_LIMITS.maxRendererAssetBytes) {
43
+ throw new Error("Invalid scene delivery asset byte length");
44
+ }
45
+ return this.client.requestBytes("GET", `/v1/3d-scene/deliveries/${encodeURIComponent(jobId)}/assets/${encodeURIComponent(asset.assetId)}`, {
46
+ signal: options?.signal,
47
+ maxBytes: asset.byteLength
48
+ });
49
+ }
50
+ /**
51
+ * The recipe a 3D Render Pro run was refused for, parsed — or `null` when there is none.
52
+ *
53
+ * The one thing such a run leaves behind. Its recipe never compiled, so there is no scene
54
+ * revision, no poster and no `.blend`: `output_data` carries a `deliveryId`, the compiler's
55
+ * reasons, and `validation.sourceRetained` saying whether the recipe itself was kept. This
56
+ * fetches it in one call — delivery, then the `source-json` descriptor's bytes.
57
+ *
58
+ * `null` means the delivery has no retained recipe to hand back: no pass ever cleared
59
+ * admission, or this caller holds less than `edit` on the job's workflow and the descriptor
60
+ * is therefore not listed for them.
61
+ *
62
+ * Read it to see what was attempted and to inform the next prompt. There is no input that
63
+ * takes a recipe back: a refused run published no revision, so there is no `{kind:"scene"}`
64
+ * source to re-run it from.
65
+ */
66
+ async retainedRecipe(jobId, options) {
67
+ const delivery = await this.getDelivery(jobId);
68
+ const asset = delivery.assets.find((item) => item.kind === "source-json");
69
+ if (!asset) return null;
70
+ const bytes = await this.deliveryAssetBytes(jobId, asset, options);
71
+ return JSON.parse(new TextDecoder("utf-8", { fatal: true }).decode(bytes));
72
+ }
73
+ /** Persist deterministic overlays without an LLM or a generation charge. */
74
+ applyEdits(revisionId, params) {
75
+ return this.client.request("POST", `/v1/3d-scene/revisions/${encodeURIComponent(revisionId)}/edits`, { body: params });
76
+ }
77
+ /** Asset access is scoped to an exact retained revision, with fresh authentication. */
78
+ assetBytes(revisionId, asset, options) {
79
+ if (!["glb", "camera-track-json", "poster", "validation-report"].includes(asset.kind)) {
80
+ throw new Error("This asset is not available through the playback endpoint");
81
+ }
82
+ if (!Number.isSafeInteger(asset.byteLength) || asset.byteLength < 1 || asset.byteLength > scene3d.SCENE3D_V2_LIMITS.maxRendererAssetBytes) {
83
+ throw new Error("Invalid scene asset byte length");
84
+ }
85
+ return this.client.requestBytes("GET", `/v1/3d-scene/revisions/${encodeURIComponent(revisionId)}/assets/${encodeURIComponent(asset.assetId)}`, {
86
+ signal: options?.signal,
87
+ maxBytes: asset.byteLength
88
+ });
89
+ }
90
+ /** The editable native file has its own authorization lane. */
91
+ sourceBytes(revisionId, options) {
92
+ return this.client.requestBytes("GET", `/v1/3d-scene/revisions/${encodeURIComponent(revisionId)}/source`, {
93
+ signal: options?.signal,
94
+ maxBytes: scene3d.SCENE3D_V2_LIMITS.maxBlendSourceBytes
95
+ });
96
+ }
97
+ generate(params) {
98
+ return this.client.nodes.run("generate-3d-scene", params);
99
+ }
100
+ generateAndWait(params, options) {
101
+ return this.client.nodes.runAndWait("generate-3d-scene", params, options);
102
+ }
103
+ edit(params) {
104
+ return this.client.nodes.run("edit-3d-scene", params);
105
+ }
106
+ editAndWait(params, options) {
107
+ return this.client.nodes.runAndWait("edit-3d-scene", params, options);
108
+ }
109
+ /**
110
+ * Price a 3D Render Pro request WITHOUT starting it.
111
+ *
112
+ * Takes the same body a run takes, minus the `quoteId`, and answers a
113
+ * ceiling (`maxCredits`), a `breakdown` to show, and the
114
+ * `normalizedInputHash` admission re-checks. It reserves nothing and spends
115
+ * nothing — a quote is a price, not a purchase.
116
+ */
117
+ quotePro(params) {
118
+ return this.client.request("POST", "/v1/pro-3d-render/quote", { body: params });
119
+ }
120
+ /**
121
+ * Submit a quoted 3D Render Pro run.
122
+ *
123
+ * Requires the `quoteId` from {@link quotePro}: no run starts at a price
124
+ * nobody showed. Sends an `Idempotency-Key` — a fresh one per call unless you
125
+ * supply your own, which you should when retrying a call that timed out.
126
+ *
127
+ * Availability is a property of the deployment: `capabilities().pro` says
128
+ * whether this install can serve it, and which controls you may offer.
129
+ */
130
+ runPro(params, options) {
131
+ return this.client.nodes.run("pro-3d-render", params, {
132
+ idempotencyKey: options?.idempotencyKey ?? newIdempotencyKey()
133
+ });
134
+ }
135
+ /**
136
+ * Quote if needed, run, and wait — the whole operation in one call.
137
+ *
138
+ * Two HTTP requests at most, still ONE paid job: when `quoteId` is absent
139
+ * this quotes the identical body first, so the run is admitted against a
140
+ * hash of exactly what was priced. Pass a `quoteId` to run against a quote
141
+ * you already showed the user.
142
+ *
143
+ * Resolves with the settled result — `videoUrl` (the MP4) and `scenePlan`
144
+ * (the exact composition it was rendered from), plus the revision, poster,
145
+ * validation and renderer metadata. A run that AUTHORED also reports its own
146
+ * account of the answer — `metadata.summary`, `repairPasses`,
147
+ * `admissionRetries`, `mechanicalPasses` (repairs the engine applied from
148
+ * the compiler's own remedy with no planner call, counted APART from
149
+ * `repairPasses` on their own quoted allowance), `restoredAssertions`, and
150
+ * any `SCENE_AUTHORING_ASSUMPTION` warnings. A
151
+ * completed result whose `metadata.review` is present passed every mandatory
152
+ * assertion but did NOT get the visual reviewer's approval: `verdict:
153
+ * "refused"` means it objected, each objection also a `SCENE_REVIEW_REFUSED`
154
+ * warning; `verdict: "unavailable"` means the review produced no usable
155
+ * verdict in `attempts` asks (`reason: "provider"` — never reached its
156
+ * provider; `"unusable"` — it answered, unusably), so nobody judged the scene and
157
+ * `SCENE_REVIEW_UNAVAILABLE` leads the warnings. Re-render that same
158
+ * `scenePlan` later with {@link render}, or with a `{kind:'scene'}` source;
159
+ * that costs no authoring.
160
+ */
161
+ async renderProAndWait(params, options) {
162
+ const quoteId = typeof params.quoteId === "string" ? params.quoteId : (await this.quotePro(params)).quoteId;
163
+ return this.client.nodes.runAndWait("pro-3d-render", { ...params, quoteId }, {
164
+ ...options,
165
+ idempotencyKey: options?.idempotencyKey ?? newIdempotencyKey()
166
+ });
167
+ }
168
+ /**
169
+ * Uses the supplied immutable revision; never starts authoring or a rebuild.
170
+ *
171
+ * Priced by the plan's frame size — see {@link RenderScene3DParams}.
172
+ */
173
+ render(params) {
174
+ return this.client.nodes.run("render-video", params);
175
+ }
176
+ renderAndWait(params, options) {
177
+ return this.client.nodes.runAndWait("render-video", params, options);
178
+ }
179
+ };
180
+
181
+ exports.SCENE3D_DELIVERY_ASSET_USAGE = SCENE3D_DELIVERY_ASSET_USAGE;
182
+ exports.Scene3DResource = Scene3DResource;
183
+ //# sourceMappingURL=chunk-YDRXBRW2.cjs.map
184
+ //# sourceMappingURL=chunk-YDRXBRW2.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/resources/scene3d-types.ts","../src/resources/scene3d.ts"],"names":["SCENE3D_V2_LIMITS"],"mappings":";;;;;AAoBO,IAAM,4BAAA,GAA+B;AAAA,EAC1C,MAAA,EAAQ,QAAA;AAAA,EACR,mBAAA,EAAqB,YAAA;AAAA,EACrB,YAAA,EAAc,YAAA;AAAA;AAAA,EAEd,aAAA,EAAe;AACjB;ACXA,SAAS,iBAAA,GAA4B;AACnC,EAAA,MAAM,MAAA,GAAS,UAAA,CAAW,MAAA,EAAQ,UAAA,IAAa;AAC/C,EAAA,OAAO,CAAA,UAAA,EAAa,UAAU,CAAA,EAAG,IAAA,CAAK,KAAI,CAAE,QAAA,CAAS,EAAE,CAAC,CAAA,CAAA,EAAI,KAAK,MAAA,EAAO,CAAE,SAAS,EAAE,CAAA,CAAE,MAAM,CAAA,EAAG,EAAE,CAAC,CAAA,CAAE,CAAA,CAAA;AACvG;AAGO,IAAM,kBAAN,MAAsB;AAAA;AAAA,EAE3B,YAAoB,MAAA,EAA8D;AAA9D,IAAA,IAAA,CAAA,MAAA,GAAA,MAAA;AAAA,EAA+D;AAAA,EAA/D,MAAA;AAAA,EAEpB,YAAA,GAA6C;AAC3C,IAAA,OAAO,IAAA,CAAK,MAAA,CAAO,OAAA,CAAQ,KAAA,EAAO,2BAA2B,CAAA;AAAA,EAC/D;AAAA;AAAA,EA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OAAO,IAAA,CAAK,MAAA,CAAO,KAAA,CAAM,GAAA,CAAI,iBAAiB,MAAA,EAAQ;AAAA,MACpD,cAAA,EAAgB,OAAA,EAAS,cAAA,IAAkB,iBAAA;AAAkB,KAC9D,CAAA;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EA4BA,MAAM,gBAAA,CACJ,MAAA,EACA,OAAA,EAC+B;AAC/B,IAAA,MAAM,OAAA,GACJ,OAAQ,MAAA,CAAgC,OAAA,KAAY,QAAA,GAC/C,MAAA,CAAgC,OAAA,GAAA,CAChC,MAAM,IAAA,CAAK,QAAA,CAAS,MAAM,CAAA,EAAG,OAAA;AACpC,IAAA,OAAO,IAAA,CAAK,OAAO,KAAA,CAAM,UAAA,CAAW,iBAAiB,EAAE,GAAG,MAAA,EAAQ,OAAA,EAAQ,EAAG;AAAA,MAC3E,GAAG,OAAA;AAAA,MACH,cAAA,EAAgB,OAAA,EAAS,cAAA,IAAkB,iBAAA;AAAkB,KAC9D,CAAA;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,OAAO,MAAA,EAAqD;AAC1D,IAAA,OAAO,IAAA,CAAK,MAAA,CAAO,KAAA,CAAM,GAAA,CAAI,gBAAgB,MAAM,CAAA;AAAA,EACrD;AAAA,EAEA,aAAA,CAAc,QAA6B,OAAA,EAAqD;AAC9F,IAAA,OAAO,KAAK,MAAA,CAAO,KAAA,CAAM,UAAA,CAAW,cAAA,EAAgB,QAAQ,OAAO,CAAA;AAAA,EACrE;AACF","file":"chunk-YDRXBRW2.cjs","sourcesContent":["import type { Scene3DPlan, Scene3DPlanV2, Scene3DReference, Scene3DEditOperation, Scene3DV2EditOperation, Scene3DJobOutputAny as Scene3DWireJobOutput, Pro3DRenderCapabilities, Pro3DRenderEngine, Pro3DRenderJobOutput as Pro3DRenderWireOutput, Pro3DRenderQuality, Pro3DRenderQuote as Pro3DRenderWireQuote, Pro3DRenderSource, Pro3DRenderStyle } from \"@nodaro/shared/scene3d\"\nimport type { GenerationSessionParams } from \"./nodes.js\"\n\n/** Reuse newRevisionId for transport retries of the same immutable edit. */\nexport interface RetainedScene3DEditParams {\n newRevisionId: string\n expectedContentHash: string\n operations: readonly Scene3DV2EditOperation[]\n lockedObjectIds?: readonly string[]\n}\nexport interface RetainedScene3DEditResult { scenePlan: Scene3DPlanV2; changeSummary: string }\n\n/**\n * The kind of bytes a delivery descriptor names, and the usage it is pinned under.\n *\n * PAIRED, not two free enums: the platform refuses a pin whose usage is not the one its kind is\n * defined to have, and a client that checks only one of the two would accept a mis-pinned\n * artifact the server would then refuse. {@link SCENE3D_DELIVERY_ASSET_USAGE} is the map both\n * halves are read from.\n */\nexport const SCENE3D_DELIVERY_ASSET_USAGE = {\n poster: \"poster\",\n \"validation-report\": \"validation\",\n \"shot-still\": \"shot-still\",\n /** The recipe a run that never compiled was refused for. See {@link Scene3DDeliveryAsset}. */\n \"source-json\": \"checkpoint\",\n} as const\n\nexport type Scene3DDeliveryAssetKind = keyof typeof SCENE3D_DELIVERY_ASSET_USAGE\n\n/**\n * One artifact a delivery pins, as a descriptor: opaque ids and digests only.\n *\n * Four kinds, and two of them are conditional:\n *\n * - `poster` and `validation-report` are on every delivery;\n * - `shot-still` appears once per shot on a render that produced a contact sheet, and carries\n * its own shot identity (`shotIndex`, `frame`, and the frame size);\n * - `source-json` appears on ONE shape only — a `refused-authoring` delivery, published by a\n * 3D Render Pro run whose recipe the compiler refused on every pass. It is the planner's last\n * admitted recipe, and it is the only thing such a run leaves that names what was attempted.\n * Reading it needs `edit` on the job's workflow (the same access the `.blend` export costs);\n * a reader with less simply does not see the descriptor.\n */\nexport interface Scene3DDeliveryAsset {\n assetId: string\n kind: Scene3DDeliveryAssetKind\n usage: (typeof SCENE3D_DELIVERY_ASSET_USAGE)[Scene3DDeliveryAssetKind]\n byteLength: number\n sha256: string\n viaRevisionId: string | null\n /** Set on a `shot-still` and absent on every other kind — never `null`. */\n shotIndex?: number\n frame?: number\n width?: number\n height?: number\n}\n\n/** Export evidence is retained separately from the immutable scene it rendered. */\nexport interface Scene3DDelivery {\n deliveryId: string\n /**\n * Null on a `refused-authoring` delivery and on that alone.\n *\n * A Pro run whose recipe the compiler refused on every pass still retains the refusal\n * report, but nothing was ever compiled, so no scene revision was published. The field is\n * null rather than absent so the shape stays one shape; read `sourceKind` to tell why.\n */\n sceneRevisionId: string | null\n /**\n * What this delivery was made from. Absent when read from a deployment that predates the\n * refused lane, where every delivery necessarily had a scene behind it.\n */\n sourceKind?: \"retained-revision\" | \"job-output\" | \"refused-authoring\"\n /** Null when there is no plan to hash — see `sceneRevisionId`. */\n sourcePlanSha256: string | null\n sourceContentHash: string | null\n sourceJobId: string | null\n workflowId: string | null\n mode: \"authored\" | \"render-only\"\n createdAt: string\n access: \"view\" | \"edit\" | \"own\"\n assets: Scene3DDeliveryAsset[]\n}\n\nexport type Scene3DAuthoringEngine = \"basic\" | \"blender-cloud\" | \"blender-local\"\n\nexport interface Scene3DCapabilities {\n basic: { available: boolean; sceneSchemaVersions: number[] }\n advanced: null | {\n version: string\n engines: Array<Exclude<Scene3DAuthoringEngine, \"basic\">>\n sceneSchemaVersions: number[]\n maxRepairPasses: number\n }\n /**\n * What this deployment can serve for `pro-3d-render`, including which\n * quality profiles, engines and aspect ratios a client may OFFER. Optional so\n * a client of this version reads an older backend without throwing; absent\n * means the node is unavailable.\n */\n pro?: Pro3DRenderCapabilities\n}\n\ninterface Scene3DEngineParams {\n /** Basic is the default. Discover optional engines through scene3d.capabilities(). */\n engine?: Scene3DAuthoringEngine\n acceptedSceneSchemaVersions?: readonly number[]\n localConnectionId?: string\n quoteId?: string\n maxRepairPasses?: number\n}\n\n/** Structured authoring inputs; reference roles are interpreted by the platform. */\nexport interface GenerateScene3DParams extends Record<string, unknown>, Scene3DEngineParams, GenerationSessionParams {\n /** Existing GLBs selected by immutable revision/artifact IDs. Requires an import-capable advanced engine. */\n inputAssets?: readonly import(\"@nodaro/shared/scene3d\").Scene3DInputAsset[]\n prompt: string\n durationSeconds?: number\n fps?: number\n aspectRatio?: string\n references?: readonly Scene3DReference[]\n llmModel?: string\n reasoningEffort?: string\n workflowId?: string\n nodeId?: string\n}\n\n/** Editing creates a new revision and never mutates the supplied scene. */\nexport interface EditScene3DParams extends Record<string, unknown>, Scene3DEngineParams, GenerationSessionParams {\n scenePlan: Scene3DPlan\n expectedRevisionId: string\n /** Replace the complete reference set, including clearing it with an empty list. Default: merge by id. */\n replaceReferences?: boolean\n /** Supply an instruction or deterministic operations, never both. */\n prompt?: string\n operations?: readonly (Scene3DEditOperation | Scene3DV2EditOperation)[]\n references?: readonly Scene3DReference[]\n lockedObjectIds?: readonly string[]\n selectedObjectIds?: readonly string[]\n llmModel?: string\n reasoningEffort?: string\n workflowId?: string\n nodeId?: string\n}\n\n/**\n * 3D Render Pro — ONE durable operation producing a composition and its MP4.\n *\n * `source` is a strict discriminated union, not a bag of optionals:\n * - `{kind:'prompt', prompt, references?}` authors a new scene;\n * - `{kind:'scene', revisionId, sourceJobId}` with NO `editPrompt` is the\n * render-only export — it spends no authoring or build credits, and OMIT\n * the field rather than sending `\"\"`, which would buy an authoring pass;\n * - `{kind:'local-export', exportId, connectionId}` uses a paired desktop.\n *\n * There is no model or effort field: the planner is fixed and server-owned.\n *\n * `durationSeconds` / `fps` / `aspectRatio` on a `scene` source are an EXPLICIT\n * re-time request. Omit them to keep the source's own timing; a conflicting\n * override is rejected rather than silently applied.\n */\nexport interface Pro3DRenderParams extends Record<string, unknown> {\n source: Pro3DRenderSource\n /** Optional. An unknown or unavailable engine is rejected, never downgraded. */\n engine?: Pro3DRenderEngine\n /** Names a paired desktop for a local run. */\n localConnectionId?: string\n durationSeconds?: number\n fps?: number\n aspectRatio?: string\n quality?: Pro3DRenderQuality\n style?: Pro3DRenderStyle\n /** Correction budget, 0-2. Each pass is paid work. */\n maxRepairPasses?: number\n /**\n * Which scene-schema versions THIS client can render. A prompt or\n * local-export source mints v2, so omitting 2 is refused for free; a scene\n * source inherits its revision's version and is left to the server.\n */\n acceptedSceneSchemaVersions?: readonly number[]\n workflowId?: string\n nodeId?: string\n /** Keep every artifact of this run out of publicly-readable storage. */\n forcePrivate?: boolean\n}\n\n/** A run additionally carries the quote it was priced under. */\nexport interface Pro3DRenderRunParams extends Pro3DRenderParams {\n quoteId: string\n}\n\n/** The quote's answer. `maxCredits` is a ceiling; quoting spends nothing. */\nexport type Pro3DRenderQuote = Readonly<Pro3DRenderWireQuote> & Readonly<Record<string, unknown>>\n\n/** Per-call transport controls for the paid run. */\nexport interface Pro3DRenderRunOptions {\n /**\n * The `Idempotency-Key` the run is submitted under. Reuse the same value when\n * retrying a call that timed out, so the run is not started twice; the SDK\n * generates a fresh one per call when this is omitted, because two deliberate\n * calls are two runs.\n */\n idempotencyKey?: string\n}\n\n/**\n * Render the exact scene revision through the existing render-video node.\n *\n * The price follows the plan's OWN `width`/`height`, not any node setting: a\n * frame up to 1920 px on its longest side settles under `render-video`, a\n * larger one under `render-video:3d-large` (1.5x) or, above 5.12 megapixels,\n * `render-video:3d-xlarge` (2.5x). Read the current numbers from the\n * model-cost API for those three identifiers.\n */\nexport interface RenderScene3DParams extends Record<string, unknown>, GenerationSessionParams {\n planType: \"3d-scene\"\n plan: Scene3DPlan\n workflowId?: string\n nodeId?: string\n}\n\n/**\n * Preserve the shared wire contract while allowing additive job metadata.\n *\n * A scene authored by an ADVANCED engine additionally reports what the run knows about its own\n * answer, every field optional and all of them absent on the deterministic Basic lane:\n * `validation.warnings[]` entries coded `SCENE_AUTHORING_ASSUMPTION` (the planner's\n * assumptions), `metadata.summary` (its description of what it authored), `repairPasses`\n * (repairs actually run — `0` when the scene was accepted first time), `admissionRetries`\n * (pre-build planner retries, which spend no repair pass), `mechanicalPasses` (repairs the engine\n * applied from the compiler's own remedy with no planner call, counted APART from `repairPasses`\n * on their own quoted allowance, each with a `REMEDY_AUTO_APPLIED` warning) and\n * `restoredAssertions` (mandatory assertions put back after a planner answer re-shaped one the\n * feedback had not named, each a `ASSERTION_RESTORED` warning).\n *\n * A scene that passed every mandatory assertion but did not get the visual reviewer's approval\n * is delivered anyway, and `metadata.review` carries a verdict saying why. `verdict: \"refused\"`\n * is the ADVISORY delivery — the reviewer objected once the repair budget was spent — with one\n * `SCENE_REVIEW_REFUSED` warning per objection. `verdict: \"unavailable\"` is the UNREVIEWED\n * delivery: the review produced no usable verdict after `attempts` asks — `reason: \"provider\"`\n * when it never reached its provider, `\"unusable\"` when the provider answered with nothing usable\n * (`Scene3DReviewUnavailableReason` in `@nodaro/shared`) — so nobody judged the scene, and\n * `validation.warnings[]` LEADS with `SCENE_REVIEW_UNAVAILABLE` (any objections under it came from\n * review batches that answered usably first, and are not the whole verdict).\n *\n * `validation.status` stays `\"passed\"` on both, so `metadata.review` being present is the only\n * reliable test — use `scene3DReviewVerdictOf` from `@nodaro/shared` rather than reading it by\n * hand, and `scene3DReviewNote` rather than writing the sentence yourself: a message that says\n * the reviewer refused a scene nobody reviewed invents an opinion.\n */\nexport type Scene3DJobOutput = Readonly<Scene3DWireJobOutput> & Readonly<Record<string, unknown>>\n\n/**\n * The settled 3D Render Pro result, plus any additive job metadata.\n *\n * On a run that AUTHORED, the result reports the run's own account of its answer:\n * `validation.warnings[]` entries coded `SCENE_AUTHORING_ASSUMPTION`, `metadata.summary`,\n * `repairPasses` (`0` when accepted first time), `admissionRetries` (pre-build planner retries,\n * which spend no repair pass), `mechanicalPasses` (repairs the engine authored itself from the\n * compiler's own remedy, counted APART from `repairPasses` because they buy their own quoted\n * allowance rather than spending one of your repairs) and `restoredAssertions`. A render-only\n * export authored nothing, so it carries no summary and omits the counts rather than claiming `0`.\n *\n * The one case where `mechanicalPasses` IS a subset of `repairPasses` is a run quoted before that\n * allowance existed — its quote carries no `mechanical` line. The discriminant is the quote, not\n * the result, so read the quote you were given rather than deriving it from the two counts.\n *\n * A completed result may also be published without the visual reviewer's approval, and then\n * `metadata.review` holds a verdict saying which way. `{ verdict: \"refused\", objections[],\n * observed? }` is the ADVISORY delivery: every mandatory assertion passed, the reviewer still\n * objected, and the scene was published once the repair budget was spent, with one\n * `SCENE_REVIEW_REFUSED` warning per objection. `{ verdict: \"unavailable\", reason, attempts,\n * objections[], observed? }` is the UNREVIEWED delivery: the review produced no usable verdict in\n * `attempts` asks — `reason: \"provider\"` when it never reached its provider, `\"unusable\"` when the\n * provider answered with nothing usable — so the assertion-passing scene was delivered with no\n * verdict on it and `validation.warnings[]` LEADS with `SCENE_REVIEW_UNAVAILABLE`. Objections on\n * that arm are whatever review batches answered usably first — real, but not the whole verdict.\n *\n * `validation.status` is `\"passed\"` on both, so test for `metadata.review` — via\n * `scene3DReviewVerdictOf` from `@nodaro/shared` — rather than for the status or the warnings,\n * and render it with `scene3DReviewNote` rather than assuming a refusal.\n */\nexport type Pro3DRenderJobOutput = Readonly<Pro3DRenderWireOutput> & Readonly<Record<string, unknown>>\n","import { SCENE3D_V2_LIMITS, type Scene3DAssetRef } from \"@nodaro/shared/scene3d\"\nimport type { NodaroClientCore } from \"../core.js\"\nimport type { RunNodeResult, RunAndWaitOptions, NodeJobOutput, NodesResource } from \"./nodes.js\"\nimport type { EditScene3DParams, GenerateScene3DParams, Pro3DRenderJobOutput, Pro3DRenderParams, Pro3DRenderQuote, Pro3DRenderRunOptions, Pro3DRenderRunParams, RenderScene3DParams, Scene3DCapabilities, Scene3DJobOutput } from \"./scene3d-types.js\"\nimport type { RetainedScene3DEditParams, RetainedScene3DEditResult } from \"./scene3d-types.js\"\nimport { SCENE3D_DELIVERY_ASSET_USAGE } from \"./scene3d-types.js\"\nimport type { Scene3DDelivery, Scene3DDeliveryAsset } from \"./scene3d-types.js\"\n\n/**\n * A fresh per-call retry token.\n *\n * Random rather than derived from the request: two deliberate calls with the\n * same parameters are two runs, and collapsing them would silently swallow the\n * second. A caller who wants retry safety passes its own key.\n */\nfunction newIdempotencyKey(): string {\n const random = globalThis.crypto?.randomUUID?.()\n return `sdk-pro3d-${random ?? `${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 12)}`}`\n}\n\n/** Scene authoring and render-only export through the same platform nodes. */\nexport class Scene3DResource {\n /** Every operation runs a platform node, so the client must carry `nodes` too. */\n constructor(private client: NodaroClientCore & { readonly nodes: NodesResource }) {}\n\n capabilities(): Promise<Scene3DCapabilities> {\n return this.client.request(\"GET\", \"/v1/3d-scene/capabilities\")\n }\n\n /** Current access to both the delivery and its source is required on every read. */\n getDelivery(jobId: string): Promise<Scene3DDelivery> {\n return this.client.request(\"GET\", `/v1/3d-scene/deliveries/${encodeURIComponent(jobId)}`)\n }\n\n /**\n * The bytes of one descriptor the delivery listed.\n *\n * Checked against {@link SCENE3D_DELIVERY_ASSET_USAGE} rather than a hardcoded pair, which\n * is why a `shot-still` now works: the route has served stills since they existed, and this\n * guard refused them. `source-json` — the recipe a refused run was kept for — is on the same\n * map; the server still decides whether THIS caller may read it.\n */\n deliveryAssetBytes(jobId: string, asset: Scene3DDeliveryAsset, options?: { signal?: AbortSignal }): Promise<ArrayBuffer> {\n if (SCENE3D_DELIVERY_ASSET_USAGE[asset.kind] !== asset.usage) {\n throw new Error(\"This asset is not available through the delivery endpoint\")\n }\n if (!Number.isSafeInteger(asset.byteLength) || asset.byteLength < 1 || asset.byteLength > SCENE3D_V2_LIMITS.maxRendererAssetBytes) {\n throw new Error(\"Invalid scene delivery asset byte length\")\n }\n return this.client.requestBytes(\"GET\", `/v1/3d-scene/deliveries/${encodeURIComponent(jobId)}/assets/${encodeURIComponent(asset.assetId)}`, {\n signal: options?.signal, maxBytes: asset.byteLength,\n })\n }\n\n /**\n * The recipe a 3D Render Pro run was refused for, parsed — or `null` when there is none.\n *\n * The one thing such a run leaves behind. Its recipe never compiled, so there is no scene\n * revision, no poster and no `.blend`: `output_data` carries a `deliveryId`, the compiler's\n * reasons, and `validation.sourceRetained` saying whether the recipe itself was kept. This\n * fetches it in one call — delivery, then the `source-json` descriptor's bytes.\n *\n * `null` means the delivery has no retained recipe to hand back: no pass ever cleared\n * admission, or this caller holds less than `edit` on the job's workflow and the descriptor\n * is therefore not listed for them.\n *\n * Read it to see what was attempted and to inform the next prompt. There is no input that\n * takes a recipe back: a refused run published no revision, so there is no `{kind:\"scene\"}`\n * source to re-run it from.\n */\n async retainedRecipe(jobId: string, options?: { signal?: AbortSignal }): Promise<unknown | null> {\n const delivery = await this.getDelivery(jobId)\n const asset = delivery.assets.find((item) => item.kind === \"source-json\")\n if (!asset) return null\n const bytes = await this.deliveryAssetBytes(jobId, asset, options)\n return JSON.parse(new TextDecoder(\"utf-8\", { fatal: true }).decode(bytes)) as unknown\n }\n\n /** Persist deterministic overlays without an LLM or a generation charge. */\n applyEdits(revisionId: string, params: RetainedScene3DEditParams): Promise<RetainedScene3DEditResult> {\n return this.client.request(\"POST\", `/v1/3d-scene/revisions/${encodeURIComponent(revisionId)}/edits`, { body: params })\n }\n\n /** Asset access is scoped to an exact retained revision, with fresh authentication. */\n assetBytes(revisionId: string, asset: Scene3DAssetRef, options?: { signal?: AbortSignal }): Promise<ArrayBuffer> {\n if (![\"glb\", \"camera-track-json\", \"poster\", \"validation-report\"].includes(asset.kind)) {\n throw new Error(\"This asset is not available through the playback endpoint\")\n }\n if (!Number.isSafeInteger(asset.byteLength) || asset.byteLength < 1 || asset.byteLength > SCENE3D_V2_LIMITS.maxRendererAssetBytes) {\n throw new Error(\"Invalid scene asset byte length\")\n }\n return this.client.requestBytes(\"GET\", `/v1/3d-scene/revisions/${encodeURIComponent(revisionId)}/assets/${encodeURIComponent(asset.assetId)}`, {\n signal: options?.signal, maxBytes: asset.byteLength,\n })\n }\n\n /** The editable native file has its own authorization lane. */\n sourceBytes(revisionId: string, options?: { signal?: AbortSignal }): Promise<ArrayBuffer> {\n return this.client.requestBytes(\"GET\", `/v1/3d-scene/revisions/${encodeURIComponent(revisionId)}/source`, {\n signal: options?.signal, maxBytes: SCENE3D_V2_LIMITS.maxBlendSourceBytes,\n })\n }\n\n generate(params: GenerateScene3DParams): Promise<RunNodeResult> {\n return this.client.nodes.run(\"generate-3d-scene\", params)\n }\n\n generateAndWait(params: GenerateScene3DParams, options?: RunAndWaitOptions): Promise<Scene3DJobOutput> {\n return this.client.nodes.runAndWait(\"generate-3d-scene\", params, options)\n }\n\n edit(params: EditScene3DParams): Promise<RunNodeResult> {\n return this.client.nodes.run(\"edit-3d-scene\", params)\n }\n\n editAndWait(params: EditScene3DParams, options?: RunAndWaitOptions): Promise<Scene3DJobOutput> {\n return this.client.nodes.runAndWait(\"edit-3d-scene\", params, options)\n }\n\n /**\n * Price a 3D Render Pro request WITHOUT starting it.\n *\n * Takes the same body a run takes, minus the `quoteId`, and answers a\n * ceiling (`maxCredits`), a `breakdown` to show, and the\n * `normalizedInputHash` admission re-checks. It reserves nothing and spends\n * nothing — a quote is a price, not a purchase.\n */\n quotePro(params: Pro3DRenderParams): Promise<Pro3DRenderQuote> {\n return this.client.request(\"POST\", \"/v1/pro-3d-render/quote\", { body: params })\n }\n\n /**\n * Submit a quoted 3D Render Pro run.\n *\n * Requires the `quoteId` from {@link quotePro}: no run starts at a price\n * nobody showed. Sends an `Idempotency-Key` — a fresh one per call unless you\n * supply your own, which you should when retrying a call that timed out.\n *\n * Availability is a property of the deployment: `capabilities().pro` says\n * whether this install can serve it, and which controls you may offer.\n */\n runPro(params: Pro3DRenderRunParams, options?: Pro3DRenderRunOptions): Promise<RunNodeResult> {\n return this.client.nodes.run(\"pro-3d-render\", params, {\n idempotencyKey: options?.idempotencyKey ?? newIdempotencyKey(),\n })\n }\n\n /**\n * Quote if needed, run, and wait — the whole operation in one call.\n *\n * Two HTTP requests at most, still ONE paid job: when `quoteId` is absent\n * this quotes the identical body first, so the run is admitted against a\n * hash of exactly what was priced. Pass a `quoteId` to run against a quote\n * you already showed the user.\n *\n * Resolves with the settled result — `videoUrl` (the MP4) and `scenePlan`\n * (the exact composition it was rendered from), plus the revision, poster,\n * validation and renderer metadata. A run that AUTHORED also reports its own\n * account of the answer — `metadata.summary`, `repairPasses`,\n * `admissionRetries`, `mechanicalPasses` (repairs the engine applied from\n * the compiler's own remedy with no planner call, counted APART from\n * `repairPasses` on their own quoted allowance), `restoredAssertions`, and\n * any `SCENE_AUTHORING_ASSUMPTION` warnings. A\n * completed result whose `metadata.review` is present passed every mandatory\n * assertion but did NOT get the visual reviewer's approval: `verdict:\n * \"refused\"` means it objected, each objection also a `SCENE_REVIEW_REFUSED`\n * warning; `verdict: \"unavailable\"` means the review produced no usable\n * verdict in `attempts` asks (`reason: \"provider\"` — never reached its\n * provider; `\"unusable\"` — it answered, unusably), so nobody judged the scene and\n * `SCENE_REVIEW_UNAVAILABLE` leads the warnings. Re-render that same\n * `scenePlan` later with {@link render}, or with a `{kind:'scene'}` source;\n * that costs no authoring.\n */\n async renderProAndWait(\n params: Pro3DRenderParams | Pro3DRenderRunParams,\n options?: RunAndWaitOptions & Pro3DRenderRunOptions,\n ): Promise<Pro3DRenderJobOutput> {\n const quoteId =\n typeof (params as Pro3DRenderRunParams).quoteId === \"string\"\n ? (params as Pro3DRenderRunParams).quoteId\n : (await this.quotePro(params)).quoteId\n return this.client.nodes.runAndWait(\"pro-3d-render\", { ...params, quoteId }, {\n ...options,\n idempotencyKey: options?.idempotencyKey ?? newIdempotencyKey(),\n })\n }\n\n /**\n * Uses the supplied immutable revision; never starts authoring or a rebuild.\n *\n * Priced by the plan's frame size — see {@link RenderScene3DParams}.\n */\n render(params: RenderScene3DParams): Promise<RunNodeResult> {\n return this.client.nodes.run(\"render-video\", params)\n }\n\n renderAndWait(params: RenderScene3DParams, options?: RunAndWaitOptions): Promise<NodeJobOutput> {\n return this.client.nodes.runAndWait(\"render-video\", params, options)\n }\n}\n"]}
@@ -0,0 +1,124 @@
1
+ 'use strict';
2
+
3
+ // src/resources/competitors.ts
4
+ var CompetitorsResource = class {
5
+ constructor(client) {
6
+ this.client = client;
7
+ }
8
+ client;
9
+ /** `GET /v1/competitors` → every tracked brand. */
10
+ async list() {
11
+ const res = await this.listWithPlan();
12
+ return [...res.data];
13
+ }
14
+ /** `GET /v1/competitors` → every tracked brand, with how many months of scans your plan keeps. */
15
+ listWithPlan() {
16
+ return this.client.request("GET", "/v1/competitors");
17
+ }
18
+ /**
19
+ * `GET /v1/competitors/:id` → one brand with its latest scan (posts and
20
+ * cards) and its scan history; with `scan`, the brand as of that scan.
21
+ */
22
+ get(id, options = {}) {
23
+ const query = options.scan ? `?scan=${encodeURIComponent(options.scan)}` : "";
24
+ return this.client.request("GET", `/v1/competitors/${encodeURIComponent(id)}${query}`);
25
+ }
26
+ /** `GET /v1/competitors/:id/history` → the brand's scans oldest first, per platform what each found and read (free). */
27
+ history(id) {
28
+ return this.client.request("GET", `/v1/competitors/${encodeURIComponent(id)}/history`);
29
+ }
30
+ /**
31
+ * `GET /v1/competitors/:id/compare` → the brand over a period, and over a
32
+ * second one to compare with (free). A post belongs to a period by its
33
+ * publish date; a period is at most a year.
34
+ */
35
+ compare(id, input) {
36
+ const params = new URLSearchParams({ from: input.from, to: input.to });
37
+ if (input.vsFrom !== void 0 && input.vsTo !== void 0) {
38
+ params.set("vsFrom", input.vsFrom);
39
+ params.set("vsTo", input.vsTo);
40
+ }
41
+ return this.client.request("GET", `/v1/competitors/${encodeURIComponent(id)}/compare?${params.toString()}`);
42
+ }
43
+ /** `POST /v1/competitors` → track a brand. Accounts take handles or links. */
44
+ create(input) {
45
+ return this.client.request("POST", "/v1/competitors", { body: input });
46
+ }
47
+ /**
48
+ * `PATCH /v1/competitors/:id` → change its accounts, platforms, name or schedule.
49
+ * `accounts` replaces the whole set: pass every account to keep. Send
50
+ * `schedule` only to change it (it restarts the brand's schedule). While a
51
+ * scan of the brand runs, a change to its name, accounts, platforms or
52
+ * `isOwn` is refused with `409 scan_running`.
53
+ */
54
+ update(id, input) {
55
+ return this.client.request("PATCH", `/v1/competitors/${encodeURIComponent(id)}`, { body: input });
56
+ }
57
+ /** `DELETE /v1/competitors/:id` → stop tracking it (its scans go too). */
58
+ async delete(id) {
59
+ await this.client.request("DELETE", `/v1/competitors/${encodeURIComponent(id)}`);
60
+ }
61
+ /** `GET /v1/competitors/cards` → every action card, most urgent first, with the posts they rest on. */
62
+ cards() {
63
+ return this.client.request("GET", "/v1/competitors/cards");
64
+ }
65
+ /**
66
+ * `GET /v1/competitors/:id/lessons` → what works for a brand: per platform,
67
+ * what its best posts share, measured on its own posts across every stored
68
+ * scan, with the posts each lesson rests on (free). "What works for you" on
69
+ * the brand marked as yours.
70
+ */
71
+ lessons(id) {
72
+ return this.client.request("GET", `/v1/competitors/${encodeURIComponent(id)}/lessons`);
73
+ }
74
+ /**
75
+ * `GET /v1/competitors/actions` → the cards you marked "I did this", newest
76
+ * first, each with how it went (`outcome`), and your track record per
77
+ * family of advice (free). Each scan of your own brand judges the post that
78
+ * came of a card once it is a few days old; the first verdict stays.
79
+ */
80
+ tried() {
81
+ return this.client.request("GET", "/v1/competitors/actions");
82
+ }
83
+ /**
84
+ * `POST /v1/competitors/actions` → "I did this" on a card on your wall (its
85
+ * `id` from `cards()`), optionally with the link to your post that came of
86
+ * it. Only cards whose advice ends in a post of yours can be marked
87
+ * (`400 not_measurable`). Marking a marked card returns its mark
88
+ * (`created: false`).
89
+ */
90
+ markDone(cardId, options = {}) {
91
+ return this.client.request("POST", "/v1/competitors/actions", { body: { cardId, ...options.postUrl ? { postUrl: options.postUrl } : {} } });
92
+ }
93
+ /**
94
+ * `PATCH /v1/competitors/actions/:id` → link the post that came of a marked
95
+ * card (the post's full link; a short link is refused with `400
96
+ * short_link`), or `null` to remove the link. Another post is judged afresh.
97
+ */
98
+ linkPost(markId, postUrl) {
99
+ return this.client.request("PATCH", `/v1/competitors/actions/${encodeURIComponent(markId)}`, { body: { postUrl } });
100
+ }
101
+ /** `PATCH /v1/competitors/actions/:id` with `seen: true` → you have seen its verdict (the app stops announcing it). */
102
+ markSeen(markId) {
103
+ return this.client.request("PATCH", `/v1/competitors/actions/${encodeURIComponent(markId)}`, { body: { seen: true } });
104
+ }
105
+ /** `DELETE /v1/competitors/actions/:id` → undo "I did this" (its verdict leaves your track record). */
106
+ async unmark(markId) {
107
+ await this.client.request("DELETE", `/v1/competitors/actions/${encodeURIComponent(markId)}`);
108
+ }
109
+ /** `POST /v1/competitor-discover` → a brand's accounts found from its website (free; guesses are marked). */
110
+ discover(website) {
111
+ return this.client.request("POST", "/v1/competitor-discover", { body: { website } });
112
+ }
113
+ /**
114
+ * `POST /v1/competitor-scan` → scan a brand now. Answers with a job id;
115
+ * poll `client.jobs.getStatus(jobId)`, then read `get(id)` or `cards()`.
116
+ */
117
+ scan(id) {
118
+ return this.client.request("POST", "/v1/competitor-scan", { body: { competitorId: id } });
119
+ }
120
+ };
121
+
122
+ exports.CompetitorsResource = CompetitorsResource;
123
+ //# sourceMappingURL=chunk-YFS2LMG4.cjs.map
124
+ //# sourceMappingURL=chunk-YFS2LMG4.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/resources/competitors.ts"],"names":[],"mappings":";;;AAyBO,IAAM,sBAAN,MAA0B;AAAA,EAC/B,YAAoB,MAAA,EAA0B;AAA1B,IAAA,IAAA,CAAA,MAAA,GAAA,MAAA;AAAA,EAA2B;AAAA,EAA3B,MAAA;AAAA;AAAA,EAGpB,MAAM,IAAA,GAAqC;AACzC,IAAA,MAAM,GAAA,GAAM,MAAM,IAAA,CAAK,YAAA,EAAa;AACpC,IAAA,OAAO,CAAC,GAAG,GAAA,CAAI,IAAI,CAAA;AAAA,EACrB;AAAA;AAAA,EAGA,YAAA,GAA8C;AAC5C,IAAA,OAAO,IAAA,CAAK,MAAA,CAAO,OAAA,CAA8B,KAAA,EAAO,iBAAiB,CAAA;AAAA,EAC3E;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,GAAA,CAAI,EAAA,EAAY,OAAA,GAAsC,EAAC,EAA8B;AACnF,IAAA,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AAAA;AAAA;AAAA;AAAA,EAOA,QAAA,CAAS,QAAgB,OAAA,EAAmD;AAC1E,IAAA,OAAO,IAAA,CAAK,MAAA,CAAO,OAAA,CAA0B,OAAA,EAAS,2BAA2B,kBAAA,CAAmB,MAAM,CAAC,CAAA,CAAA,EAAI,EAAE,IAAA,EAAM,EAAE,OAAA,IAAW,CAAA;AAAA,EACtI;AAAA;AAAA,EAGA,SAAS,MAAA,EAA2C;AAClD,IAAA,OAAO,IAAA,CAAK,MAAA,CAAO,OAAA,CAA0B,OAAA,EAAS,2BAA2B,kBAAA,CAAmB,MAAM,CAAC,CAAA,CAAA,EAAI,EAAE,IAAA,EAAM,EAAE,IAAA,EAAM,IAAA,IAAQ,CAAA;AAAA,EACzI;AAAA;AAAA,EAGA,MAAM,OAAO,MAAA,EAA+B;AAC1C,IAAA,MAAM,IAAA,CAAK,OAAO,OAAA,CAA2B,QAAA,EAAU,2BAA2B,kBAAA,CAAmB,MAAM,CAAC,CAAA,CAAE,CAAA;AAAA,EAChH;AAAA;AAAA,EAGA,SAAS,OAAA,EAA+C;AACtD,IAAA,OAAO,IAAA,CAAK,MAAA,CAAO,OAAA,CAA6B,MAAA,EAAQ,yBAAA,EAA2B,EAAE,IAAA,EAAM,EAAE,OAAA,EAAQ,EAAG,CAAA;AAAA,EAC1G;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,KAAK,EAAA,EAAwC;AAC3C,IAAA,OAAO,IAAA,CAAK,MAAA,CAAO,OAAA,CAA2B,MAAA,EAAQ,qBAAA,EAAuB,EAAE,IAAA,EAAM,EAAE,YAAA,EAAc,EAAA,EAAG,EAAG,CAAA;AAAA,EAC7G;AACF","file":"chunk-YFS2LMG4.cjs","sourcesContent":["import type { NodaroClientCore } from \"../core.js\"\nimport type {\n CardActionResult,\n CompetitorActionsResult,\n CompetitorCardsResult,\n CompetitorCompareInput,\n CompetitorCompareResult,\n CompetitorDetail,\n CompetitorDiscovery,\n CompetitorHistory,\n CompetitorLessonsResult,\n CompetitorListResult,\n CreateCompetitorInput,\n TrackedCompetitor,\n UpdateCompetitorInput,\n} from \"@nodaro/shared/social\"\n\n/**\n * Competitors — brands you track (competitors, or your own), their scans and\n * the action cards read from them. Nodaro Cloud.\n *\n * Adding, reading and website lookups are free. A scan costs one Social\n * Search page per search it runs (`TrackedCompetitor.searches`); searches that\n * fail are not charged.\n */\nexport class CompetitorsResource {\n constructor(private client: NodaroClientCore) {}\n\n /** `GET /v1/competitors` → every tracked brand. */\n async list(): Promise<TrackedCompetitor[]> {\n const res = await this.listWithPlan()\n return [...res.data]\n }\n\n /** `GET /v1/competitors` → every tracked brand, with how many months of scans your plan keeps. */\n listWithPlan(): Promise<CompetitorListResult> {\n return this.client.request<CompetitorListResult>(\"GET\", \"/v1/competitors\")\n }\n\n /**\n * `GET /v1/competitors/:id` → one brand with its latest scan (posts and\n * cards) and its scan history; with `scan`, the brand as of that scan.\n */\n get(id: string, options: { readonly scan?: string } = {}): Promise<CompetitorDetail> {\n const query = options.scan ? `?scan=${encodeURIComponent(options.scan)}` : \"\"\n return this.client.request<CompetitorDetail>(\"GET\", `/v1/competitors/${encodeURIComponent(id)}${query}`)\n }\n\n /** `GET /v1/competitors/:id/history` → the brand's scans oldest first, per platform what each found and read (free). */\n history(id: string): Promise<CompetitorHistory> {\n return this.client.request<CompetitorHistory>(\"GET\", `/v1/competitors/${encodeURIComponent(id)}/history`)\n }\n\n /**\n * `GET /v1/competitors/:id/compare` → the brand over a period, and over a\n * second one to compare with (free). A post belongs to a period by its\n * publish date; a period is at most a year.\n */\n compare(id: string, input: CompetitorCompareInput): Promise<CompetitorCompareResult> {\n const params = new URLSearchParams({ from: input.from, to: input.to })\n if (input.vsFrom !== undefined && input.vsTo !== undefined) {\n params.set(\"vsFrom\", input.vsFrom)\n params.set(\"vsTo\", input.vsTo)\n }\n return this.client.request<CompetitorCompareResult>(\"GET\", `/v1/competitors/${encodeURIComponent(id)}/compare?${params.toString()}`)\n }\n\n /** `POST /v1/competitors` → track a brand. Accounts take handles or links. */\n create(input: CreateCompetitorInput): Promise<TrackedCompetitor> {\n return this.client.request<TrackedCompetitor>(\"POST\", \"/v1/competitors\", { body: input })\n }\n\n /**\n * `PATCH /v1/competitors/:id` → change its accounts, platforms, name or schedule.\n * `accounts` replaces the whole set: pass every account to keep. Send\n * `schedule` only to change it (it restarts the brand's schedule). While a\n * scan of the brand runs, a change to its name, accounts, platforms or\n * `isOwn` is refused with `409 scan_running`.\n */\n update(id: string, input: UpdateCompetitorInput): Promise<TrackedCompetitor> {\n return this.client.request<TrackedCompetitor>(\"PATCH\", `/v1/competitors/${encodeURIComponent(id)}`, { body: input })\n }\n\n /** `DELETE /v1/competitors/:id` → stop tracking it (its scans go too). */\n async delete(id: string): Promise<void> {\n await this.client.request<{ success: true }>(\"DELETE\", `/v1/competitors/${encodeURIComponent(id)}`)\n }\n\n /** `GET /v1/competitors/cards` → every action card, most urgent first, with the posts they rest on. */\n cards(): Promise<CompetitorCardsResult> {\n return this.client.request<CompetitorCardsResult>(\"GET\", \"/v1/competitors/cards\")\n }\n\n /**\n * `GET /v1/competitors/:id/lessons` → what works for a brand: per platform,\n * what its best posts share, measured on its own posts across every stored\n * scan, with the posts each lesson rests on (free). \"What works for you\" on\n * the brand marked as yours.\n */\n lessons(id: string): Promise<CompetitorLessonsResult> {\n return this.client.request<CompetitorLessonsResult>(\"GET\", `/v1/competitors/${encodeURIComponent(id)}/lessons`)\n }\n\n /**\n * `GET /v1/competitors/actions` → the cards you marked \"I did this\", newest\n * first, each with how it went (`outcome`), and your track record per\n * family of advice (free). Each scan of your own brand judges the post that\n * came of a card once it is a few days old; the first verdict stays.\n */\n tried(): Promise<CompetitorActionsResult> {\n return this.client.request<CompetitorActionsResult>(\"GET\", \"/v1/competitors/actions\")\n }\n\n /**\n * `POST /v1/competitors/actions` → \"I did this\" on a card on your wall (its\n * `id` from `cards()`), optionally with the link to your post that came of\n * it. Only cards whose advice ends in a post of yours can be marked\n * (`400 not_measurable`). Marking a marked card returns its mark\n * (`created: false`).\n */\n markDone(cardId: string, options: { postUrl?: string } = {}): Promise<CardActionResult> {\n return this.client.request<CardActionResult>(\"POST\", \"/v1/competitors/actions\", { body: { cardId, ...(options.postUrl ? { postUrl: options.postUrl } : {}) } })\n }\n\n /**\n * `PATCH /v1/competitors/actions/:id` → link the post that came of a marked\n * card (the post's full link; a short link is refused with `400\n * short_link`), or `null` to remove the link. Another post is judged afresh.\n */\n linkPost(markId: string, postUrl: string | null): Promise<CardActionResult> {\n return this.client.request<CardActionResult>(\"PATCH\", `/v1/competitors/actions/${encodeURIComponent(markId)}`, { body: { postUrl } })\n }\n\n /** `PATCH /v1/competitors/actions/:id` with `seen: true` → you have seen its verdict (the app stops announcing it). */\n markSeen(markId: string): Promise<CardActionResult> {\n return this.client.request<CardActionResult>(\"PATCH\", `/v1/competitors/actions/${encodeURIComponent(markId)}`, { body: { seen: true } })\n }\n\n /** `DELETE /v1/competitors/actions/:id` → undo \"I did this\" (its verdict leaves your track record). */\n async unmark(markId: string): Promise<void> {\n await this.client.request<{ success: true }>(\"DELETE\", `/v1/competitors/actions/${encodeURIComponent(markId)}`)\n }\n\n /** `POST /v1/competitor-discover` → a brand's accounts found from its website (free; guesses are marked). */\n discover(website: string): Promise<CompetitorDiscovery> {\n return this.client.request<CompetitorDiscovery>(\"POST\", \"/v1/competitor-discover\", { body: { website } })\n }\n\n /**\n * `POST /v1/competitor-scan` → scan a brand now. Answers with a job id;\n * poll `client.jobs.getStatus(jobId)`, then read `get(id)` or `cards()`.\n */\n scan(id: string): Promise<{ jobId: string }> {\n return this.client.request<{ jobId: string }>(\"POST\", \"/v1/competitor-scan\", { body: { competitorId: id } })\n }\n}\n"]}
@@ -0,0 +1,63 @@
1
+ // src/resources/webhooks.ts
2
+ var WebhooksResource = class {
3
+ constructor(client) {
4
+ this.client = client;
5
+ }
6
+ client;
7
+ /** `POST /v1/webhook-endpoints` → the endpoint and its signing secret (shown this once). */
8
+ create(input) {
9
+ return this.client.request("POST", "/v1/webhook-endpoints", { body: input });
10
+ }
11
+ /** `GET /v1/webhook-endpoints` → your endpoints, newest first. Never a secret. */
12
+ list() {
13
+ return this.client.request("GET", "/v1/webhook-endpoints");
14
+ }
15
+ /** `GET /v1/webhook-endpoints/:id`. */
16
+ get(id) {
17
+ return this.client.request("GET", `/v1/webhook-endpoints/${encodeURIComponent(id)}`);
18
+ }
19
+ /** `PATCH /v1/webhook-endpoints/:id` → change the address, events, description; switch on or off. */
20
+ update(id, input) {
21
+ return this.client.request("PATCH", `/v1/webhook-endpoints/${encodeURIComponent(id)}`, { body: input });
22
+ }
23
+ /** `DELETE /v1/webhook-endpoints/:id` → the endpoint and its delivery log. */
24
+ delete(id) {
25
+ return this.client.request("DELETE", `/v1/webhook-endpoints/${encodeURIComponent(id)}`);
26
+ }
27
+ /**
28
+ * `POST /v1/webhook-endpoints/:id/rotate-secret` → a new signing secret,
29
+ * shown this once. It signs every delivery from now on (retries included);
30
+ * the one it replaces keeps signing beside it for `gracePeriodSeconds` (a
31
+ * day by default), so update your receiver within that time.
32
+ */
33
+ rotateSecret(id, input = {}) {
34
+ return this.client.request("POST", `/v1/webhook-endpoints/${encodeURIComponent(id)}/rotate-secret`, {
35
+ body: input
36
+ });
37
+ }
38
+ /** `GET /v1/webhook-endpoints/:id/deliveries` → the delivery log, newest first (kept 30 days). */
39
+ deliveries(id, params = {}) {
40
+ return this.client.request("GET", `/v1/webhook-endpoints/${encodeURIComponent(id)}/deliveries`, {
41
+ query: { status: params.status, limit: params.limit, cursor: params.cursor }
42
+ });
43
+ }
44
+ /** `GET /v1/webhook-endpoints/:id/deliveries/:deliveryId` → one delivery (`test()` returns its id). */
45
+ getDelivery(id, deliveryId) {
46
+ return this.client.request(
47
+ "GET",
48
+ `/v1/webhook-endpoints/${encodeURIComponent(id)}/deliveries/${encodeURIComponent(deliveryId)}`
49
+ );
50
+ }
51
+ /**
52
+ * `POST /v1/webhook-endpoints/:id/test` → queue a `ping` (sent within
53
+ * seconds, tried once — even to an endpoint that is switched off). Follow
54
+ * it with `deliveries()`.
55
+ */
56
+ test(id) {
57
+ return this.client.request("POST", `/v1/webhook-endpoints/${encodeURIComponent(id)}/test`);
58
+ }
59
+ };
60
+
61
+ export { WebhooksResource };
62
+ //# sourceMappingURL=chunk-YN6CBIIB.js.map
63
+ //# sourceMappingURL=chunk-YN6CBIIB.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/resources/webhooks.ts"],"names":[],"mappings":";AAsKO,IAAM,mBAAN,MAAuB;AAAA,EAC5B,YAAoB,MAAA,EAA0B;AAA1B,IAAA,IAAA,CAAA,MAAA,GAAA,MAAA;AAAA,EAA2B;AAAA,EAA3B,MAAA;AAAA;AAAA,EAGpB,OAAO,KAAA,EAAoE;AACzE,IAAA,OAAO,IAAA,CAAK,OAAO,OAAA,CAAgC,MAAA,EAAQ,yBAAyB,EAAE,IAAA,EAAM,OAAO,CAAA;AAAA,EACrG;AAAA;AAAA,EAGA,IAAA,GAA6C;AAC3C,IAAA,OAAO,IAAA,CAAK,MAAA,CAAO,OAAA,CAAQ,KAAA,EAAO,uBAAuB,CAAA;AAAA,EAC3D;AAAA;AAAA,EAGA,IAAI,EAAA,EAAgD;AAClD,IAAA,OAAO,IAAA,CAAK,OAAO,OAAA,CAAQ,KAAA,EAAO,yBAAyB,kBAAA,CAAmB,EAAE,CAAC,CAAA,CAAE,CAAA;AAAA,EACrF;AAAA;AAAA,EAGA,MAAA,CAAO,IAAY,KAAA,EAAuE;AACxF,IAAA,OAAO,IAAA,CAAK,MAAA,CAAO,OAAA,CAAQ,OAAA,EAAS,CAAA,sBAAA,EAAyB,kBAAA,CAAmB,EAAE,CAAC,CAAA,CAAA,EAAI,EAAE,IAAA,EAAM,KAAA,EAAO,CAAA;AAAA,EACxG;AAAA;AAAA,EAGA,OAAO,EAAA,EAAwC;AAC7C,IAAA,OAAO,IAAA,CAAK,OAAO,OAAA,CAAQ,QAAA,EAAU,yBAAyB,kBAAA,CAAmB,EAAE,CAAC,CAAA,CAAE,CAAA;AAAA,EACxF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,YAAA,CAAa,EAAA,EAAY,KAAA,GAAkC,EAAC,EAAkC;AAC5F,IAAA,OAAO,IAAA,CAAK,OAAO,OAAA,CAA8B,MAAA,EAAQ,yBAAyB,kBAAA,CAAmB,EAAE,CAAC,CAAA,cAAA,CAAA,EAAkB;AAAA,MACxH,IAAA,EAAM;AAAA,KACP,CAAA;AAAA,EACH;AAAA;AAAA,EAGA,UAAA,CAAW,EAAA,EAAY,MAAA,GAAsC,EAAC,EAAiC;AAC7F,IAAA,OAAO,IAAA,CAAK,OAAO,OAAA,CAAQ,KAAA,EAAO,yBAAyB,kBAAA,CAAmB,EAAE,CAAC,CAAA,WAAA,CAAA,EAAe;AAAA,MAC9F,KAAA,EAAO,EAAE,MAAA,EAAQ,MAAA,CAAO,MAAA,EAAQ,OAAO,MAAA,CAAO,KAAA,EAAO,MAAA,EAAQ,MAAA,CAAO,MAAA;AAAO,KAC5E,CAAA;AAAA,EACH;AAAA;AAAA,EAGA,WAAA,CAAY,IAAY,UAAA,EAAwD;AAC9E,IAAA,OAAO,KAAK,MAAA,CAAO,OAAA;AAAA,MACjB,KAAA;AAAA,MACA,yBAAyB,kBAAA,CAAmB,EAAE,CAAC,CAAA,YAAA,EAAe,kBAAA,CAAmB,UAAU,CAAC,CAAA;AAAA,KAC9F;AAAA,EACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,KAAK,EAAA,EAAgD;AACnD,IAAA,OAAO,IAAA,CAAK,OAAO,OAAA,CAAQ,MAAA,EAAQ,yBAAyB,kBAAA,CAAmB,EAAE,CAAC,CAAA,KAAA,CAAO,CAAA;AAAA,EAC3F;AACF","file":"chunk-YN6CBIIB.js","sourcesContent":["import type { NodaroClientCore } from \"../core.js\"\nimport type { Job } from \"./jobs.js\"\n\n/** Events an endpoint can subscribe to. */\nexport type WebhookJobEvent = \"job.completed\" | \"job.failed\"\n\n/** Every event a delivery can carry: the job events, and the test ping. */\nexport type WebhookEventType = WebhookJobEvent | \"ping\"\n\n/** A delivery's lifecycle: waiting (or being sent), sent, or given up on. */\nexport type WebhookDeliveryStatus = \"pending\" | \"delivered\" | \"failed\"\n\n/** An https address Nodaro POSTs your job events to. */\nexport interface WebhookEndpoint {\n id: string\n url: string\n description: string | null\n events: WebhookJobEvent[]\n isActive: boolean\n /**\n * Why the platform switched it off: `\"consecutive_failures\"` (50\n * deliveries in a row failed for good) or `\"legacy_secret\"` (it predates\n * signing; rotate its secret). `null` when it is on, or you switched it off.\n */\n disabledReason: \"consecutive_failures\" | \"legacy_secret\" | null\n disabledAt: string | null\n /** Deliveries in a row that failed for good. Reset by a success. */\n consecutiveFailures: number\n /**\n * The connected app that registered it — it then receives only the jobs\n * that app submitted itself. `null` = registered by the account.\n */\n appId: string | null\n /** When the current signing secret was issued; `null` = none yet. */\n secretCreatedAt: string | null\n /**\n * After a rotation: until when the secret it replaced still signs too (a\n * second `v1=` in `Nodaro-Signature`). `null` when only one secret signs.\n */\n previousSecretExpiresAt: string | null\n createdAt: string\n updatedAt: string\n}\n\nexport interface CreateWebhookEndpointInput {\n /** An https address on a public host. */\n url: string\n /** Default: both. */\n events?: WebhookJobEvent[]\n /** Up to 500 characters. */\n description?: string\n}\n\nexport interface UpdateWebhookEndpointInput {\n url?: string\n events?: WebhookJobEvent[]\n /** `true` also clears an automatic switch-off and its failure count. */\n isActive?: boolean\n /** `null` clears it. */\n description?: string | null\n}\n\n/** `create()`'s answer: the endpoint and its signing secret — shown this once. */\nexport interface CreatedWebhookEndpoint {\n data: WebhookEndpoint\n /** `whsec_…`. Store it now: no other call returns it. */\n secret: string\n}\n\nexport interface RotateWebhookSecretInput {\n /**\n * Seconds the replaced secret keeps signing beside the new one (0 – 604800),\n * so your receiver can switch over without a gap. Default a day; `0` ends\n * the old secret at once (one that leaked).\n */\n gracePeriodSeconds?: number\n}\n\n/** `rotateSecret()`'s answer — the secret is shown this once. */\nexport interface RotatedWebhookSecret {\n /** `whsec_…`. Store it now: no other call returns it. */\n secret: string\n /** Until when the replaced secret still signs; `null` when it stopped at once. */\n previousSecretExpiresAt: string | null\n}\n\n/** One event sent (or to be sent) to one endpoint, with its attempts. */\nexport interface WebhookDelivery {\n /** Also the event's `id` and the `Nodaro-Delivery` header: the same on every retry. */\n id: string\n webhookId: string\n event: WebhookEventType\n jobId: string | null\n status: WebhookDeliveryStatus\n attempts: number\n /** The receiver's last HTTP status; `null` when no answer came. */\n responseStatus: number | null\n /** The first 2 KB of the receiver's last answer. */\n responseBody: string | null\n durationMs: number | null\n /**\n * Why the last attempt failed (`http_<status>`, `timeout`, `blocked_address`,\n * `connection_refused`, …) or why the delivery ended without one\n * (`endpoint_disabled`, `app_revoked`, `job_deleted`, `attempts_exhausted`).\n * `signing_unavailable` / `job_unreadable`: a problem on Nodaro's side — the\n * delivery waits and is tried again, its attempts unspent.\n */\n error: string | null\n /** The exact body sent (retries send the same text); `null` before the first recorded attempt and once delivered. */\n requestBody: string | null\n createdAt: string\n lastAttemptAt: string | null\n /** When a pending delivery is due (while it is being sent: when that attempt times out). */\n nextAttemptAt: string | null\n deliveredAt: string | null\n}\n\nexport interface ListWebhookDeliveriesParams {\n status?: WebhookDeliveryStatus\n /** Page size, 1–100 (server default 20). */\n limit?: number\n /** The previous page's `next`. */\n cursor?: string\n}\n\nexport interface WebhookDeliveryPage {\n data: WebhookDelivery[]\n /** Pass back as `cursor` for the next page; `null` on the last one. */\n next: string | null\n}\n\n/** A job event as your endpoint receives it (verify it with `verifyWebhookSignature`). */\nexport interface JobWebhookEvent {\n /**\n * The delivery id: the same on every retry — de-duplicate on it (this one,\n * from the verified body; the `Nodaro-Delivery` header is not signed).\n */\n id: string\n type: WebhookJobEvent\n /** When the job reached this status. */\n createdAt: string\n data: {\n /** The job, in the same shape `jobs.get()` returns. */\n job: Job\n /** Present when the event would pass 64 KB: these fields were left out — read the whole job with `jobs.get()`. */\n omitted?: Array<\"input_data\" | \"output_data\">\n }\n}\n\n/** The event `test()` sends. */\nexport interface PingWebhookEvent {\n id: string\n type: \"ping\"\n createdAt: string\n data: { webhookId: string }\n}\n\nexport type WebhookEvent = JobWebhookEvent | PingWebhookEvent\n\n/**\n * Outbound webhooks: register an https endpoint and Nodaro POSTs it every\n * `job.completed` / `job.failed` of your account, signed with the endpoint's\n * own secret (check it with `verifyWebhookSignature`), retried with backoff,\n * every attempt kept in its delivery log. OAuth app tokens need `jobs:read`;\n * an endpoint an app registers receives only the jobs that app submitted.\n */\nexport class WebhooksResource {\n constructor(private client: NodaroClientCore) {}\n\n /** `POST /v1/webhook-endpoints` → the endpoint and its signing secret (shown this once). */\n create(input: CreateWebhookEndpointInput): Promise<CreatedWebhookEndpoint> {\n return this.client.request<CreatedWebhookEndpoint>(\"POST\", \"/v1/webhook-endpoints\", { body: input })\n }\n\n /** `GET /v1/webhook-endpoints` → your endpoints, newest first. Never a secret. */\n list(): Promise<{ data: WebhookEndpoint[] }> {\n return this.client.request(\"GET\", \"/v1/webhook-endpoints\")\n }\n\n /** `GET /v1/webhook-endpoints/:id`. */\n get(id: string): Promise<{ data: WebhookEndpoint }> {\n return this.client.request(\"GET\", `/v1/webhook-endpoints/${encodeURIComponent(id)}`)\n }\n\n /** `PATCH /v1/webhook-endpoints/:id` → change the address, events, description; switch on or off. */\n update(id: string, input: UpdateWebhookEndpointInput): Promise<{ data: WebhookEndpoint }> {\n return this.client.request(\"PATCH\", `/v1/webhook-endpoints/${encodeURIComponent(id)}`, { body: input })\n }\n\n /** `DELETE /v1/webhook-endpoints/:id` → the endpoint and its delivery log. */\n delete(id: string): Promise<{ success: true }> {\n return this.client.request(\"DELETE\", `/v1/webhook-endpoints/${encodeURIComponent(id)}`)\n }\n\n /**\n * `POST /v1/webhook-endpoints/:id/rotate-secret` → a new signing secret,\n * shown this once. It signs every delivery from now on (retries included);\n * the one it replaces keeps signing beside it for `gracePeriodSeconds` (a\n * day by default), so update your receiver within that time.\n */\n rotateSecret(id: string, input: RotateWebhookSecretInput = {}): Promise<RotatedWebhookSecret> {\n return this.client.request<RotatedWebhookSecret>(\"POST\", `/v1/webhook-endpoints/${encodeURIComponent(id)}/rotate-secret`, {\n body: input,\n })\n }\n\n /** `GET /v1/webhook-endpoints/:id/deliveries` → the delivery log, newest first (kept 30 days). */\n deliveries(id: string, params: ListWebhookDeliveriesParams = {}): Promise<WebhookDeliveryPage> {\n return this.client.request(\"GET\", `/v1/webhook-endpoints/${encodeURIComponent(id)}/deliveries`, {\n query: { status: params.status, limit: params.limit, cursor: params.cursor },\n })\n }\n\n /** `GET /v1/webhook-endpoints/:id/deliveries/:deliveryId` → one delivery (`test()` returns its id). */\n getDelivery(id: string, deliveryId: string): Promise<{ data: WebhookDelivery }> {\n return this.client.request(\n \"GET\",\n `/v1/webhook-endpoints/${encodeURIComponent(id)}/deliveries/${encodeURIComponent(deliveryId)}`,\n )\n }\n\n /**\n * `POST /v1/webhook-endpoints/:id/test` → queue a `ping` (sent within\n * seconds, tried once — even to an endpoint that is switched off). Follow\n * it with `deliveries()`.\n */\n test(id: string): Promise<{ data: WebhookDelivery }> {\n return this.client.request(\"POST\", `/v1/webhook-endpoints/${encodeURIComponent(id)}/test`)\n }\n}\n"]}
@@ -0,0 +1,4 @@
1
+ 'use strict';
2
+
3
+ //# sourceMappingURL=chunk-YOJ2XNQX.cjs.map
4
+ //# sourceMappingURL=chunk-YOJ2XNQX.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"chunk-YOJ2XNQX.cjs"}
@@ -0,0 +1,3 @@
1
+
2
+ //# sourceMappingURL=chunk-YOOZB4RL.js.map
3
+ //# sourceMappingURL=chunk-YOOZB4RL.js.map