@commercelayer/sdk 7.0.0-rc.3 → 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/README.md +2 -1
- package/lib/{api-DDgIE2i8.d.ts → api-F1F37Dud.d.ts} +27 -8
- package/lib/{api-DmIZO_Np.d.cts → api-IwWtsAqE.d.cts} +27 -8
- package/lib/api.cjs +397 -521
- package/lib/api.cjs.map +1 -1
- package/lib/api.d.cts +1 -1
- package/lib/api.d.ts +1 -1
- package/lib/api.js +141 -131
- package/lib/api.js.map +1 -1
- package/lib/bundle.cjs +689 -0
- package/lib/bundle.cjs.map +1 -0
- package/lib/bundle.d.cts +145 -0
- package/lib/bundle.d.ts +145 -0
- package/lib/bundle.js +687 -0
- package/lib/bundle.js.map +1 -0
- 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 -105
- package/lib/commercelayer.cjs.map +1 -1
- package/lib/commercelayer.d.cts +4 -4
- package/lib/commercelayer.d.ts +4 -4
- 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.d.cts +1 -1
- package/lib/enum.d.ts +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.d.cts +1 -1
- package/lib/index.d.ts +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.d.cts +1 -1
- package/lib/jsonapi.d.ts +1 -1
- package/lib/jsonapi.js +9 -71
- package/lib/jsonapi.js.map +1 -1
- package/lib/model.d.cts +1 -1
- package/lib/model.d.ts +1 -1
- package/lib/query.cjs +16 -59
- package/lib/query.cjs.map +1 -1
- package/lib/query.d.cts +1 -1
- package/lib/query.d.ts +1 -1
- package/lib/query.js +4 -56
- package/lib/query.js.map +1 -1
- package/lib/resource.cjs +29 -211
- package/lib/resource.cjs.map +1 -1
- package/lib/resource.d.cts +1 -1
- package/lib/resource.d.ts +1 -1
- package/lib/resource.js +9 -204
- 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.d.cts +1 -1
- package/lib/resources/addresses.d.ts +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.d.cts +1 -1
- package/lib/resources/adjustments.d.ts +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.d.cts +1 -1
- package/lib/resources/adyen_gateways.d.ts +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.d.cts +1 -1
- package/lib/resources/adyen_payments.d.ts +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.d.cts +1 -1
- package/lib/resources/applications.d.ts +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.d.cts +1 -1
- package/lib/resources/attachments.d.ts +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.d.cts +1 -1
- package/lib/resources/authorizations.d.ts +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.d.cts +1 -1
- package/lib/resources/avalara_accounts.d.ts +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.d.cts +1 -1
- package/lib/resources/axerve_gateways.d.ts +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.d.cts +1 -1
- package/lib/resources/axerve_payments.d.ts +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.d.cts +1 -1
- package/lib/resources/bing_geocoders.d.ts +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.d.cts +1 -1
- package/lib/resources/braintree_gateways.d.ts +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.d.cts +1 -1
- package/lib/resources/braintree_payments.d.ts +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.d.cts +1 -1
- package/lib/resources/bundles.d.ts +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.d.cts +1 -1
- package/lib/resources/buy_x_pay_y_promotions.d.ts +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.d.cts +1 -1
- package/lib/resources/captures.d.ts +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.d.cts +1 -1
- package/lib/resources/carrier_accounts.d.ts +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.d.cts +1 -1
- package/lib/resources/checkout_com_gateways.d.ts +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.d.cts +1 -1
- package/lib/resources/checkout_com_payments.d.ts +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.d.cts +1 -1
- package/lib/resources/cleanups.d.ts +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.d.cts +1 -1
- package/lib/resources/coupon_codes_promotion_rules.d.ts +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.d.cts +1 -1
- package/lib/resources/coupon_recipients.d.ts +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.d.cts +1 -1
- package/lib/resources/coupons.d.ts +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.d.cts +1 -1
- package/lib/resources/custom_promotion_rules.d.ts +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.d.cts +1 -1
- package/lib/resources/customer_addresses.d.ts +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.d.cts +1 -1
- package/lib/resources/customer_groups.d.ts +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.d.cts +1 -1
- package/lib/resources/customer_password_resets.d.ts +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.d.cts +1 -1
- package/lib/resources/customer_payment_sources.d.ts +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.d.cts +1 -1
- package/lib/resources/customer_subscriptions.d.ts +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.d.cts +1 -1
- package/lib/resources/customers.d.ts +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.d.cts +1 -1
- package/lib/resources/delivery_lead_times.d.ts +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.d.cts +1 -1
- package/lib/resources/discount_engine_items.d.ts +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.d.cts +1 -1
- package/lib/resources/discount_engines.d.ts +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.d.cts +1 -1
- package/lib/resources/easypost_pickups.d.ts +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.d.cts +1 -1
- package/lib/resources/event_callbacks.d.ts +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.d.cts +1 -1
- package/lib/resources/events.d.ts +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.d.cts +1 -1
- package/lib/resources/exports.d.ts +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.d.cts +1 -1
- package/lib/resources/external_gateways.d.ts +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.d.cts +1 -1
- package/lib/resources/external_payments.d.ts +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.d.cts +1 -1
- package/lib/resources/external_promotions.d.ts +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.d.cts +1 -1
- package/lib/resources/external_tax_calculators.d.ts +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.d.cts +1 -1
- package/lib/resources/fixed_amount_promotions.d.ts +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.d.cts +1 -1
- package/lib/resources/fixed_price_promotions.d.ts +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.d.cts +1 -1
- package/lib/resources/flex_promotions.d.ts +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.d.cts +1 -1
- package/lib/resources/free_gift_promotions.d.ts +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.d.cts +1 -1
- package/lib/resources/free_shipping_promotions.d.ts +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.d.cts +1 -1
- package/lib/resources/geocoders.d.ts +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.d.cts +1 -1
- package/lib/resources/gift_card_recipients.d.ts +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.d.cts +1 -1
- package/lib/resources/gift_cards.d.ts +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.d.cts +1 -1
- package/lib/resources/google_geocoders.d.ts +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.d.cts +1 -1
- package/lib/resources/imports.d.ts +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.d.cts +1 -1
- package/lib/resources/in_stock_subscriptions.d.ts +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.d.cts +1 -1
- package/lib/resources/inventory_models.d.ts +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.d.cts +1 -1
- package/lib/resources/inventory_return_locations.d.ts +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.d.cts +1 -1
- package/lib/resources/inventory_stock_locations.d.ts +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.d.cts +1 -1
- package/lib/resources/klarna_gateways.d.ts +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.d.cts +1 -1
- package/lib/resources/klarna_payments.d.ts +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.d.cts +1 -1
- package/lib/resources/line_item_options.d.ts +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.d.cts +1 -1
- package/lib/resources/line_items.d.ts +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.d.cts +1 -1
- package/lib/resources/links.d.ts +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.d.cts +1 -1
- package/lib/resources/manual_gateways.d.ts +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.d.cts +1 -1
- package/lib/resources/manual_tax_calculators.d.ts +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 -90
- package/lib/resources/markets.cjs.map +1 -1
- package/lib/resources/markets.d.cts +1 -1
- package/lib/resources/markets.d.ts +1 -1
- package/lib/resources/markets.js +10 -92
- 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.d.cts +1 -1
- package/lib/resources/merchants.d.ts +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.d.cts +1 -1
- package/lib/resources/notifications.d.ts +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.d.cts +1 -1
- package/lib/resources/order_amount_promotion_rules.d.ts +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.d.cts +1 -1
- package/lib/resources/order_copies.d.ts +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.d.cts +1 -1
- package/lib/resources/order_factories.d.ts +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.d.cts +1 -1
- package/lib/resources/order_subscription_items.d.ts +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.d.cts +1 -1
- package/lib/resources/order_subscriptions.d.ts +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 -271
- package/lib/resources/orders.cjs.map +1 -1
- package/lib/resources/orders.d.cts +1 -1
- package/lib/resources/orders.d.ts +1 -1
- package/lib/resources/orders.js +10 -273
- 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.d.cts +1 -1
- package/lib/resources/organizations.d.ts +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.d.cts +1 -1
- package/lib/resources/packages.d.ts +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.d.cts +1 -1
- package/lib/resources/parcel_line_items.d.ts +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.d.cts +1 -1
- package/lib/resources/parcels.d.ts +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.d.cts +1 -1
- package/lib/resources/payment_gateways.d.ts +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.d.cts +1 -1
- package/lib/resources/payment_methods.d.ts +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.d.cts +1 -1
- package/lib/resources/payment_options.d.ts +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.d.cts +1 -1
- package/lib/resources/paypal_gateways.d.ts +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.d.cts +1 -1
- package/lib/resources/paypal_payments.d.ts +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.d.cts +1 -1
- package/lib/resources/percentage_discount_promotions.d.ts +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.d.cts +1 -1
- package/lib/resources/pickups.d.ts +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.d.cts +1 -1
- package/lib/resources/price_frequency_tiers.d.ts +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.d.cts +1 -1
- package/lib/resources/price_list_schedulers.d.ts +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.d.cts +1 -1
- package/lib/resources/price_lists.d.ts +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.d.cts +1 -1
- package/lib/resources/price_tiers.d.ts +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.d.cts +1 -1
- package/lib/resources/price_volume_tiers.d.ts +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.d.cts +1 -1
- package/lib/resources/prices.d.ts +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.d.cts +1 -1
- package/lib/resources/promotion_rules.d.ts +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.d.cts +1 -1
- package/lib/resources/promotions.d.ts +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.d.cts +1 -1
- package/lib/resources/recurring_order_copies.d.ts +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.d.cts +1 -1
- package/lib/resources/refunds.d.ts +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.d.cts +1 -1
- package/lib/resources/reserved_stocks.d.ts +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.d.cts +1 -1
- package/lib/resources/resource_errors.d.ts +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.d.cts +1 -1
- package/lib/resources/return_line_items.d.ts +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.d.cts +1 -1
- package/lib/resources/returns.d.ts +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.d.cts +1 -1
- package/lib/resources/satispay_gateways.d.ts +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.d.cts +1 -1
- package/lib/resources/satispay_payments.d.ts +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.d.cts +1 -1
- package/lib/resources/shipments.d.ts +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.d.cts +1 -1
- package/lib/resources/shipping_categories.d.ts +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.d.cts +1 -1
- package/lib/resources/shipping_method_tiers.d.ts +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.d.cts +1 -1
- package/lib/resources/shipping_methods.d.ts +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.d.cts +1 -1
- package/lib/resources/shipping_weight_tiers.d.ts +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.d.cts +1 -1
- package/lib/resources/shipping_zones.d.ts +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.d.cts +1 -1
- package/lib/resources/sku_list_items.d.ts +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.d.cts +1 -1
- package/lib/resources/sku_list_promotion_rules.d.ts +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.d.cts +1 -1
- package/lib/resources/sku_lists.d.ts +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.d.cts +1 -1
- package/lib/resources/sku_options.d.ts +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.d.cts +1 -1
- package/lib/resources/skus.d.ts +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.d.cts +1 -1
- package/lib/resources/stock_items.d.ts +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.d.cts +1 -1
- package/lib/resources/stock_line_items.d.ts +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.d.cts +1 -1
- package/lib/resources/stock_locations.d.ts +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.d.cts +1 -1
- package/lib/resources/stock_reservations.d.ts +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.d.cts +1 -1
- package/lib/resources/stock_transfers.d.ts +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.d.cts +1 -1
- package/lib/resources/stores.d.ts +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.d.cts +1 -1
- package/lib/resources/stripe_gateways.d.ts +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.d.cts +1 -1
- package/lib/resources/stripe_payments.d.ts +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.d.cts +1 -1
- package/lib/resources/stripe_tax_accounts.d.ts +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.d.cts +1 -1
- package/lib/resources/subscription_models.d.ts +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.d.cts +1 -1
- package/lib/resources/tags.d.ts +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.d.cts +1 -1
- package/lib/resources/talon_one_accounts.d.ts +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.d.cts +1 -1
- package/lib/resources/tax_calculators.d.ts +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.d.cts +1 -1
- package/lib/resources/tax_categories.d.ts +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.d.cts +1 -1
- package/lib/resources/tax_rules.d.ts +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.d.cts +1 -1
- package/lib/resources/taxjar_accounts.d.ts +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.d.cts +1 -1
- package/lib/resources/transactions.d.ts +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.d.cts +1 -1
- package/lib/resources/versions.d.ts +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.d.cts +1 -1
- package/lib/resources/vertex_accounts.d.ts +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.d.cts +1 -1
- package/lib/resources/voids.d.ts +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.d.cts +1 -1
- package/lib/resources/webhooks.d.ts +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.d.cts +1 -1
- package/lib/resources/wire_transfers.d.ts +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.d.cts +1 -1
- package/lib/static.d.ts +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 +15 -4
@@ -0,0 +1,126 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
var chunkVRXXWQRL_cjs = require('./chunk-VRXXWQRL.cjs');
|
4
|
+
|
5
|
+
// src/resources/returns.ts
|
6
|
+
var Returns = class _Returns extends chunkVRXXWQRL_cjs.ApiResource {
|
7
|
+
static TYPE = "returns";
|
8
|
+
async create(resource, params, options) {
|
9
|
+
return this.resources.create({ ...resource, type: _Returns.TYPE }, params, options);
|
10
|
+
}
|
11
|
+
async update(resource, params, options) {
|
12
|
+
return this.resources.update({ ...resource, type: _Returns.TYPE }, params, options);
|
13
|
+
}
|
14
|
+
async delete(id, options) {
|
15
|
+
await this.resources.delete(typeof id === "string" ? { id, type: _Returns.TYPE } : id, options);
|
16
|
+
}
|
17
|
+
async order(returnId, params, options) {
|
18
|
+
const _returnId = returnId.id || returnId;
|
19
|
+
return this.resources.fetch({ type: "orders" }, `returns/${_returnId}/order`, params, options);
|
20
|
+
}
|
21
|
+
async customer(returnId, params, options) {
|
22
|
+
const _returnId = returnId.id || returnId;
|
23
|
+
return this.resources.fetch({ type: "customers" }, `returns/${_returnId}/customer`, params, options);
|
24
|
+
}
|
25
|
+
async stock_location(returnId, params, options) {
|
26
|
+
const _returnId = returnId.id || returnId;
|
27
|
+
return this.resources.fetch({ type: "stock_locations" }, `returns/${_returnId}/stock_location`, params, options);
|
28
|
+
}
|
29
|
+
async origin_address(returnId, params, options) {
|
30
|
+
const _returnId = returnId.id || returnId;
|
31
|
+
return this.resources.fetch({ type: "addresses" }, `returns/${_returnId}/origin_address`, params, options);
|
32
|
+
}
|
33
|
+
async destination_address(returnId, params, options) {
|
34
|
+
const _returnId = returnId.id || returnId;
|
35
|
+
return this.resources.fetch({ type: "addresses" }, `returns/${_returnId}/destination_address`, params, options);
|
36
|
+
}
|
37
|
+
async reference_capture(returnId, params, options) {
|
38
|
+
const _returnId = returnId.id || returnId;
|
39
|
+
return this.resources.fetch({ type: "captures" }, `returns/${_returnId}/reference_capture`, params, options);
|
40
|
+
}
|
41
|
+
async reference_refund(returnId, params, options) {
|
42
|
+
const _returnId = returnId.id || returnId;
|
43
|
+
return this.resources.fetch({ type: "refunds" }, `returns/${_returnId}/reference_refund`, params, options);
|
44
|
+
}
|
45
|
+
async return_line_items(returnId, params, options) {
|
46
|
+
const _returnId = returnId.id || returnId;
|
47
|
+
return this.resources.fetch({ type: "return_line_items" }, `returns/${_returnId}/return_line_items`, params, options);
|
48
|
+
}
|
49
|
+
async attachments(returnId, params, options) {
|
50
|
+
const _returnId = returnId.id || returnId;
|
51
|
+
return this.resources.fetch({ type: "attachments" }, `returns/${_returnId}/attachments`, params, options);
|
52
|
+
}
|
53
|
+
async resource_errors(returnId, params, options) {
|
54
|
+
const _returnId = returnId.id || returnId;
|
55
|
+
return this.resources.fetch({ type: "resource_errors" }, `returns/${_returnId}/resource_errors`, params, options);
|
56
|
+
}
|
57
|
+
async events(returnId, params, options) {
|
58
|
+
const _returnId = returnId.id || returnId;
|
59
|
+
return this.resources.fetch({ type: "events" }, `returns/${_returnId}/events`, params, options);
|
60
|
+
}
|
61
|
+
async tags(returnId, params, options) {
|
62
|
+
const _returnId = returnId.id || returnId;
|
63
|
+
return this.resources.fetch({ type: "tags" }, `returns/${_returnId}/tags`, params, options);
|
64
|
+
}
|
65
|
+
async versions(returnId, params, options) {
|
66
|
+
const _returnId = returnId.id || returnId;
|
67
|
+
return this.resources.fetch({ type: "versions" }, `returns/${_returnId}/versions`, params, options);
|
68
|
+
}
|
69
|
+
async _request(id, params, options) {
|
70
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Returns.TYPE, _request: true }, params, options);
|
71
|
+
}
|
72
|
+
async _approve(id, params, options) {
|
73
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Returns.TYPE, _approve: true }, params, options);
|
74
|
+
}
|
75
|
+
async _cancel(id, params, options) {
|
76
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Returns.TYPE, _cancel: true }, params, options);
|
77
|
+
}
|
78
|
+
async _ship(id, params, options) {
|
79
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Returns.TYPE, _ship: true }, params, options);
|
80
|
+
}
|
81
|
+
async _reject(id, params, options) {
|
82
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Returns.TYPE, _reject: true }, params, options);
|
83
|
+
}
|
84
|
+
async _receive(id, params, options) {
|
85
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Returns.TYPE, _receive: true }, params, options);
|
86
|
+
}
|
87
|
+
async _restock(id, params, options) {
|
88
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Returns.TYPE, _restock: true }, params, options);
|
89
|
+
}
|
90
|
+
async _archive(id, params, options) {
|
91
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Returns.TYPE, _archive: true }, params, options);
|
92
|
+
}
|
93
|
+
async _unarchive(id, params, options) {
|
94
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Returns.TYPE, _unarchive: true }, params, options);
|
95
|
+
}
|
96
|
+
async _refund(id, params, options) {
|
97
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Returns.TYPE, _refund: true }, params, options);
|
98
|
+
}
|
99
|
+
async _refund_amount_cents(id, triggerValue, params, options) {
|
100
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Returns.TYPE, _refund_amount_cents: triggerValue }, params, options);
|
101
|
+
}
|
102
|
+
async _add_tags(id, triggerValue, params, options) {
|
103
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Returns.TYPE, _add_tags: triggerValue }, params, options);
|
104
|
+
}
|
105
|
+
async _remove_tags(id, triggerValue, params, options) {
|
106
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Returns.TYPE, _remove_tags: triggerValue }, params, options);
|
107
|
+
}
|
108
|
+
isReturn(resource) {
|
109
|
+
return resource.type && resource.type === _Returns.TYPE;
|
110
|
+
}
|
111
|
+
relationship(id) {
|
112
|
+
return super.relationshipOneToOne(id);
|
113
|
+
}
|
114
|
+
relationshipToMany(...ids) {
|
115
|
+
return super.relationshipOneToMany(...ids);
|
116
|
+
}
|
117
|
+
type() {
|
118
|
+
return _Returns.TYPE;
|
119
|
+
}
|
120
|
+
};
|
121
|
+
var instance = new Returns();
|
122
|
+
var returns_default = instance;
|
123
|
+
|
124
|
+
exports.returns_default = returns_default;
|
125
|
+
//# sourceMappingURL=chunk-5DI3O5RJ.cjs.map
|
126
|
+
//# sourceMappingURL=chunk-5DI3O5RJ.cjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../src/resources/returns.ts"],"names":["ApiResource"],"mappings":";;;;;AA6MA,IAAM,OAAA,GAAN,MAAM,QAAA,SAAgBA,6BAAoB,CAAA;AAAA,EAEzC,OAAgB,IAAmB,GAAA,SAAA;AAAA,EAEnC,MAAM,MAAA,CAAO,QAAwB,EAAA,MAAA,EAAsC,OAA4C,EAAA;AACtH,IAAO,OAAA,IAAA,CAAK,SAAU,CA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esContent":["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 { Customer } from './customers'\nimport type { StockLocation, StockLocationType } from './stock_locations'\nimport type { Address } from './addresses'\nimport type { Capture, CaptureType } from './captures'\nimport type { Refund } from './refunds'\nimport type { ReturnLineItem } from './return_line_items'\nimport type { Attachment } from './attachments'\nimport type { ResourceError } from './resource_errors'\nimport type { Event } from './events'\nimport type { Tag, TagType } from './tags'\nimport type { Version } from './versions'\n\n\ntype ReturnType = 'returns'\ntype ReturnRel = ResourceRel & { type: ReturnType }\ntype OrderRel = ResourceRel & { type: OrderType }\ntype StockLocationRel = ResourceRel & { type: StockLocationType }\ntype CaptureRel = ResourceRel & { type: CaptureType }\ntype TagRel = ResourceRel & { type: TagType }\n\n\nexport type ReturnSort = Pick<Return, 'id' | 'number' | 'status' | 'approved_at' | 'cancelled_at' | 'shipped_at' | 'rejected_at' | 'received_at' | 'refunded_at' | 'archived_at'> & ResourceSort\n// export type ReturnFilter = Pick<Return, 'id' | 'number' | 'status' | 'skus_count' | 'approved_at' | 'cancelled_at' | 'shipped_at' | 'rejected_at' | 'received_at' | 'refunded_at' | 'archived_at'> & ResourceFilter\n\n\ninterface Return extends Resource {\n\t\n\treadonly type: ReturnType\n\n\t/** \n\t * Unique identifier for the return.\n\t * @example ```\"#1234/R/001\"```\n\t */\n\tnumber?: string | null\n\t/** \n\t * The return status. One of 'draft' (default), 'requested', 'approved', 'cancelled', 'shipped', 'rejected', 'received', or 'refunded'.\n\t * @example ```\"draft\"```\n\t */\n\tstatus: 'draft' | 'requested' | 'approved' | 'cancelled' | 'shipped' | 'rejected' | 'received' | 'refunded'\n\t/** \n\t * The email address of the associated customer.\n\t * @example ```\"john@example.com\"```\n\t */\n\tcustomer_email?: string | null\n\t/** \n\t * The total number of SKUs in the return's line items. This can be useful to display a preview of the return content.\n\t * @example ```2```\n\t */\n\tskus_count?: number | null\n\t/** \n\t * Time at which the return was approved.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tapproved_at?: string | null\n\t/** \n\t * Time at which the return was cancelled.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tcancelled_at?: string | null\n\t/** \n\t * Time at which the return was shipped.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tshipped_at?: string | null\n\t/** \n\t * Time at which the return was rejected.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\trejected_at?: string | null\n\t/** \n\t * Time at which the return was received.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\treceived_at?: string | null\n\t/** \n\t * Time at which the return was refunded.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\trefunded_at?: string | null\n\t/** \n\t * Time at which the resource has been archived.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tarchived_at?: string | null\n\t/** \n\t * The amount to be refunded, estimated by associated return line items, in cents.\n\t * @example ```500```\n\t */\n\testimated_refund_amount_cents?: number | null\n\t/** \n\t * The amount to be refunded, estimated by associated return line items, float.\n\t * @example ```5```\n\t */\n\testimated_refund_amount_float?: number | null\n\t/** \n\t * The amount to be refunded, estimated by associated return line items, formatted.\n\t * @example ```\"€5,00\"```\n\t */\n\tformatted_estimated_refund_amount?: string | null\n\n\torder?: Order | null\n\tcustomer?: Customer | null\n\tstock_location?: StockLocation | null\n\torigin_address?: Address | null\n\tdestination_address?: Address | null\n\treference_capture?: Capture | null\n\treference_refund?: Refund | null\n\treturn_line_items?: ReturnLineItem[] | null\n\tattachments?: Attachment[] | null\n\tresource_errors?: ResourceError[] | null\n\tevents?: Event[] | null\n\ttags?: Tag[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface ReturnCreate extends ResourceCreate {\n\t\n\torder: OrderRel\n\tstock_location?: StockLocationRel | null\n\treference_capture?: CaptureRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\ninterface ReturnUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * Send this attribute if you want to activate this return.\n\t * @example ```true```\n\t */\n\t_request?: boolean | null\n\t/** \n\t * Send this attribute if you want to mark this return as approved.\n\t * @example ```true```\n\t */\n\t_approve?: boolean | null\n\t/** \n\t * Send this attribute if you want to mark this return as cancelled.\n\t * @example ```true```\n\t */\n\t_cancel?: boolean | null\n\t/** \n\t * Send this attribute if you want to mark this return as shipped.\n\t * @example ```true```\n\t */\n\t_ship?: boolean | null\n\t/** \n\t * Send this attribute if you want to mark this return as rejected.\n\t * @example ```true```\n\t */\n\t_reject?: boolean | null\n\t/** \n\t * Send this attribute if you want to mark this return as received.\n\t * @example ```true```\n\t */\n\t_receive?: boolean | null\n\t/** \n\t * Send this attribute if you want to restock all of the return line items.\n\t * @example ```true```\n\t */\n\t_restock?: boolean | null\n\t/** \n\t * Send this attribute if you want to archive the return.\n\t * @example ```true```\n\t */\n\t_archive?: boolean | null\n\t/** \n\t * Send this attribute if you want to unarchive the return.\n\t * @example ```true```\n\t */\n\t_unarchive?: boolean | null\n\t/** \n\t * Send this attribute if you want to create a refund for this return.\n\t * @example ```true```\n\t */\n\t_refund?: boolean | null\n\t/** \n\t * Send this attribute as a value in cents to specify the amount to be refunded.\n\t * @example ```500```\n\t */\n\t_refund_amount_cents?: number | 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\tstock_location?: StockLocationRel | null\n\treference_capture?: CaptureRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\nclass Returns extends ApiResource<Return> {\n\n\tstatic readonly TYPE: ReturnType = 'returns' as const\n\n\tasync create(resource: ReturnCreate, params?: QueryParamsRetrieve<Return>, options?: ResourcesConfig): Promise<Return> {\n\t\treturn this.resources.create<ReturnCreate, Return>({ ...resource, type: Returns.TYPE }, params, options)\n\t}\n\n\tasync update(resource: ReturnUpdate, params?: QueryParamsRetrieve<Return>, options?: ResourcesConfig): Promise<Return> {\n\t\treturn this.resources.update<ReturnUpdate, Return>({ ...resource, type: Returns.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: Returns.TYPE } : id, options)\n\t}\n\n\tasync order(returnId: string | Return, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\tconst _returnId = (returnId as Return).id || returnId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `returns/${_returnId}/order`, params, options) as unknown as Order\n\t}\n\n\tasync customer(returnId: string | Return, params?: QueryParamsRetrieve<Customer>, options?: ResourcesConfig): Promise<Customer> {\n\t\tconst _returnId = (returnId as Return).id || returnId as string\n\t\treturn this.resources.fetch<Customer>({ type: 'customers' }, `returns/${_returnId}/customer`, params, options) as unknown as Customer\n\t}\n\n\tasync stock_location(returnId: string | Return, params?: QueryParamsRetrieve<StockLocation>, options?: ResourcesConfig): Promise<StockLocation> {\n\t\tconst _returnId = (returnId as Return).id || returnId as string\n\t\treturn this.resources.fetch<StockLocation>({ type: 'stock_locations' }, `returns/${_returnId}/stock_location`, params, options) as unknown as StockLocation\n\t}\n\n\tasync origin_address(returnId: string | Return, params?: QueryParamsRetrieve<Address>, options?: ResourcesConfig): Promise<Address> {\n\t\tconst _returnId = (returnId as Return).id || returnId as string\n\t\treturn this.resources.fetch<Address>({ type: 'addresses' }, `returns/${_returnId}/origin_address`, params, options) as unknown as Address\n\t}\n\n\tasync destination_address(returnId: string | Return, params?: QueryParamsRetrieve<Address>, options?: ResourcesConfig): Promise<Address> {\n\t\tconst _returnId = (returnId as Return).id || returnId as string\n\t\treturn this.resources.fetch<Address>({ type: 'addresses' }, `returns/${_returnId}/destination_address`, params, options) as unknown as Address\n\t}\n\n\tasync reference_capture(returnId: string | Return, params?: QueryParamsRetrieve<Capture>, options?: ResourcesConfig): Promise<Capture> {\n\t\tconst _returnId = (returnId as Return).id || returnId as string\n\t\treturn this.resources.fetch<Capture>({ type: 'captures' }, `returns/${_returnId}/reference_capture`, params, options) as unknown as Capture\n\t}\n\n\tasync reference_refund(returnId: string | Return, params?: QueryParamsRetrieve<Refund>, options?: ResourcesConfig): Promise<Refund> {\n\t\tconst _returnId = (returnId as Return).id || returnId as string\n\t\treturn this.resources.fetch<Refund>({ type: 'refunds' }, `returns/${_returnId}/reference_refund`, params, options) as unknown as Refund\n\t}\n\n\tasync return_line_items(returnId: string | Return, params?: QueryParamsList<ReturnLineItem>, options?: ResourcesConfig): Promise<ListResponse<ReturnLineItem>> {\n\t\tconst _returnId = (returnId as Return).id || returnId as string\n\t\treturn this.resources.fetch<ReturnLineItem>({ type: 'return_line_items' }, `returns/${_returnId}/return_line_items`, params, options) as unknown as ListResponse<ReturnLineItem>\n\t}\n\n\tasync attachments(returnId: string | Return, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _returnId = (returnId as Return).id || returnId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `returns/${_returnId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync resource_errors(returnId: string | Return, params?: QueryParamsList<ResourceError>, options?: ResourcesConfig): Promise<ListResponse<ResourceError>> {\n\t\tconst _returnId = (returnId as Return).id || returnId as string\n\t\treturn this.resources.fetch<ResourceError>({ type: 'resource_errors' }, `returns/${_returnId}/resource_errors`, params, options) as unknown as ListResponse<ResourceError>\n\t}\n\n\tasync events(returnId: string | Return, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _returnId = (returnId as Return).id || returnId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `returns/${_returnId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync tags(returnId: string | Return, params?: QueryParamsList<Tag>, options?: ResourcesConfig): Promise<ListResponse<Tag>> {\n\t\tconst _returnId = (returnId as Return).id || returnId as string\n\t\treturn this.resources.fetch<Tag>({ type: 'tags' }, `returns/${_returnId}/tags`, params, options) as unknown as ListResponse<Tag>\n\t}\n\n\tasync versions(returnId: string | Return, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _returnId = (returnId as Return).id || returnId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `returns/${_returnId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync _request(id: string | Return, params?: QueryParamsRetrieve<Return>, options?: ResourcesConfig): Promise<Return> {\n\t\treturn this.resources.update<ReturnUpdate, Return>({ id: (typeof id === 'string')? id: id.id, type: Returns.TYPE, _request: true }, params, options)\n\t}\n\n\tasync _approve(id: string | Return, params?: QueryParamsRetrieve<Return>, options?: ResourcesConfig): Promise<Return> {\n\t\treturn this.resources.update<ReturnUpdate, Return>({ id: (typeof id === 'string')? id: id.id, type: Returns.TYPE, _approve: true }, params, options)\n\t}\n\n\tasync _cancel(id: string | Return, params?: QueryParamsRetrieve<Return>, options?: ResourcesConfig): Promise<Return> {\n\t\treturn this.resources.update<ReturnUpdate, Return>({ id: (typeof id === 'string')? id: id.id, type: Returns.TYPE, _cancel: true }, params, options)\n\t}\n\n\tasync _ship(id: string | Return, params?: QueryParamsRetrieve<Return>, options?: ResourcesConfig): Promise<Return> {\n\t\treturn this.resources.update<ReturnUpdate, Return>({ id: (typeof id === 'string')? id: id.id, type: Returns.TYPE, _ship: true }, params, options)\n\t}\n\n\tasync _reject(id: string | Return, params?: QueryParamsRetrieve<Return>, options?: ResourcesConfig): Promise<Return> {\n\t\treturn this.resources.update<ReturnUpdate, Return>({ id: (typeof id === 'string')? id: id.id, type: Returns.TYPE, _reject: true }, params, options)\n\t}\n\n\tasync _receive(id: string | Return, params?: QueryParamsRetrieve<Return>, options?: ResourcesConfig): Promise<Return> {\n\t\treturn this.resources.update<ReturnUpdate, Return>({ id: (typeof id === 'string')? id: id.id, type: Returns.TYPE, _receive: true }, params, options)\n\t}\n\n\tasync _restock(id: string | Return, params?: QueryParamsRetrieve<Return>, options?: ResourcesConfig): Promise<Return> {\n\t\treturn this.resources.update<ReturnUpdate, Return>({ id: (typeof id === 'string')? id: id.id, type: Returns.TYPE, _restock: true }, params, options)\n\t}\n\n\tasync _archive(id: string | Return, params?: QueryParamsRetrieve<Return>, options?: ResourcesConfig): Promise<Return> {\n\t\treturn this.resources.update<ReturnUpdate, Return>({ id: (typeof id === 'string')? id: id.id, type: Returns.TYPE, _archive: true }, params, options)\n\t}\n\n\tasync _unarchive(id: string | Return, params?: QueryParamsRetrieve<Return>, options?: ResourcesConfig): Promise<Return> {\n\t\treturn this.resources.update<ReturnUpdate, Return>({ id: (typeof id === 'string')? id: id.id, type: Returns.TYPE, _unarchive: true }, params, options)\n\t}\n\n\tasync _refund(id: string | Return, params?: QueryParamsRetrieve<Return>, options?: ResourcesConfig): Promise<Return> {\n\t\treturn this.resources.update<ReturnUpdate, Return>({ id: (typeof id === 'string')? id: id.id, type: Returns.TYPE, _refund: true }, params, options)\n\t}\n\n\tasync _refund_amount_cents(id: string | Return, triggerValue: number, params?: QueryParamsRetrieve<Return>, options?: ResourcesConfig): Promise<Return> {\n\t\treturn this.resources.update<ReturnUpdate, Return>({ id: (typeof id === 'string')? id: id.id, type: Returns.TYPE, _refund_amount_cents: triggerValue }, params, options)\n\t}\n\n\tasync _add_tags(id: string | Return, triggerValue: string, params?: QueryParamsRetrieve<Return>, options?: ResourcesConfig): Promise<Return> {\n\t\treturn this.resources.update<ReturnUpdate, Return>({ id: (typeof id === 'string')? id: id.id, type: Returns.TYPE, _add_tags: triggerValue }, params, options)\n\t}\n\n\tasync _remove_tags(id: string | Return, triggerValue: string, params?: QueryParamsRetrieve<Return>, options?: ResourcesConfig): Promise<Return> {\n\t\treturn this.resources.update<ReturnUpdate, Return>({ id: (typeof id === 'string')? id: id.id, type: Returns.TYPE, _remove_tags: triggerValue }, params, options)\n\t}\n\n\n\tisReturn(resource: any): resource is Return {\n\t\treturn resource.type && (resource.type === Returns.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): ReturnRel {\n\t\treturn super.relationshipOneToOne<ReturnRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): ReturnRel[] {\n\t\treturn super.relationshipOneToMany<ReturnRel>(...ids)\n\t}\n\n\n\ttype(): ReturnType {\n\t\treturn Returns.TYPE\n\t}\n\n}\n\n\nconst instance = new Returns()\nexport default instance\n\nexport type { Returns, Return, ReturnCreate, ReturnUpdate, ReturnType }\n"]}
|
@@ -0,0 +1,47 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
var chunkVRXXWQRL_cjs = require('./chunk-VRXXWQRL.cjs');
|
4
|
+
|
5
|
+
// src/resources/braintree_gateways.ts
|
6
|
+
var BraintreeGateways = class _BraintreeGateways extends chunkVRXXWQRL_cjs.ApiResource {
|
7
|
+
static TYPE = "braintree_gateways";
|
8
|
+
async create(resource, params, options) {
|
9
|
+
return this.resources.create({ ...resource, type: _BraintreeGateways.TYPE }, params, options);
|
10
|
+
}
|
11
|
+
async update(resource, params, options) {
|
12
|
+
return this.resources.update({ ...resource, type: _BraintreeGateways.TYPE }, params, options);
|
13
|
+
}
|
14
|
+
async delete(id, options) {
|
15
|
+
await this.resources.delete(typeof id === "string" ? { id, type: _BraintreeGateways.TYPE } : id, options);
|
16
|
+
}
|
17
|
+
async payment_methods(braintreeGatewayId, params, options) {
|
18
|
+
const _braintreeGatewayId = braintreeGatewayId.id || braintreeGatewayId;
|
19
|
+
return this.resources.fetch({ type: "payment_methods" }, `braintree_gateways/${_braintreeGatewayId}/payment_methods`, params, options);
|
20
|
+
}
|
21
|
+
async versions(braintreeGatewayId, params, options) {
|
22
|
+
const _braintreeGatewayId = braintreeGatewayId.id || braintreeGatewayId;
|
23
|
+
return this.resources.fetch({ type: "versions" }, `braintree_gateways/${_braintreeGatewayId}/versions`, params, options);
|
24
|
+
}
|
25
|
+
async braintree_payments(braintreeGatewayId, params, options) {
|
26
|
+
const _braintreeGatewayId = braintreeGatewayId.id || braintreeGatewayId;
|
27
|
+
return this.resources.fetch({ type: "braintree_payments" }, `braintree_gateways/${_braintreeGatewayId}/braintree_payments`, params, options);
|
28
|
+
}
|
29
|
+
isBraintreeGateway(resource) {
|
30
|
+
return resource.type && resource.type === _BraintreeGateways.TYPE;
|
31
|
+
}
|
32
|
+
relationship(id) {
|
33
|
+
return super.relationshipOneToOne(id);
|
34
|
+
}
|
35
|
+
relationshipToMany(...ids) {
|
36
|
+
return super.relationshipOneToMany(...ids);
|
37
|
+
}
|
38
|
+
type() {
|
39
|
+
return _BraintreeGateways.TYPE;
|
40
|
+
}
|
41
|
+
};
|
42
|
+
var instance = new BraintreeGateways();
|
43
|
+
var braintree_gateways_default = instance;
|
44
|
+
|
45
|
+
exports.braintree_gateways_default = braintree_gateways_default;
|
46
|
+
//# sourceMappingURL=chunk-5DWYCGHP.cjs.map
|
47
|
+
//# sourceMappingURL=chunk-5DWYCGHP.cjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../src/resources/braintree_gateways.ts"],"names":["ApiResource"],"mappings":";;;;;AAuJA,IAAM,iBAAA,GAAN,MAAM,kBAAA,SAA0BA,6BAA8B,CAAA;AAAA,EAE7D,OAAgB,IAA6B,GAAA,oBAAA;AAAA,EAE7C,MAAM,MAAA,CAAO,QAAkC,EAAA,MAAA,EAAgD,OAAsD,EAAA;AACpJ,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAiD,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,kBAAkB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACtI,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A,CAAK,SAAU,CAAA,KAAA,CAAwB,EAAE,IAAA,EAAM,oBAAqB,EAAA,EAAG,CAAsB,mBAAA,EAAA,mBAAmB,CAAuB,mBAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC9J,EAGA,mBAAmB,QAA6C,EAAA;AAC/D,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,kBAAkB,CAAA,IAAA;AAAA;AAC9D,EAGA,aAAa,EAAqD,EAAA;AACjE,IAAO,OAAA,KAAA,CAAM,qBAA0C,EAAE,CAAA;AAAA;AAC1D,EAEA,sBAAsB,GAAsC,EAAA;AAC3D,IAAO,OAAA,KAAA,CAAM,qBAA2C,CAAA,GAAG,GAAG,CAAA;AAAA;AAC/D,EAGA,IAA6B,GAAA;AAC5B,IAAA,OAAO,kBAAkB,CAAA,IAAA;AAAA;AAG3B,CAAA;AAGA,IAAM,QAAA,GAAW,IAAI,iBAAkB,EAAA;AACvC,IAAO,0BAAQ,GAAA","file":"chunk-5DWYCGHP.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 { PaymentMethod } from './payment_methods'\nimport type { Version } from './versions'\nimport type { BraintreePayment, BraintreePaymentType } from './braintree_payments'\n\n\ntype BraintreeGatewayType = 'braintree_gateways'\ntype BraintreeGatewayRel = ResourceRel & { type: BraintreeGatewayType }\ntype BraintreePaymentRel = ResourceRel & { type: BraintreePaymentType }\n\n\nexport type BraintreeGatewaySort = Pick<BraintreeGateway, 'id' | 'name'> & ResourceSort\n// export type BraintreeGatewayFilter = Pick<BraintreeGateway, 'id' | 'name'> & ResourceFilter\n\n\ninterface BraintreeGateway extends Resource {\n\t\n\treadonly type: BraintreeGatewayType\n\n\t/** \n\t * The payment gateway's internal name.\n\t * @example ```\"US payment gateway\"```\n\t */\n\tname: string\n\t/** \n\t * The dynamic descriptor name. Must be composed by business name (3, 7 or 12 chars), an asterisk (*) and the product name (18, 14 or 9 chars), for a total length of 22 chars.\n\t * @example ```\"company*productabc1234\"```\n\t */\n\tdescriptor_name?: string | null\n\t/** \n\t * The dynamic descriptor phone number. Must be 10-14 characters and can only contain numbers, dashes, parentheses and periods.\n\t * @example ```\"3125551212\"```\n\t */\n\tdescriptor_phone?: string | null\n\t/** \n\t * The dynamic descriptor URL.\n\t * @example ```\"company.com\"```\n\t */\n\tdescriptor_url?: string | null\n\t/** \n\t * The gateway webhook URL, generated automatically.\n\t * @example ```\"https://core.commercelayer.co/webhook_callbacks/braintree_gateways/xxxxx\"```\n\t */\n\twebhook_endpoint_url?: string | null\n\n\tpayment_methods?: PaymentMethod[] | null\n\tversions?: Version[] | null\n\tbraintree_payments?: BraintreePayment[] | null\n\n}\n\n\ninterface BraintreeGatewayCreate extends ResourceCreate {\n\t\n\t/** \n\t * The payment gateway's internal name.\n\t * @example ```\"US payment gateway\"```\n\t */\n\tname: string\n\t/** \n\t * The gateway merchant account ID.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tmerchant_account_id: string\n\t/** \n\t * The gateway merchant ID.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tmerchant_id: string\n\t/** \n\t * The gateway API public key.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tpublic_key: string\n\t/** \n\t * The gateway API private key.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tprivate_key: string\n\t/** \n\t * The dynamic descriptor name. Must be composed by business name (3, 7 or 12 chars), an asterisk (*) and the product name (18, 14 or 9 chars), for a total length of 22 chars.\n\t * @example ```\"company*productabc1234\"```\n\t */\n\tdescriptor_name?: string | null\n\t/** \n\t * The dynamic descriptor phone number. Must be 10-14 characters and can only contain numbers, dashes, parentheses and periods.\n\t * @example ```\"3125551212\"```\n\t */\n\tdescriptor_phone?: string | null\n\t/** \n\t * The dynamic descriptor URL.\n\t * @example ```\"company.com\"```\n\t */\n\tdescriptor_url?: string | null\n\n\tbraintree_payments?: BraintreePaymentRel[] | null\n\n}\n\n\ninterface BraintreeGatewayUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The payment gateway's internal name.\n\t * @example ```\"US payment gateway\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The gateway merchant account ID.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tmerchant_account_id?: string | null\n\t/** \n\t * The gateway merchant ID.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tmerchant_id?: string | null\n\t/** \n\t * The gateway API public key.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tpublic_key?: string | null\n\t/** \n\t * The gateway API private key.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tprivate_key?: string | null\n\t/** \n\t * The dynamic descriptor name. Must be composed by business name (3, 7 or 12 chars), an asterisk (*) and the product name (18, 14 or 9 chars), for a total length of 22 chars.\n\t * @example ```\"company*productabc1234\"```\n\t */\n\tdescriptor_name?: string | null\n\t/** \n\t * The dynamic descriptor phone number. Must be 10-14 characters and can only contain numbers, dashes, parentheses and periods.\n\t * @example ```\"3125551212\"```\n\t */\n\tdescriptor_phone?: string | null\n\t/** \n\t * The dynamic descriptor URL.\n\t * @example ```\"company.com\"```\n\t */\n\tdescriptor_url?: string | null\n\n\tbraintree_payments?: BraintreePaymentRel[] | null\n\n}\n\n\nclass BraintreeGateways extends ApiResource<BraintreeGateway> {\n\n\tstatic readonly TYPE: BraintreeGatewayType = 'braintree_gateways' as const\n\n\tasync create(resource: BraintreeGatewayCreate, params?: QueryParamsRetrieve<BraintreeGateway>, options?: ResourcesConfig): Promise<BraintreeGateway> {\n\t\treturn this.resources.create<BraintreeGatewayCreate, BraintreeGateway>({ ...resource, type: BraintreeGateways.TYPE }, params, options)\n\t}\n\n\tasync update(resource: BraintreeGatewayUpdate, params?: QueryParamsRetrieve<BraintreeGateway>, options?: ResourcesConfig): Promise<BraintreeGateway> {\n\t\treturn this.resources.update<BraintreeGatewayUpdate, BraintreeGateway>({ ...resource, type: BraintreeGateways.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: BraintreeGateways.TYPE } : id, options)\n\t}\n\n\tasync payment_methods(braintreeGatewayId: string | BraintreeGateway, params?: QueryParamsList<PaymentMethod>, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>> {\n\t\tconst _braintreeGatewayId = (braintreeGatewayId as BraintreeGateway).id || braintreeGatewayId as string\n\t\treturn this.resources.fetch<PaymentMethod>({ type: 'payment_methods' }, `braintree_gateways/${_braintreeGatewayId}/payment_methods`, params, options) as unknown as ListResponse<PaymentMethod>\n\t}\n\n\tasync versions(braintreeGatewayId: string | BraintreeGateway, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _braintreeGatewayId = (braintreeGatewayId as BraintreeGateway).id || braintreeGatewayId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `braintree_gateways/${_braintreeGatewayId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync braintree_payments(braintreeGatewayId: string | BraintreeGateway, params?: QueryParamsList<BraintreePayment>, options?: ResourcesConfig): Promise<ListResponse<BraintreePayment>> {\n\t\tconst _braintreeGatewayId = (braintreeGatewayId as BraintreeGateway).id || braintreeGatewayId as string\n\t\treturn this.resources.fetch<BraintreePayment>({ type: 'braintree_payments' }, `braintree_gateways/${_braintreeGatewayId}/braintree_payments`, params, options) as unknown as ListResponse<BraintreePayment>\n\t}\n\n\n\tisBraintreeGateway(resource: any): resource is BraintreeGateway {\n\t\treturn resource.type && (resource.type === BraintreeGateways.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): BraintreeGatewayRel {\n\t\treturn super.relationshipOneToOne<BraintreeGatewayRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): BraintreeGatewayRel[] {\n\t\treturn super.relationshipOneToMany<BraintreeGatewayRel>(...ids)\n\t}\n\n\n\ttype(): BraintreeGatewayType {\n\t\treturn BraintreeGateways.TYPE\n\t}\n\n}\n\n\nconst instance = new BraintreeGateways()\nexport default instance\n\nexport type { BraintreeGateways, BraintreeGateway, BraintreeGatewayCreate, BraintreeGatewayUpdate, BraintreeGatewayType }\n"]}
|
@@ -0,0 +1,59 @@
|
|
1
|
+
import { ApiResource } from './chunk-XAABBRMY.js';
|
2
|
+
|
3
|
+
// src/resources/coupons.ts
|
4
|
+
var Coupons = class _Coupons extends ApiResource {
|
5
|
+
static TYPE = "coupons";
|
6
|
+
async create(resource, params, options) {
|
7
|
+
return this.resources.create({ ...resource, type: _Coupons.TYPE }, params, options);
|
8
|
+
}
|
9
|
+
async update(resource, params, options) {
|
10
|
+
return this.resources.update({ ...resource, type: _Coupons.TYPE }, params, options);
|
11
|
+
}
|
12
|
+
async delete(id, options) {
|
13
|
+
await this.resources.delete(typeof id === "string" ? { id, type: _Coupons.TYPE } : id, options);
|
14
|
+
}
|
15
|
+
async promotion_rule(couponId, params, options) {
|
16
|
+
const _couponId = couponId.id || couponId;
|
17
|
+
return this.resources.fetch({ type: "coupon_codes_promotion_rules" }, `coupons/${_couponId}/promotion_rule`, params, options);
|
18
|
+
}
|
19
|
+
async coupon_recipient(couponId, params, options) {
|
20
|
+
const _couponId = couponId.id || couponId;
|
21
|
+
return this.resources.fetch({ type: "coupon_recipients" }, `coupons/${_couponId}/coupon_recipient`, params, options);
|
22
|
+
}
|
23
|
+
async events(couponId, params, options) {
|
24
|
+
const _couponId = couponId.id || couponId;
|
25
|
+
return this.resources.fetch({ type: "events" }, `coupons/${_couponId}/events`, params, options);
|
26
|
+
}
|
27
|
+
async tags(couponId, params, options) {
|
28
|
+
const _couponId = couponId.id || couponId;
|
29
|
+
return this.resources.fetch({ type: "tags" }, `coupons/${_couponId}/tags`, params, options);
|
30
|
+
}
|
31
|
+
async versions(couponId, params, options) {
|
32
|
+
const _couponId = couponId.id || couponId;
|
33
|
+
return this.resources.fetch({ type: "versions" }, `coupons/${_couponId}/versions`, params, options);
|
34
|
+
}
|
35
|
+
async _add_tags(id, triggerValue, params, options) {
|
36
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Coupons.TYPE, _add_tags: triggerValue }, params, options);
|
37
|
+
}
|
38
|
+
async _remove_tags(id, triggerValue, params, options) {
|
39
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Coupons.TYPE, _remove_tags: triggerValue }, params, options);
|
40
|
+
}
|
41
|
+
isCoupon(resource) {
|
42
|
+
return resource.type && resource.type === _Coupons.TYPE;
|
43
|
+
}
|
44
|
+
relationship(id) {
|
45
|
+
return super.relationshipOneToOne(id);
|
46
|
+
}
|
47
|
+
relationshipToMany(...ids) {
|
48
|
+
return super.relationshipOneToMany(...ids);
|
49
|
+
}
|
50
|
+
type() {
|
51
|
+
return _Coupons.TYPE;
|
52
|
+
}
|
53
|
+
};
|
54
|
+
var instance = new Coupons();
|
55
|
+
var coupons_default = instance;
|
56
|
+
|
57
|
+
export { coupons_default };
|
58
|
+
//# sourceMappingURL=chunk-5JUWNHQ5.js.map
|
59
|
+
//# sourceMappingURL=chunk-5JUWNHQ5.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../src/resources/coupons.ts"],"names":[],"mappings":";;;AA6IA,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,EAA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AA,EAAA,EAAI,MAAM,QAAQ,CAAA,IAAA,EAAM,cAAc,YAAa,EAAA,EAAG,QAAQ,OAAO,CAAA;AAAA;AAChK,EAGA,SAAS,QAAmC,EAAA;AAC3C,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,QAAQ,CAAA,IAAA;AAAA;AACpD,EAGA,aAAa,EAA2C,EAAA;AACvD,IAAO,OAAA,KAAA,CAAM,qBAAgC,EAAE,CAAA;AAAA;AAChD,EAEA,sBAAsB,GAA4B,EAAA;AACjD,IAAO,OAAA,KAAA,CAAM,qBAAiC,CAAA,GAAG,GAAG,CAAA;AAAA;AACrD,EAGA,IAAmB,GAAA;AAClB,IAAA,OAAO,QAAQ,CAAA,IAAA;AAAA;AAGjB,CAAA;AAGA,IAAM,QAAA,GAAW,IAAI,OAAQ,EAAA;AAC7B,IAAO,eAAQ,GAAA","file":"chunk-5JUWNHQ5.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 { CouponCodesPromotionRule, CouponCodesPromotionRuleType } from './coupon_codes_promotion_rules'\nimport type { CouponRecipient, CouponRecipientType } from './coupon_recipients'\nimport type { Event } from './events'\nimport type { Tag, TagType } from './tags'\nimport type { Version } from './versions'\n\n\ntype CouponType = 'coupons'\ntype CouponRel = ResourceRel & { type: CouponType }\ntype CouponCodesPromotionRuleRel = ResourceRel & { type: CouponCodesPromotionRuleType }\ntype CouponRecipientRel = ResourceRel & { type: CouponRecipientType }\ntype TagRel = ResourceRel & { type: TagType }\n\n\nexport type CouponSort = Pick<Coupon, 'id' | 'code' | 'customer_single_use' | 'usage_limit' | 'usage_count' | 'expires_at'> & ResourceSort\n// export type CouponFilter = Pick<Coupon, 'id' | 'code' | 'customer_single_use' | 'usage_limit' | 'usage_count' | 'expires_at'> & ResourceFilter\n\n\ninterface Coupon extends Resource {\n\t\n\treadonly type: CouponType\n\n\t/** \n\t * The coupon code, that uniquely identifies the coupon within the promotion rule.\n\t * @example ```\"04371af2-70b3-48d7-8f4e-316b374224c3\"```\n\t */\n\tcode: string\n\t/** \n\t * Indicates if the coupon can be used just once per customer.\n\t */\n\tcustomer_single_use?: boolean | null\n\t/** \n\t * The total number of times this coupon can be used.\n\t * @example ```50```\n\t */\n\tusage_limit?: number | null\n\t/** \n\t * The number of times this coupon has been used.\n\t * @example ```20```\n\t */\n\tusage_count?: number | null\n\t/** \n\t * The email address of the associated recipient. When creating or updating a coupon, this is a shortcut to find or create the associated recipient by email.\n\t * @example ```\"john@example.com\"```\n\t */\n\trecipient_email?: string | null\n\t/** \n\t * Time at which the coupon will expire.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\texpires_at?: string | null\n\n\tpromotion_rule?: CouponCodesPromotionRule | null\n\tcoupon_recipient?: CouponRecipient | null\n\tevents?: Event[] | null\n\ttags?: Tag[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface CouponCreate extends ResourceCreate {\n\t\n\t/** \n\t * The coupon code, that uniquely identifies the coupon within the promotion rule.\n\t * @example ```\"04371af2-70b3-48d7-8f4e-316b374224c3\"```\n\t */\n\tcode: string\n\t/** \n\t * Indicates if the coupon can be used just once per customer.\n\t */\n\tcustomer_single_use?: boolean | null\n\t/** \n\t * The total number of times this coupon can be used.\n\t * @example ```50```\n\t */\n\tusage_limit?: number | null\n\t/** \n\t * The email address of the associated recipient. When creating or updating a coupon, this is a shortcut to find or create the associated recipient by email.\n\t * @example ```\"john@example.com\"```\n\t */\n\trecipient_email?: string | null\n\t/** \n\t * Time at which the coupon will expire.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\texpires_at?: string | null\n\n\tpromotion_rule: CouponCodesPromotionRuleRel\n\tcoupon_recipient?: CouponRecipientRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\ninterface CouponUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The coupon code, that uniquely identifies the coupon within the promotion rule.\n\t * @example ```\"04371af2-70b3-48d7-8f4e-316b374224c3\"```\n\t */\n\tcode?: string | null\n\t/** \n\t * Indicates if the coupon can be used just once per customer.\n\t */\n\tcustomer_single_use?: boolean | null\n\t/** \n\t * The total number of times this coupon can be used.\n\t * @example ```50```\n\t */\n\tusage_limit?: number | null\n\t/** \n\t * The email address of the associated recipient. When creating or updating a coupon, this is a shortcut to find or create the associated recipient by email.\n\t * @example ```\"john@example.com\"```\n\t */\n\trecipient_email?: string | null\n\t/** \n\t * Time at which the coupon will expire.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\texpires_at?: 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\tpromotion_rule?: CouponCodesPromotionRuleRel | null\n\tcoupon_recipient?: CouponRecipientRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\nclass Coupons extends ApiResource<Coupon> {\n\n\tstatic readonly TYPE: CouponType = 'coupons' as const\n\n\tasync create(resource: CouponCreate, params?: QueryParamsRetrieve<Coupon>, options?: ResourcesConfig): Promise<Coupon> {\n\t\treturn this.resources.create<CouponCreate, Coupon>({ ...resource, type: Coupons.TYPE }, params, options)\n\t}\n\n\tasync update(resource: CouponUpdate, params?: QueryParamsRetrieve<Coupon>, options?: ResourcesConfig): Promise<Coupon> {\n\t\treturn this.resources.update<CouponUpdate, Coupon>({ ...resource, type: Coupons.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: Coupons.TYPE } : id, options)\n\t}\n\n\tasync promotion_rule(couponId: string | Coupon, params?: QueryParamsRetrieve<CouponCodesPromotionRule>, options?: ResourcesConfig): Promise<CouponCodesPromotionRule> {\n\t\tconst _couponId = (couponId as Coupon).id || couponId as string\n\t\treturn this.resources.fetch<CouponCodesPromotionRule>({ type: 'coupon_codes_promotion_rules' }, `coupons/${_couponId}/promotion_rule`, params, options) as unknown as CouponCodesPromotionRule\n\t}\n\n\tasync coupon_recipient(couponId: string | Coupon, params?: QueryParamsRetrieve<CouponRecipient>, options?: ResourcesConfig): Promise<CouponRecipient> {\n\t\tconst _couponId = (couponId as Coupon).id || couponId as string\n\t\treturn this.resources.fetch<CouponRecipient>({ type: 'coupon_recipients' }, `coupons/${_couponId}/coupon_recipient`, params, options) as unknown as CouponRecipient\n\t}\n\n\tasync events(couponId: string | Coupon, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _couponId = (couponId as Coupon).id || couponId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `coupons/${_couponId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync tags(couponId: string | Coupon, params?: QueryParamsList<Tag>, options?: ResourcesConfig): Promise<ListResponse<Tag>> {\n\t\tconst _couponId = (couponId as Coupon).id || couponId as string\n\t\treturn this.resources.fetch<Tag>({ type: 'tags' }, `coupons/${_couponId}/tags`, params, options) as unknown as ListResponse<Tag>\n\t}\n\n\tasync versions(couponId: string | Coupon, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _couponId = (couponId as Coupon).id || couponId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `coupons/${_couponId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync _add_tags(id: string | Coupon, triggerValue: string, params?: QueryParamsRetrieve<Coupon>, options?: ResourcesConfig): Promise<Coupon> {\n\t\treturn this.resources.update<CouponUpdate, Coupon>({ id: (typeof id === 'string')? id: id.id, type: Coupons.TYPE, _add_tags: triggerValue }, params, options)\n\t}\n\n\tasync _remove_tags(id: string | Coupon, triggerValue: string, params?: QueryParamsRetrieve<Coupon>, options?: ResourcesConfig): Promise<Coupon> {\n\t\treturn this.resources.update<CouponUpdate, Coupon>({ id: (typeof id === 'string')? id: id.id, type: Coupons.TYPE, _remove_tags: triggerValue }, params, options)\n\t}\n\n\n\tisCoupon(resource: any): resource is Coupon {\n\t\treturn resource.type && (resource.type === Coupons.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): CouponRel {\n\t\treturn super.relationshipOneToOne<CouponRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): CouponRel[] {\n\t\treturn super.relationshipOneToMany<CouponRel>(...ids)\n\t}\n\n\n\ttype(): CouponType {\n\t\treturn Coupons.TYPE\n\t}\n\n}\n\n\nconst instance = new Coupons()\nexport default instance\n\nexport type { Coupons, Coupon, CouponCreate, CouponUpdate, CouponType }\n"]}
|
@@ -0,0 +1,49 @@
|
|
1
|
+
import { ApiResource } from './chunk-XAABBRMY.js';
|
2
|
+
|
3
|
+
// src/resources/delivery_lead_times.ts
|
4
|
+
var DeliveryLeadTimes = class _DeliveryLeadTimes extends ApiResource {
|
5
|
+
static TYPE = "delivery_lead_times";
|
6
|
+
async create(resource, params, options) {
|
7
|
+
return this.resources.create({ ...resource, type: _DeliveryLeadTimes.TYPE }, params, options);
|
8
|
+
}
|
9
|
+
async update(resource, params, options) {
|
10
|
+
return this.resources.update({ ...resource, type: _DeliveryLeadTimes.TYPE }, params, options);
|
11
|
+
}
|
12
|
+
async delete(id, options) {
|
13
|
+
await this.resources.delete(typeof id === "string" ? { id, type: _DeliveryLeadTimes.TYPE } : id, options);
|
14
|
+
}
|
15
|
+
async stock_location(deliveryLeadTimeId, params, options) {
|
16
|
+
const _deliveryLeadTimeId = deliveryLeadTimeId.id || deliveryLeadTimeId;
|
17
|
+
return this.resources.fetch({ type: "stock_locations" }, `delivery_lead_times/${_deliveryLeadTimeId}/stock_location`, params, options);
|
18
|
+
}
|
19
|
+
async shipping_method(deliveryLeadTimeId, params, options) {
|
20
|
+
const _deliveryLeadTimeId = deliveryLeadTimeId.id || deliveryLeadTimeId;
|
21
|
+
return this.resources.fetch({ type: "shipping_methods" }, `delivery_lead_times/${_deliveryLeadTimeId}/shipping_method`, params, options);
|
22
|
+
}
|
23
|
+
async attachments(deliveryLeadTimeId, params, options) {
|
24
|
+
const _deliveryLeadTimeId = deliveryLeadTimeId.id || deliveryLeadTimeId;
|
25
|
+
return this.resources.fetch({ type: "attachments" }, `delivery_lead_times/${_deliveryLeadTimeId}/attachments`, params, options);
|
26
|
+
}
|
27
|
+
async versions(deliveryLeadTimeId, params, options) {
|
28
|
+
const _deliveryLeadTimeId = deliveryLeadTimeId.id || deliveryLeadTimeId;
|
29
|
+
return this.resources.fetch({ type: "versions" }, `delivery_lead_times/${_deliveryLeadTimeId}/versions`, params, options);
|
30
|
+
}
|
31
|
+
isDeliveryLeadTime(resource) {
|
32
|
+
return resource.type && resource.type === _DeliveryLeadTimes.TYPE;
|
33
|
+
}
|
34
|
+
relationship(id) {
|
35
|
+
return super.relationshipOneToOne(id);
|
36
|
+
}
|
37
|
+
relationshipToMany(...ids) {
|
38
|
+
return super.relationshipOneToMany(...ids);
|
39
|
+
}
|
40
|
+
type() {
|
41
|
+
return _DeliveryLeadTimes.TYPE;
|
42
|
+
}
|
43
|
+
};
|
44
|
+
var instance = new DeliveryLeadTimes();
|
45
|
+
var delivery_lead_times_default = instance;
|
46
|
+
|
47
|
+
export { delivery_lead_times_default };
|
48
|
+
//# sourceMappingURL=chunk-5NWRLZGC.js.map
|
49
|
+
//# sourceMappingURL=chunk-5NWRLZGC.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../src/resources/delivery_lead_times.ts"],"names":[],"mappings":";;;AA2FA,IAAM,iBAAA,GAAN,MAAM,kBAAA,SAA0B,WAA8B,CAAA;AAAA,EAE7D,OAAgB,IAA6B,GAAA,qBAAA;AAAA,E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ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { StockLocation, StockLocationType } from './stock_locations'\nimport type { ShippingMethod, ShippingMethodType } from './shipping_methods'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\n\n\ntype DeliveryLeadTimeType = 'delivery_lead_times'\ntype DeliveryLeadTimeRel = ResourceRel & { type: DeliveryLeadTimeType }\ntype StockLocationRel = ResourceRel & { type: StockLocationType }\ntype ShippingMethodRel = ResourceRel & { type: ShippingMethodType }\n\n\nexport type DeliveryLeadTimeSort = Pick<DeliveryLeadTime, 'id' | 'min_hours' | 'max_hours' | 'min_days'> & ResourceSort\n// export type DeliveryLeadTimeFilter = Pick<DeliveryLeadTime, 'id' | 'min_hours' | 'max_hours' | 'min_days' | 'max_days'> & ResourceFilter\n\n\ninterface DeliveryLeadTime extends Resource {\n\t\n\treadonly type: DeliveryLeadTimeType\n\n\t/** \n\t * The delivery lead minimum time (in hours) when shipping from the associated stock location with the associated shipping method.\n\t * @example ```48```\n\t */\n\tmin_hours: number\n\t/** \n\t * The delivery lead maximun time (in hours) when shipping from the associated stock location with the associated shipping method.\n\t * @example ```72```\n\t */\n\tmax_hours: number\n\t/** \n\t * The delivery lead minimum time, in days (rounded).\n\t * @example ```2```\n\t */\n\tmin_days?: number | null\n\t/** \n\t * The delivery lead maximun time, in days (rounded).\n\t * @example ```3```\n\t */\n\tmax_days?: number | null\n\n\tstock_location?: StockLocation | null\n\tshipping_method?: ShippingMethod | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface DeliveryLeadTimeCreate extends ResourceCreate {\n\t\n\t/** \n\t * The delivery lead minimum time (in hours) when shipping from the associated stock location with the associated shipping method.\n\t * @example ```48```\n\t */\n\tmin_hours: number\n\t/** \n\t * The delivery lead maximun time (in hours) when shipping from the associated stock location with the associated shipping method.\n\t * @example ```72```\n\t */\n\tmax_hours: number\n\n\tstock_location: StockLocationRel\n\tshipping_method: ShippingMethodRel\n\n}\n\n\ninterface DeliveryLeadTimeUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The delivery lead minimum time (in hours) when shipping from the associated stock location with the associated shipping method.\n\t * @example ```48```\n\t */\n\tmin_hours?: number | null\n\t/** \n\t * The delivery lead maximun time (in hours) when shipping from the associated stock location with the associated shipping method.\n\t * @example ```72```\n\t */\n\tmax_hours?: number | null\n\n\tstock_location?: StockLocationRel | null\n\tshipping_method?: ShippingMethodRel | null\n\n}\n\n\nclass DeliveryLeadTimes extends ApiResource<DeliveryLeadTime> {\n\n\tstatic readonly TYPE: DeliveryLeadTimeType = 'delivery_lead_times' as const\n\n\tasync create(resource: DeliveryLeadTimeCreate, params?: QueryParamsRetrieve<DeliveryLeadTime>, options?: ResourcesConfig): Promise<DeliveryLeadTime> {\n\t\treturn this.resources.create<DeliveryLeadTimeCreate, DeliveryLeadTime>({ ...resource, type: DeliveryLeadTimes.TYPE }, params, options)\n\t}\n\n\tasync update(resource: DeliveryLeadTimeUpdate, params?: QueryParamsRetrieve<DeliveryLeadTime>, options?: ResourcesConfig): Promise<DeliveryLeadTime> {\n\t\treturn this.resources.update<DeliveryLeadTimeUpdate, DeliveryLeadTime>({ ...resource, type: DeliveryLeadTimes.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: DeliveryLeadTimes.TYPE } : id, options)\n\t}\n\n\tasync stock_location(deliveryLeadTimeId: string | DeliveryLeadTime, params?: QueryParamsRetrieve<StockLocation>, options?: ResourcesConfig): Promise<StockLocation> {\n\t\tconst _deliveryLeadTimeId = (deliveryLeadTimeId as DeliveryLeadTime).id || deliveryLeadTimeId as string\n\t\treturn this.resources.fetch<StockLocation>({ type: 'stock_locations' }, `delivery_lead_times/${_deliveryLeadTimeId}/stock_location`, params, options) as unknown as StockLocation\n\t}\n\n\tasync shipping_method(deliveryLeadTimeId: string | DeliveryLeadTime, params?: QueryParamsRetrieve<ShippingMethod>, options?: ResourcesConfig): Promise<ShippingMethod> {\n\t\tconst _deliveryLeadTimeId = (deliveryLeadTimeId as DeliveryLeadTime).id || deliveryLeadTimeId as string\n\t\treturn this.resources.fetch<ShippingMethod>({ type: 'shipping_methods' }, `delivery_lead_times/${_deliveryLeadTimeId}/shipping_method`, params, options) as unknown as ShippingMethod\n\t}\n\n\tasync attachments(deliveryLeadTimeId: string | DeliveryLeadTime, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _deliveryLeadTimeId = (deliveryLeadTimeId as DeliveryLeadTime).id || deliveryLeadTimeId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `delivery_lead_times/${_deliveryLeadTimeId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(deliveryLeadTimeId: string | DeliveryLeadTime, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _deliveryLeadTimeId = (deliveryLeadTimeId as DeliveryLeadTime).id || deliveryLeadTimeId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `delivery_lead_times/${_deliveryLeadTimeId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisDeliveryLeadTime(resource: any): resource is DeliveryLeadTime {\n\t\treturn resource.type && (resource.type === DeliveryLeadTimes.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): DeliveryLeadTimeRel {\n\t\treturn super.relationshipOneToOne<DeliveryLeadTimeRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): DeliveryLeadTimeRel[] {\n\t\treturn super.relationshipOneToMany<DeliveryLeadTimeRel>(...ids)\n\t}\n\n\n\ttype(): DeliveryLeadTimeType {\n\t\treturn DeliveryLeadTimes.TYPE\n\t}\n\n}\n\n\nconst instance = new DeliveryLeadTimes()\nexport default instance\n\nexport type { DeliveryLeadTimes, DeliveryLeadTime, DeliveryLeadTimeCreate, DeliveryLeadTimeUpdate, DeliveryLeadTimeType }\n"]}
|
@@ -0,0 +1,61 @@
|
|
1
|
+
import { ApiResource } from './chunk-XAABBRMY.js';
|
2
|
+
|
3
|
+
// src/resources/stores.ts
|
4
|
+
var Stores = class _Stores extends ApiResource {
|
5
|
+
static TYPE = "stores";
|
6
|
+
async create(resource, params, options) {
|
7
|
+
return this.resources.create({ ...resource, type: _Stores.TYPE }, params, options);
|
8
|
+
}
|
9
|
+
async update(resource, params, options) {
|
10
|
+
return this.resources.update({ ...resource, type: _Stores.TYPE }, params, options);
|
11
|
+
}
|
12
|
+
async delete(id, options) {
|
13
|
+
await this.resources.delete(typeof id === "string" ? { id, type: _Stores.TYPE } : id, options);
|
14
|
+
}
|
15
|
+
async market(storeId, params, options) {
|
16
|
+
const _storeId = storeId.id || storeId;
|
17
|
+
return this.resources.fetch({ type: "markets" }, `stores/${_storeId}/market`, params, options);
|
18
|
+
}
|
19
|
+
async merchant(storeId, params, options) {
|
20
|
+
const _storeId = storeId.id || storeId;
|
21
|
+
return this.resources.fetch({ type: "merchants" }, `stores/${_storeId}/merchant`, params, options);
|
22
|
+
}
|
23
|
+
async stock_location(storeId, params, options) {
|
24
|
+
const _storeId = storeId.id || storeId;
|
25
|
+
return this.resources.fetch({ type: "stock_locations" }, `stores/${_storeId}/stock_location`, params, options);
|
26
|
+
}
|
27
|
+
async orders(storeId, params, options) {
|
28
|
+
const _storeId = storeId.id || storeId;
|
29
|
+
return this.resources.fetch({ type: "orders" }, `stores/${_storeId}/orders`, params, options);
|
30
|
+
}
|
31
|
+
async payment_methods(storeId, params, options) {
|
32
|
+
const _storeId = storeId.id || storeId;
|
33
|
+
return this.resources.fetch({ type: "payment_methods" }, `stores/${_storeId}/payment_methods`, params, options);
|
34
|
+
}
|
35
|
+
async events(storeId, params, options) {
|
36
|
+
const _storeId = storeId.id || storeId;
|
37
|
+
return this.resources.fetch({ type: "events" }, `stores/${_storeId}/events`, params, options);
|
38
|
+
}
|
39
|
+
async versions(storeId, params, options) {
|
40
|
+
const _storeId = storeId.id || storeId;
|
41
|
+
return this.resources.fetch({ type: "versions" }, `stores/${_storeId}/versions`, params, options);
|
42
|
+
}
|
43
|
+
isStore(resource) {
|
44
|
+
return resource.type && resource.type === _Stores.TYPE;
|
45
|
+
}
|
46
|
+
relationship(id) {
|
47
|
+
return super.relationshipOneToOne(id);
|
48
|
+
}
|
49
|
+
relationshipToMany(...ids) {
|
50
|
+
return super.relationshipOneToMany(...ids);
|
51
|
+
}
|
52
|
+
type() {
|
53
|
+
return _Stores.TYPE;
|
54
|
+
}
|
55
|
+
};
|
56
|
+
var instance = new Stores();
|
57
|
+
var stores_default = instance;
|
58
|
+
|
59
|
+
export { stores_default };
|
60
|
+
//# sourceMappingURL=chunk-5PV4P3JM.js.map
|
61
|
+
//# sourceMappingURL=chunk-5PV4P3JM.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../src/resources/stores.ts"],"names":[],"mappings":";;;AA0FA,IAAM,MAAA,GAAN,MAAM,OAAA,SAAe,WAAmB,CAAA;AAAA,EAEvC,OAAgB,IAAkB,GAAA,QAAA;AAAA,EAElC,MAAM,MAAA,CAAO,QAAuB,EAAA,MAAA,EAAqC,OAA2C,EAAA;AACnH,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA2B,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,OAAO,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACrG,EAEA,MAAM,MAAA,CAAO,QAAuB,EAAA,MAAA,EAAqC,OAA2C,EAAA;AACnH,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA2B,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,OAAO,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;A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A,aAAa,EAA0C,EAAA;AACtD,IAAO,OAAA,KAAA,CAAM,qBAA+B,EAAE,CAAA;AAAA;AAC/C,EAEA,sBAAsB,GAA2B,EAAA;AAChD,IAAO,OAAA,KAAA,CAAM,qBAAgC,CAAA,GAAG,GAAG,CAAA;AAAA;AACpD,EAGA,IAAkB,GAAA;AACjB,IAAA,OAAO,OAAO,CAAA,IAAA;AAAA;AAGhB,CAAA;AAGA,IAAM,QAAA,GAAW,IAAI,MAAO,EAAA;AAC5B,IAAO,cAAQ,GAAA","file":"chunk-5PV4P3JM.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 { Merchant, MerchantType } from './merchants'\nimport type { StockLocation, StockLocationType } from './stock_locations'\nimport type { Order } from './orders'\nimport type { PaymentMethod } from './payment_methods'\nimport type { Event } from './events'\nimport type { Version } from './versions'\n\n\ntype StoreType = 'stores'\ntype StoreRel = ResourceRel & { type: StoreType }\ntype MarketRel = ResourceRel & { type: MarketType }\ntype MerchantRel = ResourceRel & { type: MerchantType }\ntype StockLocationRel = ResourceRel & { type: StockLocationType }\n\n\nexport type StoreSort = Pick<Store, 'id' | 'name' | 'code'> & ResourceSort\n// export type StoreFilter = Pick<Store, 'id' | 'name' | 'code'> & ResourceFilter\n\n\ninterface Store extends Resource {\n\t\n\treadonly type: StoreType\n\n\t/** \n\t * The store's internal name.\n\t * @example ```\"Rome Shop\"```\n\t */\n\tname: string\n\t/** \n\t * A string that you can use to identify the store (must be unique within the environment).\n\t * @example ```\"europe1\"```\n\t */\n\tcode?: string | null\n\n\tmarket?: Market | null\n\tmerchant?: Merchant | null\n\tstock_location?: StockLocation | null\n\torders?: Order[] | null\n\tpayment_methods?: PaymentMethod[] | null\n\tevents?: Event[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface StoreCreate extends ResourceCreate {\n\t\n\t/** \n\t * The store's internal name.\n\t * @example ```\"Rome Shop\"```\n\t */\n\tname: string\n\t/** \n\t * A string that you can use to identify the store (must be unique within the environment).\n\t * @example ```\"europe1\"```\n\t */\n\tcode?: string | null\n\n\tmarket: MarketRel\n\tmerchant?: MerchantRel | null\n\tstock_location?: StockLocationRel | null\n\n}\n\n\ninterface StoreUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The store's internal name.\n\t * @example ```\"Rome Shop\"```\n\t */\n\tname?: string | null\n\t/** \n\t * A string that you can use to identify the store (must be unique within the environment).\n\t * @example ```\"europe1\"```\n\t */\n\tcode?: string | null\n\n\tmarket?: MarketRel | null\n\tmerchant?: MerchantRel | null\n\tstock_location?: StockLocationRel | null\n\n}\n\n\nclass Stores extends ApiResource<Store> {\n\n\tstatic readonly TYPE: StoreType = 'stores' as const\n\n\tasync create(resource: StoreCreate, params?: QueryParamsRetrieve<Store>, options?: ResourcesConfig): Promise<Store> {\n\t\treturn this.resources.create<StoreCreate, Store>({ ...resource, type: Stores.TYPE }, params, options)\n\t}\n\n\tasync update(resource: StoreUpdate, params?: QueryParamsRetrieve<Store>, options?: ResourcesConfig): Promise<Store> {\n\t\treturn this.resources.update<StoreUpdate, Store>({ ...resource, type: Stores.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: Stores.TYPE } : id, options)\n\t}\n\n\tasync market(storeId: string | Store, params?: QueryParamsRetrieve<Market>, options?: ResourcesConfig): Promise<Market> {\n\t\tconst _storeId = (storeId as Store).id || storeId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `stores/${_storeId}/market`, params, options) as unknown as Market\n\t}\n\n\tasync merchant(storeId: string | Store, params?: QueryParamsRetrieve<Merchant>, options?: ResourcesConfig): Promise<Merchant> {\n\t\tconst _storeId = (storeId as Store).id || storeId as string\n\t\treturn this.resources.fetch<Merchant>({ type: 'merchants' }, `stores/${_storeId}/merchant`, params, options) as unknown as Merchant\n\t}\n\n\tasync stock_location(storeId: string | Store, params?: QueryParamsRetrieve<StockLocation>, options?: ResourcesConfig): Promise<StockLocation> {\n\t\tconst _storeId = (storeId as Store).id || storeId as string\n\t\treturn this.resources.fetch<StockLocation>({ type: 'stock_locations' }, `stores/${_storeId}/stock_location`, params, options) as unknown as StockLocation\n\t}\n\n\tasync orders(storeId: string | Store, params?: QueryParamsList<Order>, options?: ResourcesConfig): Promise<ListResponse<Order>> {\n\t\tconst _storeId = (storeId as Store).id || storeId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `stores/${_storeId}/orders`, params, options) as unknown as ListResponse<Order>\n\t}\n\n\tasync payment_methods(storeId: string | Store, params?: QueryParamsList<PaymentMethod>, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>> {\n\t\tconst _storeId = (storeId as Store).id || storeId as string\n\t\treturn this.resources.fetch<PaymentMethod>({ type: 'payment_methods' }, `stores/${_storeId}/payment_methods`, params, options) as unknown as ListResponse<PaymentMethod>\n\t}\n\n\tasync events(storeId: string | Store, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _storeId = (storeId as Store).id || storeId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `stores/${_storeId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync versions(storeId: string | Store, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _storeId = (storeId as Store).id || storeId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `stores/${_storeId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisStore(resource: any): resource is Store {\n\t\treturn resource.type && (resource.type === Stores.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): StoreRel {\n\t\treturn super.relationshipOneToOne<StoreRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): StoreRel[] {\n\t\treturn super.relationshipOneToMany<StoreRel>(...ids)\n\t}\n\n\n\ttype(): StoreType {\n\t\treturn Stores.TYPE\n\t}\n\n}\n\n\nconst instance = new Stores()\nexport default instance\n\nexport type { Stores, Store, StoreCreate, StoreUpdate, StoreType }\n"]}
|
@@ -0,0 +1,105 @@
|
|
1
|
+
import { ApiResourceAdapter } from './chunk-XAABBRMY.js';
|
2
|
+
import { getResources } from './chunk-HM7D3KXS.js';
|
3
|
+
import { isApiError } from './chunk-ZU7GFVQ6.js';
|
4
|
+
import { debug_default } from './chunk-XD7GS4QW.js';
|
5
|
+
|
6
|
+
// src/commercelayer.ts
|
7
|
+
var debug = debug_default("commercelayer");
|
8
|
+
var OPEN_API_SCHEMA_VERSION = "7.8.4";
|
9
|
+
var CommerceLayerClient = class _CommerceLayerClient {
|
10
|
+
static get openApiSchemaVersion() {
|
11
|
+
return OPEN_API_SCHEMA_VERSION;
|
12
|
+
}
|
13
|
+
openApiSchemaVersion = OPEN_API_SCHEMA_VERSION;
|
14
|
+
static cl;
|
15
|
+
// ##__CL_RESOURCES_DEF_START__##
|
16
|
+
// ##__CL_RESOURCES_DEF_TEMPLATE:: ##__TAB__#####__RESOURCE_TYPE__##?: api.##__RESOURCE_CLASS__##
|
17
|
+
// ##__CL_RESOURCES_DEF_STOP__##
|
18
|
+
static get(config) {
|
19
|
+
if (config) return _CommerceLayerClient.cl = new _CommerceLayerClient(config);
|
20
|
+
else if (!_CommerceLayerClient.cl) throw new Error("CommerceLayer client not initialized");
|
21
|
+
return _CommerceLayerClient.cl;
|
22
|
+
}
|
23
|
+
constructor(config) {
|
24
|
+
debug("new commercelayer instance %O", config);
|
25
|
+
ApiResourceAdapter.init(config);
|
26
|
+
}
|
27
|
+
// ##__CL_RESOURCES_LEAZY_LOADING_START__##
|
28
|
+
// ##__CL_RESOURCES_LEAZY_LOADING_TEMPLATE:: ##__TAB__##get ##__RESOURCE_TYPE__##(): api.##__RESOURCE_CLASS__## { return this.###__RESOURCE_TYPE__## || (this.###__RESOURCE_TYPE__## = new api.##__RESOURCE_CLASS__##(this.#adapter)) }
|
29
|
+
// ##__CL_RESOURCES_LEAZY_LOADING_STOP__##
|
30
|
+
// private get adapter(): ResourceAdapter { return ApiResourceAdapter.get() }
|
31
|
+
get currentOrganization() {
|
32
|
+
return ApiResourceAdapter.get().client?.currentOrganization;
|
33
|
+
}
|
34
|
+
get currentAccessToken() {
|
35
|
+
return ApiResourceAdapter.get().client?.currentAccessToken;
|
36
|
+
}
|
37
|
+
get interceptors() {
|
38
|
+
return ApiResourceAdapter.get().client?.interceptors;
|
39
|
+
}
|
40
|
+
localConfig(config) {
|
41
|
+
}
|
42
|
+
config(config) {
|
43
|
+
debug("config %o", config);
|
44
|
+
this.localConfig(config);
|
45
|
+
ApiResourceAdapter.config(config);
|
46
|
+
return this;
|
47
|
+
}
|
48
|
+
resources(sort) {
|
49
|
+
return getResources(sort);
|
50
|
+
}
|
51
|
+
isApiError(error) {
|
52
|
+
return isApiError(error);
|
53
|
+
}
|
54
|
+
addRequestInterceptor(onSuccess, onFailure) {
|
55
|
+
this.interceptors.request = { onSuccess, onFailure };
|
56
|
+
return 1;
|
57
|
+
}
|
58
|
+
addResponseInterceptor(onSuccess, onFailure) {
|
59
|
+
this.interceptors.response = { onSuccess, onFailure };
|
60
|
+
return 1;
|
61
|
+
}
|
62
|
+
removeInterceptor(type, id = 1) {
|
63
|
+
this.interceptors[type] = void 0;
|
64
|
+
}
|
65
|
+
removeInterceptors() {
|
66
|
+
this.removeInterceptor("request");
|
67
|
+
this.removeInterceptor("response");
|
68
|
+
this.removeRawResponseReader();
|
69
|
+
}
|
70
|
+
addRawResponseReader(options) {
|
71
|
+
const reader = {
|
72
|
+
id: 0,
|
73
|
+
rawResponse: void 0,
|
74
|
+
headers: void 0,
|
75
|
+
ok: true
|
76
|
+
};
|
77
|
+
async function rawResponseInterceptor(response) {
|
78
|
+
reader.rawResponse = await response?.clone().json().catch(() => {
|
79
|
+
});
|
80
|
+
reader.ok = response.ok;
|
81
|
+
if (options?.headers) {
|
82
|
+
const ho = {};
|
83
|
+
response.headers.forEach((value, key) => {
|
84
|
+
ho[key] = value;
|
85
|
+
});
|
86
|
+
reader.headers = ho;
|
87
|
+
}
|
88
|
+
return response;
|
89
|
+
}
|
90
|
+
this.interceptors.rawReader = { onSuccess: rawResponseInterceptor, onFailure: rawResponseInterceptor };
|
91
|
+
reader.id = 1;
|
92
|
+
return reader;
|
93
|
+
}
|
94
|
+
removeRawResponseReader() {
|
95
|
+
this.interceptors.rawReader = void 0;
|
96
|
+
}
|
97
|
+
};
|
98
|
+
var CommerceLayer = (config) => {
|
99
|
+
return CommerceLayerClient.get(config);
|
100
|
+
};
|
101
|
+
var commercelayer_default = CommerceLayer;
|
102
|
+
|
103
|
+
export { CommerceLayer, CommerceLayerClient, OPEN_API_SCHEMA_VERSION, commercelayer_default };
|
104
|
+
//# sourceMappingURL=chunk-5RKGQCKX.js.map
|
105
|
+
//# sourceMappingURL=chunk-5RKGQCKX.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../src/commercelayer.ts"],"names":[],"mappings":";;;;;;AASA,IAAM,KAAA,GAAQ,cAAM,eAAe,CAAA;AAI5B,IAAM,uBAA0B,GAAA;AAajC,IAAA,mBAAA,GAAN,MAAM,oBAAoB,CAAA;AAAA,EAEzB,WAAW,oBAA+B,GAAA;AAAE,IAAO,OAAA,uBAAA;AAAA;AAAwB,EAClE,oBAAuB,GAAA,uBAAA;AAAA,EAEhC,OAAe,EAAA;AAAA;AAAA;AAAA;AAAA,EAOf,OAAO,IAAK,MAAuD,EAAA;AAClE,IAAA,IAAI,QAAgB,OAAA,oBAAA,CAAoB,EAAK,GAAA,IAAI,qBAAoB,MAAM,CAAA;AAAA,SAAA,IAEvE,CAAC,oBAAoB,CAAA,EAAA,EAAU,MAAA,IAAI,MAAM,sCAAsC,CAAA;AACnF,IAAA,OAAO,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AgB,CAAC,MAAyD,KAAA;AAC/E,EAAO,OAAA,mBAAA,CAAoB,IAAI,MAAM,CAAA;AACtC;AAGA,IAAO,qBAAQ,GAAA","file":"chunk-5RKGQCKX.js","sourcesContent":["\n// import * as api from './api'\nimport { getResources } from './enum'\nimport { isApiError, type ApiError } from './error'\nimport type { ErrorInterceptor, InterceptorType, RawResponseReader, RequestInterceptor, ResponseInterceptor, ResponseObj, HeadersObj, InterceptorManager } from './interceptor'\nimport { ApiResourceAdapter, type ResourcesInitConfig } from './resource'\n\n\nimport Debug from './debug'\nconst debug = Debug('commercelayer')\n\n\n// Autogenerated schema version number, do not remove this line\nexport const OPEN_API_SCHEMA_VERSION = '7.8.4'\n\n\n// SDK local configuration\ntype SdkConfig = {\n\t// abc?: string\n}\n\ntype CommerceLayerInitConfig = SdkConfig & ResourcesInitConfig\ntype CommerceLayerConfig = Partial<CommerceLayerInitConfig>\n\n\n\nclass CommerceLayerClient {\n\n\tstatic get openApiSchemaVersion(): string { return OPEN_API_SCHEMA_VERSION }\n\treadonly openApiSchemaVersion = OPEN_API_SCHEMA_VERSION\n\n\tprivate static cl: CommerceLayerClient\n\n\t// ##__CL_RESOURCES_DEF_START__##\n\t// ##__CL_RESOURCES_DEF_TEMPLATE:: ##__TAB__#####__RESOURCE_TYPE__##?: api.##__RESOURCE_CLASS__##\n\t// ##__CL_RESOURCES_DEF_STOP__##\n\n\n\tstatic get (config?: CommerceLayerInitConfig): CommerceLayerClient {\n\t\tif (config) return (CommerceLayerClient.cl = new CommerceLayerClient(config))\n\t\telse\n\t\tif (!CommerceLayerClient.cl) throw new Error('CommerceLayer client not initialized')\n\t\treturn CommerceLayerClient.cl\n\t}\n\n\n\tprotected constructor(config: CommerceLayerInitConfig) {\n\n\t\tdebug('new commercelayer instance %O', config)\n\n\t\tApiResourceAdapter.init(config)\n\n\t\t// ##__CL_RESOURCES_INIT_START__##\n\t\t// ##__CL_RESOURCES_INIT_TEMPLATE:: ##__TAB__####__TAB__##this.##__RESOURCE_TYPE__## = new api.##__RESOURCE_CLASS__##(this.#adapter)\n\t\t// ##__CL_RESOURCES_INIT_STOP__##\n\n\t}\n\n\t// ##__CL_RESOURCES_LEAZY_LOADING_START__##\n\t// ##__CL_RESOURCES_LEAZY_LOADING_TEMPLATE:: ##__TAB__##get ##__RESOURCE_TYPE__##(): api.##__RESOURCE_CLASS__## { return this.###__RESOURCE_TYPE__## || (this.###__RESOURCE_TYPE__## = new api.##__RESOURCE_CLASS__##(this.#adapter)) }\n\t// ##__CL_RESOURCES_LEAZY_LOADING_STOP__##\n\n\t// private get adapter(): ResourceAdapter { return ApiResourceAdapter.get() }\n\tget currentOrganization(): string { return ApiResourceAdapter.get().client?.currentOrganization }\n\tget currentAccessToken(): string { return ApiResourceAdapter.get().client?.currentAccessToken }\n\tprivate get interceptors(): InterceptorManager { return ApiResourceAdapter.get().client?.interceptors }\n\n\n\tprivate localConfig(config: Partial<SdkConfig>): void {\n\t\t// if (config.abc) this.abc = config.abc\n\t}\n\n\n\tconfig(config: CommerceLayerConfig): this {\n\n\t\tdebug('config %o', config)\n\n\t\t// CommerceLayer config\n\t\tthis.localConfig(config)\n\t\t// ResourceAdapter config\n\t\tApiResourceAdapter.config(config)\n\n\t\treturn this\n\n\t}\n\n\t\n\tresources(sort?: boolean): readonly string[] {\n\t\treturn getResources(sort)\n\t}\n\n\tisApiError(error: any): error is ApiError {\n\t\treturn isApiError(error)\n\t}\n\n\n\taddRequestInterceptor(onSuccess?: RequestInterceptor, onFailure?: ErrorInterceptor): number {\n\t\tthis.interceptors.request = { onSuccess, onFailure }\n\t\treturn 1\n\t}\n\n\taddResponseInterceptor(onSuccess?: ResponseInterceptor, onFailure?: ErrorInterceptor): number {\n\t\tthis.interceptors.response = { onSuccess, onFailure }\n\t\treturn 1\n\t}\n\n\tremoveInterceptor(type: InterceptorType, id: number = 1): void {\n\t\tthis.interceptors[type] = undefined\n\t}\n\n\tremoveInterceptors(): void {\n\t\tthis.removeInterceptor('request')\n\t\tthis.removeInterceptor('response')\n\t\tthis.removeRawResponseReader()\n\t}\n\n\taddRawResponseReader(options?: { headers: boolean }): RawResponseReader {\n\n\t\tconst reader: RawResponseReader = {\n\t\t\tid: 0,\n\t\t\trawResponse: undefined,\n\t\t\theaders: undefined,\n\t\t\tok: true\n\t\t}\n\n\t\tasync function rawResponseInterceptor(response: ResponseObj): Promise<ResponseObj> {\n\t\t\treader.rawResponse = await response?.clone().json().catch(() => {})\n\t\t\treader.ok = response.ok\n\t\t\tif (options?.headers) {\n\t\t\t\tconst ho: HeadersObj = {}\n\t\t\t\tresponse.headers.forEach((value, key) => { ho[key] = value })\n\t\t\t\treader.headers = ho\n\t\t\t}\n\t\t\treturn response\n\t\t}\n\t\t\n\t\t/* const interceptor = */this.interceptors.rawReader = { onSuccess: rawResponseInterceptor, onFailure: rawResponseInterceptor }\n\t\treader.id = 1 // interceptor\n\n\t\treturn reader\n\n\t}\n\n\tremoveRawResponseReader(/* reader: number | RawResponseReader */): void {\n\t\t/*\n\t\tconst id = (typeof reader === 'number') ? reader : reader?.id\n\t\tif (id && (id >= 0)) this.removeInterceptor('response', id)\n\t\t*/\n\t\tthis.interceptors.rawReader = undefined\n\t}\n\n}\n\n\n\nconst CommerceLayer = (config: CommerceLayerInitConfig): CommerceLayerClient => {\n\treturn CommerceLayerClient.get(config)\n}\n\n\nexport default CommerceLayer\nexport { CommerceLayer }\n\nexport { CommerceLayerClient }\nexport type { CommerceLayerConfig, CommerceLayerInitConfig }\n"]}
|