@flipstream/sdk 0.12.0 → 0.14.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 +65 -0
- package/README.md +128 -30
- package/dist/api/backend.d.ts +18 -3
- package/dist/api/backend.js +33 -6
- package/dist/api/backend.js.map +1 -1
- package/dist/api/credentials.js +4 -4
- package/dist/api/credentials.js.map +1 -1
- package/dist/api/datasets.js +30 -50
- package/dist/api/datasets.js.map +1 -1
- package/dist/api/handoff.d.ts +1 -1
- package/dist/api/handoff.js +7 -0
- package/dist/api/handoff.js.map +1 -1
- package/dist/api/log.d.ts +4 -4
- package/dist/api/log.js +23 -42
- package/dist/api/log.js.map +1 -1
- package/dist/api/me.d.ts +5 -3
- package/dist/api/me.js +5 -4
- package/dist/api/me.js.map +1 -1
- package/dist/api/members.d.ts +40 -17
- package/dist/api/members.js +66 -29
- package/dist/api/members.js.map +1 -1
- package/dist/api/ownRecord.d.ts +46 -0
- package/dist/api/ownRecord.js +57 -0
- package/dist/api/ownRecord.js.map +1 -0
- package/dist/api/refusal.d.ts +14 -0
- package/dist/api/refusal.js +23 -0
- package/dist/api/refusal.js.map +1 -0
- package/dist/api/wallet.d.ts +2 -1
- package/dist/api/wallet.js +18 -21
- package/dist/api/wallet.js.map +1 -1
- package/dist/api/workspaces.d.ts +14 -9
- package/dist/api/workspaces.js +21 -15
- package/dist/api/workspaces.js.map +1 -1
- package/dist/auth/discovery.js +3 -1
- package/dist/auth/discovery.js.map +1 -1
- package/dist/core/call.d.ts +12 -2
- package/dist/core/call.js +5 -2
- package/dist/core/call.js.map +1 -1
- package/dist/core/identify.d.ts +65 -14
- package/dist/core/identify.js +69 -27
- package/dist/core/identify.js.map +1 -1
- package/dist/core/inPlaceOf.d.ts +6 -0
- package/dist/core/inPlaceOf.js +17 -0
- package/dist/core/inPlaceOf.js.map +1 -0
- package/dist/core/invalid.d.ts +32 -6
- package/dist/core/invalid.js +36 -17
- package/dist/core/invalid.js.map +1 -1
- package/dist/core/notFound.d.ts +2 -2
- package/dist/core/notFound.js.map +1 -1
- package/dist/core/read.d.ts +6 -3
- package/dist/core/read.js +5 -6
- package/dist/core/read.js.map +1 -1
- package/dist/core/result.d.ts +16 -8
- package/dist/core/result.js +1 -0
- package/dist/core/result.js.map +1 -1
- package/dist/core/shared.d.ts +43 -0
- package/dist/core/shared.js +178 -0
- package/dist/core/shared.js.map +1 -0
- package/dist/core/signal.d.ts +12 -0
- package/dist/core/signal.js +25 -0
- package/dist/core/signal.js.map +1 -0
- package/dist/flipstream.d.ts +160 -22
- package/dist/flipstream.js +207 -81
- package/dist/flipstream.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/node/clientSecret.js +2 -1
- package/dist/node/clientSecret.js.map +1 -1
- package/dist/node/keychainChild.js +60 -25
- package/dist/node/keychainChild.js.map +1 -1
- package/dist/node/keychainError.d.ts +4 -1
- package/dist/node/keychainError.js.map +1 -1
- package/dist/node/keychainStore.js +42 -8
- package/dist/node/keychainStore.js.map +1 -1
- package/dist/node/loopback.d.ts +5 -2
- package/dist/node/loopback.js +28 -3
- package/dist/node/loopback.js.map +1 -1
- package/dist/node/session.js +11 -5
- package/dist/node/session.js.map +1 -1
- package/dist/query/query.d.ts +52 -8
- package/dist/query/query.js +133 -19
- package/dist/query/query.js.map +1 -1
- package/dist/version.gen.js +1 -1
- package/docs/admin.md +108 -4
- package/docs/node-sign-in.md +11 -5
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,70 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.14.0](https://github.com/flipstream-io/sdk/compare/typescript-v0.13.0...typescript-v0.14.0) (2026-11-25)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### ⚠ BREAKING CHANGES
|
|
7
|
+
|
|
8
|
+
* **typescript:** an answer whose rows or totals hold a key outside the dimensions and metrics asked for is invalid.
|
|
9
|
+
|
|
10
|
+
### Features
|
|
11
|
+
|
|
12
|
+
* **typescript:** a scope takes the caller's trace, scope({ traceparent }) and withScope(run, { traceparent }), so a command's shared reads are one trace ([#411](https://github.com/flipstream-io/sdk/issues/411)) ([1d865f4](https://github.com/flipstream-io/sdk/commit/1d865f43f031977dc9415f31b62c50a492121966))
|
|
13
|
+
* **typescript:** flipstream.members.remove() hands off to a person, with the person's page in the console ([#415](https://github.com/flipstream-io/sdk/issues/415)) ([ee35d67](https://github.com/flipstream-io/sdk/commit/ee35d67f07b83dfcda315a5c71b2104bca09ec7f))
|
|
14
|
+
* **typescript:** queryRefusal(request) gives the whole refusal flipstream.query answers before sending, so an app checks a request offline with the SDK's own rule ([#414](https://github.com/flipstream-io/sdk/issues/414)) ([b950335](https://github.com/flipstream-io/sdk/commit/b9503354d1acd2df10cdf369d85d611311a31b9c))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* **typescript:** a keychain helper whose spawn fails on EMFILE or ENFILE keeps that error, with its code, as the step's cause ([#407](https://github.com/flipstream-io/sdk/issues/407)) ([d8b45ef](https://github.com/flipstream-io/sdk/commit/d8b45ef789717971a767a063a458d8cea97142cc))
|
|
20
|
+
* **typescript:** a keychain helper whose spawn gives no stdio at all fails as "the keychain helper's pipes didn't open", never with a TypeError's words ([#403](https://github.com/flipstream-io/sdk/issues/403)) ([99f5d1d](https://github.com/flipstream-io/sdk/commit/99f5d1d7288e0c5de37c0efc9b340b1061e78a6d))
|
|
21
|
+
* **typescript:** a record's or a workspace's own 403 answers not_found, as one nobody has, so a refusal can't say it exists (D578) ([#410](https://github.com/flipstream-io/sdk/issues/410)) ([368ca8c](https://github.com/flipstream-io/sdk/commit/368ca8cc994b1a5fcdb579291a9c2a0f8fe79125))
|
|
22
|
+
* **typescript:** datasets.get and log.get answer your read's failure before the record's, so a refused sign-in can't tell an existing record from a missing one ([#405](https://github.com/flipstream-io/sdk/issues/405)) ([bfb88fc](https://github.com/flipstream-io/sdk/commit/bfb88fcd14278e68f47eb905c9a15174c332ed8b))
|
|
23
|
+
* **typescript:** every invalid a check finds after a read carries the status its answer came with, never one assumed for the route ([#392](https://github.com/flipstream-io/sdk/issues/392)) ([ace8ed0](https://github.com/flipstream-io/sdk/commit/ace8ed0a56216aeb7f4e4413503294c01b2d2f1f))
|
|
24
|
+
* **typescript:** flipstream.query answers invalid when a row holds a key the query didn't ask for, naming the keys, never their values ([#412](https://github.com/flipstream-io/sdk/issues/412)) ([b6bfb8e](https://github.com/flipstream-io/sdk/commit/b6bfb8e858cb7154f374dcb8d5ecb874ff4408c7))
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
### Performance Improvements
|
|
28
|
+
|
|
29
|
+
* **typescript:** the keychain helper reads its requests by hand, without zod, so it starts about 20 ms sooner ([#401](https://github.com/flipstream-io/sdk/issues/401)) ([9f9d1ae](https://github.com/flipstream-io/sdk/commit/9f9d1ae2f275d2254b0fd8626a21d0c11c127d57))
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
### Code Refactoring
|
|
33
|
+
|
|
34
|
+
* **typescript:** only an answer readParsed made can carry its status into a check: one rebuilt from its data is a type error ([#398](https://github.com/flipstream-io/sdk/issues/398)) ([3299ae6](https://github.com/flipstream-io/sdk/commit/3299ae67aa40fc746540ecc10bd63b76477a7593))
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
### Tests
|
|
38
|
+
|
|
39
|
+
* **typescript:** [#377](https://github.com/flipstream-io/sdk/issues/377)'s scope rows and me()'s three-read deadline run on faked clocks, and a call that spins on them fails by name ([#391](https://github.com/flipstream-io/sdk/issues/391)) ([f5c4e62](https://github.com/flipstream-io/sdk/commit/f5c4e629ce56b2989c82b5026b67bdc9b198dd63))
|
|
40
|
+
* **typescript:** a keychain helper's end after its app dies is bounded wide of the test's own lag, and a read's runs on a stretched cut ([#396](https://github.com/flipstream-io/sdk/issues/396)) ([8111a5d](https://github.com/flipstream-io/sdk/commit/8111a5d953865fa5da008250618fc67be01cc403))
|
|
41
|
+
* **typescript:** one model of pulse-auth's refresh-token rotation, shared by the four fake issuers ([#408](https://github.com/flipstream-io/sdk/issues/408)) ([9854095](https://github.com/flipstream-io/sdk/commit/9854095d89deaf55294fbe58b631bb5df75fe67d))
|
|
42
|
+
* **typescript:** recordings keep each request's query as sent, replays compare it exactly, and test/recorded/ is re-recorded ([#399](https://github.com/flipstream-io/sdk/issues/399)) ([f92b52b](https://github.com/flipstream-io/sdk/commit/f92b52b856ac167135eaac10b4a352dc7926a577))
|
|
43
|
+
* **typescript:** the keychain helper's cut is pinned as it computes it, on its own clock, recorded by a preload as request-budget records the budget ([#397](https://github.com/flipstream-io/sdk/issues/397)) ([b81f284](https://github.com/flipstream-io/sdk/commit/b81f284be2debf41d86427f5d925d872bcb38afb))
|
|
44
|
+
* **typescript:** the slow-spawn row proves a late step is never written to the helper started for it ([#402](https://github.com/flipstream-io/sdk/issues/402)) ([5f2f830](https://github.com/flipstream-io/sdk/commit/5f2f830228ec6a1cb0100bbd97d149525d591d28))
|
|
45
|
+
* **typescript:** the stuck-helper test knows its helper from a warm read, never from a pid file a slow start may not have written ([#400](https://github.com/flipstream-io/sdk/issues/400)) ([901fe66](https://github.com/flipstream-io/sdk/commit/901fe660f7ad647df67ec1fdf84d2207cd2b2be9))
|
|
46
|
+
|
|
47
|
+
## [0.13.0](https://github.com/flipstream-io/sdk/compare/typescript-v0.12.0...typescript-v0.13.0) (2026-11-18)
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
### Features
|
|
51
|
+
|
|
52
|
+
* **typescript:** a page identifies its requests to the deployed query API as Flipstream-Client, with traceparent and baggage, and to no other host ([#378](https://github.com/flipstream-io/sdk/issues/378)) ([4a12a54](https://github.com/flipstream-io/sdk/commit/4a12a54bab9bb4a3a38f4b2675d6156e1976ebf8))
|
|
53
|
+
* **typescript:** flipstream.scope() and withScope(), so the calls of one piece of work share your organisation, person and workspace reads ([#377](https://github.com/flipstream-io/sdk/issues/377)) ([1941425](https://github.com/flipstream-io/sdk/commit/19414253996cce772f7d872cfdbc8cf81e3acbb4))
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
### Bug Fixes
|
|
57
|
+
|
|
58
|
+
* **typescript:** a signal with no removeEventListener, as a minimal polyfill's, is taken by signInWithLoopback and session.revoke(), which keep their result instead of throwing once their work is done ([#389](https://github.com/flipstream-io/sdk/issues/389)) ([5f6fafe](https://github.com/flipstream-io/sdk/commit/5f6fafef212544de6d66d36cdb11fb7d32149d52))
|
|
59
|
+
* **typescript:** an invalid from discover() or a session's OpenID configuration carries the status its server answered with ([#384](https://github.com/flipstream-io/sdk/issues/384)) ([d14ba89](https://github.com/flipstream-io/sdk/commit/d14ba8970c73b71b2fbf38191c5fe61e1ec90e60))
|
|
60
|
+
* **typescript:** signInWithLoopback checks open, readPasted and signal before anything else: one of the wrong kind is a TypeError naming it, never timeout, open_failed or paste_failed ([#389](https://github.com/flipstream-io/sdk/issues/389)) ([5f6fafe](https://github.com/flipstream-io/sdk/commit/5f6fafef212544de6d66d36cdb11fb7d32149d52))
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
### Tests
|
|
64
|
+
|
|
65
|
+
* **typescript:** a test's bound on time runs on faked clocks, or leaves a loaded runner room ([#382](https://github.com/flipstream-io/sdk/issues/382)) ([1a9aab9](https://github.com/flipstream-io/sdk/commit/1a9aab9bcee827023f796f9b7aaf018ce0853a8d))
|
|
66
|
+
* **typescript:** record-admin.mjs records each paged list as the SDK asks for it, and each replay compares with what the SDK sends ([#388](https://github.com/flipstream-io/sdk/issues/388)) ([ecafb6c](https://github.com/flipstream-io/sdk/commit/ecafb6c19bd5b727dc2a5d5605a227db55f9b150))
|
|
67
|
+
|
|
3
68
|
## [0.12.0](https://github.com/flipstream-io/sdk/compare/typescript-v0.11.0...typescript-v0.12.0) (2026-11-17)
|
|
4
69
|
|
|
5
70
|
|
package/README.md
CHANGED
|
@@ -117,6 +117,9 @@ const member = orThrow(await flipstream.members.get({ member_id: page.items[0]?.
|
|
|
117
117
|
console.log(member.first_name, member.workspace_ids.length)
|
|
118
118
|
```
|
|
119
119
|
|
|
120
|
+
Removing someone is a person's to do, in the console: `flipstream.members.remove({ member_id })`
|
|
121
|
+
never writes, and answers `needs_person`.
|
|
122
|
+
|
|
120
123
|
**The rest is in [docs/admin.md](docs/admin.md),** under "Your organisation's members".
|
|
121
124
|
|
|
122
125
|
## Workspaces
|
|
@@ -136,8 +139,9 @@ console.log(workspace.slug)
|
|
|
136
139
|
```
|
|
137
140
|
|
|
138
141
|
**A workspace you don't open is `not_found`,** exactly as one nobody has, in every call under one
|
|
139
|
-
workspace, its logbook's and its datasets' included, and a write sends nothing
|
|
140
|
-
|
|
142
|
+
workspace, its logbook's and its datasets' included, and a write sends nothing. So is a workspace,
|
|
143
|
+
a dataset or a log entry whose own read the service refuses with its own 403: a refusal says it
|
|
144
|
+
exists (see "The workspaces you open" in [docs/admin.md](docs/admin.md)).
|
|
141
145
|
|
|
142
146
|
**The rest is in [docs/admin.md](docs/admin.md),** under "Workspaces".
|
|
143
147
|
|
|
@@ -220,6 +224,42 @@ if (ledger !== null) console.log(ledger.items.length, 'rows')
|
|
|
220
224
|
|
|
221
225
|
**The rest is in [docs/admin.md](docs/admin.md),** under "Wallet".
|
|
222
226
|
|
|
227
|
+
## One piece of work
|
|
228
|
+
|
|
229
|
+
Outside a scope, every call that needs them reads your organisation, you and its workspace first,
|
|
230
|
+
each time. A scope lets the calls of one piece of work, such as a page's load or a command, share
|
|
231
|
+
those reads. They're read from the service at the first call that needs them, and dropped when the
|
|
232
|
+
scope closes. `flipstream.withScope(run)` makes one for the length of `run`; `flipstream.scope()`
|
|
233
|
+
makes one each call takes as `{ scope }`, which you close (or `await using`). Give either your W3C
|
|
234
|
+
trace context, `{ traceparent }`, and in Node the scope's shared reads on the admin host go out
|
|
235
|
+
under its trace-id, so one piece of work is one trace. From a browser the admin host gets no trace
|
|
236
|
+
yet, so there it changes nothing (see "One piece of work" in [docs/admin.md](docs/admin.md)).
|
|
237
|
+
|
|
238
|
+
```ts
|
|
239
|
+
import { createFlipstream } from '@flipstream/sdk'
|
|
240
|
+
|
|
241
|
+
const flipstream = createFlipstream({ app: { name: 'my-app', version: '1.0.0' }, token: async () => '<your token>' })
|
|
242
|
+
|
|
243
|
+
const [workspace, datasets, log] = await flipstream.withScope((f) =>
|
|
244
|
+
Promise.all([
|
|
245
|
+
f.workspaces.get({ workspace_id: '<workspace id>' }),
|
|
246
|
+
f.datasets.list({ workspace_id: '<workspace id>' }),
|
|
247
|
+
f.log.list({ workspace_id: '<workspace id>' }),
|
|
248
|
+
]),
|
|
249
|
+
)
|
|
250
|
+
console.log(workspace.ok, datasets.ok, log.ok)
|
|
251
|
+
|
|
252
|
+
const scope = flipstream.scope()
|
|
253
|
+
try {
|
|
254
|
+
const me = await flipstream.me({ scope })
|
|
255
|
+
console.log(me.ok)
|
|
256
|
+
} finally {
|
|
257
|
+
await scope.close()
|
|
258
|
+
}
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
**The rest is in [docs/admin.md](docs/admin.md),** under "One piece of work".
|
|
262
|
+
|
|
223
263
|
## Signing in from Node and the CLI
|
|
224
264
|
|
|
225
265
|
For an app that runs on the person's own machine, or in their terminal: a CLI, a script, a local
|
|
@@ -274,6 +314,12 @@ const flipstream = createFlipstream({ app: { name: 'my-cli', version: '1.0.0' },
|
|
|
274
314
|
or more than that once rounded down) is a `TypeError` naming `signInWithLoopback`, with no port
|
|
275
315
|
opened. One under 1 ms ends as `timeout`, with no port opened and nothing shown, once `server`,
|
|
276
316
|
`clientId` and `scopes` pass the checks a sign-in makes: a mistake in them is still a `TypeError`.
|
|
317
|
+
- **`open`, `readPasted` and `signal` of the wrong kind are a `TypeError` naming the option,**
|
|
318
|
+
before any port opens, whatever `timeoutMs` and even with a `signal` already aborted: an `open` or
|
|
319
|
+
a `readPasted` that isn't a function, or a `signal` with no `aborted` or no `addEventListener`
|
|
320
|
+
method (`null` is a `signal` left out). Only JavaScript can pass them, or leave out the options,
|
|
321
|
+
which is a `TypeError` naming `signInWithLoopback`. `open_failed` and `paste_failed` are an
|
|
322
|
+
`open` or a reader that throws or rejects.
|
|
277
323
|
- **The redirect is checked before its code is exchanged:** the sign-in's own state first, then the
|
|
278
324
|
issuer.
|
|
279
325
|
- **`page: { signedIn, failed }`** sets the HTML the browser shows afterwards.
|
|
@@ -305,11 +351,13 @@ The main entry, `@flipstream/sdk`, runs in browsers with no Node polyfills. Only
|
|
|
305
351
|
|
|
306
352
|
- **Pass a token function** that returns the session's current access token. Never put an API key
|
|
307
353
|
in a browser.
|
|
308
|
-
- **The API must allow your page's origin (CORS).** The query API
|
|
309
|
-
so until it
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
354
|
+
- **The API must allow your page's origin (CORS).** The query API's CORS takes the origins it allows
|
|
355
|
+
from its own settings, and lists none in production yet, so until it lists yours, call it from a
|
|
356
|
+
server.
|
|
357
|
+
- **A page identifies itself to the deployed query API,** as `Flipstream-Client`, with `traceparent`
|
|
358
|
+
and `baggage` (see "Which app sent a request"). To a custom `hosts.query`, pulse-admin and
|
|
359
|
+
pulse-wallet, not: their CORS isn't known to allow those headers. `app`, `agent` and
|
|
360
|
+
`conversationId` are required and checked as in Node.
|
|
313
361
|
- **Signing in from a page** uses the same two halves as the paste-back ("Over SSH, in CI, or
|
|
314
362
|
with no display" in [docs/node-sign-in.md](docs/node-sign-in.md)):
|
|
315
363
|
- `startSignIn` gives the URL to send the person to, and a `pending` to keep, for instance in
|
|
@@ -387,11 +435,28 @@ as an `ApiFailure` carrying its `error`, for callers who'd rather catch.
|
|
|
387
435
|
`connection_id`, so `dataset_id` goes as that, and the API's own errors may say so. A request
|
|
388
436
|
with any other key, `table` and `connection_id` included, is `refused` with nothing sent, and
|
|
389
437
|
`error.fields` names each one, so a misspelt field never quietly changes the numbers.
|
|
390
|
-
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
438
|
+
- **Every row, and the totals, are keyed by the dimensions and metrics you asked for,** and only
|
|
439
|
+
those. Any other key makes the answer `invalid`, so a storage name can't reach you as data, as
|
|
440
|
+
if it were the one you asked for. The error names at most five of those keys, each shaped like a
|
|
441
|
+
field name, and counts the rest, never a value.
|
|
442
|
+
- **A query that asks for no dimension and no metric is `refused`,** with `reason`
|
|
443
|
+
`nothing_asked`, and nothing is sent, since no answer to it could pass that check. That's a
|
|
444
|
+
query whose `dimensions` and `metrics` are each left out or empty.
|
|
445
|
+
`refusedQueryFields` doesn't report it: it names unknown keys only.
|
|
446
|
+
- **`queryRefusal(request)`** gives the whole check on its own, with no client and nothing sent:
|
|
447
|
+
exactly the `error` `flipstream.query` would answer for that request before sending, or `null`
|
|
448
|
+
for a request it would send. That's `{ kind: 'refused', reason: 'fields', fields }`, the
|
|
449
|
+
unknown keys in the request's order, or `{ kind: 'refused', reason: 'nothing_asked' }`.
|
|
450
|
+
`flipstream.query` runs it itself, so an app can check a request offline (a CLI's `--body` or
|
|
451
|
+
`--dry-run`, say) with the SDK's own rule, and keep no copy of it. It reads the keys, then each
|
|
452
|
+
declared field once, at one moment, and only whether `dimensions` and `metrics` are each left
|
|
453
|
+
out or empty decides `nothing_asked`. A missing `source`, or a value of the wrong type
|
|
454
|
+
(`dimensions: 'page'`, `metrics: [1]`), is still the API's to refuse, so it gives `null` for it.
|
|
455
|
+
- **`refusedQueryFields(request)`** runs the unknown-key check alone, with no client and nothing
|
|
456
|
+
sent. It gives the same names, sorted, or `[]` when the request has no unknown key.
|
|
457
|
+
`queryRefusal` keeps the request's order, as `flipstream.query`'s own error always has, so sort
|
|
458
|
+
its `fields` to compare the two. It reads only the keys: a query asking for nothing is the
|
|
459
|
+
separate `nothing_asked` refusal, which `queryRefusal` gives.
|
|
395
460
|
- **`flipstream.health()`** gives the planner's answer to `GET /health`, an object of strings
|
|
396
461
|
(`{ status: 'ok' }` today). It works signed out: no token is asked for or sent, so it tells "the
|
|
397
462
|
service is down" from "the sign-in is wrong".
|
|
@@ -415,9 +480,9 @@ as an `ApiFailure` carrying its `error`, for callers who'd rather catch.
|
|
|
415
480
|
- **`flipstream.wallet.balance()`** gives a `Balance` or `null`, and
|
|
416
481
|
**`flipstream.wallet.transactions()`** a `Ledger` or `null` (see "Wallet" in
|
|
417
482
|
[docs/admin.md](docs/admin.md)).
|
|
418
|
-
- **`flipstream.members.list({ limit, offset })`** gives a `Page<Member>`,
|
|
419
|
-
**`flipstream.members.get({ member_id })`** a `Member
|
|
420
|
-
[docs/admin.md](docs/admin.md)).
|
|
483
|
+
- **`flipstream.members.list({ limit, offset })`** gives a `Page<Member>`,
|
|
484
|
+
**`flipstream.members.get({ member_id })`** a `Member`, and **`remove({ member_id })`** answers
|
|
485
|
+
`needs_person` (see "Your organisation's members" in [docs/admin.md](docs/admin.md)).
|
|
421
486
|
|
|
422
487
|
**Every answer is checked against the API's spec.** An answer that doesn't match, with a missing
|
|
423
488
|
field or a value of the wrong type, is an `invalid` failure that names the field. It never comes
|
|
@@ -452,14 +517,16 @@ the SDK doesn't know yet is kept, except in the answers of `me()`, `workspaces`,
|
|
|
452
517
|
isn't (a proxy's `Bad gateway`). The sign-ins' and the datasets' own reads and writes keep no
|
|
453
518
|
`text`, since a body there may hold a sign-in's value (see "Sign-ins to your sources" and "A
|
|
454
519
|
workspace's datasets" in [docs/admin.md](docs/admin.md)). The reads of your organisation and a
|
|
455
|
-
workspace beside them keep theirs
|
|
520
|
+
workspace beside them keep theirs, but the service's own refusal of the workspace, which is
|
|
521
|
+
`not_found`.
|
|
456
522
|
- An `invalid` the SDK finds by checking an answer after it arrived (another organisation's record,
|
|
457
|
-
a page that leaks, an id that can't name the next path
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
(`workspaces.create`, `log.add`)
|
|
461
|
-
|
|
462
|
-
|
|
523
|
+
a page that leaks, an id that can't name the next path, a query row keyed by a name it didn't ask
|
|
524
|
+
for) has the `status` that answer came with,
|
|
525
|
+
observed, never assumed: 200 where Flipstream's routes answer 200, the 2xx a create's answer came
|
|
526
|
+
with (`workspaces.create`, `log.add`), and whatever an authorisation server (`discover()`, a
|
|
527
|
+
session's OpenID configuration) or anything in front of a route answered. A retried read's is the last
|
|
528
|
+
attempt's. When the read after pause's or resume's write fails, the `invalid` keeps that read's
|
|
529
|
+
status, if it had one.
|
|
463
530
|
- `isPlannerCode(error.code)` narrows the code to the ones the query API documents
|
|
464
531
|
(`PlannerErrorCode`), so a switch over them can be exhaustive. A code added since is kept as it
|
|
465
532
|
came.
|
|
@@ -474,6 +541,7 @@ never the value:
|
|
|
474
541
|
| `identification` | A value identifying the app, its agent or the conversation holds the access token (see "Which app sent a request") |
|
|
475
542
|
| `path` | A `source` of `''`, `.` or `..`, which can't stay one path segment |
|
|
476
543
|
| `conversation-id` | A call's own `conversationId` that breaks its rule |
|
|
544
|
+
| `nothing_asked` | A query that asks for no dimension and no metric, whose answer could only be `invalid`; no `fields` |
|
|
477
545
|
| `fields` | A query, or a write (`workspaces.create`, `log.add`, `update` or `remove`, `datasets.pause` or `resume`), with keys it doesn't send, each named in `fields` |
|
|
478
546
|
| `pending` | Sign-in: a `pending` that isn't one, wasn't started by this app at this server, or whose token endpoint breaks its issuer's rule |
|
|
479
547
|
| `callback` | Sign-in: a callback URL that can't be read |
|
|
@@ -579,7 +647,9 @@ await flipstream.catalog.list({ conversationId: 'c-456', traceparent: '00-4bf92f
|
|
|
579
647
|
request would go out, say `me`'s last read once its three reads' 30 s are up.
|
|
580
648
|
- They run on the monotonic clock, as their timers do, so a clock change never moves them. Tests
|
|
581
649
|
that fake only `Date` must also move `performance.now()`, since every deadline runs on it.
|
|
582
|
-
- **Abort:** `signal` ends a call at once, also while it waits for a token or to try again.
|
|
650
|
+
- **Abort:** `signal` ends a call at once, also while it waits for a token or to try again. Any
|
|
651
|
+
object with `aborted` and an `addEventListener` method is taken, a polyfill's or another realm's;
|
|
652
|
+
one with no `removeEventListener` keeps the listeners it was given, and the call keeps its result.
|
|
583
653
|
- **Warnings:** the SDK's warnings go to `onWarning`, or to `console.warn` without it; `() => {}`
|
|
584
654
|
silences them. Today there is one kind: a catalogue format type this version doesn't know,
|
|
585
655
|
reported once per process to the client that read it first. A handler that throws is ignored,
|
|
@@ -597,11 +667,15 @@ await flipstream.catalog.list({ conversationId: 'c-456', traceparent: '00-4bf92f
|
|
|
597
667
|
|
|
598
668
|
Every signed-in request says which app sent it, and, when you name them, which agent and
|
|
599
669
|
conversation, so a later query log can show who asked what. It reports nothing beyond the request:
|
|
600
|
-
the SDK has no telemetry. In Node, each signed-in request to an API host carries
|
|
670
|
+
the SDK has no telemetry. In Node, each signed-in request to an API host carries `User-Agent`,
|
|
671
|
+
`traceparent` and `baggage`. A browser can't set `User-Agent`, so it sends `Flipstream-Client` in
|
|
672
|
+
its place, with the same `traceparent` and `baggage`, to the hosts whose CORS allows them ("From a
|
|
673
|
+
browser", below).
|
|
601
674
|
|
|
602
675
|
| Header | Value | Standard |
|
|
603
676
|
|---|---|---|
|
|
604
677
|
| `User-Agent` | `<app>/<version> flipstream-sdk/<version> node/<version>` | RFC 9110 product tokens |
|
|
678
|
+
| `Flipstream-Client` | from a browser, in place of `User-Agent`: `<app>/<version> flipstream-sdk/<version>` | RFC 9110 product tokens, in a header of our own (RFC 6648: no `X-`) |
|
|
605
679
|
| `traceparent` | one trace-id per call, kept across its retries and shared by all of a call's requests, with a new parent-id for each request | W3C Trace Context |
|
|
606
680
|
| `baggage` | `gen_ai.agent.name`, `gen_ai.agent.version` and `gen_ai.conversation.id`, percent-encoded, only those given | W3C Baggage, with OpenTelemetry's GenAI names (not stable yet) |
|
|
607
681
|
|
|
@@ -617,15 +691,32 @@ the SDK has no telemetry. In Node, each signed-in request to an API host carries
|
|
|
617
691
|
can't refuse an ordinary value that happens to contain it. With your own transport, the SDK never
|
|
618
692
|
sees the token, so that check is your transport's.
|
|
619
693
|
- **`health` says only who the SDK is.** It's signed out and asks for no token, so it sends
|
|
620
|
-
`User-Agent: flipstream-sdk/<version> node/<version>`
|
|
621
|
-
`agent` or `conversationId`:
|
|
694
|
+
`User-Agent: flipstream-sdk/<version> node/<version>` (from a browser, `Flipstream-Client:
|
|
695
|
+
flipstream-sdk/<version>`) and a `traceparent`, and none of `app`, `agent` or `conversationId`:
|
|
696
|
+
nothing could check them there.
|
|
622
697
|
- **Your trace:** pass `traceparent` on a call to carry on your own trace. The call keeps its
|
|
623
698
|
trace-id and flags, with its own parent-id for each request. One that isn't a valid version-00
|
|
624
699
|
traceparent is dropped, as W3C Trace Context says, and the call starts its own trace, sampled
|
|
625
700
|
(`01`).
|
|
626
701
|
- **Only to the API hosts.** The auth server never gets them: `discover`, sign-in, refresh and
|
|
627
702
|
revoke send none.
|
|
628
|
-
- **
|
|
703
|
+
- **From a browser,** a page with a `document` (Electron's renderer and jsdom included), per host,
|
|
704
|
+
since a browser refuses every call to a host whose CORS doesn't allow these headers:
|
|
705
|
+
- the deployed query API (`https://query.flipstream.io`) gets `Flipstream-Client: <app>/<version>
|
|
706
|
+
flipstream-sdk/<version>`, `traceparent` and `baggage`;
|
|
707
|
+
- a custom `hosts.query` (a proxy, staging, a local planner) gets none, as before, since nothing
|
|
708
|
+
says its CORS allows them;
|
|
709
|
+
- pulse-admin and pulse-wallet get none yet, until their CORS allows them;
|
|
710
|
+
- the auth server never does, as in Node.
|
|
711
|
+
- A host is switched on only once its CORS allows them in its preflight, beside the ones every
|
|
712
|
+
call sends, as the query API's does. A refused preflight reaches the SDK as a network failure,
|
|
713
|
+
which it can't tell apart: it's `unavailable`, and tried again as one.
|
|
714
|
+
|
|
715
|
+
```http
|
|
716
|
+
Access-Control-Allow-Headers: authorization, content-type, traceparent, tracestate, baggage, flipstream-client
|
|
717
|
+
```
|
|
718
|
+
- **Another runtime that isn't Node** (Deno 1.x, a Worker, an edge function, React Native) sends
|
|
719
|
+
none of these headers.
|
|
629
720
|
|
|
630
721
|
## Finding a request in Logs
|
|
631
722
|
|
|
@@ -647,6 +738,9 @@ if (!result.ok) console.error(`${result.error.kind} (request ${result.trace_id ?
|
|
|
647
738
|
`workspaces.list()`'s two, sends them all under one trace-id, each with its own parent-id. So
|
|
648
739
|
does a retry, and the resend after a 401.
|
|
649
740
|
- **Your trace:** a call given your own `traceparent` keeps it, and `trace_id` is its trace-id.
|
|
741
|
+
In a scope, a call answered by shared reads alone, such as `me()`, names the read that answered
|
|
742
|
+
it, so the scope's trace when it was given one (`scope({ traceparent })`), even if the call was
|
|
743
|
+
given its own.
|
|
650
744
|
- **Nothing sent, no `trace_id`:** a call `refused` before anything is sent (a path, fields,
|
|
651
745
|
identification, the conversation's id, the destination) has none, and neither does a `no_token`
|
|
652
746
|
from the first ask for a token.
|
|
@@ -675,8 +769,9 @@ if (!result.ok) console.error(`${result.error.kind} (request ${result.trace_id ?
|
|
|
675
769
|
made there, such as `me()`'s userinfo and person, isn't in the call's trace.
|
|
676
770
|
- **With your own transport,** the SDK can't see the request leave, so a result has `trace_id` once
|
|
677
771
|
an answer came back.
|
|
678
|
-
- **
|
|
679
|
-
|
|
772
|
+
- **From a browser,** a call to the deployed query API has its `trace_id`. A call to a custom query
|
|
773
|
+
host, pulse-admin or pulse-wallet has none: a browser sends those hosts no `traceparent` (see
|
|
774
|
+
"Which app sent a request").
|
|
680
775
|
- **The service's side:** finding the id needs the API hosts to log it, and Logs to index it. Until
|
|
681
776
|
then, the id is still the one to quote.
|
|
682
777
|
|
|
@@ -698,7 +793,10 @@ reads the same in Node and in a browser bundle, with no file to load.
|
|
|
698
793
|
- **ESM.** The package is ES modules only. On these Node versions, `require()` loads it from
|
|
699
794
|
CommonJS too, both entries; Node 22.12 prints an experimental warning when it does.
|
|
700
795
|
- **The types ship in the package,** for both entries. The Node entry's types use Node's own,
|
|
701
|
-
from `@types/node`.
|
|
796
|
+
from `@types/node`. A scope's type names `Symbol.asyncDispose`, which the SDK's types declare,
|
|
797
|
+
so a project with only the ES2022 and DOM libs reads it too. `await using` itself needs
|
|
798
|
+
TypeScript's `ESNext.Disposable` lib, or Node's types, and a runtime that has the symbol;
|
|
799
|
+
`close()` works everywhere.
|
|
702
800
|
- **`keychainStore` needs `@napi-rs/keyring` 2.1 or later,** an optional peer dependency. Nothing
|
|
703
801
|
else needs it, and npm doesn't install it for you.
|
|
704
802
|
|
package/dist/api/backend.d.ts
CHANGED
|
@@ -42,14 +42,14 @@ export declare function backend(hosts: BackendHosts): {
|
|
|
42
42
|
/**
|
|
43
43
|
* `GET /organizations/me`: the one organisation the token's account speaks for (pulse-admin's
|
|
44
44
|
* `MeQuery`). It answers 400 for a token with no account, 404 when the organisation was merged
|
|
45
|
-
* away, and 409 when the account has two.
|
|
45
|
+
* away, and 409 when the account has two. Shared inside a scope (#376).
|
|
46
46
|
*/
|
|
47
47
|
myOrganization: <T>(schema: z.ZodType<T>) => CallSpec<T>;
|
|
48
48
|
/**
|
|
49
49
|
* `GET /oauth/userinfo` (OIDC): pulse-auth verifies the token and names its subject, `sub`, which
|
|
50
50
|
* for a person's token is their user id (pulse-auth 0ae57c8, `userinfo`). The SDK never reads
|
|
51
51
|
* the token itself, since only the transport holds it. The spec declares no security, but the
|
|
52
|
-
* route needs the bearer token.
|
|
52
|
+
* route needs the bearer token. Shared inside a scope (#376).
|
|
53
53
|
*/
|
|
54
54
|
userinfo: <T>(schema: z.ZodType<T>) => CallSpec<T>;
|
|
55
55
|
/**
|
|
@@ -75,6 +75,13 @@ export declare function backend(hosts: BackendHosts): {
|
|
|
75
75
|
* named.
|
|
76
76
|
*/
|
|
77
77
|
datasetPage: (organizationSlug: string, workspaceId: string, datasetId: string) => string | undefined;
|
|
78
|
+
/**
|
|
79
|
+
* The console's page for one of your organisation's people (os D366, M56):
|
|
80
|
+
* `/<organisation>/o/people/<person id>`, by the organisation's short name and the person's full
|
|
81
|
+
* id, which the console rewrites to its short one (os D251). Undefined when no console can be
|
|
82
|
+
* named.
|
|
83
|
+
*/
|
|
84
|
+
memberPage: (organizationSlug: string, memberId: string) => string | undefined;
|
|
78
85
|
/**
|
|
79
86
|
* `POST /clients`: a new workspace, pulse-admin's client, in `organizationId`, sending `name` and
|
|
80
87
|
* nothing else (the console's D368), so pulse-admin keeps its own defaults and makes the short
|
|
@@ -82,7 +89,10 @@ export declare function backend(hosts: BackendHosts): {
|
|
|
82
89
|
* never tried again. pulse-admin answers 201 with the client it made.
|
|
83
90
|
*/
|
|
84
91
|
createWorkspace: <T>(organizationId: string, name: string, schema: z.ZodType<T>) => CallSpec<T>;
|
|
85
|
-
/**
|
|
92
|
+
/**
|
|
93
|
+
* `GET /clients/{id}`: one workspace, pulse-admin's client. Null when `id` can't stay one path
|
|
94
|
+
* segment. Shared inside a scope (#376).
|
|
95
|
+
*/
|
|
86
96
|
workspace<T>(id: string, schema: z.ZodType<T>): CallSpec<T> | null;
|
|
87
97
|
/**
|
|
88
98
|
* `GET /wallets/get-balance/{organisation}`: the organisation's wallet as a list of rows, one per
|
|
@@ -110,6 +120,11 @@ export declare function backend(hosts: BackendHosts): {
|
|
|
110
120
|
people: <T>(page: PageRequest, item: z.ZodType<T>, inScope: (item: T) => boolean) => CallSpec<Page<T>>;
|
|
111
121
|
/** `GET /users/{id}`: a person, as pulse-auth has them. Null when `id` can't stay one path segment. */
|
|
112
122
|
user<T>(id: string, schema: z.ZodType<T>): CallSpec<T> | null;
|
|
123
|
+
/**
|
|
124
|
+
* `GET /users/{sub}` for you, the person userinfo names: `user`'s read, shared inside a scope
|
|
125
|
+
* (#376), where another member's isn't. Null when `sub` can't stay one path segment.
|
|
126
|
+
*/
|
|
127
|
+
you<T>(sub: string, schema: z.ZodType<T>): CallSpec<T> | null;
|
|
113
128
|
/**
|
|
114
129
|
* `GET /clients/{id}/event-logs`: one page of a workspace's logbook. No `sort` is sent (D550),
|
|
115
130
|
* so the order is pulse-admin's EventLogRepository's own, `-created_on`, newest first (its
|
package/dist/api/backend.js
CHANGED
|
@@ -130,16 +130,19 @@ export function backend(hosts) {
|
|
|
130
130
|
/**
|
|
131
131
|
* `GET /organizations/me`: the one organisation the token's account speaks for (pulse-admin's
|
|
132
132
|
* `MeQuery`). It answers 400 for a token with no account, 404 when the organisation was merged
|
|
133
|
-
* away, and 409 when the account has two.
|
|
133
|
+
* away, and 409 when the account has two. Shared inside a scope (#376).
|
|
134
134
|
*/
|
|
135
|
-
myOrganization: (schema) =>
|
|
135
|
+
myOrganization: (schema) => ({
|
|
136
|
+
...get(hosts.admin, { service: 'admin', endpoint: 'admin.organizations.me' }, '/organizations/me', ['workspace'], schema),
|
|
137
|
+
shared: { key: '/organizations/me' },
|
|
138
|
+
}),
|
|
136
139
|
/**
|
|
137
140
|
* `GET /oauth/userinfo` (OIDC): pulse-auth verifies the token and names its subject, `sub`, which
|
|
138
141
|
* for a person's token is their user id (pulse-auth 0ae57c8, `userinfo`). The SDK never reads
|
|
139
142
|
* the token itself, since only the transport holds it. The spec declares no security, but the
|
|
140
|
-
* route needs the bearer token.
|
|
143
|
+
* route needs the bearer token. Shared inside a scope (#376).
|
|
141
144
|
*/
|
|
142
|
-
userinfo: (schema) => get(hosts.auth, { service: 'auth', endpoint: 'auth.userinfo' }, '/oauth/userinfo', [], schema),
|
|
145
|
+
userinfo: (schema) => ({ ...get(hosts.auth, { service: 'auth', endpoint: 'auth.userinfo' }, '/oauth/userinfo', [], schema), shared: { key: '/oauth/userinfo' } }),
|
|
143
146
|
/**
|
|
144
147
|
* `GET /organizations/{id}/clients`: one page of an organisation's workspaces, pulse-admin's
|
|
145
148
|
* clients. Never the global `GET /clients`, which lists every organisation's for a staff token.
|
|
@@ -166,6 +169,13 @@ export function backend(hosts) {
|
|
|
166
169
|
* named.
|
|
167
170
|
*/
|
|
168
171
|
datasetPage: (organizationSlug, workspaceId, datasetId) => consoleUrl(hosts.console, [organizationSlug, workspaceId, 'warehouse', 'datasets', datasetId]),
|
|
172
|
+
/**
|
|
173
|
+
* The console's page for one of your organisation's people (os D366, M56):
|
|
174
|
+
* `/<organisation>/o/people/<person id>`, by the organisation's short name and the person's full
|
|
175
|
+
* id, which the console rewrites to its short one (os D251). Undefined when no console can be
|
|
176
|
+
* named.
|
|
177
|
+
*/
|
|
178
|
+
memberPage: (organizationSlug, memberId) => consoleUrl(hosts.console, [organizationSlug, 'o', 'people', memberId]),
|
|
169
179
|
/**
|
|
170
180
|
* `POST /clients`: a new workspace, pulse-admin's client, in `organizationId`, sending `name` and
|
|
171
181
|
* nothing else (the console's D368), so pulse-admin keeps its own defaults and makes the short
|
|
@@ -173,10 +183,16 @@ export function backend(hosts) {
|
|
|
173
183
|
* never tried again. pulse-admin answers 201 with the client it made.
|
|
174
184
|
*/
|
|
175
185
|
createWorkspace: (organizationId, name, schema) => post(hosts.admin, { service: 'admin', endpoint: 'admin.clients.create' }, '/clients', ['workspace'], { name, organization_id: organizationId }, schema),
|
|
176
|
-
/**
|
|
186
|
+
/**
|
|
187
|
+
* `GET /clients/{id}`: one workspace, pulse-admin's client. Null when `id` can't stay one path
|
|
188
|
+
* segment. Shared inside a scope (#376).
|
|
189
|
+
*/
|
|
177
190
|
workspace(id, schema) {
|
|
178
191
|
const name = segment(id);
|
|
179
|
-
|
|
192
|
+
if (name === null)
|
|
193
|
+
return null;
|
|
194
|
+
const path = `/clients/${name}`;
|
|
195
|
+
return { ...get(hosts.admin, { service: 'admin', endpoint: 'admin.clients.get' }, path, ['workspace'], schema), shared: { key: path } };
|
|
180
196
|
},
|
|
181
197
|
/**
|
|
182
198
|
* `GET /wallets/get-balance/{organisation}`: the organisation's wallet as a list of rows, one per
|
|
@@ -213,6 +229,17 @@ export function backend(hosts) {
|
|
|
213
229
|
const name = segment(id);
|
|
214
230
|
return name === null ? null : get(hosts.auth, { service: 'auth', endpoint: 'auth.users.get' }, `/users/${name}`, ['workspace'], schema);
|
|
215
231
|
},
|
|
232
|
+
/**
|
|
233
|
+
* `GET /users/{sub}` for you, the person userinfo names: `user`'s read, shared inside a scope
|
|
234
|
+
* (#376), where another member's isn't. Null when `sub` can't stay one path segment.
|
|
235
|
+
*/
|
|
236
|
+
you(sub, schema) {
|
|
237
|
+
const name = segment(sub);
|
|
238
|
+
if (name === null)
|
|
239
|
+
return null;
|
|
240
|
+
const path = `/users/${name}`;
|
|
241
|
+
return { ...get(hosts.auth, { service: 'auth', endpoint: 'auth.users.get' }, path, ['workspace'], schema), shared: { key: path } };
|
|
242
|
+
},
|
|
216
243
|
/**
|
|
217
244
|
* `GET /clients/{id}/event-logs`: one page of a workspace's logbook. No `sort` is sent (D550),
|
|
218
245
|
* so the order is pulse-admin's EventLogRepository's own, `-created_on`, newest first (its
|
package/dist/api/backend.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"backend.js","sourceRoot":"","sources":["../../src/api/backend.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,OAAO,EAAE,WAAW,EAAE,SAAS,EAAgB,MAAM,kBAAkB,CAAA;AAEvE,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAC7C,OAAO,EAAE,MAAM,EAAE,SAAS,EAA+B,MAAM,WAAW,CAAA;AAuB1E;;;;;;GAMG;AACH,MAAM,YAAY,GAAY,KAAK,CAAA;AACnC,MAAM,OAAO,GAAG,6BAA6B,CAAA;AAE7C;;;;;;GAMG;AACH,MAAM,UAAU,WAAW,CAAC,UAA8B,EAAE,cAAuB,EAAE,OAAgB,YAAY;IAC/G,IAAI,UAAU,KAAK,SAAS;QAAE,OAAO,UAAU,CAAA;IAC/C,OAAO,IAAI,IAAI,cAAc,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAA;AACrD,CAAC;AAED;;;GAGG;AACH,SAAS,UAAU,CAAC,IAAwB,EAAE,KAAwB;IACpE,IAAI,IAAI,KAAK,SAAS;QAAE,OAAO,SAAS,CAAA;IACxC,MAAM,QAAQ,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,CAAA;IACnC,OAAO,QAAQ,CAAC,KAAK,CA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MAAoB;YACpE,MAAM,IAAI,GAAG,OAAO,CAAC,EAAE,CAAC,CAAA;YACxB,OAAO,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,yBAAyB,EAAE,EAAE,eAAe,IAAI,EAAE,EAAE,CAAC,WAAW,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,CAAA;QAChK,CAAC;QACD;;;;WAIG;QACH,cAAc,CAAI,EAAU,EAAE,MAAoB;YAChD,MAAM,IAAI,GAAG,OAAO,CAAC,EAAE,CAAC,CAAA;YACxB,OAAO,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,yBAAyB,EAAE,EAAE,eAAe,IAAI,EAAE,EAAE,MAAM,CAAC,CAAA;QAC1I,CAAC;KACF,CAAA;AACH,CAAC"}
|
package/dist/api/credentials.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
2
|
+
import { invalidIn } from '../core/invalid.js';
|
|
3
3
|
import { isSecretKey } from '../core/secrets.js';
|
|
4
4
|
import { credentialNeedsPerson } from './handoff.js';
|
|
5
5
|
import { sameUuid } from './ids.js';
|
|
@@ -66,7 +66,7 @@ export async function listCredentials(seam, read, request = {}) {
|
|
|
66
66
|
// A record is checked before this runs, but the scope check never throws on what it's given.
|
|
67
67
|
const spec = seam.organizationCredentials(organization.data.id, request, zRecord, (record) => typeof record.organization_id === 'string' && sameUuid(record.organization_id, organization.data.id));
|
|
68
68
|
if (spec === null)
|
|
69
|
-
return
|
|
69
|
+
return invalidIn(organization, "the organisation's id can't name its sign-ins");
|
|
70
70
|
const listed = await read(spec);
|
|
71
71
|
return listed.ok ? { ok: true, data: { ...listed.data, items: listed.data.items.map(publicOf) } } : listed;
|
|
72
72
|
}
|
|
@@ -86,9 +86,9 @@ export async function handOffCredential(seam, read, credentialId, action) {
|
|
|
86
86
|
if (!credential.ok)
|
|
87
87
|
return credential;
|
|
88
88
|
if (!sameUuid(credential.data.id, credentialId))
|
|
89
|
-
return
|
|
89
|
+
return invalidIn(credential, "the sign-in read isn't the one asked for");
|
|
90
90
|
if (!sameUuid(credential.data.organization_id, organization.data.id))
|
|
91
|
-
return
|
|
91
|
+
return invalidIn(credential, "the sign-in read is another organisation's");
|
|
92
92
|
return credentialNeedsPerson(action);
|
|
93
93
|
}
|
|
94
94
|
//# sourceMappingURL=credentials.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credentials.js","sourceRoot":"","sources":["../../src/api/credentials.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"credentials.js","sourceRoot":"","sources":["../../src/api/credentials.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAE9C,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAGhD,OAAO,EAAE,qBAAqB,EAA0B,MAAM,cAAc,CAAA;AAC5E,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAEnC,OAAO,EAAE,SAAS,EAA+B,MAAM,WAAW,CAAA;AAClE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AA4BnC;;;;GAIG;AACH,SAAS,UAAU,CAAC,KAAc,EAAE,IAAkC,EAAE,OAAwB;IAC9F,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACzB,KAAK,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,IAAI,KAAK,CAAC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