@adonis-agora/payments 1.0.0-rc.1 → 1.0.0-rc.10
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 +60 -0
- package/dist/assets/spa/assets/index-5dx49kj3.js +10 -0
- package/dist/assets/spa/assets/index-5dx49kj3.js.map +1 -0
- package/dist/assets/spa/assets/index-CzCxJVQH.css +2 -0
- package/dist/assets/spa/index.html +2 -2
- package/dist/commands/agora_doctor.d.ts +23 -0
- package/dist/commands/agora_doctor.d.ts.map +1 -0
- package/dist/commands/agora_doctor.js +110 -0
- package/dist/commands/agora_doctor.js.map +1 -0
- package/dist/commands/main.d.ts +4 -3
- package/dist/commands/main.d.ts.map +1 -1
- package/dist/commands/main.js +5 -1
- package/dist/commands/main.js.map +1 -1
- package/dist/commands/payments_doctor.d.ts +8 -0
- package/dist/commands/payments_doctor.d.ts.map +1 -0
- package/dist/commands/payments_doctor.js +8 -0
- package/dist/commands/payments_doctor.js.map +1 -0
- package/dist/commands/payments_sync.d.ts +30 -0
- package/dist/commands/payments_sync.d.ts.map +1 -1
- package/dist/commands/payments_sync.js +125 -2
- package/dist/commands/payments_sync.js.map +1 -1
- package/dist/providers/dashboard_provider.d.ts +48 -5
- package/dist/providers/dashboard_provider.d.ts.map +1 -1
- package/dist/providers/dashboard_provider.js +403 -47
- package/dist/providers/dashboard_provider.js.map +1 -1
- package/dist/providers/payments_provider.d.ts.map +1 -1
- package/dist/providers/payments_provider.js +121 -0
- package/dist/providers/payments_provider.js.map +1 -1
- package/dist/src/account_console/card_mounters/asaas.d.ts +6 -0
- package/dist/src/account_console/card_mounters/asaas.d.ts.map +1 -0
- package/dist/src/account_console/card_mounters/asaas.js +45 -0
- package/dist/src/account_console/card_mounters/asaas.js.map +1 -0
- package/dist/src/account_console/card_mounters/mercadopago.d.ts +6 -0
- package/dist/src/account_console/card_mounters/mercadopago.d.ts.map +1 -0
- package/dist/src/account_console/card_mounters/mercadopago.js +33 -0
- package/dist/src/account_console/card_mounters/mercadopago.js.map +1 -0
- package/dist/src/account_console/card_mounters/pagarme.d.ts +7 -0
- package/dist/src/account_console/card_mounters/pagarme.d.ts.map +1 -0
- package/dist/src/account_console/card_mounters/pagarme.js +40 -0
- package/dist/src/account_console/card_mounters/pagarme.js.map +1 -0
- package/dist/src/account_console/card_mounters/paypal.d.ts +7 -0
- package/dist/src/account_console/card_mounters/paypal.d.ts.map +1 -0
- package/dist/src/account_console/card_mounters/paypal.js +16 -0
- package/dist/src/account_console/card_mounters/paypal.js.map +1 -0
- package/dist/src/account_console/card_mounters/square.d.ts +6 -0
- package/dist/src/account_console/card_mounters/square.d.ts.map +1 -0
- package/dist/src/account_console/card_mounters/square.js +18 -0
- package/dist/src/account_console/card_mounters/square.js.map +1 -0
- package/dist/src/account_console/card_mounters/stripe.d.ts +3 -0
- package/dist/src/account_console/card_mounters/stripe.d.ts.map +1 -0
- package/dist/src/account_console/card_mounters/stripe.js +17 -0
- package/dist/src/account_console/card_mounters/stripe.js.map +1 -0
- package/dist/src/account_console/card_script.d.ts +9 -0
- package/dist/src/account_console/card_script.d.ts.map +1 -0
- package/dist/src/account_console/card_script.js +133 -0
- package/dist/src/account_console/card_script.js.map +1 -0
- package/dist/src/account_console/card_ticket.d.ts +21 -0
- package/dist/src/account_console/card_ticket.d.ts.map +1 -0
- package/dist/src/account_console/card_ticket.js +67 -0
- package/dist/src/account_console/card_ticket.js.map +1 -0
- package/dist/src/account_console/contract.d.ts +200 -0
- package/dist/src/account_console/contract.d.ts.map +1 -0
- package/dist/src/account_console/contract.js +10 -0
- package/dist/src/account_console/contract.js.map +1 -0
- package/dist/src/account_console/extension.d.ts +117 -0
- package/dist/src/account_console/extension.d.ts.map +1 -0
- package/dist/src/account_console/extension.js +1031 -0
- package/dist/src/account_console/extension.js.map +1 -0
- package/dist/src/account_console/messages.d.ts +5 -0
- package/dist/src/account_console/messages.d.ts.map +1 -0
- package/dist/src/account_console/messages.js +182 -0
- package/dist/src/account_console/messages.js.map +1 -0
- package/dist/src/account_console/tokenize_endpoint.d.ts +30 -0
- package/dist/src/account_console/tokenize_endpoint.d.ts.map +1 -0
- package/dist/src/account_console/tokenize_endpoint.js +120 -0
- package/dist/src/account_console/tokenize_endpoint.js.map +1 -0
- package/dist/src/agora/tenancy.d.ts +132 -0
- package/dist/src/agora/tenancy.d.ts.map +1 -0
- package/dist/src/agora/tenancy.js +161 -0
- package/dist/src/agora/tenancy.js.map +1 -0
- package/dist/src/billing/billing_store.d.ts +62 -18
- package/dist/src/billing/billing_store.d.ts.map +1 -1
- package/dist/src/billing/billing_store.js +6 -0
- package/dist/src/billing/billing_store.js.map +1 -1
- package/dist/src/billing/index.d.ts +1 -1
- package/dist/src/billing/index.d.ts.map +1 -1
- package/dist/src/billing/lucid_billing_store.d.ts +42 -13
- package/dist/src/billing/lucid_billing_store.d.ts.map +1 -1
- package/dist/src/billing/lucid_billing_store.js +325 -100
- package/dist/src/billing/lucid_billing_store.js.map +1 -1
- package/dist/src/billing/owner_scope.d.ts +30 -0
- package/dist/src/billing/owner_scope.d.ts.map +1 -0
- package/dist/src/billing/owner_scope.js +35 -0
- package/dist/src/billing/owner_scope.js.map +1 -0
- package/dist/src/billing/resolve_store.d.ts.map +1 -1
- package/dist/src/billing/resolve_store.js +26 -2
- package/dist/src/billing/resolve_store.js.map +1 -1
- package/dist/src/billing/schema.d.ts +33 -3
- package/dist/src/billing/schema.d.ts.map +1 -1
- package/dist/src/billing/schema.js +153 -62
- package/dist/src/billing/schema.js.map +1 -1
- package/dist/src/billing/scoped_store.d.ts +18 -0
- package/dist/src/billing/scoped_store.d.ts.map +1 -0
- package/dist/src/billing/scoped_store.js +178 -0
- package/dist/src/billing/scoped_store.js.map +1 -0
- package/dist/src/billing/usage.d.ts +10 -1
- package/dist/src/billing/usage.d.ts.map +1 -1
- package/dist/src/billing/usage.js +25 -4
- package/dist/src/billing/usage.js.map +1 -1
- package/dist/src/billing/webhook_processor.d.ts +7 -0
- package/dist/src/billing/webhook_processor.d.ts.map +1 -1
- package/dist/src/billing/webhook_processor.js +37 -1
- package/dist/src/billing/webhook_processor.js.map +1 -1
- package/dist/src/client/define_config.d.ts +5 -1
- package/dist/src/client/define_config.d.ts.map +1 -1
- package/dist/src/client/define_config.js +15 -1
- package/dist/src/client/define_config.js.map +1 -1
- package/dist/src/current_customer.d.ts +27 -0
- package/dist/src/current_customer.d.ts.map +1 -0
- package/dist/src/current_customer.js +46 -0
- package/dist/src/current_customer.js.map +1 -0
- package/dist/src/dashboard/console_authorize.d.ts +24 -0
- package/dist/src/dashboard/console_authorize.d.ts.map +1 -1
- package/dist/src/dashboard/console_authorize.js +59 -2
- package/dist/src/dashboard/console_authorize.js.map +1 -1
- package/dist/src/dashboard/console_switcher.d.ts +113 -0
- package/dist/src/dashboard/console_switcher.d.ts.map +1 -0
- package/dist/src/dashboard/console_switcher.js +234 -0
- package/dist/src/dashboard/console_switcher.js.map +1 -0
- package/dist/src/dashboard/dev_tools.d.ts +119 -0
- package/dist/src/dashboard/dev_tools.d.ts.map +1 -0
- package/dist/src/dashboard/dev_tools.js +446 -0
- package/dist/src/dashboard/dev_tools.js.map +1 -0
- package/dist/src/dashboard/handlers.d.ts +28 -12
- package/dist/src/dashboard/handlers.d.ts.map +1 -1
- package/dist/src/dashboard/handlers.js +245 -228
- package/dist/src/dashboard/handlers.js.map +1 -1
- package/dist/src/dashboard/index.d.ts +10 -4
- package/dist/src/dashboard/index.d.ts.map +1 -1
- package/dist/src/dashboard/index.js +7 -2
- package/dist/src/dashboard/index.js.map +1 -1
- package/dist/src/dashboard/list_filters.d.ts +83 -0
- package/dist/src/dashboard/list_filters.d.ts.map +1 -0
- package/dist/src/dashboard/list_filters.js +152 -0
- package/dist/src/dashboard/list_filters.js.map +1 -0
- package/dist/src/dashboard/spa.d.ts +10 -1
- package/dist/src/dashboard/spa.d.ts.map +1 -1
- package/dist/src/dashboard/spa.js +3 -1
- package/dist/src/dashboard/spa.js.map +1 -1
- package/dist/src/dashboard/tenant_scope.d.ts +44 -0
- package/dist/src/dashboard/tenant_scope.d.ts.map +1 -0
- package/dist/src/dashboard/tenant_scope.js +42 -0
- package/dist/src/dashboard/tenant_scope.js.map +1 -0
- package/dist/src/define_config.d.ts +54 -0
- package/dist/src/define_config.d.ts.map +1 -1
- package/dist/src/define_config.js +12 -2
- package/dist/src/define_config.js.map +1 -1
- package/dist/src/doctor/agora_doctor.d.ts +116 -0
- package/dist/src/doctor/agora_doctor.d.ts.map +1 -0
- package/dist/src/doctor/agora_doctor.js +685 -0
- package/dist/src/doctor/agora_doctor.js.map +1 -0
- package/dist/src/doctor/checks.d.ts +53 -0
- package/dist/src/doctor/checks.d.ts.map +1 -0
- package/dist/src/doctor/checks.js +344 -0
- package/dist/src/doctor/checks.js.map +1 -0
- package/dist/src/doctor/index.d.ts +9 -0
- package/dist/src/doctor/index.d.ts.map +1 -0
- package/dist/src/doctor/index.js +8 -0
- package/dist/src/doctor/index.js.map +1 -0
- package/dist/src/driver.d.ts +85 -0
- package/dist/src/driver.d.ts.map +1 -1
- package/dist/src/drivers/asaas.d.ts +12 -1
- package/dist/src/drivers/asaas.d.ts.map +1 -1
- package/dist/src/drivers/asaas.js +29 -0
- package/dist/src/drivers/asaas.js.map +1 -1
- package/dist/src/drivers/dodo.d.ts +6 -1
- package/dist/src/drivers/dodo.d.ts.map +1 -1
- package/dist/src/drivers/dodo.js +12 -0
- package/dist/src/drivers/dodo.js.map +1 -1
- package/dist/src/drivers/lemonsqueezy.d.ts +7 -1
- package/dist/src/drivers/lemonsqueezy.d.ts.map +1 -1
- package/dist/src/drivers/lemonsqueezy.js +21 -0
- package/dist/src/drivers/lemonsqueezy.js.map +1 -1
- package/dist/src/drivers/mercadopago.d.ts +25 -1
- package/dist/src/drivers/mercadopago.d.ts.map +1 -1
- package/dist/src/drivers/mercadopago.js +46 -1
- package/dist/src/drivers/mercadopago.js.map +1 -1
- package/dist/src/drivers/paddle.d.ts +9 -1
- package/dist/src/drivers/paddle.d.ts.map +1 -1
- package/dist/src/drivers/paddle.js +24 -0
- package/dist/src/drivers/paddle.js.map +1 -1
- package/dist/src/drivers/pagarme.d.ts +13 -1
- package/dist/src/drivers/pagarme.d.ts.map +1 -1
- package/dist/src/drivers/pagarme.js +31 -0
- package/dist/src/drivers/pagarme.js.map +1 -1
- package/dist/src/drivers/paypal.d.ts +19 -1
- package/dist/src/drivers/paypal.d.ts.map +1 -1
- package/dist/src/drivers/paypal.js +62 -1
- package/dist/src/drivers/paypal.js.map +1 -1
- package/dist/src/drivers/polar.d.ts +6 -1
- package/dist/src/drivers/polar.d.ts.map +1 -1
- package/dist/src/drivers/polar.js +18 -0
- package/dist/src/drivers/polar.js.map +1 -1
- package/dist/src/drivers/square.d.ts +18 -1
- package/dist/src/drivers/square.d.ts.map +1 -1
- package/dist/src/drivers/square.js +49 -0
- package/dist/src/drivers/square.js.map +1 -1
- package/dist/src/drivers/stripe.d.ts +13 -1
- package/dist/src/drivers/stripe.d.ts.map +1 -1
- package/dist/src/drivers/stripe.js +81 -2
- package/dist/src/drivers/stripe.js.map +1 -1
- package/dist/src/ensure_customer.d.ts +9 -0
- package/dist/src/ensure_customer.d.ts.map +1 -1
- package/dist/src/ensure_customer.js +12 -3
- package/dist/src/ensure_customer.js.map +1 -1
- package/dist/src/index.d.ts +14 -5
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +4 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/payments_manager.d.ts +39 -1
- package/dist/src/payments_manager.d.ts.map +1 -1
- package/dist/src/payments_manager.js +77 -7
- package/dist/src/payments_manager.js.map +1 -1
- package/dist/src/testing/in_memory_billing_store.d.ts +14 -11
- package/dist/src/testing/in_memory_billing_store.d.ts.map +1 -1
- package/dist/src/testing/in_memory_billing_store.js +83 -25
- package/dist/src/testing/in_memory_billing_store.js.map +1 -1
- package/dist/stubs/database/migrations/create_billing_tables.stub +9 -2
- package/package.json +14 -3
- package/dist/assets/spa/assets/index-DeVNvGyC.js +0 -10
- package/dist/assets/spa/assets/index-DeVNvGyC.js.map +0 -1
- package/dist/assets/spa/assets/index-ZuYF2tz5.css +0 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,65 @@
|
|
|
1
1
|
# @adonis-agora/payments
|
|
2
2
|
|
|
3
|
+
## 1.0.0-rc.10
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [#237](https://github.com/DavideCarvalho/adonis-agora-payments/pull/237) [`66d22c9`](https://github.com/DavideCarvalho/adonis-agora-payments/commit/66d22c97f1c287de431cd0ca01ae9c8904b667f4) Thanks [@DavideCarvalho](https://github.com/DavideCarvalho)! - Console list endpoints use the `@adonis-agora/filter` wire format. `GET <path>/api/{payments,subscriptions,disputes,webhook-events,customers,audit}` take `filter[field]=value` (exact, one value), an optional `sort` limited to the list's one order, and `page`/`size`, and answer `{ data, meta: { total, perPage, currentPage, lastPage, firstPage } }` with a real total. Unknown filter fields, unsupported operators and other sorts answer `400`. The payments `reference` lookup is `filter[externalReference]`, the disputes work list is `filter[dueWithin]` with its total in `meta.total`. `BillingStore` count reads take the list filters (`PaymentCountQuery`, `SubscriptionCountQuery`, `DisputeCountQuery`, `WebhookEventCountQuery`) and a new `countCustomers` is required. The bundled console builds its requests with `@adonis-agora/filter-client` and pages with the real total.
|
|
8
|
+
|
|
9
|
+
## 1.0.0-rc.9
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#235](https://github.com/DavideCarvalho/adonis-agora-payments/pull/235) [`13c4b2d`](https://github.com/DavideCarvalho/adonis-agora-payments/commit/13c4b2debac163f0990d9ca005d5720b111cfba1) Thanks [@DavideCarvalho](https://github.com/DavideCarvalho)! - The payments console no longer gets a 404 on load with tenancy off. `GET <path>/api/tenants` is now always mounted and answers `{ mode: 'off' }` when tenancy is off, the same way telescope's console answers. The audited organization switch (`POST <path>/api/tenants/:id/select`) is still mounted only with tenancy on.
|
|
14
|
+
|
|
15
|
+
## 1.0.0-rc.8
|
|
16
|
+
|
|
17
|
+
### Minor Changes
|
|
18
|
+
|
|
19
|
+
- [#234](https://github.com/DavideCarvalho/adonis-agora-payments/pull/234) [`09f49a8`](https://github.com/DavideCarvalho/adonis-agora-payments/commit/09f49a8d3bde85c9b38517c5bb08349351561fc7) Thanks [@DavideCarvalho](https://github.com/DavideCarvalho)! - `billing.connection` and `billing.schema` put the billing tables on their own Lucid connection and in their own Postgres schema (MySQL: database), e.g. `"billing"."billing_payments"` while the app stays in `public`. Every statement names the schema: the DDL, the column checks, the store's reads and writes (so the dashboard, account console and dev MCP reads too), the published migration and `agora:doctor`. Nothing relies on `search_path`, so this is safe behind PgBouncer in transaction mode. The schema is created on first use (or by the migration), the name is validated at boot, and SQLite with a `schema` fails the boot. `billingStores.lucid(...)` inherits both options; `createBillingTables`/`dropBillingTables`/`truncateBillingTables` take `{ schema }`. Without either option, behaviour is unchanged.
|
|
20
|
+
|
|
21
|
+
## 1.0.0-rc.7
|
|
22
|
+
|
|
23
|
+
### Patch Changes
|
|
24
|
+
|
|
25
|
+
- [#233](https://github.com/DavideCarvalho/adonis-agora-payments/pull/233) [`0e33af4`](https://github.com/DavideCarvalho/adonis-agora-payments/commit/0e33af4ad2631cc3b4fe13bcaf23cfcefb802bbb) Thanks [@DavideCarvalho](https://github.com/DavideCarvalho)! - The billing store's "is this table/column installed?" probes no longer skip dispute, audit and ledger writes silently. They used a catalog lookup that only saw the connection's current schema, so a model with a qualified `static table` (or one living in another schema) read as "not installed" and its rows were never written. The probe now queries through the model itself, resolving the table exactly as the write does. When something really is missing: with `autoCreateSchema` on the write fails with an error naming the table (the model points somewhere the DDL did not create); with it off the write is skipped as before, with a warning logged once per process.
|
|
26
|
+
|
|
27
|
+
## 1.0.0-rc.6
|
|
28
|
+
|
|
29
|
+
### Minor Changes
|
|
30
|
+
|
|
31
|
+
- [#228](https://github.com/DavideCarvalho/adonis-agora-payments/pull/228) [`7f8a8a2`](https://github.com/DavideCarvalho/adonis-agora-payments/commit/7f8a8a2d3560d5aca56dfc7fb20e59f7277021c4) Thanks [@DavideCarvalho](https://github.com/DavideCarvalho)! - The payments console joins the Agora console switcher. It registers itself in the app's `'agora.consoles'` registry (created by whichever console boots first), and its heading becomes a menu to the other Agora consoles the viewer may open, each checked with that console's own `authorize` (300 ms each, in parallel; `ctx.agoraProbe` is `true` while they run). Ctrl/Cmd-K searches every console the viewer may open; payments answers payments (gateway id or reference), customers (gateway id or owner id) and subscriptions (gateway id or reference, opening that subscription), only within the organizations the viewer may see. New routes: `GET <path>/api/consoles` and `GET <path>/api/consoles/search?q=`, behind the console's `authorize`. `registerAgoraConsole` is exported from `@adonis-agora/payments/dashboard` for consoles an app mounts itself. Nothing changes for an app with a single console.
|
|
32
|
+
|
|
33
|
+
## 1.0.0-rc.5
|
|
34
|
+
|
|
35
|
+
### Minor Changes
|
|
36
|
+
|
|
37
|
+
- [#227](https://github.com/DavideCarvalho/adonis-agora-payments/pull/227) [`78d6fdf`](https://github.com/DavideCarvalho/adonis-agora-payments/commit/78d6fdfbff204063059b3a8157a43db8cb42c973) Thanks [@DavideCarvalho](https://github.com/DavideCarvalho)! - The payments console now serves its data to coding agents on the app's dev MCP endpoint (`/mcp/agora`) when the app registers `@adonis-agora/agent/mcp_provider`. Fourteen `payments_*` tools, gated by the console's own `authorize` and, with organizations on, scoped to the organizations the console shows the caller (`tenant` narrows to one). Reads (`payments_get_overview`, `payments_get_health`, `payments_list_payments`, `payments_get_payment`, `payments_list_subscriptions`, `payments_get_subscription`, `payments_list_disputes`, `payments_list_webhook_events`, `payments_list_customers`, `payments_list_audit`, `payments_list_organizations`) are listed by default and return what the console's JSON API returns. The actions (`payments_refund_payment`, `payments_retry_webhook_event`, `payments_resolve_dispute`) only when the app opts in on the dev endpoint; each is recorded in the activity trail as `mcp:<caller>`. No configuration in this package.
|
|
38
|
+
|
|
39
|
+
New `anyAuthorize(...authorizers)` in `@adonis-agora/payments/dashboard`: allows a request when any of the given `authorize` forms does, e.g. a console token for MCP clients or a signed-in admin.
|
|
40
|
+
|
|
41
|
+
- [#227](https://github.com/DavideCarvalho/adonis-agora-payments/pull/227) [`78d6fdf`](https://github.com/DavideCarvalho/adonis-agora-payments/commit/78d6fdfbff204063059b3a8157a43db8cb42c973) Thanks [@DavideCarvalho](https://github.com/DavideCarvalho)! - New `GET <path>/api/subscriptions/:id` in the payments console API: one subscription, by its id or its gateway id, with its current state, the customer it bills, the payments charged for it, the webhook events naming those payments and its audit rows. Scoped to the viewer's organizations like every other read (another organization's subscription is `404`). `GET <path>/api/subscriptions` also takes `customerId`. The billing store's `listSubscriptions` takes `id` and `listPayments` takes `subscriptionId` (exact matches; a custom store that ignores them still answers correctly in the console), and with organizations on, a subscription's audit rows are visible to a viewer who can see the subscription.
|
|
42
|
+
|
|
43
|
+
- [#227](https://github.com/DavideCarvalho/adonis-agora-payments/pull/227) [`78d6fdf`](https://github.com/DavideCarvalho/adonis-agora-payments/commit/78d6fdfbff204063059b3a8157a43db8cb42c973) Thanks [@DavideCarvalho](https://github.com/DavideCarvalho)! - A webhook retry from the payments console is now recorded in the activity trail as `webhook.retried`, with who ran it (the console viewer, or `mcp:<caller>` from the dev MCP tools: both paths write the same row), the gateway, and the event's type and previous error. The retry response carries the audit row. The Activity screen can filter retries.
|
|
44
|
+
|
|
45
|
+
## 1.0.0-rc.4
|
|
46
|
+
|
|
47
|
+
### Minor Changes
|
|
48
|
+
|
|
49
|
+
- [#229](https://github.com/DavideCarvalho/adonis-agora-payments/pull/229) [`771cf19`](https://github.com/DavideCarvalho/adonis-agora-payments/commit/771cf19a7ef13bde72b993b6e82a9014c811335e) Thanks [@DavideCarvalho](https://github.com/DavideCarvalho)! - Account console pages. When `@adonis-agora/authkit-server` (or authkit-client) is in the app, payments registers itself into authkit's `authkit.accountExtensions` registry, with no import of authkit. Signed-in users get `/account/billing` (cancel at period end, keep subscription, change plan, update card — each with confirmation and a recent sign-in), `/account/payment-method` (the card updated in place with the gateway's own component: Stripe Payment Element, Mercado Pago Secure Fields, Pagar.me, Square Web Payments, PayPal button, and an Asaas card form tokenized by the app) and `/account/invoices` (payments and gateway invoices, with download). Gateways without a component send the user to their own page (Stripe billing portal, Lemon Squeezy, Paddle, Polar, Dodo). New `accountConsole` option in `config/payments.ts`: `false`, or `{ owner, organizationRoles, pages, actions, plans, changePlan, invoiceUrl, path, publicUrl, returnUrl }`; with organizations on, the pages bill the active organization for its owners and admins. Drivers gain optional `cardSetup`, `saveCard` and `cardUpdateUrl`; `UpdateSubscriptionInput.planId` (Stripe swaps the price); new driver options `publishableKey` (Stripe), `publicKey` (Pagar.me, Mercado Pago), `applicationId` (Square).
|
|
50
|
+
|
|
51
|
+
## 1.0.0-rc.3
|
|
52
|
+
|
|
53
|
+
### Minor Changes
|
|
54
|
+
|
|
55
|
+
- [#225](https://github.com/DavideCarvalho/adonis-agora-payments/pull/225) [`da2bcf4`](https://github.com/DavideCarvalho/adonis-agora-payments/commit/da2bcf4419969d8f2b30baddca089db33a18a8aa) Thanks [@DavideCarvalho](https://github.com/DavideCarvalho)! - Organizations as tenants. With tenancy on in `@adonis-agora/context` (payments' new `tenancy` option defaults to `'inherit'`; nothing changes while it is off): `ensureCustomer` with a store and no `owner` records the active organization as the owner; `payments.currentOwner()` / `payments.currentCustomer()` answer the active organization's customer, else the signed-in user's (`userOwnerType`, default `'User'`); metered usage with no `customerId` is the current customer's; `payments.scopedStore()` confines reads to the current organization; app webhook handlers run inside the organization that owns the customer. The console's `authorize` may answer `tenants: '*' | string[]`; reads are confined to the viewer's organizations, `?tenant=` picks one (a pick outside the grant reads as empty and is audited), and the SPA gains an Organization picker. Store reads accept `owners` (custom stores opt in with `ownerScoping: true`). `payments:sync` gains `--tenant`, `--backfill-owner`, `--owner-id` and `--owner-key`.
|
|
56
|
+
|
|
57
|
+
## 1.0.0-rc.2
|
|
58
|
+
|
|
59
|
+
### Minor Changes
|
|
60
|
+
|
|
61
|
+
- [#224](https://github.com/DavideCarvalho/adonis-agora-payments/pull/224) [`2cc413d`](https://github.com/DavideCarvalho/adonis-agora-payments/commit/2cc413d2889a40e6d6f4f443dad315043247be64) Thanks [@DavideCarvalho](https://github.com/DavideCarvalho)! - `node ace agora:doctor` (and `payments:doctor`). The commands barrel now ships the shared Agora health check, and the payments provider registers its checks into the `'agora.doctor'` registry: `payments.webhook-secret`, `payments.webhook-csrf`, `payments.console-gate`, and with `--deep` `payments.tables` and `payments.health` (the `payments:health` report). The new `@adonis-agora/payments/doctor` entry serves `--no-boot`.
|
|
62
|
+
|
|
3
63
|
## 1.0.0-rc.1
|
|
4
64
|
|
|
5
65
|
### Major Changes
|