@delopay/sdk 0.459.0 → 0.463.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 (331) 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-25KYFJIB.js → chunk-2VNT2GKF.js} +2 -2
  10. package/dist/chunk-34PC72O7.cjs.map +1 -1
  11. package/dist/chunk-3GBWQWTP.cjs.map +1 -1
  12. package/dist/chunk-3YBBJT3Y.cjs.map +1 -1
  13. package/dist/{chunk-RBNTITQG.js → chunk-3YRWCQXM.js} +42 -3
  14. package/dist/chunk-3YRWCQXM.js.map +1 -0
  15. package/dist/chunk-44QBWVRS.cjs.map +1 -1
  16. package/dist/chunk-4EKAWNYI.cjs.map +1 -1
  17. package/dist/chunk-4LN4BR2T.cjs.map +1 -1
  18. package/dist/{chunk-T3X5DOSW.js → chunk-4QXG4523.js} +4 -2
  19. package/dist/{chunk-T3X5DOSW.js.map → chunk-4QXG4523.js.map} +1 -1
  20. package/dist/chunk-4T4XHPYN.cjs.map +1 -1
  21. package/dist/{chunk-T5BLVSK3.js → chunk-4WZMHDID.js} +37 -4
  22. package/dist/chunk-4WZMHDID.js.map +1 -0
  23. package/dist/chunk-5CITBN33.cjs.map +1 -1
  24. package/dist/chunk-5HCKC4HF.cjs.map +1 -1
  25. package/dist/chunk-5O2JSQYA.cjs.map +1 -1
  26. package/dist/chunk-6EBY2KKL.cjs.map +1 -1
  27. package/dist/chunk-6LFOM6HV.cjs.map +1 -1
  28. package/dist/chunk-6LOWE2YI.cjs.map +1 -1
  29. package/dist/chunk-6LSG5Z4T.cjs.map +1 -1
  30. package/dist/chunk-6SU2MTN2.cjs.map +1 -1
  31. package/dist/chunk-6YCDLSIU.cjs.map +1 -1
  32. package/dist/chunk-75E5WNJG.cjs.map +1 -1
  33. package/dist/chunk-7JV6VVO7.cjs.map +1 -1
  34. package/dist/{chunk-66PCQHAT.js → chunk-7M26ZQVW.js} +4 -4
  35. package/dist/chunk-7QZCUXWB.cjs.map +1 -1
  36. package/dist/chunk-7VXF5D67.cjs.map +1 -1
  37. package/dist/chunk-ABWAYMN5.cjs.map +1 -1
  38. package/dist/chunk-ACZ2R47X.cjs.map +1 -1
  39. package/dist/chunk-AYUYJO3I.cjs.map +1 -1
  40. package/dist/chunk-BCA3TCGS.cjs.map +1 -1
  41. package/dist/chunk-BP6KDQ6I.cjs.map +1 -1
  42. package/dist/chunk-BRY3W7N3.cjs.map +1 -1
  43. package/dist/{chunk-MCBBXUKA.js → chunk-BUNJVWPX.js} +14 -5
  44. package/dist/chunk-BUNJVWPX.js.map +1 -0
  45. package/dist/chunk-CAMALM35.cjs.map +1 -1
  46. package/dist/chunk-CCN44NZJ.cjs.map +1 -1
  47. package/dist/chunk-CKKNFFKP.cjs.map +1 -1
  48. package/dist/chunk-CR3JBTP3.cjs.map +1 -1
  49. package/dist/chunk-DJASVBOJ.cjs.map +1 -1
  50. package/dist/chunk-EEB2HDYL.cjs.map +1 -1
  51. package/dist/chunk-ENPSUWTS.cjs.map +1 -1
  52. package/dist/chunk-EQ6P6ZND.cjs.map +1 -1
  53. package/dist/chunk-EXPWQBI3.cjs.map +1 -1
  54. package/dist/chunk-F3I5DOWV.cjs.map +1 -1
  55. package/dist/chunk-F46K5H3U.cjs.map +1 -1
  56. package/dist/chunk-F6S3WCCB.cjs.map +1 -1
  57. package/dist/chunk-FG7YBXJQ.cjs.map +1 -1
  58. package/dist/chunk-FQRC4NJG.cjs.map +1 -1
  59. package/dist/chunk-FYISDU2Y.cjs.map +1 -1
  60. package/dist/chunk-GG52SAHA.cjs.map +1 -1
  61. package/dist/chunk-GK5FWN4H.cjs.map +1 -1
  62. package/dist/chunk-GSQN5EOO.cjs.map +1 -1
  63. package/dist/chunk-GW7IHYXR.cjs.map +1 -1
  64. package/dist/chunk-HLHML5ES.cjs.map +1 -1
  65. package/dist/chunk-HLKFUOAQ.cjs.map +1 -1
  66. package/dist/chunk-HLYGHP6F.cjs.map +1 -1
  67. package/dist/chunk-HSJABE7X.cjs.map +1 -1
  68. package/dist/chunk-I2W7AO4B.cjs.map +1 -1
  69. package/dist/chunk-I2XGNALG.cjs.map +1 -1
  70. package/dist/{chunk-GH6CASEG.cjs → chunk-IKLYLBTY.cjs} +42 -3
  71. package/dist/{chunk-RBNTITQG.js.map → chunk-IKLYLBTY.cjs.map} +1 -1
  72. package/dist/chunk-IKXGA2Z5.cjs.map +1 -1
  73. package/dist/chunk-IR2LFKKA.cjs.map +1 -1
  74. package/dist/chunk-J4ZB7MU4.cjs.map +1 -1
  75. package/dist/chunk-JPRSNCYP.cjs.map +1 -1
  76. package/dist/chunk-K5Q2H3VD.cjs.map +1 -1
  77. package/dist/chunk-KD5Y2YWK.cjs.map +1 -1
  78. package/dist/chunk-KJDMNF2T.cjs.map +1 -1
  79. package/dist/chunk-KLONGJCL.cjs.map +1 -1
  80. package/dist/chunk-KOB6MOAV.cjs.map +1 -1
  81. package/dist/chunk-KSJ7JLR3.cjs.map +1 -1
  82. package/dist/chunk-LJ2EG6JK.cjs.map +1 -1
  83. package/dist/chunk-LLYY4TCZ.cjs.map +1 -1
  84. package/dist/chunk-LYIBTVK6.cjs.map +1 -1
  85. package/dist/chunk-M3HWE7KT.cjs.map +1 -1
  86. package/dist/chunk-M3SJHFT4.cjs.map +1 -1
  87. package/dist/chunk-MCNDMK7F.cjs.map +1 -1
  88. package/dist/chunk-MLG6NXI6.cjs.map +1 -1
  89. package/dist/{chunk-IA6O7DWZ.cjs → chunk-MMBX2T4H.cjs} +7 -7
  90. package/dist/chunk-MMBX2T4H.cjs.map +1 -0
  91. package/dist/chunk-NFB3S2E6.cjs.map +1 -1
  92. package/dist/chunk-NYL3BNHR.cjs.map +1 -1
  93. package/dist/chunk-O4AYHLQX.cjs.map +1 -1
  94. package/dist/chunk-OAEKP665.cjs.map +1 -1
  95. package/dist/chunk-ODPNVNYE.cjs.map +1 -1
  96. package/dist/{chunk-UZUNBL7K.cjs → chunk-OEXXMVCI.cjs} +3 -3
  97. package/dist/chunk-OEXXMVCI.cjs.map +1 -0
  98. package/dist/chunk-OG2KJAYD.cjs.map +1 -1
  99. package/dist/{chunk-AVR2GPXU.cjs → chunk-ORCK5GQ3.cjs} +37 -4
  100. package/dist/chunk-ORCK5GQ3.cjs.map +1 -0
  101. package/dist/chunk-OWP7XBY2.cjs.map +1 -1
  102. package/dist/chunk-OYZP6NF6.cjs.map +1 -1
  103. package/dist/chunk-P4UILJVU.cjs.map +1 -1
  104. package/dist/chunk-P6JLNQ6L.cjs.map +1 -1
  105. package/dist/chunk-P7DYLUUI.cjs.map +1 -1
  106. package/dist/chunk-PKAE6AQT.cjs.map +1 -1
  107. package/dist/chunk-Q7M7DO7M.cjs.map +1 -1
  108. package/dist/chunk-QKUWFMZP.cjs.map +1 -1
  109. package/dist/chunk-QRSA72B3.cjs.map +1 -1
  110. package/dist/{chunk-S4TNMIX7.cjs → chunk-QTKJIW3T.cjs} +6 -4
  111. package/dist/chunk-QTKJIW3T.cjs.map +1 -0
  112. package/dist/chunk-QYNRNDIY.cjs.map +1 -1
  113. package/dist/chunk-R4FE6K43.cjs.map +1 -1
  114. package/dist/chunk-R4GA6BVP.cjs.map +1 -1
  115. package/dist/chunk-R5VYSZ3Q.cjs.map +1 -1
  116. package/dist/chunk-RHFUXHQN.cjs.map +1 -1
  117. package/dist/chunk-RI42IDRR.cjs.map +1 -1
  118. package/dist/chunk-RSVLVW4L.cjs.map +1 -1
  119. package/dist/chunk-S77LQWYC.cjs.map +1 -1
  120. package/dist/chunk-S7SBNOGS.cjs.map +1 -1
  121. package/dist/chunk-TMAJE5P2.cjs.map +1 -1
  122. package/dist/{chunk-NKDUQ2BI.cjs → chunk-TMMTDTCP.cjs} +14 -5
  123. package/dist/chunk-TMMTDTCP.cjs.map +1 -0
  124. package/dist/chunk-TNIJ6OSH.cjs.map +1 -1
  125. package/dist/chunk-U3JK7NBG.cjs.map +1 -1
  126. package/dist/chunk-UGSM7RJ2.cjs.map +1 -1
  127. package/dist/chunk-UKLZAOLW.cjs.map +1 -1
  128. package/dist/chunk-V47G7P6L.cjs.map +1 -1
  129. package/dist/chunk-VH5A6SMU.cjs.map +1 -1
  130. package/dist/chunk-VHMH4QMY.cjs.map +1 -1
  131. package/dist/chunk-VYC7WUM5.cjs.map +1 -1
  132. package/dist/chunk-W457XUA6.cjs.map +1 -1
  133. package/dist/chunk-WHDI3TMP.cjs.map +1 -1
  134. package/dist/chunk-WITCPKNL.cjs.map +1 -1
  135. package/dist/chunk-WX6NP7UU.cjs.map +1 -1
  136. package/dist/chunk-XQLRIBVR.cjs.map +1 -1
  137. package/dist/chunk-Y7LSSRNJ.cjs.map +1 -1
  138. package/dist/chunk-YK3P5QNZ.cjs.map +1 -1
  139. package/dist/chunk-ZKPVUCQV.cjs.map +1 -1
  140. package/dist/chunk-ZUULK36E.cjs.map +1 -1
  141. package/dist/client.cjs +2 -2
  142. package/dist/client.cjs.map +1 -1
  143. package/dist/client.js +1 -1
  144. package/dist/core.cjs.map +1 -1
  145. package/dist/currencies.cjs.map +1 -1
  146. package/dist/enigmaCardForm.cjs.map +1 -1
  147. package/dist/error.cjs.map +1 -1
  148. package/dist/eventStream.cjs.map +1 -1
  149. package/dist/exportDownload.cjs.map +1 -1
  150. package/dist/feeProgram.cjs.map +1 -1
  151. package/dist/index.cjs +6 -6
  152. package/dist/index.cjs.map +1 -1
  153. package/dist/index.d.cts +1 -1
  154. package/dist/index.d.ts +1 -1
  155. package/dist/index.js +5 -5
  156. package/dist/internal/resources/admin.cjs.map +1 -1
  157. package/dist/internal/resources/admin.d.cts +1 -1
  158. package/dist/internal/resources/admin.d.ts +1 -1
  159. package/dist/internal/resources/adminBranding.cjs.map +1 -1
  160. package/dist/internal/resources/adminBranding.d.cts +1 -1
  161. package/dist/internal/resources/adminBranding.d.ts +1 -1
  162. package/dist/internal/resources/adminCheckoutDomains.cjs.map +1 -1
  163. package/dist/internal/resources/adminCheckoutDomains.d.cts +1 -1
  164. package/dist/internal/resources/adminCheckoutDomains.d.ts +1 -1
  165. package/dist/internal/resources/adminFeePlans.cjs.map +1 -1
  166. package/dist/internal/resources/adminFeePlans.d.cts +1 -1
  167. package/dist/internal/resources/adminFeePlans.d.ts +1 -1
  168. package/dist/internal/resources/adminFileScans.cjs.map +1 -1
  169. package/dist/internal/resources/adminFileScans.d.cts +1 -1
  170. package/dist/internal/resources/adminFileScans.d.ts +1 -1
  171. package/dist/internal/resources/adminIndustries.cjs.map +1 -1
  172. package/dist/internal/resources/adminIndustries.d.cts +1 -1
  173. package/dist/internal/resources/adminIndustries.d.ts +1 -1
  174. package/dist/internal/resources/adminLive.cjs.map +1 -1
  175. package/dist/internal/resources/adminNotices.cjs.map +1 -1
  176. package/dist/internal/resources/adminNotices.d.cts +1 -1
  177. package/dist/internal/resources/adminNotices.d.ts +1 -1
  178. package/dist/internal/resources/adminPortal.cjs +2 -2
  179. package/dist/internal/resources/adminPortal.cjs.map +1 -1
  180. package/dist/internal/resources/adminPortal.d.cts +1 -1
  181. package/dist/internal/resources/adminPortal.d.ts +1 -1
  182. package/dist/internal/resources/adminPortal.js +1 -1
  183. package/dist/internal/resources/adminSupport.cjs.map +1 -1
  184. package/dist/internal/resources/adminSupport.d.cts +1 -1
  185. package/dist/internal/resources/adminSupport.d.ts +1 -1
  186. package/dist/internal/resources/auditLogs.cjs.map +1 -1
  187. package/dist/internal/resources/auditLogs.d.cts +1 -1
  188. package/dist/internal/resources/auditLogs.d.ts +1 -1
  189. package/dist/internal/resources/cache.cjs.map +1 -1
  190. package/dist/internal/resources/cardIssuers.cjs.map +1 -1
  191. package/dist/internal/resources/cardIssuers.d.cts +1 -1
  192. package/dist/internal/resources/cardIssuers.d.ts +1 -1
  193. package/dist/internal/resources/configs.cjs.map +1 -1
  194. package/dist/internal/resources/connectorRestrictionRules.cjs.map +1 -1
  195. package/dist/internal/resources/connectorRestrictionRules.d.cts +1 -1
  196. package/dist/internal/resources/connectorRestrictionRules.d.ts +1 -1
  197. package/dist/internal/resources/connectorRestrictions.cjs.map +1 -1
  198. package/dist/internal/resources/connectorRestrictions.d.cts +1 -1
  199. package/dist/internal/resources/connectorRestrictions.d.ts +1 -1
  200. package/dist/internal/resources/diagnostic.cjs.map +1 -1
  201. package/dist/internal/resources/diagnostic.d.cts +1 -1
  202. package/dist/internal/resources/diagnostic.d.ts +1 -1
  203. package/dist/internal/resources/gsm.cjs.map +1 -1
  204. package/dist/internal/resources/gsm.d.cts +1 -1
  205. package/dist/internal/resources/gsm.d.ts +1 -1
  206. package/dist/internal/resources/nativeRenewals.cjs.map +1 -1
  207. package/dist/internal/resources/nativeRenewals.d.cts +1 -1
  208. package/dist/internal/resources/nativeRenewals.d.ts +1 -1
  209. package/dist/internal/resources/platformBilling.cjs.map +1 -1
  210. package/dist/internal/resources/platformBilling.d.cts +1 -1
  211. package/dist/internal/resources/platformBilling.d.ts +1 -1
  212. package/dist/internal/resources/platformFees.cjs.map +1 -1
  213. package/dist/internal/resources/platformMessageTemplates.cjs.map +1 -1
  214. package/dist/internal/resources/platformSettings.cjs.map +1 -1
  215. package/dist/internal/resources/platformSettings.d.cts +1 -1
  216. package/dist/internal/resources/platformSettings.d.ts +1 -1
  217. package/dist/internal.cjs +9 -9
  218. package/dist/internal.cjs.map +1 -1
  219. package/dist/internal.d.cts +2 -2
  220. package/dist/internal.d.ts +2 -2
  221. package/dist/internal.js +6 -6
  222. package/dist/listQuery.cjs.map +1 -1
  223. package/dist/panes.cjs.map +1 -1
  224. package/dist/paymentPresentation.cjs.map +1 -1
  225. package/dist/recordCounter.cjs.map +1 -1
  226. package/dist/resources/aiTools.cjs.map +1 -1
  227. package/dist/resources/analytics.cjs.map +1 -1
  228. package/dist/resources/analyticsDashboard.cjs.map +1 -1
  229. package/dist/resources/apiKeys.cjs.map +1 -1
  230. package/dist/resources/audit.cjs.map +1 -1
  231. package/dist/resources/authentication.cjs.map +1 -1
  232. package/dist/resources/availabilityOverrides.cjs.map +1 -1
  233. package/dist/resources/billing.cjs.map +1 -1
  234. package/dist/resources/buyerAccount.cjs.map +1 -1
  235. package/dist/resources/buyerBlocklist.cjs.map +1 -1
  236. package/dist/resources/buyerConversations.cjs.map +1 -1
  237. package/dist/resources/buyerEvidenceReviews.cjs.map +1 -1
  238. package/dist/resources/buyerPortal.cjs.map +1 -1
  239. package/dist/resources/cards.cjs.map +1 -1
  240. package/dist/resources/chargebackPrevention.cjs.map +1 -1
  241. package/dist/resources/checkoutDomains.cjs.map +1 -1
  242. package/dist/resources/checkoutMethods.cjs.map +1 -1
  243. package/dist/resources/checkoutRecovery.cjs.map +1 -1
  244. package/dist/resources/checkoutTemplates.cjs.map +1 -1
  245. package/dist/resources/connectors.cjs.map +1 -1
  246. package/dist/resources/contentEncryption.cjs.map +1 -1
  247. package/dist/resources/costRules.cjs.map +1 -1
  248. package/dist/resources/customers.cjs.map +1 -1
  249. package/dist/resources/deploymentBranding.cjs.map +1 -1
  250. package/dist/resources/disputes.cjs.map +1 -1
  251. package/dist/resources/ephemeralKeys.cjs.map +1 -1
  252. package/dist/resources/events.cjs.map +1 -1
  253. package/dist/resources/export.cjs.map +1 -1
  254. package/dist/resources/externalRecords.cjs.map +1 -1
  255. package/dist/resources/featureMatrix.cjs.map +1 -1
  256. package/dist/resources/fees.cjs.map +1 -1
  257. package/dist/resources/files.cjs.map +1 -1
  258. package/dist/resources/forex.cjs.map +1 -1
  259. package/dist/resources/identityVerifications.cjs +2 -2
  260. package/dist/resources/identityVerifications.cjs.map +1 -1
  261. package/dist/resources/identityVerifications.d.cts +25 -4
  262. package/dist/resources/identityVerifications.d.ts +25 -4
  263. package/dist/resources/identityVerifications.js +1 -1
  264. package/dist/resources/industries.cjs.map +1 -1
  265. package/dist/resources/invoiceSettings.cjs.map +1 -1
  266. package/dist/resources/invoices.cjs.map +1 -1
  267. package/dist/resources/live.cjs.map +1 -1
  268. package/dist/resources/mandates.cjs.map +1 -1
  269. package/dist/resources/merchantAccounts.cjs.map +1 -1
  270. package/dist/resources/messageTemplates.cjs.map +1 -1
  271. package/dist/resources/notices.cjs.map +1 -1
  272. package/dist/resources/operationLimits.cjs.map +1 -1
  273. package/dist/resources/paymentLinks.cjs.map +1 -1
  274. package/dist/resources/paymentMethods.cjs.map +1 -1
  275. package/dist/resources/payments.cjs +2 -2
  276. package/dist/resources/payments.cjs.map +1 -1
  277. package/dist/resources/payments.d.cts +2 -1
  278. package/dist/resources/payments.d.ts +2 -1
  279. package/dist/resources/payments.js +1 -1
  280. package/dist/resources/payoutDestinations.cjs.map +1 -1
  281. package/dist/resources/payouts.cjs.map +1 -1
  282. package/dist/resources/paypalDisputes.cjs.map +1 -1
  283. package/dist/resources/persons.cjs.map +1 -1
  284. package/dist/resources/poll.cjs.map +1 -1
  285. package/dist/resources/processorCosts.cjs.map +1 -1
  286. package/dist/resources/processorImports.cjs.map +1 -1
  287. package/dist/resources/products.cjs.map +1 -1
  288. package/dist/resources/profileAcquirers.cjs.map +1 -1
  289. package/dist/resources/profiles.cjs.map +1 -1
  290. package/dist/resources/projects.cjs.map +1 -1
  291. package/dist/resources/refunds.cjs.map +1 -1
  292. package/dist/resources/regions.cjs.map +1 -1
  293. package/dist/resources/relay.cjs.map +1 -1
  294. package/dist/resources/risk.cjs.map +1 -1
  295. package/dist/resources/routing.cjs.map +1 -1
  296. package/dist/resources/search.cjs.map +1 -1
  297. package/dist/resources/sellToRestrictions.cjs.map +1 -1
  298. package/dist/resources/settings.cjs.map +1 -1
  299. package/dist/resources/settlement.cjs +2 -2
  300. package/dist/resources/settlement.cjs.map +1 -1
  301. package/dist/resources/settlement.d.cts +28 -3
  302. package/dist/resources/settlement.d.ts +28 -3
  303. package/dist/resources/settlement.js +1 -1
  304. package/dist/resources/shopLabels.cjs.map +1 -1
  305. package/dist/resources/shops.cjs.map +1 -1
  306. package/dist/resources/stripeConnect.cjs.map +1 -1
  307. package/dist/resources/subscriptions.cjs.map +1 -1
  308. package/dist/resources/support.cjs.map +1 -1
  309. package/dist/resources/threeDsRules.cjs.map +1 -1
  310. package/dist/resources/users.cjs.map +1 -1
  311. package/dist/resources/vatRates.cjs.map +1 -1
  312. package/dist/resources/verification.cjs.map +1 -1
  313. package/dist/resources/webhooks.cjs.map +1 -1
  314. package/dist/resources/whopResolutionCases.cjs.map +1 -1
  315. package/dist/trustedOrigins.cjs.map +1 -1
  316. package/dist/{types-BgtOYc1g.d.ts → types-Bx0-pI7E.d.ts} +11 -1
  317. package/dist/{types-n2jLRgEU.d.cts → types-C8ojZumf.d.cts} +11 -1
  318. package/dist/types.cjs.map +1 -1
  319. package/dist/types.d.cts +181 -10
  320. package/dist/types.d.ts +181 -10
  321. package/package.json +19 -17
  322. package/dist/chunk-AVR2GPXU.cjs.map +0 -1
  323. package/dist/chunk-GH6CASEG.cjs.map +0 -1
  324. package/dist/chunk-IA6O7DWZ.cjs.map +0 -1
  325. package/dist/chunk-MCBBXUKA.js.map +0 -1
  326. package/dist/chunk-NKDUQ2BI.cjs.map +0 -1
  327. package/dist/chunk-S4TNMIX7.cjs.map +0 -1
  328. package/dist/chunk-T5BLVSK3.js.map +0 -1
  329. package/dist/chunk-UZUNBL7K.cjs.map +0 -1
  330. /package/dist/{chunk-25KYFJIB.js.map → chunk-2VNT2GKF.js.map} +0 -0
  331. /package/dist/{chunk-66PCQHAT.js.map → chunk-7M26ZQVW.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"sources":["/tmp/sdk-pub-0459/dist/chunk-UKLZAOLW.cjs","../src/resources/checkoutMethods.ts"],"names":[],"mappings":"AAAA;AC8BO,IAAM,gBAAA,EAAN,MAAsB;AAAA,EAC3B,WAAA,CAA6B,OAAA,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B,QAAA;AACE,UAAA;AACF,QAAA;AACF,MAAA;AACF,IAAA;AAC2B,IAAA;AACzB,MAAA;AACD,IAAA;AACH,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASE,EAAA;AAIoB,IAAA;AACI,MAAA;AACnB,MAAA;AACJ,IAAA;AACH,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASE,EAAA;AAKY,IAAA;AACV,MAAA;AAC0B,MAAA;AACF,MAAA;AAC1B,IAAA;AACF,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAaE,EAAA;AAMY,IAAA;AACV,MAAA;AAC0B,MAAA;AACF,MAAA;AAC1B,IAAA;AACF,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASE,EAAA;AAMY,IAAA;AACV,MAAA;AACqB,MAAA;AACG,MAAA;AAC1B,IAAA;AACF,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAaE,EAAA;AAG2B,IAAA;AACH,MAAA;AACvB,IAAA;AACH,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUE,EAAA;AAK2B,IAAA;AACH,MAAA;AACtB,MAAA;AACD,IAAA;AACH,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQE,EAAA;AAIoB,IAAA;AACI,MAAA;AACvB,IAAA;AACH,EAAA;AACF;AAEwC;AACzB,EAAA;AACU,EAAA;AACzB;AAEwC;AACzB,EAAA;AACU,EAAA;AACzB;ADpGgC;AACA;AACA;AACA","file":"/tmp/sdk-pub-0459/dist/chunk-UKLZAOLW.cjs","sourcesContent":[null,"import type {\n CheckoutAccountVisibilityRequest,\n CheckoutAccountVisibilityResponse,\n CheckoutEntriesResponse,\n CheckoutEntriesUpdateRequest,\n CheckoutMethodsAvailabilityParams,\n CheckoutMethodsAvailabilityResponse,\n CheckoutMethodsChildrenParams,\n CheckoutMethodsChildrenResponse,\n CheckoutMethodsEnvironmentParams,\n CheckoutMethodsResetResponse,\n CheckoutMethodsResponse,\n CheckoutMethodsUpdateRequest,\n ConnectorCoverageResponse,\n CheckoutPaymentMethodOptionsResponse,\n CheckoutRedirectRulesTestRequest,\n CheckoutRedirectRulesTestResponse,\n} from '../types';\nimport type { RequestExtras, RequestFn } from '../client';\n\n/**\n * A shop's payment-method layout for the hosted checkout: the express strip,\n * the main list, the \"other payment methods\" list, and each item's overrides\n * (text, translations, icon, look, open target, visibility). One document per\n * shop (business profile), owned by the shop rather than by each connector\n * account. Until a shop saves one, the router derives a layout from the\n * shop's connector accounts and reports `source: 'derived'`.\n *\n * Dashboard JWT (`CheckoutMethods` read / write) or an admin key.\n */\nexport class CheckoutMethods {\n constructor(private readonly request: RequestFn) {}\n\n /**\n * The shop's layout (stored, or derived from its accounts) and every item\n * it may place. Live's by default; `environment: 'test'` reads the Test\n * checkout's, used by payments with `test_mode: true`, which follows Live's\n * (`follows_live`) until its first save.\n * `GET /checkout-methods/{profile_id}` (`/test`)\n */\n async retrieve(\n merchantId: string,\n profileId: string,\n params: CheckoutMethodsEnvironmentParams = {},\n options?: RequestExtras,\n ): Promise<CheckoutMethodsResponse> {\n return this.request('GET', methodsPath(profileId, params.environment), {\n query: { merchant_id: merchantId },\n ...options,\n });\n }\n\n /**\n * The same document as {@link retrieve}, on the route that stays open to a\n * reader of the checkout's appearance while the role's payment-data\n * visibility is restricted.\n * `GET /checkout-methods/{profile_id}/preview` (`/test/preview`)\n */\n async preview(\n merchantId: string,\n profileId: string,\n params: CheckoutMethodsEnvironmentParams = {},\n options?: RequestExtras,\n ): Promise<CheckoutMethodsResponse> {\n return this.request('GET', `${methodsPath(profileId, params.environment)}/preview`, {\n query: { merchant_id: merchantId },\n ...options,\n });\n }\n\n /**\n * Replace the layout of one environment. The router refuses an express\n * item that does not draw its own button, more than two rows of two in the\n * express strip, a title without text, or an item no account of the shop\n * offers. Pass `options.headers` with the `If-Match` of the version read to\n * have a save over a newer change refused.\n * `PUT /checkout-methods/{profile_id}` (`/test`)\n */\n async update(\n merchantId: string,\n profileId: string,\n body: CheckoutMethodsUpdateRequest,\n params: CheckoutMethodsEnvironmentParams = {},\n options?: RequestExtras,\n ): Promise<CheckoutMethodsResponse> {\n return this.request('PUT', methodsPath(profileId, params.environment), {\n query: { merchant_id: merchantId },\n body,\n ...options,\n });\n }\n\n /**\n * For a buyer in `country` paying `amount` `currency`: which placeable\n * items they are offered and every reason they are not, asked the way the\n * hosted checkout asks; and how each smart block of the layout evaluates\n * for them (`smart_blocks`). `test_mode` asks the Test environment.\n * `GET /checkout-methods/{profile_id}/availability`\n */\n async availability(\n merchantId: string,\n profileId: string,\n params: CheckoutMethodsAvailabilityParams,\n ): Promise<CheckoutMethodsAvailabilityResponse> {\n const { test_mode, ...order } = params;\n const query = { merchant_id: merchantId, ...order };\n if (test_mode) {\n return this.request(\n 'GET',\n `/checkout-methods/${encodeURIComponent(profileId)}/test/availability`,\n { query },\n );\n }\n return this.request('GET', `/checkout-methods/${encodeURIComponent(profileId)}/availability`, {\n query,\n });\n }\n\n /**\n * What DeloPay's connector information says about a country, for any shop:\n * each provider's method, and whether the provider's list of countries names\n * it. A method with no list is `unknown`, which is no statement either way.\n * Nothing here comes from a merchant's accounts, and it is no promise about\n * what a shop's checkout offers. A role that may not read provider names gets\n * none. `GET /checkout-methods/coverage`\n *\n * @param country The buyer's country, ISO 3166-1 alpha-2.\n */\n async coverage(country: string): Promise<ConnectorCoverageResponse> {\n return this.request('GET', '/checkout-methods/coverage', { query: { country } });\n }\n\n /**\n * What DeloPay confirms beneath each item the shop can place: the card\n * networks the card form's accounts accept, and the methods or coins a\n * provider's page offers, per account, with source and freshness. A\n * provider that answers only per order reports `context_required` until\n * `currency` and `amount` are given. A layout item's `children` narrows\n * these lists and never adds to them.\n * `GET /checkout-methods/{profile_id}/children` (`/test/children` for Test)\n */\n async children(\n merchantId: string,\n profileId: string,\n params: CheckoutMethodsChildrenParams = {},\n ): Promise<CheckoutMethodsChildrenResponse> {\n const { environment, ...order } = params;\n const query = { merchant_id: merchantId, ...order };\n if (environment === 'test') {\n return this.request(\n 'GET',\n `/checkout-methods/${encodeURIComponent(profileId)}/test/children`,\n {\n query,\n },\n );\n }\n return this.request('GET', `/checkout-methods/${encodeURIComponent(profileId)}/children`, {\n query,\n });\n }\n\n /**\n * Delete the stored layout of one environment; Live is back on the derived\n * layout, Test follows Live again.\n * `DELETE /checkout-methods/{profile_id}` (`/test`)\n */\n async reset(\n merchantId: string,\n profileId: string,\n params: CheckoutMethodsEnvironmentParams = {},\n options?: RequestExtras,\n ): Promise<CheckoutMethodsResetResponse> {\n return this.request('DELETE', methodsPath(profileId, params.environment), {\n query: { merchant_id: merchantId },\n ...options,\n });\n }\n\n /**\n * The methods a payment of the shop can be limited to through\n * `allowed_payment_method_types`, in the order its checkout places them, for\n * one environment. Names methods only, never a processor or account.\n * `GET /checkout-methods/{profile_id}/payment-method-options` (`/test/…`)\n */\n async paymentMethodOptions(\n merchantId: string,\n profileId: string,\n params: CheckoutMethodsEnvironmentParams = {},\n options?: RequestExtras,\n ): Promise<CheckoutPaymentMethodOptionsResponse> {\n return this.request(\n 'GET',\n `${methodsPath(profileId, params.environment)}/payment-method-options`,\n { query: { merchant_id: merchantId }, ...options },\n );\n }\n\n /**\n * What the given redirect rules, saved or not, decide for the buyer the\n * body describes, and how each rule fared. The buyer's options are the\n * shop's layout after its availability rules and the cap states; nothing is\n * stored. Live's checkout by default, `environment: 'test'` for the Test\n * checkout's. Refused with 422 when the rules are malformed or name an\n * account that is not the shop's, and with 403 when they name one the\n * caller may not read.\n * `POST /checkout-methods/{profile_id}/redirect-rules/test` (`/test/…`)\n */\n async testRedirectRules(\n merchantId: string,\n profileId: string,\n body: CheckoutRedirectRulesTestRequest,\n params: CheckoutMethodsEnvironmentParams = {},\n options?: RequestExtras,\n ): Promise<CheckoutRedirectRulesTestResponse> {\n return this.request(\n 'POST',\n `${methodsPath(profileId, params.environment)}/redirect-rules/test`,\n { query: { merchant_id: merchantId }, body, ...options },\n );\n }\n\n /**\n * Hide a connector account from the checkout of the named environments, or\n * show it again. Its items stay in the layout, listed with\n * `account_enabled: false`; routing and credentials are not changed.\n * `PUT /checkout-methods/{profile_id}/accounts/{merchant_connector_id}/visibility`\n */\n async setAccountVisibility(\n merchantId: string,\n profileId: string,\n merchantConnectorId: string,\n body: CheckoutAccountVisibilityRequest,\n options?: RequestExtras,\n ): Promise<CheckoutAccountVisibilityResponse> {\n return this.request(\n 'PUT',\n `/checkout-methods/${encodeURIComponent(profileId)}/accounts/${encodeURIComponent(merchantConnectorId)}/visibility`,\n { query: { merchant_id: merchantId }, body, ...options },\n );\n }\n\n /**\n * The shop's checkout entries: separate ways into the hosted checkout of\n * one payment (`?entry=<key>`), such as a card form embedded in the shop's\n * page, a \"Pay with crypto\" checkout and an \"Other payment methods\"\n * checkout, each in its own named look. Live's by default; `environment:\n * 'test'` reads the Test checkout's, used by payments with `test_mode: true`.\n * Refused (403) to a caller that may not see or change every method.\n * `GET /checkout-methods/{profile_id}/entries` (`/test/entries`)\n */\n async entries(\n merchantId: string,\n profileId: string,\n params: { environment?: 'live' | 'test' } = {},\n ): Promise<CheckoutEntriesResponse> {\n return this.request('GET', entriesPath(profileId, params.environment), {\n query: { merchant_id: merchantId },\n });\n }\n\n /**\n * Replace the shop's entries of one environment. Refused when a key is\n * malformed or used twice, when an entry lists a method, group or card form\n * that environment's layout does not place, or when a card entry's\n * `other_entry` is not another `methods` entry.\n * `PUT /checkout-methods/{profile_id}/entries` (`/test/entries`)\n */\n async updateEntries(\n merchantId: string,\n profileId: string,\n body: CheckoutEntriesUpdateRequest,\n params: { environment?: 'live' | 'test' } = {},\n ): Promise<CheckoutEntriesResponse> {\n return this.request('PUT', entriesPath(profileId, params.environment), {\n query: { merchant_id: merchantId },\n body,\n });\n }\n\n /**\n * Delete every entry of one environment. A link that still names an entry\n * then offers nothing.\n * `DELETE /checkout-methods/{profile_id}/entries` (`/test/entries`)\n */\n async clearEntries(\n merchantId: string,\n profileId: string,\n params: { environment?: 'live' | 'test' } = {},\n ): Promise<CheckoutEntriesResponse> {\n return this.request('DELETE', entriesPath(profileId, params.environment), {\n query: { merchant_id: merchantId },\n });\n }\n}\n\nfunction methodsPath(profileId: string, environment: 'live' | 'test' | undefined): string {\n const shop = `/checkout-methods/${encodeURIComponent(profileId)}`;\n return environment === 'test' ? `${shop}/test` : shop;\n}\n\nfunction entriesPath(profileId: string, environment: 'live' | 'test' | undefined): string {\n const shop = `/checkout-methods/${encodeURIComponent(profileId)}`;\n return environment === 'test' ? `${shop}/test/entries` : `${shop}/entries`;\n}\n"]}
1
+ {"version":3,"sources":["/home/anes/delo-payment/sdk-publish-w2/dist/chunk-UKLZAOLW.cjs","../src/resources/checkoutMethods.ts"],"names":[],"mappings":"AAAA;AC8BO,IAAM,gBAAA,EAAN,MAAsB;AAAA,EAC3B,WAAA,CAA6B,OAAA,EAAoB;AAApB,IAAA,IAAA,CAAA,QAAA,EAAA,OAAA;AAAA,EAAqB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASlD,MAAM,QAAA,CACJ,UAAA,EACA,SAAA,EACA,OAAA,EAA2C,CAAC,CAAA,EAC5C,OAAA,EACkC;AAClC,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,KAAA,EAAO,WAAA,CAAY,SAAA,EAAW,MAAA,CAAO,WAAW,CAAA,EAAG;AAAA,MACrE,KAAA,EAAO,EAAE,WAAA,EAAa,WAAW,CAAA;AAAA,MACjC,GAAG;AAAA,IACL,CAAC,CAAA;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,MAAM,OAAA,CACJ,UAAA,EACA,SAAA,EACA,OAAA,EAA2C,CAAC,CAAA,EAC5C,OAAA,EACkC;AAClC,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,KAAA,EAAO,CAAA,EAAA;AACH,MAAA;AACnB,MAAA;AACJ,IAA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,IAAA;AACH,MAAA;AACvB,IAAA;AACH,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUE,EAAA;AAK2B,IAAA;AACH,MAAA;AACtB,MAAA;AACD,IAAA;AACH,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQE,EAAA;AAIoB,IAAA;AACI,MAAA;AACvB,IAAA;AACH,EAAA;AACF;AAEwC;AACzB,EAAA;AACU,EAAA;AACzB;AAEwC;AACzB,EAAA;AACU,EAAA;AACzB;ADpGgC;AACA;AACA;AACA","file":"/home/anes/delo-payment/sdk-publish-w2/dist/chunk-UKLZAOLW.cjs","sourcesContent":[null,"import type {\n CheckoutAccountVisibilityRequest,\n CheckoutAccountVisibilityResponse,\n CheckoutEntriesResponse,\n CheckoutEntriesUpdateRequest,\n CheckoutMethodsAvailabilityParams,\n CheckoutMethodsAvailabilityResponse,\n CheckoutMethodsChildrenParams,\n CheckoutMethodsChildrenResponse,\n CheckoutMethodsEnvironmentParams,\n CheckoutMethodsResetResponse,\n CheckoutMethodsResponse,\n CheckoutMethodsUpdateRequest,\n ConnectorCoverageResponse,\n CheckoutPaymentMethodOptionsResponse,\n CheckoutRedirectRulesTestRequest,\n CheckoutRedirectRulesTestResponse,\n} from '../types';\nimport type { RequestExtras, RequestFn } from '../client';\n\n/**\n * A shop's payment-method layout for the hosted checkout: the express strip,\n * the main list, the \"other payment methods\" list, and each item's overrides\n * (text, translations, icon, look, open target, visibility). One document per\n * shop (business profile), owned by the shop rather than by each connector\n * account. Until a shop saves one, the router derives a layout from the\n * shop's connector accounts and reports `source: 'derived'`.\n *\n * Dashboard JWT (`CheckoutMethods` read / write) or an admin key.\n */\nexport class CheckoutMethods {\n constructor(private readonly request: RequestFn) {}\n\n /**\n * The shop's layout (stored, or derived from its accounts) and every item\n * it may place. Live's by default; `environment: 'test'` reads the Test\n * checkout's, used by payments with `test_mode: true`, which follows Live's\n * (`follows_live`) until its first save.\n * `GET /checkout-methods/{profile_id}` (`/test`)\n */\n async retrieve(\n merchantId: string,\n profileId: string,\n params: CheckoutMethodsEnvironmentParams = {},\n options?: RequestExtras,\n ): Promise<CheckoutMethodsResponse> {\n return this.request('GET', methodsPath(profileId, params.environment), {\n query: { merchant_id: merchantId },\n ...options,\n });\n }\n\n /**\n * The same document as {@link retrieve}, on the route that stays open to a\n * reader of the checkout's appearance while the role's payment-data\n * visibility is restricted.\n * `GET /checkout-methods/{profile_id}/preview` (`/test/preview`)\n */\n async preview(\n merchantId: string,\n profileId: string,\n params: CheckoutMethodsEnvironmentParams = {},\n options?: RequestExtras,\n ): Promise<CheckoutMethodsResponse> {\n return this.request('GET', `${methodsPath(profileId, params.environment)}/preview`, {\n query: { merchant_id: merchantId },\n ...options,\n });\n }\n\n /**\n * Replace the layout of one environment. The router refuses an express\n * item that does not draw its own button, more than two rows of two in the\n * express strip, a title without text, or an item no account of the shop\n * offers. Pass `options.headers` with the `If-Match` of the version read to\n * have a save over a newer change refused.\n * `PUT /checkout-methods/{profile_id}` (`/test`)\n */\n async update(\n merchantId: string,\n profileId: string,\n body: CheckoutMethodsUpdateRequest,\n params: CheckoutMethodsEnvironmentParams = {},\n options?: RequestExtras,\n ): Promise<CheckoutMethodsResponse> {\n return this.request('PUT', methodsPath(profileId, params.environment), {\n query: { merchant_id: merchantId },\n body,\n ...options,\n });\n }\n\n /**\n * For a buyer in `country` paying `amount` `currency`: which placeable\n * items they are offered and every reason they are not, asked the way the\n * hosted checkout asks; and how each smart block of the layout evaluates\n * for them (`smart_blocks`). `test_mode` asks the Test environment.\n * `GET /checkout-methods/{profile_id}/availability`\n */\n async availability(\n merchantId: string,\n profileId: string,\n params: CheckoutMethodsAvailabilityParams,\n ): Promise<CheckoutMethodsAvailabilityResponse> {\n const { test_mode, ...order } = params;\n const query = { merchant_id: merchantId, ...order };\n if (test_mode) {\n return this.request(\n 'GET',\n `/checkout-methods/${encodeURIComponent(profileId)}/test/availability`,\n { query },\n );\n }\n return this.request('GET', `/checkout-methods/${encodeURIComponent(profileId)}/availability`, {\n query,\n });\n }\n\n /**\n * What DeloPay's connector information says about a country, for any shop:\n * each provider's method, and whether the provider's list of countries names\n * it. A method with no list is `unknown`, which is no statement either way.\n * Nothing here comes from a merchant's accounts, and it is no promise about\n * what a shop's checkout offers. A role that may not read provider names gets\n * none. `GET /checkout-methods/coverage`\n *\n * @param country The buyer's country, ISO 3166-1 alpha-2.\n */\n async coverage(country: string): Promise<ConnectorCoverageResponse> {\n return this.request('GET', '/checkout-methods/coverage', { query: { country } });\n }\n\n /**\n * What DeloPay confirms beneath each item the shop can place: the card\n * networks the card form's accounts accept, and the methods or coins a\n * provider's page offers, per account, with source and freshness. A\n * provider that answers only per order reports `context_required` until\n * `currency` and `amount` are given. A layout item's `children` narrows\n * these lists and never adds to them.\n * `GET /checkout-methods/{profile_id}/children` (`/test/children` for Test)\n */\n async children(\n merchantId: string,\n profileId: string,\n params: CheckoutMethodsChildrenParams = {},\n ): Promise<CheckoutMethodsChildrenResponse> {\n const { environment, ...order } = params;\n const query = { merchant_id: merchantId, ...order };\n if (environment === 'test') {\n return this.request(\n 'GET',\n `/checkout-methods/${encodeURIComponent(profileId)}/test/children`,\n {\n query,\n },\n );\n }\n return this.request('GET', `/checkout-methods/${encodeURIComponent(profileId)}/children`, {\n query,\n });\n }\n\n /**\n * Delete the stored layout of one environment; Live is back on the derived\n * layout, Test follows Live again.\n * `DELETE /checkout-methods/{profile_id}` (`/test`)\n */\n async reset(\n merchantId: string,\n profileId: string,\n params: CheckoutMethodsEnvironmentParams = {},\n options?: RequestExtras,\n ): Promise<CheckoutMethodsResetResponse> {\n return this.request('DELETE', methodsPath(profileId, params.environment), {\n query: { merchant_id: merchantId },\n ...options,\n });\n }\n\n /**\n * The methods a payment of the shop can be limited to through\n * `allowed_payment_method_types`, in the order its checkout places them, for\n * one environment. Names methods only, never a processor or account.\n * `GET /checkout-methods/{profile_id}/payment-method-options` (`/test/…`)\n */\n async paymentMethodOptions(\n merchantId: string,\n profileId: string,\n params: CheckoutMethodsEnvironmentParams = {},\n options?: RequestExtras,\n ): Promise<CheckoutPaymentMethodOptionsResponse> {\n return this.request(\n 'GET',\n `${methodsPath(profileId, params.environment)}/payment-method-options`,\n { query: { merchant_id: merchantId }, ...options },\n );\n }\n\n /**\n * What the given redirect rules, saved or not, decide for the buyer the\n * body describes, and how each rule fared. The buyer's options are the\n * shop's layout after its availability rules and the cap states; nothing is\n * stored. Live's checkout by default, `environment: 'test'` for the Test\n * checkout's. Refused with 422 when the rules are malformed or name an\n * account that is not the shop's, and with 403 when they name one the\n * caller may not read.\n * `POST /checkout-methods/{profile_id}/redirect-rules/test` (`/test/…`)\n */\n async testRedirectRules(\n merchantId: string,\n profileId: string,\n body: CheckoutRedirectRulesTestRequest,\n params: CheckoutMethodsEnvironmentParams = {},\n options?: RequestExtras,\n ): Promise<CheckoutRedirectRulesTestResponse> {\n return this.request(\n 'POST',\n `${methodsPath(profileId, params.environment)}/redirect-rules/test`,\n { query: { merchant_id: merchantId }, body, ...options },\n );\n }\n\n /**\n * Hide a connector account from the checkout of the named environments, or\n * show it again. Its items stay in the layout, listed with\n * `account_enabled: false`; routing and credentials are not changed.\n * `PUT /checkout-methods/{profile_id}/accounts/{merchant_connector_id}/visibility`\n */\n async setAccountVisibility(\n merchantId: string,\n profileId: string,\n merchantConnectorId: string,\n body: CheckoutAccountVisibilityRequest,\n options?: RequestExtras,\n ): Promise<CheckoutAccountVisibilityResponse> {\n return this.request(\n 'PUT',\n `/checkout-methods/${encodeURIComponent(profileId)}/accounts/${encodeURIComponent(merchantConnectorId)}/visibility`,\n { query: { merchant_id: merchantId }, body, ...options },\n );\n }\n\n /**\n * The shop's checkout entries: separate ways into the hosted checkout of\n * one payment (`?entry=<key>`), such as a card form embedded in the shop's\n * page, a \"Pay with crypto\" checkout and an \"Other payment methods\"\n * checkout, each in its own named look. Live's by default; `environment:\n * 'test'` reads the Test checkout's, used by payments with `test_mode: true`.\n * Refused (403) to a caller that may not see or change every method.\n * `GET /checkout-methods/{profile_id}/entries` (`/test/entries`)\n */\n async entries(\n merchantId: string,\n profileId: string,\n params: { environment?: 'live' | 'test' } = {},\n ): Promise<CheckoutEntriesResponse> {\n return this.request('GET', entriesPath(profileId, params.environment), {\n query: { merchant_id: merchantId },\n });\n }\n\n /**\n * Replace the shop's entries of one environment. Refused when a key is\n * malformed or used twice, when an entry lists a method, group or card form\n * that environment's layout does not place, or when a card entry's\n * `other_entry` is not another `methods` entry.\n * `PUT /checkout-methods/{profile_id}/entries` (`/test/entries`)\n */\n async updateEntries(\n merchantId: string,\n profileId: string,\n body: CheckoutEntriesUpdateRequest,\n params: { environment?: 'live' | 'test' } = {},\n ): Promise<CheckoutEntriesResponse> {\n return this.request('PUT', entriesPath(profileId, params.environment), {\n query: { merchant_id: merchantId },\n body,\n });\n }\n\n /**\n * Delete every entry of one environment. A link that still names an entry\n * then offers nothing.\n * `DELETE /checkout-methods/{profile_id}/entries` (`/test/entries`)\n */\n async clearEntries(\n merchantId: string,\n profileId: string,\n params: { environment?: 'live' | 'test' } = {},\n ): Promise<CheckoutEntriesResponse> {\n return this.request('DELETE', entriesPath(profileId, params.environment), {\n query: { merchant_id: merchantId },\n });\n }\n}\n\nfunction methodsPath(profileId: string, environment: 'live' | 'test' | undefined): string {\n const shop = `/checkout-methods/${encodeURIComponent(profileId)}`;\n return environment === 'test' ? `${shop}/test` : shop;\n}\n\nfunction entriesPath(profileId: string, environment: 'live' | 'test' | undefined): string {\n const shop = `/checkout-methods/${encodeURIComponent(profileId)}`;\n return environment === 'test' ? `${shop}/test/entries` : `${shop}/entries`;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["/tmp/sdk-pub-0459/dist/chunk-V47G7P6L.cjs","../src/listQuery.ts"],"names":[],"mappings":"AAAA;ACSO,SAAS,QAAA,CACd,MAAA,EACA,OAAA,EACyB;AACzB,EAAA,GAAA,CAAI,CAAC,MAAA,EAAQ,OAAO,KAAA,CAAA;AACpB,EAAA,MAAM,OAAA,EAA4B,OAAA;AAClC,EAAA,MAAM,MAAA,EAAiC,CAAC,CAAA;AACxC,EAAA,IAAA,CAAA,MAAW,CAAC,GAAA,EAAK,KAAK,EAAA,GAAK,MAAA,CAAO,OAAA,CAAQ,MAAM,CAAA,EAAG;AACjD,IAAA,GAAA,CAAI,CAAC,MAAA,CAAO,QAAA,CAAS,GAAG,EAAA,GAAK,CAAC,KAAA,CAAM,OAAA,CAAQ,KAAK,CAAA,EAAG;AAClD,MAAA,KAAA,CAAM,GAAG,EAAA,EAAI,KAAA;AAAA,IACf,EAAA,KAAA,GAAA,CAAW,KAAA,CAAM,OAAA,EAAS,CAAA,EAAG;AAC3B,MAAA,KAAA,CAAM,GAAG,EAAA,EAAI,KAAA,CAAM,IAAA,CAAK,GAAG,CAAA;AAAA,IAC7B;AAAA,EACF;AACA,EAAA,OAAO,KAAA;AACT;ADVA;AACA;AACE;AACF,4BAAC","file":"/tmp/sdk-pub-0459/dist/chunk-V47G7P6L.cjs","sourcesContent":[null,"import type { RequestOptions } from './client';\n\n/**\n * The query of a list whose multi-value filters travel as one comma-separated\n * value (`status=open,closed`), not as the transport's repeated keys. Each key\n * in `csvKeys` that holds an array is joined with `,`; an empty array is\n * dropped, so it filters nothing. A single value passes through unchanged, and\n * every other key is copied as it is.\n */\nexport function csvQuery<T extends object>(\n params: T | undefined,\n csvKeys: readonly (keyof T & string)[],\n): RequestOptions['query'] {\n if (!params) return undefined;\n const joined: readonly string[] = csvKeys;\n const query: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(params)) {\n if (!joined.includes(key) || !Array.isArray(value)) {\n query[key] = value;\n } else if (value.length > 0) {\n query[key] = value.join(',');\n }\n }\n return query as RequestOptions['query'];\n}\n"]}
1
+ {"version":3,"sources":["/home/anes/delo-payment/sdk-publish-w2/dist/chunk-V47G7P6L.cjs","../src/listQuery.ts"],"names":[],"mappings":"AAAA;ACSO,SAAS,QAAA,CACd,MAAA,EACA,OAAA,EACyB;AACzB,EAAA,GAAA,CAAI,CAAC,MAAA,EAAQ,OAAO,KAAA,CAAA;AACpB,EAAA,MAAM,OAAA,EAA4B,OAAA;AAClC,EAAA,MAAM,MAAA,EAAiC,CAAC,CAAA;AACxC,EAAA,IAAA,CAAA,MAAW,CAAC,GAAA,EAAK,KAAK,EAAA,GAAK,MAAA,CAAO,OAAA,CAAQ,MAAM,CAAA,EAAG;AACjD,IAAA,GAAA,CAAI,CAAC,MAAA,CAAO,QAAA,CAAS,GAAG,EAAA,GAAK,CAAC,KAAA,CAAM,OAAA,CAAQ,KAAK,CAAA,EAAG;AAClD,MAAA,KAAA,CAAM,GAAG,EAAA,EAAI,KAAA;AAAA,IACf,EAAA,KAAA,GAAA,CAAW,KAAA,CAAM,OAAA,EAAS,CAAA,EAAG;AAC3B,MAAA,KAAA,CAAM,GAAG,EAAA,EAAI,KAAA,CAAM,IAAA,CAAK,GAAG,CAAA;AAAA,IAC7B;AAAA,EACF;AACA,EAAA,OAAO,KAAA;AACT;ADVA;AACA;AACE;AACF,4BAAC","file":"/home/anes/delo-payment/sdk-publish-w2/dist/chunk-V47G7P6L.cjs","sourcesContent":[null,"import type { RequestOptions } from './client';\n\n/**\n * The query of a list whose multi-value filters travel as one comma-separated\n * value (`status=open,closed`), not as the transport's repeated keys. Each key\n * in `csvKeys` that holds an array is joined with `,`; an empty array is\n * dropped, so it filters nothing. A single value passes through unchanged, and\n * every other key is copied as it is.\n */\nexport function csvQuery<T extends object>(\n params: T | undefined,\n csvKeys: readonly (keyof T & string)[],\n): RequestOptions['query'] {\n if (!params) return undefined;\n const joined: readonly string[] = csvKeys;\n const query: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(params)) {\n if (!joined.includes(key) || !Array.isArray(value)) {\n query[key] = value;\n } else if (value.length > 0) {\n query[key] = value.join(',');\n }\n }\n return query as RequestOptions['query'];\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["/tmp/sdk-pub-0459/dist/chunk-VH5A6SMU.cjs","../src/resources/paypal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AAA;AACP,IAAA;AACH,EAAA;AACF;ADboF;AACA;AACA;AACA","file":"/tmp/sdk-pub-0459/dist/chunk-VH5A6SMU.cjs","sourcesContent":[null,"import type { RequestFn } from '../client';\nimport type {\n PaypalDisputeCase,\n PaypalDisputeListRequest,\n PaypalDisputeImportRequest,\n PaypalDisputeImportResponse,\n PaypalDisputeActionRequest,\n PaypalDisputeActionResponse,\n PaypalDisputeActionRecord,\n PaypalDisputeDocument,\n PaypalDisputeDownloadRequest,\n} from '../types';\n\n/**\n * PayPal seller cases, including external and subscription sales.\n * Every operation honors the caller's connector-account grants.\n */\nexport class PaypalDisputes {\n constructor(private readonly request: RequestFn) {}\n actions(caseId: string, offset = 0): Promise<PaypalDisputeActionRecord[]> {\n return this.request('GET', `/disputes/paypal/cases/${encodeURIComponent(caseId)}/actions`, {\n query: { offset },\n });\n }\n download(caseId: string, documentUrl: string): Promise<PaypalDisputeDocument> {\n const body: PaypalDisputeDownloadRequest = { document_url: documentUrl };\n return this.request(\n 'POST',\n `/disputes/paypal/cases/${encodeURIComponent(caseId)}/documents/download`,\n { body },\n );\n }\n list(params?: PaypalDisputeListRequest): Promise<PaypalDisputeCase[]> {\n return this.request('GET', '/disputes/paypal/cases', {\n query: params as Record<string, string | number | boolean | undefined>,\n });\n }\n retrieve(caseId: string, forceSync = false): Promise<PaypalDisputeCase> {\n return this.request('GET', `/disputes/paypal/cases/${encodeURIComponent(caseId)}`, {\n query: { force_sync: forceSync },\n });\n }\n history(caseId: string, offset = 0): Promise<PaypalDisputeCase[]> {\n return this.request('GET', `/disputes/paypal/cases/${encodeURIComponent(caseId)}/history`, {\n query: { offset },\n });\n }\n import(params: PaypalDisputeImportRequest): Promise<PaypalDisputeImportResponse> {\n return this.request('POST', '/disputes/paypal/import', { body: params });\n }\n /** The backend checks current provider permissions and deduplicates request_id.\n * An unknown result requires reconciliation, not a new request ID.\n */\n act(caseId: string, params: PaypalDisputeActionRequest): Promise<PaypalDisputeActionResponse> {\n return this.request('POST', `/disputes/paypal/cases/${encodeURIComponent(caseId)}/actions`, {\n body: params,\n });\n }\n}\n"]}
1
+ {"version":3,"sources":["/home/anes/delo-payment/sdk-publish-w2/dist/chunk-VH5A6SMU.cjs","../src/resources/paypalDisputes.ts"],"names":[],"mappings":"AAAA;ACiBO,IAAM,eAAA,EAAN,MAAqB;AAAA,EAC1B,WAAA,CAA6B,OAAA,EAAoB;AAApB,IAAA,IAAA,CAAA,QAAA,EAAA,OAAA;AAAA,EAAqB;AAAA,EAClD,OAAA,CAAQ,MAAA,EAAgB,OAAA,EAAS,CAAA,EAAyC;AACxE,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,KAAA,EAAO,CAAA,uBAAA,EAA0B,kBAAA,CAAmB,MAAM,CAAC,CAAA,QAAA,CAAA,EAAY;AAAA,MACzF,KAAA,EAAO,EAAE,OAAO;AAAA,IAClB,CAAC,CAAA;AAAA,EACH;AAAA,EACA,QAAA,CAAS,MAAA,EAAgB,WAAA,EAAqD;AAC5E,IAAA,MAAM,KAAA,EAAqC,EAAE,YAAA,EAAc,YAAY,CAAA;AACvE,IAAA,OAAO,IAAA,CAAK,OAAA;AAAA,MACV,MAAA;AAAA,MACA,CAAA,uBAAA,EAA0B,kBAAA,CAAmB,MAAM,CAAC,CAAA,mBAAA,CAAA;AAAA,MACpD,EAAE,KAAK;AAAA,IACT,CAAA;AAAA,EACF;AAAA,EACA,IAAA,CAAK,MAAA,EAAiE;AACpE,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,KAAA,EAAO,wBAAA,EAA0B;AAAA,MACnD,KAAA,EAAO;AAAA,IACT,CAAC,CAAA;AAAA,EACH;AAAA,EACA,QAAA,CAAS,MAAA,EAAgB,UAAA,EAAY,KAAA,EAAmC;AACtE,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,KAAA,EAAO,CAAA,uBAAA,EAA0B,kBAAA,CAAmB,MAAM,CAAC,CAAA,CAAA;AAC9C,MAAA;AAChC,IAAA;AACH,EAAA;AACkE,EAAA;AACe,IAAA;AAC7D,MAAA;AACjB,IAAA;AACH,EAAA;AACiF,EAAA;AACR,IAAA;AACzE,EAAA;AAAA;AAAA;AAAA;AAI8F,EAAA;AACZ,IAAA;AACxE,MAAA;AACP,IAAA;AACH,EAAA;AACF;ADboF;AACA;AACA;AACA","file":"/home/anes/delo-payment/sdk-publish-w2/dist/chunk-VH5A6SMU.cjs","sourcesContent":[null,"import type { RequestFn } from '../client';\nimport type {\n PaypalDisputeCase,\n PaypalDisputeListRequest,\n PaypalDisputeImportRequest,\n PaypalDisputeImportResponse,\n PaypalDisputeActionRequest,\n PaypalDisputeActionResponse,\n PaypalDisputeActionRecord,\n PaypalDisputeDocument,\n PaypalDisputeDownloadRequest,\n} from '../types';\n\n/**\n * PayPal seller cases, including external and subscription sales.\n * Every operation honors the caller's connector-account grants.\n */\nexport class PaypalDisputes {\n constructor(private readonly request: RequestFn) {}\n actions(caseId: string, offset = 0): Promise<PaypalDisputeActionRecord[]> {\n return this.request('GET', `/disputes/paypal/cases/${encodeURIComponent(caseId)}/actions`, {\n query: { offset },\n });\n }\n download(caseId: string, documentUrl: string): Promise<PaypalDisputeDocument> {\n const body: PaypalDisputeDownloadRequest = { document_url: documentUrl };\n return this.request(\n 'POST',\n `/disputes/paypal/cases/${encodeURIComponent(caseId)}/documents/download`,\n { body },\n );\n }\n list(params?: PaypalDisputeListRequest): Promise<PaypalDisputeCase[]> {\n return this.request('GET', '/disputes/paypal/cases', {\n query: params as Record<string, string | number | boolean | undefined>,\n });\n }\n retrieve(caseId: string, forceSync = false): Promise<PaypalDisputeCase> {\n return this.request('GET', `/disputes/paypal/cases/${encodeURIComponent(caseId)}`, {\n query: { force_sync: forceSync },\n });\n }\n history(caseId: string, offset = 0): Promise<PaypalDisputeCase[]> {\n return this.request('GET', `/disputes/paypal/cases/${encodeURIComponent(caseId)}/history`, {\n query: { offset },\n });\n }\n import(params: PaypalDisputeImportRequest): Promise<PaypalDisputeImportResponse> {\n return this.request('POST', '/disputes/paypal/import', { body: params });\n }\n /** The backend checks current provider permissions and deduplicates request_id.\n * An unknown result requires reconciliation, not a new request ID.\n */\n act(caseId: string, params: PaypalDisputeActionRequest): Promise<PaypalDisputeActionResponse> {\n return this.request('POST', `/disputes/paypal/cases/${encodeURIComponent(caseId)}/actions`, {\n body: params,\n });\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["/tmp/sdk-pub-0459/dist/chunk-VHMH4QMY.cjs","../src/trustedOrigins.ts"],"names":["origins"],"mappings":"AAAA;ACEA,IAAM,eAAA,EAAiB,yBAAA;AACvB,IAAM,YAAA,EAAc,iCAAA;AAGpB,IAAM,SAAA,EAAW,EAAA,EAAI,GAAA,EAAK,GAAA;AAY1B,IAAM,MAAA,kBAAQ,IAAI,GAAA,CAAiE,CAAA;AAO5E,SAAS,sBAAA,CACd,QAAA,EAAyC,CAAC,CAAA,EACd;AAC5B,EAAA,MAAM,KAAA,EAAA,kBAAQ,OAAA,CAAQ,OAAA,UAAA,CAAY,OAAA,CAAQ,QAAA,EAAU,YAAA,EAAc,cAAA,GAAA,CAAA,CAAiB,OAAA;AAAA,IACjF,MAAA;AAAA,IACA;AAAA,EACF,CAAA;AACA,EAAA,MAAM,IAAA,EAAM,KAAA,CAAM,GAAA,CAAI,IAAI,CAAA;AAC1B,EAAA,GAAA,CAAI,IAAA,GAAO,IAAA,CAAK,GAAA,CAAI,EAAA,EAAI,GAAA,CAAI,GAAA,EAAK,QAAA,EAAU,OAAO,GAAA,CAAI,OAAA;AACtD,EAAA,MAAM,IAAA,mBAAM,OAAA,CAAQ,KAAA,UAAS,OAAA;AAC7B,EAAA,MAAM,QAAA,EAAU,GAAA,CAAI,CAAA,EAAA;AACC,IAAA;AAEN,EAAA;AACO,IAAA;AACE,IAAA;AAGK,IAAA;AACNA,IAAAA;AACD,MAAA;AAClB,IAAA;AACOA,IAAAA;AAEkB,EAAA;AACR,IAAA;AACX,IAAA;AACP,EAAA;AACe,EAAA;AACX,EAAA;AACT;AAmBsB;AAIhB,EAAA;AACY,IAAA;AACR,EAAA;AACC,IAAA;AACT,EAAA;AACF;AAesB;AAGJ,EAAA;AACG,EAAA;AACrB;AAcsB;AAGJ,EAAA;AACK,EAAA;AACvB;AD7EuB;AACA;AACA;AACA;AACA;AACA;AACA","file":"/tmp/sdk-pub-0459/dist/chunk-VHMH4QMY.cjs","sourcesContent":[null,"import type { TrustedCheckoutOrigins } from './types';\n\nconst PRODUCTION_URL = 'https://api.delopay.net';\nconst SANDBOX_URL = 'https://sandbox.delopay.net/api';\n\n/** How long a fetched list is trusted before it is read again; the API caches it as long. */\nconst CACHE_MS = 5 * 60 * 1000;\n\n/** Where `isTrustedCheckoutOrigin` reads the list of trusted checkout origins. */\nexport interface TrustedCheckoutOriginsOptions {\n /** Read the sandbox list (`https://sandbox.delopay.net/api`). */\n sandbox?: boolean;\n /** Another API base URL, such as a dashboard's own `/api` proxy. Wins over `sandbox`. */\n baseUrl?: string;\n /** A `fetch` to use instead of the global one. */\n fetch?: typeof fetch;\n}\n\nconst cache = new Map<string, { at: number; origins: Promise<readonly string[]> }>();\n\n/**\n * Every origin the hosted checkout may answer from on this deployment:\n * `GET /payment-link/trusted-origins`. Public, no key needed. Cached for\n * five minutes per base URL; a failed read is not cached.\n */\nexport function trustedCheckoutOrigins(\n options: TrustedCheckoutOriginsOptions = {},\n): Promise<readonly string[]> {\n const base = (options.baseUrl ?? (options.sandbox ? SANDBOX_URL : PRODUCTION_URL)).replace(\n /\\/+$/,\n '',\n );\n const hit = cache.get(base);\n if (hit && Date.now() - hit.at < CACHE_MS) return hit.origins;\n const run = options.fetch ?? fetch;\n const origins = run(`${base}/payment-link/trusted-origins`, {\n headers: { Accept: 'application/json' },\n })\n .then(async (response) => {\n if (!response.ok) throw new Error(`trusted origins: HTTP ${response.status}`);\n const body = (await response.json()) as Partial<TrustedCheckoutOrigins> | null;\n // An answer without a list of strings is a failure, never an allowlist\n // cached for five minutes.\n const origins: unknown = body?.origins;\n if (!Array.isArray(origins) || !origins.every((origin) => typeof origin === 'string')) {\n throw new Error('trusted origins: the answer holds no list of origins');\n }\n return origins as string[];\n })\n .catch((error: unknown) => {\n cache.delete(base);\n throw error;\n });\n cache.set(base, { at: Date.now(), origins });\n return origins;\n}\n\n/**\n * Whether a `postMessage` came from DeloPay's hosted checkout. An embedded\n * checkout may move to another of the deployment's checkout origins (for\n * Apple Pay), so a listener checks the message's origin against the whole\n * list rather than one hostname. It also checks that the message came from its\n * own checkout iframe, and then the message type and payment id:\n *\n * window.addEventListener('message', async (event) => {\n * if (event.source !== iframe.contentWindow) return;\n * if (!(await isTrustedCheckoutOrigin(event.origin))) return;\n * if (event.data?.type !== 'payment_status') return;\n * if (event.data.payment_id !== myPaymentId) return;\n * // handle event.data.status\n * });\n *\n * Resolves `false` when the list cannot be read, so a listener fails closed.\n */\nexport async function isTrustedCheckoutOrigin(\n origin: string,\n options: TrustedCheckoutOriginsOptions = {},\n): Promise<boolean> {\n try {\n return (await trustedCheckoutOrigins(options)).includes(origin);\n } catch {\n return false;\n }\n}\n\n/**\n * The `allow` attribute for an iframe that embeds the hosted checkout of a\n * shop that lets its embedded checkout change address (for Apple Pay):\n * `payment` delegated to every trusted checkout origin.\n *\n * iframe.allow = await checkoutIframeAllow();\n * // \"payment https://checkout.example.net https://checkout-a.example.net\"\n *\n * A bare `allow=\"payment\"` delegates only to the origin of the iframe's\n * first `src`, so after the checkout moves to another of its origins the\n * browser blocks Apple Pay there. Rejects when the list cannot be read, so an\n * embed never ships a narrower attribute than it needs without knowing.\n */\nexport async function checkoutIframeAllow(\n options: TrustedCheckoutOriginsOptions = {},\n): Promise<string> {\n const origins = await trustedCheckoutOrigins(options);\n return ['payment', ...origins].join(' ');\n}\n\n/**\n * The `frame-src` directive for the Content Security Policy of a page that\n * embeds the hosted checkout of a shop that lets its embedded checkout change\n * address: every trusted checkout origin. Without it, a page with a CSP blocks\n * the iframe once the checkout moves to another of its origins.\n *\n * // \"frame-src https://checkout.example.net https://checkout-a.example.net\"\n * const directive = await checkoutFrameSrc();\n *\n * Add the origins to an existing `frame-src` (or `child-src`) rather than\n * replacing it. Rejects when the list cannot be read.\n */\nexport async function checkoutFrameSrc(\n options: TrustedCheckoutOriginsOptions = {},\n): Promise<string> {\n const origins = await trustedCheckoutOrigins(options);\n return ['frame-src', ...origins].join(' ');\n}\n"]}
1
+ {"version":3,"sources":["/home/anes/delo-payment/sdk-publish-w2/dist/chunk-VHMH4QMY.cjs","../src/trustedOrigins.ts"],"names":["origins"],"mappings":"AAAA;ACEA,IAAM,eAAA,EAAiB,yBAAA;AACvB,IAAM,YAAA,EAAc,iCAAA;AAGpB,IAAM,SAAA,EAAW,EAAA,EAAI,GAAA,EAAK,GAAA;AAY1B,IAAM,MAAA,kBAAQ,IAAI,GAAA,CAAiE,CAAA;AAO5E,SAAS,sBAAA,CACd,QAAA,EAAyC,CAAC,CAAA,EACd;AAC5B,EAAA,MAAM,KAAA,EAAA,kBAAQ,OAAA,CAAQ,OAAA,UAAA,CAAY,OAAA,CAAQ,QAAA,EAAU,YAAA,EAAc,cAAA,GAAA,CAAA,CAAiB,OAAA;AAAA,IACjF,MAAA;AAAA,IACA;AAAA,EACF,CAAA;AACA,EAAA,MAAM,IAAA,EAAM,KAAA,CAAM,GAAA,CAAI,IAAI,CAAA;AAC1B,EAAA,GAAA,CAAI,IAAA,GAAO,IAAA,CAAK,GAAA,CAAI,EAAA,EAAI,GAAA,CAAI,GAAA,EAAK,QAAA,EAAU,OAAO,GAAA,CAAI,OAAA;AACtD,EAAA,MAAM,IAAA,mBAAM,OAAA,CAAQ,KAAA,UAAS,OAAA;AAC7B,EAAA,MAAM,QAAA,EAAU,GAAA,CAAI,CAAA,EAAA;AACC,IAAA;AAEN,EAAA;AACO,IAAA;AACE,IAAA;AAGK,IAAA;AACNA,IAAAA;AACD,MAAA;AAClB,IAAA;AACOA,IAAAA;AAEkB,EAAA;AACR,IAAA;AACX,IAAA;AACP,EAAA;AACe,EAAA;AACX,EAAA;AACT;AAmBsB;AAIhB,EAAA;AACY,IAAA;AACR,EAAA;AACC,IAAA;AACT,EAAA;AACF;AAesB;AAGJ,EAAA;AACG,EAAA;AACrB;AAcsB;AAGJ,EAAA;AACK,EAAA;AACvB;AD7EuB;AACA;AACA;AACA;AACA;AACA;AACA","file":"/home/anes/delo-payment/sdk-publish-w2/dist/chunk-VHMH4QMY.cjs","sourcesContent":[null,"import type { TrustedCheckoutOrigins } from './types';\n\nconst PRODUCTION_URL = 'https://api.delopay.net';\nconst SANDBOX_URL = 'https://sandbox.delopay.net/api';\n\n/** How long a fetched list is trusted before it is read again; the API caches it as long. */\nconst CACHE_MS = 5 * 60 * 1000;\n\n/** Where `isTrustedCheckoutOrigin` reads the list of trusted checkout origins. */\nexport interface TrustedCheckoutOriginsOptions {\n /** Read the sandbox list (`https://sandbox.delopay.net/api`). */\n sandbox?: boolean;\n /** Another API base URL, such as a dashboard's own `/api` proxy. Wins over `sandbox`. */\n baseUrl?: string;\n /** A `fetch` to use instead of the global one. */\n fetch?: typeof fetch;\n}\n\nconst cache = new Map<string, { at: number; origins: Promise<readonly string[]> }>();\n\n/**\n * Every origin the hosted checkout may answer from on this deployment:\n * `GET /payment-link/trusted-origins`. Public, no key needed. Cached for\n * five minutes per base URL; a failed read is not cached.\n */\nexport function trustedCheckoutOrigins(\n options: TrustedCheckoutOriginsOptions = {},\n): Promise<readonly string[]> {\n const base = (options.baseUrl ?? (options.sandbox ? SANDBOX_URL : PRODUCTION_URL)).replace(\n /\\/+$/,\n '',\n );\n const hit = cache.get(base);\n if (hit && Date.now() - hit.at < CACHE_MS) return hit.origins;\n const run = options.fetch ?? fetch;\n const origins = run(`${base}/payment-link/trusted-origins`, {\n headers: { Accept: 'application/json' },\n })\n .then(async (response) => {\n if (!response.ok) throw new Error(`trusted origins: HTTP ${response.status}`);\n const body = (await response.json()) as Partial<TrustedCheckoutOrigins> | null;\n // An answer without a list of strings is a failure, never an allowlist\n // cached for five minutes.\n const origins: unknown = body?.origins;\n if (!Array.isArray(origins) || !origins.every((origin) => typeof origin === 'string')) {\n throw new Error('trusted origins: the answer holds no list of origins');\n }\n return origins as string[];\n })\n .catch((error: unknown) => {\n cache.delete(base);\n throw error;\n });\n cache.set(base, { at: Date.now(), origins });\n return origins;\n}\n\n/**\n * Whether a `postMessage` came from DeloPay's hosted checkout. An embedded\n * checkout may move to another of the deployment's checkout origins (for\n * Apple Pay), so a listener checks the message's origin against the whole\n * list rather than one hostname. It also checks that the message came from its\n * own checkout iframe, and then the message type and payment id:\n *\n * window.addEventListener('message', async (event) => {\n * if (event.source !== iframe.contentWindow) return;\n * if (!(await isTrustedCheckoutOrigin(event.origin))) return;\n * if (event.data?.type !== 'payment_status') return;\n * if (event.data.payment_id !== myPaymentId) return;\n * // handle event.data.status\n * });\n *\n * Resolves `false` when the list cannot be read, so a listener fails closed.\n */\nexport async function isTrustedCheckoutOrigin(\n origin: string,\n options: TrustedCheckoutOriginsOptions = {},\n): Promise<boolean> {\n try {\n return (await trustedCheckoutOrigins(options)).includes(origin);\n } catch {\n return false;\n }\n}\n\n/**\n * The `allow` attribute for an iframe that embeds the hosted checkout of a\n * shop that lets its embedded checkout change address (for Apple Pay):\n * `payment` delegated to every trusted checkout origin.\n *\n * iframe.allow = await checkoutIframeAllow();\n * // \"payment https://checkout.example.net https://checkout-a.example.net\"\n *\n * A bare `allow=\"payment\"` delegates only to the origin of the iframe's\n * first `src`, so after the checkout moves to another of its origins the\n * browser blocks Apple Pay there. Rejects when the list cannot be read, so an\n * embed never ships a narrower attribute than it needs without knowing.\n */\nexport async function checkoutIframeAllow(\n options: TrustedCheckoutOriginsOptions = {},\n): Promise<string> {\n const origins = await trustedCheckoutOrigins(options);\n return ['payment', ...origins].join(' ');\n}\n\n/**\n * The `frame-src` directive for the Content Security Policy of a page that\n * embeds the hosted checkout of a shop that lets its embedded checkout change\n * address: every trusted checkout origin. Without it, a page with a CSP blocks\n * the iframe once the checkout moves to another of its origins.\n *\n * // \"frame-src https://checkout.example.net https://checkout-a.example.net\"\n * const directive = await checkoutFrameSrc();\n *\n * Add the origins to an existing `frame-src` (or `child-src`) rather than\n * replacing it. Rejects when the list cannot be read.\n */\nexport async function checkoutFrameSrc(\n options: TrustedCheckoutOriginsOptions = {},\n): Promise<string> {\n const origins = await trustedCheckoutOrigins(options);\n return ['frame-src', ...origins].join(' ');\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["/tmp/sdk-pub-0459/dist/chunk-VYC7WUM5.cjs","../src/resources/whopResolutionCases.ts"],"names":[],"mappings":"AAAA;ACiBO,IAAM,oBAAA,EAAN,MAA0B;AAAA,EAC/B,WAAA,CAA6B,OAAA,EAAoB;AAApB,IAAA,IAAA,CAAA,QAAA,EAAA,OAAA;AAAA,EAAqB;AAAA;AAAA,EAGlD,IAAA,CAAK,MAAA,EAAwE;AAC3E,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,KAAA,EAAO,sBAAA,EAAwB;AAAA,MACjD,KAAA,EAAO,EAAE,GAAG,OAAO;AAAA,IACrB,CAAC,CAAA;AAAA,EACH;AAAA;AAAA,EAGA,QAAA,CAAS,MAAA,EAAgB,OAAA,EAAiE;AACxF,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,KAAA,EAAO,CAAA,qBAAA,EAAwB,kBAAA,CAAmB,MAAM,CAAC,CAAA,CAAA;AACvD,MAAA;AACrB,IAAA;AACH,EAAA;AAAA;AAMwC,EAAA;AACuC,IAAA;AACxD,MAAA;AACpB,IAAA;AACH,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAU6C,EAAA;AACmC,IAAA;AACtE,MAAA;AACP,IAAA;AACH,EAAA;AACF;ADvBkF;AACA;AACA;AACA","file":"/tmp/sdk-pub-0459/dist/chunk-VYC7WUM5.cjs","sourcesContent":[null,"import type { RequestFn } from '../client';\nimport type {\n WhopResolutionCase,\n WhopResolutionCaseActionRequest,\n WhopResolutionCaseActionResponse,\n WhopResolutionCaseEventList,\n WhopResolutionCaseEventsRequest,\n WhopResolutionCaseList,\n WhopResolutionCaseListRequest,\n WhopResolutionCaseLocator,\n} from '../types';\n\n/**\n * Whop Resolution Center cases: a buyer's claim before any chargeback. Read\n * and answered live through one Whop connector account and environment.\n * Every operation honors the caller's connector-account grants and shop scope.\n */\nexport class WhopResolutionCases {\n constructor(private readonly request: RequestFn) {}\n\n /** GET /disputes/whop/cases — newest first, one Whop page at a time. */\n list(params: WhopResolutionCaseListRequest): Promise<WhopResolutionCaseList> {\n return this.request('GET', '/disputes/whop/cases', {\n query: { ...params },\n });\n }\n\n /** GET /disputes/whop/cases/{case_id} — the case as Whop reports it now. */\n retrieve(caseId: string, locator: WhopResolutionCaseLocator): Promise<WhopResolutionCase> {\n return this.request('GET', `/disputes/whop/cases/${encodeURIComponent(caseId)}`, {\n query: { ...locator },\n });\n }\n\n /** GET /disputes/whop/cases/{case_id}/events — the case timeline, newest first. */\n events(\n caseId: string,\n params: WhopResolutionCaseEventsRequest,\n ): Promise<WhopResolutionCaseEventList> {\n return this.request('GET', `/disputes/whop/cases/${encodeURIComponent(caseId)}/events`, {\n query: { ...params },\n });\n }\n\n /**\n * POST /disputes/whop/cases/{case_id}/actions — accept, deny, reply or\n * request info. `accept` refunds the payment in full at Whop. An `unknown`\n * outcome is retried with the same `request_id`.\n */\n act(\n caseId: string,\n params: WhopResolutionCaseActionRequest,\n ): Promise<WhopResolutionCaseActionResponse> {\n return this.request('POST', `/disputes/whop/cases/${encodeURIComponent(caseId)}/actions`, {\n body: params,\n });\n }\n}\n"]}
1
+ {"version":3,"sources":["/home/anes/delo-payment/sdk-publish-w2/dist/chunk-VYC7WUM5.cjs","../src/resources/whopResolutionCases.ts"],"names":[],"mappings":"AAAA;ACiBO,IAAM,oBAAA,EAAN,MAA0B;AAAA,EAC/B,WAAA,CAA6B,OAAA,EAAoB;AAApB,IAAA,IAAA,CAAA,QAAA,EAAA,OAAA;AAAA,EAAqB;AAAA;AAAA,EAGlD,IAAA,CAAK,MAAA,EAAwE;AAC3E,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,KAAA,EAAO,sBAAA,EAAwB;AAAA,MACjD,KAAA,EAAO,EAAE,GAAG,OAAO;AAAA,IACrB,CAAC,CAAA;AAAA,EACH;AAAA;AAAA,EAGA,QAAA,CAAS,MAAA,EAAgB,OAAA,EAAiE;AACxF,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,KAAA,EAAO,CAAA,qBAAA,EAAwB,kBAAA,CAAmB,MAAM,CAAC,CAAA,CAAA;AACvD,MAAA;AACrB,IAAA;AACH,EAAA;AAAA;AAMwC,EAAA;AACuC,IAAA;AACxD,MAAA;AACpB,IAAA;AACH,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAU6C,EAAA;AACmC,IAAA;AACtE,MAAA;AACP,IAAA;AACH,EAAA;AACF;ADvBkF;AACA;AACA;AACA","file":"/home/anes/delo-payment/sdk-publish-w2/dist/chunk-VYC7WUM5.cjs","sourcesContent":[null,"import type { RequestFn } from '../client';\nimport type {\n WhopResolutionCase,\n WhopResolutionCaseActionRequest,\n WhopResolutionCaseActionResponse,\n WhopResolutionCaseEventList,\n WhopResolutionCaseEventsRequest,\n WhopResolutionCaseList,\n WhopResolutionCaseListRequest,\n WhopResolutionCaseLocator,\n} from '../types';\n\n/**\n * Whop Resolution Center cases: a buyer's claim before any chargeback. Read\n * and answered live through one Whop connector account and environment.\n * Every operation honors the caller's connector-account grants and shop scope.\n */\nexport class WhopResolutionCases {\n constructor(private readonly request: RequestFn) {}\n\n /** GET /disputes/whop/cases — newest first, one Whop page at a time. */\n list(params: WhopResolutionCaseListRequest): Promise<WhopResolutionCaseList> {\n return this.request('GET', '/disputes/whop/cases', {\n query: { ...params },\n });\n }\n\n /** GET /disputes/whop/cases/{case_id} — the case as Whop reports it now. */\n retrieve(caseId: string, locator: WhopResolutionCaseLocator): Promise<WhopResolutionCase> {\n return this.request('GET', `/disputes/whop/cases/${encodeURIComponent(caseId)}`, {\n query: { ...locator },\n });\n }\n\n /** GET /disputes/whop/cases/{case_id}/events — the case timeline, newest first. */\n events(\n caseId: string,\n params: WhopResolutionCaseEventsRequest,\n ): Promise<WhopResolutionCaseEventList> {\n return this.request('GET', `/disputes/whop/cases/${encodeURIComponent(caseId)}/events`, {\n query: { ...params },\n });\n }\n\n /**\n * POST /disputes/whop/cases/{case_id}/actions — accept, deny, reply or\n * request info. `accept` refunds the payment in full at Whop. An `unknown`\n * outcome is retried with the same `request_id`.\n */\n act(\n caseId: string,\n params: WhopResolutionCaseActionRequest,\n ): Promise<WhopResolutionCaseActionResponse> {\n return this.request('POST', `/disputes/whop/cases/${encodeURIComponent(caseId)}/actions`, {\n body: params,\n });\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["/tmp/sdk-pub-0459/dist/chunk-W457XUA6.cjs","../src/internal/resources/platformMessageTemplates.ts"],"names":[],"mappings":"AAAA;ACyBO,IAAM,yBAAA,EAAN,MAA+B;AAAA,EACpC,WAAA,CAA6B,OAAA,EAAoB;AAApB,IAAA,IAAA,CAAA,QAAA,EAAA,OAAA;AAAA,EAAqB;AAAA;AAAA,EAGlD,MAAM,IAAA,CAAA,EAAqC;AACzC,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,KAAA,EAAO,iCAAiC,CAAA;AAAA,EAC9D;AAAA;AAAA,EAGA,MAAM,QAAA,CAAS,UAAA,EAAoD;AACjE,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,KAAA,EAAO,CAAA,gCAAA,EAAmC,kBAAA,CAAmB,UAAU,CAAC,CAAA,CAAA;AAC9F,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAWoC,EAAA;AACtB,IAAA;AACV,MAAA;AAC+E,MAAA;AAC/E,MAAA;AACQ,QAAA;AACR,MAAA;AACF,IAAA;AACF,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAWoC,EAAA;AACtB,IAAA;AACV,MAAA;AAC+E,MAAA;AAC/E,MAAA;AACuD,QAAA;AACvD,MAAA;AACF,IAAA;AACF,EAAA;AAAA;AAMmC,EAAA;AACrB,IAAA;AACV,MAAA;AACiE,MAAA;AAClD,MAAA;AACjB,IAAA;AACF,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUoC,EAAA;AACtB,IAAA;AACV,MAAA;AACiE,MAAA;AAClD,MAAA;AACjB,IAAA;AACF,EAAA;AACF;ADzCiG;AACA;AACA;AACA","file":"/tmp/sdk-pub-0459/dist/chunk-W457XUA6.cjs","sourcesContent":[null,"import type { RequestFn } from '../../client';\nimport type {\n MessageLanguage,\n MessageTemplateDetail,\n MessageTemplateLanguage,\n MessageTemplateList,\n MessageTemplatePreview,\n PreviewMessageTemplateRequest,\n ResetMessageTemplateLanguageQuery,\n SendTestMessageRequest,\n SendTestMessageResponse,\n UpdateMessageTemplateLanguageRequest,\n} from '../../types';\n\n/**\n * The texts of every message the platform sends, as the operator writes them\n * at the platform scope: dashboard and operator emails, and the platform\n * default of every buyer email. A shop's own text of a buyer email goes\n * before the platform's, and the built-in text applies where neither exists.\n *\n * Reading needs an admin login or API key; writes, resets and test sends need\n * `AccountManage`. Every change is recorded in the audit log\n * (`entity_type: 'message_template'`, `entity_id:\n * 'platform:platform:<channel>:<template_id>:<language>'`).\n */\nexport class PlatformMessageTemplates {\n constructor(private readonly request: RequestFn) {}\n\n /** `GET /admin-portal/message-templates` */\n async list(): Promise<MessageTemplateList> {\n return this.request('GET', '/admin-portal/message-templates');\n }\n\n /** `GET /admin-portal/message-templates/{template_id}` */\n async retrieve(templateId: string): Promise<MessageTemplateDetail> {\n return this.request('GET', `/admin-portal/message-templates/${encodeURIComponent(templateId)}`);\n }\n\n /**\n * Store the platform's text in one language.\n *\n * `PUT /admin-portal/message-templates/{template_id}/languages/{language}`\n */\n async updateLanguage(\n templateId: string,\n language: MessageLanguage,\n params: UpdateMessageTemplateLanguageRequest,\n ): Promise<MessageTemplateLanguage> {\n return this.request(\n 'PUT',\n `/admin-portal/message-templates/${encodeURIComponent(templateId)}/languages/${encodeURIComponent(language)}`,\n {\n body: params,\n },\n );\n }\n\n /**\n * Remove the platform's text in one language, so the built-in text applies.\n *\n * `DELETE /admin-portal/message-templates/{template_id}/languages/{language}`\n */\n async resetLanguage(\n templateId: string,\n language: MessageLanguage,\n params: ResetMessageTemplateLanguageQuery = {},\n ): Promise<MessageTemplateLanguage> {\n return this.request(\n 'DELETE',\n `/admin-portal/message-templates/${encodeURIComponent(templateId)}/languages/${encodeURIComponent(language)}`,\n {\n query: { expected_revision: params.expected_revision },\n },\n );\n }\n\n /** `POST /admin-portal/message-templates/{template_id}/preview` */\n async preview(\n templateId: string,\n params: PreviewMessageTemplateRequest,\n ): Promise<MessageTemplatePreview> {\n return this.request(\n 'POST',\n `/admin-portal/message-templates/${encodeURIComponent(templateId)}/preview`,\n { body: params },\n );\n }\n\n /**\n * Send the template to the signed-in admin's own address.\n *\n * `POST /admin-portal/message-templates/{template_id}/test`\n */\n async sendTest(\n templateId: string,\n params: SendTestMessageRequest,\n ): Promise<SendTestMessageResponse> {\n return this.request(\n 'POST',\n `/admin-portal/message-templates/${encodeURIComponent(templateId)}/test`,\n { body: params },\n );\n }\n}\n"]}
1
+ {"version":3,"sources":["/home/anes/delo-payment/sdk-publish-w2/dist/chunk-W457XUA6.cjs","../src/internal/resources/platformMessageTemplates.ts"],"names":[],"mappings":"AAAA;ACyBO,IAAM,yBAAA,EAAN,MAA+B;AAAA,EACpC,WAAA,CAA6B,OAAA,EAAoB;AAApB,IAAA,IAAA,CAAA,QAAA,EAAA,OAAA;AAAA,EAAqB;AAAA;AAAA,EAGlD,MAAM,IAAA,CAAA,EAAqC;AACzC,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,KAAA,EAAO,iCAAiC,CAAA;AAAA,EAC9D;AAAA;AAAA,EAGA,MAAM,QAAA,CAAS,UAAA,EAAoD;AACjE,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,KAAA,EAAO,CAAA,gCAAA,EAAmC,kBAAA,CAAmB,UAAU,CAAC,CAAA,CAAA;AAC9F,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAWoC,EAAA;AACtB,IAAA;AACV,MAAA;AAC+E,MAAA;AAC/E,MAAA;AACQ,QAAA;AACR,MAAA;AACF,IAAA;AACF,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAWoC,EAAA;AACtB,IAAA;AACV,MAAA;AAC+E,MAAA;AAC/E,MAAA;AACuD,QAAA;AACvD,MAAA;AACF,IAAA;AACF,EAAA;AAAA;AAMmC,EAAA;AACrB,IAAA;AACV,MAAA;AACiE,MAAA;AAClD,MAAA;AACjB,IAAA;AACF,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUoC,EAAA;AACtB,IAAA;AACV,MAAA;AACiE,MAAA;AAClD,MAAA;AACjB,IAAA;AACF,EAAA;AACF;ADzCiG;AACA;AACA;AACA","file":"/home/anes/delo-payment/sdk-publish-w2/dist/chunk-W457XUA6.cjs","sourcesContent":[null,"import type { RequestFn } from '../../client';\nimport type {\n MessageLanguage,\n MessageTemplateDetail,\n MessageTemplateLanguage,\n MessageTemplateList,\n MessageTemplatePreview,\n PreviewMessageTemplateRequest,\n ResetMessageTemplateLanguageQuery,\n SendTestMessageRequest,\n SendTestMessageResponse,\n UpdateMessageTemplateLanguageRequest,\n} from '../../types';\n\n/**\n * The texts of every message the platform sends, as the operator writes them\n * at the platform scope: dashboard and operator emails, and the platform\n * default of every buyer email. A shop's own text of a buyer email goes\n * before the platform's, and the built-in text applies where neither exists.\n *\n * Reading needs an admin login or API key; writes, resets and test sends need\n * `AccountManage`. Every change is recorded in the audit log\n * (`entity_type: 'message_template'`, `entity_id:\n * 'platform:platform:<channel>:<template_id>:<language>'`).\n */\nexport class PlatformMessageTemplates {\n constructor(private readonly request: RequestFn) {}\n\n /** `GET /admin-portal/message-templates` */\n async list(): Promise<MessageTemplateList> {\n return this.request('GET', '/admin-portal/message-templates');\n }\n\n /** `GET /admin-portal/message-templates/{template_id}` */\n async retrieve(templateId: string): Promise<MessageTemplateDetail> {\n return this.request('GET', `/admin-portal/message-templates/${encodeURIComponent(templateId)}`);\n }\n\n /**\n * Store the platform's text in one language.\n *\n * `PUT /admin-portal/message-templates/{template_id}/languages/{language}`\n */\n async updateLanguage(\n templateId: string,\n language: MessageLanguage,\n params: UpdateMessageTemplateLanguageRequest,\n ): Promise<MessageTemplateLanguage> {\n return this.request(\n 'PUT',\n `/admin-portal/message-templates/${encodeURIComponent(templateId)}/languages/${encodeURIComponent(language)}`,\n {\n body: params,\n },\n );\n }\n\n /**\n * Remove the platform's text in one language, so the built-in text applies.\n *\n * `DELETE /admin-portal/message-templates/{template_id}/languages/{language}`\n */\n async resetLanguage(\n templateId: string,\n language: MessageLanguage,\n params: ResetMessageTemplateLanguageQuery = {},\n ): Promise<MessageTemplateLanguage> {\n return this.request(\n 'DELETE',\n `/admin-portal/message-templates/${encodeURIComponent(templateId)}/languages/${encodeURIComponent(language)}`,\n {\n query: { expected_revision: params.expected_revision },\n },\n );\n }\n\n /** `POST /admin-portal/message-templates/{template_id}/preview` */\n async preview(\n templateId: string,\n params: PreviewMessageTemplateRequest,\n ): Promise<MessageTemplatePreview> {\n return this.request(\n 'POST',\n `/admin-portal/message-templates/${encodeURIComponent(templateId)}/preview`,\n { body: params },\n );\n }\n\n /**\n * Send the template to the signed-in admin's own address.\n *\n * `POST /admin-portal/message-templates/{template_id}/test`\n */\n async sendTest(\n templateId: string,\n params: SendTestMessageRequest,\n ): Promise<SendTestMessageResponse> {\n return this.request(\n 'POST',\n `/admin-portal/message-templates/${encodeURIComponent(templateId)}/test`,\n { body: params },\n );\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["/tmp/sdk-pub-0459/dist/chunk-WHDI3TMP.cjs","../src/resources/verification.ts"],"names":[],"mappings":"AAAA;ACOO,IAAM,aAAA,EAAN,MAAmB;AAAA,EACxB,WAAA,CAA6B,OAAA,EAAoB;AAApB,IAAA,IAAA,CAAA,QAAA,EAAA,OAAA;AAAA,EAAqB;AAAA,EAElD,MAAM,uBAAA,CACJ,UAAA,EACA,MAAA,EACuC;AACvC,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,MAAA,EAAQ,CAAA,kBAAA,EAAqB,kBAAA,CAAmB,UAAU,CAAC,CAAA,CAAA;AACvE,MAAA;AACP,IAAA;AACH,EAAA;AAI4C,EAAA;AACsB,IAAA;AACvD,MAAA;AACR,IAAA;AACH,EAAA;AACF;ADVoF;AACA;AACA;AACA","file":"/tmp/sdk-pub-0459/dist/chunk-WHDI3TMP.cjs","sourcesContent":[null,"import type {\n ApplePayVerificationRequest,\n ApplePayVerificationResponse,\n ApplePayVerifiedDomainsResponse,\n} from '../types';\nimport type { RequestFn } from '../client';\n\nexport class Verification {\n constructor(private readonly request: RequestFn) {}\n\n async registerApplePayDomains(\n merchantId: string,\n params: ApplePayVerificationRequest,\n ): Promise<ApplePayVerificationResponse> {\n return this.request('POST', `/verify/apple-pay/${encodeURIComponent(merchantId)}`, {\n body: params,\n });\n }\n\n async getApplePayVerifiedDomains(\n params: Record<string, string>,\n ): Promise<ApplePayVerifiedDomainsResponse> {\n return this.request('GET', '/verify/applepay-verified-domains', {\n query: params,\n });\n }\n}\n"]}
1
+ {"version":3,"sources":["/home/anes/delo-payment/sdk-publish-w2/dist/chunk-WHDI3TMP.cjs","../src/resources/verification.ts"],"names":[],"mappings":"AAAA;ACOO,IAAM,aAAA,EAAN,MAAmB;AAAA,EACxB,WAAA,CAA6B,OAAA,EAAoB;AAApB,IAAA,IAAA,CAAA,QAAA,EAAA,OAAA;AAAA,EAAqB;AAAA,EAElD,MAAM,uBAAA,CACJ,UAAA,EACA,MAAA,EACuC;AACvC,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,MAAA,EAAQ,CAAA,kBAAA,EAAqB,kBAAA,CAAmB,UAAU,CAAC,CAAA,CAAA;AACvE,MAAA;AACP,IAAA;AACH,EAAA;AAI4C,EAAA;AACsB,IAAA;AACvD,MAAA;AACR,IAAA;AACH,EAAA;AACF;ADVoF;AACA;AACA;AACA","file":"/home/anes/delo-payment/sdk-publish-w2/dist/chunk-WHDI3TMP.cjs","sourcesContent":[null,"import type {\n ApplePayVerificationRequest,\n ApplePayVerificationResponse,\n ApplePayVerifiedDomainsResponse,\n} from '../types';\nimport type { RequestFn } from '../client';\n\nexport class Verification {\n constructor(private readonly request: RequestFn) {}\n\n async registerApplePayDomains(\n merchantId: string,\n params: ApplePayVerificationRequest,\n ): Promise<ApplePayVerificationResponse> {\n return this.request('POST', `/verify/apple-pay/${encodeURIComponent(merchantId)}`, {\n body: params,\n });\n }\n\n async getApplePayVerifiedDomains(\n params: Record<string, string>,\n ): Promise<ApplePayVerifiedDomainsResponse> {\n return this.request('GET', '/verify/applepay-verified-domains', {\n query: params,\n });\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["/tmp/sdk-pub-0459/dist/chunk-WITCPKNL.cjs","../src/internal/resources/cardIssuers.ts"],"names":[],"mappings":"AAAA;ACQO,IAAM,YAAA,EAAN,MAAkB;AAAA,EACvB,WAAA,CAA6B,OAAA,EAAoB;AAApB,IAAA,IAAA,CAAA,QAAA,EAAA,OAAA;AAAA,EAAqB;AAAA,EAElD,MAAM,MAAA,CAAO,MAAA,EAA8D;AACzE,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,MAAA,EAAQ,eAAA,EAAiB,EAAE,IAAA,EAAM,OAAO,CAAC,CAAA;AAAA,EAC/D;AAAA,EAEA,MAAM,MAAA,CAAO,QAAA,EAAkB,MAAA,EAA8D;AAC3F,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,KAAA,EAAO,CAAA,cAAA,EAAiB,kBAAA,CAAmB,QAAQ,CAAC,CAAA,CAAA;AAC1E,EAAA;AAE8C,EAAA;AACF,IAAA;AAC5C,EAAA;AACF;ADP6E;AACA;AACA;AACA","file":"/tmp/sdk-pub-0459/dist/chunk-WITCPKNL.cjs","sourcesContent":[null,"import type {\n CardIssuerCreateRequest,\n CardIssuerResponse,\n CardIssuerUpdateRequest,\n CardIssuerListResponse,\n} from '../types';\nimport type { RequestFn } from '../../client';\n\nexport class CardIssuers {\n constructor(private readonly request: RequestFn) {}\n\n async create(params: CardIssuerCreateRequest): Promise<CardIssuerResponse> {\n return this.request('POST', '/card-issuers', { body: params });\n }\n\n async update(issuerId: string, params: CardIssuerUpdateRequest): Promise<CardIssuerResponse> {\n return this.request('PUT', `/card-issuers/${encodeURIComponent(issuerId)}`, { body: params });\n }\n\n async list(): Promise<CardIssuerListResponse> {\n return this.request('GET', '/card-issuers');\n }\n}\n"]}
1
+ {"version":3,"sources":["/home/anes/delo-payment/sdk-publish-w2/dist/chunk-WITCPKNL.cjs","../src/internal/resources/cardIssuers.ts"],"names":[],"mappings":"AAAA;ACQO,IAAM,YAAA,EAAN,MAAkB;AAAA,EACvB,WAAA,CAA6B,OAAA,EAAoB;AAApB,IAAA,IAAA,CAAA,QAAA,EAAA,OAAA;AAAA,EAAqB;AAAA,EAElD,MAAM,MAAA,CAAO,MAAA,EAA8D;AACzE,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,MAAA,EAAQ,eAAA,EAAiB,EAAE,IAAA,EAAM,OAAO,CAAC,CAAA;AAAA,EAC/D;AAAA,EAEA,MAAM,MAAA,CAAO,QAAA,EAAkB,MAAA,EAA8D;AAC3F,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,KAAA,EAAO,CAAA,cAAA,EAAiB,kBAAA,CAAmB,QAAQ,CAAC,CAAA,CAAA;AAC1E,EAAA;AAE8C,EAAA;AACF,IAAA;AAC5C,EAAA;AACF;ADP6E;AACA;AACA;AACA","file":"/home/anes/delo-payment/sdk-publish-w2/dist/chunk-WITCPKNL.cjs","sourcesContent":[null,"import type {\n CardIssuerCreateRequest,\n CardIssuerResponse,\n CardIssuerUpdateRequest,\n CardIssuerListResponse,\n} from '../types';\nimport type { RequestFn } from '../../client';\n\nexport class CardIssuers {\n constructor(private readonly request: RequestFn) {}\n\n async create(params: CardIssuerCreateRequest): Promise<CardIssuerResponse> {\n return this.request('POST', '/card-issuers', { body: params });\n }\n\n async update(issuerId: string, params: CardIssuerUpdateRequest): Promise<CardIssuerResponse> {\n return this.request('PUT', `/card-issuers/${encodeURIComponent(issuerId)}`, { body: params });\n }\n\n async list(): Promise<CardIssuerListResponse> {\n return this.request('GET', '/card-issuers');\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["/tmp/sdk-pub-0459/dist/chunk-WX6NP7UU.cjs","../src/resources/threeDsRules.ts"],"names":[],"mappings":"AAAA;ACGO,IAAM,aAAA,EAAN,MAAmB;AAAA,EACxB,WAAA,CAA6B,OAAA,EAAoB;AAApB,IAAA,IAAA,CAAA,QAAA,EAAA,OAAA;AAAA,EAAqB;AAAA,EAElD,MAAM,OAAA,CAAQ,MAAA,EAAiE;AAC7E,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,MAAA,EAAQ,4BAAA,EAA8B,EAAE,IAAA,EAAM,OAAO,CAAC,CAAA;AAAA,EAC5E;AACF,CAAA;ADAA;AACA;AACE;AACF,oCAAC","file":"/tmp/sdk-pub-0459/dist/chunk-WX6NP7UU.cjs","sourcesContent":[null,"import type { ThreeDsRuleExecuteRequest, ThreeDsRuleResponse } from '../types';\nimport type { RequestFn } from '../client';\n\nexport class ThreeDsRules {\n constructor(private readonly request: RequestFn) {}\n\n async execute(params: ThreeDsRuleExecuteRequest): Promise<ThreeDsRuleResponse> {\n return this.request('POST', '/three-ds-decision/execute', { body: params });\n }\n}\n"]}
1
+ {"version":3,"sources":["/home/anes/delo-payment/sdk-publish-w2/dist/chunk-WX6NP7UU.cjs","../src/resources/threeDsRules.ts"],"names":[],"mappings":"AAAA;ACGO,IAAM,aAAA,EAAN,MAAmB;AAAA,EACxB,WAAA,CAA6B,OAAA,EAAoB;AAApB,IAAA,IAAA,CAAA,QAAA,EAAA,OAAA;AAAA,EAAqB;AAAA,EAElD,MAAM,OAAA,CAAQ,MAAA,EAAiE;AAC7E,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,MAAA,EAAQ,4BAAA,EAA8B,EAAE,IAAA,EAAM,OAAO,CAAC,CAAA;AAAA,EAC5E;AACF,CAAA;ADAA;AACA;AACE;AACF,oCAAC","file":"/home/anes/delo-payment/sdk-publish-w2/dist/chunk-WX6NP7UU.cjs","sourcesContent":[null,"import type { ThreeDsRuleExecuteRequest, ThreeDsRuleResponse } from '../types';\nimport type { RequestFn } from '../client';\n\nexport class ThreeDsRules {\n constructor(private readonly request: RequestFn) {}\n\n async execute(params: ThreeDsRuleExecuteRequest): Promise<ThreeDsRuleResponse> {\n return this.request('POST', '/three-ds-decision/execute', { body: params });\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["/tmp/sdk-pub-0459/dist/chunk-XQLRIBVR.cjs","../src/eventStream.ts"],"names":[],"mappings":"AAAA;AC0BA,IAAM,GAAA,EAAK,EAAA;AACX,IAAM,GAAA,EAAK,EAAA;AAGJ,IAAM,kBAAA,EAAN,MAAwB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAe7B,WAAA,CAAY,YAAA,EAAc,EAAA,EAAI;AAd9B,IAAA,IAAA,CAAQ,KAAA,EAAO,EAAA;AAEf;AAAA,IAAA,IAAA,CAAQ,OAAA,EAAS,KAAA;AACjB,IAAA,IAAA,CAAQ,KAAA,EAAO,EAAA;AACf,IAAA,IAAA,CAAQ,QAAA,EAAU,KAAA;AAClB,IAAA,IAAA,CAAQ,UAAA,EAAY,EAAA;AAEpB,IAAA,IAAA,CAAQ,MAAA,EAAuB,IAAA;AAQ7B,IAAA,IAAA,CAAK,SAAA,EAAW,WAAA;AAAA,EAClB;AAAA;AAAA,EAGA,IAAA,CAAK,IAAA,EAAqC;AACxC,IAAA,MAAM,IAAA,EAA6B,CAAC,CAAA;AACpC,IAAA,GAAA,CAAI,IAAA,CAAK,OAAA,IAAW,CAAA,EAAG,OAAO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D/BoC;AACA;AACA;AACA","file":"/tmp/sdk-pub-0459/dist/chunk-XQLRIBVR.cjs","sourcesContent":[null,"/**\n * A `text/event-stream` (server-sent events) parser, after the WHATWG HTML\n * standard's \"event stream interpretation\", for streams read through `fetch`\n * rather than `EventSource` — which cannot send an `Authorization` header.\n *\n * It holds only the line in progress and the event being assembled, never the\n * body read so far: a stream may stay open for half an hour.\n */\n\n/** One dispatch of the stream, in the order the stream made them. */\nexport interface EventStreamDispatch {\n /**\n * The stream's last event id after this dispatch. Every dispatch sets it,\n * one without data too: that is how a keepalive advances the position.\n * `''` when the server reset it, or never sent one.\n */\n lastEventId: string;\n /** The reconnection time the stream last announced (`retry:`), in ms. */\n retry: number | null;\n /**\n * The event, or `null` for a dispatch without data, which carries only\n * the id. `type` is `message` when the stream named none.\n */\n event: { type: string; data: string } | null;\n}\n\nconst LF = 10;\nconst CR = 13;\n\n/** Parses decoded text into dispatches, however the text is split into chunks. */\nexport class EventStreamParser {\n private line = '';\n /** The previous chunk ended in CR: a LF opening the next one belongs to it. */\n private skipLf = false;\n private data = '';\n private hasData = false;\n private eventType = '';\n private idBuffer: string;\n private retry: number | null = null;\n\n /**\n * @param lastEventId - The id the stream resumes after, as `EventSource`\n * carries it into a reconnection: a dispatch before the server names an\n * id keeps this one.\n */\n constructor(lastEventId = '') {\n this.idBuffer = lastEventId;\n }\n\n /** Feed the next piece of decoded text; returns the dispatches it completed. */\n push(text: string): EventStreamDispatch[] {\n const out: EventStreamDispatch[] = [];\n if (text.length === 0) return out;\n let start = 0;\n if (this.skipLf) {\n this.skipLf = false;\n if (text.charCodeAt(0) === LF) start = 1;\n }\n for (let i = start; i < text.length; i++) {\n const c = text.charCodeAt(i);\n if (c !== LF && c !== CR) continue;\n const line = this.line + text.slice(start, i);\n this.line = '';\n this.processLine(line, out);\n if (c === CR) {\n if (i + 1 < text.length) {\n if (text.charCodeAt(i + 1) === LF) i++;\n } else {\n this.skipLf = true;\n }\n }\n start = i + 1;\n }\n this.line += text.slice(start);\n return out;\n }\n\n private processLine(line: string, out: EventStreamDispatch[]): void {\n if (line === '') {\n this.dispatch(out);\n return;\n }\n if (line.charCodeAt(0) === 0x3a /* : */) return; // a comment\n const colon = line.indexOf(':');\n let field: string;\n let value: string;\n if (colon === -1) {\n field = line;\n value = '';\n } else {\n field = line.slice(0, colon);\n value = line.slice(colon + 1);\n if (value.charCodeAt(0) === 0x20 /* space */) value = value.slice(1);\n }\n switch (field) {\n case 'event':\n this.eventType = value;\n break;\n case 'data':\n this.data = this.hasData ? `${this.data}\\n${value}` : value;\n this.hasData = true;\n break;\n case 'id':\n if (!value.includes('\\u0000')) this.idBuffer = value;\n break;\n case 'retry':\n if (/^[0-9]+$/.test(value)) {\n const ms = Number(value);\n if (Number.isSafeInteger(ms)) this.retry = ms;\n }\n break;\n default:\n // Unknown fields are ignored.\n break;\n }\n }\n\n private dispatch(out: EventStreamDispatch[]): void {\n const event = this.hasData ? { type: this.eventType || 'message', data: this.data } : null;\n out.push({ lastEventId: this.idBuffer, retry: this.retry, event });\n this.data = '';\n this.hasData = false;\n this.eventType = '';\n }\n}\n"]}
1
+ {"version":3,"sources":["/home/anes/delo-payment/sdk-publish-w2/dist/chunk-XQLRIBVR.cjs","../src/eventStream.ts"],"names":[],"mappings":"AAAA;AC0BA,IAAM,GAAA,EAAK,EAAA;AACX,IAAM,GAAA,EAAK,EAAA;AAGJ,IAAM,kBAAA,EAAN,MAAwB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAe7B,WAAA,CAAY,YAAA,EAAc,EAAA,EAAI;AAd9B,IAAA,IAAA,CAAQ,KAAA,EAAO,EAAA;AAEf;AAAA,IAAA,IAAA,CAAQ,OAAA,EAAS,KAAA;AACjB,IAAA,IAAA,CAAQ,KAAA,EAAO,EAAA;AACf,IAAA,IAAA,CAAQ,QAAA,EAAU,KAAA;AAClB,IAAA,IAAA,CAAQ,UAAA,EAAY,EAAA;AAEpB,IAAA,IAAA,CAAQ,MAAA,EAAuB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AAC/B,QAAA;AACG,MAAA;AACyB,QAAA;AACH,UAAA;AACE,UAAA;AAC3B,QAAA;AACA,QAAA;AACF,MAAA;AAEE,QAAA;AACJ,IAAA;AACF,EAAA;AAEmD,EAAA;AAClB,IAAA;AACF,IAAA;AACjB,IAAA;AACG,IAAA;AACE,IAAA;AACnB,EAAA;AACF;AD/BoC;AACA;AACA;AACA","file":"/home/anes/delo-payment/sdk-publish-w2/dist/chunk-XQLRIBVR.cjs","sourcesContent":[null,"/**\n * A `text/event-stream` (server-sent events) parser, after the WHATWG HTML\n * standard's \"event stream interpretation\", for streams read through `fetch`\n * rather than `EventSource` — which cannot send an `Authorization` header.\n *\n * It holds only the line in progress and the event being assembled, never the\n * body read so far: a stream may stay open for half an hour.\n */\n\n/** One dispatch of the stream, in the order the stream made them. */\nexport interface EventStreamDispatch {\n /**\n * The stream's last event id after this dispatch. Every dispatch sets it,\n * one without data too: that is how a keepalive advances the position.\n * `''` when the server reset it, or never sent one.\n */\n lastEventId: string;\n /** The reconnection time the stream last announced (`retry:`), in ms. */\n retry: number | null;\n /**\n * The event, or `null` for a dispatch without data, which carries only\n * the id. `type` is `message` when the stream named none.\n */\n event: { type: string; data: string } | null;\n}\n\nconst LF = 10;\nconst CR = 13;\n\n/** Parses decoded text into dispatches, however the text is split into chunks. */\nexport class EventStreamParser {\n private line = '';\n /** The previous chunk ended in CR: a LF opening the next one belongs to it. */\n private skipLf = false;\n private data = '';\n private hasData = false;\n private eventType = '';\n private idBuffer: string;\n private retry: number | null = null;\n\n /**\n * @param lastEventId - The id the stream resumes after, as `EventSource`\n * carries it into a reconnection: a dispatch before the server names an\n * id keeps this one.\n */\n constructor(lastEventId = '') {\n this.idBuffer = lastEventId;\n }\n\n /** Feed the next piece of decoded text; returns the dispatches it completed. */\n push(text: string): EventStreamDispatch[] {\n const out: EventStreamDispatch[] = [];\n if (text.length === 0) return out;\n let start = 0;\n if (this.skipLf) {\n this.skipLf = false;\n if (text.charCodeAt(0) === LF) start = 1;\n }\n for (let i = start; i < text.length; i++) {\n const c = text.charCodeAt(i);\n if (c !== LF && c !== CR) continue;\n const line = this.line + text.slice(start, i);\n this.line = '';\n this.processLine(line, out);\n if (c === CR) {\n if (i + 1 < text.length) {\n if (text.charCodeAt(i + 1) === LF) i++;\n } else {\n this.skipLf = true;\n }\n }\n start = i + 1;\n }\n this.line += text.slice(start);\n return out;\n }\n\n private processLine(line: string, out: EventStreamDispatch[]): void {\n if (line === '') {\n this.dispatch(out);\n return;\n }\n if (line.charCodeAt(0) === 0x3a /* : */) return; // a comment\n const colon = line.indexOf(':');\n let field: string;\n let value: string;\n if (colon === -1) {\n field = line;\n value = '';\n } else {\n field = line.slice(0, colon);\n value = line.slice(colon + 1);\n if (value.charCodeAt(0) === 0x20 /* space */) value = value.slice(1);\n }\n switch (field) {\n case 'event':\n this.eventType = value;\n break;\n case 'data':\n this.data = this.hasData ? `${this.data}\\n${value}` : value;\n this.hasData = true;\n break;\n case 'id':\n if (!value.includes('\\u0000')) this.idBuffer = value;\n break;\n case 'retry':\n if (/^[0-9]+$/.test(value)) {\n const ms = Number(value);\n if (Number.isSafeInteger(ms)) this.retry = ms;\n }\n break;\n default:\n // Unknown fields are ignored.\n break;\n }\n }\n\n private dispatch(out: EventStreamDispatch[]): void {\n const event = this.hasData ? { type: this.eventType || 'message', data: this.data } : null;\n out.push({ lastEventId: this.idBuffer, retry: this.retry, event });\n this.data = '';\n this.hasData = false;\n this.eventType = '';\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["/tmp/sdk-pub-0459/dist/chunk-Y7LSSRNJ.cjs","../src/internal/resources/adminCheckoutDomains.ts"],"names":[],"mappings":"AAAA;AC0CA,SAAS,WAAA,CACP,KAAA,EACyC;AACzC,EAAA,MAAM,EAAE,OAAA,EAAS,MAAA,EAAQ,IAAA,EAAM,EAAA,EAAI,MAAM,EAAA,mBAAI,KAAA,UAAS,CAAC,GAAA;AACvD,EAAA,OAAO,EAAE,OAAA,EAAS,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AACH;AAAA;AAAA;AAAA;AAAA,EAAA;AAOE,IAAA;AAAY,MAAA;AACV,MAAA;AACyD,IAAA;AAC3D,EAAA;AACF;AAAA;AAAA;AAAA;AAAA,EAAA;AAUE,IAAA;AAAY,MAAA;AACV,MAAA;AACyD,MAAA;AAC1C,IAAA;AACjB,EAAA;AACF;AAAA;AAAA;AAAA;AAAA,EAAA;AAWE,IAAA;AAAY,MAAA;AACV,MAAA;AAC8G,MAAA;AAC/F,IAAA;AACjB,EAAA;AACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAA;AASE,IAAA;AAAY,MAAA;AACV,MAAA;AAC8G,IAAA;AAChH,EAAA;AACF;AAAA;AAAA;AAAA;AAAA;AAAA,EAAA;AAWE,IAAA;AAAY,MAAA;AACV,MAAA;AACyD,MAAA;AAC1C,IAAA;AACjB,EAAA;AACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAA;AASE,IAAA;AAAkE,EAAA;AACpE;AAAA;AAAA;AAAA;AAAA,EAAA;AAOE,IAAA;AAAoF,EAAA;AAExF;ADjHA;AACA;AACA;AACA","file":"/tmp/sdk-pub-0459/dist/chunk-Y7LSSRNJ.cjs","sourcesContent":[null,"import type {\n AdminMerchantCheckoutDomains,\n ApplePayVerificationFileCreateRequest,\n ApplePayVerificationFileResponse,\n ApplePayVerificationFileUpdateRequest,\n CheckoutDomainCreateRequest,\n CheckoutDomainResponse,\n CheckoutDomainsEntitlementSaved,\n CheckoutDomainsEntitlementUpdate,\n CheckoutDomainsOverview,\n CheckoutHostAvailability,\n CheckoutHostAvailabilityQuery,\n CheckoutHostCheckList,\n CheckoutHostChecksQuery,\n CheckoutHostCreateRequest,\n CheckoutHostHealthList,\n CheckoutHostHealthQuery,\n CheckoutHostPrimaryImpact,\n CheckoutHostRegistrationCounts,\n CheckoutHostRenameImpact,\n CheckoutHostRenameRequest,\n CheckoutHostRenameResponse,\n CheckoutDomainAdminAlerts,\n CheckoutDomainsEntitlementPreview,\n MerchantHostSuspendRequest,\n MerchantHostsList,\n MerchantHostsQuery,\n PlatformCloudflare,\n PlatformCloudflareConnect,\n} from '../types';\nimport type {\n CheckoutHostHealthDetail,\n CloudflareOAuthCallback,\n CloudflareOAuthStart,\n CheckoutHostPauseRequest,\n CheckoutHostPreview,\n CheckoutHostResponse,\n CheckoutHostUpdateRequest,\n} from '../../types';\nimport type { RequestFn } from '../../client';\n\n/** The filters of the checks log, taken key by key so nothing else reaches the query. */\nfunction checksQuery(\n query: Omit<CheckoutHostChecksQuery, 'format'> | undefined,\n): Omit<CheckoutHostChecksQuery, 'format'> {\n const { host_id, result, from, to, limit } = query ?? {};\n return { host_id, result, from, to, limit };\n}\n\n/**\n * Checkout domains for DeloPay staff: the platform's checkout hosts and base\n * domains, the Apple Pay verification file library, host health and the raw\n * check log, the platform Cloudflare connection, and each merchant's\n * checkout-domain entitlement and addresses.\n *\n * Reads need a staff role; every write needs account management and is\n * recorded in the audit log.\n */\nexport class AdminCheckoutDomains {\n constructor(private readonly request: RequestFn) {}\n\n /**\n * Every platform domain and host, the Apple Pay file library, the config fallback and how pool hostnames are spelled.\n * `GET /admin-portal/checkout-domains`\n */\n async overview(): Promise<CheckoutDomainsOverview> {\n return this.request('GET', '/admin-portal/checkout-domains');\n }\n\n /**\n * The raw checks of the last 7 days, filtered by host, result and time.\n * `GET /admin-portal/checkout-domains/checks`\n */\n async listChecks(\n query?: Omit<CheckoutHostChecksQuery, 'format'>,\n ): Promise<CheckoutHostCheckList> {\n // Always JSON here, whatever a caller's object carries at runtime.\n return this.request('GET', '/admin-portal/checkout-domains/checks', {\n query: { ...checksQuery(query), format: 'json' },\n });\n }\n\n /**\n * The same checks as a CSV file (`format=csv`), for a download.\n * `GET /admin-portal/checkout-domains/checks?format=csv`\n */\n async exportChecks(query?: Omit<CheckoutHostChecksQuery, 'format'>): Promise<Blob> {\n return this.request('GET', '/admin-portal/checkout-domains/checks', {\n query: { ...checksQuery(query), format: 'csv' },\n responseType: 'blob',\n });\n }\n\n /**\n * Add a checkout domain\n * `POST /admin-portal/checkout-domains/domains`\n */\n async createDomain(params: CheckoutDomainCreateRequest): Promise<CheckoutDomainResponse> {\n return this.request('POST', '/admin-portal/checkout-domains/domains', { body: params });\n }\n\n /**\n * Remove a checkout domain\n * `DELETE /admin-portal/checkout-domains/domains/{domain_id}`\n */\n async deleteDomain(domainId: string): Promise<void> {\n return this.request(\n 'DELETE',\n `/admin-portal/checkout-domains/domains/${encodeURIComponent(domainId)}`,\n );\n }\n\n /**\n * Upload an Apple Pay verification file. The stored file is read back\n * before it is saved; when that fails nothing is saved, and the refusal\n * (`code` `IR_16`, `data.reason`) is `file_unreadable` (the file storage\n * writes but does not read: check its configuration) or `file_corrupted`\n * (the stored bytes differ from the upload: try again).\n * `POST /admin-portal/checkout-domains/files`\n */\n async uploadFile(\n params: ApplePayVerificationFileCreateRequest,\n ): Promise<ApplePayVerificationFileResponse> {\n return this.request('POST', '/admin-portal/checkout-domains/files', { body: params });\n }\n\n /**\n * Change an Apple Pay verification file\n * `PATCH /admin-portal/checkout-domains/files/{file_id}`\n */\n async updateFile(\n fileId: string,\n params: ApplePayVerificationFileUpdateRequest,\n ): Promise<ApplePayVerificationFileResponse> {\n return this.request(\n 'PATCH',\n `/admin-portal/checkout-domains/files/${encodeURIComponent(fileId)}`,\n { body: params },\n );\n }\n\n /**\n * Remove an Apple Pay verification file\n * `DELETE /admin-portal/checkout-domains/files/{file_id}`\n */\n async deleteFile(fileId: string): Promise<void> {\n return this.request(\n 'DELETE',\n `/admin-portal/checkout-domains/files/${encodeURIComponent(fileId)}`,\n );\n }\n\n /**\n * The bytes of an Apple Pay verification file, presets included.\n * `GET /admin-portal/checkout-domains/files/{file_id}/content`\n */\n async downloadFile(fileId: string): Promise<Blob> {\n return this.request(\n 'GET',\n `/admin-portal/checkout-domains/files/${encodeURIComponent(fileId)}/content`,\n { responseType: 'blob' },\n );\n }\n\n /**\n * Every host with its health, uptime and payments, with counts per summary filter; sorted and searched on the server.\n * `GET /admin-portal/checkout-domains/health`\n */\n async health(query?: CheckoutHostHealthQuery): Promise<CheckoutHostHealthList> {\n return this.request('GET', '/admin-portal/checkout-domains/health', { query: { ...query } });\n }\n\n /**\n * Add a checkout host\n * `POST /admin-portal/checkout-domains/hosts`\n */\n async createHost(params: CheckoutHostCreateRequest): Promise<CheckoutHostResponse> {\n return this.request('POST', '/admin-portal/checkout-domains/hosts', { body: params });\n }\n\n /**\n * Whether a platform host name is free\n * `GET /admin-portal/checkout-domains/hosts/availability`\n */\n async hostAvailability(query: CheckoutHostAvailabilityQuery): Promise<CheckoutHostAvailability> {\n return this.request('GET', '/admin-portal/checkout-domains/hosts/availability', {\n query: { ...query },\n });\n }\n\n /**\n * Change a checkout host\n * `PATCH /admin-portal/checkout-domains/hosts/{host_id}`\n */\n async updateHost(\n hostId: string,\n params: CheckoutHostUpdateRequest,\n ): Promise<CheckoutHostResponse> {\n return this.request(\n 'PATCH',\n `/admin-portal/checkout-domains/hosts/${encodeURIComponent(hostId)}`,\n { body: params },\n );\n }\n\n /**\n * Remove a host, in two steps for every kind: it must stop taking traffic\n * first. Refusals (`code` `IR_16`, `data.reason`): `primary_host`,\n * `last_default_host`, `configured_host` (the configured checkout address),\n * `host_takes_traffic` (pause or rename it first), `host_draining`\n * (`retry_after_seconds`), `host_in_use` (`payment_ids`) and `host_changed`.\n * `DELETE /admin-portal/checkout-domains/hosts/{host_id}`\n */\n async deleteHost(hostId: string): Promise<void> {\n return this.request(\n 'DELETE',\n `/admin-portal/checkout-domains/hosts/${encodeURIComponent(hostId)}`,\n );\n }\n\n /**\n * Check a checkout host now\n * `POST /admin-portal/checkout-domains/hosts/{host_id}/check`\n */\n async checkHost(hostId: string): Promise<CheckoutHostResponse> {\n return this.request(\n 'POST',\n `/admin-portal/checkout-domains/hosts/${encodeURIComponent(hostId)}/check`,\n );\n }\n\n /**\n * One host's health page: uptime, 90 days, incidents, the checks where the result changed, and usage.\n * `GET /admin-portal/checkout-domains/hosts/{host_id}/health`\n */\n async hostHealth(hostId: string): Promise<CheckoutHostHealthDetail> {\n return this.request(\n 'GET',\n `/admin-portal/checkout-domains/hosts/${encodeURIComponent(hostId)}/health`,\n );\n }\n\n /**\n * Pause a checkout host\n * `POST /admin-portal/checkout-domains/hosts/{host_id}/pause`\n */\n async pauseHost(hostId: string, params: CheckoutHostPauseRequest): Promise<CheckoutHostResponse> {\n return this.request(\n 'POST',\n `/admin-portal/checkout-domains/hosts/${encodeURIComponent(hostId)}/pause`,\n { body: params },\n );\n }\n\n /**\n * Resume a paused checkout host\n * `POST /admin-portal/checkout-domains/hosts/{host_id}/resume`\n */\n async resumeHost(hostId: string): Promise<CheckoutHostResponse> {\n return this.request(\n 'POST',\n `/admin-portal/checkout-domains/hosts/${encodeURIComponent(hostId)}/resume`,\n );\n }\n\n /**\n * A signed preview link of a checkout host\n * `POST /admin-portal/checkout-domains/hosts/{host_id}/preview`\n */\n async previewHost(hostId: string): Promise<CheckoutHostPreview> {\n return this.request(\n 'POST',\n `/admin-portal/checkout-domains/hosts/${encodeURIComponent(hostId)}/preview`,\n );\n }\n\n /**\n * Make a ready default host the primary one: new links use it within about 30 seconds. Old hosts keep serving.\n * `POST /admin-portal/checkout-domains/hosts/{host_id}/primary`\n */\n async makePrimary(hostId: string): Promise<CheckoutHostResponse> {\n return this.request(\n 'POST',\n `/admin-portal/checkout-domains/hosts/${encodeURIComponent(hostId)}/primary`,\n );\n }\n\n /**\n * What making a host primary would change for Apple Pay registrations.\n * `GET /admin-portal/checkout-domains/hosts/{host_id}/primary-impact`\n */\n async primaryImpact(hostId: string): Promise<CheckoutHostPrimaryImpact> {\n return this.request(\n 'GET',\n `/admin-portal/checkout-domains/hosts/${encodeURIComponent(hostId)}/primary-impact`,\n );\n }\n\n /**\n * A checkout host's Apple Pay registrations, counted\n * `GET /admin-portal/checkout-domains/hosts/{host_id}/registrations`\n */\n async hostRegistrations(hostId: string): Promise<CheckoutHostRegistrationCounts> {\n return this.request(\n 'GET',\n `/admin-portal/checkout-domains/hosts/${encodeURIComponent(hostId)}/registrations`,\n );\n }\n\n /**\n * Rename a checkout host\n * `POST /admin-portal/checkout-domains/hosts/{host_id}/rename`\n */\n async renameHost(\n hostId: string,\n params: CheckoutHostRenameRequest,\n ): Promise<CheckoutHostRenameResponse> {\n return this.request(\n 'POST',\n `/admin-portal/checkout-domains/hosts/${encodeURIComponent(hostId)}/rename`,\n { body: params },\n );\n }\n\n /**\n * What renaming a host would cost: the processors whose Apple Pay registration of the hostname is lost, and the merchants affected.\n * `GET /admin-portal/checkout-domains/hosts/{host_id}/rename-impact`\n */\n async renameImpact(hostId: string): Promise<CheckoutHostRenameImpact> {\n return this.request(\n 'GET',\n `/admin-portal/checkout-domains/hosts/${encodeURIComponent(hostId)}/rename-impact`,\n );\n }\n\n /**\n * Create the host's proxied DNS record through the platform Cloudflare connection.\n * `POST /admin-portal/checkout-domains/hosts/{host_id}/dns`\n */\n async createHostDns(hostId: string): Promise<CheckoutHostResponse> {\n return this.request(\n 'POST',\n `/admin-portal/checkout-domains/hosts/${encodeURIComponent(hostId)}/dns`,\n );\n }\n\n /**\n * the platform Cloudflare connection\n * `GET /admin-portal/checkout-domains/cloudflare`\n */\n async cloudflare(): Promise<PlatformCloudflare> {\n return this.request('GET', '/admin-portal/checkout-domains/cloudflare');\n }\n\n /**\n * connect or replace the platform Cloudflare token\n * `PUT /admin-portal/checkout-domains/cloudflare`\n */\n async connectCloudflare(params: PlatformCloudflareConnect): Promise<PlatformCloudflare> {\n return this.request('PUT', '/admin-portal/checkout-domains/cloudflare', { body: params });\n }\n\n /**\n * disconnect the platform Cloudflare token\n * `DELETE /admin-portal/checkout-domains/cloudflare`\n */\n async disconnectCloudflare(): Promise<void> {\n return this.request('DELETE', '/admin-portal/checkout-domains/cloudflare');\n }\n\n /**\n * check the platform Cloudflare token again\n * `POST /admin-portal/checkout-domains/cloudflare/check`\n */\n async checkCloudflare(): Promise<PlatformCloudflare> {\n return this.request('POST', '/admin-portal/checkout-domains/cloudflare/check');\n }\n\n /**\n * Start \"Connect with Cloudflare\" (OAuth) for the platform connection,\n * instead of pasting a token. Send the person to `authorize_url`;\n * Cloudflare sends them back to the deployment's redirect URI with `code`\n * and `state`, which go to {@link finishCloudflareOAuth} before\n * `expires_at`. Offered only while `cloudflare()` says `oauth_available`;\n * otherwise refused with `cloudflare_oauth_unavailable`.\n * `POST /admin-portal/checkout-domains/cloudflare/oauth/start`\n */\n async startCloudflareOAuth(): Promise<CloudflareOAuthStart> {\n return this.request('POST', '/admin-portal/checkout-domains/cloudflare/oauth/start');\n }\n\n /**\n * Finish \"Connect with Cloudflare\" for the platform: pass the `code` and\n * `state` from the redirect unchanged. The same person who started it\n * must finish it, and a `state` works once. Answers with the platform\n * connection as it now is. A refusal throws a `DelopayError` with `code`\n * `IR_16` and the reason in `data.reason`, among them\n * `cloudflare_oauth_state_invalid`, `cloudflare_oauth_rejected` and\n * `cloudflare_scopes_missing`.\n * `POST /admin-portal/checkout-domains/cloudflare/oauth/callback`\n */\n async finishCloudflareOAuth(params: CloudflareOAuthCallback): Promise<PlatformCloudflare> {\n return this.request('POST', '/admin-portal/checkout-domains/cloudflare/oauth/callback', {\n body: params,\n });\n }\n\n /**\n * every merchant's checkout addresses\n * `GET /admin-portal/checkout-domains/merchant-hosts`\n */\n async merchantHosts(query?: MerchantHostsQuery): Promise<MerchantHostsList> {\n return this.request('GET', '/admin-portal/checkout-domains/merchant-hosts', {\n query: { ...query },\n });\n }\n\n /**\n * a merchant's checkout domains and entitlement\n * `GET /admin-portal/merchants/{merchant_id}/checkout-domains`\n */\n async merchantCheckoutDomains(merchantId: string): Promise<AdminMerchantCheckoutDomains> {\n return this.request(\n 'GET',\n `/admin-portal/merchants/${encodeURIComponent(merchantId)}/checkout-domains`,\n );\n }\n\n /**\n * A merchant's checkout-domain entitlement. Turning a kind off suspends that kind's addresses; lowering the maximum removes nothing.\n * `PUT /admin-portal/merchants/{merchant_id}/checkout-domains/entitlement`\n */\n async updateEntitlement(\n merchantId: string,\n params: CheckoutDomainsEntitlementUpdate,\n ): Promise<CheckoutDomainsEntitlementSaved> {\n return this.request(\n 'PUT',\n `/admin-portal/merchants/${encodeURIComponent(merchantId)}/checkout-domains/entitlement`,\n { body: params },\n );\n }\n\n /**\n * Suspend a merchant's address: its shops fall back to the default address for new links.\n * `POST /admin-portal/merchants/{merchant_id}/checkout-domains/hosts/{host_id}/suspend`\n */\n async suspendMerchantHost(\n merchantId: string,\n hostId: string,\n params: MerchantHostSuspendRequest,\n ): Promise<CheckoutHostResponse> {\n return this.request(\n 'POST',\n `/admin-portal/merchants/${encodeURIComponent(merchantId)}/checkout-domains/hosts/${encodeURIComponent(hostId)}/suspend`,\n { body: params },\n );\n }\n\n /**\n * Lift a suspension; the address sets up again until its next check passes.\n * Refused with `kind_not_entitled` while the entitlement does not allow its\n * kind.\n * `POST /admin-portal/merchants/{merchant_id}/checkout-domains/hosts/{host_id}/unsuspend`\n */\n async unsuspendMerchantHost(merchantId: string, hostId: string): Promise<CheckoutHostResponse> {\n return this.request(\n 'POST',\n `/admin-portal/merchants/${encodeURIComponent(merchantId)}/checkout-domains/hosts/${encodeURIComponent(hostId)}/unsuspend`,\n );\n }\n\n /**\n * What an entitlement change would do, saving nothing: the entitlement as\n * it would be and the addresses it would suspend.\n * `POST /admin-portal/merchants/{merchant_id}/checkout-domains/entitlement/preview`\n */\n async previewEntitlement(\n merchantId: string,\n params: CheckoutDomainsEntitlementUpdate,\n ): Promise<CheckoutDomainsEntitlementPreview> {\n return this.request(\n 'POST',\n `/admin-portal/merchants/${encodeURIComponent(merchantId)}/checkout-domains/entitlement/preview`,\n { body: params },\n );\n }\n\n /**\n * Who on the platform team hears about checkout hosts: the platform's own\n * hosts (on by default) and merchant addresses down for 30 minutes or more\n * (off by default).\n * `GET /admin-portal/checkout-domains/alerts`\n */\n async alerts(): Promise<CheckoutDomainAdminAlerts> {\n return this.request('GET', '/admin-portal/checkout-domains/alerts');\n }\n\n /**\n * Save the platform team's checkout host alerts.\n * `PUT /admin-portal/checkout-domains/alerts`\n */\n async updateAlerts(params: CheckoutDomainAdminAlerts): Promise<CheckoutDomainAdminAlerts> {\n return this.request('PUT', '/admin-portal/checkout-domains/alerts', { body: params });\n }\n}\n"]}
1
+ {"version":3,"sources":["/home/anes/delo-payment/sdk-publish-w2/dist/chunk-Y7LSSRNJ.cjs","../src/internal/resources/adminCheckoutDomains.ts"],"names":[],"mappings":"AAAA;AC0CA,SAAS,WAAA,CACP,KAAA,EACyC;AACzC,EAAA,MAAM,EAAE,OAAA,EAAS,MAAA,EAAQ,IAAA,EAAM,EAAA,EAAI,MAAM,EAAA,mBAAI,KAAA,UAAS,CAAC,GAAA;AACvD,EAAA,OAAO,EAAE,OAAA,EAAS,MAAA,EAAQ,IAAA,EAAM,EAAA,EAAI,MAAM,CAAA;AAC5C;AAWO,IAAM,qBAAA,EAAN,MAA2B;AAAA,EAChC,WAAA,CAA6B,OAAA,EAAoB;AAApB,IAAA,IAAA,CAAA,QAAA,EAAA,OAAA;AAAA,EAAqB;AAAA;AAAA;AAAA;AAAA;AAAA,EAMlD,MAAM,QAAA,CAAA,EAA6C;AACjD,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,KAAA,EAAO,gCAAgC,CAAA;AAAA,EAC7D;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,MAAM,UAAA,CACJ,KAAA,EACgC;AAEhC,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,KAAA,EAAO,uCAAA,EAAyC;AAAA,MAClE,KAAA,EAAO,EAAE,GAAG,WAAA,CAAY,KAAK,CAAA,EAAG,MAAA,EAAQ,OAAO;AAAA,IACjD,CAAC,CAAA;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,MAAM,YAAA,CAAa,KAAA,EAAgE;AACjF,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,KAAA,EAAO,uCAAA,EAAyC;AAAA,MAClE,KAAA,EAAO,EAAE,GAAG,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import type {\n AdminMerchantCheckoutDomains,\n ApplePayVerificationFileCreateRequest,\n ApplePayVerificationFileResponse,\n ApplePayVerificationFileUpdateRequest,\n CheckoutDomainCreateRequest,\n CheckoutDomainResponse,\n CheckoutDomainsEntitlementSaved,\n CheckoutDomainsEntitlementUpdate,\n CheckoutDomainsOverview,\n CheckoutHostAvailability,\n CheckoutHostAvailabilityQuery,\n CheckoutHostCheckList,\n CheckoutHostChecksQuery,\n CheckoutHostCreateRequest,\n CheckoutHostHealthList,\n CheckoutHostHealthQuery,\n CheckoutHostPrimaryImpact,\n CheckoutHostRegistrationCounts,\n CheckoutHostRenameImpact,\n CheckoutHostRenameRequest,\n CheckoutHostRenameResponse,\n CheckoutDomainAdminAlerts,\n CheckoutDomainsEntitlementPreview,\n MerchantHostSuspendRequest,\n MerchantHostsList,\n MerchantHostsQuery,\n PlatformCloudflare,\n PlatformCloudflareConnect,\n} from '../types';\nimport type {\n CheckoutHostHealthDetail,\n CloudflareOAuthCallback,\n CloudflareOAuthStart,\n CheckoutHostPauseRequest,\n CheckoutHostPreview,\n CheckoutHostResponse,\n CheckoutHostUpdateRequest,\n} from '../../types';\nimport type { RequestFn } from '../../client';\n\n/** The filters of the checks log, taken key by key so nothing else reaches the query. */\nfunction checksQuery(\n query: Omit<CheckoutHostChecksQuery, 'format'> | undefined,\n): Omit<CheckoutHostChecksQuery, 'format'> {\n const { host_id, result, from, to, limit } = query ?? {};\n return { host_id, result, from, to, limit };\n}\n\n/**\n * Checkout domains for DeloPay staff: the platform's checkout hosts and base\n * domains, the Apple Pay verification file library, host health and the raw\n * check log, the platform Cloudflare connection, and each merchant's\n * checkout-domain entitlement and addresses.\n *\n * Reads need a staff role; every write needs account management and is\n * recorded in the audit log.\n */\nexport class AdminCheckoutDomains {\n constructor(private readonly request: RequestFn) {}\n\n /**\n * Every platform domain and host, the Apple Pay file library, the config fallback and how pool hostnames are spelled.\n * `GET /admin-portal/checkout-domains`\n */\n async overview(): Promise<CheckoutDomainsOverview> {\n return this.request('GET', '/admin-portal/checkout-domains');\n }\n\n /**\n * The raw checks of the last 7 days, filtered by host, result and time.\n * `GET /admin-portal/checkout-domains/checks`\n */\n async listChecks(\n query?: Omit<CheckoutHostChecksQuery, 'format'>,\n ): Promise<CheckoutHostCheckList> {\n // Always JSON here, whatever a caller's object carries at runtime.\n return this.request('GET', '/admin-portal/checkout-domains/checks', {\n query: { ...checksQuery(query), format: 'json' },\n });\n }\n\n /**\n * The same checks as a CSV file (`format=csv`), for a download.\n * `GET /admin-portal/checkout-domains/checks?format=csv`\n */\n async exportChecks(query?: Omit<CheckoutHostChecksQuery, 'format'>): Promise<Blob> {\n return this.request('GET', '/admin-portal/checkout-domains/checks', {\n query: { ...checksQuery(query), format: 'csv' },\n responseType: 'blob',\n });\n }\n\n /**\n * Add a checkout domain\n * `POST /admin-portal/checkout-domains/domains`\n */\n async createDomain(params: CheckoutDomainCreateRequest): Promise<CheckoutDomainResponse> {\n return this.request('POST', '/admin-portal/checkout-domains/domains', { body: params });\n }\n\n /**\n * Remove a checkout domain\n * `DELETE /admin-portal/checkout-domains/domains/{domain_id}`\n */\n async deleteDomain(domainId: string): Promise<void> {\n return this.request(\n 'DELETE',\n `/admin-portal/checkout-domains/domains/${encodeURIComponent(domainId)}`,\n );\n }\n\n /**\n * Upload an Apple Pay verification file. The stored file is read back\n * before it is saved; when that fails nothing is saved, and the refusal\n * (`code` `IR_16`, `data.reason`) is `file_unreadable` (the file storage\n * writes but does not read: check its configuration) or `file_corrupted`\n * (the stored bytes differ from the upload: try again).\n * `POST /admin-portal/checkout-domains/files`\n */\n async uploadFile(\n params: ApplePayVerificationFileCreateRequest,\n ): Promise<ApplePayVerificationFileResponse> {\n return this.request('POST', '/admin-portal/checkout-domains/files', { body: params });\n }\n\n /**\n * Change an Apple Pay verification file\n * `PATCH /admin-portal/checkout-domains/files/{file_id}`\n */\n async updateFile(\n fileId: string,\n params: ApplePayVerificationFileUpdateRequest,\n ): Promise<ApplePayVerificationFileResponse> {\n return this.request(\n 'PATCH',\n `/admin-portal/checkout-domains/files/${encodeURIComponent(fileId)}`,\n { body: params },\n );\n }\n\n /**\n * Remove an Apple Pay verification file\n * `DELETE /admin-portal/checkout-domains/files/{file_id}`\n */\n async deleteFile(fileId: string): Promise<void> {\n return this.request(\n 'DELETE',\n `/admin-portal/checkout-domains/files/${encodeURIComponent(fileId)}`,\n );\n }\n\n /**\n * The bytes of an Apple Pay verification file, presets included.\n * `GET /admin-portal/checkout-domains/files/{file_id}/content`\n */\n async downloadFile(fileId: string): Promise<Blob> {\n return this.request(\n 'GET',\n `/admin-portal/checkout-domains/files/${encodeURIComponent(fileId)}/content`,\n { responseType: 'blob' },\n );\n }\n\n /**\n * Every host with its health, uptime and payments, with counts per summary filter; sorted and searched on the server.\n * `GET /admin-portal/checkout-domains/health`\n */\n async health(query?: CheckoutHostHealthQuery): Promise<CheckoutHostHealthList> {\n return this.request('GET', '/admin-portal/checkout-domains/health', { query: { ...query } });\n }\n\n /**\n * Add a checkout host\n * `POST /admin-portal/checkout-domains/hosts`\n */\n async createHost(params: CheckoutHostCreateRequest): Promise<CheckoutHostResponse> {\n return this.request('POST', '/admin-portal/checkout-domains/hosts', { body: params });\n }\n\n /**\n * Whether a platform host name is free\n * `GET /admin-portal/checkout-domains/hosts/availability`\n */\n async hostAvailability(query: CheckoutHostAvailabilityQuery): Promise<CheckoutHostAvailability> {\n return this.request('GET', '/admin-portal/checkout-domains/hosts/availability', {\n query: { ...query },\n });\n }\n\n /**\n * Change a checkout host\n * `PATCH /admin-portal/checkout-domains/hosts/{host_id}`\n */\n async updateHost(\n hostId: string,\n params: CheckoutHostUpdateRequest,\n ): Promise<CheckoutHostResponse> {\n return this.request(\n 'PATCH',\n `/admin-portal/checkout-domains/hosts/${encodeURIComponent(hostId)}`,\n { body: params },\n );\n }\n\n /**\n * Remove a host, in two steps for every kind: it must stop taking traffic\n * first. Refusals (`code` `IR_16`, `data.reason`): `primary_host`,\n * `last_default_host`, `configured_host` (the configured checkout address),\n * `host_takes_traffic` (pause or rename it first), `host_draining`\n * (`retry_after_seconds`), `host_in_use` (`payment_ids`) and `host_changed`.\n * `DELETE /admin-portal/checkout-domains/hosts/{host_id}`\n */\n async deleteHost(hostId: string): Promise<void> {\n return this.request(\n 'DELETE',\n `/admin-portal/checkout-domains/hosts/${encodeURIComponent(hostId)}`,\n );\n }\n\n /**\n * Check a checkout host now\n * `POST /admin-portal/checkout-domains/hosts/{host_id}/check`\n */\n async checkHost(hostId: string): Promise<CheckoutHostResponse> {\n return this.request(\n 'POST',\n `/admin-portal/checkout-domains/hosts/${encodeURIComponent(hostId)}/check`,\n );\n }\n\n /**\n * One host's health page: uptime, 90 days, incidents, the checks where the result changed, and usage.\n * `GET /admin-portal/checkout-domains/hosts/{host_id}/health`\n */\n async hostHealth(hostId: string): Promise<CheckoutHostHealthDetail> {\n return this.request(\n 'GET',\n `/admin-portal/checkout-domains/hosts/${encodeURIComponent(hostId)}/health`,\n );\n }\n\n /**\n * Pause a checkout host\n * `POST /admin-portal/checkout-domains/hosts/{host_id}/pause`\n */\n async pauseHost(hostId: string, params: CheckoutHostPauseRequest): Promise<CheckoutHostResponse> {\n return this.request(\n 'POST',\n `/admin-portal/checkout-domains/hosts/${encodeURIComponent(hostId)}/pause`,\n { body: params },\n );\n }\n\n /**\n * Resume a paused checkout host\n * `POST /admin-portal/checkout-domains/hosts/{host_id}/resume`\n */\n async resumeHost(hostId: string): Promise<CheckoutHostResponse> {\n return this.request(\n 'POST',\n `/admin-portal/checkout-domains/hosts/${encodeURIComponent(hostId)}/resume`,\n );\n }\n\n /**\n * A signed preview link of a checkout host\n * `POST /admin-portal/checkout-domains/hosts/{host_id}/preview`\n */\n async previewHost(hostId: string): Promise<CheckoutHostPreview> {\n return this.request(\n 'POST',\n `/admin-portal/checkout-domains/hosts/${encodeURIComponent(hostId)}/preview`,\n );\n }\n\n /**\n * Make a ready default host the primary one: new links use it within about 30 seconds. Old hosts keep serving.\n * `POST /admin-portal/checkout-domains/hosts/{host_id}/primary`\n */\n async makePrimary(hostId: string): Promise<CheckoutHostResponse> {\n return this.request(\n 'POST',\n `/admin-portal/checkout-domains/hosts/${encodeURIComponent(hostId)}/primary`,\n );\n }\n\n /**\n * What making a host primary would change for Apple Pay registrations.\n * `GET /admin-portal/checkout-domains/hosts/{host_id}/primary-impact`\n */\n async primaryImpact(hostId: string): Promise<CheckoutHostPrimaryImpact> {\n return this.request(\n 'GET',\n `/admin-portal/checkout-domains/hosts/${encodeURIComponent(hostId)}/primary-impact`,\n );\n }\n\n /**\n * A checkout host's Apple Pay registrations, counted\n * `GET /admin-portal/checkout-domains/hosts/{host_id}/registrations`\n */\n async hostRegistrations(hostId: string): Promise<CheckoutHostRegistrationCounts> {\n return this.request(\n 'GET',\n `/admin-portal/checkout-domains/hosts/${encodeURIComponent(hostId)}/registrations`,\n );\n }\n\n /**\n * Rename a checkout host\n * `POST /admin-portal/checkout-domains/hosts/{host_id}/rename`\n */\n async renameHost(\n hostId: string,\n params: CheckoutHostRenameRequest,\n ): Promise<CheckoutHostRenameResponse> {\n return this.request(\n 'POST',\n `/admin-portal/checkout-domains/hosts/${encodeURIComponent(hostId)}/rename`,\n { body: params },\n );\n }\n\n /**\n * What renaming a host would cost: the processors whose Apple Pay registration of the hostname is lost, and the merchants affected.\n * `GET /admin-portal/checkout-domains/hosts/{host_id}/rename-impact`\n */\n async renameImpact(hostId: string): Promise<CheckoutHostRenameImpact> {\n return this.request(\n 'GET',\n `/admin-portal/checkout-domains/hosts/${encodeURIComponent(hostId)}/rename-impact`,\n );\n }\n\n /**\n * Create the host's proxied DNS record through the platform Cloudflare connection.\n * `POST /admin-portal/checkout-domains/hosts/{host_id}/dns`\n */\n async createHostDns(hostId: string): Promise<CheckoutHostResponse> {\n return this.request(\n 'POST',\n `/admin-portal/checkout-domains/hosts/${encodeURIComponent(hostId)}/dns`,\n );\n }\n\n /**\n * the platform Cloudflare connection\n * `GET /admin-portal/checkout-domains/cloudflare`\n */\n async cloudflare(): Promise<PlatformCloudflare> {\n return this.request('GET', '/admin-portal/checkout-domains/cloudflare');\n }\n\n /**\n * connect or replace the platform Cloudflare token\n * `PUT /admin-portal/checkout-domains/cloudflare`\n */\n async connectCloudflare(params: PlatformCloudflareConnect): Promise<PlatformCloudflare> {\n return this.request('PUT', '/admin-portal/checkout-domains/cloudflare', { body: params });\n }\n\n /**\n * disconnect the platform Cloudflare token\n * `DELETE /admin-portal/checkout-domains/cloudflare`\n */\n async disconnectCloudflare(): Promise<void> {\n return this.request('DELETE', '/admin-portal/checkout-domains/cloudflare');\n }\n\n /**\n * check the platform Cloudflare token again\n * `POST /admin-portal/checkout-domains/cloudflare/check`\n */\n async checkCloudflare(): Promise<PlatformCloudflare> {\n return this.request('POST', '/admin-portal/checkout-domains/cloudflare/check');\n }\n\n /**\n * Start \"Connect with Cloudflare\" (OAuth) for the platform connection,\n * instead of pasting a token. Send the person to `authorize_url`;\n * Cloudflare sends them back to the deployment's redirect URI with `code`\n * and `state`, which go to {@link finishCloudflareOAuth} before\n * `expires_at`. Offered only while `cloudflare()` says `oauth_available`;\n * otherwise refused with `cloudflare_oauth_unavailable`.\n * `POST /admin-portal/checkout-domains/cloudflare/oauth/start`\n */\n async startCloudflareOAuth(): Promise<CloudflareOAuthStart> {\n return this.request('POST', '/admin-portal/checkout-domains/cloudflare/oauth/start');\n }\n\n /**\n * Finish \"Connect with Cloudflare\" for the platform: pass the `code` and\n * `state` from the redirect unchanged. The same person who started it\n * must finish it, and a `state` works once. Answers with the platform\n * connection as it now is. A refusal throws a `DelopayError` with `code`\n * `IR_16` and the reason in `data.reason`, among them\n * `cloudflare_oauth_state_invalid`, `cloudflare_oauth_rejected` and\n * `cloudflare_scopes_missing`.\n * `POST /admin-portal/checkout-domains/cloudflare/oauth/callback`\n */\n async finishCloudflareOAuth(params: CloudflareOAuthCallback): Promise<PlatformCloudflare> {\n return this.request('POST', '/admin-portal/checkout-domains/cloudflare/oauth/callback', {\n body: params,\n });\n }\n\n /**\n * every merchant's checkout addresses\n * `GET /admin-portal/checkout-domains/merchant-hosts`\n */\n async merchantHosts(query?: MerchantHostsQuery): Promise<MerchantHostsList> {\n return this.request('GET', '/admin-portal/checkout-domains/merchant-hosts', {\n query: { ...query },\n });\n }\n\n /**\n * a merchant's checkout domains and entitlement\n * `GET /admin-portal/merchants/{merchant_id}/checkout-domains`\n */\n async merchantCheckoutDomains(merchantId: string): Promise<AdminMerchantCheckoutDomains> {\n return this.request(\n 'GET',\n `/admin-portal/merchants/${encodeURIComponent(merchantId)}/checkout-domains`,\n );\n }\n\n /**\n * A merchant's checkout-domain entitlement. Turning a kind off suspends that kind's addresses; lowering the maximum removes nothing.\n * `PUT /admin-portal/merchants/{merchant_id}/checkout-domains/entitlement`\n */\n async updateEntitlement(\n merchantId: string,\n params: CheckoutDomainsEntitlementUpdate,\n ): Promise<CheckoutDomainsEntitlementSaved> {\n return this.request(\n 'PUT',\n `/admin-portal/merchants/${encodeURIComponent(merchantId)}/checkout-domains/entitlement`,\n { body: params },\n );\n }\n\n /**\n * Suspend a merchant's address: its shops fall back to the default address for new links.\n * `POST /admin-portal/merchants/{merchant_id}/checkout-domains/hosts/{host_id}/suspend`\n */\n async suspendMerchantHost(\n merchantId: string,\n hostId: string,\n params: MerchantHostSuspendRequest,\n ): Promise<CheckoutHostResponse> {\n return this.request(\n 'POST',\n `/admin-portal/merchants/${encodeURIComponent(merchantId)}/checkout-domains/hosts/${encodeURIComponent(hostId)}/suspend`,\n { body: params },\n );\n }\n\n /**\n * Lift a suspension; the address sets up again until its next check passes.\n * Refused with `kind_not_entitled` while the entitlement does not allow its\n * kind.\n * `POST /admin-portal/merchants/{merchant_id}/checkout-domains/hosts/{host_id}/unsuspend`\n */\n async unsuspendMerchantHost(merchantId: string, hostId: string): Promise<CheckoutHostResponse> {\n return this.request(\n 'POST',\n `/admin-portal/merchants/${encodeURIComponent(merchantId)}/checkout-domains/hosts/${encodeURIComponent(hostId)}/unsuspend`,\n );\n }\n\n /**\n * What an entitlement change would do, saving nothing: the entitlement as\n * it would be and the addresses it would suspend.\n * `POST /admin-portal/merchants/{merchant_id}/checkout-domains/entitlement/preview`\n */\n async previewEntitlement(\n merchantId: string,\n params: CheckoutDomainsEntitlementUpdate,\n ): Promise<CheckoutDomainsEntitlementPreview> {\n return this.request(\n 'POST',\n `/admin-portal/merchants/${encodeURIComponent(merchantId)}/checkout-domains/entitlement/preview`,\n { body: params },\n );\n }\n\n /**\n * Who on the platform team hears about checkout hosts: the platform's own\n * hosts (on by default) and merchant addresses down for 30 minutes or more\n * (off by default).\n * `GET /admin-portal/checkout-domains/alerts`\n */\n async alerts(): Promise<CheckoutDomainAdminAlerts> {\n return this.request('GET', '/admin-portal/checkout-domains/alerts');\n }\n\n /**\n * Save the platform team's checkout host alerts.\n * `PUT /admin-portal/checkout-domains/alerts`\n */\n async updateAlerts(params: CheckoutDomainAdminAlerts): Promise<CheckoutDomainAdminAlerts> {\n return this.request('PUT', '/admin-portal/checkout-domains/alerts', { body: params });\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["/tmp/sdk-pub-0459/dist/chunk-YK3P5QNZ.cjs","../src/resources/products.ts"],"names":[],"mappings":"AAAA;ACmFO,IAAM,SAAA,EAAN,MAAe;AAAA,EACpB,WAAA,CAA6B,OAAA,EAAoB;AAApB,IAAA,IAAA,CAAA,QAAA,EAAA,OAAA;AAAA,EAAqB;AAAA;AAAA,EAG1C,MAAA,CAAO,SAAA,EAAmB,OAAA,EAAwC;AACxE,IAAA,OAAO,EAAE,GAAG,OAAA,EAAS,OAAA,EAAS,EAAE,cAAA,EAAgB,SAAA,EAAW,mBAAG,OAAA,2BAAS,UAAQ,EAAE,CAAA;AAAA,EACnF;AAAA;AAAA;AAAA,EAIA,MAAM,WAAA,CACJ,IAAA,EACA,SAAA,EACA,OAAA,EACqC;AACrC,IAAA,MAAM,KAAA,EAAO,IAAI,QAAA,CAAS,CAAA;AAC1B,IAAA,IAAA,CAAK,MA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A;AAAA;AAAA;AAAA;AAgBqC,EAAA;AACmB,IAAA;AAC9C,MAAA;AAC2B,MAAA;AAClC,IAAA;AACH,EAAA;AAAA;AAAA;AAAA;AAAA;AAUyC,EAAA;AACa,IAAA;AACE,MAAA;AACnB,MAAA;AAClC,IAAA;AACH,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAcwC,EAAA;AAC+B,IAAA;AAClC,MAAA;AAClC,IAAA;AACH,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAW6C,EAAA;AACY,IAAA;AAC/C,MAAA;AAC2B,MAAA;AAClC,IAAA;AACH,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAgBwC,EAAA;AACgC,IAAA;AAC9D,MAAA;AAC2B,MAAA;AAClC,IAAA;AACH,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAYwC,EAAA;AACoB,IAAA;AACvB,MAAA;AAClC,IAAA;AACH,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUwC,EAAA;AACoB,IAAA;AACvB,MAAA;AAClC,IAAA;AACH,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAe0C,EAAA;AAC8B,IAAA;AAC9D,MAAA;AAC2B,MAAA;AAClC,IAAA;AACH,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAamC,EAAA;AACqC,IAAA;AAC9D,MAAA;AAC2B,MAAA;AAClC,IAAA;AACH,EAAA;AACF;AD/U0E;AACA;AACA;AACA","file":"/tmp/sdk-pub-0459/dist/chunk-YK3P5QNZ.cjs","sourcesContent":[null,"import type {\n BillingReadinessResponse,\n ProductSalesQuery,\n ProductSalesResponse,\n AddonGroupCreateRequest,\n AddonGroupUpdateRequest,\n BundleDefinition,\n GetSubscriptionItemsResponse,\n ProductCategoryCreateRequest,\n ProductCategoryListQuery,\n ProductCategoryListResponse,\n ProductCategoryReorderRequest,\n ProductCategoryResponse,\n ProductCategoryUpdateRequest,\n ProductAliasCreateRequest,\n ProductConnectorReferenceCreateRequest,\n ProductAssignModeRequest,\n ProductCopyToLivePreview,\n ProductCopyToLivePreviewQuery,\n ProductCopyToLiveRequest,\n ProductCopyToLiveResponse,\n ProductCreateRequest,\n ProductLegacyUsageParams,\n ProductLegacyUsageResponse,\n ProductDeleteRequest,\n ProductDeleteResponse,\n ProductImageUploadResponse,\n ProductImportAcceptRequest,\n ProductImportApplyRequest,\n ProductImportPreviewRequest,\n ProductImportPreviewResponse,\n ProductImportRunListResponse,\n ProductImportRunResponse,\n ProductImportSuggestionsQuery,\n ProductListParams,\n ProductListResponse,\n ProductProviderCreateRequest,\n ProductProviderCreateResponse,\n ProductProviderPushRequest,\n ProductProviderPushResponse,\n ProductProviderSyncBatchRequest,\n ProductProviderSyncBatchResponse,\n ProductProviderSyncResponse,\n ProductPriceCreateRequest,\n ProductPriceUpdateRequest,\n ProductResolveQuery,\n ProductResolveResponse,\n ProductResponse,\n ProductUpdateRequest,\n ProviderAccountListResponse,\n ProviderArchiveOutcome,\n ProviderArchiveRequest,\n ProviderCleanupListResponse,\n} from '../types';\nimport type { RequestExtras, RequestFn } from '../client';\n\n/**\n * A shop's product catalogue: what it sells, and at which prices.\n *\n * **Every route here belongs to one shop**, and the backend resolves it from\n * an `X-Profile-Id` header, answering `IR_04` without one. That is why\n * `profileId` is a required argument on every method rather than something to\n * remember in `options.headers`: a header that can be forgotten is forgotten,\n * and the failure arrives at runtime in a caller's dashboard rather than at\n * their compiler.\n *\n * Two shapes of the catalogue are worth knowing before calling this:\n *\n * * **A product is created with its prices.** The API requires at least one,\n * because a product nobody can be charged for cannot be sold.\n * * **A price is closed, never rewritten.** `updatePrice` changes its label,\n * its default flag and its metadata; the amount, the currency and the\n * billing interval are fixed for the life of the price, so a charge that was\n * made can always be explained by a price that still exists. Charging a new\n * figure means adding a price and archiving the old one.\n * * **Every price route answers with the whole product.** The catalogue's unit\n * is the product: a price means something only beside its siblings, and\n * which one is the default changes the moment another is added. So these\n * methods return `ProductResponse`, and the price that was touched is found\n * in its `prices` — typing them as the price alone let a caller read\n * `result.amount` as a number that is `undefined` at runtime, and mistake\n * the product's id for a price id.\n */\nexport class Products {\n constructor(private readonly request: RequestFn) {}\n\n /** The shop scope every route here takes, as the backend expects it. */\n private scoped(profileId: string, options?: RequestExtras): RequestExtras {\n return { ...options, headers: { 'X-Profile-Id': profileId, ...options?.headers } };\n }\n\n /** Upload a PNG, JPEG or WebP image to the merchant CDN. Save the returned\n * URL in a product create or update request; upload alone changes no product. */\n async uploadImage(\n file: Blob,\n profileId: string,\n options?: RequestExtras,\n ): Promise<ProductImageUploadResponse> {\n const form = new FormData();\n form.append('file', file);\n return this.request('POST', '/products/images', {\n body: form,\n ...this.scoped(profileId, options),\n });\n }\n\n /**\n * Create a product together with its prices.\n * `POST /products`\n *\n * @param params - The product, with at least one price.\n * @param profileId - The shop the product belongs to.\n */\n async create(\n params: ProductCreateRequest,\n profileId: string,\n options?: RequestExtras,\n ): Promise<ProductResponse> {\n return this.request('POST', '/products', {\n body: params,\n ...this.scoped(profileId, options),\n });\n }\n\n /**\n * One page of the shop's catalogue.\n * `GET /products/list`\n *\n * Archived products are returned too unless `status` narrows them away —\n * they are what past charges refer to.\n */\n async list(\n params: ProductListParams | undefined,\n profileId: string,\n options?: RequestExtras,\n ): Promise<ProductListResponse> {\n return this.request('GET', '/products/list', {\n query: params === undefined ? undefined : { ...params },\n ...this.scoped(profileId, options),\n });\n }\n\n /**\n * Find the product a name or a connector's id belongs to. Pass exactly one\n * of `alias`, `connector_product_id` and `connector_price_id`; the connector\n * ids need `connector` as well. Archived products resolve too, so a payment\n * that references one is still attributed. No match answers 404.\n * `GET /products/resolve`\n */\n async resolve(\n query: ProductResolveQuery,\n profileId: string,\n options?: RequestExtras,\n ): Promise<ProductResolveResponse> {\n return this.request('GET', '/products/resolve', {\n query: { ...query },\n ...this.scoped(profileId, options),\n });\n }\n\n /**\n * Retrieve one product with its prices.\n * `GET /products/{product_id}`\n */\n async retrieve(\n productId: string,\n profileId: string,\n options?: RequestExtras,\n ): Promise<ProductResponse> {\n return this.request('GET', `/products/${encodeURIComponent(productId)}`, {\n ...this.scoped(profileId, options),\n });\n }\n\n /**\n * What a product sold in a window, per currency, net of the refunds credited\n * to its lines. Refunds that named no product line are not included.\n * `GET /products/{product_id}/sales`\n *\n * Needs payment read; refused (403) to a caller limited to some connector\n * accounts.\n */\n async sales(\n productId: string,\n query: ProductSalesQuery,\n profileId: string,\n options?: RequestExtras,\n ): Promise<ProductSalesResponse> {\n return this.request('GET', `/products/${encodeURIComponent(productId)}/sales`, {\n ...this.scoped(profileId, options),\n query: { ...query },\n });\n }\n\n /**\n * Which active prices of the named recurring products can start a\n * subscription on the shop's billing processor account, in the environment\n * the account is in now. `GET /products/billing-readiness`\n *\n * Reads only; subscribing still checks the processor's price before\n * anything is billed. Unknown ids, one-time products and archived prices\n * are left out of the answer.\n *\n * @param productIds - 1 to 100 product ids.\n * @param profileId - The shop the products belong to.\n */\n async billingReadiness(\n productIds: readonly string[],\n profileId: string,\n options?: RequestExtras,\n ): Promise<BillingReadinessResponse> {\n return this.request('GET', '/products/billing-readiness', {\n ...this.scoped(profileId, options),\n // One comma-separated value, as the route reads it — not repeated keys.\n query: { product_ids: productIds.join(',') },\n });\n }\n\n /**\n * Change a product's name, description, image, metadata or category\n * (`category_id: null` makes it uncategorized).\n * `POST /products/{product_id}`\n *\n * Its kind and its prices are not editable here — see the class note.\n */\n async update(\n productId: string,\n params: ProductUpdateRequest,\n profileId: string,\n options?: RequestExtras,\n ): Promise<ProductResponse> {\n return this.request('POST', `/products/${encodeURIComponent(productId)}`, {\n body: params,\n ...this.scoped(profileId, options),\n });\n }\n\n /**\n * Take a product off sale.\n * `POST /products/{product_id}/archive`\n *\n * It stays readable and keeps its prices: a payment made against it has to\n * remain explicable after it is withdrawn.\n */\n async archive(\n productId: string,\n profileId: string,\n options?: RequestExtras,\n ): Promise<ProductResponse> {\n return this.request('POST', `/products/${encodeURIComponent(productId)}/archive`, {\n ...this.scoped(profileId, options),\n });\n }\n\n /**\n * Copy a test product to live: its names, active prices under new ids,\n * image, tax category, category, selection groups and bundle composition.\n * A test product it contains or offers is replaced by its live copy; one\n * without a live copy refuses the copy. Nothing at a payment provider is\n * copied. A repeated copy returns the existing live copy unless `another`\n * is set (`created` says which).\n * `POST /products/{product_id}/copy-to-live`\n */\n async copyToLive(\n productId: string,\n params: ProductCopyToLiveRequest,\n profileId: string,\n options?: RequestExtras,\n ): Promise<ProductCopyToLiveResponse> {\n return this.request('POST', `/products/${encodeURIComponent(productId)}/copy-to-live`, {\n body: params,\n ...this.scoped(profileId, options),\n });\n }\n\n /**\n * What `copyToLive` would do, with nothing written. A copy that would be\n * refused answers with the copy's error.\n * `GET /products/{product_id}/copy-to-live/preview`\n */\n async previewCopyToLive(\n productId: string,\n query: ProductCopyToLivePreviewQuery | undefined,\n profileId: string,\n options?: RequestExtras,\n ): Promise<ProductCopyToLivePreview> {\n return this.request('GET', `/products/${encodeURIComponent(productId)}/copy-to-live/preview`, {\n query: query === undefined ? undefined : { ...query },\n ...this.scoped(profileId, options),\n });\n }\n\n /**\n * The shop's products from before modes, newest first, each with where it\n * is in use per mode.\n * `GET /products/legacy-usage`\n */\n async legacyUsage(\n params: ProductLegacyUsageParams | undefined,\n profileId: string,\n options?: RequestExtras,\n ): Promise<ProductLegacyUsageResponse> {\n return this.request('GET', '/products/legacy-usage', {\n query: params === undefined ? undefined : { ...params },\n ...this.scoped(profileId, options),\n });\n }\n\n /**\n * Give a product from before modes the mode it belongs to, once. Refused\n * while the other mode still uses it, or when it already has a mode.\n * `POST /products/{product_id}/assign-mode`\n */\n async assignMode(\n productId: string,\n params: ProductAssignModeRequest,\n profileId: string,\n options?: RequestExtras,\n ): Promise<ProductResponse> {\n return this.request('POST', `/products/${encodeURIComponent(productId)}/assign-mode`, {\n body: params,\n ...this.scoped(profileId, options),\n });\n }\n\n /**\n * Put an archived product back on sale.\n * `POST /products/{product_id}/restore`\n */\n async restore(\n productId: string,\n profileId: string,\n options?: RequestExtras,\n ): Promise<ProductResponse> {\n return this.request('POST', `/products/${encodeURIComponent(productId)}/restore`, {\n ...this.scoped(profileId, options),\n });\n }\n\n /** Mark an archived product deleted. Historical payment lines keep\n * their own immutable purchase snapshots, and the catalog row remains stored. */\n async delete(productId: string, profileId: string, options?: RequestExtras): Promise<void> {\n return this.request('DELETE', `/products/${encodeURIComponent(productId)}`, {\n ...this.scoped(profileId, options),\n });\n }\n\n /**\n * Delete an archived product, then carry out the chosen action at each\n * connected account it is tied to. An account not named in\n * `provider_actions` is kept as it is. A failed provider action does not\n * undo the delete: it is listed by {@link providerCleanups} and retried\n * with {@link providerArchive}.\n * `POST /products/{product_id}/delete`\n */\n async deleteWithProviders(\n productId: string,\n request: ProductDeleteRequest,\n profileId: string,\n options?: RequestExtras,\n ): Promise<ProductDeleteResponse> {\n return this.request('POST', `/products/${encodeURIComponent(productId)}/delete`, {\n body: request,\n ...this.scoped(profileId, options),\n });\n }\n\n /**\n * Add a price to an existing product.\n * `POST /products/{product_id}/prices`\n *\n * This is how a price changes: the new figure is added and the old price is\n * archived, so both remain readable.\n */\n async addPrice(\n productId: string,\n params: ProductPriceCreateRequest,\n profileId: string,\n options?: RequestExtras,\n ): Promise<ProductResponse> {\n return this.request('POST', `/products/${encodeURIComponent(productId)}/prices`, {\n body: params,\n ...this.scoped(profileId, options),\n });\n }\n\n /**\n * Change a price's label, its default flag or its metadata.\n * `POST /products/{product_id}/prices/{price_id}`\n *\n * Not its amount, its currency or its interval: see the class note.\n */\n async updatePrice(\n productId: string,\n priceId: string,\n params: ProductPriceUpdateRequest,\n profileId: string,\n options?: RequestExtras,\n ): Promise<ProductResponse> {\n return this.request(\n 'POST',\n `/products/${encodeURIComponent(productId)}/prices/${encodeURIComponent(priceId)}`,\n { body: params, ...this.scoped(profileId, options) },\n );\n }\n\n /**\n * Take one price off sale, leaving the product on it.\n * `POST /products/{product_id}/prices/{price_id}/archive`\n */\n async archivePrice(\n productId: string,\n priceId: string,\n profileId: string,\n options?: RequestExtras,\n ): Promise<ProductResponse> {\n return this.request(\n 'POST',\n `/products/${encodeURIComponent(productId)}/prices/${encodeURIComponent(priceId)}/archive`,\n { ...this.scoped(profileId, options) },\n );\n }\n\n // --- add-on selection groups ---------------------------------------\n\n /**\n * Add a group of optional extras to a one-time product, with how many of\n * them a buyer must and may choose. Each add-on is an active product of kind\n * `addon` in the same shop. Returns the whole product.\n * `POST /products/{product_id}/addon-groups`\n */\n async createAddonGroup(\n productId: string,\n group: AddonGroupCreateRequest,\n profileId: string,\n options?: RequestExtras,\n ): Promise<ProductResponse> {\n return this.request('POST', `/products/${encodeURIComponent(productId)}/addon-groups`, {\n body: group,\n ...this.scoped(profileId, options),\n });\n }\n\n /**\n * Change a group's name, bounds, or the add-ons it offers; a new list\n * replaces the old one whole.\n * `POST /products/{product_id}/addon-groups/{group_id}`\n */\n async updateAddonGroup(\n productId: string,\n groupId: string,\n changes: AddonGroupUpdateRequest,\n profileId: string,\n options?: RequestExtras,\n ): Promise<ProductResponse> {\n return this.request(\n 'POST',\n `/products/${encodeURIComponent(productId)}/addon-groups/${encodeURIComponent(groupId)}`,\n { body: changes, ...this.scoped(profileId, options) },\n );\n }\n\n /**\n * Remove a group and what it offered. The add-on products themselves stay.\n * `DELETE /products/{product_id}/addon-groups/{group_id}`\n */\n async deleteAddonGroup(\n productId: string,\n groupId: string,\n profileId: string,\n options?: RequestExtras,\n ): Promise<ProductResponse> {\n return this.request(\n 'DELETE',\n `/products/${encodeURIComponent(productId)}/addon-groups/${encodeURIComponent(groupId)}`,\n { ...this.scoped(profileId, options) },\n );\n }\n\n // --- bundles ---------------------------------------------------------\n\n /**\n * Replace what a bundle contains. Its pricing mode is fixed at creation;\n * past purchases keep their own frozen lines.\n * `POST /products/{product_id}/bundle`\n */\n async replaceBundle(\n productId: string,\n bundle: BundleDefinition,\n profileId: string,\n options?: RequestExtras,\n ): Promise<ProductResponse> {\n return this.request('POST', `/products/${encodeURIComponent(productId)}/bundle`, {\n body: bundle,\n ...this.scoped(profileId, options),\n });\n }\n\n // --- identity: names and connector references ---------------------\n\n /**\n * Add a name the product goes by. A name it already goes by is returned\n * as it is; one another product of the shop goes by is refused.\n * `POST /products/{product_id}/aliases`\n */\n async addAlias(\n productId: string,\n body: ProductAliasCreateRequest,\n profileId: string,\n options?: RequestExtras,\n ): Promise<ProductResponse> {\n return this.request('POST', `/products/${encodeURIComponent(productId)}/aliases`, {\n body,\n ...this.scoped(profileId, options),\n });\n }\n\n /**\n * Remove a name the product goes by. Its current name stays.\n * `POST /products/{product_id}/aliases/{alias_id}/remove`\n */\n async removeAlias(\n productId: string,\n aliasId: string,\n profileId: string,\n options?: RequestExtras,\n ): Promise<ProductResponse> {\n return this.request(\n 'POST',\n `/products/${encodeURIComponent(productId)}/aliases/${encodeURIComponent(aliasId)}/remove`,\n { ...this.scoped(profileId, options) },\n );\n }\n\n /**\n * Tie a connected account's product, or one of its prices, to the product.\n * Recorded as `manual_id`: the ids are not checked against the account.\n * `POST /products/{product_id}/connector-references`\n */\n async addConnectorReference(\n productId: string,\n body: ProductConnectorReferenceCreateRequest,\n profileId: string,\n options?: RequestExtras,\n ): Promise<ProductResponse> {\n return this.request('POST', `/products/${encodeURIComponent(productId)}/connector-references`, {\n body,\n ...this.scoped(profileId, options),\n });\n }\n\n /**\n * Remove a connected account's product or price from the product.\n * `POST /products/{product_id}/connector-references/{reference_id}/remove`\n */\n async removeConnectorReference(\n productId: string,\n referenceId: string,\n profileId: string,\n options?: RequestExtras,\n ): Promise<ProductResponse> {\n return this.request(\n 'POST',\n `/products/${encodeURIComponent(productId)}/connector-references/${encodeURIComponent(referenceId)}/remove`,\n { ...this.scoped(profileId, options) },\n );\n }\n\n /**\n * One bounded page of a connected billing account's products, to pick an\n * existing one to tie to a product. Reads only.\n * `GET /products/import-suggestions`\n */\n async importSuggestions(\n query: ProductImportSuggestionsQuery,\n profileId: string,\n options?: RequestExtras,\n ): Promise<GetSubscriptionItemsResponse[]> {\n return this.request('GET', '/products/import-suggestions', {\n query: { ...query },\n ...this.scoped(profileId, options),\n });\n }\n\n /**\n * Tie one of a connected account's existing products (or a price of it) to\n * the product, verified against a fresh read of the page it was suggested\n * on — pass the same `limit` and `offset`. Recorded as `map_existing`.\n * `POST /products/{product_id}/connector-references/import`\n */\n async acceptImport(\n productId: string,\n body: ProductImportAcceptRequest,\n profileId: string,\n options?: RequestExtras,\n ): Promise<ProductResponse> {\n return this.request(\n 'POST',\n `/products/${encodeURIComponent(productId)}/connector-references/import`,\n { body, ...this.scoped(profileId, options) },\n );\n }\n\n // --- categories ------------------------------------------------------\n\n /**\n * Add a category to the shop, at the end of its order. File products under\n * it with `category_id` on `create` or `update`.\n * `POST /products/categories`\n */\n async createCategory(\n body: ProductCategoryCreateRequest,\n profileId: string,\n options?: RequestExtras,\n ): Promise<ProductCategoryResponse> {\n return this.request('POST', '/products/categories', {\n body,\n ...this.scoped(profileId, options),\n });\n }\n\n /**\n * The shop's categories in order. Archived ones only with\n * `include_archived`; deleted ones never.\n * `GET /products/categories/list`\n */\n async listCategories(\n query: ProductCategoryListQuery | undefined,\n profileId: string,\n options?: RequestExtras,\n ): Promise<ProductCategoryListResponse> {\n return this.request('GET', '/products/categories/list', {\n query: query === undefined ? undefined : { ...query },\n ...this.scoped(profileId, options),\n });\n }\n\n /**\n * Put the shop's categories in a new order. Name every live category,\n * archived ones included, exactly once. Returns the categories in their new\n * order.\n * `POST /products/categories/reorder`\n */\n async reorderCategories(\n body: ProductCategoryReorderRequest,\n profileId: string,\n options?: RequestExtras,\n ): Promise<ProductCategoryListResponse> {\n return this.request('POST', '/products/categories/reorder', {\n body,\n ...this.scoped(profileId, options),\n });\n }\n\n /**\n * Rename a category.\n * `POST /products/categories/{category_id}`\n */\n async updateCategory(\n categoryId: string,\n changes: ProductCategoryUpdateRequest,\n profileId: string,\n options?: RequestExtras,\n ): Promise<ProductCategoryResponse> {\n return this.request('POST', `/products/categories/${encodeURIComponent(categoryId)}`, {\n body: changes,\n ...this.scoped(profileId, options),\n });\n }\n\n /**\n * Mark a category deleted. Its products become uncategorized and no payment\n * changes. Returns the deleted category.\n * `DELETE /products/categories/{category_id}`\n */\n async deleteCategory(\n categoryId: string,\n profileId: string,\n options?: RequestExtras,\n ): Promise<ProductCategoryResponse> {\n return this.request('DELETE', `/products/categories/${encodeURIComponent(categoryId)}`, {\n ...this.scoped(profileId, options),\n });\n }\n\n /**\n * Keep a category with its products, but file no new product under it.\n * `POST /products/categories/{category_id}/archive`\n */\n async archiveCategory(\n categoryId: string,\n profileId: string,\n options?: RequestExtras,\n ): Promise<ProductCategoryResponse> {\n return this.request('POST', `/products/categories/${encodeURIComponent(categoryId)}/archive`, {\n ...this.scoped(profileId, options),\n });\n }\n\n /**\n * Let an archived category take products again.\n * `POST /products/categories/{category_id}/restore`\n */\n async restoreCategory(\n categoryId: string,\n profileId: string,\n options?: RequestExtras,\n ): Promise<ProductCategoryResponse> {\n return this.request('POST', `/products/categories/${encodeURIComponent(categoryId)}/restore`, {\n ...this.scoped(profileId, options),\n });\n }\n\n // --- provider import ---------------------------------------------\n\n /**\n * Read a connected billing account's products and say how each relates to\n * the catalog. Reads only: nothing is written to the provider or the catalog.\n * `POST /products/import/preview`\n */\n async importPreview(\n request: ProductImportPreviewRequest,\n profileId: string,\n options?: RequestExtras,\n ): Promise<ProductImportPreviewResponse> {\n return this.request('POST', '/products/import/preview', {\n body: request,\n ...this.scoped(profileId, options),\n });\n }\n\n /**\n * Create a product for every new item and add the new prices of every\n * changed one, tied to the provider's ids. Nothing else is edited or\n * removed, except that `options.archived: 'archive'` archives the catalog\n * product of every item the provider no longer offers (by default it is\n * left as it is). Nothing is written to the provider. A failed item is\n * reported with its reason and can be retried by naming it in\n * `connector_product_ids`.\n * `POST /products/import/apply`\n */\n async importApply(\n request: ProductImportApplyRequest,\n profileId: string,\n options?: RequestExtras,\n ): Promise<ProductImportRunResponse> {\n return this.request('POST', '/products/import/apply', {\n body: request,\n ...this.scoped(profileId, options),\n });\n }\n\n /**\n * The shop's past imports from one connected account, newest first.\n * `GET /products/import/runs`\n */\n async listImportRuns(\n merchantConnectorId: string,\n profileId: string,\n options?: RequestExtras,\n ): Promise<ProductImportRunListResponse> {\n return this.request('GET', '/products/import/runs', {\n query: { merchant_connector_id: merchantConnectorId },\n ...this.scoped(profileId, options),\n });\n }\n\n // --- provider sync -----------------------------------------------\n\n /**\n * Compare the product with its copy at every connected account it is tied\n * to. Reads the providers now; an unreadable provider answers `unknown`,\n * never `in_sync`.\n * `GET /products/{product_id}/provider-sync`\n */\n async providerSync(\n productId: string,\n profileId: string,\n options?: RequestExtras,\n ): Promise<ProductProviderSyncResponse> {\n return this.request('GET', `/products/${encodeURIComponent(productId)}/provider-sync`, {\n ...this.scoped(profileId, options),\n });\n }\n\n /**\n * {@link providerSync} for 1 to 50 products at once, such as one page of the\n * product list. Unknown ids are left out of the answer.\n * `POST /products/provider-sync`\n */\n async providerSyncBatch(\n request: ProductProviderSyncBatchRequest,\n profileId: string,\n options?: RequestExtras,\n ): Promise<ProductProviderSyncBatchResponse> {\n return this.request('POST', '/products/provider-sync', {\n body: request,\n ...this.scoped(profileId, options),\n });\n }\n\n /**\n * Write the catalog's state onto one connected account's copy of the\n * product, for the differences a push changes and nothing else. When it\n * would change a difference not named in `confirmed`, nothing is written and\n * the answer carries `confirmation_outdated: true` with the current\n * differences in `result`; `nothing_to_push` answers without a provider\n * write when nothing pushable differs.\n * `POST /products/{product_id}/provider-sync/push`\n */\n async providerPush(\n productId: string,\n request: ProductProviderPushRequest,\n profileId: string,\n options?: RequestExtras,\n ): Promise<ProductProviderPushResponse> {\n return this.request('POST', `/products/${encodeURIComponent(productId)}/provider-sync/push`, {\n body: request,\n ...this.scoped(profileId, options),\n });\n }\n\n // --- provider lifecycle -----------------------------------------\n\n /**\n * The shop's connected accounts the catalog works with, and what each can\n * do: read, create, push, and how a delete can clean up there.\n * `GET /products/provider-accounts`\n */\n async providerAccounts(\n profileId: string,\n options?: RequestExtras,\n ): Promise<ProviderAccountListResponse> {\n return this.request('GET', '/products/provider-accounts', {\n ...this.scoped(profileId, options),\n });\n }\n\n /**\n * Provider clean-ups still to be carried out: deletes whose action at a\n * provider failed, or was recorded and never reached.\n * `GET /products/provider-cleanups`\n */\n async providerCleanups(\n profileId: string,\n options?: RequestExtras,\n ): Promise<ProviderCleanupListResponse> {\n return this.request('GET', '/products/provider-cleanups', {\n ...this.scoped(profileId, options),\n });\n }\n\n /**\n * Create the product at a connected account it is not at yet. Without\n * `confirmed` nothing is written and the answer holds the plan to review;\n * send the plan's `fingerprint` back as `confirmed` to carry it out. When\n * the plan changed since, nothing is written and the answer carries\n * `confirmation_outdated: true` with the current plan.\n * `POST /products/{product_id}/provider-sync/create`\n */\n async providerCreate(\n productId: string,\n request: ProductProviderCreateRequest,\n profileId: string,\n options?: RequestExtras,\n ): Promise<ProductProviderCreateResponse> {\n return this.request('POST', `/products/${encodeURIComponent(productId)}/provider-sync/create`, {\n body: request,\n ...this.scoped(profileId, options),\n });\n }\n\n /**\n * Archive the product at one connected account, or retry a clean-up that\n * failed after the product was deleted. Existing subscriptions there keep\n * billing; the catalog is not changed.\n * `POST /products/{product_id}/provider-archive`\n */\n async providerArchive(\n productId: string,\n request: ProviderArchiveRequest,\n profileId: string,\n options?: RequestExtras,\n ): Promise<ProviderArchiveOutcome> {\n return this.request('POST', `/products/${encodeURIComponent(productId)}/provider-archive`, {\n body: request,\n ...this.scoped(profileId, options),\n });\n }\n}\n"]}
1
+ {"version":3,"sources":["/home/anes/delo-payment/sdk-publish-w2/dist/chunk-YK3P5QNZ.cjs","../src/resources/products.ts"],"names":[],"mappings":"AAAA;ACmFO,IAAM,SAAA,EAAN,MAAe;AAAA,EACpB,WAAA,CAA6B,OAAA,EAAoB;AAApB,IAAA,IAAA,CAAA,QAAA,EAAA,OAAA;AAAA,EAAqB;AAAA;AAAA,EAG1C,MA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9D,MAAA;AAC2B,MAAA;AAClC,IAAA;AACH,EAAA;AACF;AD/U0E;AACA;AACA;AACA","file":"/home/anes/delo-payment/sdk-publish-w2/dist/chunk-YK3P5QNZ.cjs","sourcesContent":[null,"import type {\n BillingReadinessResponse,\n ProductSalesQuery,\n ProductSalesResponse,\n AddonGroupCreateRequest,\n AddonGroupUpdateRequest,\n BundleDefinition,\n GetSubscriptionItemsResponse,\n ProductCategoryCreateRequest,\n ProductCategoryListQuery,\n ProductCategoryListResponse,\n ProductCategoryReorderRequest,\n ProductCategoryResponse,\n ProductCategoryUpdateRequest,\n ProductAliasCreateRequest,\n ProductConnectorReferenceCreateRequest,\n ProductAssignModeRequest,\n ProductCopyToLivePreview,\n ProductCopyToLivePreviewQuery,\n ProductCopyToLiveRequest,\n ProductCopyToLiveResponse,\n ProductCreateRequest,\n ProductLegacyUsageParams,\n ProductLegacyUsageResponse,\n ProductDeleteRequest,\n ProductDeleteResponse,\n ProductImageUploadResponse,\n ProductImportAcceptRequest,\n ProductImportApplyRequest,\n ProductImportPreviewRequest,\n ProductImportPreviewResponse,\n ProductImportRunListResponse,\n ProductImportRunResponse,\n ProductImportSuggestionsQuery,\n ProductListParams,\n ProductListResponse,\n ProductProviderCreateRequest,\n ProductProviderCreateResponse,\n ProductProviderPushRequest,\n ProductProviderPushResponse,\n ProductProviderSyncBatchRequest,\n ProductProviderSyncBatchResponse,\n ProductProviderSyncResponse,\n ProductPriceCreateRequest,\n ProductPriceUpdateRequest,\n ProductResolveQuery,\n ProductResolveResponse,\n ProductResponse,\n ProductUpdateRequest,\n ProviderAccountListResponse,\n ProviderArchiveOutcome,\n ProviderArchiveRequest,\n ProviderCleanupListResponse,\n} from '../types';\nimport type { RequestExtras, RequestFn } from '../client';\n\n/**\n * A shop's product catalogue: what it sells, and at which prices.\n *\n * **Every route here belongs to one shop**, and the backend resolves it from\n * an `X-Profile-Id` header, answering `IR_04` without one. That is why\n * `profileId` is a required argument on every method rather than something to\n * remember in `options.headers`: a header that can be forgotten is forgotten,\n * and the failure arrives at runtime in a caller's dashboard rather than at\n * their compiler.\n *\n * Two shapes of the catalogue are worth knowing before calling this:\n *\n * * **A product is created with its prices.** The API requires at least one,\n * because a product nobody can be charged for cannot be sold.\n * * **A price is closed, never rewritten.** `updatePrice` changes its label,\n * its default flag and its metadata; the amount, the currency and the\n * billing interval are fixed for the life of the price, so a charge that was\n * made can always be explained by a price that still exists. Charging a new\n * figure means adding a price and archiving the old one.\n * * **Every price route answers with the whole product.** The catalogue's unit\n * is the product: a price means something only beside its siblings, and\n * which one is the default changes the moment another is added. So these\n * methods return `ProductResponse`, and the price that was touched is found\n * in its `prices` — typing them as the price alone let a caller read\n * `result.amount` as a number that is `undefined` at runtime, and mistake\n * the product's id for a price id.\n */\nexport class Products {\n constructor(private readonly request: RequestFn) {}\n\n /** The shop scope every route here takes, as the backend expects it. */\n private scoped(profileId: string, options?: RequestExtras): RequestExtras {\n return { ...options, headers: { 'X-Profile-Id': profileId, ...options?.headers } };\n }\n\n /** Upload a PNG, JPEG or WebP image to the merchant CDN. Save the returned\n * URL in a product create or update request; upload alone changes no product. */\n async uploadImage(\n file: Blob,\n profileId: string,\n options?: RequestExtras,\n ): Promise<ProductImageUploadResponse> {\n const form = new FormData();\n form.append('file', file);\n return this.request('POST', '/products/images', {\n body: form,\n ...this.scoped(profileId, options),\n });\n }\n\n /**\n * Create a product together with its prices.\n * `POST /products`\n *\n * @param params - The product, with at least one price.\n * @param profileId - The shop the product belongs to.\n */\n async create(\n params: ProductCreateRequest,\n profileId: string,\n options?: RequestExtras,\n ): Promise<ProductResponse> {\n return this.request('POST', '/products', {\n body: params,\n ...this.scoped(profileId, options),\n });\n }\n\n /**\n * One page of the shop's catalogue.\n * `GET /products/list`\n *\n * Archived products are returned too unless `status` narrows them away —\n * they are what past charges refer to.\n */\n async list(\n params: ProductListParams | undefined,\n profileId: string,\n options?: RequestExtras,\n ): Promise<ProductListResponse> {\n return this.request('GET', '/products/list', {\n query: params === undefined ? undefined : { ...params },\n ...this.scoped(profileId, options),\n });\n }\n\n /**\n * Find the product a name or a connector's id belongs to. Pass exactly one\n * of `alias`, `connector_product_id` and `connector_price_id`; the connector\n * ids need `connector` as well. Archived products resolve too, so a payment\n * that references one is still attributed. No match answers 404.\n * `GET /products/resolve`\n */\n async resolve(\n query: ProductResolveQuery,\n profileId: string,\n options?: RequestExtras,\n ): Promise<ProductResolveResponse> {\n return this.request('GET', '/products/resolve', {\n query: { ...query },\n ...this.scoped(profileId, options),\n });\n }\n\n /**\n * Retrieve one product with its prices.\n * `GET /products/{product_id}`\n */\n async retrieve(\n productId: string,\n profileId: string,\n options?: RequestExtras,\n ): Promise<ProductResponse> {\n return this.request('GET', `/products/${encodeURIComponent(productId)}`, {\n ...this.scoped(profileId, options),\n });\n }\n\n /**\n * What a product sold in a window, per currency, net of the refunds credited\n * to its lines. Refunds that named no product line are not included.\n * `GET /products/{product_id}/sales`\n *\n * Needs payment read; refused (403) to a caller limited to some connector\n * accounts.\n */\n async sales(\n productId: string,\n query: ProductSalesQuery,\n profileId: string,\n options?: RequestExtras,\n ): Promise<ProductSalesResponse> {\n return this.request('GET', `/products/${encodeURIComponent(productId)}/sales`, {\n ...this.scoped(profileId, options),\n query: { ...query },\n });\n }\n\n /**\n * Which active prices of the named recurring products can start a\n * subscription on the shop's billing processor account, in the environment\n * the account is in now. `GET /products/billing-readiness`\n *\n * Reads only; subscribing still checks the processor's price before\n * anything is billed. Unknown ids, one-time products and archived prices\n * are left out of the answer.\n *\n * @param productIds - 1 to 100 product ids.\n * @param profileId - The shop the products belong to.\n */\n async billingReadiness(\n productIds: readonly string[],\n profileId: string,\n options?: RequestExtras,\n ): Promise<BillingReadinessResponse> {\n return this.request('GET', '/products/billing-readiness', {\n ...this.scoped(profileId, options),\n // One comma-separated value, as the route reads it — not repeated keys.\n query: { product_ids: productIds.join(',') },\n });\n }\n\n /**\n * Change a product's name, description, image, metadata or category\n * (`category_id: null` makes it uncategorized).\n * `POST /products/{product_id}`\n *\n * Its kind and its prices are not editable here — see the class note.\n */\n async update(\n productId: string,\n params: ProductUpdateRequest,\n profileId: string,\n options?: RequestExtras,\n ): Promise<ProductResponse> {\n return this.request('POST', `/products/${encodeURIComponent(productId)}`, {\n body: params,\n ...this.scoped(profileId, options),\n });\n }\n\n /**\n * Take a product off sale.\n * `POST /products/{product_id}/archive`\n *\n * It stays readable and keeps its prices: a payment made against it has to\n * remain explicable after it is withdrawn.\n */\n async archive(\n productId: string,\n profileId: string,\n options?: RequestExtras,\n ): Promise<ProductResponse> {\n return this.request('POST', `/products/${encodeURIComponent(productId)}/archive`, {\n ...this.scoped(profileId, options),\n });\n }\n\n /**\n * Copy a test product to live: its names, active prices under new ids,\n * image, tax category, category, selection groups and bundle composition.\n * A test product it contains or offers is replaced by its live copy; one\n * without a live copy refuses the copy. Nothing at a payment provider is\n * copied. A repeated copy returns the existing live copy unless `another`\n * is set (`created` says which).\n * `POST /products/{product_id}/copy-to-live`\n */\n async copyToLive(\n productId: string,\n params: ProductCopyToLiveRequest,\n profileId: string,\n options?: RequestExtras,\n ): Promise<ProductCopyToLiveResponse> {\n return this.request('POST', `/products/${encodeURIComponent(productId)}/copy-to-live`, {\n body: params,\n ...this.scoped(profileId, options),\n });\n }\n\n /**\n * What `copyToLive` would do, with nothing written. A copy that would be\n * refused answers with the copy's error.\n * `GET /products/{product_id}/copy-to-live/preview`\n */\n async previewCopyToLive(\n productId: string,\n query: ProductCopyToLivePreviewQuery | undefined,\n profileId: string,\n options?: RequestExtras,\n ): Promise<ProductCopyToLivePreview> {\n return this.request('GET', `/products/${encodeURIComponent(productId)}/copy-to-live/preview`, {\n query: query === undefined ? undefined : { ...query },\n ...this.scoped(profileId, options),\n });\n }\n\n /**\n * The shop's products from before modes, newest first, each with where it\n * is in use per mode.\n * `GET /products/legacy-usage`\n */\n async legacyUsage(\n params: ProductLegacyUsageParams | undefined,\n profileId: string,\n options?: RequestExtras,\n ): Promise<ProductLegacyUsageResponse> {\n return this.request('GET', '/products/legacy-usage', {\n query: params === undefined ? undefined : { ...params },\n ...this.scoped(profileId, options),\n });\n }\n\n /**\n * Give a product from before modes the mode it belongs to, once. Refused\n * while the other mode still uses it, or when it already has a mode.\n * `POST /products/{product_id}/assign-mode`\n */\n async assignMode(\n productId: string,\n params: ProductAssignModeRequest,\n profileId: string,\n options?: RequestExtras,\n ): Promise<ProductResponse> {\n return this.request('POST', `/products/${encodeURIComponent(productId)}/assign-mode`, {\n body: params,\n ...this.scoped(profileId, options),\n });\n }\n\n /**\n * Put an archived product back on sale.\n * `POST /products/{product_id}/restore`\n */\n async restore(\n productId: string,\n profileId: string,\n options?: RequestExtras,\n ): Promise<ProductResponse> {\n return this.request('POST', `/products/${encodeURIComponent(productId)}/restore`, {\n ...this.scoped(profileId, options),\n });\n }\n\n /** Mark an archived product deleted. Historical payment lines keep\n * their own immutable purchase snapshots, and the catalog row remains stored. */\n async delete(productId: string, profileId: string, options?: RequestExtras): Promise<void> {\n return this.request('DELETE', `/products/${encodeURIComponent(productId)}`, {\n ...this.scoped(profileId, options),\n });\n }\n\n /**\n * Delete an archived product, then carry out the chosen action at each\n * connected account it is tied to. An account not named in\n * `provider_actions` is kept as it is. A failed provider action does not\n * undo the delete: it is listed by {@link providerCleanups} and retried\n * with {@link providerArchive}.\n * `POST /products/{product_id}/delete`\n */\n async deleteWithProviders(\n productId: string,\n request: ProductDeleteRequest,\n profileId: string,\n options?: RequestExtras,\n ): Promise<ProductDeleteResponse> {\n return this.request('POST', `/products/${encodeURIComponent(productId)}/delete`, {\n body: request,\n ...this.scoped(profileId, options),\n });\n }\n\n /**\n * Add a price to an existing product.\n * `POST /products/{product_id}/prices`\n *\n * This is how a price changes: the new figure is added and the old price is\n * archived, so both remain readable.\n */\n async addPrice(\n productId: string,\n params: ProductPriceCreateRequest,\n profileId: string,\n options?: RequestExtras,\n ): Promise<ProductResponse> {\n return this.request('POST', `/products/${encodeURIComponent(productId)}/prices`, {\n body: params,\n ...this.scoped(profileId, options),\n });\n }\n\n /**\n * Change a price's label, its default flag or its metadata.\n * `POST /products/{product_id}/prices/{price_id}`\n *\n * Not its amount, its currency or its interval: see the class note.\n */\n async updatePrice(\n productId: string,\n priceId: string,\n params: ProductPriceUpdateRequest,\n profileId: string,\n options?: RequestExtras,\n ): Promise<ProductResponse> {\n return this.request(\n 'POST',\n `/products/${encodeURIComponent(productId)}/prices/${encodeURIComponent(priceId)}`,\n { body: params, ...this.scoped(profileId, options) },\n );\n }\n\n /**\n * Take one price off sale, leaving the product on it.\n * `POST /products/{product_id}/prices/{price_id}/archive`\n */\n async archivePrice(\n productId: string,\n priceId: string,\n profileId: string,\n options?: RequestExtras,\n ): Promise<ProductResponse> {\n return this.request(\n 'POST',\n `/products/${encodeURIComponent(productId)}/prices/${encodeURIComponent(priceId)}/archive`,\n { ...this.scoped(profileId, options) },\n );\n }\n\n // --- add-on selection groups ---------------------------------------\n\n /**\n * Add a group of optional extras to a one-time product, with how many of\n * them a buyer must and may choose. Each add-on is an active product of kind\n * `addon` in the same shop. Returns the whole product.\n * `POST /products/{product_id}/addon-groups`\n */\n async createAddonGroup(\n productId: string,\n group: AddonGroupCreateRequest,\n profileId: string,\n options?: RequestExtras,\n ): Promise<ProductResponse> {\n return this.request('POST', `/products/${encodeURIComponent(productId)}/addon-groups`, {\n body: group,\n ...this.scoped(profileId, options),\n });\n }\n\n /**\n * Change a group's name, bounds, or the add-ons it offers; a new list\n * replaces the old one whole.\n * `POST /products/{product_id}/addon-groups/{group_id}`\n */\n async updateAddonGroup(\n productId: string,\n groupId: string,\n changes: AddonGroupUpdateRequest,\n profileId: string,\n options?: RequestExtras,\n ): Promise<ProductResponse> {\n return this.request(\n 'POST',\n `/products/${encodeURIComponent(productId)}/addon-groups/${encodeURIComponent(groupId)}`,\n { body: changes, ...this.scoped(profileId, options) },\n );\n }\n\n /**\n * Remove a group and what it offered. The add-on products themselves stay.\n * `DELETE /products/{product_id}/addon-groups/{group_id}`\n */\n async deleteAddonGroup(\n productId: string,\n groupId: string,\n profileId: string,\n options?: RequestExtras,\n ): Promise<ProductResponse> {\n return this.request(\n 'DELETE',\n `/products/${encodeURIComponent(productId)}/addon-groups/${encodeURIComponent(groupId)}`,\n { ...this.scoped(profileId, options) },\n );\n }\n\n // --- bundles ---------------------------------------------------------\n\n /**\n * Replace what a bundle contains. Its pricing mode is fixed at creation;\n * past purchases keep their own frozen lines.\n * `POST /products/{product_id}/bundle`\n */\n async replaceBundle(\n productId: string,\n bundle: BundleDefinition,\n profileId: string,\n options?: RequestExtras,\n ): Promise<ProductResponse> {\n return this.request('POST', `/products/${encodeURIComponent(productId)}/bundle`, {\n body: bundle,\n ...this.scoped(profileId, options),\n });\n }\n\n // --- identity: names and connector references ---------------------\n\n /**\n * Add a name the product goes by. A name it already goes by is returned\n * as it is; one another product of the shop goes by is refused.\n * `POST /products/{product_id}/aliases`\n */\n async addAlias(\n productId: string,\n body: ProductAliasCreateRequest,\n profileId: string,\n options?: RequestExtras,\n ): Promise<ProductResponse> {\n return this.request('POST', `/products/${encodeURIComponent(productId)}/aliases`, {\n body,\n ...this.scoped(profileId, options),\n });\n }\n\n /**\n * Remove a name the product goes by. Its current name stays.\n * `POST /products/{product_id}/aliases/{alias_id}/remove`\n */\n async removeAlias(\n productId: string,\n aliasId: string,\n profileId: string,\n options?: RequestExtras,\n ): Promise<ProductResponse> {\n return this.request(\n 'POST',\n `/products/${encodeURIComponent(productId)}/aliases/${encodeURIComponent(aliasId)}/remove`,\n { ...this.scoped(profileId, options) },\n );\n }\n\n /**\n * Tie a connected account's product, or one of its prices, to the product.\n * Recorded as `manual_id`: the ids are not checked against the account.\n * `POST /products/{product_id}/connector-references`\n */\n async addConnectorReference(\n productId: string,\n body: ProductConnectorReferenceCreateRequest,\n profileId: string,\n options?: RequestExtras,\n ): Promise<ProductResponse> {\n return this.request('POST', `/products/${encodeURIComponent(productId)}/connector-references`, {\n body,\n ...this.scoped(profileId, options),\n });\n }\n\n /**\n * Remove a connected account's product or price from the product.\n * `POST /products/{product_id}/connector-references/{reference_id}/remove`\n */\n async removeConnectorReference(\n productId: string,\n referenceId: string,\n profileId: string,\n options?: RequestExtras,\n ): Promise<ProductResponse> {\n return this.request(\n 'POST',\n `/products/${encodeURIComponent(productId)}/connector-references/${encodeURIComponent(referenceId)}/remove`,\n { ...this.scoped(profileId, options) },\n );\n }\n\n /**\n * One bounded page of a connected billing account's products, to pick an\n * existing one to tie to a product. Reads only.\n * `GET /products/import-suggestions`\n */\n async importSuggestions(\n query: ProductImportSuggestionsQuery,\n profileId: string,\n options?: RequestExtras,\n ): Promise<GetSubscriptionItemsResponse[]> {\n return this.request('GET', '/products/import-suggestions', {\n query: { ...query },\n ...this.scoped(profileId, options),\n });\n }\n\n /**\n * Tie one of a connected account's existing products (or a price of it) to\n * the product, verified against a fresh read of the page it was suggested\n * on — pass the same `limit` and `offset`. Recorded as `map_existing`.\n * `POST /products/{product_id}/connector-references/import`\n */\n async acceptImport(\n productId: string,\n body: ProductImportAcceptRequest,\n profileId: string,\n options?: RequestExtras,\n ): Promise<ProductResponse> {\n return this.request(\n 'POST',\n `/products/${encodeURIComponent(productId)}/connector-references/import`,\n { body, ...this.scoped(profileId, options) },\n );\n }\n\n // --- categories ------------------------------------------------------\n\n /**\n * Add a category to the shop, at the end of its order. File products under\n * it with `category_id` on `create` or `update`.\n * `POST /products/categories`\n */\n async createCategory(\n body: ProductCategoryCreateRequest,\n profileId: string,\n options?: RequestExtras,\n ): Promise<ProductCategoryResponse> {\n return this.request('POST', '/products/categories', {\n body,\n ...this.scoped(profileId, options),\n });\n }\n\n /**\n * The shop's categories in order. Archived ones only with\n * `include_archived`; deleted ones never.\n * `GET /products/categories/list`\n */\n async listCategories(\n query: ProductCategoryListQuery | undefined,\n profileId: string,\n options?: RequestExtras,\n ): Promise<ProductCategoryListResponse> {\n return this.request('GET', '/products/categories/list', {\n query: query === undefined ? undefined : { ...query },\n ...this.scoped(profileId, options),\n });\n }\n\n /**\n * Put the shop's categories in a new order. Name every live category,\n * archived ones included, exactly once. Returns the categories in their new\n * order.\n * `POST /products/categories/reorder`\n */\n async reorderCategories(\n body: ProductCategoryReorderRequest,\n profileId: string,\n options?: RequestExtras,\n ): Promise<ProductCategoryListResponse> {\n return this.request('POST', '/products/categories/reorder', {\n body,\n ...this.scoped(profileId, options),\n });\n }\n\n /**\n * Rename a category.\n * `POST /products/categories/{category_id}`\n */\n async updateCategory(\n categoryId: string,\n changes: ProductCategoryUpdateRequest,\n profileId: string,\n options?: RequestExtras,\n ): Promise<ProductCategoryResponse> {\n return this.request('POST', `/products/categories/${encodeURIComponent(categoryId)}`, {\n body: changes,\n ...this.scoped(profileId, options),\n });\n }\n\n /**\n * Mark a category deleted. Its products become uncategorized and no payment\n * changes. Returns the deleted category.\n * `DELETE /products/categories/{category_id}`\n */\n async deleteCategory(\n categoryId: string,\n profileId: string,\n options?: RequestExtras,\n ): Promise<ProductCategoryResponse> {\n return this.request('DELETE', `/products/categories/${encodeURIComponent(categoryId)}`, {\n ...this.scoped(profileId, options),\n });\n }\n\n /**\n * Keep a category with its products, but file no new product under it.\n * `POST /products/categories/{category_id}/archive`\n */\n async archiveCategory(\n categoryId: string,\n profileId: string,\n options?: RequestExtras,\n ): Promise<ProductCategoryResponse> {\n return this.request('POST', `/products/categories/${encodeURIComponent(categoryId)}/archive`, {\n ...this.scoped(profileId, options),\n });\n }\n\n /**\n * Let an archived category take products again.\n * `POST /products/categories/{category_id}/restore`\n */\n async restoreCategory(\n categoryId: string,\n profileId: string,\n options?: RequestExtras,\n ): Promise<ProductCategoryResponse> {\n return this.request('POST', `/products/categories/${encodeURIComponent(categoryId)}/restore`, {\n ...this.scoped(profileId, options),\n });\n }\n\n // --- provider import ---------------------------------------------\n\n /**\n * Read a connected billing account's products and say how each relates to\n * the catalog. Reads only: nothing is written to the provider or the catalog.\n * `POST /products/import/preview`\n */\n async importPreview(\n request: ProductImportPreviewRequest,\n profileId: string,\n options?: RequestExtras,\n ): Promise<ProductImportPreviewResponse> {\n return this.request('POST', '/products/import/preview', {\n body: request,\n ...this.scoped(profileId, options),\n });\n }\n\n /**\n * Create a product for every new item and add the new prices of every\n * changed one, tied to the provider's ids. Nothing else is edited or\n * removed, except that `options.archived: 'archive'` archives the catalog\n * product of every item the provider no longer offers (by default it is\n * left as it is). Nothing is written to the provider. A failed item is\n * reported with its reason and can be retried by naming it in\n * `connector_product_ids`.\n * `POST /products/import/apply`\n */\n async importApply(\n request: ProductImportApplyRequest,\n profileId: string,\n options?: RequestExtras,\n ): Promise<ProductImportRunResponse> {\n return this.request('POST', '/products/import/apply', {\n body: request,\n ...this.scoped(profileId, options),\n });\n }\n\n /**\n * The shop's past imports from one connected account, newest first.\n * `GET /products/import/runs`\n */\n async listImportRuns(\n merchantConnectorId: string,\n profileId: string,\n options?: RequestExtras,\n ): Promise<ProductImportRunListResponse> {\n return this.request('GET', '/products/import/runs', {\n query: { merchant_connector_id: merchantConnectorId },\n ...this.scoped(profileId, options),\n });\n }\n\n // --- provider sync -----------------------------------------------\n\n /**\n * Compare the product with its copy at every connected account it is tied\n * to. Reads the providers now; an unreadable provider answers `unknown`,\n * never `in_sync`.\n * `GET /products/{product_id}/provider-sync`\n */\n async providerSync(\n productId: string,\n profileId: string,\n options?: RequestExtras,\n ): Promise<ProductProviderSyncResponse> {\n return this.request('GET', `/products/${encodeURIComponent(productId)}/provider-sync`, {\n ...this.scoped(profileId, options),\n });\n }\n\n /**\n * {@link providerSync} for 1 to 50 products at once, such as one page of the\n * product list. Unknown ids are left out of the answer.\n * `POST /products/provider-sync`\n */\n async providerSyncBatch(\n request: ProductProviderSyncBatchRequest,\n profileId: string,\n options?: RequestExtras,\n ): Promise<ProductProviderSyncBatchResponse> {\n return this.request('POST', '/products/provider-sync', {\n body: request,\n ...this.scoped(profileId, options),\n });\n }\n\n /**\n * Write the catalog's state onto one connected account's copy of the\n * product, for the differences a push changes and nothing else. When it\n * would change a difference not named in `confirmed`, nothing is written and\n * the answer carries `confirmation_outdated: true` with the current\n * differences in `result`; `nothing_to_push` answers without a provider\n * write when nothing pushable differs.\n * `POST /products/{product_id}/provider-sync/push`\n */\n async providerPush(\n productId: string,\n request: ProductProviderPushRequest,\n profileId: string,\n options?: RequestExtras,\n ): Promise<ProductProviderPushResponse> {\n return this.request('POST', `/products/${encodeURIComponent(productId)}/provider-sync/push`, {\n body: request,\n ...this.scoped(profileId, options),\n });\n }\n\n // --- provider lifecycle -----------------------------------------\n\n /**\n * The shop's connected accounts the catalog works with, and what each can\n * do: read, create, push, and how a delete can clean up there.\n * `GET /products/provider-accounts`\n */\n async providerAccounts(\n profileId: string,\n options?: RequestExtras,\n ): Promise<ProviderAccountListResponse> {\n return this.request('GET', '/products/provider-accounts', {\n ...this.scoped(profileId, options),\n });\n }\n\n /**\n * Provider clean-ups still to be carried out: deletes whose action at a\n * provider failed, or was recorded and never reached.\n * `GET /products/provider-cleanups`\n */\n async providerCleanups(\n profileId: string,\n options?: RequestExtras,\n ): Promise<ProviderCleanupListResponse> {\n return this.request('GET', '/products/provider-cleanups', {\n ...this.scoped(profileId, options),\n });\n }\n\n /**\n * Create the product at a connected account it is not at yet. Without\n * `confirmed` nothing is written and the answer holds the plan to review;\n * send the plan's `fingerprint` back as `confirmed` to carry it out. When\n * the plan changed since, nothing is written and the answer carries\n * `confirmation_outdated: true` with the current plan.\n * `POST /products/{product_id}/provider-sync/create`\n */\n async providerCreate(\n productId: string,\n request: ProductProviderCreateRequest,\n profileId: string,\n options?: RequestExtras,\n ): Promise<ProductProviderCreateResponse> {\n return this.request('POST', `/products/${encodeURIComponent(productId)}/provider-sync/create`, {\n body: request,\n ...this.scoped(profileId, options),\n });\n }\n\n /**\n * Archive the product at one connected account, or retry a clean-up that\n * failed after the product was deleted. Existing subscriptions there keep\n * billing; the catalog is not changed.\n * `POST /products/{product_id}/provider-archive`\n */\n async providerArchive(\n productId: string,\n request: ProviderArchiveRequest,\n profileId: string,\n options?: RequestExtras,\n ): Promise<ProviderArchiveOutcome> {\n return this.request('POST', `/products/${encodeURIComponent(productId)}/provider-archive`, {\n body: request,\n ...this.scoped(profileId, options),\n });\n }\n}\n"]}