@delopay/sdk 0.480.0 → 0.482.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 (362) 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-OMQJTXFL.cjs → chunk-2OVTWQ3B.cjs} +14 -4
  10. package/dist/chunk-2OVTWQ3B.cjs.map +1 -0
  11. package/dist/{chunk-EGQKVHQB.js → chunk-2W55GSRP.js} +2 -2
  12. package/dist/chunk-2W55GSRP.js.map +1 -0
  13. package/dist/chunk-34PC72O7.cjs.map +1 -1
  14. package/dist/chunk-3GBWQWTP.cjs.map +1 -1
  15. package/dist/chunk-3YBBJT3Y.cjs.map +1 -1
  16. package/dist/chunk-44QBWVRS.cjs.map +1 -1
  17. package/dist/chunk-4EKAWNYI.cjs.map +1 -1
  18. package/dist/chunk-4LN4BR2T.cjs.map +1 -1
  19. package/dist/chunk-4T4XHPYN.cjs.map +1 -1
  20. package/dist/chunk-5CITBN33.cjs.map +1 -1
  21. package/dist/chunk-5HCKC4HF.cjs.map +1 -1
  22. package/dist/{chunk-LZUHCGJ3.js → chunk-5LSXCHJU.js} +5 -2
  23. package/dist/chunk-5LSXCHJU.js.map +1 -0
  24. package/dist/chunk-5O2JSQYA.cjs.map +1 -1
  25. package/dist/chunk-5QS67SBO.cjs.map +1 -1
  26. package/dist/chunk-6BFZS4YP.cjs.map +1 -1
  27. package/dist/chunk-6EBY2KKL.cjs.map +1 -1
  28. package/dist/{chunk-W3XWB7NX.cjs → chunk-6EOKEO6F.cjs} +15 -15
  29. package/dist/chunk-6EOKEO6F.cjs.map +1 -0
  30. package/dist/chunk-6LFOM6HV.cjs.map +1 -1
  31. package/dist/chunk-6LOWE2YI.cjs.map +1 -1
  32. package/dist/chunk-6LSG5Z4T.cjs.map +1 -1
  33. package/dist/chunk-6SU2MTN2.cjs.map +1 -1
  34. package/dist/chunk-6YCDLSIU.cjs.map +1 -1
  35. package/dist/chunk-75E5WNJG.cjs.map +1 -1
  36. package/dist/chunk-7JV6VVO7.cjs.map +1 -1
  37. package/dist/{chunk-WEH3UPJF.cjs → chunk-7NKJD5ST.cjs} +1 -1
  38. package/dist/chunk-7NKJD5ST.cjs.map +1 -0
  39. package/dist/chunk-7QZCUXWB.cjs.map +1 -1
  40. package/dist/chunk-7VXF5D67.cjs.map +1 -1
  41. package/dist/chunk-ABWAYMN5.cjs.map +1 -1
  42. package/dist/chunk-ACZ2R47X.cjs.map +1 -1
  43. package/dist/chunk-AYUYJO3I.cjs.map +1 -1
  44. package/dist/chunk-BCA3TCGS.cjs.map +1 -1
  45. package/dist/chunk-BP6KDQ6I.cjs.map +1 -1
  46. package/dist/chunk-BRY3W7N3.cjs.map +1 -1
  47. package/dist/{chunk-RSVLVW4L.cjs → chunk-BT3UAUEV.cjs} +2 -2
  48. package/dist/chunk-BT3UAUEV.cjs.map +1 -0
  49. package/dist/chunk-CAMALM35.cjs.map +1 -1
  50. package/dist/chunk-CCN44NZJ.cjs.map +1 -1
  51. package/dist/{chunk-EZ3ZESBX.js → chunk-CQ5WZMCN.js} +14 -4
  52. package/dist/chunk-CQ5WZMCN.js.map +1 -0
  53. package/dist/chunk-CR3JBTP3.cjs.map +1 -1
  54. package/dist/chunk-CYH4HZ4Y.cjs.map +1 -1
  55. package/dist/{chunk-2I66YLFQ.js → chunk-DDXERBGG.js} +6 -2
  56. package/dist/chunk-DDXERBGG.js.map +1 -0
  57. package/dist/chunk-DJASVBOJ.cjs.map +1 -1
  58. package/dist/chunk-EEB2HDYL.cjs.map +1 -1
  59. package/dist/chunk-ENPSUWTS.cjs.map +1 -1
  60. package/dist/chunk-EQ6P6ZND.cjs.map +1 -1
  61. package/dist/chunk-EXPWQBI3.cjs.map +1 -1
  62. package/dist/{chunk-KOB6MOAV.cjs → chunk-EYHSXJMJ.cjs} +9 -3
  63. package/dist/chunk-EYHSXJMJ.cjs.map +1 -0
  64. package/dist/chunk-F3I5DOWV.cjs.map +1 -1
  65. package/dist/chunk-F46K5H3U.cjs.map +1 -1
  66. package/dist/chunk-F6S3WCCB.cjs.map +1 -1
  67. package/dist/chunk-FQRC4NJG.cjs.map +1 -1
  68. package/dist/chunk-FTWGI7UZ.cjs.map +1 -1
  69. package/dist/chunk-FYISDU2Y.cjs.map +1 -1
  70. package/dist/chunk-GG52SAHA.cjs.map +1 -1
  71. package/dist/chunk-GK5FWN4H.cjs.map +1 -1
  72. package/dist/chunk-GSQN5EOO.cjs.map +1 -1
  73. package/dist/chunk-GW7IHYXR.cjs.map +1 -1
  74. package/dist/chunk-GWSVQXEY.cjs.map +1 -1
  75. package/dist/chunk-HLHML5ES.cjs.map +1 -1
  76. package/dist/chunk-HLKFUOAQ.cjs.map +1 -1
  77. package/dist/chunk-HLYGHP6F.cjs.map +1 -1
  78. package/dist/chunk-HSJABE7X.cjs.map +1 -1
  79. package/dist/{chunk-2TQA6UYY.js → chunk-HYQXNRST.js} +4 -2
  80. package/dist/chunk-HYQXNRST.js.map +1 -0
  81. package/dist/chunk-I2W7AO4B.cjs.map +1 -1
  82. package/dist/chunk-I2XGNALG.cjs.map +1 -1
  83. package/dist/{chunk-3HR3JRQD.js → chunk-IBUGYGGZ.js} +1 -1
  84. package/dist/chunk-IBUGYGGZ.js.map +1 -0
  85. package/dist/chunk-IGHAJNC6.cjs.map +1 -1
  86. package/dist/chunk-IKXGA2Z5.cjs.map +1 -1
  87. package/dist/chunk-IR2LFKKA.cjs.map +1 -1
  88. package/dist/{chunk-QSZQOCU4.js → chunk-J3NCUUG7.js} +8 -8
  89. package/dist/chunk-J4ZB7MU4.cjs.map +1 -1
  90. package/dist/{chunk-KSJ7JLR3.cjs → chunk-J5RPSRBQ.cjs} +10 -8
  91. package/dist/chunk-J5RPSRBQ.cjs.map +1 -0
  92. package/dist/chunk-JPPRDMTJ.cjs.map +1 -1
  93. package/dist/chunk-K5Q2H3VD.cjs.map +1 -1
  94. package/dist/{chunk-MH3DDSRV.js → chunk-K5WRCYXA.js} +8 -2
  95. package/dist/chunk-K5WRCYXA.js.map +1 -0
  96. package/dist/chunk-KD5Y2YWK.cjs.map +1 -1
  97. package/dist/chunk-KJDMNF2T.cjs.map +1 -1
  98. package/dist/chunk-KLONGJCL.cjs.map +1 -1
  99. package/dist/{chunk-CCBZYJUZ.js → chunk-KRP467VJ.js} +2 -2
  100. package/dist/chunk-LJ2EG6JK.cjs.map +1 -1
  101. package/dist/chunk-LLYY4TCZ.cjs.map +1 -1
  102. package/dist/chunk-LYIBTVK6.cjs.map +1 -1
  103. package/dist/chunk-M3HWE7KT.cjs.map +1 -1
  104. package/dist/chunk-M3SJHFT4.cjs.map +1 -1
  105. package/dist/chunk-MCNDMK7F.cjs.map +1 -1
  106. package/dist/chunk-MLG6NXI6.cjs.map +1 -1
  107. package/dist/{chunk-P6JLNQ6L.cjs → chunk-MYAXAWBQ.cjs} +5 -2
  108. package/dist/chunk-MYAXAWBQ.cjs.map +1 -0
  109. package/dist/chunk-NFB3S2E6.cjs.map +1 -1
  110. package/dist/chunk-NYL3BNHR.cjs.map +1 -1
  111. package/dist/chunk-O4AYHLQX.cjs.map +1 -1
  112. package/dist/chunk-OAEKP665.cjs.map +1 -1
  113. package/dist/chunk-ODPNVNYE.cjs.map +1 -1
  114. package/dist/chunk-OG2KJAYD.cjs.map +1 -1
  115. package/dist/chunk-OYZP6NF6.cjs.map +1 -1
  116. package/dist/chunk-P4UILJVU.cjs.map +1 -1
  117. package/dist/chunk-P7DYLUUI.cjs.map +1 -1
  118. package/dist/chunk-PKAE6AQT.cjs.map +1 -1
  119. package/dist/{chunk-CYDHHARQ.cjs → chunk-PYNHK6AP.cjs} +7 -3
  120. package/dist/chunk-PYNHK6AP.cjs.map +1 -0
  121. package/dist/chunk-Q7M7DO7M.cjs.map +1 -1
  122. package/dist/chunk-QKUWFMZP.cjs.map +1 -1
  123. package/dist/chunk-QRSA72B3.cjs.map +1 -1
  124. package/dist/chunk-QYNRNDIY.cjs.map +1 -1
  125. package/dist/chunk-R4GA6BVP.cjs.map +1 -1
  126. package/dist/{chunk-WBAPQODS.js → chunk-R4TZEQ33.js} +5 -2
  127. package/dist/{chunk-WBAPQODS.js.map → chunk-R4TZEQ33.js.map} +1 -1
  128. package/dist/chunk-R5VYSZ3Q.cjs.map +1 -1
  129. package/dist/chunk-RHFUXHQN.cjs.map +1 -1
  130. package/dist/chunk-RI42IDRR.cjs.map +1 -1
  131. package/dist/chunk-S77LQWYC.cjs.map +1 -1
  132. package/dist/chunk-S7SBNOGS.cjs.map +1 -1
  133. package/dist/chunk-TMAJE5P2.cjs.map +1 -1
  134. package/dist/chunk-TNIJ6OSH.cjs.map +1 -1
  135. package/dist/chunk-U3JK7NBG.cjs.map +1 -1
  136. package/dist/chunk-UGSM7RJ2.cjs.map +1 -1
  137. package/dist/chunk-UKLZAOLW.cjs.map +1 -1
  138. package/dist/chunk-V47G7P6L.cjs.map +1 -1
  139. package/dist/chunk-VH5A6SMU.cjs.map +1 -1
  140. package/dist/chunk-VHMH4QMY.cjs.map +1 -1
  141. package/dist/chunk-VYC7WUM5.cjs.map +1 -1
  142. package/dist/chunk-VZ3BSIVU.cjs.map +1 -1
  143. package/dist/chunk-W457XUA6.cjs.map +1 -1
  144. package/dist/chunk-WHDI3TMP.cjs.map +1 -1
  145. package/dist/chunk-WITCPKNL.cjs.map +1 -1
  146. package/dist/chunk-WX6NP7UU.cjs.map +1 -1
  147. package/dist/chunk-XQLRIBVR.cjs.map +1 -1
  148. package/dist/{chunk-K6LAE4NS.cjs → chunk-Y6LKUYGJ.cjs} +3 -3
  149. package/dist/chunk-Y6LKUYGJ.cjs.map +1 -0
  150. package/dist/chunk-Y7LSSRNJ.cjs.map +1 -1
  151. package/dist/chunk-YK3P5QNZ.cjs.map +1 -1
  152. package/dist/{chunk-OWP7XBY2.cjs → chunk-YW4DVKNT.cjs} +5 -2
  153. package/dist/chunk-YW4DVKNT.cjs.map +1 -0
  154. package/dist/chunk-ZKPVUCQV.cjs.map +1 -1
  155. package/dist/chunk-ZUULK36E.cjs.map +1 -1
  156. package/dist/client.cjs +2 -2
  157. package/dist/client.cjs.map +1 -1
  158. package/dist/client.js +1 -1
  159. package/dist/core.cjs.map +1 -1
  160. package/dist/currencies.cjs.map +1 -1
  161. package/dist/enigmaCardForm.cjs.map +1 -1
  162. package/dist/error.cjs.map +1 -1
  163. package/dist/eventStream.cjs.map +1 -1
  164. package/dist/exportDownload.cjs.map +1 -1
  165. package/dist/feeProgram.cjs.map +1 -1
  166. package/dist/index.cjs +10 -10
  167. package/dist/index.cjs.map +1 -1
  168. package/dist/index.js +9 -9
  169. package/dist/internal/resources/admin.cjs.map +1 -1
  170. package/dist/internal/resources/admin.d.cts +1 -1
  171. package/dist/internal/resources/admin.d.ts +1 -1
  172. package/dist/internal/resources/adminBranding.cjs.map +1 -1
  173. package/dist/internal/resources/adminBranding.d.cts +1 -1
  174. package/dist/internal/resources/adminBranding.d.ts +1 -1
  175. package/dist/internal/resources/adminCheckoutDomains.cjs.map +1 -1
  176. package/dist/internal/resources/adminCheckoutDomains.d.cts +1 -1
  177. package/dist/internal/resources/adminCheckoutDomains.d.ts +1 -1
  178. package/dist/internal/resources/adminFeePlans.cjs.map +1 -1
  179. package/dist/internal/resources/adminFeePlans.d.cts +1 -1
  180. package/dist/internal/resources/adminFeePlans.d.ts +1 -1
  181. package/dist/internal/resources/adminFileScans.cjs.map +1 -1
  182. package/dist/internal/resources/adminFileScans.d.cts +1 -1
  183. package/dist/internal/resources/adminFileScans.d.ts +1 -1
  184. package/dist/internal/resources/adminIndustries.cjs.map +1 -1
  185. package/dist/internal/resources/adminIndustries.d.cts +1 -1
  186. package/dist/internal/resources/adminIndustries.d.ts +1 -1
  187. package/dist/internal/resources/adminLive.cjs.map +1 -1
  188. package/dist/internal/resources/adminNotices.cjs.map +1 -1
  189. package/dist/internal/resources/adminNotices.d.cts +1 -1
  190. package/dist/internal/resources/adminNotices.d.ts +1 -1
  191. package/dist/internal/resources/adminPortal.cjs +2 -2
  192. package/dist/internal/resources/adminPortal.cjs.map +1 -1
  193. package/dist/internal/resources/adminPortal.d.cts +1 -1
  194. package/dist/internal/resources/adminPortal.d.ts +1 -1
  195. package/dist/internal/resources/adminPortal.js +1 -1
  196. package/dist/internal/resources/adminPricing.cjs.map +1 -1
  197. package/dist/internal/resources/adminPricing.d.cts +1 -1
  198. package/dist/internal/resources/adminPricing.d.ts +1 -1
  199. package/dist/internal/resources/adminSupport.cjs.map +1 -1
  200. package/dist/internal/resources/adminSupport.d.cts +1 -1
  201. package/dist/internal/resources/adminSupport.d.ts +1 -1
  202. package/dist/internal/resources/auditLogs.cjs.map +1 -1
  203. package/dist/internal/resources/auditLogs.d.cts +1 -1
  204. package/dist/internal/resources/auditLogs.d.ts +1 -1
  205. package/dist/internal/resources/cache.cjs.map +1 -1
  206. package/dist/internal/resources/cardIssuers.cjs.map +1 -1
  207. package/dist/internal/resources/cardIssuers.d.cts +1 -1
  208. package/dist/internal/resources/cardIssuers.d.ts +1 -1
  209. package/dist/internal/resources/configs.cjs.map +1 -1
  210. package/dist/internal/resources/connectorRestrictionRules.cjs.map +1 -1
  211. package/dist/internal/resources/connectorRestrictionRules.d.cts +1 -1
  212. package/dist/internal/resources/connectorRestrictionRules.d.ts +1 -1
  213. package/dist/internal/resources/connectorRestrictions.cjs.map +1 -1
  214. package/dist/internal/resources/connectorRestrictions.d.cts +1 -1
  215. package/dist/internal/resources/connectorRestrictions.d.ts +1 -1
  216. package/dist/internal/resources/diagnostic.cjs.map +1 -1
  217. package/dist/internal/resources/diagnostic.d.cts +1 -1
  218. package/dist/internal/resources/diagnostic.d.ts +1 -1
  219. package/dist/internal/resources/gsm.cjs.map +1 -1
  220. package/dist/internal/resources/gsm.d.cts +1 -1
  221. package/dist/internal/resources/gsm.d.ts +1 -1
  222. package/dist/internal/resources/nativeRenewals.cjs.map +1 -1
  223. package/dist/internal/resources/nativeRenewals.d.cts +1 -1
  224. package/dist/internal/resources/nativeRenewals.d.ts +1 -1
  225. package/dist/internal/resources/platformBilling.cjs.map +1 -1
  226. package/dist/internal/resources/platformBilling.d.cts +1 -1
  227. package/dist/internal/resources/platformBilling.d.ts +1 -1
  228. package/dist/internal/resources/platformFees.cjs.map +1 -1
  229. package/dist/internal/resources/platformMessageTemplates.cjs.map +1 -1
  230. package/dist/internal/resources/platformSettings.cjs.map +1 -1
  231. package/dist/internal/resources/platformSettings.d.cts +1 -1
  232. package/dist/internal/resources/platformSettings.d.ts +1 -1
  233. package/dist/internal.cjs +13 -13
  234. package/dist/internal.cjs.map +1 -1
  235. package/dist/internal.d.cts +1 -1
  236. package/dist/internal.d.ts +1 -1
  237. package/dist/internal.js +10 -10
  238. package/dist/listQuery.cjs.map +1 -1
  239. package/dist/panes.cjs.map +1 -1
  240. package/dist/paymentPresentation.cjs.map +1 -1
  241. package/dist/recordCounter.cjs.map +1 -1
  242. package/dist/resources/aiTools.cjs.map +1 -1
  243. package/dist/resources/analytics.cjs.map +1 -1
  244. package/dist/resources/analyticsDashboard.cjs.map +1 -1
  245. package/dist/resources/apiKeys.cjs.map +1 -1
  246. package/dist/resources/audit.cjs.map +1 -1
  247. package/dist/resources/authentication.cjs.map +1 -1
  248. package/dist/resources/availabilityOverrides.cjs.map +1 -1
  249. package/dist/resources/billing.cjs.map +1 -1
  250. package/dist/resources/buyerAccount.cjs.map +1 -1
  251. package/dist/resources/buyerBlocklist.cjs +2 -2
  252. package/dist/resources/buyerBlocklist.cjs.map +1 -1
  253. package/dist/resources/buyerBlocklist.js +1 -1
  254. package/dist/resources/buyerConversations.cjs.map +1 -1
  255. package/dist/resources/buyerEvidenceReviews.cjs.map +1 -1
  256. package/dist/resources/buyerPortal.cjs.map +1 -1
  257. package/dist/resources/cards.cjs.map +1 -1
  258. package/dist/resources/chargebackPrevention.cjs.map +1 -1
  259. package/dist/resources/checkoutDomains.cjs.map +1 -1
  260. package/dist/resources/checkoutMethods.cjs.map +1 -1
  261. package/dist/resources/checkoutRecovery.cjs.map +1 -1
  262. package/dist/resources/checkoutTemplates.cjs.map +1 -1
  263. package/dist/resources/connectors.cjs.map +1 -1
  264. package/dist/resources/contentEncryption.cjs.map +1 -1
  265. package/dist/resources/costRules.cjs.map +1 -1
  266. package/dist/resources/customers.cjs +2 -2
  267. package/dist/resources/customers.cjs.map +1 -1
  268. package/dist/resources/customers.js +1 -1
  269. package/dist/resources/deploymentBranding.cjs.map +1 -1
  270. package/dist/resources/disputes.cjs +2 -2
  271. package/dist/resources/disputes.cjs.map +1 -1
  272. package/dist/resources/disputes.js +1 -1
  273. package/dist/resources/ephemeralKeys.cjs.map +1 -1
  274. package/dist/resources/events.cjs.map +1 -1
  275. package/dist/resources/export.cjs +2 -2
  276. package/dist/resources/export.cjs.map +1 -1
  277. package/dist/resources/export.js +1 -1
  278. package/dist/resources/externalRecords.cjs.map +1 -1
  279. package/dist/resources/featureMatrix.cjs.map +1 -1
  280. package/dist/resources/fees.cjs.map +1 -1
  281. package/dist/resources/files.cjs.map +1 -1
  282. package/dist/resources/forex.cjs.map +1 -1
  283. package/dist/resources/identityVerifications.cjs.map +1 -1
  284. package/dist/resources/industries.cjs.map +1 -1
  285. package/dist/resources/invoiceSettings.cjs.map +1 -1
  286. package/dist/resources/invoices.cjs.map +1 -1
  287. package/dist/resources/live.cjs.map +1 -1
  288. package/dist/resources/mandates.cjs.map +1 -1
  289. package/dist/resources/merchantAccounts.cjs.map +1 -1
  290. package/dist/resources/messageTemplates.cjs.map +1 -1
  291. package/dist/resources/notices.cjs.map +1 -1
  292. package/dist/resources/operationLimits.cjs.map +1 -1
  293. package/dist/resources/paymentLinks.cjs.map +1 -1
  294. package/dist/resources/paymentMethods.cjs.map +1 -1
  295. package/dist/resources/payments.cjs.map +1 -1
  296. package/dist/resources/payoutDestinations.cjs.map +1 -1
  297. package/dist/resources/payouts.cjs.map +1 -1
  298. package/dist/resources/paypalDisputes.cjs.map +1 -1
  299. package/dist/resources/persons.cjs +2 -2
  300. package/dist/resources/persons.cjs.map +1 -1
  301. package/dist/resources/persons.js +1 -1
  302. package/dist/resources/poll.cjs.map +1 -1
  303. package/dist/resources/processorCosts.cjs.map +1 -1
  304. package/dist/resources/processorImports.cjs.map +1 -1
  305. package/dist/resources/products.cjs.map +1 -1
  306. package/dist/resources/profileAcquirers.cjs.map +1 -1
  307. package/dist/resources/profiles.cjs.map +1 -1
  308. package/dist/resources/projects.cjs.map +1 -1
  309. package/dist/resources/refunds.cjs.map +1 -1
  310. package/dist/resources/regions.cjs.map +1 -1
  311. package/dist/resources/relay.cjs.map +1 -1
  312. package/dist/resources/risk.cjs.map +1 -1
  313. package/dist/resources/routing.cjs.map +1 -1
  314. package/dist/resources/search.cjs.map +1 -1
  315. package/dist/resources/sellToRestrictions.cjs.map +1 -1
  316. package/dist/resources/settings.cjs.map +1 -1
  317. package/dist/resources/settlement.cjs.map +1 -1
  318. package/dist/resources/shareLinks.cjs +2 -2
  319. package/dist/resources/shareLinks.cjs.map +1 -1
  320. package/dist/resources/shareLinks.d.cts +1 -2
  321. package/dist/resources/shareLinks.d.ts +1 -2
  322. package/dist/resources/shareLinks.js +1 -1
  323. package/dist/resources/shopLabels.cjs.map +1 -1
  324. package/dist/resources/shopify.cjs.map +1 -1
  325. package/dist/resources/shops.cjs.map +1 -1
  326. package/dist/resources/stripeConnect.cjs.map +1 -1
  327. package/dist/resources/subscriptions.cjs +2 -2
  328. package/dist/resources/subscriptions.cjs.map +1 -1
  329. package/dist/resources/subscriptions.js +1 -1
  330. package/dist/resources/support.cjs.map +1 -1
  331. package/dist/resources/threeDsRules.cjs.map +1 -1
  332. package/dist/resources/users.cjs.map +1 -1
  333. package/dist/resources/vatRates.cjs.map +1 -1
  334. package/dist/resources/verification.cjs.map +1 -1
  335. package/dist/resources/webhooks.cjs.map +1 -1
  336. package/dist/resources/whopResolutionCases.cjs.map +1 -1
  337. package/dist/trustedOrigins.cjs.map +1 -1
  338. package/dist/{types-DgqmdNah.d.cts → types-JtFGu9hw.d.cts} +17 -2
  339. package/dist/{types-B3FAxTbG.d.ts → types-T_iCK6Xn.d.ts} +17 -2
  340. package/dist/types.cjs.map +1 -1
  341. package/dist/types.d.cts +129 -2
  342. package/dist/types.d.ts +129 -2
  343. package/package.json +17 -19
  344. package/dist/chunk-2I66YLFQ.js.map +0 -1
  345. package/dist/chunk-2TQA6UYY.js.map +0 -1
  346. package/dist/chunk-3HR3JRQD.js.map +0 -1
  347. package/dist/chunk-CYDHHARQ.cjs.map +0 -1
  348. package/dist/chunk-EGQKVHQB.js.map +0 -1
  349. package/dist/chunk-EZ3ZESBX.js.map +0 -1
  350. package/dist/chunk-K6LAE4NS.cjs.map +0 -1
  351. package/dist/chunk-KOB6MOAV.cjs.map +0 -1
  352. package/dist/chunk-KSJ7JLR3.cjs.map +0 -1
  353. package/dist/chunk-LZUHCGJ3.js.map +0 -1
  354. package/dist/chunk-MH3DDSRV.js.map +0 -1
  355. package/dist/chunk-OMQJTXFL.cjs.map +0 -1
  356. package/dist/chunk-OWP7XBY2.cjs.map +0 -1
  357. package/dist/chunk-P6JLNQ6L.cjs.map +0 -1
  358. package/dist/chunk-RSVLVW4L.cjs.map +0 -1
  359. package/dist/chunk-W3XWB7NX.cjs.map +0 -1
  360. package/dist/chunk-WEH3UPJF.cjs.map +0 -1
  361. /package/dist/{chunk-QSZQOCU4.js.map → chunk-J3NCUUG7.js.map} +0 -0
  362. /package/dist/{chunk-CCBZYJUZ.js.map → chunk-KRP467VJ.js.map} +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/resources/subscriptions.ts"],"sourcesContent":["import type {\n BuyerPortalSubscriptionCapabilities,\n NativeShopConfigRequest,\n NativeShopConfigResponse,\n NativeDunningConfigRequest,\n NativeDunningConfigResponse,\n AdoptSubscriptionRequest,\n AdoptSubscriptionResponse,\n CreateSubscriptionRequest,\n CreateAndConfirmSubscriptionRequest,\n ConfirmSubscriptionRequest,\n UpdateSubscriptionRequest,\n PauseSubscriptionRequest,\n ResumeSubscriptionRequest,\n CancelSubscriptionRequest,\n SubscriptionResponse,\n ConfirmSubscriptionResponse,\n PauseSubscriptionResponse,\n ResumeSubscriptionResponse,\n CancelSubscriptionResponse,\n GetSubscriptionItemsResponse,\n GetSubscriptionItemsParams,\n SubscriptionEstimateResponse,\n SubscriptionEstimateParams,\n SubscriptionListParams,\n SubscriptionPaymentLookupRequest,\n SubscriptionPaymentLookupResponse,\n SubscriptionInvoiceListParams,\n SubscriptionInvoiceListResponse,\n SubscriptionBillingProcessorResponse,\n SubscriptionImportApplyRequest,\n SubscriptionImportApplyResponse,\n SubscriptionImportPreviewRequest,\n SubscriptionImportPreviewResponse,\n SubscriptionItemsPage,\n SubscriptionSyncRequest,\n SubscriptionSyncResponse,\n SubscriptionSyncResult,\n SubscriptionInvoiceRefundConfirmRequest,\n SubscriptionInvoiceRefundListResponse,\n SubscriptionInvoiceRefundRequest,\n SubscriptionInvoiceRefundResponse,\n} from '../types';\nimport type { RequestExtras, RequestFn } from '../client';\n\n/**\n * Subscription endpoints are profile-scoped: the backend requires an\n * `X-Profile-Id` header to resolve the shop / billing processor (`IR_04`\n * otherwise). Pass it through the per-call `options.headers`, e.g.\n * `subscriptions.list(params, { headers: { 'X-Profile-Id': profileId } })`.\n */\nexport class Subscriptions {\n constructor(private readonly request: RequestFn) {}\n\n /** Read native enrollment settings. Pass X-Profile-Id in options.headers. */\n async getNativeConfig(options?: RequestExtras): Promise<NativeShopConfigResponse> {\n return this.request('GET', '/subscriptions/native/config', { ...options });\n }\n\n /** Replace native enrollment settings. Pass X-Profile-Id in options.headers. */\n async updateNativeConfig(\n params: NativeShopConfigRequest,\n options?: RequestExtras,\n ): Promise<NativeShopConfigResponse> {\n return this.request('PUT', '/subscriptions/native/config', { body: params, ...options });\n }\n\n /** Read merchant-wide renewal recovery settings. */\n async getNativeDunning(options?: RequestExtras): Promise<NativeDunningConfigResponse> {\n return this.request('GET', '/subscriptions/native/dunning', { ...options });\n }\n\n async updateNativeDunning(\n params: NativeDunningConfigRequest,\n options?: RequestExtras,\n ): Promise<NativeDunningConfigResponse> {\n return this.request('PUT', '/subscriptions/native/dunning', { body: params, ...options });\n }\n\n /** Read supported actions for an owned subscription. Pass X-Profile-Id in options.headers. */\n async getCapabilities(\n subscriptionId: string,\n options?: RequestExtras,\n ): Promise<BuyerPortalSubscriptionCapabilities> {\n return this.request(\n 'GET',\n `/subscriptions/${encodeURIComponent(subscriptionId)}/capabilities`,\n { ...options },\n );\n }\n\n /**\n * Create and immediately confirm a subscription. `POST /subscriptions`\n *\n * For billing processors that require buyer approval (e.g. PayPal), the\n * response carries a `redirect_url` the customer must be sent to.\n */\n async createAndConfirm(\n params: CreateAndConfirmSubscriptionRequest,\n options?: RequestExtras,\n ): Promise<ConfirmSubscriptionResponse> {\n return this.request('POST', '/subscriptions', { body: params, ...options });\n }\n\n /** Create a subscription without confirming it. `POST /subscriptions/create` */\n async create(\n params: CreateSubscriptionRequest,\n options?: RequestExtras,\n ): Promise<SubscriptionResponse> {\n return this.request('POST', '/subscriptions/create', { body: params, ...options });\n }\n\n /**\n * Adopt an existing Creem subscription. `POST /subscriptions/adopt`\n *\n * Requires adoption to be enabled on the deployment and `X-Profile-Id` in\n * options.headers. Adoption charges nothing and emits no invoice or webhook.\n * Repeating the processor subscription ID returns the existing DeloPay ID.\n * Retry when handoff_confirmed is false. That flag confirms persistence,\n * not the merchant's external switch-over: stop processing Creem events in\n * your own integration when handing subsequent events to DeloPay.\n */\n async adopt(\n params: AdoptSubscriptionRequest,\n options?: RequestExtras,\n ): Promise<AdoptSubscriptionResponse> {\n return this.request('POST', '/subscriptions/adopt', { body: params, ...options });\n }\n\n /** Retrieve a subscription by ID. `GET /subscriptions/{subscriptionId}` */\n async retrieve(subscriptionId: string, options?: RequestExtras): Promise<SubscriptionResponse> {\n return this.request('GET', `/subscriptions/${encodeURIComponent(subscriptionId)}`, {\n ...options,\n });\n }\n\n /**\n * Confirm a previously created subscription. `POST /subscriptions/{subscriptionId}/confirm`\n *\n * Like {@link createAndConfirm}, the response may carry a `redirect_url` for\n * processors that require buyer approval.\n */\n async confirm(\n subscriptionId: string,\n params: ConfirmSubscriptionRequest,\n options?: RequestExtras,\n ): Promise<ConfirmSubscriptionResponse> {\n return this.request('POST', `/subscriptions/${encodeURIComponent(subscriptionId)}/confirm`, {\n body: params,\n ...options,\n });\n }\n\n /**\n * Update a subscription's plan/price. `PUT /subscriptions/{subscriptionId}/update`\n *\n * From the dashboard this counts against the caller's `subscription_change`\n * operation limit; an over-limit call fails with `DE_01` and nothing reaches\n * the processor. Calls made with an API key are not limited.\n */\n async update(\n subscriptionId: string,\n params: UpdateSubscriptionRequest,\n options?: RequestExtras,\n ): Promise<SubscriptionResponse> {\n return this.request('PUT', `/subscriptions/${encodeURIComponent(subscriptionId)}/update`, {\n body: params,\n ...options,\n });\n }\n\n /**\n * List subscriptions for the profile, or one customer's with `customer_id`.\n * `GET /subscriptions/list`\n */\n async list(\n params?: SubscriptionListParams,\n options?: RequestExtras,\n ): Promise<SubscriptionResponse[]> {\n return this.request('GET', '/subscriptions/list', {\n query: params as Record<string, string | number | undefined>,\n ...options,\n });\n }\n\n /** Estimate the cost of a subscription before creating it. `GET /subscriptions/estimate` */\n async getEstimate(\n params: SubscriptionEstimateParams,\n options?: RequestExtras,\n ): Promise<SubscriptionEstimateResponse> {\n return this.request('GET', '/subscriptions/estimate', {\n query: params as unknown as Record<string, string | number | undefined>,\n ...options,\n });\n }\n\n /** List purchasable subscription items (plans/addons). `GET /subscriptions/items` */\n async getItems(\n params: GetSubscriptionItemsParams,\n options?: RequestExtras,\n ): Promise<GetSubscriptionItemsResponse[]> {\n return this.request('GET', '/subscriptions/items', {\n query: params as unknown as Record<string, string | number | undefined>,\n ...options,\n });\n }\n\n /**\n * {@link getItems}, with whether the list is only the first part of what the\n * processor holds. `GET /subscriptions/items`\n *\n * The backend states that in the `X-Delopay-Items-Truncated` response\n * header (Stripe Billing lists its first 100 products), which the plain\n * {@link getItems} cannot return. Without `limit` and `offset` every item\n * the billing account offers is listed, up to 500.\n */\n async getItemsPage(\n params: GetSubscriptionItemsParams,\n options?: RequestExtras,\n ): Promise<SubscriptionItemsPage> {\n let truncated = false;\n const items = await this.request<GetSubscriptionItemsResponse[]>(\n 'GET',\n '/subscriptions/items',\n {\n query: params as unknown as Record<string, string | number | undefined>,\n ...options,\n onDownloadProgress: (event) => {\n // The headers arrive with the first event; a retried request reports\n // them again, and the last attempt is the one the items come from.\n truncated = event.headers.get('x-delopay-items-truncated')?.toLowerCase() === 'true';\n options?.onDownloadProgress?.(event);\n },\n },\n );\n return { items, truncated };\n }\n\n /**\n * Pause a subscription. `POST /subscriptions/{subscriptionId}/pause`\n *\n * From the dashboard this counts against the caller's `subscription_change`\n * operation limit; an over-limit call fails with `DE_01` and nothing reaches\n * the processor. Calls made with an API key are not limited.\n *\n * The body defaults to `{}` so the request still carries\n * `Content-Type: application/json` even when no params are passed — the\n * backend rejects the POST otherwise (\"Unsupported content type\").\n */\n async pause(\n subscriptionId: string,\n params?: PauseSubscriptionRequest,\n options?: RequestExtras,\n ): Promise<PauseSubscriptionResponse> {\n return this.request('POST', `/subscriptions/${encodeURIComponent(subscriptionId)}/pause`, {\n body: params ?? {},\n ...options,\n });\n }\n\n /**\n * Resume a paused subscription. `POST /subscriptions/{subscriptionId}/resume`\n *\n * From the dashboard this counts against the caller's `subscription_change`\n * operation limit; an over-limit call fails with `DE_01` and nothing reaches\n * the processor. Calls made with an API key are not limited.\n */\n async resume(\n subscriptionId: string,\n params?: ResumeSubscriptionRequest,\n options?: RequestExtras,\n ): Promise<ResumeSubscriptionResponse> {\n return this.request('POST', `/subscriptions/${encodeURIComponent(subscriptionId)}/resume`, {\n body: params ?? {},\n ...options,\n });\n }\n\n /**\n * Cancel a subscription. `POST /subscriptions/{subscriptionId}/cancel`\n *\n * A subscription in a state it cannot be cancelled from is refused with\n * `DE_11`; `error.data.reason` then names why (`SubscriptionActionRefusal`).\n *\n * From the dashboard this counts against the caller's `subscription_change`\n * operation limit; an over-limit call fails with `DE_01` and nothing reaches\n * the processor. Calls made with an API key are not limited.\n */\n async cancel(\n subscriptionId: string,\n params?: CancelSubscriptionRequest,\n options?: RequestExtras,\n ): Promise<CancelSubscriptionResponse> {\n return this.request('POST', `/subscriptions/${encodeURIComponent(subscriptionId)}/cancel`, {\n body: params ?? {},\n ...options,\n });\n }\n\n /**\n * Read 1 to 50 subscriptions back from their billing processor and mirror\n * what it reports. `POST /subscriptions/sync`\n *\n * Nothing is written at the processor. A status is mirrored only with the\n * time the processor stamped it with, and never over a newer event already\n * recorded; a plan only with its own stamp. One result per id, in request\n * order; one that fails does not stop the others.\n */\n async sync(\n params: SubscriptionSyncRequest,\n options?: RequestExtras,\n ): Promise<SubscriptionSyncResponse> {\n return this.request('POST', '/subscriptions/sync', { body: params, ...options });\n }\n\n /**\n * Read one subscription back from its billing processor and mirror what it\n * reports, as {@link sync} does, with what the processor reported beside\n * what the mirror now holds. `POST /subscriptions/{subscriptionId}/sync`\n */\n async syncOne(subscriptionId: string, options?: RequestExtras): Promise<SubscriptionSyncResult> {\n return this.request('POST', `/subscriptions/${encodeURIComponent(subscriptionId)}/sync`, {\n ...options,\n });\n }\n\n /**\n * List the subscriptions a billing account holds at its processor, and how\n * each relates to DeloPay's: already held, new (its buyer is a DeloPay\n * customer), needing a customer, ended, or not adoptable here.\n * `POST /subscriptions/import/preview`\n *\n * Reads only; nothing is written here or at the processor. Creem and\n * Stripe Billing can be listed; PayPal cannot, which `capabilities` states\n * (`reason_code: 'listing_unsupported'`).\n */\n async importPreview(\n params: SubscriptionImportPreviewRequest,\n options?: RequestExtras,\n ): Promise<SubscriptionImportPreviewResponse> {\n return this.request('POST', '/subscriptions/import/preview', { body: params, ...options });\n }\n\n /**\n * Take 1 to 25 processor subscriptions over, each through {@link adopt}\n * with every one of its checks, one after another.\n * `POST /subscriptions/import/apply`\n *\n * One result per selection, in request order; one refused does not stop\n * the others.\n */\n async importApply(\n params: SubscriptionImportApplyRequest,\n options?: RequestExtras,\n ): Promise<SubscriptionImportApplyResponse> {\n return this.request('POST', '/subscriptions/import/apply', { body: params, ...options });\n }\n\n /**\n * Resolve which of the given payments were raised by a subscription.\n * `POST /subscriptions/payments/lookup`\n *\n * The linkage exists in one direction only — an invoice points at the payment\n * it settled, and nothing is stamped on the payment — so this is the only way\n * to tell a subscription charge from a one-off one when you are holding a\n * page of payments. In particular, do not use `off_session` or the presence\n * of a mandate: an ordinary saved-card charge sets those identically.\n *\n * Ids that belong to no subscription are **absent** from `links` rather than\n * returned as an error, so match on presence:\n *\n * ```ts\n * const { links } = await subscriptions.lookupPayments(\n * { payment_ids: page.map((p) => p.payment_id) },\n * { headers: { 'X-Profile-Id': profileId } },\n * );\n * const bySubscription = new Map(links.map((l) => [l.payment_id, l]));\n * ```\n *\n * Profile-scoped like every other subscription route, and that matters more\n * here than elsewhere: a `payment_id` is merchant-supplied and only unique\n * within a merchant, so the shop is part of the question, not an\n * optimisation. Pass the profile that owns **the payments** — for a list\n * spanning several shops, group the ids by shop and call once per group.\n *\n * At most 200 ids per call.\n */\n async lookupPayments(\n params: SubscriptionPaymentLookupRequest,\n options?: RequestExtras,\n ): Promise<SubscriptionPaymentLookupResponse> {\n return this.request('POST', '/subscriptions/payments/lookup', { body: params, ...options });\n }\n\n /**\n * One subscription's billing history, newest cycle first.\n * `GET /subscriptions/{subscriptionId}/invoices`\n *\n * {@link retrieve} carries only the *latest* invoice, which is the current\n * cycle — a subscription that has renewed monthly for a year has one of those\n * and twelve of these. Use this wherever a merchant needs to see what a\n * subscription has actually billed, in particular on self-charging processors\n * (Creem, PayPal) where each renewal is charged by the processor and mirrored\n * here rather than raised as a DeloPay payment.\n *\n * Two things to render honestly, both decided rather than incidental:\n *\n * - `amount` is **gross** and `refunded_amount` sits beside it. Do not net\n * them: the difference between the two is not a smaller charge.\n * - A `refunded_amount` of `null` is \"not reported\" and must not render as\n * `0`. Likewise a processor-hosted origination records a bootstrap invoice\n * at `0` before the buyer has paid anything, so a zero amount on such a\n * subscription is a placeholder rather than a free cycle.\n *\n * Profile-scoped like every other subscription route.\n */\n async listInvoices(\n subscriptionId: string,\n params?: SubscriptionInvoiceListParams,\n options?: RequestExtras,\n ): Promise<SubscriptionInvoiceListResponse> {\n return this.request('GET', `/subscriptions/${encodeURIComponent(subscriptionId)}/invoices`, {\n query: params as Record<string, string | number | undefined>,\n ...options,\n });\n }\n\n /**\n * Refund one paid subscription invoice at the billing processor that charged it.\n * `POST /subscriptions/{subscriptionId}/invoices/{invoiceId}/refund`\n *\n * Needs the refund permission, as a payment refund does, and the merchant's\n * refund rules apply. Only invoices of processor-billed cycles are refunded\n * here; a cycle paid by a payment is refunded through `refunds.create`. The\n * processor refunds the whole amount left on the charge, so omit `amount` or\n * send exactly that remainder.\n *\n * The answer is usually `pending` or `succeeded`: the invoice's refunded total\n * moves, and `invoice_refunded` is sent, once the processor reports the refund.\n * The same `idempotency_key` again answers the first refund and sends nothing.\n * While one refund of an invoice awaits the processor, another is refused.\n */\n async refundInvoice(\n subscriptionId: string,\n invoiceId: string,\n params: SubscriptionInvoiceRefundRequest,\n options?: RequestExtras,\n ): Promise<SubscriptionInvoiceRefundResponse> {\n return this.request(\n 'POST',\n `/subscriptions/${encodeURIComponent(subscriptionId)}/invoices/${encodeURIComponent(invoiceId)}/refund`,\n { body: params, ...options, bodyIdempotencyKey: params.idempotency_key },\n );\n }\n\n /**\n * The refunds of one subscription invoice made through the API, oldest first.\n * `GET /subscriptions/{subscriptionId}/invoices/{invoiceId}/refunds`\n *\n * Needs subscription read. A refund whose processor reported a refund of the\n * invoice without a refund time of its own, while this one awaited it, reads\n * `awaiting_confirmation` with the processor's refunds it may be in\n * `confirmation_candidates`.\n */\n async listInvoiceRefunds(\n subscriptionId: string,\n invoiceId: string,\n options?: RequestExtras,\n ): Promise<SubscriptionInvoiceRefundListResponse> {\n return this.request(\n 'GET',\n `/subscriptions/${encodeURIComponent(subscriptionId)}/invoices/${encodeURIComponent(invoiceId)}/refunds`,\n options,\n );\n }\n\n /**\n * Confirm that a refund the processor reported is this refund, once checked\n * at the processor.\n * `POST /subscriptions/{subscriptionId}/invoices/{invoiceId}/refunds/{refundId}/confirm`\n *\n * Needs the refund permission. Only a refund in `awaiting_confirmation` is\n * confirmed, and only with one of its `confirmation_candidates`; it becomes\n * `succeeded` with the processor's refund id and amount. The invoice's\n * refunded total does not move and no webhook is sent. The same candidate\n * again answers the refund as it stands. A refund that does not await\n * confirmation, or a processor refund that is not one of its candidates, is\n * refused with a 400 (`IR_16`); a subscription, invoice or refund that is not\n * found answers 404. Only `connector_refund_id` is sent, so a candidate from\n * `confirmation_candidates` can be passed as it is.\n */\n async confirmInvoiceRefund(\n subscriptionId: string,\n invoiceId: string,\n refundId: string,\n params: SubscriptionInvoiceRefundConfirmRequest,\n options?: RequestExtras,\n ): Promise<SubscriptionInvoiceRefundResponse> {\n return this.request(\n 'POST',\n `/subscriptions/${encodeURIComponent(subscriptionId)}/invoices/${encodeURIComponent(invoiceId)}/refunds/${encodeURIComponent(refundId)}/confirm`,\n { ...options, body: { connector_refund_id: params.connector_refund_id } },\n );\n }\n\n /**\n * Which billing processor this shop's subscriptions run on.\n * `GET /subscriptions/billing_processor`\n *\n * The same mapping is derivable from the connector inventory\n * (`GET /account/{merchant_id}/connectors`), but that route is gated by a\n * connector-read permission granted independently of subscriptions — so a\n * role authorised to create subscriptions could be unable to learn which\n * processor it was creating them on. This answers under the same\n * authorization as the rest of the subscription API.\n *\n * Reach for it when the client must branch on the processor *before* calling\n * — origination differs by processor, and guessing is destructive. Resolve\n * the shop's `billing_processor_id` first: a shop that runs no subscriptions\n * has none assigned, and this route has no identity to report for it.\n */\n async getBillingProcessor(\n options?: RequestExtras,\n ): Promise<SubscriptionBillingProcessorResponse> {\n return this.request('GET', '/subscriptions/billing_processor', { ...options });\n }\n}\n"],"mappings":";AAmDO,IAAM,gBAAN,MAAoB;AAAA,EACzB,YAA6B,SAAoB;AAApB;AAAA,EAAqB;AAAA;AAAA,EAGlD,MAAM,gBAAgB,SAA4D;AAChF,WAAO,KAAK,QAAQ,OAAO,gCAAgC,EAAE,GAAG,QAAQ,CAAC;AAAA,EAC3E;AAAA;AAAA,EAGA,MAAM,mBACJ,QACA,SACmC;AACnC,WAAO,KAAK,QAAQ,OAAO,gCAAgC,EAAE,MAAM,QAAQ,GAAG,QAAQ,CAAC;AAAA,EACzF;AAAA;AAAA,EAGA,MAAM,iBAAiB,SAA+D;AACpF,WAAO,KAAK,QAAQ,OAAO,iCAAiC,EAAE,GAAG,QAAQ,CAAC;AAAA,EAC5E;AAAA,EAEA,MAAM,oBACJ,QACA,SACsC;AACtC,WAAO,KAAK,QAAQ,OAAO,iCAAiC,EAAE,MAAM,QAAQ,GAAG,QAAQ,CAAC;AAAA,EAC1F;AAAA;AAAA,EAGA,MAAM,gBACJ,gBACA,SAC8C;AAC9C,WAAO,KAAK;AAAA,MACV;AAAA,MACA,kBAAkB,mBAAmB,cAAc,CAAC;AAAA,MACpD,EAAE,GAAG,QAAQ;AAAA,IACf;AAAA,EACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,MAAM,iBACJ,QACA,SACsC;AACtC,WAAO,KAAK,QAAQ,QAAQ,kBAAkB,EAAE,MAAM,QAAQ,GAAG,QAAQ,CAAC;AAAA,EAC5E;AAAA;AAAA,EAGA,MAAM,OACJ,QACA,SAC+B;AAC/B,WAAO,KAAK,QAAQ,QAAQ,yBAAyB,EAAE,MAAM,QAAQ,GAAG,QAAQ,CAAC;AAAA,EACnF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAYA,MAAM,MACJ,QACA,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AAM,cACJ,gBACA,WACA,QACA,SAC4C;AAC5C,WAAO,KAAK;AAAA,MACV;AAAA,MACA,kBAAkB,mBAAmB,cAAc,CAAC,aAAa,mBAAmB,SAAS,CAAC;AAAA,MAC9F,EAAE,MAAM,QAAQ,GAAG,SAAS,oBAAoB,OAAO,gBAAgB;AAAA,IACzE;AAAA,EACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAWA,MAAM,mBACJ,gBACA,WACA,SACgD;AAChD,WAAO,KAAK;AAAA,MACV;AAAA,MACA,kBAAkB,mBAAmB,cAAc,CAAC,aAAa,mBAAmB,SAAS,CAAC;AAAA,MAC9F;AAAA,IACF;AAAA,EACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAiBA,MAAM,qBACJ,gBACA,WACA,UACA,QACA,SAC4C;AAC5C,WAAO,KAAK;AAAA,MACV;AAAA,MACA,kBAAkB,mBAAmB,cAAc,CAAC,aAAa,mBAAmB,SAAS,CAAC,YAAY,mBAAmB,QAAQ,CAAC;AAAA,MACtI,EAAE,GAAG,SAAS,MAAM,EAAE,qBAAqB,OAAO,oBAAoB,EAAE;AAAA,IAC1E;AAAA,EACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAkBA,MAAM,oBACJ,SAC+C;AAC/C,WAAO,KAAK,QAAQ,OAAO,oCAAoC,EAAE,GAAG,QAAQ,CAAC;AAAA,EAC/E;AACF;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/resources/disputes.ts"],"sourcesContent":["import type {\n DisputeReconcileRequest,\n DisputeResponse,\n DisputeListParams,\n DisputeEvidenceRequest,\n DeleteEvidenceRequest,\n DisputeEvidenceBlock,\n DisputeRefundDeclaration,\n DisputeRefundAssociationRequest,\n DisputeRefundAssociationsResponse,\n DisputeWorkspaceRequest,\n DisputeWorkspaceResponse,\n DisputeWorkspaceFilters,\n DisputeWorkspaceAggregate,\n DisputeWorkspaceExport,\n DisputeBulkAcceptRequest,\n DisputeBulkAcceptResponse,\n DisputeBulkBlockBuyerRequest,\n DisputeBulkBlockBuyerResponse,\n DisputeBulkPreviewRequest,\n DisputeBulkPreviewResponse,\n DynamicWorkspaceExportOptions,\n JsonExportOptions,\n PdfExportOptions,\n} from '../types';\nimport type { RequestFn, RequestOptions } from '../client';\nimport { WORKSPACE_ENVELOPE, downloadExport, negotiated } from '../exportDownload';\n\n/** Workspace filters use CSV values, unlike the transport's repeated-key arrays. */\nfunction workspaceQuery(params?: DisputeWorkspaceRequest): RequestOptions['query'] {\n if (!params) return undefined;\n const { connector, currency, dispute_status, dispute_stage, ...query } = params;\n return {\n ...query,\n ...(connector?.length ? { connector: connector.join(',') } : {}),\n ...(currency?.length ? { currency: currency.join(',') } : {}),\n ...(dispute_status?.length ? { dispute_status: dispute_status.join(',') } : {}),\n ...(dispute_stage?.length ? { dispute_stage: dispute_stage.join(',') } : {}),\n };\n}\n\n/** View and respond to payment disputes and chargebacks. */\nexport class Disputes {\n constructor(private readonly request: RequestFn) {}\n\n /** Read native disputes and provider-only cases once, after shared authorization and filters. */\n async workspace(params?: DisputeWorkspaceRequest): Promise<DisputeWorkspaceResponse> {\n return this.request('GET', '/disputes/workspace', { query: workspaceQuery(params) });\n }\n\n /** Read filter options over the same scoped case set; pagination is ignored. */\n async workspaceFilters(params?: DisputeWorkspaceRequest): Promise<DisputeWorkspaceFilters> {\n return this.request('GET', '/disputes/workspace/filters', { query: workspaceQuery(params) });\n }\n\n /** Count the filtered case set, including unknown outcomes; pagination is ignored. */\n async workspaceAggregate(params?: DisputeWorkspaceRequest): Promise<DisputeWorkspaceAggregate> {\n return this.request('GET', '/disputes/workspace/aggregate', { query: workspaceQuery(params) });\n }\n\n /**\n * Export the complete filtered set, or throw on the server's explicit\n * export-limit refusal. `GET /disputes/workspace/export`\n *\n * The body is streamed, and held to the `X-Delopay-Record-Count` the server\n * announces and to its own `total_count`: a set that arrives short rejects\n * with `EXPORT_INCOMPLETE` rather than resolving. `options` reports the\n * download's progress and takes a signal and an idle timeout — see\n * {@link ExportTransferOptions}.\n *\n * `format: 'pdf'` resolves to the same set laid out as a document (a\n * `Blob`), with the words in `options.presentation` — see\n * {@link ExportPresentation}. This route offers no CSV.\n */\n async workspaceExport(\n params?: DisputeWorkspaceRequest,\n options?: JsonExportOptions,\n ): Promise<DisputeWorkspaceExport>;\n async workspaceExport(\n params: DisputeWorkspaceRequest | undefined,\n options: PdfExportOptions,\n ): Promise<Blob>;\n async workspaceExport(\n params: DisputeWorkspaceRequest | undefined,\n options: DynamicWorkspaceExportOptions,\n ): Promise<DisputeWorkspaceExport | Blob>;\n async workspaceExport(\n params?: DisputeWorkspaceRequest,\n options?: JsonExportOptions | PdfExportOptions | DynamicWorkspaceExportOptions,\n ): Promise<DisputeWorkspaceExport | Blob> {\n const format = options?.format ?? 'json';\n return downloadExport(\n this.request,\n {\n method: 'GET',\n path: '/disputes/workspace/export',\n request: negotiated({ query: workspaceQuery(params) }, format, options?.presentation),\n format,\n envelope: WORKSPACE_ENVELOPE,\n },\n options,\n );\n }\n\n /**\n * What a bulk action would do to the selected cases, changing nothing:\n * each case as eligible or skipped with a reason, and what the eligible ones\n * add up to per currency. Name the cases by `ids` or by the list's\n * `filters`, exactly one of the two; at most `max_cases` are read.\n *\n * `POST /disputes/workspace/bulk/preview`. Needs a dashboard JWT.\n */\n async bulkPreview(request: DisputeBulkPreviewRequest): Promise<DisputeBulkPreviewResponse> {\n // The body's filters take CSV values, as the list's query does.\n const { filters, ...rest } = request;\n return this.request('POST', '/disputes/workspace/bulk/preview', {\n body: filters ? { ...rest, filters: workspaceQuery(filters) } : rest,\n });\n }\n\n /**\n * Accept the listed cases at their processors, at most the preview's\n * `max_run_cases` per call; send a larger set in parts under one\n * `request_id`. Eligibility is decided again at run time, and every case\n * gets its own result. An `unknown` result means the processor may have\n * acted: read the case before acting on it again.\n *\n * `POST /disputes/workspace/bulk/accept`. Needs a dashboard JWT.\n */\n async bulkAccept(request: DisputeBulkAcceptRequest): Promise<DisputeBulkAcceptResponse> {\n return this.request('POST', '/disputes/workspace/bulk/accept', { body: request });\n }\n\n /**\n * Add the buyer of each listed case's payment to the buyer blocklist: the\n * payment's email and customer id, and the device ids and IP address of the\n * browser that paid, when DeloPay can tie them to it. Identifiers already\n * blocked are not added again, and `unattributed` names those it could not\n * tie to the buyer.\n *\n * `POST /disputes/workspace/bulk/block-buyer`. Needs a dashboard JWT.\n */\n async bulkBlockBuyer(\n request: DisputeBulkBlockBuyerRequest,\n ): Promise<DisputeBulkBlockBuyerResponse> {\n return this.request('POST', '/disputes/workspace/bulk/block-buyer', { body: request });\n }\n\n /**\n * Retrieve a dispute by its ID.\n *\n * @param disputeId - The unique dispute ID.\n * @returns The dispute.\n */\n async retrieve(disputeId: string): Promise<DisputeResponse> {\n return this.request('GET', `/disputes/${encodeURIComponent(disputeId)}`);\n }\n\n /** Read declared links and provider-reported refund references. Empty means unknown. */\n async listRefundAssociations(disputeId: string): Promise<DisputeRefundAssociationsResponse> {\n return this.request('GET', `/disputes/${encodeURIComponent(disputeId)}/refund-associations`);\n }\n\n /** Declare or clear an allocation against a successful refund of this payment. */\n async setRefundAssociation(\n disputeId: string,\n params: DisputeRefundAssociationRequest,\n ): Promise<DisputeRefundDeclaration> {\n return this.request('PUT', `/disputes/${encodeURIComponent(disputeId)}/refund-associations`, {\n body: params,\n });\n }\n\n /**\n * List disputes, optionally filtered by status, stage, or date range.\n *\n * @param params - Optional filter and pagination parameters.\n * @returns Array of disputes.\n */\n async list(params?: DisputeListParams): Promise<DisputeResponse[]> {\n return this.request('GET', '/disputes/list', {\n query: params as Record<string, string | number | undefined>,\n });\n }\n\n /**\n * Accept a dispute, conceding the chargeback to the customer.\n *\n * @param disputeId - The dispute ID to accept.\n * @returns The updated dispute.\n */\n async accept(disputeId: string): Promise<DisputeResponse> {\n return this.request('POST', `/disputes/accept/${encodeURIComponent(disputeId)}`);\n }\n\n /**\n * Correct the exchange rate of a dispute the processor reported in another\n * currency, or record its final settled amount. Until it is settled, the\n * reserved amount is an estimate and no other dispute on the same payment\n * attempt can take a new reservation. Signed-in users with the\n * external-record permission only.\n *\n * @param disputeId - The dispute to reconcile.\n * @param request - `correct_rate` with the processor's rate, or `settle`\n * with the final amount and a reason.\n * @returns The updated dispute.\n */\n async reconcile(disputeId: string, request: DisputeReconcileRequest): Promise<DisputeResponse> {\n return this.request('POST', `/disputes/${encodeURIComponent(disputeId)}/reconcile`, {\n body: request,\n });\n }\n\n /**\n * Submit evidence to challenge a dispute.\n *\n * @param params - Evidence details and the dispute ID to contest.\n * @returns The updated dispute.\n */\n async submitEvidence(params: DisputeEvidenceRequest): Promise<DisputeResponse> {\n return this.request('POST', '/disputes/evidence', { body: params });\n }\n\n /**\n * Attach evidence (e.g. file upload metadata) to a dispute.\n *\n * Uses `PUT /disputes/evidence`.\n */\n async attachEvidence(params: DisputeEvidenceRequest): Promise<DisputeResponse> {\n return this.request('PUT', '/disputes/evidence', { body: params });\n }\n\n /**\n * Retrieve previously stored evidence for a dispute.\n *\n * Returns an ARRAY of file-evidence blocks (this was previously mistyped\n * as the flat submit-request shape). Only file evidence is reported —\n * text evidence is not retrievable once submitted.\n *\n * @param disputeId - The dispute ID.\n * @returns The stored file-evidence blocks.\n */\n async retrieveEvidence(disputeId: string): Promise<DisputeEvidenceBlock[]> {\n return this.request('GET', `/disputes/evidence/${encodeURIComponent(disputeId)}`);\n }\n\n /**\n * Delete submitted evidence for a dispute.\n *\n * @param params - Evidence request body identifying what to delete.\n * @returns The updated dispute.\n */\n async deleteEvidence(params: DeleteEvidenceRequest): Promise<DisputeResponse> {\n return this.request('DELETE', '/disputes/evidence', { body: params });\n }\n\n // --- OLAP extensions (Task 4.4) ---\n\n /** List disputes (profile-scoped). `GET /disputes/profile/list` */\n async listByProfile(params?: DisputeListParams): Promise<DisputeResponse[]> {\n return this.request('GET', '/disputes/profile/list', {\n query: params as Record<string, string | number | undefined>,\n });\n }\n\n /** Get dispute filter options. `GET /disputes/filter` */\n async getFilters(\n params?: Record<string, string | number | undefined>,\n ): Promise<Record<string, unknown>> {\n return this.request('GET', '/disputes/filter', { query: params });\n }\n\n /** Get dispute filters (profile-scoped). `GET /disputes/profile/filter` */\n async getFiltersByProfile(\n params?: Record<string, string | number | undefined>,\n ): Promise<Record<string, unknown>> {\n return this.request('GET', '/disputes/profile/filter', { query: params });\n }\n\n /** Get dispute aggregates. `GET /disputes/aggregate` */\n async aggregate(\n params?: Record<string, string | number | undefined>,\n ): Promise<Record<string, unknown>> {\n return this.request('GET', '/disputes/aggregate', { query: params });\n }\n\n /** Get dispute aggregates (profile-scoped). `GET /disputes/profile/aggregate` */\n async aggregateByProfile(\n params?: Record<string, string | number | undefined>,\n ): Promise<Record<string, unknown>> {\n return this.request('GET', '/disputes/profile/aggregate', { query: params });\n }\n\n /**\n * Fetch the latest dispute state from the connector (gateway) and persist it.\n * `GET /disputes/{disputeId}?force_sync=true`\n *\n * The path parameter is the **Delopay dispute id** (`dp_…`). Force-sync asks the\n * backend to pull the dispute from the connector (supported where the connector\n * implements the dispute-sync flow, e.g. Stripe) and update the stored record\n * before returning it.\n *\n * Note: this method previously called `GET /disputes/{id}/fetch`, which is a\n * different backend route — a bulk import keyed by **merchant connector account\n * id** with a required date range — so every call with a dispute id failed.\n */\n async fetchFromConnector(disputeId: string): Promise<DisputeResponse> {\n return this.request('GET', `/disputes/${encodeURIComponent(disputeId)}`, {\n query: { force_sync: 'true' },\n });\n }\n}\n"],"mappings":";;;;;;;AA6BA,SAAS,eAAe,QAA2D;AACjF,MAAI,CAAC,OAAQ,QAAO;AACpB,QAAM,EAAE,WAAW,UAAU,gBAAgB,eAAe,GAAG,MAAM,IAAI;AACzE,SAAO;AAAA,IACL,GAAG;AAAA,IACH,GAAI,WAAW,SAAS,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kC;AAClC,WAAO,KAAK,QAAQ,OAAO,+BAA+B,EAAE,OAAO,OAAO,CAAC;AAAA,EAC7E;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAeA,MAAM,mBAAmB,WAA6C;AACpE,WAAO,KAAK,QAAQ,OAAO,aAAa,mBAAmB,SAAS,CAAC,IAAI;AAAA,MACvE,OAAO,EAAE,YAAY,OAAO;AAAA,IAC9B,CAAC;AAAA,EACH;AACF;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/resources/shareLinks.ts"],"sourcesContent":["import type { RequestExtras, RequestFn } from '../client';\nimport { DelopayAuthenticationError, DelopayError } from '../error';\nimport type {\n ShareLinkCreateRequest,\n ShareLinkCreateResponse,\n ShareLinkListQuery,\n ShareLinkListResponse,\n ShareLinkOpenRequest,\n ShareLinkOpenResponse,\n ShareLinkPreviewRequest,\n ShareLinkPreviewResponse,\n ShareLinkSummary,\n} from '../types';\n\nconst SHARE_PASSWORD_CHALLENGE_REASONS = new Set(['password_required', 'password_wrong']);\n\nfunction listQuery(query?: ShareLinkListQuery): Record<string, string> | undefined {\n if (query?.active_only === undefined) return undefined;\n return { active_only: String(query.active_only) };\n}\n\nfunction isSharePasswordChallenge(err: unknown): err is DelopayAuthenticationError {\n if (!(err instanceof DelopayAuthenticationError)) return false;\n const reason = err.data?.reason;\n return (\n err.code === 'IR_18' &&\n typeof reason === 'string' &&\n SHARE_PASSWORD_CHALLENGE_REASONS.has(reason)\n );\n}\n\n/**\n * Expiring external share links for a single person or a single payment\n * (`DeloPay-net/delopay-todos#809`).\n *\n * Team members with read access to the underlying person or payment can create,\n * inspect, and revoke expiring read-only links while link sharing is switched\n * on for the merchant (`sharing.share_links_enabled`). The secret share token\n * is returned once on creation and never stored in plaintext.\n *\n * `preview` and `open` are public, credential-less endpoints: pass a client\n * built with no API key and no JWT so a signed-in tab's bearer token is never\n * sent to a public share route.\n */\nexport class ShareLinks {\n constructor(private readonly request: RequestFn) {}\n\n /**\n * List share links created for one person (active links followed by recent\n * history, or active links only when `query.active_only` is `true`).\n *\n * `GET /persons/{personId}/share-links`\n */\n async listForPerson(\n personId: string,\n query?: ShareLinkListQuery,\n options?: RequestExtras,\n ): Promise<ShareLinkListResponse> {\n return this.request('GET', `/persons/${encodeURIComponent(personId)}/share-links`, {\n ...options,\n query: listQuery(query),\n });\n }\n\n /**\n * Create an expiring share link for one person. The response returns the\n * secret `token` once.\n *\n * `POST /persons/{personId}/share-links`\n */\n async createForPerson(\n personId: string,\n body: ShareLinkCreateRequest,\n options?: RequestExtras,\n ): Promise<ShareLinkCreateResponse> {\n return this.request('POST', `/persons/${encodeURIComponent(personId)}/share-links`, {\n ...options,\n body,\n bodyIdempotencyKey: null,\n });\n }\n\n /**\n * List share links created for one payment (active links followed by recent\n * history, or active links only when `query.active_only` is `true`).\n *\n * `GET /payments/{paymentId}/share-links`\n */\n async listForPayment(\n paymentId: string,\n query?: ShareLinkListQuery,\n options?: RequestExtras,\n ): Promise<ShareLinkListResponse> {\n return this.request('GET', `/payments/${encodeURIComponent(paymentId)}/share-links`, {\n ...options,\n query: listQuery(query),\n });\n }\n\n /**\n * Create an expiring share link for one payment. The response returns the\n * secret `token` once. Setting `include_team_notes: true` also requires\n * person-read access.\n *\n * `POST /payments/{paymentId}/share-links`\n */\n async createForPayment(\n paymentId: string,\n body: ShareLinkCreateRequest,\n options?: RequestExtras,\n ): Promise<ShareLinkCreateResponse> {\n return this.request('POST', `/payments/${encodeURIComponent(paymentId)}/share-links`, {\n ...options,\n body,\n bodyIdempotencyKey: null,\n });\n }\n\n /**\n * List share links across the merchant account, filtered to the resources\n * and shop scope the caller may read.\n *\n * `GET /share-links`\n */\n async list(query?: ShareLinkListQuery, options?: RequestExtras): Promise<ShareLinkListResponse> {\n return this.request('GET', '/share-links', {\n ...options,\n query: listQuery(query),\n });\n }\n\n /**\n * Revoke an active share link immediately. Subsequent preview or open\n * attempts are refused with `410` (`reason: \"revoked\"`).\n *\n * `DELETE /share-links/{linkId}`\n */\n async revoke(linkId: string, options?: RequestExtras): Promise<ShareLinkSummary> {\n return this.request('DELETE', `/share-links/${encodeURIComponent(linkId)}`, options);\n }\n\n /**\n * Public metadata preview for a share link. Does not consume a view and\n * requires no authentication.\n *\n * `POST /share-links/preview`\n */\n async preview(\n body: ShareLinkPreviewRequest,\n options?: RequestExtras,\n ): Promise<ShareLinkPreviewResponse> {\n return this.request('POST', '/share-links/preview', {\n ...options,\n body,\n });\n }\n\n /**\n * Public open for a share link. Validates expiry, view limit, account switch\n * and optional password, consumes one view atomically, writes the view audit\n * entry, and returns the redacted read-only person or payment view.\n *\n * A missing or incorrect share password (`401` `IR_18` with `data.reason` of\n * `password_required` or `password_wrong`) is surfaced as a plain\n * `DelopayError` rather than `DelopayAuthenticationError` so callers prompt\n * for the share password instead of taking an API-key or sign-in recovery\n * path.\n *\n * `POST /share-links/open`\n */\n async open(body: ShareLinkOpenRequest, options?: RequestExtras): Promise<ShareLinkOpenResponse> {\n try {\n return await this.request('POST', '/share-links/open', {\n ...options,\n body,\n bodyIdempotencyKey: null,\n });\n } catch (err) {\n if (isSharePasswordChallenge(err)) {\n throw new DelopayError(err.message, {\n status: err.status,\n code: err.code,\n type: err.type,\n requestId: err.requestId,\n rawBody: err.rawBody,\n data: err.data,\n });\n }\n throw err;\n }\n }\n}\n"],"mappings":";;;;;;AAcA,IAAM,mCAAmC,oBAAI,IAAI,CAAC,qBAAqB,gBAAgB,CAAC;AAExF,SAAS,UAAU,OAAgE;AACjF,MAAI,OAAO,gBAAgB,OAAW,QAAO;AAC7C,SAAO,EAAE,aAAa,OAAO,MAAM,WAAW,EAAE;AAClD;AAEA,SAAS,yBAAyB,KAAiD;AACjF,MAAI,EAAE,eAAe,4BAA6B,QAAO;AACzD,QAAM,SAAS,IAAI,MAAM;AACzB,SACE,IAAI,SAAS,WACb,OAAO,WAAW,YAClB,iCAAiC,IAAI,MAAM;AA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/E,WAAO,KAAK,QAAQ,UAAU,gBAAgB,mBAAmB,MAAM,CAAC,IAAI,OAAO;AAAA,EACrF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,MAAM,QACJ,MACA,SACmC;AACnC,WAAO,KAAK,QAAQ,QAAQ,wBAAwB;AAAA,MAClD,GAAG;AAAA,MACH;AAAA,IACF,CAAC;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAeA,MAAM,KAAK,MAA4B,SAAyD;AAC9F,QAAI;AACF,aAAO,MAAM,KAAK,QAAQ,QAAQ,qBAAqB;AAAA,QACrD,GAAG;AAAA,QACH;AAAA,QACA,oBAAoB;AAAA,MACtB,CAAC;AAAA,IACH,SAAS,KAAK;AACZ,UAAI,yBAAyB,GAAG,GAAG;AACjC,cAAM,IAAI,aAAa,IAAI,SAAS;AAAA,UAClC,QAAQ,IAAI;AAAA,UACZ,MAAM,IAAI;AAAA,UACV,MAAM,IAAI;AAAA,UACV,WAAW,IAAI;AAAA,UACf,SAAS,IAAI;AAAA,UACb,MAAM,IAAI;AAAA,QACZ,CAAC;AAAA,MACH;AACA,YAAM;AAAA,IACR;AAAA,EACF;AACF;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["/home/anes/delo-payment/delopay-typescript-sdk/dist/chunk-CYDHHARQ.cjs","../src/resources/subscriptions.ts"],"names":[],"mappings":"AAAA;ACmDO,IAAM,cAAA,EAAN,MAAoB;AAAA,EACzB,WAAA,CAA6B,OAAA,EAAoB;AAApB,IAAA,IAAA,CAAA,QAAA,EAAA,OAAA;AAAA,EAAqB;AAAA;AAAA,EAGlD,MAAM,eAAA,CAAgB,OAAA,EAA4D;AAChF,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,KAAA,EAAO,8BAAA,EAAgC,EAAE,GAAG,QAAQ,CAAC,CAAA;AAAA,EAC3E;AAAA;AAAA,EAG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;AACV,MAAA;AACiE,MAAA;AACM,MAAA;AACzE,IAAA;AACF,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAekD,EAAA;AACpC,IAAA;AACV,MAAA;AACiE,MAAA;AACjE,MAAA;AACF,IAAA;AACF,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAuB8C,EAAA;AAChC,IAAA;AACV,MAAA;AACiE,MAAA;AACO,MAAA;AAC1E,IAAA;AACF,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAoBiD,EAAA;AAC8B,IAAA;AAC/E,EAAA;AACF;ADhKoF;AACA;AACA;AACA","file":"/home/anes/delo-payment/delopay-typescript-sdk/dist/chunk-CYDHHARQ.cjs","sourcesContent":[null,"import type {\n BuyerPortalSubscriptionCapabilities,\n NativeShopConfigRequest,\n NativeShopConfigResponse,\n NativeDunningConfigRequest,\n NativeDunningConfigResponse,\n AdoptSubscriptionRequest,\n AdoptSubscriptionResponse,\n CreateSubscriptionRequest,\n CreateAndConfirmSubscriptionRequest,\n ConfirmSubscriptionRequest,\n UpdateSubscriptionRequest,\n PauseSubscriptionRequest,\n ResumeSubscriptionRequest,\n CancelSubscriptionRequest,\n SubscriptionResponse,\n ConfirmSubscriptionResponse,\n PauseSubscriptionResponse,\n ResumeSubscriptionResponse,\n CancelSubscriptionResponse,\n GetSubscriptionItemsResponse,\n GetSubscriptionItemsParams,\n SubscriptionEstimateResponse,\n SubscriptionEstimateParams,\n SubscriptionListParams,\n SubscriptionPaymentLookupRequest,\n SubscriptionPaymentLookupResponse,\n SubscriptionInvoiceListParams,\n SubscriptionInvoiceListResponse,\n SubscriptionBillingProcessorResponse,\n SubscriptionImportApplyRequest,\n SubscriptionImportApplyResponse,\n SubscriptionImportPreviewRequest,\n SubscriptionImportPreviewResponse,\n SubscriptionItemsPage,\n SubscriptionSyncRequest,\n SubscriptionSyncResponse,\n SubscriptionSyncResult,\n SubscriptionInvoiceRefundConfirmRequest,\n SubscriptionInvoiceRefundListResponse,\n SubscriptionInvoiceRefundRequest,\n SubscriptionInvoiceRefundResponse,\n} from '../types';\nimport type { RequestExtras, RequestFn } from '../client';\n\n/**\n * Subscription endpoints are profile-scoped: the backend requires an\n * `X-Profile-Id` header to resolve the shop / billing processor (`IR_04`\n * otherwise). Pass it through the per-call `options.headers`, e.g.\n * `subscriptions.list(params, { headers: { 'X-Profile-Id': profileId } })`.\n */\nexport class Subscriptions {\n constructor(private readonly request: RequestFn) {}\n\n /** Read native enrollment settings. Pass X-Profile-Id in options.headers. */\n async getNativeConfig(options?: RequestExtras): Promise<NativeShopConfigResponse> {\n return this.request('GET', '/subscriptions/native/config', { ...options });\n }\n\n /** Replace native enrollment settings. Pass X-Profile-Id in options.headers. */\n async updateNativeConfig(\n params: NativeShopConfigRequest,\n options?: RequestExtras,\n ): Promise<NativeShopConfigResponse> {\n return this.request('PUT', '/subscriptions/native/config', { body: params, ...options });\n }\n\n /** Read merchant-wide renewal recovery settings. */\n async getNativeDunning(options?: RequestExtras): Promise<NativeDunningConfigResponse> {\n return this.request('GET', '/subscriptions/native/dunning', { ...options });\n }\n\n async updateNativeDunning(\n params: NativeDunningConfigRequest,\n options?: RequestExtras,\n ): Promise<NativeDunningConfigResponse> {\n return this.request('PUT', '/subscriptions/native/dunning', { body: params, ...options });\n }\n\n /** Read supported actions for an owned subscription. Pass X-Profile-Id in options.headers. */\n async getCapabilities(\n subscriptionId: string,\n options?: RequestExtras,\n ): Promise<BuyerPortalSubscriptionCapabilities> {\n return this.request(\n 'GET',\n `/subscriptions/${encodeURIComponent(subscriptionId)}/capabilities`,\n { ...options },\n );\n }\n\n /**\n * Create and immediately confirm a subscription. `POST /subscriptions`\n *\n * For billing processors that require buyer approval (e.g. PayPal), the\n * response carries a `redirect_url` the customer must be sent to.\n */\n async createAndConfirm(\n params: CreateAndConfirmSubscriptionRequest,\n options?: RequestExtras,\n ): Promise<ConfirmSubscriptionResponse> {\n return this.request('POST', '/subscriptions', { body: params, ...options });\n }\n\n /** Create a subscription without confirming it. `POST /subscriptions/create` */\n async create(\n params: CreateSubscriptionRequest,\n options?: RequestExtras,\n ): Promise<SubscriptionResponse> {\n return this.request('POST', '/subscriptions/create', { body: params, ...options });\n }\n\n /**\n * Adopt an existing Creem subscription. `POST /subscriptions/adopt`\n *\n * Requires adoption to be enabled on the deployment and `X-Profile-Id` in\n * options.headers. Adoption charges nothing and emits no invoice or webhook.\n * Repeating the processor subscription ID returns the existing DeloPay ID.\n * Retry when handoff_confirmed is false. That flag confirms persistence,\n * not the merchant's external switch-over: stop processing Creem events in\n * your own integration when handing subsequent events to DeloPay.\n */\n async adopt(\n params: AdoptSubscriptionRequest,\n options?: RequestExtras,\n ): Promise<AdoptSubscriptionResponse> {\n return this.request('POST', '/subscriptions/adopt', { body: params, ...options });\n }\n\n /** Retrieve a subscription by ID. `GET /subscriptions/{subscriptionId}` */\n async retrieve(subscriptionId: string, options?: RequestExtras): Promise<SubscriptionResponse> {\n return this.request('GET', `/subscriptions/${encodeURIComponent(subscriptionId)}`, {\n ...options,\n });\n }\n\n /**\n * Confirm a previously created subscription. `POST /subscriptions/{subscriptionId}/confirm`\n *\n * Like {@link createAndConfirm}, the response may carry a `redirect_url` for\n * processors that require buyer approval.\n */\n async confirm(\n subscriptionId: string,\n params: ConfirmSubscriptionRequest,\n options?: RequestExtras,\n ): Promise<ConfirmSubscriptionResponse> {\n return this.request('POST', `/subscriptions/${encodeURIComponent(subscriptionId)}/confirm`, {\n body: params,\n ...options,\n });\n }\n\n /**\n * Update a subscription's plan/price. `PUT /subscriptions/{subscriptionId}/update`\n *\n * From the dashboard this counts against the caller's `subscription_change`\n * operation limit; an over-limit call fails with `DE_01` and nothing reaches\n * the processor. Calls made with an API key are not limited.\n */\n async update(\n subscriptionId: string,\n params: UpdateSubscriptionRequest,\n options?: RequestExtras,\n ): Promise<SubscriptionResponse> {\n return this.request('PUT', `/subscriptions/${encodeURIComponent(subscriptionId)}/update`, {\n body: params,\n ...options,\n });\n }\n\n /**\n * List subscriptions for the profile, or one customer's with `customer_id`.\n * `GET /subscriptions/list`\n */\n async list(\n params?: SubscriptionListParams,\n options?: RequestExtras,\n ): Promise<SubscriptionResponse[]> {\n return this.request('GET', '/subscriptions/list', {\n query: params as Record<string, string | number | undefined>,\n ...options,\n });\n }\n\n /** Estimate the cost of a subscription before creating it. `GET /subscriptions/estimate` */\n async getEstimate(\n params: SubscriptionEstimateParams,\n options?: RequestExtras,\n ): Promise<SubscriptionEstimateResponse> {\n return this.request('GET', '/subscriptions/estimate', {\n query: params as unknown as Record<string, string | number | undefined>,\n ...options,\n });\n }\n\n /** List purchasable subscription items (plans/addons). `GET /subscriptions/items` */\n async getItems(\n params: GetSubscriptionItemsParams,\n options?: RequestExtras,\n ): Promise<GetSubscriptionItemsResponse[]> {\n return this.request('GET', '/subscriptions/items', {\n query: params as unknown as Record<string, string | number | undefined>,\n ...options,\n });\n }\n\n /**\n * {@link getItems}, with whether the list is only the first part of what the\n * processor holds. `GET /subscriptions/items`\n *\n * The backend states that in the `X-Delopay-Items-Truncated` response\n * header (Stripe Billing lists its first 100 products), which the plain\n * {@link getItems} cannot return. Without `limit` and `offset` every item\n * the billing account offers is listed, up to 500.\n */\n async getItemsPage(\n params: GetSubscriptionItemsParams,\n options?: RequestExtras,\n ): Promise<SubscriptionItemsPage> {\n let truncated = false;\n const items = await this.request<GetSubscriptionItemsResponse[]>(\n 'GET',\n '/subscriptions/items',\n {\n query: params as unknown as Record<string, string | number | undefined>,\n ...options,\n onDownloadProgress: (event) => {\n // The headers arrive with the first event; a retried request reports\n // them again, and the last attempt is the one the items come from.\n truncated = event.headers.get('x-delopay-items-truncated')?.toLowerCase() === 'true';\n options?.onDownloadProgress?.(event);\n },\n },\n );\n return { items, truncated };\n }\n\n /**\n * Pause a subscription. `POST /subscriptions/{subscriptionId}/pause`\n *\n * From the dashboard this counts against the caller's `subscription_change`\n * operation limit; an over-limit call fails with `DE_01` and nothing reaches\n * the processor. Calls made with an API key are not limited.\n *\n * The body defaults to `{}` so the request still carries\n * `Content-Type: application/json` even when no params are passed — the\n * backend rejects the POST otherwise (\"Unsupported content type\").\n */\n async pause(\n subscriptionId: string,\n params?: PauseSubscriptionRequest,\n options?: RequestExtras,\n ): Promise<PauseSubscriptionResponse> {\n return this.request('POST', `/subscriptions/${encodeURIComponent(subscriptionId)}/pause`, {\n body: params ?? {},\n ...options,\n });\n }\n\n /**\n * Resume a paused subscription. `POST /subscriptions/{subscriptionId}/resume`\n *\n * From the dashboard this counts against the caller's `subscription_change`\n * operation limit; an over-limit call fails with `DE_01` and nothing reaches\n * the processor. Calls made with an API key are not limited.\n */\n async resume(\n subscriptionId: string,\n params?: ResumeSubscriptionRequest,\n options?: RequestExtras,\n ): Promise<ResumeSubscriptionResponse> {\n return this.request('POST', `/subscriptions/${encodeURIComponent(subscriptionId)}/resume`, {\n body: params ?? {},\n ...options,\n });\n }\n\n /**\n * Cancel a subscription. `POST /subscriptions/{subscriptionId}/cancel`\n *\n * A subscription in a state it cannot be cancelled from is refused with\n * `DE_11`; `error.data.reason` then names why (`SubscriptionActionRefusal`).\n *\n * From the dashboard this counts against the caller's `subscription_change`\n * operation limit; an over-limit call fails with `DE_01` and nothing reaches\n * the processor. Calls made with an API key are not limited.\n */\n async cancel(\n subscriptionId: string,\n params?: CancelSubscriptionRequest,\n options?: RequestExtras,\n ): Promise<CancelSubscriptionResponse> {\n return this.request('POST', `/subscriptions/${encodeURIComponent(subscriptionId)}/cancel`, {\n body: params ?? {},\n ...options,\n });\n }\n\n /**\n * Read 1 to 50 subscriptions back from their billing processor and mirror\n * what it reports. `POST /subscriptions/sync`\n *\n * Nothing is written at the processor. A status is mirrored only with the\n * time the processor stamped it with, and never over a newer event already\n * recorded; a plan only with its own stamp. One result per id, in request\n * order; one that fails does not stop the others.\n */\n async sync(\n params: SubscriptionSyncRequest,\n options?: RequestExtras,\n ): Promise<SubscriptionSyncResponse> {\n return this.request('POST', '/subscriptions/sync', { body: params, ...options });\n }\n\n /**\n * Read one subscription back from its billing processor and mirror what it\n * reports, as {@link sync} does, with what the processor reported beside\n * what the mirror now holds. `POST /subscriptions/{subscriptionId}/sync`\n */\n async syncOne(subscriptionId: string, options?: RequestExtras): Promise<SubscriptionSyncResult> {\n return this.request('POST', `/subscriptions/${encodeURIComponent(subscriptionId)}/sync`, {\n ...options,\n });\n }\n\n /**\n * List the subscriptions a billing account holds at its processor, and how\n * each relates to DeloPay's: already held, new (its buyer is a DeloPay\n * customer), needing a customer, ended, or not adoptable here.\n * `POST /subscriptions/import/preview`\n *\n * Reads only; nothing is written here or at the processor. Creem and\n * Stripe Billing can be listed; PayPal cannot, which `capabilities` states\n * (`reason_code: 'listing_unsupported'`).\n */\n async importPreview(\n params: SubscriptionImportPreviewRequest,\n options?: RequestExtras,\n ): Promise<SubscriptionImportPreviewResponse> {\n return this.request('POST', '/subscriptions/import/preview', { body: params, ...options });\n }\n\n /**\n * Take 1 to 25 processor subscriptions over, each through {@link adopt}\n * with every one of its checks, one after another.\n * `POST /subscriptions/import/apply`\n *\n * One result per selection, in request order; one refused does not stop\n * the others.\n */\n async importApply(\n params: SubscriptionImportApplyRequest,\n options?: RequestExtras,\n ): Promise<SubscriptionImportApplyResponse> {\n return this.request('POST', '/subscriptions/import/apply', { body: params, ...options });\n }\n\n /**\n * Resolve which of the given payments were raised by a subscription.\n * `POST /subscriptions/payments/lookup`\n *\n * The linkage exists in one direction only — an invoice points at the payment\n * it settled, and nothing is stamped on the payment — so this is the only way\n * to tell a subscription charge from a one-off one when you are holding a\n * page of payments. In particular, do not use `off_session` or the presence\n * of a mandate: an ordinary saved-card charge sets those identically.\n *\n * Ids that belong to no subscription are **absent** from `links` rather than\n * returned as an error, so match on presence:\n *\n * ```ts\n * const { links } = await subscriptions.lookupPayments(\n * { payment_ids: page.map((p) => p.payment_id) },\n * { headers: { 'X-Profile-Id': profileId } },\n * );\n * const bySubscription = new Map(links.map((l) => [l.payment_id, l]));\n * ```\n *\n * Profile-scoped like every other subscription route, and that matters more\n * here than elsewhere: a `payment_id` is merchant-supplied and only unique\n * within a merchant, so the shop is part of the question, not an\n * optimisation. Pass the profile that owns **the payments** — for a list\n * spanning several shops, group the ids by shop and call once per group.\n *\n * At most 200 ids per call.\n */\n async lookupPayments(\n params: SubscriptionPaymentLookupRequest,\n options?: RequestExtras,\n ): Promise<SubscriptionPaymentLookupResponse> {\n return this.request('POST', '/subscriptions/payments/lookup', { body: params, ...options });\n }\n\n /**\n * One subscription's billing history, newest cycle first.\n * `GET /subscriptions/{subscriptionId}/invoices`\n *\n * {@link retrieve} carries only the *latest* invoice, which is the current\n * cycle — a subscription that has renewed monthly for a year has one of those\n * and twelve of these. Use this wherever a merchant needs to see what a\n * subscription has actually billed, in particular on self-charging processors\n * (Creem, PayPal) where each renewal is charged by the processor and mirrored\n * here rather than raised as a DeloPay payment.\n *\n * Two things to render honestly, both decided rather than incidental:\n *\n * - `amount` is **gross** and `refunded_amount` sits beside it. Do not net\n * them: the difference between the two is not a smaller charge.\n * - A `refunded_amount` of `null` is \"not reported\" and must not render as\n * `0`. Likewise a processor-hosted origination records a bootstrap invoice\n * at `0` before the buyer has paid anything, so a zero amount on such a\n * subscription is a placeholder rather than a free cycle.\n *\n * Profile-scoped like every other subscription route.\n */\n async listInvoices(\n subscriptionId: string,\n params?: SubscriptionInvoiceListParams,\n options?: RequestExtras,\n ): Promise<SubscriptionInvoiceListResponse> {\n return this.request('GET', `/subscriptions/${encodeURIComponent(subscriptionId)}/invoices`, {\n query: params as Record<string, string | number | undefined>,\n ...options,\n });\n }\n\n /**\n * Refund one paid subscription invoice at the billing processor that charged it.\n * `POST /subscriptions/{subscriptionId}/invoices/{invoiceId}/refund`\n *\n * Needs the refund permission, as a payment refund does, and the merchant's\n * refund rules apply. Only invoices of processor-billed cycles are refunded\n * here; a cycle paid by a payment is refunded through `refunds.create`. The\n * processor refunds the whole amount left on the charge, so omit `amount` or\n * send exactly that remainder.\n *\n * The answer is usually `pending` or `succeeded`: the invoice's refunded total\n * moves, and `invoice_refunded` is sent, once the processor reports the refund.\n * The same `idempotency_key` again answers the first refund and sends nothing.\n * While one refund of an invoice awaits the processor, another is refused.\n */\n async refundInvoice(\n subscriptionId: string,\n invoiceId: string,\n params: SubscriptionInvoiceRefundRequest,\n options?: RequestExtras,\n ): Promise<SubscriptionInvoiceRefundResponse> {\n return this.request(\n 'POST',\n `/subscriptions/${encodeURIComponent(subscriptionId)}/invoices/${encodeURIComponent(invoiceId)}/refund`,\n { body: params, ...options, bodyIdempotencyKey: params.idempotency_key },\n );\n }\n\n /**\n * The refunds of one subscription invoice made through the API, oldest first.\n * `GET /subscriptions/{subscriptionId}/invoices/{invoiceId}/refunds`\n *\n * Needs subscription read. A refund whose processor reported a refund of the\n * invoice without a refund time of its own, while this one awaited it, reads\n * `awaiting_confirmation` with the processor's refunds it may be in\n * `confirmation_candidates`.\n */\n async listInvoiceRefunds(\n subscriptionId: string,\n invoiceId: string,\n options?: RequestExtras,\n ): Promise<SubscriptionInvoiceRefundListResponse> {\n return this.request(\n 'GET',\n `/subscriptions/${encodeURIComponent(subscriptionId)}/invoices/${encodeURIComponent(invoiceId)}/refunds`,\n options,\n );\n }\n\n /**\n * Confirm that a refund the processor reported is this refund, once checked\n * at the processor.\n * `POST /subscriptions/{subscriptionId}/invoices/{invoiceId}/refunds/{refundId}/confirm`\n *\n * Needs the refund permission. Only a refund in `awaiting_confirmation` is\n * confirmed, and only with one of its `confirmation_candidates`; it becomes\n * `succeeded` with the processor's refund id and amount. The invoice's\n * refunded total does not move and no webhook is sent. The same candidate\n * again answers the refund as it stands. A refund that does not await\n * confirmation, or a processor refund that is not one of its candidates, is\n * refused with a 400 (`IR_16`); a subscription, invoice or refund that is not\n * found answers 404. Only `connector_refund_id` is sent, so a candidate from\n * `confirmation_candidates` can be passed as it is.\n */\n async confirmInvoiceRefund(\n subscriptionId: string,\n invoiceId: string,\n refundId: string,\n params: SubscriptionInvoiceRefundConfirmRequest,\n options?: RequestExtras,\n ): Promise<SubscriptionInvoiceRefundResponse> {\n return this.request(\n 'POST',\n `/subscriptions/${encodeURIComponent(subscriptionId)}/invoices/${encodeURIComponent(invoiceId)}/refunds/${encodeURIComponent(refundId)}/confirm`,\n { ...options, body: { connector_refund_id: params.connector_refund_id } },\n );\n }\n\n /**\n * Which billing processor this shop's subscriptions run on.\n * `GET /subscriptions/billing_processor`\n *\n * The same mapping is derivable from the connector inventory\n * (`GET /account/{merchant_id}/connectors`), but that route is gated by a\n * connector-read permission granted independently of subscriptions — so a\n * role authorised to create subscriptions could be unable to learn which\n * processor it was creating them on. This answers under the same\n * authorization as the rest of the subscription API.\n *\n * Reach for it when the client must branch on the processor *before* calling\n * — origination differs by processor, and guessing is destructive. Resolve\n * the shop's `billing_processor_id` first: a shop that runs no subscriptions\n * has none assigned, and this route has no identity to report for it.\n */\n async getBillingProcessor(\n options?: RequestExtras,\n ): Promise<SubscriptionBillingProcessorResponse> {\n return this.request('GET', '/subscriptions/billing_processor', { ...options });\n }\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/resources/buyerBlocklist.ts"],"sourcesContent":["import type {\n BuyerBlocklistCapabilitiesResponse,\n BuyerBlocklistEntryCreateRequest,\n BuyerBlocklistEntryDeleteRequest,\n BuyerBlocklistEntryResponse,\n BuyerBlocklistEventsQuery,\n BuyerBlocklistEventsResponse,\n BuyerBlocklistFromPaymentPreviewRequest,\n BuyerBlocklistFromPaymentPreviewResponse,\n BuyerBlocklistFromPaymentRequest,\n BuyerBlocklistListQuery,\n BuyerBlocklistListResponse,\n PaymentFraudSignalsResponse,\n RadarSyncSettingsListResponse,\n RadarSyncSettingsResponse,\n RadarSyncSettingsUpdateRequest,\n} from '../types';\nimport type { RequestFn } from '../client';\nimport { csvQuery } from '../listQuery';\n\n/**\n * Buyer blocklist: the buyers a merchant refuses to sell to again, in every\n * shop of the merchant or in one shop. One entry names the buyer by email\n * address, IP address, IP range, customer id, device id, Stripe card\n * fingerprint and card BIN, at most one of each and at least one in total,\n * and blocks a payment when any one of them matches. An entry can instead\n * block a class of network (hosting, VPN or proxy, Tor, residential proxy) on its own. A blocked buyer's hosted checkout\n * and confirms fail with error code `DE_14`, and the payments create\n * response marks the buyer with `buyer_blocked` and the entry's\n * `buyer_block_note`. Card fingerprints, emails, IPs and BINs can also be\n * copied to Stripe Radar value lists per Stripe connection; a Radar list\n * blocks only once its rule is added in Stripe (`rule_needed`).\n *\n * Every route needs a dashboard session. Reading needs the `BuyerBlocklist`\n * area at `Read`, adding and removing needs `Write`. A caller scoped to one\n * shop lists, adds and removes that shop's entries only, and never an entry\n * that blocks in every shop.\n */\nexport class BuyerBlocklist {\n constructor(private readonly request: RequestFn) {}\n\n /**\n * One page of blocked buyers, newest first unless `sort_by` says otherwise,\n * filtered by scope, by `kind` (the entries that include an identifier of\n * that kind, or of any of several) and by a search over every identifier\n * and the note. Expired entries are not listed.\n * `GET /buyer-blocklist`\n */\n async list(params?: BuyerBlocklistListQuery): Promise<BuyerBlocklistListResponse> {\n return this.request('GET', '/buyer-blocklist', {\n query: csvQuery(params, ['kind']),\n });\n }\n\n /**\n * Block a buyer in one shop or, without `profile_id`, in every shop of the\n * merchant, named by one or more of `email`, `ip`, `customer_id` and\n * `device_id`. Each identifier is normalised as it is matched; an\n * identifier another entry already names in that scope is refused. The\n * change is recorded in the audit log before it is made.\n * `POST /buyer-blocklist`\n */\n async create(params: BuyerBlocklistEntryCreateRequest): Promise<BuyerBlocklistEntryResponse> {\n return this.request('POST', '/buyer-blocklist', { body: params });\n }\n\n /**\n * Remove an entry, so the buyer can pay again. Payments the entry already\n * refused keep their status. The removal and the optional `reason` are\n * recorded in the audit log before it is made. The route requires a body,\n * so `{}` is sent when no reason is given.\n * `DELETE /buyer-blocklist/{entry_id}`\n */\n async delete(\n entryId: string,\n params?: BuyerBlocklistEntryDeleteRequest,\n ): Promise<BuyerBlocklistEntryResponse> {\n return this.request('DELETE', `/buyer-blocklist/${encodeURIComponent(entryId)}`, {\n body: params ?? {},\n });\n }\n\n /**\n * Block the buyer of a payment by the identifiers the payment carries:\n * its card (the Stripe fingerprint), email, IP, device or customer, in the\n * payment's shop or in every shop. With `all_ips`, also every address the\n * buyer was seen paying from, one entry each, grouped under one\n * `group_id`; the answer then carries `ip_snapshot`.\n * `POST /buyer-blocklist/from-payment`\n */\n async createFromPayment(\n params: BuyerBlocklistFromPaymentRequest,\n ): Promise<BuyerBlocklistEntryResponse> {\n return this.request('POST', '/buyer-blocklist/from-payment', { body: params });\n }\n\n /**\n * The addresses an \"all IPs\" block of a payment's buyer would take: the\n * payment's own, then those its device, email or card were seen at in the\n * last 90 days, newest first, at most 20. An address shared with two or\n * more other buyers is offered but not preselected. Writes nothing; needs\n * the same permissions as the block.\n * `POST /buyer-blocklist/from-payment/preview`\n */\n async previewFromPayment(\n params: BuyerBlocklistFromPaymentPreviewRequest,\n ): Promise<BuyerBlocklistFromPaymentPreviewResponse> {\n return this.request('POST', '/buyer-blocklist/from-payment/preview', { body: params });\n }\n\n /**\n * An entry's recorded refusals, newest first, with where each happened and\n * which identifier matched. A caller scoped to one shop reaches only its own\n * shop's entries.\n * `GET /buyer-blocklist/{entry_id}/events`\n */\n async listEvents(\n entryId: string,\n params?: BuyerBlocklistEventsQuery,\n ): Promise<BuyerBlocklistEventsResponse> {\n return this.request('GET', `/buyer-blocklist/${encodeURIComponent(entryId)}/events`, {\n query: params as Record<string, string | number | null | undefined>,\n });\n }\n\n /**\n * Which classes of network an `ip_class` entry can be judged by on this\n * deployment now, and by which sources.\n * `GET /buyer-blocklist/capabilities`\n */\n async capabilities(): Promise<BuyerBlocklistCapabilitiesResponse> {\n return this.request('GET', '/buyer-blocklist/capabilities');\n }\n\n /**\n * Retry now every failed or pending Radar sync of an entry.\n * `POST /buyer-blocklist/{entry_id}/sync/retry`\n */\n async retrySync(entryId: string): Promise<BuyerBlocklistEntryResponse> {\n return this.request('POST', `/buyer-blocklist/${encodeURIComponent(entryId)}/sync/retry`);\n }\n\n /**\n * The Radar sync settings of every Stripe connection the caller sees. A\n * role that hides processor names is refused (403).\n * `GET /buyer-blocklist/radar-sync`\n */\n async listRadarSync(): Promise<RadarSyncSettingsListResponse> {\n return this.request('GET', '/buyer-blocklist/radar-sync');\n }\n\n /**\n * The Radar sync settings of one Stripe connection.\n * `GET /buyer-blocklist/radar-sync/{merchant_connector_id}`\n */\n async retrieveRadarSync(merchantConnectorId: string): Promise<RadarSyncSettingsResponse> {\n return this.request(\n 'GET',\n `/buyer-blocklist/radar-sync/${encodeURIComponent(merchantConnectorId)}`,\n );\n }\n\n /**\n * Turn Radar sync on or off for one Stripe connection and set what an\n * early fraud warning or a review does.\n * `PUT /buyer-blocklist/radar-sync/{merchant_connector_id}`\n */\n async updateRadarSync(\n merchantConnectorId: string,\n params: RadarSyncSettingsUpdateRequest,\n ): Promise<RadarSyncSettingsResponse> {\n return this.request(\n 'PUT',\n `/buyer-blocklist/radar-sync/${encodeURIComponent(merchantConnectorId)}`,\n { body: params },\n );\n }\n\n /**\n * Remove every item DeloPay synced from this connection's Radar lists. The\n * lists themselves are kept.\n * `POST /buyer-blocklist/radar-sync/{merchant_connector_id}/remove-items`\n */\n async removeRadarItems(merchantConnectorId: string): Promise<RadarSyncSettingsResponse> {\n return this.request(\n 'POST',\n `/buyer-blocklist/radar-sync/${encodeURIComponent(merchantConnectorId)}/remove-items`,\n );\n }\n\n /**\n * Stripe's fraud signals on a payment (risk, early fraud warnings,\n * reviews), what of its buyer can be blocked, and the entries that\n * already match it.\n * `GET /buyer-blocklist/fraud-signals/{payment_id}`\n */\n async fraudSignals(paymentId: string): Promise<PaymentFraudSignalsResponse> {\n return this.request('GET', `/buyer-blocklist/fraud-signals/${encodeURIComponent(paymentId)}`);\n }\n}\n"],"mappings":";;;;;AAsCO,IA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