@interop/was-client 0.15.0 → 0.16.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.
Files changed (83) hide show
  1. package/dist/Collection.d.ts +17 -26
  2. package/dist/Collection.d.ts.map +1 -1
  3. package/dist/Collection.js +60 -59
  4. package/dist/Collection.js.map +1 -1
  5. package/dist/Resource.d.ts +27 -3
  6. package/dist/Resource.d.ts.map +1 -1
  7. package/dist/Resource.js +60 -22
  8. package/dist/Resource.js.map +1 -1
  9. package/dist/Space.d.ts.map +1 -1
  10. package/dist/Space.js +19 -11
  11. package/dist/Space.js.map +1 -1
  12. package/dist/WasClient.d.ts.map +1 -1
  13. package/dist/WasClient.js +4 -13
  14. package/dist/WasClient.js.map +1 -1
  15. package/dist/edv/EdvCodec.d.ts +11 -2
  16. package/dist/edv/EdvCodec.d.ts.map +1 -1
  17. package/dist/edv/EdvCodec.js +79 -67
  18. package/dist/edv/EdvCodec.js.map +1 -1
  19. package/dist/edv/WasTransport.d.ts +23 -44
  20. package/dist/edv/WasTransport.d.ts.map +1 -1
  21. package/dist/edv/WasTransport.js +109 -155
  22. package/dist/edv/WasTransport.js.map +1 -1
  23. package/dist/edv/constants.d.ts +0 -14
  24. package/dist/edv/constants.d.ts.map +1 -1
  25. package/dist/edv/constants.js +4 -8
  26. package/dist/edv/constants.js.map +1 -1
  27. package/dist/edv/epochCrypto.d.ts +1 -1
  28. package/dist/edv/epochCrypto.d.ts.map +1 -1
  29. package/dist/edv/epochCrypto.js +33 -4
  30. package/dist/edv/epochCrypto.js.map +1 -1
  31. package/dist/edv/epochKeys.js +11 -1
  32. package/dist/edv/epochKeys.js.map +1 -1
  33. package/dist/edv/recipients.d.ts +5 -1
  34. package/dist/edv/recipients.d.ts.map +1 -1
  35. package/dist/edv/recipients.js +38 -16
  36. package/dist/edv/recipients.js.map +1 -1
  37. package/dist/index.d.ts +1 -1
  38. package/dist/index.d.ts.map +1 -1
  39. package/dist/internal/codec.d.ts +19 -0
  40. package/dist/internal/codec.d.ts.map +1 -1
  41. package/dist/internal/codec.js +26 -8
  42. package/dist/internal/codec.js.map +1 -1
  43. package/dist/internal/conditional.d.ts +11 -0
  44. package/dist/internal/conditional.d.ts.map +1 -1
  45. package/dist/internal/conditional.js +12 -0
  46. package/dist/internal/conditional.js.map +1 -1
  47. package/dist/internal/content.d.ts +7 -0
  48. package/dist/internal/content.d.ts.map +1 -1
  49. package/dist/internal/content.js +5 -3
  50. package/dist/internal/content.js.map +1 -1
  51. package/dist/internal/describe.d.ts +49 -1
  52. package/dist/internal/describe.d.ts.map +1 -1
  53. package/dist/internal/describe.js +47 -6
  54. package/dist/internal/describe.js.map +1 -1
  55. package/dist/internal/features.d.ts +73 -0
  56. package/dist/internal/features.d.ts.map +1 -0
  57. package/dist/internal/features.js +129 -0
  58. package/dist/internal/features.js.map +1 -0
  59. package/dist/internal/grant.d.ts.map +1 -1
  60. package/dist/internal/grant.js +2 -1
  61. package/dist/internal/grant.js.map +1 -1
  62. package/dist/internal/pagination.d.ts +30 -1
  63. package/dist/internal/pagination.d.ts.map +1 -1
  64. package/dist/internal/pagination.js +44 -1
  65. package/dist/internal/pagination.js.map +1 -1
  66. package/dist/internal/paths.d.ts.map +1 -1
  67. package/dist/internal/paths.js +38 -10
  68. package/dist/internal/paths.js.map +1 -1
  69. package/dist/internal/policy.d.ts +28 -0
  70. package/dist/internal/policy.d.ts.map +1 -1
  71. package/dist/internal/policy.js +31 -0
  72. package/dist/internal/policy.js.map +1 -1
  73. package/dist/internal/revoke.d.ts +11 -0
  74. package/dist/internal/revoke.d.ts.map +1 -1
  75. package/dist/internal/revoke.js +14 -1
  76. package/dist/internal/revoke.js.map +1 -1
  77. package/dist/internal/write.d.ts +10 -1
  78. package/dist/internal/write.d.ts.map +1 -1
  79. package/dist/internal/write.js +29 -4
  80. package/dist/internal/write.js.map +1 -1
  81. package/dist/types.d.ts +12 -0
  82. package/dist/types.d.ts.map +1 -1
  83. package/package.json +3 -3
@@ -5,9 +5,34 @@
5
5
  * Reads a Collection Description with a single GET. Shared by
6
6
  * `Collection.describe()` and the standalone-resource codec's marker discovery
7
7
  * so the request shape (path, capability, null-unwrap) lives in one place.
8
+ * Also owns the masked-404 fail-closed policy: WAS returns 404 for both
9
+ * not-found and unauthorized, so a `null` description is ambiguous and an
10
+ * operation that must know the current state fails closed via
11
+ * `unreadableDescriptionError` rather than guessing.
8
12
  */
13
+ import type { HttpResponse } from '@interop/http-client';
9
14
  import type { ClientContext } from './request.js';
15
+ import type { WasError } from '../errors.js';
10
16
  import type { CollectionDescription, IZcap } from '../types.js';
17
+ /**
18
+ * Sends the Collection Description GET, returning the raw response -- or
19
+ * `null` if the collection is missing or not visible to you (WAS returns 404
20
+ * for both not-found and unauthorized). The one request shape shared by
21
+ * {@link describeCollection} and `Collection.describeWithEtag` (which also
22
+ * needs the response's `ETag` header).
23
+ *
24
+ * @param context {ClientContext}
25
+ * @param options {object}
26
+ * @param options.spaceId {string}
27
+ * @param options.collectionId {string}
28
+ * @param [options.capability] {IZcap} capability attached to the request
29
+ * @returns {Promise<HttpResponse | null>}
30
+ */
31
+ export declare function describeCollectionResponse(context: ClientContext, { spaceId, collectionId, capability }: {
32
+ spaceId: string;
33
+ collectionId: string;
34
+ capability?: IZcap;
35
+ }): Promise<HttpResponse | null>;
11
36
  /**
12
37
  * Reads the Collection Description. Returns `null` if the collection is missing
13
38
  * or not visible to you (WAS returns 404 for both not-found and unauthorized).
@@ -19,9 +44,32 @@ import type { CollectionDescription, IZcap } from '../types.js';
19
44
  * @param [options.capability] {IZcap} capability attached to the request
20
45
  * @returns {Promise<CollectionDescription | null>}
21
46
  */
22
- export declare function describeCollection(context: ClientContext, { spaceId, collectionId, capability }: {
47
+ export declare function describeCollection(context: ClientContext, options: {
23
48
  spaceId: string;
24
49
  collectionId: string;
25
50
  capability?: IZcap;
26
51
  }): Promise<CollectionDescription | null>;
52
+ /**
53
+ * Builds the fail-closed error for an operation that needs a description it
54
+ * could not read. The one owner of the masked-404 policy statement ("WAS
55
+ * returns 404 for both not-found and unauthorized, so a null description is
56
+ * ambiguous -- fail closed"); callers supply the operation, its consequence,
57
+ * and the recovery advice.
58
+ *
59
+ * @param options {object}
60
+ * @param options.operation {string} what was refused, continuing "Cannot ..."
61
+ * @param [options.consequence] {string} what proceeding could silently do,
62
+ * continuing "..., so "
63
+ * @param [options.advice] {string} recovery guidance, appended verbatim
64
+ * @param [options.ErrorClass] {Function} the `WasError` subclass to build
65
+ * (defaults to `ValidationError`; the codec resolver passes
66
+ * `EncryptionError` so fail-closed encryption handling still catches it)
67
+ * @returns {WasError}
68
+ */
69
+ export declare function unreadableDescriptionError({ operation, consequence, advice, ErrorClass }: {
70
+ operation: string;
71
+ consequence?: string;
72
+ advice?: string;
73
+ ErrorClass?: new (message: string) => WasError;
74
+ }): WasError;
27
75
  //# sourceMappingURL=describe.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"describe.d.ts","sourceRoot":"","sources":["../../src/internal/describe.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;GAIG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAIjD,OAAO,KAAK,EAAE,qBAAqB,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AAE/D;;;;;;;;;;GAUG;AACH,wBAAsB,kBAAkB,CACtC,OAAO,EAAE,aAAa,EACtB,EACE,OAAO,EACP,YAAY,EACZ,UAAU,EACX,EAAE;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,KAAK,CAAA;CAAE,GAC/D,OAAO,CAAC,qBAAqB,GAAG,IAAI,CAAC,CAQvC"}
1
+ {"version":3,"file":"describe.d.ts","sourceRoot":"","sources":["../../src/internal/describe.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;GAQG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACxD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAKjD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAC5C,OAAO,KAAK,EAAE,qBAAqB,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AAE/D;;;;;;;;;;;;;GAaG;AACH,wBAAsB,0BAA0B,CAC9C,OAAO,EAAE,aAAa,EACtB,EACE,OAAO,EACP,YAAY,EACZ,UAAU,EACX,EAAE;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,KAAK,CAAA;CAAE,GAC/D,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC,CAO9B;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,kBAAkB,CACtC,OAAO,EAAE,aAAa,EACtB,OAAO,EAAE;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,KAAK,CAAA;CAAE,GACrE,OAAO,CAAC,qBAAqB,GAAG,IAAI,CAAC,CAIvC;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,0BAA0B,CAAC,EACzC,SAAS,EACT,WAAW,EACX,MAAM,EACN,UAA4B,EAC7B,EAAE;IACD,SAAS,EAAE,MAAM,CAAA;IACjB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,UAAU,CAAC,EAAE,KAAK,OAAO,EAAE,MAAM,KAAK,QAAQ,CAAA;CAC/C,GAAG,QAAQ,CAQX"}
@@ -1,24 +1,65 @@
1
1
  import { send } from './request.js';
2
2
  import { dataOrNull } from './content.js';
3
3
  import { collectionPath } from './paths.js';
4
+ import { ValidationError } from '../errors.js';
4
5
  /**
5
- * Reads the Collection Description. Returns `null` if the collection is missing
6
- * or not visible to you (WAS returns 404 for both not-found and unauthorized).
6
+ * Sends the Collection Description GET, returning the raw response -- or
7
+ * `null` if the collection is missing or not visible to you (WAS returns 404
8
+ * for both not-found and unauthorized). The one request shape shared by
9
+ * {@link describeCollection} and `Collection.describeWithEtag` (which also
10
+ * needs the response's `ETag` header).
7
11
  *
8
12
  * @param context {ClientContext}
9
13
  * @param options {object}
10
14
  * @param options.spaceId {string}
11
15
  * @param options.collectionId {string}
12
16
  * @param [options.capability] {IZcap} capability attached to the request
13
- * @returns {Promise<CollectionDescription | null>}
17
+ * @returns {Promise<HttpResponse | null>}
14
18
  */
15
- export async function describeCollection(context, { spaceId, collectionId, capability }) {
16
- const response = await send(context, {
19
+ export async function describeCollectionResponse(context, { spaceId, collectionId, capability }) {
20
+ return send(context, {
17
21
  path: collectionPath(spaceId, collectionId),
18
22
  method: 'GET',
19
23
  capability,
20
24
  read: true
21
25
  });
22
- return dataOrNull(response);
26
+ }
27
+ /**
28
+ * Reads the Collection Description. Returns `null` if the collection is missing
29
+ * or not visible to you (WAS returns 404 for both not-found and unauthorized).
30
+ *
31
+ * @param context {ClientContext}
32
+ * @param options {object}
33
+ * @param options.spaceId {string}
34
+ * @param options.collectionId {string}
35
+ * @param [options.capability] {IZcap} capability attached to the request
36
+ * @returns {Promise<CollectionDescription | null>}
37
+ */
38
+ export async function describeCollection(context, options) {
39
+ return dataOrNull(await describeCollectionResponse(context, options));
40
+ }
41
+ /**
42
+ * Builds the fail-closed error for an operation that needs a description it
43
+ * could not read. The one owner of the masked-404 policy statement ("WAS
44
+ * returns 404 for both not-found and unauthorized, so a null description is
45
+ * ambiguous -- fail closed"); callers supply the operation, its consequence,
46
+ * and the recovery advice.
47
+ *
48
+ * @param options {object}
49
+ * @param options.operation {string} what was refused, continuing "Cannot ..."
50
+ * @param [options.consequence] {string} what proceeding could silently do,
51
+ * continuing "..., so "
52
+ * @param [options.advice] {string} recovery guidance, appended verbatim
53
+ * @param [options.ErrorClass] {Function} the `WasError` subclass to build
54
+ * (defaults to `ValidationError`; the codec resolver passes
55
+ * `EncryptionError` so fail-closed encryption handling still catches it)
56
+ * @returns {WasError}
57
+ */
58
+ export function unreadableDescriptionError({ operation, consequence, advice, ErrorClass = ValidationError }) {
59
+ return new ErrorClass(`Cannot ${operation}: the current description is not readable with this ` +
60
+ 'capability (WAS returns 404 for both not-found and unauthorized)' +
61
+ (consequence !== undefined ? `, so ${consequence}` : '') +
62
+ '.' +
63
+ (advice !== undefined ? ` ${advice}` : ''));
23
64
  }
24
65
  //# sourceMappingURL=describe.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"describe.js","sourceRoot":"","sources":["../../src/internal/describe.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACnC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAG3C;;;;;;;;;;GAUG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CACtC,OAAsB,EACtB,EACE,OAAO,EACP,YAAY,EACZ,UAAU,EACoD;IAEhE,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,EAAE;QACnC,IAAI,EAAE,cAAc,CAAC,OAAO,EAAE,YAAY,CAAC;QAC3C,MAAM,EAAE,KAAK;QACb,UAAU;QACV,IAAI,EAAE,IAAI;KACX,CAAC,CAAA;IACF,OAAO,UAAU,CAAwB,QAAQ,CAAC,CAAA;AACpD,CAAC"}
1
+ {"version":3,"file":"describe.js","sourceRoot":"","sources":["../../src/internal/describe.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACnC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAI9C;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,KAAK,UAAU,0BAA0B,CAC9C,OAAsB,EACtB,EACE,OAAO,EACP,YAAY,EACZ,UAAU,EACoD;IAEhE,OAAO,IAAI,CAAC,OAAO,EAAE;QACnB,IAAI,EAAE,cAAc,CAAC,OAAO,EAAE,YAAY,CAAC;QAC3C,MAAM,EAAE,KAAK;QACb,UAAU;QACV,IAAI,EAAE,IAAI;KACX,CAAC,CAAA;AACJ,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CACtC,OAAsB,EACtB,OAAsE;IAEtE,OAAO,UAAU,CACf,MAAM,0BAA0B,CAAC,OAAO,EAAE,OAAO,CAAC,CACnD,CAAA;AACH,CAAC;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,0BAA0B,CAAC,EACzC,SAAS,EACT,WAAW,EACX,MAAM,EACN,UAAU,GAAG,eAAe,EAM7B;IACC,OAAO,IAAI,UAAU,CACnB,UAAU,SAAS,sDAAsD;QACvE,kEAAkE;QAClE,CAAC,WAAW,KAAK,SAAS,CAAC,CAAC,CAAC,QAAQ,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACxD,GAAG;QACH,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAC7C,CAAA;AACH,CAAC"}
@@ -0,0 +1,73 @@
1
+ import type { ClientContext } from './request.js';
2
+ import type { IZcap } from '../types.js';
3
+ /**
4
+ * A memoizing probe of one collection backend's advertised feature tokens.
5
+ * Memoized once it produces a definitive answer: a successful read (including
6
+ * one that lists no features) and a definitive "endpoint absent"
7
+ * (`404` / `405` / `501`) both resolve to a cached feature list, so every
8
+ * affordance gate falls closed against a server that has no backend
9
+ * descriptors.
10
+ *
11
+ * A transient/ambiguous failure (network error, timeout, `401`, `429`, other
12
+ * `5xx`) is NOT cached: the memo is cleared so the next call re-probes, and
13
+ * the error is rethrown so the caller fails loud rather than silently
14
+ * degrading against a server that may well be capable. (A single transient
15
+ * failure must not poison the probe for its lifetime.)
16
+ */
17
+ export declare class BackendFeatures {
18
+ private _promise?;
19
+ private readonly _readDescriptor;
20
+ /**
21
+ * @param readDescriptor {function} reads and parses the backend descriptor
22
+ * JSON (`GET .../backend`); expected to throw an error carrying an HTTP
23
+ * status (readable via `httpStatus`) on failure
24
+ */
25
+ constructor(readDescriptor: () => Promise<unknown>);
26
+ /**
27
+ * The feature tokens the backend advertises, probed once and cached on a
28
+ * definitive answer.
29
+ *
30
+ * @returns {Promise<string[]>}
31
+ */
32
+ get(): Promise<string[]>;
33
+ /**
34
+ * Whether the backend advertises the given feature token.
35
+ *
36
+ * @param feature {string} the affordance token (e.g. `conditional-writes`)
37
+ * @returns {Promise<boolean>}
38
+ */
39
+ has(feature: string): Promise<boolean>;
40
+ /**
41
+ * Reads and parses the backend descriptor once. On a definitive answer
42
+ * (success, or a `404` / `405` / `501` that means the endpoint is
43
+ * legitimately absent) resolves the feature list, which `get` then caches.
44
+ * On a transient failure, clears the memo (so the next call re-probes) and
45
+ * rethrows.
46
+ *
47
+ * @returns {Promise<string[]>}
48
+ */
49
+ private _probe;
50
+ }
51
+ /**
52
+ * Builds the {@link BackendFeatures} probe for a collection, reading its
53
+ * backend descriptor with a signed `GET` through the shared request layer --
54
+ * the probe the core handles (Collection/Resource) hold, mirroring the one
55
+ * `WasTransport` builds over its own requester. A descriptor that is not
56
+ * readable with the bound capability surfaces as a 404 (WAS masks unauthorized
57
+ * reads), which the probe treats as "no features advertised" -- so every
58
+ * affordance gate falls closed for a capability that cannot read the
59
+ * descriptor.
60
+ *
61
+ * @param context {ClientContext}
62
+ * @param options {object}
63
+ * @param options.spaceId {string}
64
+ * @param options.collectionId {string}
65
+ * @param [options.capability] {IZcap} capability attached to the probe
66
+ * @returns {BackendFeatures}
67
+ */
68
+ export declare function collectionBackendFeatures(context: ClientContext, { spaceId, collectionId, capability }: {
69
+ spaceId: string;
70
+ collectionId: string;
71
+ capability?: IZcap;
72
+ }): BackendFeatures;
73
+ //# sourceMappingURL=features.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"features.d.ts","sourceRoot":"","sources":["../../src/internal/features.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAIjD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AAcxC;;;;;;;;;;;;;GAaG;AACH,qBAAa,eAAe;IAC1B,OAAO,CAAC,QAAQ,CAAC,CAAmB;IACpC,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAwB;IAExD;;;;OAIG;gBACS,cAAc,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC;IAIlD;;;;;OAKG;IACH,GAAG,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;IAKxB;;;;;OAKG;IACG,GAAG,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAI5C;;;;;;;;OAQG;YACW,MAAM;CAqBrB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,aAAa,EACtB,EACE,OAAO,EACP,YAAY,EACZ,UAAU,EACX,EAAE;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,KAAK,CAAA;CAAE,GAC/D,eAAe,CAWjB"}
@@ -0,0 +1,129 @@
1
+ /*!
2
+ * Copyright (c) 2026 Interop Alliance. All rights reserved.
3
+ */
4
+ /**
5
+ * The shared backend-feature probe: reads a collection backend's "Collection
6
+ * Backend Selected" descriptor once and answers which optional affordance
7
+ * tokens it advertises (e.g. `conditional-writes`, `blinded-index-query`,
8
+ * `chunked-streams`). Both EDV write paths -- the standalone `WasTransport`
9
+ * and the codec-seam write orchestration -- consult this one helper, so the
10
+ * backend-capability decision is made in a single place instead of being
11
+ * probed in one path and assumed away in the other.
12
+ */
13
+ import { httpStatus } from '../errors.js';
14
+ import { send } from './request.js';
15
+ import { readJsonData } from './content.js';
16
+ import { collectionBackend } from './paths.js';
17
+ /**
18
+ * HTTP statuses that mean the backend-descriptor endpoint is legitimately
19
+ * absent (or explicitly unimplemented), as opposed to transiently failing:
20
+ * `404` (no such endpoint), `405` (endpoint does not answer `GET`), `501`
21
+ * (not implemented). These are a definitive "this server advertises no
22
+ * backend features" answer and are safe to cache -- every affordance gate
23
+ * then falls closed against a server that has no backend descriptors. Any
24
+ * other failure (network error, timeout, `401`, `429`, other `5xx`) is
25
+ * transient/ambiguous and is re-probed instead of cached.
26
+ */
27
+ const DESCRIPTOR_ABSENT_STATUSES = new Set([404, 405, 501]);
28
+ /**
29
+ * A memoizing probe of one collection backend's advertised feature tokens.
30
+ * Memoized once it produces a definitive answer: a successful read (including
31
+ * one that lists no features) and a definitive "endpoint absent"
32
+ * (`404` / `405` / `501`) both resolve to a cached feature list, so every
33
+ * affordance gate falls closed against a server that has no backend
34
+ * descriptors.
35
+ *
36
+ * A transient/ambiguous failure (network error, timeout, `401`, `429`, other
37
+ * `5xx`) is NOT cached: the memo is cleared so the next call re-probes, and
38
+ * the error is rethrown so the caller fails loud rather than silently
39
+ * degrading against a server that may well be capable. (A single transient
40
+ * failure must not poison the probe for its lifetime.)
41
+ */
42
+ export class BackendFeatures {
43
+ _promise;
44
+ _readDescriptor;
45
+ /**
46
+ * @param readDescriptor {function} reads and parses the backend descriptor
47
+ * JSON (`GET .../backend`); expected to throw an error carrying an HTTP
48
+ * status (readable via `httpStatus`) on failure
49
+ */
50
+ constructor(readDescriptor) {
51
+ this._readDescriptor = readDescriptor;
52
+ }
53
+ /**
54
+ * The feature tokens the backend advertises, probed once and cached on a
55
+ * definitive answer.
56
+ *
57
+ * @returns {Promise<string[]>}
58
+ */
59
+ get() {
60
+ this._promise ??= this._probe();
61
+ return this._promise;
62
+ }
63
+ /**
64
+ * Whether the backend advertises the given feature token.
65
+ *
66
+ * @param feature {string} the affordance token (e.g. `conditional-writes`)
67
+ * @returns {Promise<boolean>}
68
+ */
69
+ async has(feature) {
70
+ return (await this.get()).includes(feature);
71
+ }
72
+ /**
73
+ * Reads and parses the backend descriptor once. On a definitive answer
74
+ * (success, or a `404` / `405` / `501` that means the endpoint is
75
+ * legitimately absent) resolves the feature list, which `get` then caches.
76
+ * On a transient failure, clears the memo (so the next call re-probes) and
77
+ * rethrows.
78
+ *
79
+ * @returns {Promise<string[]>}
80
+ */
81
+ async _probe() {
82
+ try {
83
+ const descriptor = (await this._readDescriptor());
84
+ return Array.isArray(descriptor?.features)
85
+ ? descriptor.features.filter((feature) => typeof feature === 'string')
86
+ : [];
87
+ }
88
+ catch (err) {
89
+ const status = httpStatus(err);
90
+ if (status !== undefined && DESCRIPTOR_ABSENT_STATUSES.has(status)) {
91
+ return [];
92
+ }
93
+ // Transient/ambiguous: do not cache this failure -- drop the memo so the
94
+ // next call re-probes -- and rethrow.
95
+ this._promise = undefined;
96
+ throw err;
97
+ }
98
+ }
99
+ }
100
+ /**
101
+ * Builds the {@link BackendFeatures} probe for a collection, reading its
102
+ * backend descriptor with a signed `GET` through the shared request layer --
103
+ * the probe the core handles (Collection/Resource) hold, mirroring the one
104
+ * `WasTransport` builds over its own requester. A descriptor that is not
105
+ * readable with the bound capability surfaces as a 404 (WAS masks unauthorized
106
+ * reads), which the probe treats as "no features advertised" -- so every
107
+ * affordance gate falls closed for a capability that cannot read the
108
+ * descriptor.
109
+ *
110
+ * @param context {ClientContext}
111
+ * @param options {object}
112
+ * @param options.spaceId {string}
113
+ * @param options.collectionId {string}
114
+ * @param [options.capability] {IZcap} capability attached to the probe
115
+ * @returns {BackendFeatures}
116
+ */
117
+ export function collectionBackendFeatures(context, { spaceId, collectionId, capability }) {
118
+ return new BackendFeatures(async () => {
119
+ const response = await send(context, {
120
+ path: collectionBackend(spaceId, collectionId),
121
+ method: 'GET',
122
+ capability
123
+ });
124
+ // Without the `read` flag `send` never resolves `null` (a 404 throws and
125
+ // the probe maps it to "absent"), so this null-guard is for the type only.
126
+ return response === null ? null : readJsonData(response);
127
+ });
128
+ }
129
+ //# sourceMappingURL=features.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"features.js","sourceRoot":"","sources":["../../src/internal/features.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;GAQG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAEzC,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACnC,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAG9C;;;;;;;;;GASG;AACH,MAAM,0BAA0B,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAA;AAE3D;;;;;;;;;;;;;GAaG;AACH,MAAM,OAAO,eAAe;IAClB,QAAQ,CAAoB;IACnB,eAAe,CAAwB;IAExD;;;;OAIG;IACH,YAAY,cAAsC;QAChD,IAAI,CAAC,eAAe,GAAG,cAAc,CAAA;IACvC,CAAC;IAED;;;;;OAKG;IACH,GAAG;QACD,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC,MAAM,EAAE,CAAA;QAC/B,OAAO,IAAI,CAAC,QAAQ,CAAA;IACtB,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,GAAG,CAAC,OAAe;QACvB,OAAO,CAAC,MAAM,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAA;IAC7C,CAAC;IAED;;;;;;;;OAQG;IACK,KAAK,CAAC,MAAM;QAClB,IAAI,CAAC;YACH,MAAM,UAAU,GAAG,CAAC,MAAM,IAAI,CAAC,eAAe,EAAE,CAExC,CAAA;YACR,OAAO,KAAK,CAAC,OAAO,CAAC,UAAU,EAAE,QAAQ,CAAC;gBACxC,CAAC,CAAC,UAAU,CAAC,QAAQ,CAAC,MAAM,CACxB,CAAC,OAAO,EAAqB,EAAE,CAAC,OA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AE,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,EAAE,YAAY,GACzD,OAAO,CAAC,cAAc,CAAC,CAazB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,eAAe,CACnC,OAAO,EAAE,aAAa,EACtB,EACE,IAAI,EACJ,OAAO,EACP,UAAU,EACX,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,YAAY,CAAC;IAAC,UAAU,CAAC,EAAE,KAAK,CAAA;CAAE,GAC7D,OAAO,CAAC,cAAc,CAAC,CAMzB"}
1
+ {"version":3,"file":"grant.d.ts","sourceRoot":"","sources":["../../src/internal/grant.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;GAaG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAGjD,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AAgCtE;;;;;;;;;GASG;AACH,wBAAsB,aAAa,CACjC,OAAO,EAAE,aAAa,EACtB,EAAE,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,EAAE,YAAY,GACzD,OAAO,CAAC,cAAc,CAAC,CAazB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,eAAe,CACnC,OAAO,EAAE,aAAa,EACtB,EACE,IAAI,EACJ,OAAO,EACP,UAAU,EACX,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,YAAY,CAAC;IAAC,UAAU,CAAC,EAAE,KAAK,CAAA;CAAE,GAC7D,OAAO,CAAC,cAAc,CAAC,CAMzB"}
@@ -1,4 +1,5 @@
1
1
  import { parseSpaceTarget, spacePath, toUrl } from './paths.js';
2
+ import { rootCapabilityId } from './revoke.js';
2
3
  /**
3
4
  * The root capability id (`urn:zcap:root:<encoded target>`) of the Space
4
5
  * containing `target`, or `undefined` when `target` is not a URL beneath this
@@ -20,7 +21,7 @@ function spaceRootCapabilityId({ serverUrl, target }) {
20
21
  return undefined;
21
22
  }
22
23
  const spaceUrl = toUrl({ serverUrl, path: spacePath(parsed.spaceId) });
23
- return `urn:zcap:root:${encodeURIComponent(spaceUrl)}`;
24
+ return rootCapabilityId(spaceUrl);
24
25
  }
25
26
  /**
26
27
  * Delegates a capability per `GrantOptions`, returning the signed zcap to hand
@@ -1 +1 @@
1
- {"version":3,"file":"grant.js","sourceRoot":"","sources":["../../src/internal/grant.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAG/D;;;;;;;;;;;;;;GAcG;AACH,SAAS,qBAAqB,CAAC,EAC7B,SAAS,EACT,MAAM,EAIP;IACC,MAAM,MAAM,GAAG,gBAAgB,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC,CAAA;IACtD,IAAI,MAAM,KAAK,IAAI,EAAE,CAAC;QACpB,OAAO,SAAS,CAAA;IAClB,CAAC;IACD,MAAM,QAAQ,GAAG,KAAK,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,CAAA;IACtE,OAAO,iBAAiB,kBAAkB,CAAC,QAAQ,CAAC,EAAE,CAAA;AACxD,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CACjC,OAAsB,EACtB,EAAE,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAgB;IAE1D,MAAM,MAAM,GACV,UAAU;QACV,CAAC,MAAM,KAAK,SAAS;YACnB,CAAC,CAAC,SAAS;YACX,CAAC,CAAC,qBAAqB,CAAC,EAAE,SAAS,EAAE,OAAO,CAAC,SAAS,EAAE,MAAM,EAAE,CAAC,CAAC,CAAA;IACtE,OAAO,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC;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,KAAK,UAAU,aAAa,CACjC,OAAsB,EACtB,EAAE,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAgB;IAE1D,MAAM,MAAM,GACV,UAAU;QACV,CAAC,MAAM,KAAK,SAAS;YACnB,CAAC,CAAC,SAAS;YACX,CAAC,CAAC,qBAAqB,CAAC,EAAE,SAAS,EAAE,OAAO,CAAC,SAAS,EAAE,MAAM,EAAE,CAAC,CAAC,CAAA;IACtE,OAAO,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC;QACjC,UAAU,EAAE,EAAE;QACd,gBAAgB,EAAE,MAAM;QACxB,cAAc,EAAE,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC;QAC3D,OAAO;QACP,UAAU,EAAE,MAAM;KACnB,CAAC,CAAA;AACJ,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,KAAK,UAAU,eAAe,CACnC,OAAsB,EACtB,EACE,IAAI,EACJ,OAAO,EACP,UAAU,EACkD;IAE9D,OAAO,aAAa,CAAC,OAAO,EAAE;QAC5B,GAAG,OAAO;QACV,MAAM,EAAE,OAAO,CAAC,MAAM,IAAI,KAAK,CAAC,EAAE,SAAS,EAAE,OAAO,CAAC,SAAS,EAAE,IAAI,EAAE,CAAC;QACvE,UAAU,EAAE,OAAO,CAAC,UAAU,IAAI,UAAU;KAC7C,CAAC,CAAA;AACJ,CAAC"}
@@ -10,7 +10,7 @@
10
10
  * request, and yields one page at a time (constant memory, early-exit-friendly).
11
11
  * `collectPages` builds on it to eagerly aggregate every page into one envelope.
12
12
  */
13
- import type { CollectionResourcesList } from '../types.js';
13
+ import type { CollectionResourcesList, ResourceSummary } from '../types.js';
14
14
  /**
15
15
  * The first page (already read) plus the means to fetch each following page.
16
16
  * The `fetchPage` callback fetches a single page by absolute URL, returning
@@ -58,4 +58,33 @@ export declare function walkPages(walk: PageWalk): AsyncGenerator<CollectionReso
58
58
  * @returns {Promise<CollectionResourcesList>}
59
59
  */
60
60
  export declare function collectPages(walk: PageWalk): Promise<CollectionResourcesList>;
61
+ /**
62
+ * The buffering list surface over a possibly-absent walk: collects every page
63
+ * into one envelope, mapping a `null` walk (missing/unauthorized listing) to
64
+ * `null`. The shared dispatch behind `Collection.list()` and
65
+ * `WasClient.publicListCollection()`.
66
+ *
67
+ * @param walk {PageWalk | null}
68
+ * @returns {Promise<CollectionResourcesList | null>}
69
+ */
70
+ export declare function collectWalk(walk: PageWalk | null): Promise<CollectionResourcesList | null>;
71
+ /**
72
+ * The lazy page surface over a possibly-absent walk: yields each page, or
73
+ * nothing for a `null` walk (which an iterator cannot distinguish from an
74
+ * empty listing). The shared dispatch behind `Collection.listPages()` and
75
+ * `WasClient.publicListCollectionPages()`.
76
+ *
77
+ * @param walk {PageWalk | null}
78
+ * @returns {AsyncGenerator<CollectionResourcesList>}
79
+ */
80
+ export declare function walkPagesOrEmpty(walk: PageWalk | null): AsyncGenerator<CollectionResourcesList>;
81
+ /**
82
+ * The lazy item surface: flattens a page iterator into its `ResourceSummary`
83
+ * entries. The shared dispatch behind `Collection.listItems()` and
84
+ * `WasClient.publicListCollectionItems()`.
85
+ *
86
+ * @param pages {AsyncIterable<CollectionResourcesList>}
87
+ * @returns {AsyncGenerator<ResourceSummary>}
88
+ */
89
+ export declare function walkItems(pages: AsyncIterable<CollectionResourcesList>): AsyncGenerator<ResourceSummary>;
61
90
  //# sourceMappingURL=pagination.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"pagination.d.ts","sourceRoot":"","sources":["../../src/internal/pagination.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;GAQG;AACH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAA;AAE1D;;;;GAIG;AACH,MAAM,WAAW,QAAQ;IACvB,KAAK,EAAE,uBAAuB,CAAA;IAC9B,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE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AACH,wBAAsB,YAAY,CAChC,IAAI,EAAE,QAAQ,GACb,OAAO,CAAC,uBAAuB,CAAC,CAelC;AAED;;;;;;;;GAQG;AACH,wBAAsB,WAAW,CAC/B,IAAI,EAAE,QAAQ,GAAG,IAAI,GACpB,OAAO,CAAC,uBAAuB,GAAG,IAAI,CAAC,CAEzC;AAED;;;;;;;;GAQG;AACH,wBAAuB,gBAAgB,CACrC,IAAI,EAAE,QAAQ,GAAG,IAAI,GACpB,cAAc,CAAC,uBAAuB,CAAC,CAIzC;AAED;;;;;;;GAOG;AACH,wBAAuB,SAAS,CAC9B,KAAK,EAAE,aAAa,CAAC,uBAAuB,CAAC,GAC5C,cAAc,CAAC,eAAe,CAAC,CAIjC"}
@@ -63,11 +63,54 @@ export async function collectPages(walk) {
63
63
  const items = [];
64
64
  for await (const page of walkPages(walk)) {
65
65
  aggregate ??= page;
66
- items.push(...page.items);
66
+ // Append one by one: spreading a page's items as call arguments would hit
67
+ // the engine's max-arguments ceiling on a very large page.
68
+ for (const item of page.items) {
69
+ items.push(item);
70
+ }
67
71
  }
68
72
  // `walkPages` always yields `first`, so `aggregate` is set here.
69
73
  const result = { ...aggregate, items };
70
74
  delete result.next;
71
75
  return result;
72
76
  }
77
+ /**
78
+ * The buffering list surface over a possibly-absent walk: collects every page
79
+ * into one envelope, mapping a `null` walk (missing/unauthorized listing) to
80
+ * `null`. The shared dispatch behind `Collection.list()` and
81
+ * `WasClient.publicListCollection()`.
82
+ *
83
+ * @param walk {PageWalk | null}
84
+ * @returns {Promise<CollectionResourcesList | null>}
85
+ */
86
+ export async function collectWalk(walk) {
87
+ return walk === null ? null : collectPages(walk);
88
+ }
89
+ /**
90
+ * The lazy page surface over a possibly-absent walk: yields each page, or
91
+ * nothing for a `null` walk (which an iterator cannot distinguish from an
92
+ * empty listing). The shared dispatch behind `Collection.listPages()` and
93
+ * `WasClient.publicListCollectionPages()`.
94
+ *
95
+ * @param walk {PageWalk | null}
96
+ * @returns {AsyncGenerator<CollectionResourcesList>}
97
+ */
98
+ export async function* walkPagesOrEmpty(walk) {
99
+ if (walk !== null) {
100
+ yield* walkPages(walk);
101
+ }
102
+ }
103
+ /**
104
+ * The lazy item surface: flattens a page iterator into its `ResourceSummary`
105
+ * entries. The shared dispatch behind `Collection.listItems()` and
106
+ * `WasClient.publicListCollectionItems()`.
107
+ *
108
+ * @param pages {AsyncIterable<CollectionResourcesList>}
109
+ * @returns {AsyncGenerator<ResourceSummary>}
110
+ */
111
+ export async function* walkItems(pages) {
112
+ for await (const page of pages) {
113
+ yield* page.items;
114
+ }
115
+ }
73
116
  //# sourceMappingURL=pagination.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"pagination.js","sourceRoot":"","sources":["../../src/internal/pagination.ts"],"names":[],"mappings":"AAyBA;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,EAClC,QAAQ,EACR,SAAS,EAIV;IACC,MAAM,KAAK,GAAG,MAAM,SAAS,CAAC,QAAQ,CAAC,CAAA;IACvC,OAAO,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAA;AAC/D,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,CAAC,KAAK,SAAS,CAAC,CAAC,SAAS,CAC9B,IAAc;IAEd,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,IAAI,CAAA;IAC3C,MAAM,KAAK,CAAA;IACX,0EAA0E;IAC1E,2EAA2E;IAC3E,4EAA4E;IAC5E,8CAA8C;IAC9C,MAAM,IAAI,GAAG,IAAI,GAAG,CAAS,CAAC,IAAI,GAAG,CAAC,QAAQ,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAA;IAC5D,IAAI,OAAO,GAAG,QAAQ,CAAA;IACtB,IAAI,IAAI,GAAG,KAAK,CAAC,IAAI,CAAA;IACrB,OAAO,IAAI,E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