@atproto/lex-space 0.0.0-stage → 0.0.1

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 (363) hide show
  1. package/LICENSE.txt +7 -0
  2. package/README.md +463 -2
  3. package/dist/actions.d.ts +17 -0
  4. package/dist/actions.d.ts.map +1 -0
  5. package/dist/actions.js +20 -0
  6. package/dist/actions.js.map +1 -0
  7. package/dist/atproto-did-resolver.d.ts +3 -0
  8. package/dist/atproto-did-resolver.d.ts.map +1 -0
  9. package/dist/atproto-did-resolver.js +2 -0
  10. package/dist/atproto-did-resolver.js.map +1 -0
  11. package/dist/client-attestation-provider.d.ts +57 -0
  12. package/dist/client-attestation-provider.d.ts.map +1 -0
  13. package/dist/client-attestation-provider.js +51 -0
  14. package/dist/client-attestation-provider.js.map +1 -0
  15. package/dist/delegation-token-provider.d.ts +25 -0
  16. package/dist/delegation-token-provider.d.ts.map +1 -0
  17. package/dist/delegation-token-provider.js +28 -0
  18. package/dist/delegation-token-provider.js.map +1 -0
  19. package/dist/errors.d.ts +27 -0
  20. package/dist/errors.d.ts.map +1 -0
  21. package/dist/errors.js +27 -0
  22. package/dist/errors.js.map +1 -0
  23. package/dist/index.d.ts +15 -0
  24. package/dist/index.d.ts.map +1 -0
  25. package/dist/index.js +15 -0
  26. package/dist/index.js.map +1 -0
  27. package/dist/lexicons/com/atproto/managedspace/policy.d.ts +3 -0
  28. package/dist/lexicons/com/atproto/managedspace/policy.d.ts.map +1 -0
  29. package/dist/lexicons/com/atproto/managedspace/policy.defs.d.ts +78 -0
  30. package/dist/lexicons/com/atproto/managedspace/policy.defs.d.ts.map +1 -0
  31. package/dist/lexicons/com/atproto/managedspace/policy.defs.js +23 -0
  32. package/dist/lexicons/com/atproto/managedspace/policy.defs.js.map +1 -0
  33. package/dist/lexicons/com/atproto/managedspace/policy.js +6 -0
  34. package/dist/lexicons/com/atproto/managedspace/policy.js.map +1 -0
  35. package/dist/lexicons/com/atproto/managedspace.d.ts +2 -0
  36. package/dist/lexicons/com/atproto/managedspace.d.ts.map +1 -0
  37. package/dist/lexicons/com/atproto/managedspace.js +5 -0
  38. package/dist/lexicons/com/atproto/managedspace.js.map +1 -0
  39. package/dist/lexicons/com/atproto/memberspace/defs.d.ts +2 -0
  40. package/dist/lexicons/com/atproto/memberspace/defs.d.ts.map +1 -0
  41. package/dist/lexicons/com/atproto/memberspace/defs.defs.d.ts +14 -0
  42. package/dist/lexicons/com/atproto/memberspace/defs.defs.d.ts.map +1 -0
  43. package/dist/lexicons/com/atproto/memberspace/defs.defs.js +9 -0
  44. package/dist/lexicons/com/atproto/memberspace/defs.defs.js.map +1 -0
  45. package/dist/lexicons/com/atproto/memberspace/defs.js +5 -0
  46. package/dist/lexicons/com/atproto/memberspace/defs.js.map +1 -0
  47. package/dist/lexicons/com/atproto/memberspace/listMembers.d.ts +3 -0
  48. package/dist/lexicons/com/atproto/memberspace/listMembers.d.ts.map +1 -0
  49. package/dist/lexicons/com/atproto/memberspace/listMembers.defs.d.ts +35 -0
  50. package/dist/lexicons/com/atproto/memberspace/listMembers.defs.d.ts.map +1 -0
  51. package/dist/lexicons/com/atproto/memberspace/listMembers.defs.js +15 -0
  52. package/dist/lexicons/com/atproto/memberspace/listMembers.defs.js.map +1 -0
  53. package/dist/lexicons/com/atproto/memberspace/listMembers.js +6 -0
  54. package/dist/lexicons/com/atproto/memberspace/listMembers.js.map +1 -0
  55. package/dist/lexicons/com/atproto/memberspace/policy.d.ts +3 -0
  56. package/dist/lexicons/com/atproto/memberspace/policy.d.ts.map +1 -0
  57. package/dist/lexicons/com/atproto/memberspace/policy.defs.d.ts +120 -0
  58. package/dist/lexicons/com/atproto/memberspace/policy.defs.d.ts.map +1 -0
  59. package/dist/lexicons/com/atproto/memberspace/policy.defs.js +23 -0
  60. package/dist/lexicons/com/atproto/memberspace/policy.defs.js.map +1 -0
  61. package/dist/lexicons/com/atproto/memberspace/policy.js +6 -0
  62. package/dist/lexicons/com/atproto/memberspace/policy.js.map +1 -0
  63. package/dist/lexicons/com/atproto/memberspace/putMembers.d.ts +3 -0
  64. package/dist/lexicons/com/atproto/memberspace/putMembers.d.ts.map +1 -0
  65. package/dist/lexicons/com/atproto/memberspace/putMembers.defs.d.ts +30 -0
  66. package/dist/lexicons/com/atproto/memberspace/putMembers.defs.d.ts.map +1 -0
  67. package/dist/lexicons/com/atproto/memberspace/putMembers.defs.js +16 -0
  68. package/dist/lexicons/com/atproto/memberspace/putMembers.defs.js.map +1 -0
  69. package/dist/lexicons/com/atproto/memberspace/putMembers.js +6 -0
  70. package/dist/lexicons/com/atproto/memberspace/putMembers.js.map +1 -0
  71. package/dist/lexicons/com/atproto/memberspace/removeMembers.d.ts +3 -0
  72. package/dist/lexicons/com/atproto/memberspace/removeMembers.d.ts.map +1 -0
  73. package/dist/lexicons/com/atproto/memberspace/removeMembers.defs.d.ts +33 -0
  74. package/dist/lexicons/com/atproto/memberspace/removeMembers.defs.d.ts.map +1 -0
  75. package/dist/lexicons/com/atproto/memberspace/removeMembers.defs.js +15 -0
  76. package/dist/lexicons/com/atproto/memberspace/removeMembers.defs.js.map +1 -0
  77. package/dist/lexicons/com/atproto/memberspace/removeMembers.js +6 -0
  78. package/dist/lexicons/com/atproto/memberspace/removeMembers.js.map +1 -0
  79. package/dist/lexicons/com/atproto/memberspace.d.ts +6 -0
  80. package/dist/lexicons/com/atproto/memberspace.d.ts.map +1 -0
  81. package/dist/lexicons/com/atproto/memberspace.js +9 -0
  82. package/dist/lexicons/com/atproto/memberspace.js.map +1 -0
  83. package/dist/lexicons/com/atproto/personalspace/policy.d.ts +3 -0
  84. package/dist/lexicons/com/atproto/personalspace/policy.d.ts.map +1 -0
  85. package/dist/lexicons/com/atproto/personalspace/policy.defs.d.ts +50 -0
  86. package/dist/lexicons/com/atproto/personalspace/policy.defs.d.ts.map +1 -0
  87. package/dist/lexicons/com/atproto/personalspace/policy.defs.js +23 -0
  88. package/dist/lexicons/com/atproto/personalspace/policy.defs.js.map +1 -0
  89. package/dist/lexicons/com/atproto/personalspace/policy.js +6 -0
  90. package/dist/lexicons/com/atproto/personalspace/policy.js.map +1 -0
  91. package/dist/lexicons/com/atproto/personalspace.d.ts +2 -0
  92. package/dist/lexicons/com/atproto/personalspace.d.ts.map +1 -0
  93. package/dist/lexicons/com/atproto/personalspace.js +5 -0
  94. package/dist/lexicons/com/atproto/personalspace.js.map +1 -0
  95. package/dist/lexicons/com/atproto/space/applyWrites.d.ts +3 -0
  96. package/dist/lexicons/com/atproto/space/applyWrites.d.ts.map +1 -0
  97. package/dist/lexicons/com/atproto/space/applyWrites.defs.d.ts +97 -0
  98. package/dist/lexicons/com/atproto/space/applyWrites.defs.d.ts.map +1 -0
  99. package/dist/lexicons/com/atproto/space/applyWrites.defs.js +30 -0
  100. package/dist/lexicons/com/atproto/space/applyWrites.defs.js.map +1 -0
  101. package/dist/lexicons/com/atproto/space/applyWrites.js +6 -0
  102. package/dist/lexicons/com/atproto/space/applyWrites.js.map +1 -0
  103. package/dist/lexicons/com/atproto/space/authorizeSpaceSync.d.ts +3 -0
  104. package/dist/lexicons/com/atproto/space/authorizeSpaceSync.d.ts.map +1 -0
  105. package/dist/lexicons/com/atproto/space/authorizeSpaceSync.defs.d.ts +59 -0
  106. package/dist/lexicons/com/atproto/space/authorizeSpaceSync.defs.d.ts.map +1 -0
  107. package/dist/lexicons/com/atproto/space/authorizeSpaceSync.defs.js +17 -0
  108. package/dist/lexicons/com/atproto/space/authorizeSpaceSync.defs.js.map +1 -0
  109. package/dist/lexicons/com/atproto/space/authorizeSpaceSync.js +6 -0
  110. package/dist/lexicons/com/atproto/space/authorizeSpaceSync.js.map +1 -0
  111. package/dist/lexicons/com/atproto/space/clearRecords.d.ts +3 -0
  112. package/dist/lexicons/com/atproto/space/clearRecords.d.ts.map +1 -0
  113. package/dist/lexicons/com/atproto/space/clearRecords.defs.d.ts +33 -0
  114. package/dist/lexicons/com/atproto/space/clearRecords.defs.d.ts.map +1 -0
  115. package/dist/lexicons/com/atproto/space/clearRecords.defs.js +15 -0
  116. package/dist/lexicons/com/atproto/space/clearRecords.defs.js.map +1 -0
  117. package/dist/lexicons/com/atproto/space/clearRecords.js +6 -0
  118. package/dist/lexicons/com/atproto/space/clearRecords.js.map +1 -0
  119. package/dist/lexicons/com/atproto/space/createRecord.d.ts +3 -0
  120. package/dist/lexicons/com/atproto/space/createRecord.d.ts.map +1 -0
  121. package/dist/lexicons/com/atproto/space/createRecord.defs.d.ts +69 -0
  122. package/dist/lexicons/com/atproto/space/createRecord.defs.d.ts.map +1 -0
  123. package/dist/lexicons/com/atproto/space/createRecord.defs.js +15 -0
  124. package/dist/lexicons/com/atproto/space/createRecord.defs.js.map +1 -0
  125. package/dist/lexicons/com/atproto/space/createRecord.js +6 -0
  126. package/dist/lexicons/com/atproto/space/createRecord.js.map +1 -0
  127. package/dist/lexicons/com/atproto/space/createSpace.d.ts +3 -0
  128. package/dist/lexicons/com/atproto/space/createSpace.d.ts.map +1 -0
  129. package/dist/lexicons/com/atproto/space/createSpace.defs.d.ts +46 -0
  130. package/dist/lexicons/com/atproto/space/createSpace.defs.d.ts.map +1 -0
  131. package/dist/lexicons/com/atproto/space/createSpace.defs.js +18 -0
  132. package/dist/lexicons/com/atproto/space/createSpace.defs.js.map +1 -0
  133. package/dist/lexicons/com/atproto/space/createSpace.js +6 -0
  134. package/dist/lexicons/com/atproto/space/createSpace.js.map +1 -0
  135. package/dist/lexicons/com/atproto/space/defs.d.ts +2 -0
  136. package/dist/lexicons/com/atproto/space/defs.d.ts.map +1 -0
  137. package/dist/lexicons/com/atproto/space/defs.defs.d.ts +60 -0
  138. package/dist/lexicons/com/atproto/space/defs.defs.d.ts.map +1 -0
  139. package/dist/lexicons/com/atproto/space/defs.defs.js +16 -0
  140. package/dist/lexicons/com/atproto/space/defs.defs.js.map +1 -0
  141. package/dist/lexicons/com/atproto/space/defs.js +5 -0
  142. package/dist/lexicons/com/atproto/space/defs.js.map +1 -0
  143. package/dist/lexicons/com/atproto/space/deleteRecord.d.ts +3 -0
  144. package/dist/lexicons/com/atproto/space/deleteRecord.d.ts.map +1 -0
  145. package/dist/lexicons/com/atproto/space/deleteRecord.defs.d.ts +45 -0
  146. package/dist/lexicons/com/atproto/space/deleteRecord.defs.d.ts.map +1 -0
  147. package/dist/lexicons/com/atproto/space/deleteRecord.defs.js +15 -0
  148. package/dist/lexicons/com/atproto/space/deleteRecord.defs.js.map +1 -0
  149. package/dist/lexicons/com/atproto/space/deleteRecord.js +6 -0
  150. package/dist/lexicons/com/atproto/space/deleteRecord.js.map +1 -0
  151. package/dist/lexicons/com/atproto/space/deleteSpace.d.ts +3 -0
  152. package/dist/lexicons/com/atproto/space/deleteSpace.d.ts.map +1 -0
  153. package/dist/lexicons/com/atproto/space/deleteSpace.defs.d.ts +27 -0
  154. package/dist/lexicons/com/atproto/space/deleteSpace.defs.d.ts.map +1 -0
  155. package/dist/lexicons/com/atproto/space/deleteSpace.defs.js +15 -0
  156. package/dist/lexicons/com/atproto/space/deleteSpace.defs.js.map +1 -0
  157. package/dist/lexicons/com/atproto/space/deleteSpace.js +6 -0
  158. package/dist/lexicons/com/atproto/space/deleteSpace.js.map +1 -0
  159. package/dist/lexicons/com/atproto/space/getBlob.d.ts +3 -0
  160. package/dist/lexicons/com/atproto/space/getBlob.d.ts.map +1 -0
  161. package/dist/lexicons/com/atproto/space/getBlob.defs.d.ts +36 -0
  162. package/dist/lexicons/com/atproto/space/getBlob.defs.d.ts.map +1 -0
  163. package/dist/lexicons/com/atproto/space/getBlob.defs.js +14 -0
  164. package/dist/lexicons/com/atproto/space/getBlob.defs.js.map +1 -0
  165. package/dist/lexicons/com/atproto/space/getBlob.js +6 -0
  166. package/dist/lexicons/com/atproto/space/getBlob.js.map +1 -0
  167. package/dist/lexicons/com/atproto/space/getDelegationToken.d.ts +3 -0
  168. package/dist/lexicons/com/atproto/space/getDelegationToken.d.ts.map +1 -0
  169. package/dist/lexicons/com/atproto/space/getDelegationToken.defs.d.ts +28 -0
  170. package/dist/lexicons/com/atproto/space/getDelegationToken.defs.d.ts.map +1 -0
  171. package/dist/lexicons/com/atproto/space/getDelegationToken.defs.js +14 -0
  172. package/dist/lexicons/com/atproto/space/getDelegationToken.defs.js.map +1 -0
  173. package/dist/lexicons/com/atproto/space/getDelegationToken.js +6 -0
  174. package/dist/lexicons/com/atproto/space/getDelegationToken.js.map +1 -0
  175. package/dist/lexicons/com/atproto/space/getLatestCommit.d.ts +3 -0
  176. package/dist/lexicons/com/atproto/space/getLatestCommit.d.ts.map +1 -0
  177. package/dist/lexicons/com/atproto/space/getLatestCommit.defs.d.ts +35 -0
  178. package/dist/lexicons/com/atproto/space/getLatestCommit.defs.d.ts.map +1 -0
  179. package/dist/lexicons/com/atproto/space/getLatestCommit.defs.js +15 -0
  180. package/dist/lexicons/com/atproto/space/getLatestCommit.defs.js.map +1 -0
  181. package/dist/lexicons/com/atproto/space/getLatestCommit.js +6 -0
  182. package/dist/lexicons/com/atproto/space/getLatestCommit.js.map +1 -0
  183. package/dist/lexicons/com/atproto/space/getRecord.d.ts +3 -0
  184. package/dist/lexicons/com/atproto/space/getRecord.d.ts.map +1 -0
  185. package/dist/lexicons/com/atproto/space/getRecord.defs.d.ts +58 -0
  186. package/dist/lexicons/com/atproto/space/getRecord.defs.d.ts.map +1 -0
  187. package/dist/lexicons/com/atproto/space/getRecord.defs.js +14 -0
  188. package/dist/lexicons/com/atproto/space/getRecord.defs.js.map +1 -0
  189. package/dist/lexicons/com/atproto/space/getRecord.js +6 -0
  190. package/dist/lexicons/com/atproto/space/getRecord.js.map +1 -0
  191. package/dist/lexicons/com/atproto/space/getRepo.d.ts +3 -0
  192. package/dist/lexicons/com/atproto/space/getRepo.d.ts.map +1 -0
  193. package/dist/lexicons/com/atproto/space/getRepo.defs.d.ts +30 -0
  194. package/dist/lexicons/com/atproto/space/getRepo.defs.d.ts.map +1 -0
  195. package/dist/lexicons/com/atproto/space/getRepo.defs.js +14 -0
  196. package/dist/lexicons/com/atproto/space/getRepo.defs.js.map +1 -0
  197. package/dist/lexicons/com/atproto/space/getRepo.js +6 -0
  198. package/dist/lexicons/com/atproto/space/getRepo.js.map +1 -0
  199. package/dist/lexicons/com/atproto/space/getSpace.d.ts +3 -0
  200. package/dist/lexicons/com/atproto/space/getSpace.d.ts.map +1 -0
  201. package/dist/lexicons/com/atproto/space/getSpace.defs.d.ts +37 -0
  202. package/dist/lexicons/com/atproto/space/getSpace.defs.d.ts.map +1 -0
  203. package/dist/lexicons/com/atproto/space/getSpace.defs.js +17 -0
  204. package/dist/lexicons/com/atproto/space/getSpace.defs.js.map +1 -0
  205. package/dist/lexicons/com/atproto/space/getSpace.js +6 -0
  206. package/dist/lexicons/com/atproto/space/getSpace.js.map +1 -0
  207. package/dist/lexicons/com/atproto/space/getSpaceCredential.d.ts +3 -0
  208. package/dist/lexicons/com/atproto/space/getSpaceCredential.d.ts.map +1 -0
  209. package/dist/lexicons/com/atproto/space/getSpaceCredential.defs.d.ts +53 -0
  210. package/dist/lexicons/com/atproto/space/getSpaceCredential.defs.d.ts.map +1 -0
  211. package/dist/lexicons/com/atproto/space/getSpaceCredential.defs.js +17 -0
  212. package/dist/lexicons/com/atproto/space/getSpaceCredential.defs.js.map +1 -0
  213. package/dist/lexicons/com/atproto/space/getSpaceCredential.js +6 -0
  214. package/dist/lexicons/com/atproto/space/getSpaceCredential.js.map +1 -0
  215. package/dist/lexicons/com/atproto/space/listBlobs.d.ts +3 -0
  216. package/dist/lexicons/com/atproto/space/listBlobs.d.ts.map +1 -0
  217. package/dist/lexicons/com/atproto/space/listBlobs.defs.d.ts +44 -0
  218. package/dist/lexicons/com/atproto/space/listBlobs.defs.d.ts.map +1 -0
  219. package/dist/lexicons/com/atproto/space/listBlobs.defs.js +14 -0
  220. package/dist/lexicons/com/atproto/space/listBlobs.defs.js.map +1 -0
  221. package/dist/lexicons/com/atproto/space/listBlobs.js +6 -0
  222. package/dist/lexicons/com/atproto/space/listBlobs.js.map +1 -0
  223. package/dist/lexicons/com/atproto/space/listRecords.d.ts +3 -0
  224. package/dist/lexicons/com/atproto/space/listRecords.d.ts.map +1 -0
  225. package/dist/lexicons/com/atproto/space/listRecords.defs.d.ts +58 -0
  226. package/dist/lexicons/com/atproto/space/listRecords.defs.d.ts.map +1 -0
  227. package/dist/lexicons/com/atproto/space/listRecords.defs.js +16 -0
  228. package/dist/lexicons/com/atproto/space/listRecords.defs.js.map +1 -0
  229. package/dist/lexicons/com/atproto/space/listRecords.js +6 -0
  230. package/dist/lexicons/com/atproto/space/listRecords.js.map +1 -0
  231. package/dist/lexicons/com/atproto/space/listRepoOps.d.ts +3 -0
  232. package/dist/lexicons/com/atproto/space/listRepoOps.d.ts.map +1 -0
  233. package/dist/lexicons/com/atproto/space/listRepoOps.defs.d.ts +74 -0
  234. package/dist/lexicons/com/atproto/space/listRepoOps.defs.d.ts.map +1 -0
  235. package/dist/lexicons/com/atproto/space/listRepoOps.defs.js +18 -0
  236. package/dist/lexicons/com/atproto/space/listRepoOps.defs.js.map +1 -0
  237. package/dist/lexicons/com/atproto/space/listRepoOps.js +6 -0
  238. package/dist/lexicons/com/atproto/space/listRepoOps.js.map +1 -0
  239. package/dist/lexicons/com/atproto/space/listSpaces.d.ts +3 -0
  240. package/dist/lexicons/com/atproto/space/listSpaces.d.ts.map +1 -0
  241. package/dist/lexicons/com/atproto/space/listSpaces.defs.d.ts +59 -0
  242. package/dist/lexicons/com/atproto/space/listSpaces.defs.d.ts.map +1 -0
  243. package/dist/lexicons/com/atproto/space/listSpaces.defs.js +16 -0
  244. package/dist/lexicons/com/atproto/space/listSpaces.defs.js.map +1 -0
  245. package/dist/lexicons/com/atproto/space/listSpaces.js +6 -0
  246. package/dist/lexicons/com/atproto/space/listSpaces.js.map +1 -0
  247. package/dist/lexicons/com/atproto/space/listWriters.d.ts +3 -0
  248. package/dist/lexicons/com/atproto/space/listWriters.d.ts.map +1 -0
  249. package/dist/lexicons/com/atproto/space/listWriters.defs.d.ts +35 -0
  250. package/dist/lexicons/com/atproto/space/listWriters.defs.d.ts.map +1 -0
  251. package/dist/lexicons/com/atproto/space/listWriters.defs.js +15 -0
  252. package/dist/lexicons/com/atproto/space/listWriters.defs.js.map +1 -0
  253. package/dist/lexicons/com/atproto/space/listWriters.js +6 -0
  254. package/dist/lexicons/com/atproto/space/listWriters.js.map +1 -0
  255. package/dist/lexicons/com/atproto/space/putRecord.d.ts +3 -0
  256. package/dist/lexicons/com/atproto/space/putRecord.d.ts.map +1 -0
  257. package/dist/lexicons/com/atproto/space/putRecord.defs.d.ts +69 -0
  258. package/dist/lexicons/com/atproto/space/putRecord.defs.d.ts.map +1 -0
  259. package/dist/lexicons/com/atproto/space/putRecord.defs.js +15 -0
  260. package/dist/lexicons/com/atproto/space/putRecord.defs.js.map +1 -0
  261. package/dist/lexicons/com/atproto/space/putRecord.js +6 -0
  262. package/dist/lexicons/com/atproto/space/putRecord.js.map +1 -0
  263. package/dist/lexicons/com/atproto/space/registerNotify.d.ts +3 -0
  264. package/dist/lexicons/com/atproto/space/registerNotify.d.ts.map +1 -0
  265. package/dist/lexicons/com/atproto/space/registerNotify.defs.d.ts +37 -0
  266. package/dist/lexicons/com/atproto/space/registerNotify.defs.d.ts.map +1 -0
  267. package/dist/lexicons/com/atproto/space/registerNotify.defs.js +23 -0
  268. package/dist/lexicons/com/atproto/space/registerNotify.defs.js.map +1 -0
  269. package/dist/lexicons/com/atproto/space/registerNotify.js +6 -0
  270. package/dist/lexicons/com/atproto/space/registerNotify.js.map +1 -0
  271. package/dist/lexicons/com/atproto/space/removeWriter.d.ts +3 -0
  272. package/dist/lexicons/com/atproto/space/removeWriter.d.ts.map +1 -0
  273. package/dist/lexicons/com/atproto/space/removeWriter.defs.d.ts +33 -0
  274. package/dist/lexicons/com/atproto/space/removeWriter.defs.d.ts.map +1 -0
  275. package/dist/lexicons/com/atproto/space/removeWriter.defs.js +15 -0
  276. package/dist/lexicons/com/atproto/space/removeWriter.defs.js.map +1 -0
  277. package/dist/lexicons/com/atproto/space/removeWriter.js +6 -0
  278. package/dist/lexicons/com/atproto/space/removeWriter.js.map +1 -0
  279. package/dist/lexicons/com/atproto/space/unregisterNotify.d.ts +3 -0
  280. package/dist/lexicons/com/atproto/space/unregisterNotify.d.ts.map +1 -0
  281. package/dist/lexicons/com/atproto/space/unregisterNotify.defs.d.ts +29 -0
  282. package/dist/lexicons/com/atproto/space/unregisterNotify.defs.d.ts.map +1 -0
  283. package/dist/lexicons/com/atproto/space/unregisterNotify.defs.js +20 -0
  284. package/dist/lexicons/com/atproto/space/unregisterNotify.defs.js.map +1 -0
  285. package/dist/lexicons/com/atproto/space/unregisterNotify.js +6 -0
  286. package/dist/lexicons/com/atproto/space/unregisterNotify.js.map +1 -0
  287. package/dist/lexicons/com/atproto/space/updateSpace.d.ts +3 -0
  288. package/dist/lexicons/com/atproto/space/updateSpace.d.ts.map +1 -0
  289. package/dist/lexicons/com/atproto/space/updateSpace.defs.d.ts +32 -0
  290. package/dist/lexicons/com/atproto/space/updateSpace.defs.d.ts.map +1 -0
  291. package/dist/lexicons/com/atproto/space/updateSpace.defs.js +18 -0
  292. package/dist/lexicons/com/atproto/space/updateSpace.defs.js.map +1 -0
  293. package/dist/lexicons/com/atproto/space/updateSpace.js +6 -0
  294. package/dist/lexicons/com/atproto/space/updateSpace.js.map +1 -0
  295. package/dist/lexicons/com/atproto/space.d.ts +23 -0
  296. package/dist/lexicons/com/atproto/space.d.ts.map +1 -0
  297. package/dist/lexicons/com/atproto/space.js +26 -0
  298. package/dist/lexicons/com/atproto/space.js.map +1 -0
  299. package/dist/lexicons/com/atproto.d.ts +5 -0
  300. package/dist/lexicons/com/atproto.d.ts.map +1 -0
  301. package/dist/lexicons/com/atproto.js +8 -0
  302. package/dist/lexicons/com/atproto.js.map +1 -0
  303. package/dist/lexicons/com.d.ts +2 -0
  304. package/dist/lexicons/com.d.ts.map +1 -0
  305. package/dist/lexicons/com.js +5 -0
  306. package/dist/lexicons/com.js.map +1 -0
  307. package/dist/lexicons/index.d.ts +2 -0
  308. package/dist/lexicons/index.d.ts.map +1 -0
  309. package/dist/lexicons/index.js +5 -0
  310. package/dist/lexicons/index.js.map +1 -0
  311. package/dist/policies/baseline.d.ts +7 -0
  312. package/dist/policies/baseline.d.ts.map +1 -0
  313. package/dist/policies/baseline.js +10 -0
  314. package/dist/policies/baseline.js.map +1 -0
  315. package/dist/policies/index.d.ts +6 -0
  316. package/dist/policies/index.d.ts.map +1 -0
  317. package/dist/policies/index.js +6 -0
  318. package/dist/policies/index.js.map +1 -0
  319. package/dist/policies/managedspace.d.ts +12 -0
  320. package/dist/policies/managedspace.d.ts.map +1 -0
  321. package/dist/policies/managedspace.js +12 -0
  322. package/dist/policies/managedspace.js.map +1 -0
  323. package/dist/policies/memberspace.d.ts +31 -0
  324. package/dist/policies/memberspace.d.ts.map +1 -0
  325. package/dist/policies/memberspace.js +48 -0
  326. package/dist/policies/memberspace.js.map +1 -0
  327. package/dist/policies/personalspace.d.ts +11 -0
  328. package/dist/policies/personalspace.d.ts.map +1 -0
  329. package/dist/policies/personalspace.js +11 -0
  330. package/dist/policies/personalspace.js.map +1 -0
  331. package/dist/policies/space-policy-manager.d.ts +73 -0
  332. package/dist/policies/space-policy-manager.d.ts.map +1 -0
  333. package/dist/policies/space-policy-manager.js +81 -0
  334. package/dist/policies/space-policy-manager.js.map +1 -0
  335. package/dist/space-client.d.ts +254 -0
  336. package/dist/space-client.d.ts.map +1 -0
  337. package/dist/space-client.js +301 -0
  338. package/dist/space-client.js.map +1 -0
  339. package/dist/space-collection.d.ts +11 -0
  340. package/dist/space-collection.d.ts.map +1 -0
  341. package/dist/space-collection.js +2 -0
  342. package/dist/space-collection.js.map +1 -0
  343. package/dist/space-credential-provider.d.ts +68 -0
  344. package/dist/space-credential-provider.d.ts.map +1 -0
  345. package/dist/space-credential-provider.js +68 -0
  346. package/dist/space-credential-provider.js.map +1 -0
  347. package/dist/space-credential.d.ts +35 -0
  348. package/dist/space-credential.d.ts.map +1 -0
  349. package/dist/space-credential.js +64 -0
  350. package/dist/space-credential.js.map +1 -0
  351. package/dist/space-manager.d.ts +102 -0
  352. package/dist/space-manager.d.ts.map +1 -0
  353. package/dist/space-manager.js +121 -0
  354. package/dist/space-manager.js.map +1 -0
  355. package/dist/space-reader.d.ts +400 -0
  356. package/dist/space-reader.d.ts.map +1 -0
  357. package/dist/space-reader.js +573 -0
  358. package/dist/space-reader.js.map +1 -0
  359. package/dist/write-operation-builder.d.ts +22 -0
  360. package/dist/write-operation-builder.d.ts.map +1 -0
  361. package/dist/write-operation-builder.js +37 -0
  362. package/dist/write-operation-builder.js.map +1 -0
  363. package/package.json +64 -3
@@ -0,0 +1,400 @@
1
+ import { type Agent, type CidString, type DidString, type Infer, type LexMap, type Main, type NsidString, type Procedure, type Query, type XrpcOptions, type XrpcResponse } from '@atproto/lex-client';
2
+ import { type Cid, type TypedLexMap } from '@atproto/lex-data';
3
+ import { type $Typed, type RecordKeyValue, type RecordSchema, type Space } from '@atproto/lex-schema';
4
+ import { type SpaceCommit } from '@atproto/space';
5
+ import { type RecordKeyString, SpaceRef, type SpaceRefString } from '@atproto/syntax';
6
+ import type { AtprotoDidResolver } from './atproto-did-resolver.js';
7
+ import { type RepoRemoved, type RepoWrite } from './lexicons/com/atproto/space/defs.js';
8
+ import getBlob from './lexicons/com/atproto/space/getBlob.js';
9
+ import getLatestCommit from './lexicons/com/atproto/space/getLatestCommit.js';
10
+ import getRecord from './lexicons/com/atproto/space/getRecord.js';
11
+ import getRepo from './lexicons/com/atproto/space/getRepo.js';
12
+ import listBlobs from './lexicons/com/atproto/space/listBlobs.js';
13
+ import listRecords, { type Record as ListRecordsRecord } from './lexicons/com/atproto/space/listRecords.js';
14
+ import listRepoOps from './lexicons/com/atproto/space/listRepoOps.js';
15
+ import listWriters from './lexicons/com/atproto/space/listWriters.js';
16
+ import type { SpaceCollection, SpaceCollectionSchema } from './space-collection.js';
17
+ import { type BuildSpaceCredentialProviderOptions, type SpaceCredentialProvider, type SpaceCredentialProviderOptions } from './space-credential-provider.js';
18
+ import type { SpaceCredential } from './space-credential.js';
19
+ export type * from './client-attestation-provider.js';
20
+ export type * from './delegation-token-provider.js';
21
+ export type { AtprotoDidResolver, BuildSpaceCredentialProviderOptions, SpaceCollectionSchema, SpaceCredential, SpaceCredentialProvider, SpaceCredentialProviderOptions, };
22
+ export { SpaceRef };
23
+ export declare namespace SpaceReader {
24
+ /** Requests made with a space credential are not proxied, nor labeled. */
25
+ type ReaderXrpcOptions<M extends Query | Procedure, K extends 'params' | 'body'> = Omit<XrpcOptions<M>, K | 'service' | 'labelers'>;
26
+ type ListedRecord = ListRecordsRecord;
27
+ /**
28
+ * A repo of the writer set, at the latest update to it: its latest write
29
+ * (`repoWrite`), or its removal from the writer set (`repoRemoved`).
30
+ */
31
+ type ListedWriter = $Typed<RepoWrite> | $Typed<RepoRemoved>;
32
+ type Options = BuildSpaceCredentialProviderOptions & {
33
+ /**
34
+ * Obtains the space credentials, in place of `delegationTokenProvider` and
35
+ * `clientAttestationProvider`. Use it to share credentials between readers
36
+ * of a space.
37
+ */
38
+ credentialProvider?: SpaceCredentialProvider;
39
+ /** Used for all requests. */
40
+ fetch?: typeof globalThis.fetch;
41
+ };
42
+ /** The account whose repo, within the space, a request targets. */
43
+ type RepoParam = {
44
+ repo: DidString;
45
+ };
46
+ type ListWritersOptions = ReaderXrpcOptions<typeof listWriters, 'params'> & {
47
+ limit?: number;
48
+ /** A space revision (exclusive), e.g. the highest `spaceRev` seen so far. */
49
+ cursor?: string;
50
+ };
51
+ type ListRecordsOptions = ReaderXrpcOptions<typeof listRecords, 'params'> & RepoParam & {
52
+ collection?: NsidString;
53
+ limit?: number;
54
+ cursor?: string;
55
+ excludeValues?: boolean;
56
+ };
57
+ type GetRecordOptions = ReaderXrpcOptions<typeof getRecord, 'params'> & RepoParam;
58
+ type GetLatestCommitOptions = ReaderXrpcOptions<typeof getLatestCommit, 'params'> & RepoParam;
59
+ type GetRepoOptions = ReaderXrpcOptions<typeof getRepo, 'params'> & RepoParam;
60
+ type ListRepoOpsOptions = ReaderXrpcOptions<typeof listRepoOps, 'params'> & RepoParam & {
61
+ /** A repo revision (exclusive). */
62
+ since?: string;
63
+ cursor?: string;
64
+ limit?: number;
65
+ excludeValues?: boolean;
66
+ };
67
+ type GetBlobOptions = ReaderXrpcOptions<typeof getBlob, 'params'> & RepoParam & {
68
+ cid: Cid | CidString;
69
+ };
70
+ type ListBlobsOptions = ReaderXrpcOptions<typeof listBlobs, 'params'> & RepoParam & {
71
+ cursor?: string;
72
+ limit?: number;
73
+ };
74
+ /** A record of a repo in the space, verified against the repo's commit. */
75
+ type RepoRecord = {
76
+ collection: NsidString;
77
+ rkey: RecordKeyString;
78
+ cid: Cid;
79
+ record: LexMap;
80
+ };
81
+ /**
82
+ * A repo of the space, read in full. Its records are verified against its
83
+ * commit as they are read: all of them must be read before trusting any.
84
+ *
85
+ * @note To avoid resource leaks, it must be disposed of (e.g. with `await
86
+ * using`), or its records read.
87
+ */
88
+ type Repo = AsyncDisposable & {
89
+ commit: SpaceCommit;
90
+ records: AsyncGenerator<RepoRecord>;
91
+ };
92
+ /** The state of a repo, as known to a syncer. */
93
+ type RepoHead = {
94
+ /** The revision of the commit the state matches. */
95
+ rev: string;
96
+ /** The LtHash state of the repo's records (see `RepoCommit`). */
97
+ state: Uint8Array;
98
+ };
99
+ /** Looks up the CID of a record, in the syncer's copy of a repo. */
100
+ type CidLookup = (collection: NsidString, rkey: RecordKeyString) => Cid | null | undefined | Promise<Cid | null | undefined>;
101
+ type RecordChange = {
102
+ collection: NsidString;
103
+ rkey: RecordKeyString;
104
+ /** The record's CID after the sync, or `null` if it was deleted. */
105
+ cid: Cid | null;
106
+ /** The record's CID before the sync, or `null` if it was created. */
107
+ prev: Cid | null;
108
+ /** The record's value, unless it was deleted. */
109
+ record?: LexMap;
110
+ };
111
+ type SyncRepoOptions = {
112
+ repo: DidString;
113
+ head: RepoHead;
114
+ lookup: CidLookup;
115
+ signal?: AbortSignal;
116
+ };
117
+ type RepoChanges = {
118
+ commit: SpaceCommit;
119
+ head: RepoHead;
120
+ /** The changes since `head`, one per record (as of the commit). */
121
+ changes: RecordChange[];
122
+ };
123
+ type RepoSnapshot = {
124
+ commit: SpaceCommit;
125
+ head: RepoHead;
126
+ records: RepoRecord[];
127
+ };
128
+ type PullRepoOptions = {
129
+ repo: DidString;
130
+ signal?: AbortSignal;
131
+ } & ({
132
+ head?: undefined;
133
+ lookup?: CidLookup;
134
+ } | {
135
+ /** The state of the syncer's copy of the repo, if any. */
136
+ head?: RepoHead;
137
+ lookup: CidLookup;
138
+ });
139
+ /**
140
+ * How a repo was brought up to date: with the changes since the known state,
141
+ * with a snapshot of the repo in full, or as an empty repo, when its host
142
+ * does not have it (e.g. never written to, or cleared and garbage collected).
143
+ * An empty repo has no state to sync from: any copy of it is to be dropped.
144
+ */
145
+ type RepoPull = ({
146
+ type: 'changes';
147
+ } & RepoChanges) | ({
148
+ type: 'snapshot';
149
+ } & RepoSnapshot) | {
150
+ type: 'empty';
151
+ };
152
+ /**
153
+ * A space of type `S`, by its authority and key. The key can be left out for
154
+ * space types with a literal key.
155
+ */
156
+ type AuthorityRef<S extends Space> = {
157
+ authority: DidString;
158
+ } & (S['key'] extends `literal:${string}` ? {
159
+ skey?: RecordKeyValue<S['key']>;
160
+ } : {
161
+ skey: RecordKeyValue<S['key']>;
162
+ });
163
+ type AllRecordsOptions = {
164
+ /** How many repos to fetch at once. @default 4 */
165
+ concurrency?: number;
166
+ signal?: AbortSignal;
167
+ };
168
+ /**
169
+ * A record of the space, flagged with whether its collection is one of the
170
+ * collections declared by the space type. It is not validated.
171
+ */
172
+ type AllRecordsItem<S extends Space = Space> = {
173
+ /** The account whose repo holds the record. */
174
+ repo: DidString;
175
+ rkey: RecordKeyString;
176
+ cid: Cid;
177
+ } & ({
178
+ valid: true;
179
+ collection: SpaceCollection<S>;
180
+ record: TypedLexMap<SpaceCollection<S>>;
181
+ } | {
182
+ valid: false;
183
+ collection: NsidString;
184
+ record: LexMap;
185
+ });
186
+ /**
187
+ * A record of the space, of a collection described by `T`, flagged with
188
+ * whether it matched its schema. With several schemas, checking `collection`
189
+ * narrows `record`.
190
+ */
191
+ type AllRecordsSchemaItem<T extends RecordSchema> = T extends unknown ? {
192
+ /** The account whose repo holds the record. */
193
+ repo: DidString;
194
+ collection: T['$type'];
195
+ rkey: RecordKeyString;
196
+ cid: Cid;
197
+ } & ({
198
+ valid: true;
199
+ record: Infer<T>;
200
+ } | {
201
+ valid: false;
202
+ record: LexMap;
203
+ }) : never;
204
+ }
205
+ /**
206
+ * Reads a space of the type described by `schema`, with a space credential
207
+ * obtained in exchange for delegation tokens (see
208
+ * {@link DelegationTokenProvider}). Use it to sync a space without acting for a
209
+ * specific user, e.g. in a sync service; see `SpaceClient` to act for a user.
210
+ *
211
+ * Requests are sent to the PDS of the account whose repo they target, or to
212
+ * the space host (the authority's PDS) when they target no repo. Records,
213
+ * commits, repos and blobs are verified against the MAC, or CID, their host
214
+ * provided.
215
+ *
216
+ * @example
217
+ * ```typescript
218
+ * const reader = SpaceReader.openSpace(com.example.forum, spaceUri, {
219
+ * delegationTokenProvider: async (space) => requestDelegationToken(space),
220
+ * })
221
+ *
222
+ * for await (const record of reader.allRecords()) {
223
+ * console.log(record.repo, record.collection, record.rkey, record.record)
224
+ * }
225
+ * ```
226
+ */
227
+ export declare class SpaceReader<S extends Space = Space> {
228
+ #private;
229
+ /** The space type, e.g. to restrict the collections read and written. */
230
+ readonly schema: S;
231
+ readonly ref: SpaceRef;
232
+ readonly uri: SpaceRefString;
233
+ /**
234
+ * Reads a space, identified by its URI or by its authority and key.
235
+ *
236
+ * @throws {TypeError} if the space is not of the type described by `schema`
237
+ */
238
+ static openSpace<const S extends Space>(schema: S, space: SpaceRefString | SpaceRef | SpaceReader.AuthorityRef<S>, options?: SpaceReader.Options): SpaceReader<S>;
239
+ /**
240
+ * @throws {TypeError} if the space is not of the type described by `schema`
241
+ */
242
+ constructor(
243
+ /** The space type, e.g. to restrict the collections read and written. */
244
+ schema: S, ref: SpaceRef, { fetch, didResolver, clientAttestationProvider, delegationTokenProvider, notifyRegistrationProvider, credentialProvider, }?: SpaceReader.Options);
245
+ /**
246
+ * Lists the accounts holding a repo in the space (its writer set), as known
247
+ * to the space host.
248
+ */
249
+ listWriters({ limit, cursor, ...options }?: SpaceReader.ListWritersOptions): Promise<XrpcResponse<typeof listWriters>>;
250
+ /**
251
+ * Iterates over the writer set of the space, at the latest update to each
252
+ * repo, in ascending `spaceRev` order. A repo removed from the writer set is
253
+ * listed as `repoRemoved`, and is not part of the space. A repo updated while
254
+ * iterating may be yielded again, in which case its last entry is current.
255
+ *
256
+ * The highest `spaceRev` yielded can be used as `cursor` to only list the
257
+ * repos updated since. Removals may be forgotten by the space host after 72
258
+ * hours, so with an older cursor, list the whole writer set instead, and drop
259
+ * the repos missing from it.
260
+ */
261
+ writers(options?: SpaceReader.ListWritersOptions): AsyncGenerator<SpaceReader.ListedWriter, void, undefined>;
262
+ listRecords({ repo, collection, limit, cursor, excludeValues, ...options }: SpaceReader.ListRecordsOptions): Promise<XrpcResponse<typeof listRecords>>;
263
+ /**
264
+ * Iterates over the records of a repo.
265
+ *
266
+ * @note Listed records are not covered by a MAC; see {@link getRepo} for a
267
+ * verified copy of a repo.
268
+ */
269
+ records(options: SpaceReader.ListRecordsOptions): AsyncGenerator<ListRecordsRecord, void, undefined>;
270
+ /**
271
+ * Gets a record, verified against the MAC its host computed for the
272
+ * request.
273
+ *
274
+ * @throws {SpaceRepoVerificationError} if the record fails verification
275
+ */
276
+ getRecord(collection: NsidString, rkey: string, { repo, ...options }: SpaceReader.GetRecordOptions): Promise<XrpcResponse<typeof getRecord>>;
277
+ /**
278
+ * Gets the current commit of a repo, verified against the MAC its host
279
+ * computed for the request.
280
+ *
281
+ * @throws {SpaceRepoVerificationError} if the commit fails verification
282
+ */
283
+ getLatestCommit({ repo, ...options }: SpaceReader.GetLatestCommitOptions): Promise<XrpcResponse<typeof getLatestCommit>>;
284
+ /**
285
+ * Gets a repo in full. Its commit is verified against the MAC its host
286
+ * computed for the request, and its records against its commit as they are
287
+ * read: all of them must be read before trusting any.
288
+ *
289
+ * @note The returned repo must be disposed of, or its records read.
290
+ * @throws {SpaceRepoVerificationError} if the repo fails verification
291
+ */
292
+ getRepo({ repo, ...options }: SpaceReader.GetRepoOptions): Promise<SpaceReader.Repo>;
293
+ /**
294
+ * Lists a page of a repo's operation log. The repo's current commit, included
295
+ * with every page, is verified against the MAC its host computed for the
296
+ * request.
297
+ *
298
+ * @see {@link syncRepo} to apply the operations to a known state.
299
+ * @throws {SpaceRepoVerificationError} if the commit fails verification
300
+ */
301
+ listRepoOps({ repo, since, cursor, limit, excludeValues, ...options }: SpaceReader.ListRepoOpsOptions): Promise<XrpcResponse<typeof listRepoOps>>;
302
+ /**
303
+ * Brings a known state of a repo up to date, from its operation log. Every
304
+ * operation is checked against the state (using `lookup` for the CIDs of the
305
+ * records it touches), and the resulting state against the repo's commit.
306
+ *
307
+ * @throws {RepoGapError} if the operation log cannot be applied to `head`
308
+ * @throws {SpaceRepoVerificationError} if the repo fails verification
309
+ */
310
+ syncRepo({ repo, head, lookup, signal, }: SpaceReader.SyncRepoOptions): Promise<SpaceReader.RepoChanges>;
311
+ /**
312
+ * Gets a repo in full, and the state needed to {@link syncRepo} it later.
313
+ *
314
+ * @throws {SpaceRepoVerificationError} if the repo fails verification
315
+ */
316
+ getRepoSnapshot({ repo, signal, }: {
317
+ repo: DidString;
318
+ signal?: AbortSignal;
319
+ }): Promise<SpaceReader.RepoSnapshot>;
320
+ /**
321
+ * Brings a repo up to date: incrementally from its known state (`head` and
322
+ * `lookup`), and in full when there is none (e.g. on the first pull), or
323
+ * when the incremental sync fails. A repo its host does not have is pulled
324
+ * as an empty repo.
325
+ */
326
+ pullRepo({ repo, head, lookup, signal, }: SpaceReader.PullRepoOptions): Promise<SpaceReader.RepoPull>;
327
+ /**
328
+ * Iterates over the records of every repo in the writer set of the space.
329
+ * Each repo is fetched in full, and verified, before its records are
330
+ * yielded. Repos removed from the writer set, and repos that are unavailable
331
+ * (not found, taken down, suspended or deactivated), are skipped.
332
+ *
333
+ * Every record is yielded, flagged with whether its collection is declared
334
+ * by the space type. With `collections`, only the records of these
335
+ * collections are yielded, flagged with whether they match their schema.
336
+ * These must be collections declared by the space type, unless
337
+ * `validateRequest` is `false`.
338
+ *
339
+ * @example
340
+ * ```typescript
341
+ * for await (const record of space.allRecords()) {
342
+ * if (record.valid) record.record // of a declared collection
343
+ * }
344
+ *
345
+ * for await (const post of space.allRecords({ collections: [com.example.post] })) {
346
+ * if (post.valid) post.record // com.example.post.Main
347
+ * }
348
+ * ```
349
+ */
350
+ allRecords(options?: SpaceReader.AllRecordsOptions): AsyncGenerator<SpaceReader.AllRecordsItem<S>, void, undefined>;
351
+ allRecords<const T extends RecordSchema>(options: SpaceReader.AllRecordsOptions & {
352
+ collections: readonly SpaceCollectionSchema<S, T>[];
353
+ validateRequest?: true;
354
+ }): AsyncGenerator<SpaceReader.AllRecordsSchemaItem<T>, void, undefined>;
355
+ allRecords<const T extends RecordSchema>(options: SpaceReader.AllRecordsOptions & {
356
+ collections: readonly Main<T>[];
357
+ validateRequest: false;
358
+ }): AsyncGenerator<SpaceReader.AllRecordsSchemaItem<T>, void, undefined>;
359
+ /** Whether `collection` is one of the collections declared by the space type. */
360
+ protected isCollection(collection: NsidString): boolean;
361
+ /**
362
+ * @throws {TypeError} if `collection` is not one of the collections declared
363
+ * by the space type
364
+ */
365
+ protected assertCollection(collection: NsidString): void;
366
+ /**
367
+ * Gets a blob, verified against its CID.
368
+ *
369
+ * @throws {SpaceRepoVerificationError} if the blob fails verification
370
+ */
371
+ getBlob({ repo, cid: cidInput, ...options }: SpaceReader.GetBlobOptions): Promise<XrpcResponse<typeof getBlob>>;
372
+ /** Lists the CIDs of the blobs referenced by a repo's records. */
373
+ listBlobs({ repo, cursor, limit, ...options }: SpaceReader.ListBlobsOptions): Promise<XrpcResponse<typeof listBlobs>>;
374
+ /**
375
+ * Makes a request to the space host (the authority's PDS), with the space
376
+ * credential presented to the space authority.
377
+ */
378
+ protected authorityXrpc<const M extends Query | Procedure>(ns: Main<M>, options: XrpcOptions<M>): Promise<XrpcResponse<M>>;
379
+ /**
380
+ * Makes a request to the host (PDS) of a repo in the space, with the space
381
+ * credential presented to the repo's account.
382
+ */
383
+ protected repoXrpc<const M extends Query | Procedure>(repo: DidString, ns: Main<M>, options: XrpcOptions<M>): Promise<XrpcResponse<M>>;
384
+ /**
385
+ * Makes a request with the space credential, presented to `audience` (whose
386
+ * PDS receives the request).
387
+ */
388
+ protected credentialXrpc<const M extends Query | Procedure>(audience: DidString, ns: Main<M>, options: XrpcOptions<M>): Promise<XrpcResponse<M>>;
389
+ protected buildCredentialXrpcAgent(audience: DidString, { signal, renew }?: SpaceCredentialProviderOptions): Promise<Agent>;
390
+ /**
391
+ * Obtains the space credential (or a new one, with `renew`). The credential
392
+ * is otherwise obtained on first use: call this to check, early, that the
393
+ * space grants access.
394
+ *
395
+ * @throws {XrpcResponseError} if the credential cannot be obtained, e.g.
396
+ * `SpaceNotFound` (not granted access), `AppNotAuthorized` or `SpaceDeleted`
397
+ */
398
+ authorize(options?: SpaceCredentialProviderOptions): Promise<SpaceCredential>;
399
+ }
400
+ //# sourceMappingURL=space-reader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"space-reader.d.ts","sourceRoot":"","sources":["../src/space-reader.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,KAAK,KAAK,EACV,KAAK,SAAS,EACd,KAAK,SAAS,EACd,KAAK,KAAK,EACV,KAAK,MAAM,EACX,KAAK,IAAI,EACT,KAAK,UAAU,EACf,KAAK,SAAS,EACd,KAAK,KAAK,EAEV,KAAK,WAAW,EAChB,KAAK,YAAY,EAIlB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EACL,KAAK,GAAG,EACR,KAAK,WAAW,EAIjB,MAAM,mBAAmB,CA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