@atproto/pds 0.4.28 → 0.4.30

Sign up to get free protection for your applications and to get access to all the features.
Files changed (347) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/account-manager/helpers/account.d.ts +20 -1
  3. package/dist/account-manager/helpers/account.d.ts.map +1 -1
  4. package/dist/account-manager/helpers/account.js +32 -7
  5. package/dist/account-manager/helpers/account.js.map +1 -1
  6. package/dist/account-manager/index.d.ts +7 -2
  7. package/dist/account-manager/index.d.ts.map +1 -1
  8. package/dist/account-manager/index.js +24 -8
  9. package/dist/account-manager/index.js.map +1 -1
  10. package/dist/api/app/bsky/actor/getPreferences.js +1 -1
  11. package/dist/api/app/bsky/actor/getPreferences.js.map +1 -1
  12. package/dist/api/app/bsky/actor/getProfile.js +1 -1
  13. package/dist/api/app/bsky/actor/getProfile.js.map +1 -1
  14. package/dist/api/app/bsky/actor/getProfiles.js +1 -1
  15. package/dist/api/app/bsky/actor/getProfiles.js.map +1 -1
  16. package/dist/api/app/bsky/actor/putPreferences.js +1 -1
  17. package/dist/api/app/bsky/actor/putPreferences.js.map +1 -1
  18. package/dist/api/app/bsky/feed/getActorLikes.js +1 -1
  19. package/dist/api/app/bsky/feed/getActorLikes.js.map +1 -1
  20. package/dist/api/app/bsky/feed/getAuthorFeed.js +1 -1
  21. package/dist/api/app/bsky/feed/getAuthorFeed.js.map +1 -1
  22. package/dist/api/app/bsky/feed/getFeed.js +1 -1
  23. package/dist/api/app/bsky/feed/getFeed.js.map +1 -1
  24. package/dist/api/app/bsky/feed/getPostThread.js +1 -1
  25. package/dist/api/app/bsky/feed/getPostThread.js.map +1 -1
  26. package/dist/api/app/bsky/feed/getTimeline.js +1 -1
  27. package/dist/api/app/bsky/feed/getTimeline.js.map +1 -1
  28. package/dist/api/app/bsky/notification/registerPush.d.ts.map +1 -1
  29. package/dist/api/app/bsky/notification/registerPush.js +4 -1
  30. package/dist/api/app/bsky/notification/registerPush.js.map +1 -1
  31. package/dist/api/chat/index.js +14 -14
  32. package/dist/api/chat/index.js.map +1 -1
  33. package/dist/api/com/atproto/admin/deleteAccount.d.ts.map +1 -1
  34. package/dist/api/com/atproto/admin/deleteAccount.js +4 -2
  35. package/dist/api/com/atproto/admin/deleteAccount.js.map +1 -1
  36. package/dist/api/com/atproto/admin/getAccountInfo.d.ts.map +1 -1
  37. package/dist/api/com/atproto/admin/getAccountInfo.js +1 -0
  38. package/dist/api/com/atproto/admin/getAccountInfo.js.map +1 -1
  39. package/dist/api/com/atproto/admin/getSubjectStatus.d.ts.map +1 -1
  40. package/dist/api/com/atproto/admin/getSubjectStatus.js +4 -3
  41. package/dist/api/com/atproto/admin/getSubjectStatus.js.map +1 -1
  42. package/dist/api/com/atproto/admin/updateAccountHandle.js +1 -1
  43. package/dist/api/com/atproto/admin/updateAccountHandle.js.map +1 -1
  44. package/dist/api/com/atproto/admin/updateSubjectStatus.d.ts.map +1 -1
  45. package/dist/api/com/atproto/admin/updateSubjectStatus.js +2 -0
  46. package/dist/api/com/atproto/admin/updateSubjectStatus.js.map +1 -1
  47. package/dist/api/com/atproto/identity/getRecommendedDidCredentials.js +1 -1
  48. package/dist/api/com/atproto/identity/getRecommendedDidCredentials.js.map +1 -1
  49. package/dist/api/com/atproto/identity/requestPlcOperationSignature.js +1 -1
  50. package/dist/api/com/atproto/identity/requestPlcOperationSignature.js.map +1 -1
  51. package/dist/api/com/atproto/identity/signPlcOperation.js +1 -1
  52. package/dist/api/com/atproto/identity/signPlcOperation.js.map +1 -1
  53. package/dist/api/com/atproto/identity/submitPlcOperation.d.ts.map +1 -1
  54. package/dist/api/com/atproto/identity/submitPlcOperation.js +1 -1
  55. package/dist/api/com/atproto/identity/submitPlcOperation.js.map +1 -1
  56. package/dist/api/com/atproto/identity/updateHandle.js +2 -2
  57. package/dist/api/com/atproto/identity/updateHandle.js.map +1 -1
  58. package/dist/api/com/atproto/repo/applyWrites.d.ts.map +1 -1
  59. package/dist/api/com/atproto/repo/applyWrites.js +4 -1
  60. package/dist/api/com/atproto/repo/applyWrites.js.map +1 -1
  61. package/dist/api/com/atproto/repo/createRecord.d.ts.map +1 -1
  62. package/dist/api/com/atproto/repo/createRecord.js +4 -1
  63. package/dist/api/com/atproto/repo/createRecord.js.map +1 -1
  64. package/dist/api/com/atproto/repo/deleteRecord.d.ts.map +1 -1
  65. package/dist/api/com/atproto/repo/deleteRecord.js +4 -1
  66. package/dist/api/com/atproto/repo/deleteRecord.js.map +1 -1
  67. package/dist/api/com/atproto/repo/describeRepo.d.ts.map +1 -1
  68. package/dist/api/com/atproto/repo/describeRepo.js +2 -4
  69. package/dist/api/com/atproto/repo/describeRepo.js.map +1 -1
  70. package/dist/api/com/atproto/repo/importRepo.d.ts.map +1 -1
  71. package/dist/api/com/atproto/repo/importRepo.js +3 -1
  72. package/dist/api/com/atproto/repo/importRepo.js.map +1 -1
  73. package/dist/api/com/atproto/repo/listMissingBlobs.js +1 -1
  74. package/dist/api/com/atproto/repo/listMissingBlobs.js.map +1 -1
  75. package/dist/api/com/atproto/repo/putRecord.d.ts.map +1 -1
  76. package/dist/api/com/atproto/repo/putRecord.js +4 -1
  77. package/dist/api/com/atproto/repo/putRecord.js.map +1 -1
  78. package/dist/api/com/atproto/repo/uploadBlob.d.ts.map +1 -1
  79. package/dist/api/com/atproto/repo/uploadBlob.js +3 -1
  80. package/dist/api/com/atproto/repo/uploadBlob.js.map +1 -1
  81. package/dist/api/com/atproto/server/activateAccount.d.ts.map +1 -1
  82. package/dist/api/com/atproto/server/activateAccount.js +3 -2
  83. package/dist/api/com/atproto/server/activateAccount.js.map +1 -1
  84. package/dist/api/com/atproto/server/checkAccountStatus.js +1 -1
  85. package/dist/api/com/atproto/server/checkAccountStatus.js.map +1 -1
  86. package/dist/api/com/atproto/server/confirmEmail.js +1 -1
  87. package/dist/api/com/atproto/server/confirmEmail.js.map +1 -1
  88. package/dist/api/com/atproto/server/createAccount.d.ts.map +1 -1
  89. package/dist/api/com/atproto/server/createAccount.js +4 -2
  90. package/dist/api/com/atproto/server/createAccount.js.map +1 -1
  91. package/dist/api/com/atproto/server/createAppPassword.d.ts.map +1 -1
  92. package/dist/api/com/atproto/server/createAppPassword.js +3 -1
  93. package/dist/api/com/atproto/server/createAppPassword.js.map +1 -1
  94. package/dist/api/com/atproto/server/createSession.d.ts.map +1 -1
  95. package/dist/api/com/atproto/server/createSession.js +2 -0
  96. package/dist/api/com/atproto/server/createSession.js.map +1 -1
  97. package/dist/api/com/atproto/server/deactivateAccount.d.ts.map +1 -1
  98. package/dist/api/com/atproto/server/deactivateAccount.js +3 -1
  99. package/dist/api/com/atproto/server/deactivateAccount.js.map +1 -1
  100. package/dist/api/com/atproto/server/deleteAccount.d.ts.map +1 -1
  101. package/dist/api/com/atproto/server/deleteAccount.js +4 -3
  102. package/dist/api/com/atproto/server/deleteAccount.js.map +1 -1
  103. package/dist/api/com/atproto/server/getAccountInviteCodes.js +1 -1
  104. package/dist/api/com/atproto/server/getAccountInviteCodes.js.map +1 -1
  105. package/dist/api/com/atproto/server/getServiceAuth.js +1 -1
  106. package/dist/api/com/atproto/server/getServiceAuth.js.map +1 -1
  107. package/dist/api/com/atproto/server/getSession.d.ts.map +1 -1
  108. package/dist/api/com/atproto/server/getSession.js +7 -2
  109. package/dist/api/com/atproto/server/getSession.js.map +1 -1
  110. package/dist/api/com/atproto/server/listAppPasswords.js +1 -1
  111. package/dist/api/com/atproto/server/listAppPasswords.js.map +1 -1
  112. package/dist/api/com/atproto/server/refreshSession.d.ts.map +1 -1
  113. package/dist/api/com/atproto/server/refreshSession.js +2 -0
  114. package/dist/api/com/atproto/server/refreshSession.js.map +1 -1
  115. package/dist/api/com/atproto/server/requestAccountDelete.js +1 -1
  116. package/dist/api/com/atproto/server/requestAccountDelete.js.map +1 -1
  117. package/dist/api/com/atproto/server/requestEmailConfirmation.js +1 -1
  118. package/dist/api/com/atproto/server/requestEmailConfirmation.js.map +1 -1
  119. package/dist/api/com/atproto/server/requestEmailUpdate.js +1 -1
  120. package/dist/api/com/atproto/server/requestEmailUpdate.js.map +1 -1
  121. package/dist/api/com/atproto/server/revokeAppPassword.js +1 -1
  122. package/dist/api/com/atproto/server/revokeAppPassword.js.map +1 -1
  123. package/dist/api/com/atproto/server/updateEmail.js +1 -1
  124. package/dist/api/com/atproto/server/updateEmail.js.map +1 -1
  125. package/dist/api/com/atproto/server/util.d.ts +1 -0
  126. package/dist/api/com/atproto/server/util.d.ts.map +1 -1
  127. package/dist/api/com/atproto/server/util.js +9 -6
  128. package/dist/api/com/atproto/server/util.js.map +1 -1
  129. package/dist/api/com/atproto/sync/deprecated/getCheckout.d.ts.map +1 -1
  130. package/dist/api/com/atproto/sync/deprecated/getCheckout.js +2 -8
  131. package/dist/api/com/atproto/sync/deprecated/getCheckout.js.map +1 -1
  132. package/dist/api/com/atproto/sync/deprecated/getHead.d.ts.map +1 -1
  133. package/dist/api/com/atproto/sync/deprecated/getHead.js +2 -7
  134. package/dist/api/com/atproto/sync/deprecated/getHead.js.map +1 -1
  135. package/dist/api/com/atproto/sync/getBlob.d.ts.map +1 -1
  136. package/dist/api/com/atproto/sync/getBlob.js +3 -6
  137. package/dist/api/com/atproto/sync/getBlob.js.map +1 -1
  138. package/dist/api/com/atproto/sync/getBlocks.d.ts.map +1 -1
  139. package/dist/api/com/atproto/sync/getBlocks.js +2 -7
  140. package/dist/api/com/atproto/sync/getBlocks.js.map +1 -1
  141. package/dist/api/com/atproto/sync/getLatestCommit.d.ts.map +1 -1
  142. package/dist/api/com/atproto/sync/getLatestCommit.js +2 -7
  143. package/dist/api/com/atproto/sync/getLatestCommit.js.map +1 -1
  144. package/dist/api/com/atproto/sync/getRecord.d.ts.map +1 -1
  145. package/dist/api/com/atproto/sync/getRecord.js +2 -7
  146. package/dist/api/com/atproto/sync/getRecord.js.map +1 -1
  147. package/dist/api/com/atproto/sync/getRepo.d.ts.map +1 -1
  148. package/dist/api/com/atproto/sync/getRepo.js +2 -7
  149. package/dist/api/com/atproto/sync/getRepo.js.map +1 -1
  150. package/dist/api/com/atproto/sync/getRepoStatus.d.ts +4 -0
  151. package/dist/api/com/atproto/sync/getRepoStatus.d.ts.map +1 -0
  152. package/dist/api/com/atproto/sync/getRepoStatus.js +28 -0
  153. package/dist/api/com/atproto/sync/getRepoStatus.js.map +1 -0
  154. package/dist/api/com/atproto/sync/index.d.ts.map +1 -1
  155. package/dist/api/com/atproto/sync/index.js +2 -0
  156. package/dist/api/com/atproto/sync/index.js.map +1 -1
  157. package/dist/api/com/atproto/sync/listBlobs.d.ts.map +1 -1
  158. package/dist/api/com/atproto/sync/listBlobs.js +2 -8
  159. package/dist/api/com/atproto/sync/listBlobs.js.map +1 -1
  160. package/dist/api/com/atproto/sync/listRepos.d.ts.map +1 -1
  161. package/dist/api/com/atproto/sync/listRepos.js +13 -8
  162. package/dist/api/com/atproto/sync/listRepos.js.map +1 -1
  163. package/dist/api/com/atproto/sync/subscribeRepos.d.ts.map +1 -1
  164. package/dist/api/com/atproto/sync/subscribeRepos.js +8 -0
  165. package/dist/api/com/atproto/sync/subscribeRepos.js.map +1 -1
  166. package/dist/api/com/atproto/sync/util.d.ts +4 -0
  167. package/dist/api/com/atproto/sync/util.d.ts.map +1 -0
  168. package/dist/api/com/atproto/sync/util.js +25 -0
  169. package/dist/api/com/atproto/sync/util.js.map +1 -0
  170. package/dist/api/com/atproto/temp/checkSignupQueue.d.ts.map +1 -1
  171. package/dist/api/com/atproto/temp/checkSignupQueue.js +4 -1
  172. package/dist/api/com/atproto/temp/checkSignupQueue.js.map +1 -1
  173. package/dist/auth-verifier.d.ts +13 -7
  174. package/dist/auth-verifier.d.ts.map +1 -1
  175. package/dist/auth-verifier.js +29 -46
  176. package/dist/auth-verifier.js.map +1 -1
  177. package/dist/index.d.ts +1 -0
  178. package/dist/index.d.ts.map +1 -1
  179. package/dist/index.js +3 -1
  180. package/dist/index.js.map +1 -1
  181. package/dist/lexicon/index.d.ts +2 -0
  182. package/dist/lexicon/index.d.ts.map +1 -1
  183. package/dist/lexicon/index.js +4 -0
  184. package/dist/lexicon/index.js.map +1 -1
  185. package/dist/lexicon/lexicons.d.ts +145 -0
  186. package/dist/lexicon/lexicons.d.ts.map +1 -1
  187. package/dist/lexicon/lexicons.js +225 -4
  188. package/dist/lexicon/lexicons.js.map +1 -1
  189. package/dist/lexicon/types/chat/bsky/convo/defs.d.ts +1 -1
  190. package/dist/lexicon/types/com/atproto/admin/defs.d.ts +1 -0
  191. package/dist/lexicon/types/com/atproto/admin/defs.d.ts.map +1 -1
  192. package/dist/lexicon/types/com/atproto/admin/defs.js.map +1 -1
  193. package/dist/lexicon/types/com/atproto/admin/getSubjectStatus.d.ts +1 -0
  194. package/dist/lexicon/types/com/atproto/admin/getSubjectStatus.d.ts.map +1 -1
  195. package/dist/lexicon/types/com/atproto/server/createSession.d.ts +3 -0
  196. package/dist/lexicon/types/com/atproto/server/createSession.d.ts.map +1 -1
  197. package/dist/lexicon/types/com/atproto/server/getSession.d.ts +3 -0
  198. package/dist/lexicon/types/com/atproto/server/getSession.d.ts.map +1 -1
  199. package/dist/lexicon/types/com/atproto/server/refreshSession.d.ts +3 -0
  200. package/dist/lexicon/types/com/atproto/server/refreshSession.d.ts.map +1 -1
  201. package/dist/lexicon/types/com/atproto/sync/getBlob.d.ts +1 -0
  202. package/dist/lexicon/types/com/atproto/sync/getBlob.d.ts.map +1 -1
  203. package/dist/lexicon/types/com/atproto/sync/getBlocks.d.ts +1 -0
  204. package/dist/lexicon/types/com/atproto/sync/getBlocks.d.ts.map +1 -1
  205. package/dist/lexicon/types/com/atproto/sync/getLatestCommit.d.ts +1 -1
  206. package/dist/lexicon/types/com/atproto/sync/getLatestCommit.d.ts.map +1 -1
  207. package/dist/lexicon/types/com/atproto/sync/getRecord.d.ts +1 -0
  208. package/dist/lexicon/types/com/atproto/sync/getRecord.d.ts.map +1 -1
  209. package/dist/lexicon/types/com/atproto/sync/getRepo.d.ts +1 -0
  210. package/dist/lexicon/types/com/atproto/sync/getRepo.d.ts.map +1 -1
  211. package/dist/lexicon/types/com/atproto/sync/getRepoStatus.d.ts +42 -0
  212. package/dist/lexicon/types/com/atproto/sync/getRepoStatus.d.ts.map +1 -0
  213. package/dist/lexicon/types/com/atproto/sync/getRepoStatus.js +3 -0
  214. package/dist/lexicon/types/com/atproto/sync/getRepoStatus.js.map +1 -0
  215. package/dist/lexicon/types/com/atproto/sync/listBlobs.d.ts +1 -0
  216. package/dist/lexicon/types/com/atproto/sync/listBlobs.d.ts.map +1 -1
  217. package/dist/lexicon/types/com/atproto/sync/listRepos.d.ts +3 -0
  218. package/dist/lexicon/types/com/atproto/sync/listRepos.d.ts.map +1 -1
  219. package/dist/lexicon/types/com/atproto/sync/listRepos.js.map +1 -1
  220. package/dist/lexicon/types/com/atproto/sync/subscribeRepos.d.ts +19 -4
  221. package/dist/lexicon/types/com/atproto/sync/subscribeRepos.d.ts.map +1 -1
  222. package/dist/lexicon/types/com/atproto/sync/subscribeRepos.js +11 -1
  223. package/dist/lexicon/types/com/atproto/sync/subscribeRepos.js.map +1 -1
  224. package/dist/lexicon/types/tools/ozone/moderation/defs.d.ts +2 -0
  225. package/dist/lexicon/types/tools/ozone/moderation/defs.d.ts.map +1 -1
  226. package/dist/lexicon/types/tools/ozone/moderation/defs.js.map +1 -1
  227. package/dist/pipethrough.d.ts.map +1 -1
  228. package/dist/pipethrough.js +17 -14
  229. package/dist/pipethrough.js.map +1 -1
  230. package/dist/scripts/index.d.ts +4 -0
  231. package/dist/scripts/index.d.ts.map +1 -0
  232. package/dist/scripts/index.js +8 -0
  233. package/dist/scripts/index.js.map +1 -0
  234. package/dist/scripts/rebuild-repo.d.ts +3 -0
  235. package/dist/scripts/rebuild-repo.d.ts.map +1 -0
  236. package/dist/scripts/rebuild-repo.js +121 -0
  237. package/dist/scripts/rebuild-repo.js.map +1 -0
  238. package/dist/sequencer/db/schema.d.ts +1 -1
  239. package/dist/sequencer/db/schema.d.ts.map +1 -1
  240. package/dist/sequencer/events.d.ts +27 -2
  241. package/dist/sequencer/events.d.ts.map +1 -1
  242. package/dist/sequencer/events.js +35 -2
  243. package/dist/sequencer/events.js.map +1 -1
  244. package/dist/sequencer/sequencer.d.ts +8 -6
  245. package/dist/sequencer/sequencer.d.ts.map +1 -1
  246. package/dist/sequencer/sequencer.js +22 -9
  247. package/dist/sequencer/sequencer.js.map +1 -1
  248. package/package.json +4 -4
  249. package/src/account-manager/helpers/account.ts +38 -6
  250. package/src/account-manager/index.ts +21 -8
  251. package/src/api/app/bsky/actor/getPreferences.ts +1 -1
  252. package/src/api/app/bsky/actor/getProfile.ts +1 -1
  253. package/src/api/app/bsky/actor/getProfiles.ts +1 -1
  254. package/src/api/app/bsky/actor/putPreferences.ts +1 -1
  255. package/src/api/app/bsky/feed/getActorLikes.ts +1 -1
  256. package/src/api/app/bsky/feed/getAuthorFeed.ts +1 -1
  257. package/src/api/app/bsky/feed/getFeed.ts +1 -1
  258. package/src/api/app/bsky/feed/getPostThread.ts +1 -1
  259. package/src/api/app/bsky/feed/getTimeline.ts +1 -1
  260. package/src/api/app/bsky/notification/registerPush.ts +4 -1
  261. package/src/api/chat/index.ts +14 -14
  262. package/src/api/com/atproto/admin/deleteAccount.ts +7 -2
  263. package/src/api/com/atproto/admin/getAccountInfo.ts +1 -0
  264. package/src/api/com/atproto/admin/getSubjectStatus.ts +4 -3
  265. package/src/api/com/atproto/admin/updateAccountHandle.ts +1 -1
  266. package/src/api/com/atproto/admin/updateSubjectStatus.ts +2 -0
  267. package/src/api/com/atproto/identity/getRecommendedDidCredentials.ts +1 -1
  268. package/src/api/com/atproto/identity/requestPlcOperationSignature.ts +1 -1
  269. package/src/api/com/atproto/identity/signPlcOperation.ts +1 -1
  270. package/src/api/com/atproto/identity/submitPlcOperation.ts +2 -1
  271. package/src/api/com/atproto/identity/updateHandle.ts +2 -2
  272. package/src/api/com/atproto/repo/applyWrites.ts +4 -1
  273. package/src/api/com/atproto/repo/createRecord.ts +4 -1
  274. package/src/api/com/atproto/repo/deleteRecord.ts +4 -1
  275. package/src/api/com/atproto/repo/describeRepo.ts +2 -4
  276. package/src/api/com/atproto/repo/importRepo.ts +3 -1
  277. package/src/api/com/atproto/repo/listMissingBlobs.ts +1 -1
  278. package/src/api/com/atproto/repo/putRecord.ts +4 -1
  279. package/src/api/com/atproto/repo/uploadBlob.ts +3 -1
  280. package/src/api/com/atproto/server/activateAccount.ts +3 -2
  281. package/src/api/com/atproto/server/checkAccountStatus.ts +1 -1
  282. package/src/api/com/atproto/server/confirmEmail.ts +1 -1
  283. package/src/api/com/atproto/server/createAccount.ts +6 -3
  284. package/src/api/com/atproto/server/createAppPassword.ts +3 -1
  285. package/src/api/com/atproto/server/createSession.ts +2 -0
  286. package/src/api/com/atproto/server/deactivateAccount.ts +3 -1
  287. package/src/api/com/atproto/server/deleteAccount.ts +7 -3
  288. package/src/api/com/atproto/server/getAccountInviteCodes.ts +1 -1
  289. package/src/api/com/atproto/server/getServiceAuth.ts +1 -1
  290. package/src/api/com/atproto/server/getSession.ts +7 -2
  291. package/src/api/com/atproto/server/listAppPasswords.ts +1 -1
  292. package/src/api/com/atproto/server/refreshSession.ts +2 -0
  293. package/src/api/com/atproto/server/requestAccountDelete.ts +1 -1
  294. package/src/api/com/atproto/server/requestEmailConfirmation.ts +1 -1
  295. package/src/api/com/atproto/server/requestEmailUpdate.ts +1 -1
  296. package/src/api/com/atproto/server/revokeAppPassword.ts +1 -1
  297. package/src/api/com/atproto/server/updateEmail.ts +1 -1
  298. package/src/api/com/atproto/server/util.ts +12 -5
  299. package/src/api/com/atproto/sync/deprecated/getCheckout.ts +6 -8
  300. package/src/api/com/atproto/sync/deprecated/getHead.ts +7 -10
  301. package/src/api/com/atproto/sync/getBlob.ts +8 -6
  302. package/src/api/com/atproto/sync/getBlocks.ts +6 -7
  303. package/src/api/com/atproto/sync/getLatestCommit.ts +7 -10
  304. package/src/api/com/atproto/sync/getRecord.ts +7 -7
  305. package/src/api/com/atproto/sync/getRepo.ts +6 -7
  306. package/src/api/com/atproto/sync/getRepoStatus.ts +31 -0
  307. package/src/api/com/atproto/sync/index.ts +2 -0
  308. package/src/api/com/atproto/sync/listBlobs.ts +6 -8
  309. package/src/api/com/atproto/sync/listRepos.ts +13 -8
  310. package/src/api/com/atproto/sync/subscribeRepos.ts +7 -0
  311. package/src/api/com/atproto/sync/util.ts +36 -0
  312. package/src/api/com/atproto/temp/checkSignupQueue.ts +4 -1
  313. package/src/auth-verifier.ts +62 -47
  314. package/src/index.ts +1 -0
  315. package/src/lexicon/index.ts +12 -0
  316. package/src/lexicon/lexicons.ts +236 -7
  317. package/src/lexicon/types/chat/bsky/convo/defs.ts +1 -1
  318. package/src/lexicon/types/com/atproto/admin/defs.ts +1 -0
  319. package/src/lexicon/types/com/atproto/admin/getSubjectStatus.ts +1 -0
  320. package/src/lexicon/types/com/atproto/server/createSession.ts +3 -0
  321. package/src/lexicon/types/com/atproto/server/getSession.ts +3 -0
  322. package/src/lexicon/types/com/atproto/server/refreshSession.ts +3 -0
  323. package/src/lexicon/types/com/atproto/sync/getBlob.ts +6 -0
  324. package/src/lexicon/types/com/atproto/sync/getBlocks.ts +6 -0
  325. package/src/lexicon/types/com/atproto/sync/getLatestCommit.ts +1 -1
  326. package/src/lexicon/types/com/atproto/sync/getRecord.ts +6 -0
  327. package/src/lexicon/types/com/atproto/sync/getRepo.ts +1 -0
  328. package/src/lexicon/types/com/atproto/sync/getRepoStatus.ts +52 -0
  329. package/src/lexicon/types/com/atproto/sync/listBlobs.ts +1 -0
  330. package/src/lexicon/types/com/atproto/sync/listRepos.ts +3 -0
  331. package/src/lexicon/types/com/atproto/sync/subscribeRepos.ts +30 -3
  332. package/src/lexicon/types/tools/ozone/moderation/defs.ts +2 -0
  333. package/src/pipethrough.ts +5 -4
  334. package/src/scripts/index.ts +5 -0
  335. package/src/scripts/rebuild-repo.ts +143 -0
  336. package/src/sequencer/db/schema.ts +1 -0
  337. package/src/sequencer/events.ts +47 -0
  338. package/src/sequencer/sequencer.ts +35 -14
  339. package/tests/account-deactivation.test.ts +67 -12
  340. package/tests/account-deletion.test.ts +10 -2
  341. package/tests/auth.test.ts +3 -0
  342. package/tests/moderation.test.ts +2 -2
  343. package/tests/proxied/notif.test.ts +1 -0
  344. package/tests/sequencer.test.ts +2 -2
  345. package/tests/sync/list.test.ts +1 -0
  346. package/tests/sync/subscribe-repos.test.ts +224 -40
  347. package/tests/sync/sync.test.ts +48 -4
@@ -9,7 +9,7 @@ const proxy_1 = require("../../../proxy");
9
9
  const account_1 = require("../../../../account-manager/helpers/account");
10
10
  function default_1(server, ctx) {
11
11
  server.com.atproto.server.updateEmail({
12
- auth: ctx.authVerifier.accessFull,
12
+ auth: ctx.authVerifier.accessFull({ checkTakedown: true }),
13
13
  handler: async ({ auth, input, req }) => {
14
14
  const did = auth.credentials.did;
15
15
  const { token, email } = input.body;
@@ -1 +1 @@
1
- {"version":3,"file":"updateEmail.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/server/updateEmail.ts"],"names":[],"mappings":";;;;;AAAA,wEAAyC;AACzC,sDAA0D;AAG1D,0CAA6C;AAC7C,yEAAoF;AAEpF,mBAAyB,MAAc,EAAE,GAAe;IACtD,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,WAAW,CAAC;QACpC,IAAI,EAAE,GAAG,CAAC,YAAY,CAAC,UAAU;QACjC,OAAO,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE,EAAE;YACtC,MAAM,GAAG,GAAG,IAAI,CAAC,WAAW,CAAC,GAAG,CAAA;YAChC,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC,IAAI,CAAA;YACnC,IAAI,CAAC,0BAAU,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;gBAChC,MAAM,IAAI,iCAAmB,CAC3B,oEAAoE,CACrE,CAAA;YACH,CAAC;YACD,MAAM,OAAO,GAAG,MAAM,GAAG,CAAC,cAAc,CAAC,UAAU,CAAC,GAAG,EAAE;gBACvD,kBAAkB,EAAE,IAAI;aACzB,CAAC,CAAA;YACF,IAAI,CAAC,OAAO,EAAE,CAAC;gBACb,MAAM,IAAI,iCAAmB,CAAC,mBAAmB,CAAC,CAAA;YACpD,CAAC;YAED,IAAI,GAAG,CAAC,aAAa,EAAE,CAAC;gBACtB,MAAM,GAAG,CAAC,aAAa,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,WAAW,CACpD,KAAK,CAAC,IAAI,EACV,IAAA,oBAAY,EAAC,GAAG,EAAE,IAAI,CAAC,CACxB,CAAA;gBACD,OAAM;YACR,CAAC;YAED,oDAAoD;YACpD,IAAI,OAAO,CAAC,gBAAgB,EAAE,CAAC;gBAC7B,IAAI,CAAC,KAAK,EAAE,CAAC;oBACX,MAAM,IAAI,iCAAmB,CAC3B,6BAA6B,EAC7B,eAAe,CAChB,CAAA;gBACH,CAAC;gBACD,MAAM,GAAG,CAAC,cAAc,CAAC,qBAAqB,CAC5C,GAAG,EACH,cAAc,EACd,KAAK,CACN,CAAA;YACH,CAAC;YAED,IAAI,CAAC;gBACH,MAAM,GAAG,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC,CAAA;YACtD,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACb,IAAI,GAAG,YAAY,gCAAsB,EAAE,CAAC;oBAC1C,MAAM,IAAI,iCAAmB,CAC3B,qEAAqE,CACtE,CAAA;gBACH,CAAC;qBAAM,CAAC;oBACN,MAAM,GAAG,CAAA;gBACX,CAAC;YACH,CAAC;QACH,CAAC;KACF,CAAC,CAAA;AACJ,CAAC;AAtDD,4BAsDC"}
1
+ {"version":3,"file":"updateEmail.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/server/updateEmail.ts"],"names":[],"mappings":";;;;;AAAA,wEAAyC;AACzC,sDAA0D;AAG1D,0CAA6C;AAC7C,yEAAoF;AAEpF,mBAAyB,MAAc,EAAE,GAAe;IACtD,MAAM,CAAC,GAAG,CAA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AAM,GAAG,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC,CAAA;YACtD,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACb,IAAI,GAAG,YAAY,gCAAsB,EAAE,CAAC;oBAC1C,MAAM,IAAI,iCAAmB,CAC3B,qEAAqE,CACtE,CAAA;gBACH,CAAC;qBAAM,CAAC;oBACN,MAAM,GAAG,CAAA;gBACX,CAAC;YACH,CAAC;QACH,CAAC;KACF,CAAC,CAAA;AACJ,CAAC;AAtDD,4BAsDC"}
@@ -4,6 +4,7 @@ import AppContext from '../../../../context';
4
4
  export declare const genInvCode: (cfg: ServerConfig) => string;
5
5
  export declare const genInvCodes: (cfg: ServerConfig, count: number) => string[];
6
6
  export declare const getRandomToken: () => string;
7
+ export declare const safeResolveDidDoc: (ctx: AppContext, did: string, forceRefresh?: boolean) => Promise<DidDocument | undefined>;
7
8
  export declare const didDocForSession: (ctx: AppContext, did: string, forceRefresh?: boolean) => Promise<DidDocument | undefined>;
8
9
  export declare const isValidDidDocForService: (ctx: AppContext, did: string) => Promise<boolean>;
9
10
  export declare const assertValidDidDocumentForService: (ctx: AppContext, did: string) => Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/server/util.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACjD,OAAO,UAAU,MAAM,qBAAqB,CAAA;AAS5C,eAAO,MAAM,UAAU,QAAS,YAAY,KAAG,MAE9C,CAAA;AAED,eAAO,MAAM,WAAW,QAAS,YAAY,SAAS,MAAM,KAAG,MAAM,EAMpE,CAAA;AAGD,eAAO,MAAM,cAAc,cAG1B,CAAA;AAGD,eAAO,MAAM,gBAAgB,QACtB,UAAU,OACV,MAAM,iBACI,OAAO,KACrB,QAAQ,WAAW,GAAG,SAAS,CAQjC,CAAA;AAED,eAAO,MAAM,uBAAuB,QAC7B,UAAU,OACV,MAAM,KACV,QAAQ,OAAO,CAOjB,CAAA;AAED,eAAO,MAAM,gCAAgC,QACtC,UAAU,OACV,MAAM,kBAmBZ,CAAA"}
1
+ {"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/server/util.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACjD,OAAO,UAAU,MAAM,qBAAqB,CAAA;AAS5C,eAAO,MAAM,UAAU,QAAS,YAAY,KAAG,MAE9C,CAAA;AAED,eAAO,MAAM,WAAW,QAAS,YAAY,SAAS,MAAM,KAAG,MAAM,EAMpE,CAAA;AAGD,eAAO,MAAM,cAAc,cAG1B,CAAA;AAED,eAAO,MAAM,iBAAiB,QACvB,UAAU,OACV,MAAM,iBACI,OAAO,KACrB,QAAQ,WAAW,GAAG,SAAS,CAOjC,CAAA;AAED,eAAO,MAAM,gBAAgB,QACtB,UAAU,OACV,MAAM,iBACI,OAAO,KACrB,QAAQ,WAAW,GAAG,SAAS,CAGjC,CAAA;AAED,eAAO,MAAM,uBAAuB,QAC7B,UAAU,OACV,MAAM,KACV,QAAQ,OAAO,CAOjB,CAAA;AAED,eAAO,MAAM,gCAAgC,QACtC,UAAU,OACV,MAAM,kBAmBZ,CAAA"}
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.assertValidDidDocumentForService = exports.isValidDidDocForService = exports.didDocForSession = exports.getRandomToken = exports.genInvCodes = exports.genInvCode = void 0;
26
+ exports.assertValidDidDocumentForService = exports.isValidDidDocForService = exports.didDocForSession = exports.safeResolveDidDoc = exports.getRandomToken = exports.genInvCodes = exports.genInvCode = void 0;
27
27
  const crypto = __importStar(require("@atproto/crypto"));
28
28
  const logger_1 = require("../../../../logger");
29
29
  const xrpc_server_1 = require("@atproto/xrpc-server");
@@ -50,18 +50,21 @@ const getRandomToken = () => {
50
50
  return token.slice(0, 5) + '-' + token.slice(5, 10);
51
51
  };
52
52
  exports.getRandomToken = getRandomToken;
53
- // @TODO once supporting multiple pdses, validate pds in did doc based on allow-list.
54
- const didDocForSession = async (ctx, did, forceRefresh) => {
55
- if (!ctx.cfg.identity.enableDidDocWithSession)
56
- return;
53
+ const safeResolveDidDoc = async (ctx, did, forceRefresh) => {
57
54
  try {
58
55
  const didDoc = await ctx.idResolver.did.resolve(did, forceRefresh);
59
56
  return didDoc ?? undefined;
60
57
  }
61
58
  catch (err) {
62
- logger_1.dbLogger.warn({ err, did }, 'failed to resolve did doc');
59
+ logger_1.httpLogger.warn({ err, did }, 'failed to resolve did doc');
63
60
  }
64
61
  };
62
+ exports.safeResolveDidDoc = safeResolveDidDoc;
63
+ const didDocForSession = async (ctx, did, forceRefresh) => {
64
+ if (!ctx.cfg.identity.enableDidDocWithSession)
65
+ return;
66
+ return (0, exports.safeResolveDidDoc)(ctx, did, forceRefresh);
67
+ };
65
68
  exports.didDocForSession = didDocForSession;
66
69
  const isValidDidDocForService = async (ctx, did) => {
67
70
  try {
@@ -1 +1 @@
1
- {"version":3,"file":"util.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/server/util.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wDAAyC;AAIzC,+CAA6C;AAC7C,sDAA0D;AAC1D,4CAAkE;AAElE,mDAAmD;AACnD,gEAAgE;AAChE,4BAA4B;AAC5B,0CAA0C;AACnC,MAAM,UAAU,GAAG,CAAC,GAAiB,EAAU,EAAE;IACtD,OAAO,GAAG,CAAC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,GAAG,GAAG,IAAA,sBAAc,GAAE,CAAA;AAC3E,CAAC,CAA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QAqBvD"}
1
+ {"version":3,"file":"getCheckout.d.ts","sourceRoot":"","sources":["../../../../../../src/api/com/atproto/sync/deprecated/getCheckout.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAC/C,OAAO,UAAU,MAAM,wBAAwB,CAAA;AAI/C,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QAmBvD"}
@@ -1,19 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const xrpc_server_1 = require("@atproto/xrpc-server");
4
3
  const getRepo_1 = require("../getRepo");
4
+ const util_1 = require("../util");
5
5
  function default_1(server, ctx) {
6
6
  server.com.atproto.sync.getCheckout({
7
7
  auth: ctx.authVerifier.optionalAccessOrAdminToken,
8
8
  handler: async ({ params, auth }) => {
9
9
  const { did } = params;
10
- // takedown check for anyone other than an admin or the user
11
- if (!ctx.authVerifier.isUserOrAdmin(auth, did)) {
12
- const available = await ctx.accountManager.isRepoAvailable(did);
13
- if (!available) {
14
- throw new xrpc_server_1.InvalidRequestError(`Could not find repo for DID: ${did}`);
15
- }
16
- }
10
+ await (0, util_1.assertRepoAvailability)(ctx, did, ctx.authVerifier.isUserOrAdmin(auth, did));
17
11
  const carStream = await (0, getRepo_1.getCarStream)(ctx, did);
18
12
  return {
19
13
  encoding: 'application/vnd.ipld.car',
@@ -1 +1 @@
1
- {"version":3,"file":"getCheckout.js","sourceRoot":"","sources":["../../../../../../src/api/com/atproto/sync/deprecated/getCheckout.ts"],"names":[],"mappings":";;AAAA,sDAA0D;AAG1D,wCAAyC;AAEzC,mBAAyB,MAAc,EAAE,GAAe;IACtD,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC;QAClC,IAAI,EAAE,GAAG,CAAC,YAAY,CAAC,0BAA0B;QACjD,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE;YAClC,MAAM,EAAE,GAAG,EAAE,GAAG,MAAM,CAAA;YACtB,4DAA4D;YAC5D,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,aAAa,CAAC,IAAI,EAAE,GAAG,CAAC,EAAE,CAAC;gBAC/C,MAAM,SAAS,GAAG,MAAM,GAAG,CAAC,cAAc,CAAC,eAAe,CAAC,GAAG,CAAC,CAAA;gBAC/D,IAAI,CAAC,SAAS,EAAE,CAAC;oBACf,MAAM,IAAI,iCAAmB,CAAC,gCAAgC,GAAG,EAAE,CAAC,CAAA;gBACtE,CAAC;YACH,CAAC;YAED,MAAM,SAAS,GAAG,MAAM,IAAA,sBAAY,EAAC,GAAG,EAAE,GAAG,CAAC,CAAA;YAE9C,OAAO;gBACL,QAAQ,EAAE,0BAA0B;gBACpC,IAAI,EAAE,SAAS;aAChB,CAAA;QACH,CAAC;KACF,CAAC,CAAA;AACJ,CAAC;AArBD,4BAqBC"}
1
+ {"version":3,"file":"getCheckout.js","sourceRoot":"","sources":["../../../../../../src/api/com/atproto/sync/deprecated/getCheckout.ts"],"names":[],"mappings":";;AAEA,wCAAyC;AACzC,kCAAgD;AAEhD,mBAAyB,MAAc,EAAE,GAAe;IACtD,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC;QAClC,IAAI,EAAE,GAAG,CAAC,YAAY,CAAC,0BAA0B;QACjD,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE;YAClC,MAAM,EAAE,GAAG,EAAE,GAAG,MAAM,CAAA;YACtB,MAAM,IAAA,6BAAsB,EAC1B,GAAG,EACH,GAAG,EACH,GAAG,CAAC,YAAY,CAAC,aAAa,CAAC,IAAI,EAAE,GAAG,CAAC,CAC1C,CAAA;YAED,MAAM,SAAS,GAAG,MAAM,IAAA,sBAAY,EAAC,GAAG,EAAE,GAAG,CAAC,CAAA;YAE9C,OAAO;gBACL,QAAQ,EAAE,0BAA0B;gBACpC,IAAI,EAAE,SAAS;aAChB,CAAA;QACH,CAAC;KACF,CAAC,CAAA;AACJ,CAAC;AAnBD,4BAmBC"}
@@ -1 +1 @@
1
- {"version":3,"file":"getHead.d.ts","sourceRoot":"","sources":["../../../../../../src/api/com/atproto/sync/deprecated/getHead.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAC/C,OAAO,UAAU,MAAM,wBAAwB,CAAA;AAE/C,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QA8BvD"}
1
+ {"version":3,"file":"getHead.d.ts","sourceRoot":"","sources":["../../../../../../src/api/com/atproto/sync/deprecated/getHead.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAC/C,OAAO,UAAU,MAAM,wBAAwB,CAAA;AAG/C,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QA0BvD"}
@@ -1,18 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const xrpc_server_1 = require("@atproto/xrpc-server");
4
+ const util_1 = require("../util");
4
5
  function default_1(server, ctx) {
5
6
  server.com.atproto.sync.getHead({
6
7
  auth: ctx.authVerifier.optionalAccessOrAdminToken,
7
8
  handler: async ({ params, auth }) => {
8
9
  const { did } = params;
9
- // takedown check for anyone other than an admin or the user
10
- if (!ctx.authVerifier.isUserOrAdmin(auth, did)) {
11
- const available = await ctx.accountManager.isRepoAvailable(did);
12
- if (!available) {
13
- throw new xrpc_server_1.InvalidRequestError(`Could not find root for DID: ${did}`, 'HeadNotFound');
14
- }
15
- }
10
+ await (0, util_1.assertRepoAvailability)(ctx, did, ctx.authVerifier.isUserOrAdmin(auth, did));
16
11
  const root = await ctx.actorStore.read(did, (store) => store.repo.storage.getRoot());
17
12
  if (root === null) {
18
13
  throw new xrpc_server_1.InvalidRequestError(`Could not find root for DID: ${did}`, 'HeadNotFound');
@@ -1 +1 @@
1
- {"version":3,"file":"getHead.js","sourceRoot":"","sources":["../../../../../../src/api/com/atproto/sync/deprecated/getHead.ts"],"names":[],"mappings":";;AAAA,sDAA0D;AAI1D,mBAAyB,MAAc,EAAE,GAAe;IACtD,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC;QAC9B,IAAI,EAAE,GAAG,CAAC,YAAY,CAAC,0BAA0B;QACjD,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE;YAClC,MAAM,EAAE,GAAG,EAAE,GAAG,MAAM,CAAA;YACtB,4DAA4D;YAC5D,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,aAAa,CAAC,IAAI,EAAE,GAAG,CAAC,EAAE,CAAC;gBAC/C,MAAM,SAAS,GAAG,MAAM,GAAG,CAAC,cAAc,CAAC,eAAe,CAAC,GAAG,CAAC,CAAA;gBAC/D,IAAI,CAAC,SAAS,EAAE,CAAC;oBACf,MAAM,IAAI,iCAAmB,CAC3B,gCAAgC,GAAG,EAAE,EACrC,cAAc,CACf,CAAA;gBACH,CAAC;YACH,CAAC;YACD,MAAM,IAAI,GAAG,MAAM,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,KAAK,EAAE,EAAE,CACpD,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,CAC7B,CAAA;YACD,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;gBAClB,MAAM,IAAI,iCAAmB,CAC3B,gCAAgC,GAAG,EAAE,EACrC,cAAc,CACf,CAAA;YACH,CAAC;YACD,OAAO;gBACL,QAAQ,EAAE,kBAAkB;gBAC5B,IAAI,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE,EAAE;aAChC,CAAA;QACH,CAAC;KACF,CAAC,CAAA;AACJ,CAAC;AA9BD,4BA8BC"}
1
+ {"version":3,"file":"getHead.js","sourceRoot":"","sources":["../../../../../../src/api/com/atproto/sync/deprecated/getHead.ts"],"names":[],"mappings":";;AAAA,sDAA0D;AAG1D,kCAAgD;AAEhD,mBAAyB,MAAc,EAAE,GAAe;IACtD,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC;QAC9B,IAAI,EAAE,GAAG,CAAC,YAAY,CAAC,0BAA0B;QACjD,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE;YAClC,MAAM,EAAE,GAAG,EAAE,GAAG,MAAM,CAAA;YACtB,MAAM,IAAA,6BAAsB,EAC1B,GAAG,EACH,GAAG,EACH,GAAG,CAAC,YAAY,CAAC,aAAa,CAAC,IAAI,EAAE,GAAG,CAAC,CAC1C,CAAA;YAED,MAAM,IAAI,GAAG,MAAM,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,KAAK,EAAE,EAAE,CACpD,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,CAC7B,CAAA;YACD,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;gBAClB,MAAM,IAAI,iCAAmB,CAC3B,gCAAgC,GAAG,EAAE,EACrC,cAAc,CACf,CAAA;YACH,CAAC;YACD,OAAO;gBACL,QAAQ,EAAE,kBAAkB;gBAC5B,IAAI,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE,EAAE;aAChC,CAAA;QACH,CAAC;KACF,CAAC,CAAA;AACJ,CAAC;AA1BD,4BA0BC"}
@@ -1 +1 @@
1
- {"version":3,"file":"getBlob.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/sync/getBlob.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAC5C,OAAO,UAAU,MAAM,qBAAqB,CAAA;AAI5C,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QAmCvD"}
1
+ {"version":3,"file":"getBlob.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/sync/getBlob.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAC5C,OAAO,UAAU,MAAM,qBAAqB,CAAA;AAK5C,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QAoCvD"}
@@ -3,16 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const cid_1 = require("multiformats/cid");
4
4
  const xrpc_server_1 = require("@atproto/xrpc-server");
5
5
  const repo_1 = require("@atproto/repo");
6
+ const util_1 = require("./util");
6
7
  function default_1(server, ctx) {
7
8
  server.com.atproto.sync.getBlob({
8
9
  auth: ctx.authVerifier.optionalAccessOrAdminToken,
9
10
  handler: async ({ params, res, auth }) => {
10
- if (!ctx.authVerifier.isUserOrAdmin(auth, params.did)) {
11
- const available = await ctx.accountManager.isRepoAvailable(params.did);
12
- if (!available) {
13
- throw new xrpc_server_1.InvalidRequestError('Blob not found');
14
- }
15
- }
11
+ const { did } = params;
12
+ await (0, util_1.assertRepoAvailability)(ctx, did, ctx.authVerifier.isUserOrAdmin(auth, did));
16
13
  const cid = cid_1.CID.parse(params.cid);
17
14
  const found = await ctx.actorStore.read(params.did, async (store) => {
18
15
  try {
@@ -1 +1 @@
1
- {"version":3,"file":"getBlob.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/sync/getBlob.ts"],"names":[],"mappings":";;AAAA,0CAAsC;AAGtC,sDAA0D;AAC1D,wCAAiD;AAEjD,mBAAyB,MAAc,EAAE,GAAe;IACtD,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC;QAC9B,IAAI,EAAE,GAAG,CAAC,YAAY,CAAC,0BAA0B;QACjD,OAAO,EAAE,KAAK,EAAE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CAAA;oBACX,CAAC;gBACH,CAAC;YACH,CAAC,CAAC,CAAA;YACF,IAAI,CAAC,KAAK,EAAE,CAAC;gBACX,MAAM,IAAI,iCAAmB,CAAC,gBAAgB,CAAC,CAAA;YACjD,CAAC;YACD,GAAG,CAAC,SAAS,CAAC,gBAAgB,EAAE,KAAK,CAAC,IAAI,CAAC,CAAA;YAC3C,GAAG,CAAC,SAAS,CAAC,wBAAwB,EAAE,SAAS,CAAC,CAAA;YAClD,GAAG,CAAC,SAAS,CAAC,yBAAyB,EAAE,6BAA6B,CAAC,CAAA;YACvE,OAAO;gBACL,wCAAwC;gBACxC,QAAQ,EAAE,CAAC,KAAK,CAAC,QAAQ,IAAI,0BAA0B,CAAU;gBACjE,IAAI,EAAE,KAAK,CAAC,MAAM;aACnB,CAAA;QACH,CAAC;KACF,CAAC,CAAA;AACJ,CAAC;AApCD,4BAoCC"}
@@ -1 +1 @@
1
- {"version":3,"file":"getBlocks.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/sync/getBlocks.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAC5C,OAAO,UAAU,MAAM,qBAAqB,CAAA;AAE5C,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QA6BvD"}
1
+ {"version":3,"file":"getBlocks.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/sync/getBlocks.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAC5C,OAAO,UAAU,MAAM,qBAAqB,CAAA;AAG5C,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QA2BvD"}
@@ -4,18 +4,13 @@ const cid_1 = require("multiformats/cid");
4
4
  const xrpc_server_1 = require("@atproto/xrpc-server");
5
5
  const common_1 = require("@atproto/common");
6
6
  const repo_1 = require("@atproto/repo");
7
+ const util_1 = require("./util");
7
8
  function default_1(server, ctx) {
8
9
  server.com.atproto.sync.getBlocks({
9
10
  auth: ctx.authVerifier.optionalAccessOrAdminToken,
10
11
  handler: async ({ params, auth }) => {
11
12
  const { did } = params;
12
- // takedown check for anyone other than an admin or the user
13
- if (!ctx.authVerifier.isUserOrAdmin(auth, did)) {
14
- const available = await ctx.accountManager.isRepoAvailable(did);
15
- if (!available) {
16
- throw new xrpc_server_1.InvalidRequestError(`Could not find repo for DID: ${did}`);
17
- }
18
- }
13
+ await (0, util_1.assertRepoAvailability)(ctx, did, ctx.authVerifier.isUserOrAdmin(auth, did));
19
14
  const cids = params.cids.map((c) => cid_1.CID.parse(c));
20
15
  const got = await ctx.actorStore.read(did, (store) => store.repo.storage.getBlocks(cids));
21
16
  if (got.missing.length > 0) {
@@ -1 +1 @@
1
- {"version":3,"file":"getBlocks.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/sync/getBlocks.ts"],"names":[],"mappings":";;AAAA,0CAAsC;AACtC,sDAA0D;AAC1D,4CAAsD;AACtD,wCAAiD;AAIjD,mBAAyB,MAAc,EAAE,GAAe;IACtD,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC;QAChC,IAAI,EAAE,GAAG,CAAC,YAAY,CAAC,0BAA0B;QACjD,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE;YAClC,MAAM,EAAE,GAAG,EAAE,GAAG,MAAM,CAAA;YACtB,4DAA4D;YAC5D,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,aAAa,CAAC,IAAI,EAAE,GAAG,CAAC,EAAE,CAAC;gBAC/C,MAAM,SAAS,GAAG,MAAM,GAAG,CAAC,cAAc,CAAC,eAAe,CAAC,GAAG,CAAC,CAAA;gBAC/D,IAAI,CAAC,SAAS,EAAE,CAAC;oBACf,MAAM,IAAI,iCAAmB,CAAC,gCAAgC,GAAG,EAAE,CAAC,CAA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AA;AAE5C,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QA8BvD"}
1
+ {"version":3,"file":"getLatestCommit.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/sync/getLatestCommit.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAC5C,OAAO,UAAU,MAAM,qBAAqB,CAAA;AAG5C,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QA0BvD"}
@@ -1,18 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const xrpc_server_1 = require("@atproto/xrpc-server");
4
+ const util_1 = require("./util");
4
5
  function default_1(server, ctx) {
5
6
  server.com.atproto.sync.getLatestCommit({
6
7
  auth: ctx.authVerifier.optionalAccessOrAdminToken,
7
8
  handler: async ({ params, auth }) => {
8
9
  const { did } = params;
9
- // takedown check for anyone other than an admin or the user
10
- if (!ctx.authVerifier.isUserOrAdmin(auth, did)) {
11
- const available = await ctx.accountManager.isRepoAvailable(did);
12
- if (!available) {
13
- throw new xrpc_server_1.InvalidRequestError(`Could not find root for DID: ${did}`, 'RepoNotFound');
14
- }
15
- }
10
+ await (0, util_1.assertRepoAvailability)(ctx, did, ctx.authVerifier.isUserOrAdmin(auth, did));
16
11
  const root = await ctx.actorStore.read(did, (store) => store.repo.storage.getRootDetailed());
17
12
  if (root === null) {
18
13
  throw new xrpc_server_1.InvalidRequestError(`Could not find root for DID: ${did}`, 'RepoNotFound');
@@ -1 +1 @@
1
- {"version":3,"file":"getLatestCommit.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/sync/getLatestCommit.ts"],"names":[],"mappings":";;AAAA,sDAA0D;AAI1D,mBAAyB,MAAc,EAAE,GAAe;IACtD,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,eAAe,CAAC;QACtC,IAAI,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CAAC;QACtC,IAAI,EAAE,GAAG,CAAC,YAAY,CAAC,0BAA0B;QACjD,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE;YAClC,MAAM,EAAE,GAAG,EAAE,GAAG,MAAM,CAAA;YACtB,MAAM,IAAA,6BAAsB,EAC1B,GAAG,EACH,GAAG,EACH,GAAG,CAAC,YAAY,CAAC,aAAa,CAAC,IAAI,EAAE,GAAG,CAAC,CAC1C,CAAA;YAED,MAAM,IAAI,GAAG,MAAM,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,KAAK,EAAE,EAAE,CACpD,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,eAAe,EAAE,CACrC,CAAA;YACD,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;gBAClB,MAAM,IAAI,iCAAmB,CAC3B,gCAAgC,GAAG,EAAE,EACrC,cAAc,CACf,CAAA;YACH,CAAC;YACD,OAAO;gBACL,QAAQ,EAAE,kBAAkB;gBAC5B,IAAI,EAAE,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE;aAClD,CAAA;QACH,CAAC;KACF,CAAC,CAAA;AACJ,CAAC;AA1BD,4BA0BC"}
@@ -1 +1 @@
1
- {"version":3,"file":"getRecord.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/sync/getRecord.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAC5C,OAAO,UAAU,MAAM,qBAAqB,CAAA;AAI5C,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QAyCvD"}
1
+ {"version":3,"file":"getRecord.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/sync/getRecord.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAC5C,OAAO,UAAU,MAAM,qBAAqB,CAAA;AAK5C,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QAwCvD"}
@@ -28,18 +28,13 @@ const repo = __importStar(require("@atproto/repo"));
28
28
  const xrpc_server_1 = require("@atproto/xrpc-server");
29
29
  const common_1 = require("@atproto/common");
30
30
  const sql_repo_reader_1 = require("../../../../actor-store/repo/sql-repo-reader");
31
+ const util_1 = require("./util");
31
32
  function default_1(server, ctx) {
32
33
  server.com.atproto.sync.getRecord({
33
34
  auth: ctx.authVerifier.optionalAccessOrAdminToken,
34
35
  handler: async ({ params, auth }) => {
35
36
  const { did, collection, rkey } = params;
36
- // takedown check for anyone other than an admin or the user
37
- if (!ctx.authVerifier.isUserOrAdmin(auth, did)) {
38
- const available = await ctx.accountManager.isRepoAvailable(did);
39
- if (!available) {
40
- throw new xrpc_server_1.InvalidRequestError(`Could not find repo for DID: ${did}`);
41
- }
42
- }
37
+ await (0, util_1.assertRepoAvailability)(ctx, did, ctx.authVerifier.isUserOrAdmin(auth, did));
43
38
  // must open up the db outside of store interface so that we can close the file handle after finished streaming
44
39
  const actorDb = await ctx.actorStore.openDb(did);
45
40
  let carStream;
@@ -1 +1 @@
1
- {"version":3,"file":"getRecord.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/sync/getRecord.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AACA,0CAAsC;AACtC,oDAAqC;AACrC,sDAA0D;AAG1D,4CAAsD;AACtD,kFAA4E;AAE5E,mBAAyB,MAAc,EAAE,GAAe;IACtD,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC;QAChC,IAAI,EAAE,GAAG,CAAC,YAAY,CAAC,0BAA0B;QACjD,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE;YAClC,MAAM,EAAE,GAAG,EAA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AAC,OAAO,EAAE,CAAA;gBAE3B,IAAI,CAAC,MAAM,EAAE,CAAC;oBACZ,MAAM,IAAI,iCAAmB,CAAC,gCAAgC,GAAG,EAAE,CAAC,CAAA;gBACtE,CAAC;gBACD,MAAM,OAAO,GAAG,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC,CAAA;gBACxE,SAAS,GAAG,IAAA,6BAAoB,EAAC,OAAO,CAAC,CAAA;YAC3C,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACb,OAAO,CAAC,KAAK,EAAE,CAAA;gBACf,MAAM,GAAG,CAAA;YACX,CAAC;YACD,MAAM,OAAO,GAAG,GAAG,EAAE,CAAC,OAAO,CAAC,KAAK,EAAE,CAAA;YACrC,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA;YAC9B,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA;YAE9B,OAAO;gBACL,QAAQ,EAAE,0BAA0B;gBACpC,IAAI,EAAE,SAAS;aAChB,CAAA;QACH,CAAC;KACF,CAAC,CAAA;AACJ,CAAC;AAxCD,4BAwCC"}
@@ -1 +1 @@
1
- {"version":3,"file":"getRepo.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/sync/getRepo.ts"],"names":[],"mappings":";AAAA,OAAO,MAAM,MAAM,QAAQ,CAAA;AAE3B,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAC5C,OAAO,UAAU,MAAM,qBAAqB,CAAA;AAM5C,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QAqBvD;AAED,eAAO,MAAM,YAAY,QAClB,UAAU,OACV,MAAM,UACH,MAAM,KACb,QAAQ,OAAO,QAAQ,CAiBzB,CAAA"}
1
+ {"version":3,"file":"getRepo.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/sync/getRepo.ts"],"names":[],"mappings":";AAAA,OAAO,MAAM,MAAM,QAAQ,CAAA;AAE3B,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAC5C,OAAO,UAAU,MAAM,qBAAqB,CAAA;AAO5C,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QAmBvD;AAED,eAAO,MAAM,YAAY,QAClB,UAAU,OACV,MAAM,UACH,MAAM,KACb,QAAQ,OAAO,QAAQ,CAiBzB,CAAA"}
@@ -3,18 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getCarStream = void 0;
4
4
  const xrpc_server_1 = require("@atproto/xrpc-server");
5
5
  const sql_repo_reader_1 = require("../../../../actor-store/repo/sql-repo-reader");
6
+ const util_1 = require("./util");
6
7
  function default_1(server, ctx) {
7
8
  server.com.atproto.sync.getRepo({
8
9
  auth: ctx.authVerifier.optionalAccessOrAdminToken,
9
10
  handler: async ({ params, auth }) => {
10
11
  const { did, since } = params;
11
- // takedown check for anyone other than an admin or the user
12
- if (!ctx.authVerifier.isUserOrAdmin(auth, did)) {
13
- const available = await ctx.accountManager.isRepoAvailable(did);
14
- if (!available) {
15
- throw new xrpc_server_1.InvalidRequestError(`Could not find repo for DID: ${did}`);
16
- }
17
- }
12
+ await (0, util_1.assertRepoAvailability)(ctx, did, ctx.authVerifier.isUserOrAdmin(auth, did));
18
13
  const carStream = await (0, exports.getCarStream)(ctx, did, since);
19
14
  return {
20
15
  encoding: 'application/vnd.ipld.car',
@@ -1 +1 @@
1
- {"version":3,"file":"getRepo.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/sync/getRepo.ts"],"names":[],"mappings":";;;AACA,sDAA0D;AAG1D,kFAGqD;AAErD,mBAAyB,MAAc,EAAE,GAAe;IACtD,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC;QAC9B,IAAI,EAAE,GAAG,C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AAA;IAChD,IAAI,SAA0B,CAAA;IAC9B,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,IAAI,+BAAa,CAAC,OAAO,CAAC,CAAA;QAC1C,SAAS,GAAG,MAAM,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,CAAA;IAC/C,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,OAAO,CAAC,KAAK,EAAE,CAAA;QACrB,IAAI,GAAG,YAAY,uCAAqB,EAAE,CAAC;YACzC,MAAM,IAAI,iCAAmB,CAAC,gCAAgC,GAAG,EAAE,CAAC,CAAA;QACtE,CAAC;QACD,MAAM,GAAG,CAAA;IACX,CAAC;IACD,MAAM,OAAO,GAAG,GAAG,EAAE,CAAC,OAAO,CAAC,KAAK,EAAE,CAAA;IACrC,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA;IAC9B,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA;IAC9B,OAAO,SAAS,CAAA;AAClB,CAAC,CAAA;AArBY,QAAA,YAAY,gBAqBxB"}
@@ -0,0 +1,4 @@
1
+ import { Server } from '../../../../lexicon';
2
+ import AppContext from '../../../../context';
3
+ export default function (server: Server, ctx: AppContext): void;
4
+ //# sourceMappingURL=getRepoStatus.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getRepoStatus.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/sync/getRepoStatus.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAC5C,OAAO,UAAU,MAAM,qBAAqB,CAAA;AAG5C,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QA0BvD"}
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const util_1 = require("./util");
4
+ function default_1(server, ctx) {
5
+ server.com.atproto.sync.getRepoStatus({
6
+ handler: async ({ params }) => {
7
+ const { did } = params;
8
+ const account = await (0, util_1.assertRepoAvailability)(ctx, did, true);
9
+ const { active, status } = account;
10
+ let rev = undefined;
11
+ if (active) {
12
+ const root = await ctx.actorStore.read(did, (store) => store.repo.storage.getRootDetailed());
13
+ rev = root.rev;
14
+ }
15
+ return {
16
+ encoding: 'application/json',
17
+ body: {
18
+ did,
19
+ active,
20
+ status,
21
+ rev,
22
+ },
23
+ };
24
+ },
25
+ });
26
+ }
27
+ exports.default = default_1;
28
+ //# sourceMappingURL=getRepoStatus.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getRepoStatus.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/sync/getRepoStatus.ts"],"names":[],"mappings":";;AAEA,iCAA+C;AAE/C,mBAAyB,MAAc,EAAE,GAAe;IACtD,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,aAAa,CAAC;QACpC,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;YAC5B,MAAM,EAAE,GAAG,EAAE,GAAG,MAAM,CAAA;YACtB,MAAM,OAAO,GAAG,MAAM,IAAA,6BAAsB,EAAC,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,CAAA;YAC5D,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAA;YAElC,IAAI,GAAG,GAAuB,SAAS,CAAA;YACvC,IAAI,MAAM,EAAE,CAAC;gBACX,MAAM,IAAI,GAAG,MAAM,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,KAAK,EAAE,EAAE,CACpD,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,eAAe,EAAE,CACrC,CAAA;gBACD,GAAG,GAAG,IAAI,CAAC,GAAG,CAAA;YAChB,CAAC;YAED,OAAO;gBACL,QAAQ,EAAE,kBAAkB;gBAC5B,IAAI,EAAE;oBACJ,GAAG;oBACH,MAAM;oBACN,MAAM;oBACN,GAAG;iBACJ;aACF,CAAA;QACH,CAAC;KACF,CAAC,CAAA;AACJ,CAAC;AA1BD,4BA0BC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/sync/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAC5C,OAAO,UAAU,MAAM,qBAAqB,CAAA;AAY5C,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QAWvD"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/sync/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAC5C,OAAO,UAAU,MAAM,qBAAqB,CAAA;AAa5C,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QAYvD"}
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const getBlob_1 = __importDefault(require("./getBlob"));
7
7
  const getBlocks_1 = __importDefault(require("./getBlocks"));
8
8
  const getLatestCommit_1 = __importDefault(require("./getLatestCommit"));
9
+ const getRepoStatus_1 = __importDefault(require("./getRepoStatus"));
9
10
  const getRecord_1 = __importDefault(require("./getRecord"));
10
11
  const getRepo_1 = __importDefault(require("./getRepo"));
11
12
  const subscribeRepos_1 = __importDefault(require("./subscribeRepos"));
@@ -17,6 +18,7 @@ function default_1(server, ctx) {
17
18
  (0, getBlob_1.default)(server, ctx);
18
19
  (0, getBlocks_1.default)(server, ctx);
19
20
  (0, getLatestCommit_1.default)(server, ctx);
21
+ (0, getRepoStatus_1.default)(server, ctx);
20
22
  (0, getRecord_1.default)(server, ctx);
21
23
  (0, getRepo_1.default)(server, ctx);
22
24
  (0, subscribeRepos_1.default)(server, ctx);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/sync/index.ts"],"names":[],"mappings":";;;;;AAEA,wDAA+B;AAC/B,4DAAmC;AACnC,wEAA+C;AAC/C,4DAAmC;AACnC,wDAA+B;AAC/B,sEAA6C;AAC7C,4DAAmC;AACnC,4DAAmC;AACnC,2EAAkD;AAClD,mEAA0C;AAE1C,mBAAyB,MAAc,EAAE,GAAe;IACtD,IAAA,iBAAO,EAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACpB,IAAA,mBAAS,EAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACtB,IAAA,yBAAe,EAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC5B,IAAA,mBAAS,EAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACtB,IAAA,iBAAO,EAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACpB,IAAA,wBAAc,EAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC3B,IAAA,mBAAS,EAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACtB,IAAA,mBAAS,EAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACtB,IAAA,qBAAW,EAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACxB,IAAA,iBAAO,EAAC,MAAM,EAAE,GAAG,CAAC,CAAA;AACtB,CAAC;AAXD,4BAWC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/sync/index.ts"],"names":[],"mappings":";;;;;AAEA,wDAA+B;AAC/B,4DAAmC;AACnC,wEAA+C;AAC/C,oEAA2C;AAC3C,4DAAmC;AACnC,wDAA+B;AAC/B,sEAA6C;AAC7C,4DAAmC;AACnC,4DAAmC;AACnC,2EAAkD;AAClD,mEAA0C;AAE1C,mBAAyB,MAAc,EAAE,GAAe;IACtD,IAAA,iBAAO,EAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACpB,IAAA,mBAAS,EAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACtB,IAAA,yBAAe,EAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC5B,IAAA,uBAAa,EAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC1B,IAAA,mBAAS,EAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACtB,IAAA,iBAAO,EAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACpB,IAAA,wBAAc,EAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC3B,IAAA,mBAAS,EAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACtB,IAAA,mBAAS,EAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACtB,IAAA,qBAAW,EAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACxB,IAAA,iBAAO,EAAC,MAAM,EAAE,GAAG,CAAC,CAAA;AACtB,CAAC;AAZD,4BAYC"}
@@ -1 +1 @@
1
- {"version":3,"file":"listBlobs.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/sync/listBlobs.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAC5C,OAAO,UAAU,MAAM,qBAAqB,CAAA;AAE5C,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QA0BvD"}
1
+ {"version":3,"file":"listBlobs.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/sync/listBlobs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAC5C,OAAO,UAAU,MAAM,qBAAqB,CAAA;AAG5C,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QAwBvD"}
@@ -1,18 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const xrpc_server_1 = require("@atproto/xrpc-server");
3
+ const util_1 = require("./util");
4
4
  function default_1(server, ctx) {
5
5
  server.com.atproto.sync.listBlobs({
6
6
  auth: ctx.authVerifier.optionalAccessOrAdminToken,
7
7
  handler: async ({ params, auth }) => {
8
8
  const { did, since, limit, cursor } = params;
9
- // takedown check for anyone other than an admin or the user
10
- if (!ctx.authVerifier.isUserOrAdmin(auth, did)) {
11
- const available = await ctx.accountManager.isRepoAvailable(did);
12
- if (!available) {
13
- throw new xrpc_server_1.InvalidRequestError(`Could not find root for DID: ${did}`);
14
- }
15
- }
9
+ await (0, util_1.assertRepoAvailability)(ctx, did, ctx.authVerifier.isUserOrAdmin(auth, did));
16
10
  const blobCids = await ctx.actorStore.read(did, (store) => store.repo.blob.listBlobs({ since, limit, cursor }));
17
11
  return {
18
12
  encoding: 'application/json',
@@ -1 +1 @@
1
- {"version":3,"file":"listBlobs.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/sync/listBlobs.ts"],"names":[],"mappings":";;AAAA,sDAA0D;AAI1D,mBAAyB,MAAc,EAAE,GAAe;IACtD,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC;QAChC,IAAI,EAAE,GAAG,CAAC,YAAY,CAAC,0BAA0B;QACjD,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE;YAClC,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,CAAA;YAC5C,4DAA4D;YAC5D,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,aAAa,CAAC,IAAI,EAAE,GAAG,CAAC,EAAE,CAAC;gBAC/C,MAAM,SAAS,GAAG,MAAM,GAAG,CAAC,cAAc,CAAC,eAAe,CAAC,GAAG,CAAC,CAAA;gBAC/D,IAAI,CAAC,SAAS,EAAE,CAAC;oBACf,MAAM,IAAI,iCAAmB,CAAC,gCAAgC,GAAG,EAAE,CAAC,CAAA;gBACtE,CAAC;YACH,CAAC;YAED,MAAM,QAAQ,GAAG,MAAM,GAAG,CAAC,UAAU,CAAC,IAAI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AE,CAAC,CAAC,CAAC,CAAC;oBACvB,IAAI,EAAE,QAAQ;iBACf;aACF,CAAA;QACH,CAAC;KACF,CAAC,CAAA;AACJ,CAAC;AAxBD,4BAwBC"}
@@ -1 +1 @@
1
- {"version":3,"file":"listRepos.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/sync/listRepos.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAC5C,OAAO,UAAU,MAAM,qBAAqB,CAAA;AAC5C,OAAO,EAAE,MAAM,EAAE,aAAa,EAAY,MAAM,2BAA2B,CAAA;AAG3E,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QAsCvD;AAED,KAAK,aAAa,GAAG;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAA;AAEvD,qBAAa,aAAc,SAAQ,aAAa,CAAC,aAAa,EAAE,MAAM,CAAC;IACrE,WAAW,CAAC,MAAM,EAAE,aAAa,GAAG,MAAM;IAG1C,qBAAqB,CAAC,OAAO,EAAE,MAAM;;;;IAMrC,qBAAqB,CAAC,MAAM,EAAE,MAAM;;;;CAUrC"}
1
+ {"version":3,"file":"listRepos.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/sync/listRepos.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAC5C,OAAO,UAAU,MAAM,qBAAqB,CAAA;AAC5C,OAAO,EAAE,MAAM,EAAE,aAAa,EAAY,MAAM,2BAA2B,CAAA;AAG3E,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QA2CvD;AAED,KAAK,aAAa,GAAG;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAA;AAEvD,qBAAa,aAAc,SAAQ,aAAa,CAAC,aAAa,EAAE,MAAM,CAAC;IACrE,WAAW,CAAC,MAAM,EAAE,aAAa,GAAG,MAAM;IAG1C,qBAAqB,CAAC,OAAO,EAAE,MAAM;;;;IAMrC,qBAAqB,CAAC,MAAM,EAAE,MAAM;;;;CAUrC"}
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TimeDidKeyset = void 0;
4
4
  const xrpc_server_1 = require("@atproto/xrpc-server");
5
5
  const pagination_1 = require("../../../../db/pagination");
6
- const util_1 = require("../../../../db/util");
6
+ const account_1 = require("../../../../account-manager/helpers/account");
7
7
  function default_1(server, ctx) {
8
8
  server.com.atproto.sync.listRepos(async ({ params }) => {
9
9
  const { limit, cursor } = params;
@@ -12,13 +12,13 @@ function default_1(server, ctx) {
12
12
  let builder = db.db
13
13
  .selectFrom('actor')
14
14
  .innerJoin('repo_root', 'repo_root.did', 'actor.did')
15
- .where((0, util_1.notSoftDeletedClause)(ref('actor')))
16
- .where('actor.deactivatedAt', 'is', null)
17
15
  .select([
18
16
  'actor.did as did',
19
17
  'repo_root.cid as head',
20
18
  'repo_root.rev as rev',
21
19
  'actor.createdAt as createdAt',
20
+ 'actor.deactivatedAt as deactivatedAt',
21
+ 'actor.takedownRef as takedownRef',
22
22
  ]);
23
23
  const keyset = new TimeDidKeyset(ref('actor.createdAt'), ref('actor.did'));
24
24
  builder = (0, pagination_1.paginate)(builder, {
@@ -29,11 +29,16 @@ function default_1(server, ctx) {
29
29
  tryIndex: true,
30
30
  });
31
31
  const res = await builder.execute();
32
- const repos = res.map((row) => ({
33
- did: row.did,
34
- head: row.head,
35
- rev: row.rev ?? '',
36
- }));
32
+ const repos = res.map((row) => {
33
+ const { active, status } = (0, account_1.formatAccountStatus)(row);
34
+ return {
35
+ did: row.did,
36
+ head: row.head,
37
+ rev: row.rev ?? '',
38
+ active,
39
+ status,
40
+ };
41
+ });
37
42
  return {
38
43
  encoding: 'application/json',
39
44
  body: {
@@ -1 +1 @@
1
- {"version":3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vD"}
1
+ {"version":3,"file":"subscribeRepos.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/sync/subscribeRepos.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAC5C,OAAO,UAAU,MAAM,qBAAqB,CAAA;AAI5C,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QAwEvD"}
@@ -62,6 +62,14 @@ function default_1(server, ctx) {
62
62
  ...evt.evt,
63
63
  };
64
64
  }
65
+ else if (evt.type === 'account') {
66
+ yield {
67
+ $type: '#account',
68
+ seq: evt.seq,
69
+ time: evt.time,
70
+ ...evt.evt,
71
+ };
72
+ }
65
73
  else if (evt.type === 'tombstone') {
66
74
  yield {
67
75
  $type: '#tombstone',
@@ -1 +1 @@
1
- {"version":3,"file":"subscribeRepos.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/sync/subscribeRepos.ts"],"names":[],"mappings":";;;;;AAAA,sDAA0D;AAG1D,0EAAiD;AACjD,+CAA+C;AAE/C,mBAAyB,MAAc,EAAE,GAAe;IACtD,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,CAAC,KAAK,SAAS,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE;QACxE,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,CAAA;QACzB,MAAM,MAAM,GAAG,IAAI,gBAAM,CAAC,GAAG,CAAC,SAAS,EAAE;YACvC,aAAa,EAAE,GAAG,CAAC,GAAG,CAAC,YAAY,CAAC,SAAS;SAC9C,CAAC,CAAA;QACF,mBAAU,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,EAAE,4CAA4C,CAAC,CAAA;QAEzE,MAAM,YAAY,GAAG,IAAI,IAAI,CAC3B,IAAI,CAAC,GAAG,EAAE,GAAG,GAAG,CAAC,GAAG,CAAC,YAAY,CAAC,mBAAmB,CACtD,CAAC,WAAW,EAAE,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K,QAAQ,EAAE,CAAC;gBAC1B,MAAM;oBACJ,KAAK,EAAE,SAAS;oBAChB,GAAG,EAAE,GAAG,CAAC,GAAG;oBACZ,IAAI,EAAE,GAAG,CAAC,IAAI;oBACd,GAAG,GAAG,CAAC,GAAG;iBACX,CAAA;YACH,CAAC;iBAAM,IAAI,GAAG,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;gBACjC,MAAM;oBACJ,KAAK,EAAE,SAAS;oBAChB,GAAG,EAAE,GAAG,CAAC,GAAG;oBACZ,IAAI,EAAE,GAAG,CAAC,IAAI;oBACd,GAAG,GAAG,CAAC,GAAG;iBACX,CAAA;YACH,CAAC;iBAAM,IAAI,GAAG,CAAC,IAAI,KAAK,UAAU,EAAE,CAAC;gBACnC,MAAM;oBACJ,KAAK,EAAE,WAAW;oBAClB,GAAG,EAAE,GAAG,CAAC,GAAG;oBACZ,IAAI,EAAE,GAAG,CAAC,IAAI;oBACd,GAAG,GAAG,CAAC,GAAG;iBACX,CAAA;YACH,CAAC;iBAAM,IAAI,GAAG,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;gBAClC,MAAM;oBACJ,KAAK,EAAE,UAAU;oBACjB,GAAG,EAAE,GAAG,CAAC,GAAG;oBACZ,IAAI,EAAE,GAAG,CAAC,IAAI;oBACd,GAAG,GAAG,CAAC,GAAG;iBACX,CAAA;YACH,CAAC;iBAAM,IAAI,GAAG,CAAC,IAAI,KAAK,WAAW,EAAE,CAAC;gBACpC,MAAM;oBACJ,KAAK,EAAE,YAAY;oBACnB,GAAG,EAAE,GAAG,CAAC,GAAG;oBACZ,IAAI,EAAE,GAAG,CAAC,IAAI;oBACd,GAAG,GAAG,CAAC,GAAG;iBACX,CAAA;YACH,CAAC;QACH,CAAC;IACH,CAAC,CAAC,CAAA;AACJ,CAAC;AAxED,4BAwEC"}
@@ -0,0 +1,4 @@
1
+ import { ActorAccount } from '../../../../account-manager/helpers/account';
2
+ import AppContext from '../../../../context';
3
+ export declare const assertRepoAvailability: (ctx: AppContext, did: string, isAdminOrSelf: boolean) => Promise<ActorAccount>;
4
+ //# sourceMappingURL=util.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/sync/util.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,6CAA6C,CAAA;AAC1E,OAAO,UAAU,MAAM,qBAAqB,CAAA;AAE5C,eAAO,MAAM,sBAAsB,QAC5B,UAAU,OACV,MAAM,iBACI,OAAO,KACrB,QAAQ,YAAY,CA2BtB,CAAA"}