@delopay/sdk 0.461.0 → 0.464.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.
Files changed (322) hide show
  1. package/dist/airwallexCard.cjs.map +1 -1
  2. package/dist/branding.cjs.map +1 -1
  3. package/dist/cardFormStyles.cjs.map +1 -1
  4. package/dist/checkoutSession.cjs +2 -2
  5. package/dist/checkoutSession.cjs.map +1 -1
  6. package/dist/checkoutSession.js +1 -1
  7. package/dist/chunk-244VZFFO.cjs.map +1 -1
  8. package/dist/chunk-2IJRBJXW.cjs.map +1 -1
  9. package/dist/{chunk-V7ACE3LA.js → chunk-2VNT2GKF.js} +2 -2
  10. package/dist/chunk-34PC72O7.cjs.map +1 -1
  11. package/dist/chunk-3GBWQWTP.cjs.map +1 -1
  12. package/dist/chunk-3YBBJT3Y.cjs.map +1 -1
  13. package/dist/{chunk-UUNRVLAS.js → chunk-3YRWCQXM.js} +5 -3
  14. package/dist/{chunk-UUNRVLAS.js.map → chunk-3YRWCQXM.js.map} +1 -1
  15. package/dist/chunk-44QBWVRS.cjs.map +1 -1
  16. package/dist/chunk-4EKAWNYI.cjs.map +1 -1
  17. package/dist/chunk-4LN4BR2T.cjs.map +1 -1
  18. package/dist/{chunk-Y6XIPSSK.js → chunk-4QXG4523.js} +4 -2
  19. package/dist/{chunk-Y6XIPSSK.js.map → chunk-4QXG4523.js.map} +1 -1
  20. package/dist/chunk-4T4XHPYN.cjs.map +1 -1
  21. package/dist/chunk-5CITBN33.cjs.map +1 -1
  22. package/dist/chunk-5HCKC4HF.cjs.map +1 -1
  23. package/dist/chunk-5O2JSQYA.cjs.map +1 -1
  24. package/dist/chunk-6EBY2KKL.cjs.map +1 -1
  25. package/dist/chunk-6LFOM6HV.cjs.map +1 -1
  26. package/dist/chunk-6LOWE2YI.cjs.map +1 -1
  27. package/dist/chunk-6LSG5Z4T.cjs.map +1 -1
  28. package/dist/chunk-6SU2MTN2.cjs.map +1 -1
  29. package/dist/chunk-6YCDLSIU.cjs.map +1 -1
  30. package/dist/chunk-75E5WNJG.cjs.map +1 -1
  31. package/dist/chunk-7JV6VVO7.cjs.map +1 -1
  32. package/dist/{chunk-F6V5A62N.js → chunk-7M26ZQVW.js} +3 -3
  33. package/dist/chunk-7QZCUXWB.cjs.map +1 -1
  34. package/dist/chunk-7VXF5D67.cjs.map +1 -1
  35. package/dist/chunk-ABWAYMN5.cjs.map +1 -1
  36. package/dist/chunk-ACZ2R47X.cjs.map +1 -1
  37. package/dist/chunk-AYUYJO3I.cjs.map +1 -1
  38. package/dist/chunk-BCA3TCGS.cjs.map +1 -1
  39. package/dist/chunk-BP6KDQ6I.cjs.map +1 -1
  40. package/dist/chunk-BRY3W7N3.cjs.map +1 -1
  41. package/dist/{chunk-MCBBXUKA.js → chunk-BUNJVWPX.js} +14 -5
  42. package/dist/chunk-BUNJVWPX.js.map +1 -0
  43. package/dist/chunk-CAMALM35.cjs.map +1 -1
  44. package/dist/chunk-CCN44NZJ.cjs.map +1 -1
  45. package/dist/chunk-CKKNFFKP.cjs.map +1 -1
  46. package/dist/chunk-CR3JBTP3.cjs.map +1 -1
  47. package/dist/chunk-DJASVBOJ.cjs.map +1 -1
  48. package/dist/chunk-EEB2HDYL.cjs.map +1 -1
  49. package/dist/chunk-ENPSUWTS.cjs.map +1 -1
  50. package/dist/chunk-EQ6P6ZND.cjs.map +1 -1
  51. package/dist/chunk-EXPWQBI3.cjs.map +1 -1
  52. package/dist/chunk-F3I5DOWV.cjs.map +1 -1
  53. package/dist/chunk-F46K5H3U.cjs.map +1 -1
  54. package/dist/chunk-F6S3WCCB.cjs.map +1 -1
  55. package/dist/chunk-FG7YBXJQ.cjs.map +1 -1
  56. package/dist/chunk-FQRC4NJG.cjs.map +1 -1
  57. package/dist/chunk-FYISDU2Y.cjs.map +1 -1
  58. package/dist/chunk-GG52SAHA.cjs.map +1 -1
  59. package/dist/chunk-GK5FWN4H.cjs.map +1 -1
  60. package/dist/chunk-GSQN5EOO.cjs.map +1 -1
  61. package/dist/chunk-GW7IHYXR.cjs.map +1 -1
  62. package/dist/chunk-HLHML5ES.cjs.map +1 -1
  63. package/dist/chunk-HLKFUOAQ.cjs.map +1 -1
  64. package/dist/chunk-HLYGHP6F.cjs.map +1 -1
  65. package/dist/chunk-HSJABE7X.cjs.map +1 -1
  66. package/dist/chunk-I2W7AO4B.cjs.map +1 -1
  67. package/dist/chunk-I2XGNALG.cjs.map +1 -1
  68. package/dist/{chunk-TJJLCFKO.cjs → chunk-IKLYLBTY.cjs} +5 -3
  69. package/dist/chunk-IKLYLBTY.cjs.map +1 -0
  70. package/dist/chunk-IKXGA2Z5.cjs.map +1 -1
  71. package/dist/chunk-IR2LFKKA.cjs.map +1 -1
  72. package/dist/chunk-J4ZB7MU4.cjs.map +1 -1
  73. package/dist/chunk-JPRSNCYP.cjs.map +1 -1
  74. package/dist/chunk-K5Q2H3VD.cjs.map +1 -1
  75. package/dist/chunk-KD5Y2YWK.cjs.map +1 -1
  76. package/dist/chunk-KJDMNF2T.cjs.map +1 -1
  77. package/dist/chunk-KLONGJCL.cjs.map +1 -1
  78. package/dist/chunk-KOB6MOAV.cjs.map +1 -1
  79. package/dist/chunk-KSJ7JLR3.cjs.map +1 -1
  80. package/dist/chunk-LJ2EG6JK.cjs.map +1 -1
  81. package/dist/chunk-LLYY4TCZ.cjs.map +1 -1
  82. package/dist/chunk-LYIBTVK6.cjs.map +1 -1
  83. package/dist/chunk-M3HWE7KT.cjs.map +1 -1
  84. package/dist/chunk-M3SJHFT4.cjs.map +1 -1
  85. package/dist/chunk-MCNDMK7F.cjs.map +1 -1
  86. package/dist/chunk-MLG6NXI6.cjs.map +1 -1
  87. package/dist/{chunk-O4OI44YL.cjs → chunk-MMBX2T4H.cjs} +5 -5
  88. package/dist/chunk-MMBX2T4H.cjs.map +1 -0
  89. package/dist/chunk-NFB3S2E6.cjs.map +1 -1
  90. package/dist/chunk-NYL3BNHR.cjs.map +1 -1
  91. package/dist/chunk-O4AYHLQX.cjs.map +1 -1
  92. package/dist/chunk-OAEKP665.cjs.map +1 -1
  93. package/dist/chunk-ODPNVNYE.cjs.map +1 -1
  94. package/dist/{chunk-I5LUU7ZR.cjs → chunk-OEXXMVCI.cjs} +3 -3
  95. package/dist/chunk-OEXXMVCI.cjs.map +1 -0
  96. package/dist/chunk-OG2KJAYD.cjs.map +1 -1
  97. package/dist/chunk-ORCK5GQ3.cjs.map +1 -1
  98. package/dist/chunk-OWP7XBY2.cjs.map +1 -1
  99. package/dist/chunk-OYZP6NF6.cjs.map +1 -1
  100. package/dist/chunk-P4UILJVU.cjs.map +1 -1
  101. package/dist/chunk-P6JLNQ6L.cjs.map +1 -1
  102. package/dist/chunk-P7DYLUUI.cjs.map +1 -1
  103. package/dist/chunk-PKAE6AQT.cjs.map +1 -1
  104. package/dist/chunk-Q7M7DO7M.cjs.map +1 -1
  105. package/dist/chunk-QKUWFMZP.cjs.map +1 -1
  106. package/dist/chunk-QRSA72B3.cjs.map +1 -1
  107. package/dist/{chunk-NCPCCAEI.cjs → chunk-QTKJIW3T.cjs} +6 -4
  108. package/dist/chunk-QTKJIW3T.cjs.map +1 -0
  109. package/dist/chunk-QYNRNDIY.cjs.map +1 -1
  110. package/dist/chunk-R4FE6K43.cjs.map +1 -1
  111. package/dist/chunk-R4GA6BVP.cjs.map +1 -1
  112. package/dist/chunk-R5VYSZ3Q.cjs.map +1 -1
  113. package/dist/chunk-RHFUXHQN.cjs.map +1 -1
  114. package/dist/chunk-RI42IDRR.cjs.map +1 -1
  115. package/dist/chunk-RSVLVW4L.cjs.map +1 -1
  116. package/dist/chunk-S77LQWYC.cjs.map +1 -1
  117. package/dist/chunk-S7SBNOGS.cjs.map +1 -1
  118. package/dist/chunk-TMAJE5P2.cjs.map +1 -1
  119. package/dist/{chunk-NKDUQ2BI.cjs → chunk-TMMTDTCP.cjs} +14 -5
  120. package/dist/chunk-TMMTDTCP.cjs.map +1 -0
  121. package/dist/chunk-TNIJ6OSH.cjs.map +1 -1
  122. package/dist/chunk-U3JK7NBG.cjs.map +1 -1
  123. package/dist/chunk-UGSM7RJ2.cjs.map +1 -1
  124. package/dist/chunk-UKLZAOLW.cjs.map +1 -1
  125. package/dist/chunk-V47G7P6L.cjs.map +1 -1
  126. package/dist/chunk-VH5A6SMU.cjs.map +1 -1
  127. package/dist/chunk-VHMH4QMY.cjs.map +1 -1
  128. package/dist/chunk-VYC7WUM5.cjs.map +1 -1
  129. package/dist/chunk-W457XUA6.cjs.map +1 -1
  130. package/dist/chunk-WHDI3TMP.cjs.map +1 -1
  131. package/dist/chunk-WITCPKNL.cjs.map +1 -1
  132. package/dist/chunk-WX6NP7UU.cjs.map +1 -1
  133. package/dist/chunk-XQLRIBVR.cjs.map +1 -1
  134. package/dist/chunk-Y7LSSRNJ.cjs.map +1 -1
  135. package/dist/chunk-YK3P5QNZ.cjs.map +1 -1
  136. package/dist/chunk-ZKPVUCQV.cjs.map +1 -1
  137. package/dist/chunk-ZUULK36E.cjs.map +1 -1
  138. package/dist/client.cjs +2 -2
  139. package/dist/client.cjs.map +1 -1
  140. package/dist/client.js +1 -1
  141. package/dist/core.cjs.map +1 -1
  142. package/dist/currencies.cjs.map +1 -1
  143. package/dist/enigmaCardForm.cjs.map +1 -1
  144. package/dist/error.cjs.map +1 -1
  145. package/dist/eventStream.cjs.map +1 -1
  146. package/dist/exportDownload.cjs.map +1 -1
  147. package/dist/feeProgram.cjs.map +1 -1
  148. package/dist/index.cjs +5 -5
  149. package/dist/index.cjs.map +1 -1
  150. package/dist/index.d.cts +1 -1
  151. package/dist/index.d.ts +1 -1
  152. package/dist/index.js +4 -4
  153. package/dist/internal/resources/admin.cjs.map +1 -1
  154. package/dist/internal/resources/admin.d.cts +1 -1
  155. package/dist/internal/resources/admin.d.ts +1 -1
  156. package/dist/internal/resources/adminBranding.cjs.map +1 -1
  157. package/dist/internal/resources/adminBranding.d.cts +1 -1
  158. package/dist/internal/resources/adminBranding.d.ts +1 -1
  159. package/dist/internal/resources/adminCheckoutDomains.cjs.map +1 -1
  160. package/dist/internal/resources/adminCheckoutDomains.d.cts +1 -1
  161. package/dist/internal/resources/adminCheckoutDomains.d.ts +1 -1
  162. package/dist/internal/resources/adminFeePlans.cjs.map +1 -1
  163. package/dist/internal/resources/adminFeePlans.d.cts +1 -1
  164. package/dist/internal/resources/adminFeePlans.d.ts +1 -1
  165. package/dist/internal/resources/adminFileScans.cjs.map +1 -1
  166. package/dist/internal/resources/adminFileScans.d.cts +1 -1
  167. package/dist/internal/resources/adminFileScans.d.ts +1 -1
  168. package/dist/internal/resources/adminIndustries.cjs.map +1 -1
  169. package/dist/internal/resources/adminIndustries.d.cts +1 -1
  170. package/dist/internal/resources/adminIndustries.d.ts +1 -1
  171. package/dist/internal/resources/adminLive.cjs.map +1 -1
  172. package/dist/internal/resources/adminNotices.cjs.map +1 -1
  173. package/dist/internal/resources/adminNotices.d.cts +1 -1
  174. package/dist/internal/resources/adminNotices.d.ts +1 -1
  175. package/dist/internal/resources/adminPortal.cjs +2 -2
  176. package/dist/internal/resources/adminPortal.cjs.map +1 -1
  177. package/dist/internal/resources/adminPortal.d.cts +1 -1
  178. package/dist/internal/resources/adminPortal.d.ts +1 -1
  179. package/dist/internal/resources/adminPortal.js +1 -1
  180. package/dist/internal/resources/adminSupport.cjs.map +1 -1
  181. package/dist/internal/resources/adminSupport.d.cts +1 -1
  182. package/dist/internal/resources/adminSupport.d.ts +1 -1
  183. package/dist/internal/resources/auditLogs.cjs.map +1 -1
  184. package/dist/internal/resources/auditLogs.d.cts +1 -1
  185. package/dist/internal/resources/auditLogs.d.ts +1 -1
  186. package/dist/internal/resources/cache.cjs.map +1 -1
  187. package/dist/internal/resources/cardIssuers.cjs.map +1 -1
  188. package/dist/internal/resources/cardIssuers.d.cts +1 -1
  189. package/dist/internal/resources/cardIssuers.d.ts +1 -1
  190. package/dist/internal/resources/configs.cjs.map +1 -1
  191. package/dist/internal/resources/connectorRestrictionRules.cjs.map +1 -1
  192. package/dist/internal/resources/connectorRestrictionRules.d.cts +1 -1
  193. package/dist/internal/resources/connectorRestrictionRules.d.ts +1 -1
  194. package/dist/internal/resources/connectorRestrictions.cjs.map +1 -1
  195. package/dist/internal/resources/connectorRestrictions.d.cts +1 -1
  196. package/dist/internal/resources/connectorRestrictions.d.ts +1 -1
  197. package/dist/internal/resources/diagnostic.cjs.map +1 -1
  198. package/dist/internal/resources/diagnostic.d.cts +1 -1
  199. package/dist/internal/resources/diagnostic.d.ts +1 -1
  200. package/dist/internal/resources/gsm.cjs.map +1 -1
  201. package/dist/internal/resources/gsm.d.cts +1 -1
  202. package/dist/internal/resources/gsm.d.ts +1 -1
  203. package/dist/internal/resources/nativeRenewals.cjs.map +1 -1
  204. package/dist/internal/resources/nativeRenewals.d.cts +1 -1
  205. package/dist/internal/resources/nativeRenewals.d.ts +1 -1
  206. package/dist/internal/resources/platformBilling.cjs.map +1 -1
  207. package/dist/internal/resources/platformBilling.d.cts +1 -1
  208. package/dist/internal/resources/platformBilling.d.ts +1 -1
  209. package/dist/internal/resources/platformFees.cjs.map +1 -1
  210. package/dist/internal/resources/platformMessageTemplates.cjs.map +1 -1
  211. package/dist/internal/resources/platformSettings.cjs.map +1 -1
  212. package/dist/internal/resources/platformSettings.d.cts +1 -1
  213. package/dist/internal/resources/platformSettings.d.ts +1 -1
  214. package/dist/internal.cjs +8 -8
  215. package/dist/internal.cjs.map +1 -1
  216. package/dist/internal.d.cts +2 -2
  217. package/dist/internal.d.ts +2 -2
  218. package/dist/internal.js +5 -5
  219. package/dist/listQuery.cjs.map +1 -1
  220. package/dist/panes.cjs.map +1 -1
  221. package/dist/paymentPresentation.cjs.map +1 -1
  222. package/dist/recordCounter.cjs.map +1 -1
  223. package/dist/resources/aiTools.cjs.map +1 -1
  224. package/dist/resources/analytics.cjs.map +1 -1
  225. package/dist/resources/analyticsDashboard.cjs.map +1 -1
  226. package/dist/resources/apiKeys.cjs.map +1 -1
  227. package/dist/resources/audit.cjs.map +1 -1
  228. package/dist/resources/authentication.cjs.map +1 -1
  229. package/dist/resources/availabilityOverrides.cjs.map +1 -1
  230. package/dist/resources/billing.cjs.map +1 -1
  231. package/dist/resources/buyerAccount.cjs.map +1 -1
  232. package/dist/resources/buyerBlocklist.cjs.map +1 -1
  233. package/dist/resources/buyerConversations.cjs.map +1 -1
  234. package/dist/resources/buyerEvidenceReviews.cjs.map +1 -1
  235. package/dist/resources/buyerPortal.cjs.map +1 -1
  236. package/dist/resources/cards.cjs.map +1 -1
  237. package/dist/resources/chargebackPrevention.cjs.map +1 -1
  238. package/dist/resources/checkoutDomains.cjs.map +1 -1
  239. package/dist/resources/checkoutMethods.cjs.map +1 -1
  240. package/dist/resources/checkoutRecovery.cjs.map +1 -1
  241. package/dist/resources/checkoutTemplates.cjs.map +1 -1
  242. package/dist/resources/connectors.cjs.map +1 -1
  243. package/dist/resources/contentEncryption.cjs.map +1 -1
  244. package/dist/resources/costRules.cjs.map +1 -1
  245. package/dist/resources/customers.cjs.map +1 -1
  246. package/dist/resources/deploymentBranding.cjs.map +1 -1
  247. package/dist/resources/disputes.cjs.map +1 -1
  248. package/dist/resources/ephemeralKeys.cjs.map +1 -1
  249. package/dist/resources/events.cjs.map +1 -1
  250. package/dist/resources/export.cjs.map +1 -1
  251. package/dist/resources/externalRecords.cjs.map +1 -1
  252. package/dist/resources/featureMatrix.cjs.map +1 -1
  253. package/dist/resources/fees.cjs.map +1 -1
  254. package/dist/resources/files.cjs.map +1 -1
  255. package/dist/resources/forex.cjs.map +1 -1
  256. package/dist/resources/identityVerifications.cjs.map +1 -1
  257. package/dist/resources/industries.cjs.map +1 -1
  258. package/dist/resources/invoiceSettings.cjs.map +1 -1
  259. package/dist/resources/invoices.cjs.map +1 -1
  260. package/dist/resources/live.cjs.map +1 -1
  261. package/dist/resources/mandates.cjs.map +1 -1
  262. package/dist/resources/merchantAccounts.cjs.map +1 -1
  263. package/dist/resources/messageTemplates.cjs.map +1 -1
  264. package/dist/resources/notices.cjs.map +1 -1
  265. package/dist/resources/operationLimits.cjs.map +1 -1
  266. package/dist/resources/paymentLinks.cjs.map +1 -1
  267. package/dist/resources/paymentMethods.cjs.map +1 -1
  268. package/dist/resources/payments.cjs +2 -2
  269. package/dist/resources/payments.cjs.map +1 -1
  270. package/dist/resources/payments.d.cts +2 -1
  271. package/dist/resources/payments.d.ts +2 -1
  272. package/dist/resources/payments.js +1 -1
  273. package/dist/resources/payoutDestinations.cjs.map +1 -1
  274. package/dist/resources/payouts.cjs.map +1 -1
  275. package/dist/resources/paypalDisputes.cjs.map +1 -1
  276. package/dist/resources/persons.cjs.map +1 -1
  277. package/dist/resources/poll.cjs.map +1 -1
  278. package/dist/resources/processorCosts.cjs.map +1 -1
  279. package/dist/resources/processorImports.cjs.map +1 -1
  280. package/dist/resources/products.cjs.map +1 -1
  281. package/dist/resources/profileAcquirers.cjs.map +1 -1
  282. package/dist/resources/profiles.cjs.map +1 -1
  283. package/dist/resources/projects.cjs.map +1 -1
  284. package/dist/resources/refunds.cjs.map +1 -1
  285. package/dist/resources/regions.cjs.map +1 -1
  286. package/dist/resources/relay.cjs.map +1 -1
  287. package/dist/resources/risk.cjs.map +1 -1
  288. package/dist/resources/routing.cjs.map +1 -1
  289. package/dist/resources/search.cjs.map +1 -1
  290. package/dist/resources/sellToRestrictions.cjs.map +1 -1
  291. package/dist/resources/settings.cjs.map +1 -1
  292. package/dist/resources/settlement.cjs +2 -2
  293. package/dist/resources/settlement.cjs.map +1 -1
  294. package/dist/resources/settlement.d.cts +4 -2
  295. package/dist/resources/settlement.d.ts +4 -2
  296. package/dist/resources/settlement.js +1 -1
  297. package/dist/resources/shopLabels.cjs.map +1 -1
  298. package/dist/resources/shops.cjs.map +1 -1
  299. package/dist/resources/stripeConnect.cjs.map +1 -1
  300. package/dist/resources/subscriptions.cjs.map +1 -1
  301. package/dist/resources/support.cjs.map +1 -1
  302. package/dist/resources/threeDsRules.cjs.map +1 -1
  303. package/dist/resources/users.cjs.map +1 -1
  304. package/dist/resources/vatRates.cjs.map +1 -1
  305. package/dist/resources/verification.cjs.map +1 -1
  306. package/dist/resources/webhooks.cjs.map +1 -1
  307. package/dist/resources/whopResolutionCases.cjs.map +1 -1
  308. package/dist/trustedOrigins.cjs.map +1 -1
  309. package/dist/{types-DOTyjOZD.d.ts → types-Bx0-pI7E.d.ts} +7 -1
  310. package/dist/{types-zLnhjw0u.d.cts → types-C8ojZumf.d.cts} +7 -1
  311. package/dist/types.cjs.map +1 -1
  312. package/dist/types.d.cts +354 -14
  313. package/dist/types.d.ts +354 -14
  314. package/package.json +1 -1
  315. package/dist/chunk-I5LUU7ZR.cjs.map +0 -1
  316. package/dist/chunk-MCBBXUKA.js.map +0 -1
  317. package/dist/chunk-NCPCCAEI.cjs.map +0 -1
  318. package/dist/chunk-NKDUQ2BI.cjs.map +0 -1
  319. package/dist/chunk-O4OI44YL.cjs.map +0 -1
  320. package/dist/chunk-TJJLCFKO.cjs.map +0 -1
  321. /package/dist/{chunk-V7ACE3LA.js.map → chunk-2VNT2GKF.js.map} +0 -0
  322. /package/dist/{chunk-F6V5A62N.js.map → chunk-7M26ZQVW.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"sources":["/tmp/delopay-sdk-publish/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,OAA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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":"/tmp/delopay-sdk-publish/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":["/tmp/sdkpub-w4-0464/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,EAAS;AAAA,EACX,CAAA;AAAA;AAAA;AAAA,EA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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":"/tmp/sdkpub-w4-0464/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":["/tmp/delopay-sdk-publish/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,EAAuB,CAAC,QAAA,EAAU,MAAA,EAAQ,MAAM,CAAA;AAItD,IAAM,qBAAA,EAAuB,CAAC,IA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A;AACA;AACA;AACA;AACF,2iDAAC","file":"/tmp/delopay-sdk-publish/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":["/tmp/sdkpub-w4-0464/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,mBAAA,EAAqB,CAAC,QAAA,EAAU,QAAQ,CAAA;AAI9C,IAAM,qBAAA,EAAuB,CAAC,QAAA,EAAU,MAAA,EAAQ,MAAM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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,2iDAAC","file":"/tmp/sdkpub-w4-0464/delopay-typescript-sdk/dist/chunk-5CITBN33.cjs","sourcesContent":[null,"// The Enigma Vault card form's settings.\n//\n// Enigma draws the card form in its own frame and takes a stylesheet built by\n// the router. The router builds it only from closed sets and hex colours, so\n// every property below is one of those. A template is a preset: choosing one\n// writes the properties in `ENIGMA_TEMPLATE_PRESETS` and nothing else, and\n// every property stays editable afterwards.\n//\n// What the router cannot put in the frame, the checkout draws under or over\n// it from the layout the router answers: the fields' names and hints in the\n// buyer's language, the card networks' marks, the security-code icon, the\n// skeleton and the \"Save card\" label. The motion settings are the checkout's\n// alone.\n\n/** How each field's box is drawn. `joined` is the four fields as one block. */\nexport const ENIGMA_FIELD_CHROMES = ['outlined', 'filled', 'underline', 'joined'] as const;\nexport type EnigmaFieldChrome = (typeof ENIGMA_FIELD_CHROMES)[number];\n\n/** Where a field's name is drawn. A joined form always names its fields inside. */\nexport const ENIGMA_LABEL_PLACEMENTS = ['above', 'inside'] as const;\nexport type EnigmaLabelPlacement = (typeof ENIGMA_LABEL_PLACEMENTS)[number];\n\n/** The colour of a name drawn above its field. */\nexport const ENIGMA_LABEL_TONES = ['strong', 'muted'] as const;\nexport type EnigmaLabelTone = (typeof ENIGMA_LABEL_TONES)[number];\n\n/**\n * Which full-width field comes first. `number` is Enigma's own order, so the\n * keyboard walks the fields as drawn; with `name` the Tab key skips back.\n */\nexport const ENIGMA_FIELD_ORDERS = ['number', 'name'] as const;\nexport type EnigmaFieldOrder = (typeof ENIGMA_FIELD_ORDERS)[number];\n\n/**\n * The Visa and Mastercard marks in the number field. `live` keeps only the\n * card's own network once it is known, where the stylesheet has room for it.\n */\nexport const ENIGMA_NETWORK_MARKS = ['live', 'static', 'hidden'] as const;\nexport type EnigmaNetworkMarks = (typeof ENIGMA_NETWORK_MARKS)[number];\n\nexport const ENIGMA_FOCUS_RINGS = ['strong', 'subtle'] as const;\nexport type EnigmaFocusRing = (typeof ENIGMA_FOCUS_RINGS)[number];\n\n/** How a field eases into its focused and invalid states. */\nexport const ENIGMA_FIELD_MOTIONS = ['smooth', 'slow', 'none'] as const;\nexport type EnigmaFieldMotion = (typeof ENIGMA_FIELD_MOTIONS)[number];\n\n/** A field's height in px. */\nexport const ENIGMA_FIELD_HEIGHTS = ['40', '44', '48', '52'] as const;\nexport type EnigmaFieldHeight = (typeof ENIGMA_FIELD_HEIGHTS)[number];\n\n/** The space under a row of fields in px. */\nexport const ENIGMA_ROW_GAPS = ['8', '12', '16'] as const;\nexport type EnigmaRowGap = (typeof ENIGMA_ROW_GAPS)[number];\n\n/** A field's corners: 0, 6, 8, 12 and 22px. */\nexport const ENIGMA_CORNERS = ['square', 'small', 'medium', 'large', 'pill'] as const;\nexport type EnigmaCorner = (typeof ENIGMA_CORNERS)[number];\n\n/** The form built from the properties, or the shop's own stylesheet. */\nexport const ENIGMA_STYLE_MODES = ['designed', 'custom'] as const;\nexport type EnigmaStyleMode = (typeof ENIGMA_STYLE_MODES)[number];\n\n/** How the closed form opens: in place, or growing out of one row. */\nexport const ENIGMA_OPENINGS = ['place', 'expand'] as const;\nexport type EnigmaOpening = (typeof ENIGMA_OPENINGS)[number];\n\n/** What answers the buyer's click on the closed form. */\nexport const ENIGMA_CLICK_FEEDBACK = ['both', 'ring', 'press', 'none'] as const;\nexport type EnigmaClickFeedback = (typeof ENIGMA_CLICK_FEEDBACK)[number];\n\n/** What the fields show while Enigma's form loads. */\nexport const ENIGMA_LOADING_STYLES = [\n 'shimmer',\n 'pulse',\n 'dim',\n 'line',\n 'spinner',\n 'none',\n] as const;\nexport type EnigmaLoadingStyle = (typeof ENIGMA_LOADING_STYLES)[number];\n\n/** How the loaded form appears. */\nexport const ENIGMA_REVEALS = ['fade', 'rise', 'wipe', 'none'] as const;\nexport type EnigmaReveal = (typeof ENIGMA_REVEALS)[number];\n\n/** What the Pay button does while the card is stored and charged. */\nexport const ENIGMA_PAY_FEEDBACK = ['spinner', 'press', 'none'] as const;\nexport type EnigmaPayFeedback = (typeof ENIGMA_PAY_FEEDBACK)[number];\n\n/** The templates, in the order the dashboard offers them. `soft` is the default. */\nexport const ENIGMA_TEMPLATES = [\n 'soft',\n 'fields',\n 'classic',\n 'compact',\n 'filled',\n 'underline',\n] as const;\nexport type EnigmaTemplate = (typeof ENIGMA_TEMPLATES)[number];\n\n/** The longest stylesheet a shop may save; the router refuses a longer one. */\nexport const ENIGMA_CUSTOM_CSS_MAX_LENGTH = 950;\n/** Bounds of the frame height a shop's own stylesheet may ask for. */\nexport const ENIGMA_CUSTOM_HEIGHT_MIN = 120;\nexport const ENIGMA_CUSTOM_HEIGHT_MAX = 600;\nexport const ENIGMA_CUSTOM_HEIGHT_DEFAULT = 260;\n\n/** The Enigma card form's settings, as they sit on `CheckoutBranding`. */\nexport interface EnigmaCardFormSettings {\n /** The template last applied. Only a label: the properties are what draws. */\n enigmaTemplate: EnigmaTemplate;\n enigmaStyleMode: EnigmaStyleMode;\n enigmaChrome: EnigmaFieldChrome;\n enigmaLabels: EnigmaLabelPlacement;\n enigmaLabelTone: EnigmaLabelTone;\n /** Hints in an empty field: `1234 1234 1234 1234`, `MM / YY`, `CVC`. */\n enigmaHints: boolean;\n /** A card icon at the end of the security code field. */\n enigmaCvcIcon: boolean;\n enigmaFieldOrder: EnigmaFieldOrder;\n enigmaMarks: EnigmaNetworkMarks;\n enigmaFocusRing: EnigmaFocusRing;\n enigmaFieldMotion: EnigmaFieldMotion;\n enigmaFieldHeight: EnigmaFieldHeight;\n enigmaRowGap: EnigmaRowGap;\n enigmaCorner: EnigmaCorner;\n /** The focus colour; empty follows the checkout's primary colour. */\n enigmaAccent: string;\n /** The border colour; empty follows the checkout's border colour. */\n enigmaBorder: string;\n /** A filled field's tint; empty mixes the checkout's text into its surface. */\n enigmaFill: string;\n /** The \"encrypted\" line under the Pay button. */\n enigmaTrustLine: boolean;\n /**\n * Open the form without a click. Enigma bills each form opened, so this\n * also bills for buyers who never pay. Off by default.\n */\n enigmaAutoOpen: boolean;\n enigmaOpening: EnigmaOpening;\n enigmaClickFeedback: EnigmaClickFeedback;\n enigmaLoading: EnigmaLoadingStyle;\n enigmaReveal: EnigmaReveal;\n enigmaPayFeedback: EnigmaPayFeedback;\n /** The shop's own stylesheet, used while `enigmaStyleMode` is `custom`. */\n enigmaCustomCss: string;\n /** The frame height that stylesheet needs, in px. */\n enigmaCustomHeight: number;\n}\n\n/** The properties a template sets. */\nexport type EnigmaTemplateProperties = Pick<\n EnigmaCardFormSettings,\n | 'enigmaChrome'\n | 'enigmaLabels'\n | 'enigmaLabelTone'\n | 'enigmaHints'\n | 'enigmaCvcIcon'\n | 'enigmaFieldOrder'\n | 'enigmaMarks'\n | 'enigmaFocusRing'\n | 'enigmaFieldHeight'\n | 'enigmaRowGap'\n | 'enigmaCorner'\n>;\n\n/** What each template writes. Colours, motion and behaviour are never touched. */\nexport const ENIGMA_TEMPLATE_PRESETS: Record<EnigmaTemplate, EnigmaTemplateProperties> = {\n soft: {\n enigmaChrome: 'outlined',\n enigmaLabels: 'above',\n enigmaLabelTone: 'strong',\n enigmaHints: true,\n enigmaCvcIcon: true,\n enigmaFieldOrder: 'number',\n enigmaMarks: 'live',\n enigmaFocusRing: 'strong',\n enigmaFieldHeight: '44',\n enigmaRowGap: '12',\n enigmaCorner: 'medium',\n },\n fields: {\n enigmaChrome: 'outlined',\n enigmaLabels: 'above',\n enigmaLabelTone: 'muted',\n enigmaHints: true,\n enigmaCvcIcon: true,\n enigmaFieldOrder: 'number',\n enigmaMarks: 'live',\n enigmaFocusRing: 'strong',\n enigmaFieldHeight: '48',\n enigmaRowGap: '12',\n enigmaCorner: 'small',\n },\n classic: {\n enigmaChrome: 'outlined',\n enigmaLabels: 'above',\n enigmaLabelTone: 'strong',\n enigmaHints: false,\n enigmaCvcIcon: true,\n enigmaFieldOrder: 'number',\n enigmaMarks: 'live',\n enigmaFocusRing: 'strong',\n enigmaFieldHeight: '44',\n enigmaRowGap: '12',\n enigmaCorner: 'medium',\n },\n compact: {\n enigmaChrome: 'joined',\n enigmaLabels: 'inside',\n enigmaLabelTone: 'muted',\n enigmaHints: false,\n enigmaCvcIcon: true,\n enigmaFieldOrder: 'number',\n enigmaMarks: 'live',\n enigmaFocusRing: 'strong',\n enigmaFieldHeight: '48',\n enigmaRowGap: '12',\n enigmaCorner: 'medium',\n },\n filled: {\n enigmaChrome: 'filled',\n enigmaLabels: 'above',\n enigmaLabelTone: 'strong',\n enigmaHints: false,\n enigmaCvcIcon: true,\n enigmaFieldOrder: 'number',\n enigmaMarks: 'live',\n enigmaFocusRing: 'strong',\n enigmaFieldHeight: '44',\n enigmaRowGap: '12',\n enigmaCorner: 'medium',\n },\n underline: {\n enigmaChrome: 'underline',\n enigmaLabels: 'above',\n enigmaLabelTone: 'muted',\n enigmaHints: false,\n enigmaCvcIcon: true,\n enigmaFieldOrder: 'number',\n enigmaMarks: 'live',\n enigmaFocusRing: 'strong',\n enigmaFieldHeight: '40',\n enigmaRowGap: '16',\n enigmaCorner: 'square',\n },\n};\n\n/** Every Enigma setting's default: the Stripe-like template, opened on click. */\nexport const DEFAULT_ENIGMA_CARD_FORM: EnigmaCardFormSettings = {\n enigmaTemplate: 'soft',\n enigmaStyleMode: 'designed',\n ...ENIGMA_TEMPLATE_PRESETS.soft,\n enigmaFieldMotion: 'smooth',\n enigmaAccent: '',\n enigmaBorder: '',\n enigmaFill: '',\n enigmaTrustLine: true,\n enigmaAutoOpen: false,\n enigmaOpening: 'place',\n enigmaClickFeedback: 'both',\n enigmaLoading: 'shimmer',\n enigmaReveal: 'fade',\n enigmaPayFeedback: 'spinner',\n enigmaCustomCss: '',\n enigmaCustomHeight: ENIGMA_CUSTOM_HEIGHT_DEFAULT,\n};\n\n/** The patch choosing `template` writes: its properties and its name. */\nexport function applyEnigmaTemplate(template: EnigmaTemplate): Partial<EnigmaCardFormSettings> {\n return { enigmaTemplate: template, ...ENIGMA_TEMPLATE_PRESETS[template] };\n}\n\n/** The properties of `settings` that differ from its template's, by key. */\nexport function enigmaTemplateChanges(\n settings: EnigmaCardFormSettings,\n): (keyof EnigmaTemplateProperties)[] {\n const preset = ENIGMA_TEMPLATE_PRESETS[settings.enigmaTemplate];\n return (Object.keys(preset) as (keyof EnigmaTemplateProperties)[]).filter(\n (key) => settings[key] !== preset[key],\n );\n}\n\n/** Whether a field's name sits inside it: always on a joined form. */\nexport function enigmaNamesInside(settings: EnigmaCardFormSettings): boolean {\n return settings.enigmaChrome === 'joined' || settings.enigmaLabels === 'inside';\n}\n\nconst PSEUDO_CLASSES = [\n 'focus',\n 'focus-visible',\n 'focus-within',\n 'hover',\n 'checked',\n 'disabled',\n 'invalid',\n 'valid',\n 'placeholder-shown',\n 'first-child',\n 'last-child',\n];\nconst HIDEABLE = ['p', 'h1', '#header', '#headertext', '.timer', '#timer'];\nconst PROPERTIES = [\n 'color',\n 'caret-color',\n 'accent-color',\n '-webkit-text-fill-color',\n 'background',\n 'background-color',\n 'border',\n 'border-top',\n 'border-right',\n 'border-bottom',\n 'border-left',\n 'border-color',\n 'border-width',\n 'border-style',\n 'border-top-color',\n 'border-right-color',\n 'border-bottom-color',\n 'border-left-color',\n 'border-top-width',\n 'border-right-width',\n 'border-bottom-width',\n 'border-left-width',\n 'border-radius',\n 'border-top-left-radius',\n 'border-top-right-radius',\n 'border-bottom-left-radius',\n 'border-bottom-right-radius',\n 'box-shadow',\n 'outline',\n 'outline-color',\n 'outline-offset',\n 'font',\n 'font-family',\n 'font-size',\n 'font-weight',\n 'font-style',\n 'letter-spacing',\n 'line-height',\n 'text-align',\n 'text-transform',\n 'padding',\n 'padding-top',\n 'padding-right',\n 'padding-bottom',\n 'padding-left',\n 'margin',\n 'margin-top',\n 'margin-right',\n 'margin-bottom',\n 'margin-left',\n 'height',\n 'min-height',\n 'width',\n 'min-width',\n 'max-width',\n 'display',\n 'flex-wrap',\n 'gap',\n 'transition',\n 'box-sizing',\n 'top',\n];\n\n/** A length of at least `min` px (`em`/`rem` at 16px). */\nfunction lengthAtLeast(value: string, min: number): boolean {\n const match = /^(-?[0-9.]+)(px|em|rem)$/.exec(value);\n if (!match) return false;\n const number = Number(match[1]) * (match[2] === 'px' ? 1 : 16);\n return Number.isFinite(number) && number >= min;\n}\n\nfunction spacing(value: string): boolean {\n return value\n .split(' ')\n .every(\n (part) =>\n part === '0' || part === 'auto' || (lengthAtLeast(part, 0) && !lengthAtLeast(part, 48.5)),\n );\n}\n\nfunction width(value: string): boolean {\n if (value === 'auto') return true;\n if (value.endsWith('%')) return Number(value.slice(0, -1)) >= 20;\n const calc = /^calc\\(([0-9.]+)% - ([0-9.]+)px\\)$/.exec(value);\n if (calc) return Number(calc[1]) >= 20 && Number(calc[2]) <= 48;\n if (value.startsWith('calc(')) return false;\n return lengthAtLeast(value, 40);\n}\n\nfunction opaqueColour(value: string): boolean {\n if (value.startsWith('#')) return /^#([0-9a-f]{3}|[0-9a-f]{6})$/.test(value);\n if (value.startsWith('rgb('))\n return value.endsWith(')') && value.split(',').length === 3 && !value.includes('/');\n return value !== 'transparent' && /^[a-z]+$/.test(value);\n}\n\nfunction declarationProblem(selector: string, declaration: string): EnigmaCustomCssProblem | null {\n const at = declaration.indexOf(':');\n if (at < 0) return null;\n const property = declaration.slice(0, at).trim();\n const raw = declaration.slice(at + 1).trim();\n const important = raw.endsWith('!important');\n const value = raw.replace(/!important$/, '').trim();\n if (!PROPERTIES.includes(property)) return 'property';\n if (['var(', 'env(', 'attr('].some((fn) => value.includes(fn))) return 'variable';\n let ok = true;\n switch (property) {\n case 'display': {\n if (important) return 'important_display';\n const hideable = selector.split(',').every((one) => {\n const subject = one.split(/[ >]/).pop() ?? one;\n return HIDEABLE.includes(subject.split(':')[0] ?? subject);\n });\n ok =\n ['block', 'flex', 'grid', 'inline', 'inline-block', 'inline-flex'].includes(value) ||\n (value === 'none' && hideable);\n break;\n }\n case 'margin':\n case 'margin-top':\n case 'margin-right':\n case 'margin-bottom':\n case 'margin-left':\n case 'padding':\n case 'padding-top':\n case 'padding-right':\n case 'padding-bottom':\n case 'padding-left':\n ok = spacing(value);\n break;\n case 'height':\n case 'min-height':\n ok = value === 'auto' || lengthAtLeast(value, 20);\n break;\n case 'width':\n case 'min-width':\n case 'max-width':\n ok = width(value);\n break;\n case 'font-size':\n ok = lengthAtLeast(value, 12);\n break;\n case 'font': {\n const size = value.split(/[ /]/).find((part) => part.endsWith('px') || part.endsWith('em'));\n ok = size !== undefined && lengthAtLeast(size, 12);\n break;\n }\n case 'line-height':\n ok = value === 'normal' || Number(value) >= 1 || lengthAtLeast(value, 12);\n break;\n case 'color':\n case 'caret-color':\n ok = opaqueColour(value);\n break;\n case 'top':\n ok = value === '0' || (/^-?[0-9.]+px$/.test(value) && Math.abs(parseFloat(value)) <= 4);\n break;\n case '-webkit-text-fill-color':\n // Every branch of the selector list must be an empty field: CSS applies\n // the declaration to each branch.\n ok =\n selector\n .split(',')\n .every((one) => (one.split(/[ >]/).pop() ?? '').includes(':placeholder-shown')) ||\n opaqueColour(value);\n break;\n }\n return ok ? null : 'hides_field';\n}\n\nfunction selectorProblem(selector: string): EnigmaCustomCssProblem | null {\n if (!selector || !/^[a-z0-9\\-_#.:,> ]+$/.test(selector) || selector.includes('::'))\n return 'selector';\n const pseudoOk = selector\n .split(':')\n .slice(1)\n .every((after) => PSEUDO_CLASSES.includes(after.split(/[ >,.#]/)[0] ?? after));\n return pseudoOk ? null : 'selector';\n}\n\n/**\n * Why the router would refuse `css` as the shop's own stylesheet, or `null`\n * when it would keep it: the same bounded grammar as the router's check.\n * Only names, ids, classes,\n * spaces, `>` and a few states as selectors; only colours, borders, type,\n * spacing, sizes and simple layout as properties, at values that keep every\n * card field and the \"Save card\" box visible and in place. No quotes. A\n * declaration sits in a rule, never directly in `@media` or outside any block;\n * no rule is nested in another, and no brace or `;` sits inside brackets.\n * The router decides.\n */\nexport function enigmaCustomCssProblem(css: string): EnigmaCustomCssProblem | null {\n if (!css.trim()) return null;\n if (css.length > ENIGMA_CUSTOM_CSS_MAX_LENGTH) return 'too_long';\n // eslint-disable-next-line no-control-regex\n if (/[^\\x20-\\x7e\\n\\r\\t]/.test(css)) return 'not_ascii';\n if (css.includes('<')) return 'markup';\n if (css.includes('\\\\')) return 'escape';\n // A browser keeps `{`, `}` and `;` inside a string as text, and this walk\n // does not; one quoted brace would end the rule here but not there.\n if (/[\"']/.test(css)) return 'quote';\n const lower = css.toLowerCase();\n if (lower.includes('/*')) return 'comment';\n if (\n ['url(', 'image-set(', 'image(', 'element(', 'cross-fade(', 'src(', 'data:'].some((needle) =>\n lower.includes(needle),\n )\n ) {\n return 'loads_resource';\n }\n if (\n ['expression(', 'javascript:', 'behavior', '-moz-binding'].some((needle) =>\n lower.includes(needle),\n )\n ) {\n return 'script';\n }\n if (/@(?!media)/.test(lower)) return 'at_rule';\n\n // Each block's own selector and declarations; a rule inside `@media` is a\n // block of its own. Nothing opens inside a rule: with CSS nesting a browser\n // applies a nested `@media` or rule's declarations to the outer selector,\n // which this walk would not see. A browser also keeps `{`, `}` and `;`\n // inside `(...)` or `[...]` as text, so none may appear there.\n const compact = lower.split(/\\s+/).filter(Boolean).join(' ');\n const blocks: { selector: string; media: boolean }[] = [];\n const brackets: string[] = [];\n let text = '';\n for (const ch of compact) {\n if ((ch === '{' || ch === '}' || ch === ';') && brackets.length > 0) return 'misplaced';\n if (ch === '(' || ch === '[') {\n brackets.push(ch);\n text += ch;\n } else if (ch === ')' || ch === ']') {\n if (brackets.pop() !== (ch === ')' ? '(' : '[')) return 'unbalanced';\n text += ch;\n } else if (ch === '{') {\n const outer = blocks[blocks.length - 1];\n if (outer && !outer.media) return 'misplaced';\n const prelude = text.trim();\n text = '';\n const media = prelude.startsWith('@media');\n if (!media) {\n const problem = selectorProblem(prelude.replace(/, /g, ','));\n if (problem) return problem;\n }\n blocks.push({ selector: prelude, media });\n } else if (ch === '}' || ch === ';') {\n const declaration = text;\n text = '';\n const top = blocks[blocks.length - 1];\n if (!top) {\n if (ch === '}') return 'unbalanced';\n if (declaration.trim()) return 'misplaced';\n continue;\n }\n if (declaration.trim()) {\n if (top.media) return 'misplaced';\n const problem = declarationProblem(top.selector.replace(/, /g, ','), declaration);\n if (problem) return problem;\n }\n if (ch === '}') blocks.pop();\n } else {\n text += ch;\n }\n }\n if (blocks.length > 0 || brackets.length > 0) return 'unbalanced';\n return text.trim() ? 'misplaced' : null;\n}\n\nexport type EnigmaCustomCssProblem =\n | 'too_long'\n | 'not_ascii'\n | 'markup'\n | 'escape'\n | 'quote'\n | 'comment'\n | 'loads_resource'\n | 'script'\n | 'at_rule'\n | 'selector'\n | 'property'\n | 'variable'\n | 'important_display'\n | 'hides_field'\n | 'unbalanced'\n | 'misplaced';\n\n/** A corner's px, as the router draws it. */\nexport function enigmaCornerPx(corner: EnigmaCorner): number {\n return { square: 0, small: 6, medium: 8, large: 12, pill: 22 }[corner];\n}\n\nconst HEX = /^#[0-9a-fA-F]{3}([0-9a-fA-F]{3})?$/;\n\nfunction pick<T extends string>(value: unknown, allowed: readonly T[], fallback: T): T {\n return typeof value === 'string' && (allowed as readonly string[]).includes(value)\n ? (value as T)\n : fallback;\n}\n\nfunction bool(value: unknown, fallback: boolean): boolean {\n if (value === true || value === 'true') return true;\n if (value === false || value === 'false') return false;\n return fallback;\n}\n\nfunction hexOrEmpty(value: unknown): string {\n return typeof value === 'string' && HEX.test(value.trim()) ? value.trim() : '';\n}\n\n/**\n * The Enigma settings stored in `source`: the strings of\n * `sdk_ui_rules.branding`, or the values of a branding export. Anything\n * unreadable takes the default, so a malformed value never costs a checkout.\n */\nexport function decodeEnigmaCardForm(source: Record<string, unknown>): EnigmaCardFormSettings {\n const d = DEFAULT_ENIGMA_CARD_FORM;\n const height = Number(source['enigmaCustomHeight']);\n const css = typeof source['enigmaCustomCss'] === 'string' ? source['enigmaCustomCss'] : '';\n return {\n enigmaTemplate: pick(source['enigmaTemplate'], ENIGMA_TEMPLATES, d.enigmaTemplate),\n enigmaStyleMode: pick(source['enigmaStyleMode'], ENIGMA_STYLE_MODES, d.enigmaStyleMode),\n enigmaChrome: pick(source['enigmaChrome'], ENIGMA_FIELD_CHROMES, d.enigmaChrome),\n enigmaLabels: pick(source['enigmaLabels'], ENIGMA_LABEL_PLACEMENTS, d.enigmaLabels),\n enigmaLabelTone: pick(source['enigmaLabelTone'], ENIGMA_LABEL_TONES, d.enigmaLabelTone),\n enigmaHints: bool(source['enigmaHints'], d.enigmaHints),\n enigmaCvcIcon: bool(source['enigmaCvcIcon'], d.enigmaCvcIcon),\n enigmaFieldOrder: pick(source['enigmaFieldOrder'], ENIGMA_FIELD_ORDERS, d.enigmaFieldOrder),\n enigmaMarks: pick(source['enigmaMarks'], ENIGMA_NETWORK_MARKS, d.enigmaMarks),\n enigmaFocusRing: pick(source['enigmaFocusRing'], ENIGMA_FOCUS_RINGS, d.enigmaFocusRing),\n enigmaFieldMotion: pick(source['enigmaFieldMotion'], ENIGMA_FIELD_MOTIONS, d.enigmaFieldMotion),\n enigmaFieldHeight: pick(\n String(source['enigmaFieldHeight'] ?? ''),\n ENIGMA_FIELD_HEIGHTS,\n d.enigmaFieldHeight,\n ),\n enigmaRowGap: pick(String(source['enigmaRowGap'] ?? ''), ENIGMA_ROW_GAPS, d.enigmaRowGap),\n enigmaCorner: pick(source['enigmaCorner'], ENIGMA_CORNERS, d.enigmaCorner),\n enigmaAccent: hexOrEmpty(source['enigmaAccent']),\n enigmaBorder: hexOrEmpty(source['enigmaBorder']),\n enigmaFill: hexOrEmpty(source['enigmaFill']),\n enigmaTrustLine: bool(source['enigmaTrustLine'], d.enigmaTrustLine),\n enigmaAutoOpen: bool(source['enigmaAutoOpen'], d.enigmaAutoOpen),\n enigmaOpening: pick(source['enigmaOpening'], ENIGMA_OPENINGS, d.enigmaOpening),\n enigmaClickFeedback: pick(\n source['enigmaClickFeedback'],\n ENIGMA_CLICK_FEEDBACK,\n d.enigmaClickFeedback,\n ),\n enigmaLoading: pick(source['enigmaLoading'], ENIGMA_LOADING_STYLES, d.enigmaLoading),\n enigmaReveal: pick(source['enigmaReveal'], ENIGMA_REVEALS, d.enigmaReveal),\n enigmaPayFeedback: pick(source['enigmaPayFeedback'], ENIGMA_PAY_FEEDBACK, d.enigmaPayFeedback),\n enigmaCustomCss: css.slice(0, ENIGMA_CUSTOM_CSS_MAX_LENGTH),\n enigmaCustomHeight:\n Number.isInteger(height) &&\n height >= ENIGMA_CUSTOM_HEIGHT_MIN &&\n height <= ENIGMA_CUSTOM_HEIGHT_MAX\n ? height\n : d.enigmaCustomHeight,\n };\n}\n\n/**\n * The strings `sdk_ui_rules.branding` stores for `settings`. Only what\n * differs from the default is written, so a shop that never opens the Enigma\n * section stores nothing, and a later change of a default reaches it.\n */\nexport function encodeEnigmaCardForm(settings: EnigmaCardFormSettings): Record<string, string> {\n const out: Record<string, string> = {};\n for (const key of Object.keys(DEFAULT_ENIGMA_CARD_FORM) as (keyof EnigmaCardFormSettings)[]) {\n const value = settings[key];\n if (value === DEFAULT_ENIGMA_CARD_FORM[key]) continue;\n const text = String(value);\n if (key === 'enigmaCustomCss' && !text.trim()) continue;\n out[key] = text;\n }\n return out;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["/tmp/delopay-sdk-publish/dist/chunk-5HCKC4HF.cjs","../src/resources/apiKeys.ts"],"names":[],"mappings":"AAAA;ACYO,IAAM,QAAA,EAAN,MAAc;AAAA,EACnB,WAAA,CAA6B,OAAA,EAAoB;AAApB,IAAA,IAAA,CAAA,QAAA,EAAA,OAAA;AAAA,EAAqB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAclD,MAAM,MAAA,CAAO,UAAA,EAAoB,MAAA,EAA4D;AAC3F,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,MAAA,EAAQ,CAAA,UAAA,EAAa,kBAAA,CAAmB,UAAU,CAAC,CAAA,CAAA;AACzE,EAAA;AAAA;AAAA;AA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AC+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":"/tmp/delopay-sdk-publish/dist/chunk-5HCKC4HF.cjs","sourcesContent":[null,"import type {\n ApiKeyCreateRequest,\n ApiKeyCreateResponse,\n ApiKeyListConstraints,\n ApiKeyResponse,\n ApiKeyUpdateRequest,\n ApiKeyRevokeResponse,\n ApiKeyTemplatesResponse,\n} from '../types';\nimport type { RequestFn } from '../client';\n\n/** Create and manage API keys for a merchant account. */\nexport class ApiKeys {\n constructor(private readonly request: RequestFn) {}\n\n /**\n * Create a new API key for a merchant.\n *\n * @param merchantId - The merchant account ID.\n * @param params - Key creation parameters (name, expiry, etc.).\n * @returns The newly created key including the plaintext secret (shown once only).\n *\n * @example\n * ```typescript\n * const { key_value } = await delopay.apiKeys.create('merch_123', { name: 'Production key' });\n * ```\n */\n async create(merchantId: string, params: ApiKeyCreateRequest): Promise<ApiKeyCreateResponse> {\n return this.request('POST', `/api-keys/${encodeURIComponent(merchantId)}`, { body: params });\n }\n\n /**\n * Retrieve metadata about an API key (does not return the plaintext secret).\n *\n * @param merchantId - The merchant account ID.\n * @param keyId - The API key ID.\n * @returns The API key metadata.\n */\n async retrieve(merchantId: string, keyId: string): Promise<ApiKeyResponse> {\n return this.request(\n 'GET',\n `/api-keys/${encodeURIComponent(merchantId)}/${encodeURIComponent(keyId)}`,\n );\n }\n\n /**\n * Update an API key's name or expiry.\n *\n * @param merchantId - The merchant account ID.\n * @param keyId - The API key ID to update.\n * @param params - Fields to update.\n * @returns The updated API key metadata.\n */\n async update(\n merchantId: string,\n keyId: string,\n params: ApiKeyUpdateRequest,\n ): Promise<ApiKeyResponse> {\n return this.request(\n 'POST',\n `/api-keys/${encodeURIComponent(merchantId)}/${encodeURIComponent(keyId)}`,\n { body: params },\n );\n }\n\n /**\n * Revoke an API key, immediately invalidating it.\n *\n * @param merchantId - The merchant account ID.\n * @param keyId - The API key ID to revoke.\n * @returns Revocation confirmation.\n */\n async revoke(merchantId: string, keyId: string): Promise<ApiKeyRevokeResponse> {\n return this.request(\n 'DELETE',\n `/api-keys/${encodeURIComponent(merchantId)}/${encodeURIComponent(keyId)}`,\n );\n }\n\n /**\n * Replace an API key's secret. The key keeps its id, name, scope, shop,\n * origin rule, rate cap and expiry. The old secret stops working\n * immediately, with no grace period, so deploy the new one as part of the\n * same change. Refused with `IR_16` (HTTP 400) while the deployment runs\n * partial authentication; create a new key and revoke the old one instead.\n * `POST /api-keys/{merchantId}/{keyId}/rotate`\n *\n * @param merchantId - The merchant account ID.\n * @param keyId - The API key ID to rotate.\n * @returns The key with its new plaintext secret (shown once only).\n *\n * @example\n * ```typescript\n * const { api_key } = await delopay.apiKeys.rotate('merch_123', 'key_abc');\n * ```\n */\n async rotate(merchantId: string, keyId: string): Promise<ApiKeyCreateResponse> {\n return this.request(\n 'POST',\n `/api-keys/${encodeURIComponent(merchantId)}/${encodeURIComponent(keyId)}/rotate`,\n );\n }\n\n /**\n * List all API keys for a merchant.\n *\n * @param merchantId - The merchant account ID.\n * @returns Array of API key metadata objects.\n */\n async list(merchantId: string): Promise<ApiKeyResponse[]> {\n return this.request('GET', `/api-keys/${encodeURIComponent(merchantId)}/list`);\n }\n\n /**\n * The key templates the caller may use, with the values each prefills.\n * Create the key with `create`; the template itself is not sent.\n * `GET /api-keys/{merchantId}/templates`\n *\n * @param merchantId - The merchant account ID.\n * @returns The templates, each limited to what the caller may grant.\n *\n * @example\n * ```typescript\n * const { templates } = await delopay.apiKeys.listTemplates('merch_123');\n * const readOnly = templates.find((t) => t.id === 'ai_agent_read_only');\n * ```\n */\n async listTemplates(merchantId: string): Promise<ApiKeyTemplatesResponse> {\n return this.request('GET', `/api-keys/${encodeURIComponent(merchantId)}/templates`);\n }\n\n // --- Profile-scoped (shop-level) API keys ---------------------------------\n //\n // JWT-authenticated routes under `/account/{merchantId}/profile/api-keys`.\n // The caller's shop (business profile) comes from the JWT, never from the\n // request, so a shop-scoped user can only mint/list/manage keys pinned to\n // their own shop. Requires a backend with profile-scoped API key support.\n\n /**\n * Create a new API key pinned to the caller's shop (business profile).\n * `POST /account/{merchantId}/profile/api-keys`\n *\n * @param merchantId - The merchant account ID.\n * @param params - Key creation parameters (name, expiry, etc.).\n * @returns The newly created key including the plaintext secret (shown once\n * only) and the `profile_id` it is pinned to.\n *\n * @example\n * ```typescript\n * const { api_key } = await delopay.apiKeys.createByProfile('merch_123', {\n * name: 'Shop key',\n * expiration: 'never',\n * });\n * ```\n */\n async createByProfile(\n merchantId: string,\n params: ApiKeyCreateRequest,\n ): Promise<ApiKeyCreateResponse> {\n return this.request('POST', `/account/${encodeURIComponent(merchantId)}/profile/api-keys`, {\n body: params,\n });\n }\n\n /**\n * List API keys pinned to the caller's shop (business profile) only.\n * `GET /account/{merchantId}/profile/api-keys`\n *\n * @param merchantId - The merchant account ID.\n * @param params - Optional pagination constraints (`limit`, `skip`).\n * @returns Array of API key metadata objects belonging to the caller's shop.\n */\n async listByProfile(\n merchantId: string,\n params?: ApiKeyListConstraints,\n ): Promise<ApiKeyResponse[]> {\n return this.request('GET', `/account/${encodeURIComponent(merchantId)}/profile/api-keys`, {\n query: params as Record<string, number | null | undefined>,\n });\n }\n\n /**\n * Retrieve metadata about a shop-pinned API key (does not return the\n * plaintext secret). `GET /account/{merchantId}/profile/api-keys/{keyId}`\n *\n * @param merchantId - The merchant account ID.\n * @param keyId - The API key ID.\n * @returns The API key metadata.\n */\n async retrieveByProfile(merchantId: string, keyId: string): Promise<ApiKeyResponse> {\n return this.request(\n 'GET',\n `/account/${encodeURIComponent(merchantId)}/profile/api-keys/${encodeURIComponent(keyId)}`,\n );\n }\n\n /**\n * Update a shop-pinned API key's name, description, or expiry.\n * `POST /account/{merchantId}/profile/api-keys/{keyId}`\n *\n * @param merchantId - The merchant account ID.\n * @param keyId - The API key ID to update.\n * @param params - Fields to update.\n * @returns The updated API key metadata.\n */\n async updateByProfile(\n merchantId: string,\n keyId: string,\n params: ApiKeyUpdateRequest,\n ): Promise<ApiKeyResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(merchantId)}/profile/api-keys/${encodeURIComponent(keyId)}`,\n { body: params },\n );\n }\n\n /**\n * Revoke a shop-pinned API key, immediately invalidating it.\n * `DELETE /account/{merchantId}/profile/api-keys/{keyId}`\n *\n * @param merchantId - The merchant account ID.\n * @param keyId - The API key ID to revoke.\n * @returns Revocation confirmation.\n */\n async revokeByProfile(merchantId: string, keyId: string): Promise<ApiKeyRevokeResponse> {\n return this.request(\n 'DELETE',\n `/account/${encodeURIComponent(merchantId)}/profile/api-keys/${encodeURIComponent(keyId)}`,\n );\n }\n\n /**\n * Replace the secret of an API key pinned to the caller's shop. The key\n * keeps its id, name, scope, origin rule, rate cap and expiry. The old\n * secret stops working immediately, with no grace period.\n * `POST /account/{merchantId}/profile/api-keys/{keyId}/rotate`\n *\n * @param merchantId - The merchant account ID.\n * @param keyId - The API key ID to rotate.\n * @returns The key with its new plaintext secret (shown once only).\n */\n async rotateByProfile(merchantId: string, keyId: string): Promise<ApiKeyCreateResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(merchantId)}/profile/api-keys/${encodeURIComponent(keyId)}/rotate`,\n );\n }\n}\n"]}
1
+ {"version":3,"sources":["/tmp/sdkpub-w4-0464/delopay-typescript-sdk/dist/chunk-5HCKC4HF.cjs","../src/resources/apiKeys.ts"],"names":[],"mappings":"AAAA;ACYO,IAAM,QAAA,EAAN,MAAc;AAAA,EACnB,WAAA,CAA6B,OAAA,EAAoB;AAApB,IAAA,IAAA,CAAA,QAA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;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":"/tmp/sdkpub-w4-0464/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 +1 @@
1
- {"version":3,"sources":["/tmp/delopay-sdk-publish/dist/chunk-5O2JSQYA.cjs","../src/resources/fees.ts"],"names":[],"mappings":"AAAA;ACwBO,IAAM,KAAA,EAAN,MAAW;AAAA,EAIhB,WAAA,CAA6B,OAAA,EAAoB;AAApB,IAAA,IAAA,CAAA,QAAA,EAAA,OAAA;AAC3B,IAAA,IAAA,CAAK,MAAA,EAAQ,IAAI,eAAA,CAAgB,OAAO,CAAA;AAAA,EAC1C;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,MAAM,MAAA,CAAO,MAAA,EAAkC,UAAA,EAAkD;AAC/F,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,MAAA,EAAQ,gBAAA,EAAkB;AAAA,MAC5C,IAAA,EAAM,MAAA;AAAA,MACN,KAAA,EAAO,EAAE,WAAA,EAAa,WAAW;AAAA,IACnC,CAAC,CAAA;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,MAAM,IAAA,CAAK,UAAA,EAAoD;AAC7D,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,KAAA,EAAO,qBAAA,EAAuB;AAAA,MAChD,KAAA,EAAO,EAAE,WAAA,EAAa,WAAW;AAAA,IACnC,CAAC,CAAA;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,MAAM,MAAA,CACJ,KAAA,EACA,MAAA,EACA,OAAA,EAC8B;AAC9B,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,KAAA,EAAO,CAAA,eAAA,EAAkB,kBAAA,CAAmB,KAAK,CAAC,CAAA,CAAA;AAC9D,MAAA;AACH,MAAA;AACJ,IAAA;AACH,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAO0D,EAAA;AACW,IAAA;AACrE,EAAA;AACF;AAQ6B;AACsB,EAAA;AAApB,IAAA;AAAqB,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAS+C,EAAA;AACvB,IAAA;AACrB,IAAA;AACjD,MAAA;AACiC,MAAA;AAClC,IAAA;AACH,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASgG,EAAA;AAC3C,IAAA;AACO,MAAA;AACzD,IAAA;AACH,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAWoE,EAAA;AACb,IAAA;AACK,MAAA;AACzD,IAAA;AACH,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUiG,EAAA;AACnC,IAAA;AACpD,MAAA;AAC2B,MAAA;AAClC,IAAA;AACH,EAAA;AACF;ADzC2E;AACA;AACA;AACA;AACA","file":"/tmp/delopay-sdk-publish/dist/chunk-5O2JSQYA.cjs","sourcesContent":[null,"import type {\n FeeRulePreviewRequest,\n FeeRulePreviewResponse,\n FeeScheduleCreateRequest,\n FeeScheduleResponse,\n FeeScheduleUpdateRequest,\n PlatformFeeRuleInput,\n PlatformFeeRuleResponse,\n PlatformFeeRuleRequest,\n} from '../types';\nimport type { RequestExtras, RequestFn } from '../client';\n\n/**\n * Merchant-scoped fee schedules. Each schedule optionally targets a\n * specific shop (via `shop_id`). Merchants can CRUD their own fee\n * overrides; platform-wide fee programs are administered by Delopay and\n * not exposed here.\n *\n * `fees.rules` manages the merchant-owned Euclid fee-rule program, which takes\n * precedence over the flat schedules above. A program is scoped either to one\n * shop (`profile_id`) or merchant-wide; a shop-scoped program wins for that\n * shop, otherwise the merchant-wide one applies. Build the program with the\n * `feeProgram()` helper.\n */\nexport class Fees {\n /** Merchant-owned Euclid fee-rule program (`/merchant-fees/rules`). */\n readonly rules: FeeRulesManager;\n\n constructor(private readonly request: RequestFn) {\n this.rules = new FeeRulesManager(request);\n }\n\n /**\n * Create a merchant-scoped fee schedule (optionally per-shop).\n *\n * @param params - Fee schedule parameters.\n * @param merchantId - The merchant account ID.\n */\n async create(params: FeeScheduleCreateRequest, merchantId: string): Promise<FeeScheduleResponse> {\n return this.request('POST', '/merchant-fees', {\n body: params,\n query: { merchant_id: merchantId },\n });\n }\n\n /**\n * List the merchant's own fee schedules.\n *\n * @param merchantId - The merchant account ID.\n */\n async list(merchantId: string): Promise<FeeScheduleResponse[]> {\n return this.request('GET', '/merchant-fees/list', {\n query: { merchant_id: merchantId },\n });\n }\n\n /**\n * Update a merchant-scoped fee schedule.\n *\n * @param feeId - The fee schedule ID.\n * @param params - Fields to update.\n */\n async update(\n feeId: string,\n params: FeeScheduleUpdateRequest,\n options?: RequestExtras,\n ): Promise<FeeScheduleResponse> {\n return this.request('PUT', `/merchant-fees/${encodeURIComponent(feeId)}`, {\n body: params,\n ...options,\n });\n }\n\n /**\n * Delete a merchant-scoped fee schedule.\n *\n * @param feeId - The fee schedule ID.\n */\n async delete(feeId: string): Promise<FeeScheduleResponse> {\n return this.request('DELETE', `/merchant-fees/${encodeURIComponent(feeId)}`);\n }\n}\n\n/**\n * Manages a merchant's Euclid fee-rule programs (merchant-wide or per-shop, one\n * active program per scope). Build the `algorithm` with `feeProgram()`. The SDK\n * injects `fee_owner: 'merchant'`; set `profile_id` on the input to scope a\n * program to a shop.\n */\nexport class FeeRulesManager {\n constructor(private readonly request: RequestFn) {}\n\n /**\n * Create or replace the merchant's fee-rule program (a new active version;\n * the previous version is deactivated server-side).\n *\n * @param params - The program plus optional name / shop scope / validity window.\n * @param merchantId - The merchant account ID.\n */\n async upsert(params: PlatformFeeRuleInput, merchantId: string): Promise<PlatformFeeRuleResponse> {\n const body: PlatformFeeRuleRequest = { ...params, fee_owner: 'merchant' };\n return this.request('PUT', '/merchant-fees/rules', {\n body,\n query: { merchant_id: merchantId },\n });\n }\n\n /**\n * Retrieve the active fee-rule program for a scope, or `null` if none.\n *\n * @param merchantId - The merchant account ID.\n * @param profileId - Optional shop (`profile_id`) scope. Omit for the\n * merchant-wide program; pass a shop id to get that shop's program.\n */\n async retrieve(merchantId: string, profileId?: string): Promise<PlatformFeeRuleResponse | null> {\n return this.request('GET', '/merchant-fees/rules', {\n query: { merchant_id: merchantId, profile_id: profileId },\n });\n }\n\n /**\n * Deactivate a fee-rule program (falls back to the flat fee schedules /\n * volume tier). Idempotent.\n *\n * @param merchantId - The merchant account ID.\n * @param profileId - Optional shop (`profile_id`) scope. Omit to target the\n * merchant-wide program; pass a shop id to delete only that shop's program\n * (other shops' programs are left intact).\n */\n async delete(merchantId: string, profileId?: string): Promise<void> {\n await this.request('DELETE', '/merchant-fees/rules', {\n query: { merchant_id: merchantId, profile_id: profileId },\n });\n }\n\n /**\n * Dry-run a candidate fee-rule program against a sample transaction.\n * Returns the matched rule name, whether it fell through, and the computed fee.\n * Does not persist anything.\n *\n * @param input - Candidate program + sample transaction fields.\n * @param merchantId - The merchant account ID.\n */\n async preview(input: FeeRulePreviewRequest, merchantId: string): Promise<FeeRulePreviewResponse> {\n return this.request('POST', '/merchant-fees/rules/preview', {\n body: input,\n query: { merchant_id: merchantId },\n });\n }\n}\n"]}
1
+ {"version":3,"sources":["/tmp/sdkpub-w4-0464/delopay-typescript-sdk/dist/chunk-5O2JSQYA.cjs","../src/resources/fees.ts"],"names":[],"mappings":"AAAA;ACwBO,IAAM,KAAA,EAAN,MAAW;AAAA,EAIhB,WAAA,CAA6B,OAAA,EAAoB;AAApB,IAAA,IAAA,CAAA,QAAA,EAAA,OAAA;AAC3B,IAAA,IAAA,CAAK,MAAA,EAAQ,IAAI,eAAA,CAAgB,OAAO,CAAA;AAAA,EAC1C;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,MAAM,MAAA,CAAO,MAAA,EAAkC,UAAA,EAAkD;AAC/F,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,MAAA,EAAQ,gBAAA,EAAkB;AAAA,MAC5C,IAAA,EAAM,MAAA;AAAA,MACN,KA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ourcesContent":[null,"import type {\n FeeRulePreviewRequest,\n FeeRulePreviewResponse,\n FeeScheduleCreateRequest,\n FeeScheduleResponse,\n FeeScheduleUpdateRequest,\n PlatformFeeRuleInput,\n PlatformFeeRuleResponse,\n PlatformFeeRuleRequest,\n} from '../types';\nimport type { RequestExtras, RequestFn } from '../client';\n\n/**\n * Merchant-scoped fee schedules. Each schedule optionally targets a\n * specific shop (via `shop_id`). Merchants can CRUD their own fee\n * overrides; platform-wide fee programs are administered by Delopay and\n * not exposed here.\n *\n * `fees.rules` manages the merchant-owned Euclid fee-rule program, which takes\n * precedence over the flat schedules above. A program is scoped either to one\n * shop (`profile_id`) or merchant-wide; a shop-scoped program wins for that\n * shop, otherwise the merchant-wide one applies. Build the program with the\n * `feeProgram()` helper.\n */\nexport class Fees {\n /** Merchant-owned Euclid fee-rule program (`/merchant-fees/rules`). */\n readonly rules: FeeRulesManager;\n\n constructor(private readonly request: RequestFn) {\n this.rules = new FeeRulesManager(request);\n }\n\n /**\n * Create a merchant-scoped fee schedule (optionally per-shop).\n *\n * @param params - Fee schedule parameters.\n * @param merchantId - The merchant account ID.\n */\n async create(params: FeeScheduleCreateRequest, merchantId: string): Promise<FeeScheduleResponse> {\n return this.request('POST', '/merchant-fees', {\n body: params,\n query: { merchant_id: merchantId },\n });\n }\n\n /**\n * List the merchant's own fee schedules.\n *\n * @param merchantId - The merchant account ID.\n */\n async list(merchantId: string): Promise<FeeScheduleResponse[]> {\n return this.request('GET', '/merchant-fees/list', {\n query: { merchant_id: merchantId },\n });\n }\n\n /**\n * Update a merchant-scoped fee schedule.\n *\n * @param feeId - The fee schedule ID.\n * @param params - Fields to update.\n */\n async update(\n feeId: string,\n params: FeeScheduleUpdateRequest,\n options?: RequestExtras,\n ): Promise<FeeScheduleResponse> {\n return this.request('PUT', `/merchant-fees/${encodeURIComponent(feeId)}`, {\n body: params,\n ...options,\n });\n }\n\n /**\n * Delete a merchant-scoped fee schedule.\n *\n * @param feeId - The fee schedule ID.\n */\n async delete(feeId: string): Promise<FeeScheduleResponse> {\n return this.request('DELETE', `/merchant-fees/${encodeURIComponent(feeId)}`);\n }\n}\n\n/**\n * Manages a merchant's Euclid fee-rule programs (merchant-wide or per-shop, one\n * active program per scope). Build the `algorithm` with `feeProgram()`. The SDK\n * injects `fee_owner: 'merchant'`; set `profile_id` on the input to scope a\n * program to a shop.\n */\nexport class FeeRulesManager {\n constructor(private readonly request: RequestFn) {}\n\n /**\n * Create or replace the merchant's fee-rule program (a new active version;\n * the previous version is deactivated server-side).\n *\n * @param params - The program plus optional name / shop scope / validity window.\n * @param merchantId - The merchant account ID.\n */\n async upsert(params: PlatformFeeRuleInput, merchantId: string): Promise<PlatformFeeRuleResponse> {\n const body: PlatformFeeRuleRequest = { ...params, fee_owner: 'merchant' };\n return this.request('PUT', '/merchant-fees/rules', {\n body,\n query: { merchant_id: merchantId },\n });\n }\n\n /**\n * Retrieve the active fee-rule program for a scope, or `null` if none.\n *\n * @param merchantId - The merchant account ID.\n * @param profileId - Optional shop (`profile_id`) scope. Omit for the\n * merchant-wide program; pass a shop id to get that shop's program.\n */\n async retrieve(merchantId: string, profileId?: string): Promise<PlatformFeeRuleResponse | null> {\n return this.request('GET', '/merchant-fees/rules', {\n query: { merchant_id: merchantId, profile_id: profileId },\n });\n }\n\n /**\n * Deactivate a fee-rule program (falls back to the flat fee schedules /\n * volume tier). Idempotent.\n *\n * @param merchantId - The merchant account ID.\n * @param profileId - Optional shop (`profile_id`) scope. Omit to target the\n * merchant-wide program; pass a shop id to delete only that shop's program\n * (other shops' programs are left intact).\n */\n async delete(merchantId: string, profileId?: string): Promise<void> {\n await this.request('DELETE', '/merchant-fees/rules', {\n query: { merchant_id: merchantId, profile_id: profileId },\n });\n }\n\n /**\n * Dry-run a candidate fee-rule program against a sample transaction.\n * Returns the matched rule name, whether it fell through, and the computed fee.\n * Does not persist anything.\n *\n * @param input - Candidate program + sample transaction fields.\n * @param merchantId - The merchant account ID.\n */\n async preview(input: FeeRulePreviewRequest, merchantId: string): Promise<FeeRulePreviewResponse> {\n return this.request('POST', '/merchant-fees/rules/preview', {\n body: input,\n query: { merchant_id: merchantId },\n });\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["/tmp/delopay-sdk-publish/dist/chunk-6EBY2KKL.cjs","../src/resources/merchantAccounts.ts"],"names":[],"mappings":"AAAA;ACOO,IAAM,iBAAA,EAAN,MAAuB;AAAA,EAC5B,WAAA,CAA6B,OAAA,EAAoB;AAApB,IAAA,IAAA,CAAA,QAAA,EAAA,OAAA;AAAA,EAAqB;AAAA,EAElD,MAAM,MAAA,CAAO,MAAA,EAAwE;AACnF,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,MAAA,EAAQ,WAAA,EAAa,EAAE,IAAA,EAAM,OAAO,CAAC,CAAA;AAAA,EAC3D;AAAA,EAEA,MAAM,QAAA,CAAS,SAAA,EAAqD;AAClE,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,KAAA,EAAO,CAAA,UAAA,EAAa,kBAAA,CAAmB,SAAS,CAAC,CAAA,CAAA;AACvE,EAAA;AAMoC,EAAA;AACoC,IAAA;AAC9D,MAAA;AACH,MAAA;AACJ,IAAA;AACH,EAAA;AAEkE,EAAA;AACF,IAAA;AAChE,EAAA;AAAA;AAAA;AAKiD,EAAA;AACJ,IAAA;AAC7C,EAAA;AAAA;AAGoE,EAAA;AACI,IAAA;AACxE,EAAA;AAAA;AAGuE,EAAA;AACA,IAAA;AACvE,EAAA;AAAA;AAGsF,EAAA;AAClB,IAAA;AACpE,EAAA;AACF;ADhB0E;AACA;AACA;AACA","file":"/tmp/delopay-sdk-publish/dist/chunk-6EBY2KKL.cjs","sourcesContent":[null,"import type {\n MerchantAccountCreateRequest,\n MerchantAccountResponse,\n MerchantAccountUpdateRequest,\n} from '../types';\nimport type { RequestExtras, RequestFn } from '../client';\n\nexport class MerchantAccounts {\n constructor(private readonly request: RequestFn) {}\n\n async create(params: MerchantAccountCreateRequest): Promise<MerchantAccountResponse> {\n return this.request('POST', '/accounts', { body: params });\n }\n\n async retrieve(accountId: string): Promise<MerchantAccountResponse> {\n return this.request('GET', `/accounts/${encodeURIComponent(accountId)}`);\n }\n\n async update(\n accountId: string,\n params: MerchantAccountUpdateRequest,\n options?: RequestExtras,\n ): Promise<MerchantAccountResponse> {\n return this.request('POST', `/accounts/${encodeURIComponent(accountId)}`, {\n body: params,\n ...options,\n });\n }\n\n async delete(accountId: string): Promise<MerchantAccountResponse> {\n return this.request('DELETE', `/accounts/${encodeURIComponent(accountId)}`);\n }\n\n // --- Advanced operations (Task 4.9) ---\n\n /** List all merchant accounts. `GET /accounts/list` */\n async list(): Promise<MerchantAccountResponse[]> {\n return this.request('GET', '/accounts/list');\n }\n\n /** Toggle key-value store for a merchant. `POST /accounts/{accountId}/kv` */\n async toggleKv(accountId: string): Promise<Record<string, unknown>> {\n return this.request('POST', `/accounts/${encodeURIComponent(accountId)}/kv`);\n }\n\n /** Get KV status for a merchant. `GET /accounts/{accountId}/kv` */\n async getKvStatus(accountId: string): Promise<Record<string, unknown>> {\n return this.request('GET', `/accounts/${encodeURIComponent(accountId)}/kv`);\n }\n\n /** Transfer keys between merchants. `POST /accounts/transfer` */\n async transferKeys(params: Record<string, unknown>): Promise<Record<string, unknown>> {\n return this.request('POST', '/accounts/transfer', { body: params });\n }\n}\n"]}
1
+ {"version":3,"sources":["/tmp/sdkpub-w4-0464/delopay-typescript-sdk/dist/chunk-6EBY2KKL.cjs","../src/resources/merchantAccounts.ts"],"names":[],"mappings":"AAAA;ACOO,IAAM,iBAAA,EAAN,MAAuB;AAAA,EAC5B,WAAA,CAA6B,OAAA,EAAoB;AAApB,IAAA,IAAA,CAAA,QAAA,EAAA,OAAA;AAAA,EAAqB;AAAA,EAElD,MAAM,MAAA,CAAO,MAAA,EAAwE;AACnF,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,MAAA,EAAQ,WAAA,EAAa,EAAE,IAAA,EAAM,OAAO,CAAC,CAAA;AAAA,EAC3D;AAAA,EAEA,MAAM,QAAA,CAAS,SAAA,EAAqD;AAClE,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,KAAA,EAAO,CAAA,UAAA,EAAa,kBAAA,CAAmB,SAAS,CAAC,CAAA,CAAA;AACvE,EAAA;AAMoC,EAAA;AACoC,IAAA;AAC9D,MAAA;AACH,MAAA;AACJ,IAAA;AACH,EAAA;AAEkE,EAAA;AACF,IAAA;AAChE,EAAA;AAAA;AAAA;AAKiD,EAAA;AACJ,IAAA;AAC7C,EAAA;AAAA;AAGoE,EAAA;AACI,IAAA;AACxE,EAAA;AAAA;AAGuE,EAAA;AACA,IAAA;AACvE,EAAA;AAAA;AAGsF,EAAA;AAClB,IAAA;AACpE,EAAA;AACF;ADhB0E;AACA;AACA;AACA","file":"/tmp/sdkpub-w4-0464/delopay-typescript-sdk/dist/chunk-6EBY2KKL.cjs","sourcesContent":[null,"import type {\n MerchantAccountCreateRequest,\n MerchantAccountResponse,\n MerchantAccountUpdateRequest,\n} from '../types';\nimport type { RequestExtras, RequestFn } from '../client';\n\nexport class MerchantAccounts {\n constructor(private readonly request: RequestFn) {}\n\n async create(params: MerchantAccountCreateRequest): Promise<MerchantAccountResponse> {\n return this.request('POST', '/accounts', { body: params });\n }\n\n async retrieve(accountId: string): Promise<MerchantAccountResponse> {\n return this.request('GET', `/accounts/${encodeURIComponent(accountId)}`);\n }\n\n async update(\n accountId: string,\n params: MerchantAccountUpdateRequest,\n options?: RequestExtras,\n ): Promise<MerchantAccountResponse> {\n return this.request('POST', `/accounts/${encodeURIComponent(accountId)}`, {\n body: params,\n ...options,\n });\n }\n\n async delete(accountId: string): Promise<MerchantAccountResponse> {\n return this.request('DELETE', `/accounts/${encodeURIComponent(accountId)}`);\n }\n\n // --- Advanced operations (Task 4.9) ---\n\n /** List all merchant accounts. `GET /accounts/list` */\n async list(): Promise<MerchantAccountResponse[]> {\n return this.request('GET', '/accounts/list');\n }\n\n /** Toggle key-value store for a merchant. `POST /accounts/{accountId}/kv` */\n async toggleKv(accountId: string): Promise<Record<string, unknown>> {\n return this.request('POST', `/accounts/${encodeURIComponent(accountId)}/kv`);\n }\n\n /** Get KV status for a merchant. `GET /accounts/{accountId}/kv` */\n async getKvStatus(accountId: string): Promise<Record<string, unknown>> {\n return this.request('GET', `/accounts/${encodeURIComponent(accountId)}/kv`);\n }\n\n /** Transfer keys between merchants. `POST /accounts/transfer` */\n async transferKeys(params: Record<string, unknown>): Promise<Record<string, unknown>> {\n return this.request('POST', '/accounts/transfer', { body: params });\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["/tmp/delopay-sdk-publish/dist/chunk-6LFOM6HV.cjs","../src/resources/checkoutTemplates.ts"],"names":[],"mappings":"AAAA;AC2BO,IAAM,kBAAA,EAAN,MAAwB;AAAA,EAC7B,WAAA,CAA6B,OAAA,EAAoB;AAApB,IAAA,IAAA,CAAA,QAAA,EAAA,OAAA;AAAA,EAAqB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOlD,MAAM,IAAA,CAAK,UAAA,EAA2D;AACpE,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,KAAA,EAAO,CAAA,oBAAA,EAAuB,kBAAA,CAAmB,UAAU,CAAC,CAAA,CAAA;AAClF,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUqC,EAAA;AAC8C,IAAA;AACzE,MAAA;AACP,IAAA;AACH,EAAA;AAAA;AAG0F,EAAA;AAC5E,IAAA;AACV,MAAA;AAC4E,MAAA;AAC9E,IAAA;AACF,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAWqC,EAAA;AACvB,IAAA;AACV,MAAA;AAC4E,MAAA;AAC7D,MAAA;AACjB,IAAA;AACF,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAWqC,EAAA;AACiC,IAAA;AACtE,EAAA;AAAA;AAAA;AAAA;AAAA;AAMwF,EAAA;AAC1E,IAAA;AACV,MAAA;AAC4E,MAAA;AAC9E,IAAA;AACF,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAa0C,EAAA;AAC5B,IAAA;AACV,MAAA;AAC4E,MAAA;AAC5E,MAAA;AACQ,QAAA;AACR,MAAA;AACF,IAAA;AACF,EAAA;AAAA;AAAA;AAAA;AAAA;AAUqC,EAAA;AACvB,IAAA;AACV,MAAA;AAC4E,MAAA;AAC9E,IAAA;AACF,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAW0C,EAAA;AAC5B,IAAA;AACV,MAAA;AAC4E,MAAA;AAC5E,MAAA;AACQ,QAAA;AACR,MAAA;AACF,IAAA;AACF,EAAA;AAAA;AAAA;AAAA;AAAA;AAM6F,EAAA;AAC/E,IAAA;AACV,MAAA;AAC+D,MAAA;AACjE,IAAA;AACF,EAAA;AACF;ADxDqF;AACA;AACA;AACA","file":"/tmp/delopay-sdk-publish/dist/chunk-6LFOM6HV.cjs","sourcesContent":[null,"import type {\n CheckoutTemplateApplyRequest,\n CheckoutTemplateApplyResponse,\n CheckoutTemplateAssignRequest,\n CheckoutTemplateCreateRequest,\n CheckoutTemplateListResponse,\n CheckoutTemplateOfShopResponse,\n CheckoutTemplateResponse,\n CheckoutTemplateUpdateRequest,\n} from '../types';\nimport type { RequestFn } from '../client';\n\n/**\n * Checkout templates: a shop's payment methods, behaviour and smart routing,\n * defined once for the merchant and used in many shops.\n *\n * A template is edited where a shop is: its own profile (`template_id`) has a\n * checkout layout, behaviour settings, routing configurations and connector\n * accounts, written with `checkoutMethods`, `shops.updateCheckoutBranding`,\n * `routing` and the connector shop methods. Its changes reach the shops on it\n * when `apply()` runs. While a shop is on a template, its own payment methods,\n * behaviour and routing cannot be changed; its appearance stays its own.\n *\n * Every method but `ofShop()` needs a merchant-level role that sees every\n * connector and payment; `create()`, `assign()` and `apply()` also need\n * routing and connector write.\n */\nexport class CheckoutTemplates {\n constructor(private readonly request: RequestFn) {}\n\n /**\n * The merchant's templates, each with the shops on it and whether each\n * runs the template's current settings.\n * `GET /checkout-templates/{merchantId}`\n */\n async list(merchantId: string): Promise<CheckoutTemplateListResponse> {\n return this.request('GET', `/checkout-templates/${encodeURIComponent(merchantId)}`);\n }\n\n /**\n * Create a template, empty or copied from a shop's current settings. The\n * shop copied from is not changed.\n * `POST /checkout-templates/{merchantId}`\n */\n async create(\n merchantId: string,\n params: CheckoutTemplateCreateRequest,\n ): Promise<CheckoutTemplateResponse> {\n return this.request('POST', `/checkout-templates/${encodeURIComponent(merchantId)}`, {\n body: params,\n });\n }\n\n /** `GET /checkout-templates/{merchantId}/{templateId}` */\n async retrieve(merchantId: string, templateId: string): Promise<CheckoutTemplateResponse> {\n return this.request(\n 'GET',\n `/checkout-templates/${encodeURIComponent(merchantId)}/${encodeURIComponent(templateId)}`,\n );\n }\n\n /**\n * Update a template: rename it (a name another template of the merchant\n * holds is refused), make it the merchant's default, or both.\n * `POST /checkout-templates/{merchantId}/{templateId}`\n */\n async rename(\n merchantId: string,\n templateId: string,\n params: CheckoutTemplateUpdateRequest,\n ): Promise<CheckoutTemplateResponse> {\n return this.request(\n 'POST',\n `/checkout-templates/${encodeURIComponent(merchantId)}/${encodeURIComponent(templateId)}`,\n { body: params },\n );\n }\n\n /**\n * Make the template the merchant's default, taking the mark off the one that\n * had it, or stop it being the default. No shop changes either way.\n * `POST /checkout-templates/{merchantId}/{templateId}`\n */\n async setDefault(\n merchantId: string,\n templateId: string,\n isDefault: boolean,\n ): Promise<CheckoutTemplateResponse> {\n return this.rename(merchantId, templateId, { is_default: isDefault });\n }\n\n /**\n * Delete a template. Refused while a shop is on it.\n * `DELETE /checkout-templates/{merchantId}/{templateId}`\n */\n async delete(merchantId: string, templateId: string): Promise<CheckoutTemplateResponse> {\n return this.request(\n 'DELETE',\n `/checkout-templates/${encodeURIComponent(merchantId)}/${encodeURIComponent(templateId)}`,\n );\n }\n\n /**\n * Put shops on the template and copy its settings into them; a shop on\n * another template moves. Each shop is reported on its own: one with\n * `blockers` is left unchanged. `dry_run` changes nothing and reports what\n * would change.\n * `POST /checkout-templates/{merchantId}/{templateId}/shops`\n */\n async assign(\n merchantId: string,\n templateId: string,\n params: CheckoutTemplateAssignRequest,\n ): Promise<CheckoutTemplateApplyResponse> {\n return this.request(\n 'POST',\n `/checkout-templates/${encodeURIComponent(merchantId)}/${encodeURIComponent(templateId)}/shops`,\n {\n body: params,\n },\n );\n }\n\n /**\n * Take a shop off the template. It keeps every setting it has, as its own.\n * `DELETE /checkout-templates/{merchantId}/{templateId}/shops/{profileId}`\n */\n async unassign(\n merchantId: string,\n templateId: string,\n profileId: string,\n ): Promise<CheckoutTemplateResponse> {\n return this.request(\n 'DELETE',\n `/checkout-templates/${encodeURIComponent(merchantId)}/${encodeURIComponent(templateId)}/shops/${encodeURIComponent(profileId)}`,\n );\n }\n\n /**\n * Copy the template's current settings into its shops, all or the ones\n * named.\n * `POST /checkout-templates/{merchantId}/{templateId}/apply`\n */\n async apply(\n merchantId: string,\n templateId: string,\n params: CheckoutTemplateApplyRequest = {},\n ): Promise<CheckoutTemplateApplyResponse> {\n return this.request(\n 'POST',\n `/checkout-templates/${encodeURIComponent(merchantId)}/${encodeURIComponent(templateId)}/apply`,\n {\n body: params,\n },\n );\n }\n\n /**\n * The template a shop is on, if any. Readable by the shop's own members.\n * `GET /checkout-templates/{merchantId}/shops/{profileId}`\n */\n async ofShop(merchantId: string, profileId: string): Promise<CheckoutTemplateOfShopResponse> {\n return this.request(\n 'GET',\n `/checkout-templates/${encodeURIComponent(merchantId)}/shops/${encodeURIComponent(profileId)}`,\n );\n }\n}\n"]}
1
+ {"version":3,"sources":["/tmp/sdkpub-w4-0464/delopay-typescript-sdk/dist/chunk-6LFOM6HV.cjs","../src/resources/checkoutTemplates.ts"],"names":[],"mappings":"AAAA;AC2BO,IAAM,kBAAA,EAAN,MAAwB;AAAA,EAC7B,WAAA,CAA6B,OAAA,EAAoB;AAApB,IAAA,IAAA,CAAA,QAAA,EAAA,OAAA;AAAA,EAAqB;AAAA;A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"import type {\n CheckoutTemplateApplyRequest,\n CheckoutTemplateApplyResponse,\n CheckoutTemplateAssignRequest,\n CheckoutTemplateCreateRequest,\n CheckoutTemplateListResponse,\n CheckoutTemplateOfShopResponse,\n CheckoutTemplateResponse,\n CheckoutTemplateUpdateRequest,\n} from '../types';\nimport type { RequestFn } from '../client';\n\n/**\n * Checkout templates: a shop's payment methods, behaviour and smart routing,\n * defined once for the merchant and used in many shops.\n *\n * A template is edited where a shop is: its own profile (`template_id`) has a\n * checkout layout, behaviour settings, routing configurations and connector\n * accounts, written with `checkoutMethods`, `shops.updateCheckoutBranding`,\n * `routing` and the connector shop methods. Its changes reach the shops on it\n * when `apply()` runs. While a shop is on a template, its own payment methods,\n * behaviour and routing cannot be changed; its appearance stays its own.\n *\n * Every method but `ofShop()` needs a merchant-level role that sees every\n * connector and payment; `create()`, `assign()` and `apply()` also need\n * routing and connector write.\n */\nexport class CheckoutTemplates {\n constructor(private readonly request: RequestFn) {}\n\n /**\n * The merchant's templates, each with the shops on it and whether each\n * runs the template's current settings.\n * `GET /checkout-templates/{merchantId}`\n */\n async list(merchantId: string): Promise<CheckoutTemplateListResponse> {\n return this.request('GET', `/checkout-templates/${encodeURIComponent(merchantId)}`);\n }\n\n /**\n * Create a template, empty or copied from a shop's current settings. The\n * shop copied from is not changed.\n * `POST /checkout-templates/{merchantId}`\n */\n async create(\n merchantId: string,\n params: CheckoutTemplateCreateRequest,\n ): Promise<CheckoutTemplateResponse> {\n return this.request('POST', `/checkout-templates/${encodeURIComponent(merchantId)}`, {\n body: params,\n });\n }\n\n /** `GET /checkout-templates/{merchantId}/{templateId}` */\n async retrieve(merchantId: string, templateId: string): Promise<CheckoutTemplateResponse> {\n return this.request(\n 'GET',\n `/checkout-templates/${encodeURIComponent(merchantId)}/${encodeURIComponent(templateId)}`,\n );\n }\n\n /**\n * Update a template: rename it (a name another template of the merchant\n * holds is refused), make it the merchant's default, or both.\n * `POST /checkout-templates/{merchantId}/{templateId}`\n */\n async rename(\n merchantId: string,\n templateId: string,\n params: CheckoutTemplateUpdateRequest,\n ): Promise<CheckoutTemplateResponse> {\n return this.request(\n 'POST',\n `/checkout-templates/${encodeURIComponent(merchantId)}/${encodeURIComponent(templateId)}`,\n { body: params },\n );\n }\n\n /**\n * Make the template the merchant's default, taking the mark off the one that\n * had it, or stop it being the default. No shop changes either way.\n * `POST /checkout-templates/{merchantId}/{templateId}`\n */\n async setDefault(\n merchantId: string,\n templateId: string,\n isDefault: boolean,\n ): Promise<CheckoutTemplateResponse> {\n return this.rename(merchantId, templateId, { is_default: isDefault });\n }\n\n /**\n * Delete a template. Refused while a shop is on it.\n * `DELETE /checkout-templates/{merchantId}/{templateId}`\n */\n async delete(merchantId: string, templateId: string): Promise<CheckoutTemplateResponse> {\n return this.request(\n 'DELETE',\n `/checkout-templates/${encodeURIComponent(merchantId)}/${encodeURIComponent(templateId)}`,\n );\n }\n\n /**\n * Put shops on the template and copy its settings into them; a shop on\n * another template moves. Each shop is reported on its own: one with\n * `blockers` is left unchanged. `dry_run` changes nothing and reports what\n * would change.\n * `POST /checkout-templates/{merchantId}/{templateId}/shops`\n */\n async assign(\n merchantId: string,\n templateId: string,\n params: CheckoutTemplateAssignRequest,\n ): Promise<CheckoutTemplateApplyResponse> {\n return this.request(\n 'POST',\n `/checkout-templates/${encodeURIComponent(merchantId)}/${encodeURIComponent(templateId)}/shops`,\n {\n body: params,\n },\n );\n }\n\n /**\n * Take a shop off the template. It keeps every setting it has, as its own.\n * `DELETE /checkout-templates/{merchantId}/{templateId}/shops/{profileId}`\n */\n async unassign(\n merchantId: string,\n templateId: string,\n profileId: string,\n ): Promise<CheckoutTemplateResponse> {\n return this.request(\n 'DELETE',\n `/checkout-templates/${encodeURIComponent(merchantId)}/${encodeURIComponent(templateId)}/shops/${encodeURIComponent(profileId)}`,\n );\n }\n\n /**\n * Copy the template's current settings into its shops, all or the ones\n * named.\n * `POST /checkout-templates/{merchantId}/{templateId}/apply`\n */\n async apply(\n merchantId: string,\n templateId: string,\n params: CheckoutTemplateApplyRequest = {},\n ): Promise<CheckoutTemplateApplyResponse> {\n return this.request(\n 'POST',\n `/checkout-templates/${encodeURIComponent(merchantId)}/${encodeURIComponent(templateId)}/apply`,\n {\n body: params,\n },\n );\n }\n\n /**\n * The template a shop is on, if any. Readable by the shop's own members.\n * `GET /checkout-templates/{merchantId}/shops/{profileId}`\n */\n async ofShop(merchantId: string, profileId: string): Promise<CheckoutTemplateOfShopResponse> {\n return this.request(\n 'GET',\n `/checkout-templates/${encodeURIComponent(merchantId)}/shops/${encodeURIComponent(profileId)}`,\n );\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["/tmp/delopay-sdk-publish/dist/chunk-6LOWE2YI.cjs","../src/resources/cards.ts"],"names":[],"mappings":"AAAA;ACEO,IAAM,MAAA,EAAN,MAAY;AAAA,EACjB,WAAA,CAA6B,OAAA,EAAoB;AAApB,IAAA,IAAA,CAAA,QAAA,EAAA,OAAA;AAAA,EAAqB;AAAA;AAAA,EAGlD,MAAM,MAAA,CAAO,MAAA,EAAmE;AAC9E,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,MAAA,EAAQ,eAAA,EAAiB,EAAE,IAAA,EAAM,OAAO,CAAC,CAAA;AAAA,EAC/D;AAAA;AAAA,EAGA,MAAM,MAAA,CAAO,MAAA,EAAmE;AAC9E,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,MAAA,EAAQ,eAAA,EAAiB,EAAE,IAAA,EAAM,OAAO,CAAC,CAAA;AAAA,EAC/D;AAAA;AAAA,EAGA,MAAM,QAAA,CAAS,GAAA,EAA+C;AAC5D,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,KAAA,EAAO,CAAA,OAAA,EAAU,kBAAA,CAAmB,GAAG,CAAC,CAAA,CAAA;AAC9D,EAAA;AACF;ADDiE;AACA;AACA;AACA","file":"/tmp/delopay-sdk-publish/dist/chunk-6LOWE2YI.cjs","sourcesContent":[null,"import type { RequestFn } from '../client';\n\nexport class Cards {\n constructor(private readonly request: RequestFn) {}\n\n /** Create a card. `POST /cards/create` */\n async create(params: Record<string, unknown>): Promise<Record<string, unknown>> {\n return this.request('POST', '/cards/create', { body: params });\n }\n\n /** Update a card. `POST /cards/update` */\n async update(params: Record<string, unknown>): Promise<Record<string, unknown>> {\n return this.request('POST', '/cards/update', { body: params });\n }\n\n /** Retrieve card info by BIN. `GET /cards/{bin}` */\n async retrieve(bin: string): Promise<Record<string, unknown>> {\n return this.request('GET', `/cards/${encodeURIComponent(bin)}`);\n }\n}\n"]}
1
+ {"version":3,"sources":["/tmp/sdkpub-w4-0464/delopay-typescript-sdk/dist/chunk-6LOWE2YI.cjs","../src/resources/cards.ts"],"names":[],"mappings":"AAAA;ACEO,IAAM,MAAA,EAAN,MAAY;AAAA,EACjB,WAAA,CAA6B,OAAA,EAAoB;AAApB,IAAA,IAAA,CAAA,QAAA,EAAA,OAAA;AAAA,EAAqB;AAAA;AAAA,EAGlD,MAAM,MAAA,CAAO,MAAA,EAAmE;AAC9E,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,MAAA,EAAQ,eAAA,EAAiB,EAAE,IAAA,EAAM,OAAO,CAAC,CAAA;AAAA,EAC/D;AAAA;AAAA,EAGA,MAAM,MAAA,CAAO,MAAA,EAAmE;AAC9E,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,MAAA,EAAQ,eAAA,EAAiB,EAAE,IAAA,EAAM,OAAO,CAAC,CAAA;AAAA,EAC/D;AAAA;AAAA,EAGA,MAAM,QAAA,CAAS,GAAA,EAA+C;AAC5D,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,KAAA,EAAO,CAAA,OAAA,EAAU,kBAAA,CAAmB,GAAG,CAAC,CAAA,CAAA;AAC9D,EAAA;AACF;ADDiE;AACA;AACA;AACA","file":"/tmp/sdkpub-w4-0464/delopay-typescript-sdk/dist/chunk-6LOWE2YI.cjs","sourcesContent":[null,"import type { RequestFn } from '../client';\n\nexport class Cards {\n constructor(private readonly request: RequestFn) {}\n\n /** Create a card. `POST /cards/create` */\n async create(params: Record<string, unknown>): Promise<Record<string, unknown>> {\n return this.request('POST', '/cards/create', { body: params });\n }\n\n /** Update a card. `POST /cards/update` */\n async update(params: Record<string, unknown>): Promise<Record<string, unknown>> {\n return this.request('POST', '/cards/update', { body: params });\n }\n\n /** Retrieve card info by BIN. `GET /cards/{bin}` */\n async retrieve(bin: string): Promise<Record<string, unknown>> {\n return this.request('GET', `/cards/${encodeURIComponent(bin)}`);\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["/tmp/delopay-sdk-publish/dist/chunk-6LSG5Z4T.cjs","../src/resources/checkoutRecovery.ts"],"names":[],"mappings":"AAAA;AC+BO,IAAM,iBAAA,EAAN,MAAuB;AAAA,EAC5B,WAAA,CAA6B,OAAA,EAAoB;AAApB,IAAA,IAAA,CAAA,QAAA,EAAA,OAAA;AAAA,EAAqB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQlD,MAAM,QAAA,CAAS,SAAA,EAAoD;AACjE,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,KAAA,EAAO,CAAA,4BAAA,EAA+B,kBAAA,CAAmB,SAAS,CAAC,CAAA,CAAA;AACzF,EAAA;AAAA;AAAA;AAAA;AAAA;AAM+D,EAAA;AACjD,IAAA;AACV,MAAA;AAC4D,MAAA;AAC9D,IAAA;AACF,EAAA;AAAA;AAAA;AAAA;AAAA;AAMiE,EAAA;AACnD,IAAA;AACV,MAAA;AAC4D,MAAA;AAC9D,IAAA;AACF,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQmF,EAAA;AACrE,IAAA;AACV,MAAA;AAC4D,MAAA;AAC9D,IAAA;AACF,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAgBiC,EAAA;AACnB,IAAA;AACV,MAAA;AAC4D,MAAA;AAC7C,MAAA;AACjB,IAAA;AACF,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAO+F,EAAA;AACjF,IAAA;AACV,MAAA;AAC4D,MAAA;AAC7C,MAAA;AACjB,IAAA;AACF,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAS0F,EAAA;AAC5E,IAAA;AACV,MAAA;AAC4D,MAAA;AACO,MAAA;AACrE,IAAA;AACF,EAAA;AAAA;AAAA;AAAA;AAAA;AAMuF,EAAA;AACzE,IAAA;AACyE,MAAA;AACrF,IAAA;AACyD,IAAA;AAC3D,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOiG,EAAA;AAClB,IAAA;AAC/E,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAO0E,EAAA;AACK,IAAA;AAC/E,EAAA;AACF;ADxC4F;AACA;AACA;AACA","file":"/tmp/delopay-sdk-publish/dist/chunk-6LSG5Z4T.cjs","sourcesContent":[null,"import type {\n CandidatePreviewRequest,\n CandidatePreviewResponse,\n CheckoutReactivation,\n CheckoutReactivationPreview,\n CheckoutRecoveryStatus,\n CheckoutReminder,\n CheckoutReminderList,\n CheckoutReminderListQuery,\n ManualEmailPreview,\n ManualEmailRequest,\n ReactivateCheckoutRequest,\n TestEmailRequest,\n TestEmailResponse,\n} from '../types';\nimport type { RequestFn } from '../client';\n\n/**\n * Checkout recovery: emails that bring the buyer of an unfinished checkout\n * back to a payable checkout.\n *\n * A shop's automatic reminders are its `checkout_recovery.rule` setting,\n * written with `settings`, and their texts the `checkout_*` message templates,\n * written with `messageTemplates`. This resource reads a checkout's recovery, previews and sends a\n * message by hand, stops a checkout's reminders, previews whom a rule\n * would remind, and reactivates an expired checkout.\n *\n * Reading needs the payment read grant; sending, stopping and testing need\n * the payment write grant. A shop-scoped caller acts on its own shop only.\n * Refusals are `IR_16` (400) with `error.data.reason`.\n */\nexport class CheckoutRecovery {\n constructor(private readonly request: RequestFn) {}\n\n /**\n * A checkout's recovery: whether and when the rule reminds it, every reason\n * it does not, every message about it, and where its link goes. Any payment\n * of the checkout may be named.\n * `GET /checkout-recovery/payments/{payment_id}`\n */\n async retrieve(paymentId: string): Promise<CheckoutRecoveryStatus> {\n return this.request('GET', `/checkout-recovery/payments/${encodeURIComponent(paymentId)}`);\n }\n\n /**\n * No automatic reminder about this checkout from now on.\n * `POST /checkout-recovery/payments/{payment_id}/stop`\n */\n async stop(paymentId: string): Promise<CheckoutRecoveryStatus> {\n return this.request(\n 'POST',\n `/checkout-recovery/payments/${encodeURIComponent(paymentId)}/stop`,\n );\n }\n\n /**\n * Undo `stop`.\n * `POST /checkout-recovery/payments/{payment_id}/resume`\n */\n async resume(paymentId: string): Promise<CheckoutRecoveryStatus> {\n return this.request(\n 'POST',\n `/checkout-recovery/payments/${encodeURIComponent(paymentId)}/resume`,\n );\n }\n\n /**\n * Whether the checkout can be reactivated now, why not when it cannot, and\n * what it would continue: order, amount, the current page's expiry and the\n * validity a reactivation gives. Changes nothing.\n * `GET /checkout-recovery/payments/{payment_id}/reactivation`\n */\n async previewReactivation(paymentId: string): Promise<CheckoutReactivationPreview> {\n return this.request(\n 'GET',\n `/checkout-recovery/payments/${encodeURIComponent(paymentId)}/reactivation`,\n );\n }\n\n /**\n * Continue an expired, unpaid checkout on a new payment for the same order,\n * amount and currency. The payment it replaces is closed first, so the two\n * can never both be charged; nothing is charged and nothing is sent to the\n * buyer. A repeated request answers with the same checkout\n * (`already_active`). Refused (`IR_16`, `error.data.reason` a\n * `ReactivationBlockedReason`, or `invalid_validity`) while the checkout is\n * paid, being paid, awaiting capture or authentication, cancelled or still\n * open, or when no payment method could pay it.\n * `POST /checkout-recovery/payments/{payment_id}/reactivate`\n */\n async reactivate(\n paymentId: string,\n params: ReactivateCheckoutRequest = {},\n ): Promise<CheckoutReactivation> {\n return this.request(\n 'POST',\n `/checkout-recovery/payments/${encodeURIComponent(paymentId)}/reactivate`,\n { body: params },\n );\n }\n\n /**\n * A message by hand as it would be sent now: recipient, sender, text, link\n * and destination, and why it would be refused. Nothing is sent.\n * `POST /checkout-recovery/payments/{payment_id}/email/preview`\n */\n async previewEmail(paymentId: string, params: ManualEmailRequest): Promise<ManualEmailPreview> {\n return this.request(\n 'POST',\n `/checkout-recovery/payments/${encodeURIComponent(paymentId)}/email/preview`,\n { body: params },\n );\n }\n\n /**\n * Send a message by hand, once per `idempotency_key`, composed again from\n * the checkout as it is now. Refused when the checkout was paid or is being\n * paid, was cancelled, the buyer unsubscribed, or no payment method could\n * pay it.\n * `POST /checkout-recovery/payments/{payment_id}/email`\n */\n async sendEmail(paymentId: string, params: ManualEmailRequest): Promise<CheckoutReminder> {\n return this.request(\n 'POST',\n `/checkout-recovery/payments/${encodeURIComponent(paymentId)}/email`,\n { body: params, bodyIdempotencyKey: params.idempotency_key ?? null },\n );\n }\n\n /**\n * Messages to buyers, newest first.\n * `GET /checkout-recovery/reminders`\n */\n async listReminders(params?: CheckoutReminderListQuery): Promise<CheckoutReminderList> {\n if (params) {\n return this.request('GET', '/checkout-recovery/reminders', { query: { ...params } });\n }\n return this.request('GET', '/checkout-recovery/reminders');\n }\n\n /**\n * The shop's recent checkouts judged under a rule (the stored one, or the\n * one given) as if switched on, with every reason. Nothing is sent.\n * `POST /checkout-recovery/candidates`\n */\n async previewCandidates(params: CandidatePreviewRequest = {}): Promise<CandidatePreviewResponse> {\n return this.request('POST', '/checkout-recovery/candidates', { body: params });\n }\n\n /**\n * A reminder with sample values, to the signed-in user's own address.\n * Dashboard sessions only.\n * `POST /checkout-recovery/test-email`\n */\n async sendTestEmail(params: TestEmailRequest): Promise<TestEmailResponse> {\n return this.request('POST', '/checkout-recovery/test-email', { body: params });\n }\n}\n"]}
1
+ {"version":3,"sources":["/tmp/sdkpub-w4-0464/delopay-typescript-sdk/dist/chunk-6LSG5Z4T.cjs","../src/resources/checkoutRecovery.ts"],"names":[],"mappings":"AAAA;AC+BO,IAAM,iBAAA,EAAN,MAAuB;AAAA,EAC5B,WAAA,CAA6B,OAAA,EAAoB;AAApB,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ub-w4-0464/delopay-typescript-sdk/dist/chunk-6LSG5Z4T.cjs","sourcesContent":[null,"import type {\n CandidatePreviewRequest,\n CandidatePreviewResponse,\n CheckoutReactivation,\n CheckoutReactivationPreview,\n CheckoutRecoveryStatus,\n CheckoutReminder,\n CheckoutReminderList,\n CheckoutReminderListQuery,\n ManualEmailPreview,\n ManualEmailRequest,\n ReactivateCheckoutRequest,\n TestEmailRequest,\n TestEmailResponse,\n} from '../types';\nimport type { RequestFn } from '../client';\n\n/**\n * Checkout recovery: emails that bring the buyer of an unfinished checkout\n * back to a payable checkout.\n *\n * A shop's automatic reminders are its `checkout_recovery.rule` setting,\n * written with `settings`, and their texts the `checkout_*` message templates,\n * written with `messageTemplates`. This resource reads a checkout's recovery, previews and sends a\n * message by hand, stops a checkout's reminders, previews whom a rule\n * would remind, and reactivates an expired checkout.\n *\n * Reading needs the payment read grant; sending, stopping and testing need\n * the payment write grant. A shop-scoped caller acts on its own shop only.\n * Refusals are `IR_16` (400) with `error.data.reason`.\n */\nexport class CheckoutRecovery {\n constructor(private readonly request: RequestFn) {}\n\n /**\n * A checkout's recovery: whether and when the rule reminds it, every reason\n * it does not, every message about it, and where its link goes. Any payment\n * of the checkout may be named.\n * `GET /checkout-recovery/payments/{payment_id}`\n */\n async retrieve(paymentId: string): Promise<CheckoutRecoveryStatus> {\n return this.request('GET', `/checkout-recovery/payments/${encodeURIComponent(paymentId)}`);\n }\n\n /**\n * No automatic reminder about this checkout from now on.\n * `POST /checkout-recovery/payments/{payment_id}/stop`\n */\n async stop(paymentId: string): Promise<CheckoutRecoveryStatus> {\n return this.request(\n 'POST',\n `/checkout-recovery/payments/${encodeURIComponent(paymentId)}/stop`,\n );\n }\n\n /**\n * Undo `stop`.\n * `POST /checkout-recovery/payments/{payment_id}/resume`\n */\n async resume(paymentId: string): Promise<CheckoutRecoveryStatus> {\n return this.request(\n 'POST',\n `/checkout-recovery/payments/${encodeURIComponent(paymentId)}/resume`,\n );\n }\n\n /**\n * Whether the checkout can be reactivated now, why not when it cannot, and\n * what it would continue: order, amount, the current page's expiry and the\n * validity a reactivation gives. Changes nothing.\n * `GET /checkout-recovery/payments/{payment_id}/reactivation`\n */\n async previewReactivation(paymentId: string): Promise<CheckoutReactivationPreview> {\n return this.request(\n 'GET',\n `/checkout-recovery/payments/${encodeURIComponent(paymentId)}/reactivation`,\n );\n }\n\n /**\n * Continue an expired, unpaid checkout on a new payment for the same order,\n * amount and currency. The payment it replaces is closed first, so the two\n * can never both be charged; nothing is charged and nothing is sent to the\n * buyer. A repeated request answers with the same checkout\n * (`already_active`). Refused (`IR_16`, `error.data.reason` a\n * `ReactivationBlockedReason`, or `invalid_validity`) while the checkout is\n * paid, being paid, awaiting capture or authentication, cancelled or still\n * open, or when no payment method could pay it.\n * `POST /checkout-recovery/payments/{payment_id}/reactivate`\n */\n async reactivate(\n paymentId: string,\n params: ReactivateCheckoutRequest = {},\n ): Promise<CheckoutReactivation> {\n return this.request(\n 'POST',\n `/checkout-recovery/payments/${encodeURIComponent(paymentId)}/reactivate`,\n { body: params },\n );\n }\n\n /**\n * A message by hand as it would be sent now: recipient, sender, text, link\n * and destination, and why it would be refused. Nothing is sent.\n * `POST /checkout-recovery/payments/{payment_id}/email/preview`\n */\n async previewEmail(paymentId: string, params: ManualEmailRequest): Promise<ManualEmailPreview> {\n return this.request(\n 'POST',\n `/checkout-recovery/payments/${encodeURIComponent(paymentId)}/email/preview`,\n { body: params },\n );\n }\n\n /**\n * Send a message by hand, once per `idempotency_key`, composed again from\n * the checkout as it is now. Refused when the checkout was paid or is being\n * paid, was cancelled, the buyer unsubscribed, or no payment method could\n * pay it.\n * `POST /checkout-recovery/payments/{payment_id}/email`\n */\n async sendEmail(paymentId: string, params: ManualEmailRequest): Promise<CheckoutReminder> {\n return this.request(\n 'POST',\n `/checkout-recovery/payments/${encodeURIComponent(paymentId)}/email`,\n { body: params, bodyIdempotencyKey: params.idempotency_key ?? null },\n );\n }\n\n /**\n * Messages to buyers, newest first.\n * `GET /checkout-recovery/reminders`\n */\n async listReminders(params?: CheckoutReminderListQuery): Promise<CheckoutReminderList> {\n if (params) {\n return this.request('GET', '/checkout-recovery/reminders', { query: { ...params } });\n }\n return this.request('GET', '/checkout-recovery/reminders');\n }\n\n /**\n * The shop's recent checkouts judged under a rule (the stored one, or the\n * one given) as if switched on, with every reason. Nothing is sent.\n * `POST /checkout-recovery/candidates`\n */\n async previewCandidates(params: CandidatePreviewRequest = {}): Promise<CandidatePreviewResponse> {\n return this.request('POST', '/checkout-recovery/candidates', { body: params });\n }\n\n /**\n * A reminder with sample values, to the signed-in user's own address.\n * Dashboard sessions only.\n * `POST /checkout-recovery/test-email`\n */\n async sendTestEmail(params: TestEmailRequest): Promise<TestEmailResponse> {\n return this.request('POST', '/checkout-recovery/test-email', { body: params });\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["/tmp/delopay-sdk-publish/dist/chunk-6SU2MTN2.cjs","../src/resources/relay.ts"],"names":[],"mappings":"AAAA;ACGO,IAAM,MAAA,EAAN,MAAY;AAAA,EACjB,WAAA,CAA6B,OAAA,EAAoB;AAApB,IAAA,IAAA,CAAA,QAAA,EAAA,OAAA;AAAA,EAAqB;AAAA,EAElD,MAAM,MAAA,CAAO,MAAA,EAA8C;AACzD,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,MAAA,EAAQ,QAAA,EAAU,EAAE,IAAA,EAAM,OAAO,CAAC,CAAA;AAAA,EACxD;AAAA,EAEA,MAAM,QAAA,CAAS,OAAA,EAAyC;AACtD,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,KAAA,EAAO,CAAA,OAAA,EAAU,kBAAA,CAAmB,OAAO,CAAC,CAAA,CAAA;AAClE,EAAA;AACF;ADDqE;AACA;AACA;AACA","file":"/tmp/delopay-sdk-publish/dist/chunk-6SU2MTN2.cjs","sourcesContent":[null,"import type { RelayRequest, RelayResponse } from '../types';\nimport type { RequestFn } from '../client';\n\nexport class Relay {\n constructor(private readonly request: RequestFn) {}\n\n async create(params: RelayRequest): Promise<RelayResponse> {\n return this.request('POST', '/relay', { body: params });\n }\n\n async retrieve(relayId: string): Promise<RelayResponse> {\n return this.request('GET', `/relay/${encodeURIComponent(relayId)}`);\n }\n}\n"]}
1
+ {"version":3,"sources":["/tmp/sdkpub-w4-0464/delopay-typescript-sdk/dist/chunk-6SU2MTN2.cjs","../src/resources/relay.ts"],"names":[],"mappings":"AAAA;ACGO,IAAM,MAAA,EAAN,MAAY;AAAA,EACjB,WAAA,CAA6B,OAAA,EAAoB;AAApB,IAAA,IAAA,CAAA,QAAA,EAAA,OAAA;AAAA,EAAqB;AAAA,EAElD,MAAM,MAAA,CAAO,MAAA,EAA8C;AACzD,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,MAAA,EAAQ,QAAA,EAAU,EAAE,IAAA,EAAM,OAAO,CAAC,CAAA;AAAA,EACxD;AAAA,EAEA,MAAM,QAAA,CAAS,OAAA,EAAyC;AACtD,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,KAAA,EAAO,CAAA,OAAA,EAAU,kBAAA,CAAmB,OAAO,CAAC,CAAA,CAAA;AAClE,EAAA;AACF;ADDqE;AACA;AACA;AACA","file":"/tmp/sdkpub-w4-0464/delopay-typescript-sdk/dist/chunk-6SU2MTN2.cjs","sourcesContent":[null,"import type { RelayRequest, RelayResponse } from '../types';\nimport type { RequestFn } from '../client';\n\nexport class Relay {\n constructor(private readonly request: RequestFn) {}\n\n async create(params: RelayRequest): Promise<RelayResponse> {\n return this.request('POST', '/relay', { body: params });\n }\n\n async retrieve(relayId: string): Promise<RelayResponse> {\n return this.request('GET', `/relay/${encodeURIComponent(relayId)}`);\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["/tmp/delopay-sdk-publish/dist/chunk-6YCDLSIU.cjs","../src/resources/processorCosts.ts"],"names":[],"mappings":"AAAA;ACiCO,IAAM,eAAA,EAAN,MAAqB;AAAA,EAC1B,WAAA,CAA6B,OAA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AA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAsB0C,EAAA;AACsC,IAAA;AACtE,MAAA;AAC2B,MAAA;AAC9B,MAAA;AACJ,IAAA;AACH,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUoE,EAAA;AACG,IAAA;AAClC,MAAA;AAClC,IAAA;AACH,EAAA;AACF;ADlDkF;AACA;AACA;AACA","file":"/tmp/delopay-sdk-publish/dist/chunk-6YCDLSIU.cjs","sourcesContent":[null,"import type {\n BulkCreateProcessorCostSchedulesRequest,\n CreateProcessorCostScheduleRequest,\n ProcessorCostScheduleResponse,\n ReplaceProcessorCostScheduleRequest,\n UpdateProcessorCostScheduleRequest,\n} from '../types';\nimport type { RequestExtras, RequestFn } from '../client';\n\n/**\n * A merchant's own processor cost schedules: what the processor the merchant\n * brought itself charges it, per connector and — as narrowly as the rate is\n * written — per shop, payment method, method type, card network or the\n * processor's own method code.\n *\n * A schedule prices the rails that report no fee on the payment itself. What\n * it produces is stamped `estimated` on the settlement line, never\n * `reported`, and the rates that priced it are copied onto the line as\n * `processor_cost_basis` so the figure survives the schedule being replaced\n * or deleted.\n *\n * The DeloPay-wide defaults a merchant inherits are DeloPay's own acquirer\n * pricing. They are never listed here, and they are edited through the\n * internal client instead (`DelopayInternal.adminPortal`).\n *\n * A rate is never edited in place: it priced transactions that already\n * happened. {@link ProcessorCosts.update} only closes, deactivates or\n * annotates a schedule; a price change is {@link ProcessorCosts.replace},\n * which closes the old window and opens the successor in one step.\n *\n * Every route takes the merchant account id and needs a dashboard session for\n * that merchant.\n */\nexport class ProcessorCosts {\n constructor(private readonly request: RequestFn) {}\n\n /**\n * Every processor cost schedule of the merchant.\n * `GET /processor-costs`\n *\n * @param merchantId - The merchant account ID.\n */\n async list(merchantId: string): Promise<ProcessorCostScheduleResponse[]> {\n return this.request('GET', '/processor-costs', { query: { merchant_id: merchantId } });\n }\n\n /**\n * Record a processor cost schedule.\n * `POST /processor-costs`\n *\n * A `shop_id` that is well formed but not a shop of this merchant is\n * answered `404` and nothing is recorded: a rate scoped to a shop the\n * merchant does not own would price no attempt, leaving every line it was\n * meant to price `unavailable` while the screen showed a configured rate.\n *\n * @param params - The schedule.\n * @param merchantId - The merchant account ID.\n */\n async create(\n params: CreateProcessorCostScheduleRequest,\n merchantId: string,\n ): Promise<ProcessorCostScheduleResponse> {\n return this.request('POST', '/processor-costs', {\n body: params,\n query: { merchant_id: merchantId },\n });\n }\n\n /**\n * Record several schedules at once, all or none — copy a price list across\n * methods or shops.\n * `POST /processor-costs/bulk`\n *\n * 1 to 200 entries. Every entry is validated before anything is stored: an\n * invalid one is answered `422` naming its index, and nothing is stored.\n * The answer lists the created schedules in request order.\n *\n * @param params - The schedules.\n * @param merchantId - The merchant account ID.\n */\n async bulkCreate(\n params: BulkCreateProcessorCostSchedulesRequest,\n merchantId: string,\n ): Promise<ProcessorCostScheduleResponse[]> {\n return this.request('POST', '/processor-costs/bulk', {\n body: params,\n query: { merchant_id: merchantId },\n });\n }\n\n /**\n * Close, deactivate or annotate a schedule. The rate is not editable.\n * `PUT /processor-costs/{schedule_id}`\n *\n * @param scheduleId - The schedule ID.\n * @param params - What to change.\n * @param merchantId - The merchant account ID.\n */\n async update(\n scheduleId: string,\n params: UpdateProcessorCostScheduleRequest,\n merchantId: string,\n ): Promise<ProcessorCostScheduleResponse> {\n return this.request('PUT', `/processor-costs/${encodeURIComponent(scheduleId)}`, {\n body: params,\n query: { merchant_id: merchantId },\n });\n }\n\n /**\n * Close a schedule at `effective_from` and open its successor with the same\n * scope and the same end, in one step: no transaction is priced by both\n * rates, and none falls between them.\n * `POST /processor-costs/{schedule_id}/replace`\n *\n * Answers the successor schedule. An `effective_from` outside the old\n * schedule's window, an inactive schedule, or one a concurrent replacement\n * already moved is answered `400` — retry against the schedule as it now\n * stands rather than forcing the write.\n *\n * @param scheduleId - The schedule to replace.\n * @param params - The new rate.\n * @param merchantId - The merchant account ID.\n */\n async replace(\n scheduleId: string,\n params: ReplaceProcessorCostScheduleRequest,\n merchantId: string,\n options?: RequestExtras,\n ): Promise<ProcessorCostScheduleResponse> {\n return this.request('POST', `/processor-costs/${encodeURIComponent(scheduleId)}/replace`, {\n body: params,\n query: { merchant_id: merchantId },\n ...options,\n });\n }\n\n /**\n * Delete a schedule. Restates nothing: every figure it derived is already\n * stamped on the settlement lines it priced.\n * `DELETE /processor-costs/{schedule_id}`\n *\n * @param scheduleId - The schedule ID.\n * @param merchantId - The merchant account ID.\n */\n async delete(scheduleId: string, merchantId: string): Promise<void> {\n return this.request('DELETE', `/processor-costs/${encodeURIComponent(scheduleId)}`, {\n query: { merchant_id: merchantId },\n });\n }\n}\n"]}
1
+ {"version":3,"sources":["/tmp/sdkpub-w4-0464/delopay-typescript-sdk/dist/chunk-6YCDLSIU.cjs","../src/resources/processorCosts.ts"],"names":[],"mappings":"AAAA;ACiCO,IAAM,eAAA,EAAN,MAAqB;AAAA,EAC1B,WAAA,CAA6B,OAAA,EAAoB;AAApB,IAAA,IAAA,CAAA,QAAA,EAAA,OAAA;AAAA,EAAqB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQlD,MAAM,IAAA,CAAK,UAAA,EAA8D;AACvE,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,KAAA,EAAO,kBAAA,EAAoB,EAAE,KAAA,EAAO,EAAE,WAAA,EAAa,WAAW,EAAE,CAAC,CAAA;AAAA,EACvF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAcA,MAAM,MAAA,CACJ,MAAA,EACA,UAAA,EACwC;AACxC,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,MAAA,EAAQ,kBAAA,EAAoB;AAAA,MAC9C,IAAA,EAAM,MAAA;AAAA,MACN,KAAA,EAAO,EAAE,WAAA,EAAa,WAAW;AAAA,IACnC,CAAC,CAAA;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAcA,MAAM,UAAA,CACJ,MAAA,EACA,UAAA,EAC0C;AAC1C,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,MAAA,EAAQ,uBAAA,EAAyB;AAAA,MACnD,IAAA,EAAM,MAAA;AAAA,MACN,KAAA,EAAO,EAAE,WAAA,EAAa,WAAW;AAAA,IACnC,CAAC,CAAA;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUA,MAAM,MAAA,CACJ,UAAA,EACA,MAAA,EACA,UAAA,EACwC;AACxC,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,KAAA,EAAO,CAAA,iBAAA,EAAoB,kBAAA,CAAmB,UAAU,CAAC,CAAA,CAAA;AACrE,MAAA;AAC2B,MAAA;AAClC,IAAA;AACH,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAsB0C,EAAA;AACsC,IAAA;AACtE,MAAA;AAC2B,MAAA;AAC9B,MAAA;AACJ,IAAA;AACH,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUoE,EAAA;AACG,IAAA;AAClC,MAAA;AAClC,IAAA;AACH,EAAA;AACF;ADlDkF;AACA;AACA;AACA","file":"/tmp/sdkpub-w4-0464/delopay-typescript-sdk/dist/chunk-6YCDLSIU.cjs","sourcesContent":[null,"import type {\n BulkCreateProcessorCostSchedulesRequest,\n CreateProcessorCostScheduleRequest,\n ProcessorCostScheduleResponse,\n ReplaceProcessorCostScheduleRequest,\n UpdateProcessorCostScheduleRequest,\n} from '../types';\nimport type { RequestExtras, RequestFn } from '../client';\n\n/**\n * A merchant's own processor cost schedules: what the processor the merchant\n * brought itself charges it, per connector and — as narrowly as the rate is\n * written — per shop, payment method, method type, card network or the\n * processor's own method code.\n *\n * A schedule prices the rails that report no fee on the payment itself. What\n * it produces is stamped `estimated` on the settlement line, never\n * `reported`, and the rates that priced it are copied onto the line as\n * `processor_cost_basis` so the figure survives the schedule being replaced\n * or deleted.\n *\n * The DeloPay-wide defaults a merchant inherits are DeloPay's own acquirer\n * pricing. They are never listed here, and they are edited through the\n * internal client instead (`DelopayInternal.adminPortal`).\n *\n * A rate is never edited in place: it priced transactions that already\n * happened. {@link ProcessorCosts.update} only closes, deactivates or\n * annotates a schedule; a price change is {@link ProcessorCosts.replace},\n * which closes the old window and opens the successor in one step.\n *\n * Every route takes the merchant account id and needs a dashboard session for\n * that merchant.\n */\nexport class ProcessorCosts {\n constructor(private readonly request: RequestFn) {}\n\n /**\n * Every processor cost schedule of the merchant.\n * `GET /processor-costs`\n *\n * @param merchantId - The merchant account ID.\n */\n async list(merchantId: string): Promise<ProcessorCostScheduleResponse[]> {\n return this.request('GET', '/processor-costs', { query: { merchant_id: merchantId } });\n }\n\n /**\n * Record a processor cost schedule.\n * `POST /processor-costs`\n *\n * A `shop_id` that is well formed but not a shop of this merchant is\n * answered `404` and nothing is recorded: a rate scoped to a shop the\n * merchant does not own would price no attempt, leaving every line it was\n * meant to price `unavailable` while the screen showed a configured rate.\n *\n * @param params - The schedule.\n * @param merchantId - The merchant account ID.\n */\n async create(\n params: CreateProcessorCostScheduleRequest,\n merchantId: string,\n ): Promise<ProcessorCostScheduleResponse> {\n return this.request('POST', '/processor-costs', {\n body: params,\n query: { merchant_id: merchantId },\n });\n }\n\n /**\n * Record several schedules at once, all or none — copy a price list across\n * methods or shops.\n * `POST /processor-costs/bulk`\n *\n * 1 to 200 entries. Every entry is validated before anything is stored: an\n * invalid one is answered `422` naming its index, and nothing is stored.\n * The answer lists the created schedules in request order.\n *\n * @param params - The schedules.\n * @param merchantId - The merchant account ID.\n */\n async bulkCreate(\n params: BulkCreateProcessorCostSchedulesRequest,\n merchantId: string,\n ): Promise<ProcessorCostScheduleResponse[]> {\n return this.request('POST', '/processor-costs/bulk', {\n body: params,\n query: { merchant_id: merchantId },\n });\n }\n\n /**\n * Close, deactivate or annotate a schedule. The rate is not editable.\n * `PUT /processor-costs/{schedule_id}`\n *\n * @param scheduleId - The schedule ID.\n * @param params - What to change.\n * @param merchantId - The merchant account ID.\n */\n async update(\n scheduleId: string,\n params: UpdateProcessorCostScheduleRequest,\n merchantId: string,\n ): Promise<ProcessorCostScheduleResponse> {\n return this.request('PUT', `/processor-costs/${encodeURIComponent(scheduleId)}`, {\n body: params,\n query: { merchant_id: merchantId },\n });\n }\n\n /**\n * Close a schedule at `effective_from` and open its successor with the same\n * scope and the same end, in one step: no transaction is priced by both\n * rates, and none falls between them.\n * `POST /processor-costs/{schedule_id}/replace`\n *\n * Answers the successor schedule. An `effective_from` outside the old\n * schedule's window, an inactive schedule, or one a concurrent replacement\n * already moved is answered `400` — retry against the schedule as it now\n * stands rather than forcing the write.\n *\n * @param scheduleId - The schedule to replace.\n * @param params - The new rate.\n * @param merchantId - The merchant account ID.\n */\n async replace(\n scheduleId: string,\n params: ReplaceProcessorCostScheduleRequest,\n merchantId: string,\n options?: RequestExtras,\n ): Promise<ProcessorCostScheduleResponse> {\n return this.request('POST', `/processor-costs/${encodeURIComponent(scheduleId)}/replace`, {\n body: params,\n query: { merchant_id: merchantId },\n ...options,\n });\n }\n\n /**\n * Delete a schedule. Restates nothing: every figure it derived is already\n * stamped on the settlement lines it priced.\n * `DELETE /processor-costs/{schedule_id}`\n *\n * @param scheduleId - The schedule ID.\n * @param merchantId - The merchant account ID.\n */\n async delete(scheduleId: string, merchantId: string): Promise<void> {\n return this.request('DELETE', `/processor-costs/${encodeURIComponent(scheduleId)}`, {\n query: { merchant_id: merchantId },\n });\n }\n}\n"]}