@nodaro/sdk 2.29.0 → 2.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +31 -0
- package/dist/chunk-2DZWWIJ4.cjs +32 -0
- package/dist/chunk-2DZWWIJ4.cjs.map +1 -0
- package/dist/chunk-34PU2DAT.cjs +118 -0
- package/dist/chunk-34PU2DAT.cjs.map +1 -0
- package/dist/chunk-37Y5QAVA.js +3 -0
- package/dist/chunk-37Y5QAVA.js.map +1 -0
- package/dist/chunk-37YCKZX4.cjs +4 -0
- package/dist/chunk-37YCKZX4.cjs.map +1 -0
- package/dist/chunk-3B47IHB3.cjs +65 -0
- package/dist/chunk-3B47IHB3.cjs.map +1 -0
- package/dist/chunk-3BELHJBN.cjs +4 -0
- package/dist/chunk-3BELHJBN.cjs.map +1 -0
- package/dist/chunk-3PPSGM5X.js +3 -0
- package/dist/chunk-3PPSGM5X.js.map +1 -0
- package/dist/chunk-3QBH2VE2.cjs +80 -0
- package/dist/chunk-3QBH2VE2.cjs.map +1 -0
- package/dist/chunk-3QFTP5P5.js +102 -0
- package/dist/chunk-3QFTP5P5.js.map +1 -0
- package/dist/chunk-43FVH6LJ.cjs +123 -0
- package/dist/chunk-43FVH6LJ.cjs.map +1 -0
- package/dist/chunk-43NO4SGC.cjs +4 -0
- package/dist/chunk-43NO4SGC.cjs.map +1 -0
- package/dist/chunk-45CK55BH.cjs +4 -0
- package/dist/chunk-45CK55BH.cjs.map +1 -0
- package/dist/chunk-4CXB7RA6.js +104 -0
- package/dist/chunk-4CXB7RA6.js.map +1 -0
- package/dist/chunk-4NLVBYMW.js +280 -0
- package/dist/chunk-4NLVBYMW.js.map +1 -0
- package/dist/chunk-4WRDR4GN.js +102 -0
- package/dist/chunk-4WRDR4GN.js.map +1 -0
- package/dist/chunk-4WWSHV5G.cjs +4 -0
- package/dist/chunk-4WWSHV5G.cjs.map +1 -0
- package/dist/chunk-53SXNN3A.js +80 -0
- package/dist/chunk-53SXNN3A.js.map +1 -0
- package/dist/chunk-5ALNFATQ.cjs +27 -0
- package/dist/chunk-5ALNFATQ.cjs.map +1 -0
- package/dist/chunk-5UQNMNUE.cjs +4 -0
- package/dist/chunk-5UQNMNUE.cjs.map +1 -0
- package/dist/chunk-65E3JBFZ.js +52 -0
- package/dist/chunk-65E3JBFZ.js.map +1 -0
- package/dist/chunk-6ECW23GA.js +214 -0
- package/dist/chunk-6ECW23GA.js.map +1 -0
- package/dist/chunk-6JFNBAKV.js +3 -0
- package/dist/chunk-6JFNBAKV.js.map +1 -0
- package/dist/chunk-6OC6OKLY.cjs +4 -0
- package/dist/chunk-6OC6OKLY.cjs.map +1 -0
- package/dist/chunk-6OGGJQVA.js +25 -0
- package/dist/chunk-6OGGJQVA.js.map +1 -0
- package/dist/chunk-7A7HYFGM.js +3 -0
- package/dist/chunk-7A7HYFGM.js.map +1 -0
- package/dist/chunk-7CK6I4CT.cjs +16 -0
- package/dist/chunk-7CK6I4CT.cjs.map +1 -0
- package/dist/chunk-7LSFG2AF.js +194 -0
- package/dist/chunk-7LSFG2AF.js.map +1 -0
- package/dist/chunk-7MYKT2L4.cjs +4 -0
- package/dist/chunk-7MYKT2L4.cjs.map +1 -0
- package/dist/chunk-7QOCWJKD.cjs +25 -0
- package/dist/chunk-7QOCWJKD.cjs.map +1 -0
- package/dist/chunk-A2ZAFAWC.cjs +4 -0
- package/dist/chunk-A2ZAFAWC.cjs.map +1 -0
- package/dist/chunk-A3S55XGF.cjs +54 -0
- package/dist/chunk-A3S55XGF.cjs.map +1 -0
- package/dist/chunk-A3THLBFG.js +3 -0
- package/dist/chunk-A3THLBFG.js.map +1 -0
- package/dist/chunk-AJVSMNPZ.js +78 -0
- package/dist/chunk-AJVSMNPZ.js.map +1 -0
- package/dist/chunk-ALSLZG3U.js +124 -0
- package/dist/chunk-ALSLZG3U.js.map +1 -0
- package/dist/chunk-ALUUBPDG.cjs +4 -0
- package/dist/chunk-ALUUBPDG.cjs.map +1 -0
- package/dist/chunk-AO3W45LT.cjs +4 -0
- package/dist/chunk-AO3W45LT.cjs.map +1 -0
- package/dist/chunk-AUDHV3OE.js +3 -0
- package/dist/chunk-AUDHV3OE.js.map +1 -0
- package/dist/chunk-B7RG6AUQ.cjs +216 -0
- package/dist/chunk-B7RG6AUQ.cjs.map +1 -0
- package/dist/chunk-BAL576G2.cjs +4 -0
- package/dist/chunk-BAL576G2.cjs.map +1 -0
- package/dist/chunk-BKP6F2IX.js +3 -0
- package/dist/chunk-BKP6F2IX.js.map +1 -0
- package/dist/chunk-BLA44UCM.js +32 -0
- package/dist/chunk-BLA44UCM.js.map +1 -0
- package/dist/chunk-BPWUWUZ3.cjs +20 -0
- package/dist/chunk-BPWUWUZ3.cjs.map +1 -0
- package/dist/chunk-BRV7Z4GD.cjs +17 -0
- package/dist/chunk-BRV7Z4GD.cjs.map +1 -0
- package/dist/chunk-BU5A6K4C.js +122 -0
- package/dist/chunk-BU5A6K4C.js.map +1 -0
- package/dist/chunk-C22RJDW3.js +3 -0
- package/dist/chunk-C22RJDW3.js.map +1 -0
- package/dist/chunk-CGNVHN4V.js +3 -0
- package/dist/chunk-CGNVHN4V.js.map +1 -0
- package/dist/chunk-CJFIOVBA.js +3 -0
- package/dist/chunk-CJFIOVBA.js.map +1 -0
- package/dist/chunk-CJLLIVSB.cjs +4 -0
- package/dist/chunk-CJLLIVSB.cjs.map +1 -0
- package/dist/chunk-CK3AMMSC.js +194 -0
- package/dist/chunk-CK3AMMSC.js.map +1 -0
- package/dist/chunk-COCKKMNP.cjs +205 -0
- package/dist/chunk-COCKKMNP.cjs.map +1 -0
- package/dist/chunk-CR5E2SF3.cjs +212 -0
- package/dist/chunk-CR5E2SF3.cjs.map +1 -0
- package/dist/chunk-CRCPRZFN.js +3 -0
- package/dist/chunk-CRCPRZFN.js.map +1 -0
- package/dist/chunk-CYRFD6KR.cjs +4 -0
- package/dist/chunk-CYRFD6KR.cjs.map +1 -0
- package/dist/chunk-D3PW7AHZ.js +3 -0
- package/dist/chunk-D3PW7AHZ.js.map +1 -0
- package/dist/chunk-DKEYSJCE.cjs +82 -0
- package/dist/chunk-DKEYSJCE.cjs.map +1 -0
- package/dist/chunk-DPSMVOM3.js +15 -0
- package/dist/chunk-DPSMVOM3.js.map +1 -0
- package/dist/chunk-E2ZXHS6E.js +20 -0
- package/dist/chunk-E2ZXHS6E.js.map +1 -0
- package/dist/chunk-E37CVHWW.js +33 -0
- package/dist/chunk-E37CVHWW.js.map +1 -0
- package/dist/chunk-E5BM4BLO.js +78 -0
- package/dist/chunk-E5BM4BLO.js.map +1 -0
- package/dist/chunk-EHRWTYGR.cjs +4 -0
- package/dist/chunk-EHRWTYGR.cjs.map +1 -0
- package/dist/chunk-EJSGJDZY.js +212 -0
- package/dist/chunk-EJSGJDZY.js.map +1 -0
- package/dist/chunk-ELSOVJPF.js +3 -0
- package/dist/chunk-ELSOVJPF.js.map +1 -0
- package/dist/chunk-ERLXU47J.js +29 -0
- package/dist/chunk-ERLXU47J.js.map +1 -0
- package/dist/chunk-ES2E65HT.js +3 -0
- package/dist/chunk-ES2E65HT.js.map +1 -0
- package/dist/chunk-EXLAHZKF.js +3 -0
- package/dist/chunk-EXLAHZKF.js.map +1 -0
- package/dist/chunk-FB3S2FON.cjs +233 -0
- package/dist/chunk-FB3S2FON.cjs.map +1 -0
- package/dist/chunk-FHEYAW5H.js +3 -0
- package/dist/chunk-FHEYAW5H.js.map +1 -0
- package/dist/chunk-GA4LZZKQ.cjs +104 -0
- package/dist/chunk-GA4LZZKQ.cjs.map +1 -0
- package/dist/chunk-GAZJ2PA3.js +3 -0
- package/dist/chunk-GAZJ2PA3.js.map +1 -0
- package/dist/chunk-GB6C5OEZ.cjs +32 -0
- package/dist/chunk-GB6C5OEZ.cjs.map +1 -0
- package/dist/chunk-GB724HW2.cjs +106 -0
- package/dist/chunk-GB724HW2.cjs.map +1 -0
- package/dist/chunk-GD24ZRFD.js +3 -0
- package/dist/chunk-GD24ZRFD.js.map +1 -0
- package/dist/chunk-GI7LROLL.cjs +4 -0
- package/dist/chunk-GI7LROLL.cjs.map +1 -0
- package/dist/chunk-GRFLPEM2.cjs +16 -0
- package/dist/chunk-GRFLPEM2.cjs.map +1 -0
- package/dist/chunk-GVIFLUYZ.cjs +40 -0
- package/dist/chunk-GVIFLUYZ.cjs.map +1 -0
- package/dist/chunk-GWCOKNST.js +228 -0
- package/dist/chunk-GWCOKNST.js.map +1 -0
- package/dist/chunk-H7VQTG4M.js +35 -0
- package/dist/chunk-H7VQTG4M.js.map +1 -0
- package/dist/chunk-HAKYPZLB.cjs +242 -0
- package/dist/chunk-HAKYPZLB.cjs.map +1 -0
- package/dist/chunk-HFBR6G36.js +3 -0
- package/dist/chunk-HFBR6G36.js.map +1 -0
- package/dist/chunk-HGCVWOGK.cjs +209 -0
- package/dist/chunk-HGCVWOGK.cjs.map +1 -0
- package/dist/chunk-HLHR3R4P.js +3 -0
- package/dist/chunk-HLHR3R4P.js.map +1 -0
- package/dist/chunk-HRXXGGSJ.js +3 -0
- package/dist/chunk-HRXXGGSJ.js.map +1 -0
- package/dist/chunk-I3TYBAOX.js +3 -0
- package/dist/chunk-I3TYBAOX.js.map +1 -0
- package/dist/chunk-I4A5VJRL.js +352 -0
- package/dist/chunk-I4A5VJRL.js.map +1 -0
- package/dist/chunk-I6CXC345.js +102 -0
- package/dist/chunk-I6CXC345.js.map +1 -0
- package/dist/chunk-IGOPUMEX.cjs +4 -0
- package/dist/chunk-IGOPUMEX.cjs.map +1 -0
- package/dist/chunk-IHKIYVZQ.js +30 -0
- package/dist/chunk-IHKIYVZQ.js.map +1 -0
- package/dist/chunk-IMC2M5YM.cjs +12 -0
- package/dist/chunk-IMC2M5YM.cjs.map +1 -0
- package/dist/chunk-IQ6KWSXP.js +3 -0
- package/dist/chunk-IQ6KWSXP.js.map +1 -0
- package/dist/chunk-IS26FJO7.cjs +4 -0
- package/dist/chunk-IS26FJO7.cjs.map +1 -0
- package/dist/chunk-J4WFSKY6.js +50 -0
- package/dist/chunk-J4WFSKY6.js.map +1 -0
- package/dist/chunk-J5LGGCAS.cjs +126 -0
- package/dist/chunk-J5LGGCAS.cjs.map +1 -0
- package/dist/chunk-JDEZHITT.js +43 -0
- package/dist/chunk-JDEZHITT.js.map +1 -0
- package/dist/chunk-JGS6YBDW.js +260 -0
- package/dist/chunk-JGS6YBDW.js.map +1 -0
- package/dist/chunk-JMOKD6ZP.js +46 -0
- package/dist/chunk-JMOKD6ZP.js.map +1 -0
- package/dist/chunk-JOX5BJ6K.cjs +4 -0
- package/dist/chunk-JOX5BJ6K.cjs.map +1 -0
- package/dist/chunk-JTAW54UM.js +116 -0
- package/dist/chunk-JTAW54UM.js.map +1 -0
- package/dist/chunk-K4RQOSJH.js +203 -0
- package/dist/chunk-K4RQOSJH.js.map +1 -0
- package/dist/chunk-KAIE6WJB.cjs +4 -0
- package/dist/chunk-KAIE6WJB.cjs.map +1 -0
- package/dist/chunk-KEDPGWIK.cjs +4 -0
- package/dist/chunk-KEDPGWIK.cjs.map +1 -0
- package/dist/chunk-KG4R454Z.js +18 -0
- package/dist/chunk-KG4R454Z.js.map +1 -0
- package/dist/chunk-KGKCAGRD.cjs +22 -0
- package/dist/chunk-KGKCAGRD.cjs.map +1 -0
- package/dist/chunk-KNMW722T.cjs +48 -0
- package/dist/chunk-KNMW722T.cjs.map +1 -0
- package/dist/chunk-KTTL7BND.cjs +4 -0
- package/dist/chunk-KTTL7BND.cjs.map +1 -0
- package/dist/chunk-KXEWTYS4.cjs +80 -0
- package/dist/chunk-KXEWTYS4.cjs.map +1 -0
- package/dist/chunk-KZQKFBRN.js +3 -0
- package/dist/chunk-KZQKFBRN.js.map +1 -0
- package/dist/chunk-LAWYFC4G.cjs +37 -0
- package/dist/chunk-LAWYFC4G.cjs.map +1 -0
- package/dist/chunk-LHRQXWI5.js +3 -0
- package/dist/chunk-LHRQXWI5.js.map +1 -0
- package/dist/chunk-LKH5M44B.cjs +114 -0
- package/dist/chunk-LKH5M44B.cjs.map +1 -0
- package/dist/chunk-LLNNHLCE.cjs +4 -0
- package/dist/chunk-LLNNHLCE.cjs.map +1 -0
- package/dist/chunk-LWZLWSXD.cjs +4 -0
- package/dist/chunk-LWZLWSXD.cjs.map +1 -0
- package/dist/chunk-M6Y5TOYE.js +3 -0
- package/dist/chunk-M6Y5TOYE.js.map +1 -0
- package/dist/chunk-MBFUMWI5.cjs +31 -0
- package/dist/chunk-MBFUMWI5.cjs.map +1 -0
- package/dist/chunk-MEKI37WI.js +3 -0
- package/dist/chunk-MEKI37WI.js.map +1 -0
- package/dist/chunk-MQ74AKA2.cjs +200 -0
- package/dist/chunk-MQ74AKA2.cjs.map +1 -0
- package/dist/chunk-N6GLZOE4.cjs +282 -0
- package/dist/chunk-N6GLZOE4.cjs.map +1 -0
- package/dist/chunk-NBVARNVA.cjs +38 -0
- package/dist/chunk-NBVARNVA.cjs.map +1 -0
- package/dist/chunk-NCCBS6GU.js +42 -0
- package/dist/chunk-NCCBS6GU.js.map +1 -0
- package/dist/chunk-NGKODS3J.cjs +52 -0
- package/dist/chunk-NGKODS3J.cjs.map +1 -0
- package/dist/chunk-NJVSKUL2.cjs +4 -0
- package/dist/chunk-NJVSKUL2.cjs.map +1 -0
- package/dist/chunk-NLQQHJ25.cjs +104 -0
- package/dist/chunk-NLQQHJ25.cjs.map +1 -0
- package/dist/chunk-NNHWH7ER.js +181 -0
- package/dist/chunk-NNHWH7ER.js.map +1 -0
- package/dist/chunk-NX67YIF3.js +3 -0
- package/dist/chunk-NX67YIF3.js.map +1 -0
- package/dist/chunk-OA6FWYZF.cjs +4 -0
- package/dist/chunk-OA6FWYZF.cjs.map +1 -0
- package/dist/chunk-OJDBSKC2.js +3 -0
- package/dist/chunk-OJDBSKC2.js.map +1 -0
- package/dist/chunk-OLPA44QJ.js +3 -0
- package/dist/chunk-OLPA44QJ.js.map +1 -0
- package/dist/chunk-OMH7ATOQ.js +3 -0
- package/dist/chunk-OMH7ATOQ.js.map +1 -0
- package/dist/chunk-OPR4TULG.js +3 -0
- package/dist/chunk-OPR4TULG.js.map +1 -0
- package/dist/chunk-OSX2GVZ2.cjs +34 -0
- package/dist/chunk-OSX2GVZ2.cjs.map +1 -0
- package/dist/chunk-OXQKE5EG.cjs +282 -0
- package/dist/chunk-OXQKE5EG.cjs.map +1 -0
- package/dist/chunk-P6E4QDJN.js +30 -0
- package/dist/chunk-P6E4QDJN.js.map +1 -0
- package/dist/chunk-PEMLIAPZ.cjs +64 -0
- package/dist/chunk-PEMLIAPZ.cjs.map +1 -0
- package/dist/chunk-PGYQ754I.js +3 -0
- package/dist/chunk-PGYQ754I.js.map +1 -0
- package/dist/chunk-PHEA6FVQ.js +184 -0
- package/dist/chunk-PHEA6FVQ.js.map +1 -0
- package/dist/chunk-PMTM26LL.js +3 -0
- package/dist/chunk-PMTM26LL.js.map +1 -0
- package/dist/chunk-PY4OEKNX.cjs +4 -0
- package/dist/chunk-PY4OEKNX.cjs.map +1 -0
- package/dist/chunk-PZS2EXDR.cjs +4 -0
- package/dist/chunk-PZS2EXDR.cjs.map +1 -0
- package/dist/chunk-QRHJEITQ.cjs +4 -0
- package/dist/chunk-QRHJEITQ.cjs.map +1 -0
- package/dist/chunk-QUFU5RJ7.cjs +4 -0
- package/dist/chunk-QUFU5RJ7.cjs.map +1 -0
- package/dist/chunk-QVQCKOBM.js +3 -0
- package/dist/chunk-QVQCKOBM.js.map +1 -0
- package/dist/chunk-R63TTR35.cjs +200 -0
- package/dist/chunk-R63TTR35.cjs.map +1 -0
- package/dist/chunk-RA42NMWV.cjs +4 -0
- package/dist/chunk-RA42NMWV.cjs.map +1 -0
- package/dist/chunk-RAZN6C5R.cjs +12 -0
- package/dist/chunk-RAZN6C5R.cjs.map +1 -0
- package/dist/chunk-RHETJOUM.cjs +4 -0
- package/dist/chunk-RHETJOUM.cjs.map +1 -0
- package/dist/chunk-RJIJVVXS.js +3 -0
- package/dist/chunk-RJIJVVXS.js.map +1 -0
- package/dist/chunk-RKVRCNMB.js +3 -0
- package/dist/chunk-RKVRCNMB.js.map +1 -0
- package/dist/chunk-S7JQKNVT.cjs +187 -0
- package/dist/chunk-S7JQKNVT.cjs.map +1 -0
- package/dist/chunk-SBV5MWEL.cjs +53 -0
- package/dist/chunk-SBV5MWEL.cjs.map +1 -0
- package/dist/chunk-SFB4YLCS.js +121 -0
- package/dist/chunk-SFB4YLCS.js.map +1 -0
- package/dist/chunk-SLPD47SR.js +3 -0
- package/dist/chunk-SLPD47SR.js.map +1 -0
- package/dist/chunk-SS3B6PHT.cjs +35 -0
- package/dist/chunk-SS3B6PHT.cjs.map +1 -0
- package/dist/chunk-SUCHGNYT.js +3 -0
- package/dist/chunk-SUCHGNYT.js.map +1 -0
- package/dist/chunk-SYVNY3AH.cjs +44 -0
- package/dist/chunk-SYVNY3AH.cjs.map +1 -0
- package/dist/chunk-T3SYREY4.js +29 -0
- package/dist/chunk-T3SYREY4.js.map +1 -0
- package/dist/chunk-T7N7DFQJ.js +198 -0
- package/dist/chunk-T7N7DFQJ.js.map +1 -0
- package/dist/chunk-TRCENAIY.cjs +4 -0
- package/dist/chunk-TRCENAIY.cjs.map +1 -0
- package/dist/chunk-TVENC6PH.js +186 -0
- package/dist/chunk-TVENC6PH.js.map +1 -0
- package/dist/chunk-U4T3Z3K7.cjs +325 -0
- package/dist/chunk-U4T3Z3K7.cjs.map +1 -0
- package/dist/chunk-UIFFNTUX.js +3 -0
- package/dist/chunk-UIFFNTUX.js.map +1 -0
- package/dist/chunk-V4GPQ6Y2.js +3 -0
- package/dist/chunk-V4GPQ6Y2.js.map +1 -0
- package/dist/chunk-VGTRKXF2.js +93 -0
- package/dist/chunk-VGTRKXF2.js.map +1 -0
- package/dist/chunk-VGWOIWRQ.cjs +202 -0
- package/dist/chunk-VGWOIWRQ.cjs.map +1 -0
- package/dist/chunk-VLCNNA76.cjs +4 -0
- package/dist/chunk-VLCNNA76.cjs.map +1 -0
- package/dist/chunk-VPAUN75Q.js +3 -0
- package/dist/chunk-VPAUN75Q.js.map +1 -0
- package/dist/chunk-VT237QF2.js +3 -0
- package/dist/chunk-VT237QF2.js.map +1 -0
- package/dist/chunk-VV4TZG5S.js +321 -0
- package/dist/chunk-VV4TZG5S.js.map +1 -0
- package/dist/chunk-VYK6MBL4.cjs +4 -0
- package/dist/chunk-VYK6MBL4.cjs.map +1 -0
- package/dist/chunk-W33CKW6Q.cjs +4 -0
- package/dist/chunk-W33CKW6Q.cjs.map +1 -0
- package/dist/chunk-W5VHATSR.cjs +31 -0
- package/dist/chunk-W5VHATSR.cjs.map +1 -0
- package/dist/chunk-WEQWU2IC.js +34 -0
- package/dist/chunk-WEQWU2IC.js.map +1 -0
- package/dist/chunk-WK4VXPPZ.cjs +104 -0
- package/dist/chunk-WK4VXPPZ.cjs.map +1 -0
- package/dist/chunk-WSA4LMWR.cjs +96 -0
- package/dist/chunk-WSA4LMWR.cjs.map +1 -0
- package/dist/chunk-WUIEZ6Z4.cjs +360 -0
- package/dist/chunk-WUIEZ6Z4.cjs.map +1 -0
- package/dist/chunk-WUKIJJG2.cjs +45 -0
- package/dist/chunk-WUKIJJG2.cjs.map +1 -0
- package/dist/chunk-WVFAQBS7.js +29 -0
- package/dist/chunk-WVFAQBS7.js.map +1 -0
- package/dist/chunk-X7RDNMN7.js +3 -0
- package/dist/chunk-X7RDNMN7.js.map +1 -0
- package/dist/chunk-X7XP5WBP.cjs +4 -0
- package/dist/chunk-X7XP5WBP.cjs.map +1 -0
- package/dist/chunk-XWKNE6DH.cjs +4 -0
- package/dist/chunk-XWKNE6DH.cjs.map +1 -0
- package/dist/chunk-Y6V6CBY5.js +23 -0
- package/dist/chunk-Y6V6CBY5.js.map +1 -0
- package/dist/chunk-Y6VDCZPB.js +62 -0
- package/dist/chunk-Y6VDCZPB.js.map +1 -0
- package/dist/chunk-YDRXBRW2.cjs +184 -0
- package/dist/chunk-YDRXBRW2.cjs.map +1 -0
- package/dist/chunk-YFS2LMG4.cjs +124 -0
- package/dist/chunk-YFS2LMG4.cjs.map +1 -0
- package/dist/chunk-YN6CBIIB.js +63 -0
- package/dist/chunk-YN6CBIIB.js.map +1 -0
- package/dist/chunk-YOJ2XNQX.cjs +4 -0
- package/dist/chunk-YOJ2XNQX.cjs.map +1 -0
- package/dist/chunk-YOOZB4RL.js +3 -0
- package/dist/chunk-YOOZB4RL.js.map +1 -0
- package/dist/chunk-YVU2M7MI.js +34 -0
- package/dist/chunk-YVU2M7MI.js.map +1 -0
- package/dist/chunk-YXBZRB5H.cjs +4 -0
- package/dist/chunk-YXBZRB5H.cjs.map +1 -0
- package/dist/chunk-Z3ZKFI2M.js +43 -0
- package/dist/chunk-Z3ZKFI2M.js.map +1 -0
- package/dist/chunk-Z5GLY4R3.js +112 -0
- package/dist/chunk-Z5GLY4R3.js.map +1 -0
- package/dist/chunk-Z5OMWAQX.js +3 -0
- package/dist/chunk-Z5OMWAQX.js.map +1 -0
- package/dist/chunk-Z7LGWNI7.js +38 -0
- package/dist/chunk-Z7LGWNI7.js.map +1 -0
- package/dist/chunk-ZCWKX4V6.cjs +38 -0
- package/dist/chunk-ZCWKX4V6.cjs.map +1 -0
- package/dist/chunk-ZE5RISBZ.cjs +4 -0
- package/dist/chunk-ZE5RISBZ.cjs.map +1 -0
- package/dist/chunk-ZH4F2P2G.js +3 -0
- package/dist/chunk-ZH4F2P2G.js.map +1 -0
- package/dist/chunk-ZJGFLJ2Z.cjs +4 -0
- package/dist/chunk-ZJGFLJ2Z.cjs.map +1 -0
- package/dist/chunk-ZKBHD27K.cjs +4 -0
- package/dist/chunk-ZKBHD27K.cjs.map +1 -0
- package/dist/chunk-ZQPLRNKX.cjs +4 -0
- package/dist/chunk-ZQPLRNKX.cjs.map +1 -0
- package/dist/chunk-ZQQABQMH.cjs +31 -0
- package/dist/chunk-ZQQABQMH.cjs.map +1 -0
- package/dist/chunk-ZXJQSFIA.js +200 -0
- package/dist/chunk-ZXJQSFIA.js.map +1 -0
- package/dist/chunk-ZYPH2FPT.js +3 -0
- package/dist/chunk-ZYPH2FPT.js.map +1 -0
- package/dist/developer-apps-zSQXWmEG.d.cts +294 -0
- package/dist/developer-apps-zSQXWmEG.d.ts +294 -0
- package/dist/entries/apps.cjs +13 -0
- package/dist/entries/apps.cjs.map +1 -0
- package/dist/entries/apps.d.cts +300 -0
- package/dist/entries/apps.d.ts +300 -0
- package/dist/entries/apps.js +4 -0
- package/dist/entries/apps.js.map +1 -0
- package/dist/entries/audio.cjs +13 -0
- package/dist/entries/audio.cjs.map +1 -0
- package/dist/entries/audio.d.cts +200 -0
- package/dist/entries/audio.d.ts +200 -0
- package/dist/entries/audio.js +4 -0
- package/dist/entries/audio.js.map +1 -0
- package/dist/entries/billing.cjs +13 -0
- package/dist/entries/billing.cjs.map +1 -0
- package/dist/entries/billing.d.cts +208 -0
- package/dist/entries/billing.d.ts +208 -0
- package/dist/entries/billing.js +4 -0
- package/dist/entries/billing.js.map +1 -0
- package/dist/entries/catalogs.cjs +13 -0
- package/dist/entries/catalogs.cjs.map +1 -0
- package/dist/entries/catalogs.d.cts +82 -0
- package/dist/entries/catalogs.d.ts +82 -0
- package/dist/entries/catalogs.js +4 -0
- package/dist/entries/catalogs.js.map +1 -0
- package/dist/entries/characters.cjs +45 -0
- package/dist/entries/characters.cjs.map +1 -0
- package/dist/entries/characters.d.cts +741 -0
- package/dist/entries/characters.d.ts +741 -0
- package/dist/entries/characters.js +4 -0
- package/dist/entries/characters.js.map +1 -0
- package/dist/entries/client.cjs +78 -0
- package/dist/entries/client.cjs.map +1 -0
- package/dist/entries/client.d.cts +147 -0
- package/dist/entries/client.d.ts +147 -0
- package/dist/entries/client.js +53 -0
- package/dist/entries/client.js.map +1 -0
- package/dist/entries/collections.cjs +13 -0
- package/dist/entries/collections.cjs.map +1 -0
- package/dist/entries/collections.d.cts +77 -0
- package/dist/entries/collections.d.ts +77 -0
- package/dist/entries/collections.js +4 -0
- package/dist/entries/collections.js.map +1 -0
- package/dist/entries/community.cjs +13 -0
- package/dist/entries/community.cjs.map +1 -0
- package/dist/entries/community.d.cts +87 -0
- package/dist/entries/community.d.ts +87 -0
- package/dist/entries/community.js +4 -0
- package/dist/entries/community.js.map +1 -0
- package/dist/entries/competitors.cjs +13 -0
- package/dist/entries/competitors.cjs.map +1 -0
- package/dist/entries/competitors.d.cts +96 -0
- package/dist/entries/competitors.d.ts +96 -0
- package/dist/entries/competitors.js +4 -0
- package/dist/entries/competitors.js.map +1 -0
- package/dist/entries/copilot.cjs +15 -0
- package/dist/entries/copilot.cjs.map +1 -0
- package/dist/entries/copilot.d.cts +296 -0
- package/dist/entries/copilot.d.ts +296 -0
- package/dist/entries/copilot.js +6 -0
- package/dist/entries/copilot.js.map +1 -0
- package/dist/entries/core.cjs +26 -0
- package/dist/entries/core.cjs.map +1 -0
- package/dist/entries/core.d.cts +3 -0
- package/dist/entries/core.d.ts +3 -0
- package/dist/entries/core.js +5 -0
- package/dist/entries/core.js.map +1 -0
- package/dist/entries/creatures.cjs +29 -0
- package/dist/entries/creatures.cjs.map +1 -0
- package/dist/entries/creatures.d.cts +594 -0
- package/dist/entries/creatures.d.ts +594 -0
- package/dist/entries/creatures.js +4 -0
- package/dist/entries/creatures.js.map +1 -0
- package/dist/entries/credits.cjs +13 -0
- package/dist/entries/credits.cjs.map +1 -0
- package/dist/entries/credits.d.cts +237 -0
- package/dist/entries/credits.d.ts +237 -0
- package/dist/entries/credits.js +4 -0
- package/dist/entries/credits.js.map +1 -0
- package/dist/entries/developer-apps.cjs +13 -0
- package/dist/entries/developer-apps.cjs.map +1 -0
- package/dist/entries/developer-apps.d.cts +3 -0
- package/dist/entries/developer-apps.d.ts +3 -0
- package/dist/entries/developer-apps.js +4 -0
- package/dist/entries/developer-apps.js.map +1 -0
- package/dist/entries/edit.cjs +34 -0
- package/dist/entries/edit.cjs.map +1 -0
- package/dist/entries/edit.d.cts +705 -0
- package/dist/entries/edit.d.ts +705 -0
- package/dist/entries/edit.js +5 -0
- package/dist/entries/edit.js.map +1 -0
- package/dist/entries/errors.cjs +93 -0
- package/dist/entries/errors.cjs.map +1 -0
- package/dist/entries/errors.d.cts +338 -0
- package/dist/entries/errors.d.ts +338 -0
- package/dist/entries/errors.js +4 -0
- package/dist/entries/errors.js.map +1 -0
- package/dist/entries/executions.cjs +21 -0
- package/dist/entries/executions.cjs.map +1 -0
- package/dist/entries/executions.d.cts +120 -0
- package/dist/entries/executions.d.ts +120 -0
- package/dist/entries/executions.js +4 -0
- package/dist/entries/executions.js.map +1 -0
- package/dist/entries/gallery.cjs +13 -0
- package/dist/entries/gallery.cjs.map +1 -0
- package/dist/entries/gallery.d.cts +85 -0
- package/dist/entries/gallery.d.ts +85 -0
- package/dist/entries/gallery.js +4 -0
- package/dist/entries/gallery.js.map +1 -0
- package/dist/entries/jobs.cjs +13 -0
- package/dist/entries/jobs.cjs.map +1 -0
- package/dist/entries/jobs.d.cts +252 -0
- package/dist/entries/jobs.d.ts +252 -0
- package/dist/entries/jobs.js +4 -0
- package/dist/entries/jobs.js.map +1 -0
- package/dist/entries/library.cjs +13 -0
- package/dist/entries/library.cjs.map +1 -0
- package/dist/entries/library.d.cts +109 -0
- package/dist/entries/library.d.ts +109 -0
- package/dist/entries/library.js +4 -0
- package/dist/entries/library.js.map +1 -0
- package/dist/entries/llm.cjs +13 -0
- package/dist/entries/llm.cjs.map +1 -0
- package/dist/entries/llm.d.cts +98 -0
- package/dist/entries/llm.d.ts +98 -0
- package/dist/entries/llm.js +4 -0
- package/dist/entries/llm.js.map +1 -0
- package/dist/entries/locations.cjs +25 -0
- package/dist/entries/locations.cjs.map +1 -0
- package/dist/entries/locations.d.cts +573 -0
- package/dist/entries/locations.d.ts +573 -0
- package/dist/entries/locations.js +4 -0
- package/dist/entries/locations.js.map +1 -0
- package/dist/entries/media.cjs +15 -0
- package/dist/entries/media.cjs.map +1 -0
- package/dist/entries/media.d.cts +548 -0
- package/dist/entries/media.d.ts +548 -0
- package/dist/entries/media.js +6 -0
- package/dist/entries/media.js.map +1 -0
- package/dist/entries/models.cjs +13 -0
- package/dist/entries/models.cjs.map +1 -0
- package/dist/entries/models.d.cts +92 -0
- package/dist/entries/models.d.ts +92 -0
- package/dist/entries/models.js +4 -0
- package/dist/entries/models.js.map +1 -0
- package/dist/entries/moodboards.cjs +21 -0
- package/dist/entries/moodboards.cjs.map +1 -0
- package/dist/entries/moodboards.d.cts +77 -0
- package/dist/entries/moodboards.d.ts +77 -0
- package/dist/entries/moodboards.js +4 -0
- package/dist/entries/moodboards.js.map +1 -0
- package/dist/entries/node-presets.cjs +13 -0
- package/dist/entries/node-presets.cjs.map +1 -0
- package/dist/entries/node-presets.d.cts +217 -0
- package/dist/entries/node-presets.d.ts +217 -0
- package/dist/entries/node-presets.js +4 -0
- package/dist/entries/node-presets.js.map +1 -0
- package/dist/entries/nodes.cjs +22 -0
- package/dist/entries/nodes.cjs.map +1 -0
- package/dist/entries/nodes.d.cts +18 -0
- package/dist/entries/nodes.d.ts +18 -0
- package/dist/entries/nodes.js +5 -0
- package/dist/entries/nodes.js.map +1 -0
- package/dist/entries/oauth.cjs +13 -0
- package/dist/entries/oauth.cjs.map +1 -0
- package/dist/entries/oauth.d.cts +69 -0
- package/dist/entries/oauth.d.ts +69 -0
- package/dist/entries/oauth.js +4 -0
- package/dist/entries/oauth.js.map +1 -0
- package/dist/entries/objects.cjs +29 -0
- package/dist/entries/objects.cjs.map +1 -0
- package/dist/entries/objects.d.cts +544 -0
- package/dist/entries/objects.d.ts +544 -0
- package/dist/entries/objects.js +4 -0
- package/dist/entries/objects.js.map +1 -0
- package/dist/entries/organizations.cjs +21 -0
- package/dist/entries/organizations.cjs.map +1 -0
- package/dist/entries/organizations.d.cts +164 -0
- package/dist/entries/organizations.d.ts +164 -0
- package/dist/entries/organizations.js +4 -0
- package/dist/entries/organizations.js.map +1 -0
- package/dist/entries/palettes.cjs +21 -0
- package/dist/entries/palettes.cjs.map +1 -0
- package/dist/entries/palettes.d.cts +69 -0
- package/dist/entries/palettes.d.ts +69 -0
- package/dist/entries/palettes.js +4 -0
- package/dist/entries/palettes.js.map +1 -0
- package/dist/entries/picker-catalogs.cjs +13 -0
- package/dist/entries/picker-catalogs.cjs.map +1 -0
- package/dist/entries/picker-catalogs.d.cts +148 -0
- package/dist/entries/picker-catalogs.d.ts +148 -0
- package/dist/entries/picker-catalogs.js +4 -0
- package/dist/entries/picker-catalogs.js.map +1 -0
- package/dist/entries/pipelines.cjs +13 -0
- package/dist/entries/pipelines.cjs.map +1 -0
- package/dist/entries/pipelines.d.cts +255 -0
- package/dist/entries/pipelines.d.ts +255 -0
- package/dist/entries/pipelines.js +4 -0
- package/dist/entries/pipelines.js.map +1 -0
- package/dist/entries/projects.cjs +13 -0
- package/dist/entries/projects.cjs.map +1 -0
- package/dist/entries/projects.d.cts +49 -0
- package/dist/entries/projects.d.ts +49 -0
- package/dist/entries/projects.js +4 -0
- package/dist/entries/projects.js.map +1 -0
- package/dist/entries/prompt-helper.cjs +13 -0
- package/dist/entries/prompt-helper.cjs.map +1 -0
- package/dist/entries/prompt-helper.d.cts +73 -0
- package/dist/entries/prompt-helper.d.ts +73 -0
- package/dist/entries/prompt-helper.js +4 -0
- package/dist/entries/prompt-helper.js.map +1 -0
- package/dist/entries/recast.cjs +17 -0
- package/dist/entries/recast.cjs.map +1 -0
- package/dist/entries/recast.d.cts +229 -0
- package/dist/entries/recast.d.ts +229 -0
- package/dist/entries/recast.js +4 -0
- package/dist/entries/recast.js.map +1 -0
- package/dist/entries/reduce.cjs +13 -0
- package/dist/entries/reduce.cjs.map +1 -0
- package/dist/entries/reduce.d.cts +56 -0
- package/dist/entries/reduce.d.ts +56 -0
- package/dist/entries/reduce.js +4 -0
- package/dist/entries/reduce.js.map +1 -0
- package/dist/entries/saved-posts.cjs +13 -0
- package/dist/entries/saved-posts.cjs.map +1 -0
- package/dist/entries/saved-posts.d.cts +33 -0
- package/dist/entries/saved-posts.d.ts +33 -0
- package/dist/entries/saved-posts.js +4 -0
- package/dist/entries/saved-posts.js.map +1 -0
- package/dist/entries/scene3d.cjs +17 -0
- package/dist/entries/scene3d.cjs.map +1 -0
- package/dist/entries/scene3d.d.cts +131 -0
- package/dist/entries/scene3d.d.ts +131 -0
- package/dist/entries/scene3d.js +4 -0
- package/dist/entries/scene3d.js.map +1 -0
- package/dist/entries/sessions.cjs +13 -0
- package/dist/entries/sessions.cjs.map +1 -0
- package/dist/entries/sessions.d.cts +122 -0
- package/dist/entries/sessions.d.ts +122 -0
- package/dist/entries/sessions.js +4 -0
- package/dist/entries/sessions.js.map +1 -0
- package/dist/entries/shots.cjs +13 -0
- package/dist/entries/shots.cjs.map +1 -0
- package/dist/entries/shots.d.cts +78 -0
- package/dist/entries/shots.d.ts +78 -0
- package/dist/entries/shots.js +4 -0
- package/dist/entries/shots.js.map +1 -0
- package/dist/entries/studio.cjs +22 -0
- package/dist/entries/studio.cjs.map +1 -0
- package/dist/entries/studio.d.cts +281 -0
- package/dist/entries/studio.d.ts +281 -0
- package/dist/entries/studio.js +5 -0
- package/dist/entries/studio.js.map +1 -0
- package/dist/entries/templates.cjs +13 -0
- package/dist/entries/templates.cjs.map +1 -0
- package/dist/entries/templates.d.cts +110 -0
- package/dist/entries/templates.d.ts +110 -0
- package/dist/entries/templates.js +4 -0
- package/dist/entries/templates.js.map +1 -0
- package/dist/entries/tutorials.cjs +13 -0
- package/dist/entries/tutorials.cjs.map +1 -0
- package/dist/entries/tutorials.d.cts +63 -0
- package/dist/entries/tutorials.d.ts +63 -0
- package/dist/entries/tutorials.js +4 -0
- package/dist/entries/tutorials.js.map +1 -0
- package/dist/entries/uploads.cjs +13 -0
- package/dist/entries/uploads.cjs.map +1 -0
- package/dist/entries/uploads.d.cts +44 -0
- package/dist/entries/uploads.d.ts +44 -0
- package/dist/entries/uploads.js +4 -0
- package/dist/entries/uploads.js.map +1 -0
- package/dist/entries/video-pro.cjs +13 -0
- package/dist/entries/video-pro.cjs.map +1 -0
- package/dist/entries/video-pro.d.cts +60 -0
- package/dist/entries/video-pro.d.ts +60 -0
- package/dist/entries/video-pro.js +4 -0
- package/dist/entries/video-pro.js.map +1 -0
- package/dist/entries/voices.cjs +13 -0
- package/dist/entries/voices.cjs.map +1 -0
- package/dist/entries/voices.d.cts +498 -0
- package/dist/entries/voices.d.ts +498 -0
- package/dist/entries/voices.js +4 -0
- package/dist/entries/voices.js.map +1 -0
- package/dist/entries/webhooks.cjs +21 -0
- package/dist/entries/webhooks.cjs.map +1 -0
- package/dist/entries/webhooks.d.cts +64 -0
- package/dist/entries/webhooks.d.ts +64 -0
- package/dist/entries/webhooks.js +4 -0
- package/dist/entries/webhooks.js.map +1 -0
- package/dist/entries/workflows.cjs +13 -0
- package/dist/entries/workflows.cjs.map +1 -0
- package/dist/entries/workflows.d.cts +393 -0
- package/dist/entries/workflows.d.ts +393 -0
- package/dist/entries/workflows.js +4 -0
- package/dist/entries/workflows.js.map +1 -0
- package/dist/entries/workspaces.cjs +13 -0
- package/dist/entries/workspaces.cjs.map +1 -0
- package/dist/entries/workspaces.d.cts +124 -0
- package/dist/entries/workspaces.d.ts +124 -0
- package/dist/entries/workspaces.js +4 -0
- package/dist/entries/workspaces.js.map +1 -0
- package/dist/index.cjs +501 -5192
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +67 -10895
- package/dist/index.d.ts +67 -10895
- package/dist/index.js +100 -5074
- package/dist/index.js.map +1 -1
- package/dist/nodes-C-wrO6Sg.d.ts +1364 -0
- package/dist/nodes-J8ByUN8z.d.cts +1364 -0
- package/dist/studio-productions-DUHvdSvk.d.cts +572 -0
- package/dist/studio-productions-vbCNSbtf.d.ts +572 -0
- package/dist/webhooks-BJawEIz8.d.ts +198 -0
- package/dist/webhooks-Dn_DtNTD.d.cts +198 -0
- package/package.json +253 -3
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
// src/resources/voices.ts
|
|
2
|
+
var VoicesResource = class {
|
|
3
|
+
constructor(client) {
|
|
4
|
+
this.client = client;
|
|
5
|
+
}
|
|
6
|
+
client;
|
|
7
|
+
/**
|
|
8
|
+
* List the premade ElevenLabs voices (`GET /v1/voices`). Falls back to a
|
|
9
|
+
* curated set server-side when no ElevenLabs API key is configured.
|
|
10
|
+
*/
|
|
11
|
+
async list() {
|
|
12
|
+
const res = await this.client.request("GET", "/v1/voices");
|
|
13
|
+
return res.voices;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Search the shared/community Voice Library (`GET /v1/voices/library`). All
|
|
17
|
+
* params are optional and forwarded as a querystring; `undefined` / `null` /
|
|
18
|
+
* empty-string values are omitted so the server defaults apply. `hasMore`
|
|
19
|
+
* drives "load more" pagination.
|
|
20
|
+
*/
|
|
21
|
+
searchLibrary(params = {}) {
|
|
22
|
+
const query = {};
|
|
23
|
+
for (const [k, v] of Object.entries(params)) {
|
|
24
|
+
if (v !== void 0 && v !== null && v !== "") query[k] = v;
|
|
25
|
+
}
|
|
26
|
+
return this.client.request("GET", "/v1/voices/library", { query });
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* List the signed-in user's voice clones (`GET /v1/voice-clones`). The route
|
|
30
|
+
* wraps the rows in `{ voiceClones }`; we unwrap to the bare array.
|
|
31
|
+
*/
|
|
32
|
+
async listClones() {
|
|
33
|
+
const res = await this.client.request("GET", "/v1/voice-clones");
|
|
34
|
+
return res.voiceClones;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* @deprecated Voice cloning is no longer offered on Nodaro (retired
|
|
38
|
+
* 2026-09-15). The route answers `410 voice_cloning_retired` and this call
|
|
39
|
+
* rejects with that error. Clones created before the retirement are still
|
|
40
|
+
* listed by {@link VoicesResource.listClones} and still work as voice ids.
|
|
41
|
+
* For a new custom voice use {@link VoicesResource.design}.
|
|
42
|
+
*/
|
|
43
|
+
createClone(input) {
|
|
44
|
+
return this.client.request("POST", "/v1/voice-clones/from-url", { body: input });
|
|
45
|
+
}
|
|
46
|
+
/** Delete one of the user's voice clones (`DELETE /v1/voice-clones/:id`). */
|
|
47
|
+
async deleteClone(id) {
|
|
48
|
+
await this.client.request("DELETE", `/v1/voice-clones/${encodeURIComponent(id)}`);
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Replace the voice in a recording — or in a whole talking video — with a
|
|
52
|
+
* different voice (`POST /v1/voice-changer`). Pass `audioUrl` to revoice
|
|
53
|
+
* audio→audio, or `videoUrl` to revoice an entire clip (the server demuxes
|
|
54
|
+
* the audio, runs speech-to-speech, and remuxes onto the original video,
|
|
55
|
+
* returning the video plus the new audio track). Exactly one of `audioUrl` /
|
|
56
|
+
* `videoUrl` is required; when both are sent, video wins. `removeBackgroundNoise`
|
|
57
|
+
* off keeps the music/SFX bed under the new voice; on yields a clean voice-only
|
|
58
|
+
* result. Costs credits and runs async — poll `jobs.get(jobId)` for the result
|
|
59
|
+
* (`output_data.videoUrl` + `output_data.audioUrl` in video mode).
|
|
60
|
+
*/
|
|
61
|
+
change(input) {
|
|
62
|
+
return this.client.request("POST", "/v1/voice-changer", { body: input });
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Recast each detected speaker in a multi-speaker recording to a different
|
|
66
|
+
* voice (`POST /v1/voice-changer-pro`). `orderedVoices` maps speaker positions to
|
|
67
|
+
* voices in detection order — speaker 0 → `orderedVoices[0]`, speaker 1 →
|
|
68
|
+
* `orderedVoices[1]`, etc. Speakers beyond the end of `orderedVoices` keep
|
|
69
|
+
* their original voice. Each entry is EITHER a bare voice id (premade name or
|
|
70
|
+
* ElevenLabs UUID) OR a {@link VoiceChangerProVoice} object carrying per-voice
|
|
71
|
+
* ElevenLabs speech-to-speech settings (stability / similarityBoost / style /
|
|
72
|
+
* useSpeakerBoost / `seed`) plus a loudness `volumeMode` (and a manual
|
|
73
|
+
* `volume`) — OR `null`, meaning keep this speaker's original voice (requires
|
|
74
|
+
* a platform running cloud-plugins with keep-slot support). At least one
|
|
75
|
+
* entry must be non-null. A per-voice `seed` makes that speaker's recast
|
|
76
|
+
* reproducible.
|
|
77
|
+
*
|
|
78
|
+
* Pass `audioUrl` for audio-only recast or `videoUrl` to recast the audio
|
|
79
|
+
* track of a video clip (the server demuxes, recasts, and remuxes).
|
|
80
|
+
*
|
|
81
|
+
* Voice and music are ALWAYS separated first — before recasting, the source
|
|
82
|
+
* is split into an isolated vocal stem and a music/SFX stem.
|
|
83
|
+
* `preserveBackground` (default `true`) only controls whether that
|
|
84
|
+
* music/instrumental stem is mixed back under the new voices; set it `false`
|
|
85
|
+
* for a clean voice-only result. `separationQuality` selects the quality of
|
|
86
|
+
* the voice/music separation: `"fast"` (default, quicker — preserves more of
|
|
87
|
+
* the voice) or `"best"` (finer voice/music separation).
|
|
88
|
+
* `removeBackgroundNoise` additionally denoises the result.
|
|
89
|
+
* `musicVolumeMode` sets the level of that preserved background (only relevant
|
|
90
|
+
* when `preserveBackground` is on): `"match"` (default) keeps the original
|
|
91
|
+
* level, `"normalize"` loudnorms it, `"manual"` uses `musicVolume`%.
|
|
92
|
+
* `voiceFx` applies a reverb/echo to the COMBINED recast voices BEFORE the
|
|
93
|
+
* background is mixed back in (effect sits on the voices, not the music bed).
|
|
94
|
+
*
|
|
95
|
+
* Cloud-only — costs credits and runs async; poll `jobs.get(jobId)` for the
|
|
96
|
+
* result (`output_data.videoUrl` + `output_data.audioUrl` in video mode).
|
|
97
|
+
*/
|
|
98
|
+
recast(input) {
|
|
99
|
+
return this.client.request("POST", "/v1/voice-changer-pro", { body: input });
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Detect the speakers in a clip WITHOUT recasting yet
|
|
103
|
+
* (`POST /v1/voice-changer-pro/analyze`) — the first step of the interactive
|
|
104
|
+
* flow. Separates voice from music once and diarizes the vocals, returning the
|
|
105
|
+
* speaker list so a user (or agent) can choose a voice per speaker before
|
|
106
|
+
* committing to a paid recast. Poll `jobs.get(jobId)`: the completed job's
|
|
107
|
+
* `output_data` carries the separated stem urls + the detected `speakers`
|
|
108
|
+
* (each with `id`, time `segments`, `firstStartSec`, `wordCount`, `snippet`)
|
|
109
|
+
* and the detected language — reshape it into a {@link VcpAnalysis} and pass it
|
|
110
|
+
* as `recast({ ..., analysis })` to skip re-detection. With `suggestTitle`,
|
|
111
|
+
* `output_data.suggestedTitle` also carries an LLM-proposed title.
|
|
112
|
+
*
|
|
113
|
+
* Cloud-only; costs credits and runs async.
|
|
114
|
+
*/
|
|
115
|
+
analyze(input) {
|
|
116
|
+
return this.client.request("POST", "/v1/voice-changer-pro/analyze", { body: input });
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Render a final video from a mixed set of stems
|
|
120
|
+
* (`POST /v1/voice-changer-pro/export`) — the last step of the interactive
|
|
121
|
+
* flow. After `recast({ output: "stems" })` hands back the dry per-track stems
|
|
122
|
+
* and the user has set levels / mutes / an effect in your editor, pass those
|
|
123
|
+
* `tracks` (plus the source `videoUrl`) here to mix and remux into the finished
|
|
124
|
+
* video. The video is stream-copied (never re-encoded), so the export is
|
|
125
|
+
* bit-identical to your preview. At least one track must be un-muted (all-muted
|
|
126
|
+
* is a 400); `voiceFx` is applied to the voice tracks at render time.
|
|
127
|
+
*
|
|
128
|
+
* Cloud-only; costs credits and runs async — poll `jobs.get(jobId)` for the
|
|
129
|
+
* result (`output_data.videoUrl`).
|
|
130
|
+
*/
|
|
131
|
+
exportMix(input) {
|
|
132
|
+
return this.client.request("POST", "/v1/voice-changer-pro/export", { body: input });
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Design a brand-new synthetic voice from a text description
|
|
136
|
+
* (`POST /v1/voice-design`) — ElevenLabs text-to-voice. `text` (100–1000 chars)
|
|
137
|
+
* is a preview line spoken in the designed voice; `voiceDescription` describes
|
|
138
|
+
* the voice to create. Costs credits and runs async — poll `jobs.get(jobId)`
|
|
139
|
+
* for the preview + the reusable voice id.
|
|
140
|
+
*/
|
|
141
|
+
design(input) {
|
|
142
|
+
return this.client.request("POST", "/v1/voice-design", { body: input });
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Generate speech in a voice described in natural language, without cloning
|
|
146
|
+
* (`POST /v1/voice-remix`). `text` (1–5000 chars) is spoken in a voice matching
|
|
147
|
+
* `voiceDescription`. Costs credits and runs async — poll `jobs.get(jobId)`.
|
|
148
|
+
*/
|
|
149
|
+
remix(input) {
|
|
150
|
+
return this.client.request("POST", "/v1/voice-remix", { body: input });
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Dub an audio clip into another language while preserving each speaker's voice
|
|
154
|
+
* (`POST /v1/dubbing`). `targetLanguage` is an ISO code (e.g. `"es"`, `"fr"`);
|
|
155
|
+
* `sourceLanguage` is auto-detected when omitted. Costs credits and runs async
|
|
156
|
+
* — poll `jobs.get(jobId)`.
|
|
157
|
+
*/
|
|
158
|
+
dub(input) {
|
|
159
|
+
return this.client.request("POST", "/v1/dubbing", { body: input });
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Voice a multi-speaker script as ONE audio file
|
|
163
|
+
* (`POST /v1/text-to-dialogue`) on ElevenLabs Dialogue v3 — the default — or
|
|
164
|
+
* Dialogue v4 (`provider: "elevenlabs-dialogue-v4"`). Each `dialogue` line is
|
|
165
|
+
* `{ text, voice }` in speaking order — `voice` is a premade voice name or an
|
|
166
|
+
* ElevenLabs voice UUID (cloned/library voices work too; mixed casts are
|
|
167
|
+
* fine). At most 5,000 characters total across lines on Dialogue v3 and
|
|
168
|
+
* 10,000 on Dialogue v4 (≤2,000 recommended for best quality) and 10 unique
|
|
169
|
+
* voices. Line text may
|
|
170
|
+
* carry `[audio tags]` like `[laughs]`. Costs credits and runs async — poll
|
|
171
|
+
* `jobs.get(jobId)` for `output_data.audioUrl` and — on every dialogue model,
|
|
172
|
+
* since both return timings at no extra credits — `output_data.transcript`, a
|
|
173
|
+
* `Transcript` (`@nodaro/shared`): `words[]` with `startMs` / `endMs` /
|
|
174
|
+
* `speaker` and one `segments[]` entry per line, `speaker` being the line's
|
|
175
|
+
* `voice` as you sent it. Pass `transcript.words` to
|
|
176
|
+
* `addCaptions({ captions, autoTranscribe: false })` to caption the dialogue
|
|
177
|
+
* without a second transcription.
|
|
178
|
+
*/
|
|
179
|
+
textToDialogue(input) {
|
|
180
|
+
return this.client.request("POST", "/v1/text-to-dialogue", { body: input });
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* @deprecated Voice cloning is no longer offered on Nodaro (retired
|
|
184
|
+
* 2026-09-15). The route answers `410 voice_cloning_retired` and this call
|
|
185
|
+
* rejects with that error. See {@link VoicesResource.createClone}.
|
|
186
|
+
*/
|
|
187
|
+
createCloneFromFile(input) {
|
|
188
|
+
const form = new FormData();
|
|
189
|
+
form.append("name", input.name);
|
|
190
|
+
const blob = input.file instanceof Blob ? input.file : new Blob([input.file], { type: input.contentType ?? "audio/mpeg" });
|
|
191
|
+
form.append("file", blob, input.filename ?? "sample");
|
|
192
|
+
return this.client.request("POST", "/v1/voice-clones", { body: form });
|
|
193
|
+
}
|
|
194
|
+
};
|
|
195
|
+
|
|
196
|
+
export { VoicesResource };
|
|
197
|
+
//# sourceMappingURL=chunk-T7N7DFQJ.js.map
|
|
198
|
+
//# sourceMappingURL=chunk-T7N7DFQJ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/resources/voices.ts"],"names":[],"mappings":"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","file":"chunk-T7N7DFQJ.js","sourcesContent":["import type { Voice, VoiceClone, VoiceLibraryParams, VoiceLibraryResponse } from \"@nodaro/shared/pipeline\"\nimport type { AudioFxPreset } from \"@nodaro/shared/media\"\nimport type { DialogueProvider } from \"@nodaro/shared/models\"\nexport type { Voice, SharedVoice, VoiceClone, VoiceLibraryParams, VoiceLibraryResponse } from \"@nodaro/shared/pipeline\"\nexport type { AudioFxPreset } from \"@nodaro/shared/media\"\nimport type { NodaroClientCore } from \"../core.js\"\n\n/**\n * Re-export the shared voice types so SDK consumers don't have to add\n * `@nodaro/shared` as a second dependency just to type a `Voice` row, a\n * `VoiceClone`, or a `searchLibrary` call. Single source of truth lives in\n * `@nodaro/shared`.\n */\n/** Audio-FX preset union (reverb spaces / telephone / megaphone / echo / custom) — used by {@link VoiceChangerProInput.voiceFx}. */\n\n/**\n * Read access to ElevenLabs voices: the premade catalog plus the shared\n * community Voice Library (both public GETs, no body), and the signed-in\n * user's own pre-retirement voice clones (list / delete).\n */\nexport class VoicesResource {\n constructor(private client: NodaroClientCore) {}\n\n /**\n * List the premade ElevenLabs voices (`GET /v1/voices`). Falls back to a\n * curated set server-side when no ElevenLabs API key is configured.\n */\n async list(): Promise<Voice[]> {\n const res = await this.client.request<{ voices: Voice[] }>(\"GET\", \"/v1/voices\")\n return res.voices\n }\n\n /**\n * Search the shared/community Voice Library (`GET /v1/voices/library`). All\n * params are optional and forwarded as a querystring; `undefined` / `null` /\n * empty-string values are omitted so the server defaults apply. `hasMore`\n * drives \"load more\" pagination.\n */\n searchLibrary(params: VoiceLibraryParams = {}): Promise<VoiceLibraryResponse> {\n const query: Record<string, string | number | boolean | undefined> = {}\n for (const [k, v] of Object.entries(params)) {\n if (v !== undefined && v !== null && v !== \"\") query[k] = v as string | number | boolean\n }\n return this.client.request(\"GET\", \"/v1/voices/library\", { query })\n }\n\n /**\n * List the signed-in user's voice clones (`GET /v1/voice-clones`). The route\n * wraps the rows in `{ voiceClones }`; we unwrap to the bare array.\n */\n async listClones(): Promise<VoiceClone[]> {\n const res = await this.client.request<{ voiceClones: VoiceClone[] }>(\"GET\", \"/v1/voice-clones\")\n return res.voiceClones\n }\n\n /**\n * @deprecated Voice cloning is no longer offered on Nodaro (retired\n * 2026-09-15). The route answers `410 voice_cloning_retired` and this call\n * rejects with that error. Clones created before the retirement are still\n * listed by {@link VoicesResource.listClones} and still work as voice ids.\n * For a new custom voice use {@link VoicesResource.design}.\n */\n createClone(input: { name: string; audioUrl: string }): Promise<VoiceClone> {\n return this.client.request<VoiceClone>(\"POST\", \"/v1/voice-clones/from-url\", { body: input })\n }\n\n /** Delete one of the user's voice clones (`DELETE /v1/voice-clones/:id`). */\n async deleteClone(id: string): Promise<void> {\n await this.client.request<void>(\"DELETE\", `/v1/voice-clones/${encodeURIComponent(id)}`)\n }\n\n /**\n * Replace the voice in a recording — or in a whole talking video — with a\n * different voice (`POST /v1/voice-changer`). Pass `audioUrl` to revoice\n * audio→audio, or `videoUrl` to revoice an entire clip (the server demuxes\n * the audio, runs speech-to-speech, and remuxes onto the original video,\n * returning the video plus the new audio track). Exactly one of `audioUrl` /\n * `videoUrl` is required; when both are sent, video wins. `removeBackgroundNoise`\n * off keeps the music/SFX bed under the new voice; on yields a clean voice-only\n * result. Costs credits and runs async — poll `jobs.get(jobId)` for the result\n * (`output_data.videoUrl` + `output_data.audioUrl` in video mode).\n */\n change(input: {\n voiceId: string\n audioUrl?: string\n videoUrl?: string\n /** Speech-to-speech model id. Defaults to the server-configured default when omitted. */\n model?: string\n stability?: number\n similarityBoost?: number\n /** Style exaggeration (0–1). Default 0; >0 amplifies delivery at the cost of latency/stability. */\n style?: number\n /** ElevenLabs speaker boost — sharpens fidelity to the target speaker (small latency cost). */\n useSpeakerBoost?: boolean\n /** Deterministic speech-to-speech seed (integer 0–4294967295) for reproducible output. Omit for random. */\n seed?: number\n removeBackgroundNoise?: boolean\n }): Promise<{ jobId: string }> {\n return this.client.request<{ jobId: string }>(\"POST\", \"/v1/voice-changer\", { body: input })\n }\n\n /**\n * Recast each detected speaker in a multi-speaker recording to a different\n * voice (`POST /v1/voice-changer-pro`). `orderedVoices` maps speaker positions to\n * voices in detection order — speaker 0 → `orderedVoices[0]`, speaker 1 →\n * `orderedVoices[1]`, etc. Speakers beyond the end of `orderedVoices` keep\n * their original voice. Each entry is EITHER a bare voice id (premade name or\n * ElevenLabs UUID) OR a {@link VoiceChangerProVoice} object carrying per-voice\n * ElevenLabs speech-to-speech settings (stability / similarityBoost / style /\n * useSpeakerBoost / `seed`) plus a loudness `volumeMode` (and a manual\n * `volume`) — OR `null`, meaning keep this speaker's original voice (requires\n * a platform running cloud-plugins with keep-slot support). At least one\n * entry must be non-null. A per-voice `seed` makes that speaker's recast\n * reproducible.\n *\n * Pass `audioUrl` for audio-only recast or `videoUrl` to recast the audio\n * track of a video clip (the server demuxes, recasts, and remuxes).\n *\n * Voice and music are ALWAYS separated first — before recasting, the source\n * is split into an isolated vocal stem and a music/SFX stem.\n * `preserveBackground` (default `true`) only controls whether that\n * music/instrumental stem is mixed back under the new voices; set it `false`\n * for a clean voice-only result. `separationQuality` selects the quality of\n * the voice/music separation: `\"fast\"` (default, quicker — preserves more of\n * the voice) or `\"best\"` (finer voice/music separation).\n * `removeBackgroundNoise` additionally denoises the result.\n * `musicVolumeMode` sets the level of that preserved background (only relevant\n * when `preserveBackground` is on): `\"match\"` (default) keeps the original\n * level, `\"normalize\"` loudnorms it, `\"manual\"` uses `musicVolume`%.\n * `voiceFx` applies a reverb/echo to the COMBINED recast voices BEFORE the\n * background is mixed back in (effect sits on the voices, not the music bed).\n *\n * Cloud-only — costs credits and runs async; poll `jobs.get(jobId)` for the\n * result (`output_data.videoUrl` + `output_data.audioUrl` in video mode).\n */\n recast(input: VoiceChangerProInput): Promise<{ jobId: string }> {\n return this.client.request<{ jobId: string }>(\"POST\", \"/v1/voice-changer-pro\", { body: input })\n }\n\n /**\n * Detect the speakers in a clip WITHOUT recasting yet\n * (`POST /v1/voice-changer-pro/analyze`) — the first step of the interactive\n * flow. Separates voice from music once and diarizes the vocals, returning the\n * speaker list so a user (or agent) can choose a voice per speaker before\n * committing to a paid recast. Poll `jobs.get(jobId)`: the completed job's\n * `output_data` carries the separated stem urls + the detected `speakers`\n * (each with `id`, time `segments`, `firstStartSec`, `wordCount`, `snippet`)\n * and the detected language — reshape it into a {@link VcpAnalysis} and pass it\n * as `recast({ ..., analysis })` to skip re-detection. With `suggestTitle`,\n * `output_data.suggestedTitle` also carries an LLM-proposed title.\n *\n * Cloud-only; costs credits and runs async.\n */\n analyze(input: VcpAnalyzeInput): Promise<{ jobId: string }> {\n return this.client.request<{ jobId: string }>(\"POST\", \"/v1/voice-changer-pro/analyze\", { body: input })\n }\n\n /**\n * Render a final video from a mixed set of stems\n * (`POST /v1/voice-changer-pro/export`) — the last step of the interactive\n * flow. After `recast({ output: \"stems\" })` hands back the dry per-track stems\n * and the user has set levels / mutes / an effect in your editor, pass those\n * `tracks` (plus the source `videoUrl`) here to mix and remux into the finished\n * video. The video is stream-copied (never re-encoded), so the export is\n * bit-identical to your preview. At least one track must be un-muted (all-muted\n * is a 400); `voiceFx` is applied to the voice tracks at render time.\n *\n * Cloud-only; costs credits and runs async — poll `jobs.get(jobId)` for the\n * result (`output_data.videoUrl`).\n */\n exportMix(input: VcpExportInput): Promise<{ jobId: string }> {\n return this.client.request<{ jobId: string }>(\"POST\", \"/v1/voice-changer-pro/export\", { body: input })\n }\n\n /**\n * Design a brand-new synthetic voice from a text description\n * (`POST /v1/voice-design`) — ElevenLabs text-to-voice. `text` (100–1000 chars)\n * is a preview line spoken in the designed voice; `voiceDescription` describes\n * the voice to create. Costs credits and runs async — poll `jobs.get(jobId)`\n * for the preview + the reusable voice id.\n */\n design(input: VoiceDesignInput): Promise<{ jobId: string }> {\n return this.client.request<{ jobId: string }>(\"POST\", \"/v1/voice-design\", { body: input })\n }\n\n /**\n * Generate speech in a voice described in natural language, without cloning\n * (`POST /v1/voice-remix`). `text` (1–5000 chars) is spoken in a voice matching\n * `voiceDescription`. Costs credits and runs async — poll `jobs.get(jobId)`.\n */\n remix(input: VoiceRemixInput): Promise<{ jobId: string }> {\n return this.client.request<{ jobId: string }>(\"POST\", \"/v1/voice-remix\", { body: input })\n }\n\n /**\n * Dub an audio clip into another language while preserving each speaker's voice\n * (`POST /v1/dubbing`). `targetLanguage` is an ISO code (e.g. `\"es\"`, `\"fr\"`);\n * `sourceLanguage` is auto-detected when omitted. Costs credits and runs async\n * — poll `jobs.get(jobId)`.\n */\n dub(input: DubbingInput): Promise<{ jobId: string }> {\n return this.client.request<{ jobId: string }>(\"POST\", \"/v1/dubbing\", { body: input })\n }\n\n /**\n * Voice a multi-speaker script as ONE audio file\n * (`POST /v1/text-to-dialogue`) on ElevenLabs Dialogue v3 — the default — or\n * Dialogue v4 (`provider: \"elevenlabs-dialogue-v4\"`). Each `dialogue` line is\n * `{ text, voice }` in speaking order — `voice` is a premade voice name or an\n * ElevenLabs voice UUID (cloned/library voices work too; mixed casts are\n * fine). At most 5,000 characters total across lines on Dialogue v3 and\n * 10,000 on Dialogue v4 (≤2,000 recommended for best quality) and 10 unique\n * voices. Line text may\n * carry `[audio tags]` like `[laughs]`. Costs credits and runs async — poll\n * `jobs.get(jobId)` for `output_data.audioUrl` and — on every dialogue model,\n * since both return timings at no extra credits — `output_data.transcript`, a\n * `Transcript` (`@nodaro/shared`): `words[]` with `startMs` / `endMs` /\n * `speaker` and one `segments[]` entry per line, `speaker` being the line's\n * `voice` as you sent it. Pass `transcript.words` to\n * `addCaptions({ captions, autoTranscribe: false })` to caption the dialogue\n * without a second transcription.\n */\n textToDialogue(input: {\n dialogue: Array<{ text: string; voice: string }>\n /** Dialogue model: `\"elevenlabs-dialogue\"` (v3, the default) or `\"elevenlabs-dialogue-v4\"`. */\n provider?: DialogueProvider\n /** v3: exactly 0, 0.5 or 1 (0 = most variable, 1 = most stable). v4: any value 0–1. */\n stability?: number\n /** v4 only (v3 ignores it): how closely each line keeps its voice's character, 0–1. */\n similarityBoost?: number\n /** ISO 639-1 language hint (e.g. \"en\"); auto-detected when omitted. */\n languageCode?: string\n /** Deterministic sampling seed (integer 0–4294967295). Omit for random. */\n seed?: number\n /** Spell out numbers/dates/abbreviations: \"auto\" (default) | \"on\" | \"off\". */\n applyTextNormalization?: \"auto\" | \"on\" | \"off\"\n }): Promise<{ jobId: string }> {\n return this.client.request<{ jobId: string }>(\"POST\", \"/v1/text-to-dialogue\", { body: input })\n }\n\n /**\n * @deprecated Voice cloning is no longer offered on Nodaro (retired\n * 2026-09-15). The route answers `410 voice_cloning_retired` and this call\n * rejects with that error. See {@link VoicesResource.createClone}.\n */\n createCloneFromFile(input: {\n name: string\n file: Blob | Uint8Array | ArrayBuffer\n /** File name for the upload part (default `sample`). */\n filename?: string\n /** MIME type when `file` is a raw buffer (default `audio/mpeg`). */\n contentType?: string\n }): Promise<VoiceClone> {\n const form = new FormData()\n // Append the name field BEFORE the file so the route sees it in `fields`\n // (fastify-multipart's `req.file()` exposes fields parsed up to the file).\n form.append(\"name\", input.name)\n const blob =\n input.file instanceof Blob\n ? input.file\n : new Blob([input.file as BlobPart], { type: input.contentType ?? \"audio/mpeg\" })\n form.append(\"file\", blob, input.filename ?? \"sample\")\n return this.client.request<VoiceClone>(\"POST\", \"/v1/voice-clones\", { body: form })\n }\n}\n\n/**\n * One entry in {@link VoiceChangerProInput.orderedVoices}. Either a bare voice id\n * (premade name like `\"Rachel\"` or an ElevenLabs UUID for a custom clone), or\n * an object pinning per-voice speech-to-speech settings and the recast's\n * loudness behaviour for that speaker.\n */\nexport type VoiceChangerProVoice =\n | string\n | {\n /** Target voice — premade name (`\"Rachel\"`, `\"Aria\"`, …) or an ElevenLabs UUID for a custom clone. */\n voiceId: string\n /**\n * Which lane converts this speaker. `\"sts\"` (default) is the classic\n * speech-to-speech recast; `\"v3\"` and `\"v4\"` are RE-SPEAK — the\n * performance is REGENERATED from the transcript (supports `[audio\n * tags]`; original delivery is replaced, and lips won't match on video).\n * A Re-speak speaker needs transcript text: pass an `analysis` whose\n * `segments[].text` carries it (analyze now emits this), or omit\n * `analysis` and the engine re-speaks from its own transcription. For\n * `\"v3\"` (eleven_v3), `stability` accepts exactly 0 / 0.5 / 1, and\n * `similarityBoost` / `style` / `useSpeakerBoost` are ignored. For\n * `\"v4\"` (eleven_v4), `stability` takes any value 0–1 and\n * `similarityBoost` is honoured (`style` / `useSpeakerBoost` ignored);\n * each line is generated with its neighbouring lines as context for\n * smoother joins. Both Re-speak engines are priced the same, per started\n * 1,000 characters.\n */\n engine?: \"sts\" | \"v3\" | \"v4\"\n /** ElevenLabs stability (0–1). Higher = steadier, lower = more expressive. */\n stability?: number\n /** ElevenLabs similarity boost (0–1) — how closely the output hugs the target voice's timbre. */\n similarityBoost?: number\n /** Style exaggeration (0–1). Default 0; >0 amplifies delivery at the cost of latency / stability. */\n style?: number\n /** ElevenLabs speaker boost — sharpens fidelity to the target speaker. */\n useSpeakerBoost?: boolean\n /**\n * Deterministic speech-to-speech seed (integer 0–4294967295) for\n * reproducible per-voice output — the same source + settings + seed\n * recast this speaker identically across runs. Omit for a random seed.\n */\n seed?: number\n /**\n * Loudness handling for this recast voice. `\"match\"` (default) matches the\n * original speaker's loudness; `\"normalize\"` applies loudness\n * normalization; `\"manual\"` uses `volume` as a percentage.\n */\n volumeMode?: \"match\" | \"normalize\" | \"manual\"\n /** Manual output volume as a percentage (0–200). Consulted only when `volumeMode === \"manual\"`. */\n volume?: number\n }\n\n/** Input for {@link VoicesResource.recast}. */\nexport interface VoiceChangerProInput {\n /** URL of an audio file to recast (audio → audio). Exactly one of `audioUrl` / `videoUrl` is required. */\n audioUrl?: string\n /** URL of a video file to recast (the audio track is recast and remuxed). Exactly one of `audioUrl` / `videoUrl` is required. */\n videoUrl?: string\n /**\n * Voices in speaker-detection order. Speaker N is mapped to `orderedVoices[N]`;\n * speakers beyond the array keep their original voice. Each entry is a bare\n * voice id OR a {@link VoiceChangerProVoice} object with per-voice settings —\n * OR `null`, meaning keep this speaker's original voice (requires a platform\n * running cloud-plugins with keep-slot support). At least one entry must be\n * non-null.\n */\n orderedVoices: Array<VoiceChangerProVoice | null>\n /** Model to use for speech-to-speech. Defaults to the server-configured default when omitted. */\n model?: string\n /**\n * Mix the separated music / SFX stem back under the recast voices. Default\n * `true`. The voice is ALWAYS split out before recasting regardless of this\n * flag — `false` simply drops the music for a clean voice-only result.\n */\n preserveBackground?: boolean\n /**\n * Quality of the voice/music separation. `\"fast\"` (default, quicker —\n * preserves more of the voice) or `\"best\"` (finer voice/music separation).\n */\n separationQuality?: \"fast\" | \"best\"\n /** Strip background noise for a clean voice-only result. */\n removeBackgroundNoise?: boolean\n /**\n * Level of the preserved background music / SFX stem in the final mix. Only\n * relevant when `preserveBackground` is on (otherwise there is no background to\n * level). `\"match\"` (default) leaves the separated instrumental at its original\n * level; `\"normalize\"` applies loudness normalization; `\"manual\"` sets its\n * level to `musicVolume`%.\n */\n musicVolumeMode?: \"match\" | \"normalize\" | \"manual\"\n /** Background music level as a percentage (0–200). Consulted only when `musicVolumeMode === \"manual\"`. */\n musicVolume?: number\n /**\n * Node-level reverb/echo applied to the COMBINED recast voices **before** the\n * background is mixed back in (so the effect sits on the voices only, not the\n * music/SFX bed). Reverb presets (`room`, `hall`, `church`, …) use\n * `wetDryMix`; the `echo` / `custom` presets use `delayMs` + `decay`. Omit for\n * no effect.\n */\n voiceFx?: {\n /** Effect preset — reverb space, `telephone`, `megaphone`, `echo`, or `custom`. */\n preset: AudioFxPreset\n /** Reverb wet/dry mix as a percentage (0–100). Higher = wetter (more reverb). */\n wetDryMix?: number\n /** Echo delay in milliseconds (20–2000). Used by the `echo` / `custom` presets. */\n delayMs?: number\n /** Echo decay / feedback (0–1). Higher = more repeats. Used by the `echo` / `custom` presets. */\n decay?: number\n }\n /**\n * Output mode. `\"video\"` (default) mixes the recast voices with the preserved\n * background and returns a finished merged video. `\"stems\"` returns the dry,\n * unleveled per-track stems instead (rendering nothing) so you can drive an\n * INTERACTIVE mix — adjust levels/mutes/effect in your own UI, then render the\n * final video with {@link VoicesResource.exportMix}. This is how an app builds\n * a full editor around VCP rather than a one-shot recast.\n */\n output?: \"video\" | \"stems\"\n /**\n * A prior {@link VoicesResource.analyze} result. Pass it to SKIP re-detection:\n * the recast reuses the already-separated stems and speaker segments instead of\n * running separation + diarization again. This is the fast-path for the\n * detect → pick voices → recast interactive flow (analyze once, recast N times\n * as the user tweaks voice assignments). Omit to auto-detect from the source.\n */\n analysis?: VcpAnalysis\n}\n\n/** One detected speaker in a {@link VcpAnalysis} (from `analyze`). */\nexport interface VcpAnalysisSpeaker {\n /** Stable speaker id (first-appearance order). */\n id: string\n /** The speaker's spoken time ranges (seconds). `text` is what was said in\n * the range — the paid input for a Re-speak speaker (`engine: \"v3\"` or\n * `\"v4\"`; editable before conversion); the STS lane ignores it. */\n segments: Array<{ start: number; end: number; text?: string }>\n /** When the speaker first speaks (seconds). */\n firstStartSec?: number\n /** Rough word count across the clip — a proxy for how much this speaker says. */\n wordCount?: number\n /** The first few transcribed words, to help a user tell speakers apart. */\n snippet?: string\n}\n\n/**\n * The result of {@link VoicesResource.analyze}, reshaped to pass back into\n * {@link VoiceChangerProInput.analysis}. Read a completed analyze job's\n * `output_data` into this shape (it carries the separated stem urls + the\n * detected speakers) and thread it into `recast` to skip re-detection.\n */\nexport interface VcpAnalysis {\n /** URL of the isolated vocal stem. */\n vocalsUrl: string\n /** URL of the separated music/SFX stem (absent when the source had none). */\n backgroundUrl?: string\n /** The detected speakers, in first-appearance order. */\n speakers: VcpAnalysisSpeaker[]\n /** Scribe's detected language code, round-tripped so the recast auto-selects the STS model. */\n languageCode?: string\n /** Confidence (0–1) of {@link VcpAnalysis.languageCode}. */\n languageProbability?: number\n}\n\n/** Input for {@link VoicesResource.analyze}. */\nexport interface VcpAnalyzeInput {\n /** URL of an audio file to analyze. Exactly one of `audioUrl` / `videoUrl` is required. */\n audioUrl?: string\n /** URL of a video file to analyze (its audio track is used). Exactly one of `audioUrl` / `videoUrl` is required. */\n videoUrl?: string\n /** Quality of the voice/music separation run before diarization: `\"fast\"` (default) or `\"best\"`. */\n separationQuality?: \"fast\" | \"best\"\n /** Also suggest a conversion title from the transcript (returned on the job's `output_data.suggestedTitle`). */\n suggestTitle?: boolean\n}\n\n/** One track in a {@link VcpExportInput} mix. */\nexport interface VcpExportTrack {\n /** URL of the stem for this lane (a recast voice stem or the background stem). */\n url: string\n /** Fader position as a percentage: 0 = silent, 100 = unity, 200 = +6dB. */\n gain: number\n /** Whether this lane is muted in the mix. */\n muted: boolean\n /**\n * Which bucket the track is in, and so whether `voiceFx` lands on it. Defaults\n * to `\"voice\"`. Set `\"background\"` for the music/SFX lane (the effect never\n * touches it).\n */\n kind?: \"voice\" | \"background\"\n}\n\n/** Input for {@link VoicesResource.exportMix}. */\nexport interface VcpExportInput {\n /** The source video to remux the mixed audio onto (stream-copied — never re-encoded). */\n videoUrl: string\n /** The mix: one entry per lane. At least one must be un-muted (all-muted is a 400). Max 16 tracks. */\n tracks: VcpExportTrack[]\n /**\n * A reverb/echo applied to the VOICE tracks only (not `\"background\"` lanes)\n * at render time — so iterating the effect in your editor is free until you\n * export. Same shape as {@link VoiceChangerProInput.voiceFx}.\n */\n voiceFx?: VoiceChangerProInput[\"voiceFx\"]\n}\n\n/** Input for {@link VoicesResource.design}. */\nexport interface VoiceDesignInput {\n /** A preview line (100–1000 chars) spoken in the designed voice. */\n text: string\n /** Natural-language description of the voice to create. */\n voiceDescription: string\n /** Voice-design model id. Defaults to the server-configured default. */\n model?: string\n /** Output loudness (-1..1). */\n loudness?: number\n /** How strongly the description steers the design (0–100). */\n guidanceScale?: number\n /** Deterministic seed for a reproducible design. */\n seed?: number\n /** Design quality knob (provider-specific). */\n quality?: number\n /** Enhance the generated voice. */\n shouldEnhance?: boolean\n /** Optional extra prompt context (≤8000 chars). */\n userPrompt?: string\n}\n\n/** Input for {@link VoicesResource.remix}. */\nexport interface VoiceRemixInput {\n /** The text (1–5000 chars) to speak in the described voice. */\n text: string\n /** Natural-language description of the voice to speak in. */\n voiceDescription: string\n /** Optional extra prompt context (≤8000 chars). */\n userPrompt?: string\n}\n\n/** Input for {@link VoicesResource.dub}. Provide exactly ONE source:\n * `audioUrl` (dubbed audio out), `videoUrl` (the dubbed VIDEO out, plus the\n * dubbed audio track as `output_data.audioUrl`), or `sourceUrl` (a public\n * YouTube/TikTok/direct link ElevenLabs fetches itself). Priced per minute\n * of the dubbed span; the span is capped at 30 minutes — use\n * `startTime`/`endTime` to dub part of a longer source. */\nexport interface DubbingInput {\n /** URL of the audio to dub (audio mode). */\n audioUrl?: string\n /** URL of the video to dub — the result is the dubbed VIDEO (+ audio track). */\n videoUrl?: string\n /** Public page/media URL (YouTube, TikTok, or a direct link) — ElevenLabs fetches it directly. */\n sourceUrl?: string\n /** Target language ISO code (2–10 chars), e.g. `\"es\"`, `\"pt-BR\"`. */\n targetLanguage: string\n /** Source language ISO code; auto-detected when omitted. */\n sourceLanguage?: string\n /** Expected number of speakers (1–20; 0 = auto-detect) — improves separation when known. */\n numSpeakers?: number\n /** Keep the original voices instead of cloning them into the target language. */\n disableVoiceCloning?: boolean\n /** Drop the background/music bed from the dubbed output. */\n dropBackgroundAudio?: boolean\n /** Dub only this window of the source (seconds). */\n startTime?: number\n endTime?: number\n /** Keep the source resolution on video dubs (slower render). */\n highestResolution?: boolean\n useProfanityFilter?: boolean\n /** Experimental: steer dubbed voices toward an accent. */\n targetAccent?: string\n /** Apply ElevenLabs' own watermark to video dubs. */\n watermark?: boolean\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"chunk-TRCENAIY.cjs"}
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
export { LOCATION_ASSET_TYPES, LOCATION_ATTACH_COLUMNS, SURROUND_DIRECTIONS } from '@nodaro/shared/entities';
|
|
2
|
+
|
|
3
|
+
// src/resources/locations.ts
|
|
4
|
+
var LocationsResource = class {
|
|
5
|
+
constructor(client) {
|
|
6
|
+
this.client = client;
|
|
7
|
+
}
|
|
8
|
+
client;
|
|
9
|
+
/**
|
|
10
|
+
* List the caller's locations. By default returns active locations only;
|
|
11
|
+
* pass `archived: true` to fetch soft-deleted rows for an "archive" view,
|
|
12
|
+
* and `q` to keep the ones whose name or description contains it.
|
|
13
|
+
*/
|
|
14
|
+
list(params = {}) {
|
|
15
|
+
const query = {};
|
|
16
|
+
if (params.archived) query.archived = "true";
|
|
17
|
+
if (params.q) query.q = params.q;
|
|
18
|
+
if (params.limit !== void 0) query.limit = String(params.limit);
|
|
19
|
+
if (params.cursor) query.cursor = params.cursor;
|
|
20
|
+
return this.client.request("GET", "/v1/locations", { query });
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Convenience wrapper for `list({ archived: true })`. Returns soft-deleted
|
|
24
|
+
* rows so callers can drive a UI "Archived" tab without re-encoding the
|
|
25
|
+
* query param. Mirrors `ObjectsResource.listArchived`.
|
|
26
|
+
*
|
|
27
|
+
* `archived` is omitted from the param type — it's always set to `true` here.
|
|
28
|
+
*/
|
|
29
|
+
listArchived(params = {}) {
|
|
30
|
+
return this.list({ ...params, archived: true });
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Fetch a single location including in-flight asset job state. Soft-deleted
|
|
34
|
+
* (archived) rows are returned by id intentionally so canvas nodes that
|
|
35
|
+
* hold a stale `locationDbId` keep loading.
|
|
36
|
+
*/
|
|
37
|
+
async get(id) {
|
|
38
|
+
const res = await this.client.request(
|
|
39
|
+
"GET",
|
|
40
|
+
`/v1/locations/${encodeURIComponent(id)}`
|
|
41
|
+
);
|
|
42
|
+
return { ...res, canonicalDescription: res.canonicalDescription || null };
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Create a new location. `name` + `nodeId` are required — the route 400s
|
|
46
|
+
* otherwise. Returns the new row's id.
|
|
47
|
+
*
|
|
48
|
+
* Note: the underlying route is the same `POST /v1/locations` upsert that
|
|
49
|
+
* powers `update()`. This convenience wrapper enforces the INSERT-required
|
|
50
|
+
* fields at the type level and never sends an `id`.
|
|
51
|
+
*/
|
|
52
|
+
create(data) {
|
|
53
|
+
return this.client.request("POST", "/v1/locations", { body: data });
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Update a location. Only the fields you pass are written — undefined keys
|
|
57
|
+
* are NOT touched on the row. Worker-owned asset buckets are intentionally
|
|
58
|
+
* not exposed on this surface (see `UpdateLocationInput` for the rationale).
|
|
59
|
+
*
|
|
60
|
+
* Optimistic-concurrency: pass `expectedUpdatedAt` to require the row's
|
|
61
|
+
* `updated_at` still matches; on mismatch the route returns 409
|
|
62
|
+
* `concurrent_modification`. The SDK surfaces that as a generic
|
|
63
|
+
* `NodaroError` with the same code.
|
|
64
|
+
*/
|
|
65
|
+
update(id, data) {
|
|
66
|
+
return this.client.request("POST", "/v1/locations", {
|
|
67
|
+
body: { id, ...data }
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Soft-delete (archive) a location. The row is hidden from `list()` by
|
|
72
|
+
* default but still loadable via `get(id)` so canvas nodes pointing at it
|
|
73
|
+
* keep working. Restore with `restore(id)`.
|
|
74
|
+
*/
|
|
75
|
+
delete(id) {
|
|
76
|
+
return this.client.request("DELETE", `/v1/locations/${encodeURIComponent(id)}`);
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Un-archive a location. If the original name now collides (case-
|
|
80
|
+
* insensitive) with an active row, the server auto-suffixes "(restored)"
|
|
81
|
+
* and returns the effective name.
|
|
82
|
+
*/
|
|
83
|
+
restore(id) {
|
|
84
|
+
return this.client.request("POST", `/v1/locations/${encodeURIComponent(id)}/restore`);
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Fire `POST /v1/generate-location` to produce one or more candidate main
|
|
88
|
+
* images. With `count > 1`, all jobs are reserved up-front before any
|
|
89
|
+
* is enqueued — mid-batch failures roll back atomically.
|
|
90
|
+
*
|
|
91
|
+
* When `attachToLocationId` is set AND `count === 1`, the worker writes
|
|
92
|
+
* the result directly to the row's `source_image_url`; otherwise you must
|
|
93
|
+
* call `approveMainImage()` after picking a candidate.
|
|
94
|
+
*/
|
|
95
|
+
async generate(data) {
|
|
96
|
+
const res = await this.client.request(
|
|
97
|
+
"POST",
|
|
98
|
+
"/v1/generate-location",
|
|
99
|
+
{ body: data }
|
|
100
|
+
);
|
|
101
|
+
const jobIds = res.jobIds ?? (res.jobId ? [res.jobId] : []);
|
|
102
|
+
return res.jobId ? { jobIds, jobId: res.jobId } : { jobIds };
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Fire `POST /v1/generate-location-asset` to produce a single variant.
|
|
106
|
+
* When the studio path is set (`attachToLocationId` + `attachToColumn` +
|
|
107
|
+
* `attachName`), the worker appends `{ name: attachName, url: <result> }`
|
|
108
|
+
* to the named JSONB array column on completion.
|
|
109
|
+
*/
|
|
110
|
+
generateAsset(data) {
|
|
111
|
+
return this.client.request("POST", "/v1/generate-location-asset", { body: data });
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Fire `POST /v1/generate-surround-continuation` to produce one seamless 360°
|
|
115
|
+
* ring view as an i2i continuation of `referenceImageUrl`. The platform builds
|
|
116
|
+
* the half-carry composite, paints the missing half, and color-harmonizes it
|
|
117
|
+
* to the carried half (no tonal seam; carried half stays pixel-exact). When the
|
|
118
|
+
* studio path is set, the worker appends the result to the location's bucket.
|
|
119
|
+
*/
|
|
120
|
+
generateSurroundContinuation(data) {
|
|
121
|
+
return this.client.request("POST", "/v1/generate-surround-continuation", { body: data });
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Fire `POST /v1/generate-location-motion` to animate the location's
|
|
125
|
+
* establishing shot into an atmospheric motion clip. Image-to-video, single
|
|
126
|
+
* clip per call; the attach column is hardcoded to `atmosphere_motions`
|
|
127
|
+
* server-side (locations have a single motion bucket so the caller doesn't
|
|
128
|
+
* supply `attachToColumn`). When the studio path is set
|
|
129
|
+
* (`attachToLocationId` + `attachName`), the worker appends
|
|
130
|
+
* `{ name: attachName, url: <result> }` to the row's `atmosphere_motions`
|
|
131
|
+
* column on completion.
|
|
132
|
+
*/
|
|
133
|
+
generateMotion(data) {
|
|
134
|
+
return this.client.request("POST", "/v1/generate-location-motion", { body: data });
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Atomically remove ONE asset take (every entry matching `url`) from a
|
|
138
|
+
* worker-owned bucket column — `POST /v1/locations/:id/remove-asset`. The
|
|
139
|
+
* worker-owned buckets are deliberately not writable through `update()`
|
|
140
|
+
* (a stale snapshot would race concurrent worker appends), so deleting a
|
|
141
|
+
* take — e.g. a 360° surround view being regenerated — goes through this
|
|
142
|
+
* single-statement server-side filter instead. 404s (`NotFoundError`) when
|
|
143
|
+
* the url isn't in that bucket or the location isn't yours.
|
|
144
|
+
*/
|
|
145
|
+
removeAsset(id, data) {
|
|
146
|
+
return this.client.request(
|
|
147
|
+
"POST",
|
|
148
|
+
`/v1/locations/${encodeURIComponent(id)}/remove-asset`,
|
|
149
|
+
{ body: data }
|
|
150
|
+
);
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Approve a completed `generate-location` job as the location's main image.
|
|
154
|
+
* Sets `source_image_url` and fires the LLM caption (Claude Sonnet vision)
|
|
155
|
+
* inline. Returns the new main-image URL plus the caption.
|
|
156
|
+
*
|
|
157
|
+
* Caption-failure semantics: the route still sends `""` on LLM sub-failure,
|
|
158
|
+
* but the SDK normalizes `""` → `null` here so `canonicalDescription` carries
|
|
159
|
+
* the same `string | null` semantics as characters. The main image is still
|
|
160
|
+
* set; call `recaption()` to retry.
|
|
161
|
+
*/
|
|
162
|
+
async approveMainImage(id, candidateJobId) {
|
|
163
|
+
const res = await this.client.request(
|
|
164
|
+
"POST",
|
|
165
|
+
`/v1/locations/${encodeURIComponent(id)}/approve-main-image`,
|
|
166
|
+
{ body: { candidateJobId } }
|
|
167
|
+
);
|
|
168
|
+
return { sourceImageUrl: res.sourceImageUrl, canonicalDescription: res.canonicalDescription || null };
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Re-fire the LLM caption against the location's current main image. 502s
|
|
172
|
+
* on LLM failure (unlike `approveMainImage` which preserves the side-effect
|
|
173
|
+
* and returns ""); returns 400 `no_source_image` if no main image is set
|
|
174
|
+
* yet.
|
|
175
|
+
*/
|
|
176
|
+
recaption(id) {
|
|
177
|
+
return this.client.request(
|
|
178
|
+
"POST",
|
|
179
|
+
`/v1/locations/${encodeURIComponent(id)}/llm-caption`
|
|
180
|
+
);
|
|
181
|
+
}
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
export { LocationsResource };
|
|
185
|
+
//# sourceMappingURL=chunk-TVENC6PH.js.map
|
|
186
|
+
//# sourceMappingURL=chunk-TVENC6PH.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/resources/locations.ts"],"names":[],"mappings":"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","file":"chunk-TVENC6PH.js","sourcesContent":["import type { CharacterAspectRatio, SurroundDirection, LocationAssetType, LocationAttachColumn } from \"@nodaro/shared/entities\"\nexport type { LocationAssetType, LocationAttachColumn, CharacterAspectRatio, SurroundDirection } from \"@nodaro/shared/entities\"\nexport { LOCATION_ASSET_TYPES, LOCATION_ATTACH_COLUMNS, SURROUND_DIRECTIONS } from \"@nodaro/shared/entities\"\nimport type { NodaroClientCore } from \"../core.js\"\nimport type { GenerationSessionParams } from \"./nodes.js\"\n\n/**\n * Re-export the shared `LocationAssetType` / `LocationAttachColumn` unions and\n * their runtime tuples so SDK consumers don't have to add `@nodaro/shared` as a\n * second dependency just to typecheck the `assetType` / `attachToColumn`\n * fields. Single source of truth lives in `@nodaro/shared/entity-prompts`.\n *\n * `CharacterAspectRatio` is re-exported alongside them — `generateMotion`'s\n * `aspectRatio` field reuses the same 4-value enum (1:1 / 3:4 / 16:9 / 9:16)\n * as characters; the route enforces this with `z.enum(CHARACTER_ASPECT_OPTIONS)`.\n */\n\n/**\n * Reference-photo kind discriminator — the mood-board roles a user can attach\n * to a location. Mirrors the `reference_photos.kind` Zod enum in\n * `backend/src/routes/locations.ts`. `other` is the free-form bucket.\n */\nexport type LocationReferencePhotoKind =\n | \"wide\"\n | \"interior\"\n | \"exterior\"\n | \"detail\"\n | \"moodBoard\"\n | \"other\"\n\nexport interface LocationReferencePhoto {\n url: string\n kind: LocationReferencePhotoKind\n}\n\n/**\n * A location record returned by Nodaro's REST API. Mirrors the camelCase\n * shape produced by `backend/src/routes/locations.ts::toCamel()`.\n *\n * Asset buckets (`timeOfDay`, `weather`, `angles`, `lighting`, `seasons`,\n * `atmosphereMotions`) are independent JSONB arrays keyed by a human-readable\n * variant name (e.g. `\"dawn\"`, `\"clear\"`, `\"wide\"`). Each entry's `url` points\n * at an R2-hosted asset.\n *\n * Identity-foundation fields:\n * - `referencePhotos` — caller-supplied mood-board refs (cap 20).\n * - `canonicalDescription` — ~80–120-word LLM-authored visual caption,\n * populated by `approveMainImage()` / `recaption()`. The wire still sends\n * `\"\"` on caption sub-failure (the breaking wire change is deferred to a\n * major bump), but `get()` normalizes `\"\"` → `null` so consumers see the\n * same `string | null` semantics as characters.\n * - `styleLock` — whether asset gens should anchor to the canonical style\n * captured at approval time. Defaults to `true` on new rows.\n */\nexport interface Location {\n id: string\n userId: string\n nodeId: string\n projectId: string | null\n name: string\n description: string | null\n category: string | null\n style: string | null\n sourceImageUrl: string | null\n /** MODEL_CATALOG image-model id the main image was generated with (or `null`).\n * Set on create + editable via the update route. */\n imageProvider: string | null\n timeOfDay: Array<{ name: string; url: string }>\n weather: Array<{ name: string; url: string }>\n angles: Array<{ name: string; url: string }>\n lighting: Array<{ name: string; url: string }>\n seasons: Array<{ name: string; url: string }>\n atmosphereMotions: Array<{ name: string; url: string }>\n /** Named Location Boards — dense reference sheets, one per variant/mood\n * (the `generate-image/location-board` factory preset rendered from the\n * location's images). A first-class bucket: community publish snapshots it\n * and clone hands the consumer their own copy to extend. Defaults to `[]`.\n * `type` marks an image-collage `\"identity\"` sheet vs a plain `\"looks\"`\n * board; `sourceImages` are the R2 URLs it was collaged from. Both optional\n * + backward-compatible (legacy boards have neither). */\n boards?: Array<{ name: string; url: string; type?: \"looks\" | \"identity\"; sourceImages?: string[] }> | null\n referencePhotos: LocationReferencePhoto[]\n /** `null` when no caption is set (or the LLM caption sub-failed) — the wire\n * sends `\"\"`, normalized to `null` in `get()` to match character semantics. */\n canonicalDescription: string | null\n styleLock: boolean\n /** The user's chosen DEFAULT asset take per variant (Studio version history).\n * OPAQUE map: key `\"<bucket>:<variant>\"` (e.g. `\"timeOfDay:dawn\"`) → the chosen\n * asset URL (one already present in that bucket). Stored verbatim — keys are\n * NOT normalized; soft-capped server-side at 200 keys / 2048-char values\n * (overflow dropped silently). Defaults to `{}`. */\n selectedAssetByVariant?: Record<string, string> | null\n deletedAt: string | null\n createdAt: string\n updatedAt: string\n}\n\n/**\n * GET /v1/locations/:id appends a `pendingJobs` bucket the studio uses to\n * rehydrate spinners after a reload. Optional on the SDK surface — it doesn't\n * appear on `list()` rows.\n */\nexport interface LocationDetail extends Location {\n pendingJobs?: Array<{\n jobId: string\n assetType: string\n name: string\n status: string\n }>\n /**\n * Completed candidate main images for this location whose URL differs from\n * the current `sourceImageUrl`, newest first (max 5). Surfaced so a\n * \"pick from N\" UI can offer alternatives the user can promote via\n * `approveMainImage(id, jobId)`; until they pick, the current main image is\n * left untouched. Mirrors `CharacterDetail.previousCandidates`. Optional -\n * absent on `list()` rows, present (possibly empty) on `get()`.\n */\n previousCandidates?: Array<{\n jobId: string\n url: string\n createdAt: string\n }>\n}\n\n/**\n * Body for `client.locations.create()`. Mirrors the INSERT branch of\n * `upsertLocationBody` in `backend/src/routes/locations.ts`. `name` + `nodeId`\n * are required on create.\n */\nexport interface CreateLocationInput {\n nodeId: string\n name: string\n description?: string\n category?: string\n style?: string\n workflowId?: string\n projectId?: string\n sourceImageUrl?: string\n /** Persistent image-model id (a MODEL_CATALOG image model). Validated\n * server-side — unknown / non-image / \"\" is stored as `null`. */\n imageProvider?: string | null\n referencePhotos?: LocationReferencePhoto[]\n canonicalDescription?: string\n styleLock?: boolean\n /** The user's chosen DEFAULT asset take per variant. OPAQUE\n * `\"<bucket>:<variant>\"` → chosen-URL map; a write REPLACES the whole map.\n * Keys stored verbatim; soft-capped server-side at 200 keys / 2048-char values. */\n selectedAssetByVariant?: Record<string, string>\n}\n\n/**\n * Body for `client.locations.update()`. Mirrors the UPDATE branch of\n * `upsertLocationBody` in `backend/src/routes/locations.ts`.\n *\n * Worker-owned asset buckets (`timeOfDay`/`weather`/`angles`/`lighting`/\n * `seasons`/`atmosphereMotions`) are deliberately omitted — the route drops\n * them on UPDATE so a Studio auto-save with a stale snapshot cannot clobber\n * the worker's atomic `append_location_asset()` writes.\n *\n * `expectedUpdatedAt` is the optimistic-concurrency token: when present, the\n * UPDATE only succeeds if the row's `updated_at` still matches; on mismatch\n * the route returns 409 so the studio can re-fetch + merge.\n */\nexport interface UpdateLocationInput {\n name?: string\n description?: string\n category?: string\n style?: string\n sourceImageUrl?: string\n /** Persistent image-model id (a MODEL_CATALOG image model). Validated\n * server-side — unknown / non-image / \"\" is stored as `null`. */\n imageProvider?: string | null\n referencePhotos?: LocationReferencePhoto[]\n canonicalDescription?: string\n styleLock?: boolean\n /** The user's chosen DEFAULT asset take per variant. OPAQUE\n * `\"<bucket>:<variant>\"` → chosen-URL map; a write REPLACES the whole map\n * (omit to leave untouched). Keys stored verbatim; soft-capped server-side\n * at 200 keys / 2048-char values. */\n selectedAssetByVariant?: Record<string, string>\n /** Named Location Boards (see `Location.boards`) — whole-array replace,\n * USER-owned (unlike the worker-owned buckets it flows through UPDATE).\n * Server caps: 24 boards, 200-char names, 30 sourceImages per board. */\n boards?: Array<{ name: string; url: string; type?: \"looks\" | \"identity\"; sourceImages?: string[] }>\n /** ISO-8601 timestamp recording when PII consent was captured for this location. */\n piiConsentAt?: string\n expectedUpdatedAt?: string\n}\n\nexport interface UpdateLocationResult {\n id: string\n updatedAt: string\n}\n\nexport interface ListLocationsParams {\n /** When true, return archived locations instead of active ones. */\n archived?: boolean\n /**\n * Search words: only the locations whose name or description contains\n * every word (split on spaces, the first 5), in any order, ignoring case.\n * Each word is matched as written (`%`, `_` and `*` are not wildcards;\n * punctuation is kept); blank means no search; up to 200 characters.\n * Combines with the other filters and with `cursor` paging.\n */\n q?: string\n /**\n * Max rows to return (cap 500). OPT-IN: omitted, the server returns the\n * full legacy listing with no `nextCursor`; supplied, the response is one\n * page plus `nextCursor` — keep passing it back until it is `null`.\n */\n limit?: number\n /** Opaque cursor from a prior page's `nextCursor` (fetches the next page). */\n cursor?: string\n}\n\n/**\n * Input for `client.locations.generate()` — fires the\n * `POST /v1/generate-location` route. Produces 1–10 candidate\n * establishing shots; each lands as one `jobs` row in `pending` state and\n * is then enqueued for the worker.\n *\n * When `attachToLocationId` is set AND `count === 1`, the worker writes the\n * resulting URL directly to `locations.source_image_url` on completion —\n * caller doesn't need a separate `approveMainImage` call. Multi-candidate\n * batches MUST go through explicit approval so the user picks the winner.\n */\nexport interface GenerateLocationInput extends GenerationSessionParams {\n name: string\n description?: string\n userPrompt?: string\n category?: \"indoor\" | \"outdoor\" | \"urban\" | \"nature\" | \"fantasy\" | \"sci-fi\" | \"historical\" | \"futuristic\" | \"other\"\n style?: \"realistic\" | \"anime\" | \"3d-pixar\" | \"illustration\"\n sourceImageUrl?: string\n provider?: string\n /** Number of candidate images to generate (1–10; server-validated). */\n count?: number\n /** Auto-attach the result to this location row (single-candidate only). */\n attachToLocationId?: string\n /**\n * Credit-affecting quality tier (e.g. `\"high\"` for gpt-image). Priced like\n * generate-image (composite ids such as `gpt-image:high`); values the chosen\n * model doesn't support are ignored server-side, never rejected.\n */\n quality?: string\n /**\n * Credit-affecting output resolution (e.g. `\"2K\"` / `\"4K\"` / `\"2 MP\"`).\n * Priced like generate-image (composite ids such as `nano-banana-pro:4K`);\n * values the chosen model doesn't support are ignored server-side, never\n * rejected.\n */\n resolution?: string\n}\n\n/**\n * `generate()` response — `jobIds` is ALWAYS present (the harmonized contract,\n * matching characters). `jobId` is a deprecated back-compat alias populated only\n * on `count === 1`; prefer `jobIds`. (Will be removed on the next major.)\n */\nexport interface GenerateLocationResult {\n jobIds: string[]\n /** @deprecated count===1 back-compat alias — use `jobIds`. */\n jobId?: string\n}\n\n/**\n * Input for `client.locations.generateAsset()` — fires the\n * `POST /v1/generate-location-asset` route. Produces a single\n * timeOfDay / weather / seasons / angles / lighting / custom variant.\n *\n * When all three studio-path fields are set (`attachToLocationId` +\n * `attachToColumn` + `attachName`), the worker appends\n * `{ name: attachName, url: <result> }` to the named JSONB array column on\n * the user's location row on completion. `attachToColumn` is REQUIRED for\n * `assetType === \"custom\"` — the worker can't infer the bucket from the\n * asset type.\n */\nexport interface GenerateLocationAssetInput extends GenerationSessionParams {\n assetType: LocationAssetType\n variant: string\n name: string\n description?: string\n userPrompt?: string\n category?: string\n style?: \"realistic\" | \"anime\" | \"3d-pixar\" | \"illustration\"\n sourceImageUrl?: string\n provider?: string\n /** Optional framing override (the same 4-value enum as `generateMotion`).\n * Absent = the image model's default. The studio's 360° surround path pins\n * `\"16:9\"` so every ring view matches the establishing shot's frame. */\n aspectRatio?: CharacterAspectRatio\n attachToLocationId?: string\n attachToColumn?: LocationAttachColumn\n attachName?: string\n /**\n * Credit-affecting quality tier (e.g. `\"high\"` for gpt-image). Values the\n * chosen model doesn't support are ignored server-side, never rejected.\n */\n quality?: string\n /**\n * Credit-affecting output resolution (e.g. `\"2K\"` / `\"4K\"` / `\"2 MP\"`).\n * Values the chosen model doesn't support are ignored server-side, never\n * rejected.\n */\n resolution?: string\n}\n\n/**\n * Input for `client.locations.generateSurroundContinuation()` — fires the\n * `POST /v1/generate-surround-continuation` route. Generates one seamless 360°\n * ring view as an image-to-image continuation of `referenceImageUrl` (the\n * previous ring view, or the establishing shot for the first ring).\n *\n * The platform owns the whole pipeline: it builds the half-carry composite\n * server-side (carry the reference's trailing half into the new frame's leading\n * half per `direction`, gray the rest), paints the gray region, then\n * color-harmonizes the painted half to the carried half so there is no tonal\n * seam down the frame's center. The carried half stays pixel-exact, so a\n * panorama viewer stitching adjacent ring views stays geometrically seamless.\n *\n * When the studio path is set (`attachToLocationId` + `attachToColumn` +\n * `attachName`), the worker appends `{ name: attachName, url: <result> }` to the\n * location's bucket (studio uses `attachToColumn: \"angles\"`,\n * `attachName: \"Surround 45°\"`).\n */\nexport interface GenerateSurroundContinuationInput extends GenerationSessionParams {\n /** The previous ring view to continue from (i2i anchor). */\n referenceImageUrl: string\n /** Carry/paint axis: turn right, turn left, tilt up, or tilt down. Tilts\n * render the sky/ground (a thin horizon strip), not a horizontal continuation. */\n direction: SurroundDirection\n /** Ring angle (45, 90, …) — stored on the result as metadata. */\n degrees?: number\n /** Fraction of the frame carried from the reference. Omitted ⇒ per-direction\n * default (0.5 for a pan, 0.12 thin strip for a tilt). */\n carriedFraction?: number\n /** Upscale/denoise the result before it's chained as the next reference, to\n * slow cumulative softening down a long ring chain. Default false. */\n refine?: boolean\n /** Refine model when `refine` is set. `recraft-upscale` (1 cr, default) or\n * `topaz-image-upscale` (3 cr). */\n refineProvider?: \"recraft-upscale\" | \"topaz-image-upscale\"\n /** Optional free-form scene hint woven into the fill prompt. */\n userPrompt?: string\n /** Image model. Defaults to the platform's general image model (`gpt-image-2`). */\n provider?: string\n /** Studio pins `\"16:9\"` so every ring view matches the establishing frame. */\n aspectRatio?: CharacterAspectRatio\n attachToLocationId?: string\n attachToColumn?: LocationAttachColumn\n attachName?: string\n}\n\n/**\n * Input for `client.locations.generateMotion()` — fires the\n * `POST /v1/generate-location-motion` route. Produces a single atmospheric\n * motion clip (drifting fog, snowfall, rolling waves, etc.) animated FROM a\n * static establishing-shot image.\n *\n * Mirrors `client.characters.generateMotion()` minus the character-specific\n * fields (gender / baseOutfit / realLifeRefs). The route hardcodes the attach\n * column to `atmosphere_motions` — callers supply `attachToLocationId` +\n * `attachName` only.\n *\n * `sourceImageUrl` is REQUIRED — image-to-video needs a source frame and the\n * route has no fallback (no `source_image_url` column to pull from on the\n * locations row; the studio path supplies the canonical establishing-shot URL\n * explicitly).\n *\n * When the studio path is set (`attachToLocationId` + `attachName`), the\n * worker appends `{ name: attachName, url: <result> }` to the location row's\n * `atmosphere_motions` JSONB column on completion.\n */\nexport interface GenerateLocationMotionInput extends GenerationSessionParams {\n motionPrompt: string\n sourceImageUrl: string\n provider?: string\n name: string\n category?: string\n style?: \"realistic\" | \"anime\" | \"3d-pixar\" | \"illustration\"\n canonicalDescription?: string\n attachToLocationId?: string\n attachName?: string\n /**\n * Optional aspect ratio override. Defaults to 16:9 server-side via\n * `resolveLocationAspectRatio` (locations are cinematic establishing shots).\n * One of the 4-value `CharacterAspectRatio` union — locations reuse the\n * character aspect enum since the supported ratios are identical.\n */\n aspectRatio?: CharacterAspectRatio\n}\n\nexport interface ApproveMainImageResult {\n sourceImageUrl: string\n /**\n * LLM-authored caption. `null` when the LLM caption sub-failed — the wire\n * sends `\"\"`, normalized to `null` here so consumers see the same\n * `string | null` semantics as characters. The main image is still set; call\n * `recaption()` to retry.\n */\n canonicalDescription: string | null\n}\n\nexport interface RecaptionLocationResult {\n canonicalDescription: string\n}\n\nexport class LocationsResource {\n constructor(private client: NodaroClientCore) {}\n\n /**\n * List the caller's locations. By default returns active locations only;\n * pass `archived: true` to fetch soft-deleted rows for an \"archive\" view,\n * and `q` to keep the ones whose name or description contains it.\n */\n list(params: ListLocationsParams = {}): Promise<{ locations: Location[]; nextCursor?: string | null }> {\n const query: Record<string, string | undefined> = {}\n if (params.archived) query.archived = \"true\"\n if (params.q) query.q = params.q\n if (params.limit !== undefined) query.limit = String(params.limit)\n if (params.cursor) query.cursor = params.cursor\n return this.client.request(\"GET\", \"/v1/locations\", { query })\n }\n\n /**\n * Convenience wrapper for `list({ archived: true })`. Returns soft-deleted\n * rows so callers can drive a UI \"Archived\" tab without re-encoding the\n * query param. Mirrors `ObjectsResource.listArchived`.\n *\n * `archived` is omitted from the param type — it's always set to `true` here.\n */\n listArchived(params: Omit<ListLocationsParams, \"archived\"> = {}): Promise<{ locations: Location[]; nextCursor?: string | null }> {\n return this.list({ ...params, archived: true })\n }\n\n /**\n * Fetch a single location including in-flight asset job state. Soft-deleted\n * (archived) rows are returned by id intentionally so canvas nodes that\n * hold a stale `locationDbId` keep loading.\n */\n async get(id: string): Promise<LocationDetail> {\n const res = await this.client.request<LocationDetail>(\n \"GET\",\n `/v1/locations/${encodeURIComponent(id)}`,\n )\n // Normalize the wire `\"\"` caption (DB null / LLM sub-failure) → null so\n // consumers see the same `string | null` semantics as characters. New\n // object — never mutate the response.\n return { ...res, canonicalDescription: res.canonicalDescription || null }\n }\n\n /**\n * Create a new location. `name` + `nodeId` are required — the route 400s\n * otherwise. Returns the new row's id.\n *\n * Note: the underlying route is the same `POST /v1/locations` upsert that\n * powers `update()`. This convenience wrapper enforces the INSERT-required\n * fields at the type level and never sends an `id`.\n */\n create(data: CreateLocationInput): Promise<{ id: string }> {\n return this.client.request(\"POST\", \"/v1/locations\", { body: data })\n }\n\n /**\n * Update a location. Only the fields you pass are written — undefined keys\n * are NOT touched on the row. Worker-owned asset buckets are intentionally\n * not exposed on this surface (see `UpdateLocationInput` for the rationale).\n *\n * Optimistic-concurrency: pass `expectedUpdatedAt` to require the row's\n * `updated_at` still matches; on mismatch the route returns 409\n * `concurrent_modification`. The SDK surfaces that as a generic\n * `NodaroError` with the same code.\n */\n update(id: string, data: UpdateLocationInput): Promise<UpdateLocationResult> {\n return this.client.request(\"POST\", \"/v1/locations\", {\n body: { id, ...data },\n })\n }\n\n /**\n * Soft-delete (archive) a location. The row is hidden from `list()` by\n * default but still loadable via `get(id)` so canvas nodes pointing at it\n * keep working. Restore with `restore(id)`.\n */\n delete(id: string): Promise<{ success: true; archived: true }> {\n return this.client.request(\"DELETE\", `/v1/locations/${encodeURIComponent(id)}`)\n }\n\n /**\n * Un-archive a location. If the original name now collides (case-\n * insensitive) with an active row, the server auto-suffixes \"(restored)\"\n * and returns the effective name.\n */\n restore(id: string): Promise<{ id: string; name: string }> {\n return this.client.request(\"POST\", `/v1/locations/${encodeURIComponent(id)}/restore`)\n }\n\n /**\n * Fire `POST /v1/generate-location` to produce one or more candidate main\n * images. With `count > 1`, all jobs are reserved up-front before any\n * is enqueued — mid-batch failures roll back atomically.\n *\n * When `attachToLocationId` is set AND `count === 1`, the worker writes\n * the result directly to the row's `source_image_url`; otherwise you must\n * call `approveMainImage()` after picking a candidate.\n */\n async generate(data: GenerateLocationInput): Promise<GenerateLocationResult> {\n const res = await this.client.request<{ jobId?: string; jobIds?: string[] }>(\n \"POST\", \"/v1/generate-location\", { body: data },\n )\n // Tolerate the legacy `{ jobId }`-only shape (older server): synthesize jobIds.\n const jobIds = res.jobIds ?? (res.jobId ? [res.jobId] : [])\n return res.jobId ? { jobIds, jobId: res.jobId } : { jobIds }\n }\n\n /**\n * Fire `POST /v1/generate-location-asset` to produce a single variant.\n * When the studio path is set (`attachToLocationId` + `attachToColumn` +\n * `attachName`), the worker appends `{ name: attachName, url: <result> }`\n * to the named JSONB array column on completion.\n */\n generateAsset(data: GenerateLocationAssetInput): Promise<{ jobId: string }> {\n return this.client.request(\"POST\", \"/v1/generate-location-asset\", { body: data })\n }\n\n /**\n * Fire `POST /v1/generate-surround-continuation` to produce one seamless 360°\n * ring view as an i2i continuation of `referenceImageUrl`. The platform builds\n * the half-carry composite, paints the missing half, and color-harmonizes it\n * to the carried half (no tonal seam; carried half stays pixel-exact). When the\n * studio path is set, the worker appends the result to the location's bucket.\n */\n generateSurroundContinuation(data: GenerateSurroundContinuationInput): Promise<{ jobId: string }> {\n return this.client.request(\"POST\", \"/v1/generate-surround-continuation\", { body: data })\n }\n\n /**\n * Fire `POST /v1/generate-location-motion` to animate the location's\n * establishing shot into an atmospheric motion clip. Image-to-video, single\n * clip per call; the attach column is hardcoded to `atmosphere_motions`\n * server-side (locations have a single motion bucket so the caller doesn't\n * supply `attachToColumn`). When the studio path is set\n * (`attachToLocationId` + `attachName`), the worker appends\n * `{ name: attachName, url: <result> }` to the row's `atmosphere_motions`\n * column on completion.\n */\n generateMotion(data: GenerateLocationMotionInput): Promise<{ jobId: string }> {\n return this.client.request(\"POST\", \"/v1/generate-location-motion\", { body: data })\n }\n\n /**\n * Atomically remove ONE asset take (every entry matching `url`) from a\n * worker-owned bucket column — `POST /v1/locations/:id/remove-asset`. The\n * worker-owned buckets are deliberately not writable through `update()`\n * (a stale snapshot would race concurrent worker appends), so deleting a\n * take — e.g. a 360° surround view being regenerated — goes through this\n * single-statement server-side filter instead. 404s (`NotFoundError`) when\n * the url isn't in that bucket or the location isn't yours.\n */\n removeAsset(\n id: string,\n data: { column: LocationAttachColumn; url: string },\n ): Promise<{ removed: true }> {\n return this.client.request(\n \"POST\",\n `/v1/locations/${encodeURIComponent(id)}/remove-asset`,\n { body: data },\n )\n }\n\n /**\n * Approve a completed `generate-location` job as the location's main image.\n * Sets `source_image_url` and fires the LLM caption (Claude Sonnet vision)\n * inline. Returns the new main-image URL plus the caption.\n *\n * Caption-failure semantics: the route still sends `\"\"` on LLM sub-failure,\n * but the SDK normalizes `\"\"` → `null` here so `canonicalDescription` carries\n * the same `string | null` semantics as characters. The main image is still\n * set; call `recaption()` to retry.\n */\n async approveMainImage(id: string, candidateJobId: string): Promise<ApproveMainImageResult> {\n const res = await this.client.request<{ sourceImageUrl: string; canonicalDescription: string | null }>(\n \"POST\",\n `/v1/locations/${encodeURIComponent(id)}/approve-main-image`,\n { body: { candidateJobId } },\n )\n // Normalize the wire `\"\"` (LLM sub-failure) → null; build a new object\n // rather than mutating the response.\n return { sourceImageUrl: res.sourceImageUrl, canonicalDescription: res.canonicalDescription || null }\n }\n\n /**\n * Re-fire the LLM caption against the location's current main image. 502s\n * on LLM failure (unlike `approveMainImage` which preserves the side-effect\n * and returns \"\"); returns 400 `no_source_image` if no main image is set\n * yet.\n */\n recaption(id: string): Promise<RecaptionLocationResult> {\n return this.client.request(\n \"POST\",\n `/v1/locations/${encodeURIComponent(id)}/llm-caption`,\n )\n }\n}\n"]}
|