@nodaro/sdk 2.29.0 → 2.31.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +31 -0
- package/dist/chunk-2DZWWIJ4.cjs +32 -0
- package/dist/chunk-2DZWWIJ4.cjs.map +1 -0
- package/dist/chunk-34PU2DAT.cjs +118 -0
- package/dist/chunk-34PU2DAT.cjs.map +1 -0
- package/dist/chunk-37Y5QAVA.js +3 -0
- package/dist/chunk-37Y5QAVA.js.map +1 -0
- package/dist/chunk-37YCKZX4.cjs +4 -0
- package/dist/chunk-37YCKZX4.cjs.map +1 -0
- package/dist/chunk-3B47IHB3.cjs +65 -0
- package/dist/chunk-3B47IHB3.cjs.map +1 -0
- package/dist/chunk-3BELHJBN.cjs +4 -0
- package/dist/chunk-3BELHJBN.cjs.map +1 -0
- package/dist/chunk-3PPSGM5X.js +3 -0
- package/dist/chunk-3PPSGM5X.js.map +1 -0
- package/dist/chunk-3QBH2VE2.cjs +80 -0
- package/dist/chunk-3QBH2VE2.cjs.map +1 -0
- package/dist/chunk-3QFTP5P5.js +102 -0
- package/dist/chunk-3QFTP5P5.js.map +1 -0
- package/dist/chunk-43FVH6LJ.cjs +123 -0
- package/dist/chunk-43FVH6LJ.cjs.map +1 -0
- package/dist/chunk-43NO4SGC.cjs +4 -0
- package/dist/chunk-43NO4SGC.cjs.map +1 -0
- package/dist/chunk-45CK55BH.cjs +4 -0
- package/dist/chunk-45CK55BH.cjs.map +1 -0
- package/dist/chunk-4NLVBYMW.js +280 -0
- package/dist/chunk-4NLVBYMW.js.map +1 -0
- package/dist/chunk-4WRDR4GN.js +102 -0
- package/dist/chunk-4WRDR4GN.js.map +1 -0
- package/dist/chunk-4WWSHV5G.cjs +4 -0
- package/dist/chunk-4WWSHV5G.cjs.map +1 -0
- package/dist/chunk-53SXNN3A.js +80 -0
- package/dist/chunk-53SXNN3A.js.map +1 -0
- package/dist/chunk-5ALNFATQ.cjs +27 -0
- package/dist/chunk-5ALNFATQ.cjs.map +1 -0
- package/dist/chunk-5UQNMNUE.cjs +4 -0
- package/dist/chunk-5UQNMNUE.cjs.map +1 -0
- package/dist/chunk-5WAI7VGO.js +184 -0
- package/dist/chunk-5WAI7VGO.js.map +1 -0
- package/dist/chunk-65E3JBFZ.js +52 -0
- package/dist/chunk-65E3JBFZ.js.map +1 -0
- package/dist/chunk-6JFNBAKV.js +3 -0
- package/dist/chunk-6JFNBAKV.js.map +1 -0
- package/dist/chunk-6OC6OKLY.cjs +4 -0
- package/dist/chunk-6OC6OKLY.cjs.map +1 -0
- package/dist/chunk-6OGGJQVA.js +25 -0
- package/dist/chunk-6OGGJQVA.js.map +1 -0
- package/dist/chunk-7A7HYFGM.js +3 -0
- package/dist/chunk-7A7HYFGM.js.map +1 -0
- package/dist/chunk-7ISSKQ6S.cjs +106 -0
- package/dist/chunk-7ISSKQ6S.cjs.map +1 -0
- package/dist/chunk-7LSFG2AF.js +194 -0
- package/dist/chunk-7LSFG2AF.js.map +1 -0
- package/dist/chunk-7MYKT2L4.cjs +4 -0
- package/dist/chunk-7MYKT2L4.cjs.map +1 -0
- package/dist/chunk-7QOCWJKD.cjs +25 -0
- package/dist/chunk-7QOCWJKD.cjs.map +1 -0
- package/dist/chunk-A2ZAFAWC.cjs +4 -0
- package/dist/chunk-A2ZAFAWC.cjs.map +1 -0
- package/dist/chunk-A3S55XGF.cjs +54 -0
- package/dist/chunk-A3S55XGF.cjs.map +1 -0
- package/dist/chunk-A3THLBFG.js +3 -0
- package/dist/chunk-A3THLBFG.js.map +1 -0
- package/dist/chunk-AJVSMNPZ.js +78 -0
- package/dist/chunk-AJVSMNPZ.js.map +1 -0
- package/dist/chunk-ALSLZG3U.js +124 -0
- package/dist/chunk-ALSLZG3U.js.map +1 -0
- package/dist/chunk-ALUUBPDG.cjs +4 -0
- package/dist/chunk-ALUUBPDG.cjs.map +1 -0
- package/dist/chunk-AO3W45LT.cjs +4 -0
- package/dist/chunk-AO3W45LT.cjs.map +1 -0
- package/dist/chunk-AUDHV3OE.js +3 -0
- package/dist/chunk-AUDHV3OE.js.map +1 -0
- package/dist/chunk-BAL576G2.cjs +4 -0
- package/dist/chunk-BAL576G2.cjs.map +1 -0
- package/dist/chunk-BFMKPELU.cjs +212 -0
- package/dist/chunk-BFMKPELU.cjs.map +1 -0
- package/dist/chunk-BKP6F2IX.js +3 -0
- package/dist/chunk-BKP6F2IX.js.map +1 -0
- package/dist/chunk-BLA44UCM.js +32 -0
- package/dist/chunk-BLA44UCM.js.map +1 -0
- package/dist/chunk-BPWUWUZ3.cjs +20 -0
- package/dist/chunk-BPWUWUZ3.cjs.map +1 -0
- package/dist/chunk-BRV7Z4GD.cjs +17 -0
- package/dist/chunk-BRV7Z4GD.cjs.map +1 -0
- package/dist/chunk-BU5A6K4C.js +122 -0
- package/dist/chunk-BU5A6K4C.js.map +1 -0
- package/dist/chunk-C22RJDW3.js +3 -0
- package/dist/chunk-C22RJDW3.js.map +1 -0
- package/dist/chunk-CGNVHN4V.js +3 -0
- package/dist/chunk-CGNVHN4V.js.map +1 -0
- package/dist/chunk-CJFIOVBA.js +3 -0
- package/dist/chunk-CJFIOVBA.js.map +1 -0
- package/dist/chunk-CJLLIVSB.cjs +4 -0
- package/dist/chunk-CJLLIVSB.cjs.map +1 -0
- package/dist/chunk-CK3AMMSC.js +194 -0
- package/dist/chunk-CK3AMMSC.js.map +1 -0
- package/dist/chunk-COCKKMNP.cjs +205 -0
- package/dist/chunk-COCKKMNP.cjs.map +1 -0
- package/dist/chunk-CR5E2SF3.cjs +212 -0
- package/dist/chunk-CR5E2SF3.cjs.map +1 -0
- package/dist/chunk-CRCPRZFN.js +3 -0
- package/dist/chunk-CRCPRZFN.js.map +1 -0
- package/dist/chunk-CYRFD6KR.cjs +4 -0
- package/dist/chunk-CYRFD6KR.cjs.map +1 -0
- package/dist/chunk-D3PW7AHZ.js +3 -0
- package/dist/chunk-D3PW7AHZ.js.map +1 -0
- package/dist/chunk-DKEYSJCE.cjs +82 -0
- package/dist/chunk-DKEYSJCE.cjs.map +1 -0
- package/dist/chunk-DPSMVOM3.js +15 -0
- package/dist/chunk-DPSMVOM3.js.map +1 -0
- package/dist/chunk-E2ZXHS6E.js +20 -0
- package/dist/chunk-E2ZXHS6E.js.map +1 -0
- package/dist/chunk-E37CVHWW.js +33 -0
- package/dist/chunk-E37CVHWW.js.map +1 -0
- package/dist/chunk-E5BM4BLO.js +78 -0
- package/dist/chunk-E5BM4BLO.js.map +1 -0
- package/dist/chunk-EHRWTYGR.cjs +4 -0
- package/dist/chunk-EHRWTYGR.cjs.map +1 -0
- package/dist/chunk-EJSGJDZY.js +212 -0
- package/dist/chunk-EJSGJDZY.js.map +1 -0
- package/dist/chunk-ELSOVJPF.js +3 -0
- package/dist/chunk-ELSOVJPF.js.map +1 -0
- package/dist/chunk-ERLXU47J.js +29 -0
- package/dist/chunk-ERLXU47J.js.map +1 -0
- package/dist/chunk-ES2E65HT.js +3 -0
- package/dist/chunk-ES2E65HT.js.map +1 -0
- package/dist/chunk-EXLAHZKF.js +3 -0
- package/dist/chunk-EXLAHZKF.js.map +1 -0
- package/dist/chunk-FHEYAW5H.js +3 -0
- package/dist/chunk-FHEYAW5H.js.map +1 -0
- package/dist/chunk-GA4LZZKQ.cjs +104 -0
- package/dist/chunk-GA4LZZKQ.cjs.map +1 -0
- package/dist/chunk-GAZJ2PA3.js +3 -0
- package/dist/chunk-GAZJ2PA3.js.map +1 -0
- package/dist/chunk-GB6C5OEZ.cjs +32 -0
- package/dist/chunk-GB6C5OEZ.cjs.map +1 -0
- package/dist/chunk-GD24ZRFD.js +3 -0
- package/dist/chunk-GD24ZRFD.js.map +1 -0
- package/dist/chunk-GI7LROLL.cjs +4 -0
- package/dist/chunk-GI7LROLL.cjs.map +1 -0
- package/dist/chunk-GRFLPEM2.cjs +16 -0
- package/dist/chunk-GRFLPEM2.cjs.map +1 -0
- package/dist/chunk-GVIFLUYZ.cjs +40 -0
- package/dist/chunk-GVIFLUYZ.cjs.map +1 -0
- package/dist/chunk-H7VQTG4M.js +35 -0
- package/dist/chunk-H7VQTG4M.js.map +1 -0
- package/dist/chunk-HAKYPZLB.cjs +242 -0
- package/dist/chunk-HAKYPZLB.cjs.map +1 -0
- package/dist/chunk-HFBR6G36.js +3 -0
- package/dist/chunk-HFBR6G36.js.map +1 -0
- package/dist/chunk-HGCVWOGK.cjs +209 -0
- package/dist/chunk-HGCVWOGK.cjs.map +1 -0
- package/dist/chunk-HLHR3R4P.js +3 -0
- package/dist/chunk-HLHR3R4P.js.map +1 -0
- package/dist/chunk-HRXXGGSJ.js +3 -0
- package/dist/chunk-HRXXGGSJ.js.map +1 -0
- package/dist/chunk-I3TYBAOX.js +3 -0
- package/dist/chunk-I3TYBAOX.js.map +1 -0
- package/dist/chunk-I4A5VJRL.js +352 -0
- package/dist/chunk-I4A5VJRL.js.map +1 -0
- package/dist/chunk-I6CXC345.js +102 -0
- package/dist/chunk-I6CXC345.js.map +1 -0
- package/dist/chunk-IGOPUMEX.cjs +4 -0
- package/dist/chunk-IGOPUMEX.cjs.map +1 -0
- package/dist/chunk-IHKIYVZQ.js +30 -0
- package/dist/chunk-IHKIYVZQ.js.map +1 -0
- package/dist/chunk-IMC2M5YM.cjs +12 -0
- package/dist/chunk-IMC2M5YM.cjs.map +1 -0
- package/dist/chunk-IQ6KWSXP.js +3 -0
- package/dist/chunk-IQ6KWSXP.js.map +1 -0
- package/dist/chunk-IS26FJO7.cjs +4 -0
- package/dist/chunk-IS26FJO7.cjs.map +1 -0
- package/dist/chunk-J4WFSKY6.js +50 -0
- package/dist/chunk-J4WFSKY6.js.map +1 -0
- package/dist/chunk-J5LGGCAS.cjs +126 -0
- package/dist/chunk-J5LGGCAS.cjs.map +1 -0
- package/dist/chunk-JDEZHITT.js +43 -0
- package/dist/chunk-JDEZHITT.js.map +1 -0
- package/dist/chunk-JGS6YBDW.js +260 -0
- package/dist/chunk-JGS6YBDW.js.map +1 -0
- package/dist/chunk-JMOKD6ZP.js +46 -0
- package/dist/chunk-JMOKD6ZP.js.map +1 -0
- package/dist/chunk-JOX5BJ6K.cjs +4 -0
- package/dist/chunk-JOX5BJ6K.cjs.map +1 -0
- package/dist/chunk-JTAW54UM.js +116 -0
- package/dist/chunk-JTAW54UM.js.map +1 -0
- package/dist/chunk-K4RQOSJH.js +203 -0
- package/dist/chunk-K4RQOSJH.js.map +1 -0
- package/dist/chunk-KAIE6WJB.cjs +4 -0
- package/dist/chunk-KAIE6WJB.cjs.map +1 -0
- package/dist/chunk-KEDPGWIK.cjs +4 -0
- package/dist/chunk-KEDPGWIK.cjs.map +1 -0
- package/dist/chunk-KG4R454Z.js +18 -0
- package/dist/chunk-KG4R454Z.js.map +1 -0
- package/dist/chunk-KGKCAGRD.cjs +22 -0
- package/dist/chunk-KGKCAGRD.cjs.map +1 -0
- package/dist/chunk-KNMW722T.cjs +48 -0
- package/dist/chunk-KNMW722T.cjs.map +1 -0
- package/dist/chunk-KTTL7BND.cjs +4 -0
- package/dist/chunk-KTTL7BND.cjs.map +1 -0
- package/dist/chunk-KXEWTYS4.cjs +80 -0
- package/dist/chunk-KXEWTYS4.cjs.map +1 -0
- package/dist/chunk-KZQKFBRN.js +3 -0
- package/dist/chunk-KZQKFBRN.js.map +1 -0
- package/dist/chunk-LAWYFC4G.cjs +37 -0
- package/dist/chunk-LAWYFC4G.cjs.map +1 -0
- package/dist/chunk-LHP2CWHD.js +228 -0
- package/dist/chunk-LHP2CWHD.js.map +1 -0
- package/dist/chunk-LHRQXWI5.js +3 -0
- package/dist/chunk-LHRQXWI5.js.map +1 -0
- package/dist/chunk-LKH5M44B.cjs +114 -0
- package/dist/chunk-LKH5M44B.cjs.map +1 -0
- package/dist/chunk-LLNNHLCE.cjs +4 -0
- package/dist/chunk-LLNNHLCE.cjs.map +1 -0
- package/dist/chunk-LWZLWSXD.cjs +4 -0
- package/dist/chunk-LWZLWSXD.cjs.map +1 -0
- package/dist/chunk-M6Y5TOYE.js +3 -0
- package/dist/chunk-M6Y5TOYE.js.map +1 -0
- package/dist/chunk-MBFUMWI5.cjs +31 -0
- package/dist/chunk-MBFUMWI5.cjs.map +1 -0
- package/dist/chunk-MEKI37WI.js +3 -0
- package/dist/chunk-MEKI37WI.js.map +1 -0
- package/dist/chunk-MQ74AKA2.cjs +200 -0
- package/dist/chunk-MQ74AKA2.cjs.map +1 -0
- package/dist/chunk-N6GLZOE4.cjs +282 -0
- package/dist/chunk-N6GLZOE4.cjs.map +1 -0
- package/dist/chunk-NBVARNVA.cjs +38 -0
- package/dist/chunk-NBVARNVA.cjs.map +1 -0
- package/dist/chunk-NCCBS6GU.js +42 -0
- package/dist/chunk-NCCBS6GU.js.map +1 -0
- package/dist/chunk-NGKODS3J.cjs +52 -0
- package/dist/chunk-NGKODS3J.cjs.map +1 -0
- package/dist/chunk-NJVSKUL2.cjs +4 -0
- package/dist/chunk-NJVSKUL2.cjs.map +1 -0
- package/dist/chunk-NLQQHJ25.cjs +104 -0
- package/dist/chunk-NLQQHJ25.cjs.map +1 -0
- package/dist/chunk-NNHWH7ER.js +181 -0
- package/dist/chunk-NNHWH7ER.js.map +1 -0
- package/dist/chunk-NX67YIF3.js +3 -0
- package/dist/chunk-NX67YIF3.js.map +1 -0
- package/dist/chunk-OA6FWYZF.cjs +4 -0
- package/dist/chunk-OA6FWYZF.cjs.map +1 -0
- package/dist/chunk-OJDBSKC2.js +3 -0
- package/dist/chunk-OJDBSKC2.js.map +1 -0
- package/dist/chunk-OLPA44QJ.js +3 -0
- package/dist/chunk-OLPA44QJ.js.map +1 -0
- package/dist/chunk-OMH7ATOQ.js +3 -0
- package/dist/chunk-OMH7ATOQ.js.map +1 -0
- package/dist/chunk-OPR4TULG.js +3 -0
- package/dist/chunk-OPR4TULG.js.map +1 -0
- package/dist/chunk-OSX2GVZ2.cjs +34 -0
- package/dist/chunk-OSX2GVZ2.cjs.map +1 -0
- package/dist/chunk-OXQKE5EG.cjs +282 -0
- package/dist/chunk-OXQKE5EG.cjs.map +1 -0
- package/dist/chunk-P6E4QDJN.js +30 -0
- package/dist/chunk-P6E4QDJN.js.map +1 -0
- package/dist/chunk-PEMLIAPZ.cjs +64 -0
- package/dist/chunk-PEMLIAPZ.cjs.map +1 -0
- package/dist/chunk-PGYQ754I.js +3 -0
- package/dist/chunk-PGYQ754I.js.map +1 -0
- package/dist/chunk-PHKYIWE4.cjs +16 -0
- package/dist/chunk-PHKYIWE4.cjs.map +1 -0
- package/dist/chunk-PMTM26LL.js +3 -0
- package/dist/chunk-PMTM26LL.js.map +1 -0
- package/dist/chunk-PY4OEKNX.cjs +4 -0
- package/dist/chunk-PY4OEKNX.cjs.map +1 -0
- package/dist/chunk-PZS2EXDR.cjs +4 -0
- package/dist/chunk-PZS2EXDR.cjs.map +1 -0
- package/dist/chunk-QITJGSFA.js +210 -0
- package/dist/chunk-QITJGSFA.js.map +1 -0
- package/dist/chunk-QRHJEITQ.cjs +4 -0
- package/dist/chunk-QRHJEITQ.cjs.map +1 -0
- package/dist/chunk-QUFU5RJ7.cjs +4 -0
- package/dist/chunk-QUFU5RJ7.cjs.map +1 -0
- package/dist/chunk-QVQCKOBM.js +3 -0
- package/dist/chunk-QVQCKOBM.js.map +1 -0
- package/dist/chunk-R63TTR35.cjs +200 -0
- package/dist/chunk-R63TTR35.cjs.map +1 -0
- package/dist/chunk-RA42NMWV.cjs +4 -0
- package/dist/chunk-RA42NMWV.cjs.map +1 -0
- package/dist/chunk-RAZN6C5R.cjs +12 -0
- package/dist/chunk-RAZN6C5R.cjs.map +1 -0
- package/dist/chunk-REUFPWM7.cjs +233 -0
- package/dist/chunk-REUFPWM7.cjs.map +1 -0
- package/dist/chunk-RHETJOUM.cjs +4 -0
- package/dist/chunk-RHETJOUM.cjs.map +1 -0
- package/dist/chunk-RJIJVVXS.js +3 -0
- package/dist/chunk-RJIJVVXS.js.map +1 -0
- package/dist/chunk-RKVRCNMB.js +3 -0
- package/dist/chunk-RKVRCNMB.js.map +1 -0
- package/dist/chunk-SBV5MWEL.cjs +53 -0
- package/dist/chunk-SBV5MWEL.cjs.map +1 -0
- package/dist/chunk-SFB4YLCS.js +121 -0
- package/dist/chunk-SFB4YLCS.js.map +1 -0
- package/dist/chunk-SLPD47SR.js +3 -0
- package/dist/chunk-SLPD47SR.js.map +1 -0
- package/dist/chunk-SS3B6PHT.cjs +35 -0
- package/dist/chunk-SS3B6PHT.cjs.map +1 -0
- package/dist/chunk-SUCHGNYT.js +3 -0
- package/dist/chunk-SUCHGNYT.js.map +1 -0
- package/dist/chunk-SYVNY3AH.cjs +44 -0
- package/dist/chunk-SYVNY3AH.cjs.map +1 -0
- package/dist/chunk-T3SYREY4.js +29 -0
- package/dist/chunk-T3SYREY4.js.map +1 -0
- package/dist/chunk-T7N7DFQJ.js +198 -0
- package/dist/chunk-T7N7DFQJ.js.map +1 -0
- package/dist/chunk-TRCENAIY.cjs +4 -0
- package/dist/chunk-TRCENAIY.cjs.map +1 -0
- package/dist/chunk-TVENC6PH.js +186 -0
- package/dist/chunk-TVENC6PH.js.map +1 -0
- package/dist/chunk-U4T3Z3K7.cjs +325 -0
- package/dist/chunk-U4T3Z3K7.cjs.map +1 -0
- package/dist/chunk-UI2NXUML.cjs +187 -0
- package/dist/chunk-UI2NXUML.cjs.map +1 -0
- package/dist/chunk-UIFFNTUX.js +3 -0
- package/dist/chunk-UIFFNTUX.js.map +1 -0
- package/dist/chunk-V4GPQ6Y2.js +3 -0
- package/dist/chunk-V4GPQ6Y2.js.map +1 -0
- package/dist/chunk-VGTRKXF2.js +93 -0
- package/dist/chunk-VGTRKXF2.js.map +1 -0
- package/dist/chunk-VGWOIWRQ.cjs +202 -0
- package/dist/chunk-VGWOIWRQ.cjs.map +1 -0
- package/dist/chunk-VLCNNA76.cjs +4 -0
- package/dist/chunk-VLCNNA76.cjs.map +1 -0
- package/dist/chunk-VPAUN75Q.js +3 -0
- package/dist/chunk-VPAUN75Q.js.map +1 -0
- package/dist/chunk-VT237QF2.js +3 -0
- package/dist/chunk-VT237QF2.js.map +1 -0
- package/dist/chunk-VV4TZG5S.js +321 -0
- package/dist/chunk-VV4TZG5S.js.map +1 -0
- package/dist/chunk-VYK6MBL4.cjs +4 -0
- package/dist/chunk-VYK6MBL4.cjs.map +1 -0
- package/dist/chunk-W33CKW6Q.cjs +4 -0
- package/dist/chunk-W33CKW6Q.cjs.map +1 -0
- package/dist/chunk-W5VHATSR.cjs +31 -0
- package/dist/chunk-W5VHATSR.cjs.map +1 -0
- package/dist/chunk-W7YI5UT3.js +3 -0
- package/dist/chunk-W7YI5UT3.js.map +1 -0
- package/dist/chunk-WEQWU2IC.js +34 -0
- package/dist/chunk-WEQWU2IC.js.map +1 -0
- package/dist/chunk-WK4VXPPZ.cjs +104 -0
- package/dist/chunk-WK4VXPPZ.cjs.map +1 -0
- package/dist/chunk-WSA4LMWR.cjs +96 -0
- package/dist/chunk-WSA4LMWR.cjs.map +1 -0
- package/dist/chunk-WUIEZ6Z4.cjs +360 -0
- package/dist/chunk-WUIEZ6Z4.cjs.map +1 -0
- package/dist/chunk-WUKIJJG2.cjs +45 -0
- package/dist/chunk-WUKIJJG2.cjs.map +1 -0
- package/dist/chunk-WVFAQBS7.js +29 -0
- package/dist/chunk-WVFAQBS7.js.map +1 -0
- package/dist/chunk-X7RDNMN7.js +3 -0
- package/dist/chunk-X7RDNMN7.js.map +1 -0
- package/dist/chunk-X7XP5WBP.cjs +4 -0
- package/dist/chunk-X7XP5WBP.cjs.map +1 -0
- package/dist/chunk-XQAIEPAZ.js +104 -0
- package/dist/chunk-XQAIEPAZ.js.map +1 -0
- package/dist/chunk-XWKNE6DH.cjs +4 -0
- package/dist/chunk-XWKNE6DH.cjs.map +1 -0
- package/dist/chunk-Y6V6CBY5.js +23 -0
- package/dist/chunk-Y6V6CBY5.js.map +1 -0
- package/dist/chunk-Y6VDCZPB.js +62 -0
- package/dist/chunk-Y6VDCZPB.js.map +1 -0
- package/dist/chunk-YDRXBRW2.cjs +184 -0
- package/dist/chunk-YDRXBRW2.cjs.map +1 -0
- package/dist/chunk-YFS2LMG4.cjs +124 -0
- package/dist/chunk-YFS2LMG4.cjs.map +1 -0
- package/dist/chunk-YN6CBIIB.js +63 -0
- package/dist/chunk-YN6CBIIB.js.map +1 -0
- package/dist/chunk-YOJ2XNQX.cjs +4 -0
- package/dist/chunk-YOJ2XNQX.cjs.map +1 -0
- package/dist/chunk-YOOZB4RL.js +3 -0
- package/dist/chunk-YOOZB4RL.js.map +1 -0
- package/dist/chunk-YVU2M7MI.js +34 -0
- package/dist/chunk-YVU2M7MI.js.map +1 -0
- package/dist/chunk-YXBZRB5H.cjs +4 -0
- package/dist/chunk-YXBZRB5H.cjs.map +1 -0
- package/dist/chunk-Z3ZKFI2M.js +43 -0
- package/dist/chunk-Z3ZKFI2M.js.map +1 -0
- package/dist/chunk-Z5GLY4R3.js +112 -0
- package/dist/chunk-Z5GLY4R3.js.map +1 -0
- package/dist/chunk-Z5OMWAQX.js +3 -0
- package/dist/chunk-Z5OMWAQX.js.map +1 -0
- package/dist/chunk-Z7LGWNI7.js +38 -0
- package/dist/chunk-Z7LGWNI7.js.map +1 -0
- package/dist/chunk-ZCWKX4V6.cjs +38 -0
- package/dist/chunk-ZCWKX4V6.cjs.map +1 -0
- package/dist/chunk-ZE5RISBZ.cjs +4 -0
- package/dist/chunk-ZE5RISBZ.cjs.map +1 -0
- package/dist/chunk-ZH4F2P2G.js +3 -0
- package/dist/chunk-ZH4F2P2G.js.map +1 -0
- package/dist/chunk-ZJGFLJ2Z.cjs +4 -0
- package/dist/chunk-ZJGFLJ2Z.cjs.map +1 -0
- package/dist/chunk-ZKBHD27K.cjs +4 -0
- package/dist/chunk-ZKBHD27K.cjs.map +1 -0
- package/dist/chunk-ZQPLRNKX.cjs +4 -0
- package/dist/chunk-ZQPLRNKX.cjs.map +1 -0
- package/dist/chunk-ZQQABQMH.cjs +31 -0
- package/dist/chunk-ZQQABQMH.cjs.map +1 -0
- package/dist/chunk-ZXJQSFIA.js +200 -0
- package/dist/chunk-ZXJQSFIA.js.map +1 -0
- package/dist/developer-apps-zSQXWmEG.d.cts +294 -0
- package/dist/developer-apps-zSQXWmEG.d.ts +294 -0
- package/dist/entries/apps.cjs +13 -0
- package/dist/entries/apps.cjs.map +1 -0
- package/dist/entries/apps.d.cts +300 -0
- package/dist/entries/apps.d.ts +300 -0
- package/dist/entries/apps.js +4 -0
- package/dist/entries/apps.js.map +1 -0
- package/dist/entries/audio.cjs +13 -0
- package/dist/entries/audio.cjs.map +1 -0
- package/dist/entries/audio.d.cts +200 -0
- package/dist/entries/audio.d.ts +200 -0
- package/dist/entries/audio.js +4 -0
- package/dist/entries/audio.js.map +1 -0
- package/dist/entries/billing.cjs +13 -0
- package/dist/entries/billing.cjs.map +1 -0
- package/dist/entries/billing.d.cts +208 -0
- package/dist/entries/billing.d.ts +208 -0
- package/dist/entries/billing.js +4 -0
- package/dist/entries/billing.js.map +1 -0
- package/dist/entries/catalogs.cjs +13 -0
- package/dist/entries/catalogs.cjs.map +1 -0
- package/dist/entries/catalogs.d.cts +82 -0
- package/dist/entries/catalogs.d.ts +82 -0
- package/dist/entries/catalogs.js +4 -0
- package/dist/entries/catalogs.js.map +1 -0
- package/dist/entries/characters.cjs +45 -0
- package/dist/entries/characters.cjs.map +1 -0
- package/dist/entries/characters.d.cts +741 -0
- package/dist/entries/characters.d.ts +741 -0
- package/dist/entries/characters.js +4 -0
- package/dist/entries/characters.js.map +1 -0
- package/dist/entries/client.cjs +78 -0
- package/dist/entries/client.cjs.map +1 -0
- package/dist/entries/client.d.cts +147 -0
- package/dist/entries/client.d.ts +147 -0
- package/dist/entries/client.js +53 -0
- package/dist/entries/client.js.map +1 -0
- package/dist/entries/collections.cjs +13 -0
- package/dist/entries/collections.cjs.map +1 -0
- package/dist/entries/collections.d.cts +77 -0
- package/dist/entries/collections.d.ts +77 -0
- package/dist/entries/collections.js +4 -0
- package/dist/entries/collections.js.map +1 -0
- package/dist/entries/community.cjs +13 -0
- package/dist/entries/community.cjs.map +1 -0
- package/dist/entries/community.d.cts +87 -0
- package/dist/entries/community.d.ts +87 -0
- package/dist/entries/community.js +4 -0
- package/dist/entries/community.js.map +1 -0
- package/dist/entries/competitors.cjs +13 -0
- package/dist/entries/competitors.cjs.map +1 -0
- package/dist/entries/competitors.d.cts +96 -0
- package/dist/entries/competitors.d.ts +96 -0
- package/dist/entries/competitors.js +4 -0
- package/dist/entries/competitors.js.map +1 -0
- package/dist/entries/copilot.cjs +15 -0
- package/dist/entries/copilot.cjs.map +1 -0
- package/dist/entries/copilot.d.cts +296 -0
- package/dist/entries/copilot.d.ts +296 -0
- package/dist/entries/copilot.js +6 -0
- package/dist/entries/copilot.js.map +1 -0
- package/dist/entries/core.cjs +26 -0
- package/dist/entries/core.cjs.map +1 -0
- package/dist/entries/core.d.cts +3 -0
- package/dist/entries/core.d.ts +3 -0
- package/dist/entries/core.js +5 -0
- package/dist/entries/core.js.map +1 -0
- package/dist/entries/creatures.cjs +29 -0
- package/dist/entries/creatures.cjs.map +1 -0
- package/dist/entries/creatures.d.cts +594 -0
- package/dist/entries/creatures.d.ts +594 -0
- package/dist/entries/creatures.js +4 -0
- package/dist/entries/creatures.js.map +1 -0
- package/dist/entries/credits.cjs +13 -0
- package/dist/entries/credits.cjs.map +1 -0
- package/dist/entries/credits.d.cts +229 -0
- package/dist/entries/credits.d.ts +229 -0
- package/dist/entries/credits.js +4 -0
- package/dist/entries/credits.js.map +1 -0
- package/dist/entries/developer-apps.cjs +13 -0
- package/dist/entries/developer-apps.cjs.map +1 -0
- package/dist/entries/developer-apps.d.cts +3 -0
- package/dist/entries/developer-apps.d.ts +3 -0
- package/dist/entries/developer-apps.js +4 -0
- package/dist/entries/developer-apps.js.map +1 -0
- package/dist/entries/edit.cjs +34 -0
- package/dist/entries/edit.cjs.map +1 -0
- package/dist/entries/edit.d.cts +705 -0
- package/dist/entries/edit.d.ts +705 -0
- package/dist/entries/edit.js +5 -0
- package/dist/entries/edit.js.map +1 -0
- package/dist/entries/errors.cjs +93 -0
- package/dist/entries/errors.cjs.map +1 -0
- package/dist/entries/errors.d.cts +338 -0
- package/dist/entries/errors.d.ts +338 -0
- package/dist/entries/errors.js +4 -0
- package/dist/entries/errors.js.map +1 -0
- package/dist/entries/executions.cjs +21 -0
- package/dist/entries/executions.cjs.map +1 -0
- package/dist/entries/executions.d.cts +120 -0
- package/dist/entries/executions.d.ts +120 -0
- package/dist/entries/executions.js +4 -0
- package/dist/entries/executions.js.map +1 -0
- package/dist/entries/gallery.cjs +13 -0
- package/dist/entries/gallery.cjs.map +1 -0
- package/dist/entries/gallery.d.cts +85 -0
- package/dist/entries/gallery.d.ts +85 -0
- package/dist/entries/gallery.js +4 -0
- package/dist/entries/gallery.js.map +1 -0
- package/dist/entries/jobs.cjs +13 -0
- package/dist/entries/jobs.cjs.map +1 -0
- package/dist/entries/jobs.d.cts +252 -0
- package/dist/entries/jobs.d.ts +252 -0
- package/dist/entries/jobs.js +4 -0
- package/dist/entries/jobs.js.map +1 -0
- package/dist/entries/library.cjs +13 -0
- package/dist/entries/library.cjs.map +1 -0
- package/dist/entries/library.d.cts +109 -0
- package/dist/entries/library.d.ts +109 -0
- package/dist/entries/library.js +4 -0
- package/dist/entries/library.js.map +1 -0
- package/dist/entries/llm.cjs +13 -0
- package/dist/entries/llm.cjs.map +1 -0
- package/dist/entries/llm.d.cts +98 -0
- package/dist/entries/llm.d.ts +98 -0
- package/dist/entries/llm.js +4 -0
- package/dist/entries/llm.js.map +1 -0
- package/dist/entries/locations.cjs +25 -0
- package/dist/entries/locations.cjs.map +1 -0
- package/dist/entries/locations.d.cts +573 -0
- package/dist/entries/locations.d.ts +573 -0
- package/dist/entries/locations.js +4 -0
- package/dist/entries/locations.js.map +1 -0
- package/dist/entries/media.cjs +15 -0
- package/dist/entries/media.cjs.map +1 -0
- package/dist/entries/media.d.cts +548 -0
- package/dist/entries/media.d.ts +548 -0
- package/dist/entries/media.js +6 -0
- package/dist/entries/media.js.map +1 -0
- package/dist/entries/models.cjs +13 -0
- package/dist/entries/models.cjs.map +1 -0
- package/dist/entries/models.d.cts +92 -0
- package/dist/entries/models.d.ts +92 -0
- package/dist/entries/models.js +4 -0
- package/dist/entries/models.js.map +1 -0
- package/dist/entries/moodboards.cjs +21 -0
- package/dist/entries/moodboards.cjs.map +1 -0
- package/dist/entries/moodboards.d.cts +77 -0
- package/dist/entries/moodboards.d.ts +77 -0
- package/dist/entries/moodboards.js +4 -0
- package/dist/entries/moodboards.js.map +1 -0
- package/dist/entries/node-presets.cjs +13 -0
- package/dist/entries/node-presets.cjs.map +1 -0
- package/dist/entries/node-presets.d.cts +217 -0
- package/dist/entries/node-presets.d.ts +217 -0
- package/dist/entries/node-presets.js +4 -0
- package/dist/entries/node-presets.js.map +1 -0
- package/dist/entries/nodes.cjs +22 -0
- package/dist/entries/nodes.cjs.map +1 -0
- package/dist/entries/nodes.d.cts +18 -0
- package/dist/entries/nodes.d.ts +18 -0
- package/dist/entries/nodes.js +5 -0
- package/dist/entries/nodes.js.map +1 -0
- package/dist/entries/oauth.cjs +13 -0
- package/dist/entries/oauth.cjs.map +1 -0
- package/dist/entries/oauth.d.cts +69 -0
- package/dist/entries/oauth.d.ts +69 -0
- package/dist/entries/oauth.js +4 -0
- package/dist/entries/oauth.js.map +1 -0
- package/dist/entries/objects.cjs +29 -0
- package/dist/entries/objects.cjs.map +1 -0
- package/dist/entries/objects.d.cts +544 -0
- package/dist/entries/objects.d.ts +544 -0
- package/dist/entries/objects.js +4 -0
- package/dist/entries/objects.js.map +1 -0
- package/dist/entries/organizations.cjs +21 -0
- package/dist/entries/organizations.cjs.map +1 -0
- package/dist/entries/organizations.d.cts +164 -0
- package/dist/entries/organizations.d.ts +164 -0
- package/dist/entries/organizations.js +4 -0
- package/dist/entries/organizations.js.map +1 -0
- package/dist/entries/palettes.cjs +21 -0
- package/dist/entries/palettes.cjs.map +1 -0
- package/dist/entries/palettes.d.cts +69 -0
- package/dist/entries/palettes.d.ts +69 -0
- package/dist/entries/palettes.js +4 -0
- package/dist/entries/palettes.js.map +1 -0
- package/dist/entries/picker-catalogs.cjs +13 -0
- package/dist/entries/picker-catalogs.cjs.map +1 -0
- package/dist/entries/picker-catalogs.d.cts +148 -0
- package/dist/entries/picker-catalogs.d.ts +148 -0
- package/dist/entries/picker-catalogs.js +4 -0
- package/dist/entries/picker-catalogs.js.map +1 -0
- package/dist/entries/pipelines.cjs +13 -0
- package/dist/entries/pipelines.cjs.map +1 -0
- package/dist/entries/pipelines.d.cts +255 -0
- package/dist/entries/pipelines.d.ts +255 -0
- package/dist/entries/pipelines.js +4 -0
- package/dist/entries/pipelines.js.map +1 -0
- package/dist/entries/projects.cjs +13 -0
- package/dist/entries/projects.cjs.map +1 -0
- package/dist/entries/projects.d.cts +49 -0
- package/dist/entries/projects.d.ts +49 -0
- package/dist/entries/projects.js +4 -0
- package/dist/entries/projects.js.map +1 -0
- package/dist/entries/prompt-helper.cjs +13 -0
- package/dist/entries/prompt-helper.cjs.map +1 -0
- package/dist/entries/prompt-helper.d.cts +73 -0
- package/dist/entries/prompt-helper.d.ts +73 -0
- package/dist/entries/prompt-helper.js +4 -0
- package/dist/entries/prompt-helper.js.map +1 -0
- package/dist/entries/recast.cjs +17 -0
- package/dist/entries/recast.cjs.map +1 -0
- package/dist/entries/recast.d.cts +229 -0
- package/dist/entries/recast.d.ts +229 -0
- package/dist/entries/recast.js +4 -0
- package/dist/entries/recast.js.map +1 -0
- package/dist/entries/reduce.cjs +13 -0
- package/dist/entries/reduce.cjs.map +1 -0
- package/dist/entries/reduce.d.cts +56 -0
- package/dist/entries/reduce.d.ts +56 -0
- package/dist/entries/reduce.js +4 -0
- package/dist/entries/reduce.js.map +1 -0
- package/dist/entries/saved-posts.cjs +13 -0
- package/dist/entries/saved-posts.cjs.map +1 -0
- package/dist/entries/saved-posts.d.cts +33 -0
- package/dist/entries/saved-posts.d.ts +33 -0
- package/dist/entries/saved-posts.js +4 -0
- package/dist/entries/saved-posts.js.map +1 -0
- package/dist/entries/scene3d.cjs +17 -0
- package/dist/entries/scene3d.cjs.map +1 -0
- package/dist/entries/scene3d.d.cts +131 -0
- package/dist/entries/scene3d.d.ts +131 -0
- package/dist/entries/scene3d.js +4 -0
- package/dist/entries/scene3d.js.map +1 -0
- package/dist/entries/sessions.cjs +13 -0
- package/dist/entries/sessions.cjs.map +1 -0
- package/dist/entries/sessions.d.cts +122 -0
- package/dist/entries/sessions.d.ts +122 -0
- package/dist/entries/sessions.js +4 -0
- package/dist/entries/sessions.js.map +1 -0
- package/dist/entries/shots.cjs +13 -0
- package/dist/entries/shots.cjs.map +1 -0
- package/dist/entries/shots.d.cts +78 -0
- package/dist/entries/shots.d.ts +78 -0
- package/dist/entries/shots.js +4 -0
- package/dist/entries/shots.js.map +1 -0
- package/dist/entries/studio.cjs +22 -0
- package/dist/entries/studio.cjs.map +1 -0
- package/dist/entries/studio.d.cts +281 -0
- package/dist/entries/studio.d.ts +281 -0
- package/dist/entries/studio.js +5 -0
- package/dist/entries/studio.js.map +1 -0
- package/dist/entries/templates.cjs +13 -0
- package/dist/entries/templates.cjs.map +1 -0
- package/dist/entries/templates.d.cts +110 -0
- package/dist/entries/templates.d.ts +110 -0
- package/dist/entries/templates.js +4 -0
- package/dist/entries/templates.js.map +1 -0
- package/dist/entries/tutorials.cjs +13 -0
- package/dist/entries/tutorials.cjs.map +1 -0
- package/dist/entries/tutorials.d.cts +63 -0
- package/dist/entries/tutorials.d.ts +63 -0
- package/dist/entries/tutorials.js +4 -0
- package/dist/entries/tutorials.js.map +1 -0
- package/dist/entries/uploads.cjs +13 -0
- package/dist/entries/uploads.cjs.map +1 -0
- package/dist/entries/uploads.d.cts +44 -0
- package/dist/entries/uploads.d.ts +44 -0
- package/dist/entries/uploads.js +4 -0
- package/dist/entries/uploads.js.map +1 -0
- package/dist/entries/video-pro.cjs +13 -0
- package/dist/entries/video-pro.cjs.map +1 -0
- package/dist/entries/video-pro.d.cts +60 -0
- package/dist/entries/video-pro.d.ts +60 -0
- package/dist/entries/video-pro.js +4 -0
- package/dist/entries/video-pro.js.map +1 -0
- package/dist/entries/voices.cjs +13 -0
- package/dist/entries/voices.cjs.map +1 -0
- package/dist/entries/voices.d.cts +498 -0
- package/dist/entries/voices.d.ts +498 -0
- package/dist/entries/voices.js +4 -0
- package/dist/entries/voices.js.map +1 -0
- package/dist/entries/webhooks.cjs +21 -0
- package/dist/entries/webhooks.cjs.map +1 -0
- package/dist/entries/webhooks.d.cts +64 -0
- package/dist/entries/webhooks.d.ts +64 -0
- package/dist/entries/webhooks.js +4 -0
- package/dist/entries/webhooks.js.map +1 -0
- package/dist/entries/workflows.cjs +13 -0
- package/dist/entries/workflows.cjs.map +1 -0
- package/dist/entries/workflows.d.cts +393 -0
- package/dist/entries/workflows.d.ts +393 -0
- package/dist/entries/workflows.js +4 -0
- package/dist/entries/workflows.js.map +1 -0
- package/dist/entries/workspaces.cjs +13 -0
- package/dist/entries/workspaces.cjs.map +1 -0
- package/dist/entries/workspaces.d.cts +124 -0
- package/dist/entries/workspaces.d.ts +124 -0
- package/dist/entries/workspaces.js +4 -0
- package/dist/entries/workspaces.js.map +1 -0
- package/dist/index.cjs +501 -5192
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +66 -10894
- package/dist/index.d.ts +66 -10894
- package/dist/index.js +100 -5074
- package/dist/index.js.map +1 -1
- package/dist/nodes-BPvrAoUs.d.cts +1264 -0
- package/dist/nodes-C2zu3uqn.d.ts +1264 -0
- package/dist/studio-productions-DUHvdSvk.d.cts +572 -0
- package/dist/studio-productions-vbCNSbtf.d.ts +572 -0
- package/dist/webhooks-BJawEIz8.d.ts +198 -0
- package/dist/webhooks-Dn_DtNTD.d.cts +198 -0
- package/package.json +253 -3
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// src/resources/pipelines.ts
|
|
4
|
+
var PipelinesResource = class {
|
|
5
|
+
constructor(client) {
|
|
6
|
+
this.client = client;
|
|
7
|
+
}
|
|
8
|
+
client;
|
|
9
|
+
/**
|
|
10
|
+
* Start a new pipeline (headless film generation) — the programmatic
|
|
11
|
+
* equivalent of the studio's "Create film". In Auto mode the engine
|
|
12
|
+
* self-advances to completion; poll {@link get} for status and
|
|
13
|
+
* {@link getTimeline} for the assembled output. In manual/guided mode, drive
|
|
14
|
+
* it with {@link pendingApprovals} + {@link approveStage} /
|
|
15
|
+
* {@link approveSubGate} / {@link acceptMatchCutBreak}.
|
|
16
|
+
*
|
|
17
|
+
* Requires `pipelines:execute` scope. Returns the new pipeline id.
|
|
18
|
+
*/
|
|
19
|
+
create(input) {
|
|
20
|
+
return this.client.request("POST", "/v1/pipelines", { body: input });
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Fetch current pipeline state: `status`, `current_stage`, credit counters,
|
|
24
|
+
* `mode`, and `failure_reason` (set when `status='failed'`). Poll this to
|
|
25
|
+
* track a headless Auto run to completion. Requires `pipelines:read`.
|
|
26
|
+
*/
|
|
27
|
+
get(id) {
|
|
28
|
+
return this.client.request(
|
|
29
|
+
"GET",
|
|
30
|
+
`/v1/pipelines/${encodeURIComponent(id)}`
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
/** List the caller's pipelines (most recent first). Requires `pipelines:read`. */
|
|
34
|
+
list() {
|
|
35
|
+
return this.client.request("GET", "/v1/pipelines");
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Cancel a running pipeline. Unspent reserved credits refund. Idempotent on
|
|
39
|
+
* an already-terminal pipeline. Requires `pipelines:execute`.
|
|
40
|
+
*/
|
|
41
|
+
cancel(id) {
|
|
42
|
+
return this.client.request(
|
|
43
|
+
"POST",
|
|
44
|
+
`/v1/pipelines/${encodeURIComponent(id)}/cancel`,
|
|
45
|
+
{ body: {} }
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Stages currently `awaiting_approval`. Empty in a clean Auto run (the engine
|
|
50
|
+
* self-approves); populated in manual/guided mode at each gate. Requires
|
|
51
|
+
* `pipelines:read`.
|
|
52
|
+
*/
|
|
53
|
+
pendingApprovals(id) {
|
|
54
|
+
return this.client.request(
|
|
55
|
+
"GET",
|
|
56
|
+
`/v1/pipelines/${encodeURIComponent(id)}/pending-approvals`
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Approve a stage so the engine advances to the next one. An optional `edits`
|
|
61
|
+
* JSON-Patch is applied to the stage output before approval. Requires
|
|
62
|
+
* `pipelines:approve`.
|
|
63
|
+
*/
|
|
64
|
+
approveStage(id, stage, edits) {
|
|
65
|
+
return this.client.request(
|
|
66
|
+
"POST",
|
|
67
|
+
`/v1/pipelines/${encodeURIComponent(id)}/stages/${encodeURIComponent(stage)}/approve`,
|
|
68
|
+
{ body: edits ? { edits } : {} }
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Reject a stage with feedback; the engine re-runs it incorporating the note.
|
|
73
|
+
* Requires `pipelines:approve`.
|
|
74
|
+
*/
|
|
75
|
+
rejectStage(id, stage, feedback) {
|
|
76
|
+
return this.client.request(
|
|
77
|
+
"POST",
|
|
78
|
+
`/v1/pipelines/${encodeURIComponent(id)}/stages/${encodeURIComponent(stage)}/reject`,
|
|
79
|
+
{ body: { feedback } }
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Approve a Stage 7 (`animate_audio_edit`) sub-gate — `silent_cut_preview`
|
|
84
|
+
* or `dialogue_recheck` — so the orchestrator resumes from the next
|
|
85
|
+
* sub-step. Stage 6's `match_cut_break_pending` is not approved here: accept
|
|
86
|
+
* each break with {@link acceptMatchCutBreak}. Requires `pipelines:approve`.
|
|
87
|
+
*/
|
|
88
|
+
approveSubGate(id, gate) {
|
|
89
|
+
return this.client.request(
|
|
90
|
+
"POST",
|
|
91
|
+
`/v1/pipelines/${encodeURIComponent(id)}/sub-gates/${encodeURIComponent(gate)}/approve`,
|
|
92
|
+
{ body: {} }
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Accept one match-cut break Stage 6 (`scene_images`) flagged. While any
|
|
97
|
+
* break is pending, the stage pauses at the `match_cut_break_pending`
|
|
98
|
+
* sub-gate, and its output lists the pending shot ids; accepting the last
|
|
99
|
+
* one resumes the stage. `sceneId` is the scene entity that holds the shot.
|
|
100
|
+
* Requires `pipelines:approve`.
|
|
101
|
+
*/
|
|
102
|
+
acceptMatchCutBreak(id, sceneId, shotId) {
|
|
103
|
+
return this.client.request(
|
|
104
|
+
"POST",
|
|
105
|
+
`/v1/pipelines/${encodeURIComponent(id)}/entities/${encodeURIComponent(sceneId)}/helpers/accept_match_cut_break`,
|
|
106
|
+
{ body: { shotId } }
|
|
107
|
+
);
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Read a single stage's `status`, `output`, and `critic_feedback`. Useful for
|
|
111
|
+
* inspecting the script/plan before approving. Requires `pipelines:read`.
|
|
112
|
+
*/
|
|
113
|
+
getStage(id, stage) {
|
|
114
|
+
return this.client.request(
|
|
115
|
+
"GET",
|
|
116
|
+
`/v1/pipelines/${encodeURIComponent(id)}/stages/${encodeURIComponent(stage)}`
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Assembled timeline — ordered scene composites + durations + audio URLs +
|
|
121
|
+
* live animate progress. The output a headless caller renders or hands to a
|
|
122
|
+
* downstream editor. Requires `pipelines:read`.
|
|
123
|
+
*/
|
|
124
|
+
getTimeline(id) {
|
|
125
|
+
return this.client.request(
|
|
126
|
+
"GET",
|
|
127
|
+
`/v1/pipelines/${encodeURIComponent(id)}/timeline`
|
|
128
|
+
);
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Branch a completed pipeline into a new pipeline that re-runs from the
|
|
132
|
+
* given stage. The original pipeline's upstream stages and entities are
|
|
133
|
+
* cloned into the new pipeline; downstream stages are created by the
|
|
134
|
+
* orchestrator as it advances.
|
|
135
|
+
*
|
|
136
|
+
* Requires `pipelines:execute` scope.
|
|
137
|
+
* The source pipeline must have `status='completed'`.
|
|
138
|
+
*
|
|
139
|
+
* @returns 201 with `{ pipelineId, clonedStages, clonedEntities }`.
|
|
140
|
+
*/
|
|
141
|
+
branch(id, input) {
|
|
142
|
+
return this.client.request(
|
|
143
|
+
"POST",
|
|
144
|
+
`/v1/pipelines/${encodeURIComponent(id)}/branch`,
|
|
145
|
+
{ body: input }
|
|
146
|
+
);
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Send a chat message to the Showrunner Refinement Director (Guided Mode).
|
|
150
|
+
* Persists user + assistant turns; returns the assistant's reply and an
|
|
151
|
+
* optional `proposed_change` the user can `applyChatProposal` to commit.
|
|
152
|
+
*
|
|
153
|
+
* Requires `pipelines:approve` scope. The pipeline must have
|
|
154
|
+
* `mode='guided'` and the stage must be `awaiting_approval`.
|
|
155
|
+
*
|
|
156
|
+
* Only the Script stage ships a wired specialist in Phase 1D.2b — the other
|
|
157
|
+
* chat-enabled stages (`shot_list`, `post_merge`) return 501 until 1D.2d.
|
|
158
|
+
*/
|
|
159
|
+
chatStage(pipelineId, stage, message) {
|
|
160
|
+
return this.client.request(
|
|
161
|
+
"POST",
|
|
162
|
+
`/v1/pipelines/${encodeURIComponent(pipelineId)}/stages/${encodeURIComponent(stage)}/chat`,
|
|
163
|
+
{ body: { message } }
|
|
164
|
+
);
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Accept a proposed change from a prior assistant turn. Routes through
|
|
168
|
+
* `applyStageEdit` (validates JSON Patch + per-stage schema +
|
|
169
|
+
* reference-integrity, inserts a new pipeline_stage_attempts row, CAS-flips
|
|
170
|
+
* the stage to approved, emits `chat:proposal_applied` SSE).
|
|
171
|
+
*
|
|
172
|
+
* Requires `pipelines:approve` scope.
|
|
173
|
+
*
|
|
174
|
+
* Returns `{ applied: true, attemptId, newOutput }` on success, or
|
|
175
|
+
* `{ applied: false, error }` on recoverable failures (the backend already
|
|
176
|
+
* inserted a follow-up assistant turn with a hint). Hard failures
|
|
177
|
+
* (`patch_invalid`, `stage_not_awaiting`) throw via the standard error
|
|
178
|
+
* pipeline (HTTP 409).
|
|
179
|
+
*/
|
|
180
|
+
applyChatProposal(pipelineId, stage, turnId) {
|
|
181
|
+
return this.client.request(
|
|
182
|
+
"POST",
|
|
183
|
+
`/v1/pipelines/${encodeURIComponent(pipelineId)}/stages/${encodeURIComponent(stage)}/chat/turns/${encodeURIComponent(turnId)}/apply`,
|
|
184
|
+
{ body: {} }
|
|
185
|
+
);
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* Fetch the chat history for a stage. Returns an empty array when no turns
|
|
189
|
+
* exist yet (e.g., stage has not been started or the user hasn't sent any
|
|
190
|
+
* messages). Used by the frontend chat panel on initial mount; subsequent
|
|
191
|
+
* updates arrive via SSE (`chat:turn` events).
|
|
192
|
+
*
|
|
193
|
+
* Requires `pipelines:read` scope.
|
|
194
|
+
*/
|
|
195
|
+
getStageChat(pipelineId, stage) {
|
|
196
|
+
return this.client.request(
|
|
197
|
+
"GET",
|
|
198
|
+
`/v1/pipelines/${encodeURIComponent(pipelineId)}/stages/${encodeURIComponent(stage)}/chat`
|
|
199
|
+
);
|
|
200
|
+
}
|
|
201
|
+
};
|
|
202
|
+
|
|
203
|
+
exports.PipelinesResource = PipelinesResource;
|
|
204
|
+
//# sourceMappingURL=chunk-COCKKMNP.cjs.map
|
|
205
|
+
//# sourceMappingURL=chunk-COCKKMNP.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/resources/pipelines.ts"],"names":[],"mappings":";;;AAsHO,IAAM,oBAAN,MAAwB;AAAA,EAC7B,YAAoB,MAAA,EAA0B;AAA1B,IAAA,IAAA,CAAA,MAAA,GAAA,MAAA;AAAA,EAA2B;AAAA,EAA3B,MAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA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,CAAC,CAAA,YAAA,EAAe,kBAAA,CAAmB,MAAM,CAAC,CAAA,MAAA,CAAA;AAAA,MAC5H,EAAE,IAAA,EAAM,EAAC;AAAE,KACb;AAAA,EACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUA,YAAA,CACE,YACA,KAAA,EACgC;AAChC,IAAA,OAAO,KAAK,MAAA,CAAO,OAAA;AAAA,MACjB,KAAA;AAAA,MACA,iBAAiB,kBAAA,CAAmB,UAAU,CAAC,CAAA,QAAA,EAAW,kBAAA,CAAmB,KAAK,CAAC,CAAA,KAAA;AAAA,KACrF;AAAA,EACF;AACF","file":"chunk-COCKKMNP.cjs","sourcesContent":["import type { NodaroClientCore } from \"../core.js\"\nimport type { PipelineInput, PipelineStageName, PipelineStatus, PipelineMode, SubGateName, AnimateSubGate, ChatEnabledStage, ProposedChange } from \"@nodaro/shared/pipeline\"\n\nexport type {\n PipelineInput,\n PipelineStageName,\n PipelineStatus,\n PipelineMode,\n SubGateName,\n AnimateSubGate,\n ChatEnabledStage,\n ProposedChange,\n}\n\n/**\n * Owner-scoped pipeline record returned by `get` / `list` (the server strips\n * `user_id`). Mirrors the public field set of `GET /v1/pipelines/:id`.\n */\nexport interface PipelineRecord {\n id: string\n status: PipelineStatus\n current_stage: string | null\n spent_credits: number\n reserved_credits: number\n upfront_credit_estimate: number\n branched_from_pipeline_id: string | null\n branched_from_stage: string | null\n mode: PipelineMode | null\n failure_reason: string | null\n current_progress_message: string | null\n}\n\n/** One stage currently awaiting approval (from `pendingApprovals`). */\nexport interface PendingApproval {\n stage_name: PipelineStageName\n /** Stage output snapshot; shape varies by stage. */\n output: unknown\n}\n\n/**\n * Assembled timeline (`GET /v1/pipelines/:id/timeline`) — ordered scene\n * composites + their durations, plus optional music/narration and live\n * per-shot animate progress. The data the studio turns into a render.\n */\nexport interface PipelineTimeline {\n fps: number\n width: number\n height: number\n scenes: Array<{ compositeUrl: string; durationSeconds: number }>\n musicUrl?: string\n narrationUrl?: string\n animateProgress?: {\n totalShots: number\n shotsDone: number\n percent: number\n }\n}\n\nexport interface BranchPipelineInput {\n /** The stage to re-run from. Upstream stages are cloned as approved. */\n fromStage: PipelineStageName\n}\n\nexport interface BranchPipelineResult {\n /** The id of the newly created pipeline. */\n pipelineId: string\n /** Stage names that were cloned as 'approved' (stages before `fromStage`). */\n clonedStages: string[]\n /** Number of entity rows cloned into the new pipeline. */\n clonedEntities: number\n}\n\n/**\n * A single chat turn returned by `getStageChat`. Mirrors the\n * `pipeline_chat_turns` row shape selected by the GET handler.\n *\n * `@nodaro/shared` does not yet export a Zod schema for the full row; it only\n * exports `ChatTurnResponseSchema` (the LLM response shape) and the\n * `ProposedChange` discriminated union. Define the wire-format row locally so\n * callers get end-to-end typing today without re-shaping the backend payload.\n */\nexport interface ChatTurn {\n id: string\n turn_n: number\n role: \"user\" | \"assistant\"\n content: string\n proposed_change: ProposedChange | null\n llm_call_id: string | null\n applied_to_attempt_id: string | null\n created_at: string\n}\n\n/**\n * Result of `chatStage` — the assistant turn that was just persisted. The\n * route always echoes the assistant message back so callers can render the\n * reply without a follow-up GET (SSE is the secondary delivery channel).\n */\nexport interface ChatStageResult {\n turnId: string\n role: \"assistant\"\n content: string\n proposed_change: ProposedChange | null\n}\n\n/**\n * Result of `applyChatProposal`. Discriminated on `applied`:\n *\n * - `applied: true` — `applyStageEdit` validated + persisted a new attempt and\n * flipped the stage to approved. `newOutput` is the post-patch artifact.\n * - `applied: false` — recoverable failure (schema_invalid or\n * reference_integrity_failed); the backend has already inserted a follow-up\n * assistant turn with a human-readable hint so the user can iterate via\n * chat. Hard failures throw via the client's error pipeline (409).\n */\nexport type ApplyChatProposalResult =\n | { applied: true; attemptId: string; newOutput: unknown }\n | { applied: false; error: { code: string; detail?: unknown } }\n\nexport class PipelinesResource {\n constructor(private client: NodaroClientCore) {}\n\n /**\n * Start a new pipeline (headless film generation) — the programmatic\n * equivalent of the studio's \"Create film\". In Auto mode the engine\n * self-advances to completion; poll {@link get} for status and\n * {@link getTimeline} for the assembled output. In manual/guided mode, drive\n * it with {@link pendingApprovals} + {@link approveStage} /\n * {@link approveSubGate} / {@link acceptMatchCutBreak}.\n *\n * Requires `pipelines:execute` scope. Returns the new pipeline id.\n */\n create(input: PipelineInput): Promise<{ id: string }> {\n return this.client.request(\"POST\", \"/v1/pipelines\", { body: input })\n }\n\n /**\n * Fetch current pipeline state: `status`, `current_stage`, credit counters,\n * `mode`, and `failure_reason` (set when `status='failed'`). Poll this to\n * track a headless Auto run to completion. Requires `pipelines:read`.\n */\n get(id: string): Promise<PipelineRecord> {\n return this.client.request(\n \"GET\",\n `/v1/pipelines/${encodeURIComponent(id)}`,\n )\n }\n\n /** List the caller's pipelines (most recent first). Requires `pipelines:read`. */\n list(): Promise<PipelineRecord[]> {\n return this.client.request(\"GET\", \"/v1/pipelines\")\n }\n\n /**\n * Cancel a running pipeline. Unspent reserved credits refund. Idempotent on\n * an already-terminal pipeline. Requires `pipelines:execute`.\n */\n cancel(id: string): Promise<{ ok: true }> {\n return this.client.request(\n \"POST\",\n `/v1/pipelines/${encodeURIComponent(id)}/cancel`,\n { body: {} },\n )\n }\n\n /**\n * Stages currently `awaiting_approval`. Empty in a clean Auto run (the engine\n * self-approves); populated in manual/guided mode at each gate. Requires\n * `pipelines:read`.\n */\n pendingApprovals(id: string): Promise<PendingApproval[]> {\n return this.client.request(\n \"GET\",\n `/v1/pipelines/${encodeURIComponent(id)}/pending-approvals`,\n )\n }\n\n /**\n * Approve a stage so the engine advances to the next one. An optional `edits`\n * JSON-Patch is applied to the stage output before approval. Requires\n * `pipelines:approve`.\n */\n approveStage(\n id: string,\n stage: PipelineStageName,\n edits?: unknown,\n ): Promise<{ ok: true }> {\n return this.client.request(\n \"POST\",\n `/v1/pipelines/${encodeURIComponent(id)}/stages/${encodeURIComponent(stage)}/approve`,\n { body: edits ? { edits } : {} },\n )\n }\n\n /**\n * Reject a stage with feedback; the engine re-runs it incorporating the note.\n * Requires `pipelines:approve`.\n */\n rejectStage(\n id: string,\n stage: PipelineStageName,\n feedback: string,\n ): Promise<{ ok: true }> {\n return this.client.request(\n \"POST\",\n `/v1/pipelines/${encodeURIComponent(id)}/stages/${encodeURIComponent(stage)}/reject`,\n { body: { feedback } },\n )\n }\n\n /**\n * Approve a Stage 7 (`animate_audio_edit`) sub-gate — `silent_cut_preview`\n * or `dialogue_recheck` — so the orchestrator resumes from the next\n * sub-step. Stage 6's `match_cut_break_pending` is not approved here: accept\n * each break with {@link acceptMatchCutBreak}. Requires `pipelines:approve`.\n */\n approveSubGate(\n id: string,\n gate: AnimateSubGate,\n ): Promise<{ ok: true; gate: AnimateSubGate; resumed_at: string }> {\n return this.client.request(\n \"POST\",\n `/v1/pipelines/${encodeURIComponent(id)}/sub-gates/${encodeURIComponent(gate)}/approve`,\n { body: {} },\n )\n }\n\n /**\n * Accept one match-cut break Stage 6 (`scene_images`) flagged. While any\n * break is pending, the stage pauses at the `match_cut_break_pending`\n * sub-gate, and its output lists the pending shot ids; accepting the last\n * one resumes the stage. `sceneId` is the scene entity that holds the shot.\n * Requires `pipelines:approve`.\n */\n acceptMatchCutBreak(\n id: string,\n sceneId: string,\n shotId: string,\n ): Promise<{ ok: true; pendingRemaining: number }> {\n return this.client.request(\n \"POST\",\n `/v1/pipelines/${encodeURIComponent(id)}/entities/${encodeURIComponent(sceneId)}/helpers/accept_match_cut_break`,\n { body: { shotId } },\n )\n }\n\n /**\n * Read a single stage's `status`, `output`, and `critic_feedback`. Useful for\n * inspecting the script/plan before approving. Requires `pipelines:read`.\n */\n getStage(\n id: string,\n stage: PipelineStageName,\n ): Promise<{ status: string; output: unknown; critic_feedback: unknown }> {\n return this.client.request(\n \"GET\",\n `/v1/pipelines/${encodeURIComponent(id)}/stages/${encodeURIComponent(stage)}`,\n )\n }\n\n /**\n * Assembled timeline — ordered scene composites + durations + audio URLs +\n * live animate progress. The output a headless caller renders or hands to a\n * downstream editor. Requires `pipelines:read`.\n */\n getTimeline(id: string): Promise<PipelineTimeline> {\n return this.client.request(\n \"GET\",\n `/v1/pipelines/${encodeURIComponent(id)}/timeline`,\n )\n }\n\n /**\n * Branch a completed pipeline into a new pipeline that re-runs from the\n * given stage. The original pipeline's upstream stages and entities are\n * cloned into the new pipeline; downstream stages are created by the\n * orchestrator as it advances.\n *\n * Requires `pipelines:execute` scope.\n * The source pipeline must have `status='completed'`.\n *\n * @returns 201 with `{ pipelineId, clonedStages, clonedEntities }`.\n */\n branch(id: string, input: BranchPipelineInput): Promise<BranchPipelineResult> {\n return this.client.request(\n \"POST\",\n `/v1/pipelines/${encodeURIComponent(id)}/branch`,\n { body: input },\n )\n }\n\n /**\n * Send a chat message to the Showrunner Refinement Director (Guided Mode).\n * Persists user + assistant turns; returns the assistant's reply and an\n * optional `proposed_change` the user can `applyChatProposal` to commit.\n *\n * Requires `pipelines:approve` scope. The pipeline must have\n * `mode='guided'` and the stage must be `awaiting_approval`.\n *\n * Only the Script stage ships a wired specialist in Phase 1D.2b — the other\n * chat-enabled stages (`shot_list`, `post_merge`) return 501 until 1D.2d.\n */\n chatStage(\n pipelineId: string,\n stage: ChatEnabledStage,\n message: string,\n ): Promise<ChatStageResult> {\n return this.client.request(\n \"POST\",\n `/v1/pipelines/${encodeURIComponent(pipelineId)}/stages/${encodeURIComponent(stage)}/chat`,\n { body: { message } },\n )\n }\n\n /**\n * Accept a proposed change from a prior assistant turn. Routes through\n * `applyStageEdit` (validates JSON Patch + per-stage schema +\n * reference-integrity, inserts a new pipeline_stage_attempts row, CAS-flips\n * the stage to approved, emits `chat:proposal_applied` SSE).\n *\n * Requires `pipelines:approve` scope.\n *\n * Returns `{ applied: true, attemptId, newOutput }` on success, or\n * `{ applied: false, error }` on recoverable failures (the backend already\n * inserted a follow-up assistant turn with a hint). Hard failures\n * (`patch_invalid`, `stage_not_awaiting`) throw via the standard error\n * pipeline (HTTP 409).\n */\n applyChatProposal(\n pipelineId: string,\n stage: ChatEnabledStage,\n turnId: string,\n ): Promise<ApplyChatProposalResult> {\n return this.client.request(\n \"POST\",\n `/v1/pipelines/${encodeURIComponent(pipelineId)}/stages/${encodeURIComponent(stage)}/chat/turns/${encodeURIComponent(turnId)}/apply`,\n { body: {} },\n )\n }\n\n /**\n * Fetch the chat history for a stage. Returns an empty array when no turns\n * exist yet (e.g., stage has not been started or the user hasn't sent any\n * messages). Used by the frontend chat panel on initial mount; subsequent\n * updates arrive via SSE (`chat:turn` events).\n *\n * Requires `pipelines:read` scope.\n */\n getStageChat(\n pipelineId: string,\n stage: ChatEnabledStage,\n ): Promise<{ turns: ChatTurn[] }> {\n return this.client.request(\n \"GET\",\n `/v1/pipelines/${encodeURIComponent(pipelineId)}/stages/${encodeURIComponent(stage)}/chat`,\n )\n }\n}\n"]}
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var entities = require('@nodaro/shared/entities');
|
|
4
|
+
|
|
5
|
+
// src/resources/objects.ts
|
|
6
|
+
var ObjectsResource = class {
|
|
7
|
+
constructor(client) {
|
|
8
|
+
this.client = client;
|
|
9
|
+
}
|
|
10
|
+
client;
|
|
11
|
+
/**
|
|
12
|
+
* List the caller's objects. By default returns active objects only;
|
|
13
|
+
* pass `archived: true` to fetch soft-deleted rows for an "archive" view.
|
|
14
|
+
* Optional `projectId` scopes the result to a single project; `q` keeps the
|
|
15
|
+
* objects whose name or description contains it.
|
|
16
|
+
*/
|
|
17
|
+
list(params = {}) {
|
|
18
|
+
const query = {};
|
|
19
|
+
if (params.archived) query.archived = "true";
|
|
20
|
+
if (params.projectId) query.projectId = params.projectId;
|
|
21
|
+
if (params.q) query.q = params.q;
|
|
22
|
+
if (params.limit !== void 0) query.limit = String(params.limit);
|
|
23
|
+
if (params.cursor) query.cursor = params.cursor;
|
|
24
|
+
return this.client.request("GET", "/v1/objects", { query });
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Convenience wrapper for `list({ archived: true })`. Returns soft-deleted
|
|
28
|
+
* rows so callers can drive a UI "Archived" tab without re-encoding the
|
|
29
|
+
* query param.
|
|
30
|
+
*
|
|
31
|
+
* `archived` is omitted from the param type — it's always set to `true` here.
|
|
32
|
+
*/
|
|
33
|
+
listArchived(params = {}) {
|
|
34
|
+
return this.list({ ...params, archived: true });
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Fetch a single object including in-flight asset job state. Soft-deleted
|
|
38
|
+
* (archived) rows are NOT returned by id — the route enforces
|
|
39
|
+
* `deleted_at IS NULL` so archived objects 404 (uniform Pass 10 F-90b
|
|
40
|
+
* "not_found" — does not leak the deleted vs non-existent distinction).
|
|
41
|
+
*/
|
|
42
|
+
async get(id) {
|
|
43
|
+
const res = await this.client.request(
|
|
44
|
+
"GET",
|
|
45
|
+
`/v1/objects/${encodeURIComponent(id)}`
|
|
46
|
+
);
|
|
47
|
+
return { ...res, canonicalDescription: res.canonicalDescription || null };
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Create a new object. `name` + `nodeId` are required — the route 400s
|
|
51
|
+
* otherwise. Returns the new row's id.
|
|
52
|
+
*
|
|
53
|
+
* Note: the underlying route is the same `POST /v1/objects` upsert that
|
|
54
|
+
* powers `update()`. This convenience wrapper enforces the INSERT-required
|
|
55
|
+
* fields at the type level and never sends an `id`.
|
|
56
|
+
*/
|
|
57
|
+
create(data) {
|
|
58
|
+
return this.client.request("POST", "/v1/objects", { body: data });
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Update an object. Only the fields you pass are written — undefined keys
|
|
62
|
+
* are NOT touched on the row. Worker-owned asset buckets are intentionally
|
|
63
|
+
* not exposed on this surface (see `UpdateObjectInput` for the rationale).
|
|
64
|
+
*
|
|
65
|
+
* Optimistic-concurrency: pass `expectedUpdatedAt` to require the row's
|
|
66
|
+
* `updated_at` still matches; on mismatch the route returns 409
|
|
67
|
+
* `concurrent_modification` carrying the fresh `updatedAt`. The SDK
|
|
68
|
+
* surfaces that as a generic `NodaroError` with the same code (per Phase
|
|
69
|
+
* E1 calibration finding — error centralization in `throwApiError`).
|
|
70
|
+
*/
|
|
71
|
+
update(id, data) {
|
|
72
|
+
return this.client.request("POST", "/v1/objects", {
|
|
73
|
+
body: { id, ...data }
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Soft-delete (archive) an object. The row is hidden from `list()` by
|
|
78
|
+
* default but recoverable via `restore(id)` or visible under
|
|
79
|
+
* `listArchived()`. Idempotent — repeating a delete on an already-archived
|
|
80
|
+
* row is a no-op.
|
|
81
|
+
*/
|
|
82
|
+
delete(id) {
|
|
83
|
+
return this.client.request("DELETE", `/v1/objects/${encodeURIComponent(id)}`);
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Hard-delete (permanent) an object — the row + every R2 asset it
|
|
87
|
+
* references. Archived rows ONLY: active objects return 400 `not_archived`.
|
|
88
|
+
* Call `delete()` first to archive, then `permanentDelete()` to destroy.
|
|
89
|
+
*
|
|
90
|
+
* Mirrors the `app_runs` permanent-delete pattern (archive-first) so a
|
|
91
|
+
* stray SDK / curl caller cannot bypass the studio's archive-first UI
|
|
92
|
+
* flow.
|
|
93
|
+
*/
|
|
94
|
+
permanentDelete(id) {
|
|
95
|
+
return this.client.request("DELETE", `/v1/objects/${encodeURIComponent(id)}`, {
|
|
96
|
+
query: { permanent: "true" }
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Un-archive an object. If the original name now collides (case-
|
|
101
|
+
* insensitive) with an active row, the server auto-suffixes "(restored)"
|
|
102
|
+
* and returns the effective name.
|
|
103
|
+
*/
|
|
104
|
+
restore(id) {
|
|
105
|
+
return this.client.request("POST", `/v1/objects/${encodeURIComponent(id)}/restore`);
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Fire `POST /v1/generate-object` to produce one or more candidate main
|
|
109
|
+
* images. With `count > 1`, all jobs are reserved up-front before any
|
|
110
|
+
* is enqueued — mid-batch failures roll back atomically.
|
|
111
|
+
*
|
|
112
|
+
* When `attachToObjectId` is set AND `count === 1`, the worker writes
|
|
113
|
+
* the result directly to the row's `source_image_url`; otherwise you must
|
|
114
|
+
* call `approveMainImage()` after picking a candidate.
|
|
115
|
+
*/
|
|
116
|
+
async generate(data) {
|
|
117
|
+
const res = await this.client.request(
|
|
118
|
+
"POST",
|
|
119
|
+
"/v1/generate-object",
|
|
120
|
+
{ body: data }
|
|
121
|
+
);
|
|
122
|
+
const jobIds = res.jobIds ?? (res.jobId ? [res.jobId] : []);
|
|
123
|
+
return res.jobId ? { jobIds, jobId: res.jobId } : { jobIds };
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Fire `POST /v1/generate-object-asset` to produce a single variant.
|
|
127
|
+
* When the studio path is set (`attachToObjectId` + `attachToColumn` +
|
|
128
|
+
* `attachName`), the worker appends `{ name: attachName, url: <result> }`
|
|
129
|
+
* to the named JSONB array column on completion.
|
|
130
|
+
*
|
|
131
|
+
* Note: `attachToColumn` is REQUIRED for `assetType === "custom"` — the
|
|
132
|
+
* worker can't infer the bucket from the asset type. For canonical asset
|
|
133
|
+
* types (`angles` / `materials` / `variations` / `motion`), the column is
|
|
134
|
+
* derived automatically by the route.
|
|
135
|
+
*/
|
|
136
|
+
generateAsset(data) {
|
|
137
|
+
return this.client.request("POST", "/v1/generate-object-asset", { body: data });
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Fire `POST /v1/generate-object-motion` to animate the object's main
|
|
141
|
+
* image into a motion clip. Image-to-video, single clip per call; the
|
|
142
|
+
* attach column is hardcoded to `motion_clips` server-side (objects have a
|
|
143
|
+
* single motion bucket so the caller doesn't supply `attachToColumn`).
|
|
144
|
+
* When the studio path is set (`attachToObjectId` + `attachName`), the
|
|
145
|
+
* worker appends `{ name: attachName, url: <result> }` to the row's
|
|
146
|
+
* `motion_clips` column on completion.
|
|
147
|
+
*
|
|
148
|
+
* Defaults: `provider` → `"kling-turbo"`, `aspectRatio` → `"1:1"` (set
|
|
149
|
+
* server-side via `resolveObjectAspectRatio({ assetType: "motion" })`).
|
|
150
|
+
*/
|
|
151
|
+
generateMotion(data) {
|
|
152
|
+
return this.client.request("POST", "/v1/generate-object-motion", { body: data });
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Approve a completed `generate-object` job as the object's main image.
|
|
156
|
+
* Sets `source_image_url` and fires the LLM caption (Claude Sonnet vision)
|
|
157
|
+
* inline. Returns the new main-image URL plus the caption.
|
|
158
|
+
*
|
|
159
|
+
* Caption-failure semantics: the route still sends `""` on LLM sub-failure,
|
|
160
|
+
* but the SDK normalizes `""` → `null` here so `canonicalDescription` carries
|
|
161
|
+
* the same `string | null` semantics as characters. The main image is still
|
|
162
|
+
* set; call `recaption()` to retry.
|
|
163
|
+
*
|
|
164
|
+
* Optimistic-concurrency: pass `expectedUpdatedAt` to gate the update on
|
|
165
|
+
* the row's current `updated_at`; on mismatch the route returns 409
|
|
166
|
+
* `concurrent_modification` carrying the fresh token.
|
|
167
|
+
*/
|
|
168
|
+
async approveMainImage(id, candidateJobId, expectedUpdatedAt) {
|
|
169
|
+
const res = await this.client.request(
|
|
170
|
+
"POST",
|
|
171
|
+
`/v1/objects/${encodeURIComponent(id)}/approve-main-image`,
|
|
172
|
+
{ body: { candidateJobId, expectedUpdatedAt } }
|
|
173
|
+
);
|
|
174
|
+
return { sourceImageUrl: res.sourceImageUrl, canonicalDescription: res.canonicalDescription || null };
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* Re-fire the LLM caption against the object's current main image. 502s
|
|
178
|
+
* on LLM failure (unlike `approveMainImage` which preserves the side-effect
|
|
179
|
+
* and returns ""); returns 400 `main_image_required` if no main image is
|
|
180
|
+
* set yet.
|
|
181
|
+
*
|
|
182
|
+
* The route is a pure idempotent retry — it does NOT accept an
|
|
183
|
+
* `expectedUpdatedAt` token (per Phase E1 calibration finding: backend
|
|
184
|
+
* route is idempotent retry, not gated on optimistic-concurrency).
|
|
185
|
+
*/
|
|
186
|
+
recaption(id) {
|
|
187
|
+
return this.client.request(
|
|
188
|
+
"POST",
|
|
189
|
+
`/v1/objects/${encodeURIComponent(id)}/llm-caption`
|
|
190
|
+
);
|
|
191
|
+
}
|
|
192
|
+
};
|
|
193
|
+
|
|
194
|
+
Object.defineProperty(exports, "OBJECT_ASPECT_DEFAULTS", {
|
|
195
|
+
enumerable: true,
|
|
196
|
+
get: function () { return entities.OBJECT_ASPECT_DEFAULTS; }
|
|
197
|
+
});
|
|
198
|
+
Object.defineProperty(exports, "OBJECT_ASPECT_OPTIONS", {
|
|
199
|
+
enumerable: true,
|
|
200
|
+
get: function () { return entities.OBJECT_ASPECT_OPTIONS; }
|
|
201
|
+
});
|
|
202
|
+
Object.defineProperty(exports, "OBJECT_ASSET_TYPES", {
|
|
203
|
+
enumerable: true,
|
|
204
|
+
get: function () { return entities.OBJECT_ASSET_TYPES; }
|
|
205
|
+
});
|
|
206
|
+
Object.defineProperty(exports, "OBJECT_ATTACH_COLUMNS", {
|
|
207
|
+
enumerable: true,
|
|
208
|
+
get: function () { return entities.OBJECT_ATTACH_COLUMNS; }
|
|
209
|
+
});
|
|
210
|
+
exports.ObjectsResource = ObjectsResource;
|
|
211
|
+
//# sourceMappingURL=chunk-CR5E2SF3.cjs.map
|
|
212
|
+
//# sourceMappingURL=chunk-CR5E2SF3.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/resources/objects.ts"],"names":[],"mappings":";;;;;AAwYO,IAAM,kBAAN,MAAsB;AAAA,EAC3B,YAAoB,MAAA,EAA0B;AAA1B,IAAA,IAAA,CAAA,MAAA,GAAA,MAAA;AAAA,EAA2B;AAAA,EAA3B,MAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQpB,IAAA,CAAK,MAAA,GAA4B,EAAC,EAA+D;AAC/F,IAAA,MAAM,QAA4C,EAAC;AACnD,IAAA,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;AAAA,MACjB,MAAA;AAAA,MACA,CAAA,YAAA,EAAe,kBAAA,CAAmB,EAAE,CAAC,CAAA,YAAA;AAAA,KACvC;AAAA,EACF;AACF","file":"chunk-CR5E2SF3.cjs","sourcesContent":["import type { ObjectAspectRatio, ObjectAssetType, ObjectAttachColumn } from \"@nodaro/shared/entities\"\nexport type { ObjectAssetType, ObjectAttachColumn, ObjectAspectRatio } from \"@nodaro/shared/entities\"\nexport { OBJECT_ASSET_TYPES, OBJECT_ATTACH_COLUMNS, OBJECT_ASPECT_OPTIONS, OBJECT_ASPECT_DEFAULTS } from \"@nodaro/shared/entities\"\nimport type { NodaroClientCore } from \"../core.js\"\nimport type { GenerationSessionParams } from \"./nodes.js\"\n\n/**\n * Re-export the shared `ObjectAssetType` / `ObjectAttachColumn` unions and\n * their runtime tuples so SDK consumers don't have to add `@nodaro/shared` as\n * a second dependency just to typecheck the `assetType` / `attachToColumn`\n * fields. Single source of truth lives in `@nodaro/shared/entity-prompts`.\n *\n * `ObjectAspectRatio` is re-exported alongside them — `generateMotion`'s\n * `aspectRatio` field is the 5-value object enum (1:1 / 3:4 / 16:9 / 9:16 /\n * 4:3) from `@nodaro/shared/object-aspect-defaults`. Distinct from\n * `CharacterAspectRatio` because objects support an extra 4:3 framing for\n * product-showcase shots.\n */\n\n/**\n * Reference-photo kind discriminator — the mood-board roles a user can attach\n * to an object. Mirrors the `reference_photos.kind` field accepted by\n * `backend/src/routes/objects.ts` (the route accepts open strings; this SDK\n * type narrows to the 6 canonical roles surfaced by the Studio). `other` is\n * the free-form bucket.\n */\nexport type ObjectReferencePhotoKind =\n | \"front\"\n | \"side\"\n | \"detail\"\n | \"context\"\n | \"moodBoard\"\n | \"other\"\n\nexport interface ObjectReferencePhoto {\n url: string\n kind: ObjectReferencePhotoKind\n}\n\n/**\n * An object record returned by Nodaro's REST API. Mirrors the camelCase\n * shape produced by `backend/src/routes/objects.ts::toCamel()`.\n *\n * Asset buckets (`angles`, `materials`, `variations`, `motionClips`) are\n * independent JSONB arrays keyed by a human-readable variant name (e.g.\n * `\"front\"`, `\"wood\"`, `\"weathered\"`). Each entry's `url` points at an\n * R2-hosted asset.\n *\n * Identity-foundation fields:\n * - `referencePhotos` — caller-supplied mood-board refs (cap 20). Objects\n * do NOT carry a `piiConsentAt` field (location Phase 2 #7 only).\n * - `canonicalDescription` — ~80–120-word LLM-authored visual caption,\n * populated by `approveMainImage()` / `recaption()`. The wire still sends\n * `\"\"` on caption sub-failure (the breaking wire change is deferred to a\n * major bump), but `get()` normalizes `\"\"` → `null` so consumers see the\n * same `string | null` semantics as characters.\n * - `styleLock` — whether asset gens should anchor to the canonical style\n * captured at approval time. Defaults to `true` on new rows.\n *\n * `Object` shadows the JS global, which TypeScript handles cleanly via\n * local-scope resolution. Consumers who need both can alias as\n * `import type { Object as NodaroObject } from \"@nodaro/sdk\"`.\n */\nexport interface Object {\n id: string\n userId: string\n nodeId: string\n projectId: string | null\n name: string\n description: string | null\n category: string | null\n style: string | null\n sourceImageUrl: string | null\n /** MODEL_CATALOG image-model id the main image was generated with (or `null`).\n * Set on create + editable via the update route. */\n imageProvider: string | null\n angles: Array<{ name: string; url: string }>\n materials: Array<{ name: string; url: string }>\n variations: Array<{ name: string; url: string }>\n motionClips: Array<{ name: string; url: string }>\n /** Named Product Boards — dense reference sheets, one per variant/colorway\n * (the `generate-image/product-board` factory preset rendered from the\n * object's images). A first-class bucket: community publish snapshots it\n * and clone hands the consumer their own copy to extend. Defaults to `[]`.\n * `type` marks an image-collage `\"identity\"` sheet vs a plain `\"looks\"`\n * board; `sourceImages` are the R2 URLs it was collaged from. Both optional\n * + backward-compatible (legacy boards have neither). */\n boards?: Array<{ name: string; url: string; type?: \"looks\" | \"identity\"; sourceImages?: string[] }> | null\n referencePhotos: ObjectReferencePhoto[]\n /** `null` when no caption is set (or the LLM caption sub-failed) — the wire\n * sends `\"\"`, normalized to `null` in `get()` to match character semantics. */\n canonicalDescription: string | null\n styleLock: boolean\n /** The user's chosen DEFAULT asset take per variant (Studio version history).\n * OPAQUE map: key `\"<bucket>:<variant>\"` (e.g. `\"angles:front\"`) → the chosen\n * asset URL (one already present in that bucket). Stored verbatim — keys are\n * NOT normalized; soft-capped server-side at 200 keys / 2048-char values\n * (overflow dropped silently). Defaults to `{}`. */\n selectedAssetByVariant?: Record<string, string> | null\n deletedAt: string | null\n createdAt: string\n updatedAt: string\n}\n\n/**\n * GET /v1/objects/:id may append a `pendingJobs` bucket the studio uses to\n * rehydrate spinners after a reload. Optional on the SDK surface — it doesn't\n * appear on `list()` rows.\n */\nexport interface ObjectDetail extends Object {\n pendingJobs?: Array<{\n jobId: string\n assetType: string\n name: string\n status: string\n }>\n}\n\n/**\n * Body for `client.objects.create()`. Mirrors the INSERT branch of\n * `upsertObjectBody` in `backend/src/routes/objects.ts`. `name` + `nodeId`\n * are required on create.\n */\nexport interface CreateObjectInput {\n nodeId: string\n name: string\n description?: string\n category?: ObjectCategory\n style?: string\n workflowId?: string\n projectId?: string\n sourceImageUrl?: string\n /** Persistent image-model id (a MODEL_CATALOG image model). Validated\n * server-side — unknown / non-image / \"\" is stored as `null`. */\n imageProvider?: string | null\n referencePhotos?: ObjectReferencePhoto[]\n canonicalDescription?: string\n styleLock?: boolean\n /** The user's chosen DEFAULT asset take per variant. OPAQUE\n * `\"<bucket>:<variant>\"` → chosen-URL map; a write REPLACES the whole map.\n * Keys stored verbatim; soft-capped server-side at 200 keys / 2048-char values. */\n selectedAssetByVariant?: Record<string, string>\n}\n\n/**\n * The 10-value Object category enum. Mirrors the literal accepted by\n * `POST /v1/generate-object` and surfaced in the Object Studio category\n * picker. Distinct from location's geography-based set.\n */\nexport type ObjectCategory =\n | \"furniture\"\n | \"vehicle\"\n | \"weapon\"\n | \"food\"\n | \"clothing\"\n | \"electronics\"\n | \"nature\"\n | \"tool\"\n | \"animal\"\n | \"other\"\n\n/**\n * Body for `client.objects.update()`. Mirrors the UPDATE branch of\n * `upsertObjectBody` in `backend/src/routes/objects.ts`.\n *\n * Worker-owned asset buckets (`angles` / `materials` / `variations` /\n * `motionClips`) are deliberately omitted — the route drops them on UPDATE\n * so a Studio auto-save with a stale snapshot cannot clobber the worker's\n * atomic `append_object_asset()` writes.\n *\n * `expectedUpdatedAt` is the optimistic-concurrency token: when present, the\n * UPDATE only succeeds if the row's `updated_at` still matches; on mismatch\n * the route returns 409 so the studio can re-fetch + merge.\n */\nexport interface UpdateObjectInput {\n name?: string\n description?: string\n category?: ObjectCategory\n style?: string\n sourceImageUrl?: string\n /** Persistent image-model id (a MODEL_CATALOG image model). Validated\n * server-side — unknown / non-image / \"\" is stored as `null`. */\n imageProvider?: string | null\n referencePhotos?: ObjectReferencePhoto[]\n canonicalDescription?: string\n styleLock?: boolean\n /** The user's chosen DEFAULT asset take per variant. OPAQUE\n * `\"<bucket>:<variant>\"` → chosen-URL map; a write REPLACES the whole map\n * (omit to leave untouched). Keys stored verbatim; soft-capped server-side\n * at 200 keys / 2048-char values. */\n selectedAssetByVariant?: Record<string, string>\n /** Named Product Boards (see `Object.boards`) — whole-array replace,\n * USER-owned (unlike the worker-owned buckets it flows through UPDATE).\n * Server caps: 24 boards, 200-char names, 30 sourceImages per board. */\n boards?: Array<{ name: string; url: string; type?: \"looks\" | \"identity\"; sourceImages?: string[] }>\n expectedUpdatedAt?: string\n}\n\nexport interface UpdateObjectResult {\n id: string\n updatedAt: string\n}\n\n/**\n * Combined create + update body (parameter for both branches). Exported for\n * callers that want to drive a single `upsert` flow without picking between\n * `Create*` and `Update*`. Mirrors the `upsertObjectBody` Zod schema in\n * `backend/src/routes/objects.ts`. `nodeId` + `name` are required on INSERT;\n * `id` flips the route into UPDATE mode.\n */\nexport interface UpsertObjectInput extends CreateObjectInput {\n id?: string\n expectedUpdatedAt?: string\n}\n\nexport type UpsertObjectResult = { id: string } | UpdateObjectResult\n\nexport interface ListObjectsParams {\n /** When true, return archived objects instead of active ones. */\n archived?: boolean\n /** Optional project filter — server-scoped to the caller's user. */\n projectId?: string\n /**\n * Search words: only the objects whose name or description contains every\n * word (split on spaces, the first 5), in any order, ignoring case. Each\n * word is matched as written (`%`, `_` and `*` are not wildcards;\n * punctuation is kept); blank means no search; up to 200 characters.\n * Combines with the other filters and with `cursor` paging.\n */\n q?: string\n /**\n * Max rows to return (cap 500). OPT-IN: omitted, the server returns the\n * full legacy listing with no `nextCursor`; supplied, the response is one\n * page plus `nextCursor` — keep passing it back until it is `null`.\n */\n limit?: number\n /** Opaque cursor from a prior page's `nextCursor` (fetches the next page). */\n cursor?: string\n}\n\n/**\n * Input for `client.objects.generate()` — fires the\n * `POST /v1/generate-object` route. Produces 1–10 candidate\n * main images; each lands as one `jobs` row in `pending` state and is then\n * enqueued for the worker.\n *\n * When `attachToObjectId` is set AND `count === 1`, the worker writes the\n * resulting URL directly to `objects.source_image_url` on completion —\n * caller doesn't need a separate `approveMainImage` call. Multi-candidate\n * batches MUST go through explicit approval so the user picks the winner.\n *\n * `seedPromptHint` (Pass 7 F-77) flows the parameter-picker's prompt fragment\n * through to the worker so a catalog selection (e.g. \"antique brass lantern\")\n * gets appended to the generated prompt context.\n */\nexport interface GenerateObjectInput extends GenerationSessionParams {\n name: string\n description?: string\n userPrompt?: string\n category?: ObjectCategory\n style?: \"realistic\" | \"anime\" | \"3d-pixar\" | \"illustration\"\n sourceImageUrl?: string\n provider?: string\n /** Number of candidate images to generate (1–10; server-validated). */\n count?: number\n /** Auto-attach the result to this object row (single-candidate only). */\n attachToObjectId?: string\n /** Parameter-picker prompt-fragment pass-through. */\n seedPromptHint?: string\n /** Optional name to set on the attached row alongside the main image. */\n attachName?: string\n /** Optimistic-concurrency token for the single-candidate auto-attach path. */\n expectedUpdatedAt?: string\n}\n\n/**\n * `generate()` response — `jobIds` is ALWAYS present (the harmonized contract,\n * matching characters). `jobId` is a deprecated back-compat alias populated only\n * on `count === 1`; prefer `jobIds`. (Will be removed on the next major.)\n */\nexport interface GenerateObjectResult {\n jobIds: string[]\n /** @deprecated count===1 back-compat alias — use `jobIds`. */\n jobId?: string\n}\n\n/**\n * Input for `client.objects.generateAsset()` — fires the\n * `POST /v1/generate-object-asset` route. Produces a single\n * angles / materials / variations / custom variant.\n *\n * When all three studio-path fields are set (`attachToObjectId` +\n * `attachToColumn` + `attachName`), the worker appends\n * `{ name: attachName, url: <result> }` to the named JSONB array column on\n * the user's object row on completion. `attachToColumn` is REQUIRED for\n * `assetType === \"custom\"` — the worker can't infer the bucket from the\n * asset type.\n */\nexport interface GenerateObjectAssetInput extends GenerationSessionParams {\n assetType: ObjectAssetType\n variant: string\n name: string\n description?: string\n userPrompt?: string\n category?: string\n style?: \"realistic\" | \"anime\" | \"3d-pixar\" | \"illustration\"\n sourceImageUrl?: string\n provider?: string\n attachToObjectId?: string\n attachToColumn?: ObjectAttachColumn\n attachName?: string\n /** Parameter-picker prompt-fragment pass-through (Pass 7 F-77). */\n seedPromptHint?: string\n}\n\nexport interface GenerateObjectAssetResult {\n jobId: string\n}\n\n/**\n * Input for `client.objects.generateMotion()` — fires the\n * `POST /v1/generate-object-motion` route. Produces a single motion clip\n * (rotation, orbit, hover, drift, etc.) animated FROM a static product-shot\n * image.\n *\n * Mirrors `client.locations.generateMotion()` minus the location-specific\n * atmospheric fields. The route hardcodes the attach column to `motion_clips`\n * — callers supply `attachToObjectId` + `attachName` only.\n *\n * `sourceImageUrl` is REQUIRED — image-to-video needs a source frame and the\n * route has no fallback (no `source_image_url` column to pull from on the\n * objects row at this point in the flow; the studio path supplies the\n * canonical product-shot URL explicitly).\n *\n * Object-specific defaults vs location:\n * - `provider` defaults to `\"kling-turbo\"` (not location's `\"kling\"`)\n * - `aspectRatio` defaults to `\"1:1\"` server-side via\n * `resolveObjectAspectRatio({ assetType: \"motion\" })` — objects are\n * product-showcase framing, not cinematic establishing shots.\n *\n * When the studio path is set (`attachToObjectId` + `attachName`), the\n * worker appends `{ name: attachName, url: <result> }` to the object row's\n * `motion_clips` JSONB column on completion.\n */\nexport interface GenerateObjectMotionInput extends GenerationSessionParams {\n motionPrompt: string\n sourceImageUrl: string\n provider?: string\n name: string\n /** Source clip URL — when set, worker routes to video-to-video refine. */\n refineFromVideoUrl?: string\n category?: string\n style?: \"realistic\" | \"anime\" | \"3d-pixar\" | \"illustration\"\n canonicalDescription?: string\n /** Parameter-picker prompt-fragment pass-through (Pass 7 F-77). */\n seedPromptHint?: string\n attachToObjectId?: string\n attachName?: string\n /**\n * Optional aspect ratio override. Defaults to 1:1 server-side. One of the\n * 5-value `ObjectAspectRatio` union (1:1 / 3:4 / 16:9 / 9:16 / 4:3) —\n * objects have their own enum (with 4:3 added) vs the character set.\n */\n aspectRatio?: ObjectAspectRatio\n /**\n * Optional clip duration in seconds. Validated server-side against the chosen\n * provider's allowed durations (e.g. kling 5/10, wan-i2v 5/10/15); omitted →\n * the model's own default (no behavior change). Mirrors generate-video's\n * per-model i2v duration lever.\n */\n duration?: number\n}\n\nexport interface GenerateObjectMotionResult {\n jobId: string\n}\n\nexport interface ApproveObjectMainImageResult {\n sourceImageUrl: string\n /**\n * LLM-authored caption. `null` when the LLM caption sub-failed — the wire\n * sends `\"\"`, normalized to `null` here so consumers see the same\n * `string | null` semantics as characters. The main image is still set; call\n * `recaption()` to retry.\n */\n canonicalDescription: string | null\n}\n\nexport interface RecaptionObjectResult {\n canonicalDescription: string\n}\n\nexport class ObjectsResource {\n constructor(private client: NodaroClientCore) {}\n\n /**\n * List the caller's objects. By default returns active objects only;\n * pass `archived: true` to fetch soft-deleted rows for an \"archive\" view.\n * Optional `projectId` scopes the result to a single project; `q` keeps the\n * objects whose name or description contains it.\n */\n list(params: ListObjectsParams = {}): Promise<{ objects: Object[]; nextCursor?: string | null }> {\n const query: Record<string, string | undefined> = {}\n if (params.archived) query.archived = \"true\"\n if (params.projectId) query.projectId = params.projectId\n if (params.q) query.q = params.q\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/objects\", { query })\n }\n\n /**\n * Convenience wrapper for `list({ archived: true })`. Returns soft-deleted\n * rows so callers can drive a UI \"Archived\" tab without re-encoding the\n * query param.\n *\n * `archived` is omitted from the param type — it's always set to `true` here.\n */\n listArchived(params: Omit<ListObjectsParams, \"archived\"> = {}): Promise<{ objects: Object[]; nextCursor?: string | null }> {\n return this.list({ ...params, archived: true })\n }\n\n /**\n * Fetch a single object including in-flight asset job state. Soft-deleted\n * (archived) rows are NOT returned by id — the route enforces\n * `deleted_at IS NULL` so archived objects 404 (uniform Pass 10 F-90b\n * \"not_found\" — does not leak the deleted vs non-existent distinction).\n */\n async get(id: string): Promise<ObjectDetail> {\n const res = await this.client.request<ObjectDetail>(\n \"GET\",\n `/v1/objects/${encodeURIComponent(id)}`,\n )\n // Normalize the wire `\"\"` caption (DB null / LLM sub-failure) → null so\n // consumers see the same `string | null` semantics as characters. New\n // object — never mutate the response.\n return { ...res, canonicalDescription: res.canonicalDescription || null }\n }\n\n /**\n * Create a new object. `name` + `nodeId` are required — the route 400s\n * otherwise. Returns the new row's id.\n *\n * Note: the underlying route is the same `POST /v1/objects` upsert that\n * powers `update()`. This convenience wrapper enforces the INSERT-required\n * fields at the type level and never sends an `id`.\n */\n create(data: CreateObjectInput): Promise<{ id: string }> {\n return this.client.request(\"POST\", \"/v1/objects\", { body: data })\n }\n\n /**\n * Update an object. Only the fields you pass are written — undefined keys\n * are NOT touched on the row. Worker-owned asset buckets are intentionally\n * not exposed on this surface (see `UpdateObjectInput` for the rationale).\n *\n * Optimistic-concurrency: pass `expectedUpdatedAt` to require the row's\n * `updated_at` still matches; on mismatch the route returns 409\n * `concurrent_modification` carrying the fresh `updatedAt`. The SDK\n * surfaces that as a generic `NodaroError` with the same code (per Phase\n * E1 calibration finding — error centralization in `throwApiError`).\n */\n update(id: string, data: UpdateObjectInput): Promise<UpdateObjectResult> {\n return this.client.request(\"POST\", \"/v1/objects\", {\n body: { id, ...data },\n })\n }\n\n /**\n * Soft-delete (archive) an object. The row is hidden from `list()` by\n * default but recoverable via `restore(id)` or visible under\n * `listArchived()`. Idempotent — repeating a delete on an already-archived\n * row is a no-op.\n */\n delete(id: string): Promise<{ success: true; archived: true }> {\n return this.client.request(\"DELETE\", `/v1/objects/${encodeURIComponent(id)}`)\n }\n\n /**\n * Hard-delete (permanent) an object — the row + every R2 asset it\n * references. Archived rows ONLY: active objects return 400 `not_archived`.\n * Call `delete()` first to archive, then `permanentDelete()` to destroy.\n *\n * Mirrors the `app_runs` permanent-delete pattern (archive-first) so a\n * stray SDK / curl caller cannot bypass the studio's archive-first UI\n * flow.\n */\n permanentDelete(id: string): Promise<{ success: true; permanent: true }> {\n return this.client.request(\"DELETE\", `/v1/objects/${encodeURIComponent(id)}`, {\n query: { permanent: \"true\" },\n })\n }\n\n /**\n * Un-archive an object. If the original name now collides (case-\n * insensitive) with an active row, the server auto-suffixes \"(restored)\"\n * and returns the effective name.\n */\n restore(id: string): Promise<{ id: string; name: string }> {\n return this.client.request(\"POST\", `/v1/objects/${encodeURIComponent(id)}/restore`)\n }\n\n /**\n * Fire `POST /v1/generate-object` to produce one or more candidate main\n * images. With `count > 1`, all jobs are reserved up-front before any\n * is enqueued — mid-batch failures roll back atomically.\n *\n * When `attachToObjectId` is set AND `count === 1`, the worker writes\n * the result directly to the row's `source_image_url`; otherwise you must\n * call `approveMainImage()` after picking a candidate.\n */\n async generate(data: GenerateObjectInput): Promise<GenerateObjectResult> {\n const res = await this.client.request<{ jobId?: string; jobIds?: string[] }>(\n \"POST\", \"/v1/generate-object\", { body: data },\n )\n // Tolerate the legacy `{ jobId }`-only shape (older server): synthesize jobIds.\n const jobIds = res.jobIds ?? (res.jobId ? [res.jobId] : [])\n return res.jobId ? { jobIds, jobId: res.jobId } : { jobIds }\n }\n\n /**\n * Fire `POST /v1/generate-object-asset` to produce a single variant.\n * When the studio path is set (`attachToObjectId` + `attachToColumn` +\n * `attachName`), the worker appends `{ name: attachName, url: <result> }`\n * to the named JSONB array column on completion.\n *\n * Note: `attachToColumn` is REQUIRED for `assetType === \"custom\"` — the\n * worker can't infer the bucket from the asset type. For canonical asset\n * types (`angles` / `materials` / `variations` / `motion`), the column is\n * derived automatically by the route.\n */\n generateAsset(\n data: GenerateObjectAssetInput,\n ): Promise<GenerateObjectAssetResult> {\n return this.client.request(\"POST\", \"/v1/generate-object-asset\", { body: data })\n }\n\n /**\n * Fire `POST /v1/generate-object-motion` to animate the object's main\n * image into a motion clip. Image-to-video, single clip per call; the\n * attach column is hardcoded to `motion_clips` server-side (objects have a\n * single motion bucket so the caller doesn't supply `attachToColumn`).\n * When the studio path is set (`attachToObjectId` + `attachName`), the\n * worker appends `{ name: attachName, url: <result> }` to the row's\n * `motion_clips` column on completion.\n *\n * Defaults: `provider` → `\"kling-turbo\"`, `aspectRatio` → `\"1:1\"` (set\n * server-side via `resolveObjectAspectRatio({ assetType: \"motion\" })`).\n */\n generateMotion(\n data: GenerateObjectMotionInput,\n ): Promise<GenerateObjectMotionResult> {\n return this.client.request(\"POST\", \"/v1/generate-object-motion\", { body: data })\n }\n\n /**\n * Approve a completed `generate-object` job as the object's main image.\n * Sets `source_image_url` and fires the LLM caption (Claude Sonnet vision)\n * inline. Returns the new main-image URL plus the caption.\n *\n * Caption-failure semantics: the route still sends `\"\"` on LLM sub-failure,\n * but the SDK normalizes `\"\"` → `null` here so `canonicalDescription` carries\n * the same `string | null` semantics as characters. The main image is still\n * set; call `recaption()` to retry.\n *\n * Optimistic-concurrency: pass `expectedUpdatedAt` to gate the update on\n * the row's current `updated_at`; on mismatch the route returns 409\n * `concurrent_modification` carrying the fresh token.\n */\n async approveMainImage(\n id: string,\n candidateJobId: string,\n expectedUpdatedAt?: string,\n ): Promise<ApproveObjectMainImageResult> {\n const res = await this.client.request<{ sourceImageUrl: string; canonicalDescription: string | null }>(\n \"POST\",\n `/v1/objects/${encodeURIComponent(id)}/approve-main-image`,\n { body: { candidateJobId, expectedUpdatedAt } },\n )\n // Normalize the wire `\"\"` (LLM sub-failure) → null; build a new object\n // rather than mutating the response.\n return { sourceImageUrl: res.sourceImageUrl, canonicalDescription: res.canonicalDescription || null }\n }\n\n /**\n * Re-fire the LLM caption against the object's current main image. 502s\n * on LLM failure (unlike `approveMainImage` which preserves the side-effect\n * and returns \"\"); returns 400 `main_image_required` if no main image is\n * set yet.\n *\n * The route is a pure idempotent retry — it does NOT accept an\n * `expectedUpdatedAt` token (per Phase E1 calibration finding: backend\n * route is idempotent retry, not gated on optimistic-concurrency).\n */\n recaption(id: string): Promise<RecaptionObjectResult> {\n return this.client.request(\n \"POST\",\n `/v1/objects/${encodeURIComponent(id)}/llm-caption`,\n )\n }\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"chunk-CRCPRZFN.js"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"chunk-CYRFD6KR.cjs"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"chunk-D3PW7AHZ.js"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// src/resources/apps.ts
|
|
4
|
+
var AppsResource = class {
|
|
5
|
+
constructor(client) {
|
|
6
|
+
this.client = client;
|
|
7
|
+
}
|
|
8
|
+
client;
|
|
9
|
+
/** List published apps. Public — no auth required for community apps. */
|
|
10
|
+
list(params = {}) {
|
|
11
|
+
const qs = new URLSearchParams();
|
|
12
|
+
if (params.search) qs.set("search", params.search);
|
|
13
|
+
if (params.limit !== void 0) qs.set("limit", String(params.limit));
|
|
14
|
+
if (params.cursor) qs.set("cursor", params.cursor);
|
|
15
|
+
if (params.category) qs.set("category", params.category);
|
|
16
|
+
const query = qs.toString();
|
|
17
|
+
return this.client.request("GET", `/v1/apps/browse${query ? `?${query}` : ""}`);
|
|
18
|
+
}
|
|
19
|
+
/** Get one app's metadata + input schema by slug. */
|
|
20
|
+
get(slug) {
|
|
21
|
+
return this.client.request("GET", `/v1/app/${encodeURIComponent(slug)}`);
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Trigger an app run with the given input values. The keys in `inputs` must
|
|
25
|
+
* match the app's input-schema field names (see `get(slug).inputSchema`).
|
|
26
|
+
* `opts.inputOverrides` adds raw per-node overrides (see {@link RunAppOptions}).
|
|
27
|
+
* Returns the execution-id for status polling via client.executions.get().
|
|
28
|
+
*/
|
|
29
|
+
run(slug, inputs = {}, opts = {}) {
|
|
30
|
+
return this.client.request("POST", `/v1/app/${encodeURIComponent(slug)}/run`, {
|
|
31
|
+
body: { inputs, ...opts.inputOverrides ? { inputOverrides: opts.inputOverrides } : {} }
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
/** List past runs for an app (the caller must own the app or the runs). */
|
|
35
|
+
listRuns(slug, params = {}) {
|
|
36
|
+
const qs = new URLSearchParams();
|
|
37
|
+
if (params.limit !== void 0) qs.set("limit", String(params.limit));
|
|
38
|
+
if (params.cursor) qs.set("cursor", params.cursor);
|
|
39
|
+
const query = qs.toString();
|
|
40
|
+
return this.client.request(
|
|
41
|
+
"GET",
|
|
42
|
+
`/v1/app/${encodeURIComponent(slug)}/runs${query ? `?${query}` : ""}`
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
/** Get one app-run by id. */
|
|
46
|
+
getRun(slug, runId) {
|
|
47
|
+
return this.client.request(
|
|
48
|
+
"GET",
|
|
49
|
+
`/v1/app/${encodeURIComponent(slug)}/runs/${encodeURIComponent(runId)}`
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
resume(slug, runId, opts = {}) {
|
|
53
|
+
return this.client.request(
|
|
54
|
+
"POST",
|
|
55
|
+
`/v1/app/${encodeURIComponent(slug)}/runs/${encodeURIComponent(runId)}/resume`,
|
|
56
|
+
{
|
|
57
|
+
body: {
|
|
58
|
+
...opts.dryRun ? { dryRun: true } : {},
|
|
59
|
+
...opts.version !== void 0 ? { version: opts.version } : {}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Archive (soft-delete) a published-app run. The run is hidden from the
|
|
66
|
+
* default run list and can be restored or permanently deleted from the
|
|
67
|
+
* archive view at https://app.nodaro.ai/archived-runs.
|
|
68
|
+
*
|
|
69
|
+
* @param slug The published app's slug (the last path segment of its URL).
|
|
70
|
+
* @param runId The run's UUID.
|
|
71
|
+
*/
|
|
72
|
+
deleteRun(slug, runId) {
|
|
73
|
+
return this.client.request(
|
|
74
|
+
"DELETE",
|
|
75
|
+
`/v1/app/${encodeURIComponent(slug)}/runs/${encodeURIComponent(runId)}`
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
exports.AppsResource = AppsResource;
|
|
81
|
+
//# sourceMappingURL=chunk-DKEYSJCE.cjs.map
|
|
82
|
+
//# sourceMappingURL=chunk-DKEYSJCE.cjs.map
|