techne-sdk 0.8.0 → 0.10.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 +25 -0
- package/README.md +29 -0
- package/dist/auth/placement.gen.d.ts +1 -1
- package/dist/auth/placement.gen.js +1 -0
- package/dist/catalog/catalog.gen.js +286 -12
- package/dist/generated/index.d.ts +34 -0
- package/dist/generated/index.js +54 -0
- package/dist/generated/lexicons.d.ts +372 -14
- package/dist/generated/lexicons.js +206 -7
- package/dist/generated/nsid.d.ts +3 -0
- package/dist/generated/nsid.js +3 -0
- package/dist/generated/nsid.json +3 -0
- package/dist/generated/records.d.ts +8 -6
- 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/generated/types/pub/techne/draft/tagFeedback.d.ts +18 -0
- package/dist/generated/types/pub/techne/draft/tagFeedback.js +12 -0
- package/dist/wasm/techne-wasm.gen.js +1 -1
- package/dist/wasm/techne-wasm2js.gen.js +21195 -21195
- package/package.json +1 -1
|
@@ -3326,6 +3326,86 @@ export const schemaDict = {
|
|
|
3326
3326
|
},
|
|
3327
3327
|
},
|
|
3328
3328
|
},
|
|
3329
|
+
PubTechneDraftIdentityAttachLinkGrant: {
|
|
3330
|
+
lexicon: 1,
|
|
3331
|
+
id: 'pub.techne.draft.identity.attachLinkGrant',
|
|
3332
|
+
defs: {
|
|
3333
|
+
main: {
|
|
3334
|
+
type: 'procedure',
|
|
3335
|
+
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.",
|
|
3336
|
+
input: {
|
|
3337
|
+
encoding: 'application/json',
|
|
3338
|
+
schema: {
|
|
3339
|
+
type: 'object',
|
|
3340
|
+
required: ['token', 'grant'],
|
|
3341
|
+
properties: {
|
|
3342
|
+
token: {
|
|
3343
|
+
type: 'string',
|
|
3344
|
+
minLength: 1,
|
|
3345
|
+
maxLength: 512,
|
|
3346
|
+
description: "The link's token, as the identity PDS answered it to the caller.",
|
|
3347
|
+
},
|
|
3348
|
+
grant: {
|
|
3349
|
+
type: 'ref',
|
|
3350
|
+
ref: 'lex:pub.techne.draft.identity.defs#linkGrant',
|
|
3351
|
+
},
|
|
3352
|
+
},
|
|
3353
|
+
},
|
|
3354
|
+
},
|
|
3355
|
+
output: {
|
|
3356
|
+
encoding: 'application/json',
|
|
3357
|
+
schema: {
|
|
3358
|
+
type: 'object',
|
|
3359
|
+
required: ['id'],
|
|
3360
|
+
properties: {
|
|
3361
|
+
id: {
|
|
3362
|
+
type: 'string',
|
|
3363
|
+
description: "The link's id on the identity PDS.",
|
|
3364
|
+
},
|
|
3365
|
+
},
|
|
3366
|
+
},
|
|
3367
|
+
},
|
|
3368
|
+
errors: [
|
|
3369
|
+
{
|
|
3370
|
+
name: 'InvalidRequest',
|
|
3371
|
+
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.",
|
|
3372
|
+
},
|
|
3373
|
+
{
|
|
3374
|
+
name: 'LinkNotUsable',
|
|
3375
|
+
description: "HTTP 400: the token names no live link of the caller's.",
|
|
3376
|
+
},
|
|
3377
|
+
{
|
|
3378
|
+
name: 'ActAsPerson',
|
|
3379
|
+
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.",
|
|
3380
|
+
},
|
|
3381
|
+
{
|
|
3382
|
+
name: 'AlreadyGranted',
|
|
3383
|
+
description: 'HTTP 409: the link already carries another grant.',
|
|
3384
|
+
},
|
|
3385
|
+
{
|
|
3386
|
+
name: 'Forbidden',
|
|
3387
|
+
description: 'HTTP 403: `grant.actAs` is not an account the caller may write as.',
|
|
3388
|
+
},
|
|
3389
|
+
{
|
|
3390
|
+
name: 'ProgramRefused',
|
|
3391
|
+
description: "HTTP 403: an agent's or program's token may not attach a grant that writes an approval record.",
|
|
3392
|
+
},
|
|
3393
|
+
{
|
|
3394
|
+
name: 'NotSupported',
|
|
3395
|
+
description: "HTTP 400: the caller's account is not hosted on the platform's identity PDS, or link tokens are not configured there.",
|
|
3396
|
+
},
|
|
3397
|
+
{
|
|
3398
|
+
name: 'RateLimitExceeded',
|
|
3399
|
+
description: "HTTP 429: too many writes from this DID, or the identity PDS is limiting the platform's checks; try again later.",
|
|
3400
|
+
},
|
|
3401
|
+
{
|
|
3402
|
+
name: 'UpstreamFailure',
|
|
3403
|
+
description: 'HTTP 502: the identity PDS could not be reached or answered with a failure; try again.',
|
|
3404
|
+
},
|
|
3405
|
+
],
|
|
3406
|
+
},
|
|
3407
|
+
},
|
|
3408
|
+
},
|
|
3329
3409
|
PubTechneDraftIdentityAttest: {
|
|
3330
3410
|
lexicon: 1,
|
|
3331
3411
|
id: 'pub.techne.draft.identity.attest',
|
|
@@ -3603,6 +3683,84 @@ export const schemaDict = {
|
|
|
3603
3683
|
},
|
|
3604
3684
|
},
|
|
3605
3685
|
},
|
|
3686
|
+
PubTechneDraftIdentityClaimLinkGrant: {
|
|
3687
|
+
lexicon: 1,
|
|
3688
|
+
id: 'pub.techne.draft.identity.claimLinkGrant',
|
|
3689
|
+
defs: {
|
|
3690
|
+
main: {
|
|
3691
|
+
type: 'procedure',
|
|
3692
|
+
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.",
|
|
3693
|
+
input: {
|
|
3694
|
+
encoding: 'application/json',
|
|
3695
|
+
schema: {
|
|
3696
|
+
type: 'object',
|
|
3697
|
+
required: ['id', 'token'],
|
|
3698
|
+
properties: {
|
|
3699
|
+
id: {
|
|
3700
|
+
type: 'string',
|
|
3701
|
+
minLength: 1,
|
|
3702
|
+
maxLength: 512,
|
|
3703
|
+
description: "The link's id, as redeemLinkToken answered it.",
|
|
3704
|
+
},
|
|
3705
|
+
token: {
|
|
3706
|
+
type: 'string',
|
|
3707
|
+
minLength: 1,
|
|
3708
|
+
maxLength: 512,
|
|
3709
|
+
description: "The link's token, as redeemed.",
|
|
3710
|
+
},
|
|
3711
|
+
},
|
|
3712
|
+
},
|
|
3713
|
+
},
|
|
3714
|
+
output: {
|
|
3715
|
+
encoding: 'application/json',
|
|
3716
|
+
schema: {
|
|
3717
|
+
type: 'object',
|
|
3718
|
+
required: ['id', 'written'],
|
|
3719
|
+
properties: {
|
|
3720
|
+
id: {
|
|
3721
|
+
type: 'string',
|
|
3722
|
+
description: "The link's id.",
|
|
3723
|
+
},
|
|
3724
|
+
written: {
|
|
3725
|
+
type: 'boolean',
|
|
3726
|
+
description: "Whether the grant's record was written by this call.",
|
|
3727
|
+
},
|
|
3728
|
+
reason: {
|
|
3729
|
+
type: 'string',
|
|
3730
|
+
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.',
|
|
3731
|
+
},
|
|
3732
|
+
},
|
|
3733
|
+
},
|
|
3734
|
+
},
|
|
3735
|
+
errors: [
|
|
3736
|
+
{
|
|
3737
|
+
name: 'InvalidRequest',
|
|
3738
|
+
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.",
|
|
3739
|
+
},
|
|
3740
|
+
{
|
|
3741
|
+
name: 'NotRedeemed',
|
|
3742
|
+
description: 'HTTP 409: no redemption of this link by the caller has been reported by the identity PDS (yet); redeem it there first.',
|
|
3743
|
+
},
|
|
3744
|
+
{
|
|
3745
|
+
name: 'TryAgain',
|
|
3746
|
+
description: 'HTTP 503: the release could not finish now; claim it again.',
|
|
3747
|
+
},
|
|
3748
|
+
{
|
|
3749
|
+
name: 'NotSupported',
|
|
3750
|
+
description: "HTTP 400: the caller's account is not hosted on the platform's identity PDS, or link tokens are not configured there.",
|
|
3751
|
+
},
|
|
3752
|
+
{
|
|
3753
|
+
name: 'RateLimitExceeded',
|
|
3754
|
+
description: "HTTP 429: too many writes from this DID, or the identity PDS is limiting the platform's checks; try again later.",
|
|
3755
|
+
},
|
|
3756
|
+
{
|
|
3757
|
+
name: 'UpstreamFailure',
|
|
3758
|
+
description: 'HTTP 502: the identity PDS could not be reached or answered with a failure; try again.',
|
|
3759
|
+
},
|
|
3760
|
+
],
|
|
3761
|
+
},
|
|
3762
|
+
},
|
|
3763
|
+
},
|
|
3606
3764
|
PubTechneDraftIdentityCreateCollective: {
|
|
3607
3765
|
lexicon: 1,
|
|
3608
3766
|
id: 'pub.techne.draft.identity.createCollective',
|
|
@@ -3724,7 +3882,7 @@ export const schemaDict = {
|
|
|
3724
3882
|
},
|
|
3725
3883
|
{
|
|
3726
3884
|
name: 'NotSupported',
|
|
3727
|
-
description: "HTTP 400: the caller's account is not hosted on the platform's identity PDS, or link tokens are not configured there.",
|
|
3885
|
+
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.",
|
|
3728
3886
|
},
|
|
3729
3887
|
{
|
|
3730
3888
|
name: 'RateLimitExceeded',
|
|
@@ -4480,7 +4638,7 @@ export const schemaDict = {
|
|
|
4480
4638
|
},
|
|
4481
4639
|
{
|
|
4482
4640
|
name: 'NotSupported',
|
|
4483
|
-
description: "HTTP 400: the caller's account is not hosted on the platform's identity PDS, or link tokens are not configured there.",
|
|
4641
|
+
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.",
|
|
4484
4642
|
},
|
|
4485
4643
|
{
|
|
4486
4644
|
name: 'RateLimitExceeded',
|
|
@@ -4545,7 +4703,7 @@ export const schemaDict = {
|
|
|
4545
4703
|
},
|
|
4546
4704
|
{
|
|
4547
4705
|
name: 'NotSupported',
|
|
4548
|
-
description: "HTTP 400: the caller's account is not hosted on the platform's identity PDS, or link tokens are not configured there.",
|
|
4706
|
+
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.",
|
|
4549
4707
|
},
|
|
4550
4708
|
{
|
|
4551
4709
|
name: 'RateLimitExceeded',
|
|
@@ -5397,7 +5555,7 @@ export const schemaDict = {
|
|
|
5397
5555
|
defs: {
|
|
5398
5556
|
main: {
|
|
5399
5557
|
type: 'procedure',
|
|
5400
|
-
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.",
|
|
5558
|
+
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.",
|
|
5401
5559
|
input: {
|
|
5402
5560
|
encoding: 'application/json',
|
|
5403
5561
|
schema: {
|
|
@@ -5458,7 +5616,7 @@ export const schemaDict = {
|
|
|
5458
5616
|
},
|
|
5459
5617
|
{
|
|
5460
5618
|
name: 'LinkNotUsable',
|
|
5461
|
-
description: 'HTTP 400: the link is unknown, revoked, expired or already used by another account ("this link no longer works").',
|
|
5619
|
+
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.',
|
|
5462
5620
|
},
|
|
5463
5621
|
{
|
|
5464
5622
|
name: 'OwnLink',
|
|
@@ -5588,7 +5746,7 @@ export const schemaDict = {
|
|
|
5588
5746
|
},
|
|
5589
5747
|
{
|
|
5590
5748
|
name: 'NotSupported',
|
|
5591
|
-
description: "HTTP 400: the caller's account is not hosted on the platform's identity PDS, or link tokens are not configured there.",
|
|
5749
|
+
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.",
|
|
5592
5750
|
},
|
|
5593
5751
|
{
|
|
5594
5752
|
name: 'RateLimitExceeded',
|
|
@@ -5733,7 +5891,7 @@ export const schemaDict = {
|
|
|
5733
5891
|
},
|
|
5734
5892
|
{
|
|
5735
5893
|
name: 'NotSupported',
|
|
5736
|
-
description: "HTTP 400: the caller's account is not hosted on the platform's identity PDS, or link tokens are not configured there.",
|
|
5894
|
+
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.",
|
|
5737
5895
|
},
|
|
5738
5896
|
{
|
|
5739
5897
|
name: 'RateLimitExceeded',
|
|
@@ -10517,6 +10675,44 @@ export const schemaDict = {
|
|
|
10517
10675
|
},
|
|
10518
10676
|
},
|
|
10519
10677
|
},
|
|
10678
|
+
PubTechneDraftTagFeedback: {
|
|
10679
|
+
lexicon: 1,
|
|
10680
|
+
id: 'pub.techne.draft.tagFeedback',
|
|
10681
|
+
description: "A person's feedback on one tag they saw on a record: that the record has that tag's quality (it fits) or does not (a Kids tag on a bar show does not fit). It records what the person saw, the tag, not the questions behind it: the commons maps a tag to its bank questions at read time, by the app's chip groups (the same mapping that lights the tag), so the feedback still applies after the record's assessment is rewritten or a chip's questions change. Tags only: there is no free text (prose about an event goes to the app's moderation report). Effect: the commons features rule asks the tag's questions about the record again, telling its classifier how many people say the tag does or does not fit; the classifier still answers from the record's own listing: feedback is context for it, not a vote. Feedback from the record's own publisher, or from the publisher of any source record merged into it, does not count. It is about the tag, never a mark against the record's author, host or venue. Written by the person, in their own repo. PUBLIC.",
|
|
10682
|
+
defs: {
|
|
10683
|
+
main: {
|
|
10684
|
+
type: 'record',
|
|
10685
|
+
key: 'tid',
|
|
10686
|
+
description: 'One live feedback per person per record and tag: a newer one replaces an older one (whatever its verdict), and a person who changes their mind deletes it.',
|
|
10687
|
+
record: {
|
|
10688
|
+
type: 'object',
|
|
10689
|
+
required: ['subject', 'tag', 'verdict', 'createdAt'],
|
|
10690
|
+
properties: {
|
|
10691
|
+
subject: {
|
|
10692
|
+
type: 'ref',
|
|
10693
|
+
ref: 'lex:com.atproto.repo.strongRef',
|
|
10694
|
+
description: 'The record the tag is on: the curated commons event (the subject of its assessment).',
|
|
10695
|
+
},
|
|
10696
|
+
tag: {
|
|
10697
|
+
type: 'string',
|
|
10698
|
+
maxLength: 64,
|
|
10699
|
+
description: "The tag as the app names it: a chip id in the app's chip groups, e.g. allAges or kids. Not a bank question: the chip groups map the tag to its questions.",
|
|
10700
|
+
},
|
|
10701
|
+
verdict: {
|
|
10702
|
+
type: 'string',
|
|
10703
|
+
maxLength: 64,
|
|
10704
|
+
knownValues: ['fits', 'doesntFit'],
|
|
10705
|
+
description: "What the person says about the record, not about the display: `fits`: the record has this tag's quality; `doesntFit`: it does not. Either can be said whether or not the tag is shown; feedback that agrees with what is shown asks nothing.",
|
|
10706
|
+
},
|
|
10707
|
+
createdAt: {
|
|
10708
|
+
type: 'string',
|
|
10709
|
+
format: 'datetime',
|
|
10710
|
+
},
|
|
10711
|
+
},
|
|
10712
|
+
},
|
|
10713
|
+
},
|
|
10714
|
+
},
|
|
10715
|
+
},
|
|
10520
10716
|
PubTechneDraftVerdict: {
|
|
10521
10717
|
lexicon: 1,
|
|
10522
10718
|
id: 'pub.techne.draft.verdict',
|
|
@@ -12041,10 +12237,12 @@ export const ids = {
|
|
|
12041
12237
|
PubTechneDraftGeo: 'pub.techne.draft.geo',
|
|
12042
12238
|
PubTechneDraftHeldAt: 'pub.techne.draft.heldAt',
|
|
12043
12239
|
PubTechneDraftIdentityAccountsForPhones: 'pub.techne.draft.identity.accountsForPhones',
|
|
12240
|
+
PubTechneDraftIdentityAttachLinkGrant: 'pub.techne.draft.identity.attachLinkGrant',
|
|
12044
12241
|
PubTechneDraftIdentityAttest: 'pub.techne.draft.identity.attest',
|
|
12045
12242
|
PubTechneDraftIdentityBeginAddMethod: 'pub.techne.draft.identity.beginAddMethod',
|
|
12046
12243
|
PubTechneDraftIdentityCancelPendingChange: 'pub.techne.draft.identity.cancelPendingChange',
|
|
12047
12244
|
PubTechneDraftIdentityCheckLinkToken: 'pub.techne.draft.identity.checkLinkToken',
|
|
12245
|
+
PubTechneDraftIdentityClaimLinkGrant: 'pub.techne.draft.identity.claimLinkGrant',
|
|
12048
12246
|
PubTechneDraftIdentityCreateCollective: 'pub.techne.draft.identity.createCollective',
|
|
12049
12247
|
PubTechneDraftIdentityCreateLinkToken: 'pub.techne.draft.identity.createLinkToken',
|
|
12050
12248
|
PubTechneDraftIdentityDefs: 'pub.techne.draft.identity.defs',
|
|
@@ -12125,6 +12323,7 @@ export const ids = {
|
|
|
12125
12323
|
PubTechneDraftSubjectPrefs: 'pub.techne.draft.subjectPrefs',
|
|
12126
12324
|
PubTechneDraftSummary: 'pub.techne.draft.summary',
|
|
12127
12325
|
PubTechneDraftSyncIndexRecord: 'pub.techne.draft.sync.indexRecord',
|
|
12326
|
+
PubTechneDraftTagFeedback: 'pub.techne.draft.tagFeedback',
|
|
12128
12327
|
PubTechneDraftVerdict: 'pub.techne.draft.verdict',
|
|
12129
12328
|
PubTechneDraftVerification: 'pub.techne.draft.verification',
|
|
12130
12329
|
PubTechneDraftWeeklyCheckIn: 'pub.techne.draft.weeklyCheckIn',
|
package/dist/generated/nsid.d.ts
CHANGED
|
@@ -90,10 +90,12 @@ export declare const NSID: {
|
|
|
90
90
|
readonly HYPERCERTS_AUTHORITY: "org.hypercerts";
|
|
91
91
|
readonly IDENTITY_ACCOUNTS_FOR_PHONES: "pub.techne.draft.identity.accountsForPhones";
|
|
92
92
|
readonly IDENTITY_ACCOUNTS_FOR_PHONES_ACCOUNT: "pub.techne.draft.identity.accountsForPhones#account";
|
|
93
|
+
readonly IDENTITY_ATTACH_LINK_GRANT: "pub.techne.draft.identity.attachLinkGrant";
|
|
93
94
|
readonly IDENTITY_ATTEST: "pub.techne.draft.identity.attest";
|
|
94
95
|
readonly IDENTITY_BEGIN_ADD_METHOD: "pub.techne.draft.identity.beginAddMethod";
|
|
95
96
|
readonly IDENTITY_CANCEL_PENDING_CHANGE: "pub.techne.draft.identity.cancelPendingChange";
|
|
96
97
|
readonly IDENTITY_CHECK_LINK_TOKEN: "pub.techne.draft.identity.checkLinkToken";
|
|
98
|
+
readonly IDENTITY_CLAIM_LINK_GRANT: "pub.techne.draft.identity.claimLinkGrant";
|
|
97
99
|
readonly IDENTITY_CREATE_COLLECTIVE: "pub.techne.draft.identity.createCollective";
|
|
98
100
|
readonly IDENTITY_CREATE_LINK_TOKEN: "pub.techne.draft.identity.createLinkToken";
|
|
99
101
|
readonly IDENTITY_DEFS: "pub.techne.draft.identity.defs";
|
|
@@ -292,6 +294,7 @@ export declare const NSID: {
|
|
|
292
294
|
readonly SUBJECT_PREFS: "pub.techne.draft.subjectPrefs";
|
|
293
295
|
readonly SUMMARY: "pub.techne.draft.summary";
|
|
294
296
|
readonly SYNC_INDEX_RECORD: "pub.techne.draft.sync.indexRecord";
|
|
297
|
+
readonly TAG_FEEDBACK: "pub.techne.draft.tagFeedback";
|
|
295
298
|
readonly VERDICT: "pub.techne.draft.verdict";
|
|
296
299
|
readonly VERIFICATION: "pub.techne.draft.verification";
|
|
297
300
|
readonly WEEKLY_CHECK_IN: "pub.techne.draft.weeklyCheckIn";
|
package/dist/generated/nsid.js
CHANGED
|
@@ -94,10 +94,12 @@ export const NSID = {
|
|
|
94
94
|
HYPERCERTS_AUTHORITY: 'org.hypercerts',
|
|
95
95
|
IDENTITY_ACCOUNTS_FOR_PHONES: 'pub.techne.draft.identity.accountsForPhones',
|
|
96
96
|
IDENTITY_ACCOUNTS_FOR_PHONES_ACCOUNT: 'pub.techne.draft.identity.accountsForPhones#account',
|
|
97
|
+
IDENTITY_ATTACH_LINK_GRANT: 'pub.techne.draft.identity.attachLinkGrant',
|
|
97
98
|
IDENTITY_ATTEST: 'pub.techne.draft.identity.attest',
|
|
98
99
|
IDENTITY_BEGIN_ADD_METHOD: 'pub.techne.draft.identity.beginAddMethod',
|
|
99
100
|
IDENTITY_CANCEL_PENDING_CHANGE: 'pub.techne.draft.identity.cancelPendingChange',
|
|
100
101
|
IDENTITY_CHECK_LINK_TOKEN: 'pub.techne.draft.identity.checkLinkToken',
|
|
102
|
+
IDENTITY_CLAIM_LINK_GRANT: 'pub.techne.draft.identity.claimLinkGrant',
|
|
101
103
|
IDENTITY_CREATE_COLLECTIVE: 'pub.techne.draft.identity.createCollective',
|
|
102
104
|
IDENTITY_CREATE_LINK_TOKEN: 'pub.techne.draft.identity.createLinkToken',
|
|
103
105
|
IDENTITY_DEFS: 'pub.techne.draft.identity.defs',
|
|
@@ -296,6 +298,7 @@ export const NSID = {
|
|
|
296
298
|
SUBJECT_PREFS: 'pub.techne.draft.subjectPrefs',
|
|
297
299
|
SUMMARY: 'pub.techne.draft.summary',
|
|
298
300
|
SYNC_INDEX_RECORD: 'pub.techne.draft.sync.indexRecord',
|
|
301
|
+
TAG_FEEDBACK: 'pub.techne.draft.tagFeedback',
|
|
299
302
|
VERDICT: 'pub.techne.draft.verdict',
|
|
300
303
|
VERIFICATION: 'pub.techne.draft.verification',
|
|
301
304
|
WEEKLY_CHECK_IN: 'pub.techne.draft.weeklyCheckIn',
|
package/dist/generated/nsid.json
CHANGED
|
@@ -90,10 +90,12 @@
|
|
|
90
90
|
"HYPERCERTS_AUTHORITY": "org.hypercerts",
|
|
91
91
|
"IDENTITY_ACCOUNTS_FOR_PHONES": "pub.techne.draft.identity.accountsForPhones",
|
|
92
92
|
"IDENTITY_ACCOUNTS_FOR_PHONES_ACCOUNT": "pub.techne.draft.identity.accountsForPhones#account",
|
|
93
|
+
"IDENTITY_ATTACH_LINK_GRANT": "pub.techne.draft.identity.attachLinkGrant",
|
|
93
94
|
"IDENTITY_ATTEST": "pub.techne.draft.identity.attest",
|
|
94
95
|
"IDENTITY_BEGIN_ADD_METHOD": "pub.techne.draft.identity.beginAddMethod",
|
|
95
96
|
"IDENTITY_CANCEL_PENDING_CHANGE": "pub.techne.draft.identity.cancelPendingChange",
|
|
96
97
|
"IDENTITY_CHECK_LINK_TOKEN": "pub.techne.draft.identity.checkLinkToken",
|
|
98
|
+
"IDENTITY_CLAIM_LINK_GRANT": "pub.techne.draft.identity.claimLinkGrant",
|
|
97
99
|
"IDENTITY_CREATE_COLLECTIVE": "pub.techne.draft.identity.createCollective",
|
|
98
100
|
"IDENTITY_CREATE_LINK_TOKEN": "pub.techne.draft.identity.createLinkToken",
|
|
99
101
|
"IDENTITY_DEFS": "pub.techne.draft.identity.defs",
|
|
@@ -292,6 +294,7 @@
|
|
|
292
294
|
"SUBJECT_PREFS": "pub.techne.draft.subjectPrefs",
|
|
293
295
|
"SUMMARY": "pub.techne.draft.summary",
|
|
294
296
|
"SYNC_INDEX_RECORD": "pub.techne.draft.sync.indexRecord",
|
|
297
|
+
"TAG_FEEDBACK": "pub.techne.draft.tagFeedback",
|
|
295
298
|
"VERDICT": "pub.techne.draft.verdict",
|
|
296
299
|
"VERIFICATION": "pub.techne.draft.verification",
|
|
297
300
|
"WEEKLY_CHECK_IN": "pub.techne.draft.weeklyCheckIn"
|
|
@@ -71,9 +71,10 @@ import type * as R69 from './types/pub/techne/draft/sourceRef.js';
|
|
|
71
71
|
import type * as R70 from './types/pub/techne/draft/statement.js';
|
|
72
72
|
import type * as R71 from './types/pub/techne/draft/subjectPrefs.js';
|
|
73
73
|
import type * as R72 from './types/pub/techne/draft/summary.js';
|
|
74
|
-
import type * as R73 from './types/pub/techne/draft/
|
|
75
|
-
import type * as R74 from './types/pub/techne/draft/
|
|
76
|
-
import type * as R75 from './types/pub/techne/draft/
|
|
74
|
+
import type * as R73 from './types/pub/techne/draft/tagFeedback.js';
|
|
75
|
+
import type * as R74 from './types/pub/techne/draft/verdict.js';
|
|
76
|
+
import type * as R75 from './types/pub/techne/draft/verification.js';
|
|
77
|
+
import type * as R76 from './types/pub/techne/draft/weeklyCheckIn.js';
|
|
77
78
|
/** Every record type the lexicons define, by collection. */
|
|
78
79
|
export interface Records {
|
|
79
80
|
'community.lexicon.calendar.event': R0.Record;
|
|
@@ -149,9 +150,10 @@ export interface Records {
|
|
|
149
150
|
'pub.techne.draft.statement': R70.Record;
|
|
150
151
|
'pub.techne.draft.subjectPrefs': R71.Record;
|
|
151
152
|
'pub.techne.draft.summary': R72.Record;
|
|
152
|
-
'pub.techne.draft.
|
|
153
|
-
'pub.techne.draft.
|
|
154
|
-
'pub.techne.draft.
|
|
153
|
+
'pub.techne.draft.tagFeedback': R73.Record;
|
|
154
|
+
'pub.techne.draft.verdict': R74.Record;
|
|
155
|
+
'pub.techne.draft.verification': R75.Record;
|
|
156
|
+
'pub.techne.draft.weeklyCheckIn': R76.Record;
|
|
155
157
|
}
|
|
156
158
|
/** Any one record the lexicons define (its `$type` says which). */
|
|
157
159
|
export type AnyRecord = Records[keyof Records];
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import { HeadersMap, XRPCError } from '@atproto/xrpc';
|
|
5
|
+
import type * as PubTechneDraftIdentityDefs from './defs.js';
|
|
6
|
+
export type QueryParams = {};
|
|
7
|
+
export interface InputSchema {
|
|
8
|
+
/** The link's token, as the identity PDS answered it to the caller. */
|
|
9
|
+
token: string;
|
|
10
|
+
grant: PubTechneDraftIdentityDefs.LinkGrant;
|
|
11
|
+
}
|
|
12
|
+
export interface OutputSchema {
|
|
13
|
+
/** The link's id on the identity PDS. */
|
|
14
|
+
id: string;
|
|
15
|
+
}
|
|
16
|
+
export interface CallOptions {
|
|
17
|
+
signal?: AbortSignal;
|
|
18
|
+
headers?: HeadersMap;
|
|
19
|
+
qp?: QueryParams;
|
|
20
|
+
encoding?: 'application/json';
|
|
21
|
+
}
|
|
22
|
+
export interface Response {
|
|
23
|
+
success: boolean;
|
|
24
|
+
headers: HeadersMap;
|
|
25
|
+
data: OutputSchema;
|
|
26
|
+
}
|
|
27
|
+
export declare class InvalidRequestError extends XRPCError {
|
|
28
|
+
constructor(src: XRPCError);
|
|
29
|
+
}
|
|
30
|
+
export declare class LinkNotUsableError extends XRPCError {
|
|
31
|
+
constructor(src: XRPCError);
|
|
32
|
+
}
|
|
33
|
+
export declare class ActAsPersonError extends XRPCError {
|
|
34
|
+
constructor(src: XRPCError);
|
|
35
|
+
}
|
|
36
|
+
export declare class AlreadyGrantedError extends XRPCError {
|
|
37
|
+
constructor(src: XRPCError);
|
|
38
|
+
}
|
|
39
|
+
export declare class ForbiddenError extends XRPCError {
|
|
40
|
+
constructor(src: XRPCError);
|
|
41
|
+
}
|
|
42
|
+
export declare class ProgramRefusedError extends XRPCError {
|
|
43
|
+
constructor(src: XRPCError);
|
|
44
|
+
}
|
|
45
|
+
export declare class NotSupportedError extends XRPCError {
|
|
46
|
+
constructor(src: XRPCError);
|
|
47
|
+
}
|
|
48
|
+
export declare class RateLimitExceededError extends XRPCError {
|
|
49
|
+
constructor(src: XRPCError);
|
|
50
|
+
}
|
|
51
|
+
export declare class UpstreamFailureError extends XRPCError {
|
|
52
|
+
constructor(src: XRPCError);
|
|
53
|
+
}
|
|
54
|
+
export declare function toKnownErr(e: any): any;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import { XRPCError } from '@atproto/xrpc';
|
|
5
|
+
import { validate as _validate } from '../../../../../lexicons.js';
|
|
6
|
+
import { is$typed as _is$typed, } from '../../../../../util.js';
|
|
7
|
+
const is$typed = _is$typed, validate = _validate;
|
|
8
|
+
const id = 'pub.techne.draft.identity.attachLinkGrant';
|
|
9
|
+
export class InvalidRequestError extends XRPCError {
|
|
10
|
+
constructor(src) {
|
|
11
|
+
super(src.status, src.error, src.message, src.headers, { cause: src });
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
export class LinkNotUsableError extends XRPCError {
|
|
15
|
+
constructor(src) {
|
|
16
|
+
super(src.status, src.error, src.message, src.headers, { cause: src });
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
export class ActAsPersonError extends XRPCError {
|
|
20
|
+
constructor(src) {
|
|
21
|
+
super(src.status, src.error, src.message, src.headers, { cause: src });
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
export class AlreadyGrantedError extends XRPCError {
|
|
25
|
+
constructor(src) {
|
|
26
|
+
super(src.status, src.error, src.message, src.headers, { cause: src });
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
export class ForbiddenError extends XRPCError {
|
|
30
|
+
constructor(src) {
|
|
31
|
+
super(src.status, src.error, src.message, src.headers, { cause: src });
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
export class ProgramRefusedError extends XRPCError {
|
|
35
|
+
constructor(src) {
|
|
36
|
+
super(src.status, src.error, src.message, src.headers, { cause: src });
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
export class NotSupportedError extends XRPCError {
|
|
40
|
+
constructor(src) {
|
|
41
|
+
super(src.status, src.error, src.message, src.headers, { cause: src });
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
export class RateLimitExceededError extends XRPCError {
|
|
45
|
+
constructor(src) {
|
|
46
|
+
super(src.status, src.error, src.message, src.headers, { cause: src });
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
export class UpstreamFailureError extends XRPCError {
|
|
50
|
+
constructor(src) {
|
|
51
|
+
super(src.status, src.error, src.message, src.headers, { cause: src });
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
export function toKnownErr(e) {
|
|
55
|
+
if (e instanceof XRPCError) {
|
|
56
|
+
if (e.error === 'InvalidRequest')
|
|
57
|
+
return new InvalidRequestError(e);
|
|
58
|
+
if (e.error === 'LinkNotUsable')
|
|
59
|
+
return new LinkNotUsableError(e);
|
|
60
|
+
if (e.error === 'ActAsPerson')
|
|
61
|
+
return new ActAsPersonError(e);
|
|
62
|
+
if (e.error === 'AlreadyGranted')
|
|
63
|
+
return new AlreadyGrantedError(e);
|
|
64
|
+
if (e.error === 'Forbidden')
|
|
65
|
+
return new ForbiddenError(e);
|
|
66
|
+
if (e.error === 'ProgramRefused')
|
|
67
|
+
return new ProgramRefusedError(e);
|
|
68
|
+
if (e.error === 'NotSupported')
|
|
69
|
+
return new NotSupportedError(e);
|
|
70
|
+
if (e.error === 'RateLimitExceeded')
|
|
71
|
+
return new RateLimitExceededError(e);
|
|
72
|
+
if (e.error === 'UpstreamFailure')
|
|
73
|
+
return new UpstreamFailureError(e);
|
|
74
|
+
}
|
|
75
|
+
return e;
|
|
76
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import { HeadersMap, XRPCError } from '@atproto/xrpc';
|
|
5
|
+
export type QueryParams = {};
|
|
6
|
+
export interface InputSchema {
|
|
7
|
+
/** The link's id, as redeemLinkToken answered it. */
|
|
8
|
+
id: string;
|
|
9
|
+
/** The link's token, as redeemed. */
|
|
10
|
+
token: string;
|
|
11
|
+
}
|
|
12
|
+
export interface OutputSchema {
|
|
13
|
+
/** The link's id. */
|
|
14
|
+
id: string;
|
|
15
|
+
/** Whether the grant's record was written by this call. */
|
|
16
|
+
written: boolean;
|
|
17
|
+
/** 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. */
|
|
18
|
+
reason?: string;
|
|
19
|
+
}
|
|
20
|
+
export interface CallOptions {
|
|
21
|
+
signal?: AbortSignal;
|
|
22
|
+
headers?: HeadersMap;
|
|
23
|
+
qp?: QueryParams;
|
|
24
|
+
encoding?: 'application/json';
|
|
25
|
+
}
|
|
26
|
+
export interface Response {
|
|
27
|
+
success: boolean;
|
|
28
|
+
headers: HeadersMap;
|
|
29
|
+
data: OutputSchema;
|
|
30
|
+
}
|
|
31
|
+
export declare class InvalidRequestError extends XRPCError {
|
|
32
|
+
constructor(src: XRPCError);
|
|
33
|
+
}
|
|
34
|
+
export declare class NotRedeemedError extends XRPCError {
|
|
35
|
+
constructor(src: XRPCError);
|
|
36
|
+
}
|
|
37
|
+
export declare class TryAgainError extends XRPCError {
|
|
38
|
+
constructor(src: XRPCError);
|
|
39
|
+
}
|
|
40
|
+
export declare class NotSupportedError extends XRPCError {
|
|
41
|
+
constructor(src: XRPCError);
|
|
42
|
+
}
|
|
43
|
+
export declare class RateLimitExceededError extends XRPCError {
|
|
44
|
+
constructor(src: XRPCError);
|
|
45
|
+
}
|
|
46
|
+
export declare class UpstreamFailureError extends XRPCError {
|
|
47
|
+
constructor(src: XRPCError);
|
|
48
|
+
}
|
|
49
|
+
export declare function toKnownErr(e: any): any;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import { XRPCError } from '@atproto/xrpc';
|
|
5
|
+
import { validate as _validate } from '../../../../../lexicons.js';
|
|
6
|
+
import { is$typed as _is$typed, } from '../../../../../util.js';
|
|
7
|
+
const is$typed = _is$typed, validate = _validate;
|
|
8
|
+
const id = 'pub.techne.draft.identity.claimLinkGrant';
|
|
9
|
+
export class InvalidRequestError extends XRPCError {
|
|
10
|
+
constructor(src) {
|
|
11
|
+
super(src.status, src.error, src.message, src.headers, { cause: src });
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
export class NotRedeemedError extends XRPCError {
|
|
15
|
+
constructor(src) {
|
|
16
|
+
super(src.status, src.error, src.message, src.headers, { cause: src });
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
export class TryAgainError extends XRPCError {
|
|
20
|
+
constructor(src) {
|
|
21
|
+
super(src.status, src.error, src.message, src.headers, { cause: src });
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
export class NotSupportedError extends XRPCError {
|
|
25
|
+
constructor(src) {
|
|
26
|
+
super(src.status, src.error, src.message, src.headers, { cause: src });
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
export class RateLimitExceededError extends XRPCError {
|
|
30
|
+
constructor(src) {
|
|
31
|
+
super(src.status, src.error, src.message, src.headers, { cause: src });
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
export class UpstreamFailureError extends XRPCError {
|
|
35
|
+
constructor(src) {
|
|
36
|
+
super(src.status, src.error, src.message, src.headers, { cause: src });
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
export function toKnownErr(e) {
|
|
40
|
+
if (e instanceof XRPCError) {
|
|
41
|
+
if (e.error === 'InvalidRequest')
|
|
42
|
+
return new InvalidRequestError(e);
|
|
43
|
+
if (e.error === 'NotRedeemed')
|
|
44
|
+
return new NotRedeemedError(e);
|
|
45
|
+
if (e.error === 'TryAgain')
|
|
46
|
+
return new TryAgainError(e);
|
|
47
|
+
if (e.error === 'NotSupported')
|
|
48
|
+
return new NotSupportedError(e);
|
|
49
|
+
if (e.error === 'RateLimitExceeded')
|
|
50
|
+
return new RateLimitExceededError(e);
|
|
51
|
+
if (e.error === 'UpstreamFailure')
|
|
52
|
+
return new UpstreamFailureError(e);
|
|
53
|
+
}
|
|
54
|
+
return e;
|
|
55
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import { type ValidationResult } from '@atproto/lexicon';
|
|
5
|
+
import type * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef.js';
|
|
6
|
+
export interface Main {
|
|
7
|
+
$type: 'pub.techne.draft.tagFeedback';
|
|
8
|
+
subject: ComAtprotoRepoStrongRef.Main;
|
|
9
|
+
/** The tag as the app names it: a chip id in the app's chip groups, e.g. allAges or kids. Not a bank question: the chip groups map the tag to its questions. */
|
|
10
|
+
tag: string;
|
|
11
|
+
/** What the person says about the record, not about the display: `fits`: the record has this tag's quality; `doesntFit`: it does not. Either can be said whether or not the tag is shown; feedback that agrees with what is shown asks nothing. */
|
|
12
|
+
verdict: 'fits' | 'doesntFit' | (string & {});
|
|
13
|
+
createdAt: string;
|
|
14
|
+
[k: string]: unknown;
|
|
15
|
+
}
|
|
16
|
+
export declare function isMain<V>(v: V): v is import("../../../../util.js").$TypedObject<V, "pub.techne.draft.tagFeedback", "main">;
|
|
17
|
+
export declare function validateMain<V>(v: V): ValidationResult<Main & V>;
|
|
18
|
+
export { type Main as Record, isMain as isRecord, validateMain as validateRecord, };
|