@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,30 @@
|
|
|
1
|
+
// src/resources/reduce.ts
|
|
2
|
+
var ReduceResource = class {
|
|
3
|
+
constructor(client) {
|
|
4
|
+
this.client = client;
|
|
5
|
+
}
|
|
6
|
+
client;
|
|
7
|
+
/**
|
|
8
|
+
* Run the Reduce (fan-in) node directly — useful for scripted batch
|
|
9
|
+
* scoring, picking the best of N generations outside a workflow, or
|
|
10
|
+
* one-shot programmatic merges.
|
|
11
|
+
*
|
|
12
|
+
* Throws `NodaroError` on 4xx/5xx responses (e.g. `code: "no_valid_inputs"`
|
|
13
|
+
* with status 400 when every input is empty / whitespace; the underlying
|
|
14
|
+
* `EmptyInputError` is mapped to a 400 server-side).
|
|
15
|
+
*/
|
|
16
|
+
run(input) {
|
|
17
|
+
return this.client.request("POST", "/v1/reduce", {
|
|
18
|
+
body: {
|
|
19
|
+
strategyId: input.strategyId,
|
|
20
|
+
strategyConfig: input.strategyConfig ?? {},
|
|
21
|
+
inputs: input.inputs,
|
|
22
|
+
...input.workflowId !== void 0 ? { workflowId: input.workflowId } : {}
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export { ReduceResource };
|
|
29
|
+
//# sourceMappingURL=chunk-IHKIYVZQ.js.map
|
|
30
|
+
//# sourceMappingURL=chunk-IHKIYVZQ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/resources/reduce.ts"],"names":[],"mappings":";AA6CO,IAAM,iBAAN,MAAqB;AAAA,EAC1B,YAAoB,MAAA,EAA0B;AAA1B,IAAA,IAAA,CAAA,MAAA,GAAA,MAAA;AAAA,EAA2B;AAAA,EAA3B,MAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAWpB,IAAI,KAAA,EAA2C;AAC7C,IAAA,OAAO,IAAA,CAAK,MAAA,CAAO,OAAA,CAAQ,MAAA,EAAQ,YAAA,EAAc;AAAA,MAC/C,IAAA,EAAM;AAAA,QACJ,YAAY,KAAA,CAAM,UAAA;AAAA,QAClB,cAAA,EAAgB,KAAA,CAAM,cAAA,IAAkB,EAAC;AAAA,QACzC,QAAQ,KAAA,CAAM,MAAA;AAAA,QACd,GAAI,MAAM,UAAA,KAAe,MAAA,GACrB,EAAE,UAAA,EAAY,KAAA,CAAM,UAAA,EAAW,GAC/B;AAAC;AACP,KACD,CAAA;AAAA,EACH;AACF","file":"chunk-IHKIYVZQ.js","sourcesContent":["import type { NodaroClientCore } from \"../core.js\"\nimport type { ReduceStrategyId, ReduceMeta } from \"@nodaro/shared/workflow\"\n\n// Re-export the canonical types from `@nodaro/shared` (single source of\n// truth — the registry lives at `packages/shared/src/reduce-strategy-registry.ts`).\n// `@nodaro/shared` is already a hard dep of this package, so there's no\n// bundle-size cost to importing from it.\nexport type { ReduceStrategyId, ReduceMeta }\n\nexport interface ReduceInput {\n /** Which fan-in strategy to run. */\n strategyId: ReduceStrategyId\n /**\n * Strategy-specific config. Defaults to `{}` server-side, which uses every\n * strategy's `defaultConfig`. Schemas (from `@nodaro/shared`):\n * - `pick-best-llm`: `{ criteria: string, inputKind?: \"text\" | \"image-url\", llmModel?: string }`\n * (`llmModel` = the judge model id from the LLM registry; omitted → the\n * feature default. Its tier sets the price: economy / standard / premium.)\n * - `concat`: `{ separator?: string }`\n * - `vote`: `{ caseSensitive?: boolean }`\n * - `merge-json`: `{ strategy?: \"deep\" | \"shallow\" }`\n * - `first-non-empty`, `count`: `{}`\n */\n strategyConfig?: Record<string, unknown>\n /** Up to 1000 input strings (URLs, text fragments, etc.). */\n inputs: string[]\n /**\n * Optional — associates this reduce run with a workflow execution. The\n * server reads this from the body before Zod strips it (same path as\n * other job-creating routes).\n */\n workflowId?: string\n}\n\nexport interface ReduceResult {\n jobId: string\n /**\n * Stringified result — for `count` this is a numeric string, for\n * `merge-json` this is the JSON-encoded merged object, otherwise the\n * chosen / joined text.\n */\n output: string\n meta: ReduceMeta\n}\n\nexport class ReduceResource {\n constructor(private client: NodaroClientCore) {}\n\n /**\n * Run the Reduce (fan-in) node directly — useful for scripted batch\n * scoring, picking the best of N generations outside a workflow, or\n * one-shot programmatic merges.\n *\n * Throws `NodaroError` on 4xx/5xx responses (e.g. `code: \"no_valid_inputs\"`\n * with status 400 when every input is empty / whitespace; the underlying\n * `EmptyInputError` is mapped to a 400 server-side).\n */\n run(input: ReduceInput): Promise<ReduceResult> {\n return this.client.request(\"POST\", \"/v1/reduce\", {\n body: {\n strategyId: input.strategyId,\n strategyConfig: input.strategyConfig ?? {},\n inputs: input.inputs,\n ...(input.workflowId !== undefined\n ? { workflowId: input.workflowId }\n : {}),\n },\n })\n }\n}\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var apps = require('@nodaro/shared/apps');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "RECAST_SEGMENT_PACKS", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () { return apps.RECAST_SEGMENT_PACKS; }
|
|
10
|
+
});
|
|
11
|
+
//# sourceMappingURL=chunk-IMC2M5YM.cjs.map
|
|
12
|
+
//# sourceMappingURL=chunk-IMC2M5YM.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"chunk-IMC2M5YM.cjs","sourcesContent":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"chunk-IQ6KWSXP.js"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"chunk-IS26FJO7.cjs"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
// src/resources/billing.ts
|
|
2
|
+
var BillingResource = class {
|
|
3
|
+
constructor(client) {
|
|
4
|
+
this.client = client;
|
|
5
|
+
}
|
|
6
|
+
client;
|
|
7
|
+
/**
|
|
8
|
+
* `GET /v1/billing/plans` → the plans and credit packs on sale, with their
|
|
9
|
+
* prices. Public: works with no credential, the same for every caller.
|
|
10
|
+
* Nodaro Cloud only — a self-hosted instance answers 404. Throws on `403
|
|
11
|
+
* self_serve_disabled` (this deployment does not sell to its users) and on
|
|
12
|
+
* `503` (`stripe_not_configured`, or prices briefly unavailable).
|
|
13
|
+
*/
|
|
14
|
+
plans() {
|
|
15
|
+
return this.client.request("GET", "/v1/billing/plans");
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* `GET /v1/billing/subscription` → the account's latest subscription
|
|
19
|
+
* (`null` when it never subscribed) and the tier its entitlements follow.
|
|
20
|
+
* Match `effectiveTier` to a {@link BillingPlan} `id` to mark the current
|
|
21
|
+
* plan (no match: pay-as-you-go, or a tier not on sale). Needs a signed-in
|
|
22
|
+
* session, a personal API token without a workflow limit, or an app's OAuth
|
|
23
|
+
* token. Nodaro Cloud only — a self-hosted instance answers 404.
|
|
24
|
+
*/
|
|
25
|
+
subscription() {
|
|
26
|
+
return this.client.request("GET", "/v1/billing/subscription");
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* `GET /v1/billing/surface` → how this deployment bills: whether it meters
|
|
30
|
+
* at all (`providerId !== "none"`) and in which unit costs display. Public,
|
|
31
|
+
* every edition.
|
|
32
|
+
*/
|
|
33
|
+
async surface() {
|
|
34
|
+
const res = await this.client.request("GET", "/v1/billing/surface");
|
|
35
|
+
return res.data;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* `GET /v1/billing/account` → the caller's plan and balance as the
|
|
39
|
+
* deployment's billing provider reports them, in its display unit. `null`
|
|
40
|
+
* when the provider could not answer — not a zero balance. Every edition.
|
|
41
|
+
*/
|
|
42
|
+
async account() {
|
|
43
|
+
const res = await this.client.request("GET", "/v1/billing/account");
|
|
44
|
+
return res.data;
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export { BillingResource };
|
|
49
|
+
//# sourceMappingURL=chunk-J4WFSKY6.js.map
|
|
50
|
+
//# sourceMappingURL=chunk-J4WFSKY6.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/resources/billing.ts"],"names":[],"mappings":";AA6KO,IAAM,kBAAN,MAAsB;AAAA,EAC3B,YAAoB,MAAA,EAA0B;AAA1B,IAAA,IAAA,CAAA,MAAA,GAAA,MAAA;AAAA,EAA2B;AAAA,EAA3B,MAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASpB,KAAA,GAAqC;AACnC,IAAA,OAAO,IAAA,CAAK,MAAA,CAAO,OAAA,CAA4B,KAAA,EAAO,mBAAmB,CAAA;AAAA,EAC3E;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUA,YAAA,GAAmD;AACjD,IAAA,OAAO,IAAA,CAAK,MAAA,CAAO,OAAA,CAAmC,KAAA,EAAO,0BAA0B,CAAA;AAAA,EACzF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,MAAM,OAAA,GAAmC;AACvC,IAAA,MAAM,MAAM,MAAM,IAAA,CAAK,MAAA,CAAO,OAAA,CAAkC,OAAO,qBAAqB,CAAA;AAC5F,IAAA,OAAO,GAAA,CAAI,IAAA;AAAA,EACb;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,MAAM,OAAA,GAAiD;AACrD,IAAA,MAAM,MAAM,MAAM,IAAA,CAAK,MAAA,CAAO,OAAA,CAAgD,OAAO,qBAAqB,CAAA;AAC1G,IAAA,OAAO,GAAA,CAAI,IAAA;AAAA,EACb;AACF","file":"chunk-J4WFSKY6.js","sourcesContent":["import type { NodaroClientCore } from \"../core.js\"\n\n/**\n * Plans and prices, the subscription, and the billing surface — the shapes of\n * the `/v1/billing/*` routes an app may call. Mirrors the backend routes\n * (`backend/src/ee/routes/billing.ts`, `backend/src/routes/billing-surface.ts`),\n * the source of truth: keep these in sync if they change.\n *\n * Buying, changing the plan and the payment settings stay in the Nodaro app:\n * those routes refuse API and app tokens, so they have no method here.\n */\n\n/** A sum of money in its currency's major unit (`12` = 12.00), with its ISO-4217 code (`\"USD\"`). */\nexport interface BillingMoney {\n amount: number\n currency: string\n}\n\n/** The credits a price grants, and how often. */\nexport interface BillingPriceCredits {\n amount: number\n per: \"month\" | \"year\"\n}\n\n/** A monthly price, and what it grants. */\nexport interface BillingMonthlyPrice extends BillingMoney {\n /** `null` when the price does not state it. */\n credits: BillingPriceCredits | null\n}\n\n/** A yearly price, what it comes to per month, and what it grants. */\nexport interface BillingYearlyPrice extends BillingMoney {\n /** The yearly amount spread over the months it pays for; `null` when that cannot be said. */\n perMonth: number | null\n /** What the price grants — the plan's credits every month, as a monthly price; `null` when the price does not state it. */\n credits: BillingPriceCredits | null\n}\n\nexport interface BillingPlanPrices {\n /** `null` = Stripe cannot sell this price right now: show it as unavailable, never as free. */\n monthly: BillingMonthlyPrice | null\n yearly: BillingYearlyPrice | null\n}\n\n/** One plan on sale. */\nexport interface BillingPlan {\n /** `\"free\"`, `\"basic\"`, `\"standard\"`, … — the stable id. */\n id: string\n name: string\n /** `null` for the free plan: there is nothing to pay. */\n prices: BillingPlanPrices | null\n /** The free plan's one-time grant at sign-up; `null` on a paid plan, whose credits come with each price. */\n signupCredits: number | null\n /** How many nodes of one workflow run at once. */\n parallelism: number\n /** Storage for your media, in bytes. */\n storageBytes: number\n}\n\n/** A credit pack: this many credits for this price. */\nexport interface BillingTopUp {\n id: string\n credits: number\n /** `null` when the pack's price cannot be stated right now: show it as unavailable. */\n price: BillingMoney | null\n}\n\n/** The answer of `GET /v1/billing/plans`. */\nexport interface BillingPlansResult {\n /** The free plan first, then each paid plan from the smallest. */\n data: BillingPlan[]\n /** The credit packs, from the smallest. */\n topUps: BillingTopUp[]\n /** Any whole amount in this range can be loaded as credits, at the same rate as the packs. */\n topUpRange: { min: number; max: number; currency: string }\n}\n\n/** The account's latest subscription record. */\nexport interface BillingSubscription {\n id: string\n stripe_subscription_id: string | null\n /** The plan id: `\"basic\"`, `\"standard\"`, … */\n tier: string\n /** `\"active\"`, `\"trialing\"`, `\"past_due\"`, `\"paused\"`, `\"canceled\"`, `\"incomplete\"` or `\"expired\"`. */\n status: string\n stripe_price_id: string | null\n /** ISO-8601. */\n current_period_start: string | null\n /** ISO-8601: when the current period ends (and renews, unless cancelled). */\n current_period_end: string | null\n /** True when the subscription ends at `current_period_end` instead of renewing. */\n cancel_at_period_end: boolean\n /** ISO-8601: when a scheduled cancellation takes effect. */\n cancel_at: string | null\n /** ISO-8601: when it was cancelled. */\n canceled_at: string | null\n}\n\n/** The answer of `GET /v1/billing/subscription`. */\nexport interface BillingSubscriptionResult {\n /** `null` when the account never subscribed. */\n data: BillingSubscription | null\n /**\n * The tier the account's entitlements follow: usually a plan id from\n * `plans()` (`\"free\"` included); `\"payg\"` — no subscription, but credits\n * bought (every model, no watermark); or a tier that is not on sale, such\n * as `\"enterprise\"`.\n */\n effectiveTier: string\n}\n\n/** How this deployment bills, the same for every caller (`GET /v1/billing/surface`). */\nexport interface BillingSurface {\n /** The billing-surface contract version (an integer). */\n contract: number\n /** The registered billing provider; `\"none\"` = this deployment meters nothing. */\n providerId: string\n /** The unit costs display in by default (`\"credits\"`, `\"usd\"`, or a deployment's own label). */\n displayUnit: string\n canReport: boolean\n canQuote: boolean\n canAccount: boolean\n /** Whether a cost view belongs on this deployment. */\n mountCostTab: boolean\n /** One billing account pays for every user here. */\n deploymentPayer: boolean\n}\n\n/** One row of {@link BillingAccountSummary.byCategory}. */\nexport interface BillingUsageCategory {\n category: string\n count: number\n /** Spend in the display unit; `null` = unavailable, never 0. */\n amount: number | null\n spent: BillingMoney | null\n}\n\n/**\n * The caller's account as the deployment's billing provider sees it\n * (`GET /v1/billing/account`). Money and amounts are `null` when the provider\n * could not say: show that distinctly, never as 0. A field the provider leaves\n * out is a concept it does not have.\n */\nexport interface BillingAccountSummary {\n /** A plain string; `\"unknown\"` is a real answer. */\n plan: string\n balance: number | null\n dailyAllowance: number | null\n unit: string\n /** `\"external_wallet\"` when the balance comes from a wallet outside Nodaro. */\n balanceSource?: \"external_wallet\"\n /** ISO-8601 start of the current usage period. */\n periodStart?: string | null\n /** Generations this period. */\n generations?: number | null\n /** Money spent this period. */\n spent?: BillingMoney | null\n /** Pay-as-you-go state. */\n payg?: {\n enabled: boolean\n reserve: number | null\n rate: { creditsPerUnit: number; currency: string } | null\n monthlyCap: BillingMoney | null\n } | null\n /** The daily cap and when it resets; prefer it over `dailyAllowance` when present. `limit: 0` means blocked. */\n daily?: { limit: number; used: number; remaining: number; resetsAt: string } | null\n /** Money value of the pay-as-you-go reserve. */\n reserveValue?: BillingMoney | null\n byCategory?: BillingUsageCategory[] | null\n /** The total the balance is drawn from, where the provider grants each user an allocation. */\n allocated?: number | null\n}\n\nexport class BillingResource {\n constructor(private client: NodaroClientCore) {}\n\n /**\n * `GET /v1/billing/plans` → the plans and credit packs on sale, with their\n * prices. Public: works with no credential, the same for every caller.\n * Nodaro Cloud only — a self-hosted instance answers 404. Throws on `403\n * self_serve_disabled` (this deployment does not sell to its users) and on\n * `503` (`stripe_not_configured`, or prices briefly unavailable).\n */\n plans(): Promise<BillingPlansResult> {\n return this.client.request<BillingPlansResult>(\"GET\", \"/v1/billing/plans\")\n }\n\n /**\n * `GET /v1/billing/subscription` → the account's latest subscription\n * (`null` when it never subscribed) and the tier its entitlements follow.\n * Match `effectiveTier` to a {@link BillingPlan} `id` to mark the current\n * plan (no match: pay-as-you-go, or a tier not on sale). Needs a signed-in\n * session, a personal API token without a workflow limit, or an app's OAuth\n * token. Nodaro Cloud only — a self-hosted instance answers 404.\n */\n subscription(): Promise<BillingSubscriptionResult> {\n return this.client.request<BillingSubscriptionResult>(\"GET\", \"/v1/billing/subscription\")\n }\n\n /**\n * `GET /v1/billing/surface` → how this deployment bills: whether it meters\n * at all (`providerId !== \"none\"`) and in which unit costs display. Public,\n * every edition.\n */\n async surface(): Promise<BillingSurface> {\n const res = await this.client.request<{ data: BillingSurface }>(\"GET\", \"/v1/billing/surface\")\n return res.data\n }\n\n /**\n * `GET /v1/billing/account` → the caller's plan and balance as the\n * deployment's billing provider reports them, in its display unit. `null`\n * when the provider could not answer — not a zero balance. Every edition.\n */\n async account(): Promise<BillingAccountSummary | null> {\n const res = await this.client.request<{ data: BillingAccountSummary | null }>(\"GET\", \"/v1/billing/account\")\n return res.data\n }\n}\n"]}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// src/resources/organizations.ts
|
|
4
|
+
var OrganizationsResource = class {
|
|
5
|
+
constructor(client) {
|
|
6
|
+
this.client = client;
|
|
7
|
+
}
|
|
8
|
+
client;
|
|
9
|
+
/** The organizations this account belongs to. */
|
|
10
|
+
list() {
|
|
11
|
+
return this.client.request("GET", "/v1/orgs");
|
|
12
|
+
}
|
|
13
|
+
get(id) {
|
|
14
|
+
return this.client.request("GET", `/v1/orgs/${encodeURIComponent(id)}`);
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Create an organization. On instances that require it, `acceptTerms` must
|
|
18
|
+
* be true or the server answers `terms_required` — the SDK does not decide
|
|
19
|
+
* whether terms apply, because only the instance knows.
|
|
20
|
+
*
|
|
21
|
+
* A new organization may come back `pending`: some instances hold new
|
|
22
|
+
* organizations for a platform admin to approve, and a pending one grants
|
|
23
|
+
* nothing until it is active.
|
|
24
|
+
*/
|
|
25
|
+
create(input) {
|
|
26
|
+
return this.client.request("POST", "/v1/orgs", { body: input });
|
|
27
|
+
}
|
|
28
|
+
update(id, input) {
|
|
29
|
+
return this.client.request("PATCH", `/v1/orgs/${encodeURIComponent(id)}`, { body: input });
|
|
30
|
+
}
|
|
31
|
+
/** Soft-delete. The organization stops granting context; nothing is destroyed. */
|
|
32
|
+
delete(id) {
|
|
33
|
+
return this.client.request("DELETE", `/v1/orgs/${encodeURIComponent(id)}`);
|
|
34
|
+
}
|
|
35
|
+
/** Hand the organization to another member. The caller becomes an admin. */
|
|
36
|
+
transferOwnership(id, userId) {
|
|
37
|
+
return this.client.request("POST", `/v1/orgs/${encodeURIComponent(id)}/transfer-ownership`, {
|
|
38
|
+
body: { userId }
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
/** Leave. An owner cannot — transfer ownership first (`owner_cannot_leave`). */
|
|
42
|
+
leave(id) {
|
|
43
|
+
return this.client.request("POST", `/v1/orgs/${encodeURIComponent(id)}/leave`);
|
|
44
|
+
}
|
|
45
|
+
// -- members --------------------------------------------------------------
|
|
46
|
+
listMembers(orgId, opts = {}) {
|
|
47
|
+
return this.client.request("GET", `/v1/orgs/${encodeURIComponent(orgId)}/members`, { query: { ...opts } });
|
|
48
|
+
}
|
|
49
|
+
updateMember(orgId, userId, input) {
|
|
50
|
+
return this.client.request(
|
|
51
|
+
"PATCH",
|
|
52
|
+
`/v1/orgs/${encodeURIComponent(orgId)}/members/${encodeURIComponent(userId)}`,
|
|
53
|
+
{ body: input }
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
removeMember(orgId, userId) {
|
|
57
|
+
return this.client.request(
|
|
58
|
+
"DELETE",
|
|
59
|
+
`/v1/orgs/${encodeURIComponent(orgId)}/members/${encodeURIComponent(userId)}`
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
// -- invitations ----------------------------------------------------------
|
|
63
|
+
/**
|
|
64
|
+
* Invite by email. Returns ONE ROW PER ADDRESS, and a row whose `status` is
|
|
65
|
+
* not `sent` carries a `link` instead.
|
|
66
|
+
*
|
|
67
|
+
* Surface that link. An install with no mail provider — every fresh
|
|
68
|
+
* self-host — delivers nothing, and an integration that reports "invited"
|
|
69
|
+
* without showing the link creates invitations nobody can ever reach.
|
|
70
|
+
*/
|
|
71
|
+
invite(orgId, input) {
|
|
72
|
+
return this.client.request("POST", `/v1/orgs/${encodeURIComponent(orgId)}/invitations`, { body: input });
|
|
73
|
+
}
|
|
74
|
+
listInvitations(orgId, opts = {}) {
|
|
75
|
+
return this.client.request("GET", `/v1/orgs/${encodeURIComponent(orgId)}/invitations`, {
|
|
76
|
+
query: { ...opts }
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
revokeInvitation(id) {
|
|
80
|
+
return this.client.request("DELETE", `/v1/invitations/${encodeURIComponent(id)}`);
|
|
81
|
+
}
|
|
82
|
+
resendInvitation(id) {
|
|
83
|
+
return this.client.request("POST", `/v1/invitations/${encodeURIComponent(id)}/resend`);
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* What an invitee sees before signing in — the one organization read that
|
|
87
|
+
* needs no token, so it works while the recipient is still signed out.
|
|
88
|
+
*/
|
|
89
|
+
previewInvitation(token) {
|
|
90
|
+
return this.client.request("GET", `/v1/invitations/by-token/${encodeURIComponent(token)}`);
|
|
91
|
+
}
|
|
92
|
+
/** Accept. Requires an authenticated caller whose email matches the invite. */
|
|
93
|
+
acceptInvitation(token) {
|
|
94
|
+
return this.client.request("POST", `/v1/invitations/${encodeURIComponent(token)}/accept`);
|
|
95
|
+
}
|
|
96
|
+
// -- audit ----------------------------------------------------------------
|
|
97
|
+
/**
|
|
98
|
+
* The organization's audit log, newest first. Owner and admins only, and
|
|
99
|
+
* readable while the organization is suspended — the record of what
|
|
100
|
+
* happened is exactly what someone needs when things have gone wrong.
|
|
101
|
+
*/
|
|
102
|
+
audit(orgId, opts = {}) {
|
|
103
|
+
return this.client.request("GET", `/v1/orgs/${encodeURIComponent(orgId)}/audit`, { query: { ...opts } });
|
|
104
|
+
}
|
|
105
|
+
// -- usage ----------------------------------------------------------------
|
|
106
|
+
/**
|
|
107
|
+
* Credits by workspace, member, model or day. Owner and org admins only.
|
|
108
|
+
* Inclusive dates (`from`/`to`), IANA `tz` (default UTC), ≤ 366 days
|
|
109
|
+
* (default last 30).
|
|
110
|
+
*/
|
|
111
|
+
usage(orgId, opts = {}) {
|
|
112
|
+
return this.client.request("GET", `/v1/orgs/${encodeURIComponent(orgId)}/usage`, { query: { ...opts } });
|
|
113
|
+
}
|
|
114
|
+
/** The individual runs behind a report, newest first, cursor-paged. */
|
|
115
|
+
usageRows(orgId, opts = {}) {
|
|
116
|
+
return this.client.request("GET", `/v1/orgs/${encodeURIComponent(orgId)}/usage`, { query: { ...opts, groupBy: "none" } });
|
|
117
|
+
}
|
|
118
|
+
/** The same report (or the rows, with `groupBy: "none"`) as CSV text. */
|
|
119
|
+
usageCsv(orgId, opts = {}) {
|
|
120
|
+
return this.client.requestText("GET", `/v1/orgs/${encodeURIComponent(orgId)}/usage`, { query: { ...opts, format: "csv" } });
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
exports.OrganizationsResource = OrganizationsResource;
|
|
125
|
+
//# sourceMappingURL=chunk-J5LGGCAS.cjs.map
|
|
126
|
+
//# sourceMappingURL=chunk-J5LGGCAS.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/resources/organizations.ts"],"names":[],"mappings":";;;AAwDO,IAAM,wBAAN,MAA4B;AAAA,EACjC,YAAoB,MAAA,EAA0B;AAA1B,IAAA,IAAA,CAAA,MAAA,GAAA,MAAA;AAAA,EAA2B;AAAA,EAA3B,MAAA;AAAA;AAAA,EAGpB,IAAA,GAA8C;AAC5C,IAAA,OAAO,IAAA,CAAK,MAAA,CAAO,OAAA,CAAQ,KAAA,EAAO,UAAU,CAAA;AAAA,EAC9C;AAAA,EAEA,IAAI,EAAA,EAAiD;AACnD,IAAA,OAAO,IAAA,CAAK,OAAO,OAAA,CAAQ,KAAA,EAAO,YAAY,kBAAA,CAAmB,EAAE,CAAC,CAAA,CAAE,CAAA;AAAA,EACxE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAWA,OAAO,KAAA,EAA4D;AACjE,IAAA,OAAO,IAAA,CAAK,OAAO,OAAA,CAAQ,MAAA,EAAQ,YAAY,EAAE,IAAA,EAAM,OAAO,CAAA;AAAA,EAChE;AAAA,EAEA,MAAA,CAAO,IAAY,KAAA,EAAuF;AACxG,IAAA,OAAO,IAAA,CAAK,MAAA,CAAO,OAAA,CAAQ,OAAA,EAAS,CAAA,SAAA,EAAY,kBAAA,CAAmB,EAAE,CAAC,CAAA,CAAA,EAAI,EAAE,IAAA,EAAM,KAAA,EAAO,CAAA;AAAA,EAC3F;AAAA;AAAA,EAGA,OAAO,EAAA,EAA+D;AACpE,IAAA,OAAO,IAAA,CAAK,OAAO,OAAA,CAAQ,QAAA,EAAU,YAAY,kBAAA,CAAmB,EAAE,CAAC,CAAA,CAAE,CAAA;AAAA,EAC3E;AAAA;AAAA,EAGA,iBAAA,CAAkB,IAAY,MAAA,EAA2E;AACvG,IAAA,OAAO,IAAA,CAAK,OAAO,OAAA,CAAQ,MAAA,EAAQ,YAAY,kBAAA,CAAmB,EAAE,CAAC,CAAA,mBAAA,CAAA,EAAuB;AAAA,MAC1F,IAAA,EAAM,EAAE,MAAA;AAAO,KAChB,CAAA;AAAA,EACH;AAAA;AAAA,EAGA,MAAM,EAAA,EAAiE;AACrE,IAAA,OAAO,IAAA,CAAK,OAAO,OAAA,CAAQ,MAAA,EAAQ,YAAY,kBAAA,CAAmB,EAAE,CAAC,CAAA,MAAA,CAAQ,CAAA;AAAA,EAC/E;AAAA;AAAA,EAIA,WAAA,CAAY,KAAA,EAAe,IAAA,GAA4C,EAAC,EAAoC;AAC1G,IAAA,OAAO,IAAA,CAAK,MAAA,CAAO,OAAA,CAAQ,KAAA,EAAO,YAAY,kBAAA,CAAmB,KAAK,CAAC,CAAA,QAAA,CAAA,EAAY,EAAE,KAAA,EAAO,EAAE,GAAG,IAAA,IAAQ,CAAA;AAAA,EAC3G;AAAA,EAEA,YAAA,CACE,KAAA,EACA,MAAA,EACA,KAAA,EACkC;AAClC,IAAA,OAAO,KAAK,MAAA,CAAO,OAAA;AAAA,MACjB,OAAA;AAAA,MACA,YAAY,kBAAA,CAAmB,KAAK,CAAC,CAAA,SAAA,EAAY,kBAAA,CAAmB,MAAM,CAAC,CAAA,CAAA;AAAA,MAC3E,EAAE,MAAM,KAAA;AAAM,KAChB;AAAA,EACF;AAAA,EAEA,YAAA,CAAa,OAAe,MAAA,EAAyD;AACnF,IAAA,OAAO,KAAK,MAAA,CAAO,OAAA;AAAA,MACjB,QAAA;AAAA,MACA,YAAY,kBAAA,CAAmB,KAAK,CAAC,CAAA,SAAA,EAAY,kBAAA,CAAmB,MAAM,CAAC,CAAA;AAAA,KAC7E;AAAA,EACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAYA,MAAA,CAAO,OAAe,KAAA,EAA6D;AACjF,IAAA,OAAO,IAAA,CAAK,MAAA,CAAO,OAAA,CAAQ,MAAA,EAAQ,CAAA,SAAA,EAAY,kBAAA,CAAmB,KAAK,CAAC,CAAA,YAAA,CAAA,EAAgB,EAAE,IAAA,EAAM,KAAA,EAAO,CAAA;AAAA,EACzG;AAAA,EAEA,eAAA,CAAgB,KAAA,EAAe,IAAA,GAA+B,EAAC,EAAqC;AAClG,IAAA,OAAO,IAAA,CAAK,OAAO,OAAA,CAAQ,KAAA,EAAO,YAAY,kBAAA,CAAmB,KAAK,CAAC,CAAA,YAAA,CAAA,EAAgB;AAAA,MACrF,KAAA,EAAO,EAAE,GAAG,IAAA;AAAK,KAClB,CAAA;AAAA,EACH;AAAA,EAEA,iBAAiB,EAAA,EAAiE;AAChF,IAAA,OAAO,IAAA,CAAK,OAAO,OAAA,CAAQ,QAAA,EAAU,mBAAmB,kBAAA,CAAmB,EAAE,CAAC,CAAA,CAAE,CAAA;AAAA,EAClF;AAAA,EAEA,iBAAiB,EAAA,EAAoE;AACnF,IAAA,OAAO,IAAA,CAAK,OAAO,OAAA,CAAQ,MAAA,EAAQ,mBAAmB,kBAAA,CAAmB,EAAE,CAAC,CAAA,OAAA,CAAS,CAAA;AAAA,EACvF;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,kBAAkB,KAAA,EAAqD;AACrE,IAAA,OAAO,IAAA,CAAK,OAAO,OAAA,CAAQ,KAAA,EAAO,4BAA4B,kBAAA,CAAmB,KAAK,CAAC,CAAA,CAAE,CAAA;AAAA,EAC3F;AAAA;AAAA,EAGA,iBAAiB,KAAA,EAAiF;AAChG,IAAA,OAAO,IAAA,CAAK,OAAO,OAAA,CAAQ,MAAA,EAAQ,mBAAmB,kBAAA,CAAmB,KAAK,CAAC,CAAA,OAAA,CAAS,CAAA;AAAA,EAC1F;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASA,KAAA,CACE,KAAA,EACA,IAAA,GAA4C,EAAC,EACZ;AACjC,IAAA,OAAO,IAAA,CAAK,MAAA,CAAO,OAAA,CAAQ,KAAA,EAAO,YAAY,kBAAA,CAAmB,KAAK,CAAC,CAAA,MAAA,CAAA,EAAU,EAAE,KAAA,EAAO,EAAE,GAAG,IAAA,IAAQ,CAAA;AAAA,EACzG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASA,KAAA,CACE,KAAA,EACA,IAAA,GAAkH,EAAC,EACnF;AAChC,IAAA,OAAO,IAAA,CAAK,MAAA,CAAO,OAAA,CAAQ,KAAA,EAAO,YAAY,kBAAA,CAAmB,KAAK,CAAC,CAAA,MAAA,CAAA,EAAU,EAAE,KAAA,EAAO,EAAE,GAAG,IAAA,IAAQ,CAAA;AAAA,EACzG;AAAA;AAAA,EAGA,SAAA,CAAU,KAAA,EAAe,IAAA,GAAoC,EAAC,EAAoC;AAChG,IAAA,OAAO,KAAK,MAAA,CAAO,OAAA,CAAQ,KAAA,EAAO,CAAA,SAAA,EAAY,mBAAmB,KAAK,CAAC,CAAA,MAAA,CAAA,EAAU,EAAE,OAAO,EAAE,GAAG,MAAM,OAAA,EAAS,MAAA,IAAU,CAAA;AAAA,EAC1H;AAAA;AAAA,EAGA,QAAA,CAAS,KAAA,EAAe,IAAA,GAA6C,EAAC,EAAoB;AACxF,IAAA,OAAO,KAAK,MAAA,CAAO,WAAA,CAAY,KAAA,EAAO,CAAA,SAAA,EAAY,mBAAmB,KAAK,CAAC,CAAA,MAAA,CAAA,EAAU,EAAE,OAAO,EAAE,GAAG,MAAM,MAAA,EAAQ,KAAA,IAAS,CAAA;AAAA,EAC5H;AACF","file":"chunk-J5LGGCAS.cjs","sourcesContent":["import type {\n InvitationDelivery,\n InvitationPreview,\n InvitationState,\n InvitationView,\n MemberStatus,\n OrganizationView,\n OrgKind,\n OrgAuditEntry,\n OrgMemberView,\n OrgPage,\n OrgRole,\n OrgSettings,\n UsageLogEntry,\n UsageQuery,\n UsageReport,\n WorkspaceRole,\n} from \"@nodaro/shared/organizations\"\nimport type { NodaroClientCore } from \"../core.js\"\n\n/**\n * Organizations, their members, and the invitations that fill them.\n *\n * Every shape here comes from `@nodaro/shared` rather than being restated:\n * the app, the CLI and this SDK all read the same wire, and a shape written\n * out three times is one that drifts in two of them.\n *\n * Nothing in this file decides anything. Whether a caller may invite, remove\n * or rename is the server's answer, delivered as a typed error code, and an\n * SDK that guessed would be wrong the first time a setting changed.\n */\n\nexport interface CreateOrgInput {\n name: string\n kind: OrgKind\n /** Derived from the name when omitted; the server resolves collisions. */\n slug?: string\n acceptTerms?: boolean\n settings?: OrgSettings\n}\n\nexport interface InviteInput {\n emails: string[]\n orgRole?: \"admin\" | \"member\"\n /** Also places the invitee in this workspace on accept. */\n workspaceId?: string\n workspaceRole?: WorkspaceRole\n}\n\nexport interface ListInvitationsOptions {\n status?: InvitationState\n workspaceId?: string\n cursor?: string\n limit?: number\n}\n\nexport class OrganizationsResource {\n constructor(private client: NodaroClientCore) {}\n\n /** The organizations this account belongs to. */\n list(): Promise<{ data: OrganizationView[] }> {\n return this.client.request(\"GET\", \"/v1/orgs\")\n }\n\n get(id: string): Promise<{ data: OrganizationView }> {\n return this.client.request(\"GET\", `/v1/orgs/${encodeURIComponent(id)}`)\n }\n\n /**\n * Create an organization. On instances that require it, `acceptTerms` must\n * be true or the server answers `terms_required` — the SDK does not decide\n * whether terms apply, because only the instance knows.\n *\n * A new organization may come back `pending`: some instances hold new\n * organizations for a platform admin to approve, and a pending one grants\n * nothing until it is active.\n */\n create(input: CreateOrgInput): Promise<{ data: OrganizationView }> {\n return this.client.request(\"POST\", \"/v1/orgs\", { body: input })\n }\n\n update(id: string, input: { name?: string; settings?: OrgSettings }): Promise<{ data: OrganizationView }> {\n return this.client.request(\"PATCH\", `/v1/orgs/${encodeURIComponent(id)}`, { body: input })\n }\n\n /** Soft-delete. The organization stops granting context; nothing is destroyed. */\n delete(id: string): Promise<{ data: { id: string; status: string } }> {\n return this.client.request(\"DELETE\", `/v1/orgs/${encodeURIComponent(id)}`)\n }\n\n /** Hand the organization to another member. The caller becomes an admin. */\n transferOwnership(id: string, userId: string): Promise<{ data: { orgId: string; ownerUserId: string } }> {\n return this.client.request(\"POST\", `/v1/orgs/${encodeURIComponent(id)}/transfer-ownership`, {\n body: { userId },\n })\n }\n\n /** Leave. An owner cannot — transfer ownership first (`owner_cannot_leave`). */\n leave(id: string): Promise<{ data: { orgId: string; left: boolean } }> {\n return this.client.request(\"POST\", `/v1/orgs/${encodeURIComponent(id)}/leave`)\n }\n\n // -- members --------------------------------------------------------------\n\n listMembers(orgId: string, opts: { cursor?: string; limit?: number } = {}): Promise<OrgPage<OrgMemberView>> {\n return this.client.request(\"GET\", `/v1/orgs/${encodeURIComponent(orgId)}/members`, { query: { ...opts } })\n }\n\n updateMember(\n orgId: string,\n userId: string,\n input: { role?: \"admin\" | \"member\"; status?: MemberStatus },\n ): Promise<{ data: OrgMemberView }> {\n return this.client.request(\n \"PATCH\",\n `/v1/orgs/${encodeURIComponent(orgId)}/members/${encodeURIComponent(userId)}`,\n { body: input },\n )\n }\n\n removeMember(orgId: string, userId: string): Promise<{ data: { removed: boolean } }> {\n return this.client.request(\n \"DELETE\",\n `/v1/orgs/${encodeURIComponent(orgId)}/members/${encodeURIComponent(userId)}`,\n )\n }\n\n // -- invitations ----------------------------------------------------------\n\n /**\n * Invite by email. Returns ONE ROW PER ADDRESS, and a row whose `status` is\n * not `sent` carries a `link` instead.\n *\n * Surface that link. An install with no mail provider — every fresh\n * self-host — delivers nothing, and an integration that reports \"invited\"\n * without showing the link creates invitations nobody can ever reach.\n */\n invite(orgId: string, input: InviteInput): Promise<{ data: InvitationDelivery[] }> {\n return this.client.request(\"POST\", `/v1/orgs/${encodeURIComponent(orgId)}/invitations`, { body: input })\n }\n\n listInvitations(orgId: string, opts: ListInvitationsOptions = {}): Promise<OrgPage<InvitationView>> {\n return this.client.request(\"GET\", `/v1/orgs/${encodeURIComponent(orgId)}/invitations`, {\n query: { ...opts },\n })\n }\n\n revokeInvitation(id: string): Promise<{ data: { id: string; revoked: boolean } }> {\n return this.client.request(\"DELETE\", `/v1/invitations/${encodeURIComponent(id)}`)\n }\n\n resendInvitation(id: string): Promise<{ data: InvitationDelivery & { id: string } }> {\n return this.client.request(\"POST\", `/v1/invitations/${encodeURIComponent(id)}/resend`)\n }\n\n /**\n * What an invitee sees before signing in — the one organization read that\n * needs no token, so it works while the recipient is still signed out.\n */\n previewInvitation(token: string): Promise<{ data: InvitationPreview }> {\n return this.client.request(\"GET\", `/v1/invitations/by-token/${encodeURIComponent(token)}`)\n }\n\n /** Accept. Requires an authenticated caller whose email matches the invite. */\n acceptInvitation(token: string): Promise<{ data: { orgId: string; workspaceId: string | null } }> {\n return this.client.request(\"POST\", `/v1/invitations/${encodeURIComponent(token)}/accept`)\n }\n\n // -- audit ----------------------------------------------------------------\n\n /**\n * The organization's audit log, newest first. Owner and admins only, and\n * readable while the organization is suspended — the record of what\n * happened is exactly what someone needs when things have gone wrong.\n */\n audit(\n orgId: string,\n opts: { cursor?: string; limit?: number } = {},\n ): Promise<OrgPage<OrgAuditEntry>> {\n return this.client.request(\"GET\", `/v1/orgs/${encodeURIComponent(orgId)}/audit`, { query: { ...opts } })\n }\n\n // -- usage ----------------------------------------------------------------\n\n /**\n * Credits by workspace, member, model or day. Owner and org admins only.\n * Inclusive dates (`from`/`to`), IANA `tz` (default UTC), ≤ 366 days\n * (default last 30).\n */\n usage(\n orgId: string,\n opts: Omit<UsageQuery, \"cursor\" | \"limit\" | \"groupBy\"> & { groupBy?: \"workspace\" | \"member\" | \"model\" | \"day\" } = {},\n ): Promise<{ data: UsageReport }> {\n return this.client.request(\"GET\", `/v1/orgs/${encodeURIComponent(orgId)}/usage`, { query: { ...opts } })\n }\n\n /** The individual runs behind a report, newest first, cursor-paged. */\n usageRows(orgId: string, opts: Omit<UsageQuery, \"groupBy\"> = {}): Promise<OrgPage<UsageLogEntry>> {\n return this.client.request(\"GET\", `/v1/orgs/${encodeURIComponent(orgId)}/usage`, { query: { ...opts, groupBy: \"none\" } })\n }\n\n /** The same report (or the rows, with `groupBy: \"none\"`) as CSV text. */\n usageCsv(orgId: string, opts: Omit<UsageQuery, \"cursor\" | \"limit\"> = {}): Promise<string> {\n return this.client.requestText(\"GET\", `/v1/orgs/${encodeURIComponent(orgId)}/usage`, { query: { ...opts, format: \"csv\" } })\n }\n}\n\nexport type { OrgAuditEntry, OrgRole }\n"]}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
// src/resources/gallery.ts
|
|
2
|
+
var GalleryResource = class {
|
|
3
|
+
constructor(client) {
|
|
4
|
+
this.client = client;
|
|
5
|
+
}
|
|
6
|
+
client;
|
|
7
|
+
/**
|
|
8
|
+
* `GET /v1/gallery` → a page of the public gallery, newest first (no auth
|
|
9
|
+
* needed), or one person's work with `userId`.
|
|
10
|
+
*/
|
|
11
|
+
browse(params = {}) {
|
|
12
|
+
return this.client.request("GET", "/v1/gallery", {
|
|
13
|
+
query: {
|
|
14
|
+
type: params.type,
|
|
15
|
+
userId: params.userId,
|
|
16
|
+
favoritesOnly: params.favoritesOnly,
|
|
17
|
+
limit: params.limit,
|
|
18
|
+
cursor: params.cursor
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Favorite a job, or un-favorite it when it already is
|
|
24
|
+
* (`POST /v1/gallery/favorite`). You can favorite your own jobs and public
|
|
25
|
+
* ones; another person's private job is a `NotFoundError`. OAuth apps need
|
|
26
|
+
* the `assets:write` scope.
|
|
27
|
+
*/
|
|
28
|
+
toggleFavorite(jobId) {
|
|
29
|
+
return this.client.request("POST", "/v1/gallery/favorite", { body: { jobId } });
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Your favorited job ids, newest first (`GET /v1/gallery/favorites`). OAuth
|
|
33
|
+
* apps need the `assets:read` or `jobs:read` scope.
|
|
34
|
+
*/
|
|
35
|
+
async favorites() {
|
|
36
|
+
const res = await this.client.request("GET", "/v1/gallery/favorites");
|
|
37
|
+
return res.data;
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export { GalleryResource };
|
|
42
|
+
//# sourceMappingURL=chunk-JDEZHITT.js.map
|
|
43
|
+
//# sourceMappingURL=chunk-JDEZHITT.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/resources/gallery.ts"],"names":[],"mappings":";AAiEO,IAAM,kBAAN,MAAsB;AAAA,EAC3B,YAAoB,MAAA,EAA0B;AAA1B,IAAA,IAAA,CAAA,MAAA,GAAA,MAAA;AAAA,EAA2B;AAAA,EAA3B,MAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMpB,MAAA,CAAO,MAAA,GAA8B,EAAC,EAAyB;AAC7D,IAAA,OAAO,IAAA,CAAK,MAAA,CAAO,OAAA,CAAqB,KAAA,EAAO,aAAA,EAAe;AAAA,MAC5D,KAAA,EAAO;AAAA,QACL,MAAM,MAAA,CAAO,IAAA;AAAA,QACb,QAAQ,MAAA,CAAO,MAAA;AAAA,QACf,eAAe,MAAA,CAAO,aAAA;AAAA,QACtB,OAAO,MAAA,CAAO,KAAA;AAAA,QACd,QAAQ,MAAA,CAAO;AAAA;AACjB,KACD,CAAA;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,eAAe,KAAA,EAA8C;AAC3D,IAAA,OAAO,IAAA,CAAK,MAAA,CAAO,OAAA,CAA8B,MAAA,EAAQ,sBAAA,EAAwB,EAAE,IAAA,EAAM,EAAE,KAAA,EAAM,EAAG,CAAA;AAAA,EACtG;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,MAAM,SAAA,GAA+B;AACnC,IAAA,MAAM,MAAM,MAAM,IAAA,CAAK,MAAA,CAAO,OAAA,CAA4B,OAAO,uBAAuB,CAAA;AACxF,IAAA,OAAO,GAAA,CAAI,IAAA;AAAA,EACb;AACF","file":"chunk-JDEZHITT.js","sourcesContent":["import type { NodaroClientCore } from \"../core.js\"\n\nexport type GalleryMediaType = \"image\" | \"video\" | \"audio\"\n\n/**\n * One gallery card (`GET /v1/gallery`): a completed generation with media.\n * Mirrors the route's item shape — never whose it is.\n */\nexport interface GalleryItem {\n /** The job id — pass it to `toggleFavorite`, or `client.jobs.get`. */\n readonly id: string\n readonly type: GalleryMediaType\n /** The kind of job that made it (`generate-image`, `image-to-video`, …). */\n readonly jobName: string\n readonly outputUrl: string\n readonly thumbnailUrl: string | null\n /** When the job completed. */\n readonly createdAt: string\n readonly prompt: string | null\n readonly model: string | null\n /** A private 720p Preview render (Apply EDL at proxy quality). Present only when true. */\n readonly preview?: true\n}\n\nexport interface BrowseGalleryParams {\n /** Only this media kind. */\n readonly type?: GalleryMediaType\n /**\n * Only this person's work. Your own id lists your own items, private ones\n * included; anyone else's lists their public ones.\n */\n readonly userId?: string\n /**\n * With YOUR OWN `userId` (from `client.me()`): only the items you\n * favorited. Anyone else's favorites are refused — `UnauthorizedError`\n * without a token, `ForbiddenError` with another person's `userId` or none.\n */\n readonly favoritesOnly?: boolean\n /** Page size, 1–50 (default 20). */\n readonly limit?: number\n /** The previous page's `nextCursor`. */\n readonly cursor?: string\n}\n\nexport interface GalleryPage {\n readonly data: GalleryItem[]\n /** Pass back as `cursor` for the next page; `null` on the last one. */\n readonly nextCursor: string | null\n /** Counted on the first page only (no cursor). */\n readonly totalCount?: number\n}\n\n/** What {@link GalleryResource.toggleFavorite} answers: whether the job is now a favorite. */\nexport interface ToggleFavoriteResult {\n readonly favorited: boolean\n}\n\n/**\n * Gallery — the public gallery of completed generations, and your favorites.\n *\n * A favorite is a bookmark on a generation: one of your own, or anyone's in\n * the public gallery. Your jobs carry it as `Job.favorited`, and\n * `client.jobs.list({ favorited: true })` lists them. Not available on a\n * deployment that hides the gallery (the routes answer 404 there).\n */\nexport class GalleryResource {\n constructor(private client: NodaroClientCore) {}\n\n /**\n * `GET /v1/gallery` → a page of the public gallery, newest first (no auth\n * needed), or one person's work with `userId`.\n */\n browse(params: BrowseGalleryParams = {}): Promise<GalleryPage> {\n return this.client.request<GalleryPage>(\"GET\", \"/v1/gallery\", {\n query: {\n type: params.type,\n userId: params.userId,\n favoritesOnly: params.favoritesOnly,\n limit: params.limit,\n cursor: params.cursor,\n },\n })\n }\n\n /**\n * Favorite a job, or un-favorite it when it already is\n * (`POST /v1/gallery/favorite`). You can favorite your own jobs and public\n * ones; another person's private job is a `NotFoundError`. OAuth apps need\n * the `assets:write` scope.\n */\n toggleFavorite(jobId: string): Promise<ToggleFavoriteResult> {\n return this.client.request<ToggleFavoriteResult>(\"POST\", \"/v1/gallery/favorite\", { body: { jobId } })\n }\n\n /**\n * Your favorited job ids, newest first (`GET /v1/gallery/favorites`). OAuth\n * apps need the `assets:read` or `jobs:read` scope.\n */\n async favorites(): Promise<string[]> {\n const res = await this.client.request<{ data: string[] }>(\"GET\", \"/v1/gallery/favorites\")\n return res.data\n }\n}\n"]}
|
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
// src/errors.ts
|
|
2
|
+
var NodaroError = class extends Error {
|
|
3
|
+
constructor(message, code, status) {
|
|
4
|
+
super(message);
|
|
5
|
+
this.code = code;
|
|
6
|
+
this.status = status;
|
|
7
|
+
this.name = "NodaroError";
|
|
8
|
+
}
|
|
9
|
+
code;
|
|
10
|
+
status;
|
|
11
|
+
};
|
|
12
|
+
var UnauthorizedError = class extends NodaroError {
|
|
13
|
+
constructor(message = "Authentication required") {
|
|
14
|
+
super(message, "unauthorized", 401);
|
|
15
|
+
this.name = "UnauthorizedError";
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
var ForbiddenError = class extends NodaroError {
|
|
19
|
+
constructor(message = "Forbidden", missingScope) {
|
|
20
|
+
super(message, "forbidden", 403);
|
|
21
|
+
this.missingScope = missingScope;
|
|
22
|
+
this.name = "ForbiddenError";
|
|
23
|
+
}
|
|
24
|
+
missingScope;
|
|
25
|
+
};
|
|
26
|
+
var NotFoundError = class extends NodaroError {
|
|
27
|
+
constructor(message = "Not found") {
|
|
28
|
+
super(message, "not_found", 404);
|
|
29
|
+
this.name = "NotFoundError";
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
var RateLimitedError = class extends NodaroError {
|
|
33
|
+
constructor(message = "Rate limited") {
|
|
34
|
+
super(message, "rate_limited", 429);
|
|
35
|
+
this.name = "RateLimitedError";
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
var InsufficientCreditsError = class extends NodaroError {
|
|
39
|
+
constructor(message = "Insufficient credits", required, available) {
|
|
40
|
+
super(message, "insufficient_credits", 402);
|
|
41
|
+
this.required = required;
|
|
42
|
+
this.available = available;
|
|
43
|
+
this.name = "InsufficientCreditsError";
|
|
44
|
+
}
|
|
45
|
+
required;
|
|
46
|
+
available;
|
|
47
|
+
};
|
|
48
|
+
var StorageExceededError = class extends NodaroError {
|
|
49
|
+
constructor(message = "Storage exceeded", limitBytes) {
|
|
50
|
+
super(message, "storage_exceeded", 413);
|
|
51
|
+
this.limitBytes = limitBytes;
|
|
52
|
+
this.name = "StorageExceededError";
|
|
53
|
+
}
|
|
54
|
+
limitBytes;
|
|
55
|
+
};
|
|
56
|
+
var WorkflowConflictError = class extends NodaroError {
|
|
57
|
+
constructor(message = "Workflow was updated by another writer", currentUpdatedAt, currentVersion, currentRecord, code = "workflow_conflict") {
|
|
58
|
+
super(message, code, 409);
|
|
59
|
+
this.currentUpdatedAt = currentUpdatedAt;
|
|
60
|
+
this.currentVersion = currentVersion;
|
|
61
|
+
this.currentRecord = currentRecord;
|
|
62
|
+
this.name = "WorkflowConflictError";
|
|
63
|
+
}
|
|
64
|
+
currentUpdatedAt;
|
|
65
|
+
currentVersion;
|
|
66
|
+
currentRecord;
|
|
67
|
+
};
|
|
68
|
+
var StudioOpError = class extends NodaroError {
|
|
69
|
+
constructor(message, code, status, opIndex) {
|
|
70
|
+
super(message, code, status);
|
|
71
|
+
this.opIndex = opIndex;
|
|
72
|
+
this.name = "StudioOpError";
|
|
73
|
+
}
|
|
74
|
+
opIndex;
|
|
75
|
+
};
|
|
76
|
+
var CONTINUATION_REFUSAL_CODES = /* @__PURE__ */ new Set([
|
|
77
|
+
"already_running",
|
|
78
|
+
"continuation_superseded",
|
|
79
|
+
"render_final_already_rendered"
|
|
80
|
+
]);
|
|
81
|
+
var ContinuationRefusedError = class extends NodaroError {
|
|
82
|
+
constructor(message, code, jobId) {
|
|
83
|
+
super(message, code, 409);
|
|
84
|
+
this.jobId = jobId;
|
|
85
|
+
this.name = "ContinuationRefusedError";
|
|
86
|
+
}
|
|
87
|
+
jobId;
|
|
88
|
+
};
|
|
89
|
+
var ContinuationPreviewPendingError = class extends NodaroError {
|
|
90
|
+
constructor(message, executionId, renderNodeIds, reviewNodeIds, next) {
|
|
91
|
+
super(message, "continuation_preview_pending", 409);
|
|
92
|
+
this.executionId = executionId;
|
|
93
|
+
this.renderNodeIds = renderNodeIds;
|
|
94
|
+
this.reviewNodeIds = reviewNodeIds;
|
|
95
|
+
this.next = next;
|
|
96
|
+
this.name = "ContinuationPreviewPendingError";
|
|
97
|
+
}
|
|
98
|
+
executionId;
|
|
99
|
+
renderNodeIds;
|
|
100
|
+
reviewNodeIds;
|
|
101
|
+
next;
|
|
102
|
+
};
|
|
103
|
+
var stringList = (v) => Array.isArray(v) ? v.filter((id) => typeof id === "string") : [];
|
|
104
|
+
function heldFinalRunOf(v) {
|
|
105
|
+
if (!v || typeof v !== "object") return void 0;
|
|
106
|
+
const r = v;
|
|
107
|
+
if (typeof r.continueFromExecutionId !== "string" || !Array.isArray(r.nodeIds)) return void 0;
|
|
108
|
+
if (!r.inputOverrides || typeof r.inputOverrides !== "object" || Array.isArray(r.inputOverrides)) return void 0;
|
|
109
|
+
return {
|
|
110
|
+
continueFromExecutionId: r.continueFromExecutionId,
|
|
111
|
+
nodeIds: stringList(r.nodeIds),
|
|
112
|
+
inputOverrides: r.inputOverrides
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
var AlreadyRunningError = class extends NodaroError {
|
|
116
|
+
constructor(message, executionId) {
|
|
117
|
+
super(message, "already_running", 409);
|
|
118
|
+
this.executionId = executionId;
|
|
119
|
+
this.name = "AlreadyRunningError";
|
|
120
|
+
}
|
|
121
|
+
executionId;
|
|
122
|
+
};
|
|
123
|
+
var AppRunVersionChangedError = class extends NodaroError {
|
|
124
|
+
constructor(message, runVersion, appVersion) {
|
|
125
|
+
super(message, "app_run_version_changed", 409);
|
|
126
|
+
this.runVersion = runVersion;
|
|
127
|
+
this.appVersion = appVersion;
|
|
128
|
+
this.name = "AppRunVersionChangedError";
|
|
129
|
+
}
|
|
130
|
+
runVersion;
|
|
131
|
+
appVersion;
|
|
132
|
+
};
|
|
133
|
+
var JobBlockedError = class extends NodaroError {
|
|
134
|
+
constructor(message = "Blocked by this deployment's content policy") {
|
|
135
|
+
super(message, "job_blocked", 422);
|
|
136
|
+
this.name = "JobBlockedError";
|
|
137
|
+
}
|
|
138
|
+
};
|
|
139
|
+
var JobFailedError = class extends NodaroError {
|
|
140
|
+
constructor(message, jobId, jobStatus = "failed") {
|
|
141
|
+
super(message, "job_failed", 0);
|
|
142
|
+
this.jobId = jobId;
|
|
143
|
+
this.jobStatus = jobStatus;
|
|
144
|
+
this.name = "JobFailedError";
|
|
145
|
+
}
|
|
146
|
+
jobId;
|
|
147
|
+
jobStatus;
|
|
148
|
+
};
|
|
149
|
+
var JobTimeoutError = class extends NodaroError {
|
|
150
|
+
constructor(message, jobId, timeoutMs) {
|
|
151
|
+
super(message, "job_timeout", 0);
|
|
152
|
+
this.jobId = jobId;
|
|
153
|
+
this.timeoutMs = timeoutMs;
|
|
154
|
+
this.name = "JobTimeoutError";
|
|
155
|
+
}
|
|
156
|
+
jobId;
|
|
157
|
+
timeoutMs;
|
|
158
|
+
};
|
|
159
|
+
var JobAbortedError = class extends NodaroError {
|
|
160
|
+
constructor(message = "Aborted", jobId) {
|
|
161
|
+
super(message, "job_aborted", 0);
|
|
162
|
+
this.jobId = jobId;
|
|
163
|
+
this.name = "JobAbortedError";
|
|
164
|
+
}
|
|
165
|
+
jobId;
|
|
166
|
+
};
|
|
167
|
+
var StudioPreviewUnavailable = class extends NodaroError {
|
|
168
|
+
constructor(message = "This deployment does not preview operation batches; nothing was sent") {
|
|
169
|
+
super(message, "studio_preview_unavailable", 0);
|
|
170
|
+
this.name = "StudioPreviewUnavailable";
|
|
171
|
+
}
|
|
172
|
+
};
|
|
173
|
+
var StudioPreviewAppliedError = class extends NodaroError {
|
|
174
|
+
constructor(applied, message = applied ? "Asked for a preview and this deployment APPLIED the batch; the change is written \u2014 see `applied`" : "Asked for a preview and this deployment answered with neither one nor a body to read; the batch may have been applied \u2014 re-read the production before deciding anything") {
|
|
175
|
+
super(message, "studio_preview_applied", 0);
|
|
176
|
+
this.applied = applied;
|
|
177
|
+
this.name = "StudioPreviewAppliedError";
|
|
178
|
+
}
|
|
179
|
+
applied;
|
|
180
|
+
};
|
|
181
|
+
var JobHeldError = class extends NodaroError {
|
|
182
|
+
constructor(message, jobId) {
|
|
183
|
+
super(message, "job_held", 0);
|
|
184
|
+
this.jobId = jobId;
|
|
185
|
+
this.name = "JobHeldError";
|
|
186
|
+
}
|
|
187
|
+
jobId;
|
|
188
|
+
};
|
|
189
|
+
var finite = (v) => typeof v === "number" && Number.isFinite(v) ? v : void 0;
|
|
190
|
+
var BARE_CODE = /^[a-z][a-z0-9_]*$/;
|
|
191
|
+
var nonEmpty = (v) => typeof v === "string" && v.length > 0 ? v : void 0;
|
|
192
|
+
function readErrorBody(status, body) {
|
|
193
|
+
const raw = body.error;
|
|
194
|
+
const envelope = raw && typeof raw === "object" ? raw : {};
|
|
195
|
+
const bare = typeof raw === "string" ? raw : void 0;
|
|
196
|
+
const bareCode = bare !== void 0 && BARE_CODE.test(bare) ? bare : void 0;
|
|
197
|
+
const bareSentence = bare !== void 0 && bareCode === void 0 && /\s/.test(bare.trim()) ? bare : void 0;
|
|
198
|
+
const code = nonEmpty(envelope.code) ?? bareCode ?? (status === 400 && raw === void 0 && Array.isArray(body.issues) ? "validation_error" : void 0);
|
|
199
|
+
const outside = status >= 500 ? void 0 : nonEmpty(body.message) ?? nonEmpty(body.error_description) ?? bareSentence;
|
|
200
|
+
const message = nonEmpty(envelope.message) ?? outside;
|
|
201
|
+
return { code, message, envelope };
|
|
202
|
+
}
|
|
203
|
+
function throwFromResponse(status, body) {
|
|
204
|
+
const parsed = body && typeof body === "object" ? body : {};
|
|
205
|
+
const read = readErrorBody(status, parsed);
|
|
206
|
+
const envelope = read.envelope;
|
|
207
|
+
const code = read.code ?? "internal_error";
|
|
208
|
+
const message = read.message ?? (read.code ? read.code : "Request failed");
|
|
209
|
+
if (status === 401) throw new UnauthorizedError(read.message);
|
|
210
|
+
if (status === 409 && (code === "workflow_conflict" || code === "production_busy")) {
|
|
211
|
+
throw new WorkflowConflictError(
|
|
212
|
+
read.message,
|
|
213
|
+
envelope.currentUpdatedAt,
|
|
214
|
+
envelope.currentVersion,
|
|
215
|
+
envelope.currentRecord,
|
|
216
|
+
code
|
|
217
|
+
);
|
|
218
|
+
}
|
|
219
|
+
if (status >= 400 && status < 500 && typeof envelope.opIndex === "number") {
|
|
220
|
+
throw new StudioOpError(message, code, status, envelope.opIndex);
|
|
221
|
+
}
|
|
222
|
+
if (status === 409 && CONTINUATION_REFUSAL_CODES.has(code) && typeof parsed.jobId === "string") {
|
|
223
|
+
throw new ContinuationRefusedError(message, code, parsed.jobId);
|
|
224
|
+
}
|
|
225
|
+
if (status === 409 && code === "continuation_preview_pending" && typeof parsed.executionId === "string") {
|
|
226
|
+
throw new ContinuationPreviewPendingError(
|
|
227
|
+
message,
|
|
228
|
+
parsed.executionId,
|
|
229
|
+
stringList(parsed.renderNodeIds),
|
|
230
|
+
stringList(parsed.reviewNodeIds),
|
|
231
|
+
heldFinalRunOf(parsed.next)
|
|
232
|
+
);
|
|
233
|
+
}
|
|
234
|
+
if (status === 409 && code === "already_running" && typeof parsed.executionId === "string") {
|
|
235
|
+
throw new AlreadyRunningError(message, parsed.executionId);
|
|
236
|
+
}
|
|
237
|
+
if (status === 409 && code === "app_run_version_changed") {
|
|
238
|
+
throw new AppRunVersionChangedError(message, finite(parsed.runVersion), finite(parsed.appVersion));
|
|
239
|
+
}
|
|
240
|
+
if (status === 422 && code === "job_blocked") throw new JobBlockedError(read.message);
|
|
241
|
+
if (status === 403 && code === "insufficient_scope") {
|
|
242
|
+
throw new ForbiddenError(read.message, envelope.missingScope);
|
|
243
|
+
}
|
|
244
|
+
if (status === 403) throw new ForbiddenError(read.message);
|
|
245
|
+
if (status === 404) throw new NotFoundError(read.message);
|
|
246
|
+
if (status === 429) throw new RateLimitedError(read.message);
|
|
247
|
+
if (status === 402) {
|
|
248
|
+
throw new InsufficientCreditsError(
|
|
249
|
+
read.message,
|
|
250
|
+
finite(envelope.required) ?? finite(parsed.required),
|
|
251
|
+
finite(envelope.available) ?? finite(parsed.balance)
|
|
252
|
+
);
|
|
253
|
+
}
|
|
254
|
+
if (status === 413) throw new StorageExceededError(read.message, envelope.limitBytes);
|
|
255
|
+
throw new NodaroError(message, code, status);
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
export { AlreadyRunningError, AppRunVersionChangedError, ContinuationPreviewPendingError, ContinuationRefusedError, ForbiddenError, InsufficientCreditsError, JobAbortedError, JobBlockedError, JobFailedError, JobHeldError, JobTimeoutError, NodaroError, NotFoundError, RateLimitedError, StorageExceededError, StudioOpError, StudioPreviewAppliedError, StudioPreviewUnavailable, UnauthorizedError, WorkflowConflictError, throwFromResponse };
|
|
259
|
+
//# sourceMappingURL=chunk-JGS6YBDW.js.map
|
|
260
|
+
//# sourceMappingURL=chunk-JGS6YBDW.js.map
|