@crvouga/mockingbird-service-paddle 0.4.1 → 1.0.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 +37 -0
- package/DISCOVERY.md +55 -0
- package/README.md +1 -1
- package/SUPPORT.md +58 -0
- package/dist/chunk-4WH6YKOQ.js +860 -0
- package/dist/chunk-4WH6YKOQ.js.map +7 -0
- package/dist/{chunk-PHYXKSQM.js → chunk-Y6Y4TUFJ.js} +827 -260
- package/dist/chunk-Y6Y4TUFJ.js.map +7 -0
- package/dist/cli.js +2 -2
- package/dist/index.d.ts +37 -5
- package/dist/index.js +1 -1
- package/dist/server.d.ts +67 -5
- package/dist/server.js +2 -2
- package/openapi.yaml +3045 -0
- package/package.json +28 -3
- package/dist/chunk-PHYXKSQM.js.map +0 -7
- package/dist/chunk-PZS6NYDY.js +0 -373
- package/dist/chunk-PZS6NYDY.js.map +0 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,42 @@
|
|
|
1
1
|
# Changelog — @crvouga/mockingbird-service-paddle
|
|
2
2
|
|
|
3
|
+
## 1.0.0 (2026-10-04)
|
|
4
|
+
|
|
5
|
+
### ⚠️ Breaking changes
|
|
6
|
+
|
|
7
|
+
- isolate internal routes ([5e19b21](https://github.com/crvouga/mockingbird/commit/5e19b21d403acc74b04778a8b545e80bcbdf8d51))
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
- add route filtering ([4e59b1d](https://github.com/crvouga/mockingbird/commit/4e59b1d42a76550f844b744f8431a637433a0781))
|
|
12
|
+
- publish agent package indexes ([eca61d3](https://github.com/crvouga/mockingbird/commit/eca61d358b86982cf0b777ae8bd7feaa3663aaa6))
|
|
13
|
+
|
|
14
|
+
### Fixes and improvements
|
|
15
|
+
|
|
16
|
+
- honor configured prefixes ([4f569d7](https://github.com/crvouga/mockingbird/commit/4f569d74ca8089f2ed5e33a1abf32b90973f41dd))
|
|
17
|
+
- explain configurable internal paths ([21b47ae](https://github.com/crvouga/mockingbird/commit/21b47ae4d4a096cdf63189aaeaf721ccb369bcf3))
|
|
18
|
+
- parse ISO journal timestamps ([20b39a2](https://github.com/crvouga/mockingbird/commit/20b39a2c738e278533d610dfc91f1cb3ae9b3f1e))
|
|
19
|
+
- harden shared controls ([7822614](https://github.com/crvouga/mockingbird/commit/7822614f6cba0387aeb60ba7320b0379aa1ef690))
|
|
20
|
+
|
|
21
|
+
### Dependencies
|
|
22
|
+
|
|
23
|
+
- `@crvouga/mockingbird-service-sqlite`
|
|
24
|
+
|
|
25
|
+
## 0.5.0 (2026-10-01)
|
|
26
|
+
|
|
27
|
+
### Features
|
|
28
|
+
|
|
29
|
+
- coordinate HTTP and protocol mocks ([3168653](https://github.com/crvouga/mockingbird/commit/31686534c55a9823fdaa92afc9cc456cf741b809))
|
|
30
|
+
|
|
31
|
+
### Fixes and improvements
|
|
32
|
+
|
|
33
|
+
- decouple smoke types from built packages ([a4b31c6](https://github.com/crvouga/mockingbird/commit/a4b31c6205d92aa0c6f7c9de3518d5ae44d38829))
|
|
34
|
+
- protect child admin endpoints ([5410b94](https://github.com/crvouga/mockingbird/commit/5410b948a30dcedc21e9a70e44fd415c1ea25394))
|
|
35
|
+
- harden protocol startup and state ([6f5b557](https://github.com/crvouga/mockingbird/commit/6f5b557e87b48b31985949e04f3b5ef58f51d295))
|
|
36
|
+
- preserve checkpoints and lifecycle ([50e8c32](https://github.com/crvouga/mockingbird/commit/50e8c322feded2f7f45afce9d8cdef43c37ab9ab))
|
|
37
|
+
- clean branch state on reset ([3b714d4](https://github.com/crvouga/mockingbird/commit/3b714d4a5df8e75fee0bb31e98d7c7566e164381))
|
|
38
|
+
- type signal listener cleanup ([5279852](https://github.com/crvouga/mockingbird/commit/5279852e56ea60262ccf17aa6e46b3c31091a34a))
|
|
39
|
+
|
|
3
40
|
## 0.4.1 (2026-10-01)
|
|
4
41
|
|
|
5
42
|
### Fixes and improvements
|
package/DISCOVERY.md
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# @crvouga/mockingbird-service-paddle discovery
|
|
2
|
+
|
|
3
|
+
This is the installed-package index for coding agents and tooling. All relative links resolve
|
|
4
|
+
inside `node_modules/@crvouga/mockingbird-service-paddle/`; no repository checkout is needed to discover the mock's
|
|
5
|
+
supported surface or documented behavior.
|
|
6
|
+
|
|
7
|
+
## Capability and behavior sources
|
|
8
|
+
|
|
9
|
+
| Question | Authoritative file | What it contains |
|
|
10
|
+
| --- | --- | --- |
|
|
11
|
+
| Behaviour and integration | [`README.md`](README.md) | Routes, state transitions, auth, webhooks, controls, presets and deliberate omissions. |
|
|
12
|
+
| Exact capabilities | [`SUPPORT.md`](SUPPORT.md) | Supported, unsupported and parity-covered operations or commands, including reasons for gaps. |
|
|
13
|
+
| Wire contract | [`openapi.yaml`](openapi.yaml) | Machine-readable paths, methods, schemas, responses and parity annotations. |
|
|
14
|
+
| Public API | [`dist/index.d.ts`](dist/index.d.ts) | The installed package's exact TypeScript exports and signatures. |
|
|
15
|
+
| Package metadata | [`package.json`](package.json) | Runtime/entry-point claims, vendor links, parity scope/tier and `mockingbird.discovery`. |
|
|
16
|
+
|
|
17
|
+
Read these together: the contract/capability matrix says *what* is available, while the README
|
|
18
|
+
defines stateful behavior, lifecycle rules, test controls, and intentional oracle differences.
|
|
19
|
+
If prose and an executable surface disagree, report a parity mismatch instead of adding a
|
|
20
|
+
consumer-side workaround.
|
|
21
|
+
|
|
22
|
+
## Parity and oracle
|
|
23
|
+
|
|
24
|
+
- Declared parity surface: **Billing, subscriptions, and webhooks**.
|
|
25
|
+
- Parity tier: **cold** (the repository controls when live checks run).
|
|
26
|
+
- Oracle: **Live vendor API or sandbox**.
|
|
27
|
+
- Repository command: `bun run parity:service -- paddle`.
|
|
28
|
+
- Evidence model: Run from a Mockingbird checkout; credentials come only from .env.local or GitHub Actions secrets. Missing credentials exit 2.
|
|
29
|
+
|
|
30
|
+
The npm package contains evidence summaries and the exact contract, not credentials or the
|
|
31
|
+
repository-only parity harness. Self-parity/property and acceptance tests run in the Mockingbird
|
|
32
|
+
repository; live parity is an additional oracle check, not a substitute for the packaged matrix.
|
|
33
|
+
|
|
34
|
+
## Runtime introspection
|
|
35
|
+
|
|
36
|
+
- `GET /__admin/health`
|
|
37
|
+
- `GET /__admin`
|
|
38
|
+
- `GET /__admin/state`
|
|
39
|
+
- `GET /__admin/requests`
|
|
40
|
+
- `GET /__admin/metrics`
|
|
41
|
+
- `GET /__admin/faults/presets`
|
|
42
|
+
- `GET /__admin/ui`
|
|
43
|
+
|
|
44
|
+
For HTTP services, use `x-mockingbird-namespace` (or the documented credential/path carrier) so
|
|
45
|
+
parallel tests do not share state. Admin state, journal, metrics and fault-preset endpoints are
|
|
46
|
+
designed for assertions and diagnosis by consuming test suites.
|
|
47
|
+
|
|
48
|
+
## Report a mismatch or missing capability
|
|
49
|
+
|
|
50
|
+
Follow the [agent reporting contract](https://github.com/crvouga/mockingbird/blob/main/docs/REPORTING_ISSUES.md). Include package version,
|
|
51
|
+
operation/command, a minimal redacted request, actual mock result, expected oracle result or vendor
|
|
52
|
+
documentation, and whether the mismatch appears in the matrix. Never include keys, tokens,
|
|
53
|
+
customer data, prompts, PHI, card data, or unredacted recordings.
|
|
54
|
+
|
|
55
|
+
Service key: `paddle`.
|
package/README.md
CHANGED
|
@@ -183,7 +183,7 @@ answers 500 `internal_error`), `bad_gateway_html` (reads answer a 502 HTML page)
|
|
|
183
183
|
|
|
184
184
|
`new Paddle(key)` cannot add a namespace header on its own (it can with `customHeaders`), so
|
|
185
185
|
map API keys to namespaces: `PUT /__admin/credentials {"credentials": {"<PADDLE_API_KEY>":
|
|
186
|
-
"<namespace>"}}`. Also `x-mockingbird-namespace`, or a `/ns/<name>` prefix on the base URL
|
|
186
|
+
"<namespace>"}}`. Also `x-mockingbird-namespace`, or a `/__admin/ns/<name>` prefix on the base URL
|
|
187
187
|
(`meta.pagination.next` keeps it).
|
|
188
188
|
|
|
189
189
|
### Deliberately not modelled
|
package/SUPPORT.md
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Paddle Billing API (Mockingbird subset) — operation support
|
|
2
|
+
|
|
3
|
+
Generated from `openapi.yaml`; do not edit by hand.
|
|
4
|
+
|
|
5
|
+
- operations in spec: **48**
|
|
6
|
+
- supported by the mock: **37**
|
|
7
|
+
- parity enabled: **37**
|
|
8
|
+
|
|
9
|
+
| operationId | route | mock | parity | notes |
|
|
10
|
+
| --- | --- | --- | --- | --- |
|
|
11
|
+
| `ListCustomers` | `GET /customers` | ✅ supported | ✅ | |
|
|
12
|
+
| `CreateCustomer` | `POST /customers` | ✅ supported | ⚠️ unsafe (opt-in) | |
|
|
13
|
+
| `GetCustomer` | `GET /customers/{customer_id}` | ✅ supported | ✅ | |
|
|
14
|
+
| `UpdateCustomer` | `PATCH /customers/{customer_id}` | ✅ supported | ⚠️ unsafe (opt-in) | |
|
|
15
|
+
| `GetCustomerCreditBalances` | `GET /customers/{customer_id}/credit-balances` | ✅ supported | ✅ | |
|
|
16
|
+
| `CreateCustomerAuthToken` | `POST /customers/{customer_id}/auth-token` | ✅ supported | ✅ | |
|
|
17
|
+
| `ListAddresses` | `GET /customers/{customer_id}/addresses` | ✅ supported | ✅ | |
|
|
18
|
+
| `CreateAddress` | `POST /customers/{customer_id}/addresses` | ✅ supported | ⚠️ unsafe (opt-in) | |
|
|
19
|
+
| `GetAddress` | `GET /customers/{customer_id}/addresses/{address_id}` | ✅ supported | ✅ | |
|
|
20
|
+
| `UpdateAddress` | `PATCH /customers/{customer_id}/addresses/{address_id}` | ✅ supported | ⚠️ unsafe (opt-in) | |
|
|
21
|
+
| `ListBusinesses` | `GET /customers/{customer_id}/businesses` | ✅ supported | ✅ | |
|
|
22
|
+
| `CreateBusiness` | `POST /customers/{customer_id}/businesses` | ✅ supported | ⚠️ unsafe (opt-in) | |
|
|
23
|
+
| `GetBusiness` | `GET /customers/{customer_id}/businesses/{business_id}` | ✅ supported | ✅ | |
|
|
24
|
+
| `UpdateBusiness` | `PATCH /customers/{customer_id}/businesses/{business_id}` | ✅ supported | ⚠️ unsafe (opt-in) | |
|
|
25
|
+
| `ListProducts` | `GET /products` | ✅ supported | ✅ | |
|
|
26
|
+
| `CreateProduct` | `POST /products` | ✅ supported | ⚠️ unsafe (opt-in) | |
|
|
27
|
+
| `GetProduct` | `GET /products/{product_id}` | ✅ supported | ✅ | |
|
|
28
|
+
| `UpdateProduct` | `PATCH /products/{product_id}` | ✅ supported | ⚠️ unsafe (opt-in) | |
|
|
29
|
+
| `ListPrices` | `GET /prices` | ✅ supported | ✅ | |
|
|
30
|
+
| `CreatePrice` | `POST /prices` | ✅ supported | ⚠️ unsafe (opt-in) | |
|
|
31
|
+
| `GetPrice` | `GET /prices/{price_id}` | ✅ supported | ✅ | |
|
|
32
|
+
| `UpdatePrice` | `PATCH /prices/{price_id}` | ✅ supported | ⚠️ unsafe (opt-in) | |
|
|
33
|
+
| `ListTransactions` | `GET /transactions` | ✅ supported | ✅ | |
|
|
34
|
+
| `CreateTransaction` | `POST /transactions` | ✅ supported | ⚠️ unsafe (opt-in) | |
|
|
35
|
+
| `PreviewTransaction` | `POST /transactions/preview` | ✅ supported | ✅ | |
|
|
36
|
+
| `GetTransaction` | `GET /transactions/{transaction_id}` | ✅ supported | ✅ | |
|
|
37
|
+
| `UpdateTransaction` | `PATCH /transactions/{transaction_id}` | ✅ supported | ⚠️ unsafe (opt-in) | |
|
|
38
|
+
| `GetTransactionInvoice` | `GET /transactions/{transaction_id}/invoice` | ✅ supported | ✅ | |
|
|
39
|
+
| `ReviseTransaction` | `POST /transactions/{transaction_id}/revise` | ❌ unsupported | — | Invoice revision (customer, business and address corrections on billed transactions) is not modelled. |
|
|
40
|
+
| `ListSubscriptions` | `GET /subscriptions` | ✅ supported | ✅ | |
|
|
41
|
+
| `GetSubscription` | `GET /subscriptions/{subscription_id}` | ✅ supported | ✅ | |
|
|
42
|
+
| `UpdateSubscription` | `PATCH /subscriptions/{subscription_id}` | ✅ supported | ⚠️ unsafe (opt-in) | |
|
|
43
|
+
| `PreviewSubscriptionUpdate` | `PATCH /subscriptions/{subscription_id}/preview` | ❌ unsupported | — | Update previews (proration credit/charge summaries) are not modelled; apply the update instead. |
|
|
44
|
+
| `ActivateSubscription` | `POST /subscriptions/{subscription_id}/activate` | ✅ supported | ⚠️ unsafe (opt-in) | |
|
|
45
|
+
| `PauseSubscription` | `POST /subscriptions/{subscription_id}/pause` | ✅ supported | ⚠️ unsafe (opt-in) | |
|
|
46
|
+
| `ResumeSubscription` | `POST /subscriptions/{subscription_id}/resume` | ✅ supported | ⚠️ unsafe (opt-in) | |
|
|
47
|
+
| `CancelSubscription` | `POST /subscriptions/{subscription_id}/cancel` | ✅ supported | ⚠️ unsafe (opt-in) | |
|
|
48
|
+
| `CreateSubscriptionCharge` | `POST /subscriptions/{subscription_id}/charge` | ✅ supported | ⚠️ unsafe (opt-in) | |
|
|
49
|
+
| `PreviewSubscriptionCharge` | `POST /subscriptions/{subscription_id}/charge/preview` | ❌ unsupported | — | One-time charge previews are not modelled; create the charge instead. |
|
|
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
|
+
| `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. |
|
|
54
|
+
| `ListDiscounts` | `GET /discounts` | ❌ unsupported | — | Discounts are not modelled; totals carry a zero discount. |
|
|
55
|
+
| `CreateDiscount` | `POST /discounts` | ❌ unsupported | — | Discounts are not modelled; totals carry a zero discount. |
|
|
56
|
+
| `ListAdjustments` | `GET /adjustments` | ❌ unsupported | — | Refunds and credits (adjustments) are not modelled. |
|
|
57
|
+
| `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. |
|