@interop/was-client 0.100.0 → 0.100.1

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.
@@ -8,46 +8,137 @@
8
8
  */
9
9
  export declare function parseAbsoluteHttpUrl(url: string): URL | null;
10
10
  /**
11
- * The Space URL in canonical form: an absolute `http(s)` URL, serialized by
12
- * `URL` (lower-case host, default port dropped), ending in exactly one
13
- * slash. A server names a Space in this form (the `Location` of the create
14
- * response, a listing item's `url`), and every URL beneath the Space, and
15
- * every zcap `invocationTarget`, is derived from it, so a caller's own
16
- * serialization of the same Space must reduce to the same string. A missing
17
- * trailing slash is added, since the bare form names the same container; a
18
- * run of trailing slashes is collapsed to one.
11
+ * Whether a canonical container URL is an origin root (`https://h/`).
12
+ *
13
+ * @param canonical {string}
14
+ * @returns {boolean}
15
+ */
16
+ export declare function isOriginRoot(canonical: string): boolean;
17
+ /**
18
+ * The base server URL in canonical form: the URL under which a server lays
19
+ * out `service`, `spaces/` and `space/{space_id}/`. An absolute `http(s)` URL
20
+ * with no query or fragment; a missing trailing slash is supplied rather than
21
+ * refused, since `https://h/pws` and `https://h/pws/` can only mean the same
22
+ * mount.
23
+ *
24
+ * @param baseServerUrl {string}
25
+ * @returns {string}
26
+ * @throws {ValidationError} when the value is not an absolute `http(s)` URL,
27
+ * or carries a query or fragment
28
+ */
29
+ export declare function canonicalBaseServerUrl(baseServerUrl: string): string;
30
+ /**
31
+ * `{base}service` -- the service description of the server at
32
+ * `baseServerUrl`.
33
+ *
34
+ * @param options {object}
35
+ * @param options.baseServerUrl {string}
36
+ * @returns {string}
37
+ */
38
+ export declare function serviceDescriptionUrl({ baseServerUrl }: {
39
+ baseServerUrl: string;
40
+ }): string;
41
+ /**
42
+ * `{base}spaces/` -- the Spaces Repository of the server at `baseServerUrl`,
43
+ * in canonical container form. The server may not implement one; its service
44
+ * description says.
45
+ *
46
+ * @param options {object}
47
+ * @param options.baseServerUrl {string}
48
+ * @returns {string}
49
+ */
50
+ export declare function spacesRepositoryUrl({ baseServerUrl }: {
51
+ baseServerUrl: string;
52
+ }): string;
53
+ /**
54
+ * `{base}space/{space_id}/` -- the Space with id `spaceId` on the server at
55
+ * `baseServerUrl`, in canonical form. The one place a Space URL is built
56
+ * rather than received; the spec's Server Layout fixes this shape.
57
+ *
58
+ * @param options {object}
59
+ * @param options.baseServerUrl {string}
60
+ * @param options.spaceId {string}
61
+ * @returns {string}
62
+ * @throws {ValidationError} when `spaceId` is empty or a dot segment
63
+ */
64
+ export declare function spaceUrlById({ baseServerUrl, spaceId }: {
65
+ baseServerUrl: string;
66
+ spaceId: string;
67
+ }): string;
68
+ /**
69
+ * The base server URL a server-level URL sits under: the inverse of
70
+ * {@link serviceDescriptionUrl}, {@link spacesRepositoryUrl} and
71
+ * {@link spaceUrlById}. Accepts the service description URL (`{base}service`),
72
+ * the Spaces Repository URL (`{base}spaces/`, slash optional) or a Space URL
73
+ * (`{base}space/{space_id}/`, slash optional) and strips exactly the segments
74
+ * the layout adds. Anything else is refused, including a Collection or
75
+ * Resource URL, whose depth cannot be told from the string alone, and the
76
+ * URL of a single fixed Space, which has no base server URL.
77
+ *
78
+ * @param url {string}
79
+ * @returns {string}
80
+ * @throws {ValidationError} when `url` is not an absolute `http(s)` URL
81
+ * without query or fragment in one of the three forms
82
+ */
83
+ export declare function baseServerUrlOf(url: string): string;
84
+ /**
85
+ * Splits an absolute Collection URL into the Space URL it sits under and the
86
+ * Collection id: the parent container and the last segment, percent-decoded.
87
+ * A Collection URL is always the Space URL plus one segment, so no layout
88
+ * knowledge is needed. The bare form (no trailing slash) is accepted, as for
89
+ * any container URL received from outside.
90
+ *
91
+ * @param collectionUrl {string}
92
+ * @returns {{ spaceUrl: string; collectionId: string }}
93
+ * @throws {ValidationError} when `collectionUrl` is not an absolute `http(s)`
94
+ * URL without query or fragment, has no path segment, or its last segment
95
+ * is a malformed percent escape
96
+ */
97
+ export declare function splitCollectionUrl(collectionUrl: string): {
98
+ spaceUrl: string;
99
+ collectionId: string;
100
+ };
101
+ /**
102
+ * The Space URL in canonical form (see `canonicalContainer`). A server names
103
+ * a Space in this form (the `Location` of the create response, a listing
104
+ * item's `url`), and every URL beneath the Space, and every zcap
105
+ * `invocationTarget`, is derived from it, so a caller's own serialization of
106
+ * the same Space must reduce to the same string. An origin root is a valid
107
+ * Space URL: a single fixed Space (one with no Space id and no base server
108
+ * URL) may be served there.
19
109
  *
20
110
  * @param spaceUrl {string} a Space URL, as the server named it or as the
21
111
  * caller stored it
22
112
  * @returns {string}
23
113
  * @throws {ValidationError} when `spaceUrl` is not an absolute `http(s)`
24
- * URL, carries a query or fragment, or has no path segment (an origin is
25
- * not a Space)
114
+ * URL, carries a query or fragment, or has an empty path segment
26
115
  */
27
116
  export declare function canonicalSpaceUrl(spaceUrl: string): string;
28
117
  /**
29
118
  * The Space's id as its URL names it: the last path segment of the Space
30
119
  * URL, percent-decoded. The spec's hierarchy and its did:webvh profile both
31
120
  * place the id there (`.../space/{space_id}/`), and it is the value the Space
32
- * Metadata object's `id` carries.
121
+ * Metadata object's `id` carries. A single fixed Space at an origin root has
122
+ * no id, so that URL is refused here.
33
123
  *
34
124
  * @param spaceUrl {string} a Space URL
35
125
  * @returns {string}
36
126
  * @throws {ValidationError} when `spaceUrl` is not a Space URL (see
37
- * {@link canonicalSpaceUrl}) or its last segment is a malformed percent
38
- * escape
127
+ * {@link canonicalSpaceUrl}), is an origin root, or its last segment is a
128
+ * malformed percent escape
39
129
  */
40
130
  export declare function spaceIdOfUrl(spaceUrl: string): string;
41
131
  /**
42
132
  * {@link spaceIdOfUrl} for a Space URL already in canonical form (a handle's
43
133
  * `url`, the result of {@link canonicalSpaceUrl}), sparing the second parse.
134
+ * Returns `undefined` for an origin root, which has no id segment.
44
135
  *
45
136
  * @param canonical {string} a canonical Space URL
46
- * @returns {string}
137
+ * @returns {string | undefined}
47
138
  * @throws {ValidationError} when the last segment is a malformed percent
48
139
  * escape
49
140
  */
50
- export declare function spaceIdOfCanonicalUrl(canonical: string): string;
141
+ export declare function spaceIdOfCanonicalUrl(canonical: string): string | undefined;
51
142
  /**
52
143
  * `{spaceUrl}meta` -- the Space Metadata object: the Space's description
53
144
  * (`name`, `controller`, `type`), read with `GET` and replaced with `PUT`.
@@ -1 +1 @@
1
- {"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../../src/internal/paths.ts"],"names":[],"mappings":"AAiGA;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,GAAG,IAAI,CAW5D;AAiBD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAgB1D;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAErD;AAED;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAW/D;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,YAAY,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAEvE;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAEzE;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAEzE;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAE3E;AAED;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,EACnC,QAAQ,EACR,SAAS,EACV,EAAE;IACD,QAAQ,EAAE,MAAM,C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AE,CAAA;AAEhD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,QAAQ,EACR,MAAM,EACP,EAAE;IACD,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,MAAM,CAAA;CACf,GAAG,eAAe,GAAG,IAAI,CA6DzB"}
@@ -2,13 +2,17 @@
2
2
  * Copyright (c) 2026 Interop Alliance. All rights reserved.
3
3
  */
4
4
  /**
5
- * URL builders for the hierarchy beneath a Space, encoding the trailing-slash
6
- * canonicalization once. Every URL this client requests is derived from a
7
- * Space URL the server handed out (the `Location` of the create response, a
8
- * listing item, a linkset, or the caller's stored pointer) and from nothing
9
- * above it: the spec places no Space beside the Spaces Repository, so no
10
- * builder here forms a Space URL, and none takes a server root. The Spaces
11
- * Repository URL is the `spaces` member of the service description.
5
+ * URL builders for the two layers the spec fixes, encoding the trailing-slash
6
+ * canonicalization once. Above a Space, the spec's Server Layout places the
7
+ * three server-level endpoints under one base server URL:
8
+ * `{base}service`, `{base}spaces/` and `{base}space/{space_id}/`
9
+ * (`serviceDescriptionUrl`, `spacesRepositoryUrl`, `spaceUrlById`, with
10
+ * `baseServerUrlOf` as their inverse). Beneath a Space, every URL derives from
11
+ * the Space URL, which is either built that way or handed out by the server
12
+ * (the `Location` of the create response, a listing item, a linkset, the
13
+ * caller's stored pointer) and used as given. A single fixed Space has no
14
+ * base server URL and may sit at an origin root, so a Space URL need not have
15
+ * a path.
12
16
  *
13
17
  * The convention: a trailing slash marks a container in canonical form (the
14
18
  * Space URL itself, and `{spaceUrl}{collectionId}/`), everything else has
@@ -64,11 +68,14 @@ function encode(segment) {
64
68
  * endpoint. Guarding in the builders covers every URL-forming entry point
65
69
  * (handle constructors guard too, for the earlier failure).
66
70
  *
67
- * @param collectionId {string}
71
+ * @param options {object}
72
+ * @param options.collectionId {string}
73
+ * @param options.originRoot {boolean} whether the Space is served from an
74
+ * origin root, where the server-level endpoint segments are reserved too
68
75
  * @returns {string}
69
76
  */
70
- function encodeCollectionId(collectionId) {
71
- assertNotReserved({ id: collectionId, kind: 'collection' });
77
+ function encodeCollectionId({ collectionId, originRoot }) {
78
+ assertNotReserved({ id: collectionId, kind: 'collection', originRoot });
72
79
  return encode(collectionId);
73
80
  }
74
81
  /**
@@ -120,60 +127,223 @@ function parseContainerUrl(url) {
120
127
  return parsed;
121
128
  }
122
129
  /**
123
- * The Space URL in canonical form: an absolute `http(s)` URL, serialized by
124
- * `URL` (lower-case host, default port dropped), ending in exactly one
125
- * slash. A server names a Space in this form (the `Location` of the create
126
- * response, a listing item's `url`), and every URL beneath the Space, and
127
- * every zcap `invocationTarget`, is derived from it, so a caller's own
128
- * serialization of the same Space must reduce to the same string. A missing
129
- * trailing slash is added, since the bare form names the same container; a
130
- * run of trailing slashes is collapsed to one.
130
+ * A container URL in canonical form: an absolute `http(s)` URL with no query
131
+ * or fragment, serialized by `URL` (lower-case host, default port dropped),
132
+ * ending in exactly one slash. A missing trailing slash is added, since the
133
+ * bare form names the same container; a run of trailing slashes is collapsed
134
+ * to one. An empty path segment is refused. The origin root (`https://h/`) is
135
+ * a valid container.
131
136
  *
132
- * @param spaceUrl {string} a Space URL, as the server named it or as the
133
- * caller stored it
137
+ * @param options {object}
138
+ * @param options.url {string}
139
+ * @param options.what {string} what the URL was meant to name, for the error
134
140
  * @returns {string}
135
- * @throws {ValidationError} when `spaceUrl` is not an absolute `http(s)`
136
- * URL, carries a query or fragment, or has no path segment (an origin is
137
- * not a Space)
141
+ * @throws {ValidationError}
138
142
  */
139
- export function canonicalSpaceUrl(spaceUrl) {
140
- const parsed = parseContainerUrl(spaceUrl);
143
+ function canonicalContainer({ url, what }) {
144
+ const parsed = parseContainerUrl(url);
141
145
  if (parsed === null) {
142
- throw new ValidationError(`"${spaceUrl}" is not a Space URL: an absolute http(s) URL with no ` +
143
- 'query or fragment is required.');
146
+ throw new ValidationError(`"${url}" is not a ${what}: an absolute http(s) URL with no query or ` +
147
+ 'fragment is required.');
144
148
  }
145
149
  const pathname = parsed.pathname.replace(/\/+$/, '');
146
- if (pathname === '' || pathname.split('/').slice(1).includes('')) {
147
- throw new ValidationError(`"${spaceUrl}" is not a Space URL: a Space has at least one path ` +
148
- 'segment beneath its origin, with no empty segment.');
150
+ if (pathname.split('/').slice(1).includes('')) {
151
+ throw new ValidationError(`"${url}" is not a ${what}: its path has an empty segment.`);
149
152
  }
150
153
  return `${parsed.origin}${pathname}/`;
151
154
  }
155
+ /**
156
+ * Whether a canonical container URL is an origin root (`https://h/`).
157
+ *
158
+ * @param canonical {string}
159
+ * @returns {boolean}
160
+ */
161
+ export function isOriginRoot(canonical) {
162
+ // Canonical form is `{origin}{path}/`, so the URL is a root when the first
163
+ // slash after the scheme's `//` is its last character.
164
+ const pathStart = canonical.indexOf('/', canonical.indexOf('//') + 2);
165
+ return pathStart === canonical.length - 1;
166
+ }
167
+ /**
168
+ * The base server URL in canonical form: the URL under which a server lays
169
+ * out `service`, `spaces/` and `space/{space_id}/`. An absolute `http(s)` URL
170
+ * with no query or fragment; a missing trailing slash is supplied rather than
171
+ * refused, since `https://h/pws` and `https://h/pws/` can only mean the same
172
+ * mount.
173
+ *
174
+ * @param baseServerUrl {string}
175
+ * @returns {string}
176
+ * @throws {ValidationError} when the value is not an absolute `http(s)` URL,
177
+ * or carries a query or fragment
178
+ */
179
+ export function canonicalBaseServerUrl(baseServerUrl) {
180
+ return canonicalContainer({ url: baseServerUrl, what: 'base server URL' });
181
+ }
182
+ /**
183
+ * `{base}service` -- the service description of the server at
184
+ * `baseServerUrl`.
185
+ *
186
+ * @param options {object}
187
+ * @param options.baseServerUrl {string}
188
+ * @returns {string}
189
+ */
190
+ export function serviceDescriptionUrl({ baseServerUrl }) {
191
+ return `${canonicalBaseServerUrl(baseServerUrl)}service`;
192
+ }
193
+ /**
194
+ * `{base}spaces/` -- the Spaces Repository of the server at `baseServerUrl`,
195
+ * in canonical container form. The server may not implement one; its service
196
+ * description says.
197
+ *
198
+ * @param options {object}
199
+ * @param options.baseServerUrl {string}
200
+ * @returns {string}
201
+ */
202
+ export function spacesRepositoryUrl({ baseServerUrl }) {
203
+ return `${canonicalBaseServerUrl(baseServerUrl)}spaces/`;
204
+ }
205
+ /**
206
+ * `{base}space/{space_id}/` -- the Space with id `spaceId` on the server at
207
+ * `baseServerUrl`, in canonical form. The one place a Space URL is built
208
+ * rather than received; the spec's Server Layout fixes this shape.
209
+ *
210
+ * @param options {object}
211
+ * @param options.baseServerUrl {string}
212
+ * @param options.spaceId {string}
213
+ * @returns {string}
214
+ * @throws {ValidationError} when `spaceId` is empty or a dot segment
215
+ */
216
+ export function spaceUrlById({ baseServerUrl, spaceId }) {
217
+ return `${canonicalBaseServerUrl(baseServerUrl)}space/${encode(spaceId)}/`;
218
+ }
219
+ /**
220
+ * The base server URL a server-level URL sits under: the inverse of
221
+ * {@link serviceDescriptionUrl}, {@link spacesRepositoryUrl} and
222
+ * {@link spaceUrlById}. Accepts the service description URL (`{base}service`),
223
+ * the Spaces Repository URL (`{base}spaces/`, slash optional) or a Space URL
224
+ * (`{base}space/{space_id}/`, slash optional) and strips exactly the segments
225
+ * the layout adds. Anything else is refused, including a Collection or
226
+ * Resource URL, whose depth cannot be told from the string alone, and the
227
+ * URL of a single fixed Space, which has no base server URL.
228
+ *
229
+ * @param url {string}
230
+ * @returns {string}
231
+ * @throws {ValidationError} when `url` is not an absolute `http(s)` URL
232
+ * without query or fragment in one of the three forms
233
+ */
234
+ export function baseServerUrlOf(url) {
235
+ const parsed = parseContainerUrl(url);
236
+ const segments = parsed?.pathname.split('/').filter(Boolean) ?? [];
237
+ const last = segments.at(-1);
238
+ // The Space form is tested first: a Space whose id is itself `spaces` or
239
+ // `service` still sits under `space/`, and the other two forms have no
240
+ // `space` segment before their last one.
241
+ const isSpace = segments.at(-2) === 'space';
242
+ const isServerLevel = isSpace ||
243
+ last === 'spaces' ||
244
+ (last === 'service' && !parsed?.pathname.endsWith('/'));
245
+ if (parsed === null || !isServerLevel) {
246
+ throw new ValidationError(`"${url}" is not a server-level PWS URL: expected the service ` +
247
+ 'description (`{base}service`), the Spaces Repository ' +
248
+ '(`{base}spaces/`) or a Space (`{base}space/{space_id}/`).');
249
+ }
250
+ const base = segments.slice(0, isSpace ? -2 : -1);
251
+ return `${parsed.origin}/${base.map(segment => `${segment}/`).join('')}`;
252
+ }
253
+ /**
254
+ * Splits an absolute Collection URL into the Space URL it sits under and the
255
+ * Collection id: the parent container and the last segment, percent-decoded.
256
+ * A Collection URL is always the Space URL plus one segment, so no layout
257
+ * knowledge is needed. The bare form (no trailing slash) is accepted, as for
258
+ * any container URL received from outside.
259
+ *
260
+ * @param collectionUrl {string}
261
+ * @returns {{ spaceUrl: string; collectionId: string }}
262
+ * @throws {ValidationError} when `collectionUrl` is not an absolute `http(s)`
263
+ * URL without query or fragment, has no path segment, or its last segment
264
+ * is a malformed percent escape
265
+ */
266
+ export function splitCollectionUrl(collectionUrl) {
267
+ const canonical = canonicalContainer({
268
+ url: collectionUrl,
269
+ what: 'Collection URL'
270
+ });
271
+ if (isOriginRoot(canonical)) {
272
+ throw new ValidationError(`"${collectionUrl}" is not a Collection URL: a Collection has at least ` +
273
+ 'one path segment beneath its origin.');
274
+ }
275
+ const parsed = new URL(canonical);
276
+ const segments = parsed.pathname.split('/').filter(Boolean);
277
+ const encodedId = segments.pop();
278
+ let collectionId;
279
+ try {
280
+ collectionId = decodeURIComponent(encodedId);
281
+ }
282
+ catch (err) {
283
+ throw new ValidationError(`"${collectionUrl}" is not a Collection URL: its last segment is not ` +
284
+ 'a well-formed percent-encoding.', { cause: err });
285
+ }
286
+ const parent = segments.length === 0 ? '' : `${segments.join('/')}/`;
287
+ return { spaceUrl: `${parsed.origin}/${parent}`, collectionId };
288
+ }
289
+ /**
290
+ * The Space URL in canonical form (see `canonicalContainer`). A server names
291
+ * a Space in this form (the `Location` of the create response, a listing
292
+ * item's `url`), and every URL beneath the Space, and every zcap
293
+ * `invocationTarget`, is derived from it, so a caller's own serialization of
294
+ * the same Space must reduce to the same string. An origin root is a valid
295
+ * Space URL: a single fixed Space (one with no Space id and no base server
296
+ * URL) may be served there.
297
+ *
298
+ * @param spaceUrl {string} a Space URL, as the server named it or as the
299
+ * caller stored it
300
+ * @returns {string}
301
+ * @throws {ValidationError} when `spaceUrl` is not an absolute `http(s)`
302
+ * URL, carries a query or fragment, or has an empty path segment
303
+ */
304
+ export function canonicalSpaceUrl(spaceUrl) {
305
+ const canonical = canonicalContainer({ url: spaceUrl, what: 'Space URL' });
306
+ // The last segment is the Space id, percent-encoded; a malformed escape
307
+ // (`%ff`) is refused here so every handle beneath the Space (not only the
308
+ // Space handle, which decodes the id) rejects an unparseable Space URL.
309
+ spaceIdOfCanonicalUrl(canonical);
310
+ return canonical;
311
+ }
152
312
  /**
153
313
  * The Space's id as its URL names it: the last path segment of the Space
154
314
  * URL, percent-decoded. The spec's hierarchy and its did:webvh profile both
155
315
  * place the id there (`.../space/{space_id}/`), and it is the value the Space
156
- * Metadata object's `id` carries.
316
+ * Metadata object's `id` carries. A single fixed Space at an origin root has
317
+ * no id, so that URL is refused here.
157
318
  *
158
319
  * @param spaceUrl {string} a Space URL
159
320
  * @returns {string}
160
321
  * @throws {ValidationError} when `spaceUrl` is not a Space URL (see
161
- * {@link canonicalSpaceUrl}) or its last segment is a malformed percent
162
- * escape
322
+ * {@link canonicalSpaceUrl}), is an origin root, or its last segment is a
323
+ * malformed percent escape
163
324
  */
164
325
  export function spaceIdOfUrl(spaceUrl) {
165
- return spaceIdOfCanonicalUrl(canonicalSpaceUrl(spaceUrl));
326
+ const id = spaceIdOfCanonicalUrl(canonicalSpaceUrl(spaceUrl));
327
+ if (id === undefined) {
328
+ throw new ValidationError(`"${spaceUrl}" names no Space id: it is an origin root, which only a ` +
329
+ 'single fixed Space (one without an id) is served from.');
330
+ }
331
+ return id;
166
332
  }
167
333
  /**
168
334
  * {@link spaceIdOfUrl} for a Space URL already in canonical form (a handle's
169
335
  * `url`, the result of {@link canonicalSpaceUrl}), sparing the second parse.
336
+ * Returns `undefined` for an origin root, which has no id segment.
170
337
  *
171
338
  * @param canonical {string} a canonical Space URL
172
- * @returns {string}
339
+ * @returns {string | undefined}
173
340
  * @throws {ValidationError} when the last segment is a malformed percent
174
341
  * escape
175
342
  */
176
343
  export function spaceIdOfCanonicalUrl(canonical) {
344
+ if (isOriginRoot(canonical)) {
345
+ return undefined;
346
+ }
177
347
  const segment = canonical.split('/').filter(Boolean).pop();
178
348
  try {
179
349
  return decodeURIComponent(segment);
@@ -332,7 +502,15 @@ export function spaceRevocationUrl({ spaceUrl, capabilityId }) {
332
502
  * @returns {string}
333
503
  */
334
504
  function collectionPrefix({ spaceUrl, collectionId }) {
335
- return `${canonicalSpaceUrl(spaceUrl)}${encodeCollectionId(collectionId)}`;
505
+ const canonical = canonicalSpaceUrl(spaceUrl);
506
+ // At an origin root the Collection id is the first path segment, where a
507
+ // server with a base server URL places its three server-level endpoints,
508
+ // so the spec reserves those segments there (and only there).
509
+ const encodedId = encodeCollectionId({
510
+ collectionId,
511
+ originRoot: isOriginRoot(canonical)
512
+ });
513
+ return `${canonical}${encodedId}`;
336
514
  }
337
515
  /**
338
516
  * `{spaceUrl}{collectionId}/` -- the Collection container in canonical form:
@@ -591,7 +769,9 @@ export function parseSpaceTarget({ spaceUrl, target }) {
591
769
  // A reserved segment directly under the space (`policy`, `backends`,
592
770
  // `export`, ...) addresses a space-level sub-endpoint, as does anything
593
771
  // nested beneath one (`backends/{backendId}`).
594
- if (isReservedCollectionId(segments[0])) {
772
+ if (isReservedCollectionId(segments[0], {
773
+ originRoot: base.pathname === '/'
774
+ })) {
595
775
  return { kind: 'sub-resource', segments };
596
776
  }
597
777
  if (segments.length === 1) {
@@ -1 +1 @@
1
- {"version":3,"file":"paths.js","sourceRoot":"","sources":["../../src/internal/paths.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,OAAO,EAAE,eAAe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UAAU;YAChB,YAAY,EAAE,QAAQ,CAAC,CAAC,CAAW;YACnC,UAAU,EAAE,QAAQ,CAAC,CAAC,CAAW;SAClC,CAAA;IACH,CAAC;IACD,yEAAyE;IACzE,yCAAyC;IACzC,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,QAAQ,EAAE,CAAA;AAC3C,CAAC"}
@@ -1,10 +1,18 @@
1
1
  /**
2
- * Whether `id` is a reserved Collection-id path segment.
2
+ * Whether `id` is a reserved Collection-id path segment. At a Space served
3
+ * from an origin root the Collection id is the first path segment, where a
4
+ * server with a base server URL places its server-level endpoints, so the
5
+ * spec reserves those segments there too (and only there).
3
6
  *
4
7
  * @param id {string}
8
+ * @param options {object}
9
+ * @param [options.originRoot] {boolean} whether the Space is served from an
10
+ * origin root
5
11
  * @returns {boolean}
6
12
  */
7
- export declare function isReservedCollectionId(id: string): boolean;
13
+ export declare function isReservedCollectionId(id: string, { originRoot }?: {
14
+ originRoot?: boolean;
15
+ }): boolean;
8
16
  /**
9
17
  * Whether `id` is a reserved Resource-id path segment.
10
18
  *
@@ -20,10 +28,14 @@ export declare function isReservedResourceId(id: string): boolean;
20
28
  * @param options.id {string} the proposed collection or resource id
21
29
  * @param options.kind {string} 'collection' or 'resource', selects the
22
30
  * reserved set and is used in the message
31
+ * @param [options.originRoot] {boolean} whether the Space is served from an
32
+ * origin root, where the server-level endpoint segments are reserved as
33
+ * Collection ids too
23
34
  * @returns {void}
24
35
  */
25
- export declare function assertNotReserved({ id, kind }: {
36
+ export declare function assertNotReserved({ id, kind, originRoot }: {
26
37
  id: string;
27
38
  kind: 'collection' | 'resource';
39
+ originRoot?: boolean;
28
40
  }): void;
29
41
  //# sourceMappingURL=reserved.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"reserved.d.ts","sourceRoot":"","sources":["../../src/internal/reserved.ts"],"names":[],"mappings":"AAoBA;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAE1D;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAExD;AAED;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,EAAE,EACF,IAAI,EACL,EAAE;IACD,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,YAAY,GAAG,UAAU,CAAA;CAChC,GAAG,IAAI,CAQP"}
1
+ {"version":3,"file":"reserved.d.ts","sourceRoot":"","sources":["../../src/internal/reserved.ts"],"names":[],"mappings":"AAqBA;;;;;;;;;;;GAWG;AACH,wBAAgB,sBAAsB,CACpC,EAAE,EAAE,MAAM,EACV,EAAE,UAAkB,EAAE,GAAE;IAAE,UAAU,CAAC,EAAE,OAAO,CAAA;CAAO,GACpD,OAAO,CAKT;AAcD;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAExD;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,EAAE,EACF,IAAI,EACJ,UAAkB,EACnB,EAAE;IACD,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,YAAY,GAAG,UAAU,CAAA;IAC/B,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB,GAAG,IAAI,CAiBP"}