@atproto/bsky 0.0.253 → 0.0.255

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 (899) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/dist/api/age-assurance/index.d.ts +1 -1
  3. package/dist/api/age-assurance/index.d.ts.map +1 -1
  4. package/dist/api/age-assurance/index.js.map +1 -1
  5. package/dist/api/age-assurance/redirects/kws-age-verified.d.ts +2 -2
  6. package/dist/api/age-assurance/redirects/kws-age-verified.d.ts.map +1 -1
  7. package/dist/api/age-assurance/redirects/kws-age-verified.js.map +1 -1
  8. package/dist/api/age-assurance/stash.d.ts +2 -2
  9. package/dist/api/age-assurance/stash.d.ts.map +1 -1
  10. package/dist/api/age-assurance/stash.js.map +1 -1
  11. package/dist/api/age-assurance/types.d.ts +3 -3
  12. package/dist/api/age-assurance/types.d.ts.map +1 -1
  13. package/dist/api/age-assurance/types.js.map +1 -1
  14. package/dist/api/age-assurance/util.d.ts +2 -2
  15. package/dist/api/age-assurance/util.d.ts.map +1 -1
  16. package/dist/api/age-assurance/util.js.map +1 -1
  17. package/dist/api/age-assurance/webhooks/kws-age-verified.d.ts +2 -2
  18. package/dist/api/age-assurance/webhooks/kws-age-verified.d.ts.map +1 -1
  19. package/dist/api/age-assurance/webhooks/kws-age-verified.js.map +1 -1
  20. package/dist/api/app/bsky/actor/getProfile.d.ts +2 -2
  21. package/dist/api/app/bsky/actor/getProfile.d.ts.map +1 -1
  22. package/dist/api/app/bsky/actor/getProfile.js.map +1 -1
  23. package/dist/api/app/bsky/actor/getProfiles.d.ts +2 -2
  24. package/dist/api/app/bsky/actor/getProfiles.d.ts.map +1 -1
  25. package/dist/api/app/bsky/actor/getProfiles.js.map +1 -1
  26. package/dist/api/app/bsky/actor/getSuggestions.d.ts +2 -2
  27. package/dist/api/app/bsky/actor/getSuggestions.d.ts.map +1 -1
  28. package/dist/api/app/bsky/actor/getSuggestions.js.map +1 -1
  29. package/dist/api/app/bsky/actor/searchActors.d.ts +2 -2
  30. package/dist/api/app/bsky/actor/searchActors.d.ts.map +1 -1
  31. package/dist/api/app/bsky/actor/searchActors.js.map +1 -1
  32. package/dist/api/app/bsky/actor/searchActorsTypeahead.d.ts +2 -2
  33. package/dist/api/app/bsky/actor/searchActorsTypeahead.d.ts.map +1 -1
  34. package/dist/api/app/bsky/actor/searchActorsTypeahead.js.map +1 -1
  35. package/dist/api/app/bsky/ageassurance/begin.d.ts +2 -2
  36. package/dist/api/app/bsky/ageassurance/begin.d.ts.map +1 -1
  37. package/dist/api/app/bsky/ageassurance/begin.js.map +1 -1
  38. package/dist/api/app/bsky/ageassurance/getConfig.d.ts +2 -2
  39. package/dist/api/app/bsky/ageassurance/getConfig.d.ts.map +1 -1
  40. package/dist/api/app/bsky/ageassurance/getConfig.js.map +1 -1
  41. package/dist/api/app/bsky/ageassurance/getState.d.ts +2 -2
  42. package/dist/api/app/bsky/ageassurance/getState.d.ts.map +1 -1
  43. package/dist/api/app/bsky/ageassurance/getState.js.map +1 -1
  44. package/dist/api/app/bsky/bookmark/createBookmark.d.ts +2 -2
  45. package/dist/api/app/bsky/bookmark/createBookmark.d.ts.map +1 -1
  46. package/dist/api/app/bsky/bookmark/createBookmark.js.map +1 -1
  47. package/dist/api/app/bsky/bookmark/deleteBookmark.d.ts +2 -2
  48. package/dist/api/app/bsky/bookmark/deleteBookmark.d.ts.map +1 -1
  49. package/dist/api/app/bsky/bookmark/deleteBookmark.js.map +1 -1
  50. package/dist/api/app/bsky/bookmark/getBookmarks.d.ts +2 -2
  51. package/dist/api/app/bsky/bookmark/getBookmarks.d.ts.map +1 -1
  52. package/dist/api/app/bsky/bookmark/getBookmarks.js.map +1 -1
  53. package/dist/api/app/bsky/contact/dismissMatch.d.ts +2 -2
  54. package/dist/api/app/bsky/contact/dismissMatch.d.ts.map +1 -1
  55. package/dist/api/app/bsky/contact/dismissMatch.js.map +1 -1
  56. package/dist/api/app/bsky/contact/getMatches.d.ts +2 -2
  57. package/dist/api/app/bsky/contact/getMatches.d.ts.map +1 -1
  58. package/dist/api/app/bsky/contact/getMatches.js.map +1 -1
  59. package/dist/api/app/bsky/contact/getSyncStatus.d.ts +2 -2
  60. package/dist/api/app/bsky/contact/getSyncStatus.d.ts.map +1 -1
  61. package/dist/api/app/bsky/contact/getSyncStatus.js.map +1 -1
  62. package/dist/api/app/bsky/contact/importContacts.d.ts +2 -2
  63. package/dist/api/app/bsky/contact/importContacts.d.ts.map +1 -1
  64. package/dist/api/app/bsky/contact/importContacts.js.map +1 -1
  65. package/dist/api/app/bsky/contact/removeData.d.ts +2 -2
  66. package/dist/api/app/bsky/contact/removeData.d.ts.map +1 -1
  67. package/dist/api/app/bsky/contact/removeData.js.map +1 -1
  68. package/dist/api/app/bsky/contact/sendNotification.d.ts +2 -2
  69. package/dist/api/app/bsky/contact/sendNotification.d.ts.map +1 -1
  70. package/dist/api/app/bsky/contact/sendNotification.js.map +1 -1
  71. package/dist/api/app/bsky/contact/startPhoneVerification.d.ts +2 -2
  72. package/dist/api/app/bsky/contact/startPhoneVerification.d.ts.map +1 -1
  73. package/dist/api/app/bsky/contact/startPhoneVerification.js.map +1 -1
  74. package/dist/api/app/bsky/contact/util.d.ts +2 -2
  75. package/dist/api/app/bsky/contact/util.d.ts.map +1 -1
  76. package/dist/api/app/bsky/contact/util.js.map +1 -1
  77. package/dist/api/app/bsky/contact/verifyPhone.d.ts +2 -2
  78. package/dist/api/app/bsky/contact/verifyPhone.d.ts.map +1 -1
  79. package/dist/api/app/bsky/contact/verifyPhone.js.map +1 -1
  80. package/dist/api/app/bsky/draft/createDraft.d.ts +2 -2
  81. package/dist/api/app/bsky/draft/createDraft.d.ts.map +1 -1
  82. package/dist/api/app/bsky/draft/createDraft.js.map +1 -1
  83. package/dist/api/app/bsky/draft/deleteDraft.d.ts +2 -2
  84. package/dist/api/app/bsky/draft/deleteDraft.d.ts.map +1 -1
  85. package/dist/api/app/bsky/draft/deleteDraft.js.map +1 -1
  86. package/dist/api/app/bsky/draft/getDrafts.d.ts +2 -2
  87. package/dist/api/app/bsky/draft/getDrafts.d.ts.map +1 -1
  88. package/dist/api/app/bsky/draft/getDrafts.js.map +1 -1
  89. package/dist/api/app/bsky/draft/updateDraft.d.ts +2 -2
  90. package/dist/api/app/bsky/draft/updateDraft.d.ts.map +1 -1
  91. package/dist/api/app/bsky/draft/updateDraft.js.map +1 -1
  92. package/dist/api/app/bsky/embed/getEmbedExternalView.d.ts +2 -2
  93. package/dist/api/app/bsky/embed/getEmbedExternalView.d.ts.map +1 -1
  94. package/dist/api/app/bsky/embed/getEmbedExternalView.js.map +1 -1
  95. package/dist/api/app/bsky/feed/getActorFeeds.d.ts +2 -2
  96. package/dist/api/app/bsky/feed/getActorFeeds.d.ts.map +1 -1
  97. package/dist/api/app/bsky/feed/getActorFeeds.js.map +1 -1
  98. package/dist/api/app/bsky/feed/getActorLikes.d.ts +2 -2
  99. package/dist/api/app/bsky/feed/getActorLikes.d.ts.map +1 -1
  100. package/dist/api/app/bsky/feed/getActorLikes.js.map +1 -1
  101. package/dist/api/app/bsky/feed/getAuthorFeed.d.ts +7 -7
  102. package/dist/api/app/bsky/feed/getAuthorFeed.d.ts.map +1 -1
  103. package/dist/api/app/bsky/feed/getAuthorFeed.js.map +1 -1
  104. package/dist/api/app/bsky/feed/getFeed.d.ts +3 -3
  105. package/dist/api/app/bsky/feed/getFeed.d.ts.map +1 -1
  106. package/dist/api/app/bsky/feed/getFeed.js.map +1 -1
  107. package/dist/api/app/bsky/feed/getFeedGenerator.d.ts +2 -2
  108. package/dist/api/app/bsky/feed/getFeedGenerator.d.ts.map +1 -1
  109. package/dist/api/app/bsky/feed/getFeedGenerator.js.map +1 -1
  110. package/dist/api/app/bsky/feed/getFeedGenerators.d.ts +2 -2
  111. package/dist/api/app/bsky/feed/getFeedGenerators.d.ts.map +1 -1
  112. package/dist/api/app/bsky/feed/getFeedGenerators.js.map +1 -1
  113. package/dist/api/app/bsky/feed/getLikes.d.ts +2 -2
  114. package/dist/api/app/bsky/feed/getLikes.d.ts.map +1 -1
  115. package/dist/api/app/bsky/feed/getLikes.js.map +1 -1
  116. package/dist/api/app/bsky/feed/getListFeed.d.ts +6 -6
  117. package/dist/api/app/bsky/feed/getListFeed.d.ts.map +1 -1
  118. package/dist/api/app/bsky/feed/getListFeed.js.map +1 -1
  119. package/dist/api/app/bsky/feed/getPostThread.d.ts +2 -2
  120. package/dist/api/app/bsky/feed/getPostThread.d.ts.map +1 -1
  121. package/dist/api/app/bsky/feed/getPostThread.js.map +1 -1
  122. package/dist/api/app/bsky/feed/getPosts.d.ts +2 -2
  123. package/dist/api/app/bsky/feed/getPosts.d.ts.map +1 -1
  124. package/dist/api/app/bsky/feed/getPosts.js.map +1 -1
  125. package/dist/api/app/bsky/feed/getQuotes.d.ts +2 -2
  126. package/dist/api/app/bsky/feed/getQuotes.d.ts.map +1 -1
  127. package/dist/api/app/bsky/feed/getQuotes.js.map +1 -1
  128. package/dist/api/app/bsky/feed/getRepostedBy.d.ts +2 -2
  129. package/dist/api/app/bsky/feed/getRepostedBy.d.ts.map +1 -1
  130. package/dist/api/app/bsky/feed/getRepostedBy.js.map +1 -1
  131. package/dist/api/app/bsky/feed/getSuggestedFeeds.d.ts +2 -2
  132. package/dist/api/app/bsky/feed/getSuggestedFeeds.d.ts.map +1 -1
  133. package/dist/api/app/bsky/feed/getSuggestedFeeds.js.map +1 -1
  134. package/dist/api/app/bsky/feed/getTimeline.d.ts +6 -6
  135. package/dist/api/app/bsky/feed/getTimeline.d.ts.map +1 -1
  136. package/dist/api/app/bsky/feed/getTimeline.js.map +1 -1
  137. package/dist/api/app/bsky/feed/searchPosts.d.ts +2 -2
  138. package/dist/api/app/bsky/feed/searchPosts.d.ts.map +1 -1
  139. package/dist/api/app/bsky/feed/searchPosts.js +11 -3
  140. package/dist/api/app/bsky/feed/searchPosts.js.map +1 -1
  141. package/dist/api/app/bsky/feed/searchPostsV2.d.ts +2 -2
  142. package/dist/api/app/bsky/feed/searchPostsV2.d.ts.map +1 -1
  143. package/dist/api/app/bsky/feed/searchPostsV2.js +10 -2
  144. package/dist/api/app/bsky/feed/searchPostsV2.js.map +1 -1
  145. package/dist/api/app/bsky/graph/getActorStarterPacks.d.ts +2 -2
  146. package/dist/api/app/bsky/graph/getActorStarterPacks.d.ts.map +1 -1
  147. package/dist/api/app/bsky/graph/getActorStarterPacks.js.map +1 -1
  148. package/dist/api/app/bsky/graph/getBlocks.d.ts +2 -2
  149. package/dist/api/app/bsky/graph/getBlocks.d.ts.map +1 -1
  150. package/dist/api/app/bsky/graph/getBlocks.js.map +1 -1
  151. package/dist/api/app/bsky/graph/getFollowers.d.ts +2 -2
  152. package/dist/api/app/bsky/graph/getFollowers.d.ts.map +1 -1
  153. package/dist/api/app/bsky/graph/getFollowers.js.map +1 -1
  154. package/dist/api/app/bsky/graph/getFollows.d.ts +2 -2
  155. package/dist/api/app/bsky/graph/getFollows.d.ts.map +1 -1
  156. package/dist/api/app/bsky/graph/getFollows.js.map +1 -1
  157. package/dist/api/app/bsky/graph/getKnownFollowers.d.ts +2 -2
  158. package/dist/api/app/bsky/graph/getKnownFollowers.d.ts.map +1 -1
  159. package/dist/api/app/bsky/graph/getKnownFollowers.js.map +1 -1
  160. package/dist/api/app/bsky/graph/getList.d.ts +2 -2
  161. package/dist/api/app/bsky/graph/getList.d.ts.map +1 -1
  162. package/dist/api/app/bsky/graph/getList.js.map +1 -1
  163. package/dist/api/app/bsky/graph/getListBlocks.d.ts +2 -2
  164. package/dist/api/app/bsky/graph/getListBlocks.d.ts.map +1 -1
  165. package/dist/api/app/bsky/graph/getListBlocks.js.map +1 -1
  166. package/dist/api/app/bsky/graph/getListMutes.d.ts +2 -2
  167. package/dist/api/app/bsky/graph/getListMutes.d.ts.map +1 -1
  168. package/dist/api/app/bsky/graph/getListMutes.js.map +1 -1
  169. package/dist/api/app/bsky/graph/getLists.d.ts +2 -2
  170. package/dist/api/app/bsky/graph/getLists.d.ts.map +1 -1
  171. package/dist/api/app/bsky/graph/getLists.js.map +1 -1
  172. package/dist/api/app/bsky/graph/getListsWithMembership.d.ts +2 -2
  173. package/dist/api/app/bsky/graph/getListsWithMembership.d.ts.map +1 -1
  174. package/dist/api/app/bsky/graph/getListsWithMembership.js.map +1 -1
  175. package/dist/api/app/bsky/graph/getMutes.d.ts +2 -2
  176. package/dist/api/app/bsky/graph/getMutes.d.ts.map +1 -1
  177. package/dist/api/app/bsky/graph/getMutes.js.map +1 -1
  178. package/dist/api/app/bsky/graph/getRelationships.d.ts +2 -2
  179. package/dist/api/app/bsky/graph/getRelationships.d.ts.map +1 -1
  180. package/dist/api/app/bsky/graph/getRelationships.js.map +1 -1
  181. package/dist/api/app/bsky/graph/getStarterPack.d.ts +2 -2
  182. package/dist/api/app/bsky/graph/getStarterPack.d.ts.map +1 -1
  183. package/dist/api/app/bsky/graph/getStarterPack.js.map +1 -1
  184. package/dist/api/app/bsky/graph/getStarterPacks.d.ts +2 -2
  185. package/dist/api/app/bsky/graph/getStarterPacks.d.ts.map +1 -1
  186. package/dist/api/app/bsky/graph/getStarterPacks.js.map +1 -1
  187. package/dist/api/app/bsky/graph/getStarterPacksWithMembership.d.ts +2 -2
  188. package/dist/api/app/bsky/graph/getStarterPacksWithMembership.d.ts.map +1 -1
  189. package/dist/api/app/bsky/graph/getStarterPacksWithMembership.js.map +1 -1
  190. package/dist/api/app/bsky/graph/getSuggestedFollowsByActor.d.ts +2 -2
  191. package/dist/api/app/bsky/graph/getSuggestedFollowsByActor.d.ts.map +1 -1
  192. package/dist/api/app/bsky/graph/getSuggestedFollowsByActor.js.map +1 -1
  193. package/dist/api/app/bsky/graph/muteActor.d.ts +2 -2
  194. package/dist/api/app/bsky/graph/muteActor.d.ts.map +1 -1
  195. package/dist/api/app/bsky/graph/muteActor.js.map +1 -1
  196. package/dist/api/app/bsky/graph/muteActorList.d.ts +2 -2
  197. package/dist/api/app/bsky/graph/muteActorList.d.ts.map +1 -1
  198. package/dist/api/app/bsky/graph/muteActorList.js.map +1 -1
  199. package/dist/api/app/bsky/graph/muteThread.d.ts +2 -2
  200. package/dist/api/app/bsky/graph/muteThread.d.ts.map +1 -1
  201. package/dist/api/app/bsky/graph/muteThread.js.map +1 -1
  202. package/dist/api/app/bsky/graph/searchStarterPacks.d.ts +2 -2
  203. package/dist/api/app/bsky/graph/searchStarterPacks.d.ts.map +1 -1
  204. package/dist/api/app/bsky/graph/searchStarterPacks.js.map +1 -1
  205. package/dist/api/app/bsky/graph/unmuteActor.d.ts +2 -2
  206. package/dist/api/app/bsky/graph/unmuteActor.d.ts.map +1 -1
  207. package/dist/api/app/bsky/graph/unmuteActor.js.map +1 -1
  208. package/dist/api/app/bsky/graph/unmuteActorList.d.ts +2 -2
  209. package/dist/api/app/bsky/graph/unmuteActorList.d.ts.map +1 -1
  210. package/dist/api/app/bsky/graph/unmuteActorList.js.map +1 -1
  211. package/dist/api/app/bsky/graph/unmuteThread.d.ts +2 -2
  212. package/dist/api/app/bsky/graph/unmuteThread.d.ts.map +1 -1
  213. package/dist/api/app/bsky/graph/unmuteThread.js.map +1 -1
  214. package/dist/api/app/bsky/labeler/getServices.d.ts +2 -2
  215. package/dist/api/app/bsky/labeler/getServices.d.ts.map +1 -1
  216. package/dist/api/app/bsky/labeler/getServices.js.map +1 -1
  217. package/dist/api/app/bsky/notification/getPreferences.d.ts +2 -2
  218. package/dist/api/app/bsky/notification/getPreferences.d.ts.map +1 -1
  219. package/dist/api/app/bsky/notification/getPreferences.js.map +1 -1
  220. package/dist/api/app/bsky/notification/getUnreadCount.d.ts +2 -2
  221. package/dist/api/app/bsky/notification/getUnreadCount.d.ts.map +1 -1
  222. package/dist/api/app/bsky/notification/getUnreadCount.js.map +1 -1
  223. package/dist/api/app/bsky/notification/listActivitySubscriptions.d.ts +2 -2
  224. package/dist/api/app/bsky/notification/listActivitySubscriptions.d.ts.map +1 -1
  225. package/dist/api/app/bsky/notification/listActivitySubscriptions.js.map +1 -1
  226. package/dist/api/app/bsky/notification/listNotifications.d.ts +2 -2
  227. package/dist/api/app/bsky/notification/listNotifications.d.ts.map +1 -1
  228. package/dist/api/app/bsky/notification/listNotifications.js.map +1 -1
  229. package/dist/api/app/bsky/notification/putActivitySubscription.d.ts +2 -2
  230. package/dist/api/app/bsky/notification/putActivitySubscription.d.ts.map +1 -1
  231. package/dist/api/app/bsky/notification/putActivitySubscription.js.map +1 -1
  232. package/dist/api/app/bsky/notification/putPreferences.d.ts +2 -2
  233. package/dist/api/app/bsky/notification/putPreferences.d.ts.map +1 -1
  234. package/dist/api/app/bsky/notification/putPreferences.js.map +1 -1
  235. package/dist/api/app/bsky/notification/putPreferencesV2.d.ts +2 -2
  236. package/dist/api/app/bsky/notification/putPreferencesV2.d.ts.map +1 -1
  237. package/dist/api/app/bsky/notification/putPreferencesV2.js.map +1 -1
  238. package/dist/api/app/bsky/notification/registerPush.d.ts +2 -2
  239. package/dist/api/app/bsky/notification/registerPush.d.ts.map +1 -1
  240. package/dist/api/app/bsky/notification/registerPush.js.map +1 -1
  241. package/dist/api/app/bsky/notification/unregisterPush.d.ts +2 -2
  242. package/dist/api/app/bsky/notification/unregisterPush.d.ts.map +1 -1
  243. package/dist/api/app/bsky/notification/unregisterPush.js.map +1 -1
  244. package/dist/api/app/bsky/notification/updateSeen.d.ts +2 -2
  245. package/dist/api/app/bsky/notification/updateSeen.d.ts.map +1 -1
  246. package/dist/api/app/bsky/notification/updateSeen.js.map +1 -1
  247. package/dist/api/app/bsky/notification/util.d.ts +2 -2
  248. package/dist/api/app/bsky/notification/util.d.ts.map +1 -1
  249. package/dist/api/app/bsky/notification/util.js.map +1 -1
  250. package/dist/api/app/bsky/unspecced/getAgeAssuranceState.d.ts +2 -2
  251. package/dist/api/app/bsky/unspecced/getAgeAssuranceState.d.ts.map +1 -1
  252. package/dist/api/app/bsky/unspecced/getAgeAssuranceState.js.map +1 -1
  253. package/dist/api/app/bsky/unspecced/getConfig.d.ts +2 -2
  254. package/dist/api/app/bsky/unspecced/getConfig.d.ts.map +1 -1
  255. package/dist/api/app/bsky/unspecced/getConfig.js.map +1 -1
  256. package/dist/api/app/bsky/unspecced/getOnboardingSuggestedStarterPacks.d.ts +2 -2
  257. package/dist/api/app/bsky/unspecced/getOnboardingSuggestedStarterPacks.d.ts.map +1 -1
  258. package/dist/api/app/bsky/unspecced/getOnboardingSuggestedStarterPacks.js.map +1 -1
  259. package/dist/api/app/bsky/unspecced/getPopularFeedGenerators.d.ts +2 -2
  260. package/dist/api/app/bsky/unspecced/getPopularFeedGenerators.d.ts.map +1 -1
  261. package/dist/api/app/bsky/unspecced/getPopularFeedGenerators.js.map +1 -1
  262. package/dist/api/app/bsky/unspecced/getPostThreadOtherV2.d.ts +2 -2
  263. package/dist/api/app/bsky/unspecced/getPostThreadOtherV2.d.ts.map +1 -1
  264. package/dist/api/app/bsky/unspecced/getPostThreadOtherV2.js.map +1 -1
  265. package/dist/api/app/bsky/unspecced/getPostThreadV2.d.ts +2 -2
  266. package/dist/api/app/bsky/unspecced/getPostThreadV2.d.ts.map +1 -1
  267. package/dist/api/app/bsky/unspecced/getPostThreadV2.js.map +1 -1
  268. package/dist/api/app/bsky/unspecced/getSuggestedFeeds.d.ts +2 -2
  269. package/dist/api/app/bsky/unspecced/getSuggestedFeeds.d.ts.map +1 -1
  270. package/dist/api/app/bsky/unspecced/getSuggestedFeeds.js.map +1 -1
  271. package/dist/api/app/bsky/unspecced/getSuggestedOnboardingUsers.d.ts +2 -2
  272. package/dist/api/app/bsky/unspecced/getSuggestedOnboardingUsers.d.ts.map +1 -1
  273. package/dist/api/app/bsky/unspecced/getSuggestedOnboardingUsers.js.map +1 -1
  274. package/dist/api/app/bsky/unspecced/getSuggestedStarterPacks.d.ts +2 -2
  275. package/dist/api/app/bsky/unspecced/getSuggestedStarterPacks.d.ts.map +1 -1
  276. package/dist/api/app/bsky/unspecced/getSuggestedStarterPacks.js.map +1 -1
  277. package/dist/api/app/bsky/unspecced/getSuggestedUsers.d.ts +2 -2
  278. package/dist/api/app/bsky/unspecced/getSuggestedUsers.d.ts.map +1 -1
  279. package/dist/api/app/bsky/unspecced/getSuggestedUsers.js.map +1 -1
  280. package/dist/api/app/bsky/unspecced/getSuggestedUsersForDiscover.d.ts +2 -2
  281. package/dist/api/app/bsky/unspecced/getSuggestedUsersForDiscover.d.ts.map +1 -1
  282. package/dist/api/app/bsky/unspecced/getSuggestedUsersForDiscover.js.map +1 -1
  283. package/dist/api/app/bsky/unspecced/getSuggestedUsersForExplore.d.ts +2 -2
  284. package/dist/api/app/bsky/unspecced/getSuggestedUsersForExplore.d.ts.map +1 -1
  285. package/dist/api/app/bsky/unspecced/getSuggestedUsersForExplore.js.map +1 -1
  286. package/dist/api/app/bsky/unspecced/getSuggestedUsersForSeeMore.d.ts +2 -2
  287. package/dist/api/app/bsky/unspecced/getSuggestedUsersForSeeMore.d.ts.map +1 -1
  288. package/dist/api/app/bsky/unspecced/getSuggestedUsersForSeeMore.js.map +1 -1
  289. package/dist/api/app/bsky/unspecced/getTaggedSuggestions.d.ts +2 -2
  290. package/dist/api/app/bsky/unspecced/getTaggedSuggestions.d.ts.map +1 -1
  291. package/dist/api/app/bsky/unspecced/getTaggedSuggestions.js.map +1 -1
  292. package/dist/api/app/bsky/unspecced/getTrendingTopics.d.ts +2 -2
  293. package/dist/api/app/bsky/unspecced/getTrendingTopics.d.ts.map +1 -1
  294. package/dist/api/app/bsky/unspecced/getTrendingTopics.js.map +1 -1
  295. package/dist/api/app/bsky/unspecced/getTrends.d.ts +2 -2
  296. package/dist/api/app/bsky/unspecced/getTrends.d.ts.map +1 -1
  297. package/dist/api/app/bsky/unspecced/getTrends.js.map +1 -1
  298. package/dist/api/app/bsky/unspecced/initAgeAssurance.d.ts +2 -2
  299. package/dist/api/app/bsky/unspecced/initAgeAssurance.d.ts.map +1 -1
  300. package/dist/api/app/bsky/unspecced/initAgeAssurance.js.map +1 -1
  301. package/dist/api/blob-dispatcher.d.ts +2 -2
  302. package/dist/api/blob-dispatcher.d.ts.map +1 -1
  303. package/dist/api/blob-dispatcher.js.map +1 -1
  304. package/dist/api/blob-resolver.d.ts +6 -6
  305. package/dist/api/blob-resolver.d.ts.map +1 -1
  306. package/dist/api/blob-resolver.js.map +1 -1
  307. package/dist/api/com/atproto/admin/getAccountInfos.d.ts +2 -2
  308. package/dist/api/com/atproto/admin/getAccountInfos.d.ts.map +1 -1
  309. package/dist/api/com/atproto/admin/getAccountInfos.js.map +1 -1
  310. package/dist/api/com/atproto/admin/getSubjectStatus.d.ts +2 -2
  311. package/dist/api/com/atproto/admin/getSubjectStatus.d.ts.map +1 -1
  312. package/dist/api/com/atproto/admin/getSubjectStatus.js.map +1 -1
  313. package/dist/api/com/atproto/admin/updateSubjectStatus.d.ts +2 -2
  314. package/dist/api/com/atproto/admin/updateSubjectStatus.d.ts.map +1 -1
  315. package/dist/api/com/atproto/admin/updateSubjectStatus.js.map +1 -1
  316. package/dist/api/com/atproto/identity/resolveHandle.d.ts +2 -2
  317. package/dist/api/com/atproto/identity/resolveHandle.d.ts.map +1 -1
  318. package/dist/api/com/atproto/identity/resolveHandle.js.map +1 -1
  319. package/dist/api/com/atproto/label/queryLabels.d.ts +2 -2
  320. package/dist/api/com/atproto/label/queryLabels.d.ts.map +1 -1
  321. package/dist/api/com/atproto/label/queryLabels.js.map +1 -1
  322. package/dist/api/com/atproto/repo/getRecord.d.ts +2 -2
  323. package/dist/api/com/atproto/repo/getRecord.d.ts.map +1 -1
  324. package/dist/api/com/atproto/repo/getRecord.js.map +1 -1
  325. package/dist/api/com/atproto/temp/fetchLabels.d.ts +2 -2
  326. package/dist/api/com/atproto/temp/fetchLabels.d.ts.map +1 -1
  327. package/dist/api/com/atproto/temp/fetchLabels.js.map +1 -1
  328. package/dist/api/external.d.ts +1 -1
  329. package/dist/api/external.d.ts.map +1 -1
  330. package/dist/api/external.js.map +1 -1
  331. package/dist/api/health.d.ts +1 -1
  332. package/dist/api/health.d.ts.map +1 -1
  333. package/dist/api/health.js.map +1 -1
  334. package/dist/api/index.d.ts +2 -2
  335. package/dist/api/index.d.ts.map +1 -1
  336. package/dist/api/index.js.map +1 -1
  337. package/dist/api/internal/bsky/actor/getProfiles.d.ts +2 -2
  338. package/dist/api/internal/bsky/actor/getProfiles.d.ts.map +1 -1
  339. package/dist/api/internal/bsky/actor/getProfiles.js.map +1 -1
  340. package/dist/api/kws/api.d.ts +2 -2
  341. package/dist/api/kws/api.d.ts.map +1 -1
  342. package/dist/api/kws/api.js.map +1 -1
  343. package/dist/api/kws/index.d.ts +1 -1
  344. package/dist/api/kws/index.d.ts.map +1 -1
  345. package/dist/api/kws/index.js.map +1 -1
  346. package/dist/api/kws/types.d.ts +3 -3
  347. package/dist/api/kws/types.d.ts.map +1 -1
  348. package/dist/api/kws/types.js.map +1 -1
  349. package/dist/api/kws/util.d.ts +4 -4
  350. package/dist/api/kws/util.d.ts.map +1 -1
  351. package/dist/api/kws/util.js.map +1 -1
  352. package/dist/api/kws/webhook.d.ts +2 -2
  353. package/dist/api/kws/webhook.d.ts.map +1 -1
  354. package/dist/api/kws/webhook.js.map +1 -1
  355. package/dist/api/sitemap.d.ts +1 -1
  356. package/dist/api/sitemap.d.ts.map +1 -1
  357. package/dist/api/sitemap.js.map +1 -1
  358. package/dist/api/util.d.ts +3 -3
  359. package/dist/api/util.d.ts.map +1 -1
  360. package/dist/api/util.js.map +1 -1
  361. package/dist/api/well-known.d.ts +1 -1
  362. package/dist/api/well-known.d.ts.map +1 -1
  363. package/dist/api/well-known.js.map +1 -1
  364. package/dist/auth-verifier.d.ts +5 -5
  365. package/dist/auth-verifier.d.ts.map +1 -1
  366. package/dist/auth-verifier.js +1 -1
  367. package/dist/auth-verifier.js.map +1 -1
  368. package/dist/bsync.d.ts +2 -2
  369. package/dist/bsync.d.ts.map +1 -1
  370. package/dist/bsync.js.map +1 -1
  371. package/dist/cache/read-through.d.ts +1 -1
  372. package/dist/cache/read-through.d.ts.map +1 -1
  373. package/dist/cache/read-through.js.map +1 -1
  374. package/dist/config.d.ts +1 -1
  375. package/dist/config.d.ts.map +1 -1
  376. package/dist/config.js.map +1 -1
  377. package/dist/context.d.ts +18 -18
  378. package/dist/context.d.ts.map +1 -1
  379. package/dist/context.js.map +1 -1
  380. package/dist/courier.d.ts +2 -2
  381. package/dist/courier.d.ts.map +1 -1
  382. package/dist/courier.js.map +1 -1
  383. package/dist/data-plane/client/hosts.d.ts +1 -1
  384. package/dist/data-plane/client/hosts.d.ts.map +1 -1
  385. package/dist/data-plane/client/hosts.js.map +1 -1
  386. package/dist/data-plane/client/index.d.ts +2 -2
  387. package/dist/data-plane/client/index.d.ts.map +1 -1
  388. package/dist/data-plane/client/index.js.map +1 -1
  389. package/dist/data-plane/client/util.d.ts +1 -1
  390. package/dist/data-plane/client/util.d.ts.map +1 -1
  391. package/dist/data-plane/client/util.js.map +1 -1
  392. package/dist/data-plane/server/bsync-subscription.d.ts +2 -2
  393. package/dist/data-plane/server/bsync-subscription.d.ts.map +1 -1
  394. package/dist/data-plane/server/bsync-subscription.js +1 -1
  395. package/dist/data-plane/server/bsync-subscription.js.map +1 -1
  396. package/dist/data-plane/server/db/database-schema.d.ts +44 -44
  397. package/dist/data-plane/server/db/database-schema.d.ts.map +1 -1
  398. package/dist/data-plane/server/db/database-schema.js.map +1 -1
  399. package/dist/data-plane/server/db/db.d.ts +2 -2
  400. package/dist/data-plane/server/db/db.d.ts.map +1 -1
  401. package/dist/data-plane/server/db/db.js.map +1 -1
  402. package/dist/data-plane/server/db/migrations/20230309T045948368Z-init.d.ts +1 -1
  403. package/dist/data-plane/server/db/migrations/20230309T045948368Z-init.d.ts.map +1 -1
  404. package/dist/data-plane/server/db/migrations/20230309T045948368Z-init.js.map +1 -1
  405. package/dist/data-plane/server/db/migrations/20230408T152211201Z-notification-init.d.ts +1 -1
  406. package/dist/data-plane/server/db/migrations/20230408T152211201Z-notification-init.d.ts.map +1 -1
  407. package/dist/data-plane/server/db/migrations/20230408T152211201Z-notification-init.js.map +1 -1
  408. package/dist/data-plane/server/db/migrations/20230417T210628672Z-moderation-init.d.ts +1 -1
  409. package/dist/data-plane/server/db/migrations/20230417T210628672Z-moderation-init.d.ts.map +1 -1
  410. package/dist/data-plane/server/db/migrations/20230417T210628672Z-moderation-init.js.map +1 -1
  411. package/dist/data-plane/server/db/migrations/20230420T211446071Z-did-cache.d.ts +1 -1
  412. package/dist/data-plane/server/db/migrations/20230420T211446071Z-did-cache.d.ts.map +1 -1
  413. package/dist/data-plane/server/db/migrations/20230420T211446071Z-did-cache.js.map +1 -1
  414. package/dist/data-plane/server/db/migrations/20230427T194702079Z-notif-record-index.d.ts +1 -1
  415. package/dist/data-plane/server/db/migrations/20230427T194702079Z-notif-record-index.d.ts.map +1 -1
  416. package/dist/data-plane/server/db/migrations/20230427T194702079Z-notif-record-index.js.map +1 -1
  417. package/dist/data-plane/server/db/migrations/20230605T144730094Z-post-profile-aggs.d.ts +1 -1
  418. package/dist/data-plane/server/db/migrations/20230605T144730094Z-post-profile-aggs.d.ts.map +1 -1
  419. package/dist/data-plane/server/db/migrations/20230605T144730094Z-post-profile-aggs.js.map +1 -1
  420. package/dist/data-plane/server/db/migrations/20230607T211442112Z-feed-generator-init.d.ts +1 -1
  421. package/dist/data-plane/server/db/migrations/20230607T211442112Z-feed-generator-init.d.ts.map +1 -1
  422. package/dist/data-plane/server/db/migrations/20230607T211442112Z-feed-generator-init.js.map +1 -1
  423. package/dist/data-plane/server/db/migrations/20230608T155101190Z-algo-whats-hot-view.d.ts +1 -1
  424. package/dist/data-plane/server/db/migrations/20230608T155101190Z-algo-whats-hot-view.d.ts.map +1 -1
  425. package/dist/data-plane/server/db/migrations/20230608T155101190Z-algo-whats-hot-view.js.map +1 -1
  426. package/dist/data-plane/server/db/migrations/20230608T201813132Z-mute-lists.d.ts +1 -1
  427. package/dist/data-plane/server/db/migrations/20230608T201813132Z-mute-lists.d.ts.map +1 -1
  428. package/dist/data-plane/server/db/migrations/20230608T201813132Z-mute-lists.js.map +1 -1
  429. package/dist/data-plane/server/db/migrations/20230608T205147239Z-mutes.d.ts +1 -1
  430. package/dist/data-plane/server/db/migrations/20230608T205147239Z-mutes.d.ts.map +1 -1
  431. package/dist/data-plane/server/db/migrations/20230608T205147239Z-mutes.js.map +1 -1
  432. package/dist/data-plane/server/db/migrations/20230609T153623961Z-blocks.d.ts +1 -1
  433. package/dist/data-plane/server/db/migrations/20230609T153623961Z-blocks.d.ts.map +1 -1
  434. package/dist/data-plane/server/db/migrations/20230609T153623961Z-blocks.js.map +1 -1
  435. package/dist/data-plane/server/db/migrations/20230609T232122649Z-actor-deletion-indexes.d.ts +1 -1
  436. package/dist/data-plane/server/db/migrations/20230609T232122649Z-actor-deletion-indexes.d.ts.map +1 -1
  437. package/dist/data-plane/server/db/migrations/20230609T232122649Z-actor-deletion-indexes.js.map +1 -1
  438. package/dist/data-plane/server/db/migrations/20230610T203555962Z-suggested-follows.d.ts +1 -1
  439. package/dist/data-plane/server/db/migrations/20230610T203555962Z-suggested-follows.d.ts.map +1 -1
  440. package/dist/data-plane/server/db/migrations/20230610T203555962Z-suggested-follows.js.map +1 -1
  441. package/dist/data-plane/server/db/migrations/20230611T215300060Z-actor-state.d.ts +1 -1
  442. package/dist/data-plane/server/db/migrations/20230611T215300060Z-actor-state.d.ts.map +1 -1
  443. package/dist/data-plane/server/db/migrations/20230611T215300060Z-actor-state.js.map +1 -1
  444. package/dist/data-plane/server/db/migrations/20230620T161134972Z-post-langs.d.ts +1 -1
  445. package/dist/data-plane/server/db/migrations/20230620T161134972Z-post-langs.d.ts.map +1 -1
  446. package/dist/data-plane/server/db/migrations/20230620T161134972Z-post-langs.js.map +1 -1
  447. package/dist/data-plane/server/db/migrations/20230627T212437895Z-optional-handle.d.ts +1 -1
  448. package/dist/data-plane/server/db/migrations/20230627T212437895Z-optional-handle.d.ts.map +1 -1
  449. package/dist/data-plane/server/db/migrations/20230627T212437895Z-optional-handle.js.map +1 -1
  450. package/dist/data-plane/server/db/migrations/20230629T220835893Z-remove-post-hierarchy.d.ts +1 -1
  451. package/dist/data-plane/server/db/migrations/20230629T220835893Z-remove-post-hierarchy.d.ts.map +1 -1
  452. package/dist/data-plane/server/db/migrations/20230629T220835893Z-remove-post-hierarchy.js.map +1 -1
  453. package/dist/data-plane/server/db/migrations/20230703T045536691Z-feed-and-label-indices.d.ts +1 -1
  454. package/dist/data-plane/server/db/migrations/20230703T045536691Z-feed-and-label-indices.d.ts.map +1 -1
  455. package/dist/data-plane/server/db/migrations/20230703T045536691Z-feed-and-label-indices.js.map +1 -1
  456. package/dist/data-plane/server/db/migrations/20230720T164800037Z-posts-cursor-idx.d.ts +1 -1
  457. package/dist/data-plane/server/db/migrations/20230720T164800037Z-posts-cursor-idx.d.ts.map +1 -1
  458. package/dist/data-plane/server/db/migrations/20230720T164800037Z-posts-cursor-idx.js.map +1 -1
  459. package/dist/data-plane/server/db/migrations/20230807T035309811Z-feed-item-delete-invite-for-user-idx.d.ts +1 -1
  460. package/dist/data-plane/server/db/migrations/20230807T035309811Z-feed-item-delete-invite-for-user-idx.d.ts.map +1 -1
  461. package/dist/data-plane/server/db/migrations/20230807T035309811Z-feed-item-delete-invite-for-user-idx.js.map +1 -1
  462. package/dist/data-plane/server/db/migrations/20230808T172902639Z-repo-rev.d.ts +1 -1
  463. package/dist/data-plane/server/db/migrations/20230808T172902639Z-repo-rev.d.ts.map +1 -1
  464. package/dist/data-plane/server/db/migrations/20230808T172902639Z-repo-rev.js.map +1 -1
  465. package/dist/data-plane/server/db/migrations/20230810T203349843Z-action-duration.d.ts +1 -1
  466. package/dist/data-plane/server/db/migrations/20230810T203349843Z-action-duration.d.ts.map +1 -1
  467. package/dist/data-plane/server/db/migrations/20230810T203349843Z-action-duration.js.map +1 -1
  468. package/dist/data-plane/server/db/migrations/20230817T195936007Z-native-notifications.d.ts +1 -1
  469. package/dist/data-plane/server/db/migrations/20230817T195936007Z-native-notifications.d.ts.map +1 -1
  470. package/dist/data-plane/server/db/migrations/20230817T195936007Z-native-notifications.js.map +1 -1
  471. package/dist/data-plane/server/db/migrations/20230830T205507322Z-suggested-feeds.d.ts +1 -1
  472. package/dist/data-plane/server/db/migrations/20230830T205507322Z-suggested-feeds.d.ts.map +1 -1
  473. package/dist/data-plane/server/db/migrations/20230830T205507322Z-suggested-feeds.js.map +1 -1
  474. package/dist/data-plane/server/db/migrations/20230904T211011773Z-block-lists.d.ts +1 -1
  475. package/dist/data-plane/server/db/migrations/20230904T211011773Z-block-lists.d.ts.map +1 -1
  476. package/dist/data-plane/server/db/migrations/20230904T211011773Z-block-lists.js.map +1 -1
  477. package/dist/data-plane/server/db/migrations/20230906T222220386Z-thread-gating.d.ts +1 -1
  478. package/dist/data-plane/server/db/migrations/20230906T222220386Z-thread-gating.d.ts.map +1 -1
  479. package/dist/data-plane/server/db/migrations/20230906T222220386Z-thread-gating.js.map +1 -1
  480. package/dist/data-plane/server/db/migrations/20230920T213858047Z-add-tags-to-post.d.ts +1 -1
  481. package/dist/data-plane/server/db/migrations/20230920T213858047Z-add-tags-to-post.d.ts.map +1 -1
  482. package/dist/data-plane/server/db/migrations/20230920T213858047Z-add-tags-to-post.js.map +1 -1
  483. package/dist/data-plane/server/db/migrations/20230929T192920807Z-record-cursor-indexes.d.ts +1 -1
  484. package/dist/data-plane/server/db/migrations/20230929T192920807Z-record-cursor-indexes.d.ts.map +1 -1
  485. package/dist/data-plane/server/db/migrations/20230929T192920807Z-record-cursor-indexes.js.map +1 -1
  486. package/dist/data-plane/server/db/migrations/20231003T202833377Z-create-moderation-subject-status.d.ts +1 -1
  487. package/dist/data-plane/server/db/migrations/20231003T202833377Z-create-moderation-subject-status.d.ts.map +1 -1
  488. package/dist/data-plane/server/db/migrations/20231003T202833377Z-create-moderation-subject-status.js.map +1 -1
  489. package/dist/data-plane/server/db/migrations/20231220T225126090Z-blob-takedowns.d.ts +1 -1
  490. package/dist/data-plane/server/db/migrations/20231220T225126090Z-blob-takedowns.d.ts.map +1 -1
  491. package/dist/data-plane/server/db/migrations/20231220T225126090Z-blob-takedowns.js.map +1 -1
  492. package/dist/data-plane/server/db/migrations/20240124T023719200Z-tagged-suggestions.d.ts +1 -1
  493. package/dist/data-plane/server/db/migrations/20240124T023719200Z-tagged-suggestions.d.ts.map +1 -1
  494. package/dist/data-plane/server/db/migrations/20240124T023719200Z-tagged-suggestions.js.map +1 -1
  495. package/dist/data-plane/server/db/migrations/20240226T225725627Z-labelers.d.ts +1 -1
  496. package/dist/data-plane/server/db/migrations/20240226T225725627Z-labelers.d.ts.map +1 -1
  497. package/dist/data-plane/server/db/migrations/20240226T225725627Z-labelers.js.map +1 -1
  498. package/dist/data-plane/server/db/migrations/20240530T170337073Z-account-deactivation.d.ts +1 -1
  499. package/dist/data-plane/server/db/migrations/20240530T170337073Z-account-deactivation.d.ts.map +1 -1
  500. package/dist/data-plane/server/db/migrations/20240530T170337073Z-account-deactivation.js.map +1 -1
  501. package/dist/data-plane/server/db/migrations/20240606T171229898Z-thread-mutes.d.ts +1 -1
  502. package/dist/data-plane/server/db/migrations/20240606T171229898Z-thread-mutes.d.ts.map +1 -1
  503. package/dist/data-plane/server/db/migrations/20240606T171229898Z-thread-mutes.js.map +1 -1
  504. package/dist/data-plane/server/db/migrations/20240606T222548219Z-starter-packs.d.ts +1 -1
  505. package/dist/data-plane/server/db/migrations/20240606T222548219Z-starter-packs.d.ts.map +1 -1
  506. package/dist/data-plane/server/db/migrations/20240606T222548219Z-starter-packs.js.map +1 -1
  507. package/dist/data-plane/server/db/migrations/20240719T203853939Z-priority-notifs.d.ts +1 -1
  508. package/dist/data-plane/server/db/migrations/20240719T203853939Z-priority-notifs.d.ts.map +1 -1
  509. package/dist/data-plane/server/db/migrations/20240719T203853939Z-priority-notifs.js.map +1 -1
  510. package/dist/data-plane/server/db/migrations/20240723T220700077Z-quotes-post-aggs.d.ts +1 -1
  511. package/dist/data-plane/server/db/migrations/20240723T220700077Z-quotes-post-aggs.d.ts.map +1 -1
  512. package/dist/data-plane/server/db/migrations/20240723T220700077Z-quotes-post-aggs.js.map +1 -1
  513. package/dist/data-plane/server/db/migrations/20240723T220703655Z-quotes.d.ts +1 -1
  514. package/dist/data-plane/server/db/migrations/20240723T220703655Z-quotes.d.ts.map +1 -1
  515. package/dist/data-plane/server/db/migrations/20240723T220703655Z-quotes.js.map +1 -1
  516. package/dist/data-plane/server/db/migrations/20240801T193939827Z-post-gate.d.ts +1 -1
  517. package/dist/data-plane/server/db/migrations/20240801T193939827Z-post-gate.d.ts.map +1 -1
  518. package/dist/data-plane/server/db/migrations/20240801T193939827Z-post-gate.js.map +1 -1
  519. package/dist/data-plane/server/db/migrations/20240808T224251220Z-post-gate-flags.d.ts +1 -1
  520. package/dist/data-plane/server/db/migrations/20240808T224251220Z-post-gate-flags.d.ts.map +1 -1
  521. package/dist/data-plane/server/db/migrations/20240808T224251220Z-post-gate-flags.js.map +1 -1
  522. package/dist/data-plane/server/db/migrations/20240829T211238293Z-simplify-actor-sync.d.ts +1 -1
  523. package/dist/data-plane/server/db/migrations/20240829T211238293Z-simplify-actor-sync.d.ts.map +1 -1
  524. package/dist/data-plane/server/db/migrations/20240829T211238293Z-simplify-actor-sync.js.map +1 -1
  525. package/dist/data-plane/server/db/migrations/20240831T134810923Z-pinned-posts.d.ts +1 -1
  526. package/dist/data-plane/server/db/migrations/20240831T134810923Z-pinned-posts.d.ts.map +1 -1
  527. package/dist/data-plane/server/db/migrations/20240831T134810923Z-pinned-posts.js.map +1 -1
  528. package/dist/data-plane/server/db/migrations/20241114T153108102Z-add-starter-packs-name.d.ts +1 -1
  529. package/dist/data-plane/server/db/migrations/20241114T153108102Z-add-starter-packs-name.d.ts.map +1 -1
  530. package/dist/data-plane/server/db/migrations/20241114T153108102Z-add-starter-packs-name.js.map +1 -1
  531. package/dist/data-plane/server/db/migrations/20250116T222618297Z-post-embed-video.d.ts +1 -1
  532. package/dist/data-plane/server/db/migrations/20250116T222618297Z-post-embed-video.d.ts.map +1 -1
  533. package/dist/data-plane/server/db/migrations/20250116T222618297Z-post-embed-video.js.map +1 -1
  534. package/dist/data-plane/server/db/migrations/20250207T174822012Z-add-label-exp.d.ts +1 -1
  535. package/dist/data-plane/server/db/migrations/20250207T174822012Z-add-label-exp.d.ts.map +1 -1
  536. package/dist/data-plane/server/db/migrations/20250207T174822012Z-add-label-exp.js.map +1 -1
  537. package/dist/data-plane/server/db/migrations/20250404T163421487Z-verifications.d.ts +1 -1
  538. package/dist/data-plane/server/db/migrations/20250404T163421487Z-verifications.d.ts.map +1 -1
  539. package/dist/data-plane/server/db/migrations/20250404T163421487Z-verifications.js.map +1 -1
  540. package/dist/data-plane/server/db/migrations/20250526T023712742Z-like-repost-via.d.ts +1 -1
  541. package/dist/data-plane/server/db/migrations/20250526T023712742Z-like-repost-via.d.ts.map +1 -1
  542. package/dist/data-plane/server/db/migrations/20250526T023712742Z-like-repost-via.js.map +1 -1
  543. package/dist/data-plane/server/db/migrations/20250528T221913281Z-add-record-tags.d.ts +1 -1
  544. package/dist/data-plane/server/db/migrations/20250528T221913281Z-add-record-tags.d.ts.map +1 -1
  545. package/dist/data-plane/server/db/migrations/20250528T221913281Z-add-record-tags.js.map +1 -1
  546. package/dist/data-plane/server/db/migrations/20250602T190357447Z-add-private-data.d.ts +1 -1
  547. package/dist/data-plane/server/db/migrations/20250602T190357447Z-add-private-data.d.ts.map +1 -1
  548. package/dist/data-plane/server/db/migrations/20250602T190357447Z-add-private-data.js.map +1 -1
  549. package/dist/data-plane/server/db/migrations/20250611T140649895Z-add-activity-subscription.d.ts +1 -1
  550. package/dist/data-plane/server/db/migrations/20250611T140649895Z-add-activity-subscription.d.ts.map +1 -1
  551. package/dist/data-plane/server/db/migrations/20250611T140649895Z-add-activity-subscription.js.map +1 -1
  552. package/dist/data-plane/server/db/migrations/20250627T025331240Z-add-actor-age-assurance-columns.d.ts +1 -1
  553. package/dist/data-plane/server/db/migrations/20250627T025331240Z-add-actor-age-assurance-columns.d.ts.map +1 -1
  554. package/dist/data-plane/server/db/migrations/20250627T025331240Z-add-actor-age-assurance-columns.js.map +1 -1
  555. package/dist/data-plane/server/db/migrations/20250812T183735692Z-add-bookmarks.d.ts +1 -1
  556. package/dist/data-plane/server/db/migrations/20250812T183735692Z-add-bookmarks.d.ts.map +1 -1
  557. package/dist/data-plane/server/db/migrations/20250812T183735692Z-add-bookmarks.js.map +1 -1
  558. package/dist/data-plane/server/db/migrations/20250813T174955711Z-add-post-agg-bookmarks.d.ts +1 -1
  559. package/dist/data-plane/server/db/migrations/20250813T174955711Z-add-post-agg-bookmarks.d.ts.map +1 -1
  560. package/dist/data-plane/server/db/migrations/20250813T174955711Z-add-post-agg-bookmarks.js.map +1 -1
  561. package/dist/data-plane/server/db/migrations/20251120T004738098Z-update-actor-age-assurance-v2.d.ts +1 -1
  562. package/dist/data-plane/server/db/migrations/20251120T004738098Z-update-actor-age-assurance-v2.d.ts.map +1 -1
  563. package/dist/data-plane/server/db/migrations/20251120T004738098Z-update-actor-age-assurance-v2.js.map +1 -1
  564. package/dist/data-plane/server/db/migrations/20260112T133951271Z-add-drafts.d.ts +1 -1
  565. package/dist/data-plane/server/db/migrations/20260112T133951271Z-add-drafts.d.ts.map +1 -1
  566. package/dist/data-plane/server/db/migrations/20260112T133951271Z-add-drafts.js.map +1 -1
  567. package/dist/data-plane/server/db/migrations/20260604T224952774Z-post-embed-gallery-image.d.ts +1 -1
  568. package/dist/data-plane/server/db/migrations/20260604T224952774Z-post-embed-gallery-image.d.ts.map +1 -1
  569. package/dist/data-plane/server/db/migrations/20260604T224952774Z-post-embed-gallery-image.js.map +1 -1
  570. package/dist/data-plane/server/db/migrations/provider.d.ts +2 -2
  571. package/dist/data-plane/server/db/migrations/provider.d.ts.map +1 -1
  572. package/dist/data-plane/server/db/migrations/provider.js.map +1 -1
  573. package/dist/data-plane/server/db/pagination.d.ts +2 -2
  574. package/dist/data-plane/server/db/pagination.d.ts.map +1 -1
  575. package/dist/data-plane/server/db/pagination.js.map +1 -1
  576. package/dist/data-plane/server/db/tables/actor-block.d.ts +1 -1
  577. package/dist/data-plane/server/db/tables/actor-block.d.ts.map +1 -1
  578. package/dist/data-plane/server/db/tables/actor-block.js.map +1 -1
  579. package/dist/data-plane/server/db/tables/actor.d.ts +1 -1
  580. package/dist/data-plane/server/db/tables/actor.d.ts.map +1 -1
  581. package/dist/data-plane/server/db/tables/actor.js.map +1 -1
  582. package/dist/data-plane/server/db/tables/did-cache.d.ts +1 -1
  583. package/dist/data-plane/server/db/tables/did-cache.d.ts.map +1 -1
  584. package/dist/data-plane/server/db/tables/did-cache.js.map +1 -1
  585. package/dist/data-plane/server/db/tables/feed-generator.d.ts +1 -1
  586. package/dist/data-plane/server/db/tables/feed-generator.d.ts.map +1 -1
  587. package/dist/data-plane/server/db/tables/feed-generator.js.map +1 -1
  588. package/dist/data-plane/server/db/tables/follow.d.ts +1 -1
  589. package/dist/data-plane/server/db/tables/follow.d.ts.map +1 -1
  590. package/dist/data-plane/server/db/tables/follow.js.map +1 -1
  591. package/dist/data-plane/server/db/tables/labeler.d.ts +1 -1
  592. package/dist/data-plane/server/db/tables/labeler.d.ts.map +1 -1
  593. package/dist/data-plane/server/db/tables/labeler.js.map +1 -1
  594. package/dist/data-plane/server/db/tables/like.d.ts +1 -1
  595. package/dist/data-plane/server/db/tables/like.d.ts.map +1 -1
  596. package/dist/data-plane/server/db/tables/like.js.map +1 -1
  597. package/dist/data-plane/server/db/tables/list-block.d.ts +1 -1
  598. package/dist/data-plane/server/db/tables/list-block.d.ts.map +1 -1
  599. package/dist/data-plane/server/db/tables/list-block.js.map +1 -1
  600. package/dist/data-plane/server/db/tables/list-item.d.ts +1 -1
  601. package/dist/data-plane/server/db/tables/list-item.d.ts.map +1 -1
  602. package/dist/data-plane/server/db/tables/list-item.js.map +1 -1
  603. package/dist/data-plane/server/db/tables/list.d.ts +1 -1
  604. package/dist/data-plane/server/db/tables/list.d.ts.map +1 -1
  605. package/dist/data-plane/server/db/tables/list.js.map +1 -1
  606. package/dist/data-plane/server/db/tables/notification.d.ts +1 -1
  607. package/dist/data-plane/server/db/tables/notification.d.ts.map +1 -1
  608. package/dist/data-plane/server/db/tables/notification.js.map +1 -1
  609. package/dist/data-plane/server/db/tables/post-agg.d.ts +1 -1
  610. package/dist/data-plane/server/db/tables/post-agg.d.ts.map +1 -1
  611. package/dist/data-plane/server/db/tables/post-agg.js.map +1 -1
  612. package/dist/data-plane/server/db/tables/post.d.ts +1 -1
  613. package/dist/data-plane/server/db/tables/post.d.ts.map +1 -1
  614. package/dist/data-plane/server/db/tables/post.js.map +1 -1
  615. package/dist/data-plane/server/db/tables/profile-agg.d.ts +1 -1
  616. package/dist/data-plane/server/db/tables/profile-agg.d.ts.map +1 -1
  617. package/dist/data-plane/server/db/tables/profile-agg.js.map +1 -1
  618. package/dist/data-plane/server/db/tables/quote.d.ts +1 -1
  619. package/dist/data-plane/server/db/tables/quote.d.ts.map +1 -1
  620. package/dist/data-plane/server/db/tables/quote.js.map +1 -1
  621. package/dist/data-plane/server/db/tables/record.d.ts +1 -1
  622. package/dist/data-plane/server/db/tables/record.d.ts.map +1 -1
  623. package/dist/data-plane/server/db/tables/record.js.map +1 -1
  624. package/dist/data-plane/server/db/tables/repost.d.ts +1 -1
  625. package/dist/data-plane/server/db/tables/repost.d.ts.map +1 -1
  626. package/dist/data-plane/server/db/tables/repost.js.map +1 -1
  627. package/dist/data-plane/server/db/tables/starter-pack.d.ts +1 -1
  628. package/dist/data-plane/server/db/tables/starter-pack.d.ts.map +1 -1
  629. package/dist/data-plane/server/db/tables/starter-pack.js.map +1 -1
  630. package/dist/data-plane/server/db/tables/verification.d.ts +1 -1
  631. package/dist/data-plane/server/db/tables/verification.d.ts.map +1 -1
  632. package/dist/data-plane/server/db/tables/verification.js.map +1 -1
  633. package/dist/data-plane/server/db/types.d.ts +1 -1
  634. package/dist/data-plane/server/db/types.d.ts.map +1 -1
  635. package/dist/data-plane/server/db/types.js.map +1 -1
  636. package/dist/data-plane/server/db/util.d.ts +2 -2
  637. package/dist/data-plane/server/db/util.d.ts.map +1 -1
  638. package/dist/data-plane/server/db/util.js.map +1 -1
  639. package/dist/data-plane/server/index.d.ts +2 -2
  640. package/dist/data-plane/server/index.d.ts.map +1 -1
  641. package/dist/data-plane/server/index.js.map +1 -1
  642. package/dist/data-plane/server/indexing/index.d.ts +5 -5
  643. package/dist/data-plane/server/indexing/index.d.ts.map +1 -1
  644. package/dist/data-plane/server/indexing/index.js.map +1 -1
  645. package/dist/data-plane/server/indexing/plugins/block.d.ts +2 -2
  646. package/dist/data-plane/server/indexing/plugins/block.d.ts.map +1 -1
  647. package/dist/data-plane/server/indexing/plugins/block.js.map +1 -1
  648. package/dist/data-plane/server/indexing/plugins/chat-declaration.d.ts +2 -2
  649. package/dist/data-plane/server/indexing/plugins/chat-declaration.d.ts.map +1 -1
  650. package/dist/data-plane/server/indexing/plugins/chat-declaration.js.map +1 -1
  651. package/dist/data-plane/server/indexing/plugins/feed-generator.d.ts +2 -2
  652. package/dist/data-plane/server/indexing/plugins/feed-generator.d.ts.map +1 -1
  653. package/dist/data-plane/server/indexing/plugins/feed-generator.js.map +1 -1
  654. package/dist/data-plane/server/indexing/plugins/follow.d.ts +2 -2
  655. package/dist/data-plane/server/indexing/plugins/follow.d.ts.map +1 -1
  656. package/dist/data-plane/server/indexing/plugins/follow.js.map +1 -1
  657. package/dist/data-plane/server/indexing/plugins/germ-declaration.d.ts +2 -2
  658. package/dist/data-plane/server/indexing/plugins/germ-declaration.d.ts.map +1 -1
  659. package/dist/data-plane/server/indexing/plugins/germ-declaration.js.map +1 -1
  660. package/dist/data-plane/server/indexing/plugins/labeler.d.ts +2 -2
  661. package/dist/data-plane/server/indexing/plugins/labeler.d.ts.map +1 -1
  662. package/dist/data-plane/server/indexing/plugins/labeler.js.map +1 -1
  663. package/dist/data-plane/server/indexing/plugins/like.d.ts +2 -2
  664. package/dist/data-plane/server/indexing/plugins/like.d.ts.map +1 -1
  665. package/dist/data-plane/server/indexing/plugins/like.js.map +1 -1
  666. package/dist/data-plane/server/indexing/plugins/list-block.d.ts +2 -2
  667. package/dist/data-plane/server/indexing/plugins/list-block.d.ts.map +1 -1
  668. package/dist/data-plane/server/indexing/plugins/list-block.js.map +1 -1
  669. package/dist/data-plane/server/indexing/plugins/list-item.d.ts +2 -2
  670. package/dist/data-plane/server/indexing/plugins/list-item.d.ts.map +1 -1
  671. package/dist/data-plane/server/indexing/plugins/list-item.js.map +1 -1
  672. package/dist/data-plane/server/indexing/plugins/list.d.ts +2 -2
  673. package/dist/data-plane/server/indexing/plugins/list.d.ts.map +1 -1
  674. package/dist/data-plane/server/indexing/plugins/list.js.map +1 -1
  675. package/dist/data-plane/server/indexing/plugins/notif-declaration.d.ts +2 -2
  676. package/dist/data-plane/server/indexing/plugins/notif-declaration.d.ts.map +1 -1
  677. package/dist/data-plane/server/indexing/plugins/notif-declaration.js.map +1 -1
  678. package/dist/data-plane/server/indexing/plugins/post-gate.d.ts +2 -2
  679. package/dist/data-plane/server/indexing/plugins/post-gate.d.ts.map +1 -1
  680. package/dist/data-plane/server/indexing/plugins/post-gate.js.map +1 -1
  681. package/dist/data-plane/server/indexing/plugins/post.d.ts +4 -4
  682. package/dist/data-plane/server/indexing/plugins/post.d.ts.map +1 -1
  683. package/dist/data-plane/server/indexing/plugins/post.js.map +1 -1
  684. package/dist/data-plane/server/indexing/plugins/profile.d.ts +2 -2
  685. package/dist/data-plane/server/indexing/plugins/profile.d.ts.map +1 -1
  686. package/dist/data-plane/server/indexing/plugins/profile.js.map +1 -1
  687. package/dist/data-plane/server/indexing/plugins/repost.d.ts +2 -2
  688. package/dist/data-plane/server/indexing/plugins/repost.d.ts.map +1 -1
  689. package/dist/data-plane/server/indexing/plugins/repost.js.map +1 -1
  690. package/dist/data-plane/server/indexing/plugins/starter-pack.d.ts +2 -2
  691. package/dist/data-plane/server/indexing/plugins/starter-pack.d.ts.map +1 -1
  692. package/dist/data-plane/server/indexing/plugins/starter-pack.js.map +1 -1
  693. package/dist/data-plane/server/indexing/plugins/status.d.ts +2 -2
  694. package/dist/data-plane/server/indexing/plugins/status.d.ts.map +1 -1
  695. package/dist/data-plane/server/indexing/plugins/status.js.map +1 -1
  696. package/dist/data-plane/server/indexing/plugins/thread-gate.d.ts +2 -2
  697. package/dist/data-plane/server/indexing/plugins/thread-gate.d.ts.map +1 -1
  698. package/dist/data-plane/server/indexing/plugins/thread-gate.js.map +1 -1
  699. package/dist/data-plane/server/indexing/plugins/verification.d.ts +2 -2
  700. package/dist/data-plane/server/indexing/plugins/verification.d.ts.map +1 -1
  701. package/dist/data-plane/server/indexing/plugins/verification.js.map +1 -1
  702. package/dist/data-plane/server/indexing/processor.d.ts +6 -6
  703. package/dist/data-plane/server/indexing/processor.d.ts.map +1 -1
  704. package/dist/data-plane/server/indexing/processor.js +1 -1
  705. package/dist/data-plane/server/indexing/processor.js.map +1 -1
  706. package/dist/data-plane/server/routes/activity-subscription.d.ts +3 -3
  707. package/dist/data-plane/server/routes/activity-subscription.d.ts.map +1 -1
  708. package/dist/data-plane/server/routes/activity-subscription.js.map +1 -1
  709. package/dist/data-plane/server/routes/blocks.d.ts +3 -3
  710. package/dist/data-plane/server/routes/blocks.d.ts.map +1 -1
  711. package/dist/data-plane/server/routes/blocks.js.map +1 -1
  712. package/dist/data-plane/server/routes/bookmarks.d.ts +3 -3
  713. package/dist/data-plane/server/routes/bookmarks.d.ts.map +1 -1
  714. package/dist/data-plane/server/routes/bookmarks.js.map +1 -1
  715. package/dist/data-plane/server/routes/drafts.d.ts +3 -3
  716. package/dist/data-plane/server/routes/drafts.d.ts.map +1 -1
  717. package/dist/data-plane/server/routes/drafts.js.map +1 -1
  718. package/dist/data-plane/server/routes/feed-gens.d.ts +3 -3
  719. package/dist/data-plane/server/routes/feed-gens.d.ts.map +1 -1
  720. package/dist/data-plane/server/routes/feed-gens.js.map +1 -1
  721. package/dist/data-plane/server/routes/feeds.d.ts +3 -3
  722. package/dist/data-plane/server/routes/feeds.d.ts.map +1 -1
  723. package/dist/data-plane/server/routes/feeds.js.map +1 -1
  724. package/dist/data-plane/server/routes/follows.d.ts +3 -3
  725. package/dist/data-plane/server/routes/follows.d.ts.map +1 -1
  726. package/dist/data-plane/server/routes/follows.js.map +1 -1
  727. package/dist/data-plane/server/routes/identity.d.ts +4 -4
  728. package/dist/data-plane/server/routes/identity.d.ts.map +1 -1
  729. package/dist/data-plane/server/routes/identity.js +1 -1
  730. package/dist/data-plane/server/routes/identity.js.map +1 -1
  731. package/dist/data-plane/server/routes/index.d.ts +3 -3
  732. package/dist/data-plane/server/routes/index.d.ts.map +1 -1
  733. package/dist/data-plane/server/routes/index.js.map +1 -1
  734. package/dist/data-plane/server/routes/interactions.d.ts +3 -3
  735. package/dist/data-plane/server/routes/interactions.d.ts.map +1 -1
  736. package/dist/data-plane/server/routes/interactions.js.map +1 -1
  737. package/dist/data-plane/server/routes/labels.d.ts +3 -3
  738. package/dist/data-plane/server/routes/labels.d.ts.map +1 -1
  739. package/dist/data-plane/server/routes/labels.js.map +1 -1
  740. package/dist/data-plane/server/routes/likes.d.ts +3 -3
  741. package/dist/data-plane/server/routes/likes.d.ts.map +1 -1
  742. package/dist/data-plane/server/routes/likes.js.map +1 -1
  743. package/dist/data-plane/server/routes/lists.d.ts +3 -3
  744. package/dist/data-plane/server/routes/lists.d.ts.map +1 -1
  745. package/dist/data-plane/server/routes/lists.js.map +1 -1
  746. package/dist/data-plane/server/routes/moderation.d.ts +3 -3
  747. package/dist/data-plane/server/routes/moderation.d.ts.map +1 -1
  748. package/dist/data-plane/server/routes/moderation.js.map +1 -1
  749. package/dist/data-plane/server/routes/mutes.d.ts +3 -3
  750. package/dist/data-plane/server/routes/mutes.d.ts.map +1 -1
  751. package/dist/data-plane/server/routes/mutes.js.map +1 -1
  752. package/dist/data-plane/server/routes/notifs.d.ts +4 -4
  753. package/dist/data-plane/server/routes/notifs.d.ts.map +1 -1
  754. package/dist/data-plane/server/routes/notifs.js.map +1 -1
  755. package/dist/data-plane/server/routes/profile.d.ts +3 -3
  756. package/dist/data-plane/server/routes/profile.d.ts.map +1 -1
  757. package/dist/data-plane/server/routes/profile.js +1 -1
  758. package/dist/data-plane/server/routes/profile.js.map +1 -1
  759. package/dist/data-plane/server/routes/quotes.d.ts +3 -3
  760. package/dist/data-plane/server/routes/quotes.d.ts.map +1 -1
  761. package/dist/data-plane/server/routes/quotes.js.map +1 -1
  762. package/dist/data-plane/server/routes/records.d.ts +3 -3
  763. package/dist/data-plane/server/routes/records.d.ts.map +1 -1
  764. package/dist/data-plane/server/routes/records.js.map +1 -1
  765. package/dist/data-plane/server/routes/relationships.d.ts +3 -3
  766. package/dist/data-plane/server/routes/relationships.d.ts.map +1 -1
  767. package/dist/data-plane/server/routes/relationships.js.map +1 -1
  768. package/dist/data-plane/server/routes/reposts.d.ts +3 -3
  769. package/dist/data-plane/server/routes/reposts.d.ts.map +1 -1
  770. package/dist/data-plane/server/routes/reposts.js.map +1 -1
  771. package/dist/data-plane/server/routes/search.d.ts +3 -3
  772. package/dist/data-plane/server/routes/search.d.ts.map +1 -1
  773. package/dist/data-plane/server/routes/search.js.map +1 -1
  774. package/dist/data-plane/server/routes/site-standard.d.ts +3 -3
  775. package/dist/data-plane/server/routes/site-standard.d.ts.map +1 -1
  776. package/dist/data-plane/server/routes/site-standard.js.map +1 -1
  777. package/dist/data-plane/server/routes/sitemap.d.ts +2 -2
  778. package/dist/data-plane/server/routes/sitemap.d.ts.map +1 -1
  779. package/dist/data-plane/server/routes/sitemap.js.map +1 -1
  780. package/dist/data-plane/server/routes/starter-packs.d.ts +3 -3
  781. package/dist/data-plane/server/routes/starter-packs.d.ts.map +1 -1
  782. package/dist/data-plane/server/routes/starter-packs.js.map +1 -1
  783. package/dist/data-plane/server/routes/suggestions.d.ts +3 -3
  784. package/dist/data-plane/server/routes/suggestions.d.ts.map +1 -1
  785. package/dist/data-plane/server/routes/suggestions.js.map +1 -1
  786. package/dist/data-plane/server/routes/sync.d.ts +3 -3
  787. package/dist/data-plane/server/routes/sync.d.ts.map +1 -1
  788. package/dist/data-plane/server/routes/sync.js.map +1 -1
  789. package/dist/data-plane/server/routes/threads.d.ts +3 -3
  790. package/dist/data-plane/server/routes/threads.d.ts.map +1 -1
  791. package/dist/data-plane/server/routes/threads.js.map +1 -1
  792. package/dist/data-plane/server/subscription.d.ts +2 -2
  793. package/dist/data-plane/server/subscription.d.ts.map +1 -1
  794. package/dist/data-plane/server/subscription.js +1 -1
  795. package/dist/data-plane/server/subscription.js.map +1 -1
  796. package/dist/data-plane/server/util.d.ts +2 -2
  797. package/dist/data-plane/server/util.d.ts.map +1 -1
  798. package/dist/data-plane/server/util.js.map +1 -1
  799. package/dist/error.d.ts +1 -1
  800. package/dist/error.d.ts.map +1 -1
  801. package/dist/error.js.map +1 -1
  802. package/dist/etcd.d.ts +1 -1
  803. package/dist/etcd.d.ts.map +1 -1
  804. package/dist/etcd.js.map +1 -1
  805. package/dist/feature-gates/index.d.ts +1 -1
  806. package/dist/feature-gates/index.d.ts.map +1 -1
  807. package/dist/feature-gates/index.js +1 -0
  808. package/dist/feature-gates/index.js.map +1 -1
  809. package/dist/feature-gates/types.d.ts +1 -1
  810. package/dist/feature-gates/types.d.ts.map +1 -1
  811. package/dist/feature-gates/types.js.map +1 -1
  812. package/dist/feature-gates/utils.d.ts +2 -2
  813. package/dist/feature-gates/utils.d.ts.map +1 -1
  814. package/dist/feature-gates/utils.js.map +1 -1
  815. package/dist/hydration/actor.d.ts +7 -5
  816. package/dist/hydration/actor.d.ts.map +1 -1
  817. package/dist/hydration/actor.js +2 -0
  818. package/dist/hydration/actor.js.map +1 -1
  819. package/dist/hydration/external.d.ts +4 -4
  820. package/dist/hydration/external.d.ts.map +1 -1
  821. package/dist/hydration/external.js +1 -1
  822. package/dist/hydration/external.js.map +1 -1
  823. package/dist/hydration/feed.d.ts +4 -4
  824. package/dist/hydration/feed.d.ts.map +1 -1
  825. package/dist/hydration/feed.js.map +1 -1
  826. package/dist/hydration/graph.d.ts +5 -5
  827. package/dist/hydration/graph.d.ts.map +1 -1
  828. package/dist/hydration/graph.js +1 -1
  829. package/dist/hydration/graph.js.map +1 -1
  830. package/dist/hydration/hydrator.d.ts +11 -11
  831. package/dist/hydration/hydrator.d.ts.map +1 -1
  832. package/dist/hydration/hydrator.js +1 -1
  833. package/dist/hydration/hydrator.js.map +1 -1
  834. package/dist/hydration/label.d.ts +5 -5
  835. package/dist/hydration/label.d.ts.map +1 -1
  836. package/dist/hydration/label.js +1 -1
  837. package/dist/hydration/label.js.map +1 -1
  838. package/dist/hydration/util.d.ts +3 -3
  839. package/dist/hydration/util.d.ts.map +1 -1
  840. package/dist/hydration/util.js.map +1 -1
  841. package/dist/image/invalidator.d.ts +1 -1
  842. package/dist/image/invalidator.d.ts.map +1 -1
  843. package/dist/image/invalidator.js.map +1 -1
  844. package/dist/image/server.d.ts +3 -3
  845. package/dist/image/server.d.ts.map +1 -1
  846. package/dist/image/server.js.map +1 -1
  847. package/dist/image/sharp.d.ts +2 -2
  848. package/dist/image/sharp.d.ts.map +1 -1
  849. package/dist/image/sharp.js.map +1 -1
  850. package/dist/image/uri.d.ts +2 -2
  851. package/dist/image/uri.d.ts.map +1 -1
  852. package/dist/image/uri.js.map +1 -1
  853. package/dist/index.d.ts +3 -3
  854. package/dist/index.d.ts.map +1 -1
  855. package/dist/index.js.map +1 -1
  856. package/dist/kws.d.ts +2 -2
  857. package/dist/kws.d.ts.map +1 -1
  858. package/dist/kws.js.map +1 -1
  859. package/dist/lexicons/app/bsky/actor/defs.defs.d.ts +6 -0
  860. package/dist/lexicons/app/bsky/actor/defs.defs.d.ts.map +1 -1
  861. package/dist/lexicons/app/bsky/actor/defs.defs.js +1 -0
  862. package/dist/lexicons/app/bsky/actor/defs.defs.js.map +1 -1
  863. package/dist/logger.d.ts +1 -1
  864. package/dist/logger.d.ts.map +1 -1
  865. package/dist/logger.js.map +1 -1
  866. package/dist/pipeline.d.ts +1 -1
  867. package/dist/pipeline.d.ts.map +1 -1
  868. package/dist/pipeline.js.map +1 -1
  869. package/dist/rolodex.d.ts +2 -2
  870. package/dist/rolodex.d.ts.map +1 -1
  871. package/dist/rolodex.js.map +1 -1
  872. package/dist/stash.d.ts +2 -2
  873. package/dist/stash.d.ts.map +1 -1
  874. package/dist/stash.js.map +1 -1
  875. package/dist/util/http.d.ts +1 -1
  876. package/dist/util/http.d.ts.map +1 -1
  877. package/dist/util/http.js.map +1 -1
  878. package/dist/util/standard-site.d.ts +1 -1
  879. package/dist/util/standard-site.d.ts.map +1 -1
  880. package/dist/util/standard-site.js.map +1 -1
  881. package/dist/util/uris.d.ts +2 -2
  882. package/dist/util/uris.d.ts.map +1 -1
  883. package/dist/util/uris.js.map +1 -1
  884. package/dist/util.d.ts +1 -1
  885. package/dist/util.d.ts.map +1 -1
  886. package/dist/util.js.map +1 -1
  887. package/dist/views/index.d.ts +11 -11
  888. package/dist/views/index.d.ts.map +1 -1
  889. package/dist/views/index.js.map +1 -1
  890. package/dist/views/threads-v2.d.ts +3 -3
  891. package/dist/views/threads-v2.d.ts.map +1 -1
  892. package/dist/views/threads-v2.js.map +1 -1
  893. package/dist/views/types.d.ts +1 -1
  894. package/dist/views/types.d.ts.map +1 -1
  895. package/dist/views/types.js.map +1 -1
  896. package/dist/views/util.d.ts +2 -2
  897. package/dist/views/util.d.ts.map +1 -1
  898. package/dist/views/util.js.map +1 -1
  899. package/package.json +14 -14
@@ -1,4 +1,4 @@
1
- import { Server } from '@atproto/xrpc-server';
2
- import { AppContext } from '../../../../context.js';
1
+ import { type Server } from '@atproto/xrpc-server';
2
+ import type { AppContext } from '../../../../context.js';
3
3
  export default function (server: Server, ctx: AppContext): void;
4
4
  //# sourceMappingURL=initAgeAssurance.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"initAgeAssurance.d.ts","sourceRoot":"","sources":["../../../../../src/api/app/bsky/unspecced/initAgeAssurance.ts"],"names":[],"mappings":"AAGA,OAAO,EAGL,MAAM,EACP,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAUnD,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QAyEvD"}
1
+ {"version":3,"file":"initAgeAssurance.d.ts","sourceRoot":"","sources":["../../../../../src/api/app/bsky/unspecced/initAgeAssurance.ts"],"names":[],"mappings":"AAGA,OAAO,EAGL,KAAK,MAAM,EACZ,MAAM,sBAAsB,CAAA;AAC7B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAUxD,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QAyEvD"}
@@ -1 +1 @@
1
- {"version":3,"file":"initAgeAssurance.js","sourceRoot":"","sources":["../../../../../src/api/app/bsky/unspecced/initAgeAssurance.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAA;AAChC,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAA;AAC/D,OAAO,EACL,mBAAmB,EACnB,yBAAyB,GAE1B,MAAM,sBAAsB,CAAA;AAE7B,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAA;AAC5D,OAAO,EAAE,GAAG,EAAE,MAAM,+BAA+B,CAAA;AACnD,OAAO,EAAE,UAAU,IAAI,GAAG,EAAE,MAAM,uBAAuB,CAAA;AAGzD,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAIpE,MAAM,CAAC,OAAO,WAAW,MAAc,EAAE,GAAe;IACtD,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,gBAAgB,EAAE;QAC9C,IAAI,EAAE,GAAG,CAAC,YAAY,CAAC,QAAQ;QAC/B,OAAO,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE,EAAE;YACtC,I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EACf,QAAgB,EACgB,EAAE;IAClC,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,MAAM,GAAG,CAAC,SAAS,CAAC,SAAS,CAAC;YACxC,IAAI,EAAE,CAAC,QAAQ,CAAC;YAChB,yBAAyB,EAAE,CAAC,QAAQ,CAAC;YACrC,gBAAgB,EAAE,CAAC,QAAQ,CAAC;SAC7B,CAAC,CAAA;QAEF,OAAO,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;IACtB,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO,SAAS,CAAA;IAClB,CAAC;AACH,CAAC,CAAA","sourcesContent":["import crypto from 'node:crypto'\nimport { isEmailValid } from '@hapi/address'\nimport { isDisposableEmail } from 'disposable-email-domains-js'\nimport {\n InvalidRequestError,\n MethodNotImplementedError,\n Server,\n} from '@atproto/xrpc-server'\nimport { AppContext } from '../../../../context.js'\nimport { KwsExternalPayloadError } from '../../../../kws.js'\nimport { app } from '../../../../lexicons/index.js'\nimport { httpLogger as log } from '../../../../logger.js'\nimport { ActorInfo } from '../../../../proto/bsky_pb.js'\nimport { KwsExternalPayload } from '../../../kws/types.js'\nimport { createStashEvent, getClientUa } from '../../../kws/util.js'\n\ntype InputSchema = app.bsky.unspecced.initAgeAssurance.$InputBody\n\nexport default function (server: Server, ctx: AppContext) {\n server.add(app.bsky.unspecced.initAgeAssurance, {\n auth: ctx.authVerifier.standard,\n handler: async ({ auth, input, req }) => {\n if (!ctx.kwsClient) {\n throw new MethodNotImplementedError(\n 'This service is not configured to support age assurance.',\n )\n }\n\n const actorDid = auth.credentials.iss\n\n const actorInfo = await getAgeVerificationState(ctx, actorDid)\n\n if (actorInfo?.ageAssuranceStatus) {\n if (\n actorInfo.ageAssuranceStatus.status !== 'unknown' &&\n actorInfo.ageAssuranceStatus.status !== 'pending'\n ) {\n throw new InvalidRequestError(\n `Cannot initiate age assurance flow from current state: ${actorInfo.ageAssuranceStatus.status}`,\n 'InvalidInitiation',\n )\n }\n }\n\n const { countryCode, email, language } = validateInput(input.body)\n\n const attemptId = crypto.randomUUID()\n // Assumes `app.set('trust proxy', ...)` configured with `true` or specific values.\n const initIp = req.ip\n const initUa = getClientUa(req)\n const externalPayload: KwsExternalPayload = { actorDid, attemptId }\n\n try {\n await ctx.kwsClient.sendEmail({\n countryCode: countryCode.toUpperCase(),\n email,\n externalPayload,\n language,\n })\n } catch (err) {\n if (err instanceof KwsExternalPayloadError) {\n log.error(\n { externalPayload },\n 'Age Assurance flow failed because external payload got too long, which is caused by the DID being too long',\n )\n throw new InvalidRequestError(\n 'Age Assurance flow failed because DID is too long',\n 'DidTooLong',\n )\n }\n throw err\n }\n\n const event = await createStashEvent(ctx, {\n actorDid,\n attemptId,\n email,\n initIp,\n initUa,\n status: 'pending',\n })\n\n return {\n encoding: 'application/json',\n body: {\n status: event.status,\n lastInitiatedAt: event.createdAt,\n },\n }\n },\n })\n}\n\n// Supported languages for KWS Adult Verification.\n// This list comes from KWS's AV Developer Guide PDF doc.\nconst kwsAvSupportedLanguages = [\n 'en',\n 'ar',\n 'zh-Hans',\n 'nl',\n 'tl',\n 'fr',\n 'de',\n 'id',\n 'it',\n 'ja',\n 'ko',\n 'pl',\n 'pt-BR',\n 'pt',\n 'ru',\n 'es',\n 'th',\n 'tr',\n 'vi',\n]\n\nconst validateInput = (input: InputSchema): InputSchema => {\n const { countryCode, email, language } = input\n\n if (!isEmailValid(email) || isDisposableEmail(email)) {\n throw new InvalidRequestError(\n 'This email address is not supported, please use a different email.',\n 'InvalidEmail',\n )\n }\n\n return {\n countryCode,\n email,\n language: kwsAvSupportedLanguages.includes(language) ? language : 'en',\n }\n}\n\nconst getAgeVerificationState = async (\n ctx: AppContext,\n actorDid: string,\n): Promise<ActorInfo | undefined> => {\n try {\n const res = await ctx.dataplane.getActors({\n dids: [actorDid],\n returnAgeAssuranceForDids: [actorDid],\n skipCacheForDids: [actorDid],\n })\n\n return res.actors[0]\n } catch (err) {\n return undefined\n }\n}\n"]}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nimport { isEmailValid } from '@hapi/address'\nimport { isDisposableEmail } from 'disposable-email-domains-js'\nimport {\n InvalidRequestError,\n MethodNotImplementedError,\n type Server,\n} from '@atproto/xrpc-server'\nimport type { AppContext } from '../../../../context.js'\nimport { KwsExternalPayloadError } from '../../../../kws.js'\nimport { app } from '../../../../lexicons/index.js'\nimport { httpLogger as log } from '../../../../logger.js'\nimport type { ActorInfo } from '../../../../proto/bsky_pb.js'\nimport type { KwsExternalPayload } from '../../../kws/types.js'\nimport { createStashEvent, getClientUa } from '../../../kws/util.js'\n\ntype InputSchema = app.bsky.unspecced.initAgeAssurance.$InputBody\n\nexport default function (server: Server, ctx: AppContext) {\n server.add(app.bsky.unspecced.initAgeAssurance, {\n auth: ctx.authVerifier.standard,\n handler: async ({ auth, input, req }) => {\n if (!ctx.kwsClient) {\n throw new MethodNotImplementedError(\n 'This service is not configured to support age assurance.',\n )\n }\n\n const actorDid = auth.credentials.iss\n\n const actorInfo = await getAgeVerificationState(ctx, actorDid)\n\n if (actorInfo?.ageAssuranceStatus) {\n if (\n actorInfo.ageAssuranceStatus.status !== 'unknown' &&\n actorInfo.ageAssuranceStatus.status !== 'pending'\n ) {\n throw new InvalidRequestError(\n `Cannot initiate age assurance flow from current state: ${actorInfo.ageAssuranceStatus.status}`,\n 'InvalidInitiation',\n )\n }\n }\n\n const { countryCode, email, language } = validateInput(input.body)\n\n const attemptId = crypto.randomUUID()\n // Assumes `app.set('trust proxy', ...)` configured with `true` or specific values.\n const initIp = req.ip\n const initUa = getClientUa(req)\n const externalPayload: KwsExternalPayload = { actorDid, attemptId }\n\n try {\n await ctx.kwsClient.sendEmail({\n countryCode: countryCode.toUpperCase(),\n email,\n externalPayload,\n language,\n })\n } catch (err) {\n if (err instanceof KwsExternalPayloadError) {\n log.error(\n { externalPayload },\n 'Age Assurance flow failed because external payload got too long, which is caused by the DID being too long',\n )\n throw new InvalidRequestError(\n 'Age Assurance flow failed because DID is too long',\n 'DidTooLong',\n )\n }\n throw err\n }\n\n const event = await createStashEvent(ctx, {\n actorDid,\n attemptId,\n email,\n initIp,\n initUa,\n status: 'pending',\n })\n\n return {\n encoding: 'application/json',\n body: {\n status: event.status,\n lastInitiatedAt: event.createdAt,\n },\n }\n },\n })\n}\n\n// Supported languages for KWS Adult Verification.\n// This list comes from KWS's AV Developer Guide PDF doc.\nconst kwsAvSupportedLanguages = [\n 'en',\n 'ar',\n 'zh-Hans',\n 'nl',\n 'tl',\n 'fr',\n 'de',\n 'id',\n 'it',\n 'ja',\n 'ko',\n 'pl',\n 'pt-BR',\n 'pt',\n 'ru',\n 'es',\n 'th',\n 'tr',\n 'vi',\n]\n\nconst validateInput = (input: InputSchema): InputSchema => {\n const { countryCode, email, language } = input\n\n if (!isEmailValid(email) || isDisposableEmail(email)) {\n throw new InvalidRequestError(\n 'This email address is not supported, please use a different email.',\n 'InvalidEmail',\n )\n }\n\n return {\n countryCode,\n email,\n language: kwsAvSupportedLanguages.includes(language) ? language : 'en',\n }\n}\n\nconst getAgeVerificationState = async (\n ctx: AppContext,\n actorDid: string,\n): Promise<ActorInfo | undefined> => {\n try {\n const res = await ctx.dataplane.getActors({\n dids: [actorDid],\n returnAgeAssuranceForDids: [actorDid],\n skipCacheForDids: [actorDid],\n })\n\n return res.actors[0]\n } catch (err) {\n return undefined\n }\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { Dispatcher } from 'undici';
2
- import { ServerConfig } from '../config.js';
1
+ import { type Dispatcher } from 'undici';
2
+ import type { ServerConfig } from '../config.js';
3
3
  export declare function createBlobDispatcher(cfg: ServerConfig): Dispatcher;
4
4
  //# sourceMappingURL=blob-dispatcher.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"blob-dispatcher.d.ts","sourceRoot":"","sources":["../../src/api/blob-dispatcher.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,UAAU,EAAsB,MAAM,QAAQ,CAAA;AAE9D,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAG3C,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,YAAY,GAAG,UAAU,CAmClE"}
1
+ {"version":3,"file":"blob-dispatcher.d.ts","sourceRoot":"","sources":["../../src/api/blob-dispatcher.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,KAAK,UAAU,EAAsB,MAAM,QAAQ,CAAA;AAEnE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAGhD,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,YAAY,GAAG,UAAU,CAmClE"}
@@ -1 +1 @@
1
- {"version":3,"file":"blob-dispatcher.js","sourceRoot":"","sources":["../../src/api/blob-dispatcher.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAc,IAAI,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAA;AAC9D,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAErE,OAAO,EAAE,2BAA2B,EAAE,MAAM,kBAAkB,CAAA;AAE9D,MAAM,UAAU,oBAAoB,CAAC,GAAiB;IACpD,MAAM,cAAc,GAAG,IAAI,KAAK,CAAC;QAC/B,OAAO,EAAE,GAAG,CAAC,eAAe,EAAE,uBAAuB;QACrD,cAAc,EAAE,GAAG,CAAC,mBAAmB;QACvC,eAAe,EAAE,GAAG,CAAC,oBAAoB;QACzC,WAAW,EAAE,GAAG,CAAC,gBAAgB;QACjC,OAAO,EAAE,GAAG,CAAC,qBAAqB;YAChC,CAAC,CAAC,SAAS;YACX,CAAC,CAAC,CAAC,MAAM,EAAE,IAAI,EAAE,EAAE;gBACf,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAC1B,MAAM,YAAY,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,MAAM,CAAC,CAAA;gBAClD,IAAI,QAAQ,KAAK,QAAQ,EAAE,CAAC;oBAC1B,MAAM,IAAI,KAAK,CAAC,uBAAuB,QAAQ,GAAG,CAAC,CAAA;gBACrD,CAAC;gBACD,IAAI,WAAW,CAAC,QAAQ,CAAC,KAAK,KAAK,EAAE,CAAC;oBACpC,MAAM,IAAI,KAAK,CAAC,0CAA0C,CAAC,CAAA;gBAC7D,CAAC;gBACD,OAAO,IAAI,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,CAAA;YAC/B,CAAC;QACL,OAAO,EAAE;YACP,MAAM,EAAE,GAAG,CAAC,qBAAqB,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,aAAa;SAC9D;KACF,CAAC,CAAA;IAEF,OAAO,cAAc,CAAC,OAAO,CAC3B,YAAY,CAAC,QAAQ,CAAC;QACpB,eAAe,EAAE,EAAE;QACnB,kBAAkB,EAAE,IAAI;KACzB,CAAC,EACF,YAAY,CAAC,KAAK,CAAC;QACjB,WAAW,EAAE,CAAC,GAAG,2BAA2B,CAAC;QAC7C,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC;QACxB,UAAU,EAAE,GAAG,CAAC,eAAe;KAChC,CAAC,CACH,CAAA;AACH,CAAC","sourcesContent":["import { Agent, Dispatcher, Pool, interceptors } from 'undici'\nimport { isUnicastIp, unicastLookup } from '@atproto-labs/fetch-node'\nimport { ServerConfig } from '../config.js'\nimport { RETRYABLE_HTTP_STATUS_CODES } from '../util/retry.js'\n\nexport function createBlobDispatcher(cfg: ServerConfig): Dispatcher {\n const baseDispatcher = new Agent({\n allowH2: cfg.proxyAllowHTTP2, // This is experimental\n headersTimeout: cfg.proxyHeadersTimeout,\n maxResponseSize: cfg.proxyMaxResponseSize,\n bodyTimeout: cfg.proxyBodyTimeout,\n factory: cfg.disableSsrfProtection\n ? undefined\n : (origin, opts) => {\n const { protocol, hostname } =\n origin instanceof URL ? origin : new URL(origin)\n if (protocol !== 'https:') {\n throw new Error(`Forbidden protocol \"${protocol}\"`)\n }\n if (isUnicastIp(hostname) === false) {\n throw new Error('Hostname resolved to non-unicast address')\n }\n return new Pool(origin, opts)\n },\n connect: {\n lookup: cfg.disableSsrfProtection ? undefined : unicastLookup,\n },\n })\n\n return baseDispatcher.compose(\n interceptors.redirect({\n maxRedirections: 10,\n throwOnMaxRedirect: true,\n }),\n interceptors.retry({\n statusCodes: [...RETRYABLE_HTTP_STATUS_CODES],\n methods: ['GET', 'HEAD'],\n maxRetries: cfg.proxyMaxRetries,\n }),\n )\n}\n"]}
1
+ {"version":3,"file":"blob-dispatcher.js","sourceRoot":"","sources":["../../src/api/blob-dispatcher.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAmB,IAAI,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAA;AACnE,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAErE,OAAO,EAAE,2BAA2B,EAAE,MAAM,kBAAkB,CAAA;AAE9D,MAAM,UAAU,oBAAoB,CAAC,GAAiB;IACpD,MAAM,cAAc,GAAG,IAAI,KAAK,CAAC;QAC/B,OAAO,EAAE,GAAG,CAAC,eAAe,EAAE,uBAAuB;QACrD,cAAc,EAAE,GAAG,CAAC,mBAAmB;QACvC,eAAe,EAAE,GAAG,CAAC,oBAAoB;QACzC,WAAW,EAAE,GAAG,CAAC,gBAAgB;QACjC,OAAO,EAAE,GAAG,CAAC,qBAAqB;YAChC,CAAC,CAAC,SAAS;YACX,CAAC,CAAC,CAAC,MAAM,EAAE,IAAI,EAAE,EAAE;gBACf,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAC1B,MAAM,YAAY,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,MAAM,CAAC,CAAA;gBAClD,IAAI,QAAQ,KAAK,QAAQ,EAAE,CAAC;oBAC1B,MAAM,IAAI,KAAK,CAAC,uBAAuB,QAAQ,GAAG,CAAC,CAAA;gBACrD,CAAC;gBACD,IAAI,WAAW,CAAC,QAAQ,CAAC,KAAK,KAAK,EAAE,CAAC;oBACpC,MAAM,IAAI,KAAK,CAAC,0CAA0C,CAAC,CAAA;gBAC7D,CAAC;gBACD,OAAO,IAAI,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,CAAA;YAC/B,CAAC;QACL,OAAO,EAAE;YACP,MAAM,EAAE,GAAG,CAAC,qBAAqB,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,aAAa;SAC9D;KACF,CAAC,CAAA;IAEF,OAAO,cAAc,CAAC,OAAO,CAC3B,YAAY,CAAC,QAAQ,CAAC;QACpB,eAAe,EAAE,EAAE;QACnB,kBAAkB,EAAE,IAAI;KACzB,CAAC,EACF,YAAY,CAAC,KAAK,CAAC;QACjB,WAAW,EAAE,CAAC,GAAG,2BAA2B,CAAC;QAC7C,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC;QACxB,UAAU,EAAE,GAAG,CAAC,eAAe;KAChC,CAAC,CACH,CAAA;AACH,CAAC","sourcesContent":["import { Agent, type Dispatcher, Pool, interceptors } from 'undici'\nimport { isUnicastIp, unicastLookup } from '@atproto-labs/fetch-node'\nimport type { ServerConfig } from '../config.js'\nimport { RETRYABLE_HTTP_STATUS_CODES } from '../util/retry.js'\n\nexport function createBlobDispatcher(cfg: ServerConfig): Dispatcher {\n const baseDispatcher = new Agent({\n allowH2: cfg.proxyAllowHTTP2, // This is experimental\n headersTimeout: cfg.proxyHeadersTimeout,\n maxResponseSize: cfg.proxyMaxResponseSize,\n bodyTimeout: cfg.proxyBodyTimeout,\n factory: cfg.disableSsrfProtection\n ? undefined\n : (origin, opts) => {\n const { protocol, hostname } =\n origin instanceof URL ? origin : new URL(origin)\n if (protocol !== 'https:') {\n throw new Error(`Forbidden protocol \"${protocol}\"`)\n }\n if (isUnicastIp(hostname) === false) {\n throw new Error('Hostname resolved to non-unicast address')\n }\n return new Pool(origin, opts)\n },\n connect: {\n lookup: cfg.disableSsrfProtection ? undefined : unicastLookup,\n },\n })\n\n return baseDispatcher.compose(\n interceptors.redirect({\n maxRedirections: 10,\n throwOnMaxRedirect: true,\n }),\n interceptors.retry({\n statusCodes: [...RETRYABLE_HTTP_STATUS_CODES],\n methods: ['GET', 'HEAD'],\n maxRetries: cfg.proxyMaxRetries,\n }),\n )\n}\n"]}
@@ -1,9 +1,9 @@
1
- import { Writable } from 'node:stream';
2
- import { Dispatcher } from 'undici';
3
- import { AtprotoDid } from '@atproto/did';
4
- import { Cid } from '@atproto/lex';
5
- import { AppContext } from '../context.js';
6
- import { Middleware } from '../util/http.js';
1
+ import { type Writable } from 'node:stream';
2
+ import type { Dispatcher } from 'undici';
3
+ import { type AtprotoDid } from '@atproto/did';
4
+ import type { Cid } from '@atproto/lex';
5
+ import type { AppContext } from '../context.js';
6
+ import { type Middleware } from '../util/http.js';
7
7
  export declare function createMiddleware(ctx: AppContext): Middleware;
8
8
  export type StreamBlobOptions = {
9
9
  cid: string;
@@ -1 +1 @@
1
- {"version":3,"file":"blob-resolver.d.ts","sourceRoot":"","sources":["../../src/api/blob-resolver.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,QAAQ,EAAE,MAAM,aAAa,CAAA;AAGzD,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAA;AAMnC,OAAO,EAAE,UAAU,EAAgB,MAAM,cAAc,CAAA;AACvD,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAA;AAQlC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAU1C,OAAO,EACL,UAAU,EAGX,MAAM,iBAAiB,CAAA;AAGxB,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,UAAU,GAAG,UAAU,CAoH5D;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,GAAG,EAAE,MAAM,CAAA;IACX,GAAG,EAAE,MAAM,CAAA;IACX,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,MAAM,CAAC,EAAE,WAAW,CAAA;CACrB,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG,CAC9B,IAAI,EAAE,UAAU,CAAC,iBAAiB,EAClC,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C,CAAA;YACpC,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC,CAAA;QACvB,CAAC;QACD,KAAK,CAAC,QAAQ;YACZ,gEAAgE;YAChE,aAAa,CAAC,GAAG,EAAE,CAAA;YACnB,sEAAsE;YACtE,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;QAChC,CAAC;QACD,OAAO,CAAC,GAAG,EAAE,QAAQ;YACnB,kBAAkB,CAAC,KAAK,EAAE,CAAA,CAAC,2CAA2C;YACtE,QAAQ,CAAC,GAAG,CAAC,CAAA;QACf,CAAC;KACF,CAAC,CAAA;IAEF,OAAO,WAAW,CAAA;AACpB,CAAC;AAED,SAAS,OAAO,CAAC,GAAY;IAC3B,OAAO,GAAG,YAAY,KAAK;QACzB,CAAC,CAAC,GAAG;QACL,CAAC,CAAC,IAAI,KAAK,CAAC,mBAAmB,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,CAAA;AACpD,CAAC","sourcesContent":["import { Duplex, Transform, Writable } from 'node:stream'\nimport { pipeline } from 'node:stream/promises'\nimport createError, { isHttpError } from 'http-errors'\nimport { Dispatcher } from 'undici'\nimport {\n VerifyCidError,\n VerifyCidTransform,\n createDecoders,\n} from '@atproto/common'\nimport { AtprotoDid, isAtprotoDid } from '@atproto/did'\nimport { Cid } from '@atproto/lex'\nimport {\n ACCEPT_ENCODING_COMPRESSED,\n ACCEPT_ENCODING_UNCOMPRESSED,\n buildProxiedContentEncoding,\n formatAcceptHeader,\n} from '@atproto-labs/xrpc-utils'\nimport { ServerConfig } from '../config.js'\nimport { AppContext } from '../context.js'\nimport {\n Code,\n DataPlaneClient,\n getServiceEndpoint,\n isDataplaneError,\n unpackIdentityServices,\n} from '../data-plane/index.js'\nimport { parseCid } from '../hydration/util.js'\nimport { httpLogger as log } from '../logger.js'\nimport {\n Middleware,\n proxyResponseHeaders,\n responseSignal,\n} from '../util/http.js'\nimport { BSKY_USER_AGENT } from './util.js'\n\nexport function createMiddleware(ctx: AppContext): Middleware {\n return async (req, res, next) => {\n if (req.method !== 'GET' && req.method !== 'HEAD') return next()\n if (!req.url?.startsWith('/blob/')) return next()\n const { length, 2: didParam, 3: cidParam } = req.url.split('/')\n if (length !== 4 || !didParam || !cidParam) return next()\n\n // @TODO Check sec-fetch-* headers (e.g. to prevent files from being\n // displayed as a web page) ?\n\n try {\n const streamOptions: StreamBlobOptions = {\n did: didParam,\n cid: cidParam,\n signal: responseSignal(res),\n // Because we will be verifying the CID, we need to ensure that the\n // upstream response can be de-compressed. We do this by negotiating the\n // \"accept-encoding\" header based on the downstream client's capabilities.\n acceptEncoding: buildProxiedContentEncoding(\n req.headers['accept-encoding'],\n ctx.cfg.proxyPreferCompressed,\n ),\n }\n\n await streamBlob(ctx, streamOptions, (upstream, { cid, did, url }) => {\n const encoding = upstream.headers['content-encoding']\n const verifier = createCidVerifier(cid, encoding)\n\n const logError = (err: unknown) => {\n log.warn(\n { err, did, cid: cid.toString(), pds: url.origin },\n 'blob resolution failed during transmission',\n )\n }\n\n const onError = (err: unknown) => {\n // No need to pipe the data (verifier) into the response, as it is\n // \"errored\". The response processing will continue in the \"catch\"\n // block below (because streamBlob() will reject the promise in case\n // of \"error\" event on the writable stream returned by the factory).\n clearTimeout(graceTimer)\n logError(err)\n }\n\n // Catch any error that occurs before the timer bellow is triggered.\n // The promise returned by streamBlob() will be rejected as soon as\n // the verifier errors.\n verifier.on('error', onError)\n\n // The way I/O work, it is likely that, in case of small payloads, the\n // full upstream response is already buffered at this point. In order to\n // return a 404 instead of a broken response stream, we allow the event\n // loop to to process any pending I/O events before we start piping the\n // bytes to the response. For larger payloads, the response will look\n // like a 200 with a broken chunked response stream. The only way around\n // that would be to buffer the entire response before piping it to the\n // response, which will hurt latency (need the full payload) and memory\n // usage (either RAM or DISK). Since this is more of an edge case, we\n // allow the broken response stream to be sent.\n const graceTimer = setTimeout(() => {\n verifier.off('error', onError)\n\n // Make sure that the content served from the bsky api domain cannot\n // be used to perform XSS attacks (by serving HTML pages)\n res.setHeader(\n 'Content-Security-Policy',\n `default-src 'none'; sandbox`,\n )\n res.setHeader('X-Content-Type-Options', 'nosniff')\n res.setHeader('X-Frame-Options', 'DENY')\n res.setHeader('X-XSS-Protection', '0')\n\n // @TODO Add a cache-control header ?\n // @TODO Add content-disposition header (to force download) ?\n\n proxyResponseHeaders(upstream, res)\n\n // Force chunked encoding. This is required because the verifier will\n // trigger an error *after* the last chunk has been passed through.\n // Because the number of bytes sent will match the content-length, the\n // HTTP response will be considered \"complete\" by the HTTP server. At\n // this point, only trailers headers could indicate that an error\n // occurred, but that is not the behavior we expect.\n res.removeHeader('content-length')\n\n // From this point on, triggering the next middleware (including any\n // error handler) can be problematic because content-type,\n // content-encoding, etc. headers have already been set. Because of\n // this, we make sure that res.headersSent is set to true, preventing\n // another error handler middleware from being called (from the catch\n // block bellow). Not flushing the headers here would require to\n // revert the headers set from this middleware (which we don't do for\n // now).\n res.flushHeaders()\n\n // Pipe the verifier output into the HTTP response\n void pipeline([verifier, res]).catch(logError)\n }, 10) // 0 works too. Allow for additional data to come in for 10ms.\n\n // Write the upstream response into the verifier.\n return verifier\n })\n } catch (err) {\n if (res.headersSent || res.destroyed) {\n res.destroy()\n } else if (err instanceof VerifyCidError) {\n // @NOTE This only works because of the graceTimer above. It will also\n // only be triggered for small payloads.\n next(createError(404, err.message))\n } else if (isHttpError(err)) {\n next(err)\n } else {\n next(createError(502, 'Upstream Error', { cause: err }))\n }\n }\n }\n}\n\nexport type StreamBlobOptions = {\n cid: string\n did: string\n acceptEncoding?: string\n signal?: AbortSignal\n}\n\nexport type StreamBlobFactory = (\n data: Dispatcher.StreamFactoryData,\n info: {\n url: URL\n did: AtprotoDid\n cid: Cid\n },\n) => Writable\n\nexport async function streamBlob(\n ctx: AppContext,\n options: StreamBlobOptions,\n factory: StreamBlobFactory,\n) {\n const { did, cid } = parseBlobParams(options)\n const url = await getBlobUrl(ctx.dataplane, did, cid)\n\n const headers = getBlobHeaders(ctx.cfg, url)\n\n headers.set(\n 'accept-encoding',\n options.acceptEncoding ||\n formatAcceptHeader(\n ctx.cfg.proxyPreferCompressed\n ? ACCEPT_ENCODING_COMPRESSED\n : ACCEPT_ENCODING_UNCOMPRESSED,\n ),\n )\n\n let headersReceived = false\n\n return ctx.blobDispatcher\n .stream(\n {\n method: 'GET',\n origin: url.origin,\n path: url.pathname + url.search,\n headers,\n signal: options.signal,\n },\n (upstream) => {\n headersReceived = true\n\n if (upstream.statusCode !== 200) {\n log.warn(\n {\n did,\n cid: cid.toString(),\n pds: url.origin,\n status: upstream.statusCode,\n },\n `blob resolution failed upstream`,\n )\n\n throw upstream.statusCode >= 400 && upstream.statusCode < 500\n ? createError(404, 'Blob not found', { cause: upstream }) // 4xx => 404\n : createError(502, 'Upstream Error', { cause: upstream }) // !200 && !4xx => 502\n }\n\n return factory(upstream, { url, did, cid })\n },\n )\n .catch((err) => {\n // Is this a connection error, or a stream error ?\n if (!headersReceived) {\n // connection error, dns error, headers timeout, ...\n log.warn(\n { err, did, cid: cid.toString(), pds: url.origin },\n 'blob resolution failed during connection',\n )\n\n throw createError(502, 'Upstream Error', { cause: err })\n }\n\n throw err\n })\n}\n\nfunction parseBlobParams(params: { cid: string; did: string }) {\n const { cid, did } = params\n if (!isAtprotoDid(did)) throw createError(400, 'Invalid did')\n const cidObj = parseCid(cid)\n if (!cidObj) throw createError(400, 'Invalid cid')\n return { cid: cidObj, did }\n}\n\nasync function getBlobUrl(\n dataplane: DataPlaneClient,\n did: string,\n cid: Cid,\n): Promise<URL> {\n const pds = await getBlobPds(dataplane, did, cid)\n\n const url = new URL(`/xrpc/com.atproto.sync.getBlob`, pds)\n url.searchParams.set('did', did)\n url.searchParams.set('cid', cid.toString())\n\n return url\n}\n\nasync function getBlobPds(\n dataplane: DataPlaneClient,\n did: string,\n cid: Cid,\n): Promise<string> {\n const [identity, { takenDown }] = await Promise.all([\n dataplane.getIdentityByDid({ did }).catch((err) => {\n if (isDataplaneError(err, Code.NotFound)) {\n return undefined\n }\n throw err\n }),\n dataplane.getBlobTakedown({ did, cid: cid.toString() }),\n ])\n\n if (takenDown) {\n throw createError(404, 'Blob not found')\n }\n\n const services = identity && unpackIdentityServices(identity.services)\n const pds =\n services &&\n getServiceEndpoint(services, {\n id: 'atproto_pds',\n type: 'AtprotoPersonalDataServer',\n })\n\n if (!pds) {\n throw createError(404, 'Origin not found')\n }\n\n return pds\n}\n\nfunction getBlobHeaders(\n {\n blobRateLimitBypassKey: bypassKey,\n blobRateLimitBypassHostname: bypassHostname,\n }: ServerConfig,\n url: URL,\n): Map<string, string> {\n const headers = new Map<string, string>()\n\n headers.set('user-agent', BSKY_USER_AGENT)\n\n if (bypassKey && bypassHostname) {\n const matchesUrl = bypassHostname.startsWith('.')\n ? url.hostname.endsWith(bypassHostname)\n : url.hostname === bypassHostname\n\n if (matchesUrl) {\n headers.set('x-ratelimit-bypass', bypassKey)\n }\n }\n\n return headers\n}\n\n/**\n * This function creates a passthrough stream that will decompress (if needed)\n * and verify the CID of the input stream. The output data will be identical to\n * the input data.\n *\n * If you need the un-compressed data, you should use a decompress + verify\n * pipeline instead.\n */\nfunction createCidVerifier(cid: Cid, encoding?: string | string[]): Duplex {\n // If the upstream content is compressed, we do not want to return a\n // de-compressed stream here. Indeed, the \"compression\" middleware will\n // compress the response before it is sent downstream, if it is not already\n // compressed. Because of this, it is preferable to return the content as-is\n // to avoid re-compressing it.\n //\n // We do still want to be able to verify the CID, which requires decompressing\n // the input bytes.\n //\n // To that end, we create a passthrough in order to \"tee\" the stream into two\n // streams: one that will be sent, unaltered, downstream, and a pipeline that\n // will be used to decompress & verify the CID (discarding de-compressed\n // data).\n\n const decoders = createDecoders(encoding)\n const verifier = new VerifyCidTransform(cid)\n\n // Optimization: If the content is not compressed, we don't need to \"tee\" the\n // stream, we can use the verifier as simple passthrough.\n if (!decoders.length) return verifier\n\n const pipelineController = new AbortController()\n const pipelineStreams: Duplex[] = [...decoders, verifier]\n const pipelineInput = pipelineStreams[0]!\n\n // Create a promise that will resolve if, and only if, the decoding and\n // verification succeed.\n const pipelinePromise: Promise<null | Error> = pipeline(pipelineStreams, {\n signal: pipelineController.signal,\n }).then(\n () => null,\n (err) => {\n const error = asError(err)\n\n // the data being processed by the pipeline is invalid (e.g. invalid\n // compressed content, non-matching the CID, ...). If that occurs, we can\n // destroy the passthrough (this allows not to wait for the \"flush\" event\n // to propagate the error).\n passthrough.destroy(error)\n\n return error\n },\n )\n\n // We don't care about the un-compressed data, we only use the verifier to\n // detect any error through the pipelinePromise. We still need to pass the\n // verifier into flowing mode to ensure that the pipelinePromise resolves.\n verifier.resume()\n\n const passthrough = new Transform({\n transform(chunk, encoding, callback) {\n pipelineInput.write(chunk, encoding)\n callback(null, chunk)\n },\n flush(callback) {\n // End the input stream, which will resolve the pipeline promise\n pipelineInput.end()\n // End the pass-through stream according to the result of the pipeline\n pipelinePromise.then(callback)\n },\n destroy(err, callback) {\n pipelineController.abort() // Causes pipeline() to destroy all streams\n callback(err)\n },\n })\n\n return passthrough\n}\n\nfunction asError(err: unknown): Error {\n return err instanceof Error\n ? err\n : new Error('Processing failed', { cause: err })\n}\n"]}
1
+ {"version":3,"file":"blob-resolver.js","sourceRoot":"","sources":["../../src/api/blob-resolver.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,SAAS,EAAiB,MAAM,aAAa,CAAA;AACnE,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAC/C,OAAO,WAAW,EAAE,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAEtD,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,cAAc,GACf,MAAM,iBAAiB,CAAA;AACxB,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAA;AAE5D,OAAO,EACL,0BAA0B,EAC1B,4BAA4B,EAC5B,2BAA2B,EAC3B,kBAAkB,GACnB,MAAM,0BAA0B,CAAA;AAGjC,OAAO,EACL,IAAI,EAEJ,kBAAkB,EAClB,gBAAgB,EAChB,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AC,IAAI,KAAK,CAAC,mBAAmB,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,CAAA;AACpD,CAAC","sourcesContent":["import { type Duplex, Transform, type Writable } from 'node:stream'\nimport { pipeline } from 'node:stream/promises'\nimport createError, { isHttpError } from 'http-errors'\nimport type { Dispatcher } from 'undici'\nimport {\n VerifyCidError,\n VerifyCidTransform,\n createDecoders,\n} from '@atproto/common'\nimport { type AtprotoDid, isAtprotoDid } from '@atproto/did'\nimport type { Cid } from '@atproto/lex'\nimport {\n ACCEPT_ENCODING_COMPRESSED,\n ACCEPT_ENCODING_UNCOMPRESSED,\n buildProxiedContentEncoding,\n formatAcceptHeader,\n} from '@atproto-labs/xrpc-utils'\nimport type { ServerConfig } from '../config.js'\nimport type { AppContext } from '../context.js'\nimport {\n Code,\n type DataPlaneClient,\n getServiceEndpoint,\n isDataplaneError,\n unpackIdentityServices,\n} from '../data-plane/index.js'\nimport { parseCid } from '../hydration/util.js'\nimport { httpLogger as log } from '../logger.js'\nimport {\n type Middleware,\n proxyResponseHeaders,\n responseSignal,\n} from '../util/http.js'\nimport { BSKY_USER_AGENT } from './util.js'\n\nexport function createMiddleware(ctx: AppContext): Middleware {\n return async (req, res, next) => {\n if (req.method !== 'GET' && req.method !== 'HEAD') return next()\n if (!req.url?.startsWith('/blob/')) return next()\n const { length, 2: didParam, 3: cidParam } = req.url.split('/')\n if (length !== 4 || !didParam || !cidParam) return next()\n\n // @TODO Check sec-fetch-* headers (e.g. to prevent files from being\n // displayed as a web page) ?\n\n try {\n const streamOptions: StreamBlobOptions = {\n did: didParam,\n cid: cidParam,\n signal: responseSignal(res),\n // Because we will be verifying the CID, we need to ensure that the\n // upstream response can be de-compressed. We do this by negotiating the\n // \"accept-encoding\" header based on the downstream client's capabilities.\n acceptEncoding: buildProxiedContentEncoding(\n req.headers['accept-encoding'],\n ctx.cfg.proxyPreferCompressed,\n ),\n }\n\n await streamBlob(ctx, streamOptions, (upstream, { cid, did, url }) => {\n const encoding = upstream.headers['content-encoding']\n const verifier = createCidVerifier(cid, encoding)\n\n const logError = (err: unknown) => {\n log.warn(\n { err, did, cid: cid.toString(), pds: url.origin },\n 'blob resolution failed during transmission',\n )\n }\n\n const onError = (err: unknown) => {\n // No need to pipe the data (verifier) into the response, as it is\n // \"errored\". The response processing will continue in the \"catch\"\n // block below (because streamBlob() will reject the promise in case\n // of \"error\" event on the writable stream returned by the factory).\n clearTimeout(graceTimer)\n logError(err)\n }\n\n // Catch any error that occurs before the timer bellow is triggered.\n // The promise returned by streamBlob() will be rejected as soon as\n // the verifier errors.\n verifier.on('error', onError)\n\n // The way I/O work, it is likely that, in case of small payloads, the\n // full upstream response is already buffered at this point. In order to\n // return a 404 instead of a broken response stream, we allow the event\n // loop to to process any pending I/O events before we start piping the\n // bytes to the response. For larger payloads, the response will look\n // like a 200 with a broken chunked response stream. The only way around\n // that would be to buffer the entire response before piping it to the\n // response, which will hurt latency (need the full payload) and memory\n // usage (either RAM or DISK). Since this is more of an edge case, we\n // allow the broken response stream to be sent.\n const graceTimer = setTimeout(() => {\n verifier.off('error', onError)\n\n // Make sure that the content served from the bsky api domain cannot\n // be used to perform XSS attacks (by serving HTML pages)\n res.setHeader(\n 'Content-Security-Policy',\n `default-src 'none'; sandbox`,\n )\n res.setHeader('X-Content-Type-Options', 'nosniff')\n res.setHeader('X-Frame-Options', 'DENY')\n res.setHeader('X-XSS-Protection', '0')\n\n // @TODO Add a cache-control header ?\n // @TODO Add content-disposition header (to force download) ?\n\n proxyResponseHeaders(upstream, res)\n\n // Force chunked encoding. This is required because the verifier will\n // trigger an error *after* the last chunk has been passed through.\n // Because the number of bytes sent will match the content-length, the\n // HTTP response will be considered \"complete\" by the HTTP server. At\n // this point, only trailers headers could indicate that an error\n // occurred, but that is not the behavior we expect.\n res.removeHeader('content-length')\n\n // From this point on, triggering the next middleware (including any\n // error handler) can be problematic because content-type,\n // content-encoding, etc. headers have already been set. Because of\n // this, we make sure that res.headersSent is set to true, preventing\n // another error handler middleware from being called (from the catch\n // block bellow). Not flushing the headers here would require to\n // revert the headers set from this middleware (which we don't do for\n // now).\n res.flushHeaders()\n\n // Pipe the verifier output into the HTTP response\n void pipeline([verifier, res]).catch(logError)\n }, 10) // 0 works too. Allow for additional data to come in for 10ms.\n\n // Write the upstream response into the verifier.\n return verifier\n })\n } catch (err) {\n if (res.headersSent || res.destroyed) {\n res.destroy()\n } else if (err instanceof VerifyCidError) {\n // @NOTE This only works because of the graceTimer above. It will also\n // only be triggered for small payloads.\n next(createError(404, err.message))\n } else if (isHttpError(err)) {\n next(err)\n } else {\n next(createError(502, 'Upstream Error', { cause: err }))\n }\n }\n }\n}\n\nexport type StreamBlobOptions = {\n cid: string\n did: string\n acceptEncoding?: string\n signal?: AbortSignal\n}\n\nexport type StreamBlobFactory = (\n data: Dispatcher.StreamFactoryData,\n info: {\n url: URL\n did: AtprotoDid\n cid: Cid\n },\n) => Writable\n\nexport async function streamBlob(\n ctx: AppContext,\n options: StreamBlobOptions,\n factory: StreamBlobFactory,\n) {\n const { did, cid } = parseBlobParams(options)\n const url = await getBlobUrl(ctx.dataplane, did, cid)\n\n const headers = getBlobHeaders(ctx.cfg, url)\n\n headers.set(\n 'accept-encoding',\n options.acceptEncoding ||\n formatAcceptHeader(\n ctx.cfg.proxyPreferCompressed\n ? ACCEPT_ENCODING_COMPRESSED\n : ACCEPT_ENCODING_UNCOMPRESSED,\n ),\n )\n\n let headersReceived = false\n\n return ctx.blobDispatcher\n .stream(\n {\n method: 'GET',\n origin: url.origin,\n path: url.pathname + url.search,\n headers,\n signal: options.signal,\n },\n (upstream) => {\n headersReceived = true\n\n if (upstream.statusCode !== 200) {\n log.warn(\n {\n did,\n cid: cid.toString(),\n pds: url.origin,\n status: upstream.statusCode,\n },\n `blob resolution failed upstream`,\n )\n\n throw upstream.statusCode >= 400 && upstream.statusCode < 500\n ? createError(404, 'Blob not found', { cause: upstream }) // 4xx => 404\n : createError(502, 'Upstream Error', { cause: upstream }) // !200 && !4xx => 502\n }\n\n return factory(upstream, { url, did, cid })\n },\n )\n .catch((err) => {\n // Is this a connection error, or a stream error ?\n if (!headersReceived) {\n // connection error, dns error, headers timeout, ...\n log.warn(\n { err, did, cid: cid.toString(), pds: url.origin },\n 'blob resolution failed during connection',\n )\n\n throw createError(502, 'Upstream Error', { cause: err })\n }\n\n throw err\n })\n}\n\nfunction parseBlobParams(params: { cid: string; did: string }) {\n const { cid, did } = params\n if (!isAtprotoDid(did)) throw createError(400, 'Invalid did')\n const cidObj = parseCid(cid)\n if (!cidObj) throw createError(400, 'Invalid cid')\n return { cid: cidObj, did }\n}\n\nasync function getBlobUrl(\n dataplane: DataPlaneClient,\n did: string,\n cid: Cid,\n): Promise<URL> {\n const pds = await getBlobPds(dataplane, did, cid)\n\n const url = new URL(`/xrpc/com.atproto.sync.getBlob`, pds)\n url.searchParams.set('did', did)\n url.searchParams.set('cid', cid.toString())\n\n return url\n}\n\nasync function getBlobPds(\n dataplane: DataPlaneClient,\n did: string,\n cid: Cid,\n): Promise<string> {\n const [identity, { takenDown }] = await Promise.all([\n dataplane.getIdentityByDid({ did }).catch((err) => {\n if (isDataplaneError(err, Code.NotFound)) {\n return undefined\n }\n throw err\n }),\n dataplane.getBlobTakedown({ did, cid: cid.toString() }),\n ])\n\n if (takenDown) {\n throw createError(404, 'Blob not found')\n }\n\n const services = identity && unpackIdentityServices(identity.services)\n const pds =\n services &&\n getServiceEndpoint(services, {\n id: 'atproto_pds',\n type: 'AtprotoPersonalDataServer',\n })\n\n if (!pds) {\n throw createError(404, 'Origin not found')\n }\n\n return pds\n}\n\nfunction getBlobHeaders(\n {\n blobRateLimitBypassKey: bypassKey,\n blobRateLimitBypassHostname: bypassHostname,\n }: ServerConfig,\n url: URL,\n): Map<string, string> {\n const headers = new Map<string, string>()\n\n headers.set('user-agent', BSKY_USER_AGENT)\n\n if (bypassKey && bypassHostname) {\n const matchesUrl = bypassHostname.startsWith('.')\n ? url.hostname.endsWith(bypassHostname)\n : url.hostname === bypassHostname\n\n if (matchesUrl) {\n headers.set('x-ratelimit-bypass', bypassKey)\n }\n }\n\n return headers\n}\n\n/**\n * This function creates a passthrough stream that will decompress (if needed)\n * and verify the CID of the input stream. The output data will be identical to\n * the input data.\n *\n * If you need the un-compressed data, you should use a decompress + verify\n * pipeline instead.\n */\nfunction createCidVerifier(cid: Cid, encoding?: string | string[]): Duplex {\n // If the upstream content is compressed, we do not want to return a\n // de-compressed stream here. Indeed, the \"compression\" middleware will\n // compress the response before it is sent downstream, if it is not already\n // compressed. Because of this, it is preferable to return the content as-is\n // to avoid re-compressing it.\n //\n // We do still want to be able to verify the CID, which requires decompressing\n // the input bytes.\n //\n // To that end, we create a passthrough in order to \"tee\" the stream into two\n // streams: one that will be sent, unaltered, downstream, and a pipeline that\n // will be used to decompress & verify the CID (discarding de-compressed\n // data).\n\n const decoders = createDecoders(encoding)\n const verifier = new VerifyCidTransform(cid)\n\n // Optimization: If the content is not compressed, we don't need to \"tee\" the\n // stream, we can use the verifier as simple passthrough.\n if (!decoders.length) return verifier\n\n const pipelineController = new AbortController()\n const pipelineStreams: Duplex[] = [...decoders, verifier]\n const pipelineInput = pipelineStreams[0]!\n\n // Create a promise that will resolve if, and only if, the decoding and\n // verification succeed.\n const pipelinePromise: Promise<null | Error> = pipeline(pipelineStreams, {\n signal: pipelineController.signal,\n }).then(\n () => null,\n (err) => {\n const error = asError(err)\n\n // the data being processed by the pipeline is invalid (e.g. invalid\n // compressed content, non-matching the CID, ...). If that occurs, we can\n // destroy the passthrough (this allows not to wait for the \"flush\" event\n // to propagate the error).\n passthrough.destroy(error)\n\n return error\n },\n )\n\n // We don't care about the un-compressed data, we only use the verifier to\n // detect any error through the pipelinePromise. We still need to pass the\n // verifier into flowing mode to ensure that the pipelinePromise resolves.\n verifier.resume()\n\n const passthrough = new Transform({\n transform(chunk, encoding, callback) {\n pipelineInput.write(chunk, encoding)\n callback(null, chunk)\n },\n flush(callback) {\n // End the input stream, which will resolve the pipeline promise\n pipelineInput.end()\n // End the pass-through stream according to the result of the pipeline\n pipelinePromise.then(callback)\n },\n destroy(err, callback) {\n pipelineController.abort() // Causes pipeline() to destroy all streams\n callback(err)\n },\n })\n\n return passthrough\n}\n\nfunction asError(err: unknown): Error {\n return err instanceof Error\n ? err\n : new Error('Processing failed', { cause: err })\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { Server } from '@atproto/xrpc-server';
2
- import { AppContext } from '../../../../context.js';
1
+ import type { Server } from '@atproto/xrpc-server';
2
+ import type { AppContext } from '../../../../context.js';
3
3
  export default function (server: Server, ctx: AppContext): void;
4
4
  //# sourceMappingURL=getAccountInfos.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getAccountInfos.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/admin/getAccountInfos.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAGnD,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QA0CvD"}
1
+ {"version":3,"file":"getAccountInfos.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/admin/getAccountInfos.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAClD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAGxD,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QA0CvD"}
@@ -1 +1 @@
1
- {"version":3,"file":"getAccountInfos.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/admin/getAccountInfos.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC5C,OAAO,EAAkB,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAGhE,OAAO,EAAE,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AAoB;iBAClC,CAAA;YACH,CAAC,CACF,CAAA;YAED,OAAO;gBACL,QAAQ,EAAE,kBAAkB;gBAC5B,IAAI,EAAE;oBACJ,KAAK;iBACN;aACF,CAAA;QACH,CAAC;KACF,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import { mapDefined } from '@atproto/common'\nimport { DatetimeString, INVALID_HANDLE } from '@atproto/syntax'\nimport { Server } from '@atproto/xrpc-server'\nimport { AppContext } from '../../../../context.js'\nimport { com } from '../../../../lexicons/index.js'\n\nexport default function (server: Server, ctx: AppContext) {\n server.add(com.atproto.admin.getAccountInfos, {\n auth: ctx.authVerifier.optionalStandardOrRole,\n handler: async ({ params, auth }) => {\n const { dids } = params\n const { includeTakedowns } = ctx.authVerifier.parseCreds(auth)\n\n const actors = await ctx.hydrator.actor.getActors(dids, {\n includeTakedowns: true,\n skipCacheForDids: dids,\n })\n\n const infos = mapDefined(\n dids,\n (did): com.atproto.admin.defs.AccountView | undefined => {\n const info = actors.get(did)\n if (!info) return\n if (info.takedownRef && !includeTakedowns) return\n const profileRecord =\n !info.profileTakedownRef || includeTakedowns\n ? info.profile\n : undefined\n\n return {\n did,\n handle: info.handle ?? INVALID_HANDLE,\n relatedRecords: profileRecord ? [profileRecord] : undefined,\n indexedAt: (\n info.sortedAt ?? new Date(0)\n ).toISOString() as DatetimeString,\n }\n },\n )\n\n return {\n encoding: 'application/json',\n body: {\n infos,\n },\n }\n },\n })\n}\n"]}
1
+ {"version":3,"file":"getAccountInfos.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/admin/getAccountInfos.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC5C,OAAO,EAAuB,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAGrE,OAAO,EAAE,GAAG,EAAE,MAAM,+BAA+B,CAAA;AAEnD,MAAM,CAAC,OAAO,WAAW,MAAc,EAAE,GAAe;IACtD,MAAM,CAAC,GAAG,CAAC,GA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BACN;aACF,CAAA;QACH,CAAC;KACF,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import { mapDefined } from '@atproto/common'\nimport { type DatetimeString, INVALID_HANDLE } from '@atproto/syntax'\nimport type { Server } from '@atproto/xrpc-server'\nimport type { AppContext } from '../../../../context.js'\nimport { com } from '../../../../lexicons/index.js'\n\nexport default function (server: Server, ctx: AppContext) {\n server.add(com.atproto.admin.getAccountInfos, {\n auth: ctx.authVerifier.optionalStandardOrRole,\n handler: async ({ params, auth }) => {\n const { dids } = params\n const { includeTakedowns } = ctx.authVerifier.parseCreds(auth)\n\n const actors = await ctx.hydrator.actor.getActors(dids, {\n includeTakedowns: true,\n skipCacheForDids: dids,\n })\n\n const infos = mapDefined(\n dids,\n (did): com.atproto.admin.defs.AccountView | undefined => {\n const info = actors.get(did)\n if (!info) return\n if (info.takedownRef && !includeTakedowns) return\n const profileRecord =\n !info.profileTakedownRef || includeTakedowns\n ? info.profile\n : undefined\n\n return {\n did,\n handle: info.handle ?? INVALID_HANDLE,\n relatedRecords: profileRecord ? [profileRecord] : undefined,\n indexedAt: (\n info.sortedAt ?? new Date(0)\n ).toISOString() as DatetimeString,\n }\n },\n )\n\n return {\n encoding: 'application/json',\n body: {\n infos,\n },\n }\n },\n })\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { Server } from '@atproto/xrpc-server';
2
- import { AppContext } from '../../../../context.js';
1
+ import { type Server } from '@atproto/xrpc-server';
2
+ import type { AppContext } from '../../../../context.js';
3
3
  export default function (server: Server, ctx: AppContext): void;
4
4
  //# sourceMappingURL=getSubjectStatus.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getSubjectStatus.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/admin/getSubjectStatus.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAGnD,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QA0EvD"}
1
+ {"version":3,"file":"getSubjectStatus.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/admin/getSubjectStatus.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,MAAM,EAAE,MAAM,sBAAsB,CAAA;AACvE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAGxD,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QA0EvD"}
@@ -1 +1 @@
1
- {"version":3,"file":"getSubjectStatus.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/admin/getSubjectStatus.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAU,MAAM,sBAAsB,CAAA;AAElE,OAAO,EAAE,GAAG,EAAE,MAAM,+BAA+B,CAAA;AAEnD,MAAM,CAAC,OAAO,WAAW,MAAc,EAAE,GAAe;IACtD,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,gBAAgB,EAAE;QAC7C,IAAI,EAAE,GAAG,CAAC,YAAY,CAAC,gBAAgB;QACvC,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;YAC5B,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,MAAM,CAAA;YAEjC,IAAI,IAAI,GAA0D,IAAI,CAAA;YACtE,IAAI,IAAI,EAAE,CAAC;gBACT,IAAI,CAAC,GAAG,EAAE,CAAC;oBACT,MAAM,IAAI,mBAAmB,CAC3B,0CAA0C,CAC3C,CAAA;gBACH,CAAC;gBACD,MAAM,GAAG,GAAG,MAAM,GAAG,CAAC,SAAS,CAAC,eAAe,CAAC;oBAC9C,GAAG;oBACH,GAAG,EAAE,IAAI;iBACV,CAAC,CAAA;gBACF,IAAI,GAAG;oBACL,OAAO,EAAE;wBACP,KAAK,EAAE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C;gBACN,MAAM,IAAI,mBAAmB,CAAC,qBAAqB,CAAC,CAAA;YACtD,CAAC;YACD,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;gBAClB,MAAM,IAAI,mBAAmB,CAAC,mBAAmB,EAAE,UAAU,CAAC,CAAA;YAChE,CAAC;YACD,OAAO;gBACL,QAAQ,EAAE,kBAAkB;gBAC5B,IAAI;aACL,CAAA;QACH,CAAC;KACF,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import { InvalidRequestError, Server } from '@atproto/xrpc-server'\nimport { AppContext } from '../../../../context.js'\nimport { com } from '../../../../lexicons/index.js'\n\nexport default function (server: Server, ctx: AppContext) {\n server.add(com.atproto.admin.getSubjectStatus, {\n auth: ctx.authVerifier.roleOrModService,\n handler: async ({ params }) => {\n const { did, uri, blob } = params\n\n let body: com.atproto.admin.getSubjectStatus.$OutputBody | null = null\n if (blob) {\n if (!did) {\n throw new InvalidRequestError(\n 'Must provide a did to request blob state',\n )\n }\n const res = await ctx.dataplane.getBlobTakedown({\n did,\n cid: blob,\n })\n body = {\n subject: {\n $type: 'com.atproto.admin.defs#repoBlobRef',\n did: did,\n cid: blob,\n },\n takedown: {\n applied: res.takenDown,\n ref: res.takedownRef ? 'TAKEDOWN' : undefined,\n },\n }\n } else if (uri) {\n const res = await ctx.hydrator.getRecord(uri, true)\n if (res) {\n body = {\n subject: {\n $type: 'com.atproto.repo.strongRef',\n uri,\n cid: res.cid,\n },\n takedown: {\n applied: !!res.takedownRef,\n ref: res.takedownRef || undefined,\n },\n }\n }\n } else if (did) {\n const res = (\n await ctx.hydrator.actor.getActors([did], {\n includeTakedowns: true,\n skipCacheForDids: [did],\n })\n ).get(did)\n if (res) {\n body = {\n subject: {\n $type: 'com.atproto.admin.defs#repoRef',\n did: did,\n },\n takedown: {\n applied: !!res.takedownRef,\n ref: res.takedownRef || undefined,\n },\n }\n }\n } else {\n throw new InvalidRequestError('No provided subject')\n }\n if (body === null) {\n throw new InvalidRequestError('Subject not found', 'NotFound')\n }\n return {\n encoding: 'application/json',\n body,\n }\n },\n })\n}\n"]}
1
+ {"version":3,"file":"getSubjectStatus.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/admin/getSubjectStatus.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAe,MAAM,sBAAsB,CAAA;AAEvE,OAAO,EAAE,GAAG,EAAE,MAAM,+BAA+B,CAAA;AAEnD,MAAM,CAAC,OAAO,WAAW,MAAc,EAAE,GAAe;IACtD,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,gBAAgB,EAAE;QAC7C,IAAI,EAAE,GAAG,CAAC,YAAY,CAAC,gBAAgB;QACvC,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;YAC5B,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,MAAM,CAAA;YAEjC,IAAI,IAAI,GAA0D,IAAI,CAAA;YACtE,IAAI,IAAI,EAAE,CAAC;gBACT,IAAI,CAAC,GAAG,EAAE,CAAC;oBACT,MAAM,IAAI,mBAAmB,CAC3B,0CAA0C,CAC3C,CAAA;gBACH,CAAC;gBACD,MAAM,GAAG,GAAG,MAAM,GAAG,CAAC,SAAS,CAAC,eAAe,CAAC;oBAC9C,GAAG;oBACH,GAAG,EAAE,IAAI;iBACV,CAAC,CAAA;gBACF,IAAI,GAAG;oBACL,OAAO,EAAE;wBACP,KAAK,EAAE,oCAAoC;wBAC3C,GAAG,EAAE,GAAG;wBACR,GAAG,EAAE,IAAI;qBACV;oBACD,QAAQ,EAAE;wBACR,OAAO,EAAE,GAAG,CAAC,SAAS;wBACtB,GAAG,EAAE,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS;qBAC9C;iBACF,CAAA;YACH,CAAC;iBAAM,IAAI,GAAG,EAAE,CAAC;gBACf,MAAM,GAAG,GAAG,MAAM,GAAG,CAAC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Error, type Server } from '@atproto/xrpc-server'\nimport type { AppContext } from '../../../../context.js'\nimport { com } from '../../../../lexicons/index.js'\n\nexport default function (server: Server, ctx: AppContext) {\n server.add(com.atproto.admin.getSubjectStatus, {\n auth: ctx.authVerifier.roleOrModService,\n handler: async ({ params }) => {\n const { did, uri, blob } = params\n\n let body: com.atproto.admin.getSubjectStatus.$OutputBody | null = null\n if (blob) {\n if (!did) {\n throw new InvalidRequestError(\n 'Must provide a did to request blob state',\n )\n }\n const res = await ctx.dataplane.getBlobTakedown({\n did,\n cid: blob,\n })\n body = {\n subject: {\n $type: 'com.atproto.admin.defs#repoBlobRef',\n did: did,\n cid: blob,\n },\n takedown: {\n applied: res.takenDown,\n ref: res.takedownRef ? 'TAKEDOWN' : undefined,\n },\n }\n } else if (uri) {\n const res = await ctx.hydrator.getRecord(uri, true)\n if (res) {\n body = {\n subject: {\n $type: 'com.atproto.repo.strongRef',\n uri,\n cid: res.cid,\n },\n takedown: {\n applied: !!res.takedownRef,\n ref: res.takedownRef || undefined,\n },\n }\n }\n } else if (did) {\n const res = (\n await ctx.hydrator.actor.getActors([did], {\n includeTakedowns: true,\n skipCacheForDids: [did],\n })\n ).get(did)\n if (res) {\n body = {\n subject: {\n $type: 'com.atproto.admin.defs#repoRef',\n did: did,\n },\n takedown: {\n applied: !!res.takedownRef,\n ref: res.takedownRef || undefined,\n },\n }\n }\n } else {\n throw new InvalidRequestError('No provided subject')\n }\n if (body === null) {\n throw new InvalidRequestError('Subject not found', 'NotFound')\n }\n return {\n encoding: 'application/json',\n body,\n }\n },\n })\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { Server } from '@atproto/xrpc-server';
2
- import { AppContext } from '../../../../context.js';
1
+ import { type Server } from '@atproto/xrpc-server';
2
+ import type { AppContext } from '../../../../context.js';
3
3
  export default function (server: Server, ctx: AppContext): void;
4
4
  //# sourceMappingURL=updateSubjectStatus.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"updateSubjectStatus.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/admin/updateSubjectStatus.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,MAAM,EACP,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAGnD,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QAsEvD"}
1
+ {"version":3,"file":"updateSubjectStatus.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/admin/updateSubjectStatus.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,KAAK,MAAM,EACZ,MAAM,sBAAsB,CAAA;AAC7B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAGxD,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QAsEvD"}
@@ -1 +1 @@
1
- {"version":3,"file":"updateSubjectStatus.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/admin/updateSubjectStatus.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAC9C,OAAO,EACL,iBAAiB,EACjB,mBAAmB,GAEpB,MAAM,sBAAsB,CAAA;AAE7B,OAAO,EAAE,GAAG,EAAE,MAAM,+BAA+B,CAAA;AAEnD,MAAM,CAAC,OAAO,WAAW,MAAc,EAAE,GAAe;IACtD,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,mBAAmB,EAAE;QAChD,IAAI,EAAE,GAAG,CAAC,YAAY,CAAC,gBAAgB;QACvC,OAAO,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,EAAE;YACjC,MAAM,EAAE,kBAAkB,EAAE,GAAG,GAAG,CAAC,YAAY,CAAC,UAAU,CAAC,IAAI,CAAC,CAAA;YAChE,IAAI,CAAC,kBAAkB,EAAE,CAAC;gBACxB,MAAM,IA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tB,IAAI,EAAE,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC;yBAC9B,CAAC,CAAA;oBACJ,CAAC;gBACH,CAAC;qBAAM,IAAI,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,CAAC;oBACjE,IAAI,QAAQ,CAAC,OAAO,EAAE,CAAC;wBACrB,MAAM,GAAG,CAAC,SAAS,CAAC,YAAY,CAAC;4BAC/B,GAAG,EAAE,OAAO,CAAC,GAAG;4BAChB,GAAG,EAAE,OAAO,CAAC,GAAG;4BAChB,GAAG,EAAE,QAAQ,CAAC,GAAG;4BACjB,IAAI,EAAE,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC;yBAC9B,CAAC,CAAA;oBACJ,CAAC;yBAAM,CAAC;wBACN,MAAM,GAAG,CAAC,SAAS,CAAC,cAAc,CAAC;4BACjC,GAAG,EAAE,OAAO,CAAC,GAAG;4BAChB,GAAG,EAAE,OAAO,CAAC,GAAG;4BAChB,IAAI,EAAE,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC;yBAC9B,CAAC,CAAA;oBACJ,CAAC;gBACH,CAAC;qBAAM,CAAC;oBACN,MAAM,IAAI,mBAAmB,CAC3B,yBAAyB,OAAO,CAAC,KAAK,EAAE,CACzC,CAAA;gBACH,CAAC;YACH,CAAC;YAED,OAAO;gBACL,QAAQ,EAAE,kBAAkB;gBAC5B,IAAI,EAAE;oBACJ,OAAO;oBACP,QAAQ;iBACT;aACF,CAAA;QACH,CAAC;KACF,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import { Timestamp } from '@bufbuild/protobuf'\nimport {\n AuthRequiredError,\n InvalidRequestError,\n Server,\n} from '@atproto/xrpc-server'\nimport { AppContext } from '../../../../context.js'\nimport { com } from '../../../../lexicons/index.js'\n\nexport default function (server: Server, ctx: AppContext) {\n server.add(com.atproto.admin.updateSubjectStatus, {\n auth: ctx.authVerifier.roleOrModService,\n handler: async ({ input, auth }) => {\n const { canPerformTakedown } = ctx.authVerifier.parseCreds(auth)\n if (!canPerformTakedown) {\n throw new AuthRequiredError(\n 'Must be a full moderator to update subject state',\n )\n }\n const now = new Date()\n const { subject, takedown } = input.body\n if (takedown) {\n if (com.atproto.admin.defs.repoRef.$isTypeOf(subject)) {\n if (takedown.applied) {\n await ctx.dataplane.takedownActor({\n did: subject.did,\n ref: takedown.ref,\n seen: Timestamp.fromDate(now),\n })\n } else {\n await ctx.dataplane.untakedownActor({\n did: subject.did,\n seen: Timestamp.fromDate(now),\n })\n }\n } else if (com.atproto.repo.strongRef.$isTypeOf(subject)) {\n if (takedown.applied) {\n await ctx.dataplane.takedownRecord({\n recordUri: subject.uri,\n ref: takedown.ref,\n seen: Timestamp.fromDate(now),\n })\n } else {\n await ctx.dataplane.untakedownRecord({\n recordUri: subject.uri,\n seen: Timestamp.fromDate(now),\n })\n }\n } else if (com.atproto.admin.defs.repoBlobRef.$isTypeOf(subject)) {\n if (takedown.applied) {\n await ctx.dataplane.takedownBlob({\n did: subject.did,\n cid: subject.cid,\n ref: takedown.ref,\n seen: Timestamp.fromDate(now),\n })\n } else {\n await ctx.dataplane.untakedownBlob({\n did: subject.did,\n cid: subject.cid,\n seen: Timestamp.fromDate(now),\n })\n }\n } else {\n throw new InvalidRequestError(\n `Invalid subject type: ${subject.$type}`,\n )\n }\n }\n\n return {\n encoding: 'application/json',\n body: {\n subject,\n takedown,\n },\n }\n },\n })\n}\n"]}
1
+ {"version":3,"file":"updateSubjectStatus.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/admin/updateSubjectStatus.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAC9C,OAAO,EACL,iBAAiB,EACjB,mBAAmB,GAEpB,MAAM,sBAAsB,CAAA;AAE7B,OAAO,EAAE,GAAG,EAAE,MAAM,+BAA+B,CAAA;AAEnD,MAAM,CAAC,OAAO,WAAW,MAAc,E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BACL,QAAQ,EAAE,kBAAkB;gBAC5B,IAAI,EAAE;oBACJ,OAAO;oBACP,QAAQ;iBACT;aACF,CAAA;QACH,CAAC;KACF,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import { Timestamp } from '@bufbuild/protobuf'\nimport {\n AuthRequiredError,\n InvalidRequestError,\n type Server,\n} from '@atproto/xrpc-server'\nimport type { AppContext } from '../../../../context.js'\nimport { com } from '../../../../lexicons/index.js'\n\nexport default function (server: Server, ctx: AppContext) {\n server.add(com.atproto.admin.updateSubjectStatus, {\n auth: ctx.authVerifier.roleOrModService,\n handler: async ({ input, auth }) => {\n const { canPerformTakedown } = ctx.authVerifier.parseCreds(auth)\n if (!canPerformTakedown) {\n throw new AuthRequiredError(\n 'Must be a full moderator to update subject state',\n )\n }\n const now = new Date()\n const { subject, takedown } = input.body\n if (takedown) {\n if (com.atproto.admin.defs.repoRef.$isTypeOf(subject)) {\n if (takedown.applied) {\n await ctx.dataplane.takedownActor({\n did: subject.did,\n ref: takedown.ref,\n seen: Timestamp.fromDate(now),\n })\n } else {\n await ctx.dataplane.untakedownActor({\n did: subject.did,\n seen: Timestamp.fromDate(now),\n })\n }\n } else if (com.atproto.repo.strongRef.$isTypeOf(subject)) {\n if (takedown.applied) {\n await ctx.dataplane.takedownRecord({\n recordUri: subject.uri,\n ref: takedown.ref,\n seen: Timestamp.fromDate(now),\n })\n } else {\n await ctx.dataplane.untakedownRecord({\n recordUri: subject.uri,\n seen: Timestamp.fromDate(now),\n })\n }\n } else if (com.atproto.admin.defs.repoBlobRef.$isTypeOf(subject)) {\n if (takedown.applied) {\n await ctx.dataplane.takedownBlob({\n did: subject.did,\n cid: subject.cid,\n ref: takedown.ref,\n seen: Timestamp.fromDate(now),\n })\n } else {\n await ctx.dataplane.untakedownBlob({\n did: subject.did,\n cid: subject.cid,\n seen: Timestamp.fromDate(now),\n })\n }\n } else {\n throw new InvalidRequestError(\n `Invalid subject type: ${subject.$type}`,\n )\n }\n }\n\n return {\n encoding: 'application/json',\n body: {\n subject,\n takedown,\n },\n }\n },\n })\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { Server } from '@atproto/xrpc-server';
2
- import { AppContext } from '../../../../context.js';
1
+ import { type Server } from '@atproto/xrpc-server';
2
+ import type { AppContext } from '../../../../context.js';
3
3
  export default function (server: Server, ctx: AppContext): void;
4
4
  //# sourceMappingURL=resolveHandle.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"resolveHandle.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/identity/resolveHandle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAGnD,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QAcvD"}
1
+ {"version":3,"file":"resolveHandle.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/identity/resolveHandle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,MAAM,EAAE,MAAM,sBAAsB,CAAA;AACvE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAGxD,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QAcvD"}
@@ -1 +1 @@
1
- {"version":3,"file":"resolveHandle.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/identity/resolveHandle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAU,MAAM,sBAAsB,CAAA;AAElE,OAAO,EAAE,GAAG,EAAE,MAAM,+BAA+B,CAAA;AAEnD,MAAM,CAAC,OAAO,WAAW,MAAc,EAAE,GAAe;IACtD,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,QAAQ,CAAC,aAAa,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;QAClE,MAAM,CAAC,GAAG,CAAC,GAAG,MAAM,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE;YAC9D,oBAAoB,EAAE,IAAI;SAC3B,CAAC,CAAA;QACF,IAAI,CAAC,GAAG,EAAE,CAAC;YACT,MAAM,IAAI,mBAAmB,CAAC,0BAA0B,CAAC,CAAA;QAC3D,CAAC;QAED,OAAO;YACL,QAAQ,EAAE,kBAAkB;YAC5B,IAAI,EAAE,EAAE,GAAG,EAAE;SACd,CAAA;IACH,CAAC,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import { InvalidRequestError, Server } from '@atproto/xrpc-server'\nimport { AppContext } from '../../../../context.js'\nimport { com } from '../../../../lexicons/index.js'\n\nexport default function (server: Server, ctx: AppContext) {\n server.add(com.atproto.identity.resolveHandle, async ({ params }) => {\n const [did] = await ctx.hydrator.actor.getDids([params.handle], {\n lookupUnidirectional: true,\n })\n if (!did) {\n throw new InvalidRequestError('Unable to resolve handle')\n }\n\n return {\n encoding: 'application/json',\n body: { did },\n }\n })\n}\n"]}
1
+ {"version":3,"file":"resolveHandle.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/identity/resolveHandle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAe,MAAM,sBAAsB,CAAA;AAEvE,OAAO,EAAE,GAAG,EAAE,MAAM,+BAA+B,CAAA;AAEnD,MAAM,CAAC,OAAO,WAAW,MAAc,EAAE,GAAe;IACtD,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,QAAQ,CAAC,aAAa,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;QAClE,MAAM,CAAC,GAAG,CAAC,GAAG,MAAM,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE;YAC9D,oBAAoB,EAAE,IAAI;SAC3B,CAAC,CAAA;QACF,IAAI,CAAC,GAAG,EAAE,CAAC;YACT,MAAM,IAAI,mBAAmB,CAAC,0BAA0B,CAAC,CAAA;QAC3D,CAAC;QAED,OAAO;YACL,QAAQ,EAAE,kBAAkB;YAC5B,IAAI,EAAE,EAAE,GAAG,EAAE;SACd,CAAA;IACH,CAAC,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import { InvalidRequestError, type Server } from '@atproto/xrpc-server'\nimport type { AppContext } from '../../../../context.js'\nimport { com } from '../../../../lexicons/index.js'\n\nexport default function (server: Server, ctx: AppContext) {\n server.add(com.atproto.identity.resolveHandle, async ({ params }) => {\n const [did] = await ctx.hydrator.actor.getDids([params.handle], {\n lookupUnidirectional: true,\n })\n if (!did) {\n throw new InvalidRequestError('Unable to resolve handle')\n }\n\n return {\n encoding: 'application/json',\n body: { did },\n }\n })\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { Server } from '@atproto/xrpc-server';
2
- import { AppContext } from '../../../../context.js';
1
+ import { type Server } from '@atproto/xrpc-server';
2
+ import type { AppContext } from '../../../../context.js';
3
3
  export default function (server: Server, ctx: AppContext): void;
4
4
  //# sourceMappingURL=queryLabels.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"queryLabels.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/label/queryLabels.ts"],"names":[],"mappings":"AACA,OAAO,EAAuB,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAGnD,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QAgCvD"}
1
+ {"version":3,"file":"queryLabels.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/label/queryLabels.ts"],"names":[],"mappings":"AACA,OAAO,EAAuB,KAAK,MAAM,EAAE,MAAM,sBAAsB,CAAA;AACvE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAGxD,MAAM,CA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CAAC,CAAC,CAAA;QAEvE,OAAO;YACL,QAAQ,EAAE,kBAAkB;YAC5B,IAAI,EAAE,EAAE,MAAM,EAAE;SACjB,CAAA;IACH,CAAC,CAAC,CAAA;AACJ,CAAC;AAED,SAAS,gBAAgB,CAAC,GAAW;IACnC,OAAO,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAA;AAC1B,CAAC","sourcesContent":["import { isUriString } from '@atproto/lex'\nimport { InvalidRequestError, Server } from '@atproto/xrpc-server'\nimport { AppContext } from '../../../../context.js'\nimport { com } from '../../../../lexicons/index.js'\n\nexport default function (server: Server, ctx: AppContext) {\n server.add(com.atproto.label.queryLabels, async ({ params }) => {\n const { uriPatterns, sources } = params\n\n if (!sources?.length) {\n throw new InvalidRequestError('source dids are required')\n }\n\n if (uriPatterns.some(includesWildcard)) {\n throw new InvalidRequestError('wildcards not supported')\n }\n\n // @TODO Should this be enforced at the schema level?\n if (!uriPatterns.every(isUriString)) {\n throw new InvalidRequestError('invalid uri pattern')\n }\n\n const labelMap = await ctx.hydrator.label.getLabelsForSubjects(\n uriPatterns,\n // If sources are provided, use them. Otherwise, use the labelers from the request header\n {\n dids: sources,\n redact: new Set(),\n },\n )\n const labels = uriPatterns.flatMap((sub) => labelMap.getBySubject(sub))\n\n return {\n encoding: 'application/json',\n body: { labels },\n }\n })\n}\n\nfunction includesWildcard(str: string) {\n return str.includes('*')\n}\n"]}
1
+ {"version":3,"file":"queryLabels.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/label/queryLabels.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAC1C,OAAO,EAAE,mBAAmB,EAAe,MAAM,sBAAsB,CAAA;AAEvE,OAAO,EAAE,GAAG,EAAE,MAAM,+BAA+B,CAAA;AAEnD,MAAM,CAAC,OAAO,WAAW,MAAc,EAAE,GAAe;IACtD,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,WAAW,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;QAC7D,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,GAAG,MAAM,CAAA;QAEvC,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,CAAC;YACrB,MAAM,IAAI,mBAAmB,CAAC,0BAA0B,CAAC,CAAA;QAC3D,CAAC;QAED,IAAI,WAAW,CAAC,IAAI,CAAC,gBAAgB,CAAC,EAAE,CAAC;YACvC,MAAM,IAAI,mBAAmB,CAAC,yBAAyB,CAAC,CAAA;QAC1D,CAAC;QAED,qDAAqD;QACrD,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,WAAW,CAAC,EAAE,CAAC;YACpC,MAAM,IAAI,mBAAmB,CAAC,qBAAqB,CAAC,CAAA;QACtD,CAAC;QAED,MAAM,QAAQ,GAAG,MAAM,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,oBAAoB,CAC5D,WAAW;QACX,yFAAyF;QACzF;YACE,IAAI,EAAE,OAAO;YACb,MAAM,EAAE,IAAI,GAAG,EAAE;SAClB,CACF,CAAA;QACD,MAAM,MAAM,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,QAAQ,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAA;QAEvE,OAAO;YACL,QAAQ,EAAE,kBAAkB;YAC5B,IAAI,EAAE,EAAE,MAAM,EAAE;SACjB,CAAA;IACH,CAAC,CAAC,CAAA;AACJ,CAAC;AAED,SAAS,gBAAgB,CAAC,GAAW;IACnC,OAAO,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAA;AAC1B,CAAC","sourcesContent":["import { isUriString } from '@atproto/lex'\nimport { InvalidRequestError, type Server } from '@atproto/xrpc-server'\nimport type { AppContext } from '../../../../context.js'\nimport { com } from '../../../../lexicons/index.js'\n\nexport default function (server: Server, ctx: AppContext) {\n server.add(com.atproto.label.queryLabels, async ({ params }) => {\n const { uriPatterns, sources } = params\n\n if (!sources?.length) {\n throw new InvalidRequestError('source dids are required')\n }\n\n if (uriPatterns.some(includesWildcard)) {\n throw new InvalidRequestError('wildcards not supported')\n }\n\n // @TODO Should this be enforced at the schema level?\n if (!uriPatterns.every(isUriString)) {\n throw new InvalidRequestError('invalid uri pattern')\n }\n\n const labelMap = await ctx.hydrator.label.getLabelsForSubjects(\n uriPatterns,\n // If sources are provided, use them. Otherwise, use the labelers from the request header\n {\n dids: sources,\n redact: new Set(),\n },\n )\n const labels = uriPatterns.flatMap((sub) => labelMap.getBySubject(sub))\n\n return {\n encoding: 'application/json',\n body: { labels },\n }\n })\n}\n\nfunction includesWildcard(str: string) {\n return str.includes('*')\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { Server } from '@atproto/xrpc-server';
2
- import { AppContext } from '../../../../context.js';
1
+ import { type Server } from '@atproto/xrpc-server';
2
+ import type { AppContext } from '../../../../context.js';
3
3
  export default function (server: Server, ctx: AppContext): void;
4
4
  //# sourceMappingURL=getRecord.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getRecord.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/repo/getRecord.ts"],"names":[],"mappings":"AACA,OAAO,EAAuB,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAGnD,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QAsCvD"}
1
+ {"version":3,"file":"getRecord.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/repo/getRecord.ts"],"names":[],"mappings":"AACA,OAAO,EAAuB,KAAK,MAAM,EAAE,MAAM,sBAAsB,CAAA;AACvE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAGxD,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QAsCvD"}
@@ -1 +1 @@
1
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U,EAAE,IAAI,CAAC,CAAA;YACxC,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAG,EAAE,gBAAgB,CAAC,CAAA;YAElE,IAAI,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI,MAAM,CAAC,GAAG,KAAK,GAAG,CAAC,EAAE,CAAC;gBAC3C,MAAM,IAAI,mBAAmB,CAC3B,4BAA4B,GAAG,EAAE,EACjC,gBAAgB,CACjB,CAAA;YACH,CAAC;YAED,OAAO;gBACL,QAAQ,EAAE,kBAA2B;gBACrC,IAAI,EAAE;oBACJ,GAAG,EAAE,GAAG;oBACR,GAAG,EAAE,MAAM,CAAC,GAAG;oBACf,KAAK,EAAE,MAAM,CAAC,MAAM;iBACrB;aACF,CAAA;QACH,CAAC;KACF,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import { atUri } from '@atproto/lex'\nimport { InvalidRequestError, Server } from '@atproto/xrpc-server'\nimport { AppContext } from '../../../../context.js'\nimport { com } from '../../../../lexicons/index.js'\n\nexport default function (server: Server, ctx: AppContext) {\n server.add(com.atproto.repo.getRecord, {\n auth: ctx.authVerifier.optionalStandardOrRole,\n handler: async ({ auth, params }) => {\n const { repo, collection, rkey, cid } = params\n const { includeTakedowns } = ctx.authVerifier.parseCreds(auth)\n const [did] = await ctx.hydrator.actor.getDids([repo])\n if (!did) {\n throw new InvalidRequestError(`Could not find repo: ${repo}`)\n }\n\n const actors = await ctx.hydrator.actor.getActors([did], {\n includeTakedowns,\n })\n if (!actors.get(did)) {\n throw new InvalidRequestError(`Could not find repo: ${repo}`)\n }\n\n const uri = atUri(did, collection, rkey)\n const result = await ctx.hydrator.getRecord(uri, includeTakedowns)\n\n if (!result || (cid && result.cid !== cid)) {\n throw new InvalidRequestError(\n `Could not locate record: ${uri}`,\n 'RecordNotFound',\n )\n }\n\n return {\n encoding: 'application/json' as const,\n body: {\n uri: uri,\n cid: result.cid,\n value: result.record,\n },\n }\n },\n })\n}\n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EAAE,UAAU,EAAE,IAAI,CAAC,CAAA;YACxC,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAG,EAAE,gBAAgB,CAAC,CAAA;YAElE,IAAI,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI,MAAM,CAAC,GAAG,KAAK,GAAG,CAAC,EAAE,CAAC;gBAC3C,MAAM,IAAI,mBAAmB,CAC3B,4BAA4B,GAAG,EAAE,EACjC,gBAAgB,CACjB,CAAA;YACH,CAAC;YAED,OAAO;gBACL,QAAQ,EAAE,kBAA2B;gBACrC,IAAI,EAAE;oBACJ,GAAG,EAAE,GAAG;oBACR,GAAG,EAAE,MAAM,CAAC,GAAG;oBACf,KAAK,EAAE,MAAM,CAAC,MAAM;iBACrB;aACF,CAAA;QACH,CAAC;KACF,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import { atUri } from '@atproto/lex'\nimport { InvalidRequestError, type Server } from '@atproto/xrpc-server'\nimport type { AppContext } from '../../../../context.js'\nimport { com } from '../../../../lexicons/index.js'\n\nexport default function (server: Server, ctx: AppContext) {\n server.add(com.atproto.repo.getRecord, {\n auth: ctx.authVerifier.optionalStandardOrRole,\n handler: async ({ auth, params }) => {\n const { repo, collection, rkey, cid } = params\n const { includeTakedowns } = ctx.authVerifier.parseCreds(auth)\n const [did] = await ctx.hydrator.actor.getDids([repo])\n if (!did) {\n throw new InvalidRequestError(`Could not find repo: ${repo}`)\n }\n\n const actors = await ctx.hydrator.actor.getActors([did], {\n includeTakedowns,\n })\n if (!actors.get(did)) {\n throw new InvalidRequestError(`Could not find repo: ${repo}`)\n }\n\n const uri = atUri(did, collection, rkey)\n const result = await ctx.hydrator.getRecord(uri, includeTakedowns)\n\n if (!result || (cid && result.cid !== cid)) {\n throw new InvalidRequestError(\n `Could not locate record: ${uri}`,\n 'RecordNotFound',\n )\n }\n\n return {\n encoding: 'application/json' as const,\n body: {\n uri: uri,\n cid: result.cid,\n value: result.record,\n },\n }\n },\n })\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { Server } from '@atproto/xrpc-server';
2
- import { AppContext } from '../../../../context.js';
1
+ import { type Server } from '@atproto/xrpc-server';
2
+ import type { AppContext } from '../../../../context.js';
3
3
  export default function (server: Server, _ctx: AppContext): void;
4
4
  //# sourceMappingURL=fetchLabels.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"fetchLabels.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/temp/fetchLabels.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAGnD,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,QAIxD"}
1
+ {"version":3,"file":"fetchLabels.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/temp/fetchLabels.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,MAAM,EAAE,MAAM,sBAAsB,CAAA;AACvE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAGxD,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,QAIxD"}
@@ -1 +1 @@
1
- {"version":3,"file":"fetchLabels.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/temp/fetchLabels.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAU,MAAM,sBAAsB,CAAA;AAElE,OAAO,EAAE,GAAG,EAAE,MAAM,+BAA+B,CAAA;AAEnD,MAAM,CAAC,OAAO,WAAW,MAAc,EAAE,IAAgB;IACvD,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;QACzD,MAAM,IAAI,mBAAmB,CAAC,8BAA8B,CAAC,CAAA;IAC/D,CAAC,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import { InvalidRequestError, Server } from '@atproto/xrpc-server'\nimport { AppContext } from '../../../../context.js'\nimport { com } from '../../../../lexicons/index.js'\n\nexport default function (server: Server, _ctx: AppContext) {\n server.add(com.atproto.temp.fetchLabels, async (_reqCtx) => {\n throw new InvalidRequestError('not implemented on dataplane')\n })\n}\n"]}
1
+ {"version":3,"file":"fetchLabels.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/temp/fetchLabels.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAe,MAAM,sBAAsB,CAAA;AAEvE,OAAO,EAAE,GAAG,EAAE,MAAM,+BAA+B,CAAA;AAEnD,MAAM,CAAC,OAAO,WAAW,MAAc,EAAE,IAAgB;IACvD,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;QACzD,MAAM,IAAI,mBAAmB,CAAC,8BAA8B,CAAC,CAAA;IAC/D,CAAC,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import { InvalidRequestError, type Server } from '@atproto/xrpc-server'\nimport type { AppContext } from '../../../../context.js'\nimport { com } from '../../../../lexicons/index.js'\n\nexport default function (server: Server, _ctx: AppContext) {\n server.add(com.atproto.temp.fetchLabels, async (_reqCtx) => {\n throw new InvalidRequestError('not implemented on dataplane')\n })\n}\n"]}
@@ -1,4 +1,4 @@
1
1
  import { Router } from 'express';
2
- import { AppContext } from '../context.js';
2
+ import type { AppContext } from '../context.js';
3
3
  export declare const createRouter: (ctx: AppContext) => Router;
4
4
  //# sourceMappingURL=external.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"external.d.ts","sourceRoot":"","sources":["../../src/api/external.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAChC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAI1C,eAAO,MAAM,YAAY,QAAS,UAAU,KAAG,MAS9C,CAAA"}
1
+ {"version":3,"file":"external.d.ts","sourceRoot":"","sources":["../../src/api/external.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAChC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAI/C,eAAO,MAAM,YAAY,QAAS,UAAU,KAAG,MAS9C,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"external.js","sourceRoot":"","sources":["../../src/api/external.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAEhC,OAAO,KAAK,KAAK,MAAM,0BAA0B,CAAA;AACjD,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAA;AAExC,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,GAAe,EAAU,EAAE;IACtD,MAAM,MAAM,GAAG,MAAM,EAAE,CAAA;IAEvB,IAAI,GAAG,CAAC,SAAS,EAAE,CAAC;QAClB,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAA;QAC5C,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAA;IACrC,CAAC;IAED,OAAO,MAAM,CAAA;AACf,CAAC,CAAA","sourcesContent":["import { Router } from 'express'\nimport { AppContext } from '../context.js'\nimport * as aaApi from './age-assurance/index.js'\nimport * as kwsApi from './kws/index.js'\n\nexport const createRouter = (ctx: AppContext): Router => {\n const router = Router()\n\n if (ctx.kwsClient) {\n router.use('/kws', kwsApi.createRouter(ctx))\n router.use(aaApi.createRouter(ctx))\n }\n\n return router\n}\n"]}
1
+ {"version":3,"file":"external.js","sourceRoot":"","sources":["../../src/api/external.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAEhC,OAAO,KAAK,KAAK,MAAM,0BAA0B,CAAA;AACjD,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAA;AAExC,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,GAAe,EAAU,EAAE;IACtD,MAAM,MAAM,GAAG,MAAM,EAAE,CAAA;IAEvB,IAAI,GAAG,CAAC,SAAS,EAAE,CAAC;QAClB,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAA;QAC5C,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAA;IACrC,CAAC;IAED,OAAO,MAAM,CAAA;AACf,CAAC,CAAA","sourcesContent":["import { Router } from 'express'\nimport type { AppContext } from '../context.js'\nimport * as aaApi from './age-assurance/index.js'\nimport * as kwsApi from './kws/index.js'\n\nexport const createRouter = (ctx: AppContext): Router => {\n const router = Router()\n\n if (ctx.kwsClient) {\n router.use('/kws', kwsApi.createRouter(ctx))\n router.use(aaApi.createRouter(ctx))\n }\n\n return router\n}\n"]}
@@ -1,4 +1,4 @@
1
1
  import { Router } from 'express';
2
- import { AppContext } from '../context.js';
2
+ import type { AppContext } from '../context.js';
3
3
  export declare const createRouter: (ctx: AppContext) => Router;
4
4
  //# sourceMappingURL=health.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"health.d.ts","sourceRoot":"","sources":["../../src/api/health.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAChC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAE1C,eAAO,MAAM,YAAY,QAAS,UAAU,KAAG,MA2C9C,CAAA"}
1
+ {"version":3,"file":"health.d.ts","sourceRoot":"","sources":["../../src/api/health.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAChC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAE/C,eAAO,MAAM,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EF,OAAO,MAAM,CAAA;AACf,CAAC,CAAA","sourcesContent":["import { Router } from 'express'\nimport { AppContext } from '../context.js'\n\nexport const createRouter = (ctx: AppContext): Router => {\n const router = Router()\n\n router.get('/', function (req, res) {\n res.type('text/plain')\n res.send(`\n _ _\n | | | |\n | |__ ___| | ___ _\n | '_ \\\\/ __| |/ / | | |\n | |_) \\\\__ \\\\ <| |_| |\n |_.__/|___/_|\\\\_\\\\\\\\__, |\n __/ |\n |___/\n\nThis is an AT Protocol Application View (AppView) for the \"bsky.app\" application.\n\nMost API routes are under /xrpc/\n\n Code: https://github.com/bluesky-social/atproto\n Protocol: https://atproto.com\n`)\n })\n\n router.get('/robots.txt', function (req, res) {\n res.type('text/plain')\n res.send(\n '# Hello Friends!\\n\\n# Crawling the public parts of the API is allowed. HTTP 429 (\"backoff\") status codes are used for rate-limiting. Up to a handful concurrent requests should be ok.\\nUser-agent: *\\nAllow: /',\n )\n })\n\n router.get('/xrpc/_health', async function (req, res) {\n const { version } = ctx.cfg\n try {\n await ctx.dataplane.ping({})\n } catch (err) {\n req.log.error({ err }, 'failed health check')\n return res.status(503).send({ version, error: 'Service Unavailable' })\n }\n res.send({ version })\n })\n\n return router\n}\n"]}
1
+ {"version":3,"file":"health.js","sourceRoot":"","sources":["../../src/api/health.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAGhC,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,GAAe,EAAU,EAAE;IACtD,MAAM,MAAM,GAAG,MAAM,EAAE,CAAA;IAEvB,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,UAAU,GAAG,EAAE,GAAG;QAChC,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC,CAAA;QACtB,GAAG,CAAC,IAAI,CAAC;;;;;;;;;;;;;;;;CAgBZ,CAAC,CAAA;IACA,CAAC,CAAC,CAAA;IAEF,MAAM,CAAC,GAAG,CAAC,aAAa,EAAE,UAAU,GAAG,EAAE,GAAG;QAC1C,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC,CAAA;QACtB,GAAG,CAAC,IAAI,CACN,iNAAiN,CAClN,CAAA;IACH,CAAC,CAAC,CAAA;IAEF,MAAM,CAAC,GAAG,CAAC,eAAe,EAAE,KAAK,WAAW,GAAG,EAAE,GAAG;QAClD,MAAM,EAAE,OAAO,EAAE,GAAG,GAAG,CAAC,GAAG,CAAA;QAC3B,IAAI,CAAC;YACH,MAAM,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;QAC9B,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,GAAG,EAAE,EAAE,qBAAqB,CAAC,CAAA;YAC7C,OAAO,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,qBAAqB,EAAE,CAAC,CAAA;QACxE,CAAC;QACD,GAAG,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,CAAC,CAAA;IACvB,CAAC,CAAC,CAAA;IAEF,OAAO,MAAM,CAAA;AACf,CAAC,CAAA","sourcesContent":["import { Router } from 'express'\nimport type { AppContext } from '../context.js'\n\nexport const createRouter = (ctx: AppContext): Router => {\n const router = Router()\n\n router.get('/', function (req, res) {\n res.type('text/plain')\n res.send(`\n _ _\n | | | |\n | |__ ___| | ___ _\n | '_ \\\\/ __| |/ / | | |\n | |_) \\\\__ \\\\ <| |_| |\n |_.__/|___/_|\\\\_\\\\\\\\__, |\n __/ |\n |___/\n\nThis is an AT Protocol Application View (AppView) for the \"bsky.app\" application.\n\nMost API routes are under /xrpc/\n\n Code: https://github.com/bluesky-social/atproto\n Protocol: https://atproto.com\n`)\n })\n\n router.get('/robots.txt', function (req, res) {\n res.type('text/plain')\n res.send(\n '# Hello Friends!\\n\\n# Crawling the public parts of the API is allowed. HTTP 429 (\"backoff\") status codes are used for rate-limiting. Up to a handful concurrent requests should be ok.\\nUser-agent: *\\nAllow: /',\n )\n })\n\n router.get('/xrpc/_health', async function (req, res) {\n const { version } = ctx.cfg\n try {\n await ctx.dataplane.ping({})\n } catch (err) {\n req.log.error({ err }, 'failed health check')\n return res.status(503).send({ version, error: 'Service Unavailable' })\n }\n res.send({ version })\n })\n\n return router\n}\n"]}
@@ -1,5 +1,5 @@
1
- import { Server } from '@atproto/xrpc-server';
2
- import { AppContext } from '../context.js';
1
+ import type { Server } from '@atproto/xrpc-server';
2
+ import type { AppContext } from '../context.js';
3
3
  export * as health from './health.js';
4
4
  export * as wellKnown from './well-known.js';
5
5
  export * as blobResolver from './blob-resolver.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAqG1C,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AAErC,OAAO,KAAK,SAAS,MAAM,iBAAiB,CAAA;AAE5C,OAAO,KAAK,YAAY,MAAM,oBAAoB,CAAA;AAElD,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAA;AAEzC,OAAO,KAAK,OAAO,MAAM,cAAc,CAAA;AAEvC,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QAuGvD"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAClD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAqG/C,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AAErC,OAAO,KAAK,SAAS,MAAM,iBAAiB,CAAA;AAE5C,OAAO,KAAK,YAAY,MAAM,oBAAoB,CAAA;AAElD,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAA;AAEzC,OAAO,KAAK,OAAO,MAAM,cAAc,CAAA;AAEvC,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QAuGvD"}