@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,104 @@
|
|
|
1
|
+
import { ValidationResult } from '@atproto/lexicon';
|
|
2
|
+
import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs';
|
|
3
|
+
import * as AppBskyGraphDefs from '../graph/defs';
|
|
4
|
+
export interface ProfileViewBasic {
|
|
5
|
+
did: string;
|
|
6
|
+
handle: string;
|
|
7
|
+
displayName?: string;
|
|
8
|
+
avatar?: string;
|
|
9
|
+
viewer?: ViewerState;
|
|
10
|
+
labels?: ComAtprotoLabelDefs.Label[];
|
|
11
|
+
[k: string]: unknown;
|
|
12
|
+
}
|
|
13
|
+
export declare function isProfileViewBasic(v: unknown): v is ProfileViewBasic;
|
|
14
|
+
export declare function validateProfileViewBasic(v: unknown): ValidationResult;
|
|
15
|
+
export interface ProfileView {
|
|
16
|
+
did: string;
|
|
17
|
+
handle: string;
|
|
18
|
+
displayName?: string;
|
|
19
|
+
description?: string;
|
|
20
|
+
avatar?: string;
|
|
21
|
+
indexedAt?: string;
|
|
22
|
+
viewer?: ViewerState;
|
|
23
|
+
labels?: ComAtprotoLabelDefs.Label[];
|
|
24
|
+
[k: string]: unknown;
|
|
25
|
+
}
|
|
26
|
+
export declare function isProfileView(v: unknown): v is ProfileView;
|
|
27
|
+
export declare function validateProfileView(v: unknown): ValidationResult;
|
|
28
|
+
export interface ProfileViewDetailed {
|
|
29
|
+
did: string;
|
|
30
|
+
handle: string;
|
|
31
|
+
displayName?: string;
|
|
32
|
+
description?: string;
|
|
33
|
+
avatar?: string;
|
|
34
|
+
banner?: string;
|
|
35
|
+
followersCount?: number;
|
|
36
|
+
followsCount?: number;
|
|
37
|
+
postsCount?: number;
|
|
38
|
+
indexedAt?: string;
|
|
39
|
+
viewer?: ViewerState;
|
|
40
|
+
labels?: ComAtprotoLabelDefs.Label[];
|
|
41
|
+
[k: string]: unknown;
|
|
42
|
+
}
|
|
43
|
+
export declare function isProfileViewDetailed(v: unknown): v is ProfileViewDetailed;
|
|
44
|
+
export declare function validateProfileViewDetailed(v: unknown): ValidationResult;
|
|
45
|
+
export interface ViewerState {
|
|
46
|
+
muted?: boolean;
|
|
47
|
+
mutedByList?: AppBskyGraphDefs.ListViewBasic;
|
|
48
|
+
blockedBy?: boolean;
|
|
49
|
+
blocking?: string;
|
|
50
|
+
blockingByList?: AppBskyGraphDefs.ListViewBasic;
|
|
51
|
+
following?: string;
|
|
52
|
+
followedBy?: string;
|
|
53
|
+
[k: string]: unknown;
|
|
54
|
+
}
|
|
55
|
+
export declare function isViewerState(v: unknown): v is ViewerState;
|
|
56
|
+
export declare function validateViewerState(v: unknown): ValidationResult;
|
|
57
|
+
export type Preferences = (AdultContentPref | ContentLabelPref | SavedFeedsPref | PersonalDetailsPref | FeedViewPref | ThreadViewPref | {
|
|
58
|
+
$type: string;
|
|
59
|
+
[k: string]: unknown;
|
|
60
|
+
})[];
|
|
61
|
+
export interface AdultContentPref {
|
|
62
|
+
enabled: boolean;
|
|
63
|
+
[k: string]: unknown;
|
|
64
|
+
}
|
|
65
|
+
export declare function isAdultContentPref(v: unknown): v is AdultContentPref;
|
|
66
|
+
export declare function validateAdultContentPref(v: unknown): ValidationResult;
|
|
67
|
+
export interface ContentLabelPref {
|
|
68
|
+
label: string;
|
|
69
|
+
visibility: 'show' | 'warn' | 'hide' | (string & {});
|
|
70
|
+
[k: string]: unknown;
|
|
71
|
+
}
|
|
72
|
+
export declare function isContentLabelPref(v: unknown): v is ContentLabelPref;
|
|
73
|
+
export declare function validateContentLabelPref(v: unknown): ValidationResult;
|
|
74
|
+
export interface SavedFeedsPref {
|
|
75
|
+
pinned: string[];
|
|
76
|
+
saved: string[];
|
|
77
|
+
[k: string]: unknown;
|
|
78
|
+
}
|
|
79
|
+
export declare function isSavedFeedsPref(v: unknown): v is SavedFeedsPref;
|
|
80
|
+
export declare function validateSavedFeedsPref(v: unknown): ValidationResult;
|
|
81
|
+
export interface PersonalDetailsPref {
|
|
82
|
+
birthDate?: string;
|
|
83
|
+
[k: string]: unknown;
|
|
84
|
+
}
|
|
85
|
+
export declare function isPersonalDetailsPref(v: unknown): v is PersonalDetailsPref;
|
|
86
|
+
export declare function validatePersonalDetailsPref(v: unknown): ValidationResult;
|
|
87
|
+
export interface FeedViewPref {
|
|
88
|
+
feed: string;
|
|
89
|
+
hideReplies?: boolean;
|
|
90
|
+
hideRepliesByUnfollowed?: boolean;
|
|
91
|
+
hideRepliesByLikeCount?: number;
|
|
92
|
+
hideReposts?: boolean;
|
|
93
|
+
hideQuotePosts?: boolean;
|
|
94
|
+
[k: string]: unknown;
|
|
95
|
+
}
|
|
96
|
+
export declare function isFeedViewPref(v: unknown): v is FeedViewPref;
|
|
97
|
+
export declare function validateFeedViewPref(v: unknown): ValidationResult;
|
|
98
|
+
export interface ThreadViewPref {
|
|
99
|
+
sort?: 'oldest' | 'newest' | 'most-likes' | 'random' | (string & {});
|
|
100
|
+
prioritizeFollowedUsers?: boolean;
|
|
101
|
+
[k: string]: unknown;
|
|
102
|
+
}
|
|
103
|
+
export declare function isThreadViewPref(v: unknown): v is ThreadViewPref;
|
|
104
|
+
export declare function validateThreadViewPref(v: unknown): ValidationResult;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import express from 'express';
|
|
2
|
+
import { HandlerAuth } from '@atproto/xrpc-server';
|
|
3
|
+
import * as AppBskyActorDefs from './defs';
|
|
4
|
+
export interface QueryParams {
|
|
5
|
+
}
|
|
6
|
+
export type InputSchema = undefined;
|
|
7
|
+
export interface OutputSchema {
|
|
8
|
+
preferences: AppBskyActorDefs.Preferences;
|
|
9
|
+
[k: string]: unknown;
|
|
10
|
+
}
|
|
11
|
+
export type HandlerInput = undefined;
|
|
12
|
+
export interface HandlerSuccess {
|
|
13
|
+
encoding: 'application/json';
|
|
14
|
+
body: OutputSchema;
|
|
15
|
+
headers?: {
|
|
16
|
+
[key: string]: string;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
export interface HandlerError {
|
|
20
|
+
status: number;
|
|
21
|
+
message?: string;
|
|
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,29 @@
|
|
|
1
|
+
import express from 'express';
|
|
2
|
+
import { HandlerAuth } from '@atproto/xrpc-server';
|
|
3
|
+
import * as AppBskyActorDefs from './defs';
|
|
4
|
+
export interface QueryParams {
|
|
5
|
+
actor: string;
|
|
6
|
+
}
|
|
7
|
+
export type InputSchema = undefined;
|
|
8
|
+
export type OutputSchema = AppBskyActorDefs.ProfileViewDetailed;
|
|
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 AppBskyActorDefs from './defs';
|
|
4
|
+
export interface QueryParams {
|
|
5
|
+
actors: string[];
|
|
6
|
+
}
|
|
7
|
+
export type InputSchema = undefined;
|
|
8
|
+
export interface OutputSchema {
|
|
9
|
+
profiles: AppBskyActorDefs.ProfileViewDetailed[];
|
|
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,34 @@
|
|
|
1
|
+
import express from 'express';
|
|
2
|
+
import { HandlerAuth } from '@atproto/xrpc-server';
|
|
3
|
+
import * as AppBskyActorDefs from './defs';
|
|
4
|
+
export interface QueryParams {
|
|
5
|
+
limit: number;
|
|
6
|
+
cursor?: string;
|
|
7
|
+
}
|
|
8
|
+
export type InputSchema = undefined;
|
|
9
|
+
export interface OutputSchema {
|
|
10
|
+
cursor?: string;
|
|
11
|
+
actors: AppBskyActorDefs.ProfileView[];
|
|
12
|
+
[k: string]: unknown;
|
|
13
|
+
}
|
|
14
|
+
export type HandlerInput = undefined;
|
|
15
|
+
export interface HandlerSuccess {
|
|
16
|
+
encoding: 'application/json';
|
|
17
|
+
body: OutputSchema;
|
|
18
|
+
headers?: {
|
|
19
|
+
[key: string]: string;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
export interface HandlerError {
|
|
23
|
+
status: number;
|
|
24
|
+
message?: string;
|
|
25
|
+
}
|
|
26
|
+
export type HandlerOutput = HandlerError | HandlerSuccess;
|
|
27
|
+
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
|
28
|
+
auth: HA;
|
|
29
|
+
params: QueryParams;
|
|
30
|
+
input: HandlerInput;
|
|
31
|
+
req: express.Request;
|
|
32
|
+
res: express.Response;
|
|
33
|
+
};
|
|
34
|
+
export type Handler<HA extends HandlerAuth = never> = (ctx: HandlerReqCtx<HA>) => Promise<HandlerOutput> | HandlerOutput;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ValidationResult, BlobRef } from '@atproto/lexicon';
|
|
2
|
+
import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs';
|
|
3
|
+
export interface Record {
|
|
4
|
+
displayName?: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
avatar?: BlobRef;
|
|
7
|
+
banner?: BlobRef;
|
|
8
|
+
labels?: ComAtprotoLabelDefs.SelfLabels | {
|
|
9
|
+
$type: string;
|
|
10
|
+
[k: string]: unknown;
|
|
11
|
+
};
|
|
12
|
+
[k: string]: unknown;
|
|
13
|
+
}
|
|
14
|
+
export declare function isRecord(v: unknown): v is Record;
|
|
15
|
+
export declare function validateRecord(v: unknown): ValidationResult;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import express from 'express';
|
|
2
|
+
import { HandlerAuth } from '@atproto/xrpc-server';
|
|
3
|
+
import * as AppBskyActorDefs from './defs';
|
|
4
|
+
export interface QueryParams {
|
|
5
|
+
}
|
|
6
|
+
export interface InputSchema {
|
|
7
|
+
preferences: AppBskyActorDefs.Preferences;
|
|
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,36 @@
|
|
|
1
|
+
import express from 'express';
|
|
2
|
+
import { HandlerAuth } from '@atproto/xrpc-server';
|
|
3
|
+
import * as AppBskyActorDefs from './defs';
|
|
4
|
+
export interface QueryParams {
|
|
5
|
+
term?: string;
|
|
6
|
+
q?: string;
|
|
7
|
+
limit: number;
|
|
8
|
+
cursor?: string;
|
|
9
|
+
}
|
|
10
|
+
export type InputSchema = undefined;
|
|
11
|
+
export interface OutputSchema {
|
|
12
|
+
cursor?: string;
|
|
13
|
+
actors: AppBskyActorDefs.ProfileView[];
|
|
14
|
+
[k: string]: unknown;
|
|
15
|
+
}
|
|
16
|
+
export type HandlerInput = undefined;
|
|
17
|
+
export interface HandlerSuccess {
|
|
18
|
+
encoding: 'application/json';
|
|
19
|
+
body: OutputSchema;
|
|
20
|
+
headers?: {
|
|
21
|
+
[key: string]: string;
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
export interface HandlerError {
|
|
25
|
+
status: number;
|
|
26
|
+
message?: string;
|
|
27
|
+
}
|
|
28
|
+
export type HandlerOutput = HandlerError | HandlerSuccess;
|
|
29
|
+
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
|
30
|
+
auth: HA;
|
|
31
|
+
params: QueryParams;
|
|
32
|
+
input: HandlerInput;
|
|
33
|
+
req: express.Request;
|
|
34
|
+
res: express.Response;
|
|
35
|
+
};
|
|
36
|
+
export type Handler<HA extends HandlerAuth = never> = (ctx: HandlerReqCtx<HA>) => Promise<HandlerOutput> | HandlerOutput;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import express from 'express';
|
|
2
|
+
import { HandlerAuth } from '@atproto/xrpc-server';
|
|
3
|
+
import * as AppBskyActorDefs from './defs';
|
|
4
|
+
export interface QueryParams {
|
|
5
|
+
term?: string;
|
|
6
|
+
q?: string;
|
|
7
|
+
limit: number;
|
|
8
|
+
}
|
|
9
|
+
export type InputSchema = undefined;
|
|
10
|
+
export interface OutputSchema {
|
|
11
|
+
actors: AppBskyActorDefs.ProfileViewBasic[];
|
|
12
|
+
[k: string]: unknown;
|
|
13
|
+
}
|
|
14
|
+
export type HandlerInput = undefined;
|
|
15
|
+
export interface HandlerSuccess {
|
|
16
|
+
encoding: 'application/json';
|
|
17
|
+
body: OutputSchema;
|
|
18
|
+
headers?: {
|
|
19
|
+
[key: string]: string;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
export interface HandlerError {
|
|
23
|
+
status: number;
|
|
24
|
+
message?: string;
|
|
25
|
+
}
|
|
26
|
+
export type HandlerOutput = HandlerError | HandlerSuccess;
|
|
27
|
+
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
|
28
|
+
auth: HA;
|
|
29
|
+
params: QueryParams;
|
|
30
|
+
input: HandlerInput;
|
|
31
|
+
req: express.Request;
|
|
32
|
+
res: express.Response;
|
|
33
|
+
};
|
|
34
|
+
export type Handler<HA extends HandlerAuth = never> = (ctx: HandlerReqCtx<HA>) => Promise<HandlerOutput> | HandlerOutput;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ValidationResult, BlobRef } from '@atproto/lexicon';
|
|
2
|
+
export interface Main {
|
|
3
|
+
external: External;
|
|
4
|
+
[k: string]: unknown;
|
|
5
|
+
}
|
|
6
|
+
export declare function isMain(v: unknown): v is Main;
|
|
7
|
+
export declare function validateMain(v: unknown): ValidationResult;
|
|
8
|
+
export interface External {
|
|
9
|
+
uri: string;
|
|
10
|
+
title: string;
|
|
11
|
+
description: string;
|
|
12
|
+
thumb?: BlobRef;
|
|
13
|
+
[k: string]: unknown;
|
|
14
|
+
}
|
|
15
|
+
export declare function isExternal(v: unknown): v is External;
|
|
16
|
+
export declare function validateExternal(v: unknown): ValidationResult;
|
|
17
|
+
export interface View {
|
|
18
|
+
external: ViewExternal;
|
|
19
|
+
[k: string]: unknown;
|
|
20
|
+
}
|
|
21
|
+
export declare function isView(v: unknown): v is View;
|
|
22
|
+
export declare function validateView(v: unknown): ValidationResult;
|
|
23
|
+
export interface ViewExternal {
|
|
24
|
+
uri: string;
|
|
25
|
+
title: string;
|
|
26
|
+
description: string;
|
|
27
|
+
thumb?: string;
|
|
28
|
+
[k: string]: unknown;
|
|
29
|
+
}
|
|
30
|
+
export declare function isViewExternal(v: unknown): v is ViewExternal;
|
|
31
|
+
export declare function validateViewExternal(v: unknown): ValidationResult;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { ValidationResult, BlobRef } from '@atproto/lexicon';
|
|
2
|
+
export interface Main {
|
|
3
|
+
images: Image[];
|
|
4
|
+
[k: string]: unknown;
|
|
5
|
+
}
|
|
6
|
+
export declare function isMain(v: unknown): v is Main;
|
|
7
|
+
export declare function validateMain(v: unknown): ValidationResult;
|
|
8
|
+
export interface Image {
|
|
9
|
+
image: BlobRef;
|
|
10
|
+
alt: string;
|
|
11
|
+
aspectRatio?: AspectRatio;
|
|
12
|
+
[k: string]: unknown;
|
|
13
|
+
}
|
|
14
|
+
export declare function isImage(v: unknown): v is Image;
|
|
15
|
+
export declare function validateImage(v: unknown): ValidationResult;
|
|
16
|
+
export interface AspectRatio {
|
|
17
|
+
width: number;
|
|
18
|
+
height: number;
|
|
19
|
+
[k: string]: unknown;
|
|
20
|
+
}
|
|
21
|
+
export declare function isAspectRatio(v: unknown): v is AspectRatio;
|
|
22
|
+
export declare function validateAspectRatio(v: unknown): ValidationResult;
|
|
23
|
+
export interface View {
|
|
24
|
+
images: ViewImage[];
|
|
25
|
+
[k: string]: unknown;
|
|
26
|
+
}
|
|
27
|
+
export declare function isView(v: unknown): v is View;
|
|
28
|
+
export declare function validateView(v: unknown): ValidationResult;
|
|
29
|
+
export interface ViewImage {
|
|
30
|
+
thumb: string;
|
|
31
|
+
fullsize: string;
|
|
32
|
+
alt: string;
|
|
33
|
+
aspectRatio?: AspectRatio;
|
|
34
|
+
[k: string]: unknown;
|
|
35
|
+
}
|
|
36
|
+
export declare function isViewImage(v: unknown): v is ViewImage;
|
|
37
|
+
export declare function validateViewImage(v: unknown): ValidationResult;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { ValidationResult } from '@atproto/lexicon';
|
|
2
|
+
import * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef';
|
|
3
|
+
import * as AppBskyFeedDefs from '../feed/defs';
|
|
4
|
+
import * as AppBskyGraphDefs from '../graph/defs';
|
|
5
|
+
import * as AppBskyActorDefs from '../actor/defs';
|
|
6
|
+
import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs';
|
|
7
|
+
import * as AppBskyEmbedImages from './images';
|
|
8
|
+
import * as AppBskyEmbedExternal from './external';
|
|
9
|
+
import * as AppBskyEmbedRecordWithMedia from './recordWithMedia';
|
|
10
|
+
export interface Main {
|
|
11
|
+
record: ComAtprotoRepoStrongRef.Main;
|
|
12
|
+
[k: string]: unknown;
|
|
13
|
+
}
|
|
14
|
+
export declare function isMain(v: unknown): v is Main;
|
|
15
|
+
export declare function validateMain(v: unknown): ValidationResult;
|
|
16
|
+
export interface View {
|
|
17
|
+
record: ViewRecord | ViewNotFound | ViewBlocked | AppBskyFeedDefs.GeneratorView | AppBskyGraphDefs.ListView | {
|
|
18
|
+
$type: string;
|
|
19
|
+
[k: string]: unknown;
|
|
20
|
+
};
|
|
21
|
+
[k: string]: unknown;
|
|
22
|
+
}
|
|
23
|
+
export declare function isView(v: unknown): v is View;
|
|
24
|
+
export declare function validateView(v: unknown): ValidationResult;
|
|
25
|
+
export interface ViewRecord {
|
|
26
|
+
uri: string;
|
|
27
|
+
cid: string;
|
|
28
|
+
author: AppBskyActorDefs.ProfileViewBasic;
|
|
29
|
+
value: {};
|
|
30
|
+
labels?: ComAtprotoLabelDefs.Label[];
|
|
31
|
+
embeds?: (AppBskyEmbedImages.View | AppBskyEmbedExternal.View | View | AppBskyEmbedRecordWithMedia.View | {
|
|
32
|
+
$type: string;
|
|
33
|
+
[k: string]: unknown;
|
|
34
|
+
})[];
|
|
35
|
+
indexedAt: string;
|
|
36
|
+
[k: string]: unknown;
|
|
37
|
+
}
|
|
38
|
+
export declare function isViewRecord(v: unknown): v is ViewRecord;
|
|
39
|
+
export declare function validateViewRecord(v: unknown): ValidationResult;
|
|
40
|
+
export interface ViewNotFound {
|
|
41
|
+
uri: string;
|
|
42
|
+
notFound: true;
|
|
43
|
+
[k: string]: unknown;
|
|
44
|
+
}
|
|
45
|
+
export declare function isViewNotFound(v: unknown): v is ViewNotFound;
|
|
46
|
+
export declare function validateViewNotFound(v: unknown): ValidationResult;
|
|
47
|
+
export interface ViewBlocked {
|
|
48
|
+
uri: string;
|
|
49
|
+
blocked: true;
|
|
50
|
+
author: AppBskyFeedDefs.BlockedAuthor;
|
|
51
|
+
[k: string]: unknown;
|
|
52
|
+
}
|
|
53
|
+
export declare function isViewBlocked(v: unknown): v is ViewBlocked;
|
|
54
|
+
export declare function validateViewBlocked(v: unknown): ValidationResult;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ValidationResult } from '@atproto/lexicon';
|
|
2
|
+
import * as AppBskyEmbedRecord from './record';
|
|
3
|
+
import * as AppBskyEmbedImages from './images';
|
|
4
|
+
import * as AppBskyEmbedExternal from './external';
|
|
5
|
+
export interface Main {
|
|
6
|
+
record: AppBskyEmbedRecord.Main;
|
|
7
|
+
media: AppBskyEmbedImages.Main | AppBskyEmbedExternal.Main | {
|
|
8
|
+
$type: string;
|
|
9
|
+
[k: string]: unknown;
|
|
10
|
+
};
|
|
11
|
+
[k: string]: unknown;
|
|
12
|
+
}
|
|
13
|
+
export declare function isMain(v: unknown): v is Main;
|
|
14
|
+
export declare function validateMain(v: unknown): ValidationResult;
|
|
15
|
+
export interface View {
|
|
16
|
+
record: AppBskyEmbedRecord.View;
|
|
17
|
+
media: AppBskyEmbedImages.View | AppBskyEmbedExternal.View | {
|
|
18
|
+
$type: string;
|
|
19
|
+
[k: string]: unknown;
|
|
20
|
+
};
|
|
21
|
+
[k: string]: unknown;
|
|
22
|
+
}
|
|
23
|
+
export declare function isView(v: unknown): v is View;
|
|
24
|
+
export declare function validateView(v: unknown): ValidationResult;
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { ValidationResult } from '@atproto/lexicon';
|
|
2
|
+
import * as AppBskyActorDefs from '../actor/defs';
|
|
3
|
+
import * as AppBskyEmbedImages from '../embed/images';
|
|
4
|
+
import * as AppBskyEmbedExternal from '../embed/external';
|
|
5
|
+
import * as AppBskyEmbedRecord from '../embed/record';
|
|
6
|
+
import * as AppBskyEmbedRecordWithMedia from '../embed/recordWithMedia';
|
|
7
|
+
import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs';
|
|
8
|
+
import * as AppBskyRichtextFacet from '../richtext/facet';
|
|
9
|
+
import * as AppBskyGraphDefs from '../graph/defs';
|
|
10
|
+
export interface PostView {
|
|
11
|
+
uri: string;
|
|
12
|
+
cid: string;
|
|
13
|
+
author: AppBskyActorDefs.ProfileViewBasic;
|
|
14
|
+
record: {};
|
|
15
|
+
embed?: AppBskyEmbedImages.View | AppBskyEmbedExternal.View | AppBskyEmbedRecord.View | AppBskyEmbedRecordWithMedia.View | {
|
|
16
|
+
$type: string;
|
|
17
|
+
[k: string]: unknown;
|
|
18
|
+
};
|
|
19
|
+
replyCount?: number;
|
|
20
|
+
repostCount?: number;
|
|
21
|
+
likeCount?: number;
|
|
22
|
+
indexedAt: string;
|
|
23
|
+
viewer?: ViewerState;
|
|
24
|
+
labels?: ComAtprotoLabelDefs.Label[];
|
|
25
|
+
threadgate?: ThreadgateView;
|
|
26
|
+
[k: string]: unknown;
|
|
27
|
+
}
|
|
28
|
+
export declare function isPostView(v: unknown): v is PostView;
|
|
29
|
+
export declare function validatePostView(v: unknown): ValidationResult;
|
|
30
|
+
export interface ViewerState {
|
|
31
|
+
repost?: string;
|
|
32
|
+
like?: string;
|
|
33
|
+
replyDisabled?: boolean;
|
|
34
|
+
[k: string]: unknown;
|
|
35
|
+
}
|
|
36
|
+
export declare function isViewerState(v: unknown): v is ViewerState;
|
|
37
|
+
export declare function validateViewerState(v: unknown): ValidationResult;
|
|
38
|
+
export interface FeedViewPost {
|
|
39
|
+
post: PostView;
|
|
40
|
+
reply?: ReplyRef;
|
|
41
|
+
reason?: ReasonRepost | {
|
|
42
|
+
$type: string;
|
|
43
|
+
[k: string]: unknown;
|
|
44
|
+
};
|
|
45
|
+
[k: string]: unknown;
|
|
46
|
+
}
|
|
47
|
+
export declare function isFeedViewPost(v: unknown): v is FeedViewPost;
|
|
48
|
+
export declare function validateFeedViewPost(v: unknown): ValidationResult;
|
|
49
|
+
export interface ReplyRef {
|
|
50
|
+
root: PostView | NotFoundPost | BlockedPost | {
|
|
51
|
+
$type: string;
|
|
52
|
+
[k: string]: unknown;
|
|
53
|
+
};
|
|
54
|
+
parent: PostView | NotFoundPost | BlockedPost | {
|
|
55
|
+
$type: string;
|
|
56
|
+
[k: string]: unknown;
|
|
57
|
+
};
|
|
58
|
+
[k: string]: unknown;
|
|
59
|
+
}
|
|
60
|
+
export declare function isReplyRef(v: unknown): v is ReplyRef;
|
|
61
|
+
export declare function validateReplyRef(v: unknown): ValidationResult;
|
|
62
|
+
export interface ReasonRepost {
|
|
63
|
+
by: AppBskyActorDefs.ProfileViewBasic;
|
|
64
|
+
indexedAt: string;
|
|
65
|
+
[k: string]: unknown;
|
|
66
|
+
}
|
|
67
|
+
export declare function isReasonRepost(v: unknown): v is ReasonRepost;
|
|
68
|
+
export declare function validateReasonRepost(v: unknown): ValidationResult;
|
|
69
|
+
export interface ThreadViewPost {
|
|
70
|
+
post: PostView;
|
|
71
|
+
parent?: ThreadViewPost | NotFoundPost | BlockedPost | {
|
|
72
|
+
$type: string;
|
|
73
|
+
[k: string]: unknown;
|
|
74
|
+
};
|
|
75
|
+
replies?: (ThreadViewPost | NotFoundPost | BlockedPost | {
|
|
76
|
+
$type: string;
|
|
77
|
+
[k: string]: unknown;
|
|
78
|
+
})[];
|
|
79
|
+
[k: string]: unknown;
|
|
80
|
+
}
|
|
81
|
+
export declare function isThreadViewPost(v: unknown): v is ThreadViewPost;
|
|
82
|
+
export declare function validateThreadViewPost(v: unknown): ValidationResult;
|
|
83
|
+
export interface NotFoundPost {
|
|
84
|
+
uri: string;
|
|
85
|
+
notFound: true;
|
|
86
|
+
[k: string]: unknown;
|
|
87
|
+
}
|
|
88
|
+
export declare function isNotFoundPost(v: unknown): v is NotFoundPost;
|
|
89
|
+
export declare function validateNotFoundPost(v: unknown): ValidationResult;
|
|
90
|
+
export interface BlockedPost {
|
|
91
|
+
uri: string;
|
|
92
|
+
blocked: true;
|
|
93
|
+
author: BlockedAuthor;
|
|
94
|
+
[k: string]: unknown;
|
|
95
|
+
}
|
|
96
|
+
export declare function isBlockedPost(v: unknown): v is BlockedPost;
|
|
97
|
+
export declare function validateBlockedPost(v: unknown): ValidationResult;
|
|
98
|
+
export interface BlockedAuthor {
|
|
99
|
+
did: string;
|
|
100
|
+
viewer?: AppBskyActorDefs.ViewerState;
|
|
101
|
+
[k: string]: unknown;
|
|
102
|
+
}
|
|
103
|
+
export declare function isBlockedAuthor(v: unknown): v is BlockedAuthor;
|
|
104
|
+
export declare function validateBlockedAuthor(v: unknown): ValidationResult;
|
|
105
|
+
export interface GeneratorView {
|
|
106
|
+
uri: string;
|
|
107
|
+
cid: string;
|
|
108
|
+
did: string;
|
|
109
|
+
creator: AppBskyActorDefs.ProfileView;
|
|
110
|
+
displayName: string;
|
|
111
|
+
description?: string;
|
|
112
|
+
descriptionFacets?: AppBskyRichtextFacet.Main[];
|
|
113
|
+
avatar?: string;
|
|
114
|
+
likeCount?: number;
|
|
115
|
+
viewer?: GeneratorViewerState;
|
|
116
|
+
indexedAt: string;
|
|
117
|
+
[k: string]: unknown;
|
|
118
|
+
}
|
|
119
|
+
export declare function isGeneratorView(v: unknown): v is GeneratorView;
|
|
120
|
+
export declare function validateGeneratorView(v: unknown): ValidationResult;
|
|
121
|
+
export interface GeneratorViewerState {
|
|
122
|
+
like?: string;
|
|
123
|
+
[k: string]: unknown;
|
|
124
|
+
}
|
|
125
|
+
export declare function isGeneratorViewerState(v: unknown): v is GeneratorViewerState;
|
|
126
|
+
export declare function validateGeneratorViewerState(v: unknown): ValidationResult;
|
|
127
|
+
export interface SkeletonFeedPost {
|
|
128
|
+
post: string;
|
|
129
|
+
reason?: SkeletonReasonRepost | {
|
|
130
|
+
$type: string;
|
|
131
|
+
[k: string]: unknown;
|
|
132
|
+
};
|
|
133
|
+
[k: string]: unknown;
|
|
134
|
+
}
|
|
135
|
+
export declare function isSkeletonFeedPost(v: unknown): v is SkeletonFeedPost;
|
|
136
|
+
export declare function validateSkeletonFeedPost(v: unknown): ValidationResult;
|
|
137
|
+
export interface SkeletonReasonRepost {
|
|
138
|
+
repost: string;
|
|
139
|
+
[k: string]: unknown;
|
|
140
|
+
}
|
|
141
|
+
export declare function isSkeletonReasonRepost(v: unknown): v is SkeletonReasonRepost;
|
|
142
|
+
export declare function validateSkeletonReasonRepost(v: unknown): ValidationResult;
|
|
143
|
+
export interface ThreadgateView {
|
|
144
|
+
uri?: string;
|
|
145
|
+
cid?: string;
|
|
146
|
+
record?: {};
|
|
147
|
+
lists?: AppBskyGraphDefs.ListViewBasic[];
|
|
148
|
+
[k: string]: unknown;
|
|
149
|
+
}
|
|
150
|
+
export declare function isThreadgateView(v: unknown): v is ThreadgateView;
|
|
151
|
+
export declare function validateThreadgateView(v: unknown): ValidationResult;
|