@atproto/pds 0.5.15 → 0.5.16
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 +32 -0
- package/dist/account-manager/account-manager.d.ts +13 -13
- package/dist/account-manager/account-manager.d.ts.map +1 -1
- package/dist/account-manager/account-manager.js +1 -1
- package/dist/account-manager/account-manager.js.map +1 -1
- package/dist/account-manager/db/index.d.ts +1 -1
- package/dist/account-manager/db/index.d.ts.map +1 -1
- package/dist/account-manager/db/index.js.map +1 -1
- package/dist/account-manager/db/migrations/001-init.d.ts +1 -1
- package/dist/account-manager/db/migrations/001-init.d.ts.map +1 -1
- package/dist/account-manager/db/migrations/001-init.js.map +1 -1
- package/dist/account-manager/db/migrations/002-account-deactivation.d.ts +1 -1
- package/dist/account-manager/db/migrations/002-account-deactivation.d.ts.map +1 -1
- package/dist/account-manager/db/migrations/002-account-deactivation.js.map +1 -1
- package/dist/account-manager/db/migrations/003-privileged-app-passwords.d.ts +1 -1
- package/dist/account-manager/db/migrations/003-privileged-app-passwords.d.ts.map +1 -1
- package/dist/account-manager/db/migrations/003-privileged-app-passwords.js.map +1 -1
- package/dist/account-manager/db/migrations/004-oauth.d.ts +1 -1
- package/dist/account-manager/db/migrations/004-oauth.d.ts.map +1 -1
- package/dist/account-manager/db/migrations/004-oauth.js.map +1 -1
- package/dist/account-manager/db/migrations/005-oauth-account-management.d.ts +3 -3
- package/dist/account-manager/db/migrations/005-oauth-account-management.d.ts.map +1 -1
- package/dist/account-manager/db/migrations/005-oauth-account-management.js.map +1 -1
- package/dist/account-manager/db/migrations/006-oauth-permission-sets.d.ts +1 -1
- package/dist/account-manager/db/migrations/006-oauth-permission-sets.d.ts.map +1 -1
- package/dist/account-manager/db/migrations/006-oauth-permission-sets.js.map +1 -1
- package/dist/account-manager/db/migrations/007-lexicon-failures-index.d.ts +1 -1
- package/dist/account-manager/db/migrations/007-lexicon-failures-index.d.ts.map +1 -1
- package/dist/account-manager/db/migrations/007-lexicon-failures-index.js.map +1 -1
- package/dist/account-manager/db/schema/account-device.d.ts +2 -2
- package/dist/account-manager/db/schema/account-device.d.ts.map +1 -1
- package/dist/account-manager/db/schema/account-device.js.map +1 -1
- package/dist/account-manager/db/schema/account.d.ts +2 -2
- package/dist/account-manager/db/schema/account.d.ts.map +1 -1
- package/dist/account-manager/db/schema/account.js.map +1 -1
- package/dist/account-manager/db/schema/actor.d.ts +2 -2
- package/dist/account-manager/db/schema/actor.d.ts.map +1 -1
- package/dist/account-manager/db/schema/actor.js.map +1 -1
- package/dist/account-manager/db/schema/app-password.d.ts +1 -1
- package/dist/account-manager/db/schema/app-password.d.ts.map +1 -1
- package/dist/account-manager/db/schema/app-password.js.map +1 -1
- package/dist/account-manager/db/schema/authorization-request.d.ts +4 -4
- package/dist/account-manager/db/schema/authorization-request.d.ts.map +1 -1
- package/dist/account-manager/db/schema/authorization-request.js.map +1 -1
- package/dist/account-manager/db/schema/authorized-client.d.ts +4 -4
- package/dist/account-manager/db/schema/authorized-client.d.ts.map +1 -1
- package/dist/account-manager/db/schema/authorized-client.js.map +1 -1
- package/dist/account-manager/db/schema/device.d.ts +3 -3
- package/dist/account-manager/db/schema/device.d.ts.map +1 -1
- package/dist/account-manager/db/schema/device.js.map +1 -1
- package/dist/account-manager/db/schema/email-token.d.ts +1 -1
- package/dist/account-manager/db/schema/email-token.d.ts.map +1 -1
- package/dist/account-manager/db/schema/email-token.js.map +1 -1
- package/dist/account-manager/db/schema/index.d.ts +14 -14
- package/dist/account-manager/db/schema/index.d.ts.map +1 -1
- package/dist/account-manager/db/schema/index.js.map +1 -1
- package/dist/account-manager/db/schema/invite-code.d.ts +1 -1
- package/dist/account-manager/db/schema/invite-code.d.ts.map +1 -1
- package/dist/account-manager/db/schema/invite-code.js.map +1 -1
- package/dist/account-manager/db/schema/lexicon.d.ts +2 -2
- package/dist/account-manager/db/schema/lexicon.d.ts.map +1 -1
- package/dist/account-manager/db/schema/lexicon.js.map +1 -1
- package/dist/account-manager/db/schema/repo-root.d.ts +1 -1
- package/dist/account-manager/db/schema/repo-root.d.ts.map +1 -1
- package/dist/account-manager/db/schema/repo-root.js.map +1 -1
- package/dist/account-manager/db/schema/token.d.ts +4 -4
- package/dist/account-manager/db/schema/token.d.ts.map +1 -1
- package/dist/account-manager/db/schema/token.js.map +1 -1
- package/dist/account-manager/db/schema/used-refresh-token.d.ts +2 -2
- package/dist/account-manager/db/schema/used-refresh-token.d.ts.map +1 -1
- package/dist/account-manager/db/schema/used-refresh-token.js.map +1 -1
- package/dist/account-manager/helpers/account-device.d.ts +2 -2
- package/dist/account-manager/helpers/account-device.d.ts.map +1 -1
- package/dist/account-manager/helpers/account-device.js.map +1 -1
- package/dist/account-manager/helpers/account.d.ts +3 -3
- package/dist/account-manager/helpers/account.d.ts.map +1 -1
- package/dist/account-manager/helpers/account.js.map +1 -1
- package/dist/account-manager/helpers/auth.d.ts +3 -3
- package/dist/account-manager/helpers/auth.d.ts.map +1 -1
- package/dist/account-manager/helpers/auth.js.map +1 -1
- package/dist/account-manager/helpers/authorization-request.d.ts +5 -5
- package/dist/account-manager/helpers/authorization-request.d.ts.map +1 -1
- package/dist/account-manager/helpers/authorization-request.js.map +1 -1
- package/dist/account-manager/helpers/authorized-client.d.ts +2 -2
- package/dist/account-manager/helpers/authorized-client.d.ts.map +1 -1
- package/dist/account-manager/helpers/authorized-client.js.map +1 -1
- package/dist/account-manager/helpers/device.d.ts +3 -3
- package/dist/account-manager/helpers/device.d.ts.map +1 -1
- package/dist/account-manager/helpers/device.js.map +1 -1
- package/dist/account-manager/helpers/email-token.d.ts +2 -2
- package/dist/account-manager/helpers/email-token.d.ts.map +1 -1
- package/dist/account-manager/helpers/email-token.js.map +1 -1
- package/dist/account-manager/helpers/invite.d.ts +3 -3
- package/dist/account-manager/helpers/invite.d.ts.map +1 -1
- package/dist/account-manager/helpers/invite.js +1 -1
- package/dist/account-manager/helpers/invite.js.map +1 -1
- package/dist/account-manager/helpers/lexicon.d.ts +2 -2
- package/dist/account-manager/helpers/lexicon.d.ts.map +1 -1
- package/dist/account-manager/helpers/lexicon.js +1 -1
- package/dist/account-manager/helpers/lexicon.js.map +1 -1
- package/dist/account-manager/helpers/password.d.ts +3 -3
- package/dist/account-manager/helpers/password.d.ts.map +1 -1
- package/dist/account-manager/helpers/password.js.map +1 -1
- package/dist/account-manager/helpers/repo.d.ts +2 -2
- package/dist/account-manager/helpers/repo.d.ts.map +1 -1
- package/dist/account-manager/helpers/repo.js.map +1 -1
- package/dist/account-manager/helpers/token.d.ts +4 -4
- package/dist/account-manager/helpers/token.d.ts.map +1 -1
- package/dist/account-manager/helpers/token.js.map +1 -1
- package/dist/account-manager/helpers/used-refresh-token.d.ts +2 -2
- package/dist/account-manager/helpers/used-refresh-token.d.ts.map +1 -1
- package/dist/account-manager/helpers/used-refresh-token.js.map +1 -1
- package/dist/account-manager/oauth-store.d.ts +10 -10
- package/dist/account-manager/oauth-store.d.ts.map +1 -1
- package/dist/account-manager/oauth-store.js +3 -3
- package/dist/account-manager/oauth-store.js.map +1 -1
- package/dist/account-manager/scope-reference-getter.d.ts +4 -4
- package/dist/account-manager/scope-reference-getter.d.ts.map +1 -1
- package/dist/account-manager/scope-reference-getter.js +1 -1
- package/dist/account-manager/scope-reference-getter.js.map +1 -1
- package/dist/actor-store/actor-store-reader.d.ts +3 -3
- package/dist/actor-store/actor-store-reader.d.ts.map +1 -1
- package/dist/actor-store/actor-store-reader.js.map +1 -1
- package/dist/actor-store/actor-store-resources.d.ts +2 -2
- package/dist/actor-store/actor-store-resources.d.ts.map +1 -1
- package/dist/actor-store/actor-store-resources.js.map +1 -1
- package/dist/actor-store/actor-store-transactor.d.ts +3 -3
- package/dist/actor-store/actor-store-transactor.d.ts.map +1 -1
- package/dist/actor-store/actor-store-transactor.js.map +1 -1
- package/dist/actor-store/actor-store.d.ts +4 -4
- package/dist/actor-store/actor-store.d.ts.map +1 -1
- package/dist/actor-store/actor-store.js.map +1 -1
- package/dist/actor-store/blob/reader.d.ts +6 -6
- package/dist/actor-store/blob/reader.d.ts.map +1 -1
- package/dist/actor-store/blob/reader.js.map +1 -1
- package/dist/actor-store/blob/transactor.d.ts +8 -8
- package/dist/actor-store/blob/transactor.d.ts.map +1 -1
- package/dist/actor-store/blob/transactor.js.map +1 -1
- package/dist/actor-store/db/index.d.ts +1 -1
- package/dist/actor-store/db/index.d.ts.map +1 -1
- package/dist/actor-store/db/index.js.map +1 -1
- package/dist/actor-store/db/migrations/001-init.d.ts +1 -1
- package/dist/actor-store/db/migrations/001-init.d.ts.map +1 -1
- package/dist/actor-store/db/migrations/001-init.js.map +1 -1
- package/dist/actor-store/db/schema/account-pref.d.ts +1 -1
- package/dist/actor-store/db/schema/account-pref.d.ts.map +1 -1
- package/dist/actor-store/db/schema/account-pref.js.map +1 -1
- package/dist/actor-store/db/schema/index.d.ts +7 -7
- package/dist/actor-store/db/schema/index.d.ts.map +1 -1
- package/dist/actor-store/db/schema/index.js.map +1 -1
- package/dist/actor-store/migrate.d.ts +1 -1
- package/dist/actor-store/migrate.d.ts.map +1 -1
- package/dist/actor-store/migrate.js.map +1 -1
- package/dist/actor-store/preference/reader.d.ts +2 -2
- package/dist/actor-store/preference/reader.d.ts.map +1 -1
- package/dist/actor-store/preference/reader.js.map +1 -1
- package/dist/actor-store/preference/transactor.d.ts +2 -2
- package/dist/actor-store/preference/transactor.d.ts.map +1 -1
- package/dist/actor-store/preference/transactor.js.map +1 -1
- package/dist/actor-store/record/reader.d.ts +5 -5
- package/dist/actor-store/record/reader.d.ts.map +1 -1
- package/dist/actor-store/record/reader.js.map +1 -1
- package/dist/actor-store/record/transactor.d.ts +5 -5
- package/dist/actor-store/record/transactor.d.ts.map +1 -1
- package/dist/actor-store/record/transactor.js.map +1 -1
- package/dist/actor-store/repo/reader.d.ts +3 -3
- package/dist/actor-store/repo/reader.d.ts.map +1 -1
- package/dist/actor-store/repo/reader.js.map +1 -1
- package/dist/actor-store/repo/sql-repo-reader.d.ts +3 -3
- package/dist/actor-store/repo/sql-repo-reader.d.ts.map +1 -1
- package/dist/actor-store/repo/sql-repo-reader.js.map +1 -1
- package/dist/actor-store/repo/sql-repo-transactor.d.ts +3 -3
- package/dist/actor-store/repo/sql-repo-transactor.d.ts.map +1 -1
- package/dist/actor-store/repo/sql-repo-transactor.js.map +1 -1
- package/dist/actor-store/repo/transactor.d.ts +7 -7
- package/dist/actor-store/repo/transactor.d.ts.map +1 -1
- package/dist/actor-store/repo/transactor.js +1 -1
- package/dist/actor-store/repo/transactor.js.map +1 -1
- package/dist/api/app/bsky/actor/getPreferences.d.ts +2 -2
- package/dist/api/app/bsky/actor/getPreferences.d.ts.map +1 -1
- package/dist/api/app/bsky/actor/getPreferences.js.map +1 -1
- package/dist/api/app/bsky/actor/getProfile.d.ts +2 -2
- package/dist/api/app/bsky/actor/getProfile.d.ts.map +1 -1
- package/dist/api/app/bsky/actor/getProfile.js.map +1 -1
- package/dist/api/app/bsky/actor/getProfiles.d.ts +2 -2
- package/dist/api/app/bsky/actor/getProfiles.d.ts.map +1 -1
- package/dist/api/app/bsky/actor/getProfiles.js.map +1 -1
- package/dist/api/app/bsky/actor/index.d.ts +2 -2
- package/dist/api/app/bsky/actor/index.d.ts.map +1 -1
- package/dist/api/app/bsky/actor/index.js.map +1 -1
- package/dist/api/app/bsky/actor/putPreferences.d.ts +2 -2
- package/dist/api/app/bsky/actor/putPreferences.d.ts.map +1 -1
- package/dist/api/app/bsky/actor/putPreferences.js.map +1 -1
- package/dist/api/app/bsky/feed/getActorLikes.d.ts +2 -2
- package/dist/api/app/bsky/feed/getActorLikes.d.ts.map +1 -1
- package/dist/api/app/bsky/feed/getActorLikes.js.map +1 -1
- package/dist/api/app/bsky/feed/getAuthorFeed.d.ts +2 -2
- package/dist/api/app/bsky/feed/getAuthorFeed.d.ts.map +1 -1
- package/dist/api/app/bsky/feed/getAuthorFeed.js.map +1 -1
- package/dist/api/app/bsky/feed/getFeed.d.ts +2 -2
- package/dist/api/app/bsky/feed/getFeed.d.ts.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.d.ts +2 -2
- package/dist/api/app/bsky/feed/getPostThread.d.ts.map +1 -1
- package/dist/api/app/bsky/feed/getPostThread.js.map +1 -1
- package/dist/api/app/bsky/feed/getTimeline.d.ts +2 -2
- package/dist/api/app/bsky/feed/getTimeline.d.ts.map +1 -1
- package/dist/api/app/bsky/feed/getTimeline.js.map +1 -1
- package/dist/api/app/bsky/feed/index.d.ts +2 -2
- package/dist/api/app/bsky/feed/index.d.ts.map +1 -1
- package/dist/api/app/bsky/feed/index.js.map +1 -1
- package/dist/api/app/bsky/index.d.ts +2 -2
- package/dist/api/app/bsky/index.d.ts.map +1 -1
- package/dist/api/app/bsky/index.js.map +1 -1
- package/dist/api/app/bsky/notification/index.d.ts +2 -2
- package/dist/api/app/bsky/notification/index.d.ts.map +1 -1
- package/dist/api/app/bsky/notification/index.js.map +1 -1
- package/dist/api/app/bsky/notification/registerPush.d.ts +2 -2
- package/dist/api/app/bsky/notification/registerPush.d.ts.map +1 -1
- package/dist/api/app/bsky/notification/registerPush.js.map +1 -1
- package/dist/api/app/bsky/notification/unregisterPush.d.ts +2 -2
- package/dist/api/app/bsky/notification/unregisterPush.d.ts.map +1 -1
- package/dist/api/app/bsky/notification/unregisterPush.js.map +1 -1
- package/dist/api/app/bsky/util/resolver.d.ts +1 -1
- package/dist/api/app/bsky/util/resolver.d.ts.map +1 -1
- package/dist/api/app/bsky/util/resolver.js +1 -1
- package/dist/api/app/bsky/util/resolver.js.map +1 -1
- package/dist/api/com/atproto/admin/deleteAccount.d.ts +2 -2
- package/dist/api/com/atproto/admin/deleteAccount.d.ts.map +1 -1
- package/dist/api/com/atproto/admin/deleteAccount.js.map +1 -1
- package/dist/api/com/atproto/admin/disableAccountInvites.d.ts +2 -2
- package/dist/api/com/atproto/admin/disableAccountInvites.d.ts.map +1 -1
- package/dist/api/com/atproto/admin/disableAccountInvites.js.map +1 -1
- package/dist/api/com/atproto/admin/disableInviteCodes.d.ts +2 -2
- package/dist/api/com/atproto/admin/disableInviteCodes.d.ts.map +1 -1
- package/dist/api/com/atproto/admin/disableInviteCodes.js.map +1 -1
- package/dist/api/com/atproto/admin/enableAccountInvites.d.ts +2 -2
- package/dist/api/com/atproto/admin/enableAccountInvites.d.ts.map +1 -1
- package/dist/api/com/atproto/admin/enableAccountInvites.js.map +1 -1
- package/dist/api/com/atproto/admin/getAccountInfo.d.ts +2 -2
- package/dist/api/com/atproto/admin/getAccountInfo.d.ts.map +1 -1
- package/dist/api/com/atproto/admin/getAccountInfo.js.map +1 -1
- package/dist/api/com/atproto/admin/getAccountInfos.d.ts +2 -2
- package/dist/api/com/atproto/admin/getAccountInfos.d.ts.map +1 -1
- package/dist/api/com/atproto/admin/getAccountInfos.js.map +1 -1
- package/dist/api/com/atproto/admin/getInviteCodes.d.ts +3 -3
- package/dist/api/com/atproto/admin/getInviteCodes.d.ts.map +1 -1
- package/dist/api/com/atproto/admin/getInviteCodes.js.map +1 -1
- package/dist/api/com/atproto/admin/getSubjectStatus.d.ts +2 -2
- package/dist/api/com/atproto/admin/getSubjectStatus.d.ts.map +1 -1
- package/dist/api/com/atproto/admin/getSubjectStatus.js.map +1 -1
- package/dist/api/com/atproto/admin/index.d.ts +2 -2
- package/dist/api/com/atproto/admin/index.d.ts.map +1 -1
- package/dist/api/com/atproto/admin/index.js.map +1 -1
- package/dist/api/com/atproto/admin/sendEmail.d.ts +2 -2
- package/dist/api/com/atproto/admin/sendEmail.d.ts.map +1 -1
- package/dist/api/com/atproto/admin/sendEmail.js.map +1 -1
- package/dist/api/com/atproto/admin/updateAccountEmail.d.ts +2 -2
- package/dist/api/com/atproto/admin/updateAccountEmail.d.ts.map +1 -1
- package/dist/api/com/atproto/admin/updateAccountEmail.js.map +1 -1
- package/dist/api/com/atproto/admin/updateAccountHandle.d.ts +2 -2
- package/dist/api/com/atproto/admin/updateAccountHandle.d.ts.map +1 -1
- package/dist/api/com/atproto/admin/updateAccountHandle.js.map +1 -1
- package/dist/api/com/atproto/admin/updateAccountPassword.d.ts +2 -2
- package/dist/api/com/atproto/admin/updateAccountPassword.d.ts.map +1 -1
- package/dist/api/com/atproto/admin/updateAccountPassword.js.map +1 -1
- package/dist/api/com/atproto/admin/updateSubjectStatus.d.ts +2 -2
- package/dist/api/com/atproto/admin/updateSubjectStatus.d.ts.map +1 -1
- package/dist/api/com/atproto/admin/updateSubjectStatus.js.map +1 -1
- package/dist/api/com/atproto/admin/util.d.ts +4 -4
- package/dist/api/com/atproto/admin/util.d.ts.map +1 -1
- package/dist/api/com/atproto/admin/util.js.map +1 -1
- package/dist/api/com/atproto/identity/getRecommendedDidCredentials.d.ts +2 -2
- package/dist/api/com/atproto/identity/getRecommendedDidCredentials.d.ts.map +1 -1
- package/dist/api/com/atproto/identity/getRecommendedDidCredentials.js.map +1 -1
- package/dist/api/com/atproto/identity/index.d.ts +2 -2
- package/dist/api/com/atproto/identity/index.d.ts.map +1 -1
- package/dist/api/com/atproto/identity/index.js.map +1 -1
- package/dist/api/com/atproto/identity/requestPlcOperationSignature.d.ts +2 -2
- package/dist/api/com/atproto/identity/requestPlcOperationSignature.d.ts.map +1 -1
- package/dist/api/com/atproto/identity/requestPlcOperationSignature.js.map +1 -1
- package/dist/api/com/atproto/identity/resolveHandle.d.ts +2 -2
- package/dist/api/com/atproto/identity/resolveHandle.d.ts.map +1 -1
- package/dist/api/com/atproto/identity/resolveHandle.js.map +1 -1
- package/dist/api/com/atproto/identity/signPlcOperation.d.ts +2 -2
- package/dist/api/com/atproto/identity/signPlcOperation.d.ts.map +1 -1
- package/dist/api/com/atproto/identity/signPlcOperation.js.map +1 -1
- package/dist/api/com/atproto/identity/submitPlcOperation.d.ts +2 -2
- package/dist/api/com/atproto/identity/submitPlcOperation.d.ts.map +1 -1
- package/dist/api/com/atproto/identity/submitPlcOperation.js.map +1 -1
- package/dist/api/com/atproto/identity/updateHandle.d.ts +2 -2
- package/dist/api/com/atproto/identity/updateHandle.d.ts.map +1 -1
- package/dist/api/com/atproto/identity/updateHandle.js.map +1 -1
- package/dist/api/com/atproto/index.d.ts +2 -2
- package/dist/api/com/atproto/index.d.ts.map +1 -1
- package/dist/api/com/atproto/index.js.map +1 -1
- package/dist/api/com/atproto/moderation/createReport.d.ts +2 -2
- package/dist/api/com/atproto/moderation/createReport.d.ts.map +1 -1
- package/dist/api/com/atproto/moderation/createReport.js.map +1 -1
- package/dist/api/com/atproto/moderation/index.d.ts +2 -2
- package/dist/api/com/atproto/moderation/index.d.ts.map +1 -1
- package/dist/api/com/atproto/moderation/index.js.map +1 -1
- package/dist/api/com/atproto/repo/applyWrites.d.ts +2 -2
- package/dist/api/com/atproto/repo/applyWrites.d.ts.map +1 -1
- package/dist/api/com/atproto/repo/applyWrites.js.map +1 -1
- package/dist/api/com/atproto/repo/createRecord.d.ts +2 -2
- package/dist/api/com/atproto/repo/createRecord.d.ts.map +1 -1
- package/dist/api/com/atproto/repo/createRecord.js.map +1 -1
- package/dist/api/com/atproto/repo/deleteRecord.d.ts +2 -2
- package/dist/api/com/atproto/repo/deleteRecord.d.ts.map +1 -1
- package/dist/api/com/atproto/repo/deleteRecord.js.map +1 -1
- package/dist/api/com/atproto/repo/describeRepo.d.ts +2 -2
- package/dist/api/com/atproto/repo/describeRepo.d.ts.map +1 -1
- package/dist/api/com/atproto/repo/describeRepo.js.map +1 -1
- package/dist/api/com/atproto/repo/getRecord.d.ts +2 -2
- package/dist/api/com/atproto/repo/getRecord.d.ts.map +1 -1
- package/dist/api/com/atproto/repo/getRecord.js.map +1 -1
- package/dist/api/com/atproto/repo/importRepo.d.ts +2 -2
- package/dist/api/com/atproto/repo/importRepo.d.ts.map +1 -1
- package/dist/api/com/atproto/repo/importRepo.js.map +1 -1
- package/dist/api/com/atproto/repo/index.d.ts +2 -2
- package/dist/api/com/atproto/repo/index.d.ts.map +1 -1
- package/dist/api/com/atproto/repo/index.js.map +1 -1
- package/dist/api/com/atproto/repo/listMissingBlobs.d.ts +2 -2
- package/dist/api/com/atproto/repo/listMissingBlobs.d.ts.map +1 -1
- package/dist/api/com/atproto/repo/listMissingBlobs.js.map +1 -1
- package/dist/api/com/atproto/repo/listRecords.d.ts +2 -2
- package/dist/api/com/atproto/repo/listRecords.d.ts.map +1 -1
- package/dist/api/com/atproto/repo/listRecords.js.map +1 -1
- package/dist/api/com/atproto/repo/putRecord.d.ts +2 -2
- package/dist/api/com/atproto/repo/putRecord.d.ts.map +1 -1
- package/dist/api/com/atproto/repo/putRecord.js.map +1 -1
- package/dist/api/com/atproto/repo/uploadBlob.d.ts +2 -2
- package/dist/api/com/atproto/repo/uploadBlob.d.ts.map +1 -1
- package/dist/api/com/atproto/repo/uploadBlob.js +9 -2
- package/dist/api/com/atproto/repo/uploadBlob.js.map +1 -1
- package/dist/api/com/atproto/server/activateAccount.d.ts +2 -2
- package/dist/api/com/atproto/server/activateAccount.d.ts.map +1 -1
- package/dist/api/com/atproto/server/activateAccount.js.map +1 -1
- package/dist/api/com/atproto/server/checkAccountStatus.d.ts +2 -2
- package/dist/api/com/atproto/server/checkAccountStatus.d.ts.map +1 -1
- package/dist/api/com/atproto/server/checkAccountStatus.js.map +1 -1
- package/dist/api/com/atproto/server/confirmEmail.d.ts +2 -2
- package/dist/api/com/atproto/server/confirmEmail.d.ts.map +1 -1
- package/dist/api/com/atproto/server/confirmEmail.js.map +1 -1
- package/dist/api/com/atproto/server/createAccount.d.ts +2 -2
- package/dist/api/com/atproto/server/createAccount.d.ts.map +1 -1
- package/dist/api/com/atproto/server/createAccount.js +1 -1
- package/dist/api/com/atproto/server/createAccount.js.map +1 -1
- package/dist/api/com/atproto/server/createAppPassword.d.ts +2 -2
- package/dist/api/com/atproto/server/createAppPassword.d.ts.map +1 -1
- package/dist/api/com/atproto/server/createAppPassword.js.map +1 -1
- package/dist/api/com/atproto/server/createInviteCode.d.ts +2 -2
- package/dist/api/com/atproto/server/createInviteCode.d.ts.map +1 -1
- package/dist/api/com/atproto/server/createInviteCode.js.map +1 -1
- package/dist/api/com/atproto/server/createInviteCodes.d.ts +2 -2
- package/dist/api/com/atproto/server/createInviteCodes.d.ts.map +1 -1
- package/dist/api/com/atproto/server/createInviteCodes.js.map +1 -1
- package/dist/api/com/atproto/server/createSession.d.ts +2 -2
- package/dist/api/com/atproto/server/createSession.d.ts.map +1 -1
- package/dist/api/com/atproto/server/createSession.js +1 -1
- package/dist/api/com/atproto/server/createSession.js.map +1 -1
- package/dist/api/com/atproto/server/deactivateAccount.d.ts +2 -2
- package/dist/api/com/atproto/server/deactivateAccount.d.ts.map +1 -1
- package/dist/api/com/atproto/server/deactivateAccount.js.map +1 -1
- package/dist/api/com/atproto/server/deleteAccount.d.ts +2 -2
- package/dist/api/com/atproto/server/deleteAccount.d.ts.map +1 -1
- package/dist/api/com/atproto/server/deleteAccount.js.map +1 -1
- package/dist/api/com/atproto/server/deleteSession.d.ts +2 -2
- package/dist/api/com/atproto/server/deleteSession.d.ts.map +1 -1
- package/dist/api/com/atproto/server/deleteSession.js.map +1 -1
- package/dist/api/com/atproto/server/describeServer.d.ts +2 -2
- package/dist/api/com/atproto/server/describeServer.d.ts.map +1 -1
- package/dist/api/com/atproto/server/describeServer.js.map +1 -1
- package/dist/api/com/atproto/server/getAccountInviteCodes.d.ts +2 -2
- package/dist/api/com/atproto/server/getAccountInviteCodes.d.ts.map +1 -1
- package/dist/api/com/atproto/server/getAccountInviteCodes.js.map +1 -1
- package/dist/api/com/atproto/server/getServiceAuth.d.ts +2 -2
- package/dist/api/com/atproto/server/getServiceAuth.d.ts.map +1 -1
- package/dist/api/com/atproto/server/getServiceAuth.js.map +1 -1
- package/dist/api/com/atproto/server/getSession.d.ts +2 -2
- package/dist/api/com/atproto/server/getSession.d.ts.map +1 -1
- package/dist/api/com/atproto/server/getSession.js +1 -1
- package/dist/api/com/atproto/server/getSession.js.map +1 -1
- package/dist/api/com/atproto/server/index.d.ts +2 -2
- package/dist/api/com/atproto/server/index.d.ts.map +1 -1
- package/dist/api/com/atproto/server/index.js.map +1 -1
- package/dist/api/com/atproto/server/listAppPasswords.d.ts +2 -2
- package/dist/api/com/atproto/server/listAppPasswords.d.ts.map +1 -1
- package/dist/api/com/atproto/server/listAppPasswords.js.map +1 -1
- package/dist/api/com/atproto/server/refreshSession.d.ts +2 -2
- package/dist/api/com/atproto/server/refreshSession.d.ts.map +1 -1
- package/dist/api/com/atproto/server/refreshSession.js +1 -1
- package/dist/api/com/atproto/server/refreshSession.js.map +1 -1
- package/dist/api/com/atproto/server/requestAccountDelete.d.ts +2 -2
- package/dist/api/com/atproto/server/requestAccountDelete.d.ts.map +1 -1
- package/dist/api/com/atproto/server/requestAccountDelete.js.map +1 -1
- package/dist/api/com/atproto/server/requestEmailConfirmation.d.ts +3 -3
- package/dist/api/com/atproto/server/requestEmailConfirmation.d.ts.map +1 -1
- package/dist/api/com/atproto/server/requestEmailConfirmation.js.map +1 -1
- package/dist/api/com/atproto/server/requestEmailUpdate.d.ts +3 -3
- package/dist/api/com/atproto/server/requestEmailUpdate.d.ts.map +1 -1
- package/dist/api/com/atproto/server/requestEmailUpdate.js.map +1 -1
- package/dist/api/com/atproto/server/requestPasswordReset.d.ts +2 -2
- package/dist/api/com/atproto/server/requestPasswordReset.d.ts.map +1 -1
- package/dist/api/com/atproto/server/requestPasswordReset.js.map +1 -1
- package/dist/api/com/atproto/server/reserveSigningKey.d.ts +2 -2
- package/dist/api/com/atproto/server/reserveSigningKey.d.ts.map +1 -1
- package/dist/api/com/atproto/server/reserveSigningKey.js.map +1 -1
- package/dist/api/com/atproto/server/resetPassword.d.ts +2 -2
- package/dist/api/com/atproto/server/resetPassword.d.ts.map +1 -1
- package/dist/api/com/atproto/server/resetPassword.js.map +1 -1
- package/dist/api/com/atproto/server/revokeAppPassword.d.ts +2 -2
- package/dist/api/com/atproto/server/revokeAppPassword.d.ts.map +1 -1
- package/dist/api/com/atproto/server/revokeAppPassword.js.map +1 -1
- package/dist/api/com/atproto/server/updateEmail.d.ts +2 -2
- package/dist/api/com/atproto/server/updateEmail.d.ts.map +1 -1
- package/dist/api/com/atproto/server/updateEmail.js.map +1 -1
- package/dist/api/com/atproto/server/util.d.ts +4 -4
- package/dist/api/com/atproto/server/util.d.ts.map +1 -1
- package/dist/api/com/atproto/server/util.js.map +1 -1
- package/dist/api/com/atproto/sync/deprecated/getCheckout.d.ts +2 -2
- package/dist/api/com/atproto/sync/deprecated/getCheckout.d.ts.map +1 -1
- package/dist/api/com/atproto/sync/deprecated/getCheckout.js.map +1 -1
- package/dist/api/com/atproto/sync/deprecated/getHead.d.ts +2 -2
- package/dist/api/com/atproto/sync/deprecated/getHead.d.ts.map +1 -1
- package/dist/api/com/atproto/sync/deprecated/getHead.js.map +1 -1
- package/dist/api/com/atproto/sync/getBlob.d.ts +2 -2
- package/dist/api/com/atproto/sync/getBlob.d.ts.map +1 -1
- package/dist/api/com/atproto/sync/getBlob.js.map +1 -1
- package/dist/api/com/atproto/sync/getBlocks.d.ts +2 -2
- package/dist/api/com/atproto/sync/getBlocks.d.ts.map +1 -1
- package/dist/api/com/atproto/sync/getBlocks.js.map +1 -1
- package/dist/api/com/atproto/sync/getLatestCommit.d.ts +2 -2
- package/dist/api/com/atproto/sync/getLatestCommit.d.ts.map +1 -1
- package/dist/api/com/atproto/sync/getLatestCommit.js.map +1 -1
- package/dist/api/com/atproto/sync/getRecord.d.ts +2 -2
- package/dist/api/com/atproto/sync/getRecord.d.ts.map +1 -1
- package/dist/api/com/atproto/sync/getRecord.js.map +1 -1
- package/dist/api/com/atproto/sync/getRepo.d.ts +3 -3
- package/dist/api/com/atproto/sync/getRepo.d.ts.map +1 -1
- package/dist/api/com/atproto/sync/getRepo.js.map +1 -1
- package/dist/api/com/atproto/sync/getRepoStatus.d.ts +2 -2
- package/dist/api/com/atproto/sync/getRepoStatus.d.ts.map +1 -1
- package/dist/api/com/atproto/sync/getRepoStatus.js.map +1 -1
- package/dist/api/com/atproto/sync/index.d.ts +2 -2
- package/dist/api/com/atproto/sync/index.d.ts.map +1 -1
- package/dist/api/com/atproto/sync/index.js.map +1 -1
- package/dist/api/com/atproto/sync/listBlobs.d.ts +2 -2
- package/dist/api/com/atproto/sync/listBlobs.d.ts.map +1 -1
- package/dist/api/com/atproto/sync/listBlobs.js.map +1 -1
- package/dist/api/com/atproto/sync/listRepos.d.ts +3 -3
- package/dist/api/com/atproto/sync/listRepos.d.ts.map +1 -1
- package/dist/api/com/atproto/sync/listRepos.js +1 -1
- package/dist/api/com/atproto/sync/listRepos.js.map +1 -1
- package/dist/api/com/atproto/sync/subscribeRepos.d.ts +2 -2
- package/dist/api/com/atproto/sync/subscribeRepos.d.ts.map +1 -1
- package/dist/api/com/atproto/sync/subscribeRepos.js.map +1 -1
- package/dist/api/com/atproto/sync/util.d.ts +3 -3
- package/dist/api/com/atproto/sync/util.d.ts.map +1 -1
- package/dist/api/com/atproto/sync/util.js.map +1 -1
- package/dist/api/com/atproto/temp/checkSignupQueue.d.ts +2 -2
- package/dist/api/com/atproto/temp/checkSignupQueue.d.ts.map +1 -1
- package/dist/api/com/atproto/temp/checkSignupQueue.js.map +1 -1
- package/dist/api/com/atproto/temp/index.d.ts +2 -2
- package/dist/api/com/atproto/temp/index.d.ts.map +1 -1
- package/dist/api/com/atproto/temp/index.js.map +1 -1
- package/dist/api/index.d.ts +2 -2
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js.map +1 -1
- package/dist/api/proxy.d.ts +2 -2
- package/dist/api/proxy.d.ts.map +1 -1
- package/dist/api/proxy.js.map +1 -1
- package/dist/auth-output.d.ts +3 -3
- package/dist/auth-output.d.ts.map +1 -1
- package/dist/auth-output.js.map +1 -1
- package/dist/auth-routes.d.ts +1 -1
- package/dist/auth-routes.d.ts.map +1 -1
- package/dist/auth-routes.js +4 -2
- package/dist/auth-routes.js.map +1 -1
- package/dist/auth-verifier.d.ts +11 -11
- package/dist/auth-verifier.d.ts.map +1 -1
- package/dist/auth-verifier.js +2 -2
- package/dist/auth-verifier.js.map +1 -1
- package/dist/basic-routes.d.ts +1 -1
- package/dist/basic-routes.d.ts.map +1 -1
- package/dist/basic-routes.js.map +1 -1
- package/dist/config/config.d.ts +4 -3
- package/dist/config/config.d.ts.map +1 -1
- package/dist/config/config.js +1 -0
- package/dist/config/config.js.map +1 -1
- package/dist/config/env.d.ts +1 -0
- package/dist/config/env.d.ts.map +1 -1
- package/dist/config/env.js +1 -0
- package/dist/config/env.js.map +1 -1
- package/dist/config/secrets.d.ts +1 -1
- package/dist/config/secrets.d.ts.map +1 -1
- package/dist/config/secrets.js.map +1 -1
- package/dist/context.d.ts +8 -8
- package/dist/context.d.ts.map +1 -1
- package/dist/context.js +4 -2
- package/dist/context.js.map +1 -1
- package/dist/crawlers.d.ts +1 -1
- package/dist/crawlers.d.ts.map +1 -1
- package/dist/crawlers.js.map +1 -1
- package/dist/db/db.js.map +1 -1
- package/dist/db/migrator.d.ts +2 -2
- package/dist/db/migrator.d.ts.map +1 -1
- package/dist/db/migrator.js.map +1 -1
- package/dist/db/pagination.d.ts +2 -2
- package/dist/db/pagination.d.ts.map +1 -1
- package/dist/db/pagination.js.map +1 -1
- package/dist/db/tables/moderation.d.ts +2 -2
- package/dist/db/tables/moderation.d.ts.map +1 -1
- package/dist/db/tables/moderation.js.map +1 -1
- package/dist/db/util.d.ts +1 -1
- package/dist/db/util.d.ts.map +1 -1
- package/dist/db/util.js.map +1 -1
- package/dist/did-cache/db/index.d.ts +1 -1
- package/dist/did-cache/db/index.d.ts.map +1 -1
- package/dist/did-cache/db/index.js.map +1 -1
- package/dist/did-cache/db/migrations.d.ts +1 -1
- package/dist/did-cache/db/migrations.d.ts.map +1 -1
- package/dist/did-cache/db/migrations.js.map +1 -1
- package/dist/did-cache/index.d.ts +2 -2
- package/dist/did-cache/index.d.ts.map +1 -1
- package/dist/did-cache/index.js.map +1 -1
- package/dist/disk-blobstore.d.ts +3 -3
- package/dist/disk-blobstore.d.ts.map +1 -1
- package/dist/disk-blobstore.js.map +1 -1
- package/dist/error.d.ts +1 -1
- package/dist/error.d.ts.map +1 -1
- package/dist/error.js +1 -1
- package/dist/error.js.map +1 -1
- package/dist/image/image-url-builder.d.ts +1 -1
- package/dist/image/image-url-builder.d.ts.map +1 -1
- package/dist/image/image-url-builder.js.map +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/lexicons/app/bsky/actor/defs.defs.d.ts +1 -1
- package/dist/lexicons/app/bsky/actor/defs.defs.js.map +1 -1
- package/dist/logger.d.ts +1 -1
- package/dist/logger.d.ts.map +1 -1
- package/dist/logger.js.map +1 -1
- package/dist/mailer/index.d.ts +2 -2
- package/dist/mailer/index.d.ts.map +1 -1
- package/dist/mailer/index.js.map +1 -1
- package/dist/mailer/moderation.d.ts +2 -2
- package/dist/mailer/moderation.d.ts.map +1 -1
- package/dist/mailer/moderation.js.map +1 -1
- package/dist/pipethrough.d.ts +7 -7
- package/dist/pipethrough.d.ts.map +1 -1
- package/dist/pipethrough.js.map +1 -1
- package/dist/read-after-write/types.d.ts +4 -4
- package/dist/read-after-write/types.d.ts.map +1 -1
- package/dist/read-after-write/types.js.map +1 -1
- package/dist/read-after-write/util.d.ts +5 -5
- package/dist/read-after-write/util.d.ts.map +1 -1
- package/dist/read-after-write/util.js.map +1 -1
- package/dist/read-after-write/viewer.d.ts +7 -7
- package/dist/read-after-write/viewer.d.ts.map +1 -1
- package/dist/read-after-write/viewer.js +1 -1
- package/dist/read-after-write/viewer.js.map +1 -1
- package/dist/repo/prepare.d.ts +4 -4
- package/dist/repo/prepare.d.ts.map +1 -1
- package/dist/repo/prepare.js.map +1 -1
- package/dist/repo/types.d.ts +3 -3
- package/dist/repo/types.d.ts.map +1 -1
- package/dist/repo/types.js.map +1 -1
- package/dist/scripts/publish-identity.d.ts +2 -2
- package/dist/scripts/publish-identity.d.ts.map +1 -1
- package/dist/scripts/publish-identity.js.map +1 -1
- package/dist/scripts/rebuild-repo.d.ts +4 -4
- package/dist/scripts/rebuild-repo.d.ts.map +1 -1
- package/dist/scripts/rebuild-repo.js.map +1 -1
- package/dist/scripts/rotate-keys.d.ts +6 -6
- package/dist/scripts/rotate-keys.d.ts.map +1 -1
- package/dist/scripts/rotate-keys.js.map +1 -1
- package/dist/scripts/sequencer-recovery/index.d.ts +1 -1
- package/dist/scripts/sequencer-recovery/index.d.ts.map +1 -1
- package/dist/scripts/sequencer-recovery/index.js.map +1 -1
- package/dist/scripts/sequencer-recovery/recoverer.d.ts +4 -4
- package/dist/scripts/sequencer-recovery/recoverer.d.ts.map +1 -1
- package/dist/scripts/sequencer-recovery/recoverer.js.map +1 -1
- package/dist/scripts/sequencer-recovery/recovery-db.d.ts +1 -1
- package/dist/scripts/sequencer-recovery/recovery-db.d.ts.map +1 -1
- package/dist/scripts/sequencer-recovery/recovery-db.js.map +1 -1
- package/dist/scripts/sequencer-recovery/repair-repos.d.ts +1 -1
- package/dist/scripts/sequencer-recovery/repair-repos.d.ts.map +1 -1
- package/dist/scripts/sequencer-recovery/repair-repos.js.map +1 -1
- package/dist/sequencer/db/index.d.ts +1 -1
- package/dist/sequencer/db/index.d.ts.map +1 -1
- package/dist/sequencer/db/index.js.map +1 -1
- package/dist/sequencer/db/migrations/001-init.d.ts +1 -1
- package/dist/sequencer/db/migrations/001-init.d.ts.map +1 -1
- package/dist/sequencer/db/migrations/001-init.js.map +1 -1
- package/dist/sequencer/db/schema.d.ts +1 -1
- package/dist/sequencer/db/schema.d.ts.map +1 -1
- package/dist/sequencer/db/schema.js.map +1 -1
- package/dist/sequencer/events.d.ts +3 -3
- package/dist/sequencer/events.d.ts.map +1 -1
- package/dist/sequencer/events.js.map +1 -1
- package/dist/sequencer/outbox.d.ts +1 -1
- package/dist/sequencer/outbox.d.ts.map +1 -1
- package/dist/sequencer/outbox.js.map +1 -1
- package/dist/sequencer/sequencer.d.ts +5 -5
- package/dist/sequencer/sequencer.d.ts.map +1 -1
- package/dist/sequencer/sequencer.js.map +1 -1
- package/dist/util/compression.js.map +1 -1
- package/dist/util/http.d.ts +1 -1
- package/dist/util/http.d.ts.map +1 -1
- package/dist/util/http.js.map +1 -1
- package/dist/well-known.d.ts +1 -1
- package/dist/well-known.d.ts.map +1 -1
- package/dist/well-known.js.map +1 -1
- package/package.json +25 -25
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getAccountInfo.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/admin/getAccountInfo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,
|
|
1
|
+
{"version":3,"file":"getAccountInfo.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/admin/getAccountInfo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAe,MAAM,sBAAsB,CAAA;AAEvE,OAAO,EAAE,GAAG,EAAE,MAAM,+BAA+B,CAAA;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAA;AAE7C,MAAM,CAAC,OAAO,WAAW,MAAc,EAAE,GAAe;IACtD,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,cAAc,EAAE;QAC3C,IAAI,EAAE,GAAG,CAAC,YAAY,CAAC,SAAS;QAChC,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;YAC5B,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,SAAS,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;gBACtD,GAAG,CAAC,cAAc,CAAC,UAAU,CAAC,MAAM,CAAC,GAAG,EAAE;oBACxC,kBAAkB,EAAE,IAAI;oBACxB,gBAAgB,EAAE,IAAI;iBACvB,CAAC;gBACF,GAAG,CAAC,cAAc,CAAC,sBAAsB,CAAC,MAAM,CAAC,GAAG,CAAC;gBACrD,GAAG,CAAC,cAAc,CAAC,uBAAuB,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;aACzD,CAAC,CAAA;YACF,IAAI,CAAC,OAAO,EAAE,CAAC;gBACb,MAAM,IAAI,mBAAmB,CAAC,mBAAmB,EAAE,UAAU,CAAC,CAAA;YAChE,CAAC;YACD,MAAM,iBAAiB,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,QAAQ,CAAA;YAC3C,OAAO;gBACL,QAAQ,EAAE,kBAA2B;gBACrC,IAAI,EAAE,iBAAiB,CAAC,OAAO,EAAE;oBAC/B,iBAAiB;oBACjB,SAAS;oBACT,OAAO;iBACR,CAAC;aACH,CAAA;QACH,CAAC;KACF,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import { InvalidRequestError, type Server } from '@atproto/xrpc-server'\nimport type { AppContext } from '../../../../context.js'\nimport { com } from '../../../../lexicons/index.js'\nimport { formatAccountInfo } from './util.js'\n\nexport default function (server: Server, ctx: AppContext) {\n server.add(com.atproto.admin.getAccountInfo, {\n auth: ctx.authVerifier.moderator,\n handler: async ({ params }) => {\n const [account, invites, invitedBy] = await Promise.all([\n ctx.accountManager.getAccount(params.did, {\n includeDeactivated: true,\n includeTakenDown: true,\n }),\n ctx.accountManager.getAccountInvitesCodes(params.did),\n ctx.accountManager.getInvitedByForAccounts([params.did]),\n ])\n if (!account) {\n throw new InvalidRequestError('Account not found', 'NotFound')\n }\n const managesOwnInvites = !ctx.cfg.entryway\n return {\n encoding: 'application/json' as const,\n body: formatAccountInfo(account, {\n managesOwnInvites,\n invitedBy,\n invites,\n }),\n }\n },\n })\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Server } from '@atproto/xrpc-server';
|
|
2
|
-
import { AppContext } from '../../../../context.js';
|
|
1
|
+
import type { Server } from '@atproto/xrpc-server';
|
|
2
|
+
import type { AppContext } from '../../../../context.js';
|
|
3
3
|
export default function (server: Server, ctx: AppContext): void;
|
|
4
4
|
//# sourceMappingURL=getAccountInfos.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getAccountInfos.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/admin/getAccountInfos.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"getAccountInfos.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/admin/getAccountInfos.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAClD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAIxD,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QA4BvD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getAccountInfos.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/admin/getAccountInfos.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,GAAG,EAAE,MAAM,+BAA+B,CAAA;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAA;AAE7C,MAAM,CAAC,OAAO,WAAW,MAAc,EAAE,GAAe;IACtD,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,eAAe,EAAE;QAC5C,IAAI,EAAE,GAAG,CAAC,YAAY,CAAC,SAAS;QAChC,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;YAC5B,MAAM,CAAC,QAAQ,EAAE,OAAO,EAAE,SAAS,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;gBACvD,GAAG,CAAC,cAAc,CAAC,WAAW,CAAC,MAAM,CAAC,IAAI,EAAE;oBAC1C,kBAAkB,EAAE,IAAI;oBACxB,gBAAgB,EAAE,IAAI;iBACvB,CAAC;gBACF,GAAG,CAAC,cAAc,CAAC,uBAAuB,CAAC,MAAM,CAAC,IAAI,CAAC;gBACvD,GAAG,CAAC,cAAc,CAAC,uBAAuB,CAAC,MAAM,CAAC,IAAI,CAAC;aACxD,CAAC,CAAA;YAEF,MAAM,iBAAiB,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,QAAQ,CAAA;YAC3C,MAAM,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE;gBAC1D,OAAO,iBAAiB,CAAC,OAAO,EAAE;oBAChC,iBAAiB;oBACjB,SAAS;oBACT,OAAO;iBACR,CAAC,CAAA;YACJ,CAAC,CAAC,CAAA;YAEF,OAAO;gBACL,QAAQ,EAAE,kBAA2B;gBACrC,IAAI,EAAE,EAAE,KAAK,EAAE;aAChB,CAAA;QACH,CAAC;KACF,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import { Server } from '@atproto/xrpc-server'\nimport { AppContext } from '../../../../context.js'\nimport { com } from '../../../../lexicons/index.js'\nimport { formatAccountInfo } from './util.js'\n\nexport default function (server: Server, ctx: AppContext) {\n server.add(com.atproto.admin.getAccountInfos, {\n auth: ctx.authVerifier.moderator,\n handler: async ({ params }) => {\n const [accounts, invites, invitedBy] = await Promise.all([\n ctx.accountManager.getAccounts(params.dids, {\n includeDeactivated: true,\n includeTakenDown: true,\n }),\n ctx.accountManager.getAccountsInvitesCodes(params.dids),\n ctx.accountManager.getInvitedByForAccounts(params.dids),\n ])\n\n const managesOwnInvites = !ctx.cfg.entryway\n const infos = Array.from(accounts.values()).map((account) => {\n return formatAccountInfo(account, {\n managesOwnInvites,\n invitedBy,\n invites,\n })\n })\n\n return {\n encoding: 'application/json' as const,\n body: { infos },\n }\n },\n })\n}\n"]}
|
|
1
|
+
{"version":3,"file":"getAccountInfos.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/admin/getAccountInfos.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,GAAG,EAAE,MAAM,+BAA+B,CAAA;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAA;AAE7C,MAAM,CAAC,OAAO,WAAW,MAAc,EAAE,GAAe;IACtD,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,eAAe,EAAE;QAC5C,IAAI,EAAE,GAAG,CAAC,YAAY,CAAC,SAAS;QAChC,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;YAC5B,MAAM,CAAC,QAAQ,EAAE,OAAO,EAAE,SAAS,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;gBACvD,GAAG,CAAC,cAAc,CAAC,WAAW,CAAC,MAAM,CAAC,IAAI,EAAE;oBAC1C,kBAAkB,EAAE,IAAI;oBACxB,gBAAgB,EAAE,IAAI;iBACvB,CAAC;gBACF,GAAG,CAAC,cAAc,CAAC,uBAAuB,CAAC,MAAM,CAAC,IAAI,CAAC;gBACvD,GAAG,CAAC,cAAc,CAAC,uBAAuB,CAAC,MAAM,CAAC,IAAI,CAAC;aACxD,CAAC,CAAA;YAEF,MAAM,iBAAiB,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,QAAQ,CAAA;YAC3C,MAAM,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE;gBAC1D,OAAO,iBAAiB,CAAC,OAAO,EAAE;oBAChC,iBAAiB;oBACjB,SAAS;oBACT,OAAO;iBACR,CAAC,CAAA;YACJ,CAAC,CAAC,CAAA;YAEF,OAAO;gBACL,QAAQ,EAAE,kBAA2B;gBACrC,IAAI,EAAE,EAAE,KAAK,EAAE;aAChB,CAAA;QACH,CAAC;KACF,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import type { Server } from '@atproto/xrpc-server'\nimport type { AppContext } from '../../../../context.js'\nimport { com } from '../../../../lexicons/index.js'\nimport { formatAccountInfo } from './util.js'\n\nexport default function (server: Server, ctx: AppContext) {\n server.add(com.atproto.admin.getAccountInfos, {\n auth: ctx.authVerifier.moderator,\n handler: async ({ params }) => {\n const [accounts, invites, invitedBy] = await Promise.all([\n ctx.accountManager.getAccounts(params.dids, {\n includeDeactivated: true,\n includeTakenDown: true,\n }),\n ctx.accountManager.getAccountsInvitesCodes(params.dids),\n ctx.accountManager.getInvitedByForAccounts(params.dids),\n ])\n\n const managesOwnInvites = !ctx.cfg.entryway\n const infos = Array.from(accounts.values()).map((account) => {\n return formatAccountInfo(account, {\n managesOwnInvites,\n invitedBy,\n invites,\n })\n })\n\n return {\n encoding: 'application/json' as const,\n body: { infos },\n }\n },\n })\n}\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Server } from '@atproto/xrpc-server';
|
|
2
|
-
import { AppContext } from '../../../../context.js';
|
|
3
|
-
import { Cursor, GenericKeyset, LabeledResult } from '../../../../db/pagination.js';
|
|
1
|
+
import { type Server } from '@atproto/xrpc-server';
|
|
2
|
+
import type { AppContext } from '../../../../context.js';
|
|
3
|
+
import { type Cursor, GenericKeyset, type LabeledResult } from '../../../../db/pagination.js';
|
|
4
4
|
export default function (server: Server, ctx: AppContext): void;
|
|
5
5
|
type TimeCodeResult = {
|
|
6
6
|
createdAt: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getInviteCodes.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/admin/getInviteCodes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,MAAM,EAAE,MAAM,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"getInviteCodes.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/admin/getInviteCodes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAKvE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AACxD,OAAO,EACL,KAAK,MAAM,EACX,aAAa,EACb,KAAK,aAAa,EAEnB,MAAM,8BAA8B,CAAA;AAGrC,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QAiDvD;AAgBD,KAAK,cAAc,GAAG;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAA;AAEzD,qBAAa,cAAe,SAAQ,aAAa,CAAC,cAAc,EAAE,MAAM,CAAC;IACvE,WAAW,CAAC,MAAM,EAAE,cAAc,GAAG,MAAM,CAE1C;IACD,qBAAqB,CAAC,OAAO,EAAE,MAAM;QAEjC,OAAO;QACP,SAAS;MAEZ;IACD,qBAAqB,CAAC,MAAM,EAAE,MAAM;QAMhC,OAAO;QACP,SAAS;MAEZ;CACF;AAED,KAAK,aAAa,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAA;AAEnD,qBAAa,aAAc,SAAQ,aAAa,CAAC,aAAa,EAAE,aAAa,CAAC;IAC5E,WAAW,CAAC,MAAM,EAAE,aAAa,GAAG,aAAa,CAEhD;IACD,qBAAqB,CAAC,OAAO,EAAE,MAAM;QAEjC,OAAO;QACP,SAAS;MAEZ;IACD,qBAAqB,CAAC,MAAM,EAAE,MAAM;QAMhC,OAAO;QACP,SAAS;MAEZ;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getInviteCodes.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/admin/getInviteCodes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,
|
|
1
|
+
{"version":3,"file":"getInviteCodes.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/admin/getInviteCodes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAe,MAAM,sBAAsB,CAAA;AACvE,OAAO,EAEL,mBAAmB,GACpB,MAAM,+CAA+C,CAAA;AAEtD,OAAO,EAEL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,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;YACvD,SAAS,EAAE,OAAO,CAAC,SAAS;SAC7B,CAAA;IACH,CAAC;IACD,qBAAqB,CAAC,MAAc;QAClC,MAAM,WAAW,GAAG,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAA;QAC1D,IAAI,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC;YACjC,MAAM,IAAI,mBAAmB,CAAC,kBAAkB,CAAC,CAAA;QACnD,CAAC;QACD,OAAO;YACL,OAAO,EAAE,WAAW,CAAC,WAAW,EAAE;YAClC,SAAS,EAAE,MAAM,CAAC,SAAS;SAC5B,CAAA;IACH,CAAC;CACF;AAID,MAAM,OAAO,aAAc,SAAQ,aAA2C;IAC5E,WAAW,CAAC,MAAqB;QAC/B,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,IAAI,EAAE,SAAS,EAAE,MAAM,CAAC,IAAI,EAAE,CAAA;IACzD,CAAC;IACD,qBAAqB,CAAC,OAAe;QACnC,OAAO;YACL,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,QAAQ,EAAE;YACnC,SAAS,EAAE,OAAO,CAAC,SAAS;SAC7B,CAAA;IACH,CAAC;IACD,qBAAqB,CAAC,MAAc;QAClC,MAAM,WAAW,GAAG,QAAQ,CAAC,MAAM,CAAC,OAAO,EAAE,EAAE,CAAC,CAAA;QAChD,IAAI,KAAK,CAAC,WAAW,CAAC,EAAE,CAAC;YACvB,MAAM,IAAI,mBAAmB,CAAC,kBAAkB,CAAC,CAAA;QACnD,CAAC;QACD,OAAO;YACL,OAAO,EAAE,WAAW;YACpB,SAAS,EAAE,MAAM,CAAC,SAAS;SAC5B,CAAA;IACH,CAAC;CACF","sourcesContent":["import { InvalidRequestError, type Server } from '@atproto/xrpc-server'\nimport {\n type CodeDetail,\n selectInviteCodesQb,\n} from '../../../../account-manager/helpers/invite.js'\nimport type { AppContext } from '../../../../context.js'\nimport {\n type Cursor,\n GenericKeyset,\n type LabeledResult,\n paginate,\n} from '../../../../db/pagination.js'\nimport { com } from '../../../../lexicons/index.js'\n\nexport default function (server: Server, ctx: AppContext) {\n if (ctx.cfg.entryway) {\n server.add(com.atproto.admin.getInviteCodes, () => {\n throw new InvalidRequestError(\n 'Account invites are managed by the entryway service',\n )\n })\n return\n }\n\n server.add(com.atproto.admin.getInviteCodes, {\n auth: ctx.authVerifier.moderator,\n handler: async ({\n params,\n }): Promise<com.atproto.admin.getInviteCodes.$Output> => {\n const { sort, limit, cursor } = params\n const db = ctx.accountManager.db\n const keyset = createKeyset(ctx, sort)\n\n const builder = selectInviteCodesQb(db)\n\n const res = await paginate(builder, {\n limit,\n cursor,\n keyset,\n }).execute()\n\n const codes = res.map((row) => row.code)\n const uses = await ctx.accountManager.getInviteCodesUses(codes)\n\n const resultCursor = keyset.packFromResult(res)\n const codeDetails = res.map(\n ({ disabled, createdAt, ...row }): CodeDetail => ({\n ...row,\n createdAt,\n disabled: disabled === 1,\n uses: uses[row.code] ?? [],\n }),\n )\n\n return {\n encoding: 'application/json' as const,\n body: {\n cursor: resultCursor,\n codes: codeDetails,\n },\n }\n },\n })\n}\n\nfunction createKeyset(ctx: AppContext, sort?: string): GenericKeyset<any, any> {\n const { ref } = ctx.accountManager.db.db.dynamic\n\n if (sort === 'recent') {\n return new TimeCodeKeyset(ref('createdAt'), ref('code'))\n }\n\n if (sort === 'usage') {\n return new UseCodeKeyset(ref('uses'), ref('code'))\n }\n\n throw new InvalidRequestError(`unknown sort method: ${sort}`)\n}\n\ntype TimeCodeResult = { createdAt: string; code: string }\n\nexport class TimeCodeKeyset extends GenericKeyset<TimeCodeResult, Cursor> {\n labelResult(result: TimeCodeResult): Cursor {\n return { primary: result.createdAt, secondary: result.code }\n }\n labeledResultToCursor(labeled: Cursor) {\n return {\n primary: new Date(labeled.primary).getTime().toString(),\n secondary: labeled.secondary,\n }\n }\n cursorToLabeledResult(cursor: Cursor) {\n const primaryDate = new Date(parseInt(cursor.primary, 10))\n if (isNaN(primaryDate.getTime())) {\n throw new InvalidRequestError('Malformed cursor')\n }\n return {\n primary: primaryDate.toISOString(),\n secondary: cursor.secondary,\n }\n }\n}\n\ntype UseCodeResult = { uses: number; code: string }\n\nexport class UseCodeKeyset extends GenericKeyset<UseCodeResult, LabeledResult> {\n labelResult(result: UseCodeResult): LabeledResult {\n return { primary: result.uses, secondary: result.code }\n }\n labeledResultToCursor(labeled: Cursor) {\n return {\n primary: labeled.primary.toString(),\n secondary: labeled.secondary,\n }\n }\n cursorToLabeledResult(cursor: Cursor) {\n const primaryCode = parseInt(cursor.primary, 10)\n if (isNaN(primaryCode)) {\n throw new InvalidRequestError('Malformed cursor')\n }\n return {\n primary: primaryCode,\n secondary: cursor.secondary,\n }\n }\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Server } from '@atproto/xrpc-server';
|
|
2
|
-
import { AppContext } from '../../../../context.js';
|
|
1
|
+
import { type Server } from '@atproto/xrpc-server';
|
|
2
|
+
import type { AppContext } from '../../../../context.js';
|
|
3
3
|
export default function (server: Server, ctx: AppContext): void;
|
|
4
4
|
//# sourceMappingURL=getSubjectStatus.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getSubjectStatus.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/admin/getSubjectStatus.ts"],"names":[],"mappings":"AAEA,OAAO,EAAuB,MAAM,EAAE,MAAM,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"getSubjectStatus.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/admin/getSubjectStatus.ts"],"names":[],"mappings":"AAEA,OAAO,EAAuB,KAAK,MAAM,EAAE,MAAM,sBAAsB,CAAA;AACvE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAGxD,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QAqEvD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getSubjectStatus.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/admin/getSubjectStatus.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAC5C,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AACvC,OAAO,EAAE,mBAAmB,
|
|
1
|
+
{"version":3,"file":"getSubjectStatus.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/admin/getSubjectStatus.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAC5C,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AACvC,OAAO,EAAE,mBAAmB,EAAe,MAAM,sBAAsB,CAAA;AAEvE,OAAO,EAAE,GAAG,EAAE,MAAM,+BAA+B,CAAA;AAEnD,MAAM,CAAC,OAAO,WAAW,MAAc,EAAE,GAAe;IACtD,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,gBAAgB,EAAE;QAC7C,IAAI,EAAE,GAAG,CAAC,YAAY,CAAC,SAAS;QAChC,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;YAC5B,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,MAAM,CAAA;YACjC,IAAI,IAAI,GAA0D,IAAI,CAAA;YACtE,IAAI,IAAI,EAAE,CAAC;gBACT,IAAI,CAAC,GAAG,EAAE,CAAC;oBACT,MAAM,IAAI,mBAAmB,CAC3B,0CAA0C,CAC3C,CAAA;gBACH,CAAC;gBACD,MAAM,QAAQ,GAAG,MAAM,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,KAAK,EAAE,EAAE,CACxD,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,qBAAqB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AAA;gBACH,CAAC;YACH,CAAC;iBAAM,CAAC;gBACN,MAAM,IAAI,mBAAmB,CAAC,qBAAqB,CAAC,CAAA;YACtD,CAAC;YACD,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;gBAClB,MAAM,IAAI,mBAAmB,CAAC,mBAAmB,EAAE,UAAU,CAAC,CAAA;YAChE,CAAC;YACD,OAAO;gBACL,QAAQ,EAAE,kBAA2B;gBACrC,IAAI;aACL,CAAA;QACH,CAAC;KACF,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import { parseCid } from '@atproto/lex-data'\nimport { AtUri } from '@atproto/syntax'\nimport { InvalidRequestError, type Server } from '@atproto/xrpc-server'\nimport type { AppContext } from '../../../../context.js'\nimport { com } from '../../../../lexicons/index.js'\n\nexport default function (server: Server, ctx: AppContext) {\n server.add(com.atproto.admin.getSubjectStatus, {\n auth: ctx.authVerifier.moderator,\n handler: async ({ params }) => {\n const { did, uri, blob } = params\n let body: com.atproto.admin.getSubjectStatus.$OutputBody | null = null\n if (blob) {\n if (!did) {\n throw new InvalidRequestError(\n 'Must provide a did to request blob state',\n )\n }\n const takedown = await ctx.actorStore.read(did, (store) =>\n store.repo.blob.getBlobTakedownStatus(parseCid(blob)),\n )\n if (takedown) {\n body = {\n subject: {\n $type: 'com.atproto.admin.defs#repoBlobRef',\n did: did,\n cid: blob,\n },\n takedown,\n }\n }\n } else if (uri) {\n const parsedUri = new AtUri(uri)\n const [takedown, cid] = await ctx.actorStore.read(\n parsedUri.hostname,\n (store) =>\n Promise.all([\n store.record.getRecordTakedownStatus(parsedUri),\n store.record.getCurrentRecordCid(parsedUri),\n ]),\n )\n if (cid && takedown) {\n body = {\n subject: {\n $type: 'com.atproto.repo.strongRef',\n uri: parsedUri.toString(),\n cid: cid.toString(),\n },\n takedown,\n }\n }\n } else if (did) {\n const status = await ctx.accountManager.getAccountAdminStatus(did)\n if (status) {\n body = {\n subject: {\n $type: 'com.atproto.admin.defs#repoRef',\n did: did,\n },\n takedown: status.takedown,\n deactivated: status.deactivated,\n }\n }\n } else {\n throw new InvalidRequestError('No provided subject')\n }\n if (body === null) {\n throw new InvalidRequestError('Subject not found', 'NotFound')\n }\n return {\n encoding: 'application/json' as const,\n body,\n }\n },\n })\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Server } from '@atproto/xrpc-server';
|
|
2
|
-
import { AppContext } from '../../../../context.js';
|
|
1
|
+
import type { Server } from '@atproto/xrpc-server';
|
|
2
|
+
import type { AppContext } from '../../../../context.js';
|
|
3
3
|
export default function (server: Server, ctx: AppContext): void;
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/admin/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/admin/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAClD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAexD,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QAcvD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/admin/index.ts"],"names":[],"mappings":"AAEA,OAAO,aAAa,MAAM,oBAAoB,CAAA;AAC9C,OAAO,qBAAqB,MAAM,4BAA4B,CAAA;AAC9D,OAAO,kBAAkB,MAAM,yBAAyB,CAAA;AACxD,OAAO,oBAAoB,MAAM,2BAA2B,CAAA;AAC5D,OAAO,cAAc,MAAM,qBAAqB,CAAA;AAChD,OAAO,eAAe,MAAM,sBAAsB,CAAA;AAClD,OAAO,cAAc,MAAM,qBAAqB,CAAA;AAChD,OAAO,gBAAgB,MAAM,uBAAuB,CAAA;AACpD,OAAO,SAAS,MAAM,gBAAgB,CAAA;AACtC,OAAO,kBAAkB,MAAM,yBAAyB,CAAA;AACxD,OAAO,mBAAmB,MAAM,0BAA0B,CAAA;AAC1D,OAAO,qBAAqB,MAAM,4BAA4B,CAAA;AAC9D,OAAO,mBAAmB,MAAM,0BAA0B,CAAA;AAE1D,MAAM,CAAC,OAAO,WAAW,MAAc,EAAE,GAAe;IACtD,mBAAmB,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAChC,gBAAgB,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC7B,cAAc,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC3B,eAAe,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC5B,oBAAoB,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACjC,qBAAqB,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAClC,kBAAkB,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC/B,cAAc,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC3B,mBAAmB,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAChC,kBAAkB,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC/B,qBAAqB,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAClC,SAAS,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACtB,aAAa,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;AAC5B,CAAC","sourcesContent":["import { Server } from '@atproto/xrpc-server'\nimport { AppContext } from '../../../../context.js'\nimport deleteAccount from './deleteAccount.js'\nimport disableAccountInvites from './disableAccountInvites.js'\nimport disableInviteCodes from './disableInviteCodes.js'\nimport enableAccountInvites from './enableAccountInvites.js'\nimport getAccountInfo from './getAccountInfo.js'\nimport getAccountInfos from './getAccountInfos.js'\nimport getInviteCodes from './getInviteCodes.js'\nimport getSubjectStatus from './getSubjectStatus.js'\nimport sendEmail from './sendEmail.js'\nimport updateAccountEmail from './updateAccountEmail.js'\nimport updateAccountHandle from './updateAccountHandle.js'\nimport updateAccountPassword from './updateAccountPassword.js'\nimport updateSubjectStatus from './updateSubjectStatus.js'\n\nexport default function (server: Server, ctx: AppContext) {\n updateSubjectStatus(server, ctx)\n getSubjectStatus(server, ctx)\n getAccountInfo(server, ctx)\n getAccountInfos(server, ctx)\n enableAccountInvites(server, ctx)\n disableAccountInvites(server, ctx)\n disableInviteCodes(server, ctx)\n getInviteCodes(server, ctx)\n updateAccountHandle(server, ctx)\n updateAccountEmail(server, ctx)\n updateAccountPassword(server, ctx)\n sendEmail(server, ctx)\n deleteAccount(server, ctx)\n}\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/admin/index.ts"],"names":[],"mappings":"AAEA,OAAO,aAAa,MAAM,oBAAoB,CAAA;AAC9C,OAAO,qBAAqB,MAAM,4BAA4B,CAAA;AAC9D,OAAO,kBAAkB,MAAM,yBAAyB,CAAA;AACxD,OAAO,oBAAoB,MAAM,2BAA2B,CAAA;AAC5D,OAAO,cAAc,MAAM,qBAAqB,CAAA;AAChD,OAAO,eAAe,MAAM,sBAAsB,CAAA;AAClD,OAAO,cAAc,MAAM,qBAAqB,CAAA;AAChD,OAAO,gBAAgB,MAAM,uBAAuB,CAAA;AACpD,OAAO,SAAS,MAAM,gBAAgB,CAAA;AACtC,OAAO,kBAAkB,MAAM,yBAAyB,CAAA;AACxD,OAAO,mBAAmB,MAAM,0BAA0B,CAAA;AAC1D,OAAO,qBAAqB,MAAM,4BAA4B,CAAA;AAC9D,OAAO,mBAAmB,MAAM,0BAA0B,CAAA;AAE1D,MAAM,CAAC,OAAO,WAAW,MAAc,EAAE,GAAe;IACtD,mBAAmB,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAChC,gBAAgB,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC7B,cAAc,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC3B,eAAe,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC5B,oBAAoB,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACjC,qBAAqB,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAClC,kBAAkB,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC/B,cAAc,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC3B,mBAAmB,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAChC,kBAAkB,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC/B,qBAAqB,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAClC,SAAS,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACtB,aAAa,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;AAC5B,CAAC","sourcesContent":["import type { Server } from '@atproto/xrpc-server'\nimport type { AppContext } from '../../../../context.js'\nimport deleteAccount from './deleteAccount.js'\nimport disableAccountInvites from './disableAccountInvites.js'\nimport disableInviteCodes from './disableInviteCodes.js'\nimport enableAccountInvites from './enableAccountInvites.js'\nimport getAccountInfo from './getAccountInfo.js'\nimport getAccountInfos from './getAccountInfos.js'\nimport getInviteCodes from './getInviteCodes.js'\nimport getSubjectStatus from './getSubjectStatus.js'\nimport sendEmail from './sendEmail.js'\nimport updateAccountEmail from './updateAccountEmail.js'\nimport updateAccountHandle from './updateAccountHandle.js'\nimport updateAccountPassword from './updateAccountPassword.js'\nimport updateSubjectStatus from './updateSubjectStatus.js'\n\nexport default function (server: Server, ctx: AppContext) {\n updateSubjectStatus(server, ctx)\n getSubjectStatus(server, ctx)\n getAccountInfo(server, ctx)\n getAccountInfos(server, ctx)\n enableAccountInvites(server, ctx)\n disableAccountInvites(server, ctx)\n disableInviteCodes(server, ctx)\n getInviteCodes(server, ctx)\n updateAccountHandle(server, ctx)\n updateAccountEmail(server, ctx)\n updateAccountPassword(server, ctx)\n sendEmail(server, ctx)\n deleteAccount(server, ctx)\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Server } from '@atproto/xrpc-server';
|
|
2
|
-
import { AppContext } from '../../../../context.js';
|
|
1
|
+
import { type Server } from '@atproto/xrpc-server';
|
|
2
|
+
import type { AppContext } from '../../../../context.js';
|
|
3
3
|
export default function (server: Server, ctx: AppContext): void;
|
|
4
4
|
//# sourceMappingURL=sendEmail.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sendEmail.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/admin/sendEmail.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,MAAM,EAAE,MAAM,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"sendEmail.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/admin/sendEmail.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,MAAM,EAAE,MAAM,sBAAsB,CAAA;AACvE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAGxD,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QA0CvD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sendEmail.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/admin/sendEmail.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,
|
|
1
|
+
{"version":3,"file":"sendEmail.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/admin/sendEmail.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAe,MAAM,sBAAsB,CAAA;AAEvE,OAAO,EAAE,GAAG,EAAE,MAAM,+BAA+B,CAAA;AAEnD,MAAM,CAAC,OAAO,WAAW,MAAc,EAAE,GAAe;IACtD,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,KA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C,CAAA;AACJ,CAAC","sourcesContent":["import { InvalidRequestError, type Server } from '@atproto/xrpc-server'\nimport type { AppContext } from '../../../../context.js'\nimport { com } from '../../../../lexicons/index.js'\n\nexport default function (server: Server, ctx: AppContext) {\n server.add(com.atproto.admin.sendEmail, {\n auth: ctx.authVerifier.moderator,\n handler: async ({ input: { body }, req }) => {\n const { content, recipientDid, subject = 'Message via your PDS' } = body\n\n const account = await ctx.accountManager.getAccount(recipientDid, {\n includeDeactivated: true,\n includeTakenDown: true,\n })\n if (!account) {\n throw new InvalidRequestError('Recipient not found')\n }\n\n if (ctx.entrywayClient) {\n const { headers } = await ctx.entrywayAuthHeaders(\n req,\n recipientDid,\n com.atproto.admin.sendEmail.$lxm,\n )\n\n return ctx.entrywayClient.xrpc(com.atproto.admin.sendEmail, {\n headers,\n body,\n })\n }\n\n if (!account.email) {\n throw new InvalidRequestError('account does not have an email address')\n }\n\n await ctx.moderationMailer.send(\n { content },\n { subject, to: account.email },\n )\n\n return {\n encoding: 'application/json' as const,\n body: { sent: true },\n }\n },\n })\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Server } from '@atproto/xrpc-server';
|
|
2
|
-
import { AppContext } from '../../../../context.js';
|
|
1
|
+
import { type Server } from '@atproto/xrpc-server';
|
|
2
|
+
import type { AppContext } from '../../../../context.js';
|
|
3
3
|
export default function (server: Server, ctx: AppContext): void;
|
|
4
4
|
//# sourceMappingURL=updateAccountEmail.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updateAccountEmail.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/admin/updateAccountEmail.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,MAAM,EAAE,MAAM,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"updateAccountEmail.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/admin/updateAccountEmail.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,MAAM,EAAE,MAAM,sBAAsB,CAAA;AACvE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAGxD,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QA2BvD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updateAccountEmail.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/admin/updateAccountEmail.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,
|
|
1
|
+
{"version":3,"file":"updateAccountEmail.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/admin/updateAccountEmail.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAe,MAAM,sBAAsB,CAAA;AAEvE,OAAO,EAAE,GAAG,EAAE,MAAM,+BAA+B,CAAA;AAEnD,MAAM,CAAC,OAAO,WAAW,MAAc,EAAE,GAAe;IACtD,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,kBAAkB,EAAE;QAC/C,IAAI,EAAE,GAAG,CAAC,YAAY,CAAC,UAAU;QACjC,OAAO,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE;YAC1C,MAAM,OAAO,GAAG,MAAM,GAAG,CAAC,cAAc,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,EAAE;gBAChE,kBAAkB,EAAE,IAAI;gBACxB,gBAAgB,EAAE,IAAI;aACvB,CAAC,CAAA;YACF,IAAI,CAAC,OAAO,EAAE,CAAC;gBACb,MAAM,IAAI,mBAAmB,CAAC,2BAA2B,IAAI,CAAC,OAAO,EAAE,CAAC,CAAA;YAC1E,CAAC;YAED,IAAI,GAAG,CAAC,cAAc,EAAE,CAAC;gBACvB,MAAM,EAAE,OAAO,EAAE,GAAG,GAAG,CAAC,uBAAuB,CAAC,GAAG,CAAC,CAAA;gBACpD,MAAM,GAAG,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,kBAAkB,EAAE;oBAClE,OAAO;oBACP,IAAI;iBACL,CAAC,CAAA;gBACF,OAAM;YACR,CAAC;YAED,MAAM,GAAG,CAAC,cAAc,CAAC,kBAAkB,CAAC;gBAC1C,GAAG,EAAE,OAAO,CAAC,GAAG;gBAChB,KAAK,EAAE,IAAI,CAAC,KAAK;aAClB,CAAC,CAAA;QACJ,CAAC;KACF,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import { InvalidRequestError, type Server } from '@atproto/xrpc-server'\nimport type { AppContext } from '../../../../context.js'\nimport { com } from '../../../../lexicons/index.js'\n\nexport default function (server: Server, ctx: AppContext) {\n server.add(com.atproto.admin.updateAccountEmail, {\n auth: ctx.authVerifier.adminToken,\n handler: async ({ input: { body }, req }) => {\n const account = await ctx.accountManager.getAccount(body.account, {\n includeDeactivated: true,\n includeTakenDown: true,\n })\n if (!account) {\n throw new InvalidRequestError(`Account does not exist: ${body.account}`)\n }\n\n if (ctx.entrywayClient) {\n const { headers } = ctx.entrywayPassthruHeaders(req)\n await ctx.entrywayClient.xrpc(com.atproto.admin.updateAccountEmail, {\n headers,\n body,\n })\n return\n }\n\n await ctx.accountManager.updateAccountEmail({\n did: account.did,\n email: body.email,\n })\n },\n })\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Server } from '@atproto/xrpc-server';
|
|
2
|
-
import { AppContext } from '../../../../context.js';
|
|
1
|
+
import { type Server } from '@atproto/xrpc-server';
|
|
2
|
+
import type { AppContext } from '../../../../context.js';
|
|
3
3
|
export default function (server: Server, ctx: AppContext): void;
|
|
4
4
|
//# sourceMappingURL=updateAccountHandle.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updateAccountHandle.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/admin/updateAccountHandle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,MAAM,EAAE,MAAM,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"updateAccountHandle.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/admin/updateAccountHandle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,MAAM,EAAE,MAAM,sBAAsB,CAAA;AACvE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAGxD,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QA0CvD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updateAccountHandle.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/admin/updateAccountHandle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,
|
|
1
|
+
{"version":3,"file":"updateAccountHandle.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/admin/updateAccountHandle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAe,MAAM,sBAAsB,CAAA;AAEvE,OAAO,EAAE,GAAG,EAAE,MAAM,+BAA+B,CAAA;AAEnD,MAAM,CAAC,OAAO,WAAW,MAAc,EAAE,GAAe;IACtD,MAAM,EAAE,cAAc,EAAE,GAAG,GAAG,CAAA;IAE9B,IAAI,cAAc,EAAE,CAAC;QACnB,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,mBAAmB,EAAE;YAChD,IAAI,EAAE,GAAG,CAAC,YAAY,CAAC,UAAU;YACjC,OAAO,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE;gBACrC,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,MAAM,GAAG,CAAC,cAAc,CAAC,oBAAoB,CACnE,IAAI,CAAC,GAAG,EACR,IAAI,CAAC,MAAM,EACX,EAAE,aAAa,EAAE,IAAI,EAAE,CACxB,CAAA;gBAED,uEAAuE;gBACvE,0DAA0D;gBAC1D,6BAA6B;gBAC7B,EAAE;gBACF,oEAAoE;gBACpE,4EAA4E;gBAC5E,EAAE;gBACF,0EAA0E;gBAC1E,MAAM,GAAG,GAAG,MAAM,GAAG,CAAC,UAAU,CAAC,GAAG;qBACjC,kBAAkB,CAAC,GAAG,EAAE,IAAI,CAAC;qBAC7B,KAAK,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAA;gBAEzB,IAAI,CAAC,GAAG,IAAI,GAAG,CAAC,MAAM,KAAK,MAAM,EAAE,CAAC;oBAClC,MAAM,IAAI,mBAAmB,CAAC,+BAA+B,CAAC,CAAA;gBAChE,CAAC;gBAED,MAAM,GAAG,CAAC,cAAc,CAAC,mBAAmB,CAAC,GAAG,EAAE,MAAM,CAAC,CAAA;YAC3D,CAAC;SACF,CAAC,CAAA;IACJ,CAAC;SAAM,CAAC;QACN,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,mBAAmB,EAAE;YAChD,IAAI,EAAE,GAAG,CAAC,YAAY,CAAC,UAAU;YACjC,OAAO,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE;gBACrC,MAAM,GAAG,CAAC,cAAc,CAAC,YAAY,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,MAAM,EAAE;oBAC3D,aAAa,EAAE,IAAI;iBACpB,CAAC,CAAA;YACJ,CAAC;SACF,CAAC,CAAA;IACJ,CAAC;AACH,CAAC","sourcesContent":["import { InvalidRequestError, type Server } from '@atproto/xrpc-server'\nimport type { AppContext } from '../../../../context.js'\nimport { com } from '../../../../lexicons/index.js'\n\nexport default function (server: Server, ctx: AppContext) {\n const { entrywayClient } = ctx\n\n if (entrywayClient) {\n server.add(com.atproto.admin.updateAccountHandle, {\n auth: ctx.authVerifier.adminToken,\n handler: async ({ input: { body } }) => {\n const { did, handle } = await ctx.accountManager.validateHandleUpdate(\n body.did,\n body.handle,\n { allowAnyValid: true },\n )\n\n // the pds defers to the entryway for updating the handle in the user's\n // did doc. here was just check that the handle is already\n // bidirectionally confirmed.\n //\n // -> entryway(identity.updateHandle) [update handle, submit plc op]\n // -> pds(admin.updateAccountHandle) [track handle, sequence handle update]\n //\n // @TODO if handle is taken according to this PDS, should we force-update?\n const doc = await ctx.idResolver.did\n .resolveAtprotoData(did, true)\n .catch(() => undefined)\n\n if (!doc || doc.handle !== handle) {\n throw new InvalidRequestError('Handle does not match DID doc')\n }\n\n await ctx.accountManager.updateAccountHandle(did, handle)\n },\n })\n } else {\n server.add(com.atproto.admin.updateAccountHandle, {\n auth: ctx.authVerifier.adminToken,\n handler: async ({ input: { body } }) => {\n await ctx.accountManager.updateHandle(body.did, body.handle, {\n allowAnyValid: true,\n })\n },\n })\n }\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Server } from '@atproto/xrpc-server';
|
|
2
|
-
import { AppContext } from '../../../../context.js';
|
|
1
|
+
import { type Server } from '@atproto/xrpc-server';
|
|
2
|
+
import type { AppContext } from '../../../../context.js';
|
|
3
3
|
export default function (server: Server, ctx: AppContext): void;
|
|
4
4
|
//# sourceMappingURL=updateAccountPassword.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updateAccountPassword.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/admin/updateAccountPassword.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,MAAM,EAAE,MAAM,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"updateAccountPassword.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/admin/updateAccountPassword.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAEvE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAGxD,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QA4BvD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updateAccountPassword.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/admin/updateAccountPassword.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,
|
|
1
|
+
{"version":3,"file":"updateAccountPassword.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/admin/updateAccountPassword.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAe,MAAM,sBAAsB,CAAA;AACvE,OAAO,EAAE,uBAAuB,EAAE,MAAM,+CAA+C,CAAA;AAEvF,OAAO,EAAE,GAAG,EAAE,MAAM,+BAA+B,CAAA;AAEnD,MAAM,CAAC,OAAO,WAAW,MAAc,EAAE,GAAe;IACtD,MAAM,EAAE,cAAc,EAAE,GAAG,GAAG,CAAA;IAE9B,IAAI,cAAc,EAAE,CAAC;QACnB,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,qBAAqB,EAAE;YAClD,IAAI,EAAE,GAAG,CAAC,YAAY,CAAC,UAAU;YACjC,OAAO,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE;gBAC1C,MAAM,EAAE,OAAO,EAAE,GAAG,GAAG,CAAC,uBAAuB,CAAC,GAAG,CAAC,CAAA;gBACpD,MAAM,cAAc,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,qBAAqB,EAAE;oBACjE,IAAI;oBACJ,OAAO;iBACR,CAAC,CAAA;YACJ,CAAC;SACF,CAAC,CAAA;IACJ,CAAC;SAAM,CAAC;QACN,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,qBAAqB,EAAE;YAClD,IAAI,EAAE,GAAG,CAAC,YAAY,CAAC,UAAU;YACjC,OAAO,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE;gBACrC,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAA;gBAE9B,IAAI,QAAQ,CAAC,MAAM,GAAG,uBAAuB,EAAE,CAAC;oBAC9C,MAAM,IAAI,mBAAmB,CAAC,0BAA0B,CAAC,CAAA;gBAC3D,CAAC;gBAED,MAAM,GAAG,CAAC,cAAc,CAAC,qBAAqB,CAAC,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAA;YACnE,CAAC;SACF,CAAC,CAAA;IACJ,CAAC;AACH,CAAC","sourcesContent":["import { InvalidRequestError, type Server } from '@atproto/xrpc-server'\nimport { NEW_PASSWORD_MAX_LENGTH } from '../../../../account-manager/helpers/scrypt.js'\nimport type { AppContext } from '../../../../context.js'\nimport { com } from '../../../../lexicons/index.js'\n\nexport default function (server: Server, ctx: AppContext) {\n const { entrywayClient } = ctx\n\n if (entrywayClient) {\n server.add(com.atproto.admin.updateAccountPassword, {\n auth: ctx.authVerifier.adminToken,\n handler: async ({ input: { body }, req }) => {\n const { headers } = ctx.entrywayPassthruHeaders(req)\n await entrywayClient.xrpc(com.atproto.admin.updateAccountPassword, {\n body,\n headers,\n })\n },\n })\n } else {\n server.add(com.atproto.admin.updateAccountPassword, {\n auth: ctx.authVerifier.adminToken,\n handler: async ({ input: { body } }) => {\n const { did, password } = body\n\n if (password.length > NEW_PASSWORD_MAX_LENGTH) {\n throw new InvalidRequestError('Invalid password length.')\n }\n\n await ctx.accountManager.updateAccountPassword({ did, password })\n },\n })\n }\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Server } from '@atproto/xrpc-server';
|
|
2
|
-
import { AppContext } from '../../../../context.js';
|
|
1
|
+
import { type Server } from '@atproto/xrpc-server';
|
|
2
|
+
import type { AppContext } from '../../../../context.js';
|
|
3
3
|
export default function (server: Server, ctx: AppContext): void;
|
|
4
4
|
//# sourceMappingURL=updateSubjectStatus.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updateSubjectStatus.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/admin/updateSubjectStatus.ts"],"names":[],"mappings":"AAEA,OAAO,EAAuB,MAAM,EAAE,MAAM,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"updateSubjectStatus.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/admin/updateSubjectStatus.ts"],"names":[],"mappings":"AAEA,OAAO,EAAuB,KAAK,MAAM,EAAE,MAAM,sBAAsB,CAAA;AACvE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAGxD,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QA6DvD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updateSubjectStatus.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/admin/updateSubjectStatus.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAC5C,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AACvC,OAAO,EAAE,mBAAmB,
|
|
1
|
+
{"version":3,"file":"updateSubjectStatus.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/admin/updateSubjectStatus.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAC5C,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AACvC,OAAO,EAAE,mBAAmB,EAAe,MAAM,sBAAsB,CAAA;AAEvE,OAAO,EAAE,GAAG,EAAE,MAAM,+BAA+B,CAAA;AAEnD,MAAM,CAAC,OAAO,WAAW,MAAc,EAAE,GAAe;IACtD,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,mBAAmB,EAAE;QAChD,IAAI,E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AAI,CAAC,IAAI,CAAC,wBAAwB,CAC5C,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,EACrB,QAAQ,CACT,CAAA;oBACH,CAAC,CAAC,CAAA;gBACJ,CAAC;qBAAM,CAAC;oBACN,MAAM,IAAI,mBAAmB,CAAC,oBAAoB,OAAO,CAAC,KAAK,GAAG,CAAC,CAAA;gBACrE,CAAC;YACH,CAAC;YAED,IAAI,WAAW,EAAE,CAAC;gBAChB,IAAI,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,CAAC;oBACtD,IAAI,WAAW,CAAC,OAAO,EAAE,CAAC;wBACxB,MAAM,GAAG,CAAC,cAAc,CAAC,iBAAiB,CAAC,OAAO,CAAC,GAAG,CAAC,CAAA;oBACzD,CAAC;yBAAM,CAAC;wBACN,MAAM,GAAG,CAAC,cAAc,CAAC,eAAe,CAAC,OAAO,CAAC,GAAG,CAAC,CAAA;oBACvD,CAAC;gBACH,CAAC;YACH,CAAC;YAED,yEAAyE;YACzE,kEAAkE;YAClE,uEAAuE;YACvE,UAAU;YACV,IAAI,CAAC,QAAQ,IAAI,CAAC,WAAW,EAAE,CAAC;gBAC9B,IAAI,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,CAAC;oBACtD,MAAM,GAAG,CAAC,cAAc,CAAC,qBAAqB,CAAC,OAAO,CAAC,GAAG,CAAC,CAAA;gBAC7D,CAAC;YACH,CAAC;YAED,OAAO;gBACL,QAAQ,EAAE,kBAA2B;gBACrC,IAAI,EAAE;oBACJ,OAAO;oBACP,QAAQ;iBACT;aACF,CAAA;QACH,CAAC;KACF,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import { parseCid } from '@atproto/lex-data'\nimport { AtUri } from '@atproto/syntax'\nimport { InvalidRequestError, type Server } from '@atproto/xrpc-server'\nimport type { AppContext } from '../../../../context.js'\nimport { com } from '../../../../lexicons/index.js'\n\nexport default function (server: Server, ctx: AppContext) {\n server.add(com.atproto.admin.updateSubjectStatus, {\n auth: ctx.authVerifier.moderator,\n handler: async ({ input }) => {\n const { subject, takedown, deactivated } = input.body\n\n if (takedown?.applied && deactivated != null && !deactivated.applied) {\n throw new InvalidRequestError(\n `Cannot activate and takedown an account at the same time`,\n )\n }\n\n if (takedown) {\n if (com.atproto.admin.defs.repoRef.$isTypeOf(subject)) {\n await ctx.accountManager.takedownAccount(subject.did, takedown)\n } else if (com.atproto.repo.strongRef.$isTypeOf(subject)) {\n const uri = new AtUri(subject.uri)\n await ctx.actorStore.transact(uri.hostname, async (store) => {\n await store.record.updateRecordTakedownStatus(uri, takedown)\n })\n } else if (com.atproto.admin.defs.repoBlobRef.$isTypeOf(subject)) {\n await ctx.actorStore.transact(subject.did, async (store) => {\n await store.repo.blob.updateBlobTakedownStatus(\n parseCid(subject.cid),\n takedown,\n )\n })\n } else {\n throw new InvalidRequestError(`Invalid subject (${subject.$type})`)\n }\n }\n\n if (deactivated) {\n if (com.atproto.admin.defs.repoRef.$isTypeOf(subject)) {\n if (deactivated.applied) {\n await ctx.accountManager.deactivateAccount(subject.did)\n } else {\n await ctx.accountManager.activateAccount(subject.did)\n }\n }\n }\n\n // @NOTE accountManager will sequence an account status when updating the\n // status, so we don't *need* to sequence the account status here.\n // However, this endpoint historically has always sequenced the account\n // status.\n if (!takedown && !deactivated) {\n if (com.atproto.admin.defs.repoRef.$isTypeOf(subject)) {\n await ctx.accountManager.sequenceAccountStatus(subject.did)\n }\n }\n\n return {\n encoding: 'application/json' as const,\n body: {\n subject,\n takedown,\n },\n }\n },\n })\n}\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import express from 'express';
|
|
2
|
-
import { ActorAccount } from '../../../../account-manager/helpers/account.js';
|
|
3
|
-
import { CodeDetail } from '../../../../account-manager/helpers/invite.js';
|
|
4
|
-
import { com } from '../../../../lexicons/index.js';
|
|
1
|
+
import type express from 'express';
|
|
2
|
+
import type { ActorAccount } from '../../../../account-manager/helpers/account.js';
|
|
3
|
+
import type { CodeDetail } from '../../../../account-manager/helpers/invite.js';
|
|
4
|
+
import type { com } from '../../../../lexicons/index.js';
|
|
5
5
|
export declare function authPassthru(req: express.Request, withEncoding?: false): {
|
|
6
6
|
headers: {
|
|
7
7
|
authorization: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/admin/util.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/admin/util.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,SAAS,CAAA;AAGlC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gDAAgD,CAAA;AAClF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+CAA+C,CAAA;AAC/E,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,+BAA+B,CAAA;AAIxD,wBAAgB,YAAY,CAC1B,GAAG,EAAE,OAAO,CAAC,OAAO,EACpB,YAAY,CAAC,EAAE,KAAK,GACnB;IAAE,OAAO,EAAE;QAAE,aAAa,EAAE,MAAM,CAAA;KAAE,CAAC;IAAC,QAAQ,EAAE,SAAS,CAAA;CAAE,GAAG,SAAS,CAAA;AAE1E,wBAAgB,YAAY,CAC1B,GAAG,EAAE,OAAO,CAAC,OAAO,EACpB,YAAY,EAAE,IAAI,GAEhB;IAAE,OAAO,EAAE;QAAE,aAAa,EAAE,MAAM,CAAA;KAAE,CAAC;IAAC,QAAQ,EAAE,kBAAkB,CAAA;CAAE,GACpE,SAAS,CAAA;AAWb,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,YAAY,EACrB,EACE,iBAAiB,EACjB,SAAS,EACT,OAAO,GACR,EAAE;IACD,iBAAiB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,SAAS,EAAE,OAAO,CAAC,SAA6B;QAChD,gBAAgB,EACb,OAAO,CAAC,gBAAiD,IAAI,SAAS;QACzE,SAAS,EAAE,iBAAiB,CAAC,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS;QACjE,OAAO,EAAE,cAAc;QACvB,eAAe,EAAE,iBAAiB;YAChC,CAAC,CAAC,OAAO,CAAC,eAAe,KAAK,CAAC;YAC/B,CAAC,CAAC,SAAS;QACb,aAAa,EACV,OAAO,CAAC,aAA8C,IAAI,SAAS;KACvE,CAAA;AACH,CAAC","sourcesContent":["import express from 'express'\nimport { l } from '@atproto/lex'\nimport { INVALID_HANDLE } from '@atproto/syntax'\nimport { ActorAccount } from '../../../../account-manager/helpers/account.js'\nimport { CodeDetail } from '../../../../account-manager/helpers/invite.js'\nimport { com } from '../../../../lexicons/index.js'\n\n// Output designed to passed as second arg to AtpAgent methods.\n// The encoding field here is a quirk of the AtpAgent.\nexport function authPassthru(\n req: express.Request,\n withEncoding?: false,\n): { headers: { authorization: string }; encoding: undefined } | undefined\n\nexport function authPassthru(\n req: express.Request,\n withEncoding: true,\n):\n | { headers: { authorization: string }; encoding: 'application/json' }\n | undefined\n\nexport function authPassthru(req: express.Request, withEncoding?: boolean) {\n if (req.headers.authorization) {\n return {\n headers: { authorization: req.headers.authorization },\n encoding: withEncoding ? 'application/json' : undefined,\n }\n }\n}\n\nexport function formatAccountInfo(\n account: ActorAccount,\n {\n managesOwnInvites,\n invitedBy,\n invites,\n }: {\n managesOwnInvites: boolean\n invites: Map<string, CodeDetail[]> | CodeDetail[]\n invitedBy: Record<string, CodeDetail>\n },\n): com.atproto.admin.defs.AccountView {\n let invitesResults: CodeDetail[] | undefined\n if (managesOwnInvites) {\n if (Array.isArray(invites)) {\n invitesResults = invites\n } else {\n invitesResults = invites.get(account.did) || []\n }\n }\n return {\n did: account.did as l.DidString,\n handle: (account.handle ?? INVALID_HANDLE) as l.HandleString,\n email: account.email ?? undefined,\n indexedAt: account.createdAt as l.DatetimeString,\n emailConfirmedAt:\n (account.emailConfirmedAt as l.DatetimeString | undefined) ?? undefined,\n invitedBy: managesOwnInvites ? invitedBy[account.did] : undefined,\n invites: invitesResults,\n invitesDisabled: managesOwnInvites\n ? account.invitesDisabled === 1\n : undefined,\n deactivatedAt:\n (account.deactivatedAt as l.DatetimeString | undefined) ?? undefined,\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"util.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/admin/util.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAmBhD,MAAM,UAAU,YAAY,CAAC,GAAoB,EAAE,YAAsB;IACvE,IAAI,GAAG,CAAC,OAAO,CAAC,aAAa,EAAE,CAAC;QAC9B,OAAO;YACL,OAAO,EAAE,EAAE,aAAa,EAAE,GAAG,CAAC,OAAO,CAAC,aAAa,EAAE;YACrD,QAAQ,EAAE,YAAY,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,SAAS;SACxD,CAAA;IACH,CAAC;AACH,CAAC;AAED,MAAM,UAAU,iBAAiB,CAC/B,OAAqB,EACrB,EACE,iBAAiB,EACjB,SAAS,EACT,OAAO,GAKR;IAED,IAAI,cAAwC,CAAA;IAC5C,IAAI,iBAAiB,EAAE,CAAC;QACtB,IAAI,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;YAC3B,cAAc,GAAG,OAAO,CAAA;QAC1B,CAAC;aAAM,CAAC;YACN,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,CAAA;QACjD,CAAC;IACH,CAAC;IACD,OAAO;QACL,GAAG,EAAE,OAAO,CAAC,GAAkB;QAC/B,MAAM,EAAE,CAAC,OAAO,CAAC,MAAM,IAAI,cAAc,CAAmB;QAC5D,KAAK,EAAE,OAAO,CAAC,KAAK,IAAI,SAAS;QACjC,SAAS,EAAE,OAAO,CAAC,SAA6B;QAChD,gBAAgB,EACb,OAAO,CAAC,gBAAiD,IAAI,SAAS;QACzE,SAAS,EAAE,iBAAiB,CAAC,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS;QACjE,OAAO,EAAE,cAAc;QACvB,eAAe,EAAE,iBAAiB;YAChC,CAAC,CAAC,OAAO,CAAC,eAAe,KAAK,CAAC;YAC/B,CAAC,CAAC,SAAS;QACb,aAAa,EACV,OAAO,CAAC,aAA8C,IAAI,SAAS;KACvE,CAAA;AACH,CAAC","sourcesContent":["import type express from 'express'\nimport type { l } from '@atproto/lex'\nimport { INVALID_HANDLE } from '@atproto/syntax'\nimport type { ActorAccount } from '../../../../account-manager/helpers/account.js'\nimport type { CodeDetail } from '../../../../account-manager/helpers/invite.js'\nimport type { com } from '../../../../lexicons/index.js'\n\n// Output designed to passed as second arg to AtpAgent methods.\n// The encoding field here is a quirk of the AtpAgent.\nexport function authPassthru(\n req: express.Request,\n withEncoding?: false,\n): { headers: { authorization: string }; encoding: undefined } | undefined\n\nexport function authPassthru(\n req: express.Request,\n withEncoding: true,\n):\n | { headers: { authorization: string }; encoding: 'application/json' }\n | undefined\n\nexport function authPassthru(req: express.Request, withEncoding?: boolean) {\n if (req.headers.authorization) {\n return {\n headers: { authorization: req.headers.authorization },\n encoding: withEncoding ? 'application/json' : undefined,\n }\n }\n}\n\nexport function formatAccountInfo(\n account: ActorAccount,\n {\n managesOwnInvites,\n invitedBy,\n invites,\n }: {\n managesOwnInvites: boolean\n invites: Map<string, CodeDetail[]> | CodeDetail[]\n invitedBy: Record<string, CodeDetail>\n },\n): com.atproto.admin.defs.AccountView {\n let invitesResults: CodeDetail[] | undefined\n if (managesOwnInvites) {\n if (Array.isArray(invites)) {\n invitesResults = invites\n } else {\n invitesResults = invites.get(account.did) || []\n }\n }\n return {\n did: account.did as l.DidString,\n handle: (account.handle ?? INVALID_HANDLE) as l.HandleString,\n email: account.email ?? undefined,\n indexedAt: account.createdAt as l.DatetimeString,\n emailConfirmedAt:\n (account.emailConfirmedAt as l.DatetimeString | undefined) ?? undefined,\n invitedBy: managesOwnInvites ? invitedBy[account.did] : undefined,\n invites: invitesResults,\n invitesDisabled: managesOwnInvites\n ? account.invitesDisabled === 1\n : undefined,\n deactivatedAt:\n (account.deactivatedAt as l.DatetimeString | undefined) ?? undefined,\n }\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Server } from '@atproto/xrpc-server';
|
|
2
|
-
import { AppContext } from '../../../../context.js';
|
|
1
|
+
import type { Server } from '@atproto/xrpc-server';
|
|
2
|
+
import type { AppContext } from '../../../../context.js';
|
|
3
3
|
export default function (server: Server, ctx: AppContext): void;
|
|
4
4
|
//# sourceMappingURL=getRecommendedDidCredentials.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getRecommendedDidCredentials.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/identity/getRecommendedDidCredentials.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"getRecommendedDidCredentials.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/identity/getRecommendedDidCredentials.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAClD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAGxD,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QA6CvD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getRecommendedDidCredentials.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/identity/getRecommendedDidCredentials.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,GAAG,EAAE,MAAM,+BAA+B,CAAA;AAEn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G,CAAC,OAAO,CAAC,SAAS;iBACpC;aACF,CAAA;YAED,OAAO;gBACL,QAAQ,EAAE,kBAA2B;gBACrC,IAAI,EAAE;oBACJ,WAAW;oBACX,mBAAmB;oBACnB,YAAY;oBACZ,QAAQ;iBACT;aACF,CAAA;QACH,CAAC;KACF,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import { Server } from '@atproto/xrpc-server'\nimport { AppContext } from '../../../../context.js'\nimport { com } from '../../../../lexicons/index.js'\n\nexport default function (server: Server, ctx: AppContext) {\n server.add(com.atproto.identity.getRecommendedDidCredentials, {\n auth: ctx.authVerifier.authorization({\n authorize: () => {\n // always allow\n },\n }),\n handler: async ({ auth }) => {\n const requester = auth.credentials.did\n const signingKey = await ctx.actorStore.keypair(requester)\n const verificationMethods = {\n atproto: signingKey.did(),\n }\n const account = await ctx.accountManager.getAccount(requester, {\n includeDeactivated: true,\n })\n const alsoKnownAs = account?.handle\n ? [`at://${account.handle}`]\n : undefined\n\n const plcRotationKey =\n ctx.cfg.entryway?.plcRotationKey ?? ctx.plcRotationKey.did()\n const rotationKeys = [plcRotationKey]\n if (ctx.cfg.identity.recoveryDidKey) {\n rotationKeys.unshift(ctx.cfg.identity.recoveryDidKey)\n }\n\n const services = {\n atproto_pds: {\n type: 'AtprotoPersonalDataServer',\n endpoint: ctx.cfg.service.publicUrl,\n },\n }\n\n return {\n encoding: 'application/json' as const,\n body: {\n alsoKnownAs,\n verificationMethods,\n rotationKeys,\n services,\n },\n }\n },\n })\n}\n"]}
|
|
1
|
+
{"version":3,"file":"getRecommendedDidCredentials.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/identity/getRecommendedDidCredentials.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,GAAG,EAAE,MAAM,+BAA+B,CAAA;AAEnD,MAAM,CAAC,OAAO,WAAW,MAAc,EAAE,GAAe;IACtD,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,QAAQ,CAAC,4BAA4B,EAAE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AmB;oBACnB,YAAY;oBACZ,QAAQ;iBACT;aACF,CAAA;QACH,CAAC;KACF,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import type { Server } from '@atproto/xrpc-server'\nimport type { AppContext } from '../../../../context.js'\nimport { com } from '../../../../lexicons/index.js'\n\nexport default function (server: Server, ctx: AppContext) {\n server.add(com.atproto.identity.getRecommendedDidCredentials, {\n auth: ctx.authVerifier.authorization({\n authorize: () => {\n // always allow\n },\n }),\n handler: async ({ auth }) => {\n const requester = auth.credentials.did\n const signingKey = await ctx.actorStore.keypair(requester)\n const verificationMethods = {\n atproto: signingKey.did(),\n }\n const account = await ctx.accountManager.getAccount(requester, {\n includeDeactivated: true,\n })\n const alsoKnownAs = account?.handle\n ? [`at://${account.handle}`]\n : undefined\n\n const plcRotationKey =\n ctx.cfg.entryway?.plcRotationKey ?? ctx.plcRotationKey.did()\n const rotationKeys = [plcRotationKey]\n if (ctx.cfg.identity.recoveryDidKey) {\n rotationKeys.unshift(ctx.cfg.identity.recoveryDidKey)\n }\n\n const services = {\n atproto_pds: {\n type: 'AtprotoPersonalDataServer',\n endpoint: ctx.cfg.service.publicUrl,\n },\n }\n\n return {\n encoding: 'application/json' as const,\n body: {\n alsoKnownAs,\n verificationMethods,\n rotationKeys,\n services,\n },\n }\n },\n })\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Server } from '@atproto/xrpc-server';
|
|
2
|
-
import { AppContext } from '../../../../context.js';
|
|
1
|
+
import type { Server } from '@atproto/xrpc-server';
|
|
2
|
+
import type { AppContext } from '../../../../context.js';
|
|
3
3
|
export default function (server: Server, ctx: AppContext): void;
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/identity/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/identity/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAClD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAQxD,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QAOvD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/identity/index.ts"],"names":[],"mappings":"AAEA,OAAO,4BAA4B,MAAM,mCAAmC,CAAA;AAC5E,OAAO,4BAA4B,MAAM,mCAAmC,CAAA;AAC5E,OAAO,aAAa,MAAM,oBAAoB,CAAA;AAC9C,OAAO,gBAAgB,MAAM,uBAAuB,CAAA;AACpD,OAAO,kBAAkB,MAAM,yBAAyB,CAAA;AACxD,OAAO,YAAY,MAAM,mBAAmB,CAAA;AAE5C,MAAM,CAAC,OAAO,WAAW,MAAc,EAAE,GAAe;IACtD,aAAa,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC1B,YAAY,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACzB,4BAA4B,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACzC,4BAA4B,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACzC,gBAAgB,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC7B,kBAAkB,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;AACjC,CAAC","sourcesContent":["import { Server } from '@atproto/xrpc-server'\nimport { AppContext } from '../../../../context.js'\nimport getRecommendedDidCredentials from './getRecommendedDidCredentials.js'\nimport requestPlcOperationSignature from './requestPlcOperationSignature.js'\nimport resolveHandle from './resolveHandle.js'\nimport signPlcOperation from './signPlcOperation.js'\nimport submitPlcOperation from './submitPlcOperation.js'\nimport updateHandle from './updateHandle.js'\n\nexport default function (server: Server, ctx: AppContext) {\n resolveHandle(server, ctx)\n updateHandle(server, ctx)\n getRecommendedDidCredentials(server, ctx)\n requestPlcOperationSignature(server, ctx)\n signPlcOperation(server, ctx)\n submitPlcOperation(server, ctx)\n}\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/identity/index.ts"],"names":[],"mappings":"AAEA,OAAO,4BAA4B,MAAM,mCAAmC,CAAA;AAC5E,OAAO,4BAA4B,MAAM,mCAAmC,CAAA;AAC5E,OAAO,aAAa,MAAM,oBAAoB,CAAA;AAC9C,OAAO,gBAAgB,MAAM,uBAAuB,CAAA;AACpD,OAAO,kBAAkB,MAAM,yBAAyB,CAAA;AACxD,OAAO,YAAY,MAAM,mBAAmB,CAAA;AAE5C,MAAM,CAAC,OAAO,WAAW,MAAc,EAAE,GAAe;IACtD,aAAa,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC1B,YAAY,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACzB,4BAA4B,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACzC,4BAA4B,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACzC,gBAAgB,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC7B,kBAAkB,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;AACjC,CAAC","sourcesContent":["import type { Server } from '@atproto/xrpc-server'\nimport type { AppContext } from '../../../../context.js'\nimport getRecommendedDidCredentials from './getRecommendedDidCredentials.js'\nimport requestPlcOperationSignature from './requestPlcOperationSignature.js'\nimport resolveHandle from './resolveHandle.js'\nimport signPlcOperation from './signPlcOperation.js'\nimport submitPlcOperation from './submitPlcOperation.js'\nimport updateHandle from './updateHandle.js'\n\nexport default function (server: Server, ctx: AppContext) {\n resolveHandle(server, ctx)\n updateHandle(server, ctx)\n getRecommendedDidCredentials(server, ctx)\n requestPlcOperationSignature(server, ctx)\n signPlcOperation(server, ctx)\n submitPlcOperation(server, ctx)\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Server } from '@atproto/xrpc-server';
|
|
2
|
-
import { AppContext } from '../../../../context.js';
|
|
1
|
+
import { type Server } from '@atproto/xrpc-server';
|
|
2
|
+
import type { AppContext } from '../../../../context.js';
|
|
3
3
|
export default function (server: Server, ctx: AppContext): void;
|
|
4
4
|
//# sourceMappingURL=requestPlcOperationSignature.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"requestPlcOperationSignature.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/identity/requestPlcOperationSignature.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,MAAM,EAAE,MAAM,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"requestPlcOperationSignature.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/identity/requestPlcOperationSignature.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAEvE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAGxD,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QAqDvD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"requestPlcOperationSignature.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/identity/requestPlcOperationSignature.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,
|
|
1
|
+
{"version":3,"file":"requestPlcOperationSignature.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/identity/requestPlcOperationSignature.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAe,MAAM,sBAAsB,CAAA;AACvE,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AAElE,OAAO,EAAE,GAAG,EAAE,MAAM,+BAA+B,CAAA;AAEnD,MAA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AC,UAAU,CAAC,GAAG,EAAE;oBACvD,kBAAkB,EAAE,IAAI;oBACxB,gBAAgB,EAAE,IAAI;iBACvB,CAAC,CAAA;gBACF,IAAI,CAAC,OAAO,EAAE,CAAC;oBACb,MAAM,IAAI,mBAAmB,CAAC,mBAAmB,CAAC,CAAA;gBACpD,CAAC;qBAAM,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;oBAC1B,MAAM,IAAI,mBAAmB,CAC3B,wCAAwC,CACzC,CAAA;gBACH,CAAC;gBACD,MAAM,KAAK,GAAG,MAAM,GAAG,CAAC,cAAc,CAAC,gBAAgB,CACrD,GAAG,EACH,eAAe,CAChB,CAAA;gBACD,MAAM,GAAG,CAAC,MAAM,CAAC,gBAAgB,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC,CAAA;YACrE,CAAC;SACF,CAAC,CAAA;IACJ,CAAC;AACH,CAAC","sourcesContent":["import { InvalidRequestError, type Server } from '@atproto/xrpc-server'\nimport { ACCESS_FULL, AuthScope } from '../../../../auth-scope.js'\nimport type { AppContext } from '../../../../context.js'\nimport { com } from '../../../../lexicons/index.js'\n\nexport default function (server: Server, ctx: AppContext) {\n const { entrywayClient } = ctx\n\n const auth = ctx.authVerifier.authorization({\n // @NOTE Reflect any change in signPlcOperation\n scopes: ACCESS_FULL,\n additional: [AuthScope.Takendown],\n authorize: (permissions) => {\n permissions.assertIdentity({ attr: '*' })\n },\n })\n\n if (entrywayClient) {\n // @TODO we should have a higher level way of defining these \"passthrough\"\n // handlers\n server.add(com.atproto.identity.requestPlcOperationSignature, {\n auth,\n handler: async ({ auth, req }) => {\n const { headers } = await ctx.entrywayAuthHeaders(\n req,\n auth.credentials.did,\n com.atproto.identity.requestPlcOperationSignature.$lxm,\n )\n await entrywayClient.xrpc(\n com.atproto.identity.requestPlcOperationSignature,\n { headers },\n )\n },\n })\n } else {\n server.add(com.atproto.identity.requestPlcOperationSignature, {\n auth,\n handler: async ({ auth }) => {\n const did = auth.credentials.did\n const account = await ctx.accountManager.getAccount(did, {\n includeDeactivated: true,\n includeTakenDown: true,\n })\n if (!account) {\n throw new InvalidRequestError('account not found')\n } else if (!account.email) {\n throw new InvalidRequestError(\n 'account does not have an email address',\n )\n }\n const token = await ctx.accountManager.createEmailToken(\n did,\n 'plc_operation',\n )\n await ctx.mailer.sendPlcOperation({ token }, { to: account.email })\n },\n })\n }\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Server } from '@atproto/xrpc-server';
|
|
2
|
-
import { AppContext } from '../../../../context.js';
|
|
1
|
+
import { type Server } from '@atproto/xrpc-server';
|
|
2
|
+
import type { AppContext } from '../../../../context.js';
|
|
3
3
|
export default function (server: Server, ctx: AppContext): void;
|
|
4
4
|
//# sourceMappingURL=resolveHandle.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveHandle.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/identity/resolveHandle.ts"],"names":[],"mappings":"AAEA,OAAO,EAAuB,MAAM,EAAE,MAAM,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"resolveHandle.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/identity/resolveHandle.ts"],"names":[],"mappings":"AAEA,OAAO,EAAuB,KAAK,MAAM,EAAE,MAAM,sBAAsB,CAAA;AACvE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAIxD,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QAoCvD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveHandle.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/identity/resolveHandle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAE1C,OAAO,EAAE,mBAAmB,
|
|
1
|
+
{"version":3,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AC,QAAQ,CAAC,aAAa,EAAE,EAAE,MAAM,EAAE,CAAC;iBACpD,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,EAAE,wBAAwB,CAAC;YACjD,CAAC,CAAC,MAAM,GAAG,CAAC,UAAU,CAAC,MAAM;iBACxB,OAAO,CAAC,MAAM,CAAC;iBACf,IAAI,CACH,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,wBAAwB,EAAE,CAAC,EAC7D,wBAAwB,CACzB,CAAA;QAEP,OAAO;YACL,QAAQ,EAAE,kBAA2B;YACrC,IAAI,EAAE,EAAE,GAAG,EAAE;SACd,CAAA;IACH,CAAC,CAAC,CAAA;AACJ,CAAC;AAED,SAAS,wBAAwB,CAAC,KAAe;IAC/C,MAAM,IAAI,mBAAmB,CAAC,0BAA0B,EAAE,SAAS,EAAE;QACnE,KAAK;KACN,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import { isDidString } from '@atproto/lex'\nimport type { DidString } from '@atproto/syntax'\nimport { InvalidRequestError, type Server } from '@atproto/xrpc-server'\nimport type { AppContext } from '../../../../context.js'\nimport { baseNormalizeAndValidate } from '../../../../handle/index.js'\nimport { com } from '../../../../lexicons/index.js'\n\nexport default function (server: Server, ctx: AppContext) {\n server.add(com.atproto.identity.resolveHandle, async ({ params }) => {\n const handle = baseNormalizeAndValidate(params.handle)\n\n const user = await ctx.accountManager.getAccount(handle)\n if (user) {\n return {\n encoding: 'application/json' as const,\n body: { did: user.did as DidString },\n }\n }\n\n const supportedHandle = ctx.cfg.identity.serviceHandleDomains.some(\n (host) => handle.endsWith(host) || handle === host.slice(1),\n )\n // this should be in our DB & we couldn't find it, so fail\n if (supportedHandle) {\n throw new InvalidRequestError('Unable to resolve handle')\n }\n\n const did: DidString = ctx.bskyAppView\n ? await ctx.bskyAppView.client\n .call(com.atproto.identity.resolveHandle, { handle })\n .then((r) => r.did, throwInvalidRequestError)\n : await ctx.idResolver.handle\n .resolve(handle)\n .then(\n (v) => (v && isDidString(v) ? v : throwInvalidRequestError()),\n throwInvalidRequestError,\n )\n\n return {\n encoding: 'application/json' as const,\n body: { did },\n }\n })\n}\n\nfunction throwInvalidRequestError(cause?: unknown): never {\n throw new InvalidRequestError('Unable to resolve handle', undefined, {\n cause,\n })\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Server } from '@atproto/xrpc-server';
|
|
2
|
-
import { AppContext } from '../../../../context.js';
|
|
1
|
+
import { type Server } from '@atproto/xrpc-server';
|
|
2
|
+
import type { AppContext } from '../../../../context.js';
|
|
3
3
|
export default function (server: Server, ctx: AppContext): void;
|
|
4
4
|
//# sourceMappingURL=signPlcOperation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signPlcOperation.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/identity/signPlcOperation.ts"],"names":[],"mappings":"AAEA,OAAO,EAAuB,MAAM,EAAE,MAAM,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"signPlcOperation.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/identity/signPlcOperation.ts"],"names":[],"mappings":"AAEA,OAAO,EAAuB,KAAK,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAEvE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAGxD,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QA6EvD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signPlcOperation.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/identity/signPlcOperation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,cAAc,CAAA;AACnC,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AACvC,OAAO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IAAI,MAAM,CAAC,mBAAmB;oBAC3D,QAAQ;oBACN,mDAAmD;oBAClD,KAAK,CAAC,IAAI,CAAC,QAE2C;wBACvD,MAAM,CAAC,QAAQ;iBAClB,CAAC,CACH,CAAA;gBAED,OAAO;oBACL,QAAQ,EAAE,kBAA2B;oBACrC,IAAI,EAAE,EAAE,SAAS,EAAE;iBACpB,CAAA;YACH,CAAC;SACF,CAAC,CAAA;IACJ,CAAC;AACH,CAAC","sourcesContent":["import * as plc from '@did-plc/lib'\nimport { check } from '@atproto/common'\nimport { InvalidRequestError, type Server } from '@atproto/xrpc-server'\nimport { ACCESS_FULL, AuthScope } from '../../../../auth-scope.js'\nimport type { AppContext } from '../../../../context.js'\nimport { com } from '../../../../lexicons/index.js'\n\nexport default function (server: Server, ctx: AppContext) {\n const { entrywayClient } = ctx\n\n const auth = ctx.authVerifier.authorization({\n // @NOTE Should match auth rules from requestPlcOperationSignature\n scopes: ACCESS_FULL,\n additional: [AuthScope.Takendown],\n authorize: (permissions) => {\n permissions.assertIdentity({ attr: '*' })\n },\n })\n\n if (entrywayClient) {\n server.add(com.atproto.identity.signPlcOperation, {\n auth,\n handler: async ({ auth, input: { body }, req }) => {\n const { headers } = await ctx.entrywayAuthHeaders(\n req,\n auth.credentials.did,\n com.atproto.identity.signPlcOperation.$lxm,\n )\n\n return entrywayClient.xrpc(com.atproto.identity.signPlcOperation, {\n headers,\n body,\n })\n },\n })\n } else {\n server.add(com.atproto.identity.signPlcOperation, {\n auth,\n handler: async ({ auth, input }) => {\n const did = auth.credentials.did\n const { token } = input.body\n if (!token) {\n throw new InvalidRequestError(\n 'email confirmation token required to sign PLC operations',\n )\n }\n await ctx.accountManager.assertValidEmailTokenAndCleanup(\n did,\n 'plc_operation',\n token,\n )\n\n const lastOp = await ctx.plcClient.getLastOp(did)\n if (check.is(lastOp, plc.def.tombstone)) {\n throw new InvalidRequestError('Did is tombstoned')\n }\n const operation = await plc.createUpdateOp(\n lastOp,\n ctx.plcRotationKey,\n (lastOp) => ({\n ...lastOp,\n rotationKeys: input.body.rotationKeys ?? lastOp.rotationKeys,\n alsoKnownAs: input.body.alsoKnownAs ?? lastOp.alsoKnownAs,\n verificationMethods:\n // @TODO: actually validate instead of type casting\n (input.body.verificationMethods as\n | undefined\n | Record<string, string>) ?? lastOp.verificationMethods,\n services:\n // @TODO: actually validate instead of type casting\n (input.body.services as\n | undefined\n | Record<string, { type: string; endpoint: string }>) ??\n lastOp.services,\n }),\n )\n\n return {\n encoding: 'application/json' as const,\n body: { operation },\n }\n },\n })\n }\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Server } from '@atproto/xrpc-server';
|
|
2
|
-
import { AppContext } from '../../../../context.js';
|
|
1
|
+
import { type Server } from '@atproto/xrpc-server';
|
|
2
|
+
import type { AppContext } from '../../../../context.js';
|
|
3
3
|
export default function (server: Server, ctx: AppContext): void;
|
|
4
4
|
//# sourceMappingURL=submitPlcOperation.d.ts.map
|