From d5b5b2161719a9f794d46fc94b67b0c924bd8206 Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Wed, 30 Apr 2025 21:15:55 +0300 Subject: [PATCH] check in lexicons --- lexicons/app/bsky/actor/defs.json | 577 +++++++++++ lexicons/app/bsky/actor/getPreferences.json | 27 + lexicons/app/bsky/actor/getProfile.json | 28 + lexicons/app/bsky/actor/getProfiles.json | 37 + lexicons/app/bsky/actor/getSuggestions.json | 43 + lexicons/app/bsky/actor/profile.json | 53 ++ lexicons/app/bsky/actor/putPreferences.json | 23 + lexicons/app/bsky/actor/searchActors.json | 47 + .../app/bsky/actor/searchActorsTypeahead.json | 45 + lexicons/app/bsky/embed/defs.json | 15 + lexicons/app/bsky/embed/external.json | 51 + lexicons/app/bsky/embed/images.json | 72 ++ lexicons/app/bsky/embed/record.json | 96 ++ lexicons/app/bsky/embed/recordWithMedia.json | 43 + lexicons/app/bsky/embed/video.json | 67 ++ lexicons/app/bsky/feed/defs.json | 313 ++++++ .../app/bsky/feed/describeFeedGenerator.json | 39 + lexicons/app/bsky/feed/generator.json | 54 ++ lexicons/app/bsky/feed/getActorFeeds.json | 41 + lexicons/app/bsky/feed/getActorLikes.json | 42 + lexicons/app/bsky/feed/getAuthorFeed.json | 58 ++ lexicons/app/bsky/feed/getFeed.json | 42 + lexicons/app/bsky/feed/getFeedGenerator.json | 42 + lexicons/app/bsky/feed/getFeedGenerators.json | 36 + lexicons/app/bsky/feed/getFeedSkeleton.json | 46 + lexicons/app/bsky/feed/getLikes.json | 58 ++ lexicons/app/bsky/feed/getListFeed.json | 46 + lexicons/app/bsky/feed/getPostThread.json | 57 ++ lexicons/app/bsky/feed/getPosts.json | 35 + lexicons/app/bsky/feed/getQuotes.json | 52 + lexicons/app/bsky/feed/getRepostedBy.json | 52 + lexicons/app/bsky/feed/getSuggestedFeeds.json | 39 + lexicons/app/bsky/feed/getTimeline.json | 43 + lexicons/app/bsky/feed/like.json | 19 + lexicons/app/bsky/feed/post.json | 96 ++ lexicons/app/bsky/feed/postgate.json | 46 + lexicons/app/bsky/feed/repost.json | 19 + lexicons/app/bsky/feed/searchPosts.json | 99 ++ lexicons/app/bsky/feed/sendInteractions.json | 33 + lexicons/app/bsky/feed/threadgate.json | 69 ++ lexicons/app/bsky/graph/block.json | 23 + lexicons/app/bsky/graph/defs.json | 166 ++++ lexicons/app/bsky/graph/follow.json | 19 + .../app/bsky/graph/getActorStarterPacks.json | 41 + lexicons/app/bsky/graph/getBlocks.json | 39 + lexicons/app/bsky/graph/getFollowers.json | 45 + lexicons/app/bsky/graph/getFollows.json | 45 + .../app/bsky/graph/getKnownFollowers.json | 45 + lexicons/app/bsky/graph/getList.json | 46 + lexicons/app/bsky/graph/getListBlocks.json | 36 + lexicons/app/bsky/graph/getListMutes.json | 36 + lexicons/app/bsky/graph/getLists.json | 42 + lexicons/app/bsky/graph/getMutes.json | 39 + lexicons/app/bsky/graph/getRelationships.json | 56 ++ lexicons/app/bsky/graph/getStarterPack.json | 34 + lexicons/app/bsky/graph/getStarterPacks.json | 37 + .../graph/getSuggestedFollowsByActor.json | 42 + lexicons/app/bsky/graph/list.json | 47 + lexicons/app/bsky/graph/listblock.json | 23 + lexicons/app/bsky/graph/listitem.json | 28 + lexicons/app/bsky/graph/muteActor.json | 20 + lexicons/app/bsky/graph/muteActorList.json | 20 + lexicons/app/bsky/graph/muteThread.json | 20 + .../app/bsky/graph/searchStarterPacks.json | 48 + lexicons/app/bsky/graph/starterpack.json | 51 + lexicons/app/bsky/graph/unmuteActor.json | 20 + lexicons/app/bsky/graph/unmuteActorList.json | 20 + lexicons/app/bsky/graph/unmuteThread.json | 20 + lexicons/app/bsky/graph/verification.json | 36 + lexicons/app/bsky/labeler/defs.json | 91 ++ lexicons/app/bsky/labeler/getServices.json | 43 + lexicons/app/bsky/labeler/service.json | 47 + lexicons/app/bsky/notification/defs.json | 10 + .../app/bsky/notification/getUnreadCount.json | 27 + .../bsky/notification/listNotifications.json | 88 ++ .../app/bsky/notification/putPreferences.json | 20 + .../app/bsky/notification/registerPush.json | 26 + .../app/bsky/notification/updateSeen.json | 20 + lexicons/app/bsky/richtext/facet.json | 51 + lexicons/app/bsky/unspecced/defs.json | 91 ++ lexicons/app/bsky/unspecced/getConfig.json | 20 + .../unspecced/getPopularFeedGenerators.json | 40 + .../app/bsky/unspecced/getSuggestedFeeds.json | 37 + .../unspecced/getSuggestedFeedsSkeleton.json | 42 + .../unspecced/getSuggestedStarterPacks.json | 37 + .../getSuggestedStarterPacksSkeleton.json | 42 + .../app/bsky/unspecced/getSuggestedUsers.json | 41 + .../unspecced/getSuggestedUsersSkeleton.json | 46 + .../unspecced/getSuggestionsSkeleton.json | 58 ++ .../bsky/unspecced/getTaggedSuggestions.json | 42 + .../app/bsky/unspecced/getTrendingTopics.json | 49 + lexicons/app/bsky/unspecced/getTrends.json | 37 + .../app/bsky/unspecced/getTrendsSkeleton.json | 42 + .../bsky/unspecced/searchActorsSkeleton.json | 61 ++ .../bsky/unspecced/searchPostsSkeleton.json | 104 ++ .../unspecced/searchStarterPacksSkeleton.json | 63 ++ lexicons/app/bsky/video/defs.json | 28 + lexicons/app/bsky/video/getJobStatus.json | 32 + lexicons/app/bsky/video/getUploadLimits.json | 24 + lexicons/app/bsky/video/uploadVideo.json | 26 + lexicons/chat/bsky/actor/declaration.json | 21 + lexicons/chat/bsky/actor/defs.json | 37 + lexicons/chat/bsky/actor/deleteAccount.json | 16 + .../chat/bsky/actor/exportAccountData.json | 12 + lexicons/chat/bsky/convo/acceptConvo.json | 31 + lexicons/chat/bsky/convo/addReaction.json | 55 ++ lexicons/chat/bsky/convo/defs.json | 236 +++++ .../chat/bsky/convo/deleteMessageForSelf.json | 27 + lexicons/chat/bsky/convo/getConvo.json | 29 + .../chat/bsky/convo/getConvoAvailability.json | 41 + .../chat/bsky/convo/getConvoForMembers.json | 37 + lexicons/chat/bsky/convo/getLog.json | 44 + lexicons/chat/bsky/convo/getMessages.json | 43 + lexicons/chat/bsky/convo/leaveConvo.json | 30 + lexicons/chat/bsky/convo/listConvos.json | 46 + lexicons/chat/bsky/convo/muteConvo.json | 32 + lexicons/chat/bsky/convo/removeReaction.json | 51 + lexicons/chat/bsky/convo/sendMessage.json | 30 + .../chat/bsky/convo/sendMessageBatch.json | 53 ++ lexicons/chat/bsky/convo/unmuteConvo.json | 32 + lexicons/chat/bsky/convo/updateAllRead.json | 34 + lexicons/chat/bsky/convo/updateRead.json | 33 + .../bsky/moderation/getActorMetadata.json | 43 + .../bsky/moderation/getMessageContext.json | 41 + .../bsky/moderation/updateActorAccess.json | 21 + lexicons/com/atproto/admin/defs.json | 71 ++ lexicons/com/atproto/admin/deleteAccount.json | 20 + .../atproto/admin/disableAccountInvites.json | 24 + .../com/atproto/admin/disableInviteCodes.json | 26 + .../atproto/admin/enableAccountInvites.json | 24 + .../com/atproto/admin/getAccountInfo.json | 24 + .../com/atproto/admin/getAccountInfos.json | 36 + .../com/atproto/admin/getInviteCodes.json | 44 + .../com/atproto/admin/getSubjectStatus.json | 43 + .../com/atproto/admin/searchAccounts.json | 40 + lexicons/com/atproto/admin/sendEmail.json | 37 + .../com/atproto/admin/updateAccountEmail.json | 25 + .../atproto/admin/updateAccountHandle.json | 21 + .../atproto/admin/updateAccountPassword.json | 21 + .../admin/updateAccountSigningKey.json | 25 + .../atproto/admin/updateSubjectStatus.json | 56 ++ lexicons/com/atproto/identity/defs.json | 22 + .../getRecommendedDidCredentials.json | 29 + .../com/atproto/identity/refreshIdentity.json | 44 + .../requestPlcOperationSignature.json | 10 + lexicons/com/atproto/identity/resolveDid.json | 44 + .../com/atproto/identity/resolveHandle.json | 37 + .../com/atproto/identity/resolveIdentity.json | 42 + .../atproto/identity/signPlcOperation.json | 45 + .../atproto/identity/submitPlcOperation.json | 20 + .../com/atproto/identity/updateHandle.json | 24 + lexicons/com/atproto/label/defs.json | 156 +++ lexicons/com/atproto/label/queryLabels.json | 47 + .../com/atproto/label/subscribeLabels.json | 50 + lexicons/com/atproto/lexicon/schema.json | 21 + .../com/atproto/moderation/createReport.json | 71 ++ lexicons/com/atproto/moderation/defs.json | 51 + lexicons/com/atproto/repo/applyWrites.json | 131 +++ lexicons/com/atproto/repo/createRecord.json | 73 ++ lexicons/com/atproto/repo/defs.json | 14 + lexicons/com/atproto/repo/deleteRecord.json | 57 ++ lexicons/com/atproto/repo/describeRepo.json | 51 + lexicons/com/atproto/repo/getRecord.json | 49 + lexicons/com/atproto/repo/importRepo.json | 13 + .../com/atproto/repo/listMissingBlobs.json | 44 + lexicons/com/atproto/repo/listRecords.json | 61 ++ lexicons/com/atproto/repo/putRecord.json | 74 ++ lexicons/com/atproto/repo/strongRef.json | 15 + lexicons/com/atproto/repo/uploadBlob.json | 23 + .../com/atproto/server/activateAccount.json | 10 + .../atproto/server/checkAccountStatus.json | 38 + lexicons/com/atproto/server/confirmEmail.json | 27 + .../com/atproto/server/createAccount.json | 76 ++ .../com/atproto/server/createAppPassword.json | 45 + .../com/atproto/server/createInviteCode.json | 31 + .../com/atproto/server/createInviteCodes.json | 49 + .../com/atproto/server/createSession.json | 56 ++ .../com/atproto/server/deactivateAccount.json | 23 + lexicons/com/atproto/server/defs.json | 38 + .../com/atproto/server/deleteAccount.json | 23 + .../com/atproto/server/deleteSession.json | 10 + .../com/atproto/server/describeServer.json | 59 ++ .../atproto/server/getAccountInviteCodes.json | 38 + .../com/atproto/server/getServiceAuth.json | 48 + lexicons/com/atproto/server/getSession.json | 31 + .../com/atproto/server/listAppPasswords.json | 33 + .../com/atproto/server/refreshSession.json | 31 + .../atproto/server/requestAccountDelete.json | 10 + .../server/requestEmailConfirmation.json | 10 + .../atproto/server/requestEmailUpdate.json | 20 + .../atproto/server/requestPasswordReset.json | 20 + .../com/atproto/server/reserveSigningKey.json | 36 + .../com/atproto/server/resetPassword.json | 22 + .../com/atproto/server/revokeAppPassword.json | 20 + lexicons/com/atproto/server/updateEmail.json | 30 + lexicons/com/atproto/sync/defs.json | 10 + lexicons/com/atproto/sync/getBlob.json | 36 + lexicons/com/atproto/sync/getBlocks.json | 35 + lexicons/com/atproto/sync/getCheckout.json | 24 + lexicons/com/atproto/sync/getHead.json | 32 + lexicons/com/atproto/sync/getHostStatus.json | 43 + .../com/atproto/sync/getLatestCommit.json | 38 + lexicons/com/atproto/sync/getRecord.json | 37 + lexicons/com/atproto/sync/getRepo.json | 35 + lexicons/com/atproto/sync/getRepoStatus.json | 50 + lexicons/com/atproto/sync/listBlobs.json | 53 ++ lexicons/com/atproto/sync/listHosts.json | 56 ++ lexicons/com/atproto/sync/listRepos.json | 62 ++ .../atproto/sync/listReposByCollection.json | 46 + lexicons/com/atproto/sync/notifyOfUpdate.json | 23 + lexicons/com/atproto/sync/requestCrawl.json | 24 + lexicons/com/atproto/sync/subscribeRepos.json | 215 +++++ .../com/atproto/temp/addReservedHandle.json | 27 + .../com/atproto/temp/checkSignupQueue.json | 22 + lexicons/com/atproto/temp/fetchLabels.json | 35 + .../temp/requestPhoneVerification.json | 20 + .../ozone/communication/createTemplate.json | 49 + lexicons/tools/ozone/communication/defs.json | 43 + .../ozone/communication/deleteTemplate.json | 20 + .../ozone/communication/listTemplates.json | 26 + .../ozone/communication/updateTemplate.json | 56 ++ .../ozone/hosting/getAccountHistory.json | 106 +++ lexicons/tools/ozone/moderation/defs.json | 898 ++++++++++++++++++ .../tools/ozone/moderation/emitEvent.json | 63 ++ lexicons/tools/ozone/moderation/getEvent.json | 24 + .../tools/ozone/moderation/getRecord.json | 26 + .../tools/ozone/moderation/getRecords.json | 43 + lexicons/tools/ozone/moderation/getRepo.json | 25 + .../ozone/moderation/getReporterStats.json | 40 + lexicons/tools/ozone/moderation/getRepos.json | 43 + .../tools/ozone/moderation/getSubjects.json | 40 + .../tools/ozone/moderation/queryEvents.json | 142 +++ .../tools/ozone/moderation/queryStatuses.json | 209 ++++ .../tools/ozone/moderation/searchRepos.json | 44 + lexicons/tools/ozone/server/getConfig.json | 66 ++ lexicons/tools/ozone/set/addValues.json | 32 + lexicons/tools/ozone/set/defs.json | 49 + lexicons/tools/ozone/set/deleteSet.json | 36 + lexicons/tools/ozone/set/deleteValues.json | 37 + lexicons/tools/ozone/set/getValues.json | 56 ++ lexicons/tools/ozone/set/querySets.json | 57 ++ lexicons/tools/ozone/set/upsertSet.json | 24 + lexicons/tools/ozone/setting/defs.json | 64 ++ lexicons/tools/ozone/setting/listOptions.json | 61 ++ .../tools/ozone/setting/removeOptions.json | 39 + .../tools/ozone/setting/upsertOption.json | 56 ++ lexicons/tools/ozone/signature/defs.json | 14 + .../ozone/signature/findCorrelation.json | 39 + .../ozone/signature/findRelatedAccounts.json | 61 ++ .../tools/ozone/signature/searchAccounts.json | 46 + lexicons/tools/ozone/team/addMember.json | 42 + lexicons/tools/ozone/team/defs.json | 46 + lexicons/tools/ozone/team/deleteMember.json | 30 + lexicons/tools/ozone/team/listMembers.json | 55 ++ lexicons/tools/ozone/team/updateMember.json | 43 + lexicons/tools/ozone/verification/defs.json | 85 ++ .../verification/grantVerifications.json | 91 ++ .../ozone/verification/listVerifications.json | 83 ++ .../verification/revokeVerifications.json | 75 ++ 259 files changed, 13100 insertions(+) create mode 100644 lexicons/app/bsky/actor/defs.json create mode 100644 lexicons/app/bsky/actor/getPreferences.json create mode 100644 lexicons/app/bsky/actor/getProfile.json create mode 100644 lexicons/app/bsky/actor/getProfiles.json create mode 100644 lexicons/app/bsky/actor/getSuggestions.json create mode 100644 lexicons/app/bsky/actor/profile.json create mode 100644 lexicons/app/bsky/actor/putPreferences.json create mode 100644 lexicons/app/bsky/actor/searchActors.json create mode 100644 lexicons/app/bsky/actor/searchActorsTypeahead.json create mode 100644 lexicons/app/bsky/embed/defs.json create mode 100644 lexicons/app/bsky/embed/external.json create mode 100644 lexicons/app/bsky/embed/images.json create mode 100644 lexicons/app/bsky/embed/record.json create mode 100644 lexicons/app/bsky/embed/recordWithMedia.json create mode 100644 lexicons/app/bsky/embed/video.json create mode 100644 lexicons/app/bsky/feed/defs.json create mode 100644 lexicons/app/bsky/feed/describeFeedGenerator.json create mode 100644 lexicons/app/bsky/feed/generator.json create mode 100644 lexicons/app/bsky/feed/getActorFeeds.json create mode 100644 lexicons/app/bsky/feed/getActorLikes.json create mode 100644 lexicons/app/bsky/feed/getAuthorFeed.json create mode 100644 lexicons/app/bsky/feed/getFeed.json create mode 100644 lexicons/app/bsky/feed/getFeedGenerator.json create mode 100644 lexicons/app/bsky/feed/getFeedGenerators.json create mode 100644 lexicons/app/bsky/feed/getFeedSkeleton.json create mode 100644 lexicons/app/bsky/feed/getLikes.json create mode 100644 lexicons/app/bsky/feed/getListFeed.json create mode 100644 lexicons/app/bsky/feed/getPostThread.json create mode 100644 lexicons/app/bsky/feed/getPosts.json create mode 100644 lexicons/app/bsky/feed/getQuotes.json create mode 100644 lexicons/app/bsky/feed/getRepostedBy.json create mode 100644 lexicons/app/bsky/feed/getSuggestedFeeds.json create mode 100644 lexicons/app/bsky/feed/getTimeline.json create mode 100644 lexicons/app/bsky/feed/like.json create mode 100644 lexicons/app/bsky/feed/post.json create mode 100644 lexicons/app/bsky/feed/postgate.json create mode 100644 lexicons/app/bsky/feed/repost.json create mode 100644 lexicons/app/bsky/feed/searchPosts.json create mode 100644 lexicons/app/bsky/feed/sendInteractions.json create mode 100644 lexicons/app/bsky/feed/threadgate.json create mode 100644 lexicons/app/bsky/graph/block.json create mode 100644 lexicons/app/bsky/graph/defs.json create mode 100644 lexicons/app/bsky/graph/follow.json create mode 100644 lexicons/app/bsky/graph/getActorStarterPacks.json create mode 100644 lexicons/app/bsky/graph/getBlocks.json create mode 100644 lexicons/app/bsky/graph/getFollowers.json create mode 100644 lexicons/app/bsky/graph/getFollows.json create mode 100644 lexicons/app/bsky/graph/getKnownFollowers.json create mode 100644 lexicons/app/bsky/graph/getList.json create mode 100644 lexicons/app/bsky/graph/getListBlocks.json create mode 100644 lexicons/app/bsky/graph/getListMutes.json create mode 100644 lexicons/app/bsky/graph/getLists.json create mode 100644 lexicons/app/bsky/graph/getMutes.json create mode 100644 lexicons/app/bsky/graph/getRelationships.json create mode 100644 lexicons/app/bsky/graph/getStarterPack.json create mode 100644 lexicons/app/bsky/graph/getStarterPacks.json create mode 100644 lexicons/app/bsky/graph/getSuggestedFollowsByActor.json create mode 100644 lexicons/app/bsky/graph/list.json create mode 100644 lexicons/app/bsky/graph/listblock.json create mode 100644 lexicons/app/bsky/graph/listitem.json create mode 100644 lexicons/app/bsky/graph/muteActor.json create mode 100644 lexicons/app/bsky/graph/muteActorList.json create mode 100644 lexicons/app/bsky/graph/muteThread.json create mode 100644 lexicons/app/bsky/graph/searchStarterPacks.json create mode 100644 lexicons/app/bsky/graph/starterpack.json create mode 100644 lexicons/app/bsky/graph/unmuteActor.json create mode 100644 lexicons/app/bsky/graph/unmuteActorList.json create mode 100644 lexicons/app/bsky/graph/unmuteThread.json create mode 100644 lexicons/app/bsky/graph/verification.json create mode 100644 lexicons/app/bsky/labeler/defs.json create mode 100644 lexicons/app/bsky/labeler/getServices.json create mode 100644 lexicons/app/bsky/labeler/service.json create mode 100644 lexicons/app/bsky/notification/defs.json create mode 100644 lexicons/app/bsky/notification/getUnreadCount.json create mode 100644 lexicons/app/bsky/notification/listNotifications.json create mode 100644 lexicons/app/bsky/notification/putPreferences.json create mode 100644 lexicons/app/bsky/notification/registerPush.json create mode 100644 lexicons/app/bsky/notification/updateSeen.json create mode 100644 lexicons/app/bsky/richtext/facet.json create mode 100644 lexicons/app/bsky/unspecced/defs.json create mode 100644 lexicons/app/bsky/unspecced/getConfig.json create mode 100644 lexicons/app/bsky/unspecced/getPopularFeedGenerators.json create mode 100644 lexicons/app/bsky/unspecced/getSuggestedFeeds.json create mode 100644 lexicons/app/bsky/unspecced/getSuggestedFeedsSkeleton.json create mode 100644 lexicons/app/bsky/unspecced/getSuggestedStarterPacks.json create mode 100644 lexicons/app/bsky/unspecced/getSuggestedStarterPacksSkeleton.json create mode 100644 lexicons/app/bsky/unspecced/getSuggestedUsers.json create mode 100644 lexicons/app/bsky/unspecced/getSuggestedUsersSkeleton.json create mode 100644 lexicons/app/bsky/unspecced/getSuggestionsSkeleton.json create mode 100644 lexicons/app/bsky/unspecced/getTaggedSuggestions.json create mode 100644 lexicons/app/bsky/unspecced/getTrendingTopics.json create mode 100644 lexicons/app/bsky/unspecced/getTrends.json create mode 100644 lexicons/app/bsky/unspecced/getTrendsSkeleton.json create mode 100644 lexicons/app/bsky/unspecced/searchActorsSkeleton.json create mode 100644 lexicons/app/bsky/unspecced/searchPostsSkeleton.json create mode 100644 lexicons/app/bsky/unspecced/searchStarterPacksSkeleton.json create mode 100644 lexicons/app/bsky/video/defs.json create mode 100644 lexicons/app/bsky/video/getJobStatus.json create mode 100644 lexicons/app/bsky/video/getUploadLimits.json create mode 100644 lexicons/app/bsky/video/uploadVideo.json create mode 100644 lexicons/chat/bsky/actor/declaration.json create mode 100644 lexicons/chat/bsky/actor/defs.json create mode 100644 lexicons/chat/bsky/actor/deleteAccount.json create mode 100644 lexicons/chat/bsky/actor/exportAccountData.json create mode 100644 lexicons/chat/bsky/convo/acceptConvo.json create mode 100644 lexicons/chat/bsky/convo/addReaction.json create mode 100644 lexicons/chat/bsky/convo/defs.json create mode 100644 lexicons/chat/bsky/convo/deleteMessageForSelf.json create mode 100644 lexicons/chat/bsky/convo/getConvo.json create mode 100644 lexicons/chat/bsky/convo/getConvoAvailability.json create mode 100644 lexicons/chat/bsky/convo/getConvoForMembers.json create mode 100644 lexicons/chat/bsky/convo/getLog.json create mode 100644 lexicons/chat/bsky/convo/getMessages.json create mode 100644 lexicons/chat/bsky/convo/leaveConvo.json create mode 100644 lexicons/chat/bsky/convo/listConvos.json create mode 100644 lexicons/chat/bsky/convo/muteConvo.json create mode 100644 lexicons/chat/bsky/convo/removeReaction.json create mode 100644 lexicons/chat/bsky/convo/sendMessage.json create mode 100644 lexicons/chat/bsky/convo/sendMessageBatch.json create mode 100644 lexicons/chat/bsky/convo/unmuteConvo.json create mode 100644 lexicons/chat/bsky/convo/updateAllRead.json create mode 100644 lexicons/chat/bsky/convo/updateRead.json create mode 100644 lexicons/chat/bsky/moderation/getActorMetadata.json create mode 100644 lexicons/chat/bsky/moderation/getMessageContext.json create mode 100644 lexicons/chat/bsky/moderation/updateActorAccess.json create mode 100644 lexicons/com/atproto/admin/defs.json create mode 100644 lexicons/com/atproto/admin/deleteAccount.json create mode 100644 lexicons/com/atproto/admin/disableAccountInvites.json create mode 100644 lexicons/com/atproto/admin/disableInviteCodes.json create mode 100644 lexicons/com/atproto/admin/enableAccountInvites.json create mode 100644 lexicons/com/atproto/admin/getAccountInfo.json create mode 100644 lexicons/com/atproto/admin/getAccountInfos.json create mode 100644 lexicons/com/atproto/admin/getInviteCodes.json create mode 100644 lexicons/com/atproto/admin/getSubjectStatus.json create mode 100644 lexicons/com/atproto/admin/searchAccounts.json create mode 100644 lexicons/com/atproto/admin/sendEmail.json create mode 100644 lexicons/com/atproto/admin/updateAccountEmail.json create mode 100644 lexicons/com/atproto/admin/updateAccountHandle.json create mode 100644 lexicons/com/atproto/admin/updateAccountPassword.json create mode 100644 lexicons/com/atproto/admin/updateAccountSigningKey.json create mode 100644 lexicons/com/atproto/admin/updateSubjectStatus.json create mode 100644 lexicons/com/atproto/identity/defs.json create mode 100644 lexicons/com/atproto/identity/getRecommendedDidCredentials.json create mode 100644 lexicons/com/atproto/identity/refreshIdentity.json create mode 100644 lexicons/com/atproto/identity/requestPlcOperationSignature.json create mode 100644 lexicons/com/atproto/identity/resolveDid.json create mode 100644 lexicons/com/atproto/identity/resolveHandle.json create mode 100644 lexicons/com/atproto/identity/resolveIdentity.json create mode 100644 lexicons/com/atproto/identity/signPlcOperation.json create mode 100644 lexicons/com/atproto/identity/submitPlcOperation.json create mode 100644 lexicons/com/atproto/identity/updateHandle.json create mode 100644 lexicons/com/atproto/label/defs.json create mode 100644 lexicons/com/atproto/label/queryLabels.json create mode 100644 lexicons/com/atproto/label/subscribeLabels.json create mode 100644 lexicons/com/atproto/lexicon/schema.json create mode 100644 lexicons/com/atproto/moderation/createReport.json create mode 100644 lexicons/com/atproto/moderation/defs.json create mode 100644 lexicons/com/atproto/repo/applyWrites.json create mode 100644 lexicons/com/atproto/repo/createRecord.json create mode 100644 lexicons/com/atproto/repo/defs.json create mode 100644 lexicons/com/atproto/repo/deleteRecord.json create mode 100644 lexicons/com/atproto/repo/describeRepo.json create mode 100644 lexicons/com/atproto/repo/getRecord.json create mode 100644 lexicons/com/atproto/repo/importRepo.json create mode 100644 lexicons/com/atproto/repo/listMissingBlobs.json create mode 100644 lexicons/com/atproto/repo/listRecords.json create mode 100644 lexicons/com/atproto/repo/putRecord.json create mode 100644 lexicons/com/atproto/repo/strongRef.json create mode 100644 lexicons/com/atproto/repo/uploadBlob.json create mode 100644 lexicons/com/atproto/server/activateAccount.json create mode 100644 lexicons/com/atproto/server/checkAccountStatus.json create mode 100644 lexicons/com/atproto/server/confirmEmail.json create mode 100644 lexicons/com/atproto/server/createAccount.json create mode 100644 lexicons/com/atproto/server/createAppPassword.json create mode 100644 lexicons/com/atproto/server/createInviteCode.json create mode 100644 lexicons/com/atproto/server/createInviteCodes.json create mode 100644 lexicons/com/atproto/server/createSession.json create mode 100644 lexicons/com/atproto/server/deactivateAccount.json create mode 100644 lexicons/com/atproto/server/defs.json create mode 100644 lexicons/com/atproto/server/deleteAccount.json create mode 100644 lexicons/com/atproto/server/deleteSession.json create mode 100644 lexicons/com/atproto/server/describeServer.json create mode 100644 lexicons/com/atproto/server/getAccountInviteCodes.json create mode 100644 lexicons/com/atproto/server/getServiceAuth.json create mode 100644 lexicons/com/atproto/server/getSession.json create mode 100644 lexicons/com/atproto/server/listAppPasswords.json create mode 100644 lexicons/com/atproto/server/refreshSession.json create mode 100644 lexicons/com/atproto/server/requestAccountDelete.json create mode 100644 lexicons/com/atproto/server/requestEmailConfirmation.json create mode 100644 lexicons/com/atproto/server/requestEmailUpdate.json create mode 100644 lexicons/com/atproto/server/requestPasswordReset.json create mode 100644 lexicons/com/atproto/server/reserveSigningKey.json create mode 100644 lexicons/com/atproto/server/resetPassword.json create mode 100644 lexicons/com/atproto/server/revokeAppPassword.json create mode 100644 lexicons/com/atproto/server/updateEmail.json create mode 100644 lexicons/com/atproto/sync/defs.json create mode 100644 lexicons/com/atproto/sync/getBlob.json create mode 100644 lexicons/com/atproto/sync/getBlocks.json create mode 100644 lexicons/com/atproto/sync/getCheckout.json create mode 100644 lexicons/com/atproto/sync/getHead.json create mode 100644 lexicons/com/atproto/sync/getHostStatus.json create mode 100644 lexicons/com/atproto/sync/getLatestCommit.json create mode 100644 lexicons/com/atproto/sync/getRecord.json create mode 100644 lexicons/com/atproto/sync/getRepo.json create mode 100644 lexicons/com/atproto/sync/getRepoStatus.json create mode 100644 lexicons/com/atproto/sync/listBlobs.json create mode 100644 lexicons/com/atproto/sync/listHosts.json create mode 100644 lexicons/com/atproto/sync/listRepos.json create mode 100644 lexicons/com/atproto/sync/listReposByCollection.json create mode 100644 lexicons/com/atproto/sync/notifyOfUpdate.json create mode 100644 lexicons/com/atproto/sync/requestCrawl.json create mode 100644 lexicons/com/atproto/sync/subscribeRepos.json create mode 100644 lexicons/com/atproto/temp/addReservedHandle.json create mode 100644 lexicons/com/atproto/temp/checkSignupQueue.json create mode 100644 lexicons/com/atproto/temp/fetchLabels.json create mode 100644 lexicons/com/atproto/temp/requestPhoneVerification.json create mode 100644 lexicons/tools/ozone/communication/createTemplate.json create mode 100644 lexicons/tools/ozone/communication/defs.json create mode 100644 lexicons/tools/ozone/communication/deleteTemplate.json create mode 100644 lexicons/tools/ozone/communication/listTemplates.json create mode 100644 lexicons/tools/ozone/communication/updateTemplate.json create mode 100644 lexicons/tools/ozone/hosting/getAccountHistory.json create mode 100644 lexicons/tools/ozone/moderation/defs.json create mode 100644 lexicons/tools/ozone/moderation/emitEvent.json create mode 100644 lexicons/tools/ozone/moderation/getEvent.json create mode 100644 lexicons/tools/ozone/moderation/getRecord.json create mode 100644 lexicons/tools/ozone/moderation/getRecords.json create mode 100644 lexicons/tools/ozone/moderation/getRepo.json create mode 100644 lexicons/tools/ozone/moderation/getReporterStats.json create mode 100644 lexicons/tools/ozone/moderation/getRepos.json create mode 100644 lexicons/tools/ozone/moderation/getSubjects.json create mode 100644 lexicons/tools/ozone/moderation/queryEvents.json create mode 100644 lexicons/tools/ozone/moderation/queryStatuses.json create mode 100644 lexicons/tools/ozone/moderation/searchRepos.json create mode 100644 lexicons/tools/ozone/server/getConfig.json create mode 100644 lexicons/tools/ozone/set/addValues.json create mode 100644 lexicons/tools/ozone/set/defs.json create mode 100644 lexicons/tools/ozone/set/deleteSet.json create mode 100644 lexicons/tools/ozone/set/deleteValues.json create mode 100644 lexicons/tools/ozone/set/getValues.json create mode 100644 lexicons/tools/ozone/set/querySets.json create mode 100644 lexicons/tools/ozone/set/upsertSet.json create mode 100644 lexicons/tools/ozone/setting/defs.json create mode 100644 lexicons/tools/ozone/setting/listOptions.json create mode 100644 lexicons/tools/ozone/setting/removeOptions.json create mode 100644 lexicons/tools/ozone/setting/upsertOption.json create mode 100644 lexicons/tools/ozone/signature/defs.json create mode 100644 lexicons/tools/ozone/signature/findCorrelation.json create mode 100644 lexicons/tools/ozone/signature/findRelatedAccounts.json create mode 100644 lexicons/tools/ozone/signature/searchAccounts.json create mode 100644 lexicons/tools/ozone/team/addMember.json create mode 100644 lexicons/tools/ozone/team/defs.json create mode 100644 lexicons/tools/ozone/team/deleteMember.json create mode 100644 lexicons/tools/ozone/team/listMembers.json create mode 100644 lexicons/tools/ozone/team/updateMember.json create mode 100644 lexicons/tools/ozone/verification/defs.json create mode 100644 lexicons/tools/ozone/verification/grantVerifications.json create mode 100644 lexicons/tools/ozone/verification/listVerifications.json create mode 100644 lexicons/tools/ozone/verification/revokeVerifications.json diff --git a/lexicons/app/bsky/actor/defs.json b/lexicons/app/bsky/actor/defs.json new file mode 100644 index 0000000000..f61393cbee --- /dev/null +++ b/lexicons/app/bsky/actor/defs.json @@ -0,0 +1,577 @@ +{ + "lexicon": 1, + "id": "app.bsky.actor.defs", + "defs": { + "profileViewBasic": { + "type": "object", + "required": ["did", "handle"], + "properties": { + "did": { "type": "string", "format": "did" }, + "handle": { "type": "string", "format": "handle" }, + "displayName": { + "type": "string", + "maxGraphemes": 64, + "maxLength": 640 + }, + "avatar": { "type": "string", "format": "uri" }, + "associated": { + "type": "ref", + "ref": "#profileAssociated" + }, + "viewer": { "type": "ref", "ref": "#viewerState" }, + "labels": { + "type": "array", + "items": { "type": "ref", "ref": "com.atproto.label.defs#label" } + }, + "createdAt": { "type": "string", "format": "datetime" }, + "verification": { + "type": "ref", + "ref": "#verificationState" + } + } + }, + "profileView": { + "type": "object", + "required": ["did", "handle"], + "properties": { + "did": { "type": "string", "format": "did" }, + "handle": { "type": "string", "format": "handle" }, + "displayName": { + "type": "string", + "maxGraphemes": 64, + "maxLength": 640 + }, + "description": { + "type": "string", + "maxGraphemes": 256, + "maxLength": 2560 + }, + "avatar": { "type": "string", "format": "uri" }, + "associated": { + "type": "ref", + "ref": "#profileAssociated" + }, + "indexedAt": { "type": "string", "format": "datetime" }, + "createdAt": { "type": "string", "format": "datetime" }, + "viewer": { "type": "ref", "ref": "#viewerState" }, + "labels": { + "type": "array", + "items": { "type": "ref", "ref": "com.atproto.label.defs#label" } + }, + "verification": { + "type": "ref", + "ref": "#verificationState" + } + } + }, + "profileViewDetailed": { + "type": "object", + "required": ["did", "handle"], + "properties": { + "did": { "type": "string", "format": "did" }, + "handle": { "type": "string", "format": "handle" }, + "displayName": { + "type": "string", + "maxGraphemes": 64, + "maxLength": 640 + }, + "description": { + "type": "string", + "maxGraphemes": 256, + "maxLength": 2560 + }, + "avatar": { "type": "string", "format": "uri" }, + "banner": { "type": "string", "format": "uri" }, + "followersCount": { "type": "integer" }, + "followsCount": { "type": "integer" }, + "postsCount": { "type": "integer" }, + "associated": { + "type": "ref", + "ref": "#profileAssociated" + }, + "joinedViaStarterPack": { + "type": "ref", + "ref": "app.bsky.graph.defs#starterPackViewBasic" + }, + "indexedAt": { "type": "string", "format": "datetime" }, + "createdAt": { "type": "string", "format": "datetime" }, + "viewer": { "type": "ref", "ref": "#viewerState" }, + "labels": { + "type": "array", + "items": { "type": "ref", "ref": "com.atproto.label.defs#label" } + }, + "pinnedPost": { + "type": "ref", + "ref": "com.atproto.repo.strongRef" + }, + "verification": { + "type": "ref", + "ref": "#verificationState" + } + } + }, + "profileAssociated": { + "type": "object", + "properties": { + "lists": { "type": "integer" }, + "feedgens": { "type": "integer" }, + "starterPacks": { "type": "integer" }, + "labeler": { "type": "boolean" }, + "chat": { "type": "ref", "ref": "#profileAssociatedChat" } + } + }, + "profileAssociatedChat": { + "type": "object", + "required": ["allowIncoming"], + "properties": { + "allowIncoming": { + "type": "string", + "knownValues": ["all", "none", "following"] + } + } + }, + "viewerState": { + "type": "object", + "description": "Metadata about the requesting account's relationship with the subject account. Only has meaningful content for authed requests.", + "properties": { + "muted": { "type": "boolean" }, + "mutedByList": { + "type": "ref", + "ref": "app.bsky.graph.defs#listViewBasic" + }, + "blockedBy": { "type": "boolean" }, + "blocking": { "type": "string", "format": "at-uri" }, + "blockingByList": { + "type": "ref", + "ref": "app.bsky.graph.defs#listViewBasic" + }, + "following": { "type": "string", "format": "at-uri" }, + "followedBy": { "type": "string", "format": "at-uri" }, + "knownFollowers": { + "type": "ref", + "ref": "#knownFollowers" + } + } + }, + "knownFollowers": { + "type": "object", + "description": "The subject's followers whom you also follow", + "required": ["count", "followers"], + "properties": { + "count": { "type": "integer" }, + "followers": { + "type": "array", + "minLength": 0, + "maxLength": 5, + "items": { + "type": "ref", + "ref": "#profileViewBasic" + } + } + } + }, + "verificationState": { + "type": "object", + "description": "Represents the verification information about the user this object is attached to.", + "required": ["verifications", "verifiedStatus", "trustedVerifierStatus"], + "properties": { + "verifications": { + "type": "array", + "description": "All verifications issued by trusted verifiers on behalf of this user. Verifications by untrusted verifiers are not included.", + "items": { "type": "ref", "ref": "#verificationView" } + }, + "verifiedStatus": { + "type": "string", + "description": "The user's status as a verified account.", + "knownValues": ["valid", "invalid", "none"] + }, + "trustedVerifierStatus": { + "type": "string", + "description": "The user's status as a trusted verifier.", + "knownValues": ["valid", "invalid", "none"] + } + } + }, + "verificationView": { + "type": "object", + "description": "An individual verification for an associated subject.", + "required": ["issuer", "uri", "isValid", "createdAt"], + "properties": { + "issuer": { + "type": "string", + "description": "The user who issued this verification.", + "format": "did" + }, + "uri": { + "type": "string", + "description": "The AT-URI of the verification record.", + "format": "at-uri" + }, + "isValid": { + "type": "boolean", + "description": "True if the verification passes validation, otherwise false." + }, + "createdAt": { + "type": "string", + "description": "Timestamp when the verification was created.", + "format": "datetime" + } + } + }, + "preferences": { + "type": "array", + "items": { + "type": "union", + "refs": [ + "#adultContentPref", + "#contentLabelPref", + "#savedFeedsPref", + "#savedFeedsPrefV2", + "#personalDetailsPref", + "#feedViewPref", + "#threadViewPref", + "#interestsPref", + "#mutedWordsPref", + "#hiddenPostsPref", + "#bskyAppStatePref", + "#labelersPref", + "#postInteractionSettingsPref", + "#verificationPrefs" + ] + } + }, + "adultContentPref": { + "type": "object", + "required": ["enabled"], + "properties": { + "enabled": { "type": "boolean", "default": false } + } + }, + "contentLabelPref": { + "type": "object", + "required": ["label", "visibility"], + "properties": { + "labelerDid": { + "type": "string", + "description": "Which labeler does this preference apply to? If undefined, applies globally.", + "format": "did" + }, + "label": { "type": "string" }, + "visibility": { + "type": "string", + "knownValues": ["ignore", "show", "warn", "hide"] + } + } + }, + "savedFeed": { + "type": "object", + "required": ["id", "type", "value", "pinned"], + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "knownValues": ["feed", "list", "timeline"] + }, + "value": { + "type": "string" + }, + "pinned": { + "type": "boolean" + } + } + }, + "savedFeedsPrefV2": { + "type": "object", + "required": ["items"], + "properties": { + "items": { + "type": "array", + "items": { + "type": "ref", + "ref": "app.bsky.actor.defs#savedFeed" + } + } + } + }, + "savedFeedsPref": { + "type": "object", + "required": ["pinned", "saved"], + "properties": { + "pinned": { + "type": "array", + "items": { + "type": "string", + "format": "at-uri" + } + }, + "saved": { + "type": "array", + "items": { + "type": "string", + "format": "at-uri" + } + }, + "timelineIndex": { + "type": "integer" + } + } + }, + "personalDetailsPref": { + "type": "object", + "properties": { + "birthDate": { + "type": "string", + "format": "datetime", + "description": "The birth date of account owner." + } + } + }, + "feedViewPref": { + "type": "object", + "required": ["feed"], + "properties": { + "feed": { + "type": "string", + "description": "The URI of the feed, or an identifier which describes the feed." + }, + "hideReplies": { + "type": "boolean", + "description": "Hide replies in the feed." + }, + "hideRepliesByUnfollowed": { + "type": "boolean", + "description": "Hide replies in the feed if they are not by followed users.", + "default": true + }, + "hideRepliesByLikeCount": { + "type": "integer", + "description": "Hide replies in the feed if they do not have this number of likes." + }, + "hideReposts": { + "type": "boolean", + "description": "Hide reposts in the feed." + }, + "hideQuotePosts": { + "type": "boolean", + "description": "Hide quote posts in the feed." + } + } + }, + "threadViewPref": { + "type": "object", + "properties": { + "sort": { + "type": "string", + "description": "Sorting mode for threads.", + "knownValues": ["oldest", "newest", "most-likes", "random", "hotness"] + }, + "prioritizeFollowedUsers": { + "type": "boolean", + "description": "Show followed users at the top of all replies." + } + } + }, + "interestsPref": { + "type": "object", + "required": ["tags"], + "properties": { + "tags": { + "type": "array", + "maxLength": 100, + "items": { "type": "string", "maxLength": 640, "maxGraphemes": 64 }, + "description": "A list of tags which describe the account owner's interests gathered during onboarding." + } + } + }, + "mutedWordTarget": { + "type": "string", + "knownValues": ["content", "tag"], + "maxLength": 640, + "maxGraphemes": 64 + }, + "mutedWord": { + "type": "object", + "description": "A word that the account owner has muted.", + "required": ["value", "targets"], + "properties": { + "id": { "type": "string" }, + "value": { + "type": "string", + "description": "The muted word itself.", + "maxLength": 10000, + "maxGraphemes": 1000 + }, + "targets": { + "type": "array", + "description": "The intended targets of the muted word.", + "items": { + "type": "ref", + "ref": "app.bsky.actor.defs#mutedWordTarget" + } + }, + "actorTarget": { + "type": "string", + "description": "Groups of users to apply the muted word to. If undefined, applies to all users.", + "knownValues": ["all", "exclude-following"], + "default": "all" + }, + "expiresAt": { + "type": "string", + "format": "datetime", + "description": "The date and time at which the muted word will expire and no longer be applied." + } + } + }, + "mutedWordsPref": { + "type": "object", + "required": ["items"], + "properties": { + "items": { + "type": "array", + "items": { + "type": "ref", + "ref": "app.bsky.actor.defs#mutedWord" + }, + "description": "A list of words the account owner has muted." + } + } + }, + "hiddenPostsPref": { + "type": "object", + "required": ["items"], + "properties": { + "items": { + "type": "array", + "items": { "type": "string", "format": "at-uri" }, + "description": "A list of URIs of posts the account owner has hidden." + } + } + }, + "labelersPref": { + "type": "object", + "required": ["labelers"], + "properties": { + "labelers": { + "type": "array", + "items": { + "type": "ref", + "ref": "#labelerPrefItem" + } + } + } + }, + "labelerPrefItem": { + "type": "object", + "required": ["did"], + "properties": { + "did": { + "type": "string", + "format": "did" + } + } + }, + "bskyAppStatePref": { + "description": "A grab bag of state that's specific to the bsky.app program. Third-party apps shouldn't use this.", + "type": "object", + "properties": { + "activeProgressGuide": { + "type": "ref", + "ref": "#bskyAppProgressGuide" + }, + "queuedNudges": { + "description": "An array of tokens which identify nudges (modals, popups, tours, highlight dots) that should be shown to the user.", + "type": "array", + "maxLength": 1000, + "items": { "type": "string", "maxLength": 100 } + }, + "nuxs": { + "description": "Storage for NUXs the user has encountered.", + "type": "array", + "maxLength": 100, + "items": { + "type": "ref", + "ref": "app.bsky.actor.defs#nux" + } + } + } + }, + "bskyAppProgressGuide": { + "description": "If set, an active progress guide. Once completed, can be set to undefined. Should have unspecced fields tracking progress.", + "type": "object", + "required": ["guide"], + "properties": { + "guide": { "type": "string", "maxLength": 100 } + } + }, + "nux": { + "type": "object", + "description": "A new user experiences (NUX) storage object", + "required": ["id", "completed"], + "properties": { + "id": { + "type": "string", + "maxLength": 100 + }, + "completed": { + "type": "boolean", + "default": false + }, + "data": { + "description": "Arbitrary data for the NUX. The structure is defined by the NUX itself. Limited to 300 characters.", + "type": "string", + "maxLength": 3000, + "maxGraphemes": 300 + }, + "expiresAt": { + "type": "string", + "format": "datetime", + "description": "The date and time at which the NUX will expire and should be considered completed." + } + } + }, + "verificationPrefs": { + "type": "object", + "description": "Preferences for how verified accounts appear in the app.", + "required": [], + "properties": { + "hideBadges": { + "description": "Hide the blue check badges for verified accounts and trusted verifiers.", + "type": "boolean", + "default": false + } + } + }, + "postInteractionSettingsPref": { + "type": "object", + "description": "Default post interaction settings for the account. These values should be applied as default values when creating new posts. These refs should mirror the threadgate and postgate records exactly.", + "required": [], + "properties": { + "threadgateAllowRules": { + "description": "Matches threadgate record. List of rules defining who can reply to this users posts. If value is an empty array, no one can reply. If value is undefined, anyone can reply.", + "type": "array", + "maxLength": 5, + "items": { + "type": "union", + "refs": [ + "app.bsky.feed.threadgate#mentionRule", + "app.bsky.feed.threadgate#followerRule", + "app.bsky.feed.threadgate#followingRule", + "app.bsky.feed.threadgate#listRule" + ] + } + }, + "postgateEmbeddingRules": { + "description": "Matches postgate record. List of rules defining who can embed this users posts. If value is an empty array or is undefined, no particular rules apply and anyone can embed.", + "type": "array", + "maxLength": 5, + "items": { + "type": "union", + "refs": ["app.bsky.feed.postgate#disableRule"] + } + } + } + } + } +} diff --git a/lexicons/app/bsky/actor/getPreferences.json b/lexicons/app/bsky/actor/getPreferences.json new file mode 100644 index 0000000000..e6356a86f4 --- /dev/null +++ b/lexicons/app/bsky/actor/getPreferences.json @@ -0,0 +1,27 @@ +{ + "lexicon": 1, + "id": "app.bsky.actor.getPreferences", + "defs": { + "main": { + "type": "query", + "description": "Get private preferences attached to the current account. Expected use is synchronization between multiple devices, and import/export during account migration. Requires auth.", + "parameters": { + "type": "params", + "properties": {} + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["preferences"], + "properties": { + "preferences": { + "type": "ref", + "ref": "app.bsky.actor.defs#preferences" + } + } + } + } + } + } +} diff --git a/lexicons/app/bsky/actor/getProfile.json b/lexicons/app/bsky/actor/getProfile.json new file mode 100644 index 0000000000..15b0fcc2ec --- /dev/null +++ b/lexicons/app/bsky/actor/getProfile.json @@ -0,0 +1,28 @@ +{ + "lexicon": 1, + "id": "app.bsky.actor.getProfile", + "defs": { + "main": { + "type": "query", + "description": "Get detailed profile view of an actor. Does not require auth, but contains relevant metadata with auth.", + "parameters": { + "type": "params", + "required": ["actor"], + "properties": { + "actor": { + "type": "string", + "format": "at-identifier", + "description": "Handle or DID of account to fetch profile of." + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "ref", + "ref": "app.bsky.actor.defs#profileViewDetailed" + } + } + } + } +} diff --git a/lexicons/app/bsky/actor/getProfiles.json b/lexicons/app/bsky/actor/getProfiles.json new file mode 100644 index 0000000000..c89622cb18 --- /dev/null +++ b/lexicons/app/bsky/actor/getProfiles.json @@ -0,0 +1,37 @@ +{ + "lexicon": 1, + "id": "app.bsky.actor.getProfiles", + "defs": { + "main": { + "type": "query", + "description": "Get detailed profile views of multiple actors.", + "parameters": { + "type": "params", + "required": ["actors"], + "properties": { + "actors": { + "type": "array", + "items": { "type": "string", "format": "at-identifier" }, + "maxLength": 25 + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["profiles"], + "properties": { + "profiles": { + "type": "array", + "items": { + "type": "ref", + "ref": "app.bsky.actor.defs#profileViewDetailed" + } + } + } + } + } + } + } +} diff --git a/lexicons/app/bsky/actor/getSuggestions.json b/lexicons/app/bsky/actor/getSuggestions.json new file mode 100644 index 0000000000..31e526520d --- /dev/null +++ b/lexicons/app/bsky/actor/getSuggestions.json @@ -0,0 +1,43 @@ +{ + "lexicon": 1, + "id": "app.bsky.actor.getSuggestions", + "defs": { + "main": { + "type": "query", + "description": "Get a list of suggested actors. Expected use is discovery of accounts to follow during new account onboarding.", + "parameters": { + "type": "params", + "properties": { + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50 + }, + "cursor": { "type": "string" } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["actors"], + "properties": { + "cursor": { "type": "string" }, + "actors": { + "type": "array", + "items": { + "type": "ref", + "ref": "app.bsky.actor.defs#profileView" + } + }, + "recId": { + "type": "integer", + "description": "Snowflake for this recommendation, use when submitting recommendation events." + } + } + } + } + } + } +} diff --git a/lexicons/app/bsky/actor/profile.json b/lexicons/app/bsky/actor/profile.json new file mode 100644 index 0000000000..911d7a0569 --- /dev/null +++ b/lexicons/app/bsky/actor/profile.json @@ -0,0 +1,53 @@ +{ + "lexicon": 1, + "id": "app.bsky.actor.profile", + "defs": { + "main": { + "type": "record", + "description": "A declaration of a Bluesky account profile.", + "key": "literal:self", + "record": { + "type": "object", + "properties": { + "displayName": { + "type": "string", + "maxGraphemes": 64, + "maxLength": 640 + }, + "description": { + "type": "string", + "description": "Free-form profile description text.", + "maxGraphemes": 256, + "maxLength": 2560 + }, + "avatar": { + "type": "blob", + "description": "Small image to be displayed next to posts from account. AKA, 'profile picture'", + "accept": ["image/png", "image/jpeg"], + "maxSize": 1000000 + }, + "banner": { + "type": "blob", + "description": "Larger horizontal image to display behind profile view.", + "accept": ["image/png", "image/jpeg"], + "maxSize": 1000000 + }, + "labels": { + "type": "union", + "description": "Self-label values, specific to the Bluesky application, on the overall account.", + "refs": ["com.atproto.label.defs#selfLabels"] + }, + "joinedViaStarterPack": { + "type": "ref", + "ref": "com.atproto.repo.strongRef" + }, + "pinnedPost": { + "type": "ref", + "ref": "com.atproto.repo.strongRef" + }, + "createdAt": { "type": "string", "format": "datetime" } + } + } + } + } +} diff --git a/lexicons/app/bsky/actor/putPreferences.json b/lexicons/app/bsky/actor/putPreferences.json new file mode 100644 index 0000000000..425ea28c48 --- /dev/null +++ b/lexicons/app/bsky/actor/putPreferences.json @@ -0,0 +1,23 @@ +{ + "lexicon": 1, + "id": "app.bsky.actor.putPreferences", + "defs": { + "main": { + "type": "procedure", + "description": "Set the private preferences attached to the account.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["preferences"], + "properties": { + "preferences": { + "type": "ref", + "ref": "app.bsky.actor.defs#preferences" + } + } + } + } + } + } +} diff --git a/lexicons/app/bsky/actor/searchActors.json b/lexicons/app/bsky/actor/searchActors.json new file mode 100644 index 0000000000..15ccb08223 --- /dev/null +++ b/lexicons/app/bsky/actor/searchActors.json @@ -0,0 +1,47 @@ +{ + "lexicon": 1, + "id": "app.bsky.actor.searchActors", + "defs": { + "main": { + "type": "query", + "description": "Find actors (profiles) matching search criteria. Does not require auth.", + "parameters": { + "type": "params", + "properties": { + "term": { + "type": "string", + "description": "DEPRECATED: use 'q' instead." + }, + "q": { + "type": "string", + "description": "Search query string. Syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended." + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 25 + }, + "cursor": { "type": "string" } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["actors"], + "properties": { + "cursor": { "type": "string" }, + "actors": { + "type": "array", + "items": { + "type": "ref", + "ref": "app.bsky.actor.defs#profileView" + } + } + } + } + } + } + } +} diff --git a/lexicons/app/bsky/actor/searchActorsTypeahead.json b/lexicons/app/bsky/actor/searchActorsTypeahead.json new file mode 100644 index 0000000000..4e3cb1b4e8 --- /dev/null +++ b/lexicons/app/bsky/actor/searchActorsTypeahead.json @@ -0,0 +1,45 @@ +{ + "lexicon": 1, + "id": "app.bsky.actor.searchActorsTypeahead", + "defs": { + "main": { + "type": "query", + "description": "Find actor suggestions for a prefix search term. Expected use is for auto-completion during text field entry. Does not require auth.", + "parameters": { + "type": "params", + "properties": { + "term": { + "type": "string", + "description": "DEPRECATED: use 'q' instead." + }, + "q": { + "type": "string", + "description": "Search query prefix; not a full query string." + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 10 + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["actors"], + "properties": { + "actors": { + "type": "array", + "items": { + "type": "ref", + "ref": "app.bsky.actor.defs#profileViewBasic" + } + } + } + } + } + } + } +} diff --git a/lexicons/app/bsky/embed/defs.json b/lexicons/app/bsky/embed/defs.json new file mode 100644 index 0000000000..57ffc03a67 --- /dev/null +++ b/lexicons/app/bsky/embed/defs.json @@ -0,0 +1,15 @@ +{ + "lexicon": 1, + "id": "app.bsky.embed.defs", + "defs": { + "aspectRatio": { + "type": "object", + "description": "width:height represents an aspect ratio. It may be approximate, and may not correspond to absolute dimensions in any given unit.", + "required": ["width", "height"], + "properties": { + "width": { "type": "integer", "minimum": 1 }, + "height": { "type": "integer", "minimum": 1 } + } + } + } +} diff --git a/lexicons/app/bsky/embed/external.json b/lexicons/app/bsky/embed/external.json new file mode 100644 index 0000000000..b9930dff2b --- /dev/null +++ b/lexicons/app/bsky/embed/external.json @@ -0,0 +1,51 @@ +{ + "lexicon": 1, + "id": "app.bsky.embed.external", + "defs": { + "main": { + "type": "object", + "description": "A representation of some externally linked content (eg, a URL and 'card'), embedded in a Bluesky record (eg, a post).", + "required": ["external"], + "properties": { + "external": { + "type": "ref", + "ref": "#external" + } + } + }, + "external": { + "type": "object", + "required": ["uri", "title", "description"], + "properties": { + "uri": { "type": "string", "format": "uri" }, + "title": { "type": "string" }, + "description": { "type": "string" }, + "thumb": { + "type": "blob", + "accept": ["image/*"], + "maxSize": 1000000 + } + } + }, + "view": { + "type": "object", + "required": ["external"], + "properties": { + "external": { + "type": "ref", + "ref": "#viewExternal" + } + } + }, + "viewExternal": { + "type": "object", + "required": ["uri", "title", "description"], + "properties": { + "uri": { "type": "string", "format": "uri" }, + "title": { "type": "string" }, + "description": { "type": "string" }, + "thumb": { "type": "string", "format": "uri" } + } + } + } +} diff --git a/lexicons/app/bsky/embed/images.json b/lexicons/app/bsky/embed/images.json new file mode 100644 index 0000000000..c6b6fa20b5 --- /dev/null +++ b/lexicons/app/bsky/embed/images.json @@ -0,0 +1,72 @@ +{ + "lexicon": 1, + "id": "app.bsky.embed.images", + "description": "A set of images embedded in a Bluesky record (eg, a post).", + "defs": { + "main": { + "type": "object", + "required": ["images"], + "properties": { + "images": { + "type": "array", + "items": { "type": "ref", "ref": "#image" }, + "maxLength": 4 + } + } + }, + "image": { + "type": "object", + "required": ["image", "alt"], + "properties": { + "image": { + "type": "blob", + "accept": ["image/*"], + "maxSize": 1000000 + }, + "alt": { + "type": "string", + "description": "Alt text description of the image, for accessibility." + }, + "aspectRatio": { + "type": "ref", + "ref": "app.bsky.embed.defs#aspectRatio" + } + } + }, + "view": { + "type": "object", + "required": ["images"], + "properties": { + "images": { + "type": "array", + "items": { "type": "ref", "ref": "#viewImage" }, + "maxLength": 4 + } + } + }, + "viewImage": { + "type": "object", + "required": ["thumb", "fullsize", "alt"], + "properties": { + "thumb": { + "type": "string", + "format": "uri", + "description": "Fully-qualified URL where a thumbnail of the image can be fetched. For example, CDN location provided by the App View." + }, + "fullsize": { + "type": "string", + "format": "uri", + "description": "Fully-qualified URL where a large version of the image can be fetched. May or may not be the exact original blob. For example, CDN location provided by the App View." + }, + "alt": { + "type": "string", + "description": "Alt text description of the image, for accessibility." + }, + "aspectRatio": { + "type": "ref", + "ref": "app.bsky.embed.defs#aspectRatio" + } + } + } + } +} diff --git a/lexicons/app/bsky/embed/record.json b/lexicons/app/bsky/embed/record.json new file mode 100644 index 0000000000..a73200a329 --- /dev/null +++ b/lexicons/app/bsky/embed/record.json @@ -0,0 +1,96 @@ +{ + "lexicon": 1, + "id": "app.bsky.embed.record", + "description": "A representation of a record embedded in a Bluesky record (eg, a post). For example, a quote-post, or sharing a feed generator record.", + "defs": { + "main": { + "type": "object", + "required": ["record"], + "properties": { + "record": { "type": "ref", "ref": "com.atproto.repo.strongRef" } + } + }, + "view": { + "type": "object", + "required": ["record"], + "properties": { + "record": { + "type": "union", + "refs": [ + "#viewRecord", + "#viewNotFound", + "#viewBlocked", + "#viewDetached", + "app.bsky.feed.defs#generatorView", + "app.bsky.graph.defs#listView", + "app.bsky.labeler.defs#labelerView", + "app.bsky.graph.defs#starterPackViewBasic" + ] + } + } + }, + "viewRecord": { + "type": "object", + "required": ["uri", "cid", "author", "value", "indexedAt"], + "properties": { + "uri": { "type": "string", "format": "at-uri" }, + "cid": { "type": "string", "format": "cid" }, + "author": { + "type": "ref", + "ref": "app.bsky.actor.defs#profileViewBasic" + }, + "value": { + "type": "unknown", + "description": "The record data itself." + }, + "labels": { + "type": "array", + "items": { "type": "ref", "ref": "com.atproto.label.defs#label" } + }, + "replyCount": { "type": "integer" }, + "repostCount": { "type": "integer" }, + "likeCount": { "type": "integer" }, + "quoteCount": { "type": "integer" }, + "embeds": { + "type": "array", + "items": { + "type": "union", + "refs": [ + "app.bsky.embed.images#view", + "app.bsky.embed.video#view", + "app.bsky.embed.external#view", + "app.bsky.embed.record#view", + "app.bsky.embed.recordWithMedia#view" + ] + } + }, + "indexedAt": { "type": "string", "format": "datetime" } + } + }, + "viewNotFound": { + "type": "object", + "required": ["uri", "notFound"], + "properties": { + "uri": { "type": "string", "format": "at-uri" }, + "notFound": { "type": "boolean", "const": true } + } + }, + "viewBlocked": { + "type": "object", + "required": ["uri", "blocked", "author"], + "properties": { + "uri": { "type": "string", "format": "at-uri" }, + "blocked": { "type": "boolean", "const": true }, + "author": { "type": "ref", "ref": "app.bsky.feed.defs#blockedAuthor" } + } + }, + "viewDetached": { + "type": "object", + "required": ["uri", "detached"], + "properties": { + "uri": { "type": "string", "format": "at-uri" }, + "detached": { "type": "boolean", "const": true } + } + } + } +} diff --git a/lexicons/app/bsky/embed/recordWithMedia.json b/lexicons/app/bsky/embed/recordWithMedia.json new file mode 100644 index 0000000000..5baf68502e --- /dev/null +++ b/lexicons/app/bsky/embed/recordWithMedia.json @@ -0,0 +1,43 @@ +{ + "lexicon": 1, + "id": "app.bsky.embed.recordWithMedia", + "description": "A representation of a record embedded in a Bluesky record (eg, a post), alongside other compatible embeds. For example, a quote post and image, or a quote post and external URL card.", + "defs": { + "main": { + "type": "object", + "required": ["record", "media"], + "properties": { + "record": { + "type": "ref", + "ref": "app.bsky.embed.record" + }, + "media": { + "type": "union", + "refs": [ + "app.bsky.embed.images", + "app.bsky.embed.video", + "app.bsky.embed.external" + ] + } + } + }, + "view": { + "type": "object", + "required": ["record", "media"], + "properties": { + "record": { + "type": "ref", + "ref": "app.bsky.embed.record#view" + }, + "media": { + "type": "union", + "refs": [ + "app.bsky.embed.images#view", + "app.bsky.embed.video#view", + "app.bsky.embed.external#view" + ] + } + } + } + } +} diff --git a/lexicons/app/bsky/embed/video.json b/lexicons/app/bsky/embed/video.json new file mode 100644 index 0000000000..92511af163 --- /dev/null +++ b/lexicons/app/bsky/embed/video.json @@ -0,0 +1,67 @@ +{ + "lexicon": 1, + "id": "app.bsky.embed.video", + "description": "A video embedded in a Bluesky record (eg, a post).", + "defs": { + "main": { + "type": "object", + "required": ["video"], + "properties": { + "video": { + "type": "blob", + "description": "The mp4 video file. May be up to 100mb, formerly limited to 50mb.", + "accept": ["video/mp4"], + "maxSize": 100000000 + }, + "captions": { + "type": "array", + "items": { "type": "ref", "ref": "#caption" }, + "maxLength": 20 + }, + "alt": { + "type": "string", + "description": "Alt text description of the video, for accessibility.", + "maxGraphemes": 1000, + "maxLength": 10000 + }, + "aspectRatio": { + "type": "ref", + "ref": "app.bsky.embed.defs#aspectRatio" + } + } + }, + "caption": { + "type": "object", + "required": ["lang", "file"], + "properties": { + "lang": { + "type": "string", + "format": "language" + }, + "file": { + "type": "blob", + "accept": ["text/vtt"], + "maxSize": 20000 + } + } + }, + "view": { + "type": "object", + "required": ["cid", "playlist"], + "properties": { + "cid": { "type": "string", "format": "cid" }, + "playlist": { "type": "string", "format": "uri" }, + "thumbnail": { "type": "string", "format": "uri" }, + "alt": { + "type": "string", + "maxGraphemes": 1000, + "maxLength": 10000 + }, + "aspectRatio": { + "type": "ref", + "ref": "app.bsky.embed.defs#aspectRatio" + } + } + } + } +} diff --git a/lexicons/app/bsky/feed/defs.json b/lexicons/app/bsky/feed/defs.json new file mode 100644 index 0000000000..4f92c40192 --- /dev/null +++ b/lexicons/app/bsky/feed/defs.json @@ -0,0 +1,313 @@ +{ + "lexicon": 1, + "id": "app.bsky.feed.defs", + "defs": { + "postView": { + "type": "object", + "required": ["uri", "cid", "author", "record", "indexedAt"], + "properties": { + "uri": { "type": "string", "format": "at-uri" }, + "cid": { "type": "string", "format": "cid" }, + "author": { + "type": "ref", + "ref": "app.bsky.actor.defs#profileViewBasic" + }, + "record": { "type": "unknown" }, + "embed": { + "type": "union", + "refs": [ + "app.bsky.embed.images#view", + "app.bsky.embed.video#view", + "app.bsky.embed.external#view", + "app.bsky.embed.record#view", + "app.bsky.embed.recordWithMedia#view" + ] + }, + "replyCount": { "type": "integer" }, + "repostCount": { "type": "integer" }, + "likeCount": { "type": "integer" }, + "quoteCount": { "type": "integer" }, + "indexedAt": { "type": "string", "format": "datetime" }, + "viewer": { "type": "ref", "ref": "#viewerState" }, + "labels": { + "type": "array", + "items": { "type": "ref", "ref": "com.atproto.label.defs#label" } + }, + "threadgate": { "type": "ref", "ref": "#threadgateView" } + } + }, + "viewerState": { + "type": "object", + "description": "Metadata about the requesting account's relationship with the subject content. Only has meaningful content for authed requests.", + "properties": { + "repost": { "type": "string", "format": "at-uri" }, + "like": { "type": "string", "format": "at-uri" }, + "threadMuted": { "type": "boolean" }, + "replyDisabled": { "type": "boolean" }, + "embeddingDisabled": { "type": "boolean" }, + "pinned": { "type": "boolean" } + } + }, + "threadContext": { + "type": "object", + "description": "Metadata about this post within the context of the thread it is in.", + "properties": { + "rootAuthorLike": { "type": "string", "format": "at-uri" } + } + }, + "feedViewPost": { + "type": "object", + "required": ["post"], + "properties": { + "post": { "type": "ref", "ref": "#postView" }, + "reply": { "type": "ref", "ref": "#replyRef" }, + "reason": { "type": "union", "refs": ["#reasonRepost", "#reasonPin"] }, + "feedContext": { + "type": "string", + "description": "Context provided by feed generator that may be passed back alongside interactions.", + "maxLength": 2000 + } + } + }, + "replyRef": { + "type": "object", + "required": ["root", "parent"], + "properties": { + "root": { + "type": "union", + "refs": ["#postView", "#notFoundPost", "#blockedPost"] + }, + "parent": { + "type": "union", + "refs": ["#postView", "#notFoundPost", "#blockedPost"] + }, + "grandparentAuthor": { + "type": "ref", + "ref": "app.bsky.actor.defs#profileViewBasic", + "description": "When parent is a reply to another post, this is the author of that post." + } + } + }, + "reasonRepost": { + "type": "object", + "required": ["by", "indexedAt"], + "properties": { + "by": { "type": "ref", "ref": "app.bsky.actor.defs#profileViewBasic" }, + "indexedAt": { "type": "string", "format": "datetime" } + } + }, + "reasonPin": { + "type": "object", + "properties": {} + }, + "threadViewPost": { + "type": "object", + "required": ["post"], + "properties": { + "post": { "type": "ref", "ref": "#postView" }, + "parent": { + "type": "union", + "refs": ["#threadViewPost", "#notFoundPost", "#blockedPost"] + }, + "replies": { + "type": "array", + "items": { + "type": "union", + "refs": ["#threadViewPost", "#notFoundPost", "#blockedPost"] + } + }, + "threadContext": { "type": "ref", "ref": "#threadContext" } + } + }, + "notFoundPost": { + "type": "object", + "required": ["uri", "notFound"], + "properties": { + "uri": { "type": "string", "format": "at-uri" }, + "notFound": { "type": "boolean", "const": true } + } + }, + "blockedPost": { + "type": "object", + "required": ["uri", "blocked", "author"], + "properties": { + "uri": { "type": "string", "format": "at-uri" }, + "blocked": { "type": "boolean", "const": true }, + "author": { "type": "ref", "ref": "#blockedAuthor" } + } + }, + "blockedAuthor": { + "type": "object", + "required": ["did"], + "properties": { + "did": { "type": "string", "format": "did" }, + "viewer": { "type": "ref", "ref": "app.bsky.actor.defs#viewerState" } + } + }, + "generatorView": { + "type": "object", + "required": ["uri", "cid", "did", "creator", "displayName", "indexedAt"], + "properties": { + "uri": { "type": "string", "format": "at-uri" }, + "cid": { "type": "string", "format": "cid" }, + "did": { "type": "string", "format": "did" }, + "creator": { "type": "ref", "ref": "app.bsky.actor.defs#profileView" }, + "displayName": { "type": "string" }, + "description": { + "type": "string", + "maxGraphemes": 300, + "maxLength": 3000 + }, + "descriptionFacets": { + "type": "array", + "items": { "type": "ref", "ref": "app.bsky.richtext.facet" } + }, + "avatar": { "type": "string", "format": "uri" }, + "likeCount": { "type": "integer", "minimum": 0 }, + "acceptsInteractions": { "type": "boolean" }, + "labels": { + "type": "array", + "items": { "type": "ref", "ref": "com.atproto.label.defs#label" } + }, + "viewer": { "type": "ref", "ref": "#generatorViewerState" }, + "contentMode": { + "type": "string", + "knownValues": [ + "app.bsky.feed.defs#contentModeUnspecified", + "app.bsky.feed.defs#contentModeVideo" + ] + }, + "indexedAt": { "type": "string", "format": "datetime" } + } + }, + "generatorViewerState": { + "type": "object", + "properties": { + "like": { "type": "string", "format": "at-uri" } + } + }, + "skeletonFeedPost": { + "type": "object", + "required": ["post"], + "properties": { + "post": { "type": "string", "format": "at-uri" }, + "reason": { + "type": "union", + "refs": ["#skeletonReasonRepost", "#skeletonReasonPin"] + }, + "feedContext": { + "type": "string", + "description": "Context that will be passed through to client and may be passed to feed generator back alongside interactions.", + "maxLength": 2000 + } + } + }, + "skeletonReasonRepost": { + "type": "object", + "required": ["repost"], + "properties": { + "repost": { "type": "string", "format": "at-uri" } + } + }, + "skeletonReasonPin": { + "type": "object", + "properties": {} + }, + "threadgateView": { + "type": "object", + "properties": { + "uri": { "type": "string", "format": "at-uri" }, + "cid": { "type": "string", "format": "cid" }, + "record": { "type": "unknown" }, + "lists": { + "type": "array", + "items": { "type": "ref", "ref": "app.bsky.graph.defs#listViewBasic" } + } + } + }, + "interaction": { + "type": "object", + "properties": { + "item": { "type": "string", "format": "at-uri" }, + "event": { + "type": "string", + "knownValues": [ + "app.bsky.feed.defs#requestLess", + "app.bsky.feed.defs#requestMore", + "app.bsky.feed.defs#clickthroughItem", + "app.bsky.feed.defs#clickthroughAuthor", + "app.bsky.feed.defs#clickthroughReposter", + "app.bsky.feed.defs#clickthroughEmbed", + "app.bsky.feed.defs#interactionSeen", + "app.bsky.feed.defs#interactionLike", + "app.bsky.feed.defs#interactionRepost", + "app.bsky.feed.defs#interactionReply", + "app.bsky.feed.defs#interactionQuote", + "app.bsky.feed.defs#interactionShare" + ] + }, + "feedContext": { + "type": "string", + "description": "Context on a feed item that was originally supplied by the feed generator on getFeedSkeleton.", + "maxLength": 2000 + } + } + }, + "requestLess": { + "type": "token", + "description": "Request that less content like the given feed item be shown in the feed" + }, + "requestMore": { + "type": "token", + "description": "Request that more content like the given feed item be shown in the feed" + }, + "clickthroughItem": { + "type": "token", + "description": "User clicked through to the feed item" + }, + "clickthroughAuthor": { + "type": "token", + "description": "User clicked through to the author of the feed item" + }, + "clickthroughReposter": { + "type": "token", + "description": "User clicked through to the reposter of the feed item" + }, + "clickthroughEmbed": { + "type": "token", + "description": "User clicked through to the embedded content of the feed item" + }, + "contentModeUnspecified": { + "type": "token", + "description": "Declares the feed generator returns any types of posts." + }, + "contentModeVideo": { + "type": "token", + "description": "Declares the feed generator returns posts containing app.bsky.embed.video embeds." + }, + "interactionSeen": { + "type": "token", + "description": "Feed item was seen by user" + }, + "interactionLike": { + "type": "token", + "description": "User liked the feed item" + }, + "interactionRepost": { + "type": "token", + "description": "User reposted the feed item" + }, + "interactionReply": { + "type": "token", + "description": "User replied to the feed item" + }, + "interactionQuote": { + "type": "token", + "description": "User quoted the feed item" + }, + "interactionShare": { + "type": "token", + "description": "User shared the feed item" + } + } +} diff --git a/lexicons/app/bsky/feed/describeFeedGenerator.json b/lexicons/app/bsky/feed/describeFeedGenerator.json new file mode 100644 index 0000000000..0c7b8c8638 --- /dev/null +++ b/lexicons/app/bsky/feed/describeFeedGenerator.json @@ -0,0 +1,39 @@ +{ + "lexicon": 1, + "id": "app.bsky.feed.describeFeedGenerator", + "defs": { + "main": { + "type": "query", + "description": "Get information about a feed generator, including policies and offered feed URIs. Does not require auth; implemented by Feed Generator services (not App View).", + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["did", "feeds"], + "properties": { + "did": { "type": "string", "format": "did" }, + "feeds": { + "type": "array", + "items": { "type": "ref", "ref": "#feed" } + }, + "links": { "type": "ref", "ref": "#links" } + } + } + } + }, + "feed": { + "type": "object", + "required": ["uri"], + "properties": { + "uri": { "type": "string", "format": "at-uri" } + } + }, + "links": { + "type": "object", + "properties": { + "privacyPolicy": { "type": "string" }, + "termsOfService": { "type": "string" } + } + } + } +} diff --git a/lexicons/app/bsky/feed/generator.json b/lexicons/app/bsky/feed/generator.json new file mode 100644 index 0000000000..fec0c0fafe --- /dev/null +++ b/lexicons/app/bsky/feed/generator.json @@ -0,0 +1,54 @@ +{ + "lexicon": 1, + "id": "app.bsky.feed.generator", + "defs": { + "main": { + "type": "record", + "description": "Record declaring of the existence of a feed generator, and containing metadata about it. The record can exist in any repository.", + "key": "any", + "record": { + "type": "object", + "required": ["did", "displayName", "createdAt"], + "properties": { + "did": { "type": "string", "format": "did" }, + "displayName": { + "type": "string", + "maxGraphemes": 24, + "maxLength": 240 + }, + "description": { + "type": "string", + "maxGraphemes": 300, + "maxLength": 3000 + }, + "descriptionFacets": { + "type": "array", + "items": { "type": "ref", "ref": "app.bsky.richtext.facet" } + }, + "avatar": { + "type": "blob", + "accept": ["image/png", "image/jpeg"], + "maxSize": 1000000 + }, + "acceptsInteractions": { + "type": "boolean", + "description": "Declaration that a feed accepts feedback interactions from a client through app.bsky.feed.sendInteractions" + }, + "labels": { + "type": "union", + "description": "Self-label values", + "refs": ["com.atproto.label.defs#selfLabels"] + }, + "contentMode": { + "type": "string", + "knownValues": [ + "app.bsky.feed.defs#contentModeUnspecified", + "app.bsky.feed.defs#contentModeVideo" + ] + }, + "createdAt": { "type": "string", "format": "datetime" } + } + } + } + } +} diff --git a/lexicons/app/bsky/feed/getActorFeeds.json b/lexicons/app/bsky/feed/getActorFeeds.json new file mode 100644 index 0000000000..9a7dae0ad5 --- /dev/null +++ b/lexicons/app/bsky/feed/getActorFeeds.json @@ -0,0 +1,41 @@ +{ + "lexicon": 1, + "id": "app.bsky.feed.getActorFeeds", + "defs": { + "main": { + "type": "query", + "description": "Get a list of feeds (feed generator records) created by the actor (in the actor's repo).", + "parameters": { + "type": "params", + "required": ["actor"], + "properties": { + "actor": { "type": "string", "format": "at-identifier" }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50 + }, + "cursor": { "type": "string" } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["feeds"], + "properties": { + "cursor": { "type": "string" }, + "feeds": { + "type": "array", + "items": { + "type": "ref", + "ref": "app.bsky.feed.defs#generatorView" + } + } + } + } + } + } + } +} diff --git a/lexicons/app/bsky/feed/getActorLikes.json b/lexicons/app/bsky/feed/getActorLikes.json new file mode 100644 index 0000000000..f7c0224b0a --- /dev/null +++ b/lexicons/app/bsky/feed/getActorLikes.json @@ -0,0 +1,42 @@ +{ + "lexicon": 1, + "id": "app.bsky.feed.getActorLikes", + "defs": { + "main": { + "type": "query", + "description": "Get a list of posts liked by an actor. Requires auth, actor must be the requesting account.", + "parameters": { + "type": "params", + "required": ["actor"], + "properties": { + "actor": { "type": "string", "format": "at-identifier" }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50 + }, + "cursor": { "type": "string" } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["feed"], + "properties": { + "cursor": { "type": "string" }, + "feed": { + "type": "array", + "items": { + "type": "ref", + "ref": "app.bsky.feed.defs#feedViewPost" + } + } + } + } + }, + "errors": [{ "name": "BlockedActor" }, { "name": "BlockedByActor" }] + } + } +} diff --git a/lexicons/app/bsky/feed/getAuthorFeed.json b/lexicons/app/bsky/feed/getAuthorFeed.json new file mode 100644 index 0000000000..c9ef8c5077 --- /dev/null +++ b/lexicons/app/bsky/feed/getAuthorFeed.json @@ -0,0 +1,58 @@ +{ + "lexicon": 1, + "id": "app.bsky.feed.getAuthorFeed", + "defs": { + "main": { + "type": "query", + "description": "Get a view of an actor's 'author feed' (post and reposts by the author). Does not require auth.", + "parameters": { + "type": "params", + "required": ["actor"], + "properties": { + "actor": { "type": "string", "format": "at-identifier" }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50 + }, + "cursor": { "type": "string" }, + "filter": { + "type": "string", + "description": "Combinations of post/repost types to include in response.", + "knownValues": [ + "posts_with_replies", + "posts_no_replies", + "posts_with_media", + "posts_and_author_threads", + "posts_with_video" + ], + "default": "posts_with_replies" + }, + "includePins": { + "type": "boolean", + "default": false + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["feed"], + "properties": { + "cursor": { "type": "string" }, + "feed": { + "type": "array", + "items": { + "type": "ref", + "ref": "app.bsky.feed.defs#feedViewPost" + } + } + } + } + }, + "errors": [{ "name": "BlockedActor" }, { "name": "BlockedByActor" }] + } + } +} diff --git a/lexicons/app/bsky/feed/getFeed.json b/lexicons/app/bsky/feed/getFeed.json new file mode 100644 index 0000000000..ada3098b56 --- /dev/null +++ b/lexicons/app/bsky/feed/getFeed.json @@ -0,0 +1,42 @@ +{ + "lexicon": 1, + "id": "app.bsky.feed.getFeed", + "defs": { + "main": { + "type": "query", + "description": "Get a hydrated feed from an actor's selected feed generator. Implemented by App View.", + "parameters": { + "type": "params", + "required": ["feed"], + "properties": { + "feed": { "type": "string", "format": "at-uri" }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50 + }, + "cursor": { "type": "string" } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["feed"], + "properties": { + "cursor": { "type": "string" }, + "feed": { + "type": "array", + "items": { + "type": "ref", + "ref": "app.bsky.feed.defs#feedViewPost" + } + } + } + } + }, + "errors": [{ "name": "UnknownFeed" }] + } + } +} diff --git a/lexicons/app/bsky/feed/getFeedGenerator.json b/lexicons/app/bsky/feed/getFeedGenerator.json new file mode 100644 index 0000000000..190eca85b2 --- /dev/null +++ b/lexicons/app/bsky/feed/getFeedGenerator.json @@ -0,0 +1,42 @@ +{ + "lexicon": 1, + "id": "app.bsky.feed.getFeedGenerator", + "defs": { + "main": { + "type": "query", + "description": "Get information about a feed generator. Implemented by AppView.", + "parameters": { + "type": "params", + "required": ["feed"], + "properties": { + "feed": { + "type": "string", + "format": "at-uri", + "description": "AT-URI of the feed generator record." + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["view", "isOnline", "isValid"], + "properties": { + "view": { + "type": "ref", + "ref": "app.bsky.feed.defs#generatorView" + }, + "isOnline": { + "type": "boolean", + "description": "Indicates whether the feed generator service has been online recently, or else seems to be inactive." + }, + "isValid": { + "type": "boolean", + "description": "Indicates whether the feed generator service is compatible with the record declaration." + } + } + } + } + } + } +} diff --git a/lexicons/app/bsky/feed/getFeedGenerators.json b/lexicons/app/bsky/feed/getFeedGenerators.json new file mode 100644 index 0000000000..b8e926db00 --- /dev/null +++ b/lexicons/app/bsky/feed/getFeedGenerators.json @@ -0,0 +1,36 @@ +{ + "lexicon": 1, + "id": "app.bsky.feed.getFeedGenerators", + "defs": { + "main": { + "type": "query", + "description": "Get information about a list of feed generators.", + "parameters": { + "type": "params", + "required": ["feeds"], + "properties": { + "feeds": { + "type": "array", + "items": { "type": "string", "format": "at-uri" } + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["feeds"], + "properties": { + "feeds": { + "type": "array", + "items": { + "type": "ref", + "ref": "app.bsky.feed.defs#generatorView" + } + } + } + } + } + } + } +} diff --git a/lexicons/app/bsky/feed/getFeedSkeleton.json b/lexicons/app/bsky/feed/getFeedSkeleton.json new file mode 100644 index 0000000000..2bcaa13d4f --- /dev/null +++ b/lexicons/app/bsky/feed/getFeedSkeleton.json @@ -0,0 +1,46 @@ +{ + "lexicon": 1, + "id": "app.bsky.feed.getFeedSkeleton", + "defs": { + "main": { + "type": "query", + "description": "Get a skeleton of a feed provided by a feed generator. Auth is optional, depending on provider requirements, and provides the DID of the requester. Implemented by Feed Generator Service.", + "parameters": { + "type": "params", + "required": ["feed"], + "properties": { + "feed": { + "type": "string", + "format": "at-uri", + "description": "Reference to feed generator record describing the specific feed being requested." + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50 + }, + "cursor": { "type": "string" } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["feed"], + "properties": { + "cursor": { "type": "string" }, + "feed": { + "type": "array", + "items": { + "type": "ref", + "ref": "app.bsky.feed.defs#skeletonFeedPost" + } + } + } + } + }, + "errors": [{ "name": "UnknownFeed" }] + } + } +} diff --git a/lexicons/app/bsky/feed/getLikes.json b/lexicons/app/bsky/feed/getLikes.json new file mode 100644 index 0000000000..d2c5b1a77d --- /dev/null +++ b/lexicons/app/bsky/feed/getLikes.json @@ -0,0 +1,58 @@ +{ + "lexicon": 1, + "id": "app.bsky.feed.getLikes", + "defs": { + "main": { + "type": "query", + "description": "Get like records which reference a subject (by AT-URI and CID).", + "parameters": { + "type": "params", + "required": ["uri"], + "properties": { + "uri": { + "type": "string", + "format": "at-uri", + "description": "AT-URI of the subject (eg, a post record)." + }, + "cid": { + "type": "string", + "format": "cid", + "description": "CID of the subject record (aka, specific version of record), to filter likes." + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50 + }, + "cursor": { "type": "string" } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["uri", "likes"], + "properties": { + "uri": { "type": "string", "format": "at-uri" }, + "cid": { "type": "string", "format": "cid" }, + "cursor": { "type": "string" }, + "likes": { + "type": "array", + "items": { "type": "ref", "ref": "#like" } + } + } + } + } + }, + "like": { + "type": "object", + "required": ["indexedAt", "createdAt", "actor"], + "properties": { + "indexedAt": { "type": "string", "format": "datetime" }, + "createdAt": { "type": "string", "format": "datetime" }, + "actor": { "type": "ref", "ref": "app.bsky.actor.defs#profileView" } + } + } + } +} diff --git a/lexicons/app/bsky/feed/getListFeed.json b/lexicons/app/bsky/feed/getListFeed.json new file mode 100644 index 0000000000..9dd9fdc70f --- /dev/null +++ b/lexicons/app/bsky/feed/getListFeed.json @@ -0,0 +1,46 @@ +{ + "lexicon": 1, + "id": "app.bsky.feed.getListFeed", + "defs": { + "main": { + "type": "query", + "description": "Get a feed of recent posts from a list (posts and reposts from any actors on the list). Does not require auth.", + "parameters": { + "type": "params", + "required": ["list"], + "properties": { + "list": { + "type": "string", + "format": "at-uri", + "description": "Reference (AT-URI) to the list record." + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50 + }, + "cursor": { "type": "string" } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["feed"], + "properties": { + "cursor": { "type": "string" }, + "feed": { + "type": "array", + "items": { + "type": "ref", + "ref": "app.bsky.feed.defs#feedViewPost" + } + } + } + } + }, + "errors": [{ "name": "UnknownList" }] + } + } +} diff --git a/lexicons/app/bsky/feed/getPostThread.json b/lexicons/app/bsky/feed/getPostThread.json new file mode 100644 index 0000000000..7efab15f1e --- /dev/null +++ b/lexicons/app/bsky/feed/getPostThread.json @@ -0,0 +1,57 @@ +{ + "lexicon": 1, + "id": "app.bsky.feed.getPostThread", + "defs": { + "main": { + "type": "query", + "description": "Get posts in a thread. Does not require auth, but additional metadata and filtering will be applied for authed requests.", + "parameters": { + "type": "params", + "required": ["uri"], + "properties": { + "uri": { + "type": "string", + "format": "at-uri", + "description": "Reference (AT-URI) to post record." + }, + "depth": { + "type": "integer", + "description": "How many levels of reply depth should be included in response.", + "default": 6, + "minimum": 0, + "maximum": 1000 + }, + "parentHeight": { + "type": "integer", + "description": "How many levels of parent (and grandparent, etc) post to include.", + "default": 80, + "minimum": 0, + "maximum": 1000 + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["thread"], + "properties": { + "thread": { + "type": "union", + "refs": [ + "app.bsky.feed.defs#threadViewPost", + "app.bsky.feed.defs#notFoundPost", + "app.bsky.feed.defs#blockedPost" + ] + }, + "threadgate": { + "type": "ref", + "ref": "app.bsky.feed.defs#threadgateView" + } + } + } + }, + "errors": [{ "name": "NotFound" }] + } + } +} diff --git a/lexicons/app/bsky/feed/getPosts.json b/lexicons/app/bsky/feed/getPosts.json new file mode 100644 index 0000000000..e555ee1632 --- /dev/null +++ b/lexicons/app/bsky/feed/getPosts.json @@ -0,0 +1,35 @@ +{ + "lexicon": 1, + "id": "app.bsky.feed.getPosts", + "defs": { + "main": { + "type": "query", + "description": "Gets post views for a specified list of posts (by AT-URI). This is sometimes referred to as 'hydrating' a 'feed skeleton'.", + "parameters": { + "type": "params", + "required": ["uris"], + "properties": { + "uris": { + "type": "array", + "description": "List of post AT-URIs to return hydrated views for.", + "items": { "type": "string", "format": "at-uri" }, + "maxLength": 25 + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["posts"], + "properties": { + "posts": { + "type": "array", + "items": { "type": "ref", "ref": "app.bsky.feed.defs#postView" } + } + } + } + } + } + } +} diff --git a/lexicons/app/bsky/feed/getQuotes.json b/lexicons/app/bsky/feed/getQuotes.json new file mode 100644 index 0000000000..4ea8b30e48 --- /dev/null +++ b/lexicons/app/bsky/feed/getQuotes.json @@ -0,0 +1,52 @@ +{ + "lexicon": 1, + "id": "app.bsky.feed.getQuotes", + "defs": { + "main": { + "type": "query", + "description": "Get a list of quotes for a given post.", + "parameters": { + "type": "params", + "required": ["uri"], + "properties": { + "uri": { + "type": "string", + "format": "at-uri", + "description": "Reference (AT-URI) of post record" + }, + "cid": { + "type": "string", + "format": "cid", + "description": "If supplied, filters to quotes of specific version (by CID) of the post record." + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50 + }, + "cursor": { "type": "string" } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["uri", "posts"], + "properties": { + "uri": { "type": "string", "format": "at-uri" }, + "cid": { "type": "string", "format": "cid" }, + "cursor": { "type": "string" }, + "posts": { + "type": "array", + "items": { + "type": "ref", + "ref": "app.bsky.feed.defs#postView" + } + } + } + } + } + } + } +} diff --git a/lexicons/app/bsky/feed/getRepostedBy.json b/lexicons/app/bsky/feed/getRepostedBy.json new file mode 100644 index 0000000000..db39534658 --- /dev/null +++ b/lexicons/app/bsky/feed/getRepostedBy.json @@ -0,0 +1,52 @@ +{ + "lexicon": 1, + "id": "app.bsky.feed.getRepostedBy", + "defs": { + "main": { + "type": "query", + "description": "Get a list of reposts for a given post.", + "parameters": { + "type": "params", + "required": ["uri"], + "properties": { + "uri": { + "type": "string", + "format": "at-uri", + "description": "Reference (AT-URI) of post record" + }, + "cid": { + "type": "string", + "format": "cid", + "description": "If supplied, filters to reposts of specific version (by CID) of the post record." + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50 + }, + "cursor": { "type": "string" } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["uri", "repostedBy"], + "properties": { + "uri": { "type": "string", "format": "at-uri" }, + "cid": { "type": "string", "format": "cid" }, + "cursor": { "type": "string" }, + "repostedBy": { + "type": "array", + "items": { + "type": "ref", + "ref": "app.bsky.actor.defs#profileView" + } + } + } + } + } + } + } +} diff --git a/lexicons/app/bsky/feed/getSuggestedFeeds.json b/lexicons/app/bsky/feed/getSuggestedFeeds.json new file mode 100644 index 0000000000..e643d3391e --- /dev/null +++ b/lexicons/app/bsky/feed/getSuggestedFeeds.json @@ -0,0 +1,39 @@ +{ + "lexicon": 1, + "id": "app.bsky.feed.getSuggestedFeeds", + "defs": { + "main": { + "type": "query", + "description": "Get a list of suggested feeds (feed generators) for the requesting account.", + "parameters": { + "type": "params", + "properties": { + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50 + }, + "cursor": { "type": "string" } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["feeds"], + "properties": { + "cursor": { "type": "string" }, + "feeds": { + "type": "array", + "items": { + "type": "ref", + "ref": "app.bsky.feed.defs#generatorView" + } + } + } + } + } + } + } +} diff --git a/lexicons/app/bsky/feed/getTimeline.json b/lexicons/app/bsky/feed/getTimeline.json new file mode 100644 index 0000000000..816380fe68 --- /dev/null +++ b/lexicons/app/bsky/feed/getTimeline.json @@ -0,0 +1,43 @@ +{ + "lexicon": 1, + "id": "app.bsky.feed.getTimeline", + "defs": { + "main": { + "type": "query", + "description": "Get a view of the requesting account's home timeline. This is expected to be some form of reverse-chronological feed.", + "parameters": { + "type": "params", + "properties": { + "algorithm": { + "type": "string", + "description": "Variant 'algorithm' for timeline. Implementation-specific. NOTE: most feed flexibility has been moved to feed generator mechanism." + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50 + }, + "cursor": { "type": "string" } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["feed"], + "properties": { + "cursor": { "type": "string" }, + "feed": { + "type": "array", + "items": { + "type": "ref", + "ref": "app.bsky.feed.defs#feedViewPost" + } + } + } + } + } + } + } +} diff --git a/lexicons/app/bsky/feed/like.json b/lexicons/app/bsky/feed/like.json new file mode 100644 index 0000000000..c0de3b71e9 --- /dev/null +++ b/lexicons/app/bsky/feed/like.json @@ -0,0 +1,19 @@ +{ + "lexicon": 1, + "id": "app.bsky.feed.like", + "defs": { + "main": { + "type": "record", + "description": "Record declaring a 'like' of a piece of subject content.", + "key": "tid", + "record": { + "type": "object", + "required": ["subject", "createdAt"], + "properties": { + "subject": { "type": "ref", "ref": "com.atproto.repo.strongRef" }, + "createdAt": { "type": "string", "format": "datetime" } + } + } + } + } +} diff --git a/lexicons/app/bsky/feed/post.json b/lexicons/app/bsky/feed/post.json new file mode 100644 index 0000000000..9893a35594 --- /dev/null +++ b/lexicons/app/bsky/feed/post.json @@ -0,0 +1,96 @@ +{ + "lexicon": 1, + "id": "app.bsky.feed.post", + "defs": { + "main": { + "type": "record", + "description": "Record containing a Bluesky post.", + "key": "tid", + "record": { + "type": "object", + "required": ["text", "createdAt"], + "properties": { + "text": { + "type": "string", + "maxLength": 3000, + "maxGraphemes": 300, + "description": "The primary post content. May be an empty string, if there are embeds." + }, + "entities": { + "type": "array", + "description": "DEPRECATED: replaced by app.bsky.richtext.facet.", + "items": { "type": "ref", "ref": "#entity" } + }, + "facets": { + "type": "array", + "description": "Annotations of text (mentions, URLs, hashtags, etc)", + "items": { "type": "ref", "ref": "app.bsky.richtext.facet" } + }, + "reply": { "type": "ref", "ref": "#replyRef" }, + "embed": { + "type": "union", + "refs": [ + "app.bsky.embed.images", + "app.bsky.embed.video", + "app.bsky.embed.external", + "app.bsky.embed.record", + "app.bsky.embed.recordWithMedia" + ] + }, + "langs": { + "type": "array", + "description": "Indicates human language of post primary text content.", + "maxLength": 3, + "items": { "type": "string", "format": "language" } + }, + "labels": { + "type": "union", + "description": "Self-label values for this post. Effectively content warnings.", + "refs": ["com.atproto.label.defs#selfLabels"] + }, + "tags": { + "type": "array", + "description": "Additional hashtags, in addition to any included in post text and facets.", + "maxLength": 8, + "items": { "type": "string", "maxLength": 640, "maxGraphemes": 64 } + }, + "createdAt": { + "type": "string", + "format": "datetime", + "description": "Client-declared timestamp when this post was originally created." + } + } + } + }, + "replyRef": { + "type": "object", + "required": ["root", "parent"], + "properties": { + "root": { "type": "ref", "ref": "com.atproto.repo.strongRef" }, + "parent": { "type": "ref", "ref": "com.atproto.repo.strongRef" } + } + }, + "entity": { + "type": "object", + "description": "Deprecated: use facets instead.", + "required": ["index", "type", "value"], + "properties": { + "index": { "type": "ref", "ref": "#textSlice" }, + "type": { + "type": "string", + "description": "Expected values are 'mention' and 'link'." + }, + "value": { "type": "string" } + } + }, + "textSlice": { + "type": "object", + "description": "Deprecated. Use app.bsky.richtext instead -- A text segment. Start is inclusive, end is exclusive. Indices are for utf16-encoded strings.", + "required": ["start", "end"], + "properties": { + "start": { "type": "integer", "minimum": 0 }, + "end": { "type": "integer", "minimum": 0 } + } + } + } +} diff --git a/lexicons/app/bsky/feed/postgate.json b/lexicons/app/bsky/feed/postgate.json new file mode 100644 index 0000000000..d98a673134 --- /dev/null +++ b/lexicons/app/bsky/feed/postgate.json @@ -0,0 +1,46 @@ +{ + "lexicon": 1, + "id": "app.bsky.feed.postgate", + "defs": { + "main": { + "type": "record", + "key": "tid", + "description": "Record defining interaction rules for a post. The record key (rkey) of the postgate record must match the record key of the post, and that record must be in the same repository.", + "record": { + "type": "object", + "required": ["post", "createdAt"], + "properties": { + "createdAt": { "type": "string", "format": "datetime" }, + "post": { + "type": "string", + "format": "at-uri", + "description": "Reference (AT-URI) to the post record." + }, + "detachedEmbeddingUris": { + "type": "array", + "maxLength": 50, + "items": { + "type": "string", + "format": "at-uri" + }, + "description": "List of AT-URIs embedding this post that the author has detached from." + }, + "embeddingRules": { + "description": "List of rules defining who can embed this post. If value is an empty array or is undefined, no particular rules apply and anyone can embed.", + "type": "array", + "maxLength": 5, + "items": { + "type": "union", + "refs": ["#disableRule"] + } + } + } + } + }, + "disableRule": { + "type": "object", + "description": "Disables embedding of this post.", + "properties": {} + } + } +} diff --git a/lexicons/app/bsky/feed/repost.json b/lexicons/app/bsky/feed/repost.json new file mode 100644 index 0000000000..028fd62715 --- /dev/null +++ b/lexicons/app/bsky/feed/repost.json @@ -0,0 +1,19 @@ +{ + "lexicon": 1, + "id": "app.bsky.feed.repost", + "defs": { + "main": { + "description": "Record representing a 'repost' of an existing Bluesky post.", + "type": "record", + "key": "tid", + "record": { + "type": "object", + "required": ["subject", "createdAt"], + "properties": { + "subject": { "type": "ref", "ref": "com.atproto.repo.strongRef" }, + "createdAt": { "type": "string", "format": "datetime" } + } + } + } + } +} diff --git a/lexicons/app/bsky/feed/searchPosts.json b/lexicons/app/bsky/feed/searchPosts.json new file mode 100644 index 0000000000..b641b37c87 --- /dev/null +++ b/lexicons/app/bsky/feed/searchPosts.json @@ -0,0 +1,99 @@ +{ + "lexicon": 1, + "id": "app.bsky.feed.searchPosts", + "defs": { + "main": { + "type": "query", + "description": "Find posts matching search criteria, returning views of those posts.", + "parameters": { + "type": "params", + "required": ["q"], + "properties": { + "q": { + "type": "string", + "description": "Search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended." + }, + "sort": { + "type": "string", + "knownValues": ["top", "latest"], + "default": "latest", + "description": "Specifies the ranking order of results." + }, + "since": { + "type": "string", + "description": "Filter results for posts after the indicated datetime (inclusive). Expected to use 'sortAt' timestamp, which may not match 'createdAt'. Can be a datetime, or just an ISO date (YYYY-MM-DD)." + }, + "until": { + "type": "string", + "description": "Filter results for posts before the indicated datetime (not inclusive). Expected to use 'sortAt' timestamp, which may not match 'createdAt'. Can be a datetime, or just an ISO date (YYY-MM-DD)." + }, + "mentions": { + "type": "string", + "format": "at-identifier", + "description": "Filter to posts which mention the given account. Handles are resolved to DID before query-time. Only matches rich-text facet mentions." + }, + "author": { + "type": "string", + "format": "at-identifier", + "description": "Filter to posts by the given account. Handles are resolved to DID before query-time." + }, + "lang": { + "type": "string", + "format": "language", + "description": "Filter to posts in the given language. Expected to be based on post language field, though server may override language detection." + }, + "domain": { + "type": "string", + "description": "Filter to posts with URLs (facet links or embeds) linking to the given domain (hostname). Server may apply hostname normalization." + }, + "url": { + "type": "string", + "format": "uri", + "description": "Filter to posts with links (facet links or embeds) pointing to this URL. Server may apply URL normalization or fuzzy matching." + }, + "tag": { + "type": "array", + "items": { + "type": "string", + "maxLength": 640, + "maxGraphemes": 64 + }, + "description": "Filter to posts with the given tag (hashtag), based on rich-text facet or tag field. Do not include the hash (#) prefix. Multiple tags can be specified, with 'AND' matching." + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 25 + }, + "cursor": { + "type": "string", + "description": "Optional pagination mechanism; may not necessarily allow scrolling through entire result set." + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["posts"], + "properties": { + "cursor": { "type": "string" }, + "hitsTotal": { + "type": "integer", + "description": "Count of search hits. Optional, may be rounded/truncated, and may not be possible to paginate through all hits." + }, + "posts": { + "type": "array", + "items": { + "type": "ref", + "ref": "app.bsky.feed.defs#postView" + } + } + } + } + }, + "errors": [{ "name": "BadQueryString" }] + } + } +} diff --git a/lexicons/app/bsky/feed/sendInteractions.json b/lexicons/app/bsky/feed/sendInteractions.json new file mode 100644 index 0000000000..c50fbbc0e1 --- /dev/null +++ b/lexicons/app/bsky/feed/sendInteractions.json @@ -0,0 +1,33 @@ +{ + "lexicon": 1, + "id": "app.bsky.feed.sendInteractions", + "defs": { + "main": { + "type": "procedure", + "description": "Send information about interactions with feed items back to the feed generator that served them.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["interactions"], + "properties": { + "interactions": { + "type": "array", + "items": { + "type": "ref", + "ref": "app.bsky.feed.defs#interaction" + } + } + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "properties": {} + } + } + } + } +} diff --git a/lexicons/app/bsky/feed/threadgate.json b/lexicons/app/bsky/feed/threadgate.json new file mode 100644 index 0000000000..f1a869999f --- /dev/null +++ b/lexicons/app/bsky/feed/threadgate.json @@ -0,0 +1,69 @@ +{ + "lexicon": 1, + "id": "app.bsky.feed.threadgate", + "defs": { + "main": { + "type": "record", + "key": "tid", + "description": "Record defining interaction gating rules for a thread (aka, reply controls). The record key (rkey) of the threadgate record must match the record key of the thread's root post, and that record must be in the same repository.", + "record": { + "type": "object", + "required": ["post", "createdAt"], + "properties": { + "post": { + "type": "string", + "format": "at-uri", + "description": "Reference (AT-URI) to the post record." + }, + "allow": { + "description": "List of rules defining who can reply to this post. If value is an empty array, no one can reply. If value is undefined, anyone can reply.", + "type": "array", + "maxLength": 5, + "items": { + "type": "union", + "refs": [ + "#mentionRule", + "#followerRule", + "#followingRule", + "#listRule" + ] + } + }, + "createdAt": { "type": "string", "format": "datetime" }, + "hiddenReplies": { + "type": "array", + "maxLength": 50, + "items": { + "type": "string", + "format": "at-uri" + }, + "description": "List of hidden reply URIs." + } + } + } + }, + "mentionRule": { + "type": "object", + "description": "Allow replies from actors mentioned in your post.", + "properties": {} + }, + "followerRule": { + "type": "object", + "description": "Allow replies from actors who follow you.", + "properties": {} + }, + "followingRule": { + "type": "object", + "description": "Allow replies from actors you follow.", + "properties": {} + }, + "listRule": { + "type": "object", + "description": "Allow replies from actors on a list.", + "required": ["list"], + "properties": { + "list": { "type": "string", "format": "at-uri" } + } + } + } +} diff --git a/lexicons/app/bsky/graph/block.json b/lexicons/app/bsky/graph/block.json new file mode 100644 index 0000000000..b64b11a956 --- /dev/null +++ b/lexicons/app/bsky/graph/block.json @@ -0,0 +1,23 @@ +{ + "lexicon": 1, + "id": "app.bsky.graph.block", + "defs": { + "main": { + "type": "record", + "description": "Record declaring a 'block' relationship against another account. NOTE: blocks are public in Bluesky; see blog posts for details.", + "key": "tid", + "record": { + "type": "object", + "required": ["subject", "createdAt"], + "properties": { + "subject": { + "type": "string", + "format": "did", + "description": "DID of the account to be blocked." + }, + "createdAt": { "type": "string", "format": "datetime" } + } + } + } + } +} diff --git a/lexicons/app/bsky/graph/defs.json b/lexicons/app/bsky/graph/defs.json new file mode 100644 index 0000000000..68dc8aa1e1 --- /dev/null +++ b/lexicons/app/bsky/graph/defs.json @@ -0,0 +1,166 @@ +{ + "lexicon": 1, + "id": "app.bsky.graph.defs", + "defs": { + "listViewBasic": { + "type": "object", + "required": ["uri", "cid", "name", "purpose"], + "properties": { + "uri": { "type": "string", "format": "at-uri" }, + "cid": { "type": "string", "format": "cid" }, + "name": { "type": "string", "maxLength": 64, "minLength": 1 }, + "purpose": { "type": "ref", "ref": "#listPurpose" }, + "avatar": { "type": "string", "format": "uri" }, + "listItemCount": { "type": "integer", "minimum": 0 }, + "labels": { + "type": "array", + "items": { "type": "ref", "ref": "com.atproto.label.defs#label" } + }, + "viewer": { "type": "ref", "ref": "#listViewerState" }, + "indexedAt": { "type": "string", "format": "datetime" } + } + }, + "listView": { + "type": "object", + "required": ["uri", "cid", "creator", "name", "purpose", "indexedAt"], + "properties": { + "uri": { "type": "string", "format": "at-uri" }, + "cid": { "type": "string", "format": "cid" }, + "creator": { "type": "ref", "ref": "app.bsky.actor.defs#profileView" }, + "name": { "type": "string", "maxLength": 64, "minLength": 1 }, + "purpose": { "type": "ref", "ref": "#listPurpose" }, + "description": { + "type": "string", + "maxGraphemes": 300, + "maxLength": 3000 + }, + "descriptionFacets": { + "type": "array", + "items": { "type": "ref", "ref": "app.bsky.richtext.facet" } + }, + "avatar": { "type": "string", "format": "uri" }, + "listItemCount": { "type": "integer", "minimum": 0 }, + "labels": { + "type": "array", + "items": { "type": "ref", "ref": "com.atproto.label.defs#label" } + }, + "viewer": { "type": "ref", "ref": "#listViewerState" }, + "indexedAt": { "type": "string", "format": "datetime" } + } + }, + "listItemView": { + "type": "object", + "required": ["uri", "subject"], + "properties": { + "uri": { "type": "string", "format": "at-uri" }, + "subject": { "type": "ref", "ref": "app.bsky.actor.defs#profileView" } + } + }, + "starterPackView": { + "type": "object", + "required": ["uri", "cid", "record", "creator", "indexedAt"], + "properties": { + "uri": { "type": "string", "format": "at-uri" }, + "cid": { "type": "string", "format": "cid" }, + "record": { "type": "unknown" }, + "creator": { + "type": "ref", + "ref": "app.bsky.actor.defs#profileViewBasic" + }, + "list": { "type": "ref", "ref": "#listViewBasic" }, + "listItemsSample": { + "type": "array", + "maxLength": 12, + "items": { "type": "ref", "ref": "#listItemView" } + }, + "feeds": { + "type": "array", + "maxLength": 3, + "items": { "type": "ref", "ref": "app.bsky.feed.defs#generatorView" } + }, + "joinedWeekCount": { "type": "integer", "minimum": 0 }, + "joinedAllTimeCount": { "type": "integer", "minimum": 0 }, + "labels": { + "type": "array", + "items": { "type": "ref", "ref": "com.atproto.label.defs#label" } + }, + "indexedAt": { "type": "string", "format": "datetime" } + } + }, + "starterPackViewBasic": { + "type": "object", + "required": ["uri", "cid", "record", "creator", "indexedAt"], + "properties": { + "uri": { "type": "string", "format": "at-uri" }, + "cid": { "type": "string", "format": "cid" }, + "record": { "type": "unknown" }, + "creator": { + "type": "ref", + "ref": "app.bsky.actor.defs#profileViewBasic" + }, + "listItemCount": { "type": "integer", "minimum": 0 }, + "joinedWeekCount": { "type": "integer", "minimum": 0 }, + "joinedAllTimeCount": { "type": "integer", "minimum": 0 }, + "labels": { + "type": "array", + "items": { "type": "ref", "ref": "com.atproto.label.defs#label" } + }, + "indexedAt": { "type": "string", "format": "datetime" } + } + }, + "listPurpose": { + "type": "string", + "knownValues": [ + "app.bsky.graph.defs#modlist", + "app.bsky.graph.defs#curatelist", + "app.bsky.graph.defs#referencelist" + ] + }, + "modlist": { + "type": "token", + "description": "A list of actors to apply an aggregate moderation action (mute/block) on." + }, + "curatelist": { + "type": "token", + "description": "A list of actors used for curation purposes such as list feeds or interaction gating." + }, + "referencelist": { + "type": "token", + "description": "A list of actors used for only for reference purposes such as within a starter pack." + }, + "listViewerState": { + "type": "object", + "properties": { + "muted": { "type": "boolean" }, + "blocked": { "type": "string", "format": "at-uri" } + } + }, + "notFoundActor": { + "type": "object", + "description": "indicates that a handle or DID could not be resolved", + "required": ["actor", "notFound"], + "properties": { + "actor": { "type": "string", "format": "at-identifier" }, + "notFound": { "type": "boolean", "const": true } + } + }, + "relationship": { + "type": "object", + "description": "lists the bi-directional graph relationships between one actor (not indicated in the object), and the target actors (the DID included in the object)", + "required": ["did"], + "properties": { + "did": { "type": "string", "format": "did" }, + "following": { + "type": "string", + "format": "at-uri", + "description": "if the actor follows this DID, this is the AT-URI of the follow record" + }, + "followedBy": { + "type": "string", + "format": "at-uri", + "description": "if the actor is followed by this DID, contains the AT-URI of the follow record" + } + } + } + } +} diff --git a/lexicons/app/bsky/graph/follow.json b/lexicons/app/bsky/graph/follow.json new file mode 100644 index 0000000000..dd6347ac76 --- /dev/null +++ b/lexicons/app/bsky/graph/follow.json @@ -0,0 +1,19 @@ +{ + "lexicon": 1, + "id": "app.bsky.graph.follow", + "defs": { + "main": { + "type": "record", + "description": "Record declaring a social 'follow' relationship of another account. Duplicate follows will be ignored by the AppView.", + "key": "tid", + "record": { + "type": "object", + "required": ["subject", "createdAt"], + "properties": { + "subject": { "type": "string", "format": "did" }, + "createdAt": { "type": "string", "format": "datetime" } + } + } + } + } +} diff --git a/lexicons/app/bsky/graph/getActorStarterPacks.json b/lexicons/app/bsky/graph/getActorStarterPacks.json new file mode 100644 index 0000000000..e6093b40b3 --- /dev/null +++ b/lexicons/app/bsky/graph/getActorStarterPacks.json @@ -0,0 +1,41 @@ +{ + "lexicon": 1, + "id": "app.bsky.graph.getActorStarterPacks", + "defs": { + "main": { + "type": "query", + "description": "Get a list of starter packs created by the actor.", + "parameters": { + "type": "params", + "required": ["actor"], + "properties": { + "actor": { "type": "string", "format": "at-identifier" }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50 + }, + "cursor": { "type": "string" } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["starterPacks"], + "properties": { + "cursor": { "type": "string" }, + "starterPacks": { + "type": "array", + "items": { + "type": "ref", + "ref": "app.bsky.graph.defs#starterPackViewBasic" + } + } + } + } + } + } + } +} diff --git a/lexicons/app/bsky/graph/getBlocks.json b/lexicons/app/bsky/graph/getBlocks.json new file mode 100644 index 0000000000..79a28f66a5 --- /dev/null +++ b/lexicons/app/bsky/graph/getBlocks.json @@ -0,0 +1,39 @@ +{ + "lexicon": 1, + "id": "app.bsky.graph.getBlocks", + "defs": { + "main": { + "type": "query", + "description": "Enumerates which accounts the requesting account is currently blocking. Requires auth.", + "parameters": { + "type": "params", + "properties": { + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50 + }, + "cursor": { "type": "string" } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["blocks"], + "properties": { + "cursor": { "type": "string" }, + "blocks": { + "type": "array", + "items": { + "type": "ref", + "ref": "app.bsky.actor.defs#profileView" + } + } + } + } + } + } + } +} diff --git a/lexicons/app/bsky/graph/getFollowers.json b/lexicons/app/bsky/graph/getFollowers.json new file mode 100644 index 0000000000..a6c4facd65 --- /dev/null +++ b/lexicons/app/bsky/graph/getFollowers.json @@ -0,0 +1,45 @@ +{ + "lexicon": 1, + "id": "app.bsky.graph.getFollowers", + "defs": { + "main": { + "type": "query", + "description": "Enumerates accounts which follow a specified account (actor).", + "parameters": { + "type": "params", + "required": ["actor"], + "properties": { + "actor": { "type": "string", "format": "at-identifier" }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50 + }, + "cursor": { "type": "string" } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["subject", "followers"], + "properties": { + "subject": { + "type": "ref", + "ref": "app.bsky.actor.defs#profileView" + }, + "cursor": { "type": "string" }, + "followers": { + "type": "array", + "items": { + "type": "ref", + "ref": "app.bsky.actor.defs#profileView" + } + } + } + } + } + } + } +} diff --git a/lexicons/app/bsky/graph/getFollows.json b/lexicons/app/bsky/graph/getFollows.json new file mode 100644 index 0000000000..81f1b6abe4 --- /dev/null +++ b/lexicons/app/bsky/graph/getFollows.json @@ -0,0 +1,45 @@ +{ + "lexicon": 1, + "id": "app.bsky.graph.getFollows", + "defs": { + "main": { + "type": "query", + "description": "Enumerates accounts which a specified account (actor) follows.", + "parameters": { + "type": "params", + "required": ["actor"], + "properties": { + "actor": { "type": "string", "format": "at-identifier" }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50 + }, + "cursor": { "type": "string" } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["subject", "follows"], + "properties": { + "subject": { + "type": "ref", + "ref": "app.bsky.actor.defs#profileView" + }, + "cursor": { "type": "string" }, + "follows": { + "type": "array", + "items": { + "type": "ref", + "ref": "app.bsky.actor.defs#profileView" + } + } + } + } + } + } + } +} diff --git a/lexicons/app/bsky/graph/getKnownFollowers.json b/lexicons/app/bsky/graph/getKnownFollowers.json new file mode 100644 index 0000000000..dcadba2b17 --- /dev/null +++ b/lexicons/app/bsky/graph/getKnownFollowers.json @@ -0,0 +1,45 @@ +{ + "lexicon": 1, + "id": "app.bsky.graph.getKnownFollowers", + "defs": { + "main": { + "type": "query", + "description": "Enumerates accounts which follow a specified account (actor) and are followed by the viewer.", + "parameters": { + "type": "params", + "required": ["actor"], + "properties": { + "actor": { "type": "string", "format": "at-identifier" }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50 + }, + "cursor": { "type": "string" } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["subject", "followers"], + "properties": { + "subject": { + "type": "ref", + "ref": "app.bsky.actor.defs#profileView" + }, + "cursor": { "type": "string" }, + "followers": { + "type": "array", + "items": { + "type": "ref", + "ref": "app.bsky.actor.defs#profileView" + } + } + } + } + } + } + } +} diff --git a/lexicons/app/bsky/graph/getList.json b/lexicons/app/bsky/graph/getList.json new file mode 100644 index 0000000000..cb95a003a5 --- /dev/null +++ b/lexicons/app/bsky/graph/getList.json @@ -0,0 +1,46 @@ +{ + "lexicon": 1, + "id": "app.bsky.graph.getList", + "defs": { + "main": { + "type": "query", + "description": "Gets a 'view' (with additional context) of a specified list.", + "parameters": { + "type": "params", + "required": ["list"], + "properties": { + "list": { + "type": "string", + "format": "at-uri", + "description": "Reference (AT-URI) of the list record to hydrate." + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50 + }, + "cursor": { "type": "string" } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["list", "items"], + "properties": { + "cursor": { "type": "string" }, + "list": { "type": "ref", "ref": "app.bsky.graph.defs#listView" }, + "items": { + "type": "array", + "items": { + "type": "ref", + "ref": "app.bsky.graph.defs#listItemView" + } + } + } + } + } + } + } +} diff --git a/lexicons/app/bsky/graph/getListBlocks.json b/lexicons/app/bsky/graph/getListBlocks.json new file mode 100644 index 0000000000..1bc976617e --- /dev/null +++ b/lexicons/app/bsky/graph/getListBlocks.json @@ -0,0 +1,36 @@ +{ + "lexicon": 1, + "id": "app.bsky.graph.getListBlocks", + "defs": { + "main": { + "type": "query", + "description": "Get mod lists that the requesting account (actor) is blocking. Requires auth.", + "parameters": { + "type": "params", + "properties": { + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50 + }, + "cursor": { "type": "string" } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["lists"], + "properties": { + "cursor": { "type": "string" }, + "lists": { + "type": "array", + "items": { "type": "ref", "ref": "app.bsky.graph.defs#listView" } + } + } + } + } + } + } +} diff --git a/lexicons/app/bsky/graph/getListMutes.json b/lexicons/app/bsky/graph/getListMutes.json new file mode 100644 index 0000000000..a56a825764 --- /dev/null +++ b/lexicons/app/bsky/graph/getListMutes.json @@ -0,0 +1,36 @@ +{ + "lexicon": 1, + "id": "app.bsky.graph.getListMutes", + "defs": { + "main": { + "type": "query", + "description": "Enumerates mod lists that the requesting account (actor) currently has muted. Requires auth.", + "parameters": { + "type": "params", + "properties": { + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50 + }, + "cursor": { "type": "string" } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["lists"], + "properties": { + "cursor": { "type": "string" }, + "lists": { + "type": "array", + "items": { "type": "ref", "ref": "app.bsky.graph.defs#listView" } + } + } + } + } + } + } +} diff --git a/lexicons/app/bsky/graph/getLists.json b/lexicons/app/bsky/graph/getLists.json new file mode 100644 index 0000000000..127b13e555 --- /dev/null +++ b/lexicons/app/bsky/graph/getLists.json @@ -0,0 +1,42 @@ +{ + "lexicon": 1, + "id": "app.bsky.graph.getLists", + "defs": { + "main": { + "type": "query", + "description": "Enumerates the lists created by a specified account (actor).", + "parameters": { + "type": "params", + "required": ["actor"], + "properties": { + "actor": { + "type": "string", + "format": "at-identifier", + "description": "The account (actor) to enumerate lists from." + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50 + }, + "cursor": { "type": "string" } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["lists"], + "properties": { + "cursor": { "type": "string" }, + "lists": { + "type": "array", + "items": { "type": "ref", "ref": "app.bsky.graph.defs#listView" } + } + } + } + } + } + } +} diff --git a/lexicons/app/bsky/graph/getMutes.json b/lexicons/app/bsky/graph/getMutes.json new file mode 100644 index 0000000000..22eaf0d384 --- /dev/null +++ b/lexicons/app/bsky/graph/getMutes.json @@ -0,0 +1,39 @@ +{ + "lexicon": 1, + "id": "app.bsky.graph.getMutes", + "defs": { + "main": { + "type": "query", + "description": "Enumerates accounts that the requesting account (actor) currently has muted. Requires auth.", + "parameters": { + "type": "params", + "properties": { + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50 + }, + "cursor": { "type": "string" } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["mutes"], + "properties": { + "cursor": { "type": "string" }, + "mutes": { + "type": "array", + "items": { + "type": "ref", + "ref": "app.bsky.actor.defs#profileView" + } + } + } + } + } + } + } +} diff --git a/lexicons/app/bsky/graph/getRelationships.json b/lexicons/app/bsky/graph/getRelationships.json new file mode 100644 index 0000000000..03490a25ec --- /dev/null +++ b/lexicons/app/bsky/graph/getRelationships.json @@ -0,0 +1,56 @@ +{ + "lexicon": 1, + "id": "app.bsky.graph.getRelationships", + "defs": { + "main": { + "type": "query", + "description": "Enumerates public relationships between one account, and a list of other accounts. Does not require auth.", + "parameters": { + "type": "params", + "required": ["actor"], + "properties": { + "actor": { + "type": "string", + "format": "at-identifier", + "description": "Primary account requesting relationships for." + }, + "others": { + "type": "array", + "description": "List of 'other' accounts to be related back to the primary.", + "maxLength": 30, + "items": { + "type": "string", + "format": "at-identifier" + } + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["relationships"], + "properties": { + "actor": { "type": "string", "format": "did" }, + "relationships": { + "type": "array", + "items": { + "type": "union", + "refs": [ + "app.bsky.graph.defs#relationship", + "app.bsky.graph.defs#notFoundActor" + ] + } + } + } + } + }, + "errors": [ + { + "name": "ActorNotFound", + "description": "the primary actor at-identifier could not be resolved" + } + ] + } + } +} diff --git a/lexicons/app/bsky/graph/getStarterPack.json b/lexicons/app/bsky/graph/getStarterPack.json new file mode 100644 index 0000000000..b4ded4c711 --- /dev/null +++ b/lexicons/app/bsky/graph/getStarterPack.json @@ -0,0 +1,34 @@ +{ + "lexicon": 1, + "id": "app.bsky.graph.getStarterPack", + "defs": { + "main": { + "type": "query", + "description": "Gets a view of a starter pack.", + "parameters": { + "type": "params", + "required": ["starterPack"], + "properties": { + "starterPack": { + "type": "string", + "format": "at-uri", + "description": "Reference (AT-URI) of the starter pack record." + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["starterPack"], + "properties": { + "starterPack": { + "type": "ref", + "ref": "app.bsky.graph.defs#starterPackView" + } + } + } + } + } + } +} diff --git a/lexicons/app/bsky/graph/getStarterPacks.json b/lexicons/app/bsky/graph/getStarterPacks.json new file mode 100644 index 0000000000..b57c43ada5 --- /dev/null +++ b/lexicons/app/bsky/graph/getStarterPacks.json @@ -0,0 +1,37 @@ +{ + "lexicon": 1, + "id": "app.bsky.graph.getStarterPacks", + "defs": { + "main": { + "type": "query", + "description": "Get views for a list of starter packs.", + "parameters": { + "type": "params", + "required": ["uris"], + "properties": { + "uris": { + "type": "array", + "items": { "type": "string", "format": "at-uri" }, + "maxLength": 25 + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["starterPacks"], + "properties": { + "starterPacks": { + "type": "array", + "items": { + "type": "ref", + "ref": "app.bsky.graph.defs#starterPackViewBasic" + } + } + } + } + } + } + } +} diff --git a/lexicons/app/bsky/graph/getSuggestedFollowsByActor.json b/lexicons/app/bsky/graph/getSuggestedFollowsByActor.json new file mode 100644 index 0000000000..454de1545b --- /dev/null +++ b/lexicons/app/bsky/graph/getSuggestedFollowsByActor.json @@ -0,0 +1,42 @@ +{ + "lexicon": 1, + "id": "app.bsky.graph.getSuggestedFollowsByActor", + "defs": { + "main": { + "type": "query", + "description": "Enumerates follows similar to a given account (actor). Expected use is to recommend additional accounts immediately after following one account.", + "parameters": { + "type": "params", + "required": ["actor"], + "properties": { + "actor": { "type": "string", "format": "at-identifier" } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["suggestions"], + "properties": { + "suggestions": { + "type": "array", + "items": { + "type": "ref", + "ref": "app.bsky.actor.defs#profileView" + } + }, + "isFallback": { + "type": "boolean", + "description": "If true, response has fallen-back to generic results, and is not scoped using relativeToDid", + "default": false + }, + "recId": { + "type": "integer", + "description": "Snowflake for this recommendation, use when submitting recommendation events." + } + } + } + } + } + } +} diff --git a/lexicons/app/bsky/graph/list.json b/lexicons/app/bsky/graph/list.json new file mode 100644 index 0000000000..131114126d --- /dev/null +++ b/lexicons/app/bsky/graph/list.json @@ -0,0 +1,47 @@ +{ + "lexicon": 1, + "id": "app.bsky.graph.list", + "defs": { + "main": { + "type": "record", + "description": "Record representing a list of accounts (actors). Scope includes both moderation-oriented lists and curration-oriented lists.", + "key": "tid", + "record": { + "type": "object", + "required": ["name", "purpose", "createdAt"], + "properties": { + "purpose": { + "type": "ref", + "description": "Defines the purpose of the list (aka, moderation-oriented or curration-oriented)", + "ref": "app.bsky.graph.defs#listPurpose" + }, + "name": { + "type": "string", + "maxLength": 64, + "minLength": 1, + "description": "Display name for list; can not be empty." + }, + "description": { + "type": "string", + "maxGraphemes": 300, + "maxLength": 3000 + }, + "descriptionFacets": { + "type": "array", + "items": { "type": "ref", "ref": "app.bsky.richtext.facet" } + }, + "avatar": { + "type": "blob", + "accept": ["image/png", "image/jpeg"], + "maxSize": 1000000 + }, + "labels": { + "type": "union", + "refs": ["com.atproto.label.defs#selfLabels"] + }, + "createdAt": { "type": "string", "format": "datetime" } + } + } + } + } +} diff --git a/lexicons/app/bsky/graph/listblock.json b/lexicons/app/bsky/graph/listblock.json new file mode 100644 index 0000000000..df2e17f3c3 --- /dev/null +++ b/lexicons/app/bsky/graph/listblock.json @@ -0,0 +1,23 @@ +{ + "lexicon": 1, + "id": "app.bsky.graph.listblock", + "defs": { + "main": { + "type": "record", + "description": "Record representing a block relationship against an entire an entire list of accounts (actors).", + "key": "tid", + "record": { + "type": "object", + "required": ["subject", "createdAt"], + "properties": { + "subject": { + "type": "string", + "format": "at-uri", + "description": "Reference (AT-URI) to the mod list record." + }, + "createdAt": { "type": "string", "format": "datetime" } + } + } + } + } +} diff --git a/lexicons/app/bsky/graph/listitem.json b/lexicons/app/bsky/graph/listitem.json new file mode 100644 index 0000000000..adbd96e77d --- /dev/null +++ b/lexicons/app/bsky/graph/listitem.json @@ -0,0 +1,28 @@ +{ + "lexicon": 1, + "id": "app.bsky.graph.listitem", + "defs": { + "main": { + "type": "record", + "description": "Record representing an account's inclusion on a specific list. The AppView will ignore duplicate listitem records.", + "key": "tid", + "record": { + "type": "object", + "required": ["subject", "list", "createdAt"], + "properties": { + "subject": { + "type": "string", + "format": "did", + "description": "The account which is included on the list." + }, + "list": { + "type": "string", + "format": "at-uri", + "description": "Reference (AT-URI) to the list record (app.bsky.graph.list)." + }, + "createdAt": { "type": "string", "format": "datetime" } + } + } + } + } +} diff --git a/lexicons/app/bsky/graph/muteActor.json b/lexicons/app/bsky/graph/muteActor.json new file mode 100644 index 0000000000..c2bf09a3b3 --- /dev/null +++ b/lexicons/app/bsky/graph/muteActor.json @@ -0,0 +1,20 @@ +{ + "lexicon": 1, + "id": "app.bsky.graph.muteActor", + "defs": { + "main": { + "type": "procedure", + "description": "Creates a mute relationship for the specified account. Mutes are private in Bluesky. Requires auth.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["actor"], + "properties": { + "actor": { "type": "string", "format": "at-identifier" } + } + } + } + } + } +} diff --git a/lexicons/app/bsky/graph/muteActorList.json b/lexicons/app/bsky/graph/muteActorList.json new file mode 100644 index 0000000000..ad05e6349d --- /dev/null +++ b/lexicons/app/bsky/graph/muteActorList.json @@ -0,0 +1,20 @@ +{ + "lexicon": 1, + "id": "app.bsky.graph.muteActorList", + "defs": { + "main": { + "type": "procedure", + "description": "Creates a mute relationship for the specified list of accounts. Mutes are private in Bluesky. Requires auth.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["list"], + "properties": { + "list": { "type": "string", "format": "at-uri" } + } + } + } + } + } +} diff --git a/lexicons/app/bsky/graph/muteThread.json b/lexicons/app/bsky/graph/muteThread.json new file mode 100644 index 0000000000..a20be8274c --- /dev/null +++ b/lexicons/app/bsky/graph/muteThread.json @@ -0,0 +1,20 @@ +{ + "lexicon": 1, + "id": "app.bsky.graph.muteThread", + "defs": { + "main": { + "type": "procedure", + "description": "Mutes a thread preventing notifications from the thread and any of its children. Mutes are private in Bluesky. Requires auth.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["root"], + "properties": { + "root": { "type": "string", "format": "at-uri" } + } + } + } + } + } +} diff --git a/lexicons/app/bsky/graph/searchStarterPacks.json b/lexicons/app/bsky/graph/searchStarterPacks.json new file mode 100644 index 0000000000..66a26ec45d --- /dev/null +++ b/lexicons/app/bsky/graph/searchStarterPacks.json @@ -0,0 +1,48 @@ +{ + "lexicon": 1, + "id": "app.bsky.graph.searchStarterPacks", + "defs": { + "main": { + "type": "query", + "description": "Find starter packs matching search criteria. Does not require auth.", + "parameters": { + "type": "params", + "required": ["q"], + "properties": { + "q": { + "type": "string", + "description": "Search query string. Syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended." + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 25 + }, + "cursor": { + "type": "string" + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["starterPacks"], + "properties": { + "cursor": { + "type": "string" + }, + "starterPacks": { + "type": "array", + "items": { + "type": "ref", + "ref": "app.bsky.graph.defs#starterPackViewBasic" + } + } + } + } + } + } + } +} diff --git a/lexicons/app/bsky/graph/starterpack.json b/lexicons/app/bsky/graph/starterpack.json new file mode 100644 index 0000000000..17ee55ee6b --- /dev/null +++ b/lexicons/app/bsky/graph/starterpack.json @@ -0,0 +1,51 @@ +{ + "lexicon": 1, + "id": "app.bsky.graph.starterpack", + "defs": { + "main": { + "type": "record", + "description": "Record defining a starter pack of actors and feeds for new users.", + "key": "tid", + "record": { + "type": "object", + "required": ["name", "list", "createdAt"], + "properties": { + "name": { + "type": "string", + "maxGraphemes": 50, + "maxLength": 500, + "minLength": 1, + "description": "Display name for starter pack; can not be empty." + }, + "description": { + "type": "string", + "maxGraphemes": 300, + "maxLength": 3000 + }, + "descriptionFacets": { + "type": "array", + "items": { "type": "ref", "ref": "app.bsky.richtext.facet" } + }, + "list": { + "type": "string", + "format": "at-uri", + "description": "Reference (AT-URI) to the list record." + }, + "feeds": { + "type": "array", + "maxLength": 3, + "items": { "type": "ref", "ref": "#feedItem" } + }, + "createdAt": { "type": "string", "format": "datetime" } + } + } + }, + "feedItem": { + "type": "object", + "required": ["uri"], + "properties": { + "uri": { "type": "string", "format": "at-uri" } + } + } + } +} diff --git a/lexicons/app/bsky/graph/unmuteActor.json b/lexicons/app/bsky/graph/unmuteActor.json new file mode 100644 index 0000000000..bcea72db59 --- /dev/null +++ b/lexicons/app/bsky/graph/unmuteActor.json @@ -0,0 +1,20 @@ +{ + "lexicon": 1, + "id": "app.bsky.graph.unmuteActor", + "defs": { + "main": { + "type": "procedure", + "description": "Unmutes the specified account. Requires auth.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["actor"], + "properties": { + "actor": { "type": "string", "format": "at-identifier" } + } + } + } + } + } +} diff --git a/lexicons/app/bsky/graph/unmuteActorList.json b/lexicons/app/bsky/graph/unmuteActorList.json new file mode 100644 index 0000000000..a597838e11 --- /dev/null +++ b/lexicons/app/bsky/graph/unmuteActorList.json @@ -0,0 +1,20 @@ +{ + "lexicon": 1, + "id": "app.bsky.graph.unmuteActorList", + "defs": { + "main": { + "type": "procedure", + "description": "Unmutes the specified list of accounts. Requires auth.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["list"], + "properties": { + "list": { "type": "string", "format": "at-uri" } + } + } + } + } + } +} diff --git a/lexicons/app/bsky/graph/unmuteThread.json b/lexicons/app/bsky/graph/unmuteThread.json new file mode 100644 index 0000000000..6450a65782 --- /dev/null +++ b/lexicons/app/bsky/graph/unmuteThread.json @@ -0,0 +1,20 @@ +{ + "lexicon": 1, + "id": "app.bsky.graph.unmuteThread", + "defs": { + "main": { + "type": "procedure", + "description": "Unmutes the specified thread. Requires auth.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["root"], + "properties": { + "root": { "type": "string", "format": "at-uri" } + } + } + } + } + } +} diff --git a/lexicons/app/bsky/graph/verification.json b/lexicons/app/bsky/graph/verification.json new file mode 100644 index 0000000000..407da18e19 --- /dev/null +++ b/lexicons/app/bsky/graph/verification.json @@ -0,0 +1,36 @@ +{ + "lexicon": 1, + "id": "app.bsky.graph.verification", + "defs": { + "main": { + "type": "record", + "description": "Record declaring a verification relationship between two accounts. Verifications are only considered valid by an app if issued by an account the app considers trusted.", + "key": "tid", + "record": { + "type": "object", + "required": ["subject", "handle", "displayName", "createdAt"], + "properties": { + "subject": { + "description": "DID of the subject the verification applies to.", + "type": "string", + "format": "did" + }, + "handle": { + "description": "Handle of the subject the verification applies to at the moment of verifying, which might not be the same at the time of viewing. The verification is only valid if the current handle matches the one at the time of verifying.", + "type": "string", + "format": "handle" + }, + "displayName": { + "description": "Display name of the subject the verification applies to at the moment of verifying, which might not be the same at the time of viewing. The verification is only valid if the current displayName matches the one at the time of verifying.", + "type": "string" + }, + "createdAt": { + "description": "Date of when the verification was created.", + "type": "string", + "format": "datetime" + } + } + } + } + } +} diff --git a/lexicons/app/bsky/labeler/defs.json b/lexicons/app/bsky/labeler/defs.json new file mode 100644 index 0000000000..b9ef360805 --- /dev/null +++ b/lexicons/app/bsky/labeler/defs.json @@ -0,0 +1,91 @@ +{ + "lexicon": 1, + "id": "app.bsky.labeler.defs", + "defs": { + "labelerView": { + "type": "object", + "required": ["uri", "cid", "creator", "indexedAt"], + "properties": { + "uri": { "type": "string", "format": "at-uri" }, + "cid": { "type": "string", "format": "cid" }, + "creator": { "type": "ref", "ref": "app.bsky.actor.defs#profileView" }, + "likeCount": { "type": "integer", "minimum": 0 }, + "viewer": { "type": "ref", "ref": "#labelerViewerState" }, + "indexedAt": { "type": "string", "format": "datetime" }, + "labels": { + "type": "array", + "items": { "type": "ref", "ref": "com.atproto.label.defs#label" } + } + } + }, + "labelerViewDetailed": { + "type": "object", + "required": ["uri", "cid", "creator", "policies", "indexedAt"], + "properties": { + "uri": { "type": "string", "format": "at-uri" }, + "cid": { "type": "string", "format": "cid" }, + "creator": { "type": "ref", "ref": "app.bsky.actor.defs#profileView" }, + "policies": { + "type": "ref", + "ref": "app.bsky.labeler.defs#labelerPolicies" + }, + "likeCount": { "type": "integer", "minimum": 0 }, + "viewer": { "type": "ref", "ref": "#labelerViewerState" }, + "indexedAt": { "type": "string", "format": "datetime" }, + "labels": { + "type": "array", + "items": { "type": "ref", "ref": "com.atproto.label.defs#label" } + }, + "reasonTypes": { + "description": "The set of report reason 'codes' which are in-scope for this service to review and action. These usually align to policy categories. If not defined (distinct from empty array), all reason types are allowed.", + "type": "array", + "items": { + "type": "ref", + "ref": "com.atproto.moderation.defs#reasonType" + } + }, + "subjectTypes": { + "description": "The set of subject types (account, record, etc) this service accepts reports on.", + "type": "array", + "items": { + "type": "ref", + "ref": "com.atproto.moderation.defs#subjectType" + } + }, + "subjectCollections": { + "type": "array", + "description": "Set of record types (collection NSIDs) which can be reported to this service. If not defined (distinct from empty array), default is any record type.", + "items": { "type": "string", "format": "nsid" } + } + } + }, + "labelerViewerState": { + "type": "object", + "properties": { + "like": { "type": "string", "format": "at-uri" } + } + }, + "labelerPolicies": { + "type": "object", + "required": ["labelValues"], + "properties": { + "labelValues": { + "type": "array", + "description": "The label values which this labeler publishes. May include global or custom labels.", + "items": { + "type": "ref", + "ref": "com.atproto.label.defs#labelValue" + } + }, + "labelValueDefinitions": { + "type": "array", + "description": "Label values created by this labeler and scoped exclusively to it. Labels defined here will override global label definitions for this labeler.", + "items": { + "type": "ref", + "ref": "com.atproto.label.defs#labelValueDefinition" + } + } + } + } + } +} diff --git a/lexicons/app/bsky/labeler/getServices.json b/lexicons/app/bsky/labeler/getServices.json new file mode 100644 index 0000000000..df6844e618 --- /dev/null +++ b/lexicons/app/bsky/labeler/getServices.json @@ -0,0 +1,43 @@ +{ + "lexicon": 1, + "id": "app.bsky.labeler.getServices", + "defs": { + "main": { + "type": "query", + "description": "Get information about a list of labeler services.", + "parameters": { + "type": "params", + "required": ["dids"], + "properties": { + "dids": { + "type": "array", + "items": { "type": "string", "format": "did" } + }, + "detailed": { + "type": "boolean", + "default": false + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["views"], + "properties": { + "views": { + "type": "array", + "items": { + "type": "union", + "refs": [ + "app.bsky.labeler.defs#labelerView", + "app.bsky.labeler.defs#labelerViewDetailed" + ] + } + } + } + } + } + } + } +} diff --git a/lexicons/app/bsky/labeler/service.json b/lexicons/app/bsky/labeler/service.json new file mode 100644 index 0000000000..becf1a12b2 --- /dev/null +++ b/lexicons/app/bsky/labeler/service.json @@ -0,0 +1,47 @@ +{ + "lexicon": 1, + "id": "app.bsky.labeler.service", + "defs": { + "main": { + "type": "record", + "description": "A declaration of the existence of labeler service.", + "key": "literal:self", + "record": { + "type": "object", + "required": ["policies", "createdAt"], + "properties": { + "policies": { + "type": "ref", + "ref": "app.bsky.labeler.defs#labelerPolicies" + }, + "labels": { + "type": "union", + "refs": ["com.atproto.label.defs#selfLabels"] + }, + "createdAt": { "type": "string", "format": "datetime" }, + "reasonTypes": { + "description": "The set of report reason 'codes' which are in-scope for this service to review and action. These usually align to policy categories. If not defined (distinct from empty array), all reason types are allowed.", + "type": "array", + "items": { + "type": "ref", + "ref": "com.atproto.moderation.defs#reasonType" + } + }, + "subjectTypes": { + "description": "The set of subject types (account, record, etc) this service accepts reports on.", + "type": "array", + "items": { + "type": "ref", + "ref": "com.atproto.moderation.defs#subjectType" + } + }, + "subjectCollections": { + "type": "array", + "description": "Set of record types (collection NSIDs) which can be reported to this service. If not defined (distinct from empty array), default is any record type.", + "items": { "type": "string", "format": "nsid" } + } + } + } + } + } +} diff --git a/lexicons/app/bsky/notification/defs.json b/lexicons/app/bsky/notification/defs.json new file mode 100644 index 0000000000..6a64d8c6f4 --- /dev/null +++ b/lexicons/app/bsky/notification/defs.json @@ -0,0 +1,10 @@ +{ + "lexicon": 1, + "id": "app.bsky.notification.defs", + "defs": { + "recordDeleted": { + "type": "object", + "properties": {} + } + } +} diff --git a/lexicons/app/bsky/notification/getUnreadCount.json b/lexicons/app/bsky/notification/getUnreadCount.json new file mode 100644 index 0000000000..c5e2df177e --- /dev/null +++ b/lexicons/app/bsky/notification/getUnreadCount.json @@ -0,0 +1,27 @@ +{ + "lexicon": 1, + "id": "app.bsky.notification.getUnreadCount", + "defs": { + "main": { + "type": "query", + "description": "Count the number of unread notifications for the requesting account. Requires auth.", + "parameters": { + "type": "params", + "properties": { + "priority": { "type": "boolean" }, + "seenAt": { "type": "string", "format": "datetime" } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["count"], + "properties": { + "count": { "type": "integer" } + } + } + } + } + } +} diff --git a/lexicons/app/bsky/notification/listNotifications.json b/lexicons/app/bsky/notification/listNotifications.json new file mode 100644 index 0000000000..0325d1bfca --- /dev/null +++ b/lexicons/app/bsky/notification/listNotifications.json @@ -0,0 +1,88 @@ +{ + "lexicon": 1, + "id": "app.bsky.notification.listNotifications", + "defs": { + "main": { + "type": "query", + "description": "Enumerate notifications for the requesting account. Requires auth.", + "parameters": { + "type": "params", + "properties": { + "reasons": { + "description": "Notification reasons to include in response.", + "type": "array", + "items": { + "type": "string", + "description": "A reason that matches the reason property of #notification." + } + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50 + }, + "priority": { "type": "boolean" }, + "cursor": { "type": "string" }, + "seenAt": { "type": "string", "format": "datetime" } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["notifications"], + "properties": { + "cursor": { "type": "string" }, + "notifications": { + "type": "array", + "items": { "type": "ref", "ref": "#notification" } + }, + "priority": { "type": "boolean" }, + "seenAt": { "type": "string", "format": "datetime" } + } + } + } + }, + "notification": { + "type": "object", + "required": [ + "uri", + "cid", + "author", + "reason", + "record", + "isRead", + "indexedAt" + ], + "properties": { + "uri": { "type": "string", "format": "at-uri" }, + "cid": { "type": "string", "format": "cid" }, + "author": { "type": "ref", "ref": "app.bsky.actor.defs#profileView" }, + "reason": { + "type": "string", + "description": "Expected values are 'like', 'repost', 'follow', 'mention', 'reply', 'quote', 'starterpack-joined', 'verified', and 'unverified'.", + "knownValues": [ + "like", + "repost", + "follow", + "mention", + "reply", + "quote", + "starterpack-joined", + "verified", + "unverified" + ] + }, + "reasonSubject": { "type": "string", "format": "at-uri" }, + "record": { "type": "unknown" }, + "isRead": { "type": "boolean" }, + "indexedAt": { "type": "string", "format": "datetime" }, + "labels": { + "type": "array", + "items": { "type": "ref", "ref": "com.atproto.label.defs#label" } + } + } + } + } +} diff --git a/lexicons/app/bsky/notification/putPreferences.json b/lexicons/app/bsky/notification/putPreferences.json new file mode 100644 index 0000000000..65ae024fa7 --- /dev/null +++ b/lexicons/app/bsky/notification/putPreferences.json @@ -0,0 +1,20 @@ +{ + "lexicon": 1, + "id": "app.bsky.notification.putPreferences", + "defs": { + "main": { + "type": "procedure", + "description": "Set notification-related preferences for an account. Requires auth.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["priority"], + "properties": { + "priority": { "type": "boolean" } + } + } + } + } + } +} diff --git a/lexicons/app/bsky/notification/registerPush.json b/lexicons/app/bsky/notification/registerPush.json new file mode 100644 index 0000000000..c4e50d1108 --- /dev/null +++ b/lexicons/app/bsky/notification/registerPush.json @@ -0,0 +1,26 @@ +{ + "lexicon": 1, + "id": "app.bsky.notification.registerPush", + "defs": { + "main": { + "type": "procedure", + "description": "Register to receive push notifications, via a specified service, for the requesting account. Requires auth.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["serviceDid", "token", "platform", "appId"], + "properties": { + "serviceDid": { "type": "string", "format": "did" }, + "token": { "type": "string" }, + "platform": { + "type": "string", + "knownValues": ["ios", "android", "web"] + }, + "appId": { "type": "string" } + } + } + } + } + } +} diff --git a/lexicons/app/bsky/notification/updateSeen.json b/lexicons/app/bsky/notification/updateSeen.json new file mode 100644 index 0000000000..84bb0e7d52 --- /dev/null +++ b/lexicons/app/bsky/notification/updateSeen.json @@ -0,0 +1,20 @@ +{ + "lexicon": 1, + "id": "app.bsky.notification.updateSeen", + "defs": { + "main": { + "type": "procedure", + "description": "Notify server that the requesting account has seen notifications. Requires auth.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["seenAt"], + "properties": { + "seenAt": { "type": "string", "format": "datetime" } + } + } + } + } + } +} diff --git a/lexicons/app/bsky/richtext/facet.json b/lexicons/app/bsky/richtext/facet.json new file mode 100644 index 0000000000..388a3a5e0e --- /dev/null +++ b/lexicons/app/bsky/richtext/facet.json @@ -0,0 +1,51 @@ +{ + "lexicon": 1, + "id": "app.bsky.richtext.facet", + "defs": { + "main": { + "type": "object", + "description": "Annotation of a sub-string within rich text.", + "required": ["index", "features"], + "properties": { + "index": { "type": "ref", "ref": "#byteSlice" }, + "features": { + "type": "array", + "items": { "type": "union", "refs": ["#mention", "#link", "#tag"] } + } + } + }, + "mention": { + "type": "object", + "description": "Facet feature for mention of another account. The text is usually a handle, including a '@' prefix, but the facet reference is a DID.", + "required": ["did"], + "properties": { + "did": { "type": "string", "format": "did" } + } + }, + "link": { + "type": "object", + "description": "Facet feature for a URL. The text URL may have been simplified or truncated, but the facet reference should be a complete URL.", + "required": ["uri"], + "properties": { + "uri": { "type": "string", "format": "uri" } + } + }, + "tag": { + "type": "object", + "description": "Facet feature for a hashtag. The text usually includes a '#' prefix, but the facet reference should not (except in the case of 'double hash tags').", + "required": ["tag"], + "properties": { + "tag": { "type": "string", "maxLength": 640, "maxGraphemes": 64 } + } + }, + "byteSlice": { + "type": "object", + "description": "Specifies the sub-string range a facet feature applies to. Start index is inclusive, end index is exclusive. Indices are zero-indexed, counting bytes of the UTF-8 encoded text. NOTE: some languages, like Javascript, use UTF-16 or Unicode codepoints for string slice indexing; in these languages, convert to byte arrays before working with facets.", + "required": ["byteStart", "byteEnd"], + "properties": { + "byteStart": { "type": "integer", "minimum": 0 }, + "byteEnd": { "type": "integer", "minimum": 0 } + } + } + } +} diff --git a/lexicons/app/bsky/unspecced/defs.json b/lexicons/app/bsky/unspecced/defs.json new file mode 100644 index 0000000000..6272e13008 --- /dev/null +++ b/lexicons/app/bsky/unspecced/defs.json @@ -0,0 +1,91 @@ +{ + "lexicon": 1, + "id": "app.bsky.unspecced.defs", + "defs": { + "skeletonSearchPost": { + "type": "object", + "required": ["uri"], + "properties": { + "uri": { "type": "string", "format": "at-uri" } + } + }, + "skeletonSearchActor": { + "type": "object", + "required": ["did"], + "properties": { + "did": { "type": "string", "format": "did" } + } + }, + "skeletonSearchStarterPack": { + "type": "object", + "required": ["uri"], + "properties": { + "uri": { "type": "string", "format": "at-uri" } + } + }, + "trendingTopic": { + "type": "object", + "required": ["topic", "link"], + "properties": { + "topic": { "type": "string" }, + "displayName": { "type": "string" }, + "description": { "type": "string" }, + "link": { "type": "string" } + } + }, + "skeletonTrend": { + "type": "object", + "required": [ + "topic", + "displayName", + "link", + "startedAt", + "postCount", + "dids" + ], + "properties": { + "topic": { "type": "string" }, + "displayName": { "type": "string" }, + "link": { "type": "string" }, + "startedAt": { "type": "string", "format": "datetime" }, + "postCount": { "type": "integer" }, + "status": { "type": "string", "knownValues": ["hot"] }, + "category": { "type": "string" }, + "dids": { + "type": "array", + "items": { + "type": "string", + "format": "did" + } + } + } + }, + "trendView": { + "type": "object", + "required": [ + "topic", + "displayName", + "link", + "startedAt", + "postCount", + "actors" + ], + "properties": { + "topic": { "type": "string" }, + "displayName": { "type": "string" }, + "link": { "type": "string" }, + "startedAt": { "type": "string", "format": "datetime" }, + "postCount": { "type": "integer" }, + "status": { "type": "string", "knownValues": ["hot"] }, + "category": { "type": "string" }, + "actors": { + "type": "array", + "items": { + "type": "ref", + "ref": "app.bsky.actor.defs#profileViewBasic" + } + } + } + } + } +} diff --git a/lexicons/app/bsky/unspecced/getConfig.json b/lexicons/app/bsky/unspecced/getConfig.json new file mode 100644 index 0000000000..d239a86675 --- /dev/null +++ b/lexicons/app/bsky/unspecced/getConfig.json @@ -0,0 +1,20 @@ +{ + "lexicon": 1, + "id": "app.bsky.unspecced.getConfig", + "defs": { + "main": { + "type": "query", + "description": "Get miscellaneous runtime configuration.", + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [], + "properties": { + "checkEmailConfirmed": { "type": "boolean" } + } + } + } + } + } +} diff --git a/lexicons/app/bsky/unspecced/getPopularFeedGenerators.json b/lexicons/app/bsky/unspecced/getPopularFeedGenerators.json new file mode 100644 index 0000000000..ee05c16a1c --- /dev/null +++ b/lexicons/app/bsky/unspecced/getPopularFeedGenerators.json @@ -0,0 +1,40 @@ +{ + "lexicon": 1, + "id": "app.bsky.unspecced.getPopularFeedGenerators", + "defs": { + "main": { + "type": "query", + "description": "An unspecced view of globally popular feed generators.", + "parameters": { + "type": "params", + "properties": { + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50 + }, + "cursor": { "type": "string" }, + "query": { "type": "string" } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["feeds"], + "properties": { + "cursor": { "type": "string" }, + "feeds": { + "type": "array", + "items": { + "type": "ref", + "ref": "app.bsky.feed.defs#generatorView" + } + } + } + } + } + } + } +} diff --git a/lexicons/app/bsky/unspecced/getSuggestedFeeds.json b/lexicons/app/bsky/unspecced/getSuggestedFeeds.json new file mode 100644 index 0000000000..1a723a0bbb --- /dev/null +++ b/lexicons/app/bsky/unspecced/getSuggestedFeeds.json @@ -0,0 +1,37 @@ +{ + "lexicon": 1, + "id": "app.bsky.unspecced.getSuggestedFeeds", + "defs": { + "main": { + "type": "query", + "description": "Get a list of suggested feeds", + "parameters": { + "type": "params", + "properties": { + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 25, + "default": 10 + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["feeds"], + "properties": { + "feeds": { + "type": "array", + "items": { + "type": "ref", + "ref": "app.bsky.feed.defs#generatorView" + } + } + } + } + } + } + } +} diff --git a/lexicons/app/bsky/unspecced/getSuggestedFeedsSkeleton.json b/lexicons/app/bsky/unspecced/getSuggestedFeedsSkeleton.json new file mode 100644 index 0000000000..c0b72da680 --- /dev/null +++ b/lexicons/app/bsky/unspecced/getSuggestedFeedsSkeleton.json @@ -0,0 +1,42 @@ +{ + "lexicon": 1, + "id": "app.bsky.unspecced.getSuggestedFeedsSkeleton", + "defs": { + "main": { + "type": "query", + "description": "Get a skeleton of suggested feeds. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedFeeds", + "parameters": { + "type": "params", + "properties": { + "viewer": { + "type": "string", + "format": "did", + "description": "DID of the account making the request (not included for public/unauthenticated queries)." + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 25, + "default": 10 + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["feeds"], + "properties": { + "feeds": { + "type": "array", + "items": { + "type": "string", + "format": "at-uri" + } + } + } + } + } + } + } +} diff --git a/lexicons/app/bsky/unspecced/getSuggestedStarterPacks.json b/lexicons/app/bsky/unspecced/getSuggestedStarterPacks.json new file mode 100644 index 0000000000..d4bdd22643 --- /dev/null +++ b/lexicons/app/bsky/unspecced/getSuggestedStarterPacks.json @@ -0,0 +1,37 @@ +{ + "lexicon": 1, + "id": "app.bsky.unspecced.getSuggestedStarterPacks", + "defs": { + "main": { + "type": "query", + "description": "Get a list of suggested starterpacks", + "parameters": { + "type": "params", + "properties": { + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 25, + "default": 10 + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["starterPacks"], + "properties": { + "starterPacks": { + "type": "array", + "items": { + "type": "ref", + "ref": "app.bsky.graph.defs#starterPackView" + } + } + } + } + } + } + } +} diff --git a/lexicons/app/bsky/unspecced/getSuggestedStarterPacksSkeleton.json b/lexicons/app/bsky/unspecced/getSuggestedStarterPacksSkeleton.json new file mode 100644 index 0000000000..cf5d88e060 --- /dev/null +++ b/lexicons/app/bsky/unspecced/getSuggestedStarterPacksSkeleton.json @@ -0,0 +1,42 @@ +{ + "lexicon": 1, + "id": "app.bsky.unspecced.getSuggestedStarterPacksSkeleton", + "defs": { + "main": { + "type": "query", + "description": "Get a skeleton of suggested starterpacks. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedStarterpacks", + "parameters": { + "type": "params", + "properties": { + "viewer": { + "type": "string", + "format": "did", + "description": "DID of the account making the request (not included for public/unauthenticated queries)." + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 25, + "default": 10 + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["starterPacks"], + "properties": { + "starterPacks": { + "type": "array", + "items": { + "type": "string", + "format": "at-uri" + } + } + } + } + } + } + } +} diff --git a/lexicons/app/bsky/unspecced/getSuggestedUsers.json b/lexicons/app/bsky/unspecced/getSuggestedUsers.json new file mode 100644 index 0000000000..7a685387af --- /dev/null +++ b/lexicons/app/bsky/unspecced/getSuggestedUsers.json @@ -0,0 +1,41 @@ +{ + "lexicon": 1, + "id": "app.bsky.unspecced.getSuggestedUsers", + "defs": { + "main": { + "type": "query", + "description": "Get a list of suggested users", + "parameters": { + "type": "params", + "properties": { + "category": { + "type": "string", + "description": "Category of users to get suggestions for." + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 50, + "default": 25 + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["actors"], + "properties": { + "actors": { + "type": "array", + "items": { + "type": "ref", + "ref": "app.bsky.actor.defs#profileView" + } + } + } + } + } + } + } +} diff --git a/lexicons/app/bsky/unspecced/getSuggestedUsersSkeleton.json b/lexicons/app/bsky/unspecced/getSuggestedUsersSkeleton.json new file mode 100644 index 0000000000..d442562132 --- /dev/null +++ b/lexicons/app/bsky/unspecced/getSuggestedUsersSkeleton.json @@ -0,0 +1,46 @@ +{ + "lexicon": 1, + "id": "app.bsky.unspecced.getSuggestedUsersSkeleton", + "defs": { + "main": { + "type": "query", + "description": "Get a skeleton of suggested users. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedUsers", + "parameters": { + "type": "params", + "properties": { + "viewer": { + "type": "string", + "format": "did", + "description": "DID of the account making the request (not included for public/unauthenticated queries)." + }, + "category": { + "type": "string", + "description": "Category of users to get suggestions for." + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 50, + "default": 25 + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["dids"], + "properties": { + "dids": { + "type": "array", + "items": { + "type": "string", + "format": "did" + } + } + } + } + } + } + } +} diff --git a/lexicons/app/bsky/unspecced/getSuggestionsSkeleton.json b/lexicons/app/bsky/unspecced/getSuggestionsSkeleton.json new file mode 100644 index 0000000000..658f2a11b2 --- /dev/null +++ b/lexicons/app/bsky/unspecced/getSuggestionsSkeleton.json @@ -0,0 +1,58 @@ +{ + "lexicon": 1, + "id": "app.bsky.unspecced.getSuggestionsSkeleton", + "defs": { + "main": { + "type": "query", + "description": "Get a skeleton of suggested actors. Intended to be called and then hydrated through app.bsky.actor.getSuggestions", + "parameters": { + "type": "params", + "properties": { + "viewer": { + "type": "string", + "format": "did", + "description": "DID of the account making the request (not included for public/unauthenticated queries). Used to boost followed accounts in ranking." + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50 + }, + "cursor": { "type": "string" }, + "relativeToDid": { + "type": "string", + "format": "did", + "description": "DID of the account to get suggestions relative to. If not provided, suggestions will be based on the viewer." + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["actors"], + "properties": { + "cursor": { "type": "string" }, + "actors": { + "type": "array", + "items": { + "type": "ref", + "ref": "app.bsky.unspecced.defs#skeletonSearchActor" + } + }, + "relativeToDid": { + "type": "string", + "format": "did", + "description": "DID of the account these suggestions are relative to. If this is returned undefined, suggestions are based on the viewer." + }, + "recId": { + "type": "integer", + "description": "Snowflake for this recommendation, use when submitting recommendation events." + } + } + } + } + } + } +} diff --git a/lexicons/app/bsky/unspecced/getTaggedSuggestions.json b/lexicons/app/bsky/unspecced/getTaggedSuggestions.json new file mode 100644 index 0000000000..9fd98ffefb --- /dev/null +++ b/lexicons/app/bsky/unspecced/getTaggedSuggestions.json @@ -0,0 +1,42 @@ +{ + "lexicon": 1, + "id": "app.bsky.unspecced.getTaggedSuggestions", + "defs": { + "main": { + "type": "query", + "description": "Get a list of suggestions (feeds and users) tagged with categories", + "parameters": { + "type": "params", + "properties": {} + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["suggestions"], + "properties": { + "suggestions": { + "type": "array", + "items": { + "type": "ref", + "ref": "#suggestion" + } + } + } + } + } + }, + "suggestion": { + "type": "object", + "required": ["tag", "subjectType", "subject"], + "properties": { + "tag": { "type": "string" }, + "subjectType": { + "type": "string", + "knownValues": ["actor", "feed"] + }, + "subject": { "type": "string", "format": "uri" } + } + } + } +} diff --git a/lexicons/app/bsky/unspecced/getTrendingTopics.json b/lexicons/app/bsky/unspecced/getTrendingTopics.json new file mode 100644 index 0000000000..097dc1c54d --- /dev/null +++ b/lexicons/app/bsky/unspecced/getTrendingTopics.json @@ -0,0 +1,49 @@ +{ + "lexicon": 1, + "id": "app.bsky.unspecced.getTrendingTopics", + "defs": { + "main": { + "type": "query", + "description": "Get a list of trending topics", + "parameters": { + "type": "params", + "properties": { + "viewer": { + "type": "string", + "format": "did", + "description": "DID of the account making the request (not included for public/unauthenticated queries). Used to boost followed accounts in ranking." + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 25, + "default": 10 + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["topics", "suggested"], + "properties": { + "topics": { + "type": "array", + "items": { + "type": "ref", + "ref": "app.bsky.unspecced.defs#trendingTopic" + } + }, + "suggested": { + "type": "array", + "items": { + "type": "ref", + "ref": "app.bsky.unspecced.defs#trendingTopic" + } + } + } + } + } + } + } +} diff --git a/lexicons/app/bsky/unspecced/getTrends.json b/lexicons/app/bsky/unspecced/getTrends.json new file mode 100644 index 0000000000..1c114218a4 --- /dev/null +++ b/lexicons/app/bsky/unspecced/getTrends.json @@ -0,0 +1,37 @@ +{ + "lexicon": 1, + "id": "app.bsky.unspecced.getTrends", + "defs": { + "main": { + "type": "query", + "description": "Get the current trends on the network", + "parameters": { + "type": "params", + "properties": { + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 25, + "default": 10 + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["trends"], + "properties": { + "trends": { + "type": "array", + "items": { + "type": "ref", + "ref": "app.bsky.unspecced.defs#trendView" + } + } + } + } + } + } + } +} diff --git a/lexicons/app/bsky/unspecced/getTrendsSkeleton.json b/lexicons/app/bsky/unspecced/getTrendsSkeleton.json new file mode 100644 index 0000000000..d0b6272bb6 --- /dev/null +++ b/lexicons/app/bsky/unspecced/getTrendsSkeleton.json @@ -0,0 +1,42 @@ +{ + "lexicon": 1, + "id": "app.bsky.unspecced.getTrendsSkeleton", + "defs": { + "main": { + "type": "query", + "description": "Get the skeleton of trends on the network. Intended to be called and then hydrated through app.bsky.unspecced.getTrends", + "parameters": { + "type": "params", + "properties": { + "viewer": { + "type": "string", + "format": "did", + "description": "DID of the account making the request (not included for public/unauthenticated queries)." + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 25, + "default": 10 + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["trends"], + "properties": { + "trends": { + "type": "array", + "items": { + "type": "ref", + "ref": "app.bsky.unspecced.defs#skeletonTrend" + } + } + } + } + } + } + } +} diff --git a/lexicons/app/bsky/unspecced/searchActorsSkeleton.json b/lexicons/app/bsky/unspecced/searchActorsSkeleton.json new file mode 100644 index 0000000000..f6489140b9 --- /dev/null +++ b/lexicons/app/bsky/unspecced/searchActorsSkeleton.json @@ -0,0 +1,61 @@ +{ + "lexicon": 1, + "id": "app.bsky.unspecced.searchActorsSkeleton", + "defs": { + "main": { + "type": "query", + "description": "Backend Actors (profile) search, returns only skeleton.", + "parameters": { + "type": "params", + "required": ["q"], + "properties": { + "q": { + "type": "string", + "description": "Search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. For typeahead search, only simple term match is supported, not full syntax." + }, + "viewer": { + "type": "string", + "format": "did", + "description": "DID of the account making the request (not included for public/unauthenticated queries). Used to boost followed accounts in ranking." + }, + "typeahead": { + "type": "boolean", + "description": "If true, acts as fast/simple 'typeahead' query." + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 25 + }, + "cursor": { + "type": "string", + "description": "Optional pagination mechanism; may not necessarily allow scrolling through entire result set." + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["actors"], + "properties": { + "cursor": { "type": "string" }, + "hitsTotal": { + "type": "integer", + "description": "Count of search hits. Optional, may be rounded/truncated, and may not be possible to paginate through all hits." + }, + "actors": { + "type": "array", + "items": { + "type": "ref", + "ref": "app.bsky.unspecced.defs#skeletonSearchActor" + } + } + } + } + }, + "errors": [{ "name": "BadQueryString" }] + } + } +} diff --git a/lexicons/app/bsky/unspecced/searchPostsSkeleton.json b/lexicons/app/bsky/unspecced/searchPostsSkeleton.json new file mode 100644 index 0000000000..3be2c1b757 --- /dev/null +++ b/lexicons/app/bsky/unspecced/searchPostsSkeleton.json @@ -0,0 +1,104 @@ +{ + "lexicon": 1, + "id": "app.bsky.unspecced.searchPostsSkeleton", + "defs": { + "main": { + "type": "query", + "description": "Backend Posts search, returns only skeleton", + "parameters": { + "type": "params", + "required": ["q"], + "properties": { + "q": { + "type": "string", + "description": "Search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended." + }, + "sort": { + "type": "string", + "knownValues": ["top", "latest"], + "default": "latest", + "description": "Specifies the ranking order of results." + }, + "since": { + "type": "string", + "description": "Filter results for posts after the indicated datetime (inclusive). Expected to use 'sortAt' timestamp, which may not match 'createdAt'. Can be a datetime, or just an ISO date (YYYY-MM-DD)." + }, + "until": { + "type": "string", + "description": "Filter results for posts before the indicated datetime (not inclusive). Expected to use 'sortAt' timestamp, which may not match 'createdAt'. Can be a datetime, or just an ISO date (YYY-MM-DD)." + }, + "mentions": { + "type": "string", + "format": "at-identifier", + "description": "Filter to posts which mention the given account. Handles are resolved to DID before query-time. Only matches rich-text facet mentions." + }, + "author": { + "type": "string", + "format": "at-identifier", + "description": "Filter to posts by the given account. Handles are resolved to DID before query-time." + }, + "lang": { + "type": "string", + "format": "language", + "description": "Filter to posts in the given language. Expected to be based on post language field, though server may override language detection." + }, + "domain": { + "type": "string", + "description": "Filter to posts with URLs (facet links or embeds) linking to the given domain (hostname). Server may apply hostname normalization." + }, + "url": { + "type": "string", + "format": "uri", + "description": "Filter to posts with links (facet links or embeds) pointing to this URL. Server may apply URL normalization or fuzzy matching." + }, + "tag": { + "type": "array", + "items": { + "type": "string", + "maxLength": 640, + "maxGraphemes": 64 + }, + "description": "Filter to posts with the given tag (hashtag), based on rich-text facet or tag field. Do not include the hash (#) prefix. Multiple tags can be specified, with 'AND' matching." + }, + "viewer": { + "type": "string", + "format": "did", + "description": "DID of the account making the request (not included for public/unauthenticated queries). Used for 'from:me' queries." + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 25 + }, + "cursor": { + "type": "string", + "description": "Optional pagination mechanism; may not necessarily allow scrolling through entire result set." + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["posts"], + "properties": { + "cursor": { "type": "string" }, + "hitsTotal": { + "type": "integer", + "description": "Count of search hits. Optional, may be rounded/truncated, and may not be possible to paginate through all hits." + }, + "posts": { + "type": "array", + "items": { + "type": "ref", + "ref": "app.bsky.unspecced.defs#skeletonSearchPost" + } + } + } + } + }, + "errors": [{ "name": "BadQueryString" }] + } + } +} diff --git a/lexicons/app/bsky/unspecced/searchStarterPacksSkeleton.json b/lexicons/app/bsky/unspecced/searchStarterPacksSkeleton.json new file mode 100644 index 0000000000..80c1b88179 --- /dev/null +++ b/lexicons/app/bsky/unspecced/searchStarterPacksSkeleton.json @@ -0,0 +1,63 @@ +{ + "lexicon": 1, + "id": "app.bsky.unspecced.searchStarterPacksSkeleton", + "defs": { + "main": { + "type": "query", + "description": "Backend Starter Pack search, returns only skeleton.", + "parameters": { + "type": "params", + "required": ["q"], + "properties": { + "q": { + "type": "string", + "description": "Search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended." + }, + "viewer": { + "type": "string", + "format": "did", + "description": "DID of the account making the request (not included for public/unauthenticated queries)." + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 25 + }, + "cursor": { + "type": "string", + "description": "Optional pagination mechanism; may not necessarily allow scrolling through entire result set." + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["starterPacks"], + "properties": { + "cursor": { + "type": "string" + }, + "hitsTotal": { + "type": "integer", + "description": "Count of search hits. Optional, may be rounded/truncated, and may not be possible to paginate through all hits." + }, + "starterPacks": { + "type": "array", + "items": { + "type": "ref", + "ref": "app.bsky.unspecced.defs#skeletonSearchStarterPack" + } + } + } + } + }, + "errors": [ + { + "name": "BadQueryString" + } + ] + } + } +} diff --git a/lexicons/app/bsky/video/defs.json b/lexicons/app/bsky/video/defs.json new file mode 100644 index 0000000000..8c846ccbc9 --- /dev/null +++ b/lexicons/app/bsky/video/defs.json @@ -0,0 +1,28 @@ +{ + "lexicon": 1, + "id": "app.bsky.video.defs", + "defs": { + "jobStatus": { + "type": "object", + "required": ["jobId", "did", "state"], + "properties": { + "jobId": { "type": "string" }, + "did": { "type": "string", "format": "did" }, + "state": { + "type": "string", + "description": "The state of the video processing job. All values not listed as a known value indicate that the job is in process.", + "knownValues": ["JOB_STATE_COMPLETED", "JOB_STATE_FAILED"] + }, + "progress": { + "type": "integer", + "minimum": 0, + "maximum": 100, + "description": "Progress within the current processing state." + }, + "blob": { "type": "blob" }, + "error": { "type": "string" }, + "message": { "type": "string" } + } + } + } +} diff --git a/lexicons/app/bsky/video/getJobStatus.json b/lexicons/app/bsky/video/getJobStatus.json new file mode 100644 index 0000000000..ff3076f2a0 --- /dev/null +++ b/lexicons/app/bsky/video/getJobStatus.json @@ -0,0 +1,32 @@ +{ + "lexicon": 1, + "id": "app.bsky.video.getJobStatus", + "defs": { + "main": { + "type": "query", + "description": "Get status details for a video processing job.", + "parameters": { + "type": "params", + "required": ["jobId"], + "properties": { + "jobId": { + "type": "string" + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["jobStatus"], + "properties": { + "jobStatus": { + "type": "ref", + "ref": "app.bsky.video.defs#jobStatus" + } + } + } + } + } + } +} diff --git a/lexicons/app/bsky/video/getUploadLimits.json b/lexicons/app/bsky/video/getUploadLimits.json new file mode 100644 index 0000000000..bcba18e5ef --- /dev/null +++ b/lexicons/app/bsky/video/getUploadLimits.json @@ -0,0 +1,24 @@ +{ + "lexicon": 1, + "id": "app.bsky.video.getUploadLimits", + "defs": { + "main": { + "type": "query", + "description": "Get video upload limits for the authenticated user.", + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["canUpload"], + "properties": { + "canUpload": { "type": "boolean" }, + "remainingDailyVideos": { "type": "integer" }, + "remainingDailyBytes": { "type": "integer" }, + "message": { "type": "string" }, + "error": { "type": "string" } + } + } + } + } + } +} diff --git a/lexicons/app/bsky/video/uploadVideo.json b/lexicons/app/bsky/video/uploadVideo.json new file mode 100644 index 0000000000..8ffc26462d --- /dev/null +++ b/lexicons/app/bsky/video/uploadVideo.json @@ -0,0 +1,26 @@ +{ + "lexicon": 1, + "id": "app.bsky.video.uploadVideo", + "defs": { + "main": { + "type": "procedure", + "description": "Upload a video to be processed then stored on the PDS.", + "input": { + "encoding": "video/mp4" + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["jobStatus"], + "properties": { + "jobStatus": { + "type": "ref", + "ref": "app.bsky.video.defs#jobStatus" + } + } + } + } + } + } +} diff --git a/lexicons/chat/bsky/actor/declaration.json b/lexicons/chat/bsky/actor/declaration.json new file mode 100644 index 0000000000..9f2ae0d76f --- /dev/null +++ b/lexicons/chat/bsky/actor/declaration.json @@ -0,0 +1,21 @@ +{ + "lexicon": 1, + "id": "chat.bsky.actor.declaration", + "defs": { + "main": { + "type": "record", + "description": "A declaration of a Bluesky chat account.", + "key": "literal:self", + "record": { + "type": "object", + "required": ["allowIncoming"], + "properties": { + "allowIncoming": { + "type": "string", + "knownValues": ["all", "none", "following"] + } + } + } + } + } +} diff --git a/lexicons/chat/bsky/actor/defs.json b/lexicons/chat/bsky/actor/defs.json new file mode 100644 index 0000000000..fe564beb3b --- /dev/null +++ b/lexicons/chat/bsky/actor/defs.json @@ -0,0 +1,37 @@ +{ + "lexicon": 1, + "id": "chat.bsky.actor.defs", + "defs": { + "profileViewBasic": { + "type": "object", + "required": ["did", "handle"], + "properties": { + "did": { "type": "string", "format": "did" }, + "handle": { "type": "string", "format": "handle" }, + "displayName": { + "type": "string", + "maxGraphemes": 64, + "maxLength": 640 + }, + "avatar": { "type": "string", "format": "uri" }, + "associated": { + "type": "ref", + "ref": "app.bsky.actor.defs#profileAssociated" + }, + "viewer": { "type": "ref", "ref": "app.bsky.actor.defs#viewerState" }, + "labels": { + "type": "array", + "items": { "type": "ref", "ref": "com.atproto.label.defs#label" } + }, + "chatDisabled": { + "type": "boolean", + "description": "Set to true when the actor cannot actively participate in conversations" + }, + "verification": { + "type": "ref", + "ref": "app.bsky.actor.defs#verificationState" + } + } + } + } +} diff --git a/lexicons/chat/bsky/actor/deleteAccount.json b/lexicons/chat/bsky/actor/deleteAccount.json new file mode 100644 index 0000000000..115508157b --- /dev/null +++ b/lexicons/chat/bsky/actor/deleteAccount.json @@ -0,0 +1,16 @@ +{ + "lexicon": 1, + "id": "chat.bsky.actor.deleteAccount", + "defs": { + "main": { + "type": "procedure", + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "properties": {} + } + } + } + } +} diff --git a/lexicons/chat/bsky/actor/exportAccountData.json b/lexicons/chat/bsky/actor/exportAccountData.json new file mode 100644 index 0000000000..9716aa8fc2 --- /dev/null +++ b/lexicons/chat/bsky/actor/exportAccountData.json @@ -0,0 +1,12 @@ +{ + "lexicon": 1, + "id": "chat.bsky.actor.exportAccountData", + "defs": { + "main": { + "type": "query", + "output": { + "encoding": "application/jsonl" + } + } + } +} diff --git a/lexicons/chat/bsky/convo/acceptConvo.json b/lexicons/chat/bsky/convo/acceptConvo.json new file mode 100644 index 0000000000..a5edbabab6 --- /dev/null +++ b/lexicons/chat/bsky/convo/acceptConvo.json @@ -0,0 +1,31 @@ +{ + "lexicon": 1, + "id": "chat.bsky.convo.acceptConvo", + "defs": { + "main": { + "type": "procedure", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["convoId"], + "properties": { + "convoId": { "type": "string" } + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "properties": { + "rev": { + "description": "Rev when the convo was accepted. If not present, the convo was already accepted.", + "type": "string" + } + } + } + } + } + } +} diff --git a/lexicons/chat/bsky/convo/addReaction.json b/lexicons/chat/bsky/convo/addReaction.json new file mode 100644 index 0000000000..e8ec68a8c9 --- /dev/null +++ b/lexicons/chat/bsky/convo/addReaction.json @@ -0,0 +1,55 @@ +{ + "lexicon": 1, + "id": "chat.bsky.convo.addReaction", + "defs": { + "main": { + "type": "procedure", + "description": "Adds an emoji reaction to a message. Requires authentication. It is idempotent, so multiple calls from the same user with the same emoji result in a single reaction.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["convoId", "messageId", "value"], + "properties": { + "convoId": { "type": "string" }, + "messageId": { "type": "string" }, + "value": { + "type": "string", + "minLength": 1, + "maxLength": 64, + "minGraphemes": 1, + "maxGraphemes": 1 + } + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["message"], + "properties": { + "message": { + "type": "ref", + "ref": "chat.bsky.convo.defs#messageView" + } + } + } + }, + "errors": [ + { + "name": "ReactionMessageDeleted", + "description": "Indicates that the message has been deleted and reactions can no longer be added/removed." + }, + { + "name": "ReactionLimitReached", + "description": "Indicates that the message has the maximum number of reactions allowed for a single user, and the requested reaction wasn't yet present. If it was already present, the request will not fail since it is idempotent." + }, + { + "name": "ReactionInvalidValue", + "description": "Indicates the value for the reaction is not acceptable. In general, this means it is not an emoji." + } + ] + } + } +} diff --git a/lexicons/chat/bsky/convo/defs.json b/lexicons/chat/bsky/convo/defs.json new file mode 100644 index 0000000000..6cbe294ac4 --- /dev/null +++ b/lexicons/chat/bsky/convo/defs.json @@ -0,0 +1,236 @@ +{ + "lexicon": 1, + "id": "chat.bsky.convo.defs", + "defs": { + "messageRef": { + "type": "object", + "required": ["did", "messageId", "convoId"], + "properties": { + "did": { "type": "string", "format": "did" }, + "convoId": { "type": "string" }, + "messageId": { "type": "string" } + } + }, + "messageInput": { + "type": "object", + "required": ["text"], + "properties": { + "text": { + "type": "string", + "maxLength": 10000, + "maxGraphemes": 1000 + }, + "facets": { + "type": "array", + "description": "Annotations of text (mentions, URLs, hashtags, etc)", + "items": { "type": "ref", "ref": "app.bsky.richtext.facet" } + }, + "embed": { + "type": "union", + "refs": ["app.bsky.embed.record"] + } + } + }, + "messageView": { + "type": "object", + "required": ["id", "rev", "text", "sender", "sentAt"], + "properties": { + "id": { "type": "string" }, + "rev": { "type": "string" }, + "text": { + "type": "string", + "maxLength": 10000, + "maxGraphemes": 1000 + }, + "facets": { + "type": "array", + "description": "Annotations of text (mentions, URLs, hashtags, etc)", + "items": { "type": "ref", "ref": "app.bsky.richtext.facet" } + }, + "embed": { + "type": "union", + "refs": ["app.bsky.embed.record#view"] + }, + "reactions": { + "type": "array", + "description": "Reactions to this message, in ascending order of creation time.", + "items": { "type": "ref", "ref": "#reactionView" } + }, + "sender": { "type": "ref", "ref": "#messageViewSender" }, + "sentAt": { "type": "string", "format": "datetime" } + } + }, + "deletedMessageView": { + "type": "object", + "required": ["id", "rev", "sender", "sentAt"], + "properties": { + "id": { "type": "string" }, + "rev": { "type": "string" }, + "sender": { "type": "ref", "ref": "#messageViewSender" }, + "sentAt": { "type": "string", "format": "datetime" } + } + }, + "messageViewSender": { + "type": "object", + "required": ["did"], + "properties": { + "did": { "type": "string", "format": "did" } + } + }, + "reactionView": { + "type": "object", + "required": ["value", "sender", "createdAt"], + "properties": { + "value": { "type": "string" }, + "sender": { "type": "ref", "ref": "#reactionViewSender" }, + "createdAt": { "type": "string", "format": "datetime" } + } + }, + "reactionViewSender": { + "type": "object", + "required": ["did"], + "properties": { + "did": { "type": "string", "format": "did" } + } + }, + "messageAndReactionView": { + "type": "object", + "required": ["message", "reaction"], + "properties": { + "message": { "type": "ref", "ref": "#messageView" }, + "reaction": { "type": "ref", "ref": "#reactionView" } + } + }, + "convoView": { + "type": "object", + "required": ["id", "rev", "members", "muted", "unreadCount"], + "properties": { + "id": { "type": "string" }, + "rev": { "type": "string" }, + "members": { + "type": "array", + "items": { + "type": "ref", + "ref": "chat.bsky.actor.defs#profileViewBasic" + } + }, + "lastMessage": { + "type": "union", + "refs": ["#messageView", "#deletedMessageView"] + }, + "lastReaction": { + "type": "union", + "refs": ["#messageAndReactionView"] + }, + "muted": { "type": "boolean" }, + "status": { + "type": "string", + "knownValues": ["request", "accepted"] + }, + "unreadCount": { "type": "integer" } + } + }, + "logBeginConvo": { + "type": "object", + "required": ["rev", "convoId"], + "properties": { + "rev": { "type": "string" }, + "convoId": { "type": "string" } + } + }, + "logAcceptConvo": { + "type": "object", + "required": ["rev", "convoId"], + "properties": { + "rev": { "type": "string" }, + "convoId": { "type": "string" } + } + }, + "logLeaveConvo": { + "type": "object", + "required": ["rev", "convoId"], + "properties": { + "rev": { "type": "string" }, + "convoId": { "type": "string" } + } + }, + "logMuteConvo": { + "type": "object", + "required": ["rev", "convoId"], + "properties": { + "rev": { "type": "string" }, + "convoId": { "type": "string" } + } + }, + "logUnmuteConvo": { + "type": "object", + "required": ["rev", "convoId"], + "properties": { + "rev": { "type": "string" }, + "convoId": { "type": "string" } + } + }, + "logCreateMessage": { + "type": "object", + "required": ["rev", "convoId", "message"], + "properties": { + "rev": { "type": "string" }, + "convoId": { "type": "string" }, + "message": { + "type": "union", + "refs": ["#messageView", "#deletedMessageView"] + } + } + }, + "logDeleteMessage": { + "type": "object", + "required": ["rev", "convoId", "message"], + "properties": { + "rev": { "type": "string" }, + "convoId": { "type": "string" }, + "message": { + "type": "union", + "refs": ["#messageView", "#deletedMessageView"] + } + } + }, + "logReadMessage": { + "type": "object", + "required": ["rev", "convoId", "message"], + "properties": { + "rev": { "type": "string" }, + "convoId": { "type": "string" }, + "message": { + "type": "union", + "refs": ["#messageView", "#deletedMessageView"] + } + } + }, + "logAddReaction": { + "type": "object", + "required": ["rev", "convoId", "message", "reaction"], + "properties": { + "rev": { "type": "string" }, + "convoId": { "type": "string" }, + "message": { + "type": "union", + "refs": ["#messageView", "#deletedMessageView"] + }, + "reaction": { "type": "ref", "ref": "#reactionView" } + } + }, + "logRemoveReaction": { + "type": "object", + "required": ["rev", "convoId", "message", "reaction"], + "properties": { + "rev": { "type": "string" }, + "convoId": { "type": "string" }, + "message": { + "type": "union", + "refs": ["#messageView", "#deletedMessageView"] + }, + "reaction": { "type": "ref", "ref": "#reactionView" } + } + } + } +} diff --git a/lexicons/chat/bsky/convo/deleteMessageForSelf.json b/lexicons/chat/bsky/convo/deleteMessageForSelf.json new file mode 100644 index 0000000000..dcb814b52b --- /dev/null +++ b/lexicons/chat/bsky/convo/deleteMessageForSelf.json @@ -0,0 +1,27 @@ +{ + "lexicon": 1, + "id": "chat.bsky.convo.deleteMessageForSelf", + "defs": { + "main": { + "type": "procedure", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["convoId", "messageId"], + "properties": { + "convoId": { "type": "string" }, + "messageId": { "type": "string" } + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "ref", + "ref": "chat.bsky.convo.defs#deletedMessageView" + } + } + } + } +} diff --git a/lexicons/chat/bsky/convo/getConvo.json b/lexicons/chat/bsky/convo/getConvo.json new file mode 100644 index 0000000000..5e3e666035 --- /dev/null +++ b/lexicons/chat/bsky/convo/getConvo.json @@ -0,0 +1,29 @@ +{ + "lexicon": 1, + "id": "chat.bsky.convo.getConvo", + "defs": { + "main": { + "type": "query", + "parameters": { + "type": "params", + "required": ["convoId"], + "properties": { + "convoId": { "type": "string" } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["convo"], + "properties": { + "convo": { + "type": "ref", + "ref": "chat.bsky.convo.defs#convoView" + } + } + } + } + } + } +} diff --git a/lexicons/chat/bsky/convo/getConvoAvailability.json b/lexicons/chat/bsky/convo/getConvoAvailability.json new file mode 100644 index 0000000000..b7084f25f7 --- /dev/null +++ b/lexicons/chat/bsky/convo/getConvoAvailability.json @@ -0,0 +1,41 @@ +{ + "lexicon": 1, + "id": "chat.bsky.convo.getConvoAvailability", + "defs": { + "main": { + "type": "query", + "description": "Get whether the requester and the other members can chat. If an existing convo is found for these members, it is returned.", + "parameters": { + "type": "params", + "required": ["members"], + "properties": { + "members": { + "type": "array", + "minLength": 1, + "maxLength": 10, + "items": { + "type": "string", + "format": "did" + } + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["canChat"], + "properties": { + "canChat": { + "type": "boolean" + }, + "convo": { + "type": "ref", + "ref": "chat.bsky.convo.defs#convoView" + } + } + } + } + } + } +} diff --git a/lexicons/chat/bsky/convo/getConvoForMembers.json b/lexicons/chat/bsky/convo/getConvoForMembers.json new file mode 100644 index 0000000000..1d5d5b463f --- /dev/null +++ b/lexicons/chat/bsky/convo/getConvoForMembers.json @@ -0,0 +1,37 @@ +{ + "lexicon": 1, + "id": "chat.bsky.convo.getConvoForMembers", + "defs": { + "main": { + "type": "query", + "parameters": { + "type": "params", + "required": ["members"], + "properties": { + "members": { + "type": "array", + "minLength": 1, + "maxLength": 10, + "items": { + "type": "string", + "format": "did" + } + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["convo"], + "properties": { + "convo": { + "type": "ref", + "ref": "chat.bsky.convo.defs#convoView" + } + } + } + } + } + } +} diff --git a/lexicons/chat/bsky/convo/getLog.json b/lexicons/chat/bsky/convo/getLog.json new file mode 100644 index 0000000000..41aff351e6 --- /dev/null +++ b/lexicons/chat/bsky/convo/getLog.json @@ -0,0 +1,44 @@ +{ + "lexicon": 1, + "id": "chat.bsky.convo.getLog", + "defs": { + "main": { + "type": "query", + "parameters": { + "type": "params", + "required": [], + "properties": { + "cursor": { "type": "string" } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["logs"], + "properties": { + "cursor": { "type": "string" }, + "logs": { + "type": "array", + "items": { + "type": "union", + "refs": [ + "chat.bsky.convo.defs#logBeginConvo", + "chat.bsky.convo.defs#logAcceptConvo", + "chat.bsky.convo.defs#logLeaveConvo", + "chat.bsky.convo.defs#logMuteConvo", + "chat.bsky.convo.defs#logUnmuteConvo", + "chat.bsky.convo.defs#logCreateMessage", + "chat.bsky.convo.defs#logDeleteMessage", + "chat.bsky.convo.defs#logReadMessage", + "chat.bsky.convo.defs#logAddReaction", + "chat.bsky.convo.defs#logRemoveReaction" + ] + } + } + } + } + } + } + } +} diff --git a/lexicons/chat/bsky/convo/getMessages.json b/lexicons/chat/bsky/convo/getMessages.json new file mode 100644 index 0000000000..628e744a0f --- /dev/null +++ b/lexicons/chat/bsky/convo/getMessages.json @@ -0,0 +1,43 @@ +{ + "lexicon": 1, + "id": "chat.bsky.convo.getMessages", + "defs": { + "main": { + "type": "query", + "parameters": { + "type": "params", + "required": ["convoId"], + "properties": { + "convoId": { "type": "string" }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50 + }, + "cursor": { "type": "string" } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["messages"], + "properties": { + "cursor": { "type": "string" }, + "messages": { + "type": "array", + "items": { + "type": "union", + "refs": [ + "chat.bsky.convo.defs#messageView", + "chat.bsky.convo.defs#deletedMessageView" + ] + } + } + } + } + } + } + } +} diff --git a/lexicons/chat/bsky/convo/leaveConvo.json b/lexicons/chat/bsky/convo/leaveConvo.json new file mode 100644 index 0000000000..928e843ffa --- /dev/null +++ b/lexicons/chat/bsky/convo/leaveConvo.json @@ -0,0 +1,30 @@ +{ + "lexicon": 1, + "id": "chat.bsky.convo.leaveConvo", + "defs": { + "main": { + "type": "procedure", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["convoId"], + "properties": { + "convoId": { "type": "string" } + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["convoId", "rev"], + "properties": { + "convoId": { "type": "string" }, + "rev": { "type": "string" } + } + } + } + } + } +} diff --git a/lexicons/chat/bsky/convo/listConvos.json b/lexicons/chat/bsky/convo/listConvos.json new file mode 100644 index 0000000000..27834ac7be --- /dev/null +++ b/lexicons/chat/bsky/convo/listConvos.json @@ -0,0 +1,46 @@ +{ + "lexicon": 1, + "id": "chat.bsky.convo.listConvos", + "defs": { + "main": { + "type": "query", + "parameters": { + "type": "params", + "properties": { + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50 + }, + "cursor": { "type": "string" }, + "readState": { + "type": "string", + "knownValues": ["unread"] + }, + "status": { + "type": "string", + "knownValues": ["request", "accepted"] + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["convos"], + "properties": { + "cursor": { "type": "string" }, + "convos": { + "type": "array", + "items": { + "type": "ref", + "ref": "chat.bsky.convo.defs#convoView" + } + } + } + } + } + } + } +} diff --git a/lexicons/chat/bsky/convo/muteConvo.json b/lexicons/chat/bsky/convo/muteConvo.json new file mode 100644 index 0000000000..e63a9dbfe3 --- /dev/null +++ b/lexicons/chat/bsky/convo/muteConvo.json @@ -0,0 +1,32 @@ +{ + "lexicon": 1, + "id": "chat.bsky.convo.muteConvo", + "defs": { + "main": { + "type": "procedure", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["convoId"], + "properties": { + "convoId": { "type": "string" } + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["convo"], + "properties": { + "convo": { + "type": "ref", + "ref": "chat.bsky.convo.defs#convoView" + } + } + } + } + } + } +} diff --git a/lexicons/chat/bsky/convo/removeReaction.json b/lexicons/chat/bsky/convo/removeReaction.json new file mode 100644 index 0000000000..41867fb774 --- /dev/null +++ b/lexicons/chat/bsky/convo/removeReaction.json @@ -0,0 +1,51 @@ +{ + "lexicon": 1, + "id": "chat.bsky.convo.removeReaction", + "defs": { + "main": { + "type": "procedure", + "description": "Removes an emoji reaction from a message. Requires authentication. It is idempotent, so multiple calls from the same user with the same emoji result in that reaction not being present, even if it already wasn't.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["convoId", "messageId", "value"], + "properties": { + "convoId": { "type": "string" }, + "messageId": { "type": "string" }, + "value": { + "type": "string", + "minLength": 1, + "maxLength": 64, + "minGraphemes": 1, + "maxGraphemes": 1 + } + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["message"], + "properties": { + "message": { + "type": "ref", + "ref": "chat.bsky.convo.defs#messageView" + } + } + } + }, + "errors": [ + { + "name": "ReactionMessageDeleted", + "description": "Indicates that the message has been deleted and reactions can no longer be added/removed." + }, + { + "name": "ReactionInvalidValue", + "description": "Indicates the value for the reaction is not acceptable. In general, this means it is not an emoji." + } + ] + } + } +} diff --git a/lexicons/chat/bsky/convo/sendMessage.json b/lexicons/chat/bsky/convo/sendMessage.json new file mode 100644 index 0000000000..736c1abdff --- /dev/null +++ b/lexicons/chat/bsky/convo/sendMessage.json @@ -0,0 +1,30 @@ +{ + "lexicon": 1, + "id": "chat.bsky.convo.sendMessage", + "defs": { + "main": { + "type": "procedure", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["convoId", "message"], + "properties": { + "convoId": { "type": "string" }, + "message": { + "type": "ref", + "ref": "chat.bsky.convo.defs#messageInput" + } + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "ref", + "ref": "chat.bsky.convo.defs#messageView" + } + } + } + } +} diff --git a/lexicons/chat/bsky/convo/sendMessageBatch.json b/lexicons/chat/bsky/convo/sendMessageBatch.json new file mode 100644 index 0000000000..d867a66df6 --- /dev/null +++ b/lexicons/chat/bsky/convo/sendMessageBatch.json @@ -0,0 +1,53 @@ +{ + "lexicon": 1, + "id": "chat.bsky.convo.sendMessageBatch", + "defs": { + "main": { + "type": "procedure", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["items"], + "properties": { + "items": { + "type": "array", + "maxLength": 100, + "items": { + "type": "ref", + "ref": "#batchItem" + } + } + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["items"], + "properties": { + "items": { + "type": "array", + "items": { + "type": "ref", + "ref": "chat.bsky.convo.defs#messageView" + } + } + } + } + } + }, + "batchItem": { + "type": "object", + "required": ["convoId", "message"], + "properties": { + "convoId": { "type": "string" }, + "message": { + "type": "ref", + "ref": "chat.bsky.convo.defs#messageInput" + } + } + } + } +} diff --git a/lexicons/chat/bsky/convo/unmuteConvo.json b/lexicons/chat/bsky/convo/unmuteConvo.json new file mode 100644 index 0000000000..7f84dac68e --- /dev/null +++ b/lexicons/chat/bsky/convo/unmuteConvo.json @@ -0,0 +1,32 @@ +{ + "lexicon": 1, + "id": "chat.bsky.convo.unmuteConvo", + "defs": { + "main": { + "type": "procedure", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["convoId"], + "properties": { + "convoId": { "type": "string" } + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["convo"], + "properties": { + "convo": { + "type": "ref", + "ref": "chat.bsky.convo.defs#convoView" + } + } + } + } + } + } +} diff --git a/lexicons/chat/bsky/convo/updateAllRead.json b/lexicons/chat/bsky/convo/updateAllRead.json new file mode 100644 index 0000000000..eab4b29efa --- /dev/null +++ b/lexicons/chat/bsky/convo/updateAllRead.json @@ -0,0 +1,34 @@ +{ + "lexicon": 1, + "id": "chat.bsky.convo.updateAllRead", + "defs": { + "main": { + "type": "procedure", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "properties": { + "status": { + "type": "string", + "knownValues": ["request", "accepted"] + } + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["updatedCount"], + "properties": { + "updatedCount": { + "description": "The count of updated convos.", + "type": "integer" + } + } + } + } + } + } +} diff --git a/lexicons/chat/bsky/convo/updateRead.json b/lexicons/chat/bsky/convo/updateRead.json new file mode 100644 index 0000000000..525c147e50 --- /dev/null +++ b/lexicons/chat/bsky/convo/updateRead.json @@ -0,0 +1,33 @@ +{ + "lexicon": 1, + "id": "chat.bsky.convo.updateRead", + "defs": { + "main": { + "type": "procedure", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["convoId"], + "properties": { + "convoId": { "type": "string" }, + "messageId": { "type": "string" } + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["convo"], + "properties": { + "convo": { + "type": "ref", + "ref": "chat.bsky.convo.defs#convoView" + } + } + } + } + } + } +} diff --git a/lexicons/chat/bsky/moderation/getActorMetadata.json b/lexicons/chat/bsky/moderation/getActorMetadata.json new file mode 100644 index 0000000000..eb35bab959 --- /dev/null +++ b/lexicons/chat/bsky/moderation/getActorMetadata.json @@ -0,0 +1,43 @@ +{ + "lexicon": 1, + "id": "chat.bsky.moderation.getActorMetadata", + "defs": { + "main": { + "type": "query", + "parameters": { + "type": "params", + "required": ["actor"], + "properties": { + "actor": { "type": "string", "format": "did" } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["day", "month", "all"], + "properties": { + "day": { "type": "ref", "ref": "#metadata" }, + "month": { "type": "ref", "ref": "#metadata" }, + "all": { "type": "ref", "ref": "#metadata" } + } + } + } + }, + "metadata": { + "type": "object", + "required": [ + "messagesSent", + "messagesReceived", + "convos", + "convosStarted" + ], + "properties": { + "messagesSent": { "type": "integer" }, + "messagesReceived": { "type": "integer" }, + "convos": { "type": "integer" }, + "convosStarted": { "type": "integer" } + } + } + } +} diff --git a/lexicons/chat/bsky/moderation/getMessageContext.json b/lexicons/chat/bsky/moderation/getMessageContext.json new file mode 100644 index 0000000000..df08af8213 --- /dev/null +++ b/lexicons/chat/bsky/moderation/getMessageContext.json @@ -0,0 +1,41 @@ +{ + "lexicon": 1, + "id": "chat.bsky.moderation.getMessageContext", + "defs": { + "main": { + "type": "query", + "parameters": { + "type": "params", + "required": ["messageId"], + "properties": { + "convoId": { + "type": "string", + "description": "Conversation that the message is from. NOTE: this field will eventually be required." + }, + "messageId": { "type": "string" }, + "before": { "type": "integer", "default": 5 }, + "after": { "type": "integer", "default": 5 } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["messages"], + "properties": { + "messages": { + "type": "array", + "items": { + "type": "union", + "refs": [ + "chat.bsky.convo.defs#messageView", + "chat.bsky.convo.defs#deletedMessageView" + ] + } + } + } + } + } + } + } +} diff --git a/lexicons/chat/bsky/moderation/updateActorAccess.json b/lexicons/chat/bsky/moderation/updateActorAccess.json new file mode 100644 index 0000000000..56c84a74af --- /dev/null +++ b/lexicons/chat/bsky/moderation/updateActorAccess.json @@ -0,0 +1,21 @@ +{ + "lexicon": 1, + "id": "chat.bsky.moderation.updateActorAccess", + "defs": { + "main": { + "type": "procedure", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["actor", "allowAccess"], + "properties": { + "actor": { "type": "string", "format": "did" }, + "allowAccess": { "type": "boolean" }, + "ref": { "type": "string" } + } + } + } + } + } +} diff --git a/lexicons/com/atproto/admin/defs.json b/lexicons/com/atproto/admin/defs.json new file mode 100644 index 0000000000..24dfd030be --- /dev/null +++ b/lexicons/com/atproto/admin/defs.json @@ -0,0 +1,71 @@ +{ + "lexicon": 1, + "id": "com.atproto.admin.defs", + "defs": { + "statusAttr": { + "type": "object", + "required": ["applied"], + "properties": { + "applied": { "type": "boolean" }, + "ref": { "type": "string" } + } + }, + "accountView": { + "type": "object", + "required": ["did", "handle", "indexedAt"], + "properties": { + "did": { "type": "string", "format": "did" }, + "handle": { "type": "string", "format": "handle" }, + "email": { "type": "string" }, + "relatedRecords": { "type": "array", "items": { "type": "unknown" } }, + "indexedAt": { "type": "string", "format": "datetime" }, + "invitedBy": { + "type": "ref", + "ref": "com.atproto.server.defs#inviteCode" + }, + "invites": { + "type": "array", + "items": { + "type": "ref", + "ref": "com.atproto.server.defs#inviteCode" + } + }, + "invitesDisabled": { "type": "boolean" }, + "emailConfirmedAt": { "type": "string", "format": "datetime" }, + "inviteNote": { "type": "string" }, + "deactivatedAt": { "type": "string", "format": "datetime" }, + "threatSignatures": { + "type": "array", + "items": { + "type": "ref", + "ref": "#threatSignature" + } + } + } + }, + "repoRef": { + "type": "object", + "required": ["did"], + "properties": { + "did": { "type": "string", "format": "did" } + } + }, + "repoBlobRef": { + "type": "object", + "required": ["did", "cid"], + "properties": { + "did": { "type": "string", "format": "did" }, + "cid": { "type": "string", "format": "cid" }, + "recordUri": { "type": "string", "format": "at-uri" } + } + }, + "threatSignature": { + "type": "object", + "required": ["property", "value"], + "properties": { + "property": { "type": "string" }, + "value": { "type": "string" } + } + } + } +} diff --git a/lexicons/com/atproto/admin/deleteAccount.json b/lexicons/com/atproto/admin/deleteAccount.json new file mode 100644 index 0000000000..bd7532cef6 --- /dev/null +++ b/lexicons/com/atproto/admin/deleteAccount.json @@ -0,0 +1,20 @@ +{ + "lexicon": 1, + "id": "com.atproto.admin.deleteAccount", + "defs": { + "main": { + "type": "procedure", + "description": "Delete a user account as an administrator.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["did"], + "properties": { + "did": { "type": "string", "format": "did" } + } + } + } + } + } +} diff --git a/lexicons/com/atproto/admin/disableAccountInvites.json b/lexicons/com/atproto/admin/disableAccountInvites.json new file mode 100644 index 0000000000..8bd6cabbc9 --- /dev/null +++ b/lexicons/com/atproto/admin/disableAccountInvites.json @@ -0,0 +1,24 @@ +{ + "lexicon": 1, + "id": "com.atproto.admin.disableAccountInvites", + "defs": { + "main": { + "type": "procedure", + "description": "Disable an account from receiving new invite codes, but does not invalidate existing codes.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["account"], + "properties": { + "account": { "type": "string", "format": "did" }, + "note": { + "type": "string", + "description": "Optional reason for disabled invites." + } + } + } + } + } + } +} diff --git a/lexicons/com/atproto/admin/disableInviteCodes.json b/lexicons/com/atproto/admin/disableInviteCodes.json new file mode 100644 index 0000000000..914c8cb29e --- /dev/null +++ b/lexicons/com/atproto/admin/disableInviteCodes.json @@ -0,0 +1,26 @@ +{ + "lexicon": 1, + "id": "com.atproto.admin.disableInviteCodes", + "defs": { + "main": { + "type": "procedure", + "description": "Disable some set of codes and/or all codes associated with a set of users.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "properties": { + "codes": { + "type": "array", + "items": { "type": "string" } + }, + "accounts": { + "type": "array", + "items": { "type": "string" } + } + } + } + } + } + } +} diff --git a/lexicons/com/atproto/admin/enableAccountInvites.json b/lexicons/com/atproto/admin/enableAccountInvites.json new file mode 100644 index 0000000000..97443cd989 --- /dev/null +++ b/lexicons/com/atproto/admin/enableAccountInvites.json @@ -0,0 +1,24 @@ +{ + "lexicon": 1, + "id": "com.atproto.admin.enableAccountInvites", + "defs": { + "main": { + "type": "procedure", + "description": "Re-enable an account's ability to receive invite codes.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["account"], + "properties": { + "account": { "type": "string", "format": "did" }, + "note": { + "type": "string", + "description": "Optional reason for enabled invites." + } + } + } + } + } + } +} diff --git a/lexicons/com/atproto/admin/getAccountInfo.json b/lexicons/com/atproto/admin/getAccountInfo.json new file mode 100644 index 0000000000..e5d33fdcf1 --- /dev/null +++ b/lexicons/com/atproto/admin/getAccountInfo.json @@ -0,0 +1,24 @@ +{ + "lexicon": 1, + "id": "com.atproto.admin.getAccountInfo", + "defs": { + "main": { + "type": "query", + "description": "Get details about an account.", + "parameters": { + "type": "params", + "required": ["did"], + "properties": { + "did": { "type": "string", "format": "did" } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "ref", + "ref": "com.atproto.admin.defs#accountView" + } + } + } + } +} diff --git a/lexicons/com/atproto/admin/getAccountInfos.json b/lexicons/com/atproto/admin/getAccountInfos.json new file mode 100644 index 0000000000..45d97e08bd --- /dev/null +++ b/lexicons/com/atproto/admin/getAccountInfos.json @@ -0,0 +1,36 @@ +{ + "lexicon": 1, + "id": "com.atproto.admin.getAccountInfos", + "defs": { + "main": { + "type": "query", + "description": "Get details about some accounts.", + "parameters": { + "type": "params", + "required": ["dids"], + "properties": { + "dids": { + "type": "array", + "items": { "type": "string", "format": "did" } + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["infos"], + "properties": { + "infos": { + "type": "array", + "items": { + "type": "ref", + "ref": "com.atproto.admin.defs#accountView" + } + } + } + } + } + } + } +} diff --git a/lexicons/com/atproto/admin/getInviteCodes.json b/lexicons/com/atproto/admin/getInviteCodes.json new file mode 100644 index 0000000000..883604dc7e --- /dev/null +++ b/lexicons/com/atproto/admin/getInviteCodes.json @@ -0,0 +1,44 @@ +{ + "lexicon": 1, + "id": "com.atproto.admin.getInviteCodes", + "defs": { + "main": { + "type": "query", + "description": "Get an admin view of invite codes.", + "parameters": { + "type": "params", + "properties": { + "sort": { + "type": "string", + "knownValues": ["recent", "usage"], + "default": "recent" + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 500, + "default": 100 + }, + "cursor": { "type": "string" } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["codes"], + "properties": { + "cursor": { "type": "string" }, + "codes": { + "type": "array", + "items": { + "type": "ref", + "ref": "com.atproto.server.defs#inviteCode" + } + } + } + } + } + } + } +} diff --git a/lexicons/com/atproto/admin/getSubjectStatus.json b/lexicons/com/atproto/admin/getSubjectStatus.json new file mode 100644 index 0000000000..634e140fbc --- /dev/null +++ b/lexicons/com/atproto/admin/getSubjectStatus.json @@ -0,0 +1,43 @@ +{ + "lexicon": 1, + "id": "com.atproto.admin.getSubjectStatus", + "defs": { + "main": { + "type": "query", + "description": "Get the service-specific admin status of a subject (account, record, or blob).", + "parameters": { + "type": "params", + "properties": { + "did": { "type": "string", "format": "did" }, + "uri": { "type": "string", "format": "at-uri" }, + "blob": { "type": "string", "format": "cid" } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["subject"], + "properties": { + "subject": { + "type": "union", + "refs": [ + "com.atproto.admin.defs#repoRef", + "com.atproto.repo.strongRef", + "com.atproto.admin.defs#repoBlobRef" + ] + }, + "takedown": { + "type": "ref", + "ref": "com.atproto.admin.defs#statusAttr" + }, + "deactivated": { + "type": "ref", + "ref": "com.atproto.admin.defs#statusAttr" + } + } + } + } + } + } +} diff --git a/lexicons/com/atproto/admin/searchAccounts.json b/lexicons/com/atproto/admin/searchAccounts.json new file mode 100644 index 0000000000..5add85d678 --- /dev/null +++ b/lexicons/com/atproto/admin/searchAccounts.json @@ -0,0 +1,40 @@ +{ + "lexicon": 1, + "id": "com.atproto.admin.searchAccounts", + "defs": { + "main": { + "type": "query", + "description": "Get list of accounts that matches your search query.", + "parameters": { + "type": "params", + "properties": { + "email": { "type": "string" }, + "cursor": { "type": "string" }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50 + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["accounts"], + "properties": { + "cursor": { "type": "string" }, + "accounts": { + "type": "array", + "items": { + "type": "ref", + "ref": "com.atproto.admin.defs#accountView" + } + } + } + } + } + } + } +} diff --git a/lexicons/com/atproto/admin/sendEmail.json b/lexicons/com/atproto/admin/sendEmail.json new file mode 100644 index 0000000000..4c33dcd895 --- /dev/null +++ b/lexicons/com/atproto/admin/sendEmail.json @@ -0,0 +1,37 @@ +{ + "lexicon": 1, + "id": "com.atproto.admin.sendEmail", + "defs": { + "main": { + "type": "procedure", + "description": "Send email to a user's account email address.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["recipientDid", "content", "senderDid"], + "properties": { + "recipientDid": { "type": "string", "format": "did" }, + "content": { "type": "string" }, + "subject": { "type": "string" }, + "senderDid": { "type": "string", "format": "did" }, + "comment": { + "type": "string", + "description": "Additional comment by the sender that won't be used in the email itself but helpful to provide more context for moderators/reviewers" + } + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["sent"], + "properties": { + "sent": { "type": "boolean" } + } + } + } + } + } +} diff --git a/lexicons/com/atproto/admin/updateAccountEmail.json b/lexicons/com/atproto/admin/updateAccountEmail.json new file mode 100644 index 0000000000..f0c3eeb799 --- /dev/null +++ b/lexicons/com/atproto/admin/updateAccountEmail.json @@ -0,0 +1,25 @@ +{ + "lexicon": 1, + "id": "com.atproto.admin.updateAccountEmail", + "defs": { + "main": { + "type": "procedure", + "description": "Administrative action to update an account's email.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["account", "email"], + "properties": { + "account": { + "type": "string", + "format": "at-identifier", + "description": "The handle or DID of the repo." + }, + "email": { "type": "string" } + } + } + } + } + } +} diff --git a/lexicons/com/atproto/admin/updateAccountHandle.json b/lexicons/com/atproto/admin/updateAccountHandle.json new file mode 100644 index 0000000000..23b8656627 --- /dev/null +++ b/lexicons/com/atproto/admin/updateAccountHandle.json @@ -0,0 +1,21 @@ +{ + "lexicon": 1, + "id": "com.atproto.admin.updateAccountHandle", + "defs": { + "main": { + "type": "procedure", + "description": "Administrative action to update an account's handle.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["did", "handle"], + "properties": { + "did": { "type": "string", "format": "did" }, + "handle": { "type": "string", "format": "handle" } + } + } + } + } + } +} diff --git a/lexicons/com/atproto/admin/updateAccountPassword.json b/lexicons/com/atproto/admin/updateAccountPassword.json new file mode 100644 index 0000000000..76c69fec0b --- /dev/null +++ b/lexicons/com/atproto/admin/updateAccountPassword.json @@ -0,0 +1,21 @@ +{ + "lexicon": 1, + "id": "com.atproto.admin.updateAccountPassword", + "defs": { + "main": { + "type": "procedure", + "description": "Update the password for a user account as an administrator.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["did", "password"], + "properties": { + "did": { "type": "string", "format": "did" }, + "password": { "type": "string" } + } + } + } + } + } +} diff --git a/lexicons/com/atproto/admin/updateAccountSigningKey.json b/lexicons/com/atproto/admin/updateAccountSigningKey.json new file mode 100644 index 0000000000..c8289a02ab --- /dev/null +++ b/lexicons/com/atproto/admin/updateAccountSigningKey.json @@ -0,0 +1,25 @@ +{ + "lexicon": 1, + "id": "com.atproto.admin.updateAccountSigningKey", + "defs": { + "main": { + "type": "procedure", + "description": "Administrative action to update an account's signing key in their Did document.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["did", "signingKey"], + "properties": { + "did": { "type": "string", "format": "did" }, + "signingKey": { + "type": "string", + "format": "did", + "description": "Did-key formatted public key" + } + } + } + } + } + } +} diff --git a/lexicons/com/atproto/admin/updateSubjectStatus.json b/lexicons/com/atproto/admin/updateSubjectStatus.json new file mode 100644 index 0000000000..799dee7b93 --- /dev/null +++ b/lexicons/com/atproto/admin/updateSubjectStatus.json @@ -0,0 +1,56 @@ +{ + "lexicon": 1, + "id": "com.atproto.admin.updateSubjectStatus", + "defs": { + "main": { + "type": "procedure", + "description": "Update the service-specific admin status of a subject (account, record, or blob).", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["subject"], + "properties": { + "subject": { + "type": "union", + "refs": [ + "com.atproto.admin.defs#repoRef", + "com.atproto.repo.strongRef", + "com.atproto.admin.defs#repoBlobRef" + ] + }, + "takedown": { + "type": "ref", + "ref": "com.atproto.admin.defs#statusAttr" + }, + "deactivated": { + "type": "ref", + "ref": "com.atproto.admin.defs#statusAttr" + } + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["subject"], + "properties": { + "subject": { + "type": "union", + "refs": [ + "com.atproto.admin.defs#repoRef", + "com.atproto.repo.strongRef", + "com.atproto.admin.defs#repoBlobRef" + ] + }, + "takedown": { + "type": "ref", + "ref": "com.atproto.admin.defs#statusAttr" + } + } + } + } + } + } +} diff --git a/lexicons/com/atproto/identity/defs.json b/lexicons/com/atproto/identity/defs.json new file mode 100644 index 0000000000..9449cdd9a1 --- /dev/null +++ b/lexicons/com/atproto/identity/defs.json @@ -0,0 +1,22 @@ +{ + "lexicon": 1, + "id": "com.atproto.identity.defs", + "defs": { + "identityInfo": { + "type": "object", + "required": ["did", "handle", "didDoc"], + "properties": { + "did": { "type": "string", "format": "did" }, + "handle": { + "type": "string", + "format": "handle", + "description": "The validated handle of the account; or 'handle.invalid' if the handle did not bi-directionally match the DID document." + }, + "didDoc": { + "type": "unknown", + "description": "The complete DID document for the identity." + } + } + } + } +} diff --git a/lexicons/com/atproto/identity/getRecommendedDidCredentials.json b/lexicons/com/atproto/identity/getRecommendedDidCredentials.json new file mode 100644 index 0000000000..3506dbec35 --- /dev/null +++ b/lexicons/com/atproto/identity/getRecommendedDidCredentials.json @@ -0,0 +1,29 @@ +{ + "lexicon": 1, + "id": "com.atproto.identity.getRecommendedDidCredentials", + "defs": { + "main": { + "type": "query", + "description": "Describe the credentials that should be included in the DID doc of an account that is migrating to this service.", + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "properties": { + "rotationKeys": { + "description": "Recommended rotation keys for PLC dids. Should be undefined (or ignored) for did:webs.", + "type": "array", + "items": { "type": "string" } + }, + "alsoKnownAs": { + "type": "array", + "items": { "type": "string" } + }, + "verificationMethods": { "type": "unknown" }, + "services": { "type": "unknown" } + } + } + } + } + } +} diff --git a/lexicons/com/atproto/identity/refreshIdentity.json b/lexicons/com/atproto/identity/refreshIdentity.json new file mode 100644 index 0000000000..4c56084b9e --- /dev/null +++ b/lexicons/com/atproto/identity/refreshIdentity.json @@ -0,0 +1,44 @@ +{ + "lexicon": 1, + "id": "com.atproto.identity.refreshIdentity", + "defs": { + "main": { + "type": "procedure", + "description": "Request that the server re-resolve an identity (DID and handle). The server may ignore this request, or require authentication, depending on the role, implementation, and policy of the server.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["identifier"], + "properties": { + "identifier": { + "type": "string", + "format": "at-identifier" + } + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "ref", + "ref": "com.atproto.identity.defs#identityInfo" + } + }, + "errors": [ + { + "name": "HandleNotFound", + "description": "The resolution process confirmed that the handle does not resolve to any DID." + }, + { + "name": "DidNotFound", + "description": "The DID resolution process confirmed that there is no current DID." + }, + { + "name": "DidDeactivated", + "description": "The DID previously existed, but has been deactivated." + } + ] + } + } +} diff --git a/lexicons/com/atproto/identity/requestPlcOperationSignature.json b/lexicons/com/atproto/identity/requestPlcOperationSignature.json new file mode 100644 index 0000000000..4aa8b18fee --- /dev/null +++ b/lexicons/com/atproto/identity/requestPlcOperationSignature.json @@ -0,0 +1,10 @@ +{ + "lexicon": 1, + "id": "com.atproto.identity.requestPlcOperationSignature", + "defs": { + "main": { + "type": "procedure", + "description": "Request an email with a code to in order to request a signed PLC operation. Requires Auth." + } + } +} diff --git a/lexicons/com/atproto/identity/resolveDid.json b/lexicons/com/atproto/identity/resolveDid.json new file mode 100644 index 0000000000..24c129a333 --- /dev/null +++ b/lexicons/com/atproto/identity/resolveDid.json @@ -0,0 +1,44 @@ +{ + "lexicon": 1, + "id": "com.atproto.identity.resolveDid", + "defs": { + "main": { + "type": "query", + "description": "Resolves DID to DID document. Does not bi-directionally verify handle.", + "parameters": { + "type": "params", + "required": ["did"], + "properties": { + "did": { + "type": "string", + "format": "did", + "description": "DID to resolve." + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["didDoc"], + "properties": { + "didDoc": { + "type": "unknown", + "description": "The complete DID document for the identity." + } + } + } + }, + "errors": [ + { + "name": "DidNotFound", + "description": "The DID resolution process confirmed that there is no current DID." + }, + { + "name": "DidDeactivated", + "description": "The DID previously existed, but has been deactivated." + } + ] + } + } +} diff --git a/lexicons/com/atproto/identity/resolveHandle.json b/lexicons/com/atproto/identity/resolveHandle.json new file mode 100644 index 0000000000..69751a529c --- /dev/null +++ b/lexicons/com/atproto/identity/resolveHandle.json @@ -0,0 +1,37 @@ +{ + "lexicon": 1, + "id": "com.atproto.identity.resolveHandle", + "defs": { + "main": { + "type": "query", + "description": "Resolves an atproto handle (hostname) to a DID. Does not necessarily bi-directionally verify against the the DID document.", + "parameters": { + "type": "params", + "required": ["handle"], + "properties": { + "handle": { + "type": "string", + "format": "handle", + "description": "The handle to resolve." + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["did"], + "properties": { + "did": { "type": "string", "format": "did" } + } + } + }, + "errors": [ + { + "name": "HandleNotFound", + "description": "The resolution process confirmed that the handle does not resolve to any DID." + } + ] + } + } +} diff --git a/lexicons/com/atproto/identity/resolveIdentity.json b/lexicons/com/atproto/identity/resolveIdentity.json new file mode 100644 index 0000000000..fe33441c4e --- /dev/null +++ b/lexicons/com/atproto/identity/resolveIdentity.json @@ -0,0 +1,42 @@ +{ + "lexicon": 1, + "id": "com.atproto.identity.resolveIdentity", + "defs": { + "main": { + "type": "query", + "description": "Resolves an identity (DID or Handle) to a full identity (DID document and verified handle).", + "parameters": { + "type": "params", + "required": ["identifier"], + "properties": { + "identifier": { + "type": "string", + "format": "at-identifier", + "description": "Handle or DID to resolve." + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "ref", + "ref": "com.atproto.identity.defs#identityInfo" + } + }, + "errors": [ + { + "name": "HandleNotFound", + "description": "The resolution process confirmed that the handle does not resolve to any DID." + }, + { + "name": "DidNotFound", + "description": "The DID resolution process confirmed that there is no current DID." + }, + { + "name": "DidDeactivated", + "description": "The DID previously existed, but has been deactivated." + } + ] + } + } +} diff --git a/lexicons/com/atproto/identity/signPlcOperation.json b/lexicons/com/atproto/identity/signPlcOperation.json new file mode 100644 index 0000000000..05a952cab6 --- /dev/null +++ b/lexicons/com/atproto/identity/signPlcOperation.json @@ -0,0 +1,45 @@ +{ + "lexicon": 1, + "id": "com.atproto.identity.signPlcOperation", + "defs": { + "main": { + "type": "procedure", + "description": "Signs a PLC operation to update some value(s) in the requesting DID's document.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "properties": { + "token": { + "description": "A token received through com.atproto.identity.requestPlcOperationSignature", + "type": "string" + }, + "rotationKeys": { + "type": "array", + "items": { "type": "string" } + }, + "alsoKnownAs": { + "type": "array", + "items": { "type": "string" } + }, + "verificationMethods": { "type": "unknown" }, + "services": { "type": "unknown" } + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["operation"], + "properties": { + "operation": { + "type": "unknown", + "description": "A signed DID PLC operation." + } + } + } + } + } + } +} diff --git a/lexicons/com/atproto/identity/submitPlcOperation.json b/lexicons/com/atproto/identity/submitPlcOperation.json new file mode 100644 index 0000000000..280f5003b0 --- /dev/null +++ b/lexicons/com/atproto/identity/submitPlcOperation.json @@ -0,0 +1,20 @@ +{ + "lexicon": 1, + "id": "com.atproto.identity.submitPlcOperation", + "defs": { + "main": { + "type": "procedure", + "description": "Validates a PLC operation to ensure that it doesn't violate a service's constraints or get the identity into a bad state, then submits it to the PLC registry", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["operation"], + "properties": { + "operation": { "type": "unknown" } + } + } + } + } + } +} diff --git a/lexicons/com/atproto/identity/updateHandle.json b/lexicons/com/atproto/identity/updateHandle.json new file mode 100644 index 0000000000..9bb5c347d3 --- /dev/null +++ b/lexicons/com/atproto/identity/updateHandle.json @@ -0,0 +1,24 @@ +{ + "lexicon": 1, + "id": "com.atproto.identity.updateHandle", + "defs": { + "main": { + "type": "procedure", + "description": "Updates the current account's handle. Verifies handle validity, and updates did:plc document if necessary. Implemented by PDS, and requires auth.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["handle"], + "properties": { + "handle": { + "type": "string", + "format": "handle", + "description": "The new handle." + } + } + } + } + } + } +} diff --git a/lexicons/com/atproto/label/defs.json b/lexicons/com/atproto/label/defs.json new file mode 100644 index 0000000000..6f4c1ab9dd --- /dev/null +++ b/lexicons/com/atproto/label/defs.json @@ -0,0 +1,156 @@ +{ + "lexicon": 1, + "id": "com.atproto.label.defs", + "defs": { + "label": { + "type": "object", + "description": "Metadata tag on an atproto resource (eg, repo or record).", + "required": ["src", "uri", "val", "cts"], + "properties": { + "ver": { + "type": "integer", + "description": "The AT Protocol version of the label object." + }, + "src": { + "type": "string", + "format": "did", + "description": "DID of the actor who created this label." + }, + "uri": { + "type": "string", + "format": "uri", + "description": "AT URI of the record, repository (account), or other resource that this label applies to." + }, + "cid": { + "type": "string", + "format": "cid", + "description": "Optionally, CID specifying the specific version of 'uri' resource this label applies to." + }, + "val": { + "type": "string", + "maxLength": 128, + "description": "The short string name of the value or type of this label." + }, + "neg": { + "type": "boolean", + "description": "If true, this is a negation label, overwriting a previous label." + }, + "cts": { + "type": "string", + "format": "datetime", + "description": "Timestamp when this label was created." + }, + "exp": { + "type": "string", + "format": "datetime", + "description": "Timestamp at which this label expires (no longer applies)." + }, + "sig": { + "type": "bytes", + "description": "Signature of dag-cbor encoded label." + } + } + }, + "selfLabels": { + "type": "object", + "description": "Metadata tags on an atproto record, published by the author within the record.", + "required": ["values"], + "properties": { + "values": { + "type": "array", + "items": { "type": "ref", "ref": "#selfLabel" }, + "maxLength": 10 + } + } + }, + "selfLabel": { + "type": "object", + "description": "Metadata tag on an atproto record, published by the author within the record. Note that schemas should use #selfLabels, not #selfLabel.", + "required": ["val"], + "properties": { + "val": { + "type": "string", + "maxLength": 128, + "description": "The short string name of the value or type of this label." + } + } + }, + "labelValueDefinition": { + "type": "object", + "description": "Declares a label value and its expected interpretations and behaviors.", + "required": ["identifier", "severity", "blurs", "locales"], + "properties": { + "identifier": { + "type": "string", + "description": "The value of the label being defined. Must only include lowercase ascii and the '-' character ([a-z-]+).", + "maxLength": 100, + "maxGraphemes": 100 + }, + "severity": { + "type": "string", + "description": "How should a client visually convey this label? 'inform' means neutral and informational; 'alert' means negative and warning; 'none' means show nothing.", + "knownValues": ["inform", "alert", "none"] + }, + "blurs": { + "type": "string", + "description": "What should this label hide in the UI, if applied? 'content' hides all of the target; 'media' hides the images/video/audio; 'none' hides nothing.", + "knownValues": ["content", "media", "none"] + }, + "defaultSetting": { + "type": "string", + "description": "The default setting for this label.", + "knownValues": ["ignore", "warn", "hide"], + "default": "warn" + }, + "adultOnly": { + "type": "boolean", + "description": "Does the user need to have adult content enabled in order to configure this label?" + }, + "locales": { + "type": "array", + "items": { "type": "ref", "ref": "#labelValueDefinitionStrings" } + } + } + }, + "labelValueDefinitionStrings": { + "type": "object", + "description": "Strings which describe the label in the UI, localized into a specific language.", + "required": ["lang", "name", "description"], + "properties": { + "lang": { + "type": "string", + "description": "The code of the language these strings are written in.", + "format": "language" + }, + "name": { + "type": "string", + "description": "A short human-readable name for the label.", + "maxGraphemes": 64, + "maxLength": 640 + }, + "description": { + "type": "string", + "description": "A longer description of what the label means and why it might be applied.", + "maxGraphemes": 10000, + "maxLength": 100000 + } + } + }, + "labelValue": { + "type": "string", + "knownValues": [ + "!hide", + "!no-promote", + "!warn", + "!no-unauthenticated", + "dmca-violation", + "doxxing", + "porn", + "sexual", + "nudity", + "nsfl", + "gore" + ] + } + } +} diff --git a/lexicons/com/atproto/label/queryLabels.json b/lexicons/com/atproto/label/queryLabels.json new file mode 100644 index 0000000000..6c81cb0bba --- /dev/null +++ b/lexicons/com/atproto/label/queryLabels.json @@ -0,0 +1,47 @@ +{ + "lexicon": 1, + "id": "com.atproto.label.queryLabels", + "defs": { + "main": { + "type": "query", + "description": "Find labels relevant to the provided AT-URI patterns. Public endpoint for moderation services, though may return different or additional results with auth.", + "parameters": { + "type": "params", + "required": ["uriPatterns"], + "properties": { + "uriPatterns": { + "type": "array", + "items": { "type": "string" }, + "description": "List of AT URI patterns to match (boolean 'OR'). Each may be a prefix (ending with '*'; will match inclusive of the string leading to '*'), or a full URI." + }, + "sources": { + "type": "array", + "items": { "type": "string", "format": "did" }, + "description": "Optional list of label sources (DIDs) to filter on." + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 250, + "default": 50 + }, + "cursor": { "type": "string" } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["labels"], + "properties": { + "cursor": { "type": "string" }, + "labels": { + "type": "array", + "items": { "type": "ref", "ref": "com.atproto.label.defs#label" } + } + } + } + } + } + } +} diff --git a/lexicons/com/atproto/label/subscribeLabels.json b/lexicons/com/atproto/label/subscribeLabels.json new file mode 100644 index 0000000000..5fb1a852d3 --- /dev/null +++ b/lexicons/com/atproto/label/subscribeLabels.json @@ -0,0 +1,50 @@ +{ + "lexicon": 1, + "id": "com.atproto.label.subscribeLabels", + "defs": { + "main": { + "type": "subscription", + "description": "Subscribe to stream of labels (and negations). Public endpoint implemented by mod services. Uses same sequencing scheme as repo event stream.", + "parameters": { + "type": "params", + "properties": { + "cursor": { + "type": "integer", + "description": "The last known event seq number to backfill from." + } + } + }, + "message": { + "schema": { + "type": "union", + "refs": ["#labels", "#info"] + } + }, + "errors": [{ "name": "FutureCursor" }] + }, + "labels": { + "type": "object", + "required": ["seq", "labels"], + "properties": { + "seq": { "type": "integer" }, + "labels": { + "type": "array", + "items": { "type": "ref", "ref": "com.atproto.label.defs#label" } + } + } + }, + "info": { + "type": "object", + "required": ["name"], + "properties": { + "name": { + "type": "string", + "knownValues": ["OutdatedCursor"] + }, + "message": { + "type": "string" + } + } + } + } +} diff --git a/lexicons/com/atproto/lexicon/schema.json b/lexicons/com/atproto/lexicon/schema.json new file mode 100644 index 0000000000..e79337ba6d --- /dev/null +++ b/lexicons/com/atproto/lexicon/schema.json @@ -0,0 +1,21 @@ +{ + "lexicon": 1, + "id": "com.atproto.lexicon.schema", + "defs": { + "main": { + "type": "record", + "description": "Representation of Lexicon schemas themselves, when published as atproto records. Note that the schema language is not defined in Lexicon; this meta schema currently only includes a single version field ('lexicon'). See the atproto specifications for description of the other expected top-level fields ('id', 'defs', etc).", + "key": "nsid", + "record": { + "type": "object", + "required": ["lexicon"], + "properties": { + "lexicon": { + "type": "integer", + "description": "Indicates the 'version' of the Lexicon language. Must be '1' for the current atproto/Lexicon schema system." + } + } + } + } + } +} diff --git a/lexicons/com/atproto/moderation/createReport.json b/lexicons/com/atproto/moderation/createReport.json new file mode 100644 index 0000000000..0b8d11f3ac --- /dev/null +++ b/lexicons/com/atproto/moderation/createReport.json @@ -0,0 +1,71 @@ +{ + "lexicon": 1, + "id": "com.atproto.moderation.createReport", + "defs": { + "main": { + "type": "procedure", + "description": "Submit a moderation report regarding an atproto account or record. Implemented by moderation services (with PDS proxying), and requires auth.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["reasonType", "subject"], + "properties": { + "reasonType": { + "type": "ref", + "description": "Indicates the broad category of violation the report is for.", + "ref": "com.atproto.moderation.defs#reasonType" + }, + "reason": { + "type": "string", + "maxGraphemes": 2000, + "maxLength": 20000, + "description": "Additional context about the content and violation." + }, + "subject": { + "type": "union", + "refs": [ + "com.atproto.admin.defs#repoRef", + "com.atproto.repo.strongRef" + ] + } + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "id", + "reasonType", + "subject", + "reportedBy", + "createdAt" + ], + "properties": { + "id": { "type": "integer" }, + "reasonType": { + "type": "ref", + "ref": "com.atproto.moderation.defs#reasonType" + }, + "reason": { + "type": "string", + "maxGraphemes": 2000, + "maxLength": 20000 + }, + "subject": { + "type": "union", + "refs": [ + "com.atproto.admin.defs#repoRef", + "com.atproto.repo.strongRef" + ] + }, + "reportedBy": { "type": "string", "format": "did" }, + "createdAt": { "type": "string", "format": "datetime" } + } + } + } + } + } +} diff --git a/lexicons/com/atproto/moderation/defs.json b/lexicons/com/atproto/moderation/defs.json new file mode 100644 index 0000000000..52dfedacd7 --- /dev/null +++ b/lexicons/com/atproto/moderation/defs.json @@ -0,0 +1,51 @@ +{ + "lexicon": 1, + "id": "com.atproto.moderation.defs", + "defs": { + "reasonType": { + "type": "string", + "knownValues": [ + "com.atproto.moderation.defs#reasonSpam", + "com.atproto.moderation.defs#reasonViolation", + "com.atproto.moderation.defs#reasonMisleading", + "com.atproto.moderation.defs#reasonSexual", + "com.atproto.moderation.defs#reasonRude", + "com.atproto.moderation.defs#reasonOther", + "com.atproto.moderation.defs#reasonAppeal" + ] + }, + "reasonSpam": { + "type": "token", + "description": "Spam: frequent unwanted promotion, replies, mentions" + }, + "reasonViolation": { + "type": "token", + "description": "Direct violation of server rules, laws, terms of service" + }, + "reasonMisleading": { + "type": "token", + "description": "Misleading identity, affiliation, or content" + }, + "reasonSexual": { + "type": "token", + "description": "Unwanted or mislabeled sexual content" + }, + "reasonRude": { + "type": "token", + "description": "Rude, harassing, explicit, or otherwise unwelcoming behavior" + }, + "reasonOther": { + "type": "token", + "description": "Other: reports not falling under another report category" + }, + "reasonAppeal": { + "type": "token", + "description": "Appeal: appeal a previously taken moderation action" + }, + "subjectType": { + "type": "string", + "description": "Tag describing a type of subject that might be reported.", + "knownValues": ["account", "record", "chat"] + } + } +} diff --git a/lexicons/com/atproto/repo/applyWrites.json b/lexicons/com/atproto/repo/applyWrites.json new file mode 100644 index 0000000000..11a1f1fd64 --- /dev/null +++ b/lexicons/com/atproto/repo/applyWrites.json @@ -0,0 +1,131 @@ +{ + "lexicon": 1, + "id": "com.atproto.repo.applyWrites", + "defs": { + "main": { + "type": "procedure", + "description": "Apply a batch transaction of repository creates, updates, and deletes. Requires auth, implemented by PDS.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["repo", "writes"], + "properties": { + "repo": { + "type": "string", + "format": "at-identifier", + "description": "The handle or DID of the repo (aka, current account)." + }, + "validate": { + "type": "boolean", + "description": "Can be set to 'false' to skip Lexicon schema validation of record data across all operations, 'true' to require it, or leave unset to validate only for known Lexicons." + }, + "writes": { + "type": "array", + "items": { + "type": "union", + "refs": ["#create", "#update", "#delete"], + "closed": true + } + }, + "swapCommit": { + "type": "string", + "description": "If provided, the entire operation will fail if the current repo commit CID does not match this value. Used to prevent conflicting repo mutations.", + "format": "cid" + } + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [], + "properties": { + "commit": { + "type": "ref", + "ref": "com.atproto.repo.defs#commitMeta" + }, + "results": { + "type": "array", + "items": { + "type": "union", + "refs": ["#createResult", "#updateResult", "#deleteResult"], + "closed": true + } + } + } + } + }, + "errors": [ + { + "name": "InvalidSwap", + "description": "Indicates that the 'swapCommit' parameter did not match current commit." + } + ] + }, + "create": { + "type": "object", + "description": "Operation which creates a new record.", + "required": ["collection", "value"], + "properties": { + "collection": { "type": "string", "format": "nsid" }, + "rkey": { + "type": "string", + "maxLength": 512, + "format": "record-key", + "description": "NOTE: maxLength is redundant with record-key format. Keeping it temporarily to ensure backwards compatibility." + }, + "value": { "type": "unknown" } + } + }, + "update": { + "type": "object", + "description": "Operation which updates an existing record.", + "required": ["collection", "rkey", "value"], + "properties": { + "collection": { "type": "string", "format": "nsid" }, + "rkey": { "type": "string", "format": "record-key" }, + "value": { "type": "unknown" } + } + }, + "delete": { + "type": "object", + "description": "Operation which deletes an existing record.", + "required": ["collection", "rkey"], + "properties": { + "collection": { "type": "string", "format": "nsid" }, + "rkey": { "type": "string", "format": "record-key" } + } + }, + "createResult": { + "type": "object", + "required": ["uri", "cid"], + "properties": { + "uri": { "type": "string", "format": "at-uri" }, + "cid": { "type": "string", "format": "cid" }, + "validationStatus": { + "type": "string", + "knownValues": ["valid", "unknown"] + } + } + }, + "updateResult": { + "type": "object", + "required": ["uri", "cid"], + "properties": { + "uri": { "type": "string", "format": "at-uri" }, + "cid": { "type": "string", "format": "cid" }, + "validationStatus": { + "type": "string", + "knownValues": ["valid", "unknown"] + } + } + }, + "deleteResult": { + "type": "object", + "required": [], + "properties": {} + } + } +} diff --git a/lexicons/com/atproto/repo/createRecord.json b/lexicons/com/atproto/repo/createRecord.json new file mode 100644 index 0000000000..de5f4081ff --- /dev/null +++ b/lexicons/com/atproto/repo/createRecord.json @@ -0,0 +1,73 @@ +{ + "lexicon": 1, + "id": "com.atproto.repo.createRecord", + "defs": { + "main": { + "type": "procedure", + "description": "Create a single new repository record. Requires auth, implemented by PDS.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["repo", "collection", "record"], + "properties": { + "repo": { + "type": "string", + "format": "at-identifier", + "description": "The handle or DID of the repo (aka, current account)." + }, + "collection": { + "type": "string", + "format": "nsid", + "description": "The NSID of the record collection." + }, + "rkey": { + "type": "string", + "format": "record-key", + "description": "The Record Key.", + "maxLength": 512 + }, + "validate": { + "type": "boolean", + "description": "Can be set to 'false' to skip Lexicon schema validation of record data, 'true' to require it, or leave unset to validate only for known Lexicons." + }, + "record": { + "type": "unknown", + "description": "The record itself. Must contain a $type field." + }, + "swapCommit": { + "type": "string", + "format": "cid", + "description": "Compare and swap with the previous commit by CID." + } + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["uri", "cid"], + "properties": { + "uri": { "type": "string", "format": "at-uri" }, + "cid": { "type": "string", "format": "cid" }, + "commit": { + "type": "ref", + "ref": "com.atproto.repo.defs#commitMeta" + }, + "validationStatus": { + "type": "string", + "knownValues": ["valid", "unknown"] + } + } + } + }, + "errors": [ + { + "name": "InvalidSwap", + "description": "Indicates that 'swapCommit' didn't match current repo commit." + } + ] + } + } +} diff --git a/lexicons/com/atproto/repo/defs.json b/lexicons/com/atproto/repo/defs.json new file mode 100644 index 0000000000..8752599f61 --- /dev/null +++ b/lexicons/com/atproto/repo/defs.json @@ -0,0 +1,14 @@ +{ + "lexicon": 1, + "id": "com.atproto.repo.defs", + "defs": { + "commitMeta": { + "type": "object", + "required": ["cid", "rev"], + "properties": { + "cid": { "type": "string", "format": "cid" }, + "rev": { "type": "string", "format": "tid" } + } + } + } +} diff --git a/lexicons/com/atproto/repo/deleteRecord.json b/lexicons/com/atproto/repo/deleteRecord.json new file mode 100644 index 0000000000..9831da17ca --- /dev/null +++ b/lexicons/com/atproto/repo/deleteRecord.json @@ -0,0 +1,57 @@ +{ + "lexicon": 1, + "id": "com.atproto.repo.deleteRecord", + "defs": { + "main": { + "type": "procedure", + "description": "Delete a repository record, or ensure it doesn't exist. Requires auth, implemented by PDS.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["repo", "collection", "rkey"], + "properties": { + "repo": { + "type": "string", + "format": "at-identifier", + "description": "The handle or DID of the repo (aka, current account)." + }, + "collection": { + "type": "string", + "format": "nsid", + "description": "The NSID of the record collection." + }, + "rkey": { + "type": "string", + "format": "record-key", + "description": "The Record Key." + }, + "swapRecord": { + "type": "string", + "format": "cid", + "description": "Compare and swap with the previous record by CID." + }, + "swapCommit": { + "type": "string", + "format": "cid", + "description": "Compare and swap with the previous commit by CID." + } + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "properties": { + "commit": { + "type": "ref", + "ref": "com.atproto.repo.defs#commitMeta" + } + } + } + }, + "errors": [{ "name": "InvalidSwap" }] + } + } +} diff --git a/lexicons/com/atproto/repo/describeRepo.json b/lexicons/com/atproto/repo/describeRepo.json new file mode 100644 index 0000000000..b1ce2b6cf9 --- /dev/null +++ b/lexicons/com/atproto/repo/describeRepo.json @@ -0,0 +1,51 @@ +{ + "lexicon": 1, + "id": "com.atproto.repo.describeRepo", + "defs": { + "main": { + "type": "query", + "description": "Get information about an account and repository, including the list of collections. Does not require auth.", + "parameters": { + "type": "params", + "required": ["repo"], + "properties": { + "repo": { + "type": "string", + "format": "at-identifier", + "description": "The handle or DID of the repo." + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "handle", + "did", + "didDoc", + "collections", + "handleIsCorrect" + ], + "properties": { + "handle": { "type": "string", "format": "handle" }, + "did": { "type": "string", "format": "did" }, + "didDoc": { + "type": "unknown", + "description": "The complete DID document for this account." + }, + "collections": { + "type": "array", + "description": "List of all the collections (NSIDs) for which this repo contains at least one record.", + "items": { "type": "string", "format": "nsid" } + }, + "handleIsCorrect": { + "type": "boolean", + "description": "Indicates if handle is currently valid (resolves bi-directionally)" + } + } + } + } + } + } +} diff --git a/lexicons/com/atproto/repo/getRecord.json b/lexicons/com/atproto/repo/getRecord.json new file mode 100644 index 0000000000..388b9c5adb --- /dev/null +++ b/lexicons/com/atproto/repo/getRecord.json @@ -0,0 +1,49 @@ +{ + "lexicon": 1, + "id": "com.atproto.repo.getRecord", + "defs": { + "main": { + "type": "query", + "description": "Get a single record from a repository. Does not require auth.", + "parameters": { + "type": "params", + "required": ["repo", "collection", "rkey"], + "properties": { + "repo": { + "type": "string", + "format": "at-identifier", + "description": "The handle or DID of the repo." + }, + "collection": { + "type": "string", + "format": "nsid", + "description": "The NSID of the record collection." + }, + "rkey": { + "type": "string", + "description": "The Record Key.", + "format": "record-key" + }, + "cid": { + "type": "string", + "format": "cid", + "description": "The CID of the version of the record. If not specified, then return the most recent version." + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["uri", "value"], + "properties": { + "uri": { "type": "string", "format": "at-uri" }, + "cid": { "type": "string", "format": "cid" }, + "value": { "type": "unknown" } + } + } + }, + "errors": [{ "name": "RecordNotFound" }] + } + } +} diff --git a/lexicons/com/atproto/repo/importRepo.json b/lexicons/com/atproto/repo/importRepo.json new file mode 100644 index 0000000000..fc850b1a2b --- /dev/null +++ b/lexicons/com/atproto/repo/importRepo.json @@ -0,0 +1,13 @@ +{ + "lexicon": 1, + "id": "com.atproto.repo.importRepo", + "defs": { + "main": { + "type": "procedure", + "description": "Import a repo in the form of a CAR file. Requires Content-Length HTTP header to be set.", + "input": { + "encoding": "application/vnd.ipld.car" + } + } + } +} diff --git a/lexicons/com/atproto/repo/listMissingBlobs.json b/lexicons/com/atproto/repo/listMissingBlobs.json new file mode 100644 index 0000000000..c39913d566 --- /dev/null +++ b/lexicons/com/atproto/repo/listMissingBlobs.json @@ -0,0 +1,44 @@ +{ + "lexicon": 1, + "id": "com.atproto.repo.listMissingBlobs", + "defs": { + "main": { + "type": "query", + "description": "Returns a list of missing blobs for the requesting account. Intended to be used in the account migration flow.", + "parameters": { + "type": "params", + "properties": { + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 1000, + "default": 500 + }, + "cursor": { "type": "string" } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["blobs"], + "properties": { + "cursor": { "type": "string" }, + "blobs": { + "type": "array", + "items": { "type": "ref", "ref": "#recordBlob" } + } + } + } + } + }, + "recordBlob": { + "type": "object", + "required": ["cid", "recordUri"], + "properties": { + "cid": { "type": "string", "format": "cid" }, + "recordUri": { "type": "string", "format": "at-uri" } + } + } + } +} diff --git a/lexicons/com/atproto/repo/listRecords.json b/lexicons/com/atproto/repo/listRecords.json new file mode 100644 index 0000000000..3d43ff40b8 --- /dev/null +++ b/lexicons/com/atproto/repo/listRecords.json @@ -0,0 +1,61 @@ +{ + "lexicon": 1, + "id": "com.atproto.repo.listRecords", + "defs": { + "main": { + "type": "query", + "description": "List a range of records in a repository, matching a specific collection. Does not require auth.", + "parameters": { + "type": "params", + "required": ["repo", "collection"], + "properties": { + "repo": { + "type": "string", + "format": "at-identifier", + "description": "The handle or DID of the repo." + }, + "collection": { + "type": "string", + "format": "nsid", + "description": "The NSID of the record type." + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50, + "description": "The number of records to return." + }, + "cursor": { "type": "string" }, + "reverse": { + "type": "boolean", + "description": "Flag to reverse the order of the returned records." + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["records"], + "properties": { + "cursor": { "type": "string" }, + "records": { + "type": "array", + "items": { "type": "ref", "ref": "#record" } + } + } + } + } + }, + "record": { + "type": "object", + "required": ["uri", "cid", "value"], + "properties": { + "uri": { "type": "string", "format": "at-uri" }, + "cid": { "type": "string", "format": "cid" }, + "value": { "type": "unknown" } + } + } + } +} diff --git a/lexicons/com/atproto/repo/putRecord.json b/lexicons/com/atproto/repo/putRecord.json new file mode 100644 index 0000000000..830fade52b --- /dev/null +++ b/lexicons/com/atproto/repo/putRecord.json @@ -0,0 +1,74 @@ +{ + "lexicon": 1, + "id": "com.atproto.repo.putRecord", + "defs": { + "main": { + "type": "procedure", + "description": "Write a repository record, creating or updating it as needed. Requires auth, implemented by PDS.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["repo", "collection", "rkey", "record"], + "nullable": ["swapRecord"], + "properties": { + "repo": { + "type": "string", + "format": "at-identifier", + "description": "The handle or DID of the repo (aka, current account)." + }, + "collection": { + "type": "string", + "format": "nsid", + "description": "The NSID of the record collection." + }, + "rkey": { + "type": "string", + "format": "record-key", + "description": "The Record Key.", + "maxLength": 512 + }, + "validate": { + "type": "boolean", + "description": "Can be set to 'false' to skip Lexicon schema validation of record data, 'true' to require it, or leave unset to validate only for known Lexicons." + }, + "record": { + "type": "unknown", + "description": "The record to write." + }, + "swapRecord": { + "type": "string", + "format": "cid", + "description": "Compare and swap with the previous record by CID. WARNING: nullable and optional field; may cause problems with golang implementation" + }, + "swapCommit": { + "type": "string", + "format": "cid", + "description": "Compare and swap with the previous commit by CID." + } + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["uri", "cid"], + "properties": { + "uri": { "type": "string", "format": "at-uri" }, + "cid": { "type": "string", "format": "cid" }, + "commit": { + "type": "ref", + "ref": "com.atproto.repo.defs#commitMeta" + }, + "validationStatus": { + "type": "string", + "knownValues": ["valid", "unknown"] + } + } + } + }, + "errors": [{ "name": "InvalidSwap" }] + } + } +} diff --git a/lexicons/com/atproto/repo/strongRef.json b/lexicons/com/atproto/repo/strongRef.json new file mode 100644 index 0000000000..cb79625165 --- /dev/null +++ b/lexicons/com/atproto/repo/strongRef.json @@ -0,0 +1,15 @@ +{ + "lexicon": 1, + "id": "com.atproto.repo.strongRef", + "description": "A URI with a content-hash fingerprint.", + "defs": { + "main": { + "type": "object", + "required": ["uri", "cid"], + "properties": { + "uri": { "type": "string", "format": "at-uri" }, + "cid": { "type": "string", "format": "cid" } + } + } + } +} diff --git a/lexicons/com/atproto/repo/uploadBlob.json b/lexicons/com/atproto/repo/uploadBlob.json new file mode 100644 index 0000000000..547a995a05 --- /dev/null +++ b/lexicons/com/atproto/repo/uploadBlob.json @@ -0,0 +1,23 @@ +{ + "lexicon": 1, + "id": "com.atproto.repo.uploadBlob", + "defs": { + "main": { + "type": "procedure", + "description": "Upload a new blob, to be referenced from a repository record. The blob will be deleted if it is not referenced within a time window (eg, minutes). Blob restrictions (mimetype, size, etc) are enforced when the reference is created. Requires auth, implemented by PDS.", + "input": { + "encoding": "*/*" + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["blob"], + "properties": { + "blob": { "type": "blob" } + } + } + } + } + } +} diff --git a/lexicons/com/atproto/server/activateAccount.json b/lexicons/com/atproto/server/activateAccount.json new file mode 100644 index 0000000000..e06935fcd0 --- /dev/null +++ b/lexicons/com/atproto/server/activateAccount.json @@ -0,0 +1,10 @@ +{ + "lexicon": 1, + "id": "com.atproto.server.activateAccount", + "defs": { + "main": { + "type": "procedure", + "description": "Activates a currently deactivated account. Used to finalize account migration after the account's repo is imported and identity is setup." + } + } +} diff --git a/lexicons/com/atproto/server/checkAccountStatus.json b/lexicons/com/atproto/server/checkAccountStatus.json new file mode 100644 index 0000000000..d34596e60e --- /dev/null +++ b/lexicons/com/atproto/server/checkAccountStatus.json @@ -0,0 +1,38 @@ +{ + "lexicon": 1, + "id": "com.atproto.server.checkAccountStatus", + "defs": { + "main": { + "type": "query", + "description": "Returns the status of an account, especially as pertaining to import or recovery. Can be called many times over the course of an account migration. Requires auth and can only be called pertaining to oneself.", + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "activated", + "validDid", + "repoCommit", + "repoRev", + "repoBlocks", + "indexedRecords", + "privateStateValues", + "expectedBlobs", + "importedBlobs" + ], + "properties": { + "activated": { "type": "boolean" }, + "validDid": { "type": "boolean" }, + "repoCommit": { "type": "string", "format": "cid" }, + "repoRev": { "type": "string" }, + "repoBlocks": { "type": "integer" }, + "indexedRecords": { "type": "integer" }, + "privateStateValues": { "type": "integer" }, + "expectedBlobs": { "type": "integer" }, + "importedBlobs": { "type": "integer" } + } + } + } + } + } +} diff --git a/lexicons/com/atproto/server/confirmEmail.json b/lexicons/com/atproto/server/confirmEmail.json new file mode 100644 index 0000000000..6c2e4291f7 --- /dev/null +++ b/lexicons/com/atproto/server/confirmEmail.json @@ -0,0 +1,27 @@ +{ + "lexicon": 1, + "id": "com.atproto.server.confirmEmail", + "defs": { + "main": { + "type": "procedure", + "description": "Confirm an email using a token from com.atproto.server.requestEmailConfirmation.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["email", "token"], + "properties": { + "email": { "type": "string" }, + "token": { "type": "string" } + } + } + }, + "errors": [ + { "name": "AccountNotFound" }, + { "name": "ExpiredToken" }, + { "name": "InvalidToken" }, + { "name": "InvalidEmail" } + ] + } + } +} diff --git a/lexicons/com/atproto/server/createAccount.json b/lexicons/com/atproto/server/createAccount.json new file mode 100644 index 0000000000..b32bbe1569 --- /dev/null +++ b/lexicons/com/atproto/server/createAccount.json @@ -0,0 +1,76 @@ +{ + "lexicon": 1, + "id": "com.atproto.server.createAccount", + "defs": { + "main": { + "type": "procedure", + "description": "Create an account. Implemented by PDS.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["handle"], + "properties": { + "email": { "type": "string" }, + "handle": { + "type": "string", + "format": "handle", + "description": "Requested handle for the account." + }, + "did": { + "type": "string", + "format": "did", + "description": "Pre-existing atproto DID, being imported to a new account." + }, + "inviteCode": { "type": "string" }, + "verificationCode": { "type": "string" }, + "verificationPhone": { "type": "string" }, + "password": { + "type": "string", + "description": "Initial account password. May need to meet instance-specific password strength requirements." + }, + "recoveryKey": { + "type": "string", + "description": "DID PLC rotation key (aka, recovery key) to be included in PLC creation operation." + }, + "plcOp": { + "type": "unknown", + "description": "A signed DID PLC operation to be submitted as part of importing an existing account to this instance. NOTE: this optional field may be updated when full account migration is implemented." + } + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "description": "Account login session returned on successful account creation.", + "required": ["accessJwt", "refreshJwt", "handle", "did"], + "properties": { + "accessJwt": { "type": "string" }, + "refreshJwt": { "type": "string" }, + "handle": { "type": "string", "format": "handle" }, + "did": { + "type": "string", + "format": "did", + "description": "The DID of the new account." + }, + "didDoc": { + "type": "unknown", + "description": "Complete DID document." + } + } + } + }, + "errors": [ + { "name": "InvalidHandle" }, + { "name": "InvalidPassword" }, + { "name": "InvalidInviteCode" }, + { "name": "HandleNotAvailable" }, + { "name": "UnsupportedDomain" }, + { "name": "UnresolvableDid" }, + { "name": "IncompatibleDidDoc" } + ] + } + } +} diff --git a/lexicons/com/atproto/server/createAppPassword.json b/lexicons/com/atproto/server/createAppPassword.json new file mode 100644 index 0000000000..f40cf59a12 --- /dev/null +++ b/lexicons/com/atproto/server/createAppPassword.json @@ -0,0 +1,45 @@ +{ + "lexicon": 1, + "id": "com.atproto.server.createAppPassword", + "defs": { + "main": { + "type": "procedure", + "description": "Create an App Password.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["name"], + "properties": { + "name": { + "type": "string", + "description": "A short name for the App Password, to help distinguish them." + }, + "privileged": { + "type": "boolean", + "description": "If an app password has 'privileged' access to possibly sensitive account state. Meant for use with trusted clients." + } + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "ref", + "ref": "#appPassword" + } + }, + "errors": [{ "name": "AccountTakedown" }] + }, + "appPassword": { + "type": "object", + "required": ["name", "password", "createdAt"], + "properties": { + "name": { "type": "string" }, + "password": { "type": "string" }, + "createdAt": { "type": "string", "format": "datetime" }, + "privileged": { "type": "boolean" } + } + } + } +} diff --git a/lexicons/com/atproto/server/createInviteCode.json b/lexicons/com/atproto/server/createInviteCode.json new file mode 100644 index 0000000000..5ce5dbe39f --- /dev/null +++ b/lexicons/com/atproto/server/createInviteCode.json @@ -0,0 +1,31 @@ +{ + "lexicon": 1, + "id": "com.atproto.server.createInviteCode", + "defs": { + "main": { + "type": "procedure", + "description": "Create an invite code.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["useCount"], + "properties": { + "useCount": { "type": "integer" }, + "forAccount": { "type": "string", "format": "did" } + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["code"], + "properties": { + "code": { "type": "string" } + } + } + } + } + } +} diff --git a/lexicons/com/atproto/server/createInviteCodes.json b/lexicons/com/atproto/server/createInviteCodes.json new file mode 100644 index 0000000000..1965fe995f --- /dev/null +++ b/lexicons/com/atproto/server/createInviteCodes.json @@ -0,0 +1,49 @@ +{ + "lexicon": 1, + "id": "com.atproto.server.createInviteCodes", + "defs": { + "main": { + "type": "procedure", + "description": "Create invite codes.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["codeCount", "useCount"], + "properties": { + "codeCount": { "type": "integer", "default": 1 }, + "useCount": { "type": "integer" }, + "forAccounts": { + "type": "array", + "items": { "type": "string", "format": "did" } + } + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["codes"], + "properties": { + "codes": { + "type": "array", + "items": { "type": "ref", "ref": "#accountCodes" } + } + } + } + } + }, + "accountCodes": { + "type": "object", + "required": ["account", "codes"], + "properties": { + "account": { "type": "string" }, + "codes": { + "type": "array", + "items": { "type": "string" } + } + } + } + } +} diff --git a/lexicons/com/atproto/server/createSession.json b/lexicons/com/atproto/server/createSession.json new file mode 100644 index 0000000000..8cde0863aa --- /dev/null +++ b/lexicons/com/atproto/server/createSession.json @@ -0,0 +1,56 @@ +{ + "lexicon": 1, + "id": "com.atproto.server.createSession", + "defs": { + "main": { + "type": "procedure", + "description": "Create an authentication session.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["identifier", "password"], + "properties": { + "identifier": { + "type": "string", + "description": "Handle or other identifier supported by the server for the authenticating user." + }, + "password": { "type": "string" }, + "authFactorToken": { "type": "string" }, + "allowTakendown": { + "type": "boolean", + "description": "When true, instead of throwing error for takendown accounts, a valid response with a narrow scoped token will be returned" + } + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["accessJwt", "refreshJwt", "handle", "did"], + "properties": { + "accessJwt": { "type": "string" }, + "refreshJwt": { "type": "string" }, + "handle": { "type": "string", "format": "handle" }, + "did": { "type": "string", "format": "did" }, + "didDoc": { "type": "unknown" }, + "email": { "type": "string" }, + "emailConfirmed": { "type": "boolean" }, + "emailAuthFactor": { "type": "boolean" }, + "active": { "type": "boolean" }, + "status": { + "type": "string", + "description": "If active=false, this optional field indicates a possible reason for why the account is not active. If active=false and no status is supplied, then the host makes no claim for why the repository is no longer being hosted.", + "knownValues": ["takendown", "suspended", "deactivated"] + } + } + } + }, + "errors": [ + { "name": "AccountTakedown" }, + { "name": "AuthFactorTokenRequired" } + ] + } + } +} diff --git a/lexicons/com/atproto/server/deactivateAccount.json b/lexicons/com/atproto/server/deactivateAccount.json new file mode 100644 index 0000000000..698fccf202 --- /dev/null +++ b/lexicons/com/atproto/server/deactivateAccount.json @@ -0,0 +1,23 @@ +{ + "lexicon": 1, + "id": "com.atproto.server.deactivateAccount", + "defs": { + "main": { + "type": "procedure", + "description": "Deactivates a currently active account. Stops serving of repo, and future writes to repo until reactivated. Used to finalize account migration with the old host after the account has been activated on the new host.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "properties": { + "deleteAfter": { + "type": "string", + "format": "datetime", + "description": "A recommendation to server as to how long they should hold onto the deactivated account before deleting." + } + } + } + } + } + } +} diff --git a/lexicons/com/atproto/server/defs.json b/lexicons/com/atproto/server/defs.json new file mode 100644 index 0000000000..8686d4d410 --- /dev/null +++ b/lexicons/com/atproto/server/defs.json @@ -0,0 +1,38 @@ +{ + "lexicon": 1, + "id": "com.atproto.server.defs", + "defs": { + "inviteCode": { + "type": "object", + "required": [ + "code", + "available", + "disabled", + "forAccount", + "createdBy", + "createdAt", + "uses" + ], + "properties": { + "code": { "type": "string" }, + "available": { "type": "integer" }, + "disabled": { "type": "boolean" }, + "forAccount": { "type": "string" }, + "createdBy": { "type": "string" }, + "createdAt": { "type": "string", "format": "datetime" }, + "uses": { + "type": "array", + "items": { "type": "ref", "ref": "#inviteCodeUse" } + } + } + }, + "inviteCodeUse": { + "type": "object", + "required": ["usedBy", "usedAt"], + "properties": { + "usedBy": { "type": "string", "format": "did" }, + "usedAt": { "type": "string", "format": "datetime" } + } + } + } +} diff --git a/lexicons/com/atproto/server/deleteAccount.json b/lexicons/com/atproto/server/deleteAccount.json new file mode 100644 index 0000000000..cf4babfe7d --- /dev/null +++ b/lexicons/com/atproto/server/deleteAccount.json @@ -0,0 +1,23 @@ +{ + "lexicon": 1, + "id": "com.atproto.server.deleteAccount", + "defs": { + "main": { + "type": "procedure", + "description": "Delete an actor's account with a token and password. Can only be called after requesting a deletion token. Requires auth.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["did", "password", "token"], + "properties": { + "did": { "type": "string", "format": "did" }, + "password": { "type": "string" }, + "token": { "type": "string" } + } + } + }, + "errors": [{ "name": "ExpiredToken" }, { "name": "InvalidToken" }] + } + } +} diff --git a/lexicons/com/atproto/server/deleteSession.json b/lexicons/com/atproto/server/deleteSession.json new file mode 100644 index 0000000000..807a89dc9b --- /dev/null +++ b/lexicons/com/atproto/server/deleteSession.json @@ -0,0 +1,10 @@ +{ + "lexicon": 1, + "id": "com.atproto.server.deleteSession", + "defs": { + "main": { + "type": "procedure", + "description": "Delete the current session. Requires auth." + } + } +} diff --git a/lexicons/com/atproto/server/describeServer.json b/lexicons/com/atproto/server/describeServer.json new file mode 100644 index 0000000000..bbecf651e8 --- /dev/null +++ b/lexicons/com/atproto/server/describeServer.json @@ -0,0 +1,59 @@ +{ + "lexicon": 1, + "id": "com.atproto.server.describeServer", + "defs": { + "main": { + "type": "query", + "description": "Describes the server's account creation requirements and capabilities. Implemented by PDS.", + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["did", "availableUserDomains"], + "properties": { + "inviteCodeRequired": { + "type": "boolean", + "description": "If true, an invite code must be supplied to create an account on this instance." + }, + "phoneVerificationRequired": { + "type": "boolean", + "description": "If true, a phone verification token must be supplied to create an account on this instance." + }, + "availableUserDomains": { + "type": "array", + "description": "List of domain suffixes that can be used in account handles.", + "items": { "type": "string" } + }, + "links": { + "type": "ref", + "description": "URLs of service policy documents.", + "ref": "#links" + }, + "contact": { + "type": "ref", + "description": "Contact information", + "ref": "#contact" + }, + "did": { + "type": "string", + "format": "did" + } + } + } + } + }, + "links": { + "type": "object", + "properties": { + "privacyPolicy": { "type": "string", "format": "uri" }, + "termsOfService": { "type": "string", "format": "uri" } + } + }, + "contact": { + "type": "object", + "properties": { + "email": { "type": "string" } + } + } + } +} diff --git a/lexicons/com/atproto/server/getAccountInviteCodes.json b/lexicons/com/atproto/server/getAccountInviteCodes.json new file mode 100644 index 0000000000..72f0822703 --- /dev/null +++ b/lexicons/com/atproto/server/getAccountInviteCodes.json @@ -0,0 +1,38 @@ +{ + "lexicon": 1, + "id": "com.atproto.server.getAccountInviteCodes", + "defs": { + "main": { + "type": "query", + "description": "Get all invite codes for the current account. Requires auth.", + "parameters": { + "type": "params", + "properties": { + "includeUsed": { "type": "boolean", "default": true }, + "createAvailable": { + "type": "boolean", + "default": true, + "description": "Controls whether any new 'earned' but not 'created' invites should be created." + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["codes"], + "properties": { + "codes": { + "type": "array", + "items": { + "type": "ref", + "ref": "com.atproto.server.defs#inviteCode" + } + } + } + } + }, + "errors": [{ "name": "DuplicateCreate" }] + } + } +} diff --git a/lexicons/com/atproto/server/getServiceAuth.json b/lexicons/com/atproto/server/getServiceAuth.json new file mode 100644 index 0000000000..37c150d79e --- /dev/null +++ b/lexicons/com/atproto/server/getServiceAuth.json @@ -0,0 +1,48 @@ +{ + "lexicon": 1, + "id": "com.atproto.server.getServiceAuth", + "defs": { + "main": { + "type": "query", + "description": "Get a signed token on behalf of the requesting DID for the requested service.", + "parameters": { + "type": "params", + "required": ["aud"], + "properties": { + "aud": { + "type": "string", + "format": "did", + "description": "The DID of the service that the token will be used to authenticate with" + }, + "exp": { + "type": "integer", + "description": "The time in Unix Epoch seconds that the JWT expires. Defaults to 60 seconds in the future. The service may enforce certain time bounds on tokens depending on the requested scope." + }, + "lxm": { + "type": "string", + "format": "nsid", + "description": "Lexicon (XRPC) method to bind the requested token to" + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["token"], + "properties": { + "token": { + "type": "string" + } + } + } + }, + "errors": [ + { + "name": "BadExpiration", + "description": "Indicates that the requested expiration date is not a valid. May be in the past or may be reliant on the requested scopes." + } + ] + } + } +} diff --git a/lexicons/com/atproto/server/getSession.json b/lexicons/com/atproto/server/getSession.json new file mode 100644 index 0000000000..86efa7466c --- /dev/null +++ b/lexicons/com/atproto/server/getSession.json @@ -0,0 +1,31 @@ +{ + "lexicon": 1, + "id": "com.atproto.server.getSession", + "defs": { + "main": { + "type": "query", + "description": "Get information about the current auth session. Requires auth.", + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["handle", "did"], + "properties": { + "handle": { "type": "string", "format": "handle" }, + "did": { "type": "string", "format": "did" }, + "email": { "type": "string" }, + "emailConfirmed": { "type": "boolean" }, + "emailAuthFactor": { "type": "boolean" }, + "didDoc": { "type": "unknown" }, + "active": { "type": "boolean" }, + "status": { + "type": "string", + "description": "If active=false, this optional field indicates a possible reason for why the account is not active. If active=false and no status is supplied, then the host makes no claim for why the repository is no longer being hosted.", + "knownValues": ["takendown", "suspended", "deactivated"] + } + } + } + } + } + } +} diff --git a/lexicons/com/atproto/server/listAppPasswords.json b/lexicons/com/atproto/server/listAppPasswords.json new file mode 100644 index 0000000000..1c2ae629a3 --- /dev/null +++ b/lexicons/com/atproto/server/listAppPasswords.json @@ -0,0 +1,33 @@ +{ + "lexicon": 1, + "id": "com.atproto.server.listAppPasswords", + "defs": { + "main": { + "type": "query", + "description": "List all App Passwords.", + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["passwords"], + "properties": { + "passwords": { + "type": "array", + "items": { "type": "ref", "ref": "#appPassword" } + } + } + } + }, + "errors": [{ "name": "AccountTakedown" }] + }, + "appPassword": { + "type": "object", + "required": ["name", "createdAt"], + "properties": { + "name": { "type": "string" }, + "createdAt": { "type": "string", "format": "datetime" }, + "privileged": { "type": "boolean" } + } + } + } +} diff --git a/lexicons/com/atproto/server/refreshSession.json b/lexicons/com/atproto/server/refreshSession.json new file mode 100644 index 0000000000..71123a4f91 --- /dev/null +++ b/lexicons/com/atproto/server/refreshSession.json @@ -0,0 +1,31 @@ +{ + "lexicon": 1, + "id": "com.atproto.server.refreshSession", + "defs": { + "main": { + "type": "procedure", + "description": "Refresh an authentication session. Requires auth using the 'refreshJwt' (not the 'accessJwt').", + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["accessJwt", "refreshJwt", "handle", "did"], + "properties": { + "accessJwt": { "type": "string" }, + "refreshJwt": { "type": "string" }, + "handle": { "type": "string", "format": "handle" }, + "did": { "type": "string", "format": "did" }, + "didDoc": { "type": "unknown" }, + "active": { "type": "boolean" }, + "status": { + "type": "string", + "description": "Hosting status of the account. If not specified, then assume 'active'.", + "knownValues": ["takendown", "suspended", "deactivated"] + } + } + } + }, + "errors": [{ "name": "AccountTakedown" }] + } + } +} diff --git a/lexicons/com/atproto/server/requestAccountDelete.json b/lexicons/com/atproto/server/requestAccountDelete.json new file mode 100644 index 0000000000..aaac0b70ec --- /dev/null +++ b/lexicons/com/atproto/server/requestAccountDelete.json @@ -0,0 +1,10 @@ +{ + "lexicon": 1, + "id": "com.atproto.server.requestAccountDelete", + "defs": { + "main": { + "type": "procedure", + "description": "Initiate a user account deletion via email." + } + } +} diff --git a/lexicons/com/atproto/server/requestEmailConfirmation.json b/lexicons/com/atproto/server/requestEmailConfirmation.json new file mode 100644 index 0000000000..0020ed3160 --- /dev/null +++ b/lexicons/com/atproto/server/requestEmailConfirmation.json @@ -0,0 +1,10 @@ +{ + "lexicon": 1, + "id": "com.atproto.server.requestEmailConfirmation", + "defs": { + "main": { + "type": "procedure", + "description": "Request an email with a code to confirm ownership of email." + } + } +} diff --git a/lexicons/com/atproto/server/requestEmailUpdate.json b/lexicons/com/atproto/server/requestEmailUpdate.json new file mode 100644 index 0000000000..4cc1a86f61 --- /dev/null +++ b/lexicons/com/atproto/server/requestEmailUpdate.json @@ -0,0 +1,20 @@ +{ + "lexicon": 1, + "id": "com.atproto.server.requestEmailUpdate", + "defs": { + "main": { + "type": "procedure", + "description": "Request a token in order to update email.", + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["tokenRequired"], + "properties": { + "tokenRequired": { "type": "boolean" } + } + } + } + } + } +} diff --git a/lexicons/com/atproto/server/requestPasswordReset.json b/lexicons/com/atproto/server/requestPasswordReset.json new file mode 100644 index 0000000000..41f717e9c2 --- /dev/null +++ b/lexicons/com/atproto/server/requestPasswordReset.json @@ -0,0 +1,20 @@ +{ + "lexicon": 1, + "id": "com.atproto.server.requestPasswordReset", + "defs": { + "main": { + "type": "procedure", + "description": "Initiate a user account password reset via email.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["email"], + "properties": { + "email": { "type": "string" } + } + } + } + } + } +} diff --git a/lexicons/com/atproto/server/reserveSigningKey.json b/lexicons/com/atproto/server/reserveSigningKey.json new file mode 100644 index 0000000000..a33e1ede68 --- /dev/null +++ b/lexicons/com/atproto/server/reserveSigningKey.json @@ -0,0 +1,36 @@ +{ + "lexicon": 1, + "id": "com.atproto.server.reserveSigningKey", + "defs": { + "main": { + "type": "procedure", + "description": "Reserve a repo signing key, for use with account creation. Necessary so that a DID PLC update operation can be constructed during an account migraiton. Public and does not require auth; implemented by PDS. NOTE: this endpoint may change when full account migration is implemented.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "properties": { + "did": { + "type": "string", + "format": "did", + "description": "The DID to reserve a key for." + } + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["signingKey"], + "properties": { + "signingKey": { + "type": "string", + "description": "The public key for the reserved signing key, in did:key serialization." + } + } + } + } + } + } +} diff --git a/lexicons/com/atproto/server/resetPassword.json b/lexicons/com/atproto/server/resetPassword.json new file mode 100644 index 0000000000..cdf7fe3ef0 --- /dev/null +++ b/lexicons/com/atproto/server/resetPassword.json @@ -0,0 +1,22 @@ +{ + "lexicon": 1, + "id": "com.atproto.server.resetPassword", + "defs": { + "main": { + "type": "procedure", + "description": "Reset a user account password using a token.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["token", "password"], + "properties": { + "token": { "type": "string" }, + "password": { "type": "string" } + } + } + }, + "errors": [{ "name": "ExpiredToken" }, { "name": "InvalidToken" }] + } + } +} diff --git a/lexicons/com/atproto/server/revokeAppPassword.json b/lexicons/com/atproto/server/revokeAppPassword.json new file mode 100644 index 0000000000..bcfd3d864e --- /dev/null +++ b/lexicons/com/atproto/server/revokeAppPassword.json @@ -0,0 +1,20 @@ +{ + "lexicon": 1, + "id": "com.atproto.server.revokeAppPassword", + "defs": { + "main": { + "type": "procedure", + "description": "Revoke an App Password by name.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["name"], + "properties": { + "name": { "type": "string" } + } + } + } + } + } +} diff --git a/lexicons/com/atproto/server/updateEmail.json b/lexicons/com/atproto/server/updateEmail.json new file mode 100644 index 0000000000..7d90247ab3 --- /dev/null +++ b/lexicons/com/atproto/server/updateEmail.json @@ -0,0 +1,30 @@ +{ + "lexicon": 1, + "id": "com.atproto.server.updateEmail", + "defs": { + "main": { + "type": "procedure", + "description": "Update an account's email.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["email"], + "properties": { + "email": { "type": "string" }, + "emailAuthFactor": { "type": "boolean" }, + "token": { + "type": "string", + "description": "Requires a token from com.atproto.sever.requestEmailUpdate if the account's email has been confirmed." + } + } + } + }, + "errors": [ + { "name": "ExpiredToken" }, + { "name": "InvalidToken" }, + { "name": "TokenRequired" } + ] + } + } +} diff --git a/lexicons/com/atproto/sync/defs.json b/lexicons/com/atproto/sync/defs.json new file mode 100644 index 0000000000..44261ac556 --- /dev/null +++ b/lexicons/com/atproto/sync/defs.json @@ -0,0 +1,10 @@ +{ + "lexicon": 1, + "id": "com.atproto.sync.defs", + "defs": { + "hostStatus": { + "type": "string", + "knownValues": ["active", "idle", "offline", "throttled", "banned"] + } + } +} diff --git a/lexicons/com/atproto/sync/getBlob.json b/lexicons/com/atproto/sync/getBlob.json new file mode 100644 index 0000000000..501cba1ecc --- /dev/null +++ b/lexicons/com/atproto/sync/getBlob.json @@ -0,0 +1,36 @@ +{ + "lexicon": 1, + "id": "com.atproto.sync.getBlob", + "defs": { + "main": { + "type": "query", + "description": "Get a blob associated with a given account. Returns the full blob as originally uploaded. Does not require auth; implemented by PDS.", + "parameters": { + "type": "params", + "required": ["did", "cid"], + "properties": { + "did": { + "type": "string", + "format": "did", + "description": "The DID of the account." + }, + "cid": { + "type": "string", + "format": "cid", + "description": "The CID of the blob to fetch" + } + } + }, + "output": { + "encoding": "*/*" + }, + "errors": [ + { "name": "BlobNotFound" }, + { "name": "RepoNotFound" }, + { "name": "RepoTakendown" }, + { "name": "RepoSuspended" }, + { "name": "RepoDeactivated" } + ] + } + } +} diff --git a/lexicons/com/atproto/sync/getBlocks.json b/lexicons/com/atproto/sync/getBlocks.json new file mode 100644 index 0000000000..aa507d7434 --- /dev/null +++ b/lexicons/com/atproto/sync/getBlocks.json @@ -0,0 +1,35 @@ +{ + "lexicon": 1, + "id": "com.atproto.sync.getBlocks", + "defs": { + "main": { + "type": "query", + "description": "Get data blocks from a given repo, by CID. For example, intermediate MST nodes, or records. Does not require auth; implemented by PDS.", + "parameters": { + "type": "params", + "required": ["did", "cids"], + "properties": { + "did": { + "type": "string", + "format": "did", + "description": "The DID of the repo." + }, + "cids": { + "type": "array", + "items": { "type": "string", "format": "cid" } + } + } + }, + "output": { + "encoding": "application/vnd.ipld.car" + }, + "errors": [ + { "name": "BlockNotFound" }, + { "name": "RepoNotFound" }, + { "name": "RepoTakendown" }, + { "name": "RepoSuspended" }, + { "name": "RepoDeactivated" } + ] + } + } +} diff --git a/lexicons/com/atproto/sync/getCheckout.json b/lexicons/com/atproto/sync/getCheckout.json new file mode 100644 index 0000000000..b3fb375e5d --- /dev/null +++ b/lexicons/com/atproto/sync/getCheckout.json @@ -0,0 +1,24 @@ +{ + "lexicon": 1, + "id": "com.atproto.sync.getCheckout", + "defs": { + "main": { + "type": "query", + "description": "DEPRECATED - please use com.atproto.sync.getRepo instead", + "parameters": { + "type": "params", + "required": ["did"], + "properties": { + "did": { + "type": "string", + "format": "did", + "description": "The DID of the repo." + } + } + }, + "output": { + "encoding": "application/vnd.ipld.car" + } + } + } +} diff --git a/lexicons/com/atproto/sync/getHead.json b/lexicons/com/atproto/sync/getHead.json new file mode 100644 index 0000000000..31ed72cbae --- /dev/null +++ b/lexicons/com/atproto/sync/getHead.json @@ -0,0 +1,32 @@ +{ + "lexicon": 1, + "id": "com.atproto.sync.getHead", + "defs": { + "main": { + "type": "query", + "description": "DEPRECATED - please use com.atproto.sync.getLatestCommit instead", + "parameters": { + "type": "params", + "required": ["did"], + "properties": { + "did": { + "type": "string", + "format": "did", + "description": "The DID of the repo." + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["root"], + "properties": { + "root": { "type": "string", "format": "cid" } + } + } + }, + "errors": [{ "name": "HeadNotFound" }] + } + } +} diff --git a/lexicons/com/atproto/sync/getHostStatus.json b/lexicons/com/atproto/sync/getHostStatus.json new file mode 100644 index 0000000000..76759f29e8 --- /dev/null +++ b/lexicons/com/atproto/sync/getHostStatus.json @@ -0,0 +1,43 @@ +{ + "lexicon": 1, + "id": "com.atproto.sync.getHostStatus", + "defs": { + "main": { + "type": "query", + "description": "Returns information about a specified upstream host, as consumed by the server. Implemented by relays.", + "parameters": { + "type": "params", + "required": ["hostname"], + "properties": { + "hostname": { + "type": "string", + "description": "Hostname of the host (eg, PDS or relay) being queried." + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["hostname"], + "properties": { + "hostname": { "type": "string" }, + "seq": { + "type": "integer", + "description": "Recent repo stream event sequence number. May be delayed from actual stream processing (eg, persisted cursor not in-memory cursor)." + }, + "accountCount": { + "type": "integer", + "description": "Number of accounts on the server which are associated with the upstream host. Note that the upstream may actually have more accounts." + }, + "status": { + "type": "ref", + "ref": "com.atproto.sync.defs#hostStatus" + } + } + } + }, + "errors": [{ "name": "HostNotFound" }] + } + } +} diff --git a/lexicons/com/atproto/sync/getLatestCommit.json b/lexicons/com/atproto/sync/getLatestCommit.json new file mode 100644 index 0000000000..b20e631ae6 --- /dev/null +++ b/lexicons/com/atproto/sync/getLatestCommit.json @@ -0,0 +1,38 @@ +{ + "lexicon": 1, + "id": "com.atproto.sync.getLatestCommit", + "defs": { + "main": { + "type": "query", + "description": "Get the current commit CID & revision of the specified repo. Does not require auth.", + "parameters": { + "type": "params", + "required": ["did"], + "properties": { + "did": { + "type": "string", + "format": "did", + "description": "The DID of the repo." + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["cid", "rev"], + "properties": { + "cid": { "type": "string", "format": "cid" }, + "rev": { "type": "string", "format": "tid" } + } + } + }, + "errors": [ + { "name": "RepoNotFound" }, + { "name": "RepoTakendown" }, + { "name": "RepoSuspended" }, + { "name": "RepoDeactivated" } + ] + } + } +} diff --git a/lexicons/com/atproto/sync/getRecord.json b/lexicons/com/atproto/sync/getRecord.json new file mode 100644 index 0000000000..ecfc5acc4d --- /dev/null +++ b/lexicons/com/atproto/sync/getRecord.json @@ -0,0 +1,37 @@ +{ + "lexicon": 1, + "id": "com.atproto.sync.getRecord", + "defs": { + "main": { + "type": "query", + "description": "Get data blocks needed to prove the existence or non-existence of record in the current version of repo. Does not require auth.", + "parameters": { + "type": "params", + "required": ["did", "collection", "rkey"], + "properties": { + "did": { + "type": "string", + "format": "did", + "description": "The DID of the repo." + }, + "collection": { "type": "string", "format": "nsid" }, + "rkey": { + "type": "string", + "description": "Record Key", + "format": "record-key" + } + } + }, + "output": { + "encoding": "application/vnd.ipld.car" + }, + "errors": [ + { "name": "RecordNotFound" }, + { "name": "RepoNotFound" }, + { "name": "RepoTakendown" }, + { "name": "RepoSuspended" }, + { "name": "RepoDeactivated" } + ] + } + } +} diff --git a/lexicons/com/atproto/sync/getRepo.json b/lexicons/com/atproto/sync/getRepo.json new file mode 100644 index 0000000000..307202c27f --- /dev/null +++ b/lexicons/com/atproto/sync/getRepo.json @@ -0,0 +1,35 @@ +{ + "lexicon": 1, + "id": "com.atproto.sync.getRepo", + "defs": { + "main": { + "type": "query", + "description": "Download a repository export as CAR file. Optionally only a 'diff' since a previous revision. Does not require auth; implemented by PDS.", + "parameters": { + "type": "params", + "required": ["did"], + "properties": { + "did": { + "type": "string", + "format": "did", + "description": "The DID of the repo." + }, + "since": { + "type": "string", + "format": "tid", + "description": "The revision ('rev') of the repo to create a diff from." + } + } + }, + "output": { + "encoding": "application/vnd.ipld.car" + }, + "errors": [ + { "name": "RepoNotFound" }, + { "name": "RepoTakendown" }, + { "name": "RepoSuspended" }, + { "name": "RepoDeactivated" } + ] + } + } +} diff --git a/lexicons/com/atproto/sync/getRepoStatus.json b/lexicons/com/atproto/sync/getRepoStatus.json new file mode 100644 index 0000000000..347a710c7f --- /dev/null +++ b/lexicons/com/atproto/sync/getRepoStatus.json @@ -0,0 +1,50 @@ +{ + "lexicon": 1, + "id": "com.atproto.sync.getRepoStatus", + "defs": { + "main": { + "type": "query", + "description": "Get the hosting status for a repository, on this server. Expected to be implemented by PDS and Relay.", + "parameters": { + "type": "params", + "required": ["did"], + "properties": { + "did": { + "type": "string", + "format": "did", + "description": "The DID of the repo." + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["did", "active"], + "properties": { + "did": { "type": "string", "format": "did" }, + "active": { "type": "boolean" }, + "status": { + "type": "string", + "description": "If active=false, this optional field indicates a possible reason for why the account is not active. If active=false and no status is supplied, then the host makes no claim for why the repository is no longer being hosted.", + "knownValues": [ + "takendown", + "suspended", + "deleted", + "deactivated", + "desynchronized", + "throttled" + ] + }, + "rev": { + "type": "string", + "format": "tid", + "description": "Optional field, the current rev of the repo, if active=true" + } + } + } + }, + "errors": [{ "name": "RepoNotFound" }] + } + } +} diff --git a/lexicons/com/atproto/sync/listBlobs.json b/lexicons/com/atproto/sync/listBlobs.json new file mode 100644 index 0000000000..45a048d1b8 --- /dev/null +++ b/lexicons/com/atproto/sync/listBlobs.json @@ -0,0 +1,53 @@ +{ + "lexicon": 1, + "id": "com.atproto.sync.listBlobs", + "defs": { + "main": { + "type": "query", + "description": "List blob CIDs for an account, since some repo revision. Does not require auth; implemented by PDS.", + "parameters": { + "type": "params", + "required": ["did"], + "properties": { + "did": { + "type": "string", + "format": "did", + "description": "The DID of the repo." + }, + "since": { + "type": "string", + "format": "tid", + "description": "Optional revision of the repo to list blobs since." + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 1000, + "default": 500 + }, + "cursor": { "type": "string" } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["cids"], + "properties": { + "cursor": { "type": "string" }, + "cids": { + "type": "array", + "items": { "type": "string", "format": "cid" } + } + } + } + }, + "errors": [ + { "name": "RepoNotFound" }, + { "name": "RepoTakendown" }, + { "name": "RepoSuspended" }, + { "name": "RepoDeactivated" } + ] + } + } +} diff --git a/lexicons/com/atproto/sync/listHosts.json b/lexicons/com/atproto/sync/listHosts.json new file mode 100644 index 0000000000..3ae8e3983e --- /dev/null +++ b/lexicons/com/atproto/sync/listHosts.json @@ -0,0 +1,56 @@ +{ + "lexicon": 1, + "id": "com.atproto.sync.listHosts", + "defs": { + "main": { + "type": "query", + "description": "Enumerates upstream hosts (eg, PDS or relay instances) that this service consumes from. Implemented by relays.", + "parameters": { + "type": "params", + "properties": { + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 1000, + "default": 200 + }, + "cursor": { "type": "string" } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["hosts"], + "properties": { + "cursor": { "type": "string" }, + "hosts": { + "type": "array", + "items": { "type": "ref", "ref": "#host" }, + "description": "Sort order is not formally specified. Recommended order is by time host was first seen by the server, with oldest first." + } + } + } + } + }, + "host": { + "type": "object", + "required": ["hostname"], + "properties": { + "hostname": { + "type": "string", + "description": "hostname of server; not a URL (no scheme)" + }, + "seq": { + "type": "integer", + "description": "Recent repo stream event sequence number. May be delayed from actual stream processing (eg, persisted cursor not in-memory cursor)." + }, + "accountCount": { "type": "integer" }, + "status": { + "type": "ref", + "ref": "com.atproto.sync.defs#hostStatus" + } + } + } + } +} diff --git a/lexicons/com/atproto/sync/listRepos.json b/lexicons/com/atproto/sync/listRepos.json new file mode 100644 index 0000000000..8115bbd686 --- /dev/null +++ b/lexicons/com/atproto/sync/listRepos.json @@ -0,0 +1,62 @@ +{ + "lexicon": 1, + "id": "com.atproto.sync.listRepos", + "defs": { + "main": { + "type": "query", + "description": "Enumerates all the DID, rev, and commit CID for all repos hosted by this service. Does not require auth; implemented by PDS and Relay.", + "parameters": { + "type": "params", + "properties": { + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 1000, + "default": 500 + }, + "cursor": { "type": "string" } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["repos"], + "properties": { + "cursor": { "type": "string" }, + "repos": { + "type": "array", + "items": { "type": "ref", "ref": "#repo" } + } + } + } + } + }, + "repo": { + "type": "object", + "required": ["did", "head", "rev"], + "properties": { + "did": { "type": "string", "format": "did" }, + "head": { + "type": "string", + "format": "cid", + "description": "Current repo commit CID" + }, + "rev": { "type": "string", "format": "tid" }, + "active": { "type": "boolean" }, + "status": { + "type": "string", + "description": "If active=false, this optional field indicates a possible reason for why the account is not active. If active=false and no status is supplied, then the host makes no claim for why the repository is no longer being hosted.", + "knownValues": [ + "takendown", + "suspended", + "deleted", + "deactivated", + "desynchronized", + "throttled" + ] + } + } + } + } +} diff --git a/lexicons/com/atproto/sync/listReposByCollection.json b/lexicons/com/atproto/sync/listReposByCollection.json new file mode 100644 index 0000000000..0402772340 --- /dev/null +++ b/lexicons/com/atproto/sync/listReposByCollection.json @@ -0,0 +1,46 @@ +{ + "lexicon": 1, + "id": "com.atproto.sync.listReposByCollection", + "defs": { + "main": { + "type": "query", + "description": "Enumerates all the DIDs which have records with the given collection NSID.", + "parameters": { + "type": "params", + "required": ["collection"], + "properties": { + "collection": { "type": "string", "format": "nsid" }, + "limit": { + "type": "integer", + "description": "Maximum size of response set. Recommend setting a large maximum (1000+) when enumerating large DID lists.", + "minimum": 1, + "maximum": 2000, + "default": 500 + }, + "cursor": { "type": "string" } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["repos"], + "properties": { + "cursor": { "type": "string" }, + "repos": { + "type": "array", + "items": { "type": "ref", "ref": "#repo" } + } + } + } + } + }, + "repo": { + "type": "object", + "required": ["did"], + "properties": { + "did": { "type": "string", "format": "did" } + } + } + } +} diff --git a/lexicons/com/atproto/sync/notifyOfUpdate.json b/lexicons/com/atproto/sync/notifyOfUpdate.json new file mode 100644 index 0000000000..630973862f --- /dev/null +++ b/lexicons/com/atproto/sync/notifyOfUpdate.json @@ -0,0 +1,23 @@ +{ + "lexicon": 1, + "id": "com.atproto.sync.notifyOfUpdate", + "defs": { + "main": { + "type": "procedure", + "description": "Notify a crawling service of a recent update, and that crawling should resume. Intended use is after a gap between repo stream events caused the crawling service to disconnect. Does not require auth; implemented by Relay. DEPRECATED: just use com.atproto.sync.requestCrawl", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["hostname"], + "properties": { + "hostname": { + "type": "string", + "description": "Hostname of the current service (usually a PDS) that is notifying of update." + } + } + } + } + } + } +} diff --git a/lexicons/com/atproto/sync/requestCrawl.json b/lexicons/com/atproto/sync/requestCrawl.json new file mode 100644 index 0000000000..8f01ebc085 --- /dev/null +++ b/lexicons/com/atproto/sync/requestCrawl.json @@ -0,0 +1,24 @@ +{ + "lexicon": 1, + "id": "com.atproto.sync.requestCrawl", + "defs": { + "main": { + "type": "procedure", + "description": "Request a service to persistently crawl hosted repos. Expected use is new PDS instances declaring their existence to Relays. Does not require auth.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["hostname"], + "properties": { + "hostname": { + "type": "string", + "description": "Hostname of the current service (eg, PDS) that is requesting to be crawled." + } + } + } + }, + "errors": [{ "name": "HostBanned" }] + } + } +} diff --git a/lexicons/com/atproto/sync/subscribeRepos.json b/lexicons/com/atproto/sync/subscribeRepos.json new file mode 100644 index 0000000000..373b050f2b --- /dev/null +++ b/lexicons/com/atproto/sync/subscribeRepos.json @@ -0,0 +1,215 @@ +{ + "lexicon": 1, + "id": "com.atproto.sync.subscribeRepos", + "defs": { + "main": { + "type": "subscription", + "description": "Repository event stream, aka Firehose endpoint. Outputs repo commits with diff data, and identity update events, for all repositories on the current server. See the atproto specifications for details around stream sequencing, repo versioning, CAR diff format, and more. Public and does not require auth; implemented by PDS and Relay.", + "parameters": { + "type": "params", + "properties": { + "cursor": { + "type": "integer", + "description": "The last known event seq number to backfill from." + } + } + }, + "message": { + "schema": { + "type": "union", + "refs": ["#commit", "#sync", "#identity", "#account", "#info"] + } + }, + "errors": [ + { "name": "FutureCursor" }, + { + "name": "ConsumerTooSlow", + "description": "If the consumer of the stream can not keep up with events, and a backlog gets too large, the server will drop the connection." + } + ] + }, + "commit": { + "type": "object", + "description": "Represents an update of repository state. Note that empty commits are allowed, which include no repo data changes, but an update to rev and signature.", + "required": [ + "seq", + "rebase", + "tooBig", + "repo", + "commit", + "rev", + "since", + "blocks", + "ops", + "blobs", + "time" + ], + "nullable": ["since"], + "properties": { + "seq": { + "type": "integer", + "description": "The stream sequence number of this message." + }, + "rebase": { "type": "boolean", "description": "DEPRECATED -- unused" }, + "tooBig": { + "type": "boolean", + "description": "DEPRECATED -- replaced by #sync event and data limits. Indicates that this commit contained too many ops, or data size was too large. Consumers will need to make a separate request to get missing data." + }, + "repo": { + "type": "string", + "format": "did", + "description": "The repo this event comes from. Note that all other message types name this field 'did'." + }, + "commit": { + "type": "cid-link", + "description": "Repo commit object CID." + }, + "rev": { + "type": "string", + "format": "tid", + "description": "The rev of the emitted commit. Note that this information is also in the commit object included in blocks, unless this is a tooBig event." + }, + "since": { + "type": "string", + "format": "tid", + "description": "The rev of the last emitted commit from this repo (if any)." + }, + "blocks": { + "type": "bytes", + "description": "CAR file containing relevant blocks, as a diff since the previous repo state. The commit must be included as a block, and the commit block CID must be the first entry in the CAR header 'roots' list.", + "maxLength": 2000000 + }, + "ops": { + "type": "array", + "items": { + "type": "ref", + "ref": "#repoOp", + "description": "List of repo mutation operations in this commit (eg, records created, updated, or deleted)." + }, + "maxLength": 200 + }, + "blobs": { + "type": "array", + "items": { + "type": "cid-link", + "description": "DEPRECATED -- will soon always be empty. List of new blobs (by CID) referenced by records in this commit." + } + }, + "prevData": { + "type": "cid-link", + "description": "The root CID of the MST tree for the previous commit from this repo (indicated by the 'since' revision field in this message). Corresponds to the 'data' field in the repo commit object. NOTE: this field is effectively required for the 'inductive' version of firehose." + }, + "time": { + "type": "string", + "format": "datetime", + "description": "Timestamp of when this message was originally broadcast." + } + } + }, + "sync": { + "type": "object", + "description": "Updates the repo to a new state, without necessarily including that state on the firehose. Used to recover from broken commit streams, data loss incidents, or in situations where upstream host does not know recent state of the repository.", + "required": ["seq", "did", "blocks", "rev", "time"], + "properties": { + "seq": { + "type": "integer", + "description": "The stream sequence number of this message." + }, + "did": { + "type": "string", + "format": "did", + "description": "The account this repo event corresponds to. Must match that in the commit object." + }, + "blocks": { + "type": "bytes", + "description": "CAR file containing the commit, as a block. The CAR header must include the commit block CID as the first 'root'.", + "maxLength": 10000 + }, + "rev": { + "type": "string", + "description": "The rev of the commit. This value must match that in the commit object." + }, + "time": { + "type": "string", + "format": "datetime", + "description": "Timestamp of when this message was originally broadcast." + } + } + }, + "identity": { + "type": "object", + "description": "Represents a change to an account's identity. Could be an updated handle, signing key, or pds hosting endpoint. Serves as a prod to all downstream services to refresh their identity cache.", + "required": ["seq", "did", "time"], + "properties": { + "seq": { "type": "integer" }, + "did": { "type": "string", "format": "did" }, + "time": { "type": "string", "format": "datetime" }, + "handle": { + "type": "string", + "format": "handle", + "description": "The current handle for the account, or 'handle.invalid' if validation fails. This field is optional, might have been validated or passed-through from an upstream source. Semantics and behaviors for PDS vs Relay may evolve in the future; see atproto specs for more details." + } + } + }, + "account": { + "type": "object", + "description": "Represents a change to an account's status on a host (eg, PDS or Relay). The semantics of this event are that the status is at the host which emitted the event, not necessarily that at the currently active PDS. Eg, a Relay takedown would emit a takedown with active=false, even if the PDS is still active.", + "required": ["seq", "did", "time", "active"], + "properties": { + "seq": { "type": "integer" }, + "did": { "type": "string", "format": "did" }, + "time": { "type": "string", "format": "datetime" }, + "active": { + "type": "boolean", + "description": "Indicates that the account has a repository which can be fetched from the host that emitted this event." + }, + "status": { + "type": "string", + "description": "If active=false, this optional field indicates a reason for why the account is not active.", + "knownValues": [ + "takendown", + "suspended", + "deleted", + "deactivated", + "desynchronized", + "throttled" + ] + } + } + }, + "info": { + "type": "object", + "required": ["name"], + "properties": { + "name": { + "type": "string", + "knownValues": ["OutdatedCursor"] + }, + "message": { + "type": "string" + } + } + }, + "repoOp": { + "type": "object", + "description": "A repo operation, ie a mutation of a single record.", + "required": ["action", "path", "cid"], + "nullable": ["cid"], + "properties": { + "action": { + "type": "string", + "knownValues": ["create", "update", "delete"] + }, + "path": { "type": "string" }, + "cid": { + "type": "cid-link", + "description": "For creates and updates, the new record CID. For deletions, null." + }, + "prev": { + "type": "cid-link", + "description": "For updates and deletes, the previous record CID (required for inductive firehose). For creations, field should not be defined." + } + } + } + } +} diff --git a/lexicons/com/atproto/temp/addReservedHandle.json b/lexicons/com/atproto/temp/addReservedHandle.json new file mode 100644 index 0000000000..a8b1aac9b0 --- /dev/null +++ b/lexicons/com/atproto/temp/addReservedHandle.json @@ -0,0 +1,27 @@ +{ + "lexicon": 1, + "id": "com.atproto.temp.addReservedHandle", + "defs": { + "main": { + "type": "procedure", + "description": "Add a handle to the set of reserved handles.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["handle"], + "properties": { + "handle": { "type": "string" } + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "properties": {} + } + } + } + } +} diff --git a/lexicons/com/atproto/temp/checkSignupQueue.json b/lexicons/com/atproto/temp/checkSignupQueue.json new file mode 100644 index 0000000000..b7d9e65d7c --- /dev/null +++ b/lexicons/com/atproto/temp/checkSignupQueue.json @@ -0,0 +1,22 @@ +{ + "lexicon": 1, + "id": "com.atproto.temp.checkSignupQueue", + "defs": { + "main": { + "type": "query", + "description": "Check accounts location in signup queue.", + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["activated"], + "properties": { + "activated": { "type": "boolean" }, + "placeInQueue": { "type": "integer" }, + "estimatedTimeMs": { "type": "integer" } + } + } + } + } + } +} diff --git a/lexicons/com/atproto/temp/fetchLabels.json b/lexicons/com/atproto/temp/fetchLabels.json new file mode 100644 index 0000000000..57c3f732cd --- /dev/null +++ b/lexicons/com/atproto/temp/fetchLabels.json @@ -0,0 +1,35 @@ +{ + "lexicon": 1, + "id": "com.atproto.temp.fetchLabels", + "defs": { + "main": { + "type": "query", + "description": "DEPRECATED: use queryLabels or subscribeLabels instead -- Fetch all labels from a labeler created after a certain date.", + "parameters": { + "type": "params", + "properties": { + "since": { "type": "integer" }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 250, + "default": 50 + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["labels"], + "properties": { + "labels": { + "type": "array", + "items": { "type": "ref", "ref": "com.atproto.label.defs#label" } + } + } + } + } + } + } +} diff --git a/lexicons/com/atproto/temp/requestPhoneVerification.json b/lexicons/com/atproto/temp/requestPhoneVerification.json new file mode 100644 index 0000000000..56beeb81ac --- /dev/null +++ b/lexicons/com/atproto/temp/requestPhoneVerification.json @@ -0,0 +1,20 @@ +{ + "lexicon": 1, + "id": "com.atproto.temp.requestPhoneVerification", + "defs": { + "main": { + "type": "procedure", + "description": "Request a verification code to be sent to the supplied phone number", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["phoneNumber"], + "properties": { + "phoneNumber": { "type": "string" } + } + } + } + } + } +} diff --git a/lexicons/tools/ozone/communication/createTemplate.json b/lexicons/tools/ozone/communication/createTemplate.json new file mode 100644 index 0000000000..902a46447f --- /dev/null +++ b/lexicons/tools/ozone/communication/createTemplate.json @@ -0,0 +1,49 @@ +{ + "lexicon": 1, + "id": "tools.ozone.communication.createTemplate", + "defs": { + "main": { + "type": "procedure", + "description": "Administrative action to create a new, re-usable communication (email for now) template.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["subject", "contentMarkdown", "name"], + "properties": { + "name": { + "type": "string", + "description": "Name of the template." + }, + "contentMarkdown": { + "type": "string", + "description": "Content of the template, markdown supported, can contain variable placeholders." + }, + "subject": { + "type": "string", + "description": "Subject of the message, used in emails." + }, + "lang": { + "type": "string", + "format": "language", + "description": "Message language." + }, + "createdBy": { + "type": "string", + "format": "did", + "description": "DID of the user who is creating the template." + } + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "ref", + "ref": "tools.ozone.communication.defs#templateView" + } + }, + "errors": [{ "name": "DuplicateTemplateName" }] + } + } +} diff --git a/lexicons/tools/ozone/communication/defs.json b/lexicons/tools/ozone/communication/defs.json new file mode 100644 index 0000000000..fe61156960 --- /dev/null +++ b/lexicons/tools/ozone/communication/defs.json @@ -0,0 +1,43 @@ +{ + "lexicon": 1, + "id": "tools.ozone.communication.defs", + "defs": { + "templateView": { + "type": "object", + "required": [ + "id", + "name", + "contentMarkdown", + "disabled", + "lastUpdatedBy", + "createdAt", + "updatedAt" + ], + "properties": { + "id": { "type": "string" }, + "name": { "type": "string", "description": "Name of the template." }, + "subject": { + "type": "string", + "description": "Content of the template, can contain markdown and variable placeholders." + }, + "contentMarkdown": { + "type": "string", + "description": "Subject of the message, used in emails." + }, + "disabled": { "type": "boolean" }, + "lang": { + "type": "string", + "format": "language", + "description": "Message language." + }, + "lastUpdatedBy": { + "type": "string", + "format": "did", + "description": "DID of the user who last updated the template." + }, + "createdAt": { "type": "string", "format": "datetime" }, + "updatedAt": { "type": "string", "format": "datetime" } + } + } + } +} diff --git a/lexicons/tools/ozone/communication/deleteTemplate.json b/lexicons/tools/ozone/communication/deleteTemplate.json new file mode 100644 index 0000000000..c85bd34959 --- /dev/null +++ b/lexicons/tools/ozone/communication/deleteTemplate.json @@ -0,0 +1,20 @@ +{ + "lexicon": 1, + "id": "tools.ozone.communication.deleteTemplate", + "defs": { + "main": { + "type": "procedure", + "description": "Delete a communication template.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["id"], + "properties": { + "id": { "type": "string" } + } + } + } + } + } +} diff --git a/lexicons/tools/ozone/communication/listTemplates.json b/lexicons/tools/ozone/communication/listTemplates.json new file mode 100644 index 0000000000..65a24ed735 --- /dev/null +++ b/lexicons/tools/ozone/communication/listTemplates.json @@ -0,0 +1,26 @@ +{ + "lexicon": 1, + "id": "tools.ozone.communication.listTemplates", + "defs": { + "main": { + "type": "query", + "description": "Get list of all communication templates.", + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["communicationTemplates"], + "properties": { + "communicationTemplates": { + "type": "array", + "items": { + "type": "ref", + "ref": "tools.ozone.communication.defs#templateView" + } + } + } + } + } + } + } +} diff --git a/lexicons/tools/ozone/communication/updateTemplate.json b/lexicons/tools/ozone/communication/updateTemplate.json new file mode 100644 index 0000000000..fc2b3f6884 --- /dev/null +++ b/lexicons/tools/ozone/communication/updateTemplate.json @@ -0,0 +1,56 @@ +{ + "lexicon": 1, + "id": "tools.ozone.communication.updateTemplate", + "defs": { + "main": { + "type": "procedure", + "description": "Administrative action to update an existing communication template. Allows passing partial fields to patch specific fields only.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["id"], + "properties": { + "id": { + "type": "string", + "description": "ID of the template to be updated." + }, + "name": { + "type": "string", + "description": "Name of the template." + }, + "lang": { + "type": "string", + "format": "language", + "description": "Message language." + }, + "contentMarkdown": { + "type": "string", + "description": "Content of the template, markdown supported, can contain variable placeholders." + }, + "subject": { + "type": "string", + "description": "Subject of the message, used in emails." + }, + "updatedBy": { + "type": "string", + "format": "did", + "description": "DID of the user who is updating the template." + }, + "disabled": { + "type": "boolean" + } + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "ref", + "ref": "tools.ozone.communication.defs#templateView" + } + }, + "errors": [{ "name": "DuplicateTemplateName" }] + } + } +} diff --git a/lexicons/tools/ozone/hosting/getAccountHistory.json b/lexicons/tools/ozone/hosting/getAccountHistory.json new file mode 100644 index 0000000000..27cb8289dc --- /dev/null +++ b/lexicons/tools/ozone/hosting/getAccountHistory.json @@ -0,0 +1,106 @@ +{ + "lexicon": 1, + "id": "tools.ozone.hosting.getAccountHistory", + "defs": { + "main": { + "type": "query", + "description": "Get account history, e.g. log of updated email addresses or other identity information.", + "parameters": { + "type": "params", + "required": ["did"], + "properties": { + "did": { "type": "string", "format": "did" }, + "events": { + "type": "array", + "items": { + "type": "string", + "knownValues": [ + "accountCreated", + "emailUpdated", + "emailConfirmed", + "passwordUpdated", + "handleUpdated" + ] + } + }, + "cursor": { "type": "string" }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50 + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["events"], + "properties": { + "cursor": { "type": "string" }, + "events": { + "type": "array", + "items": { + "type": "ref", + "ref": "#event" + } + } + } + } + } + }, + "event": { + "type": "object", + "required": ["details", "createdBy", "createdAt"], + "properties": { + "details": { + "type": "union", + "refs": [ + "#accountCreated", + "#emailUpdated", + "#emailConfirmed", + "#passwordUpdated", + "#handleUpdated" + ] + }, + "createdBy": { "type": "string" }, + "createdAt": { "type": "string", "format": "datetime" } + } + }, + "accountCreated": { + "type": "object", + "required": [], + "properties": { + "email": { "type": "string" }, + "handle": { "type": "string", "format": "handle" } + } + }, + "emailUpdated": { + "type": "object", + "required": ["email"], + "properties": { + "email": { "type": "string" } + } + }, + "emailConfirmed": { + "type": "object", + "required": ["email"], + "properties": { + "email": { "type": "string" } + } + }, + "passwordUpdated": { + "type": "object", + "required": [], + "properties": {} + }, + "handleUpdated": { + "type": "object", + "required": ["handle"], + "properties": { + "handle": { "type": "string", "format": "handle" } + } + } + } +} diff --git a/lexicons/tools/ozone/moderation/defs.json b/lexicons/tools/ozone/moderation/defs.json new file mode 100644 index 0000000000..aac93019f8 --- /dev/null +++ b/lexicons/tools/ozone/moderation/defs.json @@ -0,0 +1,898 @@ +{ + "lexicon": 1, + "id": "tools.ozone.moderation.defs", + "defs": { + "modEventView": { + "type": "object", + "required": [ + "id", + "event", + "subject", + "subjectBlobCids", + "createdBy", + "createdAt" + ], + "properties": { + "id": { "type": "integer" }, + "event": { + "type": "union", + "refs": [ + "#modEventTakedown", + "#modEventReverseTakedown", + "#modEventComment", + "#modEventReport", + "#modEventLabel", + "#modEventAcknowledge", + "#modEventEscalate", + "#modEventMute", + "#modEventUnmute", + "#modEventMuteReporter", + "#modEventUnmuteReporter", + "#modEventEmail", + "#modEventResolveAppeal", + "#modEventDivert", + "#modEventTag", + "#accountEvent", + "#identityEvent", + "#recordEvent", + "#modEventPriorityScore" + ] + }, + "subject": { + "type": "union", + "refs": [ + "com.atproto.admin.defs#repoRef", + "com.atproto.repo.strongRef", + "chat.bsky.convo.defs#messageRef" + ] + }, + "subjectBlobCids": { "type": "array", "items": { "type": "string" } }, + "createdBy": { "type": "string", "format": "did" }, + "createdAt": { "type": "string", "format": "datetime" }, + "creatorHandle": { "type": "string" }, + "subjectHandle": { "type": "string" } + } + }, + "modEventViewDetail": { + "type": "object", + "required": [ + "id", + "event", + "subject", + "subjectBlobs", + "createdBy", + "createdAt" + ], + "properties": { + "id": { "type": "integer" }, + "event": { + "type": "union", + "refs": [ + "#modEventTakedown", + "#modEventReverseTakedown", + "#modEventComment", + "#modEventReport", + "#modEventLabel", + "#modEventAcknowledge", + "#modEventEscalate", + "#modEventMute", + "#modEventUnmute", + "#modEventMuteReporter", + "#modEventUnmuteReporter", + "#modEventEmail", + "#modEventResolveAppeal", + "#modEventDivert", + "#modEventTag", + "#accountEvent", + "#identityEvent", + "#recordEvent", + "#modEventPriorityScore" + ] + }, + "subject": { + "type": "union", + "refs": [ + "#repoView", + "#repoViewNotFound", + "#recordView", + "#recordViewNotFound" + ] + }, + "subjectBlobs": { + "type": "array", + "items": { "type": "ref", "ref": "#blobView" } + }, + "createdBy": { "type": "string", "format": "did" }, + "createdAt": { "type": "string", "format": "datetime" } + } + }, + "subjectStatusView": { + "type": "object", + "required": ["id", "subject", "createdAt", "updatedAt", "reviewState"], + "properties": { + "id": { "type": "integer" }, + "subject": { + "type": "union", + "refs": [ + "com.atproto.admin.defs#repoRef", + "com.atproto.repo.strongRef" + ] + }, + "hosting": { + "type": "union", + "refs": ["#accountHosting", "#recordHosting"] + }, + "subjectBlobCids": { + "type": "array", + "items": { "type": "string", "format": "cid" } + }, + "subjectRepoHandle": { "type": "string" }, + "updatedAt": { + "type": "string", + "format": "datetime", + "description": "Timestamp referencing when the last update was made to the moderation status of the subject" + }, + "createdAt": { + "type": "string", + "format": "datetime", + "description": "Timestamp referencing the first moderation status impacting event was emitted on the subject" + }, + "reviewState": { + "type": "ref", + "ref": "#subjectReviewState" + }, + "comment": { + "type": "string", + "description": "Sticky comment on the subject." + }, + "priorityScore": { + "type": "integer", + "description": "Numeric value representing the level of priority. Higher score means higher priority.", + "minimum": 0, + "maximum": 100 + }, + "muteUntil": { + "type": "string", + "format": "datetime" + }, + "muteReportingUntil": { + "type": "string", + "format": "datetime" + }, + "lastReviewedBy": { + "type": "string", + "format": "did" + }, + "lastReviewedAt": { + "type": "string", + "format": "datetime" + }, + "lastReportedAt": { + "type": "string", + "format": "datetime" + }, + "lastAppealedAt": { + "type": "string", + "format": "datetime", + "description": "Timestamp referencing when the author of the subject appealed a moderation action" + }, + "takendown": { + "type": "boolean" + }, + "appealed": { + "type": "boolean", + "description": "True indicates that the a previously taken moderator action was appealed against, by the author of the content. False indicates last appeal was resolved by moderators." + }, + "suspendUntil": { + "type": "string", + "format": "datetime" + }, + "tags": { + "type": "array", + "items": { "type": "string" } + }, + "accountStats": { + "description": "Statistics related to the account subject", + "type": "ref", + "ref": "#accountStats" + }, + "recordsStats": { + "description": "Statistics related to the record subjects authored by the subject's account", + "type": "ref", + "ref": "#recordsStats" + } + } + }, + "subjectView": { + "description": "Detailed view of a subject. For record subjects, the author's repo and profile will be returned.", + "type": "object", + "required": ["type", "subject"], + "properties": { + "type": { + "type": "ref", + "ref": "com.atproto.moderation.defs#subjectType" + }, + "subject": { + "type": "string" + }, + "status": { + "type": "ref", + "ref": "#subjectStatusView" + }, + "repo": { + "type": "ref", + "ref": "#repoViewDetail" + }, + "profile": { + "type": "union", + "refs": [] + }, + "record": { + "type": "ref", + "ref": "#recordViewDetail" + } + } + }, + "accountStats": { + "description": "Statistics about a particular account subject", + "type": "object", + "properties": { + "reportCount": { + "description": "Total number of reports on the account", + "type": "integer" + }, + "appealCount": { + "description": "Total number of appeals against a moderation action on the account", + "type": "integer" + }, + "suspendCount": { + "description": "Number of times the account was suspended", + "type": "integer" + }, + "escalateCount": { + "description": "Number of times the account was escalated", + "type": "integer" + }, + "takedownCount": { + "description": "Number of times the account was taken down", + "type": "integer" + } + } + }, + "recordsStats": { + "description": "Statistics about a set of record subject items", + "type": "object", + "properties": { + "totalReports": { + "description": "Cumulative sum of the number of reports on the items in the set", + "type": "integer" + }, + "reportedCount": { + "description": "Number of items that were reported at least once", + "type": "integer" + }, + "escalatedCount": { + "description": "Number of items that were escalated at least once", + "type": "integer" + }, + "appealedCount": { + "description": "Number of items that were appealed at least once", + "type": "integer" + }, + "subjectCount": { + "description": "Total number of item in the set", + "type": "integer" + }, + "pendingCount": { + "description": "Number of item currently in \"reviewOpen\" or \"reviewEscalated\" state", + "type": "integer" + }, + "processedCount": { + "description": "Number of item currently in \"reviewNone\" or \"reviewClosed\" state", + "type": "integer" + }, + "takendownCount": { + "description": "Number of item currently taken down", + "type": "integer" + } + } + }, + "subjectReviewState": { + "type": "string", + "knownValues": [ + "#reviewOpen", + "#reviewEscalated", + "#reviewClosed", + "#reviewNone" + ] + }, + "reviewOpen": { + "type": "token", + "description": "Moderator review status of a subject: Open. Indicates that the subject needs to be reviewed by a moderator" + }, + "reviewEscalated": { + "type": "token", + "description": "Moderator review status of a subject: Escalated. Indicates that the subject was escalated for review by a moderator" + }, + "reviewClosed": { + "type": "token", + "description": "Moderator review status of a subject: Closed. Indicates that the subject was already reviewed and resolved by a moderator" + }, + "reviewNone": { + "type": "token", + "description": "Moderator review status of a subject: Unnecessary. Indicates that the subject does not need a review at the moment but there is probably some moderation related metadata available for it" + }, + "modEventTakedown": { + "type": "object", + "description": "Take down a subject permanently or temporarily", + "properties": { + "comment": { + "type": "string" + }, + "durationInHours": { + "type": "integer", + "description": "Indicates how long the takedown should be in effect before automatically expiring." + }, + "acknowledgeAccountSubjects": { + "type": "boolean", + "description": "If true, all other reports on content authored by this account will be resolved (acknowledged)." + }, + "policies": { + "type": "array", + "maxLength": 5, + "items": { "type": "string" }, + "description": "Names/Keywords of the policies that drove the decision." + } + } + }, + "modEventReverseTakedown": { + "type": "object", + "description": "Revert take down action on a subject", + "properties": { + "comment": { + "type": "string", + "description": "Describe reasoning behind the reversal." + } + } + }, + "modEventResolveAppeal": { + "type": "object", + "description": "Resolve appeal on a subject", + "properties": { + "comment": { + "type": "string", + "description": "Describe resolution." + } + } + }, + "modEventComment": { + "type": "object", + "description": "Add a comment to a subject. An empty comment will clear any previously set sticky comment.", + "properties": { + "comment": { + "type": "string" + }, + "sticky": { + "type": "boolean", + "description": "Make the comment persistent on the subject" + } + } + }, + "modEventReport": { + "type": "object", + "description": "Report a subject", + "required": ["reportType"], + "properties": { + "comment": { + "type": "string" + }, + "isReporterMuted": { + "type": "boolean", + "description": "Set to true if the reporter was muted from reporting at the time of the event. These reports won't impact the reviewState of the subject." + }, + "reportType": { + "type": "ref", + "ref": "com.atproto.moderation.defs#reasonType" + } + } + }, + "modEventLabel": { + "type": "object", + "description": "Apply/Negate labels on a subject", + "required": ["createLabelVals", "negateLabelVals"], + "properties": { + "comment": { + "type": "string" + }, + "createLabelVals": { + "type": "array", + "items": { "type": "string" } + }, + "negateLabelVals": { + "type": "array", + "items": { "type": "string" } + }, + "durationInHours": { + "type": "integer", + "description": "Indicates how long the label will remain on the subject. Only applies on labels that are being added." + } + } + }, + "modEventPriorityScore": { + "type": "object", + "description": "Set priority score of the subject. Higher score means higher priority.", + "required": ["score"], + "properties": { + "comment": { + "type": "string" + }, + "score": { + "type": "integer", + "minimum": 0, + "maximum": 100 + } + } + }, + "modEventAcknowledge": { + "type": "object", + "properties": { + "comment": { "type": "string" }, + "acknowledgeAccountSubjects": { + "type": "boolean", + "description": "If true, all other reports on content authored by this account will be resolved (acknowledged)." + } + } + }, + "modEventEscalate": { + "type": "object", + "properties": { + "comment": { "type": "string" } + } + }, + "modEventMute": { + "type": "object", + "description": "Mute incoming reports on a subject", + "required": ["durationInHours"], + "properties": { + "comment": { "type": "string" }, + "durationInHours": { + "type": "integer", + "description": "Indicates how long the subject should remain muted." + } + } + }, + "modEventUnmute": { + "type": "object", + "description": "Unmute action on a subject", + "properties": { + "comment": { + "type": "string", + "description": "Describe reasoning behind the reversal." + } + } + }, + "modEventMuteReporter": { + "type": "object", + "description": "Mute incoming reports from an account", + "properties": { + "comment": { "type": "string" }, + "durationInHours": { + "type": "integer", + "description": "Indicates how long the account should remain muted. Falsy value here means a permanent mute." + } + } + }, + "modEventUnmuteReporter": { + "type": "object", + "description": "Unmute incoming reports from an account", + "properties": { + "comment": { + "type": "string", + "description": "Describe reasoning behind the reversal." + } + } + }, + "modEventEmail": { + "type": "object", + "description": "Keep a log of outgoing email to a user", + "required": ["subjectLine"], + "properties": { + "subjectLine": { + "type": "string", + "description": "The subject line of the email sent to the user." + }, + "content": { + "type": "string", + "description": "The content of the email sent to the user." + }, + "comment": { + "type": "string", + "description": "Additional comment about the outgoing comm." + } + } + }, + "modEventDivert": { + "type": "object", + "description": "Divert a record's blobs to a 3rd party service for further scanning/tagging", + "properties": { + "comment": { "type": "string" } + } + }, + "modEventTag": { + "type": "object", + "description": "Add/Remove a tag on a subject", + "required": ["add", "remove"], + "properties": { + "add": { + "type": "array", + "items": { "type": "string" }, + "description": "Tags to be added to the subject. If already exists, won't be duplicated." + }, + "remove": { + "type": "array", + "items": { "type": "string" }, + "description": "Tags to be removed to the subject. Ignores a tag If it doesn't exist, won't be duplicated." + }, + "comment": { + "type": "string", + "description": "Additional comment about added/removed tags." + } + } + }, + "accountEvent": { + "type": "object", + "description": "Logs account status related events on a repo subject. Normally captured by automod from the firehose and emitted to ozone for historical tracking.", + "required": ["timestamp", "active"], + "properties": { + "comment": { "type": "string" }, + "active": { + "type": "boolean", + "description": "Indicates that the account has a repository which can be fetched from the host that emitted this event." + }, + "status": { + "type": "string", + "knownValues": [ + "unknown", + "deactivated", + "deleted", + "takendown", + "suspended", + "tombstoned" + ] + }, + "timestamp": { + "type": "string", + "format": "datetime" + } + } + }, + "identityEvent": { + "type": "object", + "description": "Logs identity related events on a repo subject. Normally captured by automod from the firehose and emitted to ozone for historical tracking.", + "required": ["timestamp"], + "properties": { + "comment": { "type": "string" }, + "handle": { "type": "string", "format": "handle" }, + "pdsHost": { "type": "string", "format": "uri" }, + "tombstone": { "type": "boolean" }, + "timestamp": { + "type": "string", + "format": "datetime" + } + } + }, + "recordEvent": { + "type": "object", + "description": "Logs lifecycle event on a record subject. Normally captured by automod from the firehose and emitted to ozone for historical tracking.", + "required": ["timestamp", "op"], + "properties": { + "comment": { "type": "string" }, + "op": { + "type": "string", + "knownValues": ["create", "update", "delete"] + }, + "cid": { "type": "string", "format": "cid" }, + "timestamp": { "type": "string", "format": "datetime" } + } + }, + "repoView": { + "type": "object", + "required": [ + "did", + "handle", + "relatedRecords", + "indexedAt", + "moderation" + ], + "properties": { + "did": { "type": "string", "format": "did" }, + "handle": { "type": "string", "format": "handle" }, + "email": { "type": "string" }, + "relatedRecords": { "type": "array", "items": { "type": "unknown" } }, + "indexedAt": { "type": "string", "format": "datetime" }, + "moderation": { "type": "ref", "ref": "#moderation" }, + "invitedBy": { + "type": "ref", + "ref": "com.atproto.server.defs#inviteCode" + }, + "invitesDisabled": { "type": "boolean" }, + "inviteNote": { "type": "string" }, + "deactivatedAt": { "type": "string", "format": "datetime" }, + "threatSignatures": { + "type": "array", + "items": { + "type": "ref", + "ref": "com.atproto.admin.defs#threatSignature" + } + } + } + }, + "repoViewDetail": { + "type": "object", + "required": [ + "did", + "handle", + "relatedRecords", + "indexedAt", + "moderation" + ], + "properties": { + "did": { "type": "string", "format": "did" }, + "handle": { "type": "string", "format": "handle" }, + "email": { "type": "string" }, + "relatedRecords": { "type": "array", "items": { "type": "unknown" } }, + "indexedAt": { "type": "string", "format": "datetime" }, + "moderation": { "type": "ref", "ref": "#moderationDetail" }, + "labels": { + "type": "array", + "items": { "type": "ref", "ref": "com.atproto.label.defs#label" } + }, + "invitedBy": { + "type": "ref", + "ref": "com.atproto.server.defs#inviteCode" + }, + "invites": { + "type": "array", + "items": { + "type": "ref", + "ref": "com.atproto.server.defs#inviteCode" + } + }, + "invitesDisabled": { "type": "boolean" }, + "inviteNote": { "type": "string" }, + "emailConfirmedAt": { "type": "string", "format": "datetime" }, + "deactivatedAt": { "type": "string", "format": "datetime" }, + "threatSignatures": { + "type": "array", + "items": { + "type": "ref", + "ref": "com.atproto.admin.defs#threatSignature" + } + } + } + }, + "repoViewNotFound": { + "type": "object", + "required": ["did"], + "properties": { + "did": { "type": "string", "format": "did" } + } + }, + "recordView": { + "type": "object", + "required": [ + "uri", + "cid", + "value", + "blobCids", + "indexedAt", + "moderation", + "repo" + ], + "properties": { + "uri": { "type": "string", "format": "at-uri" }, + "cid": { "type": "string", "format": "cid" }, + "value": { "type": "unknown" }, + "blobCids": { + "type": "array", + "items": { "type": "string", "format": "cid" } + }, + "indexedAt": { "type": "string", "format": "datetime" }, + "moderation": { "type": "ref", "ref": "#moderation" }, + "repo": { "type": "ref", "ref": "#repoView" } + } + }, + "recordViewDetail": { + "type": "object", + "required": [ + "uri", + "cid", + "value", + "blobs", + "indexedAt", + "moderation", + "repo" + ], + "properties": { + "uri": { "type": "string", "format": "at-uri" }, + "cid": { "type": "string", "format": "cid" }, + "value": { "type": "unknown" }, + "blobs": { + "type": "array", + "items": { "type": "ref", "ref": "#blobView" } + }, + "labels": { + "type": "array", + "items": { "type": "ref", "ref": "com.atproto.label.defs#label" } + }, + "indexedAt": { "type": "string", "format": "datetime" }, + "moderation": { "type": "ref", "ref": "#moderationDetail" }, + "repo": { "type": "ref", "ref": "#repoView" } + } + }, + "recordViewNotFound": { + "type": "object", + "required": ["uri"], + "properties": { + "uri": { "type": "string", "format": "at-uri" } + } + }, + "moderation": { + "type": "object", + "properties": { + "subjectStatus": { "type": "ref", "ref": "#subjectStatusView" } + } + }, + "moderationDetail": { + "type": "object", + "properties": { + "subjectStatus": { + "type": "ref", + "ref": "#subjectStatusView" + } + } + }, + "blobView": { + "type": "object", + "required": ["cid", "mimeType", "size", "createdAt"], + "properties": { + "cid": { "type": "string", "format": "cid" }, + "mimeType": { "type": "string" }, + "size": { "type": "integer" }, + "createdAt": { "type": "string", "format": "datetime" }, + "details": { + "type": "union", + "refs": ["#imageDetails", "#videoDetails"] + }, + "moderation": { "type": "ref", "ref": "#moderation" } + } + }, + "imageDetails": { + "type": "object", + "required": ["width", "height"], + "properties": { + "width": { "type": "integer" }, + "height": { "type": "integer" } + } + }, + "videoDetails": { + "type": "object", + "required": ["width", "height", "length"], + "properties": { + "width": { "type": "integer" }, + "height": { "type": "integer" }, + "length": { "type": "integer" } + } + }, + "accountHosting": { + "type": "object", + "required": ["status"], + "properties": { + "status": { + "type": "string", + "knownValues": [ + "takendown", + "suspended", + "deleted", + "deactivated", + "unknown" + ] + }, + "updatedAt": { + "type": "string", + "format": "datetime" + }, + "createdAt": { + "type": "string", + "format": "datetime" + }, + "deletedAt": { + "type": "string", + "format": "datetime" + }, + "deactivatedAt": { + "type": "string", + "format": "datetime" + }, + "reactivatedAt": { + "type": "string", + "format": "datetime" + } + } + }, + "recordHosting": { + "type": "object", + "required": ["status"], + "properties": { + "status": { + "type": "string", + "knownValues": ["deleted", "unknown"] + }, + "updatedAt": { + "type": "string", + "format": "datetime" + }, + "createdAt": { + "type": "string", + "format": "datetime" + }, + "deletedAt": { + "type": "string", + "format": "datetime" + } + } + }, + "reporterStats": { + "type": "object", + "required": [ + "did", + "accountReportCount", + "recordReportCount", + "reportedAccountCount", + "reportedRecordCount", + "takendownAccountCount", + "takendownRecordCount", + "labeledAccountCount", + "labeledRecordCount" + ], + "properties": { + "did": { + "type": "string", + "format": "did" + }, + "accountReportCount": { + "type": "integer", + "description": "The total number of reports made by the user on accounts." + }, + "recordReportCount": { + "type": "integer", + "description": "The total number of reports made by the user on records." + }, + "reportedAccountCount": { + "type": "integer", + "description": "The total number of accounts reported by the user." + }, + "reportedRecordCount": { + "type": "integer", + "description": "The total number of records reported by the user." + }, + "takendownAccountCount": { + "type": "integer", + "description": "The total number of accounts taken down as a result of the user's reports." + }, + "takendownRecordCount": { + "type": "integer", + "description": "The total number of records taken down as a result of the user's reports." + }, + "labeledAccountCount": { + "type": "integer", + "description": "The total number of accounts labeled as a result of the user's reports." + }, + "labeledRecordCount": { + "type": "integer", + "description": "The total number of records labeled as a result of the user's reports." + } + } + } + } +} diff --git a/lexicons/tools/ozone/moderation/emitEvent.json b/lexicons/tools/ozone/moderation/emitEvent.json new file mode 100644 index 0000000000..02c781b63f --- /dev/null +++ b/lexicons/tools/ozone/moderation/emitEvent.json @@ -0,0 +1,63 @@ +{ + "lexicon": 1, + "id": "tools.ozone.moderation.emitEvent", + "defs": { + "main": { + "type": "procedure", + "description": "Take a moderation action on an actor.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["event", "subject", "createdBy"], + "properties": { + "event": { + "type": "union", + "refs": [ + "tools.ozone.moderation.defs#modEventTakedown", + "tools.ozone.moderation.defs#modEventAcknowledge", + "tools.ozone.moderation.defs#modEventEscalate", + "tools.ozone.moderation.defs#modEventComment", + "tools.ozone.moderation.defs#modEventLabel", + "tools.ozone.moderation.defs#modEventReport", + "tools.ozone.moderation.defs#modEventMute", + "tools.ozone.moderation.defs#modEventUnmute", + "tools.ozone.moderation.defs#modEventMuteReporter", + "tools.ozone.moderation.defs#modEventUnmuteReporter", + "tools.ozone.moderation.defs#modEventReverseTakedown", + "tools.ozone.moderation.defs#modEventResolveAppeal", + "tools.ozone.moderation.defs#modEventEmail", + "tools.ozone.moderation.defs#modEventDivert", + "tools.ozone.moderation.defs#modEventTag", + "tools.ozone.moderation.defs#accountEvent", + "tools.ozone.moderation.defs#identityEvent", + "tools.ozone.moderation.defs#recordEvent", + "tools.ozone.moderation.defs#modEventPriorityScore" + ] + }, + "subject": { + "type": "union", + "refs": [ + "com.atproto.admin.defs#repoRef", + "com.atproto.repo.strongRef" + ] + }, + "subjectBlobCids": { + "type": "array", + "items": { "type": "string", "format": "cid" } + }, + "createdBy": { "type": "string", "format": "did" } + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "ref", + "ref": "tools.ozone.moderation.defs#modEventView" + } + }, + "errors": [{ "name": "SubjectHasAction" }] + } + } +} diff --git a/lexicons/tools/ozone/moderation/getEvent.json b/lexicons/tools/ozone/moderation/getEvent.json new file mode 100644 index 0000000000..66d7642eed --- /dev/null +++ b/lexicons/tools/ozone/moderation/getEvent.json @@ -0,0 +1,24 @@ +{ + "lexicon": 1, + "id": "tools.ozone.moderation.getEvent", + "defs": { + "main": { + "type": "query", + "description": "Get details about a moderation event.", + "parameters": { + "type": "params", + "required": ["id"], + "properties": { + "id": { "type": "integer" } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "ref", + "ref": "tools.ozone.moderation.defs#modEventViewDetail" + } + } + } + } +} diff --git a/lexicons/tools/ozone/moderation/getRecord.json b/lexicons/tools/ozone/moderation/getRecord.json new file mode 100644 index 0000000000..ca5c480691 --- /dev/null +++ b/lexicons/tools/ozone/moderation/getRecord.json @@ -0,0 +1,26 @@ +{ + "lexicon": 1, + "id": "tools.ozone.moderation.getRecord", + "defs": { + "main": { + "type": "query", + "description": "Get details about a record.", + "parameters": { + "type": "params", + "required": ["uri"], + "properties": { + "uri": { "type": "string", "format": "at-uri" }, + "cid": { "type": "string", "format": "cid" } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "ref", + "ref": "tools.ozone.moderation.defs#recordViewDetail" + } + }, + "errors": [{ "name": "RecordNotFound" }] + } + } +} diff --git a/lexicons/tools/ozone/moderation/getRecords.json b/lexicons/tools/ozone/moderation/getRecords.json new file mode 100644 index 0000000000..12dc1f6853 --- /dev/null +++ b/lexicons/tools/ozone/moderation/getRecords.json @@ -0,0 +1,43 @@ +{ + "lexicon": 1, + "id": "tools.ozone.moderation.getRecords", + "defs": { + "main": { + "type": "query", + "description": "Get details about some records.", + "parameters": { + "type": "params", + "required": ["uris"], + "properties": { + "uris": { + "type": "array", + "maxLength": 100, + "items": { + "type": "string", + "format": "at-uri" + } + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["records"], + "properties": { + "records": { + "type": "array", + "items": { + "type": "union", + "refs": [ + "tools.ozone.moderation.defs#recordViewDetail", + "tools.ozone.moderation.defs#recordViewNotFound" + ] + } + } + } + } + } + } + } +} diff --git a/lexicons/tools/ozone/moderation/getRepo.json b/lexicons/tools/ozone/moderation/getRepo.json new file mode 100644 index 0000000000..b5af1f07f5 --- /dev/null +++ b/lexicons/tools/ozone/moderation/getRepo.json @@ -0,0 +1,25 @@ +{ + "lexicon": 1, + "id": "tools.ozone.moderation.getRepo", + "defs": { + "main": { + "type": "query", + "description": "Get details about a repository.", + "parameters": { + "type": "params", + "required": ["did"], + "properties": { + "did": { "type": "string", "format": "did" } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "ref", + "ref": "tools.ozone.moderation.defs#repoViewDetail" + } + }, + "errors": [{ "name": "RepoNotFound" }] + } + } +} diff --git a/lexicons/tools/ozone/moderation/getReporterStats.json b/lexicons/tools/ozone/moderation/getReporterStats.json new file mode 100644 index 0000000000..51f445417c --- /dev/null +++ b/lexicons/tools/ozone/moderation/getReporterStats.json @@ -0,0 +1,40 @@ +{ + "lexicon": 1, + "id": "tools.ozone.moderation.getReporterStats", + "defs": { + "main": { + "type": "query", + "description": "Get reporter stats for a list of users.", + "parameters": { + "type": "params", + "required": ["dids"], + "properties": { + "dids": { + "type": "array", + "maxLength": 100, + "items": { + "type": "string", + "format": "did" + } + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["stats"], + "properties": { + "stats": { + "type": "array", + "items": { + "type": "ref", + "ref": "tools.ozone.moderation.defs#reporterStats" + } + } + } + } + } + } + } +} diff --git a/lexicons/tools/ozone/moderation/getRepos.json b/lexicons/tools/ozone/moderation/getRepos.json new file mode 100644 index 0000000000..3124db568a --- /dev/null +++ b/lexicons/tools/ozone/moderation/getRepos.json @@ -0,0 +1,43 @@ +{ + "lexicon": 1, + "id": "tools.ozone.moderation.getRepos", + "defs": { + "main": { + "type": "query", + "description": "Get details about some repositories.", + "parameters": { + "type": "params", + "required": ["dids"], + "properties": { + "dids": { + "type": "array", + "maxLength": 100, + "items": { + "type": "string", + "format": "did" + } + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["repos"], + "properties": { + "repos": { + "type": "array", + "items": { + "type": "union", + "refs": [ + "tools.ozone.moderation.defs#repoViewDetail", + "tools.ozone.moderation.defs#repoViewNotFound" + ] + } + } + } + } + } + } + } +} diff --git a/lexicons/tools/ozone/moderation/getSubjects.json b/lexicons/tools/ozone/moderation/getSubjects.json new file mode 100644 index 0000000000..5bedeb3950 --- /dev/null +++ b/lexicons/tools/ozone/moderation/getSubjects.json @@ -0,0 +1,40 @@ +{ + "lexicon": 1, + "id": "tools.ozone.moderation.getSubjects", + "defs": { + "main": { + "type": "query", + "description": "Get details about subjects.", + "parameters": { + "type": "params", + "required": ["subjects"], + "properties": { + "subjects": { + "type": "array", + "maxLength": 100, + "minLength": 1, + "items": { + "type": "string" + } + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["subjects"], + "properties": { + "subjects": { + "type": "array", + "items": { + "type": "ref", + "ref": "tools.ozone.moderation.defs#subjectView" + } + } + } + } + } + } + } +} diff --git a/lexicons/tools/ozone/moderation/queryEvents.json b/lexicons/tools/ozone/moderation/queryEvents.json new file mode 100644 index 0000000000..e33e18c6d3 --- /dev/null +++ b/lexicons/tools/ozone/moderation/queryEvents.json @@ -0,0 +1,142 @@ +{ + "lexicon": 1, + "id": "tools.ozone.moderation.queryEvents", + "defs": { + "main": { + "type": "query", + "description": "List moderation events related to a subject.", + "parameters": { + "type": "params", + "properties": { + "types": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The types of events (fully qualified string in the format of tools.ozone.moderation.defs#modEvent) to filter by. If not specified, all events are returned." + }, + "createdBy": { + "type": "string", + "format": "did" + }, + "sortDirection": { + "type": "string", + "default": "desc", + "enum": ["asc", "desc"], + "description": "Sort direction for the events. Defaults to descending order of created at timestamp." + }, + "createdAfter": { + "type": "string", + "format": "datetime", + "description": "Retrieve events created after a given timestamp" + }, + "createdBefore": { + "type": "string", + "format": "datetime", + "description": "Retrieve events created before a given timestamp" + }, + "subject": { + "type": "string", + "format": "uri" + }, + "collections": { + "type": "array", + "maxLength": 20, + "description": "If specified, only events where the subject belongs to the given collections will be returned. When subjectType is set to 'account', this will be ignored.", + "items": { + "type": "string", + "format": "nsid" + } + }, + "subjectType": { + "type": "string", + "description": "If specified, only events where the subject is of the given type (account or record) will be returned. When this is set to 'account' the 'collections' parameter will be ignored. When includeAllUserRecords or subject is set, this will be ignored.", + "knownValues": ["account", "record"] + }, + "includeAllUserRecords": { + "type": "boolean", + "default": false, + "description": "If true, events on all record types (posts, lists, profile etc.) or records from given 'collections' param, owned by the did are returned." + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50 + }, + "hasComment": { + "type": "boolean", + "description": "If true, only events with comments are returned" + }, + "comment": { + "type": "string", + "description": "If specified, only events with comments containing the keyword are returned. Apply || separator to use multiple keywords and match using OR condition." + }, + "addedLabels": { + "type": "array", + "items": { + "type": "string" + }, + "description": "If specified, only events where all of these labels were added are returned" + }, + "removedLabels": { + "type": "array", + "items": { + "type": "string" + }, + "description": "If specified, only events where all of these labels were removed are returned" + }, + "addedTags": { + "type": "array", + "items": { + "type": "string" + }, + "description": "If specified, only events where all of these tags were added are returned" + }, + "removedTags": { + "type": "array", + "items": { + "type": "string" + }, + "description": "If specified, only events where all of these tags were removed are returned" + }, + "reportTypes": { + "type": "array", + "items": { + "type": "string" + } + }, + "policies": { + "type": "array", + "items": { + "type": "string", + "description": "If specified, only events where the action policies match any of the given policies are returned" + } + }, + "cursor": { + "type": "string" + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["events"], + "properties": { + "cursor": { + "type": "string" + }, + "events": { + "type": "array", + "items": { + "type": "ref", + "ref": "tools.ozone.moderation.defs#modEventView" + } + } + } + } + } + } + } +} diff --git a/lexicons/tools/ozone/moderation/queryStatuses.json b/lexicons/tools/ozone/moderation/queryStatuses.json new file mode 100644 index 0000000000..533885c333 --- /dev/null +++ b/lexicons/tools/ozone/moderation/queryStatuses.json @@ -0,0 +1,209 @@ +{ + "lexicon": 1, + "id": "tools.ozone.moderation.queryStatuses", + "defs": { + "main": { + "type": "query", + "description": "View moderation statuses of subjects (record or repo).", + "parameters": { + "type": "params", + "properties": { + "queueCount": { + "type": "integer", + "description": "Number of queues being used by moderators. Subjects will be split among all queues." + }, + "queueIndex": { + "type": "integer", + "description": "Index of the queue to fetch subjects from. Works only when queueCount value is specified." + }, + "queueSeed": { + "type": "string", + "description": "A seeder to shuffle/balance the queue items." + }, + "includeAllUserRecords": { + "type": "boolean", + "description": "All subjects, or subjects from given 'collections' param, belonging to the account specified in the 'subject' param will be returned." + }, + "subject": { + "type": "string", + "format": "uri", + "description": "The subject to get the status for." + }, + "comment": { + "type": "string", + "description": "Search subjects by keyword from comments" + }, + "reportedAfter": { + "type": "string", + "format": "datetime", + "description": "Search subjects reported after a given timestamp" + }, + "reportedBefore": { + "type": "string", + "format": "datetime", + "description": "Search subjects reported before a given timestamp" + }, + "reviewedAfter": { + "type": "string", + "format": "datetime", + "description": "Search subjects reviewed after a given timestamp" + }, + "hostingDeletedAfter": { + "type": "string", + "format": "datetime", + "description": "Search subjects where the associated record/account was deleted after a given timestamp" + }, + "hostingDeletedBefore": { + "type": "string", + "format": "datetime", + "description": "Search subjects where the associated record/account was deleted before a given timestamp" + }, + "hostingUpdatedAfter": { + "type": "string", + "format": "datetime", + "description": "Search subjects where the associated record/account was updated after a given timestamp" + }, + "hostingUpdatedBefore": { + "type": "string", + "format": "datetime", + "description": "Search subjects where the associated record/account was updated before a given timestamp" + }, + "hostingStatuses": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Search subjects by the status of the associated record/account" + }, + "reviewedBefore": { + "type": "string", + "format": "datetime", + "description": "Search subjects reviewed before a given timestamp" + }, + "includeMuted": { + "type": "boolean", + "description": "By default, we don't include muted subjects in the results. Set this to true to include them." + }, + "onlyMuted": { + "type": "boolean", + "description": "When set to true, only muted subjects and reporters will be returned." + }, + "reviewState": { + "type": "string", + "description": "Specify when fetching subjects in a certain state" + }, + "ignoreSubjects": { + "type": "array", + "items": { + "type": "string", + "format": "uri" + } + }, + "lastReviewedBy": { + "type": "string", + "format": "did", + "description": "Get all subject statuses that were reviewed by a specific moderator" + }, + "sortField": { + "type": "string", + "default": "lastReportedAt", + "enum": [ + "lastReviewedAt", + "lastReportedAt", + "reportedRecordsCount", + "takendownRecordsCount", + "priorityScore" + ] + }, + "sortDirection": { + "type": "string", + "default": "desc", + "enum": ["asc", "desc"] + }, + "takendown": { + "type": "boolean", + "description": "Get subjects that were taken down" + }, + "appealed": { + "type": "boolean", + "description": "Get subjects in unresolved appealed status" + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50 + }, + "tags": { + "type": "array", + "maxLength": 25, + "items": { + "type": "string", + "description": "Items in this array are applied with OR filters. To apply AND filter, put all tags in the same string and separate using && characters" + } + }, + "excludeTags": { + "type": "array", + "items": { + "type": "string" + } + }, + "cursor": { + "type": "string" + }, + "collections": { + "type": "array", + "maxLength": 20, + "description": "If specified, subjects belonging to the given collections will be returned. When subjectType is set to 'account', this will be ignored.", + "items": { + "type": "string", + "format": "nsid" + } + }, + "subjectType": { + "type": "string", + "description": "If specified, subjects of the given type (account or record) will be returned. When this is set to 'account' the 'collections' parameter will be ignored. When includeAllUserRecords or subject is set, this will be ignored.", + "knownValues": ["account", "record"] + }, + "minAccountSuspendCount": { + "type": "integer", + "description": "If specified, only subjects that belong to an account that has at least this many suspensions will be returned." + }, + "minReportedRecordsCount": { + "type": "integer", + "description": "If specified, only subjects that belong to an account that has at least this many reported records will be returned." + }, + "minTakendownRecordsCount": { + "type": "integer", + "description": "If specified, only subjects that belong to an account that has at least this many taken down records will be returned." + }, + "minPriorityScore": { + "minimum": 0, + "maximum": 100, + "type": "integer", + "description": "If specified, only subjects that have priority score value above the given value will be returned." + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["subjectStatuses"], + "properties": { + "cursor": { + "type": "string" + }, + "subjectStatuses": { + "type": "array", + "items": { + "type": "ref", + "ref": "tools.ozone.moderation.defs#subjectStatusView" + } + } + } + } + } + } + } +} diff --git a/lexicons/tools/ozone/moderation/searchRepos.json b/lexicons/tools/ozone/moderation/searchRepos.json new file mode 100644 index 0000000000..3968b34082 --- /dev/null +++ b/lexicons/tools/ozone/moderation/searchRepos.json @@ -0,0 +1,44 @@ +{ + "lexicon": 1, + "id": "tools.ozone.moderation.searchRepos", + "defs": { + "main": { + "type": "query", + "description": "Find repositories based on a search term.", + "parameters": { + "type": "params", + "properties": { + "term": { + "type": "string", + "description": "DEPRECATED: use 'q' instead" + }, + "q": { "type": "string" }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50 + }, + "cursor": { "type": "string" } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["repos"], + "properties": { + "cursor": { "type": "string" }, + "repos": { + "type": "array", + "items": { + "type": "ref", + "ref": "tools.ozone.moderation.defs#repoView" + } + } + } + } + } + } + } +} diff --git a/lexicons/tools/ozone/server/getConfig.json b/lexicons/tools/ozone/server/getConfig.json new file mode 100644 index 0000000000..c156d6f47c --- /dev/null +++ b/lexicons/tools/ozone/server/getConfig.json @@ -0,0 +1,66 @@ +{ + "lexicon": 1, + "id": "tools.ozone.server.getConfig", + "defs": { + "main": { + "type": "query", + "description": "Get details about ozone's server configuration.", + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "properties": { + "appview": { + "type": "ref", + "ref": "#serviceConfig" + }, + "pds": { + "type": "ref", + "ref": "#serviceConfig" + }, + "blobDivert": { + "type": "ref", + "ref": "#serviceConfig" + }, + "chat": { + "type": "ref", + "ref": "#serviceConfig" + }, + "viewer": { + "type": "ref", + "ref": "#viewerConfig" + }, + "verifierDid": { + "type": "string", + "format": "did", + "description": "The did of the verifier used for verification." + } + } + } + } + }, + "serviceConfig": { + "type": "object", + "properties": { + "url": { + "type": "string", + "format": "uri" + } + } + }, + "viewerConfig": { + "type": "object", + "properties": { + "role": { + "type": "string", + "knownValues": [ + "tools.ozone.team.defs#roleAdmin", + "tools.ozone.team.defs#roleModerator", + "tools.ozone.team.defs#roleTriage", + "tools.ozone.team.defs#roleVerifier" + ] + } + } + } + } +} diff --git a/lexicons/tools/ozone/set/addValues.json b/lexicons/tools/ozone/set/addValues.json new file mode 100644 index 0000000000..345df5db0b --- /dev/null +++ b/lexicons/tools/ozone/set/addValues.json @@ -0,0 +1,32 @@ +{ + "lexicon": 1, + "id": "tools.ozone.set.addValues", + "defs": { + "main": { + "type": "procedure", + "description": "Add values to a specific set. Attempting to add values to a set that does not exist will result in an error.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["name", "values"], + "properties": { + "name": { + "type": "string", + "description": "Name of the set to add values to" + }, + "values": { + "type": "array", + "minLength": 1, + "maxLength": 1000, + "items": { + "type": "string" + }, + "description": "Array of string values to add to the set" + } + } + } + } + } + } +} diff --git a/lexicons/tools/ozone/set/defs.json b/lexicons/tools/ozone/set/defs.json new file mode 100644 index 0000000000..4ad69521f1 --- /dev/null +++ b/lexicons/tools/ozone/set/defs.json @@ -0,0 +1,49 @@ +{ + "lexicon": 1, + "id": "tools.ozone.set.defs", + "defs": { + "set": { + "type": "object", + "required": ["name"], + "properties": { + "name": { + "type": "string", + "minLength": 3, + "maxLength": 128 + }, + "description": { + "type": "string", + "maxGraphemes": 1024, + "maxLength": 10240 + } + } + }, + "setView": { + "type": "object", + "required": ["name", "setSize", "createdAt", "updatedAt"], + "properties": { + "name": { + "type": "string", + "minLength": 3, + "maxLength": 128 + }, + "description": { + "type": "string", + "maxGraphemes": 1024, + "maxLength": 10240 + }, + "setSize": { + "type": "integer" + }, + "createdAt": { + "type": "string", + "format": "datetime" + }, + "updatedAt": { + "type": "string", + "format": "datetime" + } + } + } + } +} diff --git a/lexicons/tools/ozone/set/deleteSet.json b/lexicons/tools/ozone/set/deleteSet.json new file mode 100644 index 0000000000..70e6000380 --- /dev/null +++ b/lexicons/tools/ozone/set/deleteSet.json @@ -0,0 +1,36 @@ +{ + "lexicon": 1, + "id": "tools.ozone.set.deleteSet", + "defs": { + "main": { + "type": "procedure", + "description": "Delete an entire set. Attempting to delete a set that does not exist will result in an error.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["name"], + "properties": { + "name": { + "type": "string", + "description": "Name of the set to delete" + } + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "properties": {} + } + }, + "errors": [ + { + "name": "SetNotFound", + "description": "set with the given name does not exist" + } + ] + } + } +} diff --git a/lexicons/tools/ozone/set/deleteValues.json b/lexicons/tools/ozone/set/deleteValues.json new file mode 100644 index 0000000000..e40b8d44d8 --- /dev/null +++ b/lexicons/tools/ozone/set/deleteValues.json @@ -0,0 +1,37 @@ +{ + "lexicon": 1, + "id": "tools.ozone.set.deleteValues", + "defs": { + "main": { + "type": "procedure", + "description": "Delete values from a specific set. Attempting to delete values that are not in the set will not result in an error", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["name", "values"], + "properties": { + "name": { + "type": "string", + "description": "Name of the set to delete values from" + }, + "values": { + "type": "array", + "minLength": 1, + "items": { + "type": "string" + }, + "description": "Array of string values to delete from the set" + } + } + } + }, + "errors": [ + { + "name": "SetNotFound", + "description": "set with the given name does not exist" + } + ] + } + } +} diff --git a/lexicons/tools/ozone/set/getValues.json b/lexicons/tools/ozone/set/getValues.json new file mode 100644 index 0000000000..dca2fb275e --- /dev/null +++ b/lexicons/tools/ozone/set/getValues.json @@ -0,0 +1,56 @@ +{ + "lexicon": 1, + "id": "tools.ozone.set.getValues", + "defs": { + "main": { + "type": "query", + "description": "Get a specific set and its values", + "parameters": { + "type": "params", + "required": ["name"], + "properties": { + "name": { + "type": "string" + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 1000, + "default": 100 + }, + "cursor": { + "type": "string" + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["set", "values"], + "properties": { + "set": { + "type": "ref", + "ref": "tools.ozone.set.defs#setView" + }, + "values": { + "type": "array", + "items": { + "type": "string" + } + }, + "cursor": { + "type": "string" + } + } + } + }, + "errors": [ + { + "name": "SetNotFound", + "description": "set with the given name does not exist" + } + ] + } + } +} diff --git a/lexicons/tools/ozone/set/querySets.json b/lexicons/tools/ozone/set/querySets.json new file mode 100644 index 0000000000..d4bedb005c --- /dev/null +++ b/lexicons/tools/ozone/set/querySets.json @@ -0,0 +1,57 @@ +{ + "lexicon": 1, + "id": "tools.ozone.set.querySets", + "defs": { + "main": { + "type": "query", + "description": "Query available sets", + "parameters": { + "type": "params", + "properties": { + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50 + }, + "cursor": { + "type": "string" + }, + "namePrefix": { + "type": "string" + }, + "sortBy": { + "type": "string", + "enum": ["name", "createdAt", "updatedAt"], + "default": "name" + }, + "sortDirection": { + "type": "string", + "default": "asc", + "enum": ["asc", "desc"], + "description": "Defaults to ascending order of name field." + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["sets"], + "properties": { + "sets": { + "type": "array", + "items": { + "type": "ref", + "ref": "tools.ozone.set.defs#setView" + } + }, + "cursor": { + "type": "string" + } + } + } + } + } + } +} diff --git a/lexicons/tools/ozone/set/upsertSet.json b/lexicons/tools/ozone/set/upsertSet.json new file mode 100644 index 0000000000..43ae0f9523 --- /dev/null +++ b/lexicons/tools/ozone/set/upsertSet.json @@ -0,0 +1,24 @@ +{ + "lexicon": 1, + "id": "tools.ozone.set.upsertSet", + "defs": { + "main": { + "type": "procedure", + "description": "Create or update set metadata", + "input": { + "encoding": "application/json", + "schema": { + "type": "ref", + "ref": "tools.ozone.set.defs#set" + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "ref", + "ref": "tools.ozone.set.defs#setView" + } + } + } + } +} diff --git a/lexicons/tools/ozone/setting/defs.json b/lexicons/tools/ozone/setting/defs.json new file mode 100644 index 0000000000..57d325fd61 --- /dev/null +++ b/lexicons/tools/ozone/setting/defs.json @@ -0,0 +1,64 @@ +{ + "lexicon": 1, + "id": "tools.ozone.setting.defs", + "defs": { + "option": { + "type": "object", + "required": [ + "key", + "value", + "did", + "scope", + "createdBy", + "lastUpdatedBy" + ], + "properties": { + "key": { + "type": "string", + "format": "nsid" + }, + "did": { + "type": "string", + "format": "did" + }, + "value": { + "type": "unknown" + }, + "description": { + "type": "string", + "maxGraphemes": 1024, + "maxLength": 10240 + }, + "createdAt": { + "type": "string", + "format": "datetime" + }, + "updatedAt": { + "type": "string", + "format": "datetime" + }, + "managerRole": { + "type": "string", + "knownValues": [ + "tools.ozone.team.defs#roleModerator", + "tools.ozone.team.defs#roleTriage", + "tools.ozone.team.defs#roleAdmin", + "tools.ozone.team.defs#roleVerifier" + ] + }, + "scope": { + "type": "string", + "knownValues": ["instance", "personal"] + }, + "createdBy": { + "type": "string", + "format": "did" + }, + "lastUpdatedBy": { + "type": "string", + "format": "did" + } + } + } + } +} diff --git a/lexicons/tools/ozone/setting/listOptions.json b/lexicons/tools/ozone/setting/listOptions.json new file mode 100644 index 0000000000..849b9c1d87 --- /dev/null +++ b/lexicons/tools/ozone/setting/listOptions.json @@ -0,0 +1,61 @@ +{ + "lexicon": 1, + "id": "tools.ozone.setting.listOptions", + "defs": { + "main": { + "type": "query", + "description": "List settings with optional filtering", + "parameters": { + "type": "params", + "properties": { + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50 + }, + "cursor": { + "type": "string" + }, + "scope": { + "type": "string", + "knownValues": ["instance", "personal"], + "default": "instance" + }, + "prefix": { + "type": "string", + "description": "Filter keys by prefix" + }, + "keys": { + "type": "array", + "maxLength": 100, + "items": { + "type": "string", + "format": "nsid" + }, + "description": "Filter for only the specified keys. Ignored if prefix is provided" + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["options"], + "properties": { + "cursor": { + "type": "string" + }, + "options": { + "type": "array", + "items": { + "type": "ref", + "ref": "tools.ozone.setting.defs#option" + } + } + } + } + } + } + } +} diff --git a/lexicons/tools/ozone/setting/removeOptions.json b/lexicons/tools/ozone/setting/removeOptions.json new file mode 100644 index 0000000000..ae55d97186 --- /dev/null +++ b/lexicons/tools/ozone/setting/removeOptions.json @@ -0,0 +1,39 @@ +{ + "lexicon": 1, + "id": "tools.ozone.setting.removeOptions", + "defs": { + "main": { + "type": "procedure", + "description": "Delete settings by key", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["keys", "scope"], + "properties": { + "keys": { + "type": "array", + "minLength": 1, + "maxLength": 200, + "items": { + "type": "string", + "format": "nsid" + } + }, + "scope": { + "type": "string", + "knownValues": ["instance", "personal"] + } + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "properties": {} + } + } + } + } +} diff --git a/lexicons/tools/ozone/setting/upsertOption.json b/lexicons/tools/ozone/setting/upsertOption.json new file mode 100644 index 0000000000..43f1c935f7 --- /dev/null +++ b/lexicons/tools/ozone/setting/upsertOption.json @@ -0,0 +1,56 @@ +{ + "lexicon": 1, + "id": "tools.ozone.setting.upsertOption", + "defs": { + "main": { + "type": "procedure", + "description": "Create or update setting option", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["key", "scope", "value"], + "properties": { + "key": { + "type": "string", + "format": "nsid" + }, + "scope": { + "type": "string", + "knownValues": ["instance", "personal"] + }, + "value": { + "type": "unknown" + }, + "description": { + "type": "string", + "maxLength": 2000 + }, + "managerRole": { + "type": "string", + "knownValues": [ + "tools.ozone.team.defs#roleModerator", + "tools.ozone.team.defs#roleTriage", + "tools.ozone.team.defs#roleVerifier", + "tools.ozone.team.defs#roleAdmin" + ] + } + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["option"], + "properties": { + "option": { + "type": "ref", + "ref": "tools.ozone.setting.defs#option" + } + } + } + } + } + } +} diff --git a/lexicons/tools/ozone/signature/defs.json b/lexicons/tools/ozone/signature/defs.json new file mode 100644 index 0000000000..6c7297ebab --- /dev/null +++ b/lexicons/tools/ozone/signature/defs.json @@ -0,0 +1,14 @@ +{ + "lexicon": 1, + "id": "tools.ozone.signature.defs", + "defs": { + "sigDetail": { + "type": "object", + "required": ["property", "value"], + "properties": { + "property": { "type": "string" }, + "value": { "type": "string" } + } + } + } +} diff --git a/lexicons/tools/ozone/signature/findCorrelation.json b/lexicons/tools/ozone/signature/findCorrelation.json new file mode 100644 index 0000000000..f803f25cd3 --- /dev/null +++ b/lexicons/tools/ozone/signature/findCorrelation.json @@ -0,0 +1,39 @@ +{ + "lexicon": 1, + "id": "tools.ozone.signature.findCorrelation", + "defs": { + "main": { + "type": "query", + "description": "Find all correlated threat signatures between 2 or more accounts.", + "parameters": { + "type": "params", + "required": ["dids"], + "properties": { + "dids": { + "type": "array", + "items": { + "type": "string", + "format": "did" + } + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["details"], + "properties": { + "details": { + "type": "array", + "items": { + "type": "ref", + "ref": "tools.ozone.signature.defs#sigDetail" + } + } + } + } + } + } + } +} diff --git a/lexicons/tools/ozone/signature/findRelatedAccounts.json b/lexicons/tools/ozone/signature/findRelatedAccounts.json new file mode 100644 index 0000000000..f5e4c7b057 --- /dev/null +++ b/lexicons/tools/ozone/signature/findRelatedAccounts.json @@ -0,0 +1,61 @@ +{ + "lexicon": 1, + "id": "tools.ozone.signature.findRelatedAccounts", + "defs": { + "main": { + "type": "query", + "description": "Get accounts that share some matching threat signatures with the root account.", + "parameters": { + "type": "params", + "required": ["did"], + "properties": { + "did": { + "type": "string", + "format": "did" + }, + "cursor": { "type": "string" }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50 + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["accounts"], + "properties": { + "cursor": { "type": "string" }, + "accounts": { + "type": "array", + "items": { + "type": "ref", + "ref": "#relatedAccount" + } + } + } + } + } + }, + "relatedAccount": { + "type": "object", + "required": ["account"], + "properties": { + "account": { + "type": "ref", + "ref": "com.atproto.admin.defs#accountView" + }, + "similarities": { + "type": "array", + "items": { + "type": "ref", + "ref": "tools.ozone.signature.defs#sigDetail" + } + } + } + } + } +} diff --git a/lexicons/tools/ozone/signature/searchAccounts.json b/lexicons/tools/ozone/signature/searchAccounts.json new file mode 100644 index 0000000000..328d778769 --- /dev/null +++ b/lexicons/tools/ozone/signature/searchAccounts.json @@ -0,0 +1,46 @@ +{ + "lexicon": 1, + "id": "tools.ozone.signature.searchAccounts", + "defs": { + "main": { + "type": "query", + "description": "Search for accounts that match one or more threat signature values.", + "parameters": { + "type": "params", + "required": ["values"], + "properties": { + "values": { + "type": "array", + "items": { + "type": "string" + } + }, + "cursor": { "type": "string" }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50 + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["accounts"], + "properties": { + "cursor": { "type": "string" }, + "accounts": { + "type": "array", + "items": { + "type": "ref", + "ref": "com.atproto.admin.defs#accountView" + } + } + } + } + } + } + } +} diff --git a/lexicons/tools/ozone/team/addMember.json b/lexicons/tools/ozone/team/addMember.json new file mode 100644 index 0000000000..90b8f94704 --- /dev/null +++ b/lexicons/tools/ozone/team/addMember.json @@ -0,0 +1,42 @@ +{ + "lexicon": 1, + "id": "tools.ozone.team.addMember", + "defs": { + "main": { + "type": "procedure", + "description": "Add a member to the ozone team. Requires admin role.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["did", "role"], + "properties": { + "did": { "type": "string", "format": "did" }, + "role": { + "type": "string", + "knownValues": [ + "tools.ozone.team.defs#roleAdmin", + "tools.ozone.team.defs#roleModerator", + "tools.ozone.team.defs#roleVerifier", + "tools.ozone.team.defs#roleTriage" + ] + } + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "ref", + "ref": "tools.ozone.team.defs#member" + } + }, + "errors": [ + { + "name": "MemberAlreadyExists", + "description": "Member already exists in the team." + } + ] + } + } +} diff --git a/lexicons/tools/ozone/team/defs.json b/lexicons/tools/ozone/team/defs.json new file mode 100644 index 0000000000..a1c378dd46 --- /dev/null +++ b/lexicons/tools/ozone/team/defs.json @@ -0,0 +1,46 @@ +{ + "lexicon": 1, + "id": "tools.ozone.team.defs", + "defs": { + "member": { + "type": "object", + "required": ["did", "role"], + "properties": { + "did": { "type": "string", "format": "did" }, + "disabled": { "type": "boolean" }, + "profile": { + "type": "ref", + "ref": "app.bsky.actor.defs#profileViewDetailed" + }, + "createdAt": { "type": "string", "format": "datetime" }, + "updatedAt": { "type": "string", "format": "datetime" }, + "lastUpdatedBy": { "type": "string" }, + "role": { + "type": "string", + "knownValues": [ + "#roleAdmin", + "#roleModerator", + "#roleTriage", + "#roleVerifier" + ] + } + } + }, + "roleAdmin": { + "type": "token", + "description": "Admin role. Highest level of access, can perform all actions." + }, + "roleModerator": { + "type": "token", + "description": "Moderator role. Can perform most actions." + }, + "roleTriage": { + "type": "token", + "description": "Triage role. Mostly intended for monitoring and escalating issues." + }, + "roleVerifier": { + "type": "token", + "description": "Verifier role. Only allowed to issue verifications." + } + } +} diff --git a/lexicons/tools/ozone/team/deleteMember.json b/lexicons/tools/ozone/team/deleteMember.json new file mode 100644 index 0000000000..a9008c9e66 --- /dev/null +++ b/lexicons/tools/ozone/team/deleteMember.json @@ -0,0 +1,30 @@ +{ + "lexicon": 1, + "id": "tools.ozone.team.deleteMember", + "defs": { + "main": { + "type": "procedure", + "description": "Delete a member from ozone team. Requires admin role.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["did"], + "properties": { + "did": { "type": "string", "format": "did" } + } + } + }, + "errors": [ + { + "name": "MemberNotFound", + "description": "The member being deleted does not exist" + }, + { + "name": "CannotDeleteSelf", + "description": "You can not delete yourself from the team" + } + ] + } + } +} diff --git a/lexicons/tools/ozone/team/listMembers.json b/lexicons/tools/ozone/team/listMembers.json new file mode 100644 index 0000000000..3f4ce322ad --- /dev/null +++ b/lexicons/tools/ozone/team/listMembers.json @@ -0,0 +1,55 @@ +{ + "lexicon": 1, + "id": "tools.ozone.team.listMembers", + "defs": { + "main": { + "type": "query", + "description": "List all members with access to the ozone service.", + "parameters": { + "type": "params", + "properties": { + "q": { + "type": "string" + }, + "disabled": { + "type": "boolean" + }, + "roles": { + "type": "array", + "items": { + "type": "string" + } + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50 + }, + "cursor": { + "type": "string" + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["members"], + "properties": { + "cursor": { + "type": "string" + }, + "members": { + "type": "array", + "items": { + "type": "ref", + "ref": "tools.ozone.team.defs#member" + } + } + } + } + } + } + } +} diff --git a/lexicons/tools/ozone/team/updateMember.json b/lexicons/tools/ozone/team/updateMember.json new file mode 100644 index 0000000000..839194eadf --- /dev/null +++ b/lexicons/tools/ozone/team/updateMember.json @@ -0,0 +1,43 @@ +{ + "lexicon": 1, + "id": "tools.ozone.team.updateMember", + "defs": { + "main": { + "type": "procedure", + "description": "Update a member in the ozone service. Requires admin role.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["did"], + "properties": { + "did": { "type": "string", "format": "did" }, + "disabled": { "type": "boolean" }, + "role": { + "type": "string", + "knownValues": [ + "tools.ozone.team.defs#roleAdmin", + "tools.ozone.team.defs#roleModerator", + "tools.ozone.team.defs#roleVerifier", + "tools.ozone.team.defs#roleTriage" + ] + } + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "ref", + "ref": "tools.ozone.team.defs#member" + } + }, + "errors": [ + { + "name": "MemberNotFound", + "description": "The member being updated does not exist in the team" + } + ] + } + } +} diff --git a/lexicons/tools/ozone/verification/defs.json b/lexicons/tools/ozone/verification/defs.json new file mode 100644 index 0000000000..c462eb5e9e --- /dev/null +++ b/lexicons/tools/ozone/verification/defs.json @@ -0,0 +1,85 @@ +{ + "lexicon": 1, + "id": "tools.ozone.verification.defs", + "defs": { + "verificationView": { + "type": "object", + "description": "Verification data for the associated subject.", + "required": [ + "issuer", + "uri", + "subject", + "handle", + "displayName", + "createdAt" + ], + "properties": { + "issuer": { + "type": "string", + "description": "The user who issued this verification.", + "format": "did" + }, + "uri": { + "type": "string", + "description": "The AT-URI of the verification record.", + "format": "at-uri" + }, + "subject": { + "type": "string", + "format": "did", + "description": "The subject of the verification." + }, + "handle": { + "type": "string", + "description": "Handle of the subject the verification applies to at the moment of verifying, which might not be the same at the time of viewing. The verification is only valid if the current handle matches the one at the time of verifying.", + "format": "handle" + }, + "displayName": { + "type": "string", + "description": "Display name of the subject the verification applies to at the moment of verifying, which might not be the same at the time of viewing. The verification is only valid if the current displayName matches the one at the time of verifying." + }, + "createdAt": { + "type": "string", + "description": "Timestamp when the verification was created.", + "format": "datetime" + }, + "revokeReason": { + "type": "string", + "description": "Describes the reason for revocation, also indicating that the verification is no longer valid." + }, + "revokedAt": { + "type": "string", + "description": "Timestamp when the verification was revoked.", + "format": "datetime" + }, + "revokedBy": { + "type": "string", + "description": "The user who revoked this verification.", + "format": "did" + }, + "subjectProfile": { + "type": "union", + "refs": [] + }, + "issuerProfile": { + "type": "union", + "refs": [] + }, + "subjectRepo": { + "type": "union", + "refs": [ + "tools.ozone.moderation.defs#repoViewDetail", + "tools.ozone.moderation.defs#repoViewNotFound" + ] + }, + "issuerRepo": { + "type": "union", + "refs": [ + "tools.ozone.moderation.defs#repoViewDetail", + "tools.ozone.moderation.defs#repoViewNotFound" + ] + } + } + } + } +} diff --git a/lexicons/tools/ozone/verification/grantVerifications.json b/lexicons/tools/ozone/verification/grantVerifications.json new file mode 100644 index 0000000000..6d290034fd --- /dev/null +++ b/lexicons/tools/ozone/verification/grantVerifications.json @@ -0,0 +1,91 @@ +{ + "lexicon": 1, + "id": "tools.ozone.verification.grantVerifications", + "defs": { + "main": { + "type": "procedure", + "description": "Grant verifications to multiple subjects. Allows batch processing of up to 100 verifications at once.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["verifications"], + "properties": { + "verifications": { + "type": "array", + "description": "Array of verification requests to process", + "maxLength": 100, + "items": { + "type": "ref", + "ref": "#verificationInput" + } + } + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["verifications", "failedVerifications"], + "properties": { + "verifications": { + "type": "array", + "items": { + "type": "ref", + "ref": "tools.ozone.verification.defs#verificationView" + } + }, + "failedVerifications": { + "type": "array", + "items": { + "type": "ref", + "ref": "#grantError" + } + } + } + } + } + }, + "verificationInput": { + "type": "object", + "required": ["subject", "handle", "displayName"], + "properties": { + "subject": { + "type": "string", + "description": "The did of the subject being verified", + "format": "did" + }, + "handle": { + "type": "string", + "description": "Handle of the subject the verification applies to at the moment of verifying.", + "format": "handle" + }, + "displayName": { + "type": "string", + "description": "Display name of the subject the verification applies to at the moment of verifying." + }, + "createdAt": { + "type": "string", + "description": "Timestamp for verification record. Defaults to current time when not specified." + } + } + }, + "grantError": { + "type": "object", + "description": "Error object for failed verifications.", + "required": ["error", "subject"], + "properties": { + "error": { + "type": "string", + "description": "Error message describing the reason for failure." + }, + "subject": { + "type": "string", + "description": "The did of the subject being verified", + "format": "did" + } + } + } + } +} diff --git a/lexicons/tools/ozone/verification/listVerifications.json b/lexicons/tools/ozone/verification/listVerifications.json new file mode 100644 index 0000000000..33904eb1d9 --- /dev/null +++ b/lexicons/tools/ozone/verification/listVerifications.json @@ -0,0 +1,83 @@ +{ + "lexicon": 1, + "id": "tools.ozone.verification.listVerifications", + "defs": { + "main": { + "type": "query", + "description": "List verifications", + "parameters": { + "type": "params", + "properties": { + "cursor": { + "type": "string", + "description": "Pagination cursor" + }, + "limit": { + "type": "integer", + "description": "Maximum number of results to return", + "minimum": 1, + "maximum": 100, + "default": 50 + }, + "createdAfter": { + "type": "string", + "format": "datetime", + "description": "Filter to verifications created after this timestamp" + }, + "createdBefore": { + "type": "string", + "format": "datetime", + "description": "Filter to verifications created before this timestamp" + }, + "issuers": { + "type": "array", + "maxLength": 100, + "description": "Filter to verifications from specific issuers", + "items": { + "type": "string", + "format": "did" + } + }, + "subjects": { + "type": "array", + "description": "Filter to specific verified DIDs", + "maxLength": 100, + "items": { + "type": "string", + "format": "did" + } + }, + "sortDirection": { + "type": "string", + "description": "Sort direction for creation date", + "enum": ["asc", "desc"], + "default": "desc" + }, + "isRevoked": { + "type": "boolean", + "description": "Filter to verifications that are revoked or not. By default, includes both." + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["verifications"], + "properties": { + "cursor": { + "type": "string" + }, + "verifications": { + "type": "array", + "items": { + "type": "ref", + "ref": "tools.ozone.verification.defs#verificationView" + } + } + } + } + } + } + } +} diff --git a/lexicons/tools/ozone/verification/revokeVerifications.json b/lexicons/tools/ozone/verification/revokeVerifications.json new file mode 100644 index 0000000000..f3759d4430 --- /dev/null +++ b/lexicons/tools/ozone/verification/revokeVerifications.json @@ -0,0 +1,75 @@ +{ + "lexicon": 1, + "id": "tools.ozone.verification.revokeVerifications", + "defs": { + "main": { + "type": "procedure", + "description": "Revoke previously granted verifications in batches of up to 100.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["uris"], + "properties": { + "uris": { + "type": "array", + "description": "Array of verification record uris to revoke", + "maxLength": 100, + "items": { + "type": "string", + "description": "The AT-URI of the verification record to revoke.", + "format": "at-uri" + } + }, + "revokeReason": { + "type": "string", + "description": "Reason for revoking the verification. This is optional and can be omitted if not needed.", + "maxLength": 1000 + } + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["revokedVerifications", "failedRevocations"], + "properties": { + "revokedVerifications": { + "type": "array", + "description": "List of verification uris successfully revoked", + "items": { + "type": "string", + "format": "at-uri" + } + }, + "failedRevocations": { + "type": "array", + "description": "List of verification uris that couldn't be revoked, including failure reasons", + "items": { + "type": "ref", + "ref": "#revokeError" + } + } + } + } + } + }, + "revokeError": { + "type": "object", + "description": "Error object for failed revocations", + "required": ["uri", "error"], + "properties": { + "uri": { + "type": "string", + "description": "The AT-URI of the verification record that failed to revoke.", + "format": "at-uri" + }, + "error": { + "type": "string", + "description": "Description of the error that occurred during revocation." + } + } + } + } +}