@delopay/sdk 0.425.0 → 0.428.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 +2 -2
- package/dist/checkoutSession.cjs.map +1 -1
- package/dist/checkoutSession.js +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-3HBWRBUT.js +58 -0
- package/dist/chunk-3HBWRBUT.js.map +1 -0
- package/dist/chunk-3YBBJT3Y.cjs.map +1 -1
- package/dist/chunk-424542L2.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-26THONSG.js → chunk-5D5UYMQK.js} +18 -1
- package/dist/chunk-5D5UYMQK.js.map +1 -0
- package/dist/chunk-5HCKC4HF.cjs.map +1 -1
- package/dist/{chunk-ONEPBY3O.cjs → chunk-5JJ65Z7J.cjs} +18 -14
- package/dist/chunk-5JJ65Z7J.cjs.map +1 -0
- package/dist/chunk-5O2JSQYA.cjs.map +1 -1
- package/dist/chunk-6EBY2KKL.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-7ITPMVDB.cjs.map +1 -1
- package/dist/chunk-7JV6VVO7.cjs.map +1 -1
- package/dist/chunk-7QZCUXWB.cjs.map +1 -1
- package/dist/chunk-7VXF5D67.cjs.map +1 -1
- package/dist/chunk-A4UPU5UE.js +1 -0
- 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-CAMALM35.cjs.map +1 -1
- package/dist/chunk-CCN44NZJ.cjs.map +1 -1
- package/dist/chunk-CKKNFFKP.cjs.map +1 -1
- package/dist/chunk-CR3JBTP3.cjs.map +1 -1
- package/dist/chunk-DJASVBOJ.cjs.map +1 -1
- package/dist/chunk-EEB2HDYL.cjs.map +1 -1
- package/dist/chunk-ENPSUWTS.cjs.map +1 -1
- package/dist/chunk-EQ6P6ZND.cjs.map +1 -1
- package/dist/chunk-EXPWQBI3.cjs.map +1 -1
- package/dist/chunk-F3I5DOWV.cjs.map +1 -1
- package/dist/chunk-F6S3WCCB.cjs.map +1 -1
- package/dist/{chunk-HNJFRQSY.js → chunk-FELTF5FF.js} +2 -2
- package/dist/chunk-FQRC4NJG.cjs.map +1 -1
- package/dist/chunk-FYISDU2Y.cjs.map +1 -1
- package/dist/chunk-GA3KXPIF.cjs.map +1 -1
- package/dist/chunk-GG52SAHA.cjs.map +1 -1
- package/dist/chunk-GK5FWN4H.cjs.map +1 -1
- package/dist/chunk-GSQN5EOO.cjs.map +1 -1
- package/dist/{chunk-JZGSKVTT.js → chunk-GU3VNMQ5.js} +14 -1
- package/dist/chunk-GU3VNMQ5.js.map +1 -0
- package/dist/chunk-GW7IHYXR.cjs.map +1 -1
- package/dist/{chunk-VOIELJLZ.cjs → chunk-HLHML5ES.cjs} +18 -1
- package/dist/chunk-HLHML5ES.cjs.map +1 -0
- package/dist/chunk-HLKFUOAQ.cjs.map +1 -1
- package/dist/chunk-HLYGHP6F.cjs.map +1 -1
- package/dist/chunk-I2W7AO4B.cjs.map +1 -1
- package/dist/chunk-I2XGNALG.cjs.map +1 -1
- package/dist/chunk-I65QS3YQ.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-K5Q2H3VD.cjs.map +1 -1
- package/dist/chunk-KD5Y2YWK.cjs.map +1 -1
- package/dist/chunk-KJDMNF2T.cjs.map +1 -1
- package/dist/chunk-KLONGJCL.cjs.map +1 -1
- package/dist/chunk-KOB6MOAV.cjs.map +1 -1
- package/dist/chunk-KSJ7JLR3.cjs.map +1 -1
- package/dist/chunk-LJ2EG6JK.cjs.map +1 -1
- package/dist/chunk-LLYY4TCZ.cjs.map +1 -1
- package/dist/chunk-LYIBTVK6.cjs.map +1 -1
- package/dist/chunk-M3HWE7KT.cjs.map +1 -1
- package/dist/chunk-M3SJHFT4.cjs.map +1 -1
- package/dist/chunk-MCNDMK7F.cjs.map +1 -1
- package/dist/{chunk-3TFE2JB5.cjs → chunk-MFZ5FBS7.cjs} +3 -3
- package/dist/chunk-MFZ5FBS7.cjs.map +1 -0
- package/dist/chunk-MLG6NXI6.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-ODPNVNYE.cjs.map +1 -1
- package/dist/chunk-OG2KJAYD.cjs.map +1 -1
- package/dist/chunk-OWP7XBY2.cjs.map +1 -1
- package/dist/chunk-OYZP6NF6.cjs.map +1 -1
- package/dist/chunk-P6JLNQ6L.cjs.map +1 -1
- package/dist/chunk-P7DYLUUI.cjs.map +1 -1
- package/dist/chunk-PKAE6AQT.cjs.map +1 -1
- package/dist/chunk-PWDY5D5S.cjs.map +1 -1
- package/dist/chunk-Q7M7DO7M.cjs.map +1 -1
- package/dist/chunk-QMLU5DST.cjs.map +1 -1
- package/dist/chunk-QRSA72B3.cjs.map +1 -1
- package/dist/chunk-QYNRNDIY.cjs.map +1 -1
- package/dist/chunk-R4FE6K43.cjs.map +1 -1
- package/dist/chunk-R4GA6BVP.cjs.map +1 -1
- package/dist/chunk-R5VYSZ3Q.cjs.map +1 -1
- package/dist/chunk-RHFUXHQN.cjs +58 -0
- package/dist/chunk-RHFUXHQN.cjs.map +1 -0
- package/dist/chunk-RI42IDRR.cjs.map +1 -1
- package/dist/chunk-RSVLVW4L.cjs.map +1 -1
- package/dist/chunk-S77LQWYC.cjs.map +1 -1
- package/dist/chunk-S7SBNOGS.cjs.map +1 -1
- package/dist/chunk-SQELICSX.cjs.map +1 -1
- package/dist/chunk-TMAJE5P2.cjs.map +1 -1
- package/dist/chunk-TNIJ6OSH.cjs.map +1 -1
- package/dist/chunk-UGSM7RJ2.cjs.map +1 -1
- package/dist/chunk-UKLZAOLW.cjs.map +1 -1
- package/dist/{chunk-NN74DH4Q.js → chunk-UZ5V4N7M.js} +25 -21
- package/dist/chunk-UZ5V4N7M.js.map +1 -0
- package/dist/chunk-V47G7P6L.cjs.map +1 -1
- package/dist/chunk-VH5A6SMU.cjs.map +1 -1
- package/dist/chunk-VHHQX52U.cjs +1 -0
- package/dist/chunk-VHHQX52U.cjs.map +1 -0
- 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-U2BPNOYN.cjs → chunk-WR6Z4I52.cjs} +14 -1
- package/dist/chunk-WR6Z4I52.cjs.map +1 -0
- package/dist/chunk-WX6NP7UU.cjs.map +1 -1
- package/dist/chunk-XQLRIBVR.cjs.map +1 -1
- package/dist/chunk-YJQPKT6W.cjs.map +1 -1
- package/dist/chunk-YK3P5QNZ.cjs.map +1 -1
- package/dist/chunk-ZKPVUCQV.cjs.map +1 -1
- package/dist/client.cjs +2 -2
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.cts +3 -0
- package/dist/client.d.ts +3 -0
- package/dist/client.js +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 +21 -17
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +27 -23
- 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/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/adminPortal.cjs +2 -2
- package/dist/internal/resources/adminPortal.cjs.map +1 -1
- package/dist/internal/resources/adminPortal.d.cts +11 -2
- package/dist/internal/resources/adminPortal.d.ts +11 -2
- package/dist/internal/resources/adminPortal.js +1 -1
- package/dist/internal/resources/adminSupport.cjs.map +1 -1
- package/dist/internal/resources/adminSupport.d.cts +1 -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 +30 -26
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +3 -2
- package/dist/internal.d.ts +3 -2
- package/dist/internal.js +36 -32
- package/dist/internal.js.map +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 +7 -0
- package/dist/resources/aiTools.cjs.map +1 -0
- package/dist/resources/aiTools.d.cts +59 -0
- package/dist/resources/aiTools.d.ts +59 -0
- package/dist/resources/aiTools.js +7 -0
- package/dist/resources/aiTools.js.map +1 -0
- package/dist/resources/analytics.cjs +2 -2
- package/dist/resources/analytics.cjs.map +1 -1
- package/dist/resources/analytics.d.cts +14 -1
- package/dist/resources/analytics.d.ts +14 -1
- package/dist/resources/analytics.js +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/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/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/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/shopLabels.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/{types-DaKpMBi_.d.ts → types-CAF6Fg1O.d.ts} +24 -1
- package/dist/{types-Cgt_cKwA.d.cts → types-gi0y0Jy7.d.cts} +24 -1
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.cts +447 -3
- package/dist/types.d.ts +447 -3
- package/package.json +1 -1
- package/dist/chunk-26THONSG.js.map +0 -1
- package/dist/chunk-3TFE2JB5.cjs.map +0 -1
- package/dist/chunk-BOU2TQ6U.cjs +0 -1
- package/dist/chunk-BOU2TQ6U.cjs.map +0 -1
- package/dist/chunk-FI7NLDWZ.js +0 -1
- package/dist/chunk-JZGSKVTT.js.map +0 -1
- package/dist/chunk-NN74DH4Q.js.map +0 -1
- package/dist/chunk-ONEPBY3O.cjs.map +0 -1
- package/dist/chunk-U2BPNOYN.cjs.map +0 -1
- package/dist/chunk-VOIELJLZ.cjs.map +0 -1
- /package/dist/{chunk-FI7NLDWZ.js.map → chunk-A4UPU5UE.js.map} +0 -0
- /package/dist/{chunk-HNJFRQSY.js.map → chunk-FELTF5FF.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/anes/delo-payment/_worktrees/sdk-publish-0425-clone-w4/dist/chunk-4T4XHPYN.cjs","../src/airwallexCard.ts"],"names":[],"mappings":"AAAA;ACkCO,IAAM,uBAAA,EAAyB;AAAA,EACpC,YAAA;AAAA,EACA,cAAA;AAAA,EACA,uBAAA;AAAA,EACA,SAAA;AAAA,EACA,mBAAA;AAAA,EACA;AACF,CAAA;AAmEA,IAAM,MAAA,EAAuC,CAAC,YAAA,EAAc,QAAA,EAAU,KAAK,CAAA;AAUpE,IAAM,uBAAA,EAA2E;AAAA;AAAA;AAAA;AAAA,EAItF,UAAA,EAAY;AAAA,IACV,QAAA,EAAU,CAAC,MAAM,CAAA;AAAA,IACjB,IAAA,EAAM,CAAC,CAAC,MAAM,CAAC,CAAA;AAAA,IACf,MAAA,EAAQ,KAAA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pE;AAYO,IAAM,wBAAA,EAA0B,CAAC,MAAA,EAAQ,YAAA,EAAc,MAAA,EAAQ,UAAU,CAAA;AD7PhF;AACA;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,6jCAAC","file":"/home/anes/delo-payment/_worktrees/sdk-publish-0425-clone-w4/dist/chunk-4T4XHPYN.cjs","sourcesContent":[null,"// The Airwallex card form's shape, as one description both renderers read.\n//\n// The buyer's checkout draws this form twice: once for real, mounting one\n// Airwallex iframe per field (`AirwallexCardPane`), and once inert, inside the\n// merchant dashboard's live preview (`PreviewPaymentSurface`). The preview\n// cannot be the real one — mounting a processor's SDK in a dashboard frame is\n// a payment nobody asked to start, and `check-preview-inert.mjs` exists to\n// forbid it — so there are necessarily two renderers of the same form.\n//\n// Two renderers of one form is the drift hazard this file exists to remove. A\n// preview that shows a layout the pane does not produce is worse than no\n// preview at all, because the merchant configures against it and finds out\n// from a buyer. So neither renderer describes the geometry: both read\n// `AIRWALLEX_CARD_LAYOUTS`, and a preset that exists in one and not the other\n// is a TYPE ERROR here rather than a guard finding later — `Record<\n// AirwallexCardPreset, …>` has to name every member of the union.\n//\n// What lives here is geometry and nothing else. Colours, radius, padding and\n// type come from the merchant's own branding tokens, and what happens INSIDE\n// each box belongs to Airwallex.\n\n/**\n * The card layouts the checkout can draw.\n *\n * Presentation only. Every one of them collects the card inside Airwallex's\n * own iframes and confirms the same intent, so the PCI scope, the guards and\n * the return leg are identical whichever the merchant picks — which is what\n * makes this a setting rather than a second rail.\n *\n * `fullFeaturedCard`, Airwallex's own all-in-one element, is deliberately not\n * on this list. It is a different element with a different theming API, and it\n * takes the layout away from us entirely; it needs its own decision, not a\n * seventh row in a list of geometries.\n */\nexport const AIRWALLEX_CARD_PRESETS = [\n 'single_row',\n 'split_fields',\n 'split_fields_labelled',\n 'stacked',\n 'number_expiry_row',\n 'compact',\n] as const;\n\nexport type AirwallexCardPreset = (typeof AIRWALLEX_CARD_PRESETS)[number];\n\n/**\n * A field of the card form, named as Airwallex's `createElement` names it.\n *\n * `card` is the combined element — number, expiry and CVC in one iframe on one\n * line — and it never appears alongside the other three: a layout is either\n * the one element or the trio.\n */\nexport type AirwallexCardField = 'card' | 'cardNumber' | 'expiry' | 'cvc';\n\nexport interface AirwallexCardLayout {\n /**\n * The elements to create, in creation order.\n *\n * Order is load-bearing twice over: `confirm()` is called on the first one\n * (the combined element, or the number field, which coordinates its\n * siblings), and completion advances the caret to the next.\n */\n readonly elements: readonly AirwallexCardField[];\n /**\n * The rows to draw, top to bottom, each naming the fields on it left to\n * right. Fields sharing a row share its width evenly.\n *\n * Every field in `elements` appears exactly once across `rows`, and nothing\n * else does — `airwallexCardLayoutIsCoherent` is that claim, executable.\n */\n readonly rows: readonly (readonly AirwallexCardField[])[];\n /**\n * How a row's width is shared, when sharing it evenly is wrong.\n *\n * **Optional, and absent is the normal case**: a row with no weights splits\n * evenly, which is what every other preset wants — `stacked` is full-width\n * rows, `split_fields`, `split_fields_labelled` and `compact` pair expiry\n * and CVC, which are both short and genuinely want half each, and\n * `single_row` is one element. Only `number_expiry_row` puts two fields of\n * very different lengths on one line, and only it declares weights.\n *\n * Declared as weights rather than widths on purpose. A fixed width is right\n * for exactly the embed width it was tuned against and wrong either side of\n * it; a weight is a ratio and holds at any width. That is not hypothetical\n * — the defect that produced this field was a card-number placeholder\n * clipped at 460px, which no fixed width would have fixed for the merchant\n * whose embed is 380px.\n *\n * A field with no entry weighs 1.\n */\n readonly weights?: Readonly<Partial<Record<AirwallexCardField, number>>>;\n /**\n * Whether this preset captions its fields by default.\n *\n * The merchant can override it (`branding.airwallexLabelStyle`); this is\n * what the preset means when they have not. Captions are always visual: see\n * `AIRWALLEX_LABEL_STYLES`.\n */\n readonly labels: boolean;\n /**\n * `compact` draws one step tighter and one step smaller than the merchant's\n * own `inputSize` and field type size, rather than replacing them — a\n * merchant who chose spacious spacing and this preset gets spacious-minus-\n * one, not the same form as a merchant who chose compact.\n */\n readonly density: 'default' | 'compact';\n}\n\nconst SPLIT: readonly AirwallexCardField[] = ['cardNumber', 'expiry', 'cvc'];\n\n/**\n * Every preset's geometry, and the single source of it.\n *\n * Typed as a total `Record` on purpose. Adding a preset to\n * `AIRWALLEX_CARD_PRESETS` without adding its geometry here does not compile,\n * so the two cannot come apart in the direction that would leave a renderer\n * guessing.\n */\nexport const AIRWALLEX_CARD_LAYOUTS: Record<AirwallexCardPreset, AirwallexCardLayout> = {\n // Airwallex's combined element. One iframe, one row, and the only preset\n // whose insides are not ours to lay out — which is why it carries no\n // captions: there is nothing to caption but the row as a whole.\n single_row: {\n elements: ['card'],\n rows: [['card']],\n labels: false,\n density: 'default',\n },\n // The trio with placeholders carrying the meaning. Shorter than the\n // labelled variant and fine on a wide surface.\n split_fields: {\n elements: SPLIT,\n rows: [['cardNumber'], ['expiry', 'cvc']],\n labels: false,\n density: 'default',\n },\n // The default. The same geometry, captioned — which is what makes it\n // survive a narrow embed, where a bare field row stops being self-evident.\n split_fields_labelled: {\n elements: SPLIT,\n rows: [['cardNumber'], ['expiry', 'cvc']],\n labels: true,\n density: 'default',\n },\n // Every field full width. Expiry and CVC side by side start to crowd below\n // roughly 320px, and this is the layout that does not.\n stacked: {\n elements: SPLIT,\n rows: [['cardNumber'], ['expiry'], ['cvc']],\n labels: true,\n density: 'default',\n },\n // Two rows instead of two-plus-one: shorter than the split forms without\n // the ambiguity of a single combined field.\n //\n // 3:2, not an even split. A card number is nineteen characters and an expiry\n // is five, so halving the row clipped the number's own placeholder at 460px\n // — seen in the preview before this was weighted. The proposal drew it even;\n // the merchant-facing decision was taken on the two drawn side by side and\n // the weighted one was chosen, so do not \"restore\" the even split to match\n // the original mock.\n number_expiry_row: {\n elements: SPLIT,\n rows: [['cardNumber', 'expiry'], ['cvc']],\n weights: { cardNumber: 3, expiry: 2 },\n labels: true,\n density: 'default',\n },\n // Split geometry at reduced density and type size, for a checkout embedded\n // in a page that already has its own chrome.\n compact: {\n elements: SPLIT,\n rows: [['cardNumber'], ['expiry', 'cvc']],\n labels: false,\n density: 'compact',\n },\n};\n\n/**\n * The preset that renders when nobody has chosen one.\n *\n * Not `DEFAULT_BRANDING.airwallexCardPreset`, which is the empty string: the\n * branding field means \"the merchant's choice, in the shop's checkout\n * customizer\", and empty means they have not made one. This is the last step\n * of the resolution, after the connector account's own setting.\n * See `resolveAirwallexCardPreset`.\n */\nexport const AIRWALLEX_CARD_PRESET_FALLBACK: AirwallexCardPreset = 'split_fields_labelled';\n\n/**\n * Which preset the buyer's card form is drawn from.\n *\n * Three sources, in this order, and the order is the migration story:\n *\n * 1. **The shop's branding.** Set in the checkout customizer, empty when the\n * merchant has not been there. Empty rather than pre-filled with the\n * default precisely so that (2) still means something — a branding field\n * that always held a value would silently override every connector\n * account already configured, which is a rendering change no merchant\n * asked for.\n * 2. **The connector account's `integration_style` metadata**, where this\n * setting lived before the customizer existed, projected onto the checkout\n * payload as `card_connector_integration_style`. Still authoritative for\n * every merchant who set it and has not overridden it here. Nothing\n * migrates it; it simply keeps working.\n * 3. **`split_fields_labelled`**, for a shop that has never set either.\n *\n * Step 3 is the one visible change: a shop with nothing configured used to get\n * the combined single row, and now gets the labelled split form.\n *\n * Anything unrecognised at either step falls through rather than failing. The\n * dashboard and the router deploy separately and may already offer a preset\n * this build has not heard of; a card form in the wrong layout is a cosmetic\n * disappointment, and no card form is a lost sale.\n */\nexport function resolveAirwallexCardPreset(\n fromBranding: string | null | undefined,\n fromConnector: string | null | undefined,\n): AirwallexCardPreset {\n return asPreset(fromBranding) ?? asPreset(fromConnector) ?? AIRWALLEX_CARD_PRESET_FALLBACK;\n}\n\n/** The preset named, or `null` for anything this build does not know. */\nexport function asAirwallexCardPreset(value: unknown): AirwallexCardPreset | null {\n return asPreset(value);\n}\n\nfunction asPreset(value: unknown): AirwallexCardPreset | null {\n if (typeof value !== 'string') return null;\n const trimmed = value.trim().toLowerCase();\n return (AIRWALLEX_CARD_PRESETS as readonly string[]).includes(trimmed)\n ? (trimmed as AirwallexCardPreset)\n : null;\n}\n\n/** The geometry for a preset. Total, by the type of `AIRWALLEX_CARD_LAYOUTS`. */\nexport function airwallexCardLayout(preset: AirwallexCardPreset): AirwallexCardLayout {\n return AIRWALLEX_CARD_LAYOUTS[preset];\n}\n\n/**\n * How much of its row a field takes, relative to its neighbours.\n *\n * `1` unless the layout says otherwise, so a caller can multiply blindly and\n * an unweighted row divides evenly — which is what the CSS did before weights\n * existed, and therefore what every preset but one still gets.\n */\nexport function airwallexCellWeight(\n layout: AirwallexCardLayout,\n field: AirwallexCardField,\n): number {\n const weight = layout.weights?.[field];\n return typeof weight === 'number' && Number.isFinite(weight) && weight > 0 ? weight : 1;\n}\n\n/**\n * Whether a layout's rows draw exactly the elements it creates.\n *\n * The one thing the `Record` type cannot check. An element created with no row\n * to mount into leaves its field permanently pending — the pane's own comment\n * for that case is \"the form would sit on the skeleton until the deadline with\n * no reason given\" — and a row naming a field with no element draws an empty\n * box the buyer can click into and never type in. Both are silent.\n *\n * Executed by the checkout's preview guard over every preset, which is where a\n * new one gets caught.\n */\nexport function airwallexCardLayoutIsCoherent(layout: AirwallexCardLayout): boolean {\n const drawn = layout.rows.flat();\n if (drawn.length !== layout.elements.length) return false;\n return layout.elements.every((field) => drawn.filter((f) => f === field).length === 1);\n}\n\n/**\n * How the field's caption is drawn.\n *\n * Every one of these is **visual only**, and that is not a limitation we chose:\n * `for` cannot cross into a cross-origin iframe, so a `<label>` here would name\n * nothing and focus nothing. The field keeps the accessible name Airwallex\n * gives it inside the frame, and these captions sit beside it as an\n * affordance. The pane ships a caption on exactly these terms today.\n *\n * `''` is not a style — it means \"whatever the preset says\", so that\n * `split_fields` and `split_fields_labelled` keep meaning what they mean while\n * a merchant can still put floating captions on `compact`.\n */\nexport const AIRWALLEX_LABEL_STYLES = ['above', 'inline', 'floating', 'none'] as const;\nexport type AirwallexLabelStyle = (typeof AIRWALLEX_LABEL_STYLES)[number];\n\n/**\n * The caption style actually drawn: the merchant's override, or the preset's\n * own answer to whether it captions at all.\n */\nexport function resolveAirwallexLabelStyle(\n override: string | null | undefined,\n layout: AirwallexCardLayout,\n): AirwallexLabelStyle {\n if (\n typeof override === 'string' &&\n (AIRWALLEX_LABEL_STYLES as readonly string[]).includes(override)\n ) {\n return override as AirwallexLabelStyle;\n }\n return layout.labels ? 'above' : 'none';\n}\n\n/** How the box around each field is drawn. All three are the pane's own CSS. */\nexport const AIRWALLEX_FIELD_CHROMES = ['outlined', 'filled', 'underline'] as const;\nexport type AirwallexFieldChrome = (typeof AIRWALLEX_FIELD_CHROMES)[number];\n\n/**\n * The ring drawn around the focused field.\n *\n * Half of it is the pane's CSS on the container and half is Airwallex's\n * `:focus` bucket inside the frame; they are one control because a ring that\n * appeared on only one side of the iframe boundary would look like a bug.\n */\nexport const AIRWALLEX_FOCUS_RINGS = ['none', 'subtle', 'strong'] as const;\nexport type AirwallexFocusRing = (typeof AIRWALLEX_FOCUS_RINGS)[number];\n\n/**\n * What the browser's autofill highlight is allowed to do to the field.\n *\n * The one control on this list with no workaround from outside the frame:\n * the browser paints its own background on an autofilled input, and only the\n * SDK's `:autofill` bucket reaches it. `system` leaves it alone — the buyer's\n * own browser telling them it filled the field is information, not a style\n * bug — which is why it is the default.\n */\nexport const AIRWALLEX_AUTOFILL_TREATMENTS = ['system', 'brand', 'neutral'] as const;\nexport type AirwallexAutofillTreatment = (typeof AIRWALLEX_AUTOFILL_TREATMENTS)[number];\n\n/** Field type sizes, as the checkout's other size scales are named. */\nexport const AIRWALLEX_FIELD_FONT_SIZES = ['sm', 'md', 'lg'] as const;\nexport type AirwallexFieldFontSize = (typeof AIRWALLEX_FIELD_FONT_SIZES)[number];\n\n/** Field type weights. `medium` is what the pane hardcoded before this existed. */\nexport const AIRWALLEX_FIELD_WEIGHTS = ['regular', 'medium', 'semibold'] as const;\nexport type AirwallexFieldWeight = (typeof AIRWALLEX_FIELD_WEIGHTS)[number];\n\n/** Field type size in px, for the SDK's `base.fontSize`. */\nexport function airwallexFieldFontPx(\n size: AirwallexFieldFontSize,\n density: AirwallexCardLayout['density'],\n): number {\n const base = size === 'sm' ? 14 : size === 'lg' ? 18 : 16;\n // A compact preset draws one step smaller, floored so the field never\n // reaches the size at which iOS zooms the page on focus minus two.\n return density === 'compact' ? Math.max(13, base - 1) : base;\n}\n\n/** Field type weight as a CSS numeric weight, for the SDK's `base.fontWeight`. */\nexport function airwallexFieldWeightValue(weight: AirwallexFieldWeight): number {\n return weight === 'regular' ? 400 : weight === 'semibold' ? 600 : 500;\n}\n\n/**\n * The card networks whose marks the field row can display.\n *\n * **Decorative.** This list does not restrict what Airwallex accepts — that\n * would be `allowedCardNetworks`, which this build deliberately does not set,\n * because narrowing the networks a buyer may pay with is an acceptance change\n * and not a styling one. So the marks say what the merchant claims to take,\n * and it is the merchant's job to keep that true; the dashboard's field hint\n * says so in as many words. Enforcement is its own decision.\n */\nexport const AIRWALLEX_NETWORK_MARKS = ['visa', 'mastercard', 'amex', 'discover'] as const;\nexport type AirwallexNetworkMark = (typeof AIRWALLEX_NETWORK_MARKS)[number];\n"]}
|
|
1
|
+
{"version":3,"sources":["/home/skyline/Programming/work/delopay/delopay-typescript-sdk/dist/chunk-4T4XHPYN.cjs","../src/airwallexCard.ts"],"names":[],"mappings":"AAAA;ACkCO,IAAM,uBAAA,EAAyB;AAAA,EACpC,YAAA;AAAA,EACA,cAAA;AAAA,EACA,uBAAA;AAAA,EACA,SAAA;AAAA,EACA,mBAAA;AAAA,EACA;AACF,CAAA;AAmEA,IAAM,MAAA,EAAuC,CAAC,YAAA,EAAc,QAAA,EAAU,KAAK,CAAA;AAUpE,IAAM,uBAAA,EAA2E;AAAA;AAAA;AAAA;AAAA,EAItF,UAAA,EAAY;AAAA,IACV,QAAA,EAAU,CAAC,MAAM,CAAA;AAAA,IACjB,IAAA,EAAM,CAAC,CAAC,MAAM,CAAC,CAAA;AAAA,IACf,MAAA,EAAQ,KAAA;AAAA,IACR,OAAA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BAAA,EAA0B,CAAC,MAAA,EAAQ,YAAA,EAAc,MAAA,EAAQ,UAAU,CAAA;AD7PhF;AACA;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,6jCAAC","file":"/home/skyline/Programming/work/delopay/delopay-typescript-sdk/dist/chunk-4T4XHPYN.cjs","sourcesContent":[null,"// The Airwallex card form's shape, as one description both renderers read.\n//\n// The buyer's checkout draws this form twice: once for real, mounting one\n// Airwallex iframe per field (`AirwallexCardPane`), and once inert, inside the\n// merchant dashboard's live preview (`PreviewPaymentSurface`). The preview\n// cannot be the real one — mounting a processor's SDK in a dashboard frame is\n// a payment nobody asked to start, and `check-preview-inert.mjs` exists to\n// forbid it — so there are necessarily two renderers of the same form.\n//\n// Two renderers of one form is the drift hazard this file exists to remove. A\n// preview that shows a layout the pane does not produce is worse than no\n// preview at all, because the merchant configures against it and finds out\n// from a buyer. So neither renderer describes the geometry: both read\n// `AIRWALLEX_CARD_LAYOUTS`, and a preset that exists in one and not the other\n// is a TYPE ERROR here rather than a guard finding later — `Record<\n// AirwallexCardPreset, …>` has to name every member of the union.\n//\n// What lives here is geometry and nothing else. Colours, radius, padding and\n// type come from the merchant's own branding tokens, and what happens INSIDE\n// each box belongs to Airwallex.\n\n/**\n * The card layouts the checkout can draw.\n *\n * Presentation only. Every one of them collects the card inside Airwallex's\n * own iframes and confirms the same intent, so the PCI scope, the guards and\n * the return leg are identical whichever the merchant picks — which is what\n * makes this a setting rather than a second rail.\n *\n * `fullFeaturedCard`, Airwallex's own all-in-one element, is deliberately not\n * on this list. It is a different element with a different theming API, and it\n * takes the layout away from us entirely; it needs its own decision, not a\n * seventh row in a list of geometries.\n */\nexport const AIRWALLEX_CARD_PRESETS = [\n 'single_row',\n 'split_fields',\n 'split_fields_labelled',\n 'stacked',\n 'number_expiry_row',\n 'compact',\n] as const;\n\nexport type AirwallexCardPreset = (typeof AIRWALLEX_CARD_PRESETS)[number];\n\n/**\n * A field of the card form, named as Airwallex's `createElement` names it.\n *\n * `card` is the combined element — number, expiry and CVC in one iframe on one\n * line — and it never appears alongside the other three: a layout is either\n * the one element or the trio.\n */\nexport type AirwallexCardField = 'card' | 'cardNumber' | 'expiry' | 'cvc';\n\nexport interface AirwallexCardLayout {\n /**\n * The elements to create, in creation order.\n *\n * Order is load-bearing twice over: `confirm()` is called on the first one\n * (the combined element, or the number field, which coordinates its\n * siblings), and completion advances the caret to the next.\n */\n readonly elements: readonly AirwallexCardField[];\n /**\n * The rows to draw, top to bottom, each naming the fields on it left to\n * right. Fields sharing a row share its width evenly.\n *\n * Every field in `elements` appears exactly once across `rows`, and nothing\n * else does — `airwallexCardLayoutIsCoherent` is that claim, executable.\n */\n readonly rows: readonly (readonly AirwallexCardField[])[];\n /**\n * How a row's width is shared, when sharing it evenly is wrong.\n *\n * **Optional, and absent is the normal case**: a row with no weights splits\n * evenly, which is what every other preset wants — `stacked` is full-width\n * rows, `split_fields`, `split_fields_labelled` and `compact` pair expiry\n * and CVC, which are both short and genuinely want half each, and\n * `single_row` is one element. Only `number_expiry_row` puts two fields of\n * very different lengths on one line, and only it declares weights.\n *\n * Declared as weights rather than widths on purpose. A fixed width is right\n * for exactly the embed width it was tuned against and wrong either side of\n * it; a weight is a ratio and holds at any width. That is not hypothetical\n * — the defect that produced this field was a card-number placeholder\n * clipped at 460px, which no fixed width would have fixed for the merchant\n * whose embed is 380px.\n *\n * A field with no entry weighs 1.\n */\n readonly weights?: Readonly<Partial<Record<AirwallexCardField, number>>>;\n /**\n * Whether this preset captions its fields by default.\n *\n * The merchant can override it (`branding.airwallexLabelStyle`); this is\n * what the preset means when they have not. Captions are always visual: see\n * `AIRWALLEX_LABEL_STYLES`.\n */\n readonly labels: boolean;\n /**\n * `compact` draws one step tighter and one step smaller than the merchant's\n * own `inputSize` and field type size, rather than replacing them — a\n * merchant who chose spacious spacing and this preset gets spacious-minus-\n * one, not the same form as a merchant who chose compact.\n */\n readonly density: 'default' | 'compact';\n}\n\nconst SPLIT: readonly AirwallexCardField[] = ['cardNumber', 'expiry', 'cvc'];\n\n/**\n * Every preset's geometry, and the single source of it.\n *\n * Typed as a total `Record` on purpose. Adding a preset to\n * `AIRWALLEX_CARD_PRESETS` without adding its geometry here does not compile,\n * so the two cannot come apart in the direction that would leave a renderer\n * guessing.\n */\nexport const AIRWALLEX_CARD_LAYOUTS: Record<AirwallexCardPreset, AirwallexCardLayout> = {\n // Airwallex's combined element. One iframe, one row, and the only preset\n // whose insides are not ours to lay out — which is why it carries no\n // captions: there is nothing to caption but the row as a whole.\n single_row: {\n elements: ['card'],\n rows: [['card']],\n labels: false,\n density: 'default',\n },\n // The trio with placeholders carrying the meaning. Shorter than the\n // labelled variant and fine on a wide surface.\n split_fields: {\n elements: SPLIT,\n rows: [['cardNumber'], ['expiry', 'cvc']],\n labels: false,\n density: 'default',\n },\n // The default. The same geometry, captioned — which is what makes it\n // survive a narrow embed, where a bare field row stops being self-evident.\n split_fields_labelled: {\n elements: SPLIT,\n rows: [['cardNumber'], ['expiry', 'cvc']],\n labels: true,\n density: 'default',\n },\n // Every field full width. Expiry and CVC side by side start to crowd below\n // roughly 320px, and this is the layout that does not.\n stacked: {\n elements: SPLIT,\n rows: [['cardNumber'], ['expiry'], ['cvc']],\n labels: true,\n density: 'default',\n },\n // Two rows instead of two-plus-one: shorter than the split forms without\n // the ambiguity of a single combined field.\n //\n // 3:2, not an even split. A card number is nineteen characters and an expiry\n // is five, so halving the row clipped the number's own placeholder at 460px\n // — seen in the preview before this was weighted. The proposal drew it even;\n // the merchant-facing decision was taken on the two drawn side by side and\n // the weighted one was chosen, so do not \"restore\" the even split to match\n // the original mock.\n number_expiry_row: {\n elements: SPLIT,\n rows: [['cardNumber', 'expiry'], ['cvc']],\n weights: { cardNumber: 3, expiry: 2 },\n labels: true,\n density: 'default',\n },\n // Split geometry at reduced density and type size, for a checkout embedded\n // in a page that already has its own chrome.\n compact: {\n elements: SPLIT,\n rows: [['cardNumber'], ['expiry', 'cvc']],\n labels: false,\n density: 'compact',\n },\n};\n\n/**\n * The preset that renders when nobody has chosen one.\n *\n * Not `DEFAULT_BRANDING.airwallexCardPreset`, which is the empty string: the\n * branding field means \"the merchant's choice, in the shop's checkout\n * customizer\", and empty means they have not made one. This is the last step\n * of the resolution, after the connector account's own setting.\n * See `resolveAirwallexCardPreset`.\n */\nexport const AIRWALLEX_CARD_PRESET_FALLBACK: AirwallexCardPreset = 'split_fields_labelled';\n\n/**\n * Which preset the buyer's card form is drawn from.\n *\n * Three sources, in this order, and the order is the migration story:\n *\n * 1. **The shop's branding.** Set in the checkout customizer, empty when the\n * merchant has not been there. Empty rather than pre-filled with the\n * default precisely so that (2) still means something — a branding field\n * that always held a value would silently override every connector\n * account already configured, which is a rendering change no merchant\n * asked for.\n * 2. **The connector account's `integration_style` metadata**, where this\n * setting lived before the customizer existed, projected onto the checkout\n * payload as `card_connector_integration_style`. Still authoritative for\n * every merchant who set it and has not overridden it here. Nothing\n * migrates it; it simply keeps working.\n * 3. **`split_fields_labelled`**, for a shop that has never set either.\n *\n * Step 3 is the one visible change: a shop with nothing configured used to get\n * the combined single row, and now gets the labelled split form.\n *\n * Anything unrecognised at either step falls through rather than failing. The\n * dashboard and the router deploy separately and may already offer a preset\n * this build has not heard of; a card form in the wrong layout is a cosmetic\n * disappointment, and no card form is a lost sale.\n */\nexport function resolveAirwallexCardPreset(\n fromBranding: string | null | undefined,\n fromConnector: string | null | undefined,\n): AirwallexCardPreset {\n return asPreset(fromBranding) ?? asPreset(fromConnector) ?? AIRWALLEX_CARD_PRESET_FALLBACK;\n}\n\n/** The preset named, or `null` for anything this build does not know. */\nexport function asAirwallexCardPreset(value: unknown): AirwallexCardPreset | null {\n return asPreset(value);\n}\n\nfunction asPreset(value: unknown): AirwallexCardPreset | null {\n if (typeof value !== 'string') return null;\n const trimmed = value.trim().toLowerCase();\n return (AIRWALLEX_CARD_PRESETS as readonly string[]).includes(trimmed)\n ? (trimmed as AirwallexCardPreset)\n : null;\n}\n\n/** The geometry for a preset. Total, by the type of `AIRWALLEX_CARD_LAYOUTS`. */\nexport function airwallexCardLayout(preset: AirwallexCardPreset): AirwallexCardLayout {\n return AIRWALLEX_CARD_LAYOUTS[preset];\n}\n\n/**\n * How much of its row a field takes, relative to its neighbours.\n *\n * `1` unless the layout says otherwise, so a caller can multiply blindly and\n * an unweighted row divides evenly — which is what the CSS did before weights\n * existed, and therefore what every preset but one still gets.\n */\nexport function airwallexCellWeight(\n layout: AirwallexCardLayout,\n field: AirwallexCardField,\n): number {\n const weight = layout.weights?.[field];\n return typeof weight === 'number' && Number.isFinite(weight) && weight > 0 ? weight : 1;\n}\n\n/**\n * Whether a layout's rows draw exactly the elements it creates.\n *\n * The one thing the `Record` type cannot check. An element created with no row\n * to mount into leaves its field permanently pending — the pane's own comment\n * for that case is \"the form would sit on the skeleton until the deadline with\n * no reason given\" — and a row naming a field with no element draws an empty\n * box the buyer can click into and never type in. Both are silent.\n *\n * Executed by the checkout's preview guard over every preset, which is where a\n * new one gets caught.\n */\nexport function airwallexCardLayoutIsCoherent(layout: AirwallexCardLayout): boolean {\n const drawn = layout.rows.flat();\n if (drawn.length !== layout.elements.length) return false;\n return layout.elements.every((field) => drawn.filter((f) => f === field).length === 1);\n}\n\n/**\n * How the field's caption is drawn.\n *\n * Every one of these is **visual only**, and that is not a limitation we chose:\n * `for` cannot cross into a cross-origin iframe, so a `<label>` here would name\n * nothing and focus nothing. The field keeps the accessible name Airwallex\n * gives it inside the frame, and these captions sit beside it as an\n * affordance. The pane ships a caption on exactly these terms today.\n *\n * `''` is not a style — it means \"whatever the preset says\", so that\n * `split_fields` and `split_fields_labelled` keep meaning what they mean while\n * a merchant can still put floating captions on `compact`.\n */\nexport const AIRWALLEX_LABEL_STYLES = ['above', 'inline', 'floating', 'none'] as const;\nexport type AirwallexLabelStyle = (typeof AIRWALLEX_LABEL_STYLES)[number];\n\n/**\n * The caption style actually drawn: the merchant's override, or the preset's\n * own answer to whether it captions at all.\n */\nexport function resolveAirwallexLabelStyle(\n override: string | null | undefined,\n layout: AirwallexCardLayout,\n): AirwallexLabelStyle {\n if (\n typeof override === 'string' &&\n (AIRWALLEX_LABEL_STYLES as readonly string[]).includes(override)\n ) {\n return override as AirwallexLabelStyle;\n }\n return layout.labels ? 'above' : 'none';\n}\n\n/** How the box around each field is drawn. All three are the pane's own CSS. */\nexport const AIRWALLEX_FIELD_CHROMES = ['outlined', 'filled', 'underline'] as const;\nexport type AirwallexFieldChrome = (typeof AIRWALLEX_FIELD_CHROMES)[number];\n\n/**\n * The ring drawn around the focused field.\n *\n * Half of it is the pane's CSS on the container and half is Airwallex's\n * `:focus` bucket inside the frame; they are one control because a ring that\n * appeared on only one side of the iframe boundary would look like a bug.\n */\nexport const AIRWALLEX_FOCUS_RINGS = ['none', 'subtle', 'strong'] as const;\nexport type AirwallexFocusRing = (typeof AIRWALLEX_FOCUS_RINGS)[number];\n\n/**\n * What the browser's autofill highlight is allowed to do to the field.\n *\n * The one control on this list with no workaround from outside the frame:\n * the browser paints its own background on an autofilled input, and only the\n * SDK's `:autofill` bucket reaches it. `system` leaves it alone — the buyer's\n * own browser telling them it filled the field is information, not a style\n * bug — which is why it is the default.\n */\nexport const AIRWALLEX_AUTOFILL_TREATMENTS = ['system', 'brand', 'neutral'] as const;\nexport type AirwallexAutofillTreatment = (typeof AIRWALLEX_AUTOFILL_TREATMENTS)[number];\n\n/** Field type sizes, as the checkout's other size scales are named. */\nexport const AIRWALLEX_FIELD_FONT_SIZES = ['sm', 'md', 'lg'] as const;\nexport type AirwallexFieldFontSize = (typeof AIRWALLEX_FIELD_FONT_SIZES)[number];\n\n/** Field type weights. `medium` is what the pane hardcoded before this existed. */\nexport const AIRWALLEX_FIELD_WEIGHTS = ['regular', 'medium', 'semibold'] as const;\nexport type AirwallexFieldWeight = (typeof AIRWALLEX_FIELD_WEIGHTS)[number];\n\n/** Field type size in px, for the SDK's `base.fontSize`. */\nexport function airwallexFieldFontPx(\n size: AirwallexFieldFontSize,\n density: AirwallexCardLayout['density'],\n): number {\n const base = size === 'sm' ? 14 : size === 'lg' ? 18 : 16;\n // A compact preset draws one step smaller, floored so the field never\n // reaches the size at which iOS zooms the page on focus minus two.\n return density === 'compact' ? Math.max(13, base - 1) : base;\n}\n\n/** Field type weight as a CSS numeric weight, for the SDK's `base.fontWeight`. */\nexport function airwallexFieldWeightValue(weight: AirwallexFieldWeight): number {\n return weight === 'regular' ? 400 : weight === 'semibold' ? 600 : 500;\n}\n\n/**\n * The card networks whose marks the field row can display.\n *\n * **Decorative.** This list does not restrict what Airwallex accepts — that\n * would be `allowedCardNetworks`, which this build deliberately does not set,\n * because narrowing the networks a buyer may pay with is an acceptance change\n * and not a styling one. So the marks say what the merchant claims to take,\n * and it is the merchant's job to keep that true; the dashboard's field hint\n * says so in as many words. Enforcement is its own decision.\n */\nexport const AIRWALLEX_NETWORK_MARKS = ['visa', 'mastercard', 'amex', 'discover'] as const;\nexport type AirwallexNetworkMark = (typeof AIRWALLEX_NETWORK_MARKS)[number];\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/anes/delo-payment/_worktrees/sdk-publish-0425-clone-w4/dist/chunk-5CITBN33.cjs","../src/enigmaCardForm.ts"],"names":[],"mappings":"AAAA;ACeO,IAAM,qBAAA,EAAuB,CAAC,UAAA,EAAY,QAAA,EAAU,WAAA,EAAa,QAAQ,CAAA;AAIzE,IAAM,wBAAA,EAA0B,CAAC,OAAA,EAAS,QAAQ,CAAA;AAIlD,IAAM,mBAAA,EAAqB,CAAC,QAAA,EAAU,OAAO,CAAA;AAO7C,IAAM,oBAAA,EAAsB,CAAC,QAAA,EAAU,MAAM,CAAA;AAO7C,IAAM,qBAAA,EAAuB,CAAC,MAAA,EAAQ,QAAA,EAAU,QAAQ,CAAA;AAGxD,IAAM,mBAAA,EAAqB,CAAC,QAAA,EAAU,QAAQ,CAAA;AAI9C,IAAM,qBAAA,EAA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A;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/_worktrees/sdk-publish-0425-clone-w4/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
|
+
{"version":3,"sources":["/home/skyline/Programming/work/delopay/delopay-typescript-sdk/dist/chunk-5CITBN33.cjs","../src/enigmaCardForm.ts"],"names":[],"mappings":"AAAA;ACeO,IAAM,qBAAA,EAAuB,CAAC,UAAA,EAAY,QAAA,EAAU,WAAA,EAAa,QAAQ,CAAA;AAIzE,IAAM,wBAAA,EAA0B,CAAC,OAAA,EAAS,QAAQ,CAAA;AAIlD,IAAM,mBAAA,EAAqB,CAAC,QAAA,EAAU,OAAO,CAAA;AAO7C,IAAM,oBAAA,EAAsB,CAAC,QAAA,EAAU,MAAM,CAAA;AAO7C,IAAM,qBAAA,EAAuB,CAAC,MAAA,EAAQ,QAAA,EAAU,QAAQ,CAAA;AAGxD,IAAM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O,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/skyline/Programming/work/delopay/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"]}
|
|
@@ -62,6 +62,23 @@ var Analytics = class {
|
|
|
62
62
|
query: params
|
|
63
63
|
});
|
|
64
64
|
}
|
|
65
|
+
/**
|
|
66
|
+
* Industry analytics: payments, volume, outcomes, refunds and disputes by
|
|
67
|
+
* the industry each shop had on the UTC day a payment was created, as a tree
|
|
68
|
+
* of industries, sub-industries, the merchant's own industries and the
|
|
69
|
+
* shops without one, each with the previous window, a series, the processor
|
|
70
|
+
* and country split and the largest shops. Pinned server-side to your own
|
|
71
|
+
* merchant (`merchant_id` is ignored). Needs the `IndustryAnalytics` area,
|
|
72
|
+
* which no other analytics grant implies, at merchant level: a shop-scoped
|
|
73
|
+
* role or a shop-bound key gets a 403 (`IR_22`). Live payments unless
|
|
74
|
+
* `test_mode` is `true`; amounts in USD unless `currency` names one.
|
|
75
|
+
* `GET /analytics/industries`
|
|
76
|
+
*/
|
|
77
|
+
async industries(params) {
|
|
78
|
+
return this.request("GET", "/analytics/industries", {
|
|
79
|
+
query: params
|
|
80
|
+
});
|
|
81
|
+
}
|
|
65
82
|
/**
|
|
66
83
|
* Device analytics over the canonical client-context observation per
|
|
67
84
|
* payment (browser/platform families, device classes and models, checkout
|
|
@@ -271,4 +288,4 @@ var Analytics = class {
|
|
|
271
288
|
export {
|
|
272
289
|
Analytics
|
|
273
290
|
};
|
|
274
|
-
//# sourceMappingURL=chunk-
|
|
291
|
+
//# sourceMappingURL=chunk-5D5UYMQK.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/resources/analytics.ts"],"sourcesContent":["import type { RequestExtras, RequestFn } from '../client';\nimport type {\n AnalyticsScopeRequest,\n AnalyticsScopeResponse,\n AnalyticsShopsRequest,\n AnalyticsShopsResponse,\n AnalyticsConnectorsRequest,\n AnalyticsConnectorsResponse,\n ClientAnalyticsRequest,\n IndustryAnalytics,\n IndustryAnalyticsRequest,\n DevicesAnalyticsResponse,\n GeoAnalyticsResponse,\n DeviceDrillRequest,\n GeoDrillRequest,\n DrillResponse,\n SubscriptionAnalyticsRequest,\n SubscriptionAnalyticsResponse,\n SubscriptionDrillRequest,\n ScopeDrillRequest,\n AnalyticsExclusionRequest,\n AnalyticsExclusionResponse,\n AnalyticsExclusionsResponse,\n} from '../types';\n\nexport class Analytics {\n constructor(private readonly request: RequestFn) {}\n\n /**\n * Scoped, drill-level analytics dashboard for the authenticated merchant\n * (the same engine as the admin portal, pinned server-side to your own\n * merchant). The server ignores `merchant_id` — it always scopes to your\n * merchant, and to your single shop for profile-scoped users — so pass only\n * `project_id` / `shop_id` to drill and the window / `sections` fields.\n * Returns one drill level: the scope's daily series + previous window,\n * processor mix and direct children. Accepts a dashboard session or an API\n * key, including a `statistics_read` key; a shop-bound key reads only its\n * shop. `GET /analytics/scope`\n */\n async scope(params?: AnalyticsScopeRequest): Promise<AnalyticsScopeResponse> {\n return this.request('GET', '/analytics/scope', {\n query: params as Record<string, string | number | boolean | undefined>,\n });\n }\n\n /**\n * Period Reports: the scoped daily series, pinned exactly like `scope`, but\n * gated on the Period Reports permission area instead of Payment\n * Performance. Pass `timezone` and each day bucket is a local calendar day,\n * which sums exactly into calendar weeks and months. Answers only the\n * `series`, `previous` and `children` blocks and ignores country and device\n * filters. Accepts a dashboard session or an API key, including a\n * `statistics_read` key. `GET /analytics/reports`\n */\n async reports(params?: AnalyticsScopeRequest): Promise<AnalyticsScopeResponse> {\n return this.request('GET', '/analytics/reports', {\n query: params as Record<string, string | number | boolean | undefined>,\n });\n }\n\n /**\n * Shop comparison: one series per shop over one window, with whole-window\n * and previous-window totals, so shops can be drawn side by side. Pinned\n * server-side to your own merchant (`merchant_id` is ignored), and to your\n * single shop for a shop-scoped user; `project_id` / `shop_id` narrow it.\n * Shops without activity are included, sorted by name. Hourly buckets are\n * refused for windows over 7 days. Accepts an API key like `scope`.\n * `GET /analytics/shops`\n */\n async shops(params?: AnalyticsShopsRequest): Promise<AnalyticsShopsResponse> {\n return this.request('GET', '/analytics/shops', {\n query: params as Record<string, string | number | boolean | undefined>,\n });\n }\n\n /**\n * PSP analytics: routed payments, outcomes, volume and payment sizes per\n * connector and per connector account over one window, with the breakdown\n * by project and shop. Pinned server-side to your own merchant\n * (`merchant_id` is ignored) and to your shop for a shop-scoped user. Live\n * payments unless `test_mode` is `true`. Amounts are in USD unless\n * `currency` names one. Pass `sections` to compute only some blocks.\n * A role that may see no processor gets a 403.\n * `GET /analytics/connectors`\n */\n async connectors(params?: AnalyticsConnectorsRequest): Promise<AnalyticsConnectorsResponse> {\n return this.request('GET', '/analytics/connectors', {\n query: params as Record<string, string | number | boolean | undefined>,\n });\n }\n\n /**\n * Industry analytics: payments, volume, outcomes, refunds and disputes by\n * the industry each shop had on the UTC day a payment was created, as a tree\n * of industries, sub-industries, the merchant's own industries and the\n * shops without one, each with the previous window, a series, the processor\n * and country split and the largest shops. Pinned server-side to your own\n * merchant (`merchant_id` is ignored). Needs the `IndustryAnalytics` area,\n * which no other analytics grant implies, at merchant level: a shop-scoped\n * role or a shop-bound key gets a 403 (`IR_22`). Live payments unless\n * `test_mode` is `true`; amounts in USD unless `currency` names one.\n * `GET /analytics/industries`\n */\n async industries(params?: IndustryAnalyticsRequest): Promise<IndustryAnalytics> {\n return this.request('GET', '/analytics/industries', {\n query: params as Record<string, string | number | boolean | undefined>,\n });\n }\n\n /**\n * Device analytics over the canonical client-context observation per\n * payment (browser/platform families, device classes and models, checkout\n * channel mix, time-to-pay), pinned server-side to your own merchant and\n * drillable via `project_id` / `shop_id` exactly like `scope`. Gated on the\n * client-context optimisation-use switch: when it is off the server answers\n * 200 with `enabled: false` and a caveat naming the switch. Accepts an API\n * key like `scope`. `GET /analytics/devices`\n */\n async devices(params?: ClientAnalyticsRequest): Promise<DevicesAnalyticsResponse> {\n return this.request('GET', '/analytics/devices', {\n query: params as Record<string, string | number | boolean | undefined>,\n });\n }\n\n /**\n * Geo analytics over the canonical client-context observation per payment:\n * country totals, city bubbles (IP mode), buyer languages, buyer-local\n * purchase hours and the IP-vs-billing mismatch share. `mode` selects the\n * location claim (`ip` default, `billing`); the two are never coalesced.\n * Same drill, window, gating and API-key contract as `devices`.\n * `GET /analytics/geo`\n */\n async geo(params?: ClientAnalyticsRequest): Promise<GeoAnalyticsResponse> {\n return this.request('GET', '/analytics/geo', {\n query: params as Record<string, string | number | boolean | undefined>,\n });\n }\n\n /**\n * The recent payments behind one clicked geo target: a map country (in the\n * active claim mode), optionally narrowed to an IP-resolved city, or one\n * buyer-local heatmap cell (`dow` + `hour`, paid sessions only). Same\n * window/scope/filter and gating contract as `geo`; capped at 50 rows,\n * newest first, with the full match count alongside.\n * `GET /analytics/geo/transactions`\n */\n async geoTransactions(params: GeoDrillRequest): Promise<DrillResponse> {\n return this.request('GET', '/analytics/geo/transactions', {\n query: params as Record<string, string | number | boolean | undefined>,\n });\n }\n\n /**\n * The recent payments behind one clicked device target: exactly one of a\n * browser family, a platform family, an identified device-model label, or\n * a device class. Family/model targets are resolved server-side with the\n * same classifiers the cards use. Same window/scope/filter and gating\n * contract as `devices`; 50 rows per page (`offset` for the next page),\n * newest first, with the full match count alongside.\n * `GET /analytics/devices/transactions`\n */\n async deviceTransactions(params: DeviceDrillRequest): Promise<DrillResponse> {\n return this.request('GET', '/analytics/devices/transactions', {\n // A discriminated union carries no index signature, so the widening\n // goes via `unknown` — the union is the point.\n query: params as unknown as Record<string, string | number | boolean | undefined>,\n });\n }\n\n /**\n * The payments behind one clicked element of the payments dashboard: a\n * processor-donut slice, a payment-method slice, an outcome segment of a\n * series bar, a series bucket, or a breakdown row — combinable, with\n * `target_bucket` narrowing every other target. The outcome mapping is the\n * one the series and donuts are folded with, expanded server-side, so the\n * list is what the clicked number was made of. Rows and the whole-match\n * `summary` carry USD figures converted with the dashboard's own rates.\n * Same window/scope/chip contract as `scope`; sorted per `sort_on` /\n * `sort_by`, `limit` rows (default 50) per page, `offset` for the next.\n * `GET /analytics/scope/transactions`\n */\n async scopeTransactions(params: ScopeDrillRequest): Promise<DrillResponse> {\n return this.request('GET', '/analytics/scope/transactions', {\n // A discriminated union carries no index signature, so the widening\n // goes via `unknown` — the union is the point, and the query builder\n // only ever reads own enumerable keys.\n query: params as unknown as Record<string, string | number | boolean | undefined>,\n });\n }\n\n /**\n * Subscription analytics over `subscription` and `invoice`: estimated\n * recurring volume, the invoice funnel, movement (new / expansion /\n * contraction / churn), both processor axes, plan mix and the breakdown one\n * level below the scope. Pinned server-side to your own merchant and\n * drillable via `project_id` / `shop_id` exactly like `scope`.\n *\n * Half the figures are **stocks** — a snapshot at the window's end rather\n * than a sum over it — so `est_monthly_volume_usd` and `active` can match\n * across a 7-day and a 30-day window while `billed_volume_usd` does not.\n * Day granularity only. Accepts an API key like `scope`.\n * `GET /analytics/subscriptions`\n */\n async subscriptions(\n params?: SubscriptionAnalyticsRequest,\n ): Promise<SubscriptionAnalyticsResponse> {\n return this.request('GET', '/analytics/subscriptions', {\n query: params as Record<string, string | number | boolean | undefined>,\n });\n }\n\n /**\n * The billing cycles behind one clicked element of the subscription\n * dashboard: an invoice outcome, a processor slice on either axis, a plan\n * row, a subscription status, a movement component, a series bucket or a\n * breakdown row. Same window/scope/filter contract as `subscriptions`; 50\n * rows per page (`offset` for the next), newest first, with the full match\n * count alongside.\n *\n * A cycle that never reached a payment is listed too — that is what \"still\n * unpaid\" means — and carries its invoice id as `payment_id` with\n * `invoice_id` set to the same value, so you can always tell which you got.\n * `GET /analytics/subscriptions/list`\n */\n async subscriptionsList(params: SubscriptionDrillRequest): Promise<DrillResponse> {\n return this.request('GET', '/analytics/subscriptions/list', {\n // A discriminated union carries no index signature, so the widening\n // goes via `unknown` — the union is the point, and the query builder\n // only ever reads own enumerable keys.\n query: params as unknown as Record<string, string | number | boolean | undefined>,\n });\n }\n\n /**\n * Every analytics exclusion of the merchant, with the payments each one\n * matched in the lookback window.\n *\n * These rules change what the merchant's own dashboards count. Financial\n * records and transaction lists are never filtered by them.\n *\n * `matched_payments` counts overlap between rules: a payment matched by\n * three rules is counted once by each, so the values are not additive. The\n * envelope's `best_effort` and `lookback_days` apply to every row — matching\n * runs on client signals that may be absent or expired, within that window.\n * `GET /analytics/exclusions`\n */\n async listExclusions(): Promise<AnalyticsExclusionsResponse> {\n return this.request('GET', '/analytics/exclusions');\n }\n\n /**\n * Write a new exclusion. A shop-scoped user must name their own shop in\n * `profile_id`; omitting it applies the rule to every shop of the merchant.\n * Omitting `surfaces` means **all five**, not none.\n * `POST /analytics/exclusions`\n */\n async createExclusion(rule: AnalyticsExclusionRequest): Promise<AnalyticsExclusionResponse> {\n return this.request('POST', '/analytics/exclusions', { body: rule });\n }\n\n /**\n * Replace a stored exclusion **completely**. This is not a patch: every\n * field you leave out reverts to its default rather than keeping its stored\n * value, so send the whole rule — including an explicit `null` for a\n * `profile_id`, `value`, `valid_from`, `valid_until` or `note` you mean to\n * clear, and the full `surfaces` list you mean to keep.\n * `PUT /analytics/exclusions/{id}`\n */\n async updateExclusion(\n id: string,\n rule: AnalyticsExclusionRequest,\n options?: RequestExtras,\n ): Promise<AnalyticsExclusionResponse> {\n return this.request('PUT', `/analytics/exclusions/${encodeURIComponent(id)}`, {\n body: rule,\n ...options,\n });\n }\n\n /**\n * Delete a stored exclusion. Returns the rule as it was, so a caller can\n * say what it removed. `DELETE /analytics/exclusions/{id}`\n */\n async deleteExclusion(id: string): Promise<AnalyticsExclusionResponse> {\n return this.request('DELETE', `/analytics/exclusions/${encodeURIComponent(id)}`);\n }\n\n /** Global search. `POST /analytics/search` */\n async search(params: Record<string, unknown>): Promise<Record<string, unknown>> {\n return this.request('POST', '/analytics/search', { body: params });\n }\n\n /** Domain-specific search. `POST /analytics/search/{domain}` */\n async searchDomain(\n domain: string,\n params: Record<string, unknown>,\n ): Promise<Record<string, unknown>> {\n return this.request('POST', `/analytics/search/${encodeURIComponent(domain)}`, {\n body: params,\n });\n }\n\n /** Get analytics info. `GET /analytics/{domain}/info` */\n async getInfo(domain: string): Promise<Record<string, unknown>> {\n return this.request('GET', `/analytics/${encodeURIComponent(domain)}/info`);\n }\n\n /** Get API event logs. `GET /analytics/api-event-logs` */\n async apiEventLogs(\n params?: Record<string, string | number | undefined>,\n ): Promise<Record<string, unknown>> {\n return this.request('GET', '/analytics/api-event-logs', { query: params });\n }\n\n /** Get SDK event logs. `POST /analytics/sdk-event-logs` */\n async sdkEventLogs(params: Record<string, unknown>): Promise<Record<string, unknown>> {\n return this.request('POST', '/analytics/sdk-event-logs', { body: params });\n }\n\n /** Get connector event logs. `GET /analytics/connector-event-logs` */\n async connectorEventLogs(\n params?: Record<string, string | number | undefined>,\n ): Promise<Record<string, unknown>> {\n return this.request('GET', '/analytics/connector-event-logs', { query: params });\n }\n\n /**\n * Get routing event logs. `GET /analytics/routing-event-logs`\n *\n * @deprecated The service answers this only from a ClickHouse analytics\n * store; with SQL analytics, the default configuration, it answers an\n * error. To learn why a payment used a connector, read\n * `payments.routingDecisions(paymentId)`,\n * the routing decision recorded behind each attempt. This method stays for\n * compatibility and still sends the same request.\n */\n async routingEventLogs(\n params?: Record<string, string | number | undefined>,\n ): Promise<Record<string, unknown>> {\n return this.request('GET', '/analytics/routing-event-logs', { query: params });\n }\n\n /** Get outgoing webhook event logs. `GET /analytics/outgoing-webhook-event-logs` */\n async outgoingWebhookEventLogs(\n params?: Record<string, string | number | undefined>,\n ): Promise<Record<string, unknown>> {\n return this.request('GET', '/analytics/outgoing-webhook-event-logs', { query: params });\n }\n}\n"],"mappings":";AAyBO,IAAM,YAAN,MAAgB;AAAA,EACrB,YAA6B,SAAoB;AAApB;AAAA,EAAqB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAalD,MAAM,MAAM,QAAiE;AAC3E,WAAO,KAAK,QAAQ,OAAO,oBAAoB;AAAA,MAC7C,OAAO;AAAA,IACT,CAAC;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAWA,MAAM,QAAQ,QAAiE;AAC7E,WAAO,KAAK,QAAQ,OAAO,sBAAsB;AAAA,MAC/C,OAAO;AAAA,IACT,CAAC;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAWA,MAAM,MAAM,QAAiE;AAC3E,WAAO,KAAK,QAAQ,OAAO,oBAAoB;AAAA,MAC7C,OAAO;AAAA,IACT,CAAC;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAYA,MAAM,WAAW,QAA2E;AAC1F,WAAO,KAAK,QAAQ,OAAO,yBAAyB;AAAA,MAClD,OAAO;AAAA,IACT,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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/_worktrees/sdk-publish-0425-clone-w4/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":["/home/skyline/Programming/work/delopay/delopay-typescript-sdk/dist/chunk-5HCKC4HF.cjs","../src/resources/apiKeys.ts"],"names":[],"mappings":"AAAA;ACYO,IAAM,Q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A6BiC,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/skyline/Programming/work/delopay/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,5 +1,8 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
+
var _chunkZKPVUCQVcjs = require('./chunk-ZKPVUCQV.cjs');
|
|
4
|
+
|
|
5
|
+
|
|
3
6
|
var _chunkNFB3S2E6cjs = require('./chunk-NFB3S2E6.cjs');
|
|
4
7
|
|
|
5
8
|
|
|
@@ -12,6 +15,9 @@ var _chunkR4FE6K43cjs = require('./chunk-R4FE6K43.cjs');
|
|
|
12
15
|
var _chunkVYC7WUM5cjs = require('./chunk-VYC7WUM5.cjs');
|
|
13
16
|
|
|
14
17
|
|
|
18
|
+
var _chunkBP6KDQ6Icjs = require('./chunk-BP6KDQ6I.cjs');
|
|
19
|
+
|
|
20
|
+
|
|
15
21
|
var _chunk424542L2cjs = require('./chunk-424542L2.cjs');
|
|
16
22
|
|
|
17
23
|
|
|
@@ -33,7 +39,7 @@ var _chunkODPNVNYEcjs = require('./chunk-ODPNVNYE.cjs');
|
|
|
33
39
|
var _chunkWX6NP7UUcjs = require('./chunk-WX6NP7UU.cjs');
|
|
34
40
|
|
|
35
41
|
|
|
36
|
-
var
|
|
42
|
+
var _chunkTNIJ6OSHcjs = require('./chunk-TNIJ6OSH.cjs');
|
|
37
43
|
|
|
38
44
|
|
|
39
45
|
var _chunkGG52SAHAcjs = require('./chunk-GG52SAHA.cjs');
|
|
@@ -57,7 +63,7 @@ var _chunk244VZFFOcjs = require('./chunk-244VZFFO.cjs');
|
|
|
57
63
|
var _chunkACZ2R47Xcjs = require('./chunk-ACZ2R47X.cjs');
|
|
58
64
|
|
|
59
65
|
|
|
60
|
-
var
|
|
66
|
+
var _chunkVH5A6SMUcjs = require('./chunk-VH5A6SMU.cjs');
|
|
61
67
|
|
|
62
68
|
|
|
63
69
|
var _chunkKOB6MOAVcjs = require('./chunk-KOB6MOAV.cjs');
|
|
@@ -81,7 +87,7 @@ var _chunkRI42IDRRcjs = require('./chunk-RI42IDRR.cjs');
|
|
|
81
87
|
var _chunkFYISDU2Ycjs = require('./chunk-FYISDU2Y.cjs');
|
|
82
88
|
|
|
83
89
|
|
|
84
|
-
var
|
|
90
|
+
var _chunk6EBY2KKLcjs = require('./chunk-6EBY2KKL.cjs');
|
|
85
91
|
|
|
86
92
|
|
|
87
93
|
var _chunk4EKAWNYIcjs = require('./chunk-4EKAWNYI.cjs');
|
|
@@ -105,7 +111,7 @@ var _chunkSQELICSXcjs = require('./chunk-SQELICSX.cjs');
|
|
|
105
111
|
var _chunk75E5WNJGcjs = require('./chunk-75E5WNJG.cjs');
|
|
106
112
|
|
|
107
113
|
|
|
108
|
-
var
|
|
114
|
+
var _chunkEXPWQBI3cjs = require('./chunk-EXPWQBI3.cjs');
|
|
109
115
|
|
|
110
116
|
|
|
111
117
|
var _chunkI2XGNALGcjs = require('./chunk-I2XGNALG.cjs');
|
|
@@ -129,7 +135,7 @@ var _chunkCCN44NZJcjs = require('./chunk-CCN44NZJ.cjs');
|
|
|
129
135
|
var _chunkF6S3WCCBcjs = require('./chunk-F6S3WCCB.cjs');
|
|
130
136
|
|
|
131
137
|
|
|
132
|
-
var
|
|
138
|
+
var _chunkQRSA72B3cjs = require('./chunk-QRSA72B3.cjs');
|
|
133
139
|
|
|
134
140
|
|
|
135
141
|
var _chunkKSJ7JLR3cjs = require('./chunk-KSJ7JLR3.cjs');
|
|
@@ -153,7 +159,7 @@ var _chunkIKXGA2Z5cjs = require('./chunk-IKXGA2Z5.cjs');
|
|
|
153
159
|
var _chunk5O2JSQYAcjs = require('./chunk-5O2JSQYA.cjs');
|
|
154
160
|
|
|
155
161
|
|
|
156
|
-
var
|
|
162
|
+
var _chunk6LOWE2YIcjs = require('./chunk-6LOWE2YI.cjs');
|
|
157
163
|
|
|
158
164
|
|
|
159
165
|
var _chunk34PC72O7cjs = require('./chunk-34PC72O7.cjs');
|
|
@@ -177,7 +183,7 @@ var _chunkKLONGJCLcjs = require('./chunk-KLONGJCL.cjs');
|
|
|
177
183
|
var _chunkOWP7XBY2cjs = require('./chunk-OWP7XBY2.cjs');
|
|
178
184
|
|
|
179
185
|
|
|
180
|
-
var
|
|
186
|
+
var _chunk3GBWQWTPcjs = require('./chunk-3GBWQWTP.cjs');
|
|
181
187
|
|
|
182
188
|
|
|
183
189
|
var _chunkOG2KJAYDcjs = require('./chunk-OG2KJAYD.cjs');
|
|
@@ -201,10 +207,10 @@ var _chunk3YBBJT3Ycjs = require('./chunk-3YBBJT3Y.cjs');
|
|
|
201
207
|
var _chunkCAMALM35cjs = require('./chunk-CAMALM35.cjs');
|
|
202
208
|
|
|
203
209
|
|
|
204
|
-
var
|
|
210
|
+
var _chunkRHFUXHQNcjs = require('./chunk-RHFUXHQN.cjs');
|
|
205
211
|
|
|
206
212
|
|
|
207
|
-
var
|
|
213
|
+
var _chunkHLHML5EScjs = require('./chunk-HLHML5ES.cjs');
|
|
208
214
|
|
|
209
215
|
|
|
210
216
|
var _chunkMLG6NXI6cjs = require('./chunk-MLG6NXI6.cjs');
|
|
@@ -216,9 +222,6 @@ var _chunk5HCKC4HFcjs = require('./chunk-5HCKC4HF.cjs');
|
|
|
216
222
|
var _chunkM3HWE7KTcjs = require('./chunk-M3HWE7KT.cjs');
|
|
217
223
|
|
|
218
224
|
|
|
219
|
-
var _chunk3GBWQWTPcjs = require('./chunk-3GBWQWTP.cjs');
|
|
220
|
-
|
|
221
|
-
|
|
222
225
|
var _chunkQMLU5DSTcjs = require('./chunk-QMLU5DST.cjs');
|
|
223
226
|
|
|
224
227
|
// src/client.ts
|
|
@@ -300,11 +303,12 @@ var Delopay = class extends _chunkQMLU5DSTcjs.DelopayCore {
|
|
|
300
303
|
this.invoiceSettings = new (0, _chunkQYNRNDIYcjs.InvoiceSettingsResource)(request);
|
|
301
304
|
this.processorCosts = new (0, _chunk6YCDLSIUcjs.ProcessorCosts)(request);
|
|
302
305
|
this.checkoutMethods = new (0, _chunkUKLZAOLWcjs.CheckoutMethods)(request);
|
|
303
|
-
this.analytics = new (0,
|
|
306
|
+
this.analytics = new (0, _chunkHLHML5EScjs.Analytics)(request);
|
|
304
307
|
this.analyticsDashboard = new (0, _chunkMLG6NXI6cjs.AnalyticsDashboard)(request);
|
|
305
308
|
this.featureMatrix = new (0, _chunkIKXGA2Z5cjs.FeatureMatrix)(request);
|
|
306
309
|
this.cards = new (0, _chunk6LOWE2YIcjs.Cards)(request);
|
|
307
310
|
this.search = new (0, _chunk244VZFFOcjs.Search)(request);
|
|
311
|
+
this.aiTools = new (0, _chunkRHFUXHQNcjs.AiTools)(request);
|
|
308
312
|
}
|
|
309
313
|
};
|
|
310
314
|
/** Utility for verifying incoming webhook signatures (static, no instance needed). */
|
|
@@ -313,4 +317,4 @@ Delopay.webhooks = _chunkR4FE6K43cjs.Webhooks;
|
|
|
313
317
|
|
|
314
318
|
|
|
315
319
|
exports.Delopay = Delopay;
|
|
316
|
-
//# sourceMappingURL=chunk-
|
|
320
|
+
//# sourceMappingURL=chunk-5JJ65Z7J.cjs.map
|