@clioplaylists/clio 0.1.5 → 0.1.7

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 (294) hide show
  1. package/dist/.env +7 -0
  2. package/dist/api/com/clioplaylists/alpha/actor/getProfile.d.ts +0 -0
  3. package/dist/api/com/clioplaylists/alpha/actor/getProfile.js +37 -0
  4. package/dist/api/com/clioplaylists/alpha/feed/getSongs.d.ts +0 -0
  5. package/dist/api/com/clioplaylists/alpha/feed/getSongs.js +37 -0
  6. package/dist/api/health.d.ts +3 -0
  7. package/dist/api/health.js +25 -0
  8. package/dist/api/index.d.ts +4 -0
  9. package/dist/api/index.js +6 -0
  10. package/dist/api/util.d.ts +9 -0
  11. package/dist/api/util.js +13 -0
  12. package/dist/auth-verifier.d.ts +92 -0
  13. package/dist/auth-verifier.js +365 -0
  14. package/dist/client.d.ts +9 -0
  15. package/dist/client.js +33 -0
  16. package/dist/config.d.ts +21 -0
  17. package/dist/config.js +49 -0
  18. package/dist/context.d.ts +11 -0
  19. package/dist/context.js +12 -0
  20. package/dist/dataplane/client.d.ts +27 -0
  21. package/dist/dataplane/client.js +120 -0
  22. package/dist/dataplane/index.d.ts +2 -0
  23. package/dist/dataplane/index.js +2 -0
  24. package/dist/dataplane/server/background.d.ts +13 -0
  25. package/dist/dataplane/server/background.js +30 -0
  26. package/dist/dataplane/server/db/database-schema.d.ts +13 -0
  27. package/dist/dataplane/server/db/database-schema.js +1 -0
  28. package/dist/dataplane/server/db/db.d.ts +32 -0
  29. package/dist/dataplane/server/db/db.js +152 -0
  30. package/dist/dataplane/server/db/index.d.ts +1 -0
  31. package/dist/dataplane/server/db/index.js +1 -0
  32. package/dist/dataplane/server/db/migrations/20230309T045948368Z-init.d.ts +3 -0
  33. package/dist/dataplane/server/db/migrations/20230309T045948368Z-init.js +113 -0
  34. package/dist/dataplane/server/db/migrations/20230420T211446071Z-did-cache.d.ts +3 -0
  35. package/dist/dataplane/server/db/migrations/20230420T211446071Z-did-cache.js +11 -0
  36. package/dist/dataplane/server/db/migrations/index.d.ts +2 -0
  37. package/dist/dataplane/server/db/migrations/index.js +5 -0
  38. package/dist/dataplane/server/db/migrations/provider.d.ts +11 -0
  39. package/dist/dataplane/server/db/migrations/provider.js +19 -0
  40. package/dist/dataplane/server/db/pagination.d.ts +86 -0
  41. package/dist/dataplane/server/db/pagination.js +128 -0
  42. package/dist/dataplane/server/db/tables/actor-sync.d.ts +9 -0
  43. package/dist/dataplane/server/db/tables/actor-sync.js +1 -0
  44. package/dist/dataplane/server/db/tables/actor.d.ts +11 -0
  45. package/dist/dataplane/server/db/tables/actor.js +1 -0
  46. package/dist/dataplane/server/db/tables/artist-list-item.d.ts +11 -0
  47. package/dist/dataplane/server/db/tables/artist-list-item.js +1 -0
  48. package/dist/dataplane/server/db/tables/artist.d.ts +10 -0
  49. package/dist/dataplane/server/db/tables/artist.js +1 -0
  50. package/dist/dataplane/server/db/tables/playlist-idea.d.ts +14 -0
  51. package/dist/dataplane/server/db/tables/playlist-idea.js +1 -0
  52. package/dist/dataplane/server/db/tables/playlist-item.d.ts +11 -0
  53. package/dist/dataplane/server/db/tables/playlist-item.js +1 -0
  54. package/dist/dataplane/server/db/tables/playlist.d.ts +10 -0
  55. package/dist/dataplane/server/db/tables/playlist.js +1 -0
  56. package/dist/dataplane/server/db/tables/profile.d.ts +15 -0
  57. package/dist/dataplane/server/db/tables/profile.js +1 -0
  58. package/dist/dataplane/server/db/tables/record.d.ts +12 -0
  59. package/dist/dataplane/server/db/tables/record.js +1 -0
  60. package/dist/dataplane/server/db/tables/song.d.ts +12 -0
  61. package/dist/dataplane/server/db/tables/song.js +1 -0
  62. package/dist/dataplane/server/db/types.d.ts +9 -0
  63. package/dist/dataplane/server/db/types.js +1 -0
  64. package/dist/dataplane/server/db/util.d.ts +20 -0
  65. package/dist/dataplane/server/db/util.js +40 -0
  66. package/dist/dataplane/server/index.d.ts +11 -0
  67. package/dist/dataplane/server/index.js +36 -0
  68. package/dist/dataplane/server/indexing/index.d.ts +32 -0
  69. package/dist/dataplane/server/indexing/index.js +271 -0
  70. package/dist/dataplane/server/indexing/plugins/playlist-idea.d.ts +14 -0
  71. package/dist/dataplane/server/indexing/plugins/playlist-idea.js +126 -0
  72. package/dist/dataplane/server/indexing/plugins/profile.d.ts +8 -0
  73. package/dist/dataplane/server/indexing/plugins/profile.js +44 -0
  74. package/dist/dataplane/server/indexing/processor.d.ts +22 -0
  75. package/dist/dataplane/server/indexing/processor.js +72 -0
  76. package/dist/dataplane/server/routes/identity.d.ts +6 -0
  77. package/dist/dataplane/server/routes/identity.js +54 -0
  78. package/dist/dataplane/server/routes/index.d.ts +5 -0
  79. package/dist/dataplane/server/routes/index.js +14 -0
  80. package/dist/dataplane/server/routes/profile.d.ts +5 -0
  81. package/dist/dataplane/server/routes/profile.js +59 -0
  82. package/dist/dataplane/server/routes/records.d.ts +11 -0
  83. package/dist/dataplane/server/routes/records.js +51 -0
  84. package/dist/dataplane/server/routes/sync.d.ts +5 -0
  85. package/dist/dataplane/server/routes/sync.js +12 -0
  86. package/dist/dataplane/server/subscription.d.ts +25 -0
  87. package/dist/dataplane/server/subscription.js +86 -0
  88. package/dist/error.d.ts +2 -0
  89. package/dist/error.js +10 -0
  90. package/dist/index.d.ts +20 -0
  91. package/dist/index.js +55 -0
  92. package/dist/lexicons/index.d.ts +278 -0
  93. package/dist/lexicons/index.js +463 -0
  94. package/dist/lexicons/lexicons.d.ts +8466 -0
  95. package/dist/lexicons/lexicons.js +4548 -0
  96. package/dist/lexicons/types/com/atproto/admin/defs.d.ts +50 -0
  97. package/dist/lexicons/types/com/atproto/admin/defs.js +42 -0
  98. package/dist/lexicons/types/com/atproto/admin/deleteAccount.d.ts +29 -0
  99. package/dist/lexicons/types/com/atproto/admin/deleteAccount.js +1 -0
  100. package/dist/lexicons/types/com/atproto/admin/disableAccountInvites.d.ts +31 -0
  101. package/dist/lexicons/types/com/atproto/admin/disableAccountInvites.js +1 -0
  102. package/dist/lexicons/types/com/atproto/admin/disableInviteCodes.d.ts +30 -0
  103. package/dist/lexicons/types/com/atproto/admin/disableInviteCodes.js +1 -0
  104. package/dist/lexicons/types/com/atproto/admin/enableAccountInvites.d.ts +31 -0
  105. package/dist/lexicons/types/com/atproto/admin/enableAccountInvites.js +1 -0
  106. package/dist/lexicons/types/com/atproto/admin/getAccountInfo.d.ts +33 -0
  107. package/dist/lexicons/types/com/atproto/admin/getAccountInfo.js +1 -0
  108. package/dist/lexicons/types/com/atproto/admin/getAccountInfos.d.ts +36 -0
  109. package/dist/lexicons/types/com/atproto/admin/getAccountInfos.js +1 -0
  110. package/dist/lexicons/types/com/atproto/admin/getInviteCodes.d.ts +39 -0
  111. package/dist/lexicons/types/com/atproto/admin/getInviteCodes.js +1 -0
  112. package/dist/lexicons/types/com/atproto/admin/getSubjectStatus.d.ts +44 -0
  113. package/dist/lexicons/types/com/atproto/admin/getSubjectStatus.js +1 -0
  114. package/dist/lexicons/types/com/atproto/admin/searchAccounts.d.ts +39 -0
  115. package/dist/lexicons/types/com/atproto/admin/searchAccounts.js +1 -0
  116. package/dist/lexicons/types/com/atproto/admin/sendEmail.d.ts +45 -0
  117. package/dist/lexicons/types/com/atproto/admin/sendEmail.js +1 -0
  118. package/dist/lexicons/types/com/atproto/admin/updateAccountEmail.d.ts +31 -0
  119. package/dist/lexicons/types/com/atproto/admin/updateAccountEmail.js +1 -0
  120. package/dist/lexicons/types/com/atproto/admin/updateAccountHandle.d.ts +30 -0
  121. package/dist/lexicons/types/com/atproto/admin/updateAccountHandle.js +1 -0
  122. package/dist/lexicons/types/com/atproto/admin/updateAccountPassword.d.ts +30 -0
  123. package/dist/lexicons/types/com/atproto/admin/updateAccountPassword.js +1 -0
  124. package/dist/lexicons/types/com/atproto/admin/updateSubjectStatus.d.ts +51 -0
  125. package/dist/lexicons/types/com/atproto/admin/updateSubjectStatus.js +1 -0
  126. package/dist/lexicons/types/com/atproto/identity/defs.d.ts +14 -0
  127. package/dist/lexicons/types/com/atproto/identity/defs.js +10 -0
  128. package/dist/lexicons/types/com/atproto/identity/getRecommendedDidCredentials.d.ts +38 -0
  129. package/dist/lexicons/types/com/atproto/identity/getRecommendedDidCredentials.js +1 -0
  130. package/dist/lexicons/types/com/atproto/identity/refreshIdentity.d.ts +39 -0
  131. package/dist/lexicons/types/com/atproto/identity/refreshIdentity.js +1 -0
  132. package/dist/lexicons/types/com/atproto/identity/requestPlcOperationSignature.d.ts +23 -0
  133. package/dist/lexicons/types/com/atproto/identity/requestPlcOperationSignature.js +1 -0
  134. package/dist/lexicons/types/com/atproto/identity/resolveDid.d.ts +38 -0
  135. package/dist/lexicons/types/com/atproto/identity/resolveDid.js +1 -0
  136. package/dist/lexicons/types/com/atproto/identity/resolveHandle.d.ts +37 -0
  137. package/dist/lexicons/types/com/atproto/identity/resolveHandle.js +1 -0
  138. package/dist/lexicons/types/com/atproto/identity/resolveIdentity.d.ts +35 -0
  139. package/dist/lexicons/types/com/atproto/identity/resolveIdentity.js +1 -0
  140. package/dist/lexicons/types/com/atproto/identity/signPlcOperation.d.ts +46 -0
  141. package/dist/lexicons/types/com/atproto/identity/signPlcOperation.js +1 -0
  142. package/dist/lexicons/types/com/atproto/identity/submitPlcOperation.d.ts +29 -0
  143. package/dist/lexicons/types/com/atproto/identity/submitPlcOperation.js +1 -0
  144. package/dist/lexicons/types/com/atproto/identity/updateHandle.d.ts +30 -0
  145. package/dist/lexicons/types/com/atproto/identity/updateHandle.js +1 -0
  146. package/dist/lexicons/types/com/atproto/label/defs.d.ts +73 -0
  147. package/dist/lexicons/types/com/atproto/label/defs.js +42 -0
  148. package/dist/lexicons/types/com/atproto/label/queryLabels.d.ts +42 -0
  149. package/dist/lexicons/types/com/atproto/label/queryLabels.js +1 -0
  150. package/dist/lexicons/types/com/atproto/label/subscribeLabels.d.ts +38 -0
  151. package/dist/lexicons/types/com/atproto/label/subscribeLabels.js +18 -0
  152. package/dist/lexicons/types/com/atproto/lexicon/schema.d.ts +11 -0
  153. package/dist/lexicons/types/com/atproto/lexicon/schema.js +11 -0
  154. package/dist/lexicons/types/com/atproto/moderation/createReport.d.ts +57 -0
  155. package/dist/lexicons/types/com/atproto/moderation/createReport.js +1 -0
  156. package/dist/lexicons/types/com/atproto/moderation/defs.d.ts +20 -0
  157. package/dist/lexicons/types/com/atproto/moderation/defs.js +17 -0
  158. package/dist/lexicons/types/com/atproto/repo/applyWrites.d.ts +98 -0
  159. package/dist/lexicons/types/com/atproto/repo/applyWrites.js +50 -0
  160. package/dist/lexicons/types/com/atproto/repo/createRecord.d.ts +56 -0
  161. package/dist/lexicons/types/com/atproto/repo/createRecord.js +1 -0
  162. package/dist/lexicons/types/com/atproto/repo/defs.d.ts +11 -0
  163. package/dist/lexicons/types/com/atproto/repo/defs.js +10 -0
  164. package/dist/lexicons/types/com/atproto/repo/deleteRecord.d.ts +51 -0
  165. package/dist/lexicons/types/com/atproto/repo/deleteRecord.js +1 -0
  166. package/dist/lexicons/types/com/atproto/repo/describeRepo.d.ts +43 -0
  167. package/dist/lexicons/types/com/atproto/repo/describeRepo.js +1 -0
  168. package/dist/lexicons/types/com/atproto/repo/getRecord.d.ts +45 -0
  169. package/dist/lexicons/types/com/atproto/repo/getRecord.js +1 -0
  170. package/dist/lexicons/types/com/atproto/repo/importRepo.d.ts +27 -0
  171. package/dist/lexicons/types/com/atproto/repo/importRepo.js +1 -0
  172. package/dist/lexicons/types/com/atproto/repo/listMissingBlobs.d.ts +45 -0
  173. package/dist/lexicons/types/com/atproto/repo/listMissingBlobs.js +10 -0
  174. package/dist/lexicons/types/com/atproto/repo/listRecords.d.ts +53 -0
  175. package/dist/lexicons/types/com/atproto/repo/listRecords.js +10 -0
  176. package/dist/lexicons/types/com/atproto/repo/putRecord.d.ts +58 -0
  177. package/dist/lexicons/types/com/atproto/repo/putRecord.js +1 -0
  178. package/dist/lexicons/types/com/atproto/repo/strongRef.d.ts +11 -0
  179. package/dist/lexicons/types/com/atproto/repo/strongRef.js +11 -0
  180. package/dist/lexicons/types/com/atproto/repo/uploadBlob.d.ts +39 -0
  181. package/dist/lexicons/types/com/atproto/repo/uploadBlob.js +1 -0
  182. package/dist/lexicons/types/com/atproto/server/activateAccount.d.ts +23 -0
  183. package/dist/lexicons/types/com/atproto/server/activateAccount.js +1 -0
  184. package/dist/lexicons/types/com/atproto/server/checkAccountStatus.d.ts +42 -0
  185. package/dist/lexicons/types/com/atproto/server/checkAccountStatus.js +1 -0
  186. package/dist/lexicons/types/com/atproto/server/confirmEmail.d.ts +31 -0
  187. package/dist/lexicons/types/com/atproto/server/confirmEmail.js +1 -0
  188. package/dist/lexicons/types/com/atproto/server/createAccount.d.ts +61 -0
  189. package/dist/lexicons/types/com/atproto/server/createAccount.js +1 -0
  190. package/dist/lexicons/types/com/atproto/server/createAppPassword.d.ts +51 -0
  191. package/dist/lexicons/types/com/atproto/server/createAppPassword.js +10 -0
  192. package/dist/lexicons/types/com/atproto/server/createInviteCode.d.ts +41 -0
  193. package/dist/lexicons/types/com/atproto/server/createInviteCode.js +1 -0
  194. package/dist/lexicons/types/com/atproto/server/createInviteCodes.d.ts +50 -0
  195. package/dist/lexicons/types/com/atproto/server/createInviteCodes.js +10 -0
  196. package/dist/lexicons/types/com/atproto/server/createSession.d.ts +56 -0
  197. package/dist/lexicons/types/com/atproto/server/createSession.js +1 -0
  198. package/dist/lexicons/types/com/atproto/server/deactivateAccount.d.ts +30 -0
  199. package/dist/lexicons/types/com/atproto/server/deactivateAccount.js +1 -0
  200. package/dist/lexicons/types/com/atproto/server/defs.d.ts +23 -0
  201. package/dist/lexicons/types/com/atproto/server/defs.js +18 -0
  202. package/dist/lexicons/types/com/atproto/server/deleteAccount.d.ts +32 -0
  203. package/dist/lexicons/types/com/atproto/server/deleteAccount.js +1 -0
  204. package/dist/lexicons/types/com/atproto/server/deleteSession.d.ts +23 -0
  205. package/dist/lexicons/types/com/atproto/server/deleteSession.js +1 -0
  206. package/dist/lexicons/types/com/atproto/server/describeServer.d.ts +56 -0
  207. package/dist/lexicons/types/com/atproto/server/describeServer.js +18 -0
  208. package/dist/lexicons/types/com/atproto/server/getAccountInviteCodes.d.ts +39 -0
  209. package/dist/lexicons/types/com/atproto/server/getAccountInviteCodes.js +1 -0
  210. package/dist/lexicons/types/com/atproto/server/getServiceAuth.d.ts +41 -0
  211. package/dist/lexicons/types/com/atproto/server/getServiceAuth.js +1 -0
  212. package/dist/lexicons/types/com/atproto/server/getSession.d.ts +42 -0
  213. package/dist/lexicons/types/com/atproto/server/getSession.js +1 -0
  214. package/dist/lexicons/types/com/atproto/server/listAppPasswords.d.ts +44 -0
  215. package/dist/lexicons/types/com/atproto/server/listAppPasswords.js +10 -0
  216. package/dist/lexicons/types/com/atproto/server/refreshSession.d.ts +42 -0
  217. package/dist/lexicons/types/com/atproto/server/refreshSession.js +1 -0
  218. package/dist/lexicons/types/com/atproto/server/requestAccountDelete.d.ts +23 -0
  219. package/dist/lexicons/types/com/atproto/server/requestAccountDelete.js +1 -0
  220. package/dist/lexicons/types/com/atproto/server/requestEmailConfirmation.d.ts +23 -0
  221. package/dist/lexicons/types/com/atproto/server/requestEmailConfirmation.js +1 -0
  222. package/dist/lexicons/types/com/atproto/server/requestEmailUpdate.d.ts +34 -0
  223. package/dist/lexicons/types/com/atproto/server/requestEmailUpdate.js +1 -0
  224. package/dist/lexicons/types/com/atproto/server/requestPasswordReset.d.ts +29 -0
  225. package/dist/lexicons/types/com/atproto/server/requestPasswordReset.js +1 -0
  226. package/dist/lexicons/types/com/atproto/server/reserveSigningKey.d.ts +42 -0
  227. package/dist/lexicons/types/com/atproto/server/reserveSigningKey.js +1 -0
  228. package/dist/lexicons/types/com/atproto/server/resetPassword.d.ts +31 -0
  229. package/dist/lexicons/types/com/atproto/server/resetPassword.js +1 -0
  230. package/dist/lexicons/types/com/atproto/server/revokeAppPassword.d.ts +29 -0
  231. package/dist/lexicons/types/com/atproto/server/revokeAppPassword.js +1 -0
  232. package/dist/lexicons/types/com/atproto/server/updateEmail.d.ts +33 -0
  233. package/dist/lexicons/types/com/atproto/server/updateEmail.js +1 -0
  234. package/dist/lexicons/types/com/atproto/sync/getBlob.d.ts +36 -0
  235. package/dist/lexicons/types/com/atproto/sync/getBlob.js +1 -0
  236. package/dist/lexicons/types/com/atproto/sync/getBlocks.d.ts +35 -0
  237. package/dist/lexicons/types/com/atproto/sync/getBlocks.js +1 -0
  238. package/dist/lexicons/types/com/atproto/sync/getCheckout.d.ts +33 -0
  239. package/dist/lexicons/types/com/atproto/sync/getCheckout.js +1 -0
  240. package/dist/lexicons/types/com/atproto/sync/getHead.d.ts +37 -0
  241. package/dist/lexicons/types/com/atproto/sync/getHead.js +1 -0
  242. package/dist/lexicons/types/com/atproto/sync/getLatestCommit.d.ts +38 -0
  243. package/dist/lexicons/types/com/atproto/sync/getLatestCommit.js +1 -0
  244. package/dist/lexicons/types/com/atproto/sync/getRecord.d.ts +37 -0
  245. package/dist/lexicons/types/com/atproto/sync/getRecord.js +1 -0
  246. package/dist/lexicons/types/com/atproto/sync/getRepo.d.ts +36 -0
  247. package/dist/lexicons/types/com/atproto/sync/getRepo.js +1 -0
  248. package/dist/lexicons/types/com/atproto/sync/getRepoStatus.d.ts +42 -0
  249. package/dist/lexicons/types/com/atproto/sync/getRepoStatus.js +1 -0
  250. package/dist/lexicons/types/com/atproto/sync/listBlobs.d.ts +42 -0
  251. package/dist/lexicons/types/com/atproto/sync/listBlobs.js +1 -0
  252. package/dist/lexicons/types/com/atproto/sync/listRepos.d.ts +50 -0
  253. package/dist/lexicons/types/com/atproto/sync/listRepos.js +10 -0
  254. package/dist/lexicons/types/com/atproto/sync/listReposByCollection.d.ts +46 -0
  255. package/dist/lexicons/types/com/atproto/sync/listReposByCollection.js +10 -0
  256. package/dist/lexicons/types/com/atproto/sync/notifyOfUpdate.d.ts +30 -0
  257. package/dist/lexicons/types/com/atproto/sync/notifyOfUpdate.js +1 -0
  258. package/dist/lexicons/types/com/atproto/sync/requestCrawl.d.ts +30 -0
  259. package/dist/lexicons/types/com/atproto/sync/requestCrawl.js +1 -0
  260. package/dist/lexicons/types/com/atproto/sync/subscribeRepos.d.ts +111 -0
  261. package/dist/lexicons/types/com/atproto/sync/subscribeRepos.js +50 -0
  262. package/dist/lexicons/types/com/atproto/temp/addReservedHandle.d.ts +39 -0
  263. package/dist/lexicons/types/com/atproto/temp/addReservedHandle.js +1 -0
  264. package/dist/lexicons/types/com/atproto/temp/checkSignupQueue.d.ts +36 -0
  265. package/dist/lexicons/types/com/atproto/temp/checkSignupQueue.js +1 -0
  266. package/dist/lexicons/types/com/atproto/temp/fetchLabels.d.ts +37 -0
  267. package/dist/lexicons/types/com/atproto/temp/fetchLabels.js +1 -0
  268. package/dist/lexicons/types/com/atproto/temp/requestPhoneVerification.d.ts +29 -0
  269. package/dist/lexicons/types/com/atproto/temp/requestPhoneVerification.js +1 -0
  270. package/dist/lexicons/types/com/clioplaylists/alpha/actor/profile.d.ts +19 -0
  271. package/dist/lexicons/types/com/clioplaylists/alpha/actor/profile.js +11 -0
  272. package/dist/lexicons/types/com/clioplaylists/alpha/feed/defs.d.ts +32 -0
  273. package/dist/lexicons/types/com/clioplaylists/alpha/feed/defs.js +18 -0
  274. package/dist/lexicons/types/com/clioplaylists/alpha/feed/getSongs.d.ts +37 -0
  275. package/dist/lexicons/types/com/clioplaylists/alpha/feed/getSongs.js +1 -0
  276. package/dist/lexicons/types/com/clioplaylists/alpha/feed/playlistIdea.d.ts +32 -0
  277. package/dist/lexicons/types/com/clioplaylists/alpha/feed/playlistIdea.js +27 -0
  278. package/dist/lexicons/util.d.ts +5 -0
  279. package/dist/lexicons/util.js +9 -0
  280. package/dist/logger.d.ts +6 -0
  281. package/dist/logger.js +20 -0
  282. package/dist/rpc/clio_connect.d.ts +103 -0
  283. package/dist/rpc/clio_connect.js +107 -0
  284. package/dist/rpc/clio_pb.d.ts +457 -0
  285. package/dist/rpc/clio_pb.js +811 -0
  286. package/dist/start.d.ts +1 -0
  287. package/dist/util/retry.d.ts +2 -0
  288. package/dist/util/retry.js +13 -0
  289. package/dist/util/uris.d.ts +1 -0
  290. package/dist/util/uris.js +4 -0
  291. package/dist/util.d.ts +23 -0
  292. package/dist/util.js +76 -0
  293. package/package.json +7 -7
  294. /package/{start.js → dist/start.js} +0 -0
@@ -0,0 +1,39 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server';
5
+ import express from 'express';
6
+ import * as ComAtprotoServerDefs from './defs';
7
+ export interface QueryParams {
8
+ includeUsed: boolean;
9
+ /** Controls whether any new 'earned' but not 'created' invites should be created. */
10
+ createAvailable: boolean;
11
+ }
12
+ export type InputSchema = undefined;
13
+ export interface OutputSchema {
14
+ codes: ComAtprotoServerDefs.InviteCode[];
15
+ [k: string]: unknown;
16
+ }
17
+ export type HandlerInput = undefined;
18
+ export interface HandlerSuccess {
19
+ encoding: 'application/json';
20
+ body: OutputSchema;
21
+ headers?: {
22
+ [key: string]: string;
23
+ };
24
+ }
25
+ export interface HandlerError {
26
+ status: number;
27
+ message?: string;
28
+ error?: 'DuplicateCreate';
29
+ }
30
+ export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough;
31
+ export type HandlerReqCtx<HA extends HandlerAuth = never> = {
32
+ auth: HA;
33
+ params: QueryParams;
34
+ input: HandlerInput;
35
+ req: express.Request;
36
+ res: express.Response;
37
+ resetRouteRateLimits: () => Promise<void>;
38
+ };
39
+ export type Handler<HA extends HandlerAuth = never> = (ctx: HandlerReqCtx<HA>) => Promise<HandlerOutput> | HandlerOutput;
@@ -0,0 +1,41 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server';
5
+ import express from 'express';
6
+ export interface QueryParams {
7
+ /** The DID of the service that the token will be used to authenticate with */
8
+ aud: string;
9
+ /** The time in Unix Epoch seconds that the JWT expires. Defaults to 60 seconds in the future. The service may enforce certain time bounds on tokens depending on the requested scope. */
10
+ exp?: number;
11
+ /** Lexicon (XRPC) method to bind the requested token to */
12
+ lxm?: string;
13
+ }
14
+ export type InputSchema = undefined;
15
+ export interface OutputSchema {
16
+ token: string;
17
+ [k: string]: unknown;
18
+ }
19
+ export type HandlerInput = undefined;
20
+ export interface HandlerSuccess {
21
+ encoding: 'application/json';
22
+ body: OutputSchema;
23
+ headers?: {
24
+ [key: string]: string;
25
+ };
26
+ }
27
+ export interface HandlerError {
28
+ status: number;
29
+ message?: string;
30
+ error?: 'BadExpiration';
31
+ }
32
+ export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough;
33
+ export type HandlerReqCtx<HA extends HandlerAuth = never> = {
34
+ auth: HA;
35
+ params: QueryParams;
36
+ input: HandlerInput;
37
+ req: express.Request;
38
+ res: express.Response;
39
+ resetRouteRateLimits: () => Promise<void>;
40
+ };
41
+ export type Handler<HA extends HandlerAuth = never> = (ctx: HandlerReqCtx<HA>) => Promise<HandlerOutput> | HandlerOutput;
@@ -0,0 +1,42 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server';
5
+ import express from 'express';
6
+ export interface QueryParams {
7
+ }
8
+ export type InputSchema = undefined;
9
+ export interface OutputSchema {
10
+ handle: string;
11
+ did: string;
12
+ email?: string;
13
+ emailConfirmed?: boolean;
14
+ emailAuthFactor?: boolean;
15
+ didDoc?: {};
16
+ active?: boolean;
17
+ /** If active=false, this optional field indicates a possible reason for why the account is not active. If active=false and no status is supplied, then the host makes no claim for why the repository is no longer being hosted. */
18
+ status?: 'takendown' | 'suspended' | 'deactivated' | (string & {});
19
+ [k: string]: unknown;
20
+ }
21
+ export type HandlerInput = undefined;
22
+ export interface HandlerSuccess {
23
+ encoding: 'application/json';
24
+ body: OutputSchema;
25
+ headers?: {
26
+ [key: string]: string;
27
+ };
28
+ }
29
+ export interface HandlerError {
30
+ status: number;
31
+ message?: string;
32
+ }
33
+ export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough;
34
+ export type HandlerReqCtx<HA extends HandlerAuth = never> = {
35
+ auth: HA;
36
+ params: QueryParams;
37
+ input: HandlerInput;
38
+ req: express.Request;
39
+ res: express.Response;
40
+ resetRouteRateLimits: () => Promise<void>;
41
+ };
42
+ export type Handler<HA extends HandlerAuth = never> = (ctx: HandlerReqCtx<HA>) => Promise<HandlerOutput> | HandlerOutput;
@@ -0,0 +1,44 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { ValidationResult } from '@atproto/lexicon';
5
+ import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server';
6
+ import express from 'express';
7
+ export interface QueryParams {
8
+ }
9
+ export type InputSchema = undefined;
10
+ export interface OutputSchema {
11
+ passwords: AppPassword[];
12
+ [k: string]: unknown;
13
+ }
14
+ export type HandlerInput = undefined;
15
+ export interface HandlerSuccess {
16
+ encoding: 'application/json';
17
+ body: OutputSchema;
18
+ headers?: {
19
+ [key: string]: string;
20
+ };
21
+ }
22
+ export interface HandlerError {
23
+ status: number;
24
+ message?: string;
25
+ error?: 'AccountTakedown';
26
+ }
27
+ export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough;
28
+ export type HandlerReqCtx<HA extends HandlerAuth = never> = {
29
+ auth: HA;
30
+ params: QueryParams;
31
+ input: HandlerInput;
32
+ req: express.Request;
33
+ res: express.Response;
34
+ resetRouteRateLimits: () => Promise<void>;
35
+ };
36
+ export type Handler<HA extends HandlerAuth = never> = (ctx: HandlerReqCtx<HA>) => Promise<HandlerOutput> | HandlerOutput;
37
+ export interface AppPassword {
38
+ name: string;
39
+ createdAt: string;
40
+ privileged?: boolean;
41
+ [k: string]: unknown;
42
+ }
43
+ export declare function isAppPassword(v: unknown): v is AppPassword;
44
+ export declare function validateAppPassword(v: unknown): ValidationResult;
@@ -0,0 +1,10 @@
1
+ import { lexicons } from '../../../../lexicons';
2
+ import { hasProp, isObj } from '../../../../util';
3
+ export function isAppPassword(v) {
4
+ return (isObj(v) &&
5
+ hasProp(v, '$type') &&
6
+ v.$type === 'com.atproto.server.listAppPasswords#appPassword');
7
+ }
8
+ export function validateAppPassword(v) {
9
+ return lexicons.validate('com.atproto.server.listAppPasswords#appPassword', v);
10
+ }
@@ -0,0 +1,42 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server';
5
+ import express from 'express';
6
+ export interface QueryParams {
7
+ }
8
+ export type InputSchema = undefined;
9
+ export interface OutputSchema {
10
+ accessJwt: string;
11
+ refreshJwt: string;
12
+ handle: string;
13
+ did: string;
14
+ didDoc?: {};
15
+ active?: boolean;
16
+ /** Hosting status of the account. If not specified, then assume 'active'. */
17
+ status?: 'takendown' | 'suspended' | 'deactivated' | (string & {});
18
+ [k: string]: unknown;
19
+ }
20
+ export type HandlerInput = undefined;
21
+ export interface HandlerSuccess {
22
+ encoding: 'application/json';
23
+ body: OutputSchema;
24
+ headers?: {
25
+ [key: string]: string;
26
+ };
27
+ }
28
+ export interface HandlerError {
29
+ status: number;
30
+ message?: string;
31
+ error?: 'AccountTakedown';
32
+ }
33
+ export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough;
34
+ export type HandlerReqCtx<HA extends HandlerAuth = never> = {
35
+ auth: HA;
36
+ params: QueryParams;
37
+ input: HandlerInput;
38
+ req: express.Request;
39
+ res: express.Response;
40
+ resetRouteRateLimits: () => Promise<void>;
41
+ };
42
+ export type Handler<HA extends HandlerAuth = never> = (ctx: HandlerReqCtx<HA>) => Promise<HandlerOutput> | HandlerOutput;
@@ -0,0 +1,23 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { HandlerAuth } from '@atproto/xrpc-server';
5
+ import express from 'express';
6
+ export interface QueryParams {
7
+ }
8
+ export type InputSchema = undefined;
9
+ export type HandlerInput = undefined;
10
+ export interface HandlerError {
11
+ status: number;
12
+ message?: string;
13
+ }
14
+ export type HandlerOutput = HandlerError | void;
15
+ export type HandlerReqCtx<HA extends HandlerAuth = never> = {
16
+ auth: HA;
17
+ params: QueryParams;
18
+ input: HandlerInput;
19
+ req: express.Request;
20
+ res: express.Response;
21
+ resetRouteRateLimits: () => Promise<void>;
22
+ };
23
+ export type Handler<HA extends HandlerAuth = never> = (ctx: HandlerReqCtx<HA>) => Promise<HandlerOutput> | HandlerOutput;
@@ -0,0 +1,23 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { HandlerAuth } from '@atproto/xrpc-server';
5
+ import express from 'express';
6
+ export interface QueryParams {
7
+ }
8
+ export type InputSchema = undefined;
9
+ export type HandlerInput = undefined;
10
+ export interface HandlerError {
11
+ status: number;
12
+ message?: string;
13
+ }
14
+ export type HandlerOutput = HandlerError | void;
15
+ export type HandlerReqCtx<HA extends HandlerAuth = never> = {
16
+ auth: HA;
17
+ params: QueryParams;
18
+ input: HandlerInput;
19
+ req: express.Request;
20
+ res: express.Response;
21
+ resetRouteRateLimits: () => Promise<void>;
22
+ };
23
+ export type Handler<HA extends HandlerAuth = never> = (ctx: HandlerReqCtx<HA>) => Promise<HandlerOutput> | HandlerOutput;
@@ -0,0 +1,34 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server';
5
+ import express from 'express';
6
+ export interface QueryParams {
7
+ }
8
+ export type InputSchema = undefined;
9
+ export interface OutputSchema {
10
+ tokenRequired: boolean;
11
+ [k: string]: unknown;
12
+ }
13
+ export type HandlerInput = undefined;
14
+ export interface HandlerSuccess {
15
+ encoding: 'application/json';
16
+ body: OutputSchema;
17
+ headers?: {
18
+ [key: string]: string;
19
+ };
20
+ }
21
+ export interface HandlerError {
22
+ status: number;
23
+ message?: string;
24
+ }
25
+ export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough;
26
+ export type HandlerReqCtx<HA extends HandlerAuth = never> = {
27
+ auth: HA;
28
+ params: QueryParams;
29
+ input: HandlerInput;
30
+ req: express.Request;
31
+ res: express.Response;
32
+ resetRouteRateLimits: () => Promise<void>;
33
+ };
34
+ export type Handler<HA extends HandlerAuth = never> = (ctx: HandlerReqCtx<HA>) => Promise<HandlerOutput> | HandlerOutput;
@@ -0,0 +1,29 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { HandlerAuth } from '@atproto/xrpc-server';
5
+ import express from 'express';
6
+ export interface QueryParams {
7
+ }
8
+ export interface InputSchema {
9
+ email: string;
10
+ [k: string]: unknown;
11
+ }
12
+ export interface HandlerInput {
13
+ encoding: 'application/json';
14
+ body: InputSchema;
15
+ }
16
+ export interface HandlerError {
17
+ status: number;
18
+ message?: string;
19
+ }
20
+ export type HandlerOutput = HandlerError | void;
21
+ export type HandlerReqCtx<HA extends HandlerAuth = never> = {
22
+ auth: HA;
23
+ params: QueryParams;
24
+ input: HandlerInput;
25
+ req: express.Request;
26
+ res: express.Response;
27
+ resetRouteRateLimits: () => Promise<void>;
28
+ };
29
+ export type Handler<HA extends HandlerAuth = never> = (ctx: HandlerReqCtx<HA>) => Promise<HandlerOutput> | HandlerOutput;
@@ -0,0 +1,42 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server';
5
+ import express from 'express';
6
+ export interface QueryParams {
7
+ }
8
+ export interface InputSchema {
9
+ /** The DID to reserve a key for. */
10
+ did?: string;
11
+ [k: string]: unknown;
12
+ }
13
+ export interface OutputSchema {
14
+ /** The public key for the reserved signing key, in did:key serialization. */
15
+ signingKey: string;
16
+ [k: string]: unknown;
17
+ }
18
+ export interface HandlerInput {
19
+ encoding: 'application/json';
20
+ body: InputSchema;
21
+ }
22
+ export interface HandlerSuccess {
23
+ encoding: 'application/json';
24
+ body: OutputSchema;
25
+ headers?: {
26
+ [key: string]: string;
27
+ };
28
+ }
29
+ export interface HandlerError {
30
+ status: number;
31
+ message?: string;
32
+ }
33
+ export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough;
34
+ export type HandlerReqCtx<HA extends HandlerAuth = never> = {
35
+ auth: HA;
36
+ params: QueryParams;
37
+ input: HandlerInput;
38
+ req: express.Request;
39
+ res: express.Response;
40
+ resetRouteRateLimits: () => Promise<void>;
41
+ };
42
+ export type Handler<HA extends HandlerAuth = never> = (ctx: HandlerReqCtx<HA>) => Promise<HandlerOutput> | HandlerOutput;
@@ -0,0 +1,31 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { HandlerAuth } from '@atproto/xrpc-server';
5
+ import express from 'express';
6
+ export interface QueryParams {
7
+ }
8
+ export interface InputSchema {
9
+ token: string;
10
+ password: string;
11
+ [k: string]: unknown;
12
+ }
13
+ export interface HandlerInput {
14
+ encoding: 'application/json';
15
+ body: InputSchema;
16
+ }
17
+ export interface HandlerError {
18
+ status: number;
19
+ message?: string;
20
+ error?: 'ExpiredToken' | 'InvalidToken';
21
+ }
22
+ export type HandlerOutput = HandlerError | void;
23
+ export type HandlerReqCtx<HA extends HandlerAuth = never> = {
24
+ auth: HA;
25
+ params: QueryParams;
26
+ input: HandlerInput;
27
+ req: express.Request;
28
+ res: express.Response;
29
+ resetRouteRateLimits: () => Promise<void>;
30
+ };
31
+ export type Handler<HA extends HandlerAuth = never> = (ctx: HandlerReqCtx<HA>) => Promise<HandlerOutput> | HandlerOutput;
@@ -0,0 +1,29 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { HandlerAuth } from '@atproto/xrpc-server';
5
+ import express from 'express';
6
+ export interface QueryParams {
7
+ }
8
+ export interface InputSchema {
9
+ name: string;
10
+ [k: string]: unknown;
11
+ }
12
+ export interface HandlerInput {
13
+ encoding: 'application/json';
14
+ body: InputSchema;
15
+ }
16
+ export interface HandlerError {
17
+ status: number;
18
+ message?: string;
19
+ }
20
+ export type HandlerOutput = HandlerError | void;
21
+ export type HandlerReqCtx<HA extends HandlerAuth = never> = {
22
+ auth: HA;
23
+ params: QueryParams;
24
+ input: HandlerInput;
25
+ req: express.Request;
26
+ res: express.Response;
27
+ resetRouteRateLimits: () => Promise<void>;
28
+ };
29
+ export type Handler<HA extends HandlerAuth = never> = (ctx: HandlerReqCtx<HA>) => Promise<HandlerOutput> | HandlerOutput;
@@ -0,0 +1,33 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { HandlerAuth } from '@atproto/xrpc-server';
5
+ import express from 'express';
6
+ export interface QueryParams {
7
+ }
8
+ export interface InputSchema {
9
+ email: string;
10
+ emailAuthFactor?: boolean;
11
+ /** Requires a token from com.atproto.sever.requestEmailUpdate if the account's email has been confirmed. */
12
+ token?: string;
13
+ [k: string]: unknown;
14
+ }
15
+ export interface HandlerInput {
16
+ encoding: 'application/json';
17
+ body: InputSchema;
18
+ }
19
+ export interface HandlerError {
20
+ status: number;
21
+ message?: string;
22
+ error?: 'ExpiredToken' | 'InvalidToken' | 'TokenRequired';
23
+ }
24
+ export type HandlerOutput = HandlerError | void;
25
+ export type HandlerReqCtx<HA extends HandlerAuth = never> = {
26
+ auth: HA;
27
+ params: QueryParams;
28
+ input: HandlerInput;
29
+ req: express.Request;
30
+ res: express.Response;
31
+ resetRouteRateLimits: () => Promise<void>;
32
+ };
33
+ export type Handler<HA extends HandlerAuth = never> = (ctx: HandlerReqCtx<HA>) => Promise<HandlerOutput> | HandlerOutput;
@@ -0,0 +1,36 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server';
5
+ import express from 'express';
6
+ import stream from 'stream';
7
+ export interface QueryParams {
8
+ /** The DID of the account. */
9
+ did: string;
10
+ /** The CID of the blob to fetch */
11
+ cid: string;
12
+ }
13
+ export type InputSchema = undefined;
14
+ export type HandlerInput = undefined;
15
+ export interface HandlerSuccess {
16
+ encoding: '*/*';
17
+ body: Uint8Array | stream.Readable;
18
+ headers?: {
19
+ [key: string]: string;
20
+ };
21
+ }
22
+ export interface HandlerError {
23
+ status: number;
24
+ message?: string;
25
+ error?: 'BlobNotFound' | 'RepoNotFound' | 'RepoTakendown' | 'RepoSuspended' | 'RepoDeactivated';
26
+ }
27
+ export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough;
28
+ export type HandlerReqCtx<HA extends HandlerAuth = never> = {
29
+ auth: HA;
30
+ params: QueryParams;
31
+ input: HandlerInput;
32
+ req: express.Request;
33
+ res: express.Response;
34
+ resetRouteRateLimits: () => Promise<void>;
35
+ };
36
+ export type Handler<HA extends HandlerAuth = never> = (ctx: HandlerReqCtx<HA>) => Promise<HandlerOutput> | HandlerOutput;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,35 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server';
5
+ import express from 'express';
6
+ import stream from 'stream';
7
+ export interface QueryParams {
8
+ /** The DID of the repo. */
9
+ did: string;
10
+ cids: string[];
11
+ }
12
+ export type InputSchema = undefined;
13
+ export type HandlerInput = undefined;
14
+ export interface HandlerSuccess {
15
+ encoding: 'application/vnd.ipld.car';
16
+ body: Uint8Array | stream.Readable;
17
+ headers?: {
18
+ [key: string]: string;
19
+ };
20
+ }
21
+ export interface HandlerError {
22
+ status: number;
23
+ message?: string;
24
+ error?: 'BlockNotFound' | 'RepoNotFound' | 'RepoTakendown' | 'RepoSuspended' | 'RepoDeactivated';
25
+ }
26
+ export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough;
27
+ export type HandlerReqCtx<HA extends HandlerAuth = never> = {
28
+ auth: HA;
29
+ params: QueryParams;
30
+ input: HandlerInput;
31
+ req: express.Request;
32
+ res: express.Response;
33
+ resetRouteRateLimits: () => Promise<void>;
34
+ };
35
+ export type Handler<HA extends HandlerAuth = never> = (ctx: HandlerReqCtx<HA>) => Promise<HandlerOutput> | HandlerOutput;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,33 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server';
5
+ import express from 'express';
6
+ import stream from 'stream';
7
+ export interface QueryParams {
8
+ /** The DID of the repo. */
9
+ did: string;
10
+ }
11
+ export type InputSchema = undefined;
12
+ export type HandlerInput = undefined;
13
+ export interface HandlerSuccess {
14
+ encoding: 'application/vnd.ipld.car';
15
+ body: Uint8Array | stream.Readable;
16
+ headers?: {
17
+ [key: string]: string;
18
+ };
19
+ }
20
+ export interface HandlerError {
21
+ status: number;
22
+ message?: string;
23
+ }
24
+ export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough;
25
+ export type HandlerReqCtx<HA extends HandlerAuth = never> = {
26
+ auth: HA;
27
+ params: QueryParams;
28
+ input: HandlerInput;
29
+ req: express.Request;
30
+ res: express.Response;
31
+ resetRouteRateLimits: () => Promise<void>;
32
+ };
33
+ export type Handler<HA extends HandlerAuth = never> = (ctx: HandlerReqCtx<HA>) => Promise<HandlerOutput> | HandlerOutput;
@@ -0,0 +1,37 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server';
5
+ import express from 'express';
6
+ export interface QueryParams {
7
+ /** The DID of the repo. */
8
+ did: string;
9
+ }
10
+ export type InputSchema = undefined;
11
+ export interface OutputSchema {
12
+ root: string;
13
+ [k: string]: unknown;
14
+ }
15
+ export type HandlerInput = undefined;
16
+ export interface HandlerSuccess {
17
+ encoding: 'application/json';
18
+ body: OutputSchema;
19
+ headers?: {
20
+ [key: string]: string;
21
+ };
22
+ }
23
+ export interface HandlerError {
24
+ status: number;
25
+ message?: string;
26
+ error?: 'HeadNotFound';
27
+ }
28
+ export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough;
29
+ export type HandlerReqCtx<HA extends HandlerAuth = never> = {
30
+ auth: HA;
31
+ params: QueryParams;
32
+ input: HandlerInput;
33
+ req: express.Request;
34
+ res: express.Response;
35
+ resetRouteRateLimits: () => Promise<void>;
36
+ };
37
+ export type Handler<HA extends HandlerAuth = never> = (ctx: HandlerReqCtx<HA>) => Promise<HandlerOutput> | HandlerOutput;