@adonis-agora/payments 0.2.0 → 0.3.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.
- package/CHANGELOG.md +2347 -0
- package/dist/assets/spa/assets/index-CT5Zon6P.css +1 -0
- package/dist/assets/spa/assets/index-CvEbJEnq.js +41 -0
- package/dist/assets/spa/assets/index-CvEbJEnq.js.map +1 -0
- package/dist/assets/spa/index.html +20 -0
- package/dist/commands/main.d.ts +4 -3
- package/dist/commands/main.d.ts.map +1 -1
- package/dist/commands/main.js +9 -2
- package/dist/commands/main.js.map +1 -1
- package/dist/commands/payments_health.d.ts +31 -0
- package/dist/commands/payments_health.d.ts.map +1 -0
- package/dist/commands/payments_health.js +113 -0
- package/dist/commands/payments_health.js.map +1 -0
- package/dist/commands/payments_sync.d.ts +18 -4
- package/dist/commands/payments_sync.d.ts.map +1 -1
- package/dist/commands/payments_sync.js +136 -40
- package/dist/commands/payments_sync.js.map +1 -1
- package/dist/configure.d.ts +12 -5
- package/dist/configure.d.ts.map +1 -1
- package/dist/configure.js +18 -5
- package/dist/configure.js.map +1 -1
- package/dist/providers/dashboard_provider.d.ts +97 -0
- package/dist/providers/dashboard_provider.d.ts.map +1 -0
- package/dist/providers/dashboard_provider.js +430 -0
- package/dist/providers/dashboard_provider.js.map +1 -0
- package/dist/providers/payments_client_provider.d.ts +41 -0
- package/dist/providers/payments_client_provider.d.ts.map +1 -0
- package/dist/providers/payments_client_provider.js +95 -0
- package/dist/providers/payments_client_provider.js.map +1 -0
- package/dist/providers/payments_provider.d.ts +35 -0
- package/dist/providers/payments_provider.d.ts.map +1 -1
- package/dist/providers/payments_provider.js +250 -36
- package/dist/providers/payments_provider.js.map +1 -1
- package/dist/src/billing/billing_health.d.ts +85 -0
- package/dist/src/billing/billing_health.d.ts.map +1 -0
- package/dist/src/billing/billing_health.js +155 -0
- package/dist/src/billing/billing_health.js.map +1 -0
- package/dist/src/billing/billing_overview.d.ts +4 -3
- package/dist/src/billing/billing_overview.d.ts.map +1 -1
- package/dist/src/billing/billing_overview.js +14 -5
- package/dist/src/billing/billing_overview.js.map +1 -1
- package/dist/src/billing/billing_store.d.ts +634 -5
- package/dist/src/billing/billing_store.d.ts.map +1 -1
- package/dist/src/billing/billing_store.js +18 -1
- package/dist/src/billing/billing_store.js.map +1 -1
- package/dist/src/billing/index.d.ts +2 -1
- package/dist/src/billing/index.d.ts.map +1 -1
- package/dist/src/billing/index.js +1 -0
- package/dist/src/billing/index.js.map +1 -1
- package/dist/src/billing/list_query.d.ts +16 -0
- package/dist/src/billing/list_query.d.ts.map +1 -0
- package/dist/src/billing/list_query.js +28 -0
- package/dist/src/billing/list_query.js.map +1 -0
- package/dist/src/billing/lucid_billing_store.d.ts +122 -4
- package/dist/src/billing/lucid_billing_store.d.ts.map +1 -1
- package/dist/src/billing/lucid_billing_store.js +811 -13
- package/dist/src/billing/lucid_billing_store.js.map +1 -1
- package/dist/src/billing/mixins/index.d.ts +3 -0
- package/dist/src/billing/mixins/index.d.ts.map +1 -1
- package/dist/src/billing/mixins/index.js +3 -0
- package/dist/src/billing/mixins/index.js.map +1 -1
- package/dist/src/billing/mixins/with_audit_event.d.ts +48 -0
- package/dist/src/billing/mixins/with_audit_event.d.ts.map +1 -0
- package/dist/src/billing/mixins/with_audit_event.js +77 -0
- package/dist/src/billing/mixins/with_audit_event.js.map +1 -0
- package/dist/src/billing/mixins/with_customer.d.ts +39 -0
- package/dist/src/billing/mixins/with_customer.d.ts.map +1 -0
- package/dist/src/billing/mixins/with_customer.js +68 -0
- package/dist/src/billing/mixins/with_customer.js.map +1 -0
- package/dist/src/billing/mixins/with_dispute.d.ts +68 -0
- package/dist/src/billing/mixins/with_dispute.d.ts.map +1 -0
- package/dist/src/billing/mixins/with_dispute.js +83 -0
- package/dist/src/billing/mixins/with_dispute.js.map +1 -0
- package/dist/src/billing/mixins/with_payment.d.ts +42 -0
- package/dist/src/billing/mixins/with_payment.d.ts.map +1 -1
- package/dist/src/billing/mixins/with_payment.js +29 -3
- package/dist/src/billing/mixins/with_payment.js.map +1 -1
- package/dist/src/billing/mixins/with_subscription.d.ts +7 -0
- package/dist/src/billing/mixins/with_subscription.d.ts.map +1 -1
- package/dist/src/billing/mixins/with_subscription.js +15 -1
- package/dist/src/billing/mixins/with_subscription.js.map +1 -1
- package/dist/src/billing/mixins/with_usage_event.d.ts +7 -0
- package/dist/src/billing/mixins/with_usage_event.d.ts.map +1 -1
- package/dist/src/billing/mixins/with_usage_event.js +15 -1
- package/dist/src/billing/mixins/with_usage_event.js.map +1 -1
- package/dist/src/billing/mixins/with_webhook_event.d.ts +18 -0
- package/dist/src/billing/mixins/with_webhook_event.d.ts.map +1 -1
- package/dist/src/billing/mixins/with_webhook_event.js +18 -1
- package/dist/src/billing/mixins/with_webhook_event.js.map +1 -1
- package/dist/src/billing/resolve_dispatch.d.ts +22 -0
- package/dist/src/billing/resolve_dispatch.d.ts.map +1 -0
- package/dist/src/billing/resolve_dispatch.js +44 -0
- package/dist/src/billing/resolve_dispatch.js.map +1 -0
- package/dist/src/billing/resolve_store.d.ts +18 -0
- package/dist/src/billing/resolve_store.d.ts.map +1 -0
- package/dist/src/billing/resolve_store.js +35 -0
- package/dist/src/billing/resolve_store.js.map +1 -0
- package/dist/src/billing/schema.d.ts +108 -0
- package/dist/src/billing/schema.d.ts.map +1 -0
- package/dist/src/billing/schema.js +350 -0
- package/dist/src/billing/schema.js.map +1 -0
- package/dist/src/billing/webhook_dispatcher.d.ts +95 -16
- package/dist/src/billing/webhook_dispatcher.d.ts.map +1 -1
- package/dist/src/billing/webhook_dispatcher.js +186 -33
- package/dist/src/billing/webhook_dispatcher.js.map +1 -1
- package/dist/src/billing/webhook_events.d.ts +67 -1
- package/dist/src/billing/webhook_events.d.ts.map +1 -1
- package/dist/src/billing/webhook_events.js +15 -0
- package/dist/src/billing/webhook_events.js.map +1 -1
- package/dist/src/billing/webhook_processor.d.ts.map +1 -1
- package/dist/src/billing/webhook_processor.js +325 -5
- package/dist/src/billing/webhook_processor.js.map +1 -1
- package/dist/src/client/define_config.d.ts +150 -0
- package/dist/src/client/define_config.d.ts.map +1 -0
- package/dist/src/client/define_config.js +98 -0
- package/dist/src/client/define_config.js.map +1 -0
- package/dist/src/client/handlers.d.ts +71 -0
- package/dist/src/client/handlers.d.ts.map +1 -0
- package/dist/src/client/handlers.js +119 -0
- package/dist/src/client/handlers.js.map +1 -0
- package/dist/src/client/index.d.ts +16 -0
- package/dist/src/client/index.d.ts.map +1 -0
- package/dist/src/client/index.js +13 -0
- package/dist/src/client/index.js.map +1 -0
- package/dist/src/client/statuses.d.ts +38 -0
- package/dist/src/client/statuses.d.ts.map +1 -0
- package/dist/src/client/statuses.js +42 -0
- package/dist/src/client/statuses.js.map +1 -0
- package/dist/src/dashboard/actions.d.ts +143 -0
- package/dist/src/dashboard/actions.d.ts.map +1 -0
- package/dist/src/dashboard/actions.js +112 -0
- package/dist/src/dashboard/actions.js.map +1 -0
- package/dist/src/dashboard/auth.d.ts +136 -0
- package/dist/src/dashboard/auth.d.ts.map +1 -0
- package/dist/src/dashboard/auth.js +152 -0
- package/dist/src/dashboard/auth.js.map +1 -0
- package/dist/src/dashboard/define_config.d.ts +80 -0
- package/dist/src/dashboard/define_config.d.ts.map +1 -0
- package/dist/src/dashboard/define_config.js +83 -0
- package/dist/src/dashboard/define_config.js.map +1 -0
- package/dist/src/dashboard/handlers.d.ts +281 -0
- package/dist/src/dashboard/handlers.d.ts.map +1 -0
- package/dist/src/dashboard/handlers.js +960 -0
- package/dist/src/dashboard/handlers.js.map +1 -0
- package/dist/src/dashboard/index.d.ts +18 -0
- package/dist/src/dashboard/index.d.ts.map +1 -0
- package/dist/src/dashboard/index.js +14 -0
- package/dist/src/dashboard/index.js.map +1 -0
- package/dist/src/dashboard/login_page.d.ts +23 -0
- package/dist/src/dashboard/login_page.d.ts.map +1 -0
- package/dist/src/dashboard/login_page.js +170 -0
- package/dist/src/dashboard/login_page.js.map +1 -0
- package/dist/src/dashboard/period.d.ts +31 -0
- package/dist/src/dashboard/period.d.ts.map +1 -0
- package/dist/src/dashboard/period.js +44 -0
- package/dist/src/dashboard/period.js.map +1 -0
- package/dist/src/dashboard/session_cookie.d.ts +42 -0
- package/dist/src/dashboard/session_cookie.d.ts.map +1 -0
- package/dist/src/dashboard/session_cookie.js +97 -0
- package/dist/src/dashboard/session_cookie.js.map +1 -0
- package/dist/src/dashboard/spa.d.ts +24 -0
- package/dist/src/dashboard/spa.d.ts.map +1 -0
- package/dist/src/dashboard/spa.js +52 -0
- package/dist/src/dashboard/spa.js.map +1 -0
- package/dist/src/define_config.d.ts +244 -9
- package/dist/src/define_config.d.ts.map +1 -1
- package/dist/src/define_config.js +97 -1
- package/dist/src/define_config.js.map +1 -1
- package/dist/src/diagnostics.d.ts +287 -7
- package/dist/src/diagnostics.d.ts.map +1 -1
- package/dist/src/diagnostics.js +317 -1
- package/dist/src/diagnostics.js.map +1 -1
- package/dist/src/driver.d.ts +139 -5
- package/dist/src/driver.d.ts.map +1 -1
- package/dist/src/drivers/abacate.d.ts +12 -2
- package/dist/src/drivers/abacate.d.ts.map +1 -1
- package/dist/src/drivers/abacate.js +112 -19
- package/dist/src/drivers/abacate.js.map +1 -1
- package/dist/src/drivers/adyen.d.ts +164 -0
- package/dist/src/drivers/adyen.d.ts.map +1 -0
- package/dist/src/drivers/adyen.js +678 -0
- package/dist/src/drivers/adyen.js.map +1 -0
- package/dist/src/drivers/asaas.d.ts +52 -2
- package/dist/src/drivers/asaas.d.ts.map +1 -1
- package/dist/src/drivers/asaas.js +364 -29
- package/dist/src/drivers/asaas.js.map +1 -1
- package/dist/src/drivers/dodo.d.ts +135 -0
- package/dist/src/drivers/dodo.d.ts.map +1 -0
- package/dist/src/drivers/dodo.js +864 -0
- package/dist/src/drivers/dodo.js.map +1 -0
- package/dist/src/drivers/efi.d.ts +98 -0
- package/dist/src/drivers/efi.d.ts.map +1 -0
- package/dist/src/drivers/efi.js +628 -0
- package/dist/src/drivers/efi.js.map +1 -0
- package/dist/src/drivers/infinitepay.d.ts +156 -0
- package/dist/src/drivers/infinitepay.d.ts.map +1 -0
- package/dist/src/drivers/infinitepay.js +321 -0
- package/dist/src/drivers/infinitepay.js.map +1 -0
- package/dist/src/drivers/lemonsqueezy.d.ts +125 -0
- package/dist/src/drivers/lemonsqueezy.d.ts.map +1 -0
- package/dist/src/drivers/lemonsqueezy.js +632 -0
- package/dist/src/drivers/lemonsqueezy.js.map +1 -0
- package/dist/src/drivers/mercadopago.d.ts +97 -0
- package/dist/src/drivers/mercadopago.d.ts.map +1 -0
- package/dist/src/drivers/mercadopago.js +844 -0
- package/dist/src/drivers/mercadopago.js.map +1 -0
- package/dist/src/drivers/mollie.d.ts +125 -0
- package/dist/src/drivers/mollie.d.ts.map +1 -0
- package/dist/src/drivers/mollie.js +812 -0
- package/dist/src/drivers/mollie.js.map +1 -0
- package/dist/src/drivers/paddle.d.ts +148 -0
- package/dist/src/drivers/paddle.d.ts.map +1 -0
- package/dist/src/drivers/paddle.js +738 -0
- package/dist/src/drivers/paddle.js.map +1 -0
- package/dist/src/drivers/pagarme.d.ts +97 -0
- package/dist/src/drivers/pagarme.d.ts.map +1 -0
- package/dist/src/drivers/pagarme.js +829 -0
- package/dist/src/drivers/pagarme.js.map +1 -0
- package/dist/src/drivers/pagbank.d.ts +57 -0
- package/dist/src/drivers/pagbank.d.ts.map +1 -0
- package/dist/src/drivers/pagbank.js +499 -0
- package/dist/src/drivers/pagbank.js.map +1 -0
- package/dist/src/drivers/paypal.d.ts +120 -0
- package/dist/src/drivers/paypal.d.ts.map +1 -0
- package/dist/src/drivers/paypal.js +891 -0
- package/dist/src/drivers/paypal.js.map +1 -0
- package/dist/src/drivers/polar.d.ts +118 -0
- package/dist/src/drivers/polar.d.ts.map +1 -0
- package/dist/src/drivers/polar.js +604 -0
- package/dist/src/drivers/polar.js.map +1 -0
- package/dist/src/drivers/razorpay.d.ts +103 -0
- package/dist/src/drivers/razorpay.d.ts.map +1 -0
- package/dist/src/drivers/razorpay.js +867 -0
- package/dist/src/drivers/razorpay.js.map +1 -0
- package/dist/src/drivers/shared.d.ts +33 -0
- package/dist/src/drivers/shared.d.ts.map +1 -0
- package/dist/src/drivers/shared.js +37 -0
- package/dist/src/drivers/shared.js.map +1 -0
- package/dist/src/drivers/square.d.ts +133 -0
- package/dist/src/drivers/square.d.ts.map +1 -0
- package/dist/src/drivers/square.js +905 -0
- package/dist/src/drivers/square.js.map +1 -0
- package/dist/src/drivers/stripe.d.ts +40 -3
- package/dist/src/drivers/stripe.d.ts.map +1 -1
- package/dist/src/drivers/stripe.js +806 -25
- package/dist/src/drivers/stripe.js.map +1 -1
- package/dist/src/drivers/woovi.d.ts +10 -3
- package/dist/src/drivers/woovi.d.ts.map +1 -1
- package/dist/src/drivers/woovi.js +162 -29
- package/dist/src/drivers/woovi.js.map +1 -1
- package/dist/src/ensure_customer.d.ts +34 -1
- package/dist/src/ensure_customer.d.ts.map +1 -1
- package/dist/src/ensure_customer.js +29 -4
- package/dist/src/ensure_customer.js.map +1 -1
- package/dist/src/http.d.ts +37 -3
- package/dist/src/http.d.ts.map +1 -1
- package/dist/src/http.js +69 -5
- package/dist/src/http.js.map +1 -1
- package/dist/src/index.d.ts +40 -10
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +22 -4
- package/dist/src/index.js.map +1 -1
- package/dist/src/invoice/emit_invoice.d.ts.map +1 -1
- package/dist/src/invoice/emit_invoice.js +31 -11
- package/dist/src/invoice/emit_invoice.js.map +1 -1
- package/dist/src/money.d.ts +23 -5
- package/dist/src/money.d.ts.map +1 -1
- package/dist/src/money.js +72 -7
- package/dist/src/money.js.map +1 -1
- package/dist/src/payments_manager.d.ts +8 -1
- package/dist/src/payments_manager.d.ts.map +1 -1
- package/dist/src/payments_manager.js +168 -6
- package/dist/src/payments_manager.js.map +1 -1
- package/dist/src/services/main.d.ts +38 -0
- package/dist/src/services/main.d.ts.map +1 -1
- package/dist/src/services/main.js +130 -0
- package/dist/src/services/main.js.map +1 -1
- package/dist/src/telescope/index.d.ts +2 -0
- package/dist/src/telescope/index.d.ts.map +1 -1
- package/dist/src/telescope/index.js +1 -0
- package/dist/src/telescope/index.js.map +1 -1
- package/dist/src/telescope/payments_watcher.d.ts +10 -4
- package/dist/src/telescope/payments_watcher.d.ts.map +1 -1
- package/dist/src/telescope/payments_watcher.js +65 -13
- package/dist/src/telescope/payments_watcher.js.map +1 -1
- package/dist/src/telescope/register.d.ts +62 -0
- package/dist/src/telescope/register.d.ts.map +1 -0
- package/dist/src/telescope/register.js +48 -0
- package/dist/src/telescope/register.js.map +1 -0
- package/dist/src/testing/fake_payments.d.ts +62 -0
- package/dist/src/testing/fake_payments.d.ts.map +1 -0
- package/dist/src/testing/fake_payments.js +82 -0
- package/dist/src/testing/fake_payments.js.map +1 -0
- package/dist/src/testing/in_memory_billing_store.d.ts +151 -2
- package/dist/src/testing/in_memory_billing_store.d.ts.map +1 -1
- package/dist/src/testing/in_memory_billing_store.js +517 -4
- package/dist/src/testing/in_memory_billing_store.js.map +1 -1
- package/dist/src/testing/index.d.ts +2 -1
- package/dist/src/testing/index.d.ts.map +1 -1
- package/dist/src/testing/index.js +1 -0
- package/dist/src/testing/index.js.map +1 -1
- package/dist/src/types.d.ts +161 -5
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/types.js +30 -1
- package/dist/src/types.js.map +1 -1
- package/dist/src/webhook_handlers.d.ts +96 -2
- package/dist/src/webhook_handlers.d.ts.map +1 -1
- package/dist/src/webhook_handlers.js +91 -10
- package/dist/src/webhook_handlers.js.map +1 -1
- package/dist/src/webhook_security.d.ts +94 -3
- package/dist/src/webhook_security.d.ts.map +1 -1
- package/dist/src/webhook_security.js +173 -9
- package/dist/src/webhook_security.js.map +1 -1
- package/dist/stubs/config/payments.stub +13 -0
- package/dist/stubs/config/payments_client.stub +42 -0
- package/dist/stubs/config/payments_dashboard.stub +38 -0
- package/dist/stubs/database/migrations/create_billing_tables.stub +35 -77
- package/dist/stubs/make/webhook_handler/main.stub +29 -11
- package/package.json +60 -25
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The `@adonis-agora/diagnostics` emit capability, published on this global slot at that
|
|
3
|
-
* package's module load. `@adonis-agora/payments` reads it STRUCTURALLY — it never imports
|
|
4
|
-
* or depends on the diagnostics package. When diagnostics isn't installed the slot is
|
|
5
|
-
* empty and emitting is an inert no-op. (Same pattern as `@adonis-agora/media`.)
|
|
6
|
-
*/
|
|
7
1
|
import type { Payment, Subscription } from './types.js';
|
|
8
2
|
/**
|
|
9
3
|
* Every payments milestone published on `agora:payments:<event>`. The single runtime
|
|
@@ -17,8 +11,12 @@ import type { Payment, Subscription } from './types.js';
|
|
|
17
11
|
* state change (`payment.succeeded`/`failed`/`refunded`/`updated`,
|
|
18
12
|
* `subscription.updated`, plus `subscription.created`/`canceled` from webhooks) and
|
|
19
13
|
* the webhook lifecycle (`webhook.received`/`processed`/`failed`).
|
|
14
|
+
* - **Debug** events, which exist for the developer holding one broken payment rather
|
|
15
|
+
* than for the dashboard: `gateway.request`/`gateway.request.failed` (what was actually
|
|
16
|
+
* sent to the gateway, what came back, how long it took) and `webhook.verification`
|
|
17
|
+
* (whether the signature verified, under which scheme, or that nothing verified it).
|
|
20
18
|
*/
|
|
21
|
-
export declare const PAYMENTS_DIAGNOSTIC_EVENTS: readonly ["charge.created", "charge.refunded", "subscription.created", "subscription.updated", "subscription.canceled", "payment.succeeded", "payment.failed", "payment.refunded", "payment.updated", "invoice.emitted", "webhook.received", "webhook.processed", "webhook.failed"];
|
|
19
|
+
export declare const PAYMENTS_DIAGNOSTIC_EVENTS: readonly ["charge.created", "charge.refunded", "subscription.created", "subscription.updated", "subscription.canceled", "payment.succeeded", "payment.failed", "payment.refunded", "payment.disputed", "payment.dispute_warning", "payment.dispute_closed", "payment.updated", "invoice.emitted", "invoice.failed", "webhook.received", "webhook.verification", "webhook.processed", "webhook.failed", "gateway.request", "gateway.request.failed"];
|
|
22
20
|
export type PaymentsDiagnosticEvent = (typeof PAYMENTS_DIAGNOSTIC_EVENTS)[number];
|
|
23
21
|
/**
|
|
24
22
|
* Claim `payments:<event>` for every event, so the generic diagnostics→telescope bridge
|
|
@@ -80,6 +78,38 @@ export interface PaymentRefundedPayload {
|
|
|
80
78
|
amount: number;
|
|
81
79
|
currency: string;
|
|
82
80
|
}
|
|
81
|
+
/**
|
|
82
|
+
* A chargeback. Same shape as a refund because the same facts identify it — but it is not a
|
|
83
|
+
* refund: nobody at your end decided to give the money back.
|
|
84
|
+
*/
|
|
85
|
+
export interface PaymentDisputedPayload {
|
|
86
|
+
gatewayId: string;
|
|
87
|
+
provider: string;
|
|
88
|
+
amount: number;
|
|
89
|
+
currency: string;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* The pre-chargeback alert the card networks relay (Stripe Early Fraud Warning, Adyen
|
|
93
|
+
* `NOTIFICATION_OF_FRAUD`). No money has moved yet, and refunding inside the window stops
|
|
94
|
+
* the chargeback from being filed at all — which is worth doing even on a dispute you would
|
|
95
|
+
* win, because the chargeback counts against the ratio that triggers network monitoring.
|
|
96
|
+
*/
|
|
97
|
+
export interface PaymentDisputeWarningPayload {
|
|
98
|
+
gatewayId: string;
|
|
99
|
+
provider: string;
|
|
100
|
+
reason?: string;
|
|
101
|
+
/** When the window to act closes. The whole value of the alert is this field. */
|
|
102
|
+
actionableUntil?: string;
|
|
103
|
+
}
|
|
104
|
+
/** A dispute reaching its outcome. `won` returns the money; `lost` is final. */
|
|
105
|
+
export interface PaymentDisputeClosedPayload {
|
|
106
|
+
gatewayId: string;
|
|
107
|
+
provider: string;
|
|
108
|
+
disputeId: string;
|
|
109
|
+
outcome: 'won' | 'lost' | 'canceled' | 'expired';
|
|
110
|
+
amount?: number;
|
|
111
|
+
currency?: string;
|
|
112
|
+
}
|
|
83
113
|
export interface PaymentUpdatedPayload {
|
|
84
114
|
gatewayId: string;
|
|
85
115
|
provider: string;
|
|
@@ -91,6 +121,21 @@ export interface InvoiceEmittedPayload {
|
|
|
91
121
|
number?: string;
|
|
92
122
|
url?: string;
|
|
93
123
|
}
|
|
124
|
+
/**
|
|
125
|
+
* A fiscal invoice that could not be emitted for a charge that DID go through.
|
|
126
|
+
*
|
|
127
|
+
* The charge is the money and the invoice is a side effect of it, so a failing invoice
|
|
128
|
+
* provider no longer rejects `charge()` — that reported a failure over money the gateway had
|
|
129
|
+
* already taken, and the caller could only conclude nothing happened. It is published here
|
|
130
|
+
* instead, loudly, because in Brazil an NFS-e is a legal obligation and a silently missing
|
|
131
|
+
* one is worse than a noisy one.
|
|
132
|
+
*/
|
|
133
|
+
export interface InvoiceFailedPayload {
|
|
134
|
+
/** The PAYMENT's gateway id — the charge that exists and has no invoice. */
|
|
135
|
+
gatewayId: string;
|
|
136
|
+
provider: string;
|
|
137
|
+
error: string;
|
|
138
|
+
}
|
|
94
139
|
export interface WebhookReceivedPayload {
|
|
95
140
|
id: string;
|
|
96
141
|
provider: string;
|
|
@@ -107,6 +152,78 @@ export interface WebhookFailedPayload {
|
|
|
107
152
|
type: string;
|
|
108
153
|
error: string;
|
|
109
154
|
}
|
|
155
|
+
/**
|
|
156
|
+
* What actually authenticated (or did not authenticate) one webhook delivery.
|
|
157
|
+
*
|
|
158
|
+
* `webhook.received` only says an event arrived. This says whether the signature checked
|
|
159
|
+
* out and under which scheme — the first question asked whenever a gateway reports
|
|
160
|
+
* rejected deliveries, or whenever an endpoint turns out to have been accepting anything.
|
|
161
|
+
*/
|
|
162
|
+
export interface WebhookVerificationPayload {
|
|
163
|
+
provider: string;
|
|
164
|
+
/**
|
|
165
|
+
* - `verified` — a shared verification helper ran and the signature matched.
|
|
166
|
+
* - `failed` — the driver rejected the delivery (bad signature, missing header, stale
|
|
167
|
+
* timestamp, unparsable body); `reason` carries the driver's own message.
|
|
168
|
+
* - `unreported` — the delivery was accepted but **nothing verified it through the
|
|
169
|
+
* shared helpers**. Either the driver verified inside its own SDK (Stripe does), or
|
|
170
|
+
* it skipped verification because no webhook credential is configured. That second
|
|
171
|
+
* case is the usual answer to "why is my endpoint unauthenticated".
|
|
172
|
+
*/
|
|
173
|
+
outcome: 'verified' | 'failed' | 'unreported';
|
|
174
|
+
/** The scheme that ran, e.g. `hmac-sha256`, `standard-webhooks`, `rsa-sha256`. */
|
|
175
|
+
scheme?: string;
|
|
176
|
+
/** The rejection message, for `failed`. */
|
|
177
|
+
reason?: string;
|
|
178
|
+
/** How long parsing + verifying the delivery took. */
|
|
179
|
+
durationMs?: number;
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* One outbound call to a gateway API, as it actually went out — the entry a developer
|
|
183
|
+
* pastes into a bug report.
|
|
184
|
+
*
|
|
185
|
+
* Deliberately credential-free: no headers are ever recorded, and sensitive query
|
|
186
|
+
* parameters are redacted (see {@link redactQueryString}). Bodies are opt-in and off by
|
|
187
|
+
* default (see {@link configurePaymentsDiagnostics}) because a charge body carries card
|
|
188
|
+
* and CPF data.
|
|
189
|
+
*/
|
|
190
|
+
export interface GatewayRequestPayload {
|
|
191
|
+
/** The driver's provider name, when the caller passed one. `host` always identifies the gateway. */
|
|
192
|
+
provider?: string;
|
|
193
|
+
method: string;
|
|
194
|
+
/** Host of the resolved URL, e.g. `api.asaas.com`. */
|
|
195
|
+
host: string;
|
|
196
|
+
/** Path only — never the raw query string. */
|
|
197
|
+
path: string;
|
|
198
|
+
/** The query string with credential-bearing values replaced. Absent when there was none. */
|
|
199
|
+
query?: string;
|
|
200
|
+
status: number;
|
|
201
|
+
durationMs: number;
|
|
202
|
+
/** Correlation id, when the call happened inside a traced webhook delivery. */
|
|
203
|
+
traceId?: string;
|
|
204
|
+
/** Opt-in only, redacted. */
|
|
205
|
+
requestBody?: unknown;
|
|
206
|
+
/** Opt-in only, redacted. */
|
|
207
|
+
responseBody?: unknown;
|
|
208
|
+
}
|
|
209
|
+
/** The same call when it did not come back with a 2xx — a timeout, a transport error, or an HTTP error. */
|
|
210
|
+
export interface GatewayRequestFailedPayload {
|
|
211
|
+
provider?: string;
|
|
212
|
+
method: string;
|
|
213
|
+
host: string;
|
|
214
|
+
path: string;
|
|
215
|
+
query?: string;
|
|
216
|
+
/** Present for `http_error`; absent for a timeout or a transport failure. */
|
|
217
|
+
status?: number;
|
|
218
|
+
durationMs: number;
|
|
219
|
+
outcome: 'http_error' | 'timeout' | 'network_error';
|
|
220
|
+
/** A short, credential-free reason — never the thrown error's URL-bearing message. */
|
|
221
|
+
error: string;
|
|
222
|
+
traceId?: string;
|
|
223
|
+
requestBody?: unknown;
|
|
224
|
+
/** The gateway's error body. Opt-in only, redacted — it is also where a 422 explains itself. */
|
|
225
|
+
responseBody?: unknown;
|
|
226
|
+
}
|
|
110
227
|
/** Maps each event to its payload type, so {@link publishPayments} is checked at the call site. */
|
|
111
228
|
export interface PaymentsDiagnosticPayloads {
|
|
112
229
|
'charge.created': ChargeCreatedPayload;
|
|
@@ -117,16 +234,122 @@ export interface PaymentsDiagnosticPayloads {
|
|
|
117
234
|
'payment.succeeded': PaymentSucceededPayload;
|
|
118
235
|
'payment.failed': PaymentFailedPayload;
|
|
119
236
|
'payment.refunded': PaymentRefundedPayload;
|
|
237
|
+
'payment.disputed': PaymentDisputedPayload;
|
|
238
|
+
'payment.dispute_warning': PaymentDisputeWarningPayload;
|
|
239
|
+
'payment.dispute_closed': PaymentDisputeClosedPayload;
|
|
120
240
|
'payment.updated': PaymentUpdatedPayload;
|
|
121
241
|
'invoice.emitted': InvoiceEmittedPayload;
|
|
242
|
+
'invoice.failed': InvoiceFailedPayload;
|
|
122
243
|
'webhook.received': WebhookReceivedPayload;
|
|
244
|
+
'webhook.verification': WebhookVerificationPayload;
|
|
123
245
|
'webhook.processed': WebhookProcessedPayload;
|
|
124
246
|
'webhook.failed': WebhookFailedPayload;
|
|
247
|
+
'gateway.request': GatewayRequestPayload;
|
|
248
|
+
'gateway.request.failed': GatewayRequestFailedPayload;
|
|
249
|
+
}
|
|
250
|
+
/** What the debug diagnostics are allowed to record. */
|
|
251
|
+
export interface PaymentsDiagnosticsOptions {
|
|
252
|
+
/**
|
|
253
|
+
* Record the request and response bodies of gateway HTTP calls on
|
|
254
|
+
* `gateway.request`/`gateway.request.failed`.
|
|
255
|
+
*
|
|
256
|
+
* **Off by default, and it should stay off in production.** A charge body carries the
|
|
257
|
+
* cardholder's PAN and the payer's CPF/CNPJ; the response echoes much of it back.
|
|
258
|
+
* Known credential and cardholder keys are redacted even when this is on
|
|
259
|
+
* ({@link redactBody}), but redaction is a key-name heuristic, not a guarantee — turn
|
|
260
|
+
* this on to debug a specific integration, not as a standing setting.
|
|
261
|
+
*/
|
|
262
|
+
recordHttpBodies?: boolean;
|
|
263
|
+
/** Cap on a recorded body string, in characters. Default 2000. */
|
|
264
|
+
bodyMaxChars?: number;
|
|
125
265
|
}
|
|
266
|
+
/**
|
|
267
|
+
* Turn on the opt-in debug recording. Call it once, before the app serves traffic:
|
|
268
|
+
*
|
|
269
|
+
* ```ts title="start/telescope.ts"
|
|
270
|
+
* import { configurePaymentsDiagnostics } from '@adonis-agora/payments'
|
|
271
|
+
*
|
|
272
|
+
* configurePaymentsDiagnostics({ recordHttpBodies: true })
|
|
273
|
+
* ```
|
|
274
|
+
*
|
|
275
|
+
* It is a module-level switch rather than a `config/payments.ts` key because it is read
|
|
276
|
+
* by {@link publishGatewayRequest} on the HTTP path, which has no access to the app
|
|
277
|
+
* config — and because it is a debugging toggle, not a deployment setting.
|
|
278
|
+
*/
|
|
279
|
+
export declare function configurePaymentsDiagnostics(options: PaymentsDiagnosticsOptions): void;
|
|
280
|
+
/** The current opt-in switches (a copy — mutating it changes nothing). */
|
|
281
|
+
export declare function paymentsDiagnosticsOptions(): Required<PaymentsDiagnosticsOptions>;
|
|
282
|
+
/** Reset the switches to their defaults. Exists for tests. */
|
|
283
|
+
export declare function resetPaymentsDiagnosticsOptions(): void;
|
|
284
|
+
/** The marker left where a value was removed. Recognisable on sight in an entry. */
|
|
285
|
+
export declare const REDACTED = "[redacted]";
|
|
286
|
+
/**
|
|
287
|
+
* Redact a URL query string, keeping the parameter NAMES (which are what makes a call
|
|
288
|
+
* identifiable) and dropping any value that names a credential — Asaas passes
|
|
289
|
+
* `access_token`, several gateways accept `?api_key=`.
|
|
290
|
+
*
|
|
291
|
+
* Takes and returns the string with its leading `?`, so it round-trips a `URL.search`.
|
|
292
|
+
*/
|
|
293
|
+
export declare function redactQueryString(search: string): string;
|
|
294
|
+
/**
|
|
295
|
+
* Redact a free-text string that may embed `name=value` credentials — a transport error
|
|
296
|
+
* message that quotes the URL, say. Only the values are removed; the shape of the message
|
|
297
|
+
* survives, which is the part worth reading.
|
|
298
|
+
*/
|
|
299
|
+
export declare function redactText(text: string): string;
|
|
300
|
+
/**
|
|
301
|
+
* Redact a request/response body: every value under a sensitive key is replaced, long
|
|
302
|
+
* strings are truncated, and long arrays are cut short — so one pathological response
|
|
303
|
+
* cannot flood the Telescope store.
|
|
304
|
+
*
|
|
305
|
+
* Only ever reached when `recordHttpBodies` is on.
|
|
306
|
+
*/
|
|
307
|
+
export declare function redactBody(value: unknown, maxChars?: number): unknown;
|
|
308
|
+
/**
|
|
309
|
+
* One traced webhook delivery. Lives in an {@link AsyncLocalStorage} so everything the
|
|
310
|
+
* delivery triggers — the verification report, the ledger writes, the business events,
|
|
311
|
+
* any gateway call a handler makes — is stamped with the same `traceId` without a single
|
|
312
|
+
* argument being threaded through.
|
|
313
|
+
*/
|
|
314
|
+
export interface PaymentsTraceFrame {
|
|
315
|
+
traceId: string;
|
|
316
|
+
provider?: string;
|
|
317
|
+
/** Filled by {@link reportWebhookVerification} while the driver parses the delivery. */
|
|
318
|
+
verification?: {
|
|
319
|
+
scheme: string;
|
|
320
|
+
ok: boolean;
|
|
321
|
+
};
|
|
322
|
+
}
|
|
323
|
+
/** A fresh correlation id for one webhook delivery attempt. */
|
|
324
|
+
export declare function newPaymentsTraceId(): string;
|
|
325
|
+
/** Run `fn` with `frame` as the ambient payments trace. The frame is mutable by design. */
|
|
326
|
+
export declare function runWithPaymentsTrace<T>(frame: PaymentsTraceFrame, fn: () => T): T;
|
|
327
|
+
/** The ambient trace frame, when one is active. */
|
|
328
|
+
export declare function currentPaymentsTrace(): PaymentsTraceFrame | undefined;
|
|
329
|
+
/**
|
|
330
|
+
* Record that a shared webhook-verification helper ran, and whether it matched.
|
|
331
|
+
*
|
|
332
|
+
* Called by `webhook_security.ts`, so a driver gets this for free by using the shared
|
|
333
|
+
* primitives. A driver that verifies inside its own SDK (Stripe) reports nothing, which
|
|
334
|
+
* is why the published outcome for that case is `unreported` rather than `verified`.
|
|
335
|
+
*
|
|
336
|
+
* A passing report wins over a failing one: schemes are tried in sequence (Woovi checks
|
|
337
|
+
* HMAC then RSA) and the one that matched is the one that authenticated the delivery.
|
|
338
|
+
*/
|
|
339
|
+
export declare function reportWebhookVerification(scheme: string, ok: boolean): void;
|
|
340
|
+
/** Whether anything is listening — the cheap gate before building a debug payload. */
|
|
341
|
+
export declare function paymentsDiagnosticsEnabled(): boolean;
|
|
126
342
|
/**
|
|
127
343
|
* Publish a payments event on `agora:payments:<event>` via the structural diagnostics
|
|
128
344
|
* slot. No-op when diagnostics isn't installed (the slot is empty) — and it never throws
|
|
129
345
|
* back into the library.
|
|
346
|
+
*
|
|
347
|
+
* When a {@link PaymentsTraceFrame} is active and the payload does not already carry a
|
|
348
|
+
* `traceId`, the frame's id is stamped onto the payload. It goes on the PAYLOAD, not on
|
|
349
|
+
* the envelope: the structural emit slot is `(lib, event, payload)`, so payments cannot
|
|
350
|
+
* set `DiagnosticEvent.traceId` — and it should not want to, since diagnostics fills that
|
|
351
|
+
* field from the host's own request-context accessor and overwriting it would break
|
|
352
|
+
* cross-library correlation. The watcher merges the two, envelope first.
|
|
130
353
|
*/
|
|
131
354
|
export declare function publishPayments<E extends PaymentsDiagnosticEvent>(event: E, payload: PaymentsDiagnosticPayloads[E]): void;
|
|
132
355
|
/** Wrap a unit of payments work in a structural trace span. */
|
|
@@ -146,10 +369,67 @@ export declare function publishRefundDiagnostics(refund: {
|
|
|
146
369
|
};
|
|
147
370
|
}): void;
|
|
148
371
|
export declare function publishSubscriptionDiagnostics(subscription: Subscription, event: 'subscription.created' | 'subscription.canceled'): void;
|
|
372
|
+
/** Publish `invoice.failed` — a charge that went through with no fiscal invoice behind it. */
|
|
373
|
+
export declare function publishInvoiceFailedDiagnostics(failure: {
|
|
374
|
+
gatewayId: string;
|
|
375
|
+
provider: string;
|
|
376
|
+
error: string;
|
|
377
|
+
}): void;
|
|
149
378
|
export declare function publishInvoiceEmittedDiagnostics(invoice: {
|
|
150
379
|
gatewayId: string;
|
|
151
380
|
provider: string;
|
|
152
381
|
number?: string;
|
|
153
382
|
url?: string;
|
|
154
383
|
}): void;
|
|
384
|
+
/** One completed gateway call, as `httpRequest` saw it. */
|
|
385
|
+
export interface GatewayCall {
|
|
386
|
+
provider?: string;
|
|
387
|
+
method: string;
|
|
388
|
+
baseUrl: string;
|
|
389
|
+
path: string;
|
|
390
|
+
/** `Date.now()` taken immediately before the fetch. */
|
|
391
|
+
startedAt: number;
|
|
392
|
+
/** The JSON body that was sent, if any. Recorded only when `recordHttpBodies` is on. */
|
|
393
|
+
requestBody?: unknown;
|
|
394
|
+
}
|
|
395
|
+
/** How the call ended. */
|
|
396
|
+
export type GatewayOutcome = {
|
|
397
|
+
ok: true;
|
|
398
|
+
status: number;
|
|
399
|
+
responseBody?: unknown;
|
|
400
|
+
} | {
|
|
401
|
+
ok: false;
|
|
402
|
+
outcome: 'http_error' | 'timeout' | 'network_error';
|
|
403
|
+
status?: number;
|
|
404
|
+
/** Already free of credentials — the caller builds it, never the thrown error. */
|
|
405
|
+
error: string;
|
|
406
|
+
responseBody?: unknown;
|
|
407
|
+
};
|
|
408
|
+
/**
|
|
409
|
+
* Publish `gateway.request` / `gateway.request.failed` for one outbound gateway call.
|
|
410
|
+
*
|
|
411
|
+
* Everything here is best-effort and swallowed: an observability channel must never be
|
|
412
|
+
* the reason a charge fails. Returns immediately when nothing is listening, so the URL
|
|
413
|
+
* parsing and redaction below are not paid for on an app without diagnostics installed.
|
|
414
|
+
*/
|
|
415
|
+
export declare function publishGatewayRequest(call: GatewayCall, outcome: GatewayOutcome): void;
|
|
416
|
+
/**
|
|
417
|
+
* Work out what authenticated one delivery, from what the shared verification helpers
|
|
418
|
+
* reported into `frame` while the driver parsed it.
|
|
419
|
+
*
|
|
420
|
+
* - a report that PASSED → `verified`, named by its scheme.
|
|
421
|
+
* - a report that FAILED, or a `failure` message from a thrown `parseWebhook` → `failed`.
|
|
422
|
+
* - nothing reported and no failure → `unreported`. Note what this does NOT claim: it
|
|
423
|
+
* does not say the delivery was unverified. Stripe verifies inside its own SDK and
|
|
424
|
+
* reports nothing, and a driver whose webhook credential is unset skips the check and
|
|
425
|
+
* also reports nothing. Both land here, and the entry says so rather than guessing.
|
|
426
|
+
*/
|
|
427
|
+
export declare function webhookVerificationOutcome(frame: PaymentsTraceFrame | undefined, failure?: string): Pick<WebhookVerificationPayload, 'outcome' | 'scheme' | 'reason'>;
|
|
428
|
+
/**
|
|
429
|
+
* Publish `webhook.verification` for one delivery: what authenticated it, or that
|
|
430
|
+
* nothing did.
|
|
431
|
+
*
|
|
432
|
+
* `outcome` is derived rather than asserted — see {@link webhookVerificationOutcome}.
|
|
433
|
+
*/
|
|
434
|
+
export declare function publishWebhookVerification(payload: WebhookVerificationPayload): void;
|
|
155
435
|
//# sourceMappingURL=diagnostics.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diagnostics.d.ts","sourceRoot":"","sources":["../../src/diagnostics.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"diagnostics.d.ts","sourceRoot":"","sources":["../../src/diagnostics.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAYxD;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,0BAA0B,qbAqB7B,CAAC;AAEX,MA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