@relai-team/access-sdk 0.12.1 → 0.12.2
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 +14 -0
- package/package.json +8 -4
package/README.md
CHANGED
|
@@ -408,6 +408,20 @@ await client.flushTelemetry();
|
|
|
408
408
|
The queue caps at 500 items (oldest dropped) and self-heals from a corrupt
|
|
409
409
|
blob. Telemetry never blocks or fails an unlock.
|
|
410
410
|
|
|
411
|
+
## The contract this package is checked against
|
|
412
|
+
|
|
413
|
+
The platform publishes its OpenAPI 3.1 description at
|
|
414
|
+
[access.relai.us/openapi.json](https://access.relai.us/openapi.json), public and
|
|
415
|
+
unauthenticated. This package vendors a copy, generates types from it, and fails
|
|
416
|
+
its own typecheck if the hand-written wire types drift from it.
|
|
417
|
+
|
|
418
|
+
```bash
|
|
419
|
+
npm run spec:sync # refresh the vendored spec and regenerate
|
|
420
|
+
npm run spec:check # fail if the committed types are stale
|
|
421
|
+
```
|
|
422
|
+
|
|
423
|
+
Generate your own client from the same URL if you would rather not use this one.
|
|
424
|
+
|
|
411
425
|
## Verifying webhooks (partner backends)
|
|
412
426
|
|
|
413
427
|
```ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@relai-team/access-sdk",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.2",
|
|
4
4
|
"description": "Official Relai Access SDK, open Relai Exchange Zone nodes over BLE, backed by the Relai Access platform (server-owns-trust).",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"type": "module",
|
|
@@ -24,7 +24,10 @@
|
|
|
24
24
|
"build": "tsup",
|
|
25
25
|
"typecheck": "tsc --noEmit",
|
|
26
26
|
"test": "vitest run",
|
|
27
|
-
"test:watch": "vitest"
|
|
27
|
+
"test:watch": "vitest",
|
|
28
|
+
"spec:types": "openapi-typescript openapi.json -o src/generated/api.ts",
|
|
29
|
+
"spec:check": "npm run spec:types && git diff --exit-code src/generated/api.ts",
|
|
30
|
+
"spec:sync": "curl -fsS https://access.relai.us/openapi.json -o openapi.json && npm run spec:types"
|
|
28
31
|
},
|
|
29
32
|
"keywords": [
|
|
30
33
|
"relai",
|
|
@@ -34,8 +37,8 @@
|
|
|
34
37
|
"exchange-zone"
|
|
35
38
|
],
|
|
36
39
|
"peerDependencies": {
|
|
37
|
-
"react-native
|
|
38
|
-
"
|
|
40
|
+
"@stripe/stripe-react-native": ">=0.38",
|
|
41
|
+
"react-native-ble-plx": ">=3.0.0"
|
|
39
42
|
},
|
|
40
43
|
"peerDependenciesMeta": {
|
|
41
44
|
"react-native-ble-plx": {
|
|
@@ -47,6 +50,7 @@
|
|
|
47
50
|
},
|
|
48
51
|
"devDependencies": {
|
|
49
52
|
"@types/node": "^20.14.0",
|
|
53
|
+
"openapi-typescript": "^7.13.0",
|
|
50
54
|
"tsup": "^8.3.0",
|
|
51
55
|
"typescript": "^5.6.0",
|
|
52
56
|
"vitest": "^2.1.0"
|