@adonis-agora/payments-dashboard 0.5.1 → 1.0.0-rc.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 CHANGED
@@ -1,5 +1,27 @@
1
1
  # @adonis-agora/payments-dashboard
2
2
 
3
+ ## 1.0.0-rc.0
4
+
5
+ ### Major Changes
6
+
7
+ - [#220](https://github.com/DavideCarvalho/adonis-agora-payments/pull/220) [`198495f`](https://github.com/DavideCarvalho/adonis-agora-payments/commit/198495f227b18603e0082687d1d7b116eccac4f5) Thanks [@DavideCarvalho](https://github.com/DavideCarvalho)! - 1.0. The 0.x aliases are removed. See "Migrating to 1.0" in the docs.
8
+
9
+ - `@adonis-agora/payments`: `Payment.pixQrCode` is removed. Use `Payment.pixQrCodeImage`.
10
+ - `@adonis-agora/payments`: `Payment.pixCopiaECola` and `CheckoutSession.pixCopiaECola` are removed. Use `pixCode`. No driver sets the old names any more.
11
+ - `@adonis-agora/payments`: the `billing.durable` config option is removed. Use `billing.dispatcher` (`true` → `'durable'`, `false` → `'in-process'`). A config that still sets `durable` fails at boot with a message naming the replacement. The `configure` stub now writes `dispatcher: 'auto'`.
12
+ - `@adonis-agora/payments`: the payments client endpoint's default `authorize`/`owner` read only `ctx.auth.user`; the `ctx.auth.getUser()` probe (old authkit-client) is removed. Pass your own `authorize`/`owner` for any other auth shape.
13
+ - `@adonis-agora/payments`: `PROVIDER_SCAN_CAP` is no longer exported from `@adonis-agora/payments/dashboard`.
14
+ - `@adonis-agora/payments-dashboard`: the SPA no longer reads the `window.__PAYMENTS_BASE__` / `__PAYMENTS_API__` / `__PAYMENTS_CURRENCY__` / `__PAYMENTS_AUTH__` globals; config comes only from the provider's JSON data block. Without a block it falls back to `/payments`, the server's default mount (was `/payments-dashboard`).
15
+ - `@adonis-agora/payments-dashboard`: the `react` / `react-dom` peers are dropped. The console ships prebuilt with React bundled.
16
+ - The optional `@adonis-agora/durable` peer is widened to `>=0.1.0 <2.0.0 || >=1.0.0-rc.0 <2.0.0`.
17
+ - All packages require Node `>=24` (tested on 24 and 26).
18
+
19
+ ## 0.5.2
20
+
21
+ ### Patch Changes
22
+
23
+ - [#179](https://github.com/DavideCarvalho/adonis-agora-payments/pull/179) [`6968caf`](https://github.com/DavideCarvalho/adonis-agora-payments/commit/6968cafa9897c05669886d0472f35ca82111c228) Thanks [@DavideCarvalho](https://github.com/DavideCarvalho)! - perf: memoize the `Intl.NumberFormat`/`Intl.DateTimeFormat` instances behind the money, count and date cell formatters instead of constructing a new one per cell on every refetch (~20-50x cheaper per formatted value).
24
+
3
25
  ## 0.5.1
4
26
 
5
27
  ### Patch Changes
package/README.md CHANGED
@@ -39,14 +39,16 @@ import { defineConfig } from '@adonis-agora/payments/dashboard'
39
39
 
40
40
  export default defineConfig({
41
41
  enabled: true, // false => no routes are registered at all
42
- path: '/payments-dashboard', // the SPA mounts here; the JSON API at <path>/api
42
+ path: '/payments', // the SPA mounts here; the JSON API at <path>/api
43
43
  currency: 'BRL', // how the edge formats the integer cents it receives
44
44
  })
45
45
  ```
46
46
 
47
47
  **Auth defaults to the same posture as `@adonis-agora/durable`'s console**: open outside production;
48
48
  in production it requires a bearer token equal to `PAYMENTS_DASHBOARD_TOKEN`, and denies everything
49
- when that variable is unset. Replace `authorize` with your own guard, and/or add the optional
49
+ when that variable is unset. Replace `authorize` with your own guard — it returns `true`/`false` or
50
+ `{ allowed, reason?: 'unauthenticated' | 'forbidden' }` (`401` for `unauthenticated`, `403` for any
51
+ other denial or a throw) — and/or add the optional
50
52
  `dashboardAuth` session gate (a built-in login page and/or an "open the console from your app"
51
53
  endpoint) on top of it.
52
54
 
@@ -63,8 +65,7 @@ wider than the viewport.
63
65
 
64
66
  The provider hands the SPA its config as a `<script type="application/json">` data block, never an
65
67
  executable inline script, so `script-src 'self'` (with or without a nonce) is all the console needs.
66
- The `window.__PAYMENTS_*__` globals `src/client/payments-client.ts` also reads are a test/embedding
67
- escape hatch, consulted only when the block is absent.
68
+ That block is the only way the SPA learns its mount, API base, currency and auth surface.
68
69
 
69
70
  ## Money
70
71