@delopay/sdk 0.451.0 → 0.456.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/dist/airwallexCard.cjs.map +1 -1
- package/dist/branding.cjs.map +1 -1
- package/dist/branding.d.cts +1 -0
- package/dist/branding.d.ts +1 -0
- package/dist/cardFormStyles.cjs.map +1 -1
- package/dist/checkoutSession.cjs +2 -2
- package/dist/checkoutSession.cjs.map +1 -1
- package/dist/checkoutSession.d.cts +1 -0
- package/dist/checkoutSession.d.ts +1 -0
- package/dist/checkoutSession.js +1 -1
- package/dist/{chunk-WYR27JGG.js → chunk-222YMG36.js} +31 -2
- package/dist/chunk-222YMG36.js.map +1 -0
- package/dist/chunk-244VZFFO.cjs.map +1 -1
- package/dist/chunk-2IJRBJXW.cjs.map +1 -1
- package/dist/chunk-34PC72O7.cjs.map +1 -1
- package/dist/{chunk-EBA6DJKI.js → chunk-3CR7RX65.js} +2 -2
- package/dist/chunk-3GBWQWTP.cjs.map +1 -1
- package/dist/chunk-3YBBJT3Y.cjs.map +1 -1
- package/dist/chunk-44QBWVRS.cjs.map +1 -1
- package/dist/chunk-4EKAWNYI.cjs.map +1 -1
- package/dist/chunk-4LN4BR2T.cjs.map +1 -1
- package/dist/chunk-4T4XHPYN.cjs.map +1 -1
- package/dist/{chunk-BY3BENXH.js → chunk-57S5IX5S.js} +17 -1
- package/dist/chunk-57S5IX5S.js.map +1 -0
- package/dist/chunk-5CITBN33.cjs.map +1 -1
- package/dist/chunk-5HCKC4HF.cjs.map +1 -1
- package/dist/chunk-5O2JSQYA.cjs.map +1 -1
- package/dist/chunk-6EBY2KKL.cjs.map +1 -1
- package/dist/chunk-6LFOM6HV.cjs.map +1 -1
- package/dist/chunk-6LOWE2YI.cjs.map +1 -1
- package/dist/chunk-6LSG5Z4T.cjs.map +1 -1
- package/dist/chunk-6SU2MTN2.cjs.map +1 -1
- package/dist/chunk-6YCDLSIU.cjs.map +1 -1
- package/dist/chunk-75E5WNJG.cjs.map +1 -1
- package/dist/{chunk-OKFOU6F7.cjs → chunk-7JBRZUZX.cjs} +5 -5
- package/dist/chunk-7JBRZUZX.cjs.map +1 -0
- package/dist/chunk-7JV6VVO7.cjs.map +1 -1
- package/dist/{chunk-KT2WXUWG.cjs → chunk-7QYHQL3L.cjs} +17 -1
- package/dist/chunk-7QYHQL3L.cjs.map +1 -0
- package/dist/chunk-7QZCUXWB.cjs.map +1 -1
- package/dist/chunk-7VXF5D67.cjs.map +1 -1
- package/dist/chunk-ABWAYMN5.cjs.map +1 -1
- package/dist/chunk-ACZ2R47X.cjs.map +1 -1
- package/dist/chunk-AVR2GPXU.cjs.map +1 -1
- package/dist/chunk-AYUYJO3I.cjs.map +1 -1
- package/dist/{chunk-OOC7ZT4T.js → chunk-BA6BTB56.js} +3 -3
- package/dist/chunk-BCA3TCGS.cjs.map +1 -1
- package/dist/chunk-BP6KDQ6I.cjs.map +1 -1
- package/dist/chunk-BRY3W7N3.cjs.map +1 -1
- package/dist/chunk-CAMALM35.cjs.map +1 -1
- package/dist/chunk-CCN44NZJ.cjs.map +1 -1
- package/dist/chunk-CKKNFFKP.cjs.map +1 -1
- package/dist/chunk-CR3JBTP3.cjs.map +1 -1
- package/dist/chunk-DJASVBOJ.cjs.map +1 -1
- package/dist/chunk-EEB2HDYL.cjs.map +1 -1
- package/dist/chunk-ENPSUWTS.cjs.map +1 -1
- package/dist/chunk-EQ6P6ZND.cjs.map +1 -1
- package/dist/chunk-EXPWQBI3.cjs.map +1 -1
- package/dist/chunk-F3I5DOWV.cjs.map +1 -1
- package/dist/chunk-F46K5H3U.cjs.map +1 -1
- package/dist/chunk-F6S3WCCB.cjs.map +1 -1
- package/dist/chunk-FG7YBXJQ.cjs.map +1 -1
- package/dist/chunk-FQRC4NJG.cjs.map +1 -1
- package/dist/chunk-FYISDU2Y.cjs.map +1 -1
- package/dist/chunk-GG52SAHA.cjs.map +1 -1
- package/dist/chunk-GK5FWN4H.cjs.map +1 -1
- package/dist/chunk-GSQN5EOO.cjs.map +1 -1
- package/dist/chunk-GW7IHYXR.cjs.map +1 -1
- package/dist/chunk-HLHML5ES.cjs.map +1 -1
- package/dist/chunk-HLKFUOAQ.cjs.map +1 -1
- package/dist/chunk-HLYGHP6F.cjs.map +1 -1
- package/dist/chunk-HSJABE7X.cjs.map +1 -1
- package/dist/chunk-I2W7AO4B.cjs.map +1 -1
- package/dist/chunk-I2XGNALG.cjs.map +1 -1
- package/dist/chunk-IKXGA2Z5.cjs.map +1 -1
- package/dist/chunk-IR2LFKKA.cjs.map +1 -1
- package/dist/chunk-J4ZB7MU4.cjs.map +1 -1
- package/dist/chunk-JPRSNCYP.cjs.map +1 -1
- package/dist/chunk-K5Q2H3VD.cjs.map +1 -1
- package/dist/chunk-KD5Y2YWK.cjs.map +1 -1
- package/dist/chunk-KJDMNF2T.cjs.map +1 -1
- package/dist/chunk-KLONGJCL.cjs.map +1 -1
- package/dist/chunk-KOB6MOAV.cjs.map +1 -1
- package/dist/chunk-KSJ7JLR3.cjs.map +1 -1
- package/dist/chunk-LJ2EG6JK.cjs.map +1 -1
- package/dist/chunk-LLYY4TCZ.cjs.map +1 -1
- package/dist/chunk-LYIBTVK6.cjs.map +1 -1
- package/dist/chunk-M3HWE7KT.cjs.map +1 -1
- package/dist/chunk-M3SJHFT4.cjs.map +1 -1
- package/dist/chunk-MCNDMK7F.cjs.map +1 -1
- package/dist/chunk-MLG6NXI6.cjs.map +1 -1
- package/dist/chunk-NFB3S2E6.cjs.map +1 -1
- package/dist/chunk-NKDUQ2BI.cjs.map +1 -1
- package/dist/chunk-NYL3BNHR.cjs.map +1 -1
- package/dist/chunk-O4AYHLQX.cjs.map +1 -1
- package/dist/chunk-OAEKP665.cjs.map +1 -1
- package/dist/chunk-ODPNVNYE.cjs.map +1 -1
- package/dist/chunk-OG2KJAYD.cjs.map +1 -1
- package/dist/chunk-OWP7XBY2.cjs.map +1 -1
- package/dist/chunk-OYZP6NF6.cjs.map +1 -1
- package/dist/{chunk-WCAIY7DR.cjs → chunk-P4UILJVU.cjs} +12 -1
- package/dist/chunk-P4UILJVU.cjs.map +1 -0
- package/dist/chunk-P6JLNQ6L.cjs.map +1 -1
- package/dist/chunk-P7DYLUUI.cjs.map +1 -1
- package/dist/chunk-PKAE6AQT.cjs.map +1 -1
- package/dist/chunk-Q7M7DO7M.cjs.map +1 -1
- package/dist/chunk-QKUWFMZP.cjs.map +1 -1
- package/dist/chunk-QRSA72B3.cjs.map +1 -1
- package/dist/{chunk-R46A6AGY.cjs → chunk-QTS4QGW4.cjs} +3 -3
- package/dist/chunk-QTS4QGW4.cjs.map +1 -0
- package/dist/chunk-QYNRNDIY.cjs.map +1 -1
- package/dist/chunk-R4FE6K43.cjs.map +1 -1
- package/dist/chunk-R4GA6BVP.cjs.map +1 -1
- package/dist/chunk-R5VYSZ3Q.cjs.map +1 -1
- package/dist/chunk-RHFUXHQN.cjs.map +1 -1
- package/dist/chunk-RI42IDRR.cjs.map +1 -1
- package/dist/chunk-RSVLVW4L.cjs.map +1 -1
- package/dist/chunk-S77LQWYC.cjs.map +1 -1
- package/dist/chunk-S7SBNOGS.cjs.map +1 -1
- package/dist/{chunk-Z5MEER63.js → chunk-T6INFOU2.js} +12 -1
- package/dist/chunk-T6INFOU2.js.map +1 -0
- package/dist/chunk-TMAJE5P2.cjs.map +1 -1
- package/dist/chunk-TNIJ6OSH.cjs.map +1 -1
- package/dist/chunk-U3JK7NBG.cjs.map +1 -1
- package/dist/chunk-UGSM7RJ2.cjs.map +1 -1
- package/dist/chunk-UKLZAOLW.cjs.map +1 -1
- package/dist/chunk-V47G7P6L.cjs.map +1 -1
- package/dist/chunk-VH5A6SMU.cjs.map +1 -1
- package/dist/chunk-VHMH4QMY.cjs.map +1 -1
- package/dist/chunk-VYC7WUM5.cjs.map +1 -1
- package/dist/{chunk-KZHLKMVX.cjs → chunk-W3MSASG4.cjs} +32 -3
- package/dist/chunk-W3MSASG4.cjs.map +1 -0
- package/dist/chunk-W457XUA6.cjs.map +1 -1
- package/dist/chunk-WHDI3TMP.cjs.map +1 -1
- package/dist/chunk-WITCPKNL.cjs.map +1 -1
- package/dist/chunk-WX6NP7UU.cjs.map +1 -1
- package/dist/chunk-XQLRIBVR.cjs.map +1 -1
- package/dist/chunk-Y7LSSRNJ.cjs.map +1 -1
- package/dist/chunk-YK3P5QNZ.cjs.map +1 -1
- package/dist/chunk-ZKPVUCQV.cjs.map +1 -1
- package/dist/chunk-ZUULK36E.cjs.map +1 -1
- package/dist/client.cjs +2 -2
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.cts +1 -0
- package/dist/client.d.ts +1 -0
- package/dist/client.js +1 -1
- package/dist/core.cjs.map +1 -1
- package/dist/core.d.cts +1 -0
- package/dist/core.d.ts +1 -0
- package/dist/currencies.cjs.map +1 -1
- package/dist/enigmaCardForm.cjs.map +1 -1
- package/dist/error.cjs.map +1 -1
- package/dist/eventStream.cjs.map +1 -1
- package/dist/exportDownload.cjs.map +1 -1
- package/dist/exportDownload.d.cts +1 -0
- package/dist/exportDownload.d.ts +1 -0
- package/dist/feeProgram.cjs.map +1 -1
- package/dist/feeProgram.d.cts +1 -0
- package/dist/feeProgram.d.ts +1 -0
- package/dist/index.cjs +5 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4 -4
- package/dist/internal/resources/admin.cjs.map +1 -1
- package/dist/internal/resources/admin.d.cts +1 -0
- package/dist/internal/resources/admin.d.ts +1 -0
- package/dist/internal/resources/adminBranding.cjs.map +1 -1
- package/dist/internal/resources/adminBranding.d.cts +1 -0
- package/dist/internal/resources/adminBranding.d.ts +1 -0
- package/dist/internal/resources/adminCheckoutDomains.cjs.map +1 -1
- package/dist/internal/resources/adminCheckoutDomains.d.cts +1 -0
- package/dist/internal/resources/adminCheckoutDomains.d.ts +1 -0
- package/dist/internal/resources/adminFeePlans.cjs.map +1 -1
- package/dist/internal/resources/adminFeePlans.d.cts +1 -0
- package/dist/internal/resources/adminFeePlans.d.ts +1 -0
- package/dist/internal/resources/adminFileScans.cjs.map +1 -1
- package/dist/internal/resources/adminFileScans.d.cts +1 -0
- package/dist/internal/resources/adminFileScans.d.ts +1 -0
- package/dist/internal/resources/adminIndustries.cjs.map +1 -1
- package/dist/internal/resources/adminIndustries.d.cts +1 -0
- package/dist/internal/resources/adminIndustries.d.ts +1 -0
- package/dist/internal/resources/adminLive.cjs.map +1 -1
- package/dist/internal/resources/adminLive.d.cts +1 -0
- package/dist/internal/resources/adminLive.d.ts +1 -0
- package/dist/internal/resources/adminNotices.cjs.map +1 -1
- package/dist/internal/resources/adminNotices.d.cts +1 -0
- package/dist/internal/resources/adminNotices.d.ts +1 -0
- package/dist/internal/resources/adminPortal.cjs +2 -2
- package/dist/internal/resources/adminPortal.cjs.map +1 -1
- package/dist/internal/resources/adminPortal.d.cts +19 -1
- package/dist/internal/resources/adminPortal.d.ts +19 -1
- package/dist/internal/resources/adminPortal.js +1 -1
- package/dist/internal/resources/adminSupport.cjs.map +1 -1
- package/dist/internal/resources/adminSupport.d.cts +1 -0
- package/dist/internal/resources/adminSupport.d.ts +1 -0
- package/dist/internal/resources/auditLogs.cjs.map +1 -1
- package/dist/internal/resources/auditLogs.d.cts +1 -0
- package/dist/internal/resources/auditLogs.d.ts +1 -0
- package/dist/internal/resources/cache.cjs.map +1 -1
- package/dist/internal/resources/cache.d.cts +1 -0
- package/dist/internal/resources/cache.d.ts +1 -0
- package/dist/internal/resources/cardIssuers.cjs.map +1 -1
- package/dist/internal/resources/cardIssuers.d.cts +1 -0
- package/dist/internal/resources/cardIssuers.d.ts +1 -0
- package/dist/internal/resources/configs.cjs.map +1 -1
- package/dist/internal/resources/configs.d.cts +1 -0
- package/dist/internal/resources/configs.d.ts +1 -0
- package/dist/internal/resources/connectorRestrictionRules.cjs.map +1 -1
- package/dist/internal/resources/connectorRestrictionRules.d.cts +1 -0
- package/dist/internal/resources/connectorRestrictionRules.d.ts +1 -0
- package/dist/internal/resources/connectorRestrictions.cjs.map +1 -1
- package/dist/internal/resources/connectorRestrictions.d.cts +1 -0
- package/dist/internal/resources/connectorRestrictions.d.ts +1 -0
- package/dist/internal/resources/diagnostic.cjs.map +1 -1
- package/dist/internal/resources/diagnostic.d.cts +1 -0
- package/dist/internal/resources/diagnostic.d.ts +1 -0
- package/dist/internal/resources/gsm.cjs.map +1 -1
- package/dist/internal/resources/gsm.d.cts +1 -0
- package/dist/internal/resources/gsm.d.ts +1 -0
- package/dist/internal/resources/nativeRenewals.cjs.map +1 -1
- package/dist/internal/resources/nativeRenewals.d.cts +1 -0
- package/dist/internal/resources/nativeRenewals.d.ts +1 -0
- package/dist/internal/resources/platformBilling.cjs.map +1 -1
- package/dist/internal/resources/platformBilling.d.cts +1 -0
- package/dist/internal/resources/platformBilling.d.ts +1 -0
- package/dist/internal/resources/platformFees.cjs.map +1 -1
- package/dist/internal/resources/platformFees.d.cts +1 -0
- package/dist/internal/resources/platformFees.d.ts +1 -0
- package/dist/internal/resources/platformMessageTemplates.cjs.map +1 -1
- package/dist/internal/resources/platformMessageTemplates.d.cts +1 -0
- package/dist/internal/resources/platformMessageTemplates.d.ts +1 -0
- package/dist/internal/resources/platformSettings.cjs.map +1 -1
- package/dist/internal/resources/platformSettings.d.cts +1 -0
- package/dist/internal/resources/platformSettings.d.ts +1 -0
- package/dist/internal.cjs +8 -8
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +1 -1
- package/dist/internal.d.ts +1 -1
- package/dist/internal.js +5 -5
- package/dist/listQuery.cjs.map +1 -1
- package/dist/listQuery.d.cts +1 -0
- package/dist/listQuery.d.ts +1 -0
- package/dist/panes.cjs.map +1 -1
- package/dist/panes.d.cts +1 -0
- package/dist/panes.d.ts +1 -0
- package/dist/paymentPresentation.cjs.map +1 -1
- package/dist/paymentPresentation.d.cts +1 -0
- package/dist/paymentPresentation.d.ts +1 -0
- package/dist/recordCounter.cjs.map +1 -1
- package/dist/resources/aiTools.cjs.map +1 -1
- package/dist/resources/aiTools.d.cts +1 -0
- package/dist/resources/aiTools.d.ts +1 -0
- package/dist/resources/analytics.cjs.map +1 -1
- package/dist/resources/analytics.d.cts +1 -0
- package/dist/resources/analytics.d.ts +1 -0
- package/dist/resources/analyticsDashboard.cjs.map +1 -1
- package/dist/resources/analyticsDashboard.d.cts +1 -0
- package/dist/resources/analyticsDashboard.d.ts +1 -0
- package/dist/resources/apiKeys.cjs.map +1 -1
- package/dist/resources/apiKeys.d.cts +1 -0
- package/dist/resources/apiKeys.d.ts +1 -0
- package/dist/resources/audit.cjs.map +1 -1
- package/dist/resources/audit.d.cts +1 -0
- package/dist/resources/audit.d.ts +1 -0
- package/dist/resources/authentication.cjs.map +1 -1
- package/dist/resources/authentication.d.cts +1 -0
- package/dist/resources/authentication.d.ts +1 -0
- package/dist/resources/availabilityOverrides.cjs.map +1 -1
- package/dist/resources/availabilityOverrides.d.cts +1 -0
- package/dist/resources/availabilityOverrides.d.ts +1 -0
- package/dist/resources/billing.cjs.map +1 -1
- package/dist/resources/billing.d.cts +1 -0
- package/dist/resources/billing.d.ts +1 -0
- package/dist/resources/buyerAccount.cjs.map +1 -1
- package/dist/resources/buyerAccount.d.cts +1 -0
- package/dist/resources/buyerAccount.d.ts +1 -0
- package/dist/resources/buyerBlocklist.cjs.map +1 -1
- package/dist/resources/buyerBlocklist.d.cts +1 -0
- package/dist/resources/buyerBlocklist.d.ts +1 -0
- package/dist/resources/buyerConversations.cjs.map +1 -1
- package/dist/resources/buyerConversations.d.cts +1 -0
- package/dist/resources/buyerConversations.d.ts +1 -0
- package/dist/resources/buyerEvidenceReviews.cjs.map +1 -1
- package/dist/resources/buyerEvidenceReviews.d.cts +1 -0
- package/dist/resources/buyerEvidenceReviews.d.ts +1 -0
- package/dist/resources/buyerPortal.cjs.map +1 -1
- package/dist/resources/buyerPortal.d.cts +1 -0
- package/dist/resources/buyerPortal.d.ts +1 -0
- package/dist/resources/cards.cjs.map +1 -1
- package/dist/resources/cards.d.cts +1 -0
- package/dist/resources/cards.d.ts +1 -0
- package/dist/resources/chargebackPrevention.cjs.map +1 -1
- package/dist/resources/chargebackPrevention.d.cts +1 -0
- package/dist/resources/chargebackPrevention.d.ts +1 -0
- package/dist/resources/checkoutDomains.cjs.map +1 -1
- package/dist/resources/checkoutDomains.d.cts +1 -0
- package/dist/resources/checkoutDomains.d.ts +1 -0
- package/dist/resources/checkoutMethods.cjs.map +1 -1
- package/dist/resources/checkoutMethods.d.cts +1 -0
- package/dist/resources/checkoutMethods.d.ts +1 -0
- package/dist/resources/checkoutRecovery.cjs.map +1 -1
- package/dist/resources/checkoutRecovery.d.cts +1 -0
- package/dist/resources/checkoutRecovery.d.ts +1 -0
- package/dist/resources/checkoutTemplates.cjs.map +1 -1
- package/dist/resources/checkoutTemplates.d.cts +1 -0
- package/dist/resources/checkoutTemplates.d.ts +1 -0
- package/dist/resources/connectors.cjs.map +1 -1
- package/dist/resources/connectors.d.cts +1 -0
- package/dist/resources/connectors.d.ts +1 -0
- package/dist/resources/contentEncryption.cjs.map +1 -1
- package/dist/resources/contentEncryption.d.cts +1 -0
- package/dist/resources/contentEncryption.d.ts +1 -0
- package/dist/resources/costRules.cjs.map +1 -1
- package/dist/resources/costRules.d.cts +1 -0
- package/dist/resources/costRules.d.ts +1 -0
- package/dist/resources/customers.cjs.map +1 -1
- package/dist/resources/customers.d.cts +1 -0
- package/dist/resources/customers.d.ts +1 -0
- package/dist/resources/deploymentBranding.cjs.map +1 -1
- package/dist/resources/deploymentBranding.d.cts +1 -0
- package/dist/resources/deploymentBranding.d.ts +1 -0
- package/dist/resources/disputes.cjs.map +1 -1
- package/dist/resources/disputes.d.cts +1 -0
- package/dist/resources/disputes.d.ts +1 -0
- package/dist/resources/ephemeralKeys.cjs.map +1 -1
- package/dist/resources/ephemeralKeys.d.cts +1 -0
- package/dist/resources/ephemeralKeys.d.ts +1 -0
- package/dist/resources/events.cjs.map +1 -1
- package/dist/resources/events.d.cts +1 -0
- package/dist/resources/events.d.ts +1 -0
- package/dist/resources/export.cjs.map +1 -1
- package/dist/resources/export.d.cts +1 -0
- package/dist/resources/export.d.ts +1 -0
- package/dist/resources/externalRecords.cjs.map +1 -1
- package/dist/resources/externalRecords.d.cts +1 -0
- package/dist/resources/externalRecords.d.ts +1 -0
- package/dist/resources/featureMatrix.cjs.map +1 -1
- package/dist/resources/featureMatrix.d.cts +1 -0
- package/dist/resources/featureMatrix.d.ts +1 -0
- package/dist/resources/fees.cjs.map +1 -1
- package/dist/resources/fees.d.cts +1 -0
- package/dist/resources/fees.d.ts +1 -0
- package/dist/resources/files.cjs.map +1 -1
- package/dist/resources/files.d.cts +1 -0
- package/dist/resources/files.d.ts +1 -0
- package/dist/resources/forex.cjs.map +1 -1
- package/dist/resources/forex.d.cts +1 -0
- package/dist/resources/forex.d.ts +1 -0
- package/dist/resources/identityVerifications.cjs.map +1 -1
- package/dist/resources/identityVerifications.d.cts +1 -0
- package/dist/resources/identityVerifications.d.ts +1 -0
- package/dist/resources/industries.cjs.map +1 -1
- package/dist/resources/industries.d.cts +1 -0
- package/dist/resources/industries.d.ts +1 -0
- package/dist/resources/invoiceSettings.cjs.map +1 -1
- package/dist/resources/invoiceSettings.d.cts +1 -0
- package/dist/resources/invoiceSettings.d.ts +1 -0
- package/dist/resources/invoices.cjs.map +1 -1
- package/dist/resources/invoices.d.cts +1 -0
- package/dist/resources/invoices.d.ts +1 -0
- package/dist/resources/live.cjs.map +1 -1
- package/dist/resources/live.d.cts +1 -0
- package/dist/resources/live.d.ts +1 -0
- package/dist/resources/mandates.cjs.map +1 -1
- package/dist/resources/mandates.d.cts +1 -0
- package/dist/resources/mandates.d.ts +1 -0
- package/dist/resources/merchantAccounts.cjs.map +1 -1
- package/dist/resources/merchantAccounts.d.cts +1 -0
- package/dist/resources/merchantAccounts.d.ts +1 -0
- package/dist/resources/messageTemplates.cjs.map +1 -1
- package/dist/resources/messageTemplates.d.cts +1 -0
- package/dist/resources/messageTemplates.d.ts +1 -0
- package/dist/resources/notices.cjs.map +1 -1
- package/dist/resources/notices.d.cts +1 -0
- package/dist/resources/notices.d.ts +1 -0
- package/dist/resources/operationLimits.cjs.map +1 -1
- package/dist/resources/operationLimits.d.cts +1 -0
- package/dist/resources/operationLimits.d.ts +1 -0
- package/dist/resources/paymentLinks.cjs.map +1 -1
- package/dist/resources/paymentLinks.d.cts +1 -0
- package/dist/resources/paymentLinks.d.ts +1 -0
- package/dist/resources/paymentMethods.cjs.map +1 -1
- package/dist/resources/paymentMethods.d.cts +1 -0
- package/dist/resources/paymentMethods.d.ts +1 -0
- package/dist/resources/payments.cjs.map +1 -1
- package/dist/resources/payments.d.cts +1 -0
- package/dist/resources/payments.d.ts +1 -0
- package/dist/resources/payoutDestinations.cjs +2 -2
- package/dist/resources/payoutDestinations.cjs.map +1 -1
- package/dist/resources/payoutDestinations.d.cts +9 -1
- package/dist/resources/payoutDestinations.d.ts +9 -1
- package/dist/resources/payoutDestinations.js +1 -1
- package/dist/resources/payouts.cjs.map +1 -1
- package/dist/resources/payouts.d.cts +1 -0
- package/dist/resources/payouts.d.ts +1 -0
- package/dist/resources/paypalDisputes.cjs.map +1 -1
- package/dist/resources/paypalDisputes.d.cts +1 -0
- package/dist/resources/paypalDisputes.d.ts +1 -0
- package/dist/resources/persons.cjs.map +1 -1
- package/dist/resources/persons.d.cts +1 -0
- package/dist/resources/persons.d.ts +1 -0
- package/dist/resources/poll.cjs.map +1 -1
- package/dist/resources/poll.d.cts +1 -0
- package/dist/resources/poll.d.ts +1 -0
- package/dist/resources/processorCosts.cjs.map +1 -1
- package/dist/resources/processorCosts.d.cts +1 -0
- package/dist/resources/processorCosts.d.ts +1 -0
- package/dist/resources/processorImports.cjs.map +1 -1
- package/dist/resources/processorImports.d.cts +1 -0
- package/dist/resources/processorImports.d.ts +1 -0
- package/dist/resources/products.cjs.map +1 -1
- package/dist/resources/products.d.cts +1 -0
- package/dist/resources/products.d.ts +1 -0
- package/dist/resources/profileAcquirers.cjs.map +1 -1
- package/dist/resources/profileAcquirers.d.cts +1 -0
- package/dist/resources/profileAcquirers.d.ts +1 -0
- package/dist/resources/profiles.cjs.map +1 -1
- package/dist/resources/profiles.d.cts +1 -0
- package/dist/resources/profiles.d.ts +1 -0
- package/dist/resources/projects.cjs.map +1 -1
- package/dist/resources/projects.d.cts +1 -0
- package/dist/resources/projects.d.ts +1 -0
- package/dist/resources/refunds.cjs.map +1 -1
- package/dist/resources/refunds.d.cts +1 -0
- package/dist/resources/refunds.d.ts +1 -0
- package/dist/resources/regions.cjs.map +1 -1
- package/dist/resources/regions.d.cts +1 -0
- package/dist/resources/regions.d.ts +1 -0
- package/dist/resources/relay.cjs.map +1 -1
- package/dist/resources/relay.d.cts +1 -0
- package/dist/resources/relay.d.ts +1 -0
- package/dist/resources/risk.cjs.map +1 -1
- package/dist/resources/risk.d.cts +1 -0
- package/dist/resources/risk.d.ts +1 -0
- package/dist/resources/routing.cjs.map +1 -1
- package/dist/resources/routing.d.cts +1 -0
- package/dist/resources/routing.d.ts +1 -0
- package/dist/resources/search.cjs.map +1 -1
- package/dist/resources/search.d.cts +1 -0
- package/dist/resources/search.d.ts +1 -0
- package/dist/resources/sellToRestrictions.cjs.map +1 -1
- package/dist/resources/sellToRestrictions.d.cts +1 -0
- package/dist/resources/sellToRestrictions.d.ts +1 -0
- package/dist/resources/settings.cjs.map +1 -1
- package/dist/resources/settings.d.cts +1 -0
- package/dist/resources/settings.d.ts +1 -0
- package/dist/resources/settlement.cjs +2 -2
- package/dist/resources/settlement.cjs.map +1 -1
- package/dist/resources/settlement.d.cts +13 -1
- package/dist/resources/settlement.d.ts +13 -1
- package/dist/resources/settlement.js +1 -1
- package/dist/resources/shopLabels.cjs.map +1 -1
- package/dist/resources/shopLabels.d.cts +1 -0
- package/dist/resources/shopLabels.d.ts +1 -0
- package/dist/resources/shops.cjs.map +1 -1
- package/dist/resources/shops.d.cts +1 -0
- package/dist/resources/shops.d.ts +1 -0
- package/dist/resources/stripeConnect.cjs.map +1 -1
- package/dist/resources/stripeConnect.d.cts +1 -0
- package/dist/resources/stripeConnect.d.ts +1 -0
- package/dist/resources/subscriptions.cjs.map +1 -1
- package/dist/resources/subscriptions.d.cts +1 -0
- package/dist/resources/subscriptions.d.ts +1 -0
- package/dist/resources/support.cjs.map +1 -1
- package/dist/resources/support.d.cts +1 -0
- package/dist/resources/support.d.ts +1 -0
- package/dist/resources/threeDsRules.cjs.map +1 -1
- package/dist/resources/threeDsRules.d.cts +1 -0
- package/dist/resources/threeDsRules.d.ts +1 -0
- package/dist/resources/users.cjs.map +1 -1
- package/dist/resources/users.d.cts +1 -0
- package/dist/resources/users.d.ts +1 -0
- package/dist/resources/vatRates.cjs.map +1 -1
- package/dist/resources/vatRates.d.cts +1 -0
- package/dist/resources/vatRates.d.ts +1 -0
- package/dist/resources/verification.cjs.map +1 -1
- package/dist/resources/verification.d.cts +1 -0
- package/dist/resources/verification.d.ts +1 -0
- package/dist/resources/webhooks.cjs.map +1 -1
- package/dist/resources/webhooks.d.cts +1 -0
- package/dist/resources/webhooks.d.ts +1 -0
- package/dist/resources/whopResolutionCases.cjs.map +1 -1
- package/dist/resources/whopResolutionCases.d.cts +1 -0
- package/dist/resources/whopResolutionCases.d.ts +1 -0
- package/dist/trustedOrigins.cjs.map +1 -1
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.cts +92 -3
- package/dist/types.d.ts +92 -3
- package/package.json +19 -17
- package/dist/chunk-BY3BENXH.js.map +0 -1
- package/dist/chunk-KT2WXUWG.cjs.map +0 -1
- package/dist/chunk-KZHLKMVX.cjs.map +0 -1
- package/dist/chunk-OKFOU6F7.cjs.map +0 -1
- package/dist/chunk-R46A6AGY.cjs.map +0 -1
- package/dist/chunk-WCAIY7DR.cjs.map +0 -1
- package/dist/chunk-WYR27JGG.js.map +0 -1
- package/dist/chunk-Z5MEER63.js.map +0 -1
- /package/dist/{chunk-EBA6DJKI.js.map → chunk-3CR7RX65.js.map} +0 -0
- /package/dist/{chunk-OOC7ZT4T.js.map → chunk-BA6BTB56.js.map} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/home/anes/delo-payment/sdk-publish-w2/dist/chunk-QTS4QGW4.cjs","../src/checkoutSession.ts"],"names":[],"mappings":"AAAA;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACA;ACoEA,SAAS,wBAAA,CAAyB,KAAA,EAAwD;AACxF,EAAA,GAAA,CAAI,CAAC,KAAA,EAAO,OAAO,CAAC,CAAA;AACpB,EAAA,MAAM,IAAA,EAA8B,CAAC,CAAA;AACrC,EAAA,IAAA,CAAA,MAAW,CAAC,GAAA,EAAK,KAAK,EAAA,GAAK,MAAA,CAAO,OAAA,CAAQ,KAAK,CAAA,EAAG;AAChD,IAAA,MAAM,MAAA,EAAQ,GAAA,CAAI,WAAA,CAAY,CAAA;AAC9B,IAAA,GAAA,CAAI,MAAA,IAAU,UAAA,GAAa,MAAA,IAAU,eAAA,EAAiB,QAAA;AACtD,IAAA,GAAA,CAAI,GAAG,EAAA,EAAI,KAAA;AAAA,EACb;AACA,EAAA,OAAO,GAAA;AACT;AAGA,SAAS,cAAA,CAAe,MAAA,EAAwE;AAC9F,EAAA,MAAM,KAAA,kBAAO,MAAA,2BAAQ,YAAA;AACrB,EAAA,OAAO;AAAA,IACL,MAAA,kBAAQ,MAAA,6BAAQ,QAAA;AAAA,IAChB,YAAA,kBAAc,IAAA,6BAAM,SAAA;AAAA,IACpB,SAAA,kBAAW,IAAA,6BAAM,MAAA;AAAA,IACjB,WAAA,kBAAa,IAAA,6BAAM,QAAA;AAAA,IACnB,WAAA,kBAAa,IAAA,6BAAM,QAAA;AAAA,IACnB,WAAA,kBAAa,IAAA,6BAAM,QAAA;AAAA,IACnB,SAAA,kBAAW,IAAA,6BAAM,MAAA;AAAA,IACjB,WAAA,kBAAa,IAAA,6BAAM,QAAA;AAAA,IACnB,SAAA,kBAAW,IAAA,+BAAM,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AA;AACF,IAAA;AACF,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAasF,EAAA;AACjE,IAAA;AACjB,MAAA;AAC+C,MAAA;AAC/C,MAAA;AACoD,QAAA;AAC/C,QAAA;AACqC,QAAA;AAC1C,MAAA;AACF,IAAA;AACF,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAiByC,EAAA;AACpB,IAAA;AACjB,MAAA;AAC+C,MAAA;AAC/C,MAAA;AAC2E,QAAA;AACtE,QAAA;AACqC,QAAA;AAC1C,MAAA;AACF,IAAA;AACF,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAasC,EAAA;AACkB,IAAA;AACyB,MAAA;AAC1E,MAAA;AACqC,MAAA;AACzC,IAAA;AACH,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAgB8C,EAAA;AAC+B,IAAA;AAClE,MAAA;AACmC,QAAA;AACvB,QAAA;AACD,QAAA;AACU,QAAA;AAC5B,MAAA;AACG,MAAA;AACqC,MAAA;AACzC,IAAA;AACH,EAAA;AACF;AD/VsG;AACA;AACA;AACA","file":"/home/anes/delo-payment/sdk-publish-w2/dist/chunk-QTS4QGW4.cjs","sourcesContent":[null,"import { Delopay } from './client';\nimport type { DelopayLogger, RequestExtras } from './client';\nimport { DelopayError } from './error';\nimport type {\n BrowserCardClaimRequest,\n BrowserCardClaimResponse,\n CheckoutAddonChoiceRequest,\n CheckoutAddonChoiceResponse,\n CheckoutDataResponse,\n CheckoutTax,\n CheckoutTaxRequest,\n CheckoutIdentityEmailCodeRequest,\n CheckoutIdentityEmailCodeResponse,\n CheckoutIdentityEmailVerifyRequest,\n CheckoutIdentityEmailVerifyResponse,\n CheckoutIdentityReuseRequest,\n CheckoutIdentityVerificationResponse,\n CheckoutIdentityVerificationStartRequest,\n CheckoutDeviceSessionCompleteRequest,\n CheckoutDeviceSessionResponse,\n ConfirmSubscriptionRequest,\n ConfirmSubscriptionResponse,\n EpayoutsMethodsOptions,\n EpayoutsMethodsResponse,\n MollieApplePaySessionRequest,\n MollieApplePaySessionResponse,\n MicropaymentBankSessionRequest,\n MicropaymentBankSessionResponse,\n EpayoutsPaypalDeclineRequest,\n EpayoutsPaypalDeclineResponse,\n EpayoutsPaypalOrderResponse,\n PaymentAbandonAttemptResponse,\n PaymentReopenAttemptResponse,\n PaymentConfirmRequest,\n PaymentMethodListResponse,\n PaymentMethodPresentationResponse,\n PaymentResponse,\n PaymentsPostSessionTokensRequest,\n PaymentsPostSessionTokensResponse,\n PaymentUpdateRequest,\n RecordCheckoutEventRequest,\n RecordCheckoutEventResponse,\n ReplayIngestParams,\n ReplayIngestResponse,\n NomupayCardAuthorizationRequest,\n NomupayCardAuthorizationResponse,\n StripeHostedConfirmRequest,\n SubscriptionCheckoutResponse,\n SubscriptionReturnStatusResponse,\n SelectSubscriptionMethodRequest,\n SubscriptionCheckoutMethod,\n SubscriptionMethodOptionsResponse,\n SubscriptionResponse,\n StripeHostedConfirmResponse,\n EnigmaFormSession,\n VaultCollectSessionParams,\n VaultCollectSessionResponse,\n VaultPaymentMethodRequest,\n VaultPaymentMethodResponse,\n VaultSavedCardsResponse,\n} from './types';\n\n/**\n * A publishable (browser-safe) API key. The template type rejects secret\n * keys (`prd_…` / `snd_…`) at compile time, so a checkout cannot be handed\n * a credential that would reach secret-key routes.\n */\nexport type PublishableKey = `pk_${string}`;\n\n/**\n * Drop any caller-supplied credential headers (case-insensitively), so a\n * route can only ever carry the one credential its family requires — the\n * class's isolation guarantee must hold against per-call `headers` too.\n * Non-credential extras (`Idempotency-Key`, `X-Dp-*`, …) pass through.\n */\nfunction withoutCredentialHeaders(extra?: Record<string, string>): Record<string, string> {\n if (!extra) return {};\n const out: Record<string, string> = {};\n for (const [key, value] of Object.entries(extra)) {\n const lower = key.toLowerCase();\n if (lower === 'api-key' || lower === 'authorization') continue;\n out[key] = value;\n }\n return out;\n}\n\n/** The query a vault form session is asked with: the buyer's locale and the form's look. */\nfunction vaultFormQuery(params?: VaultCollectSessionParams): Record<string, string | undefined> {\n const look = params?.appearance;\n return {\n locale: params?.locale,\n form_surface: look?.surface,\n form_text: look?.text,\n form_border: look?.border,\n form_accent: look?.accent,\n form_danger: look?.danger,\n form_font: look?.font,\n form_radius: look?.radius,\n form_size: look?.size,\n form_labels: look?.labels,\n form_chrome: look?.chrome,\n form_label: look?.label,\n form_hints: look?.hints === undefined ? undefined : String(look.hints),\n form_order: look?.order,\n form_marks: look?.marks,\n form_focus: look?.focus,\n form_motion: look?.motion,\n form_height: look?.height,\n form_gap: look?.gap,\n form_corner: look?.corner,\n form_fill: look?.fill,\n form_custom: look?.custom ? 'true' : undefined,\n };\n}\n\n/** Drop one header (case-insensitively) from a caller-supplied extras map. */\nfunction withoutHeader(headers: Record<string, string>, name: string): Record<string, string> {\n const out: Record<string, string> = {};\n for (const [key, value] of Object.entries(headers)) {\n if (key.toLowerCase() === name) continue;\n out[key] = value;\n }\n return out;\n}\n\n/** Configuration for a {@link CheckoutSession}. */\nexport interface CheckoutSessionOptions {\n /** The merchant the payment belongs to. */\n merchantId: string;\n /** The payment this session is about. */\n paymentId: string;\n /**\n * The merchant's publishable key (`pk_prd_…` / `pk_snd_…`), from the\n * checkout payload's `pub_key`. Required for the `/payments/*` and\n * `/payment-methods` calls.\n */\n publishableKey?: PublishableKey;\n /**\n * The payment's client secret, from the checkout payload. Required for\n * every `/payment-link/*` call, and rides along on the payment calls.\n */\n clientSecret?: string;\n /** Override the API base URL (e.g. `/api` behind a same-origin proxy). */\n baseUrl?: string;\n /** Use the sandbox environment. Ignored when `baseUrl` is set. */\n sandbox?: boolean;\n /** Per-request timeout in milliseconds. */\n timeout?: number;\n /** Maximum automatic retries for retryable requests. */\n maxRetries?: number;\n debug?: boolean;\n logger?: DelopayLogger;\n}\n\n/**\n * Buyer-side client for a single hosted-checkout payment.\n *\n * Binds the two browser-safe credentials once — the merchant's publishable\n * key and the payment's client secret — and sends each request with exactly\n * the credential its route expects:\n *\n * - `/payment-link/*` side-channel routes authenticate with\n * `Authorization: Bearer <client_secret>`.\n * - `/payments/*` and `/payment-methods` authenticate with the publishable\n * key in the `api-key` header, with the client secret as query parameter\n * or body field.\n *\n * Neither credential can reach a secret-key route: the publishable key is\n * typed to the `pk_` prefix and the client secret only ever leaves as a\n * bearer token / parameter, never as an `api-key`.\n *\n * @example\n * ```typescript\n * const session = new CheckoutSession({\n * merchantId: checkout.merchant_id,\n * paymentId: checkout.payment_id,\n * publishableKey: checkout.pub_key,\n * clientSecret: checkout.client_secret,\n * });\n * const catalog = await session.epayoutsMethods('de');\n * ```\n */\n/**\n * A `CompressionStream` constructor, as much of it as this module uses.\n *\n * Declared structurally rather than taken from the DOM lib: the global is\n * absent in some runtimes this SDK is dropped into, and a type that asserts it\n * exists would make the feature test look redundant to the next reader.\n */\ntype GzipStreamCtor = new (format: 'gzip') => {\n readable: ReadableStream<Uint8Array>;\n writable: WritableStream<Uint8Array>;\n};\n\n/**\n * Gzip a JSON body, or answer `null` where the runtime cannot.\n *\n * `null` is not a failure — it is the caller's instruction to send the body\n * uncompressed. `CompressionStream` is a global in Node 18+ and in current\n * browsers but is missing from older Safari and from some embedded runtimes,\n * and this SDK carries no runtime dependencies, so there is no polyfill to\n * reach for. Sending plain JSON is always correct; the server reads the\n * encoding off the header it is given.\n *\n * The compressed stream is drained to an `ArrayBuffer` rather than handed to\n * `fetch` as a stream. A streamed request body needs `duplex: 'half'`, cannot\n * be replayed on a retry, and is refused outright together with `keepalive` —\n * which is precisely the case a recorder needs when the page is navigating\n * away.\n */\nasync function gzipJson(value: unknown): Promise<ArrayBuffer | null> {\n const ctor = (globalThis as { CompressionStream?: GzipStreamCtor }).CompressionStream;\n if (typeof ctor !== 'function') return null;\n try {\n const bytes = new TextEncoder().encode(JSON.stringify(value));\n return await new Response(\n new Blob([bytes]).stream().pipeThrough(new ctor('gzip')),\n ).arrayBuffer();\n } catch {\n // A runtime carrying the constructor but unable to run it — no\n // `Blob.prototype.stream`, no `pipeThrough` — is the uncompressed case\n // too. A recording must never cost the caller a payment page.\n return null;\n }\n}\n\nexport class CheckoutSession {\n private readonly client: Delopay;\n private readonly merchantId: string;\n private readonly paymentId: string;\n private readonly publishableKey?: PublishableKey;\n private readonly clientSecret?: string;\n\n constructor(options: CheckoutSessionOptions) {\n this.merchantId = options.merchantId;\n this.paymentId = options.paymentId;\n this.publishableKey = options.publishableKey;\n this.clientSecret = options.clientSecret;\n // Constructed WITHOUT a key: every call attaches its own credential\n // explicitly, so a bearer-authenticated route never carries an api-key\n // header and vice versa.\n this.client = new Delopay('', {\n baseUrl: options.baseUrl,\n sandbox: options.sandbox,\n timeout: options.timeout,\n maxRetries: options.maxRetries,\n debug: options.debug,\n logger: options.logger,\n });\n }\n\n private get linkBase(): string {\n return `/payment-link/${encodeURIComponent(this.merchantId)}/${encodeURIComponent(this.paymentId)}`;\n }\n\n /** Headers for the client-secret bearer routes (`/payment-link/*`). */\n private bearerHeaders(extra?: Record<string, string>): Record<string, string> {\n return {\n ...withoutCredentialHeaders(extra),\n Authorization: `Bearer ${this.requireClientSecret()}`,\n };\n }\n\n /** Headers for the publishable-key routes (`/payments/*`, `/payment-methods`). */\n private pkHeaders(extra?: Record<string, string>): Record<string, string> {\n if (!this.publishableKey) {\n throw new DelopayError('This call requires the publishable key', {\n status: 0,\n code: 'MISSING_CREDENTIAL',\n type: 'invalid_request',\n });\n }\n return { ...withoutCredentialHeaders(extra), 'api-key': this.publishableKey };\n }\n\n private requireClientSecret(): string {\n if (!this.clientSecret) {\n throw new DelopayError('This call requires the payment client secret', {\n status: 0,\n code: 'MISSING_CREDENTIAL',\n type: 'invalid_request',\n });\n }\n return this.clientSecret;\n }\n\n /**\n * The hosted checkout's bootstrap payload for a one-time payment —\n * `CheckoutDetails` while payable, a status view once settled.\n *\n * Deliberately unauthenticated: a `pay_` link bootstraps before any\n * credential exists, so no credential header is ever attached (caller\n * extras are still stripped of credentials). Core fields and the collection\n * policy are typed; provider-specific fields remain available as unknown.\n *\n * `theme` (a named checkout variant) and `country` are the route's declared\n * query parameters. `country` is a manual override of the buyer country the\n * router otherwise resolves from the client IP — it decides which payment\n * methods the layout shows — as an ISO 3166-1 alpha-2 code, sent uppercased\n * and omitted when empty. `locale` travels as `Accept-Language` — the only\n * channel the backend's locale resolution reads; a `?locale=` query is\n * silently ignored by this route.\n *\n * `cardOnly` is a direct link to the card form (`payment_method=card`):\n * when the Stripe card form being prepared is the one the link names, its\n * PaymentIntent is created for `card` alone. `cardProvider` and\n * `cardAccount` name that form's connector and account; absent or blank\n * matches any.\n *\n * `entry` opens one of the shop's checkout entries (`?entry=`): the layout\n * holds only that entry's methods and is drawn in its named look, and\n * `entry` on the answer says whether it had anything to offer.\n *\n * `GET /payment-link/data/{merchantId}/{paymentId}`\n */\n async fetchCheckoutData(\n params?: {\n locale?: string;\n theme?: string;\n country?: string;\n cardOnly?: boolean;\n cardProvider?: string;\n cardAccount?: string;\n entry?: string;\n },\n options?: RequestExtras,\n ): Promise<CheckoutDataResponse> {\n const country = params?.country?.trim().toUpperCase();\n return this.client.request(\n 'GET',\n `/payment-link/data/${encodeURIComponent(this.merchantId)}/${encodeURIComponent(this.paymentId)}`,\n {\n query: {\n theme: params?.theme,\n country: country || undefined,\n card_only: params?.cardOnly || undefined,\n card_provider: params?.cardOnly ? params.cardProvider?.trim() || undefined : undefined,\n card_account: params?.cardOnly ? params.cardAccount?.trim() || undefined : undefined,\n entry: params?.entry?.trim() || undefined,\n },\n ...options,\n headers: {\n ...(params?.locale\n ? {\n ...withoutHeader(withoutCredentialHeaders(options?.headers), 'accept-language'),\n 'Accept-Language': params.locale,\n }\n : withoutCredentialHeaders(options?.headers)),\n },\n },\n );\n }\n\n /**\n * The subscription twin of {@link CheckoutSession.fetchCheckoutData}: the\n * bootstrap payload for a `sub_` checkout. Authenticated with the\n * subscription's client secret (construct the session with the `sub_…` id\n * in the `paymentId` slot). `locale` travels as `Accept-Language`, same\n * as {@link CheckoutSession.fetchCheckoutData}.\n *\n * `GET /subscriptions/data/{merchantId}/{subscriptionId}`\n */\n async fetchSubscriptionData(\n params?: { locale?: string },\n options?: RequestExtras,\n ): Promise<SubscriptionCheckoutResponse> {\n return this.client.request(\n 'GET',\n `/subscriptions/data/${encodeURIComponent(this.merchantId)}/${encodeURIComponent(this.paymentId)}`,\n {\n ...options,\n headers: {\n ...(params?.locale\n ? {\n ...withoutHeader(this.bearerHeaders(options?.headers), 'accept-language'),\n 'Accept-Language': params.locale,\n }\n : this.bearerHeaders(options?.headers)),\n },\n },\n );\n }\n\n /**\n * Report buyer/device signals for rails that never reach\n * `/payments/{id}/confirm` (the Stripe SAQ-A rail: raw cards, Apple Pay,\n * Google Pay). Same telemetry contract as\n * {@link CheckoutSession.recordEvent}: sent with `keepalive: true`, and\n * failures resolve instead of rejecting — signals must never block or\n * break a checkout. Unauthenticated by design.\n *\n * `POST /payment-link/client-signals/{merchantId}/{paymentId}`\n */\n async reportClientSignals(\n params: {\n browser_info?: Record<string, unknown>;\n signals: Record<string, unknown>;\n },\n options?: RequestExtras,\n ): Promise<void> {\n try {\n await this.client.request(\n 'POST',\n `/payment-link/client-signals/${encodeURIComponent(this.merchantId)}/${encodeURIComponent(this.paymentId)}`,\n {\n body: params,\n keepalive: true,\n ...options,\n headers: withoutCredentialHeaders(options?.headers),\n },\n );\n } catch {\n // Telemetry: swallowing is the contract, not an oversight.\n }\n }\n\n /**\n * Store one slice of the buyer's checkout recording on our own side.\n * Called by the hosted checkout as the buyer works through the page; the\n * client secret is attached automatically.\n *\n * **Not telemetry semantics, on purpose.** Unlike\n * {@link CheckoutSession.recordEvent}, this rejects with a `DelopayError`\n * like every other payment call, because the recorder has to tell the\n * answers apart: a `400` with code `IR_16` means the backend will not take\n * this recording (recording is off on that deployment, the recording is\n * full, the payment is already recording a different session, or this\n * number is stored with different content) and the recorder must stop; any\n * other `400` is the slice itself being refused; a transport failure may be\n * retried with the **same** bytes under the **same** number, which the\n * backend answers with `duplicate: true`.\n *\n * Pass `keepalive: true` for the last slice of a page that is navigating\n * away (a redirect rail); browsers refuse keepalive bodies over ~64 KiB, so\n * only a small final slice should carry it.\n *\n * Pass `compress: true` to send the slice gzipped. Recorded page events\n * compress heavily, so this is mostly a saving on the buyer's connection. It\n * is opt-in and degrades silently: a runtime without `CompressionStream`\n * sends the same slice uncompressed rather than failing, so a caller never\n * has to feature-test before asking for it.\n *\n * ⚠️ `keepalive` overrides it. Compressing means awaiting a stream read\n * before the request is made, and `keepalive` protects a request only once\n * it has been initiated — so a page torn down mid-compression would drop the\n * final slice altogether. A slice sent with `keepalive` therefore always\n * travels uncompressed, whatever `compress` says. Passing both is allowed and\n * is what a recorder should do: every ordinary slice compresses, and the last\n * one is sent the way that actually arrives.\n *\n * For a precompressed event array, pass `compressed_events` and `gzipBody`.\n * The latter receives the complete JSON request (including the session's\n * client secret) and must return gzip bytes synchronously. Fetch then starts\n * before this method yields, including on a page-navigation slice. A\n * keepalive request is used only when that prepared body is at most 60 KiB.\n *\n * `POST /payments/{paymentId}/replay/slice` (publishable key)\n */\n async storeReplaySlice(\n params: ReplayIngestParams,\n options?: RequestExtras & {\n keepalive?: boolean;\n compress?: boolean;\n /** Gzip a prepared JSON envelope synchronously before the request starts. */\n gzipBody?: (body: Uint8Array) => Uint8Array;\n },\n ): Promise<ReplayIngestResponse> {\n const { keepalive, compress, gzipBody, ...extras } = options ?? {};\n // Built before anything can be compressed, so a missing credential still\n // rejects without a request going out.\n const body = { ...params, client_secret: this.requireClientSecret() };\n const headers = this.pkHeaders(extras.headers);\n // `keepalive` wins over `compress`, and that is a correctness rule rather\n // than a preference. `keepalive` preserves a request only once it has been\n // *initiated*; compressing first means awaiting a stream read, and a page\n // torn down during that await never reaches `fetch()` at all — the final\n // slice is then lost outright, which is the one thing `keepalive` exists to\n // prevent. Losing a slice to save bytes is the wrong trade, so the slice a\n // page is navigating away from travels uncompressed. It is also the\n // smallest one: browsers refuse keepalive bodies over ~64 KiB anyway.\n const encoded = gzipBody?.(new TextEncoder().encode(JSON.stringify(body)));\n const gzipped = encoded\n ? Uint8Array.from(encoded).buffer\n : compress === true && keepalive !== true\n ? await gzipJson(body)\n : null;\n return this.client.request(\n 'POST',\n `/payments/${encodeURIComponent(this.paymentId)}/replay/slice`,\n {\n body: gzipped ?? body,\n ...(keepalive !== undefined\n ? { keepalive: encoded ? keepalive && encoded.byteLength <= 60 * 1024 : keepalive }\n : {}),\n ...extras,\n // `Content-Type` has to be stated for the compressed body: the client\n // only sets it for a body it serialises itself, and the bytes are\n // still JSON — gzip is how they travel, not what they are.\n headers:\n gzipped === null\n ? headers\n : { ...headers, 'Content-Type': 'application/json', 'Content-Encoding': 'gzip' },\n },\n );\n }\n\n /**\n * The status a buyer coming back from the processor's checkout may read:\n * the subscription's status, and whether the processor has reported it yet\n * (`awaiting_processor`). Construct the session with the `sub_…` id in the\n * `paymentId` slot.\n *\n * Authenticated with the return token (`rt`) the return URL carried, sent as\n * `Authorization: Bearer <rt>`. That token reads only this, for a day; it is\n * never the client secret, which this call does not send.\n *\n * `GET /subscriptions/return-status/{merchantId}/{subscriptionId}`\n */\n async subscriptionReturnStatus(\n returnToken: string,\n options?: RequestExtras,\n ): Promise<SubscriptionReturnStatusResponse> {\n if (!returnToken) {\n throw new DelopayError('This call requires the return token (rt) from the return URL', {\n status: 0,\n code: 'MISSING_CREDENTIAL',\n type: 'invalid_request',\n });\n }\n return this.client.request(\n 'GET',\n `/subscriptions/return-status/${encodeURIComponent(this.merchantId)}/${encodeURIComponent(this.paymentId)}`,\n {\n ...options,\n headers: {\n ...withoutCredentialHeaders(options?.headers),\n Authorization: `Bearer ${returnToken}`,\n },\n },\n );\n }\n\n /**\n * The methods the buyer may pick for a subscription that waits for the\n * choice (`method_choice_pending`), judged for the buyer. Call it from the\n * buyer's browser: the sell-to country is read from this request's own\n * connection. A cancelled subscription answers 400, and one that already\n * bills on an account answers 409 (`DE_20`). Authenticated with the\n * subscription's client secret.\n *\n * `GET /subscriptions/method-options/{merchantId}/{subscriptionId}`\n */\n async subscriptionMethodOptions(\n options?: RequestExtras,\n ): Promise<SubscriptionMethodOptionsResponse> {\n return this.client.request(\n 'GET',\n `/subscriptions/method-options/${encodeURIComponent(this.merchantId)}/${encodeURIComponent(this.paymentId)}`,\n {\n ...options,\n headers: this.bearerHeaders(options?.headers),\n },\n );\n }\n\n /**\n * Bind a waiting subscription to the method the buyer picked and open its\n * first cycle on that method's billing account. The methods are judged\n * again from this request; afterwards\n * {@link CheckoutSession.fetchSubscriptionData} describes the bound\n * subscription (Stripe's Payment Element for `card`, `confirmSubscription`\n * for the others). Picking the same method again answers the bound\n * subscription. A subscription bound to another method already, or whose\n * billing account changed meanwhile, answers 409 (`DE_20`); a method not\n * offered to this buyer, or a cancelled subscription, answers 400.\n * Authenticated with the subscription's client secret.\n *\n * `POST /subscriptions/select-method/{merchantId}/{subscriptionId}`\n */\n async selectSubscriptionMethod(\n method: SubscriptionCheckoutMethod,\n options?: RequestExtras,\n ): Promise<SubscriptionResponse> {\n const body: SelectSubscriptionMethodRequest = { method };\n return this.client.request(\n 'POST',\n `/subscriptions/select-method/${encodeURIComponent(this.merchantId)}/${encodeURIComponent(this.paymentId)}`,\n {\n body,\n ...options,\n headers: this.bearerHeaders(options?.headers),\n },\n );\n }\n\n /**\n * Confirm a subscription (PayPal approval rail). The client secret is\n * attached automatically; the shop's profile id travels as the\n * `X-Profile-Id` header the subscription routes require.\n *\n * `POST /subscriptions/{subscriptionId}/confirm` (publishable key)\n */\n async confirmSubscription(\n subscriptionId: string,\n profileId: string,\n params: Omit<ConfirmSubscriptionRequest, 'client_secret'>,\n options?: RequestExtras,\n ): Promise<ConfirmSubscriptionResponse> {\n return this.client.request(\n 'POST',\n `/subscriptions/${encodeURIComponent(subscriptionId)}/confirm`,\n {\n body: { ...params, client_secret: this.requireClientSecret() },\n ...options,\n // Strip any caller-supplied x-profile-id first (case-insensitively):\n // Fetch folds duplicate headers into `caller, pro_x`, and the\n // subscription routes must see exactly one profile scope.\n headers: {\n ...withoutHeader(this.pkHeaders(options?.headers), 'x-profile-id'),\n 'X-Profile-Id': profileId,\n },\n },\n );\n }\n\n /**\n * The e-Payouts rail catalog for the buyer's country, plus the set of\n * countries that have at least one vendor.\n *\n * `GET /payment-link/{merchantId}/{paymentId}/epayouts/methods`\n *\n * Pass `{ paypalSdk: true }` from a checkout drawing an experimental PayPal\n * SDK pane to also receive e-Payouts' PayPal client id\n * (`paypal_client_id`, `paypal_currency`); it is present only when `ppal`\n * is among the methods.\n *\n * @param country - Lowercase ISO 3166-1 alpha-2 country code.\n */\n async epayoutsMethods(\n country: string,\n options?: RequestExtras & EpayoutsMethodsOptions,\n ): Promise<EpayoutsMethodsResponse> {\n const { paypalSdk, merchantConnectorId, ...extras } = options ?? {};\n return this.client.request('GET', `${this.linkBase}/epayouts/methods`, {\n query: paypalSdk\n ? {\n cc: country,\n paypal_sdk: 'true',\n ...(merchantConnectorId ? { merchant_connector_id: merchantConnectorId } : {}),\n }\n : { cc: country },\n ...extras,\n headers: this.bearerHeaders(extras.headers),\n });\n }\n\n /**\n * The PayPal order e-Payouts created for the payment, for the PayPal SDK's\n * `createOrder` on the PayPal Express or Pay with card pane, after the payment\n * was confirmed through that pane. Return `order_id` from `createOrder` and\n * send the buyer to `approve_url` once PayPal approved it; without an order,\n * or when PayPal's button cannot be drawn, send the buyer to `redirect_url`.\n *\n * `POST /payment-link/{merchantId}/{paymentId}/epayouts/paypal-order`\n */\n async epayoutsPaypalOrder(options?: RequestExtras): Promise<EpayoutsPaypalOrderResponse> {\n return this.client.request('POST', `${this.linkBase}/epayouts/paypal-order`, {\n ...options,\n headers: this.bearerHeaders(options?.headers),\n });\n }\n\n /**\n * Report PayPal's refusal of the card or the payer on the PayPal Express or\n * Pay with card pane (for example `INSTRUMENT_DECLINED`, `PAYER_CANNOT_PAY`,\n * or `AUTHENTICATION_FAILED` for a failed 3-D Secure). The attempt is\n * recorded declined and the payment stays payable with another card or\n * method. An issue that is not a refusal, or a payment that no longer awaits\n * PayPal, is left as it is (`declined: false`). Nothing here captures: the\n * payment settles from e-Payouts' notification.\n *\n * `POST /payment-link/{merchantId}/{paymentId}/epayouts/paypal-decline`\n */\n async epayoutsPaypalDecline(\n params: EpayoutsPaypalDeclineRequest,\n options?: RequestExtras,\n ): Promise<EpayoutsPaypalDeclineResponse> {\n return this.client.request('POST', `${this.linkBase}/epayouts/paypal-decline`, {\n body: params,\n ...options,\n headers: this.bearerHeaders(options?.headers),\n });\n }\n\n /**\n * Record a buyer-side checkout event on the payment's status timeline.\n *\n * Telemetry semantics, built in so callers can genuinely fire-and-forget:\n * the request is sent with `keepalive: true` (it survives the document\n * navigating away, e.g. right before a `window.open`), and transport or\n * server failures resolve to `undefined` instead of rejecting — telemetry\n * must never break a checkout or surface an unhandled rejection. Do not\n * `await` this in a click handler that must stay synchronous.\n *\n * A missing client secret still throws `MISSING_CREDENTIAL`: that is a\n * wiring bug, not a telemetry failure.\n *\n * `POST /payment-link/{merchantId}/{paymentId}/checkout-events`\n */\n async recordEvent(\n params: RecordCheckoutEventRequest,\n options?: RequestExtras,\n ): Promise<RecordCheckoutEventResponse | undefined> {\n const headers = this.bearerHeaders(options?.headers);\n try {\n return await this.client.request('POST', `${this.linkBase}/checkout-events`, {\n body: params,\n keepalive: true,\n ...options,\n headers,\n });\n } catch {\n return undefined;\n }\n }\n\n /** Create a new Apple merchant-validation session for a payable Mollie checkout.\n * Requires a live Mollie validation key even for a test payment; never charges.\n * Browser Origin must match the configured checkout domain.\n */\n async mollieApplePaySession(\n params: MollieApplePaySessionRequest,\n options?: RequestExtras,\n ): Promise<MollieApplePaySessionResponse> {\n return this.client.request('POST', `${this.linkBase}/mollie/apple-pay-session`, {\n ...options,\n body: params,\n headers: this.bearerHeaders(options?.headers),\n });\n }\n\n /**\n * Prepare MicroPayment transfer instructions or an unsigned SEPA mandate.\n * No debit is approved. Show the returned mandate disclosure before collecting\n * acceptance, then confirm with metadata.micropayment_preparation and, for\n * new SEPA mandates, explicit customer_acceptance. Every SEPA confirm must\n * acknowledge its amount/date notice with metadata.micropayment_prenotified.\n * Echo native_pane_merchant_connector_id and the returned\n * native_pane_quote_generation on confirm. Saved reuse sends\n * recurring_details: { type: 'payment_method_id', data: payment_method_id }\n * with payment_method: 'bank_debit', payment_method_type: 'sepa' and no raw\n * bank data. Only saved off-session preparation may omit quote_generation.\n * Transfer instructions become available only after canonical confirmation.\n *\n * `POST /payment-link/{merchantId}/{paymentId}/micropayment/bank-session`\n */\n async micropaymentBankSession(\n params: MicropaymentBankSessionRequest,\n options?: RequestExtras,\n ): Promise<MicropaymentBankSessionResponse> {\n return this.client.request('POST', `${this.linkBase}/micropayment/bank-session`, {\n ...options,\n body: params,\n headers: this.bearerHeaders(options?.headers),\n });\n }\n\n /**\n * A short-lived VGS Collect session for browser-side card capture.\n *\n * **Exactly one refusal means \"this shop has no vault\": a 400 carrying\n * `IR_19`.** Every other refusal means a vault exists and could not be used,\n * and answering it by falling back to the processor's own card pane sends an\n * unprotected card number to the very processor the shop pays to hide it\n * from — the bug this endpoint's error contract exists to prevent.\n *\n * A **404 is not benign.** The router answers it when the shop's vault\n * account cannot be found — the state a shop is left in when its vault\n * connector is deleted while the profile keeps naming the id: it still\n * reports the vault as enabled and still expects its cards cloaked. The same\n * status also covers a payment that does not exist.\n *\n * `params.appearance` asks for a form styled to match the page (Enigma\n * Vault). The answer then carries `height`, the frame height to use. If the\n * vault refuses the styled form the answer is the plain one, without\n * `height`. `params.locale` is the buyer's locale.\n *\n * `GET /payment-link/{merchantId}/{paymentId}/vault/collect-session`\n */\n async vaultCollectSession(\n options?: RequestExtras,\n params?: VaultCollectSessionParams,\n ): Promise<VaultCollectSessionResponse> {\n return this.client.request('GET', `${this.linkBase}/vault/collect-session`, {\n ...options,\n query: vaultFormQuery(params),\n headers: this.bearerHeaders(options?.headers),\n });\n }\n\n /**\n * The saved cards the buyer of this payment can pay with, on a shop whose\n * vault keeps the security code itself (Enigma Vault): the cards of the\n * payment's own customer that the shop's vault holds, most recently used\n * first. A payment without a customer answers an empty list.\n *\n * Draw saved cards from this list, not from the customer's payment-method\n * list: that one also carries cards the security-code form cannot open.\n * To pay with one, mint its form with {@link vaultSecurityCodeSession},\n * and confirm with its `payment_token` once the form reports the code\n * stored.\n *\n * A shop without a vault, and a VGS shop, answer `400`.\n *\n * `GET /payment-link/{merchantId}/{paymentId}/vault/saved-cards`\n */\n async vaultSavedCards(options?: RequestExtras): Promise<VaultSavedCardsResponse> {\n return this.client.request('GET', `${this.linkBase}/vault/saved-cards`, {\n ...options,\n headers: this.bearerHeaders(options?.headers),\n });\n }\n\n /**\n * Remove one of the buyer's saved cards, named by its `payment_token` from\n * {@link vaultSavedCards}: from the customer's saved cards and from the\n * shop's vault, with every saved copy of the same card. Only a card of the\n * payment's own customer that the shop's vault holds can be removed, and\n * only within the payment's session.\n *\n * Refusals throw a `DelopayError`:\n *\n * - `400` with code `IR_16` and `data.reason` set to a\n * {@link VaultSavedCardRemovalRefusal}: the card stays listed.\n * `saved_card_in_use` means a subscription or agreement still charges it,\n * `saved_card_payment_in_progress` a payment with it is in flight, and\n * `saved_card_removal_unavailable` that the shop cannot remove cards here.\n * - `404`: the card is not one this buyer can remove, for example because it\n * is already gone.\n * - `422` with code `IR_29`: the token is no longer held. Read\n * {@link vaultSavedCards} again and remove the card by its new token.\n *\n * `DELETE /payment-link/{merchantId}/{paymentId}/vault/saved-cards/{paymentToken}`\n */\n async vaultRemoveSavedCard(paymentToken: string, options?: RequestExtras): Promise<void> {\n await this.client.request(\n 'DELETE',\n `${this.linkBase}/vault/saved-cards/${encodeURIComponent(paymentToken)}`,\n {\n ...options,\n headers: this.bearerHeaders(options?.headers),\n },\n );\n }\n\n /**\n * Mint the security-code form for a saved card, on a shop whose vault keeps\n * the code itself (Enigma Vault). The buyer re-enters the code into the\n * vault's own form, so it never reaches the checkout; confirm with the saved\n * card's `payment_token` once the form reports it stored.\n *\n * `paymentToken` is the saved card's token from {@link vaultSavedCards}. A\n * VGS shop answers `400`: VGS re-collects the code with Collect.\n *\n * `params.appearance` asks for a form styled to match the page, as on\n * {@link vaultCollectSession}. The styled form is the security-code field\n * alone, with no label: draw the label beside the frame, and size the frame\n * to the answer's `height`. `labels` is ignored. If the vault refuses the\n * styled form the answer is the plain one, without `height`.\n *\n * The form stores one code and then disables itself. After a failed\n * payment, mint a new form before the buyer tries again.\n *\n * `GET /payment-link/{merchantId}/{paymentId}/vault/security-code-session`\n */\n async vaultSecurityCodeSession(\n paymentToken: string,\n options?: RequestExtras,\n params?: VaultCollectSessionParams,\n ): Promise<EnigmaFormSession> {\n return this.client.request('GET', `${this.linkBase}/vault/security-code-session`, {\n ...options,\n query: { payment_token: paymentToken, ...vaultFormQuery(params) },\n headers: this.bearerHeaders(options?.headers),\n });\n }\n\n /**\n * Register the aliased card as a payment method and mint the one-shot\n * `payment_token` the confirm call spends.\n *\n * `POST /payment-link/{merchantId}/{paymentId}/vault/payment-method`\n */\n async registerVaultPaymentMethod(\n params: VaultPaymentMethodRequest,\n options?: RequestExtras,\n ): Promise<VaultPaymentMethodResponse> {\n return this.client.request('POST', `${this.linkBase}/vault/payment-method`, {\n body: params,\n ...options,\n headers: this.bearerHeaders(options?.headers),\n });\n }\n\n /**\n * Reserve this payment attempt before a hosted card form contacts Stripe,\n * Airwallex, or NomuPay. Send the provider object rendered to this checkout\n * and retain the same `flow_id` across retries and any 3-D Secure step.\n *\n * Only `authorized: true` permits the form to contact its processor. A\n * competing flow receives `false` and must reload; an unresolved provider\n * outcome stays reserved, regardless of elapsed time. A buyer-blocklist\n * refusal throws a `DelopayError` with code `DE_14`; a shop whose payments\n * DeloPay stopped is refused with `DE_22`, and a shop whose payments the\n * merchant switched off with `DE_21`.\n *\n * `POST /payment-link/{merchantId}/{paymentId}/browser-card-claim`\n */\n async claimBrowserCard(\n params: BrowserCardClaimRequest,\n options?: RequestExtras,\n ): Promise<BrowserCardClaimResponse> {\n return this.client.request('POST', `${this.linkBase}/browser-card-claim`, {\n body: params,\n ...options,\n headers: this.bearerHeaders(options?.headers),\n });\n }\n\n /**\n * Confirm the Stripe card form's PaymentIntent through the router, for a\n * checkout payload with `card_connector_server_confirm: true`. Stripe refuses\n * a Stripe.js confirm of such an intent.\n *\n * Send the PaymentMethod `stripe.createPaymentMethod` produced from the\n * Payment Element (or Express Checkout Element), which needs\n * `paymentMethodCreation: 'manual'` on the Elements instance. A\n * ConfirmationToken is refused with `400`: Stripe will not confirm such an\n * intent with one.\n *\n * The router judges the card's issuing country and the buyer's IP country\n * against the shop's sell-to restrictions before Stripe authorises, and a\n * refusal throws a `DelopayError` with code `DE_10`. A buyer on the\n * merchant's buyer blocklist is refused before any Stripe call with code\n * `DE_14` (`buyer_blocked`, 422), which names no entry, a shop whose\n * payments DeloPay stopped with `DE_22`, and a shop whose payments the\n * merchant switched off with `DE_21`. A buyer the merchant's buyer risk\n * model refuses fails with `DE_23` (`buyer_risk_refused`, 422), which says\n * nothing about the signals. When the answer's\n * `status` is `requires_action`, run `stripe.handleNextAction` with its\n * `client_secret` — safe, because the intent is `confirmation_method=manual`\n * and that secret confirms nothing without the secret key — then call this\n * again without a payment method to finalize.\n *\n * Reserve the attempt with {@link claimBrowserCard} first. Send its granted\n * `flow_id` as `browser_flow_id` on both the initial and post-action confirm;\n * an omitted, null or nonholder flow is refused with `400` and code `IR_16`.\n *\n * A PaymentMethod rules out what `stripe.createPaymentMethod` cannot\n * produce: Stripe names Amazon Pay and Klarna in the Express Checkout\n * Element, which need `stripe.createConfirmationToken` instead. Neither can\n * be paid through this route, so a caller must not offer them on a\n * server-confirmed intent — mount the Express Checkout Element with those\n * methods `'never'`, as DeloPay's own checkout does. The router drops only\n * the methods its server-side confirm cannot finish at all (BLIK and ACSS\n * pre-authorized debits) from the card form's mount, so the rest of the\n * selection still reaches the element and is the caller's to constrain.\n *\n * `POST /payment-link/{merchantId}/{paymentId}/stripe-confirm`\n */\n async confirmStripeCardForm(\n params: StripeHostedConfirmRequest,\n options?: RequestExtras,\n ): Promise<StripeHostedConfirmResponse> {\n return this.client.request('POST', `${this.linkBase}/stripe-confirm`, {\n body: params,\n ...options,\n headers: this.bearerHeaders(options?.headers),\n });\n }\n\n /**\n * Make the buyer's add-on choice while the checkout data answers\n * `type: 'addon_choice'`.\n *\n * Only price ids and quantities are sent; the router prices them from the\n * catalog and judges every selection group's bounds. The payment's lines and\n * amount change together, once: the choice is final afterwards, the same\n * choice sent again answers the same result, and another is refused with\n * `IR_16` — as is a choice once anything could have been charged at the\n * previous amount. Fetch the checkout data again afterwards for the payment\n * methods at the final amount.\n *\n * `POST /payment-link/{merchantId}/{paymentId}/addons`\n */\n async chooseAddons(\n params: CheckoutAddonChoiceRequest,\n options?: RequestExtras,\n ): Promise<CheckoutAddonChoiceResponse> {\n return this.client.request('POST', `${this.linkBase}/addons`, {\n body: params,\n ...options,\n headers: this.bearerHeaders(options?.headers),\n });\n }\n\n /**\n * Send the buyer's tax country, region and VAT ID while the checkout data's\n * `tax.step` is `open`, and get the VAT the payment carries for them.\n *\n * `close: false` recalculates and keeps the step open, for a live total\n * while the buyer types; it also opens a confirmed step again while nothing\n * was prepared at a provider. `close: true` recalculates and confirms: the\n * payment is charged what the answer says, and the checkout data, fetched\n * again, answers the payment methods with `tax.step` `closed`. A confirmed\n * step answers the same closing request again. A change once something was\n * prepared at a provider is refused with `DE_28` (409), as is one while the\n * add-on choice is open or after the checkout expired. A malformed country\n * or region is refused with `IR_06` (400).\n *\n * `POST /payment-link/{merchantId}/{paymentId}/tax`\n */\n async submitTax(params: CheckoutTaxRequest, options?: RequestExtras): Promise<CheckoutTax> {\n return this.client.request('POST', `${this.linkBase}/tax`, {\n body: params,\n ...options,\n headers: this.bearerHeaders(options?.headers),\n });\n }\n\n /**\n * The payment's identity verification step: whether the payment asked for\n * one, its outcome, and the provider's page while it is pending. A pending\n * verification is read from the provider first, so call this when the buyer\n * comes back from the provider's page.\n *\n * `required` is `false` when the payment asked for no verification.\n * `can_retry` is `true` after an expired or abandoned attempt; start a new\n * one with {@link CheckoutSession.startIdentityVerification}.\n *\n * `GET /payment-link/{merchantId}/{paymentId}/identity-verification`\n */\n async identityVerification(\n options?: RequestExtras,\n ): Promise<CheckoutIdentityVerificationResponse> {\n return this.client.request('GET', `${this.linkBase}/identity-verification`, {\n ...options,\n headers: this.bearerHeaders(options?.headers),\n });\n }\n\n /**\n * Resume the payment's pending identity verification, start it, or start a\n * new attempt after an expired or abandoned one. Send the buyer to the\n * returned `verification_url`; the provider sends them back to `return_url`,\n * which must be on the payment's checkout origin.\n *\n * Refusals throw a `DelopayError`: `400` when the return URL is not on the\n * payment's checkout or the verification is already decided, `404` when the\n * payment asked for no verification.\n *\n * `POST /payment-link/{merchantId}/{paymentId}/identity-verification`\n */\n async startIdentityVerification(\n params: CheckoutIdentityVerificationStartRequest,\n options?: RequestExtras,\n ): Promise<CheckoutIdentityVerificationResponse> {\n return this.client.request('POST', `${this.linkBase}/identity-verification`, {\n body: params,\n ...options,\n headers: this.bearerHeaders(options?.headers),\n });\n }\n\n /**\n * Mail the buyer a code that confirms their email, so the payment can reuse\n * a verification the merchant already has for them. Offer it only while the\n * checkout data says `identity_verification_reuse_allowed`. The answer is\n * the same whether or not the merchant verified anyone with the address.\n *\n * Refusals throw a `DelopayError`: `400` with code `DE_26` and the reason as\n * its message (`IV_REUSE_OFF` when the payment's requirement does not allow\n * reuse, `IV_REUSE_STEP` when the payment has no verification step a reuse\n * can stand for, `IV_EMAIL_INVALID`), `429` after too many codes for the\n * caller or the address.\n *\n * `POST /payment-link/{merchantId}/{paymentId}/identity-verification/email-code`\n */\n async sendIdentityEmailCode(\n params: CheckoutIdentityEmailCodeRequest,\n options?: RequestExtras,\n ): Promise<CheckoutIdentityEmailCodeResponse> {\n return this.client.request('POST', `${this.linkBase}/identity-verification/email-code`, {\n body: params,\n ...options,\n headers: this.bearerHeaders(options?.headers),\n });\n }\n\n /**\n * Check the code the buyer entered. `reusable` says only whether the\n * merchant has a verification the payment can reuse; then call\n * {@link CheckoutSession.reuseIdentityVerification}. Otherwise pass the\n * `challenge_id` as `email_challenge_id` to\n * {@link CheckoutSession.startIdentityVerification}, so a later payment can\n * reuse the verification it starts.\n *\n * Refusals throw a `DelopayError`: `400` with code `DE_26` and the reason as\n * its message. `IV_CODE_INCORRECT` is a wrong code, with the tries left in\n * `data.attempts_left`; `IV_CODE_EXPIRED` is an expired code or one out of\n * tries; `IV_CHALLENGE_UNKNOWN` names no code of this payment.\n *\n * `POST /payment-link/{merchantId}/{paymentId}/identity-verification/email-code/verify`\n */\n async verifyIdentityEmailCode(\n params: CheckoutIdentityEmailVerifyRequest,\n options?: RequestExtras,\n ): Promise<CheckoutIdentityEmailVerifyResponse> {\n return this.client.request('POST', `${this.linkBase}/identity-verification/email-code/verify`, {\n body: params,\n ...options,\n headers: this.bearerHeaders(options?.headers),\n });\n }\n\n /**\n * Reuse the merchant's verification for the buyer's confirmed email as the\n * payment's verification. Needs the challenge confirmed on this payment in\n * the last 30 minutes, and uses it up. No provider session, provider cost or\n * DeloPay fee is made. Answers the payment's verification step, verified.\n *\n * Refusals throw a `DelopayError`: `400` with code `DE_26` and the reason as\n * its message (`IV_CHALLENGE_NOT_CONFIRMED`, `IV_REUSE_NOT_ELIGIBLE`,\n * `IV_REUSE_OFF`, `IV_REUSE_STEP`).\n *\n * `POST /payment-link/{merchantId}/{paymentId}/identity-verification/reuse`\n */\n async reuseIdentityVerification(\n params: CheckoutIdentityReuseRequest,\n options?: RequestExtras,\n ): Promise<CheckoutIdentityVerificationResponse> {\n return this.client.request('POST', `${this.linkBase}/identity-verification/reuse`, {\n body: params,\n ...options,\n headers: this.bearerHeaders(options?.headers),\n });\n }\n\n /**\n * Start the device assessment of the payment's checkout. `required` is\n * `false` when the shop assesses no devices, the payment's device is already\n * assessed, or the provider cannot start a session: go on without it. Run\n * the named `library` with the `token`, then call\n * {@link CheckoutSession.completeDeviceSession}.\n *\n * `POST /payment-link/{merchantId}/{paymentId}/device-session`\n */\n async startDeviceSession(options?: RequestExtras): Promise<CheckoutDeviceSessionResponse> {\n return this.client.request('POST', `${this.linkBase}/device-session`, {\n ...options,\n headers: this.bearerHeaders(options?.headers),\n });\n }\n\n /**\n * Report the device assessment finished. The router records it with the\n * provider and stores the signal on the payment. Refused with `400` when the\n * session and token are not the payment's pending ones.\n *\n * `POST /payment-link/{merchantId}/{paymentId}/device-session/complete`\n */\n async completeDeviceSession(\n params: CheckoutDeviceSessionCompleteRequest,\n options?: RequestExtras,\n ): Promise<void> {\n await this.client.request('POST', `${this.linkBase}/device-session/complete`, {\n body: params,\n ...options,\n headers: this.bearerHeaders(options?.headers),\n });\n }\n\n /**\n * Ask whether NomuPay's COPYandPAY widget may submit a card, from the\n * form's pre-submit hook.\n *\n * Only for a checkout stamped `NomupayOppwaCheckoutData.submit_grant`: the\n * card form sits beside always-shown wallet buttons of another account, and\n * this answer closes those buttons before it allows the card. `authorized`\n * is `false` when the payment no longer waits for a payment method, or when\n * this is not the attempt's live card-form checkout; when a wallet beside it\n * is already being paid, the route answers an error instead. Submit the\n * widget only on `true`.\n *\n * `POST /payment-link/{merchantId}/{paymentId}/nomupay-card-authorization`\n */\n async nomupayCardAuthorization(\n params: NomupayCardAuthorizationRequest,\n options?: RequestExtras,\n ): Promise<NomupayCardAuthorizationResponse> {\n return this.client.request('POST', `${this.linkBase}/nomupay-card-authorization`, {\n body: params,\n ...options,\n headers: this.bearerHeaders(options?.headers),\n });\n }\n\n /**\n * The payment's current state — status polling for redirect/popup rails.\n *\n * `GET /payments/{paymentId}` (publishable key + client secret)\n */\n async retrievePayment(options?: RequestExtras): Promise<PaymentResponse> {\n return this.client.request('GET', `/payments/${encodeURIComponent(this.paymentId)}`, {\n query: { client_secret: this.requireClientSecret() },\n ...options,\n headers: this.pkHeaders(options?.headers),\n });\n }\n\n /**\n * Update the payment before confirmation (e.g. persist custom-field\n * answers as `metadata` on rails that never hit `/confirm`). The client\n * secret is attached automatically.\n *\n * `POST /payments/{paymentId}` (publishable key)\n */\n async updatePayment(\n params: PaymentUpdateRequest,\n options?: RequestExtras,\n ): Promise<PaymentResponse> {\n return this.client.request('POST', `/payments/${encodeURIComponent(this.paymentId)}`, {\n body: { ...params, client_secret: this.requireClientSecret() },\n ...options,\n headers: this.pkHeaders(options?.headers),\n });\n }\n\n /**\n * Confirm the payment. The client secret is attached automatically; pass\n * an `Idempotency-Key` header via `options` to make retries safe.\n *\n * `POST /payments/{paymentId}/confirm` (publishable key)\n */\n async confirmPayment(\n params: PaymentConfirmRequest,\n options?: RequestExtras,\n ): Promise<PaymentResponse> {\n return this.client.request('POST', `/payments/${encodeURIComponent(this.paymentId)}/confirm`, {\n body: { ...params, client_secret: this.requireClientSecret() },\n ...options,\n headers: this.pkHeaders(options?.headers),\n });\n }\n\n /**\n * Mint the processor-side session a browser SDK completes — the PayPal\n * order that PayPal's buttons or Card Fields attach the buyer's choice to.\n * The client secret is attached automatically.\n *\n * For PayPal Card Fields pass `payment_method: 'card'` and the\n * `merchant_connector_id` the checkout was rendered with; the order id comes\n * back in `next_action.next_action_data.order_id` and is what the SDK's\n * `createOrder` returns. The confirm that captures it sends the same order\n * and account as `payment_method_data.card_reference`.\n *\n * Send a distinct `Idempotency-Key` through `options.headers` for each new\n * card submission; reuse it only to retry that same session request. The\n * returned order is bound to this attempt and account. Sessions cannot\n * replace an order while authentication or money processing is unresolved,\n * or after authorization/capture; stale or foreign references are refused.\n *\n * `POST /payments/{paymentId}/post-session-tokens` (publishable key)\n */\n async postSessionTokens(\n params: PaymentsPostSessionTokensRequest,\n options?: RequestExtras,\n ): Promise<PaymentsPostSessionTokensResponse> {\n return this.client.request(\n 'POST',\n `/payments/${encodeURIComponent(this.paymentId)}/post-session-tokens`,\n {\n body: { ...params, client_secret: this.requireClientSecret() },\n ...options,\n headers: this.pkHeaders(options?.headers),\n },\n );\n }\n\n /**\n * Abandon the attempt the buyer left open on a connector's hosted page\n * (the payment sits in `requires_customer_action`) and open a fresh attempt\n * awaiting a payment method, so the same payment can be confirmed again\n * with another method or connector. Nothing has been authorised on the\n * abandoned attempt; it is voided locally and kept in the attempt history.\n * Idempotent: a payment already in `requires_payment_method` comes back\n * unchanged with `abandoned_attempt_id: null`.\n *\n * `POST /payments/{paymentId}/abandon-attempt` (publishable key + client secret)\n */\n async abandonAttempt(options?: RequestExtras): Promise<PaymentAbandonAttemptResponse> {\n return this.client.request(\n 'POST',\n `/payments/${encodeURIComponent(this.paymentId)}/abandon-attempt`,\n {\n body: { client_secret: this.requireClientSecret() },\n ...options,\n headers: this.pkHeaders(options?.headers),\n },\n );\n }\n\n /**\n * Reopen a provider session the buyer switched away from, when they pick the\n * same method again, instead of opening a second session at the provider\n *. Pass an `attempt_id` from the checkout's\n * `reopenable_attempts`; the attempt becomes the payment's active one again\n * and `redirect_url` sends the buyer back to it. Refused (`IR_16`) when the\n * payment no longer awaits a method, a payment is under way on the checkout,\n * or the session can no longer be reopened (settled, lapsed at the provider,\n * ended by the switch); open a new session as usual then.\n *\n * `POST /payments/{paymentId}/reopen-attempt` (publishable key + client secret)\n */\n async reopenAttempt(\n attemptId: string,\n options?: RequestExtras,\n ): Promise<PaymentReopenAttemptResponse> {\n return this.client.request(\n 'POST',\n `/payments/${encodeURIComponent(this.paymentId)}/reopen-attempt`,\n {\n body: { client_secret: this.requireClientSecret(), attempt_id: attemptId },\n ...options,\n headers: this.pkHeaders(options?.headers),\n },\n );\n }\n\n /**\n * Payment methods available for this payment.\n *\n * `GET /payment-methods` (publishable key + client secret)\n *\n * @param params - Optional filters; `country` is the highest-precedence\n * geo hint, ahead of billing address and IP geolocation.\n */\n async listPaymentMethods(\n params?: { country?: string },\n options?: RequestExtras,\n ): Promise<PaymentMethodListResponse> {\n return this.client.request('GET', '/payment-methods', {\n query: { client_secret: this.requireClientSecret(), country: params?.country },\n ...options,\n headers: this.pkHeaders(options?.headers),\n });\n }\n\n /**\n * This payment's checkout buttons, as the hosted checkout draws them: order,\n * labels, artwork, and what selecting each one does. The shop, environment,\n * currency and amount are the payment's. Ask again when the cart changes;\n * an answer is never reused for another payment.\n *\n * `GET /account/payment-methods/presentation` (publishable key + client secret)\n *\n * @param params - `country` outranks the billing address and IP\n * geolocation; `locale` names the language of the labels.\n */\n async paymentMethodPresentation(\n params?: { country?: string; locale?: string; contract_version?: number },\n options?: RequestExtras,\n ): Promise<PaymentMethodPresentationResponse> {\n return this.client.request('GET', '/account/payment-methods/presentation', {\n query: {\n client_secret: this.requireClientSecret(),\n country: params?.country,\n locale: params?.locale,\n contract_version: params?.contract_version,\n },\n ...options,\n headers: this.pkHeaders(options?.headers),\n });\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/jonathan/Desktop/DeloPay/dev1/delopay-typescript-sdk/dist/chunk-QYNRNDIY.cjs","../src/resources/invoiceSettings.ts"],"names":[],"mappings":"AAAA;ACkCO,IAAM,wBAAA,EAAN,MAA8B;AAAA,EACnC,WAAA,CAA6B,OAAA,EAAoB;AAApB,IAAA,IAAA,CAAA,QAAA,EAAA,OAAA;AAAA,EAAqB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQlD,MAAM,QAAA,CAAS,OAAA,EAAmD;AAChE,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,KAAA,EAAO,mBAAA,EAAqB,EAAE,GAAG,QAAQ,CAAC,CAAA;AAAA,EAChE;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,MAAM,MAAA,CAAO,QAAA,EAA2B,OAAA,EAAmD;AACzF,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,KAAA,EAAO,mBAAA,EAAqB,EAAE,IAAA,EAAM,QAAA,EAAU,GAAG,QAAQ,CAAC,CAAA;AAAA,EAChF;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,MAAM,eAAA,CAAgB,SAAA,EAAmB,OAAA,EAAmD;AAC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AA;AAAA;AAAA;AAY4B,EAAA;AACd,IAAA;AACV,MAAA;AAC2D,MAAA;AAChC,MAAA;AAC7B,IAAA;AACF,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAU4B,EAAA;AACd,IAAA;AACV,MAAA;AAC2D,MAAA;AAC9C,MAAA;AACf,IAAA;AACF,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUqC,EAAA;AACiC,IAAA;AAC5D,MAAA;AACH,MAAA;AACJ,IAAA;AACH,EAAA;AACF;AD9E2F;AACA;AACA;AACA","file":"/home/jonathan/Desktop/DeloPay/dev1/delopay-typescript-sdk/dist/chunk-QYNRNDIY.cjs","sourcesContent":[null,"import type {\n EffectiveInvoiceSettings,\n InvoiceLogoRequest,\n InvoicePreviewRequest,\n InvoiceSettings,\n InvoiceTaxRuleEvaluateRequest,\n InvoiceTaxRuleEvaluation,\n InvoiceTaxRules,\n InvoiceTaxRulesRequest,\n} from '../types';\nimport type { RequestExtras, RequestFn } from '../client';\n\n/**\n * How the merchant's invoices look and are taxed: the merchant default, and\n * each shop's override of it.\n *\n * Every setting resolves shop → merchant default → built-in fallback, and\n * `retrieveEffective` shows the result for one shop with where each value came\n * from. The same two levels hold the tax rules: a shop either inherits the\n * merchant's list or has one of its own that replaces it.\n *\n * **The merchant-level methods need a merchant-level grant** (no shop role\n * holds one), so a shop user may style its own shop and give it tax rules of\n * its own but never change what every shop inherits. The `…ForShop` methods\n * need the `Invoice` area's grant on that shop.\n *\n * Exported as `InvoiceSettingsResource` so the class never shadows the\n * `InvoiceSettings` data type of the same package.\n *\n * An update **replaces every field but the logo**: read, change, and send the\n * whole object back. A field left out is cleared — on a shop that means\n * \"inherit\", on the merchant default \"use the built-in fallback\". The logo has\n * its own methods.\n */\nexport class InvoiceSettingsResource {\n constructor(private readonly request: RequestFn) {}\n\n // --- Settings -------------------------------------------------------------\n\n /**\n * The merchant default.\n * `GET /invoice-settings`\n */\n async retrieve(options?: RequestExtras): Promise<InvoiceSettings> {\n return this.request('GET', '/invoice-settings', { ...options });\n }\n\n /**\n * Replace the merchant default (every field but the logo).\n * `PUT /invoice-settings`\n */\n async update(settings: InvoiceSettings, options?: RequestExtras): Promise<InvoiceSettings> {\n return this.request('PUT', '/invoice-settings', { body: settings, ...options });\n }\n\n /**\n * One shop's override. A `null` field inherits the merchant default.\n * `GET /invoice-settings/profiles/{profile_id}`\n */\n async retrieveForShop(profileId: string, options?: RequestExtras): Promise<InvoiceSettings> {\n return this.request('GET', `/invoice-settings/profiles/${encodeURIComponent(profileId)}`, {\n ...options,\n });\n }\n\n /**\n * Replace one shop's override (every field but the logo).\n * `PUT /invoice-settings/profiles/{profile_id}`\n */\n async updateForShop(\n profileId: string,\n settings: InvoiceSettings,\n options?: RequestExtras,\n ): Promise<InvoiceSettings> {\n return this.request('PUT', `/invoice-settings/profiles/${encodeURIComponent(profileId)}`, {\n body: settings,\n ...options,\n });\n }\n\n /**\n * The settings a shop's next document is finalised with, and where each\n * value came from (`shop`, `merchant` or `default`).\n * `GET /invoice-settings/profiles/{profile_id}/effective`\n */\n async retrieveEffective(\n profileId: string,\n options?: RequestExtras,\n ): Promise<EffectiveInvoiceSettings> {\n return this.request(\n 'GET',\n `/invoice-settings/profiles/${encodeURIComponent(profileId)}/effective`,\n { ...options },\n );\n }\n\n /**\n * A sample invoice PDF rendered from the effective settings with unsaved\n * values laid over them, so a form can show what saving would produce.\n * Writes nothing.\n * `POST /invoice-settings/preview`\n */\n async preview(params: InvoicePreviewRequest, options?: RequestExtras): Promise<Blob> {\n return this.request('POST', '/invoice-settings/preview', {\n body: params,\n responseType: 'blob',\n ...options,\n });\n }\n\n // --- Logo -----------------------------------------------------------------\n\n /**\n * The merchant default's logo image.\n * `GET /invoice-settings/logo`\n */\n async retrieveLogo(options?: RequestExtras): Promise<Blob> {\n return this.request('GET', '/invoice-settings/logo', { responseType: 'blob', ...options });\n }\n\n /**\n * Set the merchant default's logo: PNG or JPEG, at most 1 MB, as base64.\n * `PUT /invoice-settings/logo`\n */\n async updateLogo(params: InvoiceLogoRequest, options?: RequestExtras): Promise<InvoiceSettings> {\n return this.request('PUT', '/invoice-settings/logo', { body: params, ...options });\n }\n\n /**\n * Remove the merchant default's logo.\n * `DELETE /invoice-settings/logo`\n */\n async deleteLogo(options?: RequestExtras): Promise<InvoiceSettings> {\n return this.request('DELETE', '/invoice-settings/logo', { ...options });\n }\n\n /**\n * One shop's own logo image.\n * `GET /invoice-settings/profiles/{profile_id}/logo`\n */\n async retrieveLogoForShop(profileId: string, options?: RequestExtras): Promise<Blob> {\n return this.request('GET', `/invoice-settings/profiles/${encodeURIComponent(profileId)}/logo`, {\n responseType: 'blob',\n ...options,\n });\n }\n\n /**\n * Set one shop's own logo: PNG or JPEG, at most 1 MB, as base64.\n * `PUT /invoice-settings/profiles/{profile_id}/logo`\n */\n async updateLogoForShop(\n profileId: string,\n params: InvoiceLogoRequest,\n options?: RequestExtras,\n ): Promise<InvoiceSettings> {\n return this.request('PUT', `/invoice-settings/profiles/${encodeURIComponent(profileId)}/logo`, {\n body: params,\n ...options,\n });\n }\n\n /**\n * Remove one shop's own logo; the shop then inherits the merchant default's.\n * `DELETE /invoice-settings/profiles/{profile_id}/logo`\n */\n async deleteLogoForShop(profileId: string, options?: RequestExtras): Promise<InvoiceSettings> {\n return this.request(\n 'DELETE',\n `/invoice-settings/profiles/${encodeURIComponent(profileId)}/logo`,\n { ...options },\n );\n }\n\n // --- Tax rules ------------------------------------------------------------\n\n /**\n * The merchant's tax rules, which every shop without a list of its own uses.\n * `GET /invoice-settings/tax-rules`\n */\n async retrieveTaxRules(options?: RequestExtras): Promise<InvoiceTaxRules> {\n return this.request('GET', '/invoice-settings/tax-rules', { ...options });\n }\n\n /**\n * Replace the merchant's whole rule list; the order is the priority.\n * `PUT /invoice-settings/tax-rules`\n */\n async updateTaxRules(\n params: InvoiceTaxRulesRequest,\n options?: RequestExtras,\n ): Promise<InvoiceTaxRules> {\n return this.request('PUT', '/invoice-settings/tax-rules', { body: params, ...options });\n }\n\n /**\n * The rules one shop uses: its own list, or the merchant's it inherits, as\n * `own_rules` says.\n * `GET /invoice-settings/profiles/{profile_id}/tax-rules`\n */\n async retrieveTaxRulesForShop(\n profileId: string,\n options?: RequestExtras,\n ): Promise<InvoiceTaxRules> {\n return this.request(\n 'GET',\n `/invoice-settings/profiles/${encodeURIComponent(profileId)}/tax-rules`,\n { ...options },\n );\n }\n\n /**\n * Give one shop a list of its own, replacing the merchant's for that shop —\n * even when empty, which leaves every line of the shop to the settings'\n * default rate.\n * `PUT /invoice-settings/profiles/{profile_id}/tax-rules`\n */\n async updateTaxRulesForShop(\n profileId: string,\n params: InvoiceTaxRulesRequest,\n options?: RequestExtras,\n ): Promise<InvoiceTaxRules> {\n return this.request(\n 'PUT',\n `/invoice-settings/profiles/${encodeURIComponent(profileId)}/tax-rules`,\n { body: params, ...options },\n );\n }\n\n /**\n * Drop one shop's own list, so it inherits the merchant's again. Returns\n * the list the shop now uses.\n * `DELETE /invoice-settings/profiles/{profile_id}/tax-rules`\n */\n async deleteTaxRulesForShop(\n profileId: string,\n options?: RequestExtras,\n ): Promise<InvoiceTaxRules> {\n return this.request(\n 'DELETE',\n `/invoice-settings/profiles/${encodeURIComponent(profileId)}/tax-rules`,\n { ...options },\n );\n }\n\n /**\n * Which saved rule a buyer and a product tax category would meet, and what\n * the line would be taxed at. Writes nothing.\n * `POST /invoice-settings/tax-rules/evaluate`\n */\n async evaluateTaxRules(\n params: InvoiceTaxRuleEvaluateRequest,\n options?: RequestExtras,\n ): Promise<InvoiceTaxRuleEvaluation> {\n return this.request('POST', '/invoice-settings/tax-rules/evaluate', {\n body: params,\n ...options,\n });\n }\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["/home/anes/delo-payment/sdk-publish-w2/dist/chunk-QYNRNDIY.cjs","../src/resources/invoiceSettings.ts"],"names":[],"mappings":"AAAA;ACkCO,IAAM,wBAAA,EAAN,MAA8B;AAAA,EACnC,WAAA,CAA6B,OAAA,EA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AAA;AAAA;AAMqF,EAAA;AACG,IAAA;AACtE,MAAA;AACX,MAAA;AACJ,IAAA;AACH,EAAA;AAAA;AAAA;AAAA;AAAA;AAU4B,EAAA;AAC4D,IAAA;AAC9E,MAAA;AACH,MAAA;AACJ,IAAA;AACH,EAAA;AAAA;AAAA;AAAA;AAAA;AAM8F,EAAA;AAChF,IAAA;AACV,MAAA;AAC2D,MAAA;AAC9C,MAAA;AACf,IAAA;AACF,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQ0E,EAAA;AACA,IAAA;AAC1E,EAAA;AAAA;AAAA;AAAA;AAAA;AAS4B,EAAA;AAC4D,IAAA;AACxF,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAU4B,EAAA;AACd,IAAA;AACV,MAAA;AAC2D,MAAA;AAC9C,MAAA;AACf,IAAA;AACF,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAY4B,EAAA;AACd,IAAA;AACV,MAAA;AAC2D,MAAA;AAChC,MAAA;AAC7B,IAAA;AACF,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAU4B,EAAA;AACd,IAAA;AACV,MAAA;AAC2D,MAAA;AAC9C,MAAA;AACf,IAAA;AACF,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUqC,EAAA;AACiC,IAAA;AAC5D,MAAA;AACH,MAAA;AACJ,IAAA;AACH,EAAA;AACF;AD9E2F;AACA;AACA;AACA","file":"/home/anes/delo-payment/sdk-publish-w2/dist/chunk-QYNRNDIY.cjs","sourcesContent":[null,"import type {\n EffectiveInvoiceSettings,\n InvoiceLogoRequest,\n InvoicePreviewRequest,\n InvoiceSettings,\n InvoiceTaxRuleEvaluateRequest,\n InvoiceTaxRuleEvaluation,\n InvoiceTaxRules,\n InvoiceTaxRulesRequest,\n} from '../types';\nimport type { RequestExtras, RequestFn } from '../client';\n\n/**\n * How the merchant's invoices look and are taxed: the merchant default, and\n * each shop's override of it.\n *\n * Every setting resolves shop → merchant default → built-in fallback, and\n * `retrieveEffective` shows the result for one shop with where each value came\n * from. The same two levels hold the tax rules: a shop either inherits the\n * merchant's list or has one of its own that replaces it.\n *\n * **The merchant-level methods need a merchant-level grant** (no shop role\n * holds one), so a shop user may style its own shop and give it tax rules of\n * its own but never change what every shop inherits. The `…ForShop` methods\n * need the `Invoice` area's grant on that shop.\n *\n * Exported as `InvoiceSettingsResource` so the class never shadows the\n * `InvoiceSettings` data type of the same package.\n *\n * An update **replaces every field but the logo**: read, change, and send the\n * whole object back. A field left out is cleared — on a shop that means\n * \"inherit\", on the merchant default \"use the built-in fallback\". The logo has\n * its own methods.\n */\nexport class InvoiceSettingsResource {\n constructor(private readonly request: RequestFn) {}\n\n // --- Settings -------------------------------------------------------------\n\n /**\n * The merchant default.\n * `GET /invoice-settings`\n */\n async retrieve(options?: RequestExtras): Promise<InvoiceSettings> {\n return this.request('GET', '/invoice-settings', { ...options });\n }\n\n /**\n * Replace the merchant default (every field but the logo).\n * `PUT /invoice-settings`\n */\n async update(settings: InvoiceSettings, options?: RequestExtras): Promise<InvoiceSettings> {\n return this.request('PUT', '/invoice-settings', { body: settings, ...options });\n }\n\n /**\n * One shop's override. A `null` field inherits the merchant default.\n * `GET /invoice-settings/profiles/{profile_id}`\n */\n async retrieveForShop(profileId: string, options?: RequestExtras): Promise<InvoiceSettings> {\n return this.request('GET', `/invoice-settings/profiles/${encodeURIComponent(profileId)}`, {\n ...options,\n });\n }\n\n /**\n * Replace one shop's override (every field but the logo).\n * `PUT /invoice-settings/profiles/{profile_id}`\n */\n async updateForShop(\n profileId: string,\n settings: InvoiceSettings,\n options?: RequestExtras,\n ): Promise<InvoiceSettings> {\n return this.request('PUT', `/invoice-settings/profiles/${encodeURIComponent(profileId)}`, {\n body: settings,\n ...options,\n });\n }\n\n /**\n * The settings a shop's next document is finalised with, and where each\n * value came from (`shop`, `merchant` or `default`).\n * `GET /invoice-settings/profiles/{profile_id}/effective`\n */\n async retrieveEffective(\n profileId: string,\n options?: RequestExtras,\n ): Promise<EffectiveInvoiceSettings> {\n return this.request(\n 'GET',\n `/invoice-settings/profiles/${encodeURIComponent(profileId)}/effective`,\n { ...options },\n );\n }\n\n /**\n * A sample invoice PDF rendered from the effective settings with unsaved\n * values laid over them, so a form can show what saving would produce.\n * Writes nothing.\n * `POST /invoice-settings/preview`\n */\n async preview(params: InvoicePreviewRequest, options?: RequestExtras): Promise<Blob> {\n return this.request('POST', '/invoice-settings/preview', {\n body: params,\n responseType: 'blob',\n ...options,\n });\n }\n\n // --- Logo -----------------------------------------------------------------\n\n /**\n * The merchant default's logo image.\n * `GET /invoice-settings/logo`\n */\n async retrieveLogo(options?: RequestExtras): Promise<Blob> {\n return this.request('GET', '/invoice-settings/logo', { responseType: 'blob', ...options });\n }\n\n /**\n * Set the merchant default's logo: PNG or JPEG, at most 1 MB, as base64.\n * `PUT /invoice-settings/logo`\n */\n async updateLogo(params: InvoiceLogoRequest, options?: RequestExtras): Promise<InvoiceSettings> {\n return this.request('PUT', '/invoice-settings/logo', { body: params, ...options });\n }\n\n /**\n * Remove the merchant default's logo.\n * `DELETE /invoice-settings/logo`\n */\n async deleteLogo(options?: RequestExtras): Promise<InvoiceSettings> {\n return this.request('DELETE', '/invoice-settings/logo', { ...options });\n }\n\n /**\n * One shop's own logo image.\n * `GET /invoice-settings/profiles/{profile_id}/logo`\n */\n async retrieveLogoForShop(profileId: string, options?: RequestExtras): Promise<Blob> {\n return this.request('GET', `/invoice-settings/profiles/${encodeURIComponent(profileId)}/logo`, {\n responseType: 'blob',\n ...options,\n });\n }\n\n /**\n * Set one shop's own logo: PNG or JPEG, at most 1 MB, as base64.\n * `PUT /invoice-settings/profiles/{profile_id}/logo`\n */\n async updateLogoForShop(\n profileId: string,\n params: InvoiceLogoRequest,\n options?: RequestExtras,\n ): Promise<InvoiceSettings> {\n return this.request('PUT', `/invoice-settings/profiles/${encodeURIComponent(profileId)}/logo`, {\n body: params,\n ...options,\n });\n }\n\n /**\n * Remove one shop's own logo; the shop then inherits the merchant default's.\n * `DELETE /invoice-settings/profiles/{profile_id}/logo`\n */\n async deleteLogoForShop(profileId: string, options?: RequestExtras): Promise<InvoiceSettings> {\n return this.request(\n 'DELETE',\n `/invoice-settings/profiles/${encodeURIComponent(profileId)}/logo`,\n { ...options },\n );\n }\n\n // --- Tax rules ------------------------------------------------------------\n\n /**\n * The merchant's tax rules, which every shop without a list of its own uses.\n * `GET /invoice-settings/tax-rules`\n */\n async retrieveTaxRules(options?: RequestExtras): Promise<InvoiceTaxRules> {\n return this.request('GET', '/invoice-settings/tax-rules', { ...options });\n }\n\n /**\n * Replace the merchant's whole rule list; the order is the priority.\n * `PUT /invoice-settings/tax-rules`\n */\n async updateTaxRules(\n params: InvoiceTaxRulesRequest,\n options?: RequestExtras,\n ): Promise<InvoiceTaxRules> {\n return this.request('PUT', '/invoice-settings/tax-rules', { body: params, ...options });\n }\n\n /**\n * The rules one shop uses: its own list, or the merchant's it inherits, as\n * `own_rules` says.\n * `GET /invoice-settings/profiles/{profile_id}/tax-rules`\n */\n async retrieveTaxRulesForShop(\n profileId: string,\n options?: RequestExtras,\n ): Promise<InvoiceTaxRules> {\n return this.request(\n 'GET',\n `/invoice-settings/profiles/${encodeURIComponent(profileId)}/tax-rules`,\n { ...options },\n );\n }\n\n /**\n * Give one shop a list of its own, replacing the merchant's for that shop —\n * even when empty, which leaves every line of the shop to the settings'\n * default rate.\n * `PUT /invoice-settings/profiles/{profile_id}/tax-rules`\n */\n async updateTaxRulesForShop(\n profileId: string,\n params: InvoiceTaxRulesRequest,\n options?: RequestExtras,\n ): Promise<InvoiceTaxRules> {\n return this.request(\n 'PUT',\n `/invoice-settings/profiles/${encodeURIComponent(profileId)}/tax-rules`,\n { body: params, ...options },\n );\n }\n\n /**\n * Drop one shop's own list, so it inherits the merchant's again. Returns\n * the list the shop now uses.\n * `DELETE /invoice-settings/profiles/{profile_id}/tax-rules`\n */\n async deleteTaxRulesForShop(\n profileId: string,\n options?: RequestExtras,\n ): Promise<InvoiceTaxRules> {\n return this.request(\n 'DELETE',\n `/invoice-settings/profiles/${encodeURIComponent(profileId)}/tax-rules`,\n { ...options },\n );\n }\n\n /**\n * Which saved rule a buyer and a product tax category would meet, and what\n * the line would be taxed at. Writes nothing.\n * `POST /invoice-settings/tax-rules/evaluate`\n */\n async evaluateTaxRules(\n params: InvoiceTaxRuleEvaluateRequest,\n options?: RequestExtras,\n ): Promise<InvoiceTaxRuleEvaluation> {\n return this.request('POST', '/invoice-settings/tax-rules/evaluate', {\n body: params,\n ...options,\n });\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/jonathan/Desktop/DeloPay/dev1/delopay-typescript-sdk/dist/chunk-R4FE6K43.cjs","../src/resources/webhooks.ts"],"names":[],"mappings":"AAAA;ACgEO,SAAS,8BAAA,CACd,MAAA,EAC4B;AAC5B,EAAA,OAAO,OAAQ,MAAA,CAAqC,cAAA,IAAkB,QAAA;AACxE;AAUO,SAAS,4BAAA,CACd,MAAA,EACsC;AACtC,EAAA,OAAO,OAAQ,MAAA,CAA+C,qBAAA,IAAyB,QAAA;AACzF;AAyBA,SAAS,UAAA,CAAW,GAAA,EAAgC;AAClD,EAAA,GAAA,CAAI,GAAA,CAAI,OAAA,IAAW,EAAA,GAAK,GAAA,CAAI,OAAA,EAAS,EAAA,IAAM,CAAA,EAAG,OAAO,IAAA;AACrD,EAAA,MAAM,MAAA,EAAQ,IAAI,UAAA,CAAW,GAAA,CAAI,OAAA,EAAS,CAAC,CAAA;AAC3C,EAAA,IAAA,CAAA,IAAS,EAAA,EAAI,CAAA,EAAG,EAAA,EAAI,GAAA,CAAI,MAAA,EAAQ,EAAA,GAAK,CAAA,EAAG;AACtC,IAAA,MAAM,KAAA,EAAO,MAAA,CAAO,QAAA,CAAS,GAAA,CAAI,KAAA,CAAM,CAAA,EAAG,EAAA,EAAI,CAAC,CAAA,EAAG,EAAE,CAAA;AACpD,IAAA,GAAA,CAAI,MAAA,CAA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AM,MAAA,EAAQ,IAAA,EAAM,UAAU,CAAA;AAAA,MAChC,KAAA;AAAA,MACA,CAAC,QAAQ;AAAA,IACX,CAAA;AAEA,IAAA,MAAM,MAAA,EAAQ,MAAM,MAAA,CAAO,MAAA;AAAA,MACzB,MAAA;AAAA,MACA,GAAA;AAAA,MACA,cAAA,CAAe,cAAc,CAAA;AAAA,MAC7B,cAAA,CAAe,SAAS;AAAA,IAC1B,CAAA;AAEA,IAAA,GAAA,CAAI,CAAC,KAAA,EAAO;AACV,MAAA,MAAM,IAAI,KAAA,CAAM,2BAA2B,CAAA;AAAA,IAC7C;AAEA,IAAA,MAAM,SAAA,EACJ,OAAO,QAAA,IAAY,SAAA,EAAW,QAAA,EAAU,IAAI,WAAA,CAAY,OAAO,CAAA,CAAE,MAAA,CAAO,OAAO,CAAA;AACjF,IAAA,OAAO,IAAA,CAAK,KAAA,CAAM,QAAQ,CAAA;AAAA,EAC5B;AACF,CAAA;ADlHA;AACA;AACE;AACA;AACA;AACF,0KAAC","file":"/home/jonathan/Desktop/DeloPay/dev1/delopay-typescript-sdk/dist/chunk-R4FE6K43.cjs","sourcesContent":[null,"import type {\n EventType,\n PaymentResponse,\n RefundResponse,\n DisputeResponse,\n MandateResponse,\n PayoutResponse,\n LifecycleWebhook,\n SubscriptionDisputeWebhook,\n SubscriptionWebhookContent,\n ShopRiskEscalationWebhook,\n BuyerRiskAlertWebhook,\n MerchantInvoiceWebhook,\n} from '../types';\n\n/**\n * The payload of a webhook event, tagged by kind.\n *\n * Mirrors the backend's `{ \"type\": …, \"object\": … }` envelope: `type` names the\n * payload shape and `object` carries it. Narrow on `content.type` to get a\n * fully-typed `object`:\n *\n * ```typescript\n * if (event.content.type === 'payment_details') {\n * event.content.object.payment_id; // typed as PaymentResponse\n * }\n * ```\n */\nexport type WebhookContent =\n | { type: 'payment_details'; object: PaymentResponse }\n | { type: 'refund_details'; object: RefundResponse }\n | { type: 'dispute_details'; object: DisputeResponse }\n | { type: 'mandate_details'; object: MandateResponse }\n | { type: 'payout_details'; object: PayoutResponse }\n | { type: 'subscription_details'; object: SubscriptionWebhookContent }\n | { type: 'shop_risk_details'; object: ShopRiskEscalationWebhook }\n | { type: 'buyer_risk_alert_details'; object: BuyerRiskAlertWebhook }\n | { type: 'merchant_invoice_details'; object: MerchantInvoiceWebhook };\n\n/**\n * Whether a `subscription_details` payload is a lifecycle snapshot\n * ({@link LifecycleWebhook}) rather than a cycle chargeback or a paid invoice.\n *\n * Three shapes share `content.type`; what marks a lifecycle snapshot on the\n * wire is `transition_id`, which neither of the other two carries. Narrowing\n * on it — rather than on `event_type` — keeps a handler correct for a\n * lifecycle event added after it was written. A payload that fails this check\n * is not yet a paid invoice: test {@link isSubscriptionDisputeWebhook} next.\n *\n * @example\n * ```typescript\n * if (event.content.type === 'subscription_details') {\n * const object = event.content.object;\n * if (isSubscriptionLifecycleWebhook(object)) {\n * object.status; // SubscriptionStatus at the transition\n * object.cancel_at_period_end; // true for a scheduled cancellation\n * } else if (isSubscriptionDisputeWebhook(object)) {\n * object.amount; // what this chargeback took from the cycle\n * } else {\n * object.invoice; // the paid invoice\n * }\n * }\n * ```\n */\nexport function isSubscriptionLifecycleWebhook(\n object: SubscriptionWebhookContent,\n): object is LifecycleWebhook {\n return typeof (object as Partial<LifecycleWebhook>).transition_id === 'string';\n}\n\n/**\n * Whether a `subscription_details` payload is a chargeback against a\n * subscription cycle ({@link SubscriptionDisputeWebhook}, sent as\n * `invoice_disputed`).\n *\n * It is the only `subscription_details` shape that carries\n * `connector_dispute_id`; neither a lifecycle snapshot nor a paid invoice does.\n */\nexport function isSubscriptionDisputeWebhook(\n object: SubscriptionWebhookContent,\n): object is SubscriptionDisputeWebhook {\n return typeof (object as Partial<SubscriptionDisputeWebhook>).connector_dispute_id === 'string';\n}\n\n/**\n * A parsed and verified Delopay webhook event.\n *\n * Matches the signed wire body exactly:\n * `{ merchant_id, event_id, event_type, content: { type, object }, timestamp }`.\n *\n * - `event_type` identifies the event, e.g. `'payment_succeeded'`.\n * - `content.type` tags the payload kind, e.g. `'payment_details'`.\n * - `content.object` is the payload; narrow on `content.type` to type it.\n */\nexport interface WebhookEvent {\n /** ID of the merchant that owns this event. */\n merchant_id: string;\n /** Unique ID for this event (stable across delivery retries). */\n event_id: string;\n /** Event type identifier, e.g. `'payment_succeeded'` or `'refund_succeeded'`. */\n event_type: EventType;\n /** The event payload, tagged by kind. Narrow on `content.type` to type `object`. */\n content: WebhookContent;\n /** ISO 8601 timestamp at which the webhook was sent. */\n timestamp: string;\n}\n\nfunction hexToBytes(hex: string): Uint8Array | null {\n if (hex.length === 0 || hex.length % 2 !== 0) return null;\n const bytes = new Uint8Array(hex.length / 2);\n for (let i = 0; i < hex.length; i += 2) {\n const byte = Number.parseInt(hex.slice(i, i + 2), 16);\n if (Number.isNaN(byte)) return null;\n bytes[i / 2] = byte;\n }\n return bytes;\n}\n\nexport const Webhooks = {\n /**\n * Verify the signature of an incoming Delopay webhook and return the parsed event.\n *\n * Delopay signs each outgoing webhook with HMAC-SHA512 over the raw request body,\n * using your shop's webhook secret (the *payment response hash key* configured on\n * the shop). The hex-encoded digest is delivered in the `X-Webhook-Signature-512`\n * HTTP header.\n *\n * Uses the Web Crypto API (`globalThis.crypto.subtle`), so it runs unchanged in\n * Node 18+, modern browsers, Deno, Bun, and edge runtimes (Cloudflare Workers, Vercel Edge).\n *\n * Available as a static property on the `Delopay` class\n * (`Delopay.webhooks.verify`) and does not require a client instance.\n *\n * @param rawBody - The raw request body. Pass the original bytes (`Uint8Array` /\n * `Buffer`) when possible; if you pass a string, it must be the unmodified UTF-8\n * text of the request body. Do **not** parse it before passing.\n * @param signatureHeader - The value of the `X-Webhook-Signature-512` HTTP header.\n * @param secret - Your shop's webhook signing secret.\n * @returns Promise that resolves to the parsed webhook event.\n * @throws {Error} When the signature header is malformed or does not match the body.\n *\n * @example\n * ```typescript\n * // Express example\n * app.post('/webhook', express.raw({ type: 'application/json' }), async (req, res) => {\n * try {\n * const event = await Delopay.webhooks.verify(\n * req.body, // Buffer from express.raw()\n * req.header('x-webhook-signature-512') ?? '',\n * process.env.DELOPAY_WEBHOOK_SECRET!,\n * );\n * console.log(event.event_type, event.content.object);\n * res.sendStatus(200);\n * } catch {\n * res.status(400).send('Invalid signature');\n * }\n * });\n * ```\n */\n async verify(\n rawBody: string | Uint8Array,\n signatureHeader: string,\n secret: string,\n ): Promise<WebhookEvent> {\n const subtle = globalThis.crypto?.subtle;\n if (!subtle) {\n throw new Error(\n 'Web Crypto unavailable: Delopay.webhooks.verify requires globalThis.crypto.subtle (Node 18+, modern browsers, Workers, Deno)',\n );\n }\n\n const signatureBytes = hexToBytes(signatureHeader.trim());\n if (!signatureBytes) {\n throw new Error('Invalid webhook signature format');\n }\n\n const encoder = new TextEncoder();\n const bodyBytes = typeof rawBody === 'string' ? encoder.encode(rawBody) : rawBody;\n\n // `TextEncoder.encode` returns `Uint8Array<ArrayBufferLike>` in current lib.dom.d.ts,\n // but `crypto.subtle.*` wants `BufferSource` (backed by `ArrayBuffer`). At runtime the\n // underlying buffer is always an `ArrayBuffer` — cast to quiet the type checker.\n const asBufferSource = (bytes: Uint8Array): BufferSource => bytes as unknown as BufferSource;\n const key = await subtle.importKey(\n 'raw',\n asBufferSource(encoder.encode(secret)),\n { name: 'HMAC', hash: 'SHA-512' },\n false,\n ['verify'],\n );\n\n const valid = await subtle.verify(\n 'HMAC',\n key,\n asBufferSource(signatureBytes),\n asBufferSource(bodyBytes),\n );\n\n if (!valid) {\n throw new Error('Invalid webhook signature');\n }\n\n const bodyText =\n typeof rawBody === 'string' ? rawBody : new TextDecoder('utf-8').decode(rawBody);\n return JSON.parse(bodyText) as WebhookEvent;\n },\n};\n"]}
|
|
1
|
+
{"version":3,"sources":["/home/anes/delo-payment/sdk-publish-w2/dist/chunk-R4FE6K43.cjs","../src/resources/webhooks.ts"],"names":[],"mappings":"AAAA;ACgEO,SAAS,8BAAA,CACd,MAAA,EAC4B;AAC5B,EAAA,OAAO,OAA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CAAA;AAAA,EAC5B;AACF,CAAA;ADlHA;AACA;AACE;AACA;AACA;AACF,0KAAC","file":"/home/anes/delo-payment/sdk-publish-w2/dist/chunk-R4FE6K43.cjs","sourcesContent":[null,"import type {\n EventType,\n PaymentResponse,\n RefundResponse,\n DisputeResponse,\n MandateResponse,\n PayoutResponse,\n LifecycleWebhook,\n SubscriptionDisputeWebhook,\n SubscriptionWebhookContent,\n ShopRiskEscalationWebhook,\n BuyerRiskAlertWebhook,\n MerchantInvoiceWebhook,\n} from '../types';\n\n/**\n * The payload of a webhook event, tagged by kind.\n *\n * Mirrors the backend's `{ \"type\": …, \"object\": … }` envelope: `type` names the\n * payload shape and `object` carries it. Narrow on `content.type` to get a\n * fully-typed `object`:\n *\n * ```typescript\n * if (event.content.type === 'payment_details') {\n * event.content.object.payment_id; // typed as PaymentResponse\n * }\n * ```\n */\nexport type WebhookContent =\n | { type: 'payment_details'; object: PaymentResponse }\n | { type: 'refund_details'; object: RefundResponse }\n | { type: 'dispute_details'; object: DisputeResponse }\n | { type: 'mandate_details'; object: MandateResponse }\n | { type: 'payout_details'; object: PayoutResponse }\n | { type: 'subscription_details'; object: SubscriptionWebhookContent }\n | { type: 'shop_risk_details'; object: ShopRiskEscalationWebhook }\n | { type: 'buyer_risk_alert_details'; object: BuyerRiskAlertWebhook }\n | { type: 'merchant_invoice_details'; object: MerchantInvoiceWebhook };\n\n/**\n * Whether a `subscription_details` payload is a lifecycle snapshot\n * ({@link LifecycleWebhook}) rather than a cycle chargeback or a paid invoice.\n *\n * Three shapes share `content.type`; what marks a lifecycle snapshot on the\n * wire is `transition_id`, which neither of the other two carries. Narrowing\n * on it — rather than on `event_type` — keeps a handler correct for a\n * lifecycle event added after it was written. A payload that fails this check\n * is not yet a paid invoice: test {@link isSubscriptionDisputeWebhook} next.\n *\n * @example\n * ```typescript\n * if (event.content.type === 'subscription_details') {\n * const object = event.content.object;\n * if (isSubscriptionLifecycleWebhook(object)) {\n * object.status; // SubscriptionStatus at the transition\n * object.cancel_at_period_end; // true for a scheduled cancellation\n * } else if (isSubscriptionDisputeWebhook(object)) {\n * object.amount; // what this chargeback took from the cycle\n * } else {\n * object.invoice; // the paid invoice\n * }\n * }\n * ```\n */\nexport function isSubscriptionLifecycleWebhook(\n object: SubscriptionWebhookContent,\n): object is LifecycleWebhook {\n return typeof (object as Partial<LifecycleWebhook>).transition_id === 'string';\n}\n\n/**\n * Whether a `subscription_details` payload is a chargeback against a\n * subscription cycle ({@link SubscriptionDisputeWebhook}, sent as\n * `invoice_disputed`).\n *\n * It is the only `subscription_details` shape that carries\n * `connector_dispute_id`; neither a lifecycle snapshot nor a paid invoice does.\n */\nexport function isSubscriptionDisputeWebhook(\n object: SubscriptionWebhookContent,\n): object is SubscriptionDisputeWebhook {\n return typeof (object as Partial<SubscriptionDisputeWebhook>).connector_dispute_id === 'string';\n}\n\n/**\n * A parsed and verified Delopay webhook event.\n *\n * Matches the signed wire body exactly:\n * `{ merchant_id, event_id, event_type, content: { type, object }, timestamp }`.\n *\n * - `event_type` identifies the event, e.g. `'payment_succeeded'`.\n * - `content.type` tags the payload kind, e.g. `'payment_details'`.\n * - `content.object` is the payload; narrow on `content.type` to type it.\n */\nexport interface WebhookEvent {\n /** ID of the merchant that owns this event. */\n merchant_id: string;\n /** Unique ID for this event (stable across delivery retries). */\n event_id: string;\n /** Event type identifier, e.g. `'payment_succeeded'` or `'refund_succeeded'`. */\n event_type: EventType;\n /** The event payload, tagged by kind. Narrow on `content.type` to type `object`. */\n content: WebhookContent;\n /** ISO 8601 timestamp at which the webhook was sent. */\n timestamp: string;\n}\n\nfunction hexToBytes(hex: string): Uint8Array | null {\n if (hex.length === 0 || hex.length % 2 !== 0) return null;\n const bytes = new Uint8Array(hex.length / 2);\n for (let i = 0; i < hex.length; i += 2) {\n const byte = Number.parseInt(hex.slice(i, i + 2), 16);\n if (Number.isNaN(byte)) return null;\n bytes[i / 2] = byte;\n }\n return bytes;\n}\n\nexport const Webhooks = {\n /**\n * Verify the signature of an incoming Delopay webhook and return the parsed event.\n *\n * Delopay signs each outgoing webhook with HMAC-SHA512 over the raw request body,\n * using your shop's webhook secret (the *payment response hash key* configured on\n * the shop). The hex-encoded digest is delivered in the `X-Webhook-Signature-512`\n * HTTP header.\n *\n * Uses the Web Crypto API (`globalThis.crypto.subtle`), so it runs unchanged in\n * Node 18+, modern browsers, Deno, Bun, and edge runtimes (Cloudflare Workers, Vercel Edge).\n *\n * Available as a static property on the `Delopay` class\n * (`Delopay.webhooks.verify`) and does not require a client instance.\n *\n * @param rawBody - The raw request body. Pass the original bytes (`Uint8Array` /\n * `Buffer`) when possible; if you pass a string, it must be the unmodified UTF-8\n * text of the request body. Do **not** parse it before passing.\n * @param signatureHeader - The value of the `X-Webhook-Signature-512` HTTP header.\n * @param secret - Your shop's webhook signing secret.\n * @returns Promise that resolves to the parsed webhook event.\n * @throws {Error} When the signature header is malformed or does not match the body.\n *\n * @example\n * ```typescript\n * // Express example\n * app.post('/webhook', express.raw({ type: 'application/json' }), async (req, res) => {\n * try {\n * const event = await Delopay.webhooks.verify(\n * req.body, // Buffer from express.raw()\n * req.header('x-webhook-signature-512') ?? '',\n * process.env.DELOPAY_WEBHOOK_SECRET!,\n * );\n * console.log(event.event_type, event.content.object);\n * res.sendStatus(200);\n * } catch {\n * res.status(400).send('Invalid signature');\n * }\n * });\n * ```\n */\n async verify(\n rawBody: string | Uint8Array,\n signatureHeader: string,\n secret: string,\n ): Promise<WebhookEvent> {\n const subtle = globalThis.crypto?.subtle;\n if (!subtle) {\n throw new Error(\n 'Web Crypto unavailable: Delopay.webhooks.verify requires globalThis.crypto.subtle (Node 18+, modern browsers, Workers, Deno)',\n );\n }\n\n const signatureBytes = hexToBytes(signatureHeader.trim());\n if (!signatureBytes) {\n throw new Error('Invalid webhook signature format');\n }\n\n const encoder = new TextEncoder();\n const bodyBytes = typeof rawBody === 'string' ? encoder.encode(rawBody) : rawBody;\n\n // `TextEncoder.encode` returns `Uint8Array<ArrayBufferLike>` in current lib.dom.d.ts,\n // but `crypto.subtle.*` wants `BufferSource` (backed by `ArrayBuffer`). At runtime the\n // underlying buffer is always an `ArrayBuffer` — cast to quiet the type checker.\n const asBufferSource = (bytes: Uint8Array): BufferSource => bytes as unknown as BufferSource;\n const key = await subtle.importKey(\n 'raw',\n asBufferSource(encoder.encode(secret)),\n { name: 'HMAC', hash: 'SHA-512' },\n false,\n ['verify'],\n );\n\n const valid = await subtle.verify(\n 'HMAC',\n key,\n asBufferSource(signatureBytes),\n asBufferSource(bodyBytes),\n );\n\n if (!valid) {\n throw new Error('Invalid webhook signature');\n }\n\n const bodyText =\n typeof rawBody === 'string' ? rawBody : new TextDecoder('utf-8').decode(rawBody);\n return JSON.parse(bodyText) as WebhookEvent;\n },\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/
|
|
1
|
+
{"version":3,"sources":["/home/anes/delo-payment/sdk-publish-w2/dist/chunk-R4GA6BVP.cjs","../src/internal/resources/auditLogs.ts"],"names":[],"mappings":"AAAA;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACA;ACUO,IAAM,UAAA,EAAN,MAAgB;AAAA,EACrB,WAAA,CAA6B,OAAA,EAAoB;AAApB,IAAA,IAAA,CAAA,QAAA,EAAA,OAAA;AAAA,EAAqB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOlD,MAAM,IAAA,CAAK,MAAA,EAA4D;AACrE,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,KAAA,EAAO,qBAAA,EAAuB;AAAA,MAChD,KAAA,EAAO,wCAAA,MAAS,EAAQ,CAAC,QAAA,EAAU,aAAa,CAAC;AAAA,IACnD,CAAC,CAAA;AAAA,EACH;AAAA,EAEA,MAAM,QAAA,CAAS,KAAA,EAA0C;AACvD,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,KAAA,EAAO,CAAA,oBAAA,EAAuB,kBAAA,CAAmB,KAAK,CAAC,CAAA,CAAA;AAC7E,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAYqF,EAAA;AACvE,IAAA;AACV,MAAA;AACwD,MAAA;AAC1D,IAAA;AACF,EAAA;AA6B6D,EAAA;AACpD,IAAA;AACA,MAAA;AACL,MAAA;AACA,MAAA;AAAA;AAAA;AAAA;AAIqD,MAAA;AACrD,MAAA;AACF,IAAA;AACF,EAAA;AACF;ADrCgF;AACA;AACA;AACA","file":"/home/anes/delo-payment/sdk-publish-w2/dist/chunk-R4GA6BVP.cjs","sourcesContent":[null,"import type {\n AuditLogListParams,\n AuditLogListResponse,\n AuditLogResponse,\n ShopCheckoutStateListResponse,\n} from '../types';\nimport type { AdminAuditLogExportRecord } from '../types';\nimport type {\n BinaryExportOptions,\n ExportEnvelope,\n ExportOptions,\n JsonExportOptions,\n} from '../../types';\nimport type { RequestFn } from '../../client';\nimport { runExport } from '../../exportDownload';\nimport { csvQuery } from '../../listQuery';\n\nexport class AuditLogs {\n constructor(private readonly request: RequestFn) {}\n\n /**\n * One page of the platform audit log, the newest entry first unless\n * `sort_by` says otherwise. Several `action` or `entity_type` values match\n * an entry with any of them.\n */\n async list(params?: AuditLogListParams): Promise<AuditLogListResponse> {\n return this.request('GET', '/admin-portal/audit', {\n query: csvQuery(params, ['action', 'entity_type']),\n });\n }\n\n async retrieve(logId: string): Promise<AuditLogResponse> {\n return this.request('GET', `/admin-portal/audit/${encodeURIComponent(logId)}`);\n }\n\n /**\n * What each shop of a merchant can take at its Live and its Test checkout\n * now. `GET /admin-portal/accounts/{merchant_id}/checkout-state`\n *\n * Every shop of the merchant is listed, with the number of accounts that\n * can take a payment at each checkout. For an account a checkout does not\n * use, `blocks` names who hid it or switched it off in the shop and why;\n * `idle_accounts` names the accounts that take no payments for a reason of\n * their own, such as missing credentials for that environment.\n */\n async shopCheckoutStates(merchantId: string): Promise<ShopCheckoutStateListResponse> {\n return this.request(\n 'GET',\n `/admin-portal/accounts/${encodeURIComponent(merchantId)}/checkout-state`,\n );\n }\n\n /**\n * The platform audit log as a file. `GET /admin-portal/audit/export`\n *\n * Takes the same filters as {@link AuditLogs.list}, and returns the whole\n * match set rather than a page — bounded at 25,000 rows (500 for `pdf`), and\n * refused past that with `DE_07` rather than truncated. `csv` and `json` are\n * streamed and held to their `X-Delopay-Record-Count`; see\n * {@link ExportTransferOptions} for progress, cancellation and the\n * `EXPORT_INCOMPLETE` check.\n *\n * Columns answer the question an audit asks rather than mirroring the\n * dashboard table: the actor, the real actor behind an impersonation, the\n * action, its target, when, and from where. `details` is deliberately absent —\n * an unbounded per-action blob is unreadable in a spreadsheet cell.\n */\n async export(\n params?: AuditLogListParams,\n options?: JsonExportOptions,\n ): Promise<ExportEnvelope<AdminAuditLogExportRecord>>;\n async export(params: AuditLogListParams | undefined, options: BinaryExportOptions): Promise<Blob>;\n async export(\n params: AuditLogListParams | undefined,\n options: ExportOptions,\n ): Promise<ExportEnvelope<AdminAuditLogExportRecord> | Blob>;\n async export(\n params?: AuditLogListParams,\n options?: ExportOptions,\n ): Promise<ExportEnvelope<AdminAuditLogExportRecord> | Blob> {\n return runExport(\n this.request,\n 'GET',\n '/admin-portal/audit/export',\n // The format is negotiated by `Accept`, never a query field: the query\n // here is the list's own filter model, and adding a key to it would fork\n // the filter vocabulary the export exists to reuse.\n { query: csvQuery(params, ['action', 'entity_type']) },\n options,\n );\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/
|
|
1
|
+
{"version":3,"sources":["/home/anes/delo-payment/sdk-publish-w2/dist/chunk-R5VYSZ3Q.cjs","../src/resources/events.ts"],"names":[],"mappings":"AAAA;ACSO,IAAM,OAAA,EAAN,MAAa;AAAA,EAClB,WAAA,CAA6B,OAAA,EAAoB;AAApB,IAAA,IAAA,CAAA,QAAA,EAAA,OAAA;AAAA,EAAqB;AAAA,EAElD,MAAM,IAAA,CAAK,UAAA,EAAoB,MAAA,EAAsD;AACnF,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,MAAA,EAAQ,CAAA,QAAA,EAAW,kBAAA,CAAmB,UAAU,CAAC,CAAA,CAAA;AACvE,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUgG,EAAA;AAClF,IAAA;AACV,MAAA;AACgE,MAAA;AAClE,IAAA;AACF,EAAA;AAEuF,EAAA;AACzE,IAAA;AACV,MAAA;AACgE,MAAA;AAClE,IAAA;AACF,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAcuC,EAAA;AACgC,IAAA;AACvE,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAW0E,EAAA;AACJ,IAAA;AACtE,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAS6F,EAAA;AAC5B,IAAA;AACjE,EAAA;AACF;ADf0E;AACA;AACA;AACA","file":"/home/anes/delo-payment/sdk-publish-w2/dist/chunk-R5VYSZ3Q.cjs","sourcesContent":[null,"import type {\n EventListParams,\n EventListResponse,\n EventDetailResponse,\n EventManualTriggerRequest,\n EventManualTriggerResponse,\n} from '../types';\nimport type { RequestFn } from '../client';\n\nexport class Events {\n constructor(private readonly request: RequestFn) {}\n\n async list(merchantId: string, params?: EventListParams): Promise<EventListResponse> {\n return this.request('POST', `/events/${encodeURIComponent(merchantId)}`, { body: params });\n }\n\n /**\n * Every delivery attempt of one event, initial attempt first.\n * `GET /events/{merchant_id}/{event_id}/attempts`\n *\n * Each entry describes one attempt: `attempt_delivered` is that attempt's own\n * result, while `is_delivery_successful` and `delivery_terminal_reason` are\n * the event's and read the same on every entry.\n */\n async listDeliveryAttempts(merchantId: string, eventId: string): Promise<EventDetailResponse[]> {\n return this.request(\n 'GET',\n `/events/${encodeURIComponent(merchantId)}/${encodeURIComponent(eventId)}/attempts`,\n );\n }\n\n async retryDelivery(merchantId: string, eventId: string): Promise<EventDetailResponse> {\n return this.request(\n 'POST',\n `/events/${encodeURIComponent(merchantId)}/${encodeURIComponent(eventId)}/retry`,\n );\n }\n\n /**\n * Fire an outgoing webhook event by hand for one object.\n * `POST /events/{merchant_id}/trigger`\n *\n * Not a replay — see {@link EventManualTriggerRequest}. Needs the\n * `WebhookEventTrigger` permission, which is separate from the one that\n * authorizes {@link retryDelivery}, and is JWT-only: a forged payload must\n * be attributable to a person.\n */\n async trigger(\n merchantId: string,\n body: EventManualTriggerRequest,\n ): Promise<EventManualTriggerResponse> {\n return this.request('POST', `/events/${encodeURIComponent(merchantId)}/trigger`, { body });\n }\n\n // --- Profile-scoped listing (Task 4.12) ---\n\n /**\n * List events (profile-scoped). `POST /events/profile/list`\n *\n * Takes the same constraints as {@link list} — it is the same endpoint\n * narrowed to the caller's own shop, so `profile_id` is redundant and\n * ignored there.\n */\n async listByProfile(params?: EventListParams): Promise<EventListResponse> {\n return this.request('POST', '/events/profile/list', { body: params });\n }\n\n /**\n * Fire an outgoing webhook event by hand (profile-scoped).\n * `POST /events/profile/trigger`\n *\n * The shop-user twin of {@link trigger}; the shop is taken from the auth\n * context, so `profile_id` on the body is ignored.\n */\n async triggerByProfile(body: EventManualTriggerRequest): Promise<EventManualTriggerResponse> {\n return this.request('POST', '/events/profile/trigger', { body });\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/
|
|
1
|
+
{"version":3,"sources":["/home/anes/delo-payment/sdk-publish-w2/dist/chunk-RHFUXHQN.cjs","../src/resources/aiTools.ts"],"names":[],"mappings":"AAAA;ACQA,IAAM,iBAAA,EAAmB,CAAC,cAAA,EAAwB,QAAA,EAAA,GAChD,CAAA,2BAAA,EAA8B,kBAAA,CAAmB,cAAc,CAAC,CAAA,CAAA,EAAI,QAAQ,CAAA,CAAA;AAgBzD;AAC8B,EAAA;AAApB,IAAA;AAAqB,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUV,EAAA;AACmB,IAAA;AACH,MAAA;AACrD,IAAA;AACH,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASiF,EAAA;AACR,IAAA;AACzE,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOiF,EAAA;AACR,IAAA;AACzE,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAO4D,EAAA;AACL,IAAA;AACvD,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQuD,EAAA;AACkC,IAAA;AACzF,EAAA;AACF;AD3BkI;AACA;AACA;AACA","file":"/home/anes/delo-payment/sdk-publish-w2/dist/chunk-RHFUXHQN.cjs","sourcesContent":[null,"import type {\n McpConfirmationEntry,\n McpConfirmationListParams,\n McpConfirmationListResponse,\n McpConnectionListResponse,\n} from '../types';\nimport type { RequestFn } from '../client';\n\nconst confirmationPath = (confirmationId: string, decision: 'approve' | 'decline'): string =>\n `/account/mcp/confirmations/${encodeURIComponent(confirmationId)}/${decision}`;\n\n/**\n * AI tools that work in the merchant account through the MCP server: the\n * confirmations they ask for, and the tools connected by signing in.\n *\n * A sensitive change an AI tool makes, such as a refund, a deletion or an\n * access change, waits for a person's confirmation. When the tool cannot ask\n * in the agent, the confirmation waits here for a decision.\n *\n * Every method needs a signed-in dashboard user and acts on the merchant of\n * that sign-in. A user sees the confirmations of their own sign-ins and their\n * own connected tools; a user whose role may manage API keys sees every one of\n * the merchant's. A sign-in's confirmation is decided only by the user who\n * signed in, an API key's by a user whose role may manage API keys.\n */\nexport class AiTools {\n constructor(private readonly request: RequestFn) {}\n\n /**\n * The confirmations this user may see, newest first: by default those\n * waiting for a decision and not expired, or every one with\n * `{ status: 'all' }`.\n * `GET /account/mcp/confirmations`\n */\n async listConfirmations(\n params: McpConfirmationListParams = {},\n ): Promise<McpConfirmationListResponse> {\n return this.request('GET', '/account/mcp/confirmations', {\n query: params.status ? { status: params.status } : {},\n });\n }\n\n /**\n * Approve a pending confirmation. The AI tool can then make the confirmed\n * change once, for the same request, before the confirmation expires.\n * Refused with 400 when it is no longer pending, 403 when this user may not\n * decide it, and 404 for an unknown confirmation.\n * `POST /account/mcp/confirmations/{confirmationId}/approve`\n */\n async approveConfirmation(confirmationId: string): Promise<McpConfirmationEntry> {\n return this.request('POST', confirmationPath(confirmationId, 'approve'));\n }\n\n /**\n * Decline a pending confirmation; the change is not made. Refused like\n * {@link AiTools.approveConfirmation}.\n * `POST /account/mcp/confirmations/{confirmationId}/decline`\n */\n async declineConfirmation(confirmationId: string): Promise<McpConfirmationEntry> {\n return this.request('POST', confirmationPath(confirmationId, 'decline'));\n }\n\n /**\n * The AI tools connected to the merchant by signing in, newest first: this\n * user's own, or every user's for a role that may manage API keys.\n * `GET /account/mcp/connections`\n */\n async listConnections(): Promise<McpConnectionListResponse> {\n return this.request('GET', '/account/mcp/connections');\n }\n\n /**\n * Remove a connected AI tool by revoking its sign-in; its next request is\n * refused. Refused with 403 when it is neither this user's tool nor the role\n * may manage API keys, and 404 for an unknown one.\n * `DELETE /account/mcp/connections/{grantId}`\n */\n async removeConnection(grantId: string): Promise<void> {\n return this.request('DELETE', `/account/mcp/connections/${encodeURIComponent(grantId)}`);\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/
|
|
1
|
+
{"version":3,"sources":["/home/anes/delo-payment/sdk-publish-w2/dist/chunk-RI42IDRR.cjs","../src/resources/profileAcquirers.ts"],"names":[],"mappings":"AAAA;ACOO,IAAM,iBAAA,EAAN,MAAuB;AAAA,EAC5B,WAAA,CAA6B,OAAA,EAAoB;AAApB,IAAA,IAAA,CAAA,QAAA,EAAA,OAAA;AAAA,EAAqB;AAAA,EAElD,MAAM,MAAA,CAAO,MAAA,EAAwE;AACnF,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,MAAA,EAAQ,mBAAA,EAAqB,EAAE,IAAA,EAAM,OAAO,CAAC,CAAA;AAAA,EACnE;AAAA,EAEA,MAAM,MAAA,CACJ,SAAA,EACA,iBAAA,EACA,MAAA,EACkC;AAClC,IAAA,OAAO,IAAA,CAAK,OAAA;AAAA,MACV,MAAA;AAAA,MACA,CAAA,kBAAA,EAAqB,kBAAA,CAAmB,SAAS,CAAC,CAAA,CAAA,EAAI,kBAAA,CAAmB,iBAAiB,CAAC,CAAA,CAAA;AAC3F,MAAA;AACQ,QAAA;AACR,MAAA;AACF,IAAA;AACF,EAAA;AACF;ADTkG;AACA;AACA;AACA","file":"/home/anes/delo-payment/sdk-publish-w2/dist/chunk-RI42IDRR.cjs","sourcesContent":[null,"import type {\n ProfileAcquirerCreateRequest,\n ProfileAcquirerResponse,\n ProfileAcquirerUpdateRequest,\n} from '../types';\nimport type { RequestFn } from '../client';\n\nexport class ProfileAcquirers {\n constructor(private readonly request: RequestFn) {}\n\n async create(params: ProfileAcquirerCreateRequest): Promise<ProfileAcquirerResponse> {\n return this.request('POST', '/profile-acquirer', { body: params });\n }\n\n async update(\n profileId: string,\n profileAcquirerId: string,\n params: ProfileAcquirerUpdateRequest,\n ): Promise<ProfileAcquirerResponse> {\n return this.request(\n 'POST',\n `/profile-acquirer/${encodeURIComponent(profileId)}/${encodeURIComponent(profileAcquirerId)}`,\n {\n body: params,\n },\n );\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/
|
|
1
|
+
{"version":3,"sources":["/home/anes/delo-payment/sdk-publish-w2/dist/chunk-RSVLVW4L.cjs","../src/resources/buyerBlocklist.ts"],"names":[],"mappings":"AAAA;AACE;AACF,wDAA6B;AAC7B;AACA;ACkCO,IAAM,eAAA,EAAN,MAAqB;AAAA,EAC1B,WAAA,CAA6B,OAAA,EAAoB;AAApB,IAAA,IAAA,CAAA,QAAA,EAAA,OAAA;AAAA,EAAqB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASlD,MAAM,IAAA,CAAK,MAAA,EAAuE;AAChF,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,KAAA,EAAO,kB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AACF,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOwF,EAAA;AAC1E,IAAA;AACV,MAAA;AACsE,MAAA;AACxE,IAAA;AACF,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQ4E,EAAA;AACb,IAAA;AAC/D,EAAA;AACF;ADxDkF;AACA;AACA;AACA","file":"/home/anes/delo-payment/sdk-publish-w2/dist/chunk-RSVLVW4L.cjs","sourcesContent":[null,"import type {\n BuyerBlocklistCapabilitiesResponse,\n BuyerBlocklistEntryCreateRequest,\n BuyerBlocklistEntryDeleteRequest,\n BuyerBlocklistEntryResponse,\n BuyerBlocklistEventsQuery,\n BuyerBlocklistEventsResponse,\n BuyerBlocklistFromPaymentPreviewRequest,\n BuyerBlocklistFromPaymentPreviewResponse,\n BuyerBlocklistFromPaymentRequest,\n BuyerBlocklistListQuery,\n BuyerBlocklistListResponse,\n PaymentFraudSignalsResponse,\n RadarSyncSettingsListResponse,\n RadarSyncSettingsResponse,\n RadarSyncSettingsUpdateRequest,\n} from '../types';\nimport type { RequestFn } from '../client';\nimport { csvQuery } from '../listQuery';\n\n/**\n * Buyer blocklist: the buyers a merchant refuses to sell to again, in every\n * shop of the merchant or in one shop. One entry names the buyer by email\n * address, IP address, IP range, customer id, device id, Stripe card\n * fingerprint and card BIN, at most one of each and at least one in total,\n * and blocks a payment when any one of them matches. An entry can instead\n * block a class of network (hosting, VPN or proxy, Tor, residential proxy) on its own. A blocked buyer's hosted checkout\n * and confirms fail with error code `DE_14`, and the payments create\n * response marks the buyer with `buyer_blocked` and the entry's\n * `buyer_block_note`. Card fingerprints, emails, IPs and BINs can also be\n * copied to Stripe Radar value lists per Stripe connection; a Radar list\n * blocks only once its rule is added in Stripe (`rule_needed`).\n *\n * Every route needs a dashboard session. Reading needs the `BuyerBlocklist`\n * area at `Read`, adding and removing needs `Write`. A caller scoped to one\n * shop lists, adds and removes that shop's entries only, and never an entry\n * that blocks in every shop.\n */\nexport class BuyerBlocklist {\n constructor(private readonly request: RequestFn) {}\n\n /**\n * One page of blocked buyers, newest first unless `sort_by` says otherwise,\n * filtered by scope, by `kind` (the entries that include an identifier of\n * that kind, or of any of several) and by a search over every identifier\n * and the note. Expired entries are not listed.\n * `GET /buyer-blocklist`\n */\n async list(params?: BuyerBlocklistListQuery): Promise<BuyerBlocklistListResponse> {\n return this.request('GET', '/buyer-blocklist', {\n query: csvQuery(params, ['kind']),\n });\n }\n\n /**\n * Block a buyer in one shop or, without `profile_id`, in every shop of the\n * merchant, named by one or more of `email`, `ip`, `customer_id` and\n * `device_id`. Each identifier is normalised as it is matched; an\n * identifier another entry already names in that scope is refused. The\n * change is recorded in the audit log before it is made.\n * `POST /buyer-blocklist`\n */\n async create(params: BuyerBlocklistEntryCreateRequest): Promise<BuyerBlocklistEntryResponse> {\n return this.request('POST', '/buyer-blocklist', { body: params });\n }\n\n /**\n * Remove an entry, so the buyer can pay again. Payments the entry already\n * refused keep their status. The removal and the optional `reason` are\n * recorded in the audit log before it is made. The route requires a body,\n * so `{}` is sent when no reason is given.\n * `DELETE /buyer-blocklist/{entry_id}`\n */\n async delete(\n entryId: string,\n params?: BuyerBlocklistEntryDeleteRequest,\n ): Promise<BuyerBlocklistEntryResponse> {\n return this.request('DELETE', `/buyer-blocklist/${encodeURIComponent(entryId)}`, {\n body: params ?? {},\n });\n }\n\n /**\n * Block the buyer of a payment by the identifiers the payment carries:\n * its card (the Stripe fingerprint), email, IP, device or customer, in the\n * payment's shop or in every shop. With `all_ips`, also every address the\n * buyer was seen paying from, one entry each, grouped under one\n * `group_id`; the answer then carries `ip_snapshot`.\n * `POST /buyer-blocklist/from-payment`\n */\n async createFromPayment(\n params: BuyerBlocklistFromPaymentRequest,\n ): Promise<BuyerBlocklistEntryResponse> {\n return this.request('POST', '/buyer-blocklist/from-payment', { body: params });\n }\n\n /**\n * The addresses an \"all IPs\" block of a payment's buyer would take: the\n * payment's own, then those its device, email or card were seen at in the\n * last 90 days, newest first, at most 20. An address shared with two or\n * more other buyers is offered but not preselected. Writes nothing; needs\n * the same permissions as the block.\n * `POST /buyer-blocklist/from-payment/preview`\n */\n async previewFromPayment(\n params: BuyerBlocklistFromPaymentPreviewRequest,\n ): Promise<BuyerBlocklistFromPaymentPreviewResponse> {\n return this.request('POST', '/buyer-blocklist/from-payment/preview', { body: params });\n }\n\n /**\n * An entry's recorded refusals, newest first, with where each happened and\n * which identifier matched. A caller scoped to one shop reaches only its own\n * shop's entries.\n * `GET /buyer-blocklist/{entry_id}/events`\n */\n async listEvents(\n entryId: string,\n params?: BuyerBlocklistEventsQuery,\n ): Promise<BuyerBlocklistEventsResponse> {\n return this.request('GET', `/buyer-blocklist/${encodeURIComponent(entryId)}/events`, {\n query: params as Record<string, string | number | null | undefined>,\n });\n }\n\n /**\n * Which classes of network an `ip_class` entry can be judged by on this\n * deployment now, and by which sources.\n * `GET /buyer-blocklist/capabilities`\n */\n async capabilities(): Promise<BuyerBlocklistCapabilitiesResponse> {\n return this.request('GET', '/buyer-blocklist/capabilities');\n }\n\n /**\n * Retry now every failed or pending Radar sync of an entry.\n * `POST /buyer-blocklist/{entry_id}/sync/retry`\n */\n async retrySync(entryId: string): Promise<BuyerBlocklistEntryResponse> {\n return this.request('POST', `/buyer-blocklist/${encodeURIComponent(entryId)}/sync/retry`);\n }\n\n /**\n * The Radar sync settings of every Stripe connection the caller sees. A\n * role that hides processor names is refused (403).\n * `GET /buyer-blocklist/radar-sync`\n */\n async listRadarSync(): Promise<RadarSyncSettingsListResponse> {\n return this.request('GET', '/buyer-blocklist/radar-sync');\n }\n\n /**\n * The Radar sync settings of one Stripe connection.\n * `GET /buyer-blocklist/radar-sync/{merchant_connector_id}`\n */\n async retrieveRadarSync(merchantConnectorId: string): Promise<RadarSyncSettingsResponse> {\n return this.request(\n 'GET',\n `/buyer-blocklist/radar-sync/${encodeURIComponent(merchantConnectorId)}`,\n );\n }\n\n /**\n * Turn Radar sync on or off for one Stripe connection and set what an\n * early fraud warning or a review does.\n * `PUT /buyer-blocklist/radar-sync/{merchant_connector_id}`\n */\n async updateRadarSync(\n merchantConnectorId: string,\n params: RadarSyncSettingsUpdateRequest,\n ): Promise<RadarSyncSettingsResponse> {\n return this.request(\n 'PUT',\n `/buyer-blocklist/radar-sync/${encodeURIComponent(merchantConnectorId)}`,\n { body: params },\n );\n }\n\n /**\n * Remove every item DeloPay synced from this connection's Radar lists. The\n * lists themselves are kept.\n * `POST /buyer-blocklist/radar-sync/{merchant_connector_id}/remove-items`\n */\n async removeRadarItems(merchantConnectorId: string): Promise<RadarSyncSettingsResponse> {\n return this.request(\n 'POST',\n `/buyer-blocklist/radar-sync/${encodeURIComponent(merchantConnectorId)}/remove-items`,\n );\n }\n\n /**\n * Stripe's fraud signals on a payment (risk, early fraud warnings,\n * reviews), what of its buyer can be blocked, and the entries that\n * already match it.\n * `GET /buyer-blocklist/fraud-signals/{payment_id}`\n */\n async fraudSignals(paymentId: string): Promise<PaymentFraudSignalsResponse> {\n return this.request('GET', `/buyer-blocklist/fraud-signals/${encodeURIComponent(paymentId)}`);\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/
|
|
1
|
+
{"version":3,"sources":["/home/anes/delo-payment/sdk-publish-w2/dist/chunk-S77LQWYC.cjs","../src/internal/resources/platformSettings.ts"],"names":[],"mappings":"AAAA;ACoBO,IAAM,iBAAA,EAAN,MAAuB;AAAA,EAC5B,WAAA,CAA6B,OAAA,EAAoB;AAApB,IAAA,IAAA,CAAA,QAAA,EAAA,OAAA;AAAA,EAAqB;AAAA;AAAA,EAGlD,MAAM,6BAAA,CAAA,EAAwE;AAC5E,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,KAAA,EAAO,gDAAgD,CAAA;AAAA,EAC7E;AAAA;AAAA,EAGA,MAAM,0BAAA,CACJ,SAAA,EACA,gBAAA,EAC2B;AAC3B,IAAA,OAAO,IAAA,CAAK,MAAA,CAAO;AAAA,MACjB,OAAA,EAAS;AAAA,QAC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AAA;AAAA,MACA,CAAA,uBAAA,EAA0B,kBAAA,CAAmB,UAAU,CAAC,CAAA,mBAAA;AAAA,IAC1D,CAAA;AAAA,EACF;AAAA;AAAA,EAGA,MAAM,YAAA,CAAa,UAAA,EAAoB,SAAA,EAA8C;AACnF,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,KAAA,EAAO,QAAA,CAAS,UAAA,EAAY,SAAS,CAAC,CAAA;AAAA,EAC5D;AAAA;AAAA,EAGA,MAAM,UAAA,CACJ,UAAA,EACA,SAAA,EACA,MAAA,EAC2B;AAC3B,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,OAAA,EAAS,QAAA,CAAS,UAAA,EAAY,SAAS,CAAA,EAAG,EAAE,IAAA,EAAM,OAAO,CAAC,CAAA;AAAA,EAChF;AACF,CAAA;AAEA,SAAS,QAAA,CAAS,UAAA,EAAoB,SAAA,EAA2B;AAC/D,EAAA,OAAO,CAAA,uBAAA,EAA0B,kBAAA,CAAmB,UAAU,CAAC,CAAA,OAAA,EAAU,kBAAA,CAAmB,SAAS,CAAC,CAAA,SAAA,CAAA;AACxG;AAGA,SAAS,YAAA,CAAa,KAAA,EAAsD;AAC1E,EAAA,OAAO,KAAA,CAAM,WAAA,EAAa,EAAE,UAAA,EAAY,KAAA,CAAM,WAAW,EAAA,EAAI,CAAC,CAAA;AAChE;AD1CA;AACA;AACE;AACF,4CAAC","file":"/home/anes/delo-payment/sdk-publish-w2/dist/chunk-S77LQWYC.cjs","sourcesContent":[null,"import type { RequestFn } from '../../client';\nimport type { SettingOverridesResponse } from '../types';\nimport type {\n ApplePayVerificationCatalogue,\n ApplePayVerificationSelection,\n MerchantSettingsQuery,\n SettingsResponse,\n UpdateSettingsRequest,\n} from '../../types';\n\n/**\n * Settings as the platform operator sees them: the platform's own, and the\n * operator's values at any merchant, project or shop.\n *\n * Each setting names the admin permission group needed to change it. Every\n * change is recorded in the audit log with the previous and the new value\n * (`entity_type: 'setting'`); `auditLogs.list({ entity_type: 'setting',\n * entity_id })` is one setting's history. A merchant's own values are listed\n * (`authority: 'merchant'`) but can only be changed by the merchant.\n */\nexport class PlatformSettings {\n constructor(private readonly request: RequestFn) {}\n\n /** Provider-issued presets for this backend environment. */\n async applePayVerificationCatalogue(): Promise<ApplePayVerificationCatalogue> {\n return this.request('GET', '/payment-link/apple-pay-verification/catalogue');\n }\n\n /** Atomic, audited update. A stale revision leaves the current file unchanged. */\n async updateApplePayVerification(\n selection: ApplePayVerificationSelection,\n expectedRevision: number,\n ): Promise<SettingsResponse> {\n return this.update({\n changes: [\n {\n key: 'checkout.apple_pay_verification',\n value: selection,\n expected_revision: expectedRevision,\n },\n ],\n });\n }\n\n /** `GET /admin-portal/settings` */\n async retrieve(): Promise<SettingsResponse> {\n return this.request('GET', '/admin-portal/settings');\n }\n\n /**\n * Change platform settings. All changes are applied or none is.\n *\n * `PATCH /admin-portal/settings`\n */\n async update(params: UpdateSettingsRequest): Promise<SettingsResponse> {\n return this.request('PATCH', '/admin-portal/settings', { body: params });\n }\n\n /** `GET /admin-portal/accounts/{merchantId}/settings` */\n async retrieveMerchant(\n merchantId: string,\n query: MerchantSettingsQuery = {},\n ): Promise<SettingsResponse> {\n return this.request(\n 'GET',\n `/admin-portal/accounts/${encodeURIComponent(merchantId)}/settings`,\n {\n query: projectQuery(query),\n },\n );\n }\n\n /** `PATCH /admin-portal/accounts/{merchantId}/settings` */\n async updateMerchant(\n merchantId: string,\n params: UpdateSettingsRequest,\n query: MerchantSettingsQuery = {},\n ): Promise<SettingsResponse> {\n return this.request(\n 'PATCH',\n `/admin-portal/accounts/${encodeURIComponent(merchantId)}/settings`,\n { body: params, query: projectQuery(query) },\n );\n }\n\n /**\n * `GET /admin-portal/accounts/{merchantId}/settings/overrides`\n *\n * Which of the merchant's projects and shops carry an operator setting of\n * their own, in one call instead of one settings read per project and shop.\n * A store named in `not_read` could not be read: treat its settings as\n * unknown, not as unset.\n */\n async listMerchantOverrides(merchantId: string): Promise<SettingOverridesResponse> {\n return this.request(\n 'GET',\n `/admin-portal/accounts/${encodeURIComponent(merchantId)}/settings/overrides`,\n );\n }\n\n /** `GET /admin-portal/accounts/{merchantId}/shops/{profileId}/settings` */\n async retrieveShop(merchantId: string, profileId: string): Promise<SettingsResponse> {\n return this.request('GET', shopPath(merchantId, profileId));\n }\n\n /** `PATCH /admin-portal/accounts/{merchantId}/shops/{profileId}/settings` */\n async updateShop(\n merchantId: string,\n profileId: string,\n params: UpdateSettingsRequest,\n ): Promise<SettingsResponse> {\n return this.request('PATCH', shopPath(merchantId, profileId), { body: params });\n }\n}\n\nfunction shopPath(merchantId: string, profileId: string): string {\n return `/admin-portal/accounts/${encodeURIComponent(merchantId)}/shops/${encodeURIComponent(profileId)}/settings`;\n}\n\n/** The query string of a merchant-scope call; a null project is omitted. */\nfunction projectQuery(query: MerchantSettingsQuery): Record<string, string> {\n return query.project_id ? { project_id: query.project_id } : {};\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/
|
|
1
|
+
{"version":3,"sources":["/home/anes/delo-payment/sdk-publish-w2/dist/chunk-S7SBNOGS.cjs","../src/resources/operationLimits.ts"],"names":[],"mappings":"AAAA;ACsCO,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,EAOlD,MAAM,SAAA,CACJ,MAAA,EACA,OAAA,EAC+B;AAC/B,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,KAAA,EAAO,yBAAA,EAA2B;AAAA,MACpD,KAAA,EAAO,EAAE,SAAA,kBAAW,MAAA,2BAAQ,YAAU,CAAA;AAAA,MACtC,GAAG;AAAA,IACL,CAAC,CAAA;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,MAAM,UAAA,CACJ,MAAA,EACA,OAA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;ADzEwF;AACA;AACA;AACA","file":"/home/anes/delo-payment/sdk-publish-w2/dist/chunk-S7SBNOGS.cjs","sourcesContent":[null,"import type {\n DecidePendingOperationRequest,\n OperationLimitHistoryParams,\n OperationLimitHistoryResponse,\n OperationLimitRule,\n OperationLimitRuleDeleteResponse,\n OperationLimitRuleListParams,\n OperationLimitSettings,\n OperationLimitUsage,\n OperationLimitUsageParams,\n PendingOperation,\n PendingOperationListParams,\n PendingOperationListResponse,\n UpdateOperationLimitSettingsRequest,\n UpsertOperationLimitRuleRequest,\n} from '../types';\nimport type { RequestExtras, RequestFn } from '../client';\n\n/**\n * Per-operation spending limits: rules scoped to the merchant, a role, a\n * user or an API key, on the entire account or one shop, the merchant-level\n * enforcement settings, the version history and the approvals inbox.\n * Enforcement resolves the most specific rule: api_key > user > role >\n * merchant, a shop rule before the account rule at each level, and a\n * switched-off rule at any applicable level wins.\n *\n * A rule set to `require_approval` does not refuse an over-limit operation —\n * it parks it. The original call fails with HTTP 409 `DE_06` carrying\n * `PendingApprovalErrorDetails`, and the operation runs only once a second\n * person approves the request through this inbox.\n *\n * **Refunds only.** Approval needs an executor that can run the operation\n * after the decision, and only refunds have one; every other operation takes\n * `block` alone, which the request type enforces. So every request in this\n * inbox is a refund, and `DE_06` never comes back from any other call — an\n * over-limit settlement adjustment, payout or subscription change fails with\n * `DE_01`.\n */\nexport class OperationLimits {\n constructor(private readonly request: RequestFn) {}\n\n /**\n * List the merchant's limit rules, optionally for one operation.\n *\n * `GET /operation-limits/rules`\n */\n async listRules(\n params?: OperationLimitRuleListParams,\n options?: RequestExtras,\n ): Promise<OperationLimitRule[]> {\n return this.request('GET', '/operation-limits/rules', {\n query: { operation: params?.operation },\n ...options,\n });\n }\n\n /**\n * Create or replace the limit rule for one target. Full-replace upsert:\n * absent limit fields clear that dimension.\n *\n * `PUT /operation-limits/rules`\n */\n async upsertRule(\n params: UpsertOperationLimitRuleRequest,\n options?: RequestExtras,\n ): Promise<OperationLimitRule> {\n return this.request('PUT', '/operation-limits/rules', { body: params, ...options });\n }\n\n /**\n * Delete a limit rule.\n *\n * `DELETE /operation-limits/rules/{ruleId}`\n */\n async deleteRule(\n ruleId: string,\n options?: RequestExtras,\n ): Promise<OperationLimitRuleDeleteResponse> {\n return this.request('DELETE', `/operation-limits/rules/${encodeURIComponent(ruleId)}`, options);\n }\n\n /**\n * The merchant-level enforcement settings. An untouched merchant gets the\n * defaults: rolling window, admins not exempt.\n *\n * `GET /operation-limits/settings`\n */\n async retrieveSettings(options?: RequestExtras): Promise<OperationLimitSettings> {\n return this.request('GET', '/operation-limits/settings', options);\n }\n\n /**\n * The caller's own usage against the limit on one operation: the rule that\n * applies to them, what they have used in the current window and what\n * remains.\n *\n * Refund usage needs merchant-wide refund read and is refused to a role\n * restricted to some connectors: the totals span every shop and connector,\n * as the budget does. Settlement usage needs merchant settlement read.\n *\n * `GET /operation-limits/usage`\n */\n async retrieveUsage(\n params: OperationLimitUsageParams,\n options?: RequestExtras,\n ): Promise<OperationLimitUsage> {\n return this.request('GET', '/operation-limits/usage', {\n query: { operation: params.operation, profile_id: params.profile_id },\n ...options,\n });\n }\n\n /**\n * The version history of the merchant's limit settings, newest first: every\n * rule created, changed (switched off or on included) or deleted, and every\n * settings change, with who made it (and who really did, under act-as) and\n * the values before and after.\n *\n * `GET /operation-limits/history`\n */\n async listHistory(\n params?: OperationLimitHistoryParams,\n options?: RequestExtras,\n ): Promise<OperationLimitHistoryResponse> {\n return this.request('GET', '/operation-limits/history', {\n query: { limit: params?.limit, before: params?.before },\n ...options,\n });\n }\n\n /**\n * Update the enforcement settings. Only provided fields change.\n *\n * `PUT /operation-limits/settings`\n */\n async updateSettings(\n params: UpdateOperationLimitSettingsRequest,\n options?: RequestExtras,\n ): Promise<OperationLimitSettings> {\n return this.request('PUT', '/operation-limits/settings', { body: params, ...options });\n }\n\n /**\n * The approvals inbox: over-limit operations waiting on a second person.\n *\n * Both filters default rather than widen. With no `status` the list holds\n * **pending requests only** — approved, rejected and expired ones are\n * reachable only by asking for that status, so a history view must pass one\n * per status. With no `operation` it lists **refunds only**; the list is one\n * operation at a time. `limit` defaults to 100 and is clamped to 1–500.\n *\n * Requests past their `expires_at` are expired before the list is read, so\n * nothing here is shown as actionable when it is not.\n *\n * `GET /operation-limits/approvals`\n */\n async listApprovals(\n params?: PendingOperationListParams,\n options?: RequestExtras,\n ): Promise<PendingOperationListResponse> {\n return this.request('GET', '/operation-limits/approvals', {\n query: {\n operation: params?.operation,\n status: params?.status,\n limit: params?.limit,\n },\n ...options,\n });\n }\n\n /**\n * Approve a parked operation and execute it.\n *\n * Refused for the user who requested it, and for an approver whose own\n * limit would not have covered the operation — the permission is necessary\n * and not sufficient. The requester stays refused while signed in as\n * another team member: that is a `DE_12` error (`approval_decision_refused`)\n * whose `data.reason` is `requester_acting_as_another_member`, and\n * {@link reject} refuses the same way.\n *\n * Approval and execution are two facts. A request that was approved but\n * whose operation then failed comes back `approved` with `execution_error`\n * set and no `result_entity_id`; that is a real outcome, not a partial read.\n *\n * `POST /operation-limits/approvals/{id}/approve`\n */\n async approve(\n id: string,\n params: DecidePendingOperationRequest = {},\n options?: RequestExtras,\n ): Promise<PendingOperation> {\n return this.request('POST', `/operation-limits/approvals/${encodeURIComponent(id)}/approve`, {\n body: params,\n ...options,\n });\n }\n\n /**\n * Reject a parked operation. Nothing is executed and the request is closed.\n *\n * `POST /operation-limits/approvals/{id}/reject`\n */\n async reject(\n id: string,\n params: DecidePendingOperationRequest = {},\n options?: RequestExtras,\n ): Promise<PendingOperation> {\n return this.request('POST', `/operation-limits/approvals/${encodeURIComponent(id)}/reject`, {\n body: params,\n ...options,\n });\n }\n}\n"]}
|
|
@@ -151,9 +151,20 @@ var PayoutDestinations = class {
|
|
|
151
151
|
async listMyRevenueShares() {
|
|
152
152
|
return this.request("GET", "/revenue-shares/mine");
|
|
153
153
|
}
|
|
154
|
+
/**
|
|
155
|
+
* Frozen period-report distributions and open carry-over for the holders
|
|
156
|
+
* linked to the caller. Live by default; read-only.
|
|
157
|
+
*
|
|
158
|
+
* `GET /revenue-shares/mine/distributions`
|
|
159
|
+
*/
|
|
160
|
+
async listMyRevenueShareDistributions(params) {
|
|
161
|
+
return this.request("GET", "/revenue-shares/mine/distributions", {
|
|
162
|
+
query: params
|
|
163
|
+
});
|
|
164
|
+
}
|
|
154
165
|
};
|
|
155
166
|
|
|
156
167
|
export {
|
|
157
168
|
PayoutDestinations
|
|
158
169
|
};
|
|
159
|
-
//# sourceMappingURL=chunk-
|
|
170
|
+
//# sourceMappingURL=chunk-T6INFOU2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/resources/payoutDestinations.ts"],"sourcesContent":["import type {\n MyPayoutDestinations,\n MyRevenueShares,\n OfferedMethodsSettings,\n OfferedMethodsSettingsParams,\n OfferedMethodsUpdateParams,\n OfferedPayoutMethods,\n PayoutDestination,\n PayoutDestinationCreateParams,\n PayoutDestinationUpdateParams,\n RevealedPayoutDestination,\n RevenueShareDistributionsParams,\n RevenueShareDistributionsResponse,\n RevenueShareHolder,\n TeamPayoutDestination,\n TeamPayoutDestinations,\n TeamPayoutDestinationsParams,\n} from '../types';\nimport type { RequestFn } from '../client';\n\ntype Query = Record<string, string | number | boolean | null | undefined>;\n\n/**\n * Payouts: how a merchant's team members want to be paid, and which methods\n * the merchant offers them. Nothing here moves money.\n *\n * Dashboard (JWT) routes only; no API key reaches them. The merchant, the\n * member and the shop come from the token. Keeping one's own details needs\n * the Payouts view permission (`ProfilePayoutDestinationRead`); the team's\n * details and the offered methods need Payouts manage\n * (`ProfilePayoutDestinationWrite`, `MerchantPayoutDestinationWrite` for the\n * merchant's list). A session acting as someone else (act-as, a support\n * switch) may read and may not change or reveal anything (403, `IR_22`). A\n * stale `version` or `expected_revision` answers 400 with `code` `IR_16` and\n * `data.reason: 'changed_elsewhere'`.\n */\nexport class PayoutDestinations {\n constructor(private readonly request: RequestFn) {}\n\n /**\n * The caller's own destinations, masked, and the methods offered to them.\n *\n * `GET /payout-destinations/me`\n */\n async listMine(): Promise<MyPayoutDestinations> {\n return this.request('GET', '/payout-destinations/me');\n }\n\n /**\n * Save a destination. The method must be offered; at most 20 per member.\n *\n * `POST /payout-destinations/me`\n */\n async createMine(params: PayoutDestinationCreateParams): Promise<PayoutDestination> {\n return this.request('POST', '/payout-destinations/me', { body: params });\n }\n\n /**\n * Replace a destination's details at the version read.\n *\n * `PUT /payout-destinations/me/{destinationId}`\n */\n async updateMine(\n destinationId: string,\n params: PayoutDestinationUpdateParams,\n ): Promise<PayoutDestination> {\n return this.request('PUT', `/payout-destinations/me/${encodeURIComponent(destinationId)}`, {\n body: params,\n });\n }\n\n /**\n * Make a destination the preferred one; the others lose it.\n *\n * `POST /payout-destinations/me/{destinationId}/preferred`\n */\n async preferMine(destinationId: string, version: number): Promise<PayoutDestination> {\n return this.request(\n 'POST',\n `/payout-destinations/me/${encodeURIComponent(destinationId)}/preferred`,\n { body: { version } },\n );\n }\n\n /**\n * Delete a destination. Final: the history keeps who, when and which\n * fields, never a value.\n *\n * `DELETE /payout-destinations/me/{destinationId}?version=`\n */\n async deleteMine(destinationId: string, version: number): Promise<void> {\n await this.request('DELETE', `/payout-destinations/me/${encodeURIComponent(destinationId)}`, {\n query: { version },\n });\n }\n\n /**\n * One's own destination in plain text. Recorded in the history first.\n *\n * `POST /payout-destinations/me/{destinationId}/reveal`\n */\n async revealMine(destinationId: string): Promise<RevealedPayoutDestination> {\n return this.request(\n 'POST',\n `/payout-destinations/me/${encodeURIComponent(destinationId)}/reveal`,\n );\n }\n\n /**\n * The methods offered to the caller.\n *\n * `GET /payout-destinations/methods`\n */\n async offeredMethods(): Promise<OfferedPayoutMethods> {\n return this.request('GET', '/payout-destinations/methods');\n }\n\n /**\n * The merchant's list and, with `shop_id`, one shop's. A shop role reads\n * its own shop only.\n *\n * `GET /payout-destinations/methods/settings`\n */\n async retrieveMethodsSettings(\n params?: OfferedMethodsSettingsParams,\n ): Promise<OfferedMethodsSettings> {\n return this.request('GET', '/payout-destinations/methods/settings', {\n query: params as Query | undefined,\n });\n }\n\n /**\n * Set the methods offered at the merchant or at one shop.\n *\n * `PUT /payout-destinations/methods/settings`\n */\n async updateMethodsSettings(params: OfferedMethodsUpdateParams): Promise<OfferedMethodsSettings> {\n return this.request('PUT', '/payout-destinations/methods/settings', { body: params });\n }\n\n /**\n * The team's destinations the caller manages, masked: every member for a\n * merchant-level role, the members reaching the caller's shop for a shop\n * role.\n *\n * `GET /payout-destinations`\n */\n async listTeam(params?: TeamPayoutDestinationsParams): Promise<TeamPayoutDestinations> {\n return this.request('GET', '/payout-destinations', { query: params as Query | undefined });\n }\n\n /**\n * A managed member's destination in plain text. Recorded in the history\n * first.\n *\n * `POST /payout-destinations/{destinationId}/reveal`\n */\n async revealTeam(destinationId: string): Promise<RevealedPayoutDestination> {\n return this.request('POST', `/payout-destinations/${encodeURIComponent(destinationId)}/reveal`);\n }\n\n /**\n * Confirm a changed destination was seen, at the version read.\n *\n * `POST /payout-destinations/{destinationId}/acknowledge`\n */\n async acknowledgeTeam(destinationId: string, version: number): Promise<TeamPayoutDestination> {\n return this.request(\n 'POST',\n `/payout-destinations/${encodeURIComponent(destinationId)}/acknowledge`,\n { body: { version } },\n );\n }\n\n /**\n * Link a revenue-share holder to a team member, or unlink it (`null`). The\n * member must be an active member of the merchant whose role reads Payouts.\n *\n * `PUT /revenue-shares/holders/{holderId}/member`\n */\n async linkRevenueShareHolder(\n holderId: string,\n userId: string | null,\n ): Promise<RevenueShareHolder> {\n return this.request('PUT', `/revenue-shares/holders/${encodeURIComponent(holderId)}/member`, {\n body: { user_id: userId },\n });\n }\n\n /**\n * The merchant's revenue-share holders, each with the team member it is\n * linked to, if any.\n *\n * `GET /revenue-shares/holders?merchant_id={merchantId}`\n */\n async listRevenueShareHolders(merchantId: string): Promise<RevenueShareHolder[]> {\n return this.request('GET', '/revenue-shares/holders', {\n query: { merchant_id: merchantId },\n });\n }\n\n /**\n * The share terms of the holders linked to the caller. Read-only.\n *\n * `GET /revenue-shares/mine`\n */\n async listMyRevenueShares(): Promise<MyRevenueShares> {\n return this.request('GET', '/revenue-shares/mine');\n }\n\n /**\n * Frozen period-report distributions and open carry-over for the holders\n * linked to the caller. Live by default; read-only.\n *\n * `GET /revenue-shares/mine/distributions`\n */\n async listMyRevenueShareDistributions(\n params?: RevenueShareDistributionsParams,\n ): Promise<RevenueShareDistributionsResponse> {\n return this.request('GET', '/revenue-shares/mine/distributions', {\n query: params as Query | undefined,\n });\n }\n}\n"],"mappings":";AAoCO,IAAM,qBAAN,MAAyB;AAAA,EAC9B,YAA6B,SAAoB;AAApB;AAAA,EAAqB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOlD,MAAM,WAA0C;AAC9C,WAAO,KAAK,QAAQ,OAAO,yBAAyB;AAAA,EACtD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,MAAM,WAAW,QAAmE;AAClF,WAAO,KAAK,QAAQ,QAAQ,2BAA2B,EAAE,MAAM,OAAO,CAAC;AAAA,EACzE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,MAAM,WACJ,eACA,QAC4B;AAC5B,WAAO,KAAK,QAAQ,OAAO,2BAA2B,mBAAmB,aAAa,CAAC,IAAI;AAAA,MACzF,MAAM;AAAA,IACR,CAAC;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,MAAM,WAAW,eAAuB,SAA6C;AACnF,WAAO,KAAK;AAAA,MACV;AAAA,MACA,2BAA2B,mBAAmB,aAAa,CAAC;AAAA,MAC5D,EAAE,MAAM,EAAE,QAAQ,EAAE;AAAA,IACtB;AAAA,EACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,MAAM,WAAW,eAAuB,SAAgC;AACtE,UAAM,KAAK,QAAQ,UAAU,2BAA2B,mBAAmB,aAAa,CAAC,IAAI;AAAA,MAC3F,OAAO,EAAE,QAAQ;AAAA,IACnB,CAA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