@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 @@
1
+ {"version":3,"file":"space-reader.js","sourceRoot":"","sources":["../src/space-reader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,iBAAiB,CAAA;AAC7D,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAC7C,OAAO,EAUL,uBAAuB,EAGvB,iBAAiB,EACjB,UAAU,EACV,IAAI,GACL,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAGL,QAAQ,EACR,aAAa,EACb,QAAQ,GACT,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EAKL,OAAO,GACR,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EACL,kBAAkB,EAGlB,kBAAkB,EAClB,UAAU,EAEV,aAAa,EACb,0BAA0B,EAE1B,WAAW,EACX,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,EACZ,YAAY,EACZ,cAAc,GACf,MAAM,gBAAgB,CAAA;AACvB,OAAO,EAEL,QAAQ,GAET,MAAM,iBAAiB,CAAA;AACxB,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAE9D,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAC1C,OAAO,E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,SAAS,SAAS,CAAC,CAAa,EAAE,CAAa;IAC7C,OAAO,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;AACzD,CAAC","sourcesContent":["import { formatDidVerificationMethod } from '@atproto/crypto'\nimport { extractKemKey, extractPdsUrl } from '@atproto/did'\nimport { cidForLex } from '@atproto/lex-cbor'\nimport {\n type Agent,\n type CidString,\n type DidString,\n type Infer,\n type LexMap,\n type Main,\n type NsidString,\n type Procedure,\n type Query,\n XrpcAuthenticationError,\n type XrpcOptions,\n type XrpcResponse,\n XrpcResponseError,\n buildAgent,\n xrpc,\n} from '@atproto/lex-client'\nimport {\n type Cid,\n type TypedLexMap,\n checkCid,\n isCidForBytes,\n parseCid,\n} from '@atproto/lex-data'\nimport {\n type $Typed,\n type RecordKeyValue,\n type RecordSchema,\n type Space,\n getMain,\n} from '@atproto/lex-schema'\nimport {\n COMMIT_MAC_PROFILE,\n type Encapsulation,\n type MacProfile,\n RECORD_MAC_PROFILE,\n RepoCommit,\n type SpaceCommit,\n SpaceMacError,\n SpaceRepoVerificationError,\n type VerifyMacParams,\n encapsulate,\n formatMacRequest,\n formatRecordPath,\n verifyCommit,\n verifyRecord,\n verifyRepoStar,\n} from '@atproto/space'\nimport {\n type RecordKeyString,\n SpaceRef,\n type SpaceRefString,\n} from '@atproto/syntax'\nimport { createDidResolver } from '@atproto-labs/did-resolver'\nimport type { AtprotoDidResolver } from './atproto-did-resolver.js'\nimport { RepoGapError } from './errors.js'\nimport {\n type RepoRemoved,\n type RepoWrite,\n repoRemoved,\n repoWrite,\n} from './lexicons/com/atproto/space/defs.js'\nimport getBlob from './lexicons/com/atproto/space/getBlob.js'\nimport getLatestCommit from './lexicons/com/atproto/space/getLatestCommit.js'\nimport getRecord from './lexicons/com/atproto/space/getRecord.js'\nimport getRepo from './lexicons/com/atproto/space/getRepo.js'\nimport listBlobs from './lexicons/com/atproto/space/listBlobs.js'\nimport listRecords, {\n type Record as ListRecordsRecord,\n} from './lexicons/com/atproto/space/listRecords.js'\nimport listRepoOps from './lexicons/com/atproto/space/listRepoOps.js'\nimport listWriters from './lexicons/com/atproto/space/listWriters.js'\nimport type {\n SpaceCollection,\n SpaceCollectionSchema,\n} from './space-collection.js'\nimport {\n type BuildSpaceCredentialProviderOptions,\n type SpaceCredentialProvider,\n SpaceCredentialProviderCache,\n type SpaceCredentialProviderOptions,\n buildSpaceCredentialProvider,\n} from './space-credential-provider.js'\nimport type { SpaceCredential } from './space-credential.js'\n\nexport type * from './client-attestation-provider.js'\nexport type * from './delegation-token-provider.js'\nexport type {\n AtprotoDidResolver,\n BuildSpaceCredentialProviderOptions,\n SpaceCollectionSchema,\n SpaceCredential,\n SpaceCredentialProvider,\n SpaceCredentialProviderOptions,\n}\nexport { SpaceRef }\n\nexport declare namespace SpaceReader {\n /** Requests made with a space credential are not proxied, nor labeled. */\n type ReaderXrpcOptions<\n M extends Query | Procedure,\n K extends 'params' | 'body',\n > = Omit<XrpcOptions<M>, K | 'service' | 'labelers'>\n\n export type ListedRecord = ListRecordsRecord\n\n /**\n * A repo of the writer set, at the latest update to it: its latest write\n * (`repoWrite`), or its removal from the writer set (`repoRemoved`).\n */\n export type ListedWriter = $Typed<RepoWrite> | $Typed<RepoRemoved>\n\n export type Options = BuildSpaceCredentialProviderOptions & {\n /**\n * Obtains the space credentials, in place of `delegationTokenProvider` and\n * `clientAttestationProvider`. Use it to share credentials between readers\n * of a space.\n */\n credentialProvider?: SpaceCredentialProvider\n\n /** Used for all requests. */\n fetch?: typeof globalThis.fetch\n }\n\n /** The account whose repo, within the space, a request targets. */\n export type RepoParam = { repo: DidString }\n\n export type ListWritersOptions = ReaderXrpcOptions<\n typeof listWriters,\n 'params'\n > & {\n limit?: number\n /** A space revision (exclusive), e.g. the highest `spaceRev` seen so far. */\n cursor?: string\n }\n\n export type ListRecordsOptions = ReaderXrpcOptions<\n typeof listRecords,\n 'params'\n > &\n RepoParam & {\n collection?: NsidString\n limit?: number\n cursor?: string\n excludeValues?: boolean\n }\n\n export type GetRecordOptions = ReaderXrpcOptions<typeof getRecord, 'params'> &\n RepoParam\n\n export type GetLatestCommitOptions = ReaderXrpcOptions<\n typeof getLatestCommit,\n 'params'\n > &\n RepoParam\n\n export type GetRepoOptions = ReaderXrpcOptions<typeof getRepo, 'params'> &\n RepoParam\n\n export type ListRepoOpsOptions = ReaderXrpcOptions<\n typeof listRepoOps,\n 'params'\n > &\n RepoParam & {\n /** A repo revision (exclusive). */\n since?: string\n cursor?: string\n limit?: number\n excludeValues?: boolean\n }\n\n export type GetBlobOptions = ReaderXrpcOptions<typeof getBlob, 'params'> &\n RepoParam & { cid: Cid | CidString }\n\n export type ListBlobsOptions = ReaderXrpcOptions<typeof listBlobs, 'params'> &\n RepoParam & {\n cursor?: string\n limit?: number\n }\n\n /** A record of a repo in the space, verified against the repo's commit. */\n export type RepoRecord = {\n collection: NsidString\n rkey: RecordKeyString\n cid: Cid\n record: LexMap\n }\n\n /**\n * A repo of the space, read in full. Its records are verified against its\n * commit as they are read: all of them must be read before trusting any.\n *\n * @note To avoid resource leaks, it must be disposed of (e.g. with `await\n * using`), or its records read.\n */\n export type Repo = AsyncDisposable & {\n commit: SpaceCommit\n records: AsyncGenerator<RepoRecord>\n }\n\n /** The state of a repo, as known to a syncer. */\n export type RepoHead = {\n /** The revision of the commit the state matches. */\n rev: string\n /** The LtHash state of the repo's records (see `RepoCommit`). */\n state: Uint8Array\n }\n\n /** Looks up the CID of a record, in the syncer's copy of a repo. */\n export type CidLookup = (\n collection: NsidString,\n rkey: RecordKeyString,\n ) => Cid | null | undefined | Promise<Cid | null | undefined>\n\n export type RecordChange = {\n collection: NsidString\n rkey: RecordKeyString\n /** The record's CID after the sync, or `null` if it was deleted. */\n cid: Cid | null\n /** The record's CID before the sync, or `null` if it was created. */\n prev: Cid | null\n /** The record's value, unless it was deleted. */\n record?: LexMap\n }\n\n export type SyncRepoOptions = {\n repo: DidString\n head: RepoHead\n lookup: CidLookup\n signal?: AbortSignal\n }\n\n export type RepoChanges = {\n commit: SpaceCommit\n head: RepoHead\n /** The changes since `head`, one per record (as of the commit). */\n changes: RecordChange[]\n }\n\n export type RepoSnapshot = {\n commit: SpaceCommit\n head: RepoHead\n records: RepoRecord[]\n }\n\n export type PullRepoOptions = {\n repo: DidString\n signal?: AbortSignal\n } & (\n | { head?: undefined; lookup?: CidLookup }\n | {\n /** The state of the syncer's copy of the repo, if any. */\n head?: RepoHead\n lookup: CidLookup\n }\n )\n\n /**\n * How a repo was brought up to date: with the changes since the known state,\n * with a snapshot of the repo in full, or as an empty repo, when its host\n * does not have it (e.g. never written to, or cleared and garbage collected).\n * An empty repo has no state to sync from: any copy of it is to be dropped.\n */\n export type RepoPull =\n | ({ type: 'changes' } & RepoChanges)\n | ({ type: 'snapshot' } & RepoSnapshot)\n | { type: 'empty' }\n\n /**\n * A space of type `S`, by its authority and key. The key can be left out for\n * space types with a literal key.\n */\n export type AuthorityRef<S extends Space> = {\n authority: DidString\n } & (S['key'] extends `literal:${string}`\n ? { skey?: RecordKeyValue<S['key']> }\n : { skey: RecordKeyValue<S['key']> })\n\n export type AllRecordsOptions = {\n /** How many repos to fetch at once. @default 4 */\n concurrency?: number\n signal?: AbortSignal\n }\n\n /**\n * A record of the space, flagged with whether its collection is one of the\n * collections declared by the space type. It is not validated.\n */\n export type AllRecordsItem<S extends Space = Space> = {\n /** The account whose repo holds the record. */\n repo: DidString\n rkey: RecordKeyString\n cid: Cid\n } & (\n | {\n valid: true\n collection: SpaceCollection<S>\n record: TypedLexMap<SpaceCollection<S>>\n }\n | { valid: false; collection: NsidString; record: LexMap }\n )\n\n /**\n * A record of the space, of a collection described by `T`, flagged with\n * whether it matched its schema. With several schemas, checking `collection`\n * narrows `record`.\n */\n export type AllRecordsSchemaItem<T extends RecordSchema> =\n // Distributes over unions, so that checking `collection` narrows `record`\n T extends unknown\n ? {\n /** The account whose repo holds the record. */\n repo: DidString\n collection: T['$type']\n rkey: RecordKeyString\n cid: Cid\n } & (\n { valid: true; record: Infer<T> } | { valid: false; record: LexMap }\n )\n : never\n}\n\n/**\n * Reads a space of the type described by `schema`, with a space credential\n * obtained in exchange for delegation tokens (see\n * {@link DelegationTokenProvider}). Use it to sync a space without acting for a\n * specific user, e.g. in a sync service; see `SpaceClient` to act for a user.\n *\n * Requests are sent to the PDS of the account whose repo they target, or to\n * the space host (the authority's PDS) when they target no repo. Records,\n * commits, repos and blobs are verified against the MAC, or CID, their host\n * provided.\n *\n * @example\n * ```typescript\n * const reader = SpaceReader.openSpace(com.example.forum, spaceUri, {\n * delegationTokenProvider: async (space) => requestDelegationToken(space),\n * })\n *\n * for await (const record of reader.allRecords()) {\n * console.log(record.repo, record.collection, record.rkey, record.record)\n * }\n * ```\n */\nexport class SpaceReader<S extends Space = Space> {\n readonly uri: SpaceRefString\n\n readonly #resolver: AtprotoDidResolver\n readonly #fetch: typeof globalThis.fetch\n readonly #credentialProvider: SpaceCredentialProviderCache\n\n /**\n * Reads a space, identified by its URI or by its authority and key.\n *\n * @throws {TypeError} if the space is not of the type described by `schema`\n */\n static openSpace<const S extends Space>(\n schema: S,\n space: SpaceRefString | SpaceRef | SpaceReader.AuthorityRef<S>,\n options?: SpaceReader.Options,\n ): SpaceReader<S> {\n const ref =\n typeof space === 'string'\n ? SpaceRef.parse(space)\n : space instanceof SpaceRef\n ? space\n : schema.spaceRefFor(\n space.authority,\n space.skey as RecordKeyValue<S['key']>,\n )\n return new SpaceReader(schema, ref, options)\n }\n\n /**\n * @throws {TypeError} if the space is not of the type described by `schema`\n */\n constructor(\n /** The space type, e.g. to restrict the collections read and written. */\n readonly schema: S,\n readonly ref: SpaceRef,\n {\n fetch = globalThis.fetch,\n didResolver = createDidResolver({ fetch }),\n clientAttestationProvider = undefined,\n delegationTokenProvider = undefined,\n notifyRegistrationProvider = undefined,\n credentialProvider = buildSpaceCredentialProvider({\n didResolver,\n fetch,\n clientAttestationProvider,\n delegationTokenProvider,\n notifyRegistrationProvider,\n }),\n }: SpaceReader.Options = {},\n ) {\n if (ref.spaceType !== schema.nsid) {\n throw new TypeError(`${ref} is not a ${schema.nsid} space`)\n }\n this.uri = ref.toString()\n\n this.#resolver = didResolver\n this.#fetch = fetch\n this.#credentialProvider =\n SpaceCredentialProviderCache.for(credentialProvider)\n }\n\n /**\n * Lists the accounts holding a repo in the space (its writer set), as known\n * to the space host.\n */\n async listWriters({\n limit,\n cursor,\n ...options\n }: SpaceReader.ListWritersOptions = {}): Promise<\n XrpcResponse<typeof listWriters>\n > {\n return this.authorityXrpc(listWriters, {\n ...options,\n params: { space: this.uri, limit, cursor },\n })\n }\n\n /**\n * Iterates over the writer set of the space, at the latest update to each\n * repo, in ascending `spaceRev` order. A repo removed from the writer set is\n * listed as `repoRemoved`, and is not part of the space. A repo updated while\n * iterating may be yielded again, in which case its last entry is current.\n *\n * The highest `spaceRev` yielded can be used as `cursor` to only list the\n * repos updated since. Removals may be forgotten by the space host after 72\n * hours, so with an older cursor, list the whole writer set instead, and drop\n * the repos missing from it.\n */\n async *writers(\n options: SpaceReader.ListWritersOptions = {},\n ): AsyncGenerator<SpaceReader.ListedWriter, void, undefined> {\n let { cursor } = options\n do {\n const { body } = await this.listWriters({ ...options, cursor })\n for (const entry of body.repos) {\n // Entries of a kind unknown to this version are skipped.\n if (repoWrite.$isTypeOf(entry) || repoRemoved.$isTypeOf(entry)) {\n yield entry as SpaceReader.ListedWriter\n }\n }\n // Guard against a server returning the same cursor\n if (body.cursor === cursor) return\n cursor = body.cursor\n } while (cursor)\n }\n\n async listRecords({\n repo,\n collection,\n limit,\n cursor,\n excludeValues,\n ...options\n }: SpaceReader.ListRecordsOptions): Promise<\n XrpcResponse<typeof listRecords>\n > {\n return this.repoXrpc(repo, listRecords, {\n ...options,\n params: {\n space: this.uri,\n repo,\n collection,\n limit,\n cursor,\n excludeValues,\n },\n })\n }\n\n /**\n * Iterates over the records of a repo.\n *\n * @note Listed records are not covered by a MAC; see {@link getRepo} for a\n * verified copy of a repo.\n */\n async *records(\n options: SpaceReader.ListRecordsOptions,\n ): AsyncGenerator<ListRecordsRecord, void, undefined> {\n let { cursor } = options\n do {\n const { body } = await this.listRecords({ ...options, cursor })\n yield* body.records\n if (body.cursor === cursor) return\n cursor = body.cursor\n } while (cursor)\n }\n\n /**\n * Gets a record, verified against the MAC its host computed for the\n * request.\n *\n * @throws {SpaceRepoVerificationError} if the record fails verification\n */\n async getRecord(\n collection: NsidString,\n rkey: string,\n { repo, ...options }: SpaceReader.GetRecordOptions,\n ): Promise<XrpcResponse<typeof getRecord>> {\n const params = { space: this.uri, repo, collection, rkey }\n const uri = `${this.uri}/${repo}/${collection}/${rkey}` as const\n return this.#verified(`Record ${uri} failed verification`, async (kem) => {\n const { response, mac } = await this.#withMac(\n repo,\n getRecord,\n RECORD_MAC_PROFILE,\n { ...options, params },\n kem,\n )\n await verifyRecord(response.body, { ...mac, uri })\n return response\n })\n }\n\n /**\n * Gets the current commit of a repo, verified against the MAC its host\n * computed for the request.\n *\n * @throws {SpaceRepoVerificationError} if the commit fails verification\n */\n async getLatestCommit({\n repo,\n ...options\n }: SpaceReader.GetLatestCommitOptions): Promise<\n XrpcResponse<typeof getLatestCommit>\n > {\n const params = { space: this.uri, repo }\n return this.#verified(\n `Repo ${repo} commit failed verification`,\n async (kem) => {\n const { response, mac } = await this.#withMac(\n repo,\n getLatestCommit,\n COMMIT_MAC_PROFILE,\n { ...options, params },\n kem,\n )\n verifyCommit(response.body.commit, { ...params, ...mac })\n return response\n },\n )\n }\n\n /**\n * Gets a repo in full. Its commit is verified against the MAC its host\n * computed for the request, and its records against its commit as they are\n * read: all of them must be read before trusting any.\n *\n * @note The returned repo must be disposed of, or its records read.\n * @throws {SpaceRepoVerificationError} if the repo fails verification\n */\n async getRepo({\n repo,\n ...options\n }: SpaceReader.GetRepoOptions): Promise<SpaceReader.Repo> {\n const params = { space: this.uri, repo }\n return this.#verified(`Repo ${repo} failed verification`, async (kem) => {\n const { response, mac } = await this.#withMac(\n repo,\n getRepo,\n COMMIT_MAC_PROFILE,\n { ...options, params },\n kem,\n )\n // @TODO Stream the archive, once lex-client can stream response bodies\n return verifyRepoStar([response.body], { ...params, ...mac })\n })\n }\n\n /**\n * Lists a page of a repo's operation log. The repo's current commit, included\n * with every page, is verified against the MAC its host computed for the\n * request.\n *\n * @see {@link syncRepo} to apply the operations to a known state.\n * @throws {SpaceRepoVerificationError} if the commit fails verification\n */\n async listRepoOps({\n repo,\n since,\n cursor,\n limit,\n excludeValues,\n ...options\n }: SpaceReader.ListRepoOpsOptions): Promise<\n XrpcResponse<typeof listRepoOps>\n > {\n const params = {\n space: this.uri,\n repo,\n since,\n cursor,\n limit,\n excludeValues,\n }\n return this.#verified(\n `Repo ${repo} commit failed verification`,\n async (kem) => {\n const { response, mac } = await this.#withMac(\n repo,\n listRepoOps,\n COMMIT_MAC_PROFILE,\n { ...options, params },\n kem,\n )\n verifyCommit(response.body.commit, { space: this.uri, repo, ...mac })\n return response\n },\n )\n }\n\n /**\n * Brings a known state of a repo up to date, from its operation log. Every\n * operation is checked against the state (using `lookup` for the CIDs of the\n * records it touches), and the resulting state against the repo's commit.\n *\n * @throws {RepoGapError} if the operation log cannot be applied to `head`\n * @throws {SpaceRepoVerificationError} if the repo fails verification\n */\n async syncRepo({\n repo,\n head,\n lookup,\n signal,\n }: SpaceReader.SyncRepoOptions): Promise<SpaceReader.RepoChanges> {\n const repoCommit = RepoCommit.fromState(head.state)\n const changes = new Map<string, SpaceReader.RecordChange>()\n\n let commit: SpaceCommit\n let cursor: string | undefined\n let rev = head.rev\n do {\n const { body } = await this.listRepoOps({\n repo,\n since: head.rev,\n cursor,\n signal,\n })\n\n for (const op of body.ops) {\n // Operations sharing a revision were applied atomically.\n if (op.rev <= head.rev || op.rev < rev) {\n throw new RepoGapError(`Repo ${repo} operations are out of order`)\n }\n rev = op.rev\n\n const path = formatRecordPath(op.collection, op.rkey)\n const change = changes.get(path)\n const current = change\n ? change.cid\n : ((await lookup(op.collection, op.rkey)) ?? null)\n const prev = op.prev ? parseCid(op.prev) : null\n if (!cidEquals(prev, current)) {\n throw new RepoGapError(`Repo ${repo} diverged at ${path}`)\n }\n\n const cid = op.cid ? parseCid(op.cid) : null\n if (op.value && !(cid && (await cidForLex(op.value)).equals(cid))) {\n throw new SpaceRepoVerificationError(\n `Record ${path} failed verification`,\n )\n }\n\n repoCommit.applyOp({\n collection: op.collection,\n rkey: op.rkey,\n cid,\n prev,\n })\n changes.set(path, {\n collection: op.collection,\n rkey: op.rkey,\n cid,\n prev: change ? change.prev : prev,\n record: op.value,\n })\n }\n\n // Every page carries the repo's current commit. The last page's is checked\n // against the state once all the operations are applied.\n commit = body.commit\n cursor = body.cursor\n } while (cursor)\n\n if (!repoCommit.matches(commit)) {\n throw new RepoGapError(`Repo ${repo} diverged from its commit`)\n }\n\n // A value is only listed with the last operation on its record.\n for (const change of changes.values()) {\n if (change.cid && !change.record) {\n const { collection, rkey } = change\n const { body } = await this.getRecord(collection, rkey, {\n repo,\n signal,\n })\n if (!parseCid(body.cid).equals(change.cid)) {\n throw new RepoGapError(`Repo ${repo} changed while syncing`)\n }\n change.record = body.value\n }\n }\n\n return {\n commit,\n head: { rev: commit.rev, state: repoCommit.setHash.state() },\n // A record created then deleted since `head` did not change.\n changes: [...changes.values()].filter((c) => c.cid || c.prev),\n }\n }\n\n /**\n * Gets a repo in full, and the state needed to {@link syncRepo} it later.\n *\n * @throws {SpaceRepoVerificationError} if the repo fails verification\n */\n async getRepoSnapshot({\n repo,\n signal,\n }: {\n repo: DidString\n signal?: AbortSignal\n }): Promise<SpaceReader.RepoSnapshot> {\n const { commit, records } = await this.getRepo({ repo, signal })\n const collected: SpaceReader.RepoRecord[] = []\n for await (const record of records) collected.push(record)\n const state = RepoCommit.fromRecords(collected).setHash.state()\n return { commit, head: { rev: commit.rev, state }, records: collected }\n }\n\n /**\n * Brings a repo up to date: incrementally from its known state (`head` and\n * `lookup`), and in full when there is none (e.g. on the first pull), or\n * when the incremental sync fails. A repo its host does not have is pulled\n * as an empty repo.\n */\n async pullRepo({\n repo,\n head,\n lookup,\n signal,\n }: SpaceReader.PullRepoOptions): Promise<SpaceReader.RepoPull> {\n if (head) {\n try {\n const changes = await this.syncRepo({ repo, head, lookup, signal })\n return { type: 'changes', ...changes }\n } catch (err) {\n if (isRepoNotFound(err)) return { type: 'empty' }\n if (\n !(err instanceof RepoGapError) &&\n !(err instanceof SpaceRepoVerificationError)\n ) {\n throw err\n }\n }\n }\n\n let snapshot: SpaceReader.RepoSnapshot\n try {\n snapshot = await this.getRepoSnapshot({ repo, signal })\n } catch (err) {\n if (isRepoNotFound(err)) return { type: 'empty' }\n throw err\n }\n if (head && snapshot.commit.rev < head.rev) {\n throw new RepoGapError(`Repo ${repo} is older than its known state`)\n }\n return { type: 'snapshot', ...snapshot }\n }\n\n /**\n * Iterates over the records of every repo in the writer set of the space.\n * Each repo is fetched in full, and verified, before its records are\n * yielded. Repos removed from the writer set, and repos that are unavailable\n * (not found, taken down, suspended or deactivated), are skipped.\n *\n * Every record is yielded, flagged with whether its collection is declared\n * by the space type. With `collections`, only the records of these\n * collections are yielded, flagged with whether they match their schema.\n * These must be collections declared by the space type, unless\n * `validateRequest` is `false`.\n *\n * @example\n * ```typescript\n * for await (const record of space.allRecords()) {\n * if (record.valid) record.record // of a declared collection\n * }\n *\n * for await (const post of space.allRecords({ collections: [com.example.post] })) {\n * if (post.valid) post.record // com.example.post.Main\n * }\n * ```\n */\n allRecords(\n options?: SpaceReader.AllRecordsOptions,\n ): AsyncGenerator<SpaceReader.AllRecordsItem<S>, void, undefined>\n allRecords<const T extends RecordSchema>(\n options: SpaceReader.AllRecordsOptions & {\n collections: readonly SpaceCollectionSchema<S, T>[]\n validateRequest?: true\n },\n ): AsyncGenerator<SpaceReader.AllRecordsSchemaItem<T>, void, undefined>\n allRecords<const T extends RecordSchema>(\n options: SpaceReader.AllRecordsOptions & {\n collections: readonly Main<T>[]\n validateRequest: false\n },\n ): AsyncGenerator<SpaceReader.AllRecordsSchemaItem<T>, void, undefined>\n async *allRecords({\n collections,\n validateRequest,\n concurrency = 4,\n signal,\n }: SpaceReader.AllRecordsOptions & {\n collections?: readonly unknown[]\n validateRequest?: boolean\n } = {}): AsyncGenerator<\n | SpaceReader.AllRecordsItem<S>\n | SpaceReader.AllRecordsSchemaItem<RecordSchema>,\n void,\n undefined\n > {\n const schemas = (\n collections as readonly Main<RecordSchema>[] | undefined\n )?.map(getMain)\n if (schemas && validateRequest !== false) {\n for (const { $type } of schemas) this.assertCollection($type)\n }\n\n // A repo listed again was updated while listing: its last entry is current.\n const writers = new Map<DidString, SpaceReader.ListedWriter>()\n for await (const entry of this.writers({ signal })) {\n writers.set(entry.repo, entry)\n }\n\n const queue = [...writers.values()]\n .filter((entry) => repoWrite.$isTypeOf(entry))\n .map((entry) => entry.repo)\n while (queue.length) {\n const batch = queue.splice(0, concurrency)\n const snapshots = await Promise.all(\n batch.map((repo) =>\n this.getRepoSnapshot({ repo, signal }).catch((err) => {\n if (err instanceof XrpcResponseError) {\n switch (err.error) {\n // Errors meaning that a member's repo holds no readable data.\n case 'RepoNotFound':\n case 'RepoTakendown':\n case 'RepoSuspended':\n case 'RepoDeactivated':\n return undefined\n }\n }\n throw err\n }),\n ),\n )\n for (const [i, snapshot] of snapshots.entries()) {\n for (const record of snapshot?.records ?? []) {\n const item = { ...record, repo: batch[i] }\n if (!schemas) {\n yield this.isCollection(record.collection)\n ? ({ ...item, valid: true } as SpaceReader.AllRecordsItem<S>)\n : { ...item, valid: false }\n continue\n }\n const schema = schemas.find((s) => s.$type === record.collection)\n if (!schema) continue\n const result = schema.safeValidate(record.record)\n yield result.success\n ? { ...item, valid: true, record: result.value }\n : { ...item, valid: false }\n }\n }\n }\n }\n\n /** Whether `collection` is one of the collections declared by the space type. */\n protected isCollection(collection: NsidString): boolean {\n return (this.schema.collections as readonly NsidString[]).includes(\n collection,\n )\n }\n\n /**\n * @throws {TypeError} if `collection` is not one of the collections declared\n * by the space type\n */\n protected assertCollection(collection: NsidString): void {\n if (!this.isCollection(collection)) {\n throw new TypeError(\n `${collection} is not a collection of ${this.schema.nsid} spaces`,\n )\n }\n }\n\n /**\n * Gets a blob, verified against its CID.\n *\n * @throws {SpaceRepoVerificationError} if the blob fails verification\n */\n async getBlob({\n repo,\n cid: cidInput,\n ...options\n }: SpaceReader.GetBlobOptions): Promise<XrpcResponse<typeof getBlob>> {\n const cid = typeof cidInput === 'string' ? parseCid(cidInput) : cidInput\n if (!checkCid(cid, { flavor: 'raw' })) {\n throw new TypeError(`${cid} is not a raw CID`)\n }\n // @TODO Stream the blob, once lex-client can stream response bodies\n const response = await this.repoXrpc(repo, getBlob, {\n ...options,\n params: { space: this.uri, repo, cid: cid.toString() },\n })\n if (!(await isCidForBytes(cid, response.body))) {\n throw new SpaceRepoVerificationError(`Blob ${cid} failed verification`)\n }\n return response\n }\n\n /** Lists the CIDs of the blobs referenced by a repo's records. */\n async listBlobs({\n repo,\n cursor,\n limit,\n ...options\n }: SpaceReader.ListBlobsOptions): Promise<XrpcResponse<typeof listBlobs>> {\n return this.repoXrpc(repo, listBlobs, {\n ...options,\n params: { space: this.uri, repo, cursor, limit },\n })\n }\n\n /**\n * Makes a request to the space host (the authority's PDS), with the space\n * credential presented to the space authority.\n */\n protected async authorityXrpc<const M extends Query | Procedure>(\n ns: Main<M>,\n options: XrpcOptions<M>,\n ): Promise<XrpcResponse<M>> {\n return this.credentialXrpc(this.ref.spaceDid, ns, options)\n }\n\n /**\n * Makes a request to the host (PDS) of a repo in the space, with the space\n * credential presented to the repo's account.\n */\n protected async repoXrpc<const M extends Query | Procedure>(\n repo: DidString,\n ns: Main<M>,\n options: XrpcOptions<M>,\n ): Promise<XrpcResponse<M>> {\n return this.credentialXrpc(repo, ns, options)\n }\n\n /**\n * Makes a request with the space credential, presented to `audience` (whose\n * PDS receives the request).\n */\n protected async credentialXrpc<const M extends Query | Procedure>(\n audience: DidString,\n ns: Main<M>,\n options: XrpcOptions<M>,\n ): Promise<XrpcResponse<M>> {\n const agent = await this.buildCredentialXrpcAgent(audience, options)\n try {\n return await xrpc(agent, ns, options)\n } catch (err) {\n if (\n !('renew' in options && options.renew) &&\n !options.signal?.aborted &&\n err instanceof XrpcAuthenticationError\n ) {\n // Retry with a new credential\n const agent = await this.buildCredentialXrpcAgent(audience, {\n signal: options.signal,\n renew: true,\n })\n return xrpc(agent, ns, options)\n }\n\n throw err\n }\n }\n\n protected async buildCredentialXrpcAgent(\n audience: DidString,\n { signal, renew }: SpaceCredentialProviderOptions = {},\n ): Promise<Agent> {\n // Did resolution first, to avoid unnecessary credential requests if the\n // audience's PDS cannot be resolved.\n const service = await this.#resolver\n .resolve(audience, { signal, noCache: renew })\n .then(extractPdsUrl)\n\n signal?.throwIfAborted?.()\n\n const credential = await this.authorize({ signal, renew })\n\n signal?.throwIfAborted?.()\n\n const headers = await credential.headers(audience)\n\n return buildAgent({ service, headers, fetch: this.#fetch })\n }\n\n /**\n * Obtains the space credential (or a new one, with `renew`). The credential\n * is otherwise obtained on first use: call this to check, early, that the\n * space grants access.\n *\n * @throws {XrpcResponseError} if the credential cannot be obtained, e.g.\n * `SpaceNotFound` (not granted access), `AppNotAuthorized` or `SpaceDeleted`\n */\n async authorize(\n options?: SpaceCredentialProviderOptions,\n ): Promise<SpaceCredential> {\n return this.#credentialProvider.getCredential(this.ref, options)\n }\n\n /**\n * Makes a request to a member's PDS asking for a MAC (with `Accept-Signature`),\n * using a new key share (derived from the member's `#atproto_kem` key) for\n * every attempt, retries included. Returns what the response's MAC is\n * verified with.\n */\n async #withMac<const M extends Query>(\n repo: DidString,\n ns: Main<M>,\n profile: MacProfile,\n options: XrpcOptions<M>,\n refreshKemKey: boolean,\n ): Promise<{ response: XrpcResponse<M>; mac: VerifyMacParams }> {\n const kemKey = await this.#resolveKemKey(\n repo,\n options.signal,\n refreshKemKey,\n )\n\n const { headers: headersInit } = options\n let encapsulation!: Encapsulation\n const response = await this.repoXrpc(repo, ns, {\n ...options,\n // The encapsulated key can only be used once, even on retries, so we\n // generate a new one for each request.\n headers: async () => {\n options.signal?.throwIfAborted?.()\n const headers = new Headers(\n typeof headersInit === 'function' ? await headersInit() : headersInit,\n )\n options.signal?.throwIfAborted?.()\n encapsulation = await encapsulate(kemKey)\n options.signal?.throwIfAborted?.()\n headers.set(\n 'accept-signature',\n formatMacRequest(profile, encapsulation.keyShare),\n )\n return headers\n },\n } as XrpcOptions<M>)\n\n // A missing MAC fails verification, like an invalid one.\n return { response, mac: { ...encapsulation, headers: response.headers } }\n }\n\n /**\n * Resolves the `#atproto_kem` key of a repo's account. A DID document without\n * one is resolved again, as the key may have been added since it was cached.\n */\n async #resolveKemKey(\n repo: DidString,\n signal: AbortSignal | undefined,\n noCache: boolean,\n ): Promise<DidString> {\n const didDocument = await this.#resolver.resolve(repo, { signal, noCache })\n try {\n return formatDidVerificationMethod(extractKemKey(didDocument))\n } catch (err) {\n if (noCache) throw err\n return this.#resolveKemKey(repo, signal, true)\n }\n }\n\n /**\n * Retries a verification once, with the author's KEM key re-resolved, as it\n * may have been rotated since it was cached.\n *\n * @throws {SpaceRepoVerificationError} if both attempts fail verification\n */\n async #verified<T>(\n message: string,\n attempt: (refreshKemKey: boolean) => Promise<T>,\n ): Promise<T> {\n try {\n return await attempt(false)\n } catch (err) {\n if (!isVerificationError(err)) throw err\n }\n try {\n return await attempt(true)\n } catch (err) {\n if (!isVerificationError(err)) throw err\n throw new SpaceRepoVerificationError(message, { cause: err })\n }\n }\n}\n\nfunction isRepoNotFound(err: unknown): boolean {\n return err instanceof XrpcResponseError && err.error === 'RepoNotFound'\n}\n\nfunction isVerificationError(err: unknown): boolean {\n return (\n err instanceof SpaceMacError || err instanceof SpaceRepoVerificationError\n )\n}\n\nfunction cidEquals(a: Cid | null, b: Cid | null): boolean {\n return a === null || b === null ? a === b : a.equals(b)\n}\n"]}
@@ -0,0 +1,22 @@
1
+ import { type WriteOperationCreateOptions, type WriteOperationDeleteOptions, type WriteOperationUpdateOptions } from '@atproto/lex-client';
2
+ import { type $Typed, type InferInput, type Main, type RecordSchema, type Restricted } from '@atproto/lex-schema';
3
+ import { com } from './lexicons/index.js';
4
+ export declare namespace SpaceWriteOperationHelper {
5
+ type Operation = $Typed<com.atproto.space.applyWrites.Create> | $Typed<com.atproto.space.applyWrites.Update> | $Typed<com.atproto.space.applyWrites.Delete>;
6
+ type Factory = (helper: SpaceWriteOperationHelper) => Iterable<Operation>;
7
+ }
8
+ /**
9
+ * Builds the operations of a {@link SpaceClient.applyWrites} batch. Same as
10
+ * `WriteOperationHelper` from `@atproto/lex-client`, for space repos.
11
+ */
12
+ export declare class SpaceWriteOperationHelper {
13
+ private constructor();
14
+ create<const T extends RecordSchema>(ns: NonNullable<unknown> extends WriteOperationCreateOptions<T> ? Main<T> : Restricted<'This record type requires an "options" argument'>, input: Omit<InferInput<T>, '$type'>): $Typed<com.atproto.space.applyWrites.Create>;
15
+ create<const T extends RecordSchema>(ns: Main<T>, input: Omit<InferInput<T>, '$type'>, options: WriteOperationCreateOptions<T>): $Typed<com.atproto.space.applyWrites.Create>;
16
+ update<const T extends RecordSchema>(ns: NonNullable<unknown> extends WriteOperationUpdateOptions<T> ? Main<T> : Restricted<'This record type requires an "options" argument'>, input: Omit<InferInput<T>, '$type'>): $Typed<com.atproto.space.applyWrites.Update>;
17
+ update<const T extends RecordSchema>(ns: Main<T>, input: Omit<InferInput<T>, '$type'>, options: WriteOperationUpdateOptions<T>): $Typed<com.atproto.space.applyWrites.Update>;
18
+ delete<const T extends RecordSchema>(ns: NonNullable<unknown> extends WriteOperationDeleteOptions<T> ? Main<T> : Restricted<'This record type requires an "options" argument'>): $Typed<com.atproto.space.applyWrites.Delete>;
19
+ delete<const T extends RecordSchema>(ns: Main<T>, options: WriteOperationDeleteOptions<T>): $Typed<com.atproto.space.applyWrites.Delete>;
20
+ static build(factory: SpaceWriteOperationHelper.Factory): SpaceWriteOperationHelper.Operation[];
21
+ }
22
+ //# sourceMappingURL=write-operation-builder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"write-operation-builder.d.ts","sourceRoot":"","sources":["../src/write-operation-builder.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,2BAA2B,EAChC,KAAK,2BAA2B,EAChC,KAAK,2BAA2B,EAGjC,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EACL,KAAK,MAAM,EACX,KAAK,UAAU,EACf,KAAK,IAAI,EACT,KAAK,YAAY,EACjB,KAAK,UAAU,EAEhB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAA;AAEzC,MAAM,CAAC,OAAO,WAAW,yBAAyB,CAAC;IACjD,KAAY,SAAS,GACjB,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC,GAC5C,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC,GAC5C,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC,CAAA;IAEhD,KAAY,OAAO,GAAG,CACpB,MAAM,EAAE,yBAAyB,KAC9B,QAAQ,CAAC,SAAS,CAAC,CAAA;CACzB;AAED;;;GAGG;AACH,qBAAa,yBAAyB;IACpC,OAAO,eAAiB;IAExB,MAAM,CAAC,KAAK,CAAC,CAAC,SAAS,YAAY,EACjC,EAAE,EAAE,WAAW,CAAC,OAAO,CAAC,SAAS,2BAA2B,CAAC,CAAC,CAAC,GAC3D,IAAI,CAAC,CAAC,CAAC,GACP,UAAU,CAAC,iDAAiD,CAAC,EACjE,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,GAClC,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,MA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AAK,CAAC,CAAC,SAAS,YAAY,EACjC,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC,EACX,OAAO,EAAE,2BAA2B,CAAC,CAAC,CAAC,GACtC,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC,CAAA;IAY/C,MAAM,CAAC,KAAK,CACV,OAAO,EAAE,yBAAyB,CAAC,OAAO,GACzC,yBAAyB,CAAC,SAAS,EAAE,CAEvC;CACF"}
@@ -0,0 +1,37 @@
1
+ import { rkeyFor, rkeyForCreate, } from '@atproto/lex-client';
2
+ import { getMain, } from '@atproto/lex-schema';
3
+ import { com } from './lexicons/index.js';
4
+ /**
5
+ * Builds the operations of a {@link SpaceClient.applyWrites} batch. Same as
6
+ * `WriteOperationHelper` from `@atproto/lex-client`, for space repos.
7
+ */
8
+ export class SpaceWriteOperationHelper {
9
+ constructor() { }
10
+ create(ns, input, options = {}) {
11
+ const schema = getMain(ns);
12
+ return com.atproto.space.applyWrites.create.$build({
13
+ collection: schema.$type,
14
+ value: schema.build(input),
15
+ rkey: rkeyForCreate(schema, options?.rkey),
16
+ });
17
+ }
18
+ update(ns, input, options = {}) {
19
+ const schema = getMain(ns);
20
+ return com.atproto.space.applyWrites.update.$build({
21
+ collection: schema.$type,
22
+ value: schema.build(input),
23
+ rkey: rkeyFor(schema, options?.rkey),
24
+ });
25
+ }
26
+ delete(ns, options = {}) {
27
+ const schema = getMain(ns);
28
+ return com.atproto.space.applyWrites.delete.$build({
29
+ collection: schema.$type,
30
+ rkey: rkeyFor(schema, options?.rkey),
31
+ });
32
+ }
33
+ static build(factory) {
34
+ return Array.from(factory(new SpaceWriteOperationHelper()));
35
+ }
36
+ }
37
+ //# sourceMappingURL=write-operation-builder.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"write-operation-builder.js","sourceRoot":"","sources":["../src/write-operation-builder.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,OAAO,EACP,aAAa,GACd,M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,OAAO,EAAE,IAAI,CAAC;SACrC,CAAC,CAAA;IACJ,CAAC;IAED,MAAM,CAAC,KAAK,CACV,OAA0C;QAE1C,OAAO,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,yBAAyB,EAAE,CAAC,CAAC,CAAA;IAC7D,CAAC;CACF","sourcesContent":["import {\n type WriteOperationCreateOptions,\n type WriteOperationDeleteOptions,\n type WriteOperationUpdateOptions,\n rkeyFor,\n rkeyForCreate,\n} from '@atproto/lex-client'\nimport {\n type $Typed,\n type InferInput,\n type Main,\n type RecordSchema,\n type Restricted,\n getMain,\n} from '@atproto/lex-schema'\nimport { com } from './lexicons/index.js'\n\nexport declare namespace SpaceWriteOperationHelper {\n export type Operation =\n | $Typed<com.atproto.space.applyWrites.Create>\n | $Typed<com.atproto.space.applyWrites.Update>\n | $Typed<com.atproto.space.applyWrites.Delete>\n\n export type Factory = (\n helper: SpaceWriteOperationHelper,\n ) => Iterable<Operation>\n}\n\n/**\n * Builds the operations of a {@link SpaceClient.applyWrites} batch. Same as\n * `WriteOperationHelper` from `@atproto/lex-client`, for space repos.\n */\nexport class SpaceWriteOperationHelper {\n private constructor() {}\n\n create<const T extends RecordSchema>(\n ns: NonNullable<unknown> extends WriteOperationCreateOptions<T>\n ? Main<T>\n : Restricted<'This record type requires an \"options\" argument'>,\n input: Omit<InferInput<T>, '$type'>,\n ): $Typed<com.atproto.space.applyWrites.Create>\n create<const T extends RecordSchema>(\n ns: Main<T>,\n input: Omit<InferInput<T>, '$type'>,\n options: WriteOperationCreateOptions<T>,\n ): $Typed<com.atproto.space.applyWrites.Create>\n create<const T extends RecordSchema>(\n ns: Main<T>,\n input: Omit<InferInput<T>, '$type'>,\n options: WriteOperationCreateOptions<T> = {} as WriteOperationCreateOptions<T>,\n ): $Typed<com.atproto.space.applyWrites.Create> {\n const schema: T = getMain(ns)\n return com.atproto.space.applyWrites.create.$build({\n collection: schema.$type,\n value: schema.build(input),\n rkey: rkeyForCreate(schema, options?.rkey),\n })\n }\n\n update<const T extends RecordSchema>(\n ns: NonNullable<unknown> extends WriteOperationUpdateOptions<T>\n ? Main<T>\n : Restricted<'This record type requires an \"options\" argument'>,\n input: Omit<InferInput<T>, '$type'>,\n ): $Typed<com.atproto.space.applyWrites.Update>\n update<const T extends RecordSchema>(\n ns: Main<T>,\n input: Omit<InferInput<T>, '$type'>,\n options: WriteOperationUpdateOptions<T>,\n ): $Typed<com.atproto.space.applyWrites.Update>\n update<const T extends RecordSchema>(\n ns: Main<T>,\n input: Omit<InferInput<T>, '$type'>,\n options: WriteOperationUpdateOptions<T> = {} as WriteOperationUpdateOptions<T>,\n ): $Typed<com.atproto.space.applyWrites.Update> {\n const schema: T = getMain(ns)\n return com.atproto.space.applyWrites.update.$build({\n collection: schema.$type,\n value: schema.build(input),\n rkey: rkeyFor(schema, options?.rkey),\n })\n }\n\n delete<const T extends RecordSchema>(\n ns: NonNullable<unknown> extends WriteOperationDeleteOptions<T>\n ? Main<T>\n : Restricted<'This record type requires an \"options\" argument'>,\n ): $Typed<com.atproto.space.applyWrites.Delete>\n delete<const T extends RecordSchema>(\n ns: Main<T>,\n options: WriteOperationDeleteOptions<T>,\n ): $Typed<com.atproto.space.applyWrites.Delete>\n delete<const T extends RecordSchema>(\n ns: Main<T>,\n options: WriteOperationDeleteOptions<T> = {} as WriteOperationDeleteOptions<T>,\n ): $Typed<com.atproto.space.applyWrites.Delete> {\n const schema: T = getMain(ns)\n return com.atproto.space.applyWrites.delete.$build({\n collection: schema.$type,\n rkey: rkeyFor(schema, options?.rkey),\n })\n }\n\n static build(\n factory: SpaceWriteOperationHelper.Factory,\n ): SpaceWriteOperationHelper.Operation[] {\n return Array.from(factory(new SpaceWriteOperationHelper()))\n }\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,67 @@
1
1
  {
2
2
  "name": "@atproto/lex-space",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.0.1",
4
+ "license": "MIT",
5
+ "description": "Permissioned spaces client for AT Lexicons",
6
+ "keywords": [
7
+ "atproto",
8
+ "lexicon",
9
+ "space",
10
+ "permissioned"
11
+ ],
12
+ "homepage": "https://atproto.com",
13
+ "repository": {
14
+ "type": "git",
15
+ "url": "https://github.com/bluesky-social/atproto",
16
+ "directory": "packages/lex/lex-space"
17
+ },
18
+ "files": [
19
+ "./dist",
20
+ "./CHANGELOG.md"
21
+ ],
22
+ "sideEffects": false,
23
+ "type": "module",
24
+ "exports": {
25
+ ".": {
26
+ "types": "./dist/index.d.ts",
27
+ "default": "./dist/index.js"
28
+ }
29
+ },
30
+ "engines": {
31
+ "node": ">=22"
32
+ },
33
+ "dependencies": {
34
+ "@atproto-labs/did-resolver": "^0.3.13",
35
+ "@atproto-labs/simple-store": "^0.5.1",
36
+ "@atproto-labs/simple-store-memory": "^0.2.6",
37
+ "@atproto/crypto": "^0.5.7",
38
+ "@atproto/did": "^0.5.6",
39
+ "@atproto/lex-cbor": "^0.1.10",
40
+ "@atproto/lex-client": "^0.4.2",
41
+ "@atproto/lex-data": "^0.1.10",
42
+ "@atproto/lex-schema": "^0.2.11",
43
+ "@atproto/space": "^0.0.1",
44
+ "@atproto/syntax": "^0.7.7",
45
+ "tslib": "^2.8.1"
46
+ },
47
+ "devDependencies": {
48
+ "@atproto/dev-env": "^0.7.8",
49
+ "@atproto/jwk": "^0.7.4",
50
+ "@atproto/jwk-jose": "^0.2.4",
51
+ "@atproto/oauth-client": "^0.9.3",
52
+ "@atproto/lex-builder": "^0.1.20",
53
+ "@atproto/lex-installer": "^0.2.8",
54
+ "vitest": "^4.1.10"
55
+ },
56
+ "scripts": {
57
+ "lex:build": "lex-builder build --out ./src/lexicons --clear --lib @atproto/lex-schema --index-file --default-export",
58
+ "lex:install": "lex-installer install",
59
+ "postlex:install": "pnpm run lex:build",
60
+ "lex:update": "lex-installer update",
61
+ "postlex:update": "pnpm run lex:build",
62
+ "codegen:lex": "pnpm run lex:install --ci",
63
+ "prebuild": "pnpm run '/^(codegen:.+)$/'",
64
+ "build": "tsc --build tsconfig.build.json",
65
+ "test": "vitest run"
66
+ }
6
67
  }