@atproto/bsky 0.0.112 → 0.0.114

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 (625) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/bin/migration-create.ts +2 -2
  3. package/dist/api/app/bsky/actor/getProfile.d.ts +1 -1
  4. package/dist/api/app/bsky/actor/getProfile.d.ts.map +1 -1
  5. package/dist/api/app/bsky/actor/getProfile.js +1 -1
  6. package/dist/api/app/bsky/actor/getProfile.js.map +1 -1
  7. package/dist/api/app/bsky/actor/getProfiles.d.ts +1 -1
  8. package/dist/api/app/bsky/actor/getProfiles.d.ts.map +1 -1
  9. package/dist/api/app/bsky/actor/getProfiles.js +2 -2
  10. package/dist/api/app/bsky/actor/getProfiles.js.map +1 -1
  11. package/dist/api/app/bsky/actor/getSuggestions.d.ts +1 -1
  12. package/dist/api/app/bsky/actor/getSuggestions.d.ts.map +1 -1
  13. package/dist/api/app/bsky/actor/getSuggestions.js +1 -1
  14. package/dist/api/app/bsky/actor/getSuggestions.js.map +1 -1
  15. package/dist/api/app/bsky/actor/searchActors.d.ts +1 -1
  16. package/dist/api/app/bsky/actor/searchActors.d.ts.map +1 -1
  17. package/dist/api/app/bsky/actor/searchActors.js +1 -1
  18. package/dist/api/app/bsky/actor/searchActors.js.map +1 -1
  19. package/dist/api/app/bsky/actor/searchActorsTypeahead.d.ts +1 -1
  20. package/dist/api/app/bsky/actor/searchActorsTypeahead.d.ts.map +1 -1
  21. package/dist/api/app/bsky/actor/searchActorsTypeahead.js +1 -1
  22. package/dist/api/app/bsky/actor/searchActorsTypeahead.js.map +1 -1
  23. package/dist/api/app/bsky/feed/getActorFeeds.d.ts +1 -1
  24. package/dist/api/app/bsky/feed/getActorFeeds.d.ts.map +1 -1
  25. package/dist/api/app/bsky/feed/getActorFeeds.js +2 -2
  26. package/dist/api/app/bsky/feed/getActorFeeds.js.map +1 -1
  27. package/dist/api/app/bsky/feed/getActorLikes.d.ts +1 -1
  28. package/dist/api/app/bsky/feed/getActorLikes.d.ts.map +1 -1
  29. package/dist/api/app/bsky/feed/getActorLikes.js +6 -6
  30. package/dist/api/app/bsky/feed/getActorLikes.js.map +1 -1
  31. package/dist/api/app/bsky/feed/getAuthorFeed.d.ts +5 -5
  32. package/dist/api/app/bsky/feed/getAuthorFeed.d.ts.map +1 -1
  33. package/dist/api/app/bsky/feed/getAuthorFeed.js +11 -9
  34. package/dist/api/app/bsky/feed/getAuthorFeed.js.map +1 -1
  35. package/dist/api/app/bsky/feed/getFeed.d.ts +2 -2
  36. package/dist/api/app/bsky/feed/getFeed.d.ts.map +1 -1
  37. package/dist/api/app/bsky/feed/getFeed.js +6 -6
  38. package/dist/api/app/bsky/feed/getFeed.js.map +1 -1
  39. package/dist/api/app/bsky/feed/getFeedGenerator.d.ts +1 -1
  40. package/dist/api/app/bsky/feed/getFeedGenerator.d.ts.map +1 -1
  41. package/dist/api/app/bsky/feed/getFeedGenerator.js.map +1 -1
  42. package/dist/api/app/bsky/feed/getFeedGenerators.d.ts +1 -1
  43. package/dist/api/app/bsky/feed/getFeedGenerators.d.ts.map +1 -1
  44. package/dist/api/app/bsky/feed/getFeedGenerators.js.map +1 -1
  45. package/dist/api/app/bsky/feed/getLikes.d.ts +1 -1
  46. package/dist/api/app/bsky/feed/getLikes.d.ts.map +1 -1
  47. package/dist/api/app/bsky/feed/getLikes.js +2 -2
  48. package/dist/api/app/bsky/feed/getLikes.js.map +1 -1
  49. package/dist/api/app/bsky/feed/getListFeed.d.ts +4 -4
  50. package/dist/api/app/bsky/feed/getListFeed.d.ts.map +1 -1
  51. package/dist/api/app/bsky/feed/getListFeed.js +7 -7
  52. package/dist/api/app/bsky/feed/getListFeed.js.map +1 -1
  53. package/dist/api/app/bsky/feed/getPostThread.d.ts +1 -1
  54. package/dist/api/app/bsky/feed/getPostThread.d.ts.map +1 -1
  55. package/dist/api/app/bsky/feed/getPostThread.js +2 -2
  56. package/dist/api/app/bsky/feed/getPostThread.js.map +1 -1
  57. package/dist/api/app/bsky/feed/getPosts.d.ts +1 -1
  58. package/dist/api/app/bsky/feed/getPosts.d.ts.map +1 -1
  59. package/dist/api/app/bsky/feed/getPosts.js +1 -1
  60. package/dist/api/app/bsky/feed/getPosts.js.map +1 -1
  61. package/dist/api/app/bsky/feed/getQuotes.d.ts +1 -1
  62. package/dist/api/app/bsky/feed/getQuotes.d.ts.map +1 -1
  63. package/dist/api/app/bsky/feed/getQuotes.js +6 -6
  64. package/dist/api/app/bsky/feed/getQuotes.js.map +1 -1
  65. package/dist/api/app/bsky/feed/getRepostedBy.d.ts +1 -1
  66. package/dist/api/app/bsky/feed/getRepostedBy.d.ts.map +1 -1
  67. package/dist/api/app/bsky/feed/getRepostedBy.js +1 -1
  68. package/dist/api/app/bsky/feed/getRepostedBy.js.map +1 -1
  69. package/dist/api/app/bsky/feed/getSuggestedFeeds.d.ts +1 -1
  70. package/dist/api/app/bsky/feed/getSuggestedFeeds.d.ts.map +1 -1
  71. package/dist/api/app/bsky/feed/getSuggestedFeeds.js.map +1 -1
  72. package/dist/api/app/bsky/feed/getTimeline.d.ts +4 -4
  73. package/dist/api/app/bsky/feed/getTimeline.d.ts.map +1 -1
  74. package/dist/api/app/bsky/feed/getTimeline.js +6 -6
  75. package/dist/api/app/bsky/feed/getTimeline.js.map +1 -1
  76. package/dist/api/app/bsky/feed/searchPosts.d.ts +1 -1
  77. package/dist/api/app/bsky/feed/searchPosts.d.ts.map +1 -1
  78. package/dist/api/app/bsky/feed/searchPosts.js +1 -1
  79. package/dist/api/app/bsky/feed/searchPosts.js.map +1 -1
  80. package/dist/api/app/bsky/graph/getActorStarterPacks.d.ts +1 -1
  81. package/dist/api/app/bsky/graph/getActorStarterPacks.d.ts.map +1 -1
  82. package/dist/api/app/bsky/graph/getActorStarterPacks.js +5 -5
  83. package/dist/api/app/bsky/graph/getActorStarterPacks.js.map +1 -1
  84. package/dist/api/app/bsky/graph/getBlocks.d.ts +1 -1
  85. package/dist/api/app/bsky/graph/getBlocks.d.ts.map +1 -1
  86. package/dist/api/app/bsky/graph/getBlocks.js.map +1 -1
  87. package/dist/api/app/bsky/graph/getFollowers.d.ts +1 -1
  88. package/dist/api/app/bsky/graph/getFollowers.d.ts.map +1 -1
  89. package/dist/api/app/bsky/graph/getFollowers.js +1 -1
  90. package/dist/api/app/bsky/graph/getFollowers.js.map +1 -1
  91. package/dist/api/app/bsky/graph/getFollows.d.ts +1 -1
  92. package/dist/api/app/bsky/graph/getFollows.d.ts.map +1 -1
  93. package/dist/api/app/bsky/graph/getFollows.js +1 -1
  94. package/dist/api/app/bsky/graph/getFollows.js.map +1 -1
  95. package/dist/api/app/bsky/graph/getKnownFollowers.d.ts +1 -1
  96. package/dist/api/app/bsky/graph/getKnownFollowers.d.ts.map +1 -1
  97. package/dist/api/app/bsky/graph/getKnownFollowers.js.map +1 -1
  98. package/dist/api/app/bsky/graph/getList.d.ts +1 -1
  99. package/dist/api/app/bsky/graph/getList.d.ts.map +1 -1
  100. package/dist/api/app/bsky/graph/getList.js +2 -2
  101. package/dist/api/app/bsky/graph/getList.js.map +1 -1
  102. package/dist/api/app/bsky/graph/getListBlocks.d.ts +1 -1
  103. package/dist/api/app/bsky/graph/getListBlocks.d.ts.map +1 -1
  104. package/dist/api/app/bsky/graph/getListBlocks.js.map +1 -1
  105. package/dist/api/app/bsky/graph/getListMutes.d.ts +1 -1
  106. package/dist/api/app/bsky/graph/getListMutes.d.ts.map +1 -1
  107. package/dist/api/app/bsky/graph/getListMutes.js.map +1 -1
  108. package/dist/api/app/bsky/graph/getLists.d.ts +1 -1
  109. package/dist/api/app/bsky/graph/getLists.d.ts.map +1 -1
  110. package/dist/api/app/bsky/graph/getLists.js.map +1 -1
  111. package/dist/api/app/bsky/graph/getMutes.d.ts +1 -1
  112. package/dist/api/app/bsky/graph/getMutes.d.ts.map +1 -1
  113. package/dist/api/app/bsky/graph/getMutes.js.map +1 -1
  114. package/dist/api/app/bsky/graph/getRelationships.d.ts +1 -1
  115. package/dist/api/app/bsky/graph/getRelationships.d.ts.map +1 -1
  116. package/dist/api/app/bsky/graph/getStarterPack.d.ts +1 -1
  117. package/dist/api/app/bsky/graph/getStarterPack.d.ts.map +1 -1
  118. package/dist/api/app/bsky/graph/getStarterPack.js.map +1 -1
  119. package/dist/api/app/bsky/graph/getStarterPacks.d.ts +1 -1
  120. package/dist/api/app/bsky/graph/getStarterPacks.d.ts.map +1 -1
  121. package/dist/api/app/bsky/graph/getStarterPacks.js +1 -1
  122. package/dist/api/app/bsky/graph/getStarterPacks.js.map +1 -1
  123. package/dist/api/app/bsky/graph/getSuggestedFollowsByActor.d.ts +1 -1
  124. package/dist/api/app/bsky/graph/getSuggestedFollowsByActor.d.ts.map +1 -1
  125. package/dist/api/app/bsky/graph/getSuggestedFollowsByActor.js.map +1 -1
  126. package/dist/api/app/bsky/graph/muteActor.d.ts +1 -1
  127. package/dist/api/app/bsky/graph/muteActor.d.ts.map +1 -1
  128. package/dist/api/app/bsky/graph/muteActorList.d.ts +1 -1
  129. package/dist/api/app/bsky/graph/muteActorList.d.ts.map +1 -1
  130. package/dist/api/app/bsky/graph/muteThread.d.ts +1 -1
  131. package/dist/api/app/bsky/graph/muteThread.d.ts.map +1 -1
  132. package/dist/api/app/bsky/graph/searchStarterPacks.d.ts +1 -1
  133. package/dist/api/app/bsky/graph/searchStarterPacks.d.ts.map +1 -1
  134. package/dist/api/app/bsky/graph/searchStarterPacks.js +2 -2
  135. package/dist/api/app/bsky/graph/searchStarterPacks.js.map +1 -1
  136. package/dist/api/app/bsky/graph/unmuteActor.d.ts +1 -1
  137. package/dist/api/app/bsky/graph/unmuteActor.d.ts.map +1 -1
  138. package/dist/api/app/bsky/graph/unmuteActorList.d.ts +1 -1
  139. package/dist/api/app/bsky/graph/unmuteActorList.d.ts.map +1 -1
  140. package/dist/api/app/bsky/graph/unmuteThread.d.ts +1 -1
  141. package/dist/api/app/bsky/graph/unmuteThread.d.ts.map +1 -1
  142. package/dist/api/app/bsky/labeler/getServices.d.ts +1 -1
  143. package/dist/api/app/bsky/labeler/getServices.d.ts.map +1 -1
  144. package/dist/api/app/bsky/labeler/getServices.js.map +1 -1
  145. package/dist/api/app/bsky/notification/getUnreadCount.d.ts +1 -1
  146. package/dist/api/app/bsky/notification/getUnreadCount.d.ts.map +1 -1
  147. package/dist/api/app/bsky/notification/getUnreadCount.js.map +1 -1
  148. package/dist/api/app/bsky/notification/listNotifications.d.ts +1 -1
  149. package/dist/api/app/bsky/notification/listNotifications.d.ts.map +1 -1
  150. package/dist/api/app/bsky/notification/listNotifications.js +1 -1
  151. package/dist/api/app/bsky/notification/listNotifications.js.map +1 -1
  152. package/dist/api/app/bsky/notification/putPreferences.d.ts +1 -1
  153. package/dist/api/app/bsky/notification/putPreferences.d.ts.map +1 -1
  154. package/dist/api/app/bsky/notification/registerPush.d.ts +1 -1
  155. package/dist/api/app/bsky/notification/registerPush.d.ts.map +1 -1
  156. package/dist/api/app/bsky/notification/updateSeen.d.ts +1 -1
  157. package/dist/api/app/bsky/notification/updateSeen.d.ts.map +1 -1
  158. package/dist/api/app/bsky/notification/updateSeen.js +2 -5
  159. package/dist/api/app/bsky/notification/updateSeen.js.map +1 -1
  160. package/dist/api/app/bsky/unspecced/getConfig.d.ts +1 -1
  161. package/dist/api/app/bsky/unspecced/getConfig.d.ts.map +1 -1
  162. package/dist/api/app/bsky/unspecced/getPopularFeedGenerators.d.ts +1 -1
  163. package/dist/api/app/bsky/unspecced/getPopularFeedGenerators.d.ts.map +1 -1
  164. package/dist/api/app/bsky/unspecced/getPopularFeedGenerators.js.map +1 -1
  165. package/dist/api/app/bsky/unspecced/getTaggedSuggestions.d.ts +1 -1
  166. package/dist/api/app/bsky/unspecced/getTaggedSuggestions.d.ts.map +1 -1
  167. package/dist/api/app/bsky/unspecced/getTrendingTopics.d.ts +1 -1
  168. package/dist/api/app/bsky/unspecced/getTrendingTopics.d.ts.map +1 -1
  169. package/dist/api/app/bsky/unspecced/getTrendingTopics.js +1 -1
  170. package/dist/api/app/bsky/unspecced/getTrendingTopics.js.map +1 -1
  171. package/dist/api/blob-dispatcher.d.ts.map +1 -1
  172. package/dist/api/blob-dispatcher.js +1 -1
  173. package/dist/api/blob-dispatcher.js.map +1 -1
  174. package/dist/api/blob-resolver.d.ts +3 -3
  175. package/dist/api/blob-resolver.d.ts.map +1 -1
  176. package/dist/api/blob-resolver.js +6 -4
  177. package/dist/api/blob-resolver.js.map +1 -1
  178. package/dist/api/com/atproto/admin/getAccountInfos.d.ts +1 -1
  179. package/dist/api/com/atproto/admin/getAccountInfos.d.ts.map +1 -1
  180. package/dist/api/com/atproto/admin/getAccountInfos.js.map +1 -1
  181. package/dist/api/com/atproto/admin/getSubjectStatus.d.ts +1 -1
  182. package/dist/api/com/atproto/admin/getSubjectStatus.d.ts.map +1 -1
  183. package/dist/api/com/atproto/admin/updateSubjectStatus.d.ts +1 -1
  184. package/dist/api/com/atproto/admin/updateSubjectStatus.d.ts.map +1 -1
  185. package/dist/api/com/atproto/identity/resolveHandle.d.ts +1 -1
  186. package/dist/api/com/atproto/identity/resolveHandle.d.ts.map +1 -1
  187. package/dist/api/com/atproto/identity/resolveHandle.js +1 -1
  188. package/dist/api/com/atproto/identity/resolveHandle.js.map +1 -1
  189. package/dist/api/com/atproto/label/queryLabels.d.ts +1 -1
  190. package/dist/api/com/atproto/label/queryLabels.d.ts.map +1 -1
  191. package/dist/api/com/atproto/label/queryLabels.js.map +1 -1
  192. package/dist/api/com/atproto/repo/getRecord.d.ts +1 -1
  193. package/dist/api/com/atproto/repo/getRecord.d.ts.map +1 -1
  194. package/dist/api/com/atproto/repo/getRecord.js +1 -1
  195. package/dist/api/com/atproto/repo/getRecord.js.map +1 -1
  196. package/dist/api/com/atproto/temp/fetchLabels.d.ts +1 -1
  197. package/dist/api/com/atproto/temp/fetchLabels.d.ts.map +1 -1
  198. package/dist/api/com/atproto/temp/fetchLabels.js.map +1 -1
  199. package/dist/api/health.d.ts +3 -3
  200. package/dist/api/health.d.ts.map +1 -1
  201. package/dist/api/health.js +2 -5
  202. package/dist/api/health.js.map +1 -1
  203. package/dist/api/index.d.ts +1 -1
  204. package/dist/api/index.d.ts.map +1 -1
  205. package/dist/api/index.js +20 -20
  206. package/dist/api/index.js.map +1 -1
  207. package/dist/api/util.d.ts +1 -0
  208. package/dist/api/util.d.ts.map +1 -1
  209. package/dist/api/util.js +2 -1
  210. package/dist/api/util.js.map +1 -1
  211. package/dist/api/well-known.d.ts +3 -3
  212. package/dist/api/well-known.d.ts.map +1 -1
  213. package/dist/api/well-known.js +2 -5
  214. package/dist/api/well-known.js.map +1 -1
  215. package/dist/auth-verifier.d.ts +1 -1
  216. package/dist/auth-verifier.d.ts.map +1 -1
  217. package/dist/auth-verifier.js +3 -3
  218. package/dist/auth-verifier.js.map +1 -1
  219. package/dist/bsync.d.ts +2 -2
  220. package/dist/bsync.d.ts.map +1 -1
  221. package/dist/bsync.js +1 -1
  222. package/dist/bsync.js.map +1 -1
  223. package/dist/context.d.ts +7 -8
  224. package/dist/context.d.ts.map +1 -1
  225. package/dist/context.js +1 -2
  226. package/dist/context.js.map +1 -1
  227. package/dist/courier.d.ts +2 -2
  228. package/dist/courier.d.ts.map +1 -1
  229. package/dist/courier.js +1 -1
  230. package/dist/courier.js.map +1 -1
  231. package/dist/data-plane/bsync/index.d.ts +1 -1
  232. package/dist/data-plane/bsync/index.d.ts.map +1 -1
  233. package/dist/data-plane/bsync/index.js +6 -6
  234. package/dist/data-plane/bsync/index.js.map +1 -1
  235. package/dist/data-plane/client.d.ts.map +1 -1
  236. package/dist/data-plane/client.js +1 -1
  237. package/dist/data-plane/client.js.map +1 -1
  238. package/dist/data-plane/server/background.d.ts.map +1 -1
  239. package/dist/data-plane/server/background.js.map +1 -1
  240. package/dist/data-plane/server/db/database-schema.d.ts +26 -27
  241. package/dist/data-plane/server/db/database-schema.d.ts.map +1 -1
  242. package/dist/data-plane/server/db/db.d.ts +2 -2
  243. package/dist/data-plane/server/db/db.d.ts.map +1 -1
  244. package/dist/data-plane/server/db/db.js +6 -6
  245. package/dist/data-plane/server/db/db.js.map +1 -1
  246. package/dist/data-plane/server/db/util.d.ts +1 -1
  247. package/dist/data-plane/server/db/util.d.ts.map +1 -1
  248. package/dist/data-plane/server/index.d.ts +2 -2
  249. package/dist/data-plane/server/index.d.ts.map +1 -1
  250. package/dist/data-plane/server/index.js +4 -4
  251. package/dist/data-plane/server/index.js.map +1 -1
  252. package/dist/data-plane/server/indexing/index.d.ts +14 -14
  253. package/dist/data-plane/server/indexing/index.d.ts.map +1 -1
  254. package/dist/data-plane/server/indexing/index.js +16 -16
  255. package/dist/data-plane/server/indexing/index.js.map +1 -1
  256. package/dist/data-plane/server/indexing/plugins/block.d.ts +2 -2
  257. package/dist/data-plane/server/indexing/plugins/block.d.ts.map +1 -1
  258. package/dist/data-plane/server/indexing/plugins/block.js +2 -5
  259. package/dist/data-plane/server/indexing/plugins/block.js.map +1 -1
  260. package/dist/data-plane/server/indexing/plugins/chat-declaration.d.ts +2 -2
  261. package/dist/data-plane/server/indexing/plugins/chat-declaration.d.ts.map +1 -1
  262. package/dist/data-plane/server/indexing/plugins/chat-declaration.js +2 -5
  263. package/dist/data-plane/server/indexing/plugins/chat-declaration.js.map +1 -1
  264. package/dist/data-plane/server/indexing/plugins/feed-generator.d.ts +2 -2
  265. package/dist/data-plane/server/indexing/plugins/feed-generator.d.ts.map +1 -1
  266. package/dist/data-plane/server/indexing/plugins/feed-generator.js +2 -5
  267. package/dist/data-plane/server/indexing/plugins/feed-generator.js.map +1 -1
  268. package/dist/data-plane/server/indexing/plugins/follow.d.ts +2 -2
  269. package/dist/data-plane/server/indexing/plugins/follow.d.ts.map +1 -1
  270. package/dist/data-plane/server/indexing/plugins/follow.js +2 -5
  271. package/dist/data-plane/server/indexing/plugins/follow.js.map +1 -1
  272. package/dist/data-plane/server/indexing/plugins/labeler.d.ts +2 -2
  273. package/dist/data-plane/server/indexing/plugins/labeler.d.ts.map +1 -1
  274. package/dist/data-plane/server/indexing/plugins/labeler.js +2 -5
  275. package/dist/data-plane/server/indexing/plugins/labeler.js.map +1 -1
  276. package/dist/data-plane/server/indexing/plugins/like.d.ts +2 -2
  277. package/dist/data-plane/server/indexing/plugins/like.d.ts.map +1 -1
  278. package/dist/data-plane/server/indexing/plugins/like.js +2 -5
  279. package/dist/data-plane/server/indexing/plugins/like.js.map +1 -1
  280. package/dist/data-plane/server/indexing/plugins/list-block.d.ts +2 -2
  281. package/dist/data-plane/server/indexing/plugins/list-block.d.ts.map +1 -1
  282. package/dist/data-plane/server/indexing/plugins/list-block.js +2 -5
  283. package/dist/data-plane/server/indexing/plugins/list-block.js.map +1 -1
  284. package/dist/data-plane/server/indexing/plugins/list-item.d.ts +2 -2
  285. package/dist/data-plane/server/indexing/plugins/list-item.d.ts.map +1 -1
  286. package/dist/data-plane/server/indexing/plugins/list-item.js +3 -6
  287. package/dist/data-plane/server/indexing/plugins/list-item.js.map +1 -1
  288. package/dist/data-plane/server/indexing/plugins/list.d.ts +3 -3
  289. package/dist/data-plane/server/indexing/plugins/list.d.ts.map +1 -1
  290. package/dist/data-plane/server/indexing/plugins/list.js +2 -5
  291. package/dist/data-plane/server/indexing/plugins/list.js.map +1 -1
  292. package/dist/data-plane/server/indexing/plugins/post-gate.d.ts +3 -3
  293. package/dist/data-plane/server/indexing/plugins/post-gate.d.ts.map +1 -1
  294. package/dist/data-plane/server/indexing/plugins/post-gate.js +2 -5
  295. package/dist/data-plane/server/indexing/plugins/post-gate.js.map +1 -1
  296. package/dist/data-plane/server/indexing/plugins/post.d.ts +3 -3
  297. package/dist/data-plane/server/indexing/plugins/post.d.ts.map +1 -1
  298. package/dist/data-plane/server/indexing/plugins/post.js +21 -24
  299. package/dist/data-plane/server/indexing/plugins/post.js.map +1 -1
  300. package/dist/data-plane/server/indexing/plugins/profile.d.ts +3 -3
  301. package/dist/data-plane/server/indexing/plugins/profile.d.ts.map +1 -1
  302. package/dist/data-plane/server/indexing/plugins/profile.js +2 -5
  303. package/dist/data-plane/server/indexing/plugins/profile.js.map +1 -1
  304. package/dist/data-plane/server/indexing/plugins/repost.d.ts +2 -2
  305. package/dist/data-plane/server/indexing/plugins/repost.d.ts.map +1 -1
  306. package/dist/data-plane/server/indexing/plugins/repost.js +2 -5
  307. package/dist/data-plane/server/indexing/plugins/repost.js.map +1 -1
  308. package/dist/data-plane/server/indexing/plugins/starter-pack.d.ts +2 -2
  309. package/dist/data-plane/server/indexing/plugins/starter-pack.d.ts.map +1 -1
  310. package/dist/data-plane/server/indexing/plugins/starter-pack.js +2 -5
  311. package/dist/data-plane/server/indexing/plugins/starter-pack.js.map +1 -1
  312. package/dist/data-plane/server/indexing/plugins/thread-gate.d.ts +3 -3
  313. package/dist/data-plane/server/indexing/plugins/thread-gate.d.ts.map +1 -1
  314. package/dist/data-plane/server/indexing/plugins/thread-gate.js +2 -5
  315. package/dist/data-plane/server/indexing/plugins/thread-gate.js.map +1 -1
  316. package/dist/data-plane/server/indexing/processor.d.ts +2 -2
  317. package/dist/data-plane/server/indexing/processor.d.ts.map +1 -1
  318. package/dist/data-plane/server/indexing/processor.js +1 -1
  319. package/dist/data-plane/server/indexing/processor.js.map +1 -1
  320. package/dist/data-plane/server/routes/feeds.d.ts.map +1 -1
  321. package/dist/data-plane/server/routes/feeds.js +1 -1
  322. package/dist/data-plane/server/routes/feeds.js.map +1 -1
  323. package/dist/data-plane/server/routes/follows.d.ts.map +1 -1
  324. package/dist/data-plane/server/routes/follows.js +1 -1
  325. package/dist/data-plane/server/routes/follows.js.map +1 -1
  326. package/dist/data-plane/server/routes/identity.d.ts +1 -1
  327. package/dist/data-plane/server/routes/identity.d.ts.map +1 -1
  328. package/dist/data-plane/server/routes/identity.js +1 -1
  329. package/dist/data-plane/server/routes/identity.js.map +1 -1
  330. package/dist/data-plane/server/routes/index.d.ts.map +1 -1
  331. package/dist/data-plane/server/routes/index.js +1 -1
  332. package/dist/data-plane/server/routes/index.js.map +1 -1
  333. package/dist/data-plane/server/routes/interactions.d.ts.map +1 -1
  334. package/dist/data-plane/server/routes/interactions.js +11 -11
  335. package/dist/data-plane/server/routes/interactions.js.map +1 -1
  336. package/dist/data-plane/server/routes/labels.d.ts.map +1 -1
  337. package/dist/data-plane/server/routes/labels.js.map +1 -1
  338. package/dist/data-plane/server/routes/likes.d.ts.map +1 -1
  339. package/dist/data-plane/server/routes/likes.js +1 -2
  340. package/dist/data-plane/server/routes/likes.js.map +1 -1
  341. package/dist/data-plane/server/routes/lists.d.ts.map +1 -1
  342. package/dist/data-plane/server/routes/lists.js +2 -2
  343. package/dist/data-plane/server/routes/lists.js.map +1 -1
  344. package/dist/data-plane/server/routes/mutes.d.ts.map +1 -1
  345. package/dist/data-plane/server/routes/mutes.js +7 -7
  346. package/dist/data-plane/server/routes/mutes.js.map +1 -1
  347. package/dist/data-plane/server/routes/notifs.js +2 -2
  348. package/dist/data-plane/server/routes/notifs.js.map +1 -1
  349. package/dist/data-plane/server/routes/posts.d.ts.map +1 -1
  350. package/dist/data-plane/server/routes/posts.js +1 -1
  351. package/dist/data-plane/server/routes/posts.js.map +1 -1
  352. package/dist/data-plane/server/routes/profile.d.ts.map +1 -1
  353. package/dist/data-plane/server/routes/profile.js +4 -4
  354. package/dist/data-plane/server/routes/profile.js.map +1 -1
  355. package/dist/data-plane/server/routes/records.d.ts.map +1 -1
  356. package/dist/data-plane/server/routes/records.js +7 -7
  357. package/dist/data-plane/server/routes/records.js.map +1 -1
  358. package/dist/data-plane/server/routes/relationships.d.ts.map +1 -1
  359. package/dist/data-plane/server/routes/relationships.js +60 -40
  360. package/dist/data-plane/server/routes/relationships.js.map +1 -1
  361. package/dist/data-plane/server/routes/reposts.d.ts.map +1 -1
  362. package/dist/data-plane/server/routes/reposts.js +1 -2
  363. package/dist/data-plane/server/routes/reposts.js.map +1 -1
  364. package/dist/data-plane/server/routes/suggestions.d.ts.map +1 -1
  365. package/dist/data-plane/server/routes/suggestions.js.map +1 -1
  366. package/dist/data-plane/server/subscription.d.ts +3 -3
  367. package/dist/data-plane/server/subscription.d.ts.map +1 -1
  368. package/dist/data-plane/server/subscription.js +2 -2
  369. package/dist/data-plane/server/subscription.js.map +1 -1
  370. package/dist/data-plane/server/util.d.ts +1 -1
  371. package/dist/data-plane/server/util.d.ts.map +1 -1
  372. package/dist/data-plane/server/util.js +4 -4
  373. package/dist/data-plane/server/util.js.map +1 -1
  374. package/dist/error.d.ts.map +1 -1
  375. package/dist/error.js.map +1 -1
  376. package/dist/feature-gates.d.ts.map +1 -1
  377. package/dist/feature-gates.js.map +1 -1
  378. package/dist/hydration/feed.d.ts +3 -3
  379. package/dist/hydration/feed.d.ts.map +1 -1
  380. package/dist/hydration/feed.js +1 -1
  381. package/dist/hydration/feed.js.map +1 -1
  382. package/dist/hydration/graph.d.ts +11 -8
  383. package/dist/hydration/graph.d.ts.map +1 -1
  384. package/dist/hydration/graph.js +17 -19
  385. package/dist/hydration/graph.js.map +1 -1
  386. package/dist/hydration/hydrator.d.ts +7 -5
  387. package/dist/hydration/hydrator.d.ts.map +1 -1
  388. package/dist/hydration/hydrator.js +53 -21
  389. package/dist/hydration/hydrator.js.map +1 -1
  390. package/dist/hydration/label.d.ts +2 -2
  391. package/dist/hydration/label.d.ts.map +1 -1
  392. package/dist/hydration/label.js +1 -1
  393. package/dist/hydration/label.js.map +1 -1
  394. package/dist/hydration/util.d.ts.map +1 -1
  395. package/dist/hydration/util.js +2 -2
  396. package/dist/hydration/util.js.map +1 -1
  397. package/dist/image/index.d.ts +1 -1
  398. package/dist/image/index.d.ts.map +1 -1
  399. package/dist/image/server.d.ts +1 -1
  400. package/dist/image/server.d.ts.map +1 -1
  401. package/dist/image/server.js +3 -3
  402. package/dist/image/server.js.map +1 -1
  403. package/dist/image/sharp.d.ts.map +1 -1
  404. package/dist/image/sharp.js +1 -1
  405. package/dist/image/sharp.js.map +1 -1
  406. package/dist/index.d.ts +6 -6
  407. package/dist/index.d.ts.map +1 -1
  408. package/dist/index.js +22 -22
  409. package/dist/index.js.map +1 -1
  410. package/dist/lexicon/lexicons.d.ts +56 -2
  411. package/dist/lexicon/lexicons.d.ts.map +1 -1
  412. package/dist/lexicon/lexicons.js +32 -0
  413. package/dist/lexicon/lexicons.js.map +1 -1
  414. package/dist/lexicon/types/app/bsky/actor/defs.d.ts +19 -1
  415. package/dist/lexicon/types/app/bsky/actor/defs.d.ts.map +1 -1
  416. package/dist/lexicon/types/app/bsky/actor/defs.js +10 -0
  417. package/dist/lexicon/types/app/bsky/actor/defs.js.map +1 -1
  418. package/dist/lexicon/types/app/bsky/feed/postgate.d.ts +1 -0
  419. package/dist/lexicon/types/app/bsky/feed/postgate.d.ts.map +1 -1
  420. package/dist/lexicon/types/app/bsky/feed/postgate.js.map +1 -1
  421. package/dist/lexicon/types/app/bsky/feed/threadgate.d.ts +1 -0
  422. package/dist/lexicon/types/app/bsky/feed/threadgate.d.ts.map +1 -1
  423. package/dist/lexicon/types/app/bsky/feed/threadgate.js.map +1 -1
  424. package/dist/logger.js +2 -5
  425. package/dist/logger.js.map +1 -1
  426. package/dist/redis.js +5 -5
  427. package/dist/redis.js.map +1 -1
  428. package/dist/util/http.d.ts.map +1 -1
  429. package/dist/util/http.js.map +1 -1
  430. package/dist/util/uris.d.ts.map +1 -1
  431. package/dist/views/index.d.ts +13 -8
  432. package/dist/views/index.d.ts.map +1 -1
  433. package/dist/views/index.js +47 -27
  434. package/dist/views/index.js.map +1 -1
  435. package/dist/views/types.d.ts +3 -3
  436. package/dist/views/types.d.ts.map +1 -1
  437. package/dist/views/util.d.ts +1 -1
  438. package/dist/views/util.d.ts.map +1 -1
  439. package/dist/views/util.js +1 -1
  440. package/dist/views/util.js.map +1 -1
  441. package/package.json +20 -17
  442. package/src/api/app/bsky/actor/getProfile.ts +5 -5
  443. package/src/api/app/bsky/actor/getProfiles.ts +6 -6
  444. package/src/api/app/bsky/actor/getSuggestions.ts +10 -9
  445. package/src/api/app/bsky/actor/searchActors.ts +6 -6
  446. package/src/api/app/bsky/actor/searchActorsTypeahead.ts +5 -5
  447. package/src/api/app/bsky/feed/getActorFeeds.ts +7 -7
  448. package/src/api/app/bsky/feed/getActorLikes.ts +9 -9
  449. package/src/api/app/bsky/feed/getAuthorFeed.ts +18 -12
  450. package/src/api/app/bsky/feed/getFeed.ts +17 -17
  451. package/src/api/app/bsky/feed/getFeedGenerator.ts +3 -3
  452. package/src/api/app/bsky/feed/getFeedGenerators.ts +4 -4
  453. package/src/api/app/bsky/feed/getLikes.ts +6 -7
  454. package/src/api/app/bsky/feed/getListFeed.ts +9 -9
  455. package/src/api/app/bsky/feed/getPostThread.ts +7 -7
  456. package/src/api/app/bsky/feed/getPosts.ts +6 -6
  457. package/src/api/app/bsky/feed/getQuotes.ts +7 -7
  458. package/src/api/app/bsky/feed/getRepostedBy.ts +5 -5
  459. package/src/api/app/bsky/feed/getSuggestedFeeds.ts +2 -2
  460. package/src/api/app/bsky/feed/getTimeline.ts +9 -9
  461. package/src/api/app/bsky/feed/searchPosts.ts +6 -6
  462. package/src/api/app/bsky/graph/getActorStarterPacks.ts +7 -7
  463. package/src/api/app/bsky/graph/getBlocks.ts +4 -4
  464. package/src/api/app/bsky/graph/getFollowers.ts +6 -6
  465. package/src/api/app/bsky/graph/getFollows.ts +6 -6
  466. package/src/api/app/bsky/graph/getKnownFollowers.ts +2 -2
  467. package/src/api/app/bsky/graph/getList.ts +10 -10
  468. package/src/api/app/bsky/graph/getListBlocks.ts +4 -4
  469. package/src/api/app/bsky/graph/getListMutes.ts +4 -4
  470. package/src/api/app/bsky/graph/getLists.ts +4 -4
  471. package/src/api/app/bsky/graph/getMutes.ts +3 -3
  472. package/src/api/app/bsky/graph/getRelationships.ts +1 -1
  473. package/src/api/app/bsky/graph/getStarterPack.ts +4 -4
  474. package/src/api/app/bsky/graph/getStarterPacks.ts +5 -5
  475. package/src/api/app/bsky/graph/getSuggestedFollowsByActor.ts +6 -5
  476. package/src/api/app/bsky/graph/muteActor.ts +1 -1
  477. package/src/api/app/bsky/graph/muteActorList.ts +1 -1
  478. package/src/api/app/bsky/graph/muteThread.ts +1 -1
  479. package/src/api/app/bsky/graph/searchStarterPacks.ts +7 -7
  480. package/src/api/app/bsky/graph/unmuteActor.ts +1 -1
  481. package/src/api/app/bsky/graph/unmuteActorList.ts +1 -1
  482. package/src/api/app/bsky/graph/unmuteThread.ts +1 -1
  483. package/src/api/app/bsky/labeler/getServices.ts +2 -2
  484. package/src/api/app/bsky/notification/getUnreadCount.ts +2 -2
  485. package/src/api/app/bsky/notification/listNotifications.ts +6 -6
  486. package/src/api/app/bsky/notification/putPreferences.ts +1 -1
  487. package/src/api/app/bsky/notification/registerPush.ts +1 -1
  488. package/src/api/app/bsky/notification/updateSeen.ts +3 -3
  489. package/src/api/app/bsky/unspecced/getConfig.ts +1 -1
  490. package/src/api/app/bsky/unspecced/getPopularFeedGenerators.ts +2 -2
  491. package/src/api/app/bsky/unspecced/getTaggedSuggestions.ts +1 -1
  492. package/src/api/app/bsky/unspecced/getTrendingTopics.ts +7 -7
  493. package/src/api/blob-dispatcher.ts +1 -2
  494. package/src/api/blob-resolver.ts +15 -13
  495. package/src/api/com/atproto/admin/getAccountInfos.ts +2 -2
  496. package/src/api/com/atproto/admin/getSubjectStatus.ts +1 -1
  497. package/src/api/com/atproto/admin/updateSubjectStatus.ts +2 -2
  498. package/src/api/com/atproto/identity/resolveHandle.ts +2 -2
  499. package/src/api/com/atproto/label/queryLabels.ts +2 -2
  500. package/src/api/com/atproto/repo/getRecord.ts +2 -2
  501. package/src/api/com/atproto/temp/fetchLabels.ts +2 -2
  502. package/src/api/health.ts +4 -4
  503. package/src/api/index.ts +21 -21
  504. package/src/api/util.ts +1 -0
  505. package/src/api/well-known.ts +4 -4
  506. package/src/auth-verifier.ts +6 -6
  507. package/src/bsync.ts +3 -3
  508. package/src/context.ts +8 -10
  509. package/src/courier.ts +3 -3
  510. package/src/data-plane/bsync/index.ts +6 -6
  511. package/src/data-plane/client.ts +1 -1
  512. package/src/data-plane/server/background.ts +1 -1
  513. package/src/data-plane/server/db/database-schema.ts +26 -28
  514. package/src/data-plane/server/db/db.ts +6 -6
  515. package/src/data-plane/server/db/util.ts +2 -2
  516. package/src/data-plane/server/index.ts +5 -5
  517. package/src/data-plane/server/indexing/index.ts +21 -21
  518. package/src/data-plane/server/indexing/plugins/block.ts +4 -4
  519. package/src/data-plane/server/indexing/plugins/chat-declaration.ts +4 -4
  520. package/src/data-plane/server/indexing/plugins/feed-generator.ts +4 -4
  521. package/src/data-plane/server/indexing/plugins/follow.ts +5 -5
  522. package/src/data-plane/server/indexing/plugins/labeler.ts +4 -4
  523. package/src/data-plane/server/indexing/plugins/like.ts +5 -5
  524. package/src/data-plane/server/indexing/plugins/list-block.ts +4 -4
  525. package/src/data-plane/server/indexing/plugins/list-item.ts +5 -5
  526. package/src/data-plane/server/indexing/plugins/list.ts +5 -5
  527. package/src/data-plane/server/indexing/plugins/post-gate.ts +5 -5
  528. package/src/data-plane/server/indexing/plugins/post.ts +18 -18
  529. package/src/data-plane/server/indexing/plugins/profile.ts +5 -5
  530. package/src/data-plane/server/indexing/plugins/repost.ts +4 -4
  531. package/src/data-plane/server/indexing/plugins/starter-pack.ts +4 -4
  532. package/src/data-plane/server/indexing/plugins/thread-gate.ts +5 -5
  533. package/src/data-plane/server/indexing/processor.ts +3 -3
  534. package/src/data-plane/server/routes/feeds.ts +1 -1
  535. package/src/data-plane/server/routes/follows.ts +2 -2
  536. package/src/data-plane/server/routes/identity.ts +2 -2
  537. package/src/data-plane/server/routes/index.ts +2 -2
  538. package/src/data-plane/server/routes/interactions.ts +14 -12
  539. package/src/data-plane/server/routes/labels.ts +2 -2
  540. package/src/data-plane/server/routes/likes.ts +2 -3
  541. package/src/data-plane/server/routes/lists.ts +3 -3
  542. package/src/data-plane/server/routes/mutes.ts +3 -3
  543. package/src/data-plane/server/routes/notifs.ts +3 -3
  544. package/src/data-plane/server/routes/posts.ts +2 -2
  545. package/src/data-plane/server/routes/profile.ts +6 -6
  546. package/src/data-plane/server/routes/quotes.ts +1 -1
  547. package/src/data-plane/server/routes/records.ts +7 -7
  548. package/src/data-plane/server/routes/relationships.ts +74 -50
  549. package/src/data-plane/server/routes/reposts.ts +2 -3
  550. package/src/data-plane/server/routes/suggestions.ts +1 -1
  551. package/src/data-plane/server/subscription.ts +3 -3
  552. package/src/data-plane/server/util.ts +2 -2
  553. package/src/error.ts +1 -1
  554. package/src/feature-gates.ts +0 -2
  555. package/src/hydration/feed.ts +9 -9
  556. package/src/hydration/graph.ts +27 -27
  557. package/src/hydration/hydrator.ts +92 -45
  558. package/src/hydration/label.ts +4 -4
  559. package/src/hydration/util.ts +2 -2
  560. package/src/image/index.ts +1 -1
  561. package/src/image/server.ts +12 -13
  562. package/src/image/sharp.ts +2 -2
  563. package/src/index.ts +23 -23
  564. package/src/lexicon/lexicons.ts +37 -0
  565. package/src/lexicon/types/app/bsky/actor/defs.ts +36 -0
  566. package/src/lexicon/types/app/bsky/feed/postgate.ts +1 -0
  567. package/src/lexicon/types/app/bsky/feed/threadgate.ts +1 -0
  568. package/src/logger.ts +1 -1
  569. package/src/redis.ts +1 -1
  570. package/src/util/http.ts +1 -1
  571. package/src/util/uris.ts +1 -1
  572. package/src/views/index.ts +77 -45
  573. package/src/views/types.ts +9 -9
  574. package/src/views/util.ts +4 -4
  575. package/tests/_util.ts +4 -5
  576. package/tests/admin/admin-auth.test.ts +2 -2
  577. package/tests/admin/moderation.test.ts +1 -1
  578. package/tests/auth.test.ts +1 -1
  579. package/tests/blob-resolver.test.ts +2 -2
  580. package/tests/data-plane/duplicate-records.test.ts +3 -3
  581. package/tests/data-plane/handle-invalidation.test.ts +2 -2
  582. package/tests/data-plane/indexing.test.ts +8 -8
  583. package/tests/data-plane/subscription.test.ts +1 -1
  584. package/tests/data-plane/thread-mutes.test.ts +1 -1
  585. package/tests/entryway-auth.test.ts +5 -5
  586. package/tests/feed-generation.test.ts +8 -8
  587. package/tests/hydration/util.test.ts +1 -1
  588. package/tests/image/server.test.ts +2 -2
  589. package/tests/image/uri.test.ts +2 -2
  590. package/tests/label-hydration.test.ts +6 -3
  591. package/tests/postgates.test.ts +2 -3
  592. package/tests/query-labels.test.ts +1 -1
  593. package/tests/seed/feed-hidden-replies.ts +1 -1
  594. package/tests/seed/known-followers.ts +1 -1
  595. package/tests/seed/postgates.ts +1 -1
  596. package/tests/server.test.ts +2 -2
  597. package/tests/views/account-deactivation.test.ts +1 -1
  598. package/tests/views/actor-likes.test.ts +1 -1
  599. package/tests/views/actor-search.test.ts +2 -2
  600. package/tests/views/author-feed.test.ts +11 -11
  601. package/tests/views/block-lists.test.ts +3 -3
  602. package/tests/views/blocks.test.ts +4 -4
  603. package/tests/views/feed-hidden-replies.test.ts +2 -3
  604. package/tests/views/feed-view-post.test.ts +2 -2
  605. package/tests/views/follows.test.ts +2 -2
  606. package/tests/views/known-followers.test.ts +2 -3
  607. package/tests/views/labeler-service.test.ts +2 -2
  608. package/tests/views/labels-needs-review.test.ts +2 -2
  609. package/tests/views/labels-takedown.test.ts +30 -1
  610. package/tests/views/likes.test.ts +2 -2
  611. package/tests/views/list-feed.test.ts +2 -2
  612. package/tests/views/lists.test.ts +2 -2
  613. package/tests/views/mute-lists.test.ts +3 -3
  614. package/tests/views/mutes.test.ts +2 -2
  615. package/tests/views/notifications.test.ts +3 -3
  616. package/tests/views/posts.test.ts +3 -3
  617. package/tests/views/profile.test.ts +3 -3
  618. package/tests/views/quotes.test.ts +2 -2
  619. package/tests/views/reposts.test.ts +2 -2
  620. package/tests/views/starter-packs.test.ts +3 -3
  621. package/tests/views/suggested-follows.test.ts +2 -2
  622. package/tests/views/suggestions.test.ts +2 -2
  623. package/tests/views/thread.test.ts +2 -2
  624. package/tests/views/threadgating.test.ts +3 -3
  625. package/tests/views/timeline.test.ts +5 -5
@@ -1,21 +1,40 @@
1
- import assert from 'assert'
1
+ import assert from 'node:assert'
2
2
  import { mapDefined } from '@atproto/common'
3
3
  import { AtUri } from '@atproto/syntax'
4
4
  import { DataPlaneClient } from '../data-plane/client'
5
- import { Notification } from '../proto/bsky_pb'
6
5
  import { ids } from '../lexicon/lexicons'
7
6
  import { isMain as isEmbedRecord } from '../lexicon/types/app/bsky/embed/record'
8
7
  import { isMain as isEmbedRecordWithMedia } from '../lexicon/types/app/bsky/embed/recordWithMedia'
9
8
  import { isListRule as isThreadgateListRule } from '../lexicon/types/app/bsky/feed/threadgate'
10
9
  import { hydrationLogger } from '../logger'
10
+ import { Notification } from '../proto/bsky_pb'
11
+ import { ParsedLabelers } from '../util'
12
+ import { uriToDid, uriToDid as didFromUri } from '../util/uris'
11
13
  import {
12
14
  ActorHydrator,
13
- ProfileAggs,
14
15
  Actors,
15
- ProfileViewerStates,
16
- ProfileViewerState,
17
16
  KnownFollowers,
17
+ ProfileAggs,
18
+ ProfileViewerState,
19
+ ProfileViewerStates,
18
20
  } from './actor'
21
+ import {
22
+ FeedGenAggs,
23
+ FeedGenViewerStates,
24
+ FeedGens,
25
+ FeedHydrator,
26
+ FeedItem,
27
+ Likes,
28
+ Post,
29
+ PostAggs,
30
+ PostViewerStates,
31
+ Postgates,
32
+ Posts,
33
+ Reposts,
34
+ ThreadContexts,
35
+ ThreadRef,
36
+ Threadgates,
37
+ } from './feed'
19
38
  import {
20
39
  Follows,
21
40
  GraphHydrator,
@@ -36,32 +55,13 @@ import {
36
55
  } from './label'
37
56
  import {
38
57
  HydrationMap,
39
- RecordInfo,
40
58
  ItemRef,
41
- urisByCollection,
59
+ RecordInfo,
60
+ mergeManyMaps,
42
61
  mergeMaps,
43
62
  mergeNestedMaps,
44
- mergeManyMaps,
63
+ urisByCollection,
45
64
  } from './util'
46
- import { uriToDid as didFromUri } from '../util/uris'
47
- import {
48
- FeedGenAggs,
49
- FeedGens,
50
- FeedGenViewerStates,
51
- FeedHydrator,
52
- Likes,
53
- Post,
54
- Posts,
55
- Reposts,
56
- PostAggs,
57
- PostViewerStates,
58
- Threadgates,
59
- Postgates,
60
- FeedItem,
61
- ThreadContexts,
62
- ThreadRef,
63
- } from './feed'
64
- import { ParsedLabelers } from '../util'
65
65
 
66
66
  export class HydrateCtx {
67
67
  labelers = this.vals.labelers
@@ -279,10 +279,11 @@ export class Hydrator {
279
279
  // - profile basic
280
280
  async hydrateLists(uris: string[], ctx: HydrateCtx): Promise<HydrationState> {
281
281
  const [listsState, profilesState] = await Promise.all([
282
- await this.hydrateListsBasic(uris, ctx),
283
- await this.hydrateProfilesBasic(uris.map(didFromUri), ctx),
282
+ this.hydrateListsBasic(uris, ctx, {
283
+ skipAuthors: true, // handled via author profile hydration
284
+ }),
285
+ this.hydrateProfilesBasic(uris.map(didFromUri), ctx),
284
286
  ])
285
-
286
287
  return mergeStates(listsState, profilesState)
287
288
  }
288
289
 
@@ -291,19 +292,26 @@ export class Hydrator {
291
292
  async hydrateListsBasic(
292
293
  uris: string[],
293
294
  ctx: HydrateCtx,
295
+ opts?: { skipAuthors: boolean },
294
296
  ): Promise<HydrationState> {
295
- const [lists, listAggs, listViewers, labels] = await Promise.all([
297
+ const includeAuthorDids = opts?.skipAuthors ? [] : uris.map(uriToDid)
298
+ const [lists, listAggs, listViewers, labels, actors] = await Promise.all([
296
299
  this.graph.getLists(uris, ctx.includeTakedowns),
297
300
  this.graph.getListAggregates(uris.map((uri) => ({ uri }))),
298
301
  ctx.viewer ? this.graph.getListViewerStates(uris, ctx.viewer) : undefined,
299
- this.label.getLabelsForSubjects(uris, ctx.labelers),
302
+ this.label.getLabelsForSubjects(
303
+ [...uris, ...includeAuthorDids],
304
+ ctx.labelers,
305
+ ),
306
+ this.actor.getActors(includeAuthorDids, ctx.includeTakedowns),
300
307
  ])
301
308
 
302
309
  if (!ctx.includeTakedowns) {
303
310
  actionTakedownLabels(uris, lists, labels)
311
+ actionTakedownLabels(includeAuthorDids, actors, labels)
304
312
  }
305
313
 
306
- return { lists, listAggs, listViewers, labels, ctx }
314
+ return { lists, listAggs, listViewers, labels, actors, ctx }
307
315
  }
308
316
 
309
317
  // app.bsky.graph.defs#listItemView
@@ -533,12 +541,14 @@ export class Hydrator {
533
541
  }
534
542
  }
535
543
  // replace embed/parent/root pairs with block state
536
- const blocks = await this.graph.getBidirectionalBlocks(relationships)
544
+ const blocks = await this.hydrateBidirectionalBlocks(
545
+ pairsToMap(relationships),
546
+ )
537
547
  for (const [uri, { embed, parent, root }] of postBlocksPairs) {
538
548
  postBlocks.set(uri, {
539
- embed: !!embed && blocks.isBlocked(...embed),
540
- parent: !!parent && blocks.isBlocked(...parent),
541
- root: !!root && blocks.isBlocked(...root),
549
+ embed: !!embed && !!isBlocked(blocks, embed),
550
+ parent: !!parent && !!isBlocked(blocks, parent),
551
+ root: !!root && !!isBlocked(blocks, root),
542
552
  })
543
553
  }
544
554
  return postBlocks
@@ -756,8 +766,8 @@ export class Hydrator {
756
766
  )
757
767
  },
758
768
  )
759
- const blocks = await this.graph.getBidirectionalBlocks(
760
- listCreatorMemberPairs,
769
+ const blocks = await this.hydrateBidirectionalBlocks(
770
+ pairsToMap(listCreatorMemberPairs),
761
771
  )
762
772
  // sample top list items per starter pack based on their follows
763
773
  const listMemberAggs = await this.actor.getProfileAggregates(listMemberDids)
@@ -772,7 +782,8 @@ export class Hydrator {
772
782
  // update aggregation with list items for top 12 most followed members
773
783
  agg.listItemSampleUris = [
774
784
  ...members.listitems.filter(
775
- (li) => ctx.viewer === creator || !blocks?.isBlocked(creator, li.did),
785
+ (li) =>
786
+ ctx.viewer === creator || !isBlocked(blocks, [creator, li.did]),
776
787
  ),
777
788
  ]
778
789
  .sort((li1, li2) => {
@@ -814,11 +825,11 @@ export class Hydrator {
814
825
  pairs.push([authorDid, didFromUri(uri)])
815
826
  }
816
827
  }
817
- const blocks = await this.graph.getBidirectionalBlocks(pairs)
828
+ const blocks = await this.hydrateBidirectionalBlocks(pairsToMap(pairs))
818
829
  const likeBlocks = new HydrationMap<LikeBlock>()
819
830
  for (const [uri, like] of likes) {
820
831
  if (like) {
821
- likeBlocks.set(uri, blocks.isBlocked(authorDid, didFromUri(uri)))
832
+ likeBlocks.set(uri, isBlocked(blocks, [authorDid, didFromUri(uri)]))
822
833
  } else {
823
834
  likeBlocks.set(uri, null)
824
835
  }
@@ -898,13 +909,13 @@ export class Hydrator {
898
909
  pairs.push([didFromUri(uri), follow.record.subject])
899
910
  }
900
911
  }
901
- const blocks = await this.graph.getBidirectionalBlocks(pairs)
912
+ const blocks = await this.hydrateBidirectionalBlocks(pairsToMap(pairs))
902
913
  const followBlocks = new HydrationMap<FollowBlock>()
903
914
  for (const [uri, follow] of follows) {
904
915
  if (follow) {
905
916
  followBlocks.set(
906
917
  uri,
907
- blocks.isBlocked(didFromUri(uri), follow.record.subject),
918
+ isBlocked(blocks, [didFromUri(uri), follow.record.subject]),
908
919
  )
909
920
  } else {
910
921
  followBlocks.set(uri, null)
@@ -926,10 +937,32 @@ export class Hydrator {
926
937
  const result = new HydrationMap<HydrationMap<boolean>>()
927
938
  const blocks = await this.graph.getBidirectionalBlocks(pairs)
928
939
 
940
+ // lookup list authors to apply takedown status to blocklists
941
+ const listAuthorDids = new Set<string>()
942
+ for (const [source, targets] of didMap) {
943
+ for (const target of targets) {
944
+ const block = blocks.get(source, target)
945
+ if (block?.blockListUri) {
946
+ listAuthorDids.add(uriToDid(block.blockListUri))
947
+ }
948
+ }
949
+ }
950
+
951
+ const activeListAuthors = await this.actor.getActors(
952
+ [...listAuthorDids],
953
+ false,
954
+ )
955
+
929
956
  for (const [source, targets] of didMap) {
930
957
  const didBlocks = new HydrationMap<boolean>()
931
958
  for (const target of targets) {
932
- didBlocks.set(target, blocks.isBlocked(source, target))
959
+ const block = blocks.get(source, target)
960
+ const isBlocked = !!(
961
+ block?.blockUri ||
962
+ (block?.blockListUri &&
963
+ activeListAuthors.get(uriToDid(block.blockListUri)))
964
+ )
965
+ didBlocks.set(target, isBlocked)
933
966
  }
934
967
  result.set(source, didBlocks)
935
968
  }
@@ -1198,6 +1231,20 @@ const getListUrisFromThreadgates = (gates: Threadgates) => {
1198
1231
  return uris
1199
1232
  }
1200
1233
 
1234
+ const isBlocked = (blocks: BidirectionalBlocks, [a, b]: RelationshipPair) => {
1235
+ return blocks.get(a)?.get(b) ?? null
1236
+ }
1237
+
1238
+ const pairsToMap = (pairs: RelationshipPair[]): Map<string, string[]> => {
1239
+ const map = new Map<string, string[]>()
1240
+ for (const [a, b] of pairs) {
1241
+ const list = map.get(a) ?? []
1242
+ list.push(b)
1243
+ map.set(a, list)
1244
+ }
1245
+ return map
1246
+ }
1247
+
1201
1248
  export const mergeStates = (
1202
1249
  stateA: HydrationState,
1203
1250
  stateB: HydrationState,
@@ -1,6 +1,9 @@
1
+ import { AtUri } from '@atproto/syntax'
1
2
  import { DataPlaneClient } from '../data-plane/client'
2
- import { Label } from '../lexicon/types/com/atproto/label/defs'
3
+ import { ids } from '../lexicon/lexicons'
3
4
  import { Record as LabelerRecord } from '../lexicon/types/app/bsky/labeler/service'
5
+ import { Label } from '../lexicon/types/com/atproto/label/defs'
6
+ import { ParsedLabelers } from '../util'
4
7
  import {
5
8
  HydrationMap,
6
9
  Merges,
@@ -9,9 +12,6 @@ import {
9
12
  parseRecord,
10
13
  parseString,
11
14
  } from './util'
12
- import { AtUri } from '@atproto/syntax'
13
- import { ids } from '../lexicon/lexicons'
14
- import { ParsedLabelers } from '../util'
15
15
 
16
16
  export type { Label } from '../lexicon/types/com/atproto/label/defs'
17
17
 
@@ -1,7 +1,7 @@
1
- import { AtUri } from '@atproto/syntax'
2
- import { jsonToLex } from '@atproto/lexicon'
3
1
  import { CID } from 'multiformats/cid'
4
2
  import * as ui8 from 'uint8arrays'
3
+ import { jsonToLex } from '@atproto/lexicon'
4
+ import { AtUri } from '@atproto/syntax'
5
5
  import { lexicons } from '../lexicon/lexicons'
6
6
  import { Record } from '../proto/bsky_pb'
7
7
 
@@ -1,2 +1,2 @@
1
1
  export * from './sharp'
2
- export type { Options, ImageInfo } from './util'
2
+ export type { ImageInfo, Options } from './util'
@@ -1,26 +1,25 @@
1
- import {
2
- cloneStream,
3
- createDecoders,
4
- isErrnoException,
5
- VerifyCidError,
6
- VerifyCidTransform,
7
- } from '@atproto/common'
8
- import { BlobNotFoundError } from '@atproto/repo'
9
- import createError, { isHttpError } from 'http-errors'
10
1
  import fsSync from 'node:fs'
11
2
  import fs from 'node:fs/promises'
12
3
  import os from 'node:os'
13
4
  import path from 'node:path'
14
5
  import { Duplex, Readable } from 'node:stream'
15
6
  import { pipeline } from 'node:stream/promises'
16
-
17
- import { streamBlob, StreamBlobOptions } from '../api/blob-resolver'
18
- import AppContext from '../context'
7
+ import createError, { isHttpError } from 'http-errors'
8
+ import {
9
+ VerifyCidError,
10
+ VerifyCidTransform,
11
+ cloneStream,
12
+ createDecoders,
13
+ isErrnoException,
14
+ } from '@atproto/common'
15
+ import { BlobNotFoundError } from '@atproto/repo'
16
+ import { StreamBlobOptions, streamBlob } from '../api/blob-resolver'
17
+ import { AppContext } from '../context'
19
18
  import { Middleware, responseSignal } from '../util/http'
20
19
  import log from './logger'
21
20
  import { createImageProcessor, createImageUpscaler } from './sharp'
22
21
  import { BadPathError, ImageUriBuilder } from './uri'
23
- import { formatsToMimes, Options, SharpInfo } from './util'
22
+ import { Options, SharpInfo, formatsToMimes } from './util'
24
23
 
25
24
  export function createMiddleware(
26
25
  ctx: AppContext,
@@ -1,8 +1,8 @@
1
- import { errHasMsg } from '@atproto/common'
2
1
  import { PassThrough, Readable } from 'node:stream'
3
2
  import { pipeline } from 'node:stream/promises'
4
3
  import sharp from 'sharp'
5
- import { formatsToMimes, ImageInfo, Options } from './util'
4
+ import { errHasMsg } from '@atproto/common'
5
+ import { ImageInfo, Options, formatsToMimes } from './util'
6
6
 
7
7
  export type { Options }
8
8
 
package/src/index.ts CHANGED
@@ -1,39 +1,39 @@
1
- import express from 'express'
2
- import http from 'http'
3
- import { AddressInfo } from 'net'
4
- import events from 'events'
5
- import { createHttpTerminator, HttpTerminator } from 'http-terminator'
6
- import cors from 'cors'
1
+ import events from 'node:events'
2
+ import http from 'node:http'
3
+ import { AddressInfo } from 'node:net'
7
4
  import compression from 'compression'
5
+ import cors from 'cors'
6
+ import express from 'express'
7
+ import { HttpTerminator, createHttpTerminator } from 'http-terminator'
8
8
  import { AtpAgent } from '@atproto/api'
9
- import { IdResolver } from '@atproto/identity'
10
9
  import { DAY, SECOND } from '@atproto/common'
11
10
  import { Keypair } from '@atproto/crypto'
12
- import API, { health, wellKnown, blobResolver } from './api'
13
- import * as error from './error'
14
- import { loggerMiddleware } from './logger'
15
- import { ServerConfig } from './config'
16
- import { createServer } from './lexicon'
17
- import { ImageUriBuilder } from './image/uri'
18
- import * as imageServer from './image/server'
19
- import AppContext from './context'
20
- import { createDataPlaneClient } from './data-plane/client'
21
- import { Hydrator } from './hydration/hydrator'
22
- import { Views } from './views'
11
+ import { IdResolver } from '@atproto/identity'
12
+ import API, { blobResolver, health, wellKnown } from './api'
13
+ import { createBlobDispatcher } from './api/blob-dispatcher'
23
14
  import { AuthVerifier, createPublicKeyObject } from './auth-verifier'
24
15
  import { authWithApiKey as bsyncAuth, createBsyncClient } from './bsync'
16
+ import { ServerConfig } from './config'
17
+ import { AppContext } from './context'
25
18
  import { authWithApiKey as courierAuth, createCourierClient } from './courier'
19
+ import { createDataPlaneClient } from './data-plane/client'
20
+ import * as error from './error'
26
21
  import { FeatureGates } from './feature-gates'
22
+ import { Hydrator } from './hydration/hydrator'
23
+ import * as imageServer from './image/server'
24
+ import { ImageUriBuilder } from './image/uri'
25
+ import { createServer } from './lexicon'
26
+ import { loggerMiddleware } from './logger'
27
+ import { Views } from './views'
27
28
  import { VideoUriBuilder } from './views/util'
28
- import { createBlobDispatcher } from './api/blob-dispatcher'
29
29
 
30
- export * from './data-plane'
31
- export type { ServerConfigValues } from './config'
32
30
  export { ServerConfig } from './config'
33
- export { Database } from './data-plane/server/db'
34
- export { Redis } from './redis'
31
+ export type { ServerConfigValues } from './config'
35
32
  export { AppContext } from './context'
33
+ export * from './data-plane'
36
34
  export { BackgroundQueue } from './data-plane/server/background'
35
+ export { Database } from './data-plane/server/db'
36
+ export { Redis } from './redis'
37
37
 
38
38
  export class BskyAppView {
39
39
  public ctx: AppContext
@@ -4381,6 +4381,7 @@ export const schemaDict = {
4381
4381
  'lex:app.bsky.actor.defs#hiddenPostsPref',
4382
4382
  'lex:app.bsky.actor.defs#bskyAppStatePref',
4383
4383
  'lex:app.bsky.actor.defs#labelersPref',
4384
+ 'lex:app.bsky.actor.defs#postInteractionSettingsPref',
4384
4385
  ],
4385
4386
  },
4386
4387
  },
@@ -4714,6 +4715,38 @@ export const schemaDict = {
4714
4715
  },
4715
4716
  },
4716
4717
  },
4718
+ postInteractionSettingsPref: {
4719
+ type: 'object',
4720
+ description:
4721
+ 'Default post interaction settings for the account. These values should be applied as default values when creating new posts. These refs should mirror the threadgate and postgate records exactly.',
4722
+ required: [],
4723
+ properties: {
4724
+ threadgateAllowRules: {
4725
+ description:
4726
+ 'Matches threadgate record. List of rules defining who can reply to this users posts. If value is an empty array, no one can reply. If value is undefined, anyone can reply.',
4727
+ type: 'array',
4728
+ maxLength: 5,
4729
+ items: {
4730
+ type: 'union',
4731
+ refs: [
4732
+ 'lex:app.bsky.feed.threadgate#mentionRule',
4733
+ 'lex:app.bsky.feed.threadgate#followingRule',
4734
+ 'lex:app.bsky.feed.threadgate#listRule',
4735
+ ],
4736
+ },
4737
+ },
4738
+ postgateEmbeddingRules: {
4739
+ description:
4740
+ 'Matches postgate record. List of rules defining who can embed this users posts. If value is an empty array or is undefined, no particular rules apply and anyone can embed.',
4741
+ type: 'array',
4742
+ maxLength: 5,
4743
+ items: {
4744
+ type: 'union',
4745
+ refs: ['lex:app.bsky.feed.postgate#disableRule'],
4746
+ },
4747
+ },
4748
+ },
4749
+ },
4717
4750
  },
4718
4751
  },
4719
4752
  AppBskyActorGetPreferences: {
@@ -7120,6 +7153,8 @@ export const schemaDict = {
7120
7153
  'List of AT-URIs embedding this post that the author has detached from.',
7121
7154
  },
7122
7155
  embeddingRules: {
7156
+ description:
7157
+ 'List of rules defining who can embed this post. If value is an empty array or is undefined, no particular rules apply and anyone can embed.',
7123
7158
  type: 'array',
7124
7159
  maxLength: 5,
7125
7160
  items: {
@@ -7333,6 +7368,8 @@ export const schemaDict = {
7333
7368
  description: 'Reference (AT-URI) to the post record.',
7334
7369
  },
7335
7370
  allow: {
7371
+ description:
7372
+ 'List of rules defining who can reply to this post. If value is an empty array, no one can reply. If value is undefined, anyone can reply.',
7336
7373
  type: 'array',
7337
7374
  maxLength: 5,
7338
7375
  items: {
@@ -8,6 +8,8 @@ import { CID } from 'multiformats/cid'
8
8
  import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs'
9
9
  import * as AppBskyGraphDefs from '../graph/defs'
10
10
  import * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef'
11
+ import * as AppBskyFeedThreadgate from '../feed/threadgate'
12
+ import * as AppBskyFeedPostgate from '../feed/postgate'
11
13
 
12
14
  export interface ProfileViewBasic {
13
15
  did: string
@@ -188,6 +190,7 @@ export type Preferences = (
188
190
  | HiddenPostsPref
189
191
  | BskyAppStatePref
190
192
  | LabelersPref
193
+ | PostInteractionSettingsPref
191
194
  | { $type: string; [k: string]: unknown }
192
195
  )[]
193
196
 
@@ -532,3 +535,36 @@ export function isNux(v: unknown): v is Nux {
532
535
  export function validateNux(v: unknown): ValidationResult {
533
536
  return lexicons.validate('app.bsky.actor.defs#nux', v)
534
537
  }
538
+
539
+ /** Default post interaction settings for the account. These values should be applied as default values when creating new posts. These refs should mirror the threadgate and postgate records exactly. */
540
+ export interface PostInteractionSettingsPref {
541
+ /** Matches threadgate record. List of rules defining who can reply to this users posts. If value is an empty array, no one can reply. If value is undefined, anyone can reply. */
542
+ threadgateAllowRules?: (
543
+ | AppBskyFeedThreadgate.MentionRule
544
+ | AppBskyFeedThreadgate.FollowingRule
545
+ | AppBskyFeedThreadgate.ListRule
546
+ | { $type: string; [k: string]: unknown }
547
+ )[]
548
+ /** Matches postgate record. List of rules defining who can embed this users posts. If value is an empty array or is undefined, no particular rules apply and anyone can embed. */
549
+ postgateEmbeddingRules?: (
550
+ | AppBskyFeedPostgate.DisableRule
551
+ | { $type: string; [k: string]: unknown }
552
+ )[]
553
+ [k: string]: unknown
554
+ }
555
+
556
+ export function isPostInteractionSettingsPref(
557
+ v: unknown,
558
+ ): v is PostInteractionSettingsPref {
559
+ return (
560
+ isObj(v) &&
561
+ hasProp(v, '$type') &&
562
+ v.$type === 'app.bsky.actor.defs#postInteractionSettingsPref'
563
+ )
564
+ }
565
+
566
+ export function validatePostInteractionSettingsPref(
567
+ v: unknown,
568
+ ): ValidationResult {
569
+ return lexicons.validate('app.bsky.actor.defs#postInteractionSettingsPref', v)
570
+ }
@@ -12,6 +12,7 @@ export interface Record {
12
12
  post: string
13
13
  /** List of AT-URIs embedding this post that the author has detached from. */
14
14
  detachedEmbeddingUris?: string[]
15
+ /** List of rules defining who can embed this post. If value is an empty array or is undefined, no particular rules apply and anyone can embed. */
15
16
  embeddingRules?: (DisableRule | { $type: string; [k: string]: unknown })[]
16
17
  [k: string]: unknown
17
18
  }
@@ -9,6 +9,7 @@ import { CID } from 'multiformats/cid'
9
9
  export interface Record {
10
10
  /** Reference (AT-URI) to the post record. */
11
11
  post: string
12
+ /** List of rules defining who can reply to this post. If value is an empty array, no one can reply. If value is undefined, anyone can reply. */
12
13
  allow?: (
13
14
  | MentionRule
14
15
  | FollowingRule
package/src/logger.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { IncomingMessage } from 'node:http'
2
2
  import { stdSerializers } from 'pino'
3
- import pinoHttp from 'pino-http'
3
+ import { pinoHttp } from 'pino-http'
4
4
  import { obfuscateHeaders, subsystemLogger } from '@atproto/common'
5
5
 
6
6
  export const dbLogger: ReturnType<typeof subsystemLogger> =
package/src/redis.ts CHANGED
@@ -1,4 +1,4 @@
1
- import assert from 'assert'
1
+ import assert from 'node:assert'
2
2
  import { Redis as RedisDriver } from 'ioredis'
3
3
 
4
4
  export class Redis {
package/src/util/http.ts CHANGED
@@ -1,5 +1,5 @@
1
- import createHttpError from 'http-errors'
2
1
  import { IncomingMessage, ServerResponse } from 'node:http'
2
+ import createHttpError from 'http-errors'
3
3
  import { IncomingHttpHeaders } from 'undici/types/header'
4
4
 
5
5
  type NextFunction = (err?: unknown) => void
package/src/util/uris.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import { AtUri } from '@atproto/syntax'
2
2
  import { ids } from '../lexicon/lexicons'
3
3
  import {
4
- validateMain as validateStrongRef,
5
4
  Main as StrongRef,
5
+ validateMain as validateStrongRef,
6
6
  } from '../lexicon/types/com/atproto/repo/strongRef'
7
7
 
8
8
  /**