@atproto/ozone 0.0.2
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 +8 -0
- package/LICENSE.txt +7 -0
- package/README.md +15 -0
- package/babel.config.js +3 -0
- package/bin/migration-create.ts +38 -0
- package/build.js +18 -0
- package/dist/api/admin/emitModerationEvent.d.ts +3 -0
- package/dist/api/admin/getModerationEvent.d.ts +3 -0
- package/dist/api/admin/getRecord.d.ts +3 -0
- package/dist/api/admin/getRepo.d.ts +3 -0
- package/dist/api/admin/queryModerationEvents.d.ts +3 -0
- package/dist/api/admin/queryModerationStatuses.d.ts +3 -0
- package/dist/api/admin/searchRepos.d.ts +3 -0
- package/dist/api/admin/util.d.ts +5 -0
- package/dist/api/com/atproto/admin/emitModerationEvent.d.ts +3 -0
- package/dist/api/com/atproto/admin/getModerationEvent.d.ts +3 -0
- package/dist/api/com/atproto/admin/getRecord.d.ts +3 -0
- package/dist/api/com/atproto/admin/getRepo.d.ts +3 -0
- package/dist/api/com/atproto/admin/queryModerationEvents.d.ts +3 -0
- package/dist/api/com/atproto/admin/queryModerationStatuses.d.ts +3 -0
- package/dist/api/com/atproto/admin/searchRepos.d.ts +3 -0
- package/dist/api/com/atproto/admin/util.d.ts +5 -0
- package/dist/api/com/atproto/moderation/createReport.d.ts +3 -0
- package/dist/api/com/atproto/moderation/util.d.ts +4 -0
- package/dist/api/com/atproto/temp/fetchLabels.d.ts +3 -0
- package/dist/api/health.d.ts +3 -0
- package/dist/api/index.d.ts +5 -0
- package/dist/api/label/queryLabels.d.ts +3 -0
- package/dist/api/label/subscribeLabels.d.ts +3 -0
- package/dist/api/moderation/createReport.d.ts +3 -0
- package/dist/api/moderation/util.d.ts +4 -0
- package/dist/api/temp/fetchLabels.d.ts +3 -0
- package/dist/api/util.d.ts +2 -0
- package/dist/api/well-known.d.ts +3 -0
- package/dist/auth-verifier.d.ts +47 -0
- package/dist/auth.d.ts +81 -0
- package/dist/background.d.ts +13 -0
- package/dist/config/config.d.ts +30 -0
- package/dist/config/env.d.ts +19 -0
- package/dist/config/index.d.ts +3 -0
- package/dist/config/secrets.d.ts +8 -0
- package/dist/config.d.ts +42 -0
- package/dist/context.d.ts +140 -0
- package/dist/daemon/config.d.ts +23 -0
- package/dist/daemon/context.d.ts +25 -0
- package/dist/daemon/event-pusher.d.ts +48 -0
- package/dist/daemon/event-reverser.d.ts +16 -0
- package/dist/daemon/index.d.ts +13 -0
- package/dist/db/index.d.ts +32 -0
- package/dist/db/index.js +33707 -0
- package/dist/db/index.js.map +7 -0
- package/dist/db/migrations/20231219T205730722Z-init.d.ts +3 -0
- package/dist/db/migrations/index.d.ts +1 -0
- package/dist/db/migrations/provider.d.ts +11 -0
- package/dist/db/pagination.d.ts +66 -0
- package/dist/db/schema/blob_push_event.d.ts +17 -0
- package/dist/db/schema/index.d.ts +10 -0
- package/dist/db/schema/label.d.ts +12 -0
- package/dist/db/schema/moderation_event.d.ts +22 -0
- package/dist/db/schema/moderation_subject_status.d.ts +25 -0
- package/dist/db/schema/record_push_event.d.ts +17 -0
- package/dist/db/schema/repo_push_event.d.ts +15 -0
- package/dist/db/types.d.ts +12 -0
- package/dist/error.d.ts +2 -0
- package/dist/index.d.ts +27 -0
- package/dist/index.js +131818 -0
- package/dist/index.js.map +7 -0
- package/dist/lexicon/index.d.ts +372 -0
- package/dist/lexicon/lexicons.d.ts +7553 -0
- package/dist/lexicon/types/app/bsky/actor/defs.d.ts +104 -0
- package/dist/lexicon/types/app/bsky/actor/getPreferences.d.ts +31 -0
- package/dist/lexicon/types/app/bsky/actor/getProfile.d.ts +29 -0
- package/dist/lexicon/types/app/bsky/actor/getProfiles.d.ts +32 -0
- package/dist/lexicon/types/app/bsky/actor/getSuggestions.d.ts +34 -0
- package/dist/lexicon/types/app/bsky/actor/profile.d.ts +15 -0
- package/dist/lexicon/types/app/bsky/actor/putPreferences.d.ts +26 -0
- package/dist/lexicon/types/app/bsky/actor/searchActors.d.ts +36 -0
- package/dist/lexicon/types/app/bsky/actor/searchActorsTypeahead.d.ts +34 -0
- package/dist/lexicon/types/app/bsky/embed/external.d.ts +31 -0
- package/dist/lexicon/types/app/bsky/embed/images.d.ts +37 -0
- package/dist/lexicon/types/app/bsky/embed/record.d.ts +54 -0
- package/dist/lexicon/types/app/bsky/embed/recordWithMedia.d.ts +24 -0
- package/dist/lexicon/types/app/bsky/feed/defs.d.ts +151 -0
- package/dist/lexicon/types/app/bsky/feed/describeFeedGenerator.d.ts +46 -0
- package/dist/lexicon/types/app/bsky/feed/generator.d.ts +18 -0
- package/dist/lexicon/types/app/bsky/feed/getActorFeeds.d.ts +35 -0
- package/dist/lexicon/types/app/bsky/feed/getActorLikes.d.ts +36 -0
- package/dist/lexicon/types/app/bsky/feed/getAuthorFeed.d.ts +37 -0
- package/dist/lexicon/types/app/bsky/feed/getFeed.d.ts +36 -0
- package/dist/lexicon/types/app/bsky/feed/getFeedGenerator.d.ts +34 -0
- package/dist/lexicon/types/app/bsky/feed/getFeedGenerators.d.ts +32 -0
- package/dist/lexicon/types/app/bsky/feed/getFeedSkeleton.d.ts +36 -0
- package/dist/lexicon/types/app/bsky/feed/getLikes.d.ts +47 -0
- package/dist/lexicon/types/app/bsky/feed/getListFeed.d.ts +36 -0
- package/dist/lexicon/types/app/bsky/feed/getPostThread.d.ts +38 -0
- package/dist/lexicon/types/app/bsky/feed/getPosts.d.ts +32 -0
- package/dist/lexicon/types/app/bsky/feed/getRepostedBy.d.ts +38 -0
- package/dist/lexicon/types/app/bsky/feed/getSuggestedFeeds.d.ts +34 -0
- package/dist/lexicon/types/app/bsky/feed/getTimeline.d.ts +35 -0
- package/dist/lexicon/types/app/bsky/feed/like.d.ts +9 -0
- package/dist/lexicon/types/app/bsky/feed/post.d.ts +50 -0
- package/dist/lexicon/types/app/bsky/feed/repost.d.ts +9 -0
- package/dist/lexicon/types/app/bsky/feed/searchPosts.d.ts +37 -0
- package/dist/lexicon/types/app/bsky/feed/threadgate.d.ts +28 -0
- package/dist/lexicon/types/app/bsky/graph/block.d.ts +8 -0
- package/dist/lexicon/types/app/bsky/graph/defs.d.ts +47 -0
- package/dist/lexicon/types/app/bsky/graph/follow.d.ts +8 -0
- package/dist/lexicon/types/app/bsky/graph/getBlocks.d.ts +34 -0
- package/dist/lexicon/types/app/bsky/graph/getFollowers.d.ts +36 -0
- package/dist/lexicon/types/app/bsky/graph/getFollows.d.ts +36 -0
- package/dist/lexicon/types/app/bsky/graph/getList.d.ts +36 -0
- package/dist/lexicon/types/app/bsky/graph/getListBlocks.d.ts +34 -0
- package/dist/lexicon/types/app/bsky/graph/getListMutes.d.ts +34 -0
- package/dist/lexicon/types/app/bsky/graph/getLists.d.ts +35 -0
- package/dist/lexicon/types/app/bsky/graph/getMutes.d.ts +34 -0
- package/dist/lexicon/types/app/bsky/graph/getSuggestedFollowsByActor.d.ts +32 -0
- package/dist/lexicon/types/app/bsky/graph/list.d.ts +19 -0
- package/dist/lexicon/types/app/bsky/graph/listblock.d.ts +8 -0
- package/dist/lexicon/types/app/bsky/graph/listitem.d.ts +9 -0
- package/dist/lexicon/types/app/bsky/graph/muteActor.d.ts +25 -0
- package/dist/lexicon/types/app/bsky/graph/muteActorList.d.ts +25 -0
- package/dist/lexicon/types/app/bsky/graph/unmuteActor.d.ts +25 -0
- package/dist/lexicon/types/app/bsky/graph/unmuteActorList.d.ts +25 -0
- package/dist/lexicon/types/app/bsky/moderation/defs.d.ts +49 -0
- package/dist/lexicon/types/app/bsky/moderation/getService.d.ts +29 -0
- package/dist/lexicon/types/app/bsky/moderation/getServices.d.ts +32 -0
- package/dist/lexicon/types/app/bsky/moderation/service.d.ts +17 -0
- package/dist/lexicon/types/app/bsky/notification/getUnreadCount.d.ts +31 -0
- package/dist/lexicon/types/app/bsky/notification/listNotifications.d.ts +52 -0
- package/dist/lexicon/types/app/bsky/notification/registerPush.d.ts +28 -0
- package/dist/lexicon/types/app/bsky/notification/updateSeen.d.ts +25 -0
- package/dist/lexicon/types/app/bsky/richtext/facet.d.ts +36 -0
- package/dist/lexicon/types/app/bsky/unspecced/defs.d.ts +13 -0
- package/dist/lexicon/types/app/bsky/unspecced/getPopular.d.ts +35 -0
- package/dist/lexicon/types/app/bsky/unspecced/getPopularFeedGenerators.d.ts +35 -0
- package/dist/lexicon/types/app/bsky/unspecced/getTimelineSkeleton.d.ts +35 -0
- package/dist/lexicon/types/app/bsky/unspecced/searchActorsSkeleton.d.ts +38 -0
- package/dist/lexicon/types/app/bsky/unspecced/searchPostsSkeleton.d.ts +37 -0
- package/dist/lexicon/types/com/atproto/admin/defs.d.ts +319 -0
- package/dist/lexicon/types/com/atproto/admin/deleteAccount.d.ts +25 -0
- package/dist/lexicon/types/com/atproto/admin/disableAccountInvites.d.ts +26 -0
- package/dist/lexicon/types/com/atproto/admin/disableInviteCodes.d.ts +26 -0
- package/dist/lexicon/types/com/atproto/admin/emitModerationEvent.d.ts +45 -0
- package/dist/lexicon/types/com/atproto/admin/enableAccountInvites.d.ts +26 -0
- package/dist/lexicon/types/com/atproto/admin/getAccountInfo.d.ts +29 -0
- package/dist/lexicon/types/com/atproto/admin/getAccountInfos.d.ts +32 -0
- package/dist/lexicon/types/com/atproto/admin/getInviteCodes.d.ts +35 -0
- package/dist/lexicon/types/com/atproto/admin/getModerationEvent.d.ts +29 -0
- package/dist/lexicon/types/com/atproto/admin/getRecord.d.ts +31 -0
- package/dist/lexicon/types/com/atproto/admin/getRepo.d.ts +30 -0
- package/dist/lexicon/types/com/atproto/admin/getSubjectStatus.d.ts +39 -0
- package/dist/lexicon/types/com/atproto/admin/queryModerationEvents.d.ts +39 -0
- package/dist/lexicon/types/com/atproto/admin/queryModerationStatuses.d.ts +48 -0
- package/dist/lexicon/types/com/atproto/admin/searchRepos.d.ts +36 -0
- package/dist/lexicon/types/com/atproto/admin/sendEmail.d.ts +40 -0
- package/dist/lexicon/types/com/atproto/admin/updateAccountEmail.d.ts +26 -0
- package/dist/lexicon/types/com/atproto/admin/updateAccountHandle.d.ts +26 -0
- package/dist/lexicon/types/com/atproto/admin/updateSubjectStatus.d.ts +46 -0
- package/dist/lexicon/types/com/atproto/identity/resolveHandle.d.ts +31 -0
- package/dist/lexicon/types/com/atproto/identity/updateHandle.d.ts +25 -0
- package/dist/lexicon/types/com/atproto/label/defs.d.ts +24 -0
- package/dist/lexicon/types/com/atproto/label/queryLabels.d.ts +36 -0
- package/dist/lexicon/types/com/atproto/label/subscribeLabels.d.ts +36 -0
- package/dist/lexicon/types/com/atproto/moderation/createReport.d.ts +52 -0
- package/dist/lexicon/types/com/atproto/moderation/defs.d.ts +8 -0
- package/dist/lexicon/types/com/atproto/repo/applyWrites.d.ts +53 -0
- package/dist/lexicon/types/com/atproto/repo/createRecord.d.ts +43 -0
- package/dist/lexicon/types/com/atproto/repo/deleteRecord.d.ts +30 -0
- package/dist/lexicon/types/com/atproto/repo/describeRepo.d.ts +35 -0
- package/dist/lexicon/types/com/atproto/repo/getRecord.d.ts +36 -0
- package/dist/lexicon/types/com/atproto/repo/listRecords.d.ts +47 -0
- package/dist/lexicon/types/com/atproto/repo/putRecord.d.ts +44 -0
- package/dist/lexicon/types/com/atproto/repo/strongRef.d.ts +8 -0
- package/dist/lexicon/types/com/atproto/repo/uploadBlob.d.ts +36 -0
- package/dist/lexicon/types/com/atproto/server/confirmEmail.d.ts +27 -0
- package/dist/lexicon/types/com/atproto/server/createAccount.d.ts +49 -0
- package/dist/lexicon/types/com/atproto/server/createAppPassword.d.ts +43 -0
- package/dist/lexicon/types/com/atproto/server/createInviteCode.d.ts +37 -0
- package/dist/lexicon/types/com/atproto/server/createInviteCodes.d.ts +46 -0
- package/dist/lexicon/types/com/atproto/server/createSession.d.ts +44 -0
- package/dist/lexicon/types/com/atproto/server/defs.d.ts +20 -0
- package/dist/lexicon/types/com/atproto/server/deleteAccount.d.ts +28 -0
- package/dist/lexicon/types/com/atproto/server/deleteSession.d.ts +19 -0
- package/dist/lexicon/types/com/atproto/server/describeServer.d.ts +41 -0
- package/dist/lexicon/types/com/atproto/server/getAccountInviteCodes.d.ts +34 -0
- package/dist/lexicon/types/com/atproto/server/getSession.d.ts +34 -0
- package/dist/lexicon/types/com/atproto/server/listAppPasswords.d.ts +39 -0
- package/dist/lexicon/types/com/atproto/server/refreshSession.d.ts +35 -0
- package/dist/lexicon/types/com/atproto/server/requestAccountDelete.d.ts +19 -0
- package/dist/lexicon/types/com/atproto/server/requestEmailConfirmation.d.ts +19 -0
- package/dist/lexicon/types/com/atproto/server/requestEmailUpdate.d.ts +30 -0
- package/dist/lexicon/types/com/atproto/server/requestPasswordReset.d.ts +25 -0
- package/dist/lexicon/types/com/atproto/server/reserveSigningKey.d.ts +36 -0
- package/dist/lexicon/types/com/atproto/server/resetPassword.d.ts +27 -0
- package/dist/lexicon/types/com/atproto/server/revokeAppPassword.d.ts +25 -0
- package/dist/lexicon/types/com/atproto/server/updateEmail.d.ts +27 -0
- package/dist/lexicon/types/com/atproto/sync/getBlob.d.ts +30 -0
- package/dist/lexicon/types/com/atproto/sync/getBlocks.d.ts +30 -0
- package/dist/lexicon/types/com/atproto/sync/getCheckout.d.ts +29 -0
- package/dist/lexicon/types/com/atproto/sync/getHead.d.ts +32 -0
- package/dist/lexicon/types/com/atproto/sync/getLatestCommit.d.ts +33 -0
- package/dist/lexicon/types/com/atproto/sync/getRecord.d.ts +32 -0
- package/dist/lexicon/types/com/atproto/sync/getRepo.d.ts +30 -0
- package/dist/lexicon/types/com/atproto/sync/listBlobs.d.ts +35 -0
- package/dist/lexicon/types/com/atproto/sync/listRepos.d.ts +42 -0
- package/dist/lexicon/types/com/atproto/sync/notifyOfUpdate.d.ts +25 -0
- package/dist/lexicon/types/com/atproto/sync/requestCrawl.d.ts +25 -0
- package/dist/lexicon/types/com/atproto/sync/subscribeRepos.d.ts +80 -0
- package/dist/lexicon/types/com/atproto/temp/fetchLabels.d.ts +33 -0
- package/dist/lexicon/types/com/atproto/temp/importRepo.d.ts +32 -0
- package/dist/lexicon/types/com/atproto/temp/pushBlob.d.ts +25 -0
- package/dist/lexicon/types/com/atproto/temp/requestPhoneVerification.d.ts +25 -0
- package/dist/lexicon/types/com/atproto/temp/transferAccount.d.ts +42 -0
- package/dist/lexicon/util.d.ts +2 -0
- package/dist/logger.d.ts +4 -0
- package/dist/mod-service/index.d.ts +155 -0
- package/dist/mod-service/status.d.ts +12 -0
- package/dist/mod-service/subject.d.ts +59 -0
- package/dist/mod-service/types.d.ts +19 -0
- package/dist/mod-service/views.d.ts +49 -0
- package/dist/sequencer/index.d.ts +2 -0
- package/dist/sequencer/outbox.d.ts +16 -0
- package/dist/sequencer/sequencer.d.ts +35 -0
- package/dist/services/index.d.ts +7 -0
- package/dist/services/moderation/index.d.ts +144 -0
- package/dist/services/moderation/status.d.ts +12 -0
- package/dist/services/moderation/subject.d.ts +60 -0
- package/dist/services/moderation/types.d.ts +19 -0
- package/dist/services/moderation/views.d.ts +42 -0
- package/dist/services/types.d.ts +2 -0
- package/dist/util/date.d.ts +1 -0
- package/dist/util/debug.d.ts +1 -0
- package/dist/util/retry.d.ts +3 -0
- package/dist/util.d.ts +3 -0
- package/jest.config.js +6 -0
- package/package.json +67 -0
- package/src/api/admin/emitModerationEvent.ts +130 -0
- package/src/api/admin/getModerationEvent.ts +19 -0
- package/src/api/admin/getRecord.ts +34 -0
- package/src/api/admin/getRepo.ts +31 -0
- package/src/api/admin/queryModerationEvents.ts +40 -0
- package/src/api/admin/queryModerationStatuses.ts +57 -0
- package/src/api/admin/searchRepos.ts +42 -0
- package/src/api/admin/util.ts +54 -0
- package/src/api/health.ts +20 -0
- package/src/api/index.ts +28 -0
- package/src/api/moderation/createReport.ts +41 -0
- package/src/api/moderation/util.ts +65 -0
- package/src/api/temp/fetchLabels.ts +29 -0
- package/src/api/well-known.ts +35 -0
- package/src/auth.ts +147 -0
- package/src/background.ts +35 -0
- package/src/config/config.ts +84 -0
- package/src/config/env.ts +41 -0
- package/src/config/index.ts +3 -0
- package/src/config/secrets.ts +23 -0
- package/src/context.ts +180 -0
- package/src/daemon/context.ts +90 -0
- package/src/daemon/event-pusher.ts +296 -0
- package/src/daemon/event-reverser.ts +74 -0
- package/src/daemon/index.ts +33 -0
- package/src/db/index.ts +197 -0
- package/src/db/migrations/20231219T205730722Z-init.ts +164 -0
- package/src/db/migrations/index.ts +5 -0
- package/src/db/migrations/provider.ts +25 -0
- package/src/db/pagination.ts +216 -0
- package/src/db/schema/blob_push_event.ts +21 -0
- package/src/db/schema/index.ts +18 -0
- package/src/db/schema/label.ts +12 -0
- package/src/db/schema/moderation_event.ts +35 -0
- package/src/db/schema/moderation_subject_status.ts +32 -0
- package/src/db/schema/record_push_event.ts +21 -0
- package/src/db/schema/repo_push_event.ts +19 -0
- package/src/db/types.ts +15 -0
- package/src/error.ts +12 -0
- package/src/index.ts +102 -0
- package/src/lexicon/index.ts +1626 -0
- package/src/lexicon/lexicons.ts +8050 -0
- package/src/lexicon/types/app/bsky/actor/defs.ts +235 -0
- package/src/lexicon/types/app/bsky/actor/getPreferences.ts +44 -0
- package/src/lexicon/types/app/bsky/actor/getProfile.ts +41 -0
- package/src/lexicon/types/app/bsky/actor/getProfiles.ts +46 -0
- package/src/lexicon/types/app/bsky/actor/getSuggestions.ts +48 -0
- package/src/lexicon/types/app/bsky/actor/profile.ts +32 -0
- package/src/lexicon/types/app/bsky/actor/putPreferences.ts +39 -0
- package/src/lexicon/types/app/bsky/actor/searchActors.ts +52 -0
- package/src/lexicon/types/app/bsky/actor/searchActorsTypeahead.ts +50 -0
- package/src/lexicon/types/app/bsky/embed/external.ts +82 -0
- package/src/lexicon/types/app/bsky/embed/images.ts +96 -0
- package/src/lexicon/types/app/bsky/embed/record.ts +120 -0
- package/src/lexicon/types/app/bsky/embed/recordWithMedia.ts +53 -0
- package/src/lexicon/types/app/bsky/feed/defs.ts +308 -0
- package/src/lexicon/types/app/bsky/feed/describeFeedGenerator.ts +80 -0
- package/src/lexicon/types/app/bsky/feed/generator.ts +35 -0
- package/src/lexicon/types/app/bsky/feed/getActorFeeds.ts +49 -0
- package/src/lexicon/types/app/bsky/feed/getActorLikes.ts +50 -0
- package/src/lexicon/types/app/bsky/feed/getAuthorFeed.ts +56 -0
- package/src/lexicon/types/app/bsky/feed/getFeed.ts +50 -0
- package/src/lexicon/types/app/bsky/feed/getFeedGenerator.ts +48 -0
- package/src/lexicon/types/app/bsky/feed/getFeedGenerators.ts +46 -0
- package/src/lexicon/types/app/bsky/feed/getFeedSkeleton.ts +50 -0
- package/src/lexicon/types/app/bsky/feed/getLikes.ts +69 -0
- package/src/lexicon/types/app/bsky/feed/getListFeed.ts +50 -0
- package/src/lexicon/types/app/bsky/feed/getPostThread.ts +53 -0
- package/src/lexicon/types/app/bsky/feed/getPosts.ts +46 -0
- package/src/lexicon/types/app/bsky/feed/getRepostedBy.ts +52 -0
- package/src/lexicon/types/app/bsky/feed/getSuggestedFeeds.ts +48 -0
- package/src/lexicon/types/app/bsky/feed/getTimeline.ts +49 -0
- package/src/lexicon/types/app/bsky/feed/like.ts +26 -0
- package/src/lexicon/types/app/bsky/feed/post.ts +102 -0
- package/src/lexicon/types/app/bsky/feed/repost.ts +27 -0
- package/src/lexicon/types/app/bsky/feed/searchPosts.ts +54 -0
- package/src/lexicon/types/app/bsky/feed/threadgate.ts +84 -0
- package/src/lexicon/types/app/bsky/graph/block.ts +26 -0
- package/src/lexicon/types/app/bsky/graph/defs.ts +104 -0
- package/src/lexicon/types/app/bsky/graph/follow.ts +26 -0
- package/src/lexicon/types/app/bsky/graph/getBlocks.ts +48 -0
- package/src/lexicon/types/app/bsky/graph/getFollowers.ts +50 -0
- package/src/lexicon/types/app/bsky/graph/getFollows.ts +50 -0
- package/src/lexicon/types/app/bsky/graph/getList.ts +50 -0
- package/src/lexicon/types/app/bsky/graph/getListBlocks.ts +48 -0
- package/src/lexicon/types/app/bsky/graph/getListMutes.ts +48 -0
- package/src/lexicon/types/app/bsky/graph/getLists.ts +49 -0
- package/src/lexicon/types/app/bsky/graph/getMutes.ts +48 -0
- package/src/lexicon/types/app/bsky/graph/getSuggestedFollowsByActor.ts +46 -0
- package/src/lexicon/types/app/bsky/graph/list.ts +36 -0
- package/src/lexicon/types/app/bsky/graph/listblock.ts +26 -0
- package/src/lexicon/types/app/bsky/graph/listitem.ts +27 -0
- package/src/lexicon/types/app/bsky/graph/muteActor.ts +38 -0
- package/src/lexicon/types/app/bsky/graph/muteActorList.ts +38 -0
- package/src/lexicon/types/app/bsky/graph/unmuteActor.ts +38 -0
- package/src/lexicon/types/app/bsky/graph/unmuteActorList.ts +38 -0
- package/src/lexicon/types/app/bsky/notification/getUnreadCount.ts +45 -0
- package/src/lexicon/types/app/bsky/notification/listNotifications.ts +87 -0
- package/src/lexicon/types/app/bsky/notification/registerPush.ts +41 -0
- package/src/lexicon/types/app/bsky/notification/updateSeen.ts +38 -0
- package/src/lexicon/types/app/bsky/richtext/facet.ts +97 -0
- package/src/lexicon/types/app/bsky/unspecced/defs.ts +41 -0
- package/src/lexicon/types/app/bsky/unspecced/getPopularFeedGenerators.ts +49 -0
- package/src/lexicon/types/app/bsky/unspecced/getTimelineSkeleton.ts +49 -0
- package/src/lexicon/types/app/bsky/unspecced/searchActorsSkeleton.ts +56 -0
- package/src/lexicon/types/app/bsky/unspecced/searchPostsSkeleton.ts +54 -0
- package/src/lexicon/types/com/atproto/admin/defs.ts +719 -0
- package/src/lexicon/types/com/atproto/admin/deleteAccount.ts +38 -0
- package/src/lexicon/types/com/atproto/admin/disableAccountInvites.ts +40 -0
- package/src/lexicon/types/com/atproto/admin/disableInviteCodes.ts +39 -0
- package/src/lexicon/types/com/atproto/admin/emitModerationEvent.ts +66 -0
- package/src/lexicon/types/com/atproto/admin/enableAccountInvites.ts +40 -0
- package/src/lexicon/types/com/atproto/admin/getAccountInfo.ts +41 -0
- package/src/lexicon/types/com/atproto/admin/getAccountInfos.ts +46 -0
- package/src/lexicon/types/com/atproto/admin/getInviteCodes.ts +49 -0
- package/src/lexicon/types/com/atproto/admin/getModerationEvent.ts +41 -0
- package/src/lexicon/types/com/atproto/admin/getRecord.ts +43 -0
- package/src/lexicon/types/com/atproto/admin/getRepo.ts +42 -0
- package/src/lexicon/types/com/atproto/admin/getSubjectStatus.ts +54 -0
- package/src/lexicon/types/com/atproto/admin/queryModerationEvents.ts +56 -0
- package/src/lexicon/types/com/atproto/admin/queryModerationStatuses.ts +72 -0
- package/src/lexicon/types/com/atproto/admin/searchRepos.ts +51 -0
- package/src/lexicon/types/com/atproto/admin/sendEmail.ts +54 -0
- package/src/lexicon/types/com/atproto/admin/updateAccountEmail.ts +40 -0
- package/src/lexicon/types/com/atproto/admin/updateAccountHandle.ts +39 -0
- package/src/lexicon/types/com/atproto/admin/updateSubjectStatus.ts +61 -0
- package/src/lexicon/types/com/atproto/identity/resolveHandle.ts +46 -0
- package/src/lexicon/types/com/atproto/identity/updateHandle.ts +38 -0
- package/src/lexicon/types/com/atproto/label/defs.ts +73 -0
- package/src/lexicon/types/com/atproto/label/queryLabels.ts +52 -0
- package/src/lexicon/types/com/atproto/label/subscribeLabels.ts +67 -0
- package/src/lexicon/types/com/atproto/moderation/createReport.ts +65 -0
- package/src/lexicon/types/com/atproto/moderation/defs.ts +32 -0
- package/src/lexicon/types/com/atproto/repo/applyWrites.ts +103 -0
- package/src/lexicon/types/com/atproto/repo/createRecord.ts +62 -0
- package/src/lexicon/types/com/atproto/repo/deleteRecord.ts +48 -0
- package/src/lexicon/types/com/atproto/repo/describeRepo.ts +50 -0
- package/src/lexicon/types/com/atproto/repo/getRecord.ts +54 -0
- package/src/lexicon/types/com/atproto/repo/listRecords.ts +77 -0
- package/src/lexicon/types/com/atproto/repo/putRecord.ts +64 -0
- package/src/lexicon/types/com/atproto/repo/strongRef.ts +26 -0
- package/src/lexicon/types/com/atproto/repo/uploadBlob.ts +47 -0
- package/src/lexicon/types/com/atproto/server/confirmEmail.ts +40 -0
- package/src/lexicon/types/com/atproto/server/createAccount.ts +69 -0
- package/src/lexicon/types/com/atproto/server/createAppPassword.ts +69 -0
- package/src/lexicon/types/com/atproto/server/createInviteCode.ts +50 -0
- package/src/lexicon/types/com/atproto/server/createInviteCodes.ts +72 -0
- package/src/lexicon/types/com/atproto/server/createSession.ts +58 -0
- package/src/lexicon/types/com/atproto/server/defs.ts +48 -0
- package/src/lexicon/types/com/atproto/server/deleteAccount.ts +41 -0
- package/src/lexicon/types/com/atproto/server/deleteSession.ts +31 -0
- package/src/lexicon/types/com/atproto/server/describeServer.ts +64 -0
- package/src/lexicon/types/com/atproto/server/getAccountInviteCodes.ts +48 -0
- package/src/lexicon/types/com/atproto/server/getSession.ts +47 -0
- package/src/lexicon/types/com/atproto/server/listAppPasswords.ts +62 -0
- package/src/lexicon/types/com/atproto/server/refreshSession.ts +48 -0
- package/src/lexicon/types/com/atproto/server/requestAccountDelete.ts +31 -0
- package/src/lexicon/types/com/atproto/server/requestEmailConfirmation.ts +31 -0
- package/src/lexicon/types/com/atproto/server/requestEmailUpdate.ts +43 -0
- package/src/lexicon/types/com/atproto/server/requestPasswordReset.ts +38 -0
- package/src/lexicon/types/com/atproto/server/reserveSigningKey.ts +51 -0
- package/src/lexicon/types/com/atproto/server/resetPassword.ts +40 -0
- package/src/lexicon/types/com/atproto/server/revokeAppPassword.ts +38 -0
- package/src/lexicon/types/com/atproto/server/updateEmail.ts +41 -0
- package/src/lexicon/types/com/atproto/sync/getBlob.ts +43 -0
- package/src/lexicon/types/com/atproto/sync/getBlocks.ts +42 -0
- package/src/lexicon/types/com/atproto/sync/getCheckout.ts +41 -0
- package/src/lexicon/types/com/atproto/sync/getHead.ts +47 -0
- package/src/lexicon/types/com/atproto/sync/getLatestCommit.ts +48 -0
- package/src/lexicon/types/com/atproto/sync/getRecord.ts +45 -0
- package/src/lexicon/types/com/atproto/sync/getRepo.ts +43 -0
- package/src/lexicon/types/com/atproto/sync/listBlobs.ts +51 -0
- package/src/lexicon/types/com/atproto/sync/listRepos.ts +66 -0
- package/src/lexicon/types/com/atproto/sync/notifyOfUpdate.ts +39 -0
- package/src/lexicon/types/com/atproto/sync/requestCrawl.ts +39 -0
- package/src/lexicon/types/com/atproto/sync/subscribeRepos.ts +161 -0
- package/src/lexicon/types/com/atproto/temp/fetchLabels.ts +47 -0
- package/src/lexicon/types/com/atproto/temp/importRepo.ts +45 -0
- package/src/lexicon/types/com/atproto/temp/pushBlob.ts +39 -0
- package/src/lexicon/types/com/atproto/temp/requestPhoneVerification.ts +38 -0
- package/src/lexicon/types/com/atproto/temp/transferAccount.ts +62 -0
- package/src/lexicon/util.ts +13 -0
- package/src/logger.ts +19 -0
- package/src/mod-service/index.ts +758 -0
- package/src/mod-service/status.ts +264 -0
- package/src/mod-service/subject.ts +136 -0
- package/src/mod-service/types.ts +32 -0
- package/src/mod-service/views.ts +531 -0
- package/src/util.ts +26 -0
- package/test.env +2 -0
- package/test.log +0 -0
- package/tests/__snapshots__/get-record.test.ts.snap +173 -0
- package/tests/__snapshots__/get-repo.test.ts.snap +57 -0
- package/tests/__snapshots__/moderation-events.test.ts.snap +168 -0
- package/tests/__snapshots__/moderation-statuses.test.ts.snap +64 -0
- package/tests/__snapshots__/moderation.test.ts.snap +55 -0
- package/tests/_util.ts +192 -0
- package/tests/db.test.ts +184 -0
- package/tests/get-record.test.ts +110 -0
- package/tests/get-repo.test.ts +131 -0
- package/tests/moderation-appeals.test.ts +269 -0
- package/tests/moderation-events.test.ts +220 -0
- package/tests/moderation-statuses.test.ts +144 -0
- package/tests/moderation.test.ts +961 -0
- package/tests/repo-search.test.ts +123 -0
- package/tests/server.test.ts +76 -0
- package/tsconfig.build.json +4 -0
- package/tsconfig.json +21 -0
|
@@ -0,0 +1,319 @@
|
|
|
1
|
+
import { ValidationResult } from '@atproto/lexicon';
|
|
2
|
+
import * as ComAtprotoRepoStrongRef from '../repo/strongRef';
|
|
3
|
+
import * as ComAtprotoModerationDefs from '../moderation/defs';
|
|
4
|
+
import * as ComAtprotoServerDefs from '../server/defs';
|
|
5
|
+
import * as ComAtprotoLabelDefs from '../label/defs';
|
|
6
|
+
export interface StatusAttr {
|
|
7
|
+
applied: boolean;
|
|
8
|
+
ref?: string;
|
|
9
|
+
[k: string]: unknown;
|
|
10
|
+
}
|
|
11
|
+
export declare function isStatusAttr(v: unknown): v is StatusAttr;
|
|
12
|
+
export declare function validateStatusAttr(v: unknown): ValidationResult;
|
|
13
|
+
export interface ModEventView {
|
|
14
|
+
id: number;
|
|
15
|
+
event: ModEventTakedown | ModEventReverseTakedown | ModEventComment | ModEventReport | ModEventLabel | ModEventAcknowledge | ModEventEscalate | ModEventMute | ModEventEmail | {
|
|
16
|
+
$type: string;
|
|
17
|
+
[k: string]: unknown;
|
|
18
|
+
};
|
|
19
|
+
subject: RepoRef | ComAtprotoRepoStrongRef.Main | {
|
|
20
|
+
$type: string;
|
|
21
|
+
[k: string]: unknown;
|
|
22
|
+
};
|
|
23
|
+
subjectBlobCids: string[];
|
|
24
|
+
createdBy: string;
|
|
25
|
+
createdAt: string;
|
|
26
|
+
creatorHandle?: string;
|
|
27
|
+
subjectHandle?: string;
|
|
28
|
+
[k: string]: unknown;
|
|
29
|
+
}
|
|
30
|
+
export declare function isModEventView(v: unknown): v is ModEventView;
|
|
31
|
+
export declare function validateModEventView(v: unknown): ValidationResult;
|
|
32
|
+
export interface ModEventViewDetail {
|
|
33
|
+
id: number;
|
|
34
|
+
event: ModEventTakedown | ModEventReverseTakedown | ModEventComment | ModEventReport | ModEventLabel | ModEventAcknowledge | ModEventEscalate | ModEventMute | ModEventResolveAppeal | {
|
|
35
|
+
$type: string;
|
|
36
|
+
[k: string]: unknown;
|
|
37
|
+
};
|
|
38
|
+
subject: RepoView | RepoViewNotFound | RecordView | RecordViewNotFound | {
|
|
39
|
+
$type: string;
|
|
40
|
+
[k: string]: unknown;
|
|
41
|
+
};
|
|
42
|
+
subjectBlobs: BlobView[];
|
|
43
|
+
createdBy: string;
|
|
44
|
+
createdAt: string;
|
|
45
|
+
[k: string]: unknown;
|
|
46
|
+
}
|
|
47
|
+
export declare function isModEventViewDetail(v: unknown): v is ModEventViewDetail;
|
|
48
|
+
export declare function validateModEventViewDetail(v: unknown): ValidationResult;
|
|
49
|
+
export interface ReportView {
|
|
50
|
+
id: number;
|
|
51
|
+
reasonType: ComAtprotoModerationDefs.ReasonType;
|
|
52
|
+
comment?: string;
|
|
53
|
+
subjectRepoHandle?: string;
|
|
54
|
+
subject: RepoRef | ComAtprotoRepoStrongRef.Main | {
|
|
55
|
+
$type: string;
|
|
56
|
+
[k: string]: unknown;
|
|
57
|
+
};
|
|
58
|
+
reportedBy: string;
|
|
59
|
+
createdAt: string;
|
|
60
|
+
resolvedByActionIds: number[];
|
|
61
|
+
[k: string]: unknown;
|
|
62
|
+
}
|
|
63
|
+
export declare function isReportView(v: unknown): v is ReportView;
|
|
64
|
+
export declare function validateReportView(v: unknown): ValidationResult;
|
|
65
|
+
export interface SubjectStatusView {
|
|
66
|
+
id: number;
|
|
67
|
+
subject: RepoRef | ComAtprotoRepoStrongRef.Main | {
|
|
68
|
+
$type: string;
|
|
69
|
+
[k: string]: unknown;
|
|
70
|
+
};
|
|
71
|
+
subjectBlobCids?: string[];
|
|
72
|
+
subjectRepoHandle?: string;
|
|
73
|
+
updatedAt: string;
|
|
74
|
+
createdAt: string;
|
|
75
|
+
reviewState: SubjectReviewState;
|
|
76
|
+
comment?: string;
|
|
77
|
+
muteUntil?: string;
|
|
78
|
+
lastReviewedBy?: string;
|
|
79
|
+
lastReviewedAt?: string;
|
|
80
|
+
lastReportedAt?: string;
|
|
81
|
+
lastAppealedAt?: string;
|
|
82
|
+
takendown?: boolean;
|
|
83
|
+
appealed?: boolean;
|
|
84
|
+
suspendUntil?: string;
|
|
85
|
+
[k: string]: unknown;
|
|
86
|
+
}
|
|
87
|
+
export declare function isSubjectStatusView(v: unknown): v is SubjectStatusView;
|
|
88
|
+
export declare function validateSubjectStatusView(v: unknown): ValidationResult;
|
|
89
|
+
export interface ReportViewDetail {
|
|
90
|
+
id: number;
|
|
91
|
+
reasonType: ComAtprotoModerationDefs.ReasonType;
|
|
92
|
+
comment?: string;
|
|
93
|
+
subject: RepoView | RepoViewNotFound | RecordView | RecordViewNotFound | {
|
|
94
|
+
$type: string;
|
|
95
|
+
[k: string]: unknown;
|
|
96
|
+
};
|
|
97
|
+
subjectStatus?: SubjectStatusView;
|
|
98
|
+
reportedBy: string;
|
|
99
|
+
createdAt: string;
|
|
100
|
+
resolvedByActions: ModEventView[];
|
|
101
|
+
[k: string]: unknown;
|
|
102
|
+
}
|
|
103
|
+
export declare function isReportViewDetail(v: unknown): v is ReportViewDetail;
|
|
104
|
+
export declare function validateReportViewDetail(v: unknown): ValidationResult;
|
|
105
|
+
export interface RepoView {
|
|
106
|
+
did: string;
|
|
107
|
+
handle: string;
|
|
108
|
+
email?: string;
|
|
109
|
+
relatedRecords: {}[];
|
|
110
|
+
indexedAt: string;
|
|
111
|
+
moderation: Moderation;
|
|
112
|
+
invitedBy?: ComAtprotoServerDefs.InviteCode;
|
|
113
|
+
invitesDisabled?: boolean;
|
|
114
|
+
inviteNote?: string;
|
|
115
|
+
[k: string]: unknown;
|
|
116
|
+
}
|
|
117
|
+
export declare function isRepoView(v: unknown): v is RepoView;
|
|
118
|
+
export declare function validateRepoView(v: unknown): ValidationResult;
|
|
119
|
+
export interface RepoViewDetail {
|
|
120
|
+
did: string;
|
|
121
|
+
handle: string;
|
|
122
|
+
email?: string;
|
|
123
|
+
relatedRecords: {}[];
|
|
124
|
+
indexedAt: string;
|
|
125
|
+
moderation: ModerationDetail;
|
|
126
|
+
labels?: ComAtprotoLabelDefs.Label[];
|
|
127
|
+
invitedBy?: ComAtprotoServerDefs.InviteCode;
|
|
128
|
+
invites?: ComAtprotoServerDefs.InviteCode[];
|
|
129
|
+
invitesDisabled?: boolean;
|
|
130
|
+
inviteNote?: string;
|
|
131
|
+
emailConfirmedAt?: string;
|
|
132
|
+
[k: string]: unknown;
|
|
133
|
+
}
|
|
134
|
+
export declare function isRepoViewDetail(v: unknown): v is RepoViewDetail;
|
|
135
|
+
export declare function validateRepoViewDetail(v: unknown): ValidationResult;
|
|
136
|
+
export interface AccountView {
|
|
137
|
+
did: string;
|
|
138
|
+
handle: string;
|
|
139
|
+
email?: string;
|
|
140
|
+
relatedRecords?: {}[];
|
|
141
|
+
indexedAt: string;
|
|
142
|
+
invitedBy?: ComAtprotoServerDefs.InviteCode;
|
|
143
|
+
invites?: ComAtprotoServerDefs.InviteCode[];
|
|
144
|
+
invitesDisabled?: boolean;
|
|
145
|
+
emailConfirmedAt?: string;
|
|
146
|
+
inviteNote?: string;
|
|
147
|
+
[k: string]: unknown;
|
|
148
|
+
}
|
|
149
|
+
export declare function isAccountView(v: unknown): v is AccountView;
|
|
150
|
+
export declare function validateAccountView(v: unknown): ValidationResult;
|
|
151
|
+
export interface RepoViewNotFound {
|
|
152
|
+
did: string;
|
|
153
|
+
[k: string]: unknown;
|
|
154
|
+
}
|
|
155
|
+
export declare function isRepoViewNotFound(v: unknown): v is RepoViewNotFound;
|
|
156
|
+
export declare function validateRepoViewNotFound(v: unknown): ValidationResult;
|
|
157
|
+
export interface RepoRef {
|
|
158
|
+
did: string;
|
|
159
|
+
[k: string]: unknown;
|
|
160
|
+
}
|
|
161
|
+
export declare function isRepoRef(v: unknown): v is RepoRef;
|
|
162
|
+
export declare function validateRepoRef(v: unknown): ValidationResult;
|
|
163
|
+
export interface RepoBlobRef {
|
|
164
|
+
did: string;
|
|
165
|
+
cid: string;
|
|
166
|
+
recordUri?: string;
|
|
167
|
+
[k: string]: unknown;
|
|
168
|
+
}
|
|
169
|
+
export declare function isRepoBlobRef(v: unknown): v is RepoBlobRef;
|
|
170
|
+
export declare function validateRepoBlobRef(v: unknown): ValidationResult;
|
|
171
|
+
export interface RecordView {
|
|
172
|
+
uri: string;
|
|
173
|
+
cid: string;
|
|
174
|
+
value: {};
|
|
175
|
+
blobCids: string[];
|
|
176
|
+
indexedAt: string;
|
|
177
|
+
moderation: Moderation;
|
|
178
|
+
repo: RepoView;
|
|
179
|
+
[k: string]: unknown;
|
|
180
|
+
}
|
|
181
|
+
export declare function isRecordView(v: unknown): v is RecordView;
|
|
182
|
+
export declare function validateRecordView(v: unknown): ValidationResult;
|
|
183
|
+
export interface RecordViewDetail {
|
|
184
|
+
uri: string;
|
|
185
|
+
cid: string;
|
|
186
|
+
value: {};
|
|
187
|
+
blobs: BlobView[];
|
|
188
|
+
labels?: ComAtprotoLabelDefs.Label[];
|
|
189
|
+
indexedAt: string;
|
|
190
|
+
moderation: ModerationDetail;
|
|
191
|
+
repo: RepoView;
|
|
192
|
+
[k: string]: unknown;
|
|
193
|
+
}
|
|
194
|
+
export declare function isRecordViewDetail(v: unknown): v is RecordViewDetail;
|
|
195
|
+
export declare function validateRecordViewDetail(v: unknown): ValidationResult;
|
|
196
|
+
export interface RecordViewNotFound {
|
|
197
|
+
uri: string;
|
|
198
|
+
[k: string]: unknown;
|
|
199
|
+
}
|
|
200
|
+
export declare function isRecordViewNotFound(v: unknown): v is RecordViewNotFound;
|
|
201
|
+
export declare function validateRecordViewNotFound(v: unknown): ValidationResult;
|
|
202
|
+
export interface Moderation {
|
|
203
|
+
subjectStatus?: SubjectStatusView;
|
|
204
|
+
[k: string]: unknown;
|
|
205
|
+
}
|
|
206
|
+
export declare function isModeration(v: unknown): v is Moderation;
|
|
207
|
+
export declare function validateModeration(v: unknown): ValidationResult;
|
|
208
|
+
export interface ModerationDetail {
|
|
209
|
+
subjectStatus?: SubjectStatusView;
|
|
210
|
+
[k: string]: unknown;
|
|
211
|
+
}
|
|
212
|
+
export declare function isModerationDetail(v: unknown): v is ModerationDetail;
|
|
213
|
+
export declare function validateModerationDetail(v: unknown): ValidationResult;
|
|
214
|
+
export interface BlobView {
|
|
215
|
+
cid: string;
|
|
216
|
+
mimeType: string;
|
|
217
|
+
size: number;
|
|
218
|
+
createdAt: string;
|
|
219
|
+
details?: ImageDetails | VideoDetails | {
|
|
220
|
+
$type: string;
|
|
221
|
+
[k: string]: unknown;
|
|
222
|
+
};
|
|
223
|
+
moderation?: Moderation;
|
|
224
|
+
[k: string]: unknown;
|
|
225
|
+
}
|
|
226
|
+
export declare function isBlobView(v: unknown): v is BlobView;
|
|
227
|
+
export declare function validateBlobView(v: unknown): ValidationResult;
|
|
228
|
+
export interface ImageDetails {
|
|
229
|
+
width: number;
|
|
230
|
+
height: number;
|
|
231
|
+
[k: string]: unknown;
|
|
232
|
+
}
|
|
233
|
+
export declare function isImageDetails(v: unknown): v is ImageDetails;
|
|
234
|
+
export declare function validateImageDetails(v: unknown): ValidationResult;
|
|
235
|
+
export interface VideoDetails {
|
|
236
|
+
width: number;
|
|
237
|
+
height: number;
|
|
238
|
+
length: number;
|
|
239
|
+
[k: string]: unknown;
|
|
240
|
+
}
|
|
241
|
+
export declare function isVideoDetails(v: unknown): v is VideoDetails;
|
|
242
|
+
export declare function validateVideoDetails(v: unknown): ValidationResult;
|
|
243
|
+
export type SubjectReviewState = 'lex:com.atproto.admin.defs#reviewOpen' | 'lex:com.atproto.admin.defs#reviewEscalated' | 'lex:com.atproto.admin.defs#reviewClosed' | (string & {});
|
|
244
|
+
export declare const REVIEWOPEN = "com.atproto.admin.defs#reviewOpen";
|
|
245
|
+
export declare const REVIEWESCALATED = "com.atproto.admin.defs#reviewEscalated";
|
|
246
|
+
export declare const REVIEWCLOSED = "com.atproto.admin.defs#reviewClosed";
|
|
247
|
+
export interface ModEventTakedown {
|
|
248
|
+
comment?: string;
|
|
249
|
+
durationInHours?: number;
|
|
250
|
+
[k: string]: unknown;
|
|
251
|
+
}
|
|
252
|
+
export declare function isModEventTakedown(v: unknown): v is ModEventTakedown;
|
|
253
|
+
export declare function validateModEventTakedown(v: unknown): ValidationResult;
|
|
254
|
+
export interface ModEventReverseTakedown {
|
|
255
|
+
comment?: string;
|
|
256
|
+
[k: string]: unknown;
|
|
257
|
+
}
|
|
258
|
+
export declare function isModEventReverseTakedown(v: unknown): v is ModEventReverseTakedown;
|
|
259
|
+
export declare function validateModEventReverseTakedown(v: unknown): ValidationResult;
|
|
260
|
+
export interface ModEventResolveAppeal {
|
|
261
|
+
comment?: string;
|
|
262
|
+
[k: string]: unknown;
|
|
263
|
+
}
|
|
264
|
+
export declare function isModEventResolveAppeal(v: unknown): v is ModEventResolveAppeal;
|
|
265
|
+
export declare function validateModEventResolveAppeal(v: unknown): ValidationResult;
|
|
266
|
+
export interface ModEventComment {
|
|
267
|
+
comment: string;
|
|
268
|
+
sticky?: boolean;
|
|
269
|
+
[k: string]: unknown;
|
|
270
|
+
}
|
|
271
|
+
export declare function isModEventComment(v: unknown): v is ModEventComment;
|
|
272
|
+
export declare function validateModEventComment(v: unknown): ValidationResult;
|
|
273
|
+
export interface ModEventReport {
|
|
274
|
+
comment?: string;
|
|
275
|
+
reportType: ComAtprotoModerationDefs.ReasonType;
|
|
276
|
+
[k: string]: unknown;
|
|
277
|
+
}
|
|
278
|
+
export declare function isModEventReport(v: unknown): v is ModEventReport;
|
|
279
|
+
export declare function validateModEventReport(v: unknown): ValidationResult;
|
|
280
|
+
export interface ModEventLabel {
|
|
281
|
+
comment?: string;
|
|
282
|
+
createLabelVals: string[];
|
|
283
|
+
negateLabelVals: string[];
|
|
284
|
+
[k: string]: unknown;
|
|
285
|
+
}
|
|
286
|
+
export declare function isModEventLabel(v: unknown): v is ModEventLabel;
|
|
287
|
+
export declare function validateModEventLabel(v: unknown): ValidationResult;
|
|
288
|
+
export interface ModEventAcknowledge {
|
|
289
|
+
comment?: string;
|
|
290
|
+
[k: string]: unknown;
|
|
291
|
+
}
|
|
292
|
+
export declare function isModEventAcknowledge(v: unknown): v is ModEventAcknowledge;
|
|
293
|
+
export declare function validateModEventAcknowledge(v: unknown): ValidationResult;
|
|
294
|
+
export interface ModEventEscalate {
|
|
295
|
+
comment?: string;
|
|
296
|
+
[k: string]: unknown;
|
|
297
|
+
}
|
|
298
|
+
export declare function isModEventEscalate(v: unknown): v is ModEventEscalate;
|
|
299
|
+
export declare function validateModEventEscalate(v: unknown): ValidationResult;
|
|
300
|
+
export interface ModEventMute {
|
|
301
|
+
comment?: string;
|
|
302
|
+
durationInHours: number;
|
|
303
|
+
[k: string]: unknown;
|
|
304
|
+
}
|
|
305
|
+
export declare function isModEventMute(v: unknown): v is ModEventMute;
|
|
306
|
+
export declare function validateModEventMute(v: unknown): ValidationResult;
|
|
307
|
+
export interface ModEventUnmute {
|
|
308
|
+
comment?: string;
|
|
309
|
+
[k: string]: unknown;
|
|
310
|
+
}
|
|
311
|
+
export declare function isModEventUnmute(v: unknown): v is ModEventUnmute;
|
|
312
|
+
export declare function validateModEventUnmute(v: unknown): ValidationResult;
|
|
313
|
+
export interface ModEventEmail {
|
|
314
|
+
subjectLine: string;
|
|
315
|
+
comment?: string;
|
|
316
|
+
[k: string]: unknown;
|
|
317
|
+
}
|
|
318
|
+
export declare function isModEventEmail(v: unknown): v is ModEventEmail;
|
|
319
|
+
export declare function validateModEventEmail(v: unknown): ValidationResult;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import express from 'express';
|
|
2
|
+
import { HandlerAuth } from '@atproto/xrpc-server';
|
|
3
|
+
export interface QueryParams {
|
|
4
|
+
}
|
|
5
|
+
export interface InputSchema {
|
|
6
|
+
did: string;
|
|
7
|
+
[k: string]: unknown;
|
|
8
|
+
}
|
|
9
|
+
export interface HandlerInput {
|
|
10
|
+
encoding: 'application/json';
|
|
11
|
+
body: InputSchema;
|
|
12
|
+
}
|
|
13
|
+
export interface HandlerError {
|
|
14
|
+
status: number;
|
|
15
|
+
message?: string;
|
|
16
|
+
}
|
|
17
|
+
export type HandlerOutput = HandlerError | void;
|
|
18
|
+
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
|
19
|
+
auth: HA;
|
|
20
|
+
params: QueryParams;
|
|
21
|
+
input: HandlerInput;
|
|
22
|
+
req: express.Request;
|
|
23
|
+
res: express.Response;
|
|
24
|
+
};
|
|
25
|
+
export type Handler<HA extends HandlerAuth = never> = (ctx: HandlerReqCtx<HA>) => Promise<HandlerOutput> | HandlerOutput;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import express from 'express';
|
|
2
|
+
import { HandlerAuth } from '@atproto/xrpc-server';
|
|
3
|
+
export interface QueryParams {
|
|
4
|
+
}
|
|
5
|
+
export interface InputSchema {
|
|
6
|
+
account: string;
|
|
7
|
+
note?: string;
|
|
8
|
+
[k: string]: unknown;
|
|
9
|
+
}
|
|
10
|
+
export interface HandlerInput {
|
|
11
|
+
encoding: 'application/json';
|
|
12
|
+
body: InputSchema;
|
|
13
|
+
}
|
|
14
|
+
export interface HandlerError {
|
|
15
|
+
status: number;
|
|
16
|
+
message?: string;
|
|
17
|
+
}
|
|
18
|
+
export type HandlerOutput = HandlerError | void;
|
|
19
|
+
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
|
20
|
+
auth: HA;
|
|
21
|
+
params: QueryParams;
|
|
22
|
+
input: HandlerInput;
|
|
23
|
+
req: express.Request;
|
|
24
|
+
res: express.Response;
|
|
25
|
+
};
|
|
26
|
+
export type Handler<HA extends HandlerAuth = never> = (ctx: HandlerReqCtx<HA>) => Promise<HandlerOutput> | HandlerOutput;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import express from 'express';
|
|
2
|
+
import { HandlerAuth } from '@atproto/xrpc-server';
|
|
3
|
+
export interface QueryParams {
|
|
4
|
+
}
|
|
5
|
+
export interface InputSchema {
|
|
6
|
+
codes?: string[];
|
|
7
|
+
accounts?: string[];
|
|
8
|
+
[k: string]: unknown;
|
|
9
|
+
}
|
|
10
|
+
export interface HandlerInput {
|
|
11
|
+
encoding: 'application/json';
|
|
12
|
+
body: InputSchema;
|
|
13
|
+
}
|
|
14
|
+
export interface HandlerError {
|
|
15
|
+
status: number;
|
|
16
|
+
message?: string;
|
|
17
|
+
}
|
|
18
|
+
export type HandlerOutput = HandlerError | void;
|
|
19
|
+
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
|
20
|
+
auth: HA;
|
|
21
|
+
params: QueryParams;
|
|
22
|
+
input: HandlerInput;
|
|
23
|
+
req: express.Request;
|
|
24
|
+
res: express.Response;
|
|
25
|
+
};
|
|
26
|
+
export type Handler<HA extends HandlerAuth = never> = (ctx: HandlerReqCtx<HA>) => Promise<HandlerOutput> | HandlerOutput;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import express from 'express';
|
|
2
|
+
import { HandlerAuth } from '@atproto/xrpc-server';
|
|
3
|
+
import * as ComAtprotoAdminDefs from './defs';
|
|
4
|
+
import * as ComAtprotoRepoStrongRef from '../repo/strongRef';
|
|
5
|
+
export interface QueryParams {
|
|
6
|
+
}
|
|
7
|
+
export interface InputSchema {
|
|
8
|
+
event: ComAtprotoAdminDefs.ModEventTakedown | ComAtprotoAdminDefs.ModEventAcknowledge | ComAtprotoAdminDefs.ModEventEscalate | ComAtprotoAdminDefs.ModEventComment | ComAtprotoAdminDefs.ModEventLabel | ComAtprotoAdminDefs.ModEventReport | ComAtprotoAdminDefs.ModEventMute | ComAtprotoAdminDefs.ModEventReverseTakedown | ComAtprotoAdminDefs.ModEventUnmute | ComAtprotoAdminDefs.ModEventEmail | {
|
|
9
|
+
$type: string;
|
|
10
|
+
[k: string]: unknown;
|
|
11
|
+
};
|
|
12
|
+
subject: ComAtprotoAdminDefs.RepoRef | ComAtprotoRepoStrongRef.Main | {
|
|
13
|
+
$type: string;
|
|
14
|
+
[k: string]: unknown;
|
|
15
|
+
};
|
|
16
|
+
subjectBlobCids?: string[];
|
|
17
|
+
createdBy: string;
|
|
18
|
+
[k: string]: unknown;
|
|
19
|
+
}
|
|
20
|
+
export type OutputSchema = ComAtprotoAdminDefs.ModEventView;
|
|
21
|
+
export interface HandlerInput {
|
|
22
|
+
encoding: 'application/json';
|
|
23
|
+
body: InputSchema;
|
|
24
|
+
}
|
|
25
|
+
export interface HandlerSuccess {
|
|
26
|
+
encoding: 'application/json';
|
|
27
|
+
body: OutputSchema;
|
|
28
|
+
headers?: {
|
|
29
|
+
[key: string]: string;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
export interface HandlerError {
|
|
33
|
+
status: number;
|
|
34
|
+
message?: string;
|
|
35
|
+
error?: 'SubjectHasAction';
|
|
36
|
+
}
|
|
37
|
+
export type HandlerOutput = HandlerError | HandlerSuccess;
|
|
38
|
+
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
|
39
|
+
auth: HA;
|
|
40
|
+
params: QueryParams;
|
|
41
|
+
input: HandlerInput;
|
|
42
|
+
req: express.Request;
|
|
43
|
+
res: express.Response;
|
|
44
|
+
};
|
|
45
|
+
export type Handler<HA extends HandlerAuth = never> = (ctx: HandlerReqCtx<HA>) => Promise<HandlerOutput> | HandlerOutput;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import express from 'express';
|
|
2
|
+
import { HandlerAuth } from '@atproto/xrpc-server';
|
|
3
|
+
export interface QueryParams {
|
|
4
|
+
}
|
|
5
|
+
export interface InputSchema {
|
|
6
|
+
account: string;
|
|
7
|
+
note?: string;
|
|
8
|
+
[k: string]: unknown;
|
|
9
|
+
}
|
|
10
|
+
export interface HandlerInput {
|
|
11
|
+
encoding: 'application/json';
|
|
12
|
+
body: InputSchema;
|
|
13
|
+
}
|
|
14
|
+
export interface HandlerError {
|
|
15
|
+
status: number;
|
|
16
|
+
message?: string;
|
|
17
|
+
}
|
|
18
|
+
export type HandlerOutput = HandlerError | void;
|
|
19
|
+
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
|
20
|
+
auth: HA;
|
|
21
|
+
params: QueryParams;
|
|
22
|
+
input: HandlerInput;
|
|
23
|
+
req: express.Request;
|
|
24
|
+
res: express.Response;
|
|
25
|
+
};
|
|
26
|
+
export type Handler<HA extends HandlerAuth = never> = (ctx: HandlerReqCtx<HA>) => Promise<HandlerOutput> | HandlerOutput;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import express from 'express';
|
|
2
|
+
import { HandlerAuth } from '@atproto/xrpc-server';
|
|
3
|
+
import * as ComAtprotoAdminDefs from './defs';
|
|
4
|
+
export interface QueryParams {
|
|
5
|
+
did: string;
|
|
6
|
+
}
|
|
7
|
+
export type InputSchema = undefined;
|
|
8
|
+
export type OutputSchema = ComAtprotoAdminDefs.AccountView;
|
|
9
|
+
export type HandlerInput = undefined;
|
|
10
|
+
export interface HandlerSuccess {
|
|
11
|
+
encoding: 'application/json';
|
|
12
|
+
body: OutputSchema;
|
|
13
|
+
headers?: {
|
|
14
|
+
[key: string]: string;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export interface HandlerError {
|
|
18
|
+
status: number;
|
|
19
|
+
message?: string;
|
|
20
|
+
}
|
|
21
|
+
export type HandlerOutput = HandlerError | HandlerSuccess;
|
|
22
|
+
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
|
23
|
+
auth: HA;
|
|
24
|
+
params: QueryParams;
|
|
25
|
+
input: HandlerInput;
|
|
26
|
+
req: express.Request;
|
|
27
|
+
res: express.Response;
|
|
28
|
+
};
|
|
29
|
+
export type Handler<HA extends HandlerAuth = never> = (ctx: HandlerReqCtx<HA>) => Promise<HandlerOutput> | HandlerOutput;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import express from 'express';
|
|
2
|
+
import { HandlerAuth } from '@atproto/xrpc-server';
|
|
3
|
+
import * as ComAtprotoAdminDefs from './defs';
|
|
4
|
+
export interface QueryParams {
|
|
5
|
+
dids: string[];
|
|
6
|
+
}
|
|
7
|
+
export type InputSchema = undefined;
|
|
8
|
+
export interface OutputSchema {
|
|
9
|
+
infos: ComAtprotoAdminDefs.AccountView[];
|
|
10
|
+
[k: string]: unknown;
|
|
11
|
+
}
|
|
12
|
+
export type HandlerInput = undefined;
|
|
13
|
+
export interface HandlerSuccess {
|
|
14
|
+
encoding: 'application/json';
|
|
15
|
+
body: OutputSchema;
|
|
16
|
+
headers?: {
|
|
17
|
+
[key: string]: string;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
export interface HandlerError {
|
|
21
|
+
status: number;
|
|
22
|
+
message?: string;
|
|
23
|
+
}
|
|
24
|
+
export type HandlerOutput = HandlerError | HandlerSuccess;
|
|
25
|
+
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
|
26
|
+
auth: HA;
|
|
27
|
+
params: QueryParams;
|
|
28
|
+
input: HandlerInput;
|
|
29
|
+
req: express.Request;
|
|
30
|
+
res: express.Response;
|
|
31
|
+
};
|
|
32
|
+
export type Handler<HA extends HandlerAuth = never> = (ctx: HandlerReqCtx<HA>) => Promise<HandlerOutput> | HandlerOutput;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import express from 'express';
|
|
2
|
+
import { HandlerAuth } from '@atproto/xrpc-server';
|
|
3
|
+
import * as ComAtprotoServerDefs from '../server/defs';
|
|
4
|
+
export interface QueryParams {
|
|
5
|
+
sort: 'recent' | 'usage' | (string & {});
|
|
6
|
+
limit: number;
|
|
7
|
+
cursor?: string;
|
|
8
|
+
}
|
|
9
|
+
export type InputSchema = undefined;
|
|
10
|
+
export interface OutputSchema {
|
|
11
|
+
cursor?: string;
|
|
12
|
+
codes: ComAtprotoServerDefs.InviteCode[];
|
|
13
|
+
[k: string]: unknown;
|
|
14
|
+
}
|
|
15
|
+
export type HandlerInput = undefined;
|
|
16
|
+
export interface HandlerSuccess {
|
|
17
|
+
encoding: 'application/json';
|
|
18
|
+
body: OutputSchema;
|
|
19
|
+
headers?: {
|
|
20
|
+
[key: string]: string;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
export interface HandlerError {
|
|
24
|
+
status: number;
|
|
25
|
+
message?: string;
|
|
26
|
+
}
|
|
27
|
+
export type HandlerOutput = HandlerError | HandlerSuccess;
|
|
28
|
+
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
|
29
|
+
auth: HA;
|
|
30
|
+
params: QueryParams;
|
|
31
|
+
input: HandlerInput;
|
|
32
|
+
req: express.Request;
|
|
33
|
+
res: express.Response;
|
|
34
|
+
};
|
|
35
|
+
export type Handler<HA extends HandlerAuth = never> = (ctx: HandlerReqCtx<HA>) => Promise<HandlerOutput> | HandlerOutput;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import express from 'express';
|
|
2
|
+
import { HandlerAuth } from '@atproto/xrpc-server';
|
|
3
|
+
import * as ComAtprotoAdminDefs from './defs';
|
|
4
|
+
export interface QueryParams {
|
|
5
|
+
id: number;
|
|
6
|
+
}
|
|
7
|
+
export type InputSchema = undefined;
|
|
8
|
+
export type OutputSchema = ComAtprotoAdminDefs.ModEventViewDetail;
|
|
9
|
+
export type HandlerInput = undefined;
|
|
10
|
+
export interface HandlerSuccess {
|
|
11
|
+
encoding: 'application/json';
|
|
12
|
+
body: OutputSchema;
|
|
13
|
+
headers?: {
|
|
14
|
+
[key: string]: string;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export interface HandlerError {
|
|
18
|
+
status: number;
|
|
19
|
+
message?: string;
|
|
20
|
+
}
|
|
21
|
+
export type HandlerOutput = HandlerError | HandlerSuccess;
|
|
22
|
+
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
|
23
|
+
auth: HA;
|
|
24
|
+
params: QueryParams;
|
|
25
|
+
input: HandlerInput;
|
|
26
|
+
req: express.Request;
|
|
27
|
+
res: express.Response;
|
|
28
|
+
};
|
|
29
|
+
export type Handler<HA extends HandlerAuth = never> = (ctx: HandlerReqCtx<HA>) => Promise<HandlerOutput> | HandlerOutput;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import express from 'express';
|
|
2
|
+
import { HandlerAuth } from '@atproto/xrpc-server';
|
|
3
|
+
import * as ComAtprotoAdminDefs from './defs';
|
|
4
|
+
export interface QueryParams {
|
|
5
|
+
uri: string;
|
|
6
|
+
cid?: string;
|
|
7
|
+
}
|
|
8
|
+
export type InputSchema = undefined;
|
|
9
|
+
export type OutputSchema = ComAtprotoAdminDefs.RecordViewDetail;
|
|
10
|
+
export type HandlerInput = undefined;
|
|
11
|
+
export interface HandlerSuccess {
|
|
12
|
+
encoding: 'application/json';
|
|
13
|
+
body: OutputSchema;
|
|
14
|
+
headers?: {
|
|
15
|
+
[key: string]: string;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
export interface HandlerError {
|
|
19
|
+
status: number;
|
|
20
|
+
message?: string;
|
|
21
|
+
error?: 'RecordNotFound';
|
|
22
|
+
}
|
|
23
|
+
export type HandlerOutput = HandlerError | HandlerSuccess;
|
|
24
|
+
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
|
25
|
+
auth: HA;
|
|
26
|
+
params: QueryParams;
|
|
27
|
+
input: HandlerInput;
|
|
28
|
+
req: express.Request;
|
|
29
|
+
res: express.Response;
|
|
30
|
+
};
|
|
31
|
+
export type Handler<HA extends HandlerAuth = never> = (ctx: HandlerReqCtx<HA>) => Promise<HandlerOutput> | HandlerOutput;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import express from 'express';
|
|
2
|
+
import { HandlerAuth } from '@atproto/xrpc-server';
|
|
3
|
+
import * as ComAtprotoAdminDefs from './defs';
|
|
4
|
+
export interface QueryParams {
|
|
5
|
+
did: string;
|
|
6
|
+
}
|
|
7
|
+
export type InputSchema = undefined;
|
|
8
|
+
export type OutputSchema = ComAtprotoAdminDefs.RepoViewDetail;
|
|
9
|
+
export type HandlerInput = undefined;
|
|
10
|
+
export interface HandlerSuccess {
|
|
11
|
+
encoding: 'application/json';
|
|
12
|
+
body: OutputSchema;
|
|
13
|
+
headers?: {
|
|
14
|
+
[key: string]: string;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export interface HandlerError {
|
|
18
|
+
status: number;
|
|
19
|
+
message?: string;
|
|
20
|
+
error?: 'RepoNotFound';
|
|
21
|
+
}
|
|
22
|
+
export type HandlerOutput = HandlerError | HandlerSuccess;
|
|
23
|
+
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
|
24
|
+
auth: HA;
|
|
25
|
+
params: QueryParams;
|
|
26
|
+
input: HandlerInput;
|
|
27
|
+
req: express.Request;
|
|
28
|
+
res: express.Response;
|
|
29
|
+
};
|
|
30
|
+
export type Handler<HA extends HandlerAuth = never> = (ctx: HandlerReqCtx<HA>) => Promise<HandlerOutput> | HandlerOutput;
|