@adonis-agora/payments-dashboard 0.3.0 → 0.5.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,54 @@
1
1
  # @adonis-agora/payments-dashboard
2
2
 
3
+ ## 0.5.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#148](https://github.com/DavideCarvalho/adonis-agora-payments/pull/148) [`2ae630b`](https://github.com/DavideCarvalho/adonis-agora-payments/commit/2ae630b7393c4e251ce47049b3467282a335326b) Thanks [@DavideCarvalho](https://github.com/DavideCarvalho)! - Drop Node 20, which reached end-of-life on 2026-04-30, and Node 22, which AdonisJS 7 does not support (it requires Node >=24): `engines.node` is now `>=24`. The supported Node lines are 24 and 26, and CI runs the test suite on each of them.
8
+
9
+ ## 0.4.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [#43](https://github.com/DavideCarvalho/adonis-agora-payments/pull/43) [`ea598e8`](https://github.com/DavideCarvalho/adonis-agora-payments/commit/ea598e840aa85e4b2634863165da6bd4fcde90f8) Thanks [@DavideCarvalho](https://github.com/DavideCarvalho)! - Pagination is now `{ page, size }` everywhere, matching `@adonis-agora/filter`.
14
+
15
+ **Breaking rename.** Every list read took `{ limit?, offset? }` with a **0-based** `offset`; it now
16
+ takes `{ page?, size? }` with a **1-based** `page` (default `1`) and `size` as the page size
17
+ (default 50, capped at 200 — the same numbers as before). The 0-based SQL offset became an internal
18
+ detail computed by the store, so it can no longer leak into a public type or a query string.
19
+
20
+ The reason is ecosystem consistency, not taste: `@adonis-agora/filter` exposes `FilterInput.page`
21
+ /`.size` and resolves them to `{ page, size }`, and every `@adonis-agora/*` library is being moved
22
+ onto that one shape so an app (or a console) never has to remember which library counts from zero.
23
+ The match is **structural** — this package still depends on no filter package.
24
+
25
+ ```ts
26
+ // before
27
+ await store.listPayments({ status: 'failed', limit: 20, offset: 40 })
28
+ // after — page 3 of 20, 1-based
29
+ await store.listPayments({ status: 'failed', size: 20, page: 3 })
30
+ ```
31
+
32
+ What changed, concretely:
33
+
34
+ - `BillingListQuery`, `PaymentListQuery`, `WebhookEventListQuery`, `CustomerListQuery`,
35
+ `AuditEventQuery`, `DisputeDeadlineQuery`, `OpenDisputeQuery` and
36
+ `listWebhookEventsForPayment`'s options: `limit`/`offset` → `size`/`page`.
37
+ - `AuditEventCountQuery` is now `Omit<AuditEventQuery, 'page' | 'size'>`, and
38
+ `countDisputesDueWithin` takes `Omit<DisputeDeadlineQuery, 'page' | 'size'>`.
39
+ - `BILLING_LIST_DEFAULT_LIMIT` → `BILLING_LIST_DEFAULT_SIZE` (still 50);
40
+ `BILLING_LIST_MAX_LIMIT` → `BILLING_LIST_MAX_SIZE` (still 200).
41
+ - `clampLimit`/`clampOffset` → `clampSize`/`clampPage`, plus `listOffset(page, size)` for stores
42
+ that need the SQL offset.
43
+ - Dashboard JSON API: lists read `?page=1&size=25` instead of `?limit=25&offset=0`, and echo the
44
+ paging back under `meta: { page, size, count, … }` instead of `page: { limit, offset, … }`.
45
+ `count === size` is still the only "there might be more" signal. `meta` is Lucid's own spelling —
46
+ `.paginate()` answers `{ meta, data }` — and it is the envelope key every `@adonis-agora` console
47
+ now uses.
48
+ - Dashboard SPA: `paymentsClient` list options take `{ page, size }`, the `Page` wire type is now
49
+ `ListMeta` and every list response carries it as `meta`, and the `Pager` control is page-based
50
+ (`page`/`size`/`onPage`). `ScanNotice` takes a `meta` prop.
51
+
3
52
  ## 0.3.0
4
53
 
5
54
  ### Minor Changes