@atproto/bsky 0.0.243 → 0.0.245

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 (405) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/dist/api/app/bsky/actor/searchActorsTypeahead.js +5 -3
  3. package/dist/api/app/bsky/actor/searchActorsTypeahead.js.map +1 -1
  4. package/dist/api/app/bsky/feed/searchPostsV2.d.ts +4 -0
  5. package/dist/api/app/bsky/feed/searchPostsV2.d.ts.map +1 -0
  6. package/dist/api/app/bsky/feed/searchPostsV2.js +169 -0
  7. package/dist/api/app/bsky/feed/searchPostsV2.js.map +1 -0
  8. package/dist/api/app/bsky/notification/putPreferencesV2.js +4 -1
  9. package/dist/api/app/bsky/notification/putPreferencesV2.js.map +1 -1
  10. package/dist/api/app/bsky/notification/util.d.ts +1 -0
  11. package/dist/api/app/bsky/notification/util.d.ts.map +1 -1
  12. package/dist/api/app/bsky/notification/util.js +7 -7
  13. package/dist/api/app/bsky/notification/util.js.map +1 -1
  14. package/dist/api/blob-dispatcher.d.ts.map +1 -1
  15. package/dist/api/blob-dispatcher.js +9 -8
  16. package/dist/api/blob-dispatcher.js.map +1 -1
  17. package/dist/api/blob-resolver.d.ts +1 -1
  18. package/dist/api/blob-resolver.d.ts.map +1 -1
  19. package/dist/api/blob-resolver.js +0 -1
  20. package/dist/api/blob-resolver.js.map +1 -1
  21. package/dist/api/index.d.ts.map +1 -1
  22. package/dist/api/index.js +2 -0
  23. package/dist/api/index.js.map +1 -1
  24. package/dist/data-plane/bsync/index.d.ts +2 -0
  25. package/dist/data-plane/bsync/index.d.ts.map +1 -1
  26. package/dist/data-plane/bsync/index.js +7 -10
  27. package/dist/data-plane/bsync/index.js.map +1 -1
  28. package/dist/data-plane/server/background.d.ts +12 -8
  29. package/dist/data-plane/server/background.d.ts.map +1 -1
  30. package/dist/data-plane/server/background.js +32 -14
  31. package/dist/data-plane/server/background.js.map +1 -1
  32. package/dist/data-plane/server/index.d.ts +2 -0
  33. package/dist/data-plane/server/index.d.ts.map +1 -1
  34. package/dist/data-plane/server/index.js +7 -10
  35. package/dist/data-plane/server/index.js.map +1 -1
  36. package/dist/data-plane/server/indexing/index.d.ts +2 -2
  37. package/dist/data-plane/server/indexing/index.d.ts.map +1 -1
  38. package/dist/data-plane/server/indexing/index.js.map +1 -1
  39. package/dist/data-plane/server/indexing/plugins/block.d.ts +1 -1
  40. package/dist/data-plane/server/indexing/plugins/block.d.ts.map +1 -1
  41. package/dist/data-plane/server/indexing/plugins/block.js.map +1 -1
  42. package/dist/data-plane/server/indexing/plugins/chat-declaration.d.ts +1 -1
  43. package/dist/data-plane/server/indexing/plugins/chat-declaration.d.ts.map +1 -1
  44. package/dist/data-plane/server/indexing/plugins/chat-declaration.js.map +1 -1
  45. package/dist/data-plane/server/indexing/plugins/feed-generator.d.ts +1 -1
  46. package/dist/data-plane/server/indexing/plugins/feed-generator.d.ts.map +1 -1
  47. package/dist/data-plane/server/indexing/plugins/feed-generator.js.map +1 -1
  48. package/dist/data-plane/server/indexing/plugins/follow.d.ts +1 -1
  49. package/dist/data-plane/server/indexing/plugins/follow.d.ts.map +1 -1
  50. package/dist/data-plane/server/indexing/plugins/follow.js.map +1 -1
  51. package/dist/data-plane/server/indexing/plugins/germ-declaration.d.ts +1 -1
  52. package/dist/data-plane/server/indexing/plugins/germ-declaration.d.ts.map +1 -1
  53. package/dist/data-plane/server/indexing/plugins/germ-declaration.js.map +1 -1
  54. package/dist/data-plane/server/indexing/plugins/labeler.d.ts +1 -1
  55. package/dist/data-plane/server/indexing/plugins/labeler.d.ts.map +1 -1
  56. package/dist/data-plane/server/indexing/plugins/labeler.js.map +1 -1
  57. package/dist/data-plane/server/indexing/plugins/like.d.ts +1 -1
  58. package/dist/data-plane/server/indexing/plugins/like.d.ts.map +1 -1
  59. package/dist/data-plane/server/indexing/plugins/like.js.map +1 -1
  60. package/dist/data-plane/server/indexing/plugins/list-block.d.ts +1 -1
  61. package/dist/data-plane/server/indexing/plugins/list-block.d.ts.map +1 -1
  62. package/dist/data-plane/server/indexing/plugins/list-block.js.map +1 -1
  63. package/dist/data-plane/server/indexing/plugins/list-item.d.ts +1 -1
  64. package/dist/data-plane/server/indexing/plugins/list-item.d.ts.map +1 -1
  65. package/dist/data-plane/server/indexing/plugins/list-item.js.map +1 -1
  66. package/dist/data-plane/server/indexing/plugins/list.d.ts +1 -1
  67. package/dist/data-plane/server/indexing/plugins/list.d.ts.map +1 -1
  68. package/dist/data-plane/server/indexing/plugins/list.js.map +1 -1
  69. package/dist/data-plane/server/indexing/plugins/notif-declaration.d.ts +1 -1
  70. package/dist/data-plane/server/indexing/plugins/notif-declaration.d.ts.map +1 -1
  71. package/dist/data-plane/server/indexing/plugins/notif-declaration.js.map +1 -1
  72. package/dist/data-plane/server/indexing/plugins/post-gate.d.ts +1 -1
  73. package/dist/data-plane/server/indexing/plugins/post-gate.d.ts.map +1 -1
  74. package/dist/data-plane/server/indexing/plugins/post-gate.js.map +1 -1
  75. package/dist/data-plane/server/indexing/plugins/post.d.ts +1 -1
  76. package/dist/data-plane/server/indexing/plugins/post.d.ts.map +1 -1
  77. package/dist/data-plane/server/indexing/plugins/post.js.map +1 -1
  78. package/dist/data-plane/server/indexing/plugins/profile.d.ts +1 -1
  79. package/dist/data-plane/server/indexing/plugins/profile.d.ts.map +1 -1
  80. package/dist/data-plane/server/indexing/plugins/profile.js.map +1 -1
  81. package/dist/data-plane/server/indexing/plugins/repost.d.ts +1 -1
  82. package/dist/data-plane/server/indexing/plugins/repost.d.ts.map +1 -1
  83. package/dist/data-plane/server/indexing/plugins/repost.js.map +1 -1
  84. package/dist/data-plane/server/indexing/plugins/starter-pack.d.ts +1 -1
  85. package/dist/data-plane/server/indexing/plugins/starter-pack.d.ts.map +1 -1
  86. package/dist/data-plane/server/indexing/plugins/starter-pack.js.map +1 -1
  87. package/dist/data-plane/server/indexing/plugins/status.d.ts +1 -1
  88. package/dist/data-plane/server/indexing/plugins/status.d.ts.map +1 -1
  89. package/dist/data-plane/server/indexing/plugins/status.js.map +1 -1
  90. package/dist/data-plane/server/indexing/plugins/thread-gate.d.ts +1 -1
  91. package/dist/data-plane/server/indexing/plugins/thread-gate.d.ts.map +1 -1
  92. package/dist/data-plane/server/indexing/plugins/thread-gate.js.map +1 -1
  93. package/dist/data-plane/server/indexing/plugins/verification.d.ts +1 -1
  94. package/dist/data-plane/server/indexing/plugins/verification.d.ts.map +1 -1
  95. package/dist/data-plane/server/indexing/plugins/verification.js.map +1 -1
  96. package/dist/data-plane/server/indexing/processor.d.ts +1 -1
  97. package/dist/data-plane/server/indexing/processor.d.ts.map +1 -1
  98. package/dist/data-plane/server/indexing/processor.js.map +1 -1
  99. package/dist/data-plane/server/routes/notifs.d.ts.map +1 -1
  100. package/dist/data-plane/server/routes/notifs.js +1 -8
  101. package/dist/data-plane/server/routes/notifs.js.map +1 -1
  102. package/dist/data-plane/server/routes/search.js +3 -2
  103. package/dist/data-plane/server/routes/search.js.map +1 -1
  104. package/dist/data-plane/server/subscription.d.ts +13 -12
  105. package/dist/data-plane/server/subscription.d.ts.map +1 -1
  106. package/dist/data-plane/server/subscription.js +59 -26
  107. package/dist/data-plane/server/subscription.js.map +1 -1
  108. package/dist/feature-gates/index.d.ts +2 -1
  109. package/dist/feature-gates/index.d.ts.map +1 -1
  110. package/dist/feature-gates/index.js +9 -6
  111. package/dist/feature-gates/index.js.map +1 -1
  112. package/dist/feature-gates/metrics.d.ts +3 -3
  113. package/dist/feature-gates/metrics.d.ts.map +1 -1
  114. package/dist/feature-gates/metrics.js +8 -8
  115. package/dist/feature-gates/metrics.js.map +1 -1
  116. package/dist/index.d.ts +1 -0
  117. package/dist/index.d.ts.map +1 -1
  118. package/dist/index.js +16 -7
  119. package/dist/index.js.map +1 -1
  120. package/dist/lexicons/app/bsky/authFullApp.defs.d.ts.map +1 -1
  121. package/dist/lexicons/app/bsky/authFullApp.defs.js +1 -0
  122. package/dist/lexicons/app/bsky/authFullApp.defs.js.map +1 -1
  123. package/dist/lexicons/app/bsky/authViewAll.defs.d.ts.map +1 -1
  124. package/dist/lexicons/app/bsky/authViewAll.defs.js +1 -0
  125. package/dist/lexicons/app/bsky/authViewAll.defs.js.map +1 -1
  126. package/dist/lexicons/app/bsky/feed/searchPostsV2.d.ts +3 -0
  127. package/dist/lexicons/app/bsky/feed/searchPostsV2.d.ts.map +1 -0
  128. package/dist/lexicons/app/bsky/feed/searchPostsV2.defs.d.ts +158 -0
  129. package/dist/lexicons/app/bsky/feed/searchPostsV2.defs.d.ts.map +1 -0
  130. package/dist/lexicons/app/bsky/feed/searchPostsV2.defs.js +73 -0
  131. package/dist/lexicons/app/bsky/feed/searchPostsV2.defs.js.map +1 -0
  132. package/dist/lexicons/app/bsky/feed/searchPostsV2.js +6 -0
  133. package/dist/lexicons/app/bsky/feed/searchPostsV2.js.map +1 -0
  134. package/dist/lexicons/app/bsky/feed.d.ts +1 -0
  135. package/dist/lexicons/app/bsky/feed.d.ts.map +1 -1
  136. package/dist/lexicons/app/bsky/feed.js +1 -0
  137. package/dist/lexicons/app/bsky/feed.js.map +1 -1
  138. package/dist/lexicons/app/bsky/notification/defs.defs.d.ts +5 -0
  139. package/dist/lexicons/app/bsky/notification/defs.defs.d.ts.map +1 -1
  140. package/dist/lexicons/app/bsky/notification/defs.defs.js +1 -0
  141. package/dist/lexicons/app/bsky/notification/defs.defs.js.map +1 -1
  142. package/dist/lexicons/chat/bsky/actor/declaration.defs.d.ts +1 -1
  143. package/dist/lexicons/chat/bsky/actor/declaration.defs.js.map +1 -1
  144. package/dist/lexicons/chat/bsky/actor/defs.defs.d.ts +4 -6
  145. package/dist/lexicons/chat/bsky/actor/defs.defs.d.ts.map +1 -1
  146. package/dist/lexicons/chat/bsky/actor/defs.defs.js +2 -3
  147. package/dist/lexicons/chat/bsky/actor/defs.defs.js.map +1 -1
  148. package/dist/lexicons/chat/bsky/convo/defs.defs.d.ts +64 -70
  149. package/dist/lexicons/chat/bsky/convo/defs.defs.d.ts.map +1 -1
  150. package/dist/lexicons/chat/bsky/convo/defs.defs.js +32 -35
  151. package/dist/lexicons/chat/bsky/convo/defs.defs.js.map +1 -1
  152. package/dist/lexicons/chat/bsky/convo/getUnreadCounts.defs.d.ts +1 -1
  153. package/dist/lexicons/chat/bsky/convo/getUnreadCounts.defs.d.ts.map +1 -1
  154. package/dist/lexicons/chat/bsky/convo/getUnreadCounts.defs.js +1 -1
  155. package/dist/lexicons/chat/bsky/convo/getUnreadCounts.defs.js.map +1 -1
  156. package/dist/lexicons/chat/bsky/convo/listConvoRequests.defs.d.ts +1 -1
  157. package/dist/lexicons/chat/bsky/convo/listConvoRequests.defs.d.ts.map +1 -1
  158. package/dist/lexicons/chat/bsky/convo/listConvoRequests.defs.js +1 -1
  159. package/dist/lexicons/chat/bsky/convo/listConvoRequests.defs.js.map +1 -1
  160. package/dist/lexicons/chat/bsky/convo/lockConvo.defs.d.ts +1 -1
  161. package/dist/lexicons/chat/bsky/convo/lockConvo.defs.d.ts.map +1 -1
  162. package/dist/lexicons/chat/bsky/convo/lockConvo.defs.js +1 -1
  163. package/dist/lexicons/chat/bsky/convo/lockConvo.defs.js.map +1 -1
  164. package/dist/lexicons/chat/bsky/convo/unlockConvo.defs.d.ts +1 -1
  165. package/dist/lexicons/chat/bsky/convo/unlockConvo.defs.d.ts.map +1 -1
  166. package/dist/lexicons/chat/bsky/convo/unlockConvo.defs.js +1 -1
  167. package/dist/lexicons/chat/bsky/convo/unlockConvo.defs.js.map +1 -1
  168. package/dist/lexicons/chat/bsky/group/addMembers.defs.d.ts +1 -1
  169. package/dist/lexicons/chat/bsky/group/addMembers.defs.d.ts.map +1 -1
  170. package/dist/lexicons/chat/bsky/group/addMembers.defs.js +1 -1
  171. package/dist/lexicons/chat/bsky/group/addMembers.defs.js.map +1 -1
  172. package/dist/lexicons/chat/bsky/group/approveJoinRequest.defs.d.ts +1 -1
  173. package/dist/lexicons/chat/bsky/group/approveJoinRequest.defs.d.ts.map +1 -1
  174. package/dist/lexicons/chat/bsky/group/approveJoinRequest.defs.js +1 -1
  175. package/dist/lexicons/chat/bsky/group/approveJoinRequest.defs.js.map +1 -1
  176. package/dist/lexicons/chat/bsky/group/createGroup.defs.d.ts +1 -1
  177. package/dist/lexicons/chat/bsky/group/createGroup.defs.d.ts.map +1 -1
  178. package/dist/lexicons/chat/bsky/group/createGroup.defs.js +1 -1
  179. package/dist/lexicons/chat/bsky/group/createGroup.defs.js.map +1 -1
  180. package/dist/lexicons/chat/bsky/group/createJoinLink.defs.d.ts +1 -1
  181. package/dist/lexicons/chat/bsky/group/createJoinLink.defs.d.ts.map +1 -1
  182. package/dist/lexicons/chat/bsky/group/createJoinLink.defs.js +1 -1
  183. package/dist/lexicons/chat/bsky/group/createJoinLink.defs.js.map +1 -1
  184. package/dist/lexicons/chat/bsky/group/disableJoinLink.defs.d.ts +1 -1
  185. package/dist/lexicons/chat/bsky/group/disableJoinLink.defs.d.ts.map +1 -1
  186. package/dist/lexicons/chat/bsky/group/disableJoinLink.defs.js +1 -1
  187. package/dist/lexicons/chat/bsky/group/disableJoinLink.defs.js.map +1 -1
  188. package/dist/lexicons/chat/bsky/group/editGroup.defs.d.ts +1 -1
  189. package/dist/lexicons/chat/bsky/group/editGroup.defs.d.ts.map +1 -1
  190. package/dist/lexicons/chat/bsky/group/editGroup.defs.js +1 -1
  191. package/dist/lexicons/chat/bsky/group/editGroup.defs.js.map +1 -1
  192. package/dist/lexicons/chat/bsky/group/editJoinLink.defs.d.ts +1 -1
  193. package/dist/lexicons/chat/bsky/group/editJoinLink.defs.d.ts.map +1 -1
  194. package/dist/lexicons/chat/bsky/group/editJoinLink.defs.js +1 -1
  195. package/dist/lexicons/chat/bsky/group/editJoinLink.defs.js.map +1 -1
  196. package/dist/lexicons/chat/bsky/group/enableJoinLink.defs.d.ts +1 -1
  197. package/dist/lexicons/chat/bsky/group/enableJoinLink.defs.d.ts.map +1 -1
  198. package/dist/lexicons/chat/bsky/group/enableJoinLink.defs.js +1 -1
  199. package/dist/lexicons/chat/bsky/group/enableJoinLink.defs.js.map +1 -1
  200. package/dist/lexicons/chat/bsky/group/getJoinLinkPreviews.defs.d.ts +1 -1
  201. package/dist/lexicons/chat/bsky/group/getJoinLinkPreviews.defs.d.ts.map +1 -1
  202. package/dist/lexicons/chat/bsky/group/getJoinLinkPreviews.defs.js +1 -1
  203. package/dist/lexicons/chat/bsky/group/getJoinLinkPreviews.defs.js.map +1 -1
  204. package/dist/lexicons/chat/bsky/group/listJoinRequests.defs.d.ts +1 -1
  205. package/dist/lexicons/chat/bsky/group/listJoinRequests.defs.d.ts.map +1 -1
  206. package/dist/lexicons/chat/bsky/group/listJoinRequests.defs.js +1 -1
  207. package/dist/lexicons/chat/bsky/group/listJoinRequests.defs.js.map +1 -1
  208. package/dist/lexicons/chat/bsky/group/listMutualGroups.defs.d.ts +1 -1
  209. package/dist/lexicons/chat/bsky/group/listMutualGroups.defs.d.ts.map +1 -1
  210. package/dist/lexicons/chat/bsky/group/listMutualGroups.defs.js +1 -1
  211. package/dist/lexicons/chat/bsky/group/listMutualGroups.defs.js.map +1 -1
  212. package/dist/lexicons/chat/bsky/group/rejectJoinRequest.defs.d.ts +1 -1
  213. package/dist/lexicons/chat/bsky/group/rejectJoinRequest.defs.d.ts.map +1 -1
  214. package/dist/lexicons/chat/bsky/group/rejectJoinRequest.defs.js +1 -1
  215. package/dist/lexicons/chat/bsky/group/rejectJoinRequest.defs.js.map +1 -1
  216. package/dist/lexicons/chat/bsky/group/removeMembers.defs.d.ts +1 -1
  217. package/dist/lexicons/chat/bsky/group/removeMembers.defs.d.ts.map +1 -1
  218. package/dist/lexicons/chat/bsky/group/removeMembers.defs.js +1 -1
  219. package/dist/lexicons/chat/bsky/group/removeMembers.defs.js.map +1 -1
  220. package/dist/lexicons/chat/bsky/group/requestJoin.defs.d.ts +1 -1
  221. package/dist/lexicons/chat/bsky/group/requestJoin.defs.d.ts.map +1 -1
  222. package/dist/lexicons/chat/bsky/group/requestJoin.defs.js +1 -1
  223. package/dist/lexicons/chat/bsky/group/requestJoin.defs.js.map +1 -1
  224. package/dist/lexicons/chat/bsky/group/updateJoinRequestsRead.defs.d.ts +1 -1
  225. package/dist/lexicons/chat/bsky/group/updateJoinRequestsRead.defs.d.ts.map +1 -1
  226. package/dist/lexicons/chat/bsky/group/updateJoinRequestsRead.defs.js +1 -1
  227. package/dist/lexicons/chat/bsky/group/updateJoinRequestsRead.defs.js.map +1 -1
  228. package/dist/lexicons/chat/bsky/group/withdrawJoinRequest.defs.d.ts +1 -1
  229. package/dist/lexicons/chat/bsky/group/withdrawJoinRequest.defs.d.ts.map +1 -1
  230. package/dist/lexicons/chat/bsky/group/withdrawJoinRequest.defs.js +1 -1
  231. package/dist/lexicons/chat/bsky/group/withdrawJoinRequest.defs.js.map +1 -1
  232. package/dist/lexicons/chat/bsky/moderation/defs.defs.d.ts +6 -6
  233. package/dist/lexicons/chat/bsky/moderation/defs.defs.d.ts.map +1 -1
  234. package/dist/lexicons/chat/bsky/moderation/defs.defs.js +3 -3
  235. package/dist/lexicons/chat/bsky/moderation/defs.defs.js.map +1 -1
  236. package/dist/lexicons/chat/bsky/moderation/getConvo.defs.d.ts +1 -1
  237. package/dist/lexicons/chat/bsky/moderation/getConvo.defs.d.ts.map +1 -1
  238. package/dist/lexicons/chat/bsky/moderation/getConvo.defs.js +1 -1
  239. package/dist/lexicons/chat/bsky/moderation/getConvo.defs.js.map +1 -1
  240. package/dist/lexicons/chat/bsky/moderation/getConvoMembers.defs.d.ts +1 -1
  241. package/dist/lexicons/chat/bsky/moderation/getConvoMembers.defs.d.ts.map +1 -1
  242. package/dist/lexicons/chat/bsky/moderation/getConvoMembers.defs.js +1 -1
  243. package/dist/lexicons/chat/bsky/moderation/getConvoMembers.defs.js.map +1 -1
  244. package/dist/lexicons/chat/bsky/moderation/getConvos.defs.d.ts +1 -1
  245. package/dist/lexicons/chat/bsky/moderation/getConvos.defs.d.ts.map +1 -1
  246. package/dist/lexicons/chat/bsky/moderation/getConvos.defs.js +1 -1
  247. package/dist/lexicons/chat/bsky/moderation/getConvos.defs.js.map +1 -1
  248. package/dist/lexicons/chat/bsky/notification/defs.d.ts +2 -0
  249. package/dist/lexicons/chat/bsky/notification/defs.d.ts.map +1 -0
  250. package/dist/lexicons/chat/bsky/notification/defs.defs.d.ts +20 -0
  251. package/dist/lexicons/chat/bsky/notification/defs.defs.d.ts.map +1 -0
  252. package/dist/lexicons/chat/bsky/notification/defs.defs.js +19 -0
  253. package/dist/lexicons/chat/bsky/notification/defs.defs.js.map +1 -0
  254. package/dist/lexicons/chat/bsky/notification/defs.js +5 -0
  255. package/dist/lexicons/chat/bsky/notification/defs.js.map +1 -0
  256. package/dist/lexicons/chat/bsky/notification/getPreferences.d.ts +3 -0
  257. package/dist/lexicons/chat/bsky/notification/getPreferences.d.ts.map +1 -0
  258. package/dist/lexicons/chat/bsky/notification/getPreferences.defs.d.ts +18 -0
  259. package/dist/lexicons/chat/bsky/notification/getPreferences.defs.d.ts.map +1 -0
  260. package/dist/lexicons/chat/bsky/notification/getPreferences.defs.js +16 -0
  261. package/dist/lexicons/chat/bsky/notification/getPreferences.defs.js.map +1 -0
  262. package/dist/lexicons/chat/bsky/notification/getPreferences.js +6 -0
  263. package/dist/lexicons/chat/bsky/notification/getPreferences.js.map +1 -0
  264. package/dist/lexicons/chat/bsky/notification/putPreferences.d.ts +3 -0
  265. package/dist/lexicons/chat/bsky/notification/putPreferences.d.ts.map +1 -0
  266. package/dist/lexicons/chat/bsky/notification/putPreferences.defs.d.ts +27 -0
  267. package/dist/lexicons/chat/bsky/notification/putPreferences.defs.d.ts.map +1 -0
  268. package/dist/lexicons/chat/bsky/notification/putPreferences.defs.js +22 -0
  269. package/dist/lexicons/chat/bsky/notification/putPreferences.defs.js.map +1 -0
  270. package/dist/lexicons/chat/bsky/notification/putPreferences.js +6 -0
  271. package/dist/lexicons/chat/bsky/notification/putPreferences.js.map +1 -0
  272. package/dist/lexicons/chat/bsky/notification.d.ts +4 -0
  273. package/dist/lexicons/chat/bsky/notification.d.ts.map +1 -0
  274. package/dist/lexicons/chat/bsky/notification.js +7 -0
  275. package/dist/lexicons/chat/bsky/notification.js.map +1 -0
  276. package/dist/lexicons/chat/bsky.d.ts +1 -0
  277. package/dist/lexicons/chat/bsky.d.ts.map +1 -1
  278. package/dist/lexicons/chat/bsky.js +1 -0
  279. package/dist/lexicons/chat/bsky.js.map +1 -1
  280. package/dist/lexicons/tools/ozone/report/defs.defs.d.ts +4 -0
  281. package/dist/lexicons/tools/ozone/report/defs.defs.d.ts.map +1 -1
  282. package/dist/lexicons/tools/ozone/report/defs.defs.js +2 -0
  283. package/dist/lexicons/tools/ozone/report/defs.defs.js.map +1 -1
  284. package/dist/lexicons/tools/ozone/report/queryActivities.d.ts +3 -0
  285. package/dist/lexicons/tools/ozone/report/queryActivities.d.ts.map +1 -0
  286. package/dist/lexicons/tools/ozone/report/queryActivities.defs.d.ts +42 -0
  287. package/dist/lexicons/tools/ozone/report/queryActivities.defs.d.ts.map +1 -0
  288. package/dist/lexicons/tools/ozone/report/queryActivities.defs.js +31 -0
  289. package/dist/lexicons/tools/ozone/report/queryActivities.defs.js.map +1 -0
  290. package/dist/lexicons/tools/ozone/report/queryActivities.js +6 -0
  291. package/dist/lexicons/tools/ozone/report/queryActivities.js.map +1 -0
  292. package/dist/lexicons/tools/ozone/report.d.ts +1 -0
  293. package/dist/lexicons/tools/ozone/report.d.ts.map +1 -1
  294. package/dist/lexicons/tools/ozone/report.js +1 -0
  295. package/dist/lexicons/tools/ozone/report.js.map +1 -1
  296. package/dist/proto/bsky_pb.d.ts +51 -55
  297. package/dist/proto/bsky_pb.d.ts.map +1 -1
  298. package/dist/proto/bsky_pb.js +67 -74
  299. package/dist/proto/bsky_pb.js.map +1 -1
  300. package/package.json +9 -9
  301. package/proto/bsky.proto +21 -18
  302. package/src/api/app/bsky/actor/searchActorsTypeahead.ts +5 -3
  303. package/src/api/app/bsky/feed/searchPostsV2.ts +232 -0
  304. package/src/api/app/bsky/notification/putPreferencesV2.ts +4 -1
  305. package/src/api/app/bsky/notification/util.ts +7 -11
  306. package/src/api/blob-dispatcher.ts +12 -8
  307. package/src/api/blob-resolver.ts +0 -1
  308. package/src/api/index.ts +2 -0
  309. package/src/data-plane/bsync/index.ts +12 -10
  310. package/src/data-plane/server/background.ts +49 -18
  311. package/src/data-plane/server/index.ts +12 -10
  312. package/src/data-plane/server/indexing/index.ts +1 -1
  313. package/src/data-plane/server/indexing/plugins/block.ts +4 -1
  314. package/src/data-plane/server/indexing/plugins/chat-declaration.ts +4 -1
  315. package/src/data-plane/server/indexing/plugins/feed-generator.ts +4 -1
  316. package/src/data-plane/server/indexing/plugins/follow.ts +4 -1
  317. package/src/data-plane/server/indexing/plugins/germ-declaration.ts +4 -1
  318. package/src/data-plane/server/indexing/plugins/labeler.ts +4 -1
  319. package/src/data-plane/server/indexing/plugins/like.ts +4 -1
  320. package/src/data-plane/server/indexing/plugins/list-block.ts +4 -1
  321. package/src/data-plane/server/indexing/plugins/list-item.ts +4 -1
  322. package/src/data-plane/server/indexing/plugins/list.ts +4 -1
  323. package/src/data-plane/server/indexing/plugins/notif-declaration.ts +4 -1
  324. package/src/data-plane/server/indexing/plugins/post-gate.ts +4 -1
  325. package/src/data-plane/server/indexing/plugins/post.ts +4 -1
  326. package/src/data-plane/server/indexing/plugins/profile.ts +4 -1
  327. package/src/data-plane/server/indexing/plugins/repost.ts +4 -1
  328. package/src/data-plane/server/indexing/plugins/starter-pack.ts +4 -1
  329. package/src/data-plane/server/indexing/plugins/status.ts +4 -1
  330. package/src/data-plane/server/indexing/plugins/thread-gate.ts +4 -1
  331. package/src/data-plane/server/indexing/plugins/verification.ts +4 -1
  332. package/src/data-plane/server/indexing/processor.ts +1 -1
  333. package/src/data-plane/server/routes/notifs.ts +0 -14
  334. package/src/data-plane/server/routes/search.ts +3 -2
  335. package/src/data-plane/server/subscription.ts +74 -31
  336. package/src/feature-gates/index.ts +10 -6
  337. package/src/feature-gates/metrics.test.ts +12 -12
  338. package/src/feature-gates/metrics.ts +8 -8
  339. package/src/index.ts +16 -9
  340. package/tests/_util.ts +8 -25
  341. package/tests/admin/admin-auth.test.ts +2 -2
  342. package/tests/admin/moderation.test.ts +1 -1
  343. package/tests/auth.test.ts +4 -6
  344. package/tests/blob-resolver.test.ts +4 -5
  345. package/tests/data-plane/db.test.ts +1 -1
  346. package/tests/data-plane/duplicate-records.test.ts +1 -1
  347. package/tests/data-plane/handle-invalidation.test.ts +2 -2
  348. package/tests/data-plane/indexing.test.ts +24 -21
  349. package/tests/data-plane/subscription.test.ts +1 -1
  350. package/tests/data-plane/thread-mutes.test.ts +2 -2
  351. package/tests/entryway-auth.test.ts +4 -5
  352. package/tests/feed-generation.test.ts +5 -5
  353. package/tests/image/server.test.ts +1 -1
  354. package/tests/label-hydration.test.ts +3 -5
  355. package/tests/postgates.test.ts +3 -6
  356. package/tests/query-labels.test.ts +3 -5
  357. package/tests/redis-cache.test.ts +1 -3
  358. package/tests/server.test.ts +11 -16
  359. package/tests/sitemap.test.ts +3 -4
  360. package/tests/stash.test.ts +12 -8
  361. package/tests/utils.test.ts +3 -13
  362. package/tests/views/account-deactivation.test.ts +3 -5
  363. package/tests/views/actor-likes.test.ts +3 -5
  364. package/tests/views/actor-search.test.ts +6 -7
  365. package/tests/views/age-assurance-v2.test.ts +9 -6
  366. package/tests/views/age-assurance.test.ts +30 -36
  367. package/tests/views/author-feed.test.ts +4 -6
  368. package/tests/views/block-lists.test.ts +3 -5
  369. package/tests/views/blocks.test.ts +3 -5
  370. package/tests/views/bookmarks.test.ts +4 -4
  371. package/tests/views/drafts.test.ts +7 -14
  372. package/tests/views/feed-hidden-replies.test.ts +3 -6
  373. package/tests/views/feed-view-post.test.ts +3 -6
  374. package/tests/views/follows.test.ts +4 -6
  375. package/tests/views/get-config.test.ts +4 -7
  376. package/tests/views/get-suggested-onboarding-users.test.ts +11 -9
  377. package/tests/views/get-suggested-starter-packs.test.ts +11 -9
  378. package/tests/views/get-trends.test.ts +15 -9
  379. package/tests/views/internal-actor.test.ts +3 -6
  380. package/tests/views/known-followers.test.ts +3 -6
  381. package/tests/views/labeler-service.test.ts +3 -5
  382. package/tests/views/labels-needs-review.test.ts +3 -6
  383. package/tests/views/labels-takedown.test.ts +3 -4
  384. package/tests/views/likes.test.ts +4 -6
  385. package/tests/views/list-feed.test.ts +3 -5
  386. package/tests/views/lists.test.ts +3 -5
  387. package/tests/views/mute-lists.test.ts +3 -5
  388. package/tests/views/mutes.test.ts +4 -5
  389. package/tests/views/notifications.test.ts +12 -11
  390. package/tests/views/post-search.test.ts +3 -24
  391. package/tests/views/posts-debug.test.ts +11 -6
  392. package/tests/views/posts.test.ts +3 -4
  393. package/tests/views/profile-debug.test.ts +11 -5
  394. package/tests/views/profile.test.ts +11 -5
  395. package/tests/views/quotes.test.ts +4 -6
  396. package/tests/views/reposts.test.ts +4 -6
  397. package/tests/views/starter-packs.test.ts +3 -6
  398. package/tests/views/suggestions.test.ts +9 -13
  399. package/tests/views/thread-v2.test.ts +3 -5
  400. package/tests/views/thread.test.ts +3 -7
  401. package/tests/views/threadgating.test.ts +3 -5
  402. package/tests/views/timeline.test.ts +4 -5
  403. package/tests/views/verification.test.ts +4 -6
  404. package/tsconfig.build.tsbuildinfo +1 -1
  405. package/vitest.config.ts +1 -0
@@ -1,4 +1,4 @@
1
- import { afterAll, beforeAll, describe, expect, it } from 'vitest'
1
+ import { afterAll, beforeAll, beforeEach, describe, expect, it } from 'vitest'
2
2
  import { AtpAgent, ids } from '@atproto/api'
3
3
  import { SeedClient, TestNetwork } from '@atproto/dev-env'
4
4
  import { knownFollowersSeed } from '../seed/known-followers.js'
@@ -54,13 +54,10 @@ describe('known followers (social proof)', () => {
54
54
  { createdAt: new Date().toISOString(), subject: dids.mix_sp_block_res },
55
55
  seedClient.getHeaders(dids.mix_sub_1),
56
56
  )
57
-
58
- await network.processAll()
59
57
  })
60
58
 
61
- afterAll(async () => {
62
- await network.close()
63
- })
59
+ beforeEach(async () => network.processAll())
60
+ afterAll(async () => network?.close())
64
61
 
65
62
  /*
66
63
  * Note that this test arbitrarily uses `getFollows` bc atm it returns
@@ -1,5 +1,5 @@
1
1
  import assert from 'node:assert'
2
- import { afterAll, beforeAll, describe, expect, it } from 'vitest'
2
+ import { afterAll, beforeAll, beforeEach, describe, expect, it } from 'vitest'
3
3
  import {
4
4
  AppBskyEmbedRecord,
5
5
  AppBskyLabelerDefs,
@@ -67,12 +67,10 @@ describe('labeler service views', () => {
67
67
  aliceService = new RecordRef(aliceRes.data.uri, aliceRes.data.cid)
68
68
 
69
69
  await sc.like(bob, aliceService)
70
- await network.processAll()
71
70
  })
72
71
 
73
- afterAll(async () => {
74
- await network.close()
75
- })
72
+ beforeEach(async () => network.processAll())
73
+ afterAll(async () => network?.close())
76
74
 
77
75
  it('fetches labelers', async () => {
78
76
  const view = await agent.api.app.bsky.labeler.getServices(
@@ -1,5 +1,5 @@
1
1
  import assert from 'node:assert'
2
- import { afterAll, beforeAll, describe, expect, it } from 'vitest'
2
+ import { afterAll, beforeAll, beforeEach, describe, expect, it } from 'vitest'
3
3
  import { AppBskyFeedDefs, AtpAgent, ids } from '@atproto/api'
4
4
  import { SeedClient, TestNetwork, basicSeed } from '@atproto/dev-env'
5
5
 
@@ -39,14 +39,11 @@ describe('bsky needs-review labels', () => {
39
39
 
40
40
  await sc.follow(sc.dids.bob, sc.dids.geoff)
41
41
 
42
- await network.processAll()
43
-
44
42
  AtpAgent.configure({ appLabelers: [network.ozone.ctx.cfg.service.did] })
45
43
  })
46
44
 
47
- afterAll(async () => {
48
- await network.close()
49
- })
45
+ beforeEach(async () => network.processAll())
46
+ afterAll(async () => network?.close())
50
47
 
51
48
  describe('account-level', () => {
52
49
  beforeAll(async () => {
@@ -1,5 +1,5 @@
1
1
  import assert from 'node:assert'
2
- import { afterAll, beforeAll, describe, expect, it } from 'vitest'
2
+ import { afterAll, beforeAll, beforeEach, describe, expect, it } from 'vitest'
3
3
  import { AppBskyLabelerDefs, AtpAgent, ids } from '@atproto/api'
4
4
  import { RecordRef, SeedClient, TestNetwork, basicSeed } from '@atproto/dev-env'
5
5
 
@@ -131,9 +131,8 @@ describe('bsky takedown labels', () => {
131
131
  await network.bsky.db.db.insertInto('label').values(labels).execute()
132
132
  })
133
133
 
134
- afterAll(async () => {
135
- await network.close()
136
- })
134
+ beforeEach(async () => network.processAll())
135
+ afterAll(async () => network?.close())
137
136
 
138
137
  it('takesdown profiles', async () => {
139
138
  const attempt = agent.api.app.bsky.actor.getProfile({
@@ -1,4 +1,4 @@
1
- import { afterAll, beforeAll, describe, expect, it } from 'vitest'
1
+ import { afterAll, beforeAll, beforeEach, describe, expect, it } from 'vitest'
2
2
  import { AppBskyFeedGetLikes, AtpAgent, ids } from '@atproto/api'
3
3
  import { SeedClient, TestNetwork, likesSeed } from '@atproto/dev-env'
4
4
  import {
@@ -31,18 +31,16 @@ describe('pds like views', () => {
31
31
  email: 'frankie@frankie.com',
32
32
  password: 'password',
33
33
  })
34
- await network.processAll()
35
34
 
36
35
  alice = sc.dids.alice
37
36
  bob = sc.dids.bob
38
37
  carol = sc.dids.carol
39
38
  frankie = sc.dids.frankie
40
- }, 20_000) // @NOTE seeding can take a while
41
-
42
- afterAll(async () => {
43
- await network.close()
44
39
  })
45
40
 
41
+ beforeEach(async () => network.processAll())
42
+ afterAll(async () => network?.close())
43
+
46
44
  const getCursors = (items: { createdAt?: string }[]) =>
47
45
  items.map((item) => item.createdAt ?? constantDate)
48
46
 
@@ -1,4 +1,4 @@
1
- import { afterAll, beforeAll, describe, expect, it } from 'vitest'
1
+ import { afterAll, beforeAll, beforeEach, describe, expect, it } from 'vitest'
2
2
  import { AppBskyFeedGetListFeed, AtpAgent, ids } from '@atproto/api'
3
3
  import { RecordRef, SeedClient, TestNetwork, basicSeed } from '@atproto/dev-env'
4
4
  import {
@@ -33,12 +33,10 @@ describe('list feed views', () => {
33
33
  listRef = await sc.createList(alice, 'test list', 'curate')
34
34
  await sc.addToList(alice, alice, listRef)
35
35
  await sc.addToList(alice, bob, listRef)
36
- await network.processAll()
37
36
  })
38
37
 
39
- afterAll(async () => {
40
- await network.close()
41
- })
38
+ beforeEach(async () => network.processAll())
39
+ afterAll(async () => network?.close())
42
40
 
43
41
  it('fetches list feed', async () => {
44
42
  const res = await agent.api.app.bsky.feed.getListFeed(
@@ -1,4 +1,4 @@
1
- import { afterAll, beforeAll, describe, expect, it } from 'vitest'
1
+ import { afterAll, beforeAll, beforeEach, describe, expect, it } from 'vitest'
2
2
  import {
3
3
  AppBskyGraphGetLists,
4
4
  AppBskyGraphGetListsWithMembership,
@@ -86,7 +86,6 @@ describe('bsky actor likes feed views', () => {
86
86
  await sc.block(sc.dids.frankie, sc.dids.greta)
87
87
  await sc.block(sc.dids.frankie, sc.dids.eve)
88
88
 
89
- await network.processAll()
90
89
  blockList = newBlockList.uriStr
91
90
  curateList = newCurList.uriStr
92
91
  referenceList = newRefList.uriStr
@@ -102,9 +101,8 @@ describe('bsky actor likes feed views', () => {
102
101
  greta = sc.dids.greta
103
102
  })
104
103
 
105
- afterAll(async () => {
106
- await network.close()
107
- })
104
+ beforeEach(async () => network.processAll())
105
+ afterAll(async () => network?.close())
108
106
 
109
107
  it('does not include reference lists in getActorLists', async () => {
110
108
  const view = await agent.app.bsky.graph.getLists({
@@ -1,4 +1,4 @@
1
- import { afterAll, beforeAll, describe, expect, it } from 'vitest'
1
+ import { afterAll, beforeAll, beforeEach, describe, expect, it } from 'vitest'
2
2
  import { AtUri, AtpAgent, ids } from '@atproto/api'
3
3
  import { RecordRef, SeedClient, TestNetwork, basicSeed } from '@atproto/dev-env'
4
4
  import { forSnapshot } from '../_util.js'
@@ -29,12 +29,10 @@ describe('bsky views with mutes from mute lists', () => {
29
29
  // add follows to ensure mutes work even w follows
30
30
  await sc.follow(carol, dan)
31
31
  await sc.follow(dan, carol)
32
- await network.processAll()
33
32
  })
34
33
 
35
- afterAll(async () => {
36
- await network.close()
37
- })
34
+ beforeEach(async () => network.processAll())
35
+ afterAll(async () => network?.close())
38
36
 
39
37
  let listUri: string
40
38
  let listCid: string
@@ -1,4 +1,4 @@
1
- import { afterAll, beforeAll, describe, expect, it } from 'vitest'
1
+ import { afterAll, beforeAll, beforeEach, describe, expect, it } from 'vitest'
2
2
  import { AppBskyGraphGetMutes, AtpAgent, ids } from '@atproto/api'
3
3
  import {
4
4
  SeedClient,
@@ -54,12 +54,11 @@ describe('mute views', () => {
54
54
  },
55
55
  )
56
56
  }
57
- }, 20_000) // @NOTE seeding can take a while
58
-
59
- afterAll(async () => {
60
- await network.close()
61
57
  })
62
58
 
59
+ beforeEach(async () => network.processAll())
60
+ afterAll(async () => network?.close())
61
+
63
62
  it('flags mutes in threads', async () => {
64
63
  const res = await agent.api.app.bsky.feed.getPostThread(
65
64
  { depth: 1, uri: sc.posts[alice][1].ref.uriStr },
@@ -91,8 +91,6 @@ describe('notification views', () => {
91
91
  password: 'blocked-pass',
92
92
  })
93
93
 
94
- await network.processAll()
95
-
96
94
  alice = sc.dids.alice
97
95
  bob = sc.dids.bob
98
96
  carol = sc.dids.carol
@@ -104,9 +102,8 @@ describe('notification views', () => {
104
102
  blocked = sc.dids.blocked
105
103
  })
106
104
 
107
- afterAll(async () => {
108
- await network.close()
109
- })
105
+ beforeEach(async () => network.processAll())
106
+ afterAll(async () => network?.close())
110
107
 
111
108
  const sortNotifs = (
112
109
  notifs: AppBskyNotificationListNotifications.Notification[],
@@ -728,12 +725,12 @@ describe('notification views', () => {
728
725
  await network.processAll()
729
726
  })
730
727
 
731
- // @NOTE there is some flakyness between these tests. We sometimes get
732
- // "priority": true when the snapshot expects false.
733
-
734
728
  it('filters notifications by reason', async () => {
735
729
  const res = await agent.app.bsky.notification.listNotifications(
736
730
  {
731
+ // Pin priority so the snapshot doesn't race with the viewer's stored
732
+ // priority preference, which neighbouring tests mutate.
733
+ priority: false,
737
734
  reasons: ['mention'],
738
735
  },
739
736
  {
@@ -750,6 +747,9 @@ describe('notification views', () => {
750
747
  it('filters notifications by multiple reasons', async () => {
751
748
  const res = await agent.app.bsky.notification.listNotifications(
752
749
  {
750
+ // Pin priority so the snapshot doesn't race with the viewer's stored
751
+ // priority preference, which neighbouring tests mutate.
752
+ priority: false,
753
753
  reasons: ['mention', 'reply'],
754
754
  },
755
755
  {
@@ -1203,7 +1203,8 @@ describe('notification views', () => {
1203
1203
  },
1204
1204
  }
1205
1205
  const expected0: AppBskyNotificationDefs.Preferences = {
1206
- chat: input0.chat,
1206
+ // chat is deprecated: input is ignored and the default is always returned.
1207
+ chat: cp,
1207
1208
  follow: fp,
1208
1209
  like: fp,
1209
1210
  likeViaRepost: fp,
@@ -1227,8 +1228,8 @@ describe('notification views', () => {
1227
1228
  },
1228
1229
  }
1229
1230
  const expected1: AppBskyNotificationDefs.Preferences = {
1230
- // Kept from the previous call.
1231
- chat: input0.chat,
1231
+ // chat is deprecated: input is ignored and the default is always returned.
1232
+ chat: cp,
1232
1233
  follow: fp,
1233
1234
  like: fp,
1234
1235
  likeViaRepost: fp,
@@ -1,4 +1,4 @@
1
- import { afterAll, beforeAll, describe, expect, it } from 'vitest'
1
+ import { afterAll, beforeAll, beforeEach, describe, expect, it } from 'vitest'
2
2
  import { AppBskyFeedSearchPosts, AtpAgent, ids } from '@atproto/api'
3
3
  import { SeedClient, TestNetwork, basicSeed } from '@atproto/dev-env'
4
4
  import { DatabaseSchema } from '../../src/index.js'
@@ -51,13 +51,8 @@ describe('appview search', () => {
51
51
  nonTaggedResults = [post2.ref.uriStr, post0.ref.uriStr]
52
52
  })
53
53
 
54
- afterAll(async () => {
55
- await deleteTags(network.bsky.db.db, {
56
- uri: post1.ref.uriStr,
57
- })
58
-
59
- await network.close()
60
- })
54
+ beforeEach(async () => network.processAll())
55
+ afterAll(async () => network?.close())
61
56
 
62
57
  describe(`post search with 'top' sort`, () => {
63
58
  type TestCase = {
@@ -202,19 +197,3 @@ const createTag = async (
202
197
  .returningAll()
203
198
  .execute()
204
199
  }
205
-
206
- const deleteTags = async (
207
- db: DatabaseSchema,
208
- opts: {
209
- uri: string
210
- },
211
- ) => {
212
- await db
213
- .updateTable('record')
214
- .set({
215
- tags: JSON.stringify([]),
216
- })
217
- .where('uri', '=', opts.uri)
218
- .returningAll()
219
- .execute()
220
- }
@@ -1,4 +1,12 @@
1
- import { afterAll, afterEach, beforeAll, describe, expect, it } from 'vitest'
1
+ import {
2
+ afterAll,
3
+ afterEach,
4
+ beforeAll,
5
+ beforeEach,
6
+ describe,
7
+ expect,
8
+ it,
9
+ } from 'vitest'
2
10
  import { AtpAgent, ids } from '@atproto/api'
3
11
  import { SeedClient, TestNetwork, basicSeed } from '@atproto/dev-env'
4
12
 
@@ -14,16 +22,13 @@ describe('post views w/ debug field', () => {
14
22
  agent = network.bsky.getAgent()
15
23
  sc = network.getSeedClient()
16
24
  await basicSeed(sc)
17
- await network.processAll()
18
25
  })
19
26
 
27
+ beforeEach(async () => network.processAll())
20
28
  afterEach(() => {
21
29
  network.bsky.ctx.cfg.debugFieldAllowedDids.clear()
22
30
  })
23
-
24
- afterAll(async () => {
25
- await network.close()
26
- })
31
+ afterAll(async () => network?.close())
27
32
 
28
33
  it(`does not include debug field for unauthed requests`, async () => {
29
34
  network.bsky.ctx.cfg.debugFieldAllowedDids.add(sc.dids.bob)
@@ -1,4 +1,4 @@
1
- import { afterAll, beforeAll, describe, expect, it } from 'vitest'
1
+ import { afterAll, beforeAll, beforeEach, describe, expect, it } from 'vitest'
2
2
  import {
3
3
  AppBskyEmbedGallery,
4
4
  AppBskyEmbedRecord,
@@ -52,9 +52,8 @@ describe('pds posts views', () => {
52
52
  })
53
53
  })
54
54
 
55
- afterAll(async () => {
56
- await network.close()
57
- })
55
+ beforeEach(async () => network.processAll())
56
+ afterAll(async () => network?.close())
58
57
 
59
58
  it('fetches posts', async () => {
60
59
  const uris = [
@@ -1,4 +1,12 @@
1
- import { afterAll, afterEach, beforeAll, describe, expect, it } from 'vitest'
1
+ import {
2
+ afterAll,
3
+ afterEach,
4
+ beforeAll,
5
+ beforeEach,
6
+ describe,
7
+ expect,
8
+ it,
9
+ } from 'vitest'
2
10
  import { AtpAgent, ids } from '@atproto/api'
3
11
  import { SeedClient, TestNetwork, basicSeed } from '@atproto/dev-env'
4
12
 
@@ -16,13 +24,11 @@ describe('profile views w/ debug field', () => {
16
24
  await basicSeed(sc)
17
25
  })
18
26
 
27
+ beforeEach(async () => network.processAll())
19
28
  afterEach(() => {
20
29
  network.bsky.ctx.cfg.debugFieldAllowedDids.clear()
21
30
  })
22
-
23
- afterAll(async () => {
24
- await network.close()
25
- })
31
+ afterAll(async () => network?.close())
26
32
 
27
33
  it(`does not include debug field for unauthed requests`, async () => {
28
34
  network.bsky.ctx.cfg.debugFieldAllowedDids.add(sc.dids.bob)
@@ -1,7 +1,15 @@
1
1
  import assert from 'node:assert'
2
2
  import fs from 'node:fs/promises'
3
3
  import { Timestamp } from '@bufbuild/protobuf'
4
- import { afterAll, beforeAll, describe, expect, it, vi } from 'vitest'
4
+ import {
5
+ afterAll,
6
+ beforeAll,
7
+ beforeEach,
8
+ describe,
9
+ expect,
10
+ it,
11
+ vi,
12
+ } from 'vitest'
5
13
  import {
6
14
  AppBskyEmbedExternal,
7
15
  AtpAgent,
@@ -77,7 +85,6 @@ describe('pds profile views', () => {
77
85
  password: 'noprofile-pass',
78
86
  })
79
87
 
80
- await network.processAll()
81
88
  alice = sc.dids.alice
82
89
  bob = sc.dids.bob
83
90
  dan = sc.dids.dan
@@ -86,9 +93,8 @@ describe('pds profile views', () => {
86
93
  noprofile = sc.dids.noprofile
87
94
  })
88
95
 
89
- afterAll(async () => {
90
- await network.close()
91
- })
96
+ beforeEach(async () => network.processAll())
97
+ afterAll(async () => network?.close())
92
98
 
93
99
  // @TODO(bsky) blocked by actor takedown via labels.
94
100
 
@@ -1,4 +1,4 @@
1
- import { afterAll, beforeAll, describe, expect, it } from 'vitest'
1
+ import { afterAll, beforeAll, beforeEach, describe, expect, it } from 'vitest'
2
2
  import { AtpAgent, ids } from '@atproto/api'
3
3
  import { SeedClient, TestNetwork, quotesSeed } from '@atproto/dev-env'
4
4
  import { forSnapshot } from '../_util.js'
@@ -21,17 +21,15 @@ describe('pds quote views', () => {
21
21
  agent = network.bsky.getAgent()
22
22
  sc = network.getSeedClient()
23
23
  await quotesSeed(sc)
24
- await network.processAll()
25
24
  alice = sc.dids.alice
26
25
  bob = sc.dids.bob
27
26
  carol = sc.dids.carol
28
27
  eve = sc.dids.eve
29
- }, 20_000) // @NOTE seeding can take a while
30
-
31
- afterAll(async () => {
32
- await network.close()
33
28
  })
34
29
 
30
+ beforeEach(async () => network.processAll())
31
+ afterAll(async () => network?.close())
32
+
35
33
  it('fetches post quotes', async () => {
36
34
  const alicePostQuotes = await agent.api.app.bsky.feed.getQuotes(
37
35
  { uri: sc.posts[alice][0].ref.uriStr, limit: 30 },
@@ -1,4 +1,4 @@
1
- import { afterAll, beforeAll, describe, expect, it } from 'vitest'
1
+ import { afterAll, beforeAll, beforeEach, describe, expect, it } from 'vitest'
2
2
  import { AppBskyFeedGetRepostedBy, AtpAgent, ids } from '@atproto/api'
3
3
  import { SeedClient, TestNetwork, repostsSeed } from '@atproto/dev-env'
4
4
  import { forSnapshot, paginateAll, stripViewer } from '../_util.js'
@@ -19,15 +19,13 @@ describe('pds repost views', () => {
19
19
  agent = network.bsky.getAgent()
20
20
  sc = network.getSeedClient()
21
21
  await repostsSeed(sc)
22
- await network.processAll()
23
22
  alice = sc.dids.alice
24
23
  bob = sc.dids.bob
25
- }, 20_000) // @NOTE seeding can take a while
26
-
27
- afterAll(async () => {
28
- await network.close()
29
24
  })
30
25
 
26
+ beforeEach(async () => network.processAll())
27
+ afterAll(async () => network?.close())
28
+
31
29
  it('fetches reposted-by for a post', async () => {
32
30
  const view = await agent.api.app.bsky.feed.getRepostedBy(
33
31
  { uri: sc.posts[alice][2].ref.uriStr },
@@ -1,5 +1,5 @@
1
1
  import assert from 'node:assert'
2
- import { afterAll, beforeAll, describe, expect, it } from 'vitest'
2
+ import { afterAll, beforeAll, beforeEach, describe, expect, it } from 'vitest'
3
3
  import {
4
4
  AppBskyActorProfile,
5
5
  AppBskyGraphGetStarterPacksWithMembership,
@@ -80,13 +80,10 @@ describe('starter packs', () => {
80
80
  [sc.dids.alice, sc.dids.frankie],
81
81
  [],
82
82
  )
83
-
84
- await network.processAll()
85
83
  })
86
84
 
87
- afterAll(async () => {
88
- await network.close()
89
- })
85
+ beforeEach(async () => network.processAll())
86
+ afterAll(async () => network?.close())
90
87
 
91
88
  it('gets actor starter packs.', async () => {
92
89
  const { data } = await agent.api.app.bsky.graph.getActorStarterPacks({
@@ -1,4 +1,4 @@
1
- import { afterAll, beforeAll, describe, expect, it } from 'vitest'
1
+ import { afterAll, beforeAll, beforeEach, describe, expect, it } from 'vitest'
2
2
  import { AtpAgent, ids } from '@atproto/api'
3
3
  import { SeedClient, TestNetwork, basicSeed } from '@atproto/dev-env'
4
4
  import { stripViewer } from '../_util.js'
@@ -15,24 +15,20 @@ describe('pds user search views', () => {
15
15
  agent = network.bsky.getAgent()
16
16
  sc = network.getSeedClient()
17
17
  await basicSeed(sc)
18
- await network.processAll()
19
-
20
- const suggestions = [
21
- { did: sc.dids.alice, order: 1 },
22
- { did: sc.dids.bob, order: 2 },
23
- { did: sc.dids.carol, order: 3 },
24
- { did: sc.dids.dan, order: 4 },
25
- ]
26
18
 
27
19
  await network.bsky.db.db
28
20
  .insertInto('suggested_follow')
29
- .values(suggestions)
21
+ .values([
22
+ { did: sc.dids.alice, order: 1 },
23
+ { did: sc.dids.bob, order: 2 },
24
+ { did: sc.dids.carol, order: 3 },
25
+ { did: sc.dids.dan, order: 4 },
26
+ ])
30
27
  .execute()
31
28
  })
32
29
 
33
- afterAll(async () => {
34
- await network.close()
35
- })
30
+ beforeEach(async () => network.processAll())
31
+ afterAll(async () => network?.close())
36
32
 
37
33
  it('actor suggestion gives users', async () => {
38
34
  const result = await agent.api.app.bsky.actor.getSuggestions(
@@ -1,5 +1,5 @@
1
1
  import assert from 'node:assert'
2
- import { afterAll, beforeAll, describe, expect, it } from 'vitest'
2
+ import { afterAll, beforeAll, beforeEach, describe, expect, it } from 'vitest'
3
3
  import {
4
4
  AppBskyUnspeccedDefs,
5
5
  AppBskyUnspeccedGetPostThreadOtherV2,
@@ -54,12 +54,10 @@ describe('appview thread views v2', () => {
54
54
  agent = network.bsky.getAgent()
55
55
  sc = network.getSeedClient()
56
56
  labelerDid = network.bsky.ctx.cfg.modServiceDid
57
- await network.processAll()
58
57
  })
59
58
 
60
- afterAll(async () => {
61
- await network.close()
62
- })
59
+ beforeEach(async () => network.processAll())
60
+ afterAll(async () => network?.close())
63
61
 
64
62
  describe('not found anchor', () => {
65
63
  it('returns not found error', async () => {
@@ -1,5 +1,5 @@
1
1
  import assert from 'node:assert'
2
- import { afterAll, beforeAll, describe, expect, it } from 'vitest'
2
+ import { afterAll, beforeAll, beforeEach, describe, expect, it } from 'vitest'
3
3
  import {
4
4
  AppBskyFeedDefs,
5
5
  AppBskyFeedGetPostThread,
@@ -40,17 +40,13 @@ describe('appview thread views', () => {
40
40
  await sc.like(alice, sc.replies[alice][0].ref)
41
41
  await sc.like(alice, sc.replies[bob][0].ref)
42
42
  await sc.like(alice, sc.replies[carol][0].ref)
43
- })
44
43
 
45
- beforeAll(async () => {
46
44
  // Add a repost of a reply so that we can confirm myState in the thread
47
45
  await sc.repost(bob, sc.replies[alice][0].ref)
48
- await network.processAll()
49
46
  })
50
47
 
51
- afterAll(async () => {
52
- await network.close()
53
- })
48
+ beforeEach(async () => network.processAll())
49
+ afterAll(async () => network?.close())
54
50
 
55
51
  it('fetches deep post thread', async () => {
56
52
  const thread = await agent.api.app.bsky.feed.getPostThread(
@@ -1,5 +1,5 @@
1
1
  import assert from 'node:assert'
2
- import { afterAll, beforeAll, describe, expect, it } from 'vitest'
2
+ import { afterAll, beforeAll, beforeEach, describe, expect, it } from 'vitest'
3
3
  import { AppBskyFeedDefs, AtpAgent, ids } from '@atproto/api'
4
4
  import { SeedClient, TestNetwork, basicSeed } from '@atproto/dev-env'
5
5
  import { forSnapshot } from '../_util.js'
@@ -23,12 +23,10 @@ describe('views with thread gating', () => {
23
23
  email: 'eve@eve.com',
24
24
  password: 'hunter2',
25
25
  })
26
- await network.processAll()
27
26
  })
28
27
 
29
- afterAll(async () => {
30
- await network.close()
31
- })
28
+ beforeEach(async () => network.processAll())
29
+ afterAll(async () => network?.close())
32
30
 
33
31
  // check that replyDisabled state is applied correctly in a simple method like getPosts
34
32
  const checkReplyDisabled = async (
@@ -1,5 +1,5 @@
1
1
  import assert from 'node:assert'
2
- import { afterAll, beforeAll, describe, expect, it } from 'vitest'
2
+ import { afterAll, beforeAll, beforeEach, describe, expect, it } from 'vitest'
3
3
  import {
4
4
  AppBskyFeedDefs,
5
5
  AppBskyFeedGetTimeline,
@@ -35,7 +35,7 @@ describe('timeline views', () => {
35
35
  agent = network.bsky.getAgent()
36
36
  sc = network.getSeedClient()
37
37
  await basicSeed(sc)
38
- await network.processAll()
38
+
39
39
  alice = sc.dids.alice
40
40
  bob = sc.dids.bob
41
41
  carol = sc.dids.carol
@@ -54,9 +54,8 @@ describe('timeline views', () => {
54
54
  })
55
55
  })
56
56
 
57
- afterAll(async () => {
58
- await network.close()
59
- })
57
+ beforeEach(async () => network.processAll())
58
+ afterAll(async () => network?.close())
60
59
 
61
60
  // @TODO(bsky) blocks posts, reposts, replies by actor takedown via labels
62
61
  // @TODO(bsky) blocks posts, reposts, replies by record takedown via labels