@atproto/api 0.11.0-next → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +23 -0
- package/README.md +41 -58
- package/definitions/labels.json +3 -60
- package/dist/agent.d.ts +11 -5
- package/dist/bsky-agent.d.ts +5 -3
- package/dist/client/lexicons.d.ts +34 -3
- package/dist/client/types/app/bsky/actor/defs.d.ts +7 -7
- package/dist/client/types/app/bsky/feed/defs.d.ts +1 -0
- package/dist/client/types/app/bsky/graph/defs.d.ts +3 -0
- package/dist/client/types/com/atproto/label/defs.d.ts +2 -0
- package/dist/const.d.ts +1 -1
- package/dist/index.js +581 -204
- package/dist/index.js.map +3 -3
- package/dist/mocker.d.ts +2 -1
- package/dist/moderation/const/labels.d.ts +3 -3
- package/dist/moderation/decision.d.ts +2 -0
- package/dist/moderation/index.d.ts +1 -0
- package/dist/moderation/mutewords.d.ts +8 -0
- package/dist/moderation/subjects/feed-generator.d.ts +1 -1
- package/dist/moderation/subjects/user-list.d.ts +1 -1
- package/dist/moderation/types.d.ts +22 -6
- package/dist/moderation/util.d.ts +3 -3
- package/dist/types.d.ts +3 -4
- package/docs/moderation.md +204 -95
- package/package.json +9 -9
- package/scripts/code/labels.mjs +2 -2
- package/src/agent.ts +61 -16
- package/src/bsky-agent.ts +190 -71
- package/src/client/lexicons.ts +37 -5
- package/src/client/types/app/bsky/actor/defs.ts +11 -11
- package/src/client/types/app/bsky/feed/defs.ts +1 -0
- package/src/client/types/app/bsky/graph/defs.ts +3 -0
- package/src/client/types/com/atproto/label/defs.ts +4 -0
- package/src/const.ts +1 -1
- package/src/mocker.ts +4 -0
- package/src/moderation/const/labels.ts +9 -72
- package/src/moderation/decision.ts +82 -36
- package/src/moderation/index.ts +5 -24
- package/src/moderation/mutewords.ts +125 -0
- package/src/moderation/subjects/feed-generator.ts +18 -4
- package/src/moderation/subjects/notification.ts +7 -1
- package/src/moderation/subjects/post.ts +260 -1
- package/src/moderation/subjects/user-list.ts +38 -4
- package/src/moderation/types.ts +51 -12
- package/src/moderation/util.ts +33 -16
- package/src/types.ts +7 -3
- package/tests/agent.test.ts +71 -5
- package/tests/bsky-agent.test.ts +150 -217
- package/tests/moderation-behaviors.test.ts +5 -60
- package/tests/moderation-custom-labels.test.ts +46 -71
- package/tests/moderation-mutewords.test.ts +691 -0
- package/tests/moderation-prefs.test.ts +157 -92
- package/tests/moderation-quoteposts.test.ts +277 -0
- package/tests/moderation.test.ts +302 -38
- package/tests/util/moderation-behavior.ts +3 -1
- package/dist/client/types/app/bsky/actor/createScene.d.ts +0 -32
- package/dist/client/types/app/bsky/actor/ref.d.ts +0 -28
- package/dist/client/types/app/bsky/actor/search.d.ts +0 -22
- package/dist/client/types/app/bsky/actor/searchActor.d.ts +0 -22
- package/dist/client/types/app/bsky/actor/searchActorTypeahead.d.ts +0 -20
- package/dist/client/types/app/bsky/actor/searchTypeahead.d.ts +0 -20
- package/dist/client/types/app/bsky/actor/updateProfile.d.ts +0 -47
- package/dist/client/types/app/bsky/feed/bookmarkFeed.d.ts +0 -17
- package/dist/client/types/app/bsky/feed/feedViewPost.d.ts +0 -28
- package/dist/client/types/app/bsky/feed/getBookmarkedFeeds.d.ts +0 -21
- package/dist/client/types/app/bsky/feed/getSavedFeeds.d.ts +0 -21
- package/dist/client/types/app/bsky/feed/getVotes.d.ts +0 -36
- package/dist/client/types/app/bsky/feed/saveFeed.d.ts +0 -17
- package/dist/client/types/app/bsky/feed/setVote.d.ts +0 -25
- package/dist/client/types/app/bsky/feed/trend.d.ts +0 -9
- package/dist/client/types/app/bsky/feed/unbookmarkFeed.d.ts +0 -17
- package/dist/client/types/app/bsky/feed/unsaveFeed.d.ts +0 -17
- package/dist/client/types/app/bsky/feed/vote.d.ts +0 -10
- package/dist/client/types/app/bsky/graph/assertCreator.d.ts +0 -1
- package/dist/client/types/app/bsky/graph/assertMember.d.ts +0 -1
- package/dist/client/types/app/bsky/graph/assertion.d.ts +0 -10
- package/dist/client/types/app/bsky/graph/confirmation.d.ts +0 -11
- package/dist/client/types/app/bsky/graph/getAssertions.d.ts +0 -48
- package/dist/client/types/app/bsky/graph/getMembers.d.ts +0 -36
- package/dist/client/types/app/bsky/graph/getMemberships.d.ts +0 -36
- package/dist/client/types/app/bsky/graph/mute.d.ts +0 -17
- package/dist/client/types/app/bsky/graph/unmute.d.ts +0 -17
- package/dist/client/types/app/bsky/moderation/defs.d.ts +0 -41
- package/dist/client/types/app/bsky/moderation/getService.d.ts +0 -16
- package/dist/client/types/app/bsky/moderation/getServices.d.ts +0 -23
- package/dist/client/types/app/bsky/moderation/service.d.ts +0 -14
- package/dist/client/types/app/bsky/notification/getCount.d.ts +0 -17
- package/dist/client/types/app/bsky/notification/list.d.ts +0 -35
- package/dist/client/types/app/bsky/system/actorScene.d.ts +0 -1
- package/dist/client/types/app/bsky/system/actorUser.d.ts +0 -1
- package/dist/client/types/app/bsky/system/declRef.d.ts +0 -8
- package/dist/client/types/app/bsky/system/declaration.d.ts +0 -7
- package/dist/client/types/app/bsky/unspecced/applyLabels.d.ts +0 -18
- package/dist/client/types/app/bsky/unspecced/getPopular.d.ts +0 -22
- package/dist/client/types/app/bsky/unspecced/getTimelineSkeleton.d.ts +0 -24
- package/dist/client/types/com/atproto/account/create.d.ts +0 -41
- package/dist/client/types/com/atproto/account/createInviteCode.d.ts +0 -22
- package/dist/client/types/com/atproto/account/delete.d.ts +0 -25
- package/dist/client/types/com/atproto/account/get.d.ts +0 -12
- package/dist/client/types/com/atproto/account/requestDelete.d.ts +0 -13
- package/dist/client/types/com/atproto/account/requestPasswordReset.d.ts +0 -17
- package/dist/client/types/com/atproto/account/resetPassword.d.ts +0 -24
- package/dist/client/types/com/atproto/admin/blob.d.ts +0 -37
- package/dist/client/types/com/atproto/admin/createCommunicationTemplate.d.ts +0 -23
- package/dist/client/types/com/atproto/admin/deleteCommunicationTemplate.d.ts +0 -17
- package/dist/client/types/com/atproto/admin/emitModerationEvent.d.ts +0 -33
- package/dist/client/types/com/atproto/admin/getInviteCodeUsage.d.ts +0 -29
- package/dist/client/types/com/atproto/admin/getModerationAction.d.ts +0 -16
- package/dist/client/types/com/atproto/admin/getModerationActions.d.ts +0 -22
- package/dist/client/types/com/atproto/admin/getModerationEvent.d.ts +0 -16
- package/dist/client/types/com/atproto/admin/getModerationReport.d.ts +0 -16
- package/dist/client/types/com/atproto/admin/getModerationReports.d.ts +0 -28
- package/dist/client/types/com/atproto/admin/getRecord.d.ts +0 -20
- package/dist/client/types/com/atproto/admin/getRepo.d.ts +0 -19
- package/dist/client/types/com/atproto/admin/getSubjectState.d.ts +0 -26
- package/dist/client/types/com/atproto/admin/getUserAccountInfo.d.ts +0 -16
- package/dist/client/types/com/atproto/admin/listCommunicationTemplates.d.ts +0 -18
- package/dist/client/types/com/atproto/admin/moderationAction.d.ts +0 -60
- package/dist/client/types/com/atproto/admin/moderationReport.d.ts +0 -37
- package/dist/client/types/com/atproto/admin/queryModerationEvents.d.ts +0 -35
- package/dist/client/types/com/atproto/admin/queryModerationStatuses.d.ts +0 -37
- package/dist/client/types/com/atproto/admin/rebaseRepo.d.ts +0 -24
- package/dist/client/types/com/atproto/admin/record.d.ts +0 -43
- package/dist/client/types/com/atproto/admin/repo.d.ts +0 -45
- package/dist/client/types/com/atproto/admin/resolveModerationReports.d.ts +0 -22
- package/dist/client/types/com/atproto/admin/reverseModerationAction.d.ts +0 -22
- package/dist/client/types/com/atproto/admin/searchRepos.d.ts +0 -23
- package/dist/client/types/com/atproto/admin/takeModerationAction.d.ts +0 -34
- package/dist/client/types/com/atproto/admin/updateCommunicationTemplate.d.ts +0 -25
- package/dist/client/types/com/atproto/admin/updateSubjectState.d.ts +0 -32
- package/dist/client/types/com/atproto/blob/upload.d.ts +0 -19
- package/dist/client/types/com/atproto/handle/resolve.d.ts +0 -18
- package/dist/client/types/com/atproto/handle/update.d.ts +0 -17
- package/dist/client/types/com/atproto/repo/batchWrite.d.ts +0 -46
- package/dist/client/types/com/atproto/repo/describe.d.ts +0 -22
- package/dist/client/types/com/atproto/repo/rebaseRepo.d.ts +0 -24
- package/dist/client/types/com/atproto/repo/recordRef.d.ts +0 -8
- package/dist/client/types/com/atproto/repo/repoRef.d.ts +0 -7
- package/dist/client/types/com/atproto/repo/uploadRepo.d.ts +0 -19
- package/dist/client/types/com/atproto/report/create.d.ts +0 -39
- package/dist/client/types/com/atproto/report/reasonType.d.ts +0 -3
- package/dist/client/types/com/atproto/report/subject.d.ts +0 -23
- package/dist/client/types/com/atproto/server/getAccountsConfig.d.ts +0 -27
- package/dist/client/types/com/atproto/server/getUserInviteCodes.d.ts +0 -31
- package/dist/client/types/com/atproto/session/create.d.ts +0 -29
- package/dist/client/types/com/atproto/session/delete.d.ts +0 -13
- package/dist/client/types/com/atproto/session/get.d.ts +0 -18
- package/dist/client/types/com/atproto/session/refresh.d.ts +0 -24
- package/dist/client/types/com/atproto/sync/getCommitPath.d.ts +0 -20
- package/dist/client/types/com/atproto/sync/getCurrent.d.ts +0 -22
- package/dist/client/types/com/atproto/sync/getRoot.d.ts +0 -21
- package/dist/client/types/com/atproto/sync/importRepo.d.ts +0 -16
- package/dist/client/types/com/atproto/sync/subscribeAllRepos.d.ts +0 -9
- package/dist/client/types/com/atproto/sync/updateRepo.d.ts +0 -15
- package/dist/client/types/com/atproto/temp/importRepo.d.ts +0 -16
- package/dist/client/types/com/atproto/temp/pushBlob.d.ts +0 -15
- package/dist/client/types/com/atproto/temp/transferAccount.d.ts +0 -48
- package/dist/client/types/com/atproto/temp/upgradeRepoVersion.d.ts +0 -18
- package/dist/moderation/accumulator.d.ts +0 -16
- package/dist/moderation/const/label-groups.d.ts +0 -2
- package/dist/moderation/subjects/quoted-post.d.ts +0 -6
- package/dist/session.d.ts +0 -42
- package/dist/src/client/index.d.ts +0 -462
- package/dist/src/client/lexicons.d.ts +0 -2910
- package/dist/src/client/schemas.d.ts +0 -17
- package/dist/src/client/types/app/bsky/actor/createScene.d.ts +0 -32
- package/dist/src/client/types/app/bsky/actor/getProfile.d.ts +0 -36
- package/dist/src/client/types/app/bsky/actor/getSuggestions.d.ts +0 -36
- package/dist/src/client/types/app/bsky/actor/profile.d.ts +0 -15
- package/dist/src/client/types/app/bsky/actor/ref.d.ts +0 -14
- package/dist/src/client/types/app/bsky/actor/search.d.ts +0 -32
- package/dist/src/client/types/app/bsky/actor/searchTypeahead.d.ts +0 -28
- package/dist/src/client/types/app/bsky/actor/updateProfile.d.ts +0 -48
- package/dist/src/client/types/app/bsky/badge.d.ts +0 -22
- package/dist/src/client/types/app/bsky/badgeAccept.d.ts +0 -11
- package/dist/src/client/types/app/bsky/badgeOffer.d.ts +0 -11
- package/dist/src/client/types/app/bsky/declaration.d.ts +0 -6
- package/dist/src/client/types/app/bsky/embed/external.d.ts +0 -26
- package/dist/src/client/types/app/bsky/embed/images.d.ts +0 -23
- package/dist/src/client/types/app/bsky/feed/embed.d.ts +0 -36
- package/dist/src/client/types/app/bsky/feed/feedViewPost.d.ts +0 -26
- package/dist/src/client/types/app/bsky/feed/getAuthorFeed.d.ts +0 -22
- package/dist/src/client/types/app/bsky/feed/getPostThread.d.ts +0 -43
- package/dist/src/client/types/app/bsky/feed/getRepostedBy.d.ts +0 -35
- package/dist/src/client/types/app/bsky/feed/getTimeline.d.ts +0 -22
- package/dist/src/client/types/app/bsky/feed/getVotes.d.ts +0 -33
- package/dist/src/client/types/app/bsky/feed/mediaEmbed.d.ts +0 -18
- package/dist/src/client/types/app/bsky/feed/post.d.ts +0 -54
- package/dist/src/client/types/app/bsky/feed/repost.d.ts +0 -6
- package/dist/src/client/types/app/bsky/feed/setVote.d.ts +0 -25
- package/dist/src/client/types/app/bsky/feed/trend.d.ts +0 -6
- package/dist/src/client/types/app/bsky/feed/vote.d.ts +0 -7
- package/dist/src/client/types/app/bsky/follow.d.ts +0 -9
- package/dist/src/client/types/app/bsky/getAuthorFeed.d.ts +0 -56
- package/dist/src/client/types/app/bsky/getBadgeMembers.d.ts +0 -29
- package/dist/src/client/types/app/bsky/getHomeFeed.d.ts +0 -56
- package/dist/src/client/types/app/bsky/getLikedBy.d.ts +0 -29
- package/dist/src/client/types/app/bsky/getNotificationCount.d.ts +0 -16
- package/dist/src/client/types/app/bsky/getNotifications.d.ts +0 -33
- package/dist/src/client/types/app/bsky/getPostThread.d.ts +0 -55
- package/dist/src/client/types/app/bsky/getProfile.d.ts +0 -26
- package/dist/src/client/types/app/bsky/getRepostedBy.d.ts +0 -29
- package/dist/src/client/types/app/bsky/getTimeline.d.ts +0 -56
- package/dist/src/client/types/app/bsky/getUserFollowers.d.ts +0 -31
- package/dist/src/client/types/app/bsky/getUserFollows.d.ts +0 -31
- package/dist/src/client/types/app/bsky/getUsersSearch.d.ts +0 -26
- package/dist/src/client/types/app/bsky/getUsersTypeahead.d.ts +0 -22
- package/dist/src/client/types/app/bsky/graph/assertCreator.d.ts +0 -1
- package/dist/src/client/types/app/bsky/graph/assertMember.d.ts +0 -1
- package/dist/src/client/types/app/bsky/graph/assertion.d.ts +0 -7
- package/dist/src/client/types/app/bsky/graph/confirmation.d.ts +0 -8
- package/dist/src/client/types/app/bsky/graph/follow.d.ts +0 -6
- package/dist/src/client/types/app/bsky/graph/getAssertions.d.ts +0 -43
- package/dist/src/client/types/app/bsky/graph/getFollowers.d.ts +0 -34
- package/dist/src/client/types/app/bsky/graph/getFollows.d.ts +0 -33
- package/dist/src/client/types/app/bsky/graph/getMembers.d.ts +0 -33
- package/dist/src/client/types/app/bsky/graph/getMemberships.d.ts +0 -33
- package/dist/src/client/types/app/bsky/invite.d.ts +0 -10
- package/dist/src/client/types/app/bsky/inviteAccept.d.ts +0 -14
- package/dist/src/client/types/app/bsky/like.d.ts +0 -10
- package/dist/src/client/types/app/bsky/mediaEmbed.d.ts +0 -15
- package/dist/src/client/types/app/bsky/notification/getCount.d.ts +0 -17
- package/dist/src/client/types/app/bsky/notification/list.d.ts +0 -32
- package/dist/src/client/types/app/bsky/notification/updateSeen.d.ts +0 -17
- package/dist/src/client/types/app/bsky/post.d.ts +0 -23
- package/dist/src/client/types/app/bsky/postNotificationsSeen.d.ts +0 -20
- package/dist/src/client/types/app/bsky/profile.d.ts +0 -5
- package/dist/src/client/types/app/bsky/repost.d.ts +0 -10
- package/dist/src/client/types/app/bsky/system/actorScene.d.ts +0 -1
- package/dist/src/client/types/app/bsky/system/actorUser.d.ts +0 -1
- package/dist/src/client/types/app/bsky/system/declRef.d.ts +0 -5
- package/dist/src/client/types/app/bsky/system/declaration.d.ts +0 -4
- package/dist/src/client/types/app/bsky/updateProfile.d.ts +0 -23
- package/dist/src/client/types/com/atproto/account/create.d.ts +0 -41
- package/dist/src/client/types/com/atproto/account/createInviteCode.d.ts +0 -22
- package/dist/src/client/types/com/atproto/account/delete.d.ts +0 -13
- package/dist/src/client/types/com/atproto/account/get.d.ts +0 -12
- package/dist/src/client/types/com/atproto/account/requestPasswordReset.d.ts +0 -17
- package/dist/src/client/types/com/atproto/account/resetPassword.d.ts +0 -24
- package/dist/src/client/types/com/atproto/blob/upload.d.ts +0 -19
- package/dist/src/client/types/com/atproto/createAccount.d.ts +0 -40
- package/dist/src/client/types/com/atproto/createInviteCode.d.ts +0 -20
- package/dist/src/client/types/com/atproto/createSession.d.ts +0 -24
- package/dist/src/client/types/com/atproto/data/uploadFile.d.ts +0 -19
- package/dist/src/client/types/com/atproto/deleteAccount.d.ts +0 -20
- package/dist/src/client/types/com/atproto/deleteSession.d.ts +0 -17
- package/dist/src/client/types/com/atproto/getAccount.d.ts +0 -16
- package/dist/src/client/types/com/atproto/getAccountsConfig.d.ts +0 -17
- package/dist/src/client/types/com/atproto/getSession.d.ts +0 -17
- package/dist/src/client/types/com/atproto/handle/resolve.d.ts +0 -18
- package/dist/src/client/types/com/atproto/refreshSession.d.ts +0 -20
- package/dist/src/client/types/com/atproto/repo/batchWrite.d.ts +0 -39
- package/dist/src/client/types/com/atproto/repo/createRecord.d.ts +0 -26
- package/dist/src/client/types/com/atproto/repo/deleteRecord.d.ts +0 -19
- package/dist/src/client/types/com/atproto/repo/describe.d.ts +0 -22
- package/dist/src/client/types/com/atproto/repo/getRecord.d.ts +0 -23
- package/dist/src/client/types/com/atproto/repo/listRecords.d.ts +0 -30
- package/dist/src/client/types/com/atproto/repo/putRecord.d.ts +0 -27
- package/dist/src/client/types/com/atproto/repo/strongRef.d.ts +0 -5
- package/dist/src/client/types/com/atproto/repoBatchWrite.d.ts +0 -36
- package/dist/src/client/types/com/atproto/repoCreateRecord.d.ts +0 -24
- package/dist/src/client/types/com/atproto/repoDeleteRecord.d.ts +0 -18
- package/dist/src/client/types/com/atproto/repoDescribe.d.ts +0 -21
- package/dist/src/client/types/com/atproto/repoGetRecord.d.ts +0 -22
- package/dist/src/client/types/com/atproto/repoListRecords.d.ts +0 -27
- package/dist/src/client/types/com/atproto/repoPutRecord.d.ts +0 -25
- package/dist/src/client/types/com/atproto/requestAccountPasswordReset.d.ts +0 -19
- package/dist/src/client/types/com/atproto/resetAccountPassword.d.ts +0 -26
- package/dist/src/client/types/com/atproto/resolveHandle.d.ts +0 -17
- package/dist/src/client/types/com/atproto/resolveName.d.ts +0 -17
- package/dist/src/client/types/com/atproto/server/getAccountsConfig.d.ts +0 -24
- package/dist/src/client/types/com/atproto/session/create.d.ts +0 -26
- package/dist/src/client/types/com/atproto/session/delete.d.ts +0 -13
- package/dist/src/client/types/com/atproto/session/get.d.ts +0 -18
- package/dist/src/client/types/com/atproto/session/refresh.d.ts +0 -21
- package/dist/src/client/types/com/atproto/sync/getRepo.d.ts +0 -15
- package/dist/src/client/types/com/atproto/sync/getRoot.d.ts +0 -18
- package/dist/src/client/types/com/atproto/sync/updateRepo.d.ts +0 -15
- package/dist/src/client/types/com/atproto/syncGetRepo.d.ts +0 -15
- package/dist/src/client/types/com/atproto/syncGetRoot.d.ts +0 -17
- package/dist/src/client/types/com/atproto/syncUpdateRepo.d.ts +0 -15
- package/dist/src/index.d.ts +0 -4
- package/dist/src/schemas.d.ts +0 -19
- package/dist/src/session.d.ts +0 -42
- package/dist/src/types/app/bsky/acceptedBadge.d.ts +0 -10
- package/dist/src/types/app/bsky/badge.d.ts +0 -22
- package/dist/src/types/app/bsky/badgeAccept.d.ts +0 -11
- package/dist/src/types/app/bsky/badgeOffer.d.ts +0 -11
- package/dist/src/types/app/bsky/declaration.d.ts +0 -6
- package/dist/src/types/app/bsky/follow.d.ts +0 -9
- package/dist/src/types/app/bsky/getAuthorFeed.d.ts +0 -56
- package/dist/src/types/app/bsky/getBadgeMembers.d.ts +0 -29
- package/dist/src/types/app/bsky/getHomeFeed.d.ts +0 -56
- package/dist/src/types/app/bsky/getLikedBy.d.ts +0 -29
- package/dist/src/types/app/bsky/getNotificationCount.d.ts +0 -16
- package/dist/src/types/app/bsky/getNotifications.d.ts +0 -33
- package/dist/src/types/app/bsky/getPostThread.d.ts +0 -55
- package/dist/src/types/app/bsky/getProfile.d.ts +0 -42
- package/dist/src/types/app/bsky/getRepostedBy.d.ts +0 -29
- package/dist/src/types/app/bsky/getUserFollowers.d.ts +0 -31
- package/dist/src/types/app/bsky/getUserFollows.d.ts +0 -31
- package/dist/src/types/app/bsky/getUsersSearch.d.ts +0 -26
- package/dist/src/types/app/bsky/getUsersTypeahead.d.ts +0 -22
- package/dist/src/types/app/bsky/invite.d.ts +0 -10
- package/dist/src/types/app/bsky/inviteAccept.d.ts +0 -14
- package/dist/src/types/app/bsky/like.d.ts +0 -10
- package/dist/src/types/app/bsky/mediaEmbed.d.ts +0 -15
- package/dist/src/types/app/bsky/post.d.ts +0 -23
- package/dist/src/types/app/bsky/postNotificationsSeen.d.ts +0 -19
- package/dist/src/types/app/bsky/profile.d.ts +0 -11
- package/dist/src/types/app/bsky/repost.d.ts +0 -10
- package/dist/src/types/app/bsky/updateProfile.d.ts +0 -27
- package/dist/src/types/com/atproto/createAccount.d.ts +0 -39
- package/dist/src/types/com/atproto/createInviteCode.d.ts +0 -19
- package/dist/src/types/com/atproto/createSession.d.ts +0 -23
- package/dist/src/types/com/atproto/deleteAccount.d.ts +0 -19
- package/dist/src/types/com/atproto/deleteSession.d.ts +0 -16
- package/dist/src/types/com/atproto/getAccount.d.ts +0 -19
- package/dist/src/types/com/atproto/getAccountsConfig.d.ts +0 -17
- package/dist/src/types/com/atproto/getSession.d.ts +0 -17
- package/dist/src/types/com/atproto/refreshSession.d.ts +0 -19
- package/dist/src/types/com/atproto/repoBatchWrite.d.ts +0 -35
- package/dist/src/types/com/atproto/repoCreateRecord.d.ts +0 -23
- package/dist/src/types/com/atproto/repoDeleteRecord.d.ts +0 -15
- package/dist/src/types/com/atproto/repoDescribe.d.ts +0 -21
- package/dist/src/types/com/atproto/repoGetRecord.d.ts +0 -22
- package/dist/src/types/com/atproto/repoListRecords.d.ts +0 -27
- package/dist/src/types/com/atproto/repoPutRecord.d.ts +0 -24
- package/dist/src/types/com/atproto/requestAccountPasswordReset.d.ts +0 -18
- package/dist/src/types/com/atproto/resetAccountPassword.d.ts +0 -25
- package/dist/src/types/com/atproto/resolveName.d.ts +0 -17
- package/dist/src/types/com/atproto/syncGetRepo.d.ts +0 -15
- package/dist/src/types/com/atproto/syncGetRoot.d.ts +0 -17
- package/dist/src/types/com/atproto/syncUpdateRepo.d.ts +0 -14
- package/dist/src/types/todo/adx/createAccount.d.ts +0 -36
- package/dist/src/types/todo/adx/createInviteCode.d.ts +0 -19
- package/dist/src/types/todo/adx/createSession.d.ts +0 -22
- package/dist/src/types/todo/adx/deleteAccount.d.ts +0 -19
- package/dist/src/types/todo/adx/deleteSession.d.ts +0 -19
- package/dist/src/types/todo/adx/getAccount.d.ts +0 -19
- package/dist/src/types/todo/adx/getAccountsConfig.d.ts +0 -17
- package/dist/src/types/todo/adx/getSession.d.ts +0 -17
- package/dist/src/types/todo/adx/repoBatchWrite.d.ts +0 -34
- package/dist/src/types/todo/adx/repoCreateRecord.d.ts +0 -22
- package/dist/src/types/todo/adx/repoDeleteRecord.d.ts +0 -15
- package/dist/src/types/todo/adx/repoDescribe.d.ts +0 -21
- package/dist/src/types/todo/adx/repoGetRecord.d.ts +0 -20
- package/dist/src/types/todo/adx/repoListRecords.d.ts +0 -25
- package/dist/src/types/todo/adx/repoPutRecord.d.ts +0 -23
- package/dist/src/types/todo/adx/requestAccountPasswordReset.d.ts +0 -18
- package/dist/src/types/todo/adx/resetAccountPassword.d.ts +0 -25
- package/dist/src/types/todo/adx/resolveName.d.ts +0 -17
- package/dist/src/types/todo/adx/syncGetRepo.d.ts +0 -15
- package/dist/src/types/todo/adx/syncGetRoot.d.ts +0 -17
- package/dist/src/types/todo/adx/syncUpdateRepo.d.ts +0 -14
- package/dist/src/types/todo/social/badge.d.ts +0 -23
- package/dist/src/types/todo/social/follow.d.ts +0 -5
- package/dist/src/types/todo/social/getAuthorFeed.d.ts +0 -55
- package/dist/src/types/todo/social/getFeed.d.ts +0 -55
- package/dist/src/types/todo/social/getHomeFeed.d.ts +0 -55
- package/dist/src/types/todo/social/getLikedBy.d.ts +0 -26
- package/dist/src/types/todo/social/getNotificationCount.d.ts +0 -16
- package/dist/src/types/todo/social/getNotifications.d.ts +0 -31
- package/dist/src/types/todo/social/getPostThread.d.ts +0 -54
- package/dist/src/types/todo/social/getProfile.d.ts +0 -40
- package/dist/src/types/todo/social/getRepostedBy.d.ts +0 -26
- package/dist/src/types/todo/social/getUserFollowers.d.ts +0 -30
- package/dist/src/types/todo/social/getUserFollows.d.ts +0 -30
- package/dist/src/types/todo/social/like.d.ts +0 -5
- package/dist/src/types/todo/social/mediaEmbed.d.ts +0 -15
- package/dist/src/types/todo/social/post.d.ts +0 -18
- package/dist/src/types/todo/social/postNotificationsSeen.d.ts +0 -19
- package/dist/src/types/todo/social/profile.d.ts +0 -10
- package/dist/src/types/todo/social/repost.d.ts +0 -5
- package/docs/labels.md +0 -108
- package/scripts/docs/labels.mjs +0 -87
- package/scripts/generate-docs.mjs +0 -3
package/tests/moderation.test.ts
CHANGED
|
@@ -29,7 +29,7 @@ describe('Moderation', () => {
|
|
|
29
29
|
labels: {
|
|
30
30
|
porn: 'hide',
|
|
31
31
|
},
|
|
32
|
-
|
|
32
|
+
labelers: [],
|
|
33
33
|
},
|
|
34
34
|
},
|
|
35
35
|
)
|
|
@@ -61,7 +61,7 @@ describe('Moderation', () => {
|
|
|
61
61
|
labels: {
|
|
62
62
|
porn: 'ignore',
|
|
63
63
|
},
|
|
64
|
-
|
|
64
|
+
labelers: [],
|
|
65
65
|
},
|
|
66
66
|
},
|
|
67
67
|
)
|
|
@@ -95,7 +95,7 @@ describe('Moderation', () => {
|
|
|
95
95
|
labels: {
|
|
96
96
|
porn: 'hide',
|
|
97
97
|
},
|
|
98
|
-
|
|
98
|
+
labelers: [],
|
|
99
99
|
},
|
|
100
100
|
},
|
|
101
101
|
)
|
|
@@ -137,7 +137,7 @@ describe('Moderation', () => {
|
|
|
137
137
|
labels: {
|
|
138
138
|
porn: 'ignore',
|
|
139
139
|
},
|
|
140
|
-
|
|
140
|
+
labelers: [
|
|
141
141
|
{
|
|
142
142
|
did: 'did:web:labeler.test',
|
|
143
143
|
labels: { porn: 'ignore' },
|
|
@@ -182,7 +182,7 @@ describe('Moderation', () => {
|
|
|
182
182
|
prefs: {
|
|
183
183
|
adultContentEnabled: true,
|
|
184
184
|
labels: {},
|
|
185
|
-
|
|
185
|
+
labelers: [
|
|
186
186
|
{
|
|
187
187
|
did: 'did:web:labeler.test',
|
|
188
188
|
labels: {},
|
|
@@ -232,7 +232,7 @@ describe('Moderation', () => {
|
|
|
232
232
|
labels: {
|
|
233
233
|
porn: 'hide',
|
|
234
234
|
},
|
|
235
|
-
|
|
235
|
+
labelers: [
|
|
236
236
|
{
|
|
237
237
|
did: 'did:web:labeler.test',
|
|
238
238
|
labels: {},
|
|
@@ -253,7 +253,7 @@ describe('Moderation', () => {
|
|
|
253
253
|
prefs: {
|
|
254
254
|
adultContentEnabled: true,
|
|
255
255
|
labels: { porn: 'warn' },
|
|
256
|
-
|
|
256
|
+
labelers: [
|
|
257
257
|
{
|
|
258
258
|
did: 'did:web:labeler.test',
|
|
259
259
|
labels: { porn: 'warn' },
|
|
@@ -262,13 +262,15 @@ describe('Moderation', () => {
|
|
|
262
262
|
},
|
|
263
263
|
labelDefs: {
|
|
264
264
|
'did:web:labeler.test': [
|
|
265
|
-
interpretLabelValueDefinition(
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
265
|
+
interpretLabelValueDefinition(
|
|
266
|
+
{
|
|
267
|
+
identifier: 'porn',
|
|
268
|
+
blurs: 'none',
|
|
269
|
+
severity: 'inform',
|
|
270
|
+
locales: [],
|
|
271
|
+
},
|
|
272
|
+
'did:web:labeler.test',
|
|
273
|
+
),
|
|
272
274
|
],
|
|
273
275
|
},
|
|
274
276
|
}
|
|
@@ -309,7 +311,7 @@ describe('Moderation', () => {
|
|
|
309
311
|
prefs: {
|
|
310
312
|
adultContentEnabled: true,
|
|
311
313
|
labels: {},
|
|
312
|
-
|
|
314
|
+
labelers: [
|
|
313
315
|
{
|
|
314
316
|
did: 'did:web:labeler.test',
|
|
315
317
|
labels: {},
|
|
@@ -318,13 +320,15 @@ describe('Moderation', () => {
|
|
|
318
320
|
},
|
|
319
321
|
labelDefs: {
|
|
320
322
|
'did:web:labeler.test': [
|
|
321
|
-
interpretLabelValueDefinition(
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
323
|
+
interpretLabelValueDefinition(
|
|
324
|
+
{
|
|
325
|
+
identifier: '!hide',
|
|
326
|
+
blurs: 'none',
|
|
327
|
+
severity: 'inform',
|
|
328
|
+
locales: [],
|
|
329
|
+
},
|
|
330
|
+
'did:web:labeler.test',
|
|
331
|
+
),
|
|
328
332
|
],
|
|
329
333
|
},
|
|
330
334
|
}
|
|
@@ -350,7 +354,7 @@ describe('Moderation', () => {
|
|
|
350
354
|
modOpts,
|
|
351
355
|
)
|
|
352
356
|
|
|
353
|
-
expect(res.ui('profileList')).toBeModerationResult([
|
|
357
|
+
expect(res.ui('profileList')).toBeModerationResult([])
|
|
354
358
|
expect(res.ui('profileView')).toBeModerationResult([])
|
|
355
359
|
expect(res.ui('avatar')).toBeModerationResult([])
|
|
356
360
|
expect(res.ui('banner')).toBeModerationResult([])
|
|
@@ -370,7 +374,7 @@ describe('Moderation', () => {
|
|
|
370
374
|
prefs: {
|
|
371
375
|
adultContentEnabled: true,
|
|
372
376
|
labels: {},
|
|
373
|
-
|
|
377
|
+
labelers: [
|
|
374
378
|
{
|
|
375
379
|
did: 'did:web:labeler.test',
|
|
376
380
|
labels: { BadLabel: 'hide', 'bad/label': 'hide' },
|
|
@@ -379,20 +383,24 @@ describe('Moderation', () => {
|
|
|
379
383
|
},
|
|
380
384
|
labelDefs: {
|
|
381
385
|
'did:web:labeler.test': [
|
|
382
|
-
interpretLabelValueDefinition(
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
386
|
+
interpretLabelValueDefinition(
|
|
387
|
+
{
|
|
388
|
+
identifier: 'BadLabel',
|
|
389
|
+
blurs: 'content',
|
|
390
|
+
severity: 'inform',
|
|
391
|
+
locales: [],
|
|
392
|
+
},
|
|
393
|
+
'did:web:labeler.test',
|
|
394
|
+
),
|
|
395
|
+
interpretLabelValueDefinition(
|
|
396
|
+
{
|
|
397
|
+
identifier: 'bad/label',
|
|
398
|
+
blurs: 'content',
|
|
399
|
+
severity: 'inform',
|
|
400
|
+
locales: [],
|
|
401
|
+
},
|
|
402
|
+
'did:web:labeler.test',
|
|
403
|
+
),
|
|
396
404
|
],
|
|
397
405
|
},
|
|
398
406
|
}
|
|
@@ -433,4 +441,260 @@ describe('Moderation', () => {
|
|
|
433
441
|
expect(res.ui('contentView')).toBeModerationResult([])
|
|
434
442
|
expect(res.ui('contentMedia')).toBeModerationResult([])
|
|
435
443
|
})
|
|
444
|
+
|
|
445
|
+
it('Custom labels can set the default setting', () => {
|
|
446
|
+
const modOpts = {
|
|
447
|
+
userDid: 'did:web:alice.test',
|
|
448
|
+
prefs: {
|
|
449
|
+
adultContentEnabled: true,
|
|
450
|
+
labels: {},
|
|
451
|
+
labelers: [
|
|
452
|
+
{
|
|
453
|
+
did: 'did:web:labeler.test',
|
|
454
|
+
labels: {},
|
|
455
|
+
},
|
|
456
|
+
],
|
|
457
|
+
},
|
|
458
|
+
labelDefs: {
|
|
459
|
+
'did:web:labeler.test': [
|
|
460
|
+
interpretLabelValueDefinition(
|
|
461
|
+
{
|
|
462
|
+
identifier: 'default-hide',
|
|
463
|
+
blurs: 'content',
|
|
464
|
+
severity: 'inform',
|
|
465
|
+
defaultSetting: 'hide',
|
|
466
|
+
locales: [],
|
|
467
|
+
},
|
|
468
|
+
'did:web:labeler.test',
|
|
469
|
+
),
|
|
470
|
+
interpretLabelValueDefinition(
|
|
471
|
+
{
|
|
472
|
+
identifier: 'default-warn',
|
|
473
|
+
blurs: 'content',
|
|
474
|
+
severity: 'inform',
|
|
475
|
+
defaultSetting: 'warn',
|
|
476
|
+
locales: [],
|
|
477
|
+
},
|
|
478
|
+
'did:web:labeler.test',
|
|
479
|
+
),
|
|
480
|
+
interpretLabelValueDefinition(
|
|
481
|
+
{
|
|
482
|
+
identifier: 'default-ignore',
|
|
483
|
+
blurs: 'content',
|
|
484
|
+
severity: 'inform',
|
|
485
|
+
defaultSetting: 'ignore',
|
|
486
|
+
locales: [],
|
|
487
|
+
},
|
|
488
|
+
'did:web:labeler.test',
|
|
489
|
+
),
|
|
490
|
+
],
|
|
491
|
+
},
|
|
492
|
+
}
|
|
493
|
+
const res1 = moderatePost(
|
|
494
|
+
mock.postView({
|
|
495
|
+
record: {
|
|
496
|
+
text: 'Hello',
|
|
497
|
+
createdAt: new Date().toISOString(),
|
|
498
|
+
},
|
|
499
|
+
author: mock.profileViewBasic({
|
|
500
|
+
handle: 'bob.test',
|
|
501
|
+
displayName: 'Bob',
|
|
502
|
+
}),
|
|
503
|
+
labels: [
|
|
504
|
+
{
|
|
505
|
+
src: 'did:web:labeler.test',
|
|
506
|
+
uri: 'at://did:web:bob.test/app.bsky.post/fake',
|
|
507
|
+
val: 'default-hide',
|
|
508
|
+
cts: new Date().toISOString(),
|
|
509
|
+
},
|
|
510
|
+
],
|
|
511
|
+
}),
|
|
512
|
+
modOpts,
|
|
513
|
+
)
|
|
514
|
+
|
|
515
|
+
expect(res1.ui('profileList')).toBeModerationResult([])
|
|
516
|
+
expect(res1.ui('profileView')).toBeModerationResult([])
|
|
517
|
+
expect(res1.ui('avatar')).toBeModerationResult([])
|
|
518
|
+
expect(res1.ui('banner')).toBeModerationResult([])
|
|
519
|
+
expect(res1.ui('displayName')).toBeModerationResult([])
|
|
520
|
+
expect(res1.ui('contentList')).toBeModerationResult(['filter', 'blur'])
|
|
521
|
+
expect(res1.ui('contentView')).toBeModerationResult(['inform'])
|
|
522
|
+
expect(res1.ui('contentMedia')).toBeModerationResult([])
|
|
523
|
+
|
|
524
|
+
const res2 = moderatePost(
|
|
525
|
+
mock.postView({
|
|
526
|
+
record: {
|
|
527
|
+
text: 'Hello',
|
|
528
|
+
createdAt: new Date().toISOString(),
|
|
529
|
+
},
|
|
530
|
+
author: mock.profileViewBasic({
|
|
531
|
+
handle: 'bob.test',
|
|
532
|
+
displayName: 'Bob',
|
|
533
|
+
}),
|
|
534
|
+
labels: [
|
|
535
|
+
{
|
|
536
|
+
src: 'did:web:labeler.test',
|
|
537
|
+
uri: 'at://did:web:bob.test/app.bsky.post/fake',
|
|
538
|
+
val: 'default-warn',
|
|
539
|
+
cts: new Date().toISOString(),
|
|
540
|
+
},
|
|
541
|
+
],
|
|
542
|
+
}),
|
|
543
|
+
modOpts,
|
|
544
|
+
)
|
|
545
|
+
|
|
546
|
+
expect(res2.ui('profileList')).toBeModerationResult([])
|
|
547
|
+
expect(res2.ui('profileView')).toBeModerationResult([])
|
|
548
|
+
expect(res2.ui('avatar')).toBeModerationResult([])
|
|
549
|
+
expect(res2.ui('banner')).toBeModerationResult([])
|
|
550
|
+
expect(res2.ui('displayName')).toBeModerationResult([])
|
|
551
|
+
expect(res2.ui('contentList')).toBeModerationResult(['blur'])
|
|
552
|
+
expect(res2.ui('contentView')).toBeModerationResult(['inform'])
|
|
553
|
+
expect(res2.ui('contentMedia')).toBeModerationResult([])
|
|
554
|
+
|
|
555
|
+
const res3 = moderatePost(
|
|
556
|
+
mock.postView({
|
|
557
|
+
record: {
|
|
558
|
+
text: 'Hello',
|
|
559
|
+
createdAt: new Date().toISOString(),
|
|
560
|
+
},
|
|
561
|
+
author: mock.profileViewBasic({
|
|
562
|
+
handle: 'bob.test',
|
|
563
|
+
displayName: 'Bob',
|
|
564
|
+
}),
|
|
565
|
+
labels: [
|
|
566
|
+
{
|
|
567
|
+
src: 'did:web:labeler.test',
|
|
568
|
+
uri: 'at://did:web:bob.test/app.bsky.post/fake',
|
|
569
|
+
val: 'default-ignore',
|
|
570
|
+
cts: new Date().toISOString(),
|
|
571
|
+
},
|
|
572
|
+
],
|
|
573
|
+
}),
|
|
574
|
+
modOpts,
|
|
575
|
+
)
|
|
576
|
+
|
|
577
|
+
expect(res3.ui('profileList')).toBeModerationResult([])
|
|
578
|
+
expect(res3.ui('profileView')).toBeModerationResult([])
|
|
579
|
+
expect(res3.ui('avatar')).toBeModerationResult([])
|
|
580
|
+
expect(res3.ui('banner')).toBeModerationResult([])
|
|
581
|
+
expect(res3.ui('displayName')).toBeModerationResult([])
|
|
582
|
+
expect(res3.ui('contentList')).toBeModerationResult([])
|
|
583
|
+
expect(res3.ui('contentView')).toBeModerationResult([])
|
|
584
|
+
expect(res3.ui('contentMedia')).toBeModerationResult([])
|
|
585
|
+
})
|
|
586
|
+
|
|
587
|
+
it('Custom labels can require adult content to be enabled', () => {
|
|
588
|
+
const modOpts = {
|
|
589
|
+
userDid: 'did:web:alice.test',
|
|
590
|
+
prefs: {
|
|
591
|
+
adultContentEnabled: false,
|
|
592
|
+
labels: { adult: 'ignore' },
|
|
593
|
+
labelers: [
|
|
594
|
+
{
|
|
595
|
+
did: 'did:web:labeler.test',
|
|
596
|
+
labels: {
|
|
597
|
+
adult: 'ignore',
|
|
598
|
+
},
|
|
599
|
+
},
|
|
600
|
+
],
|
|
601
|
+
},
|
|
602
|
+
labelDefs: {
|
|
603
|
+
'did:web:labeler.test': [
|
|
604
|
+
interpretLabelValueDefinition(
|
|
605
|
+
{
|
|
606
|
+
identifier: 'adult',
|
|
607
|
+
blurs: 'content',
|
|
608
|
+
severity: 'inform',
|
|
609
|
+
defaultSetting: 'hide',
|
|
610
|
+
adultOnly: true,
|
|
611
|
+
locales: [],
|
|
612
|
+
},
|
|
613
|
+
'did:web:labeler.test',
|
|
614
|
+
),
|
|
615
|
+
],
|
|
616
|
+
},
|
|
617
|
+
}
|
|
618
|
+
const res = moderatePost(
|
|
619
|
+
mock.postView({
|
|
620
|
+
record: {
|
|
621
|
+
text: 'Hello',
|
|
622
|
+
createdAt: new Date().toISOString(),
|
|
623
|
+
},
|
|
624
|
+
author: mock.profileViewBasic({
|
|
625
|
+
handle: 'bob.test',
|
|
626
|
+
displayName: 'Bob',
|
|
627
|
+
}),
|
|
628
|
+
labels: [
|
|
629
|
+
{
|
|
630
|
+
src: 'did:web:labeler.test',
|
|
631
|
+
uri: 'at://did:web:bob.test/app.bsky.post/fake',
|
|
632
|
+
val: 'adult',
|
|
633
|
+
cts: new Date().toISOString(),
|
|
634
|
+
},
|
|
635
|
+
],
|
|
636
|
+
}),
|
|
637
|
+
modOpts,
|
|
638
|
+
)
|
|
639
|
+
|
|
640
|
+
expect(res.ui('profileList')).toBeModerationResult([])
|
|
641
|
+
expect(res.ui('profileView')).toBeModerationResult([])
|
|
642
|
+
expect(res.ui('avatar')).toBeModerationResult([])
|
|
643
|
+
expect(res.ui('banner')).toBeModerationResult([])
|
|
644
|
+
expect(res.ui('displayName')).toBeModerationResult([])
|
|
645
|
+
expect(res.ui('contentList')).toBeModerationResult([
|
|
646
|
+
'filter',
|
|
647
|
+
'blur',
|
|
648
|
+
'noOverride',
|
|
649
|
+
])
|
|
650
|
+
expect(res.ui('contentView')).toBeModerationResult(['blur', 'noOverride'])
|
|
651
|
+
expect(res.ui('contentMedia')).toBeModerationResult([])
|
|
652
|
+
})
|
|
653
|
+
|
|
654
|
+
it('Adult content disabled forces the preference to hide', () => {
|
|
655
|
+
const modOpts = {
|
|
656
|
+
userDid: 'did:web:alice.test',
|
|
657
|
+
prefs: {
|
|
658
|
+
adultContentEnabled: false,
|
|
659
|
+
labels: { porn: 'ignore' },
|
|
660
|
+
labelers: [
|
|
661
|
+
{
|
|
662
|
+
did: 'did:web:labeler.test',
|
|
663
|
+
labels: {},
|
|
664
|
+
},
|
|
665
|
+
],
|
|
666
|
+
},
|
|
667
|
+
labelDefs: {},
|
|
668
|
+
}
|
|
669
|
+
const res = moderatePost(
|
|
670
|
+
mock.postView({
|
|
671
|
+
record: {
|
|
672
|
+
text: 'Hello',
|
|
673
|
+
createdAt: new Date().toISOString(),
|
|
674
|
+
},
|
|
675
|
+
author: mock.profileViewBasic({
|
|
676
|
+
handle: 'bob.test',
|
|
677
|
+
displayName: 'Bob',
|
|
678
|
+
}),
|
|
679
|
+
labels: [
|
|
680
|
+
{
|
|
681
|
+
src: 'did:web:labeler.test',
|
|
682
|
+
uri: 'at://did:web:bob.test/app.bsky.post/fake',
|
|
683
|
+
val: 'porn',
|
|
684
|
+
cts: new Date().toISOString(),
|
|
685
|
+
},
|
|
686
|
+
],
|
|
687
|
+
}),
|
|
688
|
+
modOpts,
|
|
689
|
+
)
|
|
690
|
+
|
|
691
|
+
expect(res.ui('profileList')).toBeModerationResult([])
|
|
692
|
+
expect(res.ui('profileView')).toBeModerationResult([])
|
|
693
|
+
expect(res.ui('avatar')).toBeModerationResult([])
|
|
694
|
+
expect(res.ui('banner')).toBeModerationResult([])
|
|
695
|
+
expect(res.ui('displayName')).toBeModerationResult([])
|
|
696
|
+
expect(res.ui('contentList')).toBeModerationResult(['filter'])
|
|
697
|
+
expect(res.ui('contentView')).toBeModerationResult([])
|
|
698
|
+
expect(res.ui('contentMedia')).toBeModerationResult(['blur', 'noOverride'])
|
|
699
|
+
})
|
|
436
700
|
})
|
|
@@ -254,12 +254,14 @@ export class ModerationBehaviorSuiteRunner {
|
|
|
254
254
|
this.configurations[scenario.cfg]?.adultContentEnabled,
|
|
255
255
|
),
|
|
256
256
|
labels: this.configurations[scenario.cfg].settings || {},
|
|
257
|
-
|
|
257
|
+
labelers: [
|
|
258
258
|
{
|
|
259
259
|
did: 'did:plc:fake-labeler',
|
|
260
260
|
labels: {},
|
|
261
261
|
},
|
|
262
262
|
],
|
|
263
|
+
mutedWords: [],
|
|
264
|
+
hiddenPosts: [],
|
|
263
265
|
},
|
|
264
266
|
}
|
|
265
267
|
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { Headers, XRPCError } from '@atproto/xrpc';
|
|
2
|
-
import * as AppBskySystemDeclRef from '../system/declRef';
|
|
3
|
-
export interface QueryParams {
|
|
4
|
-
}
|
|
5
|
-
export interface InputSchema {
|
|
6
|
-
handle: string;
|
|
7
|
-
recoveryKey?: string;
|
|
8
|
-
[k: string]: unknown;
|
|
9
|
-
}
|
|
10
|
-
export interface OutputSchema {
|
|
11
|
-
handle: string;
|
|
12
|
-
did: string;
|
|
13
|
-
declaration: AppBskySystemDeclRef.Main;
|
|
14
|
-
[k: string]: unknown;
|
|
15
|
-
}
|
|
16
|
-
export interface CallOptions {
|
|
17
|
-
headers?: Headers;
|
|
18
|
-
qp?: QueryParams;
|
|
19
|
-
encoding: 'application/json';
|
|
20
|
-
}
|
|
21
|
-
export interface Response {
|
|
22
|
-
success: boolean;
|
|
23
|
-
headers: Headers;
|
|
24
|
-
data: OutputSchema;
|
|
25
|
-
}
|
|
26
|
-
export declare class InvalidHandleError extends XRPCError {
|
|
27
|
-
constructor(src: XRPCError);
|
|
28
|
-
}
|
|
29
|
-
export declare class HandleNotAvailableError extends XRPCError {
|
|
30
|
-
constructor(src: XRPCError);
|
|
31
|
-
}
|
|
32
|
-
export declare function toKnownErr(e: any): any;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { ValidationResult } from '@atproto/lexicon';
|
|
2
|
-
import * as AppBskySystemDeclRef from '../system/declRef';
|
|
3
|
-
export interface Main {
|
|
4
|
-
did: string;
|
|
5
|
-
declarationCid: string;
|
|
6
|
-
[k: string]: unknown;
|
|
7
|
-
}
|
|
8
|
-
export declare function isMain(v: unknown): v is Main;
|
|
9
|
-
export declare function validateMain(v: unknown): ValidationResult;
|
|
10
|
-
export interface WithInfo {
|
|
11
|
-
did: string;
|
|
12
|
-
declaration: AppBskySystemDeclRef.Main;
|
|
13
|
-
handle: string;
|
|
14
|
-
displayName?: string;
|
|
15
|
-
avatar?: string;
|
|
16
|
-
viewer?: ViewerState;
|
|
17
|
-
[k: string]: unknown;
|
|
18
|
-
}
|
|
19
|
-
export declare function isWithInfo(v: unknown): v is WithInfo;
|
|
20
|
-
export declare function validateWithInfo(v: unknown): ValidationResult;
|
|
21
|
-
export interface ViewerState {
|
|
22
|
-
muted?: boolean;
|
|
23
|
-
following?: string;
|
|
24
|
-
followedBy?: string;
|
|
25
|
-
[k: string]: unknown;
|
|
26
|
-
}
|
|
27
|
-
export declare function isViewerState(v: unknown): v is ViewerState;
|
|
28
|
-
export declare function validateViewerState(v: unknown): ValidationResult;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { Headers } from '@atproto/xrpc';
|
|
2
|
-
import * as AppBskyActorProfile from './profile';
|
|
3
|
-
export interface QueryParams {
|
|
4
|
-
term?: string;
|
|
5
|
-
limit?: number;
|
|
6
|
-
before?: string;
|
|
7
|
-
}
|
|
8
|
-
export declare type InputSchema = undefined;
|
|
9
|
-
export interface OutputSchema {
|
|
10
|
-
cursor?: string;
|
|
11
|
-
users: AppBskyActorProfile.ViewBasic[];
|
|
12
|
-
[k: string]: unknown;
|
|
13
|
-
}
|
|
14
|
-
export interface CallOptions {
|
|
15
|
-
headers?: Headers;
|
|
16
|
-
}
|
|
17
|
-
export interface Response {
|
|
18
|
-
success: boolean;
|
|
19
|
-
headers: Headers;
|
|
20
|
-
data: OutputSchema;
|
|
21
|
-
}
|
|
22
|
-
export declare function toKnownErr(e: any): any;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { Headers } from '@atproto/xrpc';
|
|
2
|
-
import * as AppBskyActorDefs from './defs';
|
|
3
|
-
export interface QueryParams {
|
|
4
|
-
term?: string;
|
|
5
|
-
limit?: number;
|
|
6
|
-
cursor?: string;
|
|
7
|
-
}
|
|
8
|
-
export declare type InputSchema = undefined;
|
|
9
|
-
export interface OutputSchema {
|
|
10
|
-
cursor?: string;
|
|
11
|
-
actors: AppBskyActorDefs.ProfileViewBasic[];
|
|
12
|
-
[k: string]: unknown;
|
|
13
|
-
}
|
|
14
|
-
export interface CallOptions {
|
|
15
|
-
headers?: Headers;
|
|
16
|
-
}
|
|
17
|
-
export interface Response {
|
|
18
|
-
success: boolean;
|
|
19
|
-
headers: Headers;
|
|
20
|
-
data: OutputSchema;
|
|
21
|
-
}
|
|
22
|
-
export declare function toKnownErr(e: any): any;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { Headers } from '@atproto/xrpc';
|
|
2
|
-
import * as AppBskyActorDefs from './defs';
|
|
3
|
-
export interface QueryParams {
|
|
4
|
-
term?: string;
|
|
5
|
-
limit?: number;
|
|
6
|
-
}
|
|
7
|
-
export declare type InputSchema = undefined;
|
|
8
|
-
export interface OutputSchema {
|
|
9
|
-
actors: AppBskyActorDefs.WithInfo[];
|
|
10
|
-
[k: string]: unknown;
|
|
11
|
-
}
|
|
12
|
-
export interface CallOptions {
|
|
13
|
-
headers?: Headers;
|
|
14
|
-
}
|
|
15
|
-
export interface Response {
|
|
16
|
-
success: boolean;
|
|
17
|
-
headers: Headers;
|
|
18
|
-
data: OutputSchema;
|
|
19
|
-
}
|
|
20
|
-
export declare function toKnownErr(e: any): any;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { Headers } from '@atproto/xrpc';
|
|
2
|
-
import * as AppBskyActorRef from './ref';
|
|
3
|
-
export interface QueryParams {
|
|
4
|
-
term?: string;
|
|
5
|
-
limit?: number;
|
|
6
|
-
}
|
|
7
|
-
export declare type InputSchema = undefined;
|
|
8
|
-
export interface OutputSchema {
|
|
9
|
-
users: AppBskyActorRef.WithInfo[];
|
|
10
|
-
[k: string]: unknown;
|
|
11
|
-
}
|
|
12
|
-
export interface CallOptions {
|
|
13
|
-
headers?: Headers;
|
|
14
|
-
}
|
|
15
|
-
export interface Response {
|
|
16
|
-
success: boolean;
|
|
17
|
-
headers: Headers;
|
|
18
|
-
data: OutputSchema;
|
|
19
|
-
}
|
|
20
|
-
export declare function toKnownErr(e: any): any;
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { Headers, XRPCError } from '@atproto/xrpc';
|
|
2
|
-
export interface QueryParams {
|
|
3
|
-
}
|
|
4
|
-
export interface InputSchema {
|
|
5
|
-
displayName?: string;
|
|
6
|
-
description?: string | null;
|
|
7
|
-
avatar?: {
|
|
8
|
-
cid: string;
|
|
9
|
-
mimeType: string;
|
|
10
|
-
[k: string]: unknown;
|
|
11
|
-
} | null;
|
|
12
|
-
banner?: {
|
|
13
|
-
cid: string;
|
|
14
|
-
mimeType: string;
|
|
15
|
-
[k: string]: unknown;
|
|
16
|
-
} | null;
|
|
17
|
-
[k: string]: unknown;
|
|
18
|
-
}
|
|
19
|
-
export interface OutputSchema {
|
|
20
|
-
uri: string;
|
|
21
|
-
cid: string;
|
|
22
|
-
record: {};
|
|
23
|
-
[k: string]: unknown;
|
|
24
|
-
}
|
|
25
|
-
export interface CallOptions {
|
|
26
|
-
headers?: Headers;
|
|
27
|
-
qp?: QueryParams;
|
|
28
|
-
encoding: 'application/json';
|
|
29
|
-
}
|
|
30
|
-
export interface Response {
|
|
31
|
-
success: boolean;
|
|
32
|
-
headers: Headers;
|
|
33
|
-
data: OutputSchema;
|
|
34
|
-
}
|
|
35
|
-
export declare class InvalidBlobError extends XRPCError {
|
|
36
|
-
constructor(src: XRPCError);
|
|
37
|
-
}
|
|
38
|
-
export declare class BlobTooLargeError extends XRPCError {
|
|
39
|
-
constructor(src: XRPCError);
|
|
40
|
-
}
|
|
41
|
-
export declare class InvalidMimeTypeError extends XRPCError {
|
|
42
|
-
constructor(src: XRPCError);
|
|
43
|
-
}
|
|
44
|
-
export declare class InvalidImageDimensionsError extends XRPCError {
|
|
45
|
-
constructor(src: XRPCError);
|
|
46
|
-
}
|
|
47
|
-
export declare function toKnownErr(e: any): any;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Headers } from '@atproto/xrpc';
|
|
2
|
-
export interface QueryParams {
|
|
3
|
-
}
|
|
4
|
-
export interface InputSchema {
|
|
5
|
-
feed: string;
|
|
6
|
-
[k: string]: unknown;
|
|
7
|
-
}
|
|
8
|
-
export interface CallOptions {
|
|
9
|
-
headers?: Headers;
|
|
10
|
-
qp?: QueryParams;
|
|
11
|
-
encoding: 'application/json';
|
|
12
|
-
}
|
|
13
|
-
export interface Response {
|
|
14
|
-
success: boolean;
|
|
15
|
-
headers: Headers;
|
|
16
|
-
}
|
|
17
|
-
export declare function toKnownErr(e: any): any;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { ValidationResult } from '@atproto/lexicon';
|
|
2
|
-
import * as AppBskyFeedPost from './post';
|
|
3
|
-
import * as AppBskyActorRef from '../actor/ref';
|
|
4
|
-
export interface Main {
|
|
5
|
-
post: AppBskyFeedPost.View;
|
|
6
|
-
reply?: ReplyRef;
|
|
7
|
-
reason?: ReasonRepost | {
|
|
8
|
-
$type: string;
|
|
9
|
-
[k: string]: unknown;
|
|
10
|
-
};
|
|
11
|
-
[k: string]: unknown;
|
|
12
|
-
}
|
|
13
|
-
export declare function isMain(v: unknown): v is Main;
|
|
14
|
-
export declare function validateMain(v: unknown): ValidationResult;
|
|
15
|
-
export interface ReplyRef {
|
|
16
|
-
root: AppBskyFeedPost.View;
|
|
17
|
-
parent: AppBskyFeedPost.View;
|
|
18
|
-
[k: string]: unknown;
|
|
19
|
-
}
|
|
20
|
-
export declare function isReplyRef(v: unknown): v is ReplyRef;
|
|
21
|
-
export declare function validateReplyRef(v: unknown): ValidationResult;
|
|
22
|
-
export interface ReasonRepost {
|
|
23
|
-
by: AppBskyActorRef.WithInfo;
|
|
24
|
-
indexedAt: string;
|
|
25
|
-
[k: string]: unknown;
|
|
26
|
-
}
|
|
27
|
-
export declare function isReasonRepost(v: unknown): v is ReasonRepost;
|
|
28
|
-
export declare function validateReasonRepost(v: unknown): ValidationResult;
|