@interop/was-client 0.99.0 → 0.100.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 (149) hide show
  1. package/README.md +94 -71
  2. package/dist/Collection.d.ts +20 -8
  3. package/dist/Collection.d.ts.map +1 -1
  4. package/dist/Collection.js +89 -69
  5. package/dist/Collection.js.map +1 -1
  6. package/dist/Resource.d.ts +14 -3
  7. package/dist/Resource.d.ts.map +1 -1
  8. package/dist/Resource.js +38 -27
  9. package/dist/Resource.js.map +1 -1
  10. package/dist/Space.d.ts +18 -4
  11. package/dist/Space.d.ts.map +1 -1
  12. package/dist/Space.js +64 -61
  13. package/dist/Space.js.map +1 -1
  14. package/dist/WasClient.d.ts +105 -58
  15. package/dist/WasClient.d.ts.map +1 -1
  16. package/dist/WasClient.js +216 -142
  17. package/dist/WasClient.js.map +1 -1
  18. package/dist/codec.d.ts +3 -2
  19. package/dist/codec.d.ts.map +1 -1
  20. package/dist/edv/EdvCodec.d.ts.map +1 -1
  21. package/dist/edv/EdvCodec.js +37 -26
  22. package/dist/edv/EdvCodec.js.map +1 -1
  23. package/dist/edv/WasTransport.d.ts +7 -4
  24. package/dist/edv/WasTransport.d.ts.map +1 -1
  25. package/dist/edv/WasTransport.js +39 -20
  26. package/dist/edv/WasTransport.js.map +1 -1
  27. package/dist/edv/acquire.d.ts +3 -3
  28. package/dist/edv/acquire.d.ts.map +1 -1
  29. package/dist/edv/acquire.js +3 -3
  30. package/dist/edv/acquire.js.map +1 -1
  31. package/dist/edv/cipher.d.ts +7 -4
  32. package/dist/edv/cipher.d.ts.map +1 -1
  33. package/dist/edv/cipher.js +7 -4
  34. package/dist/edv/cipher.js.map +1 -1
  35. package/dist/edv/core.d.ts +1 -1
  36. package/dist/edv/core.d.ts.map +1 -1
  37. package/dist/edv/core.js +1 -1
  38. package/dist/edv/core.js.map +1 -1
  39. package/dist/edv/docCipher.d.ts +10 -7
  40. package/dist/edv/docCipher.d.ts.map +1 -1
  41. package/dist/edv/docCipher.js +12 -8
  42. package/dist/edv/docCipher.js.map +1 -1
  43. package/dist/edv/encryption.d.ts +2 -2
  44. package/dist/edv/encryption.d.ts.map +1 -1
  45. package/dist/edv/encryption.js +8 -6
  46. package/dist/edv/encryption.js.map +1 -1
  47. package/dist/edv/epochCrypto.d.ts +12 -4
  48. package/dist/edv/epochCrypto.d.ts.map +1 -1
  49. package/dist/edv/epochCrypto.js +37 -10
  50. package/dist/edv/epochCrypto.js.map +1 -1
  51. package/dist/edv/epochKeys.d.ts +6 -2
  52. package/dist/edv/epochKeys.d.ts.map +1 -1
  53. package/dist/edv/epochKeys.js +25 -14
  54. package/dist/edv/epochKeys.js.map +1 -1
  55. package/dist/edv/hmacKey.d.ts +7 -1
  56. package/dist/edv/hmacKey.d.ts.map +1 -1
  57. package/dist/edv/hmacKey.js +9 -3
  58. package/dist/edv/hmacKey.js.map +1 -1
  59. package/dist/edv/index.d.ts +1 -1
  60. package/dist/edv/index.d.ts.map +1 -1
  61. package/dist/edv/index.js +1 -1
  62. package/dist/edv/index.js.map +1 -1
  63. package/dist/edv/recipients.d.ts.map +1 -1
  64. package/dist/edv/recipients.js +2 -0
  65. package/dist/edv/recipients.js.map +1 -1
  66. package/dist/edv/refreshingDocCipher.d.ts +3 -3
  67. package/dist/edv/refreshingDocCipher.d.ts.map +1 -1
  68. package/dist/edv/refreshingDocCipher.js +3 -3
  69. package/dist/edv/refreshingDocCipher.js.map +1 -1
  70. package/dist/edv/transportFactory.d.ts +3 -3
  71. package/dist/edv/transportFactory.d.ts.map +1 -1
  72. package/dist/edv/transportFactory.js +3 -3
  73. package/dist/edv/transportFactory.js.map +1 -1
  74. package/dist/errors.d.ts +6 -4
  75. package/dist/errors.d.ts.map +1 -1
  76. package/dist/errors.js +6 -4
  77. package/dist/errors.js.map +1 -1
  78. package/dist/index.d.ts +2 -1
  79. package/dist/index.d.ts.map +1 -1
  80. package/dist/index.js +1 -1
  81. package/dist/index.js.map +1 -1
  82. package/dist/internal/codec.d.ts +7 -7
  83. package/dist/internal/codec.d.ts.map +1 -1
  84. package/dist/internal/codec.js +19 -18
  85. package/dist/internal/codec.js.map +1 -1
  86. package/dist/internal/conditional.d.ts +3 -3
  87. package/dist/internal/conditional.d.ts.map +1 -1
  88. package/dist/internal/conditional.js +5 -5
  89. package/dist/internal/conditional.js.map +1 -1
  90. package/dist/internal/grant.d.ts +15 -26
  91. package/dist/internal/grant.d.ts.map +1 -1
  92. package/dist/internal/grant.js +95 -29
  93. package/dist/internal/grant.js.map +1 -1
  94. package/dist/internal/memo.d.ts +13 -4
  95. package/dist/internal/memo.d.ts.map +1 -1
  96. package/dist/internal/memo.js +18 -7
  97. package/dist/internal/memo.js.map +1 -1
  98. package/dist/internal/meta.d.ts +8 -8
  99. package/dist/internal/meta.d.ts.map +1 -1
  100. package/dist/internal/meta.js +13 -10
  101. package/dist/internal/meta.js.map +1 -1
  102. package/dist/internal/pagination.d.ts +30 -15
  103. package/dist/internal/pagination.d.ts.map +1 -1
  104. package/dist/internal/pagination.js +31 -17
  105. package/dist/internal/pagination.js.map +1 -1
  106. package/dist/internal/paths.d.ts +332 -195
  107. package/dist/internal/paths.d.ts.map +1 -1
  108. package/dist/internal/paths.js +400 -367
  109. package/dist/internal/paths.js.map +1 -1
  110. package/dist/internal/policy.d.ts +23 -23
  111. package/dist/internal/policy.d.ts.map +1 -1
  112. package/dist/internal/policy.js +20 -20
  113. package/dist/internal/policy.js.map +1 -1
  114. package/dist/internal/request.d.ts +17 -21
  115. package/dist/internal/request.d.ts.map +1 -1
  116. package/dist/internal/request.js +10 -21
  117. package/dist/internal/request.js.map +1 -1
  118. package/dist/internal/revoke.d.ts +34 -13
  119. package/dist/internal/revoke.d.ts.map +1 -1
  120. package/dist/internal/revoke.js +97 -28
  121. package/dist/internal/revoke.js.map +1 -1
  122. package/dist/internal/service.d.ts +25 -7
  123. package/dist/internal/service.d.ts.map +1 -1
  124. package/dist/internal/service.js +49 -45
  125. package/dist/internal/service.js.map +1 -1
  126. package/dist/internal/write.d.ts +18 -18
  127. package/dist/internal/write.d.ts.map +1 -1
  128. package/dist/internal/write.js +27 -27
  129. package/dist/internal/write.js.map +1 -1
  130. package/dist/paths.d.ts +32 -25
  131. package/dist/paths.d.ts.map +1 -1
  132. package/dist/paths.js +32 -25
  133. package/dist/paths.js.map +1 -1
  134. package/dist/sync/index.d.ts +4 -2
  135. package/dist/sync/index.d.ts.map +1 -1
  136. package/dist/sync/index.js +4 -2
  137. package/dist/sync/index.js.map +1 -1
  138. package/dist/sync/port.d.ts +3 -3
  139. package/dist/sync/port.d.ts.map +1 -1
  140. package/dist/sync/port.js +12 -12
  141. package/dist/sync/port.js.map +1 -1
  142. package/dist/sync/provisioning.d.ts +10 -9
  143. package/dist/sync/provisioning.d.ts.map +1 -1
  144. package/dist/sync/provisioning.js +19 -18
  145. package/dist/sync/provisioning.js.map +1 -1
  146. package/dist/sync/types.d.ts +2 -2
  147. package/dist/types.d.ts +13 -5
  148. package/dist/types.d.ts.map +1 -1
  149. package/package.json +4 -4
@@ -9,6 +9,13 @@
9
9
  * (`grant`), capability-rebuilding (`fromCapability`), the signed
10
10
  * escape-hatch (`request`), and service discovery (`service`), which every
11
11
  * signed request waits on.
12
+ *
13
+ * A server is identified by its service description URL, and a Space by its
14
+ * own absolute URL. The client is built from the service URL (or from a
15
+ * Spaces Repository URL, whose responses link to the service description),
16
+ * and it opens a Space handle on a URL it was handed: the `Location` of the
17
+ * create response, or one the caller holds. Nothing here assembles a Space
18
+ * URL from a server root, because the spec defines none.
12
19
  */
13
20
  import type { ZcapClient } from '@interop/ezcap';
14
21
  import type { HttpResponse } from '@interop/http-client';
@@ -18,32 +25,44 @@ import { Space } from './Space.js';
18
25
  import { Collection } from './Collection.js';
19
26
  import { Resource } from './Resource.js';
20
27
  import type { EncryptionOverride, GrantOptions, HandleOptions, IDelegatedZcap, ISigner, IZcap, Json, RequestInput, CollectionResourcesList, ResourceSummary, ServiceInfo, SpaceListing } from './types.js';
28
+ /**
29
+ * The one way to name the server a client is built for: the URL of its
30
+ * service description, or the URL of its Spaces Repository (any response from
31
+ * which links to the service description). Exactly one is given.
32
+ */
33
+ export type ServerLocator = {
34
+ serviceUrl: string;
35
+ spacesUrl?: undefined;
36
+ } | {
37
+ spacesUrl: string;
38
+ serviceUrl?: undefined;
39
+ };
21
40
  export declare class WasClient {
22
41
  #private;
23
42
  /**
24
- * The server's Spaces Repository URL, in canonical trailing-slash form
25
- * (`https://host/spaces/`). Service discovery starts here.
43
+ * The service description's URL, when the client was built from one. Read
44
+ * directly by discovery.
26
45
  */
27
- readonly serverUrl: string;
46
+ readonly serviceUrl?: string;
28
47
  /**
29
- * The server base URL every Space path hangs off, without a trailing slash:
30
- * the parent of {@link serverUrl} (`https://host`, or `https://host/was` on
31
- * a sub-path mount). Zcap `invocationTarget`s are built beneath it.
48
+ * The Spaces Repository URL the client was built from, when it was built
49
+ * from one, in canonical container form (trailing slash supplied).
50
+ * Discovery probes it for the `service` link. The URL `createSpace` and
51
+ * `listSpaces` address is the service description's `spaces` member, not
52
+ * this value.
32
53
  */
33
- readonly baseUrl: string;
54
+ readonly spacesUrl?: string;
34
55
  readonly zcapClient: ZcapClient;
35
56
  readonly encryption?: EncryptionProvider;
36
57
  /**
37
58
  * @param options {object}
38
- * @param options.serverUrl {string} the server's Spaces Repository URL
39
- * (`https://host/spaces/`, or `https://host/was/spaces/` on a sub-path
40
- * mount). The base URL for Space paths and zcap `invocationTarget`s is
41
- * its parent. Service discovery starts from this URL rather than from the
42
- * base, which is often a landing page with no `service` link. The value
43
- * is normalized to canonical form; `baseUrlOfSpacesUrl` in `./paths`
44
- * states what is accepted. The client is built from this URL only: a
45
- * server with no Spaces Repository (the spec leaves the endpoint
46
- * optional) has no URL this constructor accepts and is not supported.
59
+ * @param [options.serviceUrl] {string} the URL of the server's service
60
+ * description. Discovery reads it with an unsigned `GET`. Exactly one of
61
+ * `serviceUrl` and `spacesUrl` is given
62
+ * @param [options.spacesUrl] {string} the server's Spaces Repository
63
+ * URL, for a caller that holds that rather than the service URL.
64
+ * Discovery sends an unsigned `HEAD` to it and follows the `service`
65
+ * link every response carries
47
66
  * @param options.zcapClient {ZcapClient} an ezcap client holding the signer
48
67
  * @param [options.encryption] {EncryptionProvider} the keystore that
49
68
  * supplies keys for collections declared encrypted (by their `encryption`
@@ -54,15 +73,15 @@ export declare class WasClient {
54
73
  * closed rather than silently downgrading to plaintext.
55
74
  * @param [options.serviceDescription] {ServiceDescription} a service
56
75
  * description the caller already holds (from a cache, say). The client
57
- * selects its version from this copy instead of discovering the document
58
- * from `serverUrl`, and still refuses it with `IncompatibleServerError` if
59
- * it names no version this client speaks or advertises a Spaces Repository
60
- * other than `serverUrl`. `service({ refresh: true })` discards it and
61
- * discovers afresh.
62
- * @throws {ValidationError} when `serverUrl` is not a Spaces Repository URL
76
+ * selects its version from this copy instead of discovering the document,
77
+ * and still refuses it with `IncompatibleServerError` if it names no
78
+ * version this client speaks, or (for a client built from `serviceUrl`)
79
+ * if its `url` is another server's service URL. `service({ refresh:
80
+ * true })` discards it and discovers afresh.
81
+ * @throws {ValidationError} when neither or both of `serviceUrl` and
82
+ * `spacesUrl` are given, or the one given is not an absolute http(s) URL
63
83
  */
64
- constructor({ serverUrl, zcapClient, encryption, serviceDescription }: {
65
- serverUrl: string;
84
+ constructor({ serviceUrl, spacesUrl, zcapClient, encryption, serviceDescription }: ServerLocator & {
66
85
  zcapClient: ZcapClient;
67
86
  encryption?: EncryptionProvider;
68
87
  serviceDescription?: ServiceDescription;
@@ -77,15 +96,15 @@ export declare class WasClient {
77
96
  * and never needs a JSON-LD document loader to serve the suite's context.
78
97
  *
79
98
  * @param options {object}
80
- * @param options.serverUrl {string}
99
+ * @param [options.serviceUrl] {string} see the constructor
100
+ * @param [options.spacesUrl] {string} see the constructor
81
101
  * @param options.signer {ISigner}
82
102
  * @param [options.encryption] {EncryptionProvider} see the constructor
83
103
  * @param [options.serviceDescription] {ServiceDescription} see the
84
104
  * constructor
85
105
  * @returns {WasClient}
86
106
  */
87
- static fromSigner({ serverUrl, signer, encryption, serviceDescription }: {
88
- serverUrl: string;
107
+ static fromSigner({ signer, encryption, serviceDescription, ...locator }: ServerLocator & {
89
108
  signer: ISigner;
90
109
  encryption?: EncryptionProvider;
91
110
  serviceDescription?: ServiceDescription;
@@ -99,12 +118,12 @@ export declare class WasClient {
99
118
  get controllerDid(): string;
100
119
  /**
101
120
  * Discovers the server's service description and the WAS version this
102
- * client speaks with it. Follows the `rel="service"` link on the response to
103
- * an unsigned `HEAD` of `serverUrl` (the Spaces Repository URL), then reads
104
- * the linked document with an unsigned `GET`. No capability is invoked. The
105
- * result is memoized for the life of the client and shared by every handle;
106
- * concurrent callers share one discovery, and a failure is not memoized, so
107
- * the next call retries.
121
+ * client speaks with it. A client built from `serviceUrl` reads the document
122
+ * with an unsigned `GET`; one built from `spacesUrl` first follows the
123
+ * `rel="service"` link on the response to an unsigned `HEAD` of that URL.
124
+ * No capability is invoked. The result is memoized for the life of the
125
+ * client and shared by every handle; concurrent callers share one
126
+ * discovery, and a failure is not memoized, so the next call retries.
108
127
  *
109
128
  * Every signed request waits on this discovery, so a caller rarely needs to
110
129
  * call it first. It is the way to read the server-wide affordances:
@@ -120,18 +139,21 @@ export declare class WasClient {
120
139
  * caller about to rely on an affordance the server may have stopped
121
140
  * advertising
122
141
  * @returns {Promise<ServiceInfo>}
123
- * @throws {IncompatibleServerError} when the server's responses carry no
124
- * `service` link (it predates v0.5), the document is malformed, it lists
125
- * no version this client speaks, or it advertises a Spaces Repository URL
126
- * other than `serverUrl`
142
+ * @throws {IncompatibleServerError} when the probed response carries no
143
+ * `service` link (the server predates v0.5), the document is malformed,
144
+ * or it lists no version this client speaks
127
145
  */
128
146
  service(options?: {
129
147
  refresh?: boolean;
130
148
  }): Promise<ServiceInfo>;
131
149
  /**
132
- * Returns a lazy handle to a space by id. No I/O.
150
+ * Returns a lazy handle to a Space by its absolute URL, as the server
151
+ * named it (the `Location` of the create response, a listing item's `url`,
152
+ * a stored pointer, or the URL a self-locating DID resolves to). No I/O.
153
+ * The URL is canonicalized (see `canonicalSpaceUrl` on the `./paths`
154
+ * entry), and every Collection and Resource URL derives from it.
133
155
  *
134
- * @param spaceId {string}
156
+ * @param spaceUrl {string}
135
157
  * @param options {object}
136
158
  * @param [options.capability] {IZcap}
137
159
  * @param [options.encryption] {EncryptionOverride} the default encryption
@@ -139,13 +161,16 @@ export declare class WasClient {
139
161
  * `EncryptionOverride`); `space.collection(id, { encryption })` overrides
140
162
  * it per collection
141
163
  * @returns {Space}
164
+ * @throws {ValidationError} when `spaceUrl` is not a Space URL
142
165
  */
143
- space(spaceId: string, options?: HandleOptions): Space;
166
+ spaceAt(spaceUrl: string, options?: HandleOptions): Space;
144
167
  /**
145
168
  * Creates a space (server-generated id unless `id` is given). `name` is
146
169
  * optional (both in the spec and on the reference server); `controller` must
147
170
  * match the wrapped signer's DID (which is the default). The request goes
148
- * to the Spaces Repository URL the service description names.
171
+ * to the Spaces Repository URL the service description names, and the
172
+ * returned handle is opened on the Space URL the response's `Location`
173
+ * names: the server chooses where the Space lives.
149
174
  *
150
175
  * @param desc {object}
151
176
  * @param [desc.id] {string}
@@ -157,6 +182,7 @@ export declare class WasClient {
157
182
  * immutable after creation
158
183
  * @returns {Promise<Space>}
159
184
  * @throws {NotSupportedError} when the server has no Spaces Repository
185
+ * @throws {WasServerError} when the create response carries no `Location`
160
186
  */
161
187
  createSpace(desc?: {
162
188
  id?: string;
@@ -171,19 +197,19 @@ export declare class WasClient {
171
197
  * authorized for, auxiliary spaces included. Each item carries the space's
172
198
  * `type` array, the same value as its Space Metadata object's `type`, so a
173
199
  * caller can tell an auxiliary space (one whose `type` names
174
- * `AuxiliarySpace`) from a user-data one without reading each space.
200
+ * `AuxiliarySpace`) from a user-data one without reading each space, and
201
+ * its `url`, the Space URL to open a handle on with {@link spaceAt}.
175
202
  * An unauthorized caller is not an error -- the server
176
203
  * returns an empty `items` list (the spec's explicit exception to 404
177
204
  * masking), so nothing is revealed about which spaces exist.
178
205
  *
179
206
  * Transparently follows the server's `next` pagination links, buffering every
180
- * page into a single listing (the returned envelope omits `next`). Because a
181
- * paginating server omits `totalItems` on a truncated page, `totalItems` on
182
- * the aggregate is recomputed from the collected items -- sound here, since
183
- * the walk has gathered the complete listing.
207
+ * page into a single listing. The returned envelope omits `next`, and its
208
+ * `totalItems` counts the collected items.
184
209
  *
185
210
  * @returns {Promise<SpaceListing>}
186
211
  * @throws {NotSupportedError} when the server has no Spaces Repository
212
+ * @throws {WasServerError} when the listing cannot be read in full
187
213
  */
188
214
  listSpaces(): Promise<SpaceListing>;
189
215
  /**
@@ -247,7 +273,15 @@ export declare class WasClient {
247
273
  /**
248
274
  * Rebuilds an access handle from a received capability, returning a handle at
249
275
  * the depth implied by the capability's `invocationTarget` (space /
250
- * collection / resource), pre-bound with that capability.
276
+ * collection / resource), pre-bound with that capability. The Space is read
277
+ * off the capability's delegation chain, which starts at the Space's root
278
+ * capability (whose id encodes the Space URL), so a capability from any
279
+ * server locates its own Space with no out-of-band base. The root's target
280
+ * is taken to be the Space URL: a Space URL has no shape of its own, so a
281
+ * chain rooted elsewhere (a bare `was.grant({ target })` for a server with
282
+ * no Space hierarchy roots at its target) is read as if that target were
283
+ * the Space, and the server refuses the handle's requests. See `spaceUrlOf`
284
+ * on the `./paths` entry.
251
285
  *
252
286
  * A resource-scoped capability cannot read the Collection Metadata object, so
253
287
  * an encryption-capable client cannot discover whether the collection is
@@ -264,26 +298,37 @@ export declare class WasClient {
264
298
  * @param [options.encryption] {EncryptionOverride} per-handle encryption
265
299
  * override for the returned handle (see `EncryptionOverride`)
266
300
  * @returns {Space | Collection | Resource}
301
+ * @throws {ValidationError} when the capability's chain starts at no root
302
+ * capability or at one whose target cannot be a Space URL, or its
303
+ * `invocationTarget` is not at or beneath that Space, addresses a
304
+ * reserved sub-resource with no navigational handle, or is not in
305
+ * canonical form (so the handle's requests would fall outside it)
267
306
  */
268
307
  fromCapability(zcap: IZcap, { encryption }?: {
269
308
  encryption?: EncryptionOverride;
270
309
  }): Space | Collection | Resource;
271
310
  /**
272
311
  * The general delegation primitive. Delegates a capability per `GrantOptions`
273
- * and returns the signed zcap to hand off out-of-band. `target` (any URL) and
274
- * `capability` (a parent capability to attenuate) make this a superset of the
275
- * `space`/`collection` grant sugar.
312
+ * and returns the signed zcap to hand off out-of-band. `target` (any URL),
313
+ * `spaceUrl` (the Space to root a revocable grant in) and `capability` (a
314
+ * parent capability to attenuate) make this a superset of the
315
+ * `space`/`collection` grant sugar, which fills the first two from the
316
+ * handle. Without `spaceUrl` or `capability`, the grant is rooted at the
317
+ * target's own root capability: the shape for a server with no Space
318
+ * hierarchy (fixed collections, or resources alone), where there is no
319
+ * Space to root a chain in. Such a grant is not Space-revocable.
276
320
  *
277
321
  * @param options {GrantOptions}
278
322
  * @returns {Promise<IDelegatedZcap>}
279
323
  */
280
324
  grant(options: GrantOptions): Promise<IDelegatedZcap>;
281
325
  /**
282
- * The general revocation primitive -- the inverse of {@link grant}. Derives
283
- * the owning space from the capability's `invocationTarget` (which a
284
- * Space-rooted capability always addresses at or beneath) and submits it to
285
- * that space's revocation endpoint. Equivalent to
286
- * `was.space(id).revoke(zcap)`.
326
+ * The general revocation primitive -- the inverse of {@link grant}. Reads
327
+ * the owning Space off the capability's delegation chain (a Space-rooted
328
+ * chain starts at the Space's root capability) and submits it to that
329
+ * Space's revocation endpoint. Equivalent to `was.spaceAt(url).revoke(zcap)`.
330
+ * The chain root's target is taken to be the Space (see `spaceUrlOf` on the
331
+ * `./paths` entry); the server refuses a chain not rooted exactly in it.
287
332
  *
288
333
  * Revocation is scoped to one space: there is no cross-space or global
289
334
  * revocation. See {@link Space.revoke} for who may call it, what it does and
@@ -291,12 +336,14 @@ export declare class WasClient {
291
336
  *
292
337
  * @param zcap {IDelegatedZcap} the delegated capability to revoke
293
338
  * @returns {Promise<void>}
339
+ * @throws {ValidationError} when the capability's chain starts at no root
340
+ * capability, or at one whose target cannot be a Space URL
294
341
  */
295
342
  revoke(zcap: IDelegatedZcap): Promise<void>;
296
343
  /**
297
- * The signed escape hatch, mirroring ezcap's generic `request()`. Resolves
298
- * `path` against `baseUrl`, defaults `action` to `method`, uppercases both
299
- * (as {@link grant} does, so `'put'` signs `PUT`), and signs via the wrapped
344
+ * The signed escape hatch, mirroring ezcap's generic `request()`. Takes an
345
+ * absolute `url`, defaults `action` to `method`, uppercases both (as
346
+ * {@link grant} does, so `'put'` signs `PUT`), and signs via the wrapped
300
347
  * client. Returns the raw `HttpResponse` and throws raw ky/ezcap
301
348
  * errors -- it does not apply the null-on-404 or typed-error conveniences.
302
349
  * Like every signed request it waits on {@link service} first, and rejects
@@ -1 +1 @@
1
- {"version":3,"file":"WasClient.d.ts","sourceRoot":"","sources":["../src/WasClient.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;GAQG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACxD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAA;AA8B/D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACxC,OAAO,KAAK,EACV,kBAAkB,EAClB,YAAY,EACZ,aAAa,EACb,cAAc,EACd,OAAO,EACP,KAAK,EACL,IAAI,EACJ,YAAY,EACZ,uBAAuB,EACvB,eAAe,EACf,WAAW,EACX,YAAY,EACb,MAAM,YAAY,CAAA;AAEnB,qBAAa,SAAS;;IACpB;;;OAGG;IACH,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B;;;;OAIG;IACH,QAAQ,C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