@delopay/sdk 0.501.0 → 0.503.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 (332) hide show
  1. package/dist/airwallexCard.cjs.map +1 -1
  2. package/dist/branding.cjs.map +1 -1
  3. package/dist/cardFormStyles.cjs.map +1 -1
  4. package/dist/checkoutSession.cjs +2 -2
  5. package/dist/checkoutSession.cjs.map +1 -1
  6. package/dist/checkoutSession.js +1 -1
  7. package/dist/chunk-244VZFFO.cjs.map +1 -1
  8. package/dist/chunk-2IJRBJXW.cjs.map +1 -1
  9. package/dist/chunk-34PC72O7.cjs.map +1 -1
  10. package/dist/chunk-3GBWQWTP.cjs.map +1 -1
  11. package/dist/chunk-3YBBJT3Y.cjs.map +1 -1
  12. package/dist/chunk-44QBWVRS.cjs.map +1 -1
  13. package/dist/chunk-4EKAWNYI.cjs.map +1 -1
  14. package/dist/chunk-4LN4BR2T.cjs.map +1 -1
  15. package/dist/chunk-4T4XHPYN.cjs.map +1 -1
  16. package/dist/chunk-575SNLIT.cjs.map +1 -1
  17. package/dist/chunk-5CITBN33.cjs.map +1 -1
  18. package/dist/chunk-5HCKC4HF.cjs.map +1 -1
  19. package/dist/chunk-5O2JSQYA.cjs.map +1 -1
  20. package/dist/chunk-5QS67SBO.cjs.map +1 -1
  21. package/dist/chunk-6EBY2KKL.cjs.map +1 -1
  22. package/dist/chunk-6LFOM6HV.cjs.map +1 -1
  23. package/dist/chunk-6LOWE2YI.cjs.map +1 -1
  24. package/dist/chunk-6LSG5Z4T.cjs.map +1 -1
  25. package/dist/chunk-6SU2MTN2.cjs.map +1 -1
  26. package/dist/chunk-6YCDLSIU.cjs.map +1 -1
  27. package/dist/chunk-75E5WNJG.cjs.map +1 -1
  28. package/dist/chunk-7JV6VVO7.cjs.map +1 -1
  29. package/dist/{chunk-TDCB2FQI.js → chunk-7N4OLAWY.js} +32 -1
  30. package/dist/chunk-7N4OLAWY.js.map +1 -0
  31. package/dist/chunk-7NKJD5ST.cjs.map +1 -1
  32. package/dist/chunk-7QZCUXWB.cjs.map +1 -1
  33. package/dist/chunk-7VXF5D67.cjs.map +1 -1
  34. package/dist/chunk-ABWAYMN5.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-FLQ3K6Y6.js → chunk-BN5SIRFO.js} +2 -2
  39. package/dist/chunk-BN5SIRFO.js.map +1 -0
  40. package/dist/chunk-BP6KDQ6I.cjs.map +1 -1
  41. package/dist/chunk-BRY3W7N3.cjs.map +1 -1
  42. package/dist/chunk-BT3UAUEV.cjs.map +1 -1
  43. package/dist/chunk-CCN44NZJ.cjs.map +1 -1
  44. package/dist/chunk-CR3JBTP3.cjs.map +1 -1
  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-EYHSXJMJ.cjs.map +1 -1
  51. package/dist/chunk-F3I5DOWV.cjs.map +1 -1
  52. package/dist/chunk-F46K5H3U.cjs.map +1 -1
  53. package/dist/chunk-F6QJB4XP.cjs.map +1 -1
  54. package/dist/chunk-F6S3WCCB.cjs.map +1 -1
  55. package/dist/chunk-FQRC4NJG.cjs.map +1 -1
  56. package/dist/chunk-FTWGI7UZ.cjs.map +1 -1
  57. package/dist/chunk-FYISDU2Y.cjs.map +1 -1
  58. package/dist/chunk-GG52SAHA.cjs.map +1 -1
  59. package/dist/chunk-GK5FWN4H.cjs.map +1 -1
  60. package/dist/chunk-GSQN5EOO.cjs.map +1 -1
  61. package/dist/chunk-GW7IHYXR.cjs.map +1 -1
  62. package/dist/chunk-GWSVQXEY.cjs.map +1 -1
  63. package/dist/chunk-HLKFUOAQ.cjs.map +1 -1
  64. package/dist/chunk-HLYGHP6F.cjs.map +1 -1
  65. package/dist/chunk-I2W7AO4B.cjs.map +1 -1
  66. package/dist/chunk-I2XGNALG.cjs.map +1 -1
  67. package/dist/chunk-IKXGA2Z5.cjs.map +1 -1
  68. package/dist/chunk-IR2LFKKA.cjs.map +1 -1
  69. package/dist/{chunk-BX2CT7FR.js → chunk-J3Y6EVBP.js} +84 -1
  70. package/dist/chunk-J3Y6EVBP.js.map +1 -0
  71. package/dist/chunk-J4ZB7MU4.cjs.map +1 -1
  72. package/dist/chunk-J5RPSRBQ.cjs.map +1 -1
  73. package/dist/chunk-JPPRDMTJ.cjs.map +1 -1
  74. package/dist/chunk-K5Q2H3VD.cjs.map +1 -1
  75. package/dist/chunk-KD5Y2YWK.cjs.map +1 -1
  76. package/dist/chunk-KJDMNF2T.cjs.map +1 -1
  77. package/dist/chunk-KLONGJCL.cjs.map +1 -1
  78. package/dist/chunk-LJ2EG6JK.cjs.map +1 -1
  79. package/dist/chunk-LLYY4TCZ.cjs.map +1 -1
  80. package/dist/chunk-LYIBTVK6.cjs.map +1 -1
  81. package/dist/chunk-M3HWE7KT.cjs.map +1 -1
  82. package/dist/chunk-M3SJHFT4.cjs.map +1 -1
  83. package/dist/chunk-MLG6NXI6.cjs.map +1 -1
  84. package/dist/chunk-MYAXAWBQ.cjs.map +1 -1
  85. package/dist/chunk-NFB3S2E6.cjs.map +1 -1
  86. package/dist/chunk-NX36HDXE.cjs.map +1 -1
  87. package/dist/chunk-NYL3BNHR.cjs.map +1 -1
  88. package/dist/chunk-O4AYHLQX.cjs.map +1 -1
  89. package/dist/{chunk-HSJABE7X.cjs → chunk-O7SQCN44.cjs} +13 -13
  90. package/dist/chunk-O7SQCN44.cjs.map +1 -0
  91. package/dist/chunk-OAEKP665.cjs.map +1 -1
  92. package/dist/chunk-ODPNVNYE.cjs.map +1 -1
  93. package/dist/chunk-OG2KJAYD.cjs.map +1 -1
  94. package/dist/chunk-OYZP6NF6.cjs.map +1 -1
  95. package/dist/chunk-P4UILJVU.cjs.map +1 -1
  96. package/dist/chunk-P7DYLUUI.cjs.map +1 -1
  97. package/dist/chunk-PKAE6AQT.cjs.map +1 -1
  98. package/dist/chunk-Q7M7DO7M.cjs.map +1 -1
  99. package/dist/chunk-QKUWFMZP.cjs.map +1 -1
  100. package/dist/{chunk-IPN7D5PP.js → chunk-QMZWH4LG.js} +3 -3
  101. package/dist/chunk-QRSA72B3.cjs.map +1 -1
  102. package/dist/chunk-QYNRNDIY.cjs.map +1 -1
  103. package/dist/chunk-R4GA6BVP.cjs.map +1 -1
  104. package/dist/chunk-R5VYSZ3Q.cjs.map +1 -1
  105. package/dist/{chunk-NULOAF7W.cjs → chunk-RBZZEW2H.cjs} +84 -1
  106. package/dist/chunk-RBZZEW2H.cjs.map +1 -0
  107. package/dist/chunk-RHFUXHQN.cjs.map +1 -1
  108. package/dist/chunk-RHT27R27.cjs.map +1 -1
  109. package/dist/chunk-RI42IDRR.cjs.map +1 -1
  110. package/dist/chunk-S77LQWYC.cjs.map +1 -1
  111. package/dist/chunk-S7SBNOGS.cjs.map +1 -1
  112. package/dist/chunk-TMAJE5P2.cjs.map +1 -1
  113. package/dist/chunk-TNIJ6OSH.cjs.map +1 -1
  114. package/dist/{chunk-IUXCU3DW.cjs → chunk-TZXY7QJB.cjs} +5 -5
  115. package/dist/chunk-TZXY7QJB.cjs.map +1 -0
  116. package/dist/chunk-U3JK7NBG.cjs.map +1 -1
  117. package/dist/chunk-UGSM7RJ2.cjs.map +1 -1
  118. package/dist/chunk-UKLZAOLW.cjs.map +1 -1
  119. package/dist/chunk-UTCXNBID.cjs.map +1 -1
  120. package/dist/chunk-V47G7P6L.cjs.map +1 -1
  121. package/dist/chunk-VH5A6SMU.cjs.map +1 -1
  122. package/dist/chunk-VHMH4QMY.cjs.map +1 -1
  123. package/dist/chunk-VYC7WUM5.cjs.map +1 -1
  124. package/dist/{chunk-IDY2LP4Q.cjs → chunk-W3HFS5KT.cjs} +3 -3
  125. package/dist/chunk-W3HFS5KT.cjs.map +1 -0
  126. package/dist/chunk-W457XUA6.cjs.map +1 -1
  127. package/dist/{chunk-SAXTZZQL.js → chunk-W4AW52WT.js} +2 -2
  128. package/dist/chunk-WHDI3TMP.cjs.map +1 -1
  129. package/dist/chunk-WITCPKNL.cjs.map +1 -1
  130. package/dist/chunk-WX6NP7UU.cjs.map +1 -1
  131. package/dist/chunk-XQLRIBVR.cjs.map +1 -1
  132. package/dist/chunk-Y7LSSRNJ.cjs.map +1 -1
  133. package/dist/chunk-YK3P5QNZ.cjs.map +1 -1
  134. package/dist/{chunk-O53VOQK7.cjs → chunk-YRGIXGGW.cjs} +32 -1
  135. package/dist/chunk-YRGIXGGW.cjs.map +1 -0
  136. package/dist/chunk-YW4DVKNT.cjs.map +1 -1
  137. package/dist/chunk-Z7AVB6VI.cjs.map +1 -1
  138. package/dist/chunk-ZGMIHHGL.cjs.map +1 -1
  139. package/dist/chunk-ZKPVUCQV.cjs.map +1 -1
  140. package/dist/chunk-ZUULK36E.cjs.map +1 -1
  141. package/dist/client.cjs +3 -3
  142. package/dist/client.cjs.map +1 -1
  143. package/dist/client.js +2 -2
  144. package/dist/core.cjs +2 -2
  145. package/dist/core.cjs.map +1 -1
  146. package/dist/core.d.cts +8 -0
  147. package/dist/core.d.ts +8 -0
  148. package/dist/core.js +1 -1
  149. package/dist/currencies.cjs.map +1 -1
  150. package/dist/enigmaCardForm.cjs.map +1 -1
  151. package/dist/error.cjs.map +1 -1
  152. package/dist/eventStream.cjs.map +1 -1
  153. package/dist/exportDownload.cjs.map +1 -1
  154. package/dist/feeProgram.cjs.map +1 -1
  155. package/dist/index.cjs +5 -5
  156. package/dist/index.cjs.map +1 -1
  157. package/dist/index.d.cts +1 -1
  158. package/dist/index.d.ts +1 -1
  159. package/dist/index.js +4 -4
  160. package/dist/internal/resources/admin.cjs.map +1 -1
  161. package/dist/internal/resources/admin.d.cts +1 -1
  162. package/dist/internal/resources/admin.d.ts +1 -1
  163. package/dist/internal/resources/adminBranding.cjs.map +1 -1
  164. package/dist/internal/resources/adminBranding.d.cts +1 -1
  165. package/dist/internal/resources/adminBranding.d.ts +1 -1
  166. package/dist/internal/resources/adminCheckoutDomains.cjs.map +1 -1
  167. package/dist/internal/resources/adminCheckoutDomains.d.cts +1 -1
  168. package/dist/internal/resources/adminCheckoutDomains.d.ts +1 -1
  169. package/dist/internal/resources/adminFeePlans.cjs.map +1 -1
  170. package/dist/internal/resources/adminFeePlans.d.cts +1 -1
  171. package/dist/internal/resources/adminFeePlans.d.ts +1 -1
  172. package/dist/internal/resources/adminFileScans.cjs.map +1 -1
  173. package/dist/internal/resources/adminFileScans.d.cts +1 -1
  174. package/dist/internal/resources/adminFileScans.d.ts +1 -1
  175. package/dist/internal/resources/adminIndustries.cjs.map +1 -1
  176. package/dist/internal/resources/adminIndustries.d.cts +1 -1
  177. package/dist/internal/resources/adminIndustries.d.ts +1 -1
  178. package/dist/internal/resources/adminLive.cjs.map +1 -1
  179. package/dist/internal/resources/adminNotices.cjs.map +1 -1
  180. package/dist/internal/resources/adminNotices.d.cts +1 -1
  181. package/dist/internal/resources/adminNotices.d.ts +1 -1
  182. package/dist/internal/resources/adminPortal.cjs +2 -2
  183. package/dist/internal/resources/adminPortal.cjs.map +1 -1
  184. package/dist/internal/resources/adminPortal.d.cts +64 -1
  185. package/dist/internal/resources/adminPortal.d.ts +64 -1
  186. package/dist/internal/resources/adminPortal.js +1 -1
  187. package/dist/internal/resources/adminPricing.cjs.map +1 -1
  188. package/dist/internal/resources/adminPricing.d.cts +1 -1
  189. package/dist/internal/resources/adminPricing.d.ts +1 -1
  190. package/dist/internal/resources/adminSupport.cjs.map +1 -1
  191. package/dist/internal/resources/adminSupport.d.cts +1 -1
  192. package/dist/internal/resources/adminSupport.d.ts +1 -1
  193. package/dist/internal/resources/auditLogs.cjs.map +1 -1
  194. package/dist/internal/resources/auditLogs.d.cts +1 -1
  195. package/dist/internal/resources/auditLogs.d.ts +1 -1
  196. package/dist/internal/resources/cache.cjs.map +1 -1
  197. package/dist/internal/resources/cardIssuers.cjs.map +1 -1
  198. package/dist/internal/resources/cardIssuers.d.cts +1 -1
  199. package/dist/internal/resources/cardIssuers.d.ts +1 -1
  200. package/dist/internal/resources/configs.cjs.map +1 -1
  201. package/dist/internal/resources/connectorRestrictionRules.cjs.map +1 -1
  202. package/dist/internal/resources/connectorRestrictionRules.d.cts +1 -1
  203. package/dist/internal/resources/connectorRestrictionRules.d.ts +1 -1
  204. package/dist/internal/resources/connectorRestrictions.cjs.map +1 -1
  205. package/dist/internal/resources/connectorRestrictions.d.cts +1 -1
  206. package/dist/internal/resources/connectorRestrictions.d.ts +1 -1
  207. package/dist/internal/resources/diagnostic.cjs.map +1 -1
  208. package/dist/internal/resources/diagnostic.d.cts +1 -1
  209. package/dist/internal/resources/diagnostic.d.ts +1 -1
  210. package/dist/internal/resources/gsm.cjs.map +1 -1
  211. package/dist/internal/resources/gsm.d.cts +1 -1
  212. package/dist/internal/resources/gsm.d.ts +1 -1
  213. package/dist/internal/resources/nativeRenewals.cjs.map +1 -1
  214. package/dist/internal/resources/nativeRenewals.d.cts +1 -1
  215. package/dist/internal/resources/nativeRenewals.d.ts +1 -1
  216. package/dist/internal/resources/platformBilling.cjs.map +1 -1
  217. package/dist/internal/resources/platformBilling.d.cts +1 -1
  218. package/dist/internal/resources/platformBilling.d.ts +1 -1
  219. package/dist/internal/resources/platformFees.cjs.map +1 -1
  220. package/dist/internal/resources/platformMessageTemplates.cjs.map +1 -1
  221. package/dist/internal/resources/platformSettings.cjs.map +1 -1
  222. package/dist/internal/resources/platformSettings.d.cts +1 -1
  223. package/dist/internal/resources/platformSettings.d.ts +1 -1
  224. package/dist/internal.cjs +8 -8
  225. package/dist/internal.cjs.map +1 -1
  226. package/dist/internal.d.cts +2 -2
  227. package/dist/internal.d.ts +2 -2
  228. package/dist/internal.js +5 -5
  229. package/dist/listQuery.cjs.map +1 -1
  230. package/dist/panes.cjs.map +1 -1
  231. package/dist/paymentPresentation.cjs.map +1 -1
  232. package/dist/recordCounter.cjs.map +1 -1
  233. package/dist/resources/aiTools.cjs.map +1 -1
  234. package/dist/resources/analytics.cjs.map +1 -1
  235. package/dist/resources/analyticsDashboard.cjs.map +1 -1
  236. package/dist/resources/apiKeys.cjs.map +1 -1
  237. package/dist/resources/audit.cjs.map +1 -1
  238. package/dist/resources/authentication.cjs.map +1 -1
  239. package/dist/resources/availabilityOverrides.cjs.map +1 -1
  240. package/dist/resources/billing.cjs.map +1 -1
  241. package/dist/resources/buyerAccount.cjs.map +1 -1
  242. package/dist/resources/buyerBlocklist.cjs.map +1 -1
  243. package/dist/resources/buyerConversations.cjs.map +1 -1
  244. package/dist/resources/buyerEvidenceReviews.cjs.map +1 -1
  245. package/dist/resources/buyerPortal.cjs.map +1 -1
  246. package/dist/resources/cards.cjs.map +1 -1
  247. package/dist/resources/chargebackPrevention.cjs.map +1 -1
  248. package/dist/resources/checkoutDomains.cjs.map +1 -1
  249. package/dist/resources/checkoutMethods.cjs.map +1 -1
  250. package/dist/resources/checkoutRecovery.cjs.map +1 -1
  251. package/dist/resources/checkoutTemplates.cjs.map +1 -1
  252. package/dist/resources/connectors.cjs.map +1 -1
  253. package/dist/resources/contentEncryption.cjs.map +1 -1
  254. package/dist/resources/costRules.cjs.map +1 -1
  255. package/dist/resources/customers.cjs.map +1 -1
  256. package/dist/resources/deploymentBranding.cjs.map +1 -1
  257. package/dist/resources/disputes.cjs.map +1 -1
  258. package/dist/resources/ephemeralKeys.cjs.map +1 -1
  259. package/dist/resources/events.cjs.map +1 -1
  260. package/dist/resources/export.cjs.map +1 -1
  261. package/dist/resources/externalRecords.cjs.map +1 -1
  262. package/dist/resources/featureMatrix.cjs.map +1 -1
  263. package/dist/resources/fees.cjs.map +1 -1
  264. package/dist/resources/files.cjs.map +1 -1
  265. package/dist/resources/forex.cjs.map +1 -1
  266. package/dist/resources/identityVerifications.cjs.map +1 -1
  267. package/dist/resources/industries.cjs.map +1 -1
  268. package/dist/resources/invoiceSettings.cjs.map +1 -1
  269. package/dist/resources/invoices.cjs.map +1 -1
  270. package/dist/resources/live.cjs.map +1 -1
  271. package/dist/resources/mandates.cjs.map +1 -1
  272. package/dist/resources/merchantAccounts.cjs.map +1 -1
  273. package/dist/resources/messageTemplates.cjs.map +1 -1
  274. package/dist/resources/notices.cjs.map +1 -1
  275. package/dist/resources/operationLimits.cjs.map +1 -1
  276. package/dist/resources/paymentLinks.cjs.map +1 -1
  277. package/dist/resources/paymentMethods.cjs.map +1 -1
  278. package/dist/resources/payments.cjs.map +1 -1
  279. package/dist/resources/payoutDestinations.cjs.map +1 -1
  280. package/dist/resources/payouts.cjs.map +1 -1
  281. package/dist/resources/paypalDisputes.cjs.map +1 -1
  282. package/dist/resources/persons.cjs.map +1 -1
  283. package/dist/resources/poll.cjs.map +1 -1
  284. package/dist/resources/processorCosts.cjs.map +1 -1
  285. package/dist/resources/processorImports.cjs.map +1 -1
  286. package/dist/resources/products.cjs.map +1 -1
  287. package/dist/resources/profileAcquirers.cjs.map +1 -1
  288. package/dist/resources/profiles.cjs.map +1 -1
  289. package/dist/resources/projects.cjs.map +1 -1
  290. package/dist/resources/refunds.cjs.map +1 -1
  291. package/dist/resources/regions.cjs.map +1 -1
  292. package/dist/resources/relay.cjs.map +1 -1
  293. package/dist/resources/risk.cjs.map +1 -1
  294. package/dist/resources/routing.cjs.map +1 -1
  295. package/dist/resources/search.cjs.map +1 -1
  296. package/dist/resources/sellToRestrictions.cjs.map +1 -1
  297. package/dist/resources/settings.cjs.map +1 -1
  298. package/dist/resources/settlement.cjs.map +1 -1
  299. package/dist/resources/shareLinks.cjs.map +1 -1
  300. package/dist/resources/shopLabels.cjs.map +1 -1
  301. package/dist/resources/shopify.cjs +2 -2
  302. package/dist/resources/shopify.cjs.map +1 -1
  303. package/dist/resources/shopify.d.cts +26 -1
  304. package/dist/resources/shopify.d.ts +26 -1
  305. package/dist/resources/shopify.js +1 -1
  306. package/dist/resources/shops.cjs.map +1 -1
  307. package/dist/resources/stripeConnect.cjs.map +1 -1
  308. package/dist/resources/subscriptions.cjs.map +1 -1
  309. package/dist/resources/support.cjs.map +1 -1
  310. package/dist/resources/threeDsRules.cjs.map +1 -1
  311. package/dist/resources/users.cjs.map +1 -1
  312. package/dist/resources/vatRates.cjs.map +1 -1
  313. package/dist/resources/verification.cjs.map +1 -1
  314. package/dist/resources/webhooks.cjs.map +1 -1
  315. package/dist/resources/whopResolutionCases.cjs.map +1 -1
  316. package/dist/trustedOrigins.cjs.map +1 -1
  317. package/dist/{types-SEJjet2B.d.ts → types-DWl8-llD.d.cts} +201 -2
  318. package/dist/{types-FHqOLCyI.d.cts → types-m2Cm6l0z.d.ts} +201 -2
  319. package/dist/types.cjs.map +1 -1
  320. package/dist/types.d.cts +111 -1
  321. package/dist/types.d.ts +111 -1
  322. package/package.json +1 -1
  323. package/dist/chunk-BX2CT7FR.js.map +0 -1
  324. package/dist/chunk-FLQ3K6Y6.js.map +0 -1
  325. package/dist/chunk-HSJABE7X.cjs.map +0 -1
  326. package/dist/chunk-IDY2LP4Q.cjs.map +0 -1
  327. package/dist/chunk-IUXCU3DW.cjs.map +0 -1
  328. package/dist/chunk-NULOAF7W.cjs.map +0 -1
  329. package/dist/chunk-O53VOQK7.cjs.map +0 -1
  330. package/dist/chunk-TDCB2FQI.js.map +0 -1
  331. /package/dist/{chunk-IPN7D5PP.js.map → chunk-QMZWH4LG.js.map} +0 -0
  332. /package/dist/{chunk-SAXTZZQL.js.map → chunk-W4AW52WT.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"sources":["/tmp/w3-sdk-publish-0501/delopay-typescript-sdk/dist/chunk-LLYY4TCZ.cjs","../src/resources/routing.ts"],"names":[],"mappings":"AAAA;AC2CO,IAAM,QAAA,EAAN,MAAc;AAAA,EASnB,WAAA,CAA6B,OAAA,EAAoB;AAApB,IAAA,IAAA,CAAA,QAAA,E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E,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUiF,EAAA;AACnB,IAAA;AAC3B,MAAA;AAChC,IAAA;AACH,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAagD,EAAA;AACiB,IAAA;AAC9B,MAAA;AAChC,IAAA;AACH,EAAA;AACF;AAqB8B;AACqB,EAAA;AAApB,IAAA;AAAqB,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA6B6C,EAAA;AAC5B,IAAA;AACxD,MAAA;AACc,QAAA;AACL,QAAA;AACF,QAAA;AACI,QAAA;AACqB,QAAA;AACV,QAAA;AACI,QAAA;AACjC,MAAA;AACD,IAAA;AACH,EAAA;AACF;AD9L2E;AACA;AACA;AACA","file":"/tmp/w3-sdk-publish-0501/delopay-typescript-sdk/dist/chunk-LLYY4TCZ.cjs","sourcesContent":[null,"import type {\n CheckoutThemeConversionQuery,\n CheckoutThemeConversionResponse,\n CheckoutThemeProgramRequest,\n CheckoutThemeProgramResponse,\n DefaultRoutingConfigUpdate,\n LinkedRoutingConfigRetrieveResponse,\n MerchantRoutingAlgorithm,\n ProfileDefaultRoutingConfig,\n ProfileDeniedConnectorsResponse,\n RoutableConnectorChoice,\n RoutingActivatePayload,\n RoutingConfigCreateRequest,\n RoutingConfigDeleteResponse,\n RoutingConfigHistoryResponse,\n RoutingConfigUpdateRequest,\n ConnectorCapOverride,\n ConnectorCapOverrideLevel,\n ConnectorCapOverrideList,\n ConnectorCapOverrideRequest,\n ConnectorCapOverrides,\n RoutingConnectorCapReset,\n RoutingConnectorCapResetRequest,\n RoutingConnectorCaps,\n RoutingConnectorCapSchedule,\n RoutingConnectorCapScheduleShuffle,\n RoutingDeactivateRequest,\n RoutingDictionary,\n RoutingDictionaryRecord,\n RoutingHistoryParams,\n RoutingTimePlanDocument,\n RoutingVolumeCounters,\n SurchargeRuleRequest,\n SurchargeRuleResponse,\n} from '../types';\nimport type { RequestExtras, RequestFn } from '../client';\n\n/**\n * Create and manage payment routing algorithms.\n *\n * Routing rules determine which gateway connector handles each payment based on\n * card type, currency, amount, or custom conditions.\n */\nexport class Routing {\n readonly decision: RoutingDecisionManager;\n /** Merchant-friendly, per-payment-method surcharge rules (no Euclid DSL). */\n readonly surchargeRules: SurchargeRules;\n /** Which stored appearance variant a buyer is shown. Decides a look, never a payment. */\n readonly checkoutThemeRules: CheckoutThemeRules;\n /** Rendered-to-paid conversion per appearance variant and segment. */\n readonly checkoutThemeConversion: CheckoutThemeConversion;\n\n constructor(private readonly request: RequestFn) {\n this.decision = new RoutingDecisionManager(request);\n this.surchargeRules = new SurchargeRules(request);\n this.checkoutThemeRules = new CheckoutThemeRules(request);\n this.checkoutThemeConversion = new CheckoutThemeConversion(request);\n }\n\n /**\n * Create a new routing algorithm.\n *\n * @param params - Routing algorithm definition (rule-based, priority, or volume-based).\n * @returns Metadata record for the created routing configuration. The full\n * algorithm body is not echoed back — use `retrieve(id)` if you need it.\n *\n * @example\n * ```typescript\n * const config = await delopay.routing.create({\n * name: 'EU Priority',\n * algorithm: { type: 'priority', data: [{ connector: 'stripe' }] },\n * });\n * ```\n *\n * @example Conditional volume split (advanced): cards → 90% epayouts / 10% stripe.\n * Rules run top-down (first match wins); `defaultSelection` is the fallback.\n * Splits must sum to 100; `amount` conditions are in minor units.\n * ```typescript\n * const config = await delopay.routing.create({\n * name: 'Card split 90/10',\n * profile_id: 'pro_...',\n * algorithm: {\n * type: 'advanced',\n * data: {\n * defaultSelection: { type: 'priority', data: [{ connector: 'stripe' }] },\n * rules: [\n * {\n * name: 'cards',\n * connectorSelection: {\n * type: 'volume_split',\n * data: [\n * { connector: { connector: 'epayouts' }, split: 90 },\n * { connector: { connector: 'stripe' }, split: 10 },\n * ],\n * },\n * statements: [\n * {\n * condition: [\n * {\n * lhs: 'payment_method',\n * comparison: 'equal',\n * value: { type: 'enum_variant', value: 'card' },\n * metadata: {},\n * },\n * ],\n * },\n * ],\n * },\n * ],\n * metadata: {},\n * },\n * },\n * });\n * await delopay.routing.activate(config.id);\n * ```\n */\n async create(params: RoutingConfigCreateRequest): Promise<RoutingDictionaryRecord> {\n return this.request('POST', '/routing', { body: params });\n }\n\n /**\n * Retrieve a routing algorithm by its ID.\n *\n * @param algorithmId - The routing algorithm ID.\n * @returns The full routing configuration including the algorithm body.\n */\n async retrieve(algorithmId: string): Promise<MerchantRoutingAlgorithm> {\n return this.request('GET', `/routing/${encodeURIComponent(algorithmId)}`);\n }\n\n /**\n * Activate a routing algorithm, making it the active routing strategy.\n *\n * Always sends a JSON body (default `{}`) so the request carries the\n * `Content-Type: application/json` header that the server requires.\n *\n * @param algorithmId - The routing algorithm ID to activate.\n * @param params - Optional activation payload (e.g. `transaction_type`).\n */\n async activate(\n algorithmId: string,\n params: RoutingActivatePayload = {},\n ): Promise<RoutingDictionaryRecord> {\n return this.request('POST', `/routing/${encodeURIComponent(algorithmId)}/activate`, {\n body: params,\n });\n }\n\n /**\n * Deactivate the currently active routing algorithm (falls back to default routing).\n *\n * Always sends a JSON body (default `{}`) so the request carries the\n * `Content-Type: application/json` header that the server requires.\n *\n * @param params - Optional deactivation payload.\n */\n async deactivate(params: RoutingDeactivateRequest = {}): Promise<RoutingDictionaryRecord> {\n return this.request('POST', '/routing/deactivate', { body: params });\n }\n\n /**\n * Edit a static routing configuration.\n *\n * Partial: send only the fields to change. `name`/`description` are\n * metadata-only; `algorithm` is a wholesale rule replacement, validated\n * against the shop exactly as at create. `modified_at` is bumped either way.\n *\n * `PUT /routing/{algorithmId}`\n *\n * @param algorithmId - The routing algorithm ID to edit.\n * @param params - The fields to change (at least one required).\n * @returns The updated routing configuration including the algorithm body.\n */\n async update(\n algorithmId: string,\n params: RoutingConfigUpdateRequest,\n options?: RequestExtras,\n ): Promise<MerchantRoutingAlgorithm> {\n return this.request('PUT', `/routing/${encodeURIComponent(algorithmId)}`, {\n body: params,\n ...options,\n });\n }\n\n /**\n * Delete a static routing configuration.\n *\n * A soft delete: the configuration disappears from every list and read, but\n * its version history is kept server-side for audit. The live configuration\n * of a shop cannot be deleted — the backend refuses it (400, `IR_16`); deactivate it first.\n * Only `single`, `priority`, `volume_split` and `advanced` payment\n * configurations qualify (400 otherwise).\n *\n * `DELETE /routing/{algorithmId}`\n *\n * @param algorithmId - The routing algorithm to delete.\n */\n async delete(algorithmId: string): Promise<RoutingConfigDeleteResponse> {\n return this.request('DELETE', `/routing/${encodeURIComponent(algorithmId)}`);\n }\n\n /**\n * Every content window a routing configuration has had, oldest first.\n *\n * A configuration's rule can be edited in place, so this is what makes \"which\n * rule decided this payment\" answerable after the fact. Each entry is the rule\n * as it stood between `valid_from` and `valid_until`; the windows of one\n * config abut exactly, with no gap.\n *\n * Paging covers the whole timeline including the live window, so a page never\n * holds more than `limit` entries and the live one — the only entry without a\n * `valid_until` — comes back on exactly one page. Advance `offset` by `limit`;\n * a page past the end is empty, and `total_count` says where that end is\n * without probing for it.\n *\n * `GET /routing/{algorithmId}/history`\n *\n * @param algorithmId - The routing algorithm to read the history of.\n * @param params - Optional paging.\n */\n async history(\n algorithmId: string,\n params: RoutingHistoryParams = {},\n ): Promise<RoutingConfigHistoryResponse> {\n return this.request('GET', `/routing/${encodeURIComponent(algorithmId)}/history`, {\n query: params as Record<string, number | null | undefined>,\n });\n }\n\n /**\n * A shop's per-connector caps, each with its unit and window and how much of\n * the current window is spent (`used`) or held by payments in flight\n * (`reserved`).\n *\n * `GET /routing/connector-caps/{profileId}`\n */\n async connectorCaps(profileId: string): Promise<RoutingConnectorCaps> {\n return this.request('GET', `/routing/connector-caps/${encodeURIComponent(profileId)}`);\n }\n\n /** Read a shop's dated limit overrides. `GET /routing/connector-cap-schedules/{profileId}` */\n async connectorCapSchedules(profileId: string): Promise<RoutingConnectorCapSchedule> {\n return this.request('GET', `/routing/connector-cap-schedules/${encodeURIComponent(profileId)}`);\n }\n\n /**\n * Replace a shop's complete schedule using its last-read revision.\n * Remove an entry to cancel it; ordinary configured caps are unchanged.\n * Instants require explicit offsets, and overlapping entries for the same\n * account and unit are refused by the server. Capability preflight refuses\n * unsupported backends before submitting any schedule.\n *\n * `PUT /routing/connector-cap-schedules/{profileId}`\n */\n async setConnectorCapSchedules(\n profileId: string,\n params: RoutingConnectorCapSchedule,\n ): Promise<RoutingConnectorCapSchedule> {\n const caps = await this.connectorCaps(profileId);\n if (!caps.features?.includes('limit_schedules')) {\n throw new Error('Connector limit schedules are unsupported by the serving backend');\n }\n return this.request(\n 'PUT',\n `/routing/connector-cap-schedules/${encodeURIComponent(profileId)}`,\n {\n body: params,\n },\n );\n }\n\n /** Change the drawn value of an active scheduled range; preserves all usage. */\n async shuffleConnectorCapSchedule(\n profileId: string,\n params: RoutingConnectorCapScheduleShuffle,\n ): Promise<RoutingConnectorCaps> {\n const caps = await this.connectorCaps(profileId);\n if (!caps.features?.includes('limit_schedules')) {\n throw new Error('Connector limit schedules are unsupported by the serving backend');\n }\n return this.request(\n 'POST',\n `/routing/connector-cap-schedules/${encodeURIComponent(profileId)}/shuffle`,\n { body: params },\n );\n }\n\n /**\n * A shop's recurring time plan with its revision, the band active now, the\n * next change and each limit the plan releases in parts.\n *\n * `GET /routing/time-plans/{profileId}`\n */\n async timePlan(profileId: string): Promise<RoutingTimePlanDocument> {\n return this.request('GET', `/routing/time-plans/${encodeURIComponent(profileId)}`);\n }\n\n /**\n * Replace a shop's whole time plan using its last-read revision; `plan`\n * null removes it. Usage, reservations and dated limit entries are left as\n * they are. Overlapping bands, shares that do not total 100 and a stale\n * revision are refused by the server. Capability preflight refuses a\n * backend that would not apply the plan before anything is sent.\n *\n * `PUT /routing/time-plans/{profileId}`\n */\n async setTimePlan(\n profileId: string,\n params: Pick<RoutingTimePlanDocument, 'revision' | 'plan'>,\n ): Promise<RoutingTimePlanDocument> {\n const caps = await this.connectorCaps(profileId);\n if (!caps.features?.includes('time_plans')) {\n throw new Error('Time plans are unsupported by the serving backend');\n }\n return this.request('PUT', `/routing/time-plans/${encodeURIComponent(profileId)}`, {\n body: { revision: params.revision, plan: params.plan },\n });\n }\n\n /**\n * The live `routing_volume` counters behind a shop's active advanced\n * program: one per distinct budget the program reads, each with the window\n * it covers, the figure in the pinned threshold currency, and the rules that\n * read it. Lets a merchant see whether a `routing_volume < 50000` rule is at\n * 120 or at 499 today, and support answer why a payment went to the overflow\n * connector.\n *\n * What routing will use right now, not what the shop turned over: the\n * counters are held in Redis only and a lost Redis restarts the window at\n * zero. Read-only; needs the same permission as reading the rules.\n *\n * `GET /routing/volume-counters/{profileId}`\n */\n async volumeCounters(profileId: string): Promise<RoutingVolumeCounters> {\n return this.request('GET', `/routing/volume-counters/${encodeURIComponent(profileId)}`);\n }\n\n /**\n * Replace a shop's per-connector caps.\n *\n * Whole-set replacement, not a patch: the list sent becomes the complete set\n * of capped connectors, and an empty list clears them all — which is how\n * acquirer onboarding finishes, the new account ceasing to be a special case.\n * Re-send every other cap with its `unit`, `window` and `currency` as read:\n * an amount cap sent back without its `unit` is refused, because it carries a\n * currency and would otherwise be a payment count.\n *\n * Every account named must belong to this shop; one that does not is refused.\n * So is an amount cap without a `currency`, and a payment cap with one.\n *\n * An account may appear twice — a payment count and a budget — and never\n * twice in one `unit`. Re-send a range with its `limit_max`, or it is stored\n * as its bottom. Never re-send `current_limit` as `set_current_limit`: the\n * value read belongs to the window it was read in, and pinning it into a\n * window that has since reset is a limit nobody chose.\n *\n * `PUT /routing/connector-caps/{profileId}`\n */\n async setConnectorCaps(\n profileId: string,\n params: RoutingConnectorCaps,\n ): Promise<RoutingConnectorCaps> {\n return this.request('PUT', `/routing/connector-caps/${encodeURIComponent(profileId)}`, {\n body: params,\n });\n }\n\n /**\n * Reset one limit's usage for the window open now: what settled payments\n * spent stops counting, so the account takes payments again. Payments still\n * in flight keep their hold and count once they complete. The account's\n * other limit is untouched. Offered by a router that lists `usage_reset` in\n * `features`; refused (422) for an account with no limit in that unit.\n *\n * `POST /routing/connector-caps/{profileId}/reset`\n */\n async resetConnectorCapUsage(\n profileId: string,\n params: RoutingConnectorCapResetRequest,\n ): Promise<RoutingConnectorCapReset> {\n return this.request('POST', `/routing/connector-caps/${encodeURIComponent(profileId)}/reset`, {\n body: params,\n });\n }\n\n /**\n * Every connector cap override of the merchant: the accounts whose limits a\n * project or shop overrides.\n *\n * `GET /routing/connector-caps/overrides`\n */\n async connectorCapOverrides(): Promise<ConnectorCapOverrideList> {\n return this.request('GET', '/routing/connector-caps/overrides');\n }\n\n /**\n * One connector account's overrides, and for every shop the account takes\n * payments in, which limits apply there and where they come from.\n *\n * `GET /routing/connector-caps/accounts/{merchantConnectorId}/overrides`\n */\n async accountConnectorCapOverrides(merchantConnectorId: string): Promise<ConnectorCapOverrides> {\n return this.request(\n 'GET',\n `/routing/connector-caps/accounts/${encodeURIComponent(merchantConnectorId)}/overrides`,\n );\n }\n\n /**\n * Override an account's limits for one project (and every shop below it) or\n * one shop: `unlimited` lifts them there, `own` sets limits of its own,\n * counted separately from the account's. Replaces an existing override of\n * the same target. Setting the same target again keeps the usage its\n * current window already counted.\n *\n * `PUT /routing/connector-caps/accounts/{merchantConnectorId}/overrides/{level}/{scopeId}`\n */\n async setConnectorCapOverride(\n merchantConnectorId: string,\n level: ConnectorCapOverrideLevel,\n scopeId: string,\n params: ConnectorCapOverrideRequest,\n ): Promise<ConnectorCapOverride> {\n return this.request('PUT', this.overridePath(merchantConnectorId, level, scopeId), {\n body: params,\n });\n }\n\n /**\n * Remove an account's override for one project or shop; the next level up\n * applies again. Answers the override removed.\n *\n * `DELETE /routing/connector-caps/accounts/{merchantConnectorId}/overrides/{level}/{scopeId}`\n */\n async deleteConnectorCapOverride(\n merchantConnectorId: string,\n level: ConnectorCapOverrideLevel,\n scopeId: string,\n ): Promise<ConnectorCapOverride> {\n return this.request('DELETE', this.overridePath(merchantConnectorId, level, scopeId));\n }\n\n private overridePath(\n merchantConnectorId: string,\n level: ConnectorCapOverrideLevel,\n scopeId: string,\n ): string {\n return `/routing/connector-caps/accounts/${encodeURIComponent(merchantConnectorId)}/overrides/${encodeURIComponent(level)}/${encodeURIComponent(scopeId)}`;\n }\n\n /**\n * List all routing algorithms for the current merchant.\n *\n * @returns The routing dictionary (records + currently active id).\n */\n async list(): Promise<RoutingDictionary> {\n return this.request('GET', '/routing');\n }\n\n /**\n * Connector names denied at routing for a shop (explicit denies plus\n * whitelist-implied exclusions). Read-only; surfaced in the routing builder.\n *\n * `GET /routing/connector-restrictions/{profileId}`\n */\n async connectorRestrictions(profileId: string): Promise<ProfileDeniedConnectorsResponse> {\n return this.request('GET', `/routing/connector-restrictions/${encodeURIComponent(profileId)}`);\n }\n\n // --- Advanced operations (Task 3.4) ---\n\n /** Get active routing config. `GET /routing/active` */\n async getActive(): Promise<LinkedRoutingConfigRetrieveResponse> {\n return this.request('GET', '/routing/active');\n }\n\n /** Update default routing config. `POST /routing/default` */\n async updateDefault(params: Record<string, unknown>): Promise<RoutableConnectorChoice[]> {\n return this.request('POST', '/routing/default', { body: params });\n }\n\n /** Retrieve default config for profiles. `GET /routing/default/profile` */\n async getDefaultProfile(): Promise<RoutableConnectorChoice[] | ProfileDefaultRoutingConfig[]> {\n return this.request('GET', '/routing/default/profile');\n }\n\n /**\n * Retrieve one profile's default config. `GET /routing/default/profile/{profileId}`\n *\n * The narrow counterpart of `getDefaultProfile()`: that one returns every\n * profile of the merchant and needs merchant-level routing read, so a\n * profile-scoped (shop) role could write its own default through\n * `updateDefaultProfile()` but never read it back. This read is gated on\n * profile-level routing read and pinned to the caller's own profile — a shop\n * role asking for a sibling profile is refused.\n */\n async getDefaultForProfile(profileId: string): Promise<ProfileDefaultRoutingConfig> {\n return this.request('GET', `/routing/default/profile/${encodeURIComponent(profileId)}`);\n }\n\n /**\n * Update default config for a profile. `POST /routing/default/profile/{profileId}`\n *\n * Send the list alone to keep the shop's fallback mode, or `{ connectors, mode, splits }` to set\n * it. A `volume_split` whose shares do not total 100 is refused.\n */\n async updateDefaultProfile(\n profileId: string,\n params: DefaultRoutingConfigUpdate | Record<string, unknown>,\n options?: RequestExtras,\n ): Promise<ProfileDefaultRoutingConfig> {\n return this.request('POST', `/routing/default/profile/${encodeURIComponent(profileId)}`, {\n body: params,\n ...options,\n });\n }\n\n /** List routing configs for profile. `GET /routing/list/profile` */\n async listForProfile(): Promise<RoutingDictionary> {\n return this.request('GET', '/routing/list/profile');\n }\n\n /** Evaluate a routing rule. `POST /routing/rule/evaluate` */\n async evaluateRule(params: Record<string, unknown>): Promise<Record<string, unknown>> {\n return this.request('POST', '/routing/rule/evaluate', { body: params });\n }\n\n /** Migrate routing rules for profile. `POST /routing/rule/migrate` */\n async migrateRule(params: Record<string, unknown>): Promise<Record<string, unknown>> {\n return this.request('POST', '/routing/rule/migrate', { body: params });\n }\n\n /** Evaluate routing for a payment. `POST /routing/evaluate` */\n async evaluate(params: Record<string, unknown>): Promise<Record<string, unknown>> {\n return this.request('POST', '/routing/evaluate', { body: params });\n }\n\n /** Update gateway scores for dynamic routing. `POST /routing/feedback` */\n async feedback(params: Record<string, unknown>): Promise<Record<string, unknown>> {\n return this.request('POST', '/routing/feedback', { body: params });\n }\n}\n\nclass RoutingDecisionManager {\n constructor(private readonly request: RequestFn) {}\n\n /** Upsert decision manager config. `PUT /routing/decision` */\n async upsert(\n params: Record<string, unknown>,\n options?: RequestExtras,\n ): Promise<Record<string, unknown>> {\n return this.request('PUT', '/routing/decision', { body: params, ...options });\n }\n\n /** Retrieve decision manager config. `GET /routing/decision` */\n async retrieve(): Promise<Record<string, unknown>> {\n return this.request('GET', '/routing/decision');\n }\n\n /** Delete decision manager config. `DELETE /routing/decision` */\n async delete(options?: RequestExtras): Promise<Record<string, unknown>> {\n return this.request('DELETE', '/routing/decision', options);\n }\n\n /** Upsert surcharge decision config. `PUT /routing/decision/surcharge` */\n async upsertSurcharge(\n params: Record<string, unknown>,\n options?: RequestExtras,\n ): Promise<Record<string, unknown>> {\n return this.request('PUT', '/routing/decision/surcharge', { body: params, ...options });\n }\n\n /** Retrieve surcharge decision config. `GET /routing/decision/surcharge` */\n async retrieveSurcharge(): Promise<Record<string, unknown>> {\n return this.request('GET', '/routing/decision/surcharge');\n }\n\n /** Delete surcharge decision config. `DELETE /routing/decision/surcharge` */\n async deleteSurcharge(options?: RequestExtras): Promise<Record<string, unknown>> {\n return this.request('DELETE', '/routing/decision/surcharge', options);\n }\n}\n\n/**\n * Merchant-friendly surcharge rules: configure a per-payment-method surcharge\n * (fixed or %) added to the amount the buyer pays — without hand-writing the\n * Euclid DSL. Scope to a shop via `profile_id` (omit for merchant-wide).\n *\n * Distinct from the platform fee (a balance deduction): a surcharge changes what\n * the buyer is charged.\n */\nclass SurchargeRules {\n constructor(private readonly request: RequestFn) {}\n\n /**\n * Create or replace the surcharge program for a scope.\n *\n * `PUT /routing/surcharge/rules`\n *\n * @example\n * ```typescript\n * await delopay.routing.surchargeRules.upsert({\n * surcharges: [\n * { payment_method: 'crypto', surcharge: { rate: { percent: 1.0 } } },\n * { payment_method: 'card', surcharge: { fixed: { amount: 35 } } },\n * ],\n * });\n * ```\n */\n async upsert(\n params: SurchargeRuleRequest,\n options?: RequestExtras,\n ): Promise<SurchargeRuleResponse> {\n return this.request('PUT', '/routing/surcharge/rules', { body: params, ...options });\n }\n\n /**\n * Retrieve the active surcharge program for a scope, or `null` when none is set.\n *\n * `GET /routing/surcharge/rules?profile_id={profileId}`\n *\n * @param profileId - Shop scope. Omit for the merchant-wide rule.\n */\n async retrieve(profileId?: string): Promise<SurchargeRuleResponse | null> {\n return this.request('GET', '/routing/surcharge/rules', {\n query: { profile_id: profileId },\n });\n }\n\n /**\n * Deactivate the active surcharge program for a scope.\n *\n * `DELETE /routing/surcharge/rules?profile_id={profileId}`\n *\n * @param profileId - Shop scope. Omit for the merchant-wide rule.\n */\n async delete(profileId?: string, options?: RequestExtras): Promise<void> {\n return this.request('DELETE', '/routing/surcharge/rules', {\n query: { profile_id: profileId },\n ...options,\n });\n }\n}\n\n/**\n * Checkout theme programs: which of a shop's stored appearance variants a buyer\n * is shown.\n *\n * Same engine and same wire format as the advanced routing rules above — a\n * Euclid program whose rules run top-down, first match wins, with\n * `defaultSelection` as the fallback — with the output swapped for a variant\n * name. That is deliberate: the dashboard's routing rule builder can author\n * these without learning a second condition language.\n *\n * **A theme program decides a look and nothing else.** It cannot express which\n * payment methods are offered, what is charged, which provider processes the\n * payment, or whether it succeeds. The allowed dimensions are fixed server-side\n * by the output type — see {@link CheckoutThemeDimension} — so that is a\n * property of the API rather than a convention.\n *\n * Naming a variant the shop has not defined is **not** an error: the checkout\n * falls back to the shop default, exactly as it does for an unknown `?theme=`,\n * because a buyer who cannot pay is worse than a buyer who sees the default\n * look. Such names come back in `warnings` instead, recomputed on every read.\n */\nclass CheckoutThemeRules {\n constructor(private readonly request: RequestFn) {}\n\n /**\n * Create or replace the theme program for a scope.\n *\n * `PUT /routing/checkout-theme/rules`\n *\n * Supersedes rather than overwrites: the previous active version is retired\n * and a new one stored, so the record of which look was live when survives.\n * Pass `active: false` to store a revision **without** retiring the live one —\n * that is where a program drafted against a variant you have not built yet\n * belongs.\n *\n * @example A phone in Germany gets the compact look; everyone else the house style.\n * ```typescript\n * await delopay.routing.checkoutThemeRules.upsert({\n * name: 'Autumn targeting',\n * profile_id: 'pro_...',\n * algorithm: {\n * rules: [\n * {\n * name: 'German phones',\n * connectorSelection: { theme: { variant: 'compact' } },\n * statements: [\n * {\n * condition: [\n * {\n * lhs: 'device_class',\n * comparison: 'equal',\n * value: { type: 'enum_variant', value: 'phone' },\n * metadata: {},\n * },\n * {\n * lhs: 'browser_language',\n * comparison: 'equal',\n * value: { type: 'enum_variant', value: 'de' },\n * metadata: {},\n * },\n * ],\n * },\n * ],\n * },\n * ],\n * defaultSelection: { theme: { variant: 'house' } },\n * metadata: {},\n * },\n * });\n * ```\n */\n async upsert(params: CheckoutThemeProgramRequest): Promise<CheckoutThemeProgramResponse> {\n return this.request('PUT', '/routing/checkout-theme/rules', { body: params });\n }\n\n /**\n * Retrieve the active theme program for a scope, or `null` when none is set.\n *\n * `GET /routing/checkout-theme/rules?profile_id={profileId}`\n *\n * @param profileId - Shop scope. Omit for the merchant-wide program. A\n * shop-scoped caller that omits it gets its own shop's program.\n */\n async retrieve(profileId?: string): Promise<CheckoutThemeProgramResponse | null> {\n return this.request('GET', '/routing/checkout-theme/rules', {\n query: { profile_id: profileId },\n });\n }\n\n /**\n * Deactivate the active theme program for a scope. Idempotent.\n *\n * `DELETE /routing/checkout-theme/rules?profile_id={profileId}`\n *\n * Deactivation, not deletion — the stored row is what says which look was\n * live when, and that history cannot be reconstructed after the fact. Shops\n * go back to their default appearance immediately.\n *\n * @param profileId - Shop scope. Omit for the merchant-wide program.\n */\n async delete(profileId?: string): Promise<void> {\n return this.request('DELETE', '/routing/checkout-theme/rules', {\n query: { profile_id: profileId },\n });\n }\n}\n\n/**\n * Rendered-to-paid conversion, per appearance variant and segment.\n *\n * Answers the one question theme targeting exists for: *does variant B convert\n * better than the house style, on phones, in Germany?*\n *\n * **What a rate here means.** The denominator is backend-observed checkout page\n * opens, deduplicated by device within the hosted checkout's cache window, with\n * automated traffic excluded from both sides. It is narrower than \"paints\", and\n * that is deliberate - counting one buyer's refresh as a second render would\n * understate conversion. The exact basis travels with every response in\n * `denominator`, and the ways it is not the whole truth travel in `caveats`.\n *\n * **The server decides what may be concluded, not you.** Rate, Wilson interval,\n * per-cell `verdict` and the variant-vs-default `separates` test are computed\n * once, server-side, and shipped as values. Do not recompute them: the first\n * client that rounds differently tells a merchant a difference is real when the\n * server says it is not.\n */\nclass CheckoutThemeConversion {\n constructor(private readonly request: RequestFn) {}\n\n /**\n * Rendered-to-paid conversion for a shop over a window.\n *\n * `GET /routing/checkout-theme/conversion`\n *\n * Requires `CheckoutBranding` read at profile scope - the same permission\n * that governs seeing how a checkout looks.\n *\n * @param params - Window (RFC3339, `start` inclusive / `end` exclusive), the\n * shop, the dimension to group by, and the optional `device_class`,\n * `country` and `selection` filters.\n *\n * @example Which variant wins on which device, over the last 30 days.\n * ```typescript\n * const report = await delopay.routing.checkoutThemeConversion.retrieve({\n * profile_id: 'pro_...',\n * start: '2026-07-21T00:00:00Z',\n * end: '2026-08-20T00:00:00Z',\n * segment: 'device',\n * });\n *\n * for (const c of report.comparisons) {\n * if (!c.separates) continue; // \"not shown to differ\" - say nothing\n * console.log(`${c.variant} on ${c.segment}: ${c.higher} converts better`);\n * }\n * ```\n */\n async retrieve(params: CheckoutThemeConversionQuery): Promise<CheckoutThemeConversionResponse> {\n return this.request('GET', '/routing/checkout-theme/conversion', {\n query: {\n profile_id: params.profile_id,\n start: params.start,\n end: params.end,\n segment: params.segment,\n device_class: params.device_class ?? undefined,\n country: params.country ?? undefined,\n selection: params.selection ?? undefined,\n },\n });\n }\n}\n"]}
1
+ {"version":3,"sources":["/home/anes/delo-payment/delopay-typescript-sdk/dist/chunk-LLYY4TCZ.cjs","../src/resources/routing.ts"],"names":[],"mappings":"AAAA;AC2CO,IAAM,QAAA,EAAN,MAAc;AAAA,EASnB,WAAA,CAA6B,OAAA,EAAoB;AAApB,IAAA,IAAA,CAAA,QAAA,EAAA,OAAA;AAC3B,IAAA,IAAA,CAAK,SAAA,EAAW,IAAI,sBAAA,CAAuB,OAAO,CAAA;AAClD,IAAA,IAAA,CAAK,eAAA,EAAiB,IAAI,cAAA,CAAe,OAAO,CAAA;AAChD,IAAA,IAAA,CAAK,mBAAA,EAAqB,IAAI,kBAAA,CAAmB,OAAO,CAAA;AACxD,IAAA,IAAA,CAAK,wBAAA,EAA0B,IAAI,uBAAA,CAAwB,OAAO,CAAA;AAAA,EACpE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA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AAAA;AAAA;AA6B6C,EAAA;AAC5B,IAAA;AACxD,MAAA;AACc,QAAA;AACL,QAAA;AACF,QAAA;AACI,QAAA;AACqB,QAAA;AACV,QAAA;AACI,QAAA;AACjC,MAAA;AACD,IAAA;AACH,EAAA;AACF;AD9L2E;AACA;AACA;AACA","file":"/home/anes/delo-payment/delopay-typescript-sdk/dist/chunk-LLYY4TCZ.cjs","sourcesContent":[null,"import type {\n CheckoutThemeConversionQuery,\n CheckoutThemeConversionResponse,\n CheckoutThemeProgramRequest,\n CheckoutThemeProgramResponse,\n DefaultRoutingConfigUpdate,\n LinkedRoutingConfigRetrieveResponse,\n MerchantRoutingAlgorithm,\n ProfileDefaultRoutingConfig,\n ProfileDeniedConnectorsResponse,\n RoutableConnectorChoice,\n RoutingActivatePayload,\n RoutingConfigCreateRequest,\n RoutingConfigDeleteResponse,\n RoutingConfigHistoryResponse,\n RoutingConfigUpdateRequest,\n ConnectorCapOverride,\n ConnectorCapOverrideLevel,\n ConnectorCapOverrideList,\n ConnectorCapOverrideRequest,\n ConnectorCapOverrides,\n RoutingConnectorCapReset,\n RoutingConnectorCapResetRequest,\n RoutingConnectorCaps,\n RoutingConnectorCapSchedule,\n RoutingConnectorCapScheduleShuffle,\n RoutingDeactivateRequest,\n RoutingDictionary,\n RoutingDictionaryRecord,\n RoutingHistoryParams,\n RoutingTimePlanDocument,\n RoutingVolumeCounters,\n SurchargeRuleRequest,\n SurchargeRuleResponse,\n} from '../types';\nimport type { RequestExtras, RequestFn } from '../client';\n\n/**\n * Create and manage payment routing algorithms.\n *\n * Routing rules determine which gateway connector handles each payment based on\n * card type, currency, amount, or custom conditions.\n */\nexport class Routing {\n readonly decision: RoutingDecisionManager;\n /** Merchant-friendly, per-payment-method surcharge rules (no Euclid DSL). */\n readonly surchargeRules: SurchargeRules;\n /** Which stored appearance variant a buyer is shown. Decides a look, never a payment. */\n readonly checkoutThemeRules: CheckoutThemeRules;\n /** Rendered-to-paid conversion per appearance variant and segment. */\n readonly checkoutThemeConversion: CheckoutThemeConversion;\n\n constructor(private readonly request: RequestFn) {\n this.decision = new RoutingDecisionManager(request);\n this.surchargeRules = new SurchargeRules(request);\n this.checkoutThemeRules = new CheckoutThemeRules(request);\n this.checkoutThemeConversion = new CheckoutThemeConversion(request);\n }\n\n /**\n * Create a new routing algorithm.\n *\n * @param params - Routing algorithm definition (rule-based, priority, or volume-based).\n * @returns Metadata record for the created routing configuration. The full\n * algorithm body is not echoed back — use `retrieve(id)` if you need it.\n *\n * @example\n * ```typescript\n * const config = await delopay.routing.create({\n * name: 'EU Priority',\n * algorithm: { type: 'priority', data: [{ connector: 'stripe' }] },\n * });\n * ```\n *\n * @example Conditional volume split (advanced): cards → 90% epayouts / 10% stripe.\n * Rules run top-down (first match wins); `defaultSelection` is the fallback.\n * Splits must sum to 100; `amount` conditions are in minor units.\n * ```typescript\n * const config = await delopay.routing.create({\n * name: 'Card split 90/10',\n * profile_id: 'pro_...',\n * algorithm: {\n * type: 'advanced',\n * data: {\n * defaultSelection: { type: 'priority', data: [{ connector: 'stripe' }] },\n * rules: [\n * {\n * name: 'cards',\n * connectorSelection: {\n * type: 'volume_split',\n * data: [\n * { connector: { connector: 'epayouts' }, split: 90 },\n * { connector: { connector: 'stripe' }, split: 10 },\n * ],\n * },\n * statements: [\n * {\n * condition: [\n * {\n * lhs: 'payment_method',\n * comparison: 'equal',\n * value: { type: 'enum_variant', value: 'card' },\n * metadata: {},\n * },\n * ],\n * },\n * ],\n * },\n * ],\n * metadata: {},\n * },\n * },\n * });\n * await delopay.routing.activate(config.id);\n * ```\n */\n async create(params: RoutingConfigCreateRequest): Promise<RoutingDictionaryRecord> {\n return this.request('POST', '/routing', { body: params });\n }\n\n /**\n * Retrieve a routing algorithm by its ID.\n *\n * @param algorithmId - The routing algorithm ID.\n * @returns The full routing configuration including the algorithm body.\n */\n async retrieve(algorithmId: string): Promise<MerchantRoutingAlgorithm> {\n return this.request('GET', `/routing/${encodeURIComponent(algorithmId)}`);\n }\n\n /**\n * Activate a routing algorithm, making it the active routing strategy.\n *\n * Always sends a JSON body (default `{}`) so the request carries the\n * `Content-Type: application/json` header that the server requires.\n *\n * @param algorithmId - The routing algorithm ID to activate.\n * @param params - Optional activation payload (e.g. `transaction_type`).\n */\n async activate(\n algorithmId: string,\n params: RoutingActivatePayload = {},\n ): Promise<RoutingDictionaryRecord> {\n return this.request('POST', `/routing/${encodeURIComponent(algorithmId)}/activate`, {\n body: params,\n });\n }\n\n /**\n * Deactivate the currently active routing algorithm (falls back to default routing).\n *\n * Always sends a JSON body (default `{}`) so the request carries the\n * `Content-Type: application/json` header that the server requires.\n *\n * @param params - Optional deactivation payload.\n */\n async deactivate(params: RoutingDeactivateRequest = {}): Promise<RoutingDictionaryRecord> {\n return this.request('POST', '/routing/deactivate', { body: params });\n }\n\n /**\n * Edit a static routing configuration.\n *\n * Partial: send only the fields to change. `name`/`description` are\n * metadata-only; `algorithm` is a wholesale rule replacement, validated\n * against the shop exactly as at create. `modified_at` is bumped either way.\n *\n * `PUT /routing/{algorithmId}`\n *\n * @param algorithmId - The routing algorithm ID to edit.\n * @param params - The fields to change (at least one required).\n * @returns The updated routing configuration including the algorithm body.\n */\n async update(\n algorithmId: string,\n params: RoutingConfigUpdateRequest,\n options?: RequestExtras,\n ): Promise<MerchantRoutingAlgorithm> {\n return this.request('PUT', `/routing/${encodeURIComponent(algorithmId)}`, {\n body: params,\n ...options,\n });\n }\n\n /**\n * Delete a static routing configuration.\n *\n * A soft delete: the configuration disappears from every list and read, but\n * its version history is kept server-side for audit. The live configuration\n * of a shop cannot be deleted — the backend refuses it (400, `IR_16`); deactivate it first.\n * Only `single`, `priority`, `volume_split` and `advanced` payment\n * configurations qualify (400 otherwise).\n *\n * `DELETE /routing/{algorithmId}`\n *\n * @param algorithmId - The routing algorithm to delete.\n */\n async delete(algorithmId: string): Promise<RoutingConfigDeleteResponse> {\n return this.request('DELETE', `/routing/${encodeURIComponent(algorithmId)}`);\n }\n\n /**\n * Every content window a routing configuration has had, oldest first.\n *\n * A configuration's rule can be edited in place, so this is what makes \"which\n * rule decided this payment\" answerable after the fact. Each entry is the rule\n * as it stood between `valid_from` and `valid_until`; the windows of one\n * config abut exactly, with no gap.\n *\n * Paging covers the whole timeline including the live window, so a page never\n * holds more than `limit` entries and the live one — the only entry without a\n * `valid_until` — comes back on exactly one page. Advance `offset` by `limit`;\n * a page past the end is empty, and `total_count` says where that end is\n * without probing for it.\n *\n * `GET /routing/{algorithmId}/history`\n *\n * @param algorithmId - The routing algorithm to read the history of.\n * @param params - Optional paging.\n */\n async history(\n algorithmId: string,\n params: RoutingHistoryParams = {},\n ): Promise<RoutingConfigHistoryResponse> {\n return this.request('GET', `/routing/${encodeURIComponent(algorithmId)}/history`, {\n query: params as Record<string, number | null | undefined>,\n });\n }\n\n /**\n * A shop's per-connector caps, each with its unit and window and how much of\n * the current window is spent (`used`) or held by payments in flight\n * (`reserved`).\n *\n * `GET /routing/connector-caps/{profileId}`\n */\n async connectorCaps(profileId: string): Promise<RoutingConnectorCaps> {\n return this.request('GET', `/routing/connector-caps/${encodeURIComponent(profileId)}`);\n }\n\n /** Read a shop's dated limit overrides. `GET /routing/connector-cap-schedules/{profileId}` */\n async connectorCapSchedules(profileId: string): Promise<RoutingConnectorCapSchedule> {\n return this.request('GET', `/routing/connector-cap-schedules/${encodeURIComponent(profileId)}`);\n }\n\n /**\n * Replace a shop's complete schedule using its last-read revision.\n * Remove an entry to cancel it; ordinary configured caps are unchanged.\n * Instants require explicit offsets, and overlapping entries for the same\n * account and unit are refused by the server. Capability preflight refuses\n * unsupported backends before submitting any schedule.\n *\n * `PUT /routing/connector-cap-schedules/{profileId}`\n */\n async setConnectorCapSchedules(\n profileId: string,\n params: RoutingConnectorCapSchedule,\n ): Promise<RoutingConnectorCapSchedule> {\n const caps = await this.connectorCaps(profileId);\n if (!caps.features?.includes('limit_schedules')) {\n throw new Error('Connector limit schedules are unsupported by the serving backend');\n }\n return this.request(\n 'PUT',\n `/routing/connector-cap-schedules/${encodeURIComponent(profileId)}`,\n {\n body: params,\n },\n );\n }\n\n /** Change the drawn value of an active scheduled range; preserves all usage. */\n async shuffleConnectorCapSchedule(\n profileId: string,\n params: RoutingConnectorCapScheduleShuffle,\n ): Promise<RoutingConnectorCaps> {\n const caps = await this.connectorCaps(profileId);\n if (!caps.features?.includes('limit_schedules')) {\n throw new Error('Connector limit schedules are unsupported by the serving backend');\n }\n return this.request(\n 'POST',\n `/routing/connector-cap-schedules/${encodeURIComponent(profileId)}/shuffle`,\n { body: params },\n );\n }\n\n /**\n * A shop's recurring time plan with its revision, the band active now, the\n * next change and each limit the plan releases in parts.\n *\n * `GET /routing/time-plans/{profileId}`\n */\n async timePlan(profileId: string): Promise<RoutingTimePlanDocument> {\n return this.request('GET', `/routing/time-plans/${encodeURIComponent(profileId)}`);\n }\n\n /**\n * Replace a shop's whole time plan using its last-read revision; `plan`\n * null removes it. Usage, reservations and dated limit entries are left as\n * they are. Overlapping bands, shares that do not total 100 and a stale\n * revision are refused by the server. Capability preflight refuses a\n * backend that would not apply the plan before anything is sent.\n *\n * `PUT /routing/time-plans/{profileId}`\n */\n async setTimePlan(\n profileId: string,\n params: Pick<RoutingTimePlanDocument, 'revision' | 'plan'>,\n ): Promise<RoutingTimePlanDocument> {\n const caps = await this.connectorCaps(profileId);\n if (!caps.features?.includes('time_plans')) {\n throw new Error('Time plans are unsupported by the serving backend');\n }\n return this.request('PUT', `/routing/time-plans/${encodeURIComponent(profileId)}`, {\n body: { revision: params.revision, plan: params.plan },\n });\n }\n\n /**\n * The live `routing_volume` counters behind a shop's active advanced\n * program: one per distinct budget the program reads, each with the window\n * it covers, the figure in the pinned threshold currency, and the rules that\n * read it. Lets a merchant see whether a `routing_volume < 50000` rule is at\n * 120 or at 499 today, and support answer why a payment went to the overflow\n * connector.\n *\n * What routing will use right now, not what the shop turned over: the\n * counters are held in Redis only and a lost Redis restarts the window at\n * zero. Read-only; needs the same permission as reading the rules.\n *\n * `GET /routing/volume-counters/{profileId}`\n */\n async volumeCounters(profileId: string): Promise<RoutingVolumeCounters> {\n return this.request('GET', `/routing/volume-counters/${encodeURIComponent(profileId)}`);\n }\n\n /**\n * Replace a shop's per-connector caps.\n *\n * Whole-set replacement, not a patch: the list sent becomes the complete set\n * of capped connectors, and an empty list clears them all — which is how\n * acquirer onboarding finishes, the new account ceasing to be a special case.\n * Re-send every other cap with its `unit`, `window` and `currency` as read:\n * an amount cap sent back without its `unit` is refused, because it carries a\n * currency and would otherwise be a payment count.\n *\n * Every account named must belong to this shop; one that does not is refused.\n * So is an amount cap without a `currency`, and a payment cap with one.\n *\n * An account may appear twice — a payment count and a budget — and never\n * twice in one `unit`. Re-send a range with its `limit_max`, or it is stored\n * as its bottom. Never re-send `current_limit` as `set_current_limit`: the\n * value read belongs to the window it was read in, and pinning it into a\n * window that has since reset is a limit nobody chose.\n *\n * `PUT /routing/connector-caps/{profileId}`\n */\n async setConnectorCaps(\n profileId: string,\n params: RoutingConnectorCaps,\n ): Promise<RoutingConnectorCaps> {\n return this.request('PUT', `/routing/connector-caps/${encodeURIComponent(profileId)}`, {\n body: params,\n });\n }\n\n /**\n * Reset one limit's usage for the window open now: what settled payments\n * spent stops counting, so the account takes payments again. Payments still\n * in flight keep their hold and count once they complete. The account's\n * other limit is untouched. Offered by a router that lists `usage_reset` in\n * `features`; refused (422) for an account with no limit in that unit.\n *\n * `POST /routing/connector-caps/{profileId}/reset`\n */\n async resetConnectorCapUsage(\n profileId: string,\n params: RoutingConnectorCapResetRequest,\n ): Promise<RoutingConnectorCapReset> {\n return this.request('POST', `/routing/connector-caps/${encodeURIComponent(profileId)}/reset`, {\n body: params,\n });\n }\n\n /**\n * Every connector cap override of the merchant: the accounts whose limits a\n * project or shop overrides.\n *\n * `GET /routing/connector-caps/overrides`\n */\n async connectorCapOverrides(): Promise<ConnectorCapOverrideList> {\n return this.request('GET', '/routing/connector-caps/overrides');\n }\n\n /**\n * One connector account's overrides, and for every shop the account takes\n * payments in, which limits apply there and where they come from.\n *\n * `GET /routing/connector-caps/accounts/{merchantConnectorId}/overrides`\n */\n async accountConnectorCapOverrides(merchantConnectorId: string): Promise<ConnectorCapOverrides> {\n return this.request(\n 'GET',\n `/routing/connector-caps/accounts/${encodeURIComponent(merchantConnectorId)}/overrides`,\n );\n }\n\n /**\n * Override an account's limits for one project (and every shop below it) or\n * one shop: `unlimited` lifts them there, `own` sets limits of its own,\n * counted separately from the account's. Replaces an existing override of\n * the same target. Setting the same target again keeps the usage its\n * current window already counted.\n *\n * `PUT /routing/connector-caps/accounts/{merchantConnectorId}/overrides/{level}/{scopeId}`\n */\n async setConnectorCapOverride(\n merchantConnectorId: string,\n level: ConnectorCapOverrideLevel,\n scopeId: string,\n params: ConnectorCapOverrideRequest,\n ): Promise<ConnectorCapOverride> {\n return this.request('PUT', this.overridePath(merchantConnectorId, level, scopeId), {\n body: params,\n });\n }\n\n /**\n * Remove an account's override for one project or shop; the next level up\n * applies again. Answers the override removed.\n *\n * `DELETE /routing/connector-caps/accounts/{merchantConnectorId}/overrides/{level}/{scopeId}`\n */\n async deleteConnectorCapOverride(\n merchantConnectorId: string,\n level: ConnectorCapOverrideLevel,\n scopeId: string,\n ): Promise<ConnectorCapOverride> {\n return this.request('DELETE', this.overridePath(merchantConnectorId, level, scopeId));\n }\n\n private overridePath(\n merchantConnectorId: string,\n level: ConnectorCapOverrideLevel,\n scopeId: string,\n ): string {\n return `/routing/connector-caps/accounts/${encodeURIComponent(merchantConnectorId)}/overrides/${encodeURIComponent(level)}/${encodeURIComponent(scopeId)}`;\n }\n\n /**\n * List all routing algorithms for the current merchant.\n *\n * @returns The routing dictionary (records + currently active id).\n */\n async list(): Promise<RoutingDictionary> {\n return this.request('GET', '/routing');\n }\n\n /**\n * Connector names denied at routing for a shop (explicit denies plus\n * whitelist-implied exclusions). Read-only; surfaced in the routing builder.\n *\n * `GET /routing/connector-restrictions/{profileId}`\n */\n async connectorRestrictions(profileId: string): Promise<ProfileDeniedConnectorsResponse> {\n return this.request('GET', `/routing/connector-restrictions/${encodeURIComponent(profileId)}`);\n }\n\n // --- Advanced operations (Task 3.4) ---\n\n /** Get active routing config. `GET /routing/active` */\n async getActive(): Promise<LinkedRoutingConfigRetrieveResponse> {\n return this.request('GET', '/routing/active');\n }\n\n /** Update default routing config. `POST /routing/default` */\n async updateDefault(params: Record<string, unknown>): Promise<RoutableConnectorChoice[]> {\n return this.request('POST', '/routing/default', { body: params });\n }\n\n /** Retrieve default config for profiles. `GET /routing/default/profile` */\n async getDefaultProfile(): Promise<RoutableConnectorChoice[] | ProfileDefaultRoutingConfig[]> {\n return this.request('GET', '/routing/default/profile');\n }\n\n /**\n * Retrieve one profile's default config. `GET /routing/default/profile/{profileId}`\n *\n * The narrow counterpart of `getDefaultProfile()`: that one returns every\n * profile of the merchant and needs merchant-level routing read, so a\n * profile-scoped (shop) role could write its own default through\n * `updateDefaultProfile()` but never read it back. This read is gated on\n * profile-level routing read and pinned to the caller's own profile — a shop\n * role asking for a sibling profile is refused.\n */\n async getDefaultForProfile(profileId: string): Promise<ProfileDefaultRoutingConfig> {\n return this.request('GET', `/routing/default/profile/${encodeURIComponent(profileId)}`);\n }\n\n /**\n * Update default config for a profile. `POST /routing/default/profile/{profileId}`\n *\n * Send the list alone to keep the shop's fallback mode, or `{ connectors, mode, splits }` to set\n * it. A `volume_split` whose shares do not total 100 is refused.\n */\n async updateDefaultProfile(\n profileId: string,\n params: DefaultRoutingConfigUpdate | Record<string, unknown>,\n options?: RequestExtras,\n ): Promise<ProfileDefaultRoutingConfig> {\n return this.request('POST', `/routing/default/profile/${encodeURIComponent(profileId)}`, {\n body: params,\n ...options,\n });\n }\n\n /** List routing configs for profile. `GET /routing/list/profile` */\n async listForProfile(): Promise<RoutingDictionary> {\n return this.request('GET', '/routing/list/profile');\n }\n\n /** Evaluate a routing rule. `POST /routing/rule/evaluate` */\n async evaluateRule(params: Record<string, unknown>): Promise<Record<string, unknown>> {\n return this.request('POST', '/routing/rule/evaluate', { body: params });\n }\n\n /** Migrate routing rules for profile. `POST /routing/rule/migrate` */\n async migrateRule(params: Record<string, unknown>): Promise<Record<string, unknown>> {\n return this.request('POST', '/routing/rule/migrate', { body: params });\n }\n\n /** Evaluate routing for a payment. `POST /routing/evaluate` */\n async evaluate(params: Record<string, unknown>): Promise<Record<string, unknown>> {\n return this.request('POST', '/routing/evaluate', { body: params });\n }\n\n /** Update gateway scores for dynamic routing. `POST /routing/feedback` */\n async feedback(params: Record<string, unknown>): Promise<Record<string, unknown>> {\n return this.request('POST', '/routing/feedback', { body: params });\n }\n}\n\nclass RoutingDecisionManager {\n constructor(private readonly request: RequestFn) {}\n\n /** Upsert decision manager config. `PUT /routing/decision` */\n async upsert(\n params: Record<string, unknown>,\n options?: RequestExtras,\n ): Promise<Record<string, unknown>> {\n return this.request('PUT', '/routing/decision', { body: params, ...options });\n }\n\n /** Retrieve decision manager config. `GET /routing/decision` */\n async retrieve(): Promise<Record<string, unknown>> {\n return this.request('GET', '/routing/decision');\n }\n\n /** Delete decision manager config. `DELETE /routing/decision` */\n async delete(options?: RequestExtras): Promise<Record<string, unknown>> {\n return this.request('DELETE', '/routing/decision', options);\n }\n\n /** Upsert surcharge decision config. `PUT /routing/decision/surcharge` */\n async upsertSurcharge(\n params: Record<string, unknown>,\n options?: RequestExtras,\n ): Promise<Record<string, unknown>> {\n return this.request('PUT', '/routing/decision/surcharge', { body: params, ...options });\n }\n\n /** Retrieve surcharge decision config. `GET /routing/decision/surcharge` */\n async retrieveSurcharge(): Promise<Record<string, unknown>> {\n return this.request('GET', '/routing/decision/surcharge');\n }\n\n /** Delete surcharge decision config. `DELETE /routing/decision/surcharge` */\n async deleteSurcharge(options?: RequestExtras): Promise<Record<string, unknown>> {\n return this.request('DELETE', '/routing/decision/surcharge', options);\n }\n}\n\n/**\n * Merchant-friendly surcharge rules: configure a per-payment-method surcharge\n * (fixed or %) added to the amount the buyer pays — without hand-writing the\n * Euclid DSL. Scope to a shop via `profile_id` (omit for merchant-wide).\n *\n * Distinct from the platform fee (a balance deduction): a surcharge changes what\n * the buyer is charged.\n */\nclass SurchargeRules {\n constructor(private readonly request: RequestFn) {}\n\n /**\n * Create or replace the surcharge program for a scope.\n *\n * `PUT /routing/surcharge/rules`\n *\n * @example\n * ```typescript\n * await delopay.routing.surchargeRules.upsert({\n * surcharges: [\n * { payment_method: 'crypto', surcharge: { rate: { percent: 1.0 } } },\n * { payment_method: 'card', surcharge: { fixed: { amount: 35 } } },\n * ],\n * });\n * ```\n */\n async upsert(\n params: SurchargeRuleRequest,\n options?: RequestExtras,\n ): Promise<SurchargeRuleResponse> {\n return this.request('PUT', '/routing/surcharge/rules', { body: params, ...options });\n }\n\n /**\n * Retrieve the active surcharge program for a scope, or `null` when none is set.\n *\n * `GET /routing/surcharge/rules?profile_id={profileId}`\n *\n * @param profileId - Shop scope. Omit for the merchant-wide rule.\n */\n async retrieve(profileId?: string): Promise<SurchargeRuleResponse | null> {\n return this.request('GET', '/routing/surcharge/rules', {\n query: { profile_id: profileId },\n });\n }\n\n /**\n * Deactivate the active surcharge program for a scope.\n *\n * `DELETE /routing/surcharge/rules?profile_id={profileId}`\n *\n * @param profileId - Shop scope. Omit for the merchant-wide rule.\n */\n async delete(profileId?: string, options?: RequestExtras): Promise<void> {\n return this.request('DELETE', '/routing/surcharge/rules', {\n query: { profile_id: profileId },\n ...options,\n });\n }\n}\n\n/**\n * Checkout theme programs: which of a shop's stored appearance variants a buyer\n * is shown.\n *\n * Same engine and same wire format as the advanced routing rules above — a\n * Euclid program whose rules run top-down, first match wins, with\n * `defaultSelection` as the fallback — with the output swapped for a variant\n * name. That is deliberate: the dashboard's routing rule builder can author\n * these without learning a second condition language.\n *\n * **A theme program decides a look and nothing else.** It cannot express which\n * payment methods are offered, what is charged, which provider processes the\n * payment, or whether it succeeds. The allowed dimensions are fixed server-side\n * by the output type — see {@link CheckoutThemeDimension} — so that is a\n * property of the API rather than a convention.\n *\n * Naming a variant the shop has not defined is **not** an error: the checkout\n * falls back to the shop default, exactly as it does for an unknown `?theme=`,\n * because a buyer who cannot pay is worse than a buyer who sees the default\n * look. Such names come back in `warnings` instead, recomputed on every read.\n */\nclass CheckoutThemeRules {\n constructor(private readonly request: RequestFn) {}\n\n /**\n * Create or replace the theme program for a scope.\n *\n * `PUT /routing/checkout-theme/rules`\n *\n * Supersedes rather than overwrites: the previous active version is retired\n * and a new one stored, so the record of which look was live when survives.\n * Pass `active: false` to store a revision **without** retiring the live one —\n * that is where a program drafted against a variant you have not built yet\n * belongs.\n *\n * @example A phone in Germany gets the compact look; everyone else the house style.\n * ```typescript\n * await delopay.routing.checkoutThemeRules.upsert({\n * name: 'Autumn targeting',\n * profile_id: 'pro_...',\n * algorithm: {\n * rules: [\n * {\n * name: 'German phones',\n * connectorSelection: { theme: { variant: 'compact' } },\n * statements: [\n * {\n * condition: [\n * {\n * lhs: 'device_class',\n * comparison: 'equal',\n * value: { type: 'enum_variant', value: 'phone' },\n * metadata: {},\n * },\n * {\n * lhs: 'browser_language',\n * comparison: 'equal',\n * value: { type: 'enum_variant', value: 'de' },\n * metadata: {},\n * },\n * ],\n * },\n * ],\n * },\n * ],\n * defaultSelection: { theme: { variant: 'house' } },\n * metadata: {},\n * },\n * });\n * ```\n */\n async upsert(params: CheckoutThemeProgramRequest): Promise<CheckoutThemeProgramResponse> {\n return this.request('PUT', '/routing/checkout-theme/rules', { body: params });\n }\n\n /**\n * Retrieve the active theme program for a scope, or `null` when none is set.\n *\n * `GET /routing/checkout-theme/rules?profile_id={profileId}`\n *\n * @param profileId - Shop scope. Omit for the merchant-wide program. A\n * shop-scoped caller that omits it gets its own shop's program.\n */\n async retrieve(profileId?: string): Promise<CheckoutThemeProgramResponse | null> {\n return this.request('GET', '/routing/checkout-theme/rules', {\n query: { profile_id: profileId },\n });\n }\n\n /**\n * Deactivate the active theme program for a scope. Idempotent.\n *\n * `DELETE /routing/checkout-theme/rules?profile_id={profileId}`\n *\n * Deactivation, not deletion — the stored row is what says which look was\n * live when, and that history cannot be reconstructed after the fact. Shops\n * go back to their default appearance immediately.\n *\n * @param profileId - Shop scope. Omit for the merchant-wide program.\n */\n async delete(profileId?: string): Promise<void> {\n return this.request('DELETE', '/routing/checkout-theme/rules', {\n query: { profile_id: profileId },\n });\n }\n}\n\n/**\n * Rendered-to-paid conversion, per appearance variant and segment.\n *\n * Answers the one question theme targeting exists for: *does variant B convert\n * better than the house style, on phones, in Germany?*\n *\n * **What a rate here means.** The denominator is backend-observed checkout page\n * opens, deduplicated by device within the hosted checkout's cache window, with\n * automated traffic excluded from both sides. It is narrower than \"paints\", and\n * that is deliberate - counting one buyer's refresh as a second render would\n * understate conversion. The exact basis travels with every response in\n * `denominator`, and the ways it is not the whole truth travel in `caveats`.\n *\n * **The server decides what may be concluded, not you.** Rate, Wilson interval,\n * per-cell `verdict` and the variant-vs-default `separates` test are computed\n * once, server-side, and shipped as values. Do not recompute them: the first\n * client that rounds differently tells a merchant a difference is real when the\n * server says it is not.\n */\nclass CheckoutThemeConversion {\n constructor(private readonly request: RequestFn) {}\n\n /**\n * Rendered-to-paid conversion for a shop over a window.\n *\n * `GET /routing/checkout-theme/conversion`\n *\n * Requires `CheckoutBranding` read at profile scope - the same permission\n * that governs seeing how a checkout looks.\n *\n * @param params - Window (RFC3339, `start` inclusive / `end` exclusive), the\n * shop, the dimension to group by, and the optional `device_class`,\n * `country` and `selection` filters.\n *\n * @example Which variant wins on which device, over the last 30 days.\n * ```typescript\n * const report = await delopay.routing.checkoutThemeConversion.retrieve({\n * profile_id: 'pro_...',\n * start: '2026-07-21T00:00:00Z',\n * end: '2026-08-20T00:00:00Z',\n * segment: 'device',\n * });\n *\n * for (const c of report.comparisons) {\n * if (!c.separates) continue; // \"not shown to differ\" - say nothing\n * console.log(`${c.variant} on ${c.segment}: ${c.higher} converts better`);\n * }\n * ```\n */\n async retrieve(params: CheckoutThemeConversionQuery): Promise<CheckoutThemeConversionResponse> {\n return this.request('GET', '/routing/checkout-theme/conversion', {\n query: {\n profile_id: params.profile_id,\n start: params.start,\n end: params.end,\n segment: params.segment,\n device_class: params.device_class ?? undefined,\n country: params.country ?? undefined,\n selection: params.selection ?? undefined,\n },\n });\n }\n}\n"]}