@atproto/pds 0.5.15 → 0.5.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (619) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/dist/account-manager/account-manager.d.ts +13 -13
  3. package/dist/account-manager/account-manager.d.ts.map +1 -1
  4. package/dist/account-manager/account-manager.js +1 -1
  5. package/dist/account-manager/account-manager.js.map +1 -1
  6. package/dist/account-manager/db/index.d.ts +1 -1
  7. package/dist/account-manager/db/index.d.ts.map +1 -1
  8. package/dist/account-manager/db/index.js.map +1 -1
  9. package/dist/account-manager/db/migrations/001-init.d.ts +1 -1
  10. package/dist/account-manager/db/migrations/001-init.d.ts.map +1 -1
  11. package/dist/account-manager/db/migrations/001-init.js.map +1 -1
  12. package/dist/account-manager/db/migrations/002-account-deactivation.d.ts +1 -1
  13. package/dist/account-manager/db/migrations/002-account-deactivation.d.ts.map +1 -1
  14. package/dist/account-manager/db/migrations/002-account-deactivation.js.map +1 -1
  15. package/dist/account-manager/db/migrations/003-privileged-app-passwords.d.ts +1 -1
  16. package/dist/account-manager/db/migrations/003-privileged-app-passwords.d.ts.map +1 -1
  17. package/dist/account-manager/db/migrations/003-privileged-app-passwords.js.map +1 -1
  18. package/dist/account-manager/db/migrations/004-oauth.d.ts +1 -1
  19. package/dist/account-manager/db/migrations/004-oauth.d.ts.map +1 -1
  20. package/dist/account-manager/db/migrations/004-oauth.js.map +1 -1
  21. package/dist/account-manager/db/migrations/005-oauth-account-management.d.ts +3 -3
  22. package/dist/account-manager/db/migrations/005-oauth-account-management.d.ts.map +1 -1
  23. package/dist/account-manager/db/migrations/005-oauth-account-management.js.map +1 -1
  24. package/dist/account-manager/db/migrations/006-oauth-permission-sets.d.ts +1 -1
  25. package/dist/account-manager/db/migrations/006-oauth-permission-sets.d.ts.map +1 -1
  26. package/dist/account-manager/db/migrations/006-oauth-permission-sets.js.map +1 -1
  27. package/dist/account-manager/db/migrations/007-lexicon-failures-index.d.ts +1 -1
  28. package/dist/account-manager/db/migrations/007-lexicon-failures-index.d.ts.map +1 -1
  29. package/dist/account-manager/db/migrations/007-lexicon-failures-index.js.map +1 -1
  30. package/dist/account-manager/db/schema/account-device.d.ts +2 -2
  31. package/dist/account-manager/db/schema/account-device.d.ts.map +1 -1
  32. package/dist/account-manager/db/schema/account-device.js.map +1 -1
  33. package/dist/account-manager/db/schema/account.d.ts +2 -2
  34. package/dist/account-manager/db/schema/account.d.ts.map +1 -1
  35. package/dist/account-manager/db/schema/account.js.map +1 -1
  36. package/dist/account-manager/db/schema/actor.d.ts +2 -2
  37. package/dist/account-manager/db/schema/actor.d.ts.map +1 -1
  38. package/dist/account-manager/db/schema/actor.js.map +1 -1
  39. package/dist/account-manager/db/schema/app-password.d.ts +1 -1
  40. package/dist/account-manager/db/schema/app-password.d.ts.map +1 -1
  41. package/dist/account-manager/db/schema/app-password.js.map +1 -1
  42. package/dist/account-manager/db/schema/authorization-request.d.ts +4 -4
  43. package/dist/account-manager/db/schema/authorization-request.d.ts.map +1 -1
  44. package/dist/account-manager/db/schema/authorization-request.js.map +1 -1
  45. package/dist/account-manager/db/schema/authorized-client.d.ts +4 -4
  46. package/dist/account-manager/db/schema/authorized-client.d.ts.map +1 -1
  47. package/dist/account-manager/db/schema/authorized-client.js.map +1 -1
  48. package/dist/account-manager/db/schema/device.d.ts +3 -3
  49. package/dist/account-manager/db/schema/device.d.ts.map +1 -1
  50. package/dist/account-manager/db/schema/device.js.map +1 -1
  51. package/dist/account-manager/db/schema/email-token.d.ts +1 -1
  52. package/dist/account-manager/db/schema/email-token.d.ts.map +1 -1
  53. package/dist/account-manager/db/schema/email-token.js.map +1 -1
  54. package/dist/account-manager/db/schema/index.d.ts +14 -14
  55. package/dist/account-manager/db/schema/index.d.ts.map +1 -1
  56. package/dist/account-manager/db/schema/index.js.map +1 -1
  57. package/dist/account-manager/db/schema/invite-code.d.ts +1 -1
  58. package/dist/account-manager/db/schema/invite-code.d.ts.map +1 -1
  59. package/dist/account-manager/db/schema/invite-code.js.map +1 -1
  60. package/dist/account-manager/db/schema/lexicon.d.ts +2 -2
  61. package/dist/account-manager/db/schema/lexicon.d.ts.map +1 -1
  62. package/dist/account-manager/db/schema/lexicon.js.map +1 -1
  63. package/dist/account-manager/db/schema/repo-root.d.ts +1 -1
  64. package/dist/account-manager/db/schema/repo-root.d.ts.map +1 -1
  65. package/dist/account-manager/db/schema/repo-root.js.map +1 -1
  66. package/dist/account-manager/db/schema/token.d.ts +4 -4
  67. package/dist/account-manager/db/schema/token.d.ts.map +1 -1
  68. package/dist/account-manager/db/schema/token.js.map +1 -1
  69. package/dist/account-manager/db/schema/used-refresh-token.d.ts +2 -2
  70. package/dist/account-manager/db/schema/used-refresh-token.d.ts.map +1 -1
  71. package/dist/account-manager/db/schema/used-refresh-token.js.map +1 -1
  72. package/dist/account-manager/helpers/account-device.d.ts +2 -2
  73. package/dist/account-manager/helpers/account-device.d.ts.map +1 -1
  74. package/dist/account-manager/helpers/account-device.js.map +1 -1
  75. package/dist/account-manager/helpers/account.d.ts +3 -3
  76. package/dist/account-manager/helpers/account.d.ts.map +1 -1
  77. package/dist/account-manager/helpers/account.js.map +1 -1
  78. package/dist/account-manager/helpers/auth.d.ts +3 -3
  79. package/dist/account-manager/helpers/auth.d.ts.map +1 -1
  80. package/dist/account-manager/helpers/auth.js.map +1 -1
  81. package/dist/account-manager/helpers/authorization-request.d.ts +5 -5
  82. package/dist/account-manager/helpers/authorization-request.d.ts.map +1 -1
  83. package/dist/account-manager/helpers/authorization-request.js.map +1 -1
  84. package/dist/account-manager/helpers/authorized-client.d.ts +2 -2
  85. package/dist/account-manager/helpers/authorized-client.d.ts.map +1 -1
  86. package/dist/account-manager/helpers/authorized-client.js.map +1 -1
  87. package/dist/account-manager/helpers/device.d.ts +3 -3
  88. package/dist/account-manager/helpers/device.d.ts.map +1 -1
  89. package/dist/account-manager/helpers/device.js.map +1 -1
  90. package/dist/account-manager/helpers/email-token.d.ts +2 -2
  91. package/dist/account-manager/helpers/email-token.d.ts.map +1 -1
  92. package/dist/account-manager/helpers/email-token.js.map +1 -1
  93. package/dist/account-manager/helpers/invite.d.ts +3 -3
  94. package/dist/account-manager/helpers/invite.d.ts.map +1 -1
  95. package/dist/account-manager/helpers/invite.js +1 -1
  96. package/dist/account-manager/helpers/invite.js.map +1 -1
  97. package/dist/account-manager/helpers/lexicon.d.ts +2 -2
  98. package/dist/account-manager/helpers/lexicon.d.ts.map +1 -1
  99. package/dist/account-manager/helpers/lexicon.js +1 -1
  100. package/dist/account-manager/helpers/lexicon.js.map +1 -1
  101. package/dist/account-manager/helpers/password.d.ts +3 -3
  102. package/dist/account-manager/helpers/password.d.ts.map +1 -1
  103. package/dist/account-manager/helpers/password.js.map +1 -1
  104. package/dist/account-manager/helpers/repo.d.ts +2 -2
  105. package/dist/account-manager/helpers/repo.d.ts.map +1 -1
  106. package/dist/account-manager/helpers/repo.js.map +1 -1
  107. package/dist/account-manager/helpers/token.d.ts +4 -4
  108. package/dist/account-manager/helpers/token.d.ts.map +1 -1
  109. package/dist/account-manager/helpers/token.js.map +1 -1
  110. package/dist/account-manager/helpers/used-refresh-token.d.ts +2 -2
  111. package/dist/account-manager/helpers/used-refresh-token.d.ts.map +1 -1
  112. package/dist/account-manager/helpers/used-refresh-token.js.map +1 -1
  113. package/dist/account-manager/oauth-store.d.ts +10 -10
  114. package/dist/account-manager/oauth-store.d.ts.map +1 -1
  115. package/dist/account-manager/oauth-store.js +3 -3
  116. package/dist/account-manager/oauth-store.js.map +1 -1
  117. package/dist/account-manager/scope-reference-getter.d.ts +4 -4
  118. package/dist/account-manager/scope-reference-getter.d.ts.map +1 -1
  119. package/dist/account-manager/scope-reference-getter.js +1 -1
  120. package/dist/account-manager/scope-reference-getter.js.map +1 -1
  121. package/dist/actor-store/actor-store-reader.d.ts +3 -3
  122. package/dist/actor-store/actor-store-reader.d.ts.map +1 -1
  123. package/dist/actor-store/actor-store-reader.js.map +1 -1
  124. package/dist/actor-store/actor-store-resources.d.ts +2 -2
  125. package/dist/actor-store/actor-store-resources.d.ts.map +1 -1
  126. package/dist/actor-store/actor-store-resources.js.map +1 -1
  127. package/dist/actor-store/actor-store-transactor.d.ts +3 -3
  128. package/dist/actor-store/actor-store-transactor.d.ts.map +1 -1
  129. package/dist/actor-store/actor-store-transactor.js.map +1 -1
  130. package/dist/actor-store/actor-store.d.ts +4 -4
  131. package/dist/actor-store/actor-store.d.ts.map +1 -1
  132. package/dist/actor-store/actor-store.js.map +1 -1
  133. package/dist/actor-store/blob/reader.d.ts +6 -6
  134. package/dist/actor-store/blob/reader.d.ts.map +1 -1
  135. package/dist/actor-store/blob/reader.js.map +1 -1
  136. package/dist/actor-store/blob/transactor.d.ts +8 -8
  137. package/dist/actor-store/blob/transactor.d.ts.map +1 -1
  138. package/dist/actor-store/blob/transactor.js.map +1 -1
  139. package/dist/actor-store/db/index.d.ts +1 -1
  140. package/dist/actor-store/db/index.d.ts.map +1 -1
  141. package/dist/actor-store/db/index.js.map +1 -1
  142. package/dist/actor-store/db/migrations/001-init.d.ts +1 -1
  143. package/dist/actor-store/db/migrations/001-init.d.ts.map +1 -1
  144. package/dist/actor-store/db/migrations/001-init.js.map +1 -1
  145. package/dist/actor-store/db/schema/account-pref.d.ts +1 -1
  146. package/dist/actor-store/db/schema/account-pref.d.ts.map +1 -1
  147. package/dist/actor-store/db/schema/account-pref.js.map +1 -1
  148. package/dist/actor-store/db/schema/index.d.ts +7 -7
  149. package/dist/actor-store/db/schema/index.d.ts.map +1 -1
  150. package/dist/actor-store/db/schema/index.js.map +1 -1
  151. package/dist/actor-store/migrate.d.ts +1 -1
  152. package/dist/actor-store/migrate.d.ts.map +1 -1
  153. package/dist/actor-store/migrate.js.map +1 -1
  154. package/dist/actor-store/preference/reader.d.ts +2 -2
  155. package/dist/actor-store/preference/reader.d.ts.map +1 -1
  156. package/dist/actor-store/preference/reader.js.map +1 -1
  157. package/dist/actor-store/preference/transactor.d.ts +2 -2
  158. package/dist/actor-store/preference/transactor.d.ts.map +1 -1
  159. package/dist/actor-store/preference/transactor.js.map +1 -1
  160. package/dist/actor-store/record/reader.d.ts +5 -5
  161. package/dist/actor-store/record/reader.d.ts.map +1 -1
  162. package/dist/actor-store/record/reader.js.map +1 -1
  163. package/dist/actor-store/record/transactor.d.ts +5 -5
  164. package/dist/actor-store/record/transactor.d.ts.map +1 -1
  165. package/dist/actor-store/record/transactor.js.map +1 -1
  166. package/dist/actor-store/repo/reader.d.ts +3 -3
  167. package/dist/actor-store/repo/reader.d.ts.map +1 -1
  168. package/dist/actor-store/repo/reader.js.map +1 -1
  169. package/dist/actor-store/repo/sql-repo-reader.d.ts +3 -3
  170. package/dist/actor-store/repo/sql-repo-reader.d.ts.map +1 -1
  171. package/dist/actor-store/repo/sql-repo-reader.js.map +1 -1
  172. package/dist/actor-store/repo/sql-repo-transactor.d.ts +3 -3
  173. package/dist/actor-store/repo/sql-repo-transactor.d.ts.map +1 -1
  174. package/dist/actor-store/repo/sql-repo-transactor.js.map +1 -1
  175. package/dist/actor-store/repo/transactor.d.ts +7 -7
  176. package/dist/actor-store/repo/transactor.d.ts.map +1 -1
  177. package/dist/actor-store/repo/transactor.js +1 -1
  178. package/dist/actor-store/repo/transactor.js.map +1 -1
  179. package/dist/api/app/bsky/actor/getPreferences.d.ts +2 -2
  180. package/dist/api/app/bsky/actor/getPreferences.d.ts.map +1 -1
  181. package/dist/api/app/bsky/actor/getPreferences.js.map +1 -1
  182. package/dist/api/app/bsky/actor/getProfile.d.ts +2 -2
  183. package/dist/api/app/bsky/actor/getProfile.d.ts.map +1 -1
  184. package/dist/api/app/bsky/actor/getProfile.js.map +1 -1
  185. package/dist/api/app/bsky/actor/getProfiles.d.ts +2 -2
  186. package/dist/api/app/bsky/actor/getProfiles.d.ts.map +1 -1
  187. package/dist/api/app/bsky/actor/getProfiles.js.map +1 -1
  188. package/dist/api/app/bsky/actor/index.d.ts +2 -2
  189. package/dist/api/app/bsky/actor/index.d.ts.map +1 -1
  190. package/dist/api/app/bsky/actor/index.js.map +1 -1
  191. package/dist/api/app/bsky/actor/putPreferences.d.ts +2 -2
  192. package/dist/api/app/bsky/actor/putPreferences.d.ts.map +1 -1
  193. package/dist/api/app/bsky/actor/putPreferences.js.map +1 -1
  194. package/dist/api/app/bsky/feed/getActorLikes.d.ts +2 -2
  195. package/dist/api/app/bsky/feed/getActorLikes.d.ts.map +1 -1
  196. package/dist/api/app/bsky/feed/getActorLikes.js.map +1 -1
  197. package/dist/api/app/bsky/feed/getAuthorFeed.d.ts +2 -2
  198. package/dist/api/app/bsky/feed/getAuthorFeed.d.ts.map +1 -1
  199. package/dist/api/app/bsky/feed/getAuthorFeed.js.map +1 -1
  200. package/dist/api/app/bsky/feed/getFeed.d.ts +2 -2
  201. package/dist/api/app/bsky/feed/getFeed.d.ts.map +1 -1
  202. package/dist/api/app/bsky/feed/getFeed.js +1 -1
  203. package/dist/api/app/bsky/feed/getFeed.js.map +1 -1
  204. package/dist/api/app/bsky/feed/getPostThread.d.ts +2 -2
  205. package/dist/api/app/bsky/feed/getPostThread.d.ts.map +1 -1
  206. package/dist/api/app/bsky/feed/getPostThread.js.map +1 -1
  207. package/dist/api/app/bsky/feed/getTimeline.d.ts +2 -2
  208. package/dist/api/app/bsky/feed/getTimeline.d.ts.map +1 -1
  209. package/dist/api/app/bsky/feed/getTimeline.js.map +1 -1
  210. package/dist/api/app/bsky/feed/index.d.ts +2 -2
  211. package/dist/api/app/bsky/feed/index.d.ts.map +1 -1
  212. package/dist/api/app/bsky/feed/index.js.map +1 -1
  213. package/dist/api/app/bsky/index.d.ts +2 -2
  214. package/dist/api/app/bsky/index.d.ts.map +1 -1
  215. package/dist/api/app/bsky/index.js.map +1 -1
  216. package/dist/api/app/bsky/notification/index.d.ts +2 -2
  217. package/dist/api/app/bsky/notification/index.d.ts.map +1 -1
  218. package/dist/api/app/bsky/notification/index.js.map +1 -1
  219. package/dist/api/app/bsky/notification/registerPush.d.ts +2 -2
  220. package/dist/api/app/bsky/notification/registerPush.d.ts.map +1 -1
  221. package/dist/api/app/bsky/notification/registerPush.js.map +1 -1
  222. package/dist/api/app/bsky/notification/unregisterPush.d.ts +2 -2
  223. package/dist/api/app/bsky/notification/unregisterPush.d.ts.map +1 -1
  224. package/dist/api/app/bsky/notification/unregisterPush.js.map +1 -1
  225. package/dist/api/app/bsky/util/resolver.d.ts +1 -1
  226. package/dist/api/app/bsky/util/resolver.d.ts.map +1 -1
  227. package/dist/api/app/bsky/util/resolver.js +1 -1
  228. package/dist/api/app/bsky/util/resolver.js.map +1 -1
  229. package/dist/api/com/atproto/admin/deleteAccount.d.ts +2 -2
  230. package/dist/api/com/atproto/admin/deleteAccount.d.ts.map +1 -1
  231. package/dist/api/com/atproto/admin/deleteAccount.js.map +1 -1
  232. package/dist/api/com/atproto/admin/disableAccountInvites.d.ts +2 -2
  233. package/dist/api/com/atproto/admin/disableAccountInvites.d.ts.map +1 -1
  234. package/dist/api/com/atproto/admin/disableAccountInvites.js.map +1 -1
  235. package/dist/api/com/atproto/admin/disableInviteCodes.d.ts +2 -2
  236. package/dist/api/com/atproto/admin/disableInviteCodes.d.ts.map +1 -1
  237. package/dist/api/com/atproto/admin/disableInviteCodes.js.map +1 -1
  238. package/dist/api/com/atproto/admin/enableAccountInvites.d.ts +2 -2
  239. package/dist/api/com/atproto/admin/enableAccountInvites.d.ts.map +1 -1
  240. package/dist/api/com/atproto/admin/enableAccountInvites.js.map +1 -1
  241. package/dist/api/com/atproto/admin/getAccountInfo.d.ts +2 -2
  242. package/dist/api/com/atproto/admin/getAccountInfo.d.ts.map +1 -1
  243. package/dist/api/com/atproto/admin/getAccountInfo.js.map +1 -1
  244. package/dist/api/com/atproto/admin/getAccountInfos.d.ts +2 -2
  245. package/dist/api/com/atproto/admin/getAccountInfos.d.ts.map +1 -1
  246. package/dist/api/com/atproto/admin/getAccountInfos.js.map +1 -1
  247. package/dist/api/com/atproto/admin/getInviteCodes.d.ts +3 -3
  248. package/dist/api/com/atproto/admin/getInviteCodes.d.ts.map +1 -1
  249. package/dist/api/com/atproto/admin/getInviteCodes.js.map +1 -1
  250. package/dist/api/com/atproto/admin/getSubjectStatus.d.ts +2 -2
  251. package/dist/api/com/atproto/admin/getSubjectStatus.d.ts.map +1 -1
  252. package/dist/api/com/atproto/admin/getSubjectStatus.js.map +1 -1
  253. package/dist/api/com/atproto/admin/index.d.ts +2 -2
  254. package/dist/api/com/atproto/admin/index.d.ts.map +1 -1
  255. package/dist/api/com/atproto/admin/index.js.map +1 -1
  256. package/dist/api/com/atproto/admin/sendEmail.d.ts +2 -2
  257. package/dist/api/com/atproto/admin/sendEmail.d.ts.map +1 -1
  258. package/dist/api/com/atproto/admin/sendEmail.js.map +1 -1
  259. package/dist/api/com/atproto/admin/updateAccountEmail.d.ts +2 -2
  260. package/dist/api/com/atproto/admin/updateAccountEmail.d.ts.map +1 -1
  261. package/dist/api/com/atproto/admin/updateAccountEmail.js.map +1 -1
  262. package/dist/api/com/atproto/admin/updateAccountHandle.d.ts +2 -2
  263. package/dist/api/com/atproto/admin/updateAccountHandle.d.ts.map +1 -1
  264. package/dist/api/com/atproto/admin/updateAccountHandle.js.map +1 -1
  265. package/dist/api/com/atproto/admin/updateAccountPassword.d.ts +2 -2
  266. package/dist/api/com/atproto/admin/updateAccountPassword.d.ts.map +1 -1
  267. package/dist/api/com/atproto/admin/updateAccountPassword.js.map +1 -1
  268. package/dist/api/com/atproto/admin/updateSubjectStatus.d.ts +2 -2
  269. package/dist/api/com/atproto/admin/updateSubjectStatus.d.ts.map +1 -1
  270. package/dist/api/com/atproto/admin/updateSubjectStatus.js.map +1 -1
  271. package/dist/api/com/atproto/admin/util.d.ts +4 -4
  272. package/dist/api/com/atproto/admin/util.d.ts.map +1 -1
  273. package/dist/api/com/atproto/admin/util.js.map +1 -1
  274. package/dist/api/com/atproto/identity/getRecommendedDidCredentials.d.ts +2 -2
  275. package/dist/api/com/atproto/identity/getRecommendedDidCredentials.d.ts.map +1 -1
  276. package/dist/api/com/atproto/identity/getRecommendedDidCredentials.js.map +1 -1
  277. package/dist/api/com/atproto/identity/index.d.ts +2 -2
  278. package/dist/api/com/atproto/identity/index.d.ts.map +1 -1
  279. package/dist/api/com/atproto/identity/index.js.map +1 -1
  280. package/dist/api/com/atproto/identity/requestPlcOperationSignature.d.ts +2 -2
  281. package/dist/api/com/atproto/identity/requestPlcOperationSignature.d.ts.map +1 -1
  282. package/dist/api/com/atproto/identity/requestPlcOperationSignature.js.map +1 -1
  283. package/dist/api/com/atproto/identity/resolveHandle.d.ts +2 -2
  284. package/dist/api/com/atproto/identity/resolveHandle.d.ts.map +1 -1
  285. package/dist/api/com/atproto/identity/resolveHandle.js.map +1 -1
  286. package/dist/api/com/atproto/identity/signPlcOperation.d.ts +2 -2
  287. package/dist/api/com/atproto/identity/signPlcOperation.d.ts.map +1 -1
  288. package/dist/api/com/atproto/identity/signPlcOperation.js.map +1 -1
  289. package/dist/api/com/atproto/identity/submitPlcOperation.d.ts +2 -2
  290. package/dist/api/com/atproto/identity/submitPlcOperation.d.ts.map +1 -1
  291. package/dist/api/com/atproto/identity/submitPlcOperation.js.map +1 -1
  292. package/dist/api/com/atproto/identity/updateHandle.d.ts +2 -2
  293. package/dist/api/com/atproto/identity/updateHandle.d.ts.map +1 -1
  294. package/dist/api/com/atproto/identity/updateHandle.js.map +1 -1
  295. package/dist/api/com/atproto/index.d.ts +2 -2
  296. package/dist/api/com/atproto/index.d.ts.map +1 -1
  297. package/dist/api/com/atproto/index.js.map +1 -1
  298. package/dist/api/com/atproto/moderation/createReport.d.ts +2 -2
  299. package/dist/api/com/atproto/moderation/createReport.d.ts.map +1 -1
  300. package/dist/api/com/atproto/moderation/createReport.js.map +1 -1
  301. package/dist/api/com/atproto/moderation/index.d.ts +2 -2
  302. package/dist/api/com/atproto/moderation/index.d.ts.map +1 -1
  303. package/dist/api/com/atproto/moderation/index.js.map +1 -1
  304. package/dist/api/com/atproto/repo/applyWrites.d.ts +2 -2
  305. package/dist/api/com/atproto/repo/applyWrites.d.ts.map +1 -1
  306. package/dist/api/com/atproto/repo/applyWrites.js.map +1 -1
  307. package/dist/api/com/atproto/repo/createRecord.d.ts +2 -2
  308. package/dist/api/com/atproto/repo/createRecord.d.ts.map +1 -1
  309. package/dist/api/com/atproto/repo/createRecord.js.map +1 -1
  310. package/dist/api/com/atproto/repo/deleteRecord.d.ts +2 -2
  311. package/dist/api/com/atproto/repo/deleteRecord.d.ts.map +1 -1
  312. package/dist/api/com/atproto/repo/deleteRecord.js.map +1 -1
  313. package/dist/api/com/atproto/repo/describeRepo.d.ts +2 -2
  314. package/dist/api/com/atproto/repo/describeRepo.d.ts.map +1 -1
  315. package/dist/api/com/atproto/repo/describeRepo.js.map +1 -1
  316. package/dist/api/com/atproto/repo/getRecord.d.ts +2 -2
  317. package/dist/api/com/atproto/repo/getRecord.d.ts.map +1 -1
  318. package/dist/api/com/atproto/repo/getRecord.js.map +1 -1
  319. package/dist/api/com/atproto/repo/importRepo.d.ts +2 -2
  320. package/dist/api/com/atproto/repo/importRepo.d.ts.map +1 -1
  321. package/dist/api/com/atproto/repo/importRepo.js.map +1 -1
  322. package/dist/api/com/atproto/repo/index.d.ts +2 -2
  323. package/dist/api/com/atproto/repo/index.d.ts.map +1 -1
  324. package/dist/api/com/atproto/repo/index.js.map +1 -1
  325. package/dist/api/com/atproto/repo/listMissingBlobs.d.ts +2 -2
  326. package/dist/api/com/atproto/repo/listMissingBlobs.d.ts.map +1 -1
  327. package/dist/api/com/atproto/repo/listMissingBlobs.js.map +1 -1
  328. package/dist/api/com/atproto/repo/listRecords.d.ts +2 -2
  329. package/dist/api/com/atproto/repo/listRecords.d.ts.map +1 -1
  330. package/dist/api/com/atproto/repo/listRecords.js.map +1 -1
  331. package/dist/api/com/atproto/repo/putRecord.d.ts +2 -2
  332. package/dist/api/com/atproto/repo/putRecord.d.ts.map +1 -1
  333. package/dist/api/com/atproto/repo/putRecord.js.map +1 -1
  334. package/dist/api/com/atproto/repo/uploadBlob.d.ts +2 -2
  335. package/dist/api/com/atproto/repo/uploadBlob.d.ts.map +1 -1
  336. package/dist/api/com/atproto/repo/uploadBlob.js +9 -2
  337. package/dist/api/com/atproto/repo/uploadBlob.js.map +1 -1
  338. package/dist/api/com/atproto/server/activateAccount.d.ts +2 -2
  339. package/dist/api/com/atproto/server/activateAccount.d.ts.map +1 -1
  340. package/dist/api/com/atproto/server/activateAccount.js.map +1 -1
  341. package/dist/api/com/atproto/server/checkAccountStatus.d.ts +2 -2
  342. package/dist/api/com/atproto/server/checkAccountStatus.d.ts.map +1 -1
  343. package/dist/api/com/atproto/server/checkAccountStatus.js.map +1 -1
  344. package/dist/api/com/atproto/server/confirmEmail.d.ts +2 -2
  345. package/dist/api/com/atproto/server/confirmEmail.d.ts.map +1 -1
  346. package/dist/api/com/atproto/server/confirmEmail.js.map +1 -1
  347. package/dist/api/com/atproto/server/createAccount.d.ts +2 -2
  348. package/dist/api/com/atproto/server/createAccount.d.ts.map +1 -1
  349. package/dist/api/com/atproto/server/createAccount.js +1 -1
  350. package/dist/api/com/atproto/server/createAccount.js.map +1 -1
  351. package/dist/api/com/atproto/server/createAppPassword.d.ts +2 -2
  352. package/dist/api/com/atproto/server/createAppPassword.d.ts.map +1 -1
  353. package/dist/api/com/atproto/server/createAppPassword.js.map +1 -1
  354. package/dist/api/com/atproto/server/createInviteCode.d.ts +2 -2
  355. package/dist/api/com/atproto/server/createInviteCode.d.ts.map +1 -1
  356. package/dist/api/com/atproto/server/createInviteCode.js.map +1 -1
  357. package/dist/api/com/atproto/server/createInviteCodes.d.ts +2 -2
  358. package/dist/api/com/atproto/server/createInviteCodes.d.ts.map +1 -1
  359. package/dist/api/com/atproto/server/createInviteCodes.js.map +1 -1
  360. package/dist/api/com/atproto/server/createSession.d.ts +2 -2
  361. package/dist/api/com/atproto/server/createSession.d.ts.map +1 -1
  362. package/dist/api/com/atproto/server/createSession.js +1 -1
  363. package/dist/api/com/atproto/server/createSession.js.map +1 -1
  364. package/dist/api/com/atproto/server/deactivateAccount.d.ts +2 -2
  365. package/dist/api/com/atproto/server/deactivateAccount.d.ts.map +1 -1
  366. package/dist/api/com/atproto/server/deactivateAccount.js.map +1 -1
  367. package/dist/api/com/atproto/server/deleteAccount.d.ts +2 -2
  368. package/dist/api/com/atproto/server/deleteAccount.d.ts.map +1 -1
  369. package/dist/api/com/atproto/server/deleteAccount.js.map +1 -1
  370. package/dist/api/com/atproto/server/deleteSession.d.ts +2 -2
  371. package/dist/api/com/atproto/server/deleteSession.d.ts.map +1 -1
  372. package/dist/api/com/atproto/server/deleteSession.js.map +1 -1
  373. package/dist/api/com/atproto/server/describeServer.d.ts +2 -2
  374. package/dist/api/com/atproto/server/describeServer.d.ts.map +1 -1
  375. package/dist/api/com/atproto/server/describeServer.js.map +1 -1
  376. package/dist/api/com/atproto/server/getAccountInviteCodes.d.ts +2 -2
  377. package/dist/api/com/atproto/server/getAccountInviteCodes.d.ts.map +1 -1
  378. package/dist/api/com/atproto/server/getAccountInviteCodes.js.map +1 -1
  379. package/dist/api/com/atproto/server/getServiceAuth.d.ts +2 -2
  380. package/dist/api/com/atproto/server/getServiceAuth.d.ts.map +1 -1
  381. package/dist/api/com/atproto/server/getServiceAuth.js.map +1 -1
  382. package/dist/api/com/atproto/server/getSession.d.ts +2 -2
  383. package/dist/api/com/atproto/server/getSession.d.ts.map +1 -1
  384. package/dist/api/com/atproto/server/getSession.js +1 -1
  385. package/dist/api/com/atproto/server/getSession.js.map +1 -1
  386. package/dist/api/com/atproto/server/index.d.ts +2 -2
  387. package/dist/api/com/atproto/server/index.d.ts.map +1 -1
  388. package/dist/api/com/atproto/server/index.js.map +1 -1
  389. package/dist/api/com/atproto/server/listAppPasswords.d.ts +2 -2
  390. package/dist/api/com/atproto/server/listAppPasswords.d.ts.map +1 -1
  391. package/dist/api/com/atproto/server/listAppPasswords.js.map +1 -1
  392. package/dist/api/com/atproto/server/refreshSession.d.ts +2 -2
  393. package/dist/api/com/atproto/server/refreshSession.d.ts.map +1 -1
  394. package/dist/api/com/atproto/server/refreshSession.js +1 -1
  395. package/dist/api/com/atproto/server/refreshSession.js.map +1 -1
  396. package/dist/api/com/atproto/server/requestAccountDelete.d.ts +2 -2
  397. package/dist/api/com/atproto/server/requestAccountDelete.d.ts.map +1 -1
  398. package/dist/api/com/atproto/server/requestAccountDelete.js.map +1 -1
  399. package/dist/api/com/atproto/server/requestEmailConfirmation.d.ts +3 -3
  400. package/dist/api/com/atproto/server/requestEmailConfirmation.d.ts.map +1 -1
  401. package/dist/api/com/atproto/server/requestEmailConfirmation.js.map +1 -1
  402. package/dist/api/com/atproto/server/requestEmailUpdate.d.ts +3 -3
  403. package/dist/api/com/atproto/server/requestEmailUpdate.d.ts.map +1 -1
  404. package/dist/api/com/atproto/server/requestEmailUpdate.js.map +1 -1
  405. package/dist/api/com/atproto/server/requestPasswordReset.d.ts +2 -2
  406. package/dist/api/com/atproto/server/requestPasswordReset.d.ts.map +1 -1
  407. package/dist/api/com/atproto/server/requestPasswordReset.js.map +1 -1
  408. package/dist/api/com/atproto/server/reserveSigningKey.d.ts +2 -2
  409. package/dist/api/com/atproto/server/reserveSigningKey.d.ts.map +1 -1
  410. package/dist/api/com/atproto/server/reserveSigningKey.js.map +1 -1
  411. package/dist/api/com/atproto/server/resetPassword.d.ts +2 -2
  412. package/dist/api/com/atproto/server/resetPassword.d.ts.map +1 -1
  413. package/dist/api/com/atproto/server/resetPassword.js.map +1 -1
  414. package/dist/api/com/atproto/server/revokeAppPassword.d.ts +2 -2
  415. package/dist/api/com/atproto/server/revokeAppPassword.d.ts.map +1 -1
  416. package/dist/api/com/atproto/server/revokeAppPassword.js.map +1 -1
  417. package/dist/api/com/atproto/server/updateEmail.d.ts +2 -2
  418. package/dist/api/com/atproto/server/updateEmail.d.ts.map +1 -1
  419. package/dist/api/com/atproto/server/updateEmail.js.map +1 -1
  420. package/dist/api/com/atproto/server/util.d.ts +4 -4
  421. package/dist/api/com/atproto/server/util.d.ts.map +1 -1
  422. package/dist/api/com/atproto/server/util.js.map +1 -1
  423. package/dist/api/com/atproto/sync/deprecated/getCheckout.d.ts +2 -2
  424. package/dist/api/com/atproto/sync/deprecated/getCheckout.d.ts.map +1 -1
  425. package/dist/api/com/atproto/sync/deprecated/getCheckout.js.map +1 -1
  426. package/dist/api/com/atproto/sync/deprecated/getHead.d.ts +2 -2
  427. package/dist/api/com/atproto/sync/deprecated/getHead.d.ts.map +1 -1
  428. package/dist/api/com/atproto/sync/deprecated/getHead.js.map +1 -1
  429. package/dist/api/com/atproto/sync/getBlob.d.ts +2 -2
  430. package/dist/api/com/atproto/sync/getBlob.d.ts.map +1 -1
  431. package/dist/api/com/atproto/sync/getBlob.js.map +1 -1
  432. package/dist/api/com/atproto/sync/getBlocks.d.ts +2 -2
  433. package/dist/api/com/atproto/sync/getBlocks.d.ts.map +1 -1
  434. package/dist/api/com/atproto/sync/getBlocks.js.map +1 -1
  435. package/dist/api/com/atproto/sync/getLatestCommit.d.ts +2 -2
  436. package/dist/api/com/atproto/sync/getLatestCommit.d.ts.map +1 -1
  437. package/dist/api/com/atproto/sync/getLatestCommit.js.map +1 -1
  438. package/dist/api/com/atproto/sync/getRecord.d.ts +2 -2
  439. package/dist/api/com/atproto/sync/getRecord.d.ts.map +1 -1
  440. package/dist/api/com/atproto/sync/getRecord.js.map +1 -1
  441. package/dist/api/com/atproto/sync/getRepo.d.ts +3 -3
  442. package/dist/api/com/atproto/sync/getRepo.d.ts.map +1 -1
  443. package/dist/api/com/atproto/sync/getRepo.js.map +1 -1
  444. package/dist/api/com/atproto/sync/getRepoStatus.d.ts +2 -2
  445. package/dist/api/com/atproto/sync/getRepoStatus.d.ts.map +1 -1
  446. package/dist/api/com/atproto/sync/getRepoStatus.js.map +1 -1
  447. package/dist/api/com/atproto/sync/index.d.ts +2 -2
  448. package/dist/api/com/atproto/sync/index.d.ts.map +1 -1
  449. package/dist/api/com/atproto/sync/index.js.map +1 -1
  450. package/dist/api/com/atproto/sync/listBlobs.d.ts +2 -2
  451. package/dist/api/com/atproto/sync/listBlobs.d.ts.map +1 -1
  452. package/dist/api/com/atproto/sync/listBlobs.js.map +1 -1
  453. package/dist/api/com/atproto/sync/listRepos.d.ts +3 -3
  454. package/dist/api/com/atproto/sync/listRepos.d.ts.map +1 -1
  455. package/dist/api/com/atproto/sync/listRepos.js +1 -1
  456. package/dist/api/com/atproto/sync/listRepos.js.map +1 -1
  457. package/dist/api/com/atproto/sync/subscribeRepos.d.ts +2 -2
  458. package/dist/api/com/atproto/sync/subscribeRepos.d.ts.map +1 -1
  459. package/dist/api/com/atproto/sync/subscribeRepos.js.map +1 -1
  460. package/dist/api/com/atproto/sync/util.d.ts +3 -3
  461. package/dist/api/com/atproto/sync/util.d.ts.map +1 -1
  462. package/dist/api/com/atproto/sync/util.js.map +1 -1
  463. package/dist/api/com/atproto/temp/checkSignupQueue.d.ts +2 -2
  464. package/dist/api/com/atproto/temp/checkSignupQueue.d.ts.map +1 -1
  465. package/dist/api/com/atproto/temp/checkSignupQueue.js.map +1 -1
  466. package/dist/api/com/atproto/temp/index.d.ts +2 -2
  467. package/dist/api/com/atproto/temp/index.d.ts.map +1 -1
  468. package/dist/api/com/atproto/temp/index.js.map +1 -1
  469. package/dist/api/index.d.ts +2 -2
  470. package/dist/api/index.d.ts.map +1 -1
  471. package/dist/api/index.js.map +1 -1
  472. package/dist/api/proxy.d.ts +2 -2
  473. package/dist/api/proxy.d.ts.map +1 -1
  474. package/dist/api/proxy.js.map +1 -1
  475. package/dist/auth-output.d.ts +3 -3
  476. package/dist/auth-output.d.ts.map +1 -1
  477. package/dist/auth-output.js.map +1 -1
  478. package/dist/auth-routes.d.ts +1 -1
  479. package/dist/auth-routes.d.ts.map +1 -1
  480. package/dist/auth-routes.js +4 -2
  481. package/dist/auth-routes.js.map +1 -1
  482. package/dist/auth-verifier.d.ts +11 -11
  483. package/dist/auth-verifier.d.ts.map +1 -1
  484. package/dist/auth-verifier.js +2 -2
  485. package/dist/auth-verifier.js.map +1 -1
  486. package/dist/basic-routes.d.ts +1 -1
  487. package/dist/basic-routes.d.ts.map +1 -1
  488. package/dist/basic-routes.js.map +1 -1
  489. package/dist/config/config.d.ts +4 -3
  490. package/dist/config/config.d.ts.map +1 -1
  491. package/dist/config/config.js +1 -0
  492. package/dist/config/config.js.map +1 -1
  493. package/dist/config/env.d.ts +1 -0
  494. package/dist/config/env.d.ts.map +1 -1
  495. package/dist/config/env.js +1 -0
  496. package/dist/config/env.js.map +1 -1
  497. package/dist/config/secrets.d.ts +1 -1
  498. package/dist/config/secrets.d.ts.map +1 -1
  499. package/dist/config/secrets.js.map +1 -1
  500. package/dist/context.d.ts +8 -8
  501. package/dist/context.d.ts.map +1 -1
  502. package/dist/context.js +4 -2
  503. package/dist/context.js.map +1 -1
  504. package/dist/crawlers.d.ts +1 -1
  505. package/dist/crawlers.d.ts.map +1 -1
  506. package/dist/crawlers.js.map +1 -1
  507. package/dist/db/db.js.map +1 -1
  508. package/dist/db/migrator.d.ts +2 -2
  509. package/dist/db/migrator.d.ts.map +1 -1
  510. package/dist/db/migrator.js.map +1 -1
  511. package/dist/db/pagination.d.ts +2 -2
  512. package/dist/db/pagination.d.ts.map +1 -1
  513. package/dist/db/pagination.js.map +1 -1
  514. package/dist/db/tables/moderation.d.ts +2 -2
  515. package/dist/db/tables/moderation.d.ts.map +1 -1
  516. package/dist/db/tables/moderation.js.map +1 -1
  517. package/dist/db/util.d.ts +1 -1
  518. package/dist/db/util.d.ts.map +1 -1
  519. package/dist/db/util.js.map +1 -1
  520. package/dist/did-cache/db/index.d.ts +1 -1
  521. package/dist/did-cache/db/index.d.ts.map +1 -1
  522. package/dist/did-cache/db/index.js.map +1 -1
  523. package/dist/did-cache/db/migrations.d.ts +1 -1
  524. package/dist/did-cache/db/migrations.d.ts.map +1 -1
  525. package/dist/did-cache/db/migrations.js.map +1 -1
  526. package/dist/did-cache/index.d.ts +2 -2
  527. package/dist/did-cache/index.d.ts.map +1 -1
  528. package/dist/did-cache/index.js.map +1 -1
  529. package/dist/disk-blobstore.d.ts +3 -3
  530. package/dist/disk-blobstore.d.ts.map +1 -1
  531. package/dist/disk-blobstore.js.map +1 -1
  532. package/dist/error.d.ts +1 -1
  533. package/dist/error.d.ts.map +1 -1
  534. package/dist/error.js +1 -1
  535. package/dist/error.js.map +1 -1
  536. package/dist/image/image-url-builder.d.ts +1 -1
  537. package/dist/image/image-url-builder.d.ts.map +1 -1
  538. package/dist/image/image-url-builder.js.map +1 -1
  539. package/dist/index.d.ts +5 -5
  540. package/dist/index.d.ts.map +1 -1
  541. package/dist/index.js +1 -0
  542. package/dist/index.js.map +1 -1
  543. package/dist/lexicons/app/bsky/actor/defs.defs.d.ts +1 -1
  544. package/dist/lexicons/app/bsky/actor/defs.defs.js.map +1 -1
  545. package/dist/logger.d.ts +1 -1
  546. package/dist/logger.d.ts.map +1 -1
  547. package/dist/logger.js.map +1 -1
  548. package/dist/mailer/index.d.ts +2 -2
  549. package/dist/mailer/index.d.ts.map +1 -1
  550. package/dist/mailer/index.js.map +1 -1
  551. package/dist/mailer/moderation.d.ts +2 -2
  552. package/dist/mailer/moderation.d.ts.map +1 -1
  553. package/dist/mailer/moderation.js.map +1 -1
  554. package/dist/pipethrough.d.ts +7 -7
  555. package/dist/pipethrough.d.ts.map +1 -1
  556. package/dist/pipethrough.js.map +1 -1
  557. package/dist/read-after-write/types.d.ts +4 -4
  558. package/dist/read-after-write/types.d.ts.map +1 -1
  559. package/dist/read-after-write/types.js.map +1 -1
  560. package/dist/read-after-write/util.d.ts +5 -5
  561. package/dist/read-after-write/util.d.ts.map +1 -1
  562. package/dist/read-after-write/util.js.map +1 -1
  563. package/dist/read-after-write/viewer.d.ts +7 -7
  564. package/dist/read-after-write/viewer.d.ts.map +1 -1
  565. package/dist/read-after-write/viewer.js +1 -1
  566. package/dist/read-after-write/viewer.js.map +1 -1
  567. package/dist/repo/prepare.d.ts +4 -4
  568. package/dist/repo/prepare.d.ts.map +1 -1
  569. package/dist/repo/prepare.js.map +1 -1
  570. package/dist/repo/types.d.ts +3 -3
  571. package/dist/repo/types.d.ts.map +1 -1
  572. package/dist/repo/types.js.map +1 -1
  573. package/dist/scripts/publish-identity.d.ts +2 -2
  574. package/dist/scripts/publish-identity.d.ts.map +1 -1
  575. package/dist/scripts/publish-identity.js.map +1 -1
  576. package/dist/scripts/rebuild-repo.d.ts +4 -4
  577. package/dist/scripts/rebuild-repo.d.ts.map +1 -1
  578. package/dist/scripts/rebuild-repo.js.map +1 -1
  579. package/dist/scripts/rotate-keys.d.ts +6 -6
  580. package/dist/scripts/rotate-keys.d.ts.map +1 -1
  581. package/dist/scripts/rotate-keys.js.map +1 -1
  582. package/dist/scripts/sequencer-recovery/index.d.ts +1 -1
  583. package/dist/scripts/sequencer-recovery/index.d.ts.map +1 -1
  584. package/dist/scripts/sequencer-recovery/index.js.map +1 -1
  585. package/dist/scripts/sequencer-recovery/recoverer.d.ts +4 -4
  586. package/dist/scripts/sequencer-recovery/recoverer.d.ts.map +1 -1
  587. package/dist/scripts/sequencer-recovery/recoverer.js.map +1 -1
  588. package/dist/scripts/sequencer-recovery/recovery-db.d.ts +1 -1
  589. package/dist/scripts/sequencer-recovery/recovery-db.d.ts.map +1 -1
  590. package/dist/scripts/sequencer-recovery/recovery-db.js.map +1 -1
  591. package/dist/scripts/sequencer-recovery/repair-repos.d.ts +1 -1
  592. package/dist/scripts/sequencer-recovery/repair-repos.d.ts.map +1 -1
  593. package/dist/scripts/sequencer-recovery/repair-repos.js.map +1 -1
  594. package/dist/sequencer/db/index.d.ts +1 -1
  595. package/dist/sequencer/db/index.d.ts.map +1 -1
  596. package/dist/sequencer/db/index.js.map +1 -1
  597. package/dist/sequencer/db/migrations/001-init.d.ts +1 -1
  598. package/dist/sequencer/db/migrations/001-init.d.ts.map +1 -1
  599. package/dist/sequencer/db/migrations/001-init.js.map +1 -1
  600. package/dist/sequencer/db/schema.d.ts +1 -1
  601. package/dist/sequencer/db/schema.d.ts.map +1 -1
  602. package/dist/sequencer/db/schema.js.map +1 -1
  603. package/dist/sequencer/events.d.ts +3 -3
  604. package/dist/sequencer/events.d.ts.map +1 -1
  605. package/dist/sequencer/events.js.map +1 -1
  606. package/dist/sequencer/outbox.d.ts +1 -1
  607. package/dist/sequencer/outbox.d.ts.map +1 -1
  608. package/dist/sequencer/outbox.js.map +1 -1
  609. package/dist/sequencer/sequencer.d.ts +5 -5
  610. package/dist/sequencer/sequencer.d.ts.map +1 -1
  611. package/dist/sequencer/sequencer.js.map +1 -1
  612. package/dist/util/compression.js.map +1 -1
  613. package/dist/util/http.d.ts +1 -1
  614. package/dist/util/http.d.ts.map +1 -1
  615. package/dist/util/http.js.map +1 -1
  616. package/dist/well-known.d.ts +1 -1
  617. package/dist/well-known.d.ts.map +1 -1
  618. package/dist/well-known.js.map +1 -1
  619. package/package.json +25 -25
@@ -1 +1 @@
1
- {"version":3,"file":"putPreferences.d.ts","sourceRoot":"","sources":["../../../../../src/api/app/bsky/actor/putPreferences.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAGlE,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAQnD,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QAkDvD"}
1
+ {"version":3,"file":"putPreferences.d.ts","sourceRoot":"","sources":["../../../../../src/api/app/bsky/actor/putPreferences.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAGvE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAQxD,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QAkDvD"}
@@ -1 +1 @@
1
- {"version":3,"file":"putPreferences.js","sourceRoot":"","sources":["../../../../../src/api/app/bsky/actor/putPreferences.ts"],"names":[],"mappings":"AAAA,O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AAC,GAAG,eAAe,EAAE,CAAC;gBAC9C,oEAAoE;gBACpE,OAAO,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE;oBAC3B,GAAG,EAAE,GAAG;oBACR,GAAG,EAAE,kBAAkB,CAAC,GAAG,CAAC;oBAC5B,GAAG;iBACJ,CAAC,CAAA;YACJ,CAAC;YAED,MAAM,kBAAkB,GAAwB,EAAE,CAAA;YAClD,KAAK,MAAM,IAAI,IAAI,KAAK,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;gBAC1C,IAAI,OAAO,IAAI,CAAC,KAAK,KAAK,QAAQ,EAAE,CAAC;oBACnC,kBAAkB,CAAC,IAAI,CAAC,IAAyB,CAAC,CAAA;gBACpD,CAAC;qBAAM,CAAC;oBACN,MAAM,IAAI,mBAAmB,CAAC,+BAA+B,CAAC,CAAA;gBAChE,CAAC;YACH,CAAC;YAED,MAAM,aAAa,GACjB,IAAI,CAAC,WAAW,CAAC,IAAI,KAAK,QAAQ;gBAClC,YAAY,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAA;YAEtC,MAAM,GAAG,CAAC,UAAU,CAAC,QAAQ,CAAC,GAAG,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE;gBACpD,MAAM,QAAQ,CAAC,IAAI,CAAC,cAAc,CAAC,kBAAkB,EAAE,UAAU,EAAE;oBACjE,aAAa;iBACd,CAAC,CAAA;YACJ,CAAC,CAAC,CAAA;QACJ,CAAC;KACF,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import { InvalidRequestError, Server } from '@atproto/xrpc-server'\nimport { AccountPreference } from '../../../../actor-store/preference/reader.js'\nimport { isAccessFull } from '../../../../auth-scope.js'\nimport { AppContext } from '../../../../context.js'\nimport { app } from '../../../../lexicons/index.js'\nimport {\n bareDidFromProxyTo,\n computeProxyTo,\n pipethrough,\n} from '../../../../pipethrough.js'\n\nexport default function (server: Server, ctx: AppContext) {\n const { bskyAppView } = ctx\n if (!bskyAppView) return\n\n server.add(app.bsky.actor.putPreferences, {\n auth: ctx.authVerifier.authorization({\n checkTakedown: true,\n authorize: (permissions, { req }) => {\n const lxm = app.bsky.actor.putPreferences.$lxm\n const aud = computeProxyTo(ctx, req, lxm)\n permissions.assertRpc({ aud, lxm })\n },\n }),\n handler: async ({ req, auth, input }) => {\n const { did } = auth.credentials\n\n // If the request has a proxy header different from the bsky app view,\n // we need to proxy the request to the requested app view.\n // @TODO This behavior should not be implemented as part of the XRPC framework\n const lxm = app.bsky.actor.putPreferences.$lxm\n const aud = computeProxyTo(ctx, req, lxm)\n if (aud !== `${bskyAppView.did}#bsky_appview`) {\n // Phase 1 of service auth updates: outbound JWT keeps bare-DID aud.\n return pipethrough(ctx, req, {\n iss: did,\n aud: bareDidFromProxyTo(aud),\n lxm,\n })\n }\n\n const checkedPreferences: AccountPreference[] = []\n for (const pref of input.body.preferences) {\n if (typeof pref.$type === 'string') {\n checkedPreferences.push(pref as AccountPreference)\n } else {\n throw new InvalidRequestError('Preference is missing a $type')\n }\n }\n\n const hasAccessFull =\n auth.credentials.type === 'access' &&\n isAccessFull(auth.credentials.scope)\n\n await ctx.actorStore.transact(did, async (actorTxn) => {\n await actorTxn.pref.putPreferences(checkedPreferences, 'app.bsky', {\n hasAccessFull,\n })\n })\n },\n })\n}\n"]}
1
+ {"version":3,"file":"putPreferences.js","sourceRoot":"","sources":["../../../../../src/api/app/bsky/actor/putPreferences.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAe,MAAM,sBAAsB,CAAA;AAEvE,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAExD,OAAO,EAAE,GAAG,EAAE,MAAM,+BAA+B,CAAA;AACnD,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,WAAW,GACZ,MAAM,4BAA4B,CAAA;AAEnC,MAAM,CAAC,OAAO,WAAW,MAAc,EAAE,GAAe;IACtD,MAAM,EAAE,WAAW,EAAE,GAAG,GAAG,CAAA;IAC3B,IA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C,IAAI,OAAO,IAAI,CAAC,KAAK,KAAK,QAAQ,EAAE,CAAC;oBACnC,kBAAkB,CAAC,IAAI,CAAC,IAAyB,CAAC,CAAA;gBACpD,CAAC;qBAAM,CAAC;oBACN,MAAM,IAAI,mBAAmB,CAAC,+BAA+B,CAAC,CAAA;gBAChE,CAAC;YACH,CAAC;YAED,MAAM,aAAa,GACjB,IAAI,CAAC,WAAW,CAAC,IAAI,KAAK,QAAQ;gBAClC,YAAY,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAA;YAEtC,MAAM,GAAG,CAAC,UAAU,CAAC,QAAQ,CAAC,GAAG,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE;gBACpD,MAAM,QAAQ,CAAC,IAAI,CAAC,cAAc,CAAC,kBAAkB,EAAE,UAAU,EAAE;oBACjE,aAAa;iBACd,CAAC,CAAA;YACJ,CAAC,CAAC,CAAA;QACJ,CAAC;KACF,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import { InvalidRequestError, type Server } from '@atproto/xrpc-server'\nimport type { AccountPreference } from '../../../../actor-store/preference/reader.js'\nimport { isAccessFull } from '../../../../auth-scope.js'\nimport type { AppContext } from '../../../../context.js'\nimport { app } from '../../../../lexicons/index.js'\nimport {\n bareDidFromProxyTo,\n computeProxyTo,\n pipethrough,\n} from '../../../../pipethrough.js'\n\nexport default function (server: Server, ctx: AppContext) {\n const { bskyAppView } = ctx\n if (!bskyAppView) return\n\n server.add(app.bsky.actor.putPreferences, {\n auth: ctx.authVerifier.authorization({\n checkTakedown: true,\n authorize: (permissions, { req }) => {\n const lxm = app.bsky.actor.putPreferences.$lxm\n const aud = computeProxyTo(ctx, req, lxm)\n permissions.assertRpc({ aud, lxm })\n },\n }),\n handler: async ({ req, auth, input }) => {\n const { did } = auth.credentials\n\n // If the request has a proxy header different from the bsky app view,\n // we need to proxy the request to the requested app view.\n // @TODO This behavior should not be implemented as part of the XRPC framework\n const lxm = app.bsky.actor.putPreferences.$lxm\n const aud = computeProxyTo(ctx, req, lxm)\n if (aud !== `${bskyAppView.did}#bsky_appview`) {\n // Phase 1 of service auth updates: outbound JWT keeps bare-DID aud.\n return pipethrough(ctx, req, {\n iss: did,\n aud: bareDidFromProxyTo(aud),\n lxm,\n })\n }\n\n const checkedPreferences: AccountPreference[] = []\n for (const pref of input.body.preferences) {\n if (typeof pref.$type === 'string') {\n checkedPreferences.push(pref as AccountPreference)\n } else {\n throw new InvalidRequestError('Preference is missing a $type')\n }\n }\n\n const hasAccessFull =\n auth.credentials.type === 'access' &&\n isAccessFull(auth.credentials.scope)\n\n await ctx.actorStore.transact(did, async (actorTxn) => {\n await actorTxn.pref.putPreferences(checkedPreferences, 'app.bsky', {\n hasAccessFull,\n })\n })\n },\n })\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { Server } from '@atproto/xrpc-server';
2
- import { AppContext } from '../../../../context.js';
1
+ import type { Server } from '@atproto/xrpc-server';
2
+ import type { AppContext } from '../../../../context.js';
3
3
  export default function (server: Server, ctx: AppContext): void;
4
4
  //# sourceMappingURL=getActorLikes.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getActorLikes.d.ts","sourceRoot":"","sources":["../../../../../src/api/app/bsky/feed/getActorLikes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAQnD,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QAoBvD"}
1
+ {"version":3,"file":"getActorLikes.d.ts","sourceRoot":"","sources":["../../../../../src/api/app/bsky/feed/getActorLikes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAClD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAQxD,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,E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AI,CAAA;IACxB,wDAAwD;IACxD,IAAI,SAAS,EAAE,CAAC;QACd,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;YACvB,IAAI,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,KAAK,SAAS,EAAE,CAAC;gBACvC,OAAO;oBACL,GAAG,IAAI;oBACP,IAAI,EAAE;wBACJ,GAAG,IAAI,CAAC,IAAI;wBACZ,MAAM,EAAE,WAAW,CAAC,sBAAsB,CACxC,IAAI,CAAC,IAAI,CAAC,MAAM,EAChB,SAAS,CAAC,MAAM,CACjB;qBACF;iBACF,CAAA;YACH,CAAC;iBAAM,CAAC;gBACN,OAAO,IAAI,CAAA;YACb,CAAC;QACH,CAAC,CAAC,CAAA;IACJ,CAAC;IACD,OAAO;QACL,GAAG,QAAQ;QACX,IAAI;KACL,CAAA;AACH,CAAC,CAAA","sourcesContent":["import { Server } from '@atproto/xrpc-server'\nimport { AppContext } from '../../../../context.js'\nimport { app } from '../../../../lexicons/index.js'\nimport { computeProxyTo } from '../../../../pipethrough.js'\nimport {\n MungeFn,\n pipethroughReadAfterWrite,\n} from '../../../../read-after-write/index.js'\n\nexport default function (server: Server, ctx: AppContext) {\n if (!ctx.bskyAppView) return\n\n server.add(app.bsky.feed.getActorLikes, {\n auth: ctx.authVerifier.authorization({\n authorize: (permissions, { req }) => {\n const lxm = app.bsky.feed.getActorLikes.$lxm\n const aud = computeProxyTo(ctx, req, lxm)\n permissions.assertRpc({ aud, lxm })\n },\n }),\n handler: async (reqCtx) => {\n return pipethroughReadAfterWrite(\n ctx,\n reqCtx,\n app.bsky.feed.getActorLikes,\n getAuthorMunge,\n )\n },\n })\n}\n\nconst getAuthorMunge: MungeFn<app.bsky.feed.getActorLikes.$OutputBody> = async (\n localViewer,\n original,\n local,\n requester,\n) => {\n const localProf = local.profile\n let feed = original.feed\n // first update any out of date profile pictures in feed\n if (localProf) {\n feed = feed.map((item) => {\n if (item.post.author.did === requester) {\n return {\n ...item,\n post: {\n ...item.post,\n author: localViewer.updateProfileViewBasic(\n item.post.author,\n localProf.record,\n ),\n },\n }\n } else {\n return item\n }\n })\n }\n return {\n ...original,\n feed,\n }\n}\n"]}
1
+ {"version":3,"file":"getActorLikes.js","sourceRoot":"","sources":["../../../../../src/api/app/bsky/feed/getActorLikes.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,GAAG,EAAE,MAAM,+BAA+B,CAAA;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAA;AAC3D,OAAO,EAEL,yBAAyB,GAC1B,MAAM,uCAAuC,CAAA;AAE9C,MAAM,CAAC,OAAO,WAAW,MAAc,EAAE,GAAe;IACtD,IAAI,CAAC,GAAG,CAAC,WAAW;QAAE,OAAM;IAE5B,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE;QACtC,IAAI,EAAE,GAAG,CAAC,YAAY,CAAC,aAAa,CAAC;YACnC,SAAS,EAAE,CAAC,WAAW,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE;gBAClC,MAAM,GAAG,GAAG,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAA;gBAC5C,MAAM,GAAG,GAAG,cAAc,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAA;gBACzC,WAAW,CAAC,SAAS,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,CAAA;YACrC,CAAC;SACF,CAAC;QACF,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE;YACxB,OAAO,yBAAyB,CAC9B,GAAG,EACH,MAAM,EACN,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,EAC3B,cAAc,CACf,CAAA;QACH,CAAC;KACF,CAAC,CAAA;AACJ,CAAC;AAED,MAAM,cAAc,GAAqD,KAAK,EAC5E,WAAW,EACX,QAAQ,EACR,KAAK,EACL,SAAS,EACT,EAAE;IACF,MAAM,SAAS,GAAG,KAAK,CAAC,OAAO,CAAA;IAC/B,IAAI,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAA;IACxB,wDAAwD;IACxD,IAAI,SAAS,EAAE,CAAC;QACd,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;YACvB,IAAI,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,KAAK,SAAS,EAAE,CAAC;gBACvC,OAAO;oBACL,GAAG,IAAI;oBACP,IAAI,EAAE;wBACJ,GAAG,IAAI,CAAC,IAAI;wBACZ,MAAM,EAAE,WAAW,CAAC,sBAAsB,CACxC,IAAI,CAAC,IAAI,CAAC,MAAM,EAChB,SAAS,CAAC,MAAM,CACjB;qBACF;iBACF,CAAA;YACH,CAAC;iBAAM,CAAC;gBACN,OAAO,IAAI,CAAA;YACb,CAAC;QACH,CAAC,CAAC,CAAA;IACJ,CAAC;IACD,OAAO;QACL,GAAG,QAAQ;QACX,IAAI;KACL,CAAA;AACH,CAAC,CAAA","sourcesContent":["import type { Server } from '@atproto/xrpc-server'\nimport type { AppContext } from '../../../../context.js'\nimport { app } from '../../../../lexicons/index.js'\nimport { computeProxyTo } from '../../../../pipethrough.js'\nimport {\n type MungeFn,\n pipethroughReadAfterWrite,\n} from '../../../../read-after-write/index.js'\n\nexport default function (server: Server, ctx: AppContext) {\n if (!ctx.bskyAppView) return\n\n server.add(app.bsky.feed.getActorLikes, {\n auth: ctx.authVerifier.authorization({\n authorize: (permissions, { req }) => {\n const lxm = app.bsky.feed.getActorLikes.$lxm\n const aud = computeProxyTo(ctx, req, lxm)\n permissions.assertRpc({ aud, lxm })\n },\n }),\n handler: async (reqCtx) => {\n return pipethroughReadAfterWrite(\n ctx,\n reqCtx,\n app.bsky.feed.getActorLikes,\n getAuthorMunge,\n )\n },\n })\n}\n\nconst getAuthorMunge: MungeFn<app.bsky.feed.getActorLikes.$OutputBody> = async (\n localViewer,\n original,\n local,\n requester,\n) => {\n const localProf = local.profile\n let feed = original.feed\n // first update any out of date profile pictures in feed\n if (localProf) {\n feed = feed.map((item) => {\n if (item.post.author.did === requester) {\n return {\n ...item,\n post: {\n ...item.post,\n author: localViewer.updateProfileViewBasic(\n item.post.author,\n localProf.record,\n ),\n },\n }\n } else {\n return item\n }\n })\n }\n return {\n ...original,\n feed,\n }\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { Server } from '@atproto/xrpc-server';
2
- import { AppContext } from '../../../../context.js';
1
+ import type { Server } from '@atproto/xrpc-server';
2
+ import type { AppContext } from '../../../../context.js';
3
3
  export default function (server: Server, ctx: AppContext): void;
4
4
  //# sourceMappingURL=getAuthorFeed.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getAuthorFeed.d.ts","sourceRoot":"","sources":["../../../../../src/api/app/bsky/feed/getAuthorFeed.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAQnD,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QAoBvD"}
1
+ {"version":3,"file":"getAuthorFeed.d.ts","sourceRoot":"","sources":["../../../../../src/api/app/bsky/feed/getAuthorFeed.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAClD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAQxD,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QAoBvD"}
@@ -1 +1 @@
1
- {"version":3,"file":"getAuthorFeed.js","sourceRoot":"","sources":["../../../../../src/api/app/bsky/feed/getAuthorFeed.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,GAAG,EAAE,MAAM,+BAA+B,CAAA;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM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,EAAE,EAAE;YACvB,IAAI,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,KAAK,SAAS,EAAE,CAAC;gBACvC,OAAO;oBACL,GAAG,IAAI;oBACP,IAAI,EAAE;wBACJ,GAAG,IAAI,CAAC,IAAI;wBACZ,MAAM,EAAE,WAAW,CAAC,sBAAsB,CACxC,IAAI,CAAC,IAAI,CAAC,MAAM,EAChB,SAAS,CAAC,MAAM,CACjB;qBACF;iBACF,CAAA;YACH,CAAC;iBAAM,CAAC;gBACN,OAAO,IAAI,CAAA;YACb,CAAC;QACH,CAAC,CAAC,CAAA;IACJ,CAAC;IACD,IAAI,GAAG,MAAM,WAAW,CAAC,0BAA0B,CAAC,IAAI,EAAE,KAAK,CAAC,KAAK,CAAC,CAAA;IACtE,OAAO;QACL,GAAG,QAAQ;QACX,IAAI;KACL,CAAA;AACH,CAAC,CAAA;AAED,MAAM,WAAW,GAAG,CAClB,IAA6C,EAC7C,SAAiB,EACjB,EAAE;IACF,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAA;IAC7B,IAAI,CAAC,KAAK;QAAE,OAAO,KAAK,CAAA;IACxB,IAAI,CAAC,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,KAAK,SAAS;QAAE,OAAO,IAAI,CAAA;IACrE,IACE,KAAK,CAAC,MAAM;QACZ,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC,KAAK,CAAC,MAAM,CAAC;QACvD,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,GAAG,KAAK,SAAS;QAEjC,OAAO,IAAI,CAAA;IACb,OAAO,KAAK,CAAA;AACd,CAAC,CAAA","sourcesContent":["import { Server } from '@atproto/xrpc-server'\nimport { AppContext } from '../../../../context.js'\nimport { app } from '../../../../lexicons/index.js'\nimport { computeProxyTo } from '../../../../pipethrough.js'\nimport {\n MungeFn,\n pipethroughReadAfterWrite,\n} from '../../../../read-after-write/index.js'\n\nexport default function (server: Server, ctx: AppContext) {\n if (!ctx.bskyAppView) return\n\n server.add(app.bsky.feed.getAuthorFeed, {\n auth: ctx.authVerifier.authorization({\n authorize: (permissions, { req }) => {\n const lxm = app.bsky.feed.getAuthorFeed.$lxm\n const aud = computeProxyTo(ctx, req, lxm)\n permissions.assertRpc({ aud, lxm })\n },\n }),\n handler: async (reqCtx) => {\n return pipethroughReadAfterWrite(\n ctx,\n reqCtx,\n app.bsky.feed.getAuthorFeed,\n getAuthorMunge,\n )\n },\n })\n}\n\nconst getAuthorMunge: MungeFn<app.bsky.feed.getAuthorFeed.$OutputBody> = async (\n localViewer,\n original,\n local,\n requester,\n) => {\n const localProf = local.profile\n // only munge on own feed\n if (!isUsersFeed(original, requester)) {\n return original\n }\n let feed = original.feed\n // first update any out of date profile pictures in feed\n if (localProf) {\n feed = feed.map((item) => {\n if (item.post.author.did === requester) {\n return {\n ...item,\n post: {\n ...item.post,\n author: localViewer.updateProfileViewBasic(\n item.post.author,\n localProf.record,\n ),\n },\n }\n } else {\n return item\n }\n })\n }\n feed = await localViewer.formatAndInsertPostsInFeed(feed, local.posts)\n return {\n ...original,\n feed,\n }\n}\n\nconst isUsersFeed = (\n feed: app.bsky.feed.getAuthorFeed.$OutputBody,\n requester: string,\n) => {\n const first = feed.feed.at(0)\n if (!first) return false\n if (!first.reason && first.post.author.did === requester) return true\n if (\n first.reason &&\n app.bsky.feed.defs.reasonRepost.$isTypeOf(first.reason) &&\n first.reason.by.did === requester\n )\n return true\n return false\n}\n"]}
1
+ {"version":3,"file":"getAuthorFeed.js","sourceRoot":"","sources":["../../../../../src/api/app/bsky/feed/getAuthorFeed.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,GAAG,EAAE,MAAM,+BAA+B,CAAA;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAA;AAC3D,OAAO,EAEL,yBAAyB,GA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AC,MAAM,CAAC,GAAG,KAAK,SAAS,EAAE,CAAC;gBACvC,OAAO;oBACL,GAAG,IAAI;oBACP,IAAI,EAAE;wBACJ,GAAG,IAAI,CAAC,IAAI;wBACZ,MAAM,EAAE,WAAW,CAAC,sBAAsB,CACxC,IAAI,CAAC,IAAI,CAAC,MAAM,EAChB,SAAS,CAAC,MAAM,CACjB;qBACF;iBACF,CAAA;YACH,CAAC;iBAAM,CAAC;gBACN,OAAO,IAAI,CAAA;YACb,CAAC;QACH,CAAC,CAAC,CAAA;IACJ,CAAC;IACD,IAAI,GAAG,MAAM,WAAW,CAAC,0BAA0B,CAAC,IAAI,EAAE,KAAK,CAAC,KAAK,CAAC,CAAA;IACtE,OAAO;QACL,GAAG,QAAQ;QACX,IAAI;KACL,CAAA;AACH,CAAC,CAAA;AAED,MAAM,WAAW,GAAG,CAClB,IAA6C,EAC7C,SAAiB,EACjB,EAAE;IACF,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAA;IAC7B,IAAI,CAAC,KAAK;QAAE,OAAO,KAAK,CAAA;IACxB,IAAI,CAAC,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,KAAK,SAAS;QAAE,OAAO,IAAI,CAAA;IACrE,IACE,KAAK,CAAC,MAAM;QACZ,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC,KAAK,CAAC,MAAM,CAAC;QACvD,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,GAAG,KAAK,SAAS;QAEjC,OAAO,IAAI,CAAA;IACb,OAAO,KAAK,CAAA;AACd,CAAC,CAAA","sourcesContent":["import type { Server } from '@atproto/xrpc-server'\nimport type { AppContext } from '../../../../context.js'\nimport { app } from '../../../../lexicons/index.js'\nimport { computeProxyTo } from '../../../../pipethrough.js'\nimport {\n type MungeFn,\n pipethroughReadAfterWrite,\n} from '../../../../read-after-write/index.js'\n\nexport default function (server: Server, ctx: AppContext) {\n if (!ctx.bskyAppView) return\n\n server.add(app.bsky.feed.getAuthorFeed, {\n auth: ctx.authVerifier.authorization({\n authorize: (permissions, { req }) => {\n const lxm = app.bsky.feed.getAuthorFeed.$lxm\n const aud = computeProxyTo(ctx, req, lxm)\n permissions.assertRpc({ aud, lxm })\n },\n }),\n handler: async (reqCtx) => {\n return pipethroughReadAfterWrite(\n ctx,\n reqCtx,\n app.bsky.feed.getAuthorFeed,\n getAuthorMunge,\n )\n },\n })\n}\n\nconst getAuthorMunge: MungeFn<app.bsky.feed.getAuthorFeed.$OutputBody> = async (\n localViewer,\n original,\n local,\n requester,\n) => {\n const localProf = local.profile\n // only munge on own feed\n if (!isUsersFeed(original, requester)) {\n return original\n }\n let feed = original.feed\n // first update any out of date profile pictures in feed\n if (localProf) {\n feed = feed.map((item) => {\n if (item.post.author.did === requester) {\n return {\n ...item,\n post: {\n ...item.post,\n author: localViewer.updateProfileViewBasic(\n item.post.author,\n localProf.record,\n ),\n },\n }\n } else {\n return item\n }\n })\n }\n feed = await localViewer.formatAndInsertPostsInFeed(feed, local.posts)\n return {\n ...original,\n feed,\n }\n}\n\nconst isUsersFeed = (\n feed: app.bsky.feed.getAuthorFeed.$OutputBody,\n requester: string,\n) => {\n const first = feed.feed.at(0)\n if (!first) return false\n if (!first.reason && first.post.author.did === requester) return true\n if (\n first.reason &&\n app.bsky.feed.defs.reasonRepost.$isTypeOf(first.reason) &&\n first.reason.by.did === requester\n )\n return true\n return false\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { Server } from '@atproto/xrpc-server';
2
- import { AppContext } from '../../../../context.js';
1
+ import type { Server } from '@atproto/xrpc-server';
2
+ import type { AppContext } from '../../../../context.js';
3
3
  export default function (server: Server, ctx: AppContext): void;
4
4
  //# sourceMappingURL=getFeed.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getFeed.d.ts","sourceRoot":"","sources":["../../../../../src/api/app/bsky/feed/getFeed.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAInD,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QAuCvD"}
1
+ {"version":3,"file":"getFeed.d.ts","sourceRoot":"","sources":["../../../../../src/api/app/bsky/feed/getFeed.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAClD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAIxD,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QAuCvD"}
@@ -1,4 +1,4 @@
1
- import { InvalidRequestError } from '@atproto/oauth-provider';
1
+ import { InvalidRequestError } from '@atproto/oauth-provider/errors';
2
2
  import { AtUri } from '@atproto/syntax';
3
3
  import { app, com } from '../../../../lexicons/index.js';
4
4
  import { computeProxyTo, pipethrough } from '../../../../pipethrough.js';
@@ -1 +1 @@
1
- {"version":3,"file":"getFeed.js","sourceRoot":"","sources":["../../../../../src/api/app/bsky/feed/getFeed.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAA;AAC7D,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AAGvC,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,+BAA+B,CAAA;AACxD,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AAExE,MAAM,CAAC,OAAO,WAAW,MAAc,EAAE,GAAe;IACtD,MAAM,EAAE,WAAW,EAAE,GAAG,GAAG,CAAA;IAC3B,IAAI,CAAC,WAAW;QAAE,OAAM;IAExB,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,O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AC3B,GAAG,EAAE,SAAS;gBACd,GAAG,EAAE,OAAO;gBACZ,GAAG,EAAE,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,IAAI;aACxC,CAAC,CAAA;QACJ,CAAC;KACF,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import { InvalidRequestError } from '@atproto/oauth-provider'\nimport { AtUri } from '@atproto/syntax'\nimport { Server } from '@atproto/xrpc-server'\nimport { AppContext } from '../../../../context.js'\nimport { app, com } from '../../../../lexicons/index.js'\nimport { computeProxyTo, pipethrough } from '../../../../pipethrough.js'\n\nexport default function (server: Server, ctx: AppContext) {\n const { bskyAppView } = ctx\n if (!bskyAppView) return\n\n server.add(app.bsky.feed.getFeed, {\n auth: ctx.authVerifier.authorization({\n authorize: (permissions, { req }) => {\n const lxm = app.bsky.feed.getFeed.$lxm\n const aud = computeProxyTo(ctx, req, lxm)\n permissions.assertRpc({ aud, lxm })\n permissions.assertRpc({ aud, lxm: app.bsky.feed.getFeedSkeleton.$lxm })\n },\n }),\n handler: async ({ params, auth, req }) => {\n const requester = auth.credentials.did\n\n const feedUrl = new AtUri(params.feed)\n\n const data = await bskyAppView.client.call(com.atproto.repo.getRecord, {\n repo: feedUrl.host,\n collection: feedUrl.collectionSafe,\n rkey: feedUrl.rkeySafe,\n })\n\n const feedDid = data.value['did']\n if (typeof feedDid !== 'string') {\n throw new InvalidRequestError(\n 'could not resolve feed did',\n 'UnknownFeed',\n )\n }\n\n return pipethrough(ctx, req, {\n iss: requester,\n aud: feedDid,\n lxm: app.bsky.feed.getFeedSkeleton.$lxm,\n })\n },\n })\n}\n"]}
1
+ {"version":3,"file":"getFeed.js","sourceRoot":"","sources":["../../../../../src/api/app/bsky/feed/getFeed.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAA;AACpE,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AAGvC,OAAO,EAAE,GAAG,EAAE,G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C,IAAI,EAAE,OAAO,CAAC,QAAQ;aACvB,CAAC,CAAA;YAEF,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;YACjC,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,CAAC;gBAChC,MAAM,IAAI,mBAAmB,CAC3B,4BAA4B,EAC5B,aAAa,CACd,CAAA;YACH,CAAC;YAED,OAAO,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE;gBAC3B,GAAG,EAAE,SAAS;gBACd,GAAG,EAAE,OAAO;gBACZ,GAAG,EAAE,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,IAAI;aACxC,CAAC,CAAA;QACJ,CAAC;KACF,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import { InvalidRequestError } from '@atproto/oauth-provider/errors'\nimport { AtUri } from '@atproto/syntax'\nimport type { Server } from '@atproto/xrpc-server'\nimport type { AppContext } from '../../../../context.js'\nimport { app, com } from '../../../../lexicons/index.js'\nimport { computeProxyTo, pipethrough } from '../../../../pipethrough.js'\n\nexport default function (server: Server, ctx: AppContext) {\n const { bskyAppView } = ctx\n if (!bskyAppView) return\n\n server.add(app.bsky.feed.getFeed, {\n auth: ctx.authVerifier.authorization({\n authorize: (permissions, { req }) => {\n const lxm = app.bsky.feed.getFeed.$lxm\n const aud = computeProxyTo(ctx, req, lxm)\n permissions.assertRpc({ aud, lxm })\n permissions.assertRpc({ aud, lxm: app.bsky.feed.getFeedSkeleton.$lxm })\n },\n }),\n handler: async ({ params, auth, req }) => {\n const requester = auth.credentials.did\n\n const feedUrl = new AtUri(params.feed)\n\n const data = await bskyAppView.client.call(com.atproto.repo.getRecord, {\n repo: feedUrl.host,\n collection: feedUrl.collectionSafe,\n rkey: feedUrl.rkeySafe,\n })\n\n const feedDid = data.value['did']\n if (typeof feedDid !== 'string') {\n throw new InvalidRequestError(\n 'could not resolve feed did',\n 'UnknownFeed',\n )\n }\n\n return pipethrough(ctx, req, {\n iss: requester,\n aud: feedDid,\n lxm: app.bsky.feed.getFeedSkeleton.$lxm,\n })\n },\n })\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { Server } from '@atproto/xrpc-server';
2
- import { AppContext } from '../../../../context.js';
1
+ import type { Server } from '@atproto/xrpc-server';
2
+ import type { AppContext } from '../../../../context.js';
3
3
  export default function (server: Server, ctx: AppContext): void;
4
4
  //# sourceMappingURL=getPostThread.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getPostThread.d.ts","sourceRoot":"","sources":["../../../../../src/api/app/bsky/feed/getPostThread.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAenD,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QAqEvD"}
1
+ {"version":3,"file":"getPostThread.d.ts","sourceRoot":"","sources":["../../../../../src/api/app/bsky/feed/getPostThread.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAClD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAexD,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QAqEvD"}
@@ -1 +1 @@
1
- {"version":3,"file":"getPostThread.js","sourceRoot":"","sources":["../../../../../src/api/app/bsky/feed/getPostThread.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAA;AAChC,OAAO,EAAE,cAAc,EAAK,MAAM,cAAc,CAAA;AAChD,OAAO,EAAE,KAAK,EAAe,MAAM,iBAAiB,CAAA;AAGpD,OAAO,EAAE,GAAG,EAAE,MAAM,+BAA+B,CAAA;AACnD,OAAO,EACL,wBAAwB,EACxB,cAAc,GACf,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAIL,oBAAoB,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CAClD,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,EAC3B,EAAE,GAAG,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,CAAC,YAAY,EAAE,KAAK,EAAE,CAAC,EAAE,EACnE,MAAM,GAAG,CAAC,kBAAkB,CAC1B,SAAS,EACT,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,CACjC,CACF,CAAA;YACD,MAAM,CAAC,MAAM,GAAG,UAAU,CAAC,MAAM,CAAA;QACnC,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,aAAa;QACf,CAAC;IACH,CAAC;IACD,OAAO;QACL,IAAI,EAAE;YACJ,MAAM;SACP;QACD,GAAG,EAAE,WAAW,CAAC,KAAK,CAAC;KACxB,CAAA;AACH,CAAC,CAAA;AAED,MAAM,gBAAgB,GAAG,CACvB,MAAyC,EAChB,EAAE;IAC3B,OACE,MAAM,CAAC,MAAM;QACb,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,EAC1D,CAAC;QACD,MAAM,GAAG,MAAM,CAAC,MAAM,CAAA;IACxB,CAAC;IAED,0EAA0E;IAC1E,mBAAmB;IACnB,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC;QACrD,OAAO,SAAS,CAAA;IAClB,CAAC;IAED,OAAO,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,GAAG,CAAA;AAC7C,CAAC,CAAA","sourcesContent":["import assert from 'node:assert'\nimport { isHandleString, l } from '@atproto/lex'\nimport { AtUri, AtUriString } from '@atproto/syntax'\nimport { Server } from '@atproto/xrpc-server'\nimport { AppContext } from '../../../../context.js'\nimport { app } from '../../../../lexicons/index.js'\nimport {\n PipethroughUpstreamError,\n computeProxyTo,\n} from '../../../../pipethrough.js'\nimport {\n LocalViewer,\n MungeFn,\n RecordDescript,\n formatMungedResponse,\n getLocalLag,\n pipethroughReadAfterWrite,\n} from '../../../../read-after-write/index.js'\n\nexport default function (server: Server, ctx: AppContext) {\n if (!ctx.bskyAppView) return\n\n server.add(app.bsky.feed.getPostThread, {\n auth: ctx.authVerifier.authorization({\n authorize: (permissions, { req }) => {\n const lxm = app.bsky.feed.getPostThread.$lxm\n const aud = computeProxyTo(ctx, req, lxm)\n permissions.assertRpc({ aud, lxm })\n },\n }),\n opts: {\n // @TODO remove after grace period has passed, behavior is non-standard.\n // temporarily added for compat w/ previous version of xrpc-server to avoid breakage of a few specified parties.\n paramsParseLoose: true,\n },\n handler: async (reqCtx) => {\n try {\n return await pipethroughReadAfterWrite(\n ctx,\n reqCtx,\n app.bsky.feed.getPostThread,\n getPostThreadMunge,\n )\n } catch (err) {\n if (\n err instanceof PipethroughUpstreamError &&\n err.error === 'NotFound'\n ) {\n const { auth, params } = reqCtx\n const requester = auth.credentials.did\n\n const rev = err.headers?.['atproto-repo-rev']\n if (!rev) throw err\n\n const uri = new AtUri(params.uri)\n if (\n !uri.hostname.startsWith('did:') &&\n isHandleString(uri.hostname)\n ) {\n const account = await ctx.accountManager.getAccount(uri.hostname)\n if (account) {\n uri.hostname = account.did\n }\n }\n if (uri.hostname !== requester) throw err\n\n const local = await ctx.actorStore.read(requester, (store) => {\n const localViewer = ctx.localViewer(store)\n return readAfterWriteNotFound(\n ctx,\n localViewer,\n params,\n requester,\n rev,\n uri,\n )\n })\n if (local === null) {\n throw err\n } else {\n return formatMungedResponse(local.data, local.lag)\n }\n } else {\n throw err\n }\n }\n },\n })\n}\n\n// READ AFTER WRITE\n// ----------------\n\nconst getPostThreadMunge: MungeFn<\n app.bsky.feed.getPostThread.$OutputBody\n> = async (localViewer, original, local) => {\n // @TODO if is NotFoundPost, handle similarly to error\n // @NOTE not necessary right now as we never return those for the requested uri\n if (!app.bsky.feed.defs.threadViewPost.$isTypeOf(original.thread)) {\n return original\n }\n const thread = await addPostsToThread(\n localViewer,\n original.thread,\n local.posts,\n )\n return {\n ...original,\n thread,\n }\n}\n\nconst addPostsToThread = async (\n localViewer: LocalViewer,\n original: l.$Typed<app.bsky.feed.defs.ThreadViewPost>,\n posts: RecordDescript<app.bsky.feed.post.Main>[],\n) => {\n const inThread = findPostsInThread(original, posts)\n if (inThread.length === 0) return original\n let thread: l.$Typed<app.bsky.feed.defs.ThreadViewPost> = original\n for (const record of inThread) {\n thread = await insertIntoThreadReplies(localViewer, thread, record)\n }\n return thread\n}\n\nconst findPostsInThread = (\n thread: app.bsky.feed.defs.ThreadViewPost,\n posts: RecordDescript<app.bsky.feed.post.Main>[],\n): RecordDescript<app.bsky.feed.post.Main>[] => {\n return posts.filter((post) => {\n const rootUri = post.record.reply?.root.uri\n if (!rootUri) return false\n if (rootUri === thread.post.uri) return true\n return (\n (thread.post.record as app.bsky.feed.post.Main).reply?.root.uri ===\n rootUri\n )\n })\n}\n\nconst insertIntoThreadReplies = async (\n localViewer: LocalViewer,\n view: l.$Typed<app.bsky.feed.defs.ThreadViewPost>,\n descript: RecordDescript<app.bsky.feed.post.Main>,\n): Promise<l.$Typed<app.bsky.feed.defs.ThreadViewPost>> => {\n if (descript.record.reply?.parent.uri === view.post.uri) {\n const postView = await threadPostView(localViewer, descript)\n if (!postView) return view\n const replies = [postView, ...(view.replies ?? [])]\n return {\n ...view,\n replies,\n }\n }\n if (!view.replies) return view\n const replies = await Promise.all(\n view.replies.map(async (reply) =>\n app.bsky.feed.defs.threadViewPost.$isTypeOf(reply)\n ? await insertIntoThreadReplies(localViewer, reply, descript)\n : reply,\n ),\n )\n return {\n ...view,\n replies,\n }\n}\n\nconst threadPostView = async (\n localViewer: LocalViewer,\n descript: RecordDescript<app.bsky.feed.post.Main>,\n): Promise<l.$Typed<app.bsky.feed.defs.ThreadViewPost> | null> => {\n const postView = await localViewer.getPost(descript)\n if (!postView) return null\n return app.bsky.feed.defs.threadViewPost.$build({\n post: postView,\n })\n}\n\n// Read after write on error\n// ---------------------\n\nconst readAfterWriteNotFound = async (\n ctx: AppContext,\n localViewer: LocalViewer,\n params: app.bsky.feed.getPostThread.$Params,\n requester: string,\n rev: string,\n resolvedUri: AtUri,\n): Promise<{\n data: app.bsky.feed.getPostThread.$OutputBody\n lag?: number\n} | null> => {\n if (resolvedUri.hostname !== requester) {\n return null\n }\n const local = await localViewer.getRecordsSinceRev(rev)\n const found = local.posts.find(\n (p) => p.uri.toString() === resolvedUri.toString(),\n )\n if (!found) return null\n let thread = await threadPostView(localViewer, found)\n if (!thread) return null\n const rest = local.posts.filter(\n (p) => p.uri.toString() !== resolvedUri.toString(),\n )\n thread = await addPostsToThread(localViewer, thread, rest)\n const highestParent = getHighestParent(thread)\n if (highestParent) {\n try {\n assert(ctx.bskyAppView)\n const parentsRes = await ctx.bskyAppView.client.call(\n app.bsky.feed.getPostThread,\n { uri: highestParent, parentHeight: params.parentHeight, depth: 0 },\n await ctx.appviewAuthHeaders(\n requester,\n app.bsky.feed.getPostThread.$lxm,\n ),\n )\n thread.parent = parentsRes.thread\n } catch (err) {\n // do nothing\n }\n }\n return {\n data: {\n thread,\n },\n lag: getLocalLag(local),\n }\n}\n\nconst getHighestParent = (\n thread: app.bsky.feed.defs.ThreadViewPost,\n): AtUriString | undefined => {\n while (\n thread.parent &&\n app.bsky.feed.defs.threadViewPost.$isTypeOf(thread.parent)\n ) {\n thread = thread.parent\n }\n\n // @NOTE we might get away with type casting here, but being safe to avoid\n // potential issues\n if (!app.bsky.feed.post.$matches(thread.post.record)) {\n return undefined\n }\n\n return thread.post.record.reply?.parent.uri\n}\n"]}
1
+ {"version":3,"file":"getPostThread.js","sourceRoot":"","sources":["../../../../../src/api/app/bsky/feed/getPostThread.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAA;AAChC,OAAO,EAAE,cAAc,EAAU,MAAM,cAAc,CAAA;AACrD,OAAO,E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ourcesContent":["import assert from 'node:assert'\nimport { isHandleString, type l } from '@atproto/lex'\nimport { AtUri, type AtUriString } from '@atproto/syntax'\nimport type { Server } from '@atproto/xrpc-server'\nimport type { AppContext } from '../../../../context.js'\nimport { app } from '../../../../lexicons/index.js'\nimport {\n PipethroughUpstreamError,\n computeProxyTo,\n} from '../../../../pipethrough.js'\nimport {\n type LocalViewer,\n type MungeFn,\n type RecordDescript,\n formatMungedResponse,\n getLocalLag,\n pipethroughReadAfterWrite,\n} from '../../../../read-after-write/index.js'\n\nexport default function (server: Server, ctx: AppContext) {\n if (!ctx.bskyAppView) return\n\n server.add(app.bsky.feed.getPostThread, {\n auth: ctx.authVerifier.authorization({\n authorize: (permissions, { req }) => {\n const lxm = app.bsky.feed.getPostThread.$lxm\n const aud = computeProxyTo(ctx, req, lxm)\n permissions.assertRpc({ aud, lxm })\n },\n }),\n opts: {\n // @TODO remove after grace period has passed, behavior is non-standard.\n // temporarily added for compat w/ previous version of xrpc-server to avoid breakage of a few specified parties.\n paramsParseLoose: true,\n },\n handler: async (reqCtx) => {\n try {\n return await pipethroughReadAfterWrite(\n ctx,\n reqCtx,\n app.bsky.feed.getPostThread,\n getPostThreadMunge,\n )\n } catch (err) {\n if (\n err instanceof PipethroughUpstreamError &&\n err.error === 'NotFound'\n ) {\n const { auth, params } = reqCtx\n const requester = auth.credentials.did\n\n const rev = err.headers?.['atproto-repo-rev']\n if (!rev) throw err\n\n const uri = new AtUri(params.uri)\n if (\n !uri.hostname.startsWith('did:') &&\n isHandleString(uri.hostname)\n ) {\n const account = await ctx.accountManager.getAccount(uri.hostname)\n if (account) {\n uri.hostname = account.did\n }\n }\n if (uri.hostname !== requester) throw err\n\n const local = await ctx.actorStore.read(requester, (store) => {\n const localViewer = ctx.localViewer(store)\n return readAfterWriteNotFound(\n ctx,\n localViewer,\n params,\n requester,\n rev,\n uri,\n )\n })\n if (local === null) {\n throw err\n } else {\n return formatMungedResponse(local.data, local.lag)\n }\n } else {\n throw err\n }\n }\n },\n })\n}\n\n// READ AFTER WRITE\n// ----------------\n\nconst getPostThreadMunge: MungeFn<\n app.bsky.feed.getPostThread.$OutputBody\n> = async (localViewer, original, local) => {\n // @TODO if is NotFoundPost, handle similarly to error\n // @NOTE not necessary right now as we never return those for the requested uri\n if (!app.bsky.feed.defs.threadViewPost.$isTypeOf(original.thread)) {\n return original\n }\n const thread = await addPostsToThread(\n localViewer,\n original.thread,\n local.posts,\n )\n return {\n ...original,\n thread,\n }\n}\n\nconst addPostsToThread = async (\n localViewer: LocalViewer,\n original: l.$Typed<app.bsky.feed.defs.ThreadViewPost>,\n posts: RecordDescript<app.bsky.feed.post.Main>[],\n) => {\n const inThread = findPostsInThread(original, posts)\n if (inThread.length === 0) return original\n let thread: l.$Typed<app.bsky.feed.defs.ThreadViewPost> = original\n for (const record of inThread) {\n thread = await insertIntoThreadReplies(localViewer, thread, record)\n }\n return thread\n}\n\nconst findPostsInThread = (\n thread: app.bsky.feed.defs.ThreadViewPost,\n posts: RecordDescript<app.bsky.feed.post.Main>[],\n): RecordDescript<app.bsky.feed.post.Main>[] => {\n return posts.filter((post) => {\n const rootUri = post.record.reply?.root.uri\n if (!rootUri) return false\n if (rootUri === thread.post.uri) return true\n return (\n (thread.post.record as app.bsky.feed.post.Main).reply?.root.uri ===\n rootUri\n )\n })\n}\n\nconst insertIntoThreadReplies = async (\n localViewer: LocalViewer,\n view: l.$Typed<app.bsky.feed.defs.ThreadViewPost>,\n descript: RecordDescript<app.bsky.feed.post.Main>,\n): Promise<l.$Typed<app.bsky.feed.defs.ThreadViewPost>> => {\n if (descript.record.reply?.parent.uri === view.post.uri) {\n const postView = await threadPostView(localViewer, descript)\n if (!postView) return view\n const replies = [postView, ...(view.replies ?? [])]\n return {\n ...view,\n replies,\n }\n }\n if (!view.replies) return view\n const replies = await Promise.all(\n view.replies.map(async (reply) =>\n app.bsky.feed.defs.threadViewPost.$isTypeOf(reply)\n ? await insertIntoThreadReplies(localViewer, reply, descript)\n : reply,\n ),\n )\n return {\n ...view,\n replies,\n }\n}\n\nconst threadPostView = async (\n localViewer: LocalViewer,\n descript: RecordDescript<app.bsky.feed.post.Main>,\n): Promise<l.$Typed<app.bsky.feed.defs.ThreadViewPost> | null> => {\n const postView = await localViewer.getPost(descript)\n if (!postView) return null\n return app.bsky.feed.defs.threadViewPost.$build({\n post: postView,\n })\n}\n\n// Read after write on error\n// ---------------------\n\nconst readAfterWriteNotFound = async (\n ctx: AppContext,\n localViewer: LocalViewer,\n params: app.bsky.feed.getPostThread.$Params,\n requester: string,\n rev: string,\n resolvedUri: AtUri,\n): Promise<{\n data: app.bsky.feed.getPostThread.$OutputBody\n lag?: number\n} | null> => {\n if (resolvedUri.hostname !== requester) {\n return null\n }\n const local = await localViewer.getRecordsSinceRev(rev)\n const found = local.posts.find(\n (p) => p.uri.toString() === resolvedUri.toString(),\n )\n if (!found) return null\n let thread = await threadPostView(localViewer, found)\n if (!thread) return null\n const rest = local.posts.filter(\n (p) => p.uri.toString() !== resolvedUri.toString(),\n )\n thread = await addPostsToThread(localViewer, thread, rest)\n const highestParent = getHighestParent(thread)\n if (highestParent) {\n try {\n assert(ctx.bskyAppView)\n const parentsRes = await ctx.bskyAppView.client.call(\n app.bsky.feed.getPostThread,\n { uri: highestParent, parentHeight: params.parentHeight, depth: 0 },\n await ctx.appviewAuthHeaders(\n requester,\n app.bsky.feed.getPostThread.$lxm,\n ),\n )\n thread.parent = parentsRes.thread\n } catch (err) {\n // do nothing\n }\n }\n return {\n data: {\n thread,\n },\n lag: getLocalLag(local),\n }\n}\n\nconst getHighestParent = (\n thread: app.bsky.feed.defs.ThreadViewPost,\n): AtUriString | undefined => {\n while (\n thread.parent &&\n app.bsky.feed.defs.threadViewPost.$isTypeOf(thread.parent)\n ) {\n thread = thread.parent\n }\n\n // @NOTE we might get away with type casting here, but being safe to avoid\n // potential issues\n if (!app.bsky.feed.post.$matches(thread.post.record)) {\n return undefined\n }\n\n return thread.post.record.reply?.parent.uri\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { Server } from '@atproto/xrpc-server';
2
- import { AppContext } from '../../../../context.js';
1
+ import type { Server } from '@atproto/xrpc-server';
2
+ import type { AppContext } from '../../../../context.js';
3
3
  export default function (server: Server, ctx: AppContext): void;
4
4
  //# sourceMappingURL=getTimeline.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getTimeline.d.ts","sourceRoot":"","sources":["../../../../../src/api/app/bsky/feed/getTimeline.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAQnD,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QAyBvD"}
1
+ {"version":3,"file":"getTimeline.d.ts","sourceRoot":"","sources":["../../../../../src/api/app/bsky/feed/getTimeline.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAClD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAQxD,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QAyBvD"}
@@ -1 +1 @@
1
- {"version":3,"file":"getTimeline.js","sourceRoot":"","sources":["../../../../../src/api/app/bsky/feed/getTimeline.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,GAAG,EAAE,MAAM,+BAA+B,CAAA;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAA;AAC3D,OAAO,EAEL,yBAAyB,GAC1B,MAAM,uCAAuC,CAAA;AAE9C,MAAM,CAAC,OAAO,WAAW,MAAc,EAAE,GAAe;IACtD,IAAI,CAAC,GAAG,CAAC,WAAW;QAAE,OAAM;IAE5B,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE;QACpC,IAAI,EAAE,GAAG,CAAC,YAAY,CAAC,aAAa,CAAC;YACnC,SAAS,EAAE,CAAC,WAAW,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE;gBAClC,MAAM,GAAG,GAAG,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAA;gBAC1C,MAAM,GAAG,GAAG,cAAc,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAA;gBACzC,WAAW,CAAC,SAAS,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,CAAA;YACrC,CAAC;SACF,CAAC;QACF,IAAI,EAAE;YACJ,wEAAwE;YACxE,gHAAgH;YAChH,gBAAgB,EAAE,IAAI;SACvB;QACD,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE;YACxB,OAAO,yBAAyB,CAC9B,GAAG,EACH,MAAM,EACN,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,EACzB,gBAAgB,CACjB,CAAA;QACH,CAAC;KACF,CAAC,CAAA;AACJ,CAAC;AAED,MAAM,gBAAgB,GAAmD,KAAK,EAC5E,WAAW,EACX,QAAQ,EACR,KAAK,EACL,EAAE;IACF,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC,0BAA0B,CACvD,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,EAClB,KAAK,CAAC,KAAK,CACZ,CAAA;IACD,OAAO;QACL,GAAG,QAAQ;QACX,IAAI;KACL,CAAA;AACH,CAAC,CAAA","sourcesContent":["import { Server } from '@atproto/xrpc-server'\nimport { AppContext } from '../../../../context.js'\nimport { app } from '../../../../lexicons/index.js'\nimport { computeProxyTo } from '../../../../pipethrough.js'\nimport {\n MungeFn,\n pipethroughReadAfterWrite,\n} from '../../../../read-after-write/index.js'\n\nexport default function (server: Server, ctx: AppContext) {\n if (!ctx.bskyAppView) return\n\n server.add(app.bsky.feed.getTimeline, {\n auth: ctx.authVerifier.authorization({\n authorize: (permissions, { req }) => {\n const lxm = app.bsky.feed.getTimeline.$lxm\n const aud = computeProxyTo(ctx, req, lxm)\n permissions.assertRpc({ aud, lxm })\n },\n }),\n opts: {\n // @TODO remove after grace period has passed, behavior is non-standard.\n // temporarily added for compat w/ previous version of xrpc-server to avoid breakage of a few specified parties.\n paramsParseLoose: true,\n },\n handler: async (reqCtx) => {\n return pipethroughReadAfterWrite(\n ctx,\n reqCtx,\n app.bsky.feed.getTimeline,\n getTimelineMunge,\n )\n },\n })\n}\n\nconst getTimelineMunge: MungeFn<app.bsky.feed.getTimeline.$OutputBody> = async (\n localViewer,\n original,\n local,\n) => {\n const feed = await localViewer.formatAndInsertPostsInFeed(\n [...original.feed],\n local.posts,\n )\n return {\n ...original,\n feed,\n }\n}\n"]}
1
+ {"version":3,"file":"getTimeline.js","sourceRoot":"","sources":["../../../../../src/api/app/bsky/feed/getTimeline.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,GAAG,EAAE,MAAM,+BAA+B,CAAA;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAA;AAC3D,OAAO,EAEL,yBAAyB,GAC1B,MAAM,uCAAuC,CAAA;AAE9C,MAAM,CAAC,OAAO,WAAW,MAAc,EAAE,GAAe;IACtD,IAAI,CAAC,GAAG,CAAC,WAAW;QAAE,OAAM;IAE5B,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE;QACpC,IAAI,EAAE,GAAG,CAAC,YAAY,CAAC,aAAa,CAAC;YACnC,SAAS,EAAE,CAAC,WAAW,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE;gBAClC,MAAM,GAAG,GAAG,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAA;gBAC1C,MAAM,GAAG,GAAG,cAAc,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAA;gBACzC,WAAW,CAAC,SAAS,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,CAAA;YACrC,CAAC;SACF,CAAC;QACF,IAAI,EAAE;YACJ,wEAAwE;YACxE,gHAAgH;YAChH,gBAAgB,EAAE,IAAI;SACvB;QACD,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE;YACxB,OAAO,yBAAyB,CAC9B,GAAG,EACH,MAAM,EACN,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,EACzB,gBAAgB,CACjB,CAAA;QACH,CAAC;KACF,CAAC,CAAA;AACJ,CAAC;AAED,MAAM,gBAAgB,GAAmD,KAAK,EAC5E,WAAW,EACX,QAAQ,EACR,KAAK,EACL,EAAE;IACF,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC,0BAA0B,CACvD,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,EAClB,KAAK,CAAC,KAAK,CACZ,CAAA;IACD,OAAO;QACL,GAAG,QAAQ;QACX,IAAI;KACL,CAAA;AACH,CAAC,CAAA","sourcesContent":["import type { Server } from '@atproto/xrpc-server'\nimport type { AppContext } from '../../../../context.js'\nimport { app } from '../../../../lexicons/index.js'\nimport { computeProxyTo } from '../../../../pipethrough.js'\nimport {\n type MungeFn,\n pipethroughReadAfterWrite,\n} from '../../../../read-after-write/index.js'\n\nexport default function (server: Server, ctx: AppContext) {\n if (!ctx.bskyAppView) return\n\n server.add(app.bsky.feed.getTimeline, {\n auth: ctx.authVerifier.authorization({\n authorize: (permissions, { req }) => {\n const lxm = app.bsky.feed.getTimeline.$lxm\n const aud = computeProxyTo(ctx, req, lxm)\n permissions.assertRpc({ aud, lxm })\n },\n }),\n opts: {\n // @TODO remove after grace period has passed, behavior is non-standard.\n // temporarily added for compat w/ previous version of xrpc-server to avoid breakage of a few specified parties.\n paramsParseLoose: true,\n },\n handler: async (reqCtx) => {\n return pipethroughReadAfterWrite(\n ctx,\n reqCtx,\n app.bsky.feed.getTimeline,\n getTimelineMunge,\n )\n },\n })\n}\n\nconst getTimelineMunge: MungeFn<app.bsky.feed.getTimeline.$OutputBody> = async (\n localViewer,\n original,\n local,\n) => {\n const feed = await localViewer.formatAndInsertPostsInFeed(\n [...original.feed],\n local.posts,\n )\n return {\n ...original,\n feed,\n }\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { Server } from '@atproto/xrpc-server';
2
- import { AppContext } from '../../../../context.js';
1
+ import type { Server } from '@atproto/xrpc-server';
2
+ import type { AppContext } from '../../../../context.js';
3
3
  export default function (server: Server, ctx: AppContext): void;
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/api/app/bsky/feed/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAOnD,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QAMvD"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/api/app/bsky/feed/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAClD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAOxD,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QAMvD"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/api/app/bsky/feed/index.ts"],"names":[],"mappings":"AAEA,OAAO,aAAa,MAAM,oBAAoB,CAAA;AAC9C,OAAO,aAAa,MAAM,oBAAoB,CAAA;AAC9C,OAAO,OAAO,MAAM,cAAc,CAAA;AAClC,OAAO,aAAa,MAAM,oBAAoB,CAAA;AAC9C,OAAO,WAAW,MAAM,kBAAkB,CAAA;AAE1C,MAAM,CAAC,OAAO,WAAW,MAAc,EAAE,GAAe;IACtD,aAAa,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC1B,aAAa,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC1B,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACpB,aAAa,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC1B,WAAW,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;AAC1B,CAAC","sourcesContent":["import { Server } from '@atproto/xrpc-server'\nimport { AppContext } from '../../../../context.js'\nimport getActorLikes from './getActorLikes.js'\nimport getAuthorFeed from './getAuthorFeed.js'\nimport getFeed from './getFeed.js'\nimport getPostThread from './getPostThread.js'\nimport getTimeline from './getTimeline.js'\n\nexport default function (server: Server, ctx: AppContext) {\n getActorLikes(server, ctx)\n getAuthorFeed(server, ctx)\n getFeed(server, ctx)\n getPostThread(server, ctx)\n getTimeline(server, ctx)\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/api/app/bsky/feed/index.ts"],"names":[],"mappings":"AAEA,OAAO,aAAa,MAAM,oBAAoB,CAAA;AAC9C,OAAO,aAAa,MAAM,oBAAoB,CAAA;AAC9C,OAAO,OAAO,MAAM,cAAc,CAAA;AAClC,OAAO,aAAa,MAAM,oBAAoB,CAAA;AAC9C,OAAO,WAAW,MAAM,kBAAkB,CAAA;AAE1C,MAAM,CAAC,OAAO,WAAW,MAAc,EAAE,GAAe;IACtD,aAAa,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC1B,aAAa,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC1B,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACpB,aAAa,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC1B,WAAW,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;AAC1B,CAAC","sourcesContent":["import type { Server } from '@atproto/xrpc-server'\nimport type { AppContext } from '../../../../context.js'\nimport getActorLikes from './getActorLikes.js'\nimport getAuthorFeed from './getAuthorFeed.js'\nimport getFeed from './getFeed.js'\nimport getPostThread from './getPostThread.js'\nimport getTimeline from './getTimeline.js'\n\nexport default function (server: Server, ctx: AppContext) {\n getActorLikes(server, ctx)\n getAuthorFeed(server, ctx)\n getFeed(server, ctx)\n getPostThread(server, ctx)\n getTimeline(server, ctx)\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { Server } from '@atproto/xrpc-server';
2
- import { AppContext } from '../../../context.js';
1
+ import type { Server } from '@atproto/xrpc-server';
2
+ import type { AppContext } from '../../../context.js';
3
3
  export default function (server: Server, ctx: AppContext): void;
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/app/bsky/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAKhD,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QAIvD"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/app/bsky/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAClD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAKrD,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QAIvD"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/api/app/bsky/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,kBAAkB,CAAA;AACpC,OAAO,IAAI,MAAM,iBAAiB,CAAA;AAClC,OAAO,YAAY,MAAM,yBAAyB,CAAA;AAElD,MAAM,CAAC,OAAO,WAAW,MAAc,EAAE,GAAe;IACtD,KAAK,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAClB,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACjB,YAAY,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;AAC3B,CAAC","sourcesContent":["import { Server } from '@atproto/xrpc-server'\nimport { AppContext } from '../../../context.js'\nimport actor from './actor/index.js'\nimport feed from './feed/index.js'\nimport notification from './notification/index.js'\n\nexport default function (server: Server, ctx: AppContext) {\n actor(server, ctx)\n feed(server, ctx)\n notification(server, ctx)\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/api/app/bsky/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,kBAAkB,CAAA;AACpC,OAAO,IAAI,MAAM,iBAAiB,CAAA;AAClC,OAAO,YAAY,MAAM,yBAAyB,CAAA;AAElD,MAAM,CAAC,OAAO,WAAW,MAAc,EAAE,GAAe;IACtD,KAAK,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAClB,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACjB,YAAY,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;AAC3B,CAAC","sourcesContent":["import type { Server } from '@atproto/xrpc-server'\nimport type { AppContext } from '../../../context.js'\nimport actor from './actor/index.js'\nimport feed from './feed/index.js'\nimport notification from './notification/index.js'\n\nexport default function (server: Server, ctx: AppContext) {\n actor(server, ctx)\n feed(server, ctx)\n notification(server, ctx)\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { Server } from '@atproto/xrpc-server';
2
- import { AppContext } from '../../../../context.js';
1
+ import type { Server } from '@atproto/xrpc-server';
2
+ import type { AppContext } from '../../../../context.js';
3
3
  export default function (server: Server, ctx: AppContext): void;
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/api/app/bsky/notification/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAInD,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QAGvD"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/api/app/bsky/notification/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAClD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAIxD,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QAGvD"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/api/app/bsky/notification/index.ts"],"names":[],"mappings":"AAEA,OAAO,YAAY,MAAM,mBAAmB,CAAA;AAC5C,OAAO,cAAc,MAAM,qBAAqB,CAAA;AAEhD,MAAM,CAAC,OAAO,WAAW,MAAc,EAAE,GAAe;IACtD,YAAY,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACzB,cAAc,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;AAC7B,CAAC","sourcesContent":["import { Server } from '@atproto/xrpc-server'\nimport { AppContext } from '../../../../context.js'\nimport registerPush from './registerPush.js'\nimport unregisterPush from './unregisterPush.js'\n\nexport default function (server: Server, ctx: AppContext) {\n registerPush(server, ctx)\n unregisterPush(server, ctx)\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/api/app/bsky/notification/index.ts"],"names":[],"mappings":"AAEA,OAAO,YAAY,MAAM,mBAAmB,CAAA;AAC5C,OAAO,cAAc,MAAM,qBAAqB,CAAA;AAEhD,MAAM,CAAC,OAAO,WAAW,MAAc,EAAE,GAAe;IACtD,YAAY,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACzB,cAAc,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;AAC7B,CAAC","sourcesContent":["import type { Server } from '@atproto/xrpc-server'\nimport type { AppContext } from '../../../../context.js'\nimport registerPush from './registerPush.js'\nimport unregisterPush from './unregisterPush.js'\n\nexport default function (server: Server, ctx: AppContext) {\n registerPush(server, ctx)\n unregisterPush(server, ctx)\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { Server } from '@atproto/xrpc-server';
2
- import { AppContext } from '../../../../context.js';
1
+ import { type Server } from '@atproto/xrpc-server';
2
+ import type { AppContext } from '../../../../context.js';
3
3
  export default function (server: Server, ctx: AppContext): void;
4
4
  //# sourceMappingURL=registerPush.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"registerPush.d.ts","sourceRoot":"","sources":["../../../../../src/api/app/bsky/notification/registerPush.ts"],"names":[],"mappings":"AAEA,OAAO,EAAuB,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAElE,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAInD,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QAmDvD"}
1
+ {"version":3,"file":"registerPush.d.ts","sourceRoot":"","sources":["../../../../../src/api/app/bsky/notification/registerPush.ts"],"names":[],"mappings":"AAEA,OAAO,EAAuB,KAAK,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAEvE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAIxD,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QAmDvD"}
@@ -1 +1 @@
1
- {"version":3,"file":"registerPush.js","sourceRoot":"","sources":["../../../../../src/api/app/bsky/notification/registerPush.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACnC,OAAO,EAAE,mBAAmB,EAAU,MAAM,sBAAsB,CAAA;AAClE,OAAO,EAAE,SAAS,EAAE,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AC;gBACnC,MAAM,WAAW,CAAC,MAAM,CAAC,IAAI,CAC3B,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC,YAAY,EAClC,IAAI,EACJ,EAAE,OAAO,EAAE,CACZ,CAAA;gBACD,OAAM;YACR,CAAC;YAED,MAAM,aAAa,GAAG,MAAM,WAAW,CAAC,GAAG,EAAE,UAAU,CAAC,CAAA;YAExD,MAAM,IAAI,CAAC,aAAa,EAAE,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC,YAAY,EAAE;gBAC5D,eAAe,EAAE,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO;gBACxC,gBAAgB,EAAE,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO;gBACzC,wBAAwB,EAAE,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO;gBACjD,IAAI;gBACJ,OAAO;aACR,CAAC,CAAA;QACJ,CAAC;KACF,CAAC,CAAA;AACJ,CAAC;AAED,MAAM,WAAW,GAAG,KAAK,EAAE,GAAe,EAAE,UAAkB,EAAE,EAAE;IAChE,MAAM,GAAG,GAAG,MAAM,SAAS,CAAC,GAAG,EAAE,UAAU,CAAC,CAAA;IAC5C,MAAM,aAAa,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAA;IACnC,IAAI,CAAC,aAAa,EAAE,CAAC;QACnB,MAAM,IAAI,mBAAmB,CAC3B,yDAAyD,UAAU,EAAE,CACtE,CAAA;IACH,CAAC;IACD,OAAO,aAAa,CAAA;AACtB,CAAC,CAAA","sourcesContent":["import { getNotif } from '@atproto/identity'\nimport { xrpc } from '@atproto/lex'\nimport { InvalidRequestError, Server } from '@atproto/xrpc-server'\nimport { AuthScope } from '../../../../auth-scope.js'\nimport { AppContext } from '../../../../context.js'\nimport { app } from '../../../../lexicons/index.js'\nimport { getDidDoc } from '../util/resolver.js'\n\nexport default function (server: Server, ctx: AppContext) {\n const { bskyAppView } = ctx\n if (!bskyAppView) return\n\n server.add(app.bsky.notification.registerPush, {\n auth: ctx.authVerifier.authorization({\n additional: [AuthScope.SignupQueued],\n authorize: () => {\n // @NOTE this endpoint predates generic service proxying but we want to\n // map the permission to the \"RPC\" scope for consistency. However, since\n // the service info is only available in the request body, we can't\n // assert permissions here.\n },\n }),\n handler: async ({ auth, input: { body } }) => {\n const { serviceDid } = body\n const { did } = auth.credentials\n\n if (auth.credentials.type === 'oauth') {\n auth.credentials.permissions.assertRpc({\n aud: `${serviceDid}#bsky_notif`,\n lxm: app.bsky.notification.registerPush.$lxm,\n })\n }\n\n const { headers } = await ctx.serviceAuthHeaders(\n did,\n serviceDid,\n app.bsky.notification.registerPush.$lxm,\n )\n\n if (bskyAppView.did === serviceDid) {\n await bskyAppView.client.call(\n app.bsky.notification.registerPush,\n body,\n { headers },\n )\n return\n }\n\n const notifEndpoint = await getEndpoint(ctx, serviceDid)\n\n await xrpc(notifEndpoint, app.bsky.notification.registerPush, {\n validateRequest: ctx.cfg.service.devMode,\n validateResponse: ctx.cfg.service.devMode,\n strictResponseProcessing: ctx.cfg.service.devMode,\n body,\n headers,\n })\n },\n })\n}\n\nconst getEndpoint = async (ctx: AppContext, serviceDid: string) => {\n const doc = await getDidDoc(ctx, serviceDid)\n const notifEndpoint = getNotif(doc)\n if (!notifEndpoint) {\n throw new InvalidRequestError(\n `invalid notification service details in did document: ${serviceDid}`,\n )\n }\n return notifEndpoint\n}\n"]}
1
+ {"version":3,"file":"registerPush.js","sourceRoot":"","sources":["../../../../../src/api/app/bsky/notification/registerPush.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACnC,OAAO,EAAE,mBAAmB,EAAe,MAAM,sBAAsB,CAAA;AACvE,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AAErD,OAAO,EAAE,GAAG,EAAE,MAAM,+BAA+B,CAAA;AACnD,OAAO,EAAE,SAAS,EAA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ClC,IAAI,EACJ,EAAE,OAAO,EAAE,CACZ,CAAA;gBACD,OAAM;YACR,CAAC;YAED,MAAM,aAAa,GAAG,MAAM,WAAW,CAAC,GAAG,EAAE,UAAU,CAAC,CAAA;YAExD,MAAM,IAAI,CAAC,aAAa,EAAE,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC,YAAY,EAAE;gBAC5D,eAAe,EAAE,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO;gBACxC,gBAAgB,EAAE,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO;gBACzC,wBAAwB,EAAE,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO;gBACjD,IAAI;gBACJ,OAAO;aACR,CAAC,CAAA;QACJ,CAAC;KACF,CAAC,CAAA;AACJ,CAAC;AAED,MAAM,WAAW,GAAG,KAAK,EAAE,GAAe,EAAE,UAAkB,EAAE,EAAE;IAChE,MAAM,GAAG,GAAG,MAAM,SAAS,CAAC,GAAG,EAAE,UAAU,CAAC,CAAA;IAC5C,MAAM,aAAa,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAA;IACnC,IAAI,CAAC,aAAa,EAAE,CAAC;QACnB,MAAM,IAAI,mBAAmB,CAC3B,yDAAyD,UAAU,EAAE,CACtE,CAAA;IACH,CAAC;IACD,OAAO,aAAa,CAAA;AACtB,CAAC,CAAA","sourcesContent":["import { getNotif } from '@atproto/identity'\nimport { xrpc } from '@atproto/lex'\nimport { InvalidRequestError, type Server } from '@atproto/xrpc-server'\nimport { AuthScope } from '../../../../auth-scope.js'\nimport type { AppContext } from '../../../../context.js'\nimport { app } from '../../../../lexicons/index.js'\nimport { getDidDoc } from '../util/resolver.js'\n\nexport default function (server: Server, ctx: AppContext) {\n const { bskyAppView } = ctx\n if (!bskyAppView) return\n\n server.add(app.bsky.notification.registerPush, {\n auth: ctx.authVerifier.authorization({\n additional: [AuthScope.SignupQueued],\n authorize: () => {\n // @NOTE this endpoint predates generic service proxying but we want to\n // map the permission to the \"RPC\" scope for consistency. However, since\n // the service info is only available in the request body, we can't\n // assert permissions here.\n },\n }),\n handler: async ({ auth, input: { body } }) => {\n const { serviceDid } = body\n const { did } = auth.credentials\n\n if (auth.credentials.type === 'oauth') {\n auth.credentials.permissions.assertRpc({\n aud: `${serviceDid}#bsky_notif`,\n lxm: app.bsky.notification.registerPush.$lxm,\n })\n }\n\n const { headers } = await ctx.serviceAuthHeaders(\n did,\n serviceDid,\n app.bsky.notification.registerPush.$lxm,\n )\n\n if (bskyAppView.did === serviceDid) {\n await bskyAppView.client.call(\n app.bsky.notification.registerPush,\n body,\n { headers },\n )\n return\n }\n\n const notifEndpoint = await getEndpoint(ctx, serviceDid)\n\n await xrpc(notifEndpoint, app.bsky.notification.registerPush, {\n validateRequest: ctx.cfg.service.devMode,\n validateResponse: ctx.cfg.service.devMode,\n strictResponseProcessing: ctx.cfg.service.devMode,\n body,\n headers,\n })\n },\n })\n}\n\nconst getEndpoint = async (ctx: AppContext, serviceDid: string) => {\n const doc = await getDidDoc(ctx, serviceDid)\n const notifEndpoint = getNotif(doc)\n if (!notifEndpoint) {\n throw new InvalidRequestError(\n `invalid notification service details in did document: ${serviceDid}`,\n )\n }\n return notifEndpoint\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { Server } from '@atproto/xrpc-server';
2
- import { AppContext } from '../../../../context.js';
1
+ import { type Server } from '@atproto/xrpc-server';
2
+ import type { AppContext } from '../../../../context.js';
3
3
  export default function (server: Server, ctx: AppContext): void;
4
4
  //# sourceMappingURL=unregisterPush.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"unregisterPush.d.ts","sourceRoot":"","sources":["../../../../../src/api/app/bsky/notification/unregisterPush.ts"],"names":[],"mappings":"AAEA,OAAO,EAAuB,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAInD,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QA8CvD"}
1
+ {"version":3,"file":"unregisterPush.d.ts","sourceRoot":"","sources":["../../../../../src/api/app/bsky/notification/unregisterPush.ts"],"names":[],"mappings":"AAEA,OAAO,EAAuB,KAAK,MAAM,EAAE,MAAM,sBAAsB,CAAA;AACvE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAIxD,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QA8CvD"}
@@ -1 +1 @@
1
- {"version":3,"file":"unregisterPush.js","sourceRoot":"","sources":["../../../../../src/api/app/bsky/notification/unregisterPush.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACnC,OAAO,EAAE,mBAAmB,EAAU,MAAM,sBAAsB,CAAA;AAElE,OAAO,EAAE,GAAG,EAAE,MAAM,+BAA+B,CAAA;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAE/C,MAAM,CAAC,OAAO,WAAW,MAAc,EAAE,GAAe;IACtD,MAAM,EAAE,WAAW,EAAE,GAAG,GAAG,CAAA;IAC3B,IAAI,CAAC,WAAW;QAAE,OAAM;IAExB,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC,cAAc,EAAE;QAC/C,IAAI,EAAE,GAAG,CAAC,YAAY,CAAC,aAAa,CAAC;YACnC,UAAU,EAAE,EAAE;YACd,SAAS,EAAE,GAAG,EAAE,GAAE,CAAC;SACpB,CAAC;QACF,OAAO,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE;YAC3C,MAAM,EAAE,UAAU,EAAE,GAAG,IAAI,CAAA;YAC3B,MAAM,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC,WAAW,CAAA;YA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QAAQ,CAAC,GAAG,CAAC,CAAA;IACnC,IAAI,CAAC,aAAa,EAAE,CAAC;QACnB,MAAM,IAAI,mBAAmB,CAC3B,yDAAyD,UAAU,EAAE,CACtE,CAAA;IACH,CAAC;IACD,OAAO,aAAa,CAAA;AACtB,CAAC,CAAA","sourcesContent":["import { getNotif } from '@atproto/identity'\nimport { xrpc } from '@atproto/lex'\nimport { InvalidRequestError, Server } from '@atproto/xrpc-server'\nimport { AppContext } from '../../../../context.js'\nimport { app } from '../../../../lexicons/index.js'\nimport { getDidDoc } from '../util/resolver.js'\n\nexport default function (server: Server, ctx: AppContext) {\n const { bskyAppView } = ctx\n if (!bskyAppView) return\n\n server.add(app.bsky.notification.unregisterPush, {\n auth: ctx.authVerifier.authorization({\n additional: [],\n authorize: () => {},\n }),\n handler: async ({ auth, input: { body } }) => {\n const { serviceDid } = body\n const { did } = auth.credentials\n\n if (auth.credentials.type === 'oauth') {\n auth.credentials.permissions.assertRpc({\n aud: `${serviceDid}#bsky_notif`,\n lxm: app.bsky.notification.unregisterPush.$lxm,\n })\n }\n\n const { headers } = await ctx.serviceAuthHeaders(\n did,\n serviceDid,\n app.bsky.notification.unregisterPush.$lxm,\n )\n\n if (bskyAppView.did === serviceDid) {\n await bskyAppView.client.call(\n app.bsky.notification.unregisterPush,\n body,\n { headers },\n )\n return\n }\n\n const notifEndpoint = await getEndpoint(ctx, serviceDid)\n\n await xrpc(notifEndpoint, app.bsky.notification.unregisterPush, {\n validateRequest: ctx.cfg.service.devMode,\n validateResponse: ctx.cfg.service.devMode,\n strictResponseProcessing: ctx.cfg.service.devMode,\n body,\n headers,\n })\n },\n })\n}\n\nconst getEndpoint = async (ctx: AppContext, serviceDid: string) => {\n const doc = await getDidDoc(ctx, serviceDid)\n const notifEndpoint = getNotif(doc)\n if (!notifEndpoint) {\n throw new InvalidRequestError(\n `invalid notification service details in did document: ${serviceDid}`,\n )\n }\n return notifEndpoint\n}\n"]}
1
+ {"version":3,"file":"unregisterPush.js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AG,CAAC,IAAI,CAAC,YAAY,CAAC,cAAc,CAAC,IAAI,CAC1C,CAAA;YAED,IAAI,WAAW,CAAC,GAAG,KAAK,UAAU,EAAE,CAAC;gBACnC,MAAM,WAAW,CAAC,MAAM,CAAC,IAAI,CAC3B,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC,cAAc,EACpC,IAAI,EACJ,EAAE,OAAO,EAAE,CACZ,CAAA;gBACD,OAAM;YACR,CAAC;YAED,MAAM,aAAa,GAAG,MAAM,WAAW,CAAC,GAAG,EAAE,UAAU,CAAC,CAAA;YAExD,MAAM,IAAI,CAAC,aAAa,EAAE,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC,cAAc,EAAE;gBAC9D,eAAe,EAAE,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO;gBACxC,gBAAgB,EAAE,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO;gBACzC,wBAAwB,EAAE,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO;gBACjD,IAAI;gBACJ,OAAO;aACR,CAAC,CAAA;QACJ,CAAC;KACF,CAAC,CAAA;AACJ,CAAC;AAED,MAAM,WAAW,GAAG,KAAK,EAAE,GAAe,EAAE,UAAkB,EAAE,EAAE;IAChE,MAAM,GAAG,GAAG,MAAM,SAAS,CAAC,GAAG,EAAE,UAAU,CAAC,CAAA;IAC5C,MAAM,aAAa,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAA;IACnC,IAAI,CAAC,aAAa,EAAE,CAAC;QACnB,MAAM,IAAI,mBAAmB,CAC3B,yDAAyD,UAAU,EAAE,CACtE,CAAA;IACH,CAAC;IACD,OAAO,aAAa,CAAA;AACtB,CAAC,CAAA","sourcesContent":["import { getNotif } from '@atproto/identity'\nimport { xrpc } from '@atproto/lex'\nimport { InvalidRequestError, type Server } from '@atproto/xrpc-server'\nimport type { AppContext } from '../../../../context.js'\nimport { app } from '../../../../lexicons/index.js'\nimport { getDidDoc } from '../util/resolver.js'\n\nexport default function (server: Server, ctx: AppContext) {\n const { bskyAppView } = ctx\n if (!bskyAppView) return\n\n server.add(app.bsky.notification.unregisterPush, {\n auth: ctx.authVerifier.authorization({\n additional: [],\n authorize: () => {},\n }),\n handler: async ({ auth, input: { body } }) => {\n const { serviceDid } = body\n const { did } = auth.credentials\n\n if (auth.credentials.type === 'oauth') {\n auth.credentials.permissions.assertRpc({\n aud: `${serviceDid}#bsky_notif`,\n lxm: app.bsky.notification.unregisterPush.$lxm,\n })\n }\n\n const { headers } = await ctx.serviceAuthHeaders(\n did,\n serviceDid,\n app.bsky.notification.unregisterPush.$lxm,\n )\n\n if (bskyAppView.did === serviceDid) {\n await bskyAppView.client.call(\n app.bsky.notification.unregisterPush,\n body,\n { headers },\n )\n return\n }\n\n const notifEndpoint = await getEndpoint(ctx, serviceDid)\n\n await xrpc(notifEndpoint, app.bsky.notification.unregisterPush, {\n validateRequest: ctx.cfg.service.devMode,\n validateResponse: ctx.cfg.service.devMode,\n strictResponseProcessing: ctx.cfg.service.devMode,\n body,\n headers,\n })\n },\n })\n}\n\nconst getEndpoint = async (ctx: AppContext, serviceDid: string) => {\n const doc = await getDidDoc(ctx, serviceDid)\n const notifEndpoint = getNotif(doc)\n if (!notifEndpoint) {\n throw new InvalidRequestError(\n `invalid notification service details in did document: ${serviceDid}`,\n )\n }\n return notifEndpoint\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { AppContext } from '../../../../context.js';
1
+ import type { AppContext } from '../../../../context.js';
2
2
  export declare const getDidDoc: (ctx: AppContext, did: string) => Promise<{
3
3
  '@context'?: "https://www.w3.org/ns/did/v1" | string[] | undefined;
4
4
  id: string;
@@ -1 +1 @@
1
- {"version":3,"file":"resolver.d.ts","sourceRoot":"","sources":["../../../../../src/api/app/bsky/util/resolver.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAGnD,eAAO,MAAM,SAAS,QAAe,UAAU,OAAO,MAAM;;;;;;;;;;;;;;;;;;;;;;;EAc3D,CAAA"}
1
+ {"version":3,"file":"resolver.d.ts","sourceRoot":"","sources":["../../../../../src/api/app/bsky/util/resolver.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAGxD,eAAO,MAAM,SAAS,QAAe,UAAU,OAAO,MAAM;;;;;;;;;;;;;;;;;;;;;;;EAc3D,CAAA"}
@@ -1,4 +1,4 @@
1
- import { PoorlyFormattedDidDocumentError } from '@atproto/identity';
1
+ import { PoorlyFormattedDidDocumentError, } from '@atproto/identity';
2
2
  import { InvalidRequestError } from '@atproto/xrpc-server';
3
3
  // provides http-friendly errors during did resolution
4
4
  export const getDidDoc = async (ctx, did) => {
@@ -1 +1 @@
1
- {"version":3,"file":"resolver.js","sourceRoot":"","sources":["../../../../../src/api/app/bsky/util/resolver.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,+BAA+B,EAAE,MAAM,mBAAmB,CAAA;AAChF,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAG1D,sDAAsD;AACtD,MAAM,CAAC,MAAM,SAAS,GAAG,KAAK,EAAE,GAAe,EAAE,GAAW,EAAE,EAAE;IAC9D,IAAI,QAA4B,CAAA;IAChC,IAAI,CAAC;QACH,QAAQ,GAAG,MAAM,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAA;IAClD,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,IAAI,GAAG,YAAY,+BAA+B,EAAE,CAAC;YACnD,MAAM,IAAI,mBAAmB,CAAC,yBAAyB,GAAG,EAAE,CAAC,CAAA;QAC/D,CAAC;QACD,MAAM,GAAG,CAAA;IACX,CAAC;IACD,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,MAAM,IAAI,mBAAmB,CAAC,mCAAmC,GAAG,EAAE,CAAC,CAAA;IACzE,CAAC;IACD,OAAO,QAAQ,CAAA;AACjB,CAAC,CAAA","sourcesContent":["import { DidDocument, PoorlyFormattedDidDocumentError } from '@atproto/identity'\nimport { InvalidRequestError } from '@atproto/xrpc-server'\nimport { AppContext } from '../../../../context.js'\n\n// provides http-friendly errors during did resolution\nexport const getDidDoc = async (ctx: AppContext, did: string) => {\n let resolved: DidDocument | null\n try {\n resolved = await ctx.idResolver.did.resolve(did)\n } catch (err) {\n if (err instanceof PoorlyFormattedDidDocumentError) {\n throw new InvalidRequestError(`invalid did document: ${did}`)\n }\n throw err\n }\n if (!resolved) {\n throw new InvalidRequestError(`could not resolve did document: ${did}`)\n }\n return resolved\n}\n"]}
1
+ {"version":3,"file":"resolver.js","sourceRoot":"","sources":["../../../../../src/api/app/bsky/util/resolver.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,+BAA+B,GAChC,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAG1D,sDAAsD;AACtD,MAAM,CAAC,MAAM,SAAS,GAAG,KAAK,EAAE,GAAe,EAAE,GAAW,EAAE,EAAE;IAC9D,IAAI,QAA4B,CAAA;IAChC,IAAI,CAAC;QACH,QAAQ,GAAG,MAAM,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAA;IAClD,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,IAAI,GAAG,YAAY,+BAA+B,EAAE,CAAC;YACnD,MAAM,IAAI,mBAAmB,CAAC,yBAAyB,GAAG,EAAE,CAAC,CAAA;QAC/D,CAAC;QACD,MAAM,GAAG,CAAA;IACX,CAAC;IACD,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,MAAM,IAAI,mBAAmB,CAAC,mCAAmC,GAAG,EAAE,CAAC,CAAA;IACzE,CAAC;IACD,OAAO,QAAQ,CAAA;AACjB,CAAC,CAAA","sourcesContent":["import {\n type DidDocument,\n PoorlyFormattedDidDocumentError,\n} from '@atproto/identity'\nimport { InvalidRequestError } from '@atproto/xrpc-server'\nimport type { AppContext } from '../../../../context.js'\n\n// provides http-friendly errors during did resolution\nexport const getDidDoc = async (ctx: AppContext, did: string) => {\n let resolved: DidDocument | null\n try {\n resolved = await ctx.idResolver.did.resolve(did)\n } catch (err) {\n if (err instanceof PoorlyFormattedDidDocumentError) {\n throw new InvalidRequestError(`invalid did document: ${did}`)\n }\n throw err\n }\n if (!resolved) {\n throw new InvalidRequestError(`could not resolve did document: ${did}`)\n }\n return resolved\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { Server } from '@atproto/xrpc-server';
2
- import { AppContext } from '../../../../context.js';
1
+ import type { Server } from '@atproto/xrpc-server';
2
+ import type { AppContext } from '../../../../context.js';
3
3
  export default function (server: Server, ctx: AppContext): void;
4
4
  //# sourceMappingURL=deleteAccount.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"deleteAccount.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/admin/deleteAccount.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAGnD,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QAiBvD"}
1
+ {"version":3,"file":"deleteAccount.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/admin/deleteAccount.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAClD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAGxD,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QAiBvD"}
@@ -1 +1 @@
1
- {"version":3,"file":"deleteAccount.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/admin/deleteAccount.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,GAAG,EAAE,MAAM,+BAA+B,CAAA;AAEnD,MAAM,CAAC,OAAO,WAAW,MAAc,EAAE,GAAe;IACtD,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,aAAa,EAAE;QAC1C,IAAI,EAAE,GAAG,CAAC,YAAY,CAAC,UAAU;QACjC,OAAO,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE;YAC3B,MAAM,EAAE,GAAG,EAAE,GAAG,KAAK,CAAC,IAAI,CAAA;YAE1B,sEAAsE;YACtE,yEAAyE;YACzE,6DAA6D;YAC7D,MAAM,GAAG,CAAC,cAAc,CAAC,aAAa,CAAC,GAAG,CAAC,CAAA;YAC3C,IAAI,CAAC;gBACH,MAAM,GAAG,CAAC,SAAS,CAAC,uBAAuB,CAAC,GAAG,CAAC,CAAA;YAClD,CAAC;oBAAS,CAAC;gBACT,MAAM,GAAG,CAAC,UAAU,CAAC,OAAO,CAAC,GAAG,CAAC,CAAA;YACnC,CAAC;QACH,CAAC;KACF,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import { Server } from '@atproto/xrpc-server'\nimport { AppContext } from '../../../../context.js'\nimport { com } from '../../../../lexicons/index.js'\n\nexport default function (server: Server, ctx: AppContext) {\n server.add(com.atproto.admin.deleteAccount, {\n auth: ctx.authVerifier.adminToken,\n handler: async ({ input }) => {\n const { did } = input.body\n\n // @NOTE Order matters here: first \"unlink\" the account by removing it\n // from the account manager database (\"source of truth\"), then notify the\n // sequencer, and finally cleanup files from the file system.\n await ctx.accountManager.deleteAccount(did)\n try {\n await ctx.sequencer.sequenceAccountDeletion(did)\n } finally {\n await ctx.actorStore.destroy(did)\n }\n },\n })\n}\n"]}
1
+ {"version":3,"file":"deleteAccount.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/admin/deleteAccount.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,GAAG,EAAE,MAAM,+BAA+B,CAAA;AAEnD,MAAM,CAAC,OAAO,WAAW,MAAc,EAAE,GAAe;IACtD,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,aAAa,EAAE;QAC1C,IAAI,EAAE,GAAG,CAAC,YAAY,CAAC,UAAU;QACjC,OAAO,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE;YAC3B,MAAM,EAAE,GAAG,EAAE,GAAG,KAAK,CAAC,IAAI,CAAA;YAE1B,sEAAsE;YACtE,yEAAyE;YACzE,6DAA6D;YAC7D,MAAM,GAAG,CAAC,cAAc,CAAC,aAAa,CAAC,GAAG,CAAC,CAAA;YAC3C,IAAI,CAAC;gBACH,MAAM,GAAG,CAAC,SAAS,CAAC,uBAAuB,CAAC,GAAG,CAAC,CAAA;YAClD,CAAC;oBAAS,CAAC;gBACT,MAAM,GAAG,CAAC,UAAU,CAAC,OAAO,CAAC,GAAG,CAAC,CAAA;YACnC,CAAC;QACH,CAAC;KACF,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import type { Server } from '@atproto/xrpc-server'\nimport type { AppContext } from '../../../../context.js'\nimport { com } from '../../../../lexicons/index.js'\n\nexport default function (server: Server, ctx: AppContext) {\n server.add(com.atproto.admin.deleteAccount, {\n auth: ctx.authVerifier.adminToken,\n handler: async ({ input }) => {\n const { did } = input.body\n\n // @NOTE Order matters here: first \"unlink\" the account by removing it\n // from the account manager database (\"source of truth\"), then notify the\n // sequencer, and finally cleanup files from the file system.\n await ctx.accountManager.deleteAccount(did)\n try {\n await ctx.sequencer.sequenceAccountDeletion(did)\n } finally {\n await ctx.actorStore.destroy(did)\n }\n },\n })\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { Server } from '@atproto/xrpc-server';
2
- import { AppContext } from '../../../../context.js';
1
+ import { type Server } from '@atproto/xrpc-server';
2
+ import type { AppContext } from '../../../../context.js';
3
3
  export default function (server: Server, ctx: AppContext): void;
4
4
  //# sourceMappingURL=disableAccountInvites.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"disableAccountInvites.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/admin/disableAccountInvites.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAGnD,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QAavD"}
1
+ {"version":3,"file":"disableAccountInvites.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/admin/disableAccountInvites.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,MAAM,EAAE,MAAM,sBAAsB,CAAA;AACvE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAGxD,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QAavD"}
@@ -1 +1 @@
1
- {"version":3,"file":"disableAccountInvites.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/admin/disableAccountInvites.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAU,MAAM,sBAAsB,CAAA;AAElE,OAAO,EAAE,GAAG,EAAE,MAAM,+BAA+B,CAAA;AAEnD,MAAM,CAAC,OAAO,WAAW,MAAc,EAAE,GAAe;IACtD,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,qBAAqB,EAAE;QAClD,IAAI,EAAE,GAAG,CAAC,YAAY,CAAC,SAAS;QAChC,OAAO,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE;YAC3B,IAAI,GAAG,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;gBACrB,MAAM,IAAI,mBAAmB,CAC3B,qDAAqD,CACtD,CAAA;YACH,CAAC;YACD,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC,IAAI,CAAA;YAC9B,MAAM,GAAG,CAAC,cAAc,CAAC,yBAAyB,CAAC,OAAO,EAAE,IAAI,CAAC,CAAA;QACnE,CAAC;KACF,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import { InvalidRequestError, Server } from '@atproto/xrpc-server'\nimport { AppContext } from '../../../../context.js'\nimport { com } from '../../../../lexicons/index.js'\n\nexport default function (server: Server, ctx: AppContext) {\n server.add(com.atproto.admin.disableAccountInvites, {\n auth: ctx.authVerifier.moderator,\n handler: async ({ input }) => {\n if (ctx.cfg.entryway) {\n throw new InvalidRequestError(\n 'Account invites are managed by the entryway service',\n )\n }\n const { account } = input.body\n await ctx.accountManager.setAccountInvitesDisabled(account, true)\n },\n })\n}\n"]}
1
+ {"version":3,"file":"disableAccountInvites.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/admin/disableAccountInvites.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAe,MAAM,sBAAsB,CAAA;AAEvE,OAAO,EAAE,GAAG,EAAE,MAAM,+BAA+B,CAAA;AAEnD,MAAM,CAAC,OAAO,WAAW,MAAc,EAAE,GAAe;IACtD,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,qBAAqB,EAAE;QAClD,IAAI,EAAE,GAAG,CAAC,YAAY,CAAC,SAAS;QAChC,OAAO,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE;YAC3B,IAAI,GAAG,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;gBACrB,MAAM,IAAI,mBAAmB,CAC3B,qDAAqD,CACtD,CAAA;YACH,CAAC;YACD,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC,IAAI,CAAA;YAC9B,MAAM,GAAG,CAAC,cAAc,CAAC,yBAAyB,CAAC,OAAO,EAAE,IAAI,CAAC,CAAA;QACnE,CAAC;KACF,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import { InvalidRequestError, type Server } from '@atproto/xrpc-server'\nimport type { AppContext } from '../../../../context.js'\nimport { com } from '../../../../lexicons/index.js'\n\nexport default function (server: Server, ctx: AppContext) {\n server.add(com.atproto.admin.disableAccountInvites, {\n auth: ctx.authVerifier.moderator,\n handler: async ({ input }) => {\n if (ctx.cfg.entryway) {\n throw new InvalidRequestError(\n 'Account invites are managed by the entryway service',\n )\n }\n const { account } = input.body\n await ctx.accountManager.setAccountInvitesDisabled(account, true)\n },\n })\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { Server } from '@atproto/xrpc-server';
2
- import { AppContext } from '../../../../context.js';
1
+ import { type Server } from '@atproto/xrpc-server';
2
+ import type { AppContext } from '../../../../context.js';
3
3
  export default function (server: Server, ctx: AppContext): void;
4
4
  //# sourceMappingURL=disableInviteCodes.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"disableInviteCodes.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/admin/disableInviteCodes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAGnD,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QAgBvD"}
1
+ {"version":3,"file":"disableInviteCodes.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/admin/disableInviteCodes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,MAAM,EAAE,MAAM,sBAAsB,CAAA;AACvE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAGxD,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QAgBvD"}
@@ -1 +1 @@
1
- {"version":3,"file":"disableInviteCodes.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/admin/disableInviteCodes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAU,MAAM,sBAAsB,CAAA;AAElE,OAAO,EAAE,GAAG,EAAE,MAAM,+BAA+B,CAAA;AAEnD,MAAM,CAAC,OAAO,WAAW,MAAc,EAAE,GAAe;IACtD,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,kBAAkB,EAAE;QAC/C,IAAI,EAAE,GAAG,CAAC,YAAY,CAAC,SAAS;QAChC,OAAO,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE;YAC3B,IAAI,GAAG,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;gBACrB,MAAM,IAAI,mBAAmB,CAC3B,qDAAqD,CACtD,CAAA;YACH,CAAC;YACD,MAAM,EAAE,KAAK,GAAG,EAAE,EAAE,QAAQ,GAAG,EAAE,EAAE,GAAG,KAAK,CAAC,IAAI,CAAA;YAChD,IAAI,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;gBAC/B,MAAM,IAAI,mBAAmB,CAAC,mCAAmC,CAAC,CAAA;YACpE,CAAC;YACD,MAAM,GAAG,CAAC,cAAc,CAAC,kBAAkB,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAA;QAClE,CAAC;KACF,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import { InvalidRequestError, Server } from '@atproto/xrpc-server'\nimport { AppContext } from '../../../../context.js'\nimport { com } from '../../../../lexicons/index.js'\n\nexport default function (server: Server, ctx: AppContext) {\n server.add(com.atproto.admin.disableInviteCodes, {\n auth: ctx.authVerifier.moderator,\n handler: async ({ input }) => {\n if (ctx.cfg.entryway) {\n throw new InvalidRequestError(\n 'Account invites are managed by the entryway service',\n )\n }\n const { codes = [], accounts = [] } = input.body\n if (accounts.includes('admin')) {\n throw new InvalidRequestError('cannot disable admin invite codes')\n }\n await ctx.accountManager.disableInviteCodes({ codes, accounts })\n },\n })\n}\n"]}
1
+ {"version":3,"file":"disableInviteCodes.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/admin/disableInviteCodes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAe,MAAM,sBAAsB,CAAA;AAEvE,OAAO,EAAE,GAAG,EAAE,MAAM,+BAA+B,CAAA;AAEnD,MAAM,CAAC,OAAO,WAAW,MAAc,EAAE,GAAe;IACtD,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,kBAAkB,EAAE;QAC/C,IAAI,EAAE,GAAG,CAAC,YAAY,CAAC,SAAS;QAChC,OAAO,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE;YAC3B,IAAI,GAAG,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;gBACrB,MAAM,IAAI,mBAAmB,CAC3B,qDAAqD,CACtD,CAAA;YACH,CAAC;YACD,MAAM,EAAE,KAAK,GAAG,EAAE,EAAE,QAAQ,GAAG,EAAE,EAAE,GAAG,KAAK,CAAC,IAAI,CAAA;YAChD,IAAI,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;gBAC/B,MAAM,IAAI,mBAAmB,CAAC,mCAAmC,CAAC,CAAA;YACpE,CAAC;YACD,MAAM,GAAG,CAAC,cAAc,CAAC,kBAAkB,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAA;QAClE,CAAC;KACF,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import { InvalidRequestError, type Server } from '@atproto/xrpc-server'\nimport type { AppContext } from '../../../../context.js'\nimport { com } from '../../../../lexicons/index.js'\n\nexport default function (server: Server, ctx: AppContext) {\n server.add(com.atproto.admin.disableInviteCodes, {\n auth: ctx.authVerifier.moderator,\n handler: async ({ input }) => {\n if (ctx.cfg.entryway) {\n throw new InvalidRequestError(\n 'Account invites are managed by the entryway service',\n )\n }\n const { codes = [], accounts = [] } = input.body\n if (accounts.includes('admin')) {\n throw new InvalidRequestError('cannot disable admin invite codes')\n }\n await ctx.accountManager.disableInviteCodes({ codes, accounts })\n },\n })\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { Server } from '@atproto/xrpc-server';
2
- import { AppContext } from '../../../../context.js';
1
+ import { type Server } from '@atproto/xrpc-server';
2
+ import type { AppContext } from '../../../../context.js';
3
3
  export default function (server: Server, ctx: AppContext): void;
4
4
  //# sourceMappingURL=enableAccountInvites.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"enableAccountInvites.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/admin/enableAccountInvites.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAGnD,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QAavD"}
1
+ {"version":3,"file":"enableAccountInvites.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/admin/enableAccountInvites.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,MAAM,EAAE,MAAM,sBAAsB,CAAA;AACvE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAGxD,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QAavD"}
@@ -1 +1 @@
1
- {"version":3,"file":"enableAccountInvites.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/admin/enableAccountInvites.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAU,MAAM,sBAAsB,CAAA;AAElE,OAAO,EAAE,GAAG,EAAE,MAAM,+BAA+B,CAAA;AAEnD,MAAM,CAAC,OAAO,WAAW,MAAc,EAAE,GAAe;IACtD,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,oBAAoB,EAAE;QACjD,IAAI,EAAE,GAAG,CAAC,YAAY,CAAC,SAAS;QAChC,OAAO,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE;YAC3B,IAAI,GAAG,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;gBACrB,MAAM,IAAI,mBAAmB,CAC3B,qDAAqD,CACtD,CAAA;YACH,CAAC;YACD,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC,IAAI,CAAA;YAC9B,MAAM,GAAG,CAAC,cAAc,CAAC,yBAAyB,CAAC,OAAO,EAAE,KAAK,CAAC,CAAA;QACpE,CAAC;KACF,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import { InvalidRequestError, Server } from '@atproto/xrpc-server'\nimport { AppContext } from '../../../../context.js'\nimport { com } from '../../../../lexicons/index.js'\n\nexport default function (server: Server, ctx: AppContext) {\n server.add(com.atproto.admin.enableAccountInvites, {\n auth: ctx.authVerifier.moderator,\n handler: async ({ input }) => {\n if (ctx.cfg.entryway) {\n throw new InvalidRequestError(\n 'Account invites are managed by the entryway service',\n )\n }\n const { account } = input.body\n await ctx.accountManager.setAccountInvitesDisabled(account, false)\n },\n })\n}\n"]}
1
+ {"version":3,"file":"enableAccountInvites.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/admin/enableAccountInvites.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAe,MAAM,sBAAsB,CAAA;AAEvE,OAAO,EAAE,GAAG,EAAE,MAAM,+BAA+B,CAAA;AAEnD,MAAM,CAAC,OAAO,WAAW,MAAc,EAAE,GAAe;IACtD,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,oBAAoB,EAAE;QACjD,IAAI,EAAE,GAAG,CAAC,YAAY,CAAC,SAAS;QAChC,OAAO,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE;YAC3B,IAAI,GAAG,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;gBACrB,MAAM,IAAI,mBAAmB,CAC3B,qDAAqD,CACtD,CAAA;YACH,CAAC;YACD,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC,IAAI,CAAA;YAC9B,MAAM,GAAG,CAAC,cAAc,CAAC,yBAAyB,CAAC,OAAO,EAAE,KAAK,CAAC,CAAA;QACpE,CAAC;KACF,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import { InvalidRequestError, type Server } from '@atproto/xrpc-server'\nimport type { AppContext } from '../../../../context.js'\nimport { com } from '../../../../lexicons/index.js'\n\nexport default function (server: Server, ctx: AppContext) {\n server.add(com.atproto.admin.enableAccountInvites, {\n auth: ctx.authVerifier.moderator,\n handler: async ({ input }) => {\n if (ctx.cfg.entryway) {\n throw new InvalidRequestError(\n 'Account invites are managed by the entryway service',\n )\n }\n const { account } = input.body\n await ctx.accountManager.setAccountInvitesDisabled(account, false)\n },\n })\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { Server } from '@atproto/xrpc-server';
2
- import { AppContext } from '../../../../context.js';
1
+ import { type Server } from '@atproto/xrpc-server';
2
+ import type { AppContext } from '../../../../context.js';
3
3
  export default function (server: Server, ctx: AppContext): void;
4
4
  //# sourceMappingURL=getAccountInfo.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getAccountInfo.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/admin/getAccountInfo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAInD,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QA0BvD"}
1
+ {"version":3,"file":"getAccountInfo.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/admin/getAccountInfo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,MAAM,EAAE,MAAM,sBAAsB,CAAA;AACvE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAIxD,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QA0BvD"}