was-teaching-server 0.9.1 → 0.11.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/CHANGELOG.md +118 -1
- package/README.md +23 -11
- package/dist/backends/filesystem.d.ts +247 -4
- package/dist/backends/filesystem.d.ts.map +1 -1
- package/dist/backends/filesystem.js +711 -81
- package/dist/backends/filesystem.js.map +1 -1
- package/dist/backends/postgres.d.ts +240 -2
- package/dist/backends/postgres.d.ts.map +1 -1
- package/dist/backends/postgres.js +800 -42
- package/dist/backends/postgres.js.map +1 -1
- package/dist/backends/postgresSchema.d.ts.map +1 -1
- package/dist/backends/postgresSchema.js +69 -57
- package/dist/backends/postgresSchema.js.map +1 -1
- package/dist/errors.d.ts +26 -9
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +40 -12
- package/dist/errors.js.map +1 -1
- package/dist/lib/equalityIndex.d.ts +334 -0
- package/dist/lib/equalityIndex.d.ts.map +1 -0
- package/dist/lib/equalityIndex.js +552 -0
- package/dist/lib/equalityIndex.js.map +1 -0
- package/dist/lib/exportManifest.d.ts +9 -0
- package/dist/lib/exportManifest.d.ts.map +1 -1
- package/dist/lib/exportManifest.js +9 -0
- package/dist/lib/exportManifest.js.map +1 -1
- package/dist/lib/importTar.d.ts +18 -2
- package/dist/lib/importTar.d.ts.map +1 -1
- package/dist/lib/importTar.js +77 -4
- package/dist/lib/importTar.js.map +1 -1
- package/dist/lib/paths.d.ts +33 -0
- package/dist/lib/paths.d.ts.map +1 -1
- package/dist/lib/paths.js +28 -0
- package/dist/lib/paths.js.map +1 -1
- package/dist/lib/resourceFileName.d.ts +43 -0
- package/dist/lib/resourceFileName.d.ts.map +1 -1
- package/dist/lib/resourceFileName.js +63 -0
- package/dist/lib/resourceFileName.js.map +1 -1
- package/dist/plugin.d.ts.map +1 -1
- package/dist/plugin.js +5 -2
- package/dist/plugin.js.map +1 -1
- package/dist/requests/ChunkRequest.d.ts +104 -0
- package/dist/requests/ChunkRequest.d.ts.map +1 -0
- package/dist/requests/ChunkRequest.js +396 -0
- package/dist/requests/ChunkRequest.js.map +1 -0
- package/dist/requests/CollectionRequest.d.ts +22 -5
- package/dist/requests/CollectionRequest.d.ts.map +1 -1
- package/dist/requests/CollectionRequest.js +192 -11
- package/dist/requests/CollectionRequest.js.map +1 -1
- package/dist/requests/ResourceRequest.d.ts.map +1 -1
- package/dist/requests/ResourceRequest.js +20 -0
- package/dist/requests/ResourceRequest.js.map +1 -1
- package/dist/requests/SpaceRequest.d.ts +1 -0
- package/dist/requests/SpaceRequest.d.ts.map +1 -1
- package/dist/requests/SpaceRequest.js +21 -1
- package/dist/requests/SpaceRequest.js.map +1 -1
- package/dist/routes.d.ts.map +1 -1
- package/dist/routes.js +21 -0
- package/dist/routes.js.map +1 -1
- package/dist/types.d.ts +165 -2
- package/dist/types.d.ts.map +1 -1
- package/package.json +19 -18
- package/src/backends/filesystem.ts +924 -75
- package/src/backends/postgres.ts +1114 -32
- package/src/backends/postgresSchema.ts +69 -57
- package/src/errors.ts +44 -12
- package/src/lib/equalityIndex.ts +769 -0
- package/src/lib/importTar.ts +107 -4
- package/src/lib/paths.ts +48 -0
- package/src/lib/resourceFileName.ts +69 -0
- package/src/plugin.ts +5 -2
- package/src/requests/ChunkRequest.ts +478 -0
- package/src/requests/CollectionRequest.ts +221 -12
- package/src/requests/ResourceRequest.ts +20 -0
- package/src/requests/SpaceRequest.ts +25 -1
- package/src/routes.ts +46 -0
- package/src/types.ts +175 -1
|
@@ -0,0 +1,396 @@
|
|
|
1
|
+
import { fetchSpaceAndAuthorize, fetchSpaceAndVerify } from './spaceContext.js';
|
|
2
|
+
import { getCollectionOrThrow } from './collectionContext.js';
|
|
3
|
+
import { resolveResourceInput } from './resourceInput.js';
|
|
4
|
+
import { resolveBackend } from '../lib/backendRegistry.js';
|
|
5
|
+
import { assertValidIds } from '../lib/validateId.js';
|
|
6
|
+
import { parseChunkIndexSegment } from '../lib/resourceFileName.js';
|
|
7
|
+
import { chunkPath, chunksContainerPath } from '../lib/paths.js';
|
|
8
|
+
import { formatEtag, parseWritePreconditions } from '../lib/etag.js';
|
|
9
|
+
import { InvalidChunkIndexError, ResourceNotFoundError, rethrowOrWrapStorageError } from '../errors.js';
|
|
10
|
+
/**
|
|
11
|
+
* Parses and validates the `:chunkIndex` path param -- the canonical decimal
|
|
12
|
+
* spelling of an integer in `[0, MAX_CHUNK_INDEX]` (see
|
|
13
|
+
* `parseChunkIndexSegment`) -- throwing `InvalidChunkIndexError` (400)
|
|
14
|
+
* otherwise. Runs before any storage access, like `assertValidIds`.
|
|
15
|
+
* @param raw {string} the `:chunkIndex` path param
|
|
16
|
+
* @param options {object}
|
|
17
|
+
* @param options.requestName {string} request name used in the error title
|
|
18
|
+
* @returns {number}
|
|
19
|
+
*/
|
|
20
|
+
function parseChunkIndex(raw, { requestName }) {
|
|
21
|
+
const chunkIndex = parseChunkIndexSegment(raw);
|
|
22
|
+
if (chunkIndex === undefined) {
|
|
23
|
+
throw new InvalidChunkIndexError({ requestName });
|
|
24
|
+
}
|
|
25
|
+
return chunkIndex;
|
|
26
|
+
}
|
|
27
|
+
export class ChunkRequest {
|
|
28
|
+
/**
|
|
29
|
+
* PUT /space/:spaceId/:collectionId/:resourceId/chunks/:chunkIndex
|
|
30
|
+
* Request handler for "Put Chunk": stores chunk `chunkIndex` of the Resource
|
|
31
|
+
* (raw bytes body, upsert). The parent Resource MUST already exist (404
|
|
32
|
+
* otherwise -- chunks cannot be orphaned). Authorization is capability-only
|
|
33
|
+
* against the chunk's own full URL, the same exact-match zcap target rule as
|
|
34
|
+
* every other route. Supports `If-Match` / `If-None-Match` on the chunk's
|
|
35
|
+
* own ETag, and the backend's `maxUploadBytes` cap (413). Returns 204 with
|
|
36
|
+
* the chunk's new ETag.
|
|
37
|
+
*
|
|
38
|
+
* @param request {import('fastify').FastifyRequest}
|
|
39
|
+
* @param reply {import('fastify').FastifyReply}
|
|
40
|
+
* @returns {Promise<FastifyReply>}
|
|
41
|
+
*/
|
|
42
|
+
static async put(request, reply) {
|
|
43
|
+
const { params: { spaceId, collectionId, resourceId } } = request;
|
|
44
|
+
const { storage } = request.server;
|
|
45
|
+
const requestName = 'Put Chunk';
|
|
46
|
+
// Reject path-traversal / non-URL-safe ids before any storage access.
|
|
47
|
+
assertValidIds({ spaceId, collectionId, resourceId }, { requestName });
|
|
48
|
+
const chunkIndex = parseChunkIndex(request.params.chunkIndex, {
|
|
49
|
+
requestName
|
|
50
|
+
});
|
|
51
|
+
// Verify (capability-only): writing a chunk requires a valid capability
|
|
52
|
+
// invocation against the chunk's own URL; no access-control-policy fallback.
|
|
53
|
+
await fetchSpaceAndVerify({
|
|
54
|
+
request,
|
|
55
|
+
spaceId,
|
|
56
|
+
targetPath: chunkPath({ spaceId, collectionId, resourceId, chunkIndex }),
|
|
57
|
+
requestName
|
|
58
|
+
});
|
|
59
|
+
// zCap checks out, continue
|
|
60
|
+
// Fetch collection by id
|
|
61
|
+
const collectionDescription = await getCollectionOrThrow({
|
|
62
|
+
storage,
|
|
63
|
+
spaceId,
|
|
64
|
+
collectionId,
|
|
65
|
+
requestName
|
|
66
|
+
});
|
|
67
|
+
// Route chunk bytes to the Collection's selected (data-plane) backend.
|
|
68
|
+
const dataBackend = await resolveBackend({
|
|
69
|
+
request,
|
|
70
|
+
spaceId,
|
|
71
|
+
collectionId,
|
|
72
|
+
collectionDescription
|
|
73
|
+
});
|
|
74
|
+
const input = await resolveResourceInput(request, dataBackend);
|
|
75
|
+
// Surface any `If-Match` / `If-None-Match` write precondition to the
|
|
76
|
+
// storage layer, which evaluates it against the chunk's own version
|
|
77
|
+
// atomically with the write (412 `precondition-failed` on a mismatch).
|
|
78
|
+
let written;
|
|
79
|
+
try {
|
|
80
|
+
written = await dataBackend.writeChunk({
|
|
81
|
+
spaceId,
|
|
82
|
+
collectionId,
|
|
83
|
+
resourceId,
|
|
84
|
+
chunkIndex,
|
|
85
|
+
input,
|
|
86
|
+
...parseWritePreconditions(request.headers)
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
catch (err) {
|
|
90
|
+
rethrowOrWrapStorageError({ err, requestName });
|
|
91
|
+
}
|
|
92
|
+
// Return the new ETag so a client can chain a subsequent conditional write.
|
|
93
|
+
return reply.status(204).header('etag', formatEtag(written.version)).send();
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* GET /space/:spaceId/:collectionId/:resourceId/chunks/:chunkIndex
|
|
97
|
+
* Request handler for "Get Chunk": streams the chunk's stored bytes.
|
|
98
|
+
* Authorization is capability-or-policy (the same read decision as Get
|
|
99
|
+
* Resource, resolved at the Resource's policy level -- a chunk reveals a
|
|
100
|
+
* fragment of the same content).
|
|
101
|
+
*
|
|
102
|
+
* @param request {import('fastify').FastifyRequest}
|
|
103
|
+
* @param reply {import('fastify').FastifyReply}
|
|
104
|
+
* @returns {Promise<FastifyReply>}
|
|
105
|
+
*/
|
|
106
|
+
static async get(request, reply) {
|
|
107
|
+
const { params: { spaceId, collectionId, resourceId } } = request;
|
|
108
|
+
const { storage } = request.server;
|
|
109
|
+
const requestName = 'Get Chunk';
|
|
110
|
+
// Reject path-traversal / non-URL-safe ids before any storage access.
|
|
111
|
+
assertValidIds({ spaceId, collectionId, resourceId }, { requestName });
|
|
112
|
+
const chunkIndex = parseChunkIndex(request.params.chunkIndex, {
|
|
113
|
+
requestName
|
|
114
|
+
});
|
|
115
|
+
// Authorize (capability-or-policy) against the chunk's own URL; the policy
|
|
116
|
+
// level resolves at the parent Resource, as for Get Resource.
|
|
117
|
+
await fetchSpaceAndAuthorize({
|
|
118
|
+
request,
|
|
119
|
+
spaceId,
|
|
120
|
+
collectionId,
|
|
121
|
+
resourceId,
|
|
122
|
+
targetPath: chunkPath({ spaceId, collectionId, resourceId, chunkIndex }),
|
|
123
|
+
requestName
|
|
124
|
+
});
|
|
125
|
+
// authorized, continue
|
|
126
|
+
// Fetch collection by id
|
|
127
|
+
const collectionDescription = await getCollectionOrThrow({
|
|
128
|
+
storage,
|
|
129
|
+
spaceId,
|
|
130
|
+
collectionId,
|
|
131
|
+
requestName
|
|
132
|
+
});
|
|
133
|
+
// Read the bytes from the Collection's selected (data-plane) backend.
|
|
134
|
+
const dataBackend = await resolveBackend({
|
|
135
|
+
request,
|
|
136
|
+
spaceId,
|
|
137
|
+
collectionId,
|
|
138
|
+
collectionDescription
|
|
139
|
+
});
|
|
140
|
+
let result;
|
|
141
|
+
try {
|
|
142
|
+
// The parent Resource must exist (and not be a tombstone) for any of
|
|
143
|
+
// its chunks to be readable: an orphan chunk left behind by
|
|
144
|
+
// out-of-band state 404s here exactly like the Resource route and the
|
|
145
|
+
// chunk listing do -- checked via its metadata, never its byte stream.
|
|
146
|
+
const parent = await dataBackend.getResourceMetadata({
|
|
147
|
+
spaceId,
|
|
148
|
+
collectionId,
|
|
149
|
+
resourceId
|
|
150
|
+
});
|
|
151
|
+
if (!parent) {
|
|
152
|
+
throw new ResourceNotFoundError({ requestName });
|
|
153
|
+
}
|
|
154
|
+
result = await dataBackend.getChunk({
|
|
155
|
+
spaceId,
|
|
156
|
+
collectionId,
|
|
157
|
+
resourceId,
|
|
158
|
+
chunkIndex
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
catch (err) {
|
|
162
|
+
rethrowOrWrapStorageError({ err, requestName });
|
|
163
|
+
}
|
|
164
|
+
const getReply = reply.status(200).type(result.storedResourceType);
|
|
165
|
+
if (result.version !== undefined) {
|
|
166
|
+
getReply.header('etag', formatEtag(result.version));
|
|
167
|
+
}
|
|
168
|
+
return getReply.send(result.resourceStream);
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* HEAD /space/:spaceId/:collectionId/:resourceId/chunks/:chunkIndex
|
|
172
|
+
* Request handler for "Head Chunk": the same authorization as Get Chunk with
|
|
173
|
+
* no response body; `Content-Type` / `Content-Length` come from the chunk's
|
|
174
|
+
* stored metadata, so the byte stream is never opened (mirrors Head
|
|
175
|
+
* Resource). Registered explicitly ahead of the GET route for the same
|
|
176
|
+
* reason Head Resource is.
|
|
177
|
+
*
|
|
178
|
+
* @param request {import('fastify').FastifyRequest}
|
|
179
|
+
* @param reply {import('fastify').FastifyReply}
|
|
180
|
+
* @returns {Promise<FastifyReply>}
|
|
181
|
+
*/
|
|
182
|
+
static async head(request, reply) {
|
|
183
|
+
const { params: { spaceId, collectionId, resourceId } } = request;
|
|
184
|
+
const { storage } = request.server;
|
|
185
|
+
const requestName = 'Head Chunk';
|
|
186
|
+
// Reject path-traversal / non-URL-safe ids before any storage access.
|
|
187
|
+
assertValidIds({ spaceId, collectionId, resourceId }, { requestName });
|
|
188
|
+
const chunkIndex = parseChunkIndex(request.params.chunkIndex, {
|
|
189
|
+
requestName
|
|
190
|
+
});
|
|
191
|
+
// Authorize (capability-or-policy): the same read decision as Get Chunk,
|
|
192
|
+
// against the same target (a HEAD reveals nothing a GET would not).
|
|
193
|
+
await fetchSpaceAndAuthorize({
|
|
194
|
+
request,
|
|
195
|
+
spaceId,
|
|
196
|
+
collectionId,
|
|
197
|
+
resourceId,
|
|
198
|
+
targetPath: chunkPath({ spaceId, collectionId, resourceId, chunkIndex }),
|
|
199
|
+
requestName
|
|
200
|
+
});
|
|
201
|
+
// authorized, continue
|
|
202
|
+
// Fetch collection by id
|
|
203
|
+
const collectionDescription = await getCollectionOrThrow({
|
|
204
|
+
storage,
|
|
205
|
+
spaceId,
|
|
206
|
+
collectionId,
|
|
207
|
+
requestName
|
|
208
|
+
});
|
|
209
|
+
// Read chunk metadata from the Collection's selected (data-plane) backend.
|
|
210
|
+
const dataBackend = await resolveBackend({
|
|
211
|
+
request,
|
|
212
|
+
spaceId,
|
|
213
|
+
collectionId,
|
|
214
|
+
collectionDescription
|
|
215
|
+
});
|
|
216
|
+
let metadata;
|
|
217
|
+
try {
|
|
218
|
+
// The same parent-Resource existence gate as Get Chunk: an orphan
|
|
219
|
+
// chunk's headers reveal what a GET would.
|
|
220
|
+
const parent = await dataBackend.getResourceMetadata({
|
|
221
|
+
spaceId,
|
|
222
|
+
collectionId,
|
|
223
|
+
resourceId
|
|
224
|
+
});
|
|
225
|
+
if (!parent) {
|
|
226
|
+
throw new ResourceNotFoundError({ requestName });
|
|
227
|
+
}
|
|
228
|
+
metadata = await dataBackend.getChunkMetadata({
|
|
229
|
+
spaceId,
|
|
230
|
+
collectionId,
|
|
231
|
+
resourceId,
|
|
232
|
+
chunkIndex
|
|
233
|
+
});
|
|
234
|
+
}
|
|
235
|
+
catch (err) {
|
|
236
|
+
rethrowOrWrapStorageError({ err, requestName });
|
|
237
|
+
}
|
|
238
|
+
if (!metadata) {
|
|
239
|
+
throw new ResourceNotFoundError({ requestName });
|
|
240
|
+
}
|
|
241
|
+
// Set the payload headers a GET would send, but send no body.
|
|
242
|
+
const headReply = reply
|
|
243
|
+
.status(200)
|
|
244
|
+
.type(metadata.contentType)
|
|
245
|
+
.header('content-length', metadata.size);
|
|
246
|
+
if (metadata.version !== undefined) {
|
|
247
|
+
headReply.header('etag', formatEtag(metadata.version));
|
|
248
|
+
}
|
|
249
|
+
return headReply.send();
|
|
250
|
+
}
|
|
251
|
+
/**
|
|
252
|
+
* DELETE /space/:spaceId/:collectionId/:resourceId/chunks/:chunkIndex
|
|
253
|
+
* Request handler for "Delete Chunk": removes one stored chunk. Unlike
|
|
254
|
+
* Delete Resource, deleting an absent chunk is a 404 (mirroring the EDV
|
|
255
|
+
* chunk contract -- a reassembling reader must be able to distinguish "gone"
|
|
256
|
+
* from "never written"). Authorization is capability-only against the
|
|
257
|
+
* chunk's own URL. Supports `If-Match` (412 on mismatch). Returns 204.
|
|
258
|
+
*
|
|
259
|
+
* @param request {import('fastify').FastifyRequest}
|
|
260
|
+
* @param reply {import('fastify').FastifyReply}
|
|
261
|
+
* @returns {Promise<FastifyReply>}
|
|
262
|
+
*/
|
|
263
|
+
static async delete(request, reply) {
|
|
264
|
+
const { params: { spaceId, collectionId, resourceId } } = request;
|
|
265
|
+
const { storage } = request.server;
|
|
266
|
+
const requestName = 'Delete Chunk';
|
|
267
|
+
// Reject path-traversal / non-URL-safe ids before any storage access.
|
|
268
|
+
assertValidIds({ spaceId, collectionId, resourceId }, { requestName });
|
|
269
|
+
const chunkIndex = parseChunkIndex(request.params.chunkIndex, {
|
|
270
|
+
requestName
|
|
271
|
+
});
|
|
272
|
+
// Verify (capability-only): deleting a chunk requires a valid capability
|
|
273
|
+
// invocation; no access-control-policy fallback.
|
|
274
|
+
await fetchSpaceAndVerify({
|
|
275
|
+
request,
|
|
276
|
+
spaceId,
|
|
277
|
+
targetPath: chunkPath({ spaceId, collectionId, resourceId, chunkIndex }),
|
|
278
|
+
requestName
|
|
279
|
+
});
|
|
280
|
+
// Fetch collection by id
|
|
281
|
+
const collectionDescription = await getCollectionOrThrow({
|
|
282
|
+
storage,
|
|
283
|
+
spaceId,
|
|
284
|
+
collectionId,
|
|
285
|
+
requestName
|
|
286
|
+
});
|
|
287
|
+
// zCap checks out, continue. An `If-Match` precondition is evaluated by
|
|
288
|
+
// the storage layer atomically with the removal (412 on mismatch).
|
|
289
|
+
const { ifMatch } = parseWritePreconditions(request.headers);
|
|
290
|
+
const dataBackend = await resolveBackend({
|
|
291
|
+
request,
|
|
292
|
+
spaceId,
|
|
293
|
+
collectionId,
|
|
294
|
+
collectionDescription
|
|
295
|
+
});
|
|
296
|
+
let removed;
|
|
297
|
+
try {
|
|
298
|
+
// The same parent-Resource existence gate as the read handlers: a
|
|
299
|
+
// chunk of an absent (or tombstoned) parent is a 404, not a deletable
|
|
300
|
+
// orphan.
|
|
301
|
+
const parent = await dataBackend.getResourceMetadata({
|
|
302
|
+
spaceId,
|
|
303
|
+
collectionId,
|
|
304
|
+
resourceId
|
|
305
|
+
});
|
|
306
|
+
if (!parent) {
|
|
307
|
+
throw new ResourceNotFoundError({ requestName });
|
|
308
|
+
}
|
|
309
|
+
removed = await dataBackend.deleteChunk({
|
|
310
|
+
spaceId,
|
|
311
|
+
collectionId,
|
|
312
|
+
resourceId,
|
|
313
|
+
chunkIndex,
|
|
314
|
+
ifMatch
|
|
315
|
+
});
|
|
316
|
+
}
|
|
317
|
+
catch (err) {
|
|
318
|
+
rethrowOrWrapStorageError({ err, requestName });
|
|
319
|
+
}
|
|
320
|
+
if (!removed) {
|
|
321
|
+
throw new ResourceNotFoundError({ requestName });
|
|
322
|
+
}
|
|
323
|
+
return reply.status(204).send();
|
|
324
|
+
}
|
|
325
|
+
/**
|
|
326
|
+
* GET /space/:spaceId/:collectionId/:resourceId/chunks/
|
|
327
|
+
* Request handler for "List Chunks": the discovery/reassembly listing. The
|
|
328
|
+
* server never reassembles a chunked Resource -- a reader learns the chunk
|
|
329
|
+
* set here (count + per-chunk index/size/contentType/version) and fetches
|
|
330
|
+
* `0..count-1` itself. Requires the parent Resource to exist (404
|
|
331
|
+
* otherwise). Authorization is capability-or-policy against the `chunks/`
|
|
332
|
+
* container path, resolved at the Resource's policy level.
|
|
333
|
+
*
|
|
334
|
+
* @param request {import('fastify').FastifyRequest}
|
|
335
|
+
* @param reply {import('fastify').FastifyReply}
|
|
336
|
+
* @returns {Promise<FastifyReply>}
|
|
337
|
+
*/
|
|
338
|
+
static async list(request, reply) {
|
|
339
|
+
const { params: { spaceId, collectionId, resourceId } } = request;
|
|
340
|
+
const { storage } = request.server;
|
|
341
|
+
const requestName = 'List Chunks';
|
|
342
|
+
// Reject path-traversal / non-URL-safe ids before any storage access.
|
|
343
|
+
assertValidIds({ spaceId, collectionId, resourceId }, { requestName });
|
|
344
|
+
// Authorize (capability-or-policy) against the `chunks/` container path;
|
|
345
|
+
// the policy level resolves at the parent Resource.
|
|
346
|
+
await fetchSpaceAndAuthorize({
|
|
347
|
+
request,
|
|
348
|
+
spaceId,
|
|
349
|
+
collectionId,
|
|
350
|
+
resourceId,
|
|
351
|
+
targetPath: chunksContainerPath({ spaceId, collectionId, resourceId }),
|
|
352
|
+
requestName
|
|
353
|
+
});
|
|
354
|
+
// authorized, continue
|
|
355
|
+
// Fetch collection by id
|
|
356
|
+
const collectionDescription = await getCollectionOrThrow({
|
|
357
|
+
storage,
|
|
358
|
+
spaceId,
|
|
359
|
+
collectionId,
|
|
360
|
+
requestName
|
|
361
|
+
});
|
|
362
|
+
// List from the Collection's selected (data-plane) backend. The parent
|
|
363
|
+
// Resource must exist for its chunk listing to (an absent Resource has no
|
|
364
|
+
// `chunks/` container) -- checked via its metadata, never its byte stream.
|
|
365
|
+
const dataBackend = await resolveBackend({
|
|
366
|
+
request,
|
|
367
|
+
spaceId,
|
|
368
|
+
collectionId,
|
|
369
|
+
collectionDescription
|
|
370
|
+
});
|
|
371
|
+
let listing;
|
|
372
|
+
try {
|
|
373
|
+
const parent = await dataBackend.getResourceMetadata({
|
|
374
|
+
spaceId,
|
|
375
|
+
collectionId,
|
|
376
|
+
resourceId
|
|
377
|
+
});
|
|
378
|
+
if (!parent) {
|
|
379
|
+
throw new ResourceNotFoundError({ requestName });
|
|
380
|
+
}
|
|
381
|
+
listing = await dataBackend.listChunks({
|
|
382
|
+
spaceId,
|
|
383
|
+
collectionId,
|
|
384
|
+
resourceId
|
|
385
|
+
});
|
|
386
|
+
}
|
|
387
|
+
catch (err) {
|
|
388
|
+
rethrowOrWrapStorageError({ err, requestName });
|
|
389
|
+
}
|
|
390
|
+
return reply
|
|
391
|
+
.status(200)
|
|
392
|
+
.type('application/json')
|
|
393
|
+
.send(JSON.stringify({ resourceId, ...listing }));
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
//# sourceMappingURL=ChunkRequest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChunkRequest.js","sourceRoot":"","sources":["../../src/requests/ChunkRequest.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AAC/E,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAC7D,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAA;AACzD,OAAO,EAAE,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,CAAC,CAAA;QAEF,uEAAuE;QACvE,0EAA0E;QAC1E,2EAA2E;QAC3E,MAAM,WAAW,GAAG,MAAM,cAAc,CAAC;YACvC,OAAO;YACP,OAAO;YACP,YAAY;YACZ,qBAAqB;SACtB,CAAC,CAAA;QACF,IAAI,OAAO,CAAA;QACX,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,WAAW,CAAC,mBAAmB,CAAC;gBACnD,OAAO;gBACP,YAAY;gBACZ,UAAU;aACX,CAAC,CAAA;YACF,IAAI,CAAC,MAAM,EAAE,CAAC;gBACZ,MAAM,IAAI,qBAAqB,CAAC,EAAE,WAAW,EAAE,CAAC,CAAA;YAClD,CAAC;YACD,OAAO,GAAG,MAAM,WAAW,CAAC,UAAU,CAAC;gBACrC,OAAO;gBACP,YAAY;gBACZ,UAAU;aACX,CAAC,CAAA;QACJ,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,yBAAyB,CAAC,EAAE,GAAG,EAAE,WAAW,EAAE,CAAC,CAAA;QACjD,CAAC;QAED,OAAO,KAAK;aACT,MAAM,CAAC,GAAG,CAAC;aACX,IAAI,CAAC,kBAAkB,CAAC;aACxB,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,UAAU,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC,CAAA;IACrD,CAAC;CACF"}
|
|
@@ -45,6 +45,7 @@ export declare class CollectionRequest {
|
|
|
45
45
|
name?: string;
|
|
46
46
|
backend?: unknown;
|
|
47
47
|
encryption?: unknown;
|
|
48
|
+
indexes?: unknown;
|
|
48
49
|
};
|
|
49
50
|
}>, reply: FastifyReply): Promise<FastifyReply>;
|
|
50
51
|
/**
|
|
@@ -135,6 +136,12 @@ export declare class CollectionRequest {
|
|
|
135
136
|
* the Collection's stored documents, answering `{documents, hasMore,
|
|
136
137
|
* cursor?}` (matching documents verbatim, opaque-cursor paginated) or
|
|
137
138
|
* `{count}`.
|
|
139
|
+
* - `equality` -- the plaintext equality query (the `equality-query` backend
|
|
140
|
+
* feature): `{equals | has, count, limit, cursor}` evaluated against the
|
|
141
|
+
* attributes the server extracts from the Collection's Resources per its
|
|
142
|
+
* declared `indexes`, answering `{documents, hasMore, cursor?}` (each
|
|
143
|
+
* document `{id, data?, custom?}`) or `{count}`. Only plaintext Collections
|
|
144
|
+
* serve it; an encrypted Collection answers `unsupported-operation` (501).
|
|
138
145
|
*
|
|
139
146
|
* The query parameters ride the signed JSON POST body (covered by the
|
|
140
147
|
* `Digest`), so no `allowTargetQuery` is needed. A body naming any other
|
|
@@ -214,7 +221,20 @@ export declare class CollectionRequest {
|
|
|
214
221
|
}>, reply: FastifyReply): Promise<FastifyReply>;
|
|
215
222
|
/**
|
|
216
223
|
* GET /space/:spaceId/:collectionId/ (with trailing slash):
|
|
217
|
-
* List Collection items
|
|
224
|
+
* List Collection items.
|
|
225
|
+
*
|
|
226
|
+
* With one or more `filter[<attr>]=<value>` query parameters this becomes the
|
|
227
|
+
* anonymous-cacheable entry point over the same equality machinery as the
|
|
228
|
+
* POST `equality` query profile: the filters map to a single-element `equals`
|
|
229
|
+
* conjunction (string-valued equality only) and the handler answers the same
|
|
230
|
+
* `{documents, hasMore, cursor?}` page. Authorization is the ordinary
|
|
231
|
+
* capability-or-policy GET path (a `PublicCanRead` Collection answers a filter
|
|
232
|
+
* query anonymously, so an HTTP cache can serve it); `allowTargetQuery`
|
|
233
|
+
* already tolerates the query string. Every filter attribute MUST be declared
|
|
234
|
+
* in the Collection's `indexes` (fail-closed 400, which also covers encrypted
|
|
235
|
+
* Collections -- they can never declare `indexes`); the data-plane backend
|
|
236
|
+
* MUST serve `queryByEquality` (else 501). With no `filter[...]` parameter the
|
|
237
|
+
* existing listing behavior is unchanged.
|
|
218
238
|
*
|
|
219
239
|
* @param request {import('fastify').FastifyRequest}
|
|
220
240
|
* @param reply {import('fastify').FastifyReply}
|
|
@@ -225,10 +245,7 @@ export declare class CollectionRequest {
|
|
|
225
245
|
spaceId: string;
|
|
226
246
|
collectionId: string;
|
|
227
247
|
};
|
|
228
|
-
Querystring:
|
|
229
|
-
limit?: string;
|
|
230
|
-
cursor?: string;
|
|
231
|
-
};
|
|
248
|
+
Querystring: Record<string, string | string[] | undefined>;
|
|
232
249
|
}>, reply: FastifyReply): Promise<FastifyReply>;
|
|
233
250
|
}
|
|
234
251
|
//# sourceMappingURL=CollectionRequest.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CollectionRequest.d.ts","sourceRoot":"","sources":["../../src/requests/CollectionRequest.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAU3D,OAAO,KAAK,EAAyB,cAAc,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"CollectionRequest.d.ts","sourceRoot":"","sources":["../../src/requests/CollectionRequest.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAU3D,OAAO,KAAK,EAAyB,cAAc,EAAE,MAAM,aAAa,CAAA;AAyExE,qBAAa,iBAAiB;IAC5B;;;;;;;;;;;OAWG;WACU,IAAI,CACf,OAAO,EAAE,cAAc,CAAC;QACtB,MAAM,EAAE;YAAE,OAAO,EAAE,MAAM,CAAC;YAAC,YAAY,EAAE,MAAM,CAAA;SAAE,CAAA;KAClD,CAAC,EACF,KAAK,EAAE,YAAY,GAClB,OAAO,CAAC,YAAY,CAAC;IAuGxB;;;;;;;;;;;OAWG;WACU,GAAG,CACd,OAAO,EAAE,cAAc,CAAC;QACtB,MAAM,EAAE;YAAE,OAAO,EAAE,MAAM,CAAC;YAAC,YAAY,EAAE,MAAM,CAAA;SAAE,CAAA;QACjD,IAAI,EAAE;YACJ,EAAE,CAAC,EAAE,MAAM,CAAA;YACX,IAAI,CAAC,EAAE,MAAM,CAAA;YACb,OAAO,CAAC,EAAE,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