@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
package/README.md
CHANGED
|
@@ -310,6 +310,37 @@ try {
|
|
|
310
310
|
| `client.developerApps` | Manage your own OAuth apps |
|
|
311
311
|
| `client.oauth` | Code exchange, revoke, app-info |
|
|
312
312
|
|
|
313
|
+
## Subpath entries
|
|
314
|
+
|
|
315
|
+
The root `@nodaro/sdk` exports everything. Each resource is also published as
|
|
316
|
+
its own entry point, which loads only that resource's module:
|
|
317
|
+
|
|
318
|
+
`/apps`, `/audio`, `/billing`, `/catalogs`, `/characters`, `/client`, `/collections`, `/community`, `/competitors`, `/copilot`, `/core`, `/creatures`, `/credits`, `/developer-apps`, `/edit`, `/errors`, `/executions`, `/gallery`, `/jobs`, `/library`, `/llm`, `/locations`, `/media`, `/models`, `/moodboards`, `/node-presets`, `/nodes`, `/oauth`, `/objects`, `/organizations`, `/palettes`, `/picker-catalogs`, `/pipelines`, `/projects`, `/prompt-helper`, `/recast`, `/reduce`, `/saved-posts`, `/scene3d`, `/sessions`, `/shots`, `/studio`, `/templates`, `/tutorials`, `/uploads`, `/video-pro`, `/voices`, `/webhooks`, `/workflows`, `/workspaces`
|
|
319
|
+
|
|
320
|
+
```ts
|
|
321
|
+
import { NotFoundError } from "@nodaro/sdk/errors"
|
|
322
|
+
import type { Job } from "@nodaro/sdk/jobs"
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
The root is the union of the entries, and a value imported from an entry is the
|
|
326
|
+
same instance as the one imported from the root. `@nodaro/sdk/client`
|
|
327
|
+
(`createClient`) builds every resource, so it loads all of them. To load only
|
|
328
|
+
the resources you use, extend `NodaroClientCore` (`@nodaro/sdk/core`, the client
|
|
329
|
+
without its resources) with just those:
|
|
330
|
+
|
|
331
|
+
```ts
|
|
332
|
+
import { NodaroClientCore, StaticTokenAuth } from "@nodaro/sdk/core"
|
|
333
|
+
import { JobsResource } from "@nodaro/sdk/jobs"
|
|
334
|
+
import { NodesResource } from "@nodaro/sdk/nodes"
|
|
335
|
+
|
|
336
|
+
class AppClient extends NodaroClientCore {
|
|
337
|
+
readonly jobs = new JobsResource(this)
|
|
338
|
+
readonly nodes = new NodesResource(this) // polls through `jobs`
|
|
339
|
+
}
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
See the [SDK Reference](https://nodaro.ai/docs/developers/sdk/client).
|
|
343
|
+
|
|
313
344
|
## Auth modes
|
|
314
345
|
|
|
315
346
|
| Class | Use when |
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// src/resources/library.ts
|
|
4
|
+
var LibraryResource = class {
|
|
5
|
+
constructor(client) {
|
|
6
|
+
this.client = client;
|
|
7
|
+
}
|
|
8
|
+
client;
|
|
9
|
+
/**
|
|
10
|
+
* `GET /v1/library` → a page of the caller's media assets (newest first) plus
|
|
11
|
+
* a `nextCursor`. Pass the returned `nextCursor` back as `cursor` for the next
|
|
12
|
+
* page. Filter by `type` and search the filename with `q`; `owned: true`
|
|
13
|
+
* returns the full Storage set (uploads + generations), the default only
|
|
14
|
+
* library-saved + shared items.
|
|
15
|
+
*/
|
|
16
|
+
list(params = {}) {
|
|
17
|
+
const qs = new URLSearchParams();
|
|
18
|
+
if (params.type) qs.set("type", params.type);
|
|
19
|
+
if (params.q) qs.set("q", params.q);
|
|
20
|
+
else if (params.search) qs.set("search", params.search);
|
|
21
|
+
if (params.limit !== void 0) qs.set("limit", String(params.limit));
|
|
22
|
+
if (params.cursor) qs.set("cursor", params.cursor);
|
|
23
|
+
if (params.owned !== void 0) qs.set("owned", String(params.owned));
|
|
24
|
+
if (params.source) qs.set("source", params.source);
|
|
25
|
+
const query = qs.toString();
|
|
26
|
+
return this.client.request("GET", `/v1/library${query ? `?${query}` : ""}`);
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
exports.LibraryResource = LibraryResource;
|
|
31
|
+
//# sourceMappingURL=chunk-2DZWWIJ4.cjs.map
|
|
32
|
+
//# sourceMappingURL=chunk-2DZWWIJ4.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/resources/library.ts"],"names":[],"mappings":";;;AAgGO,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,IAAA,CAAK,MAAA,GAA4B,EAAC,EAA+B;AAC/D,IAAA,MAAM,EAAA,GAAK,IAAI,eAAA,EAAgB;AAC/B,IAAA,IAAI,OAAO,IAAA,EAAM,EAAA,CAAG,GAAA,CAAI,MAAA,EAAQ,OAAO,IAAI,CAAA;AAG3C,IAAA,IAAI,OAAO,CAAA,EAAG,EAAA,CAAG,GAAA,CAAI,GAAA,EAAK,OAAO,CAAC,CAAA;AAAA,SAAA,IACzB,OAAO,MAAA,EAAQ,EAAA,CAAG,GAAA,CAAI,QAAA,EAAU,OAAO,MAAM,CAAA;AACtD,IAAA,IAAI,MAAA,CAAO,UAAU,MAAA,EAAW,EAAA,CAAG,IAAI,OAAA,EAAS,MAAA,CAAO,MAAA,CAAO,KAAK,CAAC,CAAA;AACpE,IAAA,IAAI,OAAO,MAAA,EAAQ,EAAA,CAAG,GAAA,CAAI,QAAA,EAAU,OAAO,MAAM,CAAA;AACjD,IAAA,IAAI,MAAA,CAAO,UAAU,MAAA,EAAW,EAAA,CAAG,IAAI,OAAA,EAAS,MAAA,CAAO,MAAA,CAAO,KAAK,CAAC,CAAA;AACpE,IAAA,IAAI,OAAO,MAAA,EAAQ,EAAA,CAAG,GAAA,CAAI,QAAA,EAAU,OAAO,MAAM,CAAA;AACjD,IAAA,MAAM,KAAA,GAAQ,GAAG,QAAA,EAAS;AAC1B,IAAA,OAAO,IAAA,CAAK,MAAA,CAAO,OAAA,CAAQ,KAAA,EAAO,CAAA,WAAA,EAAc,QAAQ,CAAA,CAAA,EAAI,KAAK,CAAA,CAAA,GAAK,EAAE,CAAA,CAAE,CAAA;AAAA,EAC5E;AACF","file":"chunk-2DZWWIJ4.cjs","sourcesContent":["import type { NodaroClientCore } from \"../core.js\"\n\n/**\n * A media asset in the caller's library (`GET /v1/library`). Mirrors the route's\n * camelCase row shape (`backend/src/routes/library.ts`), the source of truth —\n * keep in sync if that response changes. Covers BOTH uploaded files and saved\n * generations; `type` discriminates the media kind.\n */\nexport interface LibraryAsset {\n readonly id: string\n /** Media kind — filter the list with the same values via `type`. */\n readonly type: \"image\" | \"video\" | \"audio\"\n /** Display filename (server override or the original); `null` if unknown. */\n readonly filename: string | null\n readonly mimeType: string | null\n readonly sizeBytes: number | null\n /** Public R2 URL of the asset. */\n readonly url: string\n /** Generated thumbnail URL (images/video); `null` for audio or when absent. */\n readonly thumbnailUrl: string | null\n readonly metadata: Record<string, unknown>\n /** True when promoted to the shared (admin) library. */\n readonly isLibraryItem: boolean\n /** How the asset entered storage (e.g. \"manual_upload\" | \"generated\"). */\n readonly uploadSource: string\n /**\n * WHICH SURFACE the media came from — `\"internal\" | \"mcp\" | \"app\" | \"cli\" |\n * \"sdk\" | \"extension\" | \"web\" | \"api\"`. Distinct from `uploadSource`, which\n * says how it entered storage (uploaded vs generated), not who was calling.\n * `null` on assets created before origin tracking existed — render as\n * \"unknown\", don't infer.\n */\n readonly source: string | null\n /** Specific identity within `source` (origin host, `extension/<name>`, `sdk/<version>`, MCP client, app id). */\n readonly sourceDetail: string | null\n /**\n * The job that made the file, when known: `null` for an upload or once that\n * job's history was deleted. Optional because servers before this field\n * leave it out.\n */\n readonly jobId?: string | null\n readonly createdAt: string\n}\n\nexport interface ListLibraryParams {\n /** Filter by media kind; `\"all\"` (default) returns every kind. */\n readonly type?: \"all\" | \"image\" | \"video\" | \"audio\"\n /**\n * Search words: only the assets whose filename contains every word (split\n * on spaces, the first 5), ignoring case. Each word is matched as written\n * (`%`, `_` and `*` are not wildcards); blank means no search; up to 200\n * characters.\n */\n readonly q?: string\n /**\n * @deprecated Use `q`. The original name of the filename search, still\n * accepted; when both are given, `q` is sent and `search` is not.\n */\n readonly search?: string\n /** Page size, 1–100 (default 40). */\n readonly limit?: number\n /** Opaque cursor from a prior page's `nextCursor` (fetches the next page). */\n readonly cursor?: string\n /**\n * `true` → EVERY asset the caller owns (the \"Storage\" view: uploads +\n * generations, regardless of the in-library flag). `false` (default) → only\n * assets explicitly saved to the library plus shared items (the in-editor\n * Media Library picker).\n */\n readonly owned?: boolean\n /**\n * Filter to media that originated from one surface (see\n * {@link LibraryAsset.source}) — e.g. `\"extension\"` for everything a\n * browser extension produced. Assets predating origin tracking have a null\n * source and match no value, so they appear only when this is omitted.\n */\n readonly source?: \"internal\" | \"mcp\" | \"app\" | \"cli\" | \"sdk\" | \"extension\" | \"web\" | \"api\"\n}\n\nexport interface ListLibraryResult {\n readonly data: LibraryAsset[]\n /** Pass back as `cursor` for the next page; `null` when there are no more. */\n readonly nextCursor: string | null\n /** Exact total (first page only — omitted on cursor-paged requests). */\n readonly totalCount?: number\n}\n\n/**\n * Library — the caller's media assets (uploaded files + saved generations).\n *\n * Read surface over `GET /v1/library`: a cursor-paginated, type-filterable,\n * filename-searchable list. This is the \"bring from your media\" source for\n * pickers that also offer upload + in-production stills. Writes (saving a\n * generation, promoting/removing) stay on their dedicated routes — not exposed\n * here until a consumer needs them.\n */\nexport class LibraryResource {\n constructor(private client: NodaroClientCore) {}\n\n /**\n * `GET /v1/library` → a page of the caller's media assets (newest first) plus\n * a `nextCursor`. Pass the returned `nextCursor` back as `cursor` for the next\n * page. Filter by `type` and search the filename with `q`; `owned: true`\n * returns the full Storage set (uploads + generations), the default only\n * library-saved + shared items.\n */\n list(params: ListLibraryParams = {}): Promise<ListLibraryResult> {\n const qs = new URLSearchParams()\n if (params.type) qs.set(\"type\", params.type)\n // `search` alone keeps its own name on the wire, so a server older than\n // `q` still filters.\n if (params.q) qs.set(\"q\", params.q)\n else 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.owned !== undefined) qs.set(\"owned\", String(params.owned))\n if (params.source) qs.set(\"source\", params.source)\n const query = qs.toString()\n return this.client.request(\"GET\", `/v1/library${query ? `?${query}` : \"\"}`)\n }\n}\n"]}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// src/resources/node-presets.ts
|
|
4
|
+
var PresetsResource = class {
|
|
5
|
+
constructor(client) {
|
|
6
|
+
this.client = client;
|
|
7
|
+
}
|
|
8
|
+
client;
|
|
9
|
+
/**
|
|
10
|
+
* `GET /v1/node-presets` → your custom presets, newest first. Pass `nodeType`
|
|
11
|
+
* (e.g. `"generate-image"`) to filter to one node type.
|
|
12
|
+
*/
|
|
13
|
+
async list(nodeType) {
|
|
14
|
+
const qs = nodeType ? `?nodeType=${encodeURIComponent(nodeType)}` : "";
|
|
15
|
+
const res = await this.client.request("GET", `/v1/node-presets${qs}`);
|
|
16
|
+
return res.data;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* `GET /v1/node-preset-groups` → your preset folders/sections, in display
|
|
20
|
+
* order. Pass `nodeType` to filter to one node type.
|
|
21
|
+
*/
|
|
22
|
+
async listGroups(nodeType) {
|
|
23
|
+
const qs = nodeType ? `?nodeType=${encodeURIComponent(nodeType)}` : "";
|
|
24
|
+
const res = await this.client.request("GET", `/v1/node-preset-groups${qs}`);
|
|
25
|
+
return res.data;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* `GET /v1/node-presets/factory` → the built-in catalog for `nodeType`. These
|
|
29
|
+
* ship with the app (no account needed to exist), so they're a good starting
|
|
30
|
+
* point for "what configs are available".
|
|
31
|
+
*
|
|
32
|
+
* Login is optional: the catalog is public, so this works on a client with
|
|
33
|
+
* no credential at all (`auth: { getToken: async () => null }`) — show the
|
|
34
|
+
* names, example pictures (`previewUrl`) and photo counts (`minReferences`,
|
|
35
|
+
* `needsImage`) to a visitor who is not signed in, and ask for a login only
|
|
36
|
+
* when they generate. Your OWN presets (`list()`) still need a token.
|
|
37
|
+
*/
|
|
38
|
+
listFactory(nodeType) {
|
|
39
|
+
return this.client.request(
|
|
40
|
+
"GET",
|
|
41
|
+
`/v1/node-presets/factory?nodeType=${encodeURIComponent(nodeType)}`
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
/** `POST /v1/node-presets` → the new preset. */
|
|
45
|
+
async create(input) {
|
|
46
|
+
const res = await this.client.request("POST", "/v1/node-presets", { body: input });
|
|
47
|
+
return res.data;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* `PATCH /v1/node-presets/:id` → the updated preset. Pass the `updatedAt` you
|
|
51
|
+
* read as `expectedUpdatedAt` to refuse (409 `conflict`) a change made
|
|
52
|
+
* elsewhere since.
|
|
53
|
+
*/
|
|
54
|
+
async update(id, patch, opts = {}) {
|
|
55
|
+
const body = opts.expectedUpdatedAt ? { ...patch, expectedUpdatedAt: opts.expectedUpdatedAt } : patch;
|
|
56
|
+
const res = await this.client.request("PATCH", `/v1/node-presets/${encodeURIComponent(id)}`, { body });
|
|
57
|
+
return res.data;
|
|
58
|
+
}
|
|
59
|
+
/** `DELETE /v1/node-presets/:id` (404 when it is not yours). `expectedUpdatedAt` as on `update`. */
|
|
60
|
+
async delete(id, opts = {}) {
|
|
61
|
+
const res = await this.client.request("DELETE", `/v1/node-presets/${encodeURIComponent(id)}`, {
|
|
62
|
+
query: { expectedUpdatedAt: opts.expectedUpdatedAt }
|
|
63
|
+
});
|
|
64
|
+
return res.data;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* `POST /v1/node-presets/import` — up to 500 presets in one call. A name you
|
|
68
|
+
* already use gets an "(imported N)" suffix; a preset whose data is empty
|
|
69
|
+
* after stripping runtime keys is skipped.
|
|
70
|
+
*/
|
|
71
|
+
async import(presets) {
|
|
72
|
+
const res = await this.client.request("POST", "/v1/node-presets/import", { body: { presets } });
|
|
73
|
+
return res.data;
|
|
74
|
+
}
|
|
75
|
+
/** `POST /v1/node-presets/reorder` — positions (and group membership) for many presets and groups at once. */
|
|
76
|
+
async reorder(input) {
|
|
77
|
+
const res = await this.client.request("POST", "/v1/node-presets/reorder", { body: input });
|
|
78
|
+
return res.data;
|
|
79
|
+
}
|
|
80
|
+
/** `GET /v1/node-presets/favorites` → your favorite preset ids for `nodeType`, newest first. */
|
|
81
|
+
async favorites(nodeType) {
|
|
82
|
+
const res = await this.client.request("GET", "/v1/node-presets/favorites", { query: { nodeType } });
|
|
83
|
+
return res.data;
|
|
84
|
+
}
|
|
85
|
+
/** `POST /v1/node-presets/favorites` — idempotent. */
|
|
86
|
+
async addFavorite(input) {
|
|
87
|
+
const res = await this.client.request("POST", "/v1/node-presets/favorites", { body: input });
|
|
88
|
+
return res.data;
|
|
89
|
+
}
|
|
90
|
+
/** `DELETE /v1/node-presets/favorites` — idempotent. */
|
|
91
|
+
async removeFavorite(input) {
|
|
92
|
+
const res = await this.client.request("DELETE", "/v1/node-presets/favorites", {
|
|
93
|
+
query: { nodeType: input.nodeType, presetId: input.presetId }
|
|
94
|
+
});
|
|
95
|
+
return res.data;
|
|
96
|
+
}
|
|
97
|
+
/** `POST /v1/node-preset-groups` → the new folder or section. */
|
|
98
|
+
async createGroup(input) {
|
|
99
|
+
const res = await this.client.request("POST", "/v1/node-preset-groups", { body: input });
|
|
100
|
+
return res.data;
|
|
101
|
+
}
|
|
102
|
+
/** `PATCH /v1/node-preset-groups/:id` → the renamed or moved group. */
|
|
103
|
+
async updateGroup(id, patch) {
|
|
104
|
+
const res = await this.client.request("PATCH", `/v1/node-preset-groups/${encodeURIComponent(id)}`, {
|
|
105
|
+
body: patch
|
|
106
|
+
});
|
|
107
|
+
return res.data;
|
|
108
|
+
}
|
|
109
|
+
/** `DELETE /v1/node-preset-groups/:id` — its presets move out of the group; none are deleted. */
|
|
110
|
+
async deleteGroup(id) {
|
|
111
|
+
const res = await this.client.request("DELETE", `/v1/node-preset-groups/${encodeURIComponent(id)}`);
|
|
112
|
+
return res.data;
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
exports.PresetsResource = PresetsResource;
|
|
117
|
+
//# sourceMappingURL=chunk-34PU2DAT.cjs.map
|
|
118
|
+
//# sourceMappingURL=chunk-34PU2DAT.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/resources/node-presets.ts"],"names":[],"mappings":";;;AAiJO,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,MAAM,KAAK,QAAA,EAA0C;AACnD,IAAA,MAAM,KAAK,QAAA,GAAW,CAAA,UAAA,EAAa,kBAAA,CAAmB,QAAQ,CAAC,CAAA,CAAA,GAAK,EAAA;AACpE,IAAA,MAAM,GAAA,GAAM,MAAM,IAAA,CAAK,MAAA,CAAO,QAAgC,KAAA,EAAO,CAAA,gBAAA,EAAmB,EAAE,CAAA,CAAE,CAAA;AAC5F,IAAA,OAAO,GAAA,CAAI,IAAA;AAAA,EACb;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,MAAM,WAAW,QAAA,EAA+C;AAC9D,IAAA,MAAM,KAAK,QAAA,GAAW,CAAA,UAAA,EAAa,kBAAA,CAAmB,QAAQ,CAAC,CAAA,CAAA,GAAK,EAAA;AACpE,IAAA,MAAM,GAAA,GAAM,MAAM,IAAA,CAAK,MAAA,CAAO,QAAqC,KAAA,EAAO,CAAA,sBAAA,EAAyB,EAAE,CAAA,CAAE,CAAA;AACvG,IAAA,OAAO,GAAA,CAAI,IAAA;AAAA,EACb;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAaA,YAAY,QAAA,EAAiD;AAC3D,IAAA,OAAO,KAAK,MAAA,CAAO,OAAA;AAAA,MACjB,KAAA;AAAA,MACA,CAAA,kCAAA,EAAqC,kBAAA,CAAmB,QAAQ,CAAC,CAAA;AAAA,KACnE;AAAA,EACF;AAAA;AAAA,EAGA,MAAM,OAAO,KAAA,EAAmD;AAC9D,IAAA,MAAM,GAAA,GAAM,MAAM,IAAA,CAAK,MAAA,CAAO,OAAA,CAA8B,QAAQ,kBAAA,EAAoB,EAAE,IAAA,EAAM,KAAA,EAAO,CAAA;AACvG,IAAA,OAAO,GAAA,CAAI,IAAA;AAAA,EACb;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,MAAM,MAAA,CAAO,EAAA,EAAY,KAAA,EAA8B,IAAA,GAAuC,EAAC,EAAwB;AACrH,IAAA,MAAM,IAAA,GAAO,KAAK,iBAAA,GAAoB,EAAE,GAAG,KAAA,EAAO,iBAAA,EAAmB,IAAA,CAAK,iBAAA,EAAkB,GAAI,KAAA;AAChG,IAAA,MAAM,GAAA,GAAM,MAAM,IAAA,CAAK,MAAA,CAAO,OAAA,CAA8B,OAAA,EAAS,CAAA,iBAAA,EAAoB,kBAAA,CAAmB,EAAE,CAAC,CAAA,CAAA,EAAI,EAAE,MAAM,CAAA;AAC3H,IAAA,OAAO,GAAA,CAAI,IAAA;AAAA,EACb;AAAA;AAAA,EAGA,MAAM,MAAA,CAAO,EAAA,EAAY,IAAA,GAAuC,EAAC,EAA+B;AAC9F,IAAA,MAAM,GAAA,GAAM,MAAM,IAAA,CAAK,MAAA,CAAO,OAAA,CAAqC,UAAU,CAAA,iBAAA,EAAoB,kBAAA,CAAmB,EAAE,CAAC,CAAA,CAAA,EAAI;AAAA,MACzH,KAAA,EAAO,EAAE,iBAAA,EAAmB,IAAA,CAAK,iBAAA;AAAkB,KACpD,CAAA;AACD,IAAA,OAAO,GAAA,CAAI,IAAA;AAAA,EACb;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,MAAM,OAAO,OAAA,EAAiE;AAC5E,IAAA,MAAM,GAAA,GAAM,MAAM,IAAA,CAAK,MAAA,CAAO,OAAA,CAAwC,MAAA,EAAQ,yBAAA,EAA2B,EAAE,IAAA,EAAM,EAAE,OAAA,EAAQ,EAAG,CAAA;AAC9H,IAAA,OAAO,GAAA,CAAI,IAAA;AAAA,EACb;AAAA;AAAA,EAGA,MAAM,QAAQ,KAAA,EAAuD;AACnE,IAAA,MAAM,GAAA,GAAM,MAAM,IAAA,CAAK,MAAA,CAAO,OAAA,CAAgC,QAAQ,0BAAA,EAA4B,EAAE,IAAA,EAAM,KAAA,EAAO,CAAA;AACjH,IAAA,OAAO,GAAA,CAAI,IAAA;AAAA,EACb;AAAA;AAAA,EAGA,MAAM,UAAU,QAAA,EAAqC;AACnD,IAAA,MAAM,GAAA,GAAM,MAAM,IAAA,CAAK,MAAA,CAAO,OAAA,CAA4B,KAAA,EAAO,4BAAA,EAA8B,EAAE,KAAA,EAAO,EAAE,QAAA,EAAS,EAAG,CAAA;AACtH,IAAA,OAAO,GAAA,CAAI,IAAA;AAAA,EACb;AAAA;AAAA,EAGA,MAAM,YAAY,KAAA,EAA4D;AAC5E,IAAA,MAAM,GAAA,GAAM,MAAM,IAAA,CAAK,MAAA,CAAO,OAAA,CAAqC,QAAQ,4BAAA,EAA8B,EAAE,IAAA,EAAM,KAAA,EAAO,CAAA;AACxH,IAAA,OAAO,GAAA,CAAI,IAAA;AAAA,EACb;AAAA;AAAA,EAGA,MAAM,eAAe,KAAA,EAA4D;AAC/E,IAAA,MAAM,MAAM,MAAM,IAAA,CAAK,MAAA,CAAO,OAAA,CAAqC,UAAU,4BAAA,EAA8B;AAAA,MACzG,OAAO,EAAE,QAAA,EAAU,MAAM,QAAA,EAAU,QAAA,EAAU,MAAM,QAAA;AAAS,KAC7D,CAAA;AACD,IAAA,OAAO,GAAA,CAAI,IAAA;AAAA,EACb;AAAA;AAAA,EAGA,MAAM,YAAY,KAAA,EAA6D;AAC7E,IAAA,MAAM,GAAA,GAAM,MAAM,IAAA,CAAK,MAAA,CAAO,OAAA,CAAmC,QAAQ,wBAAA,EAA0B,EAAE,IAAA,EAAM,KAAA,EAAO,CAAA;AAClH,IAAA,OAAO,GAAA,CAAI,IAAA;AAAA,EACb;AAAA;AAAA,EAGA,MAAM,WAAA,CAAY,EAAA,EAAY,KAAA,EAA6D;AACzF,IAAA,MAAM,GAAA,GAAM,MAAM,IAAA,CAAK,MAAA,CAAO,OAAA,CAAmC,SAAS,CAAA,uBAAA,EAA0B,kBAAA,CAAmB,EAAE,CAAC,CAAA,CAAA,EAAI;AAAA,MAC5H,IAAA,EAAM;AAAA,KACP,CAAA;AACD,IAAA,OAAO,GAAA,CAAI,IAAA;AAAA,EACb;AAAA;AAAA,EAGA,MAAM,YAAY,EAAA,EAAwC;AACxD,IAAA,MAAM,GAAA,GAAM,MAAM,IAAA,CAAK,MAAA,CAAO,OAAA,CAAqC,UAAU,CAAA,uBAAA,EAA0B,kBAAA,CAAmB,EAAE,CAAC,CAAA,CAAE,CAAA;AAC/H,IAAA,OAAO,GAAA,CAAI,IAAA;AAAA,EACb;AACF","file":"chunk-34PU2DAT.cjs","sourcesContent":["import type { NodaroClientCore } from \"../core.js\"\nimport type { FactoryPreset } from \"@nodaro/prompts/presets\"\n\n/**\n * A user's saved custom preset (`GET /v1/node-presets`). Mirrors the backend's\n * camelCase row shape. `data` is captured node config — merge it into a node's\n * data when building/running a workflow to \"apply\" the preset.\n */\nexport interface NodePreset {\n id: string\n nodeType: string\n name: string\n description?: string\n data: Record<string, unknown>\n groupId?: string\n tags: string[]\n sortOrder: number\n /**\n * How many connected reference images the preset works from (0 = none),\n * counted from the `{image:N}` tokens in its prompt. Absent from servers that\n * predate it.\n */\n minReferences?: number\n /** `minReferences > 0` — the preset works from a connected photo. */\n needsImage?: boolean\n /** The example picture stored with the preset, or null. */\n previewUrl?: string | null\n createdAt: string\n updatedAt: string\n}\n\n/** A user's preset folder/section (`GET /v1/node-preset-groups`). */\nexport interface NodePresetGroup {\n id: string\n nodeType: string\n name: string\n kind: \"folder\" | \"section\"\n sortOrder: number\n createdAt: string\n updatedAt: string\n}\n\n/**\n * One built-in preset as `GET /v1/node-presets/factory` serves it: the\n * catalog entry plus what a client needs to present it.\n */\nexport interface FactoryPresetEntry extends FactoryPreset {\n /**\n * How many connected reference images the preset works from (0 = none):\n * Reference Sheet, Portrait Transformations, Edits and every template using\n * `{image:N}` need at least one. Absent from servers that predate it.\n */\n minReferences?: number\n /** `minReferences > 0` — the preset works from a connected photo. */\n needsImage?: boolean\n /**\n * An example picture of what the preset makes — an absolute URL on the\n * server you asked — or null while the preset has none.\n */\n previewUrl?: string | null\n}\n\n/**\n * Result of `GET /v1/node-presets/factory` — the built-in (factory) catalog for\n * a node type.\n */\nexport interface FactoryPresetsResult {\n data: FactoryPresetEntry[]\n}\n\n/** `POST /v1/node-presets` body. */\nexport interface CreateNodePresetInput {\n /** The node type the preset configures, e.g. `\"generate-image\"`. */\n nodeType: string\n /** Unique per node type (case-insensitive); a duplicate answers 409 `name_taken`. */\n name: string\n description?: string\n /** Node config (≤ 64 KB). Runtime keys (results, job ids, labels) are stripped. */\n data: Record<string, unknown>\n /** One of your preset groups, or null for none. */\n groupId?: string | null\n tags?: string[]\n sortOrder?: number\n /**\n * An example picture: an image stored on this platform (an upload or a\n * generated result) that already exists. Anything else answers 400.\n */\n previewUrl?: string | null\n}\n\n/** `PATCH /v1/node-presets/:id` body — every field optional; `previewUrl: null` removes the picture. */\nexport type UpdateNodePresetInput = Partial<Omit<CreateNodePresetInput, \"nodeType\">>\n\n/** One entry of `POST /v1/node-presets/import` (the `presets export` envelope's entries fit). */\nexport interface ImportNodePresetInput {\n nodeType: string\n name: string\n description?: string\n data: Record<string, unknown>\n previewUrl?: string | null\n}\n\n/** `POST /v1/node-presets/reorder` body. */\nexport interface ReorderNodePresetsInput {\n groups?: Array<{ id: string; sortOrder: number }>\n /** `groupId` moves the preset into one of your groups (null = out of any group). */\n presets?: Array<{ id: string; groupId?: string | null; sortOrder: number }>\n}\n\n/** A favorite: a factory preset id (`\"generate-image/character-board\"`) or one of your preset ids. */\nexport interface NodePresetFavoriteInput {\n nodeType: string\n presetId: string\n}\n\n/** `POST /v1/node-preset-groups` body. */\nexport interface CreateNodePresetGroupInput {\n nodeType: string\n name: string\n /** A collapsible `\"folder\"` (default) or a flat `\"section\"` header. */\n kind?: \"folder\" | \"section\"\n sortOrder?: number\n}\n\n/** `PATCH /v1/node-preset-groups/:id` body. */\nexport interface UpdateNodePresetGroupInput {\n name?: string\n sortOrder?: number\n}\n\n/**\n * Node presets — reusable, named node configurations: your own presets and\n * folders, your favorites, and the built-in factory catalog.\n *\n * To *use* a preset, take its `data` and merge it into a node's config when you\n * create/update a workflow. `needsImage` / `minReferences` say how many photos\n * it works from; `previewUrl` is an example picture (null when there is none).\n *\n * The factory catalog (`listFactory`) is public: no token needed. Reads of\n * your own library need the `presets:read` scope for an OAuth app token;\n * writes (create, update, delete, import, reorder, favorites, groups) need\n * `assets:write`. Your own API key needs neither — but a key limited to some\n * workflows cannot reach your own presets (it reads the factory catalog as\n * anyone can).\n */\nexport class PresetsResource {\n constructor(private client: NodaroClientCore) {}\n\n /**\n * `GET /v1/node-presets` → your custom presets, newest first. Pass `nodeType`\n * (e.g. `\"generate-image\"`) to filter to one node type.\n */\n async list(nodeType?: string): Promise<NodePreset[]> {\n const qs = nodeType ? `?nodeType=${encodeURIComponent(nodeType)}` : \"\"\n const res = await this.client.request<{ data: NodePreset[] }>(\"GET\", `/v1/node-presets${qs}`)\n return res.data\n }\n\n /**\n * `GET /v1/node-preset-groups` → your preset folders/sections, in display\n * order. Pass `nodeType` to filter to one node type.\n */\n async listGroups(nodeType?: string): Promise<NodePresetGroup[]> {\n const qs = nodeType ? `?nodeType=${encodeURIComponent(nodeType)}` : \"\"\n const res = await this.client.request<{ data: NodePresetGroup[] }>(\"GET\", `/v1/node-preset-groups${qs}`)\n return res.data\n }\n\n /**\n * `GET /v1/node-presets/factory` → the built-in catalog for `nodeType`. These\n * ship with the app (no account needed to exist), so they're a good starting\n * point for \"what configs are available\".\n *\n * Login is optional: the catalog is public, so this works on a client with\n * no credential at all (`auth: { getToken: async () => null }`) — show the\n * names, example pictures (`previewUrl`) and photo counts (`minReferences`,\n * `needsImage`) to a visitor who is not signed in, and ask for a login only\n * when they generate. Your OWN presets (`list()`) still need a token.\n */\n listFactory(nodeType: string): Promise<FactoryPresetsResult> {\n return this.client.request<FactoryPresetsResult>(\n \"GET\",\n `/v1/node-presets/factory?nodeType=${encodeURIComponent(nodeType)}`,\n )\n }\n\n /** `POST /v1/node-presets` → the new preset. */\n async create(input: CreateNodePresetInput): Promise<NodePreset> {\n const res = await this.client.request<{ data: NodePreset }>(\"POST\", \"/v1/node-presets\", { body: input })\n return res.data\n }\n\n /**\n * `PATCH /v1/node-presets/:id` → the updated preset. Pass the `updatedAt` you\n * read as `expectedUpdatedAt` to refuse (409 `conflict`) a change made\n * elsewhere since.\n */\n async update(id: string, patch: UpdateNodePresetInput, opts: { expectedUpdatedAt?: string } = {}): Promise<NodePreset> {\n const body = opts.expectedUpdatedAt ? { ...patch, expectedUpdatedAt: opts.expectedUpdatedAt } : patch\n const res = await this.client.request<{ data: NodePreset }>(\"PATCH\", `/v1/node-presets/${encodeURIComponent(id)}`, { body })\n return res.data\n }\n\n /** `DELETE /v1/node-presets/:id` (404 when it is not yours). `expectedUpdatedAt` as on `update`. */\n async delete(id: string, opts: { expectedUpdatedAt?: string } = {}): Promise<{ success: true }> {\n const res = await this.client.request<{ data: { success: true } }>(\"DELETE\", `/v1/node-presets/${encodeURIComponent(id)}`, {\n query: { expectedUpdatedAt: opts.expectedUpdatedAt },\n })\n return res.data\n }\n\n /**\n * `POST /v1/node-presets/import` — up to 500 presets in one call. A name you\n * already use gets an \"(imported N)\" suffix; a preset whose data is empty\n * after stripping runtime keys is skipped.\n */\n async import(presets: ImportNodePresetInput[]): Promise<{ imported: number }> {\n const res = await this.client.request<{ data: { imported: number } }>(\"POST\", \"/v1/node-presets/import\", { body: { presets } })\n return res.data\n }\n\n /** `POST /v1/node-presets/reorder` — positions (and group membership) for many presets and groups at once. */\n async reorder(input: ReorderNodePresetsInput): Promise<{ ok: true }> {\n const res = await this.client.request<{ data: { ok: true } }>(\"POST\", \"/v1/node-presets/reorder\", { body: input })\n return res.data\n }\n\n /** `GET /v1/node-presets/favorites` → your favorite preset ids for `nodeType`, newest first. */\n async favorites(nodeType: string): Promise<string[]> {\n const res = await this.client.request<{ data: string[] }>(\"GET\", \"/v1/node-presets/favorites\", { query: { nodeType } })\n return res.data\n }\n\n /** `POST /v1/node-presets/favorites` — idempotent. */\n async addFavorite(input: NodePresetFavoriteInput): Promise<{ success: true }> {\n const res = await this.client.request<{ data: { success: true } }>(\"POST\", \"/v1/node-presets/favorites\", { body: input })\n return res.data\n }\n\n /** `DELETE /v1/node-presets/favorites` — idempotent. */\n async removeFavorite(input: NodePresetFavoriteInput): Promise<{ success: true }> {\n const res = await this.client.request<{ data: { success: true } }>(\"DELETE\", \"/v1/node-presets/favorites\", {\n query: { nodeType: input.nodeType, presetId: input.presetId },\n })\n return res.data\n }\n\n /** `POST /v1/node-preset-groups` → the new folder or section. */\n async createGroup(input: CreateNodePresetGroupInput): Promise<NodePresetGroup> {\n const res = await this.client.request<{ data: NodePresetGroup }>(\"POST\", \"/v1/node-preset-groups\", { body: input })\n return res.data\n }\n\n /** `PATCH /v1/node-preset-groups/:id` → the renamed or moved group. */\n async updateGroup(id: string, patch: UpdateNodePresetGroupInput): Promise<NodePresetGroup> {\n const res = await this.client.request<{ data: NodePresetGroup }>(\"PATCH\", `/v1/node-preset-groups/${encodeURIComponent(id)}`, {\n body: patch,\n })\n return res.data\n }\n\n /** `DELETE /v1/node-preset-groups/:id` — its presets move out of the group; none are deleted. */\n async deleteGroup(id: string): Promise<{ success: true }> {\n const res = await this.client.request<{ data: { success: true } }>(\"DELETE\", `/v1/node-preset-groups/${encodeURIComponent(id)}`)\n return res.data\n }\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"chunk-37Y5QAVA.js"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"chunk-37YCKZX4.cjs"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// src/resources/webhooks.ts
|
|
4
|
+
var WebhooksResource = class {
|
|
5
|
+
constructor(client) {
|
|
6
|
+
this.client = client;
|
|
7
|
+
}
|
|
8
|
+
client;
|
|
9
|
+
/** `POST /v1/webhook-endpoints` → the endpoint and its signing secret (shown this once). */
|
|
10
|
+
create(input) {
|
|
11
|
+
return this.client.request("POST", "/v1/webhook-endpoints", { body: input });
|
|
12
|
+
}
|
|
13
|
+
/** `GET /v1/webhook-endpoints` → your endpoints, newest first. Never a secret. */
|
|
14
|
+
list() {
|
|
15
|
+
return this.client.request("GET", "/v1/webhook-endpoints");
|
|
16
|
+
}
|
|
17
|
+
/** `GET /v1/webhook-endpoints/:id`. */
|
|
18
|
+
get(id) {
|
|
19
|
+
return this.client.request("GET", `/v1/webhook-endpoints/${encodeURIComponent(id)}`);
|
|
20
|
+
}
|
|
21
|
+
/** `PATCH /v1/webhook-endpoints/:id` → change the address, events, description; switch on or off. */
|
|
22
|
+
update(id, input) {
|
|
23
|
+
return this.client.request("PATCH", `/v1/webhook-endpoints/${encodeURIComponent(id)}`, { body: input });
|
|
24
|
+
}
|
|
25
|
+
/** `DELETE /v1/webhook-endpoints/:id` → the endpoint and its delivery log. */
|
|
26
|
+
delete(id) {
|
|
27
|
+
return this.client.request("DELETE", `/v1/webhook-endpoints/${encodeURIComponent(id)}`);
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* `POST /v1/webhook-endpoints/:id/rotate-secret` → a new signing secret,
|
|
31
|
+
* shown this once. It signs every delivery from now on (retries included);
|
|
32
|
+
* the one it replaces keeps signing beside it for `gracePeriodSeconds` (a
|
|
33
|
+
* day by default), so update your receiver within that time.
|
|
34
|
+
*/
|
|
35
|
+
rotateSecret(id, input = {}) {
|
|
36
|
+
return this.client.request("POST", `/v1/webhook-endpoints/${encodeURIComponent(id)}/rotate-secret`, {
|
|
37
|
+
body: input
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
/** `GET /v1/webhook-endpoints/:id/deliveries` → the delivery log, newest first (kept 30 days). */
|
|
41
|
+
deliveries(id, params = {}) {
|
|
42
|
+
return this.client.request("GET", `/v1/webhook-endpoints/${encodeURIComponent(id)}/deliveries`, {
|
|
43
|
+
query: { status: params.status, limit: params.limit, cursor: params.cursor }
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
/** `GET /v1/webhook-endpoints/:id/deliveries/:deliveryId` → one delivery (`test()` returns its id). */
|
|
47
|
+
getDelivery(id, deliveryId) {
|
|
48
|
+
return this.client.request(
|
|
49
|
+
"GET",
|
|
50
|
+
`/v1/webhook-endpoints/${encodeURIComponent(id)}/deliveries/${encodeURIComponent(deliveryId)}`
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* `POST /v1/webhook-endpoints/:id/test` → queue a `ping` (sent within
|
|
55
|
+
* seconds, tried once — even to an endpoint that is switched off). Follow
|
|
56
|
+
* it with `deliveries()`.
|
|
57
|
+
*/
|
|
58
|
+
test(id) {
|
|
59
|
+
return this.client.request("POST", `/v1/webhook-endpoints/${encodeURIComponent(id)}/test`);
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
exports.WebhooksResource = WebhooksResource;
|
|
64
|
+
//# sourceMappingURL=chunk-3B47IHB3.cjs.map
|
|
65
|
+
//# sourceMappingURL=chunk-3B47IHB3.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/resources/webhooks.ts"],"names":[],"mappings":";;;AAsKO,IAAM,mBAAN,MAAuB;AAAA,EAC5B,YAAoB,MAAA,EAA0B;AAA1B,IAAA,IAAA,CAAA,MAAA,GAAA,MAAA;AAAA,EAA2B;AAAA,EAA3B,MAAA;AAAA;AAAA,EAGpB,OAAO,KAAA,EAAoE;AACzE,IAAA,OAAO,IAAA,CAAK,OAAO,OAAA,CAAgC,MAAA,EAAQ,yBAAyB,EAAE,IAAA,EAAM,OAAO,CAAA;AAAA,EACrG;AAAA;AAAA,EAGA,IAAA,GAA6C;AAC3C,IAAA,OAAO,IAAA,CAAK,MAAA,CAAO,OAAA,CAAQ,KAAA,EAAO,uBAAuB,CAAA;AAAA,EAC3D;AAAA;AAAA,EAGA,IAAI,EAAA,EAAgD;AAClD,IAAA,OAAO,IAAA,CAAK,OAAO,OAAA,CAAQ,KAAA,EAAO,yBAAyB,kBAAA,CAAmB,EAAE,CAAC,CAAA,CAAE,CAAA;AAAA,EACrF;AAAA;AAAA,EAGA,MAAA,CAAO,IAAY,KAAA,EAAuE;AACxF,IAAA,OAAO,IAAA,CAAK,MAAA,CAAO,OAAA,CAAQ,OAAA,EAAS,CAAA,sBAAA,EAAyB,kBAAA,CAAmB,EAAE,CAAC,CAAA,CAAA,EAAI,EAAE,IAAA,EAAM,KAAA,EAAO,CAAA;AAAA,EACxG;AAAA;AAAA,EAGA,OAAO,EAAA,EAAwC;AAC7C,IAAA,OAAO,IAAA,CAAK,OAAO,OAAA,CAAQ,QAAA,EAAU,yBAAyB,kBAAA,CAAmB,EAAE,CAAC,CAAA,CAAE,CAAA;AAAA,EACxF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,YAAA,CAAa,EAAA,EAAY,KAAA,GAAkC,EAAC,EAAkC;AAC5F,IAAA,OAAO,IAAA,CAAK,OAAO,OAAA,CAA8B,MAAA,EAAQ,yBAAyB,kBAAA,CAAmB,EAAE,CAAC,CAAA,cAAA,CAAA,EAAkB;AAAA,MACxH,IAAA,EAAM;AAAA,KACP,CAAA;AAAA,EACH;AAAA;AAAA,EAGA,UAAA,CAAW,EAAA,EAAY,MAAA,GAAsC,EAAC,EAAiC;AAC7F,IAAA,OAAO,IAAA,CAAK,OAAO,OAAA,CAAQ,KAAA,EAAO,yBAAyB,kBAAA,CAAmB,EAAE,CAAC,CAAA,WAAA,CAAA,EAAe;AAAA,MAC9F,KAAA,EAAO,EAAE,MAAA,EAAQ,MAAA,CAAO,MAAA,EAAQ,OAAO,MAAA,CAAO,KAAA,EAAO,MAAA,EAAQ,MAAA,CAAO,MAAA;AAAO,KAC5E,CAAA;AAAA,EACH;AAAA;AAAA,EAGA,WAAA,CAAY,IAAY,UAAA,EAAwD;AAC9E,IAAA,OAAO,KAAK,MAAA,CAAO,OAAA;AAAA,MACjB,KAAA;AAAA,MACA,yBAAyB,kBAAA,CAAmB,EAAE,CAAC,CAAA,YAAA,EAAe,kBAAA,CAAmB,UAAU,CAAC,CAAA;AAAA,KAC9F;AAAA,EACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,KAAK,EAAA,EAAgD;AACnD,IAAA,OAAO,IAAA,CAAK,OAAO,OAAA,CAAQ,MAAA,EAAQ,yBAAyB,kBAAA,CAAmB,EAAE,CAAC,CAAA,KAAA,CAAO,CAAA;AAAA,EAC3F;AACF","file":"chunk-3B47IHB3.cjs","sourcesContent":["import type { NodaroClientCore } from \"../core.js\"\nimport type { Job } from \"./jobs.js\"\n\n/** Events an endpoint can subscribe to. */\nexport type WebhookJobEvent = \"job.completed\" | \"job.failed\"\n\n/** Every event a delivery can carry: the job events, and the test ping. */\nexport type WebhookEventType = WebhookJobEvent | \"ping\"\n\n/** A delivery's lifecycle: waiting (or being sent), sent, or given up on. */\nexport type WebhookDeliveryStatus = \"pending\" | \"delivered\" | \"failed\"\n\n/** An https address Nodaro POSTs your job events to. */\nexport interface WebhookEndpoint {\n id: string\n url: string\n description: string | null\n events: WebhookJobEvent[]\n isActive: boolean\n /**\n * Why the platform switched it off: `\"consecutive_failures\"` (50\n * deliveries in a row failed for good) or `\"legacy_secret\"` (it predates\n * signing; rotate its secret). `null` when it is on, or you switched it off.\n */\n disabledReason: \"consecutive_failures\" | \"legacy_secret\" | null\n disabledAt: string | null\n /** Deliveries in a row that failed for good. Reset by a success. */\n consecutiveFailures: number\n /**\n * The connected app that registered it — it then receives only the jobs\n * that app submitted itself. `null` = registered by the account.\n */\n appId: string | null\n /** When the current signing secret was issued; `null` = none yet. */\n secretCreatedAt: string | null\n /**\n * After a rotation: until when the secret it replaced still signs too (a\n * second `v1=` in `Nodaro-Signature`). `null` when only one secret signs.\n */\n previousSecretExpiresAt: string | null\n createdAt: string\n updatedAt: string\n}\n\nexport interface CreateWebhookEndpointInput {\n /** An https address on a public host. */\n url: string\n /** Default: both. */\n events?: WebhookJobEvent[]\n /** Up to 500 characters. */\n description?: string\n}\n\nexport interface UpdateWebhookEndpointInput {\n url?: string\n events?: WebhookJobEvent[]\n /** `true` also clears an automatic switch-off and its failure count. */\n isActive?: boolean\n /** `null` clears it. */\n description?: string | null\n}\n\n/** `create()`'s answer: the endpoint and its signing secret — shown this once. */\nexport interface CreatedWebhookEndpoint {\n data: WebhookEndpoint\n /** `whsec_…`. Store it now: no other call returns it. */\n secret: string\n}\n\nexport interface RotateWebhookSecretInput {\n /**\n * Seconds the replaced secret keeps signing beside the new one (0 – 604800),\n * so your receiver can switch over without a gap. Default a day; `0` ends\n * the old secret at once (one that leaked).\n */\n gracePeriodSeconds?: number\n}\n\n/** `rotateSecret()`'s answer — the secret is shown this once. */\nexport interface RotatedWebhookSecret {\n /** `whsec_…`. Store it now: no other call returns it. */\n secret: string\n /** Until when the replaced secret still signs; `null` when it stopped at once. */\n previousSecretExpiresAt: string | null\n}\n\n/** One event sent (or to be sent) to one endpoint, with its attempts. */\nexport interface WebhookDelivery {\n /** Also the event's `id` and the `Nodaro-Delivery` header: the same on every retry. */\n id: string\n webhookId: string\n event: WebhookEventType\n jobId: string | null\n status: WebhookDeliveryStatus\n attempts: number\n /** The receiver's last HTTP status; `null` when no answer came. */\n responseStatus: number | null\n /** The first 2 KB of the receiver's last answer. */\n responseBody: string | null\n durationMs: number | null\n /**\n * Why the last attempt failed (`http_<status>`, `timeout`, `blocked_address`,\n * `connection_refused`, …) or why the delivery ended without one\n * (`endpoint_disabled`, `app_revoked`, `job_deleted`, `attempts_exhausted`).\n * `signing_unavailable` / `job_unreadable`: a problem on Nodaro's side — the\n * delivery waits and is tried again, its attempts unspent.\n */\n error: string | null\n /** The exact body sent (retries send the same text); `null` before the first recorded attempt and once delivered. */\n requestBody: string | null\n createdAt: string\n lastAttemptAt: string | null\n /** When a pending delivery is due (while it is being sent: when that attempt times out). */\n nextAttemptAt: string | null\n deliveredAt: string | null\n}\n\nexport interface ListWebhookDeliveriesParams {\n status?: WebhookDeliveryStatus\n /** Page size, 1–100 (server default 20). */\n limit?: number\n /** The previous page's `next`. */\n cursor?: string\n}\n\nexport interface WebhookDeliveryPage {\n data: WebhookDelivery[]\n /** Pass back as `cursor` for the next page; `null` on the last one. */\n next: string | null\n}\n\n/** A job event as your endpoint receives it (verify it with `verifyWebhookSignature`). */\nexport interface JobWebhookEvent {\n /**\n * The delivery id: the same on every retry — de-duplicate on it (this one,\n * from the verified body; the `Nodaro-Delivery` header is not signed).\n */\n id: string\n type: WebhookJobEvent\n /** When the job reached this status. */\n createdAt: string\n data: {\n /** The job, in the same shape `jobs.get()` returns. */\n job: Job\n /** Present when the event would pass 64 KB: these fields were left out — read the whole job with `jobs.get()`. */\n omitted?: Array<\"input_data\" | \"output_data\">\n }\n}\n\n/** The event `test()` sends. */\nexport interface PingWebhookEvent {\n id: string\n type: \"ping\"\n createdAt: string\n data: { webhookId: string }\n}\n\nexport type WebhookEvent = JobWebhookEvent | PingWebhookEvent\n\n/**\n * Outbound webhooks: register an https endpoint and Nodaro POSTs it every\n * `job.completed` / `job.failed` of your account, signed with the endpoint's\n * own secret (check it with `verifyWebhookSignature`), retried with backoff,\n * every attempt kept in its delivery log. OAuth app tokens need `jobs:read`;\n * an endpoint an app registers receives only the jobs that app submitted.\n */\nexport class WebhooksResource {\n constructor(private client: NodaroClientCore) {}\n\n /** `POST /v1/webhook-endpoints` → the endpoint and its signing secret (shown this once). */\n create(input: CreateWebhookEndpointInput): Promise<CreatedWebhookEndpoint> {\n return this.client.request<CreatedWebhookEndpoint>(\"POST\", \"/v1/webhook-endpoints\", { body: input })\n }\n\n /** `GET /v1/webhook-endpoints` → your endpoints, newest first. Never a secret. */\n list(): Promise<{ data: WebhookEndpoint[] }> {\n return this.client.request(\"GET\", \"/v1/webhook-endpoints\")\n }\n\n /** `GET /v1/webhook-endpoints/:id`. */\n get(id: string): Promise<{ data: WebhookEndpoint }> {\n return this.client.request(\"GET\", `/v1/webhook-endpoints/${encodeURIComponent(id)}`)\n }\n\n /** `PATCH /v1/webhook-endpoints/:id` → change the address, events, description; switch on or off. */\n update(id: string, input: UpdateWebhookEndpointInput): Promise<{ data: WebhookEndpoint }> {\n return this.client.request(\"PATCH\", `/v1/webhook-endpoints/${encodeURIComponent(id)}`, { body: input })\n }\n\n /** `DELETE /v1/webhook-endpoints/:id` → the endpoint and its delivery log. */\n delete(id: string): Promise<{ success: true }> {\n return this.client.request(\"DELETE\", `/v1/webhook-endpoints/${encodeURIComponent(id)}`)\n }\n\n /**\n * `POST /v1/webhook-endpoints/:id/rotate-secret` → a new signing secret,\n * shown this once. It signs every delivery from now on (retries included);\n * the one it replaces keeps signing beside it for `gracePeriodSeconds` (a\n * day by default), so update your receiver within that time.\n */\n rotateSecret(id: string, input: RotateWebhookSecretInput = {}): Promise<RotatedWebhookSecret> {\n return this.client.request<RotatedWebhookSecret>(\"POST\", `/v1/webhook-endpoints/${encodeURIComponent(id)}/rotate-secret`, {\n body: input,\n })\n }\n\n /** `GET /v1/webhook-endpoints/:id/deliveries` → the delivery log, newest first (kept 30 days). */\n deliveries(id: string, params: ListWebhookDeliveriesParams = {}): Promise<WebhookDeliveryPage> {\n return this.client.request(\"GET\", `/v1/webhook-endpoints/${encodeURIComponent(id)}/deliveries`, {\n query: { status: params.status, limit: params.limit, cursor: params.cursor },\n })\n }\n\n /** `GET /v1/webhook-endpoints/:id/deliveries/:deliveryId` → one delivery (`test()` returns its id). */\n getDelivery(id: string, deliveryId: string): Promise<{ data: WebhookDelivery }> {\n return this.client.request(\n \"GET\",\n `/v1/webhook-endpoints/${encodeURIComponent(id)}/deliveries/${encodeURIComponent(deliveryId)}`,\n )\n }\n\n /**\n * `POST /v1/webhook-endpoints/:id/test` → queue a `ping` (sent within\n * seconds, tried once — even to an endpoint that is switched off). Follow\n * it with `deliveries()`.\n */\n test(id: string): Promise<{ data: WebhookDelivery }> {\n return this.client.request(\"POST\", `/v1/webhook-endpoints/${encodeURIComponent(id)}/test`)\n }\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"chunk-3BELHJBN.cjs"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"chunk-3PPSGM5X.js"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// src/resources/jobs.ts
|
|
4
|
+
function listParam(value) {
|
|
5
|
+
if (value === void 0) return void 0;
|
|
6
|
+
return typeof value === "string" ? value : value.join(",");
|
|
7
|
+
}
|
|
8
|
+
var JobsResource = class {
|
|
9
|
+
constructor(client) {
|
|
10
|
+
this.client = client;
|
|
11
|
+
}
|
|
12
|
+
client;
|
|
13
|
+
/** Get a single job by ID. */
|
|
14
|
+
get(id) {
|
|
15
|
+
return this.client.request("GET", `/v1/jobs/${encodeURIComponent(id)}`);
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Your jobs, newest first (`GET /v1/jobs`), cursor-paginated. `type` and
|
|
19
|
+
* `origin` filter on the job's own `input_data`, which every job carries —
|
|
20
|
+
* a client app lists its runs with `{ type: "llm-structured", origin: "studio" }`.
|
|
21
|
+
* `status` and `type` take one value or a list; `favorited` and `rating`
|
|
22
|
+
* filter on your own marks. Every filter combines with AND, and each job
|
|
23
|
+
* carries `favorited` and `rating`.
|
|
24
|
+
*/
|
|
25
|
+
list(params = {}) {
|
|
26
|
+
const { status, type, ...rest } = params;
|
|
27
|
+
return this.client.request("GET", "/v1/jobs", {
|
|
28
|
+
query: { ...rest, status: listParam(status), type: listParam(type) }
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Rate one of your jobs `"good"` or `"bad"`, or clear the rating with
|
|
33
|
+
* `null` (`PUT /v1/jobs/:id/rating`). Only the job's owner rates it — anyone
|
|
34
|
+
* else's job is a `NotFoundError`. The rating reads back as `Job.rating`
|
|
35
|
+
* and filters {@link list}. OAuth apps need the `assets:write` scope.
|
|
36
|
+
*/
|
|
37
|
+
rate(id, rating) {
|
|
38
|
+
return this.client.request("PUT", `/v1/jobs/${encodeURIComponent(id)}/rating`, {
|
|
39
|
+
body: { rating }
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Get the lean status of a single job (poll-loop friendly).
|
|
44
|
+
* Hits `GET /v1/jobs/:id/status` — returns only id/status/progress/
|
|
45
|
+
* output_data/error_message, with far less wire/CPU cost than `get()`.
|
|
46
|
+
* Same auth + ownership semantics as {@link get}.
|
|
47
|
+
*/
|
|
48
|
+
getStatus(id) {
|
|
49
|
+
return this.client.request(
|
|
50
|
+
"GET",
|
|
51
|
+
`/v1/jobs/${encodeURIComponent(id)}/status`
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Cancel a job. Server route is `POST /v1/jobs/:jobId/cancel`.
|
|
56
|
+
* Refunds any reserved credit holds.
|
|
57
|
+
*/
|
|
58
|
+
cancel(id) {
|
|
59
|
+
return this.client.request(
|
|
60
|
+
"POST",
|
|
61
|
+
`/v1/jobs/${encodeURIComponent(id)}/cancel`
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Delete a job and the private media it produced. Server route is
|
|
66
|
+
* `DELETE /v1/jobs/:jobId`. Only the job's owner (or an admin) may delete it;
|
|
67
|
+
* a job that is still running is deleted as-is — cancel it first when its
|
|
68
|
+
* worker should stop ({@link cancel}).
|
|
69
|
+
*/
|
|
70
|
+
delete(id) {
|
|
71
|
+
return this.client.request(
|
|
72
|
+
"DELETE",
|
|
73
|
+
`/v1/jobs/${encodeURIComponent(id)}`
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
exports.JobsResource = JobsResource;
|
|
79
|
+
//# sourceMappingURL=chunk-3QBH2VE2.cjs.map
|
|
80
|
+
//# sourceMappingURL=chunk-3QBH2VE2.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/resources/jobs.ts"],"names":[],"mappings":";;;AAgMA,SAAS,UAAU,KAAA,EAAmE;AACpF,EAAA,IAAI,KAAA,KAAU,QAAW,OAAO,MAAA;AAChC,EAAA,OAAO,OAAO,KAAA,KAAU,QAAA,GAAW,KAAA,GAAQ,KAAA,CAAM,KAAK,GAAG,CAAA;AAC3D;AAgCO,IAAM,eAAN,MAAmB;AAAA,EACxB,YAAoB,MAAA,EAA0B;AAA1B,IAAA,IAAA,CAAA,MAAA,GAAA,MAAA;AAAA,EAA2B;AAAA,EAA3B,MAAA;AAAA;AAAA,EAGpB,IAAI,EAAA,EAAoC;AACtC,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,EAUA,IAAA,CAAK,MAAA,GAAyB,EAAC,EAA0B;AACvD,IAAA,MAAM,EAAE,MAAA,EAAQ,IAAA,EAAM,GAAG,MAAK,GAAI,MAAA;AAClC,IAAA,OAAO,IAAA,CAAK,MAAA,CAAO,OAAA,CAAsB,KAAA,EAAO,UAAA,EAAY;AAAA,MAC1D,KAAA,EAAO,EAAE,GAAG,IAAA,EAAM,MAAA,EAAQ,SAAA,CAAU,MAAM,CAAA,EAAG,IAAA,EAAM,SAAA,CAAU,IAAI,CAAA;AAAE,KACpE,CAAA;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,IAAA,CAAK,IAAY,MAAA,EAAkD;AACjE,IAAA,OAAO,IAAA,CAAK,OAAO,OAAA,CAAuB,KAAA,EAAO,YAAY,kBAAA,CAAmB,EAAE,CAAC,CAAA,OAAA,CAAA,EAAW;AAAA,MAC5F,IAAA,EAAM,EAAE,MAAA;AAAO,KAChB,CAAA;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,UAAU,EAAA,EAAgD;AACxD,IAAA,OAAO,KAAK,MAAA,CAAO,OAAA;AAAA,MACjB,KAAA;AAAA,MACA,CAAA,SAAA,EAAY,kBAAA,CAAmB,EAAE,CAAC,CAAA,OAAA;AAAA,KACpC;AAAA,EACF;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,OAAO,EAAA,EAAsC;AAC3C,IAAA,OAAO,KAAK,MAAA,CAAO,OAAA;AAAA,MACjB,MAAA;AAAA,MACA,CAAA,SAAA,EAAY,kBAAA,CAAmB,EAAE,CAAC,CAAA,OAAA;AAAA,KACpC;AAAA,EACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,OAAO,EAAA,EAAsC;AAC3C,IAAA,OAAO,KAAK,MAAA,CAAO,OAAA;AAAA,MACjB,QAAA;AAAA,MACA,CAAA,SAAA,EAAY,kBAAA,CAAmB,EAAE,CAAC,CAAA;AAAA,KACpC;AAAA,EACF;AACF","file":"chunk-3QBH2VE2.cjs","sourcesContent":["import type { NodaroClientCore } from \"../core.js\"\n\n/**\n * A job's lifecycle status. Hand-copied mirror of `JOB_STATUSES` in the\n * platform's `backend/src/lib/job-status.ts` — nothing links the two at build\n * time, so a new member has to be added here in the same change.\n *\n * `pending_review` is IN-FLIGHT, NOT TERMINAL: a job policy registered by the\n * deployment held the output for a human reviewer. Treat it like `processing`\n * in a `switch` — keep waiting, do not re-run — and it resolves to `completed`\n * (approved), `failed` (rejected, carrying an `error_hint` with\n * `kind: \"policy-block\"`) or `cancelled` (a held job is cancellable like any\n * in-flight job). `credit_status` reads `\"reserved\"` for the whole hold. Only\n * appears on deployments that register a job policy; `runAndWait` throws\n * {@link JobHeldError} on the first held tick rather than waiting it out.\n */\nexport type JobStatus =\n | \"pending\"\n | \"queued\"\n | \"processing\"\n | \"pending_review\"\n | \"completed\"\n | \"failed\"\n | \"cancelled\"\n\n/**\n * A PROVIDER's verdict: the model's own safety filter refused the output.\n * `class` distinguishes a deterministic block (copyright/likeness — retrying\n * the same request never helps) from `safety`, whose filter is known to be\n * non-deterministic for some models: `retried` says whether the worker\n * already spent its one extra attempt, and `suggestedProvider` — present\n * only when the catalog declares a fallback for the model that failed — is a\n * real model id the SAME prompt/references can be retried on.\n */\nexport type SafetyBlockHint = {\n kind: \"safety-block\"\n class: \"copyright\" | \"likeness\" | \"safety\"\n retried: boolean\n suggestedProvider?: string\n}\n\n/**\n * A NODARO-side verdict, not a provider's: a job policy registered by the\n * deployment rejected the request (`hookPoint: \"request\"` — nothing ran, and\n * the call itself failed with {@link JobBlockedError}) or the finished output\n * (`hookPoint: \"result\"` — the result was blocked and never published).\n *\n * `reason` is USER-SAFE BY CONTRACT — the platform guarantees the policy's\n * machine text (scores, labels) never reaches it — so show it to the person\n * who made the request as-is. `policyId` identifies the deployment's policy,\n * not a Nodaro product feature. Only occurs on deployments that register a\n * job policy.\n */\nexport type PolicyBlockHint = {\n kind: \"policy-block\"\n policyId: string\n reason: string\n hookPoint: \"request\" | \"result\"\n}\n\n/**\n * A job's `jobs.error_hint` (migration 376) — a user-safe, machine-readable\n * failure verdict, so a caller can act on it without parsing `error_message`\n * prose. One column, two verdict sources; `kind` is the discriminant.\n *\n * HAND-COPIED MIRROR of `ErrorHint` in the platform's\n * `backend/src/lib/safety-block.ts` (which names this file in its own\n * comment). Nothing links the two at build time: a new arm there has to be\n * pasted here verbatim in the same change, with a changeset.\n * `packages/client/dist/index.d.ts` is REBUILT, never hand-edited.\n */\nexport type JobErrorHint = SafetyBlockHint | PolicyBlockHint\n\n/**\n * The billing lifecycle of a job's credit reservation — `usage_logs.status`\n * for the job's `usage_log_id`. `null` when the job has no usage log (e.g. a\n * free run) or hasn't reserved credits yet.\n */\nexport type CreditStatus = \"reserved\" | \"committed\" | \"refunded\"\n\n/** A job owner's rating of their job — set with {@link JobsResource.rate}. */\nexport type JobRating = \"good\" | \"bad\"\n\n/**\n * The `rating` filter of {@link JobsResource.list}: one rating, any rating\n * (`\"rated\"`) or none (`\"unrated\"`).\n */\nexport type JobRatingFilter = JobRating | \"rated\" | \"unrated\"\n\n/**\n * Job record returned to non-admin SDK consumers. Field names are snake_case\n * to match the wire format (per the OpenAPI fix in Phase 1).\n *\n * Sensitive fields stripped server-side for non-admin callers:\n * `provider`, `provider_cost`, `display_cost`, `credits_actual`. USD\n * pricing is admin-only across api/sdk/mcp — non-admin consumers see\n * only the `credits` abstraction. Server-only nested job data (including\n * Recast's private remux base) is stripped for every caller, including admins.\n */\nexport interface Job {\n id: string\n status: JobStatus\n progress: number\n user_id: string\n input_data: unknown\n output_data: unknown\n error_message: string | null\n /** Present on a failed job the worker classified as a provider\n * content-policy block (`kind: \"safety-block\"`) or that a deployment's job\n * policy rejected (`kind: \"policy-block\"`); absent/null otherwise.\n * User-safe by construction — narrow on `kind` before reading the rest. */\n error_hint?: JobErrorHint | null\n /** PR9: the job's credit reservation lifecycle, derived server-side from\n * `usage_logs.status`. `null` when there is no usage log to report. Never\n * changes the meaning of `credits` (the reserved amount) below. */\n credit_status?: CreditStatus | null\n /** The credits HELD when the job was accepted. Never changes — a job can\n * settle below it; read {@link Job.credits_charged} for what it cost. */\n credits: number | null\n /**\n * What the job actually cost once its hold settled. Can be lower than\n * `credits` (the unused part goes back to the balance), `0` when the hold was\n * refunded, `null` while the job is still running or when it reserved\n * nothing of its own. Sum this — not `credits` — to total spend. Returned by\n * `get()` and `list()`.\n */\n credits_charged?: number | null\n job_type: string | null\n created_at: string\n started_at: string | null\n completed_at: string | null\n /**\n * Provenance: which kind of caller created the job — one of\n * `\"internal\" | \"mcp\" | \"app\" | \"cli\" | \"sdk\" | \"extension\" | \"web\" | \"api\"`.\n * `source_detail` narrows it (origin host, `extension/<name>` label,\n * `sdk/<version>`, MCP client name, developer-app id). Descriptive only;\n * lets a library view label or filter media by origin.\n */\n source?: string | null\n source_detail?: string | null\n /** The generation session this job was born in (the `sessionId` sent with\n * the generation request), or null. See `client.sessions`. */\n session_id?: string | null\n /**\n * Whether the job's owner favorited it (`client.gallery.toggleFavorite`).\n * Returned by `get()` and `list()`. Absent from an older server, and when\n * the server could not read it for a moment — treat absent as unknown,\n * never as `false`.\n */\n favorited?: boolean\n /**\n * The owner's rating of the job ({@link JobsResource.rate}), or `null` when\n * unrated. Returned by `get()` and `list()`; absent like `favorited`.\n */\n rating?: JobRating | null\n}\n\nexport interface CancelJobResult {\n success: true\n cancelled: number\n}\n\nexport interface DeleteJobResult {\n success: true\n}\n\nexport interface ListJobsParams {\n /** One status or several (a job matching any of them). An unknown status is a 400. */\n status?: JobStatus | readonly JobStatus[]\n /** Exact match on `input_data.type` — the route that created the job\n * (`\"llm-structured\"`, `\"video-analysis\"`, …). One value or several (up to 20). */\n type?: string | readonly string[]\n /** Exact match on `input_data.origin` — the client app that sent it. */\n origin?: string\n /** `true`: only jobs you favorited; `false`: only jobs you did not. */\n favorited?: boolean\n /** Your rating: `\"good\"`, `\"bad\"`, any (`\"rated\"`) or none (`\"unrated\"`). */\n rating?: JobRatingFilter\n /** The jobs of one generate-image batch (`count` / `models`) — its `batchId`. */\n batchId?: string\n /** Page size, 1–100 (server default 50). */\n limit?: number\n /** The previous page's `next`. */\n cursor?: string\n}\n\n/** What {@link JobsResource.rate} answers: the job's rating now. */\nexport interface RateJobResult {\n data: { jobId: string; rating: JobRating | null }\n}\n\n/** A list filter value as the query string carries it: several are comma-separated. */\nfunction listParam(value: string | readonly string[] | undefined): string | undefined {\n if (value === undefined) return undefined\n return typeof value === \"string\" ? value : value.join(\",\")\n}\n\nexport interface ListJobsPage {\n /**\n * A page may hold fewer than `limit` rows — even none — and still carry a\n * `next`. Page on `next`, never on `data.length`.\n */\n data: Job[]\n /** Pass back as `cursor` for the next page; `null` on the last one. */\n next: string | null\n}\n\n/**\n * Lean job status returned by `GET /v1/jobs/:id/status`. Skips the\n * `input_data` JSONB and cost columns. Its `output_data` still goes\n * through the server-only nested-field redaction. Intended for poll loops that\n * only need progress/output/error, and when the job finished.\n */\nexport interface JobStatusResult {\n id: string\n status: JobStatus\n progress?: number\n output_data?: unknown\n error_message?: string | null\n /** PR9: see {@link Job.error_hint}. */\n error_hint?: JobErrorHint | null\n /** PR9: see {@link Job.credit_status}. */\n credit_status?: CreditStatus | null\n /** When the job finished, on the server's clock; null until it has. */\n completed_at?: string | null\n}\n\nexport class JobsResource {\n constructor(private client: NodaroClientCore) {}\n\n /** Get a single job by ID. */\n get(id: string): Promise<{ data: Job }> {\n return this.client.request(\"GET\", `/v1/jobs/${encodeURIComponent(id)}`)\n }\n\n /**\n * Your jobs, newest first (`GET /v1/jobs`), cursor-paginated. `type` and\n * `origin` filter on the job's own `input_data`, which every job carries —\n * a client app lists its runs with `{ type: \"llm-structured\", origin: \"studio\" }`.\n * `status` and `type` take one value or a list; `favorited` and `rating`\n * filter on your own marks. Every filter combines with AND, and each job\n * carries `favorited` and `rating`.\n */\n list(params: ListJobsParams = {}): Promise<ListJobsPage> {\n const { status, type, ...rest } = params\n return this.client.request<ListJobsPage>(\"GET\", \"/v1/jobs\", {\n query: { ...rest, status: listParam(status), type: listParam(type) },\n })\n }\n\n /**\n * Rate one of your jobs `\"good\"` or `\"bad\"`, or clear the rating with\n * `null` (`PUT /v1/jobs/:id/rating`). Only the job's owner rates it — anyone\n * else's job is a `NotFoundError`. The rating reads back as `Job.rating`\n * and filters {@link list}. OAuth apps need the `assets:write` scope.\n */\n rate(id: string, rating: JobRating | null): Promise<RateJobResult> {\n return this.client.request<RateJobResult>(\"PUT\", `/v1/jobs/${encodeURIComponent(id)}/rating`, {\n body: { rating },\n })\n }\n\n /**\n * Get the lean status of a single job (poll-loop friendly).\n * Hits `GET /v1/jobs/:id/status` — returns only id/status/progress/\n * output_data/error_message, with far less wire/CPU cost than `get()`.\n * Same auth + ownership semantics as {@link get}.\n */\n getStatus(id: string): Promise<{ data: JobStatusResult }> {\n return this.client.request(\n \"GET\",\n `/v1/jobs/${encodeURIComponent(id)}/status`,\n )\n }\n\n /**\n * Cancel a job. Server route is `POST /v1/jobs/:jobId/cancel`.\n * Refunds any reserved credit holds.\n */\n cancel(id: string): Promise<CancelJobResult> {\n return this.client.request(\n \"POST\",\n `/v1/jobs/${encodeURIComponent(id)}/cancel`,\n )\n }\n\n /**\n * Delete a job and the private media it produced. Server route is\n * `DELETE /v1/jobs/:jobId`. Only the job's owner (or an admin) may delete it;\n * a job that is still running is deleted as-is — cancel it first when its\n * worker should stop ({@link cancel}).\n */\n delete(id: string): Promise<DeleteJobResult> {\n return this.client.request(\n \"DELETE\",\n `/v1/jobs/${encodeURIComponent(id)}`,\n )\n }\n}\n"]}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
// src/resources/audio.ts
|
|
2
|
+
var AudioResource = class {
|
|
3
|
+
constructor(client) {
|
|
4
|
+
this.client = client;
|
|
5
|
+
}
|
|
6
|
+
client;
|
|
7
|
+
/**
|
|
8
|
+
* Separate an audio track into stems (`POST /v1/audio-separation`, Demucs).
|
|
9
|
+
* `mode` `"vocal_instrumental"` (default) splits voice from music/SFX;
|
|
10
|
+
* `"stems"` returns the full drums/bass/other/… breakdown. `quality`
|
|
11
|
+
* `auto` (default) / `fast` / `best`.
|
|
12
|
+
*/
|
|
13
|
+
separate(input) {
|
|
14
|
+
return this.client.request("POST", "/v1/audio-separation", { body: input });
|
|
15
|
+
}
|
|
16
|
+
/** Isolate the primary voice and strip background noise (`POST /v1/audio-isolation`, ElevenLabs). */
|
|
17
|
+
isolate(input) {
|
|
18
|
+
return this.client.request("POST", "/v1/audio-isolation", { body: input });
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Apply a reverb / echo / telephone / megaphone effect to an audio track
|
|
22
|
+
* (`POST /v1/audio-fx`) — the same presets VCP's `voiceFx` uses, standalone.
|
|
23
|
+
* `mix` (0–100) is the reverb wet/dry; `delayMs` + `decay` drive `echo`/`custom`;
|
|
24
|
+
* `eqLow`/`eqHigh` (dB) shape telephone/megaphone.
|
|
25
|
+
*/
|
|
26
|
+
applyFx(input) {
|
|
27
|
+
return this.client.request("POST", "/v1/audio-fx", { body: input });
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Layer multiple audio tracks into one (`POST /v1/mix-audio`). `audioUrls`
|
|
31
|
+
* (2–20) are summed; optional `trackVolumes` (0–200% each, positionally) set
|
|
32
|
+
* per-track level. `duck` puts a music bed under speech: every track EXCEPT
|
|
33
|
+
* `duck.under` (the 0-based index of the voice track) dips while that track
|
|
34
|
+
* is loud and rises back in its pauses (sidechain compression). `amount`
|
|
35
|
+
* (0–100, default 75) is how hard; `thresholdDb` (-60–0, default -30),
|
|
36
|
+
* `ratio` (1–20, overrides `amount`), `attackMs` (1–2000, default 20) and
|
|
37
|
+
* `releaseMs` (10–9000, default 500) are optional fine controls. A ducked mix
|
|
38
|
+
* sums its tracks rather than averaging them, so the voice keeps its level;
|
|
39
|
+
* the price is the same with or without a duck. `endAt` (`"longest"`, the
|
|
40
|
+
* default, or `"voice"`) says where the mix ends: `"voice"` ends it when the
|
|
41
|
+
* voice (the `duck.under` track) ends (needs `duck`). A video URL is a track
|
|
42
|
+
* too: its audio is mixed, and a video with no sound is a silent track.
|
|
43
|
+
*/
|
|
44
|
+
mix(input) {
|
|
45
|
+
return this.client.request("POST", "/v1/mix-audio", { body: input });
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Adjust an audio (or a video's audio) level (`POST /v1/adjust-volume`):
|
|
49
|
+
* `volume` % (default 100), `normalize` to loudnorm, and `fadeIn`/`fadeOut`
|
|
50
|
+
* seconds. Provide `audioUrl` or `videoUrl`.
|
|
51
|
+
*/
|
|
52
|
+
adjustVolume(input) {
|
|
53
|
+
return this.client.request("POST", "/v1/adjust-volume", { body: input });
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Shift pitch and/or change tempo with Rubber Band (`POST /v1/pitch-tempo`):
|
|
57
|
+
* `semitones` −12…+12 (default 0), `tempo` 0.5…2 with the pitch kept
|
|
58
|
+
* (default 1; fixed at 1 for a video), `preserveFormants` (default true).
|
|
59
|
+
* Provide exactly one of `audioUrl` or `videoUrl` — a video keeps its picture.
|
|
60
|
+
* Input up to 30 minutes, priced per started minute.
|
|
61
|
+
*/
|
|
62
|
+
pitchTempo(input) {
|
|
63
|
+
return this.client.request("POST", "/v1/pitch-tempo", { body: input });
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Concatenate audio segments end-to-end (`POST /v1/combine-audio`). Each
|
|
67
|
+
* segment is a `url` with an optional `[startTime, endTime]` sub-range.
|
|
68
|
+
*/
|
|
69
|
+
combine(input) {
|
|
70
|
+
return this.client.request("POST", "/v1/combine-audio", { body: input });
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Transcribe an audio (or video) track to text (`POST /v1/transcribe`).
|
|
74
|
+
*
|
|
75
|
+
* Three engines are accepted. `elevenlabs-stt` (Scribe) is always word-level,
|
|
76
|
+
* flag or not, and is the only lane that honours `diarize` (who spoke) and
|
|
77
|
+
* `tagAudioEvents` (laughter, applause, …); `incredibly-fast-whisper` returns
|
|
78
|
+
* word timings when you ask for them. `whisper` returns NO word timings at
|
|
79
|
+
* all — named explicitly or reached by OMITTING `provider`, which still falls
|
|
80
|
+
* back to it — so asking it for them (`wordTimestamps: true`) is rejected with
|
|
81
|
+
* a `400 validation_error` at ingress, before any credit is spent. A kinetic
|
|
82
|
+
* caption render therefore has to name one of the other two.
|
|
83
|
+
*
|
|
84
|
+
* Poll `jobs.get(jobId)`; the finished job's `output_data` is a
|
|
85
|
+
* {@link TranscribeJobOutput}: `text` (the whole transcript), `words`
|
|
86
|
+
* (caption-shaped, in MILLISECONDS), `json` (the normalized
|
|
87
|
+
* {@link Transcript}, also ms) — and a top-level `segments` array that is in
|
|
88
|
+
* SECONDS, not ms.
|
|
89
|
+
*
|
|
90
|
+
* `words` is the caption source for a kinetic burn-in: hand it to
|
|
91
|
+
* `media.addCaptions()` as `captions` with `autoTranscribe: false` and the
|
|
92
|
+
* render uses those exact words (correct the `text` of an entry in between
|
|
93
|
+
* and the fix is what burns in).
|
|
94
|
+
*/
|
|
95
|
+
transcribe(input) {
|
|
96
|
+
return this.client.request("POST", "/v1/transcribe", { body: input });
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
export { AudioResource };
|
|
101
|
+
//# sourceMappingURL=chunk-3QFTP5P5.js.map
|
|
102
|
+
//# sourceMappingURL=chunk-3QFTP5P5.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/resources/audio.ts"],"names":[],"mappings":";AA+CO,IAAM,gBAAN,MAAoB;AAAA,EACzB,YAAoB,MAAA,EAA0B;AAA1B,IAAA,IAAA,CAAA,MAAA,GAAA,MAAA;AAAA,EAA2B;AAAA,EAA3B,MAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQpB,SAAS,KAAA,EAAoI;AAC3I,IAAA,OAAO,IAAA,CAAK,OAAO,OAAA,CAA2B,MAAA,EAAQ,wBAAwB,EAAE,IAAA,EAAM,OAAO,CAAA;AAAA,EAC/F;AAAA;AAAA,EAGA,QAAQ,KAAA,EAAyD;AAC/D,IAAA,OAAO,IAAA,CAAK,OAAO,OAAA,CAA2B,MAAA,EAAQ,uBAAuB,EAAE,IAAA,EAAM,OAAO,CAAA;AAAA,EAC9F;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,QAAQ,KAAA,EAQuB;AAC7B,IAAA,OAAO,IAAA,CAAK,OAAO,OAAA,CAA2B,MAAA,EAAQ,gBAAgB,EAAE,IAAA,EAAM,OAAO,CAAA;AAAA,EACvF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAiBA,IAAI,KAAA,EAY2B;AAC7B,IAAA,OAAO,IAAA,CAAK,OAAO,OAAA,CAA2B,MAAA,EAAQ,iBAAiB,EAAE,IAAA,EAAM,OAAO,CAAA;AAAA,EACxF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,aAAa,KAAA,EAOkB;AAC7B,IAAA,OAAO,IAAA,CAAK,OAAO,OAAA,CAA2B,MAAA,EAAQ,qBAAqB,EAAE,IAAA,EAAM,OAAO,CAAA;AAAA,EAC5F;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASA,WAAW,KAAA,EAMoB;AAC7B,IAAA,OAAO,IAAA,CAAK,OAAO,OAAA,CAA2B,MAAA,EAAQ,mBAAmB,EAAE,IAAA,EAAM,OAAO,CAAA;AAAA,EAC1F;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,QAAQ,KAAA,EAA+G;AACrH,IAAA,OAAO,IAAA,CAAK,OAAO,OAAA,CAA2B,MAAA,EAAQ,qBAAqB,EAAE,IAAA,EAAM,OAAO,CAAA;AAAA,EAC5F;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAyBA,WAAW,KAAA,EAOoB;AAC7B,IAAA,OAAO,IAAA,CAAK,OAAO,OAAA,CAA2B,MAAA,EAAQ,kBAAkB,EAAE,IAAA,EAAM,OAAO,CAAA;AAAA,EACzF;AACF","file":"chunk-3QFTP5P5.js","sourcesContent":["import type { AudioFxPreset } from \"@nodaro/shared/media\"\nimport type { TranscribeProvider } from \"@nodaro/shared/models\"\nimport type { Transcript } from \"@nodaro/shared/edl\"\nexport type { TranscribeProvider } from \"@nodaro/shared/models\"\nimport type { NodaroClientCore } from \"../core.js\"\n\n/**\n * One word of a {@link AudioResource.transcribe} result — caption-shaped, in\n * MILLISECONDS, and structurally the `captions[]` entry `media.addCaptions()`\n * takes, so a word list can be passed straight through. `speaker` is present\n * only on a diarized `elevenlabs-stt` run.\n */\nexport interface TranscribeWord {\n text: string\n startMs: number\n endMs: number\n timestampMs?: number | null\n confidence?: number | null\n speaker?: string\n}\n\n/**\n * A completed transcribe job's `output_data` (read it off `jobs.get(jobId)`).\n *\n * Mind the units: `words` and `json.words` are in MILLISECONDS, while the\n * top-level `segments` are in SECONDS (the raw per-utterance ranges) — present\n * only on the legacy lanes; `elevenlabs-stt` returns none, so read `words`.\n */\nexport interface TranscribeJobOutput {\n /** The full transcript as one string. */\n text: string\n /** Detected (or requested) language code. */\n language?: string\n /** Per-word timings, ms — present on the word-level lanes. */\n words?: TranscribeWord[]\n /** The normalized {@link Transcript} (ms), the shape `edit.*` consumes. */\n json?: Transcript\n /** Per-utterance ranges in SECONDS — not ms, unlike everything above. */\n segments?: Array<{ start: number; end: number; text: string }>\n}\n\n/**\n * Audio primitives — the building blocks Voice Changer Pro composes internally\n * (separation, isolation, effect, mix, level) plus speech-to-text, exposed\n * standalone so a consumer can run any single step or assemble its own\n * pipeline. Each returns a job id to poll (`jobs.get(jobId)`).\n */\nexport class AudioResource {\n constructor(private client: NodaroClientCore) {}\n\n /**\n * Separate an audio track into stems (`POST /v1/audio-separation`, Demucs).\n * `mode` `\"vocal_instrumental\"` (default) splits voice from music/SFX;\n * `\"stems\"` returns the full drums/bass/other/… breakdown. `quality`\n * `auto` (default) / `fast` / `best`.\n */\n separate(input: { audioUrl: string; mode?: \"vocal_instrumental\" | \"stems\"; quality?: \"auto\" | \"fast\" | \"best\" }): Promise<{ jobId: string }> {\n return this.client.request<{ jobId: string }>(\"POST\", \"/v1/audio-separation\", { body: input })\n }\n\n /** Isolate the primary voice and strip background noise (`POST /v1/audio-isolation`, ElevenLabs). */\n isolate(input: { audioUrl: string }): Promise<{ jobId: string }> {\n return this.client.request<{ jobId: string }>(\"POST\", \"/v1/audio-isolation\", { body: input })\n }\n\n /**\n * Apply a reverb / echo / telephone / megaphone effect to an audio track\n * (`POST /v1/audio-fx`) — the same presets VCP's `voiceFx` uses, standalone.\n * `mix` (0–100) is the reverb wet/dry; `delayMs` + `decay` drive `echo`/`custom`;\n * `eqLow`/`eqHigh` (dB) shape telephone/megaphone.\n */\n applyFx(input: {\n audioUrl: string\n preset?: AudioFxPreset\n mix?: number\n delayMs?: number\n decay?: number\n eqLow?: number\n eqHigh?: number\n }): Promise<{ jobId: string }> {\n return this.client.request<{ jobId: string }>(\"POST\", \"/v1/audio-fx\", { body: input })\n }\n\n /**\n * Layer multiple audio tracks into one (`POST /v1/mix-audio`). `audioUrls`\n * (2–20) are summed; optional `trackVolumes` (0–200% each, positionally) set\n * per-track level. `duck` puts a music bed under speech: every track EXCEPT\n * `duck.under` (the 0-based index of the voice track) dips while that track\n * is loud and rises back in its pauses (sidechain compression). `amount`\n * (0–100, default 75) is how hard; `thresholdDb` (-60–0, default -30),\n * `ratio` (1–20, overrides `amount`), `attackMs` (1–2000, default 20) and\n * `releaseMs` (10–9000, default 500) are optional fine controls. A ducked mix\n * sums its tracks rather than averaging them, so the voice keeps its level;\n * the price is the same with or without a duck. `endAt` (`\"longest\"`, the\n * default, or `\"voice\"`) says where the mix ends: `\"voice\"` ends it when the\n * voice (the `duck.under` track) ends (needs `duck`). A video URL is a track\n * too: its audio is mixed, and a video with no sound is a silent track.\n */\n mix(input: {\n audioUrls: string[]\n trackVolumes?: number[]\n duck?: {\n under: number\n amount?: number\n thresholdDb?: number\n ratio?: number\n attackMs?: number\n releaseMs?: number\n }\n endAt?: \"longest\" | \"voice\"\n }): Promise<{ jobId: string }> {\n return this.client.request<{ jobId: string }>(\"POST\", \"/v1/mix-audio\", { body: input })\n }\n\n /**\n * Adjust an audio (or a video's audio) level (`POST /v1/adjust-volume`):\n * `volume` % (default 100), `normalize` to loudnorm, and `fadeIn`/`fadeOut`\n * seconds. Provide `audioUrl` or `videoUrl`.\n */\n adjustVolume(input: {\n audioUrl?: string\n videoUrl?: string\n volume?: number\n normalize?: boolean\n fadeIn?: number\n fadeOut?: number\n }): Promise<{ jobId: string }> {\n return this.client.request<{ jobId: string }>(\"POST\", \"/v1/adjust-volume\", { body: input })\n }\n\n /**\n * Shift pitch and/or change tempo with Rubber Band (`POST /v1/pitch-tempo`):\n * `semitones` −12…+12 (default 0), `tempo` 0.5…2 with the pitch kept\n * (default 1; fixed at 1 for a video), `preserveFormants` (default true).\n * Provide exactly one of `audioUrl` or `videoUrl` — a video keeps its picture.\n * Input up to 30 minutes, priced per started minute.\n */\n pitchTempo(input: {\n audioUrl?: string\n videoUrl?: string\n semitones?: number\n tempo?: number\n preserveFormants?: boolean\n }): Promise<{ jobId: string }> {\n return this.client.request<{ jobId: string }>(\"POST\", \"/v1/pitch-tempo\", { body: input })\n }\n\n /**\n * Concatenate audio segments end-to-end (`POST /v1/combine-audio`). Each\n * segment is a `url` with an optional `[startTime, endTime]` sub-range.\n */\n combine(input: { segments: Array<{ url: string; startTime?: number; endTime?: number }> }): Promise<{ jobId: string }> {\n return this.client.request<{ jobId: string }>(\"POST\", \"/v1/combine-audio\", { body: input })\n }\n\n /**\n * Transcribe an audio (or video) track to text (`POST /v1/transcribe`).\n *\n * Three engines are accepted. `elevenlabs-stt` (Scribe) is always word-level,\n * flag or not, and is the only lane that honours `diarize` (who spoke) and\n * `tagAudioEvents` (laughter, applause, …); `incredibly-fast-whisper` returns\n * word timings when you ask for them. `whisper` returns NO word timings at\n * all — named explicitly or reached by OMITTING `provider`, which still falls\n * back to it — so asking it for them (`wordTimestamps: true`) is rejected with\n * a `400 validation_error` at ingress, before any credit is spent. A kinetic\n * caption render therefore has to name one of the other two.\n *\n * Poll `jobs.get(jobId)`; the finished job's `output_data` is a\n * {@link TranscribeJobOutput}: `text` (the whole transcript), `words`\n * (caption-shaped, in MILLISECONDS), `json` (the normalized\n * {@link Transcript}, also ms) — and a top-level `segments` array that is in\n * SECONDS, not ms.\n *\n * `words` is the caption source for a kinetic burn-in: hand it to\n * `media.addCaptions()` as `captions` with `autoTranscribe: false` and the\n * render uses those exact words (correct the `text` of an entry in between\n * and the fix is what burns in).\n */\n transcribe(input: {\n audioUrl: string\n provider?: TranscribeProvider\n language?: string\n diarize?: boolean\n tagAudioEvents?: boolean\n wordTimestamps?: boolean\n }): Promise<{ jobId: string }> {\n return this.client.request<{ jobId: string }>(\"POST\", \"/v1/transcribe\", { body: input })\n }\n}\n"]}
|