@interop/was-client 0.17.0 → 0.19.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 +88 -0
- package/dist/Collection.d.ts +1 -46
- package/dist/Collection.d.ts.map +1 -1
- package/dist/Collection.js +77 -79
- package/dist/Collection.js.map +1 -1
- package/dist/Resource.d.ts +1 -51
- package/dist/Resource.d.ts.map +1 -1
- package/dist/Resource.js +61 -58
- package/dist/Resource.js.map +1 -1
- package/dist/Space.d.ts +1 -27
- package/dist/Space.d.ts.map +1 -1
- package/dist/Space.js +65 -65
- package/dist/Space.js.map +1 -1
- package/dist/WasClient.d.ts +1 -12
- package/dist/WasClient.d.ts.map +1 -1
- package/dist/WasClient.js +15 -15
- package/dist/WasClient.js.map +1 -1
- package/dist/codec.d.ts +15 -2
- package/dist/codec.d.ts.map +1 -1
- package/dist/edv/EdvCodec.d.ts +13 -95
- package/dist/edv/EdvCodec.d.ts.map +1 -1
- package/dist/edv/EdvCodec.js +221 -52
- package/dist/edv/EdvCodec.js.map +1 -1
- package/dist/edv/WasTransport.d.ts +1 -53
- package/dist/edv/WasTransport.d.ts.map +1 -1
- package/dist/edv/WasTransport.js +29 -29
- package/dist/edv/WasTransport.js.map +1 -1
- package/dist/edv/docCipher.d.ts +111 -0
- package/dist/edv/docCipher.d.ts.map +1 -0
- package/dist/edv/docCipher.js +236 -0
- package/dist/edv/docCipher.js.map +1 -0
- package/dist/edv/epochKeys.d.ts.map +1 -1
- package/dist/edv/epochKeys.js +46 -16
- package/dist/edv/epochKeys.js.map +1 -1
- package/dist/edv/epochMac.d.ts +32 -0
- package/dist/edv/epochMac.d.ts.map +1 -0
- package/dist/edv/epochMac.js +117 -0
- package/dist/edv/epochMac.js.map +1 -0
- 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/recipients.d.ts.map +1 -1
- package/dist/edv/recipients.js +26 -3
- package/dist/edv/recipients.js.map +1 -1
- package/dist/errors.d.ts +22 -0
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +28 -0
- package/dist/errors.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/internal/codec.d.ts +1 -2
- package/dist/internal/codec.d.ts.map +1 -1
- package/dist/internal/codec.js +10 -10
- package/dist/internal/codec.js.map +1 -1
- package/dist/internal/features.d.ts +1 -12
- package/dist/internal/features.d.ts.map +1 -1
- package/dist/internal/features.js +8 -8
- package/dist/internal/features.js.map +1 -1
- package/dist/internal/pagination.d.ts +1 -1
- package/dist/internal/pagination.js +1 -1
- package/dist/sync/cid.d.ts +31 -0
- package/dist/sync/cid.d.ts.map +1 -0
- package/dist/sync/cid.js +55 -0
- package/dist/sync/cid.js.map +1 -0
- package/dist/sync/envelope.d.ts +20 -0
- package/dist/sync/envelope.d.ts.map +1 -0
- package/dist/sync/envelope.js +17 -0
- package/dist/sync/envelope.js.map +1 -0
- package/dist/sync/index.d.ts +29 -0
- package/dist/sync/index.d.ts.map +1 -0
- package/dist/sync/index.js +28 -0
- package/dist/sync/index.js.map +1 -0
- package/dist/sync/plaintextCipher.d.ts +16 -0
- package/dist/sync/plaintextCipher.d.ts.map +1 -0
- package/dist/sync/plaintextCipher.js +36 -0
- package/dist/sync/plaintextCipher.js.map +1 -0
- package/dist/sync/port.d.ts +78 -0
- package/dist/sync/port.d.ts.map +1 -0
- package/dist/sync/port.js +204 -0
- package/dist/sync/port.js.map +1 -0
- package/dist/sync/provisioning.d.ts +41 -0
- package/dist/sync/provisioning.d.ts.map +1 -0
- package/dist/sync/provisioning.js +44 -0
- package/dist/sync/provisioning.js.map +1 -0
- package/dist/sync/types.d.ts +166 -0
- package/dist/sync/types.d.ts.map +1 -0
- package/dist/sync/types.js +2 -0
- package/dist/sync/types.js.map +1 -0
- package/dist/types.d.ts +2 -2
- package/dist/types.d.ts.map +1 -1
- package/package.json +13 -5
package/README.md
CHANGED
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
- [Storage introspection: backends and quotas](#storage-introspection-backends-and-quotas)
|
|
25
25
|
- [Registering a Bring-Your-Own-Storage backend](#registering-a-bring-your-own-storage-backend)
|
|
26
26
|
- [Encrypted collections (EDV-over-WAS): pass-through encryption via the WAS client (recommended)](#encrypted-collections-edv-over-was-pass-through-encryption-via-the-was-client-recommended)
|
|
27
|
+
- [Cross-replica sync](#cross-replica-sync)
|
|
27
28
|
- [Export and import](#export-and-import)
|
|
28
29
|
- [The manual-request escape hatch](#the-manual-request-escape-hatch)
|
|
29
30
|
- [Errors and the 404/null caveat](#errors-and-the-404null-caveat)
|
|
@@ -53,6 +54,11 @@ no query-by-filter yet).
|
|
|
53
54
|
| `collection.find().toArray()` | `collection.list()` |
|
|
54
55
|
| `collection.deleteOne({ _id })` | `collection.resource(resourceId).delete()` |
|
|
55
56
|
|
|
57
|
+
See also:
|
|
58
|
+
|
|
59
|
+
- [CONTRIBUTING.md](CONTRIBUTING.md) -- editor setup and code style conventions
|
|
60
|
+
- [AGENTS.md](AGENTS.md) -- toolchain, tests, and conventions for coding agents
|
|
61
|
+
|
|
56
62
|
## Install
|
|
57
63
|
|
|
58
64
|
- Node.js 24+ is recommended.
|
|
@@ -654,6 +660,88 @@ scope for now):
|
|
|
654
660
|
- **Raw reads.** `get()` decrypts; the `getText()` / `getBytes()` escape hatches
|
|
655
661
|
do not (they return the stored representation).
|
|
656
662
|
|
|
663
|
+
### Cross-replica sync
|
|
664
|
+
|
|
665
|
+
The opt-in `@interop/was-client/sync` subpath supplies everything a wallet needs
|
|
666
|
+
to replicate one Space + Collection across devices, with WAS as the primary
|
|
667
|
+
copy. It is not a sync engine itself -- it provides the seams a change engine
|
|
668
|
+
plugs into:
|
|
669
|
+
|
|
670
|
+
- **`createWasSyncPort({ was, spaceId, collectionId })`** builds a
|
|
671
|
+
`WasSyncPort`: paged pulls over the collection's `changes` feed (resumable via
|
|
672
|
+
an opaque server-side checkpoint) and conditional pushes
|
|
673
|
+
(`putContent`/`deleteContent`/`putMeta`) guarded by the server's content
|
|
674
|
+
`ETag`. The port moves stored bodies **verbatim** -- for an encrypted
|
|
675
|
+
collection that means the opaque EDV envelope, never plaintext, and the port
|
|
676
|
+
itself never touches keys. A rejected precondition throws
|
|
677
|
+
`WasSyncConflictError` (412); a delete of an already-gone resource throws
|
|
678
|
+
`WasSyncNotFoundError` (404) -- both catchable subtypes of the core
|
|
679
|
+
`PreconditionFailedError` / `NotFoundError`.
|
|
680
|
+
- **`DocCipher`** is the per-collection encrypt/decrypt seam sitting above the
|
|
681
|
+
port: it turns a JSON document into its stored body (minting the resource id)
|
|
682
|
+
and back. `createPlaintextDocCipher(...)` is the crypto-free identity
|
|
683
|
+
implementation for a plaintext content-addressed collection;
|
|
684
|
+
`createEdvDocCipher(...)` (from `@interop/was-client/edv`) is the encrypting
|
|
685
|
+
one, covering single-recipient and multi-recipient (key-epoch) collections.
|
|
686
|
+
- **`contentCid(doc)`** and **`deriveSpaceId(controllerDid)`** derive
|
|
687
|
+
content-addressed ids -- `base64url(SHA-256(utf8(JCS-canonicalized JSON)))`,
|
|
688
|
+
unpadded -- so the same logical document (and the same controller) lands on
|
|
689
|
+
the same id on every replica, with no coordination or mapping table.
|
|
690
|
+
- **`ensureSpaceAndCollection(...)`** is idempotent provisioning: upsert the
|
|
691
|
+
Space, configure the collection (`edv` or `plaintext`, optionally
|
|
692
|
+
world-readable). Safe to re-run on every connect.
|
|
693
|
+
|
|
694
|
+
```ts
|
|
695
|
+
import {
|
|
696
|
+
createWasSyncPort,
|
|
697
|
+
createPlaintextDocCipher,
|
|
698
|
+
deriveSpaceId,
|
|
699
|
+
ensureSpaceAndCollection,
|
|
700
|
+
WasSyncConflictError
|
|
701
|
+
} from '@interop/was-client/sync'
|
|
702
|
+
|
|
703
|
+
const spaceId = deriveSpaceId(controllerDid) // same Space on every device
|
|
704
|
+
await ensureSpaceAndCollection({
|
|
705
|
+
was,
|
|
706
|
+
spaceId,
|
|
707
|
+
controllerDid,
|
|
708
|
+
collectionId: 'notes',
|
|
709
|
+
encryption: 'plaintext'
|
|
710
|
+
})
|
|
711
|
+
|
|
712
|
+
const port = createWasSyncPort({ was, spaceId, collectionId: 'notes' })
|
|
713
|
+
const cipher = createPlaintextDocCipher({ collectionId: 'notes' })
|
|
714
|
+
|
|
715
|
+
// Push: encrypt (mints the id), then write the stored body verbatim.
|
|
716
|
+
const { id, envelope } = await cipher.encrypt({ data: { note: 'hello' } })
|
|
717
|
+
try {
|
|
718
|
+
await port.putContent({ id, data: envelope, ifNoneMatch: true })
|
|
719
|
+
} catch (err) {
|
|
720
|
+
if (!(err instanceof WasSyncConflictError)) {
|
|
721
|
+
throw err
|
|
722
|
+
}
|
|
723
|
+
// 412 on a content-addressed insert: another replica already wrote this
|
|
724
|
+
// exact document (same content id) -- a settled outcome, nothing to merge.
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
// Pull: page through the change feed, resuming from the last checkpoint.
|
|
728
|
+
let checkpoint
|
|
729
|
+
do {
|
|
730
|
+
const page = await port.query({ checkpoint, limit: 100 })
|
|
731
|
+
for (const doc of page.documents) {
|
|
732
|
+
if (doc._deleted) continue // tombstone
|
|
733
|
+
const data = await cipher.decrypt({ envelope: doc.data })
|
|
734
|
+
// apply to the local replica, recording doc.version for later pushes
|
|
735
|
+
}
|
|
736
|
+
checkpoint = page.checkpoint // null when the page was empty (caught up)
|
|
737
|
+
} while (checkpoint)
|
|
738
|
+
```
|
|
739
|
+
|
|
740
|
+
The subpath is crypto-free: importing it never pulls the `./edv` dependency
|
|
741
|
+
graph. To sync an encrypted collection, keep the same port and swap in
|
|
742
|
+
`createEdvDocCipher` -- the change feed and the port ship the envelope bytes
|
|
743
|
+
unchanged either way, so the server never sees plaintext.
|
|
744
|
+
|
|
657
745
|
### Export and import
|
|
658
746
|
|
|
659
747
|
```ts
|
package/dist/Collection.d.ts
CHANGED
|
@@ -3,18 +3,9 @@ import { Resource } from './Resource.js';
|
|
|
3
3
|
import type { ChangesCheckpoint, ChangesPage } from '@interop/storage-core';
|
|
4
4
|
import type { AddResult, BackendDescriptor, BackendUsage, CollectionDescription, CollectionWritableFields, EncryptionOverride, GrantOptions, HandleOptions, IDelegatedZcap, IZcap, Json, ResourceData, LinkSet, PolicyDocument, CollectionResourcesList, ResourceSummary } from './types.js';
|
|
5
5
|
export declare class Collection {
|
|
6
|
+
#private;
|
|
6
7
|
readonly spaceId: string;
|
|
7
8
|
readonly id: string;
|
|
8
|
-
private readonly _context;
|
|
9
|
-
private readonly _capability?;
|
|
10
|
-
private readonly _encryptionOverride?;
|
|
11
|
-
private readonly _codecHolder;
|
|
12
|
-
/**
|
|
13
|
-
* The shared backend-feature probe for this collection (memoized on a
|
|
14
|
-
* definitive answer), consulted by the conditional-codec write path and
|
|
15
|
-
* shared with child resource handles the way the codec is.
|
|
16
|
-
*/
|
|
17
|
-
private readonly _features;
|
|
18
9
|
/**
|
|
19
10
|
* @param options {object}
|
|
20
11
|
* @param options.context {ClientContext} - Shared context (serverUrl, ezcap
|
|
@@ -33,34 +24,6 @@ export declare class Collection {
|
|
|
33
24
|
capability?: IZcap;
|
|
34
25
|
encryption?: EncryptionOverride;
|
|
35
26
|
});
|
|
36
|
-
private get _path();
|
|
37
|
-
private get _itemsPath();
|
|
38
|
-
private get _policyPath();
|
|
39
|
-
/**
|
|
40
|
-
* The writable Collection Description fields, present only when set. The one
|
|
41
|
-
* inclusion rule (`!== undefined`) shared by the `configure` /
|
|
42
|
-
* `replaceDescription` request bodies and their echoed return descriptions, so
|
|
43
|
-
* the two paths cannot drift and a new writable field is added in one place.
|
|
44
|
-
*
|
|
45
|
-
* @param fields {CollectionWritableFields}
|
|
46
|
-
* @returns {CollectionWritableFields}
|
|
47
|
-
*/
|
|
48
|
-
private _writableFields;
|
|
49
|
-
/**
|
|
50
|
-
* Resolves (once, then caches) the codec for this collection's reads and
|
|
51
|
-
* writes: the identity codec for a plaintext collection, or the encrypting
|
|
52
|
-
* codec when this collection is declared encrypted -- by a per-handle override
|
|
53
|
-
* or its `encryption` marker -- and the client's keystore supplies its keys.
|
|
54
|
-
* An encrypted collection the client cannot key for fails closed (throws), and
|
|
55
|
-
* a successful marker read happens at most once per handle (memoized here) -- a
|
|
56
|
-
* fresh handle to the same collection re-reads it, so retain the handle to
|
|
57
|
-
* reuse it. A failed resolution (e.g. a transient 500/network error during
|
|
58
|
-
* marker discovery) is not memoized: the cache is cleared so the next call
|
|
59
|
-
* retries rather than re-throwing the stale error forever.
|
|
60
|
-
*
|
|
61
|
-
* @returns {Promise<ResourceCodec>}
|
|
62
|
-
*/
|
|
63
|
-
private _codec;
|
|
64
27
|
/**
|
|
65
28
|
* Reads the Collection Description. Returns `null` if the collection is
|
|
66
29
|
* missing or not visible to you (WAS returns 404 for both not-found and
|
|
@@ -194,14 +157,6 @@ export declare class Collection {
|
|
|
194
157
|
}): Promise<{
|
|
195
158
|
etag?: string;
|
|
196
159
|
}>;
|
|
197
|
-
/**
|
|
198
|
-
* Reads the first page of the listing and packages the means to follow its
|
|
199
|
-
* `next` links (each page fetched with the same authorization). Returns `null`
|
|
200
|
-
* if the collection is missing or not visible to you (404 conflation caveat).
|
|
201
|
-
*
|
|
202
|
-
* @returns {Promise<PageWalk | null>}
|
|
203
|
-
*/
|
|
204
|
-
private _listWalk;
|
|
205
160
|
/**
|
|
206
161
|
* Lists the items in the collection. Transparently follows the server's `next`
|
|
207
162
|
* pagination links, buffering every page into a single list (the returned
|
package/dist/Collection.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Collection.d.ts","sourceRoot":"","sources":["../src/Collection.ts"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;AAiC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACxC,OAAO,K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
|
-
_codecHolder;
|
|
25
|
+
#context;
|
|
26
|
+
#capability;
|
|
27
|
+
#codecHolder;
|
|
29
28
|
/**
|
|
30
29
|
* The shared backend-feature probe for this collection (memoized on a
|
|
31
30
|
* definitive answer), consulted by the conditional-codec write path and
|
|
32
31
|
* shared with child resource handles the way the codec is.
|
|
33
32
|
*/
|
|
34
|
-
|
|
33
|
+
#features;
|
|
35
34
|
/**
|
|
36
35
|
* @param options {object}
|
|
37
36
|
* @param options.context {ClientContext} - Shared context (serverUrl, ezcap
|
|
@@ -54,30 +53,29 @@ export class Collection {
|
|
|
54
53
|
// constructor covers every operation (describe, delete, list, grant, ...),
|
|
55
54
|
// not just writes.
|
|
56
55
|
assertNotReserved({ id: collectionId, kind: 'collection' });
|
|
57
|
-
this
|
|
56
|
+
this.#context = context;
|
|
58
57
|
this.spaceId = spaceId;
|
|
59
58
|
this.id = collectionId;
|
|
60
|
-
this
|
|
61
|
-
this
|
|
62
|
-
this._codecHolder = collectionCodecHolder(context, {
|
|
59
|
+
this.#capability = capability;
|
|
60
|
+
this.#codecHolder = collectionCodecHolder(context, {
|
|
63
61
|
spaceId,
|
|
64
62
|
collectionId,
|
|
65
63
|
override: encryption,
|
|
66
64
|
capability
|
|
67
65
|
});
|
|
68
|
-
this
|
|
66
|
+
this.#features = collectionBackendFeatures(context, {
|
|
69
67
|
spaceId,
|
|
70
68
|
collectionId,
|
|
71
69
|
capability
|
|
72
70
|
});
|
|
73
71
|
}
|
|
74
|
-
get
|
|
72
|
+
get #path() {
|
|
75
73
|
return collectionPath(this.spaceId, this.id);
|
|
76
74
|
}
|
|
77
|
-
get
|
|
75
|
+
get #itemsPath() {
|
|
78
76
|
return collectionItems(this.spaceId, this.id);
|
|
79
77
|
}
|
|
80
|
-
get
|
|
78
|
+
get #policyPath() {
|
|
81
79
|
return collectionPolicy(this.spaceId, this.id);
|
|
82
80
|
}
|
|
83
81
|
/**
|
|
@@ -89,7 +87,7 @@ export class Collection {
|
|
|
89
87
|
* @param fields {CollectionWritableFields}
|
|
90
88
|
* @returns {CollectionWritableFields}
|
|
91
89
|
*/
|
|
92
|
-
|
|
90
|
+
#writableFields(fields) {
|
|
93
91
|
return {
|
|
94
92
|
...(fields.name !== undefined ? { name: fields.name } : {}),
|
|
95
93
|
...(fields.backend !== undefined ? { backend: fields.backend } : {}),
|
|
@@ -112,8 +110,8 @@ export class Collection {
|
|
|
112
110
|
*
|
|
113
111
|
* @returns {Promise<ResourceCodec>}
|
|
114
112
|
*/
|
|
115
|
-
|
|
116
|
-
return this.
|
|
113
|
+
#codec() {
|
|
114
|
+
return this.#codecHolder.get();
|
|
117
115
|
}
|
|
118
116
|
/**
|
|
119
117
|
* Reads the Collection Description. Returns `null` if the collection is
|
|
@@ -123,10 +121,10 @@ export class Collection {
|
|
|
123
121
|
* @returns {Promise<CollectionDescription | null>}
|
|
124
122
|
*/
|
|
125
123
|
async describe() {
|
|
126
|
-
return describeCollection(this
|
|
124
|
+
return describeCollection(this.#context, {
|
|
127
125
|
spaceId: this.spaceId,
|
|
128
126
|
collectionId: this.id,
|
|
129
|
-
capability: this
|
|
127
|
+
capability: this.#capability
|
|
130
128
|
});
|
|
131
129
|
}
|
|
132
130
|
/**
|
|
@@ -174,11 +172,11 @@ export class Collection {
|
|
|
174
172
|
const name = desc.name ?? current?.name;
|
|
175
173
|
const backend = desc.backend ?? current?.backend;
|
|
176
174
|
const encryption = desc.encryption ?? current?.encryption;
|
|
177
|
-
const fields = this
|
|
178
|
-
await send(this
|
|
179
|
-
path: this
|
|
175
|
+
const fields = this.#writableFields({ name, backend, encryption });
|
|
176
|
+
await send(this.#context, {
|
|
177
|
+
path: this.#path,
|
|
180
178
|
method: 'PUT',
|
|
181
|
-
capability: this
|
|
179
|
+
capability: this.#capability,
|
|
182
180
|
json: { id: this.id, ...fields }
|
|
183
181
|
});
|
|
184
182
|
// Adding the encryption marker flips this collection from plaintext to
|
|
@@ -188,7 +186,7 @@ export class Collection {
|
|
|
188
186
|
// the now-encrypted collection. Child resource handles share this codec via
|
|
189
187
|
// their thunk, so resetting here propagates to them too.
|
|
190
188
|
if (desc.encryption) {
|
|
191
|
-
this.
|
|
189
|
+
this.#codecHolder.reset();
|
|
192
190
|
}
|
|
193
191
|
return {
|
|
194
192
|
id: this.id,
|
|
@@ -209,10 +207,10 @@ export class Collection {
|
|
|
209
207
|
async describeWithEtag() {
|
|
210
208
|
// The same GET as `describe()` (via the shared request shape), keeping the
|
|
211
209
|
// raw response so the ETag header can be read alongside the body.
|
|
212
|
-
const response = await describeCollectionResponse(this
|
|
210
|
+
const response = await describeCollectionResponse(this.#context, {
|
|
213
211
|
spaceId: this.spaceId,
|
|
214
212
|
collectionId: this.id,
|
|
215
|
-
capability: this
|
|
213
|
+
capability: this.#capability
|
|
216
214
|
});
|
|
217
215
|
const description = dataOrNull(response);
|
|
218
216
|
if (response === null || description === null) {
|
|
@@ -242,11 +240,11 @@ export class Collection {
|
|
|
242
240
|
* @returns {Promise<{ description: CollectionDescription; etag?: string }>}
|
|
243
241
|
*/
|
|
244
242
|
async replaceDescription(description, options = {}) {
|
|
245
|
-
const fields = this
|
|
246
|
-
const response = await send(this
|
|
247
|
-
path: this
|
|
243
|
+
const fields = this.#writableFields(description);
|
|
244
|
+
const response = await send(this.#context, {
|
|
245
|
+
path: this.#path,
|
|
248
246
|
method: 'PUT',
|
|
249
|
-
capability: this
|
|
247
|
+
capability: this.#capability,
|
|
250
248
|
json: { id: this.id, ...fields },
|
|
251
249
|
headers: writeHeaders({ precondition: { ifMatch: options.ifMatch } })
|
|
252
250
|
});
|
|
@@ -259,7 +257,7 @@ export class Collection {
|
|
|
259
257
|
// resource handles share this codec via their thunk, so resetting here
|
|
260
258
|
// propagates to them too.
|
|
261
259
|
if (description.encryption !== undefined) {
|
|
262
|
-
this.
|
|
260
|
+
this.#codecHolder.reset();
|
|
263
261
|
}
|
|
264
262
|
return {
|
|
265
263
|
description: {
|
|
@@ -277,10 +275,10 @@ export class Collection {
|
|
|
277
275
|
* @returns {Promise<void>}
|
|
278
276
|
*/
|
|
279
277
|
async delete() {
|
|
280
|
-
await send(this
|
|
281
|
-
path: this
|
|
278
|
+
await send(this.#context, {
|
|
279
|
+
path: this.#path,
|
|
282
280
|
method: 'DELETE',
|
|
283
|
-
capability: this
|
|
281
|
+
capability: this.#capability,
|
|
284
282
|
idempotent: true
|
|
285
283
|
});
|
|
286
284
|
}
|
|
@@ -297,14 +295,14 @@ export class Collection {
|
|
|
297
295
|
*/
|
|
298
296
|
resource(resourceId, options = {}) {
|
|
299
297
|
return new Resource({
|
|
300
|
-
context: this
|
|
298
|
+
context: this.#context,
|
|
301
299
|
spaceId: this.spaceId,
|
|
302
300
|
collectionId: this.id,
|
|
303
301
|
resourceId,
|
|
304
|
-
capability: options.capability ?? this
|
|
302
|
+
capability: options.capability ?? this.#capability,
|
|
305
303
|
// Share this collection's memoized feature probe so per-resource handles
|
|
306
304
|
// do not each repeat the backend-descriptor round-trip.
|
|
307
|
-
features: () => this.
|
|
305
|
+
features: () => this.#features.get(),
|
|
308
306
|
// A per-resource encryption override resolves its own codec (honoring the
|
|
309
307
|
// override); without one, share this collection's resolved codec so the
|
|
310
308
|
// resource handle does not repeat the marker-discovery round-trip. The two
|
|
@@ -312,7 +310,7 @@ export class Collection {
|
|
|
312
310
|
// is supplied.
|
|
313
311
|
...(options.encryption !== undefined
|
|
314
312
|
? { encryption: options.encryption }
|
|
315
|
-
: { codec: () => this
|
|
313
|
+
: { codec: () => this.#codec() })
|
|
316
314
|
});
|
|
317
315
|
}
|
|
318
316
|
/**
|
|
@@ -326,7 +324,7 @@ export class Collection {
|
|
|
326
324
|
* @returns {Promise<AddResult>}
|
|
327
325
|
*/
|
|
328
326
|
async add(data, options = {}) {
|
|
329
|
-
const codec = await this
|
|
327
|
+
const codec = await this.#codec();
|
|
330
328
|
const encoded = await codec.encode({
|
|
331
329
|
data,
|
|
332
330
|
contentType: options.contentType
|
|
@@ -340,16 +338,16 @@ export class Collection {
|
|
|
340
338
|
// via `POST`.
|
|
341
339
|
if (encoded.id !== undefined) {
|
|
342
340
|
const path = resourcePath(this.spaceId, this.id, encoded.id);
|
|
343
|
-
const response = await sendEncodedWrite(this
|
|
341
|
+
const response = await sendEncodedWrite(this.#context, {
|
|
344
342
|
path,
|
|
345
343
|
method: 'PUT',
|
|
346
|
-
capability: this
|
|
344
|
+
capability: this.#capability,
|
|
347
345
|
encoded,
|
|
348
346
|
precondition
|
|
349
347
|
});
|
|
350
348
|
return {
|
|
351
349
|
id: encoded.id,
|
|
352
|
-
url: toUrl({ serverUrl: this.
|
|
350
|
+
url: toUrl({ serverUrl: this.#context.serverUrl, path }),
|
|
353
351
|
// Report the plaintext resource type when the codec resolved one (the
|
|
354
352
|
// EDV codec's `resourceContentType`); otherwise the wire `contentType`,
|
|
355
353
|
// which for the identity codec already is the resource type.
|
|
@@ -357,10 +355,10 @@ export class Collection {
|
|
|
357
355
|
etag: readEtag(response)
|
|
358
356
|
};
|
|
359
357
|
}
|
|
360
|
-
const response = await sendEncodedWrite(this
|
|
361
|
-
path: this
|
|
358
|
+
const response = await sendEncodedWrite(this.#context, {
|
|
359
|
+
path: this.#itemsPath,
|
|
362
360
|
method: 'POST',
|
|
363
|
-
capability: this
|
|
361
|
+
capability: this.#capability,
|
|
364
362
|
encoded,
|
|
365
363
|
precondition
|
|
366
364
|
});
|
|
@@ -375,9 +373,9 @@ export class Collection {
|
|
|
375
373
|
// URL so `AddResult.url` is always absolute (consumers like
|
|
376
374
|
// `was.publicRead({ resourceUrl })` require an absolute URL).
|
|
377
375
|
url: location
|
|
378
|
-
? new URL(location, toUrl({ serverUrl: this.
|
|
376
|
+
? new URL(location, toUrl({ serverUrl: this.#context.serverUrl, path: this.#itemsPath })).toString()
|
|
379
377
|
: toUrl({
|
|
380
|
-
serverUrl: this.
|
|
378
|
+
serverUrl: this.#context.serverUrl,
|
|
381
379
|
path: resourcePath(this.spaceId, this.id, id)
|
|
382
380
|
}),
|
|
383
381
|
contentType: responseBody?.['content-type'] ??
|
|
@@ -422,17 +420,17 @@ export class Collection {
|
|
|
422
420
|
*
|
|
423
421
|
* @returns {Promise<PageWalk | null>}
|
|
424
422
|
*/
|
|
425
|
-
async
|
|
423
|
+
async #listWalk() {
|
|
426
424
|
return buildPageWalk({
|
|
427
425
|
firstUrl: toUrl({
|
|
428
|
-
serverUrl: this.
|
|
429
|
-
path: this
|
|
426
|
+
serverUrl: this.#context.serverUrl,
|
|
427
|
+
path: this.#itemsPath
|
|
430
428
|
}),
|
|
431
429
|
fetchPage: async (url) => {
|
|
432
|
-
const pageResponse = await send(this
|
|
430
|
+
const pageResponse = await send(this.#context, {
|
|
433
431
|
url,
|
|
434
432
|
method: 'GET',
|
|
435
|
-
capability: this
|
|
433
|
+
capability: this.#capability,
|
|
436
434
|
read: true
|
|
437
435
|
});
|
|
438
436
|
return dataOrNull(pageResponse);
|
|
@@ -450,7 +448,7 @@ export class Collection {
|
|
|
450
448
|
* @returns {Promise<CollectionResourcesList | null>}
|
|
451
449
|
*/
|
|
452
450
|
async list() {
|
|
453
|
-
return collectWalk(await this
|
|
451
|
+
return collectWalk(await this.#listWalk());
|
|
454
452
|
}
|
|
455
453
|
/**
|
|
456
454
|
* Lazily yields the listing one page at a time, following the server's `next`
|
|
@@ -463,7 +461,7 @@ export class Collection {
|
|
|
463
461
|
* @returns {AsyncGenerator<CollectionResourcesList>}
|
|
464
462
|
*/
|
|
465
463
|
async *listPages() {
|
|
466
|
-
yield* walkPagesOrEmpty(await this
|
|
464
|
+
yield* walkPagesOrEmpty(await this.#listWalk());
|
|
467
465
|
}
|
|
468
466
|
/**
|
|
469
467
|
* Lazily yields each item across every page, flattening `listPages()`. Yields
|
|
@@ -500,10 +498,10 @@ export class Collection {
|
|
|
500
498
|
*/
|
|
501
499
|
async changes(options = {}) {
|
|
502
500
|
const { checkpoint, limit } = options;
|
|
503
|
-
const response = await send(this
|
|
501
|
+
const response = await send(this.#context, {
|
|
504
502
|
path: collectionQuery(this.spaceId, this.id),
|
|
505
503
|
method: 'POST',
|
|
506
|
-
capability: this
|
|
504
|
+
capability: this.#capability,
|
|
507
505
|
json: {
|
|
508
506
|
profile: 'changes',
|
|
509
507
|
...(checkpoint !== undefined && { checkpoint }),
|
|
@@ -524,10 +522,10 @@ export class Collection {
|
|
|
524
522
|
* @returns {Promise<IDelegatedZcap>}
|
|
525
523
|
*/
|
|
526
524
|
async grant(options) {
|
|
527
|
-
return delegateGrantAt(this
|
|
528
|
-
path: this
|
|
525
|
+
return delegateGrantAt(this.#context, {
|
|
526
|
+
path: this.#path,
|
|
529
527
|
options,
|
|
530
|
-
capability: this
|
|
528
|
+
capability: this.#capability
|
|
531
529
|
});
|
|
532
530
|
}
|
|
533
531
|
/**
|
|
@@ -539,9 +537,9 @@ export class Collection {
|
|
|
539
537
|
* @returns {Promise<PolicyDocument | null>}
|
|
540
538
|
*/
|
|
541
539
|
async getPolicy() {
|
|
542
|
-
return readPolicy(this
|
|
543
|
-
policyPath: this
|
|
544
|
-
capability: this
|
|
540
|
+
return readPolicy(this.#context, {
|
|
541
|
+
policyPath: this.#policyPath,
|
|
542
|
+
capability: this.#capability
|
|
545
543
|
});
|
|
546
544
|
}
|
|
547
545
|
/**
|
|
@@ -551,10 +549,10 @@ export class Collection {
|
|
|
551
549
|
* @returns {Promise<void>}
|
|
552
550
|
*/
|
|
553
551
|
async setPolicy(policy) {
|
|
554
|
-
return writePolicy(this
|
|
555
|
-
policyPath: this
|
|
552
|
+
return writePolicy(this.#context, {
|
|
553
|
+
policyPath: this.#policyPath,
|
|
556
554
|
policy,
|
|
557
|
-
capability: this
|
|
555
|
+
capability: this.#capability
|
|
558
556
|
});
|
|
559
557
|
}
|
|
560
558
|
/**
|
|
@@ -563,9 +561,9 @@ export class Collection {
|
|
|
563
561
|
* @returns {Promise<boolean>}
|
|
564
562
|
*/
|
|
565
563
|
async isPublic() {
|
|
566
|
-
return isPublicPolicy(this
|
|
567
|
-
policyPath: this
|
|
568
|
-
capability: this
|
|
564
|
+
return isPublicPolicy(this.#context, {
|
|
565
|
+
policyPath: this.#policyPath,
|
|
566
|
+
capability: this.#capability
|
|
569
567
|
});
|
|
570
568
|
}
|
|
571
569
|
/**
|
|
@@ -576,9 +574,9 @@ export class Collection {
|
|
|
576
574
|
* @returns {Promise<void>}
|
|
577
575
|
*/
|
|
578
576
|
async setPublic() {
|
|
579
|
-
return setPublicPolicy(this
|
|
580
|
-
policyPath: this
|
|
581
|
-
capability: this
|
|
577
|
+
return setPublicPolicy(this.#context, {
|
|
578
|
+
policyPath: this.#policyPath,
|
|
579
|
+
capability: this.#capability
|
|
582
580
|
});
|
|
583
581
|
}
|
|
584
582
|
/**
|
|
@@ -588,9 +586,9 @@ export class Collection {
|
|
|
588
586
|
* @returns {Promise<void>}
|
|
589
587
|
*/
|
|
590
588
|
async clearPolicy() {
|
|
591
|
-
return deletePolicy(this
|
|
592
|
-
policyPath: this
|
|
593
|
-
capability: this
|
|
589
|
+
return deletePolicy(this.#context, {
|
|
590
|
+
policyPath: this.#policyPath,
|
|
591
|
+
capability: this.#capability
|
|
594
592
|
});
|
|
595
593
|
}
|
|
596
594
|
/**
|
|
@@ -600,9 +598,9 @@ export class Collection {
|
|
|
600
598
|
* @returns {Promise<LinkSet | null>}
|
|
601
599
|
*/
|
|
602
600
|
async linkset() {
|
|
603
|
-
return readData(this
|
|
601
|
+
return readData(this.#context, {
|
|
604
602
|
path: collectionLinkset(this.spaceId, this.id),
|
|
605
|
-
capability: this
|
|
603
|
+
capability: this.#capability
|
|
606
604
|
});
|
|
607
605
|
}
|
|
608
606
|
/**
|
|
@@ -621,9 +619,9 @@ export class Collection {
|
|
|
621
619
|
* @returns {Promise<BackendDescriptor | null>}
|
|
622
620
|
*/
|
|
623
621
|
async backend() {
|
|
624
|
-
return readData(this
|
|
622
|
+
return readData(this.#context, {
|
|
625
623
|
path: collectionBackend(this.spaceId, this.id),
|
|
626
|
-
capability: this
|
|
624
|
+
capability: this.#capability
|
|
627
625
|
});
|
|
628
626
|
}
|
|
629
627
|
/**
|
|
@@ -635,9 +633,9 @@ export class Collection {
|
|
|
635
633
|
* @returns {Promise<BackendUsage | null>}
|
|
636
634
|
*/
|
|
637
635
|
async quota() {
|
|
638
|
-
return readData(this
|
|
636
|
+
return readData(this.#context, {
|
|
639
637
|
path: collectionQuota(this.spaceId, this.id),
|
|
640
|
-
capability: this
|
|
638
|
+
capability: this.#capability
|
|
641
639
|
});
|
|
642
640
|
}
|
|
643
641
|
}
|
package/dist/Collection.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Collection.js","sourceRoot":"","sources":["../src/Collection.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;GAIG;AACH,OAAO,EACL,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EACf,eAAe,EACf,YAAY,EACZ,KAAK,EACN,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAErD,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AACtD,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAA;AAE3D,OAAO,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAA;AAElE,OAAO,EACL,aAAa,EACb,WAAW,EACX,SAAS,EACT,gBAAgB,EACjB,MAAM,0BAA0B,CAAA;AAEjC,OAAO,EACL,kBAAkB,EAClB,0BAA0B,EAC1B,0BAA0B,EAC3B,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EACL,mBAAmB,EACnB,QAAQ,EACR,YAAY,EACb,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AACtD,OAAO,EACL,UAAU,EACV,WAAW,EACX,YAAY,EACZ,cAAc,EACd,eAAe,E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