@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.
Files changed (377) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/README.md +41 -58
  3. package/definitions/labels.json +3 -60
  4. package/dist/agent.d.ts +11 -5
  5. package/dist/bsky-agent.d.ts +5 -3
  6. package/dist/client/lexicons.d.ts +34 -3
  7. package/dist/client/types/app/bsky/actor/defs.d.ts +7 -7
  8. package/dist/client/types/app/bsky/feed/defs.d.ts +1 -0
  9. package/dist/client/types/app/bsky/graph/defs.d.ts +3 -0
  10. package/dist/client/types/com/atproto/label/defs.d.ts +2 -0
  11. package/dist/const.d.ts +1 -1
  12. package/dist/index.js +581 -204
  13. package/dist/index.js.map +3 -3
  14. package/dist/mocker.d.ts +2 -1
  15. package/dist/moderation/const/labels.d.ts +3 -3
  16. package/dist/moderation/decision.d.ts +2 -0
  17. package/dist/moderation/index.d.ts +1 -0
  18. package/dist/moderation/mutewords.d.ts +8 -0
  19. package/dist/moderation/subjects/feed-generator.d.ts +1 -1
  20. package/dist/moderation/subjects/user-list.d.ts +1 -1
  21. package/dist/moderation/types.d.ts +22 -6
  22. package/dist/moderation/util.d.ts +3 -3
  23. package/dist/types.d.ts +3 -4
  24. package/docs/moderation.md +204 -95
  25. package/package.json +9 -9
  26. package/scripts/code/labels.mjs +2 -2
  27. package/src/agent.ts +61 -16
  28. package/src/bsky-agent.ts +190 -71
  29. package/src/client/lexicons.ts +37 -5
  30. package/src/client/types/app/bsky/actor/defs.ts +11 -11
  31. package/src/client/types/app/bsky/feed/defs.ts +1 -0
  32. package/src/client/types/app/bsky/graph/defs.ts +3 -0
  33. package/src/client/types/com/atproto/label/defs.ts +4 -0
  34. package/src/const.ts +1 -1
  35. package/src/mocker.ts +4 -0
  36. package/src/moderation/const/labels.ts +9 -72
  37. package/src/moderation/decision.ts +82 -36
  38. package/src/moderation/index.ts +5 -24
  39. package/src/moderation/mutewords.ts +125 -0
  40. package/src/moderation/subjects/feed-generator.ts +18 -4
  41. package/src/moderation/subjects/notification.ts +7 -1
  42. package/src/moderation/subjects/post.ts +260 -1
  43. package/src/moderation/subjects/user-list.ts +38 -4
  44. package/src/moderation/types.ts +51 -12
  45. package/src/moderation/util.ts +33 -16
  46. package/src/types.ts +7 -3
  47. package/tests/agent.test.ts +71 -5
  48. package/tests/bsky-agent.test.ts +150 -217
  49. package/tests/moderation-behaviors.test.ts +5 -60
  50. package/tests/moderation-custom-labels.test.ts +46 -71
  51. package/tests/moderation-mutewords.test.ts +691 -0
  52. package/tests/moderation-prefs.test.ts +157 -92
  53. package/tests/moderation-quoteposts.test.ts +277 -0
  54. package/tests/moderation.test.ts +302 -38
  55. package/tests/util/moderation-behavior.ts +3 -1
  56. package/dist/client/types/app/bsky/actor/createScene.d.ts +0 -32
  57. package/dist/client/types/app/bsky/actor/ref.d.ts +0 -28
  58. package/dist/client/types/app/bsky/actor/search.d.ts +0 -22
  59. package/dist/client/types/app/bsky/actor/searchActor.d.ts +0 -22
  60. package/dist/client/types/app/bsky/actor/searchActorTypeahead.d.ts +0 -20
  61. package/dist/client/types/app/bsky/actor/searchTypeahead.d.ts +0 -20
  62. package/dist/client/types/app/bsky/actor/updateProfile.d.ts +0 -47
  63. package/dist/client/types/app/bsky/feed/bookmarkFeed.d.ts +0 -17
  64. package/dist/client/types/app/bsky/feed/feedViewPost.d.ts +0 -28
  65. package/dist/client/types/app/bsky/feed/getBookmarkedFeeds.d.ts +0 -21
  66. package/dist/client/types/app/bsky/feed/getSavedFeeds.d.ts +0 -21
  67. package/dist/client/types/app/bsky/feed/getVotes.d.ts +0 -36
  68. package/dist/client/types/app/bsky/feed/saveFeed.d.ts +0 -17
  69. package/dist/client/types/app/bsky/feed/setVote.d.ts +0 -25
  70. package/dist/client/types/app/bsky/feed/trend.d.ts +0 -9
  71. package/dist/client/types/app/bsky/feed/unbookmarkFeed.d.ts +0 -17
  72. package/dist/client/types/app/bsky/feed/unsaveFeed.d.ts +0 -17
  73. package/dist/client/types/app/bsky/feed/vote.d.ts +0 -10
  74. package/dist/client/types/app/bsky/graph/assertCreator.d.ts +0 -1
  75. package/dist/client/types/app/bsky/graph/assertMember.d.ts +0 -1
  76. package/dist/client/types/app/bsky/graph/assertion.d.ts +0 -10
  77. package/dist/client/types/app/bsky/graph/confirmation.d.ts +0 -11
  78. package/dist/client/types/app/bsky/graph/getAssertions.d.ts +0 -48
  79. package/dist/client/types/app/bsky/graph/getMembers.d.ts +0 -36
  80. package/dist/client/types/app/bsky/graph/getMemberships.d.ts +0 -36
  81. package/dist/client/types/app/bsky/graph/mute.d.ts +0 -17
  82. package/dist/client/types/app/bsky/graph/unmute.d.ts +0 -17
  83. package/dist/client/types/app/bsky/moderation/defs.d.ts +0 -41
  84. package/dist/client/types/app/bsky/moderation/getService.d.ts +0 -16
  85. package/dist/client/types/app/bsky/moderation/getServices.d.ts +0 -23
  86. package/dist/client/types/app/bsky/moderation/service.d.ts +0 -14
  87. package/dist/client/types/app/bsky/notification/getCount.d.ts +0 -17
  88. package/dist/client/types/app/bsky/notification/list.d.ts +0 -35
  89. package/dist/client/types/app/bsky/system/actorScene.d.ts +0 -1
  90. package/dist/client/types/app/bsky/system/actorUser.d.ts +0 -1
  91. package/dist/client/types/app/bsky/system/declRef.d.ts +0 -8
  92. package/dist/client/types/app/bsky/system/declaration.d.ts +0 -7
  93. package/dist/client/types/app/bsky/unspecced/applyLabels.d.ts +0 -18
  94. package/dist/client/types/app/bsky/unspecced/getPopular.d.ts +0 -22
  95. package/dist/client/types/app/bsky/unspecced/getTimelineSkeleton.d.ts +0 -24
  96. package/dist/client/types/com/atproto/account/create.d.ts +0 -41
  97. package/dist/client/types/com/atproto/account/createInviteCode.d.ts +0 -22
  98. package/dist/client/types/com/atproto/account/delete.d.ts +0 -25
  99. package/dist/client/types/com/atproto/account/get.d.ts +0 -12
  100. package/dist/client/types/com/atproto/account/requestDelete.d.ts +0 -13
  101. package/dist/client/types/com/atproto/account/requestPasswordReset.d.ts +0 -17
  102. package/dist/client/types/com/atproto/account/resetPassword.d.ts +0 -24
  103. package/dist/client/types/com/atproto/admin/blob.d.ts +0 -37
  104. package/dist/client/types/com/atproto/admin/createCommunicationTemplate.d.ts +0 -23
  105. package/dist/client/types/com/atproto/admin/deleteCommunicationTemplate.d.ts +0 -17
  106. package/dist/client/types/com/atproto/admin/emitModerationEvent.d.ts +0 -33
  107. package/dist/client/types/com/atproto/admin/getInviteCodeUsage.d.ts +0 -29
  108. package/dist/client/types/com/atproto/admin/getModerationAction.d.ts +0 -16
  109. package/dist/client/types/com/atproto/admin/getModerationActions.d.ts +0 -22
  110. package/dist/client/types/com/atproto/admin/getModerationEvent.d.ts +0 -16
  111. package/dist/client/types/com/atproto/admin/getModerationReport.d.ts +0 -16
  112. package/dist/client/types/com/atproto/admin/getModerationReports.d.ts +0 -28
  113. package/dist/client/types/com/atproto/admin/getRecord.d.ts +0 -20
  114. package/dist/client/types/com/atproto/admin/getRepo.d.ts +0 -19
  115. package/dist/client/types/com/atproto/admin/getSubjectState.d.ts +0 -26
  116. package/dist/client/types/com/atproto/admin/getUserAccountInfo.d.ts +0 -16
  117. package/dist/client/types/com/atproto/admin/listCommunicationTemplates.d.ts +0 -18
  118. package/dist/client/types/com/atproto/admin/moderationAction.d.ts +0 -60
  119. package/dist/client/types/com/atproto/admin/moderationReport.d.ts +0 -37
  120. package/dist/client/types/com/atproto/admin/queryModerationEvents.d.ts +0 -35
  121. package/dist/client/types/com/atproto/admin/queryModerationStatuses.d.ts +0 -37
  122. package/dist/client/types/com/atproto/admin/rebaseRepo.d.ts +0 -24
  123. package/dist/client/types/com/atproto/admin/record.d.ts +0 -43
  124. package/dist/client/types/com/atproto/admin/repo.d.ts +0 -45
  125. package/dist/client/types/com/atproto/admin/resolveModerationReports.d.ts +0 -22
  126. package/dist/client/types/com/atproto/admin/reverseModerationAction.d.ts +0 -22
  127. package/dist/client/types/com/atproto/admin/searchRepos.d.ts +0 -23
  128. package/dist/client/types/com/atproto/admin/takeModerationAction.d.ts +0 -34
  129. package/dist/client/types/com/atproto/admin/updateCommunicationTemplate.d.ts +0 -25
  130. package/dist/client/types/com/atproto/admin/updateSubjectState.d.ts +0 -32
  131. package/dist/client/types/com/atproto/blob/upload.d.ts +0 -19
  132. package/dist/client/types/com/atproto/handle/resolve.d.ts +0 -18
  133. package/dist/client/types/com/atproto/handle/update.d.ts +0 -17
  134. package/dist/client/types/com/atproto/repo/batchWrite.d.ts +0 -46
  135. package/dist/client/types/com/atproto/repo/describe.d.ts +0 -22
  136. package/dist/client/types/com/atproto/repo/rebaseRepo.d.ts +0 -24
  137. package/dist/client/types/com/atproto/repo/recordRef.d.ts +0 -8
  138. package/dist/client/types/com/atproto/repo/repoRef.d.ts +0 -7
  139. package/dist/client/types/com/atproto/repo/uploadRepo.d.ts +0 -19
  140. package/dist/client/types/com/atproto/report/create.d.ts +0 -39
  141. package/dist/client/types/com/atproto/report/reasonType.d.ts +0 -3
  142. package/dist/client/types/com/atproto/report/subject.d.ts +0 -23
  143. package/dist/client/types/com/atproto/server/getAccountsConfig.d.ts +0 -27
  144. package/dist/client/types/com/atproto/server/getUserInviteCodes.d.ts +0 -31
  145. package/dist/client/types/com/atproto/session/create.d.ts +0 -29
  146. package/dist/client/types/com/atproto/session/delete.d.ts +0 -13
  147. package/dist/client/types/com/atproto/session/get.d.ts +0 -18
  148. package/dist/client/types/com/atproto/session/refresh.d.ts +0 -24
  149. package/dist/client/types/com/atproto/sync/getCommitPath.d.ts +0 -20
  150. package/dist/client/types/com/atproto/sync/getCurrent.d.ts +0 -22
  151. package/dist/client/types/com/atproto/sync/getRoot.d.ts +0 -21
  152. package/dist/client/types/com/atproto/sync/importRepo.d.ts +0 -16
  153. package/dist/client/types/com/atproto/sync/subscribeAllRepos.d.ts +0 -9
  154. package/dist/client/types/com/atproto/sync/updateRepo.d.ts +0 -15
  155. package/dist/client/types/com/atproto/temp/importRepo.d.ts +0 -16
  156. package/dist/client/types/com/atproto/temp/pushBlob.d.ts +0 -15
  157. package/dist/client/types/com/atproto/temp/transferAccount.d.ts +0 -48
  158. package/dist/client/types/com/atproto/temp/upgradeRepoVersion.d.ts +0 -18
  159. package/dist/moderation/accumulator.d.ts +0 -16
  160. package/dist/moderation/const/label-groups.d.ts +0 -2
  161. package/dist/moderation/subjects/quoted-post.d.ts +0 -6
  162. package/dist/session.d.ts +0 -42
  163. package/dist/src/client/index.d.ts +0 -462
  164. package/dist/src/client/lexicons.d.ts +0 -2910
  165. package/dist/src/client/schemas.d.ts +0 -17
  166. package/dist/src/client/types/app/bsky/actor/createScene.d.ts +0 -32
  167. package/dist/src/client/types/app/bsky/actor/getProfile.d.ts +0 -36
  168. package/dist/src/client/types/app/bsky/actor/getSuggestions.d.ts +0 -36
  169. package/dist/src/client/types/app/bsky/actor/profile.d.ts +0 -15
  170. package/dist/src/client/types/app/bsky/actor/ref.d.ts +0 -14
  171. package/dist/src/client/types/app/bsky/actor/search.d.ts +0 -32
  172. package/dist/src/client/types/app/bsky/actor/searchTypeahead.d.ts +0 -28
  173. package/dist/src/client/types/app/bsky/actor/updateProfile.d.ts +0 -48
  174. package/dist/src/client/types/app/bsky/badge.d.ts +0 -22
  175. package/dist/src/client/types/app/bsky/badgeAccept.d.ts +0 -11
  176. package/dist/src/client/types/app/bsky/badgeOffer.d.ts +0 -11
  177. package/dist/src/client/types/app/bsky/declaration.d.ts +0 -6
  178. package/dist/src/client/types/app/bsky/embed/external.d.ts +0 -26
  179. package/dist/src/client/types/app/bsky/embed/images.d.ts +0 -23
  180. package/dist/src/client/types/app/bsky/feed/embed.d.ts +0 -36
  181. package/dist/src/client/types/app/bsky/feed/feedViewPost.d.ts +0 -26
  182. package/dist/src/client/types/app/bsky/feed/getAuthorFeed.d.ts +0 -22
  183. package/dist/src/client/types/app/bsky/feed/getPostThread.d.ts +0 -43
  184. package/dist/src/client/types/app/bsky/feed/getRepostedBy.d.ts +0 -35
  185. package/dist/src/client/types/app/bsky/feed/getTimeline.d.ts +0 -22
  186. package/dist/src/client/types/app/bsky/feed/getVotes.d.ts +0 -33
  187. package/dist/src/client/types/app/bsky/feed/mediaEmbed.d.ts +0 -18
  188. package/dist/src/client/types/app/bsky/feed/post.d.ts +0 -54
  189. package/dist/src/client/types/app/bsky/feed/repost.d.ts +0 -6
  190. package/dist/src/client/types/app/bsky/feed/setVote.d.ts +0 -25
  191. package/dist/src/client/types/app/bsky/feed/trend.d.ts +0 -6
  192. package/dist/src/client/types/app/bsky/feed/vote.d.ts +0 -7
  193. package/dist/src/client/types/app/bsky/follow.d.ts +0 -9
  194. package/dist/src/client/types/app/bsky/getAuthorFeed.d.ts +0 -56
  195. package/dist/src/client/types/app/bsky/getBadgeMembers.d.ts +0 -29
  196. package/dist/src/client/types/app/bsky/getHomeFeed.d.ts +0 -56
  197. package/dist/src/client/types/app/bsky/getLikedBy.d.ts +0 -29
  198. package/dist/src/client/types/app/bsky/getNotificationCount.d.ts +0 -16
  199. package/dist/src/client/types/app/bsky/getNotifications.d.ts +0 -33
  200. package/dist/src/client/types/app/bsky/getPostThread.d.ts +0 -55
  201. package/dist/src/client/types/app/bsky/getProfile.d.ts +0 -26
  202. package/dist/src/client/types/app/bsky/getRepostedBy.d.ts +0 -29
  203. package/dist/src/client/types/app/bsky/getTimeline.d.ts +0 -56
  204. package/dist/src/client/types/app/bsky/getUserFollowers.d.ts +0 -31
  205. package/dist/src/client/types/app/bsky/getUserFollows.d.ts +0 -31
  206. package/dist/src/client/types/app/bsky/getUsersSearch.d.ts +0 -26
  207. package/dist/src/client/types/app/bsky/getUsersTypeahead.d.ts +0 -22
  208. package/dist/src/client/types/app/bsky/graph/assertCreator.d.ts +0 -1
  209. package/dist/src/client/types/app/bsky/graph/assertMember.d.ts +0 -1
  210. package/dist/src/client/types/app/bsky/graph/assertion.d.ts +0 -7
  211. package/dist/src/client/types/app/bsky/graph/confirmation.d.ts +0 -8
  212. package/dist/src/client/types/app/bsky/graph/follow.d.ts +0 -6
  213. package/dist/src/client/types/app/bsky/graph/getAssertions.d.ts +0 -43
  214. package/dist/src/client/types/app/bsky/graph/getFollowers.d.ts +0 -34
  215. package/dist/src/client/types/app/bsky/graph/getFollows.d.ts +0 -33
  216. package/dist/src/client/types/app/bsky/graph/getMembers.d.ts +0 -33
  217. package/dist/src/client/types/app/bsky/graph/getMemberships.d.ts +0 -33
  218. package/dist/src/client/types/app/bsky/invite.d.ts +0 -10
  219. package/dist/src/client/types/app/bsky/inviteAccept.d.ts +0 -14
  220. package/dist/src/client/types/app/bsky/like.d.ts +0 -10
  221. package/dist/src/client/types/app/bsky/mediaEmbed.d.ts +0 -15
  222. package/dist/src/client/types/app/bsky/notification/getCount.d.ts +0 -17
  223. package/dist/src/client/types/app/bsky/notification/list.d.ts +0 -32
  224. package/dist/src/client/types/app/bsky/notification/updateSeen.d.ts +0 -17
  225. package/dist/src/client/types/app/bsky/post.d.ts +0 -23
  226. package/dist/src/client/types/app/bsky/postNotificationsSeen.d.ts +0 -20
  227. package/dist/src/client/types/app/bsky/profile.d.ts +0 -5
  228. package/dist/src/client/types/app/bsky/repost.d.ts +0 -10
  229. package/dist/src/client/types/app/bsky/system/actorScene.d.ts +0 -1
  230. package/dist/src/client/types/app/bsky/system/actorUser.d.ts +0 -1
  231. package/dist/src/client/types/app/bsky/system/declRef.d.ts +0 -5
  232. package/dist/src/client/types/app/bsky/system/declaration.d.ts +0 -4
  233. package/dist/src/client/types/app/bsky/updateProfile.d.ts +0 -23
  234. package/dist/src/client/types/com/atproto/account/create.d.ts +0 -41
  235. package/dist/src/client/types/com/atproto/account/createInviteCode.d.ts +0 -22
  236. package/dist/src/client/types/com/atproto/account/delete.d.ts +0 -13
  237. package/dist/src/client/types/com/atproto/account/get.d.ts +0 -12
  238. package/dist/src/client/types/com/atproto/account/requestPasswordReset.d.ts +0 -17
  239. package/dist/src/client/types/com/atproto/account/resetPassword.d.ts +0 -24
  240. package/dist/src/client/types/com/atproto/blob/upload.d.ts +0 -19
  241. package/dist/src/client/types/com/atproto/createAccount.d.ts +0 -40
  242. package/dist/src/client/types/com/atproto/createInviteCode.d.ts +0 -20
  243. package/dist/src/client/types/com/atproto/createSession.d.ts +0 -24
  244. package/dist/src/client/types/com/atproto/data/uploadFile.d.ts +0 -19
  245. package/dist/src/client/types/com/atproto/deleteAccount.d.ts +0 -20
  246. package/dist/src/client/types/com/atproto/deleteSession.d.ts +0 -17
  247. package/dist/src/client/types/com/atproto/getAccount.d.ts +0 -16
  248. package/dist/src/client/types/com/atproto/getAccountsConfig.d.ts +0 -17
  249. package/dist/src/client/types/com/atproto/getSession.d.ts +0 -17
  250. package/dist/src/client/types/com/atproto/handle/resolve.d.ts +0 -18
  251. package/dist/src/client/types/com/atproto/refreshSession.d.ts +0 -20
  252. package/dist/src/client/types/com/atproto/repo/batchWrite.d.ts +0 -39
  253. package/dist/src/client/types/com/atproto/repo/createRecord.d.ts +0 -26
  254. package/dist/src/client/types/com/atproto/repo/deleteRecord.d.ts +0 -19
  255. package/dist/src/client/types/com/atproto/repo/describe.d.ts +0 -22
  256. package/dist/src/client/types/com/atproto/repo/getRecord.d.ts +0 -23
  257. package/dist/src/client/types/com/atproto/repo/listRecords.d.ts +0 -30
  258. package/dist/src/client/types/com/atproto/repo/putRecord.d.ts +0 -27
  259. package/dist/src/client/types/com/atproto/repo/strongRef.d.ts +0 -5
  260. package/dist/src/client/types/com/atproto/repoBatchWrite.d.ts +0 -36
  261. package/dist/src/client/types/com/atproto/repoCreateRecord.d.ts +0 -24
  262. package/dist/src/client/types/com/atproto/repoDeleteRecord.d.ts +0 -18
  263. package/dist/src/client/types/com/atproto/repoDescribe.d.ts +0 -21
  264. package/dist/src/client/types/com/atproto/repoGetRecord.d.ts +0 -22
  265. package/dist/src/client/types/com/atproto/repoListRecords.d.ts +0 -27
  266. package/dist/src/client/types/com/atproto/repoPutRecord.d.ts +0 -25
  267. package/dist/src/client/types/com/atproto/requestAccountPasswordReset.d.ts +0 -19
  268. package/dist/src/client/types/com/atproto/resetAccountPassword.d.ts +0 -26
  269. package/dist/src/client/types/com/atproto/resolveHandle.d.ts +0 -17
  270. package/dist/src/client/types/com/atproto/resolveName.d.ts +0 -17
  271. package/dist/src/client/types/com/atproto/server/getAccountsConfig.d.ts +0 -24
  272. package/dist/src/client/types/com/atproto/session/create.d.ts +0 -26
  273. package/dist/src/client/types/com/atproto/session/delete.d.ts +0 -13
  274. package/dist/src/client/types/com/atproto/session/get.d.ts +0 -18
  275. package/dist/src/client/types/com/atproto/session/refresh.d.ts +0 -21
  276. package/dist/src/client/types/com/atproto/sync/getRepo.d.ts +0 -15
  277. package/dist/src/client/types/com/atproto/sync/getRoot.d.ts +0 -18
  278. package/dist/src/client/types/com/atproto/sync/updateRepo.d.ts +0 -15
  279. package/dist/src/client/types/com/atproto/syncGetRepo.d.ts +0 -15
  280. package/dist/src/client/types/com/atproto/syncGetRoot.d.ts +0 -17
  281. package/dist/src/client/types/com/atproto/syncUpdateRepo.d.ts +0 -15
  282. package/dist/src/index.d.ts +0 -4
  283. package/dist/src/schemas.d.ts +0 -19
  284. package/dist/src/session.d.ts +0 -42
  285. package/dist/src/types/app/bsky/acceptedBadge.d.ts +0 -10
  286. package/dist/src/types/app/bsky/badge.d.ts +0 -22
  287. package/dist/src/types/app/bsky/badgeAccept.d.ts +0 -11
  288. package/dist/src/types/app/bsky/badgeOffer.d.ts +0 -11
  289. package/dist/src/types/app/bsky/declaration.d.ts +0 -6
  290. package/dist/src/types/app/bsky/follow.d.ts +0 -9
  291. package/dist/src/types/app/bsky/getAuthorFeed.d.ts +0 -56
  292. package/dist/src/types/app/bsky/getBadgeMembers.d.ts +0 -29
  293. package/dist/src/types/app/bsky/getHomeFeed.d.ts +0 -56
  294. package/dist/src/types/app/bsky/getLikedBy.d.ts +0 -29
  295. package/dist/src/types/app/bsky/getNotificationCount.d.ts +0 -16
  296. package/dist/src/types/app/bsky/getNotifications.d.ts +0 -33
  297. package/dist/src/types/app/bsky/getPostThread.d.ts +0 -55
  298. package/dist/src/types/app/bsky/getProfile.d.ts +0 -42
  299. package/dist/src/types/app/bsky/getRepostedBy.d.ts +0 -29
  300. package/dist/src/types/app/bsky/getUserFollowers.d.ts +0 -31
  301. package/dist/src/types/app/bsky/getUserFollows.d.ts +0 -31
  302. package/dist/src/types/app/bsky/getUsersSearch.d.ts +0 -26
  303. package/dist/src/types/app/bsky/getUsersTypeahead.d.ts +0 -22
  304. package/dist/src/types/app/bsky/invite.d.ts +0 -10
  305. package/dist/src/types/app/bsky/inviteAccept.d.ts +0 -14
  306. package/dist/src/types/app/bsky/like.d.ts +0 -10
  307. package/dist/src/types/app/bsky/mediaEmbed.d.ts +0 -15
  308. package/dist/src/types/app/bsky/post.d.ts +0 -23
  309. package/dist/src/types/app/bsky/postNotificationsSeen.d.ts +0 -19
  310. package/dist/src/types/app/bsky/profile.d.ts +0 -11
  311. package/dist/src/types/app/bsky/repost.d.ts +0 -10
  312. package/dist/src/types/app/bsky/updateProfile.d.ts +0 -27
  313. package/dist/src/types/com/atproto/createAccount.d.ts +0 -39
  314. package/dist/src/types/com/atproto/createInviteCode.d.ts +0 -19
  315. package/dist/src/types/com/atproto/createSession.d.ts +0 -23
  316. package/dist/src/types/com/atproto/deleteAccount.d.ts +0 -19
  317. package/dist/src/types/com/atproto/deleteSession.d.ts +0 -16
  318. package/dist/src/types/com/atproto/getAccount.d.ts +0 -19
  319. package/dist/src/types/com/atproto/getAccountsConfig.d.ts +0 -17
  320. package/dist/src/types/com/atproto/getSession.d.ts +0 -17
  321. package/dist/src/types/com/atproto/refreshSession.d.ts +0 -19
  322. package/dist/src/types/com/atproto/repoBatchWrite.d.ts +0 -35
  323. package/dist/src/types/com/atproto/repoCreateRecord.d.ts +0 -23
  324. package/dist/src/types/com/atproto/repoDeleteRecord.d.ts +0 -15
  325. package/dist/src/types/com/atproto/repoDescribe.d.ts +0 -21
  326. package/dist/src/types/com/atproto/repoGetRecord.d.ts +0 -22
  327. package/dist/src/types/com/atproto/repoListRecords.d.ts +0 -27
  328. package/dist/src/types/com/atproto/repoPutRecord.d.ts +0 -24
  329. package/dist/src/types/com/atproto/requestAccountPasswordReset.d.ts +0 -18
  330. package/dist/src/types/com/atproto/resetAccountPassword.d.ts +0 -25
  331. package/dist/src/types/com/atproto/resolveName.d.ts +0 -17
  332. package/dist/src/types/com/atproto/syncGetRepo.d.ts +0 -15
  333. package/dist/src/types/com/atproto/syncGetRoot.d.ts +0 -17
  334. package/dist/src/types/com/atproto/syncUpdateRepo.d.ts +0 -14
  335. package/dist/src/types/todo/adx/createAccount.d.ts +0 -36
  336. package/dist/src/types/todo/adx/createInviteCode.d.ts +0 -19
  337. package/dist/src/types/todo/adx/createSession.d.ts +0 -22
  338. package/dist/src/types/todo/adx/deleteAccount.d.ts +0 -19
  339. package/dist/src/types/todo/adx/deleteSession.d.ts +0 -19
  340. package/dist/src/types/todo/adx/getAccount.d.ts +0 -19
  341. package/dist/src/types/todo/adx/getAccountsConfig.d.ts +0 -17
  342. package/dist/src/types/todo/adx/getSession.d.ts +0 -17
  343. package/dist/src/types/todo/adx/repoBatchWrite.d.ts +0 -34
  344. package/dist/src/types/todo/adx/repoCreateRecord.d.ts +0 -22
  345. package/dist/src/types/todo/adx/repoDeleteRecord.d.ts +0 -15
  346. package/dist/src/types/todo/adx/repoDescribe.d.ts +0 -21
  347. package/dist/src/types/todo/adx/repoGetRecord.d.ts +0 -20
  348. package/dist/src/types/todo/adx/repoListRecords.d.ts +0 -25
  349. package/dist/src/types/todo/adx/repoPutRecord.d.ts +0 -23
  350. package/dist/src/types/todo/adx/requestAccountPasswordReset.d.ts +0 -18
  351. package/dist/src/types/todo/adx/resetAccountPassword.d.ts +0 -25
  352. package/dist/src/types/todo/adx/resolveName.d.ts +0 -17
  353. package/dist/src/types/todo/adx/syncGetRepo.d.ts +0 -15
  354. package/dist/src/types/todo/adx/syncGetRoot.d.ts +0 -17
  355. package/dist/src/types/todo/adx/syncUpdateRepo.d.ts +0 -14
  356. package/dist/src/types/todo/social/badge.d.ts +0 -23
  357. package/dist/src/types/todo/social/follow.d.ts +0 -5
  358. package/dist/src/types/todo/social/getAuthorFeed.d.ts +0 -55
  359. package/dist/src/types/todo/social/getFeed.d.ts +0 -55
  360. package/dist/src/types/todo/social/getHomeFeed.d.ts +0 -55
  361. package/dist/src/types/todo/social/getLikedBy.d.ts +0 -26
  362. package/dist/src/types/todo/social/getNotificationCount.d.ts +0 -16
  363. package/dist/src/types/todo/social/getNotifications.d.ts +0 -31
  364. package/dist/src/types/todo/social/getPostThread.d.ts +0 -54
  365. package/dist/src/types/todo/social/getProfile.d.ts +0 -40
  366. package/dist/src/types/todo/social/getRepostedBy.d.ts +0 -26
  367. package/dist/src/types/todo/social/getUserFollowers.d.ts +0 -30
  368. package/dist/src/types/todo/social/getUserFollows.d.ts +0 -30
  369. package/dist/src/types/todo/social/like.d.ts +0 -5
  370. package/dist/src/types/todo/social/mediaEmbed.d.ts +0 -15
  371. package/dist/src/types/todo/social/post.d.ts +0 -18
  372. package/dist/src/types/todo/social/postNotificationsSeen.d.ts +0 -19
  373. package/dist/src/types/todo/social/profile.d.ts +0 -10
  374. package/dist/src/types/todo/social/repost.d.ts +0 -5
  375. package/docs/labels.md +0 -108
  376. package/scripts/docs/labels.mjs +0 -87
  377. 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
- - Moderator labeling
184
+ - Mutewords
185
+ - Hidden posts
184
186
 
185
- For more information, see the [Moderation Documentation](./docs/moderation.md) or the associated [Labels Reference](./docs/labels.md).
187
+ For more information, see the [Moderation Documentation](./docs/moderation.md).
186
188
 
187
189
  ```typescript
188
- import { moderatePost, moderateProfile } from '@atproto/api'
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, getOpts())
194
- const profileMod = moderateProfile(profileView, getOpts())
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
- if (postMod.content.filter) {
200
- // don't render in feeds or similar
201
- // in contexts where this is disruptive (eg threads) you should ignore this and instead check blur
210
+ // in feeds
211
+ if (postMod.ui('contentList').filter) {
212
+ // don't include in feeds
202
213
  }
203
- if (postMod.content.blur) {
204
- // render the whole object behind a cover (use postMod.content.cause to explain)
205
- if (postMod.content.noOverride) {
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.content.alert) {
210
- // render a warning on the content (use postMod.content.cause to explain)
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
- if (postMod.embed.blur) {
213
- // render the embedded media behind a cover (use postMod.embed.cause to explain)
214
- if (postMod.embed.noOverride) {
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.embed.alert) {
219
- // render a warning on the embedded media (use postMod.embed.cause to explain)
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
- // The options passed into `apply()` supply the user's preferences
229
- // =
230
-
231
- function getOpts() {
232
- return {
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
  ```
@@ -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": "warn",
188
- "flags": ["adult"],
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": "gore",
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
- private _baseClient;
10
- private _persistSession?;
11
- private _refreshSessionPromise;
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>;
@@ -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
- addModService(did: string): Promise<void>;
85
- removeModService(did: string): Promise<void>;
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
- modsPref: {
3656
+ labelersPref: {
3647
3657
  type: string;
3648
3658
  required: string[];
3649
3659
  properties: {
3650
- mods: {
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
- modPrefItem: {
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 ModsPref {
143
- mods: ModPrefItem[];
142
+ export interface LabelersPref {
143
+ labelers: LabelerPrefItem[];
144
144
  [k: string]: unknown;
145
145
  }
146
- export declare function isModsPref(v: unknown): v is ModsPref;
147
- export declare function validateModsPref(v: unknown): ValidationResult;
148
- export interface ModPrefItem {
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 isModPrefItem(v: unknown): v is ModPrefItem;
153
- export declare function validateModPrefItem(v: unknown): ValidationResult;
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 BSKY_MODSERVICE_DID = "did:plc:ar7c4by46qjdydhdevvrndac";
1
+ export declare const BSKY_LABELER_DID = "did:plc:ar7c4by46qjdydhdevvrndac";