techne-sdk 0.3.8 → 0.4.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 +59 -0
- package/README.md +3 -1
- package/dist/auth/account.d.ts +67 -0
- package/dist/auth/account.js +136 -0
- package/dist/auth/hosts.d.ts +4 -0
- package/dist/auth/hosts.js +4 -0
- package/dist/auth/index.d.ts +30 -5
- package/dist/auth/index.js +80 -12
- package/dist/catalog/catalog.gen.js +1067 -194
- package/dist/generated/index.d.ts +9 -0
- package/dist/generated/index.js +27 -0
- package/dist/generated/lexicons.d.ts +1436 -148
- package/dist/generated/lexicons.js +782 -23
- package/dist/generated/nsid.d.ts +14 -0
- package/dist/generated/nsid.js +14 -0
- package/dist/generated/nsid.json +14 -0
- package/dist/generated/types/pub/techne/draft/commons/moveAccountHandle.d.ts +3 -0
- package/dist/generated/types/pub/techne/draft/commons/moveAccountHandle.js +7 -0
- package/dist/generated/types/pub/techne/draft/identity/attest.d.ts +3 -0
- package/dist/generated/types/pub/techne/draft/identity/attest.js +7 -0
- package/dist/generated/types/pub/techne/draft/identity/beginAddMethod.d.ts +3 -0
- package/dist/generated/types/pub/techne/draft/identity/beginAddMethod.js +7 -0
- package/dist/generated/types/pub/techne/draft/identity/cancelPendingChange.d.ts +29 -0
- package/dist/generated/types/pub/techne/draft/identity/cancelPendingChange.js +27 -0
- package/dist/generated/types/pub/techne/draft/identity/defs.d.ts +22 -4
- package/dist/generated/types/pub/techne/draft/identity/defs.js +7 -0
- package/dist/generated/types/pub/techne/draft/identity/finishAddMethod.d.ts +6 -0
- package/dist/generated/types/pub/techne/draft/identity/finishAddMethod.js +14 -0
- package/dist/generated/types/pub/techne/draft/identity/fold.d.ts +3 -0
- package/dist/generated/types/pub/techne/draft/identity/fold.js +7 -0
- package/dist/generated/types/pub/techne/draft/identity/holdForPhone.d.ts +1 -1
- package/dist/generated/types/pub/techne/draft/identity/link.d.ts +3 -0
- package/dist/generated/types/pub/techne/draft/identity/link.js +7 -0
- package/dist/generated/types/pub/techne/draft/identity/listMethods.d.ts +6 -1
- package/dist/generated/types/pub/techne/draft/identity/manageMethods.d.ts +225 -0
- package/dist/generated/types/pub/techne/draft/identity/manageMethods.js +209 -0
- package/dist/generated/types/pub/techne/draft/identity/openAccountPage.d.ts +40 -0
- package/dist/generated/types/pub/techne/draft/identity/openAccountPage.js +55 -0
- package/dist/generated/types/pub/techne/draft/identity/resolve.d.ts +4 -0
- package/dist/generated/types/pub/techne/draft/identity/unlinkMethod.d.ts +6 -0
- package/dist/generated/types/pub/techne/draft/identity/unlinkMethod.js +7 -0
- package/dist/generated/types/pub/techne/draft/permissioned/putRecords.d.ts +2 -2
- package/dist/generated/types/pub/techne/draft/registry/blockIndex.d.ts +7 -1
- package/dist/generated/types/pub/techne/draft/registry/blockIndex.js +17 -3
- package/dist/generated/types/pub/techne/draft/registry/purgeType.d.ts +7 -1
- package/dist/generated/types/pub/techne/draft/registry/purgeType.js +17 -3
- package/dist/wasm/techne-wasm.gen.js +1 -1
- package/dist/wasm/techne-wasm2js.gen.js +11723 -11721
- package/package.json +2 -1
|
@@ -1940,7 +1940,7 @@ export const schemaDict = {
|
|
|
1940
1940
|
defs: {
|
|
1941
1941
|
main: {
|
|
1942
1942
|
type: 'procedure',
|
|
1943
|
-
description: "Move a custodial account's handle to the deployment's current handle domain (handles move from *.scenius.social to the settled domain). Served by the AppView, operator-only
|
|
1943
|
+
description: "Move a custodial account's handle to the deployment's current handle domain (handles move from *.scenius.social to the settled domain). Served by the AppView, operator-only: the caller's DID is one of OPERATOR_DIDS and the call carries the moderate scope. Keeps the account's label unless `label` is given; updates the handle on the PDS and in the AppView. An account has one valid handle at a time: the previous one is retired, never issued again, and links that carry it redirect to the account's DID route. Everything else already refers to the account by DID and does not change.",
|
|
1944
1944
|
input: {
|
|
1945
1945
|
encoding: 'application/json',
|
|
1946
1946
|
schema: {
|
|
@@ -1990,7 +1990,11 @@ export const schemaDict = {
|
|
|
1990
1990
|
},
|
|
1991
1991
|
{
|
|
1992
1992
|
name: 'NotAuthorized',
|
|
1993
|
-
description: 'The caller is not an operator.',
|
|
1993
|
+
description: 'The caller is not an operator, or the call does not carry the moderate scope (HTTP 403).',
|
|
1994
|
+
},
|
|
1995
|
+
{
|
|
1996
|
+
name: 'ProgramRefused',
|
|
1997
|
+
description: "The caller is a program's token: a program never reaches an operator method (HTTP 403).",
|
|
1994
1998
|
},
|
|
1995
1999
|
{
|
|
1996
2000
|
name: 'InvalidRequest',
|
|
@@ -3057,7 +3061,7 @@ export const schemaDict = {
|
|
|
3057
3061
|
defs: {
|
|
3058
3062
|
main: {
|
|
3059
3063
|
type: 'procedure',
|
|
3060
|
-
description: "A PDS's issuer hook: the PDS verified a one-time code for `channel` and signed `did` in (or created it). The issuer binds an unbound channel to the account and issues a pub.techne.draft.credential, or re-issues when it is already bound to that account. It never moves a bound channel, never binds a phone number back to the account that removed it (`ChannelReleased`), and binds only accounts whose DID document names the calling PDS (`#atproto_pds`). Authenticated and signed exactly as identity.resolve. Delivered at least once; idempotent per (channel, did).",
|
|
3064
|
+
description: "A PDS's issuer hook: the PDS verified a one-time code for `channel` and signed `did` in (or created it). The issuer binds an unbound channel to the account and issues a pub.techne.draft.credential, or re-issues when it is already bound to that account. A phone it binds or re-binds releases the invitations and holds waiting on that number to the account (as a sign-in on the platform does). It never moves a bound channel, never signs in a frozen method (`MethodFrozen`), never binds a phone number back to the account that removed it (`ChannelReleased`), and binds only accounts whose DID document names the calling PDS (`#atproto_pds`). Authenticated and signed exactly as identity.resolve. Delivered at least once; idempotent per (channel, did).",
|
|
3061
3065
|
input: {
|
|
3062
3066
|
encoding: 'application/json',
|
|
3063
3067
|
schema: {
|
|
@@ -3130,6 +3134,10 @@ export const schemaDict = {
|
|
|
3130
3134
|
name: 'ChannelReleased',
|
|
3131
3135
|
description: 'The account named by `did` removed this phone number (identity.unlinkMethod) and nobody has bound it since (HTTP 409). Never retried: the account gets the number back only by adding it again (identity.finishAddMethod).',
|
|
3132
3136
|
},
|
|
3137
|
+
{
|
|
3138
|
+
name: 'MethodFrozen',
|
|
3139
|
+
description: 'This channel is a frozen method of the account (identity.manageMethods `freeze`; HTTP 403): it does not sign in until the freeze ends. Not retried.',
|
|
3140
|
+
},
|
|
3133
3141
|
{
|
|
3134
3142
|
name: 'RateLimitExceeded',
|
|
3135
3143
|
description: 'As identity.resolve (HTTP 429).',
|
|
@@ -3189,6 +3197,10 @@ export const schemaDict = {
|
|
|
3189
3197
|
name: 'RateLimitExceeded',
|
|
3190
3198
|
description: 'Too many codes sent to this address (HTTP 429).',
|
|
3191
3199
|
},
|
|
3200
|
+
{
|
|
3201
|
+
name: 'MethodFrozen',
|
|
3202
|
+
description: "The channel is a frozen sign-in method of an account (HTTP 403); it can't be proved anywhere until the freeze ends.",
|
|
3203
|
+
},
|
|
3192
3204
|
{
|
|
3193
3205
|
name: 'SendFailed',
|
|
3194
3206
|
description: 'The code could not be texted to that phone number (HTTP 502). Try again.',
|
|
@@ -3197,6 +3209,51 @@ export const schemaDict = {
|
|
|
3197
3209
|
},
|
|
3198
3210
|
},
|
|
3199
3211
|
},
|
|
3212
|
+
PubTechneDraftIdentityCancelPendingChange: {
|
|
3213
|
+
lexicon: 1,
|
|
3214
|
+
id: 'pub.techne.draft.identity.cancelPendingChange',
|
|
3215
|
+
defs: {
|
|
3216
|
+
main: {
|
|
3217
|
+
type: 'procedure',
|
|
3218
|
+
description: "Cancel one of the caller's pending sign-in changes (a method removal, an account deletion or a first recovery mark that waits; its `id` is the `pending` identity.listMethods, identity.unlinkMethod or deleteAccount answered), by the sign-in method rules: any of the account's methods may cancel a wait, so a signed-in session may, with no step-up. For an account whose PDS has no account page of its own; the identity PDS cancels through identity.manageMethods `cancel`. A frozen method may cancel too, its own removal included. Nothing else changes.",
|
|
3219
|
+
input: {
|
|
3220
|
+
encoding: 'application/json',
|
|
3221
|
+
schema: {
|
|
3222
|
+
type: 'object',
|
|
3223
|
+
required: ['id'],
|
|
3224
|
+
properties: {
|
|
3225
|
+
id: {
|
|
3226
|
+
type: 'string',
|
|
3227
|
+
maxLength: 64,
|
|
3228
|
+
},
|
|
3229
|
+
},
|
|
3230
|
+
},
|
|
3231
|
+
},
|
|
3232
|
+
output: {
|
|
3233
|
+
encoding: 'application/json',
|
|
3234
|
+
schema: {
|
|
3235
|
+
type: 'object',
|
|
3236
|
+
required: ['ok'],
|
|
3237
|
+
properties: {
|
|
3238
|
+
ok: {
|
|
3239
|
+
type: 'boolean',
|
|
3240
|
+
},
|
|
3241
|
+
},
|
|
3242
|
+
},
|
|
3243
|
+
},
|
|
3244
|
+
errors: [
|
|
3245
|
+
{
|
|
3246
|
+
name: 'AuthenticationRequired',
|
|
3247
|
+
description: 'No signed-in caller.',
|
|
3248
|
+
},
|
|
3249
|
+
{
|
|
3250
|
+
name: 'NotFound',
|
|
3251
|
+
description: "No such pending change on the caller's account, or it already completed or was cancelled.",
|
|
3252
|
+
},
|
|
3253
|
+
],
|
|
3254
|
+
},
|
|
3255
|
+
},
|
|
3256
|
+
},
|
|
3200
3257
|
PubTechneDraftIdentityCheckLinkToken: {
|
|
3201
3258
|
lexicon: 1,
|
|
3202
3259
|
id: 'pub.techne.draft.identity.checkLinkToken',
|
|
@@ -3319,7 +3376,7 @@ export const schemaDict = {
|
|
|
3319
3376
|
defs: {
|
|
3320
3377
|
main: {
|
|
3321
3378
|
type: 'procedure',
|
|
3322
|
-
description: "Make a link token on the caller's identity PDS: a secret anyone can redeem (redeemLinkToken) once (one-time, the default) or any number of times by different accounts (`reusable`). With `grant`, the platform keeps a write it makes for each account that redeems it: when the identity PDS reports a redemption, the platform writes the redeemer's own pub.techne.draft.identity.linkRedemption record in their personal space and then writes `grant.write` as `grant.actAs` with the redeemer's DID in every \"$subject\" slot, exactly as identity.holdForPhone releases a hold: the caller must be able to write as `actAs` now and when the link is redeemed, a block either way between the redeemer and the caller or `actAs` writes nothing, and the record must be one permissioned.putRecord would take with the caller's DID in the slot. A one-time link's grant goes after its one write; a reusable link's is written once for each redeemer, under its own record key. A release never writes over a record already at its key: one there stays, and that redeemer's write is not made. Only an account hosted on the platform's identity PDS can make links. One call spends one of the caller's writes.",
|
|
3379
|
+
description: "Make a link token on the caller's identity PDS: a secret anyone can redeem (redeemLinkToken) once (one-time, the default) or any number of times by different accounts (`reusable`). With `grant`, the platform keeps a write it makes for each account that redeems it: when the identity PDS reports a redemption, the platform writes the redeemer's own pub.techne.draft.identity.linkRedemption record in their personal space and then writes `grant.write` as `grant.actAs` with the redeemer's DID in every \"$subject\" slot (and their name in every \"$name\" slot), exactly as identity.holdForPhone releases a hold: the caller must be able to write as `actAs` now and when the link is redeemed, a block either way between the redeemer and the caller or `actAs` writes nothing, and the record must be one permissioned.putRecord would take with the caller's DID in the slot. A one-time link's grant goes after its one write; a reusable link's is written once for each redeemer, under its own record key. A release never writes over a record already at its key: one there stays, and that redeemer's write is not made. A pub.techne.draft.contact grant is likewise not made when any active contact of `actAs` already names the redeemer, by its `did` or by a saved number that resolves to them (an archived one does not count), so a grant like {name: \"$name\", did: \"$subject\"} adds each person to the owner's People once. Only an account hosted on the platform's identity PDS can make links. One call spends one of the caller's writes.",
|
|
3323
3380
|
input: {
|
|
3324
3381
|
encoding: 'application/json',
|
|
3325
3382
|
schema: {
|
|
@@ -3416,27 +3473,74 @@ export const schemaDict = {
|
|
|
3416
3473
|
},
|
|
3417
3474
|
methodView: {
|
|
3418
3475
|
type: 'object',
|
|
3419
|
-
description: "One sign-in method
|
|
3476
|
+
description: "One sign-in method of the caller's account, masked.",
|
|
3420
3477
|
required: ['bid', 'type', 'masked', 'boundAt'],
|
|
3421
3478
|
properties: {
|
|
3422
3479
|
bid: {
|
|
3423
3480
|
type: 'string',
|
|
3424
3481
|
maxLength: 64,
|
|
3425
|
-
description: "The binding id (the credential's record key). Names the method in unlinkMethod.",
|
|
3482
|
+
description: "The method's id: the binding id (the credential's record key) of an email or phone, else the platform's id for it. Names the method in unlinkMethod and manageMethods.",
|
|
3426
3483
|
},
|
|
3427
3484
|
type: {
|
|
3428
3485
|
type: 'string',
|
|
3429
|
-
knownValues: [
|
|
3486
|
+
knownValues: [
|
|
3487
|
+
'email',
|
|
3488
|
+
'phone',
|
|
3489
|
+
'passkey',
|
|
3490
|
+
'nostr',
|
|
3491
|
+
'recoveryCodes',
|
|
3492
|
+
],
|
|
3430
3493
|
},
|
|
3431
3494
|
masked: {
|
|
3432
3495
|
type: 'string',
|
|
3433
3496
|
maxLength: 320,
|
|
3434
|
-
description:
|
|
3497
|
+
description: "The channel with most of it hidden, e.g. `j•••@example.com`, `+1 ••• ••• 4567`; a passkey's or Nostr key's label; `Recovery codes (n left)`.",
|
|
3435
3498
|
},
|
|
3436
3499
|
boundAt: {
|
|
3437
3500
|
type: 'string',
|
|
3438
3501
|
format: 'datetime',
|
|
3439
3502
|
},
|
|
3503
|
+
recovery: {
|
|
3504
|
+
type: 'boolean',
|
|
3505
|
+
description: 'A recovery method of this account. Private: only the account sees it.',
|
|
3506
|
+
},
|
|
3507
|
+
frozenUntil: {
|
|
3508
|
+
type: 'string',
|
|
3509
|
+
format: 'datetime',
|
|
3510
|
+
description: 'Frozen: it signs in nowhere until then, or until a recovery method lifts it.',
|
|
3511
|
+
},
|
|
3512
|
+
programs: {
|
|
3513
|
+
type: 'boolean',
|
|
3514
|
+
description: '"Programs can sign in with this key" (identity.manageMethods setPrograms). Present on the types that support it (a Nostr key), off by default. Never on for a recovery method.',
|
|
3515
|
+
},
|
|
3516
|
+
},
|
|
3517
|
+
},
|
|
3518
|
+
pendingChange: {
|
|
3519
|
+
type: 'object',
|
|
3520
|
+
description: "A change that waits for its time (a method's removal or the account's deletion, 7 days; the account's first recovery mark, 24 hours). Any of the account's methods, a frozen one too, can cancel it until then; a wait during which one of the account's methods was frozen (and not lifted early by a recovery method) is dropped when it runs out, not completed.",
|
|
3521
|
+
required: ['id', 'kind', 'createdAt', 'dueAt'],
|
|
3522
|
+
properties: {
|
|
3523
|
+
id: {
|
|
3524
|
+
type: 'string',
|
|
3525
|
+
maxLength: 64,
|
|
3526
|
+
},
|
|
3527
|
+
kind: {
|
|
3528
|
+
type: 'string',
|
|
3529
|
+
knownValues: ['removeMethod', 'deleteAccount', 'markRecovery'],
|
|
3530
|
+
},
|
|
3531
|
+
method: {
|
|
3532
|
+
type: 'string',
|
|
3533
|
+
maxLength: 64,
|
|
3534
|
+
description: 'The method it removes or marks.',
|
|
3535
|
+
},
|
|
3536
|
+
createdAt: {
|
|
3537
|
+
type: 'string',
|
|
3538
|
+
format: 'datetime',
|
|
3539
|
+
},
|
|
3540
|
+
dueAt: {
|
|
3541
|
+
type: 'string',
|
|
3542
|
+
format: 'datetime',
|
|
3543
|
+
},
|
|
3440
3544
|
},
|
|
3441
3545
|
},
|
|
3442
3546
|
linkView: {
|
|
@@ -3607,6 +3711,14 @@ export const schemaDict = {
|
|
|
3607
3711
|
name: 'RateLimitExceeded',
|
|
3608
3712
|
description: 'A phone code: the provider that sent it is refusing more checks for this number for now (HTTP 429). Wait a few minutes.',
|
|
3609
3713
|
},
|
|
3714
|
+
{
|
|
3715
|
+
name: 'MethodFrozen',
|
|
3716
|
+
description: "The channel was frozen on its account since the code was sent, or it would be new to the caller's account while one of its methods is frozen (HTTP 403).",
|
|
3717
|
+
},
|
|
3718
|
+
{
|
|
3719
|
+
name: 'ProtectedAccount',
|
|
3720
|
+
description: 'The channel signs in to another account, and one of the two has a recovery mark, a live freeze, a pending change, or a passkey, Nostr key or recovery codes (HTTP 409): no fold or link is offered.',
|
|
3721
|
+
},
|
|
3610
3722
|
{
|
|
3611
3723
|
name: 'UpstreamFailure',
|
|
3612
3724
|
description: 'A phone code: the provider that sent it could not be asked whether it matches (HTTP 502). The code is not spent; try again.',
|
|
@@ -3699,6 +3811,10 @@ export const schemaDict = {
|
|
|
3699
3811
|
name: 'InvalidToken',
|
|
3700
3812
|
description: 'The token is unknown, used, expired, or was issued to another session.',
|
|
3701
3813
|
},
|
|
3814
|
+
{
|
|
3815
|
+
name: 'ProtectedAccount',
|
|
3816
|
+
description: 'One of the two accounts has a recovery mark, a live freeze, a pending change, or a passkey, Nostr key or recovery codes since the offer (HTTP 409).',
|
|
3817
|
+
},
|
|
3702
3818
|
{
|
|
3703
3819
|
name: 'NotEmpty',
|
|
3704
3820
|
description: 'The account to fold gained a record or is 7 days old or more; link instead.',
|
|
@@ -3713,7 +3829,7 @@ export const schemaDict = {
|
|
|
3713
3829
|
defs: {
|
|
3714
3830
|
main: {
|
|
3715
3831
|
type: 'procedure',
|
|
3716
|
-
description: 'Hold a write until someone proves a phone number: when an account proves `phone`, the platform fills every string value exactly "$subject" in `write.record` (and "$subject" in `write.rkey`) with that account\'s DID
|
|
3832
|
+
description: 'Hold a write until someone proves a phone number: when an account proves `phone`, the platform fills every string value exactly "$subject" in `write.record` (and "$subject" in `write.rkey`) with that account\'s DID, every value exactly "$now" in the record with the time and every value exactly "$name" with that account\'s name (its public pub.techne.draft.actor.profile displayName, trimmed, at most 64 graphemes, else its handle; a write waits until one is known), and writes the record as `actAs` in `write.space` with what it holds for that account. Only the number\'s keyed hash is kept; the template may not contain the number. Every hold is answered alike, whether or not the number already has an account: one that has is released the next time it is proved (each phone sign-in proves it), never at once, so nothing here says whether a number has an account or whose it is. The caller must be able to write as `actAs` (its own DID, a collective or circle whose own member space (`space.collective.member/self`) it manages, or a collective it made that has nothing placed yet), now and again when the number is proved; a hold whose caller no longer may, or with a block either way between the new account and the caller or `actAs`, is dropped unwritten, as is one whose record the space does not admit. The record must be one permissioned.putRecord would take with the caller\'s DID in the slot, and must carry the slot. The nightly sweep deletes a hold 180 days after it was made. Holding again with the same number, `actAs`, `collection`, `space`, `rkey` and record `space` answers the existing hold unchanged (the first template wins; withdraw it with releasePhoneHold and hold again to change it). The template is shown to everyone who may write as `actAs` and read `space` (listPhoneHolds). Identity knows nothing about what the record means. Any signed-in DID; one call spends one of the caller\'s writes.',
|
|
3717
3833
|
input: {
|
|
3718
3834
|
encoding: 'application/json',
|
|
3719
3835
|
schema: {
|
|
@@ -3788,7 +3904,7 @@ export const schemaDict = {
|
|
|
3788
3904
|
},
|
|
3789
3905
|
record: {
|
|
3790
3906
|
type: 'unknown',
|
|
3791
|
-
description: 'The record, with the "$subject" (and optionally "$now") slots as string values.',
|
|
3907
|
+
description: 'The record, with the "$subject" (and optionally "$now" and "$name") slots as string values.',
|
|
3792
3908
|
},
|
|
3793
3909
|
},
|
|
3794
3910
|
},
|
|
@@ -3841,6 +3957,10 @@ export const schemaDict = {
|
|
|
3841
3957
|
name: 'InvalidToken',
|
|
3842
3958
|
description: 'The token is unknown, used, expired, or was issued to another session.',
|
|
3843
3959
|
},
|
|
3960
|
+
{
|
|
3961
|
+
name: 'ProtectedAccount',
|
|
3962
|
+
description: 'One of the two accounts has a recovery mark, a live freeze, a pending change, or a passkey, Nostr key or recovery codes since the offer (HTTP 409).',
|
|
3963
|
+
},
|
|
3844
3964
|
{
|
|
3845
3965
|
name: 'InvalidRequest',
|
|
3846
3966
|
description: "`primary` names neither account, or the other account's keys are not held here (sign in to it and link from there).",
|
|
@@ -4115,7 +4235,16 @@ export const schemaDict = {
|
|
|
4115
4235
|
defs: {
|
|
4116
4236
|
main: {
|
|
4117
4237
|
type: 'query',
|
|
4118
|
-
description: "The caller's sign-in methods (masked) and the account's alias links. Signed-in members only.",
|
|
4238
|
+
description: "The caller's sign-in methods (masked, with their recovery mark and freeze), its pending changes, and the account's alias links. Emails and phones only unless `allTypes` (shipped clients label every row as an email). Signed-in members only.",
|
|
4239
|
+
parameters: {
|
|
4240
|
+
type: 'params',
|
|
4241
|
+
properties: {
|
|
4242
|
+
allTypes: {
|
|
4243
|
+
type: 'boolean',
|
|
4244
|
+
description: 'Also list passkeys, Nostr keys and the recovery-code set.',
|
|
4245
|
+
},
|
|
4246
|
+
},
|
|
4247
|
+
},
|
|
4119
4248
|
output: {
|
|
4120
4249
|
encoding: 'application/json',
|
|
4121
4250
|
schema: {
|
|
@@ -4136,6 +4265,14 @@ export const schemaDict = {
|
|
|
4136
4265
|
ref: 'lex:pub.techne.draft.identity.defs#linkView',
|
|
4137
4266
|
},
|
|
4138
4267
|
},
|
|
4268
|
+
pending: {
|
|
4269
|
+
type: 'array',
|
|
4270
|
+
description: "The account's pending changes, soonest first (the account page shows them at the top, with Cancel).",
|
|
4271
|
+
items: {
|
|
4272
|
+
type: 'ref',
|
|
4273
|
+
ref: 'lex:pub.techne.draft.identity.defs#pendingChange',
|
|
4274
|
+
},
|
|
4275
|
+
},
|
|
4139
4276
|
},
|
|
4140
4277
|
},
|
|
4141
4278
|
},
|
|
@@ -4247,6 +4384,586 @@ export const schemaDict = {
|
|
|
4247
4384
|
},
|
|
4248
4385
|
},
|
|
4249
4386
|
},
|
|
4387
|
+
PubTechneDraftIdentityManageMethods: {
|
|
4388
|
+
lexicon: 1,
|
|
4389
|
+
id: 'pub.techne.draft.identity.manageMethods',
|
|
4390
|
+
defs: {
|
|
4391
|
+
main: {
|
|
4392
|
+
type: 'procedure',
|
|
4393
|
+
description: "The identity PDS's signed hook for the sign-in method rules (the account page and sign-in page call it; the rules live on the platform so every client obeys the same ones). Authenticated only by the epds-signature MAC with the identity hook secret; no session, OAuth or service-JWT caller reaches it, and every answer is signed. The PDS vouches for the signed-in account (`did`, which must be hosted on the calling PDS, else 404 UnknownAccount) and for the step-up it just checked (`stepUp`: which method, when; it counts for 10 minutes). Rules: a recovery method acting with a fresh step-up acts at once; anything else removes a method or deletes the account after a 7-day wait with notice to every method, cancellable by any of them, a frozen one too (`cancel`); a wait re-checks these rules when it runs out (a method marked for recovery meanwhile is not removed; a first mark is dropped once another method is marked; a wait during which any of the account's methods was frozen, even if a recovery method lifted the freeze early or removed the method, is dropped, not completed, since a frozen method can't sign in to cancel it, and every email method gets a `waitDropped` notice naming the change); a freeze is immediate, from a different method with a fresh step-up, and lasts 7 days or until a recovery method lifts it (`unfreeze`); a recovery method is never frozen, removed or unmarked by an unmarked one; the last way to sign in is never removed; marking a recovery method needs a fresh step-up of one, except the account's first, which needs a fresh step-up of any of its methods (else StepUpRequired) and waits 24 hours with notice. Ops: `list` (methods, pending changes, `hasRecovery`), `signInMethods` (for a sign-in page that knows only the account, \"Sign in as @handle\": the methods that can sign in now, each a `display` only, never its full value; no step-up, recovery marks or pending changes), `sendTo` (the full email or phone of one of them, for the PDS to send a sign-in code to; never shown), `remove`, `cancel`, `freeze` (with `signOut`), `unfreeze`, `mark`, `unmark`, `signOut` (sign out everywhere the platform holds a session; the PDS revokes its own), `delete`, `addExternal` (a passkey or Nostr key the PDS proved; always a fresh step-up of one of the account's methods, StepUpRequired without one, and never a program's, ProgramRefused), `newRecoveryCodes` (returned once; a new set ends the old; always a fresh step-up, and on an account with no recovery method the set is its first mark, which waits 24 hours; a first set is refused, MethodFrozen, while one of the account's methods is frozen), `redeemCode`, `setPrograms` (\"Programs can sign in with this key\" on or off, `on`, for a Nostr key, the only type that supports it: on and off both need a fresh step-up of one of the account's methods that is not a program, not frozen (a step-up by a key with programs on is ProgramRefused, so that key never switches itself off); on is also refused from the key itself, SameMethod, for a recovery method or one whose first mark is waiting, IsRecovery, and while a method of the account is frozen, MethodFrozen), `addChannel` (a `channel` the PDS just proved for `did`, as identity.finishAddMethod does for a session: `added`, `alreadyYours`, or `boundElsewhere` with an `offer` (identity.finishAddMethod#offer), single use, 10 minutes, bound to `did` on this hook and to no session; MethodFrozen when the channel is frozen on any account, MethodFrozen when `did` itself has a frozen method and the channel would be new to it (no method is added past a freeze; `addExternal` likewise), ProtectedAccount when either account has a recovery mark, a freeze, a pending change, or a passkey, Nostr key or recovery codes), `fold` and `link` (take that offer: `token`, and for `link` the `primary`; need a fresh step-up of `did`; ProtectedAccount (a live freeze included) and NotEmpty, checked again; `folded` with the kept `did` and the `emptied` one, which is deleted (on the identity PDS too, by `dueDeletes`), or `linked` with `link`), `importBackupEmails` (once per account, recorded: a second call answers `alreadyImported` even after every mark is taken off; the move of the PDS's verified backup emails, `backupEmails`, each with when the PDS verified it: one verified before 2026-11-13T00:00:00Z becomes an email method marked for recovery at once, without step-up or wait, and one verified at or after it is skipped, `afterCutoff`, since only the holder could have added one before these rules; only an account with no recovery method takes one, all of its addresses in one call (each address once, else 400 InvalidRequest), else `hasRecovery`, nothing changes and the import is spent; a call that marks none of them spends it too; MethodFrozen while one of the account's methods is frozen, not spent; `indexOff` while the identity index is off), for the notice queue (no `did`; only the accounts the calling PDS hosts; the platform emails those of accounts hosted elsewhere itself) `notices` (up to 100 to deliver; one taken and not confirmed is offered again after 5 minutes, at most 10 times) and `noticesSent`, for a login service that just checked a signature by a Nostr key and knows no account yet (no `did`) `findKey` (`external`, type `nostr` and the 64-character lowercase hex key: `none` when no account the calling PDS hosts has it, else `done` with the account's `did`, the key's `method`, whether that method is `frozen` now, and whether `programs` may sign in with it), and for scheduled account deletions that came due (no `did`; only the accounts the calling PDS hosts) `dueDeletes` (up to 100 accounts the platform has deleted on its side, which the PDS deletes too; one taken and not confirmed is offered again after 5 minutes, without limit) and `dueDeletesDone` (`dids` the PDS deleted), and for a consent screen after sign-in `operator` (`operator`: whether `did` is one of the platform's operators, so the PDS offers the moderate scope, `include:pub.techne.draft.authModerate`, to operators only and drops it from everyone else's grant). Programs: a key with programs on can't be marked (ProgramsOn), and a program never touches account security: when the PDS says a program made the request (`program`), or the step-up names a key with programs on, every op but `list`, `signInMethods` and `sendTo` is 403 ProgramRefused (`operator` included: a program never moderates), `setPrograms` included: such a key's programs are turned off by a step-up of another of the account's methods.",
|
|
4394
|
+
input: {
|
|
4395
|
+
encoding: 'application/json',
|
|
4396
|
+
schema: {
|
|
4397
|
+
type: 'object',
|
|
4398
|
+
required: ['v', 'op'],
|
|
4399
|
+
properties: {
|
|
4400
|
+
v: {
|
|
4401
|
+
type: 'integer',
|
|
4402
|
+
const: 1,
|
|
4403
|
+
},
|
|
4404
|
+
op: {
|
|
4405
|
+
type: 'string',
|
|
4406
|
+
knownValues: [
|
|
4407
|
+
'list',
|
|
4408
|
+
'signInMethods',
|
|
4409
|
+
'sendTo',
|
|
4410
|
+
'remove',
|
|
4411
|
+
'cancel',
|
|
4412
|
+
'freeze',
|
|
4413
|
+
'unfreeze',
|
|
4414
|
+
'mark',
|
|
4415
|
+
'unmark',
|
|
4416
|
+
'signOut',
|
|
4417
|
+
'delete',
|
|
4418
|
+
'addExternal',
|
|
4419
|
+
'newRecoveryCodes',
|
|
4420
|
+
'redeemCode',
|
|
4421
|
+
'setPrograms',
|
|
4422
|
+
'importBackupEmails',
|
|
4423
|
+
'findKey',
|
|
4424
|
+
'notices',
|
|
4425
|
+
'noticesSent',
|
|
4426
|
+
'dueDeletes',
|
|
4427
|
+
'dueDeletesDone',
|
|
4428
|
+
'addChannel',
|
|
4429
|
+
'fold',
|
|
4430
|
+
'link',
|
|
4431
|
+
'operator',
|
|
4432
|
+
],
|
|
4433
|
+
},
|
|
4434
|
+
did: {
|
|
4435
|
+
type: 'string',
|
|
4436
|
+
format: 'did',
|
|
4437
|
+
description: 'The signed-in account. Required for every op but `notices`, `noticesSent`, `dueDeletes` and `dueDeletesDone`.',
|
|
4438
|
+
},
|
|
4439
|
+
stepUp: {
|
|
4440
|
+
type: 'ref',
|
|
4441
|
+
ref: 'lex:pub.techne.draft.identity.manageMethods#stepUp',
|
|
4442
|
+
},
|
|
4443
|
+
method: {
|
|
4444
|
+
type: 'string',
|
|
4445
|
+
maxLength: 64,
|
|
4446
|
+
description: 'The method acted on (its `id` in `list` or `signInMethods`).',
|
|
4447
|
+
},
|
|
4448
|
+
pending: {
|
|
4449
|
+
type: 'string',
|
|
4450
|
+
maxLength: 64,
|
|
4451
|
+
description: 'The pending change `cancel` cancels.',
|
|
4452
|
+
},
|
|
4453
|
+
signOut: {
|
|
4454
|
+
type: 'boolean',
|
|
4455
|
+
description: 'With `freeze`: also sign out everywhere.',
|
|
4456
|
+
},
|
|
4457
|
+
external: {
|
|
4458
|
+
type: 'ref',
|
|
4459
|
+
ref: 'lex:pub.techne.draft.identity.manageMethods#external',
|
|
4460
|
+
},
|
|
4461
|
+
code: {
|
|
4462
|
+
type: 'string',
|
|
4463
|
+
maxLength: 64,
|
|
4464
|
+
description: 'A recovery code, for `redeemCode`.',
|
|
4465
|
+
},
|
|
4466
|
+
ids: {
|
|
4467
|
+
type: 'array',
|
|
4468
|
+
maxLength: 100,
|
|
4469
|
+
items: {
|
|
4470
|
+
type: 'integer',
|
|
4471
|
+
},
|
|
4472
|
+
description: 'Notice ids, for `noticesSent`.',
|
|
4473
|
+
},
|
|
4474
|
+
emails: {
|
|
4475
|
+
type: 'array',
|
|
4476
|
+
maxLength: 10,
|
|
4477
|
+
items: {
|
|
4478
|
+
type: 'string',
|
|
4479
|
+
maxLength: 320,
|
|
4480
|
+
},
|
|
4481
|
+
description: "Retired, not read: a bare list has no verification dates, so the cutoff can't hold. importBackupEmails without `backupEmails` is 400 InvalidRequest.",
|
|
4482
|
+
},
|
|
4483
|
+
backupEmails: {
|
|
4484
|
+
type: 'array',
|
|
4485
|
+
maxLength: 10,
|
|
4486
|
+
items: {
|
|
4487
|
+
type: 'ref',
|
|
4488
|
+
ref: 'lex:pub.techne.draft.identity.manageMethods#backupEmail',
|
|
4489
|
+
},
|
|
4490
|
+
description: "importBackupEmails: the account's verified backup email addresses, all of them, each with when the PDS verified it.",
|
|
4491
|
+
},
|
|
4492
|
+
dids: {
|
|
4493
|
+
type: 'array',
|
|
4494
|
+
maxLength: 100,
|
|
4495
|
+
items: {
|
|
4496
|
+
type: 'string',
|
|
4497
|
+
format: 'did',
|
|
4498
|
+
},
|
|
4499
|
+
description: 'dueDeletesDone: the accounts whose PDS account was deleted.',
|
|
4500
|
+
},
|
|
4501
|
+
channel: {
|
|
4502
|
+
type: 'ref',
|
|
4503
|
+
ref: 'lex:pub.techne.draft.identity.defs#channel',
|
|
4504
|
+
description: 'addChannel: the email or phone the PDS just proved (a code it sent and checked).',
|
|
4505
|
+
},
|
|
4506
|
+
token: {
|
|
4507
|
+
type: 'string',
|
|
4508
|
+
maxLength: 128,
|
|
4509
|
+
description: "fold / link: the offer's token from addChannel.",
|
|
4510
|
+
},
|
|
4511
|
+
primary: {
|
|
4512
|
+
type: 'string',
|
|
4513
|
+
format: 'did',
|
|
4514
|
+
description: 'link: which of the two accounts is the primary.',
|
|
4515
|
+
},
|
|
4516
|
+
on: {
|
|
4517
|
+
type: 'boolean',
|
|
4518
|
+
description: 'setPrograms: on or off.',
|
|
4519
|
+
},
|
|
4520
|
+
program: {
|
|
4521
|
+
type: 'boolean',
|
|
4522
|
+
description: "A program made this request: a session or token the PDS's programmatic sign-in opened. Account security is refused (ProgramRefused).",
|
|
4523
|
+
},
|
|
4524
|
+
},
|
|
4525
|
+
},
|
|
4526
|
+
},
|
|
4527
|
+
output: {
|
|
4528
|
+
encoding: 'application/json',
|
|
4529
|
+
schema: {
|
|
4530
|
+
type: 'object',
|
|
4531
|
+
required: ['v'],
|
|
4532
|
+
properties: {
|
|
4533
|
+
v: {
|
|
4534
|
+
type: 'integer',
|
|
4535
|
+
const: 1,
|
|
4536
|
+
},
|
|
4537
|
+
status: {
|
|
4538
|
+
type: 'string',
|
|
4539
|
+
knownValues: [
|
|
4540
|
+
'done',
|
|
4541
|
+
'pending',
|
|
4542
|
+
'deleted',
|
|
4543
|
+
'deleting',
|
|
4544
|
+
'bound',
|
|
4545
|
+
'invalid',
|
|
4546
|
+
'hasRecovery',
|
|
4547
|
+
'indexOff',
|
|
4548
|
+
'alreadyImported',
|
|
4549
|
+
'added',
|
|
4550
|
+
'alreadyYours',
|
|
4551
|
+
'boundElsewhere',
|
|
4552
|
+
'unavailable',
|
|
4553
|
+
'folded',
|
|
4554
|
+
'linked',
|
|
4555
|
+
'none',
|
|
4556
|
+
],
|
|
4557
|
+
description: "`done`: it happened now. `pending`: it waits (`pending`). `deleted` / `deleting` (`delete` done now): the account is gone / its local half is gone and a sweep finishes the rest (deleteAccount's `deleted` / `pending`; a deletion that could not start answers 503 Unavailable, try again). `bound`: addExternal's key is on another account. `invalid`: redeemCode's code is wrong, used, or the set is not a recovery method or is frozen. `hasRecovery`: importBackupEmails found a recovery method on the account; nothing changed. `indexOff`: importBackupEmails can't mark anything while the identity index is off; nothing changed. `alreadyImported`: importBackupEmails ran for this account before; nothing changed. `added` / `alreadyYours` / `boundElsewhere` / `unavailable`: addChannel, as identity.finishAddMethod. `folded` / `linked`: fold / link done. `none`: findKey's key is no method of an account the calling PDS hosts.",
|
|
4558
|
+
},
|
|
4559
|
+
pending: {
|
|
4560
|
+
type: 'ref',
|
|
4561
|
+
ref: 'lex:pub.techne.draft.identity.defs#pendingChange',
|
|
4562
|
+
},
|
|
4563
|
+
method: {
|
|
4564
|
+
type: 'string',
|
|
4565
|
+
description: "addExternal's new method id, the recovery-code set redeemCode used, or addChannel's method id when `added` or `alreadyYours` (empty while the identity index is off); findKey's method id of the key.",
|
|
4566
|
+
},
|
|
4567
|
+
codes: {
|
|
4568
|
+
type: 'array',
|
|
4569
|
+
items: {
|
|
4570
|
+
type: 'string',
|
|
4571
|
+
},
|
|
4572
|
+
description: 'newRecoveryCodes: the codes, shown once.',
|
|
4573
|
+
},
|
|
4574
|
+
methods: {
|
|
4575
|
+
type: 'array',
|
|
4576
|
+
items: {
|
|
4577
|
+
type: 'ref',
|
|
4578
|
+
ref: 'lex:pub.techne.draft.identity.defs#methodView',
|
|
4579
|
+
},
|
|
4580
|
+
},
|
|
4581
|
+
hasRecovery: {
|
|
4582
|
+
type: 'boolean',
|
|
4583
|
+
},
|
|
4584
|
+
notices: {
|
|
4585
|
+
type: 'array',
|
|
4586
|
+
items: {
|
|
4587
|
+
type: 'ref',
|
|
4588
|
+
ref: 'lex:pub.techne.draft.identity.manageMethods#notice',
|
|
4589
|
+
},
|
|
4590
|
+
},
|
|
4591
|
+
count: {
|
|
4592
|
+
type: 'integer',
|
|
4593
|
+
description: 'noticesSent / dueDeletesDone: how many were confirmed.',
|
|
4594
|
+
},
|
|
4595
|
+
signInMethods: {
|
|
4596
|
+
type: 'array',
|
|
4597
|
+
items: {
|
|
4598
|
+
type: 'ref',
|
|
4599
|
+
ref: 'lex:pub.techne.draft.identity.manageMethods#signInMethod',
|
|
4600
|
+
},
|
|
4601
|
+
description: "signInMethods: the account's methods that can sign in now (not frozen), oldest first.",
|
|
4602
|
+
},
|
|
4603
|
+
to: {
|
|
4604
|
+
type: 'ref',
|
|
4605
|
+
ref: 'lex:pub.techne.draft.identity.manageMethods#noticeTo',
|
|
4606
|
+
description: 'sendTo: where the code goes, in full.',
|
|
4607
|
+
},
|
|
4608
|
+
imported: {
|
|
4609
|
+
type: 'array',
|
|
4610
|
+
items: {
|
|
4611
|
+
type: 'ref',
|
|
4612
|
+
ref: 'lex:pub.techne.draft.identity.manageMethods#importedEmail',
|
|
4613
|
+
},
|
|
4614
|
+
description: 'importBackupEmails: each address sent, with what happened to it.',
|
|
4615
|
+
},
|
|
4616
|
+
dueDeletes: {
|
|
4617
|
+
type: 'array',
|
|
4618
|
+
items: {
|
|
4619
|
+
type: 'ref',
|
|
4620
|
+
ref: 'lex:pub.techne.draft.identity.manageMethods#dueDelete',
|
|
4621
|
+
},
|
|
4622
|
+
description: 'dueDeletes: accounts to delete on the PDS, oldest first.',
|
|
4623
|
+
},
|
|
4624
|
+
offer: {
|
|
4625
|
+
type: 'ref',
|
|
4626
|
+
ref: 'lex:pub.techne.draft.identity.finishAddMethod#offer',
|
|
4627
|
+
description: 'addChannel `boundElsewhere`: what `did` can do, with `fold` or `link`.',
|
|
4628
|
+
},
|
|
4629
|
+
did: {
|
|
4630
|
+
type: 'string',
|
|
4631
|
+
format: 'did',
|
|
4632
|
+
description: 'fold: the kept account. findKey: the account the key signs in to.',
|
|
4633
|
+
},
|
|
4634
|
+
emptied: {
|
|
4635
|
+
type: 'string',
|
|
4636
|
+
format: 'did',
|
|
4637
|
+
description: 'fold: the account folded in and deleted.',
|
|
4638
|
+
},
|
|
4639
|
+
link: {
|
|
4640
|
+
type: 'ref',
|
|
4641
|
+
ref: 'lex:pub.techne.draft.identity.defs#linkView',
|
|
4642
|
+
description: "link: the link, from `did`'s side.",
|
|
4643
|
+
},
|
|
4644
|
+
frozen: {
|
|
4645
|
+
type: 'boolean',
|
|
4646
|
+
description: "findKey: the key's method is frozen now and can't sign in.",
|
|
4647
|
+
},
|
|
4648
|
+
programs: {
|
|
4649
|
+
type: 'boolean',
|
|
4650
|
+
description: 'findKey: "Programs can sign in with this key" is on.',
|
|
4651
|
+
},
|
|
4652
|
+
operator: {
|
|
4653
|
+
type: 'boolean',
|
|
4654
|
+
description: "operator: whether `did` is one of the platform's operators.",
|
|
4655
|
+
},
|
|
4656
|
+
},
|
|
4657
|
+
},
|
|
4658
|
+
},
|
|
4659
|
+
errors: [
|
|
4660
|
+
{
|
|
4661
|
+
name: 'BadSignature',
|
|
4662
|
+
},
|
|
4663
|
+
{
|
|
4664
|
+
name: 'InvalidRequest',
|
|
4665
|
+
},
|
|
4666
|
+
{
|
|
4667
|
+
name: 'UnknownAccount',
|
|
4668
|
+
},
|
|
4669
|
+
{
|
|
4670
|
+
name: 'RateLimitExceeded',
|
|
4671
|
+
},
|
|
4672
|
+
{
|
|
4673
|
+
name: 'Unavailable',
|
|
4674
|
+
description: "Try again (`redeemCode` and `newRecoveryCodes` also while the platform's identity keys are not loaded).",
|
|
4675
|
+
},
|
|
4676
|
+
{
|
|
4677
|
+
name: 'NotFound',
|
|
4678
|
+
description: 'No such method or pending change on the account.',
|
|
4679
|
+
},
|
|
4680
|
+
{
|
|
4681
|
+
name: 'NotYourMethod',
|
|
4682
|
+
description: "The step-up names a method that is not the account's.",
|
|
4683
|
+
},
|
|
4684
|
+
{
|
|
4685
|
+
name: 'LastMethod',
|
|
4686
|
+
description: 'It would leave no way to sign in.',
|
|
4687
|
+
},
|
|
4688
|
+
{
|
|
4689
|
+
name: 'RecoveryProtected',
|
|
4690
|
+
description: 'Only a recovery method can do this to a recovery method.',
|
|
4691
|
+
},
|
|
4692
|
+
{
|
|
4693
|
+
name: 'NeedsRecoveryMethod',
|
|
4694
|
+
description: 'Needs a fresh step-up of a recovery method.',
|
|
4695
|
+
},
|
|
4696
|
+
{
|
|
4697
|
+
name: 'StepUpRequired',
|
|
4698
|
+
description: "Needs a fresh step-up (an account's first recovery mark, `newRecoveryCodes`, `fold` and `link` included).",
|
|
4699
|
+
},
|
|
4700
|
+
{
|
|
4701
|
+
name: 'SameMethod',
|
|
4702
|
+
description: 'A method cannot freeze itself.',
|
|
4703
|
+
},
|
|
4704
|
+
{
|
|
4705
|
+
name: 'MethodFrozen',
|
|
4706
|
+
description: "The acting method is frozen (for `sendTo`: the method named is; for `addChannel`: the channel is, on whichever account, or the channel would be new to `did` while one of its methods is frozen; for `addExternal`, a first `newRecoveryCodes` set and `importBackupEmails`: one of `did`'s methods is frozen, and the message says so).",
|
|
4707
|
+
},
|
|
4708
|
+
{
|
|
4709
|
+
name: 'InvalidToken',
|
|
4710
|
+
description: 'fold / link: the offer is unknown, used, expired, for the other action, or not made to `did` on this hook.',
|
|
4711
|
+
},
|
|
4712
|
+
{
|
|
4713
|
+
name: 'ProtectedAccount',
|
|
4714
|
+
description: 'addChannel / fold / link: one of the two accounts has a recovery mark, a live freeze, a pending change, or a passkey, Nostr key or recovery codes; it is never folded or linked (HTTP 409).',
|
|
4715
|
+
},
|
|
4716
|
+
{
|
|
4717
|
+
name: 'NotEmpty',
|
|
4718
|
+
description: 'fold: the account to fold gained a record or is 7 days old or more; link instead (HTTP 409).',
|
|
4719
|
+
},
|
|
4720
|
+
{
|
|
4721
|
+
name: 'ProgramRefused',
|
|
4722
|
+
description: 'A program asked (`program`, or a step-up by a key with programs on): account security needs a person on a method no program holds.',
|
|
4723
|
+
},
|
|
4724
|
+
{
|
|
4725
|
+
name: 'ProgramsOn',
|
|
4726
|
+
description: 'mark: the key has programs on; turn that off first (HTTP 409).',
|
|
4727
|
+
},
|
|
4728
|
+
{
|
|
4729
|
+
name: 'IsRecovery',
|
|
4730
|
+
description: 'setPrograms on: the method is a recovery method, or its first mark is waiting (HTTP 409).',
|
|
4731
|
+
},
|
|
4732
|
+
],
|
|
4733
|
+
},
|
|
4734
|
+
stepUp: {
|
|
4735
|
+
type: 'object',
|
|
4736
|
+
description: "What the PDS's step-up proved.",
|
|
4737
|
+
required: ['method', 'provedAt'],
|
|
4738
|
+
properties: {
|
|
4739
|
+
method: {
|
|
4740
|
+
type: 'ref',
|
|
4741
|
+
ref: 'lex:pub.techne.draft.identity.manageMethods#provedMethod',
|
|
4742
|
+
},
|
|
4743
|
+
provedAt: {
|
|
4744
|
+
type: 'string',
|
|
4745
|
+
format: 'datetime',
|
|
4746
|
+
},
|
|
4747
|
+
},
|
|
4748
|
+
},
|
|
4749
|
+
external: {
|
|
4750
|
+
type: 'object',
|
|
4751
|
+
required: ['type', 'ref'],
|
|
4752
|
+
properties: {
|
|
4753
|
+
type: {
|
|
4754
|
+
type: 'string',
|
|
4755
|
+
knownValues: ['passkey', 'nostr'],
|
|
4756
|
+
},
|
|
4757
|
+
ref: {
|
|
4758
|
+
type: 'string',
|
|
4759
|
+
maxLength: 512,
|
|
4760
|
+
description: 'The passkey credential id, or the Nostr key (hex).',
|
|
4761
|
+
},
|
|
4762
|
+
label: {
|
|
4763
|
+
type: 'string',
|
|
4764
|
+
maxLength: 128,
|
|
4765
|
+
},
|
|
4766
|
+
},
|
|
4767
|
+
},
|
|
4768
|
+
notice: {
|
|
4769
|
+
type: 'object',
|
|
4770
|
+
required: ['id', 'did', 'event', 'to', 'createdAt'],
|
|
4771
|
+
properties: {
|
|
4772
|
+
id: {
|
|
4773
|
+
type: 'integer',
|
|
4774
|
+
},
|
|
4775
|
+
did: {
|
|
4776
|
+
type: 'string',
|
|
4777
|
+
format: 'did',
|
|
4778
|
+
},
|
|
4779
|
+
event: {
|
|
4780
|
+
type: 'string',
|
|
4781
|
+
knownValues: [
|
|
4782
|
+
'removeMethod',
|
|
4783
|
+
'deleteAccount',
|
|
4784
|
+
'markRecovery',
|
|
4785
|
+
'freeze',
|
|
4786
|
+
'waitDropped',
|
|
4787
|
+
'programsOn',
|
|
4788
|
+
],
|
|
4789
|
+
description: "What the notice is about: a change that started to wait (`removeMethod`, `deleteAccount`, `markRecovery`), a `freeze`, `waitDropped`: the change in `pending` was not completed because one of the account's methods was frozen during its wait, or `programsOn`: programs can now sign in with one of the account's Nostr keys (`setPrograms` on; no `pending`).",
|
|
4790
|
+
},
|
|
4791
|
+
to: {
|
|
4792
|
+
type: 'ref',
|
|
4793
|
+
ref: 'lex:pub.techne.draft.identity.manageMethods#noticeTo',
|
|
4794
|
+
},
|
|
4795
|
+
pending: {
|
|
4796
|
+
type: 'ref',
|
|
4797
|
+
ref: 'lex:pub.techne.draft.identity.defs#pendingChange',
|
|
4798
|
+
},
|
|
4799
|
+
createdAt: {
|
|
4800
|
+
type: 'string',
|
|
4801
|
+
format: 'datetime',
|
|
4802
|
+
},
|
|
4803
|
+
},
|
|
4804
|
+
},
|
|
4805
|
+
provedMethod: {
|
|
4806
|
+
type: 'object',
|
|
4807
|
+
required: ['type'],
|
|
4808
|
+
properties: {
|
|
4809
|
+
type: {
|
|
4810
|
+
type: 'string',
|
|
4811
|
+
knownValues: [
|
|
4812
|
+
'email',
|
|
4813
|
+
'phone',
|
|
4814
|
+
'passkey',
|
|
4815
|
+
'nostr',
|
|
4816
|
+
'recoveryCodes',
|
|
4817
|
+
],
|
|
4818
|
+
},
|
|
4819
|
+
value: {
|
|
4820
|
+
type: 'string',
|
|
4821
|
+
maxLength: 512,
|
|
4822
|
+
description: 'The email or E.164 phone, the passkey credential id, or the Nostr key (hex). None for recoveryCodes.',
|
|
4823
|
+
},
|
|
4824
|
+
},
|
|
4825
|
+
},
|
|
4826
|
+
noticeTo: {
|
|
4827
|
+
type: 'object',
|
|
4828
|
+
required: ['type', 'value'],
|
|
4829
|
+
properties: {
|
|
4830
|
+
type: {
|
|
4831
|
+
type: 'string',
|
|
4832
|
+
knownValues: ['email', 'phone', 'nostr'],
|
|
4833
|
+
},
|
|
4834
|
+
value: {
|
|
4835
|
+
type: 'string',
|
|
4836
|
+
},
|
|
4837
|
+
},
|
|
4838
|
+
},
|
|
4839
|
+
signInMethod: {
|
|
4840
|
+
type: 'object',
|
|
4841
|
+
description: 'One way to sign in, as a page may show it before anyone has signed in: an email as `***a@***e.***m` (the last character of each dot-separated part), a phone as `•••• 97` (its last two digits), a passkey or Nostr key by its label.',
|
|
4842
|
+
required: ['id', 'type', 'display'],
|
|
4843
|
+
properties: {
|
|
4844
|
+
id: {
|
|
4845
|
+
type: 'string',
|
|
4846
|
+
description: "The method id (for `sendTo`, and the PDS's own passkey or Nostr challenge).",
|
|
4847
|
+
},
|
|
4848
|
+
type: {
|
|
4849
|
+
type: 'string',
|
|
4850
|
+
knownValues: ['email', 'phone', 'passkey', 'nostr'],
|
|
4851
|
+
},
|
|
4852
|
+
display: {
|
|
4853
|
+
type: 'string',
|
|
4854
|
+
},
|
|
4855
|
+
},
|
|
4856
|
+
},
|
|
4857
|
+
importedEmail: {
|
|
4858
|
+
type: 'object',
|
|
4859
|
+
required: ['email', 'status'],
|
|
4860
|
+
properties: {
|
|
4861
|
+
email: {
|
|
4862
|
+
type: 'string',
|
|
4863
|
+
},
|
|
4864
|
+
status: {
|
|
4865
|
+
type: 'string',
|
|
4866
|
+
knownValues: [
|
|
4867
|
+
'marked',
|
|
4868
|
+
'boundElsewhere',
|
|
4869
|
+
'released',
|
|
4870
|
+
'invalid',
|
|
4871
|
+
'afterCutoff',
|
|
4872
|
+
],
|
|
4873
|
+
description: '`marked`: an email method of the account now, marked for recovery. `boundElsewhere`: on another account, left there. `released`: the account removed it; only adding it again binds it back. `invalid`: not an email address. `afterCutoff`: verified at or after 2026-11-13T00:00:00Z, not imported (add it and mark it under the rules).',
|
|
4874
|
+
},
|
|
4875
|
+
},
|
|
4876
|
+
description: 'One address importBackupEmails was sent, with what happened to it.',
|
|
4877
|
+
},
|
|
4878
|
+
backupEmail: {
|
|
4879
|
+
type: 'object',
|
|
4880
|
+
description: 'One backup email importBackupEmails moves, with when the PDS verified it.',
|
|
4881
|
+
required: ['email', 'verifiedAt'],
|
|
4882
|
+
properties: {
|
|
4883
|
+
email: {
|
|
4884
|
+
type: 'string',
|
|
4885
|
+
maxLength: 320,
|
|
4886
|
+
},
|
|
4887
|
+
verifiedAt: {
|
|
4888
|
+
type: 'string',
|
|
4889
|
+
format: 'datetime',
|
|
4890
|
+
description: 'When the PDS verified the address. Only one verified before 2026-11-13T00:00:00Z is imported.',
|
|
4891
|
+
},
|
|
4892
|
+
},
|
|
4893
|
+
},
|
|
4894
|
+
dueDelete: {
|
|
4895
|
+
type: 'object',
|
|
4896
|
+
description: 'An account whose scheduled deletion ran on the platform: the PDS deletes its PDS account, then confirms (`dueDeletesDone`). An account already gone from the PDS counts as deleted.',
|
|
4897
|
+
required: ['did', 'deletedAt'],
|
|
4898
|
+
properties: {
|
|
4899
|
+
did: {
|
|
4900
|
+
type: 'string',
|
|
4901
|
+
format: 'did',
|
|
4902
|
+
},
|
|
4903
|
+
deletedAt: {
|
|
4904
|
+
type: 'string',
|
|
4905
|
+
format: 'datetime',
|
|
4906
|
+
description: 'When the platform deleted its side.',
|
|
4907
|
+
},
|
|
4908
|
+
},
|
|
4909
|
+
},
|
|
4910
|
+
},
|
|
4911
|
+
},
|
|
4912
|
+
PubTechneDraftIdentityOpenAccountPage: {
|
|
4913
|
+
lexicon: 1,
|
|
4914
|
+
id: 'pub.techne.draft.identity.openAccountPage',
|
|
4915
|
+
defs: {
|
|
4916
|
+
main: {
|
|
4917
|
+
type: 'procedure',
|
|
4918
|
+
description: "A link that opens the caller's account page on their PDS already signed in, for an app to open in the system browser. The link works once, until `expiresAt` (60 seconds today). It signs in to view the page only: changing a sign-in method or deleting the account there still asks for a code or a passkey. Signed-in members only, from a browser or device session: any other bearer token (an agent token, an app's OAuth token, a program's token) is refused.",
|
|
4919
|
+
output: {
|
|
4920
|
+
encoding: 'application/json',
|
|
4921
|
+
schema: {
|
|
4922
|
+
type: 'object',
|
|
4923
|
+
required: ['url', 'expiresAt'],
|
|
4924
|
+
properties: {
|
|
4925
|
+
url: {
|
|
4926
|
+
type: 'string',
|
|
4927
|
+
format: 'uri',
|
|
4928
|
+
maxLength: 2048,
|
|
4929
|
+
description: 'Open it once, before expiresAt.',
|
|
4930
|
+
},
|
|
4931
|
+
expiresAt: {
|
|
4932
|
+
type: 'string',
|
|
4933
|
+
format: 'datetime',
|
|
4934
|
+
},
|
|
4935
|
+
},
|
|
4936
|
+
},
|
|
4937
|
+
},
|
|
4938
|
+
errors: [
|
|
4939
|
+
{
|
|
4940
|
+
name: 'AuthenticationRequired',
|
|
4941
|
+
description: 'No signed-in caller.',
|
|
4942
|
+
},
|
|
4943
|
+
{
|
|
4944
|
+
name: 'NotAuthorized',
|
|
4945
|
+
description: "The caller's bearer token is neither a device session nor an agent token, such as an app's OAuth token (HTTP 403).",
|
|
4946
|
+
},
|
|
4947
|
+
{
|
|
4948
|
+
name: 'ProgramRefused',
|
|
4949
|
+
description: "The caller is an agent token or a program's token: neither opens the account page (HTTP 403).",
|
|
4950
|
+
},
|
|
4951
|
+
{
|
|
4952
|
+
name: 'NotFound',
|
|
4953
|
+
description: 'This server has no account page for the caller: its PDS is not ours, or none is set up (HTTP 404). Open the account page without a link.',
|
|
4954
|
+
},
|
|
4955
|
+
{
|
|
4956
|
+
name: 'RateLimitExceeded',
|
|
4957
|
+
description: 'Too many links for this account (HTTP 429).',
|
|
4958
|
+
},
|
|
4959
|
+
{
|
|
4960
|
+
name: 'Unavailable',
|
|
4961
|
+
description: 'The PDS did not answer (HTTP 502). Open the account page without a link.',
|
|
4962
|
+
},
|
|
4963
|
+
],
|
|
4964
|
+
},
|
|
4965
|
+
},
|
|
4966
|
+
},
|
|
4250
4967
|
PubTechneDraftIdentityRedeemLinkToken: {
|
|
4251
4968
|
lexicon: 1,
|
|
4252
4969
|
id: 'pub.techne.draft.identity.redeemLinkToken',
|
|
@@ -4514,6 +5231,15 @@ export const schemaDict = {
|
|
|
4514
5231
|
format: 'did',
|
|
4515
5232
|
description: "Present only with `released`, and only when the calling PDS hosts the account that removed the number: that account's DID. A PDS that keeps an account per phone number (a placeholder) uses it to tell two placeholders apart: the old account's, which must not sign in with this number again, and the one it started for the number's new holder after the removal, which it finds by this DID and `releaseId` and signs in until the number is bound to it. Binding the number back to this account through identity.attest is refused (`ChannelReleased`).",
|
|
4516
5233
|
},
|
|
5234
|
+
frozen: {
|
|
5235
|
+
type: 'boolean',
|
|
5236
|
+
description: "Present (true) only with `did`: this method of the account is frozen (identity.manageMethods `freeze`). The PDS refuses the sign-in and creates nothing; the account's other methods still sign in.",
|
|
5237
|
+
},
|
|
5238
|
+
frozenUntil: {
|
|
5239
|
+
type: 'string',
|
|
5240
|
+
format: 'datetime',
|
|
5241
|
+
description: 'Present only with `frozen`: when the freeze ends, unless a recovery method lifts it sooner.',
|
|
5242
|
+
},
|
|
4517
5243
|
releaseId: {
|
|
4518
5244
|
type: 'string',
|
|
4519
5245
|
minLength: 1,
|
|
@@ -4645,7 +5371,7 @@ export const schemaDict = {
|
|
|
4645
5371
|
defs: {
|
|
4646
5372
|
main: {
|
|
4647
5373
|
type: 'procedure',
|
|
4648
|
-
description: "Remove a sign-in method from the caller's account: its credential is revoked (`unlinked`), the channel stops signing in to this account, and its attested pub.techne.draft.contactChannel is deleted. Its next sign-in is treated as new. A removed phone number is marked released: identity.resolve answers `unbound` with `released` and `releasedFrom` (this account) until someone binds it, so a PDS never signs it in to this account again through a placeholder it kept, and identity.attest refuses binding it back here (`ChannelReleased`); only adding it again (identity.finishAddMethod) does. Refused for the account's last method.",
|
|
5374
|
+
description: "Remove a sign-in method from the caller's account, by the sign-in method rules (identity.manageMethods): this method carries no step-up, so the removal always waits 7 days with notice to every method and any of them can cancel it (`status: pending`, `pending`); a recovery method is not removed this way (`RecoveryProtected`), and the last way to sign in never is. When it completes: its credential is revoked (`unlinked`), the channel stops signing in to this account, and its attested pub.techne.draft.contactChannel is deleted. Its next sign-in is treated as new. A removed phone number is marked released: identity.resolve answers `unbound` with `released` and `releasedFrom` (this account) until someone binds it, so a PDS never signs it in to this account again through a placeholder it kept, and identity.attest refuses binding it back here (`ChannelReleased`); only adding it again (identity.finishAddMethod) does. Refused for the account's last method.",
|
|
4649
5375
|
input: {
|
|
4650
5376
|
encoding: 'application/json',
|
|
4651
5377
|
schema: {
|
|
@@ -4668,6 +5394,14 @@ export const schemaDict = {
|
|
|
4668
5394
|
ok: {
|
|
4669
5395
|
type: 'boolean',
|
|
4670
5396
|
},
|
|
5397
|
+
status: {
|
|
5398
|
+
type: 'string',
|
|
5399
|
+
knownValues: ['pending'],
|
|
5400
|
+
},
|
|
5401
|
+
pending: {
|
|
5402
|
+
type: 'ref',
|
|
5403
|
+
ref: 'lex:pub.techne.draft.identity.defs#pendingChange',
|
|
5404
|
+
},
|
|
4671
5405
|
},
|
|
4672
5406
|
},
|
|
4673
5407
|
},
|
|
@@ -4682,7 +5416,11 @@ export const schemaDict = {
|
|
|
4682
5416
|
},
|
|
4683
5417
|
{
|
|
4684
5418
|
name: 'LastMethod',
|
|
4685
|
-
description: "It is the account's only sign-in method.",
|
|
5419
|
+
description: "It is the account's only sign-in method (counting those already waiting to be removed).",
|
|
5420
|
+
},
|
|
5421
|
+
{
|
|
5422
|
+
name: 'RecoveryProtected',
|
|
5423
|
+
description: 'It is a recovery method; only a recovery method removes it (identity.manageMethods).',
|
|
4686
5424
|
},
|
|
4687
5425
|
],
|
|
4688
5426
|
},
|
|
@@ -5734,11 +6472,11 @@ export const schemaDict = {
|
|
|
5734
6472
|
PubTechneDraftPermissionedPutRecords: {
|
|
5735
6473
|
lexicon: 1,
|
|
5736
6474
|
id: 'pub.techne.draft.permissioned.putRecords',
|
|
5737
|
-
description: "Write up to 200 records into the caller's own repo in one call: each write is applied in order, exactly as putRecord applies it (the same admission, receipts, no-op re-put and swapCid), each in its own transaction. NOT atomic: a write that is refused does not undo the writes before it or stop the ones after it, and each write's result says what happened to it. That is why this is not called applyWrites: atproto's com.atproto.repo.applyWrites commits all of its writes or none, and this does not (each write keeps putRecord's own per-record locking, so a batch never holds more than one record's locks). The caller authenticates with its own credential: a session from any sign-in lane (OAuth included), or an atproto service-auth JWT (iss = the caller, aud = the AppView's service DID, lxm = this method). repo must be the caller, or a collective or circle the platform holds the credential of whose own member space (`space.collective.member/self`) the caller manages (that space's manage leg alone hands over the authority's pen; managing another of its spaces does not); in a circle (a collective whose descriptor names a circle type) a caller holding only that space's write leg (role 20-29) holds the pen for pub.techne.draft.membership writes alone: an add (a new claim at a key that holds none now, not ending, whose addedBy is the caller or absent) or the caller's own claim (its leave, or a re-put keeping its subject and addedBy); anything else as the circle is Forbidden, or a collective the caller made that has nothing placed yet (for at most a day), else Forbidden and nothing is written. A write refused for itself (a malformed or invalid record, a swapCid that does not match, a conflict) is reported in its result as the error putRecord would have answered, and the next write is applied. A refusal that holds for the whole call stops it with that error, and no later write is applied: the caller's account is being deleted, or is deleted (AccountDeleting; what it wrote goes with the account), or a failure inside the AppView (HTTP 500; the writes applied before it stay written, so read them back or send the batch again: writing the current version again for the same space is a no-op). Callers should treat a failed batch as all-or-nothing and send it again whole: re-putting the records that landed is a no-op (in an app's space only for its app or under `space:` scopes covering it; anyone else's re-put there is Forbidden), and at the move to atproto's permissioned data this method becomes the owner's own PDS com.atproto.repo.applyWrites, which is atomic. One call spends one of the caller's writes (RateLimitExceeded), whatever the number of writes it carries. A request body that is not this method's input is refused as InvalidRequest, with an XRPC error body ({\"error\":\"InvalidRequest\",\"message\":...}): HTTP 413 for a body over 8 MiB (8,388,608 bytes; it is not read past that); 415 for one not sent as application/json; 400 for one that is not JSON or carries no writes or more than 200; 422 for JSON that is not the input (a field missing or of the wrong type). Such a refused call still spends one of the caller's writes. Each write is checked against the token's space scopes as putRecord checks it, and a write that replaces a record already written for an app's space (a pub.techne.draft.space.private space) by a caller that is neither the app its key names nor holds `space:` scopes covering a put there is refused as putRecord refuses it; either refusal is that write's result (Forbidden), and the next write is applied. A first write is never refused for its space. `space` is required: a write that names no space is refused as InvalidRequest (HTTP 400; for putRecords the whole call, and nothing is written), since public records are written with com.atproto.repo.putRecord and a record only the caller reads goes in its own pub.techne.draft.space.personal. Records written before this rule with no space stay stored and readable by their writer. Draft tier.",
|
|
6475
|
+
description: "Write up to 200 records into the caller's own repo in one call: each write is applied in order, exactly as putRecord applies it (the same admission, receipts, no-op re-put and swapCid), each in its own transaction. NOT atomic: a write that is refused does not undo the writes before it or stop the ones after it, and each write's result says what happened to it. That is why this is not called applyWrites: atproto's com.atproto.repo.applyWrites commits all of its writes or none, and this does not (each write keeps putRecord's own per-record locking, so a batch never holds more than one record's locks). The caller authenticates with its own credential: a session from any sign-in lane (OAuth included), or an atproto service-auth JWT (iss = the caller, aud = the AppView's service DID, lxm = this method). repo must be the caller, or a collective or circle the platform holds the credential of whose own member space (`space.collective.member/self`) the caller manages (that space's manage leg alone hands over the authority's pen; managing another of its spaces does not); in a circle (a collective whose descriptor names a circle type) a caller holding only that space's write leg (role 20-29) holds the pen for pub.techne.draft.membership writes alone: an add (a new claim at a key that holds none now, not ending, whose addedBy is the caller or absent) or the caller's own claim (its leave, or a re-put keeping its subject and addedBy); anything else as the circle is Forbidden, or a collective the caller made that has nothing placed yet (for at most a day), else Forbidden and nothing is written. A write refused for itself (a malformed or invalid record, a swapCid that does not match, a conflict) is reported in its result as the error putRecord would have answered, and the next write is applied, except in a roster batch: one with any pub.techne.draft.membership write, in whatever repo. A roster batch of more than one write is first checked whole, and a write in it that putRecord would refuse before reading anything (malformed, over 2 MiB, failing its lexicon, or naming a space it cannot be written into) refuses the call as InvalidRequest (HTTP 400) with nothing written; it then stops at its first refused write, and every write after that one is reported as Conflict and not written. Since any prefix of a roster batch may be what is left written, a batch written as a circle that has a manager must keep one after every prefix of its membership writes (see LastManager), not only after the whole batch: to make someone else manager, put their membership at role 30 or above before the caller's own lower one. A refusal that holds for the whole call stops it with that error, and no later write is applied: the caller's account is being deleted, or is deleted (AccountDeleting; what it wrote goes with the account), or a failure inside the AppView (HTTP 500; the writes applied before it stay written, so read them back or send the batch again: writing the current version again for the same space is a no-op). Callers should treat a failed batch as all-or-nothing and send it again whole: re-putting the records that landed is a no-op (in an app's space only for its app or under `space:` scopes covering it; anyone else's re-put there is Forbidden), and at the move to atproto's permissioned data this method becomes the owner's own PDS com.atproto.repo.applyWrites, which is atomic. One call spends one of the caller's writes (RateLimitExceeded), whatever the number of writes it carries. A request body that is not this method's input is refused as InvalidRequest, with an XRPC error body ({\"error\":\"InvalidRequest\",\"message\":...}): HTTP 413 for a body over 8 MiB (8,388,608 bytes; it is not read past that); 415 for one not sent as application/json; 400 for one that is not JSON or carries no writes or more than 200; 422 for JSON that is not the input (a field missing or of the wrong type). Such a refused call still spends one of the caller's writes. Each write is checked against the token's space scopes as putRecord checks it, and a write that replaces a record already written for an app's space (a pub.techne.draft.space.private space) by a caller that is neither the app its key names nor holds `space:` scopes covering a put there is refused as putRecord refuses it; either refusal is that write's result (Forbidden), and the next write is applied (in a roster batch, the writes after it are Conflict, not written). A first write is never refused for its space. `space` is required: a write that names no space is refused as InvalidRequest (HTTP 400; for putRecords the whole call, and nothing is written), since public records are written with com.atproto.repo.putRecord and a record only the caller reads goes in its own pub.techne.draft.space.personal. Records written before this rule with no space stay stored and readable by their writer. Draft tier.",
|
|
5738
6476
|
defs: {
|
|
5739
6477
|
main: {
|
|
5740
6478
|
type: 'procedure',
|
|
5741
|
-
description: "Up to 200 putRecord writes, applied in order, each in its own transaction, for one write of your rate. Not atomic: each write's result says what happened to it, and a write refused for itself does not stop the others (AccountDeleting or an HTTP 500 stops the rest). Send a failed batch again whole: re-putting what landed is a no-op (in an app's space, only for its app or under covering scopes). Space scopes and space.private apply to each write as in putRecord: a first write is never refused for its space, but replacing a record already written for an app's space needs the app its key names or `space:` scopes covering it, and that write's result is Forbidden. Every write names its `space` (a write with none refuses the whole call, InvalidRequest; public records go through com.atproto.repo.putRecord). Draft tier.",
|
|
6479
|
+
description: "Up to 200 putRecord writes, applied in order, each in its own transaction, for one write of your rate. Not atomic: each write's result says what happened to it, and a write refused for itself does not stop the others (AccountDeleting or an HTTP 500 stops the rest), except in a roster batch (one with any pub.techne.draft.membership write), which stops at its first refused write and reports each later one as Conflict, not written; as a circle, every prefix of its membership writes must keep the circle a manager. Send a failed batch again whole: re-putting what landed is a no-op (in an app's space, only for its app or under covering scopes). Space scopes and space.private apply to each write as in putRecord: a first write is never refused for its space, but replacing a record already written for an app's space needs the app its key names or `space:` scopes covering it, and that write's result is Forbidden. Every write names its `space` (a write with none refuses the whole call, InvalidRequest; public records go through com.atproto.repo.putRecord). Draft tier.",
|
|
5742
6480
|
input: {
|
|
5743
6481
|
encoding: 'application/json',
|
|
5744
6482
|
schema: {
|
|
@@ -5795,7 +6533,7 @@ export const schemaDict = {
|
|
|
5795
6533
|
},
|
|
5796
6534
|
{
|
|
5797
6535
|
name: 'LastManager',
|
|
5798
|
-
description: 'HTTP 409. The write, as a circle, would leave it with members and nobody at role >= 30. Make someone else manager first. Nothing is written.',
|
|
6536
|
+
description: 'HTTP 409. The write, as a circle, would leave it with members and nobody at role >= 30, after the whole batch or after any prefix of its membership writes (a roster batch stops at its first refused write, so any prefix may be what is left written). Make someone else manager first. Nothing is written.',
|
|
5799
6537
|
},
|
|
5800
6538
|
{
|
|
5801
6539
|
name: 'AccountDeleting',
|
|
@@ -5882,13 +6620,15 @@ export const schemaDict = {
|
|
|
5882
6620
|
properties: {
|
|
5883
6621
|
error: {
|
|
5884
6622
|
type: 'string',
|
|
5885
|
-
description: "InvalidRequest (malformed, a body that fails its collection's published lexicon, or a record over 2 MiB, more than a putRecord body may be), InvalidSwap (swapCid did not match the current version), Conflict (the same key holds a public record in the caller's repo, or a concurrent write replaced this version before it was recorded), IdentityConflict (the write would change a contact's identity, which writing again never fixes; see putRecord), DuplicatePhone (a contact write introduces a number another of the caller's active contacts carries; see putRecord) or Forbidden (the call's `space:` scopes do not cover the write, or it replaces a record already written for an app's space and the caller is neither the app its key names nor holds `space:` scopes covering it; see putRecord).",
|
|
6623
|
+
description: "InvalidRequest (malformed, a body that fails its collection's published lexicon, or a record over 2 MiB, more than a putRecord body may be), InvalidSwap (swapCid did not match the current version), Conflict (the same key holds a public record in the caller's repo, or a concurrent write replaced this version before it was recorded), IdentityConflict (the write would change a contact's identity, which writing again never fixes; see putRecord), DuplicatePhone (a contact write introduces a number another of the caller's active contacts carries; see putRecord), RateLimitExceeded (a contact write that binds a number to an account found the caller's phone lookups spent; retry it in a minute) or Forbidden (the call's `space:` scopes do not cover the write, or it replaces a record already written for an app's space and the caller is neither the app its key names nor holds `space:` scopes covering it; see putRecord).",
|
|
5886
6624
|
knownValues: [
|
|
5887
6625
|
'InvalidRequest',
|
|
5888
6626
|
'InvalidSwap',
|
|
5889
6627
|
'Conflict',
|
|
5890
6628
|
'IdentityConflict',
|
|
5891
6629
|
'DuplicatePhone',
|
|
6630
|
+
'RateLimitExceeded',
|
|
6631
|
+
'Forbidden',
|
|
5892
6632
|
],
|
|
5893
6633
|
},
|
|
5894
6634
|
message: {
|
|
@@ -7649,7 +8389,7 @@ export const schemaDict = {
|
|
|
7649
8389
|
defs: {
|
|
7650
8390
|
main: {
|
|
7651
8391
|
type: 'procedure',
|
|
7652
|
-
description: "Operator only. Stop indexing one author's records of a community or requested type, and remove the ones this platform indexed. The block outlives the author's account here, so neither the firehose nor a backfill brings the records back. Other authors' records of the type are untouched. The records stay in the author's repo; this platform stops serving them.",
|
|
8392
|
+
description: "Operator only, with the moderate scope. Stop indexing one author's records of a community or requested type, and remove the ones this platform indexed. The block outlives the author's account here, so neither the firehose nor a backfill brings the records back. Other authors' records of the type are untouched. The records stay in the author's repo; this platform stops serving them.",
|
|
7653
8393
|
input: {
|
|
7654
8394
|
encoding: 'application/json',
|
|
7655
8395
|
schema: {
|
|
@@ -7708,13 +8448,21 @@ export const schemaDict = {
|
|
|
7708
8448
|
description: 'Blocking is a signed-in act.',
|
|
7709
8449
|
},
|
|
7710
8450
|
{
|
|
7711
|
-
name: '
|
|
7712
|
-
description: 'The caller is not an operator of this platform.',
|
|
8451
|
+
name: 'NotAuthorized',
|
|
8452
|
+
description: 'The caller is not an operator of this platform, or the call does not carry the moderate scope (HTTP 403).',
|
|
8453
|
+
},
|
|
8454
|
+
{
|
|
8455
|
+
name: 'ProgramRefused',
|
|
8456
|
+
description: "The caller is a program's token: a program never reaches an operator method (HTTP 403).",
|
|
7713
8457
|
},
|
|
7714
8458
|
{
|
|
7715
8459
|
name: 'UnknownType',
|
|
7716
8460
|
description: '`nsid` names no community or requested type (our own types are not limited).',
|
|
7717
8461
|
},
|
|
8462
|
+
{
|
|
8463
|
+
name: 'InvalidRequest',
|
|
8464
|
+
description: '`reason` is blank or over 1000 characters, or `author` is not a DID (HTTP 400).',
|
|
8465
|
+
},
|
|
7718
8466
|
],
|
|
7719
8467
|
},
|
|
7720
8468
|
},
|
|
@@ -8334,7 +9082,7 @@ export const schemaDict = {
|
|
|
8334
9082
|
defs: {
|
|
8335
9083
|
main: {
|
|
8336
9084
|
type: 'procedure',
|
|
8337
|
-
description: "Operator only. Stop indexing a community or requested type and remove every record of it this platform indexed. The type is marked blocked (it is no longer loaded, searched or listed, except in listTypes filtered to its creator (`creator`) and in getType, which still answer it as blocked) and put on the block list, so neither the firehose nor a backfill brings its records back. The records stay in their authors' repos; this platform stops serving them. Our own platform types cannot be purged.",
|
|
9085
|
+
description: "Operator only, with the moderate scope. Stop indexing a community or requested type and remove every record of it this platform indexed. The type is marked blocked (it is no longer loaded, searched or listed, except in listTypes filtered to its creator (`creator`) and in getType, which still answer it as blocked) and put on the block list, so neither the firehose nor a backfill brings its records back. The records stay in their authors' repos; this platform stops serving them. Our own platform types cannot be purged.",
|
|
8338
9086
|
input: {
|
|
8339
9087
|
encoding: 'application/json',
|
|
8340
9088
|
schema: {
|
|
@@ -8384,13 +9132,21 @@ export const schemaDict = {
|
|
|
8384
9132
|
description: 'Purging is a signed-in act.',
|
|
8385
9133
|
},
|
|
8386
9134
|
{
|
|
8387
|
-
name: '
|
|
8388
|
-
description: 'The caller is not an operator of this platform.',
|
|
9135
|
+
name: 'NotAuthorized',
|
|
9136
|
+
description: 'The caller is not an operator of this platform, or the call does not carry the moderate scope (HTTP 403).',
|
|
9137
|
+
},
|
|
9138
|
+
{
|
|
9139
|
+
name: 'ProgramRefused',
|
|
9140
|
+
description: "The caller is a program's token: a program never reaches an operator method (HTTP 403).",
|
|
8389
9141
|
},
|
|
8390
9142
|
{
|
|
8391
9143
|
name: 'UnknownType',
|
|
8392
9144
|
description: '`nsid` names no community or requested type (our own types cannot be purged).',
|
|
8393
9145
|
},
|
|
9146
|
+
{
|
|
9147
|
+
name: 'InvalidRequest',
|
|
9148
|
+
description: '`reason` is blank or over 1000 characters (HTTP 400).',
|
|
9149
|
+
},
|
|
8394
9150
|
],
|
|
8395
9151
|
},
|
|
8396
9152
|
},
|
|
@@ -10579,6 +11335,7 @@ export const ids = {
|
|
|
10579
11335
|
PubTechneDraftIdentityAccountsForPhones: 'pub.techne.draft.identity.accountsForPhones',
|
|
10580
11336
|
PubTechneDraftIdentityAttest: 'pub.techne.draft.identity.attest',
|
|
10581
11337
|
PubTechneDraftIdentityBeginAddMethod: 'pub.techne.draft.identity.beginAddMethod',
|
|
11338
|
+
PubTechneDraftIdentityCancelPendingChange: 'pub.techne.draft.identity.cancelPendingChange',
|
|
10582
11339
|
PubTechneDraftIdentityCheckLinkToken: 'pub.techne.draft.identity.checkLinkToken',
|
|
10583
11340
|
PubTechneDraftIdentityCreateCollective: 'pub.techne.draft.identity.createCollective',
|
|
10584
11341
|
PubTechneDraftIdentityCreateLinkToken: 'pub.techne.draft.identity.createLinkToken',
|
|
@@ -10593,6 +11350,8 @@ export const ids = {
|
|
|
10593
11350
|
PubTechneDraftIdentityListLinkTokens: 'pub.techne.draft.identity.listLinkTokens',
|
|
10594
11351
|
PubTechneDraftIdentityListMethods: 'pub.techne.draft.identity.listMethods',
|
|
10595
11352
|
PubTechneDraftIdentityListPhoneHolds: 'pub.techne.draft.identity.listPhoneHolds',
|
|
11353
|
+
PubTechneDraftIdentityManageMethods: 'pub.techne.draft.identity.manageMethods',
|
|
11354
|
+
PubTechneDraftIdentityOpenAccountPage: 'pub.techne.draft.identity.openAccountPage',
|
|
10596
11355
|
PubTechneDraftIdentityRedeemLinkToken: 'pub.techne.draft.identity.redeemLinkToken',
|
|
10597
11356
|
PubTechneDraftIdentityReleasePhoneHold: 'pub.techne.draft.identity.releasePhoneHold',
|
|
10598
11357
|
PubTechneDraftIdentityResetLinkToken: 'pub.techne.draft.identity.resetLinkToken',
|