@atproto/api 0.10.5 → 0.11.0-next
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/definitions/labels.json +191 -189
- package/dist/agent.d.ts +3 -1
- package/dist/bsky-agent.d.ts +6 -2
- package/dist/client/index.d.ts +94 -38
- package/dist/client/lexicons.d.ts +5091 -4833
- package/dist/client/types/app/bsky/actor/createScene.d.ts +32 -0
- package/dist/client/types/app/bsky/actor/defs.d.ts +23 -1
- package/dist/client/types/app/bsky/actor/ref.d.ts +28 -0
- package/dist/client/types/app/bsky/actor/search.d.ts +22 -0
- package/dist/client/types/app/bsky/actor/searchActor.d.ts +22 -0
- package/dist/client/types/app/bsky/actor/searchActorTypeahead.d.ts +20 -0
- package/dist/client/types/app/bsky/actor/searchTypeahead.d.ts +20 -0
- package/dist/client/types/app/bsky/actor/updateProfile.d.ts +47 -0
- package/dist/client/types/app/bsky/embed/record.d.ts +2 -1
- package/dist/client/types/app/bsky/feed/bookmarkFeed.d.ts +17 -0
- package/dist/client/types/app/bsky/feed/feedViewPost.d.ts +28 -0
- package/dist/client/types/app/bsky/feed/getBookmarkedFeeds.d.ts +21 -0
- package/dist/client/types/app/bsky/feed/getSavedFeeds.d.ts +21 -0
- package/dist/client/types/app/bsky/feed/getVotes.d.ts +36 -0
- package/dist/client/types/app/bsky/feed/saveFeed.d.ts +17 -0
- package/dist/client/types/app/bsky/feed/setVote.d.ts +25 -0
- package/dist/client/types/app/bsky/feed/trend.d.ts +9 -0
- package/dist/client/types/app/bsky/feed/unbookmarkFeed.d.ts +17 -0
- package/dist/client/types/app/bsky/feed/unsaveFeed.d.ts +17 -0
- package/dist/client/types/app/bsky/feed/vote.d.ts +10 -0
- package/dist/client/types/app/bsky/graph/assertCreator.d.ts +1 -0
- package/dist/client/types/app/bsky/graph/assertMember.d.ts +1 -0
- package/dist/client/types/app/bsky/graph/assertion.d.ts +10 -0
- package/dist/client/types/app/bsky/graph/confirmation.d.ts +11 -0
- package/dist/client/types/app/bsky/graph/getAssertions.d.ts +48 -0
- package/dist/client/types/app/bsky/graph/getMembers.d.ts +36 -0
- package/dist/client/types/app/bsky/graph/getMemberships.d.ts +36 -0
- package/dist/client/types/app/bsky/graph/mute.d.ts +17 -0
- package/dist/client/types/app/bsky/graph/unmute.d.ts +17 -0
- package/dist/client/types/app/bsky/labeler/defs.d.ts +41 -0
- package/dist/client/types/app/bsky/labeler/getServices.d.ts +23 -0
- package/dist/client/types/app/bsky/labeler/service.d.ts +14 -0
- package/dist/client/types/app/bsky/moderation/defs.d.ts +41 -0
- package/dist/client/types/app/bsky/moderation/getService.d.ts +16 -0
- package/dist/client/types/app/bsky/moderation/getServices.d.ts +23 -0
- package/dist/client/types/app/bsky/moderation/service.d.ts +14 -0
- package/dist/client/types/app/bsky/notification/getCount.d.ts +17 -0
- package/dist/client/types/app/bsky/notification/list.d.ts +35 -0
- package/dist/client/types/app/bsky/system/actorScene.d.ts +1 -0
- package/dist/client/types/app/bsky/system/actorUser.d.ts +1 -0
- package/dist/client/types/app/bsky/system/declRef.d.ts +8 -0
- package/dist/client/types/app/bsky/system/declaration.d.ts +7 -0
- package/dist/client/types/app/bsky/unspecced/applyLabels.d.ts +18 -0
- package/dist/client/types/app/bsky/unspecced/getPopular.d.ts +22 -0
- package/dist/client/types/app/bsky/unspecced/getTimelineSkeleton.d.ts +24 -0
- package/dist/client/types/com/atproto/account/create.d.ts +41 -0
- package/dist/client/types/com/atproto/account/createInviteCode.d.ts +22 -0
- package/dist/client/types/com/atproto/account/delete.d.ts +25 -0
- package/dist/client/types/com/atproto/account/get.d.ts +12 -0
- package/dist/client/types/com/atproto/account/requestDelete.d.ts +13 -0
- package/dist/client/types/com/atproto/account/requestPasswordReset.d.ts +17 -0
- package/dist/client/types/com/atproto/account/resetPassword.d.ts +24 -0
- package/dist/client/types/com/atproto/admin/blob.d.ts +37 -0
- package/dist/client/types/com/atproto/admin/defs.d.ts +0 -304
- package/dist/client/types/com/atproto/admin/getInviteCodeUsage.d.ts +29 -0
- package/dist/client/types/com/atproto/admin/getModerationAction.d.ts +16 -0
- package/dist/client/types/com/atproto/admin/getModerationActions.d.ts +22 -0
- package/dist/client/types/com/atproto/admin/getModerationReport.d.ts +16 -0
- package/dist/client/types/com/atproto/admin/getModerationReports.d.ts +28 -0
- package/dist/client/types/com/atproto/admin/getSubjectState.d.ts +26 -0
- package/dist/client/types/com/atproto/admin/getUserAccountInfo.d.ts +16 -0
- package/dist/client/types/com/atproto/admin/moderationAction.d.ts +60 -0
- package/dist/client/types/com/atproto/admin/moderationReport.d.ts +37 -0
- package/dist/client/types/com/atproto/admin/rebaseRepo.d.ts +24 -0
- package/dist/client/types/com/atproto/admin/record.d.ts +43 -0
- package/dist/client/types/com/atproto/admin/repo.d.ts +45 -0
- package/dist/client/types/com/atproto/admin/resolveModerationReports.d.ts +22 -0
- package/dist/client/types/com/atproto/admin/reverseModerationAction.d.ts +22 -0
- package/dist/client/types/com/atproto/admin/takeModerationAction.d.ts +34 -0
- package/dist/client/types/com/atproto/admin/updateSubjectState.d.ts +32 -0
- package/dist/client/types/com/atproto/blob/upload.d.ts +19 -0
- package/dist/client/types/com/atproto/handle/resolve.d.ts +18 -0
- package/dist/client/types/com/atproto/handle/update.d.ts +17 -0
- package/dist/client/types/com/atproto/label/defs.d.ts +21 -0
- package/dist/client/types/com/atproto/repo/batchWrite.d.ts +46 -0
- package/dist/client/types/com/atproto/repo/describe.d.ts +22 -0
- package/dist/client/types/com/atproto/repo/rebaseRepo.d.ts +24 -0
- package/dist/client/types/com/atproto/repo/recordRef.d.ts +8 -0
- package/dist/client/types/com/atproto/repo/repoRef.d.ts +7 -0
- package/dist/client/types/com/atproto/repo/uploadRepo.d.ts +19 -0
- package/dist/client/types/com/atproto/report/create.d.ts +39 -0
- package/dist/client/types/com/atproto/report/reasonType.d.ts +3 -0
- package/dist/client/types/com/atproto/report/subject.d.ts +23 -0
- package/dist/client/types/com/atproto/server/getAccountsConfig.d.ts +27 -0
- package/dist/client/types/com/atproto/server/getUserInviteCodes.d.ts +31 -0
- package/dist/client/types/com/atproto/session/create.d.ts +29 -0
- package/dist/client/types/com/atproto/session/delete.d.ts +13 -0
- package/dist/client/types/com/atproto/session/get.d.ts +18 -0
- package/dist/client/types/com/atproto/session/refresh.d.ts +24 -0
- package/dist/client/types/com/atproto/sync/getCommitPath.d.ts +20 -0
- package/dist/client/types/com/atproto/sync/getCurrent.d.ts +22 -0
- package/dist/client/types/com/atproto/sync/getRoot.d.ts +21 -0
- package/dist/client/types/com/atproto/sync/importRepo.d.ts +16 -0
- package/dist/client/types/com/atproto/sync/subscribeAllRepos.d.ts +9 -0
- package/dist/client/types/com/atproto/sync/updateRepo.d.ts +15 -0
- package/dist/client/types/com/atproto/temp/importRepo.d.ts +16 -0
- package/dist/client/types/com/atproto/temp/pushBlob.d.ts +15 -0
- package/dist/client/types/com/atproto/temp/transferAccount.d.ts +48 -0
- package/dist/client/types/com/atproto/temp/upgradeRepoVersion.d.ts +18 -0
- package/dist/client/types/tools/ozone/communication/createTemplate.d.ts +23 -0
- package/dist/client/types/tools/ozone/communication/defs.d.ts +14 -0
- package/dist/client/types/tools/ozone/communication/deleteTemplate.d.ts +17 -0
- package/dist/client/types/tools/ozone/communication/listTemplates.d.ts +18 -0
- package/dist/client/types/tools/ozone/communication/updateTemplate.d.ts +25 -0
- package/dist/client/types/tools/ozone/moderation/defs.d.ts +269 -0
- package/dist/client/types/tools/ozone/moderation/emitEvent.d.ts +34 -0
- package/dist/client/types/tools/ozone/moderation/getEvent.d.ts +16 -0
- package/dist/client/types/tools/ozone/moderation/getRecord.d.ts +20 -0
- package/dist/client/types/tools/ozone/moderation/getRepo.d.ts +19 -0
- package/dist/client/types/tools/ozone/moderation/queryEvents.d.ts +35 -0
- package/dist/client/types/tools/ozone/moderation/queryStatuses.d.ts +37 -0
- package/dist/client/types/tools/ozone/moderation/searchRepos.d.ts +23 -0
- package/dist/const.d.ts +1 -0
- package/dist/index.d.ts +3 -2
- package/dist/index.js +7865 -7922
- package/dist/index.js.map +3 -3
- package/dist/mocker.d.ts +57 -0
- package/dist/moderation/const/labels.d.ts +4 -2
- package/dist/moderation/decision.d.ts +26 -0
- package/dist/moderation/index.d.ts +10 -44
- package/dist/moderation/subjects/account.d.ts +2 -1
- package/dist/moderation/subjects/feed-generator.d.ts +2 -1
- package/dist/moderation/subjects/notification.d.ts +3 -0
- package/dist/moderation/subjects/post.d.ts +2 -1
- package/dist/moderation/subjects/profile.d.ts +2 -1
- package/dist/moderation/subjects/user-list.d.ts +2 -1
- package/dist/moderation/types.d.ts +47 -61
- package/dist/moderation/ui.d.ts +12 -0
- package/dist/moderation/util.d.ts +4 -8
- package/dist/session.d.ts +42 -0
- package/dist/src/client/index.d.ts +462 -0
- package/dist/src/client/lexicons.d.ts +2910 -0
- package/dist/src/client/schemas.d.ts +17 -0
- package/dist/src/client/types/app/bsky/actor/createScene.d.ts +32 -0
- package/dist/src/client/types/app/bsky/actor/getProfile.d.ts +36 -0
- package/dist/src/client/types/app/bsky/actor/getSuggestions.d.ts +36 -0
- package/dist/src/client/types/app/bsky/actor/profile.d.ts +15 -0
- package/dist/src/client/types/app/bsky/actor/ref.d.ts +14 -0
- package/dist/src/client/types/app/bsky/actor/search.d.ts +32 -0
- package/dist/src/client/types/app/bsky/actor/searchTypeahead.d.ts +28 -0
- package/dist/src/client/types/app/bsky/actor/updateProfile.d.ts +48 -0
- package/dist/src/client/types/app/bsky/badge.d.ts +22 -0
- package/dist/src/client/types/app/bsky/badgeAccept.d.ts +11 -0
- package/dist/src/client/types/app/bsky/badgeOffer.d.ts +11 -0
- package/dist/src/client/types/app/bsky/declaration.d.ts +6 -0
- package/dist/src/client/types/app/bsky/embed/external.d.ts +26 -0
- package/dist/src/client/types/app/bsky/embed/images.d.ts +23 -0
- package/dist/src/client/types/app/bsky/feed/embed.d.ts +36 -0
- package/dist/src/client/types/app/bsky/feed/feedViewPost.d.ts +26 -0
- package/dist/src/client/types/app/bsky/feed/getAuthorFeed.d.ts +22 -0
- package/dist/src/client/types/app/bsky/feed/getPostThread.d.ts +43 -0
- package/dist/src/client/types/app/bsky/feed/getRepostedBy.d.ts +35 -0
- package/dist/src/client/types/app/bsky/feed/getTimeline.d.ts +22 -0
- package/dist/src/client/types/app/bsky/feed/getVotes.d.ts +33 -0
- package/dist/src/client/types/app/bsky/feed/mediaEmbed.d.ts +18 -0
- package/dist/src/client/types/app/bsky/feed/post.d.ts +54 -0
- package/dist/src/client/types/app/bsky/feed/repost.d.ts +6 -0
- package/dist/src/client/types/app/bsky/feed/setVote.d.ts +25 -0
- package/dist/src/client/types/app/bsky/feed/trend.d.ts +6 -0
- package/dist/src/client/types/app/bsky/feed/vote.d.ts +7 -0
- package/dist/src/client/types/app/bsky/follow.d.ts +9 -0
- package/dist/src/client/types/app/bsky/getAuthorFeed.d.ts +56 -0
- package/dist/src/client/types/app/bsky/getBadgeMembers.d.ts +29 -0
- package/dist/src/client/types/app/bsky/getHomeFeed.d.ts +56 -0
- package/dist/src/client/types/app/bsky/getLikedBy.d.ts +29 -0
- package/dist/src/client/types/app/bsky/getNotificationCount.d.ts +16 -0
- package/dist/src/client/types/app/bsky/getNotifications.d.ts +33 -0
- package/dist/src/client/types/app/bsky/getPostThread.d.ts +55 -0
- package/dist/src/client/types/app/bsky/getProfile.d.ts +26 -0
- package/dist/src/client/types/app/bsky/getRepostedBy.d.ts +29 -0
- package/dist/src/client/types/app/bsky/getTimeline.d.ts +56 -0
- package/dist/src/client/types/app/bsky/getUserFollowers.d.ts +31 -0
- package/dist/src/client/types/app/bsky/getUserFollows.d.ts +31 -0
- package/dist/src/client/types/app/bsky/getUsersSearch.d.ts +26 -0
- package/dist/src/client/types/app/bsky/getUsersTypeahead.d.ts +22 -0
- package/dist/src/client/types/app/bsky/graph/assertCreator.d.ts +1 -0
- package/dist/src/client/types/app/bsky/graph/assertMember.d.ts +1 -0
- package/dist/src/client/types/app/bsky/graph/assertion.d.ts +7 -0
- package/dist/src/client/types/app/bsky/graph/confirmation.d.ts +8 -0
- package/dist/src/client/types/app/bsky/graph/follow.d.ts +6 -0
- package/dist/src/client/types/app/bsky/graph/getAssertions.d.ts +43 -0
- package/dist/src/client/types/app/bsky/graph/getFollowers.d.ts +34 -0
- package/dist/src/client/types/app/bsky/graph/getFollows.d.ts +33 -0
- package/dist/src/client/types/app/bsky/graph/getMembers.d.ts +33 -0
- package/dist/src/client/types/app/bsky/graph/getMemberships.d.ts +33 -0
- package/dist/src/client/types/app/bsky/invite.d.ts +10 -0
- package/dist/src/client/types/app/bsky/inviteAccept.d.ts +14 -0
- package/dist/src/client/types/app/bsky/like.d.ts +10 -0
- package/dist/src/client/types/app/bsky/mediaEmbed.d.ts +15 -0
- package/dist/src/client/types/app/bsky/notification/getCount.d.ts +17 -0
- package/dist/src/client/types/app/bsky/notification/list.d.ts +32 -0
- package/dist/src/client/types/app/bsky/notification/updateSeen.d.ts +17 -0
- package/dist/src/client/types/app/bsky/post.d.ts +23 -0
- package/dist/src/client/types/app/bsky/postNotificationsSeen.d.ts +20 -0
- package/dist/src/client/types/app/bsky/profile.d.ts +5 -0
- package/dist/src/client/types/app/bsky/repost.d.ts +10 -0
- package/dist/src/client/types/app/bsky/system/actorScene.d.ts +1 -0
- package/dist/src/client/types/app/bsky/system/actorUser.d.ts +1 -0
- package/dist/src/client/types/app/bsky/system/declRef.d.ts +5 -0
- package/dist/src/client/types/app/bsky/system/declaration.d.ts +4 -0
- package/dist/src/client/types/app/bsky/updateProfile.d.ts +23 -0
- package/dist/src/client/types/com/atproto/account/create.d.ts +41 -0
- package/dist/src/client/types/com/atproto/account/createInviteCode.d.ts +22 -0
- package/dist/src/client/types/com/atproto/account/delete.d.ts +13 -0
- package/dist/src/client/types/com/atproto/account/get.d.ts +12 -0
- package/dist/src/client/types/com/atproto/account/requestPasswordReset.d.ts +17 -0
- package/dist/src/client/types/com/atproto/account/resetPassword.d.ts +24 -0
- package/dist/src/client/types/com/atproto/blob/upload.d.ts +19 -0
- package/dist/src/client/types/com/atproto/createAccount.d.ts +40 -0
- package/dist/src/client/types/com/atproto/createInviteCode.d.ts +20 -0
- package/dist/src/client/types/com/atproto/createSession.d.ts +24 -0
- package/dist/src/client/types/com/atproto/data/uploadFile.d.ts +19 -0
- package/dist/src/client/types/com/atproto/deleteAccount.d.ts +20 -0
- package/dist/src/client/types/com/atproto/deleteSession.d.ts +17 -0
- package/dist/src/client/types/com/atproto/getAccount.d.ts +16 -0
- package/dist/src/client/types/com/atproto/getAccountsConfig.d.ts +17 -0
- package/dist/src/client/types/com/atproto/getSession.d.ts +17 -0
- package/dist/src/client/types/com/atproto/handle/resolve.d.ts +18 -0
- package/dist/src/client/types/com/atproto/refreshSession.d.ts +20 -0
- package/dist/src/client/types/com/atproto/repo/batchWrite.d.ts +39 -0
- package/dist/src/client/types/com/atproto/repo/createRecord.d.ts +26 -0
- package/dist/src/client/types/com/atproto/repo/deleteRecord.d.ts +19 -0
- package/dist/src/client/types/com/atproto/repo/describe.d.ts +22 -0
- package/dist/src/client/types/com/atproto/repo/getRecord.d.ts +23 -0
- package/dist/src/client/types/com/atproto/repo/listRecords.d.ts +30 -0
- package/dist/src/client/types/com/atproto/repo/putRecord.d.ts +27 -0
- package/dist/src/client/types/com/atproto/repo/strongRef.d.ts +5 -0
- package/dist/src/client/types/com/atproto/repoBatchWrite.d.ts +36 -0
- package/dist/src/client/types/com/atproto/repoCreateRecord.d.ts +24 -0
- package/dist/src/client/types/com/atproto/repoDeleteRecord.d.ts +18 -0
- package/dist/src/client/types/com/atproto/repoDescribe.d.ts +21 -0
- package/dist/src/client/types/com/atproto/repoGetRecord.d.ts +22 -0
- package/dist/src/client/types/com/atproto/repoListRecords.d.ts +27 -0
- package/dist/src/client/types/com/atproto/repoPutRecord.d.ts +25 -0
- package/dist/src/client/types/com/atproto/requestAccountPasswordReset.d.ts +19 -0
- package/dist/src/client/types/com/atproto/resetAccountPassword.d.ts +26 -0
- package/dist/src/client/types/com/atproto/resolveHandle.d.ts +17 -0
- package/dist/src/client/types/com/atproto/resolveName.d.ts +17 -0
- package/dist/src/client/types/com/atproto/server/getAccountsConfig.d.ts +24 -0
- package/dist/src/client/types/com/atproto/session/create.d.ts +26 -0
- package/dist/src/client/types/com/atproto/session/delete.d.ts +13 -0
- package/dist/src/client/types/com/atproto/session/get.d.ts +18 -0
- package/dist/src/client/types/com/atproto/session/refresh.d.ts +21 -0
- package/dist/src/client/types/com/atproto/sync/getRepo.d.ts +15 -0
- package/dist/src/client/types/com/atproto/sync/getRoot.d.ts +18 -0
- package/dist/src/client/types/com/atproto/sync/updateRepo.d.ts +15 -0
- package/dist/src/client/types/com/atproto/syncGetRepo.d.ts +15 -0
- package/dist/src/client/types/com/atproto/syncGetRoot.d.ts +17 -0
- package/dist/src/client/types/com/atproto/syncUpdateRepo.d.ts +15 -0
- package/dist/src/index.d.ts +4 -0
- package/dist/src/schemas.d.ts +19 -0
- package/dist/src/session.d.ts +42 -0
- package/dist/src/types/app/bsky/acceptedBadge.d.ts +10 -0
- package/dist/src/types/app/bsky/badge.d.ts +22 -0
- package/dist/src/types/app/bsky/badgeAccept.d.ts +11 -0
- package/dist/src/types/app/bsky/badgeOffer.d.ts +11 -0
- package/dist/src/types/app/bsky/declaration.d.ts +6 -0
- package/dist/src/types/app/bsky/follow.d.ts +9 -0
- package/dist/src/types/app/bsky/getAuthorFeed.d.ts +56 -0
- package/dist/src/types/app/bsky/getBadgeMembers.d.ts +29 -0
- package/dist/src/types/app/bsky/getHomeFeed.d.ts +56 -0
- package/dist/src/types/app/bsky/getLikedBy.d.ts +29 -0
- package/dist/src/types/app/bsky/getNotificationCount.d.ts +16 -0
- package/dist/src/types/app/bsky/getNotifications.d.ts +33 -0
- package/dist/src/types/app/bsky/getPostThread.d.ts +55 -0
- package/dist/src/types/app/bsky/getProfile.d.ts +42 -0
- package/dist/src/types/app/bsky/getRepostedBy.d.ts +29 -0
- package/dist/src/types/app/bsky/getUserFollowers.d.ts +31 -0
- package/dist/src/types/app/bsky/getUserFollows.d.ts +31 -0
- package/dist/src/types/app/bsky/getUsersSearch.d.ts +26 -0
- package/dist/src/types/app/bsky/getUsersTypeahead.d.ts +22 -0
- package/dist/src/types/app/bsky/invite.d.ts +10 -0
- package/dist/src/types/app/bsky/inviteAccept.d.ts +14 -0
- package/dist/src/types/app/bsky/like.d.ts +10 -0
- package/dist/src/types/app/bsky/mediaEmbed.d.ts +15 -0
- package/dist/src/types/app/bsky/post.d.ts +23 -0
- package/dist/src/types/app/bsky/postNotificationsSeen.d.ts +19 -0
- package/dist/src/types/app/bsky/profile.d.ts +11 -0
- package/dist/src/types/app/bsky/repost.d.ts +10 -0
- package/dist/src/types/app/bsky/updateProfile.d.ts +27 -0
- package/dist/src/types/com/atproto/createAccount.d.ts +39 -0
- package/dist/src/types/com/atproto/createInviteCode.d.ts +19 -0
- package/dist/src/types/com/atproto/createSession.d.ts +23 -0
- package/dist/src/types/com/atproto/deleteAccount.d.ts +19 -0
- package/dist/src/types/com/atproto/deleteSession.d.ts +16 -0
- package/dist/src/types/com/atproto/getAccount.d.ts +19 -0
- package/dist/src/types/com/atproto/getAccountsConfig.d.ts +17 -0
- package/dist/src/types/com/atproto/getSession.d.ts +17 -0
- package/dist/src/types/com/atproto/refreshSession.d.ts +19 -0
- package/dist/src/types/com/atproto/repoBatchWrite.d.ts +35 -0
- package/dist/src/types/com/atproto/repoCreateRecord.d.ts +23 -0
- package/dist/src/types/com/atproto/repoDeleteRecord.d.ts +15 -0
- package/dist/src/types/com/atproto/repoDescribe.d.ts +21 -0
- package/dist/src/types/com/atproto/repoGetRecord.d.ts +22 -0
- package/dist/src/types/com/atproto/repoListRecords.d.ts +27 -0
- package/dist/src/types/com/atproto/repoPutRecord.d.ts +24 -0
- package/dist/src/types/com/atproto/requestAccountPasswordReset.d.ts +18 -0
- package/dist/src/types/com/atproto/resetAccountPassword.d.ts +25 -0
- package/dist/src/types/com/atproto/resolveName.d.ts +17 -0
- package/dist/src/types/com/atproto/syncGetRepo.d.ts +15 -0
- package/dist/src/types/com/atproto/syncGetRoot.d.ts +17 -0
- package/dist/src/types/com/atproto/syncUpdateRepo.d.ts +14 -0
- package/dist/src/types/todo/adx/createAccount.d.ts +36 -0
- package/dist/src/types/todo/adx/createInviteCode.d.ts +19 -0
- package/dist/src/types/todo/adx/createSession.d.ts +22 -0
- package/dist/src/types/todo/adx/deleteAccount.d.ts +19 -0
- package/dist/src/types/todo/adx/deleteSession.d.ts +19 -0
- package/dist/src/types/todo/adx/getAccount.d.ts +19 -0
- package/dist/src/types/todo/adx/getAccountsConfig.d.ts +17 -0
- package/dist/src/types/todo/adx/getSession.d.ts +17 -0
- package/dist/src/types/todo/adx/repoBatchWrite.d.ts +34 -0
- package/dist/src/types/todo/adx/repoCreateRecord.d.ts +22 -0
- package/dist/src/types/todo/adx/repoDeleteRecord.d.ts +15 -0
- package/dist/src/types/todo/adx/repoDescribe.d.ts +21 -0
- package/dist/src/types/todo/adx/repoGetRecord.d.ts +20 -0
- package/dist/src/types/todo/adx/repoListRecords.d.ts +25 -0
- package/dist/src/types/todo/adx/repoPutRecord.d.ts +23 -0
- package/dist/src/types/todo/adx/requestAccountPasswordReset.d.ts +18 -0
- package/dist/src/types/todo/adx/resetAccountPassword.d.ts +25 -0
- package/dist/src/types/todo/adx/resolveName.d.ts +17 -0
- package/dist/src/types/todo/adx/syncGetRepo.d.ts +15 -0
- package/dist/src/types/todo/adx/syncGetRoot.d.ts +17 -0
- package/dist/src/types/todo/adx/syncUpdateRepo.d.ts +14 -0
- package/dist/src/types/todo/social/badge.d.ts +23 -0
- package/dist/src/types/todo/social/follow.d.ts +5 -0
- package/dist/src/types/todo/social/getAuthorFeed.d.ts +55 -0
- package/dist/src/types/todo/social/getFeed.d.ts +55 -0
- package/dist/src/types/todo/social/getHomeFeed.d.ts +55 -0
- package/dist/src/types/todo/social/getLikedBy.d.ts +26 -0
- package/dist/src/types/todo/social/getNotificationCount.d.ts +16 -0
- package/dist/src/types/todo/social/getNotifications.d.ts +31 -0
- package/dist/src/types/todo/social/getPostThread.d.ts +54 -0
- package/dist/src/types/todo/social/getProfile.d.ts +40 -0
- package/dist/src/types/todo/social/getRepostedBy.d.ts +26 -0
- package/dist/src/types/todo/social/getUserFollowers.d.ts +30 -0
- package/dist/src/types/todo/social/getUserFollows.d.ts +30 -0
- package/dist/src/types/todo/social/like.d.ts +5 -0
- package/dist/src/types/todo/social/mediaEmbed.d.ts +15 -0
- package/dist/src/types/todo/social/post.d.ts +18 -0
- package/dist/src/types/todo/social/postNotificationsSeen.d.ts +19 -0
- package/dist/src/types/todo/social/profile.d.ts +10 -0
- package/dist/src/types/todo/social/repost.d.ts +5 -0
- package/dist/types.d.ts +2 -4
- package/docs/labels.md +22 -468
- package/docs/moderation.md +0 -2
- package/package.json +5 -5
- package/scripts/code/labels.mjs +17 -35
- package/scripts/docs/labels.mjs +8 -85
- package/scripts/generate-code.mjs +0 -1
- package/scripts/generate-docs.mjs +0 -2
- package/src/agent.ts +24 -4
- package/src/bsky-agent.ts +184 -24
- package/src/client/index.ts +292 -173
- package/src/client/lexicons.ts +6192 -5926
- package/src/client/types/app/bsky/actor/defs.ts +57 -1
- package/src/client/types/app/bsky/embed/record.ts +2 -0
- package/src/client/types/app/bsky/labeler/defs.ts +93 -0
- package/src/client/types/app/bsky/labeler/getServices.ts +41 -0
- package/src/client/types/app/bsky/labeler/service.ts +31 -0
- package/src/client/types/com/atproto/admin/defs.ts +0 -694
- package/src/client/types/com/atproto/label/defs.ts +74 -0
- package/src/client/types/{com/atproto/admin/createCommunicationTemplate.ts → tools/ozone/communication/createTemplate.ts} +2 -2
- package/src/client/types/tools/ozone/communication/defs.ts +35 -0
- package/src/client/types/{com/atproto/admin/listCommunicationTemplates.ts → tools/ozone/communication/listTemplates.ts} +2 -2
- package/src/client/types/{com/atproto/admin/updateCommunicationTemplate.ts → tools/ozone/communication/updateTemplate.ts} +2 -2
- package/src/client/types/tools/ozone/moderation/defs.ts +641 -0
- package/src/client/types/{com/atproto/admin/emitModerationEvent.ts → tools/ozone/moderation/emitEvent.ts} +15 -14
- package/src/client/types/{com/atproto/admin/getModerationEvent.ts → tools/ozone/moderation/getEvent.ts} +2 -2
- package/src/client/types/{com/atproto/admin → tools/ozone/moderation}/getRecord.ts +2 -2
- package/src/client/types/{com/atproto/admin → tools/ozone/moderation}/getRepo.ts +2 -2
- package/src/client/types/{com/atproto/admin/queryModerationEvents.ts → tools/ozone/moderation/queryEvents.ts} +3 -3
- package/src/client/types/{com/atproto/admin/queryModerationStatuses.ts → tools/ozone/moderation/queryStatuses.ts} +2 -2
- package/src/client/types/{com/atproto/admin → tools/ozone/moderation}/searchRepos.ts +2 -2
- package/src/const.ts +1 -0
- package/src/index.ts +3 -2
- package/src/mocker.ts +214 -0
- package/src/moderation/const/labels.ts +247 -847
- package/src/moderation/decision.ts +337 -0
- package/src/moderation/index.ts +38 -304
- package/src/moderation/subjects/account.ts +6 -10
- package/src/moderation/subjects/feed-generator.ts +3 -6
- package/src/moderation/subjects/notification.ts +19 -0
- package/src/moderation/subjects/post.ts +6 -10
- package/src/moderation/subjects/profile.ts +6 -11
- package/src/moderation/subjects/user-list.ts +3 -6
- package/src/moderation/types.ts +81 -77
- package/src/moderation/ui.ts +21 -0
- package/src/moderation/util.ts +82 -72
- package/src/types.ts +3 -10
- package/tests/agent.test.ts +20 -0
- package/tests/bsky-agent.test.ts +401 -98
- package/tests/moderation-behaviors.test.ts +969 -0
- package/tests/moderation-custom-labels.test.ts +358 -0
- package/tests/moderation-prefs.test.ts +276 -0
- package/tests/moderation.test.ts +303 -201
- package/tests/util/echo-server.ts +21 -0
- package/tests/util/index.ts +1 -154
- package/tests/util/moderation-behavior.ts +129 -55
- package/definitions/locale/en/label-groups.json +0 -38
- package/definitions/locale/en/labels.json +0 -394
- package/definitions/locale/en/proposed-label-groups.json +0 -38
- package/definitions/locale/en/proposed-labels.json +0 -632
- package/definitions/moderation-behaviors.d.ts +0 -50
- package/definitions/post-moderation-behaviors.json +0 -1222
- package/definitions/profile-moderation-behaviors.json +0 -597
- package/definitions/proposed-labels.json +0 -326
- package/docs/moderation-behaviors/posts.md +0 -1813
- package/docs/moderation-behaviors/profiles.md +0 -833
- package/scripts/code/label-groups.mjs +0 -68
- package/scripts/docs/post-moderation-behaviors.mjs +0 -117
- package/scripts/docs/profile-moderation-behaviors.mjs +0 -122
- package/src/moderation/accumulator.ts +0 -217
- package/src/moderation/const/label-groups.ts +0 -149
- package/src/moderation/subjects/quoted-post.ts +0 -80
- package/tests/post-moderation.test.ts +0 -46
- package/tests/profile-moderation.test.ts +0 -46
- /package/src/client/types/{com/atproto/admin/deleteCommunicationTemplate.ts → tools/ozone/communication/deleteTemplate.ts} +0 -0
package/dist/mocker.d.ts
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { ComAtprotoLabelDefs, AppBskyFeedDefs, AppBskyActorDefs, AppBskyFeedPost, AppBskyEmbedRecord, AppBskyGraphDefs, AppBskyNotificationListNotifications } from './client';
|
|
2
|
+
export declare const mock: {
|
|
3
|
+
post({ text, reply, embed, }: {
|
|
4
|
+
text: string;
|
|
5
|
+
reply?: AppBskyFeedPost.ReplyRef | undefined;
|
|
6
|
+
embed?: AppBskyFeedPost.Record['embed'];
|
|
7
|
+
}): AppBskyFeedPost.Record;
|
|
8
|
+
postView({ record, author, embed, replyCount, repostCount, likeCount, viewer, labels, }: {
|
|
9
|
+
record: AppBskyFeedPost.Record;
|
|
10
|
+
author: AppBskyActorDefs.ProfileViewBasic;
|
|
11
|
+
embed?: AppBskyFeedDefs.PostView['embed'];
|
|
12
|
+
replyCount?: number | undefined;
|
|
13
|
+
repostCount?: number | undefined;
|
|
14
|
+
likeCount?: number | undefined;
|
|
15
|
+
viewer?: AppBskyFeedDefs.ViewerState | undefined;
|
|
16
|
+
labels?: ComAtprotoLabelDefs.Label[] | undefined;
|
|
17
|
+
}): AppBskyFeedDefs.PostView;
|
|
18
|
+
embedRecordView({ record, author, labels, }: {
|
|
19
|
+
record: AppBskyFeedPost.Record;
|
|
20
|
+
author: AppBskyActorDefs.ProfileViewBasic;
|
|
21
|
+
labels?: ComAtprotoLabelDefs.Label[] | undefined;
|
|
22
|
+
}): AppBskyEmbedRecord.View;
|
|
23
|
+
profileViewBasic({ handle, displayName, description, viewer, labels, }: {
|
|
24
|
+
handle: string;
|
|
25
|
+
displayName?: string | undefined;
|
|
26
|
+
description?: string | undefined;
|
|
27
|
+
viewer?: AppBskyActorDefs.ViewerState | undefined;
|
|
28
|
+
labels?: ComAtprotoLabelDefs.Label[] | undefined;
|
|
29
|
+
}): AppBskyActorDefs.ProfileViewBasic;
|
|
30
|
+
actorViewerState({ muted, mutedByList, blockedBy, blocking, blockingByList, following, followedBy, }: {
|
|
31
|
+
muted?: boolean | undefined;
|
|
32
|
+
mutedByList?: AppBskyGraphDefs.ListViewBasic | undefined;
|
|
33
|
+
blockedBy?: boolean | undefined;
|
|
34
|
+
blocking?: string | undefined;
|
|
35
|
+
blockingByList?: AppBskyGraphDefs.ListViewBasic | undefined;
|
|
36
|
+
following?: string | undefined;
|
|
37
|
+
followedBy?: string | undefined;
|
|
38
|
+
}): AppBskyActorDefs.ViewerState;
|
|
39
|
+
listViewBasic({ name }: {
|
|
40
|
+
name: string;
|
|
41
|
+
}): AppBskyGraphDefs.ListViewBasic;
|
|
42
|
+
replyNotification({ author, record, labels, }: {
|
|
43
|
+
record: AppBskyFeedPost.Record;
|
|
44
|
+
author: AppBskyActorDefs.ProfileViewBasic;
|
|
45
|
+
labels?: ComAtprotoLabelDefs.Label[] | undefined;
|
|
46
|
+
}): AppBskyNotificationListNotifications.Notification;
|
|
47
|
+
followNotification({ author, subjectDid, labels, }: {
|
|
48
|
+
author: AppBskyActorDefs.ProfileViewBasic;
|
|
49
|
+
subjectDid: string;
|
|
50
|
+
labels?: ComAtprotoLabelDefs.Label[] | undefined;
|
|
51
|
+
}): AppBskyNotificationListNotifications.Notification;
|
|
52
|
+
label({ val, uri, src, }: {
|
|
53
|
+
val: string;
|
|
54
|
+
uri: string;
|
|
55
|
+
src?: string | undefined;
|
|
56
|
+
}): ComAtprotoLabelDefs.Label;
|
|
57
|
+
};
|
|
@@ -1,2 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export
|
|
1
|
+
import { InterprettedLabelValueDefinition, LabelPreference } from '../types';
|
|
2
|
+
export type KnownLabelValue = '!hide' | '!no-promote' | '!warn' | '!no-unauthenticated' | 'dmca-violation' | 'doxxing' | 'porn' | 'sexual' | 'nudity' | 'gore';
|
|
3
|
+
export declare const DEFAULT_LABEL_SETTINGS: Record<string, LabelPreference>;
|
|
4
|
+
export declare const LABELS: Record<KnownLabelValue, InterprettedLabelValueDefinition>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { AppBskyGraphDefs } from '../client/index';
|
|
2
|
+
import { Label, ModerationCause, ModerationOpts, LabelTarget, ModerationBehavior } from './types';
|
|
3
|
+
import { ModerationUI } from './ui';
|
|
4
|
+
export declare class ModerationDecision {
|
|
5
|
+
did: string;
|
|
6
|
+
isMe: boolean;
|
|
7
|
+
causes: ModerationCause[];
|
|
8
|
+
constructor();
|
|
9
|
+
static merge(...decisions: (ModerationDecision | undefined)[]): ModerationDecision;
|
|
10
|
+
get blocked(): boolean;
|
|
11
|
+
get muted(): boolean;
|
|
12
|
+
get blockCause(): ModerationCause | undefined;
|
|
13
|
+
get muteCause(): ModerationCause | undefined;
|
|
14
|
+
get labelCauses(): ModerationCause[];
|
|
15
|
+
ui(context: keyof ModerationBehavior): ModerationUI;
|
|
16
|
+
setDid(did: string): void;
|
|
17
|
+
setIsMe(isMe: boolean): void;
|
|
18
|
+
addHidden(hidden: boolean): void;
|
|
19
|
+
addBlocking(blocking: string | undefined): void;
|
|
20
|
+
addBlockingByList(blockingByList: AppBskyGraphDefs.ListViewBasic | undefined): void;
|
|
21
|
+
addBlockedBy(blockedBy: boolean | undefined): void;
|
|
22
|
+
addBlockOther(blockOther: boolean | undefined): void;
|
|
23
|
+
addLabel(target: LabelTarget, label: Label, opts: ModerationOpts): void;
|
|
24
|
+
addMuted(muted: boolean | undefined): void;
|
|
25
|
+
addMutedByList(mutedByList: AppBskyGraphDefs.ListViewBasic | undefined): void;
|
|
26
|
+
}
|
|
@@ -1,44 +1,10 @@
|
|
|
1
|
-
import { ModerationSubjectProfile, ModerationSubjectPost, ModerationSubjectFeedGenerator, ModerationSubjectUserList, ModerationOpts
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
export declare function moderateProfile(subject: ModerationSubjectProfile, opts: ModerationOpts): ProfileModeration;
|
|
12
|
-
export interface PostModeration {
|
|
13
|
-
decisions: {
|
|
14
|
-
post: ModerationDecision;
|
|
15
|
-
account: ModerationDecision;
|
|
16
|
-
profile: ModerationDecision;
|
|
17
|
-
quote?: ModerationDecision;
|
|
18
|
-
quotedAccount?: ModerationDecision;
|
|
19
|
-
};
|
|
20
|
-
content: ModerationUI;
|
|
21
|
-
avatar: ModerationUI;
|
|
22
|
-
embed: ModerationUI;
|
|
23
|
-
}
|
|
24
|
-
export declare function moderatePost(subject: ModerationSubjectPost, opts: ModerationOpts): PostModeration;
|
|
25
|
-
export interface FeedGeneratorModeration {
|
|
26
|
-
decisions: {
|
|
27
|
-
feedGenerator: ModerationDecision;
|
|
28
|
-
account: ModerationDecision;
|
|
29
|
-
profile: ModerationDecision;
|
|
30
|
-
};
|
|
31
|
-
content: ModerationUI;
|
|
32
|
-
avatar: ModerationUI;
|
|
33
|
-
}
|
|
34
|
-
export declare function moderateFeedGenerator(subject: ModerationSubjectFeedGenerator, opts: ModerationOpts): FeedGeneratorModeration;
|
|
35
|
-
export interface UserListModeration {
|
|
36
|
-
decisions: {
|
|
37
|
-
userList: ModerationDecision;
|
|
38
|
-
account: ModerationDecision;
|
|
39
|
-
profile: ModerationDecision;
|
|
40
|
-
};
|
|
41
|
-
content: ModerationUI;
|
|
42
|
-
avatar: ModerationUI;
|
|
43
|
-
}
|
|
44
|
-
export declare function moderateUserList(subject: ModerationSubjectUserList, opts: ModerationOpts): UserListModeration;
|
|
1
|
+
import { ModerationSubjectProfile, ModerationSubjectPost, ModerationSubjectNotification, ModerationSubjectFeedGenerator, ModerationSubjectUserList, ModerationOpts } from './types';
|
|
2
|
+
import { ModerationDecision } from './decision';
|
|
3
|
+
export { ModerationUI } from './ui';
|
|
4
|
+
export { ModerationDecision } from './decision';
|
|
5
|
+
export { interpretLabelValueDefinition, interpretLabelValueDefinitions, } from './util';
|
|
6
|
+
export declare function moderateProfile(subject: ModerationSubjectProfile, opts: ModerationOpts): ModerationDecision;
|
|
7
|
+
export declare function moderatePost(subject: ModerationSubjectPost, opts: ModerationOpts): ModerationDecision;
|
|
8
|
+
export declare function moderateNotification(subject: ModerationSubjectNotification, opts: ModerationOpts): ModerationDecision;
|
|
9
|
+
export declare function moderateFeedGenerator(subject: ModerationSubjectFeedGenerator, opts: ModerationOpts): ModerationDecision;
|
|
10
|
+
export declare function moderateUserList(subject: ModerationSubjectUserList, opts: ModerationOpts): ModerationDecision;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ModerationDecision } from '../decision';
|
|
2
|
+
import { Label, ModerationSubjectProfile, ModerationOpts } from '../types';
|
|
2
3
|
export declare function decideAccount(subject: ModerationSubjectProfile, opts: ModerationOpts): ModerationDecision;
|
|
3
4
|
export declare function filterAccountLabels(labels?: Label[]): Label[];
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ModerationDecision } from '../decision';
|
|
2
|
+
import { ModerationSubjectFeedGenerator, ModerationOpts } from '../types';
|
|
2
3
|
export declare function decideFeedGenerator(_subject: ModerationSubjectFeedGenerator, _opts: ModerationOpts): ModerationDecision;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ModerationDecision } from '../decision';
|
|
2
|
+
import { ModerationSubjectPost, ModerationOpts } from '../types';
|
|
2
3
|
export declare function decidePost(subject: ModerationSubjectPost, opts: ModerationOpts): ModerationDecision;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ModerationDecision } from '../decision';
|
|
2
|
+
import { Label, ModerationSubjectProfile, ModerationOpts } from '../types';
|
|
2
3
|
export declare function decideProfile(subject: ModerationSubjectProfile, opts: ModerationOpts): ModerationDecision;
|
|
3
4
|
export declare function filterProfileLabels(labels?: Label[]): Label[];
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ModerationDecision } from '../decision';
|
|
2
|
+
import { ModerationSubjectUserList, ModerationOpts } from '../types';
|
|
2
3
|
export declare function decideUserList(_subject: ModerationSubjectUserList, _opts: ModerationOpts): ModerationDecision;
|
|
@@ -1,49 +1,41 @@
|
|
|
1
|
-
import { AppBskyActorDefs, AppBskyFeedDefs, AppBskyGraphDefs, ComAtprotoLabelDefs } from '../client/index';
|
|
1
|
+
import { AppBskyActorDefs, AppBskyFeedDefs, AppBskyNotificationListNotifications, AppBskyGraphDefs, ComAtprotoLabelDefs } from '../client/index';
|
|
2
|
+
import { KnownLabelValue } from './const/labels';
|
|
3
|
+
export declare const CUSTOM_LABEL_VALUE_RE: RegExp;
|
|
4
|
+
export interface ModerationBehavior {
|
|
5
|
+
profileList?: 'blur' | 'alert' | 'inform';
|
|
6
|
+
profileView?: 'blur' | 'alert' | 'inform';
|
|
7
|
+
avatar?: 'blur' | 'alert';
|
|
8
|
+
banner?: 'blur';
|
|
9
|
+
displayName?: 'blur';
|
|
10
|
+
contentList?: 'blur' | 'alert' | 'inform';
|
|
11
|
+
contentView?: 'blur' | 'alert' | 'inform';
|
|
12
|
+
contentMedia?: 'blur';
|
|
13
|
+
}
|
|
14
|
+
export declare const BLOCK_BEHAVIOR: ModerationBehavior;
|
|
15
|
+
export declare const MUTE_BEHAVIOR: ModerationBehavior;
|
|
16
|
+
export declare const HIDE_BEHAVIOR: ModerationBehavior;
|
|
17
|
+
export declare const NOOP_BEHAVIOR: ModerationBehavior;
|
|
2
18
|
export type Label = ComAtprotoLabelDefs.Label;
|
|
19
|
+
export type LabelTarget = 'account' | 'profile' | 'content';
|
|
3
20
|
export type LabelPreference = 'ignore' | 'warn' | 'hide';
|
|
4
|
-
export type
|
|
5
|
-
export
|
|
6
|
-
export interface LabelDefinitionLocalizedStrings {
|
|
7
|
-
name: string;
|
|
8
|
-
description: string;
|
|
9
|
-
}
|
|
10
|
-
export type LabelDefinitionLocalizedStringsMap = Record<string, LabelDefinitionLocalizedStrings>;
|
|
11
|
-
export interface LabelDefinition {
|
|
12
|
-
id: string;
|
|
13
|
-
groupId: string;
|
|
14
|
-
configurable: boolean;
|
|
15
|
-
preferences: LabelPreference[];
|
|
16
|
-
flags: LabelDefinitionFlag[];
|
|
17
|
-
onwarn: LabelDefinitionOnWarnBehavior;
|
|
18
|
-
strings: {
|
|
19
|
-
settings: LabelDefinitionLocalizedStringsMap;
|
|
20
|
-
account: LabelDefinitionLocalizedStringsMap;
|
|
21
|
-
content: LabelDefinitionLocalizedStringsMap;
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
export interface LabelGroupDefinition {
|
|
25
|
-
id: string;
|
|
21
|
+
export type LabelValueDefinitionFlag = 'no-override' | 'adult' | 'unauthed' | 'no-self';
|
|
22
|
+
export interface InterprettedLabelValueDefinition extends ComAtprotoLabelDefs.LabelValueDefinition {
|
|
26
23
|
configurable: boolean;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
24
|
+
defaultSetting: LabelPreference;
|
|
25
|
+
flags: LabelValueDefinitionFlag[];
|
|
26
|
+
behaviors: {
|
|
27
|
+
account?: ModerationBehavior;
|
|
28
|
+
profile?: ModerationBehavior;
|
|
29
|
+
content?: ModerationBehavior;
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
|
-
export type LabelDefinitionMap = Record<
|
|
33
|
-
export type LabelGroupDefinitionMap = Record<string, LabelGroupDefinition>;
|
|
34
|
-
interface Labeler {
|
|
35
|
-
did: string;
|
|
36
|
-
displayName: string;
|
|
37
|
-
}
|
|
38
|
-
export interface LabelerSettings {
|
|
39
|
-
labeler: Labeler;
|
|
40
|
-
labels: Record<string, LabelPreference>;
|
|
41
|
-
}
|
|
32
|
+
export type LabelDefinitionMap = Record<KnownLabelValue, InterprettedLabelValueDefinition>;
|
|
42
33
|
export type ModerationSubjectProfile = AppBskyActorDefs.ProfileViewBasic | AppBskyActorDefs.ProfileView | AppBskyActorDefs.ProfileViewDetailed;
|
|
43
34
|
export type ModerationSubjectPost = AppBskyFeedDefs.PostView;
|
|
35
|
+
export type ModerationSubjectNotification = AppBskyNotificationListNotifications.Notification;
|
|
44
36
|
export type ModerationSubjectFeedGenerator = AppBskyFeedDefs.GeneratorView;
|
|
45
37
|
export type ModerationSubjectUserList = AppBskyGraphDefs.ListViewBasic | AppBskyGraphDefs.ListView;
|
|
46
|
-
export type ModerationSubject = ModerationSubjectProfile | ModerationSubjectPost | ModerationSubjectFeedGenerator | ModerationSubjectUserList;
|
|
38
|
+
export type ModerationSubject = ModerationSubjectProfile | ModerationSubjectPost | ModerationSubjectNotification | ModerationSubjectFeedGenerator | ModerationSubjectUserList;
|
|
47
39
|
export type ModerationCauseSource = {
|
|
48
40
|
type: 'user';
|
|
49
41
|
} | {
|
|
@@ -51,7 +43,7 @@ export type ModerationCauseSource = {
|
|
|
51
43
|
list: AppBskyGraphDefs.ListViewBasic;
|
|
52
44
|
} | {
|
|
53
45
|
type: 'labeler';
|
|
54
|
-
|
|
46
|
+
did: string;
|
|
55
47
|
};
|
|
56
48
|
export type ModerationCause = {
|
|
57
49
|
type: 'blocking';
|
|
@@ -69,37 +61,31 @@ export type ModerationCause = {
|
|
|
69
61
|
type: 'label';
|
|
70
62
|
source: ModerationCauseSource;
|
|
71
63
|
label: Label;
|
|
72
|
-
labelDef:
|
|
64
|
+
labelDef: InterprettedLabelValueDefinition;
|
|
73
65
|
setting: LabelPreference;
|
|
66
|
+
behavior: ModerationBehavior;
|
|
67
|
+
noOverride: boolean;
|
|
74
68
|
priority: 1 | 2 | 5 | 7 | 8;
|
|
75
69
|
} | {
|
|
76
70
|
type: 'muted';
|
|
77
71
|
source: ModerationCauseSource;
|
|
78
72
|
priority: 6;
|
|
73
|
+
} | {
|
|
74
|
+
type: 'hidden';
|
|
75
|
+
source: ModerationCauseSource;
|
|
76
|
+
priority: 6;
|
|
79
77
|
};
|
|
80
|
-
export interface
|
|
81
|
-
|
|
82
|
-
adultContentEnabled: boolean;
|
|
78
|
+
export interface ModerationPrefsModerator {
|
|
79
|
+
did: string;
|
|
83
80
|
labels: Record<string, LabelPreference>;
|
|
84
|
-
labelers: LabelerSettings[];
|
|
85
81
|
}
|
|
86
|
-
export
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
blurMedia: boolean;
|
|
91
|
-
filter: boolean;
|
|
92
|
-
noOverride: boolean;
|
|
93
|
-
additionalCauses: ModerationCause[];
|
|
94
|
-
did: string;
|
|
95
|
-
static noop(): ModerationDecision;
|
|
96
|
-
constructor(cause?: ModerationCause | undefined, alert?: boolean, blur?: boolean, blurMedia?: boolean, filter?: boolean, noOverride?: boolean, additionalCauses?: ModerationCause[], did?: string);
|
|
82
|
+
export interface ModerationPrefs {
|
|
83
|
+
adultContentEnabled: boolean;
|
|
84
|
+
labels: Record<string, LabelPreference>;
|
|
85
|
+
mods: ModerationPrefsModerator[];
|
|
97
86
|
}
|
|
98
|
-
export interface
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
cause?: ModerationCause;
|
|
103
|
-
noOverride?: boolean;
|
|
87
|
+
export interface ModerationOpts {
|
|
88
|
+
userDid: string | undefined;
|
|
89
|
+
prefs: ModerationPrefs;
|
|
90
|
+
labelDefs?: Record<string, InterprettedLabelValueDefinition[]>;
|
|
104
91
|
}
|
|
105
|
-
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ModerationCause } from './types';
|
|
2
|
+
export declare class ModerationUI {
|
|
3
|
+
noOverride: boolean;
|
|
4
|
+
filters: ModerationCause[];
|
|
5
|
+
blurs: ModerationCause[];
|
|
6
|
+
alerts: ModerationCause[];
|
|
7
|
+
informs: ModerationCause[];
|
|
8
|
+
get filter(): boolean;
|
|
9
|
+
get blur(): boolean;
|
|
10
|
+
get alert(): boolean;
|
|
11
|
+
get inform(): boolean;
|
|
12
|
+
}
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
import { AppBskyEmbedRecord, AppBskyEmbedRecordWithMedia } from '../client';
|
|
2
|
-
import {
|
|
3
|
-
export declare function takeHighestPriorityDecision(...decisions: (ModerationDecision | undefined)[]): ModerationDecision;
|
|
4
|
-
export declare function downgradeDecision(decision: ModerationDecision, to: 'blur' | 'alert' | 'noop'): void;
|
|
5
|
-
export declare function isModerationDecisionNoop(decision: ModerationDecision | undefined, { ignoreFilter }?: {
|
|
6
|
-
ignoreFilter: boolean;
|
|
7
|
-
}): boolean;
|
|
1
|
+
import { AppBskyEmbedRecord, AppBskyEmbedRecordWithMedia, AppBskyLabelerDefs, ComAtprotoLabelDefs } from '../client';
|
|
2
|
+
import { InterprettedLabelValueDefinition } from './types';
|
|
8
3
|
export declare function isQuotedPost(embed: unknown): embed is AppBskyEmbedRecord.View;
|
|
9
4
|
export declare function isQuotedPostWithMedia(embed: unknown): embed is AppBskyEmbedRecordWithMedia.View;
|
|
10
|
-
export declare function
|
|
5
|
+
export declare function interpretLabelValueDefinition(def: ComAtprotoLabelDefs.LabelValueDefinition): InterprettedLabelValueDefinition;
|
|
6
|
+
export declare function interpretLabelValueDefinitions(modserviceView: AppBskyLabelerDefs.LabelerViewDetailed): InterprettedLabelValueDefinition[];
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { CallOptions, Client as XrpcClient, ServiceClient as XrpcServiceClient, QueryParams, XRPCResponse } from '@atproto/xrpc';
|
|
2
|
+
import TypedEmitter from 'typed-emitter';
|
|
3
|
+
import { Client, ServiceClient } from './client';
|
|
4
|
+
export declare class SessionClient extends Client {
|
|
5
|
+
service(serviceUri: string | URL): SessionServiceClient;
|
|
6
|
+
}
|
|
7
|
+
declare const defaultInst: SessionClient;
|
|
8
|
+
export default defaultInst;
|
|
9
|
+
export declare class SessionServiceClient extends ServiceClient {
|
|
10
|
+
xrpc: SessionXrpcServiceClient;
|
|
11
|
+
sessionManager: SessionManager;
|
|
12
|
+
constructor(baseClient: Client, xrpcService: SessionXrpcServiceClient);
|
|
13
|
+
}
|
|
14
|
+
export declare class SessionXrpcServiceClient extends XrpcServiceClient {
|
|
15
|
+
sessionManager: SessionManager;
|
|
16
|
+
refreshing?: Promise<XRPCResponse>;
|
|
17
|
+
constructor(baseClient: XrpcClient, serviceUri: string | URL);
|
|
18
|
+
call(methodNsid: string, params?: QueryParams, data?: unknown, opts?: CallOptions): Promise<XRPCResponse>;
|
|
19
|
+
refresh(opts?: CallOptions): Promise<XRPCResponse>;
|
|
20
|
+
private _refresh;
|
|
21
|
+
}
|
|
22
|
+
declare const SessionManager_base: new () => TypedEmitter<SessionEvents>;
|
|
23
|
+
export declare class SessionManager extends SessionManager_base {
|
|
24
|
+
session?: Session;
|
|
25
|
+
get(): Session | undefined;
|
|
26
|
+
set(session: Session): void;
|
|
27
|
+
unset(): void;
|
|
28
|
+
active(): boolean;
|
|
29
|
+
accessHeaders(): {
|
|
30
|
+
authorization: string;
|
|
31
|
+
} | undefined;
|
|
32
|
+
refreshHeaders(): {
|
|
33
|
+
authorization: string;
|
|
34
|
+
} | undefined;
|
|
35
|
+
}
|
|
36
|
+
export declare type Session = {
|
|
37
|
+
refreshJwt: string;
|
|
38
|
+
accessJwt: string;
|
|
39
|
+
};
|
|
40
|
+
declare type SessionEvents = {
|
|
41
|
+
session: (session?: Session) => void;
|
|
42
|
+
};
|