@nodaro/sdk 2.29.0 → 2.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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-4CXB7RA6.js +104 -0
- package/dist/chunk-4CXB7RA6.js.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-65E3JBFZ.js +52 -0
- package/dist/chunk-65E3JBFZ.js.map +1 -0
- package/dist/chunk-6ECW23GA.js +214 -0
- package/dist/chunk-6ECW23GA.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-7CK6I4CT.cjs +16 -0
- package/dist/chunk-7CK6I4CT.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-B7RG6AUQ.cjs +216 -0
- package/dist/chunk-B7RG6AUQ.cjs.map +1 -0
- package/dist/chunk-BAL576G2.cjs +4 -0
- package/dist/chunk-BAL576G2.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-FB3S2FON.cjs +233 -0
- package/dist/chunk-FB3S2FON.cjs.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-GB724HW2.cjs +106 -0
- package/dist/chunk-GB724HW2.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-GWCOKNST.js +228 -0
- package/dist/chunk-GWCOKNST.js.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-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-PHEA6FVQ.js +184 -0
- package/dist/chunk-PHEA6FVQ.js.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-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-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-S7JQKNVT.cjs +187 -0
- package/dist/chunk-S7JQKNVT.cjs.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-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-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-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/chunk-ZYPH2FPT.js +3 -0
- package/dist/chunk-ZYPH2FPT.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 +237 -0
- package/dist/entries/credits.d.ts +237 -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 +67 -10895
- package/dist/index.d.ts +67 -10895
- package/dist/index.js +100 -5074
- package/dist/index.js.map +1 -1
- package/dist/nodes-C-wrO6Sg.d.ts +1364 -0
- package/dist/nodes-J8ByUN8z.d.cts +1364 -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,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":"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","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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/resources/apps.ts"],"names":[],"mappings":"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","file":"chunk-DKEYSJCE.cjs","sourcesContent":["import type { NodaroClientCore } from \"../core.js\"\n\n/**\n * A published app — a workflow wrapped in a curated input/output presentation.\n * Returned by the public `/v1/apps/browse` endpoint.\n */\nexport interface PublishedApp {\n id: string\n slug: string\n name: string\n description?: string | null\n creatorId: string\n creatorName?: string | null\n thumbnailUrl?: string | null\n category?: string | null\n isFeatured?: boolean\n runCount?: number\n /** The listed price per run; when `perMinuteCredits` is above 0, its fixed part. */\n estimatedCredits?: number | null\n /**\n * Credits per minute of the recording the app is given, when its price\n * follows that recording's length: the price is `estimatedCredits` plus\n * this per minute. 0 or absent when the price does not depend on a\n * recording's length.\n */\n perMinuteCredits?: number\n /**\n * Credits for each item beyond the creator's saved items of a list input\n * the app's user fills: the price is the listed one plus this per further\n * item. 0 or absent when the app has no such input.\n */\n perItemCredits?: number\n /**\n * The listed price is a range: `estimatedCredits` (with `perMinuteCredits` /\n * `perItemCredits`) is \"from\" — the app's saved settings — and these are\n * \"up to\": the most a run can cost over the choices the app's user has (every\n * exposed field, at the creator's restricted values where set). Present only\n * when they differ from \"from\"; absent on an app published before the range\n * existed until its next publish.\n */\n maxEstimatedCredits?: number\n maxPerMinuteCredits?: number\n maxPerItemCredits?: number\n createdAt: string\n updatedAt: string\n}\n\nexport interface ListAppsParams {\n /** Substring search across app name + description. */\n search?: string\n /** Page size; backend caps at 50. */\n limit?: number\n /** Cursor token returned by the previous page. */\n cursor?: string\n /** Filter to a single category slug. */\n category?: string\n}\n\nexport interface ListAppsResult {\n data: PublishedApp[]\n nextCursor?: string | null\n}\n\n/**\n * App detail — includes the input schema (required + optional fields end users\n * fill in) and the output mapping (which workflow nodes produce which display\n * cards).\n */\nexport interface PublishedAppDetail extends PublishedApp {\n inputSchema: Record<string, unknown>\n outputs: Array<{ nodeId: string; label: string; type: string }>\n /**\n * The app run alone: the listed price less its Render final part (run and\n * charged separately) — fixed, per minute of the recording and per further\n * list item. Absent from a server that predates them; read the listed\n * `estimatedCredits` / `perMinuteCredits` / `perItemCredits` instead.\n */\n runEstimatedCredits?: number\n runPerMinuteCredits?: number\n runPerItemCredits?: number\n /**\n * Whether this server charges Edit Plan per started minute of the recording\n * (otherwise in 15/30/60/90/120/180-minute steps). Absent from a server that\n * predates it: read it as the steps.\n */\n editPlanPerMinute?: boolean\n}\n\nexport interface AppRunResult {\n /** The execution-id that was started — poll via client.executions.get(). */\n executionId: string\n status: \"pending\" | \"running\"\n /** App-run id (distinct from executionId — used by listRuns/getRun). */\n runId?: string\n}\n\nexport interface AppRun {\n id: string\n appSlug: string\n executionId: string\n status: \"pending\" | \"running\" | \"completed\" | \"failed\" | \"cancelled\"\n inputs: Record<string, unknown>\n outputs?: Array<{ nodeId: string; type: string; url?: string; text?: string }>\n startedAt: string\n finishedAt?: string | null\n}\n\nexport interface ListAppRunsParams {\n limit?: number\n cursor?: string\n}\n\n/**\n * Result of a soft-delete (archive) operation. The run is moved to the user's\n * archive in the Nodaro UI; restoration and permanent deletion are UI-only by\n * design — SDK / MCP / API delete callers can't accidentally destroy data.\n */\nexport interface DeleteAppRunResult {\n success: true\n archived: true\n}\n\n/** Advanced per-run options for `apps.run`. */\nexport interface RunAppOptions {\n /**\n * Raw node-data overrides keyed by node id → field → value, merged onto the\n * app's workflow for THIS run only. Reaches fields that are NOT exposed as app\n * inputs — e.g. `{ [nodeId]: { promptPrefix: \"…\", promptSuffix: \"…\" } }` to\n * wrap the end user's prompt with text they never see.\n */\n inputOverrides?: Record<string, Record<string, unknown>>\n}\n\n/** Options for `apps.resume` — the Retry of a failed app run. */\nexport interface ResumeAppRunOptions {\n /** Answer what the Retry would run and charge, and start nothing. */\n dryRun?: boolean\n /**\n * The app version you expect the Retry to run — the one starting over would\n * run. Absent: the app's latest. A run of another version is refused with\n * `app_run_version_changed`; send the run's own version (the refusal's\n * `runVersion`) to continue on it anyway.\n */\n version?: number\n}\n\n/** One step a Retry runs again. */\nexport interface AppRunResumeStep {\n nodeId: string\n type: string\n /** The node's label, or `null` when it has none. */\n label: string | null\n}\n\n/** What a Retry would do (`apps.resume(…, { dryRun: true })`); nothing is started. */\nexport interface AppRunResumePlan {\n runId: string\n /** The failed execution the Retry continues. */\n continuesExecutionId: string\n /** The app version the Retry runs (the run's own). */\n appVersion: number | null\n /** Every node the Retry runs, in graph order. */\n nodeIds: string[]\n /** The steps that run again. */\n steps: AppRunResumeStep[]\n /** What the Retry is expected to charge, the creator's fee included; `null` without credits. */\n estimatedCredits: number | null\n /** Clips handed back at no cost. */\n reusedClips: number\n /** Whether your balance and your app credits cover what the Retry holds while it runs; `null` without credits. */\n sufficient: boolean | null\n /** Your spendable balance; `null` without credits. */\n available: number | null\n /** Your app credits, present only when they are what stops the Retry (it would be refused `insufficient_app_credits`). */\n appCreditsAllowance?: number\n}\n\n/**\n * A Retry that started. `deduped: true` when a concurrent double press reached\n * the same Retry; a second call made while the first is pending is refused\n * with `already_running` (`AlreadyRunningError`) instead.\n */\nexport interface AppRunResumeResult {\n /** The Retry's execution — the run now points at it. Poll via client.executions.get(). */\n executionId: string\n runId: string\n status: \"pending\"\n /** Every node the Retry runs. */\n nodeIds: string[]\n /** `true` when a concurrent press had already started this Retry. */\n deduped?: true\n}\n\n/**\n * The `code` the server gives an `apps.resume` refusal. Nothing is written or\n * billed when a Retry is refused. How each arrives:\n * - `app_run_version_changed` as `AppRunVersionChangedError`;\n * - `already_running` as `AlreadyRunningError` (with the live `executionId`);\n * - `not_found` and `continuation_not_found` as `NotFoundError`, whose `code`\n * is always `not_found` (the server's message is kept);\n * - `insufficient_credits` and `insufficient_app_credits` as\n * `InsufficientCreditsError`, whose `code` is always `insufficient_credits`\n * (the server's message says which);\n * - the rest as `NodaroError` carrying this code.\n */\nexport type AppRunResumeRefusalCode =\n /** No such run of yours under this app. */\n | \"not_found\"\n /** The run's execution is not yours. */\n | \"continuation_not_found\"\n /** A malformed run id or body, or a component's run (continued by the run that called it). */\n | \"validation_error\"\n /** The app version the run ran is gone: start the run over. */\n | \"app_run_version_unavailable\"\n /** The app is on another version than the run ran: start over, or send `version` = the run's. */\n | \"app_run_version_changed\"\n /** The run's execution ran another workflow, or another version of it (rare). */\n | \"continuation_workflow_mismatch\"\n | \"continuation_version_mismatch\"\n /** The run did not fail (it completed or was stopped): start it over. */\n | \"continuation_not_failed\"\n /** The run is still running, a Retry of it is pending, or it was started again elsewhere. */\n | \"already_running\"\n /** Nothing is left to retry: every step completed (409), or the app runs no step (400). */\n | \"continuation_subset_required\"\n /** An input the run applied sets a field the app does not let a runner set. */\n | \"locked_field\"\n /**\n * The Retry would stop at a Preview with nobody to review it: retry it from the app page.\n * (The same refusal arrives under the other preview refusal codes when a review-on use-case\n * node holds the run; `isPreviewRefusalCode` in `@nodaro/shared/nodes` asks for all of them.)\n */\n | \"preview_review_required\"\n /** Your app credits cannot cover it. */\n | \"insufficient_app_credits\"\n /** Your balance cannot cover it. */\n | \"insufficient_credits\"\n /** Billing is briefly unavailable for a workspace run (503): try again shortly. */\n | \"billing_unavailable\"\n\nexport class AppsResource {\n constructor(private client: NodaroClientCore) {}\n\n /** List published apps. Public — no auth required for community apps. */\n list(params: ListAppsParams = {}): Promise<ListAppsResult> {\n const qs = new URLSearchParams()\n if (params.search) qs.set(\"search\", params.search)\n if (params.limit !== undefined) qs.set(\"limit\", String(params.limit))\n if (params.cursor) qs.set(\"cursor\", params.cursor)\n if (params.category) qs.set(\"category\", params.category)\n const query = qs.toString()\n return this.client.request(\"GET\", `/v1/apps/browse${query ? `?${query}` : \"\"}`)\n }\n\n /** Get one app's metadata + input schema by slug. */\n get(slug: string): Promise<{ data: PublishedAppDetail }> {\n return this.client.request(\"GET\", `/v1/app/${encodeURIComponent(slug)}`)\n }\n\n /**\n * Trigger an app run with the given input values. The keys in `inputs` must\n * match the app's input-schema field names (see `get(slug).inputSchema`).\n * `opts.inputOverrides` adds raw per-node overrides (see {@link RunAppOptions}).\n * Returns the execution-id for status polling via client.executions.get().\n */\n run(\n slug: string,\n inputs: Record<string, unknown> = {},\n opts: RunAppOptions = {},\n ): Promise<AppRunResult> {\n return this.client.request(\"POST\", `/v1/app/${encodeURIComponent(slug)}/run`, {\n body: { inputs, ...(opts.inputOverrides ? { inputOverrides: opts.inputOverrides } : {}) },\n })\n }\n\n /** List past runs for an app (the caller must own the app or the runs). */\n listRuns(slug: string, params: ListAppRunsParams = {}): Promise<{ data: AppRun[]; nextCursor?: string | null }> {\n const qs = new URLSearchParams()\n if (params.limit !== undefined) qs.set(\"limit\", String(params.limit))\n if (params.cursor) qs.set(\"cursor\", params.cursor)\n const query = qs.toString()\n return this.client.request(\n \"GET\",\n `/v1/app/${encodeURIComponent(slug)}/runs${query ? `?${query}` : \"\"}`,\n )\n }\n\n /** Get one app-run by id. */\n getRun(slug: string, runId: string): Promise<{ data: AppRun }> {\n return this.client.request(\n \"GET\",\n `/v1/app/${encodeURIComponent(slug)}/runs/${encodeURIComponent(runId)}`,\n )\n }\n\n /**\n * Retry a FAILED app run from where it stopped: only the steps it did not\n * complete run, and only those are charged; every step it completed hands\n * on its result. It runs the version the run ran, with the inputs the run\n * applied (it takes none of its own). The run's execution moves to the\n * Retry's.\n *\n * `{ dryRun: true }` answers what the Retry would run and charge\n * ({@link AppRunResumePlan}) and starts nothing — show it before a Retry.\n * Refusals are listed in {@link AppRunResumeRefusalCode}; to run with other\n * inputs or on the app's current version, start over with\n * `run(slug, inputs)` instead.\n *\n * @param slug The published app's slug.\n * @param runId The run's UUID (`AppRunResult.runId`, `AppRun.id`).\n */\n resume(slug: string, runId: string, opts: ResumeAppRunOptions & { dryRun: true }): Promise<{ data: AppRunResumePlan }>\n resume(slug: string, runId: string, opts?: ResumeAppRunOptions & { dryRun?: false }): Promise<AppRunResumeResult>\n resume(slug: string, runId: string, opts?: ResumeAppRunOptions): Promise<{ data: AppRunResumePlan } | AppRunResumeResult>\n resume(slug: string, runId: string, opts: ResumeAppRunOptions = {}): Promise<{ data: AppRunResumePlan } | AppRunResumeResult> {\n return this.client.request(\n \"POST\",\n `/v1/app/${encodeURIComponent(slug)}/runs/${encodeURIComponent(runId)}/resume`,\n {\n body: {\n ...(opts.dryRun ? { dryRun: true } : {}),\n ...(opts.version !== undefined ? { version: opts.version } : {}),\n },\n },\n )\n }\n\n /**\n * Archive (soft-delete) a published-app run. The run is hidden from the\n * default run list and can be restored or permanently deleted from the\n * archive view at https://app.nodaro.ai/archived-runs.\n *\n * @param slug The published app's slug (the last path segment of its URL).\n * @param runId The run's UUID.\n */\n deleteRun(slug: string, runId: string): Promise<DeleteAppRunResult> {\n return this.client.request(\n \"DELETE\",\n `/v1/app/${encodeURIComponent(slug)}/runs/${encodeURIComponent(runId)}`,\n )\n }\n}\n"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// src/resources/tutorials.ts
|
|
2
|
+
var TutorialsResource = class {
|
|
3
|
+
constructor(client) {
|
|
4
|
+
this.client = client;
|
|
5
|
+
}
|
|
6
|
+
client;
|
|
7
|
+
/** All enabled tutorial categories with their videos and flow tutorials. Public. */
|
|
8
|
+
list() {
|
|
9
|
+
return this.client.request("GET", "/v1/tutorials");
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export { TutorialsResource };
|
|
14
|
+
//# sourceMappingURL=chunk-DPSMVOM3.js.map
|
|
15
|
+
//# sourceMappingURL=chunk-DPSMVOM3.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/resources/tutorials.ts"],"names":[],"mappings":";AAuDO,IAAM,oBAAN,MAAwB;AAAA,EAC7B,YAAoB,MAAA,EAA0B;AAA1B,IAAA,IAAA,CAAA,MAAA,GAAA,MAAA;AAAA,EAA2B;AAAA,EAA3B,MAAA;AAAA;AAAA,EAGpB,IAAA,GAAoD;AAClD,IAAA,OAAO,IAAA,CAAK,MAAA,CAAO,OAAA,CAAQ,KAAA,EAAO,eAAe,CAAA;AAAA,EACnD;AACF","file":"chunk-DPSMVOM3.js","sourcesContent":["import type { NodaroClientCore } from \"../core.js\"\n\n/**\n * Public tutorials directory (`GET /v1/tutorials`) — video tutorials and\n * flow (template) tutorials, pre-grouped under the shared category taxonomy.\n * Read-only by design; curation is an admin surface outside the public SDK.\n */\n\nexport interface TutorialVideoItem {\n id: string\n type: \"video\"\n title: string\n description: string | null\n videoUrl: string\n thumbnailUrl: string | null\n categoryId: string\n sortOrder: number\n createdAt: string\n updatedAt: string\n}\n\n/** A workflow template surfaced as a tutorial; `slug` feeds `client.templates`. */\nexport interface TutorialFlowItem {\n id: string\n type: \"flow\"\n templateId: string\n slug: string | null\n title: string\n description: string | null\n markdownDescription: string | null\n previewMediaUrl: string | null\n previewMediaType: \"image\" | \"video\" | null\n complexity: string\n /** The listed price; when `estimatedPerMinuteCredits` is above 0, its fixed part. */\n estimatedCredits: number\n /** Credits per minute of the recording the template is given (see `TemplateBrowseCard`); 0 or absent when none. */\n estimatedPerMinuteCredits?: number\n nodeTypesUsed: string[]\n providersUsed: string[]\n nodeCount: number\n categoryId: string\n tutorialSortOrder: number\n workflowId: string\n createdAt: string\n}\n\nexport interface TutorialCategory {\n id: string\n name: string\n slug: string\n sortOrder: number\n videos: TutorialVideoItem[]\n flows: TutorialFlowItem[]\n}\n\nexport class TutorialsResource {\n constructor(private client: NodaroClientCore) {}\n\n /** All enabled tutorial categories with their videos and flow tutorials. Public. */\n list(): Promise<{ categories: TutorialCategory[] }> {\n return this.client.request(\"GET\", \"/v1/tutorials\")\n }\n}\n"]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// src/resources/prompt-helper.ts
|
|
2
|
+
var PromptHelperResource = class {
|
|
3
|
+
constructor(client) {
|
|
4
|
+
this.client = client;
|
|
5
|
+
}
|
|
6
|
+
client;
|
|
7
|
+
analyze(input) {
|
|
8
|
+
return this.client.request("POST", "/v1/prompt-helper/wizard", { body: { action: "analyze", ...input } });
|
|
9
|
+
}
|
|
10
|
+
generate(input) {
|
|
11
|
+
return this.client.request("POST", "/v1/prompt-helper/wizard", { body: { action: "generate", ...input } });
|
|
12
|
+
}
|
|
13
|
+
enhance(input) {
|
|
14
|
+
return this.client.request("POST", "/v1/prompt-helper/wizard", { body: { action: "enhance", ...input } });
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export { PromptHelperResource };
|
|
19
|
+
//# sourceMappingURL=chunk-E2ZXHS6E.js.map
|
|
20
|
+
//# sourceMappingURL=chunk-E2ZXHS6E.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/resources/prompt-helper.ts"],"names":[],"mappings":";AAqEO,IAAM,uBAAN,MAA2B;AAAA,EAChC,YAAoB,MAAA,EAA0B;AAA1B,IAAA,IAAA,CAAA,MAAA,GAAA,MAAA;AAAA,EAA2B;AAAA,EAA3B,MAAA;AAAA,EAEpB,QAAQ,KAAA,EAA6C;AACnD,IAAA,OAAO,IAAA,CAAK,MAAA,CAAO,OAAA,CAAQ,MAAA,EAAQ,0BAAA,EAA4B,EAAE,IAAA,EAAM,EAAE,MAAA,EAAQ,SAAA,EAAW,GAAG,KAAA,IAAS,CAAA;AAAA,EAC1G;AAAA,EAEA,SAAS,KAAA,EAA6C;AACpD,IAAA,OAAO,IAAA,CAAK,MAAA,CAAO,OAAA,CAAQ,MAAA,EAAQ,0BAAA,EAA4B,EAAE,IAAA,EAAM,EAAE,MAAA,EAAQ,UAAA,EAAY,GAAG,KAAA,IAAS,CAAA;AAAA,EAC3G;AAAA,EAEA,QAAQ,KAAA,EAA4C;AAClD,IAAA,OAAO,IAAA,CAAK,MAAA,CAAO,OAAA,CAAQ,MAAA,EAAQ,0BAAA,EAA4B,EAAE,IAAA,EAAM,EAAE,MAAA,EAAQ,SAAA,EAAW,GAAG,KAAA,IAAS,CAAA;AAAA,EAC1G;AACF","file":"chunk-E2ZXHS6E.js","sourcesContent":["import type { NodaroClientCore } from \"../core.js\"\nimport type { WizardQuestion, WizardSelection, RecommendedModel, WizardNodeContext } from \"@nodaro/prompts/doctrine\"\nexport type { WizardQuestion, WizardOption, WizardSelection, RecommendedModel, WizardNodeContext } from \"@nodaro/prompts/doctrine\"\n\n// Re-export the canonical wizard types (SSOT in @nodaro/shared).\n\ninterface CommonInput {\n nodeType: string\n provider?: string\n style?: string\n aspectRatio?: string\n duration?: number\n llmModel?: string\n /** Reasoning effort level (model-dependent). */\n reasoningEffort?: string\n /**\n * Gemini and Claude models. Runs the request on the provider's own API so\n * `temperature`, `maxTokens` and the full reasoning range actually take\n * effect — on the default lane those levers are not reliably honoured.\n * Bills one credit rung up (a premium model moves to premium-direct). A model without a direct lane returns\n * `400 advanced_mode_unsupported`.\n */\n advancedMode?: boolean\n /** Sampling temperature. Only honoured when `advancedMode` is true. */\n temperature?: number\n /** Output token cap. Only honoured when `advancedMode` is true. */\n maxTokens?: number\n nodeContext?: WizardNodeContext\n userPreference?: string\n /** Associates this call with a workflow execution. Read server-side before Zod. */\n workflowId?: string\n}\n\nexport interface AnalyzeInput extends CommonInput {\n /** The user's rough idea. Omit to build questions from scratch. */\n prompt?: string\n}\nexport interface AnalyzeResult {\n jobId: string\n questions: WizardQuestion[]\n}\n\nexport interface GenerateInput extends CommonInput {\n /** The chosen answers from analyze. */\n selections: WizardSelection[]\n /** The user's original rough idea, woven into the generated prompt. */\n originalPrompt?: string\n}\n\nexport interface EnhanceInput extends CommonInput {\n /** The rough idea to improve one-shot. Omit to build from scratch. */\n prompt?: string\n}\n\nexport interface PromptResult {\n jobId: string\n prompt: string\n recommendedModel?: RecommendedModel\n}\n\n/**\n * AI Prompt Wizard — help write/improve prompts for generation nodes.\n *\n * - `analyze` -> guided questions, `generate` -> prompt from selections (the\n * 2-step human flow), or `enhance` -> one-shot \"improve this prompt\".\n *\n * All three delegate to `POST /v1/prompt-helper/wizard`. Throws `NodaroError`\n * on 4xx/5xx (e.g. `validation_error`, `malformed_response`).\n */\nexport class PromptHelperResource {\n constructor(private client: NodaroClientCore) {}\n\n analyze(input: AnalyzeInput): Promise<AnalyzeResult> {\n return this.client.request(\"POST\", \"/v1/prompt-helper/wizard\", { body: { action: \"analyze\", ...input } })\n }\n\n generate(input: GenerateInput): Promise<PromptResult> {\n return this.client.request(\"POST\", \"/v1/prompt-helper/wizard\", { body: { action: \"generate\", ...input } })\n }\n\n enhance(input: EnhanceInput): Promise<PromptResult> {\n return this.client.request(\"POST\", \"/v1/prompt-helper/wizard\", { body: { action: \"enhance\", ...input } })\n }\n}\n"]}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// src/resources/llm.ts
|
|
2
|
+
var LlmResource = class {
|
|
3
|
+
constructor(client) {
|
|
4
|
+
this.client = client;
|
|
5
|
+
}
|
|
6
|
+
client;
|
|
7
|
+
/**
|
|
8
|
+
* Synchronous forced-schema completion (`POST /v1/llm/structured`). A call
|
|
9
|
+
* can run several minutes — longer than the client's default 60 s
|
|
10
|
+
* `timeoutMs`; construct the client with a larger `timeoutMs` for this
|
|
11
|
+
* call, or use {@link LlmResource.structuredJob}.
|
|
12
|
+
*/
|
|
13
|
+
structured(input) {
|
|
14
|
+
return this.client.request("POST", "/v1/llm/structured", { body: input });
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* The same call as a job (`POST /v1/llm/structured/jobs`): answers `{ jobId }`
|
|
18
|
+
* at once. Poll `jobs.getStatus(jobId)` — `output_data` is an
|
|
19
|
+
* {@link LlmStructuredJobOutput}; `error_message` says why a run failed.
|
|
20
|
+
* `jobs.list({ type: "llm-structured", origin })` finds every run later.
|
|
21
|
+
* Throws `NotFoundError` on a platform that predates the route. An instance
|
|
22
|
+
* that proxies its LLM calls to nodaro.ai answers `503 provider_unavailable`
|
|
23
|
+
* permanently — the SDK surfaces that as a generic `NodaroError` with the
|
|
24
|
+
* same code; treat it as unavailable here, not as transient.
|
|
25
|
+
*/
|
|
26
|
+
structuredJob(input) {
|
|
27
|
+
return this.client.request("POST", "/v1/llm/structured/jobs", { body: input });
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export { LlmResource };
|
|
32
|
+
//# sourceMappingURL=chunk-E37CVHWW.js.map
|
|
33
|
+
//# sourceMappingURL=chunk-E37CVHWW.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/resources/llm.ts"],"names":[],"mappings":";AAoEO,IAAM,cAAN,MAAkB;AAAA,EACvB,YAAoB,MAAA,EAA0B;AAA1B,IAAA,IAAA,CAAA,MAAA,GAAA,MAAA;AAAA,EAA2B;AAAA,EAA3B,MAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQpB,WAAwB,KAAA,EAA4D;AAClF,IAAA,OAAO,IAAA,CAAK,OAAO,OAAA,CAAgC,MAAA,EAAQ,sBAAsB,EAAE,IAAA,EAAM,OAAO,CAAA;AAAA,EAClG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAYA,cAAc,KAAA,EAA0D;AACtE,IAAA,OAAO,IAAA,CAAK,OAAO,OAAA,CAA2B,MAAA,EAAQ,2BAA2B,EAAE,IAAA,EAAM,OAAO,CAAA;AAAA,EAClG;AACF","file":"chunk-E37CVHWW.js","sourcesContent":["import type { NodaroClientCore } from \"../core.js\"\n\n/**\n * Structured LLM output — `POST /v1/llm/structured` and its asynchronous\n * twin. The platform supplies the model lane, forced JSON-Schema output with\n * validation and error-fed retries, the job row and the credit lifecycle; the\n * caller supplies its own system prompt and schema (an app-owned vocabulary\n * the platform cannot know — Nodaro Studio's production plan is the first).\n */\nexport interface LlmStructuredInput {\n /** The system prompt (≤ 100,000 chars). */\n system: string\n /** The user turn (1–100,000 chars). */\n input: string\n /** A JSON Schema OBJECT (`type: \"object\"`, ≤ 64 KB, ≤ 20 levels) in the\n * keyword subset the server converts — see the API guide. */\n jsonSchema: Record<string, unknown>\n /** Names the forced-output tool the provider sees (≤ 64 chars). */\n schemaName?: string\n llmModel?: string\n reasoningEffort?: string\n /** Invalid answers fed back with their error before the call fails (0–3, default 2). */\n maxRetries?: number\n /** Your app's slug — attribution only; `jobs.list({ origin })` finds the rows. */\n origin?: string\n advancedMode?: boolean\n temperature?: number\n maxTokens?: number\n}\n\nexport interface LlmStructuredResult<T = unknown> {\n jobId: string\n output: T\n usage: { inputTokens: number; outputTokens: number }\n}\n\nexport interface LlmStructuredJobInput extends LlmStructuredInput {\n /** Display label stored on the job (≤ 120 chars) — a run list's row title. */\n label?: string\n /** Draft FROM this video: the platform analyzes it first (`POST\n * /v1/video-analysis`, a separate job you own) and appends the analysis\n * to `input` before the LLM call. */\n videoUrl?: string\n /** Analysis options, handed to the analysis route unchanged (its tiers). */\n videoAnalysis?: { llmModel?: string; selectionMode?: \"choose\" | \"combine\" }\n /** Draft from THIS finished `video-analysis` job of yours instead of\n * analyzing `videoUrl` again: no second analysis, no second analysis\n * charge — a retry after a failed draft, another model, different\n * notes. `videoUrl` may still ride beside it as the record of the source.\n * 422 when the job is not yours, does not exist, or is not a finished,\n * readable video analysis (`analysis_not_found` / `not_analysis` /\n * `analysis_failed` / `analysis_not_ready` / `invalid_analysis` — never a\n * 404, which means the route itself is absent). Not combinable with\n * `videoAnalysis`. */\n analysisJobId?: string\n}\n\n/** `output_data` of an `llm-structured` job as it progresses: `stage` while\n * running (`analyzing` only for movie runs), then the result. */\nexport interface LlmStructuredJobOutput<T = unknown> {\n stage?: \"analyzing\" | \"drafting\"\n output?: T\n inputTokens?: number\n outputTokens?: number\n analysisJobId?: string\n analysisCredits?: number\n}\n\nexport class LlmResource {\n constructor(private client: NodaroClientCore) {}\n\n /**\n * Synchronous forced-schema completion (`POST /v1/llm/structured`). A call\n * can run several minutes — longer than the client's default 60 s\n * `timeoutMs`; construct the client with a larger `timeoutMs` for this\n * call, or use {@link LlmResource.structuredJob}.\n */\n structured<T = unknown>(input: LlmStructuredInput): Promise<LlmStructuredResult<T>> {\n return this.client.request<LlmStructuredResult<T>>(\"POST\", \"/v1/llm/structured\", { body: input })\n }\n\n /**\n * The same call as a job (`POST /v1/llm/structured/jobs`): answers `{ jobId }`\n * at once. Poll `jobs.getStatus(jobId)` — `output_data` is an\n * {@link LlmStructuredJobOutput}; `error_message` says why a run failed.\n * `jobs.list({ type: \"llm-structured\", origin })` finds every run later.\n * Throws `NotFoundError` on a platform that predates the route. An instance\n * that proxies its LLM calls to nodaro.ai answers `503 provider_unavailable`\n * permanently — the SDK surfaces that as a generic `NodaroError` with the\n * same code; treat it as unavailable here, not as transient.\n */\n structuredJob(input: LlmStructuredJobInput): Promise<{ jobId: string }> {\n return this.client.request<{ jobId: string }>(\"POST\", \"/v1/llm/structured/jobs\", { body: input })\n }\n}\n"]}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
// src/resources/jobs.ts
|
|
2
|
+
function listParam(value) {
|
|
3
|
+
if (value === void 0) return void 0;
|
|
4
|
+
return typeof value === "string" ? value : value.join(",");
|
|
5
|
+
}
|
|
6
|
+
var JobsResource = class {
|
|
7
|
+
constructor(client) {
|
|
8
|
+
this.client = client;
|
|
9
|
+
}
|
|
10
|
+
client;
|
|
11
|
+
/** Get a single job by ID. */
|
|
12
|
+
get(id) {
|
|
13
|
+
return this.client.request("GET", `/v1/jobs/${encodeURIComponent(id)}`);
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Your jobs, newest first (`GET /v1/jobs`), cursor-paginated. `type` and
|
|
17
|
+
* `origin` filter on the job's own `input_data`, which every job carries —
|
|
18
|
+
* a client app lists its runs with `{ type: "llm-structured", origin: "studio" }`.
|
|
19
|
+
* `status` and `type` take one value or a list; `favorited` and `rating`
|
|
20
|
+
* filter on your own marks. Every filter combines with AND, and each job
|
|
21
|
+
* carries `favorited` and `rating`.
|
|
22
|
+
*/
|
|
23
|
+
list(params = {}) {
|
|
24
|
+
const { status, type, ...rest } = params;
|
|
25
|
+
return this.client.request("GET", "/v1/jobs", {
|
|
26
|
+
query: { ...rest, status: listParam(status), type: listParam(type) }
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Rate one of your jobs `"good"` or `"bad"`, or clear the rating with
|
|
31
|
+
* `null` (`PUT /v1/jobs/:id/rating`). Only the job's owner rates it — anyone
|
|
32
|
+
* else's job is a `NotFoundError`. The rating reads back as `Job.rating`
|
|
33
|
+
* and filters {@link list}. OAuth apps need the `assets:write` scope.
|
|
34
|
+
*/
|
|
35
|
+
rate(id, rating) {
|
|
36
|
+
return this.client.request("PUT", `/v1/jobs/${encodeURIComponent(id)}/rating`, {
|
|
37
|
+
body: { rating }
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Get the lean status of a single job (poll-loop friendly).
|
|
42
|
+
* Hits `GET /v1/jobs/:id/status` — returns only id/status/progress/
|
|
43
|
+
* output_data/error_message, with far less wire/CPU cost than `get()`.
|
|
44
|
+
* Same auth + ownership semantics as {@link get}.
|
|
45
|
+
*/
|
|
46
|
+
getStatus(id) {
|
|
47
|
+
return this.client.request(
|
|
48
|
+
"GET",
|
|
49
|
+
`/v1/jobs/${encodeURIComponent(id)}/status`
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Cancel a job. Server route is `POST /v1/jobs/:jobId/cancel`.
|
|
54
|
+
* Refunds any reserved credit holds.
|
|
55
|
+
*/
|
|
56
|
+
cancel(id) {
|
|
57
|
+
return this.client.request(
|
|
58
|
+
"POST",
|
|
59
|
+
`/v1/jobs/${encodeURIComponent(id)}/cancel`
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Delete a job and the private media it produced. Server route is
|
|
64
|
+
* `DELETE /v1/jobs/:jobId`. Only the job's owner (or an admin) may delete it;
|
|
65
|
+
* a job that is still running is deleted as-is — cancel it first when its
|
|
66
|
+
* worker should stop ({@link cancel}).
|
|
67
|
+
*/
|
|
68
|
+
delete(id) {
|
|
69
|
+
return this.client.request(
|
|
70
|
+
"DELETE",
|
|
71
|
+
`/v1/jobs/${encodeURIComponent(id)}`
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
export { JobsResource };
|
|
77
|
+
//# sourceMappingURL=chunk-E5BM4BLO.js.map
|
|
78
|
+
//# sourceMappingURL=chunk-E5BM4BLO.js.map
|