@crvouga/mockingbird-service-paddle 2.0.0 → 2.1.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 +10 -4
- package/README.md +10 -6
- package/SUPPORT.md +8 -6
- package/dist/{chunk-XGQMUZI5.js → chunk-RX7CMM47.js} +172 -9
- package/dist/{chunk-XGQMUZI5.js.map → chunk-RX7CMM47.js.map} +3 -3
- package/dist/{chunk-EBTO3BI2.js → chunk-VDA33BHD.js} +2 -2
- package/dist/cli.js +2 -2
- package/dist/index.d.ts +76 -5
- package/dist/index.js +1 -1
- package/dist/server.d.ts +71 -0
- package/dist/server.js +2 -2
- package/openapi.yaml +338 -11
- package/package.json +1 -1
- /package/dist/{chunk-EBTO3BI2.js.map → chunk-VDA33BHD.js.map} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Changelog — @crvouga/mockingbird-service-paddle
|
|
2
2
|
|
|
3
|
+
## 2.1.0 (2026-10-07)
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
- serve portal sessions and notification settings ([796e0e2](https://github.com/crvouga/mockingbird/commit/796e0e25eb0b071a478382a9fb3c526100bdf746))
|
|
8
|
+
|
|
9
|
+
### Fixes and improvements
|
|
10
|
+
|
|
11
|
+
- derive webhook destinations from stored settings ([5971ebd](https://github.com/crvouga/mockingbird/commit/5971ebde3d4759aab3c886eaebef2af3c0d90a17))
|
|
12
|
+
|
|
3
13
|
## 2.0.0 (2026-10-07)
|
|
4
14
|
|
|
5
15
|
### ⚠️ Breaking changes
|
|
@@ -14,10 +24,6 @@
|
|
|
14
24
|
- typecheck the brand gate before builds ([fc36095](https://github.com/crvouga/mockingbird/commit/fc3609514de70ffe3170a5d216fb8a49f9ce7cbb))
|
|
15
25
|
- format the emulates records query ([8698872](https://github.com/crvouga/mockingbird/commit/8698872509d06002be5a8fcdc85d79f8462320c3))
|
|
16
26
|
|
|
17
|
-
### Dependencies
|
|
18
|
-
|
|
19
|
-
- `@crvouga/mockingbird-service-sqlite`
|
|
20
|
-
|
|
21
27
|
## 1.3.0 (2026-10-04)
|
|
22
28
|
|
|
23
29
|
### Features
|
package/README.md
CHANGED
|
@@ -194,11 +194,15 @@ map API keys to namespaces: `PUT /__admin/credentials {"credentials": {"<PADDLE_
|
|
|
194
194
|
- **Proration.** Changing a subscription's items with a `*_immediately` mode bills what the
|
|
195
195
|
change adds in full, credits nothing for what it removes; the next-period modes bill nothing now. `PATCH /subscriptions/{id}/preview` and
|
|
196
196
|
`…/charge/preview` are unsupported.
|
|
197
|
-
- **The hosted checkout, customer portal and Paddle.js.** `checkout.url
|
|
198
|
-
are
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
`imported` events, API key events and client tokens.
|
|
197
|
+
- **The hosted checkout, customer portal pages and Paddle.js.** `checkout.url`, `management_urls`
|
|
198
|
+
and portal-session links are URLs, not pages; `POST /__admin/checkout` and `…/pay` replace the
|
|
199
|
+
checkout. `POST /customers/{id}/portal-sessions` returns the temporary https session links.
|
|
200
|
+
- **Payment methods and payment method changes**, payouts, reports, simulations, invoice
|
|
201
|
+
revisions, the `imported` events, API key events and client tokens.
|
|
202
|
+
- **Notification destinations** are the vendor API (`GET|POST /notification-settings`,
|
|
203
|
+
`GET|PATCH /notification-settings/{id}`). An active `url` destination is delivered with its
|
|
204
|
+
own `pdl_ntfset_…` secret. The secret is returned on create only. `--webhook-url` and
|
|
205
|
+
`PUT /__admin/webhook-endpoints` stay as extra receivers and are not replaced by the vendor list.
|
|
202
206
|
- **Time.** Nothing renews on its own: call `…/renew` (or `…/payment-failed`) when the test's
|
|
203
207
|
clock reaches `next_billed_at`. Retry schedules for past-due subscriptions are not modelled.
|
|
204
208
|
- **Rate limits**, except through `rate_limited`. Legacy (pre-2025) API key formats are
|
|
@@ -215,7 +219,7 @@ map API keys to namespaces: `PUT /__admin/credentials {"credentials": {"<PADDLE_
|
|
|
215
219
|
| `PADDLE_NAMESPACE` | string | The service name, `"paddle"`. |
|
|
216
220
|
| `AUTH_TOKEN_TTL_MS` | number | The advertised lifetime of a customer auth token (30 min). |
|
|
217
221
|
| `PaddleError` | class | The error a billing method throws: `status`, `code`, `detail`, `errors?`, `toResponse(requestId)`. |
|
|
218
|
-
| `PaddleState` | class | The SQLite-backed collections (`customers`, `addresses`, `businesses`, `products`, `prices`, `transactions`, `subscriptions`, `events`) and `nextId(kind)`. |
|
|
222
|
+
| `PaddleState` | class | The SQLite-backed collections (`customers`, `addresses`, `businesses`, `products`, `prices`, `transactions`, `subscriptions`, `events`, `notificationSettings`, `portalSessions`) and `nextId(kind)`. |
|
|
219
223
|
| `ID_PREFIX` | object | Paddle's id prefix per entity (`customer: "ctm"`, `price: "pri"`, …). |
|
|
220
224
|
| `document`, `operationIds`, `supportedOperationIds` | values | The vendored OpenAPI contract and its operation ids. |
|
|
221
225
|
| `createServer`, `serveTarget`, `DEFAULT_PORT` (`./server`) | Node | Serve over `node:http`; the `serve` CLI target (`--webhook-url`, `--webhook-secret`, `--payment-link`, `--fixtures`); port 8795. |
|
package/SUPPORT.md
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Generated from `openapi.yaml`; do not edit by hand.
|
|
4
4
|
|
|
5
|
-
- operations in spec: **
|
|
6
|
-
- supported by the mock: **
|
|
7
|
-
- parity enabled: **
|
|
5
|
+
- operations in spec: **50**
|
|
6
|
+
- supported by the mock: **42**
|
|
7
|
+
- parity enabled: **42**
|
|
8
8
|
|
|
9
9
|
| operationId | route | mock | parity | notes |
|
|
10
10
|
| --- | --- | --- | --- | --- |
|
|
@@ -49,10 +49,12 @@ Generated from `openapi.yaml`; do not edit by hand.
|
|
|
49
49
|
| `PreviewSubscriptionCharge` | `POST /subscriptions/{subscription_id}/charge/preview` | ❌ unsupported | — | One-time charge previews are not modelled; create the charge instead. |
|
|
50
50
|
| `GetSubscriptionPaymentMethodChangeTransaction` | `GET /subscriptions/{subscription_id}/update-payment-method-transaction` | ❌ unsupported | — | Payment method changes go through the hosted checkout, which the mock does not serve. |
|
|
51
51
|
| `ListEvents` | `GET /events` | ✅ supported | ✅ | |
|
|
52
|
-
| `ListNotificationSettings` | `GET /notification-settings` |
|
|
53
|
-
| `CreateNotificationSetting` | `POST /notification-settings` |
|
|
52
|
+
| `ListNotificationSettings` | `GET /notification-settings` | ✅ supported | ✅ | |
|
|
53
|
+
| `CreateNotificationSetting` | `POST /notification-settings` | ✅ supported | ⚠️ unsafe (opt-in) | |
|
|
54
|
+
| `GetNotificationSetting` | `GET /notification-settings/{notification_setting_id}` | ✅ supported | ✅ | |
|
|
55
|
+
| `UpdateNotificationSetting` | `PATCH /notification-settings/{notification_setting_id}` | ✅ supported | ⚠️ unsafe (opt-in) | |
|
|
54
56
|
| `ListDiscounts` | `GET /discounts` | ❌ unsupported | — | Discounts are not modelled; totals carry a zero discount. |
|
|
55
57
|
| `CreateDiscount` | `POST /discounts` | ❌ unsupported | — | Discounts are not modelled; totals carry a zero discount. |
|
|
56
58
|
| `ListAdjustments` | `GET /adjustments` | ❌ unsupported | — | Refunds and credits (adjustments) are not modelled. |
|
|
57
59
|
| `CreateAdjustment` | `POST /adjustments` | ❌ unsupported | — | Refunds and credits (adjustments) are not modelled. |
|
|
58
|
-
| `CreateCustomerPortalSession` | `POST /customers/{customer_id}/portal-sessions` |
|
|
60
|
+
| `CreateCustomerPortalSession` | `POST /customers/{customer_id}/portal-sessions` | ✅ supported | ⚠️ unsafe (opt-in) | |
|