@marcohefti/request-network-api-contracts 0.5.3 → 0.6.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/README.md CHANGED
@@ -53,6 +53,17 @@ npm run verify
53
53
 
54
54
  The `verify` script sanity-checks file sizes and presence before committing updates across both packages.
55
55
 
56
+ ### Local schema drift patching
57
+
58
+ `prepare:spec` now applies a local compatibility patch before regeneration to cover known upstream schema drift (for example `fees[].amount = null` and `fees[].type = "protocol"` in runtime payloads). Reapply the patch without refetching via:
59
+
60
+ ```bash
61
+ cd ../request-network-api-client-ts
62
+ pnpm patch:openapi
63
+ ```
64
+
65
+ This keeps contracts as the source of truth inside this workspace while upstream OpenAPI catches up.
66
+
56
67
  ## Future work
57
68
 
58
69
  - [ ] Publish webhook fixture guidelines and add validation to ensure both SDKs reference the same payload set.
@@ -9,9 +9,14 @@ Use this checklist whenever the Request Network API publishes contract changes.
9
9
  regenerate the generated types. That tooling is responsible for writing
10
10
  `specs/openapi/request-network-openapi.json` and the corresponding
11
11
  `.meta.json` file into this package.
12
+ - `prepare:spec` also applies local schema-drift patches before generation
13
+ (currently fee-shape compatibility for runtime payloads that return
14
+ `type: "protocol"` and nullable fee amounts).
12
15
  - If you are only using this repository, fetch the OpenAPI document directly
13
16
  from the upstream Request API (`https://api.request.network/open-api/openapi.json`)
14
- and update both the JSON and `.meta.json` files under `specs/openapi/`.
17
+ and update both the JSON and `.meta.json` files under `specs/openapi/`, then
18
+ run `pnpm --filter "./packages/request-network-api-client-ts" patch:openapi`
19
+ from the workspace root before regenerating client artifacts.
15
20
 
16
21
  ## 2. Update webhook schema (if needed)
17
22
 
package/docs/UPDATES.md CHANGED
@@ -12,6 +12,18 @@ change so SDK maintainers know when to regenerate code.
12
12
  - **Notes:** Regeneration impact, required SDK updates, new fixtures
13
13
 
14
14
  ## History
15
+ - **Date:** 2026-03-03
16
+ - **Spec Version:** 0.16.1 (`fetchedAt` 2026-03-03T11:14:08.930Z)
17
+ - **Change Summary:** Synced upstream Request API OpenAPI. Added `/v2/secure-payments` + `/v2/secure-payments/{token}`, removed `/v2/payee-destination*`, and introduced `GET /v2/request`.
18
+ - **Source:** https://api.request.network/open-api/openapi.json
19
+ - **Notes:** Local drift patch still applies (`fees[].type` includes `protocol`; fee amount fields nullable). Regenerate TS/PHP clients against this contracts revision before release.
20
+
21
+ - **Date:** 2026-02-24
22
+ - **Spec Version:** 2026-02-24 (local drift patch over upstream OpenAPI payload mismatch)
23
+ - **Change Summary:** Added compatibility patch for fee payload drift (`fees[].type` includes `protocol`, `fees[].amount` / `amountInUSD` nullable) and updated update workflow docs.
24
+ - **Source:** https://api.request.network/open-api/openapi.json
25
+ - **Notes:** Keeps contracts package as source of truth for generated clients while upstream schema catches up.
26
+
15
27
  - **Date:** 2026-02-20
16
28
  - **Spec Version:** 2026-02-20 (`fetchedAt` from `request-network-openapi.meta.json`)
17
29
  - **Change Summary:** Synced upstream Request API OpenAPI spec; includes new `v2/payee-destination` operations and schema refinements consumed by TS/PHP clients.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marcohefti/request-network-api-contracts",
3
- "version": "0.5.3",
3
+ "version": "0.6.0",
4
4
  "private": false,
5
5
  "description": "Shared contracts for Request Network API clients (OpenAPI spec, webhook fixtures).",
6
6
  "license": "MIT",