@delopay/sdk 0.407.0 → 0.409.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -0
- package/dist/airwallexCard.cjs +41 -0
- package/dist/airwallexCard.cjs.map +1 -0
- package/dist/airwallexCard.d.cts +214 -0
- package/dist/airwallexCard.d.ts +214 -0
- package/dist/airwallexCard.js +41 -0
- package/dist/airwallexCard.js.map +1 -0
- package/dist/branding.cjs +235 -0
- package/dist/branding.cjs.map +1 -0
- package/dist/branding.d.cts +784 -0
- package/dist/branding.d.ts +784 -0
- package/dist/branding.js +235 -0
- package/dist/branding.js.map +1 -0
- package/dist/cardFormStyles.cjs +77 -0
- package/dist/cardFormStyles.cjs.map +1 -0
- package/dist/cardFormStyles.d.cts +182 -0
- package/dist/cardFormStyles.d.ts +182 -0
- package/dist/cardFormStyles.js +77 -0
- package/dist/cardFormStyles.js.map +1 -0
- package/dist/checkoutSession.cjs +7 -0
- package/dist/checkoutSession.cjs.map +1 -0
- package/dist/checkoutSession.d.cts +662 -0
- package/dist/checkoutSession.d.ts +662 -0
- package/dist/checkoutSession.js +7 -0
- package/dist/checkoutSession.js.map +1 -0
- package/dist/chunk-244VZFFO.cjs +27 -0
- package/dist/chunk-244VZFFO.cjs.map +1 -0
- package/dist/chunk-26THONSG.js +274 -0
- package/dist/chunk-26THONSG.js.map +1 -0
- package/dist/chunk-27NVIXDV.js +24 -0
- package/dist/chunk-27NVIXDV.js.map +1 -0
- package/dist/chunk-2C5XHXAY.js +19 -0
- package/dist/chunk-2C5XHXAY.js.map +1 -0
- package/dist/chunk-2IJRBJXW.cjs +35 -0
- package/dist/chunk-2IJRBJXW.cjs.map +1 -0
- package/dist/chunk-2JSBGTTW.js +99 -0
- package/dist/chunk-2JSBGTTW.js.map +1 -0
- package/dist/chunk-2PC2VAR7.js +217 -0
- package/dist/chunk-2PC2VAR7.js.map +1 -0
- package/dist/chunk-2QMSBWQY.js +453 -0
- package/dist/chunk-2QMSBWQY.js.map +1 -0
- package/dist/chunk-2RGSWTDI.js +19 -0
- package/dist/chunk-2RGSWTDI.js.map +1 -0
- package/dist/chunk-2TQA6UYY.js +228 -0
- package/dist/chunk-2TQA6UYY.js.map +1 -0
- package/dist/chunk-2XAJIA23.js +20 -0
- package/dist/chunk-2XAJIA23.js.map +1 -0
- package/dist/chunk-34AF36TY.js +89 -0
- package/dist/chunk-34AF36TY.js.map +1 -0
- package/dist/chunk-34PC72O7.cjs +73 -0
- package/dist/chunk-34PC72O7.cjs.map +1 -0
- package/dist/chunk-37BJUQ32.js +37 -0
- package/dist/chunk-37BJUQ32.js.map +1 -0
- package/dist/chunk-3GBWQWTP.cjs +54 -0
- package/dist/chunk-3GBWQWTP.cjs.map +1 -0
- package/dist/chunk-3GMGEP5I.js +43 -0
- package/dist/chunk-3GMGEP5I.js.map +1 -0
- package/dist/chunk-3L3B46AZ.js +44 -0
- package/dist/chunk-3L3B46AZ.js.map +1 -0
- package/dist/chunk-3NKFPZRS.js +973 -0
- package/dist/chunk-3NKFPZRS.js.map +1 -0
- package/dist/chunk-3ST4NW2T.js +35 -0
- package/dist/chunk-3ST4NW2T.js.map +1 -0
- package/dist/chunk-3YBBJT3Y.cjs +64 -0
- package/dist/chunk-3YBBJT3Y.cjs.map +1 -0
- package/dist/chunk-3YUKTCY2.js +71 -0
- package/dist/chunk-3YUKTCY2.js.map +1 -0
- package/dist/chunk-3ZHS3MFZ.js +35 -0
- package/dist/chunk-3ZHS3MFZ.js.map +1 -0
- package/dist/chunk-44QBWVRS.cjs +39 -0
- package/dist/chunk-44QBWVRS.cjs.map +1 -0
- package/dist/chunk-4EKAWNYI.cjs +69 -0
- package/dist/chunk-4EKAWNYI.cjs.map +1 -0
- package/dist/chunk-4FVOCZIM.js +15 -0
- package/dist/chunk-4FVOCZIM.js.map +1 -0
- package/dist/chunk-4LN4BR2T.cjs +262 -0
- package/dist/chunk-4LN4BR2T.cjs.map +1 -0
- package/dist/chunk-4T3MXBO2.js +114 -0
- package/dist/chunk-4T3MXBO2.js.map +1 -0
- package/dist/chunk-4T4XHPYN.cjs +135 -0
- package/dist/chunk-4T4XHPYN.cjs.map +1 -0
- package/dist/chunk-55XO7BFC.js +23 -0
- package/dist/chunk-55XO7BFC.js.map +1 -0
- package/dist/chunk-5CITBN33.cjs +485 -0
- package/dist/chunk-5CITBN33.cjs.map +1 -0
- package/dist/chunk-5CNBINCX.cjs +54 -0
- package/dist/chunk-5CNBINCX.cjs.map +1 -0
- package/dist/chunk-5HCKC4HF.cjs +217 -0
- package/dist/chunk-5HCKC4HF.cjs.map +1 -0
- package/dist/chunk-5O2JSQYA.cjs +114 -0
- package/dist/chunk-5O2JSQYA.cjs.map +1 -0
- package/dist/chunk-5P2AO6XY.js +202 -0
- package/dist/chunk-5P2AO6XY.js.map +1 -0
- package/dist/chunk-5VS3SUPL.js +125 -0
- package/dist/chunk-5VS3SUPL.js.map +1 -0
- package/dist/chunk-645BQ53W.js +84 -0
- package/dist/chunk-645BQ53W.js.map +1 -0
- package/dist/chunk-6EBY2KKL.cjs +43 -0
- package/dist/chunk-6EBY2KKL.cjs.map +1 -0
- package/dist/chunk-6H7K5DDI.js +307 -0
- package/dist/chunk-6H7K5DDI.js.map +1 -0
- package/dist/chunk-6LOWE2YI.cjs +23 -0
- package/dist/chunk-6LOWE2YI.cjs.map +1 -0
- package/dist/chunk-6LSG5Z4T.cjs +122 -0
- package/dist/chunk-6LSG5Z4T.cjs.map +1 -0
- package/dist/chunk-6QGC52VH.js +177 -0
- package/dist/chunk-6QGC52VH.js.map +1 -0
- package/dist/chunk-6SU2MTN2.cjs +17 -0
- package/dist/chunk-6SU2MTN2.cjs.map +1 -0
- package/dist/chunk-6TBA7KZO.js +132 -0
- package/dist/chunk-6TBA7KZO.js.map +1 -0
- package/dist/chunk-6VIC6Y7T.js +64 -0
- package/dist/chunk-6VIC6Y7T.js.map +1 -0
- package/dist/chunk-6YCDLSIU.cjs +105 -0
- package/dist/chunk-6YCDLSIU.cjs.map +1 -0
- package/dist/chunk-75E5WNJG.cjs +122 -0
- package/dist/chunk-75E5WNJG.cjs.map +1 -0
- package/dist/chunk-7ITPMVDB.cjs +108 -0
- package/dist/chunk-7ITPMVDB.cjs.map +1 -0
- package/dist/chunk-7JV6VVO7.cjs +43 -0
- package/dist/chunk-7JV6VVO7.cjs.map +1 -0
- package/dist/chunk-7M2KEERO.js +311 -0
- package/dist/chunk-7M2KEERO.js.map +1 -0
- package/dist/chunk-7QGASY6O.js +134 -0
- package/dist/chunk-7QGASY6O.js.map +1 -0
- package/dist/chunk-7QZCUXWB.cjs +15 -0
- package/dist/chunk-7QZCUXWB.cjs.map +1 -0
- package/dist/chunk-7VXF5D67.cjs +23 -0
- package/dist/chunk-7VXF5D67.cjs.map +1 -0
- package/dist/chunk-7YIDBPIU.js +208 -0
- package/dist/chunk-7YIDBPIU.js.map +1 -0
- package/dist/chunk-ACZ2R47X.cjs +140 -0
- package/dist/chunk-ACZ2R47X.cjs.map +1 -0
- package/dist/chunk-AQ5NYBU4.cjs +340 -0
- package/dist/chunk-AQ5NYBU4.cjs.map +1 -0
- package/dist/chunk-AREMIQLZ.js +202 -0
- package/dist/chunk-AREMIQLZ.js.map +1 -0
- package/dist/chunk-AYUYJO3I.cjs +44 -0
- package/dist/chunk-AYUYJO3I.cjs.map +1 -0
- package/dist/chunk-B2TCNGC2.cjs +536 -0
- package/dist/chunk-B2TCNGC2.cjs.map +1 -0
- package/dist/chunk-B72YNBLS.js +628 -0
- package/dist/chunk-B72YNBLS.js.map +1 -0
- package/dist/chunk-BCA3TCGS.cjs +185 -0
- package/dist/chunk-BCA3TCGS.cjs.map +1 -0
- package/dist/chunk-BEND2MZX.js +108 -0
- package/dist/chunk-BEND2MZX.js.map +1 -0
- package/dist/chunk-BF7IX2O4.js +128 -0
- package/dist/chunk-BF7IX2O4.js.map +1 -0
- package/dist/chunk-BOU2TQ6U.cjs +1 -0
- package/dist/chunk-BOU2TQ6U.cjs.map +1 -0
- package/dist/chunk-BP6KDQ6I.cjs +52 -0
- package/dist/chunk-BP6KDQ6I.cjs.map +1 -0
- package/dist/chunk-BRY3W7N3.cjs +43 -0
- package/dist/chunk-BRY3W7N3.cjs.map +1 -0
- package/dist/chunk-CAMALM35.cjs +277 -0
- package/dist/chunk-CAMALM35.cjs.map +1 -0
- package/dist/chunk-CCN44NZJ.cjs +134 -0
- package/dist/chunk-CCN44NZJ.cjs.map +1 -0
- package/dist/chunk-CECSSOIZ.js +44 -0
- package/dist/chunk-CECSSOIZ.js.map +1 -0
- package/dist/chunk-CKKNFFKP.cjs +311 -0
- package/dist/chunk-CKKNFFKP.cjs.map +1 -0
- package/dist/chunk-CMETZEUX.js +168 -0
- package/dist/chunk-CMETZEUX.js.map +1 -0
- package/dist/chunk-CR3JBTP3.cjs +31 -0
- package/dist/chunk-CR3JBTP3.cjs.map +1 -0
- package/dist/chunk-CRNICOYA.js +157 -0
- package/dist/chunk-CRNICOYA.js.map +1 -0
- package/dist/chunk-CSY3IZOC.js +695 -0
- package/dist/chunk-CSY3IZOC.js.map +1 -0
- package/dist/chunk-CTB54SCJ.js +43 -0
- package/dist/chunk-CTB54SCJ.js.map +1 -0
- package/dist/chunk-D3D73ANJ.js +39 -0
- package/dist/chunk-D3D73ANJ.js.map +1 -0
- package/dist/chunk-DECN4QU3.js +33 -0
- package/dist/chunk-DECN4QU3.js.map +1 -0
- package/dist/chunk-DFC4T6FA.js +137 -0
- package/dist/chunk-DFC4T6FA.js.map +1 -0
- package/dist/chunk-DJASVBOJ.cjs +61 -0
- package/dist/chunk-DJASVBOJ.cjs.map +1 -0
- package/dist/chunk-DLKGOSZR.js +73 -0
- package/dist/chunk-DLKGOSZR.js.map +1 -0
- package/dist/chunk-DO2DYNFW.js +122 -0
- package/dist/chunk-DO2DYNFW.js.map +1 -0
- package/dist/chunk-DVA3T3MD.js +67 -0
- package/dist/chunk-DVA3T3MD.js.map +1 -0
- package/dist/chunk-DZM3UP7F.cjs +148 -0
- package/dist/chunk-DZM3UP7F.cjs.map +1 -0
- package/dist/chunk-ENPSUWTS.cjs +35 -0
- package/dist/chunk-ENPSUWTS.cjs.map +1 -0
- package/dist/chunk-EQ6P6ZND.cjs +177 -0
- package/dist/chunk-EQ6P6ZND.cjs.map +1 -0
- package/dist/chunk-EXPWQBI3.cjs +23 -0
- package/dist/chunk-EXPWQBI3.cjs.map +1 -0
- package/dist/chunk-EXW4VDRM.js +57 -0
- package/dist/chunk-EXW4VDRM.js.map +1 -0
- package/dist/chunk-F3I5DOWV.cjs +14 -0
- package/dist/chunk-F3I5DOWV.cjs.map +1 -0
- package/dist/chunk-F6JABQLJ.js +720 -0
- package/dist/chunk-F6JABQLJ.js.map +1 -0
- package/dist/chunk-F6S3WCCB.cjs +40 -0
- package/dist/chunk-F6S3WCCB.cjs.map +1 -0
- package/dist/chunk-FI7NLDWZ.js +1 -0
- package/dist/chunk-FI7NLDWZ.js.map +1 -0
- package/dist/chunk-FQRC4NJG.cjs +202 -0
- package/dist/chunk-FQRC4NJG.cjs.map +1 -0
- package/dist/chunk-FYISDU2Y.cjs +137 -0
- package/dist/chunk-FYISDU2Y.cjs.map +1 -0
- package/dist/chunk-FZYEZLTM.js +59 -0
- package/dist/chunk-FZYEZLTM.js.map +1 -0
- package/dist/chunk-G7FHCGT5.js +140 -0
- package/dist/chunk-G7FHCGT5.js.map +1 -0
- package/dist/chunk-GA3KXPIF.cjs +720 -0
- package/dist/chunk-GA3KXPIF.cjs.map +1 -0
- package/dist/chunk-GEYCGYAN.js +122 -0
- package/dist/chunk-GEYCGYAN.js.map +1 -0
- package/dist/chunk-GG52SAHA.cjs +157 -0
- package/dist/chunk-GG52SAHA.cjs.map +1 -0
- package/dist/chunk-GGYLU7YO.cjs +58 -0
- package/dist/chunk-GGYLU7YO.cjs.map +1 -0
- package/dist/chunk-GK5FWN4H.cjs +307 -0
- package/dist/chunk-GK5FWN4H.cjs.map +1 -0
- package/dist/chunk-GSQN5EOO.cjs +347 -0
- package/dist/chunk-GSQN5EOO.cjs.map +1 -0
- package/dist/chunk-GVHN6BAJ.js +19 -0
- package/dist/chunk-GVHN6BAJ.js.map +1 -0
- package/dist/chunk-GW7IHYXR.cjs +125 -0
- package/dist/chunk-GW7IHYXR.cjs.map +1 -0
- package/dist/chunk-GZW5AFIL.js +27 -0
- package/dist/chunk-GZW5AFIL.js.map +1 -0
- package/dist/chunk-H2NGR5JG.js +786 -0
- package/dist/chunk-H2NGR5JG.js.map +1 -0
- package/dist/chunk-H537KAYC.cjs +71 -0
- package/dist/chunk-H537KAYC.cjs.map +1 -0
- package/dist/chunk-HJL32HDH.js +14 -0
- package/dist/chunk-HJL32HDH.js.map +1 -0
- package/dist/chunk-HL763JX2.js +43 -0
- package/dist/chunk-HL763JX2.js.map +1 -0
- package/dist/chunk-HLKFUOAQ.cjs +27 -0
- package/dist/chunk-HLKFUOAQ.cjs.map +1 -0
- package/dist/chunk-HLYGHP6F.cjs +80 -0
- package/dist/chunk-HLYGHP6F.cjs.map +1 -0
- package/dist/chunk-HO3SKXCG.js +559 -0
- package/dist/chunk-HO3SKXCG.js.map +1 -0
- package/dist/chunk-I2W7AO4B.cjs +37 -0
- package/dist/chunk-I2W7AO4B.cjs.map +1 -0
- package/dist/chunk-I2XGNALG.cjs +19 -0
- package/dist/chunk-I2XGNALG.cjs.map +1 -0
- package/dist/chunk-I5KOMBQ3.js +277 -0
- package/dist/chunk-I5KOMBQ3.js.map +1 -0
- package/dist/chunk-I65QS3YQ.cjs +695 -0
- package/dist/chunk-I65QS3YQ.cjs.map +1 -0
- package/dist/chunk-IB75VVZO.js +58 -0
- package/dist/chunk-IB75VVZO.js.map +1 -0
- package/dist/chunk-IGFEQECO.js +67 -0
- package/dist/chunk-IGFEQECO.js.map +1 -0
- package/dist/chunk-IKXGA2Z5.cjs +24 -0
- package/dist/chunk-IKXGA2Z5.cjs.map +1 -0
- package/dist/chunk-INQQLXAV.js +347 -0
- package/dist/chunk-INQQLXAV.js.map +1 -0
- package/dist/chunk-IR2LFKKA.cjs +44 -0
- package/dist/chunk-IR2LFKKA.cjs.map +1 -0
- package/dist/chunk-IVQDVFFR.js +226 -0
- package/dist/chunk-IVQDVFFR.js.map +1 -0
- package/dist/chunk-J3UH2OJH.js +31 -0
- package/dist/chunk-J3UH2OJH.js.map +1 -0
- package/dist/chunk-JAJOUFPM.js +30 -0
- package/dist/chunk-JAJOUFPM.js.map +1 -0
- package/dist/chunk-JPVR2NHV.js +54 -0
- package/dist/chunk-JPVR2NHV.js.map +1 -0
- package/dist/chunk-JSSDNDAG.cjs +1038 -0
- package/dist/chunk-JSSDNDAG.cjs.map +1 -0
- package/dist/chunk-JTZ44ZLT.js +1741 -0
- package/dist/chunk-JTZ44ZLT.js.map +1 -0
- package/dist/chunk-K5Q2H3VD.cjs +85 -0
- package/dist/chunk-K5Q2H3VD.cjs.map +1 -0
- package/dist/chunk-KAKDDX4L.js +144 -0
- package/dist/chunk-KAKDDX4L.js.map +1 -0
- package/dist/chunk-KD5Y2YWK.cjs +128 -0
- package/dist/chunk-KD5Y2YWK.cjs.map +1 -0
- package/dist/chunk-KJDMNF2T.cjs +202 -0
- package/dist/chunk-KJDMNF2T.cjs.map +1 -0
- package/dist/chunk-KKKEARPT.js +40 -0
- package/dist/chunk-KKKEARPT.js.map +1 -0
- package/dist/chunk-KLONGJCL.cjs +59 -0
- package/dist/chunk-KLONGJCL.cjs.map +1 -0
- package/dist/chunk-KS5ZUVPC.js +23 -0
- package/dist/chunk-KS5ZUVPC.js.map +1 -0
- package/dist/chunk-KSJ7JLR3.cjs +228 -0
- package/dist/chunk-KSJ7JLR3.cjs.map +1 -0
- package/dist/chunk-L7474OST.js +21 -0
- package/dist/chunk-L7474OST.js.map +1 -0
- package/dist/chunk-LG7XHNAY.js +52 -0
- package/dist/chunk-LG7XHNAY.js.map +1 -0
- package/dist/chunk-LJ2EG6JK.cjs +226 -0
- package/dist/chunk-LJ2EG6JK.cjs.map +1 -0
- package/dist/chunk-LLYY4TCZ.cjs +628 -0
- package/dist/chunk-LLYY4TCZ.cjs.map +1 -0
- package/dist/chunk-LPDUHBHT.js +2842 -0
- package/dist/chunk-LPDUHBHT.js.map +1 -0
- package/dist/chunk-LX6E5TTR.js +58 -0
- package/dist/chunk-LX6E5TTR.js.map +1 -0
- package/dist/chunk-LYIBTVK6.cjs +2842 -0
- package/dist/chunk-LYIBTVK6.cjs.map +1 -0
- package/dist/chunk-LZUHCGJ3.js +281 -0
- package/dist/chunk-LZUHCGJ3.js.map +1 -0
- package/dist/chunk-M3HWE7KT.cjs +33 -0
- package/dist/chunk-M3HWE7KT.cjs.map +1 -0
- package/dist/chunk-M3SJHFT4.cjs +24 -0
- package/dist/chunk-M3SJHFT4.cjs.map +1 -0
- package/dist/chunk-MCNDMK7F.cjs +167 -0
- package/dist/chunk-MCNDMK7F.cjs.map +1 -0
- package/dist/chunk-MLG6NXI6.cjs +19 -0
- package/dist/chunk-MLG6NXI6.cjs.map +1 -0
- package/dist/chunk-MTFLXMYI.js +262 -0
- package/dist/chunk-MTFLXMYI.js.map +1 -0
- package/dist/chunk-MYDDK2Z3.js +485 -0
- package/dist/chunk-MYDDK2Z3.js.map +1 -0
- package/dist/chunk-NFB3S2E6.cjs +22 -0
- package/dist/chunk-NFB3S2E6.cjs.map +1 -0
- package/dist/chunk-NLQOHTYN.js +44 -0
- package/dist/chunk-NLQOHTYN.js.map +1 -0
- package/dist/chunk-NW37NQZB.cjs +1741 -0
- package/dist/chunk-NW37NQZB.cjs.map +1 -0
- package/dist/chunk-NXORFP3R.js +148 -0
- package/dist/chunk-NXORFP3R.js.map +1 -0
- package/dist/chunk-NYL3BNHR.cjs +57 -0
- package/dist/chunk-NYL3BNHR.cjs.map +1 -0
- package/dist/chunk-O4AYHLQX.cjs +132 -0
- package/dist/chunk-O4AYHLQX.cjs.map +1 -0
- package/dist/chunk-ODPNVNYE.cjs +75 -0
- package/dist/chunk-ODPNVNYE.cjs.map +1 -0
- package/dist/chunk-OEKPQXXM.js +24 -0
- package/dist/chunk-OEKPQXXM.js.map +1 -0
- package/dist/chunk-OG2KJAYD.cjs +44 -0
- package/dist/chunk-OG2KJAYD.cjs.map +1 -0
- package/dist/chunk-OMGDHJYX.js +39 -0
- package/dist/chunk-OMGDHJYX.js.map +1 -0
- package/dist/chunk-OMRKVER7.js +80 -0
- package/dist/chunk-OMRKVER7.js.map +1 -0
- package/dist/chunk-OWP7XBY2.cjs +281 -0
- package/dist/chunk-OWP7XBY2.cjs.map +1 -0
- package/dist/chunk-OYZP6NF6.cjs +58 -0
- package/dist/chunk-OYZP6NF6.cjs.map +1 -0
- package/dist/chunk-P6JLNQ6L.cjs +111 -0
- package/dist/chunk-P6JLNQ6L.cjs.map +1 -0
- package/dist/chunk-P7DYLUUI.cjs +168 -0
- package/dist/chunk-P7DYLUUI.cjs.map +1 -0
- package/dist/chunk-PKAE6AQT.cjs +208 -0
- package/dist/chunk-PKAE6AQT.cjs.map +1 -0
- package/dist/chunk-Q347PTXI.js +54 -0
- package/dist/chunk-Q347PTXI.js.map +1 -0
- package/dist/chunk-Q6HI2G7W.js +40 -0
- package/dist/chunk-Q6HI2G7W.js.map +1 -0
- package/dist/chunk-Q7M7DO7M.cjs +186 -0
- package/dist/chunk-Q7M7DO7M.cjs.map +1 -0
- package/dist/chunk-QCPEE3EV.js +186 -0
- package/dist/chunk-QCPEE3EV.js.map +1 -0
- package/dist/chunk-QF3Q3TPV.js +162 -0
- package/dist/chunk-QF3Q3TPV.js.map +1 -0
- package/dist/chunk-QGTVOC6O.js +167 -0
- package/dist/chunk-QGTVOC6O.js.map +1 -0
- package/dist/chunk-QMLU5DST.cjs +786 -0
- package/dist/chunk-QMLU5DST.cjs.map +1 -0
- package/dist/chunk-QRSA72B3.cjs +40 -0
- package/dist/chunk-QRSA72B3.cjs.map +1 -0
- package/dist/chunk-QYNRNDIY.cjs +186 -0
- package/dist/chunk-QYNRNDIY.cjs.map +1 -0
- package/dist/chunk-R4FE6K43.cjs +99 -0
- package/dist/chunk-R4FE6K43.cjs.map +1 -0
- package/dist/chunk-R5VYSZ3Q.cjs +67 -0
- package/dist/chunk-R5VYSZ3Q.cjs.map +1 -0
- package/dist/chunk-RBN2H7QR.js +340 -0
- package/dist/chunk-RBN2H7QR.js.map +1 -0
- package/dist/chunk-RI42IDRR.cjs +23 -0
- package/dist/chunk-RI42IDRR.cjs.map +1 -0
- package/dist/chunk-RUDKQPEO.js +22 -0
- package/dist/chunk-RUDKQPEO.js.map +1 -0
- package/dist/chunk-RWCCRTLZ.js +17 -0
- package/dist/chunk-RWCCRTLZ.js.map +1 -0
- package/dist/chunk-S7SBNOGS.cjs +144 -0
- package/dist/chunk-S7SBNOGS.cjs.map +1 -0
- package/dist/chunk-SQELICSX.cjs +159 -0
- package/dist/chunk-SQELICSX.cjs.map +1 -0
- package/dist/chunk-SXCH2AXM.js +85 -0
- package/dist/chunk-SXCH2AXM.js.map +1 -0
- package/dist/chunk-T37FLY7Q.js +185 -0
- package/dist/chunk-T37FLY7Q.js.map +1 -0
- package/dist/chunk-T6N35YFJ.js +186 -0
- package/dist/chunk-T6N35YFJ.js.map +1 -0
- package/dist/chunk-THPCSJUP.js +43 -0
- package/dist/chunk-THPCSJUP.js.map +1 -0
- package/dist/chunk-TIMYWB2C.cjs +316 -0
- package/dist/chunk-TIMYWB2C.cjs.map +1 -0
- package/dist/chunk-TMAJE5P2.cjs +84 -0
- package/dist/chunk-TMAJE5P2.cjs.map +1 -0
- package/dist/chunk-TNIJ6OSH.cjs +162 -0
- package/dist/chunk-TNIJ6OSH.cjs.map +1 -0
- package/dist/chunk-TZ4JHXBR.js +98 -0
- package/dist/chunk-TZ4JHXBR.js.map +1 -0
- package/dist/chunk-UGSM7RJ2.cjs +30 -0
- package/dist/chunk-UGSM7RJ2.cjs.map +1 -0
- package/dist/chunk-UH2A7ZDK.js +61 -0
- package/dist/chunk-UH2A7ZDK.js.map +1 -0
- package/dist/chunk-UKLZAOLW.cjs +209 -0
- package/dist/chunk-UKLZAOLW.cjs.map +1 -0
- package/dist/chunk-ULZWGW2O.js +14 -0
- package/dist/chunk-ULZWGW2O.js.map +1 -0
- package/dist/chunk-US6R4TM4.js +50 -0
- package/dist/chunk-US6R4TM4.js.map +1 -0
- package/dist/chunk-UU3YQJT6.js +27 -0
- package/dist/chunk-UU3YQJT6.js.map +1 -0
- package/dist/chunk-V3PCNGDH.js +69 -0
- package/dist/chunk-V3PCNGDH.js.map +1 -0
- package/dist/chunk-V47G7P6L.cjs +19 -0
- package/dist/chunk-V47G7P6L.cjs.map +1 -0
- package/dist/chunk-VH5A6SMU.cjs +50 -0
- package/dist/chunk-VH5A6SMU.cjs.map +1 -0
- package/dist/chunk-VJ2L2GOF.js +23 -0
- package/dist/chunk-VJ2L2GOF.js.map +1 -0
- package/dist/chunk-VOIELJLZ.cjs +274 -0
- package/dist/chunk-VOIELJLZ.cjs.map +1 -0
- package/dist/chunk-VW7GWSP6.js +209 -0
- package/dist/chunk-VW7GWSP6.js.map +1 -0
- package/dist/chunk-VYC7WUM5.cjs +39 -0
- package/dist/chunk-VYC7WUM5.cjs.map +1 -0
- package/dist/chunk-W3EFNOH6.js +536 -0
- package/dist/chunk-W3EFNOH6.js.map +1 -0
- package/dist/chunk-W457XUA6.cjs +67 -0
- package/dist/chunk-W457XUA6.cjs.map +1 -0
- package/dist/chunk-WBAPQODS.js +111 -0
- package/dist/chunk-WBAPQODS.js.map +1 -0
- package/dist/chunk-WHDI3TMP.cjs +21 -0
- package/dist/chunk-WHDI3TMP.cjs.map +1 -0
- package/dist/chunk-WITCPKNL.cjs +20 -0
- package/dist/chunk-WITCPKNL.cjs.map +1 -0
- package/dist/chunk-WSOUQS6C.js +135 -0
- package/dist/chunk-WSOUQS6C.js.map +1 -0
- package/dist/chunk-WX6NP7UU.cjs +14 -0
- package/dist/chunk-WX6NP7UU.cjs.map +1 -0
- package/dist/chunk-WZK3BIHG.js +75 -0
- package/dist/chunk-WZK3BIHG.js.map +1 -0
- package/dist/chunk-X7UAYGQR.cjs +43 -0
- package/dist/chunk-X7UAYGQR.cjs.map +1 -0
- package/dist/chunk-XQLRIBVR.cjs +98 -0
- package/dist/chunk-XQLRIBVR.cjs.map +1 -0
- package/dist/chunk-Y4XILACH.js +105 -0
- package/dist/chunk-Y4XILACH.js.map +1 -0
- package/dist/chunk-YJQPKT6W.cjs +453 -0
- package/dist/chunk-YJQPKT6W.cjs.map +1 -0
- package/dist/chunk-YK3P5QNZ.cjs +559 -0
- package/dist/chunk-YK3P5QNZ.cjs.map +1 -0
- package/dist/chunk-YOFIOZJ5.js +1038 -0
- package/dist/chunk-YOFIOZJ5.js.map +1 -0
- package/dist/chunk-ZDYRYXY3.js +316 -0
- package/dist/chunk-ZDYRYXY3.js.map +1 -0
- package/dist/chunk-ZKPVUCQV.cjs +973 -0
- package/dist/chunk-ZKPVUCQV.cjs.map +1 -0
- package/dist/chunk-ZOD4J4XF.cjs +89 -0
- package/dist/chunk-ZOD4J4XF.cjs.map +1 -0
- package/dist/chunk-ZX4JTR2J.js +23 -0
- package/dist/chunk-ZX4JTR2J.js.map +1 -0
- package/dist/chunk-ZYWW275O.js +159 -0
- package/dist/chunk-ZYWW275O.js.map +1 -0
- package/dist/client.cjs +17 -0
- package/dist/client.cjs.map +1 -0
- package/dist/client.d.cts +221 -0
- package/dist/client.d.ts +221 -0
- package/dist/client.js +17 -0
- package/dist/client.js.map +1 -0
- package/dist/core.cjs +13 -0
- package/dist/core.cjs.map +1 -0
- package/dist/core.d.cts +376 -0
- package/dist/core.d.ts +376 -0
- package/dist/core.js +13 -0
- package/dist/core.js.map +1 -0
- package/dist/currencies.cjs +7 -0
- package/dist/currencies.cjs.map +1 -0
- package/dist/currencies.d.cts +8 -0
- package/dist/currencies.d.ts +8 -0
- package/dist/currencies.js +7 -0
- package/dist/currencies.js.map +1 -0
- package/dist/enigmaCardForm.cjs +65 -0
- package/dist/enigmaCardForm.cjs.map +1 -0
- package/dist/enigmaCardForm.d.cts +145 -0
- package/dist/enigmaCardForm.d.ts +145 -0
- package/dist/enigmaCardForm.js +65 -0
- package/dist/enigmaCardForm.js.map +1 -0
- package/dist/error.cjs +9 -0
- package/dist/error.cjs.map +1 -0
- package/dist/error.d.cts +66 -0
- package/dist/error.d.ts +66 -0
- package/dist/error.js +9 -0
- package/dist/error.js.map +1 -0
- package/dist/eventStream.cjs +7 -0
- package/dist/eventStream.cjs.map +1 -0
- package/dist/eventStream.d.cts +50 -0
- package/dist/eventStream.d.ts +50 -0
- package/dist/eventStream.js +7 -0
- package/dist/eventStream.js.map +1 -0
- package/dist/exportDownload.cjs +21 -0
- package/dist/exportDownload.cjs.map +1 -0
- package/dist/exportDownload.d.cts +86 -0
- package/dist/exportDownload.d.ts +86 -0
- package/dist/exportDownload.js +21 -0
- package/dist/exportDownload.js.map +1 -0
- package/dist/feeProgram.cjs +25 -0
- package/dist/feeProgram.cjs.map +1 -0
- package/dist/feeProgram.d.cts +169 -0
- package/dist/feeProgram.d.ts +169 -0
- package/dist/feeProgram.js +25 -0
- package/dist/feeProgram.js.map +1 -0
- package/dist/index.cjs +839 -18404
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +87 -1
- package/dist/index.d.ts +87 -1
- package/dist/index.js +417 -187
- package/dist/internal/resources/admin.cjs +7 -0
- package/dist/internal/resources/admin.cjs.map +1 -0
- package/dist/internal/resources/admin.d.cts +31 -0
- package/dist/internal/resources/admin.d.ts +31 -0
- package/dist/internal/resources/admin.js +7 -0
- package/dist/internal/resources/admin.js.map +1 -0
- package/dist/internal/resources/adminBranding.cjs +7 -0
- package/dist/internal/resources/adminBranding.cjs.map +1 -0
- package/dist/internal/resources/adminBranding.d.cts +37 -0
- package/dist/internal/resources/adminBranding.d.ts +37 -0
- package/dist/internal/resources/adminBranding.js +7 -0
- package/dist/internal/resources/adminBranding.js.map +1 -0
- package/dist/internal/resources/adminFileScans.cjs +7 -0
- package/dist/internal/resources/adminFileScans.cjs.map +1 -0
- package/dist/internal/resources/adminFileScans.d.cts +39 -0
- package/dist/internal/resources/adminFileScans.d.ts +39 -0
- package/dist/internal/resources/adminFileScans.js +7 -0
- package/dist/internal/resources/adminFileScans.js.map +1 -0
- package/dist/internal/resources/adminIndustries.cjs +7 -0
- package/dist/internal/resources/adminIndustries.cjs.map +1 -0
- package/dist/internal/resources/adminIndustries.d.cts +61 -0
- package/dist/internal/resources/adminIndustries.d.ts +61 -0
- package/dist/internal/resources/adminIndustries.js +7 -0
- package/dist/internal/resources/adminIndustries.js.map +1 -0
- package/dist/internal/resources/adminLive.cjs +7 -0
- package/dist/internal/resources/adminLive.cjs.map +1 -0
- package/dist/internal/resources/adminLive.d.cts +33 -0
- package/dist/internal/resources/adminLive.d.ts +33 -0
- package/dist/internal/resources/adminLive.js +7 -0
- package/dist/internal/resources/adminLive.js.map +1 -0
- package/dist/internal/resources/adminPortal.cjs +7 -0
- package/dist/internal/resources/adminPortal.cjs.map +1 -0
- package/dist/internal/resources/adminPortal.d.cts +1029 -0
- package/dist/internal/resources/adminPortal.d.ts +1029 -0
- package/dist/internal/resources/adminPortal.js +7 -0
- package/dist/internal/resources/adminPortal.js.map +1 -0
- package/dist/internal/resources/adminSupport.cjs +7 -0
- package/dist/internal/resources/adminSupport.cjs.map +1 -0
- package/dist/internal/resources/adminSupport.d.cts +52 -0
- package/dist/internal/resources/adminSupport.d.ts +52 -0
- package/dist/internal/resources/adminSupport.js +7 -0
- package/dist/internal/resources/adminSupport.js.map +1 -0
- package/dist/internal/resources/auditLogs.cjs +7 -0
- package/dist/internal/resources/auditLogs.cjs.map +1 -0
- package/dist/internal/resources/auditLogs.d.cts +37 -0
- package/dist/internal/resources/auditLogs.d.ts +37 -0
- package/dist/internal/resources/auditLogs.js +7 -0
- package/dist/internal/resources/auditLogs.js.map +1 -0
- package/dist/internal/resources/cache.cjs +7 -0
- package/dist/internal/resources/cache.cjs.map +1 -0
- package/dist/internal/resources/cache.d.cts +13 -0
- package/dist/internal/resources/cache.d.ts +13 -0
- package/dist/internal/resources/cache.js +7 -0
- package/dist/internal/resources/cache.js.map +1 -0
- package/dist/internal/resources/cardIssuers.cjs +7 -0
- package/dist/internal/resources/cardIssuers.cjs.map +1 -0
- package/dist/internal/resources/cardIssuers.d.cts +15 -0
- package/dist/internal/resources/cardIssuers.d.ts +15 -0
- package/dist/internal/resources/cardIssuers.js +7 -0
- package/dist/internal/resources/cardIssuers.js.map +1 -0
- package/dist/internal/resources/configs.cjs +7 -0
- package/dist/internal/resources/configs.cjs.map +1 -0
- package/dist/internal/resources/configs.d.cts +19 -0
- package/dist/internal/resources/configs.d.ts +19 -0
- package/dist/internal/resources/configs.js +7 -0
- package/dist/internal/resources/configs.js.map +1 -0
- package/dist/internal/resources/connectorRestrictionRules.cjs +7 -0
- package/dist/internal/resources/connectorRestrictionRules.cjs.map +1 -0
- package/dist/internal/resources/connectorRestrictionRules.d.cts +43 -0
- package/dist/internal/resources/connectorRestrictionRules.d.ts +43 -0
- package/dist/internal/resources/connectorRestrictionRules.js +7 -0
- package/dist/internal/resources/connectorRestrictionRules.js.map +1 -0
- package/dist/internal/resources/connectorRestrictions.cjs +7 -0
- package/dist/internal/resources/connectorRestrictions.cjs.map +1 -0
- package/dist/internal/resources/connectorRestrictions.d.cts +33 -0
- package/dist/internal/resources/connectorRestrictions.d.ts +33 -0
- package/dist/internal/resources/connectorRestrictions.js +7 -0
- package/dist/internal/resources/connectorRestrictions.js.map +1 -0
- package/dist/internal/resources/diagnostic.cjs +7 -0
- package/dist/internal/resources/diagnostic.cjs.map +1 -0
- package/dist/internal/resources/diagnostic.d.cts +183 -0
- package/dist/internal/resources/diagnostic.d.ts +183 -0
- package/dist/internal/resources/diagnostic.js +7 -0
- package/dist/internal/resources/diagnostic.js.map +1 -0
- package/dist/internal/resources/gsm.cjs +7 -0
- package/dist/internal/resources/gsm.cjs.map +1 -0
- package/dist/internal/resources/gsm.d.cts +16 -0
- package/dist/internal/resources/gsm.d.ts +16 -0
- package/dist/internal/resources/gsm.js +7 -0
- package/dist/internal/resources/gsm.js.map +1 -0
- package/dist/internal/resources/nativeRenewals.cjs +7 -0
- package/dist/internal/resources/nativeRenewals.cjs.map +1 -0
- package/dist/internal/resources/nativeRenewals.d.cts +16 -0
- package/dist/internal/resources/nativeRenewals.d.ts +16 -0
- package/dist/internal/resources/nativeRenewals.js +7 -0
- package/dist/internal/resources/nativeRenewals.js.map +1 -0
- package/dist/internal/resources/platformBilling.cjs +7 -0
- package/dist/internal/resources/platformBilling.cjs.map +1 -0
- package/dist/internal/resources/platformBilling.d.cts +145 -0
- package/dist/internal/resources/platformBilling.d.ts +145 -0
- package/dist/internal/resources/platformBilling.js +7 -0
- package/dist/internal/resources/platformBilling.js.map +1 -0
- package/dist/internal/resources/platformFees.cjs +9 -0
- package/dist/internal/resources/platformFees.cjs.map +1 -0
- package/dist/internal/resources/platformFees.d.cts +60 -0
- package/dist/internal/resources/platformFees.d.ts +60 -0
- package/dist/internal/resources/platformFees.js +9 -0
- package/dist/internal/resources/platformFees.js.map +1 -0
- package/dist/internal/resources/platformMessageTemplates.cjs +7 -0
- package/dist/internal/resources/platformMessageTemplates.cjs.map +1 -0
- package/dist/internal/resources/platformMessageTemplates.d.cts +46 -0
- package/dist/internal/resources/platformMessageTemplates.d.ts +46 -0
- package/dist/internal/resources/platformMessageTemplates.js +7 -0
- package/dist/internal/resources/platformMessageTemplates.js.map +1 -0
- package/dist/internal/resources/platformSettings.cjs +7 -0
- package/dist/internal/resources/platformSettings.cjs.map +1 -0
- package/dist/internal/resources/platformSettings.d.cts +41 -0
- package/dist/internal/resources/platformSettings.d.ts +41 -0
- package/dist/internal/resources/platformSettings.js +7 -0
- package/dist/internal/resources/platformSettings.js.map +1 -0
- package/dist/internal.cjs +855 -21120
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +109 -6144
- package/dist/internal.d.ts +109 -6144
- package/dist/internal.js +478 -2932
- package/dist/internal.js.map +1 -1
- package/dist/listQuery.cjs +7 -0
- package/dist/listQuery.cjs.map +1 -0
- package/dist/listQuery.d.cts +15 -0
- package/dist/listQuery.d.ts +15 -0
- package/dist/listQuery.js +7 -0
- package/dist/listQuery.js.map +1 -0
- package/dist/panes.cjs +65 -0
- package/dist/panes.cjs.map +1 -0
- package/dist/panes.d.cts +523 -0
- package/dist/panes.d.ts +523 -0
- package/dist/panes.js +65 -0
- package/dist/panes.js.map +1 -0
- package/dist/paymentPresentation.cjs +27 -0
- package/dist/paymentPresentation.cjs.map +1 -0
- package/dist/paymentPresentation.d.cts +101 -0
- package/dist/paymentPresentation.d.ts +101 -0
- package/dist/paymentPresentation.js +27 -0
- package/dist/paymentPresentation.js.map +1 -0
- package/dist/recordCounter.cjs +9 -0
- package/dist/recordCounter.cjs.map +1 -0
- package/dist/recordCounter.d.cts +92 -0
- package/dist/recordCounter.d.ts +92 -0
- package/dist/recordCounter.js +9 -0
- package/dist/recordCounter.js.map +1 -0
- package/dist/resources/analytics.cjs +7 -0
- package/dist/resources/analytics.cjs.map +1 -0
- package/dist/resources/analytics.d.cts +193 -0
- package/dist/resources/analytics.d.ts +193 -0
- package/dist/resources/analytics.js +7 -0
- package/dist/resources/analytics.js.map +1 -0
- package/dist/resources/analyticsDashboard.cjs +7 -0
- package/dist/resources/analyticsDashboard.cjs.map +1 -0
- package/dist/resources/analyticsDashboard.d.cts +15 -0
- package/dist/resources/analyticsDashboard.d.ts +15 -0
- package/dist/resources/analyticsDashboard.js +7 -0
- package/dist/resources/analyticsDashboard.js.map +1 -0
- package/dist/resources/apiKeys.cjs +7 -0
- package/dist/resources/apiKeys.cjs.map +1 -0
- package/dist/resources/apiKeys.d.cts +156 -0
- package/dist/resources/apiKeys.d.ts +156 -0
- package/dist/resources/apiKeys.js +7 -0
- package/dist/resources/apiKeys.js.map +1 -0
- package/dist/resources/audit.cjs +7 -0
- package/dist/resources/audit.cjs.map +1 -0
- package/dist/resources/audit.d.cts +34 -0
- package/dist/resources/audit.d.ts +34 -0
- package/dist/resources/audit.js +7 -0
- package/dist/resources/audit.js.map +1 -0
- package/dist/resources/authentication.cjs +7 -0
- package/dist/resources/authentication.cjs.map +1 -0
- package/dist/resources/authentication.d.cts +22 -0
- package/dist/resources/authentication.d.ts +22 -0
- package/dist/resources/authentication.js +7 -0
- package/dist/resources/authentication.js.map +1 -0
- package/dist/resources/availabilityOverrides.cjs +7 -0
- package/dist/resources/availabilityOverrides.cjs.map +1 -0
- package/dist/resources/availabilityOverrides.d.cts +30 -0
- package/dist/resources/availabilityOverrides.d.ts +30 -0
- package/dist/resources/availabilityOverrides.js +7 -0
- package/dist/resources/availabilityOverrides.js.map +1 -0
- package/dist/resources/billing.cjs +7 -0
- package/dist/resources/billing.cjs.map +1 -0
- package/dist/resources/billing.d.cts +122 -0
- package/dist/resources/billing.d.ts +122 -0
- package/dist/resources/billing.js +7 -0
- package/dist/resources/billing.js.map +1 -0
- package/dist/resources/buyerAccount.cjs +7 -0
- package/dist/resources/buyerAccount.cjs.map +1 -0
- package/dist/resources/buyerAccount.d.cts +162 -0
- package/dist/resources/buyerAccount.d.ts +162 -0
- package/dist/resources/buyerAccount.js +7 -0
- package/dist/resources/buyerAccount.js.map +1 -0
- package/dist/resources/buyerBlocklist.cjs +7 -0
- package/dist/resources/buyerBlocklist.cjs.map +1 -0
- package/dist/resources/buyerBlocklist.d.cts +120 -0
- package/dist/resources/buyerBlocklist.d.ts +120 -0
- package/dist/resources/buyerBlocklist.js +7 -0
- package/dist/resources/buyerBlocklist.js.map +1 -0
- package/dist/resources/buyerConversations.cjs +7 -0
- package/dist/resources/buyerConversations.cjs.map +1 -0
- package/dist/resources/buyerConversations.d.cts +85 -0
- package/dist/resources/buyerConversations.d.ts +85 -0
- package/dist/resources/buyerConversations.js +7 -0
- package/dist/resources/buyerConversations.js.map +1 -0
- package/dist/resources/buyerEvidenceReviews.cjs +7 -0
- package/dist/resources/buyerEvidenceReviews.cjs.map +1 -0
- package/dist/resources/buyerEvidenceReviews.d.cts +43 -0
- package/dist/resources/buyerEvidenceReviews.d.ts +43 -0
- package/dist/resources/buyerEvidenceReviews.js +7 -0
- package/dist/resources/buyerEvidenceReviews.js.map +1 -0
- package/dist/resources/buyerPortal.cjs +7 -0
- package/dist/resources/buyerPortal.cjs.map +1 -0
- package/dist/resources/buyerPortal.d.cts +122 -0
- package/dist/resources/buyerPortal.d.ts +122 -0
- package/dist/resources/buyerPortal.js +7 -0
- package/dist/resources/buyerPortal.js.map +1 -0
- package/dist/resources/cards.cjs +7 -0
- package/dist/resources/cards.cjs.map +1 -0
- package/dist/resources/cards.d.cts +17 -0
- package/dist/resources/cards.d.ts +17 -0
- package/dist/resources/cards.js +7 -0
- package/dist/resources/cards.js.map +1 -0
- package/dist/resources/chargebackPrevention.cjs +9 -0
- package/dist/resources/chargebackPrevention.cjs.map +1 -0
- package/dist/resources/chargebackPrevention.d.cts +51 -0
- package/dist/resources/chargebackPrevention.d.ts +51 -0
- package/dist/resources/chargebackPrevention.js +9 -0
- package/dist/resources/chargebackPrevention.js.map +1 -0
- package/dist/resources/checkoutMethods.cjs +7 -0
- package/dist/resources/checkoutMethods.cjs.map +1 -0
- package/dist/resources/checkoutMethods.d.cts +135 -0
- package/dist/resources/checkoutMethods.d.ts +135 -0
- package/dist/resources/checkoutMethods.js +7 -0
- package/dist/resources/checkoutMethods.js.map +1 -0
- package/dist/resources/checkoutRecovery.cjs +7 -0
- package/dist/resources/checkoutRecovery.cjs.map +1 -0
- package/dist/resources/checkoutRecovery.d.cts +92 -0
- package/dist/resources/checkoutRecovery.d.ts +92 -0
- package/dist/resources/checkoutRecovery.js +7 -0
- package/dist/resources/checkoutRecovery.js.map +1 -0
- package/dist/resources/checkoutTemplates.cjs +7 -0
- package/dist/resources/checkoutTemplates.cjs.map +1 -0
- package/dist/resources/checkoutTemplates.d.cts +75 -0
- package/dist/resources/checkoutTemplates.d.ts +75 -0
- package/dist/resources/checkoutTemplates.js +7 -0
- package/dist/resources/checkoutTemplates.js.map +1 -0
- package/dist/resources/connectors.cjs +7 -0
- package/dist/resources/connectors.cjs.map +1 -0
- package/dist/resources/connectors.d.cts +500 -0
- package/dist/resources/connectors.d.ts +500 -0
- package/dist/resources/connectors.js +7 -0
- package/dist/resources/connectors.js.map +1 -0
- package/dist/resources/costRules.cjs +7 -0
- package/dist/resources/costRules.cjs.map +1 -0
- package/dist/resources/costRules.d.cts +56 -0
- package/dist/resources/costRules.d.ts +56 -0
- package/dist/resources/costRules.js +7 -0
- package/dist/resources/costRules.js.map +1 -0
- package/dist/resources/customers.cjs +7 -0
- package/dist/resources/customers.cjs.map +1 -0
- package/dist/resources/customers.d.cts +185 -0
- package/dist/resources/customers.d.ts +185 -0
- package/dist/resources/customers.js +7 -0
- package/dist/resources/customers.js.map +1 -0
- package/dist/resources/deploymentBranding.cjs +9 -0
- package/dist/resources/deploymentBranding.cjs.map +1 -0
- package/dist/resources/deploymentBranding.d.cts +51 -0
- package/dist/resources/deploymentBranding.d.ts +51 -0
- package/dist/resources/deploymentBranding.js +9 -0
- package/dist/resources/deploymentBranding.js.map +1 -0
- package/dist/resources/disputes.cjs +7 -0
- package/dist/resources/disputes.cjs.map +1 -0
- package/dist/resources/disputes.d.cts +157 -0
- package/dist/resources/disputes.d.ts +157 -0
- package/dist/resources/disputes.js +7 -0
- package/dist/resources/disputes.js.map +1 -0
- package/dist/resources/ephemeralKeys.cjs +7 -0
- package/dist/resources/ephemeralKeys.cjs.map +1 -0
- package/dist/resources/ephemeralKeys.d.cts +43 -0
- package/dist/resources/ephemeralKeys.d.ts +43 -0
- package/dist/resources/ephemeralKeys.js +7 -0
- package/dist/resources/ephemeralKeys.js.map +1 -0
- package/dist/resources/events.cjs +7 -0
- package/dist/resources/events.cjs.map +1 -0
- package/dist/resources/events.d.cts +48 -0
- package/dist/resources/events.d.ts +48 -0
- package/dist/resources/events.js +7 -0
- package/dist/resources/events.js.map +1 -0
- package/dist/resources/export.cjs +7 -0
- package/dist/resources/export.cjs.map +1 -0
- package/dist/resources/export.d.cts +165 -0
- package/dist/resources/export.d.ts +165 -0
- package/dist/resources/export.js +7 -0
- package/dist/resources/export.js.map +1 -0
- package/dist/resources/externalRecords.cjs +7 -0
- package/dist/resources/externalRecords.cjs.map +1 -0
- package/dist/resources/externalRecords.d.cts +53 -0
- package/dist/resources/externalRecords.d.ts +53 -0
- package/dist/resources/externalRecords.js +7 -0
- package/dist/resources/externalRecords.js.map +1 -0
- package/dist/resources/featureMatrix.cjs +7 -0
- package/dist/resources/featureMatrix.cjs.map +1 -0
- package/dist/resources/featureMatrix.d.cts +24 -0
- package/dist/resources/featureMatrix.d.ts +24 -0
- package/dist/resources/featureMatrix.js +7 -0
- package/dist/resources/featureMatrix.js.map +1 -0
- package/dist/resources/fees.cjs +9 -0
- package/dist/resources/fees.cjs.map +1 -0
- package/dist/resources/fees.d.cts +96 -0
- package/dist/resources/fees.d.ts +96 -0
- package/dist/resources/fees.js +9 -0
- package/dist/resources/fees.js.map +1 -0
- package/dist/resources/files.cjs +7 -0
- package/dist/resources/files.cjs.map +1 -0
- package/dist/resources/files.d.cts +17 -0
- package/dist/resources/files.d.ts +17 -0
- package/dist/resources/files.js +7 -0
- package/dist/resources/files.js.map +1 -0
- package/dist/resources/forex.cjs +7 -0
- package/dist/resources/forex.cjs.map +1 -0
- package/dist/resources/forex.d.cts +15 -0
- package/dist/resources/forex.d.ts +15 -0
- package/dist/resources/forex.js +7 -0
- package/dist/resources/forex.js.map +1 -0
- package/dist/resources/identityVerifications.cjs +7 -0
- package/dist/resources/identityVerifications.cjs.map +1 -0
- package/dist/resources/identityVerifications.d.cts +220 -0
- package/dist/resources/identityVerifications.d.ts +220 -0
- package/dist/resources/identityVerifications.js +7 -0
- package/dist/resources/identityVerifications.js.map +1 -0
- package/dist/resources/industries.cjs +7 -0
- package/dist/resources/industries.cjs.map +1 -0
- package/dist/resources/industries.d.cts +88 -0
- package/dist/resources/industries.d.ts +88 -0
- package/dist/resources/industries.js +7 -0
- package/dist/resources/industries.js.map +1 -0
- package/dist/resources/invoiceSettings.cjs +7 -0
- package/dist/resources/invoiceSettings.cjs.map +1 -0
- package/dist/resources/invoiceSettings.d.cts +131 -0
- package/dist/resources/invoiceSettings.d.ts +131 -0
- package/dist/resources/invoiceSettings.js +7 -0
- package/dist/resources/invoiceSettings.js.map +1 -0
- package/dist/resources/invoices.cjs +7 -0
- package/dist/resources/invoices.cjs.map +1 -0
- package/dist/resources/invoices.d.cts +160 -0
- package/dist/resources/invoices.d.ts +160 -0
- package/dist/resources/invoices.js +7 -0
- package/dist/resources/invoices.js.map +1 -0
- package/dist/resources/live.cjs +13 -0
- package/dist/resources/live.cjs.map +1 -0
- package/dist/resources/live.d.cts +92 -0
- package/dist/resources/live.d.ts +92 -0
- package/dist/resources/live.js +13 -0
- package/dist/resources/live.js.map +1 -0
- package/dist/resources/mandates.cjs +7 -0
- package/dist/resources/mandates.cjs.map +1 -0
- package/dist/resources/mandates.d.cts +33 -0
- package/dist/resources/mandates.d.ts +33 -0
- package/dist/resources/mandates.js +7 -0
- package/dist/resources/mandates.js.map +1 -0
- package/dist/resources/merchantAccounts.cjs +7 -0
- package/dist/resources/merchantAccounts.cjs.map +1 -0
- package/dist/resources/merchantAccounts.d.cts +23 -0
- package/dist/resources/merchantAccounts.d.ts +23 -0
- package/dist/resources/merchantAccounts.js +7 -0
- package/dist/resources/merchantAccounts.js.map +1 -0
- package/dist/resources/messageTemplates.cjs +7 -0
- package/dist/resources/messageTemplates.cjs.map +1 -0
- package/dist/resources/messageTemplates.d.cts +48 -0
- package/dist/resources/messageTemplates.d.ts +48 -0
- package/dist/resources/messageTemplates.js +7 -0
- package/dist/resources/messageTemplates.js.map +1 -0
- package/dist/resources/operationLimits.cjs +7 -0
- package/dist/resources/operationLimits.cjs.map +1 -0
- package/dist/resources/operationLimits.d.cts +122 -0
- package/dist/resources/operationLimits.d.ts +122 -0
- package/dist/resources/operationLimits.js +7 -0
- package/dist/resources/operationLimits.js.map +1 -0
- package/dist/resources/paymentLinks.cjs +7 -0
- package/dist/resources/paymentLinks.cjs.map +1 -0
- package/dist/resources/paymentLinks.d.cts +42 -0
- package/dist/resources/paymentLinks.d.ts +42 -0
- package/dist/resources/paymentLinks.js +7 -0
- package/dist/resources/paymentLinks.js.map +1 -0
- package/dist/resources/paymentMethods.cjs +7 -0
- package/dist/resources/paymentMethods.cjs.map +1 -0
- package/dist/resources/paymentMethods.d.cts +172 -0
- package/dist/resources/paymentMethods.d.ts +172 -0
- package/dist/resources/paymentMethods.js +7 -0
- package/dist/resources/paymentMethods.js.map +1 -0
- package/dist/resources/payments.cjs +7 -0
- package/dist/resources/payments.cjs.map +1 -0
- package/dist/resources/payments.d.cts +509 -0
- package/dist/resources/payments.d.ts +509 -0
- package/dist/resources/payments.js +7 -0
- package/dist/resources/payments.js.map +1 -0
- package/dist/resources/payoutDestinations.cjs +7 -0
- package/dist/resources/payoutDestinations.cjs.map +1 -0
- package/dist/resources/payoutDestinations.d.cts +122 -0
- package/dist/resources/payoutDestinations.d.ts +122 -0
- package/dist/resources/payoutDestinations.js +7 -0
- package/dist/resources/payoutDestinations.js.map +1 -0
- package/dist/resources/payouts.cjs +7 -0
- package/dist/resources/payouts.cjs.map +1 -0
- package/dist/resources/payouts.d.cts +86 -0
- package/dist/resources/payouts.d.ts +86 -0
- package/dist/resources/payouts.js +7 -0
- package/dist/resources/payouts.js.map +1 -0
- package/dist/resources/paypalDisputes.cjs +7 -0
- package/dist/resources/paypalDisputes.cjs.map +1 -0
- package/dist/resources/paypalDisputes.d.cts +25 -0
- package/dist/resources/paypalDisputes.d.ts +25 -0
- package/dist/resources/paypalDisputes.js +7 -0
- package/dist/resources/paypalDisputes.js.map +1 -0
- package/dist/resources/persons.cjs +7 -0
- package/dist/resources/persons.cjs.map +1 -0
- package/dist/resources/persons.d.cts +58 -0
- package/dist/resources/persons.d.ts +58 -0
- package/dist/resources/persons.js +7 -0
- package/dist/resources/persons.js.map +1 -0
- package/dist/resources/poll.cjs +7 -0
- package/dist/resources/poll.cjs.map +1 -0
- package/dist/resources/poll.d.cts +12 -0
- package/dist/resources/poll.d.ts +12 -0
- package/dist/resources/poll.js +7 -0
- package/dist/resources/poll.js.map +1 -0
- package/dist/resources/processorCosts.cjs +7 -0
- package/dist/resources/processorCosts.cjs.map +1 -0
- package/dist/resources/processorCosts.d.cts +102 -0
- package/dist/resources/processorCosts.d.ts +102 -0
- package/dist/resources/processorCosts.js +7 -0
- package/dist/resources/processorCosts.js.map +1 -0
- package/dist/resources/processorImports.cjs +11 -0
- package/dist/resources/processorImports.cjs.map +1 -0
- package/dist/resources/processorImports.d.cts +96 -0
- package/dist/resources/processorImports.d.ts +96 -0
- package/dist/resources/processorImports.js +11 -0
- package/dist/resources/processorImports.js.map +1 -0
- package/dist/resources/products.cjs +7 -0
- package/dist/resources/products.cjs.map +1 -0
- package/dist/resources/products.d.cts +347 -0
- package/dist/resources/products.d.ts +347 -0
- package/dist/resources/products.js +7 -0
- package/dist/resources/products.js.map +1 -0
- package/dist/resources/profileAcquirers.cjs +7 -0
- package/dist/resources/profileAcquirers.cjs.map +1 -0
- package/dist/resources/profileAcquirers.d.cts +13 -0
- package/dist/resources/profileAcquirers.d.ts +13 -0
- package/dist/resources/profileAcquirers.js +7 -0
- package/dist/resources/profileAcquirers.js.map +1 -0
- package/dist/resources/profiles.cjs +7 -0
- package/dist/resources/profiles.cjs.map +1 -0
- package/dist/resources/profiles.d.cts +65 -0
- package/dist/resources/profiles.d.ts +65 -0
- package/dist/resources/profiles.js +7 -0
- package/dist/resources/profiles.js.map +1 -0
- package/dist/resources/projects.cjs +7 -0
- package/dist/resources/projects.cjs.map +1 -0
- package/dist/resources/projects.d.cts +131 -0
- package/dist/resources/projects.d.ts +131 -0
- package/dist/resources/projects.js +7 -0
- package/dist/resources/projects.js.map +1 -0
- package/dist/resources/refunds.cjs +7 -0
- package/dist/resources/refunds.cjs.map +1 -0
- package/dist/resources/refunds.d.cts +118 -0
- package/dist/resources/refunds.d.ts +118 -0
- package/dist/resources/refunds.js +7 -0
- package/dist/resources/refunds.js.map +1 -0
- package/dist/resources/regions.cjs +7 -0
- package/dist/resources/regions.cjs.map +1 -0
- package/dist/resources/regions.d.cts +32 -0
- package/dist/resources/regions.d.ts +32 -0
- package/dist/resources/regions.js +7 -0
- package/dist/resources/regions.js.map +1 -0
- package/dist/resources/relay.cjs +7 -0
- package/dist/resources/relay.cjs.map +1 -0
- package/dist/resources/relay.d.cts +13 -0
- package/dist/resources/relay.d.ts +13 -0
- package/dist/resources/relay.js +7 -0
- package/dist/resources/relay.js.map +1 -0
- package/dist/resources/risk.cjs +9 -0
- package/dist/resources/risk.cjs.map +1 -0
- package/dist/resources/risk.d.cts +67 -0
- package/dist/resources/risk.d.ts +67 -0
- package/dist/resources/risk.js +9 -0
- package/dist/resources/risk.js.map +1 -0
- package/dist/resources/routing.cjs +7 -0
- package/dist/resources/routing.cjs.map +1 -0
- package/dist/resources/routing.d.cts +526 -0
- package/dist/resources/routing.d.ts +526 -0
- package/dist/resources/routing.js +7 -0
- package/dist/resources/routing.js.map +1 -0
- package/dist/resources/search.cjs +7 -0
- package/dist/resources/search.cjs.map +1 -0
- package/dist/resources/search.d.cts +59 -0
- package/dist/resources/search.d.ts +59 -0
- package/dist/resources/search.js +7 -0
- package/dist/resources/search.js.map +1 -0
- package/dist/resources/sellToRestrictions.cjs +7 -0
- package/dist/resources/sellToRestrictions.cjs.map +1 -0
- package/dist/resources/sellToRestrictions.d.cts +99 -0
- package/dist/resources/sellToRestrictions.d.ts +99 -0
- package/dist/resources/sellToRestrictions.js +7 -0
- package/dist/resources/sellToRestrictions.js.map +1 -0
- package/dist/resources/settings.cjs +7 -0
- package/dist/resources/settings.cjs.map +1 -0
- package/dist/resources/settings.d.cts +36 -0
- package/dist/resources/settings.d.ts +36 -0
- package/dist/resources/settings.js +7 -0
- package/dist/resources/settings.js.map +1 -0
- package/dist/resources/settlement.cjs +9 -0
- package/dist/resources/settlement.cjs.map +1 -0
- package/dist/resources/settlement.d.cts +297 -0
- package/dist/resources/settlement.d.ts +297 -0
- package/dist/resources/settlement.js +9 -0
- package/dist/resources/settlement.js.map +1 -0
- package/dist/resources/shopLabels.cjs +7 -0
- package/dist/resources/shopLabels.cjs.map +1 -0
- package/dist/resources/shopLabels.d.cts +56 -0
- package/dist/resources/shopLabels.d.ts +56 -0
- package/dist/resources/shopLabels.js +7 -0
- package/dist/resources/shopLabels.js.map +1 -0
- package/dist/resources/shops.cjs +7 -0
- package/dist/resources/shops.cjs.map +1 -0
- package/dist/resources/shops.d.cts +196 -0
- package/dist/resources/shops.d.ts +196 -0
- package/dist/resources/shops.js +7 -0
- package/dist/resources/shops.js.map +1 -0
- package/dist/resources/stripeConnect.cjs +7 -0
- package/dist/resources/stripeConnect.cjs.map +1 -0
- package/dist/resources/stripeConnect.d.cts +19 -0
- package/dist/resources/stripeConnect.d.ts +19 -0
- package/dist/resources/stripeConnect.js +7 -0
- package/dist/resources/stripeConnect.js.map +1 -0
- package/dist/resources/subscriptions.cjs +7 -0
- package/dist/resources/subscriptions.cjs.map +1 -0
- package/dist/resources/subscriptions.d.cts +219 -0
- package/dist/resources/subscriptions.d.ts +219 -0
- package/dist/resources/subscriptions.js +7 -0
- package/dist/resources/subscriptions.js.map +1 -0
- package/dist/resources/support.cjs +7 -0
- package/dist/resources/support.cjs.map +1 -0
- package/dist/resources/support.d.cts +51 -0
- package/dist/resources/support.d.ts +51 -0
- package/dist/resources/support.js +7 -0
- package/dist/resources/support.js.map +1 -0
- package/dist/resources/threeDsRules.cjs +7 -0
- package/dist/resources/threeDsRules.cjs.map +1 -0
- package/dist/resources/threeDsRules.d.cts +12 -0
- package/dist/resources/threeDsRules.d.ts +12 -0
- package/dist/resources/threeDsRules.js +7 -0
- package/dist/resources/threeDsRules.js.map +1 -0
- package/dist/resources/users.cjs +7 -0
- package/dist/resources/users.cjs.map +1 -0
- package/dist/resources/users.d.cts +696 -0
- package/dist/resources/users.d.ts +696 -0
- package/dist/resources/users.js +7 -0
- package/dist/resources/users.js.map +1 -0
- package/dist/resources/vatRates.cjs +7 -0
- package/dist/resources/vatRates.cjs.map +1 -0
- package/dist/resources/vatRates.d.cts +24 -0
- package/dist/resources/vatRates.d.ts +24 -0
- package/dist/resources/vatRates.js +7 -0
- package/dist/resources/vatRates.js.map +1 -0
- package/dist/resources/verification.cjs +7 -0
- package/dist/resources/verification.cjs.map +1 -0
- package/dist/resources/verification.d.cts +13 -0
- package/dist/resources/verification.d.ts +13 -0
- package/dist/resources/verification.js +7 -0
- package/dist/resources/verification.js.map +1 -0
- package/dist/resources/webhooks.cjs +11 -0
- package/dist/resources/webhooks.cjs.map +1 -0
- package/dist/resources/webhooks.d.cts +145 -0
- package/dist/resources/webhooks.d.ts +145 -0
- package/dist/resources/webhooks.js +11 -0
- package/dist/resources/webhooks.js.map +1 -0
- package/dist/resources/whopResolutionCases.cjs +7 -0
- package/dist/resources/whopResolutionCases.cjs.map +1 -0
- package/dist/resources/whopResolutionCases.d.cts +28 -0
- package/dist/resources/whopResolutionCases.d.ts +28 -0
- package/dist/resources/whopResolutionCases.js +7 -0
- package/dist/resources/whopResolutionCases.js.map +1 -0
- package/dist/types-BEuEdvtX.d.cts +4511 -0
- package/dist/types-ewLZOLPZ.d.ts +4511 -0
- package/dist/types.cjs +1 -0
- package/dist/types.cjs.map +1 -0
- package/dist/{index-WArxrQje.d.cts → types.d.cts} +3 -11109
- package/dist/{index-WArxrQje.d.ts → types.d.ts} +3 -11109
- package/dist/types.js +1 -0
- package/dist/types.js.map +1 -0
- package/package.json +29 -17
- package/dist/chunk-DZK6LFNW.js +0 -18084
- package/dist/chunk-DZK6LFNW.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/resources/routing.ts"],"sourcesContent":["import type {\n CheckoutThemeConversionQuery,\n CheckoutThemeConversionResponse,\n CheckoutThemeProgramRequest,\n CheckoutThemeProgramResponse,\n DefaultRoutingConfigUpdate,\n LinkedRoutingConfigRetrieveResponse,\n MerchantRoutingAlgorithm,\n ProfileDefaultRoutingConfig,\n ProfileDeniedConnectorsResponse,\n RoutableConnectorChoice,\n RoutingActivatePayload,\n RoutingConfigCreateRequest,\n RoutingConfigDeleteResponse,\n RoutingConfigHistoryResponse,\n RoutingConfigUpdateRequest,\n ConnectorCapOverride,\n ConnectorCapOverrideLevel,\n ConnectorCapOverrideList,\n ConnectorCapOverrideRequest,\n ConnectorCapOverrides,\n RoutingConnectorCapReset,\n RoutingConnectorCapResetRequest,\n RoutingConnectorCaps,\n RoutingConnectorCapSchedule,\n RoutingConnectorCapScheduleShuffle,\n RoutingDeactivateRequest,\n RoutingDictionary,\n RoutingDictionaryRecord,\n RoutingHistoryParams,\n RoutingTimePlanDocument,\n RoutingVolumeCounters,\n SurchargeRuleRequest,\n SurchargeRuleResponse,\n} from '../types';\nimport type { RequestExtras, RequestFn } from '../client';\n\n/**\n * Create and manage payment routing algorithms.\n *\n * Routing rules determine which gateway connector handles each payment based on\n * card type, currency, amount, or custom conditions.\n */\nexport class Routing {\n readonly decision: RoutingDecisionManager;\n /** Merchant-friendly, per-payment-method surcharge rules (no Euclid DSL). */\n readonly surchargeRules: SurchargeRules;\n /** Which stored appearance variant a buyer is shown. Decides a look, never a payment. */\n readonly checkoutThemeRules: CheckoutThemeRules;\n /** Rendered-to-paid conversion per appearance variant and segment. */\n readonly checkoutThemeConversion: CheckoutThemeConversion;\n\n constructor(private readonly request: RequestFn) {\n this.decision = new RoutingDecisionManager(request);\n this.surchargeRules = new SurchargeRules(request);\n this.checkoutThemeRules = new CheckoutThemeRules(request);\n this.checkoutThemeConversion = new CheckoutThemeConversion(request);\n }\n\n /**\n * Create a new routing algorithm.\n *\n * @param params - Routing algorithm definition (rule-based, priority, or volume-based).\n * @returns Metadata record for the created routing configuration. The full\n * algorithm body is not echoed back — use `retrieve(id)` if you need it.\n *\n * @example\n * ```typescript\n * const config = await delopay.routing.create({\n * name: 'EU Priority',\n * algorithm: { type: 'priority', data: [{ connector: 'stripe' }] },\n * });\n * ```\n *\n * @example Conditional volume split (advanced): cards → 90% epayouts / 10% stripe.\n * Rules run top-down (first match wins); `defaultSelection` is the fallback.\n * Splits must sum to 100; `amount` conditions are in minor units.\n * ```typescript\n * const config = await delopay.routing.create({\n * name: 'Card split 90/10',\n * profile_id: 'pro_...',\n * algorithm: {\n * type: 'advanced',\n * data: {\n * defaultSelection: { type: 'priority', data: [{ connector: 'stripe' }] },\n * rules: [\n * {\n * name: 'cards',\n * connectorSelection: {\n * type: 'volume_split',\n * data: [\n * { connector: { connector: 'epayouts' }, split: 90 },\n * { connector: { connector: 'stripe' }, split: 10 },\n * ],\n * },\n * statements: [\n * {\n * condition: [\n * {\n * lhs: 'payment_method',\n * comparison: 'equal',\n * value: { type: 'enum_variant', value: 'card' },\n * metadata: {},\n * },\n * ],\n * },\n * ],\n * },\n * ],\n * metadata: {},\n * },\n * },\n * });\n * await delopay.routing.activate(config.id);\n * ```\n */\n async create(params: RoutingConfigCreateRequest): Promise<RoutingDictionaryRecord> {\n return this.request('POST', '/routing', { body: params });\n }\n\n /**\n * Retrieve a routing algorithm by its ID.\n *\n * @param algorithmId - The routing algorithm ID.\n * @returns The full routing configuration including the algorithm body.\n */\n async retrieve(algorithmId: string): Promise<MerchantRoutingAlgorithm> {\n return this.request('GET', `/routing/${encodeURIComponent(algorithmId)}`);\n }\n\n /**\n * Activate a routing algorithm, making it the active routing strategy.\n *\n * Always sends a JSON body (default `{}`) so the request carries the\n * `Content-Type: application/json` header that the server requires.\n *\n * @param algorithmId - The routing algorithm ID to activate.\n * @param params - Optional activation payload (e.g. `transaction_type`).\n */\n async activate(\n algorithmId: string,\n params: RoutingActivatePayload = {},\n ): Promise<RoutingDictionaryRecord> {\n return this.request('POST', `/routing/${encodeURIComponent(algorithmId)}/activate`, {\n body: params,\n });\n }\n\n /**\n * Deactivate the currently active routing algorithm (falls back to default routing).\n *\n * Always sends a JSON body (default `{}`) so the request carries the\n * `Content-Type: application/json` header that the server requires.\n *\n * @param params - Optional deactivation payload.\n */\n async deactivate(params: RoutingDeactivateRequest = {}): Promise<RoutingDictionaryRecord> {\n return this.request('POST', '/routing/deactivate', { body: params });\n }\n\n /**\n * Edit a static routing configuration.\n *\n * Partial: send only the fields to change. `name`/`description` are\n * metadata-only; `algorithm` is a wholesale rule replacement, validated\n * against the shop exactly as at create. `modified_at` is bumped either way.\n *\n * `PUT /routing/{algorithmId}`\n *\n * @param algorithmId - The routing algorithm ID to edit.\n * @param params - The fields to change (at least one required).\n * @returns The updated routing configuration including the algorithm body.\n */\n async update(\n algorithmId: string,\n params: RoutingConfigUpdateRequest,\n options?: RequestExtras,\n ): Promise<MerchantRoutingAlgorithm> {\n return this.request('PUT', `/routing/${encodeURIComponent(algorithmId)}`, {\n body: params,\n ...options,\n });\n }\n\n /**\n * Delete a static routing configuration.\n *\n * A soft delete: the configuration disappears from every list and read, but\n * its version history is kept server-side for audit. The live configuration\n * of a shop cannot be deleted — the backend refuses it (400, `IR_16`); deactivate it first.\n * Only `single`, `priority`, `volume_split` and `advanced` payment\n * configurations qualify (400 otherwise).\n *\n * `DELETE /routing/{algorithmId}`\n *\n * @param algorithmId - The routing algorithm to delete.\n */\n async delete(algorithmId: string): Promise<RoutingConfigDeleteResponse> {\n return this.request('DELETE', `/routing/${encodeURIComponent(algorithmId)}`);\n }\n\n /**\n * Every content window a routing configuration has had, oldest first.\n *\n * A configuration's rule can be edited in place, so this is what makes \"which\n * rule decided this payment\" answerable after the fact. Each entry is the rule\n * as it stood between `valid_from` and `valid_until`; the windows of one\n * config abut exactly, with no gap.\n *\n * Paging covers the whole timeline including the live window, so a page never\n * holds more than `limit` entries and the live one — the only entry without a\n * `valid_until` — comes back on exactly one page. Advance `offset` by `limit`;\n * a page past the end is empty, and `total_count` says where that end is\n * without probing for it.\n *\n * `GET /routing/{algorithmId}/history`\n *\n * @param algorithmId - The routing algorithm to read the history of.\n * @param params - Optional paging.\n */\n async history(\n algorithmId: string,\n params: RoutingHistoryParams = {},\n ): Promise<RoutingConfigHistoryResponse> {\n return this.request('GET', `/routing/${encodeURIComponent(algorithmId)}/history`, {\n query: params as Record<string, number | null | undefined>,\n });\n }\n\n /**\n * A shop's per-connector caps, each with its unit and window and how much of\n * the current window is spent (`used`) or held by payments in flight\n * (`reserved`).\n *\n * `GET /routing/connector-caps/{profileId}`\n */\n async connectorCaps(profileId: string): Promise<RoutingConnectorCaps> {\n return this.request('GET', `/routing/connector-caps/${encodeURIComponent(profileId)}`);\n }\n\n /** Read a shop's dated limit overrides. `GET /routing/connector-cap-schedules/{profileId}` */\n async connectorCapSchedules(profileId: string): Promise<RoutingConnectorCapSchedule> {\n return this.request('GET', `/routing/connector-cap-schedules/${encodeURIComponent(profileId)}`);\n }\n\n /**\n * Replace a shop's complete schedule using its last-read revision.\n * Remove an entry to cancel it; ordinary configured caps are unchanged.\n * Instants require explicit offsets, and overlapping entries for the same\n * account and unit are refused by the server. Capability preflight refuses\n * unsupported backends before submitting any schedule.\n *\n * `PUT /routing/connector-cap-schedules/{profileId}`\n */\n async setConnectorCapSchedules(\n profileId: string,\n params: RoutingConnectorCapSchedule,\n ): Promise<RoutingConnectorCapSchedule> {\n const caps = await this.connectorCaps(profileId);\n if (!caps.features?.includes('limit_schedules')) {\n throw new Error('Connector limit schedules are unsupported by the serving backend');\n }\n return this.request(\n 'PUT',\n `/routing/connector-cap-schedules/${encodeURIComponent(profileId)}`,\n {\n body: params,\n },\n );\n }\n\n /** Change the drawn value of an active scheduled range; preserves all usage. */\n async shuffleConnectorCapSchedule(\n profileId: string,\n params: RoutingConnectorCapScheduleShuffle,\n ): Promise<RoutingConnectorCaps> {\n const caps = await this.connectorCaps(profileId);\n if (!caps.features?.includes('limit_schedules')) {\n throw new Error('Connector limit schedules are unsupported by the serving backend');\n }\n return this.request(\n 'POST',\n `/routing/connector-cap-schedules/${encodeURIComponent(profileId)}/shuffle`,\n { body: params },\n );\n }\n\n /**\n * A shop's recurring time plan with its revision, the band active now, the\n * next change and each limit the plan releases in parts.\n *\n * `GET /routing/time-plans/{profileId}`\n */\n async timePlan(profileId: string): Promise<RoutingTimePlanDocument> {\n return this.request('GET', `/routing/time-plans/${encodeURIComponent(profileId)}`);\n }\n\n /**\n * Replace a shop's whole time plan using its last-read revision; `plan`\n * null removes it. Usage, reservations and dated limit entries are left as\n * they are. Overlapping bands, shares that do not total 100 and a stale\n * revision are refused by the server. Capability preflight refuses a\n * backend that would not apply the plan before anything is sent.\n *\n * `PUT /routing/time-plans/{profileId}`\n */\n async setTimePlan(\n profileId: string,\n params: Pick<RoutingTimePlanDocument, 'revision' | 'plan'>,\n ): Promise<RoutingTimePlanDocument> {\n const caps = await this.connectorCaps(profileId);\n if (!caps.features?.includes('time_plans')) {\n throw new Error('Time plans are unsupported by the serving backend');\n }\n return this.request('PUT', `/routing/time-plans/${encodeURIComponent(profileId)}`, {\n body: { revision: params.revision, plan: params.plan },\n });\n }\n\n /**\n * The live `routing_volume` counters behind a shop's active advanced\n * program: one per distinct budget the program reads, each with the window\n * it covers, the figure in the pinned threshold currency, and the rules that\n * read it. Lets a merchant see whether a `routing_volume < 50000` rule is at\n * 120 or at 499 today, and support answer why a payment went to the overflow\n * connector.\n *\n * What routing will use right now, not what the shop turned over: the\n * counters are held in Redis only and a lost Redis restarts the window at\n * zero. Read-only; needs the same permission as reading the rules.\n *\n * `GET /routing/volume-counters/{profileId}`\n */\n async volumeCounters(profileId: string): Promise<RoutingVolumeCounters> {\n return this.request('GET', `/routing/volume-counters/${encodeURIComponent(profileId)}`);\n }\n\n /**\n * Replace a shop's per-connector caps.\n *\n * Whole-set replacement, not a patch: the list sent becomes the complete set\n * of capped connectors, and an empty list clears them all — which is how\n * acquirer onboarding finishes, the new account ceasing to be a special case.\n * Re-send every other cap with its `unit`, `window` and `currency` as read:\n * an amount cap sent back without its `unit` is refused, because it carries a\n * currency and would otherwise be a payment count.\n *\n * Every account named must belong to this shop; one that does not is refused.\n * So is an amount cap without a `currency`, and a payment cap with one.\n *\n * An account may appear twice — a payment count and a budget — and never\n * twice in one `unit`. Re-send a range with its `limit_max`, or it is stored\n * as its bottom. Never re-send `current_limit` as `set_current_limit`: the\n * value read belongs to the window it was read in, and pinning it into a\n * window that has since reset is a limit nobody chose.\n *\n * `PUT /routing/connector-caps/{profileId}`\n */\n async setConnectorCaps(\n profileId: string,\n params: RoutingConnectorCaps,\n ): Promise<RoutingConnectorCaps> {\n return this.request('PUT', `/routing/connector-caps/${encodeURIComponent(profileId)}`, {\n body: params,\n });\n }\n\n /**\n * Reset one limit's usage for the window open now: what settled payments\n * spent stops counting, so the account takes payments again. Payments still\n * in flight keep their hold and count once they complete. The account's\n * other limit is untouched. Offered by a router that lists `usage_reset` in\n * `features`; refused (422) for an account with no limit in that unit.\n *\n * `POST /routing/connector-caps/{profileId}/reset`\n */\n async resetConnectorCapUsage(\n profileId: string,\n params: RoutingConnectorCapResetRequest,\n ): Promise<RoutingConnectorCapReset> {\n return this.request('POST', `/routing/connector-caps/${encodeURIComponent(profileId)}/reset`, {\n body: params,\n });\n }\n\n /**\n * Every connector cap override of the merchant: the accounts whose limits a\n * project or shop overrides.\n *\n * `GET /routing/connector-caps/overrides`\n */\n async connectorCapOverrides(): Promise<ConnectorCapOverrideList> {\n return this.request('GET', '/routing/connector-caps/overrides');\n }\n\n /**\n * One connector account's overrides, and for every shop the account takes\n * payments in, which limits apply there and where they come from.\n *\n * `GET /routing/connector-caps/accounts/{merchantConnectorId}/overrides`\n */\n async accountConnectorCapOverrides(merchantConnectorId: string): Promise<ConnectorCapOverrides> {\n return this.request(\n 'GET',\n `/routing/connector-caps/accounts/${encodeURIComponent(merchantConnectorId)}/overrides`,\n );\n }\n\n /**\n * Override an account's limits for one project (and every shop below it) or\n * one shop: `unlimited` lifts them there, `own` sets limits of its own,\n * counted separately from the account's. Replaces an existing override of\n * the same target. Setting the same target again keeps the usage its\n * current window already counted.\n *\n * `PUT /routing/connector-caps/accounts/{merchantConnectorId}/overrides/{level}/{scopeId}`\n */\n async setConnectorCapOverride(\n merchantConnectorId: string,\n level: ConnectorCapOverrideLevel,\n scopeId: string,\n params: ConnectorCapOverrideRequest,\n ): Promise<ConnectorCapOverride> {\n return this.request('PUT', this.overridePath(merchantConnectorId, level, scopeId), {\n body: params,\n });\n }\n\n /**\n * Remove an account's override for one project or shop; the next level up\n * applies again. Answers the override removed.\n *\n * `DELETE /routing/connector-caps/accounts/{merchantConnectorId}/overrides/{level}/{scopeId}`\n */\n async deleteConnectorCapOverride(\n merchantConnectorId: string,\n level: ConnectorCapOverrideLevel,\n scopeId: string,\n ): Promise<ConnectorCapOverride> {\n return this.request('DELETE', this.overridePath(merchantConnectorId, level, scopeId));\n }\n\n private overridePath(\n merchantConnectorId: string,\n level: ConnectorCapOverrideLevel,\n scopeId: string,\n ): string {\n return `/routing/connector-caps/accounts/${encodeURIComponent(merchantConnectorId)}/overrides/${encodeURIComponent(level)}/${encodeURIComponent(scopeId)}`;\n }\n\n /**\n * List all routing algorithms for the current merchant.\n *\n * @returns The routing dictionary (records + currently active id).\n */\n async list(): Promise<RoutingDictionary> {\n return this.request('GET', '/routing');\n }\n\n /**\n * Connector names denied at routing for a shop (explicit denies plus\n * whitelist-implied exclusions). Read-only; surfaced in the routing builder.\n *\n * `GET /routing/connector-restrictions/{profileId}`\n */\n async connectorRestrictions(profileId: string): Promise<ProfileDeniedConnectorsResponse> {\n return this.request('GET', `/routing/connector-restrictions/${encodeURIComponent(profileId)}`);\n }\n\n // --- Advanced operations (Task 3.4) ---\n\n /** Get active routing config. `GET /routing/active` */\n async getActive(): Promise<LinkedRoutingConfigRetrieveResponse> {\n return this.request('GET', '/routing/active');\n }\n\n /** Update default routing config. `POST /routing/default` */\n async updateDefault(params: Record<string, unknown>): Promise<RoutableConnectorChoice[]> {\n return this.request('POST', '/routing/default', { body: params });\n }\n\n /** Retrieve default config for profiles. `GET /routing/default/profile` */\n async getDefaultProfile(): Promise<RoutableConnectorChoice[] | ProfileDefaultRoutingConfig[]> {\n return this.request('GET', '/routing/default/profile');\n }\n\n /**\n * Retrieve one profile's default config. `GET /routing/default/profile/{profileId}`\n *\n * The narrow counterpart of `getDefaultProfile()`: that one returns every\n * profile of the merchant and needs merchant-level routing read, so a\n * profile-scoped (shop) role could write its own default through\n * `updateDefaultProfile()` but never read it back. This read is gated on\n * profile-level routing read and pinned to the caller's own profile — a shop\n * role asking for a sibling profile is refused.\n */\n async getDefaultForProfile(profileId: string): Promise<ProfileDefaultRoutingConfig> {\n return this.request('GET', `/routing/default/profile/${encodeURIComponent(profileId)}`);\n }\n\n /**\n * Update default config for a profile. `POST /routing/default/profile/{profileId}`\n *\n * Send the list alone to keep the shop's fallback mode, or `{ connectors, mode, splits }` to set\n * it. A `volume_split` whose shares do not total 100 is refused.\n */\n async updateDefaultProfile(\n profileId: string,\n params: DefaultRoutingConfigUpdate | Record<string, unknown>,\n options?: RequestExtras,\n ): Promise<ProfileDefaultRoutingConfig> {\n return this.request('POST', `/routing/default/profile/${encodeURIComponent(profileId)}`, {\n body: params,\n ...options,\n });\n }\n\n /** List routing configs for profile. `GET /routing/list/profile` */\n async listForProfile(): Promise<RoutingDictionary> {\n return this.request('GET', '/routing/list/profile');\n }\n\n /** Evaluate a routing rule. `POST /routing/rule/evaluate` */\n async evaluateRule(params: Record<string, unknown>): Promise<Record<string, unknown>> {\n return this.request('POST', '/routing/rule/evaluate', { body: params });\n }\n\n /** Migrate routing rules for profile. `POST /routing/rule/migrate` */\n async migrateRule(params: Record<string, unknown>): Promise<Record<string, unknown>> {\n return this.request('POST', '/routing/rule/migrate', { body: params });\n }\n\n /** Evaluate routing for a payment. `POST /routing/evaluate` */\n async evaluate(params: Record<string, unknown>): Promise<Record<string, unknown>> {\n return this.request('POST', '/routing/evaluate', { body: params });\n }\n\n /** Update gateway scores for dynamic routing. `POST /routing/feedback` */\n async feedback(params: Record<string, unknown>): Promise<Record<string, unknown>> {\n return this.request('POST', '/routing/feedback', { body: params });\n }\n}\n\nclass RoutingDecisionManager {\n constructor(private readonly request: RequestFn) {}\n\n /** Upsert decision manager config. `PUT /routing/decision` */\n async upsert(\n params: Record<string, unknown>,\n options?: RequestExtras,\n ): Promise<Record<string, unknown>> {\n return this.request('PUT', '/routing/decision', { body: params, ...options });\n }\n\n /** Retrieve decision manager config. `GET /routing/decision` */\n async retrieve(): Promise<Record<string, unknown>> {\n return this.request('GET', '/routing/decision');\n }\n\n /** Delete decision manager config. `DELETE /routing/decision` */\n async delete(options?: RequestExtras): Promise<Record<string, unknown>> {\n return this.request('DELETE', '/routing/decision', options);\n }\n\n /** Upsert surcharge decision config. `PUT /routing/decision/surcharge` */\n async upsertSurcharge(\n params: Record<string, unknown>,\n options?: RequestExtras,\n ): Promise<Record<string, unknown>> {\n return this.request('PUT', '/routing/decision/surcharge', { body: params, ...options });\n }\n\n /** Retrieve surcharge decision config. `GET /routing/decision/surcharge` */\n async retrieveSurcharge(): Promise<Record<string, unknown>> {\n return this.request('GET', '/routing/decision/surcharge');\n }\n\n /** Delete surcharge decision config. `DELETE /routing/decision/surcharge` */\n async deleteSurcharge(options?: RequestExtras): Promise<Record<string, unknown>> {\n return this.request('DELETE', '/routing/decision/surcharge', options);\n }\n}\n\n/**\n * Merchant-friendly surcharge rules: configure a per-payment-method surcharge\n * (fixed or %) added to the amount the buyer pays — without hand-writing the\n * Euclid DSL. Scope to a shop via `profile_id` (omit for merchant-wide).\n *\n * Distinct from the platform fee (a balance deduction): a surcharge changes what\n * the buyer is charged.\n */\nclass SurchargeRules {\n constructor(private readonly request: RequestFn) {}\n\n /**\n * Create or replace the surcharge program for a scope.\n *\n * `PUT /routing/surcharge/rules`\n *\n * @example\n * ```typescript\n * await delopay.routing.surchargeRules.upsert({\n * surcharges: [\n * { payment_method: 'crypto', surcharge: { rate: { percent: 1.0 } } },\n * { payment_method: 'card', surcharge: { fixed: { amount: 35 } } },\n * ],\n * });\n * ```\n */\n async upsert(\n params: SurchargeRuleRequest,\n options?: RequestExtras,\n ): Promise<SurchargeRuleResponse> {\n return this.request('PUT', '/routing/surcharge/rules', { body: params, ...options });\n }\n\n /**\n * Retrieve the active surcharge program for a scope, or `null` when none is set.\n *\n * `GET /routing/surcharge/rules?profile_id={profileId}`\n *\n * @param profileId - Shop scope. Omit for the merchant-wide rule.\n */\n async retrieve(profileId?: string): Promise<SurchargeRuleResponse | null> {\n return this.request('GET', '/routing/surcharge/rules', {\n query: { profile_id: profileId },\n });\n }\n\n /**\n * Deactivate the active surcharge program for a scope.\n *\n * `DELETE /routing/surcharge/rules?profile_id={profileId}`\n *\n * @param profileId - Shop scope. Omit for the merchant-wide rule.\n */\n async delete(profileId?: string, options?: RequestExtras): Promise<void> {\n return this.request('DELETE', '/routing/surcharge/rules', {\n query: { profile_id: profileId },\n ...options,\n });\n }\n}\n\n/**\n * Checkout theme programs: which of a shop's stored appearance variants a buyer\n * is shown.\n *\n * Same engine and same wire format as the advanced routing rules above — a\n * Euclid program whose rules run top-down, first match wins, with\n * `defaultSelection` as the fallback — with the output swapped for a variant\n * name. That is deliberate: the dashboard's routing rule builder can author\n * these without learning a second condition language.\n *\n * **A theme program decides a look and nothing else.** It cannot express which\n * payment methods are offered, what is charged, which provider processes the\n * payment, or whether it succeeds. The allowed dimensions are fixed server-side\n * by the output type — see {@link CheckoutThemeDimension} — so that is a\n * property of the API rather than a convention.\n *\n * Naming a variant the shop has not defined is **not** an error: the checkout\n * falls back to the shop default, exactly as it does for an unknown `?theme=`,\n * because a buyer who cannot pay is worse than a buyer who sees the default\n * look. Such names come back in `warnings` instead, recomputed on every read.\n */\nclass CheckoutThemeRules {\n constructor(private readonly request: RequestFn) {}\n\n /**\n * Create or replace the theme program for a scope.\n *\n * `PUT /routing/checkout-theme/rules`\n *\n * Supersedes rather than overwrites: the previous active version is retired\n * and a new one stored, so the record of which look was live when survives.\n * Pass `active: false` to store a revision **without** retiring the live one —\n * that is where a program drafted against a variant you have not built yet\n * belongs.\n *\n * @example A phone in Germany gets the compact look; everyone else the house style.\n * ```typescript\n * await delopay.routing.checkoutThemeRules.upsert({\n * name: 'Autumn targeting',\n * profile_id: 'pro_...',\n * algorithm: {\n * rules: [\n * {\n * name: 'German phones',\n * connectorSelection: { theme: { variant: 'compact' } },\n * statements: [\n * {\n * condition: [\n * {\n * lhs: 'device_class',\n * comparison: 'equal',\n * value: { type: 'enum_variant', value: 'phone' },\n * metadata: {},\n * },\n * {\n * lhs: 'browser_language',\n * comparison: 'equal',\n * value: { type: 'enum_variant', value: 'de' },\n * metadata: {},\n * },\n * ],\n * },\n * ],\n * },\n * ],\n * defaultSelection: { theme: { variant: 'house' } },\n * metadata: {},\n * },\n * });\n * ```\n */\n async upsert(params: CheckoutThemeProgramRequest): Promise<CheckoutThemeProgramResponse> {\n return this.request('PUT', '/routing/checkout-theme/rules', { body: params });\n }\n\n /**\n * Retrieve the active theme program for a scope, or `null` when none is set.\n *\n * `GET /routing/checkout-theme/rules?profile_id={profileId}`\n *\n * @param profileId - Shop scope. Omit for the merchant-wide program. A\n * shop-scoped caller that omits it gets its own shop's program.\n */\n async retrieve(profileId?: string): Promise<CheckoutThemeProgramResponse | null> {\n return this.request('GET', '/routing/checkout-theme/rules', {\n query: { profile_id: profileId },\n });\n }\n\n /**\n * Deactivate the active theme program for a scope. Idempotent.\n *\n * `DELETE /routing/checkout-theme/rules?profile_id={profileId}`\n *\n * Deactivation, not deletion — the stored row is what says which look was\n * live when, and that history cannot be reconstructed after the fact. Shops\n * go back to their default appearance immediately.\n *\n * @param profileId - Shop scope. Omit for the merchant-wide program.\n */\n async delete(profileId?: string): Promise<void> {\n return this.request('DELETE', '/routing/checkout-theme/rules', {\n query: { profile_id: profileId },\n });\n }\n}\n\n/**\n * Rendered-to-paid conversion, per appearance variant and segment.\n *\n * Answers the one question theme targeting exists for: *does variant B convert\n * better than the house style, on phones, in Germany?*\n *\n * **What a rate here means.** The denominator is backend-observed checkout page\n * opens, deduplicated by device within the hosted checkout's cache window, with\n * automated traffic excluded from both sides. It is narrower than \"paints\", and\n * that is deliberate - counting one buyer's refresh as a second render would\n * understate conversion. The exact basis travels with every response in\n * `denominator`, and the ways it is not the whole truth travel in `caveats`.\n *\n * **The server decides what may be concluded, not you.** Rate, Wilson interval,\n * per-cell `verdict` and the variant-vs-default `separates` test are computed\n * once, server-side, and shipped as values. Do not recompute them: the first\n * client that rounds differently tells a merchant a difference is real when the\n * server says it is not.\n */\nclass CheckoutThemeConversion {\n constructor(private readonly request: RequestFn) {}\n\n /**\n * Rendered-to-paid conversion for a shop over a window.\n *\n * `GET /routing/checkout-theme/conversion`\n *\n * Requires `CheckoutBranding` read at profile scope - the same permission\n * that governs seeing how a checkout looks.\n *\n * @param params - Window (RFC3339, `start` inclusive / `end` exclusive), the\n * shop, the dimension to group by, and the optional `device_class`,\n * `country` and `selection` filters.\n *\n * @example Which variant wins on which device, over the last 30 days.\n * ```typescript\n * const report = await delopay.routing.checkoutThemeConversion.retrieve({\n * profile_id: 'pro_...',\n * start: '2026-07-21T00:00:00Z',\n * end: '2026-08-20T00:00:00Z',\n * segment: 'device',\n * });\n *\n * for (const c of report.comparisons) {\n * if (!c.separates) continue; // \"not shown to differ\" - say nothing\n * console.log(`${c.variant} on ${c.segment}: ${c.higher} converts better`);\n * }\n * ```\n */\n async retrieve(params: CheckoutThemeConversionQuery): Promise<CheckoutThemeConversionResponse> {\n return this.request('GET', '/routing/checkout-theme/conversion', {\n query: {\n profile_id: params.profile_id,\n start: params.start,\n end: params.end,\n segment: params.segment,\n device_class: params.device_class ?? undefined,\n country: params.country ?? undefined,\n selection: params.selection ?? undefined,\n },\n });\n }\n}\n"],"mappings":";AA2CO,IAAM,UAAN,MAAc;AAAA,EASnB,YAA6B,SAAoB;AAApB;AAC3B,SAAK,WAAW,IAAI,uBAAuB,OAAO;AAClD,SAAK,iBAAiB,IAAI,eAAe,OAAO;AAChD,SAAK,qBAAqB,IAAI,mBAAmB,OAAO;AACxD,SAAK,0BAA0B,IAAI,wBAAwB,OAAO;AAAA,EACpE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA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AO;AAAA,QACd,KAAK,OAAO;AAAA,QACZ,SAAS,OAAO;AAAA,QAChB,cAAc,OAAO,gBAAgB;AAAA,QACrC,SAAS,OAAO,WAAW;AAAA,QAC3B,WAAW,OAAO,aAAa;AAAA,MACjC;AAAA,IACF,CAAC;AAAA,EACH;AACF;","names":[]}
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});// src/internal/resources/platformBilling.ts
|
|
2
|
+
var PlatformBilling = class {
|
|
3
|
+
constructor(request) {
|
|
4
|
+
this.request = request;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Manually credit a merchant's balance (e.g. promotional credit,
|
|
8
|
+
* dispute reversal, manual correction).
|
|
9
|
+
*
|
|
10
|
+
* @param merchantId - The merchant account ID.
|
|
11
|
+
* @param params - Credit amount and reason.
|
|
12
|
+
*/
|
|
13
|
+
async credit(merchantId, params) {
|
|
14
|
+
return this.request("POST", `/billing/${encodeURIComponent(merchantId)}/admin/credit`, {
|
|
15
|
+
body: params
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Manually debit a merchant's balance.
|
|
20
|
+
*
|
|
21
|
+
* @param merchantId - The merchant account ID.
|
|
22
|
+
* @param params - Debit amount and reason.
|
|
23
|
+
*/
|
|
24
|
+
async debit(merchantId, params) {
|
|
25
|
+
return this.request("POST", `/billing/${encodeURIComponent(merchantId)}/admin/debit`, {
|
|
26
|
+
body: params
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Edit a single ledger entry (amount and/or description), keeping the
|
|
31
|
+
* merchant balance consistent: when `amount` changes, the balance is
|
|
32
|
+
* atomically adjusted by the difference. Returns the entry id and new
|
|
33
|
+
* balance.
|
|
34
|
+
*
|
|
35
|
+
* @param merchantId - The merchant account ID.
|
|
36
|
+
* @param ledgerId - The ledger entry id to edit.
|
|
37
|
+
* @param params - New amount / description (either optional).
|
|
38
|
+
*/
|
|
39
|
+
async editLedgerEntry(merchantId, ledgerId, params) {
|
|
40
|
+
return this.request(
|
|
41
|
+
"PATCH",
|
|
42
|
+
`/billing/${encodeURIComponent(merchantId)}/admin/ledger/${encodeURIComponent(ledgerId)}`,
|
|
43
|
+
{ body: params }
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Delete a single ledger entry, reversing its amount from the merchant
|
|
48
|
+
* balance. Returns the deleted entry id and the new balance.
|
|
49
|
+
*
|
|
50
|
+
* @param merchantId - The merchant account ID.
|
|
51
|
+
* @param ledgerId - The ledger entry id to delete.
|
|
52
|
+
*/
|
|
53
|
+
async deleteLedgerEntry(merchantId, ledgerId) {
|
|
54
|
+
return this.request(
|
|
55
|
+
"DELETE",
|
|
56
|
+
`/billing/${encodeURIComponent(merchantId)}/admin/ledger/${encodeURIComponent(ledgerId)}`
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Manually suspend a merchant (e.g. confirmed fraud or ToS violation),
|
|
61
|
+
* independent of balance. A `reason` is required for audit. Throws 412 if
|
|
62
|
+
* the merchant is trusted (clear the flag first) or already suspended.
|
|
63
|
+
*
|
|
64
|
+
* @param merchantId - The merchant account ID.
|
|
65
|
+
* @param params - Suspension reason.
|
|
66
|
+
* @returns The updated billing profile.
|
|
67
|
+
*/
|
|
68
|
+
async suspend(merchantId, params) {
|
|
69
|
+
return this.request("POST", `/billing/${encodeURIComponent(merchantId)}/admin/suspend`, {
|
|
70
|
+
body: params
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Lift a suspension. Restores the merchant to `active` (or `delinquent` if
|
|
75
|
+
* the balance is at/below the hard floor) and resets the recharge-failure
|
|
76
|
+
* counter. Throws 412 if the merchant is not suspended.
|
|
77
|
+
*
|
|
78
|
+
* @param merchantId - The merchant account ID.
|
|
79
|
+
* @param params - Optional audit note.
|
|
80
|
+
* @returns The updated billing profile.
|
|
81
|
+
*/
|
|
82
|
+
async unsuspend(merchantId, params = {}) {
|
|
83
|
+
return this.request("POST", `/billing/${encodeURIComponent(merchantId)}/admin/unsuspend`, {
|
|
84
|
+
body: params
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Set or clear the trusted (suspension-exempt) flag. Trusted merchants
|
|
89
|
+
* cannot be suspended automatically or manually. Does not lift an existing
|
|
90
|
+
* suspension — use {@link PlatformBilling.unsuspend} for that.
|
|
91
|
+
*
|
|
92
|
+
* @param merchantId - The merchant account ID.
|
|
93
|
+
* @param params - The desired trusted state.
|
|
94
|
+
* @returns The updated billing profile.
|
|
95
|
+
*/
|
|
96
|
+
async setTrusted(merchantId, params) {
|
|
97
|
+
return this.request("PATCH", `/billing/${encodeURIComponent(merchantId)}/admin/trusted`, {
|
|
98
|
+
body: params
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Set the merchant's hard floor — the balance at or below which the
|
|
103
|
+
* merchant stops being active. A negative value grants a credit line; zero
|
|
104
|
+
* means no negative balance at all. This moves the suspension line, it does
|
|
105
|
+
* not remove it. The value and the caller are written to the audit log
|
|
106
|
+
* before the floor changes, so the change is always attributable.
|
|
107
|
+
*
|
|
108
|
+
* Refused (412) for a positive amount, for a floor beyond the maximum
|
|
109
|
+
* credit line of 10,000,000 minor units, or for an empty `reason`.
|
|
110
|
+
*
|
|
111
|
+
* Requires a router that serves the hard-floor admin route; older ones
|
|
112
|
+
* answer `404`.
|
|
113
|
+
*
|
|
114
|
+
* @param merchantId - The merchant account ID.
|
|
115
|
+
* @param params - The new floor (zero or negative) and the audit reason.
|
|
116
|
+
* @returns The updated billing profile.
|
|
117
|
+
*/
|
|
118
|
+
async setHardFloor(merchantId, params) {
|
|
119
|
+
return this.request("PATCH", `/billing/${encodeURIComponent(merchantId)}/admin/hard-floor`, {
|
|
120
|
+
body: params
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Mark a merchant free (not billed), or put it back on the prepaid model.
|
|
125
|
+
* While free, no platform fee is deducted, the payment gate never blocks on
|
|
126
|
+
* billing status, top-ups are refused and auto-recharge is inert. Marking
|
|
127
|
+
* free needs a `reason` and is refused (412) while an admin suspension is in
|
|
128
|
+
* force — lift that first.
|
|
129
|
+
*
|
|
130
|
+
* Requires a router that supports the free flag; older ones answer `404`.
|
|
131
|
+
*
|
|
132
|
+
* @param merchantId - The merchant account ID.
|
|
133
|
+
* @param params - The desired free state and, when marking free, the reason.
|
|
134
|
+
* @returns The updated billing profile.
|
|
135
|
+
*/
|
|
136
|
+
async setFree(merchantId, params) {
|
|
137
|
+
return this.request("PATCH", `/billing/${encodeURIComponent(merchantId)}/admin/free`, {
|
|
138
|
+
body: params
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Delete a merchant's **entire** ledger. Every live entry is soft-deleted —
|
|
143
|
+
* kept, so a replayed fee deduction or top-up webhook still no-ops — the
|
|
144
|
+
* balance is set to zero and the status re-derived (`active` for a free
|
|
145
|
+
* merchant; an active paying merchant lands in `delinquent`). Refused (412)
|
|
146
|
+
* while the merchant has shop allocations. Audited.
|
|
147
|
+
*
|
|
148
|
+
* Requires a router that serves the ledger admin routes; older ones answer
|
|
149
|
+
* `404`.
|
|
150
|
+
*
|
|
151
|
+
* @param merchantId - The merchant account ID.
|
|
152
|
+
* @param params - The reason, required for audit.
|
|
153
|
+
* @returns What was removed and the post-reset profile.
|
|
154
|
+
*/
|
|
155
|
+
async resetLedger(merchantId, params) {
|
|
156
|
+
return this.request("DELETE", `/billing/${encodeURIComponent(merchantId)}/admin/ledger`, {
|
|
157
|
+
body: params
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* (Re)create a merchant's ledger, optionally seeded with an opening
|
|
162
|
+
* balance. Ensures the billing profile exists (created without the welcome
|
|
163
|
+
* promo credit) and, when `opening_balance` is set, writes one
|
|
164
|
+
* `opening_balance` entry through the same atomic helper an admin credit
|
|
165
|
+
* uses. Refused (412) while live entries or a non-zero balance remain —
|
|
166
|
+
* reset first. Does not clear the free flag. Audited.
|
|
167
|
+
*
|
|
168
|
+
* Requires a router that serves the ledger admin routes; older ones answer
|
|
169
|
+
* `404`.
|
|
170
|
+
*
|
|
171
|
+
* @param merchantId - The merchant account ID.
|
|
172
|
+
* @param params - Opening balance (minor units), currency for a new profile, and the reason.
|
|
173
|
+
* @returns The opening entry id (if one was written) and the profile.
|
|
174
|
+
*/
|
|
175
|
+
async createLedger(merchantId, params) {
|
|
176
|
+
return this.request("POST", `/billing/${encodeURIComponent(merchantId)}/admin/ledger`, {
|
|
177
|
+
body: params
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
};
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
exports.PlatformBilling = PlatformBilling;
|
|
185
|
+
//# sourceMappingURL=chunk-BCA3TCGS.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/home/anes/delo-payment/_worktrees/ts-publish-w3/dist/chunk-BCA3TCGS.cjs","../src/internal/resources/platformBilling.ts"],"names":[],"mappings":"AAAA;ACuBO,IAAM,gBAAA,EAAN,MAAsB;AAAA,EAC3B,WAAA,CAA6B,OAAA,EAAoB;AAApB,IAAA,IAAA,CAAA,QAAA,EAAA,OAAA;AAAA,EAAqB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASlD,MAAM,MAAA,CACJ,UAAA,EACA,MAAA,EACkC;AAClC,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,MAAA,EAAQ,CAAA,SAAA,EAAY,kBAAA,CAAmB,UAAU,CAAC,CAAA,aAAA,CAAA,EAAiB;AAAA,MACrF,IAAA,EAAM;AAAA,IACR,CAAC,CAAA;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,MAAM,KAAA,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AegG,EAAA;AACR,IAAA;AAC9E,MAAA;AACP,IAAA;AACH,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAmBqC,EAAA;AACsD,IAAA;AACjF,MAAA;AACP,IAAA;AACH,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAoBsC,EAAA;AACmD,IAAA;AAC/E,MAAA;AACP,IAAA;AACH,EAAA;AACF;ADvD8F;AACA;AACA;AACA","file":"/home/anes/delo-payment/_worktrees/ts-publish-w3/dist/chunk-BCA3TCGS.cjs","sourcesContent":[null,"import type {\n AdminAdjustmentRequest,\n AdminAdjustmentResponse,\n AdminCreateLedgerRequest,\n AdminCreateLedgerResponse,\n AdminResetLedgerRequest,\n AdminResetLedgerResponse,\n AdminSetFreeRequest,\n AdminSetHardFloorRequest,\n AdminSuspendRequest,\n AdminUnsuspendRequest,\n AdminSetTrustedRequest,\n UpdateLedgerEntryRequest,\n} from '../types';\nimport type { BillingProfileResponse } from '../../types';\nimport type { RequestFn } from '../../client';\n\n/**\n * Platform-level ledger adjustments on a merchant's balance. Admin-only\n * routes under `/billing/{merchantId}/admin/credit|debit`. Exposed only\n * via `'@delopay/sdk/internal'` so the public merchant SDK doesn't\n * advertise the admin adjustment path in autocomplete.\n */\nexport class PlatformBilling {\n constructor(private readonly request: RequestFn) {}\n\n /**\n * Manually credit a merchant's balance (e.g. promotional credit,\n * dispute reversal, manual correction).\n *\n * @param merchantId - The merchant account ID.\n * @param params - Credit amount and reason.\n */\n async credit(\n merchantId: string,\n params: AdminAdjustmentRequest,\n ): Promise<AdminAdjustmentResponse> {\n return this.request('POST', `/billing/${encodeURIComponent(merchantId)}/admin/credit`, {\n body: params,\n });\n }\n\n /**\n * Manually debit a merchant's balance.\n *\n * @param merchantId - The merchant account ID.\n * @param params - Debit amount and reason.\n */\n async debit(\n merchantId: string,\n params: AdminAdjustmentRequest,\n ): Promise<AdminAdjustmentResponse> {\n return this.request('POST', `/billing/${encodeURIComponent(merchantId)}/admin/debit`, {\n body: params,\n });\n }\n\n /**\n * Edit a single ledger entry (amount and/or description), keeping the\n * merchant balance consistent: when `amount` changes, the balance is\n * atomically adjusted by the difference. Returns the entry id and new\n * balance.\n *\n * @param merchantId - The merchant account ID.\n * @param ledgerId - The ledger entry id to edit.\n * @param params - New amount / description (either optional).\n */\n async editLedgerEntry(\n merchantId: string,\n ledgerId: string,\n params: UpdateLedgerEntryRequest,\n ): Promise<AdminAdjustmentResponse> {\n return this.request(\n 'PATCH',\n `/billing/${encodeURIComponent(merchantId)}/admin/ledger/${encodeURIComponent(ledgerId)}`,\n { body: params },\n );\n }\n\n /**\n * Delete a single ledger entry, reversing its amount from the merchant\n * balance. Returns the deleted entry id and the new balance.\n *\n * @param merchantId - The merchant account ID.\n * @param ledgerId - The ledger entry id to delete.\n */\n async deleteLedgerEntry(merchantId: string, ledgerId: string): Promise<AdminAdjustmentResponse> {\n return this.request(\n 'DELETE',\n `/billing/${encodeURIComponent(merchantId)}/admin/ledger/${encodeURIComponent(ledgerId)}`,\n );\n }\n\n /**\n * Manually suspend a merchant (e.g. confirmed fraud or ToS violation),\n * independent of balance. A `reason` is required for audit. Throws 412 if\n * the merchant is trusted (clear the flag first) or already suspended.\n *\n * @param merchantId - The merchant account ID.\n * @param params - Suspension reason.\n * @returns The updated billing profile.\n */\n async suspend(merchantId: string, params: AdminSuspendRequest): Promise<BillingProfileResponse> {\n return this.request('POST', `/billing/${encodeURIComponent(merchantId)}/admin/suspend`, {\n body: params,\n });\n }\n\n /**\n * Lift a suspension. Restores the merchant to `active` (or `delinquent` if\n * the balance is at/below the hard floor) and resets the recharge-failure\n * counter. Throws 412 if the merchant is not suspended.\n *\n * @param merchantId - The merchant account ID.\n * @param params - Optional audit note.\n * @returns The updated billing profile.\n */\n async unsuspend(\n merchantId: string,\n params: AdminUnsuspendRequest = {},\n ): Promise<BillingProfileResponse> {\n return this.request('POST', `/billing/${encodeURIComponent(merchantId)}/admin/unsuspend`, {\n body: params,\n });\n }\n\n /**\n * Set or clear the trusted (suspension-exempt) flag. Trusted merchants\n * cannot be suspended automatically or manually. Does not lift an existing\n * suspension — use {@link PlatformBilling.unsuspend} for that.\n *\n * @param merchantId - The merchant account ID.\n * @param params - The desired trusted state.\n * @returns The updated billing profile.\n */\n async setTrusted(\n merchantId: string,\n params: AdminSetTrustedRequest,\n ): Promise<BillingProfileResponse> {\n return this.request('PATCH', `/billing/${encodeURIComponent(merchantId)}/admin/trusted`, {\n body: params,\n });\n }\n\n /**\n * Set the merchant's hard floor — the balance at or below which the\n * merchant stops being active. A negative value grants a credit line; zero\n * means no negative balance at all. This moves the suspension line, it does\n * not remove it. The value and the caller are written to the audit log\n * before the floor changes, so the change is always attributable.\n *\n * Refused (412) for a positive amount, for a floor beyond the maximum\n * credit line of 10,000,000 minor units, or for an empty `reason`.\n *\n * Requires a router that serves the hard-floor admin route; older ones\n * answer `404`.\n *\n * @param merchantId - The merchant account ID.\n * @param params - The new floor (zero or negative) and the audit reason.\n * @returns The updated billing profile.\n */\n async setHardFloor(\n merchantId: string,\n params: AdminSetHardFloorRequest,\n ): Promise<BillingProfileResponse> {\n return this.request('PATCH', `/billing/${encodeURIComponent(merchantId)}/admin/hard-floor`, {\n body: params,\n });\n }\n\n /**\n * Mark a merchant free (not billed), or put it back on the prepaid model.\n * While free, no platform fee is deducted, the payment gate never blocks on\n * billing status, top-ups are refused and auto-recharge is inert. Marking\n * free needs a `reason` and is refused (412) while an admin suspension is in\n * force — lift that first.\n *\n * Requires a router that supports the free flag; older ones answer `404`.\n *\n * @param merchantId - The merchant account ID.\n * @param params - The desired free state and, when marking free, the reason.\n * @returns The updated billing profile.\n */\n async setFree(merchantId: string, params: AdminSetFreeRequest): Promise<BillingProfileResponse> {\n return this.request('PATCH', `/billing/${encodeURIComponent(merchantId)}/admin/free`, {\n body: params,\n });\n }\n\n /**\n * Delete a merchant's **entire** ledger. Every live entry is soft-deleted —\n * kept, so a replayed fee deduction or top-up webhook still no-ops — the\n * balance is set to zero and the status re-derived (`active` for a free\n * merchant; an active paying merchant lands in `delinquent`). Refused (412)\n * while the merchant has shop allocations. Audited.\n *\n * Requires a router that serves the ledger admin routes; older ones answer\n * `404`.\n *\n * @param merchantId - The merchant account ID.\n * @param params - The reason, required for audit.\n * @returns What was removed and the post-reset profile.\n */\n async resetLedger(\n merchantId: string,\n params: AdminResetLedgerRequest,\n ): Promise<AdminResetLedgerResponse> {\n return this.request('DELETE', `/billing/${encodeURIComponent(merchantId)}/admin/ledger`, {\n body: params,\n });\n }\n\n /**\n * (Re)create a merchant's ledger, optionally seeded with an opening\n * balance. Ensures the billing profile exists (created without the welcome\n * promo credit) and, when `opening_balance` is set, writes one\n * `opening_balance` entry through the same atomic helper an admin credit\n * uses. Refused (412) while live entries or a non-zero balance remain —\n * reset first. Does not clear the free flag. Audited.\n *\n * Requires a router that serves the ledger admin routes; older ones answer\n * `404`.\n *\n * @param merchantId - The merchant account ID.\n * @param params - Opening balance (minor units), currency for a new profile, and the reason.\n * @returns The opening entry id (if one was written) and the profile.\n */\n async createLedger(\n merchantId: string,\n params: AdminCreateLedgerRequest,\n ): Promise<AdminCreateLedgerResponse> {\n return this.request('POST', `/billing/${encodeURIComponent(merchantId)}/admin/ledger`, {\n body: params,\n });\n }\n}\n"]}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
// src/resources/checkoutTemplates.ts
|
|
2
|
+
var CheckoutTemplates = class {
|
|
3
|
+
constructor(request) {
|
|
4
|
+
this.request = request;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* The merchant's templates, each with the shops on it and whether each
|
|
8
|
+
* runs the template's current settings.
|
|
9
|
+
* `GET /checkout-templates/{merchantId}`
|
|
10
|
+
*/
|
|
11
|
+
async list(merchantId) {
|
|
12
|
+
return this.request("GET", `/checkout-templates/${encodeURIComponent(merchantId)}`);
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Create a template, empty or copied from a shop's current settings. The
|
|
16
|
+
* shop copied from is not changed.
|
|
17
|
+
* `POST /checkout-templates/{merchantId}`
|
|
18
|
+
*/
|
|
19
|
+
async create(merchantId, params) {
|
|
20
|
+
return this.request("POST", `/checkout-templates/${encodeURIComponent(merchantId)}`, {
|
|
21
|
+
body: params
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
/** `GET /checkout-templates/{merchantId}/{templateId}` */
|
|
25
|
+
async retrieve(merchantId, templateId) {
|
|
26
|
+
return this.request(
|
|
27
|
+
"GET",
|
|
28
|
+
`/checkout-templates/${encodeURIComponent(merchantId)}/${encodeURIComponent(templateId)}`
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Rename a template. A name another template of the merchant holds is
|
|
33
|
+
* refused.
|
|
34
|
+
* `POST /checkout-templates/{merchantId}/{templateId}`
|
|
35
|
+
*/
|
|
36
|
+
async rename(merchantId, templateId, params) {
|
|
37
|
+
return this.request(
|
|
38
|
+
"POST",
|
|
39
|
+
`/checkout-templates/${encodeURIComponent(merchantId)}/${encodeURIComponent(templateId)}`,
|
|
40
|
+
{ body: params }
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Delete a template. Refused while a shop is on it.
|
|
45
|
+
* `DELETE /checkout-templates/{merchantId}/{templateId}`
|
|
46
|
+
*/
|
|
47
|
+
async delete(merchantId, templateId) {
|
|
48
|
+
return this.request(
|
|
49
|
+
"DELETE",
|
|
50
|
+
`/checkout-templates/${encodeURIComponent(merchantId)}/${encodeURIComponent(templateId)}`
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Put shops on the template and copy its settings into them; a shop on
|
|
55
|
+
* another template moves. Each shop is reported on its own: one with
|
|
56
|
+
* `blockers` is left unchanged. `dry_run` changes nothing and reports what
|
|
57
|
+
* would change.
|
|
58
|
+
* `POST /checkout-templates/{merchantId}/{templateId}/shops`
|
|
59
|
+
*/
|
|
60
|
+
async assign(merchantId, templateId, params) {
|
|
61
|
+
return this.request(
|
|
62
|
+
"POST",
|
|
63
|
+
`/checkout-templates/${encodeURIComponent(merchantId)}/${encodeURIComponent(templateId)}/shops`,
|
|
64
|
+
{
|
|
65
|
+
body: params
|
|
66
|
+
}
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Take a shop off the template. It keeps every setting it has, as its own.
|
|
71
|
+
* `DELETE /checkout-templates/{merchantId}/{templateId}/shops/{profileId}`
|
|
72
|
+
*/
|
|
73
|
+
async unassign(merchantId, templateId, profileId) {
|
|
74
|
+
return this.request(
|
|
75
|
+
"DELETE",
|
|
76
|
+
`/checkout-templates/${encodeURIComponent(merchantId)}/${encodeURIComponent(templateId)}/shops/${encodeURIComponent(profileId)}`
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Copy the template's current settings into its shops, all or the ones
|
|
81
|
+
* named.
|
|
82
|
+
* `POST /checkout-templates/{merchantId}/{templateId}/apply`
|
|
83
|
+
*/
|
|
84
|
+
async apply(merchantId, templateId, params = {}) {
|
|
85
|
+
return this.request(
|
|
86
|
+
"POST",
|
|
87
|
+
`/checkout-templates/${encodeURIComponent(merchantId)}/${encodeURIComponent(templateId)}/apply`,
|
|
88
|
+
{
|
|
89
|
+
body: params
|
|
90
|
+
}
|
|
91
|
+
);
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* The template a shop is on, if any. Readable by the shop's own members.
|
|
95
|
+
* `GET /checkout-templates/{merchantId}/shops/{profileId}`
|
|
96
|
+
*/
|
|
97
|
+
async ofShop(merchantId, profileId) {
|
|
98
|
+
return this.request(
|
|
99
|
+
"GET",
|
|
100
|
+
`/checkout-templates/${encodeURIComponent(merchantId)}/shops/${encodeURIComponent(profileId)}`
|
|
101
|
+
);
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
export {
|
|
106
|
+
CheckoutTemplates
|
|
107
|
+
};
|
|
108
|
+
//# sourceMappingURL=chunk-BEND2MZX.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/resources/checkoutTemplates.ts"],"sourcesContent":["import type {\n CheckoutTemplateApplyRequest,\n CheckoutTemplateApplyResponse,\n CheckoutTemplateAssignRequest,\n CheckoutTemplateCreateRequest,\n CheckoutTemplateListResponse,\n CheckoutTemplateOfShopResponse,\n CheckoutTemplateResponse,\n CheckoutTemplateUpdateRequest,\n} from '../types';\nimport type { RequestFn } from '../client';\n\n/**\n * Checkout templates: a shop's payment methods, behaviour and smart routing,\n * defined once for the merchant and used in many shops.\n *\n * A template is edited where a shop is: its own profile (`template_id`) has a\n * checkout layout, behaviour settings, routing configurations and connector\n * accounts, written with `checkoutMethods`, `shops.updateCheckoutBranding`,\n * `routing` and the connector shop methods. Its changes reach the shops on it\n * when `apply()` runs. While a shop is on a template, its own payment methods,\n * behaviour and routing cannot be changed; its appearance stays its own.\n *\n * Every method but `ofShop()` needs a merchant-level role that sees every\n * connector and payment; `create()`, `assign()` and `apply()` also need\n * routing and connector write.\n */\nexport class CheckoutTemplates {\n constructor(private readonly request: RequestFn) {}\n\n /**\n * The merchant's templates, each with the shops on it and whether each\n * runs the template's current settings.\n * `GET /checkout-templates/{merchantId}`\n */\n async list(merchantId: string): Promise<CheckoutTemplateListResponse> {\n return this.request('GET', `/checkout-templates/${encodeURIComponent(merchantId)}`);\n }\n\n /**\n * Create a template, empty or copied from a shop's current settings. The\n * shop copied from is not changed.\n * `POST /checkout-templates/{merchantId}`\n */\n async create(\n merchantId: string,\n params: CheckoutTemplateCreateRequest,\n ): Promise<CheckoutTemplateResponse> {\n return this.request('POST', `/checkout-templates/${encodeURIComponent(merchantId)}`, {\n body: params,\n });\n }\n\n /** `GET /checkout-templates/{merchantId}/{templateId}` */\n async retrieve(merchantId: string, templateId: string): Promise<CheckoutTemplateResponse> {\n return this.request(\n 'GET',\n `/checkout-templates/${encodeURIComponent(merchantId)}/${encodeURIComponent(templateId)}`,\n );\n }\n\n /**\n * Rename a template. A name another template of the merchant holds is\n * refused.\n * `POST /checkout-templates/{merchantId}/{templateId}`\n */\n async rename(\n merchantId: string,\n templateId: string,\n params: CheckoutTemplateUpdateRequest,\n ): Promise<CheckoutTemplateResponse> {\n return this.request(\n 'POST',\n `/checkout-templates/${encodeURIComponent(merchantId)}/${encodeURIComponent(templateId)}`,\n { body: params },\n );\n }\n\n /**\n * Delete a template. Refused while a shop is on it.\n * `DELETE /checkout-templates/{merchantId}/{templateId}`\n */\n async delete(merchantId: string, templateId: string): Promise<CheckoutTemplateResponse> {\n return this.request(\n 'DELETE',\n `/checkout-templates/${encodeURIComponent(merchantId)}/${encodeURIComponent(templateId)}`,\n );\n }\n\n /**\n * Put shops on the template and copy its settings into them; a shop on\n * another template moves. Each shop is reported on its own: one with\n * `blockers` is left unchanged. `dry_run` changes nothing and reports what\n * would change.\n * `POST /checkout-templates/{merchantId}/{templateId}/shops`\n */\n async assign(\n merchantId: string,\n templateId: string,\n params: CheckoutTemplateAssignRequest,\n ): Promise<CheckoutTemplateApplyResponse> {\n return this.request(\n 'POST',\n `/checkout-templates/${encodeURIComponent(merchantId)}/${encodeURIComponent(templateId)}/shops`,\n {\n body: params,\n },\n );\n }\n\n /**\n * Take a shop off the template. It keeps every setting it has, as its own.\n * `DELETE /checkout-templates/{merchantId}/{templateId}/shops/{profileId}`\n */\n async unassign(\n merchantId: string,\n templateId: string,\n profileId: string,\n ): Promise<CheckoutTemplateResponse> {\n return this.request(\n 'DELETE',\n `/checkout-templates/${encodeURIComponent(merchantId)}/${encodeURIComponent(templateId)}/shops/${encodeURIComponent(profileId)}`,\n );\n }\n\n /**\n * Copy the template's current settings into its shops, all or the ones\n * named.\n * `POST /checkout-templates/{merchantId}/{templateId}/apply`\n */\n async apply(\n merchantId: string,\n templateId: string,\n params: CheckoutTemplateApplyRequest = {},\n ): Promise<CheckoutTemplateApplyResponse> {\n return this.request(\n 'POST',\n `/checkout-templates/${encodeURIComponent(merchantId)}/${encodeURIComponent(templateId)}/apply`,\n {\n body: params,\n },\n );\n }\n\n /**\n * The template a shop is on, if any. Readable by the shop's own members.\n * `GET /checkout-templates/{merchantId}/shops/{profileId}`\n */\n async ofShop(merchantId: string, profileId: string): Promise<CheckoutTemplateOfShopResponse> {\n return this.request(\n 'GET',\n `/checkout-templates/${encodeURIComponent(merchantId)}/shops/${encodeURIComponent(profileId)}`,\n );\n }\n}\n"],"mappings":";AA2BO,IAAM,oBAAN,MAAwB;AAAA,EAC7B,YAA6B,SAAoB;AAApB;AAAA,EAAqB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOlD,MAAM,KAAK,YAA2D;AACpE,WAAO,KAAK,QAAQ,OAAO,uBAAuB,mBAAmB,UAAU,CAAC,EAAE;AAAA,EACpF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,MAAM,OACJ,YACA,QACmC;AACnC,WAAO,KAAK,QAAQ,QAAQ,uBAAuB,mBAAmB,UAAU,CAAC,IAAI;AAAA,MACnF,MAAM;AAAA,IACR,CAAC;AAAA,EACH;AAAA;AAAA,EAGA,MAAM,SAAS,YAAoB,YAAuD;AACxF,WAAO,KAAK;AAAA,MACV;AAAA,MACA,uBAAuB,mBAAmB,UAAU,CAAC,IAAI,mBAAmB,UAAU,CAAC;AAAA,IACzF;AAAA,EACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,MAAM,OACJ,YACA,YACA,QACmC;AACnC,WAAO,KAAK;AAAA,MACV;AAAA,MACA,uBAAuB,mBAAmB,UAAU,CAAC,IAAI,mBAAmB,UAAU,CAAC;AAAA,MACvF,EAAE,MAAM,OAAO;AAAA,IACjB;AAAA,EACF;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,MAAM,OAAO,YAAoB,YAAuD;AACtF,WAAO,KAAK;AAAA,MACV;AAAA,MACA,uBAAuB,mBAAmB,UAAU,CAAC,IAAI,mBAAmB,UAAU,CAAC;AAAA,IACzF;AAAA,EACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASA,MAAM,OACJ,YACA,YACA,QACwC;AACxC,WAAO,KAAK;AAAA,MACV;AAAA,MACA,uBAAuB,mBAAmB,UAAU,CAAC,IAAI,mBAAmB,UAAU,CAAC;AAAA,MACvF;AAAA,QACE,MAAM;AAAA,MACR;AAAA,IACF;AAAA,EACF;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,MAAM,SACJ,YACA,YACA,WACmC;AACnC,WAAO,KAAK;AAAA,MACV;AAAA,MACA,uBAAuB,mBAAmB,UAAU,CAAC,IAAI,mBAAmB,UAAU,CAAC,UAAU,mBAAmB,SAAS,CAAC;AAAA,IAChI;AAAA,EACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,MAAM,MACJ,YACA,YACA,SAAuC,CAAC,GACA;AACxC,WAAO,KAAK;AAAA,MACV;AAAA,MACA,uBAAuB,mBAAmB,UAAU,CAAC,IAAI,mBAAmB,UAAU,CAAC;AAAA,MACvF;AAAA,QACE,MAAM;AAAA,MACR;AAAA,IACF;AAAA,EACF;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,MAAM,OAAO,YAAoB,WAA4D;AAC3F,WAAO,KAAK;AAAA,MACV;AAAA,MACA,uBAAuB,mBAAmB,UAAU,CAAC,UAAU,mBAAmB,SAAS,CAAC;AAAA,IAC9F;AAAA,EACF;AACF;","names":[]}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
// src/recordCounter.ts
|
|
2
|
+
var LF = 10;
|
|
3
|
+
var CR = 13;
|
|
4
|
+
var QUOTE = 34;
|
|
5
|
+
var BACKSLASH = 92;
|
|
6
|
+
var OPEN_BRACE = 123;
|
|
7
|
+
var CLOSE_BRACE = 125;
|
|
8
|
+
var OPEN_BRACKET = 91;
|
|
9
|
+
var CLOSE_BRACKET = 93;
|
|
10
|
+
var CsvRecordCounter = class {
|
|
11
|
+
constructor() {
|
|
12
|
+
this.inQuotes = false;
|
|
13
|
+
this.newlines = 0;
|
|
14
|
+
/** Whether anything but a line break has arrived since the last newline. */
|
|
15
|
+
this.lineHasContent = false;
|
|
16
|
+
}
|
|
17
|
+
push(chunk) {
|
|
18
|
+
let inQuotes = this.inQuotes;
|
|
19
|
+
let newlines = this.newlines;
|
|
20
|
+
let lineHasContent = this.lineHasContent;
|
|
21
|
+
for (const byte of chunk) {
|
|
22
|
+
if (byte === QUOTE) {
|
|
23
|
+
inQuotes = !inQuotes;
|
|
24
|
+
lineHasContent = true;
|
|
25
|
+
} else if (inQuotes) {
|
|
26
|
+
lineHasContent = true;
|
|
27
|
+
} else if (byte === LF) {
|
|
28
|
+
newlines++;
|
|
29
|
+
lineHasContent = false;
|
|
30
|
+
} else if (byte !== CR) {
|
|
31
|
+
lineHasContent = true;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
this.inQuotes = inQuotes;
|
|
35
|
+
this.newlines = newlines;
|
|
36
|
+
this.lineHasContent = lineHasContent;
|
|
37
|
+
}
|
|
38
|
+
get records() {
|
|
39
|
+
return Math.max(0, this.newlines - 1);
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* The export writer ends every line — the header and each record — with a
|
|
43
|
+
* newline, so a whole body ends on one, outside quotes. RFC 4180 lets a
|
|
44
|
+
* final line break be omitted, but these bodies never omit it, and without
|
|
45
|
+
* that rule a file cut part-way through its last unquoted field
|
|
46
|
+
* (`pay_1,12` of `pay_1,123`) would count as one more whole record and
|
|
47
|
+
* match the figure it was announced with.
|
|
48
|
+
*/
|
|
49
|
+
get complete() {
|
|
50
|
+
return this.newlines >= 1 && !this.inQuotes && !this.lineHasContent;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* The records that ended. An unterminated tail is not one of them — see
|
|
54
|
+
* {@link complete}.
|
|
55
|
+
*/
|
|
56
|
+
finish() {
|
|
57
|
+
return this.records;
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
var SEEKING = 0;
|
|
61
|
+
var COUNTING = 1;
|
|
62
|
+
var CLOSED = 2;
|
|
63
|
+
var JsonArrayRecordCounter = class {
|
|
64
|
+
constructor() {
|
|
65
|
+
this.depth = 0;
|
|
66
|
+
this.inString = false;
|
|
67
|
+
this.escaped = false;
|
|
68
|
+
this.topIsObject = false;
|
|
69
|
+
this.state = SEEKING;
|
|
70
|
+
this.count = 0;
|
|
71
|
+
}
|
|
72
|
+
push(chunk) {
|
|
73
|
+
if (this.state === CLOSED) return;
|
|
74
|
+
let { depth, inString, escaped, topIsObject, count } = this;
|
|
75
|
+
let state = this.state;
|
|
76
|
+
for (const byte of chunk) {
|
|
77
|
+
if (inString) {
|
|
78
|
+
if (escaped) escaped = false;
|
|
79
|
+
else if (byte === BACKSLASH) escaped = true;
|
|
80
|
+
else if (byte === QUOTE) inString = false;
|
|
81
|
+
continue;
|
|
82
|
+
}
|
|
83
|
+
if (byte === QUOTE) {
|
|
84
|
+
inString = true;
|
|
85
|
+
} else if (byte === OPEN_BRACE || byte === OPEN_BRACKET) {
|
|
86
|
+
if (depth === 0 && byte === OPEN_BRACE) topIsObject = true;
|
|
87
|
+
if (byte === OPEN_BRACKET && depth === 1 && topIsObject && state === SEEKING) {
|
|
88
|
+
state = COUNTING;
|
|
89
|
+
}
|
|
90
|
+
depth++;
|
|
91
|
+
} else if (byte === CLOSE_BRACE || byte === CLOSE_BRACKET) {
|
|
92
|
+
depth--;
|
|
93
|
+
if (state === COUNTING) {
|
|
94
|
+
if (depth === 2) count++;
|
|
95
|
+
else if (depth === 1) {
|
|
96
|
+
state = CLOSED;
|
|
97
|
+
break;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
this.depth = depth;
|
|
103
|
+
this.inString = inString;
|
|
104
|
+
this.escaped = escaped;
|
|
105
|
+
this.topIsObject = topIsObject;
|
|
106
|
+
this.state = state;
|
|
107
|
+
this.count = count;
|
|
108
|
+
}
|
|
109
|
+
get records() {
|
|
110
|
+
return this.count;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Whether the rows array has closed. What follows it is checked by parsing
|
|
114
|
+
* the whole document, which a cut-off body fails.
|
|
115
|
+
*/
|
|
116
|
+
get complete() {
|
|
117
|
+
return this.state === CLOSED;
|
|
118
|
+
}
|
|
119
|
+
finish() {
|
|
120
|
+
return this.count;
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
export {
|
|
125
|
+
CsvRecordCounter,
|
|
126
|
+
JsonArrayRecordCounter
|
|
127
|
+
};
|
|
128
|
+
//# sourceMappingURL=chunk-BF7IX2O4.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/recordCounter.ts"],"sourcesContent":["/**\n * Incremental record counters for streamed export bodies.\n *\n * An export streams its body and announces, in `X-Delopay-Record-Count`, how\n * many records that body will hold. These count the records actually received,\n * chunk by chunk, so a download can show `receivedRecords` of\n * `expectedRecords` while it runs and the finished file can be held to the\n * announced figure.\n *\n * They work on **bytes**, never on decoded text. Every character they look at —\n * `\"` `\\` `{` `}` `[` `]` and the line break — is ASCII, and no byte of a\n * multi-byte UTF-8 sequence falls in the ASCII range, so a chunk boundary can\n * land anywhere, the middle of a character included, without a decoder having\n * to carry a partial sequence across it.\n */\n\nconst LF = 0x0a;\nconst CR = 0x0d;\nconst QUOTE = 0x22;\nconst BACKSLASH = 0x5c;\nconst OPEN_BRACE = 0x7b;\nconst CLOSE_BRACE = 0x7d;\nconst OPEN_BRACKET = 0x5b;\nconst CLOSE_BRACKET = 0x5d;\n\n/** Counts the records in a body fed to it one chunk at a time. */\nexport interface RecordCounter {\n /** Feed the next chunk of the body, in order. */\n push(chunk: Uint8Array): void;\n /** Records complete in what has been fed so far. */\n readonly records: number;\n /**\n * Whether what has been fed ends where a whole export body ends. A body\n * that stops anywhere else was cut off, whatever its record count says.\n */\n readonly complete: boolean;\n /** Records in the body, once it has ended. Does not change the counter. */\n finish(): number;\n}\n\n/**\n * RFC 4180 CSV with a header line: one record per line, where a field holding\n * `,` `\"` or a line break is quoted and a quote inside it is doubled.\n *\n * A newline inside quotes is part of a field, not the end of a record, so every\n * `\"` toggles \"inside quotes\". A doubled `\"\"` toggles twice and leaves it as it\n * was, which is exactly its meaning. Records are the newlines outside quotes,\n * less one for the header.\n */\nexport class CsvRecordCounter implements RecordCounter {\n private inQuotes = false;\n private newlines = 0;\n /** Whether anything but a line break has arrived since the last newline. */\n private lineHasContent = false;\n\n push(chunk: Uint8Array): void {\n let inQuotes = this.inQuotes;\n let newlines = this.newlines;\n let lineHasContent = this.lineHasContent;\n for (const byte of chunk) {\n if (byte === QUOTE) {\n inQuotes = !inQuotes;\n lineHasContent = true;\n } else if (inQuotes) {\n lineHasContent = true;\n } else if (byte === LF) {\n newlines++;\n lineHasContent = false;\n } else if (byte !== CR) {\n lineHasContent = true;\n }\n }\n this.inQuotes = inQuotes;\n this.newlines = newlines;\n this.lineHasContent = lineHasContent;\n }\n\n get records(): number {\n return Math.max(0, this.newlines - 1);\n }\n\n /**\n * The export writer ends every line — the header and each record — with a\n * newline, so a whole body ends on one, outside quotes. RFC 4180 lets a\n * final line break be omitted, but these bodies never omit it, and without\n * that rule a file cut part-way through its last unquoted field\n * (`pay_1,12` of `pay_1,123`) would count as one more whole record and\n * match the figure it was announced with.\n */\n get complete(): boolean {\n return this.newlines >= 1 && !this.inQuotes && !this.lineHasContent;\n }\n\n /**\n * The records that ended. An unterminated tail is not one of them — see\n * {@link complete}.\n */\n finish(): number {\n return this.records;\n }\n}\n\n/** Before the rows array, inside it, and past its end. */\nconst SEEKING = 0;\nconst COUNTING = 1;\nconst CLOSED = 2;\ntype ArrayState = typeof SEEKING | typeof COUNTING | typeof CLOSED;\n\n/**\n * A JSON object whose rows are an array member — `{\"records\":[…],…}` or\n * `{\"data\":[…],…}`.\n *\n * Counts the elements of the **first** array that is a direct member of the\n * top-level object: each one is counted as it closes back to that array's\n * depth, so a record is counted once it has fully arrived, never on its first\n * byte. Counting stops when that array closes, so an array later in the\n * envelope (inside the echoed `filters`, say) is never mistaken for rows.\n *\n * Strings are tracked with their escapes, so a `}` `]` or `\"` inside a value\n * is text, not structure. Elements are counted when an object or array closes;\n * a bare scalar element is not a record and is not counted.\n */\nexport class JsonArrayRecordCounter implements RecordCounter {\n private depth = 0;\n private inString = false;\n private escaped = false;\n private topIsObject = false;\n private state: ArrayState = SEEKING;\n private count = 0;\n\n push(chunk: Uint8Array): void {\n if (this.state === CLOSED) return;\n let { depth, inString, escaped, topIsObject, count } = this;\n let state: ArrayState = this.state;\n for (const byte of chunk) {\n if (inString) {\n if (escaped) escaped = false;\n else if (byte === BACKSLASH) escaped = true;\n else if (byte === QUOTE) inString = false;\n continue;\n }\n if (byte === QUOTE) {\n inString = true;\n } else if (byte === OPEN_BRACE || byte === OPEN_BRACKET) {\n if (depth === 0 && byte === OPEN_BRACE) topIsObject = true;\n if (byte === OPEN_BRACKET && depth === 1 && topIsObject && state === SEEKING) {\n state = COUNTING;\n }\n depth++;\n } else if (byte === CLOSE_BRACE || byte === CLOSE_BRACKET) {\n depth--;\n if (state === COUNTING) {\n // Depth 2 is the rows array's own level: a value closing back to it\n // is one complete row. Closing to depth 1 is the array itself ending.\n if (depth === 2) count++;\n else if (depth === 1) {\n state = CLOSED;\n break;\n }\n }\n }\n }\n this.depth = depth;\n this.inString = inString;\n this.escaped = escaped;\n this.topIsObject = topIsObject;\n this.state = state;\n this.count = count;\n }\n\n get records(): number {\n return this.count;\n }\n\n /**\n * Whether the rows array has closed. What follows it is checked by parsing\n * the whole document, which a cut-off body fails.\n */\n get complete(): boolean {\n return this.state === CLOSED;\n }\n\n finish(): number {\n return this.count;\n }\n}\n"],"mappings":";AAgBA,IAAM,KAAK;AACX,IAAM,KAAK;AACX,IAAM,QAAQ;AACd,IAAM,Y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MAAM,IAAI;AACvD,QAAI,QAAoB,KAAK;AAC7B,eAAW,QAAQ,OAAO;AACxB,UAAI,UAAU;AACZ,YAAI,QAAS,WAAU;AAAA,iBACd,SAAS,UAAW,WAAU;AAAA,iBAC9B,SAAS,MAAO,YAAW;AACpC;AAAA,MACF;AACA,UAAI,SAAS,OAAO;AAClB,mBAAW;AAAA,MACb,WAAW,SAAS,cAAc,SAAS,cAAc;AACvD,YAAI,UAAU,KAAK,SAAS,WAAY,eAAc;AACtD,YAAI,SAAS,gBAAgB,UAAU,KAAK,eAAe,UAAU,SAAS;AAC5E,kBAAQ;AAAA,QACV;AACA;AAAA,MACF,WAAW,SAAS,eAAe,SAAS,eAAe;AACzD;AACA,YAAI,UAAU,UAAU;AAGtB,cAAI,UAAU,EAAG;AAAA,mBACR,UAAU,GAAG;AACpB,oBAAQ;AACR;AAAA,UACF;AAAA,QACF;AAAA,MACF;AAAA,IACF;AACA,SAAK,QAAQ;AACb,SAAK,WAAW;AAChB,SAAK,UAAU;AACf,SAAK,cAAc;AACnB,SAAK,QAAQ;AACb,SAAK,QAAQ;AAAA,EACf;AAAA,EAEA,IAAI,UAAkB;AACpB,WAAO,KAAK;AAAA,EACd;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,IAAI,WAAoB;AACtB,WAAO,KAAK,UAAU;AAAA,EACxB;AAAA,EAEA,SAAiB;AACf,WAAO,KAAK;AAAA,EACd;AACF;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";//# sourceMappingURL=chunk-BOU2TQ6U.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/home/anes/delo-payment/_worktrees/ts-publish-w3/dist/chunk-BOU2TQ6U.cjs"],"names":[],"mappings":"AAAA","file":"/home/anes/delo-payment/_worktrees/ts-publish-w3/dist/chunk-BOU2TQ6U.cjs"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});// src/resources/settings.ts
|
|
2
|
+
function projectQuery(query) {
|
|
3
|
+
return query.project_id ? { project_id: query.project_id } : {};
|
|
4
|
+
}
|
|
5
|
+
var Settings = class {
|
|
6
|
+
constructor(request) {
|
|
7
|
+
this.request = request;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* The merchant's settings, or one project's.
|
|
11
|
+
*
|
|
12
|
+
* `GET /settings/merchant`
|
|
13
|
+
*/
|
|
14
|
+
async retrieveMerchant(query = {}) {
|
|
15
|
+
return this.request("GET", "/settings/merchant", { query: projectQuery(query) });
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Change the merchant's own settings, or one project's. All changes are
|
|
19
|
+
* applied or none is.
|
|
20
|
+
*
|
|
21
|
+
* `PATCH /settings/merchant`
|
|
22
|
+
*/
|
|
23
|
+
async updateMerchant(params, query = {}) {
|
|
24
|
+
return this.request("PATCH", "/settings/merchant", {
|
|
25
|
+
body: params,
|
|
26
|
+
query: projectQuery(query)
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* One shop's settings.
|
|
31
|
+
*
|
|
32
|
+
* `GET /settings/shops/{profileId}`
|
|
33
|
+
*/
|
|
34
|
+
async retrieveShop(profileId) {
|
|
35
|
+
return this.request("GET", `/settings/shops/${encodeURIComponent(profileId)}`);
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Change one shop's own settings.
|
|
39
|
+
*
|
|
40
|
+
* `PATCH /settings/shops/{profileId}`
|
|
41
|
+
*/
|
|
42
|
+
async updateShop(profileId, params) {
|
|
43
|
+
return this.request("PATCH", `/settings/shops/${encodeURIComponent(profileId)}`, {
|
|
44
|
+
body: params
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
exports.Settings = Settings;
|
|
52
|
+
//# sourceMappingURL=chunk-BP6KDQ6I.cjs.map
|