@delopay/sdk 0.418.0 → 0.423.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-34PC72O7.cjs.map +1 -1
  10. package/dist/chunk-3GBWQWTP.cjs.map +1 -1
  11. package/dist/{chunk-XAUPBK6A.cjs → chunk-3TFE2JB5.cjs} +3 -3
  12. package/dist/chunk-3TFE2JB5.cjs.map +1 -0
  13. package/dist/chunk-3YBBJT3Y.cjs.map +1 -1
  14. package/dist/{chunk-B2TCNGC2.cjs → chunk-424542L2.cjs} +16 -1
  15. package/dist/chunk-424542L2.cjs.map +1 -0
  16. package/dist/chunk-44QBWVRS.cjs.map +1 -1
  17. package/dist/chunk-4EKAWNYI.cjs.map +1 -1
  18. package/dist/chunk-4LN4BR2T.cjs.map +1 -1
  19. package/dist/chunk-4T4XHPYN.cjs.map +1 -1
  20. package/dist/chunk-5CITBN33.cjs.map +1 -1
  21. package/dist/chunk-5HCKC4HF.cjs.map +1 -1
  22. package/dist/chunk-5O2JSQYA.cjs.map +1 -1
  23. package/dist/chunk-6EBY2KKL.cjs.map +1 -1
  24. package/dist/chunk-6LOWE2YI.cjs.map +1 -1
  25. package/dist/chunk-6LSG5Z4T.cjs.map +1 -1
  26. package/dist/chunk-6SU2MTN2.cjs.map +1 -1
  27. package/dist/chunk-6YCDLSIU.cjs.map +1 -1
  28. package/dist/chunk-75E5WNJG.cjs.map +1 -1
  29. package/dist/chunk-7ITPMVDB.cjs.map +1 -1
  30. package/dist/chunk-7JV6VVO7.cjs.map +1 -1
  31. package/dist/chunk-7QZCUXWB.cjs.map +1 -1
  32. package/dist/chunk-7VXF5D67.cjs.map +1 -1
  33. package/dist/chunk-ACZ2R47X.cjs.map +1 -1
  34. package/dist/chunk-AYUYJO3I.cjs.map +1 -1
  35. package/dist/chunk-BCA3TCGS.cjs.map +1 -1
  36. package/dist/chunk-BOU2TQ6U.cjs.map +1 -1
  37. package/dist/chunk-BP6KDQ6I.cjs.map +1 -1
  38. package/dist/chunk-BRY3W7N3.cjs.map +1 -1
  39. package/dist/chunk-CAMALM35.cjs.map +1 -1
  40. package/dist/chunk-CCN44NZJ.cjs.map +1 -1
  41. package/dist/chunk-CKKNFFKP.cjs.map +1 -1
  42. package/dist/chunk-CR3JBTP3.cjs.map +1 -1
  43. package/dist/chunk-DJASVBOJ.cjs.map +1 -1
  44. package/dist/chunk-EEB2HDYL.cjs +172 -0
  45. package/dist/chunk-EEB2HDYL.cjs.map +1 -0
  46. package/dist/chunk-ENPSUWTS.cjs.map +1 -1
  47. package/dist/chunk-EQ6P6ZND.cjs.map +1 -1
  48. package/dist/chunk-EXPWQBI3.cjs.map +1 -1
  49. package/dist/chunk-F3I5DOWV.cjs.map +1 -1
  50. package/dist/chunk-F6S3WCCB.cjs.map +1 -1
  51. package/dist/chunk-FQRC4NJG.cjs.map +1 -1
  52. package/dist/chunk-FYISDU2Y.cjs.map +1 -1
  53. package/dist/chunk-GA3KXPIF.cjs.map +1 -1
  54. package/dist/chunk-GG52SAHA.cjs.map +1 -1
  55. package/dist/chunk-GK5FWN4H.cjs.map +1 -1
  56. package/dist/chunk-GSQN5EOO.cjs.map +1 -1
  57. package/dist/chunk-GW7IHYXR.cjs.map +1 -1
  58. package/dist/chunk-HLKFUOAQ.cjs.map +1 -1
  59. package/dist/chunk-HLYGHP6F.cjs.map +1 -1
  60. package/dist/{chunk-ZJRQ2AKS.js → chunk-HNJFRQSY.js} +2 -2
  61. package/dist/chunk-I2W7AO4B.cjs.map +1 -1
  62. package/dist/chunk-I2XGNALG.cjs.map +1 -1
  63. package/dist/chunk-I65QS3YQ.cjs.map +1 -1
  64. package/dist/chunk-IKXGA2Z5.cjs.map +1 -1
  65. package/dist/chunk-IR2LFKKA.cjs.map +1 -1
  66. package/dist/{chunk-GGYLU7YO.cjs → chunk-J4ZB7MU4.cjs} +28 -2
  67. package/dist/chunk-J4ZB7MU4.cjs.map +1 -0
  68. package/dist/chunk-K5Q2H3VD.cjs.map +1 -1
  69. package/dist/{chunk-W3EFNOH6.js → chunk-K74UMEU4.js} +16 -1
  70. package/dist/chunk-K74UMEU4.js.map +1 -0
  71. package/dist/chunk-KD5Y2YWK.cjs.map +1 -1
  72. package/dist/chunk-KJDMNF2T.cjs.map +1 -1
  73. package/dist/chunk-KLONGJCL.cjs.map +1 -1
  74. package/dist/chunk-KOB6MOAV.cjs +113 -0
  75. package/dist/chunk-KOB6MOAV.cjs.map +1 -0
  76. package/dist/chunk-KSJ7JLR3.cjs.map +1 -1
  77. package/dist/chunk-LJ2EG6JK.cjs.map +1 -1
  78. package/dist/chunk-LLYY4TCZ.cjs.map +1 -1
  79. package/dist/chunk-LYIBTVK6.cjs.map +1 -1
  80. package/dist/chunk-M3HWE7KT.cjs.map +1 -1
  81. package/dist/chunk-M3SJHFT4.cjs.map +1 -1
  82. package/dist/chunk-MCNDMK7F.cjs.map +1 -1
  83. package/dist/chunk-MH3DDSRV.js +113 -0
  84. package/dist/chunk-MH3DDSRV.js.map +1 -0
  85. package/dist/chunk-MLG6NXI6.cjs.map +1 -1
  86. package/dist/chunk-NFB3S2E6.cjs.map +1 -1
  87. package/dist/{chunk-4YCQWMFF.js → chunk-NN74DH4Q.js} +4 -4
  88. package/dist/chunk-NYL3BNHR.cjs.map +1 -1
  89. package/dist/chunk-O4AYHLQX.cjs.map +1 -1
  90. package/dist/chunk-ODPNVNYE.cjs.map +1 -1
  91. package/dist/chunk-OG2KJAYD.cjs.map +1 -1
  92. package/dist/{chunk-QT3HUTWI.cjs → chunk-ONEPBY3O.cjs} +7 -7
  93. package/dist/chunk-ONEPBY3O.cjs.map +1 -0
  94. package/dist/chunk-OWP7XBY2.cjs.map +1 -1
  95. package/dist/chunk-OYZP6NF6.cjs.map +1 -1
  96. package/dist/chunk-P6JLNQ6L.cjs.map +1 -1
  97. package/dist/chunk-P7DYLUUI.cjs.map +1 -1
  98. package/dist/chunk-PKAE6AQT.cjs.map +1 -1
  99. package/dist/chunk-PWDY5D5S.cjs.map +1 -1
  100. package/dist/{chunk-7ZNM2ETQ.cjs → chunk-Q7EFAWCG.cjs} +17 -3
  101. package/dist/chunk-Q7EFAWCG.cjs.map +1 -0
  102. package/dist/chunk-Q7M7DO7M.cjs.map +1 -1
  103. package/dist/chunk-QMLU5DST.cjs.map +1 -1
  104. package/dist/chunk-QRSA72B3.cjs.map +1 -1
  105. package/dist/chunk-QYNRNDIY.cjs.map +1 -1
  106. package/dist/chunk-R4FE6K43.cjs.map +1 -1
  107. package/dist/chunk-R4GA6BVP.cjs.map +1 -1
  108. package/dist/chunk-R5VYSZ3Q.cjs.map +1 -1
  109. package/dist/chunk-RI42IDRR.cjs.map +1 -1
  110. package/dist/chunk-RSVLVW4L.cjs.map +1 -1
  111. package/dist/chunk-S77LQWYC.cjs.map +1 -1
  112. package/dist/chunk-S7SBNOGS.cjs.map +1 -1
  113. package/dist/chunk-SQELICSX.cjs.map +1 -1
  114. package/dist/chunk-TMAJE5P2.cjs.map +1 -1
  115. package/dist/chunk-TNIJ6OSH.cjs.map +1 -1
  116. package/dist/{chunk-IB75VVZO.js → chunk-UFJFKEY4.js} +28 -2
  117. package/dist/chunk-UFJFKEY4.js.map +1 -0
  118. package/dist/chunk-UGSM7RJ2.cjs.map +1 -1
  119. package/dist/chunk-UKLZAOLW.cjs.map +1 -1
  120. package/dist/chunk-V47G7P6L.cjs.map +1 -1
  121. package/dist/chunk-VH5A6SMU.cjs.map +1 -1
  122. package/dist/chunk-VOIELJLZ.cjs.map +1 -1
  123. package/dist/chunk-VYC7WUM5.cjs.map +1 -1
  124. package/dist/chunk-W457XUA6.cjs.map +1 -1
  125. package/dist/chunk-WHDI3TMP.cjs.map +1 -1
  126. package/dist/chunk-WITCPKNL.cjs.map +1 -1
  127. package/dist/chunk-WX6NP7UU.cjs.map +1 -1
  128. package/dist/chunk-XQLRIBVR.cjs.map +1 -1
  129. package/dist/chunk-XYX25TII.js +172 -0
  130. package/dist/chunk-XYX25TII.js.map +1 -0
  131. package/dist/chunk-YJQPKT6W.cjs.map +1 -1
  132. package/dist/chunk-YK3P5QNZ.cjs.map +1 -1
  133. package/dist/{chunk-UUDJJOXE.js → chunk-YTJYJB4Z.js} +16 -2
  134. package/dist/chunk-YTJYJB4Z.js.map +1 -0
  135. package/dist/chunk-ZKPVUCQV.cjs.map +1 -1
  136. package/dist/client.cjs +2 -2
  137. package/dist/client.cjs.map +1 -1
  138. package/dist/client.js +1 -1
  139. package/dist/core.cjs.map +1 -1
  140. package/dist/currencies.cjs.map +1 -1
  141. package/dist/enigmaCardForm.cjs.map +1 -1
  142. package/dist/error.cjs.map +1 -1
  143. package/dist/eventStream.cjs.map +1 -1
  144. package/dist/exportDownload.cjs.map +1 -1
  145. package/dist/feeProgram.cjs.map +1 -1
  146. package/dist/index.cjs +6 -6
  147. package/dist/index.cjs.map +1 -1
  148. package/dist/index.d.cts +1 -1
  149. package/dist/index.d.ts +1 -1
  150. package/dist/index.js +5 -5
  151. package/dist/internal/resources/admin.cjs.map +1 -1
  152. package/dist/internal/resources/admin.d.cts +1 -1
  153. package/dist/internal/resources/admin.d.ts +1 -1
  154. package/dist/internal/resources/adminBranding.cjs.map +1 -1
  155. package/dist/internal/resources/adminBranding.d.cts +1 -1
  156. package/dist/internal/resources/adminBranding.d.ts +1 -1
  157. package/dist/internal/resources/adminFileScans.cjs.map +1 -1
  158. package/dist/internal/resources/adminFileScans.d.cts +1 -1
  159. package/dist/internal/resources/adminFileScans.d.ts +1 -1
  160. package/dist/internal/resources/adminIndustries.cjs +2 -2
  161. package/dist/internal/resources/adminIndustries.cjs.map +1 -1
  162. package/dist/internal/resources/adminIndustries.d.cts +22 -2
  163. package/dist/internal/resources/adminIndustries.d.ts +22 -2
  164. package/dist/internal/resources/adminIndustries.js +1 -1
  165. package/dist/internal/resources/adminLive.cjs.map +1 -1
  166. package/dist/internal/resources/adminPortal.cjs +2 -2
  167. package/dist/internal/resources/adminPortal.cjs.map +1 -1
  168. package/dist/internal/resources/adminPortal.d.cts +11 -2
  169. package/dist/internal/resources/adminPortal.d.ts +11 -2
  170. package/dist/internal/resources/adminPortal.js +1 -1
  171. package/dist/internal/resources/adminSupport.cjs.map +1 -1
  172. package/dist/internal/resources/adminSupport.d.cts +1 -1
  173. package/dist/internal/resources/adminSupport.d.ts +1 -1
  174. package/dist/internal/resources/auditLogs.cjs.map +1 -1
  175. package/dist/internal/resources/auditLogs.d.cts +1 -1
  176. package/dist/internal/resources/auditLogs.d.ts +1 -1
  177. package/dist/internal/resources/cache.cjs.map +1 -1
  178. package/dist/internal/resources/cardIssuers.cjs.map +1 -1
  179. package/dist/internal/resources/cardIssuers.d.cts +1 -1
  180. package/dist/internal/resources/cardIssuers.d.ts +1 -1
  181. package/dist/internal/resources/configs.cjs.map +1 -1
  182. package/dist/internal/resources/connectorRestrictionRules.cjs.map +1 -1
  183. package/dist/internal/resources/connectorRestrictionRules.d.cts +1 -1
  184. package/dist/internal/resources/connectorRestrictionRules.d.ts +1 -1
  185. package/dist/internal/resources/connectorRestrictions.cjs.map +1 -1
  186. package/dist/internal/resources/connectorRestrictions.d.cts +1 -1
  187. package/dist/internal/resources/connectorRestrictions.d.ts +1 -1
  188. package/dist/internal/resources/diagnostic.cjs.map +1 -1
  189. package/dist/internal/resources/diagnostic.d.cts +1 -1
  190. package/dist/internal/resources/diagnostic.d.ts +1 -1
  191. package/dist/internal/resources/gsm.cjs.map +1 -1
  192. package/dist/internal/resources/gsm.d.cts +1 -1
  193. package/dist/internal/resources/gsm.d.ts +1 -1
  194. package/dist/internal/resources/nativeRenewals.cjs.map +1 -1
  195. package/dist/internal/resources/nativeRenewals.d.cts +1 -1
  196. package/dist/internal/resources/nativeRenewals.d.ts +1 -1
  197. package/dist/internal/resources/platformBilling.cjs.map +1 -1
  198. package/dist/internal/resources/platformBilling.d.cts +1 -1
  199. package/dist/internal/resources/platformBilling.d.ts +1 -1
  200. package/dist/internal/resources/platformFees.cjs.map +1 -1
  201. package/dist/internal/resources/platformMessageTemplates.cjs.map +1 -1
  202. package/dist/internal/resources/platformSettings.cjs.map +1 -1
  203. package/dist/internal/resources/platformSettings.d.cts +1 -1
  204. package/dist/internal/resources/platformSettings.d.ts +1 -1
  205. package/dist/internal.cjs +11 -11
  206. package/dist/internal.cjs.map +1 -1
  207. package/dist/internal.d.cts +2 -2
  208. package/dist/internal.d.ts +2 -2
  209. package/dist/internal.js +7 -7
  210. package/dist/listQuery.cjs.map +1 -1
  211. package/dist/panes.cjs.map +1 -1
  212. package/dist/paymentPresentation.cjs.map +1 -1
  213. package/dist/recordCounter.cjs.map +1 -1
  214. package/dist/resources/analytics.cjs.map +1 -1
  215. package/dist/resources/analyticsDashboard.cjs.map +1 -1
  216. package/dist/resources/apiKeys.cjs.map +1 -1
  217. package/dist/resources/audit.cjs.map +1 -1
  218. package/dist/resources/authentication.cjs.map +1 -1
  219. package/dist/resources/availabilityOverrides.cjs.map +1 -1
  220. package/dist/resources/billing.cjs.map +1 -1
  221. package/dist/resources/buyerAccount.cjs.map +1 -1
  222. package/dist/resources/buyerBlocklist.cjs.map +1 -1
  223. package/dist/resources/buyerConversations.cjs.map +1 -1
  224. package/dist/resources/buyerEvidenceReviews.cjs.map +1 -1
  225. package/dist/resources/buyerPortal.cjs.map +1 -1
  226. package/dist/resources/cards.cjs.map +1 -1
  227. package/dist/resources/chargebackPrevention.cjs.map +1 -1
  228. package/dist/resources/checkoutMethods.cjs.map +1 -1
  229. package/dist/resources/checkoutRecovery.cjs.map +1 -1
  230. package/dist/resources/checkoutTemplates.cjs.map +1 -1
  231. package/dist/resources/connectors.cjs.map +1 -1
  232. package/dist/resources/costRules.cjs.map +1 -1
  233. package/dist/resources/customers.cjs.map +1 -1
  234. package/dist/resources/deploymentBranding.cjs.map +1 -1
  235. package/dist/resources/disputes.cjs.map +1 -1
  236. package/dist/resources/ephemeralKeys.cjs.map +1 -1
  237. package/dist/resources/events.cjs.map +1 -1
  238. package/dist/resources/export.cjs.map +1 -1
  239. package/dist/resources/externalRecords.cjs.map +1 -1
  240. package/dist/resources/featureMatrix.cjs.map +1 -1
  241. package/dist/resources/fees.cjs.map +1 -1
  242. package/dist/resources/files.cjs.map +1 -1
  243. package/dist/resources/forex.cjs.map +1 -1
  244. package/dist/resources/identityVerifications.cjs.map +1 -1
  245. package/dist/resources/industries.cjs +2 -2
  246. package/dist/resources/industries.cjs.map +1 -1
  247. package/dist/resources/industries.d.cts +79 -7
  248. package/dist/resources/industries.d.ts +79 -7
  249. package/dist/resources/industries.js +1 -1
  250. package/dist/resources/invoiceSettings.cjs.map +1 -1
  251. package/dist/resources/invoices.cjs.map +1 -1
  252. package/dist/resources/live.cjs.map +1 -1
  253. package/dist/resources/mandates.cjs.map +1 -1
  254. package/dist/resources/merchantAccounts.cjs.map +1 -1
  255. package/dist/resources/messageTemplates.cjs.map +1 -1
  256. package/dist/resources/operationLimits.cjs.map +1 -1
  257. package/dist/resources/paymentLinks.cjs.map +1 -1
  258. package/dist/resources/paymentMethods.cjs.map +1 -1
  259. package/dist/resources/payments.cjs.map +1 -1
  260. package/dist/resources/payoutDestinations.cjs.map +1 -1
  261. package/dist/resources/payouts.cjs.map +1 -1
  262. package/dist/resources/paypalDisputes.cjs.map +1 -1
  263. package/dist/resources/persons.cjs +2 -2
  264. package/dist/resources/persons.cjs.map +1 -1
  265. package/dist/resources/persons.d.cts +44 -1
  266. package/dist/resources/persons.d.ts +44 -1
  267. package/dist/resources/persons.js +1 -1
  268. package/dist/resources/poll.cjs.map +1 -1
  269. package/dist/resources/processorCosts.cjs.map +1 -1
  270. package/dist/resources/processorImports.cjs.map +1 -1
  271. package/dist/resources/products.cjs.map +1 -1
  272. package/dist/resources/profileAcquirers.cjs.map +1 -1
  273. package/dist/resources/profiles.cjs.map +1 -1
  274. package/dist/resources/projects.cjs.map +1 -1
  275. package/dist/resources/refunds.cjs.map +1 -1
  276. package/dist/resources/regions.cjs.map +1 -1
  277. package/dist/resources/relay.cjs.map +1 -1
  278. package/dist/resources/risk.cjs.map +1 -1
  279. package/dist/resources/routing.cjs.map +1 -1
  280. package/dist/resources/search.cjs.map +1 -1
  281. package/dist/resources/sellToRestrictions.cjs.map +1 -1
  282. package/dist/resources/settings.cjs.map +1 -1
  283. package/dist/resources/settlement.cjs +2 -2
  284. package/dist/resources/settlement.cjs.map +1 -1
  285. package/dist/resources/settlement.d.cts +11 -1
  286. package/dist/resources/settlement.d.ts +11 -1
  287. package/dist/resources/settlement.js +1 -1
  288. package/dist/resources/shopLabels.cjs.map +1 -1
  289. package/dist/resources/shops.cjs.map +1 -1
  290. package/dist/resources/stripeConnect.cjs.map +1 -1
  291. package/dist/resources/subscriptions.cjs.map +1 -1
  292. package/dist/resources/support.cjs.map +1 -1
  293. package/dist/resources/threeDsRules.cjs.map +1 -1
  294. package/dist/resources/users.cjs.map +1 -1
  295. package/dist/resources/vatRates.cjs.map +1 -1
  296. package/dist/resources/verification.cjs.map +1 -1
  297. package/dist/resources/webhooks.cjs.map +1 -1
  298. package/dist/resources/whopResolutionCases.cjs.map +1 -1
  299. package/dist/{types-BzB_uvZ4.d.ts → types-DNrcQlVr.d.ts} +60 -7
  300. package/dist/{types-DB3G038u.d.cts → types-DxfhVsGN.d.cts} +60 -7
  301. package/dist/types.cjs.map +1 -1
  302. package/dist/types.d.cts +347 -4
  303. package/dist/types.d.ts +347 -4
  304. package/package.json +1 -1
  305. package/dist/chunk-34AF36TY.js +0 -89
  306. package/dist/chunk-34AF36TY.js.map +0 -1
  307. package/dist/chunk-5CNBINCX.cjs +0 -54
  308. package/dist/chunk-5CNBINCX.cjs.map +0 -1
  309. package/dist/chunk-7ZNM2ETQ.cjs.map +0 -1
  310. package/dist/chunk-B2TCNGC2.cjs.map +0 -1
  311. package/dist/chunk-GGYLU7YO.cjs.map +0 -1
  312. package/dist/chunk-IB75VVZO.js.map +0 -1
  313. package/dist/chunk-Q347PTXI.js +0 -54
  314. package/dist/chunk-Q347PTXI.js.map +0 -1
  315. package/dist/chunk-QT3HUTWI.cjs.map +0 -1
  316. package/dist/chunk-UUDJJOXE.js.map +0 -1
  317. package/dist/chunk-W3EFNOH6.js.map +0 -1
  318. package/dist/chunk-XAUPBK6A.cjs.map +0 -1
  319. package/dist/chunk-ZOD4J4XF.cjs +0 -89
  320. package/dist/chunk-ZOD4J4XF.cjs.map +0 -1
  321. /package/dist/{chunk-ZJRQ2AKS.js.map → chunk-HNJFRQSY.js.map} +0 -0
  322. /package/dist/{chunk-4YCQWMFF.js.map → chunk-NN74DH4Q.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/anes/delo-payment/_worktrees/ts-publish-w3/dist/chunk-FYISDU2Y.cjs","../src/resources/profiles.ts"],"names":[],"mappings":"AAAA;ACaO,IAAM,SAAA,EAAN,MAAe;AAAA,EACpB,WAAA,CAA6B,OAAA,EAAoB;AAApB,IAAA,IAAA,CAAA,QAAA,EAAA,OAAA;AAAA,EAAqB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOlD,MAAM,OAAA,CAAQ,SAAA,EAAmB,SAAA,EAAiD;AAChF,IAAA,OAAO,IAAA,CAAK,OAAA;AAAA,MACV,KAAA;AAAA,MACA,CAAA,SAAA,EAAY,kBAAA,CAAmB,SAAS,CAAC,CAAA,kBAAA,EAAqB,kBAAA,CAAmB,SAAS,CAAC,CAAA,QAAA,CAAA;AAAA,MAC3F,EAAE,IAAA,EAAM,EAAE,WAAA,EAAa,KAAK,EAAqC;AAAA,IACnE,CAAA;AAAA,EACF;AAAA;AAAA,EAGA,MAAM,OAAA,CAAQ,SAAA,EAAmB,SA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A,EAAmB,MAAA,EAAwD;AACtF,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,MAAA,EAAQ,CAAA,SAAA,EAAY,kBAAA,CAAmB,SAAS,CAAC,CAAA,iBAAA,CAAA,EAAqB;AAAA,MACxF,IAAA,EAAM;AAAA,IACR,CAAC,CAAA;AAAA,EACH;AAAA,EAEA,MAAM,QAAA,CAAS,SAAA,EAAmB,SAAA,EAA6C;AAC7E,IAAA,OAAO,IAAA,CAAK,OAAA;AAAA,MACV,KAAA;AAAA,MACA,CAAA,SAAA,EAAY,kBAAA,CAAmB,SAAS,CAAC,CAAA,kBAAA,EAAqB,kBAAA,CAAmB,SAAS,CAAC,CAAA;AAAA,IAAA;AAC7F,EAAA;AACF,EAAA;AAGE,IAAA;AAAuF,EAAA;AACzF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAA;AAUE,IAAA;AAA8E,EAAA;AAChF,EAAA;AAQE,IAAA;AAAY,MAAA;AACV,MAAA;AAC2F,MAAA;AAC3F,QAAA;AACQ,QAAA;AACH,MAAA;AACL,IAAA;AACF,EAAA;AACF,EAAA;AAGE,IAAA;AAAY,MAAA;AACV,MAAA;AAC2F,IAAA;AAC7F,EAAA;AACF;AAAA;AAAA,EAAA;AAME,IAAA;AAAY,MAAA;AACV,MAAA;AAC2F,IAAA;AAC7F,EAAA;AACF;AAAA,EAAA;AAIE,IAAA;AAAY,MAAA;AACV,MAAA;AAC2F,IAAA;AAC7F,EAAA;AACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAA;AAgBE,IAAA;AAAY,MAAA;AACV,MAAA;AAC2F,IAAA;AAC7F,EAAA;AAEJ;AD7BA;AACA;AACA;AACA","file":"/home/anes/delo-payment/_worktrees/ts-publish-w3/dist/chunk-FYISDU2Y.cjs","sourcesContent":[null,"import type {\n ProfileCreateRequest,\n ProfileResponse,\n ProfileUpdateRequest,\n ShopArchiveUpdateRequest,\n ShopArchiveResponse,\n ShopPaymentsSwitchRequest,\n ShopPaymentsSwitchResponse,\n ArchivedShopResponse,\n VaultSwitchOffResponse,\n} from '../types';\nimport type { RequestExtras, RequestFn } from '../client';\n\nexport class Profiles {\n constructor(private readonly request: RequestFn) {}\n\n /**\n * Hide a shop from ordinary navigation. Its identity, project membership,\n * settings and retained records remain unchanged. Requires shop write access.\n * Repeating the same state is safe; use restore() to make it visible again.\n */\n async archive(accountId: string, profileId: string): Promise<ShopArchiveResponse> {\n return this.request(\n 'PUT',\n `/account/${encodeURIComponent(accountId)}/business-profile/${encodeURIComponent(profileId)}/archive`,\n { body: { is_archived: true } satisfies ShopArchiveUpdateRequest },\n );\n }\n\n /** Restore an archived shop to navigation with the same identity and project. */\n async restore(accountId: string, profileId: string): Promise<ShopArchiveResponse> {\n return this.request(\n 'PUT',\n `/account/${encodeURIComponent(accountId)}/business-profile/${encodeURIComponent(profileId)}/archive`,\n { body: { is_archived: false } satisfies ShopArchiveUpdateRequest },\n );\n }\n\n /**\n * Switch a shop's payments off. While they are off the shop takes no new\n * payment: creating one, and confirming one no provider holds yet, is\n * refused with `DE_21`, and its hosted checkout does not render. A payment a\n * provider already holds is finished; refunds and disputes are unaffected.\n * Needs the `ShopPaymentsSwitch` area's `Write` and a signed-in user.\n * Repeating the same state is safe.\n *\n * `PUT /account/{accountId}/business-profile/{profileId}/payments-switch`\n */\n async disablePayments(accountId: string, profileId: string): Promise<ShopPaymentsSwitchResponse> {\n return this.request(\n 'PUT',\n `/account/${encodeURIComponent(accountId)}/business-profile/${encodeURIComponent(profileId)}/payments-switch`,\n { body: { payments_disabled: true } satisfies ShopPaymentsSwitchRequest },\n );\n }\n\n /** Switch a shop's payments on again after {@link Profiles.disablePayments}. */\n async enablePayments(accountId: string, profileId: string): Promise<ShopPaymentsSwitchResponse> {\n return this.request(\n 'PUT',\n `/account/${encodeURIComponent(accountId)}/business-profile/${encodeURIComponent(profileId)}/payments-switch`,\n { body: { payments_disabled: false } satisfies ShopPaymentsSwitchRequest },\n );\n }\n\n /** Archived shop identities in the caller's merchant and shop-read scope. */\n async listArchived(accountId: string): Promise<ArchivedShopResponse[]> {\n return this.request(\n 'GET',\n `/account/${encodeURIComponent(accountId)}/business-profile/archived`,\n );\n }\n\n async create(accountId: string, params: ProfileCreateRequest): Promise<ProfileResponse> {\n return this.request('POST', `/account/${encodeURIComponent(accountId)}/business-profile`, {\n body: params,\n });\n }\n\n async retrieve(accountId: string, profileId: string): Promise<ProfileResponse> {\n return this.request(\n 'GET',\n `/account/${encodeURIComponent(accountId)}/business-profile/${encodeURIComponent(profileId)}`,\n );\n }\n\n async list(accountId: string): Promise<ProfileResponse[]> {\n return this.request('GET', `/account/${encodeURIComponent(accountId)}/business-profile`);\n }\n\n /**\n * List the business profiles the caller can see at profile scope — the\n * `ProfileAccountRead` twin of `list()` (which needs merchant-level read).\n * A shop-scoped user gets exactly their own shop back.\n *\n * `GET /account/{accountId}/profile`\n */\n async listByProfile(accountId: string): Promise<ProfileResponse[]> {\n return this.request('GET', `/account/${encodeURIComponent(accountId)}/profile`);\n }\n\n async update(\n accountId: string,\n profileId: string,\n params: ProfileUpdateRequest,\n options?: RequestExtras,\n ): Promise<ProfileResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(accountId)}/business-profile/${encodeURIComponent(profileId)}`,\n {\n body: params,\n ...options,\n },\n );\n }\n\n async delete(accountId: string, profileId: string): Promise<ProfileResponse> {\n return this.request(\n 'DELETE',\n `/account/${encodeURIComponent(accountId)}/business-profile/${encodeURIComponent(profileId)}`,\n );\n }\n\n // --- Advanced operations (Task 4.8) ---\n\n /** Toggle extended card info for a profile. `POST /account/{accountId}/business-profile/{profileId}/toggle-extended-card-info` */\n async toggleExtendedCardInfo(accountId: string, profileId: string): Promise<ProfileResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(accountId)}/business-profile/${encodeURIComponent(profileId)}/toggle-extended-card-info`,\n );\n }\n\n /** Toggle connector agnostic MIT. `POST /account/{accountId}/business-profile/{profileId}/toggle-connector-agnostic-mit` */\n async toggleConnectorAgnosticMit(accountId: string, profileId: string): Promise<ProfileResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(accountId)}/business-profile/${encodeURIComponent(profileId)}/toggle-connector-agnostic-mit`,\n );\n }\n\n /**\n * Switch the shop's card vault off. From the next checkout on, the checkout\n * draws each processor's own card form and card payments no longer depend on\n * the vault account. Cards saved in the vault cannot be charged while it is\n * off.\n *\n * The vault stays configured; switch it on again with {@link Profiles.update},\n * which verifies the vault first. Needs the permission to edit the shop's\n * connectors, not the one to edit the shop. Calling it for a shop whose vault\n * is already off changes nothing.\n *\n * `POST /account/{accountId}/business-profile/{profileId}/vault/switch-off`\n */\n async switchVaultOff(accountId: string, profileId: string): Promise<VaultSwitchOffResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(accountId)}/business-profile/${encodeURIComponent(profileId)}/vault/switch-off`,\n );\n }\n}\n"]}
1
+ {"version":3,"sources":["/home/anes/delo-payment/_publish/sdk-0.423/dist/chunk-FYISDU2Y.cjs","../src/resources/profiles.ts"],"names":[],"mappings":"AAAA;ACaO,IAAM,SAAA,EAAN,MAAe;AAAA,EACpB,WAAA,CAA6B,OAAA,EAAoB;AAApB,IAAA,IAAA,CAAA,QAAA,EAAA,OAAA;AAAA,EAAqB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOlD,MAAM,OAAA,CAAQ,SAAA,EAAmB,SAAA,EAAiD;AAChF,IAAA,OAAO,IAAA,CAAK,OAAA;AAAA,MACV,KAAA;AAAA,MACA,CAAA,SAAA,EAAY,kBAAA,CAAmB,SAAS,CAAC,CAAA,kBAAA,EAAqB,kBAAA,CAAmB,SAAS,CAAC,CAAA,QAAA,CAAA;AAAA,MAC3F,EAAE,IAAA,EAAM,EAAE,WAAA,EAAa,KAAK,EAAqC;AAAA,IACnE,CAAA;AAAA,EACF;AAAA;AAAA,EAGA,MAAM,OAAA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UpdateRequest,\n ShopArchiveUpdateRequest,\n ShopArchiveResponse,\n ShopPaymentsSwitchRequest,\n ShopPaymentsSwitchResponse,\n ArchivedShopResponse,\n VaultSwitchOffResponse,\n} from '../types';\nimport type { RequestExtras, RequestFn } from '../client';\n\nexport class Profiles {\n constructor(private readonly request: RequestFn) {}\n\n /**\n * Hide a shop from ordinary navigation. Its identity, project membership,\n * settings and retained records remain unchanged. Requires shop write access.\n * Repeating the same state is safe; use restore() to make it visible again.\n */\n async archive(accountId: string, profileId: string): Promise<ShopArchiveResponse> {\n return this.request(\n 'PUT',\n `/account/${encodeURIComponent(accountId)}/business-profile/${encodeURIComponent(profileId)}/archive`,\n { body: { is_archived: true } satisfies ShopArchiveUpdateRequest },\n );\n }\n\n /** Restore an archived shop to navigation with the same identity and project. */\n async restore(accountId: string, profileId: string): Promise<ShopArchiveResponse> {\n return this.request(\n 'PUT',\n `/account/${encodeURIComponent(accountId)}/business-profile/${encodeURIComponent(profileId)}/archive`,\n { body: { is_archived: false } satisfies ShopArchiveUpdateRequest },\n );\n }\n\n /**\n * Switch a shop's payments off. While they are off the shop takes no new\n * payment: creating one, and confirming one no provider holds yet, is\n * refused with `DE_21`, and its hosted checkout does not render. A payment a\n * provider already holds is finished; refunds and disputes are unaffected.\n * Needs the `ShopPaymentsSwitch` area's `Write` and a signed-in user.\n * Repeating the same state is safe.\n *\n * `PUT /account/{accountId}/business-profile/{profileId}/payments-switch`\n */\n async disablePayments(accountId: string, profileId: string): Promise<ShopPaymentsSwitchResponse> {\n return this.request(\n 'PUT',\n `/account/${encodeURIComponent(accountId)}/business-profile/${encodeURIComponent(profileId)}/payments-switch`,\n { body: { payments_disabled: true } satisfies ShopPaymentsSwitchRequest },\n );\n }\n\n /** Switch a shop's payments on again after {@link Profiles.disablePayments}. */\n async enablePayments(accountId: string, profileId: string): Promise<ShopPaymentsSwitchResponse> {\n return this.request(\n 'PUT',\n `/account/${encodeURIComponent(accountId)}/business-profile/${encodeURIComponent(profileId)}/payments-switch`,\n { body: { payments_disabled: false } satisfies ShopPaymentsSwitchRequest },\n );\n }\n\n /** Archived shop identities in the caller's merchant and shop-read scope. */\n async listArchived(accountId: string): Promise<ArchivedShopResponse[]> {\n return this.request(\n 'GET',\n `/account/${encodeURIComponent(accountId)}/business-profile/archived`,\n );\n }\n\n async create(accountId: string, params: ProfileCreateRequest): Promise<ProfileResponse> {\n return this.request('POST', `/account/${encodeURIComponent(accountId)}/business-profile`, {\n body: params,\n });\n }\n\n async retrieve(accountId: string, profileId: string): Promise<ProfileResponse> {\n return this.request(\n 'GET',\n `/account/${encodeURIComponent(accountId)}/business-profile/${encodeURIComponent(profileId)}`,\n );\n }\n\n async list(accountId: string): Promise<ProfileResponse[]> {\n return this.request('GET', `/account/${encodeURIComponent(accountId)}/business-profile`);\n }\n\n /**\n * List the business profiles the caller can see at profile scope — the\n * `ProfileAccountRead` twin of `list()` (which needs merchant-level read).\n * A shop-scoped user gets exactly their own shop back.\n *\n * `GET /account/{accountId}/profile`\n */\n async listByProfile(accountId: string): Promise<ProfileResponse[]> {\n return this.request('GET', `/account/${encodeURIComponent(accountId)}/profile`);\n }\n\n async update(\n accountId: string,\n profileId: string,\n params: ProfileUpdateRequest,\n options?: RequestExtras,\n ): Promise<ProfileResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(accountId)}/business-profile/${encodeURIComponent(profileId)}`,\n {\n body: params,\n ...options,\n },\n );\n }\n\n async delete(accountId: string, profileId: string): Promise<ProfileResponse> {\n return this.request(\n 'DELETE',\n `/account/${encodeURIComponent(accountId)}/business-profile/${encodeURIComponent(profileId)}`,\n );\n }\n\n // --- Advanced operations (Task 4.8) ---\n\n /** Toggle extended card info for a profile. `POST /account/{accountId}/business-profile/{profileId}/toggle-extended-card-info` */\n async toggleExtendedCardInfo(accountId: string, profileId: string): Promise<ProfileResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(accountId)}/business-profile/${encodeURIComponent(profileId)}/toggle-extended-card-info`,\n );\n }\n\n /** Toggle connector agnostic MIT. `POST /account/{accountId}/business-profile/{profileId}/toggle-connector-agnostic-mit` */\n async toggleConnectorAgnosticMit(accountId: string, profileId: string): Promise<ProfileResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(accountId)}/business-profile/${encodeURIComponent(profileId)}/toggle-connector-agnostic-mit`,\n );\n }\n\n /**\n * Switch the shop's card vault off. From the next checkout on, the checkout\n * draws each processor's own card form and card payments no longer depend on\n * the vault account. Cards saved in the vault cannot be charged while it is\n * off.\n *\n * The vault stays configured; switch it on again with {@link Profiles.update},\n * which verifies the vault first. Needs the permission to edit the shop's\n * connectors, not the one to edit the shop. Calling it for a shop whose vault\n * is already off changes nothing.\n *\n * `POST /account/{accountId}/business-profile/{profileId}/vault/switch-off`\n */\n async switchVaultOff(accountId: string, profileId: string): Promise<VaultSwitchOffResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(accountId)}/business-profile/${encodeURIComponent(profileId)}/vault/switch-off`,\n );\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/anes/delo-payment/_worktrees/ts-publish-w3/dist/chunk-GA3KXPIF.cjs","../src/resources/connectors.ts"],"names":[],"mappings":"AAAA;ACuDO,IAAM,WAAA,EAAN,MAAiB;AAAA,EACtB,WAAA,CAA6B,OAAA,EAAoB;AAApB,IAAA,IAAA,CAAA,QAAA,EAAA,OAAA;AAAA,EAAqB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAYlD,MAAM,4BAAA,CACJ,UAAA,EACA,WAAA,EACA,MAAA,EACqC;AACrC,IAAA,OAAO,IAAA,CAAK,OAAA;AAAA,MACV,KAAA;AAAA,MACA,CAAA,SAAA,EAAY,kBAAA,CAAmB,UAAU,CAAC,CAAA,YAAA,EAAe,kBAAA,CAAmB,WAAW,CAAC,CAAA,uBAAA,CAAA;AAAA,MACxF,EAAE,KAAA,EAAO,EAAE,SAAA,EA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A;AAAA;AAAA;AAAA,EAAA;AAgBE,IAAA;AAAwF,MAAA;AAChF,IAAA;AACP,EAAA;AACH;AAAA,EAAA;AAIE,IAAA;AAAqD,EAAA;AAEzD;AAEA;AACE,EAAA;AACF;ADlOA;AACA;AACA;AACA","file":"/home/anes/delo-payment/_worktrees/ts-publish-w3/dist/chunk-GA3KXPIF.cjs","sourcesContent":[null,"import type {\n ConnectorBuyerMailQuery,\n ConnectorBuyerMailResponse,\n ConnectorBuyerMailUpdate,\n ConnectorCloneRequest,\n ConnectorConsolidationRequest,\n ConnectorConsolidationResponse,\n ConnectorCurrencyPolicyResponse,\n ConnectorCurrencyPolicyUpdateRequest,\n ConnectorShopsAddRequest,\n ConnectorShopUpdateRequest,\n ConnectorShopsResponse,\n ConnectorHealthResponse,\n EpayoutsCatalogResponse,\n PanesCatalogResponse,\n VaultRoutesApplyRequest,\n VaultRoutesApplyResponse,\n VaultRoutesPreviewRequest,\n VaultRoutesPreviewResponse,\n VaultOutagesResponse,\n VaultVerificationResponse,\n VaultVerifyRequest,\n ConnectorCreateRequest,\n ConnectorResponse,\n ConnectorUpdateRequest,\n ConnectorWebhookListResponse,\n ConnectorWebhookRegisterRequest,\n ConnectorWebhookRegisterResponse,\n ConnectorWebhookSyncResponse,\n WebhookAddressPreviewResponse,\n WebhookAddressRequest,\n WebhookAddressResponse,\n ReturnAddressPreviewResponse,\n ReturnAddressRequest,\n ReturnAddressResponse,\n ProviderWebhookCreateRequest,\n ProviderWebhookCreateResponse,\n ProviderWebhookDeleteRequest,\n ProviderWebhookDeleteResult,\n ProviderWebhookEndpoint,\n ProviderWebhookListResponse,\n ProviderWebhookReplacePreviewResponse,\n ProviderWebhookReplaceRequest,\n ProviderWebhookReplaceResponse,\n ProviderWebhookUpdateRequest,\n WebhookRegistrationEnvironment,\n AirwallexApplePayDomainsRegisterRequest,\n AirwallexApplePayDomainsRegisterResponse,\n StripePaymentMethodDomainsRegisterRequest,\n StripePaymentMethodDomainsRegisterResponse,\n WhopApplePayDomainsRegisterRequest,\n WhopApplePayDomainsRegisterResponse,\n} from '../types';\nimport type { RequestExtras, RequestFn } from '../client';\n\nexport class Connectors {\n constructor(private readonly request: RequestFn) {}\n\n /**\n * Read the connected provider account's optional buyer-email preference.\n * Currently supported for Whop. Use `setJwtToken` with a merchant JWT that\n * has Connector Edit authority; a shop token or API key cannot substitute.\n * Select Sandbox or Live explicitly through `test_mode`.\n *\n * The preference affects every shop sharing the provider account. It does\n * not disable mandatory provider messages or DeloPay invoice delivery.\n * A null or absent value establishes no on/off preference.\n */\n async retrieveBuyerEmailPreference(\n merchantId: string,\n connectorId: string,\n params: ConnectorBuyerMailQuery,\n ): Promise<ConnectorBuyerMailResponse> {\n return this.request(\n 'GET',\n `/account/${encodeURIComponent(merchantId)}/connectors/${encodeURIComponent(connectorId)}/buyer-email-preference`,\n { query: { test_mode: params.test_mode } },\n );\n }\n\n /**\n * Change the optional buyer-email preference for the whole provider account.\n * Currently supported for Whop. Requires a merchant JWT with Connector Edit\n * authority and explicit confirmation for every shop sharing the account.\n * Send the exact account, credential mode and value read before confirmation;\n * a changed account or preference is refused before mutation.\n *\n * Inspect `outcome`: only `verified` confirms the requested value through a\n * fresh exact-account read. HTTP 200 may instead report a conflict, refusal\n * or unknown outcome. An uncertain change may have happened; read the\n * preference again before retrying, including after a transport error.\n * This method adds no automatic readback or retry. Mandatory provider\n * messages and DeloPay invoice delivery are unaffected.\n */\n async updateBuyerEmailPreference(\n merchantId: string,\n connectorId: string,\n params: ConnectorBuyerMailUpdate,\n ): Promise<ConnectorBuyerMailResponse> {\n return this.request(\n 'PUT',\n `/account/${encodeURIComponent(merchantId)}/connectors/${encodeURIComponent(connectorId)}/buyer-email-preference`,\n { body: params },\n );\n }\n\n async create(accountId: string, params: ConnectorCreateRequest): Promise<ConnectorResponse> {\n return this.request('POST', `/account/${encodeURIComponent(accountId)}/connectors`, {\n body: params,\n });\n }\n\n /**\n * One connector account.\n *\n * The credential-bearing fields come back `null` here, whatever is stored:\n * `connector_webhook_details`, `connector_wallets_details`,\n * `pm_auth_config` and `additional_merchant_data`. They are dropped rather\n * than masked, because an editor that prefills from this response and\n * PATCHes the field back would otherwise save a mask over a live signing\n * secret. Send those fields only when the operator has typed a new value,\n * and omit them entirely otherwise — an omitted field leaves the stored one\n * alone.\n *\n * This is the retrieve path alone. `create` and `update` echo back what the\n * caller sent, and `clone` returns the *copied* secrets — see that method.\n *\n * Because the value is gone, `has_live_webhook_secret` and\n * `has_sandbox_webhook_secret` are what tell a stored webhook signing secret\n * from an unconfigured one. Render those; never infer configuration from the\n * `null` block.\n *\n * `GET /account/{accountId}/connectors/{connectorId}`\n */\n async retrieve(accountId: string, connectorId: string): Promise<ConnectorResponse> {\n return this.request(\n 'GET',\n `/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}`,\n );\n }\n\n /**\n * The merchant's connector accounts.\n *\n * Never wider than the caller: an API key pinned to one shop lists that\n * shop's connectors only, not every sibling shop's.\n *\n * `GET /account/{accountId}/connectors`\n */\n async list(accountId: string): Promise<ConnectorResponse[]> {\n return this.request('GET', `/account/${encodeURIComponent(accountId)}/connectors`);\n }\n\n /**\n * The profile-scoped connector list. The merchant-wide `list()` is\n * merchant-gated and 403s for a profile-entity (shop user) JWT; this\n * variant is scoped server-side to the caller's own profile.\n *\n * `GET /account/{accountId}/profile/connectors`\n */\n async listByProfile(accountId: string): Promise<ConnectorResponse[]> {\n return this.request('GET', `/account/${encodeURIComponent(accountId)}/profile/connectors`);\n }\n\n /**\n * Every connector's pane capabilities, as the router itself knows them —\n * which rails a connector supports, and which methods it can publish as a\n * pane with the confirm routing keys each one carries.\n *\n * Capability facts only: no label, sublabel or category comes back. A\n * designer renders a method's copy from its own locale files, keyed by\n * `key`, and takes `payment_method` / `payment_method_type` from here\n * verbatim rather than deriving them client-side.\n *\n * This is what the pane helpers in `src/panes.ts` should be driven from —\n * `paneMethodInfo`, `defaultPane` and `validatePanes` all take a\n * {@link PanesConnectorCatalog} out of this response, so a connector the\n * router starts publishing panes for needs no SDK release.\n *\n * `GET /account/{accountId}/connectors/native-panes/catalog`\n *\n * The path keeps the `native-panes` spelling deliberately. The identifiers\n * were renamed off \"native pane\"; the route was not, and pointing at the\n * backend's new name before it is deployed everywhere would both 404 against\n * un-upgraded replicas mid-rollout and fail `scripts/parity-check.mjs`,\n * which blocks publishing.\n */\n async getPanesCatalog(accountId: string): Promise<PanesCatalogResponse> {\n return this.request(\n 'GET',\n `/account/${encodeURIComponent(accountId)}/connectors/native-panes/catalog`,\n );\n }\n\n /** @deprecated Renamed to {@link getPanesCatalog}. Removed in 0.112.0. */\n async getNativePanesCatalog(accountId: string): Promise<PanesCatalogResponse> {\n return this.getPanesCatalog(accountId);\n }\n\n /**\n * Sweep the merchant's own e-Payouts module and return the rails it\n * actually has enabled. Server-side this makes many upstream calls, so it\n * can take several seconds — show progress.\n *\n * `POST /account/{accountId}/connectors/{connectorId}/epayouts/catalog/sync`\n */\n async syncEpayoutsCatalog(\n accountId: string,\n connectorId: string,\n ): Promise<EpayoutsCatalogResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}/epayouts/catalog/sync`,\n );\n }\n\n /**\n * Update a connector account.\n *\n * `connector_webhook_details` **merges** into the stored block key by key:\n * an absent key keeps its stored secret, an explicit value is written, and\n * an explicit empty string clears that secret. Send only the\n * keys the operator typed — padding the other environment's keys with `''`\n * clears a live signing secret and inbound webhooks stop verifying.\n *\n * The other credential-bearing fields — `connector_wallets_details`,\n * `pm_auth_config`, `additional_merchant_data` — are still whole-value\n * replacements: omit them unless you are writing a complete new value.\n *\n * `POST /account/{accountId}/connectors/{connectorId}`\n */\n async update(\n accountId: string,\n connectorId: string,\n params: ConnectorUpdateRequest,\n options?: RequestExtras,\n ): Promise<ConnectorResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}`,\n {\n body: params,\n ...options,\n },\n );\n }\n\n /**\n * Remove a connector account.\n *\n * A shop-scoped role may remove a connector of its own shop — the shop is\n * re-checked server-side — so creating processors and removing them are the\n * same rung of access rather than two.\n *\n * `DELETE /account/{accountId}/connectors/{connectorId}`\n */\n async delete(accountId: string, connectorId: string): Promise<ConnectorResponse> {\n return this.request(\n 'DELETE',\n `/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}`,\n );\n }\n\n /**\n * Clone a connector into another shop (business profile) of the same\n * merchant. `POST /account/{accountId}/connectors/{connectorId}/clone`\n *\n * Credentials are copied server-side, re-encrypted under the same merchant\n * key, so the caller never has to *supply* them — `retrieve` returns `null`\n * for the credential fields, which is what makes a client-side copy\n * impossible in the first place.\n *\n * The response, however, is the unredacted connector: `connector_account_details`\n * is masked, but `connector_webhook_details`, `connector_wallets_details`,\n * `pm_auth_config` and `additional_merchant_data` come back with the copied\n * secrets in them — values this caller never sent. Do not log or echo the\n * response; read `merchant_connector_id` and discard the rest.\n */\n async clone(\n accountId: string,\n connectorId: string,\n params: ConnectorCloneRequest,\n ): Promise<ConnectorResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}/clone`,\n { body: params },\n );\n }\n\n /**\n * Share a connector with more shops of the same merchant.\n * `POST /account/{accountId}/connectors/{connectorId}/shops`\n *\n * Nothing is copied: every shop sends payments to the same account, on the\n * same credentials and webhook, and the account's limits count them all.\n */\n async addShops(\n accountId: string,\n connectorId: string,\n params: ConnectorShopsAddRequest,\n ): Promise<ConnectorShopsResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}/shops`,\n { body: params },\n );\n }\n\n /**\n * Fold copies of the same provider account into this connector.\n * `POST /account/{accountId}/connectors/{connectorId}/consolidate`\n *\n * The copies' shops move to the connector with their on/off state, routing,\n * checkout layout, currencies, saved credentials, mandates and\n * subscriptions. A copy keeps answering for the payments made on it and\n * serves no shop. Send `dry_run: true` first, then confirm with the\n * preview's `preview_token` and a choice for every conflict.\n */\n async consolidate(\n accountId: string,\n connectorId: string,\n params: ConnectorConsolidationRequest,\n ): Promise<ConnectorConsolidationResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}/consolidate`,\n { body: params },\n );\n }\n\n /**\n * Switch a connector off, or back on, in one shop it serves.\n * `POST /account/{accountId}/connectors/{connectorId}/shops/{profileId}`\n */\n async setShopDisabled(\n accountId: string,\n connectorId: string,\n profileId: string,\n params: ConnectorShopUpdateRequest,\n ): Promise<ConnectorShopsResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}/shops/${encodeURIComponent(profileId)}`,\n { body: params },\n );\n }\n\n /**\n * Stop a connector serving one shop. Any shop may leave, the\n * one the connector was created in included, while another one stays: the\n * last shop is refused, and the connector is deleted instead. The account,\n * its limits and every other shop on it are unaffected.\n * `DELETE /account/{accountId}/connectors/{connectorId}/shops/{profileId}`\n */\n async removeShop(\n accountId: string,\n connectorId: string,\n profileId: string,\n ): Promise<ConnectorShopsResponse> {\n return this.request(\n 'DELETE',\n `/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}/shops/${encodeURIComponent(profileId)}`,\n );\n }\n\n /**\n * Read the transaction currencies a connector may process: its own list,\n * what the provider is known to accept with its methods, and the effective\n * currencies in each shop it serves.\n * `GET /account/{accountId}/connectors/{connectorId}/currencies`\n */\n async getCurrencies(\n accountId: string,\n connectorId: string,\n ): Promise<ConnectorCurrencyPolicyResponse> {\n return this.request(\n 'GET',\n `/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}/currencies`,\n );\n }\n\n /**\n * Set the transaction currencies a connector may process in every shop it\n * serves, and what it does with a payment in a currency it does not take\n * (`conversion`). `allowed_currencies: null` allows every currency the\n * provider supports; a field left out stays as it is. With `dry_run`,\n * nothing is saved and `impact` reports the effect.\n * `PUT /account/{accountId}/connectors/{connectorId}/currencies`\n */\n async setCurrencies(\n accountId: string,\n connectorId: string,\n params: ConnectorCurrencyPolicyUpdateRequest,\n ): Promise<ConnectorCurrencyPolicyResponse> {\n return this.request(\n 'PUT',\n `/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}/currencies`,\n { body: params },\n );\n }\n\n /**\n * Narrow a connector's currencies in one shop it serves, within the\n * connector's own list, or set the shop's own `conversion`. `null` returns\n * the shop to the connector's setting; a field left out stays as it is.\n * `PUT /account/{accountId}/connectors/{connectorId}/shops/{profileId}/currencies`\n */\n async setShopCurrencies(\n accountId: string,\n connectorId: string,\n profileId: string,\n params: ConnectorCurrencyPolicyUpdateRequest,\n ): Promise<ConnectorCurrencyPolicyResponse> {\n return this.request(\n 'PUT',\n `/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}/shops/${encodeURIComponent(profileId)}/currencies`,\n { body: params },\n );\n }\n\n // --- Advanced operations (Task 4.8) ---\n\n /**\n * Run the configuration checks for a vault (VGS) connector account:\n * credential validity, write-only Collect scope, reachability, environment\n * coherence, route coverage. Read-only but not cheap — it decrypts the\n * vault's management credential and talks to VGS.\n *\n * `POST /account/{accountId}/connectors/{connectorId}/vault/verify`\n */\n async verifyVault(\n accountId: string,\n connectorId: string,\n params: VaultVerifyRequest,\n ): Promise<VaultVerificationResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}/vault/verify`,\n { body: params },\n );\n }\n\n /**\n * The shops whose card vault is switched on and whose vault account has\n * stopped working, each with the cause. While a shop is listed, its card\n * form cannot be shown and its card payments fail.\n *\n * An outage is listed once the vault has refused the account several times\n * in a row over at least a minute, and is taken off the list when the vault\n * serves the account again. Nothing switches a vault off by itself: see\n * `profiles.switchVaultOff`.\n *\n * `GET /account/{accountId}/vault/outages`\n */\n async listVaultOutages(accountId: string): Promise<VaultOutagesResponse> {\n return this.request('GET', `/account/${encodeURIComponent(accountId)}/vault/outages`);\n }\n\n /**\n * Compute the route document the vault SHOULD have and diff it against\n * what exists, without writing anything. The returned fingerprints must be\n * echoed byte for byte on {@link Connectors.applyVaultRoutes}.\n *\n * A router without these endpoints answers 404 — render that as \"this\n * build cannot configure routes\", never as \"there is nothing to change\".\n *\n * `POST /account/{accountId}/connectors/{connectorId}/vault/routes/preview`\n */\n async previewVaultRoutes(\n accountId: string,\n connectorId: string,\n params: VaultRoutesPreviewRequest,\n ): Promise<VaultRoutesPreviewResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}/vault/routes/preview`,\n { body: params },\n );\n }\n\n /**\n * Write the routes the merchant just previewed. Both fingerprints come\n * from the preview and are opaque: `expected_current_fingerprint` says the\n * vault has not moved (`null` = \"the preview found no routes\" and is sent\n * as `null`, never omitted), `expected_desired_fingerprint` says the\n * document is still the one on screen. A 409 (`DE_04`) means the vault\n * changed since the preview — nothing was written; preview again.\n *\n * `POST /account/{accountId}/connectors/{connectorId}/vault/routes/apply`\n */\n async applyVaultRoutes(\n accountId: string,\n connectorId: string,\n params: VaultRoutesApplyRequest,\n ): Promise<VaultRoutesApplyResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}/vault/routes/apply`,\n { body: params },\n );\n }\n\n /**\n * What the processor says about this connector account: whether it will\n * accept charges, which capabilities are live, and anything it is still\n * waiting on.\n *\n * This is **not** {@link Connectors.verify}. That one asks whether the stored\n * credentials work, by running a test-card authorization; a processor can\n * revoke an account's ability to take payments while the credentials stay\n * perfectly valid, and then a credential check reports healthy while every\n * checkout silently stalls. This asks the account's own status instead, and\n * does not create a payment. By default it reads a scheduler snapshot;\n * `refresh: true` asks for a new probe and `stale` identifies an overdue result.\n * `test_mode` selects the requested environment; `credential_source` identifies\n * a sandbox, live or shared credential set. Not every provider reports chargeability.\n *\n * Connectors with no probe answer `state: 'unknown'` with\n * `unknown_reason: 'connector_not_supported'`, rather than an error — every\n * `'unknown'` carries a reason code you render your own words for. A router\n * without this endpoint answers 404 — render that as \"this build cannot\n * report health\", never as \"healthy\".\n *\n * `GET /account/{accountId}/connectors/{connectorId}/health`\n */\n async health(\n accountId: string,\n connectorId: string,\n options?: { test_mode?: boolean; refresh?: boolean },\n ): Promise<ConnectorHealthResponse> {\n return this.request(\n 'GET',\n `/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}/health`,\n { query: options },\n );\n }\n\n /** Verify connector credentials. `POST /account/connectors/verify` */\n async verify(params: Record<string, unknown>): Promise<Record<string, unknown>> {\n return this.request('POST', '/account/connectors/verify', { body: params });\n }\n\n /**\n * Register a webhook for a connector.\n * `POST /account/{merchantId}/connectors/webhooks/{connectorId}`\n *\n * @param params - Optional event scope. Defaults to `{ event_type: 'all_events' }`\n * when omitted; pass `{ event_type: { specific_event: '…' } }` to scope\n * to a single event.\n */\n async registerWebhook(\n merchantId: string,\n connectorId: string,\n params?: ConnectorWebhookRegisterRequest,\n ): Promise<ConnectorWebhookRegisterResponse> {\n const path = `/account/${encodeURIComponent(merchantId)}/connectors/webhooks/${encodeURIComponent(connectorId)}`;\n if (params === undefined) return this.request('POST', path);\n return this.request('POST', path, { body: params });\n }\n\n /**\n * Register checkout/shop domains as Stripe payment method domains, so Apple\n * Pay renders on those pages.\n * `POST /account/{merchantId}/connectors/{connectorId}/stripe/payment-method-domains`\n *\n * Stripe connectors only. One call registers against a single credential set\n * (`environment`, default `'live'`) — call twice to cover live and sandbox.\n * Per-URL outcomes come back in `results`; a missing sandbox credential set\n * is a request-level 400.\n */\n async registerStripePaymentMethodDomains(\n merchantId: string,\n connectorId: string,\n params: StripePaymentMethodDomainsRegisterRequest,\n ): Promise<StripePaymentMethodDomainsRegisterResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(merchantId)}/connectors/${encodeURIComponent(connectorId)}/stripe/payment-method-domains`,\n { body: params },\n );\n }\n\n /**\n * Register checkout/shop domains as Airwallex Apple Pay domains, so Apple Pay\n * renders on those pages.\n * `POST /account/{merchantId}/connectors/{connectorId}/airwallex/apple-pay-domains`\n *\n * Airwallex connectors only. One call registers against a single credential\n * set (`environment`, default `'live'`) — call twice to cover live and\n * sandbox. Idempotent: a host already on the account comes back\n * `already_registered` without a write.\n */\n async registerAirwallexApplePayDomains(\n merchantId: string,\n connectorId: string,\n params: AirwallexApplePayDomainsRegisterRequest,\n ): Promise<AirwallexApplePayDomainsRegisterResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(merchantId)}/connectors/${encodeURIComponent(connectorId)}/airwallex/apple-pay-domains`,\n { body: params },\n );\n }\n\n /**\n * Register and verify checkout/shop domains as Whop Apple Pay payment method\n * domains, so Apple Pay renders in Whop's embedded card form on those pages.\n * `POST /account/{merchantId}/connectors/{connectorId}/whop/apple-pay-domains`\n *\n * Whop connectors only. One call registers against a single credential set\n * (`environment`, default `'live'`) — call twice to cover live and sandbox.\n * Idempotent: a host Whop already holds as verified comes back\n * `already_verified` without a write, and a `pending` one is verified again.\n */\n async registerWhopApplePayDomains(\n merchantId: string,\n connectorId: string,\n params: WhopApplePayDomainsRegisterRequest,\n ): Promise<WhopApplePayDomainsRegisterResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(merchantId)}/connectors/${encodeURIComponent(connectorId)}/whop/apple-pay-domains`,\n { body: params },\n );\n }\n\n /** Get registered webhooks for a connector. `GET /account/{merchantId}/connectors/webhooks/{connectorId}` */\n async getWebhook(merchantId: string, connectorId: string): Promise<ConnectorWebhookListResponse> {\n return this.request(\n 'GET',\n `/account/${encodeURIComponent(merchantId)}/connectors/webhooks/${encodeURIComponent(connectorId)}`,\n );\n }\n\n /**\n * Bring an already-registered webhook's event subscription up to date with\n * the events Delopay handles.\n * `POST /account/{merchantId}/connectors/webhooks/{connectorId}/sync-events`\n *\n * A PSP freezes an endpoint's event list at registration time, so an endpoint\n * created before an event type was added never receives it — silently, with\n * no error anywhere. {@link getWebhook} reports the gap as `missing_events`;\n * this repairs it.\n *\n * Unlike re-registering, the endpoints are updated in place: the endpoint id\n * and its signing secret are preserved, so signature verification keeps\n * working across the change. Stripe connectors only; idempotent, so it is\n * safe to call on a schedule or after every deploy.\n *\n * @example\n * ```typescript\n * const sync = await delopay.connectors.syncWebhookEvents('mer_abc', 'mca_xyz');\n * for (const endpoint of sync.endpoints) {\n * if (endpoint.error_message) console.warn(endpoint.connector_webhook_id, endpoint.error_message);\n * else if (endpoint.updated) console.log('subscribed', endpoint.added_events);\n * }\n * ```\n */\n async syncWebhookEvents(\n merchantId: string,\n connectorId: string,\n ): Promise<ConnectorWebhookSyncResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(merchantId)}/connectors/webhooks/${encodeURIComponent(connectorId)}/sync-events`,\n );\n }\n\n /**\n * Read the callback addresses of a connector's payment provider.\n * `GET /account/{merchantId}/connectors/webhooks/{connectorId}/address`\n *\n * One entry per environment: the saved mode and identifier, and for every\n * credential group the URL the policy asks for (`desired_url`) beside the URL\n * actually registered at the provider (`registered_url`) with its `status`.\n * Only `registered` means the provider delivers to the desired URL.\n *\n * Available for providers whose webhooks Delopay manages (Stripe, PayPal,\n * Airwallex, Whop) and for hand-configured ones (Creem, NomuPay,\n * MicroPayment). Other connectors are refused with a 400.\n */\n async getWebhookAddress(\n merchantId: string,\n connectorId: string,\n ): Promise<WebhookAddressResponse> {\n return this.request(\n 'GET',\n `/account/${encodeURIComponent(merchantId)}/connectors/webhooks/${encodeURIComponent(connectorId)}/address`,\n );\n }\n\n /**\n * Validate a proposed callback address without saving it.\n * `POST /account/{merchantId}/connectors/webhooks/{connectorId}/address/preview`\n *\n * Returns the validation errors as `{ field, code }` pairs, the URL every\n * affected credential group would get, the connector accounts that share it,\n * and whether saving needs `confirm_shared: true`. Needs the same permission\n * as saving.\n *\n * @example\n * ```typescript\n * const preview = await delopay.connectors.previewWebhookAddress('mer_abc', 'mca_xyz', {\n * environment: 'live',\n * mode: 'anonymous',\n * format: { prefix: 'wh-', style: 'alphanumeric', length: 16 },\n * });\n * if (!preview.valid) console.warn(preview.errors);\n * ```\n */\n async previewWebhookAddress(\n merchantId: string,\n connectorId: string,\n params: WebhookAddressRequest,\n ): Promise<WebhookAddressPreviewResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(merchantId)}/connectors/webhooks/${encodeURIComponent(connectorId)}/address/preview`,\n { body: params },\n );\n }\n\n /**\n * Save the callback address of a connector's payment provider for one\n * environment.\n * `PUT /account/{merchantId}/connectors/webhooks/{connectorId}/address`\n *\n * The address applies to every connector account of that provider and\n * environment, so `confirm_shared: true` is required when other accounts are\n * affected. For a managed provider Delopay then registers the new URL and\n * keeps the former one accepted; the response reports each credential\n * group's outcome in `status`. A `pending` or `failed` group keeps receiving\n * on its previous URL and is retried. For a hand-configured provider the\n * merchant enters the new `desired_url` at the provider.\n *\n * A refused proposal answers 422 with error code `IR_06` and the message\n * `Webhook address refused: field:code,…`. A save that lost to a concurrent\n * change of the same address answers 422 with error code `HE_00` and can be\n * repeated. A caller who may not edit every affected account answers 403.\n * Address changes are limited per provider and environment (`rate_limit`).\n */\n async updateWebhookAddress(\n merchantId: string,\n connectorId: string,\n params: WebhookAddressRequest,\n ): Promise<WebhookAddressResponse> {\n return this.request(\n 'PUT',\n `/account/${encodeURIComponent(merchantId)}/connectors/webhooks/${encodeURIComponent(connectorId)}/address`,\n { body: params },\n );\n }\n\n /**\n * Read how the return addresses of a connector's payment provider name the\n * merchant, per environment.\n * `GET /account/{merchantId}/connectors/{connectorId}/return-address`\n *\n * A return address is where the provider sends the buyer back after a step\n * it hosts. It belongs to the merchant, the provider and the environment,\n * so every connector account of that provider follows it.\n */\n async getReturnAddress(merchantId: string, connectorId: string): Promise<ReturnAddressResponse> {\n return this.request(\n 'GET',\n `/account/${encodeURIComponent(merchantId)}/connectors/${encodeURIComponent(connectorId)}/return-address`,\n );\n }\n\n /**\n * Validate a proposed return address without saving it.\n * `POST /account/{merchantId}/connectors/{connectorId}/return-address/preview`\n *\n * Nothing is reserved: a generated identifier in the answer is an example.\n * Needs the same permission as saving.\n *\n * @example\n * ```typescript\n * const preview = await delopay.connectors.previewReturnAddress('mer_abc', 'mca_xyz', {\n * environment: 'live',\n * mode: 'anonymous',\n * share_webhook_identifier: true,\n * });\n * if (!preview.valid) console.warn(preview.errors);\n * ```\n */\n async previewReturnAddress(\n merchantId: string,\n connectorId: string,\n params: ReturnAddressRequest,\n ): Promise<ReturnAddressPreviewResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(merchantId)}/connectors/${encodeURIComponent(connectorId)}/return-address/preview`,\n { body: params },\n );\n }\n\n /**\n * Save the return address of a connector's payment provider for one\n * environment.\n * `PUT /account/{merchantId}/connectors/{connectorId}/return-address`\n *\n * Payments started afterwards get return addresses of the new form; every\n * address already handed to the provider keeps working. A refused proposal\n * answers 422 with error code `IR_06` and the message\n * `Return address refused: field:code,…`. A caller who may not edit every\n * connector account of the provider answers 403. Address changes are\n * limited per provider and environment (`rate_limit`).\n */\n async updateReturnAddress(\n merchantId: string,\n connectorId: string,\n params: ReturnAddressRequest,\n ): Promise<ReturnAddressResponse> {\n return this.request(\n 'PUT',\n `/account/${encodeURIComponent(merchantId)}/connectors/${encodeURIComponent(connectorId)}/return-address`,\n { body: params },\n );\n }\n\n /**\n * Every webhook the connector's payment provider lists for its credentials\n * in one environment: Delopay's own, other connector accounts', former\n * addresses' and other integrations'.\n * `GET /account/{merchantId}/connectors/webhooks/{connectorId}/provider`\n *\n * Available for Stripe, PayPal, Airwallex, Whop and Adyen. Destinations are\n * masked; `capabilities` says which changes the provider allows and\n * `editable` whether the caller may make them.\n */\n async listProviderWebhooks(\n merchantId: string,\n connectorId: string,\n environment: WebhookRegistrationEnvironment,\n ): Promise<ProviderWebhookListResponse> {\n return this.request('GET', providerWebhooksPath(merchantId, connectorId), {\n query: { environment },\n });\n }\n\n /**\n * Create a webhook at the provider for the merchant's own systems.\n * `POST /account/{merchantId}/connectors/webhooks/{connectorId}/provider`\n *\n * The URL must be `https` and outside Delopay; Delopay's own webhook is\n * registered with `registerWebhook`. A returned `signing_secret` is not kept\n * by Delopay and cannot be read again.\n */\n async createProviderWebhook(\n merchantId: string,\n connectorId: string,\n params: ProviderWebhookCreateRequest,\n ): Promise<ProviderWebhookCreateResponse> {\n return this.request('POST', providerWebhooksPath(merchantId, connectorId), { body: params });\n }\n\n /**\n * Change one webhook at the provider.\n * `PATCH /account/{merchantId}/connectors/webhooks/{connectorId}/provider/{webhookId}`\n *\n * Refused once the webhook changed since `fingerprint`, and for Delopay's\n * own webhooks.\n */\n async updateProviderWebhook(\n merchantId: string,\n connectorId: string,\n webhookId: string,\n params: ProviderWebhookUpdateRequest,\n ): Promise<ProviderWebhookEndpoint> {\n return this.request(\n 'PATCH',\n `${providerWebhooksPath(merchantId, connectorId)}/${encodeURIComponent(webhookId)}`,\n { body: params },\n );\n }\n\n /**\n * Delete one webhook at the provider.\n * `POST /account/{merchantId}/connectors/webhooks/{connectorId}/provider/{webhookId}/delete`\n *\n * Refused once the webhook changed since `fingerprint`. Deleting Delopay's\n * own webhook needs `confirm_managed: true`; another connector account's is\n * never deleted from here.\n */\n async deleteProviderWebhook(\n merchantId: string,\n connectorId: string,\n webhookId: string,\n params: ProviderWebhookDeleteRequest,\n ): Promise<ProviderWebhookDeleteResult> {\n return this.request(\n 'POST',\n `${providerWebhooksPath(merchantId, connectorId)}/${encodeURIComponent(webhookId)}/delete`,\n { body: params },\n );\n }\n\n /**\n * What \"replace all\" would delete and keep. Nothing is changed.\n * `GET /account/{merchantId}/connectors/webhooks/{connectorId}/provider/replace`\n */\n async previewProviderWebhookReplace(\n merchantId: string,\n connectorId: string,\n environment: WebhookRegistrationEnvironment,\n ): Promise<ProviderWebhookReplacePreviewResponse> {\n return this.request('GET', `${providerWebhooksPath(merchantId, connectorId)}/replace`, {\n query: { environment },\n });\n }\n\n /**\n * Keep only Delopay's webhook: delete exactly the confirmed webhooks of the\n * preview, after registering Delopay's own unless `sequence` is\n * `delete_first`.\n * `POST /account/{merchantId}/connectors/webhooks/{connectorId}/provider/replace`\n *\n * A list that changed since the preview answers `scope_changed` and deletes\n * nothing. A second replacement while one runs is refused as busy (`HE_00`).\n */\n async replaceProviderWebhooks(\n merchantId: string,\n connectorId: string,\n params: ProviderWebhookReplaceRequest,\n ): Promise<ProviderWebhookReplaceResponse> {\n return this.request('POST', `${providerWebhooksPath(merchantId, connectorId)}/replace`, {\n body: params,\n });\n }\n\n /** List available payment methods. `GET /account/payment-methods` */\n async listPaymentMethods(): Promise<Record<string, unknown>[]> {\n return this.request('GET', '/account/payment-methods');\n }\n}\n\nfunction providerWebhooksPath(merchantId: string, connectorId: string): string {\n return `/account/${encodeURIComponent(merchantId)}/connectors/webhooks/${encodeURIComponent(connectorId)}/provider`;\n}\n"]}
1
+ {"version":3,"sources":["/home/anes/delo-payment/_publish/sdk-0.423/dist/chunk-GA3KXPIF.cjs","../src/resources/connectors.ts"],"names":[],"mappings":"AAAA;ACuDO,IAAM,WAAA,EAAN,MAAiB;AAAA,EACtB,WAAA,CAA6B,OAAA,EAAoB;AAApB,IAAA,IAAA,CAAA,QAAA,EAAA,OAAA;AAAA,EAAqB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAYlD,MAAM,4BAAA,CACJ,UAAA,EACA,WAAA,EACA,MAAA,EACqC;AACrC,IAAA,OAAO,IAAA,CAAK,OAAA;AAAA,MACV,KAAA;AAAA,MACA,CAAA,SAAA,EAAY,kBAAA,CAAmB,UAAU,CAAC,CAAA,YAAA,EAAe,kBAAA,CAAmB,WAAW,CAAC,CAAA,uBAAA,CAAA;AAAA,MACxF,EAAE,KAAA,EAAO,EAAE,SAAA,EAAW,MAAA,CAAO,UAAU,EAAE;AAAA,IAC3C,CAAA;AAAA,EACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA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,IAAA;AAAqD,EAAA;AAEzD;AAEA;AACE,EAAA;AACF;ADlOA;AACA;AACA;AACA","file":"/home/anes/delo-payment/_publish/sdk-0.423/dist/chunk-GA3KXPIF.cjs","sourcesContent":[null,"import type {\n ConnectorBuyerMailQuery,\n ConnectorBuyerMailResponse,\n ConnectorBuyerMailUpdate,\n ConnectorCloneRequest,\n ConnectorConsolidationRequest,\n ConnectorConsolidationResponse,\n ConnectorCurrencyPolicyResponse,\n ConnectorCurrencyPolicyUpdateRequest,\n ConnectorShopsAddRequest,\n ConnectorShopUpdateRequest,\n ConnectorShopsResponse,\n ConnectorHealthResponse,\n EpayoutsCatalogResponse,\n PanesCatalogResponse,\n VaultRoutesApplyRequest,\n VaultRoutesApplyResponse,\n VaultRoutesPreviewRequest,\n VaultRoutesPreviewResponse,\n VaultOutagesResponse,\n VaultVerificationResponse,\n VaultVerifyRequest,\n ConnectorCreateRequest,\n ConnectorResponse,\n ConnectorUpdateRequest,\n ConnectorWebhookListResponse,\n ConnectorWebhookRegisterRequest,\n ConnectorWebhookRegisterResponse,\n ConnectorWebhookSyncResponse,\n WebhookAddressPreviewResponse,\n WebhookAddressRequest,\n WebhookAddressResponse,\n ReturnAddressPreviewResponse,\n ReturnAddressRequest,\n ReturnAddressResponse,\n ProviderWebhookCreateRequest,\n ProviderWebhookCreateResponse,\n ProviderWebhookDeleteRequest,\n ProviderWebhookDeleteResult,\n ProviderWebhookEndpoint,\n ProviderWebhookListResponse,\n ProviderWebhookReplacePreviewResponse,\n ProviderWebhookReplaceRequest,\n ProviderWebhookReplaceResponse,\n ProviderWebhookUpdateRequest,\n WebhookRegistrationEnvironment,\n AirwallexApplePayDomainsRegisterRequest,\n AirwallexApplePayDomainsRegisterResponse,\n StripePaymentMethodDomainsRegisterRequest,\n StripePaymentMethodDomainsRegisterResponse,\n WhopApplePayDomainsRegisterRequest,\n WhopApplePayDomainsRegisterResponse,\n} from '../types';\nimport type { RequestExtras, RequestFn } from '../client';\n\nexport class Connectors {\n constructor(private readonly request: RequestFn) {}\n\n /**\n * Read the connected provider account's optional buyer-email preference.\n * Currently supported for Whop. Use `setJwtToken` with a merchant JWT that\n * has Connector Edit authority; a shop token or API key cannot substitute.\n * Select Sandbox or Live explicitly through `test_mode`.\n *\n * The preference affects every shop sharing the provider account. It does\n * not disable mandatory provider messages or DeloPay invoice delivery.\n * A null or absent value establishes no on/off preference.\n */\n async retrieveBuyerEmailPreference(\n merchantId: string,\n connectorId: string,\n params: ConnectorBuyerMailQuery,\n ): Promise<ConnectorBuyerMailResponse> {\n return this.request(\n 'GET',\n `/account/${encodeURIComponent(merchantId)}/connectors/${encodeURIComponent(connectorId)}/buyer-email-preference`,\n { query: { test_mode: params.test_mode } },\n );\n }\n\n /**\n * Change the optional buyer-email preference for the whole provider account.\n * Currently supported for Whop. Requires a merchant JWT with Connector Edit\n * authority and explicit confirmation for every shop sharing the account.\n * Send the exact account, credential mode and value read before confirmation;\n * a changed account or preference is refused before mutation.\n *\n * Inspect `outcome`: only `verified` confirms the requested value through a\n * fresh exact-account read. HTTP 200 may instead report a conflict, refusal\n * or unknown outcome. An uncertain change may have happened; read the\n * preference again before retrying, including after a transport error.\n * This method adds no automatic readback or retry. Mandatory provider\n * messages and DeloPay invoice delivery are unaffected.\n */\n async updateBuyerEmailPreference(\n merchantId: string,\n connectorId: string,\n params: ConnectorBuyerMailUpdate,\n ): Promise<ConnectorBuyerMailResponse> {\n return this.request(\n 'PUT',\n `/account/${encodeURIComponent(merchantId)}/connectors/${encodeURIComponent(connectorId)}/buyer-email-preference`,\n { body: params },\n );\n }\n\n async create(accountId: string, params: ConnectorCreateRequest): Promise<ConnectorResponse> {\n return this.request('POST', `/account/${encodeURIComponent(accountId)}/connectors`, {\n body: params,\n });\n }\n\n /**\n * One connector account.\n *\n * The credential-bearing fields come back `null` here, whatever is stored:\n * `connector_webhook_details`, `connector_wallets_details`,\n * `pm_auth_config` and `additional_merchant_data`. They are dropped rather\n * than masked, because an editor that prefills from this response and\n * PATCHes the field back would otherwise save a mask over a live signing\n * secret. Send those fields only when the operator has typed a new value,\n * and omit them entirely otherwise — an omitted field leaves the stored one\n * alone.\n *\n * This is the retrieve path alone. `create` and `update` echo back what the\n * caller sent, and `clone` returns the *copied* secrets — see that method.\n *\n * Because the value is gone, `has_live_webhook_secret` and\n * `has_sandbox_webhook_secret` are what tell a stored webhook signing secret\n * from an unconfigured one. Render those; never infer configuration from the\n * `null` block.\n *\n * `GET /account/{accountId}/connectors/{connectorId}`\n */\n async retrieve(accountId: string, connectorId: string): Promise<ConnectorResponse> {\n return this.request(\n 'GET',\n `/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}`,\n );\n }\n\n /**\n * The merchant's connector accounts.\n *\n * Never wider than the caller: an API key pinned to one shop lists that\n * shop's connectors only, not every sibling shop's.\n *\n * `GET /account/{accountId}/connectors`\n */\n async list(accountId: string): Promise<ConnectorResponse[]> {\n return this.request('GET', `/account/${encodeURIComponent(accountId)}/connectors`);\n }\n\n /**\n * The profile-scoped connector list. The merchant-wide `list()` is\n * merchant-gated and 403s for a profile-entity (shop user) JWT; this\n * variant is scoped server-side to the caller's own profile.\n *\n * `GET /account/{accountId}/profile/connectors`\n */\n async listByProfile(accountId: string): Promise<ConnectorResponse[]> {\n return this.request('GET', `/account/${encodeURIComponent(accountId)}/profile/connectors`);\n }\n\n /**\n * Every connector's pane capabilities, as the router itself knows them —\n * which rails a connector supports, and which methods it can publish as a\n * pane with the confirm routing keys each one carries.\n *\n * Capability facts only: no label, sublabel or category comes back. A\n * designer renders a method's copy from its own locale files, keyed by\n * `key`, and takes `payment_method` / `payment_method_type` from here\n * verbatim rather than deriving them client-side.\n *\n * This is what the pane helpers in `src/panes.ts` should be driven from —\n * `paneMethodInfo`, `defaultPane` and `validatePanes` all take a\n * {@link PanesConnectorCatalog} out of this response, so a connector the\n * router starts publishing panes for needs no SDK release.\n *\n * `GET /account/{accountId}/connectors/native-panes/catalog`\n *\n * The path keeps the `native-panes` spelling deliberately. The identifiers\n * were renamed off \"native pane\"; the route was not, and pointing at the\n * backend's new name before it is deployed everywhere would both 404 against\n * un-upgraded replicas mid-rollout and fail `scripts/parity-check.mjs`,\n * which blocks publishing.\n */\n async getPanesCatalog(accountId: string): Promise<PanesCatalogResponse> {\n return this.request(\n 'GET',\n `/account/${encodeURIComponent(accountId)}/connectors/native-panes/catalog`,\n );\n }\n\n /** @deprecated Renamed to {@link getPanesCatalog}. Removed in 0.112.0. */\n async getNativePanesCatalog(accountId: string): Promise<PanesCatalogResponse> {\n return this.getPanesCatalog(accountId);\n }\n\n /**\n * Sweep the merchant's own e-Payouts module and return the rails it\n * actually has enabled. Server-side this makes many upstream calls, so it\n * can take several seconds — show progress.\n *\n * `POST /account/{accountId}/connectors/{connectorId}/epayouts/catalog/sync`\n */\n async syncEpayoutsCatalog(\n accountId: string,\n connectorId: string,\n ): Promise<EpayoutsCatalogResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}/epayouts/catalog/sync`,\n );\n }\n\n /**\n * Update a connector account.\n *\n * `connector_webhook_details` **merges** into the stored block key by key:\n * an absent key keeps its stored secret, an explicit value is written, and\n * an explicit empty string clears that secret. Send only the\n * keys the operator typed — padding the other environment's keys with `''`\n * clears a live signing secret and inbound webhooks stop verifying.\n *\n * The other credential-bearing fields — `connector_wallets_details`,\n * `pm_auth_config`, `additional_merchant_data` — are still whole-value\n * replacements: omit them unless you are writing a complete new value.\n *\n * `POST /account/{accountId}/connectors/{connectorId}`\n */\n async update(\n accountId: string,\n connectorId: string,\n params: ConnectorUpdateRequest,\n options?: RequestExtras,\n ): Promise<ConnectorResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}`,\n {\n body: params,\n ...options,\n },\n );\n }\n\n /**\n * Remove a connector account.\n *\n * A shop-scoped role may remove a connector of its own shop — the shop is\n * re-checked server-side — so creating processors and removing them are the\n * same rung of access rather than two.\n *\n * `DELETE /account/{accountId}/connectors/{connectorId}`\n */\n async delete(accountId: string, connectorId: string): Promise<ConnectorResponse> {\n return this.request(\n 'DELETE',\n `/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}`,\n );\n }\n\n /**\n * Clone a connector into another shop (business profile) of the same\n * merchant. `POST /account/{accountId}/connectors/{connectorId}/clone`\n *\n * Credentials are copied server-side, re-encrypted under the same merchant\n * key, so the caller never has to *supply* them — `retrieve` returns `null`\n * for the credential fields, which is what makes a client-side copy\n * impossible in the first place.\n *\n * The response, however, is the unredacted connector: `connector_account_details`\n * is masked, but `connector_webhook_details`, `connector_wallets_details`,\n * `pm_auth_config` and `additional_merchant_data` come back with the copied\n * secrets in them — values this caller never sent. Do not log or echo the\n * response; read `merchant_connector_id` and discard the rest.\n */\n async clone(\n accountId: string,\n connectorId: string,\n params: ConnectorCloneRequest,\n ): Promise<ConnectorResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}/clone`,\n { body: params },\n );\n }\n\n /**\n * Share a connector with more shops of the same merchant.\n * `POST /account/{accountId}/connectors/{connectorId}/shops`\n *\n * Nothing is copied: every shop sends payments to the same account, on the\n * same credentials and webhook, and the account's limits count them all.\n */\n async addShops(\n accountId: string,\n connectorId: string,\n params: ConnectorShopsAddRequest,\n ): Promise<ConnectorShopsResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}/shops`,\n { body: params },\n );\n }\n\n /**\n * Fold copies of the same provider account into this connector.\n * `POST /account/{accountId}/connectors/{connectorId}/consolidate`\n *\n * The copies' shops move to the connector with their on/off state, routing,\n * checkout layout, currencies, saved credentials, mandates and\n * subscriptions. A copy keeps answering for the payments made on it and\n * serves no shop. Send `dry_run: true` first, then confirm with the\n * preview's `preview_token` and a choice for every conflict.\n */\n async consolidate(\n accountId: string,\n connectorId: string,\n params: ConnectorConsolidationRequest,\n ): Promise<ConnectorConsolidationResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}/consolidate`,\n { body: params },\n );\n }\n\n /**\n * Switch a connector off, or back on, in one shop it serves.\n * `POST /account/{accountId}/connectors/{connectorId}/shops/{profileId}`\n */\n async setShopDisabled(\n accountId: string,\n connectorId: string,\n profileId: string,\n params: ConnectorShopUpdateRequest,\n ): Promise<ConnectorShopsResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}/shops/${encodeURIComponent(profileId)}`,\n { body: params },\n );\n }\n\n /**\n * Stop a connector serving one shop. Any shop may leave, the\n * one the connector was created in included, while another one stays: the\n * last shop is refused, and the connector is deleted instead. The account,\n * its limits and every other shop on it are unaffected.\n * `DELETE /account/{accountId}/connectors/{connectorId}/shops/{profileId}`\n */\n async removeShop(\n accountId: string,\n connectorId: string,\n profileId: string,\n ): Promise<ConnectorShopsResponse> {\n return this.request(\n 'DELETE',\n `/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}/shops/${encodeURIComponent(profileId)}`,\n );\n }\n\n /**\n * Read the transaction currencies a connector may process: its own list,\n * what the provider is known to accept with its methods, and the effective\n * currencies in each shop it serves.\n * `GET /account/{accountId}/connectors/{connectorId}/currencies`\n */\n async getCurrencies(\n accountId: string,\n connectorId: string,\n ): Promise<ConnectorCurrencyPolicyResponse> {\n return this.request(\n 'GET',\n `/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}/currencies`,\n );\n }\n\n /**\n * Set the transaction currencies a connector may process in every shop it\n * serves, and what it does with a payment in a currency it does not take\n * (`conversion`). `allowed_currencies: null` allows every currency the\n * provider supports; a field left out stays as it is. With `dry_run`,\n * nothing is saved and `impact` reports the effect.\n * `PUT /account/{accountId}/connectors/{connectorId}/currencies`\n */\n async setCurrencies(\n accountId: string,\n connectorId: string,\n params: ConnectorCurrencyPolicyUpdateRequest,\n ): Promise<ConnectorCurrencyPolicyResponse> {\n return this.request(\n 'PUT',\n `/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}/currencies`,\n { body: params },\n );\n }\n\n /**\n * Narrow a connector's currencies in one shop it serves, within the\n * connector's own list, or set the shop's own `conversion`. `null` returns\n * the shop to the connector's setting; a field left out stays as it is.\n * `PUT /account/{accountId}/connectors/{connectorId}/shops/{profileId}/currencies`\n */\n async setShopCurrencies(\n accountId: string,\n connectorId: string,\n profileId: string,\n params: ConnectorCurrencyPolicyUpdateRequest,\n ): Promise<ConnectorCurrencyPolicyResponse> {\n return this.request(\n 'PUT',\n `/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}/shops/${encodeURIComponent(profileId)}/currencies`,\n { body: params },\n );\n }\n\n // --- Advanced operations (Task 4.8) ---\n\n /**\n * Run the configuration checks for a vault (VGS) connector account:\n * credential validity, write-only Collect scope, reachability, environment\n * coherence, route coverage. Read-only but not cheap — it decrypts the\n * vault's management credential and talks to VGS.\n *\n * `POST /account/{accountId}/connectors/{connectorId}/vault/verify`\n */\n async verifyVault(\n accountId: string,\n connectorId: string,\n params: VaultVerifyRequest,\n ): Promise<VaultVerificationResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}/vault/verify`,\n { body: params },\n );\n }\n\n /**\n * The shops whose card vault is switched on and whose vault account has\n * stopped working, each with the cause. While a shop is listed, its card\n * form cannot be shown and its card payments fail.\n *\n * An outage is listed once the vault has refused the account several times\n * in a row over at least a minute, and is taken off the list when the vault\n * serves the account again. Nothing switches a vault off by itself: see\n * `profiles.switchVaultOff`.\n *\n * `GET /account/{accountId}/vault/outages`\n */\n async listVaultOutages(accountId: string): Promise<VaultOutagesResponse> {\n return this.request('GET', `/account/${encodeURIComponent(accountId)}/vault/outages`);\n }\n\n /**\n * Compute the route document the vault SHOULD have and diff it against\n * what exists, without writing anything. The returned fingerprints must be\n * echoed byte for byte on {@link Connectors.applyVaultRoutes}.\n *\n * A router without these endpoints answers 404 — render that as \"this\n * build cannot configure routes\", never as \"there is nothing to change\".\n *\n * `POST /account/{accountId}/connectors/{connectorId}/vault/routes/preview`\n */\n async previewVaultRoutes(\n accountId: string,\n connectorId: string,\n params: VaultRoutesPreviewRequest,\n ): Promise<VaultRoutesPreviewResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}/vault/routes/preview`,\n { body: params },\n );\n }\n\n /**\n * Write the routes the merchant just previewed. Both fingerprints come\n * from the preview and are opaque: `expected_current_fingerprint` says the\n * vault has not moved (`null` = \"the preview found no routes\" and is sent\n * as `null`, never omitted), `expected_desired_fingerprint` says the\n * document is still the one on screen. A 409 (`DE_04`) means the vault\n * changed since the preview — nothing was written; preview again.\n *\n * `POST /account/{accountId}/connectors/{connectorId}/vault/routes/apply`\n */\n async applyVaultRoutes(\n accountId: string,\n connectorId: string,\n params: VaultRoutesApplyRequest,\n ): Promise<VaultRoutesApplyResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}/vault/routes/apply`,\n { body: params },\n );\n }\n\n /**\n * What the processor says about this connector account: whether it will\n * accept charges, which capabilities are live, and anything it is still\n * waiting on.\n *\n * This is **not** {@link Connectors.verify}. That one asks whether the stored\n * credentials work, by running a test-card authorization; a processor can\n * revoke an account's ability to take payments while the credentials stay\n * perfectly valid, and then a credential check reports healthy while every\n * checkout silently stalls. This asks the account's own status instead, and\n * does not create a payment. By default it reads a scheduler snapshot;\n * `refresh: true` asks for a new probe and `stale` identifies an overdue result.\n * `test_mode` selects the requested environment; `credential_source` identifies\n * a sandbox, live or shared credential set. Not every provider reports chargeability.\n *\n * Connectors with no probe answer `state: 'unknown'` with\n * `unknown_reason: 'connector_not_supported'`, rather than an error — every\n * `'unknown'` carries a reason code you render your own words for. A router\n * without this endpoint answers 404 — render that as \"this build cannot\n * report health\", never as \"healthy\".\n *\n * `GET /account/{accountId}/connectors/{connectorId}/health`\n */\n async health(\n accountId: string,\n connectorId: string,\n options?: { test_mode?: boolean; refresh?: boolean },\n ): Promise<ConnectorHealthResponse> {\n return this.request(\n 'GET',\n `/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}/health`,\n { query: options },\n );\n }\n\n /** Verify connector credentials. `POST /account/connectors/verify` */\n async verify(params: Record<string, unknown>): Promise<Record<string, unknown>> {\n return this.request('POST', '/account/connectors/verify', { body: params });\n }\n\n /**\n * Register a webhook for a connector.\n * `POST /account/{merchantId}/connectors/webhooks/{connectorId}`\n *\n * @param params - Optional event scope. Defaults to `{ event_type: 'all_events' }`\n * when omitted; pass `{ event_type: { specific_event: '…' } }` to scope\n * to a single event.\n */\n async registerWebhook(\n merchantId: string,\n connectorId: string,\n params?: ConnectorWebhookRegisterRequest,\n ): Promise<ConnectorWebhookRegisterResponse> {\n const path = `/account/${encodeURIComponent(merchantId)}/connectors/webhooks/${encodeURIComponent(connectorId)}`;\n if (params === undefined) return this.request('POST', path);\n return this.request('POST', path, { body: params });\n }\n\n /**\n * Register checkout/shop domains as Stripe payment method domains, so Apple\n * Pay renders on those pages.\n * `POST /account/{merchantId}/connectors/{connectorId}/stripe/payment-method-domains`\n *\n * Stripe connectors only. One call registers against a single credential set\n * (`environment`, default `'live'`) — call twice to cover live and sandbox.\n * Per-URL outcomes come back in `results`; a missing sandbox credential set\n * is a request-level 400.\n */\n async registerStripePaymentMethodDomains(\n merchantId: string,\n connectorId: string,\n params: StripePaymentMethodDomainsRegisterRequest,\n ): Promise<StripePaymentMethodDomainsRegisterResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(merchantId)}/connectors/${encodeURIComponent(connectorId)}/stripe/payment-method-domains`,\n { body: params },\n );\n }\n\n /**\n * Register checkout/shop domains as Airwallex Apple Pay domains, so Apple Pay\n * renders on those pages.\n * `POST /account/{merchantId}/connectors/{connectorId}/airwallex/apple-pay-domains`\n *\n * Airwallex connectors only. One call registers against a single credential\n * set (`environment`, default `'live'`) — call twice to cover live and\n * sandbox. Idempotent: a host already on the account comes back\n * `already_registered` without a write.\n */\n async registerAirwallexApplePayDomains(\n merchantId: string,\n connectorId: string,\n params: AirwallexApplePayDomainsRegisterRequest,\n ): Promise<AirwallexApplePayDomainsRegisterResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(merchantId)}/connectors/${encodeURIComponent(connectorId)}/airwallex/apple-pay-domains`,\n { body: params },\n );\n }\n\n /**\n * Register and verify checkout/shop domains as Whop Apple Pay payment method\n * domains, so Apple Pay renders in Whop's embedded card form on those pages.\n * `POST /account/{merchantId}/connectors/{connectorId}/whop/apple-pay-domains`\n *\n * Whop connectors only. One call registers against a single credential set\n * (`environment`, default `'live'`) — call twice to cover live and sandbox.\n * Idempotent: a host Whop already holds as verified comes back\n * `already_verified` without a write, and a `pending` one is verified again.\n */\n async registerWhopApplePayDomains(\n merchantId: string,\n connectorId: string,\n params: WhopApplePayDomainsRegisterRequest,\n ): Promise<WhopApplePayDomainsRegisterResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(merchantId)}/connectors/${encodeURIComponent(connectorId)}/whop/apple-pay-domains`,\n { body: params },\n );\n }\n\n /** Get registered webhooks for a connector. `GET /account/{merchantId}/connectors/webhooks/{connectorId}` */\n async getWebhook(merchantId: string, connectorId: string): Promise<ConnectorWebhookListResponse> {\n return this.request(\n 'GET',\n `/account/${encodeURIComponent(merchantId)}/connectors/webhooks/${encodeURIComponent(connectorId)}`,\n );\n }\n\n /**\n * Bring an already-registered webhook's event subscription up to date with\n * the events Delopay handles.\n * `POST /account/{merchantId}/connectors/webhooks/{connectorId}/sync-events`\n *\n * A PSP freezes an endpoint's event list at registration time, so an endpoint\n * created before an event type was added never receives it — silently, with\n * no error anywhere. {@link getWebhook} reports the gap as `missing_events`;\n * this repairs it.\n *\n * Unlike re-registering, the endpoints are updated in place: the endpoint id\n * and its signing secret are preserved, so signature verification keeps\n * working across the change. Stripe connectors only; idempotent, so it is\n * safe to call on a schedule or after every deploy.\n *\n * @example\n * ```typescript\n * const sync = await delopay.connectors.syncWebhookEvents('mer_abc', 'mca_xyz');\n * for (const endpoint of sync.endpoints) {\n * if (endpoint.error_message) console.warn(endpoint.connector_webhook_id, endpoint.error_message);\n * else if (endpoint.updated) console.log('subscribed', endpoint.added_events);\n * }\n * ```\n */\n async syncWebhookEvents(\n merchantId: string,\n connectorId: string,\n ): Promise<ConnectorWebhookSyncResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(merchantId)}/connectors/webhooks/${encodeURIComponent(connectorId)}/sync-events`,\n );\n }\n\n /**\n * Read the callback addresses of a connector's payment provider.\n * `GET /account/{merchantId}/connectors/webhooks/{connectorId}/address`\n *\n * One entry per environment: the saved mode and identifier, and for every\n * credential group the URL the policy asks for (`desired_url`) beside the URL\n * actually registered at the provider (`registered_url`) with its `status`.\n * Only `registered` means the provider delivers to the desired URL.\n *\n * Available for providers whose webhooks Delopay manages (Stripe, PayPal,\n * Airwallex, Whop) and for hand-configured ones (Creem, NomuPay,\n * MicroPayment). Other connectors are refused with a 400.\n */\n async getWebhookAddress(\n merchantId: string,\n connectorId: string,\n ): Promise<WebhookAddressResponse> {\n return this.request(\n 'GET',\n `/account/${encodeURIComponent(merchantId)}/connectors/webhooks/${encodeURIComponent(connectorId)}/address`,\n );\n }\n\n /**\n * Validate a proposed callback address without saving it.\n * `POST /account/{merchantId}/connectors/webhooks/{connectorId}/address/preview`\n *\n * Returns the validation errors as `{ field, code }` pairs, the URL every\n * affected credential group would get, the connector accounts that share it,\n * and whether saving needs `confirm_shared: true`. Needs the same permission\n * as saving.\n *\n * @example\n * ```typescript\n * const preview = await delopay.connectors.previewWebhookAddress('mer_abc', 'mca_xyz', {\n * environment: 'live',\n * mode: 'anonymous',\n * format: { prefix: 'wh-', style: 'alphanumeric', length: 16 },\n * });\n * if (!preview.valid) console.warn(preview.errors);\n * ```\n */\n async previewWebhookAddress(\n merchantId: string,\n connectorId: string,\n params: WebhookAddressRequest,\n ): Promise<WebhookAddressPreviewResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(merchantId)}/connectors/webhooks/${encodeURIComponent(connectorId)}/address/preview`,\n { body: params },\n );\n }\n\n /**\n * Save the callback address of a connector's payment provider for one\n * environment.\n * `PUT /account/{merchantId}/connectors/webhooks/{connectorId}/address`\n *\n * The address applies to every connector account of that provider and\n * environment, so `confirm_shared: true` is required when other accounts are\n * affected. For a managed provider Delopay then registers the new URL and\n * keeps the former one accepted; the response reports each credential\n * group's outcome in `status`. A `pending` or `failed` group keeps receiving\n * on its previous URL and is retried. For a hand-configured provider the\n * merchant enters the new `desired_url` at the provider.\n *\n * A refused proposal answers 422 with error code `IR_06` and the message\n * `Webhook address refused: field:code,…`. A save that lost to a concurrent\n * change of the same address answers 422 with error code `HE_00` and can be\n * repeated. A caller who may not edit every affected account answers 403.\n * Address changes are limited per provider and environment (`rate_limit`).\n */\n async updateWebhookAddress(\n merchantId: string,\n connectorId: string,\n params: WebhookAddressRequest,\n ): Promise<WebhookAddressResponse> {\n return this.request(\n 'PUT',\n `/account/${encodeURIComponent(merchantId)}/connectors/webhooks/${encodeURIComponent(connectorId)}/address`,\n { body: params },\n );\n }\n\n /**\n * Read how the return addresses of a connector's payment provider name the\n * merchant, per environment.\n * `GET /account/{merchantId}/connectors/{connectorId}/return-address`\n *\n * A return address is where the provider sends the buyer back after a step\n * it hosts. It belongs to the merchant, the provider and the environment,\n * so every connector account of that provider follows it.\n */\n async getReturnAddress(merchantId: string, connectorId: string): Promise<ReturnAddressResponse> {\n return this.request(\n 'GET',\n `/account/${encodeURIComponent(merchantId)}/connectors/${encodeURIComponent(connectorId)}/return-address`,\n );\n }\n\n /**\n * Validate a proposed return address without saving it.\n * `POST /account/{merchantId}/connectors/{connectorId}/return-address/preview`\n *\n * Nothing is reserved: a generated identifier in the answer is an example.\n * Needs the same permission as saving.\n *\n * @example\n * ```typescript\n * const preview = await delopay.connectors.previewReturnAddress('mer_abc', 'mca_xyz', {\n * environment: 'live',\n * mode: 'anonymous',\n * share_webhook_identifier: true,\n * });\n * if (!preview.valid) console.warn(preview.errors);\n * ```\n */\n async previewReturnAddress(\n merchantId: string,\n connectorId: string,\n params: ReturnAddressRequest,\n ): Promise<ReturnAddressPreviewResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(merchantId)}/connectors/${encodeURIComponent(connectorId)}/return-address/preview`,\n { body: params },\n );\n }\n\n /**\n * Save the return address of a connector's payment provider for one\n * environment.\n * `PUT /account/{merchantId}/connectors/{connectorId}/return-address`\n *\n * Payments started afterwards get return addresses of the new form; every\n * address already handed to the provider keeps working. A refused proposal\n * answers 422 with error code `IR_06` and the message\n * `Return address refused: field:code,…`. A caller who may not edit every\n * connector account of the provider answers 403. Address changes are\n * limited per provider and environment (`rate_limit`).\n */\n async updateReturnAddress(\n merchantId: string,\n connectorId: string,\n params: ReturnAddressRequest,\n ): Promise<ReturnAddressResponse> {\n return this.request(\n 'PUT',\n `/account/${encodeURIComponent(merchantId)}/connectors/${encodeURIComponent(connectorId)}/return-address`,\n { body: params },\n );\n }\n\n /**\n * Every webhook the connector's payment provider lists for its credentials\n * in one environment: Delopay's own, other connector accounts', former\n * addresses' and other integrations'.\n * `GET /account/{merchantId}/connectors/webhooks/{connectorId}/provider`\n *\n * Available for Stripe, PayPal, Airwallex, Whop and Adyen. Destinations are\n * masked; `capabilities` says which changes the provider allows and\n * `editable` whether the caller may make them.\n */\n async listProviderWebhooks(\n merchantId: string,\n connectorId: string,\n environment: WebhookRegistrationEnvironment,\n ): Promise<ProviderWebhookListResponse> {\n return this.request('GET', providerWebhooksPath(merchantId, connectorId), {\n query: { environment },\n });\n }\n\n /**\n * Create a webhook at the provider for the merchant's own systems.\n * `POST /account/{merchantId}/connectors/webhooks/{connectorId}/provider`\n *\n * The URL must be `https` and outside Delopay; Delopay's own webhook is\n * registered with `registerWebhook`. A returned `signing_secret` is not kept\n * by Delopay and cannot be read again.\n */\n async createProviderWebhook(\n merchantId: string,\n connectorId: string,\n params: ProviderWebhookCreateRequest,\n ): Promise<ProviderWebhookCreateResponse> {\n return this.request('POST', providerWebhooksPath(merchantId, connectorId), { body: params });\n }\n\n /**\n * Change one webhook at the provider.\n * `PATCH /account/{merchantId}/connectors/webhooks/{connectorId}/provider/{webhookId}`\n *\n * Refused once the webhook changed since `fingerprint`, and for Delopay's\n * own webhooks.\n */\n async updateProviderWebhook(\n merchantId: string,\n connectorId: string,\n webhookId: string,\n params: ProviderWebhookUpdateRequest,\n ): Promise<ProviderWebhookEndpoint> {\n return this.request(\n 'PATCH',\n `${providerWebhooksPath(merchantId, connectorId)}/${encodeURIComponent(webhookId)}`,\n { body: params },\n );\n }\n\n /**\n * Delete one webhook at the provider.\n * `POST /account/{merchantId}/connectors/webhooks/{connectorId}/provider/{webhookId}/delete`\n *\n * Refused once the webhook changed since `fingerprint`. Deleting Delopay's\n * own webhook needs `confirm_managed: true`; another connector account's is\n * never deleted from here.\n */\n async deleteProviderWebhook(\n merchantId: string,\n connectorId: string,\n webhookId: string,\n params: ProviderWebhookDeleteRequest,\n ): Promise<ProviderWebhookDeleteResult> {\n return this.request(\n 'POST',\n `${providerWebhooksPath(merchantId, connectorId)}/${encodeURIComponent(webhookId)}/delete`,\n { body: params },\n );\n }\n\n /**\n * What \"replace all\" would delete and keep. Nothing is changed.\n * `GET /account/{merchantId}/connectors/webhooks/{connectorId}/provider/replace`\n */\n async previewProviderWebhookReplace(\n merchantId: string,\n connectorId: string,\n environment: WebhookRegistrationEnvironment,\n ): Promise<ProviderWebhookReplacePreviewResponse> {\n return this.request('GET', `${providerWebhooksPath(merchantId, connectorId)}/replace`, {\n query: { environment },\n });\n }\n\n /**\n * Keep only Delopay's webhook: delete exactly the confirmed webhooks of the\n * preview, after registering Delopay's own unless `sequence` is\n * `delete_first`.\n * `POST /account/{merchantId}/connectors/webhooks/{connectorId}/provider/replace`\n *\n * A list that changed since the preview answers `scope_changed` and deletes\n * nothing. A second replacement while one runs is refused as busy (`HE_00`).\n */\n async replaceProviderWebhooks(\n merchantId: string,\n connectorId: string,\n params: ProviderWebhookReplaceRequest,\n ): Promise<ProviderWebhookReplaceResponse> {\n return this.request('POST', `${providerWebhooksPath(merchantId, connectorId)}/replace`, {\n body: params,\n });\n }\n\n /** List available payment methods. `GET /account/payment-methods` */\n async listPaymentMethods(): Promise<Record<string, unknown>[]> {\n return this.request('GET', '/account/payment-methods');\n }\n}\n\nfunction providerWebhooksPath(merchantId: string, connectorId: string): string {\n return `/account/${encodeURIComponent(merchantId)}/connectors/webhooks/${encodeURIComponent(connectorId)}/provider`;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/anes/delo-payment/_worktrees/ts-publish-w3/dist/chunk-GG52SAHA.cjs","../src/resources/refunds.ts"],"names":[],"mappings":"AAAA;ACoBO,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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAwBlD,MAAM,MAAA,CAAO,MAAA,EAAsD;AACjE,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,MAAA,EAAQ,UAAA,EAAY,EAAE,IAAA,EAAM,OAAO,CAAC,CAAA;AAAA,EAC1D;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAaA,MAAM,QAAA,CAAS,QAAA,EAA2C;AACxD,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,KAAA,EAAO,CAAA,SAAA,EAAY,kBAAA,CAAmB,QAAQ,CAAC,CAAA,CAAA;AACrE,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAa2B,EAAA;AAC2C,IAAA;AAC5D,MAAA;AACH,MAAA;AACJ,IAAA;AACH,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQmE,EAAA;AACJ,IAAA;AAC/D,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAa2C,EAAA;AAC0B,IAAA;AACrE,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAayC,EAAA;AAC0B,IAAA;AACnE,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAS0F,EAAA;AACzC,IAAA;AACtC,MAAA;AACR,IAAA;AACH,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAsB+B,EAAA;AACsC,IAAA;AAC3D,MAAA;AACP,IAAA;AACH,EAAA;AAAA;AAM+B,EAAA;AACsC,IAAA;AAC3D,MAAA;AACP,IAAA;AACH,EAAA;AAAA;AAG4E,EAAA;AACN,IAAA;AACtE,EAAA;AAAA;AAKoC,EAAA;AAC6B,IAAA;AACjE,EAAA;AAAA;AAKoC,EAAA;AACgC,IAAA;AACpE,EAAA;AAAA;AAKoC,EAAA;AACgC,IAAA;AACpE,EAAA;AAAA;AAG+F,EAAA;AAC1B,IAAA;AAC3D,MAAA;AACP,IAAA;AACH,EAAA;AACF;ADnDwE;AACA;AACA;AACA","file":"/home/anes/delo-payment/_worktrees/ts-publish-w3/dist/chunk-GG52SAHA.cjs","sourcesContent":[null,"import type {\n BuyerRefundRequest,\n BuyerRefundRequestApprove,\n BuyerRefundRequestDecline,\n BuyerRefundRequestList,\n BuyerRefundRequestListQuery,\n RefundCreateRequest,\n RefundResponse,\n RefundUpdateRequest,\n RefundListParams,\n RefundListResponse,\n RefundAggregateResponse,\n RefundBulkBlockBuyerRequest,\n RefundBulkBlockBuyerResponse,\n RefundBulkBlockPreviewRequest,\n RefundBulkBlockPreviewResponse,\n} from '../types';\nimport type { RequestExtras, RequestFn } from '../client';\n\n/** Create and manage refunds for completed payments. */\nexport class Refunds {\n constructor(private readonly request: RequestFn) {}\n\n /**\n * Create a refund for a payment.\n *\n * Dashboard-initiated refunds are subject to the caller's operation-limit\n * rule, resolved against the role the request authenticated with. An\n * over-limit refund either fails with `DE_01` (the rule blocks) or with\n * HTTP 409 `DE_06` — the rule requires approval, and `DelopayError.data`\n * carries `PendingApprovalErrorDetails`. No refund exists in either case;\n * `DE_06` names one that a second approver can still let through, via\n * `operationLimits.approve()`.\n *\n * @param params - Refund parameters, including the required `payment_id` and optional amount.\n * @returns The created refund.\n *\n * @example\n * ```typescript\n * const refund = await delopay.refunds.create({\n * payment_id: 'pay_abc123',\n * amount: 2500, // partial refund of 25.00 EUR\n * });\n * ```\n */\n async create(params: RefundCreateRequest): Promise<RefundResponse> {\n return this.request('POST', '/refunds', { body: params });\n }\n\n /**\n * Retrieve a refund by its ID.\n *\n * @param refundId - The unique refund ID.\n * @returns The refund.\n *\n * @example\n * ```typescript\n * const refund = await delopay.refunds.retrieve('ref_abc123');\n * ```\n */\n async retrieve(refundId: string): Promise<RefundResponse> {\n return this.request('GET', `/refunds/${encodeURIComponent(refundId)}`);\n }\n\n /**\n * Update the reason or metadata on an existing refund.\n *\n * @param refundId - The refund ID to update.\n * @param params - Fields to update (reason, metadata).\n * @returns The updated refund.\n */\n async update(\n refundId: string,\n params: RefundUpdateRequest,\n options?: RequestExtras,\n ): Promise<RefundResponse> {\n return this.request('POST', `/refunds/${encodeURIComponent(refundId)}`, {\n body: params,\n ...options,\n });\n }\n\n /**\n * List refunds, optionally filtered by payment, status, or date range.\n *\n * @param params - Optional filter and pagination parameters.\n * @returns Paginated list of refunds.\n */\n async list(params?: RefundListParams): Promise<RefundListResponse> {\n return this.request('POST', '/refunds/list', { body: params });\n }\n\n /**\n * Every identifier a block of each selected refund's buyer would name,\n * changing nothing: the payment's email and customer id, and every IP\n * address and device id seen on its checkout, each with where it was seen\n * and whether it is already blocked. Name the refunds by `ids` or by the\n * list's `filters`, exactly one of the two; at most `max_refunds` are read.\n *\n * `POST /refunds/bulk/block-buyer/preview`. Needs a dashboard JWT.\n */\n async bulkBlockPreview(\n request: RefundBulkBlockPreviewRequest,\n ): Promise<RefundBulkBlockPreviewResponse> {\n return this.request('POST', '/refunds/bulk/block-buyer/preview', { body: request });\n }\n\n /**\n * Add the buyer of each listed refund's payment to the buyer blocklist with\n * the chosen `kinds`, leaving out the `exclude`d identifiers, at most the\n * preview's `max_run_refunds` per call. The server reads each payment again;\n * it never blocks a value the request names. Identifiers already blocked\n * are not added again, and every refund gets its own result.\n *\n * `POST /refunds/bulk/block-buyer`. Needs a dashboard JWT.\n */\n async bulkBlockBuyer(\n request: RefundBulkBlockBuyerRequest,\n ): Promise<RefundBulkBlockBuyerResponse> {\n return this.request('POST', '/refunds/bulk/block-buyer', { body: request });\n }\n\n // --- OLAP extensions (Task 4.3) ---\n\n /**\n * Refund requests buyers raised from the customer portal, newest first.\n * Limited to the caller's shop when the caller is scoped to one.\n * `GET /refund-requests`\n */\n async listRequests(params?: BuyerRefundRequestListQuery): Promise<BuyerRefundRequestList> {\n return this.request('GET', '/refund-requests', {\n query: params as Record<string, string | number | null | undefined>,\n });\n }\n\n /**\n * Approve a buyer's refund request with a refund of its payment that has\n * succeeded, made with `create()` after the buyer asked. Approving records\n * the decision and moves no money. A refund that is still `pending` or in\n * `review` is refused: check it again later with `retrieve()` under the same\n * refund ID and approve once it has succeeded, rather than creating another\n * refund. `POST /refund-requests/{id}/approve`\n *\n * @example\n * ```typescript\n * const refund = await delopay.refunds.create({ payment_id: request.payment_id, amount: request.amount });\n * if (refund.status === 'succeeded') {\n * await delopay.refunds.approveRequest(request.id, { refund_id: refund.refund_id });\n * }\n * // Otherwise keep refund.refund_id, check it with retrieve() and approve once it has succeeded.\n * ```\n */\n async approveRequest(\n requestId: string,\n params: BuyerRefundRequestApprove,\n ): Promise<BuyerRefundRequest> {\n return this.request('POST', `/refund-requests/${encodeURIComponent(requestId)}/approve`, {\n body: params,\n });\n }\n\n /** Decline a buyer's refund request. The buyer sees the reply. `POST /refund-requests/{id}/decline` */\n async declineRequest(\n requestId: string,\n params: BuyerRefundRequestDecline,\n ): Promise<BuyerRefundRequest> {\n return this.request('POST', `/refund-requests/${encodeURIComponent(requestId)}/decline`, {\n body: params,\n });\n }\n\n /** List refunds (profile-scoped). `POST /refunds/profile/list` */\n async listByProfile(params?: RefundListParams): Promise<RefundListResponse> {\n return this.request('POST', '/refunds/profile/list', { body: params });\n }\n\n /** Get refund filter options. `GET /refunds/filter` */\n async getFilters(\n params?: Record<string, string | number | undefined>,\n ): Promise<Record<string, unknown>> {\n return this.request('GET', '/refunds/filter', { query: params });\n }\n\n /** Get refund aggregates. `GET /refunds/aggregate` */\n async aggregate(\n params?: Record<string, string | number | undefined>,\n ): Promise<RefundAggregateResponse> {\n return this.request('GET', '/refunds/aggregate', { query: params });\n }\n\n /** Get refund aggregates (profile-scoped). `GET /refunds/profile/aggregate` */\n async aggregateByProfile(\n params?: Record<string, string | number | undefined>,\n ): Promise<RefundAggregateResponse> {\n return this.request('GET', '/refunds/profile/aggregate', { query: params });\n }\n\n /** Manually update refund status. `PUT /refunds/{refundId}/manual-update` */\n async manualUpdate(refundId: string, params: Record<string, unknown>): Promise<RefundResponse> {\n return this.request('PUT', `/refunds/${encodeURIComponent(refundId)}/manual-update`, {\n body: params,\n });\n }\n}\n"]}
1
+ {"version":3,"sources":["/home/anes/delo-payment/_publish/sdk-0.423/dist/chunk-GG52SAHA.cjs","../src/resources/refunds.ts"],"names":[],"mappings":"AAAA;ACoBO,IAAM,QAAA,EAAN,MAAc;AAAA,EACnB,WAAA,CAA6B,OAAA,EAAoB;AAApB,IAAA,IAAA,CAAA,QAAA,EAAA,OAAA;AAAA,EAAqB;AAAA;AAAA;AAAA;AAAA;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AA;AACtE,EAAA;AAAA;AAKoC,EAAA;AAC6B,IAAA;AACjE,EAAA;AAAA;AAKoC,EAAA;AACgC,IAAA;AACpE,EAAA;AAAA;AAKoC,EAAA;AACgC,IAAA;AACpE,EAAA;AAAA;AAG+F,EAAA;AAC1B,IAAA;AAC3D,MAAA;AACP,IAAA;AACH,EAAA;AACF;ADnDwE;AACA;AACA;AACA","file":"/home/anes/delo-payment/_publish/sdk-0.423/dist/chunk-GG52SAHA.cjs","sourcesContent":[null,"import type {\n BuyerRefundRequest,\n BuyerRefundRequestApprove,\n BuyerRefundRequestDecline,\n BuyerRefundRequestList,\n BuyerRefundRequestListQuery,\n RefundCreateRequest,\n RefundResponse,\n RefundUpdateRequest,\n RefundListParams,\n RefundListResponse,\n RefundAggregateResponse,\n RefundBulkBlockBuyerRequest,\n RefundBulkBlockBuyerResponse,\n RefundBulkBlockPreviewRequest,\n RefundBulkBlockPreviewResponse,\n} from '../types';\nimport type { RequestExtras, RequestFn } from '../client';\n\n/** Create and manage refunds for completed payments. */\nexport class Refunds {\n constructor(private readonly request: RequestFn) {}\n\n /**\n * Create a refund for a payment.\n *\n * Dashboard-initiated refunds are subject to the caller's operation-limit\n * rule, resolved against the role the request authenticated with. An\n * over-limit refund either fails with `DE_01` (the rule blocks) or with\n * HTTP 409 `DE_06` — the rule requires approval, and `DelopayError.data`\n * carries `PendingApprovalErrorDetails`. No refund exists in either case;\n * `DE_06` names one that a second approver can still let through, via\n * `operationLimits.approve()`.\n *\n * @param params - Refund parameters, including the required `payment_id` and optional amount.\n * @returns The created refund.\n *\n * @example\n * ```typescript\n * const refund = await delopay.refunds.create({\n * payment_id: 'pay_abc123',\n * amount: 2500, // partial refund of 25.00 EUR\n * });\n * ```\n */\n async create(params: RefundCreateRequest): Promise<RefundResponse> {\n return this.request('POST', '/refunds', { body: params });\n }\n\n /**\n * Retrieve a refund by its ID.\n *\n * @param refundId - The unique refund ID.\n * @returns The refund.\n *\n * @example\n * ```typescript\n * const refund = await delopay.refunds.retrieve('ref_abc123');\n * ```\n */\n async retrieve(refundId: string): Promise<RefundResponse> {\n return this.request('GET', `/refunds/${encodeURIComponent(refundId)}`);\n }\n\n /**\n * Update the reason or metadata on an existing refund.\n *\n * @param refundId - The refund ID to update.\n * @param params - Fields to update (reason, metadata).\n * @returns The updated refund.\n */\n async update(\n refundId: string,\n params: RefundUpdateRequest,\n options?: RequestExtras,\n ): Promise<RefundResponse> {\n return this.request('POST', `/refunds/${encodeURIComponent(refundId)}`, {\n body: params,\n ...options,\n });\n }\n\n /**\n * List refunds, optionally filtered by payment, status, or date range.\n *\n * @param params - Optional filter and pagination parameters.\n * @returns Paginated list of refunds.\n */\n async list(params?: RefundListParams): Promise<RefundListResponse> {\n return this.request('POST', '/refunds/list', { body: params });\n }\n\n /**\n * Every identifier a block of each selected refund's buyer would name,\n * changing nothing: the payment's email and customer id, and every IP\n * address and device id seen on its checkout, each with where it was seen\n * and whether it is already blocked. Name the refunds by `ids` or by the\n * list's `filters`, exactly one of the two; at most `max_refunds` are read.\n *\n * `POST /refunds/bulk/block-buyer/preview`. Needs a dashboard JWT.\n */\n async bulkBlockPreview(\n request: RefundBulkBlockPreviewRequest,\n ): Promise<RefundBulkBlockPreviewResponse> {\n return this.request('POST', '/refunds/bulk/block-buyer/preview', { body: request });\n }\n\n /**\n * Add the buyer of each listed refund's payment to the buyer blocklist with\n * the chosen `kinds`, leaving out the `exclude`d identifiers, at most the\n * preview's `max_run_refunds` per call. The server reads each payment again;\n * it never blocks a value the request names. Identifiers already blocked\n * are not added again, and every refund gets its own result.\n *\n * `POST /refunds/bulk/block-buyer`. Needs a dashboard JWT.\n */\n async bulkBlockBuyer(\n request: RefundBulkBlockBuyerRequest,\n ): Promise<RefundBulkBlockBuyerResponse> {\n return this.request('POST', '/refunds/bulk/block-buyer', { body: request });\n }\n\n // --- OLAP extensions (Task 4.3) ---\n\n /**\n * Refund requests buyers raised from the customer portal, newest first.\n * Limited to the caller's shop when the caller is scoped to one.\n * `GET /refund-requests`\n */\n async listRequests(params?: BuyerRefundRequestListQuery): Promise<BuyerRefundRequestList> {\n return this.request('GET', '/refund-requests', {\n query: params as Record<string, string | number | null | undefined>,\n });\n }\n\n /**\n * Approve a buyer's refund request with a refund of its payment that has\n * succeeded, made with `create()` after the buyer asked. Approving records\n * the decision and moves no money. A refund that is still `pending` or in\n * `review` is refused: check it again later with `retrieve()` under the same\n * refund ID and approve once it has succeeded, rather than creating another\n * refund. `POST /refund-requests/{id}/approve`\n *\n * @example\n * ```typescript\n * const refund = await delopay.refunds.create({ payment_id: request.payment_id, amount: request.amount });\n * if (refund.status === 'succeeded') {\n * await delopay.refunds.approveRequest(request.id, { refund_id: refund.refund_id });\n * }\n * // Otherwise keep refund.refund_id, check it with retrieve() and approve once it has succeeded.\n * ```\n */\n async approveRequest(\n requestId: string,\n params: BuyerRefundRequestApprove,\n ): Promise<BuyerRefundRequest> {\n return this.request('POST', `/refund-requests/${encodeURIComponent(requestId)}/approve`, {\n body: params,\n });\n }\n\n /** Decline a buyer's refund request. The buyer sees the reply. `POST /refund-requests/{id}/decline` */\n async declineRequest(\n requestId: string,\n params: BuyerRefundRequestDecline,\n ): Promise<BuyerRefundRequest> {\n return this.request('POST', `/refund-requests/${encodeURIComponent(requestId)}/decline`, {\n body: params,\n });\n }\n\n /** List refunds (profile-scoped). `POST /refunds/profile/list` */\n async listByProfile(params?: RefundListParams): Promise<RefundListResponse> {\n return this.request('POST', '/refunds/profile/list', { body: params });\n }\n\n /** Get refund filter options. `GET /refunds/filter` */\n async getFilters(\n params?: Record<string, string | number | undefined>,\n ): Promise<Record<string, unknown>> {\n return this.request('GET', '/refunds/filter', { query: params });\n }\n\n /** Get refund aggregates. `GET /refunds/aggregate` */\n async aggregate(\n params?: Record<string, string | number | undefined>,\n ): Promise<RefundAggregateResponse> {\n return this.request('GET', '/refunds/aggregate', { query: params });\n }\n\n /** Get refund aggregates (profile-scoped). `GET /refunds/profile/aggregate` */\n async aggregateByProfile(\n params?: Record<string, string | number | undefined>,\n ): Promise<RefundAggregateResponse> {\n return this.request('GET', '/refunds/profile/aggregate', { query: params });\n }\n\n /** Manually update refund status. `PUT /refunds/{refundId}/manual-update` */\n async manualUpdate(refundId: string, params: Record<string, unknown>): Promise<RefundResponse> {\n return this.request('PUT', `/refunds/${encodeURIComponent(refundId)}/manual-update`, {\n body: params,\n });\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/anes/delo-payment/_worktrees/ts-publish-w3/dist/chunk-GK5FWN4H.cjs","../src/resources/buyerAccount.ts"],"names":[],"mappings":"AAAA;ACgDO,IAAM,aAAA,EAAN,MAAmB;AAAA,EACxB,WAAA,CAA6B,OAAA,EAAoB;AAApB,IAAA,IAAA,CAAA,QAAA,EAAA,OAAA;AAAA,EAAqB;AAAA;AAAA,EAGlD,MAAM,YAAA,CAAa,OAAA,EAA4D;AAC7E,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,KAAA,EAAO,6BAAA,EAA+B,EAAE,GAAG,QAAQ,CAAC,CAAA;AAAA,EAC1E;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,MAAM,WAAA,CACJ,MAAA,EACA,OAAA,EACqC;AACrC,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,MAAA,EAAQ,wBAAA,EAA0B,EAAE,IAAA,EAAM,MAAA,EAAQ,GAAG,QAAQ,CAAC,CAAA;AAAA,EACpF;AAAA;AAAA,EAGA,MAAM,UAAA,CACJ,MAAA,EACA,OAAA,EAC8B;AAC9B,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,MAAA,EAAQ,6BAAA,EAA+B,EAAE,IAAA,EAAM,MAAA,EAAQ,GAAG,QAAQ,CAAC,CAAA;AAAA,EACzF;AAAA;AAAA,EAGA,MAAM,UAAA,CACJ,MAAA,EACA,OAAA,EAC8B;AAC9B,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,MAAA,EAAQ,6BAAA,EAA+B,EAAE,IAAA,EAAM,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;AACV,MAAA;AACwF,MAAA;AAC3E,MAAA;AACf,IAAA;AACF,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAa8B,EAAA;AACgB,IAAA;AAClB,IAAA;AACoB,IAAA;AACM,IAAA;AACb,IAAA;AAC3B,IAAA;AACV,MAAA;AACwF,MAAA;AAChE,MAAA;AAC1B,IAAA;AACF,EAAA;AAAA;AAQiB,EAAA;AACH,IAAA;AACV,MAAA;AACwF,MAAA;AACxF,MAAA;AACgB,QAAA;AACX,QAAA;AACL,MAAA;AACF,IAAA;AACF,EAAA;AAAA;AAQiB,EAAA;AACH,IAAA;AACV,MAAA;AACwF,MAAA;AACxF,MAAA;AACK,QAAA;AACL,MAAA;AACF,IAAA;AACF,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAY+B,EAAA;AACjB,IAAA;AACV,MAAA;AACwF,MAAA;AAC7D,MAAA;AAC7B,IAAA;AACF,EAAA;AAAA;AAQ+B,EAAA;AACjB,IAAA;AACV,MAAA;AACwF,MAAA;AAC7D,MAAA;AAC7B,IAAA;AACF,EAAA;AACF;ADpKwG;AACA;AACA;AACA","file":"/home/anes/delo-payment/_worktrees/ts-publish-w3/dist/chunk-GK5FWN4H.cjs","sourcesContent":[null,"import type { RequestExtras, RequestFn } from '../client';\nimport type {\n BuyerConversationAttachment,\n BuyerPortalAttachmentQuery,\n BuyerAccountAnalytics,\n BuyerAccountAnalyticsQuery,\n BuyerAccountAvailability,\n BuyerAccountConfirmation,\n BuyerAccountConfirmRequest,\n BuyerAccountInvoiceList,\n BuyerAccountListQuery,\n BuyerAccountPortal,\n BuyerAccountPurchasePage,\n BuyerAccountPurchaseQuery,\n BuyerAccountRefundRequestList,\n BuyerCaseList,\n BuyerNoticeSettings,\n BuyerPortalConversationList,\n BuyerPortalConversationQuery,\n BuyerPortalMessage,\n BuyerPortalMessageCreate,\n BuyerPortalMessagePage,\n BuyerAccountSession,\n BuyerAccountSessionInfo,\n BuyerAccountShopList,\n BuyerAccountSignInRequest,\n BuyerAccountSignInResponse,\n BuyerAccountSubscriptionList,\n BuyerAccountSubscriptionQuery,\n BuyerAccountSectionQuery,\n BuyerAccountVerifyCodeRequest,\n BuyerAccountVerifyLinkRequest,\n BuyerEvidence,\n BuyerEvidenceEntry,\n BuyerEvidenceExtensionRequest,\n BuyerEvidenceFile,\n BuyerEvidenceSubmit,\n} from '../types';\n\n/**\n * The buyer account: a buyer signs in with their email address, by a code or\n * a link mailed to it, and sees their purchases across merchants.\n *\n * Starting and completing a sign-in need no credential. Everything after it\n * needs the buyer account session: construct a separate client with the\n * session `token` as its key. A customer portal grant is not a buyer account\n * session, and neither is a merchant secret key or a dashboard JWT.\n */\nexport class BuyerAccount {\n constructor(private readonly request: RequestFn) {}\n\n /** Whether buyers can sign in on this platform, and which methods are offered. */\n async availability(options?: RequestExtras): Promise<BuyerAccountAvailability> {\n return this.request('GET', '/buyer-account/availability', { ...options });\n }\n\n /**\n * Mail a sign-in code, a link, or both to the address, as the platform\n * offers. The answer is the same whether or not the address has purchases.\n */\n async startSignIn(\n params: BuyerAccountSignInRequest,\n options?: RequestExtras,\n ): Promise<BuyerAccountSignInResponse> {\n return this.request('POST', '/buyer-account/sign-in', { body: params, ...options });\n }\n\n /** Complete a sign-in with the code from the message. */\n async verifyCode(\n params: BuyerAccountVerifyCodeRequest,\n options?: RequestExtras,\n ): Promise<BuyerAccountSession> {\n return this.request('POST', '/buyer-account/sign-in/code', { body: params, ...options });\n }\n\n /** Complete a sign-in with the token of the link in the message. */\n async verifyLink(\n params: BuyerAccountVerifyLinkRequest,\n options?: RequestExtras,\n ): Promise<BuyerAccountSession> {\n return this.request('POST', '/buyer-account/sign-in/link', { body: params, ...options });\n }\n\n /** The current session: the address signed in with, masked, and its expiry. */\n async getSession(options?: RequestExtras): Promise<BuyerAccountSessionInfo> {\n return this.request('GET', '/buyer-account/session', { ...options });\n }\n\n /**\n * What the buyer is mailed about: a reply from a shop's team they have not\n * read, and news in their refund requests and disputes.\n */\n async noticeSettings(options?: RequestExtras): Promise<BuyerNoticeSettings> {\n return this.request('GET', '/buyer-account/notice-settings', { ...options });\n }\n\n /** Turn either mail on or off for the buyer, at every shop. */\n async setNoticeSettings(\n params: BuyerNoticeSettings,\n options?: RequestExtras,\n ): Promise<BuyerNoticeSettings> {\n return this.request('PUT', '/buyer-account/notice-settings', { body: params, ...options });\n }\n\n /** End the current session. */\n async signOut(options?: RequestExtras): Promise<void> {\n return this.request('DELETE', '/buyer-account/session', { ...options });\n }\n\n /**\n * The buyer's purchases across merchants, newest first, as receipts: shop,\n * date, amount, items and status. Page with `next_cursor`.\n */\n async listPurchases(\n params?: BuyerAccountPurchaseQuery,\n options?: RequestExtras,\n ): Promise<BuyerAccountPurchasePage> {\n return this.request('GET', '/buyer-account/purchases', {\n query: params as Record<string, string | number | null | undefined>,\n ...options,\n });\n }\n\n /**\n * The shops the buyer has purchases at, once each and by name. Pass a\n * shop's `shop` to `listPurchases` to list only that shop's purchases.\n */\n async listShops(options?: RequestExtras): Promise<BuyerAccountShopList> {\n return this.request('GET', '/buyer-account/shops', { ...options });\n }\n\n /**\n * The buyer's subscriptions across shops, newest first. A record the buyer\n * has not confirmed shows what a receipt carries, without its period or\n * cancellation. Follow `next_cursor` with the same shop and mode; an\n * omitted mode includes both modes.\n */\n async listSubscriptions(\n query?: BuyerAccountSubscriptionQuery,\n options?: RequestExtras,\n ): Promise<BuyerAccountSubscriptionList> {\n return this.request('GET', '/buyer-account/subscriptions', {\n query: query ? { ...query } : undefined,\n ...options,\n });\n }\n\n /**\n * The issued invoices of the records the buyer has confirmed through a\n * shop's own link, newest first. `unconfirmed_records` says when records\n * were left out. Follow `next_cursor` with the same shop and mode; an\n * omitted mode includes both modes.\n */\n async listInvoices(\n query?: BuyerAccountSectionQuery,\n options?: RequestExtras,\n ): Promise<BuyerAccountInvoiceList> {\n return this.request('GET', '/buyer-account/invoices', {\n query: query ? { ...query } : undefined,\n ...options,\n });\n }\n\n /**\n * The confirmed records' refund requests, newest first, with the shop's\n * decision. Follow `next_cursor` with the same shop and mode; an omitted\n * mode includes both modes.\n */\n async listRefundRequests(\n query?: BuyerAccountSectionQuery,\n options?: RequestExtras,\n ): Promise<BuyerAccountRefundRequestList> {\n return this.request('GET', '/buyer-account/refund-requests', {\n query: query ? { ...query } : undefined,\n ...options,\n });\n }\n\n /**\n * The cases of the records the buyer has confirmed: the refund requests\n * they sent and the disputes about their purchases, newest first, with\n * where each stands, who acts next, the outcome and the recorded steps.\n */\n async listCases(query?: BuyerAccountListQuery, options?: RequestExtras): Promise<BuyerCaseList> {\n return this.request('GET', '/buyer-account/cases', {\n query: query as Record<string, string | null | undefined>,\n ...options,\n });\n }\n\n /**\n * The conversations of the records the buyer has confirmed, the latest\n * message first. `unconfirmed_records` says when other records were left out.\n */\n async listConversations(\n query?: BuyerAccountListQuery,\n options?: RequestExtras,\n ): Promise<BuyerPortalConversationList> {\n return this.request('GET', '/buyer-account/conversations', {\n query: query as Record<string, string | null | undefined>,\n ...options,\n });\n }\n\n /**\n * The conversation of a confirmed record with one shop, and its newest\n * messages, oldest first; `before` pages back. `shop` is required here.\n */\n async listRecordMessages(\n record: string,\n query: BuyerPortalConversationQuery,\n options?: RequestExtras,\n ): Promise<BuyerPortalMessagePage> {\n return this.request('GET', `/buyer-account/records/${encodeURIComponent(record)}/messages`, {\n query: query as Record<string, string | number | boolean | null | undefined>,\n ...options,\n });\n }\n\n /**\n * A message from a confirmed record to one of its shops. A message to a\n * closed conversation reopens it. Sending again with the same\n * `client_message_id` returns the message the first send stored.\n */\n async sendRecordMessage(\n record: string,\n message: BuyerPortalMessageCreate,\n options?: RequestExtras,\n ): Promise<BuyerPortalMessage> {\n return this.request('POST', `/buyer-account/records/${encodeURIComponent(record)}/messages`, {\n body: message,\n ...options,\n });\n }\n\n /**\n * The buyer has read a record's conversation with one shop up to its last\n * accepted message. Answers with the buyer's conversations as they now stand.\n */\n async markRecordMessagesRead(\n record: string,\n query: BuyerPortalConversationQuery,\n options?: RequestExtras,\n ): Promise<BuyerPortalConversationList> {\n return this.request(\n 'POST',\n `/buyer-account/records/${encodeURIComponent(record)}/messages/read`,\n {\n query: query as Record<string, string | number | boolean | null | undefined>,\n ...options,\n },\n );\n }\n\n /**\n * Upload a file for the buyer's next message to one shop of a confirmed\n * record, under the shop's attachment rules (`attachment_rules` on the\n * message page). It belongs to the buyer until a message names it in\n * `attachments`; one no message took within a day is cleared. Uploading\n * again with the same `clientUploadId` returns the file the first upload\n * stored. `shop` is required here.\n */\n async uploadRecordMessageFile(\n record: string,\n file: Blob,\n clientUploadId: string,\n query: BuyerPortalAttachmentQuery,\n options?: RequestExtras & { fileName?: string },\n ): Promise<BuyerConversationAttachment> {\n const { fileName, ...extras } = options ?? {};\n const form = new FormData();\n form.append('client_upload_id', clientUploadId);\n if (fileName === undefined) form.append('file', file);\n else form.append('file', file, fileName);\n return this.request(\n 'POST',\n `/buyer-account/records/${encodeURIComponent(record)}/messages/files`,\n {\n body: form,\n query: query as Record<string, string | boolean | null | undefined>,\n ...extras,\n },\n );\n }\n\n /** Download a file a message of a record's conversation with one shop carries. */\n async downloadRecordMessageFile(\n record: string,\n fileId: string,\n query: BuyerPortalAttachmentQuery,\n options?: RequestExtras,\n ): Promise<Blob> {\n return this.request(\n 'GET',\n `/buyer-account/records/${encodeURIComponent(record)}/messages/files/${encodeURIComponent(fileId)}`,\n {\n query: query as Record<string, string | boolean | null | undefined>,\n responseType: 'blob',\n ...options,\n },\n );\n }\n\n /** Remove a file the buyer uploaded for a record's conversation that no message took. */\n async removeRecordMessageFile(\n record: string,\n fileId: string,\n query: BuyerPortalAttachmentQuery,\n options?: RequestExtras,\n ): Promise<void> {\n return this.request(\n 'DELETE',\n `/buyer-account/records/${encodeURIComponent(record)}/messages/files/${encodeURIComponent(fileId)}`,\n {\n query: query as Record<string, string | boolean | null | undefined>,\n ...options,\n },\n );\n }\n\n /**\n * What the buyer spent in a period: paid purchases summed per currency,\n * never converted, for the whole period, per day, week or month, per shop\n * and per kind of purchase. `subscriptions`, when present, summarizes all\n * current subscriptions in the same shop and mode, independently of the\n * spending period and subscription list pagination.\n */\n async analytics(\n query: BuyerAccountAnalyticsQuery,\n options?: RequestExtras,\n ): Promise<BuyerAccountAnalytics> {\n return this.request('GET', '/buyer-account/analytics', {\n query: { ...query },\n ...options,\n });\n }\n\n /**\n * Confirm the record of a shop's customer portal link for the signed-in\n * buyer. The link's customer must carry the address the buyer signed in\n * with.\n */\n async confirm(\n params: BuyerAccountConfirmRequest,\n options?: RequestExtras,\n ): Promise<BuyerAccountConfirmation> {\n return this.request('POST', '/buyer-account/confirmations', { body: params, ...options });\n }\n\n /**\n * Open the shop's customer portal for a confirmed record, named by the\n * `record` its purchases carry. Opening another one for the same record\n * ends the previous one.\n */\n async openPortal(record: string, options?: RequestExtras): Promise<BuyerAccountPortal> {\n return this.request('POST', `/buyer-account/records/${encodeURIComponent(record)}/portal`, {\n ...options,\n });\n }\n /**\n * A case's evidence: what may be handed in and by when, the files saved\n * and handed in, and what the reviewer said. Opened on the first read\n * while the case still waits.\n * The case is one of a confirmed record's, named by the `record` its\n * purchases carry and the case id the case list shows.\n */\n async caseEvidence(\n record: string,\n caseId: string,\n options?: RequestExtras,\n ): Promise<BuyerEvidence> {\n return this.request(\n 'GET',\n `/buyer-account/records/${encodeURIComponent(record)}/cases/${encodeURIComponent(caseId)}/evidence`,\n { ...options },\n );\n }\n\n /**\n * Upload a file for a case. It is saved, not handed in, until a\n * submission takes it. Uploading again with the same `clientUploadId`\n * returns the file the first upload stored, also after the cut-off.\n */\n async uploadEvidenceFile(\n record: string,\n caseId: string,\n file: Blob,\n clientUploadId: string,\n options?: RequestExtras & { fileName?: string },\n ): Promise<BuyerEvidenceFile> {\n const { fileName, ...extras } = options ?? {};\n const form = new FormData();\n form.append('client_upload_id', clientUploadId);\n if (fileName === undefined) form.append('file', file);\n else form.append('file', file, fileName);\n return this.request(\n 'POST',\n `/buyer-account/records/${encodeURIComponent(record)}/cases/${encodeURIComponent(caseId)}/evidence/files`,\n { body: form, ...extras },\n );\n }\n\n /** Download a file of the case's evidence. */\n async downloadEvidenceFile(\n record: string,\n caseId: string,\n fileId: string,\n options?: RequestExtras,\n ): Promise<Blob> {\n return this.request(\n 'GET',\n `/buyer-account/records/${encodeURIComponent(record)}/cases/${encodeURIComponent(caseId)}/evidence/files/${encodeURIComponent(fileId)}`,\n {\n responseType: 'blob',\n ...options,\n },\n );\n }\n\n /** Remove a saved file. A file a submission took stays. */\n async removeEvidenceFile(\n record: string,\n caseId: string,\n fileId: string,\n options?: RequestExtras,\n ): Promise<void> {\n return this.request(\n 'DELETE',\n `/buyer-account/records/${encodeURIComponent(record)}/cases/${encodeURIComponent(caseId)}/evidence/files/${encodeURIComponent(fileId)}`,\n {\n ...options,\n },\n );\n }\n\n /**\n * Hand in an explanation, saved files or both, while the buyer's window\n * is open. Sending again with the same `client_submission_id` returns the\n * submission the first send stored.\n */\n async submitEvidence(\n record: string,\n caseId: string,\n params: BuyerEvidenceSubmit,\n options?: RequestExtras,\n ): Promise<BuyerEvidenceEntry> {\n return this.request(\n 'POST',\n `/buyer-account/records/${encodeURIComponent(record)}/cases/${encodeURIComponent(caseId)}/evidence/submissions`,\n { body: params, ...options },\n );\n }\n\n /** Ask for more time, once until the cut-off is next set. */\n async requestEvidenceExtension(\n record: string,\n caseId: string,\n params: BuyerEvidenceExtensionRequest,\n options?: RequestExtras,\n ): Promise<BuyerEvidenceEntry> {\n return this.request(\n 'POST',\n `/buyer-account/records/${encodeURIComponent(record)}/cases/${encodeURIComponent(caseId)}/evidence/extension-requests`,\n { body: params, ...options },\n );\n }\n}\n"]}
1
+ {"version":3,"sources":["/home/anes/delo-payment/_publish/sdk-0.423/dist/chunk-GK5FWN4H.cjs","../src/resources/buyerAccount.ts"],"names":[],"mappings":"AAAA;ACgDO,IAAM,aAAA,EAAN,MAAmB;AAAA,EACxB,WAAA,CAA6B,OAAA,EAAoB;AAApB,IAAA,IAAA,CAAA,QAAA,EAAA,OA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AA;AAAA;AAY+B,EAAA;AACjB,IAAA;AACV,MAAA;AACwF,MAAA;AAC7D,MAAA;AAC7B,IAAA;AACF,EAAA;AAAA;AAQ+B,EAAA;AACjB,IAAA;AACV,MAAA;AACwF,MAAA;AAC7D,MAAA;AAC7B,IAAA;AACF,EAAA;AACF;ADpKwG;AACA;AACA;AACA","file":"/home/anes/delo-payment/_publish/sdk-0.423/dist/chunk-GK5FWN4H.cjs","sourcesContent":[null,"import type { RequestExtras, RequestFn } from '../client';\nimport type {\n BuyerConversationAttachment,\n BuyerPortalAttachmentQuery,\n BuyerAccountAnalytics,\n BuyerAccountAnalyticsQuery,\n BuyerAccountAvailability,\n BuyerAccountConfirmation,\n BuyerAccountConfirmRequest,\n BuyerAccountInvoiceList,\n BuyerAccountListQuery,\n BuyerAccountPortal,\n BuyerAccountPurchasePage,\n BuyerAccountPurchaseQuery,\n BuyerAccountRefundRequestList,\n BuyerCaseList,\n BuyerNoticeSettings,\n BuyerPortalConversationList,\n BuyerPortalConversationQuery,\n BuyerPortalMessage,\n BuyerPortalMessageCreate,\n BuyerPortalMessagePage,\n BuyerAccountSession,\n BuyerAccountSessionInfo,\n BuyerAccountShopList,\n BuyerAccountSignInRequest,\n BuyerAccountSignInResponse,\n BuyerAccountSubscriptionList,\n BuyerAccountSubscriptionQuery,\n BuyerAccountSectionQuery,\n BuyerAccountVerifyCodeRequest,\n BuyerAccountVerifyLinkRequest,\n BuyerEvidence,\n BuyerEvidenceEntry,\n BuyerEvidenceExtensionRequest,\n BuyerEvidenceFile,\n BuyerEvidenceSubmit,\n} from '../types';\n\n/**\n * The buyer account: a buyer signs in with their email address, by a code or\n * a link mailed to it, and sees their purchases across merchants.\n *\n * Starting and completing a sign-in need no credential. Everything after it\n * needs the buyer account session: construct a separate client with the\n * session `token` as its key. A customer portal grant is not a buyer account\n * session, and neither is a merchant secret key or a dashboard JWT.\n */\nexport class BuyerAccount {\n constructor(private readonly request: RequestFn) {}\n\n /** Whether buyers can sign in on this platform, and which methods are offered. */\n async availability(options?: RequestExtras): Promise<BuyerAccountAvailability> {\n return this.request('GET', '/buyer-account/availability', { ...options });\n }\n\n /**\n * Mail a sign-in code, a link, or both to the address, as the platform\n * offers. The answer is the same whether or not the address has purchases.\n */\n async startSignIn(\n params: BuyerAccountSignInRequest,\n options?: RequestExtras,\n ): Promise<BuyerAccountSignInResponse> {\n return this.request('POST', '/buyer-account/sign-in', { body: params, ...options });\n }\n\n /** Complete a sign-in with the code from the message. */\n async verifyCode(\n params: BuyerAccountVerifyCodeRequest,\n options?: RequestExtras,\n ): Promise<BuyerAccountSession> {\n return this.request('POST', '/buyer-account/sign-in/code', { body: params, ...options });\n }\n\n /** Complete a sign-in with the token of the link in the message. */\n async verifyLink(\n params: BuyerAccountVerifyLinkRequest,\n options?: RequestExtras,\n ): Promise<BuyerAccountSession> {\n return this.request('POST', '/buyer-account/sign-in/link', { body: params, ...options });\n }\n\n /** The current session: the address signed in with, masked, and its expiry. */\n async getSession(options?: RequestExtras): Promise<BuyerAccountSessionInfo> {\n return this.request('GET', '/buyer-account/session', { ...options });\n }\n\n /**\n * What the buyer is mailed about: a reply from a shop's team they have not\n * read, and news in their refund requests and disputes.\n */\n async noticeSettings(options?: RequestExtras): Promise<BuyerNoticeSettings> {\n return this.request('GET', '/buyer-account/notice-settings', { ...options });\n }\n\n /** Turn either mail on or off for the buyer, at every shop. */\n async setNoticeSettings(\n params: BuyerNoticeSettings,\n options?: RequestExtras,\n ): Promise<BuyerNoticeSettings> {\n return this.request('PUT', '/buyer-account/notice-settings', { body: params, ...options });\n }\n\n /** End the current session. */\n async signOut(options?: RequestExtras): Promise<void> {\n return this.request('DELETE', '/buyer-account/session', { ...options });\n }\n\n /**\n * The buyer's purchases across merchants, newest first, as receipts: shop,\n * date, amount, items and status. Page with `next_cursor`.\n */\n async listPurchases(\n params?: BuyerAccountPurchaseQuery,\n options?: RequestExtras,\n ): Promise<BuyerAccountPurchasePage> {\n return this.request('GET', '/buyer-account/purchases', {\n query: params as Record<string, string | number | null | undefined>,\n ...options,\n });\n }\n\n /**\n * The shops the buyer has purchases at, once each and by name. Pass a\n * shop's `shop` to `listPurchases` to list only that shop's purchases.\n */\n async listShops(options?: RequestExtras): Promise<BuyerAccountShopList> {\n return this.request('GET', '/buyer-account/shops', { ...options });\n }\n\n /**\n * The buyer's subscriptions across shops, newest first. A record the buyer\n * has not confirmed shows what a receipt carries, without its period or\n * cancellation. Follow `next_cursor` with the same shop and mode; an\n * omitted mode includes both modes.\n */\n async listSubscriptions(\n query?: BuyerAccountSubscriptionQuery,\n options?: RequestExtras,\n ): Promise<BuyerAccountSubscriptionList> {\n return this.request('GET', '/buyer-account/subscriptions', {\n query: query ? { ...query } : undefined,\n ...options,\n });\n }\n\n /**\n * The issued invoices of the records the buyer has confirmed through a\n * shop's own link, newest first. `unconfirmed_records` says when records\n * were left out. Follow `next_cursor` with the same shop and mode; an\n * omitted mode includes both modes.\n */\n async listInvoices(\n query?: BuyerAccountSectionQuery,\n options?: RequestExtras,\n ): Promise<BuyerAccountInvoiceList> {\n return this.request('GET', '/buyer-account/invoices', {\n query: query ? { ...query } : undefined,\n ...options,\n });\n }\n\n /**\n * The confirmed records' refund requests, newest first, with the shop's\n * decision. Follow `next_cursor` with the same shop and mode; an omitted\n * mode includes both modes.\n */\n async listRefundRequests(\n query?: BuyerAccountSectionQuery,\n options?: RequestExtras,\n ): Promise<BuyerAccountRefundRequestList> {\n return this.request('GET', '/buyer-account/refund-requests', {\n query: query ? { ...query } : undefined,\n ...options,\n });\n }\n\n /**\n * The cases of the records the buyer has confirmed: the refund requests\n * they sent and the disputes about their purchases, newest first, with\n * where each stands, who acts next, the outcome and the recorded steps.\n */\n async listCases(query?: BuyerAccountListQuery, options?: RequestExtras): Promise<BuyerCaseList> {\n return this.request('GET', '/buyer-account/cases', {\n query: query as Record<string, string | null | undefined>,\n ...options,\n });\n }\n\n /**\n * The conversations of the records the buyer has confirmed, the latest\n * message first. `unconfirmed_records` says when other records were left out.\n */\n async listConversations(\n query?: BuyerAccountListQuery,\n options?: RequestExtras,\n ): Promise<BuyerPortalConversationList> {\n return this.request('GET', '/buyer-account/conversations', {\n query: query as Record<string, string | null | undefined>,\n ...options,\n });\n }\n\n /**\n * The conversation of a confirmed record with one shop, and its newest\n * messages, oldest first; `before` pages back. `shop` is required here.\n */\n async listRecordMessages(\n record: string,\n query: BuyerPortalConversationQuery,\n options?: RequestExtras,\n ): Promise<BuyerPortalMessagePage> {\n return this.request('GET', `/buyer-account/records/${encodeURIComponent(record)}/messages`, {\n query: query as Record<string, string | number | boolean | null | undefined>,\n ...options,\n });\n }\n\n /**\n * A message from a confirmed record to one of its shops. A message to a\n * closed conversation reopens it. Sending again with the same\n * `client_message_id` returns the message the first send stored.\n */\n async sendRecordMessage(\n record: string,\n message: BuyerPortalMessageCreate,\n options?: RequestExtras,\n ): Promise<BuyerPortalMessage> {\n return this.request('POST', `/buyer-account/records/${encodeURIComponent(record)}/messages`, {\n body: message,\n ...options,\n });\n }\n\n /**\n * The buyer has read a record's conversation with one shop up to its last\n * accepted message. Answers with the buyer's conversations as they now stand.\n */\n async markRecordMessagesRead(\n record: string,\n query: BuyerPortalConversationQuery,\n options?: RequestExtras,\n ): Promise<BuyerPortalConversationList> {\n return this.request(\n 'POST',\n `/buyer-account/records/${encodeURIComponent(record)}/messages/read`,\n {\n query: query as Record<string, string | number | boolean | null | undefined>,\n ...options,\n },\n );\n }\n\n /**\n * Upload a file for the buyer's next message to one shop of a confirmed\n * record, under the shop's attachment rules (`attachment_rules` on the\n * message page). It belongs to the buyer until a message names it in\n * `attachments`; one no message took within a day is cleared. Uploading\n * again with the same `clientUploadId` returns the file the first upload\n * stored. `shop` is required here.\n */\n async uploadRecordMessageFile(\n record: string,\n file: Blob,\n clientUploadId: string,\n query: BuyerPortalAttachmentQuery,\n options?: RequestExtras & { fileName?: string },\n ): Promise<BuyerConversationAttachment> {\n const { fileName, ...extras } = options ?? {};\n const form = new FormData();\n form.append('client_upload_id', clientUploadId);\n if (fileName === undefined) form.append('file', file);\n else form.append('file', file, fileName);\n return this.request(\n 'POST',\n `/buyer-account/records/${encodeURIComponent(record)}/messages/files`,\n {\n body: form,\n query: query as Record<string, string | boolean | null | undefined>,\n ...extras,\n },\n );\n }\n\n /** Download a file a message of a record's conversation with one shop carries. */\n async downloadRecordMessageFile(\n record: string,\n fileId: string,\n query: BuyerPortalAttachmentQuery,\n options?: RequestExtras,\n ): Promise<Blob> {\n return this.request(\n 'GET',\n `/buyer-account/records/${encodeURIComponent(record)}/messages/files/${encodeURIComponent(fileId)}`,\n {\n query: query as Record<string, string | boolean | null | undefined>,\n responseType: 'blob',\n ...options,\n },\n );\n }\n\n /** Remove a file the buyer uploaded for a record's conversation that no message took. */\n async removeRecordMessageFile(\n record: string,\n fileId: string,\n query: BuyerPortalAttachmentQuery,\n options?: RequestExtras,\n ): Promise<void> {\n return this.request(\n 'DELETE',\n `/buyer-account/records/${encodeURIComponent(record)}/messages/files/${encodeURIComponent(fileId)}`,\n {\n query: query as Record<string, string | boolean | null | undefined>,\n ...options,\n },\n );\n }\n\n /**\n * What the buyer spent in a period: paid purchases summed per currency,\n * never converted, for the whole period, per day, week or month, per shop\n * and per kind of purchase. `subscriptions`, when present, summarizes all\n * current subscriptions in the same shop and mode, independently of the\n * spending period and subscription list pagination.\n */\n async analytics(\n query: BuyerAccountAnalyticsQuery,\n options?: RequestExtras,\n ): Promise<BuyerAccountAnalytics> {\n return this.request('GET', '/buyer-account/analytics', {\n query: { ...query },\n ...options,\n });\n }\n\n /**\n * Confirm the record of a shop's customer portal link for the signed-in\n * buyer. The link's customer must carry the address the buyer signed in\n * with.\n */\n async confirm(\n params: BuyerAccountConfirmRequest,\n options?: RequestExtras,\n ): Promise<BuyerAccountConfirmation> {\n return this.request('POST', '/buyer-account/confirmations', { body: params, ...options });\n }\n\n /**\n * Open the shop's customer portal for a confirmed record, named by the\n * `record` its purchases carry. Opening another one for the same record\n * ends the previous one.\n */\n async openPortal(record: string, options?: RequestExtras): Promise<BuyerAccountPortal> {\n return this.request('POST', `/buyer-account/records/${encodeURIComponent(record)}/portal`, {\n ...options,\n });\n }\n /**\n * A case's evidence: what may be handed in and by when, the files saved\n * and handed in, and what the reviewer said. Opened on the first read\n * while the case still waits.\n * The case is one of a confirmed record's, named by the `record` its\n * purchases carry and the case id the case list shows.\n */\n async caseEvidence(\n record: string,\n caseId: string,\n options?: RequestExtras,\n ): Promise<BuyerEvidence> {\n return this.request(\n 'GET',\n `/buyer-account/records/${encodeURIComponent(record)}/cases/${encodeURIComponent(caseId)}/evidence`,\n { ...options },\n );\n }\n\n /**\n * Upload a file for a case. It is saved, not handed in, until a\n * submission takes it. Uploading again with the same `clientUploadId`\n * returns the file the first upload stored, also after the cut-off.\n */\n async uploadEvidenceFile(\n record: string,\n caseId: string,\n file: Blob,\n clientUploadId: string,\n options?: RequestExtras & { fileName?: string },\n ): Promise<BuyerEvidenceFile> {\n const { fileName, ...extras } = options ?? {};\n const form = new FormData();\n form.append('client_upload_id', clientUploadId);\n if (fileName === undefined) form.append('file', file);\n else form.append('file', file, fileName);\n return this.request(\n 'POST',\n `/buyer-account/records/${encodeURIComponent(record)}/cases/${encodeURIComponent(caseId)}/evidence/files`,\n { body: form, ...extras },\n );\n }\n\n /** Download a file of the case's evidence. */\n async downloadEvidenceFile(\n record: string,\n caseId: string,\n fileId: string,\n options?: RequestExtras,\n ): Promise<Blob> {\n return this.request(\n 'GET',\n `/buyer-account/records/${encodeURIComponent(record)}/cases/${encodeURIComponent(caseId)}/evidence/files/${encodeURIComponent(fileId)}`,\n {\n responseType: 'blob',\n ...options,\n },\n );\n }\n\n /** Remove a saved file. A file a submission took stays. */\n async removeEvidenceFile(\n record: string,\n caseId: string,\n fileId: string,\n options?: RequestExtras,\n ): Promise<void> {\n return this.request(\n 'DELETE',\n `/buyer-account/records/${encodeURIComponent(record)}/cases/${encodeURIComponent(caseId)}/evidence/files/${encodeURIComponent(fileId)}`,\n {\n ...options,\n },\n );\n }\n\n /**\n * Hand in an explanation, saved files or both, while the buyer's window\n * is open. Sending again with the same `client_submission_id` returns the\n * submission the first send stored.\n */\n async submitEvidence(\n record: string,\n caseId: string,\n params: BuyerEvidenceSubmit,\n options?: RequestExtras,\n ): Promise<BuyerEvidenceEntry> {\n return this.request(\n 'POST',\n `/buyer-account/records/${encodeURIComponent(record)}/cases/${encodeURIComponent(caseId)}/evidence/submissions`,\n { body: params, ...options },\n );\n }\n\n /** Ask for more time, once until the cut-off is next set. */\n async requestEvidenceExtension(\n record: string,\n caseId: string,\n params: BuyerEvidenceExtensionRequest,\n options?: RequestExtras,\n ): Promise<BuyerEvidenceEntry> {\n return this.request(\n 'POST',\n `/buyer-account/records/${encodeURIComponent(record)}/cases/${encodeURIComponent(caseId)}/evidence/extension-requests`,\n { body: params, ...options },\n );\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/anes/delo-payment/_worktrees/ts-publish-w3/dist/chunk-GSQN5EOO.cjs","../src/cardFormStyles.ts"],"names":[],"mappings":"AAAA;AACE;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACA;AC0BO,IAAM,mBAAA,EAAqB,yCAAA;AAI3B,IAAM,sBAAA,EAAwB,4CAAA;AAI9B,IAAM,mBAAA,EAAqB,yCAAA;AAI3B,IAAM,iBAAA,EAAmB,uCAAA;AAIzB,SAAS,eAAA,CAAgB,IAAA,EAAiC;AAC/D,EAAA,OAAO,KAAA,IAAS,KAAA,EAAO,GAAA,EAAK,KAAA,IAAS,KAAA,EAAO,GAAA,EAAK,EAAA;AACnD;AAGO,SAAS,oBAAA,CAAqB,MAAA,EAAiC;AACpE,EAAA,OAAO,OAAA,IAAW,UAAA,EAAY,IAAA,EAAM,OAAA,IAAW,WAAA,EAAa,IAAA,EAAM,GAAA;AACpE;AASO,IAAM,cAAA,EAAgB,CAAC,MAAA,EAAQ,QAAA,EAAU,MAAA,EAAQ,OAAO,CAAA;AAIxD,SAAS,kBAAA,CAAmB,KA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IAAM,QAAA,CAAS,GAAG,CAAC;AAAA,EACrE,CAAA,UAAK,MAAA;AAET;AD9OA;AACA;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,muDAAC","file":"/home/anes/delo-payment/_worktrees/ts-publish-w3/dist/chunk-GSQN5EOO.cjs","sourcesContent":[null,"// How the card forms that are not Airwallex's can be styled: Stripe's Payment\n// Element, PayPal Card Fields and NomuPay's COPYandPAY widget.\n//\n// Each processor draws the card inside its own iframes and exposes a\n// different, narrow styling surface, so each gets only the controls that\n// surface actually reaches:\n//\n// - Stripe takes an Appearance object (`theme`, `inputs`, `labels`,\n// `variables`, `rules`, `disableAnimations`) and paints everything inside\n// one iframe itself.\n// - PayPal takes CSS for the text inside each field iframe (`input`, `.valid`,\n// `.invalid`, `:focus`); the box around it is the checkout's own DOM.\n// - COPYandPAY takes `wpwlOptions` (`style`, `showLabels`, `showPlaceholders`,\n// `showCVVHint`, `iframeStyles` for the two placeholders) and renders its\n// `.wpwl-*` classes into the page, where the checkout's CSS styles the box.\n//\n// Every value here is presentation. Nothing narrows the cards a buyer may pay\n// with, and nothing reaches a confirm path. COPYandPAY's `brandDetection` is\n// deliberately absent for that reason: it picks the scheme a co-badged card is\n// charged on, which is the buyer's choice to make, not a style.\n//\n// The box vocabularies (chrome, type size, weight, focus ring) are the\n// Airwallex section's, re-exported under neutral names, so a merchant styling\n// two rails meets the same words and the checkout draws them the same way.\n\nimport {\n AIRWALLEX_FIELD_CHROMES,\n AIRWALLEX_FIELD_FONT_SIZES,\n AIRWALLEX_FIELD_WEIGHTS,\n AIRWALLEX_FOCUS_RINGS,\n} from './airwallexCard';\n\n/** How the box around a field is drawn: `outlined`, `filled` or `underline`. */\nexport const CARD_FIELD_CHROMES = AIRWALLEX_FIELD_CHROMES;\nexport type CardFieldChrome = (typeof CARD_FIELD_CHROMES)[number];\n\n/** Field type size: `sm` 14px, `md` 16px, `lg` 18px. */\nexport const CARD_FIELD_FONT_SIZES = AIRWALLEX_FIELD_FONT_SIZES;\nexport type CardFieldFontSize = (typeof CARD_FIELD_FONT_SIZES)[number];\n\n/** Field type weight: `regular` 400, `medium` 500, `semibold` 600. */\nexport const CARD_FIELD_WEIGHTS = AIRWALLEX_FIELD_WEIGHTS;\nexport type CardFieldWeight = (typeof CARD_FIELD_WEIGHTS)[number];\n\n/** The ring around the focused field: `none`, `subtle` (neutral) or `strong` (brand colour). */\nexport const CARD_FOCUS_RINGS = AIRWALLEX_FOCUS_RINGS;\nexport type CardFocusRing = (typeof CARD_FOCUS_RINGS)[number];\n\n/** A field type size in px. */\nexport function cardFieldFontPx(size: CardFieldFontSize): number {\n return size === 'sm' ? 14 : size === 'lg' ? 18 : 16;\n}\n\n/** A field type weight as a CSS numeric weight. */\nexport function cardFieldWeightValue(weight: CardFieldWeight): number {\n return weight === 'regular' ? 400 : weight === 'semibold' ? 600 : 500;\n}\n\n// --- Stripe Payment Element ---------------------------------------------\n\n/**\n * Stripe's base theme. `auto` is `night` on a dark checkout and `stripe` on a\n * light one, which is what the pane chose before this setting existed. The\n * merchant's colours, font and radius are applied over whichever is picked.\n */\nexport const STRIPE_THEMES = ['auto', 'stripe', 'flat', 'night'] as const;\nexport type StripeTheme = (typeof STRIPE_THEMES)[number];\n\n/** The theme Stripe is actually given. */\nexport function resolveStripeTheme(theme: StripeTheme, dark: boolean): 'stripe' | 'flat' | 'night' {\n if (theme === 'auto') return dark ? 'night' : 'stripe';\n return theme;\n}\n\n/** Stripe's `appearance.inputs`: separate boxes, or one condensed block. */\nexport const STRIPE_INPUT_STYLES = ['spaced', 'condensed'] as const;\nexport type StripeInputStyle = (typeof STRIPE_INPUT_STYLES)[number];\n\n/**\n * Stripe's `appearance.labels`. The checkout-wide `labelStyle: 'hidden'` still\n * wins over either, because hiding is a decision about every form.\n */\nexport const STRIPE_LABEL_PLACEMENTS = ['above', 'floating'] as const;\nexport type StripeLabelPlacement = (typeof STRIPE_LABEL_PLACEMENTS)[number];\n\n/** The space between Stripe's fields and rows. */\nexport const STRIPE_SPACINGS = ['compact', 'comfortable', 'spacious'] as const;\nexport type StripeSpacing = (typeof STRIPE_SPACINGS)[number];\n\n/**\n * Stripe's `spacingUnit` and `gridRowSpacing` for a spacing choice.\n * `comfortable` is the 4px / 12px the pane always sent.\n */\nexport function stripeSpacingValues(spacing: StripeSpacing): {\n spacingUnit: string;\n gridRowSpacing: string;\n} {\n if (spacing === 'compact') return { spacingUnit: '3px', gridRowSpacing: '8px' };\n if (spacing === 'spacious') return { spacingUnit: '5px', gridRowSpacing: '16px' };\n return { spacingUnit: '4px', gridRowSpacing: '12px' };\n}\n\n// --- PayPal Card Fields -------------------------------------------------\n\n/** The PayPal card form's rows: expiry and CVC side by side, or every field full width. */\nexport const PAYPAL_CARD_LAYOUTS = ['split', 'stacked'] as const;\nexport type PaypalCardLayout = (typeof PAYPAL_CARD_LAYOUTS)[number];\n\n/**\n * Captions over PayPal's fields. Visual only: a `<label for>` cannot reach an\n * input inside PayPal's iframe, and the field keeps the name PayPal gives it.\n */\nexport const PAYPAL_LABEL_STYLES = ['above', 'none'] as const;\nexport type PaypalLabelStyle = (typeof PAYPAL_LABEL_STYLES)[number];\n\n// --- NomuPay COPYandPAY -------------------------------------------------\n\n/**\n * COPYandPAY's `style`. `plain` is bare labelled fields; `card` is the\n * widget's card-shaped presentation. `logos` and `none` are not offered:\n * `logos` makes the buyer pick a brand before the fields appear, and `none`\n * drops the widget's own CSS the checkout's field styling builds on.\n */\nexport const NOMUPAY_FORM_STYLES = ['plain', 'card'] as const;\nexport type NomupayFormStyle = (typeof NOMUPAY_FORM_STYLES)[number];\n\n/**\n * Apple Pay's `buttonStyle`. `auto` is `white` on a dark checkout and `black`\n * on a light one, as the widget was configured before this setting existed.\n */\nexport const APPLE_PAY_BUTTON_STYLES = ['auto', 'black', 'white', 'white-outline'] as const;\nexport type ApplePayButtonStyle = (typeof APPLE_PAY_BUTTON_STYLES)[number];\n\nexport function resolveApplePayButtonStyle(\n style: ApplePayButtonStyle,\n dark: boolean,\n): 'black' | 'white' | 'white-outline' {\n if (style === 'auto') return dark ? 'white' : 'black';\n return style;\n}\n\n/** Apple Pay's `buttonType`: the word on the button. Apple's own list. */\nexport const APPLE_PAY_BUTTON_TYPES = [\n 'pay',\n 'plain',\n 'buy',\n 'check-out',\n 'continue',\n 'book',\n 'order',\n 'subscribe',\n 'donate',\n 'contribute',\n 'support',\n 'tip',\n 'add-money',\n 'top-up',\n 'reload',\n 'rent',\n] as const;\nexport type ApplePayButtonType = (typeof APPLE_PAY_BUTTON_TYPES)[number];\n\n/**\n * Google Pay's `buttonColor`. `auto` is `white` on a dark checkout and `black`\n * on a light one; `default` lets Google choose for the buyer's browser.\n */\nexport const GOOGLE_PAY_BUTTON_COLORS = ['auto', 'default', 'black', 'white'] as const;\nexport type GooglePayButtonColor = (typeof GOOGLE_PAY_BUTTON_COLORS)[number];\n\nexport function resolveGooglePayButtonColor(\n color: GooglePayButtonColor,\n dark: boolean,\n): 'default' | 'black' | 'white' {\n if (color === 'auto') return dark ? 'white' : 'black';\n return color;\n}\n\n/** Google Pay's `buttonType`: the word on the button. Google's own list. */\nexport const GOOGLE_PAY_BUTTON_TYPES = [\n 'pay',\n 'plain',\n 'buy',\n 'checkout',\n 'book',\n 'order',\n 'subscribe',\n 'donate',\n] as const;\nexport type GooglePayButtonType = (typeof GOOGLE_PAY_BUTTON_TYPES)[number];\n\n// --- Whop Payment Elements ----------------------------------------------\n//\n// Whop draws its form inside its own frames and takes one `appearance`\n// object: a `theme` of named palettes (no hex), radius `variables`, and\n// per-part `classes` it sanitises against an allowlist. The element itself\n// is chosen by the preset: Whop's Payment Element (every method the account\n// offers, as an accordion or as tiles) or its Card Element (cards only, in\n// two shapes).\n\n/**\n * The Whop card form's shape.\n *\n * - `accordion`: the Payment Element, methods stacked; what the form always was.\n * - `tiles`: the Payment Element with `layout: 'horizontal'`, equal-width tiles.\n * - `card_stacked`: the Card Element, number above expiry and CVC. Cards only.\n * - `card_compact`: the Card Element on one row. Cards only.\n *\n * The two card presets offer no wallet inside the form: Apple Pay and Google\n * Pay are then the shop's own wallet buttons, or absent.\n */\nexport const WHOP_CARD_PRESETS = ['accordion', 'tiles', 'card_stacked', 'card_compact'] as const;\nexport type WhopCardPreset = (typeof WHOP_CARD_PRESETS)[number];\n\n/** The Whop element and layout a preset mounts. */\nexport type WhopCardElement =\n | { element: 'payment'; layout: 'accordion' | 'horizontal' }\n | { element: 'card'; layout: 'stacked' | 'compact' };\n\nexport function whopCardElement(preset: WhopCardPreset): WhopCardElement {\n switch (preset) {\n case 'tiles':\n return { element: 'payment', layout: 'horizontal' };\n case 'card_stacked':\n return { element: 'card', layout: 'stacked' };\n case 'card_compact':\n return { element: 'card', layout: 'compact' };\n default:\n return { element: 'payment', layout: 'accordion' };\n }\n}\n\n/**\n * Whop's `theme.accentColor`: the palette its radios, selected rows and\n * buttons are drawn in. Whop takes a palette name only, never a colour, so\n * `auto` picks the palette nearest the checkout's primary colour\n * (`nearestWhopAccent`).\n */\nexport const WHOP_ACCENT_COLORS = [\n 'auto',\n 'gray',\n 'blue',\n 'indigo',\n 'iris',\n 'violet',\n 'purple',\n 'plum',\n 'pink',\n 'crimson',\n 'ruby',\n 'red',\n 'tomato',\n 'orange',\n 'amber',\n 'yellow',\n 'lime',\n 'grass',\n 'green',\n 'jade',\n 'teal',\n 'cyan',\n 'sky',\n 'mint',\n 'brown',\n 'bronze',\n 'gold',\n] as const;\nexport type WhopAccentColor = (typeof WHOP_ACCENT_COLORS)[number];\n\n/** Each palette's solid step (Radix colour scale step 9, light). */\nconst WHOP_ACCENT_SWATCHES: Readonly<Record<Exclude<WhopAccentColor, 'auto' | 'gray'>, string>> = {\n blue: '#0090ff',\n indigo: '#3e63dd',\n iris: '#5b5bd6',\n violet: '#6e56cf',\n purple: '#8e4ec6',\n plum: '#ab4aba',\n pink: '#d6409f',\n crimson: '#e93d82',\n ruby: '#e54666',\n red: '#e5484d',\n tomato: '#e54d2e',\n orange: '#f76b15',\n amber: '#ffc53d',\n yellow: '#ffe629',\n lime: '#bdee63',\n grass: '#46a758',\n green: '#30a46c',\n jade: '#29a383',\n teal: '#12a594',\n cyan: '#00a2c7',\n sky: '#7ce2fe',\n mint: '#86ead4',\n brown: '#ad7f58',\n bronze: '#a18072',\n gold: '#978365',\n};\n\n/** A palette's solid swatch, for the dashboard's picker. `gray` is neutral. */\nexport function whopAccentSwatch(accent: Exclude<WhopAccentColor, 'auto'>): string {\n return accent === 'gray' ? '#8d8d8d' : WHOP_ACCENT_SWATCHES[accent];\n}\n\nfunction hexRgb(hex: string): [number, number, number] | null {\n const raw = hex.trim().replace(/^#/, '');\n const full = raw.length === 3 ? raw.replace(/./g, (c) => c + c) : raw;\n if (!/^[0-9a-f]{6}$/i.test(full)) return null;\n const n = Number.parseInt(full, 16);\n return [(n >> 16) & 255, (n >> 8) & 255, n & 255];\n}\n\n/** OKLab, so \"nearest\" means nearest to the eye rather than in RGB. */\nfunction oklab([r, g, b]: [number, number, number]): [number, number, number] {\n const lin = (c: number) => {\n const v = c / 255;\n return v <= 0.04045 ? v / 12.92 : ((v + 0.055) / 1.055) ** 2.4;\n };\n const [lr, lg, lb] = [lin(r), lin(g), lin(b)];\n const l = Math.cbrt(0.4122214708 * lr + 0.5363325363 * lg + 0.0514459929 * lb);\n const m = Math.cbrt(0.2119034982 * lr + 0.6806995451 * lg + 0.1073969566 * lb);\n const s = Math.cbrt(0.0883024619 * lr + 0.2817188376 * lg + 0.6299787005 * lb);\n return [\n 0.2104542553 * l + 0.793617785 * m - 0.0040720468 * s,\n 1.9779984951 * l - 2.428592205 * m + 0.4505937099 * s,\n 0.0259040371 * l + 0.7827717662 * m - 0.808675766 * s,\n ];\n}\n\n/**\n * The Whop palette nearest a colour. A colour with almost no chroma (black,\n * white, greys) is `gray`; an unreadable one is `blue`, Whop's own default.\n */\nexport function nearestWhopAccent(hex: string): Exclude<WhopAccentColor, 'auto'> {\n const rgb = hexRgb(hex);\n if (!rgb) return 'blue';\n const [L, a, b] = oklab(rgb);\n if (Math.hypot(a, b) < 0.04) return 'gray';\n let best: Exclude<WhopAccentColor, 'auto' | 'gray'> = 'blue';\n let bestDistance = Number.POSITIVE_INFINITY;\n for (const [name, swatch] of Object.entries(WHOP_ACCENT_SWATCHES) as [\n Exclude<WhopAccentColor, 'auto' | 'gray'>,\n string,\n ][]) {\n const swatchRgb = hexRgb(swatch);\n if (!swatchRgb) continue;\n const [sL, sa, sb] = oklab(swatchRgb);\n // Hue and chroma decide the palette; lightness counts for less, since\n // Whop draws each palette in several steps.\n const distance = Math.hypot((L - sL) * 0.5, a - sa, b - sb);\n if (distance < bestDistance) {\n bestDistance = distance;\n best = name;\n }\n }\n return best;\n}\n\n/** The accent Whop is actually given. */\nexport function resolveWhopAccent(\n accent: WhopAccentColor,\n primaryHex: string,\n): Exclude<WhopAccentColor, 'auto'> {\n return accent === 'auto' ? nearestWhopAccent(primaryHex) : accent;\n}\n\n/** Whop's email field `labelMode`: a caption above the box, or inside it until typed. */\nexport const WHOP_EMAIL_LABELS = ['above', 'floating'] as const;\nexport type WhopEmailLabel = (typeof WHOP_EMAIL_LABELS)[number];\n\n/**\n * Whop's `theme.grayColor`: the neutral scale its borders, muted text and\n * backgrounds are drawn in. `auto` lets Whop match it to the accent.\n */\nexport const WHOP_GRAY_COLORS = [\n 'auto',\n 'gray',\n 'mauve',\n 'slate',\n 'sage',\n 'olive',\n 'sand',\n] as const;\nexport type WhopGrayColor = (typeof WHOP_GRAY_COLORS)[number];\n\n/**\n * How much billing address Whop asks a card for. `minimal` is Whop's\n * minimum for a card: name, country and postal code. `full` asks the\n * complete address in the country's own format, for address checks.\n */\nexport const WHOP_BILLING_DETAILS = ['minimal', 'full'] as const;\nexport type WhopBillingDetails = (typeof WHOP_BILLING_DETAILS)[number];\n\n/**\n * The corners of Whop's form: its fields, the joined card and address groups,\n * the method list and the tiles. `checkout` follows the checkout's own input\n * radius (`radiusInput`); the rest name a radius of the same scale.\n */\nexport const WHOP_RADII = ['checkout', 'square', 'small', 'medium', 'large'] as const;\nexport type WhopRadius = (typeof WHOP_RADII)[number];\n\n/**\n * Whether Whop's fields, groups and method list keep the soft drop shadow\n * Whop draws under them, or lie flat like the checkout's own fields.\n */\nexport const WHOP_SHADOWS = ['none', 'soft'] as const;\nexport type WhopShadow = (typeof WHOP_SHADOWS)[number];\n\n/**\n * How the method list marks the chosen method: Whop's radio dots, the dots\n * with the chosen method tinted in the brand colour, or the tint alone.\n * Tiles always ring the chosen tile.\n */\nexport const WHOP_SELECTIONS = ['radio_tint', 'radio', 'tint'] as const;\nexport type WhopSelection = (typeof WHOP_SELECTIONS)[number];\n\n/** The Whop settings a look sets together. Colours stay the shop's. */\nexport interface WhopLookSettings {\n whopCardPreset: WhopCardPreset;\n // Every look asks Whop's card minimum: a look is a design, and the full\n // address is a separate choice that names no look.\n whopBillingDetails: WhopBillingDetails;\n whopSeparated: boolean;\n whopFieldChrome: CardFieldChrome;\n whopEmailLabel: WhopEmailLabel;\n whopRadius: WhopRadius;\n whopShadow: WhopShadow;\n whopMethodIcons: boolean;\n whopSelection: WhopSelection;\n}\n\n/**\n * Curated looks for the Whop form: each sets the form, the chrome, the\n * captions, the corners, the shadow and how the chosen method is marked, as\n * one choice the dashboard offers before the single settings. `standard` is\n * the default branding's own look.\n */\nexport const WHOP_LOOKS = [\n 'standard',\n 'clean',\n 'whop',\n 'cards',\n 'tiles',\n 'soft',\n 'minimal',\n] as const;\nexport type WhopLook = (typeof WHOP_LOOKS)[number];\n\nexport const WHOP_LOOK_SETTINGS: Readonly<Record<WhopLook, Readonly<WhopLookSettings>>> = {\n // The fewest fields Whop takes a card with, laid out as Stripe's card\n // form: the email, the number above expiry and code, then one group of\n // name, country (preselected) and postal code. Whop refuses a card without\n // any of them. The wallets are the shop's own express buttons.\n standard: {\n whopCardPreset: 'card_stacked',\n whopBillingDetails: 'minimal',\n whopSeparated: false,\n whopFieldChrome: 'outlined',\n whopEmailLabel: 'above',\n whopRadius: 'checkout',\n whopShadow: 'soft',\n whopMethodIcons: true,\n whopSelection: 'radio_tint',\n },\n // Flat fields like the checkout's own, the method list with the chosen\n // method tinted beside its radio.\n clean: {\n whopCardPreset: 'accordion',\n whopBillingDetails: 'minimal',\n whopSeparated: false,\n whopFieldChrome: 'outlined',\n whopEmailLabel: 'above',\n whopRadius: 'checkout',\n whopShadow: 'none',\n whopMethodIcons: true,\n whopSelection: 'radio_tint',\n },\n // Whop's own form: its corners, its soft shadow, its radio dots.\n whop: {\n whopCardPreset: 'accordion',\n whopBillingDetails: 'minimal',\n whopSeparated: false,\n whopFieldChrome: 'outlined',\n whopEmailLabel: 'above',\n whopRadius: 'small',\n whopShadow: 'soft',\n whopMethodIcons: true,\n whopSelection: 'radio',\n },\n // Each method its own raised card, the chosen one tinted, no dots.\n cards: {\n whopCardPreset: 'accordion',\n whopBillingDetails: 'minimal',\n whopSeparated: true,\n whopFieldChrome: 'outlined',\n whopEmailLabel: 'above',\n whopRadius: 'medium',\n whopShadow: 'soft',\n whopMethodIcons: true,\n whopSelection: 'tint',\n },\n // The methods as tiles above the card's fields.\n tiles: {\n whopCardPreset: 'tiles',\n whopBillingDetails: 'minimal',\n whopSeparated: false,\n whopFieldChrome: 'outlined',\n whopEmailLabel: 'above',\n whopRadius: 'checkout',\n whopShadow: 'none',\n whopMethodIcons: true,\n whopSelection: 'radio_tint',\n },\n // Filled fields with the captions inside, round corners.\n soft: {\n whopCardPreset: 'accordion',\n whopBillingDetails: 'minimal',\n whopSeparated: false,\n whopFieldChrome: 'filled',\n whopEmailLabel: 'floating',\n whopRadius: 'large',\n whopShadow: 'none',\n whopMethodIcons: false,\n whopSelection: 'radio_tint',\n },\n // The card alone on one line, underlined, captions inside.\n minimal: {\n whopCardPreset: 'card_compact',\n whopBillingDetails: 'minimal',\n whopSeparated: false,\n whopFieldChrome: 'underline',\n whopEmailLabel: 'floating',\n whopRadius: 'square',\n whopShadow: 'none',\n whopMethodIcons: true,\n whopSelection: 'radio_tint',\n },\n};\n\n/** The look a branding's Whop settings match exactly, or `null` for a custom mix. */\nexport function matchWhopLook(settings: WhopLookSettings): WhopLook | null {\n const keys = Object.keys(WHOP_LOOK_SETTINGS.clean) as (keyof WhopLookSettings)[];\n return (\n WHOP_LOOKS.find((look) =>\n keys.every((key) => WHOP_LOOK_SETTINGS[look][key] === settings[key]),\n ) ?? null\n );\n}\n"]}
1
+ {"version":3,"sources":["/home/anes/delo-payment/_publish/sdk-0.423/dist/chunk-GSQN5EOO.cjs","../src/cardFormStyles.ts"],"names":[],"mappings":"AAAA;AACE;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACA;AC0BO,IAAM,mBAAA,EAAqB,yCAAA;AAI3B,IAAM,sBAAA,EAAwB,4CAAA;AAI9B,IAAM,mBAAA,EAAqB,yCAAA;AAI3B,IAAM,iBAAA,EAAmB,uCAAA;AAIzB,SAAS,eAAA,CAAgB,IAAA,EAAiC;AAC/D,EAAA,OAAO,KAAA,IAAS,KAAA,EAAO,GAAA,EAAK,KAAA,IAAS,KAAA,EAAO,GAAA,EAAK,EAAA;AACnD;AAGO,SAAS,oBAAA,CAAqB,MAAA,EAAiC;AACpE,EAAA,OAAO,OAAA,IAAW,UAAA,EAAY,IAAA,EAAM,OAAA,IAAW,WAAA,EAAa,IAAA,EAAM,GAAA;AACpE;AASO,IAAM,cAAA,EAAgB,CAAC,MAAA,EAAQ,QAAA,EAAU,MAAA,EAAQ,OAAO,CAAA;AAIxD,SAAS,kBAAA,CAAmB,KAAA,EAAoB,IAAA,EAA4C;AACjG,EAAA,GAAA,CAAI,MAAA,IAAU,MAAA,EAAQ,OAAO,KAAA,EAAO,QAAA,EAAU,QAAA;AAC9C,EAAA,OAAO,KAAA;AACT;AAGO,IAAM,oBAAA,EAAsB,CAAC,QAAA,EA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A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,muDAAC","file":"/home/anes/delo-payment/_publish/sdk-0.423/dist/chunk-GSQN5EOO.cjs","sourcesContent":[null,"// How the card forms that are not Airwallex's can be styled: Stripe's Payment\n// Element, PayPal Card Fields and NomuPay's COPYandPAY widget.\n//\n// Each processor draws the card inside its own iframes and exposes a\n// different, narrow styling surface, so each gets only the controls that\n// surface actually reaches:\n//\n// - Stripe takes an Appearance object (`theme`, `inputs`, `labels`,\n// `variables`, `rules`, `disableAnimations`) and paints everything inside\n// one iframe itself.\n// - PayPal takes CSS for the text inside each field iframe (`input`, `.valid`,\n// `.invalid`, `:focus`); the box around it is the checkout's own DOM.\n// - COPYandPAY takes `wpwlOptions` (`style`, `showLabels`, `showPlaceholders`,\n// `showCVVHint`, `iframeStyles` for the two placeholders) and renders its\n// `.wpwl-*` classes into the page, where the checkout's CSS styles the box.\n//\n// Every value here is presentation. Nothing narrows the cards a buyer may pay\n// with, and nothing reaches a confirm path. COPYandPAY's `brandDetection` is\n// deliberately absent for that reason: it picks the scheme a co-badged card is\n// charged on, which is the buyer's choice to make, not a style.\n//\n// The box vocabularies (chrome, type size, weight, focus ring) are the\n// Airwallex section's, re-exported under neutral names, so a merchant styling\n// two rails meets the same words and the checkout draws them the same way.\n\nimport {\n AIRWALLEX_FIELD_CHROMES,\n AIRWALLEX_FIELD_FONT_SIZES,\n AIRWALLEX_FIELD_WEIGHTS,\n AIRWALLEX_FOCUS_RINGS,\n} from './airwallexCard';\n\n/** How the box around a field is drawn: `outlined`, `filled` or `underline`. */\nexport const CARD_FIELD_CHROMES = AIRWALLEX_FIELD_CHROMES;\nexport type CardFieldChrome = (typeof CARD_FIELD_CHROMES)[number];\n\n/** Field type size: `sm` 14px, `md` 16px, `lg` 18px. */\nexport const CARD_FIELD_FONT_SIZES = AIRWALLEX_FIELD_FONT_SIZES;\nexport type CardFieldFontSize = (typeof CARD_FIELD_FONT_SIZES)[number];\n\n/** Field type weight: `regular` 400, `medium` 500, `semibold` 600. */\nexport const CARD_FIELD_WEIGHTS = AIRWALLEX_FIELD_WEIGHTS;\nexport type CardFieldWeight = (typeof CARD_FIELD_WEIGHTS)[number];\n\n/** The ring around the focused field: `none`, `subtle` (neutral) or `strong` (brand colour). */\nexport const CARD_FOCUS_RINGS = AIRWALLEX_FOCUS_RINGS;\nexport type CardFocusRing = (typeof CARD_FOCUS_RINGS)[number];\n\n/** A field type size in px. */\nexport function cardFieldFontPx(size: CardFieldFontSize): number {\n return size === 'sm' ? 14 : size === 'lg' ? 18 : 16;\n}\n\n/** A field type weight as a CSS numeric weight. */\nexport function cardFieldWeightValue(weight: CardFieldWeight): number {\n return weight === 'regular' ? 400 : weight === 'semibold' ? 600 : 500;\n}\n\n// --- Stripe Payment Element ---------------------------------------------\n\n/**\n * Stripe's base theme. `auto` is `night` on a dark checkout and `stripe` on a\n * light one, which is what the pane chose before this setting existed. The\n * merchant's colours, font and radius are applied over whichever is picked.\n */\nexport const STRIPE_THEMES = ['auto', 'stripe', 'flat', 'night'] as const;\nexport type StripeTheme = (typeof STRIPE_THEMES)[number];\n\n/** The theme Stripe is actually given. */\nexport function resolveStripeTheme(theme: StripeTheme, dark: boolean): 'stripe' | 'flat' | 'night' {\n if (theme === 'auto') return dark ? 'night' : 'stripe';\n return theme;\n}\n\n/** Stripe's `appearance.inputs`: separate boxes, or one condensed block. */\nexport const STRIPE_INPUT_STYLES = ['spaced', 'condensed'] as const;\nexport type StripeInputStyle = (typeof STRIPE_INPUT_STYLES)[number];\n\n/**\n * Stripe's `appearance.labels`. The checkout-wide `labelStyle: 'hidden'` still\n * wins over either, because hiding is a decision about every form.\n */\nexport const STRIPE_LABEL_PLACEMENTS = ['above', 'floating'] as const;\nexport type StripeLabelPlacement = (typeof STRIPE_LABEL_PLACEMENTS)[number];\n\n/** The space between Stripe's fields and rows. */\nexport const STRIPE_SPACINGS = ['compact', 'comfortable', 'spacious'] as const;\nexport type StripeSpacing = (typeof STRIPE_SPACINGS)[number];\n\n/**\n * Stripe's `spacingUnit` and `gridRowSpacing` for a spacing choice.\n * `comfortable` is the 4px / 12px the pane always sent.\n */\nexport function stripeSpacingValues(spacing: StripeSpacing): {\n spacingUnit: string;\n gridRowSpacing: string;\n} {\n if (spacing === 'compact') return { spacingUnit: '3px', gridRowSpacing: '8px' };\n if (spacing === 'spacious') return { spacingUnit: '5px', gridRowSpacing: '16px' };\n return { spacingUnit: '4px', gridRowSpacing: '12px' };\n}\n\n// --- PayPal Card Fields -------------------------------------------------\n\n/** The PayPal card form's rows: expiry and CVC side by side, or every field full width. */\nexport const PAYPAL_CARD_LAYOUTS = ['split', 'stacked'] as const;\nexport type PaypalCardLayout = (typeof PAYPAL_CARD_LAYOUTS)[number];\n\n/**\n * Captions over PayPal's fields. Visual only: a `<label for>` cannot reach an\n * input inside PayPal's iframe, and the field keeps the name PayPal gives it.\n */\nexport const PAYPAL_LABEL_STYLES = ['above', 'none'] as const;\nexport type PaypalLabelStyle = (typeof PAYPAL_LABEL_STYLES)[number];\n\n// --- NomuPay COPYandPAY -------------------------------------------------\n\n/**\n * COPYandPAY's `style`. `plain` is bare labelled fields; `card` is the\n * widget's card-shaped presentation. `logos` and `none` are not offered:\n * `logos` makes the buyer pick a brand before the fields appear, and `none`\n * drops the widget's own CSS the checkout's field styling builds on.\n */\nexport const NOMUPAY_FORM_STYLES = ['plain', 'card'] as const;\nexport type NomupayFormStyle = (typeof NOMUPAY_FORM_STYLES)[number];\n\n/**\n * Apple Pay's `buttonStyle`. `auto` is `white` on a dark checkout and `black`\n * on a light one, as the widget was configured before this setting existed.\n */\nexport const APPLE_PAY_BUTTON_STYLES = ['auto', 'black', 'white', 'white-outline'] as const;\nexport type ApplePayButtonStyle = (typeof APPLE_PAY_BUTTON_STYLES)[number];\n\nexport function resolveApplePayButtonStyle(\n style: ApplePayButtonStyle,\n dark: boolean,\n): 'black' | 'white' | 'white-outline' {\n if (style === 'auto') return dark ? 'white' : 'black';\n return style;\n}\n\n/** Apple Pay's `buttonType`: the word on the button. Apple's own list. */\nexport const APPLE_PAY_BUTTON_TYPES = [\n 'pay',\n 'plain',\n 'buy',\n 'check-out',\n 'continue',\n 'book',\n 'order',\n 'subscribe',\n 'donate',\n 'contribute',\n 'support',\n 'tip',\n 'add-money',\n 'top-up',\n 'reload',\n 'rent',\n] as const;\nexport type ApplePayButtonType = (typeof APPLE_PAY_BUTTON_TYPES)[number];\n\n/**\n * Google Pay's `buttonColor`. `auto` is `white` on a dark checkout and `black`\n * on a light one; `default` lets Google choose for the buyer's browser.\n */\nexport const GOOGLE_PAY_BUTTON_COLORS = ['auto', 'default', 'black', 'white'] as const;\nexport type GooglePayButtonColor = (typeof GOOGLE_PAY_BUTTON_COLORS)[number];\n\nexport function resolveGooglePayButtonColor(\n color: GooglePayButtonColor,\n dark: boolean,\n): 'default' | 'black' | 'white' {\n if (color === 'auto') return dark ? 'white' : 'black';\n return color;\n}\n\n/** Google Pay's `buttonType`: the word on the button. Google's own list. */\nexport const GOOGLE_PAY_BUTTON_TYPES = [\n 'pay',\n 'plain',\n 'buy',\n 'checkout',\n 'book',\n 'order',\n 'subscribe',\n 'donate',\n] as const;\nexport type GooglePayButtonType = (typeof GOOGLE_PAY_BUTTON_TYPES)[number];\n\n// --- Whop Payment Elements ----------------------------------------------\n//\n// Whop draws its form inside its own frames and takes one `appearance`\n// object: a `theme` of named palettes (no hex), radius `variables`, and\n// per-part `classes` it sanitises against an allowlist. The element itself\n// is chosen by the preset: Whop's Payment Element (every method the account\n// offers, as an accordion or as tiles) or its Card Element (cards only, in\n// two shapes).\n\n/**\n * The Whop card form's shape.\n *\n * - `accordion`: the Payment Element, methods stacked; what the form always was.\n * - `tiles`: the Payment Element with `layout: 'horizontal'`, equal-width tiles.\n * - `card_stacked`: the Card Element, number above expiry and CVC. Cards only.\n * - `card_compact`: the Card Element on one row. Cards only.\n *\n * The two card presets offer no wallet inside the form: Apple Pay and Google\n * Pay are then the shop's own wallet buttons, or absent.\n */\nexport const WHOP_CARD_PRESETS = ['accordion', 'tiles', 'card_stacked', 'card_compact'] as const;\nexport type WhopCardPreset = (typeof WHOP_CARD_PRESETS)[number];\n\n/** The Whop element and layout a preset mounts. */\nexport type WhopCardElement =\n | { element: 'payment'; layout: 'accordion' | 'horizontal' }\n | { element: 'card'; layout: 'stacked' | 'compact' };\n\nexport function whopCardElement(preset: WhopCardPreset): WhopCardElement {\n switch (preset) {\n case 'tiles':\n return { element: 'payment', layout: 'horizontal' };\n case 'card_stacked':\n return { element: 'card', layout: 'stacked' };\n case 'card_compact':\n return { element: 'card', layout: 'compact' };\n default:\n return { element: 'payment', layout: 'accordion' };\n }\n}\n\n/**\n * Whop's `theme.accentColor`: the palette its radios, selected rows and\n * buttons are drawn in. Whop takes a palette name only, never a colour, so\n * `auto` picks the palette nearest the checkout's primary colour\n * (`nearestWhopAccent`).\n */\nexport const WHOP_ACCENT_COLORS = [\n 'auto',\n 'gray',\n 'blue',\n 'indigo',\n 'iris',\n 'violet',\n 'purple',\n 'plum',\n 'pink',\n 'crimson',\n 'ruby',\n 'red',\n 'tomato',\n 'orange',\n 'amber',\n 'yellow',\n 'lime',\n 'grass',\n 'green',\n 'jade',\n 'teal',\n 'cyan',\n 'sky',\n 'mint',\n 'brown',\n 'bronze',\n 'gold',\n] as const;\nexport type WhopAccentColor = (typeof WHOP_ACCENT_COLORS)[number];\n\n/** Each palette's solid step (Radix colour scale step 9, light). */\nconst WHOP_ACCENT_SWATCHES: Readonly<Record<Exclude<WhopAccentColor, 'auto' | 'gray'>, string>> = {\n blue: '#0090ff',\n indigo: '#3e63dd',\n iris: '#5b5bd6',\n violet: '#6e56cf',\n purple: '#8e4ec6',\n plum: '#ab4aba',\n pink: '#d6409f',\n crimson: '#e93d82',\n ruby: '#e54666',\n red: '#e5484d',\n tomato: '#e54d2e',\n orange: '#f76b15',\n amber: '#ffc53d',\n yellow: '#ffe629',\n lime: '#bdee63',\n grass: '#46a758',\n green: '#30a46c',\n jade: '#29a383',\n teal: '#12a594',\n cyan: '#00a2c7',\n sky: '#7ce2fe',\n mint: '#86ead4',\n brown: '#ad7f58',\n bronze: '#a18072',\n gold: '#978365',\n};\n\n/** A palette's solid swatch, for the dashboard's picker. `gray` is neutral. */\nexport function whopAccentSwatch(accent: Exclude<WhopAccentColor, 'auto'>): string {\n return accent === 'gray' ? '#8d8d8d' : WHOP_ACCENT_SWATCHES[accent];\n}\n\nfunction hexRgb(hex: string): [number, number, number] | null {\n const raw = hex.trim().replace(/^#/, '');\n const full = raw.length === 3 ? raw.replace(/./g, (c) => c + c) : raw;\n if (!/^[0-9a-f]{6}$/i.test(full)) return null;\n const n = Number.parseInt(full, 16);\n return [(n >> 16) & 255, (n >> 8) & 255, n & 255];\n}\n\n/** OKLab, so \"nearest\" means nearest to the eye rather than in RGB. */\nfunction oklab([r, g, b]: [number, number, number]): [number, number, number] {\n const lin = (c: number) => {\n const v = c / 255;\n return v <= 0.04045 ? v / 12.92 : ((v + 0.055) / 1.055) ** 2.4;\n };\n const [lr, lg, lb] = [lin(r), lin(g), lin(b)];\n const l = Math.cbrt(0.4122214708 * lr + 0.5363325363 * lg + 0.0514459929 * lb);\n const m = Math.cbrt(0.2119034982 * lr + 0.6806995451 * lg + 0.1073969566 * lb);\n const s = Math.cbrt(0.0883024619 * lr + 0.2817188376 * lg + 0.6299787005 * lb);\n return [\n 0.2104542553 * l + 0.793617785 * m - 0.0040720468 * s,\n 1.9779984951 * l - 2.428592205 * m + 0.4505937099 * s,\n 0.0259040371 * l + 0.7827717662 * m - 0.808675766 * s,\n ];\n}\n\n/**\n * The Whop palette nearest a colour. A colour with almost no chroma (black,\n * white, greys) is `gray`; an unreadable one is `blue`, Whop's own default.\n */\nexport function nearestWhopAccent(hex: string): Exclude<WhopAccentColor, 'auto'> {\n const rgb = hexRgb(hex);\n if (!rgb) return 'blue';\n const [L, a, b] = oklab(rgb);\n if (Math.hypot(a, b) < 0.04) return 'gray';\n let best: Exclude<WhopAccentColor, 'auto' | 'gray'> = 'blue';\n let bestDistance = Number.POSITIVE_INFINITY;\n for (const [name, swatch] of Object.entries(WHOP_ACCENT_SWATCHES) as [\n Exclude<WhopAccentColor, 'auto' | 'gray'>,\n string,\n ][]) {\n const swatchRgb = hexRgb(swatch);\n if (!swatchRgb) continue;\n const [sL, sa, sb] = oklab(swatchRgb);\n // Hue and chroma decide the palette; lightness counts for less, since\n // Whop draws each palette in several steps.\n const distance = Math.hypot((L - sL) * 0.5, a - sa, b - sb);\n if (distance < bestDistance) {\n bestDistance = distance;\n best = name;\n }\n }\n return best;\n}\n\n/** The accent Whop is actually given. */\nexport function resolveWhopAccent(\n accent: WhopAccentColor,\n primaryHex: string,\n): Exclude<WhopAccentColor, 'auto'> {\n return accent === 'auto' ? nearestWhopAccent(primaryHex) : accent;\n}\n\n/** Whop's email field `labelMode`: a caption above the box, or inside it until typed. */\nexport const WHOP_EMAIL_LABELS = ['above', 'floating'] as const;\nexport type WhopEmailLabel = (typeof WHOP_EMAIL_LABELS)[number];\n\n/**\n * Whop's `theme.grayColor`: the neutral scale its borders, muted text and\n * backgrounds are drawn in. `auto` lets Whop match it to the accent.\n */\nexport const WHOP_GRAY_COLORS = [\n 'auto',\n 'gray',\n 'mauve',\n 'slate',\n 'sage',\n 'olive',\n 'sand',\n] as const;\nexport type WhopGrayColor = (typeof WHOP_GRAY_COLORS)[number];\n\n/**\n * How much billing address Whop asks a card for. `minimal` is Whop's\n * minimum for a card: name, country and postal code. `full` asks the\n * complete address in the country's own format, for address checks.\n */\nexport const WHOP_BILLING_DETAILS = ['minimal', 'full'] as const;\nexport type WhopBillingDetails = (typeof WHOP_BILLING_DETAILS)[number];\n\n/**\n * The corners of Whop's form: its fields, the joined card and address groups,\n * the method list and the tiles. `checkout` follows the checkout's own input\n * radius (`radiusInput`); the rest name a radius of the same scale.\n */\nexport const WHOP_RADII = ['checkout', 'square', 'small', 'medium', 'large'] as const;\nexport type WhopRadius = (typeof WHOP_RADII)[number];\n\n/**\n * Whether Whop's fields, groups and method list keep the soft drop shadow\n * Whop draws under them, or lie flat like the checkout's own fields.\n */\nexport const WHOP_SHADOWS = ['none', 'soft'] as const;\nexport type WhopShadow = (typeof WHOP_SHADOWS)[number];\n\n/**\n * How the method list marks the chosen method: Whop's radio dots, the dots\n * with the chosen method tinted in the brand colour, or the tint alone.\n * Tiles always ring the chosen tile.\n */\nexport const WHOP_SELECTIONS = ['radio_tint', 'radio', 'tint'] as const;\nexport type WhopSelection = (typeof WHOP_SELECTIONS)[number];\n\n/** The Whop settings a look sets together. Colours stay the shop's. */\nexport interface WhopLookSettings {\n whopCardPreset: WhopCardPreset;\n // Every look asks Whop's card minimum: a look is a design, and the full\n // address is a separate choice that names no look.\n whopBillingDetails: WhopBillingDetails;\n whopSeparated: boolean;\n whopFieldChrome: CardFieldChrome;\n whopEmailLabel: WhopEmailLabel;\n whopRadius: WhopRadius;\n whopShadow: WhopShadow;\n whopMethodIcons: boolean;\n whopSelection: WhopSelection;\n}\n\n/**\n * Curated looks for the Whop form: each sets the form, the chrome, the\n * captions, the corners, the shadow and how the chosen method is marked, as\n * one choice the dashboard offers before the single settings. `standard` is\n * the default branding's own look.\n */\nexport const WHOP_LOOKS = [\n 'standard',\n 'clean',\n 'whop',\n 'cards',\n 'tiles',\n 'soft',\n 'minimal',\n] as const;\nexport type WhopLook = (typeof WHOP_LOOKS)[number];\n\nexport const WHOP_LOOK_SETTINGS: Readonly<Record<WhopLook, Readonly<WhopLookSettings>>> = {\n // The fewest fields Whop takes a card with, laid out as Stripe's card\n // form: the email, the number above expiry and code, then one group of\n // name, country (preselected) and postal code. Whop refuses a card without\n // any of them. The wallets are the shop's own express buttons.\n standard: {\n whopCardPreset: 'card_stacked',\n whopBillingDetails: 'minimal',\n whopSeparated: false,\n whopFieldChrome: 'outlined',\n whopEmailLabel: 'above',\n whopRadius: 'checkout',\n whopShadow: 'soft',\n whopMethodIcons: true,\n whopSelection: 'radio_tint',\n },\n // Flat fields like the checkout's own, the method list with the chosen\n // method tinted beside its radio.\n clean: {\n whopCardPreset: 'accordion',\n whopBillingDetails: 'minimal',\n whopSeparated: false,\n whopFieldChrome: 'outlined',\n whopEmailLabel: 'above',\n whopRadius: 'checkout',\n whopShadow: 'none',\n whopMethodIcons: true,\n whopSelection: 'radio_tint',\n },\n // Whop's own form: its corners, its soft shadow, its radio dots.\n whop: {\n whopCardPreset: 'accordion',\n whopBillingDetails: 'minimal',\n whopSeparated: false,\n whopFieldChrome: 'outlined',\n whopEmailLabel: 'above',\n whopRadius: 'small',\n whopShadow: 'soft',\n whopMethodIcons: true,\n whopSelection: 'radio',\n },\n // Each method its own raised card, the chosen one tinted, no dots.\n cards: {\n whopCardPreset: 'accordion',\n whopBillingDetails: 'minimal',\n whopSeparated: true,\n whopFieldChrome: 'outlined',\n whopEmailLabel: 'above',\n whopRadius: 'medium',\n whopShadow: 'soft',\n whopMethodIcons: true,\n whopSelection: 'tint',\n },\n // The methods as tiles above the card's fields.\n tiles: {\n whopCardPreset: 'tiles',\n whopBillingDetails: 'minimal',\n whopSeparated: false,\n whopFieldChrome: 'outlined',\n whopEmailLabel: 'above',\n whopRadius: 'checkout',\n whopShadow: 'none',\n whopMethodIcons: true,\n whopSelection: 'radio_tint',\n },\n // Filled fields with the captions inside, round corners.\n soft: {\n whopCardPreset: 'accordion',\n whopBillingDetails: 'minimal',\n whopSeparated: false,\n whopFieldChrome: 'filled',\n whopEmailLabel: 'floating',\n whopRadius: 'large',\n whopShadow: 'none',\n whopMethodIcons: false,\n whopSelection: 'radio_tint',\n },\n // The card alone on one line, underlined, captions inside.\n minimal: {\n whopCardPreset: 'card_compact',\n whopBillingDetails: 'minimal',\n whopSeparated: false,\n whopFieldChrome: 'underline',\n whopEmailLabel: 'floating',\n whopRadius: 'square',\n whopShadow: 'none',\n whopMethodIcons: true,\n whopSelection: 'radio_tint',\n },\n};\n\n/** The look a branding's Whop settings match exactly, or `null` for a custom mix. */\nexport function matchWhopLook(settings: WhopLookSettings): WhopLook | null {\n const keys = Object.keys(WHOP_LOOK_SETTINGS.clean) as (keyof WhopLookSettings)[];\n return (\n WHOP_LOOKS.find((look) =>\n keys.every((key) => WHOP_LOOK_SETTINGS[look][key] === settings[key]),\n ) ?? null\n );\n}\n"]}