@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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# @atproto/api
|
|
2
2
|
|
|
3
|
+
## 0.11.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#2302](https://github.com/bluesky-social/atproto/pull/2302) [`4eaadc0ac`](https://github.com/bluesky-social/atproto/commit/4eaadc0acb6b73b9745dd7a2b929d02e58083ab0) Thanks [@dholms](https://github.com/dholms)! - - Breaking changes
|
|
8
|
+
- Redesigned the `moderate*` APIs which now output a `ModerationUI` object.
|
|
9
|
+
- `agent.getPreferences()` output object `BskyPreferences` has been modified.
|
|
10
|
+
- Moved Ozone routes from `com.atproto.admin` to `tools.ozone` namespace.
|
|
11
|
+
- Additions
|
|
12
|
+
- Added support for labeler configuration in `Agent.configure()` and `agent.configureLabelerHeader()`.
|
|
13
|
+
- Added `agent.addLabeler()` and `agent.removeLabeler()` preference methods.
|
|
14
|
+
- Muted words and hidden posts are now handled in the `moderate*` APIs.
|
|
15
|
+
- Added `agent.getLabelers()` and `agent.getLabelDefinitions()`.
|
|
16
|
+
- Added `agent.configureProxyHeader()` and `withProxy()` methods to support remote service proxying behaviors.
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- Updated dependencies [[`4eaadc0ac`](https://github.com/bluesky-social/atproto/commit/4eaadc0acb6b73b9745dd7a2b929d02e58083ab0)]:
|
|
21
|
+
- @atproto/common-web@0.2.4
|
|
22
|
+
- @atproto/lexicon@0.3.3
|
|
23
|
+
- @atproto/syntax@0.2.1
|
|
24
|
+
- @atproto/xrpc@0.4.3
|
|
25
|
+
|
|
3
26
|
## 0.10.5
|
|
4
27
|
|
|
5
28
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -178,87 +178,70 @@ console.log(rt3.graphemeLength) // => 1
|
|
|
178
178
|
|
|
179
179
|
Applying the moderation system is a challenging task, but we've done our best to simplify it for you. The Moderation API helps handle a wide range of tasks, including:
|
|
180
180
|
|
|
181
|
+
- Moderator labeling
|
|
181
182
|
- User muting (including mutelists)
|
|
182
183
|
- User blocking
|
|
183
|
-
-
|
|
184
|
+
- Mutewords
|
|
185
|
+
- Hidden posts
|
|
184
186
|
|
|
185
|
-
For more information, see the [Moderation Documentation](./docs/moderation.md)
|
|
187
|
+
For more information, see the [Moderation Documentation](./docs/moderation.md).
|
|
186
188
|
|
|
187
189
|
```typescript
|
|
188
|
-
import { moderatePost
|
|
190
|
+
import { moderatePost } from '@atproto/api'
|
|
191
|
+
|
|
192
|
+
// First get the user's moderation prefs and their label definitions
|
|
193
|
+
// =
|
|
194
|
+
|
|
195
|
+
const prefs = await agent.getPreferences()
|
|
196
|
+
const labelDefs = await agent.getLabelDefinitions(prefs)
|
|
189
197
|
|
|
190
198
|
// We call the appropriate moderation function for the content
|
|
191
199
|
// =
|
|
192
200
|
|
|
193
|
-
const postMod = moderatePost(postView,
|
|
194
|
-
|
|
201
|
+
const postMod = moderatePost(postView, {
|
|
202
|
+
userDid: agent.session.did,
|
|
203
|
+
moderationPrefs: prefs.moderationPrefs,
|
|
204
|
+
labelDefs,
|
|
205
|
+
})
|
|
195
206
|
|
|
196
207
|
// We then use the output to decide how to affect rendering
|
|
197
208
|
// =
|
|
198
209
|
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
//
|
|
210
|
+
// in feeds
|
|
211
|
+
if (postMod.ui('contentList').filter) {
|
|
212
|
+
// don't include in feeds
|
|
202
213
|
}
|
|
203
|
-
if (postMod.
|
|
204
|
-
// render the whole object behind a cover (use postMod.
|
|
205
|
-
if (postMod.
|
|
214
|
+
if (postMod.ui('contentList').blur) {
|
|
215
|
+
// render the whole object behind a cover (use postMod.ui('contentList').blurs to explain)
|
|
216
|
+
if (postMod.ui('contentList').noOverride) {
|
|
206
217
|
// do not allow the cover the be removed
|
|
207
218
|
}
|
|
208
219
|
}
|
|
209
|
-
if (postMod.
|
|
210
|
-
// render
|
|
220
|
+
if (postMod.ui('contentList').alert || postMod.ui('contentList').inform) {
|
|
221
|
+
// render warnings on the post
|
|
222
|
+
// find the warnings in postMod.ui('contentList').alerts and postMod.ui('contentList').informs
|
|
211
223
|
}
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
224
|
+
|
|
225
|
+
// viewed directly
|
|
226
|
+
if (postMod.ui('contentView').filter) {
|
|
227
|
+
// don't include in feeds
|
|
228
|
+
}
|
|
229
|
+
if (postMod.ui('contentView').blur) {
|
|
230
|
+
// render the whole object behind a cover (use postMod.ui('contentView').blurs to explain)
|
|
231
|
+
if (postMod.ui('contentView').noOverride) {
|
|
215
232
|
// do not allow the cover the be removed
|
|
216
233
|
}
|
|
217
234
|
}
|
|
218
|
-
if (postMod.
|
|
219
|
-
// render
|
|
220
|
-
|
|
221
|
-
if (postMod.avatar.blur) {
|
|
222
|
-
// render the avatar behind a cover
|
|
223
|
-
}
|
|
224
|
-
if (postMod.avatar.alert) {
|
|
225
|
-
// render an alert on the avatar
|
|
235
|
+
if (postMod.ui('contentView').alert || postMod.ui('contentView').inform) {
|
|
236
|
+
// render warnings on the post
|
|
237
|
+
// find the warnings in postMod.ui('contentView').alerts and postMod.ui('contentView').informs
|
|
226
238
|
}
|
|
227
239
|
|
|
228
|
-
//
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
// the logged-in user's DID
|
|
234
|
-
userDid: 'did:plc:1234...',
|
|
235
|
-
|
|
236
|
-
// is adult content allowed?
|
|
237
|
-
adultContentEnabled: true,
|
|
238
|
-
|
|
239
|
-
// the global label settings (used on self-labels)
|
|
240
|
-
labels: {
|
|
241
|
-
porn: 'hide',
|
|
242
|
-
sexual: 'warn',
|
|
243
|
-
nudity: 'ignore',
|
|
244
|
-
// ...
|
|
245
|
-
},
|
|
246
|
-
|
|
247
|
-
// the per-labeler settings
|
|
248
|
-
labelers: [
|
|
249
|
-
{
|
|
250
|
-
labeler: {
|
|
251
|
-
did: '...',
|
|
252
|
-
displayName: 'My mod service',
|
|
253
|
-
},
|
|
254
|
-
labels: {
|
|
255
|
-
porn: 'hide',
|
|
256
|
-
sexual: 'warn',
|
|
257
|
-
nudity: 'ignore',
|
|
258
|
-
// ...
|
|
259
|
-
},
|
|
260
|
-
},
|
|
261
|
-
],
|
|
240
|
+
// post embeds in all contexts
|
|
241
|
+
if (postMod.ui('contentMedia').blur) {
|
|
242
|
+
// render the whole object behind a cover (use postMod.ui('contentMedia').blurs to explain)
|
|
243
|
+
if (postMod.ui('contentMedia').noOverride) {
|
|
244
|
+
// do not allow the cover the be removed
|
|
262
245
|
}
|
|
263
246
|
}
|
|
264
247
|
```
|
package/definitions/labels.json
CHANGED
|
@@ -27,15 +27,6 @@
|
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
},
|
|
30
|
-
{
|
|
31
|
-
"identifier": "!no-promote",
|
|
32
|
-
"configurable": false,
|
|
33
|
-
"defaultSetting": "hide",
|
|
34
|
-
"flags": ["no-self"],
|
|
35
|
-
"severity": "none",
|
|
36
|
-
"blurs": "none",
|
|
37
|
-
"behaviors": {}
|
|
38
|
-
},
|
|
39
30
|
{
|
|
40
31
|
"identifier": "!warn",
|
|
41
32
|
"configurable": false,
|
|
@@ -91,54 +82,6 @@
|
|
|
91
82
|
}
|
|
92
83
|
}
|
|
93
84
|
},
|
|
94
|
-
{
|
|
95
|
-
"identifier": "dmca-violation",
|
|
96
|
-
"configurable": false,
|
|
97
|
-
"defaultSetting": "hide",
|
|
98
|
-
"flags": ["no-override", "no-self"],
|
|
99
|
-
"severity": "none",
|
|
100
|
-
"blurs": "content",
|
|
101
|
-
"behaviors": {
|
|
102
|
-
"account": {
|
|
103
|
-
"profileList": "blur",
|
|
104
|
-
"profileView": "blur",
|
|
105
|
-
"contentList": "blur",
|
|
106
|
-
"contentView": "blur"
|
|
107
|
-
},
|
|
108
|
-
"profile": {
|
|
109
|
-
"profileList": "blur",
|
|
110
|
-
"profileView": "blur"
|
|
111
|
-
},
|
|
112
|
-
"content": {
|
|
113
|
-
"contentList": "blur",
|
|
114
|
-
"contentView": "blur"
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
},
|
|
118
|
-
{
|
|
119
|
-
"identifier": "doxxing",
|
|
120
|
-
"configurable": false,
|
|
121
|
-
"defaultSetting": "hide",
|
|
122
|
-
"flags": ["no-override", "no-self"],
|
|
123
|
-
"severity": "none",
|
|
124
|
-
"blurs": "content",
|
|
125
|
-
"behaviors": {
|
|
126
|
-
"account": {
|
|
127
|
-
"profileList": "blur",
|
|
128
|
-
"profileView": "blur",
|
|
129
|
-
"contentList": "blur",
|
|
130
|
-
"contentView": "blur"
|
|
131
|
-
},
|
|
132
|
-
"profile": {
|
|
133
|
-
"profileList": "blur",
|
|
134
|
-
"profileView": "blur"
|
|
135
|
-
},
|
|
136
|
-
"content": {
|
|
137
|
-
"contentList": "blur",
|
|
138
|
-
"contentView": "blur"
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
},
|
|
142
85
|
{
|
|
143
86
|
"identifier": "porn",
|
|
144
87
|
"configurable": true,
|
|
@@ -184,8 +127,8 @@
|
|
|
184
127
|
{
|
|
185
128
|
"identifier": "nudity",
|
|
186
129
|
"configurable": true,
|
|
187
|
-
"defaultSetting": "
|
|
188
|
-
"flags": [
|
|
130
|
+
"defaultSetting": "ignore",
|
|
131
|
+
"flags": [],
|
|
189
132
|
"severity": "none",
|
|
190
133
|
"blurs": "media",
|
|
191
134
|
"behaviors": {
|
|
@@ -203,7 +146,7 @@
|
|
|
203
146
|
}
|
|
204
147
|
},
|
|
205
148
|
{
|
|
206
|
-
"identifier": "
|
|
149
|
+
"identifier": "graphic-media",
|
|
207
150
|
"flags": ["adult"],
|
|
208
151
|
"configurable": true,
|
|
209
152
|
"defaultSetting": "warn",
|
package/dist/agent.d.ts
CHANGED
|
@@ -1,21 +1,27 @@
|
|
|
1
|
-
import { AtpServiceClient, ComAtprotoServerCreateAccount, ComAtprotoServerCreateSession, ComAtprotoServerGetSession } from './client';
|
|
2
|
-
import { AtpSessionData, AtpAgentLoginOpts, AtpAgentFetchHandler, AtpAgentGlobalOpts, AtpPersistSessionHandler, AtpAgentOpts } from './types';
|
|
1
|
+
import { AtpBaseClient, AtpServiceClient, ComAtprotoServerCreateAccount, ComAtprotoServerCreateSession, ComAtprotoServerGetSession } from './client';
|
|
2
|
+
import { AtpSessionData, AtpAgentLoginOpts, AtpAgentFetchHandler, AtpAgentGlobalOpts, AtpPersistSessionHandler, AtpAgentOpts, AtprotoServiceType } from './types';
|
|
3
3
|
export declare class AtpAgent {
|
|
4
4
|
service: URL;
|
|
5
5
|
api: AtpServiceClient;
|
|
6
6
|
session?: AtpSessionData;
|
|
7
7
|
labelersHeader: string[];
|
|
8
|
+
proxyHeader: string | undefined;
|
|
8
9
|
pdsUrl: URL | undefined;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
protected _baseClient: AtpBaseClient;
|
|
11
|
+
protected _persistSession?: AtpPersistSessionHandler;
|
|
12
|
+
protected _refreshSessionPromise: Promise<void> | undefined;
|
|
12
13
|
get com(): import("./client").ComNS;
|
|
13
14
|
static fetch: AtpAgentFetchHandler | undefined;
|
|
15
|
+
static appLabelers: string[];
|
|
14
16
|
static configure(opts: AtpAgentGlobalOpts): void;
|
|
15
17
|
constructor(opts: AtpAgentOpts);
|
|
18
|
+
clone(): AtpAgent;
|
|
19
|
+
copyInto(inst: AtpAgent): void;
|
|
20
|
+
withProxy(serviceType: AtprotoServiceType, did: string): AtpAgent;
|
|
16
21
|
get hasSession(): boolean;
|
|
17
22
|
setPersistSessionHandler(handler?: AtpPersistSessionHandler): void;
|
|
18
23
|
configureLabelersHeader(labelerDids: string[]): void;
|
|
24
|
+
configureProxyHeader(serviceType: AtprotoServiceType, did: string): void;
|
|
19
25
|
createAccount(opts: ComAtprotoServerCreateAccount.InputSchema): Promise<ComAtprotoServerCreateAccount.Response>;
|
|
20
26
|
login(opts: AtpAgentLoginOpts): Promise<ComAtprotoServerCreateSession.Response>;
|
|
21
27
|
resumeSession(session: AtpSessionData): Promise<ComAtprotoServerGetSession.Response>;
|
package/dist/bsky-agent.d.ts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { AtpAgent } from './agent';
|
|
2
2
|
import { AppBskyFeedPost, AppBskyActorProfile, AppBskyActorDefs } from './client';
|
|
3
3
|
import { BskyPreferences, BskyFeedViewPreference, BskyThreadViewPreference, BskyInterestsPreference } from './types';
|
|
4
|
-
import { LabelPreference } from './moderation/types';
|
|
4
|
+
import { InterpretedLabelValueDefinition, LabelPreference, ModerationPrefs } from './moderation/types';
|
|
5
5
|
declare global {
|
|
6
6
|
interface Array<T> {
|
|
7
7
|
findLast(predicate: (value: T, index: number, obj: T[]) => unknown, thisArg?: any): T;
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
10
|
export declare class BskyAgent extends AtpAgent {
|
|
11
|
+
clone(): BskyAgent;
|
|
11
12
|
get app(): import("./client").AppNS;
|
|
12
13
|
getTimeline: typeof this.api.app.bsky.feed.getTimeline;
|
|
13
14
|
getAuthorFeed: typeof this.api.app.bsky.feed.getAuthorFeed;
|
|
@@ -27,6 +28,7 @@ export declare class BskyAgent extends AtpAgent {
|
|
|
27
28
|
listNotifications: typeof this.api.app.bsky.notification.listNotifications;
|
|
28
29
|
countUnreadNotifications: typeof this.api.app.bsky.notification.getUnreadCount;
|
|
29
30
|
getLabelers: typeof this.api.app.bsky.labeler.getServices;
|
|
31
|
+
getLabelDefinitions(prefs: BskyPreferences | ModerationPrefs | string[]): Promise<Record<string, InterpretedLabelValueDefinition[]>>;
|
|
30
32
|
post(record: Partial<AppBskyFeedPost.Record> & Omit<AppBskyFeedPost.Record, 'createdAt'>): Promise<{
|
|
31
33
|
uri: string;
|
|
32
34
|
cid: string;
|
|
@@ -81,8 +83,8 @@ export declare class BskyAgent extends AtpAgent {
|
|
|
81
83
|
}>;
|
|
82
84
|
setAdultContentEnabled(v: boolean): Promise<void>;
|
|
83
85
|
setContentLabelPref(key: string, value: LabelPreference, labelerDid?: string): Promise<void>;
|
|
84
|
-
|
|
85
|
-
|
|
86
|
+
addLabeler(did: string): Promise<void>;
|
|
87
|
+
removeLabeler(did: string): Promise<void>;
|
|
86
88
|
setPersonalDetails({ birthDate, }: {
|
|
87
89
|
birthDate: string | Date | undefined;
|
|
88
90
|
}): Promise<void>;
|
|
@@ -813,6 +813,16 @@ export declare const schemaDict: {
|
|
|
813
813
|
description: string;
|
|
814
814
|
knownValues: string[];
|
|
815
815
|
};
|
|
816
|
+
defaultSetting: {
|
|
817
|
+
type: string;
|
|
818
|
+
description: string;
|
|
819
|
+
knownValues: string[];
|
|
820
|
+
default: string;
|
|
821
|
+
};
|
|
822
|
+
adultOnly: {
|
|
823
|
+
type: string;
|
|
824
|
+
description: string;
|
|
825
|
+
};
|
|
816
826
|
locales: {
|
|
817
827
|
type: string;
|
|
818
828
|
items: {
|
|
@@ -3643,11 +3653,11 @@ export declare const schemaDict: {
|
|
|
3643
3653
|
};
|
|
3644
3654
|
};
|
|
3645
3655
|
};
|
|
3646
|
-
|
|
3656
|
+
labelersPref: {
|
|
3647
3657
|
type: string;
|
|
3648
3658
|
required: string[];
|
|
3649
3659
|
properties: {
|
|
3650
|
-
|
|
3660
|
+
labelers: {
|
|
3651
3661
|
type: string;
|
|
3652
3662
|
items: {
|
|
3653
3663
|
type: string;
|
|
@@ -3656,7 +3666,7 @@ export declare const schemaDict: {
|
|
|
3656
3666
|
};
|
|
3657
3667
|
};
|
|
3658
3668
|
};
|
|
3659
|
-
|
|
3669
|
+
labelerPrefItem: {
|
|
3660
3670
|
type: string;
|
|
3661
3671
|
required: string[];
|
|
3662
3672
|
properties: {
|
|
@@ -4490,6 +4500,13 @@ export declare const schemaDict: {
|
|
|
4490
4500
|
type: string;
|
|
4491
4501
|
minimum: number;
|
|
4492
4502
|
};
|
|
4503
|
+
labels: {
|
|
4504
|
+
type: string;
|
|
4505
|
+
items: {
|
|
4506
|
+
type: string;
|
|
4507
|
+
ref: string;
|
|
4508
|
+
};
|
|
4509
|
+
};
|
|
4493
4510
|
viewer: {
|
|
4494
4511
|
type: string;
|
|
4495
4512
|
ref: string;
|
|
@@ -5719,6 +5736,13 @@ export declare const schemaDict: {
|
|
|
5719
5736
|
avatar: {
|
|
5720
5737
|
type: string;
|
|
5721
5738
|
};
|
|
5739
|
+
labels: {
|
|
5740
|
+
type: string;
|
|
5741
|
+
items: {
|
|
5742
|
+
type: string;
|
|
5743
|
+
ref: string;
|
|
5744
|
+
};
|
|
5745
|
+
};
|
|
5722
5746
|
viewer: {
|
|
5723
5747
|
type: string;
|
|
5724
5748
|
ref: string;
|
|
@@ -5769,6 +5793,13 @@ export declare const schemaDict: {
|
|
|
5769
5793
|
avatar: {
|
|
5770
5794
|
type: string;
|
|
5771
5795
|
};
|
|
5796
|
+
labels: {
|
|
5797
|
+
type: string;
|
|
5798
|
+
items: {
|
|
5799
|
+
type: string;
|
|
5800
|
+
ref: string;
|
|
5801
|
+
};
|
|
5802
|
+
};
|
|
5772
5803
|
viewer: {
|
|
5773
5804
|
type: string;
|
|
5774
5805
|
ref: string;
|
|
@@ -139,15 +139,15 @@ export interface HiddenPostsPref {
|
|
|
139
139
|
}
|
|
140
140
|
export declare function isHiddenPostsPref(v: unknown): v is HiddenPostsPref;
|
|
141
141
|
export declare function validateHiddenPostsPref(v: unknown): ValidationResult;
|
|
142
|
-
export interface
|
|
143
|
-
|
|
142
|
+
export interface LabelersPref {
|
|
143
|
+
labelers: LabelerPrefItem[];
|
|
144
144
|
[k: string]: unknown;
|
|
145
145
|
}
|
|
146
|
-
export declare function
|
|
147
|
-
export declare function
|
|
148
|
-
export interface
|
|
146
|
+
export declare function isLabelersPref(v: unknown): v is LabelersPref;
|
|
147
|
+
export declare function validateLabelersPref(v: unknown): ValidationResult;
|
|
148
|
+
export interface LabelerPrefItem {
|
|
149
149
|
did: string;
|
|
150
150
|
[k: string]: unknown;
|
|
151
151
|
}
|
|
152
|
-
export declare function
|
|
153
|
-
export declare function
|
|
152
|
+
export declare function isLabelerPrefItem(v: unknown): v is LabelerPrefItem;
|
|
153
|
+
export declare function validateLabelerPrefItem(v: unknown): ValidationResult;
|
|
@@ -112,6 +112,7 @@ export interface GeneratorView {
|
|
|
112
112
|
descriptionFacets?: AppBskyRichtextFacet.Main[];
|
|
113
113
|
avatar?: string;
|
|
114
114
|
likeCount?: number;
|
|
115
|
+
labels?: ComAtprotoLabelDefs.Label[];
|
|
115
116
|
viewer?: GeneratorViewerState;
|
|
116
117
|
indexedAt: string;
|
|
117
118
|
[k: string]: unknown;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ValidationResult } from '@atproto/lexicon';
|
|
2
|
+
import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs';
|
|
2
3
|
import * as AppBskyActorDefs from '../actor/defs';
|
|
3
4
|
import * as AppBskyRichtextFacet from '../richtext/facet';
|
|
4
5
|
export interface ListViewBasic {
|
|
@@ -7,6 +8,7 @@ export interface ListViewBasic {
|
|
|
7
8
|
name: string;
|
|
8
9
|
purpose: ListPurpose;
|
|
9
10
|
avatar?: string;
|
|
11
|
+
labels?: ComAtprotoLabelDefs.Label[];
|
|
10
12
|
viewer?: ListViewerState;
|
|
11
13
|
indexedAt?: string;
|
|
12
14
|
[k: string]: unknown;
|
|
@@ -22,6 +24,7 @@ export interface ListView {
|
|
|
22
24
|
description?: string;
|
|
23
25
|
descriptionFacets?: AppBskyRichtextFacet.Main[];
|
|
24
26
|
avatar?: string;
|
|
27
|
+
labels?: ComAtprotoLabelDefs.Label[];
|
|
25
28
|
viewer?: ListViewerState;
|
|
26
29
|
indexedAt: string;
|
|
27
30
|
[k: string]: unknown;
|
|
@@ -29,6 +29,8 @@ export interface LabelValueDefinition {
|
|
|
29
29
|
identifier: string;
|
|
30
30
|
severity: 'inform' | 'alert' | 'none' | (string & {});
|
|
31
31
|
blurs: 'content' | 'media' | 'none' | (string & {});
|
|
32
|
+
defaultSetting: 'ignore' | 'warn' | 'hide' | (string & {});
|
|
33
|
+
adultOnly?: boolean;
|
|
32
34
|
locales: LabelValueDefinitionStrings[];
|
|
33
35
|
[k: string]: unknown;
|
|
34
36
|
}
|
package/dist/const.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const
|
|
1
|
+
export declare const BSKY_LABELER_DID = "did:plc:ar7c4by46qjdydhdevvrndac";
|