@commercelayer/sdk 7.0.0-rc.4 → 7.0.0-rc.5
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/lib/api.cjs +397 -521
- package/lib/api.cjs.map +1 -1
- package/lib/api.js +141 -131
- package/lib/api.js.map +1 -1
- package/lib/bundle.cjs +276 -155
- package/lib/bundle.cjs.map +1 -1
- package/lib/bundle.js +276 -135
- package/lib/bundle.js.map +1 -1
- package/lib/chunk-227VGGA2.cjs +47 -0
- package/lib/chunk-227VGGA2.cjs.map +1 -0
- package/lib/chunk-24QWQZWL.cjs +51 -0
- package/lib/chunk-24QWQZWL.cjs.map +1 -0
- package/lib/chunk-267DJ4MS.js +49 -0
- package/lib/chunk-267DJ4MS.js.map +1 -0
- package/lib/chunk-26A7O7WA.cjs +55 -0
- package/lib/chunk-26A7O7WA.cjs.map +1 -0
- package/lib/chunk-27XEREH6.cjs +46 -0
- package/lib/chunk-27XEREH6.cjs.map +1 -0
- package/lib/chunk-2BM2HCOW.js +40 -0
- package/lib/chunk-2BM2HCOW.js.map +1 -0
- package/lib/chunk-2E7PSICR.cjs +47 -0
- package/lib/chunk-2E7PSICR.cjs.map +1 -0
- package/lib/chunk-2RBF6QOC.cjs +53 -0
- package/lib/chunk-2RBF6QOC.cjs.map +1 -0
- package/lib/chunk-2TIOMQ3F.js +27 -0
- package/lib/chunk-2TIOMQ3F.js.map +1 -0
- package/lib/chunk-2VBIYZJ5.cjs +39 -0
- package/lib/chunk-2VBIYZJ5.cjs.map +1 -0
- package/lib/chunk-2YMDVSY6.cjs +95 -0
- package/lib/chunk-2YMDVSY6.cjs.map +1 -0
- package/lib/chunk-32FLT6EU.cjs +42 -0
- package/lib/chunk-32FLT6EU.cjs.map +1 -0
- package/lib/chunk-37S6ZTHC.cjs +38 -0
- package/lib/chunk-37S6ZTHC.cjs.map +1 -0
- package/lib/chunk-3AWJFCM6.js +33 -0
- package/lib/chunk-3AWJFCM6.js.map +1 -0
- package/lib/chunk-3EX76AZW.js +3 -0
- package/lib/chunk-3EX76AZW.js.map +1 -0
- package/lib/chunk-3SJEK6QW.cjs +47 -0
- package/lib/chunk-3SJEK6QW.cjs.map +1 -0
- package/lib/chunk-3XWRLB2B.js +44 -0
- package/lib/chunk-3XWRLB2B.js.map +1 -0
- package/lib/chunk-3XZDDKD7.js +52 -0
- package/lib/chunk-3XZDDKD7.js.map +1 -0
- package/lib/chunk-4E5DMBYD.js +27 -0
- package/lib/chunk-4E5DMBYD.js.map +1 -0
- package/lib/chunk-4FIUTSQX.cjs +50 -0
- package/lib/chunk-4FIUTSQX.cjs.map +1 -0
- package/lib/chunk-4IUCSBQJ.cjs +39 -0
- package/lib/chunk-4IUCSBQJ.cjs.map +1 -0
- package/lib/chunk-4YEJIBQ5.cjs +66 -0
- package/lib/chunk-4YEJIBQ5.cjs.map +1 -0
- package/lib/chunk-4YNKD3VT.cjs +51 -0
- package/lib/chunk-4YNKD3VT.cjs.map +1 -0
- package/lib/chunk-54CK7T4R.cjs +34 -0
- package/lib/chunk-54CK7T4R.cjs.map +1 -0
- package/lib/chunk-5DI3O5RJ.cjs +126 -0
- package/lib/chunk-5DI3O5RJ.cjs.map +1 -0
- package/lib/chunk-5DWYCGHP.cjs +47 -0
- package/lib/chunk-5DWYCGHP.cjs.map +1 -0
- package/lib/chunk-5JUWNHQ5.js +59 -0
- package/lib/chunk-5JUWNHQ5.js.map +1 -0
- package/lib/chunk-5NWRLZGC.js +49 -0
- package/lib/chunk-5NWRLZGC.js.map +1 -0
- package/lib/chunk-5PV4P3JM.js +61 -0
- package/lib/chunk-5PV4P3JM.js.map +1 -0
- package/lib/chunk-5RKGQCKX.js +105 -0
- package/lib/chunk-5RKGQCKX.js.map +1 -0
- package/lib/chunk-5YMHXTJG.cjs +4 -0
- package/lib/chunk-5YMHXTJG.cjs.map +1 -0
- package/lib/chunk-6HZYZZJ7.cjs +110 -0
- package/lib/chunk-6HZYZZJ7.cjs.map +1 -0
- package/lib/chunk-6RKVARIW.cjs +63 -0
- package/lib/chunk-6RKVARIW.cjs.map +1 -0
- package/lib/chunk-6T2NL26W.cjs +47 -0
- package/lib/chunk-6T2NL26W.cjs.map +1 -0
- package/lib/chunk-6XSQFXZG.js +48 -0
- package/lib/chunk-6XSQFXZG.js.map +1 -0
- package/lib/chunk-75Z4NSV3.js +48 -0
- package/lib/chunk-75Z4NSV3.js.map +1 -0
- package/lib/chunk-76KPAY2S.cjs +34 -0
- package/lib/chunk-76KPAY2S.cjs.map +1 -0
- package/lib/chunk-77TSOEKD.cjs +38 -0
- package/lib/chunk-77TSOEKD.cjs.map +1 -0
- package/lib/chunk-7ECXQJP2.cjs +42 -0
- package/lib/chunk-7ECXQJP2.cjs.map +1 -0
- package/lib/chunk-7FLESQUJ.js +55 -0
- package/lib/chunk-7FLESQUJ.js.map +1 -0
- package/lib/chunk-7FO2TNRH.js +45 -0
- package/lib/chunk-7FO2TNRH.js.map +1 -0
- package/lib/chunk-7JXR2VV3.cjs +47 -0
- package/lib/chunk-7JXR2VV3.cjs.map +1 -0
- package/lib/chunk-7KJ2OKSK.cjs +59 -0
- package/lib/chunk-7KJ2OKSK.cjs.map +1 -0
- package/lib/chunk-7KU4M5DS.cjs +57 -0
- package/lib/chunk-7KU4M5DS.cjs.map +1 -0
- package/lib/chunk-7PE6JN7I.js +48 -0
- package/lib/chunk-7PE6JN7I.js.map +1 -0
- package/lib/chunk-7RRTHZZC.cjs +75 -0
- package/lib/chunk-7RRTHZZC.cjs.map +1 -0
- package/lib/chunk-7TNL5VT5.js +38 -0
- package/lib/chunk-7TNL5VT5.js.map +1 -0
- package/lib/chunk-7UH4JAMB.js +54 -0
- package/lib/chunk-7UH4JAMB.js.map +1 -0
- package/lib/chunk-7ZCJTSYR.js +48 -0
- package/lib/chunk-7ZCJTSYR.js.map +1 -0
- package/lib/chunk-7ZGZN42S.cjs +30 -0
- package/lib/chunk-7ZGZN42S.cjs.map +1 -0
- package/lib/chunk-A2RAUGGE.js +93 -0
- package/lib/chunk-A2RAUGGE.js.map +1 -0
- package/lib/chunk-ACTS2OQX.cjs +95 -0
- package/lib/chunk-ACTS2OQX.cjs.map +1 -0
- package/lib/chunk-AHIMATNV.cjs +61 -0
- package/lib/chunk-AHIMATNV.cjs.map +1 -0
- package/lib/chunk-AIXOGHCK.cjs +51 -0
- package/lib/chunk-AIXOGHCK.cjs.map +1 -0
- package/lib/chunk-AKL5XTMU.cjs +85 -0
- package/lib/chunk-AKL5XTMU.cjs.map +1 -0
- package/lib/chunk-ANSRMBAE.cjs +42 -0
- package/lib/chunk-ANSRMBAE.cjs.map +1 -0
- package/lib/chunk-AOD4FQNI.cjs +47 -0
- package/lib/chunk-AOD4FQNI.cjs.map +1 -0
- package/lib/chunk-APIZA2AG.cjs +47 -0
- package/lib/chunk-APIZA2AG.cjs.map +1 -0
- package/lib/chunk-AU5NYIYK.js +36 -0
- package/lib/chunk-AU5NYIYK.js.map +1 -0
- package/lib/chunk-AV47JRSS.js +44 -0
- package/lib/chunk-AV47JRSS.js.map +1 -0
- package/lib/chunk-AX2EM527.js +37 -0
- package/lib/chunk-AX2EM527.js.map +1 -0
- package/lib/chunk-AYTBSAHY.js +20 -0
- package/lib/chunk-AYTBSAHY.js.map +1 -0
- package/lib/chunk-BCUQHA7L.js +45 -0
- package/lib/chunk-BCUQHA7L.js.map +1 -0
- package/lib/chunk-BHR6XP7Y.js +36 -0
- package/lib/chunk-BHR6XP7Y.js.map +1 -0
- package/lib/chunk-BNK4C2OU.cjs +84 -0
- package/lib/chunk-BNK4C2OU.cjs.map +1 -0
- package/lib/chunk-BPKDEM3O.cjs +47 -0
- package/lib/chunk-BPKDEM3O.cjs.map +1 -0
- package/lib/chunk-BVDBKLNZ.cjs +47 -0
- package/lib/chunk-BVDBKLNZ.cjs.map +1 -0
- package/lib/chunk-BW5JTJIL.cjs +47 -0
- package/lib/chunk-BW5JTJIL.cjs.map +1 -0
- package/lib/chunk-BZKSL26S.js +53 -0
- package/lib/chunk-BZKSL26S.js.map +1 -0
- package/lib/chunk-BZVA4RAA.cjs +47 -0
- package/lib/chunk-BZVA4RAA.cjs.map +1 -0
- package/lib/chunk-C3BQCKAK.cjs +43 -0
- package/lib/chunk-C3BQCKAK.cjs.map +1 -0
- package/lib/chunk-C4M7LJ7I.cjs +68 -0
- package/lib/chunk-C4M7LJ7I.cjs.map +1 -0
- package/lib/chunk-CHYP5F26.js +59 -0
- package/lib/chunk-CHYP5F26.js.map +1 -0
- package/lib/chunk-CS2C7ZYR.cjs +660 -0
- package/lib/chunk-CS2C7ZYR.cjs.map +1 -0
- package/lib/chunk-CUS55PHR.cjs +43 -0
- package/lib/chunk-CUS55PHR.cjs.map +1 -0
- package/lib/chunk-CXZQVDNF.js +45 -0
- package/lib/chunk-CXZQVDNF.js.map +1 -0
- package/lib/chunk-DAAWFJS2.js +45 -0
- package/lib/chunk-DAAWFJS2.js.map +1 -0
- package/lib/chunk-DAS7YWSF.cjs +156 -0
- package/lib/chunk-DAS7YWSF.cjs.map +1 -0
- package/lib/chunk-DBNYBJ5C.cjs +51 -0
- package/lib/chunk-DBNYBJ5C.cjs.map +1 -0
- package/lib/chunk-DF2BVTTZ.cjs +43 -0
- package/lib/chunk-DF2BVTTZ.cjs.map +1 -0
- package/lib/chunk-DGUM43GV.js +10 -0
- package/lib/chunk-DGUM43GV.js.map +1 -0
- package/lib/chunk-DP4RFJ2I.cjs +68 -0
- package/lib/chunk-DP4RFJ2I.cjs.map +1 -0
- package/lib/chunk-DX4DDLBS.js +83 -0
- package/lib/chunk-DX4DDLBS.js.map +1 -0
- package/lib/chunk-E2YLM3RR.js +51 -0
- package/lib/chunk-E2YLM3RR.js.map +1 -0
- package/lib/chunk-E4B3ANB5.js +93 -0
- package/lib/chunk-E4B3ANB5.js.map +1 -0
- package/lib/chunk-E4VBPMFD.js +73 -0
- package/lib/chunk-E4VBPMFD.js.map +1 -0
- package/lib/chunk-EBKU6FT5.js +103 -0
- package/lib/chunk-EBKU6FT5.js.map +1 -0
- package/lib/chunk-ECTCGSXW.js +40 -0
- package/lib/chunk-ECTCGSXW.js.map +1 -0
- package/lib/chunk-EGSJ6YKA.js +44 -0
- package/lib/chunk-EGSJ6YKA.js.map +1 -0
- package/lib/chunk-EMO3ZC2O.js +45 -0
- package/lib/chunk-EMO3ZC2O.js.map +1 -0
- package/lib/chunk-ERBAOD7L.cjs +47 -0
- package/lib/chunk-ERBAOD7L.cjs.map +1 -0
- package/lib/chunk-EXPAMTHI.js +68 -0
- package/lib/chunk-EXPAMTHI.js.map +1 -0
- package/lib/chunk-F7PE7QO2.cjs +29 -0
- package/lib/chunk-F7PE7QO2.cjs.map +1 -0
- package/lib/chunk-FBIUMJFR.js +75 -0
- package/lib/chunk-FBIUMJFR.js.map +1 -0
- package/lib/chunk-FBUFUXLX.js +99 -0
- package/lib/chunk-FBUFUXLX.js.map +1 -0
- package/lib/chunk-FG4NTGK6.js +41 -0
- package/lib/chunk-FG4NTGK6.js.map +1 -0
- package/lib/chunk-FGNIX3MU.cjs +47 -0
- package/lib/chunk-FGNIX3MU.cjs.map +1 -0
- package/lib/chunk-FIXXXEQQ.cjs +43 -0
- package/lib/chunk-FIXXXEQQ.cjs.map +1 -0
- package/lib/chunk-FKIGOMPV.js +41 -0
- package/lib/chunk-FKIGOMPV.js.map +1 -0
- package/lib/chunk-FKYM2RDC.cjs +46 -0
- package/lib/chunk-FKYM2RDC.cjs.map +1 -0
- package/lib/chunk-FMHMXRK5.js +49 -0
- package/lib/chunk-FMHMXRK5.js.map +1 -0
- package/lib/chunk-FN45EIWJ.cjs +75 -0
- package/lib/chunk-FN45EIWJ.cjs.map +1 -0
- package/lib/chunk-FYJO5RU5.js +33 -0
- package/lib/chunk-FYJO5RU5.js.map +1 -0
- package/lib/chunk-FZBFCMQZ.cjs +51 -0
- package/lib/chunk-FZBFCMQZ.cjs.map +1 -0
- package/lib/chunk-G2V76FJE.js +43 -0
- package/lib/chunk-G2V76FJE.js.map +1 -0
- package/lib/chunk-G6WGGNBM.cjs +26 -0
- package/lib/chunk-G6WGGNBM.cjs.map +1 -0
- package/lib/chunk-GMECYB3A.js +24 -0
- package/lib/chunk-GMECYB3A.js.map +1 -0
- package/lib/chunk-GRKFJOVR.js +154 -0
- package/lib/chunk-GRKFJOVR.js.map +1 -0
- package/lib/chunk-GTYAKU2E.cjs +29 -0
- package/lib/chunk-GTYAKU2E.cjs.map +1 -0
- package/lib/chunk-GTYSDD6X.js +37 -0
- package/lib/chunk-GTYSDD6X.js.map +1 -0
- package/lib/chunk-GZ6PQ7EP.cjs +65 -0
- package/lib/chunk-GZ6PQ7EP.cjs.map +1 -0
- package/lib/chunk-H4MXQKQI.cjs +47 -0
- package/lib/chunk-H4MXQKQI.cjs.map +1 -0
- package/lib/chunk-H4SVEI6E.js +151 -0
- package/lib/chunk-H4SVEI6E.js.map +1 -0
- package/lib/chunk-H7ZT6QLT.cjs +47 -0
- package/lib/chunk-H7ZT6QLT.cjs.map +1 -0
- package/lib/chunk-HBEUVQK5.js +87 -0
- package/lib/chunk-HBEUVQK5.js.map +1 -0
- package/lib/chunk-HBRJBDHB.cjs +50 -0
- package/lib/chunk-HBRJBDHB.cjs.map +1 -0
- package/lib/chunk-HHUXVDBF.js +37 -0
- package/lib/chunk-HHUXVDBF.js.map +1 -0
- package/lib/chunk-HIUMWBCO.cjs +86 -0
- package/lib/chunk-HIUMWBCO.cjs.map +1 -0
- package/lib/chunk-HLXVKH3U.js +53 -0
- package/lib/chunk-HLXVKH3U.js.map +1 -0
- package/lib/chunk-HM7D3KXS.js +644 -0
- package/lib/chunk-HM7D3KXS.js.map +1 -0
- package/lib/chunk-HMIISZ5U.js +59 -0
- package/lib/chunk-HMIISZ5U.js.map +1 -0
- package/lib/chunk-HMVRDAEV.js +48 -0
- package/lib/chunk-HMVRDAEV.js.map +1 -0
- package/lib/chunk-HR2AUHMN.cjs +101 -0
- package/lib/chunk-HR2AUHMN.cjs.map +1 -0
- package/lib/chunk-I3LB2N5Z.js +45 -0
- package/lib/chunk-I3LB2N5Z.js.map +1 -0
- package/lib/chunk-I3RBJRZV.js +45 -0
- package/lib/chunk-I3RBJRZV.js.map +1 -0
- package/lib/chunk-IDNK372S.js +52 -0
- package/lib/chunk-IDNK372S.js.map +1 -0
- package/lib/chunk-IFAZBYOS.cjs +45 -0
- package/lib/chunk-IFAZBYOS.cjs.map +1 -0
- package/lib/chunk-IGOQEXAJ.cjs +35 -0
- package/lib/chunk-IGOQEXAJ.cjs.map +1 -0
- package/lib/chunk-IKHD5UQP.cjs +163 -0
- package/lib/chunk-IKHD5UQP.cjs.map +1 -0
- package/lib/chunk-IMKKKS3E.js +44 -0
- package/lib/chunk-IMKKKS3E.js.map +1 -0
- package/lib/chunk-IU7GTZZ2.cjs +51 -0
- package/lib/chunk-IU7GTZZ2.cjs.map +1 -0
- package/lib/chunk-IWRJZHIZ.js +41 -0
- package/lib/chunk-IWRJZHIZ.js.map +1 -0
- package/lib/chunk-IYCV54XR.cjs +51 -0
- package/lib/chunk-IYCV54XR.cjs.map +1 -0
- package/lib/chunk-IZXPVIGP.js +67 -0
- package/lib/chunk-IZXPVIGP.js.map +1 -0
- package/lib/chunk-J7Z7GIWP.cjs +95 -0
- package/lib/chunk-J7Z7GIWP.cjs.map +1 -0
- package/lib/chunk-JDXVL7EK.cjs +26 -0
- package/lib/chunk-JDXVL7EK.cjs.map +1 -0
- package/lib/chunk-JEQ2X3Z6.cjs +12 -0
- package/lib/chunk-JEQ2X3Z6.cjs.map +1 -0
- package/lib/chunk-JGKX4WVT.cjs +56 -0
- package/lib/chunk-JGKX4WVT.cjs.map +1 -0
- package/lib/chunk-JIJYTTWF.js +45 -0
- package/lib/chunk-JIJYTTWF.js.map +1 -0
- package/lib/chunk-JOVN55GM.js +93 -0
- package/lib/chunk-JOVN55GM.js.map +1 -0
- package/lib/chunk-JSRPPOQC.js +24 -0
- package/lib/chunk-JSRPPOQC.js.map +1 -0
- package/lib/chunk-JVF5KY2J.cjs +22 -0
- package/lib/chunk-JVF5KY2J.cjs.map +1 -0
- package/lib/chunk-JWB7A2P7.cjs +101 -0
- package/lib/chunk-JWB7A2P7.cjs.map +1 -0
- package/lib/chunk-JWO5TMOF.cjs +50 -0
- package/lib/chunk-JWO5TMOF.cjs.map +1 -0
- package/lib/chunk-JY75GB6J.js +45 -0
- package/lib/chunk-JY75GB6J.js.map +1 -0
- package/lib/chunk-JYVDZNYF.cjs +53 -0
- package/lib/chunk-JYVDZNYF.cjs.map +1 -0
- package/lib/chunk-K23MEZLJ.js +45 -0
- package/lib/chunk-K23MEZLJ.js.map +1 -0
- package/lib/chunk-K3QWUNID.cjs +105 -0
- package/lib/chunk-K3QWUNID.cjs.map +1 -0
- package/lib/chunk-K4TU3W2I.cjs +89 -0
- package/lib/chunk-K4TU3W2I.cjs.map +1 -0
- package/lib/chunk-K5M43K4M.js +28 -0
- package/lib/chunk-K5M43K4M.js.map +1 -0
- package/lib/chunk-KE2LKPT2.cjs +282 -0
- package/lib/chunk-KE2LKPT2.cjs.map +1 -0
- package/lib/chunk-KJEWYPKL.js +50 -0
- package/lib/chunk-KJEWYPKL.js.map +1 -0
- package/lib/chunk-KJZPFUCB.js +66 -0
- package/lib/chunk-KJZPFUCB.js.map +1 -0
- package/lib/chunk-KOJCFM4J.js +32 -0
- package/lib/chunk-KOJCFM4J.js.map +1 -0
- package/lib/chunk-KZVXL7XT.js +49 -0
- package/lib/chunk-KZVXL7XT.js.map +1 -0
- package/lib/chunk-L3MQUI2T.js +66 -0
- package/lib/chunk-L3MQUI2T.js.map +1 -0
- package/lib/chunk-LEBNVRZK.js +45 -0
- package/lib/chunk-LEBNVRZK.js.map +1 -0
- package/lib/chunk-LIHR6VSF.js +45 -0
- package/lib/chunk-LIHR6VSF.js.map +1 -0
- package/lib/chunk-LIXIL2W7.js +45 -0
- package/lib/chunk-LIXIL2W7.js.map +1 -0
- package/lib/chunk-LORMBCWI.cjs +77 -0
- package/lib/chunk-LORMBCWI.cjs.map +1 -0
- package/lib/chunk-LURXD472.cjs +54 -0
- package/lib/chunk-LURXD472.cjs.map +1 -0
- package/lib/chunk-LVNRKSSK.js +45 -0
- package/lib/chunk-LVNRKSSK.js.map +1 -0
- package/lib/chunk-M7VMF7DL.cjs +53 -0
- package/lib/chunk-M7VMF7DL.cjs.map +1 -0
- package/lib/chunk-MB2XHINV.cjs +42 -0
- package/lib/chunk-MB2XHINV.cjs.map +1 -0
- package/lib/chunk-MHZVSLOZ.js +69 -0
- package/lib/chunk-MHZVSLOZ.js.map +1 -0
- package/lib/chunk-MKYGCFFQ.cjs +55 -0
- package/lib/chunk-MKYGCFFQ.cjs.map +1 -0
- package/lib/chunk-MSW4UY65.cjs +50 -0
- package/lib/chunk-MSW4UY65.cjs.map +1 -0
- package/lib/chunk-MT62MFPF.js +84 -0
- package/lib/chunk-MT62MFPF.js.map +1 -0
- package/lib/chunk-MUGXSQGM.cjs +47 -0
- package/lib/chunk-MUGXSQGM.cjs.map +1 -0
- package/lib/chunk-N4AVJLPU.cjs +43 -0
- package/lib/chunk-N4AVJLPU.cjs.map +1 -0
- package/lib/chunk-N753UD4K.cjs +22 -0
- package/lib/chunk-N753UD4K.cjs.map +1 -0
- package/lib/chunk-N7GFZRXD.js +82 -0
- package/lib/chunk-N7GFZRXD.js.map +1 -0
- package/lib/chunk-N7PW3QAD.js +49 -0
- package/lib/chunk-N7PW3QAD.js.map +1 -0
- package/lib/chunk-NADXAHTL.js +49 -0
- package/lib/chunk-NADXAHTL.js.map +1 -0
- package/lib/chunk-NAJ5XC7F.cjs +47 -0
- package/lib/chunk-NAJ5XC7F.cjs.map +1 -0
- package/lib/chunk-NCKKWNLW.js +59 -0
- package/lib/chunk-NCKKWNLW.js.map +1 -0
- package/lib/chunk-NE24VBE2.js +55 -0
- package/lib/chunk-NE24VBE2.js.map +1 -0
- package/lib/chunk-NLEKIRTR.js +45 -0
- package/lib/chunk-NLEKIRTR.js.map +1 -0
- package/lib/chunk-NNQNIEWL.js +99 -0
- package/lib/chunk-NNQNIEWL.js.map +1 -0
- package/lib/chunk-NR2UE6JA.cjs +47 -0
- package/lib/chunk-NR2UE6JA.cjs.map +1 -0
- package/lib/chunk-NUYUBR2T.js +40 -0
- package/lib/chunk-NUYUBR2T.js.map +1 -0
- package/lib/chunk-NVWV2DB7.js +41 -0
- package/lib/chunk-NVWV2DB7.js.map +1 -0
- package/lib/chunk-O5PJZWBH.js +93 -0
- package/lib/chunk-O5PJZWBH.js.map +1 -0
- package/lib/chunk-O7BKHNXP.cjs +46 -0
- package/lib/chunk-O7BKHNXP.cjs.map +1 -0
- package/lib/chunk-OAVJPQOW.js +61 -0
- package/lib/chunk-OAVJPQOW.js.map +1 -0
- package/lib/chunk-OBUF6TTM.cjs +39 -0
- package/lib/chunk-OBUF6TTM.cjs.map +1 -0
- package/lib/chunk-OER5YD2H.js +50 -0
- package/lib/chunk-OER5YD2H.js.map +1 -0
- package/lib/chunk-OF35HBQQ.js +280 -0
- package/lib/chunk-OF35HBQQ.js.map +1 -0
- package/lib/chunk-OFLCORLR.cjs +51 -0
- package/lib/chunk-OFLCORLR.cjs.map +1 -0
- package/lib/chunk-OIZGUEIJ.js +48 -0
- package/lib/chunk-OIZGUEIJ.js.map +1 -0
- package/lib/chunk-OKHXQNDT.js +36 -0
- package/lib/chunk-OKHXQNDT.js.map +1 -0
- package/lib/chunk-OPBVUQV2.js +51 -0
- package/lib/chunk-OPBVUQV2.js.map +1 -0
- package/lib/chunk-P4M5UAZM.js +45 -0
- package/lib/chunk-P4M5UAZM.js.map +1 -0
- package/lib/chunk-P5V4XO4C.js +41 -0
- package/lib/chunk-P5V4XO4C.js.map +1 -0
- package/lib/chunk-P6STDLMB.cjs +52 -0
- package/lib/chunk-P6STDLMB.cjs.map +1 -0
- package/lib/chunk-PBZHKR34.cjs +63 -0
- package/lib/chunk-PBZHKR34.cjs.map +1 -0
- package/lib/chunk-PJ55VLJG.cjs +54 -0
- package/lib/chunk-PJ55VLJG.cjs.map +1 -0
- package/lib/chunk-PMKK6RAV.js +64 -0
- package/lib/chunk-PMKK6RAV.js.map +1 -0
- package/lib/chunk-PQE6TCTR.js +124 -0
- package/lib/chunk-PQE6TCTR.js.map +1 -0
- package/lib/chunk-PQVYOUBP.cjs +43 -0
- package/lib/chunk-PQVYOUBP.cjs.map +1 -0
- package/lib/chunk-PYFJA7OD.cjs +50 -0
- package/lib/chunk-PYFJA7OD.cjs.map +1 -0
- package/lib/chunk-Q2J67HA3.cjs +38 -0
- package/lib/chunk-Q2J67HA3.cjs.map +1 -0
- package/lib/chunk-Q5XVEESL.cjs +61 -0
- package/lib/chunk-Q5XVEESL.cjs.map +1 -0
- package/lib/chunk-Q64YHPFK.cjs +47 -0
- package/lib/chunk-Q64YHPFK.cjs.map +1 -0
- package/lib/chunk-Q7PILATE.cjs +38 -0
- package/lib/chunk-Q7PILATE.cjs.map +1 -0
- package/lib/chunk-QAQU6OIM.js +49 -0
- package/lib/chunk-QAQU6OIM.js.map +1 -0
- package/lib/chunk-QFXJXWXT.js +55 -0
- package/lib/chunk-QFXJXWXT.js.map +1 -0
- package/lib/chunk-QIUMAA5U.cjs +95 -0
- package/lib/chunk-QIUMAA5U.cjs.map +1 -0
- package/lib/chunk-QJYTWO2A.js +57 -0
- package/lib/chunk-QJYTWO2A.js.map +1 -0
- package/lib/chunk-QMDQ73MJ.cjs +61 -0
- package/lib/chunk-QMDQ73MJ.cjs.map +1 -0
- package/lib/chunk-QQOJXI6Z.cjs +51 -0
- package/lib/chunk-QQOJXI6Z.cjs.map +1 -0
- package/lib/chunk-QSX5V6NO.js +36 -0
- package/lib/chunk-QSX5V6NO.js.map +1 -0
- package/lib/chunk-QT3SZ2S3.cjs +50 -0
- package/lib/chunk-QT3SZ2S3.cjs.map +1 -0
- package/lib/chunk-QT6CTYDI.js +41 -0
- package/lib/chunk-QT6CTYDI.js.map +1 -0
- package/lib/chunk-QWTTKALU.cjs +40 -0
- package/lib/chunk-QWTTKALU.cjs.map +1 -0
- package/lib/chunk-QZESYVCV.cjs +52 -0
- package/lib/chunk-QZESYVCV.cjs.map +1 -0
- package/lib/chunk-R2LRLUUY.js +35 -0
- package/lib/chunk-R2LRLUUY.js.map +1 -0
- package/lib/chunk-R6D4PVKX.cjs +35 -0
- package/lib/chunk-R6D4PVKX.cjs.map +1 -0
- package/lib/chunk-R6RTXRXP.js +89 -0
- package/lib/chunk-R6RTXRXP.js.map +1 -0
- package/lib/chunk-RIMHFMLM.js +28 -0
- package/lib/chunk-RIMHFMLM.js.map +1 -0
- package/lib/chunk-RLZUBO2G.cjs +51 -0
- package/lib/chunk-RLZUBO2G.cjs.map +1 -0
- package/lib/chunk-RRO546HE.js +45 -0
- package/lib/chunk-RRO546HE.js.map +1 -0
- package/lib/chunk-RS3CY7RY.js +53 -0
- package/lib/chunk-RS3CY7RY.js.map +1 -0
- package/lib/chunk-RT5FL7XE.js +41 -0
- package/lib/chunk-RT5FL7XE.js.map +1 -0
- package/lib/chunk-S6YAGIA2.cjs +43 -0
- package/lib/chunk-S6YAGIA2.cjs.map +1 -0
- package/lib/chunk-SJKKZJFB.js +45 -0
- package/lib/chunk-SJKKZJFB.js.map +1 -0
- package/lib/chunk-SM2NGL5E.js +45 -0
- package/lib/chunk-SM2NGL5E.js.map +1 -0
- package/lib/chunk-SPG7F6W2.cjs +55 -0
- package/lib/chunk-SPG7F6W2.cjs.map +1 -0
- package/lib/chunk-SRW7OWVS.cjs +40 -0
- package/lib/chunk-SRW7OWVS.cjs.map +1 -0
- package/lib/chunk-SZW75RX5.js +93 -0
- package/lib/chunk-SZW75RX5.js.map +1 -0
- package/lib/chunk-T4SIZV7L.cjs +57 -0
- package/lib/chunk-T4SIZV7L.cjs.map +1 -0
- package/lib/chunk-T52QAZNX.cjs +35 -0
- package/lib/chunk-T52QAZNX.cjs.map +1 -0
- package/lib/chunk-TBRWZGNA.js +45 -0
- package/lib/chunk-TBRWZGNA.js.map +1 -0
- package/lib/chunk-TDK6MSPY.js +45 -0
- package/lib/chunk-TDK6MSPY.js.map +1 -0
- package/lib/chunk-TQ5EVIGW.js +49 -0
- package/lib/chunk-TQ5EVIGW.js.map +1 -0
- package/lib/chunk-U2PEG3HM.js +45 -0
- package/lib/chunk-U2PEG3HM.js.map +1 -0
- package/lib/chunk-U7IZGAMR.js +49 -0
- package/lib/chunk-U7IZGAMR.js.map +1 -0
- package/lib/chunk-UBFCVEI3.js +45 -0
- package/lib/chunk-UBFCVEI3.js.map +1 -0
- package/lib/chunk-UDHY2MB5.cjs +51 -0
- package/lib/chunk-UDHY2MB5.cjs.map +1 -0
- package/lib/chunk-UN7V5GMB.cjs +91 -0
- package/lib/chunk-UN7V5GMB.cjs.map +1 -0
- package/lib/chunk-UOBOW5IB.js +45 -0
- package/lib/chunk-UOBOW5IB.js.map +1 -0
- package/lib/chunk-UOUMLS42.cjs +47 -0
- package/lib/chunk-UOUMLS42.cjs.map +1 -0
- package/lib/chunk-UPT6VVOV.cjs +98 -0
- package/lib/chunk-UPT6VVOV.cjs.map +1 -0
- package/lib/chunk-UR4EQ5TD.cjs +95 -0
- package/lib/chunk-UR4EQ5TD.cjs.map +1 -0
- package/lib/chunk-URXE6C3U.js +60 -0
- package/lib/chunk-URXE6C3U.js.map +1 -0
- package/lib/chunk-VB2QSU5M.cjs +69 -0
- package/lib/chunk-VB2QSU5M.cjs.map +1 -0
- package/lib/chunk-VD236VYU.cjs +47 -0
- package/lib/chunk-VD236VYU.cjs.map +1 -0
- package/lib/chunk-VKEYQUCF.js +36 -0
- package/lib/chunk-VKEYQUCF.js.map +1 -0
- package/lib/chunk-VP7I376Q.js +40 -0
- package/lib/chunk-VP7I376Q.js.map +1 -0
- package/lib/chunk-VRU2UGPN.cjs +46 -0
- package/lib/chunk-VRU2UGPN.cjs.map +1 -0
- package/lib/chunk-VRXXWQRL.cjs +282 -0
- package/lib/chunk-VRXXWQRL.cjs.map +1 -0
- package/lib/chunk-VV4DII4R.cjs +70 -0
- package/lib/chunk-VV4DII4R.cjs.map +1 -0
- package/lib/chunk-VX5APQQJ.js +73 -0
- package/lib/chunk-VX5APQQJ.js.map +1 -0
- package/lib/chunk-W3SYTX6F.js +49 -0
- package/lib/chunk-W3SYTX6F.js.map +1 -0
- package/lib/chunk-W4ZTXJH3.js +96 -0
- package/lib/chunk-W4ZTXJH3.js.map +1 -0
- package/lib/chunk-WAL76UPE.cjs +153 -0
- package/lib/chunk-WAL76UPE.cjs.map +1 -0
- package/lib/chunk-WLNQ5IJG.cjs +47 -0
- package/lib/chunk-WLNQ5IJG.cjs.map +1 -0
- package/lib/chunk-WWUILZ4S.cjs +57 -0
- package/lib/chunk-WWUILZ4S.cjs.map +1 -0
- package/lib/chunk-XAABBRMY.js +274 -0
- package/lib/chunk-XAABBRMY.js.map +1 -0
- package/lib/chunk-XCY643SK.cjs +38 -0
- package/lib/chunk-XCY643SK.cjs.map +1 -0
- package/lib/chunk-XD7GS4QW.js +20 -0
- package/lib/chunk-XD7GS4QW.js.map +1 -0
- package/lib/chunk-XEQPW7EY.cjs +67 -0
- package/lib/chunk-XEQPW7EY.cjs.map +1 -0
- package/lib/chunk-XG3BBOQC.js +33 -0
- package/lib/chunk-XG3BBOQC.js.map +1 -0
- package/lib/chunk-XIDAGHQ3.js +45 -0
- package/lib/chunk-XIDAGHQ3.js.map +1 -0
- package/lib/chunk-XNQHTNRU.js +65 -0
- package/lib/chunk-XNQHTNRU.js.map +1 -0
- package/lib/chunk-XUDOA53I.cjs +30 -0
- package/lib/chunk-XUDOA53I.cjs.map +1 -0
- package/lib/chunk-XV7JPEMC.js +53 -0
- package/lib/chunk-XV7JPEMC.js.map +1 -0
- package/lib/chunk-XZVEHDCJ.js +49 -0
- package/lib/chunk-XZVEHDCJ.js.map +1 -0
- package/lib/chunk-Y63HZGYO.js +32 -0
- package/lib/chunk-Y63HZGYO.js.map +1 -0
- package/lib/chunk-YEAWOUGM.cjs +51 -0
- package/lib/chunk-YEAWOUGM.cjs.map +1 -0
- package/lib/chunk-YFDW473C.cjs +71 -0
- package/lib/chunk-YFDW473C.cjs.map +1 -0
- package/lib/chunk-YGRMZILG.cjs +62 -0
- package/lib/chunk-YGRMZILG.cjs.map +1 -0
- package/lib/chunk-YJ76LM3Y.cjs +47 -0
- package/lib/chunk-YJ76LM3Y.cjs.map +1 -0
- package/lib/chunk-YORWAYDL.cjs +47 -0
- package/lib/chunk-YORWAYDL.cjs.map +1 -0
- package/lib/chunk-YVFBCUQ6.cjs +47 -0
- package/lib/chunk-YVFBCUQ6.cjs.map +1 -0
- package/lib/chunk-YW72SW25.js +63 -0
- package/lib/chunk-YW72SW25.js.map +1 -0
- package/lib/chunk-YWLWTQ5X.js +49 -0
- package/lib/chunk-YWLWTQ5X.js.map +1 -0
- package/lib/chunk-YXDNZZT7.js +45 -0
- package/lib/chunk-YXDNZZT7.js.map +1 -0
- package/lib/chunk-YY5ENJSH.cjs +63 -0
- package/lib/chunk-YY5ENJSH.cjs.map +1 -0
- package/lib/chunk-Z4BLXS3O.js +45 -0
- package/lib/chunk-Z4BLXS3O.js.map +1 -0
- package/lib/chunk-ZHKKNAPU.cjs +42 -0
- package/lib/chunk-ZHKKNAPU.cjs.map +1 -0
- package/lib/chunk-ZHM3FU7I.cjs +47 -0
- package/lib/chunk-ZHM3FU7I.cjs.map +1 -0
- package/lib/chunk-ZJC6ALGW.js +51 -0
- package/lib/chunk-ZJC6ALGW.js.map +1 -0
- package/lib/chunk-ZONTQPPL.js +40 -0
- package/lib/chunk-ZONTQPPL.js.map +1 -0
- package/lib/chunk-ZU7GFVQ6.js +153 -0
- package/lib/chunk-ZU7GFVQ6.js.map +1 -0
- package/lib/chunk-ZZAXYDCE.cjs +55 -0
- package/lib/chunk-ZZAXYDCE.cjs.map +1 -0
- package/lib/client.cjs +7 -151
- package/lib/client.cjs.map +1 -1
- package/lib/client.js +6 -149
- package/lib/client.js.map +1 -1
- package/lib/commercelayer.cjs +26 -106
- package/lib/commercelayer.cjs.map +1 -1
- package/lib/commercelayer.js +10 -102
- package/lib/commercelayer.js.map +1 -1
- package/lib/config.cjs +5 -16
- package/lib/config.cjs.map +1 -1
- package/lib/config.js +2 -17
- package/lib/config.js.map +1 -1
- package/lib/debug.cjs +5 -14
- package/lib/debug.cjs.map +1 -1
- package/lib/debug.js +2 -15
- package/lib/debug.js.map +1 -1
- package/lib/enum.cjs +64 -654
- package/lib/enum.cjs.map +1 -1
- package/lib/enum.js +2 -641
- package/lib/enum.js.map +1 -1
- package/lib/error.cjs +32 -95
- package/lib/error.cjs.map +1 -1
- package/lib/error.js +3 -91
- package/lib/error.js.map +1 -1
- package/lib/fetch.cjs +11 -64
- package/lib/fetch.cjs.map +1 -1
- package/lib/fetch.js +3 -62
- package/lib/fetch.js.map +1 -1
- package/lib/index.cjs +672 -18
- package/lib/index.cjs.map +1 -1
- package/lib/index.js +143 -3
- package/lib/index.js.map +1 -1
- package/lib/jsonapi.cjs +17 -74
- package/lib/jsonapi.cjs.map +1 -1
- package/lib/jsonapi.js +9 -71
- package/lib/jsonapi.js.map +1 -1
- package/lib/query.cjs +16 -59
- package/lib/query.cjs.map +1 -1
- package/lib/query.js +4 -56
- package/lib/query.js.map +1 -1
- package/lib/resource.cjs +29 -212
- package/lib/resource.cjs.map +1 -1
- package/lib/resource.js +9 -205
- package/lib/resource.js.map +1 -1
- package/lib/resources/addresses.cjs +12 -50
- package/lib/resources/addresses.cjs.map +1 -1
- package/lib/resources/addresses.js +10 -52
- package/lib/resources/addresses.js.map +1 -1
- package/lib/resources/adjustments.cjs +12 -32
- package/lib/resources/adjustments.cjs.map +1 -1
- package/lib/resources/adjustments.js +10 -34
- package/lib/resources/adjustments.js.map +1 -1
- package/lib/resources/adyen_gateways.cjs +12 -40
- package/lib/resources/adyen_gateways.cjs.map +1 -1
- package/lib/resources/adyen_gateways.js +10 -42
- package/lib/resources/adyen_gateways.js.map +1 -1
- package/lib/resources/adyen_payments.cjs +12 -46
- package/lib/resources/adyen_payments.cjs.map +1 -1
- package/lib/resources/adyen_payments.js +10 -48
- package/lib/resources/adyen_payments.js.map +1 -1
- package/lib/resources/applications.cjs +12 -22
- package/lib/resources/applications.cjs.map +1 -1
- package/lib/resources/applications.js +10 -24
- package/lib/resources/applications.js.map +1 -1
- package/lib/resources/attachments.cjs +12 -28
- package/lib/resources/attachments.cjs.map +1 -1
- package/lib/resources/attachments.js +10 -30
- package/lib/resources/attachments.js.map +1 -1
- package/lib/resources/authorizations.cjs +12 -61
- package/lib/resources/authorizations.cjs.map +1 -1
- package/lib/resources/authorizations.js +10 -63
- package/lib/resources/authorizations.js.map +1 -1
- package/lib/resources/avalara_accounts.cjs +12 -48
- package/lib/resources/avalara_accounts.cjs.map +1 -1
- package/lib/resources/avalara_accounts.js +10 -50
- package/lib/resources/avalara_accounts.js.map +1 -1
- package/lib/resources/axerve_gateways.cjs +12 -40
- package/lib/resources/axerve_gateways.cjs.map +1 -1
- package/lib/resources/axerve_gateways.js +10 -42
- package/lib/resources/axerve_gateways.js.map +1 -1
- package/lib/resources/axerve_payments.cjs +12 -43
- package/lib/resources/axerve_payments.cjs.map +1 -1
- package/lib/resources/axerve_payments.js +10 -45
- package/lib/resources/axerve_payments.js.map +1 -1
- package/lib/resources/bing_geocoders.cjs +12 -40
- package/lib/resources/bing_geocoders.cjs.map +1 -1
- package/lib/resources/bing_geocoders.js +10 -42
- package/lib/resources/bing_geocoders.js.map +1 -1
- package/lib/resources/braintree_gateways.cjs +12 -40
- package/lib/resources/braintree_gateways.cjs.map +1 -1
- package/lib/resources/braintree_gateways.js +10 -42
- package/lib/resources/braintree_gateways.js.map +1 -1
- package/lib/resources/braintree_payments.cjs +12 -40
- package/lib/resources/braintree_payments.cjs.map +1 -1
- package/lib/resources/braintree_payments.js +10 -42
- package/lib/resources/braintree_payments.js.map +1 -1
- package/lib/resources/bundles.cjs +12 -68
- package/lib/resources/bundles.cjs.map +1 -1
- package/lib/resources/bundles.js +10 -70
- package/lib/resources/bundles.js.map +1 -1
- package/lib/resources/buy_x_pay_y_promotions.cjs +12 -88
- package/lib/resources/buy_x_pay_y_promotions.cjs.map +1 -1
- package/lib/resources/buy_x_pay_y_promotions.js +10 -90
- package/lib/resources/buy_x_pay_y_promotions.js.map +1 -1
- package/lib/resources/captures.cjs +12 -62
- package/lib/resources/captures.cjs.map +1 -1
- package/lib/resources/captures.js +10 -64
- package/lib/resources/captures.js.map +1 -1
- package/lib/resources/carrier_accounts.cjs +12 -40
- package/lib/resources/carrier_accounts.cjs.map +1 -1
- package/lib/resources/carrier_accounts.js +10 -42
- package/lib/resources/carrier_accounts.js.map +1 -1
- package/lib/resources/checkout_com_gateways.cjs +12 -40
- package/lib/resources/checkout_com_gateways.cjs.map +1 -1
- package/lib/resources/checkout_com_gateways.js +10 -42
- package/lib/resources/checkout_com_gateways.js.map +1 -1
- package/lib/resources/checkout_com_payments.cjs +12 -46
- package/lib/resources/checkout_com_payments.cjs.map +1 -1
- package/lib/resources/checkout_com_payments.js +10 -48
- package/lib/resources/checkout_com_payments.js.map +1 -1
- package/lib/resources/cleanups.cjs +12 -39
- package/lib/resources/cleanups.cjs.map +1 -1
- package/lib/resources/cleanups.js +10 -41
- package/lib/resources/cleanups.js.map +1 -1
- package/lib/resources/coupon_codes_promotion_rules.cjs +12 -36
- package/lib/resources/coupon_codes_promotion_rules.cjs.map +1 -1
- package/lib/resources/coupon_codes_promotion_rules.js +10 -38
- package/lib/resources/coupon_codes_promotion_rules.js.map +1 -1
- package/lib/resources/coupon_recipients.cjs +12 -40
- package/lib/resources/coupon_recipients.cjs.map +1 -1
- package/lib/resources/coupon_recipients.js +10 -42
- package/lib/resources/coupon_recipients.js.map +1 -1
- package/lib/resources/coupons.cjs +12 -54
- package/lib/resources/coupons.cjs.map +1 -1
- package/lib/resources/coupons.js +10 -56
- package/lib/resources/coupons.js.map +1 -1
- package/lib/resources/custom_promotion_rules.cjs +12 -32
- package/lib/resources/custom_promotion_rules.cjs.map +1 -1
- package/lib/resources/custom_promotion_rules.js +10 -34
- package/lib/resources/custom_promotion_rules.js.map +1 -1
- package/lib/resources/customer_addresses.cjs +12 -44
- package/lib/resources/customer_addresses.cjs.map +1 -1
- package/lib/resources/customer_addresses.js +10 -46
- package/lib/resources/customer_addresses.js.map +1 -1
- package/lib/resources/customer_groups.cjs +12 -44
- package/lib/resources/customer_groups.cjs.map +1 -1
- package/lib/resources/customer_groups.js +10 -46
- package/lib/resources/customer_groups.js.map +1 -1
- package/lib/resources/customer_password_resets.cjs +12 -39
- package/lib/resources/customer_password_resets.cjs.map +1 -1
- package/lib/resources/customer_password_resets.js +10 -41
- package/lib/resources/customer_password_resets.js.map +1 -1
- package/lib/resources/customer_payment_sources.cjs +12 -40
- package/lib/resources/customer_payment_sources.cjs.map +1 -1
- package/lib/resources/customer_payment_sources.js +10 -42
- package/lib/resources/customer_payment_sources.js.map +1 -1
- package/lib/resources/customer_subscriptions.cjs +12 -40
- package/lib/resources/customer_subscriptions.cjs.map +1 -1
- package/lib/resources/customer_subscriptions.js +10 -42
- package/lib/resources/customer_subscriptions.js.map +1 -1
- package/lib/resources/customers.cjs +12 -78
- package/lib/resources/customers.cjs.map +1 -1
- package/lib/resources/customers.js +10 -80
- package/lib/resources/customers.js.map +1 -1
- package/lib/resources/delivery_lead_times.cjs +12 -44
- package/lib/resources/delivery_lead_times.cjs.map +1 -1
- package/lib/resources/delivery_lead_times.js +10 -46
- package/lib/resources/delivery_lead_times.js.map +1 -1
- package/lib/resources/discount_engine_items.cjs +12 -27
- package/lib/resources/discount_engine_items.cjs.map +1 -1
- package/lib/resources/discount_engine_items.js +10 -29
- package/lib/resources/discount_engine_items.js.map +1 -1
- package/lib/resources/discount_engines.cjs +12 -35
- package/lib/resources/discount_engines.cjs.map +1 -1
- package/lib/resources/discount_engines.js +10 -37
- package/lib/resources/discount_engines.js.map +1 -1
- package/lib/resources/easypost_pickups.cjs +12 -43
- package/lib/resources/easypost_pickups.cjs.map +1 -1
- package/lib/resources/easypost_pickups.js +10 -45
- package/lib/resources/easypost_pickups.js.map +1 -1
- package/lib/resources/event_callbacks.cjs +12 -23
- package/lib/resources/event_callbacks.cjs.map +1 -1
- package/lib/resources/event_callbacks.js +10 -25
- package/lib/resources/event_callbacks.js.map +1 -1
- package/lib/resources/events.cjs +12 -33
- package/lib/resources/events.cjs.map +1 -1
- package/lib/resources/events.js +10 -35
- package/lib/resources/events.js.map +1 -1
- package/lib/resources/exports.cjs +12 -39
- package/lib/resources/exports.cjs.map +1 -1
- package/lib/resources/exports.js +10 -41
- package/lib/resources/exports.js.map +1 -1
- package/lib/resources/external_gateways.cjs +12 -43
- package/lib/resources/external_gateways.cjs.map +1 -1
- package/lib/resources/external_gateways.js +10 -45
- package/lib/resources/external_gateways.js.map +1 -1
- package/lib/resources/external_payments.cjs +12 -44
- package/lib/resources/external_payments.cjs.map +1 -1
- package/lib/resources/external_payments.js +10 -46
- package/lib/resources/external_payments.js.map +1 -1
- package/lib/resources/external_promotions.cjs +12 -91
- package/lib/resources/external_promotions.cjs.map +1 -1
- package/lib/resources/external_promotions.js +10 -93
- package/lib/resources/external_promotions.js.map +1 -1
- package/lib/resources/external_tax_calculators.cjs +12 -47
- package/lib/resources/external_tax_calculators.cjs.map +1 -1
- package/lib/resources/external_tax_calculators.js +10 -49
- package/lib/resources/external_tax_calculators.js.map +1 -1
- package/lib/resources/fixed_amount_promotions.cjs +12 -88
- package/lib/resources/fixed_amount_promotions.cjs.map +1 -1
- package/lib/resources/fixed_amount_promotions.js +10 -90
- package/lib/resources/fixed_amount_promotions.js.map +1 -1
- package/lib/resources/fixed_price_promotions.cjs +12 -88
- package/lib/resources/fixed_price_promotions.cjs.map +1 -1
- package/lib/resources/fixed_price_promotions.js +10 -90
- package/lib/resources/fixed_price_promotions.js.map +1 -1
- package/lib/resources/flex_promotions.cjs +12 -64
- package/lib/resources/flex_promotions.cjs.map +1 -1
- package/lib/resources/flex_promotions.js +10 -66
- package/lib/resources/flex_promotions.js.map +1 -1
- package/lib/resources/free_gift_promotions.cjs +12 -88
- package/lib/resources/free_gift_promotions.cjs.map +1 -1
- package/lib/resources/free_gift_promotions.js +10 -90
- package/lib/resources/free_gift_promotions.js.map +1 -1
- package/lib/resources/free_shipping_promotions.cjs +12 -84
- package/lib/resources/free_shipping_promotions.cjs.map +1 -1
- package/lib/resources/free_shipping_promotions.js +10 -86
- package/lib/resources/free_shipping_promotions.js.map +1 -1
- package/lib/resources/geocoders.cjs +12 -31
- package/lib/resources/geocoders.cjs.map +1 -1
- package/lib/resources/geocoders.js +10 -33
- package/lib/resources/geocoders.js.map +1 -1
- package/lib/resources/gift_card_recipients.cjs +12 -40
- package/lib/resources/gift_card_recipients.cjs.map +1 -1
- package/lib/resources/gift_card_recipients.js +10 -42
- package/lib/resources/gift_card_recipients.js.map +1 -1
- package/lib/resources/gift_cards.cjs +12 -70
- package/lib/resources/gift_cards.cjs.map +1 -1
- package/lib/resources/gift_cards.js +10 -72
- package/lib/resources/gift_cards.js.map +1 -1
- package/lib/resources/google_geocoders.cjs +12 -40
- package/lib/resources/google_geocoders.cjs.map +1 -1
- package/lib/resources/google_geocoders.js +10 -42
- package/lib/resources/google_geocoders.js.map +1 -1
- package/lib/resources/imports.cjs +12 -35
- package/lib/resources/imports.cjs.map +1 -1
- package/lib/resources/imports.js +10 -37
- package/lib/resources/imports.js.map +1 -1
- package/lib/resources/in_stock_subscriptions.cjs +12 -54
- package/lib/resources/in_stock_subscriptions.cjs.map +1 -1
- package/lib/resources/in_stock_subscriptions.js +10 -56
- package/lib/resources/in_stock_subscriptions.js.map +1 -1
- package/lib/resources/inventory_models.cjs +12 -44
- package/lib/resources/inventory_models.cjs.map +1 -1
- package/lib/resources/inventory_models.js +10 -46
- package/lib/resources/inventory_models.js.map +1 -1
- package/lib/resources/inventory_return_locations.cjs +12 -40
- package/lib/resources/inventory_return_locations.cjs.map +1 -1
- package/lib/resources/inventory_return_locations.js +10 -42
- package/lib/resources/inventory_return_locations.js.map +1 -1
- package/lib/resources/inventory_stock_locations.cjs +12 -40
- package/lib/resources/inventory_stock_locations.cjs.map +1 -1
- package/lib/resources/inventory_stock_locations.js +10 -42
- package/lib/resources/inventory_stock_locations.js.map +1 -1
- package/lib/resources/klarna_gateways.cjs +12 -40
- package/lib/resources/klarna_gateways.cjs.map +1 -1
- package/lib/resources/klarna_gateways.js +10 -42
- package/lib/resources/klarna_gateways.js.map +1 -1
- package/lib/resources/klarna_payments.cjs +12 -43
- package/lib/resources/klarna_payments.cjs.map +1 -1
- package/lib/resources/klarna_payments.js +10 -45
- package/lib/resources/klarna_payments.js.map +1 -1
- package/lib/resources/line_item_options.cjs +12 -50
- package/lib/resources/line_item_options.cjs.map +1 -1
- package/lib/resources/line_item_options.js +10 -52
- package/lib/resources/line_item_options.js.map +1 -1
- package/lib/resources/line_items.cjs +12 -79
- package/lib/resources/line_items.cjs.map +1 -1
- package/lib/resources/line_items.js +10 -81
- package/lib/resources/line_items.js.map +1 -1
- package/lib/resources/links.cjs +12 -38
- package/lib/resources/links.cjs.map +1 -1
- package/lib/resources/links.js +10 -40
- package/lib/resources/links.js.map +1 -1
- package/lib/resources/manual_gateways.cjs +12 -36
- package/lib/resources/manual_gateways.cjs.map +1 -1
- package/lib/resources/manual_gateways.js +10 -38
- package/lib/resources/manual_gateways.js.map +1 -1
- package/lib/resources/manual_tax_calculators.cjs +12 -48
- package/lib/resources/manual_tax_calculators.cjs.map +1 -1
- package/lib/resources/manual_tax_calculators.js +10 -50
- package/lib/resources/manual_tax_calculators.js.map +1 -1
- package/lib/resources/markets.cjs +12 -94
- package/lib/resources/markets.cjs.map +1 -1
- package/lib/resources/markets.js +10 -96
- package/lib/resources/markets.js.map +1 -1
- package/lib/resources/merchants.cjs +12 -40
- package/lib/resources/merchants.cjs.map +1 -1
- package/lib/resources/merchants.js +10 -42
- package/lib/resources/merchants.js.map +1 -1
- package/lib/resources/notifications.cjs +12 -28
- package/lib/resources/notifications.cjs.map +1 -1
- package/lib/resources/notifications.js +10 -30
- package/lib/resources/notifications.js.map +1 -1
- package/lib/resources/order_amount_promotion_rules.cjs +12 -32
- package/lib/resources/order_amount_promotion_rules.cjs.map +1 -1
- package/lib/resources/order_amount_promotion_rules.js +10 -34
- package/lib/resources/order_amount_promotion_rules.js.map +1 -1
- package/lib/resources/order_copies.cjs +12 -44
- package/lib/resources/order_copies.cjs.map +1 -1
- package/lib/resources/order_copies.js +10 -46
- package/lib/resources/order_copies.js.map +1 -1
- package/lib/resources/order_factories.cjs +12 -31
- package/lib/resources/order_factories.cjs.map +1 -1
- package/lib/resources/order_factories.js +10 -33
- package/lib/resources/order_factories.js.map +1 -1
- package/lib/resources/order_subscription_items.cjs +12 -36
- package/lib/resources/order_subscription_items.cjs.map +1 -1
- package/lib/resources/order_subscription_items.js +10 -38
- package/lib/resources/order_subscription_items.js.map +1 -1
- package/lib/resources/order_subscriptions.cjs +12 -94
- package/lib/resources/order_subscriptions.cjs.map +1 -1
- package/lib/resources/order_subscriptions.js +10 -96
- package/lib/resources/order_subscriptions.js.map +1 -1
- package/lib/resources/orders.cjs +12 -275
- package/lib/resources/orders.cjs.map +1 -1
- package/lib/resources/orders.js +10 -277
- package/lib/resources/orders.js.map +1 -1
- package/lib/resources/organizations.cjs +12 -22
- package/lib/resources/organizations.cjs.map +1 -1
- package/lib/resources/organizations.js +10 -24
- package/lib/resources/organizations.js.map +1 -1
- package/lib/resources/packages.cjs +12 -44
- package/lib/resources/packages.cjs.map +1 -1
- package/lib/resources/packages.js +10 -46
- package/lib/resources/packages.js.map +1 -1
- package/lib/resources/parcel_line_items.cjs +12 -40
- package/lib/resources/parcel_line_items.cjs.map +1 -1
- package/lib/resources/parcel_line_items.js +10 -42
- package/lib/resources/parcel_line_items.js.map +1 -1
- package/lib/resources/parcels.cjs +12 -52
- package/lib/resources/parcels.cjs.map +1 -1
- package/lib/resources/parcels.js +10 -54
- package/lib/resources/parcels.js.map +1 -1
- package/lib/resources/payment_gateways.cjs +12 -27
- package/lib/resources/payment_gateways.cjs.map +1 -1
- package/lib/resources/payment_gateways.js +10 -29
- package/lib/resources/payment_gateways.js.map +1 -1
- package/lib/resources/payment_methods.cjs +12 -58
- package/lib/resources/payment_methods.cjs.map +1 -1
- package/lib/resources/payment_methods.js +10 -60
- package/lib/resources/payment_methods.js.map +1 -1
- package/lib/resources/payment_options.cjs +12 -36
- package/lib/resources/payment_options.cjs.map +1 -1
- package/lib/resources/payment_options.js +10 -38
- package/lib/resources/payment_options.js.map +1 -1
- package/lib/resources/paypal_gateways.cjs +12 -40
- package/lib/resources/paypal_gateways.cjs.map +1 -1
- package/lib/resources/paypal_gateways.js +10 -42
- package/lib/resources/paypal_gateways.js.map +1 -1
- package/lib/resources/paypal_payments.cjs +12 -40
- package/lib/resources/paypal_payments.cjs.map +1 -1
- package/lib/resources/paypal_payments.js +10 -42
- package/lib/resources/paypal_payments.js.map +1 -1
- package/lib/resources/percentage_discount_promotions.cjs +12 -88
- package/lib/resources/percentage_discount_promotions.cjs.map +1 -1
- package/lib/resources/percentage_discount_promotions.js +10 -90
- package/lib/resources/percentage_discount_promotions.js.map +1 -1
- package/lib/resources/pickups.cjs +12 -31
- package/lib/resources/pickups.cjs.map +1 -1
- package/lib/resources/pickups.js +10 -33
- package/lib/resources/pickups.js.map +1 -1
- package/lib/resources/price_frequency_tiers.cjs +12 -44
- package/lib/resources/price_frequency_tiers.cjs.map +1 -1
- package/lib/resources/price_frequency_tiers.js +10 -46
- package/lib/resources/price_frequency_tiers.js.map +1 -1
- package/lib/resources/price_list_schedulers.cjs +12 -50
- package/lib/resources/price_list_schedulers.cjs.map +1 -1
- package/lib/resources/price_list_schedulers.js +10 -52
- package/lib/resources/price_list_schedulers.js.map +1 -1
- package/lib/resources/price_lists.cjs +12 -44
- package/lib/resources/price_lists.cjs.map +1 -1
- package/lib/resources/price_lists.js +10 -46
- package/lib/resources/price_lists.js.map +1 -1
- package/lib/resources/price_tiers.cjs +12 -31
- package/lib/resources/price_tiers.cjs.map +1 -1
- package/lib/resources/price_tiers.js +10 -33
- package/lib/resources/price_tiers.js.map +1 -1
- package/lib/resources/price_volume_tiers.cjs +12 -44
- package/lib/resources/price_volume_tiers.cjs.map +1 -1
- package/lib/resources/price_volume_tiers.js +10 -46
- package/lib/resources/price_volume_tiers.js.map +1 -1
- package/lib/resources/prices.cjs +12 -68
- package/lib/resources/prices.cjs.map +1 -1
- package/lib/resources/prices.js +10 -70
- package/lib/resources/prices.js.map +1 -1
- package/lib/resources/promotion_rules.cjs +12 -23
- package/lib/resources/promotion_rules.cjs.map +1 -1
- package/lib/resources/promotion_rules.js +10 -25
- package/lib/resources/promotion_rules.js.map +1 -1
- package/lib/resources/promotions.cjs +12 -63
- package/lib/resources/promotions.cjs.map +1 -1
- package/lib/resources/promotions.js +10 -65
- package/lib/resources/promotions.js.map +1 -1
- package/lib/resources/recurring_order_copies.cjs +12 -44
- package/lib/resources/recurring_order_copies.cjs.map +1 -1
- package/lib/resources/recurring_order_copies.js +10 -46
- package/lib/resources/recurring_order_copies.js.map +1 -1
- package/lib/resources/refunds.cjs +12 -49
- package/lib/resources/refunds.cjs.map +1 -1
- package/lib/resources/refunds.js +10 -51
- package/lib/resources/refunds.js.map +1 -1
- package/lib/resources/reserved_stocks.cjs +12 -35
- package/lib/resources/reserved_stocks.cjs.map +1 -1
- package/lib/resources/reserved_stocks.js +10 -37
- package/lib/resources/reserved_stocks.js.map +1 -1
- package/lib/resources/resource_errors.cjs +12 -19
- package/lib/resources/resource_errors.cjs.map +1 -1
- package/lib/resources/resource_errors.js +10 -21
- package/lib/resources/resource_errors.js.map +1 -1
- package/lib/resources/return_line_items.cjs +12 -39
- package/lib/resources/return_line_items.cjs.map +1 -1
- package/lib/resources/return_line_items.js +10 -41
- package/lib/resources/return_line_items.js.map +1 -1
- package/lib/resources/returns.cjs +12 -119
- package/lib/resources/returns.cjs.map +1 -1
- package/lib/resources/returns.js +10 -121
- package/lib/resources/returns.js.map +1 -1
- package/lib/resources/satispay_gateways.cjs +12 -40
- package/lib/resources/satispay_gateways.cjs.map +1 -1
- package/lib/resources/satispay_gateways.js +10 -42
- package/lib/resources/satispay_gateways.js.map +1 -1
- package/lib/resources/satispay_payments.cjs +12 -43
- package/lib/resources/satispay_payments.cjs.map +1 -1
- package/lib/resources/satispay_payments.js +10 -45
- package/lib/resources/satispay_payments.js.map +1 -1
- package/lib/resources/shipments.cjs +12 -149
- package/lib/resources/shipments.cjs.map +1 -1
- package/lib/resources/shipments.js +10 -151
- package/lib/resources/shipments.js.map +1 -1
- package/lib/resources/shipping_categories.cjs +12 -40
- package/lib/resources/shipping_categories.cjs.map +1 -1
- package/lib/resources/shipping_categories.js +10 -42
- package/lib/resources/shipping_categories.js.map +1 -1
- package/lib/resources/shipping_method_tiers.cjs +12 -31
- package/lib/resources/shipping_method_tiers.cjs.map +1 -1
- package/lib/resources/shipping_method_tiers.js +10 -33
- package/lib/resources/shipping_method_tiers.js.map +1 -1
- package/lib/resources/shipping_methods.cjs +12 -77
- package/lib/resources/shipping_methods.cjs.map +1 -1
- package/lib/resources/shipping_methods.js +10 -79
- package/lib/resources/shipping_methods.js.map +1 -1
- package/lib/resources/shipping_weight_tiers.cjs +12 -40
- package/lib/resources/shipping_weight_tiers.cjs.map +1 -1
- package/lib/resources/shipping_weight_tiers.js +10 -42
- package/lib/resources/shipping_weight_tiers.js.map +1 -1
- package/lib/resources/shipping_zones.cjs +12 -36
- package/lib/resources/shipping_zones.cjs.map +1 -1
- package/lib/resources/shipping_zones.js +10 -38
- package/lib/resources/shipping_zones.js.map +1 -1
- package/lib/resources/sku_list_items.cjs +12 -40
- package/lib/resources/sku_list_items.cjs.map +1 -1
- package/lib/resources/sku_list_items.js +10 -42
- package/lib/resources/sku_list_items.js.map +1 -1
- package/lib/resources/sku_list_promotion_rules.cjs +12 -40
- package/lib/resources/sku_list_promotion_rules.cjs.map +1 -1
- package/lib/resources/sku_list_promotion_rules.js +10 -42
- package/lib/resources/sku_list_promotion_rules.js.map +1 -1
- package/lib/resources/sku_lists.cjs +12 -56
- package/lib/resources/sku_lists.cjs.map +1 -1
- package/lib/resources/sku_lists.js +10 -58
- package/lib/resources/sku_lists.js.map +1 -1
- package/lib/resources/sku_options.cjs +12 -54
- package/lib/resources/sku_options.cjs.map +1 -1
- package/lib/resources/sku_options.js +10 -56
- package/lib/resources/sku_options.js.map +1 -1
- package/lib/resources/skus.cjs +12 -98
- package/lib/resources/skus.cjs.map +1 -1
- package/lib/resources/skus.js +10 -100
- package/lib/resources/skus.js.map +1 -1
- package/lib/resources/stock_items.cjs +12 -55
- package/lib/resources/stock_items.cjs.map +1 -1
- package/lib/resources/stock_items.js +10 -57
- package/lib/resources/stock_items.js.map +1 -1
- package/lib/resources/stock_line_items.cjs +12 -61
- package/lib/resources/stock_line_items.cjs.map +1 -1
- package/lib/resources/stock_line_items.js +10 -63
- package/lib/resources/stock_line_items.js.map +1 -1
- package/lib/resources/stock_locations.cjs +12 -60
- package/lib/resources/stock_locations.cjs.map +1 -1
- package/lib/resources/stock_locations.js +10 -62
- package/lib/resources/stock_locations.js.map +1 -1
- package/lib/resources/stock_reservations.cjs +12 -59
- package/lib/resources/stock_reservations.cjs.map +1 -1
- package/lib/resources/stock_reservations.js +10 -61
- package/lib/resources/stock_reservations.js.map +1 -1
- package/lib/resources/stock_transfers.cjs +12 -82
- package/lib/resources/stock_transfers.cjs.map +1 -1
- package/lib/resources/stock_transfers.js +10 -84
- package/lib/resources/stock_transfers.js.map +1 -1
- package/lib/resources/stores.cjs +12 -56
- package/lib/resources/stores.cjs.map +1 -1
- package/lib/resources/stores.js +10 -58
- package/lib/resources/stores.js.map +1 -1
- package/lib/resources/stripe_gateways.cjs +12 -40
- package/lib/resources/stripe_gateways.cjs.map +1 -1
- package/lib/resources/stripe_gateways.js +10 -42
- package/lib/resources/stripe_gateways.js.map +1 -1
- package/lib/resources/stripe_payments.cjs +12 -46
- package/lib/resources/stripe_payments.cjs.map +1 -1
- package/lib/resources/stripe_payments.js +10 -48
- package/lib/resources/stripe_payments.js.map +1 -1
- package/lib/resources/stripe_tax_accounts.cjs +12 -48
- package/lib/resources/stripe_tax_accounts.cjs.map +1 -1
- package/lib/resources/stripe_tax_accounts.js +10 -50
- package/lib/resources/stripe_tax_accounts.js.map +1 -1
- package/lib/resources/subscription_models.cjs +12 -40
- package/lib/resources/subscription_models.cjs.map +1 -1
- package/lib/resources/subscription_models.js +10 -42
- package/lib/resources/subscription_models.js.map +1 -1
- package/lib/resources/tags.cjs +12 -28
- package/lib/resources/tags.cjs.map +1 -1
- package/lib/resources/tags.js +10 -30
- package/lib/resources/tags.js.map +1 -1
- package/lib/resources/talon_one_accounts.cjs +12 -44
- package/lib/resources/talon_one_accounts.cjs.map +1 -1
- package/lib/resources/talon_one_accounts.js +10 -46
- package/lib/resources/talon_one_accounts.js.map +1 -1
- package/lib/resources/tax_calculators.cjs +12 -35
- package/lib/resources/tax_calculators.cjs.map +1 -1
- package/lib/resources/tax_calculators.js +10 -37
- package/lib/resources/tax_calculators.js.map +1 -1
- package/lib/resources/tax_categories.cjs +12 -40
- package/lib/resources/tax_categories.cjs.map +1 -1
- package/lib/resources/tax_categories.js +10 -42
- package/lib/resources/tax_categories.js.map +1 -1
- package/lib/resources/tax_rules.cjs +12 -36
- package/lib/resources/tax_rules.cjs.map +1 -1
- package/lib/resources/tax_rules.js +10 -38
- package/lib/resources/tax_rules.js.map +1 -1
- package/lib/resources/taxjar_accounts.cjs +12 -48
- package/lib/resources/taxjar_accounts.cjs.map +1 -1
- package/lib/resources/taxjar_accounts.js +10 -50
- package/lib/resources/taxjar_accounts.js.map +1 -1
- package/lib/resources/transactions.cjs +12 -35
- package/lib/resources/transactions.cjs.map +1 -1
- package/lib/resources/transactions.js +10 -37
- package/lib/resources/transactions.js.map +1 -1
- package/lib/resources/versions.cjs +12 -19
- package/lib/resources/versions.cjs.map +1 -1
- package/lib/resources/versions.js +10 -21
- package/lib/resources/versions.js.map +1 -1
- package/lib/resources/vertex_accounts.cjs +12 -47
- package/lib/resources/vertex_accounts.cjs.map +1 -1
- package/lib/resources/vertex_accounts.js +10 -49
- package/lib/resources/vertex_accounts.js.map +1 -1
- package/lib/resources/voids.cjs +12 -45
- package/lib/resources/voids.cjs.map +1 -1
- package/lib/resources/voids.js +10 -47
- package/lib/resources/voids.js.map +1 -1
- package/lib/resources/webhooks.cjs +12 -45
- package/lib/resources/webhooks.cjs.map +1 -1
- package/lib/resources/webhooks.js +10 -47
- package/lib/resources/webhooks.js.map +1 -1
- package/lib/resources/wire_transfers.cjs +12 -36
- package/lib/resources/wire_transfers.cjs.map +1 -1
- package/lib/resources/wire_transfers.js +10 -38
- package/lib/resources/wire_transfers.js.map +1 -1
- package/lib/static.cjs +16 -43
- package/lib/static.cjs.map +1 -1
- package/lib/static.js +11 -45
- package/lib/static.js.map +1 -1
- package/lib/util.cjs +20 -34
- package/lib/util.cjs.map +1 -1
- package/lib/util.js +2 -32
- package/lib/util.js.map +1 -1
- package/package.json +1 -1
@@ -0,0 +1,54 @@
|
|
1
|
+
import { ApiResource } from './chunk-XAABBRMY.js';
|
2
|
+
|
3
|
+
// src/resources/refunds.ts
|
4
|
+
var Refunds = class _Refunds extends ApiResource {
|
5
|
+
static TYPE = "refunds";
|
6
|
+
async update(resource, params, options) {
|
7
|
+
return this.resources.update({ ...resource, type: _Refunds.TYPE }, params, options);
|
8
|
+
}
|
9
|
+
async order(refundId, params, options) {
|
10
|
+
const _refundId = refundId.id || refundId;
|
11
|
+
return this.resources.fetch({ type: "orders" }, `refunds/${_refundId}/order`, params, options);
|
12
|
+
}
|
13
|
+
async attachments(refundId, params, options) {
|
14
|
+
const _refundId = refundId.id || refundId;
|
15
|
+
return this.resources.fetch({ type: "attachments" }, `refunds/${_refundId}/attachments`, params, options);
|
16
|
+
}
|
17
|
+
async events(refundId, params, options) {
|
18
|
+
const _refundId = refundId.id || refundId;
|
19
|
+
return this.resources.fetch({ type: "events" }, `refunds/${_refundId}/events`, params, options);
|
20
|
+
}
|
21
|
+
async versions(refundId, params, options) {
|
22
|
+
const _refundId = refundId.id || refundId;
|
23
|
+
return this.resources.fetch({ type: "versions" }, `refunds/${_refundId}/versions`, params, options);
|
24
|
+
}
|
25
|
+
async reference_capture(refundId, params, options) {
|
26
|
+
const _refundId = refundId.id || refundId;
|
27
|
+
return this.resources.fetch({ type: "captures" }, `refunds/${_refundId}/reference_capture`, params, options);
|
28
|
+
}
|
29
|
+
async return(refundId, params, options) {
|
30
|
+
const _refundId = refundId.id || refundId;
|
31
|
+
return this.resources.fetch({ type: "returns" }, `refunds/${_refundId}/return`, params, options);
|
32
|
+
}
|
33
|
+
async _forward(id, params, options) {
|
34
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Refunds.TYPE, _forward: true }, params, options);
|
35
|
+
}
|
36
|
+
isRefund(resource) {
|
37
|
+
return resource.type && resource.type === _Refunds.TYPE;
|
38
|
+
}
|
39
|
+
relationship(id) {
|
40
|
+
return super.relationshipOneToOne(id);
|
41
|
+
}
|
42
|
+
relationshipToMany(...ids) {
|
43
|
+
return super.relationshipOneToMany(...ids);
|
44
|
+
}
|
45
|
+
type() {
|
46
|
+
return _Refunds.TYPE;
|
47
|
+
}
|
48
|
+
};
|
49
|
+
var instance = new Refunds();
|
50
|
+
var refunds_default = instance;
|
51
|
+
|
52
|
+
export { refunds_default };
|
53
|
+
//# sourceMappingURL=chunk-7UH4JAMB.js.map
|
54
|
+
//# sourceMappingURL=chunk-7UH4JAMB.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../src/resources/refunds.ts"],"names":[],"mappings":";;;AAmHA,IAAM,OAAA,GAAN,MAAM,QAAA,SAAgB,WAAoB,CAAA;AAAA,EAEzC,OAAgB,IAAmB,GAAA,SAAA;AAAA,EAEnC,MAAM,MAAA,CAAO,QAAwB,EAAA,MAAA,EAAsC,OAA4C,EAAA;AACtH,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA6B,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,QAAQ,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACxG,EAEA,MAAM,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W,IAAI,OAAQ,EAAA;AAC7B,IAAO,eAAQ,GAAA","file":"chunk-7UH4JAMB.js","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Order } from './orders'\nimport type { Attachment } from './attachments'\nimport type { Event } from './events'\nimport type { Version } from './versions'\nimport type { Capture } from './captures'\nimport type { Return } from './returns'\nimport type { AdyenPayment } from './adyen_payments'\nimport type { AxervePayment } from './axerve_payments'\nimport type { BraintreePayment } from './braintree_payments'\nimport type { CheckoutComPayment } from './checkout_com_payments'\nimport type { ExternalPayment } from './external_payments'\nimport type { KlarnaPayment } from './klarna_payments'\nimport type { PaypalPayment } from './paypal_payments'\nimport type { SatispayPayment } from './satispay_payments'\nimport type { StripePayment } from './stripe_payments'\nimport type { WireTransfer } from './wire_transfers'\n\n\ntype RefundType = 'refunds'\ntype RefundRel = ResourceRel & { type: RefundType }\n\n\nexport type RefundSort = Pick<Refund, 'id' | 'number' | 'amount_cents'> & ResourceSort\n// export type RefundFilter = Pick<Refund, 'id' | 'number' | 'currency_code' | 'amount_cents' | 'succeeded' | 'message' | 'error_code' | 'error_detail' | 'token' | 'gateway_transaction_id'> & ResourceFilter\n\n\ninterface Refund extends Resource {\n\t\n\treadonly type: RefundType\n\n\t/** \n\t * The transaction number, auto generated.\n\t * @example ```\"42/T/001\"```\n\t */\n\tnumber: string\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard, inherited from the associated order.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code: string\n\t/** \n\t * The transaction amount, in cents.\n\t * @example ```1500```\n\t */\n\tamount_cents: number\n\t/** \n\t * The transaction amount, float.\n\t * @example ```15```\n\t */\n\tamount_float: number\n\t/** \n\t * The transaction amount, formatted.\n\t * @example ```\"€15,00\"```\n\t */\n\tformatted_amount: string\n\t/** \n\t * Indicates if the transaction is successful.\n\t */\n\tsucceeded: boolean\n\t/** \n\t * The message returned by the payment gateway.\n\t * @example ```\"Accepted\"```\n\t */\n\tmessage?: string | null\n\t/** \n\t * The error code, if any, returned by the payment gateway.\n\t * @example ```\"00001\"```\n\t */\n\terror_code?: string | null\n\t/** \n\t * The error detail, if any, returned by the payment gateway.\n\t * @example ```\"Already settled\"```\n\t */\n\terror_detail?: string | null\n\t/** \n\t * The token identifying the transaction, returned by the payment gateway.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\ttoken?: string | null\n\t/** \n\t * The ID identifying the transaction, returned by the payment gateway.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tgateway_transaction_id?: string | null\n\n\torder?: Order | null\n\tpayment_source?: AdyenPayment | AxervePayment | BraintreePayment | CheckoutComPayment | ExternalPayment | KlarnaPayment | PaypalPayment | SatispayPayment | StripePayment | WireTransfer | null\n\tattachments?: Attachment[] | null\n\tevents?: Event[] | null\n\tversions?: Version[] | null\n\treference_capture?: Capture | null\n\treturn?: Return | null\n\n}\n\n\ninterface RefundUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * Indicates if the transaction is successful.\n\t */\n\tsucceeded?: boolean | null\n\t/** \n\t * Send this attribute if you want to forward a stuck transaction to succeeded and update associated order states accordingly.\n\t * @example ```true```\n\t */\n\t_forward?: boolean | null\n\t\n}\n\n\nclass Refunds extends ApiResource<Refund> {\n\n\tstatic readonly TYPE: RefundType = 'refunds' as const\n\n\tasync update(resource: RefundUpdate, params?: QueryParamsRetrieve<Refund>, options?: ResourcesConfig): Promise<Refund> {\n\t\treturn this.resources.update<RefundUpdate, Refund>({ ...resource, type: Refunds.TYPE }, params, options)\n\t}\n\n\tasync order(refundId: string | Refund, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\tconst _refundId = (refundId as Refund).id || refundId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `refunds/${_refundId}/order`, params, options) as unknown as Order\n\t}\n\n\tasync attachments(refundId: string | Refund, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _refundId = (refundId as Refund).id || refundId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `refunds/${_refundId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync events(refundId: string | Refund, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _refundId = (refundId as Refund).id || refundId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `refunds/${_refundId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync versions(refundId: string | Refund, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _refundId = (refundId as Refund).id || refundId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `refunds/${_refundId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync reference_capture(refundId: string | Refund, params?: QueryParamsRetrieve<Capture>, options?: ResourcesConfig): Promise<Capture> {\n\t\tconst _refundId = (refundId as Refund).id || refundId as string\n\t\treturn this.resources.fetch<Capture>({ type: 'captures' }, `refunds/${_refundId}/reference_capture`, params, options) as unknown as Capture\n\t}\n\n\tasync return(refundId: string | Refund, params?: QueryParamsRetrieve<Return>, options?: ResourcesConfig): Promise<Return> {\n\t\tconst _refundId = (refundId as Refund).id || refundId as string\n\t\treturn this.resources.fetch<Return>({ type: 'returns' }, `refunds/${_refundId}/return`, params, options) as unknown as Return\n\t}\n\n\tasync _forward(id: string | Refund, params?: QueryParamsRetrieve<Refund>, options?: ResourcesConfig): Promise<Refund> {\n\t\treturn this.resources.update<RefundUpdate, Refund>({ id: (typeof id === 'string')? id: id.id, type: Refunds.TYPE, _forward: true }, params, options)\n\t}\n\n\n\tisRefund(resource: any): resource is Refund {\n\t\treturn resource.type && (resource.type === Refunds.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): RefundRel {\n\t\treturn super.relationshipOneToOne<RefundRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): RefundRel[] {\n\t\treturn super.relationshipOneToMany<RefundRel>(...ids)\n\t}\n\n\n\ttype(): RefundType {\n\t\treturn Refunds.TYPE\n\t}\n\n}\n\n\nconst instance = new Refunds()\nexport default instance\n\nexport type { Refunds, Refund, RefundUpdate, RefundType }\n"]}
|
@@ -0,0 +1,48 @@
|
|
1
|
+
import { ApiResource } from './chunk-XAABBRMY.js';
|
2
|
+
|
3
|
+
// src/resources/klarna_payments.ts
|
4
|
+
var KlarnaPayments = class _KlarnaPayments extends ApiResource {
|
5
|
+
static TYPE = "klarna_payments";
|
6
|
+
async create(resource, params, options) {
|
7
|
+
return this.resources.create({ ...resource, type: _KlarnaPayments.TYPE }, params, options);
|
8
|
+
}
|
9
|
+
async update(resource, params, options) {
|
10
|
+
return this.resources.update({ ...resource, type: _KlarnaPayments.TYPE }, params, options);
|
11
|
+
}
|
12
|
+
async delete(id, options) {
|
13
|
+
await this.resources.delete(typeof id === "string" ? { id, type: _KlarnaPayments.TYPE } : id, options);
|
14
|
+
}
|
15
|
+
async order(klarnaPaymentId, params, options) {
|
16
|
+
const _klarnaPaymentId = klarnaPaymentId.id || klarnaPaymentId;
|
17
|
+
return this.resources.fetch({ type: "orders" }, `klarna_payments/${_klarnaPaymentId}/order`, params, options);
|
18
|
+
}
|
19
|
+
async payment_gateway(klarnaPaymentId, params, options) {
|
20
|
+
const _klarnaPaymentId = klarnaPaymentId.id || klarnaPaymentId;
|
21
|
+
return this.resources.fetch({ type: "payment_gateways" }, `klarna_payments/${_klarnaPaymentId}/payment_gateway`, params, options);
|
22
|
+
}
|
23
|
+
async versions(klarnaPaymentId, params, options) {
|
24
|
+
const _klarnaPaymentId = klarnaPaymentId.id || klarnaPaymentId;
|
25
|
+
return this.resources.fetch({ type: "versions" }, `klarna_payments/${_klarnaPaymentId}/versions`, params, options);
|
26
|
+
}
|
27
|
+
async _update(id, params, options) {
|
28
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _KlarnaPayments.TYPE, _update: true }, params, options);
|
29
|
+
}
|
30
|
+
isKlarnaPayment(resource) {
|
31
|
+
return resource.type && resource.type === _KlarnaPayments.TYPE;
|
32
|
+
}
|
33
|
+
relationship(id) {
|
34
|
+
return super.relationshipOneToOne(id);
|
35
|
+
}
|
36
|
+
relationshipToMany(...ids) {
|
37
|
+
return super.relationshipOneToMany(...ids);
|
38
|
+
}
|
39
|
+
type() {
|
40
|
+
return _KlarnaPayments.TYPE;
|
41
|
+
}
|
42
|
+
};
|
43
|
+
var instance = new KlarnaPayments();
|
44
|
+
var klarna_payments_default = instance;
|
45
|
+
|
46
|
+
export { klarna_payments_default };
|
47
|
+
//# sourceMappingURL=chunk-7ZCJTSYR.js.map
|
48
|
+
//# sourceMappingURL=chunk-7ZCJTSYR.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../src/resources/klarna_payments.ts"],"names":[],"mappings":";;;AAoFA,IAAM,cAAA,GAAN,MAAM,eAAA,SAAuB,WAA2B,CAAA;AAAA,EAEvD,OAAgB,IAA0B,GAAA,iBAAA;AAAA,EAE1C,MAAM,MAAA,CAAO,QAA+B,EAAA,MAAA,EAA6C,OAAmD,EAAA;AAC3I,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA2C,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,eAAe,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC7H,EAEA,MAAM,MAAA,CAAO,QAA+B,EAAA,MAAA,EAA6C,OAAmD,EAAA;AAC3I,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA2C,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,eAAe,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC7H,EAEA,MAAM,MAA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,MAAA,CAA2C,EAAE,EAAK,EAAA,OAAO,OAAO,QAAW,GAAA,EAAA,GAAI,EAAG,CAAA,EAAA,EAAI,MAAM,eAAe,CAAA,IAAA,EAAM,SAAS,IAAK,EAAA,EAAG,QAAQ,OAAO,CAAA;AAAA;AACxK,EAGA,gBAAgB,QAA0C,EAAA;AACzD,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,eAAe,CAAA,IAAA;AAAA;AAC3D,EAGA,aAAa,EAAkD,EAAA;AAC9D,IAAO,OAAA,KAAA,CAAM,qBAAuC,EAAE,CAAA;AAAA;AACvD,EAEA,sBAAsB,GAAmC,EAAA;AACxD,IAAO,OAAA,KAAA,CAAM,qBAAwC,CAAA,GAAG,GAAG,CAAA;AAAA;AAC5D,EAGA,IAA0B,GAAA;AACzB,IAAA,OAAO,eAAe,CAAA,IAAA;AAAA;AAGxB,CAAA;AAGA,IAAM,QAAA,GAAW,IAAI,cAAe,EAAA;AACpC,IAAO,uBAAQ,GAAA","file":"chunk-7ZCJTSYR.js","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Order, OrderType } from './orders'\nimport type { PaymentGateway } from './payment_gateways'\nimport type { Version } from './versions'\n\n\ntype KlarnaPaymentType = 'klarna_payments'\ntype KlarnaPaymentRel = ResourceRel & { type: KlarnaPaymentType }\ntype OrderRel = ResourceRel & { type: OrderType }\n\n\nexport type KlarnaPaymentSort = Pick<KlarnaPayment, 'id'> & ResourceSort\n// export type KlarnaPaymentFilter = Pick<KlarnaPayment, 'id' | 'mismatched_amounts'> & ResourceFilter\n\n\ninterface KlarnaPayment extends Resource {\n\t\n\treadonly type: KlarnaPaymentType\n\n\t/** \n\t * The identifier of the payment session.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tsession_id?: string | null\n\t/** \n\t * The public token linked to your API credential. Available upon session creation.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tclient_token?: string | null\n\t/** \n\t * The merchant available payment methods for the assoiated order. Available upon session creation.\n\t * @example ```[{\"foo\":\"bar\"}]```\n\t */\n\tpayment_methods: Array<Record<string, any>>\n\t/** \n\t * The token returned by a successful client authorization, mandatory to place the order.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tauth_token?: string | null\n\t/** \n\t * Indicates if the order current amount differs form the one of the created payment intent.\n\t */\n\tmismatched_amounts?: boolean | null\n\t/** \n\t * Information about the payment instrument used in the transaction.\n\t * @example ```{\"issuer\":\"cl bank\",\"card_type\":\"visa\"}```\n\t */\n\tpayment_instrument?: Record<string, any> | null\n\n\torder?: Order | null\n\tpayment_gateway?: PaymentGateway | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface KlarnaPaymentCreate extends ResourceCreate {\n\t\n\torder: OrderRel\n\n}\n\n\ninterface KlarnaPaymentUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The token returned by a successful client authorization, mandatory to place the order.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tauth_token?: string | null\n\t/** \n\t * Send this attribute if you want to update the payment session with fresh order data.\n\t * @example ```true```\n\t */\n\t_update?: boolean | null\n\n\torder?: OrderRel | null\n\n}\n\n\nclass KlarnaPayments extends ApiResource<KlarnaPayment> {\n\n\tstatic readonly TYPE: KlarnaPaymentType = 'klarna_payments' as const\n\n\tasync create(resource: KlarnaPaymentCreate, params?: QueryParamsRetrieve<KlarnaPayment>, options?: ResourcesConfig): Promise<KlarnaPayment> {\n\t\treturn this.resources.create<KlarnaPaymentCreate, KlarnaPayment>({ ...resource, type: KlarnaPayments.TYPE }, params, options)\n\t}\n\n\tasync update(resource: KlarnaPaymentUpdate, params?: QueryParamsRetrieve<KlarnaPayment>, options?: ResourcesConfig): Promise<KlarnaPayment> {\n\t\treturn this.resources.update<KlarnaPaymentUpdate, KlarnaPayment>({ ...resource, type: KlarnaPayments.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: KlarnaPayments.TYPE } : id, options)\n\t}\n\n\tasync order(klarnaPaymentId: string | KlarnaPayment, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\tconst _klarnaPaymentId = (klarnaPaymentId as KlarnaPayment).id || klarnaPaymentId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `klarna_payments/${_klarnaPaymentId}/order`, params, options) as unknown as Order\n\t}\n\n\tasync payment_gateway(klarnaPaymentId: string | KlarnaPayment, params?: QueryParamsRetrieve<PaymentGateway>, options?: ResourcesConfig): Promise<PaymentGateway> {\n\t\tconst _klarnaPaymentId = (klarnaPaymentId as KlarnaPayment).id || klarnaPaymentId as string\n\t\treturn this.resources.fetch<PaymentGateway>({ type: 'payment_gateways' }, `klarna_payments/${_klarnaPaymentId}/payment_gateway`, params, options) as unknown as PaymentGateway\n\t}\n\n\tasync versions(klarnaPaymentId: string | KlarnaPayment, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _klarnaPaymentId = (klarnaPaymentId as KlarnaPayment).id || klarnaPaymentId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `klarna_payments/${_klarnaPaymentId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync _update(id: string | KlarnaPayment, params?: QueryParamsRetrieve<KlarnaPayment>, options?: ResourcesConfig): Promise<KlarnaPayment> {\n\t\treturn this.resources.update<KlarnaPaymentUpdate, KlarnaPayment>({ id: (typeof id === 'string')? id: id.id, type: KlarnaPayments.TYPE, _update: true }, params, options)\n\t}\n\n\n\tisKlarnaPayment(resource: any): resource is KlarnaPayment {\n\t\treturn resource.type && (resource.type === KlarnaPayments.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): KlarnaPaymentRel {\n\t\treturn super.relationshipOneToOne<KlarnaPaymentRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): KlarnaPaymentRel[] {\n\t\treturn super.relationshipOneToMany<KlarnaPaymentRel>(...ids)\n\t}\n\n\n\ttype(): KlarnaPaymentType {\n\t\treturn KlarnaPayments.TYPE\n\t}\n\n}\n\n\nconst instance = new KlarnaPayments()\nexport default instance\n\nexport type { KlarnaPayments, KlarnaPayment, KlarnaPaymentCreate, KlarnaPaymentUpdate, KlarnaPaymentType }\n"]}
|
@@ -0,0 +1,30 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
var chunkVRXXWQRL_cjs = require('./chunk-VRXXWQRL.cjs');
|
4
|
+
|
5
|
+
// src/resources/event_callbacks.ts
|
6
|
+
var EventCallbacks = class _EventCallbacks extends chunkVRXXWQRL_cjs.ApiResource {
|
7
|
+
static TYPE = "event_callbacks";
|
8
|
+
async webhook(eventCallbackId, params, options) {
|
9
|
+
const _eventCallbackId = eventCallbackId.id || eventCallbackId;
|
10
|
+
return this.resources.fetch({ type: "webhooks" }, `event_callbacks/${_eventCallbackId}/webhook`, params, options);
|
11
|
+
}
|
12
|
+
isEventCallback(resource) {
|
13
|
+
return resource.type && resource.type === _EventCallbacks.TYPE;
|
14
|
+
}
|
15
|
+
relationship(id) {
|
16
|
+
return super.relationshipOneToOne(id);
|
17
|
+
}
|
18
|
+
relationshipToMany(...ids) {
|
19
|
+
return super.relationshipOneToMany(...ids);
|
20
|
+
}
|
21
|
+
type() {
|
22
|
+
return _EventCallbacks.TYPE;
|
23
|
+
}
|
24
|
+
};
|
25
|
+
var instance = new EventCallbacks();
|
26
|
+
var event_callbacks_default = instance;
|
27
|
+
|
28
|
+
exports.event_callbacks_default = event_callbacks_default;
|
29
|
+
//# sourceMappingURL=chunk-7ZGZN42S.cjs.map
|
30
|
+
//# sourceMappingURL=chunk-7ZGZN42S.cjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../src/resources/event_callbacks.ts"],"names":["ApiResource"],"mappings":";;;;;AA6CA,IAAM,cAAA,GAAN,MAAM,eAAA,SAAuBA,6BAA2B,CAAA;AAAA,EAEvD,OAAgB,IAA0B,GAAA,iBAAA;AAAA,EAE1C,MAAM,OAAA,CAAQ,eAAyC,EAAA,MAAA,EAAuC,OAA6C,EAAA;AAC1I,IAAM,MAAA,gBAAA,GAAoB,gBAAkC,EAAM,IAAA,eAAA;AAClE,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAe,EAAE,IAAA,EAAM,UAAW,EAAA,EAAG,CAAmB,gBAAA,EAAA,gBAAgB,CAAY,QAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC1H,EAGA,gBAAgB,QAA0C,EAAA;AACzD,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,eAAe,CAAA,IAAA;AAAA;AAC3D,EAGA,aAAa,EAAkD,EAAA;AAC9D,IAAO,OAAA,KAAA,CAAM,qBAAuC,EAAE,CAAA;AAAA;AACvD,EAEA,sBAAsB,GAAmC,EAAA;AACxD,IAAO,OAAA,KAAA,CAAM,qBAAwC,CAAA,GAAG,GAAG,CAAA;AAAA;AAC5D,EAGA,IAA0B,GAAA;AACzB,IAAA,OAAO,eAAe,CAAA,IAAA;AAAA;AAGxB,CAAA;AAGA,IAAM,QAAA,GAAW,IAAI,cAAe,EAAA;AACpC,IAAO,uBAAQ,GAAA","file":"chunk-7ZGZN42S.cjs","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceId, ResourcesConfig, ResourceRel, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve } from '../query'\n\nimport type { Webhook } from './webhooks'\n\n\ntype EventCallbackType = 'event_callbacks'\ntype EventCallbackRel = ResourceRel & { type: EventCallbackType }\n\n\nexport type EventCallbackSort = Pick<EventCallback, 'id' | 'response_code' | 'response_message'> & ResourceSort\n// export type EventCallbackFilter = Pick<EventCallback, 'id' | 'callback_url' | 'response_code' | 'response_message'> & ResourceFilter\n\n\ninterface EventCallback extends Resource {\n\t\n\treadonly type: EventCallbackType\n\n\t/** \n\t * The URI of the callback, inherited by the associated webhook.\n\t * @example ```\"https://yourapp.com/webhooks\"```\n\t */\n\tcallback_url: string\n\t/** \n\t * The payload sent to the callback endpoint, including the event affected resource and the specified includes.\n\t * @example ```{\"data\":{\"attributes\":{\"id\":\"PYWehaoXJj\",\"type\":\"orders\"}}}```\n\t */\n\tpayload?: Record<string, any> | null\n\t/** \n\t * The HTTP response code of the callback endpoint.\n\t * @example ```\"200\"```\n\t */\n\tresponse_code?: string | null\n\t/** \n\t * The HTTP response message of the callback endpoint.\n\t * @example ```\"OK\"```\n\t */\n\tresponse_message?: string | null\n\n\twebhook?: Webhook | null\n\n}\n\n\nclass EventCallbacks extends ApiResource<EventCallback> {\n\n\tstatic readonly TYPE: EventCallbackType = 'event_callbacks' as const\n\n\tasync webhook(eventCallbackId: string | EventCallback, params?: QueryParamsRetrieve<Webhook>, options?: ResourcesConfig): Promise<Webhook> {\n\t\tconst _eventCallbackId = (eventCallbackId as EventCallback).id || eventCallbackId as string\n\t\treturn this.resources.fetch<Webhook>({ type: 'webhooks' }, `event_callbacks/${_eventCallbackId}/webhook`, params, options) as unknown as Webhook\n\t}\n\n\n\tisEventCallback(resource: any): resource is EventCallback {\n\t\treturn resource.type && (resource.type === EventCallbacks.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): EventCallbackRel {\n\t\treturn super.relationshipOneToOne<EventCallbackRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): EventCallbackRel[] {\n\t\treturn super.relationshipOneToMany<EventCallbackRel>(...ids)\n\t}\n\n\n\ttype(): EventCallbackType {\n\t\treturn EventCallbacks.TYPE\n\t}\n\n}\n\n\nconst instance = new EventCallbacks()\nexport default instance\n\nexport type { EventCallbacks, EventCallback, EventCallbackType }\n"]}
|
@@ -0,0 +1,93 @@
|
|
1
|
+
import { ApiResource } from './chunk-XAABBRMY.js';
|
2
|
+
|
3
|
+
// src/resources/fixed_price_promotions.ts
|
4
|
+
var FixedPricePromotions = class _FixedPricePromotions extends ApiResource {
|
5
|
+
static TYPE = "fixed_price_promotions";
|
6
|
+
async create(resource, params, options) {
|
7
|
+
return this.resources.create({ ...resource, type: _FixedPricePromotions.TYPE }, params, options);
|
8
|
+
}
|
9
|
+
async update(resource, params, options) {
|
10
|
+
return this.resources.update({ ...resource, type: _FixedPricePromotions.TYPE }, params, options);
|
11
|
+
}
|
12
|
+
async delete(id, options) {
|
13
|
+
await this.resources.delete(typeof id === "string" ? { id, type: _FixedPricePromotions.TYPE } : id, options);
|
14
|
+
}
|
15
|
+
async market(fixedPricePromotionId, params, options) {
|
16
|
+
const _fixedPricePromotionId = fixedPricePromotionId.id || fixedPricePromotionId;
|
17
|
+
return this.resources.fetch({ type: "markets" }, `fixed_price_promotions/${_fixedPricePromotionId}/market`, params, options);
|
18
|
+
}
|
19
|
+
async order_amount_promotion_rule(fixedPricePromotionId, params, options) {
|
20
|
+
const _fixedPricePromotionId = fixedPricePromotionId.id || fixedPricePromotionId;
|
21
|
+
return this.resources.fetch({ type: "order_amount_promotion_rules" }, `fixed_price_promotions/${_fixedPricePromotionId}/order_amount_promotion_rule`, params, options);
|
22
|
+
}
|
23
|
+
async sku_list_promotion_rule(fixedPricePromotionId, params, options) {
|
24
|
+
const _fixedPricePromotionId = fixedPricePromotionId.id || fixedPricePromotionId;
|
25
|
+
return this.resources.fetch({ type: "sku_list_promotion_rules" }, `fixed_price_promotions/${_fixedPricePromotionId}/sku_list_promotion_rule`, params, options);
|
26
|
+
}
|
27
|
+
async coupon_codes_promotion_rule(fixedPricePromotionId, params, options) {
|
28
|
+
const _fixedPricePromotionId = fixedPricePromotionId.id || fixedPricePromotionId;
|
29
|
+
return this.resources.fetch({ type: "coupon_codes_promotion_rules" }, `fixed_price_promotions/${_fixedPricePromotionId}/coupon_codes_promotion_rule`, params, options);
|
30
|
+
}
|
31
|
+
async custom_promotion_rule(fixedPricePromotionId, params, options) {
|
32
|
+
const _fixedPricePromotionId = fixedPricePromotionId.id || fixedPricePromotionId;
|
33
|
+
return this.resources.fetch({ type: "custom_promotion_rules" }, `fixed_price_promotions/${_fixedPricePromotionId}/custom_promotion_rule`, params, options);
|
34
|
+
}
|
35
|
+
async sku_list(fixedPricePromotionId, params, options) {
|
36
|
+
const _fixedPricePromotionId = fixedPricePromotionId.id || fixedPricePromotionId;
|
37
|
+
return this.resources.fetch({ type: "sku_lists" }, `fixed_price_promotions/${_fixedPricePromotionId}/sku_list`, params, options);
|
38
|
+
}
|
39
|
+
async coupons(fixedPricePromotionId, params, options) {
|
40
|
+
const _fixedPricePromotionId = fixedPricePromotionId.id || fixedPricePromotionId;
|
41
|
+
return this.resources.fetch({ type: "coupons" }, `fixed_price_promotions/${_fixedPricePromotionId}/coupons`, params, options);
|
42
|
+
}
|
43
|
+
async attachments(fixedPricePromotionId, params, options) {
|
44
|
+
const _fixedPricePromotionId = fixedPricePromotionId.id || fixedPricePromotionId;
|
45
|
+
return this.resources.fetch({ type: "attachments" }, `fixed_price_promotions/${_fixedPricePromotionId}/attachments`, params, options);
|
46
|
+
}
|
47
|
+
async events(fixedPricePromotionId, params, options) {
|
48
|
+
const _fixedPricePromotionId = fixedPricePromotionId.id || fixedPricePromotionId;
|
49
|
+
return this.resources.fetch({ type: "events" }, `fixed_price_promotions/${_fixedPricePromotionId}/events`, params, options);
|
50
|
+
}
|
51
|
+
async tags(fixedPricePromotionId, params, options) {
|
52
|
+
const _fixedPricePromotionId = fixedPricePromotionId.id || fixedPricePromotionId;
|
53
|
+
return this.resources.fetch({ type: "tags" }, `fixed_price_promotions/${_fixedPricePromotionId}/tags`, params, options);
|
54
|
+
}
|
55
|
+
async versions(fixedPricePromotionId, params, options) {
|
56
|
+
const _fixedPricePromotionId = fixedPricePromotionId.id || fixedPricePromotionId;
|
57
|
+
return this.resources.fetch({ type: "versions" }, `fixed_price_promotions/${_fixedPricePromotionId}/versions`, params, options);
|
58
|
+
}
|
59
|
+
async skus(fixedPricePromotionId, params, options) {
|
60
|
+
const _fixedPricePromotionId = fixedPricePromotionId.id || fixedPricePromotionId;
|
61
|
+
return this.resources.fetch({ type: "skus" }, `fixed_price_promotions/${_fixedPricePromotionId}/skus`, params, options);
|
62
|
+
}
|
63
|
+
async _disable(id, params, options) {
|
64
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _FixedPricePromotions.TYPE, _disable: true }, params, options);
|
65
|
+
}
|
66
|
+
async _enable(id, params, options) {
|
67
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _FixedPricePromotions.TYPE, _enable: true }, params, options);
|
68
|
+
}
|
69
|
+
async _add_tags(id, triggerValue, params, options) {
|
70
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _FixedPricePromotions.TYPE, _add_tags: triggerValue }, params, options);
|
71
|
+
}
|
72
|
+
async _remove_tags(id, triggerValue, params, options) {
|
73
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _FixedPricePromotions.TYPE, _remove_tags: triggerValue }, params, options);
|
74
|
+
}
|
75
|
+
isFixedPricePromotion(resource) {
|
76
|
+
return resource.type && resource.type === _FixedPricePromotions.TYPE;
|
77
|
+
}
|
78
|
+
relationship(id) {
|
79
|
+
return super.relationshipOneToOne(id);
|
80
|
+
}
|
81
|
+
relationshipToMany(...ids) {
|
82
|
+
return super.relationshipOneToMany(...ids);
|
83
|
+
}
|
84
|
+
type() {
|
85
|
+
return _FixedPricePromotions.TYPE;
|
86
|
+
}
|
87
|
+
};
|
88
|
+
var instance = new FixedPricePromotions();
|
89
|
+
var fixed_price_promotions_default = instance;
|
90
|
+
|
91
|
+
export { fixed_price_promotions_default };
|
92
|
+
//# sourceMappingURL=chunk-A2RAUGGE.js.map
|
93
|
+
//# sourceMappingURL=chunk-A2RAUGG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,GAAW,IAAI,oBAAqB,EAAA;AAC1C,IAAO,8BAAQ,GAAA","file":"chunk-A2RAUGGE.js","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Market, MarketType } from './markets'\nimport type { OrderAmountPromotionRule, OrderAmountPromotionRuleType } from './order_amount_promotion_rules'\nimport type { SkuListPromotionRule, SkuListPromotionRuleType } from './sku_list_promotion_rules'\nimport type { CouponCodesPromotionRule, CouponCodesPromotionRuleType } from './coupon_codes_promotion_rules'\nimport type { CustomPromotionRule, CustomPromotionRuleType } from './custom_promotion_rules'\nimport type { SkuList, SkuListType } from './sku_lists'\nimport type { Coupon } from './coupons'\nimport type { Attachment } from './attachments'\nimport type { Event } from './events'\nimport type { Tag, TagType } from './tags'\nimport type { Version } from './versions'\nimport type { Sku } from './skus'\nimport type { PromotionRule } from './promotion_rules'\n\n\ntype FixedPricePromotionType = 'fixed_price_promotions'\ntype FixedPricePromotionRel = ResourceRel & { type: FixedPricePromotionType }\ntype MarketRel = ResourceRel & { type: MarketType }\ntype OrderAmountPromotionRuleRel = ResourceRel & { type: OrderAmountPromotionRuleType }\ntype SkuListPromotionRuleRel = ResourceRel & { type: SkuListPromotionRuleType }\ntype CouponCodesPromotionRuleRel = ResourceRel & { type: CouponCodesPromotionRuleType }\ntype CustomPromotionRuleRel = ResourceRel & { type: CustomPromotionRuleType }\ntype SkuListRel = ResourceRel & { type: SkuListType }\ntype TagRel = ResourceRel & { type: TagType }\n\n\nexport type FixedPricePromotionSort = Pick<FixedPricePromotion, 'id' | 'name' | 'currency_code' | 'exclusive' | 'priority' | 'starts_at' | 'expires_at' | 'total_usage_limit' | 'total_usage_count' | 'disabled_at'> & ResourceSort\n// export type FixedPricePromotionFilter = Pick<FixedPricePromotion, 'id' | 'name' | 'currency_code' | 'priority' | 'starts_at' | 'expires_at' | 'total_usage_limit' | 'total_usage_count' | 'disabled_at'> & ResourceFilter\n\n\ninterface FixedPricePromotion extends Resource {\n\t\n\treadonly type: FixedPricePromotionType\n\n\t/** \n\t * The promotion's internal name.\n\t * @example ```\"Personal promotion\"```\n\t */\n\tname: string\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code?: string | null\n\t/** \n\t * Indicates if the promotion will be applied exclusively, based on its priority score.\n\t * @example ```true```\n\t */\n\texclusive?: boolean | null\n\t/** \n\t * The priority assigned to the promotion (lower means higher priority).\n\t * @example ```2```\n\t */\n\tpriority?: number | null\n\t/** \n\t * The activation date/time of this promotion.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tstarts_at: string\n\t/** \n\t * The expiration date/time of this promotion (must be after starts_at).\n\t * @example ```\"2018-01-02T12:00:00.000Z\"```\n\t */\n\texpires_at: string\n\t/** \n\t * The total number of times this promotion can be applied. When 'null' it means promotion can be applied infinite times.\n\t * @example ```5```\n\t */\n\ttotal_usage_limit?: number | null\n\t/** \n\t * The number of times this promotion has been applied.\n\t * @example ```2```\n\t */\n\ttotal_usage_count?: number | null\n\t/** \n\t * Indicates if the promotion is active (enabled and not expired).\n\t * @example ```true```\n\t */\n\tactive?: boolean | null\n\t/** \n\t * The promotion status. One of 'disabled', 'expired', 'pending', 'active', or 'inactive'.\n\t * @example ```\"pending\"```\n\t */\n\tstatus?: 'disabled' | 'expired' | 'pending' | 'active' | 'inactive' | null\n\t/** \n\t * Time at which this resource was disabled.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tdisabled_at?: string | null\n\t/** \n\t * The price fixed amount to be applied on matching SKUs, in cents.\n\t * @example ```1000```\n\t */\n\tfixed_amount_cents: number\n\t/** \n\t * The discount fixed amount to be applied, float.\n\t * @example ```10```\n\t */\n\tfixed_amount_float?: number | null\n\t/** \n\t * The discount fixed amount to be applied, formatted.\n\t * @example ```\"€10,00\"```\n\t */\n\tformatted_fixed_amount?: string | null\n\n\tmarket?: Market | null\n\tpromotion_rules?: PromotionRule[] | null\n\torder_amount_promotion_rule?: OrderAmountPromotionRule | null\n\tsku_list_promotion_rule?: SkuListPromotionRule | null\n\tcoupon_codes_promotion_rule?: CouponCodesPromotionRule | null\n\tcustom_promotion_rule?: CustomPromotionRule | null\n\tsku_list?: SkuList | null\n\tcoupons?: Coupon[] | null\n\tattachments?: Attachment[] | null\n\tevents?: Event[] | null\n\ttags?: Tag[] | null\n\tversions?: Version[] | null\n\tskus?: Sku[] | null\n\n}\n\n\ninterface FixedPricePromotionCreate extends ResourceCreate {\n\t\n\t/** \n\t * The promotion's internal name.\n\t * @example ```\"Personal promotion\"```\n\t */\n\tname: string\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code?: string | null\n\t/** \n\t * Indicates if the promotion will be applied exclusively, based on its priority score.\n\t * @example ```true```\n\t */\n\texclusive?: boolean | null\n\t/** \n\t * The priority assigned to the promotion (lower means higher priority).\n\t * @example ```2```\n\t */\n\tpriority?: number | null\n\t/** \n\t * The activation date/time of this promotion.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tstarts_at: string\n\t/** \n\t * The expiration date/time of this promotion (must be after starts_at).\n\t * @example ```\"2018-01-02T12:00:00.000Z\"```\n\t */\n\texpires_at: string\n\t/** \n\t * The total number of times this promotion can be applied. When 'null' it means promotion can be applied infinite times.\n\t * @example ```5```\n\t */\n\ttotal_usage_limit?: number | null\n\t/** \n\t * Send this attribute if you want to mark this resource as disabled.\n\t * @example ```true```\n\t */\n\t_disable?: boolean | null\n\t/** \n\t * Send this attribute if you want to mark this resource as enabled.\n\t * @example ```true```\n\t */\n\t_enable?: boolean | null\n\t/** \n\t * The price fixed amount to be applied on matching SKUs, in cents.\n\t * @example ```1000```\n\t */\n\tfixed_amount_cents: number\n\n\tmarket?: MarketRel | null\n\torder_amount_promotion_rule?: OrderAmountPromotionRuleRel | null\n\tsku_list_promotion_rule?: SkuListPromotionRuleRel | null\n\tcoupon_codes_promotion_rule?: CouponCodesPromotionRuleRel | null\n\tcustom_promotion_rule?: CustomPromotionRuleRel | null\n\tsku_list: SkuListRel\n\ttags?: TagRel[] | null\n\n}\n\n\ninterface FixedPricePromotionUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The promotion's internal name.\n\t * @example ```\"Personal promotion\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code?: string | null\n\t/** \n\t * Indicates if the promotion will be applied exclusively, based on its priority score.\n\t * @example ```true```\n\t */\n\texclusive?: boolean | null\n\t/** \n\t * The priority assigned to the promotion (lower means higher priority).\n\t * @example ```2```\n\t */\n\tpriority?: number | null\n\t/** \n\t * The activation date/time of this promotion.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tstarts_at?: string | null\n\t/** \n\t * The expiration date/time of this promotion (must be after starts_at).\n\t * @example ```\"2018-01-02T12:00:00.000Z\"```\n\t */\n\texpires_at?: string | null\n\t/** \n\t * The total number of times this promotion can be applied. When 'null' it means promotion can be applied infinite times.\n\t * @example ```5```\n\t */\n\ttotal_usage_limit?: number | null\n\t/** \n\t * Send this attribute if you want to mark this resource as disabled.\n\t * @example ```true```\n\t */\n\t_disable?: boolean | null\n\t/** \n\t * Send this attribute if you want to mark this resource as enabled.\n\t * @example ```true```\n\t */\n\t_enable?: boolean | null\n\t/** \n\t * Comma separated list of tags to be added. Duplicates, invalid and non existing ones are discarded. Cannot be passed by sales channels.\n\t */\n\t_add_tags?: string | null\n\t/** \n\t * Comma separated list of tags to be removed. Duplicates, invalid and non existing ones are discarded. Cannot be passed by sales channels.\n\t */\n\t_remove_tags?: string | null\n\t/** \n\t * The price fixed amount to be applied on matching SKUs, in cents.\n\t * @example ```1000```\n\t */\n\tfixed_amount_cents?: number | null\n\n\tmarket?: MarketRel | null\n\torder_amount_promotion_rule?: OrderAmountPromotionRuleRel | null\n\tsku_list_promotion_rule?: SkuListPromotionRuleRel | null\n\tcoupon_codes_promotion_rule?: CouponCodesPromotionRuleRel | null\n\tcustom_promotion_rule?: CustomPromotionRuleRel | null\n\tsku_list?: SkuListRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\nclass FixedPricePromotions extends ApiResource<FixedPricePromotion> {\n\n\tstatic readonly TYPE: FixedPricePromotionType = 'fixed_price_promotions' as const\n\n\tasync create(resource: FixedPricePromotionCreate, params?: QueryParamsRetrieve<FixedPricePromotion>, options?: ResourcesConfig): Promise<FixedPricePromotion> {\n\t\treturn this.resources.create<FixedPricePromotionCreate, FixedPricePromotion>({ ...resource, type: FixedPricePromotions.TYPE }, params, options)\n\t}\n\n\tasync update(resource: FixedPricePromotionUpdate, params?: QueryParamsRetrieve<FixedPricePromotion>, options?: ResourcesConfig): Promise<FixedPricePromotion> {\n\t\treturn this.resources.update<FixedPricePromotionUpdate, FixedPricePromotion>({ ...resource, type: FixedPricePromotions.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: FixedPricePromotions.TYPE } : id, options)\n\t}\n\n\tasync market(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsRetrieve<Market>, options?: ResourcesConfig): Promise<Market> {\n\t\tconst _fixedPricePromotionId = (fixedPricePromotionId as FixedPricePromotion).id || fixedPricePromotionId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `fixed_price_promotions/${_fixedPricePromotionId}/market`, params, options) as unknown as Market\n\t}\n\n\tasync order_amount_promotion_rule(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsRetrieve<OrderAmountPromotionRule>, options?: ResourcesConfig): Promise<OrderAmountPromotionRule> {\n\t\tconst _fixedPricePromotionId = (fixedPricePromotionId as FixedPricePromotion).id || fixedPricePromotionId as string\n\t\treturn this.resources.fetch<OrderAmountPromotionRule>({ type: 'order_amount_promotion_rules' }, `fixed_price_promotions/${_fixedPricePromotionId}/order_amount_promotion_rule`, params, options) as unknown as OrderAmountPromotionRule\n\t}\n\n\tasync sku_list_promotion_rule(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsRetrieve<SkuListPromotionRule>, options?: ResourcesConfig): Promise<SkuListPromotionRule> {\n\t\tconst _fixedPricePromotionId = (fixedPricePromotionId as FixedPricePromotion).id || fixedPricePromotionId as string\n\t\treturn this.resources.fetch<SkuListPromotionRule>({ type: 'sku_list_promotion_rules' }, `fixed_price_promotions/${_fixedPricePromotionId}/sku_list_promotion_rule`, params, options) as unknown as SkuListPromotionRule\n\t}\n\n\tasync coupon_codes_promotion_rule(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsRetrieve<CouponCodesPromotionRule>, options?: ResourcesConfig): Promise<CouponCodesPromotionRule> {\n\t\tconst _fixedPricePromotionId = (fixedPricePromotionId as FixedPricePromotion).id || fixedPricePromotionId as string\n\t\treturn this.resources.fetch<CouponCodesPromotionRule>({ type: 'coupon_codes_promotion_rules' }, `fixed_price_promotions/${_fixedPricePromotionId}/coupon_codes_promotion_rule`, params, options) as unknown as CouponCodesPromotionRule\n\t}\n\n\tasync custom_promotion_rule(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsRetrieve<CustomPromotionRule>, options?: ResourcesConfig): Promise<CustomPromotionRule> {\n\t\tconst _fixedPricePromotionId = (fixedPricePromotionId as FixedPricePromotion).id || fixedPricePromotionId as string\n\t\treturn this.resources.fetch<CustomPromotionRule>({ type: 'custom_promotion_rules' }, `fixed_price_promotions/${_fixedPricePromotionId}/custom_promotion_rule`, params, options) as unknown as CustomPromotionRule\n\t}\n\n\tasync sku_list(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsRetrieve<SkuList>, options?: ResourcesConfig): Promise<SkuList> {\n\t\tconst _fixedPricePromotionId = (fixedPricePromotionId as FixedPricePromotion).id || fixedPricePromotionId as string\n\t\treturn this.resources.fetch<SkuList>({ type: 'sku_lists' }, `fixed_price_promotions/${_fixedPricePromotionId}/sku_list`, params, options) as unknown as SkuList\n\t}\n\n\tasync coupons(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsList<Coupon>, options?: ResourcesConfig): Promise<ListResponse<Coupon>> {\n\t\tconst _fixedPricePromotionId = (fixedPricePromotionId as FixedPricePromotion).id || fixedPricePromotionId as string\n\t\treturn this.resources.fetch<Coupon>({ type: 'coupons' }, `fixed_price_promotions/${_fixedPricePromotionId}/coupons`, params, options) as unknown as ListResponse<Coupon>\n\t}\n\n\tasync attachments(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _fixedPricePromotionId = (fixedPricePromotionId as FixedPricePromotion).id || fixedPricePromotionId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `fixed_price_promotions/${_fixedPricePromotionId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync events(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _fixedPricePromotionId = (fixedPricePromotionId as FixedPricePromotion).id || fixedPricePromotionId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `fixed_price_promotions/${_fixedPricePromotionId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync tags(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsList<Tag>, options?: ResourcesConfig): Promise<ListResponse<Tag>> {\n\t\tconst _fixedPricePromotionId = (fixedPricePromotionId as FixedPricePromotion).id || fixedPricePromotionId as string\n\t\treturn this.resources.fetch<Tag>({ type: 'tags' }, `fixed_price_promotions/${_fixedPricePromotionId}/tags`, params, options) as unknown as ListResponse<Tag>\n\t}\n\n\tasync versions(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _fixedPricePromotionId = (fixedPricePromotionId as FixedPricePromotion).id || fixedPricePromotionId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `fixed_price_promotions/${_fixedPricePromotionId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync skus(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsList<Sku>, options?: ResourcesConfig): Promise<ListResponse<Sku>> {\n\t\tconst _fixedPricePromotionId = (fixedPricePromotionId as FixedPricePromotion).id || fixedPricePromotionId as string\n\t\treturn this.resources.fetch<Sku>({ type: 'skus' }, `fixed_price_promotions/${_fixedPricePromotionId}/skus`, params, options) as unknown as ListResponse<Sku>\n\t}\n\n\tasync _disable(id: string | FixedPricePromotion, params?: QueryParamsRetrieve<FixedPricePromotion>, options?: ResourcesConfig): Promise<FixedPricePromotion> {\n\t\treturn this.resources.update<FixedPricePromotionUpdate, FixedPricePromotion>({ id: (typeof id === 'string')? id: id.id, type: FixedPricePromotions.TYPE, _disable: true }, params, options)\n\t}\n\n\tasync _enable(id: string | FixedPricePromotion, params?: QueryParamsRetrieve<FixedPricePromotion>, options?: ResourcesConfig): Promise<FixedPricePromotion> {\n\t\treturn this.resources.update<FixedPricePromotionUpdate, FixedPricePromotion>({ id: (typeof id === 'string')? id: id.id, type: FixedPricePromotions.TYPE, _enable: true }, params, options)\n\t}\n\n\tasync _add_tags(id: string | FixedPricePromotion, triggerValue: string, params?: QueryParamsRetrieve<FixedPricePromotion>, options?: ResourcesConfig): Promise<FixedPricePromotion> {\n\t\treturn this.resources.update<FixedPricePromotionUpdate, FixedPricePromotion>({ id: (typeof id === 'string')? id: id.id, type: FixedPricePromotions.TYPE, _add_tags: triggerValue }, params, options)\n\t}\n\n\tasync _remove_tags(id: string | FixedPricePromotion, triggerValue: string, params?: QueryParamsRetrieve<FixedPricePromotion>, options?: ResourcesConfig): Promise<FixedPricePromotion> {\n\t\treturn this.resources.update<FixedPricePromotionUpdate, FixedPricePromotion>({ id: (typeof id === 'string')? id: id.id, type: FixedPricePromotions.TYPE, _remove_tags: triggerValue }, params, options)\n\t}\n\n\n\tisFixedPricePromotion(resource: any): resource is FixedPricePromotion {\n\t\treturn resource.type && (resource.type === FixedPricePromotions.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): FixedPricePromotionRel {\n\t\treturn super.relationshipOneToOne<FixedPricePromotionRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): FixedPricePromotionRel[] {\n\t\treturn super.relationshipOneToMany<FixedPricePromotionRel>(...ids)\n\t}\n\n\n\ttype(): FixedPricePromotionType {\n\t\treturn FixedPricePromotions.TYPE\n\t}\n\n}\n\n\nconst instance = new FixedPricePromotions()\nexport default instance\n\nexport type { FixedPricePromotions, FixedPricePromotion, FixedPricePromotionCreate, FixedPricePromotionUpdate, FixedPricePromotionType }\n"]}
|
@@ -0,0 +1,95 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
var chunkVRXXWQRL_cjs = require('./chunk-VRXXWQRL.cjs');
|
4
|
+
|
5
|
+
// src/resources/fixed_amount_promotions.ts
|
6
|
+
var FixedAmountPromotions = class _FixedAmountPromotions extends chunkVRXXWQRL_cjs.ApiResource {
|
7
|
+
static TYPE = "fixed_amount_promotions";
|
8
|
+
async create(resource, params, options) {
|
9
|
+
return this.resources.create({ ...resource, type: _FixedAmountPromotions.TYPE }, params, options);
|
10
|
+
}
|
11
|
+
async update(resource, params, options) {
|
12
|
+
return this.resources.update({ ...resource, type: _FixedAmountPromotions.TYPE }, params, options);
|
13
|
+
}
|
14
|
+
async delete(id, options) {
|
15
|
+
await this.resources.delete(typeof id === "string" ? { id, type: _FixedAmountPromotions.TYPE } : id, options);
|
16
|
+
}
|
17
|
+
async market(fixedAmountPromotionId, params, options) {
|
18
|
+
const _fixedAmountPromotionId = fixedAmountPromotionId.id || fixedAmountPromotionId;
|
19
|
+
return this.resources.fetch({ type: "markets" }, `fixed_amount_promotions/${_fixedAmountPromotionId}/market`, params, options);
|
20
|
+
}
|
21
|
+
async order_amount_promotion_rule(fixedAmountPromotionId, params, options) {
|
22
|
+
const _fixedAmountPromotionId = fixedAmountPromotionId.id || fixedAmountPromotionId;
|
23
|
+
return this.resources.fetch({ type: "order_amount_promotion_rules" }, `fixed_amount_promotions/${_fixedAmountPromotionId}/order_amount_promotion_rule`, params, options);
|
24
|
+
}
|
25
|
+
async sku_list_promotion_rule(fixedAmountPromotionId, params, options) {
|
26
|
+
const _fixedAmountPromotionId = fixedAmountPromotionId.id || fixedAmountPromotionId;
|
27
|
+
return this.resources.fetch({ type: "sku_list_promotion_rules" }, `fixed_amount_promotions/${_fixedAmountPromotionId}/sku_list_promotion_rule`, params, options);
|
28
|
+
}
|
29
|
+
async coupon_codes_promotion_rule(fixedAmountPromotionId, params, options) {
|
30
|
+
const _fixedAmountPromotionId = fixedAmountPromotionId.id || fixedAmountPromotionId;
|
31
|
+
return this.resources.fetch({ type: "coupon_codes_promotion_rules" }, `fixed_amount_promotions/${_fixedAmountPromotionId}/coupon_codes_promotion_rule`, params, options);
|
32
|
+
}
|
33
|
+
async custom_promotion_rule(fixedAmountPromotionId, params, options) {
|
34
|
+
const _fixedAmountPromotionId = fixedAmountPromotionId.id || fixedAmountPromotionId;
|
35
|
+
return this.resources.fetch({ type: "custom_promotion_rules" }, `fixed_amount_promotions/${_fixedAmountPromotionId}/custom_promotion_rule`, params, options);
|
36
|
+
}
|
37
|
+
async sku_list(fixedAmountPromotionId, params, options) {
|
38
|
+
const _fixedAmountPromotionId = fixedAmountPromotionId.id || fixedAmountPromotionId;
|
39
|
+
return this.resources.fetch({ type: "sku_lists" }, `fixed_amount_promotions/${_fixedAmountPromotionId}/sku_list`, params, options);
|
40
|
+
}
|
41
|
+
async coupons(fixedAmountPromotionId, params, options) {
|
42
|
+
const _fixedAmountPromotionId = fixedAmountPromotionId.id || fixedAmountPromotionId;
|
43
|
+
return this.resources.fetch({ type: "coupons" }, `fixed_amount_promotions/${_fixedAmountPromotionId}/coupons`, params, options);
|
44
|
+
}
|
45
|
+
async attachments(fixedAmountPromotionId, params, options) {
|
46
|
+
const _fixedAmountPromotionId = fixedAmountPromotionId.id || fixedAmountPromotionId;
|
47
|
+
return this.resources.fetch({ type: "attachments" }, `fixed_amount_promotions/${_fixedAmountPromotionId}/attachments`, params, options);
|
48
|
+
}
|
49
|
+
async events(fixedAmountPromotionId, params, options) {
|
50
|
+
const _fixedAmountPromotionId = fixedAmountPromotionId.id || fixedAmountPromotionId;
|
51
|
+
return this.resources.fetch({ type: "events" }, `fixed_amount_promotions/${_fixedAmountPromotionId}/events`, params, options);
|
52
|
+
}
|
53
|
+
async tags(fixedAmountPromotionId, params, options) {
|
54
|
+
const _fixedAmountPromotionId = fixedAmountPromotionId.id || fixedAmountPromotionId;
|
55
|
+
return this.resources.fetch({ type: "tags" }, `fixed_amount_promotions/${_fixedAmountPromotionId}/tags`, params, options);
|
56
|
+
}
|
57
|
+
async versions(fixedAmountPromotionId, params, options) {
|
58
|
+
const _fixedAmountPromotionId = fixedAmountPromotionId.id || fixedAmountPromotionId;
|
59
|
+
return this.resources.fetch({ type: "versions" }, `fixed_amount_promotions/${_fixedAmountPromotionId}/versions`, params, options);
|
60
|
+
}
|
61
|
+
async skus(fixedAmountPromotionId, params, options) {
|
62
|
+
const _fixedAmountPromotionId = fixedAmountPromotionId.id || fixedAmountPromotionId;
|
63
|
+
return this.resources.fetch({ type: "skus" }, `fixed_amount_promotions/${_fixedAmountPromotionId}/skus`, params, options);
|
64
|
+
}
|
65
|
+
async _disable(id, params, options) {
|
66
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _FixedAmountPromotions.TYPE, _disable: true }, params, options);
|
67
|
+
}
|
68
|
+
async _enable(id, params, options) {
|
69
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _FixedAmountPromotions.TYPE, _enable: true }, params, options);
|
70
|
+
}
|
71
|
+
async _add_tags(id, triggerValue, params, options) {
|
72
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _FixedAmountPromotions.TYPE, _add_tags: triggerValue }, params, options);
|
73
|
+
}
|
74
|
+
async _remove_tags(id, triggerValue, params, options) {
|
75
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _FixedAmountPromotions.TYPE, _remove_tags: triggerValue }, params, options);
|
76
|
+
}
|
77
|
+
isFixedAmountPromotion(resource) {
|
78
|
+
return resource.type && resource.type === _FixedAmountPromotions.TYPE;
|
79
|
+
}
|
80
|
+
relationship(id) {
|
81
|
+
return super.relationshipOneToOne(id);
|
82
|
+
}
|
83
|
+
relationshipToMany(...ids) {
|
84
|
+
return super.relationshipOneToMany(...ids);
|
85
|
+
}
|
86
|
+
type() {
|
87
|
+
return _FixedAmountPromotions.TYPE;
|
88
|
+
}
|
89
|
+
};
|
90
|
+
var instance = new FixedAmountPromotions();
|
91
|
+
var fixed_amount_promotions_default = instance;
|
92
|
+
|
93
|
+
exports.fixed_amount_promotions_default = fixed_amount_promotions_default;
|
94
|
+
//# sourceMappingURL=chunk-ACTS2OQX.cjs.map
|
95
|
+
//# sourceMappingURL=chunk-ACTS2OQX.cjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../src/resources/fixed_amount_promotions.ts"],"names":["ApiResource"],"mappings":";;;;;AAsQA,IAAM,qBAAA,GAAN,MAAM,sBAAA,SAA8BA,6BAAkC,CAAA;AAAA,EAErE,OAAgB,IAAiC,GAAA,yBAAA;AAAA,EAEjD,MAAM,MAAA,CAAO,QAAsC,EAAA,MAAA,EAAoD,OAA0D,EAAA;AAChK,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAyD,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,sBAAsB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAClJ,EAEA,M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,EAAI,MAAM,sBAAsB,CAAA,IAAA,EAAM,WAAW,YAAa,EAAA,EAAG,QAAQ,OAAO,CAAA;AAAA;AACvM,EAEA,MAAM,YAAA,CAAa,EAAmC,EAAA,YAAA,EAAsB,QAAoD,OAA0D,EAAA;AACzL,IAAA,OAAO,KAAK,SAAU,CAAA,MAAA,CAAyD,EAAE,EAAK,EAAA,OAAO,OAAO,QAAW,GAAA,EAAA,GAAI,EAAG,CAAA,EAAA,EAAI,MAAM,sBAAsB,CAAA,IAAA,EAAM,cAAc,YAAa,EAAA,EAAG,QAAQ,OAAO,CAAA;AAAA;AAC1M,EAGA,uBAAuB,QAAiD,EAAA;AACvE,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,sBAAsB,CAAA,IAAA;AAAA;AAClE,EAGA,aAAa,EAAyD,EAAA;AACrE,IAAO,OAAA,KAAA,CAAM,qBAA8C,EAAE,CAAA;AAAA;AAC9D,EAEA,sBAAsB,GAA0C,EAAA;AAC/D,IAAO,OAAA,KAAA,CAAM,qBAA+C,CAAA,GAAG,GAAG,CAAA;AAAA;AACnE,EAGA,IAAiC,GAAA;AAChC,IAAA,OAAO,sBAAsB,CAAA,IAAA;AAAA;AAG/B,CAAA;AAGA,IAAM,QAAA,GAAW,IAAI,qBAAsB,EAAA;AAC3C,IAAO,+BAAQ,GAAA","file":"chunk-ACTS2OQX.cjs","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Market, MarketType } from './markets'\nimport type { OrderAmountPromotionRule, OrderAmountPromotionRuleType } from './order_amount_promotion_rules'\nimport type { SkuListPromotionRule, SkuListPromotionRuleType } from './sku_list_promotion_rules'\nimport type { CouponCodesPromotionRule, CouponCodesPromotionRuleType } from './coupon_codes_promotion_rules'\nimport type { CustomPromotionRule, CustomPromotionRuleType } from './custom_promotion_rules'\nimport type { SkuList, SkuListType } from './sku_lists'\nimport type { Coupon } from './coupons'\nimport type { Attachment } from './attachments'\nimport type { Event } from './events'\nimport type { Tag, TagType } from './tags'\nimport type { Version } from './versions'\nimport type { Sku } from './skus'\nimport type { PromotionRule } from './promotion_rules'\n\n\ntype FixedAmountPromotionType = 'fixed_amount_promotions'\ntype FixedAmountPromotionRel = ResourceRel & { type: FixedAmountPromotionType }\ntype MarketRel = ResourceRel & { type: MarketType }\ntype OrderAmountPromotionRuleRel = ResourceRel & { type: OrderAmountPromotionRuleType }\ntype SkuListPromotionRuleRel = ResourceRel & { type: SkuListPromotionRuleType }\ntype CouponCodesPromotionRuleRel = ResourceRel & { type: CouponCodesPromotionRuleType }\ntype CustomPromotionRuleRel = ResourceRel & { type: CustomPromotionRuleType }\ntype SkuListRel = ResourceRel & { type: SkuListType }\ntype TagRel = ResourceRel & { type: TagType }\n\n\nexport type FixedAmountPromotionSort = Pick<FixedAmountPromotion, 'id' | 'name' | 'currency_code' | 'exclusive' | 'priority' | 'starts_at' | 'expires_at' | 'total_usage_limit' | 'total_usage_count' | 'disabled_at'> & ResourceSort\n// export type FixedAmountPromotionFilter = Pick<FixedAmountPromotion, 'id' | 'name' | 'currency_code' | 'priority' | 'starts_at' | 'expires_at' | 'total_usage_limit' | 'total_usage_count' | 'disabled_at'> & ResourceFilter\n\n\ninterface FixedAmountPromotion extends Resource {\n\t\n\treadonly type: FixedAmountPromotionType\n\n\t/** \n\t * The promotion's internal name.\n\t * @example ```\"Personal promotion\"```\n\t */\n\tname: string\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code?: string | null\n\t/** \n\t * Indicates if the promotion will be applied exclusively, based on its priority score.\n\t * @example ```true```\n\t */\n\texclusive?: boolean | null\n\t/** \n\t * The priority assigned to the promotion (lower means higher priority).\n\t * @example ```2```\n\t */\n\tpriority?: number | null\n\t/** \n\t * The activation date/time of this promotion.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tstarts_at: string\n\t/** \n\t * The expiration date/time of this promotion (must be after starts_at).\n\t * @example ```\"2018-01-02T12:00:00.000Z\"```\n\t */\n\texpires_at: string\n\t/** \n\t * The total number of times this promotion can be applied. When 'null' it means promotion can be applied infinite times.\n\t * @example ```5```\n\t */\n\ttotal_usage_limit?: number | null\n\t/** \n\t * The number of times this promotion has been applied.\n\t * @example ```2```\n\t */\n\ttotal_usage_count?: number | null\n\t/** \n\t * Indicates if the promotion is active (enabled and not expired).\n\t * @example ```true```\n\t */\n\tactive?: boolean | null\n\t/** \n\t * The promotion status. One of 'disabled', 'expired', 'pending', 'active', or 'inactive'.\n\t * @example ```\"pending\"```\n\t */\n\tstatus?: 'disabled' | 'expired' | 'pending' | 'active' | 'inactive' | null\n\t/** \n\t * Time at which this resource was disabled.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tdisabled_at?: string | null\n\t/** \n\t * The discount fixed amount to be applied, in cents.\n\t * @example ```1000```\n\t */\n\tfixed_amount_cents: number\n\t/** \n\t * The discount fixed amount to be applied, float.\n\t * @example ```10```\n\t */\n\tfixed_amount_float?: number | null\n\t/** \n\t * The discount fixed amount to be applied, formatted.\n\t * @example ```\"€10,00\"```\n\t */\n\tformatted_fixed_amount?: string | null\n\n\tmarket?: Market | null\n\tpromotion_rules?: PromotionRule[] | null\n\torder_amount_promotion_rule?: OrderAmountPromotionRule | null\n\tsku_list_promotion_rule?: SkuListPromotionRule | null\n\tcoupon_codes_promotion_rule?: CouponCodesPromotionRule | null\n\tcustom_promotion_rule?: CustomPromotionRule | null\n\tsku_list?: SkuList | null\n\tcoupons?: Coupon[] | null\n\tattachments?: Attachment[] | null\n\tevents?: Event[] | null\n\ttags?: Tag[] | null\n\tversions?: Version[] | null\n\tskus?: Sku[] | null\n\n}\n\n\ninterface FixedAmountPromotionCreate extends ResourceCreate {\n\t\n\t/** \n\t * The promotion's internal name.\n\t * @example ```\"Personal promotion\"```\n\t */\n\tname: string\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code?: string | null\n\t/** \n\t * Indicates if the promotion will be applied exclusively, based on its priority score.\n\t * @example ```true```\n\t */\n\texclusive?: boolean | null\n\t/** \n\t * The priority assigned to the promotion (lower means higher priority).\n\t * @example ```2```\n\t */\n\tpriority?: number | null\n\t/** \n\t * The activation date/time of this promotion.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tstarts_at: string\n\t/** \n\t * The expiration date/time of this promotion (must be after starts_at).\n\t * @example ```\"2018-01-02T12:00:00.000Z\"```\n\t */\n\texpires_at: string\n\t/** \n\t * The total number of times this promotion can be applied. When 'null' it means promotion can be applied infinite times.\n\t * @example ```5```\n\t */\n\ttotal_usage_limit?: number | null\n\t/** \n\t * Send this attribute if you want to mark this resource as disabled.\n\t * @example ```true```\n\t */\n\t_disable?: boolean | null\n\t/** \n\t * Send this attribute if you want to mark this resource as enabled.\n\t * @example ```true```\n\t */\n\t_enable?: boolean | null\n\t/** \n\t * The discount fixed amount to be applied, in cents.\n\t * @example ```1000```\n\t */\n\tfixed_amount_cents: number\n\n\tmarket?: MarketRel | null\n\torder_amount_promotion_rule?: OrderAmountPromotionRuleRel | null\n\tsku_list_promotion_rule?: SkuListPromotionRuleRel | null\n\tcoupon_codes_promotion_rule?: CouponCodesPromotionRuleRel | null\n\tcustom_promotion_rule?: CustomPromotionRuleRel | null\n\tsku_list?: SkuListRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\ninterface FixedAmountPromotionUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The promotion's internal name.\n\t * @example ```\"Personal promotion\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code?: string | null\n\t/** \n\t * Indicates if the promotion will be applied exclusively, based on its priority score.\n\t * @example ```true```\n\t */\n\texclusive?: boolean | null\n\t/** \n\t * The priority assigned to the promotion (lower means higher priority).\n\t * @example ```2```\n\t */\n\tpriority?: number | null\n\t/** \n\t * The activation date/time of this promotion.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tstarts_at?: string | null\n\t/** \n\t * The expiration date/time of this promotion (must be after starts_at).\n\t * @example ```\"2018-01-02T12:00:00.000Z\"```\n\t */\n\texpires_at?: string | null\n\t/** \n\t * The total number of times this promotion can be applied. When 'null' it means promotion can be applied infinite times.\n\t * @example ```5```\n\t */\n\ttotal_usage_limit?: number | null\n\t/** \n\t * Send this attribute if you want to mark this resource as disabled.\n\t * @example ```true```\n\t */\n\t_disable?: boolean | null\n\t/** \n\t * Send this attribute if you want to mark this resource as enabled.\n\t * @example ```true```\n\t */\n\t_enable?: boolean | null\n\t/** \n\t * Comma separated list of tags to be added. Duplicates, invalid and non existing ones are discarded. Cannot be passed by sales channels.\n\t */\n\t_add_tags?: string | null\n\t/** \n\t * Comma separated list of tags to be removed. Duplicates, invalid and non existing ones are discarded. Cannot be passed by sales channels.\n\t */\n\t_remove_tags?: string | null\n\t/** \n\t * The discount fixed amount to be applied, in cents.\n\t * @example ```1000```\n\t */\n\tfixed_amount_cents?: number | null\n\n\tmarket?: MarketRel | null\n\torder_amount_promotion_rule?: OrderAmountPromotionRuleRel | null\n\tsku_list_promotion_rule?: SkuListPromotionRuleRel | null\n\tcoupon_codes_promotion_rule?: CouponCodesPromotionRuleRel | null\n\tcustom_promotion_rule?: CustomPromotionRuleRel | null\n\tsku_list?: SkuListRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\nclass FixedAmountPromotions extends ApiResource<FixedAmountPromotion> {\n\n\tstatic readonly TYPE: FixedAmountPromotionType = 'fixed_amount_promotions' as const\n\n\tasync create(resource: FixedAmountPromotionCreate, params?: QueryParamsRetrieve<FixedAmountPromotion>, options?: ResourcesConfig): Promise<FixedAmountPromotion> {\n\t\treturn this.resources.create<FixedAmountPromotionCreate, FixedAmountPromotion>({ ...resource, type: FixedAmountPromotions.TYPE }, params, options)\n\t}\n\n\tasync update(resource: FixedAmountPromotionUpdate, params?: QueryParamsRetrieve<FixedAmountPromotion>, options?: ResourcesConfig): Promise<FixedAmountPromotion> {\n\t\treturn this.resources.update<FixedAmountPromotionUpdate, FixedAmountPromotion>({ ...resource, type: FixedAmountPromotions.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: FixedAmountPromotions.TYPE } : id, options)\n\t}\n\n\tasync market(fixedAmountPromotionId: string | FixedAmountPromotion, params?: QueryParamsRetrieve<Market>, options?: ResourcesConfig): Promise<Market> {\n\t\tconst _fixedAmountPromotionId = (fixedAmountPromotionId as FixedAmountPromotion).id || fixedAmountPromotionId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `fixed_amount_promotions/${_fixedAmountPromotionId}/market`, params, options) as unknown as Market\n\t}\n\n\tasync order_amount_promotion_rule(fixedAmountPromotionId: string | FixedAmountPromotion, params?: QueryParamsRetrieve<OrderAmountPromotionRule>, options?: ResourcesConfig): Promise<OrderAmountPromotionRule> {\n\t\tconst _fixedAmountPromotionId = (fixedAmountPromotionId as FixedAmountPromotion).id || fixedAmountPromotionId as string\n\t\treturn this.resources.fetch<OrderAmountPromotionRule>({ type: 'order_amount_promotion_rules' }, `fixed_amount_promotions/${_fixedAmountPromotionId}/order_amount_promotion_rule`, params, options) as unknown as OrderAmountPromotionRule\n\t}\n\n\tasync sku_list_promotion_rule(fixedAmountPromotionId: string | FixedAmountPromotion, params?: QueryParamsRetrieve<SkuListPromotionRule>, options?: ResourcesConfig): Promise<SkuListPromotionRule> {\n\t\tconst _fixedAmountPromotionId = (fixedAmountPromotionId as FixedAmountPromotion).id || fixedAmountPromotionId as string\n\t\treturn this.resources.fetch<SkuListPromotionRule>({ type: 'sku_list_promotion_rules' }, `fixed_amount_promotions/${_fixedAmountPromotionId}/sku_list_promotion_rule`, params, options) as unknown as SkuListPromotionRule\n\t}\n\n\tasync coupon_codes_promotion_rule(fixedAmountPromotionId: string | FixedAmountPromotion, params?: QueryParamsRetrieve<CouponCodesPromotionRule>, options?: ResourcesConfig): Promise<CouponCodesPromotionRule> {\n\t\tconst _fixedAmountPromotionId = (fixedAmountPromotionId as FixedAmountPromotion).id || fixedAmountPromotionId as string\n\t\treturn this.resources.fetch<CouponCodesPromotionRule>({ type: 'coupon_codes_promotion_rules' }, `fixed_amount_promotions/${_fixedAmountPromotionId}/coupon_codes_promotion_rule`, params, options) as unknown as CouponCodesPromotionRule\n\t}\n\n\tasync custom_promotion_rule(fixedAmountPromotionId: string | FixedAmountPromotion, params?: QueryParamsRetrieve<CustomPromotionRule>, options?: ResourcesConfig): Promise<CustomPromotionRule> {\n\t\tconst _fixedAmountPromotionId = (fixedAmountPromotionId as FixedAmountPromotion).id || fixedAmountPromotionId as string\n\t\treturn this.resources.fetch<CustomPromotionRule>({ type: 'custom_promotion_rules' }, `fixed_amount_promotions/${_fixedAmountPromotionId}/custom_promotion_rule`, params, options) as unknown as CustomPromotionRule\n\t}\n\n\tasync sku_list(fixedAmountPromotionId: string | FixedAmountPromotion, params?: QueryParamsRetrieve<SkuList>, options?: ResourcesConfig): Promise<SkuList> {\n\t\tconst _fixedAmountPromotionId = (fixedAmountPromotionId as FixedAmountPromotion).id || fixedAmountPromotionId as string\n\t\treturn this.resources.fetch<SkuList>({ type: 'sku_lists' }, `fixed_amount_promotions/${_fixedAmountPromotionId}/sku_list`, params, options) as unknown as SkuList\n\t}\n\n\tasync coupons(fixedAmountPromotionId: string | FixedAmountPromotion, params?: QueryParamsList<Coupon>, options?: ResourcesConfig): Promise<ListResponse<Coupon>> {\n\t\tconst _fixedAmountPromotionId = (fixedAmountPromotionId as FixedAmountPromotion).id || fixedAmountPromotionId as string\n\t\treturn this.resources.fetch<Coupon>({ type: 'coupons' }, `fixed_amount_promotions/${_fixedAmountPromotionId}/coupons`, params, options) as unknown as ListResponse<Coupon>\n\t}\n\n\tasync attachments(fixedAmountPromotionId: string | FixedAmountPromotion, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _fixedAmountPromotionId = (fixedAmountPromotionId as FixedAmountPromotion).id || fixedAmountPromotionId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `fixed_amount_promotions/${_fixedAmountPromotionId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync events(fixedAmountPromotionId: string | FixedAmountPromotion, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _fixedAmountPromotionId = (fixedAmountPromotionId as FixedAmountPromotion).id || fixedAmountPromotionId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `fixed_amount_promotions/${_fixedAmountPromotionId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync tags(fixedAmountPromotionId: string | FixedAmountPromotion, params?: QueryParamsList<Tag>, options?: ResourcesConfig): Promise<ListResponse<Tag>> {\n\t\tconst _fixedAmountPromotionId = (fixedAmountPromotionId as FixedAmountPromotion).id || fixedAmountPromotionId as string\n\t\treturn this.resources.fetch<Tag>({ type: 'tags' }, `fixed_amount_promotions/${_fixedAmountPromotionId}/tags`, params, options) as unknown as ListResponse<Tag>\n\t}\n\n\tasync versions(fixedAmountPromotionId: string | FixedAmountPromotion, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _fixedAmountPromotionId = (fixedAmountPromotionId as FixedAmountPromotion).id || fixedAmountPromotionId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `fixed_amount_promotions/${_fixedAmountPromotionId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync skus(fixedAmountPromotionId: string | FixedAmountPromotion, params?: QueryParamsList<Sku>, options?: ResourcesConfig): Promise<ListResponse<Sku>> {\n\t\tconst _fixedAmountPromotionId = (fixedAmountPromotionId as FixedAmountPromotion).id || fixedAmountPromotionId as string\n\t\treturn this.resources.fetch<Sku>({ type: 'skus' }, `fixed_amount_promotions/${_fixedAmountPromotionId}/skus`, params, options) as unknown as ListResponse<Sku>\n\t}\n\n\tasync _disable(id: string | FixedAmountPromotion, params?: QueryParamsRetrieve<FixedAmountPromotion>, options?: ResourcesConfig): Promise<FixedAmountPromotion> {\n\t\treturn this.resources.update<FixedAmountPromotionUpdate, FixedAmountPromotion>({ id: (typeof id === 'string')? id: id.id, type: FixedAmountPromotions.TYPE, _disable: true }, params, options)\n\t}\n\n\tasync _enable(id: string | FixedAmountPromotion, params?: QueryParamsRetrieve<FixedAmountPromotion>, options?: ResourcesConfig): Promise<FixedAmountPromotion> {\n\t\treturn this.resources.update<FixedAmountPromotionUpdate, FixedAmountPromotion>({ id: (typeof id === 'string')? id: id.id, type: FixedAmountPromotions.TYPE, _enable: true }, params, options)\n\t}\n\n\tasync _add_tags(id: string | FixedAmountPromotion, triggerValue: string, params?: QueryParamsRetrieve<FixedAmountPromotion>, options?: ResourcesConfig): Promise<FixedAmountPromotion> {\n\t\treturn this.resources.update<FixedAmountPromotionUpdate, FixedAmountPromotion>({ id: (typeof id === 'string')? id: id.id, type: FixedAmountPromotions.TYPE, _add_tags: triggerValue }, params, options)\n\t}\n\n\tasync _remove_tags(id: string | FixedAmountPromotion, triggerValue: string, params?: QueryParamsRetrieve<FixedAmountPromotion>, options?: ResourcesConfig): Promise<FixedAmountPromotion> {\n\t\treturn this.resources.update<FixedAmountPromotionUpdate, FixedAmountPromotion>({ id: (typeof id === 'string')? id: id.id, type: FixedAmountPromotions.TYPE, _remove_tags: triggerValue }, params, options)\n\t}\n\n\n\tisFixedAmountPromotion(resource: any): resource is FixedAmountPromotion {\n\t\treturn resource.type && (resource.type === FixedAmountPromotions.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): FixedAmountPromotionRel {\n\t\treturn super.relationshipOneToOne<FixedAmountPromotionRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): FixedAmountPromotionRel[] {\n\t\treturn super.relationshipOneToMany<FixedAmountPromotionRel>(...ids)\n\t}\n\n\n\ttype(): FixedAmountPromotionType {\n\t\treturn FixedAmountPromotions.TYPE\n\t}\n\n}\n\n\nconst instance = new FixedAmountPromotions()\nexport default instance\n\nexport type { FixedAmountPromotions, FixedAmountPromotion, FixedAmountPromotionCreate, FixedAmountPromotionUpdate, FixedAmountPromotionType }\n"]}
|
@@ -0,0 +1,61 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
var chunkVRXXWQRL_cjs = require('./chunk-VRXXWQRL.cjs');
|
4
|
+
|
5
|
+
// src/resources/sku_options.ts
|
6
|
+
var SkuOptions = class _SkuOptions extends chunkVRXXWQRL_cjs.ApiResource {
|
7
|
+
static TYPE = "sku_options";
|
8
|
+
async create(resource, params, options) {
|
9
|
+
return this.resources.create({ ...resource, type: _SkuOptions.TYPE }, params, options);
|
10
|
+
}
|
11
|
+
async update(resource, params, options) {
|
12
|
+
return this.resources.update({ ...resource, type: _SkuOptions.TYPE }, params, options);
|
13
|
+
}
|
14
|
+
async delete(id, options) {
|
15
|
+
await this.resources.delete(typeof id === "string" ? { id, type: _SkuOptions.TYPE } : id, options);
|
16
|
+
}
|
17
|
+
async market(skuOptionId, params, options) {
|
18
|
+
const _skuOptionId = skuOptionId.id || skuOptionId;
|
19
|
+
return this.resources.fetch({ type: "markets" }, `sku_options/${_skuOptionId}/market`, params, options);
|
20
|
+
}
|
21
|
+
async attachments(skuOptionId, params, options) {
|
22
|
+
const _skuOptionId = skuOptionId.id || skuOptionId;
|
23
|
+
return this.resources.fetch({ type: "attachments" }, `sku_options/${_skuOptionId}/attachments`, params, options);
|
24
|
+
}
|
25
|
+
async events(skuOptionId, params, options) {
|
26
|
+
const _skuOptionId = skuOptionId.id || skuOptionId;
|
27
|
+
return this.resources.fetch({ type: "events" }, `sku_options/${_skuOptionId}/events`, params, options);
|
28
|
+
}
|
29
|
+
async tags(skuOptionId, params, options) {
|
30
|
+
const _skuOptionId = skuOptionId.id || skuOptionId;
|
31
|
+
return this.resources.fetch({ type: "tags" }, `sku_options/${_skuOptionId}/tags`, params, options);
|
32
|
+
}
|
33
|
+
async versions(skuOptionId, params, options) {
|
34
|
+
const _skuOptionId = skuOptionId.id || skuOptionId;
|
35
|
+
return this.resources.fetch({ type: "versions" }, `sku_options/${_skuOptionId}/versions`, params, options);
|
36
|
+
}
|
37
|
+
async _add_tags(id, triggerValue, params, options) {
|
38
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _SkuOptions.TYPE, _add_tags: triggerValue }, params, options);
|
39
|
+
}
|
40
|
+
async _remove_tags(id, triggerValue, params, options) {
|
41
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _SkuOptions.TYPE, _remove_tags: triggerValue }, params, options);
|
42
|
+
}
|
43
|
+
isSkuOption(resource) {
|
44
|
+
return resource.type && resource.type === _SkuOptions.TYPE;
|
45
|
+
}
|
46
|
+
relationship(id) {
|
47
|
+
return super.relationshipOneToOne(id);
|
48
|
+
}
|
49
|
+
relationshipToMany(...ids) {
|
50
|
+
return super.relationshipOneToMany(...ids);
|
51
|
+
}
|
52
|
+
type() {
|
53
|
+
return _SkuOptions.TYPE;
|
54
|
+
}
|
55
|
+
};
|
56
|
+
var instance = new SkuOptions();
|
57
|
+
var sku_options_default = instance;
|
58
|
+
|
59
|
+
exports.sku_options_default = sku_options_default;
|
60
|
+
//# sourceMappingURL=chunk-AHIMATNV.cjs.map
|
61
|
+
//# sourceMappingURL=chunk-AHIMATNV.cjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../src/resources/sku_options.ts"],"names":["ApiResource"],"mappings":";;;;;AAsKA,IAAM,UAAA,GAAN,MAAM,WAAA,SAAmBA,6BAAuB,CAAA;AAAA,EAE/C,OAA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CAAA;AAAA;AACtK,EAEA,MAAM,YAAA,CAAa,EAAwB,EAAA,YAAA,EAAsB,QAAyC,OAA+C,EAAA;AACxJ,IAAA,OAAO,KAAK,SAAU,CAAA,MAAA,CAAmC,EAAE,EAAK,EAAA,OAAO,OAAO,QAAW,GAAA,EAAA,GAAI,EAAG,CAAA,EAAA,EAAI,MAAM,WAAW,CAAA,IAAA,EAAM,cAAc,YAAa,EAAA,EAAG,QAAQ,OAAO,CAAA;AAAA;AACzK,EAGA,YAAY,QAAsC,EAAA;AACjD,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,WAAW,CAAA,IAAA;AAAA;AACvD,EAGA,aAAa,EAA8C,EAAA;AAC1D,IAAO,OAAA,KAAA,CAAM,qBAAmC,EAAE,CAAA;AAAA;AACnD,EAEA,sBAAsB,GAA+B,EAAA;AACpD,IAAO,OAAA,KAAA,CAAM,qBAAoC,CAAA,GAAG,GAAG,CAAA;AAAA;AACxD,EAGA,IAAsB,GAAA;AACrB,IAAA,OAAO,WAAW,CAAA,IAAA;AAAA;AAGpB,CAAA;AAGA,IAAM,QAAA,GAAW,IAAI,UAAW,EAAA;AAChC,IAAO,mBAAQ,GAAA","file":"chunk-AHIMATNV.cjs","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Market, MarketType } from './markets'\nimport type { Attachment } from './attachments'\nimport type { Event } from './events'\nimport type { Tag, TagType } from './tags'\nimport type { Version } from './versions'\n\n\ntype SkuOptionType = 'sku_options'\ntype SkuOptionRel = ResourceRel & { type: SkuOptionType }\ntype MarketRel = ResourceRel & { type: MarketType }\ntype TagRel = ResourceRel & { type: TagType }\n\n\nexport type SkuOptionSort = Pick<SkuOption, 'id' | 'name' | 'currency_code' | 'price_amount_cents' | 'delay_hours' | 'delay_days'> & ResourceSort\n// export type SkuOptionFilter = Pick<SkuOption, 'id' | 'name' | 'currency_code' | 'description' | 'price_amount_cents' | 'delay_hours' | 'delay_days'> & ResourceFilter\n\n\ninterface SkuOption extends Resource {\n\t\n\treadonly type: SkuOptionType\n\n\t/** \n\t * The SKU option's internal name.\n\t * @example ```\"Embossing\"```\n\t */\n\tname: string\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code?: string | null\n\t/** \n\t * An internal description of the SKU option.\n\t * @example ```\"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\"```\n\t */\n\tdescription?: string | null\n\t/** \n\t * The price of this shipping method, in cents.\n\t * @example ```1000```\n\t */\n\tprice_amount_cents?: number | null\n\t/** \n\t * The price of this shipping method, float.\n\t * @example ```10```\n\t */\n\tprice_amount_float?: number | null\n\t/** \n\t * The price of this shipping method, formatted.\n\t * @example ```\"€10,00\"```\n\t */\n\tformatted_price_amount?: string | null\n\t/** \n\t * The delay time (in hours) that should be added to the delivery lead time when this option is purchased.\n\t * @example ```48```\n\t */\n\tdelay_hours?: number | null\n\t/** \n\t * The delay time, in days (rounded).\n\t * @example ```2```\n\t */\n\tdelay_days?: number | null\n\t/** \n\t * The regex that will be evaluated to match the SKU codes, max size is 5000.\n\t * @example ```\"^(A|B).*$\"```\n\t */\n\tsku_code_regex?: string | null\n\n\tmarket?: Market | null\n\tattachments?: Attachment[] | null\n\tevents?: Event[] | null\n\ttags?: Tag[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface SkuOptionCreate extends ResourceCreate {\n\t\n\t/** \n\t * The SKU option's internal name.\n\t * @example ```\"Embossing\"```\n\t */\n\tname: string\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code?: string | null\n\t/** \n\t * An internal description of the SKU option.\n\t * @example ```\"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\"```\n\t */\n\tdescription?: string | null\n\t/** \n\t * The price of this shipping method, in cents.\n\t * @example ```1000```\n\t */\n\tprice_amount_cents?: number | null\n\t/** \n\t * The delay time (in hours) that should be added to the delivery lead time when this option is purchased.\n\t * @example ```48```\n\t */\n\tdelay_hours?: number | null\n\t/** \n\t * The regex that will be evaluated to match the SKU codes, max size is 5000.\n\t * @example ```\"^(A|B).*$\"```\n\t */\n\tsku_code_regex?: string | null\n\n\tmarket?: MarketRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\ninterface SkuOptionUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The SKU option's internal name.\n\t * @example ```\"Embossing\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code?: string | null\n\t/** \n\t * An internal description of the SKU option.\n\t * @example ```\"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\"```\n\t */\n\tdescription?: string | null\n\t/** \n\t * The price of this shipping method, in cents.\n\t * @example ```1000```\n\t */\n\tprice_amount_cents?: number | null\n\t/** \n\t * The delay time (in hours) that should be added to the delivery lead time when this option is purchased.\n\t * @example ```48```\n\t */\n\tdelay_hours?: number | null\n\t/** \n\t * The regex that will be evaluated to match the SKU codes, max size is 5000.\n\t * @example ```\"^(A|B).*$\"```\n\t */\n\tsku_code_regex?: string | null\n\t/** \n\t * Comma separated list of tags to be added. Duplicates, invalid and non existing ones are discarded. Cannot be passed by sales channels.\n\t */\n\t_add_tags?: string | null\n\t/** \n\t * Comma separated list of tags to be removed. Duplicates, invalid and non existing ones are discarded. Cannot be passed by sales channels.\n\t */\n\t_remove_tags?: string | null\n\n\tmarket?: MarketRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\nclass SkuOptions extends ApiResource<SkuOption> {\n\n\tstatic readonly TYPE: SkuOptionType = 'sku_options' as const\n\n\tasync create(resource: SkuOptionCreate, params?: QueryParamsRetrieve<SkuOption>, options?: ResourcesConfig): Promise<SkuOption> {\n\t\treturn this.resources.create<SkuOptionCreate, SkuOption>({ ...resource, type: SkuOptions.TYPE }, params, options)\n\t}\n\n\tasync update(resource: SkuOptionUpdate, params?: QueryParamsRetrieve<SkuOption>, options?: ResourcesConfig): Promise<SkuOption> {\n\t\treturn this.resources.update<SkuOptionUpdate, SkuOption>({ ...resource, type: SkuOptions.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: SkuOptions.TYPE } : id, options)\n\t}\n\n\tasync market(skuOptionId: string | SkuOption, params?: QueryParamsRetrieve<Market>, options?: ResourcesConfig): Promise<Market> {\n\t\tconst _skuOptionId = (skuOptionId as SkuOption).id || skuOptionId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `sku_options/${_skuOptionId}/market`, params, options) as unknown as Market\n\t}\n\n\tasync attachments(skuOptionId: string | SkuOption, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _skuOptionId = (skuOptionId as SkuOption).id || skuOptionId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `sku_options/${_skuOptionId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync events(skuOptionId: string | SkuOption, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _skuOptionId = (skuOptionId as SkuOption).id || skuOptionId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `sku_options/${_skuOptionId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync tags(skuOptionId: string | SkuOption, params?: QueryParamsList<Tag>, options?: ResourcesConfig): Promise<ListResponse<Tag>> {\n\t\tconst _skuOptionId = (skuOptionId as SkuOption).id || skuOptionId as string\n\t\treturn this.resources.fetch<Tag>({ type: 'tags' }, `sku_options/${_skuOptionId}/tags`, params, options) as unknown as ListResponse<Tag>\n\t}\n\n\tasync versions(skuOptionId: string | SkuOption, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _skuOptionId = (skuOptionId as SkuOption).id || skuOptionId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `sku_options/${_skuOptionId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync _add_tags(id: string | SkuOption, triggerValue: string, params?: QueryParamsRetrieve<SkuOption>, options?: ResourcesConfig): Promise<SkuOption> {\n\t\treturn this.resources.update<SkuOptionUpdate, SkuOption>({ id: (typeof id === 'string')? id: id.id, type: SkuOptions.TYPE, _add_tags: triggerValue }, params, options)\n\t}\n\n\tasync _remove_tags(id: string | SkuOption, triggerValue: string, params?: QueryParamsRetrieve<SkuOption>, options?: ResourcesConfig): Promise<SkuOption> {\n\t\treturn this.resources.update<SkuOptionUpdate, SkuOption>({ id: (typeof id === 'string')? id: id.id, type: SkuOptions.TYPE, _remove_tags: triggerValue }, params, options)\n\t}\n\n\n\tisSkuOption(resource: any): resource is SkuOption {\n\t\treturn resource.type && (resource.type === SkuOptions.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): SkuOptionRel {\n\t\treturn super.relationshipOneToOne<SkuOptionRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): SkuOptionRel[] {\n\t\treturn super.relationshipOneToMany<SkuOptionRel>(...ids)\n\t}\n\n\n\ttype(): SkuOptionType {\n\t\treturn SkuOptions.TYPE\n\t}\n\n}\n\n\nconst instance = new SkuOptions()\nexport default instance\n\nexport type { SkuOptions, SkuOption, SkuOptionCreate, SkuOptionUpdate, SkuOptionType }\n"]}
|