@delopay/sdk 0.494.0 → 0.495.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/cardFormStyles.cjs.map +1 -1
- package/dist/checkoutSession.cjs.map +1 -1
- 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-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-5CITBN33.cjs.map +1 -1
- package/dist/chunk-5HCKC4HF.cjs.map +1 -1
- package/dist/chunk-5O2JSQYA.cjs.map +1 -1
- package/dist/chunk-5QS67SBO.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-7JV6VVO7.cjs.map +1 -1
- package/dist/chunk-7NKJD5ST.cjs.map +1 -1
- 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-AYUYJO3I.cjs.map +1 -1
- 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-BT3UAUEV.cjs.map +1 -1
- package/dist/chunk-CAMALM35.cjs.map +1 -1
- package/dist/chunk-CCN44NZJ.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-EYHSXJMJ.cjs.map +1 -1
- package/dist/chunk-F3I5DOWV.cjs.map +1 -1
- package/dist/chunk-F46K5H3U.cjs.map +1 -1
- package/dist/chunk-F6QJB4XP.cjs.map +1 -1
- package/dist/chunk-F6S3WCCB.cjs.map +1 -1
- package/dist/chunk-FQRC4NJG.cjs.map +1 -1
- package/dist/chunk-FTWGI7UZ.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-GLQ7EJAH.cjs.map +1 -1
- package/dist/chunk-GSQN5EOO.cjs.map +1 -1
- package/dist/chunk-GW7IHYXR.cjs.map +1 -1
- package/dist/chunk-GWSVQXEY.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-J5RPSRBQ.cjs.map +1 -1
- package/dist/chunk-JPPRDMTJ.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-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-MLG6NXI6.cjs.map +1 -1
- package/dist/chunk-MYAXAWBQ.cjs.map +1 -1
- package/dist/chunk-NFB3S2E6.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-OFZJ4JAH.cjs.map +1 -1
- package/dist/chunk-OG2KJAYD.cjs.map +1 -1
- package/dist/chunk-OMQK3CMR.cjs.map +1 -1
- package/dist/chunk-OYZP6NF6.cjs.map +1 -1
- package/dist/chunk-P4UILJVU.cjs.map +1 -1
- package/dist/chunk-P7DYLUUI.cjs.map +1 -1
- package/dist/chunk-PKAE6AQT.cjs.map +1 -1
- package/dist/chunk-PYNHK6AP.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-QYNRNDIY.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-S77LQWYC.cjs.map +1 -1
- package/dist/chunk-S7SBNOGS.cjs.map +1 -1
- 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-UTCXNBID.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-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-XPSN5YYU.cjs.map +1 -1
- package/dist/chunk-XQLRIBVR.cjs.map +1 -1
- package/dist/chunk-Y7LSSRNJ.cjs.map +1 -1
- package/dist/chunk-YFRAI34Y.cjs.map +1 -1
- package/dist/chunk-YK3P5QNZ.cjs.map +1 -1
- package/dist/chunk-YW4DVKNT.cjs.map +1 -1
- package/dist/chunk-YWN76H2W.cjs.map +1 -1
- package/dist/chunk-ZGMIHHGL.cjs.map +1 -1
- package/dist/chunk-ZKPVUCQV.cjs.map +1 -1
- package/dist/chunk-ZUULK36E.cjs.map +1 -1
- package/dist/client.cjs.map +1 -1
- package/dist/core.cjs.map +1 -1
- 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/feeProgram.cjs.map +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/internal/resources/admin.cjs.map +1 -1
- package/dist/internal/resources/admin.d.cts +1 -1
- package/dist/internal/resources/admin.d.ts +1 -1
- package/dist/internal/resources/adminBranding.cjs.map +1 -1
- package/dist/internal/resources/adminBranding.d.cts +1 -1
- package/dist/internal/resources/adminBranding.d.ts +1 -1
- package/dist/internal/resources/adminCheckoutDomains.cjs.map +1 -1
- package/dist/internal/resources/adminCheckoutDomains.d.cts +1 -1
- package/dist/internal/resources/adminCheckoutDomains.d.ts +1 -1
- package/dist/internal/resources/adminFeePlans.cjs.map +1 -1
- package/dist/internal/resources/adminFeePlans.d.cts +1 -1
- package/dist/internal/resources/adminFeePlans.d.ts +1 -1
- package/dist/internal/resources/adminFileScans.cjs.map +1 -1
- package/dist/internal/resources/adminFileScans.d.cts +1 -1
- package/dist/internal/resources/adminFileScans.d.ts +1 -1
- package/dist/internal/resources/adminIndustries.cjs.map +1 -1
- package/dist/internal/resources/adminIndustries.d.cts +1 -1
- package/dist/internal/resources/adminIndustries.d.ts +1 -1
- package/dist/internal/resources/adminLive.cjs.map +1 -1
- package/dist/internal/resources/adminNotices.cjs.map +1 -1
- package/dist/internal/resources/adminNotices.d.cts +1 -1
- package/dist/internal/resources/adminNotices.d.ts +1 -1
- package/dist/internal/resources/adminPortal.cjs.map +1 -1
- package/dist/internal/resources/adminPortal.d.cts +1 -1
- package/dist/internal/resources/adminPortal.d.ts +1 -1
- package/dist/internal/resources/adminPricing.cjs.map +1 -1
- package/dist/internal/resources/adminPricing.d.cts +1 -1
- package/dist/internal/resources/adminPricing.d.ts +1 -1
- package/dist/internal/resources/adminSupport.cjs.map +1 -1
- package/dist/internal/resources/adminSupport.d.cts +1 -1
- package/dist/internal/resources/adminSupport.d.ts +1 -1
- package/dist/internal/resources/auditLogs.cjs.map +1 -1
- package/dist/internal/resources/auditLogs.d.cts +1 -1
- package/dist/internal/resources/auditLogs.d.ts +1 -1
- package/dist/internal/resources/cache.cjs.map +1 -1
- package/dist/internal/resources/cardIssuers.cjs.map +1 -1
- package/dist/internal/resources/cardIssuers.d.cts +1 -1
- package/dist/internal/resources/cardIssuers.d.ts +1 -1
- package/dist/internal/resources/configs.cjs.map +1 -1
- package/dist/internal/resources/connectorRestrictionRules.cjs.map +1 -1
- package/dist/internal/resources/connectorRestrictionRules.d.cts +1 -1
- package/dist/internal/resources/connectorRestrictionRules.d.ts +1 -1
- package/dist/internal/resources/connectorRestrictions.cjs.map +1 -1
- package/dist/internal/resources/connectorRestrictions.d.cts +1 -1
- package/dist/internal/resources/connectorRestrictions.d.ts +1 -1
- package/dist/internal/resources/diagnostic.cjs.map +1 -1
- package/dist/internal/resources/diagnostic.d.cts +1 -1
- package/dist/internal/resources/diagnostic.d.ts +1 -1
- package/dist/internal/resources/gsm.cjs.map +1 -1
- package/dist/internal/resources/gsm.d.cts +1 -1
- package/dist/internal/resources/gsm.d.ts +1 -1
- package/dist/internal/resources/nativeRenewals.cjs.map +1 -1
- package/dist/internal/resources/nativeRenewals.d.cts +1 -1
- package/dist/internal/resources/nativeRenewals.d.ts +1 -1
- package/dist/internal/resources/platformBilling.cjs.map +1 -1
- package/dist/internal/resources/platformBilling.d.cts +1 -1
- package/dist/internal/resources/platformBilling.d.ts +1 -1
- package/dist/internal/resources/platformFees.cjs.map +1 -1
- package/dist/internal/resources/platformMessageTemplates.cjs.map +1 -1
- package/dist/internal/resources/platformSettings.cjs.map +1 -1
- package/dist/internal/resources/platformSettings.d.cts +1 -1
- package/dist/internal/resources/platformSettings.d.ts +1 -1
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +1 -1
- package/dist/internal.d.ts +1 -1
- package/dist/listQuery.cjs.map +1 -1
- package/dist/panes.cjs.map +1 -1
- package/dist/paymentPresentation.cjs.map +1 -1
- package/dist/recordCounter.cjs.map +1 -1
- package/dist/resources/aiTools.cjs.map +1 -1
- package/dist/resources/analytics.cjs.map +1 -1
- package/dist/resources/analyticsDashboard.cjs.map +1 -1
- package/dist/resources/apiKeys.cjs.map +1 -1
- package/dist/resources/audit.cjs.map +1 -1
- package/dist/resources/authentication.cjs.map +1 -1
- package/dist/resources/availabilityOverrides.cjs.map +1 -1
- package/dist/resources/billing.cjs.map +1 -1
- package/dist/resources/buyerAccount.cjs.map +1 -1
- package/dist/resources/buyerBlocklist.cjs.map +1 -1
- package/dist/resources/buyerConversations.cjs.map +1 -1
- package/dist/resources/buyerEvidenceReviews.cjs.map +1 -1
- package/dist/resources/buyerPortal.cjs.map +1 -1
- package/dist/resources/cards.cjs.map +1 -1
- package/dist/resources/chargebackPrevention.cjs.map +1 -1
- package/dist/resources/checkoutDomains.cjs.map +1 -1
- package/dist/resources/checkoutMethods.cjs.map +1 -1
- package/dist/resources/checkoutRecovery.cjs.map +1 -1
- package/dist/resources/checkoutTemplates.cjs.map +1 -1
- package/dist/resources/connectors.cjs.map +1 -1
- package/dist/resources/contentEncryption.cjs.map +1 -1
- package/dist/resources/costRules.cjs.map +1 -1
- package/dist/resources/customers.cjs.map +1 -1
- package/dist/resources/deploymentBranding.cjs.map +1 -1
- package/dist/resources/disputes.cjs.map +1 -1
- package/dist/resources/ephemeralKeys.cjs.map +1 -1
- package/dist/resources/events.cjs.map +1 -1
- package/dist/resources/export.cjs.map +1 -1
- package/dist/resources/externalRecords.cjs.map +1 -1
- package/dist/resources/featureMatrix.cjs.map +1 -1
- package/dist/resources/fees.cjs.map +1 -1
- package/dist/resources/files.cjs.map +1 -1
- package/dist/resources/forex.cjs.map +1 -1
- package/dist/resources/identityVerifications.cjs.map +1 -1
- package/dist/resources/industries.cjs.map +1 -1
- package/dist/resources/invoiceSettings.cjs.map +1 -1
- package/dist/resources/invoices.cjs.map +1 -1
- package/dist/resources/live.cjs.map +1 -1
- package/dist/resources/mandates.cjs.map +1 -1
- package/dist/resources/merchantAccounts.cjs.map +1 -1
- package/dist/resources/messageTemplates.cjs.map +1 -1
- package/dist/resources/notices.cjs.map +1 -1
- package/dist/resources/operationLimits.cjs.map +1 -1
- package/dist/resources/paymentLinks.cjs.map +1 -1
- package/dist/resources/paymentMethods.cjs.map +1 -1
- package/dist/resources/payments.cjs.map +1 -1
- package/dist/resources/payoutDestinations.cjs.map +1 -1
- package/dist/resources/payouts.cjs.map +1 -1
- package/dist/resources/paypalDisputes.cjs.map +1 -1
- package/dist/resources/persons.cjs.map +1 -1
- package/dist/resources/poll.cjs.map +1 -1
- package/dist/resources/processorCosts.cjs.map +1 -1
- package/dist/resources/processorImports.cjs.map +1 -1
- package/dist/resources/products.cjs.map +1 -1
- package/dist/resources/profileAcquirers.cjs.map +1 -1
- package/dist/resources/profiles.cjs.map +1 -1
- package/dist/resources/projects.cjs.map +1 -1
- package/dist/resources/refunds.cjs.map +1 -1
- package/dist/resources/regions.cjs.map +1 -1
- package/dist/resources/relay.cjs.map +1 -1
- package/dist/resources/risk.cjs.map +1 -1
- package/dist/resources/routing.cjs.map +1 -1
- package/dist/resources/search.cjs.map +1 -1
- package/dist/resources/sellToRestrictions.cjs.map +1 -1
- package/dist/resources/settings.cjs.map +1 -1
- package/dist/resources/settlement.cjs.map +1 -1
- package/dist/resources/shareLinks.cjs.map +1 -1
- package/dist/resources/shopLabels.cjs.map +1 -1
- package/dist/resources/shopify.cjs.map +1 -1
- package/dist/resources/shops.cjs.map +1 -1
- package/dist/resources/stripeConnect.cjs.map +1 -1
- package/dist/resources/subscriptions.cjs.map +1 -1
- package/dist/resources/support.cjs.map +1 -1
- package/dist/resources/threeDsRules.cjs.map +1 -1
- package/dist/resources/users.cjs.map +1 -1
- package/dist/resources/vatRates.cjs.map +1 -1
- package/dist/resources/verification.cjs.map +1 -1
- package/dist/resources/webhooks.cjs.map +1 -1
- package/dist/resources/whopResolutionCases.cjs.map +1 -1
- package/dist/trustedOrigins.cjs.map +1 -1
- package/dist/{types-UFZPk6UN.d.cts → types-BWd5W8Eg.d.cts} +7 -0
- package/dist/{types-BtWBzduo.d.ts → types-EnPuyp4N.d.ts} +7 -0
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.cts +7 -0
- package/dist/types.d.ts +7 -0
- package/package.json +17 -19
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/anes/delo-payment/delopay-typescript-sdk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CAAO,IAAA,CAAK,wBAAwB,CAAA,EAAuC;AAC3F,IAAA,MAAM,MAAA,EAAQ,QAAA,CAAS,GAAG,CAAA;AAC1B,IAAA,GAAA,CAAI,MAAA,IAAU,wBAAA,CAAyB,GAAG,CAAA,EAAG,QAAA;AAC7C,IAAA,MAAM,KAAA,EAAO,MAAA,CAAO,KAAK,CAAA;AACzB,IAAA,GAAA,CAAI,IAAA,IAAQ,kBAAA,GAAqB,CAAC,IAAA,CAAK,IAAA,CAAK,CAAA,EAAG,QAAA;AAC/C,IAAA,GAAA,CAAI,GAAG,EAAA,EAAI,IAAA;AAAA,EACb;AACA,EAAA,OAAO,GAAA;AACT;ADvOA;AACA;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,2iDAAC","file":"/home/anes/delo-payment/delopay-typescript-sdk/dist/chunk-5CITBN33.cjs","sourcesContent":[null,"// The Enigma Vault card form's settings.\n//\n// Enigma draws the card form in its own frame and takes a stylesheet built by\n// the router. The router builds it only from closed sets and hex colours, so\n// every property below is one of those. A template is a preset: choosing one\n// writes the properties in `ENIGMA_TEMPLATE_PRESETS` and nothing else, and\n// every property stays editable afterwards.\n//\n// What the router cannot put in the frame, the checkout draws under or over\n// it from the layout the router answers: the fields' names and hints in the\n// buyer's language, the card networks' marks, the security-code icon, the\n// skeleton and the \"Save card\" label. The motion settings are the checkout's\n// alone.\n\n/** How each field's box is drawn. `joined` is the four fields as one block. */\nexport const ENIGMA_FIELD_CHROMES = ['outlined', 'filled', 'underline', 'joined'] as const;\nexport type EnigmaFieldChrome = (typeof ENIGMA_FIELD_CHROMES)[number];\n\n/** Where a field's name is drawn. A joined form always names its fields inside. */\nexport const ENIGMA_LABEL_PLACEMENTS = ['above', 'inside'] as const;\nexport type EnigmaLabelPlacement = (typeof ENIGMA_LABEL_PLACEMENTS)[number];\n\n/** The colour of a name drawn above its field. */\nexport const ENIGMA_LABEL_TONES = ['strong', 'muted'] as const;\nexport type EnigmaLabelTone = (typeof ENIGMA_LABEL_TONES)[number];\n\n/**\n * Which full-width field comes first. `number` is Enigma's own order, so the\n * keyboard walks the fields as drawn; with `name` the Tab key skips back.\n */\nexport const ENIGMA_FIELD_ORDERS = ['number', 'name'] as const;\nexport type EnigmaFieldOrder = (typeof ENIGMA_FIELD_ORDERS)[number];\n\n/**\n * The Visa and Mastercard marks in the number field. `live` keeps only the\n * card's own network once it is known, where the stylesheet has room for it.\n */\nexport const ENIGMA_NETWORK_MARKS = ['live', 'static', 'hidden'] as const;\nexport type EnigmaNetworkMarks = (typeof ENIGMA_NETWORK_MARKS)[number];\n\nexport const ENIGMA_FOCUS_RINGS = ['strong', 'subtle'] as const;\nexport type EnigmaFocusRing = (typeof ENIGMA_FOCUS_RINGS)[number];\n\n/** How a field eases into its focused and invalid states. */\nexport const ENIGMA_FIELD_MOTIONS = ['smooth', 'slow', 'none'] as const;\nexport type EnigmaFieldMotion = (typeof ENIGMA_FIELD_MOTIONS)[number];\n\n/** A field's height in px. */\nexport const ENIGMA_FIELD_HEIGHTS = ['40', '44', '48', '52'] as const;\nexport type EnigmaFieldHeight = (typeof ENIGMA_FIELD_HEIGHTS)[number];\n\n/** The space under a row of fields in px. */\nexport const ENIGMA_ROW_GAPS = ['8', '12', '16'] as const;\nexport type EnigmaRowGap = (typeof ENIGMA_ROW_GAPS)[number];\n\n/** A field's corners: 0, 6, 8, 12 and 22px. */\nexport const ENIGMA_CORNERS = ['square', 'small', 'medium', 'large', 'pill'] as const;\nexport type EnigmaCorner = (typeof ENIGMA_CORNERS)[number];\n\n/** The form built from the properties, or the shop's own stylesheet. */\nexport const ENIGMA_STYLE_MODES = ['designed', 'custom'] as const;\nexport type EnigmaStyleMode = (typeof ENIGMA_STYLE_MODES)[number];\n\n/** How the closed form opens: in place, or growing out of one row. */\nexport const ENIGMA_OPENINGS = ['place', 'expand'] as const;\nexport type EnigmaOpening = (typeof ENIGMA_OPENINGS)[number];\n\n/** What answers the buyer's click on the closed form. */\nexport const ENIGMA_CLICK_FEEDBACK = ['both', 'ring', 'press', 'none'] as const;\nexport type EnigmaClickFeedback = (typeof ENIGMA_CLICK_FEEDBACK)[number];\n\n/** What the fields show while Enigma's form loads. */\nexport const ENIGMA_LOADING_STYLES = [\n 'shimmer',\n 'pulse',\n 'dim',\n 'line',\n 'spinner',\n 'none',\n] as const;\nexport type EnigmaLoadingStyle = (typeof ENIGMA_LOADING_STYLES)[number];\n\n/** How the loaded form appears. */\nexport const ENIGMA_REVEALS = ['fade', 'rise', 'wipe', 'none'] as const;\nexport type EnigmaReveal = (typeof ENIGMA_REVEALS)[number];\n\n/** What the Pay button does while the card is stored and charged. */\nexport const ENIGMA_PAY_FEEDBACK = ['spinner', 'press', 'none'] as const;\nexport type EnigmaPayFeedback = (typeof ENIGMA_PAY_FEEDBACK)[number];\n\n/** The templates, in the order the dashboard offers them. `soft` is the default. */\nexport const ENIGMA_TEMPLATES = [\n 'soft',\n 'fields',\n 'classic',\n 'compact',\n 'filled',\n 'underline',\n] as const;\nexport type EnigmaTemplate = (typeof ENIGMA_TEMPLATES)[number];\n\n/** The longest stylesheet a shop may save; the router refuses a longer one. */\nexport const ENIGMA_CUSTOM_CSS_MAX_LENGTH = 950;\n/** Bounds of the frame height a shop's own stylesheet may ask for. */\nexport const ENIGMA_CUSTOM_HEIGHT_MIN = 120;\nexport const ENIGMA_CUSTOM_HEIGHT_MAX = 600;\nexport const ENIGMA_CUSTOM_HEIGHT_DEFAULT = 260;\n\n/** The Enigma card form's settings, as they sit on `CheckoutBranding`. */\nexport interface EnigmaCardFormSettings {\n /** The template last applied. Only a label: the properties are what draws. */\n enigmaTemplate: EnigmaTemplate;\n enigmaStyleMode: EnigmaStyleMode;\n enigmaChrome: EnigmaFieldChrome;\n enigmaLabels: EnigmaLabelPlacement;\n enigmaLabelTone: EnigmaLabelTone;\n /** Hints in an empty field: `1234 1234 1234 1234`, `MM / YY`, `CVC`. */\n enigmaHints: boolean;\n /** A card icon at the end of the security code field. */\n enigmaCvcIcon: boolean;\n enigmaFieldOrder: EnigmaFieldOrder;\n enigmaMarks: EnigmaNetworkMarks;\n enigmaFocusRing: EnigmaFocusRing;\n enigmaFieldMotion: EnigmaFieldMotion;\n enigmaFieldHeight: EnigmaFieldHeight;\n enigmaRowGap: EnigmaRowGap;\n enigmaCorner: EnigmaCorner;\n /** The focus colour; empty follows the checkout's primary colour. */\n enigmaAccent: string;\n /** The border colour; empty follows the checkout's border colour. */\n enigmaBorder: string;\n /** A filled field's tint; empty mixes the checkout's text into its surface. */\n enigmaFill: string;\n /** The \"encrypted\" line under the Pay button. */\n enigmaTrustLine: boolean;\n /**\n * Open the form without a click. Enigma bills each form opened, so this\n * also bills for buyers who never pay. Off by default.\n */\n enigmaAutoOpen: boolean;\n enigmaOpening: EnigmaOpening;\n enigmaClickFeedback: EnigmaClickFeedback;\n enigmaLoading: EnigmaLoadingStyle;\n enigmaReveal: EnigmaReveal;\n enigmaPayFeedback: EnigmaPayFeedback;\n /** The shop's own stylesheet, used while `enigmaStyleMode` is `custom`. */\n enigmaCustomCss: string;\n /** The frame height that stylesheet needs, in px. */\n enigmaCustomHeight: number;\n}\n\n/** The properties a template sets. */\nexport type EnigmaTemplateProperties = Pick<\n EnigmaCardFormSettings,\n | 'enigmaChrome'\n | 'enigmaLabels'\n | 'enigmaLabelTone'\n | 'enigmaHints'\n | 'enigmaCvcIcon'\n | 'enigmaFieldOrder'\n | 'enigmaMarks'\n | 'enigmaFocusRing'\n | 'enigmaFieldHeight'\n | 'enigmaRowGap'\n | 'enigmaCorner'\n>;\n\n/** What each template writes. Colours, motion and behaviour are never touched. */\nexport const ENIGMA_TEMPLATE_PRESETS: Record<EnigmaTemplate, EnigmaTemplateProperties> = {\n soft: {\n enigmaChrome: 'outlined',\n enigmaLabels: 'above',\n enigmaLabelTone: 'strong',\n enigmaHints: true,\n enigmaCvcIcon: true,\n enigmaFieldOrder: 'number',\n enigmaMarks: 'live',\n enigmaFocusRing: 'strong',\n enigmaFieldHeight: '44',\n enigmaRowGap: '12',\n enigmaCorner: 'medium',\n },\n fields: {\n enigmaChrome: 'outlined',\n enigmaLabels: 'above',\n enigmaLabelTone: 'muted',\n enigmaHints: true,\n enigmaCvcIcon: true,\n enigmaFieldOrder: 'number',\n enigmaMarks: 'live',\n enigmaFocusRing: 'strong',\n enigmaFieldHeight: '48',\n enigmaRowGap: '12',\n enigmaCorner: 'small',\n },\n classic: {\n enigmaChrome: 'outlined',\n enigmaLabels: 'above',\n enigmaLabelTone: 'strong',\n enigmaHints: false,\n enigmaCvcIcon: true,\n enigmaFieldOrder: 'number',\n enigmaMarks: 'live',\n enigmaFocusRing: 'strong',\n enigmaFieldHeight: '44',\n enigmaRowGap: '12',\n enigmaCorner: 'medium',\n },\n compact: {\n enigmaChrome: 'joined',\n enigmaLabels: 'inside',\n enigmaLabelTone: 'muted',\n enigmaHints: false,\n enigmaCvcIcon: true,\n enigmaFieldOrder: 'number',\n enigmaMarks: 'live',\n enigmaFocusRing: 'strong',\n enigmaFieldHeight: '48',\n enigmaRowGap: '12',\n enigmaCorner: 'medium',\n },\n filled: {\n enigmaChrome: 'filled',\n enigmaLabels: 'above',\n enigmaLabelTone: 'strong',\n enigmaHints: false,\n enigmaCvcIcon: true,\n enigmaFieldOrder: 'number',\n enigmaMarks: 'live',\n enigmaFocusRing: 'strong',\n enigmaFieldHeight: '44',\n enigmaRowGap: '12',\n enigmaCorner: 'medium',\n },\n underline: {\n enigmaChrome: 'underline',\n enigmaLabels: 'above',\n enigmaLabelTone: 'muted',\n enigmaHints: false,\n enigmaCvcIcon: true,\n enigmaFieldOrder: 'number',\n enigmaMarks: 'live',\n enigmaFocusRing: 'strong',\n enigmaFieldHeight: '40',\n enigmaRowGap: '16',\n enigmaCorner: 'square',\n },\n};\n\n/** Every Enigma setting's default: the Stripe-like template, opened on click. */\nexport const DEFAULT_ENIGMA_CARD_FORM: EnigmaCardFormSettings = {\n enigmaTemplate: 'soft',\n enigmaStyleMode: 'designed',\n ...ENIGMA_TEMPLATE_PRESETS.soft,\n enigmaFieldMotion: 'smooth',\n enigmaAccent: '',\n enigmaBorder: '',\n enigmaFill: '',\n enigmaTrustLine: true,\n enigmaAutoOpen: false,\n enigmaOpening: 'place',\n enigmaClickFeedback: 'both',\n enigmaLoading: 'shimmer',\n enigmaReveal: 'fade',\n enigmaPayFeedback: 'spinner',\n enigmaCustomCss: '',\n enigmaCustomHeight: ENIGMA_CUSTOM_HEIGHT_DEFAULT,\n};\n\n/** The patch choosing `template` writes: its properties and its name. */\nexport function applyEnigmaTemplate(template: EnigmaTemplate): Partial<EnigmaCardFormSettings> {\n return { enigmaTemplate: template, ...ENIGMA_TEMPLATE_PRESETS[template] };\n}\n\n/** The properties of `settings` that differ from its template's, by key. */\nexport function enigmaTemplateChanges(\n settings: EnigmaCardFormSettings,\n): (keyof EnigmaTemplateProperties)[] {\n const preset = ENIGMA_TEMPLATE_PRESETS[settings.enigmaTemplate];\n return (Object.keys(preset) as (keyof EnigmaTemplateProperties)[]).filter(\n (key) => settings[key] !== preset[key],\n );\n}\n\n/** Whether a field's name sits inside it: always on a joined form. */\nexport function enigmaNamesInside(settings: EnigmaCardFormSettings): boolean {\n return settings.enigmaChrome === 'joined' || settings.enigmaLabels === 'inside';\n}\n\nconst PSEUDO_CLASSES = [\n 'focus',\n 'focus-visible',\n 'focus-within',\n 'hover',\n 'checked',\n 'disabled',\n 'invalid',\n 'valid',\n 'placeholder-shown',\n 'first-child',\n 'last-child',\n];\nconst HIDEABLE = ['p', 'h1', '#header', '#headertext', '.timer', '#timer'];\nconst PROPERTIES = [\n 'color',\n 'caret-color',\n 'accent-color',\n '-webkit-text-fill-color',\n 'background',\n 'background-color',\n 'border',\n 'border-top',\n 'border-right',\n 'border-bottom',\n 'border-left',\n 'border-color',\n 'border-width',\n 'border-style',\n 'border-top-color',\n 'border-right-color',\n 'border-bottom-color',\n 'border-left-color',\n 'border-top-width',\n 'border-right-width',\n 'border-bottom-width',\n 'border-left-width',\n 'border-radius',\n 'border-top-left-radius',\n 'border-top-right-radius',\n 'border-bottom-left-radius',\n 'border-bottom-right-radius',\n 'box-shadow',\n 'outline',\n 'outline-color',\n 'outline-offset',\n 'font',\n 'font-family',\n 'font-size',\n 'font-weight',\n 'font-style',\n 'letter-spacing',\n 'line-height',\n 'text-align',\n 'text-transform',\n 'padding',\n 'padding-top',\n 'padding-right',\n 'padding-bottom',\n 'padding-left',\n 'margin',\n 'margin-top',\n 'margin-right',\n 'margin-bottom',\n 'margin-left',\n 'height',\n 'min-height',\n 'width',\n 'min-width',\n 'max-width',\n 'display',\n 'flex-wrap',\n 'gap',\n 'transition',\n 'box-sizing',\n 'top',\n];\n\n/** A length of at least `min` px (`em`/`rem` at 16px). */\nfunction lengthAtLeast(value: string, min: number): boolean {\n const match = /^(-?[0-9.]+)(px|em|rem)$/.exec(value);\n if (!match) return false;\n const number = Number(match[1]) * (match[2] === 'px' ? 1 : 16);\n return Number.isFinite(number) && number >= min;\n}\n\nfunction spacing(value: string): boolean {\n return value\n .split(' ')\n .every(\n (part) =>\n part === '0' || part === 'auto' || (lengthAtLeast(part, 0) && !lengthAtLeast(part, 48.5)),\n );\n}\n\nfunction width(value: string): boolean {\n if (value === 'auto') return true;\n if (value.endsWith('%')) return Number(value.slice(0, -1)) >= 20;\n const calc = /^calc\\(([0-9.]+)% - ([0-9.]+)px\\)$/.exec(value);\n if (calc) return Number(calc[1]) >= 20 && Number(calc[2]) <= 48;\n if (value.startsWith('calc(')) return false;\n return lengthAtLeast(value, 40);\n}\n\nfunction opaqueColour(value: string): boolean {\n if (value.startsWith('#')) return /^#([0-9a-f]{3}|[0-9a-f]{6})$/.test(value);\n if (value.startsWith('rgb('))\n return value.endsWith(')') && value.split(',').length === 3 && !value.includes('/');\n return value !== 'transparent' && /^[a-z]+$/.test(value);\n}\n\nfunction declarationProblem(selector: string, declaration: string): EnigmaCustomCssProblem | null {\n const at = declaration.indexOf(':');\n if (at < 0) return null;\n const property = declaration.slice(0, at).trim();\n const raw = declaration.slice(at + 1).trim();\n const important = raw.endsWith('!important');\n const value = raw.replace(/!important$/, '').trim();\n if (!PROPERTIES.includes(property)) return 'property';\n if (['var(', 'env(', 'attr('].some((fn) => value.includes(fn))) return 'variable';\n let ok = true;\n switch (property) {\n case 'display': {\n if (important) return 'important_display';\n const hideable = selector.split(',').every((one) => {\n const subject = one.split(/[ >]/).pop() ?? one;\n return HIDEABLE.includes(subject.split(':')[0] ?? subject);\n });\n ok =\n ['block', 'flex', 'grid', 'inline', 'inline-block', 'inline-flex'].includes(value) ||\n (value === 'none' && hideable);\n break;\n }\n case 'margin':\n case 'margin-top':\n case 'margin-right':\n case 'margin-bottom':\n case 'margin-left':\n case 'padding':\n case 'padding-top':\n case 'padding-right':\n case 'padding-bottom':\n case 'padding-left':\n ok = spacing(value);\n break;\n case 'height':\n case 'min-height':\n ok = value === 'auto' || lengthAtLeast(value, 20);\n break;\n case 'width':\n case 'min-width':\n case 'max-width':\n ok = width(value);\n break;\n case 'font-size':\n ok = lengthAtLeast(value, 12);\n break;\n case 'font': {\n const size = value.split(/[ /]/).find((part) => part.endsWith('px') || part.endsWith('em'));\n ok = size !== undefined && lengthAtLeast(size, 12);\n break;\n }\n case 'line-height':\n ok = value === 'normal' || Number(value) >= 1 || lengthAtLeast(value, 12);\n break;\n case 'color':\n case 'caret-color':\n ok = opaqueColour(value);\n break;\n case 'top':\n ok = value === '0' || (/^-?[0-9.]+px$/.test(value) && Math.abs(parseFloat(value)) <= 4);\n break;\n case '-webkit-text-fill-color':\n // Every branch of the selector list must be an empty field: CSS applies\n // the declaration to each branch.\n ok =\n selector\n .split(',')\n .every((one) => (one.split(/[ >]/).pop() ?? '').includes(':placeholder-shown')) ||\n opaqueColour(value);\n break;\n }\n return ok ? null : 'hides_field';\n}\n\nfunction selectorProblem(selector: string): EnigmaCustomCssProblem | null {\n if (!selector || !/^[a-z0-9\\-_#.:,> ]+$/.test(selector) || selector.includes('::'))\n return 'selector';\n const pseudoOk = selector\n .split(':')\n .slice(1)\n .every((after) => PSEUDO_CLASSES.includes(after.split(/[ >,.#]/)[0] ?? after));\n return pseudoOk ? null : 'selector';\n}\n\n/**\n * Why the router would refuse `css` as the shop's own stylesheet, or `null`\n * when it would keep it: the same bounded grammar as the router's check.\n * Only names, ids, classes,\n * spaces, `>` and a few states as selectors; only colours, borders, type,\n * spacing, sizes and simple layout as properties, at values that keep every\n * card field and the \"Save card\" box visible and in place. No quotes. A\n * declaration sits in a rule, never directly in `@media` or outside any block;\n * no rule is nested in another, and no brace or `;` sits inside brackets.\n * The router decides.\n */\nexport function enigmaCustomCssProblem(css: string): EnigmaCustomCssProblem | null {\n if (!css.trim()) return null;\n if (css.length > ENIGMA_CUSTOM_CSS_MAX_LENGTH) return 'too_long';\n // eslint-disable-next-line no-control-regex\n if (/[^\\x20-\\x7e\\n\\r\\t]/.test(css)) return 'not_ascii';\n if (css.includes('<')) return 'markup';\n if (css.includes('\\\\')) return 'escape';\n // A browser keeps `{`, `}` and `;` inside a string as text, and this walk\n // does not; one quoted brace would end the rule here but not there.\n if (/[\"']/.test(css)) return 'quote';\n const lower = css.toLowerCase();\n if (lower.includes('/*')) return 'comment';\n if (\n ['url(', 'image-set(', 'image(', 'element(', 'cross-fade(', 'src(', 'data:'].some((needle) =>\n lower.includes(needle),\n )\n ) {\n return 'loads_resource';\n }\n if (\n ['expression(', 'javascript:', 'behavior', '-moz-binding'].some((needle) =>\n lower.includes(needle),\n )\n ) {\n return 'script';\n }\n if (/@(?!media)/.test(lower)) return 'at_rule';\n\n // Each block's own selector and declarations; a rule inside `@media` is a\n // block of its own. Nothing opens inside a rule: with CSS nesting a browser\n // applies a nested `@media` or rule's declarations to the outer selector,\n // which this walk would not see. A browser also keeps `{`, `}` and `;`\n // inside `(...)` or `[...]` as text, so none may appear there.\n const compact = lower.split(/\\s+/).filter(Boolean).join(' ');\n const blocks: { selector: string; media: boolean }[] = [];\n const brackets: string[] = [];\n let text = '';\n for (const ch of compact) {\n if ((ch === '{' || ch === '}' || ch === ';') && brackets.length > 0) return 'misplaced';\n if (ch === '(' || ch === '[') {\n brackets.push(ch);\n text += ch;\n } else if (ch === ')' || ch === ']') {\n if (brackets.pop() !== (ch === ')' ? '(' : '[')) return 'unbalanced';\n text += ch;\n } else if (ch === '{') {\n const outer = blocks[blocks.length - 1];\n if (outer && !outer.media) return 'misplaced';\n const prelude = text.trim();\n text = '';\n const media = prelude.startsWith('@media');\n if (!media) {\n const problem = selectorProblem(prelude.replace(/, /g, ','));\n if (problem) return problem;\n }\n blocks.push({ selector: prelude, media });\n } else if (ch === '}' || ch === ';') {\n const declaration = text;\n text = '';\n const top = blocks[blocks.length - 1];\n if (!top) {\n if (ch === '}') return 'unbalanced';\n if (declaration.trim()) return 'misplaced';\n continue;\n }\n if (declaration.trim()) {\n if (top.media) return 'misplaced';\n const problem = declarationProblem(top.selector.replace(/, /g, ','), declaration);\n if (problem) return problem;\n }\n if (ch === '}') blocks.pop();\n } else {\n text += ch;\n }\n }\n if (blocks.length > 0 || brackets.length > 0) return 'unbalanced';\n return text.trim() ? 'misplaced' : null;\n}\n\nexport type EnigmaCustomCssProblem =\n | 'too_long'\n | 'not_ascii'\n | 'markup'\n | 'escape'\n | 'quote'\n | 'comment'\n | 'loads_resource'\n | 'script'\n | 'at_rule'\n | 'selector'\n | 'property'\n | 'variable'\n | 'important_display'\n | 'hides_field'\n | 'unbalanced'\n | 'misplaced';\n\n/** A corner's px, as the router draws it. */\nexport function enigmaCornerPx(corner: EnigmaCorner): number {\n return { square: 0, small: 6, medium: 8, large: 12, pill: 22 }[corner];\n}\n\nconst HEX = /^#[0-9a-fA-F]{3}([0-9a-fA-F]{3})?$/;\n\nfunction pick<T extends string>(value: unknown, allowed: readonly T[], fallback: T): T {\n return typeof value === 'string' && (allowed as readonly string[]).includes(value)\n ? (value as T)\n : fallback;\n}\n\nfunction bool(value: unknown, fallback: boolean): boolean {\n if (value === true || value === 'true') return true;\n if (value === false || value === 'false') return false;\n return fallback;\n}\n\nfunction hexOrEmpty(value: unknown): string {\n return typeof value === 'string' && HEX.test(value.trim()) ? value.trim() : '';\n}\n\n/**\n * The Enigma settings stored in `source`: the strings of\n * `sdk_ui_rules.branding`, or the values of a branding export. Anything\n * unreadable takes the default, so a malformed value never costs a checkout.\n */\nexport function decodeEnigmaCardForm(source: Record<string, unknown>): EnigmaCardFormSettings {\n const d = DEFAULT_ENIGMA_CARD_FORM;\n const height = Number(source['enigmaCustomHeight']);\n const css = typeof source['enigmaCustomCss'] === 'string' ? source['enigmaCustomCss'] : '';\n return {\n enigmaTemplate: pick(source['enigmaTemplate'], ENIGMA_TEMPLATES, d.enigmaTemplate),\n enigmaStyleMode: pick(source['enigmaStyleMode'], ENIGMA_STYLE_MODES, d.enigmaStyleMode),\n enigmaChrome: pick(source['enigmaChrome'], ENIGMA_FIELD_CHROMES, d.enigmaChrome),\n enigmaLabels: pick(source['enigmaLabels'], ENIGMA_LABEL_PLACEMENTS, d.enigmaLabels),\n enigmaLabelTone: pick(source['enigmaLabelTone'], ENIGMA_LABEL_TONES, d.enigmaLabelTone),\n enigmaHints: bool(source['enigmaHints'], d.enigmaHints),\n enigmaCvcIcon: bool(source['enigmaCvcIcon'], d.enigmaCvcIcon),\n enigmaFieldOrder: pick(source['enigmaFieldOrder'], ENIGMA_FIELD_ORDERS, d.enigmaFieldOrder),\n enigmaMarks: pick(source['enigmaMarks'], ENIGMA_NETWORK_MARKS, d.enigmaMarks),\n enigmaFocusRing: pick(source['enigmaFocusRing'], ENIGMA_FOCUS_RINGS, d.enigmaFocusRing),\n enigmaFieldMotion: pick(source['enigmaFieldMotion'], ENIGMA_FIELD_MOTIONS, d.enigmaFieldMotion),\n enigmaFieldHeight: pick(\n String(source['enigmaFieldHeight'] ?? ''),\n ENIGMA_FIELD_HEIGHTS,\n d.enigmaFieldHeight,\n ),\n enigmaRowGap: pick(String(source['enigmaRowGap'] ?? ''), ENIGMA_ROW_GAPS, d.enigmaRowGap),\n enigmaCorner: pick(source['enigmaCorner'], ENIGMA_CORNERS, d.enigmaCorner),\n enigmaAccent: hexOrEmpty(source['enigmaAccent']),\n enigmaBorder: hexOrEmpty(source['enigmaBorder']),\n enigmaFill: hexOrEmpty(source['enigmaFill']),\n enigmaTrustLine: bool(source['enigmaTrustLine'], d.enigmaTrustLine),\n enigmaAutoOpen: bool(source['enigmaAutoOpen'], d.enigmaAutoOpen),\n enigmaOpening: pick(source['enigmaOpening'], ENIGMA_OPENINGS, d.enigmaOpening),\n enigmaClickFeedback: pick(\n source['enigmaClickFeedback'],\n ENIGMA_CLICK_FEEDBACK,\n d.enigmaClickFeedback,\n ),\n enigmaLoading: pick(source['enigmaLoading'], ENIGMA_LOADING_STYLES, d.enigmaLoading),\n enigmaReveal: pick(source['enigmaReveal'], ENIGMA_REVEALS, d.enigmaReveal),\n enigmaPayFeedback: pick(source['enigmaPayFeedback'], ENIGMA_PAY_FEEDBACK, d.enigmaPayFeedback),\n enigmaCustomCss: css.slice(0, ENIGMA_CUSTOM_CSS_MAX_LENGTH),\n enigmaCustomHeight:\n Number.isInteger(height) &&\n height >= ENIGMA_CUSTOM_HEIGHT_MIN &&\n height <= ENIGMA_CUSTOM_HEIGHT_MAX\n ? height\n : d.enigmaCustomHeight,\n };\n}\n\n/**\n * The strings `sdk_ui_rules.branding` stores for `settings`. Only what\n * differs from the default is written, so a shop that never opens the Enigma\n * section stores nothing, and a later change of a default reaches it.\n */\nexport function encodeEnigmaCardForm(settings: EnigmaCardFormSettings): Record<string, string> {\n const out: Record<string, string> = {};\n for (const key of Object.keys(DEFAULT_ENIGMA_CARD_FORM) as (keyof EnigmaCardFormSettings)[]) {\n const value = settings[key];\n if (value === DEFAULT_ENIGMA_CARD_FORM[key]) continue;\n const text = String(value);\n if (key === 'enigmaCustomCss' && !text.trim()) continue;\n out[key] = text;\n }\n return out;\n}\n"]}
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A;AACrC,EAAA,IAAA,CAAA,MAAW,IAAA,GAAO,MAAA,CAAO,IAAA,CAAK,wBAAwB,CAAA,EAAuC;AAC3F,IAAA,MAAM,MAAA,EAAQ,QAAA,CAAS,GAAG,CAAA;AAC1B,IAAA,GAAA,CAAI,MAAA,IAAU,wBAAA,CAAyB,GAAG,CAAA,EAAG,QAAA;AAC7C,IAAA,MAAM,KAAA,EAAO,MAAA,CAAO,KAAK,CAAA;AACzB,IAAA,GAAA,CAAI,IAAA,IAAQ,kBAAA,GAAqB,CAAC,IAAA,CAAK,IAAA,CAAK,CAAA,EAAG,QAAA;AAC/C,IAAA,GAAA,CAAI,GAAG,EAAA,EAAI,IAAA;AAAA,EACb;AACA,EAAA,OAAO,GAAA;AACT;ADvOA;AACA;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,2iDAAC","file":"/tmp/pub0495/delopay-typescript-sdk/dist/chunk-5CITBN33.cjs","sourcesContent":[null,"// The Enigma Vault card form's settings.\n//\n// Enigma draws the card form in its own frame and takes a stylesheet built by\n// the router. The router builds it only from closed sets and hex colours, so\n// every property below is one of those. A template is a preset: choosing one\n// writes the properties in `ENIGMA_TEMPLATE_PRESETS` and nothing else, and\n// every property stays editable afterwards.\n//\n// What the router cannot put in the frame, the checkout draws under or over\n// it from the layout the router answers: the fields' names and hints in the\n// buyer's language, the card networks' marks, the security-code icon, the\n// skeleton and the \"Save card\" label. The motion settings are the checkout's\n// alone.\n\n/** How each field's box is drawn. `joined` is the four fields as one block. */\nexport const ENIGMA_FIELD_CHROMES = ['outlined', 'filled', 'underline', 'joined'] as const;\nexport type EnigmaFieldChrome = (typeof ENIGMA_FIELD_CHROMES)[number];\n\n/** Where a field's name is drawn. A joined form always names its fields inside. */\nexport const ENIGMA_LABEL_PLACEMENTS = ['above', 'inside'] as const;\nexport type EnigmaLabelPlacement = (typeof ENIGMA_LABEL_PLACEMENTS)[number];\n\n/** The colour of a name drawn above its field. */\nexport const ENIGMA_LABEL_TONES = ['strong', 'muted'] as const;\nexport type EnigmaLabelTone = (typeof ENIGMA_LABEL_TONES)[number];\n\n/**\n * Which full-width field comes first. `number` is Enigma's own order, so the\n * keyboard walks the fields as drawn; with `name` the Tab key skips back.\n */\nexport const ENIGMA_FIELD_ORDERS = ['number', 'name'] as const;\nexport type EnigmaFieldOrder = (typeof ENIGMA_FIELD_ORDERS)[number];\n\n/**\n * The Visa and Mastercard marks in the number field. `live` keeps only the\n * card's own network once it is known, where the stylesheet has room for it.\n */\nexport const ENIGMA_NETWORK_MARKS = ['live', 'static', 'hidden'] as const;\nexport type EnigmaNetworkMarks = (typeof ENIGMA_NETWORK_MARKS)[number];\n\nexport const ENIGMA_FOCUS_RINGS = ['strong', 'subtle'] as const;\nexport type EnigmaFocusRing = (typeof ENIGMA_FOCUS_RINGS)[number];\n\n/** How a field eases into its focused and invalid states. */\nexport const ENIGMA_FIELD_MOTIONS = ['smooth', 'slow', 'none'] as const;\nexport type EnigmaFieldMotion = (typeof ENIGMA_FIELD_MOTIONS)[number];\n\n/** A field's height in px. */\nexport const ENIGMA_FIELD_HEIGHTS = ['40', '44', '48', '52'] as const;\nexport type EnigmaFieldHeight = (typeof ENIGMA_FIELD_HEIGHTS)[number];\n\n/** The space under a row of fields in px. */\nexport const ENIGMA_ROW_GAPS = ['8', '12', '16'] as const;\nexport type EnigmaRowGap = (typeof ENIGMA_ROW_GAPS)[number];\n\n/** A field's corners: 0, 6, 8, 12 and 22px. */\nexport const ENIGMA_CORNERS = ['square', 'small', 'medium', 'large', 'pill'] as const;\nexport type EnigmaCorner = (typeof ENIGMA_CORNERS)[number];\n\n/** The form built from the properties, or the shop's own stylesheet. */\nexport const ENIGMA_STYLE_MODES = ['designed', 'custom'] as const;\nexport type EnigmaStyleMode = (typeof ENIGMA_STYLE_MODES)[number];\n\n/** How the closed form opens: in place, or growing out of one row. */\nexport const ENIGMA_OPENINGS = ['place', 'expand'] as const;\nexport type EnigmaOpening = (typeof ENIGMA_OPENINGS)[number];\n\n/** What answers the buyer's click on the closed form. */\nexport const ENIGMA_CLICK_FEEDBACK = ['both', 'ring', 'press', 'none'] as const;\nexport type EnigmaClickFeedback = (typeof ENIGMA_CLICK_FEEDBACK)[number];\n\n/** What the fields show while Enigma's form loads. */\nexport const ENIGMA_LOADING_STYLES = [\n 'shimmer',\n 'pulse',\n 'dim',\n 'line',\n 'spinner',\n 'none',\n] as const;\nexport type EnigmaLoadingStyle = (typeof ENIGMA_LOADING_STYLES)[number];\n\n/** How the loaded form appears. */\nexport const ENIGMA_REVEALS = ['fade', 'rise', 'wipe', 'none'] as const;\nexport type EnigmaReveal = (typeof ENIGMA_REVEALS)[number];\n\n/** What the Pay button does while the card is stored and charged. */\nexport const ENIGMA_PAY_FEEDBACK = ['spinner', 'press', 'none'] as const;\nexport type EnigmaPayFeedback = (typeof ENIGMA_PAY_FEEDBACK)[number];\n\n/** The templates, in the order the dashboard offers them. `soft` is the default. */\nexport const ENIGMA_TEMPLATES = [\n 'soft',\n 'fields',\n 'classic',\n 'compact',\n 'filled',\n 'underline',\n] as const;\nexport type EnigmaTemplate = (typeof ENIGMA_TEMPLATES)[number];\n\n/** The longest stylesheet a shop may save; the router refuses a longer one. */\nexport const ENIGMA_CUSTOM_CSS_MAX_LENGTH = 950;\n/** Bounds of the frame height a shop's own stylesheet may ask for. */\nexport const ENIGMA_CUSTOM_HEIGHT_MIN = 120;\nexport const ENIGMA_CUSTOM_HEIGHT_MAX = 600;\nexport const ENIGMA_CUSTOM_HEIGHT_DEFAULT = 260;\n\n/** The Enigma card form's settings, as they sit on `CheckoutBranding`. */\nexport interface EnigmaCardFormSettings {\n /** The template last applied. Only a label: the properties are what draws. */\n enigmaTemplate: EnigmaTemplate;\n enigmaStyleMode: EnigmaStyleMode;\n enigmaChrome: EnigmaFieldChrome;\n enigmaLabels: EnigmaLabelPlacement;\n enigmaLabelTone: EnigmaLabelTone;\n /** Hints in an empty field: `1234 1234 1234 1234`, `MM / YY`, `CVC`. */\n enigmaHints: boolean;\n /** A card icon at the end of the security code field. */\n enigmaCvcIcon: boolean;\n enigmaFieldOrder: EnigmaFieldOrder;\n enigmaMarks: EnigmaNetworkMarks;\n enigmaFocusRing: EnigmaFocusRing;\n enigmaFieldMotion: EnigmaFieldMotion;\n enigmaFieldHeight: EnigmaFieldHeight;\n enigmaRowGap: EnigmaRowGap;\n enigmaCorner: EnigmaCorner;\n /** The focus colour; empty follows the checkout's primary colour. */\n enigmaAccent: string;\n /** The border colour; empty follows the checkout's border colour. */\n enigmaBorder: string;\n /** A filled field's tint; empty mixes the checkout's text into its surface. */\n enigmaFill: string;\n /** The \"encrypted\" line under the Pay button. */\n enigmaTrustLine: boolean;\n /**\n * Open the form without a click. Enigma bills each form opened, so this\n * also bills for buyers who never pay. Off by default.\n */\n enigmaAutoOpen: boolean;\n enigmaOpening: EnigmaOpening;\n enigmaClickFeedback: EnigmaClickFeedback;\n enigmaLoading: EnigmaLoadingStyle;\n enigmaReveal: EnigmaReveal;\n enigmaPayFeedback: EnigmaPayFeedback;\n /** The shop's own stylesheet, used while `enigmaStyleMode` is `custom`. */\n enigmaCustomCss: string;\n /** The frame height that stylesheet needs, in px. */\n enigmaCustomHeight: number;\n}\n\n/** The properties a template sets. */\nexport type EnigmaTemplateProperties = Pick<\n EnigmaCardFormSettings,\n | 'enigmaChrome'\n | 'enigmaLabels'\n | 'enigmaLabelTone'\n | 'enigmaHints'\n | 'enigmaCvcIcon'\n | 'enigmaFieldOrder'\n | 'enigmaMarks'\n | 'enigmaFocusRing'\n | 'enigmaFieldHeight'\n | 'enigmaRowGap'\n | 'enigmaCorner'\n>;\n\n/** What each template writes. Colours, motion and behaviour are never touched. */\nexport const ENIGMA_TEMPLATE_PRESETS: Record<EnigmaTemplate, EnigmaTemplateProperties> = {\n soft: {\n enigmaChrome: 'outlined',\n enigmaLabels: 'above',\n enigmaLabelTone: 'strong',\n enigmaHints: true,\n enigmaCvcIcon: true,\n enigmaFieldOrder: 'number',\n enigmaMarks: 'live',\n enigmaFocusRing: 'strong',\n enigmaFieldHeight: '44',\n enigmaRowGap: '12',\n enigmaCorner: 'medium',\n },\n fields: {\n enigmaChrome: 'outlined',\n enigmaLabels: 'above',\n enigmaLabelTone: 'muted',\n enigmaHints: true,\n enigmaCvcIcon: true,\n enigmaFieldOrder: 'number',\n enigmaMarks: 'live',\n enigmaFocusRing: 'strong',\n enigmaFieldHeight: '48',\n enigmaRowGap: '12',\n enigmaCorner: 'small',\n },\n classic: {\n enigmaChrome: 'outlined',\n enigmaLabels: 'above',\n enigmaLabelTone: 'strong',\n enigmaHints: false,\n enigmaCvcIcon: true,\n enigmaFieldOrder: 'number',\n enigmaMarks: 'live',\n enigmaFocusRing: 'strong',\n enigmaFieldHeight: '44',\n enigmaRowGap: '12',\n enigmaCorner: 'medium',\n },\n compact: {\n enigmaChrome: 'joined',\n enigmaLabels: 'inside',\n enigmaLabelTone: 'muted',\n enigmaHints: false,\n enigmaCvcIcon: true,\n enigmaFieldOrder: 'number',\n enigmaMarks: 'live',\n enigmaFocusRing: 'strong',\n enigmaFieldHeight: '48',\n enigmaRowGap: '12',\n enigmaCorner: 'medium',\n },\n filled: {\n enigmaChrome: 'filled',\n enigmaLabels: 'above',\n enigmaLabelTone: 'strong',\n enigmaHints: false,\n enigmaCvcIcon: true,\n enigmaFieldOrder: 'number',\n enigmaMarks: 'live',\n enigmaFocusRing: 'strong',\n enigmaFieldHeight: '44',\n enigmaRowGap: '12',\n enigmaCorner: 'medium',\n },\n underline: {\n enigmaChrome: 'underline',\n enigmaLabels: 'above',\n enigmaLabelTone: 'muted',\n enigmaHints: false,\n enigmaCvcIcon: true,\n enigmaFieldOrder: 'number',\n enigmaMarks: 'live',\n enigmaFocusRing: 'strong',\n enigmaFieldHeight: '40',\n enigmaRowGap: '16',\n enigmaCorner: 'square',\n },\n};\n\n/** Every Enigma setting's default: the Stripe-like template, opened on click. */\nexport const DEFAULT_ENIGMA_CARD_FORM: EnigmaCardFormSettings = {\n enigmaTemplate: 'soft',\n enigmaStyleMode: 'designed',\n ...ENIGMA_TEMPLATE_PRESETS.soft,\n enigmaFieldMotion: 'smooth',\n enigmaAccent: '',\n enigmaBorder: '',\n enigmaFill: '',\n enigmaTrustLine: true,\n enigmaAutoOpen: false,\n enigmaOpening: 'place',\n enigmaClickFeedback: 'both',\n enigmaLoading: 'shimmer',\n enigmaReveal: 'fade',\n enigmaPayFeedback: 'spinner',\n enigmaCustomCss: '',\n enigmaCustomHeight: ENIGMA_CUSTOM_HEIGHT_DEFAULT,\n};\n\n/** The patch choosing `template` writes: its properties and its name. */\nexport function applyEnigmaTemplate(template: EnigmaTemplate): Partial<EnigmaCardFormSettings> {\n return { enigmaTemplate: template, ...ENIGMA_TEMPLATE_PRESETS[template] };\n}\n\n/** The properties of `settings` that differ from its template's, by key. */\nexport function enigmaTemplateChanges(\n settings: EnigmaCardFormSettings,\n): (keyof EnigmaTemplateProperties)[] {\n const preset = ENIGMA_TEMPLATE_PRESETS[settings.enigmaTemplate];\n return (Object.keys(preset) as (keyof EnigmaTemplateProperties)[]).filter(\n (key) => settings[key] !== preset[key],\n );\n}\n\n/** Whether a field's name sits inside it: always on a joined form. */\nexport function enigmaNamesInside(settings: EnigmaCardFormSettings): boolean {\n return settings.enigmaChrome === 'joined' || settings.enigmaLabels === 'inside';\n}\n\nconst PSEUDO_CLASSES = [\n 'focus',\n 'focus-visible',\n 'focus-within',\n 'hover',\n 'checked',\n 'disabled',\n 'invalid',\n 'valid',\n 'placeholder-shown',\n 'first-child',\n 'last-child',\n];\nconst HIDEABLE = ['p', 'h1', '#header', '#headertext', '.timer', '#timer'];\nconst PROPERTIES = [\n 'color',\n 'caret-color',\n 'accent-color',\n '-webkit-text-fill-color',\n 'background',\n 'background-color',\n 'border',\n 'border-top',\n 'border-right',\n 'border-bottom',\n 'border-left',\n 'border-color',\n 'border-width',\n 'border-style',\n 'border-top-color',\n 'border-right-color',\n 'border-bottom-color',\n 'border-left-color',\n 'border-top-width',\n 'border-right-width',\n 'border-bottom-width',\n 'border-left-width',\n 'border-radius',\n 'border-top-left-radius',\n 'border-top-right-radius',\n 'border-bottom-left-radius',\n 'border-bottom-right-radius',\n 'box-shadow',\n 'outline',\n 'outline-color',\n 'outline-offset',\n 'font',\n 'font-family',\n 'font-size',\n 'font-weight',\n 'font-style',\n 'letter-spacing',\n 'line-height',\n 'text-align',\n 'text-transform',\n 'padding',\n 'padding-top',\n 'padding-right',\n 'padding-bottom',\n 'padding-left',\n 'margin',\n 'margin-top',\n 'margin-right',\n 'margin-bottom',\n 'margin-left',\n 'height',\n 'min-height',\n 'width',\n 'min-width',\n 'max-width',\n 'display',\n 'flex-wrap',\n 'gap',\n 'transition',\n 'box-sizing',\n 'top',\n];\n\n/** A length of at least `min` px (`em`/`rem` at 16px). */\nfunction lengthAtLeast(value: string, min: number): boolean {\n const match = /^(-?[0-9.]+)(px|em|rem)$/.exec(value);\n if (!match) return false;\n const number = Number(match[1]) * (match[2] === 'px' ? 1 : 16);\n return Number.isFinite(number) && number >= min;\n}\n\nfunction spacing(value: string): boolean {\n return value\n .split(' ')\n .every(\n (part) =>\n part === '0' || part === 'auto' || (lengthAtLeast(part, 0) && !lengthAtLeast(part, 48.5)),\n );\n}\n\nfunction width(value: string): boolean {\n if (value === 'auto') return true;\n if (value.endsWith('%')) return Number(value.slice(0, -1)) >= 20;\n const calc = /^calc\\(([0-9.]+)% - ([0-9.]+)px\\)$/.exec(value);\n if (calc) return Number(calc[1]) >= 20 && Number(calc[2]) <= 48;\n if (value.startsWith('calc(')) return false;\n return lengthAtLeast(value, 40);\n}\n\nfunction opaqueColour(value: string): boolean {\n if (value.startsWith('#')) return /^#([0-9a-f]{3}|[0-9a-f]{6})$/.test(value);\n if (value.startsWith('rgb('))\n return value.endsWith(')') && value.split(',').length === 3 && !value.includes('/');\n return value !== 'transparent' && /^[a-z]+$/.test(value);\n}\n\nfunction declarationProblem(selector: string, declaration: string): EnigmaCustomCssProblem | null {\n const at = declaration.indexOf(':');\n if (at < 0) return null;\n const property = declaration.slice(0, at).trim();\n const raw = declaration.slice(at + 1).trim();\n const important = raw.endsWith('!important');\n const value = raw.replace(/!important$/, '').trim();\n if (!PROPERTIES.includes(property)) return 'property';\n if (['var(', 'env(', 'attr('].some((fn) => value.includes(fn))) return 'variable';\n let ok = true;\n switch (property) {\n case 'display': {\n if (important) return 'important_display';\n const hideable = selector.split(',').every((one) => {\n const subject = one.split(/[ >]/).pop() ?? one;\n return HIDEABLE.includes(subject.split(':')[0] ?? subject);\n });\n ok =\n ['block', 'flex', 'grid', 'inline', 'inline-block', 'inline-flex'].includes(value) ||\n (value === 'none' && hideable);\n break;\n }\n case 'margin':\n case 'margin-top':\n case 'margin-right':\n case 'margin-bottom':\n case 'margin-left':\n case 'padding':\n case 'padding-top':\n case 'padding-right':\n case 'padding-bottom':\n case 'padding-left':\n ok = spacing(value);\n break;\n case 'height':\n case 'min-height':\n ok = value === 'auto' || lengthAtLeast(value, 20);\n break;\n case 'width':\n case 'min-width':\n case 'max-width':\n ok = width(value);\n break;\n case 'font-size':\n ok = lengthAtLeast(value, 12);\n break;\n case 'font': {\n const size = value.split(/[ /]/).find((part) => part.endsWith('px') || part.endsWith('em'));\n ok = size !== undefined && lengthAtLeast(size, 12);\n break;\n }\n case 'line-height':\n ok = value === 'normal' || Number(value) >= 1 || lengthAtLeast(value, 12);\n break;\n case 'color':\n case 'caret-color':\n ok = opaqueColour(value);\n break;\n case 'top':\n ok = value === '0' || (/^-?[0-9.]+px$/.test(value) && Math.abs(parseFloat(value)) <= 4);\n break;\n case '-webkit-text-fill-color':\n // Every branch of the selector list must be an empty field: CSS applies\n // the declaration to each branch.\n ok =\n selector\n .split(',')\n .every((one) => (one.split(/[ >]/).pop() ?? '').includes(':placeholder-shown')) ||\n opaqueColour(value);\n break;\n }\n return ok ? null : 'hides_field';\n}\n\nfunction selectorProblem(selector: string): EnigmaCustomCssProblem | null {\n if (!selector || !/^[a-z0-9\\-_#.:,> ]+$/.test(selector) || selector.includes('::'))\n return 'selector';\n const pseudoOk = selector\n .split(':')\n .slice(1)\n .every((after) => PSEUDO_CLASSES.includes(after.split(/[ >,.#]/)[0] ?? after));\n return pseudoOk ? null : 'selector';\n}\n\n/**\n * Why the router would refuse `css` as the shop's own stylesheet, or `null`\n * when it would keep it: the same bounded grammar as the router's check.\n * Only names, ids, classes,\n * spaces, `>` and a few states as selectors; only colours, borders, type,\n * spacing, sizes and simple layout as properties, at values that keep every\n * card field and the \"Save card\" box visible and in place. No quotes. A\n * declaration sits in a rule, never directly in `@media` or outside any block;\n * no rule is nested in another, and no brace or `;` sits inside brackets.\n * The router decides.\n */\nexport function enigmaCustomCssProblem(css: string): EnigmaCustomCssProblem | null {\n if (!css.trim()) return null;\n if (css.length > ENIGMA_CUSTOM_CSS_MAX_LENGTH) return 'too_long';\n // eslint-disable-next-line no-control-regex\n if (/[^\\x20-\\x7e\\n\\r\\t]/.test(css)) return 'not_ascii';\n if (css.includes('<')) return 'markup';\n if (css.includes('\\\\')) return 'escape';\n // A browser keeps `{`, `}` and `;` inside a string as text, and this walk\n // does not; one quoted brace would end the rule here but not there.\n if (/[\"']/.test(css)) return 'quote';\n const lower = css.toLowerCase();\n if (lower.includes('/*')) return 'comment';\n if (\n ['url(', 'image-set(', 'image(', 'element(', 'cross-fade(', 'src(', 'data:'].some((needle) =>\n lower.includes(needle),\n )\n ) {\n return 'loads_resource';\n }\n if (\n ['expression(', 'javascript:', 'behavior', '-moz-binding'].some((needle) =>\n lower.includes(needle),\n )\n ) {\n return 'script';\n }\n if (/@(?!media)/.test(lower)) return 'at_rule';\n\n // Each block's own selector and declarations; a rule inside `@media` is a\n // block of its own. Nothing opens inside a rule: with CSS nesting a browser\n // applies a nested `@media` or rule's declarations to the outer selector,\n // which this walk would not see. A browser also keeps `{`, `}` and `;`\n // inside `(...)` or `[...]` as text, so none may appear there.\n const compact = lower.split(/\\s+/).filter(Boolean).join(' ');\n const blocks: { selector: string; media: boolean }[] = [];\n const brackets: string[] = [];\n let text = '';\n for (const ch of compact) {\n if ((ch === '{' || ch === '}' || ch === ';') && brackets.length > 0) return 'misplaced';\n if (ch === '(' || ch === '[') {\n brackets.push(ch);\n text += ch;\n } else if (ch === ')' || ch === ']') {\n if (brackets.pop() !== (ch === ')' ? '(' : '[')) return 'unbalanced';\n text += ch;\n } else if (ch === '{') {\n const outer = blocks[blocks.length - 1];\n if (outer && !outer.media) return 'misplaced';\n const prelude = text.trim();\n text = '';\n const media = prelude.startsWith('@media');\n if (!media) {\n const problem = selectorProblem(prelude.replace(/, /g, ','));\n if (problem) return problem;\n }\n blocks.push({ selector: prelude, media });\n } else if (ch === '}' || ch === ';') {\n const declaration = text;\n text = '';\n const top = blocks[blocks.length - 1];\n if (!top) {\n if (ch === '}') return 'unbalanced';\n if (declaration.trim()) return 'misplaced';\n continue;\n }\n if (declaration.trim()) {\n if (top.media) return 'misplaced';\n const problem = declarationProblem(top.selector.replace(/, /g, ','), declaration);\n if (problem) return problem;\n }\n if (ch === '}') blocks.pop();\n } else {\n text += ch;\n }\n }\n if (blocks.length > 0 || brackets.length > 0) return 'unbalanced';\n return text.trim() ? 'misplaced' : null;\n}\n\nexport type EnigmaCustomCssProblem =\n | 'too_long'\n | 'not_ascii'\n | 'markup'\n | 'escape'\n | 'quote'\n | 'comment'\n | 'loads_resource'\n | 'script'\n | 'at_rule'\n | 'selector'\n | 'property'\n | 'variable'\n | 'important_display'\n | 'hides_field'\n | 'unbalanced'\n | 'misplaced';\n\n/** A corner's px, as the router draws it. */\nexport function enigmaCornerPx(corner: EnigmaCorner): number {\n return { square: 0, small: 6, medium: 8, large: 12, pill: 22 }[corner];\n}\n\nconst HEX = /^#[0-9a-fA-F]{3}([0-9a-fA-F]{3})?$/;\n\nfunction pick<T extends string>(value: unknown, allowed: readonly T[], fallback: T): T {\n return typeof value === 'string' && (allowed as readonly string[]).includes(value)\n ? (value as T)\n : fallback;\n}\n\nfunction bool(value: unknown, fallback: boolean): boolean {\n if (value === true || value === 'true') return true;\n if (value === false || value === 'false') return false;\n return fallback;\n}\n\nfunction hexOrEmpty(value: unknown): string {\n return typeof value === 'string' && HEX.test(value.trim()) ? value.trim() : '';\n}\n\n/**\n * The Enigma settings stored in `source`: the strings of\n * `sdk_ui_rules.branding`, or the values of a branding export. Anything\n * unreadable takes the default, so a malformed value never costs a checkout.\n */\nexport function decodeEnigmaCardForm(source: Record<string, unknown>): EnigmaCardFormSettings {\n const d = DEFAULT_ENIGMA_CARD_FORM;\n const height = Number(source['enigmaCustomHeight']);\n const css = typeof source['enigmaCustomCss'] === 'string' ? source['enigmaCustomCss'] : '';\n return {\n enigmaTemplate: pick(source['enigmaTemplate'], ENIGMA_TEMPLATES, d.enigmaTemplate),\n enigmaStyleMode: pick(source['enigmaStyleMode'], ENIGMA_STYLE_MODES, d.enigmaStyleMode),\n enigmaChrome: pick(source['enigmaChrome'], ENIGMA_FIELD_CHROMES, d.enigmaChrome),\n enigmaLabels: pick(source['enigmaLabels'], ENIGMA_LABEL_PLACEMENTS, d.enigmaLabels),\n enigmaLabelTone: pick(source['enigmaLabelTone'], ENIGMA_LABEL_TONES, d.enigmaLabelTone),\n enigmaHints: bool(source['enigmaHints'], d.enigmaHints),\n enigmaCvcIcon: bool(source['enigmaCvcIcon'], d.enigmaCvcIcon),\n enigmaFieldOrder: pick(source['enigmaFieldOrder'], ENIGMA_FIELD_ORDERS, d.enigmaFieldOrder),\n enigmaMarks: pick(source['enigmaMarks'], ENIGMA_NETWORK_MARKS, d.enigmaMarks),\n enigmaFocusRing: pick(source['enigmaFocusRing'], ENIGMA_FOCUS_RINGS, d.enigmaFocusRing),\n enigmaFieldMotion: pick(source['enigmaFieldMotion'], ENIGMA_FIELD_MOTIONS, d.enigmaFieldMotion),\n enigmaFieldHeight: pick(\n String(source['enigmaFieldHeight'] ?? ''),\n ENIGMA_FIELD_HEIGHTS,\n d.enigmaFieldHeight,\n ),\n enigmaRowGap: pick(String(source['enigmaRowGap'] ?? ''), ENIGMA_ROW_GAPS, d.enigmaRowGap),\n enigmaCorner: pick(source['enigmaCorner'], ENIGMA_CORNERS, d.enigmaCorner),\n enigmaAccent: hexOrEmpty(source['enigmaAccent']),\n enigmaBorder: hexOrEmpty(source['enigmaBorder']),\n enigmaFill: hexOrEmpty(source['enigmaFill']),\n enigmaTrustLine: bool(source['enigmaTrustLine'], d.enigmaTrustLine),\n enigmaAutoOpen: bool(source['enigmaAutoOpen'], d.enigmaAutoOpen),\n enigmaOpening: pick(source['enigmaOpening'], ENIGMA_OPENINGS, d.enigmaOpening),\n enigmaClickFeedback: pick(\n source['enigmaClickFeedback'],\n ENIGMA_CLICK_FEEDBACK,\n d.enigmaClickFeedback,\n ),\n enigmaLoading: pick(source['enigmaLoading'], ENIGMA_LOADING_STYLES, d.enigmaLoading),\n enigmaReveal: pick(source['enigmaReveal'], ENIGMA_REVEALS, d.enigmaReveal),\n enigmaPayFeedback: pick(source['enigmaPayFeedback'], ENIGMA_PAY_FEEDBACK, d.enigmaPayFeedback),\n enigmaCustomCss: css.slice(0, ENIGMA_CUSTOM_CSS_MAX_LENGTH),\n enigmaCustomHeight:\n Number.isInteger(height) &&\n height >= ENIGMA_CUSTOM_HEIGHT_MIN &&\n height <= ENIGMA_CUSTOM_HEIGHT_MAX\n ? height\n : d.enigmaCustomHeight,\n };\n}\n\n/**\n * The strings `sdk_ui_rules.branding` stores for `settings`. Only what\n * differs from the default is written, so a shop that never opens the Enigma\n * section stores nothing, and a later change of a default reaches it.\n */\nexport function encodeEnigmaCardForm(settings: EnigmaCardFormSettings): Record<string, string> {\n const out: Record<string, string> = {};\n for (const key of Object.keys(DEFAULT_ENIGMA_CARD_FORM) as (keyof EnigmaCardFormSettings)[]) {\n const value = settings[key];\n if (value === DEFAULT_ENIGMA_CARD_FORM[key]) continue;\n const text = String(value);\n if (key === 'enigmaCustomCss' && !text.trim()) continue;\n out[key] = text;\n }\n return out;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/anes/delo-payment/delopay-typescript-sdk/dist/chunk-5HCKC4HF.cjs","../src/resources/apiKeys.ts"],"names":[],"mappings":"AAAA;ACYO,IAAM,QAAA,EAAN,MAAc;AAAA,EACnB,WAAA,CAA6B,OAAA,EAAoB;AAApB,IAAA,IAAA,CAAA,QAAA,EAAA,OAAA;AAAA,EAAqB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAclD,MAAM,MAAA,CAAO,UAAA,EAAoB,MAAA,EAA4D;AAC3F,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,MAAA,EAAQ,CAAA,UAAA,EAAa,kBAAA,CAAmB,UAAU,CAAC,CAAA,CAAA;AACzE,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAS2E,EAAA;AAC7D,IAAA;AACV,MAAA;AACkE,MAAA;AACpE,IAAA;AACF,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAc2B,EAAA;AACb,IAAA;AACV,MAAA;AACkE,MAAA;AACnD,MAAA;AACjB,IAAA;AACF,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAS+E,EAAA;AACjE,IAAA;AACV,MAAA;AACkE,MAAA;AACpE,IAAA;AACF,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAmB+E,EAAA;AACjE,IAAA;AACV,MAAA;AACkE,MAAA;AACpE,IAAA;AACF,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQ0D,EAAA;AACc,IAAA;AACxE,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAgB0E,EAAA;AACF,IAAA;AACxE,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA6BiC,EAAA;AACuC,IAAA;AAC9D,MAAA;AACP,IAAA;AACH,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAa6B,EAAA;AAC0C,IAAA;AAC5D,MAAA;AACR,IAAA;AACH,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUoF,EAAA;AACtE,IAAA;AACV,MAAA;AAC+D,MAAA;AACjE,IAAA;AACF,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAe2B,EAAA;AACb,IAAA;AACV,MAAA;AAC+D,MAAA;AAChD,MAAA;AACjB,IAAA;AACF,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUwF,EAAA;AAC1E,IAAA;AACV,MAAA;AAC+D,MAAA;AACjE,IAAA;AACF,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAYwF,EAAA;AAC1E,IAAA;AACV,MAAA;AAC+D,MAAA;AACjE,IAAA;AACF,EAAA;AACF;ADpC4E;AACA;AACA;AACA","file":"/home/anes/delo-payment/delopay-typescript-sdk/dist/chunk-5HCKC4HF.cjs","sourcesContent":[null,"import type {\n ApiKeyCreateRequest,\n ApiKeyCreateResponse,\n ApiKeyListConstraints,\n ApiKeyResponse,\n ApiKeyUpdateRequest,\n ApiKeyRevokeResponse,\n ApiKeyTemplatesResponse,\n} from '../types';\nimport type { RequestFn } from '../client';\n\n/** Create and manage API keys for a merchant account. */\nexport class ApiKeys {\n constructor(private readonly request: RequestFn) {}\n\n /**\n * Create a new API key for a merchant.\n *\n * @param merchantId - The merchant account ID.\n * @param params - Key creation parameters (name, expiry, etc.).\n * @returns The newly created key including the plaintext secret (shown once only).\n *\n * @example\n * ```typescript\n * const { key_value } = await delopay.apiKeys.create('merch_123', { name: 'Production key' });\n * ```\n */\n async create(merchantId: string, params: ApiKeyCreateRequest): Promise<ApiKeyCreateResponse> {\n return this.request('POST', `/api-keys/${encodeURIComponent(merchantId)}`, { body: params });\n }\n\n /**\n * Retrieve metadata about an API key (does not return the plaintext secret).\n *\n * @param merchantId - The merchant account ID.\n * @param keyId - The API key ID.\n * @returns The API key metadata.\n */\n async retrieve(merchantId: string, keyId: string): Promise<ApiKeyResponse> {\n return this.request(\n 'GET',\n `/api-keys/${encodeURIComponent(merchantId)}/${encodeURIComponent(keyId)}`,\n );\n }\n\n /**\n * Update an API key's name or expiry.\n *\n * @param merchantId - The merchant account ID.\n * @param keyId - The API key ID to update.\n * @param params - Fields to update.\n * @returns The updated API key metadata.\n */\n async update(\n merchantId: string,\n keyId: string,\n params: ApiKeyUpdateRequest,\n ): Promise<ApiKeyResponse> {\n return this.request(\n 'POST',\n `/api-keys/${encodeURIComponent(merchantId)}/${encodeURIComponent(keyId)}`,\n { body: params },\n );\n }\n\n /**\n * Revoke an API key, immediately invalidating it.\n *\n * @param merchantId - The merchant account ID.\n * @param keyId - The API key ID to revoke.\n * @returns Revocation confirmation.\n */\n async revoke(merchantId: string, keyId: string): Promise<ApiKeyRevokeResponse> {\n return this.request(\n 'DELETE',\n `/api-keys/${encodeURIComponent(merchantId)}/${encodeURIComponent(keyId)}`,\n );\n }\n\n /**\n * Replace an API key's secret. The key keeps its id, name, scope, shop,\n * origin rule, rate cap and expiry. The old secret stops working\n * immediately, with no grace period, so deploy the new one as part of the\n * same change. Refused with `IR_16` (HTTP 400) while the deployment runs\n * partial authentication; create a new key and revoke the old one instead.\n * `POST /api-keys/{merchantId}/{keyId}/rotate`\n *\n * @param merchantId - The merchant account ID.\n * @param keyId - The API key ID to rotate.\n * @returns The key with its new plaintext secret (shown once only).\n *\n * @example\n * ```typescript\n * const { api_key } = await delopay.apiKeys.rotate('merch_123', 'key_abc');\n * ```\n */\n async rotate(merchantId: string, keyId: string): Promise<ApiKeyCreateResponse> {\n return this.request(\n 'POST',\n `/api-keys/${encodeURIComponent(merchantId)}/${encodeURIComponent(keyId)}/rotate`,\n );\n }\n\n /**\n * List all API keys for a merchant.\n *\n * @param merchantId - The merchant account ID.\n * @returns Array of API key metadata objects.\n */\n async list(merchantId: string): Promise<ApiKeyResponse[]> {\n return this.request('GET', `/api-keys/${encodeURIComponent(merchantId)}/list`);\n }\n\n /**\n * The key templates the caller may use, with the values each prefills.\n * Create the key with `create`; the template itself is not sent.\n * `GET /api-keys/{merchantId}/templates`\n *\n * @param merchantId - The merchant account ID.\n * @returns The templates, each limited to what the caller may grant.\n *\n * @example\n * ```typescript\n * const { templates } = await delopay.apiKeys.listTemplates('merch_123');\n * const readOnly = templates.find((t) => t.id === 'ai_agent_read_only');\n * ```\n */\n async listTemplates(merchantId: string): Promise<ApiKeyTemplatesResponse> {\n return this.request('GET', `/api-keys/${encodeURIComponent(merchantId)}/templates`);\n }\n\n // --- Profile-scoped (shop-level) API keys ---------------------------------\n //\n // JWT-authenticated routes under `/account/{merchantId}/profile/api-keys`.\n // The caller's shop (business profile) comes from the JWT, never from the\n // request, so a shop-scoped user can only mint/list/manage keys pinned to\n // their own shop. Requires a backend with profile-scoped API key support.\n\n /**\n * Create a new API key pinned to the caller's shop (business profile).\n * `POST /account/{merchantId}/profile/api-keys`\n *\n * @param merchantId - The merchant account ID.\n * @param params - Key creation parameters (name, expiry, etc.).\n * @returns The newly created key including the plaintext secret (shown once\n * only) and the `profile_id` it is pinned to.\n *\n * @example\n * ```typescript\n * const { api_key } = await delopay.apiKeys.createByProfile('merch_123', {\n * name: 'Shop key',\n * expiration: 'never',\n * });\n * ```\n */\n async createByProfile(\n merchantId: string,\n params: ApiKeyCreateRequest,\n ): Promise<ApiKeyCreateResponse> {\n return this.request('POST', `/account/${encodeURIComponent(merchantId)}/profile/api-keys`, {\n body: params,\n });\n }\n\n /**\n * List API keys pinned to the caller's shop (business profile) only.\n * `GET /account/{merchantId}/profile/api-keys`\n *\n * @param merchantId - The merchant account ID.\n * @param params - Optional pagination constraints (`limit`, `skip`).\n * @returns Array of API key metadata objects belonging to the caller's shop.\n */\n async listByProfile(\n merchantId: string,\n params?: ApiKeyListConstraints,\n ): Promise<ApiKeyResponse[]> {\n return this.request('GET', `/account/${encodeURIComponent(merchantId)}/profile/api-keys`, {\n query: params as Record<string, number | null | undefined>,\n });\n }\n\n /**\n * Retrieve metadata about a shop-pinned API key (does not return the\n * plaintext secret). `GET /account/{merchantId}/profile/api-keys/{keyId}`\n *\n * @param merchantId - The merchant account ID.\n * @param keyId - The API key ID.\n * @returns The API key metadata.\n */\n async retrieveByProfile(merchantId: string, keyId: string): Promise<ApiKeyResponse> {\n return this.request(\n 'GET',\n `/account/${encodeURIComponent(merchantId)}/profile/api-keys/${encodeURIComponent(keyId)}`,\n );\n }\n\n /**\n * Update a shop-pinned API key's name, description, or expiry.\n * `POST /account/{merchantId}/profile/api-keys/{keyId}`\n *\n * @param merchantId - The merchant account ID.\n * @param keyId - The API key ID to update.\n * @param params - Fields to update.\n * @returns The updated API key metadata.\n */\n async updateByProfile(\n merchantId: string,\n keyId: string,\n params: ApiKeyUpdateRequest,\n ): Promise<ApiKeyResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(merchantId)}/profile/api-keys/${encodeURIComponent(keyId)}`,\n { body: params },\n );\n }\n\n /**\n * Revoke a shop-pinned API key, immediately invalidating it.\n * `DELETE /account/{merchantId}/profile/api-keys/{keyId}`\n *\n * @param merchantId - The merchant account ID.\n * @param keyId - The API key ID to revoke.\n * @returns Revocation confirmation.\n */\n async revokeByProfile(merchantId: string, keyId: string): Promise<ApiKeyRevokeResponse> {\n return this.request(\n 'DELETE',\n `/account/${encodeURIComponent(merchantId)}/profile/api-keys/${encodeURIComponent(keyId)}`,\n );\n }\n\n /**\n * Replace the secret of an API key pinned to the caller's shop. The key\n * keeps its id, name, scope, origin rule, rate cap and expiry. The old\n * secret stops working immediately, with no grace period.\n * `POST /account/{merchantId}/profile/api-keys/{keyId}/rotate`\n *\n * @param merchantId - The merchant account ID.\n * @param keyId - The API key ID to rotate.\n * @returns The key with its new plaintext secret (shown once only).\n */\n async rotateByProfile(merchantId: string, keyId: string): Promise<ApiKeyCreateResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(merchantId)}/profile/api-keys/${encodeURIComponent(keyId)}/rotate`,\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["/tmp/pub0495/delopay-typescript-sdk/dist/chunk-5HCKC4HF.cjs","../src/resources/apiKeys.ts"],"names":[],"mappings":"AAAA;ACYO,IAAM,QAAA,EAAN,MAAc;AAAA,EACnB,WAAA,CAA6B,OAAA,EAAoB;AAApB,IAAA,IAAA,CAAA,QAAA,EAAA,OAAA;AAAA,EAAqB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAclD,MAAM,MAAA,CAAO,UAAA,EAAoB,MAAA,EAA4D;AAC3F,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,MAAA,EAAQ,CAAA,UAAA,EAAa,kBAAA,CAAmB,UAAU,CAAC,CAAA,CAAA;AACzE,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAS2E,EAAA;AAC7D,IAAA;AACV,MAAA;AACkE,MAAA;AACpE,IAAA;AACF,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAc2B,EAAA;AACb,IAAA;AACV,MAAA;AACkE,MAAA;AACnD,MAAA;AACjB,IAAA;AACF,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAS+E,EAAA;AACjE,IAAA;AACV,MAAA;AACkE,MAAA;AACpE,IAAA;AACF,EAAA;AAA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opay-typescript-sdk/dist/chunk-5HCKC4HF.cjs","sourcesContent":[null,"import type {\n ApiKeyCreateRequest,\n ApiKeyCreateResponse,\n ApiKeyListConstraints,\n ApiKeyResponse,\n ApiKeyUpdateRequest,\n ApiKeyRevokeResponse,\n ApiKeyTemplatesResponse,\n} from '../types';\nimport type { RequestFn } from '../client';\n\n/** Create and manage API keys for a merchant account. */\nexport class ApiKeys {\n constructor(private readonly request: RequestFn) {}\n\n /**\n * Create a new API key for a merchant.\n *\n * @param merchantId - The merchant account ID.\n * @param params - Key creation parameters (name, expiry, etc.).\n * @returns The newly created key including the plaintext secret (shown once only).\n *\n * @example\n * ```typescript\n * const { key_value } = await delopay.apiKeys.create('merch_123', { name: 'Production key' });\n * ```\n */\n async create(merchantId: string, params: ApiKeyCreateRequest): Promise<ApiKeyCreateResponse> {\n return this.request('POST', `/api-keys/${encodeURIComponent(merchantId)}`, { body: params });\n }\n\n /**\n * Retrieve metadata about an API key (does not return the plaintext secret).\n *\n * @param merchantId - The merchant account ID.\n * @param keyId - The API key ID.\n * @returns The API key metadata.\n */\n async retrieve(merchantId: string, keyId: string): Promise<ApiKeyResponse> {\n return this.request(\n 'GET',\n `/api-keys/${encodeURIComponent(merchantId)}/${encodeURIComponent(keyId)}`,\n );\n }\n\n /**\n * Update an API key's name or expiry.\n *\n * @param merchantId - The merchant account ID.\n * @param keyId - The API key ID to update.\n * @param params - Fields to update.\n * @returns The updated API key metadata.\n */\n async update(\n merchantId: string,\n keyId: string,\n params: ApiKeyUpdateRequest,\n ): Promise<ApiKeyResponse> {\n return this.request(\n 'POST',\n `/api-keys/${encodeURIComponent(merchantId)}/${encodeURIComponent(keyId)}`,\n { body: params },\n );\n }\n\n /**\n * Revoke an API key, immediately invalidating it.\n *\n * @param merchantId - The merchant account ID.\n * @param keyId - The API key ID to revoke.\n * @returns Revocation confirmation.\n */\n async revoke(merchantId: string, keyId: string): Promise<ApiKeyRevokeResponse> {\n return this.request(\n 'DELETE',\n `/api-keys/${encodeURIComponent(merchantId)}/${encodeURIComponent(keyId)}`,\n );\n }\n\n /**\n * Replace an API key's secret. The key keeps its id, name, scope, shop,\n * origin rule, rate cap and expiry. The old secret stops working\n * immediately, with no grace period, so deploy the new one as part of the\n * same change. Refused with `IR_16` (HTTP 400) while the deployment runs\n * partial authentication; create a new key and revoke the old one instead.\n * `POST /api-keys/{merchantId}/{keyId}/rotate`\n *\n * @param merchantId - The merchant account ID.\n * @param keyId - The API key ID to rotate.\n * @returns The key with its new plaintext secret (shown once only).\n *\n * @example\n * ```typescript\n * const { api_key } = await delopay.apiKeys.rotate('merch_123', 'key_abc');\n * ```\n */\n async rotate(merchantId: string, keyId: string): Promise<ApiKeyCreateResponse> {\n return this.request(\n 'POST',\n `/api-keys/${encodeURIComponent(merchantId)}/${encodeURIComponent(keyId)}/rotate`,\n );\n }\n\n /**\n * List all API keys for a merchant.\n *\n * @param merchantId - The merchant account ID.\n * @returns Array of API key metadata objects.\n */\n async list(merchantId: string): Promise<ApiKeyResponse[]> {\n return this.request('GET', `/api-keys/${encodeURIComponent(merchantId)}/list`);\n }\n\n /**\n * The key templates the caller may use, with the values each prefills.\n * Create the key with `create`; the template itself is not sent.\n * `GET /api-keys/{merchantId}/templates`\n *\n * @param merchantId - The merchant account ID.\n * @returns The templates, each limited to what the caller may grant.\n *\n * @example\n * ```typescript\n * const { templates } = await delopay.apiKeys.listTemplates('merch_123');\n * const readOnly = templates.find((t) => t.id === 'ai_agent_read_only');\n * ```\n */\n async listTemplates(merchantId: string): Promise<ApiKeyTemplatesResponse> {\n return this.request('GET', `/api-keys/${encodeURIComponent(merchantId)}/templates`);\n }\n\n // --- Profile-scoped (shop-level) API keys ---------------------------------\n //\n // JWT-authenticated routes under `/account/{merchantId}/profile/api-keys`.\n // The caller's shop (business profile) comes from the JWT, never from the\n // request, so a shop-scoped user can only mint/list/manage keys pinned to\n // their own shop. Requires a backend with profile-scoped API key support.\n\n /**\n * Create a new API key pinned to the caller's shop (business profile).\n * `POST /account/{merchantId}/profile/api-keys`\n *\n * @param merchantId - The merchant account ID.\n * @param params - Key creation parameters (name, expiry, etc.).\n * @returns The newly created key including the plaintext secret (shown once\n * only) and the `profile_id` it is pinned to.\n *\n * @example\n * ```typescript\n * const { api_key } = await delopay.apiKeys.createByProfile('merch_123', {\n * name: 'Shop key',\n * expiration: 'never',\n * });\n * ```\n */\n async createByProfile(\n merchantId: string,\n params: ApiKeyCreateRequest,\n ): Promise<ApiKeyCreateResponse> {\n return this.request('POST', `/account/${encodeURIComponent(merchantId)}/profile/api-keys`, {\n body: params,\n });\n }\n\n /**\n * List API keys pinned to the caller's shop (business profile) only.\n * `GET /account/{merchantId}/profile/api-keys`\n *\n * @param merchantId - The merchant account ID.\n * @param params - Optional pagination constraints (`limit`, `skip`).\n * @returns Array of API key metadata objects belonging to the caller's shop.\n */\n async listByProfile(\n merchantId: string,\n params?: ApiKeyListConstraints,\n ): Promise<ApiKeyResponse[]> {\n return this.request('GET', `/account/${encodeURIComponent(merchantId)}/profile/api-keys`, {\n query: params as Record<string, number | null | undefined>,\n });\n }\n\n /**\n * Retrieve metadata about a shop-pinned API key (does not return the\n * plaintext secret). `GET /account/{merchantId}/profile/api-keys/{keyId}`\n *\n * @param merchantId - The merchant account ID.\n * @param keyId - The API key ID.\n * @returns The API key metadata.\n */\n async retrieveByProfile(merchantId: string, keyId: string): Promise<ApiKeyResponse> {\n return this.request(\n 'GET',\n `/account/${encodeURIComponent(merchantId)}/profile/api-keys/${encodeURIComponent(keyId)}`,\n );\n }\n\n /**\n * Update a shop-pinned API key's name, description, or expiry.\n * `POST /account/{merchantId}/profile/api-keys/{keyId}`\n *\n * @param merchantId - The merchant account ID.\n * @param keyId - The API key ID to update.\n * @param params - Fields to update.\n * @returns The updated API key metadata.\n */\n async updateByProfile(\n merchantId: string,\n keyId: string,\n params: ApiKeyUpdateRequest,\n ): Promise<ApiKeyResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(merchantId)}/profile/api-keys/${encodeURIComponent(keyId)}`,\n { body: params },\n );\n }\n\n /**\n * Revoke a shop-pinned API key, immediately invalidating it.\n * `DELETE /account/{merchantId}/profile/api-keys/{keyId}`\n *\n * @param merchantId - The merchant account ID.\n * @param keyId - The API key ID to revoke.\n * @returns Revocation confirmation.\n */\n async revokeByProfile(merchantId: string, keyId: string): Promise<ApiKeyRevokeResponse> {\n return this.request(\n 'DELETE',\n `/account/${encodeURIComponent(merchantId)}/profile/api-keys/${encodeURIComponent(keyId)}`,\n );\n }\n\n /**\n * Replace the secret of an API key pinned to the caller's shop. The key\n * keeps its id, name, scope, origin rule, rate cap and expiry. The old\n * secret stops working immediately, with no grace period.\n * `POST /account/{merchantId}/profile/api-keys/{keyId}/rotate`\n *\n * @param merchantId - The merchant account ID.\n * @param keyId - The API key ID to rotate.\n * @returns The key with its new plaintext secret (shown once only).\n */\n async rotateByProfile(merchantId: string, keyId: string): Promise<ApiKeyCreateResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(merchantId)}/profile/api-keys/${encodeURIComponent(keyId)}/rotate`,\n );\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/
|
|
1
|
+
{"version":3,"sources":["/tmp/pub0495/delopay-typescript-sdk/dist/chunk-5O2JSQYA.cjs","../src/resources/fees.ts"],"names":[],"mappings":"AAAA;ACwBO,IAAM,KAAA,EAAN,MAAW;AAAA,EAIhB,WAAA,CAA6B,OAAA,EAAoB;AAApB,IAAA,IAAA,CAAA,QAAA,EAAA,OAAA;AAC3B,IAAA,IAAA,CAAK,MAAA,EAAQ,IAAI,eAAA,CAAgB,OAAO,CAAA;AAAA,EAC1C;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,MAAM,MAAA,CAAO,MAAA,EAAkC,UAAA,EAAkD;AAC/F,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,MAAA,EAAQ,gBAAA,EAAkB;AAAA,MAC5C,IAAA,EAAM,MAAA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cjs","sourcesContent":[null,"import type {\n FeeRulePreviewRequest,\n FeeRulePreviewResponse,\n FeeScheduleCreateRequest,\n FeeScheduleResponse,\n FeeScheduleUpdateRequest,\n PlatformFeeRuleInput,\n PlatformFeeRuleResponse,\n PlatformFeeRuleRequest,\n} from '../types';\nimport type { RequestExtras, RequestFn } from '../client';\n\n/**\n * Merchant-scoped fee schedules. Each schedule optionally targets a\n * specific shop (via `shop_id`). Merchants can CRUD their own fee\n * overrides; platform-wide fee programs are administered by Delopay and\n * not exposed here.\n *\n * `fees.rules` manages the merchant-owned Euclid fee-rule program, which takes\n * precedence over the flat schedules above. A program is scoped either to one\n * shop (`profile_id`) or merchant-wide; a shop-scoped program wins for that\n * shop, otherwise the merchant-wide one applies. Build the program with the\n * `feeProgram()` helper.\n */\nexport class Fees {\n /** Merchant-owned Euclid fee-rule program (`/merchant-fees/rules`). */\n readonly rules: FeeRulesManager;\n\n constructor(private readonly request: RequestFn) {\n this.rules = new FeeRulesManager(request);\n }\n\n /**\n * Create a merchant-scoped fee schedule (optionally per-shop).\n *\n * @param params - Fee schedule parameters.\n * @param merchantId - The merchant account ID.\n */\n async create(params: FeeScheduleCreateRequest, merchantId: string): Promise<FeeScheduleResponse> {\n return this.request('POST', '/merchant-fees', {\n body: params,\n query: { merchant_id: merchantId },\n });\n }\n\n /**\n * List the merchant's own fee schedules.\n *\n * @param merchantId - The merchant account ID.\n */\n async list(merchantId: string): Promise<FeeScheduleResponse[]> {\n return this.request('GET', '/merchant-fees/list', {\n query: { merchant_id: merchantId },\n });\n }\n\n /**\n * Update a merchant-scoped fee schedule.\n *\n * @param feeId - The fee schedule ID.\n * @param params - Fields to update.\n */\n async update(\n feeId: string,\n params: FeeScheduleUpdateRequest,\n options?: RequestExtras,\n ): Promise<FeeScheduleResponse> {\n return this.request('PUT', `/merchant-fees/${encodeURIComponent(feeId)}`, {\n body: params,\n ...options,\n });\n }\n\n /**\n * Delete a merchant-scoped fee schedule.\n *\n * @param feeId - The fee schedule ID.\n */\n async delete(feeId: string): Promise<FeeScheduleResponse> {\n return this.request('DELETE', `/merchant-fees/${encodeURIComponent(feeId)}`);\n }\n}\n\n/**\n * Manages a merchant's Euclid fee-rule programs (merchant-wide or per-shop, one\n * active program per scope). Build the `algorithm` with `feeProgram()`. The SDK\n * injects `fee_owner: 'merchant'`; set `profile_id` on the input to scope a\n * program to a shop.\n */\nexport class FeeRulesManager {\n constructor(private readonly request: RequestFn) {}\n\n /**\n * Create or replace the merchant's fee-rule program (a new active version;\n * the previous version is deactivated server-side).\n *\n * @param params - The program plus optional name / shop scope / validity window.\n * @param merchantId - The merchant account ID.\n */\n async upsert(params: PlatformFeeRuleInput, merchantId: string): Promise<PlatformFeeRuleResponse> {\n const body: PlatformFeeRuleRequest = { ...params, fee_owner: 'merchant' };\n return this.request('PUT', '/merchant-fees/rules', {\n body,\n query: { merchant_id: merchantId },\n });\n }\n\n /**\n * Retrieve the active fee-rule program for a scope, or `null` if none.\n *\n * @param merchantId - The merchant account ID.\n * @param profileId - Optional shop (`profile_id`) scope. Omit for the\n * merchant-wide program; pass a shop id to get that shop's program.\n */\n async retrieve(merchantId: string, profileId?: string): Promise<PlatformFeeRuleResponse | null> {\n return this.request('GET', '/merchant-fees/rules', {\n query: { merchant_id: merchantId, profile_id: profileId },\n });\n }\n\n /**\n * Deactivate a fee-rule program (falls back to the flat fee schedules /\n * volume tier). Idempotent.\n *\n * @param merchantId - The merchant account ID.\n * @param profileId - Optional shop (`profile_id`) scope. Omit to target the\n * merchant-wide program; pass a shop id to delete only that shop's program\n * (other shops' programs are left intact).\n */\n async delete(merchantId: string, profileId?: string): Promise<void> {\n await this.request('DELETE', '/merchant-fees/rules', {\n query: { merchant_id: merchantId, profile_id: profileId },\n });\n }\n\n /**\n * Dry-run a candidate fee-rule program against a sample transaction.\n * Returns the matched rule name, whether it fell through, and the computed fee.\n * Does not persist anything.\n *\n * @param input - Candidate program + sample transaction fields.\n * @param merchantId - The merchant account ID.\n */\n async preview(input: FeeRulePreviewRequest, merchantId: string): Promise<FeeRulePreviewResponse> {\n return this.request('POST', '/merchant-fees/rules/preview', {\n body: input,\n query: { merchant_id: merchantId },\n });\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/anes/delo-payment/delopay-typescript-sdk/dist/chunk-5QS67SBO.cjs","../src/resources/connectors.ts"],"names":[],"mappings":"AAAA;ACkEO,IAAM,WAAA,EAAN,MAAiB;AAAA,EACtB,WAAA,CAA6B,OAAA,EAAoB;AAApB,IAAA,IAAA,CAAA,QAAA,EAAA,OAAA;AAAA,EAAqB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAYlD,MAAM,4BAAA,CACJ,UAAA,EACA,WAAA,EACA,MAAA,EACqC;AACrC,IAAA,OAAO,IAAA,CAAK,OAAA;AAAA,MACV,KAAA;AAAA,MACA,CAAA,SAAA,EAAY,kBAAA,CAAmB,UAAU,CAAC,CAAA,YAAA,EAAe,kBAAA,CAAmB,WAAW,CAAC,CAAA,uBAAA,CAAA;AAAA,MACxF,EAAE,KAAA,EAAO,EAAE,SAAA,EAAW,MAAA,CAAO,UAAU,EAAE;AAAA,IAC3C,CAAA;AAAA,EACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAgBA,MAAM,0BAAA,CACJ,UAAA,EACA,WAAA,EACA,MAAA,EACqC;AACrC,IAAA,OAAO,IAAA,CAAK,OAAA;AAAA,MACV,KAAA;AAAA,MACA,CAAA,SAAA,EAAY,kBAAA,CAAmB,UAAU,CAAC,CAAA,YAAA,EAAe,kBAAA,CAAmB,WAAW,CAAC,CAAA,uBAAA,CAAA;AAAA,MACxF,EAAE,IAAA,EAAM,OAAO;AAAA,IACjB,CAAA;AAAA,EACF;AAAA,EAEA,MAAM,MAAA,CAAO,SAAA,EAAmB,MAAA,EAA4D;AAC1F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;AAAA;AAAA;AAAA;AAAA,EAAA;AAeE,IAAA;AAA2F,EAAA;AAC7F;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAA;AAeE,IAAA;AAAY,MAAA;AACV,MAAA;AACiF,MAAA;AAClE,IAAA;AACjB,EAAA;AACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAA;AAgBE,IAAA;AAAY,MAAA;AACV,MAAA;AACiF,MAAA;AAClE,IAAA;AACjB,EAAA;AACF;AAAA;AAAA;AAAA;AAAA,EAAA;AAWE,IAAA;AAAuF,MAAA;AAChE,IAAA;AACtB,EAAA;AACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAA;AAgBE,IAAA;AAAwF,MAAA;AAChF,IAAA;AACP,EAAA;AACH;AAAA,EAAA;AAIE,IAAA;AAAqD,EAAA;AAEzD;AAEA;AACE,EAAA;AACF;ADhRA;AACA;AACA;AACA","file":"/home/anes/delo-payment/delopay-typescript-sdk/dist/chunk-5QS67SBO.cjs","sourcesContent":[null,"import type {\n ApplePayRegistrationList,\n ApplePayRegistrationMarkRequest,\n ApplePayRegistrationRetryRequest,\n ConnectorBuyerMailQuery,\n ConnectorBuyerMailResponse,\n ConnectorBuyerMailUpdate,\n ConnectorCloneRequest,\n ConnectorConsolidationRequest,\n ConnectorConsolidationResponse,\n ConnectorCurrencyPolicyResponse,\n ConnectorCurrencyPolicyUpdateRequest,\n ConnectorShopsAddRequest,\n ConnectorShopUpdateRequest,\n ConnectorShopsResponse,\n ConnectorHealthResponse,\n EpayoutsCatalogResponse,\n PanesCatalogResponse,\n VaultRoutesApplyRequest,\n VaultRoutesApplyResponse,\n VaultRoutesPreviewRequest,\n VaultRoutesPreviewResponse,\n VaultOutagesResponse,\n VaultOutageGroupActionResponse,\n VaultOutageGroupActionsListResponse,\n VaultOutageGroupCheckRecoveryResponse,\n VaultOutageGroupRestoreRequest,\n VaultOutageGroupRestoreResponse,\n VaultOutageGroupSwitchOffPreviewRequest,\n VaultOutageGroupSwitchOffPreviewResponse,\n VaultOutageGroupSwitchOffRequest,\n VaultVerificationResponse,\n VaultVerifyRequest,\n ConnectorCreateRequest,\n ConnectorResponse,\n ConnectorUpdateRequest,\n ConnectorWebhookListResponse,\n ConnectorWebhookRegisterRequest,\n ConnectorWebhookRegisterResponse,\n ConnectorWebhookSyncResponse,\n WebhookAddressPreviewResponse,\n WebhookAddressRequest,\n WebhookAddressResponse,\n ReturnAddressPreviewResponse,\n ReturnAddressRequest,\n ReturnAddressResponse,\n ProviderWebhookCreateRequest,\n ProviderWebhookCreateResponse,\n ProviderWebhookDeleteRequest,\n ProviderWebhookDeleteResult,\n ProviderWebhookEndpoint,\n ProviderWebhookListResponse,\n ProviderWebhookReplacePreviewResponse,\n ProviderWebhookReplaceRequest,\n ProviderWebhookReplaceResponse,\n ProviderWebhookUpdateRequest,\n WebhookRegistrationEnvironment,\n AirwallexApplePayDomainsRegisterRequest,\n AirwallexApplePayDomainsRegisterResponse,\n StripePaymentMethodDomainsRegisterRequest,\n StripePaymentMethodDomainsRegisterResponse,\n WhopApplePayDomainsRegisterRequest,\n WhopApplePayDomainsRegisterResponse,\n} from '../types';\nimport type { RequestExtras, RequestFn } from '../client';\n\nexport class Connectors {\n constructor(private readonly request: RequestFn) {}\n\n /**\n * Read the connected provider account's optional buyer-email preference.\n * Currently supported for Whop. Use `setJwtToken` with a merchant JWT that\n * has Connector Edit authority; a shop token or API key cannot substitute.\n * Select Sandbox or Live explicitly through `test_mode`.\n *\n * The preference affects every shop sharing the provider account. It does\n * not disable mandatory provider messages or DeloPay invoice delivery.\n * A null or absent value establishes no on/off preference.\n */\n async retrieveBuyerEmailPreference(\n merchantId: string,\n connectorId: string,\n params: ConnectorBuyerMailQuery,\n ): Promise<ConnectorBuyerMailResponse> {\n return this.request(\n 'GET',\n `/account/${encodeURIComponent(merchantId)}/connectors/${encodeURIComponent(connectorId)}/buyer-email-preference`,\n { query: { test_mode: params.test_mode } },\n );\n }\n\n /**\n * Change the optional buyer-email preference for the whole provider account.\n * Currently supported for Whop. Requires a merchant JWT with Connector Edit\n * authority and explicit confirmation for every shop sharing the account.\n * Send the exact account, credential mode and value read before confirmation;\n * a changed account or preference is refused before mutation.\n *\n * Inspect `outcome`: only `verified` confirms the requested value through a\n * fresh exact-account read. HTTP 200 may instead report a conflict, refusal\n * or unknown outcome. An uncertain change may have happened; read the\n * preference again before retrying, including after a transport error.\n * This method adds no automatic readback or retry. Mandatory provider\n * messages and DeloPay invoice delivery are unaffected.\n */\n async updateBuyerEmailPreference(\n merchantId: string,\n connectorId: string,\n params: ConnectorBuyerMailUpdate,\n ): Promise<ConnectorBuyerMailResponse> {\n return this.request(\n 'PUT',\n `/account/${encodeURIComponent(merchantId)}/connectors/${encodeURIComponent(connectorId)}/buyer-email-preference`,\n { body: params },\n );\n }\n\n async create(accountId: string, params: ConnectorCreateRequest): Promise<ConnectorResponse> {\n return this.request('POST', `/account/${encodeURIComponent(accountId)}/connectors`, {\n body: params,\n });\n }\n\n /**\n * One connector account.\n *\n * The credential-bearing fields come back `null` here, whatever is stored:\n * `connector_webhook_details`, `connector_wallets_details`,\n * `pm_auth_config` and `additional_merchant_data`. They are dropped rather\n * than masked, because an editor that prefills from this response and\n * PATCHes the field back would otherwise save a mask over a live signing\n * secret. Send those fields only when the operator has typed a new value,\n * and omit them entirely otherwise — an omitted field leaves the stored one\n * alone.\n *\n * This is the retrieve path alone. `create` and `update` echo back what the\n * caller sent, and `clone` returns the *copied* secrets — see that method.\n *\n * Because the value is gone, `has_live_webhook_secret` and\n * `has_sandbox_webhook_secret` are what tell a stored webhook signing secret\n * from an unconfigured one. Render those; never infer configuration from the\n * `null` block.\n *\n * `GET /account/{accountId}/connectors/{connectorId}`\n */\n async retrieve(accountId: string, connectorId: string): Promise<ConnectorResponse> {\n return this.request(\n 'GET',\n `/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}`,\n );\n }\n\n /**\n * The merchant's connector accounts.\n *\n * Never wider than the caller: an API key pinned to one shop lists that\n * shop's connectors only, not every sibling shop's.\n *\n * `GET /account/{accountId}/connectors`\n */\n async list(accountId: string): Promise<ConnectorResponse[]> {\n return this.request('GET', `/account/${encodeURIComponent(accountId)}/connectors`);\n }\n\n /**\n * The profile-scoped connector list. The merchant-wide `list()` is\n * merchant-gated and 403s for a profile-entity (shop user) JWT; this\n * variant is scoped server-side to the caller's own profile.\n *\n * `GET /account/{accountId}/profile/connectors`\n */\n async listByProfile(accountId: string): Promise<ConnectorResponse[]> {\n return this.request('GET', `/account/${encodeURIComponent(accountId)}/profile/connectors`);\n }\n\n /**\n * Every connector's pane capabilities, as the router itself knows them —\n * which rails a connector supports, and which methods it can publish as a\n * pane with the confirm routing keys each one carries.\n *\n * Capability facts only: no label, sublabel or category comes back. A\n * designer renders a method's copy from its own locale files, keyed by\n * `key`, and takes `payment_method` / `payment_method_type` from here\n * verbatim rather than deriving them client-side.\n *\n * This is what the pane helpers in `src/panes.ts` should be driven from —\n * `paneMethodInfo`, `defaultPane` and `validatePanes` all take a\n * {@link PanesConnectorCatalog} out of this response, so a connector the\n * router starts publishing panes for needs no SDK release.\n *\n * `GET /account/{accountId}/connectors/native-panes/catalog`\n *\n * The path keeps the `native-panes` spelling deliberately. The identifiers\n * were renamed off \"native pane\"; the route was not, and pointing at the\n * backend's new name before it is deployed everywhere would both 404 against\n * un-upgraded replicas mid-rollout and fail `scripts/parity-check.mjs`,\n * which blocks publishing.\n */\n async getPanesCatalog(accountId: string): Promise<PanesCatalogResponse> {\n return this.request(\n 'GET',\n `/account/${encodeURIComponent(accountId)}/connectors/native-panes/catalog`,\n );\n }\n\n /** @deprecated Renamed to {@link getPanesCatalog}. Removed in 0.112.0. */\n async getNativePanesCatalog(accountId: string): Promise<PanesCatalogResponse> {\n return this.getPanesCatalog(accountId);\n }\n\n /**\n * Sweep the merchant's own e-Payouts module and return the rails it\n * actually has enabled. Server-side this makes many upstream calls, so it\n * can take several seconds — show progress.\n *\n * `POST /account/{accountId}/connectors/{connectorId}/epayouts/catalog/sync`\n */\n async syncEpayoutsCatalog(\n accountId: string,\n connectorId: string,\n ): Promise<EpayoutsCatalogResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}/epayouts/catalog/sync`,\n );\n }\n\n /**\n * Update a connector account.\n *\n * `connector_webhook_details` **merges** into the stored block key by key:\n * an absent key keeps its stored secret, an explicit value is written, and\n * an explicit empty string clears that secret. Send only the\n * keys the operator typed — padding the other environment's keys with `''`\n * clears a live signing secret and inbound webhooks stop verifying.\n *\n * The other credential-bearing fields — `connector_wallets_details`,\n * `pm_auth_config`, `additional_merchant_data` — are still whole-value\n * replacements: omit them unless you are writing a complete new value.\n *\n * `POST /account/{accountId}/connectors/{connectorId}`\n */\n async update(\n accountId: string,\n connectorId: string,\n params: ConnectorUpdateRequest,\n options?: RequestExtras,\n ): Promise<ConnectorResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}`,\n {\n body: params,\n ...options,\n },\n );\n }\n\n /**\n * Remove a connector account.\n *\n * A shop-scoped role may remove a connector of its own shop — the shop is\n * re-checked server-side — so creating processors and removing them are the\n * same rung of access rather than two.\n *\n * `DELETE /account/{accountId}/connectors/{connectorId}`\n */\n async delete(accountId: string, connectorId: string): Promise<ConnectorResponse> {\n return this.request(\n 'DELETE',\n `/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}`,\n );\n }\n\n /**\n * Clone a connector into another shop (business profile) of the same\n * merchant. `POST /account/{accountId}/connectors/{connectorId}/clone`\n *\n * Credentials are copied server-side, re-encrypted under the same merchant\n * key, so the caller never has to *supply* them — `retrieve` returns `null`\n * for the credential fields, which is what makes a client-side copy\n * impossible in the first place.\n *\n * The response, however, is the unredacted connector: `connector_account_details`\n * is masked, but `connector_webhook_details`, `connector_wallets_details`,\n * `pm_auth_config` and `additional_merchant_data` come back with the copied\n * secrets in them — values this caller never sent. Do not log or echo the\n * response; read `merchant_connector_id` and discard the rest.\n */\n async clone(\n accountId: string,\n connectorId: string,\n params: ConnectorCloneRequest,\n ): Promise<ConnectorResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}/clone`,\n { body: params },\n );\n }\n\n /**\n * Share a connector with more shops of the same merchant.\n * `POST /account/{accountId}/connectors/{connectorId}/shops`\n *\n * Nothing is copied: every shop sends payments to the same account, on the\n * same credentials and webhook, and the account's limits count them all.\n */\n async addShops(\n accountId: string,\n connectorId: string,\n params: ConnectorShopsAddRequest,\n ): Promise<ConnectorShopsResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}/shops`,\n { body: params },\n );\n }\n\n /**\n * Fold copies of the same provider account into this connector.\n * `POST /account/{accountId}/connectors/{connectorId}/consolidate`\n *\n * The copies' shops move to the connector with their on/off state, routing,\n * checkout layout, currencies, saved credentials, mandates and\n * subscriptions. A copy keeps answering for the payments made on it and\n * serves no shop. Send `dry_run: true` first, then confirm with the\n * preview's `preview_token` and a choice for every conflict.\n */\n async consolidate(\n accountId: string,\n connectorId: string,\n params: ConnectorConsolidationRequest,\n ): Promise<ConnectorConsolidationResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}/consolidate`,\n { body: params },\n );\n }\n\n /**\n * Switch a connector off, or back on, in one shop it serves.\n * `POST /account/{accountId}/connectors/{connectorId}/shops/{profileId}`\n */\n async setShopDisabled(\n accountId: string,\n connectorId: string,\n profileId: string,\n params: ConnectorShopUpdateRequest,\n ): Promise<ConnectorShopsResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}/shops/${encodeURIComponent(profileId)}`,\n { body: params },\n );\n }\n\n /**\n * Stop a connector serving one shop. Any shop may leave, the\n * one the connector was created in included, while another one stays: the\n * last shop is refused, and the connector is deleted instead. The account,\n * its limits and every other shop on it are unaffected.\n * `DELETE /account/{accountId}/connectors/{connectorId}/shops/{profileId}`\n */\n async removeShop(\n accountId: string,\n connectorId: string,\n profileId: string,\n ): Promise<ConnectorShopsResponse> {\n return this.request(\n 'DELETE',\n `/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}/shops/${encodeURIComponent(profileId)}`,\n );\n }\n\n /**\n * Read the transaction currencies a connector may process: its own list,\n * what the provider is known to accept with its methods, and the effective\n * currencies in each shop it serves.\n * `GET /account/{accountId}/connectors/{connectorId}/currencies`\n */\n async getCurrencies(\n accountId: string,\n connectorId: string,\n ): Promise<ConnectorCurrencyPolicyResponse> {\n return this.request(\n 'GET',\n `/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}/currencies`,\n );\n }\n\n /**\n * Set the transaction currencies a connector may process in every shop it\n * serves, and what it does with a payment in a currency it does not take\n * (`conversion`). `allowed_currencies: null` allows every currency the\n * provider supports; a field left out stays as it is. With `dry_run`,\n * nothing is saved and `impact` reports the effect.\n * `PUT /account/{accountId}/connectors/{connectorId}/currencies`\n */\n async setCurrencies(\n accountId: string,\n connectorId: string,\n params: ConnectorCurrencyPolicyUpdateRequest,\n ): Promise<ConnectorCurrencyPolicyResponse> {\n return this.request(\n 'PUT',\n `/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}/currencies`,\n { body: params },\n );\n }\n\n /**\n * Narrow a connector's currencies in one shop it serves, within the\n * connector's own list, or set the shop's own `conversion`. `null` returns\n * the shop to the connector's setting; a field left out stays as it is.\n * `PUT /account/{accountId}/connectors/{connectorId}/shops/{profileId}/currencies`\n */\n async setShopCurrencies(\n accountId: string,\n connectorId: string,\n profileId: string,\n params: ConnectorCurrencyPolicyUpdateRequest,\n ): Promise<ConnectorCurrencyPolicyResponse> {\n return this.request(\n 'PUT',\n `/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}/shops/${encodeURIComponent(profileId)}/currencies`,\n { body: params },\n );\n }\n\n // --- Advanced operations (Task 4.8) ---\n\n /**\n * Run the configuration checks for a vault (VGS) connector account:\n * credential validity, write-only Collect scope, reachability, environment\n * coherence, route coverage. Read-only but not cheap — it decrypts the\n * vault's management credential and talks to VGS.\n *\n * `POST /account/{accountId}/connectors/{connectorId}/vault/verify`\n */\n async verifyVault(\n accountId: string,\n connectorId: string,\n params: VaultVerifyRequest,\n ): Promise<VaultVerificationResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}/vault/verify`,\n { body: params },\n );\n }\n\n /**\n * The shops whose card vault is switched on and whose vault account has\n * stopped working, each with the cause. While a shop is listed, its card\n * form cannot be shown and its card payments fail.\n *\n * An outage is listed once the vault has refused the account several times\n * in a row over at least a minute, and is taken off the list when the vault\n * serves the account again. Nothing switches a vault off by itself: see\n * `profiles.switchVaultOff`.\n *\n * `GET /account/{accountId}/vault/outages`\n */\n async listVaultOutages(accountId: string): Promise<VaultOutagesResponse> {\n return this.request('GET', `/account/${encodeURIComponent(accountId)}/vault/outages`);\n }\n\n /**\n * Preview switching off a failing vault provider across all affected shops\n * of an account. Returns `eligible: true` only when the caller has full\n * access to every affected shop and vault account of that provider.\n *\n * `POST /account/{accountId}/vault/outages/group-switch-off/preview`\n */\n async previewVaultOutageGroupSwitchOff(\n accountId: string,\n params: VaultOutageGroupSwitchOffPreviewRequest,\n ): Promise<VaultOutageGroupSwitchOffPreviewResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(accountId)}/vault/outages/group-switch-off/preview`,\n { body: params },\n );\n }\n\n /**\n * Switch off a failing vault provider across all affected shops returned by\n * {@link Connectors.previewVaultOutageGroupSwitchOff} in one atomic step.\n * Refused when the affected shop set changed since the preview.\n *\n * `POST /account/{accountId}/vault/outages/group-switch-off`\n */\n async executeVaultOutageGroupSwitchOff(\n accountId: string,\n params: VaultOutageGroupSwitchOffRequest,\n ): Promise<VaultOutageGroupActionResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(accountId)}/vault/outages/group-switch-off`,\n { body: params },\n );\n }\n\n /**\n * List active, recovered, and historical vault outage group actions for an\n * account, each hydrated with per-shop live states filtered to the caller's\n * shop and connector grants.\n *\n * `GET /account/{accountId}/vault/outages/group-actions`\n */\n async listVaultOutageGroupActions(\n accountId: string,\n ): Promise<VaultOutageGroupActionsListResponse> {\n return this.request(\n 'GET',\n `/account/${encodeURIComponent(accountId)}/vault/outages/group-actions`,\n );\n }\n\n /**\n * Probe the live credential slot of every still-switched-off vault account\n * in a group action and transition it to `recovered` when all answer healthy.\n *\n * `POST /account/{accountId}/vault/outages/group-actions/{actionId}/check-recovery`\n */\n async checkVaultOutageGroupRecovery(\n accountId: string,\n actionId: string,\n ): Promise<VaultOutageGroupCheckRecoveryResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(accountId)}/vault/outages/group-actions/${encodeURIComponent(actionId)}/check-recovery`,\n );\n }\n\n /**\n * Restore or undo a vault outage group action after verifying each remaining\n * vault account works again, skipping shops that were already manually\n * re-enabled or changed to another vault.\n *\n * `POST /account/{accountId}/vault/outages/group-actions/{actionId}/restore`\n */\n async restoreVaultOutageGroupAction(\n accountId: string,\n actionId: string,\n params: VaultOutageGroupRestoreRequest = {},\n ): Promise<VaultOutageGroupRestoreResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(accountId)}/vault/outages/group-actions/${encodeURIComponent(actionId)}/restore`,\n { body: params },\n );\n }\n\n /**\n * Compute the route document the vault SHOULD have and diff it against\n * what exists, without writing anything. The returned fingerprints must be\n * echoed byte for byte on {@link Connectors.applyVaultRoutes}.\n *\n * A router without these endpoints answers 404 — render that as \"this\n * build cannot configure routes\", never as \"there is nothing to change\".\n *\n * `POST /account/{accountId}/connectors/{connectorId}/vault/routes/preview`\n */\n async previewVaultRoutes(\n accountId: string,\n connectorId: string,\n params: VaultRoutesPreviewRequest,\n ): Promise<VaultRoutesPreviewResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}/vault/routes/preview`,\n { body: params },\n );\n }\n\n /**\n * Write the routes the merchant just previewed. Both fingerprints come\n * from the preview and are opaque: `expected_current_fingerprint` says the\n * vault has not moved (`null` = \"the preview found no routes\" and is sent\n * as `null`, never omitted), `expected_desired_fingerprint` says the\n * document is still the one on screen. A 409 (`DE_04`) means the vault\n * changed since the preview — nothing was written; preview again.\n *\n * `POST /account/{accountId}/connectors/{connectorId}/vault/routes/apply`\n */\n async applyVaultRoutes(\n accountId: string,\n connectorId: string,\n params: VaultRoutesApplyRequest,\n ): Promise<VaultRoutesApplyResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}/vault/routes/apply`,\n { body: params },\n );\n }\n\n /**\n * What the processor says about this connector account: whether it will\n * accept charges, which capabilities are live, and anything it is still\n * waiting on.\n *\n * This is **not** {@link Connectors.verify}. That one asks whether the stored\n * credentials work, by running a test-card authorization; a processor can\n * revoke an account's ability to take payments while the credentials stay\n * perfectly valid, and then a credential check reports healthy while every\n * checkout silently stalls. This asks the account's own status instead, and\n * does not create a payment. By default it reads a scheduler snapshot;\n * `refresh: true` asks for a new probe and `stale` identifies an overdue result.\n * `test_mode` selects the requested environment; `credential_source` identifies\n * a sandbox, live or shared credential set. Not every provider reports chargeability.\n *\n * Connectors with no probe answer `state: 'unknown'` with\n * `unknown_reason: 'connector_not_supported'`, rather than an error — every\n * `'unknown'` carries a reason code you render your own words for. A router\n * without this endpoint answers 404 — render that as \"this build cannot\n * report health\", never as \"healthy\".\n *\n * `GET /account/{accountId}/connectors/{connectorId}/health`\n */\n async health(\n accountId: string,\n connectorId: string,\n options?: { test_mode?: boolean; refresh?: boolean },\n ): Promise<ConnectorHealthResponse> {\n return this.request(\n 'GET',\n `/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}/health`,\n { query: options },\n );\n }\n\n /** Verify connector credentials. `POST /account/connectors/verify` */\n async verify(params: Record<string, unknown>): Promise<Record<string, unknown>> {\n return this.request('POST', '/account/connectors/verify', { body: params });\n }\n\n /**\n * Register a webhook for a connector.\n * `POST /account/{merchantId}/connectors/webhooks/{connectorId}`\n *\n * @param params - Optional event scope. Defaults to `{ event_type: 'all_events' }`\n * when omitted; pass `{ event_type: { specific_event: '…' } }` to scope\n * to a single event.\n */\n async registerWebhook(\n merchantId: string,\n connectorId: string,\n params?: ConnectorWebhookRegisterRequest,\n ): Promise<ConnectorWebhookRegisterResponse> {\n const path = `/account/${encodeURIComponent(merchantId)}/connectors/webhooks/${encodeURIComponent(connectorId)}`;\n if (params === undefined) return this.request('POST', path);\n return this.request('POST', path, { body: params });\n }\n\n /**\n * Register checkout/shop domains as Stripe payment method domains, so Apple\n * Pay renders on those pages.\n * `POST /account/{merchantId}/connectors/{connectorId}/stripe/payment-method-domains`\n *\n * Stripe connectors only. One call registers against a single credential set\n * (`environment`, default `'live'`) — call twice to cover live and sandbox.\n * Per-URL outcomes come back in `results`; a missing sandbox credential set\n * is a request-level 400.\n */\n async registerStripePaymentMethodDomains(\n merchantId: string,\n connectorId: string,\n params: StripePaymentMethodDomainsRegisterRequest,\n ): Promise<StripePaymentMethodDomainsRegisterResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(merchantId)}/connectors/${encodeURIComponent(connectorId)}/stripe/payment-method-domains`,\n { body: params },\n );\n }\n\n /**\n * Register checkout/shop domains as Airwallex Apple Pay domains, so Apple Pay\n * renders on those pages.\n * `POST /account/{merchantId}/connectors/{connectorId}/airwallex/apple-pay-domains`\n *\n * Airwallex connectors only. One call registers against a single credential\n * set (`environment`, default `'live'`) — call twice to cover live and\n * sandbox. Idempotent: a host already on the account comes back\n * `already_registered` without a write.\n */\n async registerAirwallexApplePayDomains(\n merchantId: string,\n connectorId: string,\n params: AirwallexApplePayDomainsRegisterRequest,\n ): Promise<AirwallexApplePayDomainsRegisterResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(merchantId)}/connectors/${encodeURIComponent(connectorId)}/airwallex/apple-pay-domains`,\n { body: params },\n );\n }\n\n /**\n * Register and verify checkout/shop domains as Whop Apple Pay payment method\n * domains, so Apple Pay renders in Whop's embedded card form on those pages.\n * `POST /account/{merchantId}/connectors/{connectorId}/whop/apple-pay-domains`\n *\n * Whop connectors only. One call registers against a single credential set\n * (`environment`, default `'live'`) — call twice to cover live and sandbox.\n * Idempotent: a host Whop already holds as verified comes back\n * `already_verified` without a write, and a `pending` one is verified again.\n */\n async registerWhopApplePayDomains(\n merchantId: string,\n connectorId: string,\n params: WhopApplePayDomainsRegisterRequest,\n ): Promise<WhopApplePayDomainsRegisterResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(merchantId)}/connectors/${encodeURIComponent(connectorId)}/whop/apple-pay-domains`,\n { body: params },\n );\n }\n\n /**\n * The account's Apple Pay registration on every checkout address, per key\n * set: `registered`, `failed` (with why), `skipped` (the address serves\n * another processor's file), `pending` (the address is not ready yet),\n * `not_attempted`, or for PayPal `manual_pending` / `manual_done`.\n * `GET /account/{merchantId}/connectors/{connectorId}/apple-pay-registrations`\n */\n async applePayRegistrations(\n merchantId: string,\n connectorId: string,\n ): Promise<ApplePayRegistrationList> {\n return this.request(\n 'GET',\n `/account/${encodeURIComponent(merchantId)}/connectors/${encodeURIComponent(connectorId)}/apple-pay-registrations`,\n );\n }\n\n /**\n * Register the account on every ready checkout address whose Apple Pay file\n * serves its processor again, for one key set or both. Answers the list as\n * it stands afterwards.\n * `POST /account/{merchantId}/connectors/{connectorId}/apple-pay-registrations/retry`\n */\n async retryApplePayRegistrations(\n merchantId: string,\n connectorId: string,\n params: ApplePayRegistrationRetryRequest = {},\n ): Promise<ApplePayRegistrationList> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(merchantId)}/connectors/${encodeURIComponent(connectorId)}/apple-pay-registrations/retry`,\n { body: params },\n );\n }\n\n /**\n * Mark a checkout address registered (or not) for one key set, for a\n * processor without a registration API (PayPal). A reminder for the team:\n * nothing is checked with the processor. Refused for other processors.\n * `PUT /account/{merchantId}/connectors/{connectorId}/apple-pay-registrations/{hostId}/mark`\n */\n async markApplePayRegistration(\n merchantId: string,\n connectorId: string,\n hostId: string,\n params: ApplePayRegistrationMarkRequest,\n ): Promise<ApplePayRegistrationList> {\n return this.request(\n 'PUT',\n `/account/${encodeURIComponent(merchantId)}/connectors/${encodeURIComponent(connectorId)}/apple-pay-registrations/${encodeURIComponent(hostId)}/mark`,\n { body: params },\n );\n }\n\n /** Get registered webhooks for a connector. `GET /account/{merchantId}/connectors/webhooks/{connectorId}` */\n async getWebhook(merchantId: string, connectorId: string): Promise<ConnectorWebhookListResponse> {\n return this.request(\n 'GET',\n `/account/${encodeURIComponent(merchantId)}/connectors/webhooks/${encodeURIComponent(connectorId)}`,\n );\n }\n\n /**\n * Bring an already-registered webhook's event subscription up to date with\n * the events Delopay handles.\n * `POST /account/{merchantId}/connectors/webhooks/{connectorId}/sync-events`\n *\n * A PSP freezes an endpoint's event list at registration time, so an endpoint\n * created before an event type was added never receives it — silently, with\n * no error anywhere. {@link getWebhook} reports the gap as `missing_events`;\n * this repairs it.\n *\n * Unlike re-registering, the endpoints are updated in place: the endpoint id\n * and its signing secret are preserved, so signature verification keeps\n * working across the change. Stripe connectors only; idempotent, so it is\n * safe to call on a schedule or after every deploy.\n *\n * @example\n * ```typescript\n * const sync = await delopay.connectors.syncWebhookEvents('mer_abc', 'mca_xyz');\n * for (const endpoint of sync.endpoints) {\n * if (endpoint.error_message) console.warn(endpoint.connector_webhook_id, endpoint.error_message);\n * else if (endpoint.updated) console.log('subscribed', endpoint.added_events);\n * }\n * ```\n */\n async syncWebhookEvents(\n merchantId: string,\n connectorId: string,\n ): Promise<ConnectorWebhookSyncResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(merchantId)}/connectors/webhooks/${encodeURIComponent(connectorId)}/sync-events`,\n );\n }\n\n /**\n * Read the callback addresses of a connector's payment provider.\n * `GET /account/{merchantId}/connectors/webhooks/{connectorId}/address`\n *\n * One entry per environment: the saved mode and identifier, and for every\n * credential group the URL the policy asks for (`desired_url`) beside the URL\n * actually registered at the provider (`registered_url`) with its `status`.\n * Only `registered` means the provider delivers to the desired URL.\n *\n * Available for providers whose webhooks Delopay manages (Stripe, PayPal,\n * Airwallex, Whop) and for hand-configured ones (Creem, NomuPay,\n * MicroPayment). Other connectors are refused with a 400.\n */\n async getWebhookAddress(\n merchantId: string,\n connectorId: string,\n ): Promise<WebhookAddressResponse> {\n return this.request(\n 'GET',\n `/account/${encodeURIComponent(merchantId)}/connectors/webhooks/${encodeURIComponent(connectorId)}/address`,\n );\n }\n\n /**\n * Validate a proposed callback address without saving it.\n * `POST /account/{merchantId}/connectors/webhooks/{connectorId}/address/preview`\n *\n * Returns the validation errors as `{ field, code }` pairs, the URL every\n * affected credential group would get, the connector accounts that share it,\n * and whether saving needs `confirm_shared: true`. Needs the same permission\n * as saving.\n *\n * @example\n * ```typescript\n * const preview = await delopay.connectors.previewWebhookAddress('mer_abc', 'mca_xyz', {\n * environment: 'live',\n * mode: 'anonymous',\n * format: { prefix: 'wh-', style: 'alphanumeric', length: 16 },\n * });\n * if (!preview.valid) console.warn(preview.errors);\n * ```\n */\n async previewWebhookAddress(\n merchantId: string,\n connectorId: string,\n params: WebhookAddressRequest,\n ): Promise<WebhookAddressPreviewResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(merchantId)}/connectors/webhooks/${encodeURIComponent(connectorId)}/address/preview`,\n { body: params },\n );\n }\n\n /**\n * Save the callback address of a connector's payment provider for one\n * environment.\n * `PUT /account/{merchantId}/connectors/webhooks/{connectorId}/address`\n *\n * The address applies to every connector account of that provider and\n * environment, so `confirm_shared: true` is required when other accounts are\n * affected. For a managed provider Delopay then registers the new URL and\n * keeps the former one accepted; the response reports each credential\n * group's outcome in `status`. A `pending` or `failed` group keeps receiving\n * on its previous URL and is retried. For a hand-configured provider the\n * merchant enters the new `desired_url` at the provider.\n *\n * A refused proposal answers 422 with error code `IR_06` and the message\n * `Webhook address refused: field:code,…`. A save that lost to a concurrent\n * change of the same address answers 422 with error code `HE_00` and can be\n * repeated. A caller who may not edit every affected account answers 403.\n * Address changes are limited per provider and environment (`rate_limit`).\n */\n async updateWebhookAddress(\n merchantId: string,\n connectorId: string,\n params: WebhookAddressRequest,\n ): Promise<WebhookAddressResponse> {\n return this.request(\n 'PUT',\n `/account/${encodeURIComponent(merchantId)}/connectors/webhooks/${encodeURIComponent(connectorId)}/address`,\n { body: params },\n );\n }\n\n /**\n * Read how the return addresses of a connector's payment provider name the\n * merchant, per environment.\n * `GET /account/{merchantId}/connectors/{connectorId}/return-address`\n *\n * A return address is where the provider sends the buyer back after a step\n * it hosts. It belongs to the merchant, the provider and the environment,\n * so every connector account of that provider follows it.\n */\n async getReturnAddress(merchantId: string, connectorId: string): Promise<ReturnAddressResponse> {\n return this.request(\n 'GET',\n `/account/${encodeURIComponent(merchantId)}/connectors/${encodeURIComponent(connectorId)}/return-address`,\n );\n }\n\n /**\n * Validate a proposed return address without saving it.\n * `POST /account/{merchantId}/connectors/{connectorId}/return-address/preview`\n *\n * Nothing is reserved: a generated identifier in the answer is an example.\n * Needs the same permission as saving.\n *\n * @example\n * ```typescript\n * const preview = await delopay.connectors.previewReturnAddress('mer_abc', 'mca_xyz', {\n * environment: 'live',\n * mode: 'anonymous',\n * share_webhook_identifier: true,\n * });\n * if (!preview.valid) console.warn(preview.errors);\n * ```\n */\n async previewReturnAddress(\n merchantId: string,\n connectorId: string,\n params: ReturnAddressRequest,\n ): Promise<ReturnAddressPreviewResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(merchantId)}/connectors/${encodeURIComponent(connectorId)}/return-address/preview`,\n { body: params },\n );\n }\n\n /**\n * Save the return address of a connector's payment provider for one\n * environment.\n * `PUT /account/{merchantId}/connectors/{connectorId}/return-address`\n *\n * Payments started afterwards get return addresses of the new form; every\n * address already handed to the provider keeps working. A refused proposal\n * answers 422 with error code `IR_06` and the message\n * `Return address refused: field:code,…`. A caller who may not edit every\n * connector account of the provider answers 403. Address changes are\n * limited per provider and environment (`rate_limit`).\n */\n async updateReturnAddress(\n merchantId: string,\n connectorId: string,\n params: ReturnAddressRequest,\n ): Promise<ReturnAddressResponse> {\n return this.request(\n 'PUT',\n `/account/${encodeURIComponent(merchantId)}/connectors/${encodeURIComponent(connectorId)}/return-address`,\n { body: params },\n );\n }\n\n /**\n * Every webhook the connector's payment provider lists for its credentials\n * in one environment: Delopay's own, other connector accounts', former\n * addresses' and other integrations'.\n * `GET /account/{merchantId}/connectors/webhooks/{connectorId}/provider`\n *\n * Available for Stripe, PayPal, Airwallex, Whop and Adyen. Destinations are\n * masked; `capabilities` says which changes the provider allows and\n * `editable` whether the caller may make them.\n */\n async listProviderWebhooks(\n merchantId: string,\n connectorId: string,\n environment: WebhookRegistrationEnvironment,\n ): Promise<ProviderWebhookListResponse> {\n return this.request('GET', providerWebhooksPath(merchantId, connectorId), {\n query: { environment },\n });\n }\n\n /**\n * Create a webhook at the provider for the merchant's own systems.\n * `POST /account/{merchantId}/connectors/webhooks/{connectorId}/provider`\n *\n * The URL must be `https` and outside Delopay; Delopay's own webhook is\n * registered with `registerWebhook`. A returned `signing_secret` is not kept\n * by Delopay and cannot be read again.\n */\n async createProviderWebhook(\n merchantId: string,\n connectorId: string,\n params: ProviderWebhookCreateRequest,\n ): Promise<ProviderWebhookCreateResponse> {\n return this.request('POST', providerWebhooksPath(merchantId, connectorId), { body: params });\n }\n\n /**\n * Change one webhook at the provider.\n * `PATCH /account/{merchantId}/connectors/webhooks/{connectorId}/provider/{webhookId}`\n *\n * Refused once the webhook changed since `fingerprint`, and for Delopay's\n * own webhooks.\n */\n async updateProviderWebhook(\n merchantId: string,\n connectorId: string,\n webhookId: string,\n params: ProviderWebhookUpdateRequest,\n ): Promise<ProviderWebhookEndpoint> {\n return this.request(\n 'PATCH',\n `${providerWebhooksPath(merchantId, connectorId)}/${encodeURIComponent(webhookId)}`,\n { body: params },\n );\n }\n\n /**\n * Delete one webhook at the provider.\n * `POST /account/{merchantId}/connectors/webhooks/{connectorId}/provider/{webhookId}/delete`\n *\n * Refused once the webhook changed since `fingerprint`. Deleting Delopay's\n * own webhook needs `confirm_managed: true`; another connector account's is\n * never deleted from here.\n */\n async deleteProviderWebhook(\n merchantId: string,\n connectorId: string,\n webhookId: string,\n params: ProviderWebhookDeleteRequest,\n ): Promise<ProviderWebhookDeleteResult> {\n return this.request(\n 'POST',\n `${providerWebhooksPath(merchantId, connectorId)}/${encodeURIComponent(webhookId)}/delete`,\n { body: params },\n );\n }\n\n /**\n * What \"replace all\" would delete and keep. Nothing is changed.\n * `GET /account/{merchantId}/connectors/webhooks/{connectorId}/provider/replace`\n */\n async previewProviderWebhookReplace(\n merchantId: string,\n connectorId: string,\n environment: WebhookRegistrationEnvironment,\n ): Promise<ProviderWebhookReplacePreviewResponse> {\n return this.request('GET', `${providerWebhooksPath(merchantId, connectorId)}/replace`, {\n query: { environment },\n });\n }\n\n /**\n * Keep only Delopay's webhook: delete exactly the confirmed webhooks of the\n * preview, after registering Delopay's own unless `sequence` is\n * `delete_first`.\n * `POST /account/{merchantId}/connectors/webhooks/{connectorId}/provider/replace`\n *\n * A list that changed since the preview answers `scope_changed` and deletes\n * nothing. A second replacement while one runs is refused as busy (`HE_00`).\n */\n async replaceProviderWebhooks(\n merchantId: string,\n connectorId: string,\n params: ProviderWebhookReplaceRequest,\n ): Promise<ProviderWebhookReplaceResponse> {\n return this.request('POST', `${providerWebhooksPath(merchantId, connectorId)}/replace`, {\n body: params,\n });\n }\n\n /** List available payment methods. `GET /account/payment-methods` */\n async listPaymentMethods(): Promise<Record<string, unknown>[]> {\n return this.request('GET', '/account/payment-methods');\n }\n}\n\nfunction providerWebhooksPath(merchantId: string, connectorId: string): string {\n return `/account/${encodeURIComponent(merchantId)}/connectors/webhooks/${encodeURIComponent(connectorId)}/provider`;\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["/tmp/pub0495/delopay-typescript-sdk/dist/chunk-5QS67SBO.cjs","../src/resources/connectors.ts"],"names":[],"mappings":"AAAA;ACkEO,IAAM,WAAA,EAAN,MAAiB;AAAA,EACtB,WAAA,CAA6B,OAAA,EAAoB;AAApB,IAAA,IAAA,CAAA,QAAA,EAAA,OAAA;AAAA,EAAqB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAYlD,MAAM,4BAAA,CACJ,UAAA,EACA,WAAA,EACA,MAAA,EACqC;AACrC,IAAA,OAAO,IAAA,CAAK,OAAA;AAAA,MACV,KAAA;AAAA,MACA,CAAA,SAAA,EAAY,kBAAA,CAAmB,UAAU,CAAC,CAAA,YAAA,EAAe,kBAAA,CAAmB,WAAW,CAAC,CAAA,uBAAA,CAAA;AAAA,MACxF,EAAE,KAAA,EAAO,EAAE,SAAA,EAAW,MAAA,CAAO,UAAU,EAAE;AAAA,IAC3C,CAAA;AAAA,EACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAgBA,MAAM,0BAAA,CACJ,UAAA,EACA,WAAA,EACA,MAAA,EACqC;AACrC,IAAA,OAAO,IAAA,CAAK,OAAA;AAAA,MACV,KAAA;AAAA,MACA,CAAA,SAAA,EAAY,kBAAA,CAAmB,UAAU,CAAC,CAAA,YAAA,EAAe,kBAAA,CAAmB,WAAW,CAAC,CAAA,uBAAA,CAAA;AAAA,MACxF,EAAE,IAAA,EAAM,OAAO;AAAA,IACjB,CAAA;AAAA,EACF;AAAA,EAEA,MAAM,MAAA,CAAO,SAAA,EAAmB,MAAA,EAA4D;AAC1F,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,MAAA,EAAQ,CAAA,SAAA,EAAY,kBAAA,C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AA;AAAA;AAAA;AAAA;AAAA,EAAA;AAeE,IAAA;AAAY,MAAA;AACV,MAAA;AACiF,MAAA;AAClE,IAAA;AACjB,EAAA;AACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAA;AAgBE,IAAA;AAAY,MAAA;AACV,MAAA;AACiF,MAAA;AAClE,IAAA;AACjB,EAAA;AACF;AAAA;AAAA;AAAA;AAAA,EAAA;AAWE,IAAA;AAAuF,MAAA;AAChE,IAAA;AACtB,EAAA;AACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAA;AAgBE,IAAA;AAAwF,MAAA;AAChF,IAAA;AACP,EAAA;AACH;AAAA,EAAA;AAIE,IAAA;AAAqD,EAAA;AAEzD;AAEA;AACE,EAAA;AACF;ADhRA;AACA;AACA;AACA","file":"/tmp/pub0495/delopay-typescript-sdk/dist/chunk-5QS67SBO.cjs","sourcesContent":[null,"import type {\n ApplePayRegistrationList,\n ApplePayRegistrationMarkRequest,\n ApplePayRegistrationRetryRequest,\n ConnectorBuyerMailQuery,\n ConnectorBuyerMailResponse,\n ConnectorBuyerMailUpdate,\n ConnectorCloneRequest,\n ConnectorConsolidationRequest,\n ConnectorConsolidationResponse,\n ConnectorCurrencyPolicyResponse,\n ConnectorCurrencyPolicyUpdateRequest,\n ConnectorShopsAddRequest,\n ConnectorShopUpdateRequest,\n ConnectorShopsResponse,\n ConnectorHealthResponse,\n EpayoutsCatalogResponse,\n PanesCatalogResponse,\n VaultRoutesApplyRequest,\n VaultRoutesApplyResponse,\n VaultRoutesPreviewRequest,\n VaultRoutesPreviewResponse,\n VaultOutagesResponse,\n VaultOutageGroupActionResponse,\n VaultOutageGroupActionsListResponse,\n VaultOutageGroupCheckRecoveryResponse,\n VaultOutageGroupRestoreRequest,\n VaultOutageGroupRestoreResponse,\n VaultOutageGroupSwitchOffPreviewRequest,\n VaultOutageGroupSwitchOffPreviewResponse,\n VaultOutageGroupSwitchOffRequest,\n VaultVerificationResponse,\n VaultVerifyRequest,\n ConnectorCreateRequest,\n ConnectorResponse,\n ConnectorUpdateRequest,\n ConnectorWebhookListResponse,\n ConnectorWebhookRegisterRequest,\n ConnectorWebhookRegisterResponse,\n ConnectorWebhookSyncResponse,\n WebhookAddressPreviewResponse,\n WebhookAddressRequest,\n WebhookAddressResponse,\n ReturnAddressPreviewResponse,\n ReturnAddressRequest,\n ReturnAddressResponse,\n ProviderWebhookCreateRequest,\n ProviderWebhookCreateResponse,\n ProviderWebhookDeleteRequest,\n ProviderWebhookDeleteResult,\n ProviderWebhookEndpoint,\n ProviderWebhookListResponse,\n ProviderWebhookReplacePreviewResponse,\n ProviderWebhookReplaceRequest,\n ProviderWebhookReplaceResponse,\n ProviderWebhookUpdateRequest,\n WebhookRegistrationEnvironment,\n AirwallexApplePayDomainsRegisterRequest,\n AirwallexApplePayDomainsRegisterResponse,\n StripePaymentMethodDomainsRegisterRequest,\n StripePaymentMethodDomainsRegisterResponse,\n WhopApplePayDomainsRegisterRequest,\n WhopApplePayDomainsRegisterResponse,\n} from '../types';\nimport type { RequestExtras, RequestFn } from '../client';\n\nexport class Connectors {\n constructor(private readonly request: RequestFn) {}\n\n /**\n * Read the connected provider account's optional buyer-email preference.\n * Currently supported for Whop. Use `setJwtToken` with a merchant JWT that\n * has Connector Edit authority; a shop token or API key cannot substitute.\n * Select Sandbox or Live explicitly through `test_mode`.\n *\n * The preference affects every shop sharing the provider account. It does\n * not disable mandatory provider messages or DeloPay invoice delivery.\n * A null or absent value establishes no on/off preference.\n */\n async retrieveBuyerEmailPreference(\n merchantId: string,\n connectorId: string,\n params: ConnectorBuyerMailQuery,\n ): Promise<ConnectorBuyerMailResponse> {\n return this.request(\n 'GET',\n `/account/${encodeURIComponent(merchantId)}/connectors/${encodeURIComponent(connectorId)}/buyer-email-preference`,\n { query: { test_mode: params.test_mode } },\n );\n }\n\n /**\n * Change the optional buyer-email preference for the whole provider account.\n * Currently supported for Whop. Requires a merchant JWT with Connector Edit\n * authority and explicit confirmation for every shop sharing the account.\n * Send the exact account, credential mode and value read before confirmation;\n * a changed account or preference is refused before mutation.\n *\n * Inspect `outcome`: only `verified` confirms the requested value through a\n * fresh exact-account read. HTTP 200 may instead report a conflict, refusal\n * or unknown outcome. An uncertain change may have happened; read the\n * preference again before retrying, including after a transport error.\n * This method adds no automatic readback or retry. Mandatory provider\n * messages and DeloPay invoice delivery are unaffected.\n */\n async updateBuyerEmailPreference(\n merchantId: string,\n connectorId: string,\n params: ConnectorBuyerMailUpdate,\n ): Promise<ConnectorBuyerMailResponse> {\n return this.request(\n 'PUT',\n `/account/${encodeURIComponent(merchantId)}/connectors/${encodeURIComponent(connectorId)}/buyer-email-preference`,\n { body: params },\n );\n }\n\n async create(accountId: string, params: ConnectorCreateRequest): Promise<ConnectorResponse> {\n return this.request('POST', `/account/${encodeURIComponent(accountId)}/connectors`, {\n body: params,\n });\n }\n\n /**\n * One connector account.\n *\n * The credential-bearing fields come back `null` here, whatever is stored:\n * `connector_webhook_details`, `connector_wallets_details`,\n * `pm_auth_config` and `additional_merchant_data`. They are dropped rather\n * than masked, because an editor that prefills from this response and\n * PATCHes the field back would otherwise save a mask over a live signing\n * secret. Send those fields only when the operator has typed a new value,\n * and omit them entirely otherwise — an omitted field leaves the stored one\n * alone.\n *\n * This is the retrieve path alone. `create` and `update` echo back what the\n * caller sent, and `clone` returns the *copied* secrets — see that method.\n *\n * Because the value is gone, `has_live_webhook_secret` and\n * `has_sandbox_webhook_secret` are what tell a stored webhook signing secret\n * from an unconfigured one. Render those; never infer configuration from the\n * `null` block.\n *\n * `GET /account/{accountId}/connectors/{connectorId}`\n */\n async retrieve(accountId: string, connectorId: string): Promise<ConnectorResponse> {\n return this.request(\n 'GET',\n `/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}`,\n );\n }\n\n /**\n * The merchant's connector accounts.\n *\n * Never wider than the caller: an API key pinned to one shop lists that\n * shop's connectors only, not every sibling shop's.\n *\n * `GET /account/{accountId}/connectors`\n */\n async list(accountId: string): Promise<ConnectorResponse[]> {\n return this.request('GET', `/account/${encodeURIComponent(accountId)}/connectors`);\n }\n\n /**\n * The profile-scoped connector list. The merchant-wide `list()` is\n * merchant-gated and 403s for a profile-entity (shop user) JWT; this\n * variant is scoped server-side to the caller's own profile.\n *\n * `GET /account/{accountId}/profile/connectors`\n */\n async listByProfile(accountId: string): Promise<ConnectorResponse[]> {\n return this.request('GET', `/account/${encodeURIComponent(accountId)}/profile/connectors`);\n }\n\n /**\n * Every connector's pane capabilities, as the router itself knows them —\n * which rails a connector supports, and which methods it can publish as a\n * pane with the confirm routing keys each one carries.\n *\n * Capability facts only: no label, sublabel or category comes back. A\n * designer renders a method's copy from its own locale files, keyed by\n * `key`, and takes `payment_method` / `payment_method_type` from here\n * verbatim rather than deriving them client-side.\n *\n * This is what the pane helpers in `src/panes.ts` should be driven from —\n * `paneMethodInfo`, `defaultPane` and `validatePanes` all take a\n * {@link PanesConnectorCatalog} out of this response, so a connector the\n * router starts publishing panes for needs no SDK release.\n *\n * `GET /account/{accountId}/connectors/native-panes/catalog`\n *\n * The path keeps the `native-panes` spelling deliberately. The identifiers\n * were renamed off \"native pane\"; the route was not, and pointing at the\n * backend's new name before it is deployed everywhere would both 404 against\n * un-upgraded replicas mid-rollout and fail `scripts/parity-check.mjs`,\n * which blocks publishing.\n */\n async getPanesCatalog(accountId: string): Promise<PanesCatalogResponse> {\n return this.request(\n 'GET',\n `/account/${encodeURIComponent(accountId)}/connectors/native-panes/catalog`,\n );\n }\n\n /** @deprecated Renamed to {@link getPanesCatalog}. Removed in 0.112.0. */\n async getNativePanesCatalog(accountId: string): Promise<PanesCatalogResponse> {\n return this.getPanesCatalog(accountId);\n }\n\n /**\n * Sweep the merchant's own e-Payouts module and return the rails it\n * actually has enabled. Server-side this makes many upstream calls, so it\n * can take several seconds — show progress.\n *\n * `POST /account/{accountId}/connectors/{connectorId}/epayouts/catalog/sync`\n */\n async syncEpayoutsCatalog(\n accountId: string,\n connectorId: string,\n ): Promise<EpayoutsCatalogResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}/epayouts/catalog/sync`,\n );\n }\n\n /**\n * Update a connector account.\n *\n * `connector_webhook_details` **merges** into the stored block key by key:\n * an absent key keeps its stored secret, an explicit value is written, and\n * an explicit empty string clears that secret. Send only the\n * keys the operator typed — padding the other environment's keys with `''`\n * clears a live signing secret and inbound webhooks stop verifying.\n *\n * The other credential-bearing fields — `connector_wallets_details`,\n * `pm_auth_config`, `additional_merchant_data` — are still whole-value\n * replacements: omit them unless you are writing a complete new value.\n *\n * `POST /account/{accountId}/connectors/{connectorId}`\n */\n async update(\n accountId: string,\n connectorId: string,\n params: ConnectorUpdateRequest,\n options?: RequestExtras,\n ): Promise<ConnectorResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}`,\n {\n body: params,\n ...options,\n },\n );\n }\n\n /**\n * Remove a connector account.\n *\n * A shop-scoped role may remove a connector of its own shop — the shop is\n * re-checked server-side — so creating processors and removing them are the\n * same rung of access rather than two.\n *\n * `DELETE /account/{accountId}/connectors/{connectorId}`\n */\n async delete(accountId: string, connectorId: string): Promise<ConnectorResponse> {\n return this.request(\n 'DELETE',\n `/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}`,\n );\n }\n\n /**\n * Clone a connector into another shop (business profile) of the same\n * merchant. `POST /account/{accountId}/connectors/{connectorId}/clone`\n *\n * Credentials are copied server-side, re-encrypted under the same merchant\n * key, so the caller never has to *supply* them — `retrieve` returns `null`\n * for the credential fields, which is what makes a client-side copy\n * impossible in the first place.\n *\n * The response, however, is the unredacted connector: `connector_account_details`\n * is masked, but `connector_webhook_details`, `connector_wallets_details`,\n * `pm_auth_config` and `additional_merchant_data` come back with the copied\n * secrets in them — values this caller never sent. Do not log or echo the\n * response; read `merchant_connector_id` and discard the rest.\n */\n async clone(\n accountId: string,\n connectorId: string,\n params: ConnectorCloneRequest,\n ): Promise<ConnectorResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}/clone`,\n { body: params },\n );\n }\n\n /**\n * Share a connector with more shops of the same merchant.\n * `POST /account/{accountId}/connectors/{connectorId}/shops`\n *\n * Nothing is copied: every shop sends payments to the same account, on the\n * same credentials and webhook, and the account's limits count them all.\n */\n async addShops(\n accountId: string,\n connectorId: string,\n params: ConnectorShopsAddRequest,\n ): Promise<ConnectorShopsResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}/shops`,\n { body: params },\n );\n }\n\n /**\n * Fold copies of the same provider account into this connector.\n * `POST /account/{accountId}/connectors/{connectorId}/consolidate`\n *\n * The copies' shops move to the connector with their on/off state, routing,\n * checkout layout, currencies, saved credentials, mandates and\n * subscriptions. A copy keeps answering for the payments made on it and\n * serves no shop. Send `dry_run: true` first, then confirm with the\n * preview's `preview_token` and a choice for every conflict.\n */\n async consolidate(\n accountId: string,\n connectorId: string,\n params: ConnectorConsolidationRequest,\n ): Promise<ConnectorConsolidationResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}/consolidate`,\n { body: params },\n );\n }\n\n /**\n * Switch a connector off, or back on, in one shop it serves.\n * `POST /account/{accountId}/connectors/{connectorId}/shops/{profileId}`\n */\n async setShopDisabled(\n accountId: string,\n connectorId: string,\n profileId: string,\n params: ConnectorShopUpdateRequest,\n ): Promise<ConnectorShopsResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}/shops/${encodeURIComponent(profileId)}`,\n { body: params },\n );\n }\n\n /**\n * Stop a connector serving one shop. Any shop may leave, the\n * one the connector was created in included, while another one stays: the\n * last shop is refused, and the connector is deleted instead. The account,\n * its limits and every other shop on it are unaffected.\n * `DELETE /account/{accountId}/connectors/{connectorId}/shops/{profileId}`\n */\n async removeShop(\n accountId: string,\n connectorId: string,\n profileId: string,\n ): Promise<ConnectorShopsResponse> {\n return this.request(\n 'DELETE',\n `/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}/shops/${encodeURIComponent(profileId)}`,\n );\n }\n\n /**\n * Read the transaction currencies a connector may process: its own list,\n * what the provider is known to accept with its methods, and the effective\n * currencies in each shop it serves.\n * `GET /account/{accountId}/connectors/{connectorId}/currencies`\n */\n async getCurrencies(\n accountId: string,\n connectorId: string,\n ): Promise<ConnectorCurrencyPolicyResponse> {\n return this.request(\n 'GET',\n `/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}/currencies`,\n );\n }\n\n /**\n * Set the transaction currencies a connector may process in every shop it\n * serves, and what it does with a payment in a currency it does not take\n * (`conversion`). `allowed_currencies: null` allows every currency the\n * provider supports; a field left out stays as it is. With `dry_run`,\n * nothing is saved and `impact` reports the effect.\n * `PUT /account/{accountId}/connectors/{connectorId}/currencies`\n */\n async setCurrencies(\n accountId: string,\n connectorId: string,\n params: ConnectorCurrencyPolicyUpdateRequest,\n ): Promise<ConnectorCurrencyPolicyResponse> {\n return this.request(\n 'PUT',\n `/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}/currencies`,\n { body: params },\n );\n }\n\n /**\n * Narrow a connector's currencies in one shop it serves, within the\n * connector's own list, or set the shop's own `conversion`. `null` returns\n * the shop to the connector's setting; a field left out stays as it is.\n * `PUT /account/{accountId}/connectors/{connectorId}/shops/{profileId}/currencies`\n */\n async setShopCurrencies(\n accountId: string,\n connectorId: string,\n profileId: string,\n params: ConnectorCurrencyPolicyUpdateRequest,\n ): Promise<ConnectorCurrencyPolicyResponse> {\n return this.request(\n 'PUT',\n `/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}/shops/${encodeURIComponent(profileId)}/currencies`,\n { body: params },\n );\n }\n\n // --- Advanced operations (Task 4.8) ---\n\n /**\n * Run the configuration checks for a vault (VGS) connector account:\n * credential validity, write-only Collect scope, reachability, environment\n * coherence, route coverage. Read-only but not cheap — it decrypts the\n * vault's management credential and talks to VGS.\n *\n * `POST /account/{accountId}/connectors/{connectorId}/vault/verify`\n */\n async verifyVault(\n accountId: string,\n connectorId: string,\n params: VaultVerifyRequest,\n ): Promise<VaultVerificationResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}/vault/verify`,\n { body: params },\n );\n }\n\n /**\n * The shops whose card vault is switched on and whose vault account has\n * stopped working, each with the cause. While a shop is listed, its card\n * form cannot be shown and its card payments fail.\n *\n * An outage is listed once the vault has refused the account several times\n * in a row over at least a minute, and is taken off the list when the vault\n * serves the account again. Nothing switches a vault off by itself: see\n * `profiles.switchVaultOff`.\n *\n * `GET /account/{accountId}/vault/outages`\n */\n async listVaultOutages(accountId: string): Promise<VaultOutagesResponse> {\n return this.request('GET', `/account/${encodeURIComponent(accountId)}/vault/outages`);\n }\n\n /**\n * Preview switching off a failing vault provider across all affected shops\n * of an account. Returns `eligible: true` only when the caller has full\n * access to every affected shop and vault account of that provider.\n *\n * `POST /account/{accountId}/vault/outages/group-switch-off/preview`\n */\n async previewVaultOutageGroupSwitchOff(\n accountId: string,\n params: VaultOutageGroupSwitchOffPreviewRequest,\n ): Promise<VaultOutageGroupSwitchOffPreviewResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(accountId)}/vault/outages/group-switch-off/preview`,\n { body: params },\n );\n }\n\n /**\n * Switch off a failing vault provider across all affected shops returned by\n * {@link Connectors.previewVaultOutageGroupSwitchOff} in one atomic step.\n * Refused when the affected shop set changed since the preview.\n *\n * `POST /account/{accountId}/vault/outages/group-switch-off`\n */\n async executeVaultOutageGroupSwitchOff(\n accountId: string,\n params: VaultOutageGroupSwitchOffRequest,\n ): Promise<VaultOutageGroupActionResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(accountId)}/vault/outages/group-switch-off`,\n { body: params },\n );\n }\n\n /**\n * List active, recovered, and historical vault outage group actions for an\n * account, each hydrated with per-shop live states filtered to the caller's\n * shop and connector grants.\n *\n * `GET /account/{accountId}/vault/outages/group-actions`\n */\n async listVaultOutageGroupActions(\n accountId: string,\n ): Promise<VaultOutageGroupActionsListResponse> {\n return this.request(\n 'GET',\n `/account/${encodeURIComponent(accountId)}/vault/outages/group-actions`,\n );\n }\n\n /**\n * Probe the live credential slot of every still-switched-off vault account\n * in a group action and transition it to `recovered` when all answer healthy.\n *\n * `POST /account/{accountId}/vault/outages/group-actions/{actionId}/check-recovery`\n */\n async checkVaultOutageGroupRecovery(\n accountId: string,\n actionId: string,\n ): Promise<VaultOutageGroupCheckRecoveryResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(accountId)}/vault/outages/group-actions/${encodeURIComponent(actionId)}/check-recovery`,\n );\n }\n\n /**\n * Restore or undo a vault outage group action after verifying each remaining\n * vault account works again, skipping shops that were already manually\n * re-enabled or changed to another vault.\n *\n * `POST /account/{accountId}/vault/outages/group-actions/{actionId}/restore`\n */\n async restoreVaultOutageGroupAction(\n accountId: string,\n actionId: string,\n params: VaultOutageGroupRestoreRequest = {},\n ): Promise<VaultOutageGroupRestoreResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(accountId)}/vault/outages/group-actions/${encodeURIComponent(actionId)}/restore`,\n { body: params },\n );\n }\n\n /**\n * Compute the route document the vault SHOULD have and diff it against\n * what exists, without writing anything. The returned fingerprints must be\n * echoed byte for byte on {@link Connectors.applyVaultRoutes}.\n *\n * A router without these endpoints answers 404 — render that as \"this\n * build cannot configure routes\", never as \"there is nothing to change\".\n *\n * `POST /account/{accountId}/connectors/{connectorId}/vault/routes/preview`\n */\n async previewVaultRoutes(\n accountId: string,\n connectorId: string,\n params: VaultRoutesPreviewRequest,\n ): Promise<VaultRoutesPreviewResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}/vault/routes/preview`,\n { body: params },\n );\n }\n\n /**\n * Write the routes the merchant just previewed. Both fingerprints come\n * from the preview and are opaque: `expected_current_fingerprint` says the\n * vault has not moved (`null` = \"the preview found no routes\" and is sent\n * as `null`, never omitted), `expected_desired_fingerprint` says the\n * document is still the one on screen. A 409 (`DE_04`) means the vault\n * changed since the preview — nothing was written; preview again.\n *\n * `POST /account/{accountId}/connectors/{connectorId}/vault/routes/apply`\n */\n async applyVaultRoutes(\n accountId: string,\n connectorId: string,\n params: VaultRoutesApplyRequest,\n ): Promise<VaultRoutesApplyResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}/vault/routes/apply`,\n { body: params },\n );\n }\n\n /**\n * What the processor says about this connector account: whether it will\n * accept charges, which capabilities are live, and anything it is still\n * waiting on.\n *\n * This is **not** {@link Connectors.verify}. That one asks whether the stored\n * credentials work, by running a test-card authorization; a processor can\n * revoke an account's ability to take payments while the credentials stay\n * perfectly valid, and then a credential check reports healthy while every\n * checkout silently stalls. This asks the account's own status instead, and\n * does not create a payment. By default it reads a scheduler snapshot;\n * `refresh: true` asks for a new probe and `stale` identifies an overdue result.\n * `test_mode` selects the requested environment; `credential_source` identifies\n * a sandbox, live or shared credential set. Not every provider reports chargeability.\n *\n * Connectors with no probe answer `state: 'unknown'` with\n * `unknown_reason: 'connector_not_supported'`, rather than an error — every\n * `'unknown'` carries a reason code you render your own words for. A router\n * without this endpoint answers 404 — render that as \"this build cannot\n * report health\", never as \"healthy\".\n *\n * `GET /account/{accountId}/connectors/{connectorId}/health`\n */\n async health(\n accountId: string,\n connectorId: string,\n options?: { test_mode?: boolean; refresh?: boolean },\n ): Promise<ConnectorHealthResponse> {\n return this.request(\n 'GET',\n `/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}/health`,\n { query: options },\n );\n }\n\n /** Verify connector credentials. `POST /account/connectors/verify` */\n async verify(params: Record<string, unknown>): Promise<Record<string, unknown>> {\n return this.request('POST', '/account/connectors/verify', { body: params });\n }\n\n /**\n * Register a webhook for a connector.\n * `POST /account/{merchantId}/connectors/webhooks/{connectorId}`\n *\n * @param params - Optional event scope. Defaults to `{ event_type: 'all_events' }`\n * when omitted; pass `{ event_type: { specific_event: '…' } }` to scope\n * to a single event.\n */\n async registerWebhook(\n merchantId: string,\n connectorId: string,\n params?: ConnectorWebhookRegisterRequest,\n ): Promise<ConnectorWebhookRegisterResponse> {\n const path = `/account/${encodeURIComponent(merchantId)}/connectors/webhooks/${encodeURIComponent(connectorId)}`;\n if (params === undefined) return this.request('POST', path);\n return this.request('POST', path, { body: params });\n }\n\n /**\n * Register checkout/shop domains as Stripe payment method domains, so Apple\n * Pay renders on those pages.\n * `POST /account/{merchantId}/connectors/{connectorId}/stripe/payment-method-domains`\n *\n * Stripe connectors only. One call registers against a single credential set\n * (`environment`, default `'live'`) — call twice to cover live and sandbox.\n * Per-URL outcomes come back in `results`; a missing sandbox credential set\n * is a request-level 400.\n */\n async registerStripePaymentMethodDomains(\n merchantId: string,\n connectorId: string,\n params: StripePaymentMethodDomainsRegisterRequest,\n ): Promise<StripePaymentMethodDomainsRegisterResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(merchantId)}/connectors/${encodeURIComponent(connectorId)}/stripe/payment-method-domains`,\n { body: params },\n );\n }\n\n /**\n * Register checkout/shop domains as Airwallex Apple Pay domains, so Apple Pay\n * renders on those pages.\n * `POST /account/{merchantId}/connectors/{connectorId}/airwallex/apple-pay-domains`\n *\n * Airwallex connectors only. One call registers against a single credential\n * set (`environment`, default `'live'`) — call twice to cover live and\n * sandbox. Idempotent: a host already on the account comes back\n * `already_registered` without a write.\n */\n async registerAirwallexApplePayDomains(\n merchantId: string,\n connectorId: string,\n params: AirwallexApplePayDomainsRegisterRequest,\n ): Promise<AirwallexApplePayDomainsRegisterResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(merchantId)}/connectors/${encodeURIComponent(connectorId)}/airwallex/apple-pay-domains`,\n { body: params },\n );\n }\n\n /**\n * Register and verify checkout/shop domains as Whop Apple Pay payment method\n * domains, so Apple Pay renders in Whop's embedded card form on those pages.\n * `POST /account/{merchantId}/connectors/{connectorId}/whop/apple-pay-domains`\n *\n * Whop connectors only. One call registers against a single credential set\n * (`environment`, default `'live'`) — call twice to cover live and sandbox.\n * Idempotent: a host Whop already holds as verified comes back\n * `already_verified` without a write, and a `pending` one is verified again.\n */\n async registerWhopApplePayDomains(\n merchantId: string,\n connectorId: string,\n params: WhopApplePayDomainsRegisterRequest,\n ): Promise<WhopApplePayDomainsRegisterResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(merchantId)}/connectors/${encodeURIComponent(connectorId)}/whop/apple-pay-domains`,\n { body: params },\n );\n }\n\n /**\n * The account's Apple Pay registration on every checkout address, per key\n * set: `registered`, `failed` (with why), `skipped` (the address serves\n * another processor's file), `pending` (the address is not ready yet),\n * `not_attempted`, or for PayPal `manual_pending` / `manual_done`.\n * `GET /account/{merchantId}/connectors/{connectorId}/apple-pay-registrations`\n */\n async applePayRegistrations(\n merchantId: string,\n connectorId: string,\n ): Promise<ApplePayRegistrationList> {\n return this.request(\n 'GET',\n `/account/${encodeURIComponent(merchantId)}/connectors/${encodeURIComponent(connectorId)}/apple-pay-registrations`,\n );\n }\n\n /**\n * Register the account on every ready checkout address whose Apple Pay file\n * serves its processor again, for one key set or both. Answers the list as\n * it stands afterwards.\n * `POST /account/{merchantId}/connectors/{connectorId}/apple-pay-registrations/retry`\n */\n async retryApplePayRegistrations(\n merchantId: string,\n connectorId: string,\n params: ApplePayRegistrationRetryRequest = {},\n ): Promise<ApplePayRegistrationList> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(merchantId)}/connectors/${encodeURIComponent(connectorId)}/apple-pay-registrations/retry`,\n { body: params },\n );\n }\n\n /**\n * Mark a checkout address registered (or not) for one key set, for a\n * processor without a registration API (PayPal). A reminder for the team:\n * nothing is checked with the processor. Refused for other processors.\n * `PUT /account/{merchantId}/connectors/{connectorId}/apple-pay-registrations/{hostId}/mark`\n */\n async markApplePayRegistration(\n merchantId: string,\n connectorId: string,\n hostId: string,\n params: ApplePayRegistrationMarkRequest,\n ): Promise<ApplePayRegistrationList> {\n return this.request(\n 'PUT',\n `/account/${encodeURIComponent(merchantId)}/connectors/${encodeURIComponent(connectorId)}/apple-pay-registrations/${encodeURIComponent(hostId)}/mark`,\n { body: params },\n );\n }\n\n /** Get registered webhooks for a connector. `GET /account/{merchantId}/connectors/webhooks/{connectorId}` */\n async getWebhook(merchantId: string, connectorId: string): Promise<ConnectorWebhookListResponse> {\n return this.request(\n 'GET',\n `/account/${encodeURIComponent(merchantId)}/connectors/webhooks/${encodeURIComponent(connectorId)}`,\n );\n }\n\n /**\n * Bring an already-registered webhook's event subscription up to date with\n * the events Delopay handles.\n * `POST /account/{merchantId}/connectors/webhooks/{connectorId}/sync-events`\n *\n * A PSP freezes an endpoint's event list at registration time, so an endpoint\n * created before an event type was added never receives it — silently, with\n * no error anywhere. {@link getWebhook} reports the gap as `missing_events`;\n * this repairs it.\n *\n * Unlike re-registering, the endpoints are updated in place: the endpoint id\n * and its signing secret are preserved, so signature verification keeps\n * working across the change. Stripe connectors only; idempotent, so it is\n * safe to call on a schedule or after every deploy.\n *\n * @example\n * ```typescript\n * const sync = await delopay.connectors.syncWebhookEvents('mer_abc', 'mca_xyz');\n * for (const endpoint of sync.endpoints) {\n * if (endpoint.error_message) console.warn(endpoint.connector_webhook_id, endpoint.error_message);\n * else if (endpoint.updated) console.log('subscribed', endpoint.added_events);\n * }\n * ```\n */\n async syncWebhookEvents(\n merchantId: string,\n connectorId: string,\n ): Promise<ConnectorWebhookSyncResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(merchantId)}/connectors/webhooks/${encodeURIComponent(connectorId)}/sync-events`,\n );\n }\n\n /**\n * Read the callback addresses of a connector's payment provider.\n * `GET /account/{merchantId}/connectors/webhooks/{connectorId}/address`\n *\n * One entry per environment: the saved mode and identifier, and for every\n * credential group the URL the policy asks for (`desired_url`) beside the URL\n * actually registered at the provider (`registered_url`) with its `status`.\n * Only `registered` means the provider delivers to the desired URL.\n *\n * Available for providers whose webhooks Delopay manages (Stripe, PayPal,\n * Airwallex, Whop) and for hand-configured ones (Creem, NomuPay,\n * MicroPayment). Other connectors are refused with a 400.\n */\n async getWebhookAddress(\n merchantId: string,\n connectorId: string,\n ): Promise<WebhookAddressResponse> {\n return this.request(\n 'GET',\n `/account/${encodeURIComponent(merchantId)}/connectors/webhooks/${encodeURIComponent(connectorId)}/address`,\n );\n }\n\n /**\n * Validate a proposed callback address without saving it.\n * `POST /account/{merchantId}/connectors/webhooks/{connectorId}/address/preview`\n *\n * Returns the validation errors as `{ field, code }` pairs, the URL every\n * affected credential group would get, the connector accounts that share it,\n * and whether saving needs `confirm_shared: true`. Needs the same permission\n * as saving.\n *\n * @example\n * ```typescript\n * const preview = await delopay.connectors.previewWebhookAddress('mer_abc', 'mca_xyz', {\n * environment: 'live',\n * mode: 'anonymous',\n * format: { prefix: 'wh-', style: 'alphanumeric', length: 16 },\n * });\n * if (!preview.valid) console.warn(preview.errors);\n * ```\n */\n async previewWebhookAddress(\n merchantId: string,\n connectorId: string,\n params: WebhookAddressRequest,\n ): Promise<WebhookAddressPreviewResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(merchantId)}/connectors/webhooks/${encodeURIComponent(connectorId)}/address/preview`,\n { body: params },\n );\n }\n\n /**\n * Save the callback address of a connector's payment provider for one\n * environment.\n * `PUT /account/{merchantId}/connectors/webhooks/{connectorId}/address`\n *\n * The address applies to every connector account of that provider and\n * environment, so `confirm_shared: true` is required when other accounts are\n * affected. For a managed provider Delopay then registers the new URL and\n * keeps the former one accepted; the response reports each credential\n * group's outcome in `status`. A `pending` or `failed` group keeps receiving\n * on its previous URL and is retried. For a hand-configured provider the\n * merchant enters the new `desired_url` at the provider.\n *\n * A refused proposal answers 422 with error code `IR_06` and the message\n * `Webhook address refused: field:code,…`. A save that lost to a concurrent\n * change of the same address answers 422 with error code `HE_00` and can be\n * repeated. A caller who may not edit every affected account answers 403.\n * Address changes are limited per provider and environment (`rate_limit`).\n */\n async updateWebhookAddress(\n merchantId: string,\n connectorId: string,\n params: WebhookAddressRequest,\n ): Promise<WebhookAddressResponse> {\n return this.request(\n 'PUT',\n `/account/${encodeURIComponent(merchantId)}/connectors/webhooks/${encodeURIComponent(connectorId)}/address`,\n { body: params },\n );\n }\n\n /**\n * Read how the return addresses of a connector's payment provider name the\n * merchant, per environment.\n * `GET /account/{merchantId}/connectors/{connectorId}/return-address`\n *\n * A return address is where the provider sends the buyer back after a step\n * it hosts. It belongs to the merchant, the provider and the environment,\n * so every connector account of that provider follows it.\n */\n async getReturnAddress(merchantId: string, connectorId: string): Promise<ReturnAddressResponse> {\n return this.request(\n 'GET',\n `/account/${encodeURIComponent(merchantId)}/connectors/${encodeURIComponent(connectorId)}/return-address`,\n );\n }\n\n /**\n * Validate a proposed return address without saving it.\n * `POST /account/{merchantId}/connectors/{connectorId}/return-address/preview`\n *\n * Nothing is reserved: a generated identifier in the answer is an example.\n * Needs the same permission as saving.\n *\n * @example\n * ```typescript\n * const preview = await delopay.connectors.previewReturnAddress('mer_abc', 'mca_xyz', {\n * environment: 'live',\n * mode: 'anonymous',\n * share_webhook_identifier: true,\n * });\n * if (!preview.valid) console.warn(preview.errors);\n * ```\n */\n async previewReturnAddress(\n merchantId: string,\n connectorId: string,\n params: ReturnAddressRequest,\n ): Promise<ReturnAddressPreviewResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(merchantId)}/connectors/${encodeURIComponent(connectorId)}/return-address/preview`,\n { body: params },\n );\n }\n\n /**\n * Save the return address of a connector's payment provider for one\n * environment.\n * `PUT /account/{merchantId}/connectors/{connectorId}/return-address`\n *\n * Payments started afterwards get return addresses of the new form; every\n * address already handed to the provider keeps working. A refused proposal\n * answers 422 with error code `IR_06` and the message\n * `Return address refused: field:code,…`. A caller who may not edit every\n * connector account of the provider answers 403. Address changes are\n * limited per provider and environment (`rate_limit`).\n */\n async updateReturnAddress(\n merchantId: string,\n connectorId: string,\n params: ReturnAddressRequest,\n ): Promise<ReturnAddressResponse> {\n return this.request(\n 'PUT',\n `/account/${encodeURIComponent(merchantId)}/connectors/${encodeURIComponent(connectorId)}/return-address`,\n { body: params },\n );\n }\n\n /**\n * Every webhook the connector's payment provider lists for its credentials\n * in one environment: Delopay's own, other connector accounts', former\n * addresses' and other integrations'.\n * `GET /account/{merchantId}/connectors/webhooks/{connectorId}/provider`\n *\n * Available for Stripe, PayPal, Airwallex, Whop and Adyen. Destinations are\n * masked; `capabilities` says which changes the provider allows and\n * `editable` whether the caller may make them.\n */\n async listProviderWebhooks(\n merchantId: string,\n connectorId: string,\n environment: WebhookRegistrationEnvironment,\n ): Promise<ProviderWebhookListResponse> {\n return this.request('GET', providerWebhooksPath(merchantId, connectorId), {\n query: { environment },\n });\n }\n\n /**\n * Create a webhook at the provider for the merchant's own systems.\n * `POST /account/{merchantId}/connectors/webhooks/{connectorId}/provider`\n *\n * The URL must be `https` and outside Delopay; Delopay's own webhook is\n * registered with `registerWebhook`. A returned `signing_secret` is not kept\n * by Delopay and cannot be read again.\n */\n async createProviderWebhook(\n merchantId: string,\n connectorId: string,\n params: ProviderWebhookCreateRequest,\n ): Promise<ProviderWebhookCreateResponse> {\n return this.request('POST', providerWebhooksPath(merchantId, connectorId), { body: params });\n }\n\n /**\n * Change one webhook at the provider.\n * `PATCH /account/{merchantId}/connectors/webhooks/{connectorId}/provider/{webhookId}`\n *\n * Refused once the webhook changed since `fingerprint`, and for Delopay's\n * own webhooks.\n */\n async updateProviderWebhook(\n merchantId: string,\n connectorId: string,\n webhookId: string,\n params: ProviderWebhookUpdateRequest,\n ): Promise<ProviderWebhookEndpoint> {\n return this.request(\n 'PATCH',\n `${providerWebhooksPath(merchantId, connectorId)}/${encodeURIComponent(webhookId)}`,\n { body: params },\n );\n }\n\n /**\n * Delete one webhook at the provider.\n * `POST /account/{merchantId}/connectors/webhooks/{connectorId}/provider/{webhookId}/delete`\n *\n * Refused once the webhook changed since `fingerprint`. Deleting Delopay's\n * own webhook needs `confirm_managed: true`; another connector account's is\n * never deleted from here.\n */\n async deleteProviderWebhook(\n merchantId: string,\n connectorId: string,\n webhookId: string,\n params: ProviderWebhookDeleteRequest,\n ): Promise<ProviderWebhookDeleteResult> {\n return this.request(\n 'POST',\n `${providerWebhooksPath(merchantId, connectorId)}/${encodeURIComponent(webhookId)}/delete`,\n { body: params },\n );\n }\n\n /**\n * What \"replace all\" would delete and keep. Nothing is changed.\n * `GET /account/{merchantId}/connectors/webhooks/{connectorId}/provider/replace`\n */\n async previewProviderWebhookReplace(\n merchantId: string,\n connectorId: string,\n environment: WebhookRegistrationEnvironment,\n ): Promise<ProviderWebhookReplacePreviewResponse> {\n return this.request('GET', `${providerWebhooksPath(merchantId, connectorId)}/replace`, {\n query: { environment },\n });\n }\n\n /**\n * Keep only Delopay's webhook: delete exactly the confirmed webhooks of the\n * preview, after registering Delopay's own unless `sequence` is\n * `delete_first`.\n * `POST /account/{merchantId}/connectors/webhooks/{connectorId}/provider/replace`\n *\n * A list that changed since the preview answers `scope_changed` and deletes\n * nothing. A second replacement while one runs is refused as busy (`HE_00`).\n */\n async replaceProviderWebhooks(\n merchantId: string,\n connectorId: string,\n params: ProviderWebhookReplaceRequest,\n ): Promise<ProviderWebhookReplaceResponse> {\n return this.request('POST', `${providerWebhooksPath(merchantId, connectorId)}/replace`, {\n body: params,\n });\n }\n\n /** List available payment methods. `GET /account/payment-methods` */\n async listPaymentMethods(): Promise<Record<string, unknown>[]> {\n return this.request('GET', '/account/payment-methods');\n }\n}\n\nfunction providerWebhooksPath(merchantId: string, connectorId: string): string {\n return `/account/${encodeURIComponent(merchantId)}/connectors/webhooks/${encodeURIComponent(connectorId)}/provider`;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/
|
|
1
|
+
{"version":3,"sources":["/tmp/pub0495/delopay-typescript-sdk/dist/chunk-6EBY2KKL.cjs","../src/resources/merchantAccounts.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,WAAA,EAAa,EAAE,IAAA,EAAM,OAAO,CAAC,CAAA;AAAA,EAC3D;AAAA,EAEA,MAAM,QAAA,CAAS,SAAA,EAAqD;AAClE,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,KAAA,EAAO,CAAA,UAAA,EAAa,kBAAA,CAAmB,SAAS,CAAC,CAAA,CAAA;AACvE,EAAA;AAMoC,EAAA;AACoC,IAAA;AAC9D,MAAA;AACH,MAAA;AACJ,IAAA;AACH,EAAA;AAEkE,EAAA;AACF,IAAA;AAChE,EAAA;AAAA;AAAA;AAKiD,EAAA;AACJ,IAAA;AAC7C,EAAA;AAAA;AAGoE,EAAA;AACI,IAAA;AACxE,EAAA;AAAA;AAGuE,EAAA;AACA,IAAA;AACvE,EAAA;AAAA;AAGsF,EAAA;AAClB,IAAA;AACpE,EAAA;AACF;ADhB0E;AACA;AACA;AACA","file":"/tmp/pub0495/delopay-typescript-sdk/dist/chunk-6EBY2KKL.cjs","sourcesContent":[null,"import type {\n MerchantAccountCreateRequest,\n MerchantAccountResponse,\n MerchantAccountUpdateRequest,\n} from '../types';\nimport type { RequestExtras, RequestFn } from '../client';\n\nexport class MerchantAccounts {\n constructor(private readonly request: RequestFn) {}\n\n async create(params: MerchantAccountCreateRequest): Promise<MerchantAccountResponse> {\n return this.request('POST', '/accounts', { body: params });\n }\n\n async retrieve(accountId: string): Promise<MerchantAccountResponse> {\n return this.request('GET', `/accounts/${encodeURIComponent(accountId)}`);\n }\n\n async update(\n accountId: string,\n params: MerchantAccountUpdateRequest,\n options?: RequestExtras,\n ): Promise<MerchantAccountResponse> {\n return this.request('POST', `/accounts/${encodeURIComponent(accountId)}`, {\n body: params,\n ...options,\n });\n }\n\n async delete(accountId: string): Promise<MerchantAccountResponse> {\n return this.request('DELETE', `/accounts/${encodeURIComponent(accountId)}`);\n }\n\n // --- Advanced operations (Task 4.9) ---\n\n /** List all merchant accounts. `GET /accounts/list` */\n async list(): Promise<MerchantAccountResponse[]> {\n return this.request('GET', '/accounts/list');\n }\n\n /** Toggle key-value store for a merchant. `POST /accounts/{accountId}/kv` */\n async toggleKv(accountId: string): Promise<Record<string, unknown>> {\n return this.request('POST', `/accounts/${encodeURIComponent(accountId)}/kv`);\n }\n\n /** Get KV status for a merchant. `GET /accounts/{accountId}/kv` */\n async getKvStatus(accountId: string): Promise<Record<string, unknown>> {\n return this.request('GET', `/accounts/${encodeURIComponent(accountId)}/kv`);\n }\n\n /** Transfer keys between merchants. `POST /accounts/transfer` */\n async transferKeys(params: Record<string, unknown>): Promise<Record<string, unknown>> {\n return this.request('POST', '/accounts/transfer', { body: params });\n }\n}\n"]}
|