@atproto/api 0.5.1 → 0.5.3

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 (238) hide show
  1. package/definitions/locale/en/labels.json +6 -6
  2. package/definitions/post-moderation-behaviors.json +139 -4
  3. package/dist/client/types/app/bsky/actor/updateProfile.d.ts +3 -10
  4. package/dist/client/types/app/bsky/{feed/getBookmarkedFeeds.d.ts → graph/getListBlocks.d.ts} +2 -2
  5. package/dist/client/types/app/bsky/graph/listblock.d.ts +8 -0
  6. package/dist/client/types/app/bsky/{feed/unbookmarkFeed.d.ts → graph/subscribeMuteList.d.ts} +1 -1
  7. package/dist/client/types/app/bsky/{feed/bookmarkFeed.d.ts → graph/unsubscribeMuteList.d.ts} +1 -1
  8. package/dist/helpers/bsky.d.ts +20 -0
  9. package/dist/index.js +9 -6
  10. package/dist/index.js.map +2 -2
  11. package/dist/mixins/bsky.d.ts +23 -0
  12. package/dist/rich-text/sanitize.d.ts +4 -0
  13. package/docs/labels.md +6 -6
  14. package/docs/moderation-behaviors/posts.md +335 -5
  15. package/package.json +1 -1
  16. package/src/moderation/const/labels.ts +6 -6
  17. package/src/moderation/index.ts +12 -9
  18. package/src/moderation/util.ts +9 -5
  19. package/tsconfig.build.tsbuildinfo +1 -1
  20. package/dist/client/types/app/bsky/actor/searchActor.d.ts +0 -22
  21. package/dist/client/types/app/bsky/actor/searchActorTypeahead.d.ts +0 -20
  22. package/dist/client/types/com/atproto/admin/getInviteCodeUsage.d.ts +0 -29
  23. package/dist/client/types/com/atproto/repo/importRepo.d.ts +0 -19
  24. package/dist/client/types/com/atproto/repo/uploadRepo.d.ts +0 -19
  25. package/dist/client/types/com/atproto/server/getUserInviteCodes.d.ts +0 -31
  26. package/dist/src/client/index.d.ts +0 -462
  27. package/dist/src/client/lexicons.d.ts +0 -2910
  28. package/dist/src/client/schemas.d.ts +0 -17
  29. package/dist/src/client/types/app/bsky/actor/createScene.d.ts +0 -32
  30. package/dist/src/client/types/app/bsky/actor/getProfile.d.ts +0 -36
  31. package/dist/src/client/types/app/bsky/actor/getSuggestions.d.ts +0 -36
  32. package/dist/src/client/types/app/bsky/actor/profile.d.ts +0 -15
  33. package/dist/src/client/types/app/bsky/actor/ref.d.ts +0 -14
  34. package/dist/src/client/types/app/bsky/actor/search.d.ts +0 -32
  35. package/dist/src/client/types/app/bsky/actor/searchTypeahead.d.ts +0 -28
  36. package/dist/src/client/types/app/bsky/actor/updateProfile.d.ts +0 -48
  37. package/dist/src/client/types/app/bsky/badge.d.ts +0 -22
  38. package/dist/src/client/types/app/bsky/badgeAccept.d.ts +0 -11
  39. package/dist/src/client/types/app/bsky/badgeOffer.d.ts +0 -11
  40. package/dist/src/client/types/app/bsky/declaration.d.ts +0 -6
  41. package/dist/src/client/types/app/bsky/embed/external.d.ts +0 -26
  42. package/dist/src/client/types/app/bsky/embed/images.d.ts +0 -23
  43. package/dist/src/client/types/app/bsky/feed/embed.d.ts +0 -36
  44. package/dist/src/client/types/app/bsky/feed/feedViewPost.d.ts +0 -26
  45. package/dist/src/client/types/app/bsky/feed/getAuthorFeed.d.ts +0 -22
  46. package/dist/src/client/types/app/bsky/feed/getPostThread.d.ts +0 -43
  47. package/dist/src/client/types/app/bsky/feed/getRepostedBy.d.ts +0 -35
  48. package/dist/src/client/types/app/bsky/feed/getTimeline.d.ts +0 -22
  49. package/dist/src/client/types/app/bsky/feed/getVotes.d.ts +0 -33
  50. package/dist/src/client/types/app/bsky/feed/mediaEmbed.d.ts +0 -18
  51. package/dist/src/client/types/app/bsky/feed/post.d.ts +0 -54
  52. package/dist/src/client/types/app/bsky/feed/repost.d.ts +0 -6
  53. package/dist/src/client/types/app/bsky/feed/setVote.d.ts +0 -25
  54. package/dist/src/client/types/app/bsky/feed/trend.d.ts +0 -6
  55. package/dist/src/client/types/app/bsky/feed/vote.d.ts +0 -7
  56. package/dist/src/client/types/app/bsky/follow.d.ts +0 -9
  57. package/dist/src/client/types/app/bsky/getAuthorFeed.d.ts +0 -56
  58. package/dist/src/client/types/app/bsky/getBadgeMembers.d.ts +0 -29
  59. package/dist/src/client/types/app/bsky/getHomeFeed.d.ts +0 -56
  60. package/dist/src/client/types/app/bsky/getLikedBy.d.ts +0 -29
  61. package/dist/src/client/types/app/bsky/getNotificationCount.d.ts +0 -16
  62. package/dist/src/client/types/app/bsky/getNotifications.d.ts +0 -33
  63. package/dist/src/client/types/app/bsky/getPostThread.d.ts +0 -55
  64. package/dist/src/client/types/app/bsky/getProfile.d.ts +0 -26
  65. package/dist/src/client/types/app/bsky/getRepostedBy.d.ts +0 -29
  66. package/dist/src/client/types/app/bsky/getTimeline.d.ts +0 -56
  67. package/dist/src/client/types/app/bsky/getUserFollowers.d.ts +0 -31
  68. package/dist/src/client/types/app/bsky/getUserFollows.d.ts +0 -31
  69. package/dist/src/client/types/app/bsky/getUsersSearch.d.ts +0 -26
  70. package/dist/src/client/types/app/bsky/getUsersTypeahead.d.ts +0 -22
  71. package/dist/src/client/types/app/bsky/graph/assertCreator.d.ts +0 -1
  72. package/dist/src/client/types/app/bsky/graph/assertMember.d.ts +0 -1
  73. package/dist/src/client/types/app/bsky/graph/assertion.d.ts +0 -7
  74. package/dist/src/client/types/app/bsky/graph/confirmation.d.ts +0 -8
  75. package/dist/src/client/types/app/bsky/graph/follow.d.ts +0 -6
  76. package/dist/src/client/types/app/bsky/graph/getAssertions.d.ts +0 -43
  77. package/dist/src/client/types/app/bsky/graph/getFollowers.d.ts +0 -34
  78. package/dist/src/client/types/app/bsky/graph/getFollows.d.ts +0 -33
  79. package/dist/src/client/types/app/bsky/graph/getMembers.d.ts +0 -33
  80. package/dist/src/client/types/app/bsky/graph/getMemberships.d.ts +0 -33
  81. package/dist/src/client/types/app/bsky/invite.d.ts +0 -10
  82. package/dist/src/client/types/app/bsky/inviteAccept.d.ts +0 -14
  83. package/dist/src/client/types/app/bsky/like.d.ts +0 -10
  84. package/dist/src/client/types/app/bsky/mediaEmbed.d.ts +0 -15
  85. package/dist/src/client/types/app/bsky/notification/getCount.d.ts +0 -17
  86. package/dist/src/client/types/app/bsky/notification/list.d.ts +0 -32
  87. package/dist/src/client/types/app/bsky/notification/updateSeen.d.ts +0 -17
  88. package/dist/src/client/types/app/bsky/post.d.ts +0 -23
  89. package/dist/src/client/types/app/bsky/postNotificationsSeen.d.ts +0 -20
  90. package/dist/src/client/types/app/bsky/profile.d.ts +0 -5
  91. package/dist/src/client/types/app/bsky/repost.d.ts +0 -10
  92. package/dist/src/client/types/app/bsky/system/actorScene.d.ts +0 -1
  93. package/dist/src/client/types/app/bsky/system/actorUser.d.ts +0 -1
  94. package/dist/src/client/types/app/bsky/system/declRef.d.ts +0 -5
  95. package/dist/src/client/types/app/bsky/system/declaration.d.ts +0 -4
  96. package/dist/src/client/types/app/bsky/updateProfile.d.ts +0 -23
  97. package/dist/src/client/types/com/atproto/account/create.d.ts +0 -41
  98. package/dist/src/client/types/com/atproto/account/createInviteCode.d.ts +0 -22
  99. package/dist/src/client/types/com/atproto/account/delete.d.ts +0 -13
  100. package/dist/src/client/types/com/atproto/account/get.d.ts +0 -12
  101. package/dist/src/client/types/com/atproto/account/requestPasswordReset.d.ts +0 -17
  102. package/dist/src/client/types/com/atproto/account/resetPassword.d.ts +0 -24
  103. package/dist/src/client/types/com/atproto/blob/upload.d.ts +0 -19
  104. package/dist/src/client/types/com/atproto/createAccount.d.ts +0 -40
  105. package/dist/src/client/types/com/atproto/createInviteCode.d.ts +0 -20
  106. package/dist/src/client/types/com/atproto/createSession.d.ts +0 -24
  107. package/dist/src/client/types/com/atproto/data/uploadFile.d.ts +0 -19
  108. package/dist/src/client/types/com/atproto/deleteAccount.d.ts +0 -20
  109. package/dist/src/client/types/com/atproto/deleteSession.d.ts +0 -17
  110. package/dist/src/client/types/com/atproto/getAccount.d.ts +0 -16
  111. package/dist/src/client/types/com/atproto/getAccountsConfig.d.ts +0 -17
  112. package/dist/src/client/types/com/atproto/getSession.d.ts +0 -17
  113. package/dist/src/client/types/com/atproto/handle/resolve.d.ts +0 -18
  114. package/dist/src/client/types/com/atproto/refreshSession.d.ts +0 -20
  115. package/dist/src/client/types/com/atproto/repo/batchWrite.d.ts +0 -39
  116. package/dist/src/client/types/com/atproto/repo/createRecord.d.ts +0 -26
  117. package/dist/src/client/types/com/atproto/repo/deleteRecord.d.ts +0 -19
  118. package/dist/src/client/types/com/atproto/repo/describe.d.ts +0 -22
  119. package/dist/src/client/types/com/atproto/repo/getRecord.d.ts +0 -23
  120. package/dist/src/client/types/com/atproto/repo/listRecords.d.ts +0 -30
  121. package/dist/src/client/types/com/atproto/repo/putRecord.d.ts +0 -27
  122. package/dist/src/client/types/com/atproto/repo/strongRef.d.ts +0 -5
  123. package/dist/src/client/types/com/atproto/repoBatchWrite.d.ts +0 -36
  124. package/dist/src/client/types/com/atproto/repoCreateRecord.d.ts +0 -24
  125. package/dist/src/client/types/com/atproto/repoDeleteRecord.d.ts +0 -18
  126. package/dist/src/client/types/com/atproto/repoDescribe.d.ts +0 -21
  127. package/dist/src/client/types/com/atproto/repoGetRecord.d.ts +0 -22
  128. package/dist/src/client/types/com/atproto/repoListRecords.d.ts +0 -27
  129. package/dist/src/client/types/com/atproto/repoPutRecord.d.ts +0 -25
  130. package/dist/src/client/types/com/atproto/requestAccountPasswordReset.d.ts +0 -19
  131. package/dist/src/client/types/com/atproto/resetAccountPassword.d.ts +0 -26
  132. package/dist/src/client/types/com/atproto/resolveHandle.d.ts +0 -17
  133. package/dist/src/client/types/com/atproto/resolveName.d.ts +0 -17
  134. package/dist/src/client/types/com/atproto/server/getAccountsConfig.d.ts +0 -24
  135. package/dist/src/client/types/com/atproto/session/create.d.ts +0 -26
  136. package/dist/src/client/types/com/atproto/session/delete.d.ts +0 -13
  137. package/dist/src/client/types/com/atproto/session/get.d.ts +0 -18
  138. package/dist/src/client/types/com/atproto/session/refresh.d.ts +0 -21
  139. package/dist/src/client/types/com/atproto/sync/getRepo.d.ts +0 -15
  140. package/dist/src/client/types/com/atproto/sync/getRoot.d.ts +0 -18
  141. package/dist/src/client/types/com/atproto/sync/updateRepo.d.ts +0 -15
  142. package/dist/src/client/types/com/atproto/syncGetRepo.d.ts +0 -15
  143. package/dist/src/client/types/com/atproto/syncGetRoot.d.ts +0 -17
  144. package/dist/src/client/types/com/atproto/syncUpdateRepo.d.ts +0 -15
  145. package/dist/src/index.d.ts +0 -4
  146. package/dist/src/schemas.d.ts +0 -19
  147. package/dist/src/session.d.ts +0 -42
  148. package/dist/src/types/app/bsky/acceptedBadge.d.ts +0 -10
  149. package/dist/src/types/app/bsky/badge.d.ts +0 -22
  150. package/dist/src/types/app/bsky/badgeAccept.d.ts +0 -11
  151. package/dist/src/types/app/bsky/badgeOffer.d.ts +0 -11
  152. package/dist/src/types/app/bsky/declaration.d.ts +0 -6
  153. package/dist/src/types/app/bsky/follow.d.ts +0 -9
  154. package/dist/src/types/app/bsky/getAuthorFeed.d.ts +0 -56
  155. package/dist/src/types/app/bsky/getBadgeMembers.d.ts +0 -29
  156. package/dist/src/types/app/bsky/getHomeFeed.d.ts +0 -56
  157. package/dist/src/types/app/bsky/getLikedBy.d.ts +0 -29
  158. package/dist/src/types/app/bsky/getNotificationCount.d.ts +0 -16
  159. package/dist/src/types/app/bsky/getNotifications.d.ts +0 -33
  160. package/dist/src/types/app/bsky/getPostThread.d.ts +0 -55
  161. package/dist/src/types/app/bsky/getProfile.d.ts +0 -42
  162. package/dist/src/types/app/bsky/getRepostedBy.d.ts +0 -29
  163. package/dist/src/types/app/bsky/getUserFollowers.d.ts +0 -31
  164. package/dist/src/types/app/bsky/getUserFollows.d.ts +0 -31
  165. package/dist/src/types/app/bsky/getUsersSearch.d.ts +0 -26
  166. package/dist/src/types/app/bsky/getUsersTypeahead.d.ts +0 -22
  167. package/dist/src/types/app/bsky/invite.d.ts +0 -10
  168. package/dist/src/types/app/bsky/inviteAccept.d.ts +0 -14
  169. package/dist/src/types/app/bsky/like.d.ts +0 -10
  170. package/dist/src/types/app/bsky/mediaEmbed.d.ts +0 -15
  171. package/dist/src/types/app/bsky/post.d.ts +0 -23
  172. package/dist/src/types/app/bsky/postNotificationsSeen.d.ts +0 -19
  173. package/dist/src/types/app/bsky/profile.d.ts +0 -11
  174. package/dist/src/types/app/bsky/repost.d.ts +0 -10
  175. package/dist/src/types/app/bsky/updateProfile.d.ts +0 -27
  176. package/dist/src/types/com/atproto/createAccount.d.ts +0 -39
  177. package/dist/src/types/com/atproto/createInviteCode.d.ts +0 -19
  178. package/dist/src/types/com/atproto/createSession.d.ts +0 -23
  179. package/dist/src/types/com/atproto/deleteAccount.d.ts +0 -19
  180. package/dist/src/types/com/atproto/deleteSession.d.ts +0 -16
  181. package/dist/src/types/com/atproto/getAccount.d.ts +0 -19
  182. package/dist/src/types/com/atproto/getAccountsConfig.d.ts +0 -17
  183. package/dist/src/types/com/atproto/getSession.d.ts +0 -17
  184. package/dist/src/types/com/atproto/refreshSession.d.ts +0 -19
  185. package/dist/src/types/com/atproto/repoBatchWrite.d.ts +0 -35
  186. package/dist/src/types/com/atproto/repoCreateRecord.d.ts +0 -23
  187. package/dist/src/types/com/atproto/repoDeleteRecord.d.ts +0 -15
  188. package/dist/src/types/com/atproto/repoDescribe.d.ts +0 -21
  189. package/dist/src/types/com/atproto/repoGetRecord.d.ts +0 -22
  190. package/dist/src/types/com/atproto/repoListRecords.d.ts +0 -27
  191. package/dist/src/types/com/atproto/repoPutRecord.d.ts +0 -24
  192. package/dist/src/types/com/atproto/requestAccountPasswordReset.d.ts +0 -18
  193. package/dist/src/types/com/atproto/resetAccountPassword.d.ts +0 -25
  194. package/dist/src/types/com/atproto/resolveName.d.ts +0 -17
  195. package/dist/src/types/com/atproto/syncGetRepo.d.ts +0 -15
  196. package/dist/src/types/com/atproto/syncGetRoot.d.ts +0 -17
  197. package/dist/src/types/com/atproto/syncUpdateRepo.d.ts +0 -14
  198. package/dist/src/types/todo/adx/createAccount.d.ts +0 -36
  199. package/dist/src/types/todo/adx/createInviteCode.d.ts +0 -19
  200. package/dist/src/types/todo/adx/createSession.d.ts +0 -22
  201. package/dist/src/types/todo/adx/deleteAccount.d.ts +0 -19
  202. package/dist/src/types/todo/adx/deleteSession.d.ts +0 -19
  203. package/dist/src/types/todo/adx/getAccount.d.ts +0 -19
  204. package/dist/src/types/todo/adx/getAccountsConfig.d.ts +0 -17
  205. package/dist/src/types/todo/adx/getSession.d.ts +0 -17
  206. package/dist/src/types/todo/adx/repoBatchWrite.d.ts +0 -34
  207. package/dist/src/types/todo/adx/repoCreateRecord.d.ts +0 -22
  208. package/dist/src/types/todo/adx/repoDeleteRecord.d.ts +0 -15
  209. package/dist/src/types/todo/adx/repoDescribe.d.ts +0 -21
  210. package/dist/src/types/todo/adx/repoGetRecord.d.ts +0 -20
  211. package/dist/src/types/todo/adx/repoListRecords.d.ts +0 -25
  212. package/dist/src/types/todo/adx/repoPutRecord.d.ts +0 -23
  213. package/dist/src/types/todo/adx/requestAccountPasswordReset.d.ts +0 -18
  214. package/dist/src/types/todo/adx/resetAccountPassword.d.ts +0 -25
  215. package/dist/src/types/todo/adx/resolveName.d.ts +0 -17
  216. package/dist/src/types/todo/adx/syncGetRepo.d.ts +0 -15
  217. package/dist/src/types/todo/adx/syncGetRoot.d.ts +0 -17
  218. package/dist/src/types/todo/adx/syncUpdateRepo.d.ts +0 -14
  219. package/dist/src/types/todo/social/badge.d.ts +0 -23
  220. package/dist/src/types/todo/social/follow.d.ts +0 -5
  221. package/dist/src/types/todo/social/getAuthorFeed.d.ts +0 -55
  222. package/dist/src/types/todo/social/getFeed.d.ts +0 -55
  223. package/dist/src/types/todo/social/getHomeFeed.d.ts +0 -55
  224. package/dist/src/types/todo/social/getLikedBy.d.ts +0 -26
  225. package/dist/src/types/todo/social/getNotificationCount.d.ts +0 -16
  226. package/dist/src/types/todo/social/getNotifications.d.ts +0 -31
  227. package/dist/src/types/todo/social/getPostThread.d.ts +0 -54
  228. package/dist/src/types/todo/social/getProfile.d.ts +0 -40
  229. package/dist/src/types/todo/social/getRepostedBy.d.ts +0 -26
  230. package/dist/src/types/todo/social/getUserFollowers.d.ts +0 -30
  231. package/dist/src/types/todo/social/getUserFollows.d.ts +0 -30
  232. package/dist/src/types/todo/social/like.d.ts +0 -5
  233. package/dist/src/types/todo/social/mediaEmbed.d.ts +0 -15
  234. package/dist/src/types/todo/social/post.d.ts +0 -18
  235. package/dist/src/types/todo/social/postNotificationsSeen.d.ts +0 -19
  236. package/dist/src/types/todo/social/profile.d.ts +0 -10
  237. package/dist/src/types/todo/social/repost.d.ts +0 -5
  238. package/dist/tsconfig.build.tsbuildinfo +0 -1
@@ -0,0 +1,23 @@
1
+ import { AtpAgentType } from '../types';
2
+ export declare function addBsky<TBase extends AtpAgentType>(Base: TBase): {
3
+ new (...args: any[]): {
4
+ like(uri: string, cid: string): Promise<{
5
+ uri: string;
6
+ cid: string;
7
+ }>;
8
+ unlike(likeUri: string): Promise<void>;
9
+ repost(uri: string, cid: string): Promise<{
10
+ uri: string;
11
+ cid: string;
12
+ }>;
13
+ unrepost(repostUri: string): Promise<void>;
14
+ follow(subjectDid: string): Promise<{
15
+ uri: string;
16
+ cid: string;
17
+ }>;
18
+ unfollow(followUri: string): Promise<void>;
19
+ service: URL;
20
+ api: import("..").AtpServiceClient;
21
+ session?: import("../types").AtpSessionData | undefined;
22
+ };
23
+ } & TBase;
@@ -0,0 +1,4 @@
1
+ import { RichText } from './rich-text';
2
+ export declare function sanitizeRichText(richText: RichText, opts: {
3
+ cleanNewlines?: boolean;
4
+ }): RichText;
package/docs/labels.md CHANGED
@@ -355,24 +355,24 @@
355
355
  <td>porn</td>
356
356
  <td>
357
357
  <code>general</code><br><strong>Pornography</strong><br>Images of full-frontal nudity (genitalia) in any sexualized context, or explicit sexual activity (meaning contact with genitalia or breasts) even if partially covered. Includes graphic sexual cartoons (often jokes/memes).<br><br>
358
- <code>on an account</code><br><strong>Pornography</strong><br>This account contains imagery of full-frontal nudity or explicit sexual activity.<br><br>
359
- <code>on content</code><br><strong>Pornography</strong><br>This content contains imagery of full-frontal nudity or explicit sexual activity.<br><br>
358
+ <code>on an account</code><br><strong>Adult Content</strong><br>This account contains imagery of full-frontal nudity or explicit sexual activity.<br><br>
359
+ <code>on content</code><br><strong>Adult Content</strong><br>This content contains imagery of full-frontal nudity or explicit sexual activity.<br><br>
360
360
  </td>
361
361
  </tr>
362
362
  <tr>
363
363
  <td>sexual</td>
364
364
  <td>
365
365
  <code>general</code><br><strong>Sexually Suggestive</strong><br>Content that does not meet the level of "pornography", but is still sexual. Some common examples have been selfies and "hornyposting" with underwear on, or partially naked (naked but covered, eg with hands or from side perspective). Sheer/see-through nipples may end up in this category.<br><br>
366
- <code>on an account</code><br><strong>Sexually Suggestive</strong><br>This account contains imagery which is sexually suggestive. Common examples include selfies in underwear or in partial undress.<br><br>
367
- <code>on content</code><br><strong>Sexually Suggestive</strong><br>This content contains imagery which is sexually suggestive. Common examples include selfies in underwear or in partial undress.<br><br>
366
+ <code>on an account</code><br><strong>Suggestive Content</strong><br>This account contains imagery which is sexually suggestive. Common examples include selfies in underwear or in partial undress.<br><br>
367
+ <code>on content</code><br><strong>Suggestive Content</strong><br>This content contains imagery which is sexually suggestive. Common examples include selfies in underwear or in partial undress.<br><br>
368
368
  </td>
369
369
  </tr>
370
370
  <tr>
371
371
  <td>nudity</td>
372
372
  <td>
373
373
  <code>general</code><br><strong>Nudity</strong><br>Nudity which is not sexual, or that is primarily "artistic" in nature. For example: breastfeeding; classic art paintings and sculptures; newspaper images with some nudity; fashion modeling. "Erotic photography" is likely to end up in sexual or porn.<br><br>
374
- <code>on an account</code><br><strong>Nudity</strong><br>This account contains imagery which portrays nudity in a non-sexual or artistic setting.<br><br>
375
- <code>on content</code><br><strong>Nudity</strong><br>This content contains imagery which portrays nudity in a non-sexual or artistic setting.<br><br>
374
+ <code>on an account</code><br><strong>Adult Content</strong><br>This account contains imagery which portrays nudity in a non-sexual or artistic setting.<br><br>
375
+ <code>on content</code><br><strong>Adult Content</strong><br>This content contains imagery which portrays nudity in a non-sexual or artistic setting.<br><br>
376
376
  </td>
377
377
  </tr>
378
378
  <tr>
@@ -767,7 +767,7 @@ Key:
767
767
 
768
768
  </td>
769
769
  <td>
770
-
770
+
771
771
 
772
772
  </td>
773
773
  </tr>
@@ -877,7 +877,7 @@ Key:
877
877
 
878
878
  </td>
879
879
  <td>
880
-
880
+
881
881
 
882
882
  </td>
883
883
  </tr>
@@ -1427,7 +1427,7 @@ Key:
1427
1427
 
1428
1428
  </td>
1429
1429
  <td>
1430
-
1430
+ 🚫
1431
1431
 
1432
1432
  </td>
1433
1433
  </tr>
@@ -1463,8 +1463,8 @@ Key:
1463
1463
 
1464
1464
  </td>
1465
1465
  <td>
1466
+
1466
1467
 
1467
- 🪧
1468
1468
  </td>
1469
1469
  <td>
1470
1470
 
@@ -1537,8 +1537,8 @@ Key:
1537
1537
 
1538
1538
  </td>
1539
1539
  <td>
1540
+
1540
1541
 
1541
- 🪧
1542
1542
  </td>
1543
1543
  </tr>
1544
1544
 
@@ -1566,6 +1566,336 @@ Key:
1566
1566
 
1567
1567
 
1568
1568
 
1569
+
1570
+ <tr>
1571
+ <td><strong>Self-post: Imperative label ('!warn') on post</strong></td>
1572
+ <td>
1573
+
1574
+ </td>
1575
+ <td>
1576
+
1577
+
1578
+ </td>
1579
+ <td>
1580
+
1581
+
1582
+ </td>
1583
+ <td>
1584
+
1585
+
1586
+ </td>
1587
+ </tr>
1588
+
1589
+
1590
+
1591
+
1592
+ <tr>
1593
+ <td><strong>Self-post: Imperative label ('!warn') on author profile</strong></td>
1594
+ <td>
1595
+
1596
+ </td>
1597
+ <td>
1598
+
1599
+
1600
+ </td>
1601
+ <td>
1602
+
1603
+
1604
+ </td>
1605
+ <td>
1606
+
1607
+
1608
+ </td>
1609
+ </tr>
1610
+
1611
+
1612
+
1613
+
1614
+ <tr>
1615
+ <td><strong>Self-post: Imperative label ('!warn') on author account</strong></td>
1616
+ <td>
1617
+
1618
+ </td>
1619
+ <td>
1620
+
1621
+
1622
+ </td>
1623
+ <td>
1624
+
1625
+
1626
+ </td>
1627
+ <td>
1628
+
1629
+
1630
+ </td>
1631
+ </tr>
1632
+
1633
+
1634
+
1635
+
1636
+ <tr>
1637
+ <td><strong>Self-post: Imperative label ('!warn') on quoted post</strong></td>
1638
+ <td>
1639
+
1640
+ </td>
1641
+ <td>
1642
+
1643
+
1644
+ </td>
1645
+ <td>
1646
+
1647
+
1648
+ </td>
1649
+ <td>
1650
+
1651
+
1652
+ </td>
1653
+ </tr>
1654
+
1655
+
1656
+
1657
+
1658
+ <tr>
1659
+ <td><strong>Self-post: Imperative label ('!warn') on quoted author account</strong></td>
1660
+ <td>
1661
+
1662
+ </td>
1663
+ <td>
1664
+
1665
+
1666
+ </td>
1667
+ <td>
1668
+
1669
+
1670
+ </td>
1671
+ <td>
1672
+
1673
+
1674
+ </td>
1675
+ </tr>
1676
+
1677
+
1678
+
1679
+
1680
+ <tr>
1681
+ <td><strong>Self-post: Blur-media label ('porn') on post (hide)</strong></td>
1682
+ <td>
1683
+
1684
+ </td>
1685
+ <td>
1686
+
1687
+
1688
+ </td>
1689
+ <td>
1690
+
1691
+
1692
+ </td>
1693
+ <td>
1694
+
1695
+
1696
+ </td>
1697
+ </tr>
1698
+
1699
+
1700
+
1701
+
1702
+ <tr>
1703
+ <td><strong>Self-post: Blur-media label ('porn') on author profile (hide)</strong></td>
1704
+ <td>
1705
+
1706
+ </td>
1707
+ <td>
1708
+
1709
+
1710
+ </td>
1711
+ <td>
1712
+
1713
+
1714
+ </td>
1715
+ <td>
1716
+
1717
+
1718
+ </td>
1719
+ </tr>
1720
+
1721
+
1722
+
1723
+
1724
+ <tr>
1725
+ <td><strong>Self-post: Blur-media label ('porn') on author account (hide)</strong></td>
1726
+ <td>
1727
+
1728
+ </td>
1729
+ <td>
1730
+
1731
+
1732
+ </td>
1733
+ <td>
1734
+
1735
+
1736
+ </td>
1737
+ <td>
1738
+
1739
+
1740
+ </td>
1741
+ </tr>
1742
+
1743
+
1744
+
1745
+
1746
+ <tr>
1747
+ <td><strong>Self-post: Blur-media label ('porn') on quoted post (hide)</strong></td>
1748
+ <td>
1749
+
1750
+ </td>
1751
+ <td>
1752
+
1753
+
1754
+ </td>
1755
+ <td>
1756
+
1757
+
1758
+ </td>
1759
+ <td>
1760
+
1761
+
1762
+ </td>
1763
+ </tr>
1764
+
1765
+
1766
+
1767
+
1768
+ <tr>
1769
+ <td><strong>Self-post: Blur-media label ('porn') on quoted author account (hide)</strong></td>
1770
+ <td>
1771
+
1772
+ </td>
1773
+ <td>
1774
+
1775
+
1776
+ </td>
1777
+ <td>
1778
+
1779
+
1780
+ </td>
1781
+ <td>
1782
+
1783
+
1784
+ </td>
1785
+ </tr>
1786
+
1787
+
1788
+
1789
+
1790
+ <tr>
1791
+ <td><strong>Self-post: Blur-media label ('porn') on post (warn)</strong></td>
1792
+ <td>
1793
+
1794
+ </td>
1795
+ <td>
1796
+
1797
+
1798
+ </td>
1799
+ <td>
1800
+
1801
+
1802
+ </td>
1803
+ <td>
1804
+
1805
+
1806
+ </td>
1807
+ </tr>
1808
+
1809
+
1810
+
1811
+
1812
+ <tr>
1813
+ <td><strong>Self-post: Blur-media label ('porn') on author profile (warn)</strong></td>
1814
+ <td>
1815
+
1816
+ </td>
1817
+ <td>
1818
+
1819
+
1820
+ </td>
1821
+ <td>
1822
+
1823
+
1824
+ </td>
1825
+ <td>
1826
+
1827
+
1828
+ </td>
1829
+ </tr>
1830
+
1831
+
1832
+
1833
+
1834
+ <tr>
1835
+ <td><strong>Self-post: Blur-media label ('porn') on author account (warn)</strong></td>
1836
+ <td>
1837
+
1838
+ </td>
1839
+ <td>
1840
+
1841
+
1842
+ </td>
1843
+ <td>
1844
+
1845
+
1846
+ </td>
1847
+ <td>
1848
+
1849
+
1850
+ </td>
1851
+ </tr>
1852
+
1853
+
1854
+
1855
+
1856
+ <tr>
1857
+ <td><strong>Self-post: Blur-media label ('porn') on quoted post (warn)</strong></td>
1858
+ <td>
1859
+
1860
+ </td>
1861
+ <td>
1862
+
1863
+
1864
+ </td>
1865
+ <td>
1866
+
1867
+
1868
+ </td>
1869
+ <td>
1870
+
1871
+
1872
+ </td>
1873
+ </tr>
1874
+
1875
+
1876
+
1877
+
1878
+ <tr>
1879
+ <td><strong>Self-post: Blur-media label ('porn') on quoted author account (warn)</strong></td>
1880
+ <td>
1881
+
1882
+ </td>
1883
+ <td>
1884
+
1885
+
1886
+ </td>
1887
+ <td>
1888
+
1889
+
1890
+ </td>
1891
+ <td>
1892
+
1893
+
1894
+ </td>
1895
+ </tr>
1896
+
1897
+
1898
+
1569
1899
  <tr><th>Scenario</th><th>Filter</th><th>Content</th><th>Avatar</th><th>Embed</th></tr>
1570
1900
  <tr>
1571
1901
  <td><strong>Post with blocked author</strong></td>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atproto/api",
3
- "version": "0.5.1",
3
+ "version": "0.5.3",
4
4
  "main": "dist/index.js",
5
5
  "scripts": {
6
6
  "codegen": "yarn docgen && node ./scripts/generate-code.mjs && lex gen-api ./src/client ../../lexicons/com/atproto/*/* ../../lexicons/app/bsky/*/*",
@@ -167,14 +167,14 @@ export const LABELS: LabelDefinitionMap = {
167
167
  },
168
168
  account: {
169
169
  en: {
170
- name: 'Pornography',
170
+ name: 'Adult Content',
171
171
  description:
172
172
  'This account contains imagery of full-frontal nudity or explicit sexual activity.',
173
173
  },
174
174
  },
175
175
  content: {
176
176
  en: {
177
- name: 'Pornography',
177
+ name: 'Adult Content',
178
178
  description:
179
179
  'This content contains imagery of full-frontal nudity or explicit sexual activity.',
180
180
  },
@@ -198,14 +198,14 @@ export const LABELS: LabelDefinitionMap = {
198
198
  },
199
199
  account: {
200
200
  en: {
201
- name: 'Sexually Suggestive',
201
+ name: 'Suggestive Content',
202
202
  description:
203
203
  'This account contains imagery which is sexually suggestive. Common examples include selfies in underwear or in partial undress.',
204
204
  },
205
205
  },
206
206
  content: {
207
207
  en: {
208
- name: 'Sexually Suggestive',
208
+ name: 'Suggestive Content',
209
209
  description:
210
210
  'This content contains imagery which is sexually suggestive. Common examples include selfies in underwear or in partial undress.',
211
211
  },
@@ -229,14 +229,14 @@ export const LABELS: LabelDefinitionMap = {
229
229
  },
230
230
  account: {
231
231
  en: {
232
- name: 'Nudity',
232
+ name: 'Adult Content',
233
233
  description:
234
234
  'This account contains imagery which portrays nudity in a non-sexual or artistic setting.',
235
235
  },
236
236
  },
237
237
  content: {
238
238
  en: {
239
- name: 'Nudity',
239
+ name: 'Adult Content',
240
240
  description:
241
241
  'This content contains imagery which portrays nudity in a non-sexual or artistic setting.',
242
242
  },
@@ -61,10 +61,10 @@ export function moderateProfile(
61
61
 
62
62
  // downgrade based on authorship
63
63
  if (!isModerationDecisionNoop(account) && account.did === opts.userDid) {
64
- downgradeDecision(account, { alert: true })
64
+ downgradeDecision(account, 'alert')
65
65
  }
66
66
  if (!isModerationDecisionNoop(profile) && profile.did === opts.userDid) {
67
- downgradeDecision(profile, { alert: true })
67
+ downgradeDecision(profile, 'alert')
68
68
  }
69
69
 
70
70
  // derive avatar blurring from account & profile, but override for mutes because that shouldnt blur
@@ -148,26 +148,29 @@ export function moderatePost(
148
148
  quote = decideQuotedPostWithMedia(subject.embed, opts)
149
149
  quotedAccount = decideQuotedPostWithMediaAccount(subject.embed, opts)
150
150
  }
151
+ if (quote?.blurMedia) {
152
+ quote.blur = true // treat blurMedia of quote as blur of quote
153
+ }
151
154
 
152
155
  // downgrade based on authorship
153
156
  if (!isModerationDecisionNoop(post) && post.did === opts.userDid) {
154
- downgradeDecision(post, { alert: true })
157
+ downgradeDecision(post, 'blur')
155
158
  }
156
- if (!isModerationDecisionNoop(account) && account.did === opts.userDid) {
157
- downgradeDecision(account, { alert: false })
159
+ if (account.cause && account.did === opts.userDid) {
160
+ downgradeDecision(account, 'noop')
158
161
  }
159
- if (!isModerationDecisionNoop(profile) && profile.did === opts.userDid) {
160
- downgradeDecision(profile, { alert: false })
162
+ if (profile.cause && profile.did === opts.userDid) {
163
+ downgradeDecision(profile, 'noop')
161
164
  }
162
165
  if (quote && !isModerationDecisionNoop(quote) && quote.did === opts.userDid) {
163
- downgradeDecision(quote, { alert: true })
166
+ downgradeDecision(quote, 'blur')
164
167
  }
165
168
  if (
166
169
  quotedAccount &&
167
170
  !isModerationDecisionNoop(quotedAccount) &&
168
171
  quotedAccount.did === opts.userDid
169
172
  ) {
170
- downgradeDecision(quotedAccount, { alert: false })
173
+ downgradeDecision(quotedAccount, 'noop')
171
174
  }
172
175
 
173
176
  // derive filtering from feeds from the post, post author's account,
@@ -34,15 +34,19 @@ export function takeHighestPriorityDecision(
34
34
 
35
35
  export function downgradeDecision(
36
36
  decision: ModerationDecision,
37
- { alert }: { alert: boolean },
37
+ to: 'blur' | 'alert' | 'noop',
38
38
  ) {
39
- decision.blur = false
40
- decision.blurMedia = false
41
39
  decision.filter = false
42
40
  decision.noOverride = false
43
- decision.alert = alert
44
- if (!alert) {
41
+ if (to === 'noop') {
42
+ decision.blur = false
43
+ decision.blurMedia = false
44
+ decision.alert = false
45
45
  delete decision.cause
46
+ } else if (to === 'alert') {
47
+ decision.blur = false
48
+ decision.blurMedia = false
49
+ decision.alert = true
46
50
  }
47
51
  }
48
52