@registrystack/client 0.29.0 → 0.31.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 +34 -5
- package/breg/client.d.ts +479 -14
- package/breg/client.js +163 -5
- package/breg/index.d.ts +174 -0
- package/casework/client.d.ts +471 -0
- package/casework/client.js +161 -0
- package/casework/index.d.ts +70 -0
- package/casework/index.js +3 -0
- package/evidence/client.d.ts +16 -0
- package/index.d.ts +2 -1
- package/index.js +2 -1
- package/native.js +2 -2
- package/package.json +8 -6
- package/relay/client.d.ts +16 -0
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# @registrystack/client
|
|
2
2
|
|
|
3
|
-
One versioned Node.js package for the Discovery, Evidence, Relay,
|
|
4
|
-
|
|
3
|
+
One versioned Node.js package for the Discovery, Evidence, Relay, Base Registry
|
|
4
|
+
Engine, and Casework client APIs in Registry Stack.
|
|
5
5
|
|
|
6
6
|
## Install
|
|
7
7
|
|
|
@@ -11,17 +11,20 @@ npm install "@registrystack/client@<version>"
|
|
|
11
11
|
|
|
12
12
|
Requires Node.js 22.12 or newer. Supported targets are macOS arm64, Linux
|
|
13
13
|
arm64 with glibc, and Linux x64 with glibc; installing the package pulls in
|
|
14
|
-
one platform-specific optional dependency containing all
|
|
14
|
+
one platform-specific optional dependency containing all five native
|
|
15
15
|
bindings.
|
|
16
16
|
|
|
17
17
|
## Usage
|
|
18
18
|
|
|
19
19
|
```js
|
|
20
|
-
const { discovery, evidence, relay, breg } = require('@registrystack/client');
|
|
20
|
+
const { discovery, evidence, relay, breg, casework } = require('@registrystack/client');
|
|
21
21
|
|
|
22
22
|
const registry = new breg.BaseRegistryClient({
|
|
23
23
|
baseUrl: 'https://registry.example.invalid/',
|
|
24
24
|
});
|
|
25
|
+
const work = new casework.CaseworkClient({
|
|
26
|
+
baseUrl: 'https://casework.example.invalid/',
|
|
27
|
+
});
|
|
25
28
|
```
|
|
26
29
|
|
|
27
30
|
## Products
|
|
@@ -32,6 +35,8 @@ const registry = new breg.BaseRegistryClient({
|
|
|
32
35
|
assertions.
|
|
33
36
|
- `relay`: Registry Relay, scoped read-only APIs over existing sources.
|
|
34
37
|
- `breg`: Base Registry Engine, records, contracts, writes, and lifecycle.
|
|
38
|
+
- `casework`: Registry Casework, staff inbox, claims, drafts, decisions,
|
|
39
|
+
recovery, history, holdings, and directory bootstrap.
|
|
35
40
|
|
|
36
41
|
Each product remains in its own namespace because its routing,
|
|
37
42
|
authentication, errors, and verification rules are different.
|
|
@@ -63,7 +68,8 @@ consumer does not need it.
|
|
|
63
68
|
## Base Registry Engine notes
|
|
64
69
|
|
|
65
70
|
`breg.BaseRegistryClient.registryContract()` returns caller-filtered
|
|
66
|
-
`operations` with typed field, request, and list-query
|
|
71
|
+
`operations` with typed field, readable request field, request, and list-query
|
|
72
|
+
descriptors; those
|
|
67
73
|
descriptions grant no authority, so select the opaque create, patch, and
|
|
68
74
|
lifecycle authorities from that same contract before executing a mutation.
|
|
69
75
|
Methods ending in `Json` keep values exact across the Node number boundary:
|
|
@@ -73,6 +79,14 @@ mutation automatically. See
|
|
|
73
79
|
[Exact JSON in Node](https://docs.registrystack.org/reference/client-api/#exact-json-in-node)
|
|
74
80
|
for the full rules.
|
|
75
81
|
|
|
82
|
+
`breg.verifyWebhookDelivery({ method, path, headers, body, key })` authenticates
|
|
83
|
+
the exact bytes of one Version 1 webhook delivery. The result returns
|
|
84
|
+
`deliveryTime` and `idempotencyKey`; the receiver must bound clock skew and
|
|
85
|
+
deduplicate once-only effects on authenticated `source` plus `id`, or on an
|
|
86
|
+
application business key. See
|
|
87
|
+
[Verify a webhook delivery](https://docs.registrystack.org/reference/client-api/#verify-a-webhook-delivery)
|
|
88
|
+
for a receiver example.
|
|
89
|
+
|
|
76
90
|
## Versioning
|
|
77
91
|
|
|
78
92
|
Install the exact client version that matches the deployment. The unified
|
|
@@ -81,6 +95,21 @@ standalone client packages remain available for earlier versions, but the
|
|
|
81
95
|
release process does not publish new standalone versions once this package
|
|
82
96
|
is active.
|
|
83
97
|
|
|
98
|
+
The `casework` namespace is part of the unified package beginning with
|
|
99
|
+
Registry Stack v0.30.0.
|
|
100
|
+
|
|
101
|
+
## Casework notes
|
|
102
|
+
|
|
103
|
+
The Casework module is for a trusted server host. Each call takes that request's
|
|
104
|
+
bearer token and selected Casework profile; source-reading calls also take the
|
|
105
|
+
selected source profile. The client does not retain them. Browsers should send
|
|
106
|
+
only the host's session cookie. Claim, release, and decide consume the
|
|
107
|
+
caller-filtered action returned on the item, including its exact route and
|
|
108
|
+
`ifMatch` revision. Mutations require a caller-controlled idempotency key and
|
|
109
|
+
are never retried automatically. After a lost response, use
|
|
110
|
+
`recoverDecisionByKey` with the original key so recovery does not depend on the
|
|
111
|
+
attempt identifier being received.
|
|
112
|
+
|
|
84
113
|
## Documentation
|
|
85
114
|
|
|
86
115
|
- [Client API reference](https://docs.registrystack.org/reference/client-api/)
|