@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.
- package/CHANGELOG.md +2375 -0
- package/dist/assets/spa/assets/index-B7rU8eIL.css +2 -0
- package/dist/assets/spa/assets/index-BcM2VH5k.js +10 -0
- package/dist/assets/spa/assets/index-BcM2VH5k.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/make_billable.d.ts.map +1 -1
- package/dist/commands/make_billable.js +1 -1
- package/dist/commands/make_billable.js.map +1 -1
- package/dist/commands/make_webhook_handler.d.ts.map +1 -1
- package/dist/commands/make_webhook_handler.js +1 -1
- package/dist/commands/make_webhook_handler.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/commands/payments_webhook.d.ts.map +1 -1
- package/dist/commands/payments_webhook.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 +4 -3
- package/dist/src/billing/index.d.ts.map +1 -1
- package/dist/src/billing/index.js +2 -1
- 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 +5 -2
- package/dist/src/billing/mixins/index.d.ts.map +1 -1
- package/dist/src/billing/mixins/index.js +5 -2
- 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_billable.d.ts.map +1 -1
- 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 +15 -0
- package/dist/src/client/index.d.ts.map +1 -0
- package/dist/src/client/index.js +12 -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 +17 -0
- package/dist/src/dashboard/index.d.ts.map +1 -0
- package/dist/src/dashboard/index.js +13 -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 +245 -10
- 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 +13 -3
- 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 +53 -3
- 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 +41 -4
- package/dist/src/drivers/stripe.d.ts.map +1 -1
- package/dist/src/drivers/stripe.js +823 -26
- package/dist/src/drivers/stripe.js.map +1 -1
- package/dist/src/drivers/woovi.d.ts +11 -4
- 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/hooks/webhook_handlers.d.ts.map +1 -1
- package/dist/src/hooks/webhook_handlers.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 +54 -26
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +29 -12
- package/dist/src/index.js.map +1 -1
- package/dist/src/invoice/drivers/asaas.d.ts.map +1 -1
- package/dist/src/invoice/drivers/asaas.js.map +1 -1
- package/dist/src/invoice/drivers/enotas.d.ts.map +1 -1
- package/dist/src/invoice/drivers/enotas.js.map +1 -1
- package/dist/src/invoice/drivers/focus.d.ts.map +1 -1
- package/dist/src/invoice/drivers/focus.js.map +1 -1
- package/dist/src/invoice/drivers/plugnotas.d.ts.map +1 -1
- package/dist/src/invoice/drivers/plugnotas.js.map +1 -1
- package/dist/src/invoice/drivers/tecnospeed.d.ts.map +1 -1
- package/dist/src/invoice/drivers/tecnospeed.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/invoice/invoice_manager.d.ts.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 +66 -14
- 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/fake_payments_driver.d.ts +1 -1
- package/dist/src/testing/fake_payments_driver.d.ts.map +1 -1
- package/dist/src/testing/fake_payments_driver.js.map +1 -1
- 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 +3 -2
- 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/testing/mutable_clock.d.ts.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/main.js.map +1 -1
- package/dist/stubs/make/webhook_handler/main.stub +29 -11
- package/package.json +67 -32
|
@@ -1,5 +1,17 @@
|
|
|
1
|
+
import type { BillingStore } from './billing/billing_store.js';
|
|
2
|
+
import type { BillingModels } from './billing/lucid_billing_store.js';
|
|
1
3
|
import type { WebhookHandler } from './billing/webhook_processor.js';
|
|
2
4
|
import type { PaymentsDriver } from './driver.js';
|
|
5
|
+
import type { AdyenDriverConfig } from './drivers/adyen.js';
|
|
6
|
+
import type { DodoDriverConfig } from './drivers/dodo.js';
|
|
7
|
+
import type { LemonSqueezyDriverConfig } from './drivers/lemonsqueezy.js';
|
|
8
|
+
import type { MercadoPagoDriverConfig } from './drivers/mercadopago.js';
|
|
9
|
+
import type { MollieDriverConfig } from './drivers/mollie.js';
|
|
10
|
+
import type { PaddleDriverConfig } from './drivers/paddle.js';
|
|
11
|
+
import type { PayPalDriverConfig } from './drivers/paypal.js';
|
|
12
|
+
import type { PolarDriverConfig } from './drivers/polar.js';
|
|
13
|
+
import type { RazorpayDriverConfig } from './drivers/razorpay.js';
|
|
14
|
+
import type { SquareDriverConfig } from './drivers/square.js';
|
|
3
15
|
import type { InvoiceProvider } from './invoice/invoice_provider.js';
|
|
4
16
|
import type { InvoiceOptions, PaymentMethodName } from './types.js';
|
|
5
17
|
import type { WebhookHandlerService } from './webhook_handlers.js';
|
|
@@ -11,6 +23,16 @@ import type { WebhookHandlerService } from './webhook_handlers.js';
|
|
|
11
23
|
export type PaymentsDriverFactory = (ctx: PaymentsContext) => Promise<PaymentsDriver>;
|
|
12
24
|
/** A lazy factory that builds an {@link InvoiceProvider} (Focus, Tecnospeed, eNotas, PlugNotas). */
|
|
13
25
|
export type InvoiceProviderFactory = (ctx: InvoiceContext) => Promise<InvoiceProvider>;
|
|
26
|
+
/**
|
|
27
|
+
* A lazy factory that builds the {@link BillingStore} the billing layer persists through.
|
|
28
|
+
* Omit `billing.store` entirely and the Lucid store over the published tables is used.
|
|
29
|
+
*/
|
|
30
|
+
export type BillingStoreFactory = (ctx: BillingStoreContext) => BillingStore | Promise<BillingStore>;
|
|
31
|
+
/** Context handed to the billing-store factory when the provider resolves it. */
|
|
32
|
+
export interface BillingStoreContext {
|
|
33
|
+
/** Lazy access to the package's own config. */
|
|
34
|
+
config: () => PaymentsConfig;
|
|
35
|
+
}
|
|
14
36
|
/** `config.billing.handlers` — normalized webhook event type → handler. */
|
|
15
37
|
export type BillingHandlers = Record<string, WebhookHandler | WebhookHandlerService>;
|
|
16
38
|
/** Context handed to driver factories when the provider resolves them. */
|
|
@@ -28,8 +50,12 @@ export interface InvoiceContext {
|
|
|
28
50
|
export interface StripeDriverConfig {
|
|
29
51
|
/** Stripe secret key. Defaults to `env.get('STRIPE_KEY')`. */
|
|
30
52
|
apiKey?: string;
|
|
31
|
-
/**
|
|
32
|
-
|
|
53
|
+
/**
|
|
54
|
+
* Currency for charges that don't name one (lowercase ISO 4217). **Required** — Stripe
|
|
55
|
+
* bills in whatever you tell it to, so a default here would be a guess at which country
|
|
56
|
+
* the app charges in, and a wrong guess succeeds silently.
|
|
57
|
+
*/
|
|
58
|
+
currency: string;
|
|
33
59
|
/**
|
|
34
60
|
* Webhook signing secret (`whsec_...`) used to verify `stripe-signature`. Defaults
|
|
35
61
|
* to `env.get('STRIPE_WEBHOOK_SECRET')`. Required to parse Stripe webhooks.
|
|
@@ -60,6 +86,108 @@ export interface AsaasDriverConfig {
|
|
|
60
86
|
*/
|
|
61
87
|
webhookToken?: string;
|
|
62
88
|
}
|
|
89
|
+
export interface PagarmeDriverConfig {
|
|
90
|
+
/**
|
|
91
|
+
* Pagar.me secret key (`sk_…`, `sk_test_…` in the sandbox). Sent as the username of an
|
|
92
|
+
* HTTP Basic header with an empty password. Defaults to `env.get('PAGARME_SECRET_KEY')`.
|
|
93
|
+
*/
|
|
94
|
+
secretKey?: string;
|
|
95
|
+
/** Base URL of the Core API. Defaults to `https://api.pagar.me/core/v5`. */
|
|
96
|
+
baseUrl?: string;
|
|
97
|
+
/**
|
|
98
|
+
* Username of the optional HTTP Basic credentials you set on the webhook endpoint in the
|
|
99
|
+
* Pagar.me dashboard. Defaults to `env.get('PAGARME_WEBHOOK_USER')`. Pagar.me signs
|
|
100
|
+
* nothing — these credentials are the only authentication its webhooks offer, and when
|
|
101
|
+
* either is set the driver rejects requests that don't carry them.
|
|
102
|
+
*/
|
|
103
|
+
webhookUser?: string;
|
|
104
|
+
/** Password of those webhook credentials. Defaults to `env.get('PAGARME_WEBHOOK_PASSWORD')`. */
|
|
105
|
+
webhookPassword?: string;
|
|
106
|
+
/**
|
|
107
|
+
* Default Pix expiry in seconds when a charge doesn't set `metadata.expiresIn`. Pagar.me
|
|
108
|
+
* requires `expires_in` on every Pix payment. Defaults to 86400 (24h).
|
|
109
|
+
*/
|
|
110
|
+
pixExpiresIn?: number;
|
|
111
|
+
}
|
|
112
|
+
export interface InfinitePayDriverConfig {
|
|
113
|
+
/**
|
|
114
|
+
* Your InfiniteTag — the merchant handle the public checkout endpoint identifies you by.
|
|
115
|
+
* This is not a secret key: InfinitePay's checkout API takes no credentials at all.
|
|
116
|
+
* Defaults to `env.get('INFINITEPAY_HANDLE')`. "Checkout Integrado" must be enabled in
|
|
117
|
+
* the InfinitePay app before links can be created.
|
|
118
|
+
*/
|
|
119
|
+
handle?: string;
|
|
120
|
+
/** Base URL of the checkout API. Defaults to `https://api.checkout.infinitepay.io`. */
|
|
121
|
+
baseUrl?: string;
|
|
122
|
+
/**
|
|
123
|
+
* Where InfinitePay should POST the payment webhook. InfinitePay has **no global webhook
|
|
124
|
+
* registration** — the URL is sent per link — so without this (or
|
|
125
|
+
* `env.get('INFINITEPAY_WEBHOOK_URL')`) no webhook ever arrives. Point it at the
|
|
126
|
+
* library's route, e.g. `https://app.example.com/payments/webhook/infinitepay`, and
|
|
127
|
+
* consider adding an unguessable segment: the payload carries no signature.
|
|
128
|
+
*/
|
|
129
|
+
webhookUrl?: string;
|
|
130
|
+
}
|
|
131
|
+
export interface PagBankDriverConfig {
|
|
132
|
+
/** PagBank API token (Bearer). Defaults to `env.get('PAGBANK_TOKEN')`. */
|
|
133
|
+
token?: string;
|
|
134
|
+
/** Use the PagBank sandbox host. Defaults to `NODE_ENV !== 'production'`. */
|
|
135
|
+
sandbox?: boolean;
|
|
136
|
+
/**
|
|
137
|
+
* The token PagBank hashes into `x-authenticity-token` on webhooks. PagBank has no
|
|
138
|
+
* separate webhook secret — it is the same token that authenticates API calls — so this
|
|
139
|
+
* defaults to {@link PagBankDriverConfig.token} (or `env.get('PAGBANK_WEBHOOK_TOKEN')`),
|
|
140
|
+
* and webhook verification is on out of the box.
|
|
141
|
+
*/
|
|
142
|
+
webhookToken?: string;
|
|
143
|
+
/**
|
|
144
|
+
* Whether to verify `x-authenticity-token` on incoming webhooks. Defaults to `true`.
|
|
145
|
+
*
|
|
146
|
+
* The only reason this exists: PagBank's sandbox does not always send the header, so a
|
|
147
|
+
* developer testing locally would otherwise be stuck. Setting it to `false` leaves the
|
|
148
|
+
* webhook endpoint accepting anything that can reach it — never do that in production.
|
|
149
|
+
*/
|
|
150
|
+
verifyWebhooks?: boolean;
|
|
151
|
+
/**
|
|
152
|
+
* URLs PagBank notifies for the orders this driver creates (`notification_urls`).
|
|
153
|
+
* Usually one entry pointing at the lib-mounted `/payments/webhook/pagbank`. You can
|
|
154
|
+
* also configure it per account in the PagBank dashboard and leave this empty.
|
|
155
|
+
*/
|
|
156
|
+
notificationUrls?: string[];
|
|
157
|
+
}
|
|
158
|
+
export interface EfiDriverConfig {
|
|
159
|
+
/** Efí OAuth client id. Defaults to `env.get('EFI_CLIENT_ID')`. */
|
|
160
|
+
clientId?: string;
|
|
161
|
+
/** Efí OAuth client secret. Defaults to `env.get('EFI_CLIENT_SECRET')`. */
|
|
162
|
+
clientSecret?: string;
|
|
163
|
+
/**
|
|
164
|
+
* The Pix key that receives the charges (`chave` on every `cob`). Defaults to
|
|
165
|
+
* `env.get('EFI_PIX_KEY')`. Required — the Pix API refuses a charge without one.
|
|
166
|
+
*/
|
|
167
|
+
pixKey?: string;
|
|
168
|
+
/** Use the Efí homologation host (`pix-h`). Defaults to `NODE_ENV !== 'production'`. */
|
|
169
|
+
sandbox?: boolean;
|
|
170
|
+
/**
|
|
171
|
+
* The client certificate Efí's Pix API demands on **every** request, the token request
|
|
172
|
+
* included: a path to the `.p12` (or `.pem`) generated in the Efí dashboard, or its
|
|
173
|
+
* contents as a Buffer. Defaults to `env.get('EFI_CERTIFICATE')`.
|
|
174
|
+
*
|
|
175
|
+
* Mutual TLS cannot be expressed as a header, so this is not optional the way an API key
|
|
176
|
+
* is optional — without it (or a custom {@link EfiDriverConfig.fetch}) the driver
|
|
177
|
+
* refuses to boot.
|
|
178
|
+
*/
|
|
179
|
+
certificate?: string | Buffer | Uint8Array;
|
|
180
|
+
/** Passphrase of the `.p12`, when you set one. Efí's default export has none. */
|
|
181
|
+
certificatePassphrase?: string;
|
|
182
|
+
/** Default `cob` expiry in seconds. Defaults to 3600 (one hour). */
|
|
183
|
+
expirationSeconds?: number;
|
|
184
|
+
/**
|
|
185
|
+
* A `fetch` to use instead of the certificate-bearing one the driver builds. The escape
|
|
186
|
+
* hatch for terminating mTLS somewhere else (a proxy, a pooled undici dispatcher) — and
|
|
187
|
+
* what the tests inject.
|
|
188
|
+
*/
|
|
189
|
+
fetch?: typeof globalThis.fetch;
|
|
190
|
+
}
|
|
63
191
|
export interface FocusInvoiceConfig {
|
|
64
192
|
/** Focus NFe API token. Defaults to `env.get('FOCUS_NFE_TOKEN')`. */
|
|
65
193
|
token?: string;
|
|
@@ -120,7 +248,7 @@ export interface WooviDriverConfig {
|
|
|
120
248
|
* export default defineConfig({
|
|
121
249
|
* default: 'stripe',
|
|
122
250
|
* providers: {
|
|
123
|
-
* stripe: payments.stripe(),
|
|
251
|
+
* stripe: payments.stripe({ currency: 'usd' }),
|
|
124
252
|
* asaas: payments.asaas({ sandbox: true }),
|
|
125
253
|
* },
|
|
126
254
|
* invoice: {
|
|
@@ -161,6 +289,24 @@ export interface PaymentsConfig {
|
|
|
161
289
|
* ```
|
|
162
290
|
*/
|
|
163
291
|
methods?: Partial<Record<PaymentMethodName, string>>;
|
|
292
|
+
/**
|
|
293
|
+
* Providers whose webhook deliveries are allowed to arrive UNVERIFIED.
|
|
294
|
+
*
|
|
295
|
+
* By default the provider refuses to boot when a driver that can authenticate a webhook
|
|
296
|
+
* has no credential configured — an empty credential slot means the mounted
|
|
297
|
+
* `POST /payments/webhook/:provider` accepts anything anyone posts to it, and the built-in
|
|
298
|
+
* sync marks the payments in it paid.
|
|
299
|
+
*
|
|
300
|
+
* Set it when verification genuinely happens upstream (mutual TLS at the edge, an API
|
|
301
|
+
* gateway that checks the signature before forwarding), naming the providers:
|
|
302
|
+
*
|
|
303
|
+
* ```ts
|
|
304
|
+
* allowUnverifiedWebhooks: ['efi']
|
|
305
|
+
* ```
|
|
306
|
+
*
|
|
307
|
+
* `true` opts every provider out at once, which is almost never what you want.
|
|
308
|
+
*/
|
|
309
|
+
allowUnverifiedWebhooks?: boolean | string[];
|
|
164
310
|
/** Invoice emission settings. */
|
|
165
311
|
invoice?: InvoiceSectionConfig;
|
|
166
312
|
/** Billing (subscription) layer settings. */
|
|
@@ -170,6 +316,34 @@ export interface PaymentsConfig {
|
|
|
170
316
|
* billing stores, mixins and webhook processor. Defaults to true.
|
|
171
317
|
*/
|
|
172
318
|
enabled?: boolean;
|
|
319
|
+
/**
|
|
320
|
+
* Gateway event types your drivers pass through unmapped that you register a handler
|
|
321
|
+
* for, when the type happens to fall in the library's own `payment.*`/`subscription.*`
|
|
322
|
+
* namespace.
|
|
323
|
+
*
|
|
324
|
+
* A handler registered for a type nothing ever emits is a silent no-op — the ledger
|
|
325
|
+
* still records the delivery as processed — so a type in that namespace which is not one
|
|
326
|
+
* of the normalized `WEBHOOK_EVENT_TYPES` is refused at boot as a typo. A gateway type a
|
|
327
|
+
* driver could not map arrives lowercased as the gateway spells it
|
|
328
|
+
* (`payment_anticipated`), which needs no declaration; this is for the rare gateway that
|
|
329
|
+
* spells one WITH a dot in the same namespace.
|
|
330
|
+
*/
|
|
331
|
+
passthroughEvents?: string[];
|
|
332
|
+
/**
|
|
333
|
+
* Whether the library creates its own tables on first use. Defaults to **true**, the
|
|
334
|
+
* ecosystem convention — `@adonis-agora/durable` and `@adonis-agora/authz` both own
|
|
335
|
+
* their schema, and an app that installs a lib should not have to publish and run a
|
|
336
|
+
* migration before it can take a payment.
|
|
337
|
+
*
|
|
338
|
+
* The DDL is idempotent (`CREATE TABLE IF NOT EXISTS`), so an install that already ran
|
|
339
|
+
* the published migration gets no-ops.
|
|
340
|
+
*
|
|
341
|
+
* Set it to `false` when your schema is managed elsewhere — a shared database you do not
|
|
342
|
+
* own, a team that reviews every DDL, a deploy that runs migrations as a separate step.
|
|
343
|
+
* Then publish the migration (`node ace configure @adonis-agora/payments`) and run it;
|
|
344
|
+
* it calls the SAME `createBillingTables` function, so the two paths cannot drift.
|
|
345
|
+
*/
|
|
346
|
+
autoCreateSchema?: boolean;
|
|
173
347
|
/**
|
|
174
348
|
* Legacy alias for {@link dispatcher}: `'auto'` (default) or a boolean (`true` =
|
|
175
349
|
* `'durable'`, `false` = `'in-process'`). Prefer `dispatcher` for the full set of
|
|
@@ -180,16 +354,46 @@ export interface PaymentsConfig {
|
|
|
180
354
|
* How webhook events are processed:
|
|
181
355
|
*
|
|
182
356
|
* - `'auto'` (default) — `@adonis-agora/durable` when its provider is registered;
|
|
183
|
-
* else
|
|
357
|
+
* else in-process with retries.
|
|
184
358
|
* - `'durable'` — a durable workflow run (requires `@adonis-agora/durable`, throws when missing).
|
|
185
|
-
* - `'queue'` — an `@adonisjs/queue` job (requires the queue provider, throws when missing).
|
|
186
359
|
* - `'in-process'` — inline with exponential-backoff retries.
|
|
187
360
|
*
|
|
188
361
|
* Mirrors how other Agora libraries pick a backend (`durable`'s `store`, etc.).
|
|
362
|
+
*
|
|
363
|
+
* There was a `'queue'` here. It was declared, documented, and implemented nowhere — the
|
|
364
|
+
* dispatcher's `queueDispatch` hook was never read, so the mode fell through and silently
|
|
365
|
+
* ran one of the other two. It is refused at boot now rather than left to look supported.
|
|
366
|
+
*/
|
|
367
|
+
dispatcher?: 'auto' | 'durable' | 'in-process';
|
|
368
|
+
/**
|
|
369
|
+
* Which half of a split deployment this process is.
|
|
370
|
+
*
|
|
371
|
+
* - `'all'` (default) — one process receives webhooks and processes them.
|
|
372
|
+
* - `'api'` — mount the webhook route, validate and hand off; never process.
|
|
373
|
+
* App handlers are not resolved here, because they run on the worker.
|
|
374
|
+
* - `'worker'` — do not mount the route; process what the API half enqueued.
|
|
375
|
+
*
|
|
376
|
+
* Splitting requires a dispatcher with a channel between the halves, so
|
|
377
|
+
* `'api'`/`'worker'` demand an explicit `dispatcher: 'durable'`. `'in-process'` has no
|
|
378
|
+
* channel — it calls the processor directly — and `'auto'` is too vague to split on, so
|
|
379
|
+
* both are refused at boot.
|
|
380
|
+
*/
|
|
381
|
+
role?: 'all' | 'api' | 'worker';
|
|
382
|
+
/**
|
|
383
|
+
* Where the billing layer persists — subscriptions, payments, the idempotency
|
|
384
|
+
* ledger and usage events.
|
|
385
|
+
*
|
|
386
|
+
* Omit it: the Lucid store over the published billing tables is the default, and
|
|
387
|
+
* the provider binds it in the container so services can `@inject()` it.
|
|
388
|
+
*
|
|
389
|
+
* ```ts
|
|
390
|
+
* import { billingStores } from '@adonis-agora/payments'
|
|
391
|
+
*
|
|
392
|
+
* // Same as omitting it, but with your own models:
|
|
393
|
+
* store: billingStores.lucid({ models: { usageEventModel: MyUsageEvent } })
|
|
394
|
+
* ```
|
|
189
395
|
*/
|
|
190
|
-
|
|
191
|
-
/** Queue name the `'queue'` dispatcher enqueues to. Defaults to the queue's default. */
|
|
192
|
-
queue?: string;
|
|
396
|
+
store?: BillingStoreFactory;
|
|
193
397
|
/**
|
|
194
398
|
* Business webhook handlers run INSIDE the lib-mounted `/payments/webhook/:provider`
|
|
195
399
|
* route, by the {@link WebhookProcessor}. Errors mark the event failed in the ledger
|
|
@@ -219,10 +423,41 @@ export interface PaymentsConfig {
|
|
|
219
423
|
export declare function defineConfig<const T extends PaymentsConfig>(config: T): T;
|
|
220
424
|
/** Built-in driver factories. Each lazily imports its gateway SDK. */
|
|
221
425
|
export declare const payments: {
|
|
222
|
-
stripe(config
|
|
426
|
+
stripe(config: StripeDriverConfig): PaymentsDriverFactory;
|
|
223
427
|
abacate(config?: AbacateDriverConfig): PaymentsDriverFactory;
|
|
224
428
|
asaas(config?: AsaasDriverConfig): PaymentsDriverFactory;
|
|
225
429
|
woovi(config?: WooviDriverConfig): PaymentsDriverFactory;
|
|
430
|
+
pagarme(config?: PagarmeDriverConfig): PaymentsDriverFactory;
|
|
431
|
+
infinitepay(config?: InfinitePayDriverConfig): PaymentsDriverFactory;
|
|
432
|
+
pagbank(config?: PagBankDriverConfig): PaymentsDriverFactory;
|
|
433
|
+
efi(config?: EfiDriverConfig): PaymentsDriverFactory;
|
|
434
|
+
adyen(config: AdyenDriverConfig): PaymentsDriverFactory;
|
|
435
|
+
dodo(config: DodoDriverConfig): PaymentsDriverFactory;
|
|
436
|
+
lemonsqueezy(config: LemonSqueezyDriverConfig): PaymentsDriverFactory;
|
|
437
|
+
mercadopago(config: MercadoPagoDriverConfig): PaymentsDriverFactory;
|
|
438
|
+
mollie(config: MollieDriverConfig): PaymentsDriverFactory;
|
|
439
|
+
paddle(config: PaddleDriverConfig): PaymentsDriverFactory;
|
|
440
|
+
paypal(config: PayPalDriverConfig): PaymentsDriverFactory;
|
|
441
|
+
polar(config: PolarDriverConfig): PaymentsDriverFactory;
|
|
442
|
+
razorpay(config: RazorpayDriverConfig): PaymentsDriverFactory;
|
|
443
|
+
square(config: SquareDriverConfig): PaymentsDriverFactory;
|
|
444
|
+
};
|
|
445
|
+
/**
|
|
446
|
+
* Config types for the drivers whose interfaces live in their own module.
|
|
447
|
+
*
|
|
448
|
+
* The four original drivers declare their config here; the later ones declare it beside the
|
|
449
|
+
* driver so each module type-checks on its own. Re-exported so both halves look identical
|
|
450
|
+
* from the outside.
|
|
451
|
+
*/
|
|
452
|
+
export type { AdyenDriverConfig, DodoDriverConfig, LemonSqueezyDriverConfig, MercadoPagoDriverConfig, MollieDriverConfig, PaddleDriverConfig, PayPalDriverConfig, PolarDriverConfig, RazorpayDriverConfig, SquareDriverConfig, };
|
|
453
|
+
/**
|
|
454
|
+
* Built-in billing-store factories. The Lucid store is the default, so this only
|
|
455
|
+
* needs naming when you swap the models it reads and writes.
|
|
456
|
+
*/
|
|
457
|
+
export declare const billingStores: {
|
|
458
|
+
lucid(config?: {
|
|
459
|
+
models?: BillingModels;
|
|
460
|
+
}): BillingStoreFactory;
|
|
226
461
|
};
|
|
227
462
|
/** Built-in invoice provider factories. Each lazily imports its provider module. */
|
|
228
463
|
export declare const invoice: {
|
|
@@ -232,7 +467,7 @@ export declare const invoice: {
|
|
|
232
467
|
asaas(config?: AsaasInvoiceConfig): InvoiceProviderFactory;
|
|
233
468
|
tecnospeed(config?: TecnospeedInvoiceConfig): InvoiceProviderFactory;
|
|
234
469
|
};
|
|
235
|
-
export type {
|
|
470
|
+
export type { InvoiceProvider, PaymentsDriver };
|
|
236
471
|
/** Invoice emission settings (the `invoice` key of {@link PaymentsConfig}). */
|
|
237
472
|
export interface InvoiceSectionConfig {
|
|
238
473
|
/** Name of the default invoice provider (a key of `invoice.providers`). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"define_config.d.ts","sourceRoot":"","sources":["../../src/define_config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,KAAK,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AACpE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAEnE;;;;GAIG;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,GAAG,EAAE,eAAe,KAAK,OAAO,CAAC,cAAc,CAAC,CAAC;AAEtF,oGAAoG;AACpG,MAAM,MAAM,sBAAsB,GAAG,CAAC,GAAG,EAAE,cAAc,KAAK,OAAO,CAAC,eAAe,CAAC,CAAC;AAEvF,2EAA2E;AAC3E,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,cAAc,GA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,sBAAsB;IAM9D,MAAM,UAAS,mBAAmB,GAAQ,sBAAsB;IAMhE,SAAS,UAAS,sBAAsB,GAAQ,sBAAsB;IAMtE,KAAK,UAAS,kBAAkB,GAAQ,sBAAsB;IAM9D,UAAU,UAAS,uBAAuB,GAAQ,sBAAsB;CAMzE,CAAC;AAEF,YAAY,EAAE,eAAe,EAAE,cAAc,EAAE,CAAC;AAEhD,+EAA+E;AAC/E,MAAM,WAAW,oBAAoB;IACnC,2EAA2E;IAC3E,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,uEAAuE;IACvE,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,sBAAsB,CAAC,CAAC;IACnD,mDAAmD;IACnD,QAAQ,CAAC,EAAE;QACT,OAAO,CAAC,EAAE,cAAc,CAAC,SAAS,CAAC,CAAC;QACpC,GAAG,CAAC,EAAE,cAAc,CAAC,KAAK,CAAC,CAAC;QAC5B,QAAQ,CAAC,EAAE,cAAc,CAAC,UAAU,CAAC,CAAC;KACvC,CAAC;CACH;AAED,YAAY,EAAE,aAAa,EAAE,CAAC;AAE9B,KAAK,aAAa,GAAG,oBAAoB,CAAC"}
|
|
@@ -6,7 +6,7 @@ export function defineConfig(config) {
|
|
|
6
6
|
}
|
|
7
7
|
/** Built-in driver factories. Each lazily imports its gateway SDK. */
|
|
8
8
|
export const payments = {
|
|
9
|
-
stripe(config
|
|
9
|
+
stripe(config) {
|
|
10
10
|
return async (ctx) => {
|
|
11
11
|
const { StripeDriver } = await import('./drivers/stripe.js');
|
|
12
12
|
return new StripeDriver(ctx, config);
|
|
@@ -30,6 +30,102 @@ export const payments = {
|
|
|
30
30
|
return new WooviDriver(ctx, config);
|
|
31
31
|
};
|
|
32
32
|
},
|
|
33
|
+
pagarme(config = {}) {
|
|
34
|
+
return async (ctx) => {
|
|
35
|
+
const { PagarmeDriver } = await import('./drivers/pagarme.js');
|
|
36
|
+
return new PagarmeDriver(ctx, config);
|
|
37
|
+
};
|
|
38
|
+
},
|
|
39
|
+
infinitepay(config = {}) {
|
|
40
|
+
return async (ctx) => {
|
|
41
|
+
const { InfinitePayDriver } = await import('./drivers/infinitepay.js');
|
|
42
|
+
return new InfinitePayDriver(ctx, config);
|
|
43
|
+
};
|
|
44
|
+
},
|
|
45
|
+
pagbank(config = {}) {
|
|
46
|
+
return async (ctx) => {
|
|
47
|
+
const { PagBankDriver } = await import('./drivers/pagbank.js');
|
|
48
|
+
return new PagBankDriver(ctx, config);
|
|
49
|
+
};
|
|
50
|
+
},
|
|
51
|
+
efi(config = {}) {
|
|
52
|
+
return async (ctx) => {
|
|
53
|
+
const { EfiDriver } = await import('./drivers/efi.js');
|
|
54
|
+
return new EfiDriver(ctx, config);
|
|
55
|
+
};
|
|
56
|
+
},
|
|
57
|
+
adyen(config) {
|
|
58
|
+
return async (ctx) => {
|
|
59
|
+
const { AdyenDriver } = await import('./drivers/adyen.js');
|
|
60
|
+
return new AdyenDriver(ctx, config);
|
|
61
|
+
};
|
|
62
|
+
},
|
|
63
|
+
dodo(config) {
|
|
64
|
+
return async (ctx) => {
|
|
65
|
+
const { DodoDriver } = await import('./drivers/dodo.js');
|
|
66
|
+
return new DodoDriver(ctx, config);
|
|
67
|
+
};
|
|
68
|
+
},
|
|
69
|
+
lemonsqueezy(config) {
|
|
70
|
+
return async (ctx) => {
|
|
71
|
+
const { LemonSqueezyDriver } = await import('./drivers/lemonsqueezy.js');
|
|
72
|
+
return new LemonSqueezyDriver(ctx, config);
|
|
73
|
+
};
|
|
74
|
+
},
|
|
75
|
+
mercadopago(config) {
|
|
76
|
+
return async (ctx) => {
|
|
77
|
+
const { MercadoPagoDriver } = await import('./drivers/mercadopago.js');
|
|
78
|
+
return new MercadoPagoDriver(ctx, config);
|
|
79
|
+
};
|
|
80
|
+
},
|
|
81
|
+
mollie(config) {
|
|
82
|
+
return async (ctx) => {
|
|
83
|
+
const { MollieDriver } = await import('./drivers/mollie.js');
|
|
84
|
+
return new MollieDriver(ctx, config);
|
|
85
|
+
};
|
|
86
|
+
},
|
|
87
|
+
paddle(config) {
|
|
88
|
+
return async (ctx) => {
|
|
89
|
+
const { PaddleDriver } = await import('./drivers/paddle.js');
|
|
90
|
+
return new PaddleDriver(ctx, config);
|
|
91
|
+
};
|
|
92
|
+
},
|
|
93
|
+
paypal(config) {
|
|
94
|
+
return async (ctx) => {
|
|
95
|
+
const { PayPalDriver } = await import('./drivers/paypal.js');
|
|
96
|
+
return new PayPalDriver(ctx, config);
|
|
97
|
+
};
|
|
98
|
+
},
|
|
99
|
+
polar(config) {
|
|
100
|
+
return async (ctx) => {
|
|
101
|
+
const { PolarDriver } = await import('./drivers/polar.js');
|
|
102
|
+
return new PolarDriver(ctx, config);
|
|
103
|
+
};
|
|
104
|
+
},
|
|
105
|
+
razorpay(config) {
|
|
106
|
+
return async (ctx) => {
|
|
107
|
+
const { RazorpayDriver } = await import('./drivers/razorpay.js');
|
|
108
|
+
return new RazorpayDriver(ctx, config);
|
|
109
|
+
};
|
|
110
|
+
},
|
|
111
|
+
square(config) {
|
|
112
|
+
return async (ctx) => {
|
|
113
|
+
const { SquareDriver } = await import('./drivers/square.js');
|
|
114
|
+
return new SquareDriver(ctx, config);
|
|
115
|
+
};
|
|
116
|
+
},
|
|
117
|
+
};
|
|
118
|
+
/**
|
|
119
|
+
* Built-in billing-store factories. The Lucid store is the default, so this only
|
|
120
|
+
* needs naming when you swap the models it reads and writes.
|
|
121
|
+
*/
|
|
122
|
+
export const billingStores = {
|
|
123
|
+
lucid(config = {}) {
|
|
124
|
+
return async () => {
|
|
125
|
+
const { LucidBillingStore } = await import('./billing/lucid_billing_store.js');
|
|
126
|
+
return new LucidBillingStore(config.models ?? {});
|
|
127
|
+
};
|
|
128
|
+
},
|
|
33
129
|
};
|
|
34
130
|
/** Built-in invoice provider factories. Each lazily imports its provider module. */
|
|
35
131
|
export const invoice = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"define_config.js","sourceRoot":"","sources":["../../src/define_config.ts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