@adonis-agora/payments 0.2.0 → 0.4.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/CHANGELOG.md +2375 -0
  2. package/dist/assets/spa/assets/index-B7rU8eIL.css +2 -0
  3. package/dist/assets/spa/assets/index-BcM2VH5k.js +10 -0
  4. package/dist/assets/spa/assets/index-BcM2VH5k.js.map +1 -0
  5. package/dist/assets/spa/index.html +20 -0
  6. package/dist/commands/main.d.ts +4 -3
  7. package/dist/commands/main.d.ts.map +1 -1
  8. package/dist/commands/main.js +9 -2
  9. package/dist/commands/main.js.map +1 -1
  10. package/dist/commands/make_billable.d.ts.map +1 -1
  11. package/dist/commands/make_billable.js +1 -1
  12. package/dist/commands/make_billable.js.map +1 -1
  13. package/dist/commands/make_webhook_handler.d.ts.map +1 -1
  14. package/dist/commands/make_webhook_handler.js +1 -1
  15. package/dist/commands/make_webhook_handler.js.map +1 -1
  16. package/dist/commands/payments_health.d.ts +31 -0
  17. package/dist/commands/payments_health.d.ts.map +1 -0
  18. package/dist/commands/payments_health.js +113 -0
  19. package/dist/commands/payments_health.js.map +1 -0
  20. package/dist/commands/payments_sync.d.ts +18 -4
  21. package/dist/commands/payments_sync.d.ts.map +1 -1
  22. package/dist/commands/payments_sync.js +136 -40
  23. package/dist/commands/payments_sync.js.map +1 -1
  24. package/dist/commands/payments_webhook.d.ts.map +1 -1
  25. package/dist/commands/payments_webhook.js.map +1 -1
  26. package/dist/configure.d.ts +12 -5
  27. package/dist/configure.d.ts.map +1 -1
  28. package/dist/configure.js +18 -5
  29. package/dist/configure.js.map +1 -1
  30. package/dist/providers/dashboard_provider.d.ts +97 -0
  31. package/dist/providers/dashboard_provider.d.ts.map +1 -0
  32. package/dist/providers/dashboard_provider.js +430 -0
  33. package/dist/providers/dashboard_provider.js.map +1 -0
  34. package/dist/providers/payments_client_provider.d.ts +41 -0
  35. package/dist/providers/payments_client_provider.d.ts.map +1 -0
  36. package/dist/providers/payments_client_provider.js +95 -0
  37. package/dist/providers/payments_client_provider.js.map +1 -0
  38. package/dist/providers/payments_provider.d.ts +35 -0
  39. package/dist/providers/payments_provider.d.ts.map +1 -1
  40. package/dist/providers/payments_provider.js +250 -36
  41. package/dist/providers/payments_provider.js.map +1 -1
  42. package/dist/src/billing/billing_health.d.ts +85 -0
  43. package/dist/src/billing/billing_health.d.ts.map +1 -0
  44. package/dist/src/billing/billing_health.js +155 -0
  45. package/dist/src/billing/billing_health.js.map +1 -0
  46. package/dist/src/billing/billing_overview.d.ts +4 -3
  47. package/dist/src/billing/billing_overview.d.ts.map +1 -1
  48. package/dist/src/billing/billing_overview.js +14 -5
  49. package/dist/src/billing/billing_overview.js.map +1 -1
  50. package/dist/src/billing/billing_store.d.ts +634 -5
  51. package/dist/src/billing/billing_store.d.ts.map +1 -1
  52. package/dist/src/billing/billing_store.js +18 -1
  53. package/dist/src/billing/billing_store.js.map +1 -1
  54. package/dist/src/billing/index.d.ts +4 -3
  55. package/dist/src/billing/index.d.ts.map +1 -1
  56. package/dist/src/billing/index.js +2 -1
  57. package/dist/src/billing/index.js.map +1 -1
  58. package/dist/src/billing/list_query.d.ts +16 -0
  59. package/dist/src/billing/list_query.d.ts.map +1 -0
  60. package/dist/src/billing/list_query.js +28 -0
  61. package/dist/src/billing/list_query.js.map +1 -0
  62. package/dist/src/billing/lucid_billing_store.d.ts +122 -4
  63. package/dist/src/billing/lucid_billing_store.d.ts.map +1 -1
  64. package/dist/src/billing/lucid_billing_store.js +811 -13
  65. package/dist/src/billing/lucid_billing_store.js.map +1 -1
  66. package/dist/src/billing/mixins/index.d.ts +5 -2
  67. package/dist/src/billing/mixins/index.d.ts.map +1 -1
  68. package/dist/src/billing/mixins/index.js +5 -2
  69. package/dist/src/billing/mixins/index.js.map +1 -1
  70. package/dist/src/billing/mixins/with_audit_event.d.ts +48 -0
  71. package/dist/src/billing/mixins/with_audit_event.d.ts.map +1 -0
  72. package/dist/src/billing/mixins/with_audit_event.js +77 -0
  73. package/dist/src/billing/mixins/with_audit_event.js.map +1 -0
  74. package/dist/src/billing/mixins/with_billable.d.ts.map +1 -1
  75. package/dist/src/billing/mixins/with_customer.d.ts +39 -0
  76. package/dist/src/billing/mixins/with_customer.d.ts.map +1 -0
  77. package/dist/src/billing/mixins/with_customer.js +68 -0
  78. package/dist/src/billing/mixins/with_customer.js.map +1 -0
  79. package/dist/src/billing/mixins/with_dispute.d.ts +68 -0
  80. package/dist/src/billing/mixins/with_dispute.d.ts.map +1 -0
  81. package/dist/src/billing/mixins/with_dispute.js +83 -0
  82. package/dist/src/billing/mixins/with_dispute.js.map +1 -0
  83. package/dist/src/billing/mixins/with_payment.d.ts +42 -0
  84. package/dist/src/billing/mixins/with_payment.d.ts.map +1 -1
  85. package/dist/src/billing/mixins/with_payment.js +29 -3
  86. package/dist/src/billing/mixins/with_payment.js.map +1 -1
  87. package/dist/src/billing/mixins/with_subscription.d.ts +7 -0
  88. package/dist/src/billing/mixins/with_subscription.d.ts.map +1 -1
  89. package/dist/src/billing/mixins/with_subscription.js +15 -1
  90. package/dist/src/billing/mixins/with_subscription.js.map +1 -1
  91. package/dist/src/billing/mixins/with_usage_event.d.ts +7 -0
  92. package/dist/src/billing/mixins/with_usage_event.d.ts.map +1 -1
  93. package/dist/src/billing/mixins/with_usage_event.js +15 -1
  94. package/dist/src/billing/mixins/with_usage_event.js.map +1 -1
  95. package/dist/src/billing/mixins/with_webhook_event.d.ts +18 -0
  96. package/dist/src/billing/mixins/with_webhook_event.d.ts.map +1 -1
  97. package/dist/src/billing/mixins/with_webhook_event.js +18 -1
  98. package/dist/src/billing/mixins/with_webhook_event.js.map +1 -1
  99. package/dist/src/billing/resolve_dispatch.d.ts +22 -0
  100. package/dist/src/billing/resolve_dispatch.d.ts.map +1 -0
  101. package/dist/src/billing/resolve_dispatch.js +44 -0
  102. package/dist/src/billing/resolve_dispatch.js.map +1 -0
  103. package/dist/src/billing/resolve_store.d.ts +18 -0
  104. package/dist/src/billing/resolve_store.d.ts.map +1 -0
  105. package/dist/src/billing/resolve_store.js +35 -0
  106. package/dist/src/billing/resolve_store.js.map +1 -0
  107. package/dist/src/billing/schema.d.ts +108 -0
  108. package/dist/src/billing/schema.d.ts.map +1 -0
  109. package/dist/src/billing/schema.js +350 -0
  110. package/dist/src/billing/schema.js.map +1 -0
  111. package/dist/src/billing/webhook_dispatcher.d.ts +95 -16
  112. package/dist/src/billing/webhook_dispatcher.d.ts.map +1 -1
  113. package/dist/src/billing/webhook_dispatcher.js +186 -33
  114. package/dist/src/billing/webhook_dispatcher.js.map +1 -1
  115. package/dist/src/billing/webhook_events.d.ts +67 -1
  116. package/dist/src/billing/webhook_events.d.ts.map +1 -1
  117. package/dist/src/billing/webhook_events.js +15 -0
  118. package/dist/src/billing/webhook_events.js.map +1 -1
  119. package/dist/src/billing/webhook_processor.d.ts.map +1 -1
  120. package/dist/src/billing/webhook_processor.js +325 -5
  121. package/dist/src/billing/webhook_processor.js.map +1 -1
  122. package/dist/src/client/define_config.d.ts +150 -0
  123. package/dist/src/client/define_config.d.ts.map +1 -0
  124. package/dist/src/client/define_config.js +98 -0
  125. package/dist/src/client/define_config.js.map +1 -0
  126. package/dist/src/client/handlers.d.ts +71 -0
  127. package/dist/src/client/handlers.d.ts.map +1 -0
  128. package/dist/src/client/handlers.js +119 -0
  129. package/dist/src/client/handlers.js.map +1 -0
  130. package/dist/src/client/index.d.ts +15 -0
  131. package/dist/src/client/index.d.ts.map +1 -0
  132. package/dist/src/client/index.js +12 -0
  133. package/dist/src/client/index.js.map +1 -0
  134. package/dist/src/client/statuses.d.ts +38 -0
  135. package/dist/src/client/statuses.d.ts.map +1 -0
  136. package/dist/src/client/statuses.js +42 -0
  137. package/dist/src/client/statuses.js.map +1 -0
  138. package/dist/src/dashboard/actions.d.ts +143 -0
  139. package/dist/src/dashboard/actions.d.ts.map +1 -0
  140. package/dist/src/dashboard/actions.js +112 -0
  141. package/dist/src/dashboard/actions.js.map +1 -0
  142. package/dist/src/dashboard/auth.d.ts +136 -0
  143. package/dist/src/dashboard/auth.d.ts.map +1 -0
  144. package/dist/src/dashboard/auth.js +152 -0
  145. package/dist/src/dashboard/auth.js.map +1 -0
  146. package/dist/src/dashboard/define_config.d.ts +80 -0
  147. package/dist/src/dashboard/define_config.d.ts.map +1 -0
  148. package/dist/src/dashboard/define_config.js +83 -0
  149. package/dist/src/dashboard/define_config.js.map +1 -0
  150. package/dist/src/dashboard/handlers.d.ts +281 -0
  151. package/dist/src/dashboard/handlers.d.ts.map +1 -0
  152. package/dist/src/dashboard/handlers.js +960 -0
  153. package/dist/src/dashboard/handlers.js.map +1 -0
  154. package/dist/src/dashboard/index.d.ts +17 -0
  155. package/dist/src/dashboard/index.d.ts.map +1 -0
  156. package/dist/src/dashboard/index.js +13 -0
  157. package/dist/src/dashboard/index.js.map +1 -0
  158. package/dist/src/dashboard/login_page.d.ts +23 -0
  159. package/dist/src/dashboard/login_page.d.ts.map +1 -0
  160. package/dist/src/dashboard/login_page.js +170 -0
  161. package/dist/src/dashboard/login_page.js.map +1 -0
  162. package/dist/src/dashboard/period.d.ts +31 -0
  163. package/dist/src/dashboard/period.d.ts.map +1 -0
  164. package/dist/src/dashboard/period.js +44 -0
  165. package/dist/src/dashboard/period.js.map +1 -0
  166. package/dist/src/dashboard/session_cookie.d.ts +42 -0
  167. package/dist/src/dashboard/session_cookie.d.ts.map +1 -0
  168. package/dist/src/dashboard/session_cookie.js +97 -0
  169. package/dist/src/dashboard/session_cookie.js.map +1 -0
  170. package/dist/src/dashboard/spa.d.ts +24 -0
  171. package/dist/src/dashboard/spa.d.ts.map +1 -0
  172. package/dist/src/dashboard/spa.js +52 -0
  173. package/dist/src/dashboard/spa.js.map +1 -0
  174. package/dist/src/define_config.d.ts +245 -10
  175. package/dist/src/define_config.d.ts.map +1 -1
  176. package/dist/src/define_config.js +97 -1
  177. package/dist/src/define_config.js.map +1 -1
  178. package/dist/src/diagnostics.d.ts +287 -7
  179. package/dist/src/diagnostics.d.ts.map +1 -1
  180. package/dist/src/diagnostics.js +317 -1
  181. package/dist/src/diagnostics.js.map +1 -1
  182. package/dist/src/driver.d.ts +139 -5
  183. package/dist/src/driver.d.ts.map +1 -1
  184. package/dist/src/drivers/abacate.d.ts +13 -3
  185. package/dist/src/drivers/abacate.d.ts.map +1 -1
  186. package/dist/src/drivers/abacate.js +112 -19
  187. package/dist/src/drivers/abacate.js.map +1 -1
  188. package/dist/src/drivers/adyen.d.ts +164 -0
  189. package/dist/src/drivers/adyen.d.ts.map +1 -0
  190. package/dist/src/drivers/adyen.js +678 -0
  191. package/dist/src/drivers/adyen.js.map +1 -0
  192. package/dist/src/drivers/asaas.d.ts +53 -3
  193. package/dist/src/drivers/asaas.d.ts.map +1 -1
  194. package/dist/src/drivers/asaas.js +364 -29
  195. package/dist/src/drivers/asaas.js.map +1 -1
  196. package/dist/src/drivers/dodo.d.ts +135 -0
  197. package/dist/src/drivers/dodo.d.ts.map +1 -0
  198. package/dist/src/drivers/dodo.js +864 -0
  199. package/dist/src/drivers/dodo.js.map +1 -0
  200. package/dist/src/drivers/efi.d.ts +98 -0
  201. package/dist/src/drivers/efi.d.ts.map +1 -0
  202. package/dist/src/drivers/efi.js +628 -0
  203. package/dist/src/drivers/efi.js.map +1 -0
  204. package/dist/src/drivers/infinitepay.d.ts +156 -0
  205. package/dist/src/drivers/infinitepay.d.ts.map +1 -0
  206. package/dist/src/drivers/infinitepay.js +321 -0
  207. package/dist/src/drivers/infinitepay.js.map +1 -0
  208. package/dist/src/drivers/lemonsqueezy.d.ts +125 -0
  209. package/dist/src/drivers/lemonsqueezy.d.ts.map +1 -0
  210. package/dist/src/drivers/lemonsqueezy.js +632 -0
  211. package/dist/src/drivers/lemonsqueezy.js.map +1 -0
  212. package/dist/src/drivers/mercadopago.d.ts +97 -0
  213. package/dist/src/drivers/mercadopago.d.ts.map +1 -0
  214. package/dist/src/drivers/mercadopago.js +844 -0
  215. package/dist/src/drivers/mercadopago.js.map +1 -0
  216. package/dist/src/drivers/mollie.d.ts +125 -0
  217. package/dist/src/drivers/mollie.d.ts.map +1 -0
  218. package/dist/src/drivers/mollie.js +812 -0
  219. package/dist/src/drivers/mollie.js.map +1 -0
  220. package/dist/src/drivers/paddle.d.ts +148 -0
  221. package/dist/src/drivers/paddle.d.ts.map +1 -0
  222. package/dist/src/drivers/paddle.js +738 -0
  223. package/dist/src/drivers/paddle.js.map +1 -0
  224. package/dist/src/drivers/pagarme.d.ts +97 -0
  225. package/dist/src/drivers/pagarme.d.ts.map +1 -0
  226. package/dist/src/drivers/pagarme.js +829 -0
  227. package/dist/src/drivers/pagarme.js.map +1 -0
  228. package/dist/src/drivers/pagbank.d.ts +57 -0
  229. package/dist/src/drivers/pagbank.d.ts.map +1 -0
  230. package/dist/src/drivers/pagbank.js +499 -0
  231. package/dist/src/drivers/pagbank.js.map +1 -0
  232. package/dist/src/drivers/paypal.d.ts +120 -0
  233. package/dist/src/drivers/paypal.d.ts.map +1 -0
  234. package/dist/src/drivers/paypal.js +891 -0
  235. package/dist/src/drivers/paypal.js.map +1 -0
  236. package/dist/src/drivers/polar.d.ts +118 -0
  237. package/dist/src/drivers/polar.d.ts.map +1 -0
  238. package/dist/src/drivers/polar.js +604 -0
  239. package/dist/src/drivers/polar.js.map +1 -0
  240. package/dist/src/drivers/razorpay.d.ts +103 -0
  241. package/dist/src/drivers/razorpay.d.ts.map +1 -0
  242. package/dist/src/drivers/razorpay.js +867 -0
  243. package/dist/src/drivers/razorpay.js.map +1 -0
  244. package/dist/src/drivers/shared.d.ts +33 -0
  245. package/dist/src/drivers/shared.d.ts.map +1 -0
  246. package/dist/src/drivers/shared.js +37 -0
  247. package/dist/src/drivers/shared.js.map +1 -0
  248. package/dist/src/drivers/square.d.ts +133 -0
  249. package/dist/src/drivers/square.d.ts.map +1 -0
  250. package/dist/src/drivers/square.js +905 -0
  251. package/dist/src/drivers/square.js.map +1 -0
  252. package/dist/src/drivers/stripe.d.ts +41 -4
  253. package/dist/src/drivers/stripe.d.ts.map +1 -1
  254. package/dist/src/drivers/stripe.js +823 -26
  255. package/dist/src/drivers/stripe.js.map +1 -1
  256. package/dist/src/drivers/woovi.d.ts +11 -4
  257. package/dist/src/drivers/woovi.d.ts.map +1 -1
  258. package/dist/src/drivers/woovi.js +162 -29
  259. package/dist/src/drivers/woovi.js.map +1 -1
  260. package/dist/src/ensure_customer.d.ts +34 -1
  261. package/dist/src/ensure_customer.d.ts.map +1 -1
  262. package/dist/src/ensure_customer.js +29 -4
  263. package/dist/src/ensure_customer.js.map +1 -1
  264. package/dist/src/hooks/webhook_handlers.d.ts.map +1 -1
  265. package/dist/src/hooks/webhook_handlers.js.map +1 -1
  266. package/dist/src/http.d.ts +37 -3
  267. package/dist/src/http.d.ts.map +1 -1
  268. package/dist/src/http.js +69 -5
  269. package/dist/src/http.js.map +1 -1
  270. package/dist/src/index.d.ts +54 -26
  271. package/dist/src/index.d.ts.map +1 -1
  272. package/dist/src/index.js +29 -12
  273. package/dist/src/index.js.map +1 -1
  274. package/dist/src/invoice/drivers/asaas.d.ts.map +1 -1
  275. package/dist/src/invoice/drivers/asaas.js.map +1 -1
  276. package/dist/src/invoice/drivers/enotas.d.ts.map +1 -1
  277. package/dist/src/invoice/drivers/enotas.js.map +1 -1
  278. package/dist/src/invoice/drivers/focus.d.ts.map +1 -1
  279. package/dist/src/invoice/drivers/focus.js.map +1 -1
  280. package/dist/src/invoice/drivers/plugnotas.d.ts.map +1 -1
  281. package/dist/src/invoice/drivers/plugnotas.js.map +1 -1
  282. package/dist/src/invoice/drivers/tecnospeed.d.ts.map +1 -1
  283. package/dist/src/invoice/drivers/tecnospeed.js.map +1 -1
  284. package/dist/src/invoice/emit_invoice.d.ts.map +1 -1
  285. package/dist/src/invoice/emit_invoice.js +31 -11
  286. package/dist/src/invoice/emit_invoice.js.map +1 -1
  287. package/dist/src/invoice/invoice_manager.d.ts.map +1 -1
  288. package/dist/src/money.d.ts +23 -5
  289. package/dist/src/money.d.ts.map +1 -1
  290. package/dist/src/money.js +72 -7
  291. package/dist/src/money.js.map +1 -1
  292. package/dist/src/payments_manager.d.ts +8 -1
  293. package/dist/src/payments_manager.d.ts.map +1 -1
  294. package/dist/src/payments_manager.js +168 -6
  295. package/dist/src/payments_manager.js.map +1 -1
  296. package/dist/src/services/main.d.ts +38 -0
  297. package/dist/src/services/main.d.ts.map +1 -1
  298. package/dist/src/services/main.js +130 -0
  299. package/dist/src/services/main.js.map +1 -1
  300. package/dist/src/telescope/index.d.ts +2 -0
  301. package/dist/src/telescope/index.d.ts.map +1 -1
  302. package/dist/src/telescope/index.js +1 -0
  303. package/dist/src/telescope/index.js.map +1 -1
  304. package/dist/src/telescope/payments_watcher.d.ts +10 -4
  305. package/dist/src/telescope/payments_watcher.d.ts.map +1 -1
  306. package/dist/src/telescope/payments_watcher.js +66 -14
  307. package/dist/src/telescope/payments_watcher.js.map +1 -1
  308. package/dist/src/telescope/register.d.ts +62 -0
  309. package/dist/src/telescope/register.d.ts.map +1 -0
  310. package/dist/src/telescope/register.js +48 -0
  311. package/dist/src/telescope/register.js.map +1 -0
  312. package/dist/src/testing/fake_payments.d.ts +62 -0
  313. package/dist/src/testing/fake_payments.d.ts.map +1 -0
  314. package/dist/src/testing/fake_payments.js +82 -0
  315. package/dist/src/testing/fake_payments.js.map +1 -0
  316. package/dist/src/testing/fake_payments_driver.d.ts +1 -1
  317. package/dist/src/testing/fake_payments_driver.d.ts.map +1 -1
  318. package/dist/src/testing/fake_payments_driver.js.map +1 -1
  319. package/dist/src/testing/in_memory_billing_store.d.ts +151 -2
  320. package/dist/src/testing/in_memory_billing_store.d.ts.map +1 -1
  321. package/dist/src/testing/in_memory_billing_store.js +517 -4
  322. package/dist/src/testing/in_memory_billing_store.js.map +1 -1
  323. package/dist/src/testing/index.d.ts +3 -2
  324. package/dist/src/testing/index.d.ts.map +1 -1
  325. package/dist/src/testing/index.js +1 -0
  326. package/dist/src/testing/index.js.map +1 -1
  327. package/dist/src/testing/mutable_clock.d.ts.map +1 -1
  328. package/dist/src/types.d.ts +161 -5
  329. package/dist/src/types.d.ts.map +1 -1
  330. package/dist/src/types.js +30 -1
  331. package/dist/src/types.js.map +1 -1
  332. package/dist/src/webhook_handlers.d.ts +96 -2
  333. package/dist/src/webhook_handlers.d.ts.map +1 -1
  334. package/dist/src/webhook_handlers.js +91 -10
  335. package/dist/src/webhook_handlers.js.map +1 -1
  336. package/dist/src/webhook_security.d.ts +94 -3
  337. package/dist/src/webhook_security.d.ts.map +1 -1
  338. package/dist/src/webhook_security.js +173 -9
  339. package/dist/src/webhook_security.js.map +1 -1
  340. package/dist/stubs/config/payments.stub +13 -0
  341. package/dist/stubs/config/payments_client.stub +42 -0
  342. package/dist/stubs/config/payments_dashboard.stub +38 -0
  343. package/dist/stubs/database/migrations/create_billing_tables.stub +35 -77
  344. package/dist/stubs/main.js.map +1 -1
  345. package/dist/stubs/make/webhook_handler/main.stub +29 -11
  346. package/package.json +67 -32
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dashboard_provider.js","sourceRoot":"","sources":["../../providers/dashboard_provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,WAAW,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAKxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AACvE,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACrF,OAAO,EACL,YAAY,EACZ,cAAc,EAEd,WAAW,EACX,mBAAmB,GACpB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAGL,aAAa,GACd,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAGL,WAAW,EACX,SAAS,EAGT,QAAQ,EACR,MAAM,EACN,QAAQ,EACR,aAA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AC,mBAAmB,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC;QAC7E,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;IACvE,CAAC;IAEO,kBAAkB,CAAC,GAAgB,EAAE,IAA2B,EAAE,KAAa;QACrF,GAAG,CAAC,QAAQ,CAAC,WAAW,CAAC,mBAAmB,EAAE,KAAK,EAAE;YACnD,QAAQ,EAAE,IAAI;YACd,QAAQ,EAAE,KAAK;YACf,MAAM,EAAE,GAAG,CAAC,OAAO,CAAC,MAAM,EAAE;YAC5B,IAAI,EAAE,GAAG;YACT,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;YACrC,MAAM,EAAE,KAAK;SACd,CAAC,CAAC;IACL,CAAC;CACF;AAED,iFAAiF;AACjF,SAAS,YAAY,CAAC,GAAgB;IACpC,OAAO;QACL,MAAM,EAAE,GAAG,CAAC,MAA4C;QACxD,KAAK,EAAE,GAAG,CAAC,OAAO,CAAC,EAAE,EAAmD;QACxE,IAAI,EAAE,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE;KACzB,CAAC;AACJ,CAAC"}
@@ -0,0 +1,41 @@
1
+ import type { ApplicationService } from '@adonisjs/core/types';
2
+ /**
3
+ * Mounts the browser-facing status endpoint from `config/payments_client.ts`.
4
+ *
5
+ * One route, and only one:
6
+ *
7
+ * - `GET <path>/status?reference=<reference>` -> `{ status, amount, currency, paidAt }`
8
+ *
9
+ * It exists because a Pix QR (or a boleto) is not paid until the gateway's webhook says so,
10
+ * seconds to days later, and every app that takes Pix otherwise hand-writes the same
11
+ * polling loop in its checkout page. It does NOT wrap any gateway's card SDK — Stripe,
12
+ * Mercado Pago and Adyen ship their own, and eighteen of those is a surface this package
13
+ * could not keep honest.
14
+ *
15
+ * Disabled by default. With `enabled: false` (the default) this provider registers NOTHING:
16
+ * unlike the dashboard, which is an operator console behind an admin gate, this endpoint is
17
+ * reachable by every logged-in browser, so an app takes it on deliberately.
18
+ *
19
+ * Registered separately from `payments_provider` for the same reason the dashboard is: the
20
+ * webhook route lives at `/payments/webhook/:provider`, and a guard mounted over that prefix
21
+ * is how a gateway delivery ends up answering `403`. This one mounts under
22
+ * `/payments/client` and touches nothing above it.
23
+ */
24
+ export default class PaymentsClientProvider {
25
+ protected app: ApplicationService;
26
+ constructor(app: ApplicationService);
27
+ /** Warn once, not once per poll — a denied checkout page can retry for a while. */
28
+ private warnedOnDeny;
29
+ boot(): Promise<void>;
30
+ private registerRoutes;
31
+ /**
32
+ * Surface the developer-facing denial reason once.
33
+ *
34
+ * The browser only ever sees `403`. The single most likely cause — the app never called
35
+ * `ensureCustomer({ store, owner })`, so `billing_customers` is empty and the default
36
+ * guard can prove nothing — is otherwise indistinguishable from a real denial, and an
37
+ * install would sit there refusing every poll with no clue why.
38
+ */
39
+ private warnOnDeny;
40
+ }
41
+ //# sourceMappingURL=payments_client_provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payments_client_provider.d.ts","sourceRoot":"","sources":["../../providers/payments_client_provider.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAqB,MAAM,sBAAsB,CAAC;AAUlF;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,CAAC,OAAO,OAAO,sBAAsB;IAC7B,SAAS,CAAC,GAAG,EAAE,kBAAkB;IAA7C,YAAsB,GAAG,EAAE,kBAAkB,EAAI;IAEjD,mFAAmF;IACnF,OAAO,CAAC,YAAY,CAAS;IAEvB,IAAI,kBAUT;IAED,OAAO,CAAC,cAAc;IAoCtB;;;;;;;OAOG;YACW,UAAU;CAUzB"}
@@ -0,0 +1,95 @@
1
+ import { resolveConfig, } from '../src/client/define_config.js';
2
+ import { paymentStatus } from '../src/client/handlers.js';
3
+ import { getBillingStore } from '../src/services/main.js';
4
+ /**
5
+ * Mounts the browser-facing status endpoint from `config/payments_client.ts`.
6
+ *
7
+ * One route, and only one:
8
+ *
9
+ * - `GET <path>/status?reference=<reference>` -> `{ status, amount, currency, paidAt }`
10
+ *
11
+ * It exists because a Pix QR (or a boleto) is not paid until the gateway's webhook says so,
12
+ * seconds to days later, and every app that takes Pix otherwise hand-writes the same
13
+ * polling loop in its checkout page. It does NOT wrap any gateway's card SDK — Stripe,
14
+ * Mercado Pago and Adyen ship their own, and eighteen of those is a surface this package
15
+ * could not keep honest.
16
+ *
17
+ * Disabled by default. With `enabled: false` (the default) this provider registers NOTHING:
18
+ * unlike the dashboard, which is an operator console behind an admin gate, this endpoint is
19
+ * reachable by every logged-in browser, so an app takes it on deliberately.
20
+ *
21
+ * Registered separately from `payments_provider` for the same reason the dashboard is: the
22
+ * webhook route lives at `/payments/webhook/:provider`, and a guard mounted over that prefix
23
+ * is how a gateway delivery ends up answering `403`. This one mounts under
24
+ * `/payments/client` and touches nothing above it.
25
+ */
26
+ export default class PaymentsClientProvider {
27
+ app;
28
+ constructor(app) {
29
+ this.app = app;
30
+ }
31
+ /** Warn once, not once per poll — a denied checkout page can retry for a while. */
32
+ warnedOnDeny = false;
33
+ async boot() {
34
+ const config = resolveConfig(this.app.config.get('payments_client', {}));
35
+ if (!config.enabled)
36
+ return;
37
+ // Registration can't happen synchronously in `boot()`: the router singleton isn't
38
+ // committed until the app's "booted" hooks run, which fire after every provider's `boot()`.
39
+ await this.app.booted(async () => {
40
+ const router = await this.app.container.make('router');
41
+ this.registerRoutes(router, config);
42
+ });
43
+ }
44
+ registerRoutes(router, config) {
45
+ router
46
+ .get(`${config.path}/status`, async (ctx) => {
47
+ // A payment status is per-caller and changes under you. Nothing between the browser
48
+ // and here may keep a copy — least of all a shared proxy, which would hand one
49
+ // customer's settled charge to the next caller with the same URL.
50
+ ctx.response.header('cache-control', 'no-store');
51
+ let store;
52
+ try {
53
+ store = getBillingStore();
54
+ }
55
+ catch (error) {
56
+ // The billing layer is off, or the app has not booted it. A deployment state, not
57
+ // a bad request — say so rather than emit a stack-trace-shaped 500.
58
+ return ctx.response.status(503).json({
59
+ error: error instanceof Error ? error.message : 'billing store unavailable',
60
+ });
61
+ }
62
+ const reference = ctx.request.qs().reference;
63
+ const result = await paymentStatus({
64
+ store,
65
+ config,
66
+ onDeny: (reason) => {
67
+ void this.warnOnDeny(reason);
68
+ },
69
+ }, ctx, typeof reference === 'string' ? reference : undefined);
70
+ return ctx.response.status(result.status).json(result.body);
71
+ })
72
+ .as('payments_client.status');
73
+ }
74
+ /**
75
+ * Surface the developer-facing denial reason once.
76
+ *
77
+ * The browser only ever sees `403`. The single most likely cause — the app never called
78
+ * `ensureCustomer({ store, owner })`, so `billing_customers` is empty and the default
79
+ * guard can prove nothing — is otherwise indistinguishable from a real denial, and an
80
+ * install would sit there refusing every poll with no clue why.
81
+ */
82
+ async warnOnDeny(reason) {
83
+ if (this.warnedOnDeny)
84
+ return;
85
+ this.warnedOnDeny = true;
86
+ try {
87
+ const logger = await this.app.container.make('logger');
88
+ logger.warn(reason);
89
+ }
90
+ catch {
91
+ // No logger (a container this bare is a test harness, not a running app).
92
+ }
93
+ }
94
+ }
95
+ //# sourceMappingURL=payments_client_provider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payments_client_provider.js","sourceRoot":"","sources":["../../providers/payments_client_provider.ts"],"names":[],"mappings":"AAGA,OAAO,EAGL,aAAa,GACd,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,CAAC,OAAO,OAAO,sBAAsB;IACnB,GAAG;IAAzB,YAAsB,GAAuB;mBAAvB,GAAG;IAAuB,CAAC;IAEjD,mFAAmF;IAC3E,YAAY,GAAG,KAAK,CAAC;IAE7B,KAAK,CAAC,IAAI;QACR,MAAM,MAAM,GAAG,aAAa,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,EAAE;oBACjB,KAAK,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;gBAC/B,CAAC;aACF,EACD,GAAG,EACH,OAAO,SAAS,KAAK,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CACtD,CAAC;YACF,OAAO,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QAC9D,CAAC,CAAC;aACD,EAAE,CAAC,wBAAwB,CAAC,CAAC;IAClC,CAAC;IAED;;;;;;;OAOG;IACK,KAAK,CAAC,UAAU,CAAC,MAAc;QACrC,IAAI,IAAI,CAAC,YAAY;YAAE,OAAO;QAC9B,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC;QACzB,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YACvD,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACtB,CAAC;QAAC,MAAM,CAAC;YACP,0EAA0E;QAC5E,CAAC;IACH,CAAC;CACF"}
@@ -1,4 +1,8 @@
1
+ import type { HttpContext } from '@adonisjs/core/http';
1
2
  import type { ApplicationService } from '@adonisjs/core/types';
3
+ import type { BillingStore } from '../src/billing/billing_store.js';
4
+ import { WebhookDispatcher } from '../src/billing/webhook_dispatcher.js';
5
+ import { PaymentsManager } from '../src/payments_manager.js';
2
6
  /**
3
7
  * Wires `@adonis-agora/payments` into the AdonisJS application: binds a singleton
4
8
  * {@link PaymentsManager} built from `config/payments.ts`, wires the optional Lucid
@@ -11,5 +15,36 @@ export default class PaymentsProvider {
11
15
  constructor(app: ApplicationService);
12
16
  register(): void;
13
17
  boot(): Promise<void>;
18
+ /**
19
+ * Wire the typed `payments` Telescope watcher, if telescope is in this app and nobody has
20
+ * already wired one.
21
+ *
22
+ * In `ready()`, not `boot()`, and that is the load-bearing part: `start/` files run before
23
+ * `ready`, so an app that registers its own `PaymentsWatcher` — the way the docs used to
24
+ * say to — has already claimed the payments channels by the time this looks, and this
25
+ * stands down. Doing it in `boot()` would race that and record every payment event twice
26
+ * for exactly the apps that followed the instructions.
27
+ *
28
+ * There is no config option. Every one that was drafted described something the code can
29
+ * detect: the claims registry answers "I wire my own", and a failed import answers "I do
30
+ * not use telescope".
31
+ */
32
+ ready(): Promise<void>;
33
+ /** Release the watcher's channel claims and subscriptions on shutdown. */
34
+ shutdown(): Promise<void>;
14
35
  }
36
+ /**
37
+ * One webhook delivery, from raw body to HTTP status — the body of the mounted
38
+ * `POST /payments/webhook/:provider` route.
39
+ *
40
+ * Exported so the delivery can be tested for what it actually promises the gateway (the
41
+ * status code IS the retry instruction) without standing up an application, a router and a
42
+ * container around it.
43
+ */
44
+ export declare function handleWebhookDelivery(ctx: HttpContext, deps: {
45
+ manager: PaymentsManager;
46
+ dispatcher?: WebhookDispatcher | undefined;
47
+ /** Where a REFUSED delivery is recorded. Absent when the billing layer is off. */
48
+ store?: Pick<BillingStore, 'recordAuditEvent'> | undefined;
49
+ }): Promise<unknown>;
15
50
  //# sourceMappingURL=payments_provider.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"payments_provider.d.ts","sourceRoot":"","sources":["../../providers/payments_provider.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAqB,MAAM,sBAAsB,CAAC;AAkBlF;;;;;GAKG;AACH,MAAM,CAAC,OAAO,OAAO,gBAAgB;;IAGvB,SAAS,CAAC,GAAG,EAAE,kBAAkB;gBAAvB,GAAG,EAAE,kBAAkB;IAE7C,QAAQ;IAwBF,IAAI;CAmHX"}
1
+ {"version":3,"file":"payments_provider.d.ts","sourceRoot":"","sources":["../../providers/payments_provider.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,kBAAkB,EAAqB,MAAM,sBAAsB,CAAC;AAClF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAUpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AAYzE,OAAO,EAAE,eAAe,EAAkB,MAAM,4BAA4B,CAAC;AAa7E;;;;;GAKG;AACH,MAAM,CAAC,OAAO,OAAO,gBAAgB;;IAKvB,SAAS,CAAC,GAAG,EAAE,kBAAkB;IAA7C,YAAsB,GAAG,EAAE,kBAAkB,EAAI;IAEjD,QAAQ,SAsBP;IAKK,IAAI,kBA2BT;IAED;;;;;;;;;;;;;OAaG;IACG,KAAK,kBAGV;IAED,0EAA0E;IACpE,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC,CAG9B;CA6KF;AAED;;;;;;;GAOG;AACH,wBAAsB,qBAAqB,CACzC,GAAG,EAAE,WAAW,EAChB,IAAI,EAAE;IACJ,OAAO,EAAE,eAAe,CAAC;IACzB,UAAU,CAAC,EAAE,iBAAiB,GAAG,SAAS,CAAC;IAC3C,kFAAkF;IAClF,KAAK,CAAC,EAAE,IAAI,CAAC,YAAY,EAAE,kBAAkB,CAAC,GAAG,SAAS,CAAC;CAC5D,GACA,OAAO,CAAC,OAAO,CAAC,CAqGlB"}
@@ -1,11 +1,16 @@
1
1
  import { pathToFileURL } from 'node:url';
2
+ import { AUDIT_ACTIONS } from '../src/billing/billing_store.js';
2
3
  import { LucidBillingStore } from '../src/billing/lucid_billing_store.js';
4
+ import { assertRoleIsDispatchable, resolveDispatchMode, resolveRole, } from '../src/billing/resolve_dispatch.js';
5
+ import { isInjectableAsLucid, resolveBillingStore } from '../src/billing/resolve_store.js';
3
6
  import { WebhookDispatcher } from '../src/billing/webhook_dispatcher.js';
4
7
  import { WebhookProcessor } from '../src/billing/webhook_processor.js';
8
+ import { newPaymentsTraceId, publishWebhookVerification, runWithPaymentsTrace, webhookVerificationOutcome, } from '../src/diagnostics.js';
5
9
  import { InvoiceManager, resolveInvoiceProviders } from '../src/invoice/invoice_manager.js';
6
10
  import { PaymentsManager, resolveDrivers } from '../src/payments_manager.js';
7
- import { setPayments } from '../src/services/main.js';
8
- import { discoverWebhookHandlers, loadWebhookHandlersFromBarrel, resolveWebhookHandler, } from '../src/webhook_handlers.js';
11
+ import { setBillingStore, setPayments, setWebhookDispatcher } from '../src/services/main.js';
12
+ import { assertWebhookHandlerTypes, discoverWebhookHandlers, loadWebhookHandlersFromBarrel, resolveWebhookHandler, } from '../src/webhook_handlers.js';
13
+ import { assertWebhookVerification } from '../src/webhook_security.js';
9
14
  /**
10
15
  * Wires `@adonis-agora/payments` into the AdonisJS application: binds a singleton
11
16
  * {@link PaymentsManager} built from `config/payments.ts`, wires the optional Lucid
@@ -15,6 +20,8 @@ import { discoverWebhookHandlers, loadWebhookHandlersFromBarrel, resolveWebhookH
15
20
  export default class PaymentsProvider {
16
21
  app;
17
22
  #webhook;
23
+ /** Held for the webhook route: a REFUSED delivery is filed here, having no ledger row. */
24
+ #store;
18
25
  constructor(app) {
19
26
  this.app = app;
20
27
  }
@@ -40,6 +47,8 @@ export default class PaymentsProvider {
40
47
  return manager;
41
48
  });
42
49
  }
50
+ /** Kept so `shutdown()` can release the channel claims it took. */
51
+ #telescopeWatcher;
43
52
  async boot() {
44
53
  await this.app.booted(async () => {
45
54
  const config = this.app.config.get('payments', {});
@@ -50,25 +59,108 @@ export default class PaymentsProvider {
50
59
  }
51
60
  // Resolve the manager here so `setPayments` runs and `getPayments()` works for
52
61
  // services that read it during boot — after every provider has registered.
53
- await this.app.container.make(PaymentsManager);
54
- const router = await this.app.container.make('router');
55
- this.#registerWebhookRoute(router);
62
+ const manager = await this.app.container.make(PaymentsManager);
63
+ // Before the route goes up, not after: a driver with an empty webhook-credential slot
64
+ // verifies nothing, and the route it would be mounted behind is reachable from the
65
+ // public internet. Fail closed at boot, the way the dashboard does on a missing session
66
+ // secret.
67
+ assertWebhookVerification(manager.drivers, {
68
+ ...(config.allowUnverifiedWebhooks !== undefined
69
+ ? { allowUnverifiedWebhooks: config.allowUnverifiedWebhooks }
70
+ : {}),
71
+ });
72
+ // A 'worker' process consumes what the api half enqueued; it must not also
73
+ // advertise an endpoint gateways could deliver to.
74
+ if (resolveRole(config) !== 'worker') {
75
+ const router = await this.app.container.make('router');
76
+ this.#registerWebhookRoute(router);
77
+ }
56
78
  });
57
79
  }
80
+ /**
81
+ * Wire the typed `payments` Telescope watcher, if telescope is in this app and nobody has
82
+ * already wired one.
83
+ *
84
+ * In `ready()`, not `boot()`, and that is the load-bearing part: `start/` files run before
85
+ * `ready`, so an app that registers its own `PaymentsWatcher` — the way the docs used to
86
+ * say to — has already claimed the payments channels by the time this looks, and this
87
+ * stands down. Doing it in `boot()` would race that and record every payment event twice
88
+ * for exactly the apps that followed the instructions.
89
+ *
90
+ * There is no config option. Every one that was drafted described something the code can
91
+ * detect: the claims registry answers "I wire my own", and a failed import answers "I do
92
+ * not use telescope".
93
+ */
94
+ async ready() {
95
+ const { registerPaymentsWatcher } = await import('../src/telescope/register.js');
96
+ this.#telescopeWatcher = await registerPaymentsWatcher(this.app);
97
+ }
98
+ /** Release the watcher's channel claims and subscriptions on shutdown. */
99
+ async shutdown() {
100
+ this.#telescopeWatcher?.dispose();
101
+ this.#telescopeWatcher = undefined;
102
+ }
58
103
  async #buildBillingLayer(config) {
59
- const store = new LucidBillingStore();
60
- const handlers = await this.#resolveAllHandlers(config.billing?.handlers);
104
+ const mode = resolveDispatchMode(config);
105
+ const role = resolveRole(config);
106
+ assertRoleIsDispatchable(role, mode);
107
+ const store = await this.#resolveBillingStore(config);
108
+ this.#store = store;
109
+ let handlers;
110
+ if (role === 'api') {
111
+ // The handlers run on the worker, so resolving them here would scan the folder and
112
+ // build services this process never calls. The TYPES are still checked, from config
113
+ // alone: a misspelled key is a config error on both halves of the deployment, and the
114
+ // api process is usually the one a developer boots first.
115
+ assertWebhookHandlerTypes(Object.keys(config.billing?.handlers ?? {}).map((type) => ({
116
+ type,
117
+ source: 'billing.handlers',
118
+ })), {
119
+ ...(config.billing?.passthroughEvents !== undefined
120
+ ? { passthroughEvents: config.billing.passthroughEvents }
121
+ : {}),
122
+ });
123
+ }
124
+ else {
125
+ handlers = await this.#resolveAllHandlers(config.billing?.handlers, config.billing?.passthroughEvents);
126
+ }
61
127
  const processor = new WebhookProcessor({
62
128
  store,
63
129
  ...(handlers !== undefined ? { handlers } : {}),
64
130
  });
65
- this.#webhook = new WebhookDispatcher({
131
+ const dispatcher = new WebhookDispatcher({
66
132
  processor,
67
- mode: this.#resolveMode(config),
133
+ mode,
68
134
  // In 'auto', durable is used only when its engine is resolvable in the app
69
135
  // (i.e. the durable provider is registered) — not merely installed.
70
136
  durableAvailable: () => this.#isDurableAvailable(),
137
+ // The engine itself, not just "is it there": the dispatcher has to REGISTER the
138
+ // webhook workflow on the app's engine before it can start a run on it.
139
+ durableEngine: () => this.#resolveDurableEngine(),
71
140
  });
141
+ this.#webhook = dispatcher;
142
+ // Published so tests can reach it: `flushWebhooks()` from
143
+ // `@adonis-agora/payments/testing` awaits the in-flight processing that durable mode
144
+ // deliberately does not await. Bound in the container too, for an app that prefers
145
+ // `@inject()` over the service accessor.
146
+ setWebhookDispatcher(dispatcher);
147
+ this.app.container.singleton(WebhookDispatcher, () => dispatcher);
148
+ }
149
+ /**
150
+ * The billing store from `config.billing.store`, defaulting to Lucid over the
151
+ * published tables.
152
+ *
153
+ * The resolved store is published on `services/main` (which reaches any store) and,
154
+ * when it is the Lucid one, bound in the container so a service can `@inject()` it
155
+ * like any other dependency.
156
+ */
157
+ async #resolveBillingStore(config) {
158
+ const store = await resolveBillingStore(config);
159
+ setBillingStore(store);
160
+ if (isInjectableAsLucid(store)) {
161
+ this.app.container.singleton(LucidBillingStore, () => store);
162
+ }
163
+ return store;
72
164
  }
73
165
  /**
74
166
  * Merge webhook handlers from the two sources:
@@ -76,15 +168,33 @@ export default class PaymentsProvider {
76
168
  * 2. the conventions folder `app/payment_handlers/` (build-time barrel, runtime scan
77
169
  * as fallback) — the durable-style discovery.
78
170
  */
79
- async #resolveAllHandlers(configHandlers) {
171
+ async #resolveAllHandlers(configHandlers, passthroughEvents) {
172
+ const discovered = await this.#discoverFolderHandlers();
173
+ // Validated BEFORE anything is wired, so the app never boots half-registered. A handler
174
+ // for an event type that will never be delivered is a silent no-op — the ledger records
175
+ // the delivery as processed and the grant simply never happens — and two handlers for
176
+ // one type mean the second overwrote the first in the map below.
177
+ const registrations = [
178
+ ...Object.keys(configHandlers ?? {}).map((type) => ({
179
+ type,
180
+ source: 'billing.handlers',
181
+ })),
182
+ ...discovered.map((entry) => ({
183
+ type: entry.type,
184
+ source: entry.source ?? 'app/payment_handlers',
185
+ })),
186
+ ];
187
+ assertWebhookHandlerTypes(registrations, {
188
+ ...(passthroughEvents !== undefined ? { passthroughEvents } : {}),
189
+ });
80
190
  const handlers = {};
81
191
  if (configHandlers) {
82
192
  for (const [type, entry] of Object.entries(configHandlers)) {
83
193
  handlers[type] = await resolveWebhookHandler(entry, this.app.container);
84
194
  }
85
195
  }
86
- for (const discovered of await this.#discoverFolderHandlers()) {
87
- handlers[discovered.type] = await resolveWebhookHandler(discovered.entry, this.app.container);
196
+ for (const entry of discovered) {
197
+ handlers[entry.type] = await resolveWebhookHandler(entry.entry, this.app.container);
88
198
  }
89
199
  return Object.keys(handlers).length > 0 ? handlers : undefined;
90
200
  }
@@ -113,43 +223,147 @@ export default class PaymentsProvider {
113
223
  /** Whether the app has a resolvable durable workflow engine. */
114
224
  async #isDurableAvailable() {
115
225
  try {
116
- const { WorkflowEngine } = await import('@adonis-agora/durable');
117
- await this.app.container.make(WorkflowEngine);
226
+ await this.#resolveDurableEngine();
118
227
  return true;
119
228
  }
120
229
  catch {
121
230
  return false;
122
231
  }
123
232
  }
124
- /** Map `billing.durable` (`'auto' | boolean`) onto the dispatcher's mode. */
125
- #resolveMode(config) {
126
- const setting = config.billing?.durable ?? 'auto';
127
- if (setting === true)
128
- return 'durable';
129
- if (setting === false)
130
- return 'in-process';
131
- return 'auto';
233
+ /**
234
+ * The app's durable engine, from the container.
235
+ *
236
+ * Deliberately the app's own instance and never a fresh one: the engine is bound to the
237
+ * store and transport the app configured, and a second engine would persist runs that
238
+ * nothing picks up.
239
+ */
240
+ async #resolveDurableEngine() {
241
+ const { WorkflowEngine } = await import('@adonis-agora/durable');
242
+ return (await this.app.container.make(WorkflowEngine));
132
243
  }
244
+ /** Map `billing.durable` (`'auto' | boolean`) onto the dispatcher's mode. */
133
245
  #registerWebhookRoute(router) {
134
246
  router
135
247
  .post('/payments/webhook/:provider', async (ctx) => {
136
248
  const manager = await this.app.container.make(PaymentsManager);
137
- const provider = String(ctx.params.provider);
138
- try {
139
- const driver = manager.driver(provider);
140
- const rawBody = ctx.request.raw() ?? '';
141
- const event = driver.parseWebhook(rawBody, ctx.request.headers());
142
- if (this.#webhook) {
143
- await this.#webhook.dispatch(event);
144
- }
145
- return ctx.response.status(200).json({ received: true });
146
- }
147
- catch (error) {
148
- const message = error instanceof Error ? error.message : 'invalid webhook';
149
- return ctx.response.status(400).json({ error: message });
150
- }
249
+ return handleWebhookDelivery(ctx, {
250
+ manager,
251
+ dispatcher: this.#webhook,
252
+ ...(this.#store !== undefined ? { store: this.#store } : {}),
253
+ });
151
254
  })
152
255
  .as('payments.webhook');
153
256
  }
154
257
  }
258
+ /**
259
+ * One webhook delivery, from raw body to HTTP status — the body of the mounted
260
+ * `POST /payments/webhook/:provider` route.
261
+ *
262
+ * Exported so the delivery can be tested for what it actually promises the gateway (the
263
+ * status code IS the retry instruction) without standing up an application, a router and a
264
+ * container around it.
265
+ */
266
+ export async function handleWebhookDelivery(ctx, deps) {
267
+ const provider = String(ctx.params.provider);
268
+ // ONE trace per delivery ATTEMPT, shared by every event the delivery carries — not one
269
+ // trace per event.
270
+ //
271
+ // The trace answers "what happened to this HTTP request", and the facts it correlates are
272
+ // request-scoped: the body that arrived, the signature check over it, the response the
273
+ // gateway got. Minting a trace per event would leave the single `webhook.verification`
274
+ // report attached to one arbitrary event and orphan the rest, and it would erase the one
275
+ // thing a batch makes worth knowing — that these four events arrived together, so a
276
+ // failure that hit all four is one delivery's problem and not four payments' problem.
277
+ //
278
+ // Per-event identity is not lost by sharing: `webhook.received`/`processed`/`failed` each
279
+ // carry the event's own `id` and `type`, and the processor publishes them once per event.
280
+ // So a delivery of four events is four lifecycle triples under one traceId, which is
281
+ // exactly what happened — never one event's worth of noise.
282
+ //
283
+ // (A redelivery gets its own id, which is what you want when the question is "why did the
284
+ // retry behave differently".)
285
+ const frame = { traceId: newPaymentsTraceId(), provider };
286
+ return runWithPaymentsTrace(frame, async () => {
287
+ const startedAt = Date.now();
288
+ // The catch below also sees failures from parsing, which happen before the delivery was
289
+ // authenticated — one delivery must not report two outcomes.
290
+ let verificationPublished = false;
291
+ try {
292
+ const driver = deps.manager.driver(provider);
293
+ const rawBody = ctx.request.raw() ?? '';
294
+ // Awaited: `parseWebhook` may be async. A gateway whose callback carries only an
295
+ // id (Mollie) has to fetch the payment to know what happened, and that fetch is
296
+ // also the only thing authenticating the call.
297
+ //
298
+ // May be ONE event or SEVERAL: Adyen's `notificationItems` and Efí's `pix` are both
299
+ // lists. `dispatchAll` takes either, so no driver is forced to wrap its single event
300
+ // in an array.
301
+ const parsed = await driver.parseWebhook(rawBody, ctx.request.headers());
302
+ // Reported by the shared `webhook_security` helpers during parseWebhook. No
303
+ // report means nothing verified through them: the driver used its own SDK, or
304
+ // it has no webhook credential configured and skipped the check entirely.
305
+ publishWebhookVerification({
306
+ provider,
307
+ ...webhookVerificationOutcome(frame),
308
+ durationMs: Date.now() - startedAt,
309
+ });
310
+ verificationPublished = true;
311
+ if (deps.dispatcher) {
312
+ const result = await deps.dispatcher.dispatchAll(parsed);
313
+ if (result.failures.length > 0) {
314
+ // A 2xx tells the gateway "done, never send this again". Answering it over an
315
+ // event that failed is how a payment is lost for good — Adyen queues a failed
316
+ // delivery for up to 30 days of retries and Efí makes 9 attempts, and both of
317
+ // those only ever start if the response is not a 2xx. So a delivery with ANY
318
+ // failed event is a failed delivery.
319
+ //
320
+ // The events that DID succeed are not re-run by that redelivery: their ledger
321
+ // rows are `processed`, so the claim answers `null` and they skip. The gateway
322
+ // resending all four costs one redelivery and re-runs exactly the one that failed.
323
+ const failed = result.failures.map((failure) => failure.event.id);
324
+ return ctx.response.status(500).json({
325
+ received: true,
326
+ // What the delivery actually did, rather than a bare error — an operator reading
327
+ // the gateway's failed-delivery log needs to know the other three landed.
328
+ processed: result.dispatched,
329
+ failed,
330
+ error: result.failures[0]?.error.message ?? 'webhook processing failed',
331
+ });
332
+ }
333
+ }
334
+ return ctx.response.status(200).json({ received: true });
335
+ }
336
+ catch (error) {
337
+ const message = error instanceof Error ? error.message : 'invalid webhook';
338
+ // A throw out of `parseWebhook` is a REJECTED delivery — a bad signature, an
339
+ // unparsable body, an unknown provider — and the reason is the single most-wanted
340
+ // fact when a gateway reports failing callbacks. It stays a 400: unlike a processing
341
+ // failure, redelivering it would fail identically, and a forged batch must not be
342
+ // answered with an invitation to send it again.
343
+ if (!verificationPublished) {
344
+ publishWebhookVerification({
345
+ provider,
346
+ ...webhookVerificationOutcome(frame, message),
347
+ durationMs: Date.now() - startedAt,
348
+ });
349
+ }
350
+ // A rejected delivery is the ONLY webhook outcome that leaves no ledger row — it is
351
+ // refused before an event exists to record. That is why a rotated webhook token looks
352
+ // exactly like a quiet gateway from the inside: zero events, zero failures, every
353
+ // health check green. The audit row is what the `rejected_deliveries` check counts.
354
+ //
355
+ // Best-effort on purpose: the delivery is already being refused, and failing to file
356
+ // the note must not change the status the gateway sees. The store itself returns
357
+ // `null` when the install predates the table.
358
+ await deps.store
359
+ ?.recordAuditEvent({
360
+ action: AUDIT_ACTIONS.webhookRejected,
361
+ provider,
362
+ message,
363
+ })
364
+ .catch(() => { });
365
+ return ctx.response.status(400).json({ error: message });
366
+ }
367
+ });
368
+ }
155
369
  //# sourceMappingURL=payments_provider.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"payments_provider.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