@registrystack/client 0.28.0 → 0.30.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 +78 -30
- package/breg/client.d.ts +476 -14
- package/breg/client.js +120 -4
- package/breg/index.d.ts +182 -0
- package/casework/client.d.ts +435 -0
- package/casework/client.js +155 -0
- package/casework/index.d.ts +64 -0
- package/casework/index.js +3 -0
- package/index.d.ts +2 -1
- package/index.js +2 -1
- package/native.js +2 -2
- package/package.json +21 -6
package/README.md
CHANGED
|
@@ -1,20 +1,48 @@
|
|
|
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
|
+
|
|
6
|
+
## Install
|
|
5
7
|
|
|
6
8
|
```sh
|
|
7
9
|
npm install "@registrystack/client@<version>"
|
|
8
10
|
```
|
|
9
11
|
|
|
12
|
+
Requires Node.js 22.12 or newer. Supported targets are macOS arm64, Linux
|
|
13
|
+
arm64 with glibc, and Linux x64 with glibc; installing the package pulls in
|
|
14
|
+
one platform-specific optional dependency containing all five native
|
|
15
|
+
bindings.
|
|
16
|
+
|
|
17
|
+
## Usage
|
|
18
|
+
|
|
10
19
|
```js
|
|
11
|
-
const { discovery, evidence, relay, breg } = require('@registrystack/client');
|
|
20
|
+
const { discovery, evidence, relay, breg, casework } = require('@registrystack/client');
|
|
12
21
|
|
|
13
22
|
const registry = new breg.BaseRegistryClient({
|
|
14
23
|
baseUrl: 'https://registry.example.invalid/',
|
|
15
24
|
});
|
|
25
|
+
const work = new casework.CaseworkClient({
|
|
26
|
+
baseUrl: 'https://casework.example.invalid/',
|
|
27
|
+
});
|
|
16
28
|
```
|
|
17
29
|
|
|
30
|
+
## Products
|
|
31
|
+
|
|
32
|
+
- `discovery`: Registry Discovery, bounded search and resolution over a
|
|
33
|
+
curated index.
|
|
34
|
+
- `evidence`: Evidence Gateway, request and verify signed minimum-disclosure
|
|
35
|
+
assertions.
|
|
36
|
+
- `relay`: Registry Relay, scoped read-only APIs over existing sources.
|
|
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.
|
|
40
|
+
|
|
41
|
+
Each product remains in its own namespace because its routing,
|
|
42
|
+
authentication, errors, and verification rules are different.
|
|
43
|
+
|
|
44
|
+
## TypeScript
|
|
45
|
+
|
|
18
46
|
A TypeScript consumer also needs the Node type definitions, and must name
|
|
19
47
|
them. The published declarations use `Buffer`, a Node.js global, and
|
|
20
48
|
TypeScript 6 does not load installed `@types` packages on its own, so a
|
|
@@ -37,29 +65,49 @@ npm install --save-dev "@types/node"
|
|
|
37
65
|
The package does not declare that dependency itself, because a JavaScript
|
|
38
66
|
consumer does not need it.
|
|
39
67
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
68
|
+
## Base Registry Engine notes
|
|
69
|
+
|
|
70
|
+
`breg.BaseRegistryClient.registryContract()` returns caller-filtered
|
|
71
|
+
`operations` with typed field, readable request field, request, and list-query
|
|
72
|
+
descriptors; those
|
|
73
|
+
descriptions grant no authority, so select the opaque create, patch, and
|
|
74
|
+
lifecycle authorities from that same contract before executing a mutation.
|
|
75
|
+
Methods ending in `Json` keep values exact across the Node number boundary:
|
|
76
|
+
they accept domain JSON text and return `valueJson` alongside the usual
|
|
77
|
+
trace, ETag, location, and opaque continuation. The client never retries a
|
|
78
|
+
mutation automatically. See
|
|
79
|
+
[Exact JSON in Node](https://docs.registrystack.org/reference/client-api/#exact-json-in-node)
|
|
80
|
+
for the full rules.
|
|
81
|
+
|
|
82
|
+
## Versioning
|
|
83
|
+
|
|
84
|
+
Install the exact client version that matches the deployment. The unified
|
|
85
|
+
package is published beginning with Registry Stack v0.26.1. Existing
|
|
86
|
+
standalone client packages remain available for earlier versions, but the
|
|
87
|
+
release process does not publish new standalone versions once this package
|
|
88
|
+
is active.
|
|
89
|
+
|
|
90
|
+
The `casework` namespace is part of the unified package beginning with
|
|
91
|
+
Registry Stack v0.30.0.
|
|
92
|
+
|
|
93
|
+
## Casework notes
|
|
94
|
+
|
|
95
|
+
The Casework module is for a trusted server host. Each call takes that request's
|
|
96
|
+
bearer token and selected Casework profile; source-reading calls also take the
|
|
97
|
+
selected source profile. The client does not retain them. Browsers should send
|
|
98
|
+
only the host's session cookie. Claim, release, and decide consume the
|
|
99
|
+
caller-filtered action returned on the item, including its exact route and
|
|
100
|
+
`ifMatch` revision. Mutations require a caller-controlled idempotency key and
|
|
101
|
+
are never retried automatically. After a lost response, use
|
|
102
|
+
`recoverDecisionByKey` with the original key so recovery does not depend on the
|
|
103
|
+
attempt identifier being received.
|
|
104
|
+
|
|
105
|
+
## Documentation
|
|
106
|
+
|
|
107
|
+
- [Client API reference](https://docs.registrystack.org/reference/client-api/)
|
|
108
|
+
- [Repository](https://github.com/registrystack/registry-stack)
|
|
109
|
+
- [Issue tracker](https://github.com/registrystack/registry-stack/issues)
|
|
110
|
+
|
|
111
|
+
## License
|
|
112
|
+
|
|
113
|
+
Apache-2.0
|