@adonis-agora/payments 0.11.0 → 0.12.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 +43 -0
- package/dist/assets/spa/assets/{index-Q4Eewxjq.js → index-DYQO0uZL.js} +2 -2
- package/dist/assets/spa/assets/{index-Q4Eewxjq.js.map → index-DYQO0uZL.js.map} +1 -1
- package/dist/assets/spa/index.html +1 -1
- package/dist/commands/payments_sync.js +9 -9
- package/dist/commands/payments_sync.js.map +1 -1
- package/dist/src/billing/billing_health.js +2 -2
- package/dist/src/billing/billing_health.js.map +1 -1
- package/dist/src/billing/billing_store.d.ts +48 -13
- package/dist/src/billing/billing_store.d.ts.map +1 -1
- 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/index.js +1 -1
- package/dist/src/billing/index.js.map +1 -1
- package/dist/src/billing/list_query.d.ts +23 -7
- package/dist/src/billing/list_query.d.ts.map +1 -1
- package/dist/src/billing/list_query.js +33 -16
- package/dist/src/billing/list_query.js.map +1 -1
- package/dist/src/billing/lucid_billing_store.d.ts +2 -2
- package/dist/src/billing/lucid_billing_store.d.ts.map +1 -1
- package/dist/src/billing/lucid_billing_store.js +18 -18
- package/dist/src/billing/lucid_billing_store.js.map +1 -1
- package/dist/src/dashboard/handlers.d.ts +3 -3
- package/dist/src/dashboard/handlers.d.ts.map +1 -1
- package/dist/src/dashboard/handlers.js +68 -54
- package/dist/src/dashboard/handlers.js.map +1 -1
- package/dist/src/index.d.ts +1 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +1 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/testing/in_memory_billing_store.d.ts +2 -2
- package/dist/src/testing/in_memory_billing_store.d.ts.map +1 -1
- package/dist/src/testing/in_memory_billing_store.js +8 -8
- package/dist/src/testing/in_memory_billing_store.js.map +1 -1
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,48 @@
|
|
|
1
1
|
# @adonis-agora/payments
|
|
2
2
|
|
|
3
|
+
## 0.12.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#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`.
|
|
8
|
+
|
|
9
|
+
**Breaking rename.** Every list read took `{ limit?, offset? }` with a **0-based** `offset`; it now
|
|
10
|
+
takes `{ page?, size? }` with a **1-based** `page` (default `1`) and `size` as the page size
|
|
11
|
+
(default 50, capped at 200 — the same numbers as before). The 0-based SQL offset became an internal
|
|
12
|
+
detail computed by the store, so it can no longer leak into a public type or a query string.
|
|
13
|
+
|
|
14
|
+
The reason is ecosystem consistency, not taste: `@adonis-agora/filter` exposes `FilterInput.page`
|
|
15
|
+
/`.size` and resolves them to `{ page, size }`, and every `@adonis-agora/*` library is being moved
|
|
16
|
+
onto that one shape so an app (or a console) never has to remember which library counts from zero.
|
|
17
|
+
The match is **structural** — this package still depends on no filter package.
|
|
18
|
+
|
|
19
|
+
```ts
|
|
20
|
+
// before
|
|
21
|
+
await store.listPayments({ status: 'failed', limit: 20, offset: 40 })
|
|
22
|
+
// after — page 3 of 20, 1-based
|
|
23
|
+
await store.listPayments({ status: 'failed', size: 20, page: 3 })
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
What changed, concretely:
|
|
27
|
+
|
|
28
|
+
- `BillingListQuery`, `PaymentListQuery`, `WebhookEventListQuery`, `CustomerListQuery`,
|
|
29
|
+
`AuditEventQuery`, `DisputeDeadlineQuery`, `OpenDisputeQuery` and
|
|
30
|
+
`listWebhookEventsForPayment`'s options: `limit`/`offset` → `size`/`page`.
|
|
31
|
+
- `AuditEventCountQuery` is now `Omit<AuditEventQuery, 'page' | 'size'>`, and
|
|
32
|
+
`countDisputesDueWithin` takes `Omit<DisputeDeadlineQuery, 'page' | 'size'>`.
|
|
33
|
+
- `BILLING_LIST_DEFAULT_LIMIT` → `BILLING_LIST_DEFAULT_SIZE` (still 50);
|
|
34
|
+
`BILLING_LIST_MAX_LIMIT` → `BILLING_LIST_MAX_SIZE` (still 200).
|
|
35
|
+
- `clampLimit`/`clampOffset` → `clampSize`/`clampPage`, plus `listOffset(page, size)` for stores
|
|
36
|
+
that need the SQL offset.
|
|
37
|
+
- Dashboard JSON API: lists read `?page=1&size=25` instead of `?limit=25&offset=0`, and echo the
|
|
38
|
+
paging back under `meta: { page, size, count, … }` instead of `page: { limit, offset, … }`.
|
|
39
|
+
`count === size` is still the only "there might be more" signal. `meta` is Lucid's own spelling —
|
|
40
|
+
`.paginate()` answers `{ meta, data }` — and it is the envelope key every `@adonis-agora` console
|
|
41
|
+
now uses.
|
|
42
|
+
- Dashboard SPA: `paymentsClient` list options take `{ page, size }`, the `Page` wire type is now
|
|
43
|
+
`ListMeta` and every list response carries it as `meta`, and the `Pager` control is page-based
|
|
44
|
+
(`page`/`size`/`onPage`). `ScanNotice` takes a `meta` prop.
|
|
45
|
+
|
|
3
46
|
## 0.11.0
|
|
4
47
|
|
|
5
48
|
### Minor Changes
|