@atproto/ozone 0.0.2

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 (444) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/LICENSE.txt +7 -0
  3. package/README.md +15 -0
  4. package/babel.config.js +3 -0
  5. package/bin/migration-create.ts +38 -0
  6. package/build.js +18 -0
  7. package/dist/api/admin/emitModerationEvent.d.ts +3 -0
  8. package/dist/api/admin/getModerationEvent.d.ts +3 -0
  9. package/dist/api/admin/getRecord.d.ts +3 -0
  10. package/dist/api/admin/getRepo.d.ts +3 -0
  11. package/dist/api/admin/queryModerationEvents.d.ts +3 -0
  12. package/dist/api/admin/queryModerationStatuses.d.ts +3 -0
  13. package/dist/api/admin/searchRepos.d.ts +3 -0
  14. package/dist/api/admin/util.d.ts +5 -0
  15. package/dist/api/com/atproto/admin/emitModerationEvent.d.ts +3 -0
  16. package/dist/api/com/atproto/admin/getModerationEvent.d.ts +3 -0
  17. package/dist/api/com/atproto/admin/getRecord.d.ts +3 -0
  18. package/dist/api/com/atproto/admin/getRepo.d.ts +3 -0
  19. package/dist/api/com/atproto/admin/queryModerationEvents.d.ts +3 -0
  20. package/dist/api/com/atproto/admin/queryModerationStatuses.d.ts +3 -0
  21. package/dist/api/com/atproto/admin/searchRepos.d.ts +3 -0
  22. package/dist/api/com/atproto/admin/util.d.ts +5 -0
  23. package/dist/api/com/atproto/moderation/createReport.d.ts +3 -0
  24. package/dist/api/com/atproto/moderation/util.d.ts +4 -0
  25. package/dist/api/com/atproto/temp/fetchLabels.d.ts +3 -0
  26. package/dist/api/health.d.ts +3 -0
  27. package/dist/api/index.d.ts +5 -0
  28. package/dist/api/label/queryLabels.d.ts +3 -0
  29. package/dist/api/label/subscribeLabels.d.ts +3 -0
  30. package/dist/api/moderation/createReport.d.ts +3 -0
  31. package/dist/api/moderation/util.d.ts +4 -0
  32. package/dist/api/temp/fetchLabels.d.ts +3 -0
  33. package/dist/api/util.d.ts +2 -0
  34. package/dist/api/well-known.d.ts +3 -0
  35. package/dist/auth-verifier.d.ts +47 -0
  36. package/dist/auth.d.ts +81 -0
  37. package/dist/background.d.ts +13 -0
  38. package/dist/config/config.d.ts +30 -0
  39. package/dist/config/env.d.ts +19 -0
  40. package/dist/config/index.d.ts +3 -0
  41. package/dist/config/secrets.d.ts +8 -0
  42. package/dist/config.d.ts +42 -0
  43. package/dist/context.d.ts +140 -0
  44. package/dist/daemon/config.d.ts +23 -0
  45. package/dist/daemon/context.d.ts +25 -0
  46. package/dist/daemon/event-pusher.d.ts +48 -0
  47. package/dist/daemon/event-reverser.d.ts +16 -0
  48. package/dist/daemon/index.d.ts +13 -0
  49. package/dist/db/index.d.ts +32 -0
  50. package/dist/db/index.js +33707 -0
  51. package/dist/db/index.js.map +7 -0
  52. package/dist/db/migrations/20231219T205730722Z-init.d.ts +3 -0
  53. package/dist/db/migrations/index.d.ts +1 -0
  54. package/dist/db/migrations/provider.d.ts +11 -0
  55. package/dist/db/pagination.d.ts +66 -0
  56. package/dist/db/schema/blob_push_event.d.ts +17 -0
  57. package/dist/db/schema/index.d.ts +10 -0
  58. package/dist/db/schema/label.d.ts +12 -0
  59. package/dist/db/schema/moderation_event.d.ts +22 -0
  60. package/dist/db/schema/moderation_subject_status.d.ts +25 -0
  61. package/dist/db/schema/record_push_event.d.ts +17 -0
  62. package/dist/db/schema/repo_push_event.d.ts +15 -0
  63. package/dist/db/types.d.ts +12 -0
  64. package/dist/error.d.ts +2 -0
  65. package/dist/index.d.ts +27 -0
  66. package/dist/index.js +131818 -0
  67. package/dist/index.js.map +7 -0
  68. package/dist/lexicon/index.d.ts +372 -0
  69. package/dist/lexicon/lexicons.d.ts +7553 -0
  70. package/dist/lexicon/types/app/bsky/actor/defs.d.ts +104 -0
  71. package/dist/lexicon/types/app/bsky/actor/getPreferences.d.ts +31 -0
  72. package/dist/lexicon/types/app/bsky/actor/getProfile.d.ts +29 -0
  73. package/dist/lexicon/types/app/bsky/actor/getProfiles.d.ts +32 -0
  74. package/dist/lexicon/types/app/bsky/actor/getSuggestions.d.ts +34 -0
  75. package/dist/lexicon/types/app/bsky/actor/profile.d.ts +15 -0
  76. package/dist/lexicon/types/app/bsky/actor/putPreferences.d.ts +26 -0
  77. package/dist/lexicon/types/app/bsky/actor/searchActors.d.ts +36 -0
  78. package/dist/lexicon/types/app/bsky/actor/searchActorsTypeahead.d.ts +34 -0
  79. package/dist/lexicon/types/app/bsky/embed/external.d.ts +31 -0
  80. package/dist/lexicon/types/app/bsky/embed/images.d.ts +37 -0
  81. package/dist/lexicon/types/app/bsky/embed/record.d.ts +54 -0
  82. package/dist/lexicon/types/app/bsky/embed/recordWithMedia.d.ts +24 -0
  83. package/dist/lexicon/types/app/bsky/feed/defs.d.ts +151 -0
  84. package/dist/lexicon/types/app/bsky/feed/describeFeedGenerator.d.ts +46 -0
  85. package/dist/lexicon/types/app/bsky/feed/generator.d.ts +18 -0
  86. package/dist/lexicon/types/app/bsky/feed/getActorFeeds.d.ts +35 -0
  87. package/dist/lexicon/types/app/bsky/feed/getActorLikes.d.ts +36 -0
  88. package/dist/lexicon/types/app/bsky/feed/getAuthorFeed.d.ts +37 -0
  89. package/dist/lexicon/types/app/bsky/feed/getFeed.d.ts +36 -0
  90. package/dist/lexicon/types/app/bsky/feed/getFeedGenerator.d.ts +34 -0
  91. package/dist/lexicon/types/app/bsky/feed/getFeedGenerators.d.ts +32 -0
  92. package/dist/lexicon/types/app/bsky/feed/getFeedSkeleton.d.ts +36 -0
  93. package/dist/lexicon/types/app/bsky/feed/getLikes.d.ts +47 -0
  94. package/dist/lexicon/types/app/bsky/feed/getListFeed.d.ts +36 -0
  95. package/dist/lexicon/types/app/bsky/feed/getPostThread.d.ts +38 -0
  96. package/dist/lexicon/types/app/bsky/feed/getPosts.d.ts +32 -0
  97. package/dist/lexicon/types/app/bsky/feed/getRepostedBy.d.ts +38 -0
  98. package/dist/lexicon/types/app/bsky/feed/getSuggestedFeeds.d.ts +34 -0
  99. package/dist/lexicon/types/app/bsky/feed/getTimeline.d.ts +35 -0
  100. package/dist/lexicon/types/app/bsky/feed/like.d.ts +9 -0
  101. package/dist/lexicon/types/app/bsky/feed/post.d.ts +50 -0
  102. package/dist/lexicon/types/app/bsky/feed/repost.d.ts +9 -0
  103. package/dist/lexicon/types/app/bsky/feed/searchPosts.d.ts +37 -0
  104. package/dist/lexicon/types/app/bsky/feed/threadgate.d.ts +28 -0
  105. package/dist/lexicon/types/app/bsky/graph/block.d.ts +8 -0
  106. package/dist/lexicon/types/app/bsky/graph/defs.d.ts +47 -0
  107. package/dist/lexicon/types/app/bsky/graph/follow.d.ts +8 -0
  108. package/dist/lexicon/types/app/bsky/graph/getBlocks.d.ts +34 -0
  109. package/dist/lexicon/types/app/bsky/graph/getFollowers.d.ts +36 -0
  110. package/dist/lexicon/types/app/bsky/graph/getFollows.d.ts +36 -0
  111. package/dist/lexicon/types/app/bsky/graph/getList.d.ts +36 -0
  112. package/dist/lexicon/types/app/bsky/graph/getListBlocks.d.ts +34 -0
  113. package/dist/lexicon/types/app/bsky/graph/getListMutes.d.ts +34 -0
  114. package/dist/lexicon/types/app/bsky/graph/getLists.d.ts +35 -0
  115. package/dist/lexicon/types/app/bsky/graph/getMutes.d.ts +34 -0
  116. package/dist/lexicon/types/app/bsky/graph/getSuggestedFollowsByActor.d.ts +32 -0
  117. package/dist/lexicon/types/app/bsky/graph/list.d.ts +19 -0
  118. package/dist/lexicon/types/app/bsky/graph/listblock.d.ts +8 -0
  119. package/dist/lexicon/types/app/bsky/graph/listitem.d.ts +9 -0
  120. package/dist/lexicon/types/app/bsky/graph/muteActor.d.ts +25 -0
  121. package/dist/lexicon/types/app/bsky/graph/muteActorList.d.ts +25 -0
  122. package/dist/lexicon/types/app/bsky/graph/unmuteActor.d.ts +25 -0
  123. package/dist/lexicon/types/app/bsky/graph/unmuteActorList.d.ts +25 -0
  124. package/dist/lexicon/types/app/bsky/moderation/defs.d.ts +49 -0
  125. package/dist/lexicon/types/app/bsky/moderation/getService.d.ts +29 -0
  126. package/dist/lexicon/types/app/bsky/moderation/getServices.d.ts +32 -0
  127. package/dist/lexicon/types/app/bsky/moderation/service.d.ts +17 -0
  128. package/dist/lexicon/types/app/bsky/notification/getUnreadCount.d.ts +31 -0
  129. package/dist/lexicon/types/app/bsky/notification/listNotifications.d.ts +52 -0
  130. package/dist/lexicon/types/app/bsky/notification/registerPush.d.ts +28 -0
  131. package/dist/lexicon/types/app/bsky/notification/updateSeen.d.ts +25 -0
  132. package/dist/lexicon/types/app/bsky/richtext/facet.d.ts +36 -0
  133. package/dist/lexicon/types/app/bsky/unspecced/defs.d.ts +13 -0
  134. package/dist/lexicon/types/app/bsky/unspecced/getPopular.d.ts +35 -0
  135. package/dist/lexicon/types/app/bsky/unspecced/getPopularFeedGenerators.d.ts +35 -0
  136. package/dist/lexicon/types/app/bsky/unspecced/getTimelineSkeleton.d.ts +35 -0
  137. package/dist/lexicon/types/app/bsky/unspecced/searchActorsSkeleton.d.ts +38 -0
  138. package/dist/lexicon/types/app/bsky/unspecced/searchPostsSkeleton.d.ts +37 -0
  139. package/dist/lexicon/types/com/atproto/admin/defs.d.ts +319 -0
  140. package/dist/lexicon/types/com/atproto/admin/deleteAccount.d.ts +25 -0
  141. package/dist/lexicon/types/com/atproto/admin/disableAccountInvites.d.ts +26 -0
  142. package/dist/lexicon/types/com/atproto/admin/disableInviteCodes.d.ts +26 -0
  143. package/dist/lexicon/types/com/atproto/admin/emitModerationEvent.d.ts +45 -0
  144. package/dist/lexicon/types/com/atproto/admin/enableAccountInvites.d.ts +26 -0
  145. package/dist/lexicon/types/com/atproto/admin/getAccountInfo.d.ts +29 -0
  146. package/dist/lexicon/types/com/atproto/admin/getAccountInfos.d.ts +32 -0
  147. package/dist/lexicon/types/com/atproto/admin/getInviteCodes.d.ts +35 -0
  148. package/dist/lexicon/types/com/atproto/admin/getModerationEvent.d.ts +29 -0
  149. package/dist/lexicon/types/com/atproto/admin/getRecord.d.ts +31 -0
  150. package/dist/lexicon/types/com/atproto/admin/getRepo.d.ts +30 -0
  151. package/dist/lexicon/types/com/atproto/admin/getSubjectStatus.d.ts +39 -0
  152. package/dist/lexicon/types/com/atproto/admin/queryModerationEvents.d.ts +39 -0
  153. package/dist/lexicon/types/com/atproto/admin/queryModerationStatuses.d.ts +48 -0
  154. package/dist/lexicon/types/com/atproto/admin/searchRepos.d.ts +36 -0
  155. package/dist/lexicon/types/com/atproto/admin/sendEmail.d.ts +40 -0
  156. package/dist/lexicon/types/com/atproto/admin/updateAccountEmail.d.ts +26 -0
  157. package/dist/lexicon/types/com/atproto/admin/updateAccountHandle.d.ts +26 -0
  158. package/dist/lexicon/types/com/atproto/admin/updateSubjectStatus.d.ts +46 -0
  159. package/dist/lexicon/types/com/atproto/identity/resolveHandle.d.ts +31 -0
  160. package/dist/lexicon/types/com/atproto/identity/updateHandle.d.ts +25 -0
  161. package/dist/lexicon/types/com/atproto/label/defs.d.ts +24 -0
  162. package/dist/lexicon/types/com/atproto/label/queryLabels.d.ts +36 -0
  163. package/dist/lexicon/types/com/atproto/label/subscribeLabels.d.ts +36 -0
  164. package/dist/lexicon/types/com/atproto/moderation/createReport.d.ts +52 -0
  165. package/dist/lexicon/types/com/atproto/moderation/defs.d.ts +8 -0
  166. package/dist/lexicon/types/com/atproto/repo/applyWrites.d.ts +53 -0
  167. package/dist/lexicon/types/com/atproto/repo/createRecord.d.ts +43 -0
  168. package/dist/lexicon/types/com/atproto/repo/deleteRecord.d.ts +30 -0
  169. package/dist/lexicon/types/com/atproto/repo/describeRepo.d.ts +35 -0
  170. package/dist/lexicon/types/com/atproto/repo/getRecord.d.ts +36 -0
  171. package/dist/lexicon/types/com/atproto/repo/listRecords.d.ts +47 -0
  172. package/dist/lexicon/types/com/atproto/repo/putRecord.d.ts +44 -0
  173. package/dist/lexicon/types/com/atproto/repo/strongRef.d.ts +8 -0
  174. package/dist/lexicon/types/com/atproto/repo/uploadBlob.d.ts +36 -0
  175. package/dist/lexicon/types/com/atproto/server/confirmEmail.d.ts +27 -0
  176. package/dist/lexicon/types/com/atproto/server/createAccount.d.ts +49 -0
  177. package/dist/lexicon/types/com/atproto/server/createAppPassword.d.ts +43 -0
  178. package/dist/lexicon/types/com/atproto/server/createInviteCode.d.ts +37 -0
  179. package/dist/lexicon/types/com/atproto/server/createInviteCodes.d.ts +46 -0
  180. package/dist/lexicon/types/com/atproto/server/createSession.d.ts +44 -0
  181. package/dist/lexicon/types/com/atproto/server/defs.d.ts +20 -0
  182. package/dist/lexicon/types/com/atproto/server/deleteAccount.d.ts +28 -0
  183. package/dist/lexicon/types/com/atproto/server/deleteSession.d.ts +19 -0
  184. package/dist/lexicon/types/com/atproto/server/describeServer.d.ts +41 -0
  185. package/dist/lexicon/types/com/atproto/server/getAccountInviteCodes.d.ts +34 -0
  186. package/dist/lexicon/types/com/atproto/server/getSession.d.ts +34 -0
  187. package/dist/lexicon/types/com/atproto/server/listAppPasswords.d.ts +39 -0
  188. package/dist/lexicon/types/com/atproto/server/refreshSession.d.ts +35 -0
  189. package/dist/lexicon/types/com/atproto/server/requestAccountDelete.d.ts +19 -0
  190. package/dist/lexicon/types/com/atproto/server/requestEmailConfirmation.d.ts +19 -0
  191. package/dist/lexicon/types/com/atproto/server/requestEmailUpdate.d.ts +30 -0
  192. package/dist/lexicon/types/com/atproto/server/requestPasswordReset.d.ts +25 -0
  193. package/dist/lexicon/types/com/atproto/server/reserveSigningKey.d.ts +36 -0
  194. package/dist/lexicon/types/com/atproto/server/resetPassword.d.ts +27 -0
  195. package/dist/lexicon/types/com/atproto/server/revokeAppPassword.d.ts +25 -0
  196. package/dist/lexicon/types/com/atproto/server/updateEmail.d.ts +27 -0
  197. package/dist/lexicon/types/com/atproto/sync/getBlob.d.ts +30 -0
  198. package/dist/lexicon/types/com/atproto/sync/getBlocks.d.ts +30 -0
  199. package/dist/lexicon/types/com/atproto/sync/getCheckout.d.ts +29 -0
  200. package/dist/lexicon/types/com/atproto/sync/getHead.d.ts +32 -0
  201. package/dist/lexicon/types/com/atproto/sync/getLatestCommit.d.ts +33 -0
  202. package/dist/lexicon/types/com/atproto/sync/getRecord.d.ts +32 -0
  203. package/dist/lexicon/types/com/atproto/sync/getRepo.d.ts +30 -0
  204. package/dist/lexicon/types/com/atproto/sync/listBlobs.d.ts +35 -0
  205. package/dist/lexicon/types/com/atproto/sync/listRepos.d.ts +42 -0
  206. package/dist/lexicon/types/com/atproto/sync/notifyOfUpdate.d.ts +25 -0
  207. package/dist/lexicon/types/com/atproto/sync/requestCrawl.d.ts +25 -0
  208. package/dist/lexicon/types/com/atproto/sync/subscribeRepos.d.ts +80 -0
  209. package/dist/lexicon/types/com/atproto/temp/fetchLabels.d.ts +33 -0
  210. package/dist/lexicon/types/com/atproto/temp/importRepo.d.ts +32 -0
  211. package/dist/lexicon/types/com/atproto/temp/pushBlob.d.ts +25 -0
  212. package/dist/lexicon/types/com/atproto/temp/requestPhoneVerification.d.ts +25 -0
  213. package/dist/lexicon/types/com/atproto/temp/transferAccount.d.ts +42 -0
  214. package/dist/lexicon/util.d.ts +2 -0
  215. package/dist/logger.d.ts +4 -0
  216. package/dist/mod-service/index.d.ts +155 -0
  217. package/dist/mod-service/status.d.ts +12 -0
  218. package/dist/mod-service/subject.d.ts +59 -0
  219. package/dist/mod-service/types.d.ts +19 -0
  220. package/dist/mod-service/views.d.ts +49 -0
  221. package/dist/sequencer/index.d.ts +2 -0
  222. package/dist/sequencer/outbox.d.ts +16 -0
  223. package/dist/sequencer/sequencer.d.ts +35 -0
  224. package/dist/services/index.d.ts +7 -0
  225. package/dist/services/moderation/index.d.ts +144 -0
  226. package/dist/services/moderation/status.d.ts +12 -0
  227. package/dist/services/moderation/subject.d.ts +60 -0
  228. package/dist/services/moderation/types.d.ts +19 -0
  229. package/dist/services/moderation/views.d.ts +42 -0
  230. package/dist/services/types.d.ts +2 -0
  231. package/dist/util/date.d.ts +1 -0
  232. package/dist/util/debug.d.ts +1 -0
  233. package/dist/util/retry.d.ts +3 -0
  234. package/dist/util.d.ts +3 -0
  235. package/jest.config.js +6 -0
  236. package/package.json +67 -0
  237. package/src/api/admin/emitModerationEvent.ts +130 -0
  238. package/src/api/admin/getModerationEvent.ts +19 -0
  239. package/src/api/admin/getRecord.ts +34 -0
  240. package/src/api/admin/getRepo.ts +31 -0
  241. package/src/api/admin/queryModerationEvents.ts +40 -0
  242. package/src/api/admin/queryModerationStatuses.ts +57 -0
  243. package/src/api/admin/searchRepos.ts +42 -0
  244. package/src/api/admin/util.ts +54 -0
  245. package/src/api/health.ts +20 -0
  246. package/src/api/index.ts +28 -0
  247. package/src/api/moderation/createReport.ts +41 -0
  248. package/src/api/moderation/util.ts +65 -0
  249. package/src/api/temp/fetchLabels.ts +29 -0
  250. package/src/api/well-known.ts +35 -0
  251. package/src/auth.ts +147 -0
  252. package/src/background.ts +35 -0
  253. package/src/config/config.ts +84 -0
  254. package/src/config/env.ts +41 -0
  255. package/src/config/index.ts +3 -0
  256. package/src/config/secrets.ts +23 -0
  257. package/src/context.ts +180 -0
  258. package/src/daemon/context.ts +90 -0
  259. package/src/daemon/event-pusher.ts +296 -0
  260. package/src/daemon/event-reverser.ts +74 -0
  261. package/src/daemon/index.ts +33 -0
  262. package/src/db/index.ts +197 -0
  263. package/src/db/migrations/20231219T205730722Z-init.ts +164 -0
  264. package/src/db/migrations/index.ts +5 -0
  265. package/src/db/migrations/provider.ts +25 -0
  266. package/src/db/pagination.ts +216 -0
  267. package/src/db/schema/blob_push_event.ts +21 -0
  268. package/src/db/schema/index.ts +18 -0
  269. package/src/db/schema/label.ts +12 -0
  270. package/src/db/schema/moderation_event.ts +35 -0
  271. package/src/db/schema/moderation_subject_status.ts +32 -0
  272. package/src/db/schema/record_push_event.ts +21 -0
  273. package/src/db/schema/repo_push_event.ts +19 -0
  274. package/src/db/types.ts +15 -0
  275. package/src/error.ts +12 -0
  276. package/src/index.ts +102 -0
  277. package/src/lexicon/index.ts +1626 -0
  278. package/src/lexicon/lexicons.ts +8050 -0
  279. package/src/lexicon/types/app/bsky/actor/defs.ts +235 -0
  280. package/src/lexicon/types/app/bsky/actor/getPreferences.ts +44 -0
  281. package/src/lexicon/types/app/bsky/actor/getProfile.ts +41 -0
  282. package/src/lexicon/types/app/bsky/actor/getProfiles.ts +46 -0
  283. package/src/lexicon/types/app/bsky/actor/getSuggestions.ts +48 -0
  284. package/src/lexicon/types/app/bsky/actor/profile.ts +32 -0
  285. package/src/lexicon/types/app/bsky/actor/putPreferences.ts +39 -0
  286. package/src/lexicon/types/app/bsky/actor/searchActors.ts +52 -0
  287. package/src/lexicon/types/app/bsky/actor/searchActorsTypeahead.ts +50 -0
  288. package/src/lexicon/types/app/bsky/embed/external.ts +82 -0
  289. package/src/lexicon/types/app/bsky/embed/images.ts +96 -0
  290. package/src/lexicon/types/app/bsky/embed/record.ts +120 -0
  291. package/src/lexicon/types/app/bsky/embed/recordWithMedia.ts +53 -0
  292. package/src/lexicon/types/app/bsky/feed/defs.ts +308 -0
  293. package/src/lexicon/types/app/bsky/feed/describeFeedGenerator.ts +80 -0
  294. package/src/lexicon/types/app/bsky/feed/generator.ts +35 -0
  295. package/src/lexicon/types/app/bsky/feed/getActorFeeds.ts +49 -0
  296. package/src/lexicon/types/app/bsky/feed/getActorLikes.ts +50 -0
  297. package/src/lexicon/types/app/bsky/feed/getAuthorFeed.ts +56 -0
  298. package/src/lexicon/types/app/bsky/feed/getFeed.ts +50 -0
  299. package/src/lexicon/types/app/bsky/feed/getFeedGenerator.ts +48 -0
  300. package/src/lexicon/types/app/bsky/feed/getFeedGenerators.ts +46 -0
  301. package/src/lexicon/types/app/bsky/feed/getFeedSkeleton.ts +50 -0
  302. package/src/lexicon/types/app/bsky/feed/getLikes.ts +69 -0
  303. package/src/lexicon/types/app/bsky/feed/getListFeed.ts +50 -0
  304. package/src/lexicon/types/app/bsky/feed/getPostThread.ts +53 -0
  305. package/src/lexicon/types/app/bsky/feed/getPosts.ts +46 -0
  306. package/src/lexicon/types/app/bsky/feed/getRepostedBy.ts +52 -0
  307. package/src/lexicon/types/app/bsky/feed/getSuggestedFeeds.ts +48 -0
  308. package/src/lexicon/types/app/bsky/feed/getTimeline.ts +49 -0
  309. package/src/lexicon/types/app/bsky/feed/like.ts +26 -0
  310. package/src/lexicon/types/app/bsky/feed/post.ts +102 -0
  311. package/src/lexicon/types/app/bsky/feed/repost.ts +27 -0
  312. package/src/lexicon/types/app/bsky/feed/searchPosts.ts +54 -0
  313. package/src/lexicon/types/app/bsky/feed/threadgate.ts +84 -0
  314. package/src/lexicon/types/app/bsky/graph/block.ts +26 -0
  315. package/src/lexicon/types/app/bsky/graph/defs.ts +104 -0
  316. package/src/lexicon/types/app/bsky/graph/follow.ts +26 -0
  317. package/src/lexicon/types/app/bsky/graph/getBlocks.ts +48 -0
  318. package/src/lexicon/types/app/bsky/graph/getFollowers.ts +50 -0
  319. package/src/lexicon/types/app/bsky/graph/getFollows.ts +50 -0
  320. package/src/lexicon/types/app/bsky/graph/getList.ts +50 -0
  321. package/src/lexicon/types/app/bsky/graph/getListBlocks.ts +48 -0
  322. package/src/lexicon/types/app/bsky/graph/getListMutes.ts +48 -0
  323. package/src/lexicon/types/app/bsky/graph/getLists.ts +49 -0
  324. package/src/lexicon/types/app/bsky/graph/getMutes.ts +48 -0
  325. package/src/lexicon/types/app/bsky/graph/getSuggestedFollowsByActor.ts +46 -0
  326. package/src/lexicon/types/app/bsky/graph/list.ts +36 -0
  327. package/src/lexicon/types/app/bsky/graph/listblock.ts +26 -0
  328. package/src/lexicon/types/app/bsky/graph/listitem.ts +27 -0
  329. package/src/lexicon/types/app/bsky/graph/muteActor.ts +38 -0
  330. package/src/lexicon/types/app/bsky/graph/muteActorList.ts +38 -0
  331. package/src/lexicon/types/app/bsky/graph/unmuteActor.ts +38 -0
  332. package/src/lexicon/types/app/bsky/graph/unmuteActorList.ts +38 -0
  333. package/src/lexicon/types/app/bsky/notification/getUnreadCount.ts +45 -0
  334. package/src/lexicon/types/app/bsky/notification/listNotifications.ts +87 -0
  335. package/src/lexicon/types/app/bsky/notification/registerPush.ts +41 -0
  336. package/src/lexicon/types/app/bsky/notification/updateSeen.ts +38 -0
  337. package/src/lexicon/types/app/bsky/richtext/facet.ts +97 -0
  338. package/src/lexicon/types/app/bsky/unspecced/defs.ts +41 -0
  339. package/src/lexicon/types/app/bsky/unspecced/getPopularFeedGenerators.ts +49 -0
  340. package/src/lexicon/types/app/bsky/unspecced/getTimelineSkeleton.ts +49 -0
  341. package/src/lexicon/types/app/bsky/unspecced/searchActorsSkeleton.ts +56 -0
  342. package/src/lexicon/types/app/bsky/unspecced/searchPostsSkeleton.ts +54 -0
  343. package/src/lexicon/types/com/atproto/admin/defs.ts +719 -0
  344. package/src/lexicon/types/com/atproto/admin/deleteAccount.ts +38 -0
  345. package/src/lexicon/types/com/atproto/admin/disableAccountInvites.ts +40 -0
  346. package/src/lexicon/types/com/atproto/admin/disableInviteCodes.ts +39 -0
  347. package/src/lexicon/types/com/atproto/admin/emitModerationEvent.ts +66 -0
  348. package/src/lexicon/types/com/atproto/admin/enableAccountInvites.ts +40 -0
  349. package/src/lexicon/types/com/atproto/admin/getAccountInfo.ts +41 -0
  350. package/src/lexicon/types/com/atproto/admin/getAccountInfos.ts +46 -0
  351. package/src/lexicon/types/com/atproto/admin/getInviteCodes.ts +49 -0
  352. package/src/lexicon/types/com/atproto/admin/getModerationEvent.ts +41 -0
  353. package/src/lexicon/types/com/atproto/admin/getRecord.ts +43 -0
  354. package/src/lexicon/types/com/atproto/admin/getRepo.ts +42 -0
  355. package/src/lexicon/types/com/atproto/admin/getSubjectStatus.ts +54 -0
  356. package/src/lexicon/types/com/atproto/admin/queryModerationEvents.ts +56 -0
  357. package/src/lexicon/types/com/atproto/admin/queryModerationStatuses.ts +72 -0
  358. package/src/lexicon/types/com/atproto/admin/searchRepos.ts +51 -0
  359. package/src/lexicon/types/com/atproto/admin/sendEmail.ts +54 -0
  360. package/src/lexicon/types/com/atproto/admin/updateAccountEmail.ts +40 -0
  361. package/src/lexicon/types/com/atproto/admin/updateAccountHandle.ts +39 -0
  362. package/src/lexicon/types/com/atproto/admin/updateSubjectStatus.ts +61 -0
  363. package/src/lexicon/types/com/atproto/identity/resolveHandle.ts +46 -0
  364. package/src/lexicon/types/com/atproto/identity/updateHandle.ts +38 -0
  365. package/src/lexicon/types/com/atproto/label/defs.ts +73 -0
  366. package/src/lexicon/types/com/atproto/label/queryLabels.ts +52 -0
  367. package/src/lexicon/types/com/atproto/label/subscribeLabels.ts +67 -0
  368. package/src/lexicon/types/com/atproto/moderation/createReport.ts +65 -0
  369. package/src/lexicon/types/com/atproto/moderation/defs.ts +32 -0
  370. package/src/lexicon/types/com/atproto/repo/applyWrites.ts +103 -0
  371. package/src/lexicon/types/com/atproto/repo/createRecord.ts +62 -0
  372. package/src/lexicon/types/com/atproto/repo/deleteRecord.ts +48 -0
  373. package/src/lexicon/types/com/atproto/repo/describeRepo.ts +50 -0
  374. package/src/lexicon/types/com/atproto/repo/getRecord.ts +54 -0
  375. package/src/lexicon/types/com/atproto/repo/listRecords.ts +77 -0
  376. package/src/lexicon/types/com/atproto/repo/putRecord.ts +64 -0
  377. package/src/lexicon/types/com/atproto/repo/strongRef.ts +26 -0
  378. package/src/lexicon/types/com/atproto/repo/uploadBlob.ts +47 -0
  379. package/src/lexicon/types/com/atproto/server/confirmEmail.ts +40 -0
  380. package/src/lexicon/types/com/atproto/server/createAccount.ts +69 -0
  381. package/src/lexicon/types/com/atproto/server/createAppPassword.ts +69 -0
  382. package/src/lexicon/types/com/atproto/server/createInviteCode.ts +50 -0
  383. package/src/lexicon/types/com/atproto/server/createInviteCodes.ts +72 -0
  384. package/src/lexicon/types/com/atproto/server/createSession.ts +58 -0
  385. package/src/lexicon/types/com/atproto/server/defs.ts +48 -0
  386. package/src/lexicon/types/com/atproto/server/deleteAccount.ts +41 -0
  387. package/src/lexicon/types/com/atproto/server/deleteSession.ts +31 -0
  388. package/src/lexicon/types/com/atproto/server/describeServer.ts +64 -0
  389. package/src/lexicon/types/com/atproto/server/getAccountInviteCodes.ts +48 -0
  390. package/src/lexicon/types/com/atproto/server/getSession.ts +47 -0
  391. package/src/lexicon/types/com/atproto/server/listAppPasswords.ts +62 -0
  392. package/src/lexicon/types/com/atproto/server/refreshSession.ts +48 -0
  393. package/src/lexicon/types/com/atproto/server/requestAccountDelete.ts +31 -0
  394. package/src/lexicon/types/com/atproto/server/requestEmailConfirmation.ts +31 -0
  395. package/src/lexicon/types/com/atproto/server/requestEmailUpdate.ts +43 -0
  396. package/src/lexicon/types/com/atproto/server/requestPasswordReset.ts +38 -0
  397. package/src/lexicon/types/com/atproto/server/reserveSigningKey.ts +51 -0
  398. package/src/lexicon/types/com/atproto/server/resetPassword.ts +40 -0
  399. package/src/lexicon/types/com/atproto/server/revokeAppPassword.ts +38 -0
  400. package/src/lexicon/types/com/atproto/server/updateEmail.ts +41 -0
  401. package/src/lexicon/types/com/atproto/sync/getBlob.ts +43 -0
  402. package/src/lexicon/types/com/atproto/sync/getBlocks.ts +42 -0
  403. package/src/lexicon/types/com/atproto/sync/getCheckout.ts +41 -0
  404. package/src/lexicon/types/com/atproto/sync/getHead.ts +47 -0
  405. package/src/lexicon/types/com/atproto/sync/getLatestCommit.ts +48 -0
  406. package/src/lexicon/types/com/atproto/sync/getRecord.ts +45 -0
  407. package/src/lexicon/types/com/atproto/sync/getRepo.ts +43 -0
  408. package/src/lexicon/types/com/atproto/sync/listBlobs.ts +51 -0
  409. package/src/lexicon/types/com/atproto/sync/listRepos.ts +66 -0
  410. package/src/lexicon/types/com/atproto/sync/notifyOfUpdate.ts +39 -0
  411. package/src/lexicon/types/com/atproto/sync/requestCrawl.ts +39 -0
  412. package/src/lexicon/types/com/atproto/sync/subscribeRepos.ts +161 -0
  413. package/src/lexicon/types/com/atproto/temp/fetchLabels.ts +47 -0
  414. package/src/lexicon/types/com/atproto/temp/importRepo.ts +45 -0
  415. package/src/lexicon/types/com/atproto/temp/pushBlob.ts +39 -0
  416. package/src/lexicon/types/com/atproto/temp/requestPhoneVerification.ts +38 -0
  417. package/src/lexicon/types/com/atproto/temp/transferAccount.ts +62 -0
  418. package/src/lexicon/util.ts +13 -0
  419. package/src/logger.ts +19 -0
  420. package/src/mod-service/index.ts +758 -0
  421. package/src/mod-service/status.ts +264 -0
  422. package/src/mod-service/subject.ts +136 -0
  423. package/src/mod-service/types.ts +32 -0
  424. package/src/mod-service/views.ts +531 -0
  425. package/src/util.ts +26 -0
  426. package/test.env +2 -0
  427. package/test.log +0 -0
  428. package/tests/__snapshots__/get-record.test.ts.snap +173 -0
  429. package/tests/__snapshots__/get-repo.test.ts.snap +57 -0
  430. package/tests/__snapshots__/moderation-events.test.ts.snap +168 -0
  431. package/tests/__snapshots__/moderation-statuses.test.ts.snap +64 -0
  432. package/tests/__snapshots__/moderation.test.ts.snap +55 -0
  433. package/tests/_util.ts +192 -0
  434. package/tests/db.test.ts +184 -0
  435. package/tests/get-record.test.ts +110 -0
  436. package/tests/get-repo.test.ts +131 -0
  437. package/tests/moderation-appeals.test.ts +269 -0
  438. package/tests/moderation-events.test.ts +220 -0
  439. package/tests/moderation-statuses.test.ts +144 -0
  440. package/tests/moderation.test.ts +961 -0
  441. package/tests/repo-search.test.ts +123 -0
  442. package/tests/server.test.ts +76 -0
  443. package/tsconfig.build.json +4 -0
  444. package/tsconfig.json +21 -0
@@ -0,0 +1,37 @@
1
+ import express from 'express';
2
+ import { HandlerAuth } from '@atproto/xrpc-server';
3
+ import * as AppBskyFeedDefs from './defs';
4
+ export interface QueryParams {
5
+ q: string;
6
+ limit: number;
7
+ cursor?: string;
8
+ }
9
+ export type InputSchema = undefined;
10
+ export interface OutputSchema {
11
+ cursor?: string;
12
+ hitsTotal?: number;
13
+ posts: AppBskyFeedDefs.PostView[];
14
+ [k: string]: unknown;
15
+ }
16
+ export type HandlerInput = undefined;
17
+ export interface HandlerSuccess {
18
+ encoding: 'application/json';
19
+ body: OutputSchema;
20
+ headers?: {
21
+ [key: string]: string;
22
+ };
23
+ }
24
+ export interface HandlerError {
25
+ status: number;
26
+ message?: string;
27
+ error?: 'BadQueryString';
28
+ }
29
+ export type HandlerOutput = HandlerError | HandlerSuccess;
30
+ export type HandlerReqCtx<HA extends HandlerAuth = never> = {
31
+ auth: HA;
32
+ params: QueryParams;
33
+ input: HandlerInput;
34
+ req: express.Request;
35
+ res: express.Response;
36
+ };
37
+ export type Handler<HA extends HandlerAuth = never> = (ctx: HandlerReqCtx<HA>) => Promise<HandlerOutput> | HandlerOutput;
@@ -0,0 +1,28 @@
1
+ import { ValidationResult } from '@atproto/lexicon';
2
+ export interface Record {
3
+ post: string;
4
+ allow?: (MentionRule | FollowingRule | ListRule | {
5
+ $type: string;
6
+ [k: string]: unknown;
7
+ })[];
8
+ createdAt: string;
9
+ [k: string]: unknown;
10
+ }
11
+ export declare function isRecord(v: unknown): v is Record;
12
+ export declare function validateRecord(v: unknown): ValidationResult;
13
+ export interface MentionRule {
14
+ [k: string]: unknown;
15
+ }
16
+ export declare function isMentionRule(v: unknown): v is MentionRule;
17
+ export declare function validateMentionRule(v: unknown): ValidationResult;
18
+ export interface FollowingRule {
19
+ [k: string]: unknown;
20
+ }
21
+ export declare function isFollowingRule(v: unknown): v is FollowingRule;
22
+ export declare function validateFollowingRule(v: unknown): ValidationResult;
23
+ export interface ListRule {
24
+ list: string;
25
+ [k: string]: unknown;
26
+ }
27
+ export declare function isListRule(v: unknown): v is ListRule;
28
+ export declare function validateListRule(v: unknown): ValidationResult;
@@ -0,0 +1,8 @@
1
+ import { ValidationResult } from '@atproto/lexicon';
2
+ export interface Record {
3
+ subject: string;
4
+ createdAt: string;
5
+ [k: string]: unknown;
6
+ }
7
+ export declare function isRecord(v: unknown): v is Record;
8
+ export declare function validateRecord(v: unknown): ValidationResult;
@@ -0,0 +1,47 @@
1
+ import { ValidationResult } from '@atproto/lexicon';
2
+ import * as AppBskyActorDefs from '../actor/defs';
3
+ import * as AppBskyRichtextFacet from '../richtext/facet';
4
+ export interface ListViewBasic {
5
+ uri: string;
6
+ cid: string;
7
+ name: string;
8
+ purpose: ListPurpose;
9
+ avatar?: string;
10
+ viewer?: ListViewerState;
11
+ indexedAt?: string;
12
+ [k: string]: unknown;
13
+ }
14
+ export declare function isListViewBasic(v: unknown): v is ListViewBasic;
15
+ export declare function validateListViewBasic(v: unknown): ValidationResult;
16
+ export interface ListView {
17
+ uri: string;
18
+ cid: string;
19
+ creator: AppBskyActorDefs.ProfileView;
20
+ name: string;
21
+ purpose: ListPurpose;
22
+ description?: string;
23
+ descriptionFacets?: AppBskyRichtextFacet.Main[];
24
+ avatar?: string;
25
+ viewer?: ListViewerState;
26
+ indexedAt: string;
27
+ [k: string]: unknown;
28
+ }
29
+ export declare function isListView(v: unknown): v is ListView;
30
+ export declare function validateListView(v: unknown): ValidationResult;
31
+ export interface ListItemView {
32
+ uri: string;
33
+ subject: AppBskyActorDefs.ProfileView;
34
+ [k: string]: unknown;
35
+ }
36
+ export declare function isListItemView(v: unknown): v is ListItemView;
37
+ export declare function validateListItemView(v: unknown): ValidationResult;
38
+ export type ListPurpose = 'app.bsky.graph.defs#modlist' | 'app.bsky.graph.defs#curatelist' | (string & {});
39
+ export declare const MODLIST = "app.bsky.graph.defs#modlist";
40
+ export declare const CURATELIST = "app.bsky.graph.defs#curatelist";
41
+ export interface ListViewerState {
42
+ muted?: boolean;
43
+ blocked?: string;
44
+ [k: string]: unknown;
45
+ }
46
+ export declare function isListViewerState(v: unknown): v is ListViewerState;
47
+ export declare function validateListViewerState(v: unknown): ValidationResult;
@@ -0,0 +1,8 @@
1
+ import { ValidationResult } from '@atproto/lexicon';
2
+ export interface Record {
3
+ subject: string;
4
+ createdAt: string;
5
+ [k: string]: unknown;
6
+ }
7
+ export declare function isRecord(v: unknown): v is Record;
8
+ export declare function validateRecord(v: unknown): ValidationResult;
@@ -0,0 +1,34 @@
1
+ import express from 'express';
2
+ import { HandlerAuth } from '@atproto/xrpc-server';
3
+ import * as AppBskyActorDefs from '../actor/defs';
4
+ export interface QueryParams {
5
+ limit: number;
6
+ cursor?: string;
7
+ }
8
+ export type InputSchema = undefined;
9
+ export interface OutputSchema {
10
+ cursor?: string;
11
+ blocks: AppBskyActorDefs.ProfileView[];
12
+ [k: string]: unknown;
13
+ }
14
+ export type HandlerInput = undefined;
15
+ export interface HandlerSuccess {
16
+ encoding: 'application/json';
17
+ body: OutputSchema;
18
+ headers?: {
19
+ [key: string]: string;
20
+ };
21
+ }
22
+ export interface HandlerError {
23
+ status: number;
24
+ message?: string;
25
+ }
26
+ export type HandlerOutput = HandlerError | HandlerSuccess;
27
+ export type HandlerReqCtx<HA extends HandlerAuth = never> = {
28
+ auth: HA;
29
+ params: QueryParams;
30
+ input: HandlerInput;
31
+ req: express.Request;
32
+ res: express.Response;
33
+ };
34
+ export type Handler<HA extends HandlerAuth = never> = (ctx: HandlerReqCtx<HA>) => Promise<HandlerOutput> | HandlerOutput;
@@ -0,0 +1,36 @@
1
+ import express from 'express';
2
+ import { HandlerAuth } from '@atproto/xrpc-server';
3
+ import * as AppBskyActorDefs from '../actor/defs';
4
+ export interface QueryParams {
5
+ actor: string;
6
+ limit: number;
7
+ cursor?: string;
8
+ }
9
+ export type InputSchema = undefined;
10
+ export interface OutputSchema {
11
+ subject: AppBskyActorDefs.ProfileView;
12
+ cursor?: string;
13
+ followers: AppBskyActorDefs.ProfileView[];
14
+ [k: string]: unknown;
15
+ }
16
+ export type HandlerInput = undefined;
17
+ export interface HandlerSuccess {
18
+ encoding: 'application/json';
19
+ body: OutputSchema;
20
+ headers?: {
21
+ [key: string]: string;
22
+ };
23
+ }
24
+ export interface HandlerError {
25
+ status: number;
26
+ message?: string;
27
+ }
28
+ export type HandlerOutput = HandlerError | HandlerSuccess;
29
+ export type HandlerReqCtx<HA extends HandlerAuth = never> = {
30
+ auth: HA;
31
+ params: QueryParams;
32
+ input: HandlerInput;
33
+ req: express.Request;
34
+ res: express.Response;
35
+ };
36
+ export type Handler<HA extends HandlerAuth = never> = (ctx: HandlerReqCtx<HA>) => Promise<HandlerOutput> | HandlerOutput;
@@ -0,0 +1,36 @@
1
+ import express from 'express';
2
+ import { HandlerAuth } from '@atproto/xrpc-server';
3
+ import * as AppBskyActorDefs from '../actor/defs';
4
+ export interface QueryParams {
5
+ actor: string;
6
+ limit: number;
7
+ cursor?: string;
8
+ }
9
+ export type InputSchema = undefined;
10
+ export interface OutputSchema {
11
+ subject: AppBskyActorDefs.ProfileView;
12
+ cursor?: string;
13
+ follows: AppBskyActorDefs.ProfileView[];
14
+ [k: string]: unknown;
15
+ }
16
+ export type HandlerInput = undefined;
17
+ export interface HandlerSuccess {
18
+ encoding: 'application/json';
19
+ body: OutputSchema;
20
+ headers?: {
21
+ [key: string]: string;
22
+ };
23
+ }
24
+ export interface HandlerError {
25
+ status: number;
26
+ message?: string;
27
+ }
28
+ export type HandlerOutput = HandlerError | HandlerSuccess;
29
+ export type HandlerReqCtx<HA extends HandlerAuth = never> = {
30
+ auth: HA;
31
+ params: QueryParams;
32
+ input: HandlerInput;
33
+ req: express.Request;
34
+ res: express.Response;
35
+ };
36
+ export type Handler<HA extends HandlerAuth = never> = (ctx: HandlerReqCtx<HA>) => Promise<HandlerOutput> | HandlerOutput;
@@ -0,0 +1,36 @@
1
+ import express from 'express';
2
+ import { HandlerAuth } from '@atproto/xrpc-server';
3
+ import * as AppBskyGraphDefs from './defs';
4
+ export interface QueryParams {
5
+ list: string;
6
+ limit: number;
7
+ cursor?: string;
8
+ }
9
+ export type InputSchema = undefined;
10
+ export interface OutputSchema {
11
+ cursor?: string;
12
+ list: AppBskyGraphDefs.ListView;
13
+ items: AppBskyGraphDefs.ListItemView[];
14
+ [k: string]: unknown;
15
+ }
16
+ export type HandlerInput = undefined;
17
+ export interface HandlerSuccess {
18
+ encoding: 'application/json';
19
+ body: OutputSchema;
20
+ headers?: {
21
+ [key: string]: string;
22
+ };
23
+ }
24
+ export interface HandlerError {
25
+ status: number;
26
+ message?: string;
27
+ }
28
+ export type HandlerOutput = HandlerError | HandlerSuccess;
29
+ export type HandlerReqCtx<HA extends HandlerAuth = never> = {
30
+ auth: HA;
31
+ params: QueryParams;
32
+ input: HandlerInput;
33
+ req: express.Request;
34
+ res: express.Response;
35
+ };
36
+ export type Handler<HA extends HandlerAuth = never> = (ctx: HandlerReqCtx<HA>) => Promise<HandlerOutput> | HandlerOutput;
@@ -0,0 +1,34 @@
1
+ import express from 'express';
2
+ import { HandlerAuth } from '@atproto/xrpc-server';
3
+ import * as AppBskyGraphDefs from './defs';
4
+ export interface QueryParams {
5
+ limit: number;
6
+ cursor?: string;
7
+ }
8
+ export type InputSchema = undefined;
9
+ export interface OutputSchema {
10
+ cursor?: string;
11
+ lists: AppBskyGraphDefs.ListView[];
12
+ [k: string]: unknown;
13
+ }
14
+ export type HandlerInput = undefined;
15
+ export interface HandlerSuccess {
16
+ encoding: 'application/json';
17
+ body: OutputSchema;
18
+ headers?: {
19
+ [key: string]: string;
20
+ };
21
+ }
22
+ export interface HandlerError {
23
+ status: number;
24
+ message?: string;
25
+ }
26
+ export type HandlerOutput = HandlerError | HandlerSuccess;
27
+ export type HandlerReqCtx<HA extends HandlerAuth = never> = {
28
+ auth: HA;
29
+ params: QueryParams;
30
+ input: HandlerInput;
31
+ req: express.Request;
32
+ res: express.Response;
33
+ };
34
+ export type Handler<HA extends HandlerAuth = never> = (ctx: HandlerReqCtx<HA>) => Promise<HandlerOutput> | HandlerOutput;
@@ -0,0 +1,34 @@
1
+ import express from 'express';
2
+ import { HandlerAuth } from '@atproto/xrpc-server';
3
+ import * as AppBskyGraphDefs from './defs';
4
+ export interface QueryParams {
5
+ limit: number;
6
+ cursor?: string;
7
+ }
8
+ export type InputSchema = undefined;
9
+ export interface OutputSchema {
10
+ cursor?: string;
11
+ lists: AppBskyGraphDefs.ListView[];
12
+ [k: string]: unknown;
13
+ }
14
+ export type HandlerInput = undefined;
15
+ export interface HandlerSuccess {
16
+ encoding: 'application/json';
17
+ body: OutputSchema;
18
+ headers?: {
19
+ [key: string]: string;
20
+ };
21
+ }
22
+ export interface HandlerError {
23
+ status: number;
24
+ message?: string;
25
+ }
26
+ export type HandlerOutput = HandlerError | HandlerSuccess;
27
+ export type HandlerReqCtx<HA extends HandlerAuth = never> = {
28
+ auth: HA;
29
+ params: QueryParams;
30
+ input: HandlerInput;
31
+ req: express.Request;
32
+ res: express.Response;
33
+ };
34
+ export type Handler<HA extends HandlerAuth = never> = (ctx: HandlerReqCtx<HA>) => Promise<HandlerOutput> | HandlerOutput;
@@ -0,0 +1,35 @@
1
+ import express from 'express';
2
+ import { HandlerAuth } from '@atproto/xrpc-server';
3
+ import * as AppBskyGraphDefs from './defs';
4
+ export interface QueryParams {
5
+ actor: string;
6
+ limit: number;
7
+ cursor?: string;
8
+ }
9
+ export type InputSchema = undefined;
10
+ export interface OutputSchema {
11
+ cursor?: string;
12
+ lists: AppBskyGraphDefs.ListView[];
13
+ [k: string]: unknown;
14
+ }
15
+ export type HandlerInput = undefined;
16
+ export interface HandlerSuccess {
17
+ encoding: 'application/json';
18
+ body: OutputSchema;
19
+ headers?: {
20
+ [key: string]: string;
21
+ };
22
+ }
23
+ export interface HandlerError {
24
+ status: number;
25
+ message?: string;
26
+ }
27
+ export type HandlerOutput = HandlerError | HandlerSuccess;
28
+ export type HandlerReqCtx<HA extends HandlerAuth = never> = {
29
+ auth: HA;
30
+ params: QueryParams;
31
+ input: HandlerInput;
32
+ req: express.Request;
33
+ res: express.Response;
34
+ };
35
+ export type Handler<HA extends HandlerAuth = never> = (ctx: HandlerReqCtx<HA>) => Promise<HandlerOutput> | HandlerOutput;
@@ -0,0 +1,34 @@
1
+ import express from 'express';
2
+ import { HandlerAuth } from '@atproto/xrpc-server';
3
+ import * as AppBskyActorDefs from '../actor/defs';
4
+ export interface QueryParams {
5
+ limit: number;
6
+ cursor?: string;
7
+ }
8
+ export type InputSchema = undefined;
9
+ export interface OutputSchema {
10
+ cursor?: string;
11
+ mutes: AppBskyActorDefs.ProfileView[];
12
+ [k: string]: unknown;
13
+ }
14
+ export type HandlerInput = undefined;
15
+ export interface HandlerSuccess {
16
+ encoding: 'application/json';
17
+ body: OutputSchema;
18
+ headers?: {
19
+ [key: string]: string;
20
+ };
21
+ }
22
+ export interface HandlerError {
23
+ status: number;
24
+ message?: string;
25
+ }
26
+ export type HandlerOutput = HandlerError | HandlerSuccess;
27
+ export type HandlerReqCtx<HA extends HandlerAuth = never> = {
28
+ auth: HA;
29
+ params: QueryParams;
30
+ input: HandlerInput;
31
+ req: express.Request;
32
+ res: express.Response;
33
+ };
34
+ export type Handler<HA extends HandlerAuth = never> = (ctx: HandlerReqCtx<HA>) => Promise<HandlerOutput> | HandlerOutput;
@@ -0,0 +1,32 @@
1
+ import express from 'express';
2
+ import { HandlerAuth } from '@atproto/xrpc-server';
3
+ import * as AppBskyActorDefs from '../actor/defs';
4
+ export interface QueryParams {
5
+ actor: string;
6
+ }
7
+ export type InputSchema = undefined;
8
+ export interface OutputSchema {
9
+ suggestions: AppBskyActorDefs.ProfileView[];
10
+ [k: string]: unknown;
11
+ }
12
+ export type HandlerInput = undefined;
13
+ export interface HandlerSuccess {
14
+ encoding: 'application/json';
15
+ body: OutputSchema;
16
+ headers?: {
17
+ [key: string]: string;
18
+ };
19
+ }
20
+ export interface HandlerError {
21
+ status: number;
22
+ message?: string;
23
+ }
24
+ export type HandlerOutput = HandlerError | HandlerSuccess;
25
+ export type HandlerReqCtx<HA extends HandlerAuth = never> = {
26
+ auth: HA;
27
+ params: QueryParams;
28
+ input: HandlerInput;
29
+ req: express.Request;
30
+ res: express.Response;
31
+ };
32
+ export type Handler<HA extends HandlerAuth = never> = (ctx: HandlerReqCtx<HA>) => Promise<HandlerOutput> | HandlerOutput;
@@ -0,0 +1,19 @@
1
+ import { ValidationResult, BlobRef } from '@atproto/lexicon';
2
+ import * as AppBskyGraphDefs from './defs';
3
+ import * as AppBskyRichtextFacet from '../richtext/facet';
4
+ import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs';
5
+ export interface Record {
6
+ purpose: AppBskyGraphDefs.ListPurpose;
7
+ name: string;
8
+ description?: string;
9
+ descriptionFacets?: AppBskyRichtextFacet.Main[];
10
+ avatar?: BlobRef;
11
+ labels?: ComAtprotoLabelDefs.SelfLabels | {
12
+ $type: string;
13
+ [k: string]: unknown;
14
+ };
15
+ createdAt: string;
16
+ [k: string]: unknown;
17
+ }
18
+ export declare function isRecord(v: unknown): v is Record;
19
+ export declare function validateRecord(v: unknown): ValidationResult;
@@ -0,0 +1,8 @@
1
+ import { ValidationResult } from '@atproto/lexicon';
2
+ export interface Record {
3
+ subject: string;
4
+ createdAt: string;
5
+ [k: string]: unknown;
6
+ }
7
+ export declare function isRecord(v: unknown): v is Record;
8
+ export declare function validateRecord(v: unknown): ValidationResult;
@@ -0,0 +1,9 @@
1
+ import { ValidationResult } from '@atproto/lexicon';
2
+ export interface Record {
3
+ subject: string;
4
+ list: string;
5
+ createdAt: string;
6
+ [k: string]: unknown;
7
+ }
8
+ export declare function isRecord(v: unknown): v is Record;
9
+ export declare function validateRecord(v: unknown): ValidationResult;
@@ -0,0 +1,25 @@
1
+ import express from 'express';
2
+ import { HandlerAuth } from '@atproto/xrpc-server';
3
+ export interface QueryParams {
4
+ }
5
+ export interface InputSchema {
6
+ actor: string;
7
+ [k: string]: unknown;
8
+ }
9
+ export interface HandlerInput {
10
+ encoding: 'application/json';
11
+ body: InputSchema;
12
+ }
13
+ export interface HandlerError {
14
+ status: number;
15
+ message?: string;
16
+ }
17
+ export type HandlerOutput = HandlerError | void;
18
+ export type HandlerReqCtx<HA extends HandlerAuth = never> = {
19
+ auth: HA;
20
+ params: QueryParams;
21
+ input: HandlerInput;
22
+ req: express.Request;
23
+ res: express.Response;
24
+ };
25
+ export type Handler<HA extends HandlerAuth = never> = (ctx: HandlerReqCtx<HA>) => Promise<HandlerOutput> | HandlerOutput;
@@ -0,0 +1,25 @@
1
+ import express from 'express';
2
+ import { HandlerAuth } from '@atproto/xrpc-server';
3
+ export interface QueryParams {
4
+ }
5
+ export interface InputSchema {
6
+ list: string;
7
+ [k: string]: unknown;
8
+ }
9
+ export interface HandlerInput {
10
+ encoding: 'application/json';
11
+ body: InputSchema;
12
+ }
13
+ export interface HandlerError {
14
+ status: number;
15
+ message?: string;
16
+ }
17
+ export type HandlerOutput = HandlerError | void;
18
+ export type HandlerReqCtx<HA extends HandlerAuth = never> = {
19
+ auth: HA;
20
+ params: QueryParams;
21
+ input: HandlerInput;
22
+ req: express.Request;
23
+ res: express.Response;
24
+ };
25
+ export type Handler<HA extends HandlerAuth = never> = (ctx: HandlerReqCtx<HA>) => Promise<HandlerOutput> | HandlerOutput;
@@ -0,0 +1,25 @@
1
+ import express from 'express';
2
+ import { HandlerAuth } from '@atproto/xrpc-server';
3
+ export interface QueryParams {
4
+ }
5
+ export interface InputSchema {
6
+ actor: string;
7
+ [k: string]: unknown;
8
+ }
9
+ export interface HandlerInput {
10
+ encoding: 'application/json';
11
+ body: InputSchema;
12
+ }
13
+ export interface HandlerError {
14
+ status: number;
15
+ message?: string;
16
+ }
17
+ export type HandlerOutput = HandlerError | void;
18
+ export type HandlerReqCtx<HA extends HandlerAuth = never> = {
19
+ auth: HA;
20
+ params: QueryParams;
21
+ input: HandlerInput;
22
+ req: express.Request;
23
+ res: express.Response;
24
+ };
25
+ export type Handler<HA extends HandlerAuth = never> = (ctx: HandlerReqCtx<HA>) => Promise<HandlerOutput> | HandlerOutput;
@@ -0,0 +1,25 @@
1
+ import express from 'express';
2
+ import { HandlerAuth } from '@atproto/xrpc-server';
3
+ export interface QueryParams {
4
+ }
5
+ export interface InputSchema {
6
+ list: string;
7
+ [k: string]: unknown;
8
+ }
9
+ export interface HandlerInput {
10
+ encoding: 'application/json';
11
+ body: InputSchema;
12
+ }
13
+ export interface HandlerError {
14
+ status: number;
15
+ message?: string;
16
+ }
17
+ export type HandlerOutput = HandlerError | void;
18
+ export type HandlerReqCtx<HA extends HandlerAuth = never> = {
19
+ auth: HA;
20
+ params: QueryParams;
21
+ input: HandlerInput;
22
+ req: express.Request;
23
+ res: express.Response;
24
+ };
25
+ export type Handler<HA extends HandlerAuth = never> = (ctx: HandlerReqCtx<HA>) => Promise<HandlerOutput> | HandlerOutput;
@@ -0,0 +1,49 @@
1
+ import { ValidationResult } from '@atproto/lexicon';
2
+ import * as AppBskyActorDefs from '../actor/defs';
3
+ import * as AppBskyRichtextFacet from '../richtext/facet';
4
+ import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs';
5
+ import * as ComAtprotoModerationDefs from '../../../com/atproto/moderation/defs';
6
+ export interface ModServiceView {
7
+ uri: string;
8
+ cid: string;
9
+ creator: AppBskyActorDefs.ProfileView;
10
+ description?: string;
11
+ descriptionFacets?: AppBskyRichtextFacet.Main[];
12
+ likeCount?: number;
13
+ viewer?: ModServiceViewerState;
14
+ indexedAt: string;
15
+ labels?: ComAtprotoLabelDefs.Label[];
16
+ [k: string]: unknown;
17
+ }
18
+ export declare function isModServiceView(v: unknown): v is ModServiceView;
19
+ export declare function validateModServiceView(v: unknown): ValidationResult;
20
+ export interface ModServiceViewDetailed {
21
+ uri: string;
22
+ cid: string;
23
+ creator: AppBskyActorDefs.ProfileView;
24
+ description?: string;
25
+ descriptionFacets?: AppBskyRichtextFacet.Main[];
26
+ policies: ModServicePolicies;
27
+ likeCount?: number;
28
+ viewer?: ModServiceViewerState;
29
+ indexedAt: string;
30
+ labels?: ComAtprotoLabelDefs.Label[];
31
+ [k: string]: unknown;
32
+ }
33
+ export declare function isModServiceViewDetailed(v: unknown): v is ModServiceViewDetailed;
34
+ export declare function validateModServiceViewDetailed(v: unknown): ValidationResult;
35
+ export interface ModServiceViewerState {
36
+ like?: string;
37
+ [k: string]: unknown;
38
+ }
39
+ export declare function isModServiceViewerState(v: unknown): v is ModServiceViewerState;
40
+ export declare function validateModServiceViewerState(v: unknown): ValidationResult;
41
+ export interface ModServicePolicies {
42
+ description?: string;
43
+ descriptionFacets?: AppBskyRichtextFacet.Main[];
44
+ reportReasons: ComAtprotoModerationDefs.ReasonType[];
45
+ labelValues: ComAtprotoLabelDefs.LabelValue[];
46
+ [k: string]: unknown;
47
+ }
48
+ export declare function isModServicePolicies(v: unknown): v is ModServicePolicies;
49
+ export declare function validateModServicePolicies(v: unknown): ValidationResult;
@@ -0,0 +1,29 @@
1
+ import express from 'express';
2
+ import { HandlerAuth } from '@atproto/xrpc-server';
3
+ import * as AppBskyModerationDefs from './defs';
4
+ export interface QueryParams {
5
+ did: string;
6
+ }
7
+ export type InputSchema = undefined;
8
+ export type OutputSchema = AppBskyModerationDefs.ModServiceViewDetailed;
9
+ export type HandlerInput = undefined;
10
+ export interface HandlerSuccess {
11
+ encoding: 'application/json';
12
+ body: OutputSchema;
13
+ headers?: {
14
+ [key: string]: string;
15
+ };
16
+ }
17
+ export interface HandlerError {
18
+ status: number;
19
+ message?: string;
20
+ }
21
+ export type HandlerOutput = HandlerError | HandlerSuccess;
22
+ export type HandlerReqCtx<HA extends HandlerAuth = never> = {
23
+ auth: HA;
24
+ params: QueryParams;
25
+ input: HandlerInput;
26
+ req: express.Request;
27
+ res: express.Response;
28
+ };
29
+ export type Handler<HA extends HandlerAuth = never> = (ctx: HandlerReqCtx<HA>) => Promise<HandlerOutput> | HandlerOutput;