@delopay/sdk 0.441.0 → 0.442.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 (346) hide show
  1. package/dist/airwallexCard.cjs.map +1 -1
  2. package/dist/branding.cjs.map +1 -1
  3. package/dist/cardFormStyles.cjs.map +1 -1
  4. package/dist/checkoutSession.cjs +2 -2
  5. package/dist/checkoutSession.cjs.map +1 -1
  6. package/dist/checkoutSession.js +1 -1
  7. package/dist/chunk-244VZFFO.cjs.map +1 -1
  8. package/dist/chunk-2IJRBJXW.cjs.map +1 -1
  9. package/dist/chunk-34PC72O7.cjs.map +1 -1
  10. package/dist/chunk-3A7J2TO5.js +366 -0
  11. package/dist/chunk-3A7J2TO5.js.map +1 -0
  12. package/dist/chunk-3GBWQWTP.cjs.map +1 -1
  13. package/dist/chunk-3YBBJT3Y.cjs.map +1 -1
  14. package/dist/chunk-44QBWVRS.cjs.map +1 -1
  15. package/dist/chunk-4E2KZPKC.js +53 -0
  16. package/dist/chunk-4E2KZPKC.js.map +1 -0
  17. package/dist/chunk-4EKAWNYI.cjs.map +1 -1
  18. package/dist/chunk-4LN4BR2T.cjs.map +1 -1
  19. package/dist/chunk-4T4XHPYN.cjs.map +1 -1
  20. package/dist/chunk-5CITBN33.cjs.map +1 -1
  21. package/dist/chunk-5HCKC4HF.cjs.map +1 -1
  22. package/dist/chunk-5O2JSQYA.cjs.map +1 -1
  23. package/dist/chunk-6EBY2KKL.cjs.map +1 -1
  24. package/dist/chunk-6LFOM6HV.cjs.map +1 -1
  25. package/dist/chunk-6LOWE2YI.cjs.map +1 -1
  26. package/dist/chunk-6LSG5Z4T.cjs.map +1 -1
  27. package/dist/chunk-6SU2MTN2.cjs.map +1 -1
  28. package/dist/chunk-6YCDLSIU.cjs.map +1 -1
  29. package/dist/{chunk-AU5YCE7W.js → chunk-72E7EVDB.js} +4 -4
  30. package/dist/chunk-75E5WNJG.cjs.map +1 -1
  31. package/dist/chunk-75FQADKN.cjs.map +1 -1
  32. package/dist/chunk-7JV6VVO7.cjs.map +1 -1
  33. package/dist/chunk-7QZCUXWB.cjs.map +1 -1
  34. package/dist/chunk-7VXF5D67.cjs.map +1 -1
  35. package/dist/chunk-ACZ2R47X.cjs.map +1 -1
  36. package/dist/chunk-AYUYJO3I.cjs.map +1 -1
  37. package/dist/chunk-BCA3TCGS.cjs.map +1 -1
  38. package/dist/chunk-BP6KDQ6I.cjs.map +1 -1
  39. package/dist/chunk-BRY3W7N3.cjs.map +1 -1
  40. package/dist/chunk-CAMALM35.cjs.map +1 -1
  41. package/dist/chunk-CCN44NZJ.cjs.map +1 -1
  42. package/dist/chunk-CKKNFFKP.cjs.map +1 -1
  43. package/dist/chunk-CR3JBTP3.cjs.map +1 -1
  44. package/dist/chunk-CY5VEI3U.js +1 -0
  45. package/dist/chunk-DJASVBOJ.cjs.map +1 -1
  46. package/dist/chunk-EEB2HDYL.cjs.map +1 -1
  47. package/dist/chunk-ENPSUWTS.cjs.map +1 -1
  48. package/dist/chunk-EQ6P6ZND.cjs.map +1 -1
  49. package/dist/chunk-EXPWQBI3.cjs.map +1 -1
  50. package/dist/{chunk-TRVFWPP7.cjs → chunk-EZKK6MP4.cjs} +3 -3
  51. package/dist/chunk-EZKK6MP4.cjs.map +1 -0
  52. package/dist/chunk-F3I5DOWV.cjs.map +1 -1
  53. package/dist/chunk-F46K5H3U.cjs.map +1 -1
  54. package/dist/chunk-F6S3WCCB.cjs.map +1 -1
  55. package/dist/chunk-FG7YBXJQ.cjs +1 -0
  56. package/dist/chunk-FG7YBXJQ.cjs.map +1 -0
  57. package/dist/chunk-FQRC4NJG.cjs.map +1 -1
  58. package/dist/chunk-FYISDU2Y.cjs.map +1 -1
  59. package/dist/chunk-G6BMUQW2.js +182 -0
  60. package/dist/chunk-G6BMUQW2.js.map +1 -0
  61. package/dist/chunk-GG52SAHA.cjs.map +1 -1
  62. package/dist/chunk-GK5FWN4H.cjs.map +1 -1
  63. package/dist/chunk-GSQN5EOO.cjs.map +1 -1
  64. package/dist/chunk-GW7IHYXR.cjs.map +1 -1
  65. package/dist/{chunk-X2QU7NEJ.js → chunk-GWBA7T4V.js} +2 -2
  66. package/dist/chunk-GWJ33GOK.cjs.map +1 -1
  67. package/dist/chunk-HHUUSNIL.cjs +366 -0
  68. package/dist/chunk-HHUUSNIL.cjs.map +1 -0
  69. package/dist/chunk-HLHML5ES.cjs.map +1 -1
  70. package/dist/chunk-HLKFUOAQ.cjs.map +1 -1
  71. package/dist/chunk-HLYGHP6F.cjs.map +1 -1
  72. package/dist/chunk-HSJABE7X.cjs.map +1 -1
  73. package/dist/{chunk-SIPQ65BK.cjs → chunk-HSPW4WSS.cjs} +3 -3
  74. package/dist/chunk-HSPW4WSS.cjs.map +1 -0
  75. package/dist/chunk-I2W7AO4B.cjs.map +1 -1
  76. package/dist/chunk-I2XGNALG.cjs.map +1 -1
  77. package/dist/chunk-IKXGA2Z5.cjs.map +1 -1
  78. package/dist/chunk-IR2LFKKA.cjs.map +1 -1
  79. package/dist/chunk-J4ZB7MU4.cjs.map +1 -1
  80. package/dist/chunk-JJPKURUG.cjs +182 -0
  81. package/dist/chunk-JJPKURUG.cjs.map +1 -0
  82. package/dist/{chunk-GA3KXPIF.cjs → chunk-JPRSNCYP.cjs} +40 -1
  83. package/dist/chunk-JPRSNCYP.cjs.map +1 -0
  84. package/dist/chunk-K5Q2H3VD.cjs.map +1 -1
  85. package/dist/chunk-KD5Y2YWK.cjs.map +1 -1
  86. package/dist/chunk-KJDMNF2T.cjs.map +1 -1
  87. package/dist/chunk-KLONGJCL.cjs.map +1 -1
  88. package/dist/chunk-KOB6MOAV.cjs.map +1 -1
  89. package/dist/chunk-KSJ7JLR3.cjs.map +1 -1
  90. package/dist/chunk-LJ2EG6JK.cjs.map +1 -1
  91. package/dist/chunk-LLYY4TCZ.cjs.map +1 -1
  92. package/dist/chunk-LYIBTVK6.cjs.map +1 -1
  93. package/dist/chunk-M3HWE7KT.cjs.map +1 -1
  94. package/dist/chunk-M3SJHFT4.cjs.map +1 -1
  95. package/dist/{chunk-GU3P6GBA.js → chunk-M7QOKHUI.js} +44 -40
  96. package/dist/chunk-M7QOKHUI.js.map +1 -0
  97. package/dist/chunk-MCNDMK7F.cjs.map +1 -1
  98. package/dist/chunk-MLG6NXI6.cjs.map +1 -1
  99. package/dist/chunk-NFB3S2E6.cjs.map +1 -1
  100. package/dist/chunk-NKDUQ2BI.cjs.map +1 -1
  101. package/dist/chunk-NYL3BNHR.cjs.map +1 -1
  102. package/dist/chunk-O4AYHLQX.cjs.map +1 -1
  103. package/dist/chunk-ODPNVNYE.cjs.map +1 -1
  104. package/dist/chunk-OG2KJAYD.cjs.map +1 -1
  105. package/dist/chunk-OWP7XBY2.cjs.map +1 -1
  106. package/dist/chunk-OYZP6NF6.cjs.map +1 -1
  107. package/dist/chunk-P6JLNQ6L.cjs.map +1 -1
  108. package/dist/chunk-P7DYLUUI.cjs.map +1 -1
  109. package/dist/chunk-PKAE6AQT.cjs.map +1 -1
  110. package/dist/chunk-PWDY5D5S.cjs.map +1 -1
  111. package/dist/chunk-Q7M7DO7M.cjs.map +1 -1
  112. package/dist/chunk-QKUWFMZP.cjs.map +1 -1
  113. package/dist/chunk-QRSA72B3.cjs.map +1 -1
  114. package/dist/chunk-QYNRNDIY.cjs.map +1 -1
  115. package/dist/chunk-R4FE6K43.cjs.map +1 -1
  116. package/dist/chunk-R4GA6BVP.cjs.map +1 -1
  117. package/dist/chunk-R5VYSZ3Q.cjs.map +1 -1
  118. package/dist/chunk-RHFUXHQN.cjs.map +1 -1
  119. package/dist/chunk-RI42IDRR.cjs.map +1 -1
  120. package/dist/chunk-RSVLVW4L.cjs.map +1 -1
  121. package/dist/chunk-S77LQWYC.cjs.map +1 -1
  122. package/dist/chunk-S7SBNOGS.cjs.map +1 -1
  123. package/dist/chunk-SQELICSX.cjs.map +1 -1
  124. package/dist/{chunk-KUAQWEOK.cjs → chunk-TGEALQ2F.cjs} +32 -28
  125. package/dist/chunk-TGEALQ2F.cjs.map +1 -0
  126. package/dist/chunk-TMAJE5P2.cjs.map +1 -1
  127. package/dist/chunk-TNIJ6OSH.cjs.map +1 -1
  128. package/dist/chunk-UGSM7RJ2.cjs.map +1 -1
  129. package/dist/chunk-UKLZAOLW.cjs.map +1 -1
  130. package/dist/chunk-V47G7P6L.cjs.map +1 -1
  131. package/dist/chunk-VH5A6SMU.cjs.map +1 -1
  132. package/dist/chunk-VHMH4QMY.cjs +53 -0
  133. package/dist/chunk-VHMH4QMY.cjs.map +1 -0
  134. package/dist/{chunk-F6JABQLJ.js → chunk-VUA2R6ZO.js} +40 -1
  135. package/dist/chunk-VUA2R6ZO.js.map +1 -0
  136. package/dist/chunk-VYC7WUM5.cjs.map +1 -1
  137. package/dist/chunk-W457XUA6.cjs.map +1 -1
  138. package/dist/chunk-WHDI3TMP.cjs.map +1 -1
  139. package/dist/chunk-WITCPKNL.cjs.map +1 -1
  140. package/dist/chunk-WX6NP7UU.cjs.map +1 -1
  141. package/dist/chunk-XQLRIBVR.cjs.map +1 -1
  142. package/dist/chunk-YJQPKT6W.cjs.map +1 -1
  143. package/dist/chunk-YK3P5QNZ.cjs.map +1 -1
  144. package/dist/chunk-ZKPVUCQV.cjs.map +1 -1
  145. package/dist/chunk-ZUULK36E.cjs.map +1 -1
  146. package/dist/client.cjs +2 -2
  147. package/dist/client.cjs.map +1 -1
  148. package/dist/client.d.cts +3 -0
  149. package/dist/client.d.ts +3 -0
  150. package/dist/client.js +1 -1
  151. package/dist/core.cjs.map +1 -1
  152. package/dist/currencies.cjs.map +1 -1
  153. package/dist/enigmaCardForm.cjs.map +1 -1
  154. package/dist/error.cjs.map +1 -1
  155. package/dist/eventStream.cjs.map +1 -1
  156. package/dist/exportDownload.cjs.map +1 -1
  157. package/dist/feeProgram.cjs.map +1 -1
  158. package/dist/index.cjs +45 -31
  159. package/dist/index.cjs.map +1 -1
  160. package/dist/index.d.cts +3 -1
  161. package/dist/index.d.ts +3 -1
  162. package/dist/index.js +57 -43
  163. package/dist/internal/resources/admin.cjs.map +1 -1
  164. package/dist/internal/resources/admin.d.cts +1 -1
  165. package/dist/internal/resources/admin.d.ts +1 -1
  166. package/dist/internal/resources/adminBranding.cjs.map +1 -1
  167. package/dist/internal/resources/adminBranding.d.cts +1 -1
  168. package/dist/internal/resources/adminBranding.d.ts +1 -1
  169. package/dist/internal/resources/adminCheckoutDomains.cjs +7 -0
  170. package/dist/internal/resources/adminCheckoutDomains.cjs.map +1 -0
  171. package/dist/internal/resources/adminCheckoutDomains.d.cts +215 -0
  172. package/dist/internal/resources/adminCheckoutDomains.d.ts +215 -0
  173. package/dist/internal/resources/adminCheckoutDomains.js +7 -0
  174. package/dist/internal/resources/adminCheckoutDomains.js.map +1 -0
  175. package/dist/internal/resources/adminFeePlans.cjs.map +1 -1
  176. package/dist/internal/resources/adminFeePlans.d.cts +1 -1
  177. package/dist/internal/resources/adminFeePlans.d.ts +1 -1
  178. package/dist/internal/resources/adminFileScans.cjs.map +1 -1
  179. package/dist/internal/resources/adminFileScans.d.cts +1 -1
  180. package/dist/internal/resources/adminFileScans.d.ts +1 -1
  181. package/dist/internal/resources/adminIndustries.cjs.map +1 -1
  182. package/dist/internal/resources/adminIndustries.d.cts +1 -1
  183. package/dist/internal/resources/adminIndustries.d.ts +1 -1
  184. package/dist/internal/resources/adminLive.cjs.map +1 -1
  185. package/dist/internal/resources/adminNotices.cjs.map +1 -1
  186. package/dist/internal/resources/adminNotices.d.cts +1 -1
  187. package/dist/internal/resources/adminNotices.d.ts +1 -1
  188. package/dist/internal/resources/adminPortal.cjs +2 -2
  189. package/dist/internal/resources/adminPortal.cjs.map +1 -1
  190. package/dist/internal/resources/adminPortal.d.cts +1 -1
  191. package/dist/internal/resources/adminPortal.d.ts +1 -1
  192. package/dist/internal/resources/adminPortal.js +1 -1
  193. package/dist/internal/resources/adminSupport.cjs.map +1 -1
  194. package/dist/internal/resources/adminSupport.d.cts +1 -1
  195. package/dist/internal/resources/adminSupport.d.ts +1 -1
  196. package/dist/internal/resources/auditLogs.cjs.map +1 -1
  197. package/dist/internal/resources/auditLogs.d.cts +1 -1
  198. package/dist/internal/resources/auditLogs.d.ts +1 -1
  199. package/dist/internal/resources/cache.cjs.map +1 -1
  200. package/dist/internal/resources/cardIssuers.cjs.map +1 -1
  201. package/dist/internal/resources/cardIssuers.d.cts +1 -1
  202. package/dist/internal/resources/cardIssuers.d.ts +1 -1
  203. package/dist/internal/resources/configs.cjs.map +1 -1
  204. package/dist/internal/resources/connectorRestrictionRules.cjs.map +1 -1
  205. package/dist/internal/resources/connectorRestrictionRules.d.cts +1 -1
  206. package/dist/internal/resources/connectorRestrictionRules.d.ts +1 -1
  207. package/dist/internal/resources/connectorRestrictions.cjs.map +1 -1
  208. package/dist/internal/resources/connectorRestrictions.d.cts +1 -1
  209. package/dist/internal/resources/connectorRestrictions.d.ts +1 -1
  210. package/dist/internal/resources/diagnostic.cjs.map +1 -1
  211. package/dist/internal/resources/diagnostic.d.cts +1 -1
  212. package/dist/internal/resources/diagnostic.d.ts +1 -1
  213. package/dist/internal/resources/gsm.cjs.map +1 -1
  214. package/dist/internal/resources/gsm.d.cts +1 -1
  215. package/dist/internal/resources/gsm.d.ts +1 -1
  216. package/dist/internal/resources/nativeRenewals.cjs.map +1 -1
  217. package/dist/internal/resources/nativeRenewals.d.cts +1 -1
  218. package/dist/internal/resources/nativeRenewals.d.ts +1 -1
  219. package/dist/internal/resources/platformBilling.cjs.map +1 -1
  220. package/dist/internal/resources/platformBilling.d.cts +1 -1
  221. package/dist/internal/resources/platformBilling.d.ts +1 -1
  222. package/dist/internal/resources/platformFees.cjs.map +1 -1
  223. package/dist/internal/resources/platformMessageTemplates.cjs.map +1 -1
  224. package/dist/internal/resources/platformSettings.cjs.map +1 -1
  225. package/dist/internal/resources/platformSettings.d.cts +1 -1
  226. package/dist/internal/resources/platformSettings.d.ts +1 -1
  227. package/dist/internal.cjs +65 -46
  228. package/dist/internal.cjs.map +1 -1
  229. package/dist/internal.d.cts +8 -3
  230. package/dist/internal.d.ts +8 -3
  231. package/dist/internal.js +82 -63
  232. package/dist/internal.js.map +1 -1
  233. package/dist/listQuery.cjs.map +1 -1
  234. package/dist/panes.cjs.map +1 -1
  235. package/dist/paymentPresentation.cjs.map +1 -1
  236. package/dist/recordCounter.cjs.map +1 -1
  237. package/dist/resources/aiTools.cjs.map +1 -1
  238. package/dist/resources/analytics.cjs.map +1 -1
  239. package/dist/resources/analyticsDashboard.cjs.map +1 -1
  240. package/dist/resources/apiKeys.cjs.map +1 -1
  241. package/dist/resources/audit.cjs.map +1 -1
  242. package/dist/resources/authentication.cjs.map +1 -1
  243. package/dist/resources/availabilityOverrides.cjs.map +1 -1
  244. package/dist/resources/billing.cjs.map +1 -1
  245. package/dist/resources/buyerAccount.cjs.map +1 -1
  246. package/dist/resources/buyerBlocklist.cjs.map +1 -1
  247. package/dist/resources/buyerConversations.cjs.map +1 -1
  248. package/dist/resources/buyerEvidenceReviews.cjs.map +1 -1
  249. package/dist/resources/buyerPortal.cjs.map +1 -1
  250. package/dist/resources/cards.cjs.map +1 -1
  251. package/dist/resources/chargebackPrevention.cjs.map +1 -1
  252. package/dist/resources/checkoutDomains.cjs +7 -0
  253. package/dist/resources/checkoutDomains.cjs.map +1 -0
  254. package/dist/resources/checkoutDomains.d.cts +149 -0
  255. package/dist/resources/checkoutDomains.d.ts +149 -0
  256. package/dist/resources/checkoutDomains.js +7 -0
  257. package/dist/resources/checkoutDomains.js.map +1 -0
  258. package/dist/resources/checkoutMethods.cjs.map +1 -1
  259. package/dist/resources/checkoutRecovery.cjs.map +1 -1
  260. package/dist/resources/checkoutTemplates.cjs.map +1 -1
  261. package/dist/resources/connectors.cjs +2 -2
  262. package/dist/resources/connectors.cjs.map +1 -1
  263. package/dist/resources/connectors.d.cts +23 -1
  264. package/dist/resources/connectors.d.ts +23 -1
  265. package/dist/resources/connectors.js +1 -1
  266. package/dist/resources/contentEncryption.cjs.map +1 -1
  267. package/dist/resources/costRules.cjs.map +1 -1
  268. package/dist/resources/customers.cjs.map +1 -1
  269. package/dist/resources/deploymentBranding.cjs.map +1 -1
  270. package/dist/resources/disputes.cjs.map +1 -1
  271. package/dist/resources/ephemeralKeys.cjs.map +1 -1
  272. package/dist/resources/events.cjs.map +1 -1
  273. package/dist/resources/export.cjs.map +1 -1
  274. package/dist/resources/externalRecords.cjs.map +1 -1
  275. package/dist/resources/featureMatrix.cjs.map +1 -1
  276. package/dist/resources/fees.cjs.map +1 -1
  277. package/dist/resources/files.cjs.map +1 -1
  278. package/dist/resources/forex.cjs.map +1 -1
  279. package/dist/resources/identityVerifications.cjs.map +1 -1
  280. package/dist/resources/industries.cjs.map +1 -1
  281. package/dist/resources/invoiceSettings.cjs.map +1 -1
  282. package/dist/resources/invoices.cjs.map +1 -1
  283. package/dist/resources/live.cjs.map +1 -1
  284. package/dist/resources/mandates.cjs.map +1 -1
  285. package/dist/resources/merchantAccounts.cjs.map +1 -1
  286. package/dist/resources/messageTemplates.cjs.map +1 -1
  287. package/dist/resources/notices.cjs.map +1 -1
  288. package/dist/resources/operationLimits.cjs.map +1 -1
  289. package/dist/resources/paymentLinks.cjs.map +1 -1
  290. package/dist/resources/paymentMethods.cjs.map +1 -1
  291. package/dist/resources/payments.cjs.map +1 -1
  292. package/dist/resources/payoutDestinations.cjs.map +1 -1
  293. package/dist/resources/payouts.cjs.map +1 -1
  294. package/dist/resources/paypalDisputes.cjs.map +1 -1
  295. package/dist/resources/persons.cjs.map +1 -1
  296. package/dist/resources/poll.cjs.map +1 -1
  297. package/dist/resources/processorCosts.cjs.map +1 -1
  298. package/dist/resources/processorImports.cjs.map +1 -1
  299. package/dist/resources/products.cjs.map +1 -1
  300. package/dist/resources/profileAcquirers.cjs.map +1 -1
  301. package/dist/resources/profiles.cjs.map +1 -1
  302. package/dist/resources/projects.cjs.map +1 -1
  303. package/dist/resources/refunds.cjs.map +1 -1
  304. package/dist/resources/regions.cjs.map +1 -1
  305. package/dist/resources/relay.cjs.map +1 -1
  306. package/dist/resources/risk.cjs.map +1 -1
  307. package/dist/resources/routing.cjs.map +1 -1
  308. package/dist/resources/search.cjs.map +1 -1
  309. package/dist/resources/sellToRestrictions.cjs.map +1 -1
  310. package/dist/resources/settings.cjs.map +1 -1
  311. package/dist/resources/settlement.cjs.map +1 -1
  312. package/dist/resources/shopLabels.cjs.map +1 -1
  313. package/dist/resources/shops.cjs.map +1 -1
  314. package/dist/resources/stripeConnect.cjs.map +1 -1
  315. package/dist/resources/subscriptions.cjs.map +1 -1
  316. package/dist/resources/support.cjs.map +1 -1
  317. package/dist/resources/threeDsRules.cjs.map +1 -1
  318. package/dist/resources/users.cjs.map +1 -1
  319. package/dist/resources/vatRates.cjs.map +1 -1
  320. package/dist/resources/verification.cjs.map +1 -1
  321. package/dist/resources/webhooks.cjs.map +1 -1
  322. package/dist/resources/whopResolutionCases.cjs.map +1 -1
  323. package/dist/trustedOrigins.cjs +13 -0
  324. package/dist/trustedOrigins.cjs.map +1 -0
  325. package/dist/trustedOrigins.d.cts +62 -0
  326. package/dist/trustedOrigins.d.ts +62 -0
  327. package/dist/trustedOrigins.js +13 -0
  328. package/dist/trustedOrigins.js.map +1 -0
  329. package/dist/{types-B82KRgid.d.cts → types-C550qURY.d.ts} +333 -2
  330. package/dist/{types-CVKMSviB.d.ts → types-UCM6hm9o.d.cts} +333 -2
  331. package/dist/types.cjs.map +1 -1
  332. package/dist/types.d.cts +502 -1
  333. package/dist/types.d.ts +502 -1
  334. package/package.json +1 -1
  335. package/dist/chunk-F6JABQLJ.js.map +0 -1
  336. package/dist/chunk-GA3KXPIF.cjs.map +0 -1
  337. package/dist/chunk-GU3P6GBA.js.map +0 -1
  338. package/dist/chunk-HBBEQWDU.cjs +0 -1
  339. package/dist/chunk-HBBEQWDU.cjs.map +0 -1
  340. package/dist/chunk-KUAQWEOK.cjs.map +0 -1
  341. package/dist/chunk-SIPQ65BK.cjs.map +0 -1
  342. package/dist/chunk-TRVFWPP7.cjs.map +0 -1
  343. package/dist/chunk-XW7LMBMD.js +0 -1
  344. /package/dist/{chunk-AU5YCE7W.js.map → chunk-72E7EVDB.js.map} +0 -0
  345. /package/dist/{chunk-XW7LMBMD.js.map → chunk-CY5VEI3U.js.map} +0 -0
  346. /package/dist/{chunk-X2QU7NEJ.js.map → chunk-GWBA7T4V.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/skyline/Programming/delopay/delopay-typescript-sdk/dist/chunk-I2W7AO4B.cjs","../src/error.ts"],"names":[],"mappings":"AAAA;ACeO,IAAM,aAAA,EAAN,MAAA,QAA2B,MAAM;AAAA,EAsBtC,WAAA,CACE,OAAA,EACA,OAAA,EAQA;AACA,IAAA,KAAA,CAAM,OAAO,CAAA;AACb,IAAA,MAAA,CAAO,cAAA,CAAe,IAAA,EAAM,GAAA,CAAA,MAAA,CAAW,SAAS,CAAA;AAChD,IAAA,IAAA,CAAK,KAAA,EAAO,cAAA;AACZ,IAAA,IAAA,CAAK,OAAA,EAAS,OAAA,CAAQ,MAAA;AACtB,IAAA,IAAA,CAAK,KAAA,EAAO,OAAA,CAAQ,IAAA;AACpB,IAAA,IAAA,CAAK,KAAA,EAAO,OAAA,CAAQ,IAAA;AACpB,IAAA,GAAA,CAAI,OAAA,CAAQ,UAAA,IAAc,KAAA,CAAA,EAAW,IAAA,CAAK,UAAA,EAAY,OAAA,CAAQ,SAAA;AAC9D,IAAA,GAAA,CAAI,OAAA,CAAQ,QAAA,IAAY,KAAA,CAAA,EAAW,IAAA,CAAK,QAAA,EAAU,OAAA,CAAQ,OAAA;AAC1D,IAAA,GAAA,CAAI,OAAA,CAAQ,KAAA,IAAS,KAAA,CAAA,EAAW,IAAA,CAAK,KAAA,EAAO,OAAA,CAAQ,IAAA;AAAA,EACtD;AACF,CAAA;AAYO,IAAM,2BAAA,EAAN,MAAA,QAAyC,aAAa;AAAA,EAC3D,WAAA,CACE,QAAA,EAAU,iBAAA,EACV,OAAA,EAOA;AACA,IAAA,KAAA,CAAM,OAAA,EAAS;AAAA,MACb,MAAA,EAAQ,GAAA;AAAA;AAAA;AAAA;AAAA,MAIR,IAAA,kBAAM,OAAA,2BAAS,OAAA,GAAQ,SAAA;AAAA,MACvB,IAAA,kBAAM,OAAA,6BAAS,OAAA,GAAQ,sBAAA;AAAA,MACvB,SAAA,kBAAW,OAAA,6BAAS,WAAA;AAAA,MACpB,OAAA,kBAAS,OAAA,6BAAS,SAAA;AAAA,MAClB,IAAA,kBAAM,OAAA,6BAAS;AAAA,IACjB,CAAC,CAAA;AACD,IAAA,MAAA,CAAO,cAAA,CAAe,IAAA,EAAM,GAAA,CAAA,MAAA,CAAW,SAAS,CAAA;AAChD,IAAA,IAAA,CAAK,KAAA,EAAO,4BAAA;AAAA,EACd;AACF,CAAA;ADhEA;AACA;AACE;AACA;AACF,qGAAC","file":"/Users/skyline/Programming/delopay/delopay-typescript-sdk/dist/chunk-I2W7AO4B.cjs","sourcesContent":[null,"/**\n * Error thrown when the Delopay API returns a non-2xx response, or when a\n * timeout or network error occurs.\n *\n * @example\n * ```typescript\n * try {\n * await delopay.payments.create({ amount: 5000, currency: 'EUR' });\n * } catch (e) {\n * if (e instanceof DelopayError) {\n * console.error(e.status, e.code, e.requestId, e.message);\n * }\n * }\n * ```\n */\nexport class DelopayError extends Error {\n /** HTTP status code returned by the API, or `0` for timeout/network errors. */\n readonly status: number;\n /** Machine-readable error code returned by the API (e.g. `'HE_00'`). */\n readonly code: string;\n /** Error category (e.g. `'invalid_request'`, `'timeout_error'`). */\n readonly type: string;\n /** Value of the `x-request-id` response header, when present. Include this when contacting support. */\n readonly requestId?: string;\n /**\n * Raw response body (truncated to ~2 KB). Populated when the server returns a\n * non-JSON error body (e.g. an HTML 502 from an upstream proxy) so debugging\n * still has something to go on.\n */\n readonly rawBody?: string;\n /**\n * Structured error context the API attaches under `error.data` for select\n * codes — e.g. `{ retry_after_secs: 248 }` on rate-limit / max-attempt\n * lockouts. Schema is per-code; consult the API reference for the shape.\n */\n readonly data?: Record<string, unknown>;\n\n constructor(\n message: string,\n options: {\n status: number;\n code: string;\n type: string;\n requestId?: string;\n rawBody?: string;\n data?: Record<string, unknown>;\n },\n ) {\n super(message);\n Object.setPrototypeOf(this, new.target.prototype);\n this.name = 'DelopayError';\n this.status = options.status;\n this.code = options.code;\n this.type = options.type;\n if (options.requestId !== undefined) this.requestId = options.requestId;\n if (options.rawBody !== undefined) this.rawBody = options.rawBody;\n if (options.data !== undefined) this.data = options.data;\n }\n}\n\n/**\n * Thrown when the API key is missing, invalid, or revoked (HTTP 401).\n *\n * @example\n * ```typescript\n * if (e instanceof DelopayAuthenticationError) {\n * // Prompt user to re-enter their API key.\n * }\n * ```\n */\nexport class DelopayAuthenticationError extends DelopayError {\n constructor(\n message = 'Invalid API key',\n options?: {\n code?: string;\n type?: string;\n requestId?: string;\n rawBody?: string;\n data?: Record<string, unknown>;\n },\n ) {\n super(message, {\n status: 401,\n // Default to the generic \"invalid API key\" code, but let callers pass\n // through the server-reported code (e.g. `UR_05` for unverified-email\n // 401s) so they can differentiate between auth failure reasons.\n code: options?.code || 'AUTH_01',\n type: options?.type || 'authentication_error',\n requestId: options?.requestId,\n rawBody: options?.rawBody,\n data: options?.data,\n });\n Object.setPrototypeOf(this, new.target.prototype);\n this.name = 'DelopayAuthenticationError';\n }\n}\n"]}
1
+ {"version":3,"sources":["/home/jonathan/Desktop/DeloPay/dev1/delopay-typescript-sdk/dist/chunk-I2W7AO4B.cjs","../src/error.ts"],"names":[],"mappings":"AAAA;ACeO,IAAM,aAAA,EAAN,MAAA,QAA2B,MAAM;AAAA,EAsBtC,WAAA,CACE,OAAA,EACA,OAAA,EAQA;AACA,IAAA,KAAA,CAAM,OAAO,CAAA;AACb,IAAA,MAAA,CAAO,cAAA,CAAe,IAAA,EAAM,GAAA,CAAA,MAAA,CAAW,SAAS,CAAA;AAChD,IAAA,IAAA,CAAK,KAAA,EAAO,cAAA;AACZ,IAAA,IAAA,CAAK,OAAA,EAA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ns a non-2xx response, or when a\n * timeout or network error occurs.\n *\n * @example\n * ```typescript\n * try {\n * await delopay.payments.create({ amount: 5000, currency: 'EUR' });\n * } catch (e) {\n * if (e instanceof DelopayError) {\n * console.error(e.status, e.code, e.requestId, e.message);\n * }\n * }\n * ```\n */\nexport class DelopayError extends Error {\n /** HTTP status code returned by the API, or `0` for timeout/network errors. */\n readonly status: number;\n /** Machine-readable error code returned by the API (e.g. `'HE_00'`). */\n readonly code: string;\n /** Error category (e.g. `'invalid_request'`, `'timeout_error'`). */\n readonly type: string;\n /** Value of the `x-request-id` response header, when present. Include this when contacting support. */\n readonly requestId?: string;\n /**\n * Raw response body (truncated to ~2 KB). Populated when the server returns a\n * non-JSON error body (e.g. an HTML 502 from an upstream proxy) so debugging\n * still has something to go on.\n */\n readonly rawBody?: string;\n /**\n * Structured error context the API attaches under `error.data` for select\n * codes — e.g. `{ retry_after_secs: 248 }` on rate-limit / max-attempt\n * lockouts. Schema is per-code; consult the API reference for the shape.\n */\n readonly data?: Record<string, unknown>;\n\n constructor(\n message: string,\n options: {\n status: number;\n code: string;\n type: string;\n requestId?: string;\n rawBody?: string;\n data?: Record<string, unknown>;\n },\n ) {\n super(message);\n Object.setPrototypeOf(this, new.target.prototype);\n this.name = 'DelopayError';\n this.status = options.status;\n this.code = options.code;\n this.type = options.type;\n if (options.requestId !== undefined) this.requestId = options.requestId;\n if (options.rawBody !== undefined) this.rawBody = options.rawBody;\n if (options.data !== undefined) this.data = options.data;\n }\n}\n\n/**\n * Thrown when the API key is missing, invalid, or revoked (HTTP 401).\n *\n * @example\n * ```typescript\n * if (e instanceof DelopayAuthenticationError) {\n * // Prompt user to re-enter their API key.\n * }\n * ```\n */\nexport class DelopayAuthenticationError extends DelopayError {\n constructor(\n message = 'Invalid API key',\n options?: {\n code?: string;\n type?: string;\n requestId?: string;\n rawBody?: string;\n data?: Record<string, unknown>;\n },\n ) {\n super(message, {\n status: 401,\n // Default to the generic \"invalid API key\" code, but let callers pass\n // through the server-reported code (e.g. `UR_05` for unverified-email\n // 401s) so they can differentiate between auth failure reasons.\n code: options?.code || 'AUTH_01',\n type: options?.type || 'authentication_error',\n requestId: options?.requestId,\n rawBody: options?.rawBody,\n data: options?.data,\n });\n Object.setPrototypeOf(this, new.target.prototype);\n this.name = 'DelopayAuthenticationError';\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/skyline/Programming/delopay/delopay-typescript-sdk/dist/chunk-I2XGNALG.cjs","../src/resources/forex.ts"],"names":[],"mappings":"AAAA;ACEO,IAAM,MAAA,EAAN,MAAY;AAAA,EACjB,WAAA,CAA6B,OAAA,EAAoB;AAApB,IAAA,IAAA,CAAA,QAAA,EAAA,OAAA;AAAA,EAAqB;AAAA;AAAA,EAGlD,MAAM,QAAA,CACJ,MAAA,EACkC;AAClC,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,KAAA,EAAO,cAAA,EAAgB,EAAE,KAAA,EAAO,OAAO,CAAC,CAAA;AAAA,EAC9D;AAAA;AAAA,EAGA,MAAM,gBAAA,CACJ,MAAA,EACkC;AAClC,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,KAAA,EAAO,2BAAA,EAA6B,EAAE,KAAA,EAAO,OAAO,CAAC,CAAA;AAAA,EAC3E;AACF,CAAA;ADJA;AACA;AACE;AACF,sBAAC","file":"/Users/skyline/Programming/delopay/delopay-typescript-sdk/dist/chunk-I2XGNALG.cjs","sourcesContent":[null,"import type { RequestFn } from '../client';\n\nexport class Forex {\n constructor(private readonly request: RequestFn) {}\n\n /** Retrieve forex rates. `GET /forex/rates` */\n async getRates(\n params?: Record<string, string | number | undefined>,\n ): Promise<Record<string, unknown>> {\n return this.request('GET', '/forex/rates', { query: params });\n }\n\n /** Convert from minor currency. `GET /forex/convert-from-minor` */\n async convertFromMinor(\n params: Record<string, string | number | undefined>,\n ): Promise<Record<string, unknown>> {\n return this.request('GET', '/forex/convert-from-minor', { query: params });\n }\n}\n"]}
1
+ {"version":3,"sources":["/home/jonathan/Desktop/DeloPay/dev1/delopay-typescript-sdk/dist/chunk-I2XGNALG.cjs","../src/resources/forex.ts"],"names":[],"mappings":"AAAA;ACEO,IAAM,MAAA,EAAN,MAAY;AAAA,EACjB,WAAA,CAA6B,OAAA,EAAoB;AAApB,IAAA,IAAA,CAAA,QAAA,EAAA,OAAA;AAAA,EAAqB;AAAA;AAAA,EAGlD,MAAM,QAAA,CACJ,MAAA,EACkC;AAClC,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,KAAA,EAAO,cAAA,EAAgB,EAAE,KAAA,EAAO,OAAO,CAAC,CAAA;AAAA,EAC9D;AAAA;AAAA,EAGA,MAAM,gBAAA,CACJ,MAAA,EACkC;AAClC,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,KAAA,EAAO,2BAAA,EAA6B,EAAE,KAAA,EAAO,OAAO,CAAC,CAAA;AAAA,EAC3E;AACF,CAAA;ADJA;AACA;AACE;AACF,sBAAC","file":"/home/jonathan/Desktop/DeloPay/dev1/delopay-typescript-sdk/dist/chunk-I2XGNALG.cjs","sourcesContent":[null,"import type { RequestFn } from '../client';\n\nexport class Forex {\n constructor(private readonly request: RequestFn) {}\n\n /** Retrieve forex rates. `GET /forex/rates` */\n async getRates(\n params?: Record<string, string | number | undefined>,\n ): Promise<Record<string, unknown>> {\n return this.request('GET', '/forex/rates', { query: params });\n }\n\n /** Convert from minor currency. `GET /forex/convert-from-minor` */\n async convertFromMinor(\n params: Record<string, string | number | undefined>,\n ): Promise<Record<string, unknown>> {\n return this.request('GET', '/forex/convert-from-minor', { query: params });\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/skyline/Programming/delopay/delopay-typescript-sdk/dist/chunk-IKXGA2Z5.cjs","../src/resources/featureMatrix.ts"],"names":[],"mappings":"AAAA;ACOO,IAAM,cAAA,EAAN,MAAoB;AAAA,EACzB,WAAA,CAA6B,OAAA,EAAoB;AAApB,IAAA,IAAA,CAAA,QAAA,EAAA,OAAA;AAAA,EAAqB;AAAA;AAAA,EAGlD,MAAM,QAAA,CAAA,EAA2C;AAC/C,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,KAAA,EAAO,iBAAiB,CAAA;AAAA,EAC9C;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,MAAM,mBAAA,CAAoB,UAAA,EAAoD;AAC5E,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,KAAA,EAAO,CAAA,gBAAA,EAAmB,kBAAA,CAAmB,UAAU,CAAC,CAAA,CAAA;AAC9E,EAAA;AACF;ADLiF;AACA;AACA;AACA","file":"/Users/skyline/Programming/delopay/delopay-typescript-sdk/dist/chunk-IKXGA2Z5.cjs","sourcesContent":[null,"import type { FeatureMatrixResponse } from '../types';\nimport type { RequestFn } from '../client';\n\n/**\n * What each connector can do: payment methods, capture methods, webhook\n * flows, and whether an unverified webhook is acted on.\n */\nexport class FeatureMatrix {\n constructor(private readonly request: RequestFn) {}\n\n /** Retrieve the feature matrix. `GET /feature-matrix` */\n async retrieve(): Promise<FeatureMatrixResponse> {\n return this.request('GET', '/feature-matrix');\n }\n\n /**\n * Retrieve the feature matrix scoped to a merchant. Beta connectors\n * are filtered against the merchant's allowlist so the dashboard only\n * surfaces connectors the merchant can actually attach.\n * `GET /feature-matrix/{merchantId}`\n */\n async retrieveForMerchant(merchantId: string): Promise<FeatureMatrixResponse> {\n return this.request('GET', `/feature-matrix/${encodeURIComponent(merchantId)}`);\n }\n}\n"]}
1
+ {"version":3,"sources":["/home/jonathan/Desktop/DeloPay/dev1/delopay-typescript-sdk/dist/chunk-IKXGA2Z5.cjs","../src/resources/featureMatrix.ts"],"names":[],"mappings":"AAAA;ACOO,IAAM,cAAA,EAAN,MAAoB;AAAA,EACzB,WAAA,CAA6B,OAAA,EAAoB;AAApB,IAAA,IAAA,CAAA,QAAA,EAAA,OAAA;AAAA,EAAqB;AAAA;AAAA,EAGlD,MAAM,QAAA,CAAA,EAA2C;AAC/C,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,KAAA,EAAO,iBAAiB,CAAA;AAAA,EAC9C;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,MAAM,mBAAA,CAAoB,UAAA,EAAoD;AAC5E,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,KAAA,EAAO,CAAA,gBAAA,EAAmB,kBAAA,CAAmB,UAAU,CAAC,CAAA,CAAA;AAC9E,EAAA;AACF;ADLiF;AACA;AACA;AACA","file":"/home/jonathan/Desktop/DeloPay/dev1/delopay-typescript-sdk/dist/chunk-IKXGA2Z5.cjs","sourcesContent":[null,"import type { FeatureMatrixResponse } from '../types';\nimport type { RequestFn } from '../client';\n\n/**\n * What each connector can do: payment methods, capture methods, webhook\n * flows, and whether an unverified webhook is acted on.\n */\nexport class FeatureMatrix {\n constructor(private readonly request: RequestFn) {}\n\n /** Retrieve the feature matrix. `GET /feature-matrix` */\n async retrieve(): Promise<FeatureMatrixResponse> {\n return this.request('GET', '/feature-matrix');\n }\n\n /**\n * Retrieve the feature matrix scoped to a merchant. Beta connectors\n * are filtered against the merchant's allowlist so the dashboard only\n * surfaces connectors the merchant can actually attach.\n * `GET /feature-matrix/{merchantId}`\n */\n async retrieveForMerchant(merchantId: string): Promise<FeatureMatrixResponse> {\n return this.request('GET', `/feature-matrix/${encodeURIComponent(merchantId)}`);\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/skyline/Programming/delopay/delopay-typescript-sdk/dist/chunk-IR2LFKKA.cjs","../src/internal/resources/admin.ts"],"names":[],"mappings":"AAAA;ACaO,IAAM,MAAA,EAAN,MAAY;AAAA,EACjB,WAAA,CAA6B,OAAA,EAAoB;AAApB,IAAA,IAAA,CAAA,QAAA,EAAA,OAAA;AAAA,EAAqB;AAAA,EAElD,MAAM,MAAA,CAAO,MAAA,EAAmD;AAC9D,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,MAAA,EAAQ,eAAA,EAAiB,EAAE,IAAA,EAAM,OAAO,CAAC,CAAA;AAAA,EAC/D;AAAA,EAEA,MAAM,kBAAA,CAAmB,MAAA,EAA+D;AACtF,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,MAAA,EAAQ,wBAAA,EAA0B,EAAE,IAAA,EAAM,OAAO,CAAC,CAAA;AAAA,EACxE;AAAA,EAEA,MAAM,YAAA,CAAa,MAAA,EAA6D;AAC9E,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,MAAA,EAAQ,sBAAA,EAAwB,EAAE,IAAA,EAAM,OAAO,CAAC,CAAA;AAAA,EACtE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAWA,MAAM,oBAAA,CAAqB,MAAA,EAAiE;AAC1F,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,MAAA,EAAQ,gCAAA,EAAkC,EAAE,IAAA,EAAM,OAAO,CAAC,CAAA;AAAA,EAChF;AAAA;AAAA,EAGA,MAAM,iBAAA,CAAkB,MAAA,EAA4D;AAClF,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,MAAA,EAAQ,wBAAA,EAA0B,EAAE,IAAA,EAAM,OAAO,CAAC,CAAA;AAAA,EACxE;AAAA;AAAA,EAGA,MAAM,iBAAA,CAAA,EAAmD;AACvD,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,KAAA,EAAO,wBAAwB,CAAA;AAAA,EACrD;AAAA;AAAA,EAGA,MAAM,eAAA,CAAgB,MAAA,EAAkE;AACtF,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,MAAA,EAAQ,yBAAA,EAA2B,EAAE,IAAA,EAAM,OAAO,CAAC,CAAA;AAAA,EACzE;AACF,CAAA;ADhBA;AACA;AACE;AACF,sBAAC","file":"/Users/skyline/Programming/delopay/delopay-typescript-sdk/dist/chunk-IR2LFKKA.cjs","sourcesContent":[null,"import type { AuthResponse, SignUpWithMerchantIdRequest } from '../../types';\nimport type {\n AdminSignInRequest,\n AuthorizeResponse,\n CreateInternalUserRequest,\n CreateTenantUserRequest,\n OnboardMerchantRequest,\n OnboardMerchantResponse,\n SignupToggleRequest,\n SignupToggleResponse,\n} from '../types';\nimport type { RequestFn } from '../../client';\n\nexport class Admin {\n constructor(private readonly request: RequestFn) {}\n\n async signIn(params: AdminSignInRequest): Promise<AuthResponse> {\n return this.request('POST', '/admin/signin', { body: params });\n }\n\n async createInternalUser(params: CreateInternalUserRequest): Promise<AuthorizeResponse> {\n return this.request('POST', '/admin/internal-signup', { body: params });\n }\n\n async createTenant(params: CreateTenantUserRequest): Promise<AuthorizeResponse> {\n return this.request('POST', '/admin/tenant-signup', { body: params });\n }\n\n /**\n * Create a new merchant admin user and merchant account atomically.\n *\n * This is the correct endpoint for bootstrapping the first admin user in a\n * fresh deployment — `internal-signup`/`tenant-signup` both require\n * pre-existing merchant records that don't exist on a clean database.\n *\n * `POST /admin/signup-with-merchant-id`\n */\n async signupWithMerchantId(params: SignUpWithMerchantIdRequest): Promise<AuthorizeResponse> {\n return this.request('POST', '/admin/signup-with-merchant-id', { body: params });\n }\n\n /** Toggle public signup on/off. `POST /admin/settings/signup` */\n async setSignupSettings(params: SignupToggleRequest): Promise<SignupToggleResponse> {\n return this.request('POST', '/admin/settings/signup', { body: params });\n }\n\n /** Read current public-signup status. `GET /admin/settings/signup` */\n async getSignupSettings(): Promise<SignupToggleResponse> {\n return this.request('GET', '/admin/settings/signup');\n }\n\n /** Full merchant bootstrap — user + merchant + project + profile + keys. `POST /admin/onboard-merchant` */\n async onboardMerchant(params: OnboardMerchantRequest): Promise<OnboardMerchantResponse> {\n return this.request('POST', '/admin/onboard-merchant', { body: params });\n }\n}\n"]}
1
+ {"version":3,"sources":["/home/jonathan/Desktop/DeloPay/dev1/delopay-typescript-sdk/dist/chunk-IR2LFKKA.cjs","../src/internal/resources/admin.ts"],"names":[],"mappings":"AAAA;ACaO,IAAM,MAAA,EAAN,MAAY;AAAA,EACjB,WAAA,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AAC,CAAA;AAAA,EACzE;AACF,CAAA;ADhBA;AACA;AACE;AACF,sBAAC","file":"/home/jonathan/Desktop/DeloPay/dev1/delopay-typescript-sdk/dist/chunk-IR2LFKKA.cjs","sourcesContent":[null,"import type { AuthResponse, SignUpWithMerchantIdRequest } from '../../types';\nimport type {\n AdminSignInRequest,\n AuthorizeResponse,\n CreateInternalUserRequest,\n CreateTenantUserRequest,\n OnboardMerchantRequest,\n OnboardMerchantResponse,\n SignupToggleRequest,\n SignupToggleResponse,\n} from '../types';\nimport type { RequestFn } from '../../client';\n\nexport class Admin {\n constructor(private readonly request: RequestFn) {}\n\n async signIn(params: AdminSignInRequest): Promise<AuthResponse> {\n return this.request('POST', '/admin/signin', { body: params });\n }\n\n async createInternalUser(params: CreateInternalUserRequest): Promise<AuthorizeResponse> {\n return this.request('POST', '/admin/internal-signup', { body: params });\n }\n\n async createTenant(params: CreateTenantUserRequest): Promise<AuthorizeResponse> {\n return this.request('POST', '/admin/tenant-signup', { body: params });\n }\n\n /**\n * Create a new merchant admin user and merchant account atomically.\n *\n * This is the correct endpoint for bootstrapping the first admin user in a\n * fresh deployment — `internal-signup`/`tenant-signup` both require\n * pre-existing merchant records that don't exist on a clean database.\n *\n * `POST /admin/signup-with-merchant-id`\n */\n async signupWithMerchantId(params: SignUpWithMerchantIdRequest): Promise<AuthorizeResponse> {\n return this.request('POST', '/admin/signup-with-merchant-id', { body: params });\n }\n\n /** Toggle public signup on/off. `POST /admin/settings/signup` */\n async setSignupSettings(params: SignupToggleRequest): Promise<SignupToggleResponse> {\n return this.request('POST', '/admin/settings/signup', { body: params });\n }\n\n /** Read current public-signup status. `GET /admin/settings/signup` */\n async getSignupSettings(): Promise<SignupToggleResponse> {\n return this.request('GET', '/admin/settings/signup');\n }\n\n /** Full merchant bootstrap — user + merchant + project + profile + keys. `POST /admin/onboard-merchant` */\n async onboardMerchant(params: OnboardMerchantRequest): Promise<OnboardMerchantResponse> {\n return this.request('POST', '/admin/onboard-merchant', { body: params });\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/skyline/Programming/delopay/delopay-typescript-sdk/dist/chunk-J4ZB7MU4.cjs","../src/internal/resources/adminIndustries.ts"],"names":[],"mappings":"AAAA;ACeA,IAAM,KAAA,EAAO,CAAC,EAAA,EAAA,GAAuB,CAAA,yBAAA,EAA4B,kBAAA,CAAmB,EAAE,CAAC,CAAA,CAAA;AAmB1D;AACsB,EAAA;AAApB,IAAA;AAAqB,EAAA;AAAA;AAGX,EAAA;AACgB,IAAA;AACvD,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOqE,EAAA;AACH,IAAA;AAClE,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOyF,EAAA;AAChC,IAAA;AACzD,EAAA;AAAA;AAAA;AAAA;AAAA;AAM6D,EAAA;AACF,IAAA;AAC3D,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAO6D,EAAA;AACF,IAAA;AAC3D,EAAA;AAAA;AAAA;AAAA;AAAA;AAMiG,EAAA;AAC9B,IAAA;AACnE,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOqE,EAAA;AACF,IAAA;AACnE,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUwC,EAAA;AACX,IAAA;AACP,MAAA;AACnB,IAAA;AACH,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAU0F,EAAA;AACzB,IAAA;AACjE,EAAA;AACF;ADxCsE;AACA;AACA;AACA","file":"/Users/skyline/Programming/delopay/delopay-typescript-sdk/dist/chunk-J4ZB7MU4.cjs","sourcesContent":[null,"import type { RequestFn } from '../../client';\nimport type {\n IndustryAvailability,\n IndustryCatalog,\n IndustryCategory,\n IndustryCreateRequest,\n IndustryMapRequest,\n IndustryPreview,\n IndustryPreviewQuery,\n IndustryRenameRequest,\n MerchantDefinedIndustry,\n MerchantDefinedIndustryList,\n MerchantDefinedIndustryQuery,\n} from '../types';\n\nconst path = (id: string): string => `/admin-portal/industries/${encodeURIComponent(id)}`;\n\n/**\n * The industry catalog: industries, their sub-industries, and where each one\n * can be selected. Reads take any internal role; changes need the account\n * management permission. Every change is recorded in the audit log\n * (`entity_type: 'industry'`), and a change that changes nothing records\n * nothing.\n *\n * An entry is selectable at a merchant, project or shop when it is active,\n * (for a sub-industry) its industry is selectable there too, and its own\n * availability is `all` or one of its scopes reaches the target.\n *\n * Errors: `IR_06` (422) an invalid name, scope or availability, a parent that\n * is a sub-industry, or a preview naming both a project and a shop; `IR_37`\n * (404) an unknown entry, parent, merchant, project or shop; `IR_38` (400) an\n * active sibling already has the name; `IR_16` (400) the parent industry is\n * archived.\n */\nexport class AdminIndustries {\n constructor(private readonly request: RequestFn) {}\n\n /** The whole catalog, archived entries included. `GET /admin-portal/industries` */\n async list(): Promise<IndustryCatalog> {\n return this.request('GET', '/admin-portal/industries');\n }\n\n /**\n * Create an industry, or a sub-industry under `parent_id`. Without\n * `availability` it can be selected nowhere until availability is set.\n * `POST /admin-portal/industries`\n */\n async create(body: IndustryCreateRequest): Promise<IndustryCategory> {\n return this.request('POST', '/admin-portal/industries', { body });\n }\n\n /**\n * Rename an entry. With `apply_to` `all` (the default) its id stays; with\n * `from` or `today` the answer is the new entry that carries the new name\n * (see `IndustryRenameRequest`). `PATCH /admin-portal/industries/{industry_id}`\n */\n async rename(industryId: string, body: IndustryRenameRequest): Promise<IndustryCategory> {\n return this.request('PATCH', path(industryId), { body });\n }\n\n /**\n * Stop offering an entry, and for an industry its sub-industries, for new\n * selections. Existing selections keep it. `POST /admin-portal/industries/{industry_id}/archive`\n */\n async archive(industryId: string): Promise<IndustryCategory> {\n return this.request('POST', `${path(industryId)}/archive`);\n }\n\n /**\n * Offer an archived entry again. Refused while an active sibling holds its\n * name, or for a sub-industry while its industry is archived.\n * `POST /admin-portal/industries/{industry_id}/restore`\n */\n async restore(industryId: string): Promise<IndustryCategory> {\n return this.request('POST', `${path(industryId)}/restore`);\n }\n\n /**\n * Replace where an entry can be selected.\n * `PUT /admin-portal/industries/{industry_id}/availability`\n */\n async setAvailability(industryId: string, body: IndustryAvailability): Promise<IndustryCategory> {\n return this.request('PUT', `${path(industryId)}/availability`, { body });\n }\n\n /**\n * Every entry as seen from one merchant, or one of its projects or shops:\n * whether it can be selected there, why, and which scope grants it.\n * `GET /admin-portal/industries/preview`\n */\n async preview(query: IndustryPreviewQuery): Promise<IndustryPreview> {\n return this.request('GET', '/admin-portal/industries/preview', { query: { ...query } });\n }\n\n /**\n * The industries merchants defined for themselves, each with its merchant,\n * the selections naming it, the closest of DeloPay's entries selectable at\n * that merchant, and its mapping. An employee limited to some merchants sees\n * theirs only. `GET /admin-portal/industries/merchant-defined`\n */\n async listMerchantDefined(\n query: MerchantDefinedIndustryQuery = {},\n ): Promise<MerchantDefinedIndustryList> {\n return this.request('GET', '/admin-portal/industries/merchant-defined', {\n query: { ...query },\n });\n }\n\n /**\n * Move every selection of a merchant-defined industry, and every payment\n * counted in it, to one of DeloPay's active entries selectable at that\n * merchant, and archive it as `mapped`. The merchant is shown a notice for\n * 90 days. Needs the account-management group. An entry already archived or\n * mapped answers 422 (`IR_06`); an id that is not merchant-defined, 404\n * (`IR_37`). `POST /admin-portal/industries/{industry_id}/map`\n */\n async map(industryId: string, body: IndustryMapRequest): Promise<MerchantDefinedIndustry> {\n return this.request('POST', `${path(industryId)}/map`, { body });\n }\n}\n"]}
1
+ {"version":3,"sources":["/home/jonathan/Desktop/DeloPay/dev1/delopay-typescript-sdk/dist/chunk-J4ZB7MU4.cjs","../src/internal/resources/adminIndustries.ts"],"names":[],"mappings":"AAAA;ACeA,IAAM,KAAA,EAAO,CAAC,EAAA,EAAA,GAAuB,CAAA,yBAAA,EAA4B,kBAAA,CAAmB,EAAE,CAAC,CAAA,CAAA;AAmB1D;AACsB,EAAA;AAApB,IAAA;AAAqB,EAAA;AAAA;AAGX,EAAA;AACgB,IAAA;AACvD,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOqE,EAAA;AACH,IAAA;AAClE,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOyF,EAAA;AAChC,IAAA;AACzD,EAAA;AAAA;AAAA;AAAA;AAAA;AAM6D,EAAA;AACF,IAAA;AAC3D,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAO6D,EAAA;AACF,IAAA;AAC3D,EAAA;AAAA;AAAA;AAAA;AAAA;AAMiG,EAAA;AAC9B,IAAA;AACnE,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOqE,EAAA;AACF,IAAA;AACnE,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUwC,EAAA;AACX,IAAA;AACP,MAAA;AACnB,IAAA;AACH,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAU0F,EAAA;AACzB,IAAA;AACjE,EAAA;AACF;ADxCsE;AACA;AACA;AACA","file":"/home/jonathan/Desktop/DeloPay/dev1/delopay-typescript-sdk/dist/chunk-J4ZB7MU4.cjs","sourcesContent":[null,"import type { RequestFn } from '../../client';\nimport type {\n IndustryAvailability,\n IndustryCatalog,\n IndustryCategory,\n IndustryCreateRequest,\n IndustryMapRequest,\n IndustryPreview,\n IndustryPreviewQuery,\n IndustryRenameRequest,\n MerchantDefinedIndustry,\n MerchantDefinedIndustryList,\n MerchantDefinedIndustryQuery,\n} from '../types';\n\nconst path = (id: string): string => `/admin-portal/industries/${encodeURIComponent(id)}`;\n\n/**\n * The industry catalog: industries, their sub-industries, and where each one\n * can be selected. Reads take any internal role; changes need the account\n * management permission. Every change is recorded in the audit log\n * (`entity_type: 'industry'`), and a change that changes nothing records\n * nothing.\n *\n * An entry is selectable at a merchant, project or shop when it is active,\n * (for a sub-industry) its industry is selectable there too, and its own\n * availability is `all` or one of its scopes reaches the target.\n *\n * Errors: `IR_06` (422) an invalid name, scope or availability, a parent that\n * is a sub-industry, or a preview naming both a project and a shop; `IR_37`\n * (404) an unknown entry, parent, merchant, project or shop; `IR_38` (400) an\n * active sibling already has the name; `IR_16` (400) the parent industry is\n * archived.\n */\nexport class AdminIndustries {\n constructor(private readonly request: RequestFn) {}\n\n /** The whole catalog, archived entries included. `GET /admin-portal/industries` */\n async list(): Promise<IndustryCatalog> {\n return this.request('GET', '/admin-portal/industries');\n }\n\n /**\n * Create an industry, or a sub-industry under `parent_id`. Without\n * `availability` it can be selected nowhere until availability is set.\n * `POST /admin-portal/industries`\n */\n async create(body: IndustryCreateRequest): Promise<IndustryCategory> {\n return this.request('POST', '/admin-portal/industries', { body });\n }\n\n /**\n * Rename an entry. With `apply_to` `all` (the default) its id stays; with\n * `from` or `today` the answer is the new entry that carries the new name\n * (see `IndustryRenameRequest`). `PATCH /admin-portal/industries/{industry_id}`\n */\n async rename(industryId: string, body: IndustryRenameRequest): Promise<IndustryCategory> {\n return this.request('PATCH', path(industryId), { body });\n }\n\n /**\n * Stop offering an entry, and for an industry its sub-industries, for new\n * selections. Existing selections keep it. `POST /admin-portal/industries/{industry_id}/archive`\n */\n async archive(industryId: string): Promise<IndustryCategory> {\n return this.request('POST', `${path(industryId)}/archive`);\n }\n\n /**\n * Offer an archived entry again. Refused while an active sibling holds its\n * name, or for a sub-industry while its industry is archived.\n * `POST /admin-portal/industries/{industry_id}/restore`\n */\n async restore(industryId: string): Promise<IndustryCategory> {\n return this.request('POST', `${path(industryId)}/restore`);\n }\n\n /**\n * Replace where an entry can be selected.\n * `PUT /admin-portal/industries/{industry_id}/availability`\n */\n async setAvailability(industryId: string, body: IndustryAvailability): Promise<IndustryCategory> {\n return this.request('PUT', `${path(industryId)}/availability`, { body });\n }\n\n /**\n * Every entry as seen from one merchant, or one of its projects or shops:\n * whether it can be selected there, why, and which scope grants it.\n * `GET /admin-portal/industries/preview`\n */\n async preview(query: IndustryPreviewQuery): Promise<IndustryPreview> {\n return this.request('GET', '/admin-portal/industries/preview', { query: { ...query } });\n }\n\n /**\n * The industries merchants defined for themselves, each with its merchant,\n * the selections naming it, the closest of DeloPay's entries selectable at\n * that merchant, and its mapping. An employee limited to some merchants sees\n * theirs only. `GET /admin-portal/industries/merchant-defined`\n */\n async listMerchantDefined(\n query: MerchantDefinedIndustryQuery = {},\n ): Promise<MerchantDefinedIndustryList> {\n return this.request('GET', '/admin-portal/industries/merchant-defined', {\n query: { ...query },\n });\n }\n\n /**\n * Move every selection of a merchant-defined industry, and every payment\n * counted in it, to one of DeloPay's active entries selectable at that\n * merchant, and archive it as `mapped`. The merchant is shown a notice for\n * 90 days. Needs the account-management group. An entry already archived or\n * mapped answers 422 (`IR_06`); an id that is not merchant-defined, 404\n * (`IR_37`). `POST /admin-portal/industries/{industry_id}/map`\n */\n async map(industryId: string, body: IndustryMapRequest): Promise<MerchantDefinedIndustry> {\n return this.request('POST', `${path(industryId)}/map`, { body });\n }\n}\n"]}
@@ -0,0 +1,182 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});// src/resources/checkoutDomains.ts
2
+ function hostPath(hostId, rest = "") {
3
+ return `/checkout-domains/${encodeURIComponent(hostId)}${rest}`;
4
+ }
5
+ var CheckoutDomains = class {
6
+ constructor(request) {
7
+ this.request = request;
8
+ }
9
+ /**
10
+ * The entitlement, every address with its setup and health, how new
11
+ * subdomains are spelled, where own domains point, the default origin, and
12
+ * the merchant's Cloudflare connections.
13
+ * `GET /checkout-domains`
14
+ */
15
+ async list() {
16
+ return this.request("GET", "/checkout-domains");
17
+ }
18
+ /**
19
+ * Whether an address can be added. Reserves nothing; the answer also names
20
+ * a free platform name like the one asked for, and the DNS provider read
21
+ * from an own domain's nameservers.
22
+ * `GET /checkout-domains/availability`
23
+ */
24
+ async availability(query) {
25
+ return this.request("GET", "/checkout-domains/availability", { query });
26
+ }
27
+ /**
28
+ * Add an address. It starts `setting_up`; a repeat for an address the
29
+ * merchant already has answers with that address.
30
+ * `POST /checkout-domains`
31
+ */
32
+ async create(params) {
33
+ return this.request("POST", "/checkout-domains", { body: params });
34
+ }
35
+ /** One address. Another merchant's id answers 404. `GET /checkout-domains/{hostId}` */
36
+ async retrieve(hostId) {
37
+ return this.request("GET", hostPath(hostId));
38
+ }
39
+ /**
40
+ * Change an address: the Apple Pay file it serves (`null` serves none) and
41
+ * whether new links fall back to the default address while it is down.
42
+ * What is left out stays as it is. Refusal: `file_unknown`.
43
+ * `PATCH /checkout-domains/{hostId}`
44
+ */
45
+ async update(hostId, params) {
46
+ return this.request("PATCH", hostPath(hostId), { body: params });
47
+ }
48
+ /**
49
+ * Remove an address; its shops go back to the default address for new
50
+ * links. A platform subdomain becomes `retiring`: it takes no new links,
51
+ * keeps serving links already sent until `retire_after`, then frees its
52
+ * name. An own domain is removed in two steps: it must stop taking traffic
53
+ * first (pause it; `removable_after` on the address says when the drain is
54
+ * over), and links already sent stop working once its DNS points elsewhere.
55
+ * Refusals (`error.details.reason`): `host_takes_traffic` (still takes new
56
+ * traffic; pause it first), `host_draining` (stopped moments ago;
57
+ * `retry_after_seconds`), `host_in_use` (`payment_ids` of open payments that
58
+ * can still come back to it) and `host_changed` (it changed while being
59
+ * removed; read it again).
60
+ * `DELETE /checkout-domains/{hostId}`
61
+ */
62
+ async remove(hostId) {
63
+ return this.request("DELETE", hostPath(hostId));
64
+ }
65
+ /**
66
+ * The address's health page: uptime, days, incidents, the latest
67
+ * transitions, usage, and who was told about its events.
68
+ * `GET /checkout-domains/{hostId}/health`
69
+ */
70
+ async health(hostId) {
71
+ return this.request("GET", hostPath(hostId, "/health"));
72
+ }
73
+ /**
74
+ * A signed link that renders a sample checkout on the address, without a
75
+ * payment. Valid for ten minutes.
76
+ * `POST /checkout-domains/{hostId}/preview`
77
+ */
78
+ async preview(hostId) {
79
+ return this.request("POST", hostPath(hostId, "/preview"));
80
+ }
81
+ /**
82
+ * Pause the address: new links fall back to the default address, open
83
+ * payments keep loading, and no alerts are sent. It resumes at `resume_at`,
84
+ * or when resumed. Refusals: `pause_note_invalid`, `resume_at_past`.
85
+ * `POST /checkout-domains/{hostId}/pause`
86
+ */
87
+ async pause(hostId, params = {}) {
88
+ return this.request("POST", hostPath(hostId, "/pause"), { body: params });
89
+ }
90
+ /**
91
+ * Resume a paused address.
92
+ * `DELETE /checkout-domains/{hostId}/pause`
93
+ */
94
+ async resume(hostId) {
95
+ return this.request("DELETE", hostPath(hostId, "/pause"));
96
+ }
97
+ /**
98
+ * The DNS records an own domain needs (where it points, and the TXT record
99
+ * proving the domain), whether each was found, and what the hostname
100
+ * resolves to today.
101
+ * `GET /checkout-domains/{hostId}/verification`
102
+ */
103
+ async verification(hostId) {
104
+ return this.request("GET", hostPath(hostId, "/verification"));
105
+ }
106
+ /**
107
+ * Run the address's check now instead of waiting for the next one.
108
+ * Rate-limited per address.
109
+ * `POST /checkout-domains/{hostId}/check`
110
+ */
111
+ async check(hostId) {
112
+ return this.request("POST", hostPath(hostId, "/check"));
113
+ }
114
+ /**
115
+ * The whole list of shops whose new links use the address. A shop uses one
116
+ * address at a time, so a listed shop moves off any other address of the
117
+ * merchant. An address still setting up may take shops; their links switch
118
+ * once it is ready.
119
+ * `PUT /checkout-domains/{hostId}/shops`
120
+ */
121
+ async setShops(hostId, params) {
122
+ return this.request("PUT", hostPath(hostId, "/shops"), { body: params });
123
+ }
124
+ /**
125
+ * Which address one shop's new links use; `host_id: null` puts the shop
126
+ * back on the default address. Links switch once the address is ready.
127
+ * `PUT /checkout-domains/shops/{profileId}`
128
+ */
129
+ async setShopHost(profileId, params) {
130
+ return this.request("PUT", `/checkout-domains/shops/${encodeURIComponent(profileId)}`, {
131
+ body: params
132
+ });
133
+ }
134
+ /**
135
+ * How checkout address events are told: each event with bell and email,
136
+ * the recipients (members who may manage checkout domains, or chosen
137
+ * members) and the addresses (all or chosen). Suspensions are always told.
138
+ * `GET /checkout-domains/alerts`
139
+ */
140
+ async alerts() {
141
+ return this.request("GET", "/checkout-domains/alerts");
142
+ }
143
+ /**
144
+ * Save how checkout address events are told.
145
+ * `PUT /checkout-domains/alerts`
146
+ */
147
+ async updateAlerts(params) {
148
+ return this.request("PUT", "/checkout-domains/alerts", { body: params });
149
+ }
150
+ /**
151
+ * The Apple Pay verification files an address may serve: the built-in ones
152
+ * and the platform's uploads.
153
+ * `GET /checkout-domains/apple-pay-files`
154
+ */
155
+ async applePayFiles() {
156
+ return this.request("GET", "/checkout-domains/apple-pay-files");
157
+ }
158
+ /**
159
+ * Connect the merchant's Cloudflare to an own domain: the token must reach
160
+ * exactly that domain's zone, with DNS edit. The records are created
161
+ * through it; the token is stored encrypted and never returned.
162
+ * `POST /checkout-domains/{hostId}/cloudflare`
163
+ */
164
+ async connectCloudflare(hostId, params) {
165
+ return this.request("POST", hostPath(hostId, "/cloudflare"), { body: params });
166
+ }
167
+ /**
168
+ * Forget a Cloudflare connection. The records it made stay in the zone.
169
+ * `DELETE /checkout-domains/cloudflare/{connectionId}`
170
+ */
171
+ async disconnectCloudflare(connectionId) {
172
+ return this.request(
173
+ "DELETE",
174
+ `/checkout-domains/cloudflare/${encodeURIComponent(connectionId)}`
175
+ );
176
+ }
177
+ };
178
+
179
+
180
+
181
+ exports.CheckoutDomains = CheckoutDomains;
182
+ //# sourceMappingURL=chunk-JJPKURUG.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/home/jonathan/Desktop/DeloPay/dev1/delopay-typescript-sdk/dist/chunk-JJPKURUG.cjs","../src/resources/checkoutDomains.ts"],"names":[],"mappings":"AAAA;ACoBA,SAAS,QAAA,CAAS,MAAA,EAAgB,KAAA,EAAO,EAAA,EAAY;AACnD,EAAA,OAAO,CAAA,kBAAA,EAAqB,kBAAA,CAAmB,MAAM,CAAC,CAAA,EAAA;AACxD;AAe6B;AACsB,EAAA;AAApB,IAAA;AAAqB,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQH,EAAA;AACC,IAAA;AAChD,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAU+C,EAAA;AAClB,IAAA;AAC7B,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOgF,EAAA;AAC3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AACA;AACA","file":"/home/jonathan/Desktop/DeloPay/dev1/delopay-typescript-sdk/dist/chunk-JJPKURUG.cjs","sourcesContent":[null,"import type {\n CheckoutDomainAlerts,\n CheckoutDomainAvailabilityQuery,\n CheckoutDomainAvailabilityResponse,\n CheckoutHostPauseRequest,\n CheckoutHostPreview,\n CheckoutHostUpdateRequest,\n CheckoutHostVerification,\n MerchantApplePayFiles,\n MerchantCheckoutDomains,\n MerchantCheckoutHost,\n MerchantCheckoutHostCreate,\n MerchantCloudflareConnect,\n MerchantHostHealth,\n MerchantHostShopsRequest,\n RemovedCheckoutHost,\n ShopCheckoutHost,\n} from '../types';\nimport type { RequestFn } from '../client';\n\nfunction hostPath(hostId: string, rest = ''): string {\n return `/checkout-domains/${encodeURIComponent(hostId)}${rest}`;\n}\n\n/**\n * Checkout domains: the addresses a merchant's hosted checkout answers on\n * besides the platform's default one. An address is a name on the platform's\n * domain (`checkout-yourshop.example.net`) or a subdomain of the merchant's\n * own domain (`checkout.yourshop.com`, set up with DNS records or a\n * Cloudflare token). Shops are assigned to an address; their new payment\n * links open there once it is ready.\n *\n * Every route needs a dashboard session. Reading needs the checkout domains\n * area at `Read`; adding, changing and removing need `Write`, which only a\n * merchant-level role holds. DeloPay turns the feature on per merchant, with\n * a limit (`entitlement` on `list()`).\n */\nexport class CheckoutDomains {\n constructor(private readonly request: RequestFn) {}\n\n /**\n * The entitlement, every address with its setup and health, how new\n * subdomains are spelled, where own domains point, the default origin, and\n * the merchant's Cloudflare connections.\n * `GET /checkout-domains`\n */\n async list(): Promise<MerchantCheckoutDomains> {\n return this.request('GET', '/checkout-domains');\n }\n\n /**\n * Whether an address can be added. Reserves nothing; the answer also names\n * a free platform name like the one asked for, and the DNS provider read\n * from an own domain's nameservers.\n * `GET /checkout-domains/availability`\n */\n async availability(\n query: CheckoutDomainAvailabilityQuery,\n ): Promise<CheckoutDomainAvailabilityResponse> {\n return this.request('GET', '/checkout-domains/availability', { query });\n }\n\n /**\n * Add an address. It starts `setting_up`; a repeat for an address the\n * merchant already has answers with that address.\n * `POST /checkout-domains`\n */\n async create(params: MerchantCheckoutHostCreate): Promise<MerchantCheckoutHost> {\n return this.request('POST', '/checkout-domains', { body: params });\n }\n\n /** One address. Another merchant's id answers 404. `GET /checkout-domains/{hostId}` */\n async retrieve(hostId: string): Promise<MerchantCheckoutHost> {\n return this.request('GET', hostPath(hostId));\n }\n\n /**\n * Change an address: the Apple Pay file it serves (`null` serves none) and\n * whether new links fall back to the default address while it is down.\n * What is left out stays as it is. Refusal: `file_unknown`.\n * `PATCH /checkout-domains/{hostId}`\n */\n async update(hostId: string, params: CheckoutHostUpdateRequest): Promise<MerchantCheckoutHost> {\n return this.request('PATCH', hostPath(hostId), { body: params });\n }\n\n /**\n * Remove an address; its shops go back to the default address for new\n * links. A platform subdomain becomes `retiring`: it takes no new links,\n * keeps serving links already sent until `retire_after`, then frees its\n * name. An own domain is removed in two steps: it must stop taking traffic\n * first (pause it; `removable_after` on the address says when the drain is\n * over), and links already sent stop working once its DNS points elsewhere.\n * Refusals (`error.details.reason`): `host_takes_traffic` (still takes new\n * traffic; pause it first), `host_draining` (stopped moments ago;\n * `retry_after_seconds`), `host_in_use` (`payment_ids` of open payments that\n * can still come back to it) and `host_changed` (it changed while being\n * removed; read it again).\n * `DELETE /checkout-domains/{hostId}`\n */\n async remove(hostId: string): Promise<RemovedCheckoutHost> {\n return this.request('DELETE', hostPath(hostId));\n }\n\n /**\n * The address's health page: uptime, days, incidents, the latest\n * transitions, usage, and who was told about its events.\n * `GET /checkout-domains/{hostId}/health`\n */\n async health(hostId: string): Promise<MerchantHostHealth> {\n return this.request('GET', hostPath(hostId, '/health'));\n }\n\n /**\n * A signed link that renders a sample checkout on the address, without a\n * payment. Valid for ten minutes.\n * `POST /checkout-domains/{hostId}/preview`\n */\n async preview(hostId: string): Promise<CheckoutHostPreview> {\n return this.request('POST', hostPath(hostId, '/preview'));\n }\n\n /**\n * Pause the address: new links fall back to the default address, open\n * payments keep loading, and no alerts are sent. It resumes at `resume_at`,\n * or when resumed. Refusals: `pause_note_invalid`, `resume_at_past`.\n * `POST /checkout-domains/{hostId}/pause`\n */\n async pause(\n hostId: string,\n params: CheckoutHostPauseRequest = {},\n ): Promise<MerchantCheckoutHost> {\n return this.request('POST', hostPath(hostId, '/pause'), { body: params });\n }\n\n /**\n * Resume a paused address.\n * `DELETE /checkout-domains/{hostId}/pause`\n */\n async resume(hostId: string): Promise<MerchantCheckoutHost> {\n return this.request('DELETE', hostPath(hostId, '/pause'));\n }\n\n /**\n * The DNS records an own domain needs (where it points, and the TXT record\n * proving the domain), whether each was found, and what the hostname\n * resolves to today.\n * `GET /checkout-domains/{hostId}/verification`\n */\n async verification(hostId: string): Promise<CheckoutHostVerification> {\n return this.request('GET', hostPath(hostId, '/verification'));\n }\n\n /**\n * Run the address's check now instead of waiting for the next one.\n * Rate-limited per address.\n * `POST /checkout-domains/{hostId}/check`\n */\n async check(hostId: string): Promise<MerchantCheckoutHost> {\n return this.request('POST', hostPath(hostId, '/check'));\n }\n\n /**\n * The whole list of shops whose new links use the address. A shop uses one\n * address at a time, so a listed shop moves off any other address of the\n * merchant. An address still setting up may take shops; their links switch\n * once it is ready.\n * `PUT /checkout-domains/{hostId}/shops`\n */\n async setShops(hostId: string, params: MerchantHostShopsRequest): Promise<MerchantCheckoutHost> {\n return this.request('PUT', hostPath(hostId, '/shops'), { body: params });\n }\n\n /**\n * Which address one shop's new links use; `host_id: null` puts the shop\n * back on the default address. Links switch once the address is ready.\n * `PUT /checkout-domains/shops/{profileId}`\n */\n async setShopHost(profileId: string, params: ShopCheckoutHost): Promise<ShopCheckoutHost> {\n return this.request('PUT', `/checkout-domains/shops/${encodeURIComponent(profileId)}`, {\n body: params,\n });\n }\n\n /**\n * How checkout address events are told: each event with bell and email,\n * the recipients (members who may manage checkout domains, or chosen\n * members) and the addresses (all or chosen). Suspensions are always told.\n * `GET /checkout-domains/alerts`\n */\n async alerts(): Promise<CheckoutDomainAlerts> {\n return this.request('GET', '/checkout-domains/alerts');\n }\n\n /**\n * Save how checkout address events are told.\n * `PUT /checkout-domains/alerts`\n */\n async updateAlerts(params: CheckoutDomainAlerts): Promise<CheckoutDomainAlerts> {\n return this.request('PUT', '/checkout-domains/alerts', { body: params });\n }\n\n /**\n * The Apple Pay verification files an address may serve: the built-in ones\n * and the platform's uploads.\n * `GET /checkout-domains/apple-pay-files`\n */\n async applePayFiles(): Promise<MerchantApplePayFiles> {\n return this.request('GET', '/checkout-domains/apple-pay-files');\n }\n\n /**\n * Connect the merchant's Cloudflare to an own domain: the token must reach\n * exactly that domain's zone, with DNS edit. The records are created\n * through it; the token is stored encrypted and never returned.\n * `POST /checkout-domains/{hostId}/cloudflare`\n */\n async connectCloudflare(\n hostId: string,\n params: MerchantCloudflareConnect,\n ): Promise<MerchantCheckoutHost> {\n return this.request('POST', hostPath(hostId, '/cloudflare'), { body: params });\n }\n\n /**\n * Forget a Cloudflare connection. The records it made stay in the zone.\n * `DELETE /checkout-domains/cloudflare/{connectionId}`\n */\n async disconnectCloudflare(connectionId: string): Promise<void> {\n return this.request(\n 'DELETE',\n `/checkout-domains/cloudflare/${encodeURIComponent(connectionId)}`,\n );\n }\n}\n"]}
@@ -461,6 +461,45 @@ var Connectors = class {
461
461
  { body: params }
462
462
  );
463
463
  }
464
+ /**
465
+ * The account's Apple Pay registration on every checkout address, per key
466
+ * set: `registered`, `failed` (with why), `skipped` (the address serves
467
+ * another processor's file), `pending` (the address is not ready yet),
468
+ * `not_attempted`, or for PayPal `manual_pending` / `manual_done`.
469
+ * `GET /account/{merchantId}/connectors/{connectorId}/apple-pay-registrations`
470
+ */
471
+ async applePayRegistrations(merchantId, connectorId) {
472
+ return this.request(
473
+ "GET",
474
+ `/account/${encodeURIComponent(merchantId)}/connectors/${encodeURIComponent(connectorId)}/apple-pay-registrations`
475
+ );
476
+ }
477
+ /**
478
+ * Register the account on every ready checkout address whose Apple Pay file
479
+ * serves its processor again, for one key set or both. Answers the list as
480
+ * it stands afterwards.
481
+ * `POST /account/{merchantId}/connectors/{connectorId}/apple-pay-registrations/retry`
482
+ */
483
+ async retryApplePayRegistrations(merchantId, connectorId, params = {}) {
484
+ return this.request(
485
+ "POST",
486
+ `/account/${encodeURIComponent(merchantId)}/connectors/${encodeURIComponent(connectorId)}/apple-pay-registrations/retry`,
487
+ { body: params }
488
+ );
489
+ }
490
+ /**
491
+ * Mark a checkout address registered (or not) for one key set, for a
492
+ * processor without a registration API (PayPal). A reminder for the team:
493
+ * nothing is checked with the processor. Refused for other processors.
494
+ * `PUT /account/{merchantId}/connectors/{connectorId}/apple-pay-registrations/{hostId}/mark`
495
+ */
496
+ async markApplePayRegistration(merchantId, connectorId, hostId, params) {
497
+ return this.request(
498
+ "PUT",
499
+ `/account/${encodeURIComponent(merchantId)}/connectors/${encodeURIComponent(connectorId)}/apple-pay-registrations/${encodeURIComponent(hostId)}/mark`,
500
+ { body: params }
501
+ );
502
+ }
464
503
  /** Get registered webhooks for a connector. `GET /account/{merchantId}/connectors/webhooks/{connectorId}` */
465
504
  async getWebhook(merchantId, connectorId) {
466
505
  return this.request(
@@ -717,4 +756,4 @@ function providerWebhooksPath(merchantId, connectorId) {
717
756
 
718
757
 
719
758
  exports.Connectors = Connectors;
720
- //# sourceMappingURL=chunk-GA3KXPIF.cjs.map
759
+ //# sourceMappingURL=chunk-JPRSNCYP.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/home/jonathan/Desktop/DeloPay/dev1/delopay-typescript-sdk/dist/chunk-JPRSNCYP.cjs","../src/resources/connectors.ts"],"names":[],"mappings":"AAAA;AC0DO,IAAM,WAAA,EAAN,MAAiB;AAAA,EACtB,WAAA,CAA6B,OAAA,EAAoB;AAApB,IAAA,IAAA,CAAA,QAAA,EAAA,OAAA;AAAA,EAAqB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAYlD,MAAM,4BAAA,CACJ,UAAA,EACA,WAAA,E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F;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAA;AAiBE,IAAA;AAA0E,MAAA;AACnD,IAAA;AACtB,EAAA;AACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAA;AAeE,IAAA;AAA2F,EAAA;AAC7F;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAA;AAeE,IAAA;AAAY,MAAA;AACV,MAAA;AACiF,MAAA;AAClE,IAAA;AACjB,EAAA;AACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAA;AAgBE,IAAA;AAAY,MAAA;AACV,MAAA;AACiF,MAAA;AAClE,IAAA;AACjB,EAAA;AACF;AAAA;AAAA;AAAA;AAAA,EAAA;AAWE,IAAA;AAAuF,MAAA;AAChE,IAAA;AACtB,EAAA;AACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAA;AAgBE,IAAA;AAAwF,MAAA;AAChF,IAAA;AACP,EAAA;AACH;AAAA,EAAA;AAIE,IAAA;AAAqD,EAAA;AAEzD;AAEA;AACE,EAAA;AACF;ADpPA;AACA;AACA;AACA","file":"/home/jonathan/Desktop/DeloPay/dev1/delopay-typescript-sdk/dist/chunk-JPRSNCYP.cjs","sourcesContent":[null,"import type {\n ApplePayRegistrationList,\n ApplePayRegistrationMarkRequest,\n ApplePayRegistrationRetryRequest,\n ConnectorBuyerMailQuery,\n ConnectorBuyerMailResponse,\n ConnectorBuyerMailUpdate,\n ConnectorCloneRequest,\n ConnectorConsolidationRequest,\n ConnectorConsolidationResponse,\n ConnectorCurrencyPolicyResponse,\n ConnectorCurrencyPolicyUpdateRequest,\n ConnectorShopsAddRequest,\n ConnectorShopUpdateRequest,\n ConnectorShopsResponse,\n ConnectorHealthResponse,\n EpayoutsCatalogResponse,\n PanesCatalogResponse,\n VaultRoutesApplyRequest,\n VaultRoutesApplyResponse,\n VaultRoutesPreviewRequest,\n VaultRoutesPreviewResponse,\n VaultOutagesResponse,\n VaultVerificationResponse,\n VaultVerifyRequest,\n ConnectorCreateRequest,\n ConnectorResponse,\n ConnectorUpdateRequest,\n ConnectorWebhookListResponse,\n ConnectorWebhookRegisterRequest,\n ConnectorWebhookRegisterResponse,\n ConnectorWebhookSyncResponse,\n WebhookAddressPreviewResponse,\n WebhookAddressRequest,\n WebhookAddressResponse,\n ReturnAddressPreviewResponse,\n ReturnAddressRequest,\n ReturnAddressResponse,\n ProviderWebhookCreateRequest,\n ProviderWebhookCreateResponse,\n ProviderWebhookDeleteRequest,\n ProviderWebhookDeleteResult,\n ProviderWebhookEndpoint,\n ProviderWebhookListResponse,\n ProviderWebhookReplacePreviewResponse,\n ProviderWebhookReplaceRequest,\n ProviderWebhookReplaceResponse,\n ProviderWebhookUpdateRequest,\n WebhookRegistrationEnvironment,\n AirwallexApplePayDomainsRegisterRequest,\n AirwallexApplePayDomainsRegisterResponse,\n StripePaymentMethodDomainsRegisterRequest,\n StripePaymentMethodDomainsRegisterResponse,\n WhopApplePayDomainsRegisterRequest,\n WhopApplePayDomainsRegisterResponse,\n} from '../types';\nimport type { RequestExtras, RequestFn } from '../client';\n\nexport class Connectors {\n constructor(private readonly request: RequestFn) {}\n\n /**\n * Read the connected provider account's optional buyer-email preference.\n * Currently supported for Whop. Use `setJwtToken` with a merchant JWT that\n * has Connector Edit authority; a shop token or API key cannot substitute.\n * Select Sandbox or Live explicitly through `test_mode`.\n *\n * The preference affects every shop sharing the provider account. It does\n * not disable mandatory provider messages or DeloPay invoice delivery.\n * A null or absent value establishes no on/off preference.\n */\n async retrieveBuyerEmailPreference(\n merchantId: string,\n connectorId: string,\n params: ConnectorBuyerMailQuery,\n ): Promise<ConnectorBuyerMailResponse> {\n return this.request(\n 'GET',\n `/account/${encodeURIComponent(merchantId)}/connectors/${encodeURIComponent(connectorId)}/buyer-email-preference`,\n { query: { test_mode: params.test_mode } },\n );\n }\n\n /**\n * Change the optional buyer-email preference for the whole provider account.\n * Currently supported for Whop. Requires a merchant JWT with Connector Edit\n * authority and explicit confirmation for every shop sharing the account.\n * Send the exact account, credential mode and value read before confirmation;\n * a changed account or preference is refused before mutation.\n *\n * Inspect `outcome`: only `verified` confirms the requested value through a\n * fresh exact-account read. HTTP 200 may instead report a conflict, refusal\n * or unknown outcome. An uncertain change may have happened; read the\n * preference again before retrying, including after a transport error.\n * This method adds no automatic readback or retry. Mandatory provider\n * messages and DeloPay invoice delivery are unaffected.\n */\n async updateBuyerEmailPreference(\n merchantId: string,\n connectorId: string,\n params: ConnectorBuyerMailUpdate,\n ): Promise<ConnectorBuyerMailResponse> {\n return this.request(\n 'PUT',\n `/account/${encodeURIComponent(merchantId)}/connectors/${encodeURIComponent(connectorId)}/buyer-email-preference`,\n { body: params },\n );\n }\n\n async create(accountId: string, params: ConnectorCreateRequest): Promise<ConnectorResponse> {\n return this.request('POST', `/account/${encodeURIComponent(accountId)}/connectors`, {\n body: params,\n });\n }\n\n /**\n * One connector account.\n *\n * The credential-bearing fields come back `null` here, whatever is stored:\n * `connector_webhook_details`, `connector_wallets_details`,\n * `pm_auth_config` and `additional_merchant_data`. They are dropped rather\n * than masked, because an editor that prefills from this response and\n * PATCHes the field back would otherwise save a mask over a live signing\n * secret. Send those fields only when the operator has typed a new value,\n * and omit them entirely otherwise — an omitted field leaves the stored one\n * alone.\n *\n * This is the retrieve path alone. `create` and `update` echo back what the\n * caller sent, and `clone` returns the *copied* secrets — see that method.\n *\n * Because the value is gone, `has_live_webhook_secret` and\n * `has_sandbox_webhook_secret` are what tell a stored webhook signing secret\n * from an unconfigured one. Render those; never infer configuration from the\n * `null` block.\n *\n * `GET /account/{accountId}/connectors/{connectorId}`\n */\n async retrieve(accountId: string, connectorId: string): Promise<ConnectorResponse> {\n return this.request(\n 'GET',\n `/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}`,\n );\n }\n\n /**\n * The merchant's connector accounts.\n *\n * Never wider than the caller: an API key pinned to one shop lists that\n * shop's connectors only, not every sibling shop's.\n *\n * `GET /account/{accountId}/connectors`\n */\n async list(accountId: string): Promise<ConnectorResponse[]> {\n return this.request('GET', `/account/${encodeURIComponent(accountId)}/connectors`);\n }\n\n /**\n * The profile-scoped connector list. The merchant-wide `list()` is\n * merchant-gated and 403s for a profile-entity (shop user) JWT; this\n * variant is scoped server-side to the caller's own profile.\n *\n * `GET /account/{accountId}/profile/connectors`\n */\n async listByProfile(accountId: string): Promise<ConnectorResponse[]> {\n return this.request('GET', `/account/${encodeURIComponent(accountId)}/profile/connectors`);\n }\n\n /**\n * Every connector's pane capabilities, as the router itself knows them —\n * which rails a connector supports, and which methods it can publish as a\n * pane with the confirm routing keys each one carries.\n *\n * Capability facts only: no label, sublabel or category comes back. A\n * designer renders a method's copy from its own locale files, keyed by\n * `key`, and takes `payment_method` / `payment_method_type` from here\n * verbatim rather than deriving them client-side.\n *\n * This is what the pane helpers in `src/panes.ts` should be driven from —\n * `paneMethodInfo`, `defaultPane` and `validatePanes` all take a\n * {@link PanesConnectorCatalog} out of this response, so a connector the\n * router starts publishing panes for needs no SDK release.\n *\n * `GET /account/{accountId}/connectors/native-panes/catalog`\n *\n * The path keeps the `native-panes` spelling deliberately. The identifiers\n * were renamed off \"native pane\"; the route was not, and pointing at the\n * backend's new name before it is deployed everywhere would both 404 against\n * un-upgraded replicas mid-rollout and fail `scripts/parity-check.mjs`,\n * which blocks publishing.\n */\n async getPanesCatalog(accountId: string): Promise<PanesCatalogResponse> {\n return this.request(\n 'GET',\n `/account/${encodeURIComponent(accountId)}/connectors/native-panes/catalog`,\n );\n }\n\n /** @deprecated Renamed to {@link getPanesCatalog}. Removed in 0.112.0. */\n async getNativePanesCatalog(accountId: string): Promise<PanesCatalogResponse> {\n return this.getPanesCatalog(accountId);\n }\n\n /**\n * Sweep the merchant's own e-Payouts module and return the rails it\n * actually has enabled. Server-side this makes many upstream calls, so it\n * can take several seconds — show progress.\n *\n * `POST /account/{accountId}/connectors/{connectorId}/epayouts/catalog/sync`\n */\n async syncEpayoutsCatalog(\n accountId: string,\n connectorId: string,\n ): Promise<EpayoutsCatalogResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}/epayouts/catalog/sync`,\n );\n }\n\n /**\n * Update a connector account.\n *\n * `connector_webhook_details` **merges** into the stored block key by key:\n * an absent key keeps its stored secret, an explicit value is written, and\n * an explicit empty string clears that secret. Send only the\n * keys the operator typed — padding the other environment's keys with `''`\n * clears a live signing secret and inbound webhooks stop verifying.\n *\n * The other credential-bearing fields — `connector_wallets_details`,\n * `pm_auth_config`, `additional_merchant_data` — are still whole-value\n * replacements: omit them unless you are writing a complete new value.\n *\n * `POST /account/{accountId}/connectors/{connectorId}`\n */\n async update(\n accountId: string,\n connectorId: string,\n params: ConnectorUpdateRequest,\n options?: RequestExtras,\n ): Promise<ConnectorResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}`,\n {\n body: params,\n ...options,\n },\n );\n }\n\n /**\n * Remove a connector account.\n *\n * A shop-scoped role may remove a connector of its own shop — the shop is\n * re-checked server-side — so creating processors and removing them are the\n * same rung of access rather than two.\n *\n * `DELETE /account/{accountId}/connectors/{connectorId}`\n */\n async delete(accountId: string, connectorId: string): Promise<ConnectorResponse> {\n return this.request(\n 'DELETE',\n `/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}`,\n );\n }\n\n /**\n * Clone a connector into another shop (business profile) of the same\n * merchant. `POST /account/{accountId}/connectors/{connectorId}/clone`\n *\n * Credentials are copied server-side, re-encrypted under the same merchant\n * key, so the caller never has to *supply* them — `retrieve` returns `null`\n * for the credential fields, which is what makes a client-side copy\n * impossible in the first place.\n *\n * The response, however, is the unredacted connector: `connector_account_details`\n * is masked, but `connector_webhook_details`, `connector_wallets_details`,\n * `pm_auth_config` and `additional_merchant_data` come back with the copied\n * secrets in them — values this caller never sent. Do not log or echo the\n * response; read `merchant_connector_id` and discard the rest.\n */\n async clone(\n accountId: string,\n connectorId: string,\n params: ConnectorCloneRequest,\n ): Promise<ConnectorResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}/clone`,\n { body: params },\n );\n }\n\n /**\n * Share a connector with more shops of the same merchant.\n * `POST /account/{accountId}/connectors/{connectorId}/shops`\n *\n * Nothing is copied: every shop sends payments to the same account, on the\n * same credentials and webhook, and the account's limits count them all.\n */\n async addShops(\n accountId: string,\n connectorId: string,\n params: ConnectorShopsAddRequest,\n ): Promise<ConnectorShopsResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}/shops`,\n { body: params },\n );\n }\n\n /**\n * Fold copies of the same provider account into this connector.\n * `POST /account/{accountId}/connectors/{connectorId}/consolidate`\n *\n * The copies' shops move to the connector with their on/off state, routing,\n * checkout layout, currencies, saved credentials, mandates and\n * subscriptions. A copy keeps answering for the payments made on it and\n * serves no shop. Send `dry_run: true` first, then confirm with the\n * preview's `preview_token` and a choice for every conflict.\n */\n async consolidate(\n accountId: string,\n connectorId: string,\n params: ConnectorConsolidationRequest,\n ): Promise<ConnectorConsolidationResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}/consolidate`,\n { body: params },\n );\n }\n\n /**\n * Switch a connector off, or back on, in one shop it serves.\n * `POST /account/{accountId}/connectors/{connectorId}/shops/{profileId}`\n */\n async setShopDisabled(\n accountId: string,\n connectorId: string,\n profileId: string,\n params: ConnectorShopUpdateRequest,\n ): Promise<ConnectorShopsResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}/shops/${encodeURIComponent(profileId)}`,\n { body: params },\n );\n }\n\n /**\n * Stop a connector serving one shop. Any shop may leave, the\n * one the connector was created in included, while another one stays: the\n * last shop is refused, and the connector is deleted instead. The account,\n * its limits and every other shop on it are unaffected.\n * `DELETE /account/{accountId}/connectors/{connectorId}/shops/{profileId}`\n */\n async removeShop(\n accountId: string,\n connectorId: string,\n profileId: string,\n ): Promise<ConnectorShopsResponse> {\n return this.request(\n 'DELETE',\n `/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}/shops/${encodeURIComponent(profileId)}`,\n );\n }\n\n /**\n * Read the transaction currencies a connector may process: its own list,\n * what the provider is known to accept with its methods, and the effective\n * currencies in each shop it serves.\n * `GET /account/{accountId}/connectors/{connectorId}/currencies`\n */\n async getCurrencies(\n accountId: string,\n connectorId: string,\n ): Promise<ConnectorCurrencyPolicyResponse> {\n return this.request(\n 'GET',\n `/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}/currencies`,\n );\n }\n\n /**\n * Set the transaction currencies a connector may process in every shop it\n * serves, and what it does with a payment in a currency it does not take\n * (`conversion`). `allowed_currencies: null` allows every currency the\n * provider supports; a field left out stays as it is. With `dry_run`,\n * nothing is saved and `impact` reports the effect.\n * `PUT /account/{accountId}/connectors/{connectorId}/currencies`\n */\n async setCurrencies(\n accountId: string,\n connectorId: string,\n params: ConnectorCurrencyPolicyUpdateRequest,\n ): Promise<ConnectorCurrencyPolicyResponse> {\n return this.request(\n 'PUT',\n `/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}/currencies`,\n { body: params },\n );\n }\n\n /**\n * Narrow a connector's currencies in one shop it serves, within the\n * connector's own list, or set the shop's own `conversion`. `null` returns\n * the shop to the connector's setting; a field left out stays as it is.\n * `PUT /account/{accountId}/connectors/{connectorId}/shops/{profileId}/currencies`\n */\n async setShopCurrencies(\n accountId: string,\n connectorId: string,\n profileId: string,\n params: ConnectorCurrencyPolicyUpdateRequest,\n ): Promise<ConnectorCurrencyPolicyResponse> {\n return this.request(\n 'PUT',\n `/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}/shops/${encodeURIComponent(profileId)}/currencies`,\n { body: params },\n );\n }\n\n // --- Advanced operations (Task 4.8) ---\n\n /**\n * Run the configuration checks for a vault (VGS) connector account:\n * credential validity, write-only Collect scope, reachability, environment\n * coherence, route coverage. Read-only but not cheap — it decrypts the\n * vault's management credential and talks to VGS.\n *\n * `POST /account/{accountId}/connectors/{connectorId}/vault/verify`\n */\n async verifyVault(\n accountId: string,\n connectorId: string,\n params: VaultVerifyRequest,\n ): Promise<VaultVerificationResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}/vault/verify`,\n { body: params },\n );\n }\n\n /**\n * The shops whose card vault is switched on and whose vault account has\n * stopped working, each with the cause. While a shop is listed, its card\n * form cannot be shown and its card payments fail.\n *\n * An outage is listed once the vault has refused the account several times\n * in a row over at least a minute, and is taken off the list when the vault\n * serves the account again. Nothing switches a vault off by itself: see\n * `profiles.switchVaultOff`.\n *\n * `GET /account/{accountId}/vault/outages`\n */\n async listVaultOutages(accountId: string): Promise<VaultOutagesResponse> {\n return this.request('GET', `/account/${encodeURIComponent(accountId)}/vault/outages`);\n }\n\n /**\n * Compute the route document the vault SHOULD have and diff it against\n * what exists, without writing anything. The returned fingerprints must be\n * echoed byte for byte on {@link Connectors.applyVaultRoutes}.\n *\n * A router without these endpoints answers 404 — render that as \"this\n * build cannot configure routes\", never as \"there is nothing to change\".\n *\n * `POST /account/{accountId}/connectors/{connectorId}/vault/routes/preview`\n */\n async previewVaultRoutes(\n accountId: string,\n connectorId: string,\n params: VaultRoutesPreviewRequest,\n ): Promise<VaultRoutesPreviewResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}/vault/routes/preview`,\n { body: params },\n );\n }\n\n /**\n * Write the routes the merchant just previewed. Both fingerprints come\n * from the preview and are opaque: `expected_current_fingerprint` says the\n * vault has not moved (`null` = \"the preview found no routes\" and is sent\n * as `null`, never omitted), `expected_desired_fingerprint` says the\n * document is still the one on screen. A 409 (`DE_04`) means the vault\n * changed since the preview — nothing was written; preview again.\n *\n * `POST /account/{accountId}/connectors/{connectorId}/vault/routes/apply`\n */\n async applyVaultRoutes(\n accountId: string,\n connectorId: string,\n params: VaultRoutesApplyRequest,\n ): Promise<VaultRoutesApplyResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}/vault/routes/apply`,\n { body: params },\n );\n }\n\n /**\n * What the processor says about this connector account: whether it will\n * accept charges, which capabilities are live, and anything it is still\n * waiting on.\n *\n * This is **not** {@link Connectors.verify}. That one asks whether the stored\n * credentials work, by running a test-card authorization; a processor can\n * revoke an account's ability to take payments while the credentials stay\n * perfectly valid, and then a credential check reports healthy while every\n * checkout silently stalls. This asks the account's own status instead, and\n * does not create a payment. By default it reads a scheduler snapshot;\n * `refresh: true` asks for a new probe and `stale` identifies an overdue result.\n * `test_mode` selects the requested environment; `credential_source` identifies\n * a sandbox, live or shared credential set. Not every provider reports chargeability.\n *\n * Connectors with no probe answer `state: 'unknown'` with\n * `unknown_reason: 'connector_not_supported'`, rather than an error — every\n * `'unknown'` carries a reason code you render your own words for. A router\n * without this endpoint answers 404 — render that as \"this build cannot\n * report health\", never as \"healthy\".\n *\n * `GET /account/{accountId}/connectors/{connectorId}/health`\n */\n async health(\n accountId: string,\n connectorId: string,\n options?: { test_mode?: boolean; refresh?: boolean },\n ): Promise<ConnectorHealthResponse> {\n return this.request(\n 'GET',\n `/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}/health`,\n { query: options },\n );\n }\n\n /** Verify connector credentials. `POST /account/connectors/verify` */\n async verify(params: Record<string, unknown>): Promise<Record<string, unknown>> {\n return this.request('POST', '/account/connectors/verify', { body: params });\n }\n\n /**\n * Register a webhook for a connector.\n * `POST /account/{merchantId}/connectors/webhooks/{connectorId}`\n *\n * @param params - Optional event scope. Defaults to `{ event_type: 'all_events' }`\n * when omitted; pass `{ event_type: { specific_event: '…' } }` to scope\n * to a single event.\n */\n async registerWebhook(\n merchantId: string,\n connectorId: string,\n params?: ConnectorWebhookRegisterRequest,\n ): Promise<ConnectorWebhookRegisterResponse> {\n const path = `/account/${encodeURIComponent(merchantId)}/connectors/webhooks/${encodeURIComponent(connectorId)}`;\n if (params === undefined) return this.request('POST', path);\n return this.request('POST', path, { body: params });\n }\n\n /**\n * Register checkout/shop domains as Stripe payment method domains, so Apple\n * Pay renders on those pages.\n * `POST /account/{merchantId}/connectors/{connectorId}/stripe/payment-method-domains`\n *\n * Stripe connectors only. One call registers against a single credential set\n * (`environment`, default `'live'`) — call twice to cover live and sandbox.\n * Per-URL outcomes come back in `results`; a missing sandbox credential set\n * is a request-level 400.\n */\n async registerStripePaymentMethodDomains(\n merchantId: string,\n connectorId: string,\n params: StripePaymentMethodDomainsRegisterRequest,\n ): Promise<StripePaymentMethodDomainsRegisterResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(merchantId)}/connectors/${encodeURIComponent(connectorId)}/stripe/payment-method-domains`,\n { body: params },\n );\n }\n\n /**\n * Register checkout/shop domains as Airwallex Apple Pay domains, so Apple Pay\n * renders on those pages.\n * `POST /account/{merchantId}/connectors/{connectorId}/airwallex/apple-pay-domains`\n *\n * Airwallex connectors only. One call registers against a single credential\n * set (`environment`, default `'live'`) — call twice to cover live and\n * sandbox. Idempotent: a host already on the account comes back\n * `already_registered` without a write.\n */\n async registerAirwallexApplePayDomains(\n merchantId: string,\n connectorId: string,\n params: AirwallexApplePayDomainsRegisterRequest,\n ): Promise<AirwallexApplePayDomainsRegisterResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(merchantId)}/connectors/${encodeURIComponent(connectorId)}/airwallex/apple-pay-domains`,\n { body: params },\n );\n }\n\n /**\n * Register and verify checkout/shop domains as Whop Apple Pay payment method\n * domains, so Apple Pay renders in Whop's embedded card form on those pages.\n * `POST /account/{merchantId}/connectors/{connectorId}/whop/apple-pay-domains`\n *\n * Whop connectors only. One call registers against a single credential set\n * (`environment`, default `'live'`) — call twice to cover live and sandbox.\n * Idempotent: a host Whop already holds as verified comes back\n * `already_verified` without a write, and a `pending` one is verified again.\n */\n async registerWhopApplePayDomains(\n merchantId: string,\n connectorId: string,\n params: WhopApplePayDomainsRegisterRequest,\n ): Promise<WhopApplePayDomainsRegisterResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(merchantId)}/connectors/${encodeURIComponent(connectorId)}/whop/apple-pay-domains`,\n { body: params },\n );\n }\n\n /**\n * The account's Apple Pay registration on every checkout address, per key\n * set: `registered`, `failed` (with why), `skipped` (the address serves\n * another processor's file), `pending` (the address is not ready yet),\n * `not_attempted`, or for PayPal `manual_pending` / `manual_done`.\n * `GET /account/{merchantId}/connectors/{connectorId}/apple-pay-registrations`\n */\n async applePayRegistrations(\n merchantId: string,\n connectorId: string,\n ): Promise<ApplePayRegistrationList> {\n return this.request(\n 'GET',\n `/account/${encodeURIComponent(merchantId)}/connectors/${encodeURIComponent(connectorId)}/apple-pay-registrations`,\n );\n }\n\n /**\n * Register the account on every ready checkout address whose Apple Pay file\n * serves its processor again, for one key set or both. Answers the list as\n * it stands afterwards.\n * `POST /account/{merchantId}/connectors/{connectorId}/apple-pay-registrations/retry`\n */\n async retryApplePayRegistrations(\n merchantId: string,\n connectorId: string,\n params: ApplePayRegistrationRetryRequest = {},\n ): Promise<ApplePayRegistrationList> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(merchantId)}/connectors/${encodeURIComponent(connectorId)}/apple-pay-registrations/retry`,\n { body: params },\n );\n }\n\n /**\n * Mark a checkout address registered (or not) for one key set, for a\n * processor without a registration API (PayPal). A reminder for the team:\n * nothing is checked with the processor. Refused for other processors.\n * `PUT /account/{merchantId}/connectors/{connectorId}/apple-pay-registrations/{hostId}/mark`\n */\n async markApplePayRegistration(\n merchantId: string,\n connectorId: string,\n hostId: string,\n params: ApplePayRegistrationMarkRequest,\n ): Promise<ApplePayRegistrationList> {\n return this.request(\n 'PUT',\n `/account/${encodeURIComponent(merchantId)}/connectors/${encodeURIComponent(connectorId)}/apple-pay-registrations/${encodeURIComponent(hostId)}/mark`,\n { body: params },\n );\n }\n\n /** Get registered webhooks for a connector. `GET /account/{merchantId}/connectors/webhooks/{connectorId}` */\n async getWebhook(merchantId: string, connectorId: string): Promise<ConnectorWebhookListResponse> {\n return this.request(\n 'GET',\n `/account/${encodeURIComponent(merchantId)}/connectors/webhooks/${encodeURIComponent(connectorId)}`,\n );\n }\n\n /**\n * Bring an already-registered webhook's event subscription up to date with\n * the events Delopay handles.\n * `POST /account/{merchantId}/connectors/webhooks/{connectorId}/sync-events`\n *\n * A PSP freezes an endpoint's event list at registration time, so an endpoint\n * created before an event type was added never receives it — silently, with\n * no error anywhere. {@link getWebhook} reports the gap as `missing_events`;\n * this repairs it.\n *\n * Unlike re-registering, the endpoints are updated in place: the endpoint id\n * and its signing secret are preserved, so signature verification keeps\n * working across the change. Stripe connectors only; idempotent, so it is\n * safe to call on a schedule or after every deploy.\n *\n * @example\n * ```typescript\n * const sync = await delopay.connectors.syncWebhookEvents('mer_abc', 'mca_xyz');\n * for (const endpoint of sync.endpoints) {\n * if (endpoint.error_message) console.warn(endpoint.connector_webhook_id, endpoint.error_message);\n * else if (endpoint.updated) console.log('subscribed', endpoint.added_events);\n * }\n * ```\n */\n async syncWebhookEvents(\n merchantId: string,\n connectorId: string,\n ): Promise<ConnectorWebhookSyncResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(merchantId)}/connectors/webhooks/${encodeURIComponent(connectorId)}/sync-events`,\n );\n }\n\n /**\n * Read the callback addresses of a connector's payment provider.\n * `GET /account/{merchantId}/connectors/webhooks/{connectorId}/address`\n *\n * One entry per environment: the saved mode and identifier, and for every\n * credential group the URL the policy asks for (`desired_url`) beside the URL\n * actually registered at the provider (`registered_url`) with its `status`.\n * Only `registered` means the provider delivers to the desired URL.\n *\n * Available for providers whose webhooks Delopay manages (Stripe, PayPal,\n * Airwallex, Whop) and for hand-configured ones (Creem, NomuPay,\n * MicroPayment). Other connectors are refused with a 400.\n */\n async getWebhookAddress(\n merchantId: string,\n connectorId: string,\n ): Promise<WebhookAddressResponse> {\n return this.request(\n 'GET',\n `/account/${encodeURIComponent(merchantId)}/connectors/webhooks/${encodeURIComponent(connectorId)}/address`,\n );\n }\n\n /**\n * Validate a proposed callback address without saving it.\n * `POST /account/{merchantId}/connectors/webhooks/{connectorId}/address/preview`\n *\n * Returns the validation errors as `{ field, code }` pairs, the URL every\n * affected credential group would get, the connector accounts that share it,\n * and whether saving needs `confirm_shared: true`. Needs the same permission\n * as saving.\n *\n * @example\n * ```typescript\n * const preview = await delopay.connectors.previewWebhookAddress('mer_abc', 'mca_xyz', {\n * environment: 'live',\n * mode: 'anonymous',\n * format: { prefix: 'wh-', style: 'alphanumeric', length: 16 },\n * });\n * if (!preview.valid) console.warn(preview.errors);\n * ```\n */\n async previewWebhookAddress(\n merchantId: string,\n connectorId: string,\n params: WebhookAddressRequest,\n ): Promise<WebhookAddressPreviewResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(merchantId)}/connectors/webhooks/${encodeURIComponent(connectorId)}/address/preview`,\n { body: params },\n );\n }\n\n /**\n * Save the callback address of a connector's payment provider for one\n * environment.\n * `PUT /account/{merchantId}/connectors/webhooks/{connectorId}/address`\n *\n * The address applies to every connector account of that provider and\n * environment, so `confirm_shared: true` is required when other accounts are\n * affected. For a managed provider Delopay then registers the new URL and\n * keeps the former one accepted; the response reports each credential\n * group's outcome in `status`. A `pending` or `failed` group keeps receiving\n * on its previous URL and is retried. For a hand-configured provider the\n * merchant enters the new `desired_url` at the provider.\n *\n * A refused proposal answers 422 with error code `IR_06` and the message\n * `Webhook address refused: field:code,…`. A save that lost to a concurrent\n * change of the same address answers 422 with error code `HE_00` and can be\n * repeated. A caller who may not edit every affected account answers 403.\n * Address changes are limited per provider and environment (`rate_limit`).\n */\n async updateWebhookAddress(\n merchantId: string,\n connectorId: string,\n params: WebhookAddressRequest,\n ): Promise<WebhookAddressResponse> {\n return this.request(\n 'PUT',\n `/account/${encodeURIComponent(merchantId)}/connectors/webhooks/${encodeURIComponent(connectorId)}/address`,\n { body: params },\n );\n }\n\n /**\n * Read how the return addresses of a connector's payment provider name the\n * merchant, per environment.\n * `GET /account/{merchantId}/connectors/{connectorId}/return-address`\n *\n * A return address is where the provider sends the buyer back after a step\n * it hosts. It belongs to the merchant, the provider and the environment,\n * so every connector account of that provider follows it.\n */\n async getReturnAddress(merchantId: string, connectorId: string): Promise<ReturnAddressResponse> {\n return this.request(\n 'GET',\n `/account/${encodeURIComponent(merchantId)}/connectors/${encodeURIComponent(connectorId)}/return-address`,\n );\n }\n\n /**\n * Validate a proposed return address without saving it.\n * `POST /account/{merchantId}/connectors/{connectorId}/return-address/preview`\n *\n * Nothing is reserved: a generated identifier in the answer is an example.\n * Needs the same permission as saving.\n *\n * @example\n * ```typescript\n * const preview = await delopay.connectors.previewReturnAddress('mer_abc', 'mca_xyz', {\n * environment: 'live',\n * mode: 'anonymous',\n * share_webhook_identifier: true,\n * });\n * if (!preview.valid) console.warn(preview.errors);\n * ```\n */\n async previewReturnAddress(\n merchantId: string,\n connectorId: string,\n params: ReturnAddressRequest,\n ): Promise<ReturnAddressPreviewResponse> {\n return this.request(\n 'POST',\n `/account/${encodeURIComponent(merchantId)}/connectors/${encodeURIComponent(connectorId)}/return-address/preview`,\n { body: params },\n );\n }\n\n /**\n * Save the return address of a connector's payment provider for one\n * environment.\n * `PUT /account/{merchantId}/connectors/{connectorId}/return-address`\n *\n * Payments started afterwards get return addresses of the new form; every\n * address already handed to the provider keeps working. A refused proposal\n * answers 422 with error code `IR_06` and the message\n * `Return address refused: field:code,…`. A caller who may not edit every\n * connector account of the provider answers 403. Address changes are\n * limited per provider and environment (`rate_limit`).\n */\n async updateReturnAddress(\n merchantId: string,\n connectorId: string,\n params: ReturnAddressRequest,\n ): Promise<ReturnAddressResponse> {\n return this.request(\n 'PUT',\n `/account/${encodeURIComponent(merchantId)}/connectors/${encodeURIComponent(connectorId)}/return-address`,\n { body: params },\n );\n }\n\n /**\n * Every webhook the connector's payment provider lists for its credentials\n * in one environment: Delopay's own, other connector accounts', former\n * addresses' and other integrations'.\n * `GET /account/{merchantId}/connectors/webhooks/{connectorId}/provider`\n *\n * Available for Stripe, PayPal, Airwallex, Whop and Adyen. Destinations are\n * masked; `capabilities` says which changes the provider allows and\n * `editable` whether the caller may make them.\n */\n async listProviderWebhooks(\n merchantId: string,\n connectorId: string,\n environment: WebhookRegistrationEnvironment,\n ): Promise<ProviderWebhookListResponse> {\n return this.request('GET', providerWebhooksPath(merchantId, connectorId), {\n query: { environment },\n });\n }\n\n /**\n * Create a webhook at the provider for the merchant's own systems.\n * `POST /account/{merchantId}/connectors/webhooks/{connectorId}/provider`\n *\n * The URL must be `https` and outside Delopay; Delopay's own webhook is\n * registered with `registerWebhook`. A returned `signing_secret` is not kept\n * by Delopay and cannot be read again.\n */\n async createProviderWebhook(\n merchantId: string,\n connectorId: string,\n params: ProviderWebhookCreateRequest,\n ): Promise<ProviderWebhookCreateResponse> {\n return this.request('POST', providerWebhooksPath(merchantId, connectorId), { body: params });\n }\n\n /**\n * Change one webhook at the provider.\n * `PATCH /account/{merchantId}/connectors/webhooks/{connectorId}/provider/{webhookId}`\n *\n * Refused once the webhook changed since `fingerprint`, and for Delopay's\n * own webhooks.\n */\n async updateProviderWebhook(\n merchantId: string,\n connectorId: string,\n webhookId: string,\n params: ProviderWebhookUpdateRequest,\n ): Promise<ProviderWebhookEndpoint> {\n return this.request(\n 'PATCH',\n `${providerWebhooksPath(merchantId, connectorId)}/${encodeURIComponent(webhookId)}`,\n { body: params },\n );\n }\n\n /**\n * Delete one webhook at the provider.\n * `POST /account/{merchantId}/connectors/webhooks/{connectorId}/provider/{webhookId}/delete`\n *\n * Refused once the webhook changed since `fingerprint`. Deleting Delopay's\n * own webhook needs `confirm_managed: true`; another connector account's is\n * never deleted from here.\n */\n async deleteProviderWebhook(\n merchantId: string,\n connectorId: string,\n webhookId: string,\n params: ProviderWebhookDeleteRequest,\n ): Promise<ProviderWebhookDeleteResult> {\n return this.request(\n 'POST',\n `${providerWebhooksPath(merchantId, connectorId)}/${encodeURIComponent(webhookId)}/delete`,\n { body: params },\n );\n }\n\n /**\n * What \"replace all\" would delete and keep. Nothing is changed.\n * `GET /account/{merchantId}/connectors/webhooks/{connectorId}/provider/replace`\n */\n async previewProviderWebhookReplace(\n merchantId: string,\n connectorId: string,\n environment: WebhookRegistrationEnvironment,\n ): Promise<ProviderWebhookReplacePreviewResponse> {\n return this.request('GET', `${providerWebhooksPath(merchantId, connectorId)}/replace`, {\n query: { environment },\n });\n }\n\n /**\n * Keep only Delopay's webhook: delete exactly the confirmed webhooks of the\n * preview, after registering Delopay's own unless `sequence` is\n * `delete_first`.\n * `POST /account/{merchantId}/connectors/webhooks/{connectorId}/provider/replace`\n *\n * A list that changed since the preview answers `scope_changed` and deletes\n * nothing. A second replacement while one runs is refused as busy (`HE_00`).\n */\n async replaceProviderWebhooks(\n merchantId: string,\n connectorId: string,\n params: ProviderWebhookReplaceRequest,\n ): Promise<ProviderWebhookReplaceResponse> {\n return this.request('POST', `${providerWebhooksPath(merchantId, connectorId)}/replace`, {\n body: params,\n });\n }\n\n /** List available payment methods. `GET /account/payment-methods` */\n async listPaymentMethods(): Promise<Record<string, unknown>[]> {\n return this.request('GET', '/account/payment-methods');\n }\n}\n\nfunction providerWebhooksPath(merchantId: string, connectorId: string): string {\n return `/account/${encodeURIComponent(merchantId)}/connectors/webhooks/${encodeURIComponent(connectorId)}/provider`;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/skyline/Programming/delopay/delopay-typescript-sdk/dist/chunk-K5Q2H3VD.cjs","../src/internal/resources/adminSupport.ts"],"names":[],"mappings":"AAAA;AACE;AACF,wDAA6B;AAC7B;AACA;ACeA,IAAM,KAAA,EAAO,CAAC,EAAA,EAAA,GACZ,CAAA,oCAAA,EAAuC,kBAAA,CAAmB,EAAE,CAAC,CAAA,CAAA;AAGrC;AACyB,EAAA;AAApB,IAAA;AAAqB,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAO+B,EAAA;AACb,IAAA;AACX,MAAA;AACtD,IAAA;AACH,EAAA;AAAA;AAAA;AAAA;AAAA;AAM0F,EAAA;AACb,IAAA;AAC7E,EAAA;AAAA;AAAA;AAAA;AAAA;AAM+E,EAAA;AACA,IAAA;AAC/E,EAAA;AAAA;AAGkE,EAAA;AAC7B,IAAA;AACrC,EAAA;AAAA;AAG0F,EAAA;AACzC,IAAA;AACjD,EAAA;AAAA;AAGsF,EAAA;AACjC,IAAA;AACG,MAAA;AACrD,IAAA;AACH,EAAA;AAAA;AAGsF,EAAA;AACxB,IAAA;AAC9D,EAAA;AAAA;AAAA;AAAA;AAAA;AAWkC,EAAA;AACN,IAAA;AACoB,IAAA;AACM,IAAA;AACb,IAAA;AAC8B,IAAA;AACvE,EAAA;AAAA;AAAA;AAAA;AAAA;AAMoE,EAAA;AACO,IAAA;AACzD,MAAA;AACf,IAAA;AACH,EAAA;AAAA;AAAA;AAAA;AAAA;AAMkE,EAAA;AAClB,IAAA;AAChD,EAAA;AACF;AD7BiF;AACA;AACA;AACA","file":"/Users/skyline/Programming/delopay/delopay-typescript-sdk/dist/chunk-K5Q2H3VD.cjs","sourcesContent":[null,"import type { RequestFn } from '../../client';\nimport type {\n SupportAttachmentView,\n SupportMessageList,\n SupportMessagesQuery,\n SupportMessageView,\n} from '../../types';\nimport type {\n SupportRecipientList,\n SupportRecipientsQuery,\n SupportStaffConversationCreate,\n SupportStaffConversationList,\n SupportStaffConversationView,\n SupportStaffListQuery,\n SupportStaffMessageCreate,\n SupportStaffUpdate,\n} from '../types';\nimport { csvQuery } from '../../listQuery';\n\nconst path = (id: string): string =>\n `/admin-portal/support/conversations/${encodeURIComponent(id)}`;\n\n/** DeloPay's support queue, across merchants. Answers 404 while support is not available. */\nexport class AdminSupport {\n constructor(private readonly request: RequestFn) {}\n\n /**\n * The queue, the latest message first unless `sort_by` says otherwise.\n * Several `kind`, `category` or `status` values match a conversation with\n * any of them. `GET /admin-portal/support/conversations`\n */\n async list(query?: SupportStaffListQuery): Promise<SupportStaffConversationList> {\n return this.request('GET', '/admin-portal/support/conversations', {\n query: csvQuery(query, ['kind', 'category', 'status']),\n });\n }\n\n /**\n * Open a conversation towards a merchant, one of its shops or one of its members,\n * with a first message from the support team. `POST /admin-portal/support/conversations`\n */\n async create(body: SupportStaffConversationCreate): Promise<SupportStaffConversationView> {\n return this.request('POST', '/admin-portal/support/conversations', { body });\n }\n\n /**\n * The members of a merchant a message can be addressed to, with whether their role\n * opens the support page. `GET /admin-portal/support/recipients`\n */\n async recipients(query: SupportRecipientsQuery): Promise<SupportRecipientList> {\n return this.request('GET', '/admin-portal/support/recipients', { query: { ...query } });\n }\n\n /** One conversation. `GET /admin-portal/support/conversations/{id}` */\n async retrieve(id: string): Promise<SupportStaffConversationView> {\n return this.request('GET', path(id));\n }\n\n /** Change status, kind, category or assignee. `PATCH /admin-portal/support/conversations/{id}` */\n async update(id: string, body: SupportStaffUpdate): Promise<SupportStaffConversationView> {\n return this.request('PATCH', path(id), { body });\n }\n\n /** Messages, notes included. `GET /admin-portal/support/conversations/{id}/messages` */\n async messages(id: string, query?: SupportMessagesQuery): Promise<SupportMessageList> {\n return this.request('GET', `${path(id)}/messages`, {\n query: query === undefined ? undefined : { ...query },\n });\n }\n\n /** Answer, or leave a note. `POST /admin-portal/support/conversations/{id}/messages` */\n async reply(id: string, body: SupportStaffMessageCreate): Promise<SupportMessageView> {\n return this.request('POST', `${path(id)}/messages`, { body });\n }\n\n /**\n * Upload a file for a message from staff, scanned like a merchant's.\n * `POST /admin-portal/support/conversations/{id}/attachments`\n */\n async uploadAttachment(\n id: string,\n file: Blob,\n clientUploadId: string,\n fileName?: string,\n ): Promise<SupportAttachmentView> {\n const form = new FormData();\n form.append('client_upload_id', clientUploadId);\n if (fileName === undefined) form.append('file', file);\n else form.append('file', file, fileName);\n return this.request('POST', `${path(id)}/attachments`, { body: form });\n }\n\n /**\n * Fetch a file once its scan is clean. A blocked file stays shut for staff too.\n * `GET /admin-portal/support/conversations/{id}/attachments/{fileId}`\n */\n async downloadAttachment(id: string, fileId: string): Promise<Blob> {\n return this.request('GET', `${path(id)}/attachments/${encodeURIComponent(fileId)}`, {\n responseType: 'blob',\n });\n }\n\n /**\n * Clear the staff unread mark and read the conversation as it is now.\n * `POST /admin-portal/support/conversations/{id}/read`\n */\n async markRead(id: string): Promise<SupportStaffConversationView> {\n return this.request('POST', `${path(id)}/read`);\n }\n}\n"]}
1
+ {"version":3,"sources":["/home/jonathan/Desktop/DeloPay/dev1/delopay-typescript-sdk/dist/chunk-K5Q2H3VD.cjs","../src/internal/resources/adminSupport.ts"],"names":[],"mappings":"AAAA;AACE;AACF,wDAA6B;AAC7B;AACA;ACeA,IAAM,KAAA,EAAO,CAAC,EAAA,EAAA,GACZ,CAAA,oCAAA,EAAuC,kBAAA,CAAmB,EAAE,CAAC,CAAA,CAAA;AAGrC;AACyB,EAAA;AAApB,IAAA;AAAqB,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAO+B,EAAA;AACb,IAAA;AACX,MAAA;AACtD,IAAA;AACH,EAAA;AAAA;AAAA;AAAA;AAAA;AAM0F,EAAA;AACb,IAAA;AAC7E,EAAA;AAAA;AAAA;AAAA;AAAA;AAM+E,EAAA;AACA,IAAA;AAC/E,EAAA;AAAA;AAGkE,EAAA;AAC7B,IAAA;AACrC,EAAA;AAAA;AAG0F,EAAA;AACzC,IAAA;AACjD,EAAA;AAAA;AAGsF,EAAA;AACjC,IAAA;AACG,MAAA;AACrD,IAAA;AACH,EAAA;AAAA;AAGsF,EAAA;AACxB,IAAA;AAC9D,EAAA;AAAA;AAAA;AAAA;AAAA;AAWkC,EAAA;AACN,IAAA;AACoB,IAAA;AACM,IAAA;AACb,IAAA;AAC8B,IAAA;AACvE,EAAA;AAAA;AAAA;AAAA;AAAA;AAMoE,EAAA;AACO,IAAA;AACzD,MAAA;AACf,IAAA;AACH,EAAA;AAAA;AAAA;AAAA;AAAA;AAMkE,EAAA;AAClB,IAAA;AAChD,EAAA;AACF;AD7BiF;AACA;AACA;AACA","file":"/home/jonathan/Desktop/DeloPay/dev1/delopay-typescript-sdk/dist/chunk-K5Q2H3VD.cjs","sourcesContent":[null,"import type { RequestFn } from '../../client';\nimport type {\n SupportAttachmentView,\n SupportMessageList,\n SupportMessagesQuery,\n SupportMessageView,\n} from '../../types';\nimport type {\n SupportRecipientList,\n SupportRecipientsQuery,\n SupportStaffConversationCreate,\n SupportStaffConversationList,\n SupportStaffConversationView,\n SupportStaffListQuery,\n SupportStaffMessageCreate,\n SupportStaffUpdate,\n} from '../types';\nimport { csvQuery } from '../../listQuery';\n\nconst path = (id: string): string =>\n `/admin-portal/support/conversations/${encodeURIComponent(id)}`;\n\n/** DeloPay's support queue, across merchants. Answers 404 while support is not available. */\nexport class AdminSupport {\n constructor(private readonly request: RequestFn) {}\n\n /**\n * The queue, the latest message first unless `sort_by` says otherwise.\n * Several `kind`, `category` or `status` values match a conversation with\n * any of them. `GET /admin-portal/support/conversations`\n */\n async list(query?: SupportStaffListQuery): Promise<SupportStaffConversationList> {\n return this.request('GET', '/admin-portal/support/conversations', {\n query: csvQuery(query, ['kind', 'category', 'status']),\n });\n }\n\n /**\n * Open a conversation towards a merchant, one of its shops or one of its members,\n * with a first message from the support team. `POST /admin-portal/support/conversations`\n */\n async create(body: SupportStaffConversationCreate): Promise<SupportStaffConversationView> {\n return this.request('POST', '/admin-portal/support/conversations', { body });\n }\n\n /**\n * The members of a merchant a message can be addressed to, with whether their role\n * opens the support page. `GET /admin-portal/support/recipients`\n */\n async recipients(query: SupportRecipientsQuery): Promise<SupportRecipientList> {\n return this.request('GET', '/admin-portal/support/recipients', { query: { ...query } });\n }\n\n /** One conversation. `GET /admin-portal/support/conversations/{id}` */\n async retrieve(id: string): Promise<SupportStaffConversationView> {\n return this.request('GET', path(id));\n }\n\n /** Change status, kind, category or assignee. `PATCH /admin-portal/support/conversations/{id}` */\n async update(id: string, body: SupportStaffUpdate): Promise<SupportStaffConversationView> {\n return this.request('PATCH', path(id), { body });\n }\n\n /** Messages, notes included. `GET /admin-portal/support/conversations/{id}/messages` */\n async messages(id: string, query?: SupportMessagesQuery): Promise<SupportMessageList> {\n return this.request('GET', `${path(id)}/messages`, {\n query: query === undefined ? undefined : { ...query },\n });\n }\n\n /** Answer, or leave a note. `POST /admin-portal/support/conversations/{id}/messages` */\n async reply(id: string, body: SupportStaffMessageCreate): Promise<SupportMessageView> {\n return this.request('POST', `${path(id)}/messages`, { body });\n }\n\n /**\n * Upload a file for a message from staff, scanned like a merchant's.\n * `POST /admin-portal/support/conversations/{id}/attachments`\n */\n async uploadAttachment(\n id: string,\n file: Blob,\n clientUploadId: string,\n fileName?: string,\n ): Promise<SupportAttachmentView> {\n const form = new FormData();\n form.append('client_upload_id', clientUploadId);\n if (fileName === undefined) form.append('file', file);\n else form.append('file', file, fileName);\n return this.request('POST', `${path(id)}/attachments`, { body: form });\n }\n\n /**\n * Fetch a file once its scan is clean. A blocked file stays shut for staff too.\n * `GET /admin-portal/support/conversations/{id}/attachments/{fileId}`\n */\n async downloadAttachment(id: string, fileId: string): Promise<Blob> {\n return this.request('GET', `${path(id)}/attachments/${encodeURIComponent(fileId)}`, {\n responseType: 'blob',\n });\n }\n\n /**\n * Clear the staff unread mark and read the conversation as it is now.\n * `POST /admin-portal/support/conversations/{id}/read`\n */\n async markRead(id: string): Promise<SupportStaffConversationView> {\n return this.request('POST', `${path(id)}/read`);\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/skyline/Programming/delopay/delopay-typescript-sdk/dist/chunk-KD5Y2YWK.cjs","../src/recordCounter.ts"],"names":[],"mappings":"AAAA;ACgBA,IAAM,GAAA,EAAK,EAAA;AACX,IAAM,GAAA,EAAK,EAAA;AACX,IAAM,MAAA,EAAQ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EA,IAAI,OAAA,CAAA,EAAkB;AACpB,IAAA,OAAO,IAAA,CAAK,KAAA;AAAA,EACd;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,IAAI,QAAA,CAAA,EAAoB;AACtB,IAAA,OAAO,IAAA,CAAK,MAAA,IAAU,MAAA;AAAA,EACxB;AAAA,EAEA,MAAA,CAAA,EAAiB;AACf,IAAA,OAAO,IAAA,CAAK,KAAA;AAAA,EACd;AACF,CAAA;AD/DA;AACA;AACE;AACA;AACF,qGAAC","file":"/Users/skyline/Programming/delopay/delopay-typescript-sdk/dist/chunk-KD5Y2YWK.cjs","sourcesContent":[null,"/**\n * Incremental record counters for streamed export bodies.\n *\n * An export streams its body and announces, in `X-Delopay-Record-Count`, how\n * many records that body will hold. These count the records actually received,\n * chunk by chunk, so a download can show `receivedRecords` of\n * `expectedRecords` while it runs and the finished file can be held to the\n * announced figure.\n *\n * They work on **bytes**, never on decoded text. Every character they look at —\n * `\"` `\\` `{` `}` `[` `]` and the line break — is ASCII, and no byte of a\n * multi-byte UTF-8 sequence falls in the ASCII range, so a chunk boundary can\n * land anywhere, the middle of a character included, without a decoder having\n * to carry a partial sequence across it.\n */\n\nconst LF = 0x0a;\nconst CR = 0x0d;\nconst QUOTE = 0x22;\nconst BACKSLASH = 0x5c;\nconst OPEN_BRACE = 0x7b;\nconst CLOSE_BRACE = 0x7d;\nconst OPEN_BRACKET = 0x5b;\nconst CLOSE_BRACKET = 0x5d;\n\n/** Counts the records in a body fed to it one chunk at a time. */\nexport interface RecordCounter {\n /** Feed the next chunk of the body, in order. */\n push(chunk: Uint8Array): void;\n /** Records complete in what has been fed so far. */\n readonly records: number;\n /**\n * Whether what has been fed ends where a whole export body ends. A body\n * that stops anywhere else was cut off, whatever its record count says.\n */\n readonly complete: boolean;\n /** Records in the body, once it has ended. Does not change the counter. */\n finish(): number;\n}\n\n/**\n * RFC 4180 CSV with a header line: one record per line, where a field holding\n * `,` `\"` or a line break is quoted and a quote inside it is doubled.\n *\n * A newline inside quotes is part of a field, not the end of a record, so every\n * `\"` toggles \"inside quotes\". A doubled `\"\"` toggles twice and leaves it as it\n * was, which is exactly its meaning. Records are the newlines outside quotes,\n * less one for the header.\n */\nexport class CsvRecordCounter implements RecordCounter {\n private inQuotes = false;\n private newlines = 0;\n /** Whether anything but a line break has arrived since the last newline. */\n private lineHasContent = false;\n\n push(chunk: Uint8Array): void {\n let inQuotes = this.inQuotes;\n let newlines = this.newlines;\n let lineHasContent = this.lineHasContent;\n for (const byte of chunk) {\n if (byte === QUOTE) {\n inQuotes = !inQuotes;\n lineHasContent = true;\n } else if (inQuotes) {\n lineHasContent = true;\n } else if (byte === LF) {\n newlines++;\n lineHasContent = false;\n } else if (byte !== CR) {\n lineHasContent = true;\n }\n }\n this.inQuotes = inQuotes;\n this.newlines = newlines;\n this.lineHasContent = lineHasContent;\n }\n\n get records(): number {\n return Math.max(0, this.newlines - 1);\n }\n\n /**\n * The export writer ends every line — the header and each record — with a\n * newline, so a whole body ends on one, outside quotes. RFC 4180 lets a\n * final line break be omitted, but these bodies never omit it, and without\n * that rule a file cut part-way through its last unquoted field\n * (`pay_1,12` of `pay_1,123`) would count as one more whole record and\n * match the figure it was announced with.\n */\n get complete(): boolean {\n return this.newlines >= 1 && !this.inQuotes && !this.lineHasContent;\n }\n\n /**\n * The records that ended. An unterminated tail is not one of them — see\n * {@link complete}.\n */\n finish(): number {\n return this.records;\n }\n}\n\n/** Before the rows array, inside it, and past its end. */\nconst SEEKING = 0;\nconst COUNTING = 1;\nconst CLOSED = 2;\ntype ArrayState = typeof SEEKING | typeof COUNTING | typeof CLOSED;\n\n/**\n * A JSON object whose rows are an array member — `{\"records\":[…],…}` or\n * `{\"data\":[…],…}`.\n *\n * Counts the elements of the **first** array that is a direct member of the\n * top-level object: each one is counted as it closes back to that array's\n * depth, so a record is counted once it has fully arrived, never on its first\n * byte. Counting stops when that array closes, so an array later in the\n * envelope (inside the echoed `filters`, say) is never mistaken for rows.\n *\n * Strings are tracked with their escapes, so a `}` `]` or `\"` inside a value\n * is text, not structure. Elements are counted when an object or array closes;\n * a bare scalar element is not a record and is not counted.\n */\nexport class JsonArrayRecordCounter implements RecordCounter {\n private depth = 0;\n private inString = false;\n private escaped = false;\n private topIsObject = false;\n private state: ArrayState = SEEKING;\n private count = 0;\n\n push(chunk: Uint8Array): void {\n if (this.state === CLOSED) return;\n let { depth, inString, escaped, topIsObject, count } = this;\n let state: ArrayState = this.state;\n for (const byte of chunk) {\n if (inString) {\n if (escaped) escaped = false;\n else if (byte === BACKSLASH) escaped = true;\n else if (byte === QUOTE) inString = false;\n continue;\n }\n if (byte === QUOTE) {\n inString = true;\n } else if (byte === OPEN_BRACE || byte === OPEN_BRACKET) {\n if (depth === 0 && byte === OPEN_BRACE) topIsObject = true;\n if (byte === OPEN_BRACKET && depth === 1 && topIsObject && state === SEEKING) {\n state = COUNTING;\n }\n depth++;\n } else if (byte === CLOSE_BRACE || byte === CLOSE_BRACKET) {\n depth--;\n if (state === COUNTING) {\n // Depth 2 is the rows array's own level: a value closing back to it\n // is one complete row. Closing to depth 1 is the array itself ending.\n if (depth === 2) count++;\n else if (depth === 1) {\n state = CLOSED;\n break;\n }\n }\n }\n }\n this.depth = depth;\n this.inString = inString;\n this.escaped = escaped;\n this.topIsObject = topIsObject;\n this.state = state;\n this.count = count;\n }\n\n get records(): number {\n return this.count;\n }\n\n /**\n * Whether the rows array has closed. What follows it is checked by parsing\n * the whole document, which a cut-off body fails.\n */\n get complete(): boolean {\n return this.state === CLOSED;\n }\n\n finish(): number {\n return this.count;\n }\n}\n"]}
1
+ {"version":3,"sources":["/home/jonathan/Desktop/DeloPay/dev1/delopay-typescript-sdk/dist/chunk-KD5Y2YWK.cjs","../src/recordCounter.ts"],"names":[],"mappings":"AAAA;ACgBA,IAAM,GAAA,EAAK,EAAA;AACX,IAAM,GAAA,EAAK,EAAA;AACX,IAAM,MAAA,EAAQ,EAAA;AACd,IAAM,UAAA,EAAY,EAAA;AAClB,IAA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IAAA,CAAK,KAAA;AAAA,EACd;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,IAAI,QAAA,CAAA,EAAoB;AACtB,IAAA,OAAO,IAAA,CAAK,MAAA,IAAU,MAAA;AAAA,EACxB;AAAA,EAEA,MAAA,CAAA,EAAiB;AACf,IAAA,OAAO,IAAA,CAAK,KAAA;AAAA,EACd;AACF,CAAA;AD/DA;AACA;AACE;AACA;AACF,qGAAC","file":"/home/jonathan/Desktop/DeloPay/dev1/delopay-typescript-sdk/dist/chunk-KD5Y2YWK.cjs","sourcesContent":[null,"/**\n * Incremental record counters for streamed export bodies.\n *\n * An export streams its body and announces, in `X-Delopay-Record-Count`, how\n * many records that body will hold. These count the records actually received,\n * chunk by chunk, so a download can show `receivedRecords` of\n * `expectedRecords` while it runs and the finished file can be held to the\n * announced figure.\n *\n * They work on **bytes**, never on decoded text. Every character they look at —\n * `\"` `\\` `{` `}` `[` `]` and the line break — is ASCII, and no byte of a\n * multi-byte UTF-8 sequence falls in the ASCII range, so a chunk boundary can\n * land anywhere, the middle of a character included, without a decoder having\n * to carry a partial sequence across it.\n */\n\nconst LF = 0x0a;\nconst CR = 0x0d;\nconst QUOTE = 0x22;\nconst BACKSLASH = 0x5c;\nconst OPEN_BRACE = 0x7b;\nconst CLOSE_BRACE = 0x7d;\nconst OPEN_BRACKET = 0x5b;\nconst CLOSE_BRACKET = 0x5d;\n\n/** Counts the records in a body fed to it one chunk at a time. */\nexport interface RecordCounter {\n /** Feed the next chunk of the body, in order. */\n push(chunk: Uint8Array): void;\n /** Records complete in what has been fed so far. */\n readonly records: number;\n /**\n * Whether what has been fed ends where a whole export body ends. A body\n * that stops anywhere else was cut off, whatever its record count says.\n */\n readonly complete: boolean;\n /** Records in the body, once it has ended. Does not change the counter. */\n finish(): number;\n}\n\n/**\n * RFC 4180 CSV with a header line: one record per line, where a field holding\n * `,` `\"` or a line break is quoted and a quote inside it is doubled.\n *\n * A newline inside quotes is part of a field, not the end of a record, so every\n * `\"` toggles \"inside quotes\". A doubled `\"\"` toggles twice and leaves it as it\n * was, which is exactly its meaning. Records are the newlines outside quotes,\n * less one for the header.\n */\nexport class CsvRecordCounter implements RecordCounter {\n private inQuotes = false;\n private newlines = 0;\n /** Whether anything but a line break has arrived since the last newline. */\n private lineHasContent = false;\n\n push(chunk: Uint8Array): void {\n let inQuotes = this.inQuotes;\n let newlines = this.newlines;\n let lineHasContent = this.lineHasContent;\n for (const byte of chunk) {\n if (byte === QUOTE) {\n inQuotes = !inQuotes;\n lineHasContent = true;\n } else if (inQuotes) {\n lineHasContent = true;\n } else if (byte === LF) {\n newlines++;\n lineHasContent = false;\n } else if (byte !== CR) {\n lineHasContent = true;\n }\n }\n this.inQuotes = inQuotes;\n this.newlines = newlines;\n this.lineHasContent = lineHasContent;\n }\n\n get records(): number {\n return Math.max(0, this.newlines - 1);\n }\n\n /**\n * The export writer ends every line — the header and each record — with a\n * newline, so a whole body ends on one, outside quotes. RFC 4180 lets a\n * final line break be omitted, but these bodies never omit it, and without\n * that rule a file cut part-way through its last unquoted field\n * (`pay_1,12` of `pay_1,123`) would count as one more whole record and\n * match the figure it was announced with.\n */\n get complete(): boolean {\n return this.newlines >= 1 && !this.inQuotes && !this.lineHasContent;\n }\n\n /**\n * The records that ended. An unterminated tail is not one of them — see\n * {@link complete}.\n */\n finish(): number {\n return this.records;\n }\n}\n\n/** Before the rows array, inside it, and past its end. */\nconst SEEKING = 0;\nconst COUNTING = 1;\nconst CLOSED = 2;\ntype ArrayState = typeof SEEKING | typeof COUNTING | typeof CLOSED;\n\n/**\n * A JSON object whose rows are an array member — `{\"records\":[…],…}` or\n * `{\"data\":[…],…}`.\n *\n * Counts the elements of the **first** array that is a direct member of the\n * top-level object: each one is counted as it closes back to that array's\n * depth, so a record is counted once it has fully arrived, never on its first\n * byte. Counting stops when that array closes, so an array later in the\n * envelope (inside the echoed `filters`, say) is never mistaken for rows.\n *\n * Strings are tracked with their escapes, so a `}` `]` or `\"` inside a value\n * is text, not structure. Elements are counted when an object or array closes;\n * a bare scalar element is not a record and is not counted.\n */\nexport class JsonArrayRecordCounter implements RecordCounter {\n private depth = 0;\n private inString = false;\n private escaped = false;\n private topIsObject = false;\n private state: ArrayState = SEEKING;\n private count = 0;\n\n push(chunk: Uint8Array): void {\n if (this.state === CLOSED) return;\n let { depth, inString, escaped, topIsObject, count } = this;\n let state: ArrayState = this.state;\n for (const byte of chunk) {\n if (inString) {\n if (escaped) escaped = false;\n else if (byte === BACKSLASH) escaped = true;\n else if (byte === QUOTE) inString = false;\n continue;\n }\n if (byte === QUOTE) {\n inString = true;\n } else if (byte === OPEN_BRACE || byte === OPEN_BRACKET) {\n if (depth === 0 && byte === OPEN_BRACE) topIsObject = true;\n if (byte === OPEN_BRACKET && depth === 1 && topIsObject && state === SEEKING) {\n state = COUNTING;\n }\n depth++;\n } else if (byte === CLOSE_BRACE || byte === CLOSE_BRACKET) {\n depth--;\n if (state === COUNTING) {\n // Depth 2 is the rows array's own level: a value closing back to it\n // is one complete row. Closing to depth 1 is the array itself ending.\n if (depth === 2) count++;\n else if (depth === 1) {\n state = CLOSED;\n break;\n }\n }\n }\n }\n this.depth = depth;\n this.inString = inString;\n this.escaped = escaped;\n this.topIsObject = topIsObject;\n this.state = state;\n this.count = count;\n }\n\n get records(): number {\n return this.count;\n }\n\n /**\n * Whether the rows array has closed. What follows it is checked by parsing\n * the whole document, which a cut-off body fails.\n */\n get complete(): boolean {\n return this.state === CLOSED;\n }\n\n finish(): number {\n return this.count;\n }\n}\n"]}