@interop/was-client 0.51.0 → 0.53.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 +46 -2
- package/dist/Collection.d.ts +30 -9
- package/dist/Collection.d.ts.map +1 -1
- package/dist/Collection.js +110 -76
- package/dist/Collection.js.map +1 -1
- package/dist/Resource.d.ts +15 -0
- package/dist/Resource.d.ts.map +1 -1
- package/dist/Resource.js +6 -17
- package/dist/Resource.js.map +1 -1
- package/dist/Space.d.ts +54 -0
- package/dist/Space.d.ts.map +1 -1
- package/dist/Space.js +104 -18
- package/dist/Space.js.map +1 -1
- package/dist/codec.d.ts +54 -12
- package/dist/codec.d.ts.map +1 -1
- package/dist/edv/EdvCodec.d.ts +9 -8
- package/dist/edv/EdvCodec.d.ts.map +1 -1
- package/dist/edv/EdvCodec.js +65 -33
- package/dist/edv/EdvCodec.js.map +1 -1
- package/dist/edv/descriptorStore.d.ts.map +1 -1
- package/dist/edv/descriptorStore.js +2 -0
- package/dist/edv/descriptorStore.js.map +1 -1
- package/dist/edv/docCipher.d.ts.map +1 -1
- package/dist/edv/docCipher.js +1 -1
- package/dist/edv/docCipher.js.map +1 -1
- package/dist/edv/index.d.ts +2 -0
- package/dist/edv/index.d.ts.map +1 -1
- package/dist/edv/index.js +1 -0
- package/dist/edv/index.js.map +1 -1
- package/dist/edv/logGovernedDescriptorStore.d.ts +164 -0
- package/dist/edv/logGovernedDescriptorStore.d.ts.map +1 -0
- package/dist/edv/logGovernedDescriptorStore.js +477 -0
- package/dist/edv/logGovernedDescriptorStore.js.map +1 -0
- package/dist/edv/recipients.d.ts.map +1 -1
- package/dist/edv/recipients.js +25 -82
- package/dist/edv/recipients.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/internal/cas.d.ts +95 -0
- package/dist/internal/cas.d.ts.map +1 -0
- package/dist/internal/cas.js +116 -0
- package/dist/internal/cas.js.map +1 -0
- package/dist/internal/codec.d.ts.map +1 -1
- package/dist/internal/codec.js +6 -6
- package/dist/internal/codec.js.map +1 -1
- package/dist/internal/content.d.ts +13 -0
- package/dist/internal/content.d.ts.map +1 -1
- package/dist/internal/content.js +16 -0
- package/dist/internal/content.js.map +1 -1
- package/dist/internal/describe.d.ts +16 -21
- package/dist/internal/describe.d.ts.map +1 -1
- package/dist/internal/describe.js +17 -25
- package/dist/internal/describe.js.map +1 -1
- package/dist/internal/meta.d.ts +9 -9
- package/dist/internal/meta.d.ts.map +1 -1
- package/dist/internal/meta.js +13 -14
- package/dist/internal/meta.js.map +1 -1
- package/dist/internal/request.d.ts +19 -0
- package/dist/internal/request.d.ts.map +1 -1
- package/dist/internal/request.js +26 -0
- package/dist/internal/request.js.map +1 -1
- package/dist/log/logStore.d.ts +8 -5
- package/dist/log/logStore.d.ts.map +1 -1
- package/dist/log/logStore.js +30 -30
- package/dist/log/logStore.js.map +1 -1
- package/dist/sync/provisioning.d.ts +43 -15
- package/dist/sync/provisioning.d.ts.map +1 -1
- package/dist/sync/provisioning.js +147 -38
- package/dist/sync/provisioning.js.map +1 -1
- package/dist/types.d.ts +11 -12
- package/dist/types.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/Resource.js
CHANGED
|
@@ -6,7 +6,7 @@ import { collectionBackendFeatures } from './internal/features.js';
|
|
|
6
6
|
import { writeHeaders, readEtag } from './internal/conditional.js';
|
|
7
7
|
import { withCodec } from './internal/withCodec.js';
|
|
8
8
|
import { readMeta, writeMeta, patchCustom } from './internal/meta.js';
|
|
9
|
-
import { ENCODER } from './internal/content.js';
|
|
9
|
+
import { ENCODER, decodedText } from './internal/content.js';
|
|
10
10
|
import { codecRequestContext, upsertResource } from './internal/write.js';
|
|
11
11
|
import { readPolicy, writePolicy, deletePolicy, isPublicPolicy, setPublicPolicy } from './internal/policy.js';
|
|
12
12
|
/**
|
|
@@ -149,24 +149,13 @@ export class Resource {
|
|
|
149
149
|
async get() {
|
|
150
150
|
return (await this.getWithEtag())?.data ?? null;
|
|
151
151
|
}
|
|
152
|
-
|
|
153
|
-
* Reads the resource together with its `ETag` validator (the backend's
|
|
154
|
-
* `conditional-writes` feature) -- the Resource counterpart of
|
|
155
|
-
* `Collection.describeWithEtag`. The `ETag` is the opaque validator to pass
|
|
156
|
-
* to {@link put}'s `ifMatch` for a lost-update-safe (compare-and-swap)
|
|
157
|
-
* write. The value is decoded like {@link get} (JSON parsed, binary as a
|
|
158
|
-
* `Blob`, decrypted on an encrypted collection). Returns `null` if the
|
|
159
|
-
* resource is missing or not visible to you (404 conflation caveat); `etag`
|
|
160
|
-
* is absent against a backend that does not version resources.
|
|
161
|
-
*
|
|
162
|
-
* @returns {Promise<{ data: Json | Blob; etag?: string } | null>}
|
|
163
|
-
*/
|
|
164
|
-
async getWithEtag() {
|
|
152
|
+
async getWithEtag(options) {
|
|
165
153
|
const [codec, response] = await withCodec(this.#codec(), this.#read());
|
|
166
154
|
if (response === null) {
|
|
167
155
|
return null;
|
|
168
156
|
}
|
|
169
|
-
const
|
|
157
|
+
const decoded = await codec.decode(response, this.id, this.#codecContext());
|
|
158
|
+
const data = options?.as === 'text' ? await decodedText(decoded) : decoded;
|
|
170
159
|
const etag = readEtag(response);
|
|
171
160
|
return etag !== undefined ? { data, etag } : { data };
|
|
172
161
|
}
|
|
@@ -310,7 +299,7 @@ export class Resource {
|
|
|
310
299
|
metaPath: this.#metaPath,
|
|
311
300
|
codec: this.#codec(),
|
|
312
301
|
subject: `"${this.id}"`,
|
|
313
|
-
id: this.id,
|
|
302
|
+
slot: { kind: 'resource', id: this.id },
|
|
314
303
|
capability: this.#capability
|
|
315
304
|
});
|
|
316
305
|
}
|
|
@@ -348,7 +337,7 @@ export class Resource {
|
|
|
348
337
|
// A Resource's key epoch stamps its content write via the `Key-Epoch`
|
|
349
338
|
// header, so the one the codec surfaces here is deliberately dropped.
|
|
350
339
|
sendEpoch: false,
|
|
351
|
-
id: this.id,
|
|
340
|
+
slot: { kind: 'resource', id: this.id },
|
|
352
341
|
ifMatch: options.ifMatch,
|
|
353
342
|
ifNoneMatch: options.ifNoneMatch,
|
|
354
343
|
capability: this.#capability
|
package/dist/Resource.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Resource.js","sourceRoot":"","sources":["../src/Resource.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAChF,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAE1D,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAA;AAC5C,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAA;AAC3D,OAAO,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAA;AAElE,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAA;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AACnD,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AACrE,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAA;
|
|
1
|
+
{"version":3,"file":"Resource.js","sourceRoot":"","sources":["../src/Resource.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAChF,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAE1D,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAA;AAC5C,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAA;AAC3D,OAAO,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAA;AAElE,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAA;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AACnD,OAAO,EAAE,Q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CHANGED
|
@@ -22,6 +22,60 @@ export declare class Space {
|
|
|
22
22
|
* @returns {Promise<SpaceDescription | null>}
|
|
23
23
|
*/
|
|
24
24
|
describe(): Promise<SpaceDescription | null>;
|
|
25
|
+
/**
|
|
26
|
+
* Reads the Space Description together with its `ETag` validator (the
|
|
27
|
+
* server's `conditional-writes` support). The `ETag` is the opaque validator
|
|
28
|
+
* to pass to {@link replaceDescription}'s `ifMatch` for a lost-update-safe
|
|
29
|
+
* (compare-and-swap) description write. Returns `null` if the space is
|
|
30
|
+
* missing or not visible to you (404 conflation caveat); `etag` is absent
|
|
31
|
+
* against a server that does not version the Space Description.
|
|
32
|
+
*
|
|
33
|
+
* @returns {Promise<{ description: SpaceDescription; etag?: string } | null>}
|
|
34
|
+
*/
|
|
35
|
+
describeWithEtag(): Promise<{
|
|
36
|
+
description: SpaceDescription;
|
|
37
|
+
etag?: string;
|
|
38
|
+
} | null>;
|
|
39
|
+
/**
|
|
40
|
+
* Writes the Space Description under an optional precondition: `ifMatch`
|
|
41
|
+
* (the `ETag` from {@link describeWithEtag}) makes it a compare-and-swap so
|
|
42
|
+
* a concurrent writer cannot be silently clobbered, and `ifNoneMatch: true`
|
|
43
|
+
* makes it a guarded create that proceeds only while no Space exists under
|
|
44
|
+
* this id. A failed precondition surfaces as `PreconditionFailedError`
|
|
45
|
+
* (412). Unlike {@link configure}, nothing is read or merged on the client:
|
|
46
|
+
* the body is sent as given, so `controller` is required (a default to the
|
|
47
|
+
* signer's DID would let a delegated writer reassign ownership by omission).
|
|
48
|
+
* The server applies the body over the stored description: an omitted
|
|
49
|
+
* `name` keeps the stored name, and `type` is accepted at creation only and
|
|
50
|
+
* immutable afterwards.
|
|
51
|
+
*
|
|
52
|
+
* Returns the new `ETag`, and on a create the description the server
|
|
53
|
+
* answered with; an update answers with no body, so `description` is absent
|
|
54
|
+
* there and the caller re-reads if it needs the merged result.
|
|
55
|
+
*
|
|
56
|
+
* @param description {object}
|
|
57
|
+
* @param [description.name] {string}
|
|
58
|
+
* @param description.controller {string}
|
|
59
|
+
* @param [description.type] {string[]} accepted by the server at creation
|
|
60
|
+
* only
|
|
61
|
+
* @param options {object}
|
|
62
|
+
* @param [options.ifMatch] {string} the prior `ETag`; the write applies only
|
|
63
|
+
* if the description is unchanged
|
|
64
|
+
* @param [options.ifNoneMatch] {boolean} write only if the Space does not
|
|
65
|
+
* exist yet
|
|
66
|
+
* @returns {Promise<{ description?: SpaceDescription; etag?: string }>}
|
|
67
|
+
*/
|
|
68
|
+
replaceDescription(description: {
|
|
69
|
+
name?: string;
|
|
70
|
+
controller: string;
|
|
71
|
+
type?: string[];
|
|
72
|
+
}, options?: {
|
|
73
|
+
ifMatch?: string;
|
|
74
|
+
ifNoneMatch?: boolean;
|
|
75
|
+
}): Promise<{
|
|
76
|
+
description?: SpaceDescription;
|
|
77
|
+
etag?: string;
|
|
78
|
+
}>;
|
|
25
79
|
/**
|
|
26
80
|
* Creates or updates the space by id (upsert). Merges the given fields over
|
|
27
81
|
* the current description; `controller` defaults to the wrapped signer's DID.
|
package/dist/Space.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Space.d.ts","sourceRoot":"","sources":["../src/Space.ts"],"names":[],"mappings":"AA8BA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;
|
|
1
|
+
{"version":3,"file":"Space.d.ts","sourceRoot":"","sources":["../src/Space.ts"],"names":[],"mappings":"AA8BA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;AAkB1D,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC5C,OAAO,KAAK,EACV,iBAAiB,EACjB,gBAAgB,EAChB,mBAAmB,EACnB,oBAAoB,EACpB,eAAe,EACf,YAAY,EACZ,aAAa,EACb,IAAI,EACJ,cAAc,EACd,KAAK,EACL,WAAW,EACX,OAAO,EACP,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EACjB,MAA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AC;IAU3E;;;;;;OAMG;IACG,KAAK,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,cAAc,CAAC;IAQ3D;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACG,MAAM,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAmCjD;;;;;;;;;OASG;IACG,MAAM,IAAI,OAAO,CAAC,UAAU,CAAC;IAKnC;;;;;;;;;;;OAWG;IACG,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IASjC;;;;;;;;;OASG;IACG,YAAY,IAAI,OAAO,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC;IAUzD;;;;;OAKG;IACG,MAAM,CAAC,GAAG,EAAE,UAAU,GAAG,IAAI,GAAG,OAAO,CAAC,WAAW,CAAC;IAa1D;;;;;;;OAOG;IACG,SAAS,IAAI,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC;IAOjD;;;;;OAKG;IACG,SAAS,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAQtD;;;;OAIG;IACG,QAAQ,IAAI,OAAO,CAAC,OAAO,CAAC;IAOlC;;;;;;OAMG;IACG,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;IAOhC;;;;;OAKG;IACG,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC;IAOlC;;;;;OAKG;IACG,OAAO,IAAI,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC;CAMzC"}
|
package/dist/Space.js
CHANGED
|
@@ -3,12 +3,34 @@ import { assertNotReserved } from './internal/reserved.js';
|
|
|
3
3
|
import { collectionWritableFields, unreadableDescriptionError } from './internal/describe.js';
|
|
4
4
|
import { delegateGrantAt } from './internal/grant.js';
|
|
5
5
|
import { submitRevocation } from './internal/revoke.js';
|
|
6
|
-
import { send, readData } from './internal/request.js';
|
|
6
|
+
import { send, readData, readDataWithEtag } from './internal/request.js';
|
|
7
|
+
import { readEtag, writeHeaders } from './internal/conditional.js';
|
|
7
8
|
import { collectWalk, signedPageWalk, walkPagesOrEmpty } from './internal/pagination.js';
|
|
8
9
|
import { NotFoundError, WasServerError } from './errors.js';
|
|
9
10
|
import { createdId, dataOrNull, toPlainBytes } from './internal/content.js';
|
|
10
11
|
import { readPolicy, writePolicy, deletePolicy, isPublicPolicy, setPublicPolicy } from './internal/policy.js';
|
|
11
12
|
import { Collection } from './Collection.js';
|
|
13
|
+
/**
|
|
14
|
+
* The Space Description PUT body: the one inclusion rule for its writable
|
|
15
|
+
* fields, shared by `configure` and `replaceDescription`. `name` and `type`
|
|
16
|
+
* are sent only when set, since the server keeps the stored value for an
|
|
17
|
+
* omitted member; `controller` is always sent.
|
|
18
|
+
*
|
|
19
|
+
* @param fields {object}
|
|
20
|
+
* @param fields.id {string}
|
|
21
|
+
* @param [fields.name] {string}
|
|
22
|
+
* @param fields.controller {string}
|
|
23
|
+
* @param [fields.type] {string[]}
|
|
24
|
+
* @returns {{ id: string; name?: string; controller: string; type?: string[] }}
|
|
25
|
+
*/
|
|
26
|
+
function spaceDescriptionBody({ id, name, controller, type }) {
|
|
27
|
+
return {
|
|
28
|
+
id,
|
|
29
|
+
...(name !== undefined && { name }),
|
|
30
|
+
controller,
|
|
31
|
+
...(type !== undefined && { type })
|
|
32
|
+
};
|
|
33
|
+
}
|
|
12
34
|
export class Space {
|
|
13
35
|
id;
|
|
14
36
|
#context;
|
|
@@ -42,6 +64,71 @@ export class Space {
|
|
|
42
64
|
capability: this.#capability
|
|
43
65
|
});
|
|
44
66
|
}
|
|
67
|
+
/**
|
|
68
|
+
* Reads the Space Description together with its `ETag` validator (the
|
|
69
|
+
* server's `conditional-writes` support). The `ETag` is the opaque validator
|
|
70
|
+
* to pass to {@link replaceDescription}'s `ifMatch` for a lost-update-safe
|
|
71
|
+
* (compare-and-swap) description write. Returns `null` if the space is
|
|
72
|
+
* missing or not visible to you (404 conflation caveat); `etag` is absent
|
|
73
|
+
* against a server that does not version the Space Description.
|
|
74
|
+
*
|
|
75
|
+
* @returns {Promise<{ description: SpaceDescription; etag?: string } | null>}
|
|
76
|
+
*/
|
|
77
|
+
async describeWithEtag() {
|
|
78
|
+
const read = await readDataWithEtag(this.#context, {
|
|
79
|
+
path: this.#path,
|
|
80
|
+
capability: this.#capability
|
|
81
|
+
});
|
|
82
|
+
return read === null ? null : { description: read.data, etag: read.etag };
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Writes the Space Description under an optional precondition: `ifMatch`
|
|
86
|
+
* (the `ETag` from {@link describeWithEtag}) makes it a compare-and-swap so
|
|
87
|
+
* a concurrent writer cannot be silently clobbered, and `ifNoneMatch: true`
|
|
88
|
+
* makes it a guarded create that proceeds only while no Space exists under
|
|
89
|
+
* this id. A failed precondition surfaces as `PreconditionFailedError`
|
|
90
|
+
* (412). Unlike {@link configure}, nothing is read or merged on the client:
|
|
91
|
+
* the body is sent as given, so `controller` is required (a default to the
|
|
92
|
+
* signer's DID would let a delegated writer reassign ownership by omission).
|
|
93
|
+
* The server applies the body over the stored description: an omitted
|
|
94
|
+
* `name` keeps the stored name, and `type` is accepted at creation only and
|
|
95
|
+
* immutable afterwards.
|
|
96
|
+
*
|
|
97
|
+
* Returns the new `ETag`, and on a create the description the server
|
|
98
|
+
* answered with; an update answers with no body, so `description` is absent
|
|
99
|
+
* there and the caller re-reads if it needs the merged result.
|
|
100
|
+
*
|
|
101
|
+
* @param description {object}
|
|
102
|
+
* @param [description.name] {string}
|
|
103
|
+
* @param description.controller {string}
|
|
104
|
+
* @param [description.type] {string[]} accepted by the server at creation
|
|
105
|
+
* only
|
|
106
|
+
* @param options {object}
|
|
107
|
+
* @param [options.ifMatch] {string} the prior `ETag`; the write applies only
|
|
108
|
+
* if the description is unchanged
|
|
109
|
+
* @param [options.ifNoneMatch] {boolean} write only if the Space does not
|
|
110
|
+
* exist yet
|
|
111
|
+
* @returns {Promise<{ description?: SpaceDescription; etag?: string }>}
|
|
112
|
+
*/
|
|
113
|
+
async replaceDescription(description, options = {}) {
|
|
114
|
+
const response = await send(this.#context, {
|
|
115
|
+
path: this.#path,
|
|
116
|
+
method: 'PUT',
|
|
117
|
+
capability: this.#capability,
|
|
118
|
+
json: spaceDescriptionBody({ id: this.id, ...description }),
|
|
119
|
+
headers: writeHeaders({
|
|
120
|
+
precondition: {
|
|
121
|
+
ifMatch: options.ifMatch,
|
|
122
|
+
ifNoneMatch: options.ifNoneMatch
|
|
123
|
+
}
|
|
124
|
+
})
|
|
125
|
+
});
|
|
126
|
+
const created = dataOrNull(response);
|
|
127
|
+
return {
|
|
128
|
+
...(created !== null && { description: created }),
|
|
129
|
+
etag: readEtag(response)
|
|
130
|
+
};
|
|
131
|
+
}
|
|
45
132
|
/**
|
|
46
133
|
* Creates or updates the space by id (upsert). Merges the given fields over
|
|
47
134
|
* the current description; `controller` defaults to the wrapped signer's DID.
|
|
@@ -97,12 +184,7 @@ export class Space {
|
|
|
97
184
|
path: this.#path,
|
|
98
185
|
method: 'PUT',
|
|
99
186
|
capability: this.#capability,
|
|
100
|
-
json: {
|
|
101
|
-
id: this.id,
|
|
102
|
-
name,
|
|
103
|
-
controller,
|
|
104
|
-
...(type !== undefined ? { type } : {})
|
|
105
|
-
}
|
|
187
|
+
json: spaceDescriptionBody({ id: this.id, name, controller, type })
|
|
106
188
|
});
|
|
107
189
|
return {
|
|
108
190
|
id: this.id,
|
|
@@ -215,19 +297,23 @@ export class Space {
|
|
|
215
297
|
capability: this.#capability,
|
|
216
298
|
json: body
|
|
217
299
|
});
|
|
218
|
-
// Pre-seed the handle with
|
|
219
|
-
//
|
|
220
|
-
//
|
|
221
|
-
//
|
|
222
|
-
//
|
|
223
|
-
//
|
|
224
|
-
//
|
|
225
|
-
//
|
|
226
|
-
//
|
|
300
|
+
// Pre-seed the handle with the just-declared descriptor as its override so
|
|
301
|
+
// the first write encrypts immediately (keys come from the keystore); no
|
|
302
|
+
// describe() round-trip needed before the descriptor is locally known.
|
|
303
|
+
// Only a descriptor the provider says it can route is pre-seeded: an
|
|
304
|
+
// override is fixed at handle construction, so pinning one the provider
|
|
305
|
+
// would refuse (an `edv` declaration whose epoch roster is not installed
|
|
306
|
+
// yet) would leave the handle permanently fail-closed. Such a handle falls
|
|
307
|
+
// back to descriptor discovery instead, which resolves the roster once
|
|
308
|
+
// `ensureFirstEpoch` installs it. Whether a descriptor routes is the
|
|
309
|
+
// provider's fact, not core's; a provider without `canRoute` routes all.
|
|
227
310
|
const declared = desc.encryption;
|
|
228
311
|
const canRoute = declared !== undefined &&
|
|
229
|
-
(
|
|
230
|
-
|
|
312
|
+
(this.#context.encryption?.canRoute?.({
|
|
313
|
+
scheme: declared.scheme,
|
|
314
|
+
encryption: declared
|
|
315
|
+
}) ??
|
|
316
|
+
true);
|
|
231
317
|
return this.collection(createdId(response), {
|
|
232
318
|
encryption: canRoute ? declared : undefined
|
|
233
319
|
});
|
package/dist/Space.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Space.js","sourceRoot":"","sources":["../src/Space.ts"],"names":[],"mappings":"AAUA,OAAO,EACL,SAAS,EACT,UAAU,EACV,gBAAgB,EAChB,WAAW,EACX,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,WAAW,EACX,WAAW,EACX,YAAY,EACZ,KAAK,EACN,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAC1D,OAAO,EACL,wBAAwB,EACxB,0BAA0B,EAC3B,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAEvD,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AACtD,OAAO,EACL,WAAW,EACX,cAAc,EACd,gBAAgB,EACjB,MAAM,0BAA0B,CAAA;AAEjC,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,a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,cAAc,CAAC,IAAI,CAAC,QAAQ,EAAE;YACnC,UAAU,EAAE,IAAI,CAAC,WAAW;YAC5B,UAAU,EAAE,IAAI,CAAC,WAAW;SAC7B,CAAC,CAAA;IACJ,CAAC;IAED;;;;;;OAMG;IACH,KAAK,CAAC,SAAS;QACb,OAAO,eAAe,CAAC,IAAI,CAAC,QAAQ,EAAE;YACpC,UAAU,EAAE,IAAI,CAAC,WAAW;YAC5B,UAAU,EAAE,IAAI,CAAC,WAAW;SAC7B,CAAC,CAAA;IACJ,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,WAAW;QACf,OAAO,YAAY,CAAC,IAAI,CAAC,QAAQ,EAAE;YACjC,UAAU,EAAE,IAAI,CAAC,WAAW;YAC5B,UAAU,EAAE,IAAI,CAAC,WAAW;SAC7B,CAAC,CAAA;IACJ,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,OAAO;QACX,OAAO,QAAQ,CAAU,IAAI,CAAC,QAAQ,EAAE;YACtC,IAAI,EAAE,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC;YAC3B,UAAU,EAAE,IAAI,CAAC,WAAW;SAC7B,CAAC,CAAA;IACJ,CAAC;CACF"}
|
package/dist/codec.d.ts
CHANGED
|
@@ -262,6 +262,29 @@ export interface CodecIndexing {
|
|
|
262
262
|
has?: string | string[];
|
|
263
263
|
}): Promise<BlindedQuery>;
|
|
264
264
|
}
|
|
265
|
+
/**
|
|
266
|
+
* The `/meta` slot a metadata `custom` value is written to. A Resource's
|
|
267
|
+
* metadata slot always knows its resource id at write time; the Collection's
|
|
268
|
+
* own metadata slot belongs to no resource. Stated by the caller so an
|
|
269
|
+
* encrypting codec never deduces the binding from an absent argument.
|
|
270
|
+
*/
|
|
271
|
+
export type MetaWriteSlot = {
|
|
272
|
+
kind: 'resource';
|
|
273
|
+
id: string;
|
|
274
|
+
} | {
|
|
275
|
+
kind: 'collection';
|
|
276
|
+
};
|
|
277
|
+
/**
|
|
278
|
+
* The `/meta` slot a stored `custom` value was read from. A resource slot
|
|
279
|
+
* whose id the reader does not know is expressible (`{ kind: 'resource' }`),
|
|
280
|
+
* and still gets resource-slot validation rather than the Collection slot's.
|
|
281
|
+
*/
|
|
282
|
+
export type MetaReadSlot = {
|
|
283
|
+
kind: 'resource';
|
|
284
|
+
id?: string;
|
|
285
|
+
} | {
|
|
286
|
+
kind: 'collection';
|
|
287
|
+
};
|
|
265
288
|
/**
|
|
266
289
|
* A pluggable encode/decode transform bound to a single collection handle.
|
|
267
290
|
* Implementations must be stateless with respect to a given call (a resolved
|
|
@@ -349,12 +372,12 @@ export interface ResourceCodec {
|
|
|
349
372
|
* Collection-level `custom` carries the persisted `indexSchema` alongside
|
|
350
373
|
* them) while `name` / `tags` themselves stay checked at their stored
|
|
351
374
|
* types
|
|
352
|
-
* @param
|
|
353
|
-
* encrypting codec binds
|
|
354
|
-
* protected header
|
|
355
|
-
*
|
|
356
|
-
* Collection
|
|
357
|
-
*
|
|
375
|
+
* @param input.slot {MetaWriteSlot} the `/meta` slot the value is written
|
|
376
|
+
* to. An encrypting codec binds the slot into the envelope's
|
|
377
|
+
* AEAD-authenticated protected header: a resource slot binds the resource
|
|
378
|
+
* id (so a server-side swap of two resources' metadata is detected on
|
|
379
|
+
* decode), the Collection slot binds the codec's own collection id. The
|
|
380
|
+
* identity codec ignores it.
|
|
358
381
|
* @returns {Promise<{ custom: object; epoch?: string }>} the value to store
|
|
359
382
|
* under `custom`, plus -- for an encrypting codec -- `epoch`, the key-epoch
|
|
360
383
|
* id the metadata envelope sealed under. A Collection-level `/meta` write
|
|
@@ -364,7 +387,7 @@ export interface ResourceCodec {
|
|
|
364
387
|
*/
|
|
365
388
|
encodeMeta(input: {
|
|
366
389
|
custom: ResourceMetadataCustomInput;
|
|
367
|
-
|
|
390
|
+
slot: MetaWriteSlot;
|
|
368
391
|
}): Promise<{
|
|
369
392
|
custom: object;
|
|
370
393
|
epoch?: string;
|
|
@@ -377,16 +400,16 @@ export interface ResourceCodec {
|
|
|
377
400
|
*
|
|
378
401
|
* @param stored {object}
|
|
379
402
|
* @param [stored.custom] {unknown} the stored `custom` value from `/meta`
|
|
380
|
-
* @param
|
|
403
|
+
* @param slot {MetaReadSlot} the `/meta` slot the value was read from. An
|
|
381
404
|
* encrypting codec verifies the envelope's AEAD-authenticated binding
|
|
382
|
-
* against it
|
|
383
|
-
*
|
|
384
|
-
* to that collection.
|
|
405
|
+
* against it: a resource slot requires a resource-bound envelope (and
|
|
406
|
+
* checks the id when the caller knows it), the Collection slot requires
|
|
407
|
+
* one bound to that collection. The identity codec ignores it.
|
|
385
408
|
* @returns {Promise<ResourceMetadataCustom>}
|
|
386
409
|
*/
|
|
387
410
|
decodeMeta(stored: {
|
|
388
411
|
custom?: unknown;
|
|
389
|
-
},
|
|
412
|
+
}, slot: MetaReadSlot): Promise<ResourceMetadataCustom>;
|
|
390
413
|
}
|
|
391
414
|
/**
|
|
392
415
|
* The keystore + codec factory for encrypted collections. Injected into
|
|
@@ -429,5 +452,24 @@ export interface EncryptionProvider {
|
|
|
429
452
|
encryption?: CollectionEncryption;
|
|
430
453
|
keys?: unknown;
|
|
431
454
|
}): Promise<ResourceCodec | null>;
|
|
455
|
+
/**
|
|
456
|
+
* Answers whether a just-declared descriptor is one `codecFor` could route
|
|
457
|
+
* as it stands, without consulting any keystore. Core asks this before
|
|
458
|
+
* pinning a new handle to the descriptor as its per-handle override (an
|
|
459
|
+
* override is fixed for the handle's life, so pinning one `codecFor` would
|
|
460
|
+
* refuse leaves the handle permanently fail-closed); a `false` answer makes
|
|
461
|
+
* the handle fall back to descriptor discovery instead. Pure and
|
|
462
|
+
* synchronous. Optional: a provider without it is assumed to route every
|
|
463
|
+
* descriptor it is handed.
|
|
464
|
+
*
|
|
465
|
+
* @param input {object}
|
|
466
|
+
* @param input.scheme {string} the declared encryption scheme
|
|
467
|
+
* @param input.encryption {CollectionEncryption} the declared descriptor
|
|
468
|
+
* @returns {boolean}
|
|
469
|
+
*/
|
|
470
|
+
canRoute?(input: {
|
|
471
|
+
scheme: string;
|
|
472
|
+
encryption: CollectionEncryption;
|
|
473
|
+
}): boolean;
|
|
432
474
|
}
|
|
433
475
|
//# sourceMappingURL=codec.d.ts.map
|
package/dist/codec.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codec.d.ts","sourceRoot":"","sources":["../src/codec.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACxD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AAC1D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAA;AAClE,OAAO,KAAK,EACV,oBAAoB,EACpB,IAAI,EACJ,YAAY,EACZ,YAAY,EACZ,sBAAsB,EACtB,2BAA2B,EAC5B,MAAM,YAAY,CAAA;AAEnB;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,YAAY;IAC3B,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,IAAI,IAAI,OAAO,CAAC,OAAO,CAAC,CAAA;IACxB,OAAO,EAAE;QAAE,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAA;KAAE,CAAA;CAC9C;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,MAAM,WAAW,YAAY;IAC3B,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,UAAU,GAAG,IAAI,CAAA;IACxB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,QAAQ,CAAC,EAAE,OAAO,CA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ver } from '@interop/data-integrity-core';
|
|
3
|
-
import type { CodecIndexing, CodecRequestContext, CodecWrite, EncryptionProvider, ResourceCodec, ResponseLike } from '../codec.js';
|
|
3
|
+
import type { CodecIndexing, CodecRequestContext, CodecWrite, EncryptionProvider, MetaReadSlot, MetaWriteSlot, ResourceCodec, ResponseLike } from '../codec.js';
|
|
4
4
|
import type { WritePrecondition } from '../internal/conditional.js';
|
|
5
5
|
import { WasTransport } from './WasTransport.js';
|
|
6
6
|
import type { BlindingKey } from './hmacKey.js';
|
|
@@ -130,9 +130,9 @@ export declare class EdvCodec implements ResourceCodec {
|
|
|
130
130
|
* inert (metadata concurrency is the server's plaintext `metaVersion`, not the
|
|
131
131
|
* envelope), so each write re-encrypts fresh with no `update`.
|
|
132
132
|
*/
|
|
133
|
-
encodeMeta({ custom,
|
|
133
|
+
encodeMeta({ custom, slot }: {
|
|
134
134
|
custom: ResourceMetadataCustomInput;
|
|
135
|
-
|
|
135
|
+
slot: MetaWriteSlot;
|
|
136
136
|
}): Promise<{
|
|
137
137
|
custom: object;
|
|
138
138
|
epoch: string;
|
|
@@ -145,14 +145,15 @@ export declare class EdvCodec implements ResourceCodec {
|
|
|
145
145
|
* present value must be an EDV envelope (else {@link EncryptionError}, the
|
|
146
146
|
* `_assertEnvelope` guard), so a foreign plaintext `custom` fails closed.
|
|
147
147
|
*
|
|
148
|
-
*
|
|
149
|
-
*
|
|
150
|
-
*
|
|
151
|
-
*
|
|
148
|
+
* The caller states the slot. In the Collection slot an envelope bound to a
|
|
149
|
+
* resource is refused as a server-side swap, and one that does not bind this
|
|
150
|
+
* Collection's own id is refused as an envelope of some other slot. In a
|
|
151
|
+
* resource slot the Collection's own envelope is refused, and the bound
|
|
152
|
+
* resource id is checked against `slot.id` when the caller knows it.
|
|
152
153
|
*/
|
|
153
154
|
decodeMeta({ custom }: {
|
|
154
155
|
custom?: unknown;
|
|
155
|
-
},
|
|
156
|
+
}, slot: MetaReadSlot): Promise<ResourceMetadataCustom>;
|
|
156
157
|
}
|
|
157
158
|
/**
|
|
158
159
|
* The per-collection key material an EDV codec is built from.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EdvCodec.d.ts","sourceRoot":"","sources":["../../src/edv/EdvCodec.ts"],"names":[],"mappings":"AAwEA,OAAO,EAAE,aAAa,EAAe,MAAM,qBAAqB,CAAA;AAChE,OAAO,KAAK,EAGV,gBAAgB,EAChB,YAAY,EAEb,MAAM,8BAA8B,CAAA;AACrC,OAAO,KAAK,EAGV,aAAa,EACb,mBAAmB,EACnB,UAAU,EACV,kBAAkB,EAElB,aAAa,EACb,YAAY,EACb,MAAM,aAAa,CAAA;AAgBpB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAKhD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAQ/C,OAAO,KAAK,EACV,oBAAoB,EACpB,IAAI,EACJ,YAAY,EACZ,sBAAsB,EACtB,2BAA2B,EAC5B,MAAM,aAAa,CAAA;AA8BpB;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,OAAO,EAAE;IAC5C,OAAO,EAAE,mBAAmB,CAAA;IAC5B,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CACzC,KAAK,YAAY,CAAA;AAElB;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,OAAO,EACP,YAAY,EACZ,WAAW,EACZ,EAAE;IACD,OAAO,EAAE,MAAM,CAAA;IACf,YAAY,EAAE,MAAM,CAAA;IACpB,WAAW,EAAE,MAAM,CAAA;CACpB,GAAG,qBAAqB,CAUxB;AA4GD;;;;GAIG;AACH,qBAAa,QAAS,YAAW,aAAa;;IAC5C,QAAQ,CAAC,iBAAiB,QAAO;IAqFjC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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