@crvouga/mockingbird-service-paddle 1.3.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 CHANGED
@@ -1,6 +1,30 @@
1
1
  # Changelog — @crvouga/mockingbird-service-paddle
2
2
 
3
- ## 1.3.0 (2026-10-05)
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
+
13
+ ## 2.0.0 (2026-10-07)
14
+
15
+ ### ⚠️ Breaking changes
16
+
17
+ - point the repo at crvouga/mockingbird ([1bf35a4](https://github.com/crvouga/mockingbird/commit/1bf35a422b84a85b50b09b72bd7cc7093082a86e))
18
+ - point the repo at crvouga/emulates ([cdb5e53](https://github.com/crvouga/mockingbird/commit/cdb5e536ed8c1f52345e3984f089001c25fdb08a))
19
+ - rename Emulators to Emulates ([2e10d9c](https://github.com/crvouga/mockingbird/commit/2e10d9cff84c54ac37768fc9a19d1aefd3943744))
20
+ - rebrand Mockingbird to Emulators ([1adca65](https://github.com/crvouga/mockingbird/commit/1adca65ce28242f11cff98eac05d2be88f680cbe))
21
+
22
+ ### Fixes and improvements
23
+
24
+ - typecheck the brand gate before builds ([fc36095](https://github.com/crvouga/mockingbird/commit/fc3609514de70ffe3170a5d216fb8a49f9ce7cbb))
25
+ - format the emulates records query ([8698872](https://github.com/crvouga/mockingbird/commit/8698872509d06002be5a8fcdc85d79f8462320c3))
26
+
27
+ ## 1.3.0 (2026-10-04)
4
28
 
5
29
  ### Features
6
30
 
@@ -17,10 +41,6 @@
17
41
  - reconcile combined PR integration ([124d5be](https://github.com/crvouga/mockingbird/commit/124d5bed7576535ff481ce6da7d2369957799665))
18
42
  - preserve inferred form headers ([02bdd28](https://github.com/crvouga/mockingbird/commit/02bdd2806a9a934607ecd7ffd0cfbe4f6ba80c91))
19
43
 
20
- ### Dependencies
21
-
22
- - `@crvouga/mockingbird-service-sqlite`
23
-
24
44
  ## 1.2.0 (2026-10-04)
25
45
 
26
46
  ### 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` and `management_urls`
198
- are links, not pages; `POST /__admin/checkout` and `…/pay` replace the checkout.
199
- - **Payment methods and payment method changes**, payouts, reports, simulations, notification
200
- settings through the API (endpoints are configured on the mock), invoice revisions, the
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: **48**
6
- - supported by the mock: **37**
7
- - parity enabled: **37**
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` | ❌ unsupported | — | Notification destinations are configured on the mock (`--webhook-url`, `PUT /__admin/webhook-endpoints`), not through the API. |
53
- | `CreateNotificationSetting` | `POST /notification-settings` | ❌ unsupported | — | Notification destinations are configured on the mock (`--webhook-url`, `PUT /__admin/webhook-endpoints`), not through the API. |
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` | ❌ unsupported | — | The hosted customer portal is not served; `management_urls` on a subscription point at placeholder links. |
60
+ | `CreateCustomerPortalSession` | `POST /customers/{customer_id}/portal-sessions` | ✅ supported | ⚠️ unsafe (opt-in) | |