techne-sdk 0.3.3 → 0.3.8
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 +160 -0
- package/README.md +5 -4
- package/dist/auth/app-key.js +2 -2
- package/dist/auth/index.js +1 -1
- package/dist/catalog/catalog.gen.d.ts +24 -24
- package/dist/catalog/catalog.gen.js +356 -66
- package/dist/connect.d.ts +96 -12
- package/dist/connect.js +83 -12
- package/dist/generated/lexicons.d.ts +140 -36
- package/dist/generated/lexicons.js +77 -18
- package/dist/generated/nsid.d.ts +4 -0
- package/dist/generated/nsid.js +4 -0
- package/dist/generated/nsid.json +4 -0
- package/dist/generated/types/pub/techne/draft/beacon.d.ts +2 -0
- package/dist/generated/types/pub/techne/draft/collective.d.ts +1 -1
- package/dist/generated/types/pub/techne/draft/identity/attest.d.ts +3 -0
- package/dist/generated/types/pub/techne/draft/identity/attest.js +7 -0
- package/dist/generated/types/pub/techne/draft/identity/beginAddMethod.d.ts +3 -0
- package/dist/generated/types/pub/techne/draft/identity/beginAddMethod.js +7 -0
- package/dist/generated/types/pub/techne/draft/identity/finishAddMethod.d.ts +6 -0
- package/dist/generated/types/pub/techne/draft/identity/finishAddMethod.js +14 -0
- package/dist/generated/types/pub/techne/draft/identity/resolve.d.ts +6 -0
- package/dist/generated/types/pub/techne/draft/membership.d.ts +1 -1
- package/dist/generated/types/pub/techne/draft/permissioned/deleteRecord.d.ts +3 -0
- package/dist/generated/types/pub/techne/draft/permissioned/deleteRecord.js +7 -0
- package/dist/generated/types/pub/techne/draft/permissioned/putRecord.d.ts +3 -0
- package/dist/generated/types/pub/techne/draft/permissioned/putRecord.js +7 -0
- package/dist/generated/types/pub/techne/draft/permissioned/putRecords.d.ts +4 -1
- package/dist/generated/types/pub/techne/draft/permissioned/putRecords.js +7 -0
- package/dist/generated/types/pub/techne/draft/summary.d.ts +2 -0
- package/dist/item.d.ts +130 -0
- package/dist/item.js +74 -0
- package/dist/links/index.d.ts +15 -8
- package/dist/links/index.js +18 -0
- package/dist/put/contacts.d.ts +2 -2
- package/dist/put/index.d.ts +6 -9
- package/dist/put/index.js +8 -166
- package/dist/put/put.d.ts +14 -0
- package/dist/put/put.js +206 -0
- package/dist/query/compose.d.ts +246 -0
- package/dist/query/compose.js +572 -0
- package/dist/query/hosts.d.ts +98 -1
- package/dist/query/hosts.js +143 -2
- package/dist/query/index.d.ts +60 -29
- package/dist/query/index.js +55 -26
- package/dist/react/context.d.ts +18 -0
- package/dist/react/context.js +19 -0
- package/dist/react/index.d.ts +14 -0
- package/dist/react/index.js +14 -0
- package/dist/react/query.d.ts +75 -0
- package/dist/react/query.js +116 -0
- package/dist/read/index.d.ts +60 -0
- package/dist/read/index.js +107 -0
- package/dist/resend.d.ts +25 -0
- package/dist/resend.js +52 -0
- package/dist/versions/entities.gen.d.ts +8 -0
- package/dist/versions/entities.gen.js +9 -0
- package/dist/versions/index.d.ts +59 -17
- package/dist/versions/index.js +156 -22
- package/dist/versions/react.d.ts +1 -1
- package/dist/versions/react.js +1 -1
- package/dist/versions/text.d.ts +19 -0
- package/dist/versions/text.js +73 -0
- package/dist/wasm/techne-wasm.gen.js +1 -1
- package/dist/wasm/techne-wasm2js.gen.js +8928 -8927
- package/package.json +17 -5
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,166 @@
|
|
|
3
3
|
`techne-sdk` on npm and the `techne-sdk` crate share a version. Each entry names what changes for an app or
|
|
4
4
|
a crate user.
|
|
5
5
|
|
|
6
|
+
## 0.3.8 (2026-11-12)
|
|
7
|
+
|
|
8
|
+
npm catches up with the crate: npm 0.3.8 and crate 0.3.8 are built from the same commit, lexicons
|
|
9
|
+
`v0.1.22-techne.69` and `techne-lexicon-check` `=0.3.8`. The platform's published API is re-pinned to platform
|
|
10
|
+
`main` `ff01ca02c` (the Beacon redesign platform PR merged, 2026-11-12); its method lexicons are the same files as at
|
|
11
|
+
`5f1b2932d` (the `inputs/` tree hash is unchanged), so codegen and the WebAssembly match crate 0.3.8. No export is
|
|
12
|
+
removed or renamed. What an app on npm 0.3.4 gets (the details are in the crate 0.3.5 to 0.3.8 entries below):
|
|
13
|
+
|
|
14
|
+
- `social.scenius.removePerson` (archive the caller's contacts that name a person).
|
|
15
|
+
- `getEventJoins` answers `maybes` (interested) and `declines` (notgoing) beside `joins` (going only);
|
|
16
|
+
`joinBeacon` takes `interested`, and puts a notgoing answer in the answerer's own `space.beaconDecline`.
|
|
17
|
+
- `pub.techne.draft.beacon` `answerEmojis`; the space `pub.techne.draft.space.beaconDecline` and its `rsvpNote`.
|
|
18
|
+
- `identity.resolve` `released`, `releasedFrom` and `releaseId`; `identity.attest` `ChannelReleased` (409);
|
|
19
|
+
`beginAddMethod` `SendFailed` (502); `finishAddMethod` `RateLimitExceeded` (429) and `UpstreamFailure` (502).
|
|
20
|
+
- `permissioned.putRecord`, `putRecords`, `deleteRecord`, and the kept circle methods (`createGroup`, `leaveGroup`,
|
|
21
|
+
`removeGroupMember`, `renameGroup`) can refuse with `LastManager` (409).
|
|
22
|
+
- `pub.techne.draft.heldAt.query`, and `summary.json` `emoji`.
|
|
23
|
+
|
|
24
|
+
Since platform `main` `cebe9efcb` (the scopes branch, already in the platform `main` pinned here), for an app writing
|
|
25
|
+
into its own space (`appSpace(did, clientId)`):
|
|
26
|
+
|
|
27
|
+
- A record in an app space is deleted only by that app, or by a token whose `space:` scopes cover a delete there.
|
|
28
|
+
Anyone else gets 403 `Forbidden`, including the person's own first-party tools: an agent token minted without
|
|
29
|
+
`space:` scopes, the web session and the phone's device session (they name only the app they were minted for).
|
|
30
|
+
A stray record someone else wrote naming your app space is yours to delete, not theirs.
|
|
31
|
+
- An agent token can carry `space:` scopes (minted from the person's own signed-in session), and then reaches an
|
|
32
|
+
app space as that app does. Test app-space calls with one minted with
|
|
33
|
+
`space:pub.techne.draft.space.private?skey=<appKey>`.
|
|
34
|
+
- Replacing a record in an app space with `put` needs the same as a delete (its app, or covering `space:`
|
|
35
|
+
scopes), else 403 (platform `afb4ae2d8`, in this pin). A first write there by anyone else is kept and counts
|
|
36
|
+
nowhere.
|
|
37
|
+
|
|
38
|
+
## crate 0.3.8 (2026-11-12)
|
|
39
|
+
|
|
40
|
+
Crate only; npm stays at 0.3.4 as published. Lexicons `v0.1.22-techne.69` and `techne-lexicon-check` `=0.3.8`
|
|
41
|
+
from crates.io:
|
|
42
|
+
|
|
43
|
+
- `identity.resolve` answers `releaseId` with `releasedFrom`: the platform's id for that removal of the number,
|
|
44
|
+
fresh each time, so a PDS keys the number's next holder on `releasedFrom` and `releaseId` together.
|
|
45
|
+
- `identity.finishAddMethod` can fail, for a phone code, with `RateLimitExceeded` (429: the provider refuses more
|
|
46
|
+
checks for now) and `UpstreamFailure` (502: the code is not spent; try again).
|
|
47
|
+
- Prose: a "Can't go" note (`rsvpNote` in the answerer's `space.beaconDecline`) goes when the answer leaves the
|
|
48
|
+
decline space.
|
|
49
|
+
|
|
50
|
+
The platform's published API is pinned at platform `5f1b2932d` (branch `taskbot/redesign-platform`); re-pin to
|
|
51
|
+
the platform `main` commit once the redesign platform PR merges. At this pin the circle methods
|
|
52
|
+
(`createGroup`, `leaveGroup`, `removeGroupMember`, `renameGroup`) say they are kept for old builds and name their
|
|
53
|
+
errors (`LastManager` 409 on leaving or removing the last manager), and the NSID rename map's description is
|
|
54
|
+
updated (same rows). The TypeScript inputs, codegen and WebAssembly are re-synced; the next npm release carries
|
|
55
|
+
them. No API removed or renamed.
|
|
56
|
+
|
|
57
|
+
## crate 0.3.7 (2026-11-12)
|
|
58
|
+
|
|
59
|
+
Crate only; npm stays at 0.3.4 as published. Lexicons `v0.1.22-techne.68` and `techne-lexicon-check` `=0.3.7`
|
|
60
|
+
from crates.io:
|
|
61
|
+
|
|
62
|
+
- `identity.resolve` answers `released` (with `unbound`) when a phone number was removed from an account and
|
|
63
|
+
nobody has bound it since, and `releasedFrom` (that account's DID) when the calling PDS hosts it;
|
|
64
|
+
`identity.attest` can refuse with `ChannelReleased` (409).
|
|
65
|
+
- `identity.beginAddMethod` can fail with `SendFailed` (502) when the code could not be texted.
|
|
66
|
+
- `permissioned.putRecord`, `putRecords` and `deleteRecord` can refuse with `LastManager` (409) when a write as a
|
|
67
|
+
circle would leave it with members and no manager; their prose now covers writing as a circle.
|
|
68
|
+
- Prose: Beacon circle roles in `collective.json` and the member policy, `membership` attribution, the
|
|
69
|
+
`space.beaconDecline` read rule.
|
|
70
|
+
|
|
71
|
+
The platform's published API is pinned at platform `49e66c82c` (branch `taskbot/redesign-platform`); re-pin to
|
|
72
|
+
the platform `main` commit once the redesign platform PR merges. At this pin the platform adds
|
|
73
|
+
`social.scenius.removePerson` (archive the caller's contacts that name a person), `getEventJoins` returns
|
|
74
|
+
`maybes` (interested) and `declines` (notgoing) beside `joins` (going only), and `joinBeacon` puts a notgoing
|
|
75
|
+
answer in the answerer's own `space.beaconDecline`. The TypeScript inputs, codegen (catalog, NSIDs, types) and
|
|
76
|
+
WebAssembly are re-synced; the next npm release carries them. No API removed or renamed.
|
|
77
|
+
|
|
78
|
+
## crate 0.3.6 (2026-11-12)
|
|
79
|
+
|
|
80
|
+
Crate only; npm stays at 0.3.4 as published. Lexicons `v0.1.22-techne.67` and `techne-lexicon-check` `=0.3.6`
|
|
81
|
+
from crates.io: `pub.techne.draft.beacon` gains optional `answerEmojis` (up to three, for going, interested and
|
|
82
|
+
notgoing), a new space `pub.techne.draft.space.beaconDecline` (the answerer's own space for a notgoing answer and
|
|
83
|
+
its `rsvpNote`), and `identity.beginAddMethod` describes adding a phone by SMS. The platform's published API is
|
|
84
|
+
pinned at platform `f55cfa522` (branch `taskbot/redesign-platform`, which reads `space.beaconDecline`; platform
|
|
85
|
+
`main` `afb4ae2d8` does not, so inputs-sync refuses it); its method lexicons are the same files as at `cebe9efcb`
|
|
86
|
+
(the `inputs/` tree hash is unchanged). Re-pin to the platform `main` commit once the redesign platform PR merges.
|
|
87
|
+
The TypeScript inputs, codegen (catalog, NSIDs, types) and WebAssembly are re-synced; the next npm release
|
|
88
|
+
carries them. No API removed or renamed.
|
|
89
|
+
|
|
90
|
+
## crate 0.3.5 (2026-11-11)
|
|
91
|
+
|
|
92
|
+
Crate only; npm stays at 0.3.4 as published. Lexicons `v0.1.22-techne.66` (a new query document,
|
|
93
|
+
`pub.techne.draft.heldAt.query`: a heldAt link's `place.uri` is its reference, so a read finds the events held
|
|
94
|
+
at a place) and `techne-lexicon-check` `=0.3.5` from crates.io. The platform's published API is pinned at
|
|
95
|
+
platform `e7b10b724` (branch `taskbot/b261105-scopes`, which reads the new document and adds `emoji` to
|
|
96
|
+
`getEventAnnotations`); re-pin to the platform `main` commit once that branch merges. The TypeScript inputs,
|
|
97
|
+
codegen (catalog, NSIDs) and WebAssembly are re-synced; the next npm release carries them. No API change.
|
|
98
|
+
|
|
99
|
+
## crate 0.3.4 (2026-11-11)
|
|
100
|
+
|
|
101
|
+
Crate only; npm stays at 0.3.4 as published, so the two share the version number but not the lexicons (npm 0.3.4 embeds techne.64) until the next npm release. Lexicons `v0.1.22-techne.65` (`summary.json` gains an optional
|
|
102
|
+
`emoji`) and `techne-lexicon-check` `=0.3.4` from crates.io, so the platform can pin the check at 0.3.4 next to
|
|
103
|
+
this crate (crate version = check version, RELEASING.md "Rust crate"). The TypeScript inputs, codegen and
|
|
104
|
+
WebAssembly are re-synced to the same tag; the next npm release carries them. No API change.
|
|
105
|
+
|
|
106
|
+
## 0.3.4 (2026-11-10)
|
|
107
|
+
|
|
108
|
+
Lexicons `v0.1.22-techne.64` as in 0.3.3; the platform's published API re-pinned to platform `07fc8a1ec`, whose
|
|
109
|
+
one change is `social.scenius.ask`'s `timeChip` (known values now `now`, `today`, `thisWeek`; seen in
|
|
110
|
+
`techne-sdk/catalog`). The crate is unchanged and stays 0.3.3. This release brings in the platform's own SDK code (platform `07fc8a1ec` `sdk/`) that Beacon
|
|
111
|
+
imports, so Beacon can run on `techne-sdk`. No export is removed. What changes for an app already on
|
|
112
|
+
0.3.3:
|
|
113
|
+
|
|
114
|
+
- **`Techne` is wider.** It is now `Clients` (`did`, `pds`, `platform` as in 0.3.3's `Techne`, and an optional `claims`) plus
|
|
115
|
+
seven methods: `query`, `get`, `versions`, `put`, `queryOptions`, `getOptions`, `versionsOptions`. Code
|
|
116
|
+
that reads a `Techne` is unchanged; code that builds one by hand (a test double, an object literal typed
|
|
117
|
+
`Techne`) must now type it `Clients`, or make it with `bind(clients)`.
|
|
118
|
+
- **`versionName` never shows a service handle.** A version with no name written by a `mirror-` account
|
|
119
|
+
(or tagged `mirror`) is named by its calendar's site, else `"Imported calendar"`; one by a `rule-`
|
|
120
|
+
account is `"Someone"`. 0.3.3 showed the handle.
|
|
121
|
+
- **`eventState` counts a description that contains, or is contained in, the one shown as agreeing**
|
|
122
|
+
(after decoding text). A version that only adds a longer write-up moves from `differs` to `same`, and
|
|
123
|
+
the field's conflict count drops; 0.3.3 compared descriptions as equal or not.
|
|
124
|
+
- **`useEvent`'s `pill` is `null` while the versions agree.** It follows `versionPill`'s new default
|
|
125
|
+
(below): 0.3.3 showed `"N versions"` whenever there were two or more.
|
|
126
|
+
- **`MAX_PAGE` is 500 (was 100)**, same name: see `techne-sdk/query` below.
|
|
127
|
+
|
|
128
|
+
What is new:
|
|
129
|
+
|
|
130
|
+
- **The client has its reads and its write.** `connect`, `connectHosted` and the new `connectAnonymous`
|
|
131
|
+
(public reads, no session) answer a `Techne` with `query`, `get`, `versions` (each answering items with
|
|
132
|
+
the check's verdict) and their TanStack Query options forms (`queryOptions`, `getOptions`,
|
|
133
|
+
`versionsOptions`), and `put` (the same write as `techne-sdk/put`'s `put`, `deletes` included).
|
|
134
|
+
`bind(clients)` makes one over clients made elsewhere; `connect`'s platform now defaults to
|
|
135
|
+
`TECHNE_PLATFORM_DID`. Also `resolveAppview`, `didDocumentUrl`, `PLC_DIRECTORY`, and `Clients`.
|
|
136
|
+
- **`put` sends once more when a call got no response at all** (the connection lost before any answer): it
|
|
137
|
+
runs again from the start, re-reading first, so nothing is written or deleted twice. A status (a 500
|
|
138
|
+
too) or an abort is not retried. `connectHosted` and `connectAnonymous` also resend a POST that got no
|
|
139
|
+
response once, with the same `Idempotency-Key` (`resendingOnce`, `IDEMPOTENCY_KEY`). `plan` takes `now`
|
|
140
|
+
as a `Date` or as unix seconds. A delete whose answer the first run lost answers `deleted: true` on the
|
|
141
|
+
second run, which finds the record gone (or, rarely, when that call never arrived and nothing was there). `PutOptions` (`wait`, `deletes`) is exported
|
|
142
|
+
from `techne-sdk/put`.
|
|
143
|
+
- **`techne-sdk/react/query`: the client's reads as hooks over TanStack Query**: `useRecordQuery`,
|
|
144
|
+
`useRecord`, `useVersions`, `defaultQueryClient`. `techne-sdk/react` keeps `useEvent` and adds
|
|
145
|
+
`TechneProvider` and `useTechne`, and still needs React only. `@tanstack/react-query` 5 is a new
|
|
146
|
+
optional peer dependency, needed only by an app that imports `techne-sdk/react/query`.
|
|
147
|
+
- **`techne-sdk/query` composes.** `compose` builds one `pub.techne.draft.query.composeRecords` call of
|
|
148
|
+
several steps, a later one reading what an earlier one answered (`Composition`, `Composed`, `StepRef`,
|
|
149
|
+
`MAX_STEP_*`, `ENVELOPE_ONLY`); `emulateCompose`, `withPost` and `testReader` run it against a stand-in.
|
|
150
|
+
"Hosted by" on one composed call: `hostSteps`, `hostsFrom`, `HOST_ENVELOPE`, `HOST_SOURCES_QUERY`. Also
|
|
151
|
+
`listRecordsCounted`, `answerOf`, `curationOf` (now exported), `shownHandle`, and the `has` condition
|
|
152
|
+
(`HasCondition`) in a query's `where`.
|
|
153
|
+
- **`MAX_PAGE` is now 500** (the lexicon's `listRecords` `limit` maximum), so `listAllRecords` asks pages
|
|
154
|
+
of 500; the new **`MAX_BATCH` (100)** is what one `getRecords` call or one `in` list takes. URI lists
|
|
155
|
+
are still sent in runs that also fit the 8 KB request line.
|
|
156
|
+
- **`getRecordsAnswer`**: a `handle.invalid` handle is left out of `handles`, and `defaults` keeps only
|
|
157
|
+
object values (`Map<string, Record<string, unknown>>`).
|
|
158
|
+
- **`techne-sdk/versions`**: `versionPill` is the platform's: before a pick, `"N versions"` and only when the
|
|
159
|
+
versions conflict (`{ hideAgreeing: false }` shows it whenever there are two or more); after a pick, who
|
|
160
|
+
that version is from. It now answers `accessibilityHint` too. `eventState` reads text fields decoded
|
|
161
|
+
(`decodeTextFields`: no `&`), and a version's name is never `handle.invalid`. New: `shownVersion`,
|
|
162
|
+
`isImported`, `IMPORTED_CALENDAR`, `conflictsOf`.
|
|
163
|
+
- **`techne-sdk/links`**: a PDS refusing a link call for a missing scope throws `LinkScopeError` (links
|
|
164
|
+
need a platform session, or the identity methods' `rpc:` scopes).
|
|
165
|
+
|
|
6
166
|
## 0.3.3 (2026-11-10)
|
|
7
167
|
|
|
8
168
|
Built on lexicons `v0.1.22-techne.64` (b1407281) and the platform's published API at platform
|
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ The SDK depends on two things only: the published lexicons (the `lexicons` repo
|
|
|
10
10
|
## Install
|
|
11
11
|
|
|
12
12
|
```sh
|
|
13
|
-
npm i techne-sdk # react >= 19
|
|
13
|
+
npm i techne-sdk # optional peers: react >= 19 for techne-sdk/react, and @tanstack/react-query 5 too for techne-sdk/react/query
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
Every import goes through the package's `exports`, so the resolver has to read them:
|
|
@@ -23,12 +23,13 @@ Every import goes through the package's `exports`, so the resolver has to read t
|
|
|
23
23
|
| `techne-sdk` (also `techne-sdk/generated`) | the generated XRPC client (`AtpBaseClient`) and every lexicon type |
|
|
24
24
|
| `techne-sdk/lexicons` | the generated lexicon dictionary (`schemaDict`, `schemas`, `lexicons`, `ids`): every lexicon document the client was built from, for reading descriptions at run time (large; keep it server side) |
|
|
25
25
|
| `techne-sdk/types/<nsid path>` | one lexicon's types, e.g. `techne-sdk/types/social/scenius/getContactInvite` |
|
|
26
|
-
| `techne-sdk/react` | `useEvent(uri)`: one commons event or place as its versions, with the check's verdict |
|
|
26
|
+
| `techne-sdk/react` | `TechneProvider` / `useTechne` (the client in React), and `useEvent(uri)`: one commons event or place as its versions, with the check's verdict (React only) |
|
|
27
|
+
| `techne-sdk/react/query` | the client's reads as hooks over TanStack Query (`useRecordQuery`, `useRecord`, `useVersions`, `defaultQueryClient`); needs `@tanstack/react-query` |
|
|
27
28
|
| `techne-sdk/versions` | the same state without React: `eventState`, `verifyAnswer`, version labels |
|
|
28
29
|
| `techne-sdk/auth` | sign-in ("Sign in with Techne"): `signIn`, `signUp`, `restore`, `signOut`, `clientMetadata`, `scopes`, `appKey`, `appSpace` (browser OAuth) |
|
|
29
|
-
| `techne-sdk/connect` | `connect(session, platform)` / `connectHosted(did, fetchHandler)`: the
|
|
30
|
+
| `techne-sdk/connect` | `connect(session, platform?)` / `connectHosted(did, fetchHandler)` / `connectAnonymous(platform?)`: the client over one session, with its reads (`query`, `get`, `versions`, their options forms) and `put`; `bind(clients)` over clients made elsewhere |
|
|
30
31
|
| `techne-sdk/put` | `put(techne, records, { deletes })`: the one write, deletes included (public deletes hinted to the platform); `put(techne, [], { deletes })` for deletes alone |
|
|
31
|
-
| `techne-sdk/query` | the platform's generic queries: `listRecords`, `getRecords`, hosts |
|
|
32
|
+
| `techne-sdk/query` | the platform's generic queries: `listRecords`, `getRecords`, `compose` (several steps in one `composeRecords` call), hosts (`hostsOf`, `hostSteps`/`hostsFrom`) |
|
|
32
33
|
| `techne-sdk/links` | link tokens: create, redeem, check, revoke |
|
|
33
34
|
| `techne-sdk/wasm` | the check itself: `validate`, `decide`, `verify` (`validate` knows the built-in lexicons only; a runtime type is checked by the platform on write) |
|
|
34
35
|
| `techne-sdk/catalog` | the browsable lexicon catalog |
|
package/dist/auth/app-key.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* An app's own private space (`pub.techne.draft.space.private`): its key and address. The key is the
|
|
3
|
-
* platform's `sidecar_rkey(client_id)` (
|
|
3
|
+
* platform's `sidecar_rkey(client_id)` (platform crates/regenos-lexicons/src/sidecar.rs): RFC 4648 base32,
|
|
4
4
|
* lowercase, no padding, of the SHA-256 of the client id's UTF-8 bytes. Synchronous (no WebCrypto), so
|
|
5
5
|
* `scopes()` and `clientMetadata()` stay synchronous.
|
|
6
6
|
*/
|
|
@@ -61,7 +61,7 @@ export function sha256(bytes) {
|
|
|
61
61
|
outView.setUint32(i * 4, h[i]);
|
|
62
62
|
return out;
|
|
63
63
|
}
|
|
64
|
-
/** RFC 4648 base32, lowercase, no padding (
|
|
64
|
+
/** RFC 4648 base32, lowercase, no padding (platform `base32_lower_nopad`). */
|
|
65
65
|
function base32LowerNoPad(bytes) {
|
|
66
66
|
const alphabet = 'abcdefghijklmnopqrstuvwxyz234567';
|
|
67
67
|
let out = '';
|
package/dist/auth/index.js
CHANGED
|
@@ -86,7 +86,7 @@ function scopeList({ platform = TECHNE_PLATFORM_DID, types = [], everything, pub
|
|
|
86
86
|
...(publish ? [`rpc:${NSID.REGISTRY_PUBLISH_TYPE}?aud=${aud}`] : []),
|
|
87
87
|
];
|
|
88
88
|
}
|
|
89
|
-
/** A `repo` scope for `collections`, every action (
|
|
89
|
+
/** A `repo` scope for `collections`, every action (platform `regenos_appview::nsid_rewrite::repo_scope`,
|
|
90
90
|
* crates/regenos-appview/src/nsid_rewrite.rs). */
|
|
91
91
|
function repoScope(collections) {
|
|
92
92
|
const actions = 'action=create&action=update&action=delete';
|
|
@@ -155,10 +155,10 @@ export declare const catalog: {
|
|
|
155
155
|
$type: string;
|
|
156
156
|
of: ({
|
|
157
157
|
$type: string;
|
|
158
|
-
|
|
158
|
+
of?: undefined;
|
|
159
159
|
} | {
|
|
160
160
|
$type: string;
|
|
161
|
-
|
|
161
|
+
of: string;
|
|
162
162
|
})[];
|
|
163
163
|
atLeast?: undefined;
|
|
164
164
|
includeMemberCollectives?: undefined;
|
|
@@ -176,8 +176,8 @@ export declare const catalog: {
|
|
|
176
176
|
};
|
|
177
177
|
doc: unknown;
|
|
178
178
|
policyNsid: string;
|
|
179
|
+
policyDescription: string;
|
|
179
180
|
policyDoc: unknown;
|
|
180
|
-
policyDescription?: undefined;
|
|
181
181
|
} | {
|
|
182
182
|
nsid: string;
|
|
183
183
|
name: string;
|
|
@@ -188,25 +188,31 @@ export declare const catalog: {
|
|
|
188
188
|
policy: {
|
|
189
189
|
read: {
|
|
190
190
|
$type: string;
|
|
191
|
-
of:
|
|
192
|
-
|
|
193
|
-
|
|
191
|
+
of: ({
|
|
192
|
+
$type: string;
|
|
193
|
+
atLeast?: undefined;
|
|
194
|
+
} | {
|
|
195
|
+
$type: string;
|
|
196
|
+
atLeast: number;
|
|
197
|
+
})[];
|
|
198
|
+
atLeast?: undefined;
|
|
199
|
+
includeMemberCollectives?: undefined;
|
|
194
200
|
};
|
|
195
201
|
write: {
|
|
196
202
|
$type: string;
|
|
197
|
-
of
|
|
198
|
-
atLeast
|
|
203
|
+
of?: undefined;
|
|
204
|
+
atLeast?: undefined;
|
|
199
205
|
};
|
|
200
206
|
manage: {
|
|
201
207
|
$type: string;
|
|
202
|
-
of
|
|
203
|
-
atLeast
|
|
208
|
+
of?: undefined;
|
|
209
|
+
atLeast?: undefined;
|
|
204
210
|
};
|
|
205
211
|
};
|
|
206
212
|
doc: unknown;
|
|
207
213
|
policyNsid: string;
|
|
208
|
-
policyDescription: string;
|
|
209
214
|
policyDoc: unknown;
|
|
215
|
+
policyDescription?: undefined;
|
|
210
216
|
} | {
|
|
211
217
|
nsid: string;
|
|
212
218
|
name: string;
|
|
@@ -218,18 +224,18 @@ export declare const catalog: {
|
|
|
218
224
|
read: {
|
|
219
225
|
$type: string;
|
|
220
226
|
of: string;
|
|
221
|
-
atLeast
|
|
222
|
-
includeMemberCollectives
|
|
227
|
+
atLeast: number;
|
|
228
|
+
includeMemberCollectives: boolean;
|
|
223
229
|
};
|
|
224
230
|
write: {
|
|
225
231
|
$type: string;
|
|
226
|
-
of
|
|
227
|
-
atLeast
|
|
232
|
+
of: string;
|
|
233
|
+
atLeast: number;
|
|
228
234
|
};
|
|
229
235
|
manage: {
|
|
230
236
|
$type: string;
|
|
231
|
-
of
|
|
232
|
-
atLeast
|
|
237
|
+
of: string;
|
|
238
|
+
atLeast: number;
|
|
233
239
|
};
|
|
234
240
|
};
|
|
235
241
|
doc: unknown;
|
|
@@ -246,13 +252,7 @@ export declare const catalog: {
|
|
|
246
252
|
policy: {
|
|
247
253
|
read: {
|
|
248
254
|
$type: string;
|
|
249
|
-
of:
|
|
250
|
-
$type: string;
|
|
251
|
-
of?: undefined;
|
|
252
|
-
} | {
|
|
253
|
-
$type: string;
|
|
254
|
-
of: string;
|
|
255
|
-
})[];
|
|
255
|
+
of: string;
|
|
256
256
|
atLeast?: undefined;
|
|
257
257
|
includeMemberCollectives?: undefined;
|
|
258
258
|
};
|