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
|
@@ -3146,6 +3146,76 @@ export declare const schemaDict: {
|
|
|
3146
3146
|
};
|
|
3147
3147
|
};
|
|
3148
3148
|
};
|
|
3149
|
+
readonly PubTechneDraftIdentityAttachLinkGrant: {
|
|
3150
|
+
readonly lexicon: 1;
|
|
3151
|
+
readonly id: "pub.techne.draft.identity.attachLinkGrant";
|
|
3152
|
+
readonly defs: {
|
|
3153
|
+
readonly main: {
|
|
3154
|
+
readonly type: "procedure";
|
|
3155
|
+
readonly 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.";
|
|
3156
|
+
readonly input: {
|
|
3157
|
+
readonly encoding: "application/json";
|
|
3158
|
+
readonly schema: {
|
|
3159
|
+
readonly type: "object";
|
|
3160
|
+
readonly required: ["token", "grant"];
|
|
3161
|
+
readonly properties: {
|
|
3162
|
+
readonly token: {
|
|
3163
|
+
readonly type: "string";
|
|
3164
|
+
readonly minLength: 1;
|
|
3165
|
+
readonly maxLength: 512;
|
|
3166
|
+
readonly description: "The link's token, as the identity PDS answered it to the caller.";
|
|
3167
|
+
};
|
|
3168
|
+
readonly grant: {
|
|
3169
|
+
readonly type: "ref";
|
|
3170
|
+
readonly ref: "lex:pub.techne.draft.identity.defs#linkGrant";
|
|
3171
|
+
};
|
|
3172
|
+
};
|
|
3173
|
+
};
|
|
3174
|
+
};
|
|
3175
|
+
readonly output: {
|
|
3176
|
+
readonly encoding: "application/json";
|
|
3177
|
+
readonly schema: {
|
|
3178
|
+
readonly type: "object";
|
|
3179
|
+
readonly required: ["id"];
|
|
3180
|
+
readonly properties: {
|
|
3181
|
+
readonly id: {
|
|
3182
|
+
readonly type: "string";
|
|
3183
|
+
readonly description: "The link's id on the identity PDS.";
|
|
3184
|
+
};
|
|
3185
|
+
};
|
|
3186
|
+
};
|
|
3187
|
+
};
|
|
3188
|
+
readonly errors: [{
|
|
3189
|
+
readonly name: "InvalidRequest";
|
|
3190
|
+
readonly 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.";
|
|
3191
|
+
}, {
|
|
3192
|
+
readonly name: "LinkNotUsable";
|
|
3193
|
+
readonly description: "HTTP 400: the token names no live link of the caller's.";
|
|
3194
|
+
}, {
|
|
3195
|
+
readonly name: "ActAsPerson";
|
|
3196
|
+
readonly 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.";
|
|
3197
|
+
}, {
|
|
3198
|
+
readonly name: "AlreadyGranted";
|
|
3199
|
+
readonly description: "HTTP 409: the link already carries another grant.";
|
|
3200
|
+
}, {
|
|
3201
|
+
readonly name: "Forbidden";
|
|
3202
|
+
readonly description: "HTTP 403: `grant.actAs` is not an account the caller may write as.";
|
|
3203
|
+
}, {
|
|
3204
|
+
readonly name: "ProgramRefused";
|
|
3205
|
+
readonly description: "HTTP 403: an agent's or program's token may not attach a grant that writes an approval record.";
|
|
3206
|
+
}, {
|
|
3207
|
+
readonly name: "NotSupported";
|
|
3208
|
+
readonly description: "HTTP 400: the caller's account is not hosted on the platform's identity PDS, or link tokens are not configured there.";
|
|
3209
|
+
}, {
|
|
3210
|
+
readonly name: "RateLimitExceeded";
|
|
3211
|
+
readonly description: "HTTP 429: too many writes from this DID, or the identity PDS is limiting the platform's checks; try again later.";
|
|
3212
|
+
}, {
|
|
3213
|
+
readonly name: "UpstreamFailure";
|
|
3214
|
+
readonly description: "HTTP 502: the identity PDS could not be reached or answered with a failure; try again.";
|
|
3215
|
+
}];
|
|
3216
|
+
};
|
|
3217
|
+
};
|
|
3218
|
+
};
|
|
3149
3219
|
readonly PubTechneDraftIdentityAttest: {
|
|
3150
3220
|
readonly lexicon: 1;
|
|
3151
3221
|
readonly id: "pub.techne.draft.identity.attest";
|
|
@@ -3401,6 +3471,77 @@ export declare const schemaDict: {
|
|
|
3401
3471
|
};
|
|
3402
3472
|
};
|
|
3403
3473
|
};
|
|
3474
|
+
readonly PubTechneDraftIdentityClaimLinkGrant: {
|
|
3475
|
+
readonly lexicon: 1;
|
|
3476
|
+
readonly id: "pub.techne.draft.identity.claimLinkGrant";
|
|
3477
|
+
readonly defs: {
|
|
3478
|
+
readonly main: {
|
|
3479
|
+
readonly type: "procedure";
|
|
3480
|
+
readonly 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.";
|
|
3481
|
+
readonly input: {
|
|
3482
|
+
readonly encoding: "application/json";
|
|
3483
|
+
readonly schema: {
|
|
3484
|
+
readonly type: "object";
|
|
3485
|
+
readonly required: ["id", "token"];
|
|
3486
|
+
readonly properties: {
|
|
3487
|
+
readonly id: {
|
|
3488
|
+
readonly type: "string";
|
|
3489
|
+
readonly minLength: 1;
|
|
3490
|
+
readonly maxLength: 512;
|
|
3491
|
+
readonly description: "The link's id, as redeemLinkToken answered it.";
|
|
3492
|
+
};
|
|
3493
|
+
readonly token: {
|
|
3494
|
+
readonly type: "string";
|
|
3495
|
+
readonly minLength: 1;
|
|
3496
|
+
readonly maxLength: 512;
|
|
3497
|
+
readonly description: "The link's token, as redeemed.";
|
|
3498
|
+
};
|
|
3499
|
+
};
|
|
3500
|
+
};
|
|
3501
|
+
};
|
|
3502
|
+
readonly output: {
|
|
3503
|
+
readonly encoding: "application/json";
|
|
3504
|
+
readonly schema: {
|
|
3505
|
+
readonly type: "object";
|
|
3506
|
+
readonly required: ["id", "written"];
|
|
3507
|
+
readonly properties: {
|
|
3508
|
+
readonly id: {
|
|
3509
|
+
readonly type: "string";
|
|
3510
|
+
readonly description: "The link's id.";
|
|
3511
|
+
};
|
|
3512
|
+
readonly written: {
|
|
3513
|
+
readonly type: "boolean";
|
|
3514
|
+
readonly description: "Whether the grant's record was written by this call.";
|
|
3515
|
+
};
|
|
3516
|
+
readonly reason: {
|
|
3517
|
+
readonly type: "string";
|
|
3518
|
+
readonly 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.";
|
|
3519
|
+
};
|
|
3520
|
+
};
|
|
3521
|
+
};
|
|
3522
|
+
};
|
|
3523
|
+
readonly errors: [{
|
|
3524
|
+
readonly name: "InvalidRequest";
|
|
3525
|
+
readonly 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.";
|
|
3526
|
+
}, {
|
|
3527
|
+
readonly name: "NotRedeemed";
|
|
3528
|
+
readonly description: "HTTP 409: no redemption of this link by the caller has been reported by the identity PDS (yet); redeem it there first.";
|
|
3529
|
+
}, {
|
|
3530
|
+
readonly name: "TryAgain";
|
|
3531
|
+
readonly description: "HTTP 503: the release could not finish now; claim it again.";
|
|
3532
|
+
}, {
|
|
3533
|
+
readonly name: "NotSupported";
|
|
3534
|
+
readonly description: "HTTP 400: the caller's account is not hosted on the platform's identity PDS, or link tokens are not configured there.";
|
|
3535
|
+
}, {
|
|
3536
|
+
readonly name: "RateLimitExceeded";
|
|
3537
|
+
readonly description: "HTTP 429: too many writes from this DID, or the identity PDS is limiting the platform's checks; try again later.";
|
|
3538
|
+
}, {
|
|
3539
|
+
readonly name: "UpstreamFailure";
|
|
3540
|
+
readonly description: "HTTP 502: the identity PDS could not be reached or answered with a failure; try again.";
|
|
3541
|
+
}];
|
|
3542
|
+
};
|
|
3543
|
+
};
|
|
3544
|
+
};
|
|
3404
3545
|
readonly PubTechneDraftIdentityCreateCollective: {
|
|
3405
3546
|
readonly lexicon: 1;
|
|
3406
3547
|
readonly id: "pub.techne.draft.identity.createCollective";
|
|
@@ -3516,7 +3657,7 @@ export declare const schemaDict: {
|
|
|
3516
3657
|
readonly description: "HTTP 403: `grant.actAs` is not an account the caller may write as.";
|
|
3517
3658
|
}, {
|
|
3518
3659
|
readonly name: "NotSupported";
|
|
3519
|
-
readonly description: "HTTP 400: the caller's account is not hosted on the platform's identity PDS, or link tokens are not configured there.";
|
|
3660
|
+
readonly 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.";
|
|
3520
3661
|
}, {
|
|
3521
3662
|
readonly name: "RateLimitExceeded";
|
|
3522
3663
|
readonly description: "Too many writes from this DID (HTTP 429).";
|
|
@@ -4215,7 +4356,7 @@ export declare const schemaDict: {
|
|
|
4215
4356
|
readonly description: "HTTP 400: a field out of bounds, or a body that is not JSON; 415: not application/json; 422: not the input's shape.";
|
|
4216
4357
|
}, {
|
|
4217
4358
|
readonly name: "NotSupported";
|
|
4218
|
-
readonly description: "HTTP 400: the caller's account is not hosted on the platform's identity PDS, or link tokens are not configured there.";
|
|
4359
|
+
readonly 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.";
|
|
4219
4360
|
}, {
|
|
4220
4361
|
readonly name: "RateLimitExceeded";
|
|
4221
4362
|
readonly description: "Too many writes from this DID (HTTP 429).";
|
|
@@ -4275,7 +4416,7 @@ export declare const schemaDict: {
|
|
|
4275
4416
|
readonly description: "HTTP 400: a field out of bounds, or a body that is not JSON; 415: not application/json; 422: not the input's shape.";
|
|
4276
4417
|
}, {
|
|
4277
4418
|
readonly name: "NotSupported";
|
|
4278
|
-
readonly description: "HTTP 400: the caller's account is not hosted on the platform's identity PDS, or link tokens are not configured there.";
|
|
4419
|
+
readonly 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.";
|
|
4279
4420
|
}, {
|
|
4280
4421
|
readonly name: "RateLimitExceeded";
|
|
4281
4422
|
readonly description: "Too many writes from this DID (HTTP 429).";
|
|
@@ -5012,7 +5153,7 @@ export declare const schemaDict: {
|
|
|
5012
5153
|
readonly defs: {
|
|
5013
5154
|
readonly main: {
|
|
5014
5155
|
readonly type: "procedure";
|
|
5015
|
-
readonly 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.";
|
|
5156
|
+
readonly 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.";
|
|
5016
5157
|
readonly input: {
|
|
5017
5158
|
readonly encoding: "application/json";
|
|
5018
5159
|
readonly schema: {
|
|
@@ -5063,7 +5204,7 @@ export declare const schemaDict: {
|
|
|
5063
5204
|
readonly description: "HTTP 400: a field out of bounds, or a body that is not JSON; 415: not application/json; 422: not the input's shape.";
|
|
5064
5205
|
}, {
|
|
5065
5206
|
readonly name: "LinkNotUsable";
|
|
5066
|
-
readonly description: "HTTP 400: the link is unknown, revoked, expired or already used by another account (\"this link no longer works\").";
|
|
5207
|
+
readonly 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.";
|
|
5067
5208
|
}, {
|
|
5068
5209
|
readonly name: "OwnLink";
|
|
5069
5210
|
readonly description: "HTTP 400: the caller made this link.";
|
|
@@ -5181,7 +5322,7 @@ export declare const schemaDict: {
|
|
|
5181
5322
|
readonly description: "HTTP 403: `grant.actAs` is not an account the caller may write as.";
|
|
5182
5323
|
}, {
|
|
5183
5324
|
readonly name: "NotSupported";
|
|
5184
|
-
readonly description: "HTTP 400: the caller's account is not hosted on the platform's identity PDS, or link tokens are not configured there.";
|
|
5325
|
+
readonly 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.";
|
|
5185
5326
|
}, {
|
|
5186
5327
|
readonly name: "RateLimitExceeded";
|
|
5187
5328
|
readonly description: "Too many writes from this DID (HTTP 429).";
|
|
@@ -5317,7 +5458,7 @@ export declare const schemaDict: {
|
|
|
5317
5458
|
readonly description: "HTTP 400: a field out of bounds, or a body that is not JSON; 415: not application/json; 422: not the input's shape.";
|
|
5318
5459
|
}, {
|
|
5319
5460
|
readonly name: "NotSupported";
|
|
5320
|
-
readonly description: "HTTP 400: the caller's account is not hosted on the platform's identity PDS, or link tokens are not configured there.";
|
|
5461
|
+
readonly 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.";
|
|
5321
5462
|
}, {
|
|
5322
5463
|
readonly name: "RateLimitExceeded";
|
|
5323
5464
|
readonly description: "Too many writes from this DID (HTTP 429).";
|
|
@@ -14359,6 +14500,75 @@ export declare const schemas: ({
|
|
|
14359
14500
|
};
|
|
14360
14501
|
};
|
|
14361
14502
|
};
|
|
14503
|
+
} | {
|
|
14504
|
+
readonly lexicon: 1;
|
|
14505
|
+
readonly id: "pub.techne.draft.identity.attachLinkGrant";
|
|
14506
|
+
readonly defs: {
|
|
14507
|
+
readonly main: {
|
|
14508
|
+
readonly type: "procedure";
|
|
14509
|
+
readonly 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.";
|
|
14510
|
+
readonly input: {
|
|
14511
|
+
readonly encoding: "application/json";
|
|
14512
|
+
readonly schema: {
|
|
14513
|
+
readonly type: "object";
|
|
14514
|
+
readonly required: ["token", "grant"];
|
|
14515
|
+
readonly properties: {
|
|
14516
|
+
readonly token: {
|
|
14517
|
+
readonly type: "string";
|
|
14518
|
+
readonly minLength: 1;
|
|
14519
|
+
readonly maxLength: 512;
|
|
14520
|
+
readonly description: "The link's token, as the identity PDS answered it to the caller.";
|
|
14521
|
+
};
|
|
14522
|
+
readonly grant: {
|
|
14523
|
+
readonly type: "ref";
|
|
14524
|
+
readonly ref: "lex:pub.techne.draft.identity.defs#linkGrant";
|
|
14525
|
+
};
|
|
14526
|
+
};
|
|
14527
|
+
};
|
|
14528
|
+
};
|
|
14529
|
+
readonly output: {
|
|
14530
|
+
readonly encoding: "application/json";
|
|
14531
|
+
readonly schema: {
|
|
14532
|
+
readonly type: "object";
|
|
14533
|
+
readonly required: ["id"];
|
|
14534
|
+
readonly properties: {
|
|
14535
|
+
readonly id: {
|
|
14536
|
+
readonly type: "string";
|
|
14537
|
+
readonly description: "The link's id on the identity PDS.";
|
|
14538
|
+
};
|
|
14539
|
+
};
|
|
14540
|
+
};
|
|
14541
|
+
};
|
|
14542
|
+
readonly errors: [{
|
|
14543
|
+
readonly name: "InvalidRequest";
|
|
14544
|
+
readonly 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.";
|
|
14545
|
+
}, {
|
|
14546
|
+
readonly name: "LinkNotUsable";
|
|
14547
|
+
readonly description: "HTTP 400: the token names no live link of the caller's.";
|
|
14548
|
+
}, {
|
|
14549
|
+
readonly name: "ActAsPerson";
|
|
14550
|
+
readonly 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.";
|
|
14551
|
+
}, {
|
|
14552
|
+
readonly name: "AlreadyGranted";
|
|
14553
|
+
readonly description: "HTTP 409: the link already carries another grant.";
|
|
14554
|
+
}, {
|
|
14555
|
+
readonly name: "Forbidden";
|
|
14556
|
+
readonly description: "HTTP 403: `grant.actAs` is not an account the caller may write as.";
|
|
14557
|
+
}, {
|
|
14558
|
+
readonly name: "ProgramRefused";
|
|
14559
|
+
readonly description: "HTTP 403: an agent's or program's token may not attach a grant that writes an approval record.";
|
|
14560
|
+
}, {
|
|
14561
|
+
readonly name: "NotSupported";
|
|
14562
|
+
readonly description: "HTTP 400: the caller's account is not hosted on the platform's identity PDS, or link tokens are not configured there.";
|
|
14563
|
+
}, {
|
|
14564
|
+
readonly name: "RateLimitExceeded";
|
|
14565
|
+
readonly description: "HTTP 429: too many writes from this DID, or the identity PDS is limiting the platform's checks; try again later.";
|
|
14566
|
+
}, {
|
|
14567
|
+
readonly name: "UpstreamFailure";
|
|
14568
|
+
readonly description: "HTTP 502: the identity PDS could not be reached or answered with a failure; try again.";
|
|
14569
|
+
}];
|
|
14570
|
+
};
|
|
14571
|
+
};
|
|
14362
14572
|
} | {
|
|
14363
14573
|
readonly lexicon: 1;
|
|
14364
14574
|
readonly id: "pub.techne.draft.identity.attest";
|
|
@@ -14610,6 +14820,76 @@ export declare const schemas: ({
|
|
|
14610
14820
|
}];
|
|
14611
14821
|
};
|
|
14612
14822
|
};
|
|
14823
|
+
} | {
|
|
14824
|
+
readonly lexicon: 1;
|
|
14825
|
+
readonly id: "pub.techne.draft.identity.claimLinkGrant";
|
|
14826
|
+
readonly defs: {
|
|
14827
|
+
readonly main: {
|
|
14828
|
+
readonly type: "procedure";
|
|
14829
|
+
readonly 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.";
|
|
14830
|
+
readonly input: {
|
|
14831
|
+
readonly encoding: "application/json";
|
|
14832
|
+
readonly schema: {
|
|
14833
|
+
readonly type: "object";
|
|
14834
|
+
readonly required: ["id", "token"];
|
|
14835
|
+
readonly properties: {
|
|
14836
|
+
readonly id: {
|
|
14837
|
+
readonly type: "string";
|
|
14838
|
+
readonly minLength: 1;
|
|
14839
|
+
readonly maxLength: 512;
|
|
14840
|
+
readonly description: "The link's id, as redeemLinkToken answered it.";
|
|
14841
|
+
};
|
|
14842
|
+
readonly token: {
|
|
14843
|
+
readonly type: "string";
|
|
14844
|
+
readonly minLength: 1;
|
|
14845
|
+
readonly maxLength: 512;
|
|
14846
|
+
readonly description: "The link's token, as redeemed.";
|
|
14847
|
+
};
|
|
14848
|
+
};
|
|
14849
|
+
};
|
|
14850
|
+
};
|
|
14851
|
+
readonly output: {
|
|
14852
|
+
readonly encoding: "application/json";
|
|
14853
|
+
readonly schema: {
|
|
14854
|
+
readonly type: "object";
|
|
14855
|
+
readonly required: ["id", "written"];
|
|
14856
|
+
readonly properties: {
|
|
14857
|
+
readonly id: {
|
|
14858
|
+
readonly type: "string";
|
|
14859
|
+
readonly description: "The link's id.";
|
|
14860
|
+
};
|
|
14861
|
+
readonly written: {
|
|
14862
|
+
readonly type: "boolean";
|
|
14863
|
+
readonly description: "Whether the grant's record was written by this call.";
|
|
14864
|
+
};
|
|
14865
|
+
readonly reason: {
|
|
14866
|
+
readonly type: "string";
|
|
14867
|
+
readonly 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.";
|
|
14868
|
+
};
|
|
14869
|
+
};
|
|
14870
|
+
};
|
|
14871
|
+
};
|
|
14872
|
+
readonly errors: [{
|
|
14873
|
+
readonly name: "InvalidRequest";
|
|
14874
|
+
readonly 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.";
|
|
14875
|
+
}, {
|
|
14876
|
+
readonly name: "NotRedeemed";
|
|
14877
|
+
readonly description: "HTTP 409: no redemption of this link by the caller has been reported by the identity PDS (yet); redeem it there first.";
|
|
14878
|
+
}, {
|
|
14879
|
+
readonly name: "TryAgain";
|
|
14880
|
+
readonly description: "HTTP 503: the release could not finish now; claim it again.";
|
|
14881
|
+
}, {
|
|
14882
|
+
readonly name: "NotSupported";
|
|
14883
|
+
readonly description: "HTTP 400: the caller's account is not hosted on the platform's identity PDS, or link tokens are not configured there.";
|
|
14884
|
+
}, {
|
|
14885
|
+
readonly name: "RateLimitExceeded";
|
|
14886
|
+
readonly description: "HTTP 429: too many writes from this DID, or the identity PDS is limiting the platform's checks; try again later.";
|
|
14887
|
+
}, {
|
|
14888
|
+
readonly name: "UpstreamFailure";
|
|
14889
|
+
readonly description: "HTTP 502: the identity PDS could not be reached or answered with a failure; try again.";
|
|
14890
|
+
}];
|
|
14891
|
+
};
|
|
14892
|
+
};
|
|
14613
14893
|
} | {
|
|
14614
14894
|
readonly lexicon: 1;
|
|
14615
14895
|
readonly id: "pub.techne.draft.identity.createCollective";
|
|
@@ -14724,7 +15004,7 @@ export declare const schemas: ({
|
|
|
14724
15004
|
readonly description: "HTTP 403: `grant.actAs` is not an account the caller may write as.";
|
|
14725
15005
|
}, {
|
|
14726
15006
|
readonly name: "NotSupported";
|
|
14727
|
-
readonly description: "HTTP 400: the caller's account is not hosted on the platform's identity PDS, or link tokens are not configured there.";
|
|
15007
|
+
readonly 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.";
|
|
14728
15008
|
}, {
|
|
14729
15009
|
readonly name: "RateLimitExceeded";
|
|
14730
15010
|
readonly description: "Too many writes from this DID (HTTP 429).";
|
|
@@ -15415,7 +15695,7 @@ export declare const schemas: ({
|
|
|
15415
15695
|
readonly description: "HTTP 400: a field out of bounds, or a body that is not JSON; 415: not application/json; 422: not the input's shape.";
|
|
15416
15696
|
}, {
|
|
15417
15697
|
readonly name: "NotSupported";
|
|
15418
|
-
readonly description: "HTTP 400: the caller's account is not hosted on the platform's identity PDS, or link tokens are not configured there.";
|
|
15698
|
+
readonly 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.";
|
|
15419
15699
|
}, {
|
|
15420
15700
|
readonly name: "RateLimitExceeded";
|
|
15421
15701
|
readonly description: "Too many writes from this DID (HTTP 429).";
|
|
@@ -15474,7 +15754,7 @@ export declare const schemas: ({
|
|
|
15474
15754
|
readonly description: "HTTP 400: a field out of bounds, or a body that is not JSON; 415: not application/json; 422: not the input's shape.";
|
|
15475
15755
|
}, {
|
|
15476
15756
|
readonly name: "NotSupported";
|
|
15477
|
-
readonly description: "HTTP 400: the caller's account is not hosted on the platform's identity PDS, or link tokens are not configured there.";
|
|
15757
|
+
readonly 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.";
|
|
15478
15758
|
}, {
|
|
15479
15759
|
readonly name: "RateLimitExceeded";
|
|
15480
15760
|
readonly description: "Too many writes from this DID (HTTP 429).";
|
|
@@ -16206,7 +16486,7 @@ export declare const schemas: ({
|
|
|
16206
16486
|
readonly defs: {
|
|
16207
16487
|
readonly main: {
|
|
16208
16488
|
readonly type: "procedure";
|
|
16209
|
-
readonly 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.";
|
|
16489
|
+
readonly 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.";
|
|
16210
16490
|
readonly input: {
|
|
16211
16491
|
readonly encoding: "application/json";
|
|
16212
16492
|
readonly schema: {
|
|
@@ -16257,7 +16537,7 @@ export declare const schemas: ({
|
|
|
16257
16537
|
readonly description: "HTTP 400: a field out of bounds, or a body that is not JSON; 415: not application/json; 422: not the input's shape.";
|
|
16258
16538
|
}, {
|
|
16259
16539
|
readonly name: "LinkNotUsable";
|
|
16260
|
-
readonly description: "HTTP 400: the link is unknown, revoked, expired or already used by another account (\"this link no longer works\").";
|
|
16540
|
+
readonly 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.";
|
|
16261
16541
|
}, {
|
|
16262
16542
|
readonly name: "OwnLink";
|
|
16263
16543
|
readonly description: "HTTP 400: the caller made this link.";
|
|
@@ -16373,7 +16653,7 @@ export declare const schemas: ({
|
|
|
16373
16653
|
readonly description: "HTTP 403: `grant.actAs` is not an account the caller may write as.";
|
|
16374
16654
|
}, {
|
|
16375
16655
|
readonly name: "NotSupported";
|
|
16376
|
-
readonly description: "HTTP 400: the caller's account is not hosted on the platform's identity PDS, or link tokens are not configured there.";
|
|
16656
|
+
readonly 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.";
|
|
16377
16657
|
}, {
|
|
16378
16658
|
readonly name: "RateLimitExceeded";
|
|
16379
16659
|
readonly description: "Too many writes from this DID (HTTP 429).";
|
|
@@ -16507,7 +16787,7 @@ export declare const schemas: ({
|
|
|
16507
16787
|
readonly description: "HTTP 400: a field out of bounds, or a body that is not JSON; 415: not application/json; 422: not the input's shape.";
|
|
16508
16788
|
}, {
|
|
16509
16789
|
readonly name: "NotSupported";
|
|
16510
|
-
readonly description: "HTTP 400: the caller's account is not hosted on the platform's identity PDS, or link tokens are not configured there.";
|
|
16790
|
+
readonly 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.";
|
|
16511
16791
|
}, {
|
|
16512
16792
|
readonly name: "RateLimitExceeded";
|
|
16513
16793
|
readonly description: "Too many writes from this DID (HTTP 429).";
|
|
@@ -22445,10 +22725,12 @@ export declare const ids: {
|
|
|
22445
22725
|
readonly PubTechneDraftGeo: "pub.techne.draft.geo";
|
|
22446
22726
|
readonly PubTechneDraftHeldAt: "pub.techne.draft.heldAt";
|
|
22447
22727
|
readonly PubTechneDraftIdentityAccountsForPhones: "pub.techne.draft.identity.accountsForPhones";
|
|
22728
|
+
readonly PubTechneDraftIdentityAttachLinkGrant: "pub.techne.draft.identity.attachLinkGrant";
|
|
22448
22729
|
readonly PubTechneDraftIdentityAttest: "pub.techne.draft.identity.attest";
|
|
22449
22730
|
readonly PubTechneDraftIdentityBeginAddMethod: "pub.techne.draft.identity.beginAddMethod";
|
|
22450
22731
|
readonly PubTechneDraftIdentityCancelPendingChange: "pub.techne.draft.identity.cancelPendingChange";
|
|
22451
22732
|
readonly PubTechneDraftIdentityCheckLinkToken: "pub.techne.draft.identity.checkLinkToken";
|
|
22733
|
+
readonly PubTechneDraftIdentityClaimLinkGrant: "pub.techne.draft.identity.claimLinkGrant";
|
|
22452
22734
|
readonly PubTechneDraftIdentityCreateCollective: "pub.techne.draft.identity.createCollective";
|
|
22453
22735
|
readonly PubTechneDraftIdentityCreateLinkToken: "pub.techne.draft.identity.createLinkToken";
|
|
22454
22736
|
readonly PubTechneDraftIdentityDefs: "pub.techne.draft.identity.defs";
|