@adonis-agora/payments-dashboard 0.5.0 → 0.5.1
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,20 @@
|
|
|
1
1
|
# @adonis-agora/payments-dashboard
|
|
2
2
|
|
|
3
|
+
## 0.5.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#176](https://github.com/DavideCarvalho/adonis-agora-payments/pull/176) [`97fa0f6`](https://github.com/DavideCarvalho/adonis-agora-payments/commit/97fa0f6b687f521befc24a0f157358e528382bef) Thanks [@DavideCarvalho](https://github.com/DavideCarvalho)! - Faster, race-free webhook ledger and indexed console reads.
|
|
8
|
+
|
|
9
|
+
- **Concurrent duplicate deliveries no longer answer `500`.** The ledger claim is now the `INSERT` on the unique `gateway_event_id`: when a gateway redelivers while the first attempt is still running, exactly one delivery runs and the others answer as redeliveries instead of failing on the constraint (which made the gateway retry yet again). Re-claiming a `failed` event is a conditional `UPDATE`, so two concurrent retries cannot both re-run it. A new `payment.succeeded` delivery takes 4 database round trips instead of 6.
|
|
10
|
+
- **Payment timeline is an indexed lookup.** `billing_webhook_events` gains `payment_gateway_id` (added automatically, or by re-running the published migration), filled from the normalized event's `gatewayId` on `payment.*` events. `listWebhookEventsForPayment` matches on it; rows recorded before the column existed are still found by the payload substring scan. The dashboard reports `events.matchedBy: 'payment-gateway-id'`. A delivery that is about another payment but whose payload merely mentions this one is no longer listed.
|
|
11
|
+
- **Indexes.** Usage indexes now end in `recorded_at` (and `(recorded_at, meter)` serves the overview), so `usage().remaining()` reads only the window instead of every row the owner ever recorded; the three superseded usage indexes are dropped. New indexes on `status`/`created_at` (payments, webhook events, subscriptions), `created_at`, and `(status, paid_at)` for revenue.
|
|
12
|
+
- **Dashboard correctness.** `?provider=` is applied by the store on the payments, subscriptions and webhook-event pages, so rows older than the 1000 newest are no longer missing (`meta.truncated` is always `false`). A payment's disputes are read with the new `listDisputes({ paymentGatewayId })` filter instead of being picked out of the newest 50 disputes.
|
|
13
|
+
- **Fewer gateway calls on redelivery.** Mercado Pago and Mollie (next-gen) drivers implement the new optional `webhookEventIds()`: with a webhook secret configured, a redelivery of an event the ledger already holds is answered without fetching the resource again.
|
|
14
|
+
- Woovi's RSA public key is parsed once per key instead of on every webhook.
|
|
15
|
+
- **SQLite: ids stay uuids.** The default models now set `selfAssignPrimaryKey`, so Lucid keeps the uuid their `beforeCreate` hook generates instead of replacing it with the rowid SQLite's INSERT reports. On SQLite every later `where id = ?` used to miss, so a webhook was never marked `processed` or `failed`. Postgres and MySQL already kept the uuid and are unchanged.
|
|
16
|
+
- **SQLite: JSON columns round-trip.** Every default model's JSON column (`payload`, `metadata`, `normalized`, also on the `withPayment`/`withSubscription` mixins) now serializes to a JSON string on write and parses it on read, only when the connection is SQLite. Updating an existing row, such as a `payment.updated` on a recorded payment or the retry of a failed event, used to fail there because the driver cannot bind an object, and reads came back as strings. Postgres and MySQL get the value untouched both ways, so what they write is unchanged.
|
|
17
|
+
|
|
3
18
|
## 0.5.0
|
|
4
19
|
|
|
5
20
|
### Minor Changes
|