@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
@@ -1,11 +1,14 @@
1
1
  import { Server } from '../../../../lexicon'
2
2
  import AppContext from '../../../../context'
3
3
  import { authPassthru, resultPassthru } from '../../../proxy'
4
+ import { AuthScope } from '../../../../auth-verifier'
4
5
 
5
6
  // THIS IS A TEMPORARY UNSPECCED ROUTE
6
7
  export default function (server: Server, ctx: AppContext) {
7
8
  server.com.atproto.temp.checkSignupQueue({
8
- auth: ctx.authVerifier.accessDeactived,
9
+ auth: ctx.authVerifier.accessStandard({
10
+ additional: [AuthScope.SignupQueued],
11
+ }),
9
12
  handler: async ({ req }) => {
10
13
  if (!ctx.entrywayAgent) {
11
14
  return {
@@ -24,7 +24,13 @@ export enum AuthScope {
24
24
  Refresh = 'com.atproto.refresh',
25
25
  AppPass = 'com.atproto.appPass',
26
26
  AppPassPrivileged = 'com.atproto.appPassPrivileged',
27
- Deactivated = 'com.atproto.deactivated',
27
+ SignupQueued = 'com.atproto.signupQueued',
28
+ }
29
+
30
+ export type AccessOpts = {
31
+ additional: AuthScope[]
32
+ checkTakedown: boolean
33
+ checkDeactivated: boolean
28
34
  }
29
35
 
30
36
  export enum RoleStatus {
@@ -115,55 +121,40 @@ export class AuthVerifier {
115
121
 
116
122
  // verifiers (arrow fns to preserve scope)
117
123
 
118
- access = (ctx: ReqCtx): Promise<AccessOutput> => {
119
- return this.validateAccessToken(ctx.req, [
120
- AuthScope.Access,
121
- AuthScope.AppPassPrivileged,
122
- AuthScope.AppPass,
123
- ])
124
- }
125
-
126
- accessCheckTakedown = async (ctx: ReqCtx): Promise<AccessOutput> => {
127
- const result = await this.validateAccessToken(ctx.req, [
128
- AuthScope.Access,
129
- AuthScope.AppPassPrivileged,
130
- AuthScope.AppPass,
131
- ])
132
- const found = await this.accountManager.getAccount(result.credentials.did, {
133
- includeDeactivated: true,
134
- })
135
- if (!found) {
136
- // will be turned into ExpiredToken for the client if proxied by entryway
137
- throw new ForbiddenError('Account not found', 'AccountNotFound')
138
- }
139
- if (softDeleted(found)) {
140
- throw new AuthRequiredError(
141
- 'Account has been taken down',
142
- 'AccountTakedown',
124
+ accessStandard =
125
+ (opts: Partial<AccessOpts> = {}) =>
126
+ (ctx: ReqCtx): Promise<AccessOutput> => {
127
+ return this.validateAccessToken(
128
+ ctx.req,
129
+ [
130
+ AuthScope.Access,
131
+ AuthScope.AppPassPrivileged,
132
+ AuthScope.AppPass,
133
+ ...(opts.additional ?? []),
134
+ ],
135
+ opts,
143
136
  )
144
137
  }
145
- return result
146
- }
147
-
148
- accessFull = (ctx: ReqCtx): Promise<AccessOutput> => {
149
- return this.validateAccessToken(ctx.req, [AuthScope.Access])
150
- }
151
138
 
152
- accessAppPassPrivileged = (ctx: ReqCtx): Promise<AccessOutput> => {
153
- return this.validateAccessToken(ctx.req, [
154
- AuthScope.Access,
155
- AuthScope.AppPassPrivileged,
156
- ])
157
- }
139
+ accessFull =
140
+ (opts: Partial<AccessOpts> = {}) =>
141
+ (ctx: ReqCtx): Promise<AccessOutput> => {
142
+ return this.validateAccessToken(
143
+ ctx.req,
144
+ [AuthScope.Access, ...(opts.additional ?? [])],
145
+ opts,
146
+ )
147
+ }
158
148
 
159
- accessDeactived = (ctx: ReqCtx): Promise<AccessOutput> => {
160
- return this.validateAccessToken(ctx.req, [
161
- AuthScope.Access,
162
- AuthScope.AppPass,
163
- AuthScope.AppPassPrivileged,
164
- AuthScope.Deactivated,
165
- ])
166
- }
149
+ accessPrivileged =
150
+ (opts: Partial<AccessOpts> = {}) =>
151
+ (ctx: ReqCtx): Promise<AccessOutput> => {
152
+ return this.validateAccessToken(ctx.req, [
153
+ AuthScope.Access,
154
+ AuthScope.AppPassPrivileged,
155
+ ...(opts.additional ?? []),
156
+ ])
157
+ }
167
158
 
168
159
  refresh = async (ctx: ReqCtx): Promise<RefreshOutput> => {
169
160
  const { did, scope, token, audience, payload } =
@@ -205,7 +196,7 @@ export class AuthVerifier {
205
196
  ctx: ReqCtx,
206
197
  ): Promise<AccessOutput | AdminTokenOutput | NullOutput> => {
207
198
  if (isBearerToken(ctx.req)) {
208
- return await this.access(ctx)
199
+ return await this.accessStandard()(ctx)
209
200
  } else if (isBasicToken(ctx.req)) {
210
201
  return await this.adminToken(ctx)
211
202
  } else {
@@ -308,12 +299,36 @@ export class AuthVerifier {
308
299
  async validateAccessToken(
309
300
  req: express.Request,
310
301
  scopes: AuthScope[],
302
+ opts?: { checkTakedown?: boolean; checkDeactivated?: boolean },
311
303
  ): Promise<AccessOutput> {
312
304
  const { did, scope, token, audience } = await this.validateBearerToken(
313
305
  req,
314
306
  scopes,
315
307
  { audience: this.dids.pds },
316
308
  )
309
+ const { checkTakedown = false, checkDeactivated = false } = opts ?? {}
310
+ if (checkTakedown || checkDeactivated) {
311
+ const found = await this.accountManager.getAccount(did, {
312
+ includeDeactivated: true,
313
+ includeTakenDown: true,
314
+ })
315
+ if (!found) {
316
+ // will be turned into ExpiredToken for the client if proxied by entryway
317
+ throw new ForbiddenError('Account not found', 'AccountNotFound')
318
+ }
319
+ if (checkTakedown && softDeleted(found)) {
320
+ throw new AuthRequiredError(
321
+ 'Account has been taken down',
322
+ 'AccountTakedown',
323
+ )
324
+ }
325
+ if (checkDeactivated && found.deactivatedAt) {
326
+ throw new AuthRequiredError(
327
+ 'Account is deactivated',
328
+ 'AccountDeactivated',
329
+ )
330
+ }
331
+ }
317
332
  return {
318
333
  credentials: {
319
334
  type: 'access',
package/src/index.ts CHANGED
@@ -33,6 +33,7 @@ export { createServer as createLexiconServer } from './lexicon'
33
33
  export * as sequencer from './sequencer'
34
34
  export { type PreparedWrite } from './repo'
35
35
  export * as repoPrepare from './repo/prepare'
36
+ export { scripts } from './scripts'
36
37
 
37
38
  export class PDS {
38
39
  public ctx: AppContext
@@ -73,6 +73,7 @@ import * as ComAtprotoSyncGetHead from './types/com/atproto/sync/getHead'
73
73
  import * as ComAtprotoSyncGetLatestCommit from './types/com/atproto/sync/getLatestCommit'
74
74
  import * as ComAtprotoSyncGetRecord from './types/com/atproto/sync/getRecord'
75
75
  import * as ComAtprotoSyncGetRepo from './types/com/atproto/sync/getRepo'
76
+ import * as ComAtprotoSyncGetRepoStatus from './types/com/atproto/sync/getRepoStatus'
76
77
  import * as ComAtprotoSyncListBlobs from './types/com/atproto/sync/listBlobs'
77
78
  import * as ComAtprotoSyncListRepos from './types/com/atproto/sync/listRepos'
78
79
  import * as ComAtprotoSyncNotifyOfUpdate from './types/com/atproto/sync/notifyOfUpdate'
@@ -1009,6 +1010,17 @@ export class ComAtprotoSyncNS {
1009
1010
  return this._server.xrpc.method(nsid, cfg)
1010
1011
  }
1011
1012
 
1013
+ getRepoStatus<AV extends AuthVerifier>(
1014
+ cfg: ConfigOf<
1015
+ AV,
1016
+ ComAtprotoSyncGetRepoStatus.Handler<ExtractAuth<AV>>,
1017
+ ComAtprotoSyncGetRepoStatus.HandlerReqCtx<ExtractAuth<AV>>
1018
+ >,
1019
+ ) {
1020
+ const nsid = 'com.atproto.sync.getRepoStatus' // @ts-ignore
1021
+ return this._server.xrpc.method(nsid, cfg)
1022
+ }
1023
+
1012
1024
  listBlobs<AV extends AuthVerifier>(
1013
1025
  cfg: ConfigOf<
1014
1026
  AV,
@@ -66,6 +66,10 @@ export const schemaDict = {
66
66
  inviteNote: {
67
67
  type: 'string',
68
68
  },
69
+ deactivatedAt: {
70
+ type: 'string',
71
+ format: 'datetime',
72
+ },
69
73
  },
70
74
  },
71
75
  repoRef: {
@@ -364,6 +368,10 @@ export const schemaDict = {
364
368
  type: 'ref',
365
369
  ref: 'lex:com.atproto.admin.defs#statusAttr',
366
370
  },
371
+ deactivated: {
372
+ type: 'ref',
373
+ ref: 'lex:com.atproto.admin.defs#statusAttr',
374
+ },
367
375
  },
368
376
  },
369
377
  },
@@ -2255,6 +2263,15 @@ export const schemaDict = {
2255
2263
  emailAuthFactor: {
2256
2264
  type: 'boolean',
2257
2265
  },
2266
+ active: {
2267
+ type: 'boolean',
2268
+ },
2269
+ status: {
2270
+ type: 'string',
2271
+ description:
2272
+ 'If active=false, this optional field indicates a possible reason for why the account is not active. If active=false and no status is supplied, then the host makes no claim for why the repository is no longer being hosted.',
2273
+ knownValues: ['takendown', 'suspended', 'deactivated'],
2274
+ },
2258
2275
  },
2259
2276
  },
2260
2277
  },
@@ -2591,6 +2608,15 @@ export const schemaDict = {
2591
2608
  didDoc: {
2592
2609
  type: 'unknown',
2593
2610
  },
2611
+ active: {
2612
+ type: 'boolean',
2613
+ },
2614
+ status: {
2615
+ type: 'string',
2616
+ description:
2617
+ 'If active=false, this optional field indicates a possible reason for why the account is not active. If active=false and no status is supplied, then the host makes no claim for why the repository is no longer being hosted.',
2618
+ knownValues: ['takendown', 'suspended', 'deactivated'],
2619
+ },
2594
2620
  },
2595
2621
  },
2596
2622
  },
@@ -2675,6 +2701,15 @@ export const schemaDict = {
2675
2701
  didDoc: {
2676
2702
  type: 'unknown',
2677
2703
  },
2704
+ active: {
2705
+ type: 'boolean',
2706
+ },
2707
+ status: {
2708
+ type: 'string',
2709
+ description:
2710
+ "Hosting status of the account. If not specified, then assume 'active'.",
2711
+ knownValues: ['takendown', 'suspended', 'deactivated'],
2712
+ },
2678
2713
  },
2679
2714
  },
2680
2715
  },
@@ -2912,6 +2947,23 @@ export const schemaDict = {
2912
2947
  output: {
2913
2948
  encoding: '*/*',
2914
2949
  },
2950
+ errors: [
2951
+ {
2952
+ name: 'BlobNotFound',
2953
+ },
2954
+ {
2955
+ name: 'RepoNotFound',
2956
+ },
2957
+ {
2958
+ name: 'RepoTakendown',
2959
+ },
2960
+ {
2961
+ name: 'RepoSuspended',
2962
+ },
2963
+ {
2964
+ name: 'RepoDeactivated',
2965
+ },
2966
+ ],
2915
2967
  },
2916
2968
  },
2917
2969
  },
@@ -2944,6 +2996,23 @@ export const schemaDict = {
2944
2996
  output: {
2945
2997
  encoding: 'application/vnd.ipld.car',
2946
2998
  },
2999
+ errors: [
3000
+ {
3001
+ name: 'BlockNotFound',
3002
+ },
3003
+ {
3004
+ name: 'RepoNotFound',
3005
+ },
3006
+ {
3007
+ name: 'RepoTakendown',
3008
+ },
3009
+ {
3010
+ name: 'RepoSuspended',
3011
+ },
3012
+ {
3013
+ name: 'RepoDeactivated',
3014
+ },
3015
+ ],
2947
3016
  },
2948
3017
  },
2949
3018
  },
@@ -3050,6 +3119,15 @@ export const schemaDict = {
3050
3119
  {
3051
3120
  name: 'RepoNotFound',
3052
3121
  },
3122
+ {
3123
+ name: 'RepoTakendown',
3124
+ },
3125
+ {
3126
+ name: 'RepoSuspended',
3127
+ },
3128
+ {
3129
+ name: 'RepoDeactivated',
3130
+ },
3053
3131
  ],
3054
3132
  },
3055
3133
  },
@@ -3090,6 +3168,23 @@ export const schemaDict = {
3090
3168
  output: {
3091
3169
  encoding: 'application/vnd.ipld.car',
3092
3170
  },
3171
+ errors: [
3172
+ {
3173
+ name: 'RecordNotFound',
3174
+ },
3175
+ {
3176
+ name: 'RepoNotFound',
3177
+ },
3178
+ {
3179
+ name: 'RepoTakendown',
3180
+ },
3181
+ {
3182
+ name: 'RepoSuspended',
3183
+ },
3184
+ {
3185
+ name: 'RepoDeactivated',
3186
+ },
3187
+ ],
3093
3188
  },
3094
3189
  },
3095
3190
  },
@@ -3120,6 +3215,74 @@ export const schemaDict = {
3120
3215
  output: {
3121
3216
  encoding: 'application/vnd.ipld.car',
3122
3217
  },
3218
+ errors: [
3219
+ {
3220
+ name: 'RepoNotFound',
3221
+ },
3222
+ {
3223
+ name: 'RepoTakendown',
3224
+ },
3225
+ {
3226
+ name: 'RepoSuspended',
3227
+ },
3228
+ {
3229
+ name: 'RepoDeactivated',
3230
+ },
3231
+ ],
3232
+ },
3233
+ },
3234
+ },
3235
+ ComAtprotoSyncGetRepoStatus: {
3236
+ lexicon: 1,
3237
+ id: 'com.atproto.sync.getRepoStatus',
3238
+ defs: {
3239
+ main: {
3240
+ type: 'query',
3241
+ description:
3242
+ 'Get the hosting status for a repository, on this server. Expected to be implemented by PDS and Relay.',
3243
+ parameters: {
3244
+ type: 'params',
3245
+ required: ['did'],
3246
+ properties: {
3247
+ did: {
3248
+ type: 'string',
3249
+ format: 'did',
3250
+ description: 'The DID of the repo.',
3251
+ },
3252
+ },
3253
+ },
3254
+ output: {
3255
+ encoding: 'application/json',
3256
+ schema: {
3257
+ type: 'object',
3258
+ required: ['did', 'active'],
3259
+ properties: {
3260
+ did: {
3261
+ type: 'string',
3262
+ format: 'did',
3263
+ },
3264
+ active: {
3265
+ type: 'boolean',
3266
+ },
3267
+ status: {
3268
+ type: 'string',
3269
+ description:
3270
+ 'If active=false, this optional field indicates a possible reason for why the account is not active. If active=false and no status is supplied, then the host makes no claim for why the repository is no longer being hosted.',
3271
+ knownValues: ['takendown', 'suspended', 'deactivated'],
3272
+ },
3273
+ rev: {
3274
+ type: 'string',
3275
+ description:
3276
+ 'Optional field, the current rev of the repo, if active=true',
3277
+ },
3278
+ },
3279
+ },
3280
+ },
3281
+ errors: [
3282
+ {
3283
+ name: 'RepoNotFound',
3284
+ },
3285
+ ],
3123
3286
  },
3124
3287
  },
3125
3288
  },
@@ -3174,6 +3337,20 @@ export const schemaDict = {
3174
3337
  },
3175
3338
  },
3176
3339
  },
3340
+ errors: [
3341
+ {
3342
+ name: 'RepoNotFound',
3343
+ },
3344
+ {
3345
+ name: 'RepoTakendown',
3346
+ },
3347
+ {
3348
+ name: 'RepoSuspended',
3349
+ },
3350
+ {
3351
+ name: 'RepoDeactivated',
3352
+ },
3353
+ ],
3177
3354
  },
3178
3355
  },
3179
3356
  },
@@ -3235,6 +3412,15 @@ export const schemaDict = {
3235
3412
  rev: {
3236
3413
  type: 'string',
3237
3414
  },
3415
+ active: {
3416
+ type: 'boolean',
3417
+ },
3418
+ status: {
3419
+ type: 'string',
3420
+ description:
3421
+ 'If active=false, this optional field indicates a possible reason for why the account is not active. If active=false and no status is supplied, then the host makes no claim for why the repository is no longer being hosted.',
3422
+ knownValues: ['takendown', 'suspended', 'deactivated'],
3423
+ },
3238
3424
  },
3239
3425
  },
3240
3426
  },
@@ -3312,6 +3498,7 @@ export const schemaDict = {
3312
3498
  refs: [
3313
3499
  'lex:com.atproto.sync.subscribeRepos#commit',
3314
3500
  'lex:com.atproto.sync.subscribeRepos#identity',
3501
+ 'lex:com.atproto.sync.subscribeRepos#account',
3315
3502
  'lex:com.atproto.sync.subscribeRepos#handle',
3316
3503
  'lex:com.atproto.sync.subscribeRepos#migrate',
3317
3504
  'lex:com.atproto.sync.subscribeRepos#tombstone',
@@ -3435,12 +3622,47 @@ export const schemaDict = {
3435
3622
  type: 'string',
3436
3623
  format: 'datetime',
3437
3624
  },
3625
+ handle: {
3626
+ type: 'string',
3627
+ format: 'handle',
3628
+ description:
3629
+ "The current handle for the account, or 'handle.invalid' if validation fails. This field is optional, might have been validated or passed-through from an upstream source. Semantics and behaviors for PDS vs Relay may evolve in the future; see atproto specs for more details.",
3630
+ },
3438
3631
  },
3439
3632
  },
3440
- handle: {
3633
+ account: {
3441
3634
  type: 'object',
3442
3635
  description:
3443
- "Represents an update of the account's handle, or transition to/from invalid state. NOTE: Will be deprecated in favor of #identity.",
3636
+ "Represents a change to an account's status on a host (eg, PDS or Relay). The semantics of this event are that the status is at the host which emitted the event, not necessarily that at the currently active PDS. Eg, a Relay takedown would emit a takedown with active=false, even if the PDS is still active.",
3637
+ required: ['seq', 'did', 'time', 'active'],
3638
+ properties: {
3639
+ seq: {
3640
+ type: 'integer',
3641
+ },
3642
+ did: {
3643
+ type: 'string',
3644
+ format: 'did',
3645
+ },
3646
+ time: {
3647
+ type: 'string',
3648
+ format: 'datetime',
3649
+ },
3650
+ active: {
3651
+ type: 'boolean',
3652
+ description:
3653
+ 'Indicates that the account has a repository which can be fetched from the host that emitted this event.',
3654
+ },
3655
+ status: {
3656
+ type: 'string',
3657
+ description:
3658
+ 'If active=false, this optional field indicates a reason for why the account is not active.',
3659
+ knownValues: ['takendown', 'suspended', 'deleted', 'deactivated'],
3660
+ },
3661
+ },
3662
+ },
3663
+ handle: {
3664
+ type: 'object',
3665
+ description: 'DEPRECATED -- Use #identity event instead',
3444
3666
  required: ['seq', 'did', 'handle', 'time'],
3445
3667
  properties: {
3446
3668
  seq: {
@@ -3462,8 +3684,7 @@ export const schemaDict = {
3462
3684
  },
3463
3685
  migrate: {
3464
3686
  type: 'object',
3465
- description:
3466
- 'Represents an account moving from one PDS instance to another. NOTE: not implemented; account migration uses #identity instead',
3687
+ description: 'DEPRECATED -- Use #account event instead',
3467
3688
  required: ['seq', 'did', 'migrateTo', 'time'],
3468
3689
  nullable: ['migrateTo'],
3469
3690
  properties: {
@@ -3485,8 +3706,7 @@ export const schemaDict = {
3485
3706
  },
3486
3707
  tombstone: {
3487
3708
  type: 'object',
3488
- description:
3489
- 'Indicates that an account has been deleted. NOTE: may be deprecated in favor of #identity or a future #account event',
3709
+ description: 'DEPRECATED -- Use #account event instead',
3490
3710
  required: ['seq', 'did', 'time'],
3491
3711
  properties: {
3492
3712
  seq: {
@@ -8379,7 +8599,7 @@ export const schemaDict = {
8379
8599
  },
8380
8600
  embed: {
8381
8601
  type: 'union',
8382
- refs: ['lex:app.bsky.embed.record'],
8602
+ refs: ['lex:app.bsky.embed.record#view'],
8383
8603
  },
8384
8604
  sender: {
8385
8605
  type: 'ref',
@@ -9814,6 +10034,10 @@ export const schemaDict = {
9814
10034
  inviteNote: {
9815
10035
  type: 'string',
9816
10036
  },
10037
+ deactivatedAt: {
10038
+ type: 'string',
10039
+ format: 'datetime',
10040
+ },
9817
10041
  },
9818
10042
  },
9819
10043
  repoViewDetail: {
@@ -9879,6 +10103,10 @@ export const schemaDict = {
9879
10103
  type: 'string',
9880
10104
  format: 'datetime',
9881
10105
  },
10106
+ deactivatedAt: {
10107
+ type: 'string',
10108
+ format: 'datetime',
10109
+ },
9882
10110
  },
9883
10111
  },
9884
10112
  repoViewNotFound: {
@@ -10624,6 +10852,7 @@ export const ids = {
10624
10852
  ComAtprotoSyncGetLatestCommit: 'com.atproto.sync.getLatestCommit',
10625
10853
  ComAtprotoSyncGetRecord: 'com.atproto.sync.getRecord',
10626
10854
  ComAtprotoSyncGetRepo: 'com.atproto.sync.getRepo',
10855
+ ComAtprotoSyncGetRepoStatus: 'com.atproto.sync.getRepoStatus',
10627
10856
  ComAtprotoSyncListBlobs: 'com.atproto.sync.listBlobs',
10628
10857
  ComAtprotoSyncListRepos: 'com.atproto.sync.listRepos',
10629
10858
  ComAtprotoSyncNotifyOfUpdate: 'com.atproto.sync.notifyOfUpdate',
@@ -54,7 +54,7 @@ export interface MessageView {
54
54
  text: string
55
55
  /** Annotations of text (mentions, URLs, hashtags, etc) */
56
56
  facets?: AppBskyRichtextFacet.Main[]
57
- embed?: AppBskyEmbedRecord.Main | { $type: string; [k: string]: unknown }
57
+ embed?: AppBskyEmbedRecord.View | { $type: string; [k: string]: unknown }
58
58
  sender: MessageViewSender
59
59
  sentAt: string
60
60
  [k: string]: unknown
@@ -36,6 +36,7 @@ export interface AccountView {
36
36
  invitesDisabled?: boolean
37
37
  emailConfirmedAt?: string
38
38
  inviteNote?: string
39
+ deactivatedAt?: string
39
40
  [k: string]: unknown
40
41
  }
41
42
 
@@ -25,6 +25,7 @@ export interface OutputSchema {
25
25
  | ComAtprotoAdminDefs.RepoBlobRef
26
26
  | { $type: string; [k: string]: unknown }
27
27
  takedown?: ComAtprotoAdminDefs.StatusAttr
28
+ deactivated?: ComAtprotoAdminDefs.StatusAttr
28
29
  [k: string]: unknown
29
30
  }
30
31
 
@@ -27,6 +27,9 @@ export interface OutputSchema {
27
27
  email?: string
28
28
  emailConfirmed?: boolean
29
29
  emailAuthFactor?: boolean
30
+ active?: boolean
31
+ /** If active=false, this optional field indicates a possible reason for why the account is not active. If active=false and no status is supplied, then the host makes no claim for why the repository is no longer being hosted. */
32
+ status?: 'takendown' | 'suspended' | 'deactivated' | (string & {})
30
33
  [k: string]: unknown
31
34
  }
32
35
 
@@ -19,6 +19,9 @@ export interface OutputSchema {
19
19
  emailConfirmed?: boolean
20
20
  emailAuthFactor?: boolean
21
21
  didDoc?: {}
22
+ active?: boolean
23
+ /** If active=false, this optional field indicates a possible reason for why the account is not active. If active=false and no status is supplied, then the host makes no claim for why the repository is no longer being hosted. */
24
+ status?: 'takendown' | 'suspended' | 'deactivated' | (string & {})
22
25
  [k: string]: unknown
23
26
  }
24
27
 
@@ -18,6 +18,9 @@ export interface OutputSchema {
18
18
  handle: string
19
19
  did: string
20
20
  didDoc?: {}
21
+ active?: boolean
22
+ /** Hosting status of the account. If not specified, then assume 'active'. */
23
+ status?: 'takendown' | 'suspended' | 'deactivated' | (string & {})
21
24
  [k: string]: unknown
22
25
  }
23
26
 
@@ -28,6 +28,12 @@ export interface HandlerSuccess {
28
28
  export interface HandlerError {
29
29
  status: number
30
30
  message?: string
31
+ error?:
32
+ | 'BlobNotFound'
33
+ | 'RepoNotFound'
34
+ | 'RepoTakendown'
35
+ | 'RepoSuspended'
36
+ | 'RepoDeactivated'
31
37
  }
32
38
 
33
39
  export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
@@ -27,6 +27,12 @@ export interface HandlerSuccess {
27
27
  export interface HandlerError {
28
28
  status: number
29
29
  message?: string
30
+ error?:
31
+ | 'BlockNotFound'
32
+ | 'RepoNotFound'
33
+ | 'RepoTakendown'
34
+ | 'RepoSuspended'
35
+ | 'RepoDeactivated'
30
36
  }
31
37
 
32
38
  export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
@@ -32,7 +32,7 @@ export interface HandlerSuccess {
32
32
  export interface HandlerError {
33
33
  status: number
34
34
  message?: string
35
- error?: 'RepoNotFound'
35
+ error?: 'RepoNotFound' | 'RepoTakendown' | 'RepoSuspended' | 'RepoDeactivated'
36
36
  }
37
37
 
38
38
  export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough