techne-sdk 0.9.0 → 0.11.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 +33 -0
- package/README.md +40 -4
- package/dist/catalog/catalog.gen.js +192 -9
- package/dist/generated/index.d.ts +6 -0
- package/dist/generated/index.js +18 -0
- package/dist/generated/lexicons.d.ts +296 -14
- package/dist/generated/lexicons.js +167 -7
- package/dist/generated/nsid.d.ts +2 -0
- package/dist/generated/nsid.js +2 -0
- package/dist/generated/nsid.json +2 -0
- package/dist/generated/types/pub/techne/draft/identity/attachLinkGrant.d.ts +54 -0
- package/dist/generated/types/pub/techne/draft/identity/attachLinkGrant.js +76 -0
- package/dist/generated/types/pub/techne/draft/identity/claimLinkGrant.d.ts +49 -0
- package/dist/generated/types/pub/techne/draft/identity/claimLinkGrant.js +55 -0
- package/dist/session/own-session.d.ts +6 -6
- package/dist/session/own-session.js +45 -44
- package/dist/session/phone.d.ts +27 -8
- package/dist/session/phone.js +73 -14
- package/dist/session/relay.d.ts +23 -0
- package/dist/session/relay.js +44 -0
- package/dist/wasm/techne-wasm.gen.js +1 -1
- package/dist/wasm/techne-wasm2js.gen.js +15866 -15866
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,39 @@
|
|
|
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.11.0 (2026-11-22)
|
|
7
|
+
|
|
8
|
+
npm 0.11.0 changes `techne-sdk/session` only; no export is removed or renamed. Nothing under `crates/` changed
|
|
9
|
+
since 0.10.0, so the crate stays 0.10.0.
|
|
10
|
+
|
|
11
|
+
- **`adoptHeldSession` does not lose the session it takes over** (deprecated, as before). New option `store`:
|
|
12
|
+
the checked session is saved there before the issuer's metadata is fetched (with the atproto endpoints
|
|
13
|
+
`/oauth/token` and `/oauth/revoke`, and only when the store holds no session), so an app killed during that
|
|
14
|
+
fetch restores it on its next launch; when the metadata names other endpoints the saved set is corrected
|
|
15
|
+
while the store still holds it. With `store`, open the session with `OwnSession.restore` (the store may hold
|
|
16
|
+
a newer set by then: a refresh or a sign-in made meanwhile), not `signedIn`. A request that got no answer (the network failed, a send took over 15 s, a
|
|
17
|
+
gateway answered 502/504) is sent again, the same request, for up to 50 s, each send given up 5 s before the
|
|
18
|
+
platform's 60 s answer window; a platform that keeps the adopt answer for the same device credential gives it
|
|
19
|
+
again. No answer in that window rejects `NetworkError` (before, a send had no time limit). A 503, a 429 or a
|
|
20
|
+
refusal is not sent again.
|
|
21
|
+
- **A session that ends signs its device credential out.** When the PDS refuses a refresh (the grant was
|
|
22
|
+
revoked, for example on the account page), the refresh answers tokens the device cannot use, or there is no
|
|
23
|
+
refresh token, the session now also calls `signOutDevice` with its device proof (best effort, not awaited),
|
|
24
|
+
so the platform drops the phone's push token then instead of when the device session expires. A session
|
|
25
|
+
that ends because the store holds another key's set (signed out and in again in another process) does not,
|
|
26
|
+
and neither clears nor signs out while the store holds a set another process rotated meanwhile.
|
|
27
|
+
|
|
28
|
+
## 0.10.0 (2026-11-21)
|
|
29
|
+
|
|
30
|
+
npm 0.10.0 and crate 0.10.0 are built from the same commit. Additions only; no export is removed or renamed.
|
|
31
|
+
The release moves the crate to the check the platform pins, so the commons can pin platform `main` again.
|
|
32
|
+
|
|
33
|
+
- **Lexicons `v0.1.22-techne.97`, check crate `techne-lexicon-check` 0.3.33** (the crate's dependency, exact).
|
|
34
|
+
New methods `pub.techne.draft.identity.attachLinkGrant` and `pub.techne.draft.identity.claimLinkGrant`
|
|
35
|
+
(generated types, NSIDs and catalog entries); the link-token methods gain their link-grant refusals
|
|
36
|
+
(description and error text only).
|
|
37
|
+
- **Platform API at platform `main` `699c0b2bd`.** No published method changed since `d26238730`.
|
|
38
|
+
|
|
6
39
|
## 0.9.0 (2026-11-20)
|
|
7
40
|
|
|
8
41
|
npm 0.9.0 and crate 0.9.0 are built from the same commit. Additions only; no export is removed or renamed. The
|
package/README.md
CHANGED
|
@@ -141,7 +141,8 @@ const techne = connect(session, TECHNE_PLATFORM_DID)
|
|
|
141
141
|
to 50 seconds, which the platform answers from its 60-second window (each send is given up 5 seconds before
|
|
142
142
|
that window closes). A store that holds a set under another DPoP key (the person signed out and in again in
|
|
143
143
|
another process) ends this session without touching the store. `onEnded` is called when the session is
|
|
144
|
-
over (`SessionEnded`: sign in again)
|
|
144
|
+
over (`SessionEnded`: sign in again); a session that ends that way (say the grant was revoked on the account
|
|
145
|
+
page) also signs its device credential out, best effort, so the platform drops the phone's push token.
|
|
145
146
|
- **The device credential** (push registration, the device list, `signOutDevice`, the change stream) goes only
|
|
146
147
|
with a proof of the session's key: `new AtpBaseClient(session.deviceFetchHandler)` for the calls,
|
|
147
148
|
`session.deviceHeaders('GET', wssUrl)` for the WebSocket's headers.
|
|
@@ -149,9 +150,44 @@ const techne = connect(session, TECHNE_PLATFORM_DID)
|
|
|
149
150
|
seconds) and clears the store, whatever the network says; when the store holds another key's set it leaves
|
|
150
151
|
that set and the store alone.
|
|
151
152
|
- **Moving an older install** (deprecated, removed when the platform stops holding sessions):
|
|
152
|
-
`adoptHeldSession({ platformUrl, deviceSession, did })` takes over the session the platform holds for
|
|
153
|
-
device signed in with a full `rsds_` credential (`WrongAccount` when it is not `did`'s); save its answer
|
|
154
|
-
`OwnSession.signedIn` at once. The tokens are kept even when the issuer's metadata does not answer.
|
|
153
|
+
`adoptHeldSession({ platformUrl, deviceSession, did, store })` takes over the session the platform holds for
|
|
154
|
+
a device signed in with a full `rsds_` credential (`WrongAccount` when it is not `did`'s); save its answer
|
|
155
|
+
with `OwnSession.signedIn` at once. The tokens are kept even when the issuer's metadata does not answer. With
|
|
156
|
+
`store`, the session is saved there (only when the store is empty) before the issuer's metadata is fetched,
|
|
157
|
+
so an app killed meanwhile restores it on its next launch; then open it with `OwnSession.restore`, not
|
|
158
|
+
`signedIn` (the store may hold a newer set by then), and `signedIn` the answer only when `restore` finds
|
|
159
|
+
nothing. A request that got no answer (network, a send
|
|
160
|
+
over 15 seconds, 502/504) is sent again for up to 50 seconds, for a platform that keeps the answer for the
|
|
161
|
+
same device credential; `NetworkError` after that.
|
|
162
|
+
|
|
163
|
+
## Do it the atproto way
|
|
164
|
+
|
|
165
|
+
The platform's builder guide (`get_app_guide`) has the same notes.
|
|
166
|
+
|
|
167
|
+
- **Read a record from its own PDS.** Resolve the repo's DID and call `com.atproto.repo.getRecord` on the
|
|
168
|
+
`#atproto_pds` service its document names. `didDocumentUrl(did)` from `techne-sdk/connect` gives the
|
|
169
|
+
document's address (the PLC directory for a did:plc, `did.json` for a did:web). Cache the resolution. Never
|
|
170
|
+
assume a repo lives on the Techne PDS. In Rust, `techne_sdk::fetch::fetch_verified` with a
|
|
171
|
+
`techne_sdk::did::CommonDidKeyResolver` (feature `net`) does this and verifies the record's proof.
|
|
172
|
+
- **A backend writes as an identity only under that identity's grant.** The grant is a token in the request,
|
|
173
|
+
or the identity's own OAuth grant to that service (narrow, visible to the person, revocable). Holding an
|
|
174
|
+
account's keys is not a grant.
|
|
175
|
+
- **Custodial collectives are a named exception.** The platform holds a collective's key today, and
|
|
176
|
+
`writeAsCollective` relies on that. The exception goes once a collective can grant the platform like any
|
|
177
|
+
account. Build nothing new that depends on the platform holding the key.
|
|
178
|
+
- **Something the collective says is written as the collective:** `techne.writeAsCollective(input)`, and the
|
|
179
|
+
collective's policy decides. Shared work of its members is different. It goes in a space the collective
|
|
180
|
+
shares, and each member writes their part into their own repo (`put` with a `space`).
|
|
181
|
+
- **The client that holds the permission makes every write of an action, while the person waits.** That
|
|
182
|
+
covers the person's own record and any write as the collective. The platform makes no background write
|
|
183
|
+
because of something a person did.
|
|
184
|
+
- **Link grants are the example.** An app holding its own session redeems the link at the person's identity
|
|
185
|
+
PDS (`pub.techne.draft.identity.redeemLinkToken`), then calls `pub.techne.draft.identity.claimLinkGrant`
|
|
186
|
+
through that PDS in the same action. The platform writes the grant's record in that request and never
|
|
187
|
+
later. `transition:generic` covers that call today; an app that drops it needs
|
|
188
|
+
`rpc:pub.techne.draft.identity.claimLinkGrant?aud=did:web:techne.computer%23atproto_appview`. This SDK
|
|
189
|
+
has no wrapper for `claimLinkGrant` yet; `redeemLink` from `techne-sdk/links` calls the platform, which
|
|
190
|
+
opens only links from before link tokens for such an app.
|
|
155
191
|
|
|
156
192
|
## Where we differ from atproto
|
|
157
193
|
|
|
@@ -5882,6 +5882,98 @@ export const catalog = {
|
|
|
5882
5882
|
}
|
|
5883
5883
|
})
|
|
5884
5884
|
},
|
|
5885
|
+
{
|
|
5886
|
+
"nsid": "pub.techne.draft.identity.attachLinkGrant",
|
|
5887
|
+
"name": "draft.identity.attachLinkGrant",
|
|
5888
|
+
"group": "pub.techne",
|
|
5889
|
+
"kind": "procedure",
|
|
5890
|
+
"description": "Attach a grant to a link token the caller made on their own identity PDS (an app holding its own session calls createLinkToken or resetLinkToken there, then this through its PDS). The platform asks the identity PDS (checkLinkToken) whether `token` is live and the caller's; it then keeps `grant` for that link as createLinkToken with `grant` does. `grant.actAs` must be a collective (`ActAsPerson` otherwise): a person's records are written by their own app, never by the platform for someone else's tap, so a link to a person's thing carries no grant and its owner's app acts on the redemptions it lists. The same rules hold: the grant writes as the account the link's target names, the caller must be able to write as `grant.actAs` now and when the link is redeemed, and the record must be one permissioned.putRecord would take with the caller's DID in the slot. Such a grant is released only in the redeemer's own request: their app redeems the link at its identity PDS, then calls claimLinkGrant; it is never released in the background. Releasing a grant that writes as a circle relies on the platform holding the circle's key, a named exception that goes when collectives can grant the platform like any account. One grant per link: attaching the same grant again answers as the first time; a different one is `AlreadyGranted`. A redemption reported before the grant was attached releases nothing, so attach before sharing the link. Only an account hosted on the platform's identity PDS can attach a grant. One call spends one of the caller's writes.",
|
|
5891
|
+
"doc": ({
|
|
5892
|
+
"lexicon": 1,
|
|
5893
|
+
"id": "pub.techne.draft.identity.attachLinkGrant",
|
|
5894
|
+
"defs": {
|
|
5895
|
+
"main": {
|
|
5896
|
+
"type": "procedure",
|
|
5897
|
+
"description": "Attach a grant to a link token the caller made on their own identity PDS (an app holding its own session calls createLinkToken or resetLinkToken there, then this through its PDS). The platform asks the identity PDS (checkLinkToken) whether `token` is live and the caller's; it then keeps `grant` for that link as createLinkToken with `grant` does. `grant.actAs` must be a collective (`ActAsPerson` otherwise): a person's records are written by their own app, never by the platform for someone else's tap, so a link to a person's thing carries no grant and its owner's app acts on the redemptions it lists. The same rules hold: the grant writes as the account the link's target names, the caller must be able to write as `grant.actAs` now and when the link is redeemed, and the record must be one permissioned.putRecord would take with the caller's DID in the slot. Such a grant is released only in the redeemer's own request: their app redeems the link at its identity PDS, then calls claimLinkGrant; it is never released in the background. Releasing a grant that writes as a circle relies on the platform holding the circle's key, a named exception that goes when collectives can grant the platform like any account. One grant per link: attaching the same grant again answers as the first time; a different one is `AlreadyGranted`. A redemption reported before the grant was attached releases nothing, so attach before sharing the link. Only an account hosted on the platform's identity PDS can attach a grant. One call spends one of the caller's writes.",
|
|
5898
|
+
"input": {
|
|
5899
|
+
"encoding": "application/json",
|
|
5900
|
+
"schema": {
|
|
5901
|
+
"type": "object",
|
|
5902
|
+
"required": [
|
|
5903
|
+
"token",
|
|
5904
|
+
"grant"
|
|
5905
|
+
],
|
|
5906
|
+
"properties": {
|
|
5907
|
+
"token": {
|
|
5908
|
+
"type": "string",
|
|
5909
|
+
"minLength": 1,
|
|
5910
|
+
"maxLength": 512,
|
|
5911
|
+
"description": "The link's token, as the identity PDS answered it to the caller."
|
|
5912
|
+
},
|
|
5913
|
+
"grant": {
|
|
5914
|
+
"type": "ref",
|
|
5915
|
+
"ref": "pub.techne.draft.identity.defs#linkGrant"
|
|
5916
|
+
}
|
|
5917
|
+
}
|
|
5918
|
+
}
|
|
5919
|
+
},
|
|
5920
|
+
"output": {
|
|
5921
|
+
"encoding": "application/json",
|
|
5922
|
+
"schema": {
|
|
5923
|
+
"type": "object",
|
|
5924
|
+
"required": [
|
|
5925
|
+
"id"
|
|
5926
|
+
],
|
|
5927
|
+
"properties": {
|
|
5928
|
+
"id": {
|
|
5929
|
+
"type": "string",
|
|
5930
|
+
"description": "The link's id on the identity PDS."
|
|
5931
|
+
}
|
|
5932
|
+
}
|
|
5933
|
+
}
|
|
5934
|
+
},
|
|
5935
|
+
"errors": [
|
|
5936
|
+
{
|
|
5937
|
+
"name": "InvalidRequest",
|
|
5938
|
+
"description": "HTTP 400: a field out of bounds, the grant does not write as the account the link's target names, or a body that is not JSON; 413: the body, or `grant.write`, over its size cap; 415: not application/json; 422: not the input's shape."
|
|
5939
|
+
},
|
|
5940
|
+
{
|
|
5941
|
+
"name": "LinkNotUsable",
|
|
5942
|
+
"description": "HTTP 400: the token names no live link of the caller's."
|
|
5943
|
+
},
|
|
5944
|
+
{
|
|
5945
|
+
"name": "ActAsPerson",
|
|
5946
|
+
"description": "HTTP 400: `grant.actAs` is not a collective the platform knows (a person, or an unknown account); only a collective's grant can be attached."
|
|
5947
|
+
},
|
|
5948
|
+
{
|
|
5949
|
+
"name": "AlreadyGranted",
|
|
5950
|
+
"description": "HTTP 409: the link already carries another grant."
|
|
5951
|
+
},
|
|
5952
|
+
{
|
|
5953
|
+
"name": "Forbidden",
|
|
5954
|
+
"description": "HTTP 403: `grant.actAs` is not an account the caller may write as."
|
|
5955
|
+
},
|
|
5956
|
+
{
|
|
5957
|
+
"name": "ProgramRefused",
|
|
5958
|
+
"description": "HTTP 403: an agent's or program's token may not attach a grant that writes an approval record."
|
|
5959
|
+
},
|
|
5960
|
+
{
|
|
5961
|
+
"name": "NotSupported",
|
|
5962
|
+
"description": "HTTP 400: the caller's account is not hosted on the platform's identity PDS, or link tokens are not configured there."
|
|
5963
|
+
},
|
|
5964
|
+
{
|
|
5965
|
+
"name": "RateLimitExceeded",
|
|
5966
|
+
"description": "HTTP 429: too many writes from this DID, or the identity PDS is limiting the platform's checks; try again later."
|
|
5967
|
+
},
|
|
5968
|
+
{
|
|
5969
|
+
"name": "UpstreamFailure",
|
|
5970
|
+
"description": "HTTP 502: the identity PDS could not be reached or answered with a failure; try again."
|
|
5971
|
+
}
|
|
5972
|
+
]
|
|
5973
|
+
}
|
|
5974
|
+
}
|
|
5975
|
+
})
|
|
5976
|
+
},
|
|
5885
5977
|
{
|
|
5886
5978
|
"nsid": "pub.techne.draft.identity.attest",
|
|
5887
5979
|
"name": "draft.identity.attest",
|
|
@@ -6212,6 +6304,97 @@ export const catalog = {
|
|
|
6212
6304
|
}
|
|
6213
6305
|
})
|
|
6214
6306
|
},
|
|
6307
|
+
{
|
|
6308
|
+
"nsid": "pub.techne.draft.identity.claimLinkGrant",
|
|
6309
|
+
"name": "draft.identity.claimLinkGrant",
|
|
6310
|
+
"group": "pub.techne",
|
|
6311
|
+
"kind": "procedure",
|
|
6312
|
+
"description": "Release, now, the grant of a link the caller redeemed on their own identity PDS (an app holding its own session calls redeemLinkToken there, then this through its PDS, in the same user action). The platform needs the redemption the identity PDS reported for the caller; it writes the grant's record as the grant's `actAs` in this request, under the grant's rules (the link's owner may still write as `actAs`, no block between owner and redeemer). The platform never releases such a grant in the background. Claiming a link again releases its grant again only for a reusable link still live under `token` (someone removed from a circle who opens its link again is a member again); otherwise it answers `written: false`. One call spends one of the caller's writes.",
|
|
6313
|
+
"doc": ({
|
|
6314
|
+
"lexicon": 1,
|
|
6315
|
+
"id": "pub.techne.draft.identity.claimLinkGrant",
|
|
6316
|
+
"defs": {
|
|
6317
|
+
"main": {
|
|
6318
|
+
"type": "procedure",
|
|
6319
|
+
"description": "Release, now, the grant of a link the caller redeemed on their own identity PDS (an app holding its own session calls redeemLinkToken there, then this through its PDS, in the same user action). The platform needs the redemption the identity PDS reported for the caller; it writes the grant's record as the grant's `actAs` in this request, under the grant's rules (the link's owner may still write as `actAs`, no block between owner and redeemer). The platform never releases such a grant in the background. Claiming a link again releases its grant again only for a reusable link still live under `token` (someone removed from a circle who opens its link again is a member again); otherwise it answers `written: false`. One call spends one of the caller's writes.",
|
|
6320
|
+
"input": {
|
|
6321
|
+
"encoding": "application/json",
|
|
6322
|
+
"schema": {
|
|
6323
|
+
"type": "object",
|
|
6324
|
+
"required": [
|
|
6325
|
+
"id",
|
|
6326
|
+
"token"
|
|
6327
|
+
],
|
|
6328
|
+
"properties": {
|
|
6329
|
+
"id": {
|
|
6330
|
+
"type": "string",
|
|
6331
|
+
"minLength": 1,
|
|
6332
|
+
"maxLength": 512,
|
|
6333
|
+
"description": "The link's id, as redeemLinkToken answered it."
|
|
6334
|
+
},
|
|
6335
|
+
"token": {
|
|
6336
|
+
"type": "string",
|
|
6337
|
+
"minLength": 1,
|
|
6338
|
+
"maxLength": 512,
|
|
6339
|
+
"description": "The link's token, as redeemed."
|
|
6340
|
+
}
|
|
6341
|
+
}
|
|
6342
|
+
}
|
|
6343
|
+
},
|
|
6344
|
+
"output": {
|
|
6345
|
+
"encoding": "application/json",
|
|
6346
|
+
"schema": {
|
|
6347
|
+
"type": "object",
|
|
6348
|
+
"required": [
|
|
6349
|
+
"id",
|
|
6350
|
+
"written"
|
|
6351
|
+
],
|
|
6352
|
+
"properties": {
|
|
6353
|
+
"id": {
|
|
6354
|
+
"type": "string",
|
|
6355
|
+
"description": "The link's id."
|
|
6356
|
+
},
|
|
6357
|
+
"written": {
|
|
6358
|
+
"type": "boolean",
|
|
6359
|
+
"description": "Whether the grant's record was written by this call."
|
|
6360
|
+
},
|
|
6361
|
+
"reason": {
|
|
6362
|
+
"type": "string",
|
|
6363
|
+
"description": "When nothing was written: why (the record is already there, the link carries no grant, it was revoked, the grant was released before, ...). Free text, for logs."
|
|
6364
|
+
}
|
|
6365
|
+
}
|
|
6366
|
+
}
|
|
6367
|
+
},
|
|
6368
|
+
"errors": [
|
|
6369
|
+
{
|
|
6370
|
+
"name": "InvalidRequest",
|
|
6371
|
+
"description": "HTTP 400: a field out of bounds, or a body that is not JSON; 413: the body over its size cap; 415: not application/json; 422: not the input's shape."
|
|
6372
|
+
},
|
|
6373
|
+
{
|
|
6374
|
+
"name": "NotRedeemed",
|
|
6375
|
+
"description": "HTTP 409: no redemption of this link by the caller has been reported by the identity PDS (yet); redeem it there first."
|
|
6376
|
+
},
|
|
6377
|
+
{
|
|
6378
|
+
"name": "TryAgain",
|
|
6379
|
+
"description": "HTTP 503: the release could not finish now; claim it again."
|
|
6380
|
+
},
|
|
6381
|
+
{
|
|
6382
|
+
"name": "NotSupported",
|
|
6383
|
+
"description": "HTTP 400: the caller's account is not hosted on the platform's identity PDS, or link tokens are not configured there."
|
|
6384
|
+
},
|
|
6385
|
+
{
|
|
6386
|
+
"name": "RateLimitExceeded",
|
|
6387
|
+
"description": "HTTP 429: too many writes from this DID, or the identity PDS is limiting the platform's checks; try again later."
|
|
6388
|
+
},
|
|
6389
|
+
{
|
|
6390
|
+
"name": "UpstreamFailure",
|
|
6391
|
+
"description": "HTTP 502: the identity PDS could not be reached or answered with a failure; try again."
|
|
6392
|
+
}
|
|
6393
|
+
]
|
|
6394
|
+
}
|
|
6395
|
+
}
|
|
6396
|
+
})
|
|
6397
|
+
},
|
|
6215
6398
|
{
|
|
6216
6399
|
"nsid": "pub.techne.draft.identity.createCollective",
|
|
6217
6400
|
"name": "draft.identity.createCollective",
|
|
@@ -6358,7 +6541,7 @@ export const catalog = {
|
|
|
6358
6541
|
},
|
|
6359
6542
|
{
|
|
6360
6543
|
"name": "NotSupported",
|
|
6361
|
-
"description": "HTTP 400: the caller's account is not hosted on the platform's identity PDS, or link tokens are not configured there."
|
|
6544
|
+
"description": "HTTP 400: the caller's account is not hosted on the platform's identity PDS, or link tokens are not configured there; or the caller holds its own session (it came through its PDS with a service-auth token): call this method on its identity PDS itself and attach a grant with attachLinkGrant."
|
|
6362
6545
|
},
|
|
6363
6546
|
{
|
|
6364
6547
|
"name": "RateLimitExceeded",
|
|
@@ -7287,7 +7470,7 @@ export const catalog = {
|
|
|
7287
7470
|
},
|
|
7288
7471
|
{
|
|
7289
7472
|
"name": "NotSupported",
|
|
7290
|
-
"description": "HTTP 400: the caller's account is not hosted on the platform's identity PDS, or link tokens are not configured there."
|
|
7473
|
+
"description": "HTTP 400: the caller's account is not hosted on the platform's identity PDS, or link tokens are not configured there; or the caller holds its own session (it came through its PDS with a service-auth token): call this method on its identity PDS itself."
|
|
7291
7474
|
},
|
|
7292
7475
|
{
|
|
7293
7476
|
"name": "RateLimitExceeded",
|
|
@@ -7364,7 +7547,7 @@ export const catalog = {
|
|
|
7364
7547
|
},
|
|
7365
7548
|
{
|
|
7366
7549
|
"name": "NotSupported",
|
|
7367
|
-
"description": "HTTP 400: the caller's account is not hosted on the platform's identity PDS, or link tokens are not configured there."
|
|
7550
|
+
"description": "HTTP 400: the caller's account is not hosted on the platform's identity PDS, or link tokens are not configured there; or the caller holds its own session (it came through its PDS with a service-auth token): call this method on its identity PDS itself."
|
|
7368
7551
|
},
|
|
7369
7552
|
{
|
|
7370
7553
|
"name": "RateLimitExceeded",
|
|
@@ -8307,14 +8490,14 @@ export const catalog = {
|
|
|
8307
8490
|
"name": "draft.identity.redeemLinkToken",
|
|
8308
8491
|
"group": "pub.techne",
|
|
8309
8492
|
"kind": "procedure",
|
|
8310
|
-
"description": "Redeem a link token as the caller. The identity PDS records it and reports it to the platform, which writes the caller's linkRedemption record and the link's grant, usually before this answers. Redeeming again a link the caller already redeemed answers `repeat` and changes nothing. One call spends one of the caller's writes. An older link (one the served app made before link tokens) writes no linkRedemption record.",
|
|
8493
|
+
"description": "Redeem a link token as the caller. The identity PDS records it and reports it to the platform, which writes the caller's linkRedemption record and the link's grant, usually before this answers. Redeeming again a link the caller already redeemed answers `repeat` and changes nothing. One call spends one of the caller's writes. An older link (one the served app made before link tokens) writes no linkRedemption record. A caller that holds its own session redeems at its identity PDS and then calls claimLinkGrant; here it opens only the app's links from before link tokens. A link whose grant was attached with attachLinkGrant has it released in this request.",
|
|
8311
8494
|
"doc": ({
|
|
8312
8495
|
"lexicon": 1,
|
|
8313
8496
|
"id": "pub.techne.draft.identity.redeemLinkToken",
|
|
8314
8497
|
"defs": {
|
|
8315
8498
|
"main": {
|
|
8316
8499
|
"type": "procedure",
|
|
8317
|
-
"description": "Redeem a link token as the caller. The identity PDS records it and reports it to the platform, which writes the caller's linkRedemption record and the link's grant, usually before this answers. Redeeming again a link the caller already redeemed answers `repeat` and changes nothing. One call spends one of the caller's writes. An older link (one the served app made before link tokens) writes no linkRedemption record.",
|
|
8500
|
+
"description": "Redeem a link token as the caller. The identity PDS records it and reports it to the platform, which writes the caller's linkRedemption record and the link's grant, usually before this answers. Redeeming again a link the caller already redeemed answers `repeat` and changes nothing. One call spends one of the caller's writes. An older link (one the served app made before link tokens) writes no linkRedemption record. A caller that holds its own session redeems at its identity PDS and then calls claimLinkGrant; here it opens only the app's links from before link tokens. A link whose grant was attached with attachLinkGrant has it released in this request.",
|
|
8318
8501
|
"input": {
|
|
8319
8502
|
"encoding": "application/json",
|
|
8320
8503
|
"schema": {
|
|
@@ -8377,7 +8560,7 @@ export const catalog = {
|
|
|
8377
8560
|
},
|
|
8378
8561
|
{
|
|
8379
8562
|
"name": "LinkNotUsable",
|
|
8380
|
-
"description": "HTTP 400: the link is unknown, revoked, expired or already used by another account (\"this link no longer works\")."
|
|
8563
|
+
"description": "HTTP 400: the link is unknown, revoked, expired or already used by another account (\"this link no longer works\"); or, for a caller that holds its own session, any token but one of the app's links from before link tokens."
|
|
8381
8564
|
},
|
|
8382
8565
|
{
|
|
8383
8566
|
"name": "OwnLink",
|
|
@@ -8531,7 +8714,7 @@ export const catalog = {
|
|
|
8531
8714
|
},
|
|
8532
8715
|
{
|
|
8533
8716
|
"name": "NotSupported",
|
|
8534
|
-
"description": "HTTP 400: the caller's account is not hosted on the platform's identity PDS, or link tokens are not configured there."
|
|
8717
|
+
"description": "HTTP 400: the caller's account is not hosted on the platform's identity PDS, or link tokens are not configured there; or the caller holds its own session (it came through its PDS with a service-auth token): call this method on its identity PDS itself and attach a grant with attachLinkGrant."
|
|
8535
8718
|
},
|
|
8536
8719
|
{
|
|
8537
8720
|
"name": "RateLimitExceeded",
|
|
@@ -8704,7 +8887,7 @@ export const catalog = {
|
|
|
8704
8887
|
},
|
|
8705
8888
|
{
|
|
8706
8889
|
"name": "NotSupported",
|
|
8707
|
-
"description": "HTTP 400: the caller's account is not hosted on the platform's identity PDS, or link tokens are not configured there."
|
|
8890
|
+
"description": "HTTP 400: the caller's account is not hosted on the platform's identity PDS, or link tokens are not configured there; or the caller holds its own session (it came through its PDS with a service-auth token): call this method on its identity PDS itself."
|
|
8708
8891
|
},
|
|
8709
8892
|
{
|
|
8710
8893
|
"name": "RateLimitExceeded",
|
|
@@ -34582,7 +34765,7 @@ export const catalog = {
|
|
|
34582
34765
|
}
|
|
34583
34766
|
],
|
|
34584
34767
|
"counts": {
|
|
34585
|
-
"records":
|
|
34768
|
+
"records": 162,
|
|
34586
34769
|
"spaces": 13,
|
|
34587
34770
|
"predicates": 9,
|
|
34588
34771
|
"methods": 130
|
|
@@ -49,10 +49,12 @@ import * as PubTechneDraftFinancials from './types/pub/techne/draft/financials.j
|
|
|
49
49
|
import * as PubTechneDraftGeo from './types/pub/techne/draft/geo.js';
|
|
50
50
|
import * as PubTechneDraftHeldAt from './types/pub/techne/draft/heldAt.js';
|
|
51
51
|
import * as PubTechneDraftIdentityAccountsForPhones from './types/pub/techne/draft/identity/accountsForPhones.js';
|
|
52
|
+
import * as PubTechneDraftIdentityAttachLinkGrant from './types/pub/techne/draft/identity/attachLinkGrant.js';
|
|
52
53
|
import * as PubTechneDraftIdentityAttest from './types/pub/techne/draft/identity/attest.js';
|
|
53
54
|
import * as PubTechneDraftIdentityBeginAddMethod from './types/pub/techne/draft/identity/beginAddMethod.js';
|
|
54
55
|
import * as PubTechneDraftIdentityCancelPendingChange from './types/pub/techne/draft/identity/cancelPendingChange.js';
|
|
55
56
|
import * as PubTechneDraftIdentityCheckLinkToken from './types/pub/techne/draft/identity/checkLinkToken.js';
|
|
57
|
+
import * as PubTechneDraftIdentityClaimLinkGrant from './types/pub/techne/draft/identity/claimLinkGrant.js';
|
|
56
58
|
import * as PubTechneDraftIdentityCreateCollective from './types/pub/techne/draft/identity/createCollective.js';
|
|
57
59
|
import * as PubTechneDraftIdentityCreateLinkToken from './types/pub/techne/draft/identity/createLinkToken.js';
|
|
58
60
|
import * as PubTechneDraftIdentityFinishAddMethod from './types/pub/techne/draft/identity/finishAddMethod.js';
|
|
@@ -213,10 +215,12 @@ export * as PubTechneDraftFinancials from './types/pub/techne/draft/financials.j
|
|
|
213
215
|
export * as PubTechneDraftGeo from './types/pub/techne/draft/geo.js';
|
|
214
216
|
export * as PubTechneDraftHeldAt from './types/pub/techne/draft/heldAt.js';
|
|
215
217
|
export * as PubTechneDraftIdentityAccountsForPhones from './types/pub/techne/draft/identity/accountsForPhones.js';
|
|
218
|
+
export * as PubTechneDraftIdentityAttachLinkGrant from './types/pub/techne/draft/identity/attachLinkGrant.js';
|
|
216
219
|
export * as PubTechneDraftIdentityAttest from './types/pub/techne/draft/identity/attest.js';
|
|
217
220
|
export * as PubTechneDraftIdentityBeginAddMethod from './types/pub/techne/draft/identity/beginAddMethod.js';
|
|
218
221
|
export * as PubTechneDraftIdentityCancelPendingChange from './types/pub/techne/draft/identity/cancelPendingChange.js';
|
|
219
222
|
export * as PubTechneDraftIdentityCheckLinkToken from './types/pub/techne/draft/identity/checkLinkToken.js';
|
|
223
|
+
export * as PubTechneDraftIdentityClaimLinkGrant from './types/pub/techne/draft/identity/claimLinkGrant.js';
|
|
220
224
|
export * as PubTechneDraftIdentityCreateCollective from './types/pub/techne/draft/identity/createCollective.js';
|
|
221
225
|
export * as PubTechneDraftIdentityCreateLinkToken from './types/pub/techne/draft/identity/createLinkToken.js';
|
|
222
226
|
export * as PubTechneDraftIdentityDefs from './types/pub/techne/draft/identity/defs.js';
|
|
@@ -754,10 +758,12 @@ export declare class PubTechneDraftIdentityNS {
|
|
|
754
758
|
linkRedemption: PubTechneDraftIdentityLinkRedemptionRecord;
|
|
755
759
|
constructor(client: XrpcClient);
|
|
756
760
|
accountsForPhones(data?: PubTechneDraftIdentityAccountsForPhones.InputSchema, opts?: PubTechneDraftIdentityAccountsForPhones.CallOptions): Promise<PubTechneDraftIdentityAccountsForPhones.Response>;
|
|
761
|
+
attachLinkGrant(data?: PubTechneDraftIdentityAttachLinkGrant.InputSchema, opts?: PubTechneDraftIdentityAttachLinkGrant.CallOptions): Promise<PubTechneDraftIdentityAttachLinkGrant.Response>;
|
|
757
762
|
attest(data?: PubTechneDraftIdentityAttest.InputSchema, opts?: PubTechneDraftIdentityAttest.CallOptions): Promise<PubTechneDraftIdentityAttest.Response>;
|
|
758
763
|
beginAddMethod(data?: PubTechneDraftIdentityBeginAddMethod.InputSchema, opts?: PubTechneDraftIdentityBeginAddMethod.CallOptions): Promise<PubTechneDraftIdentityBeginAddMethod.Response>;
|
|
759
764
|
cancelPendingChange(data?: PubTechneDraftIdentityCancelPendingChange.InputSchema, opts?: PubTechneDraftIdentityCancelPendingChange.CallOptions): Promise<PubTechneDraftIdentityCancelPendingChange.Response>;
|
|
760
765
|
checkLinkToken(data?: PubTechneDraftIdentityCheckLinkToken.InputSchema, opts?: PubTechneDraftIdentityCheckLinkToken.CallOptions): Promise<PubTechneDraftIdentityCheckLinkToken.Response>;
|
|
766
|
+
claimLinkGrant(data?: PubTechneDraftIdentityClaimLinkGrant.InputSchema, opts?: PubTechneDraftIdentityClaimLinkGrant.CallOptions): Promise<PubTechneDraftIdentityClaimLinkGrant.Response>;
|
|
761
767
|
createCollective(data?: PubTechneDraftIdentityCreateCollective.InputSchema, opts?: PubTechneDraftIdentityCreateCollective.CallOptions): Promise<PubTechneDraftIdentityCreateCollective.Response>;
|
|
762
768
|
createLinkToken(data?: PubTechneDraftIdentityCreateLinkToken.InputSchema, opts?: PubTechneDraftIdentityCreateLinkToken.CallOptions): Promise<PubTechneDraftIdentityCreateLinkToken.Response>;
|
|
763
769
|
finishAddMethod(data?: PubTechneDraftIdentityFinishAddMethod.InputSchema, opts?: PubTechneDraftIdentityFinishAddMethod.CallOptions): Promise<PubTechneDraftIdentityFinishAddMethod.Response>;
|
package/dist/generated/index.js
CHANGED
|
@@ -11,10 +11,12 @@ import * as PubTechneDraftCommonsGetVersions from './types/pub/techne/draft/comm
|
|
|
11
11
|
import * as PubTechneDraftCommonsMoveAccountHandle from './types/pub/techne/draft/commons/moveAccountHandle.js';
|
|
12
12
|
import * as PubTechneDraftCommonsRunChain from './types/pub/techne/draft/commons/runChain.js';
|
|
13
13
|
import * as PubTechneDraftIdentityAccountsForPhones from './types/pub/techne/draft/identity/accountsForPhones.js';
|
|
14
|
+
import * as PubTechneDraftIdentityAttachLinkGrant from './types/pub/techne/draft/identity/attachLinkGrant.js';
|
|
14
15
|
import * as PubTechneDraftIdentityAttest from './types/pub/techne/draft/identity/attest.js';
|
|
15
16
|
import * as PubTechneDraftIdentityBeginAddMethod from './types/pub/techne/draft/identity/beginAddMethod.js';
|
|
16
17
|
import * as PubTechneDraftIdentityCancelPendingChange from './types/pub/techne/draft/identity/cancelPendingChange.js';
|
|
17
18
|
import * as PubTechneDraftIdentityCheckLinkToken from './types/pub/techne/draft/identity/checkLinkToken.js';
|
|
19
|
+
import * as PubTechneDraftIdentityClaimLinkGrant from './types/pub/techne/draft/identity/claimLinkGrant.js';
|
|
18
20
|
import * as PubTechneDraftIdentityCreateCollective from './types/pub/techne/draft/identity/createCollective.js';
|
|
19
21
|
import * as PubTechneDraftIdentityCreateLinkToken from './types/pub/techne/draft/identity/createLinkToken.js';
|
|
20
22
|
import * as PubTechneDraftIdentityFinishAddMethod from './types/pub/techne/draft/identity/finishAddMethod.js';
|
|
@@ -131,10 +133,12 @@ export * as PubTechneDraftFinancials from './types/pub/techne/draft/financials.j
|
|
|
131
133
|
export * as PubTechneDraftGeo from './types/pub/techne/draft/geo.js';
|
|
132
134
|
export * as PubTechneDraftHeldAt from './types/pub/techne/draft/heldAt.js';
|
|
133
135
|
export * as PubTechneDraftIdentityAccountsForPhones from './types/pub/techne/draft/identity/accountsForPhones.js';
|
|
136
|
+
export * as PubTechneDraftIdentityAttachLinkGrant from './types/pub/techne/draft/identity/attachLinkGrant.js';
|
|
134
137
|
export * as PubTechneDraftIdentityAttest from './types/pub/techne/draft/identity/attest.js';
|
|
135
138
|
export * as PubTechneDraftIdentityBeginAddMethod from './types/pub/techne/draft/identity/beginAddMethod.js';
|
|
136
139
|
export * as PubTechneDraftIdentityCancelPendingChange from './types/pub/techne/draft/identity/cancelPendingChange.js';
|
|
137
140
|
export * as PubTechneDraftIdentityCheckLinkToken from './types/pub/techne/draft/identity/checkLinkToken.js';
|
|
141
|
+
export * as PubTechneDraftIdentityClaimLinkGrant from './types/pub/techne/draft/identity/claimLinkGrant.js';
|
|
138
142
|
export * as PubTechneDraftIdentityCreateCollective from './types/pub/techne/draft/identity/createCollective.js';
|
|
139
143
|
export * as PubTechneDraftIdentityCreateLinkToken from './types/pub/techne/draft/identity/createLinkToken.js';
|
|
140
144
|
export * as PubTechneDraftIdentityDefs from './types/pub/techne/draft/identity/defs.js';
|
|
@@ -958,6 +962,13 @@ export class PubTechneDraftIdentityNS {
|
|
|
958
962
|
throw PubTechneDraftIdentityAccountsForPhones.toKnownErr(e);
|
|
959
963
|
});
|
|
960
964
|
}
|
|
965
|
+
attachLinkGrant(data, opts) {
|
|
966
|
+
return this._client
|
|
967
|
+
.call('pub.techne.draft.identity.attachLinkGrant', opts?.qp, data, opts)
|
|
968
|
+
.catch((e) => {
|
|
969
|
+
throw PubTechneDraftIdentityAttachLinkGrant.toKnownErr(e);
|
|
970
|
+
});
|
|
971
|
+
}
|
|
961
972
|
attest(data, opts) {
|
|
962
973
|
return this._client
|
|
963
974
|
.call('pub.techne.draft.identity.attest', opts?.qp, data, opts)
|
|
@@ -986,6 +997,13 @@ export class PubTechneDraftIdentityNS {
|
|
|
986
997
|
throw PubTechneDraftIdentityCheckLinkToken.toKnownErr(e);
|
|
987
998
|
});
|
|
988
999
|
}
|
|
1000
|
+
claimLinkGrant(data, opts) {
|
|
1001
|
+
return this._client
|
|
1002
|
+
.call('pub.techne.draft.identity.claimLinkGrant', opts?.qp, data, opts)
|
|
1003
|
+
.catch((e) => {
|
|
1004
|
+
throw PubTechneDraftIdentityClaimLinkGrant.toKnownErr(e);
|
|
1005
|
+
});
|
|
1006
|
+
}
|
|
989
1007
|
createCollective(data, opts) {
|
|
990
1008
|
return this._client
|
|
991
1009
|
.call('pub.techne.draft.identity.createCollective', opts?.qp, data, opts)
|