@atproto/pds 0.4.28 → 0.4.30
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +16 -0
- package/dist/account-manager/helpers/account.d.ts +20 -1
- package/dist/account-manager/helpers/account.d.ts.map +1 -1
- package/dist/account-manager/helpers/account.js +32 -7
- package/dist/account-manager/helpers/account.js.map +1 -1
- package/dist/account-manager/index.d.ts +7 -2
- package/dist/account-manager/index.d.ts.map +1 -1
- package/dist/account-manager/index.js +24 -8
- package/dist/account-manager/index.js.map +1 -1
- package/dist/api/app/bsky/actor/getPreferences.js +1 -1
- package/dist/api/app/bsky/actor/getPreferences.js.map +1 -1
- package/dist/api/app/bsky/actor/getProfile.js +1 -1
- package/dist/api/app/bsky/actor/getProfile.js.map +1 -1
- package/dist/api/app/bsky/actor/getProfiles.js +1 -1
- package/dist/api/app/bsky/actor/getProfiles.js.map +1 -1
- package/dist/api/app/bsky/actor/putPreferences.js +1 -1
- package/dist/api/app/bsky/actor/putPreferences.js.map +1 -1
- package/dist/api/app/bsky/feed/getActorLikes.js +1 -1
- package/dist/api/app/bsky/feed/getActorLikes.js.map +1 -1
- package/dist/api/app/bsky/feed/getAuthorFeed.js +1 -1
- package/dist/api/app/bsky/feed/getAuthorFeed.js.map +1 -1
- package/dist/api/app/bsky/feed/getFeed.js +1 -1
- package/dist/api/app/bsky/feed/getFeed.js.map +1 -1
- package/dist/api/app/bsky/feed/getPostThread.js +1 -1
- package/dist/api/app/bsky/feed/getPostThread.js.map +1 -1
- package/dist/api/app/bsky/feed/getTimeline.js +1 -1
- package/dist/api/app/bsky/feed/getTimeline.js.map +1 -1
- package/dist/api/app/bsky/notification/registerPush.d.ts.map +1 -1
- package/dist/api/app/bsky/notification/registerPush.js +4 -1
- package/dist/api/app/bsky/notification/registerPush.js.map +1 -1
- package/dist/api/chat/index.js +14 -14
- package/dist/api/chat/index.js.map +1 -1
- package/dist/api/com/atproto/admin/deleteAccount.d.ts.map +1 -1
- package/dist/api/com/atproto/admin/deleteAccount.js +4 -2
- package/dist/api/com/atproto/admin/deleteAccount.js.map +1 -1
- package/dist/api/com/atproto/admin/getAccountInfo.d.ts.map +1 -1
- package/dist/api/com/atproto/admin/getAccountInfo.js +1 -0
- package/dist/api/com/atproto/admin/getAccountInfo.js.map +1 -1
- package/dist/api/com/atproto/admin/getSubjectStatus.d.ts.map +1 -1
- package/dist/api/com/atproto/admin/getSubjectStatus.js +4 -3
- package/dist/api/com/atproto/admin/getSubjectStatus.js.map +1 -1
- package/dist/api/com/atproto/admin/updateAccountHandle.js +1 -1
- package/dist/api/com/atproto/admin/updateAccountHandle.js.map +1 -1
- package/dist/api/com/atproto/admin/updateSubjectStatus.d.ts.map +1 -1
- package/dist/api/com/atproto/admin/updateSubjectStatus.js +2 -0
- package/dist/api/com/atproto/admin/updateSubjectStatus.js.map +1 -1
- package/dist/api/com/atproto/identity/getRecommendedDidCredentials.js +1 -1
- package/dist/api/com/atproto/identity/getRecommendedDidCredentials.js.map +1 -1
- package/dist/api/com/atproto/identity/requestPlcOperationSignature.js +1 -1
- package/dist/api/com/atproto/identity/requestPlcOperationSignature.js.map +1 -1
- package/dist/api/com/atproto/identity/signPlcOperation.js +1 -1
- package/dist/api/com/atproto/identity/signPlcOperation.js.map +1 -1
- package/dist/api/com/atproto/identity/submitPlcOperation.d.ts.map +1 -1
- package/dist/api/com/atproto/identity/submitPlcOperation.js +1 -1
- package/dist/api/com/atproto/identity/submitPlcOperation.js.map +1 -1
- package/dist/api/com/atproto/identity/updateHandle.js +2 -2
- package/dist/api/com/atproto/identity/updateHandle.js.map +1 -1
- package/dist/api/com/atproto/repo/applyWrites.d.ts.map +1 -1
- package/dist/api/com/atproto/repo/applyWrites.js +4 -1
- package/dist/api/com/atproto/repo/applyWrites.js.map +1 -1
- package/dist/api/com/atproto/repo/createRecord.d.ts.map +1 -1
- package/dist/api/com/atproto/repo/createRecord.js +4 -1
- package/dist/api/com/atproto/repo/createRecord.js.map +1 -1
- package/dist/api/com/atproto/repo/deleteRecord.d.ts.map +1 -1
- package/dist/api/com/atproto/repo/deleteRecord.js +4 -1
- package/dist/api/com/atproto/repo/deleteRecord.js.map +1 -1
- package/dist/api/com/atproto/repo/describeRepo.d.ts.map +1 -1
- package/dist/api/com/atproto/repo/describeRepo.js +2 -4
- package/dist/api/com/atproto/repo/describeRepo.js.map +1 -1
- package/dist/api/com/atproto/repo/importRepo.d.ts.map +1 -1
- package/dist/api/com/atproto/repo/importRepo.js +3 -1
- package/dist/api/com/atproto/repo/importRepo.js.map +1 -1
- package/dist/api/com/atproto/repo/listMissingBlobs.js +1 -1
- package/dist/api/com/atproto/repo/listMissingBlobs.js.map +1 -1
- package/dist/api/com/atproto/repo/putRecord.d.ts.map +1 -1
- package/dist/api/com/atproto/repo/putRecord.js +4 -1
- package/dist/api/com/atproto/repo/putRecord.js.map +1 -1
- package/dist/api/com/atproto/repo/uploadBlob.d.ts.map +1 -1
- package/dist/api/com/atproto/repo/uploadBlob.js +3 -1
- package/dist/api/com/atproto/repo/uploadBlob.js.map +1 -1
- package/dist/api/com/atproto/server/activateAccount.d.ts.map +1 -1
- package/dist/api/com/atproto/server/activateAccount.js +3 -2
- package/dist/api/com/atproto/server/activateAccount.js.map +1 -1
- package/dist/api/com/atproto/server/checkAccountStatus.js +1 -1
- package/dist/api/com/atproto/server/checkAccountStatus.js.map +1 -1
- package/dist/api/com/atproto/server/confirmEmail.js +1 -1
- package/dist/api/com/atproto/server/confirmEmail.js.map +1 -1
- package/dist/api/com/atproto/server/createAccount.d.ts.map +1 -1
- package/dist/api/com/atproto/server/createAccount.js +4 -2
- package/dist/api/com/atproto/server/createAccount.js.map +1 -1
- package/dist/api/com/atproto/server/createAppPassword.d.ts.map +1 -1
- package/dist/api/com/atproto/server/createAppPassword.js +3 -1
- package/dist/api/com/atproto/server/createAppPassword.js.map +1 -1
- package/dist/api/com/atproto/server/createSession.d.ts.map +1 -1
- package/dist/api/com/atproto/server/createSession.js +2 -0
- package/dist/api/com/atproto/server/createSession.js.map +1 -1
- package/dist/api/com/atproto/server/deactivateAccount.d.ts.map +1 -1
- package/dist/api/com/atproto/server/deactivateAccount.js +3 -1
- package/dist/api/com/atproto/server/deactivateAccount.js.map +1 -1
- package/dist/api/com/atproto/server/deleteAccount.d.ts.map +1 -1
- package/dist/api/com/atproto/server/deleteAccount.js +4 -3
- package/dist/api/com/atproto/server/deleteAccount.js.map +1 -1
- package/dist/api/com/atproto/server/getAccountInviteCodes.js +1 -1
- package/dist/api/com/atproto/server/getAccountInviteCodes.js.map +1 -1
- package/dist/api/com/atproto/server/getServiceAuth.js +1 -1
- package/dist/api/com/atproto/server/getServiceAuth.js.map +1 -1
- package/dist/api/com/atproto/server/getSession.d.ts.map +1 -1
- package/dist/api/com/atproto/server/getSession.js +7 -2
- package/dist/api/com/atproto/server/getSession.js.map +1 -1
- package/dist/api/com/atproto/server/listAppPasswords.js +1 -1
- package/dist/api/com/atproto/server/listAppPasswords.js.map +1 -1
- package/dist/api/com/atproto/server/refreshSession.d.ts.map +1 -1
- package/dist/api/com/atproto/server/refreshSession.js +2 -0
- package/dist/api/com/atproto/server/refreshSession.js.map +1 -1
- package/dist/api/com/atproto/server/requestAccountDelete.js +1 -1
- package/dist/api/com/atproto/server/requestAccountDelete.js.map +1 -1
- package/dist/api/com/atproto/server/requestEmailConfirmation.js +1 -1
- package/dist/api/com/atproto/server/requestEmailConfirmation.js.map +1 -1
- package/dist/api/com/atproto/server/requestEmailUpdate.js +1 -1
- package/dist/api/com/atproto/server/requestEmailUpdate.js.map +1 -1
- package/dist/api/com/atproto/server/revokeAppPassword.js +1 -1
- package/dist/api/com/atproto/server/revokeAppPassword.js.map +1 -1
- package/dist/api/com/atproto/server/updateEmail.js +1 -1
- package/dist/api/com/atproto/server/updateEmail.js.map +1 -1
- package/dist/api/com/atproto/server/util.d.ts +1 -0
- package/dist/api/com/atproto/server/util.d.ts.map +1 -1
- package/dist/api/com/atproto/server/util.js +9 -6
- package/dist/api/com/atproto/server/util.js.map +1 -1
- package/dist/api/com/atproto/sync/deprecated/getCheckout.d.ts.map +1 -1
- package/dist/api/com/atproto/sync/deprecated/getCheckout.js +2 -8
- package/dist/api/com/atproto/sync/deprecated/getCheckout.js.map +1 -1
- package/dist/api/com/atproto/sync/deprecated/getHead.d.ts.map +1 -1
- package/dist/api/com/atproto/sync/deprecated/getHead.js +2 -7
- package/dist/api/com/atproto/sync/deprecated/getHead.js.map +1 -1
- package/dist/api/com/atproto/sync/getBlob.d.ts.map +1 -1
- package/dist/api/com/atproto/sync/getBlob.js +3 -6
- package/dist/api/com/atproto/sync/getBlob.js.map +1 -1
- package/dist/api/com/atproto/sync/getBlocks.d.ts.map +1 -1
- package/dist/api/com/atproto/sync/getBlocks.js +2 -7
- package/dist/api/com/atproto/sync/getBlocks.js.map +1 -1
- package/dist/api/com/atproto/sync/getLatestCommit.d.ts.map +1 -1
- package/dist/api/com/atproto/sync/getLatestCommit.js +2 -7
- package/dist/api/com/atproto/sync/getLatestCommit.js.map +1 -1
- package/dist/api/com/atproto/sync/getRecord.d.ts.map +1 -1
- package/dist/api/com/atproto/sync/getRecord.js +2 -7
- package/dist/api/com/atproto/sync/getRecord.js.map +1 -1
- package/dist/api/com/atproto/sync/getRepo.d.ts.map +1 -1
- package/dist/api/com/atproto/sync/getRepo.js +2 -7
- package/dist/api/com/atproto/sync/getRepo.js.map +1 -1
- package/dist/api/com/atproto/sync/getRepoStatus.d.ts +4 -0
- package/dist/api/com/atproto/sync/getRepoStatus.d.ts.map +1 -0
- package/dist/api/com/atproto/sync/getRepoStatus.js +28 -0
- package/dist/api/com/atproto/sync/getRepoStatus.js.map +1 -0
- package/dist/api/com/atproto/sync/index.d.ts.map +1 -1
- package/dist/api/com/atproto/sync/index.js +2 -0
- package/dist/api/com/atproto/sync/index.js.map +1 -1
- package/dist/api/com/atproto/sync/listBlobs.d.ts.map +1 -1
- package/dist/api/com/atproto/sync/listBlobs.js +2 -8
- package/dist/api/com/atproto/sync/listBlobs.js.map +1 -1
- package/dist/api/com/atproto/sync/listRepos.d.ts.map +1 -1
- package/dist/api/com/atproto/sync/listRepos.js +13 -8
- package/dist/api/com/atproto/sync/listRepos.js.map +1 -1
- package/dist/api/com/atproto/sync/subscribeRepos.d.ts.map +1 -1
- package/dist/api/com/atproto/sync/subscribeRepos.js +8 -0
- package/dist/api/com/atproto/sync/subscribeRepos.js.map +1 -1
- package/dist/api/com/atproto/sync/util.d.ts +4 -0
- package/dist/api/com/atproto/sync/util.d.ts.map +1 -0
- package/dist/api/com/atproto/sync/util.js +25 -0
- package/dist/api/com/atproto/sync/util.js.map +1 -0
- package/dist/api/com/atproto/temp/checkSignupQueue.d.ts.map +1 -1
- package/dist/api/com/atproto/temp/checkSignupQueue.js +4 -1
- package/dist/api/com/atproto/temp/checkSignupQueue.js.map +1 -1
- package/dist/auth-verifier.d.ts +13 -7
- package/dist/auth-verifier.d.ts.map +1 -1
- package/dist/auth-verifier.js +29 -46
- package/dist/auth-verifier.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/lexicon/index.d.ts +2 -0
- package/dist/lexicon/index.d.ts.map +1 -1
- package/dist/lexicon/index.js +4 -0
- package/dist/lexicon/index.js.map +1 -1
- package/dist/lexicon/lexicons.d.ts +145 -0
- package/dist/lexicon/lexicons.d.ts.map +1 -1
- package/dist/lexicon/lexicons.js +225 -4
- package/dist/lexicon/lexicons.js.map +1 -1
- package/dist/lexicon/types/chat/bsky/convo/defs.d.ts +1 -1
- package/dist/lexicon/types/com/atproto/admin/defs.d.ts +1 -0
- package/dist/lexicon/types/com/atproto/admin/defs.d.ts.map +1 -1
- package/dist/lexicon/types/com/atproto/admin/defs.js.map +1 -1
- package/dist/lexicon/types/com/atproto/admin/getSubjectStatus.d.ts +1 -0
- package/dist/lexicon/types/com/atproto/admin/getSubjectStatus.d.ts.map +1 -1
- package/dist/lexicon/types/com/atproto/server/createSession.d.ts +3 -0
- package/dist/lexicon/types/com/atproto/server/createSession.d.ts.map +1 -1
- package/dist/lexicon/types/com/atproto/server/getSession.d.ts +3 -0
- package/dist/lexicon/types/com/atproto/server/getSession.d.ts.map +1 -1
- package/dist/lexicon/types/com/atproto/server/refreshSession.d.ts +3 -0
- package/dist/lexicon/types/com/atproto/server/refreshSession.d.ts.map +1 -1
- package/dist/lexicon/types/com/atproto/sync/getBlob.d.ts +1 -0
- package/dist/lexicon/types/com/atproto/sync/getBlob.d.ts.map +1 -1
- package/dist/lexicon/types/com/atproto/sync/getBlocks.d.ts +1 -0
- package/dist/lexicon/types/com/atproto/sync/getBlocks.d.ts.map +1 -1
- package/dist/lexicon/types/com/atproto/sync/getLatestCommit.d.ts +1 -1
- package/dist/lexicon/types/com/atproto/sync/getLatestCommit.d.ts.map +1 -1
- package/dist/lexicon/types/com/atproto/sync/getRecord.d.ts +1 -0
- package/dist/lexicon/types/com/atproto/sync/getRecord.d.ts.map +1 -1
- package/dist/lexicon/types/com/atproto/sync/getRepo.d.ts +1 -0
- package/dist/lexicon/types/com/atproto/sync/getRepo.d.ts.map +1 -1
- package/dist/lexicon/types/com/atproto/sync/getRepoStatus.d.ts +42 -0
- package/dist/lexicon/types/com/atproto/sync/getRepoStatus.d.ts.map +1 -0
- package/dist/lexicon/types/com/atproto/sync/getRepoStatus.js +3 -0
- package/dist/lexicon/types/com/atproto/sync/getRepoStatus.js.map +1 -0
- package/dist/lexicon/types/com/atproto/sync/listBlobs.d.ts +1 -0
- package/dist/lexicon/types/com/atproto/sync/listBlobs.d.ts.map +1 -1
- package/dist/lexicon/types/com/atproto/sync/listRepos.d.ts +3 -0
- package/dist/lexicon/types/com/atproto/sync/listRepos.d.ts.map +1 -1
- package/dist/lexicon/types/com/atproto/sync/listRepos.js.map +1 -1
- package/dist/lexicon/types/com/atproto/sync/subscribeRepos.d.ts +19 -4
- package/dist/lexicon/types/com/atproto/sync/subscribeRepos.d.ts.map +1 -1
- package/dist/lexicon/types/com/atproto/sync/subscribeRepos.js +11 -1
- package/dist/lexicon/types/com/atproto/sync/subscribeRepos.js.map +1 -1
- package/dist/lexicon/types/tools/ozone/moderation/defs.d.ts +2 -0
- package/dist/lexicon/types/tools/ozone/moderation/defs.d.ts.map +1 -1
- package/dist/lexicon/types/tools/ozone/moderation/defs.js.map +1 -1
- package/dist/pipethrough.d.ts.map +1 -1
- package/dist/pipethrough.js +17 -14
- package/dist/pipethrough.js.map +1 -1
- package/dist/scripts/index.d.ts +4 -0
- package/dist/scripts/index.d.ts.map +1 -0
- package/dist/scripts/index.js +8 -0
- package/dist/scripts/index.js.map +1 -0
- package/dist/scripts/rebuild-repo.d.ts +3 -0
- package/dist/scripts/rebuild-repo.d.ts.map +1 -0
- package/dist/scripts/rebuild-repo.js +121 -0
- package/dist/scripts/rebuild-repo.js.map +1 -0
- package/dist/sequencer/db/schema.d.ts +1 -1
- package/dist/sequencer/db/schema.d.ts.map +1 -1
- package/dist/sequencer/events.d.ts +27 -2
- package/dist/sequencer/events.d.ts.map +1 -1
- package/dist/sequencer/events.js +35 -2
- package/dist/sequencer/events.js.map +1 -1
- package/dist/sequencer/sequencer.d.ts +8 -6
- package/dist/sequencer/sequencer.d.ts.map +1 -1
- package/dist/sequencer/sequencer.js +22 -9
- package/dist/sequencer/sequencer.js.map +1 -1
- package/package.json +4 -4
- package/src/account-manager/helpers/account.ts +38 -6
- package/src/account-manager/index.ts +21 -8
- package/src/api/app/bsky/actor/getPreferences.ts +1 -1
- package/src/api/app/bsky/actor/getProfile.ts +1 -1
- package/src/api/app/bsky/actor/getProfiles.ts +1 -1
- package/src/api/app/bsky/actor/putPreferences.ts +1 -1
- package/src/api/app/bsky/feed/getActorLikes.ts +1 -1
- package/src/api/app/bsky/feed/getAuthorFeed.ts +1 -1
- package/src/api/app/bsky/feed/getFeed.ts +1 -1
- package/src/api/app/bsky/feed/getPostThread.ts +1 -1
- package/src/api/app/bsky/feed/getTimeline.ts +1 -1
- package/src/api/app/bsky/notification/registerPush.ts +4 -1
- package/src/api/chat/index.ts +14 -14
- package/src/api/com/atproto/admin/deleteAccount.ts +7 -2
- package/src/api/com/atproto/admin/getAccountInfo.ts +1 -0
- package/src/api/com/atproto/admin/getSubjectStatus.ts +4 -3
- package/src/api/com/atproto/admin/updateAccountHandle.ts +1 -1
- package/src/api/com/atproto/admin/updateSubjectStatus.ts +2 -0
- package/src/api/com/atproto/identity/getRecommendedDidCredentials.ts +1 -1
- package/src/api/com/atproto/identity/requestPlcOperationSignature.ts +1 -1
- package/src/api/com/atproto/identity/signPlcOperation.ts +1 -1
- package/src/api/com/atproto/identity/submitPlcOperation.ts +2 -1
- package/src/api/com/atproto/identity/updateHandle.ts +2 -2
- package/src/api/com/atproto/repo/applyWrites.ts +4 -1
- package/src/api/com/atproto/repo/createRecord.ts +4 -1
- package/src/api/com/atproto/repo/deleteRecord.ts +4 -1
- package/src/api/com/atproto/repo/describeRepo.ts +2 -4
- package/src/api/com/atproto/repo/importRepo.ts +3 -1
- package/src/api/com/atproto/repo/listMissingBlobs.ts +1 -1
- package/src/api/com/atproto/repo/putRecord.ts +4 -1
- package/src/api/com/atproto/repo/uploadBlob.ts +3 -1
- package/src/api/com/atproto/server/activateAccount.ts +3 -2
- package/src/api/com/atproto/server/checkAccountStatus.ts +1 -1
- package/src/api/com/atproto/server/confirmEmail.ts +1 -1
- package/src/api/com/atproto/server/createAccount.ts +6 -3
- package/src/api/com/atproto/server/createAppPassword.ts +3 -1
- package/src/api/com/atproto/server/createSession.ts +2 -0
- package/src/api/com/atproto/server/deactivateAccount.ts +3 -1
- package/src/api/com/atproto/server/deleteAccount.ts +7 -3
- package/src/api/com/atproto/server/getAccountInviteCodes.ts +1 -1
- package/src/api/com/atproto/server/getServiceAuth.ts +1 -1
- package/src/api/com/atproto/server/getSession.ts +7 -2
- package/src/api/com/atproto/server/listAppPasswords.ts +1 -1
- package/src/api/com/atproto/server/refreshSession.ts +2 -0
- package/src/api/com/atproto/server/requestAccountDelete.ts +1 -1
- package/src/api/com/atproto/server/requestEmailConfirmation.ts +1 -1
- package/src/api/com/atproto/server/requestEmailUpdate.ts +1 -1
- package/src/api/com/atproto/server/revokeAppPassword.ts +1 -1
- package/src/api/com/atproto/server/updateEmail.ts +1 -1
- package/src/api/com/atproto/server/util.ts +12 -5
- package/src/api/com/atproto/sync/deprecated/getCheckout.ts +6 -8
- package/src/api/com/atproto/sync/deprecated/getHead.ts +7 -10
- package/src/api/com/atproto/sync/getBlob.ts +8 -6
- package/src/api/com/atproto/sync/getBlocks.ts +6 -7
- package/src/api/com/atproto/sync/getLatestCommit.ts +7 -10
- package/src/api/com/atproto/sync/getRecord.ts +7 -7
- package/src/api/com/atproto/sync/getRepo.ts +6 -7
- package/src/api/com/atproto/sync/getRepoStatus.ts +31 -0
- package/src/api/com/atproto/sync/index.ts +2 -0
- package/src/api/com/atproto/sync/listBlobs.ts +6 -8
- package/src/api/com/atproto/sync/listRepos.ts +13 -8
- package/src/api/com/atproto/sync/subscribeRepos.ts +7 -0
- package/src/api/com/atproto/sync/util.ts +36 -0
- package/src/api/com/atproto/temp/checkSignupQueue.ts +4 -1
- package/src/auth-verifier.ts +62 -47
- package/src/index.ts +1 -0
- package/src/lexicon/index.ts +12 -0
- package/src/lexicon/lexicons.ts +236 -7
- package/src/lexicon/types/chat/bsky/convo/defs.ts +1 -1
- package/src/lexicon/types/com/atproto/admin/defs.ts +1 -0
- package/src/lexicon/types/com/atproto/admin/getSubjectStatus.ts +1 -0
- package/src/lexicon/types/com/atproto/server/createSession.ts +3 -0
- package/src/lexicon/types/com/atproto/server/getSession.ts +3 -0
- package/src/lexicon/types/com/atproto/server/refreshSession.ts +3 -0
- package/src/lexicon/types/com/atproto/sync/getBlob.ts +6 -0
- package/src/lexicon/types/com/atproto/sync/getBlocks.ts +6 -0
- package/src/lexicon/types/com/atproto/sync/getLatestCommit.ts +1 -1
- package/src/lexicon/types/com/atproto/sync/getRecord.ts +6 -0
- package/src/lexicon/types/com/atproto/sync/getRepo.ts +1 -0
- package/src/lexicon/types/com/atproto/sync/getRepoStatus.ts +52 -0
- package/src/lexicon/types/com/atproto/sync/listBlobs.ts +1 -0
- package/src/lexicon/types/com/atproto/sync/listRepos.ts +3 -0
- package/src/lexicon/types/com/atproto/sync/subscribeRepos.ts +30 -3
- package/src/lexicon/types/tools/ozone/moderation/defs.ts +2 -0
- package/src/pipethrough.ts +5 -4
- package/src/scripts/index.ts +5 -0
- package/src/scripts/rebuild-repo.ts +143 -0
- package/src/sequencer/db/schema.ts +1 -0
- package/src/sequencer/events.ts +47 -0
- package/src/sequencer/sequencer.ts +35 -14
- package/tests/account-deactivation.test.ts +67 -12
- package/tests/account-deletion.test.ts +10 -2
- package/tests/auth.test.ts +3 -0
- package/tests/moderation.test.ts +2 -2
- package/tests/proxied/notif.test.ts +1 -0
- package/tests/sequencer.test.ts +2 -2
- package/tests/sync/list.test.ts +1 -0
- package/tests/sync/subscribe-repos.test.ts +224 -40
- package/tests/sync/sync.test.ts +48 -4
@@ -9,6 +9,8 @@ export type ActorAccount = ActorEntry & {
|
|
9
9
|
email: string | null
|
10
10
|
emailConfirmedAt: string | null
|
11
11
|
invitesDisabled: 0 | 1 | null
|
12
|
+
active: boolean
|
13
|
+
status?: AccountStatus
|
12
14
|
}
|
13
15
|
|
14
16
|
export type AvailabilityFlags = {
|
@@ -16,6 +18,14 @@ export type AvailabilityFlags = {
|
|
16
18
|
includeDeactivated?: boolean
|
17
19
|
}
|
18
20
|
|
21
|
+
export enum AccountStatus {
|
22
|
+
Active = 'active',
|
23
|
+
Takendown = 'takendown',
|
24
|
+
Suspended = 'suspended',
|
25
|
+
Deleted = 'deleted',
|
26
|
+
Deactivated = 'deactivated',
|
27
|
+
}
|
28
|
+
|
19
29
|
const selectAccountQB = (db: AccountDb, flags?: AvailabilityFlags) => {
|
20
30
|
const { includeTakenDown = false, includeDeactivated = false } = flags ?? {}
|
21
31
|
const { ref } = db.db.dynamic
|
@@ -53,7 +63,7 @@ export const getAccount = async (
|
|
53
63
|
}
|
54
64
|
})
|
55
65
|
.executeTakeFirst()
|
56
|
-
return found
|
66
|
+
return found ? { ...found, ...formatAccountStatus(found) } : null
|
57
67
|
}
|
58
68
|
|
59
69
|
export const getAccountByEmail = async (
|
@@ -64,7 +74,7 @@ export const getAccountByEmail = async (
|
|
64
74
|
const found = await selectAccountQB(db, flags)
|
65
75
|
.where('email', '=', email.toLowerCase())
|
66
76
|
.executeTakeFirst()
|
67
|
-
return found
|
77
|
+
return found ? { ...found, ...formatAccountStatus(found) } : null
|
68
78
|
}
|
69
79
|
|
70
80
|
export const registerActor = async (
|
@@ -196,19 +206,21 @@ export const setEmailConfirmedAt = async (
|
|
196
206
|
)
|
197
207
|
}
|
198
208
|
|
199
|
-
export const
|
209
|
+
export const getAccountAdminStatus = async (
|
200
210
|
db: AccountDb,
|
201
211
|
did: string,
|
202
|
-
): Promise<StatusAttr | null> => {
|
212
|
+
): Promise<{ takedown: StatusAttr; deactivated: StatusAttr } | null> => {
|
203
213
|
const res = await db.db
|
204
214
|
.selectFrom('actor')
|
205
|
-
.select('takedownRef')
|
215
|
+
.select(['takedownRef', 'deactivatedAt'])
|
206
216
|
.where('did', '=', did)
|
207
217
|
.executeTakeFirst()
|
208
218
|
if (!res) return null
|
209
|
-
|
219
|
+
const takedown = res.takedownRef
|
210
220
|
? { applied: true, ref: res.takedownRef }
|
211
221
|
: { applied: false }
|
222
|
+
const deactivated = res.deactivatedAt ? { applied: true } : { applied: false }
|
223
|
+
return { takedown, deactivated }
|
212
224
|
}
|
213
225
|
|
214
226
|
export const updateAccountTakedownStatus = async (
|
@@ -251,3 +263,23 @@ export const activateAccount = async (db: AccountDb, did: string) => {
|
|
251
263
|
.where('did', '=', did),
|
252
264
|
)
|
253
265
|
}
|
266
|
+
|
267
|
+
export const formatAccountStatus = (account: {
|
268
|
+
takedownRef: string | null
|
269
|
+
deactivatedAt: string | null
|
270
|
+
}): {
|
271
|
+
active: boolean
|
272
|
+
status?: AccountStatus
|
273
|
+
} => {
|
274
|
+
let status: AccountStatus | undefined = undefined
|
275
|
+
if (account.takedownRef) {
|
276
|
+
status = AccountStatus.Takendown
|
277
|
+
} else if (account.deactivatedAt) {
|
278
|
+
status = AccountStatus.Deactivated
|
279
|
+
}
|
280
|
+
const active = !status
|
281
|
+
return {
|
282
|
+
active,
|
283
|
+
status,
|
284
|
+
}
|
285
|
+
}
|
@@ -4,6 +4,7 @@ import { CID } from 'multiformats/cid'
|
|
4
4
|
import { AccountDb, EmailTokenPurpose, getDb, getMigrator } from './db'
|
5
5
|
import * as scrypt from './helpers/scrypt'
|
6
6
|
import * as account from './helpers/account'
|
7
|
+
import { AccountStatus } from './helpers/account'
|
7
8
|
import { ActorAccount } from './helpers/account'
|
8
9
|
import * as repo from './helpers/repo'
|
9
10
|
import * as auth from './helpers/auth'
|
@@ -13,6 +14,8 @@ import * as emailToken from './helpers/email-token'
|
|
13
14
|
import { AuthScope } from '../auth-verifier'
|
14
15
|
import { StatusAttr } from '../lexicon/types/com/atproto/admin/defs'
|
15
16
|
|
17
|
+
export { AccountStatus } from './helpers/account'
|
18
|
+
|
16
19
|
export class AccountManager {
|
17
20
|
db: AccountDb
|
18
21
|
|
@@ -51,12 +54,6 @@ export class AccountManager {
|
|
51
54
|
return account.getAccountByEmail(this.db, email, flags)
|
52
55
|
}
|
53
56
|
|
54
|
-
// Repo exists and is not taken-down
|
55
|
-
async isRepoAvailable(did: string) {
|
56
|
-
const got = await this.getAccount(did)
|
57
|
-
return !!got
|
58
|
-
}
|
59
|
-
|
60
57
|
async isAccountActivated(did: string): Promise<boolean> {
|
61
58
|
const account = await this.getAccount(did, { includeDeactivated: true })
|
62
59
|
if (!account) return false
|
@@ -71,6 +68,22 @@ export class AccountManager {
|
|
71
68
|
return got?.did ?? null
|
72
69
|
}
|
73
70
|
|
71
|
+
async getAccountStatus(handleOrDid: string): Promise<AccountStatus> {
|
72
|
+
const got = await this.getAccount(handleOrDid, {
|
73
|
+
includeDeactivated: true,
|
74
|
+
includeTakenDown: true,
|
75
|
+
})
|
76
|
+
if (!got) {
|
77
|
+
return AccountStatus.Deleted
|
78
|
+
} else if (got.takedownRef) {
|
79
|
+
return AccountStatus.Takendown
|
80
|
+
} else if (got.deactivatedAt) {
|
81
|
+
return AccountStatus.Deactivated
|
82
|
+
} else {
|
83
|
+
return AccountStatus.Active
|
84
|
+
}
|
85
|
+
}
|
86
|
+
|
74
87
|
async createAccount(opts: {
|
75
88
|
did: string
|
76
89
|
handle: string
|
@@ -143,8 +156,8 @@ export class AccountManager {
|
|
143
156
|
)
|
144
157
|
}
|
145
158
|
|
146
|
-
async
|
147
|
-
return account.
|
159
|
+
async getAccountAdminStatus(did: string) {
|
160
|
+
return account.getAccountAdminStatus(this.db, did)
|
148
161
|
}
|
149
162
|
|
150
163
|
async updateRepoRoot(did: string, cid: CID, rev: string) {
|
@@ -5,7 +5,7 @@ import { AuthScope } from '../../../../auth-verifier'
|
|
5
5
|
export default function (server: Server, ctx: AppContext) {
|
6
6
|
if (!ctx.cfg.bskyAppView) return
|
7
7
|
server.app.bsky.actor.getPreferences({
|
8
|
-
auth: ctx.authVerifier.
|
8
|
+
auth: ctx.authVerifier.accessStandard(),
|
9
9
|
handler: async ({ auth }) => {
|
10
10
|
const requester = auth.credentials.did
|
11
11
|
let preferences = await ctx.actorStore.read(requester, (store) =>
|
@@ -14,7 +14,7 @@ export default function (server: Server, ctx: AppContext) {
|
|
14
14
|
const { bskyAppView } = ctx.cfg
|
15
15
|
if (!bskyAppView) return
|
16
16
|
server.app.bsky.actor.getProfile({
|
17
|
-
auth: ctx.authVerifier.
|
17
|
+
auth: ctx.authVerifier.accessStandard(),
|
18
18
|
handler: async ({ req, auth }) => {
|
19
19
|
const requester = auth.credentials.did
|
20
20
|
const res = await pipethrough(ctx, req, requester)
|
@@ -14,7 +14,7 @@ export default function (server: Server, ctx: AppContext) {
|
|
14
14
|
const { bskyAppView } = ctx.cfg
|
15
15
|
if (!bskyAppView) return
|
16
16
|
server.app.bsky.actor.getProfiles({
|
17
|
-
auth: ctx.authVerifier.
|
17
|
+
auth: ctx.authVerifier.accessStandard(),
|
18
18
|
handler: async ({ req, auth }) => {
|
19
19
|
const requester = auth.credentials.did
|
20
20
|
|
@@ -6,7 +6,7 @@ import { AccountPreference } from '../../../../actor-store/preference/reader'
|
|
6
6
|
export default function (server: Server, ctx: AppContext) {
|
7
7
|
if (!ctx.cfg.bskyAppView) return
|
8
8
|
server.app.bsky.actor.putPreferences({
|
9
|
-
auth: ctx.authVerifier.
|
9
|
+
auth: ctx.authVerifier.accessStandard({ checkTakedown: true }),
|
10
10
|
handler: async ({ auth, input }) => {
|
11
11
|
const { preferences } = input.body
|
12
12
|
const requester = auth.credentials.did
|
@@ -14,7 +14,7 @@ export default function (server: Server, ctx: AppContext) {
|
|
14
14
|
const { bskyAppView } = ctx.cfg
|
15
15
|
if (!bskyAppView) return
|
16
16
|
server.app.bsky.feed.getActorLikes({
|
17
|
-
auth: ctx.authVerifier.
|
17
|
+
auth: ctx.authVerifier.accessStandard(),
|
18
18
|
handler: async ({ req, auth }) => {
|
19
19
|
const requester = auth.credentials.did
|
20
20
|
const res = await pipethrough(ctx, req, requester)
|
@@ -15,7 +15,7 @@ export default function (server: Server, ctx: AppContext) {
|
|
15
15
|
const { bskyAppView } = ctx.cfg
|
16
16
|
if (!bskyAppView) return
|
17
17
|
server.app.bsky.feed.getAuthorFeed({
|
18
|
-
auth: ctx.authVerifier.
|
18
|
+
auth: ctx.authVerifier.accessStandard(),
|
19
19
|
handler: async ({ req, auth }) => {
|
20
20
|
const requester = auth.credentials.did
|
21
21
|
const res = await pipethrough(ctx, req, requester)
|
@@ -7,7 +7,7 @@ export default function (server: Server, ctx: AppContext) {
|
|
7
7
|
const { bskyAppView } = ctx.cfg
|
8
8
|
if (!appViewAgent || !bskyAppView) return
|
9
9
|
server.app.bsky.feed.getFeed({
|
10
|
-
auth: ctx.authVerifier.
|
10
|
+
auth: ctx.authVerifier.accessStandard(),
|
11
11
|
handler: async ({ params, auth, req }) => {
|
12
12
|
const requester = auth.credentials.did
|
13
13
|
|
@@ -29,7 +29,7 @@ export default function (server: Server, ctx: AppContext) {
|
|
29
29
|
const { bskyAppView } = ctx.cfg
|
30
30
|
if (!bskyAppView) return
|
31
31
|
server.app.bsky.feed.getPostThread({
|
32
|
-
auth: ctx.authVerifier.
|
32
|
+
auth: ctx.authVerifier.accessStandard(),
|
33
33
|
handler: async ({ req, auth, params }) => {
|
34
34
|
const requester = auth.credentials.did
|
35
35
|
|
@@ -14,7 +14,7 @@ export default function (server: Server, ctx: AppContext) {
|
|
14
14
|
const { bskyAppView } = ctx.cfg
|
15
15
|
if (!bskyAppView) return
|
16
16
|
server.app.bsky.feed.getTimeline({
|
17
|
-
auth: ctx.authVerifier.
|
17
|
+
auth: ctx.authVerifier.accessStandard(),
|
18
18
|
handler: async ({ req, auth }) => {
|
19
19
|
const requester = auth.credentials.did
|
20
20
|
const res = await pipethrough(ctx, req, requester)
|
@@ -4,12 +4,15 @@ import { getNotif } from '@atproto/identity'
|
|
4
4
|
import { InvalidRequestError } from '@atproto/xrpc-server'
|
5
5
|
import { AtpAgent } from '@atproto/api'
|
6
6
|
import { getDidDoc } from '../util/resolver'
|
7
|
+
import { AuthScope } from '../../../../auth-verifier'
|
7
8
|
|
8
9
|
export default function (server: Server, ctx: AppContext) {
|
9
10
|
const { appViewAgent } = ctx
|
10
11
|
if (!appViewAgent) return
|
11
12
|
server.app.bsky.notification.registerPush({
|
12
|
-
auth: ctx.authVerifier.
|
13
|
+
auth: ctx.authVerifier.accessStandard({
|
14
|
+
additional: [AuthScope.SignupQueued],
|
15
|
+
}),
|
13
16
|
handler: async ({ auth, input }) => {
|
14
17
|
const { serviceDid } = input.body
|
15
18
|
const {
|
package/src/api/chat/index.ts
CHANGED
@@ -4,85 +4,85 @@ import { pipethrough, pipethroughProcedure } from '../../pipethrough'
|
|
4
4
|
|
5
5
|
export default function (server: Server, ctx: AppContext) {
|
6
6
|
server.chat.bsky.actor.deleteAccount({
|
7
|
-
auth: ctx.authVerifier.
|
7
|
+
auth: ctx.authVerifier.accessPrivileged(),
|
8
8
|
handler: async ({ req, auth }) => {
|
9
9
|
return pipethroughProcedure(ctx, req, auth.credentials.did)
|
10
10
|
},
|
11
11
|
})
|
12
12
|
server.chat.bsky.actor.exportAccountData({
|
13
|
-
auth: ctx.authVerifier.
|
13
|
+
auth: ctx.authVerifier.accessPrivileged(),
|
14
14
|
handler: ({ req, auth }) => {
|
15
15
|
return pipethrough(ctx, req, auth.credentials.did)
|
16
16
|
},
|
17
17
|
})
|
18
18
|
server.chat.bsky.convo.deleteMessageForSelf({
|
19
|
-
auth: ctx.authVerifier.
|
19
|
+
auth: ctx.authVerifier.accessPrivileged(),
|
20
20
|
handler: ({ req, auth, input }) => {
|
21
21
|
return pipethroughProcedure(ctx, req, auth.credentials.did, input.body)
|
22
22
|
},
|
23
23
|
})
|
24
24
|
server.chat.bsky.convo.getConvo({
|
25
|
-
auth: ctx.authVerifier.
|
25
|
+
auth: ctx.authVerifier.accessPrivileged(),
|
26
26
|
handler: ({ req, auth }) => {
|
27
27
|
return pipethrough(ctx, req, auth.credentials.did)
|
28
28
|
},
|
29
29
|
})
|
30
30
|
server.chat.bsky.convo.getConvoForMembers({
|
31
|
-
auth: ctx.authVerifier.
|
31
|
+
auth: ctx.authVerifier.accessPrivileged(),
|
32
32
|
handler: ({ req, auth }) => {
|
33
33
|
return pipethrough(ctx, req, auth.credentials.did)
|
34
34
|
},
|
35
35
|
})
|
36
36
|
server.chat.bsky.convo.getLog({
|
37
|
-
auth: ctx.authVerifier.
|
37
|
+
auth: ctx.authVerifier.accessPrivileged(),
|
38
38
|
handler: ({ req, auth }) => {
|
39
39
|
return pipethrough(ctx, req, auth.credentials.did)
|
40
40
|
},
|
41
41
|
})
|
42
42
|
server.chat.bsky.convo.getMessages({
|
43
|
-
auth: ctx.authVerifier.
|
43
|
+
auth: ctx.authVerifier.accessPrivileged(),
|
44
44
|
handler: ({ req, auth }) => {
|
45
45
|
return pipethrough(ctx, req, auth.credentials.did)
|
46
46
|
},
|
47
47
|
})
|
48
48
|
server.chat.bsky.convo.leaveConvo({
|
49
|
-
auth: ctx.authVerifier.
|
49
|
+
auth: ctx.authVerifier.accessPrivileged(),
|
50
50
|
handler: ({ req, auth, input }) => {
|
51
51
|
return pipethroughProcedure(ctx, req, auth.credentials.did, input.body)
|
52
52
|
},
|
53
53
|
})
|
54
54
|
server.chat.bsky.convo.listConvos({
|
55
|
-
auth: ctx.authVerifier.
|
55
|
+
auth: ctx.authVerifier.accessPrivileged(),
|
56
56
|
handler: ({ req, auth }) => {
|
57
57
|
return pipethrough(ctx, req, auth.credentials.did)
|
58
58
|
},
|
59
59
|
})
|
60
60
|
server.chat.bsky.convo.muteConvo({
|
61
|
-
auth: ctx.authVerifier.
|
61
|
+
auth: ctx.authVerifier.accessPrivileged(),
|
62
62
|
handler: ({ req, auth, input }) => {
|
63
63
|
return pipethroughProcedure(ctx, req, auth.credentials.did, input.body)
|
64
64
|
},
|
65
65
|
})
|
66
66
|
server.chat.bsky.convo.sendMessage({
|
67
|
-
auth: ctx.authVerifier.
|
67
|
+
auth: ctx.authVerifier.accessPrivileged(),
|
68
68
|
handler: ({ req, auth, input }) => {
|
69
69
|
return pipethroughProcedure(ctx, req, auth.credentials.did, input.body)
|
70
70
|
},
|
71
71
|
})
|
72
72
|
server.chat.bsky.convo.sendMessageBatch({
|
73
|
-
auth: ctx.authVerifier.
|
73
|
+
auth: ctx.authVerifier.accessPrivileged(),
|
74
74
|
handler: ({ req, auth, input }) => {
|
75
75
|
return pipethroughProcedure(ctx, req, auth.credentials.did, input.body)
|
76
76
|
},
|
77
77
|
})
|
78
78
|
server.chat.bsky.convo.unmuteConvo({
|
79
|
-
auth: ctx.authVerifier.
|
79
|
+
auth: ctx.authVerifier.accessPrivileged(),
|
80
80
|
handler: ({ req, auth, input }) => {
|
81
81
|
return pipethroughProcedure(ctx, req, auth.credentials.did, input.body)
|
82
82
|
},
|
83
83
|
})
|
84
84
|
server.chat.bsky.convo.updateRead({
|
85
|
-
auth: ctx.authVerifier.
|
85
|
+
auth: ctx.authVerifier.accessPrivileged(),
|
86
86
|
handler: ({ req, auth, input }) => {
|
87
87
|
return pipethroughProcedure(ctx, req, auth.credentials.did, input.body)
|
88
88
|
},
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import { Server } from '../../../../lexicon'
|
2
2
|
import AppContext from '../../../../context'
|
3
|
+
import { AccountStatus } from '../../../../account-manager'
|
3
4
|
|
4
5
|
export default function (server: Server, ctx: AppContext) {
|
5
6
|
server.com.atproto.admin.deleteAccount({
|
@@ -8,8 +9,12 @@ export default function (server: Server, ctx: AppContext) {
|
|
8
9
|
const { did } = input.body
|
9
10
|
await ctx.actorStore.destroy(did)
|
10
11
|
await ctx.accountManager.deleteAccount(did)
|
11
|
-
await ctx.sequencer.sequenceTombstone(did)
|
12
|
-
await ctx.sequencer.
|
12
|
+
const tombstoneSeq = await ctx.sequencer.sequenceTombstone(did)
|
13
|
+
const accountSeq = await ctx.sequencer.sequenceAccountEvt(
|
14
|
+
did,
|
15
|
+
AccountStatus.Deleted,
|
16
|
+
)
|
17
|
+
await ctx.sequencer.deleteAllForUser(did, [accountSeq, tombstoneSeq])
|
13
18
|
},
|
14
19
|
})
|
15
20
|
}
|
@@ -51,14 +51,15 @@ export default function (server: Server, ctx: AppContext) {
|
|
51
51
|
}
|
52
52
|
}
|
53
53
|
} else if (did) {
|
54
|
-
const
|
55
|
-
if (
|
54
|
+
const status = await ctx.accountManager.getAccountAdminStatus(did)
|
55
|
+
if (status) {
|
56
56
|
body = {
|
57
57
|
subject: {
|
58
58
|
$type: 'com.atproto.admin.defs#repoRef',
|
59
59
|
did: did,
|
60
60
|
},
|
61
|
-
takedown,
|
61
|
+
takedown: status.takedown,
|
62
|
+
deactivated: status.deactivated,
|
62
63
|
}
|
63
64
|
}
|
64
65
|
} else {
|
@@ -45,7 +45,7 @@ export default function (server: Server, ctx: AppContext) {
|
|
45
45
|
|
46
46
|
try {
|
47
47
|
await ctx.sequencer.sequenceHandleUpdate(did, handle)
|
48
|
-
await ctx.sequencer.sequenceIdentityEvt(did)
|
48
|
+
await ctx.sequencer.sequenceIdentityEvt(did, handle)
|
49
49
|
} catch (err) {
|
50
50
|
httpLogger.error(
|
51
51
|
{ err, did, handle },
|
@@ -17,6 +17,8 @@ export default function (server: Server, ctx: AppContext) {
|
|
17
17
|
if (takedown) {
|
18
18
|
if (isRepoRef(subject)) {
|
19
19
|
await ctx.accountManager.takedownAccount(subject.did, takedown)
|
20
|
+
const status = await ctx.accountManager.getAccountStatus(subject.did)
|
21
|
+
await ctx.sequencer.sequenceAccountEvt(subject.did, status)
|
20
22
|
} else if (isStrongRef(subject)) {
|
21
23
|
const uri = new AtUri(subject.uri)
|
22
24
|
await ctx.actorStore.transact(uri.hostname, (store) =>
|
@@ -3,7 +3,7 @@ import AppContext from '../../../../context'
|
|
3
3
|
|
4
4
|
export default function (server: Server, ctx: AppContext) {
|
5
5
|
server.com.atproto.identity.getRecommendedDidCredentials({
|
6
|
-
auth: ctx.authVerifier.
|
6
|
+
auth: ctx.authVerifier.accessStandard(),
|
7
7
|
handler: async ({ auth }) => {
|
8
8
|
const requester = auth.credentials.did
|
9
9
|
const signingKey = await ctx.actorStore.keypair(requester)
|
@@ -5,7 +5,7 @@ import { authPassthru } from '../../../proxy'
|
|
5
5
|
|
6
6
|
export default function (server: Server, ctx: AppContext) {
|
7
7
|
server.com.atproto.identity.requestPlcOperationSignature({
|
8
|
-
auth: ctx.authVerifier.accessFull,
|
8
|
+
auth: ctx.authVerifier.accessFull(),
|
9
9
|
handler: async ({ auth, req }) => {
|
10
10
|
if (ctx.entrywayAgent) {
|
11
11
|
await ctx.entrywayAgent.com.atproto.identity.requestPlcOperationSignature(
|
@@ -7,7 +7,7 @@ import { authPassthru, resultPassthru } from '../../../proxy'
|
|
7
7
|
|
8
8
|
export default function (server: Server, ctx: AppContext) {
|
9
9
|
server.com.atproto.identity.signPlcOperation({
|
10
|
-
auth: ctx.authVerifier.accessFull,
|
10
|
+
auth: ctx.authVerifier.accessFull(),
|
11
11
|
handler: async ({ auth, input, req }) => {
|
12
12
|
if (ctx.entrywayAgent) {
|
13
13
|
return resultPassthru(
|
@@ -7,7 +7,7 @@ import { httpLogger as log } from '../../../../logger'
|
|
7
7
|
|
8
8
|
export default function (server: Server, ctx: AppContext) {
|
9
9
|
server.com.atproto.identity.submitPlcOperation({
|
10
|
-
auth: ctx.authVerifier.
|
10
|
+
auth: ctx.authVerifier.accessStandard(),
|
11
11
|
handler: async ({ auth, input }) => {
|
12
12
|
const requester = auth.credentials.did
|
13
13
|
const op = input.body.operation
|
@@ -47,6 +47,7 @@ export default function (server: Server, ctx: AppContext) {
|
|
47
47
|
|
48
48
|
await ctx.plcClient.sendOperation(requester, op)
|
49
49
|
await ctx.sequencer.sequenceIdentityEvt(requester)
|
50
|
+
|
50
51
|
try {
|
51
52
|
await ctx.idResolver.did.resolve(requester, true)
|
52
53
|
} catch (err) {
|
@@ -8,7 +8,7 @@ import { authPassthru } from '../../../proxy'
|
|
8
8
|
|
9
9
|
export default function (server: Server, ctx: AppContext) {
|
10
10
|
server.com.atproto.identity.updateHandle({
|
11
|
-
auth: ctx.authVerifier.
|
11
|
+
auth: ctx.authVerifier.accessStandard({ checkTakedown: true }),
|
12
12
|
rateLimit: [
|
13
13
|
{
|
14
14
|
durationMs: 5 * MINUTE,
|
@@ -57,7 +57,7 @@ export default function (server: Server, ctx: AppContext) {
|
|
57
57
|
|
58
58
|
try {
|
59
59
|
await ctx.sequencer.sequenceHandleUpdate(requester, handle)
|
60
|
-
await ctx.sequencer.sequenceIdentityEvt(requester)
|
60
|
+
await ctx.sequencer.sequenceIdentityEvt(requester, handle)
|
61
61
|
} catch (err) {
|
62
62
|
httpLogger.error(
|
63
63
|
{ err, did: requester, handle },
|
@@ -31,7 +31,10 @@ const ratelimitPoints = ({ input }: { input: HandlerInput }) => {
|
|
31
31
|
|
32
32
|
export default function (server: Server, ctx: AppContext) {
|
33
33
|
server.com.atproto.repo.applyWrites({
|
34
|
-
auth: ctx.authVerifier.
|
34
|
+
auth: ctx.authVerifier.accessStandard({
|
35
|
+
checkTakedown: true,
|
36
|
+
checkDeactivated: true,
|
37
|
+
}),
|
35
38
|
rateLimit: [
|
36
39
|
{
|
37
40
|
name: 'repo-write-hour',
|
@@ -12,7 +12,10 @@ import AppContext from '../../../../context'
|
|
12
12
|
|
13
13
|
export default function (server: Server, ctx: AppContext) {
|
14
14
|
server.com.atproto.repo.createRecord({
|
15
|
-
auth: ctx.authVerifier.
|
15
|
+
auth: ctx.authVerifier.accessStandard({
|
16
|
+
checkTakedown: true,
|
17
|
+
checkDeactivated: true,
|
18
|
+
}),
|
16
19
|
rateLimit: [
|
17
20
|
{
|
18
21
|
name: 'repo-write-hour',
|
@@ -7,7 +7,10 @@ import { CID } from 'multiformats/cid'
|
|
7
7
|
|
8
8
|
export default function (server: Server, ctx: AppContext) {
|
9
9
|
server.com.atproto.repo.deleteRecord({
|
10
|
-
auth: ctx.authVerifier.
|
10
|
+
auth: ctx.authVerifier.accessStandard({
|
11
|
+
checkTakedown: true,
|
12
|
+
checkDeactivated: true,
|
13
|
+
}),
|
11
14
|
rateLimit: [
|
12
15
|
{
|
13
16
|
name: 'repo-write-hour',
|
@@ -3,15 +3,13 @@ import * as id from '@atproto/identity'
|
|
3
3
|
import { Server } from '../../../../lexicon'
|
4
4
|
import AppContext from '../../../../context'
|
5
5
|
import { INVALID_HANDLE } from '@atproto/syntax'
|
6
|
+
import { assertRepoAvailability } from '../sync/util'
|
6
7
|
|
7
8
|
export default function (server: Server, ctx: AppContext) {
|
8
9
|
server.com.atproto.repo.describeRepo(async ({ params }) => {
|
9
10
|
const { repo } = params
|
10
11
|
|
11
|
-
const account = await ctx
|
12
|
-
if (account === null) {
|
13
|
-
throw new InvalidRequestError(`Could not find user: ${repo}`)
|
14
|
-
}
|
12
|
+
const account = await assertRepoAvailability(ctx, repo, false)
|
15
13
|
|
16
14
|
let didDoc
|
17
15
|
try {
|
@@ -17,7 +17,9 @@ import { BlobRef, LexValue, RepoRecord } from '@atproto/lexicon'
|
|
17
17
|
|
18
18
|
export default function (server: Server, ctx: AppContext) {
|
19
19
|
server.com.atproto.repo.importRepo({
|
20
|
-
auth: ctx.authVerifier.accessFull
|
20
|
+
auth: ctx.authVerifier.accessFull({
|
21
|
+
checkTakedown: true,
|
22
|
+
}),
|
21
23
|
handler: async ({ input, auth }) => {
|
22
24
|
const did = auth.credentials.did
|
23
25
|
if (!ctx.cfg.service.acceptingImports) {
|
@@ -3,7 +3,7 @@ import AppContext from '../../../../context'
|
|
3
3
|
|
4
4
|
export default function (server: Server, ctx: AppContext) {
|
5
5
|
server.com.atproto.repo.listMissingBlobs({
|
6
|
-
auth: ctx.authVerifier.
|
6
|
+
auth: ctx.authVerifier.accessStandard(),
|
7
7
|
handler: async ({ auth, params }) => {
|
8
8
|
const did = auth.credentials.did
|
9
9
|
const { limit, cursor } = params
|
@@ -19,7 +19,10 @@ import { ActorStoreTransactor } from '../../../../actor-store'
|
|
19
19
|
|
20
20
|
export default function (server: Server, ctx: AppContext) {
|
21
21
|
server.com.atproto.repo.putRecord({
|
22
|
-
auth: ctx.authVerifier.
|
22
|
+
auth: ctx.authVerifier.accessStandard({
|
23
|
+
checkTakedown: true,
|
24
|
+
checkDeactivated: true,
|
25
|
+
}),
|
23
26
|
rateLimit: [
|
24
27
|
{
|
25
28
|
name: 'repo-write-hour',
|
@@ -6,7 +6,9 @@ import { BlobMetadata } from '../../../../actor-store/blob/transactor'
|
|
6
6
|
|
7
7
|
export default function (server: Server, ctx: AppContext) {
|
8
8
|
server.com.atproto.repo.uploadBlob({
|
9
|
-
auth: ctx.authVerifier.
|
9
|
+
auth: ctx.authVerifier.accessStandard({
|
10
|
+
checkTakedown: true,
|
11
|
+
}),
|
10
12
|
rateLimit: {
|
11
13
|
durationMs: DAY,
|
12
14
|
points: 1000,
|
@@ -7,7 +7,7 @@ import { assertValidDidDocumentForService } from './util'
|
|
7
7
|
|
8
8
|
export default function (server: Server, ctx: AppContext) {
|
9
9
|
server.com.atproto.server.activateAccount({
|
10
|
-
auth: ctx.authVerifier.accessFull,
|
10
|
+
auth: ctx.authVerifier.accessFull(),
|
11
11
|
handler: async ({ auth }) => {
|
12
12
|
const requester = auth.credentials.did
|
13
13
|
|
@@ -36,7 +36,8 @@ export default function (server: Server, ctx: AppContext) {
|
|
36
36
|
})
|
37
37
|
|
38
38
|
// @NOTE: we're over-emitting for now for backwards compatibility, can reduce this in the future
|
39
|
-
await ctx.
|
39
|
+
const status = await ctx.accountManager.getAccountStatus(requester)
|
40
|
+
await ctx.sequencer.sequenceAccountEvt(requester, status)
|
40
41
|
await ctx.sequencer.sequenceHandleUpdate(
|
41
42
|
requester,
|
42
43
|
account.handle ?? INVALID_HANDLE,
|
@@ -4,7 +4,7 @@ import { isValidDidDocForService } from './util'
|
|
4
4
|
|
5
5
|
export default function (server: Server, ctx: AppContext) {
|
6
6
|
server.com.atproto.server.checkAccountStatus({
|
7
|
-
auth: ctx.authVerifier.
|
7
|
+
auth: ctx.authVerifier.accessStandard(),
|
8
8
|
handler: async ({ auth }) => {
|
9
9
|
const requester = auth.credentials.did
|
10
10
|
const [
|
@@ -5,7 +5,7 @@ import { authPassthru } from '../../../proxy'
|
|
5
5
|
|
6
6
|
export default function (server: Server, ctx: AppContext) {
|
7
7
|
server.com.atproto.server.confirmEmail({
|
8
|
-
auth: ctx.authVerifier.
|
8
|
+
auth: ctx.authVerifier.accessStandard({ checkTakedown: true }),
|
9
9
|
handler: async ({ auth, input, req }) => {
|
10
10
|
const did = auth.credentials.did
|
11
11
|
|