@delopay/sdk 0.459.0 → 0.461.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 (323) 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-3YBBJT3Y.cjs.map +1 -1
  12. package/dist/chunk-44QBWVRS.cjs.map +1 -1
  13. package/dist/chunk-4EKAWNYI.cjs.map +1 -1
  14. package/dist/chunk-4LN4BR2T.cjs.map +1 -1
  15. package/dist/chunk-4T4XHPYN.cjs.map +1 -1
  16. package/dist/{chunk-T5BLVSK3.js → chunk-4WZMHDID.js} +37 -4
  17. package/dist/chunk-4WZMHDID.js.map +1 -0
  18. package/dist/chunk-5CITBN33.cjs.map +1 -1
  19. package/dist/chunk-5HCKC4HF.cjs.map +1 -1
  20. package/dist/chunk-5O2JSQYA.cjs.map +1 -1
  21. package/dist/chunk-6EBY2KKL.cjs.map +1 -1
  22. package/dist/chunk-6LFOM6HV.cjs.map +1 -1
  23. package/dist/chunk-6LOWE2YI.cjs.map +1 -1
  24. package/dist/chunk-6LSG5Z4T.cjs.map +1 -1
  25. package/dist/chunk-6SU2MTN2.cjs.map +1 -1
  26. package/dist/chunk-6YCDLSIU.cjs.map +1 -1
  27. package/dist/chunk-75E5WNJG.cjs.map +1 -1
  28. package/dist/chunk-7JV6VVO7.cjs.map +1 -1
  29. package/dist/chunk-7QZCUXWB.cjs.map +1 -1
  30. package/dist/chunk-7VXF5D67.cjs.map +1 -1
  31. package/dist/chunk-ABWAYMN5.cjs.map +1 -1
  32. package/dist/chunk-ACZ2R47X.cjs.map +1 -1
  33. package/dist/chunk-AYUYJO3I.cjs.map +1 -1
  34. package/dist/chunk-BCA3TCGS.cjs.map +1 -1
  35. package/dist/chunk-BP6KDQ6I.cjs.map +1 -1
  36. package/dist/chunk-BRY3W7N3.cjs.map +1 -1
  37. package/dist/chunk-CAMALM35.cjs.map +1 -1
  38. package/dist/chunk-CCN44NZJ.cjs.map +1 -1
  39. package/dist/chunk-CKKNFFKP.cjs.map +1 -1
  40. package/dist/chunk-CR3JBTP3.cjs.map +1 -1
  41. package/dist/chunk-DJASVBOJ.cjs.map +1 -1
  42. package/dist/chunk-EEB2HDYL.cjs.map +1 -1
  43. package/dist/chunk-ENPSUWTS.cjs.map +1 -1
  44. package/dist/chunk-EQ6P6ZND.cjs.map +1 -1
  45. package/dist/chunk-EXPWQBI3.cjs.map +1 -1
  46. package/dist/chunk-F3I5DOWV.cjs.map +1 -1
  47. package/dist/chunk-F46K5H3U.cjs.map +1 -1
  48. package/dist/chunk-F6S3WCCB.cjs.map +1 -1
  49. package/dist/{chunk-66PCQHAT.js → chunk-F6V5A62N.js} +3 -3
  50. package/dist/chunk-FG7YBXJQ.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-GG52SAHA.cjs.map +1 -1
  54. package/dist/chunk-GK5FWN4H.cjs.map +1 -1
  55. package/dist/chunk-GSQN5EOO.cjs.map +1 -1
  56. package/dist/chunk-GW7IHYXR.cjs.map +1 -1
  57. package/dist/chunk-HLHML5ES.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-HSJABE7X.cjs.map +1 -1
  61. package/dist/chunk-I2W7AO4B.cjs.map +1 -1
  62. package/dist/chunk-I2XGNALG.cjs.map +1 -1
  63. package/dist/{chunk-UZUNBL7K.cjs → chunk-I5LUU7ZR.cjs} +3 -3
  64. package/dist/chunk-I5LUU7ZR.cjs.map +1 -0
  65. package/dist/chunk-IKXGA2Z5.cjs.map +1 -1
  66. package/dist/chunk-IR2LFKKA.cjs.map +1 -1
  67. package/dist/chunk-J4ZB7MU4.cjs.map +1 -1
  68. package/dist/chunk-JPRSNCYP.cjs.map +1 -1
  69. package/dist/chunk-K5Q2H3VD.cjs.map +1 -1
  70. package/dist/chunk-KD5Y2YWK.cjs.map +1 -1
  71. package/dist/chunk-KJDMNF2T.cjs.map +1 -1
  72. package/dist/chunk-KLONGJCL.cjs.map +1 -1
  73. package/dist/chunk-KOB6MOAV.cjs.map +1 -1
  74. package/dist/chunk-KSJ7JLR3.cjs.map +1 -1
  75. package/dist/chunk-LJ2EG6JK.cjs.map +1 -1
  76. package/dist/chunk-LLYY4TCZ.cjs.map +1 -1
  77. package/dist/chunk-LYIBTVK6.cjs.map +1 -1
  78. package/dist/chunk-M3HWE7KT.cjs.map +1 -1
  79. package/dist/chunk-M3SJHFT4.cjs.map +1 -1
  80. package/dist/chunk-MCNDMK7F.cjs.map +1 -1
  81. package/dist/chunk-MLG6NXI6.cjs.map +1 -1
  82. package/dist/{chunk-S4TNMIX7.cjs → chunk-NCPCCAEI.cjs} +3 -3
  83. package/dist/chunk-NCPCCAEI.cjs.map +1 -0
  84. package/dist/chunk-NFB3S2E6.cjs.map +1 -1
  85. package/dist/chunk-NKDUQ2BI.cjs.map +1 -1
  86. package/dist/chunk-NYL3BNHR.cjs.map +1 -1
  87. package/dist/chunk-O4AYHLQX.cjs.map +1 -1
  88. package/dist/{chunk-IA6O7DWZ.cjs → chunk-O4OI44YL.cjs} +5 -5
  89. package/dist/chunk-O4OI44YL.cjs.map +1 -0
  90. package/dist/chunk-OAEKP665.cjs.map +1 -1
  91. package/dist/chunk-ODPNVNYE.cjs.map +1 -1
  92. package/dist/chunk-OG2KJAYD.cjs.map +1 -1
  93. package/dist/{chunk-AVR2GPXU.cjs → chunk-ORCK5GQ3.cjs} +37 -4
  94. package/dist/chunk-ORCK5GQ3.cjs.map +1 -0
  95. package/dist/chunk-OWP7XBY2.cjs.map +1 -1
  96. package/dist/chunk-OYZP6NF6.cjs.map +1 -1
  97. package/dist/chunk-P4UILJVU.cjs.map +1 -1
  98. package/dist/chunk-P6JLNQ6L.cjs.map +1 -1
  99. package/dist/chunk-P7DYLUUI.cjs.map +1 -1
  100. package/dist/chunk-PKAE6AQT.cjs.map +1 -1
  101. package/dist/chunk-Q7M7DO7M.cjs.map +1 -1
  102. package/dist/chunk-QKUWFMZP.cjs.map +1 -1
  103. package/dist/chunk-QRSA72B3.cjs.map +1 -1
  104. package/dist/chunk-QYNRNDIY.cjs.map +1 -1
  105. package/dist/chunk-R4FE6K43.cjs.map +1 -1
  106. package/dist/chunk-R4GA6BVP.cjs.map +1 -1
  107. package/dist/chunk-R5VYSZ3Q.cjs.map +1 -1
  108. package/dist/chunk-RHFUXHQN.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-GH6CASEG.cjs → chunk-TJJLCFKO.cjs} +38 -1
  114. package/dist/chunk-TJJLCFKO.cjs.map +1 -0
  115. package/dist/chunk-TMAJE5P2.cjs.map +1 -1
  116. package/dist/chunk-TNIJ6OSH.cjs.map +1 -1
  117. package/dist/chunk-U3JK7NBG.cjs.map +1 -1
  118. package/dist/chunk-UGSM7RJ2.cjs.map +1 -1
  119. package/dist/chunk-UKLZAOLW.cjs.map +1 -1
  120. package/dist/{chunk-RBNTITQG.js → chunk-UUNRVLAS.js} +38 -1
  121. package/dist/chunk-UUNRVLAS.js.map +1 -0
  122. package/dist/chunk-V47G7P6L.cjs.map +1 -1
  123. package/dist/{chunk-25KYFJIB.js → chunk-V7ACE3LA.js} +2 -2
  124. package/dist/chunk-VH5A6SMU.cjs.map +1 -1
  125. package/dist/chunk-VHMH4QMY.cjs.map +1 -1
  126. package/dist/chunk-VYC7WUM5.cjs.map +1 -1
  127. package/dist/chunk-W457XUA6.cjs.map +1 -1
  128. package/dist/chunk-WHDI3TMP.cjs.map +1 -1
  129. package/dist/chunk-WITCPKNL.cjs.map +1 -1
  130. package/dist/chunk-WX6NP7UU.cjs.map +1 -1
  131. package/dist/chunk-XQLRIBVR.cjs.map +1 -1
  132. package/dist/{chunk-T3X5DOSW.js → chunk-Y6XIPSSK.js} +2 -2
  133. package/dist/chunk-Y7LSSRNJ.cjs.map +1 -1
  134. package/dist/chunk-YK3P5QNZ.cjs.map +1 -1
  135. package/dist/chunk-ZKPVUCQV.cjs.map +1 -1
  136. package/dist/chunk-ZUULK36E.cjs.map +1 -1
  137. package/dist/client.cjs +2 -2
  138. package/dist/client.cjs.map +1 -1
  139. package/dist/client.js +1 -1
  140. package/dist/core.cjs.map +1 -1
  141. package/dist/currencies.cjs.map +1 -1
  142. package/dist/enigmaCardForm.cjs.map +1 -1
  143. package/dist/error.cjs.map +1 -1
  144. package/dist/eventStream.cjs.map +1 -1
  145. package/dist/exportDownload.cjs.map +1 -1
  146. package/dist/feeProgram.cjs.map +1 -1
  147. package/dist/index.cjs +5 -5
  148. package/dist/index.cjs.map +1 -1
  149. package/dist/index.d.cts +1 -1
  150. package/dist/index.d.ts +1 -1
  151. package/dist/index.js +4 -4
  152. package/dist/internal/resources/admin.cjs.map +1 -1
  153. package/dist/internal/resources/admin.d.cts +1 -1
  154. package/dist/internal/resources/admin.d.ts +1 -1
  155. package/dist/internal/resources/adminBranding.cjs.map +1 -1
  156. package/dist/internal/resources/adminBranding.d.cts +1 -1
  157. package/dist/internal/resources/adminBranding.d.ts +1 -1
  158. package/dist/internal/resources/adminCheckoutDomains.cjs.map +1 -1
  159. package/dist/internal/resources/adminCheckoutDomains.d.cts +1 -1
  160. package/dist/internal/resources/adminCheckoutDomains.d.ts +1 -1
  161. package/dist/internal/resources/adminFeePlans.cjs.map +1 -1
  162. package/dist/internal/resources/adminFeePlans.d.cts +1 -1
  163. package/dist/internal/resources/adminFeePlans.d.ts +1 -1
  164. package/dist/internal/resources/adminFileScans.cjs.map +1 -1
  165. package/dist/internal/resources/adminFileScans.d.cts +1 -1
  166. package/dist/internal/resources/adminFileScans.d.ts +1 -1
  167. package/dist/internal/resources/adminIndustries.cjs.map +1 -1
  168. package/dist/internal/resources/adminIndustries.d.cts +1 -1
  169. package/dist/internal/resources/adminIndustries.d.ts +1 -1
  170. package/dist/internal/resources/adminLive.cjs.map +1 -1
  171. package/dist/internal/resources/adminNotices.cjs.map +1 -1
  172. package/dist/internal/resources/adminNotices.d.cts +1 -1
  173. package/dist/internal/resources/adminNotices.d.ts +1 -1
  174. package/dist/internal/resources/adminPortal.cjs +2 -2
  175. package/dist/internal/resources/adminPortal.cjs.map +1 -1
  176. package/dist/internal/resources/adminPortal.d.cts +1 -1
  177. package/dist/internal/resources/adminPortal.d.ts +1 -1
  178. package/dist/internal/resources/adminPortal.js +1 -1
  179. package/dist/internal/resources/adminSupport.cjs.map +1 -1
  180. package/dist/internal/resources/adminSupport.d.cts +1 -1
  181. package/dist/internal/resources/adminSupport.d.ts +1 -1
  182. package/dist/internal/resources/auditLogs.cjs.map +1 -1
  183. package/dist/internal/resources/auditLogs.d.cts +1 -1
  184. package/dist/internal/resources/auditLogs.d.ts +1 -1
  185. package/dist/internal/resources/cache.cjs.map +1 -1
  186. package/dist/internal/resources/cardIssuers.cjs.map +1 -1
  187. package/dist/internal/resources/cardIssuers.d.cts +1 -1
  188. package/dist/internal/resources/cardIssuers.d.ts +1 -1
  189. package/dist/internal/resources/configs.cjs.map +1 -1
  190. package/dist/internal/resources/connectorRestrictionRules.cjs.map +1 -1
  191. package/dist/internal/resources/connectorRestrictionRules.d.cts +1 -1
  192. package/dist/internal/resources/connectorRestrictionRules.d.ts +1 -1
  193. package/dist/internal/resources/connectorRestrictions.cjs.map +1 -1
  194. package/dist/internal/resources/connectorRestrictions.d.cts +1 -1
  195. package/dist/internal/resources/connectorRestrictions.d.ts +1 -1
  196. package/dist/internal/resources/diagnostic.cjs.map +1 -1
  197. package/dist/internal/resources/diagnostic.d.cts +1 -1
  198. package/dist/internal/resources/diagnostic.d.ts +1 -1
  199. package/dist/internal/resources/gsm.cjs.map +1 -1
  200. package/dist/internal/resources/gsm.d.cts +1 -1
  201. package/dist/internal/resources/gsm.d.ts +1 -1
  202. package/dist/internal/resources/nativeRenewals.cjs.map +1 -1
  203. package/dist/internal/resources/nativeRenewals.d.cts +1 -1
  204. package/dist/internal/resources/nativeRenewals.d.ts +1 -1
  205. package/dist/internal/resources/platformBilling.cjs.map +1 -1
  206. package/dist/internal/resources/platformBilling.d.cts +1 -1
  207. package/dist/internal/resources/platformBilling.d.ts +1 -1
  208. package/dist/internal/resources/platformFees.cjs.map +1 -1
  209. package/dist/internal/resources/platformMessageTemplates.cjs.map +1 -1
  210. package/dist/internal/resources/platformSettings.cjs.map +1 -1
  211. package/dist/internal/resources/platformSettings.d.cts +1 -1
  212. package/dist/internal/resources/platformSettings.d.ts +1 -1
  213. package/dist/internal.cjs +8 -8
  214. package/dist/internal.cjs.map +1 -1
  215. package/dist/internal.d.cts +2 -2
  216. package/dist/internal.d.ts +2 -2
  217. package/dist/internal.js +5 -5
  218. package/dist/listQuery.cjs.map +1 -1
  219. package/dist/panes.cjs.map +1 -1
  220. package/dist/paymentPresentation.cjs.map +1 -1
  221. package/dist/recordCounter.cjs.map +1 -1
  222. package/dist/resources/aiTools.cjs.map +1 -1
  223. package/dist/resources/analytics.cjs.map +1 -1
  224. package/dist/resources/analyticsDashboard.cjs.map +1 -1
  225. package/dist/resources/apiKeys.cjs.map +1 -1
  226. package/dist/resources/audit.cjs.map +1 -1
  227. package/dist/resources/authentication.cjs.map +1 -1
  228. package/dist/resources/availabilityOverrides.cjs.map +1 -1
  229. package/dist/resources/billing.cjs.map +1 -1
  230. package/dist/resources/buyerAccount.cjs.map +1 -1
  231. package/dist/resources/buyerBlocklist.cjs.map +1 -1
  232. package/dist/resources/buyerConversations.cjs.map +1 -1
  233. package/dist/resources/buyerEvidenceReviews.cjs.map +1 -1
  234. package/dist/resources/buyerPortal.cjs.map +1 -1
  235. package/dist/resources/cards.cjs.map +1 -1
  236. package/dist/resources/chargebackPrevention.cjs.map +1 -1
  237. package/dist/resources/checkoutDomains.cjs.map +1 -1
  238. package/dist/resources/checkoutMethods.cjs.map +1 -1
  239. package/dist/resources/checkoutRecovery.cjs.map +1 -1
  240. package/dist/resources/checkoutTemplates.cjs.map +1 -1
  241. package/dist/resources/connectors.cjs.map +1 -1
  242. package/dist/resources/contentEncryption.cjs.map +1 -1
  243. package/dist/resources/costRules.cjs.map +1 -1
  244. package/dist/resources/customers.cjs.map +1 -1
  245. package/dist/resources/deploymentBranding.cjs.map +1 -1
  246. package/dist/resources/disputes.cjs.map +1 -1
  247. package/dist/resources/ephemeralKeys.cjs.map +1 -1
  248. package/dist/resources/events.cjs.map +1 -1
  249. package/dist/resources/export.cjs.map +1 -1
  250. package/dist/resources/externalRecords.cjs.map +1 -1
  251. package/dist/resources/featureMatrix.cjs.map +1 -1
  252. package/dist/resources/fees.cjs.map +1 -1
  253. package/dist/resources/files.cjs.map +1 -1
  254. package/dist/resources/forex.cjs.map +1 -1
  255. package/dist/resources/identityVerifications.cjs +2 -2
  256. package/dist/resources/identityVerifications.cjs.map +1 -1
  257. package/dist/resources/identityVerifications.d.cts +25 -4
  258. package/dist/resources/identityVerifications.d.ts +25 -4
  259. package/dist/resources/identityVerifications.js +1 -1
  260. package/dist/resources/industries.cjs.map +1 -1
  261. package/dist/resources/invoiceSettings.cjs.map +1 -1
  262. package/dist/resources/invoices.cjs.map +1 -1
  263. package/dist/resources/live.cjs.map +1 -1
  264. package/dist/resources/mandates.cjs.map +1 -1
  265. package/dist/resources/merchantAccounts.cjs.map +1 -1
  266. package/dist/resources/messageTemplates.cjs.map +1 -1
  267. package/dist/resources/notices.cjs.map +1 -1
  268. package/dist/resources/operationLimits.cjs.map +1 -1
  269. package/dist/resources/paymentLinks.cjs.map +1 -1
  270. package/dist/resources/paymentMethods.cjs.map +1 -1
  271. package/dist/resources/payments.cjs.map +1 -1
  272. package/dist/resources/payoutDestinations.cjs.map +1 -1
  273. package/dist/resources/payouts.cjs.map +1 -1
  274. package/dist/resources/paypalDisputes.cjs.map +1 -1
  275. package/dist/resources/persons.cjs.map +1 -1
  276. package/dist/resources/poll.cjs.map +1 -1
  277. package/dist/resources/processorCosts.cjs.map +1 -1
  278. package/dist/resources/processorImports.cjs.map +1 -1
  279. package/dist/resources/products.cjs.map +1 -1
  280. package/dist/resources/profileAcquirers.cjs.map +1 -1
  281. package/dist/resources/profiles.cjs.map +1 -1
  282. package/dist/resources/projects.cjs.map +1 -1
  283. package/dist/resources/refunds.cjs.map +1 -1
  284. package/dist/resources/regions.cjs.map +1 -1
  285. package/dist/resources/relay.cjs.map +1 -1
  286. package/dist/resources/risk.cjs.map +1 -1
  287. package/dist/resources/routing.cjs.map +1 -1
  288. package/dist/resources/search.cjs.map +1 -1
  289. package/dist/resources/sellToRestrictions.cjs.map +1 -1
  290. package/dist/resources/settings.cjs.map +1 -1
  291. package/dist/resources/settlement.cjs +2 -2
  292. package/dist/resources/settlement.cjs.map +1 -1
  293. package/dist/resources/settlement.d.cts +24 -1
  294. package/dist/resources/settlement.d.ts +24 -1
  295. package/dist/resources/settlement.js +1 -1
  296. package/dist/resources/shopLabels.cjs.map +1 -1
  297. package/dist/resources/shops.cjs.map +1 -1
  298. package/dist/resources/stripeConnect.cjs.map +1 -1
  299. package/dist/resources/subscriptions.cjs.map +1 -1
  300. package/dist/resources/support.cjs.map +1 -1
  301. package/dist/resources/threeDsRules.cjs.map +1 -1
  302. package/dist/resources/users.cjs.map +1 -1
  303. package/dist/resources/vatRates.cjs.map +1 -1
  304. package/dist/resources/verification.cjs.map +1 -1
  305. package/dist/resources/webhooks.cjs.map +1 -1
  306. package/dist/resources/whopResolutionCases.cjs.map +1 -1
  307. package/dist/trustedOrigins.cjs.map +1 -1
  308. package/dist/{types-BgtOYc1g.d.ts → types-DOTyjOZD.d.ts} +5 -1
  309. package/dist/{types-n2jLRgEU.d.cts → types-zLnhjw0u.d.cts} +5 -1
  310. package/dist/types.cjs.map +1 -1
  311. package/dist/types.d.cts +87 -3
  312. package/dist/types.d.ts +87 -3
  313. package/package.json +1 -1
  314. package/dist/chunk-AVR2GPXU.cjs.map +0 -1
  315. package/dist/chunk-GH6CASEG.cjs.map +0 -1
  316. package/dist/chunk-IA6O7DWZ.cjs.map +0 -1
  317. package/dist/chunk-RBNTITQG.js.map +0 -1
  318. package/dist/chunk-S4TNMIX7.cjs.map +0 -1
  319. package/dist/chunk-T5BLVSK3.js.map +0 -1
  320. package/dist/chunk-UZUNBL7K.cjs.map +0 -1
  321. /package/dist/{chunk-66PCQHAT.js.map → chunk-F6V5A62N.js.map} +0 -0
  322. /package/dist/{chunk-25KYFJIB.js.map → chunk-V7ACE3LA.js.map} +0 -0
  323. /package/dist/{chunk-T3X5DOSW.js.map → chunk-Y6XIPSSK.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"sources":["/tmp/sdk-pub-0459/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;A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;AACA;AACA","file":"/tmp/sdk-pub-0459/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":["/tmp/delopay-sdk-publish/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;A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;AACA;AACA","file":"/tmp/delopay-sdk-publish/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 +1 @@
1
- {"version":3,"sources":["/tmp/sdk-pub-0459/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,EAA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;AACA;AACA;AACA","file":"/tmp/sdk-pub-0459/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}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A;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":"/tmp/delopay-sdk-publish/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":["/tmp/sdk-pub-0459/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,6BAA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AAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUqC,EAAA;AACqD,IAAA;AAC1F,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOuF,EAAA;AACM,IAAA;AACtF,MAAA;AACJ,IAAA;AACH,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAY0B,EAAA;AACZ,IAAA;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":"/tmp/sdk-pub-0459/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
+ {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F,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":"/tmp/delopay-sdk-publish/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":["/tmp/sdk-pub-0459/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,UA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mB,KAAK,CAAA;AACjD,EAAA,wBACE,UAAA,CAAW,IAAA;AAAA,IAAK,CAAC,IAAA,EAAA,GACf,IAAA,CAAK,KAAA,CAAM,CAAC,GAAA,EAAA,GAAQ,kBAAA,CAAmB,IAAI,CAAA,CAAE,GAAG,EAAA,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":"/tmp/sdk-pub-0459/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":["/tmp/delopay-sdk-publish/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;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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":"/tmp/delopay-sdk-publish/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 +1 @@
1
- {"version":3,"sources":["/tmp/sdk-pub-0459/dist/chunk-GW7IHYXR.cjs","../src/resources/buyerConversations.ts"],"names":[],"mappings":"AAAA;AACE;AACF,wDAA6B;AAC7B;AACA;ACyBO,IAAM,mBAAA,EAAN,MAAyB;AAAA,EAC9B,WAAA,CAA6B,OAAA,EAAoB;AAApB,IAAA,IAAA,CAAA,QAAA,EAAA,OAAA;AAAA,EAAqB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOlD,MAAM,IAAA,CAAK,MAAA,EAAqE;AAC9E,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,KAAA,EAAO,sBAAA,EAAwB;AAAA,MACjD,KAAA,EAAO,wCAAA,MAAS,EAAQ,CAAC,QAAQ,CAAC;AAAA,IACpC,CAAC,CAAA;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,MAAM,KAAA,CAAM,MAAA,EAAkE;AAC5E,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,MAAA,EAAQ,sBAAA,EAAwB,EAAE,IAAA,EAAM,OAAO,CAAC,CAAA;AAAA,EACtE;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,MAAM,QAAA,CACJ,EAAA,EACA,MAAA,EACkC;AAClC,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,KAAA,EAAO,CAAA,qBAAA,EAAwB,kBAAA,CAAmB,EAAE,CAAC,CAAA,CAAA;AAChE,MAAA;AACR,IAAA;AACH,EAAA;AAAA;AAAA;AAAA;AAAA;AASqC,EAAA;AACuC,IAAA;AAClE,MAAA;AACP,IAAA;AACH,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQ+F,EAAA;AACnB,IAAA;AAClE,MAAA;AACP,IAAA;AACH,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAewC,EAAA;AACZ,IAAA;AACoB,IAAA;AACM,IAAA;AACb,IAAA;AACkB,IAAA;AACjD,MAAA;AACP,IAAA;AACH,EAAA;AAAA;AAAA;AAAA;AAAA;AAM8D,EAAA;AAChD,IAAA;AACV,MAAA;AACuD,MAAA;AAChC,MAAA;AACzB,IAAA;AACF,EAAA;AAAA;AAAA;AAAA;AAAA;AAM4D,EAAA;AAC9C,IAAA;AACV,MAAA;AACuD,MAAA;AACzD,IAAA;AACF,EAAA;AAAA;AAAA;AAAA;AAAA;AAM8D,EAAA;AACc,IAAA;AAC5E,EAAA;AAAA;AAAA;AAAA;AAAA;AAM6F,EAAA;AACjB,IAAA;AAClE,MAAA;AACP,IAAA;AACH,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUqC,EAAA;AACuC,IAAA;AAClE,MAAA;AACP,IAAA;AACH,EAAA;AACF;AD9C8E;AACA;AACA;AACA","file":"/tmp/sdk-pub-0459/dist/chunk-GW7IHYXR.cjs","sourcesContent":[null,"import type { RequestFn } from '../client';\nimport type {\n BuyerConversationAssign,\n BuyerConversationAttachment,\n BuyerConversationDetail,\n BuyerConversationList,\n BuyerConversationListQuery,\n BuyerConversationMessage,\n BuyerConversationMessageCreate,\n BuyerConversationMessagesQuery,\n BuyerConversationNote,\n BuyerConversationNoteCreate,\n BuyerConversationStart,\n BuyerConversationStatusUpdate,\n BuyerConversationSummary,\n} from '../types';\nimport { csvQuery } from '../listQuery';\n\n/**\n * Conversations between buyers and the shop's team. A buyer writes from the\n * buyer account or a shop's portal; the team reads and answers here. There is\n * one conversation per buyer, shop and mode, whoever on the team answers.\n *\n * Every route needs a dashboard session. The `BuyerConversations` area at\n * `Read` lists and opens conversations, `Edit` answers, starts one and adds\n * internal notes and uploads files for an answer, and `Write` assigns, closes and reopens. A caller scoped to one shop reaches\n * that shop's conversations only. Answers carry the team member's first name\n * to the buyer, never more of their name.\n */\nexport class BuyerConversations {\n constructor(private readonly request: RequestFn) {}\n\n /**\n * One page of the inbox, the latest message first unless `sort_by` says\n * otherwise, filtered by shop, status (one or several), assignee, mode or\n * buyer. `GET /buyer-conversations`\n */\n async list(params?: BuyerConversationListQuery): Promise<BuyerConversationList> {\n return this.request('GET', '/buyer-conversations', {\n query: csvQuery(params, ['status']),\n });\n }\n\n /**\n * Starts the conversation with a buyer at one shop, or adds to the one that\n * exists, with a first message. `POST /buyer-conversations`\n */\n async start(params: BuyerConversationStart): Promise<BuyerConversationDetail> {\n return this.request('POST', '/buyer-conversations', { body: params });\n }\n\n /**\n * One conversation and its newest messages, oldest first; `before` pages\n * back. `GET /buyer-conversations/{id}`\n */\n async retrieve(\n id: string,\n params?: BuyerConversationMessagesQuery,\n ): Promise<BuyerConversationDetail> {\n return this.request('GET', `/buyer-conversations/${encodeURIComponent(id)}`, {\n query: params as Record<string, string | number | null | undefined>,\n });\n }\n\n /**\n * A team member's answer. A closed conversation refuses it.\n * `POST /buyer-conversations/{id}/messages`\n */\n async reply(\n id: string,\n params: BuyerConversationMessageCreate,\n ): Promise<BuyerConversationMessage> {\n return this.request('POST', `/buyer-conversations/${encodeURIComponent(id)}/messages`, {\n body: params,\n });\n }\n\n /**\n * A team member's internal note. Only the team reads it: the buyer never\n * sees a note, and a note does not move the conversation or mark it unread.\n * A closed conversation takes notes as well.\n * `POST /buyer-conversations/{id}/notes`\n */\n async addNote(id: string, params: BuyerConversationNoteCreate): Promise<BuyerConversationNote> {\n return this.request('POST', `/buyer-conversations/${encodeURIComponent(id)}/notes`, {\n body: params,\n });\n }\n\n /**\n * Upload a file for the caller's next answer, under the shop's attachment\n * rules (`attachment_rules` on the conversation). It belongs to the caller\n * until an answer names it in `attachments`; one no answer took within a\n * day is cleared. Uploading again with the same `clientUploadId` returns\n * the file the first upload stored.\n * `POST /buyer-conversation-files/{conversation}`\n */\n async uploadFile(\n id: string,\n file: Blob,\n clientUploadId: string,\n fileName?: string,\n ): Promise<BuyerConversationAttachment> {\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('POST', `/buyer-conversation-files/${encodeURIComponent(id)}`, {\n body: form,\n });\n }\n\n /**\n * Download a file a message of the conversation carries.\n * `GET /buyer-conversation-files/{conversation}/{file}`\n */\n async downloadFile(id: string, fileId: string): Promise<Blob> {\n return this.request(\n 'GET',\n `/buyer-conversation-files/${encodeURIComponent(id)}/${encodeURIComponent(fileId)}`,\n { responseType: 'blob' },\n );\n }\n\n /**\n * Remove a file the caller uploaded that no answer took.\n * `DELETE /buyer-conversation-files/{conversation}/{file}`\n */\n async removeFile(id: string, fileId: string): Promise<void> {\n return this.request(\n 'DELETE',\n `/buyer-conversation-files/${encodeURIComponent(id)}/${encodeURIComponent(fileId)}`,\n );\n }\n\n /**\n * The team has read the conversation up to its last accepted message.\n * `POST /buyer-conversations/{id}/read`\n */\n async markRead(id: string): Promise<BuyerConversationSummary> {\n return this.request('POST', `/buyer-conversations/${encodeURIComponent(id)}/read`);\n }\n\n /**\n * Hands the conversation to a team member, to the caller with `me`, or to\n * nobody with `null`. `POST /buyer-conversations/{id}/assign`\n */\n async assign(id: string, params: BuyerConversationAssign): Promise<BuyerConversationSummary> {\n return this.request('POST', `/buyer-conversations/${encodeURIComponent(id)}/assign`, {\n body: params,\n });\n }\n\n /**\n * Closes or reopens the conversation. Closing moves no money and decides\n * no case; it stops new messages until reopened.\n * `POST /buyer-conversations/{id}/status`\n */\n async setStatus(\n id: string,\n params: BuyerConversationStatusUpdate,\n ): Promise<BuyerConversationSummary> {\n return this.request('POST', `/buyer-conversations/${encodeURIComponent(id)}/status`, {\n body: params,\n });\n }\n}\n"]}
1
+ {"version":3,"sources":["/tmp/delopay-sdk-publish/dist/chunk-GW7IHYXR.cjs","../src/resources/buyerConversations.ts"],"names":[],"mappings":"AAAA;AACE;AACF,wDAA6B;AAC7B;AACA;ACyBO,IAAM,mBAAA,EAAN,MAAyB;AAAA,EAC9B,WAAA,CAA6B,OAAA,EAAoB;AAApB,IAAA,IAAA,CAAA,QAAA,EAAA,OAAA;AAAA,EAAqB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOlD,MAAM,IAAA,CAAK,MAAA,EAAqE;AAC9E,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,KAAA,EAAO,sBAAA,EAAwB;AAAA,MACjD,KAAA,EAAO,wCAAA,MAAS,EAAQ,CAAC,QAAQ,CAAC;AAAA,IACpC,CAAC,CAAA;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,MAAM,KAAA,CAAM,MAAA,EAAkE;AAC5E,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,MAAA,EAAQ,sBAAA,EAAwB,EAAE,IAAA,EAAM,OAAO,CAAC,CAAA;AAAA,EACtE;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,MAAM,QAAA,CACJ,EAAA,EACA,MAAA,EACkC;AAClC,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,KAAA,EAAO,CAAA,qBAAA,EAAwB,kBAAA,CAAmB,EAAE,CAAC,CAAA,CAAA;AAChE,MAAA;AACR,IAAA;AACH,EAAA;AAAA;AAAA;AAAA;AAAA;AASqC,EAAA;AACuC,IAAA;AAClE,MAAA;AACP,IAAA;AACH,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQ+F,EAAA;AACnB,IAAA;AAClE,MAAA;AACP,IAAA;AACH,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAewC,EAAA;AACZ,IAAA;AACoB,IAAA;AACM,IAAA;AACb,IAAA;AACkB,IAAA;AACjD,MAAA;AACP,IAAA;AACH,EAAA;AAAA;AAAA;AAAA;AAAA;AAM8D,EAAA;AAChD,IAAA;AACV,MAAA;AACuD,MAAA;AAChC,MAAA;AACzB,IAAA;AACF,EAAA;AAAA;AAAA;AAAA;AAAA;AAM4D,EAAA;AAC9C,IAAA;AACV,MAAA;AACuD,MAAA;AACzD,IAAA;AACF,EAAA;AAAA;AAAA;AAAA;AAAA;AAM8D,EAAA;AACc,IAAA;AAC5E,EAAA;AAAA;AAAA;AAAA;AAAA;AAM6F,EAAA;AACjB,IAAA;AAClE,MAAA;AACP,IAAA;AACH,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUqC,EAAA;AACuC,IAAA;AAClE,MAAA;AACP,IAAA;AACH,EAAA;AACF;AD9C8E;AACA;AACA;AACA","file":"/tmp/delopay-sdk-publish/dist/chunk-GW7IHYXR.cjs","sourcesContent":[null,"import type { RequestFn } from '../client';\nimport type {\n BuyerConversationAssign,\n BuyerConversationAttachment,\n BuyerConversationDetail,\n BuyerConversationList,\n BuyerConversationListQuery,\n BuyerConversationMessage,\n BuyerConversationMessageCreate,\n BuyerConversationMessagesQuery,\n BuyerConversationNote,\n BuyerConversationNoteCreate,\n BuyerConversationStart,\n BuyerConversationStatusUpdate,\n BuyerConversationSummary,\n} from '../types';\nimport { csvQuery } from '../listQuery';\n\n/**\n * Conversations between buyers and the shop's team. A buyer writes from the\n * buyer account or a shop's portal; the team reads and answers here. There is\n * one conversation per buyer, shop and mode, whoever on the team answers.\n *\n * Every route needs a dashboard session. The `BuyerConversations` area at\n * `Read` lists and opens conversations, `Edit` answers, starts one and adds\n * internal notes and uploads files for an answer, and `Write` assigns, closes and reopens. A caller scoped to one shop reaches\n * that shop's conversations only. Answers carry the team member's first name\n * to the buyer, never more of their name.\n */\nexport class BuyerConversations {\n constructor(private readonly request: RequestFn) {}\n\n /**\n * One page of the inbox, the latest message first unless `sort_by` says\n * otherwise, filtered by shop, status (one or several), assignee, mode or\n * buyer. `GET /buyer-conversations`\n */\n async list(params?: BuyerConversationListQuery): Promise<BuyerConversationList> {\n return this.request('GET', '/buyer-conversations', {\n query: csvQuery(params, ['status']),\n });\n }\n\n /**\n * Starts the conversation with a buyer at one shop, or adds to the one that\n * exists, with a first message. `POST /buyer-conversations`\n */\n async start(params: BuyerConversationStart): Promise<BuyerConversationDetail> {\n return this.request('POST', '/buyer-conversations', { body: params });\n }\n\n /**\n * One conversation and its newest messages, oldest first; `before` pages\n * back. `GET /buyer-conversations/{id}`\n */\n async retrieve(\n id: string,\n params?: BuyerConversationMessagesQuery,\n ): Promise<BuyerConversationDetail> {\n return this.request('GET', `/buyer-conversations/${encodeURIComponent(id)}`, {\n query: params as Record<string, string | number | null | undefined>,\n });\n }\n\n /**\n * A team member's answer. A closed conversation refuses it.\n * `POST /buyer-conversations/{id}/messages`\n */\n async reply(\n id: string,\n params: BuyerConversationMessageCreate,\n ): Promise<BuyerConversationMessage> {\n return this.request('POST', `/buyer-conversations/${encodeURIComponent(id)}/messages`, {\n body: params,\n });\n }\n\n /**\n * A team member's internal note. Only the team reads it: the buyer never\n * sees a note, and a note does not move the conversation or mark it unread.\n * A closed conversation takes notes as well.\n * `POST /buyer-conversations/{id}/notes`\n */\n async addNote(id: string, params: BuyerConversationNoteCreate): Promise<BuyerConversationNote> {\n return this.request('POST', `/buyer-conversations/${encodeURIComponent(id)}/notes`, {\n body: params,\n });\n }\n\n /**\n * Upload a file for the caller's next answer, under the shop's attachment\n * rules (`attachment_rules` on the conversation). It belongs to the caller\n * until an answer names it in `attachments`; one no answer took within a\n * day is cleared. Uploading again with the same `clientUploadId` returns\n * the file the first upload stored.\n * `POST /buyer-conversation-files/{conversation}`\n */\n async uploadFile(\n id: string,\n file: Blob,\n clientUploadId: string,\n fileName?: string,\n ): Promise<BuyerConversationAttachment> {\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('POST', `/buyer-conversation-files/${encodeURIComponent(id)}`, {\n body: form,\n });\n }\n\n /**\n * Download a file a message of the conversation carries.\n * `GET /buyer-conversation-files/{conversation}/{file}`\n */\n async downloadFile(id: string, fileId: string): Promise<Blob> {\n return this.request(\n 'GET',\n `/buyer-conversation-files/${encodeURIComponent(id)}/${encodeURIComponent(fileId)}`,\n { responseType: 'blob' },\n );\n }\n\n /**\n * Remove a file the caller uploaded that no answer took.\n * `DELETE /buyer-conversation-files/{conversation}/{file}`\n */\n async removeFile(id: string, fileId: string): Promise<void> {\n return this.request(\n 'DELETE',\n `/buyer-conversation-files/${encodeURIComponent(id)}/${encodeURIComponent(fileId)}`,\n );\n }\n\n /**\n * The team has read the conversation up to its last accepted message.\n * `POST /buyer-conversations/{id}/read`\n */\n async markRead(id: string): Promise<BuyerConversationSummary> {\n return this.request('POST', `/buyer-conversations/${encodeURIComponent(id)}/read`);\n }\n\n /**\n * Hands the conversation to a team member, to the caller with `me`, or to\n * nobody with `null`. `POST /buyer-conversations/{id}/assign`\n */\n async assign(id: string, params: BuyerConversationAssign): Promise<BuyerConversationSummary> {\n return this.request('POST', `/buyer-conversations/${encodeURIComponent(id)}/assign`, {\n body: params,\n });\n }\n\n /**\n * Closes or reopens the conversation. Closing moves no money and decides\n * no case; it stops new messages until reopened.\n * `POST /buyer-conversations/{id}/status`\n */\n async setStatus(\n id: string,\n params: BuyerConversationStatusUpdate,\n ): Promise<BuyerConversationSummary> {\n return this.request('POST', `/buyer-conversations/${encodeURIComponent(id)}/status`, {\n body: params,\n });\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["/tmp/sdk-pub-0459/dist/chunk-HLHML5ES.cjs","../src/resources/analytics.ts"],"names":[],"mappings":"AAAA;ACyBO,IAAM,UAAA,EAAN,MAAgB;AAAA,EACrB,WAAA,CAA6B,OAAA,EAAoB;AAApB,IAAA,IAAA,CAAA,QAAA,EAAA,OAAA;AAAA,EAAqB;AAAA;AAAA;AAAA;AA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,EAAA;AACY,IAAA;AAC5E,EAAA;AAAA;AAKoC,EAAA;AACuC,IAAA;AAC3E,EAAA;AAAA;AAGsF,EAAA;AACX,IAAA;AAC3E,EAAA;AAAA;AAKoC,EAAA;AACqC,IAAA;AACzE,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAcoC,EAAA;AACmC,IAAA;AACvE,EAAA;AAAA;AAKoC,EAAA;AACqC,IAAA;AACzE,EAAA;AACF;AD9D+E;AACA;AACA;AACA","file":"/tmp/sdk-pub-0459/dist/chunk-HLHML5ES.cjs","sourcesContent":[null,"import type { RequestExtras, RequestFn } from '../client';\nimport type {\n AnalyticsScopeRequest,\n AnalyticsScopeResponse,\n AnalyticsShopsRequest,\n AnalyticsShopsResponse,\n AnalyticsConnectorsRequest,\n AnalyticsConnectorsResponse,\n ClientAnalyticsRequest,\n IndustryAnalytics,\n IndustryAnalyticsRequest,\n DevicesAnalyticsResponse,\n GeoAnalyticsResponse,\n DeviceDrillRequest,\n GeoDrillRequest,\n DrillResponse,\n SubscriptionAnalyticsRequest,\n SubscriptionAnalyticsResponse,\n SubscriptionDrillRequest,\n ScopeDrillRequest,\n AnalyticsExclusionRequest,\n AnalyticsExclusionResponse,\n AnalyticsExclusionsResponse,\n} from '../types';\n\nexport class Analytics {\n constructor(private readonly request: RequestFn) {}\n\n /**\n * Scoped, drill-level analytics dashboard for the authenticated merchant\n * (the same engine as the admin portal, pinned server-side to your own\n * merchant). The server ignores `merchant_id` — it always scopes to your\n * merchant, and to your single shop for profile-scoped users — so pass only\n * `project_id` / `shop_id` to drill and the window / `sections` fields.\n * Returns one drill level: the scope's daily series + previous window,\n * processor mix and direct children. Accepts a dashboard session or an API\n * key, including a `statistics_read` key; a shop-bound key reads only its\n * shop. `GET /analytics/scope`\n */\n async scope(params?: AnalyticsScopeRequest): Promise<AnalyticsScopeResponse> {\n return this.request('GET', '/analytics/scope', {\n query: params as Record<string, string | number | boolean | undefined>,\n });\n }\n\n /**\n * Period Reports: the scoped daily series, pinned exactly like `scope`, but\n * gated on the Period Reports permission area instead of Payment\n * Performance. Pass `timezone` and each day bucket is a local calendar day,\n * which sums exactly into calendar weeks and months. Answers only the\n * `series`, `previous` and `children` blocks and ignores country and device\n * filters. Accepts a dashboard session or an API key, including a\n * `statistics_read` key. `GET /analytics/reports`\n */\n async reports(params?: AnalyticsScopeRequest): Promise<AnalyticsScopeResponse> {\n return this.request('GET', '/analytics/reports', {\n query: params as Record<string, string | number | boolean | undefined>,\n });\n }\n\n /**\n * Shop comparison: one series per shop over one window, with whole-window\n * and previous-window totals, so shops can be drawn side by side. Pinned\n * server-side to your own merchant (`merchant_id` is ignored), and to your\n * single shop for a shop-scoped user; `project_id` / `shop_id` narrow it.\n * Shops without activity are included, sorted by name. Hourly buckets are\n * refused for windows over 7 days. Accepts an API key like `scope`.\n * `GET /analytics/shops`\n */\n async shops(params?: AnalyticsShopsRequest): Promise<AnalyticsShopsResponse> {\n return this.request('GET', '/analytics/shops', {\n query: params as Record<string, string | number | boolean | undefined>,\n });\n }\n\n /**\n * PSP analytics: routed payments, outcomes, volume and payment sizes per\n * connector and per connector account over one window, with the breakdown\n * by project and shop. Pinned server-side to your own merchant\n * (`merchant_id` is ignored) and to your shop for a shop-scoped user. Live\n * payments unless `test_mode` is `true`. Amounts are in USD unless\n * `currency` names one. Pass `sections` to compute only some blocks.\n * A role that may see no processor gets a 403.\n * `GET /analytics/connectors`\n */\n async connectors(params?: AnalyticsConnectorsRequest): Promise<AnalyticsConnectorsResponse> {\n return this.request('GET', '/analytics/connectors', {\n query: params as Record<string, string | number | boolean | undefined>,\n });\n }\n\n /**\n * Industry analytics: payments, volume, outcomes, refunds and disputes by\n * the industry each shop had on the UTC day a payment was created, as a tree\n * of industries, sub-industries, the merchant's own industries and the\n * shops without one, each with the previous window, a series, the processor\n * and country split and the largest shops. Pinned server-side to your own\n * merchant (`merchant_id` is ignored). Needs the `IndustryAnalytics` area,\n * which no other analytics grant implies, at merchant level: a shop-scoped\n * role or a shop-bound key gets a 403 (`IR_22`). Live payments unless\n * `test_mode` is `true`; amounts in USD unless `currency` names one.\n * `GET /analytics/industries`\n */\n async industries(params?: IndustryAnalyticsRequest): Promise<IndustryAnalytics> {\n return this.request('GET', '/analytics/industries', {\n query: params as Record<string, string | number | boolean | undefined>,\n });\n }\n\n /**\n * Device analytics over the canonical client-context observation per\n * payment (browser/platform families, device classes and models, checkout\n * channel mix, time-to-pay), pinned server-side to your own merchant and\n * drillable via `project_id` / `shop_id` exactly like `scope`. Gated on the\n * client-context optimisation-use switch: when it is off the server answers\n * 200 with `enabled: false` and a caveat naming the switch. Accepts an API\n * key like `scope`. `GET /analytics/devices`\n */\n async devices(params?: ClientAnalyticsRequest): Promise<DevicesAnalyticsResponse> {\n return this.request('GET', '/analytics/devices', {\n query: params as Record<string, string | number | boolean | undefined>,\n });\n }\n\n /**\n * Geo analytics over the canonical client-context observation per payment:\n * country totals, city bubbles (IP mode), buyer languages, buyer-local\n * purchase hours and the IP-vs-billing mismatch share. `mode` selects the\n * location claim (`ip` default, `billing`); the two are never coalesced.\n * Same drill, window, gating and API-key contract as `devices`.\n * `GET /analytics/geo`\n */\n async geo(params?: ClientAnalyticsRequest): Promise<GeoAnalyticsResponse> {\n return this.request('GET', '/analytics/geo', {\n query: params as Record<string, string | number | boolean | undefined>,\n });\n }\n\n /**\n * The recent payments behind one clicked geo target: a map country (in the\n * active claim mode), optionally narrowed to an IP-resolved city, or one\n * buyer-local heatmap cell (`dow` + `hour`, paid sessions only). Same\n * window/scope/filter and gating contract as `geo`; capped at 50 rows,\n * newest first, with the full match count alongside.\n * `GET /analytics/geo/transactions`\n */\n async geoTransactions(params: GeoDrillRequest): Promise<DrillResponse> {\n return this.request('GET', '/analytics/geo/transactions', {\n query: params as Record<string, string | number | boolean | undefined>,\n });\n }\n\n /**\n * The recent payments behind one clicked device target: exactly one of a\n * browser family, a platform family, an identified device-model label, or\n * a device class. Family/model targets are resolved server-side with the\n * same classifiers the cards use. Same window/scope/filter and gating\n * contract as `devices`; 50 rows per page (`offset` for the next page),\n * newest first, with the full match count alongside.\n * `GET /analytics/devices/transactions`\n */\n async deviceTransactions(params: DeviceDrillRequest): Promise<DrillResponse> {\n return this.request('GET', '/analytics/devices/transactions', {\n // A discriminated union carries no index signature, so the widening\n // goes via `unknown` — the union is the point.\n query: params as unknown as Record<string, string | number | boolean | undefined>,\n });\n }\n\n /**\n * The payments behind one clicked element of the payments dashboard: a\n * processor-donut slice, a payment-method slice, an outcome segment of a\n * series bar, a series bucket, or a breakdown row — combinable, with\n * `target_bucket` narrowing every other target. The outcome mapping is the\n * one the series and donuts are folded with, expanded server-side, so the\n * list is what the clicked number was made of. Rows and the whole-match\n * `summary` carry USD figures converted with the dashboard's own rates.\n * Same window/scope/chip contract as `scope`; sorted per `sort_on` /\n * `sort_by`, `limit` rows (default 50) per page, `offset` for the next.\n * `GET /analytics/scope/transactions`\n */\n async scopeTransactions(params: ScopeDrillRequest): Promise<DrillResponse> {\n return this.request('GET', '/analytics/scope/transactions', {\n // A discriminated union carries no index signature, so the widening\n // goes via `unknown` — the union is the point, and the query builder\n // only ever reads own enumerable keys.\n query: params as unknown as Record<string, string | number | boolean | undefined>,\n });\n }\n\n /**\n * Subscription analytics over `subscription` and `invoice`: estimated\n * recurring volume, the invoice funnel, movement (new / expansion /\n * contraction / churn), both processor axes, plan mix and the breakdown one\n * level below the scope. Pinned server-side to your own merchant and\n * drillable via `project_id` / `shop_id` exactly like `scope`.\n *\n * Half the figures are **stocks** — a snapshot at the window's end rather\n * than a sum over it — so `est_monthly_volume_usd` and `active` can match\n * across a 7-day and a 30-day window while `billed_volume_usd` does not.\n * Day granularity only. Accepts an API key like `scope`.\n * `GET /analytics/subscriptions`\n */\n async subscriptions(\n params?: SubscriptionAnalyticsRequest,\n ): Promise<SubscriptionAnalyticsResponse> {\n return this.request('GET', '/analytics/subscriptions', {\n query: params as Record<string, string | number | boolean | undefined>,\n });\n }\n\n /**\n * The billing cycles behind one clicked element of the subscription\n * dashboard: an invoice outcome, a processor slice on either axis, a plan\n * row, a subscription status, a movement component, a series bucket or a\n * breakdown row. Same window/scope/filter contract as `subscriptions`; 50\n * rows per page (`offset` for the next), newest first, with the full match\n * count alongside.\n *\n * A cycle that never reached a payment is listed too — that is what \"still\n * unpaid\" means — and carries its invoice id as `payment_id` with\n * `invoice_id` set to the same value, so you can always tell which you got.\n * `GET /analytics/subscriptions/list`\n */\n async subscriptionsList(params: SubscriptionDrillRequest): Promise<DrillResponse> {\n return this.request('GET', '/analytics/subscriptions/list', {\n // A discriminated union carries no index signature, so the widening\n // goes via `unknown` — the union is the point, and the query builder\n // only ever reads own enumerable keys.\n query: params as unknown as Record<string, string | number | boolean | undefined>,\n });\n }\n\n /**\n * Every analytics exclusion of the merchant, with the payments each one\n * matched in the lookback window.\n *\n * These rules change what the merchant's own dashboards count. Financial\n * records and transaction lists are never filtered by them.\n *\n * `matched_payments` counts overlap between rules: a payment matched by\n * three rules is counted once by each, so the values are not additive. The\n * envelope's `best_effort` and `lookback_days` apply to every row — matching\n * runs on client signals that may be absent or expired, within that window.\n * `GET /analytics/exclusions`\n */\n async listExclusions(): Promise<AnalyticsExclusionsResponse> {\n return this.request('GET', '/analytics/exclusions');\n }\n\n /**\n * Write a new exclusion. A shop-scoped user must name their own shop in\n * `profile_id`; omitting it applies the rule to every shop of the merchant.\n * Omitting `surfaces` means **all five**, not none.\n * `POST /analytics/exclusions`\n */\n async createExclusion(rule: AnalyticsExclusionRequest): Promise<AnalyticsExclusionResponse> {\n return this.request('POST', '/analytics/exclusions', { body: rule });\n }\n\n /**\n * Replace a stored exclusion **completely**. This is not a patch: every\n * field you leave out reverts to its default rather than keeping its stored\n * value, so send the whole rule — including an explicit `null` for a\n * `profile_id`, `value`, `valid_from`, `valid_until` or `note` you mean to\n * clear, and the full `surfaces` list you mean to keep.\n * `PUT /analytics/exclusions/{id}`\n */\n async updateExclusion(\n id: string,\n rule: AnalyticsExclusionRequest,\n options?: RequestExtras,\n ): Promise<AnalyticsExclusionResponse> {\n return this.request('PUT', `/analytics/exclusions/${encodeURIComponent(id)}`, {\n body: rule,\n ...options,\n });\n }\n\n /**\n * Delete a stored exclusion. Returns the rule as it was, so a caller can\n * say what it removed. `DELETE /analytics/exclusions/{id}`\n */\n async deleteExclusion(id: string): Promise<AnalyticsExclusionResponse> {\n return this.request('DELETE', `/analytics/exclusions/${encodeURIComponent(id)}`);\n }\n\n /** Global search. `POST /analytics/search` */\n async search(params: Record<string, unknown>): Promise<Record<string, unknown>> {\n return this.request('POST', '/analytics/search', { body: params });\n }\n\n /** Domain-specific search. `POST /analytics/search/{domain}` */\n async searchDomain(\n domain: string,\n params: Record<string, unknown>,\n ): Promise<Record<string, unknown>> {\n return this.request('POST', `/analytics/search/${encodeURIComponent(domain)}`, {\n body: params,\n });\n }\n\n /** Get analytics info. `GET /analytics/{domain}/info` */\n async getInfo(domain: string): Promise<Record<string, unknown>> {\n return this.request('GET', `/analytics/${encodeURIComponent(domain)}/info`);\n }\n\n /** Get API event logs. `GET /analytics/api-event-logs` */\n async apiEventLogs(\n params?: Record<string, string | number | undefined>,\n ): Promise<Record<string, unknown>> {\n return this.request('GET', '/analytics/api-event-logs', { query: params });\n }\n\n /** Get SDK event logs. `POST /analytics/sdk-event-logs` */\n async sdkEventLogs(params: Record<string, unknown>): Promise<Record<string, unknown>> {\n return this.request('POST', '/analytics/sdk-event-logs', { body: params });\n }\n\n /** Get connector event logs. `GET /analytics/connector-event-logs` */\n async connectorEventLogs(\n params?: Record<string, string | number | undefined>,\n ): Promise<Record<string, unknown>> {\n return this.request('GET', '/analytics/connector-event-logs', { query: params });\n }\n\n /**\n * Get routing event logs. `GET /analytics/routing-event-logs`\n *\n * @deprecated The service answers this only from a ClickHouse analytics\n * store; with SQL analytics, the default configuration, it answers an\n * error. To learn why a payment used a connector, read\n * `payments.routingDecisions(paymentId)`,\n * the routing decision recorded behind each attempt. This method stays for\n * compatibility and still sends the same request.\n */\n async routingEventLogs(\n params?: Record<string, string | number | undefined>,\n ): Promise<Record<string, unknown>> {\n return this.request('GET', '/analytics/routing-event-logs', { query: params });\n }\n\n /** Get outgoing webhook event logs. `GET /analytics/outgoing-webhook-event-logs` */\n async outgoingWebhookEventLogs(\n params?: Record<string, string | number | undefined>,\n ): Promise<Record<string, unknown>> {\n return this.request('GET', '/analytics/outgoing-webhook-event-logs', { query: params });\n }\n}\n"]}
1
+ {"version":3,"sources":["/tmp/delopay-sdk-publish/dist/chunk-HLHML5ES.cjs","../src/resources/analytics.ts"],"names":[],"mappings":"AAAA;ACyBO,IAAM,UAAA,EAAN,MAAgB;AAAA,EACrB,WAAA,CAA6B,OAAA,EAAoB;AAApB,IAAA,IAAA,CAAA,QAAA,EAAA,OAAA;AAAA,EAAqB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAalD,MAAM,KAAA,CAAM,MAAA,EAAiE;AAC3E,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,KAAA,EAAO,kBAAA,EAAoB;AAAA,MAC7C,KAAA,EAAO;AAAA,IACT,CAAC,CAAA;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAWA,MAAM,OAAA,CAAQ,MAAA,EAAiE;AAC7E,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,KAAA,EAAO,oBAAA,EAAsB;AAAA,MAC/C,KAAA,EAAO;AAAA,IACT,CAAC,CAAA;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAWA,MAAM,KAAA,CAAM,MAAA,EAAiE;AAC3E,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,KAAA,EAAO,kBAAA,EAAoB;AAAA,MAC7C,KAAA,EAAO;AAAA,IACT,CAAC,CAAA;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AA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A,EAAQ,uBAAA,EAAyB,EAAE,IAAA,EAAM,KAAK,CAAC,CAAA;AAAA,EACrE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUA,MAAM,eAAA,CACJ,EAAA,EACA,IAAA,EACA,OAAA,EACqC;AACrC,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,KAAA,EAAO,CAAA,sBAAA,EAAyB,kBAAA,CAAmB,EAAE,CAAC,CAAA,CAAA;AAClE,MAAA;AACH,MAAA;AACJ,IAAA;AACH,EAAA;AAAA;AAAA;AAAA;AAAA;AAMuE,EAAA;AACK,IAAA;AAC5E,EAAA;AAAA;AAGgF,EAAA;AACb,IAAA;AACnE,EAAA;AAAA;AAMoC,EAAA;AACyC,IAAA;AACnE,MAAA;AACP,IAAA;AACH,EAAA;AAAA;AAGgE,EAAA;AACY,IAAA;AAC5E,EAAA;AAAA;AAKoC,EAAA;AACuC,IAAA;AAC3E,EAAA;AAAA;AAGsF,EAAA;AACX,IAAA;AAC3E,EAAA;AAAA;AAKoC,EAAA;AACqC,IAAA;AACzE,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAcoC,EAAA;AACmC,IAAA;AACvE,EAAA;AAAA;AAKoC,EAAA;AACqC,IAAA;AACzE,EAAA;AACF;AD9D+E;AACA;AACA;AACA","file":"/tmp/delopay-sdk-publish/dist/chunk-HLHML5ES.cjs","sourcesContent":[null,"import type { RequestExtras, RequestFn } from '../client';\nimport type {\n AnalyticsScopeRequest,\n AnalyticsScopeResponse,\n AnalyticsShopsRequest,\n AnalyticsShopsResponse,\n AnalyticsConnectorsRequest,\n AnalyticsConnectorsResponse,\n ClientAnalyticsRequest,\n IndustryAnalytics,\n IndustryAnalyticsRequest,\n DevicesAnalyticsResponse,\n GeoAnalyticsResponse,\n DeviceDrillRequest,\n GeoDrillRequest,\n DrillResponse,\n SubscriptionAnalyticsRequest,\n SubscriptionAnalyticsResponse,\n SubscriptionDrillRequest,\n ScopeDrillRequest,\n AnalyticsExclusionRequest,\n AnalyticsExclusionResponse,\n AnalyticsExclusionsResponse,\n} from '../types';\n\nexport class Analytics {\n constructor(private readonly request: RequestFn) {}\n\n /**\n * Scoped, drill-level analytics dashboard for the authenticated merchant\n * (the same engine as the admin portal, pinned server-side to your own\n * merchant). The server ignores `merchant_id` — it always scopes to your\n * merchant, and to your single shop for profile-scoped users — so pass only\n * `project_id` / `shop_id` to drill and the window / `sections` fields.\n * Returns one drill level: the scope's daily series + previous window,\n * processor mix and direct children. Accepts a dashboard session or an API\n * key, including a `statistics_read` key; a shop-bound key reads only its\n * shop. `GET /analytics/scope`\n */\n async scope(params?: AnalyticsScopeRequest): Promise<AnalyticsScopeResponse> {\n return this.request('GET', '/analytics/scope', {\n query: params as Record<string, string | number | boolean | undefined>,\n });\n }\n\n /**\n * Period Reports: the scoped daily series, pinned exactly like `scope`, but\n * gated on the Period Reports permission area instead of Payment\n * Performance. Pass `timezone` and each day bucket is a local calendar day,\n * which sums exactly into calendar weeks and months. Answers only the\n * `series`, `previous` and `children` blocks and ignores country and device\n * filters. Accepts a dashboard session or an API key, including a\n * `statistics_read` key. `GET /analytics/reports`\n */\n async reports(params?: AnalyticsScopeRequest): Promise<AnalyticsScopeResponse> {\n return this.request('GET', '/analytics/reports', {\n query: params as Record<string, string | number | boolean | undefined>,\n });\n }\n\n /**\n * Shop comparison: one series per shop over one window, with whole-window\n * and previous-window totals, so shops can be drawn side by side. Pinned\n * server-side to your own merchant (`merchant_id` is ignored), and to your\n * single shop for a shop-scoped user; `project_id` / `shop_id` narrow it.\n * Shops without activity are included, sorted by name. Hourly buckets are\n * refused for windows over 7 days. Accepts an API key like `scope`.\n * `GET /analytics/shops`\n */\n async shops(params?: AnalyticsShopsRequest): Promise<AnalyticsShopsResponse> {\n return this.request('GET', '/analytics/shops', {\n query: params as Record<string, string | number | boolean | undefined>,\n });\n }\n\n /**\n * PSP analytics: routed payments, outcomes, volume and payment sizes per\n * connector and per connector account over one window, with the breakdown\n * by project and shop. Pinned server-side to your own merchant\n * (`merchant_id` is ignored) and to your shop for a shop-scoped user. Live\n * payments unless `test_mode` is `true`. Amounts are in USD unless\n * `currency` names one. Pass `sections` to compute only some blocks.\n * A role that may see no processor gets a 403.\n * `GET /analytics/connectors`\n */\n async connectors(params?: AnalyticsConnectorsRequest): Promise<AnalyticsConnectorsResponse> {\n return this.request('GET', '/analytics/connectors', {\n query: params as Record<string, string | number | boolean | undefined>,\n });\n }\n\n /**\n * Industry analytics: payments, volume, outcomes, refunds and disputes by\n * the industry each shop had on the UTC day a payment was created, as a tree\n * of industries, sub-industries, the merchant's own industries and the\n * shops without one, each with the previous window, a series, the processor\n * and country split and the largest shops. Pinned server-side to your own\n * merchant (`merchant_id` is ignored). Needs the `IndustryAnalytics` area,\n * which no other analytics grant implies, at merchant level: a shop-scoped\n * role or a shop-bound key gets a 403 (`IR_22`). Live payments unless\n * `test_mode` is `true`; amounts in USD unless `currency` names one.\n * `GET /analytics/industries`\n */\n async industries(params?: IndustryAnalyticsRequest): Promise<IndustryAnalytics> {\n return this.request('GET', '/analytics/industries', {\n query: params as Record<string, string | number | boolean | undefined>,\n });\n }\n\n /**\n * Device analytics over the canonical client-context observation per\n * payment (browser/platform families, device classes and models, checkout\n * channel mix, time-to-pay), pinned server-side to your own merchant and\n * drillable via `project_id` / `shop_id` exactly like `scope`. Gated on the\n * client-context optimisation-use switch: when it is off the server answers\n * 200 with `enabled: false` and a caveat naming the switch. Accepts an API\n * key like `scope`. `GET /analytics/devices`\n */\n async devices(params?: ClientAnalyticsRequest): Promise<DevicesAnalyticsResponse> {\n return this.request('GET', '/analytics/devices', {\n query: params as Record<string, string | number | boolean | undefined>,\n });\n }\n\n /**\n * Geo analytics over the canonical client-context observation per payment:\n * country totals, city bubbles (IP mode), buyer languages, buyer-local\n * purchase hours and the IP-vs-billing mismatch share. `mode` selects the\n * location claim (`ip` default, `billing`); the two are never coalesced.\n * Same drill, window, gating and API-key contract as `devices`.\n * `GET /analytics/geo`\n */\n async geo(params?: ClientAnalyticsRequest): Promise<GeoAnalyticsResponse> {\n return this.request('GET', '/analytics/geo', {\n query: params as Record<string, string | number | boolean | undefined>,\n });\n }\n\n /**\n * The recent payments behind one clicked geo target: a map country (in the\n * active claim mode), optionally narrowed to an IP-resolved city, or one\n * buyer-local heatmap cell (`dow` + `hour`, paid sessions only). Same\n * window/scope/filter and gating contract as `geo`; capped at 50 rows,\n * newest first, with the full match count alongside.\n * `GET /analytics/geo/transactions`\n */\n async geoTransactions(params: GeoDrillRequest): Promise<DrillResponse> {\n return this.request('GET', '/analytics/geo/transactions', {\n query: params as Record<string, string | number | boolean | undefined>,\n });\n }\n\n /**\n * The recent payments behind one clicked device target: exactly one of a\n * browser family, a platform family, an identified device-model label, or\n * a device class. Family/model targets are resolved server-side with the\n * same classifiers the cards use. Same window/scope/filter and gating\n * contract as `devices`; 50 rows per page (`offset` for the next page),\n * newest first, with the full match count alongside.\n * `GET /analytics/devices/transactions`\n */\n async deviceTransactions(params: DeviceDrillRequest): Promise<DrillResponse> {\n return this.request('GET', '/analytics/devices/transactions', {\n // A discriminated union carries no index signature, so the widening\n // goes via `unknown` — the union is the point.\n query: params as unknown as Record<string, string | number | boolean | undefined>,\n });\n }\n\n /**\n * The payments behind one clicked element of the payments dashboard: a\n * processor-donut slice, a payment-method slice, an outcome segment of a\n * series bar, a series bucket, or a breakdown row — combinable, with\n * `target_bucket` narrowing every other target. The outcome mapping is the\n * one the series and donuts are folded with, expanded server-side, so the\n * list is what the clicked number was made of. Rows and the whole-match\n * `summary` carry USD figures converted with the dashboard's own rates.\n * Same window/scope/chip contract as `scope`; sorted per `sort_on` /\n * `sort_by`, `limit` rows (default 50) per page, `offset` for the next.\n * `GET /analytics/scope/transactions`\n */\n async scopeTransactions(params: ScopeDrillRequest): Promise<DrillResponse> {\n return this.request('GET', '/analytics/scope/transactions', {\n // A discriminated union carries no index signature, so the widening\n // goes via `unknown` — the union is the point, and the query builder\n // only ever reads own enumerable keys.\n query: params as unknown as Record<string, string | number | boolean | undefined>,\n });\n }\n\n /**\n * Subscription analytics over `subscription` and `invoice`: estimated\n * recurring volume, the invoice funnel, movement (new / expansion /\n * contraction / churn), both processor axes, plan mix and the breakdown one\n * level below the scope. Pinned server-side to your own merchant and\n * drillable via `project_id` / `shop_id` exactly like `scope`.\n *\n * Half the figures are **stocks** — a snapshot at the window's end rather\n * than a sum over it — so `est_monthly_volume_usd` and `active` can match\n * across a 7-day and a 30-day window while `billed_volume_usd` does not.\n * Day granularity only. Accepts an API key like `scope`.\n * `GET /analytics/subscriptions`\n */\n async subscriptions(\n params?: SubscriptionAnalyticsRequest,\n ): Promise<SubscriptionAnalyticsResponse> {\n return this.request('GET', '/analytics/subscriptions', {\n query: params as Record<string, string | number | boolean | undefined>,\n });\n }\n\n /**\n * The billing cycles behind one clicked element of the subscription\n * dashboard: an invoice outcome, a processor slice on either axis, a plan\n * row, a subscription status, a movement component, a series bucket or a\n * breakdown row. Same window/scope/filter contract as `subscriptions`; 50\n * rows per page (`offset` for the next), newest first, with the full match\n * count alongside.\n *\n * A cycle that never reached a payment is listed too — that is what \"still\n * unpaid\" means — and carries its invoice id as `payment_id` with\n * `invoice_id` set to the same value, so you can always tell which you got.\n * `GET /analytics/subscriptions/list`\n */\n async subscriptionsList(params: SubscriptionDrillRequest): Promise<DrillResponse> {\n return this.request('GET', '/analytics/subscriptions/list', {\n // A discriminated union carries no index signature, so the widening\n // goes via `unknown` — the union is the point, and the query builder\n // only ever reads own enumerable keys.\n query: params as unknown as Record<string, string | number | boolean | undefined>,\n });\n }\n\n /**\n * Every analytics exclusion of the merchant, with the payments each one\n * matched in the lookback window.\n *\n * These rules change what the merchant's own dashboards count. Financial\n * records and transaction lists are never filtered by them.\n *\n * `matched_payments` counts overlap between rules: a payment matched by\n * three rules is counted once by each, so the values are not additive. The\n * envelope's `best_effort` and `lookback_days` apply to every row — matching\n * runs on client signals that may be absent or expired, within that window.\n * `GET /analytics/exclusions`\n */\n async listExclusions(): Promise<AnalyticsExclusionsResponse> {\n return this.request('GET', '/analytics/exclusions');\n }\n\n /**\n * Write a new exclusion. A shop-scoped user must name their own shop in\n * `profile_id`; omitting it applies the rule to every shop of the merchant.\n * Omitting `surfaces` means **all five**, not none.\n * `POST /analytics/exclusions`\n */\n async createExclusion(rule: AnalyticsExclusionRequest): Promise<AnalyticsExclusionResponse> {\n return this.request('POST', '/analytics/exclusions', { body: rule });\n }\n\n /**\n * Replace a stored exclusion **completely**. This is not a patch: every\n * field you leave out reverts to its default rather than keeping its stored\n * value, so send the whole rule — including an explicit `null` for a\n * `profile_id`, `value`, `valid_from`, `valid_until` or `note` you mean to\n * clear, and the full `surfaces` list you mean to keep.\n * `PUT /analytics/exclusions/{id}`\n */\n async updateExclusion(\n id: string,\n rule: AnalyticsExclusionRequest,\n options?: RequestExtras,\n ): Promise<AnalyticsExclusionResponse> {\n return this.request('PUT', `/analytics/exclusions/${encodeURIComponent(id)}`, {\n body: rule,\n ...options,\n });\n }\n\n /**\n * Delete a stored exclusion. Returns the rule as it was, so a caller can\n * say what it removed. `DELETE /analytics/exclusions/{id}`\n */\n async deleteExclusion(id: string): Promise<AnalyticsExclusionResponse> {\n return this.request('DELETE', `/analytics/exclusions/${encodeURIComponent(id)}`);\n }\n\n /** Global search. `POST /analytics/search` */\n async search(params: Record<string, unknown>): Promise<Record<string, unknown>> {\n return this.request('POST', '/analytics/search', { body: params });\n }\n\n /** Domain-specific search. `POST /analytics/search/{domain}` */\n async searchDomain(\n domain: string,\n params: Record<string, unknown>,\n ): Promise<Record<string, unknown>> {\n return this.request('POST', `/analytics/search/${encodeURIComponent(domain)}`, {\n body: params,\n });\n }\n\n /** Get analytics info. `GET /analytics/{domain}/info` */\n async getInfo(domain: string): Promise<Record<string, unknown>> {\n return this.request('GET', `/analytics/${encodeURIComponent(domain)}/info`);\n }\n\n /** Get API event logs. `GET /analytics/api-event-logs` */\n async apiEventLogs(\n params?: Record<string, string | number | undefined>,\n ): Promise<Record<string, unknown>> {\n return this.request('GET', '/analytics/api-event-logs', { query: params });\n }\n\n /** Get SDK event logs. `POST /analytics/sdk-event-logs` */\n async sdkEventLogs(params: Record<string, unknown>): Promise<Record<string, unknown>> {\n return this.request('POST', '/analytics/sdk-event-logs', { body: params });\n }\n\n /** Get connector event logs. `GET /analytics/connector-event-logs` */\n async connectorEventLogs(\n params?: Record<string, string | number | undefined>,\n ): Promise<Record<string, unknown>> {\n return this.request('GET', '/analytics/connector-event-logs', { query: params });\n }\n\n /**\n * Get routing event logs. `GET /analytics/routing-event-logs`\n *\n * @deprecated The service answers this only from a ClickHouse analytics\n * store; with SQL analytics, the default configuration, it answers an\n * error. To learn why a payment used a connector, read\n * `payments.routingDecisions(paymentId)`,\n * the routing decision recorded behind each attempt. This method stays for\n * compatibility and still sends the same request.\n */\n async routingEventLogs(\n params?: Record<string, string | number | undefined>,\n ): Promise<Record<string, unknown>> {\n return this.request('GET', '/analytics/routing-event-logs', { query: params });\n }\n\n /** Get outgoing webhook event logs. `GET /analytics/outgoing-webhook-event-logs` */\n async outgoingWebhookEventLogs(\n params?: Record<string, string | number | undefined>,\n ): Promise<Record<string, unknown>> {\n return this.request('GET', '/analytics/outgoing-webhook-event-logs', { query: params });\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["/tmp/sdk-pub-0459/dist/chunk-HLKFUOAQ.cjs","../src/internal/resources/configs.ts"],"names":[],"mappings":"AAAA;ACEO,IAAM,QAAA,EAAN,MAAc;AAAA,EACnB,WAAA,CAA6B,OAAA,EAAoB;AAApB,IAAA,IAAA,CAAA,QAAA,EAAA,OAAA;AAAA,EAAqB;AAAA;AAAA,EAGlD,MAAM,MAAA,CAAO,MAAA,EAAmE;AAC9E,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,MAAA,EAAQ,UAAA,EAAY,EAAE,IAAA,EAAM,OAAO,CAAC,CAAA;AAAA,EAC1D;AAAA;AAAA,EAGA,MAAM,QAAA,CAAS,GAAA,EAA+C;AAC5D,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,KAAA,EAAO,CAAA,SAAA,EAAY,kBAAA,CAAmB,GAAG,CAAC,CAAA,CAAA;AAChE,EAAA;AAAA;AAG6F,EAAA;AAC7B,IAAA;AAChE,EAAA;AAAA;AAG4D,EAAA;AACG,IAAA;AAC/D,EAAA;AACF;ADFmE;AACA;AACA;AACA","file":"/tmp/sdk-pub-0459/dist/chunk-HLKFUOAQ.cjs","sourcesContent":[null,"import type { RequestFn } from '../../client';\n\nexport class Configs {\n constructor(private readonly request: RequestFn) {}\n\n /** Create a config. `POST /configs` */\n async create(params: Record<string, unknown>): Promise<Record<string, unknown>> {\n return this.request('POST', '/configs', { body: params });\n }\n\n /** Retrieve a config by key. `GET /configs/{key}` */\n async retrieve(key: string): Promise<Record<string, unknown>> {\n return this.request('GET', `/configs/${encodeURIComponent(key)}`);\n }\n\n /** Update a config. `PUT /configs/{key}` */\n async update(key: string, params: Record<string, unknown>): Promise<Record<string, unknown>> {\n return this.request('PUT', `/configs/${encodeURIComponent(key)}`, { body: params });\n }\n\n /** Delete a config. `DELETE /configs/{key}` */\n async delete(key: string): Promise<Record<string, unknown>> {\n return this.request('DELETE', `/configs/${encodeURIComponent(key)}`);\n }\n}\n"]}
1
+ {"version":3,"sources":["/tmp/delopay-sdk-publish/dist/chunk-HLKFUOAQ.cjs","../src/internal/resources/configs.ts"],"names":[],"mappings":"AAAA;ACEO,IAAM,QAAA,EAAN,MAAc;AAAA,EACnB,WAAA,CAA6B,OAAA,EAAoB;AAApB,IAAA,IAAA,CAAA,QAAA,EAAA,OAAA;AAAA,EAAqB;AAAA;AAAA,EAGlD,MAAM,MAAA,CAAO,MAAA,EAAmE;AAC9E,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,MAAA,EAAQ,UAAA,EAAY,EAAE,IAAA,EAAM,OAAO,CAAC,CAAA;AAAA,EAC1D;AAAA;AAAA,EAGA,MAAM,QAAA,CAAS,GAAA,EAA+C;AAC5D,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,KAAA,EAAO,CAAA,SAAA,EAAY,kBAAA,CAAmB,GAAG,CAAC,CAAA,CAAA;AAChE,EAAA;AAAA;AAG6F,EAAA;AAC7B,IAAA;AAChE,EAAA;AAAA;AAG4D,EAAA;AACG,IAAA;AAC/D,EAAA;AACF;ADFmE;AACA;AACA;AACA","file":"/tmp/delopay-sdk-publish/dist/chunk-HLKFUOAQ.cjs","sourcesContent":[null,"import type { RequestFn } from '../../client';\n\nexport class Configs {\n constructor(private readonly request: RequestFn) {}\n\n /** Create a config. `POST /configs` */\n async create(params: Record<string, unknown>): Promise<Record<string, unknown>> {\n return this.request('POST', '/configs', { body: params });\n }\n\n /** Retrieve a config by key. `GET /configs/{key}` */\n async retrieve(key: string): Promise<Record<string, unknown>> {\n return this.request('GET', `/configs/${encodeURIComponent(key)}`);\n }\n\n /** Update a config. `PUT /configs/{key}` */\n async update(key: string, params: Record<string, unknown>): Promise<Record<string, unknown>> {\n return this.request('PUT', `/configs/${encodeURIComponent(key)}`, { body: params });\n }\n\n /** Delete a config. `DELETE /configs/{key}` */\n async delete(key: string): Promise<Record<string, unknown>> {\n return this.request('DELETE', `/configs/${encodeURIComponent(key)}`);\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["/tmp/sdk-pub-0459/dist/chunk-HLYGHP6F.cjs","../src/internal/resources/platformFees.ts"],"names":[],"mappings":"AAAA;ACoBO,IAAM,aAAA,EAAN,MAAmB;AAAA,EAIxB,WAAA,CAA6B,OAAA,EAAoB;AAApB,IAAA,IAAA,CAAA,QAAA,EAAA,OAAA;AAC3B,IAAA,IAAA,CAAK,MAAA,EAAQ,IAAI,uBAAA,CAAwB,OAAO,CAAA;AAAA,EAClD;AAAA;AAAA,EAGA,MAAM,MAAA,CAAO,MAAA,EAAkC,UAAA,EAAkD;AAC/F,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,MAAA,EAAQ,aAAA,EAAe;AAAA,MACzC,IAAA,EAAM,MAAA;AAAA,MACN,KAAA,EAAO,EAAE,WAAA,EAAa,WAAW;AAAA,IACnC,CAAC,CAAA;AAAA,EACH;AAAA;AAAA,EAGA,MAAM,IAAA,CAAK,UAAA,EAAoD;AAC7D,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,KAAA,EAAO,kBAAA,EAAoB;AAAA,MAC7C,KAAA,EAAO,EAAE,WAAA,EAAa,WAAW;AAAA,IACnC,CAAC,CAAA;AAAA,EACH;AAAA;AAAA,EAGA,MAAM,QAAA,CAAS,KAAA,EAA6C;AAC1D,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,KAAA,EAAO,CAAA,YAAA,EAAe,kBAAA,CAAmB,KAAK,CAAC,CAAA,CAAA;AACrE,EAAA;AAAA;AAG4F,EAAA;AACvB,IAAA;AACrE,EAAA;AAAA;AAG0D,EAAA;AACQ,IAAA;AAClE,EAAA;AACF;AASqC;AACc,EAAA;AAApB,IAAA;AAAqB,EAAA;AAAA;AAG+C,EAAA;AACvB,IAAA;AACxB,IAAA;AAC9C,MAAA;AACiC,MAAA;AAClC,IAAA;AACH,EAAA;AAAA;AAAA;AAAA;AAAA;AAMgG,EAAA;AAC9C,IAAA;AACU,MAAA;AACzD,IAAA;AACH,EAAA;AAAA;AAAA;AAAA;AAAA;AAMoE,EAAA;AAChB,IAAA;AACQ,MAAA;AACzD,IAAA;AACH,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOiG,EAAA;AACtC,IAAA;AACjD,MAAA;AAC2B,MAAA;AAClC,IAAA;AACH,EAAA;AACF;ADnCwE;AACA;AACA;AACA;AACA","file":"/tmp/sdk-pub-0459/dist/chunk-HLYGHP6F.cjs","sourcesContent":[null,"import type {\n FeeRulePreviewRequest,\n FeeRulePreviewResponse,\n FeeScheduleCreateRequest,\n FeeScheduleResponse,\n FeeScheduleUpdateRequest,\n PlatformFeeRuleInput,\n PlatformFeeRuleResponse,\n PlatformFeeRuleRequest,\n} from '../../types';\nimport type { RequestFn } from '../../client';\n\n/**\n * Platform-wide fee schedule management. Admin-only routes under\n * `/admin/fees/*`. Exposed only via `'@delopay/sdk/internal'`.\n *\n * `platformFees.rules` manages the platform-owned Euclid fee-rule program per\n * merchant, which takes precedence over the flat platform schedules. Build the\n * program with `feeProgram()`.\n */\nexport class PlatformFees {\n /** Platform-owned Euclid fee-rule program (`/admin/fees/rules`). */\n readonly rules: PlatformFeeRulesManager;\n\n constructor(private readonly request: RequestFn) {\n this.rules = new PlatformFeeRulesManager(request);\n }\n\n /** Create a platform fee schedule for a specific merchant. */\n async create(params: FeeScheduleCreateRequest, merchantId: string): Promise<FeeScheduleResponse> {\n return this.request('POST', '/admin/fees', {\n body: params,\n query: { merchant_id: merchantId },\n });\n }\n\n /** List every platform fee schedule assigned to a merchant. */\n async list(merchantId: string): Promise<FeeScheduleResponse[]> {\n return this.request('GET', '/admin/fees/list', {\n query: { merchant_id: merchantId },\n });\n }\n\n /** Retrieve a single platform fee schedule by ID. */\n async retrieve(feeId: string): Promise<FeeScheduleResponse> {\n return this.request('GET', `/admin/fees/${encodeURIComponent(feeId)}`);\n }\n\n /** Update a platform fee schedule. */\n async update(feeId: string, params: FeeScheduleUpdateRequest): Promise<FeeScheduleResponse> {\n return this.request('PUT', `/admin/fees/${encodeURIComponent(feeId)}`, { body: params });\n }\n\n /** Delete a platform fee schedule. */\n async delete(feeId: string): Promise<FeeScheduleResponse> {\n return this.request('DELETE', `/admin/fees/${encodeURIComponent(feeId)}`);\n }\n}\n\n/**\n * Manages a merchant's platform-owned Euclid fee-rule programs (admin surface),\n * merchant-wide or per-shop (one active program per scope; a shop-scoped\n * program wins for its shop, else the merchant-wide one applies). Build the\n * `algorithm` with `feeProgram()`. The SDK injects `fee_owner: 'platform'`; set\n * `profile_id` on the input to scope a program to a shop.\n */\nexport class PlatformFeeRulesManager {\n constructor(private readonly request: RequestFn) {}\n\n /** Create or replace the platform fee-rule program for a merchant. */\n async upsert(params: PlatformFeeRuleInput, merchantId: string): Promise<PlatformFeeRuleResponse> {\n const body: PlatformFeeRuleRequest = { ...params, fee_owner: 'platform' };\n return this.request('PUT', '/admin/fees/rules', {\n body,\n query: { merchant_id: merchantId },\n });\n }\n\n /**\n * Retrieve the active platform fee-rule program for a scope, or `null`.\n * `profileId` omitted = merchant-wide program; set = that shop's program.\n */\n async retrieve(merchantId: string, profileId?: string): Promise<PlatformFeeRuleResponse | null> {\n return this.request('GET', '/admin/fees/rules', {\n query: { merchant_id: merchantId, profile_id: profileId },\n });\n }\n\n /**\n * Deactivate a platform fee-rule program. Idempotent. `profileId` omitted\n * targets the merchant-wide program; set targets only that shop's program.\n */\n async delete(merchantId: string, profileId?: string): Promise<void> {\n await this.request('DELETE', '/admin/fees/rules', {\n query: { merchant_id: merchantId, profile_id: profileId },\n });\n }\n\n /**\n * Dry-run a candidate fee-rule program against a sample transaction.\n * Returns the matched rule name, whether it fell through, and the computed fee.\n * Does not persist anything.\n */\n async preview(input: FeeRulePreviewRequest, merchantId: string): Promise<FeeRulePreviewResponse> {\n return this.request('POST', '/admin/fees/rules/preview', {\n body: input,\n query: { merchant_id: merchantId },\n });\n }\n}\n"]}
1
+ {"version":3,"sources":["/tmp/delopay-sdk-publish/dist/chunk-HLYGHP6F.cjs","../src/internal/resources/platformFees.ts"],"names":[],"mappings":"AAAA;ACoBO,IAAM,aAAA,EAAN,MAAmB;AAAA,EAIxB,WAAA,CAA6B,OAAA,EAAoB;AAApB,IAAA,IAAA,CAAA,QAAA,EAAA,OAAA;AAC3B,IAAA,IAAA,CAAK,MAAA,EAAQ,IAAI,uBAAA,CAAwB,OAAO,CAAA;AAAA,EAClD;AAAA;AAAA,EAGA,MAAM,MAAA,CAAO,MAAA,EAAkC,UAAA,EAAkD;AAC/F,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,MAAA,EAAQ,aAAA,EAAe;AAAA,MACzC,IAAA,EAAM,MAAA;AAAA,MACN,KAAA,EAAO,EAAE,WAAA,EAAa,WAAW;AAAA,IACnC,CAAC,CAAA;AAAA,EACH;AAAA;AAAA,EAGA,MAAM,IAAA,CAAK,UAAA,EAAoD;AAC7D,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,KAAA,EAAO,kBAAA,EAAoB;AAAA,MAC7C,KAAA,EAAO,EAAE,WAAA,EAAa,WAAW;AAAA,IACnC,CAAC,CAAA;AAAA,EACH;AAAA;AAAA,EAGA,MAAM,QAAA,CAAS,KAAA,EAA6C;AAC1D,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,KAAA,EAAO,CAAA,YAAA,EAAe,kBAAA,CAAmB,KAAK,CAAC,CAAA,CAAA;AACrE,EAAA;AAAA;AAG4F,EAAA;AACvB,IAAA;AACrE,EAAA;AAAA;AAG0D,EAAA;AACQ,IAAA;AAClE,EAAA;AACF;AASqC;AACc,EAAA;AAApB,IAAA;AAAqB,EAAA;AAAA;AAG+C,EAAA;AACvB,IAAA;AACxB,IAAA;AAC9C,MAAA;AACiC,MAAA;AAClC,IAAA;AACH,EAAA;AAAA;AAAA;AAAA;AAAA;AAMgG,EAAA;AAC9C,IAAA;AACU,MAAA;AACzD,IAAA;AACH,EAAA;AAAA;AAAA;AAAA;AAAA;AAMoE,EAAA;AAChB,IAAA;AACQ,MAAA;AACzD,IAAA;AACH,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOiG,EAAA;AACtC,IAAA;AACjD,MAAA;AAC2B,MAAA;AAClC,IAAA;AACH,EAAA;AACF;ADnCwE;AACA;AACA;AACA;AACA","file":"/tmp/delopay-sdk-publish/dist/chunk-HLYGHP6F.cjs","sourcesContent":[null,"import type {\n FeeRulePreviewRequest,\n FeeRulePreviewResponse,\n FeeScheduleCreateRequest,\n FeeScheduleResponse,\n FeeScheduleUpdateRequest,\n PlatformFeeRuleInput,\n PlatformFeeRuleResponse,\n PlatformFeeRuleRequest,\n} from '../../types';\nimport type { RequestFn } from '../../client';\n\n/**\n * Platform-wide fee schedule management. Admin-only routes under\n * `/admin/fees/*`. Exposed only via `'@delopay/sdk/internal'`.\n *\n * `platformFees.rules` manages the platform-owned Euclid fee-rule program per\n * merchant, which takes precedence over the flat platform schedules. Build the\n * program with `feeProgram()`.\n */\nexport class PlatformFees {\n /** Platform-owned Euclid fee-rule program (`/admin/fees/rules`). */\n readonly rules: PlatformFeeRulesManager;\n\n constructor(private readonly request: RequestFn) {\n this.rules = new PlatformFeeRulesManager(request);\n }\n\n /** Create a platform fee schedule for a specific merchant. */\n async create(params: FeeScheduleCreateRequest, merchantId: string): Promise<FeeScheduleResponse> {\n return this.request('POST', '/admin/fees', {\n body: params,\n query: { merchant_id: merchantId },\n });\n }\n\n /** List every platform fee schedule assigned to a merchant. */\n async list(merchantId: string): Promise<FeeScheduleResponse[]> {\n return this.request('GET', '/admin/fees/list', {\n query: { merchant_id: merchantId },\n });\n }\n\n /** Retrieve a single platform fee schedule by ID. */\n async retrieve(feeId: string): Promise<FeeScheduleResponse> {\n return this.request('GET', `/admin/fees/${encodeURIComponent(feeId)}`);\n }\n\n /** Update a platform fee schedule. */\n async update(feeId: string, params: FeeScheduleUpdateRequest): Promise<FeeScheduleResponse> {\n return this.request('PUT', `/admin/fees/${encodeURIComponent(feeId)}`, { body: params });\n }\n\n /** Delete a platform fee schedule. */\n async delete(feeId: string): Promise<FeeScheduleResponse> {\n return this.request('DELETE', `/admin/fees/${encodeURIComponent(feeId)}`);\n }\n}\n\n/**\n * Manages a merchant's platform-owned Euclid fee-rule programs (admin surface),\n * merchant-wide or per-shop (one active program per scope; a shop-scoped\n * program wins for its shop, else the merchant-wide one applies). Build the\n * `algorithm` with `feeProgram()`. The SDK injects `fee_owner: 'platform'`; set\n * `profile_id` on the input to scope a program to a shop.\n */\nexport class PlatformFeeRulesManager {\n constructor(private readonly request: RequestFn) {}\n\n /** Create or replace the platform fee-rule program for a merchant. */\n async upsert(params: PlatformFeeRuleInput, merchantId: string): Promise<PlatformFeeRuleResponse> {\n const body: PlatformFeeRuleRequest = { ...params, fee_owner: 'platform' };\n return this.request('PUT', '/admin/fees/rules', {\n body,\n query: { merchant_id: merchantId },\n });\n }\n\n /**\n * Retrieve the active platform fee-rule program for a scope, or `null`.\n * `profileId` omitted = merchant-wide program; set = that shop's program.\n */\n async retrieve(merchantId: string, profileId?: string): Promise<PlatformFeeRuleResponse | null> {\n return this.request('GET', '/admin/fees/rules', {\n query: { merchant_id: merchantId, profile_id: profileId },\n });\n }\n\n /**\n * Deactivate a platform fee-rule program. Idempotent. `profileId` omitted\n * targets the merchant-wide program; set targets only that shop's program.\n */\n async delete(merchantId: string, profileId?: string): Promise<void> {\n await this.request('DELETE', '/admin/fees/rules', {\n query: { merchant_id: merchantId, profile_id: profileId },\n });\n }\n\n /**\n * Dry-run a candidate fee-rule program against a sample transaction.\n * Returns the matched rule name, whether it fell through, and the computed fee.\n * Does not persist anything.\n */\n async preview(input: FeeRulePreviewRequest, merchantId: string): Promise<FeeRulePreviewResponse> {\n return this.request('POST', '/admin/fees/rules/preview', {\n body: input,\n query: { merchant_id: merchantId },\n });\n }\n}\n"]}