@pyric/cli 0.1.0-alpha.10

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 (903) hide show
  1. package/LICENSE +216 -0
  2. package/README.md +180 -0
  3. package/README.md.orig +141 -0
  4. package/dist/assurance/.generated/conformance-verdicts.d.ts +1071 -0
  5. package/dist/assurance/.generated/conformance-verdicts.d.ts.map +1 -0
  6. package/dist/assurance/.generated/conformance-verdicts.js +1070 -0
  7. package/dist/assurance/.generated/conformance-verdicts.js.map +1 -0
  8. package/dist/assurance/attachment.d.ts +24 -0
  9. package/dist/assurance/attachment.d.ts.map +1 -0
  10. package/dist/assurance/attachment.js +138 -0
  11. package/dist/assurance/attachment.js.map +1 -0
  12. package/dist/assurance/browser.d.ts +7 -0
  13. package/dist/assurance/browser.d.ts.map +1 -0
  14. package/dist/assurance/browser.js +68 -0
  15. package/dist/assurance/browser.js.map +1 -0
  16. package/dist/assurance/campaign.d.ts +41 -0
  17. package/dist/assurance/campaign.d.ts.map +1 -0
  18. package/dist/assurance/campaign.js +364 -0
  19. package/dist/assurance/campaign.js.map +1 -0
  20. package/dist/assurance/capabilities.d.ts +11 -0
  21. package/dist/assurance/capabilities.d.ts.map +1 -0
  22. package/dist/assurance/capabilities.js +282 -0
  23. package/dist/assurance/capabilities.js.map +1 -0
  24. package/dist/assurance/cases.d.ts +14 -0
  25. package/dist/assurance/cases.d.ts.map +1 -0
  26. package/dist/assurance/cases.js +27 -0
  27. package/dist/assurance/cases.js.map +1 -0
  28. package/dist/assurance/index.d.ts +10 -0
  29. package/dist/assurance/index.d.ts.map +1 -0
  30. package/dist/assurance/index.js +9 -0
  31. package/dist/assurance/index.js.map +1 -0
  32. package/dist/assurance/runner.d.ts +3 -0
  33. package/dist/assurance/runner.d.ts.map +1 -0
  34. package/dist/assurance/runner.js +633 -0
  35. package/dist/assurance/runner.js.map +1 -0
  36. package/dist/assurance/tool-names.d.ts +4 -0
  37. package/dist/assurance/tool-names.d.ts.map +1 -0
  38. package/dist/assurance/tool-names.js +14 -0
  39. package/dist/assurance/tool-names.js.map +1 -0
  40. package/dist/assurance/tools.d.ts +19 -0
  41. package/dist/assurance/tools.d.ts.map +1 -0
  42. package/dist/assurance/tools.js +737 -0
  43. package/dist/assurance/tools.js.map +1 -0
  44. package/dist/assurance/types.d.ts +347 -0
  45. package/dist/assurance/types.d.ts.map +1 -0
  46. package/dist/assurance/types.js +7 -0
  47. package/dist/assurance/types.js.map +1 -0
  48. package/dist/assurance/validation.d.ts +8 -0
  49. package/dist/assurance/validation.d.ts.map +1 -0
  50. package/dist/assurance/validation.js +269 -0
  51. package/dist/assurance/validation.js.map +1 -0
  52. package/dist/bridge/client/bridge.d.ts +133 -0
  53. package/dist/bridge/client/bridge.d.ts.map +1 -0
  54. package/dist/bridge/client/bridge.js +429 -0
  55. package/dist/bridge/client/bridge.js.map +1 -0
  56. package/dist/bridge/client/dispatch.d.ts +41 -0
  57. package/dist/bridge/client/dispatch.d.ts.map +1 -0
  58. package/dist/bridge/client/dispatch.js +111 -0
  59. package/dist/bridge/client/dispatch.js.map +1 -0
  60. package/dist/bridge/client.d.ts +24 -0
  61. package/dist/bridge/client.d.ts.map +1 -0
  62. package/dist/bridge/client.js +26 -0
  63. package/dist/bridge/client.js.map +1 -0
  64. package/dist/bridge/protocol.d.ts +227 -0
  65. package/dist/bridge/protocol.d.ts.map +1 -0
  66. package/dist/bridge/protocol.js +131 -0
  67. package/dist/bridge/protocol.js.map +1 -0
  68. package/dist/bridge/server/audit.d.ts +19 -0
  69. package/dist/bridge/server/audit.d.ts.map +1 -0
  70. package/dist/bridge/server/audit.js +46 -0
  71. package/dist/bridge/server/audit.js.map +1 -0
  72. package/dist/bridge/server/bridge.d.ts +126 -0
  73. package/dist/bridge/server/bridge.d.ts.map +1 -0
  74. package/dist/bridge/server/bridge.js +383 -0
  75. package/dist/bridge/server/bridge.js.map +1 -0
  76. package/dist/bridge/server/headless.d.ts +36 -0
  77. package/dist/bridge/server/headless.d.ts.map +1 -0
  78. package/dist/bridge/server/headless.js +142 -0
  79. package/dist/bridge/server/headless.js.map +1 -0
  80. package/dist/bridge/server/json-schema-to-zod.d.ts +37 -0
  81. package/dist/bridge/server/json-schema-to-zod.d.ts.map +1 -0
  82. package/dist/bridge/server/json-schema-to-zod.js +93 -0
  83. package/dist/bridge/server/json-schema-to-zod.js.map +1 -0
  84. package/dist/bridge/server/local-bridge.d.ts +33 -0
  85. package/dist/bridge/server/local-bridge.d.ts.map +1 -0
  86. package/dist/bridge/server/local-bridge.js +41 -0
  87. package/dist/bridge/server/local-bridge.js.map +1 -0
  88. package/dist/bridge/server/logger.d.ts +28 -0
  89. package/dist/bridge/server/logger.d.ts.map +1 -0
  90. package/dist/bridge/server/logger.js +42 -0
  91. package/dist/bridge/server/logger.js.map +1 -0
  92. package/dist/bridge/server/mcp-contract.d.ts +21 -0
  93. package/dist/bridge/server/mcp-contract.d.ts.map +1 -0
  94. package/dist/bridge/server/mcp-contract.js +63 -0
  95. package/dist/bridge/server/mcp-contract.js.map +1 -0
  96. package/dist/bridge/server/mcp.d.ts +26 -0
  97. package/dist/bridge/server/mcp.d.ts.map +1 -0
  98. package/dist/bridge/server/mcp.js +102 -0
  99. package/dist/bridge/server/mcp.js.map +1 -0
  100. package/dist/bridge/server/peer.d.ts +39 -0
  101. package/dist/bridge/server/peer.d.ts.map +1 -0
  102. package/dist/bridge/server/peer.js +189 -0
  103. package/dist/bridge/server/peer.js.map +1 -0
  104. package/dist/bridge/server/standalone.d.ts +49 -0
  105. package/dist/bridge/server/standalone.d.ts.map +1 -0
  106. package/dist/bridge/server/standalone.js +267 -0
  107. package/dist/bridge/server/standalone.js.map +1 -0
  108. package/dist/bridge/server/tool-metadata.d.ts +38 -0
  109. package/dist/bridge/server/tool-metadata.d.ts.map +1 -0
  110. package/dist/bridge/server/tool-metadata.js +84 -0
  111. package/dist/bridge/server/tool-metadata.js.map +1 -0
  112. package/dist/bridge/server.d.ts +21 -0
  113. package/dist/bridge/server.d.ts.map +1 -0
  114. package/dist/bridge/server.js +18 -0
  115. package/dist/bridge/server.js.map +1 -0
  116. package/dist/cli/can-i-use.d.ts +5 -0
  117. package/dist/cli/can-i-use.d.ts.map +1 -0
  118. package/dist/cli/can-i-use.js +49 -0
  119. package/dist/cli/can-i-use.js.map +1 -0
  120. package/dist/cli/database-rules.d.ts +43 -0
  121. package/dist/cli/database-rules.d.ts.map +1 -0
  122. package/dist/cli/database-rules.js +261 -0
  123. package/dist/cli/database-rules.js.map +1 -0
  124. package/dist/cli/dev-runner.d.ts +112 -0
  125. package/dist/cli/dev-runner.d.ts.map +1 -0
  126. package/dist/cli/dev-runner.js +239 -0
  127. package/dist/cli/dev-runner.js.map +1 -0
  128. package/dist/cli/firebase-json.d.ts +66 -0
  129. package/dist/cli/firebase-json.d.ts.map +1 -0
  130. package/dist/cli/firebase-json.js +60 -0
  131. package/dist/cli/firebase-json.js.map +1 -0
  132. package/dist/cli/firestore-indexes.d.ts +21 -0
  133. package/dist/cli/firestore-indexes.d.ts.map +1 -0
  134. package/dist/cli/firestore-indexes.js +39 -0
  135. package/dist/cli/firestore-indexes.js.map +1 -0
  136. package/dist/cli/index.d.ts +56 -0
  137. package/dist/cli/index.d.ts.map +1 -0
  138. package/dist/cli/index.js +387 -0
  139. package/dist/cli/index.js.map +1 -0
  140. package/dist/cli/init.d.ts +50 -0
  141. package/dist/cli/init.d.ts.map +1 -0
  142. package/dist/cli/init.js +182 -0
  143. package/dist/cli/init.js.map +1 -0
  144. package/dist/cli/mcp-proxy.d.ts +10 -0
  145. package/dist/cli/mcp-proxy.d.ts.map +1 -0
  146. package/dist/cli/mcp-proxy.js +129 -0
  147. package/dist/cli/mcp-proxy.js.map +1 -0
  148. package/dist/cli/parse-args.d.ts +20 -0
  149. package/dist/cli/parse-args.d.ts.map +1 -0
  150. package/dist/cli/parse-args.js +74 -0
  151. package/dist/cli/parse-args.js.map +1 -0
  152. package/dist/cli/rules.d.ts +55 -0
  153. package/dist/cli/rules.d.ts.map +1 -0
  154. package/dist/cli/rules.js +199 -0
  155. package/dist/cli/rules.js.map +1 -0
  156. package/dist/cli/scope.d.ts +12 -0
  157. package/dist/cli/scope.d.ts.map +1 -0
  158. package/dist/cli/scope.js +44 -0
  159. package/dist/cli/scope.js.map +1 -0
  160. package/dist/cli/serve.d.ts +122 -0
  161. package/dist/cli/serve.d.ts.map +1 -0
  162. package/dist/cli/serve.js +844 -0
  163. package/dist/cli/serve.js.map +1 -0
  164. package/dist/cli/service-commands.d.ts +8 -0
  165. package/dist/cli/service-commands.d.ts.map +1 -0
  166. package/dist/cli/service-commands.js +58 -0
  167. package/dist/cli/service-commands.js.map +1 -0
  168. package/dist/cli/snapshot.d.ts +22 -0
  169. package/dist/cli/snapshot.d.ts.map +1 -0
  170. package/dist/cli/snapshot.js +139 -0
  171. package/dist/cli/snapshot.js.map +1 -0
  172. package/dist/cli/storage-rules.d.ts +21 -0
  173. package/dist/cli/storage-rules.d.ts.map +1 -0
  174. package/dist/cli/storage-rules.js +121 -0
  175. package/dist/cli/storage-rules.js.map +1 -0
  176. package/dist/cli/verify.d.ts +23 -0
  177. package/dist/cli/verify.d.ts.map +1 -0
  178. package/dist/cli/verify.js +349 -0
  179. package/dist/cli/verify.js.map +1 -0
  180. package/dist/conformance/.generated/can-i-use-browser.d.ts +44 -0
  181. package/dist/conformance/.generated/can-i-use-browser.d.ts.map +1 -0
  182. package/dist/conformance/.generated/can-i-use-browser.js +67 -0
  183. package/dist/conformance/.generated/can-i-use-browser.js.map +1 -0
  184. package/dist/conformance/.generated/can-i-use.d.ts +61 -0
  185. package/dist/conformance/.generated/can-i-use.d.ts.map +1 -0
  186. package/dist/conformance/.generated/can-i-use.js +68 -0
  187. package/dist/conformance/.generated/can-i-use.js.map +1 -0
  188. package/dist/conformance/browser.d.ts +7 -0
  189. package/dist/conformance/browser.d.ts.map +1 -0
  190. package/dist/conformance/browser.js +8 -0
  191. package/dist/conformance/browser.js.map +1 -0
  192. package/dist/conformance/can-i-use-tool.d.ts +21 -0
  193. package/dist/conformance/can-i-use-tool.d.ts.map +1 -0
  194. package/dist/conformance/can-i-use-tool.js +40 -0
  195. package/dist/conformance/can-i-use-tool.js.map +1 -0
  196. package/dist/conformance/can-i-use.d.ts +6 -0
  197. package/dist/conformance/can-i-use.d.ts.map +1 -0
  198. package/dist/conformance/can-i-use.js +10 -0
  199. package/dist/conformance/can-i-use.js.map +1 -0
  200. package/dist/conformance/index.d.ts +8 -0
  201. package/dist/conformance/index.d.ts.map +1 -0
  202. package/dist/conformance/index.js +2 -0
  203. package/dist/conformance/index.js.map +1 -0
  204. package/dist/conformance/tools.d.ts +4 -0
  205. package/dist/conformance/tools.d.ts.map +1 -0
  206. package/dist/conformance/tools.js +14 -0
  207. package/dist/conformance/tools.js.map +1 -0
  208. package/dist/credentials/core/memoize-ttl.d.ts +58 -0
  209. package/dist/credentials/core/memoize-ttl.d.ts.map +1 -0
  210. package/dist/credentials/core/memoize-ttl.js +88 -0
  211. package/dist/credentials/core/memoize-ttl.js.map +1 -0
  212. package/dist/credentials/core/types.d.ts +11 -0
  213. package/dist/credentials/core/types.d.ts.map +1 -0
  214. package/dist/credentials/core/types.js +2 -0
  215. package/dist/credentials/core/types.js.map +1 -0
  216. package/dist/credentials/node/from-adc.d.ts +10 -0
  217. package/dist/credentials/node/from-adc.d.ts.map +1 -0
  218. package/dist/credentials/node/from-adc.js +76 -0
  219. package/dist/credentials/node/from-adc.js.map +1 -0
  220. package/dist/credentials/node/from-service-account.d.ts +24 -0
  221. package/dist/credentials/node/from-service-account.d.ts.map +1 -0
  222. package/dist/credentials/node/from-service-account.js +108 -0
  223. package/dist/credentials/node/from-service-account.js.map +1 -0
  224. package/dist/credentials/node/index.d.ts +7 -0
  225. package/dist/credentials/node/index.d.ts.map +1 -0
  226. package/dist/credentials/node/index.js +7 -0
  227. package/dist/credentials/node/index.js.map +1 -0
  228. package/dist/discover/concurrency.d.ts +42 -0
  229. package/dist/discover/concurrency.d.ts.map +1 -0
  230. package/dist/discover/concurrency.js +113 -0
  231. package/dist/discover/concurrency.js.map +1 -0
  232. package/dist/discover/crawler-adapter.d.ts +48 -0
  233. package/dist/discover/crawler-adapter.d.ts.map +1 -0
  234. package/dist/discover/crawler-adapter.js +92 -0
  235. package/dist/discover/crawler-adapter.js.map +1 -0
  236. package/dist/discover/crawler.d.ts +294 -0
  237. package/dist/discover/crawler.d.ts.map +1 -0
  238. package/dist/discover/crawler.js +764 -0
  239. package/dist/discover/crawler.js.map +1 -0
  240. package/dist/discover/credential-free.d.ts +19 -0
  241. package/dist/discover/credential-free.d.ts.map +1 -0
  242. package/dist/discover/credential-free.js +18 -0
  243. package/dist/discover/credential-free.js.map +1 -0
  244. package/dist/discover/findCollectionGroup.d.ts +44 -0
  245. package/dist/discover/findCollectionGroup.d.ts.map +1 -0
  246. package/dist/discover/findCollectionGroup.js +81 -0
  247. package/dist/discover/findCollectionGroup.js.map +1 -0
  248. package/dist/discover/firestore-source.d.ts +60 -0
  249. package/dist/discover/firestore-source.d.ts.map +1 -0
  250. package/dist/discover/firestore-source.js +11 -0
  251. package/dist/discover/firestore-source.js.map +1 -0
  252. package/dist/discover/index.d.ts +3 -0
  253. package/dist/discover/index.d.ts.map +1 -0
  254. package/dist/discover/index.js +5 -0
  255. package/dist/discover/index.js.map +1 -0
  256. package/dist/discover/merge.d.ts +108 -0
  257. package/dist/discover/merge.d.ts.map +1 -0
  258. package/dist/discover/merge.js +394 -0
  259. package/dist/discover/merge.js.map +1 -0
  260. package/dist/discover/session.d.ts +116 -0
  261. package/dist/discover/session.d.ts.map +1 -0
  262. package/dist/discover/session.js +331 -0
  263. package/dist/discover/session.js.map +1 -0
  264. package/dist/discover/tools.d.ts +58 -0
  265. package/dist/discover/tools.d.ts.map +1 -0
  266. package/dist/discover/tools.js +115 -0
  267. package/dist/discover/tools.js.map +1 -0
  268. package/dist/discover/types.d.ts +190 -0
  269. package/dist/discover/types.d.ts.map +1 -0
  270. package/dist/discover/types.js +12 -0
  271. package/dist/discover/types.js.map +1 -0
  272. package/dist/discover/wire.d.ts +70 -0
  273. package/dist/discover/wire.d.ts.map +1 -0
  274. package/dist/discover/wire.js +309 -0
  275. package/dist/discover/wire.js.map +1 -0
  276. package/dist/functions-rtdb/child.d.ts +52 -0
  277. package/dist/functions-rtdb/child.d.ts.map +1 -0
  278. package/dist/functions-rtdb/child.js +283 -0
  279. package/dist/functions-rtdb/child.js.map +1 -0
  280. package/dist/functions-rtdb/delivery.d.ts +4 -0
  281. package/dist/functions-rtdb/delivery.d.ts.map +1 -0
  282. package/dist/functions-rtdb/delivery.js +2 -0
  283. package/dist/functions-rtdb/delivery.js.map +1 -0
  284. package/dist/functions-rtdb/discovery.d.ts +41 -0
  285. package/dist/functions-rtdb/discovery.d.ts.map +1 -0
  286. package/dist/functions-rtdb/discovery.js +86 -0
  287. package/dist/functions-rtdb/discovery.js.map +1 -0
  288. package/dist/functions-rtdb/event.d.ts +20 -0
  289. package/dist/functions-rtdb/event.d.ts.map +1 -0
  290. package/dist/functions-rtdb/event.js +45 -0
  291. package/dist/functions-rtdb/event.js.map +1 -0
  292. package/dist/functions-rtdb/execution.d.ts +20 -0
  293. package/dist/functions-rtdb/execution.d.ts.map +1 -0
  294. package/dist/functions-rtdb/execution.js +70 -0
  295. package/dist/functions-rtdb/execution.js.map +1 -0
  296. package/dist/functions-rtdb/in-memory-delivery.d.ts +9 -0
  297. package/dist/functions-rtdb/in-memory-delivery.d.ts.map +1 -0
  298. package/dist/functions-rtdb/in-memory-delivery.js +36 -0
  299. package/dist/functions-rtdb/in-memory-delivery.js.map +1 -0
  300. package/dist/functions-rtdb/project.d.ts +7 -0
  301. package/dist/functions-rtdb/project.d.ts.map +1 -0
  302. package/dist/functions-rtdb/project.js +54 -0
  303. package/dist/functions-rtdb/project.js.map +1 -0
  304. package/dist/functions-rtdb/projection.d.ts +14 -0
  305. package/dist/functions-rtdb/projection.d.ts.map +1 -0
  306. package/dist/functions-rtdb/projection.js +65 -0
  307. package/dist/functions-rtdb/projection.js.map +1 -0
  308. package/dist/functions-rtdb/reference-pattern.d.ts +5 -0
  309. package/dist/functions-rtdb/reference-pattern.d.ts.map +1 -0
  310. package/dist/functions-rtdb/reference-pattern.js +14 -0
  311. package/dist/functions-rtdb/reference-pattern.js.map +1 -0
  312. package/dist/functions-rtdb/remote-delivery.d.ts +9 -0
  313. package/dist/functions-rtdb/remote-delivery.d.ts.map +1 -0
  314. package/dist/functions-rtdb/remote-delivery.js +11 -0
  315. package/dist/functions-rtdb/remote-delivery.js.map +1 -0
  316. package/dist/pkg-version.d.ts +2 -0
  317. package/dist/pkg-version.d.ts.map +1 -0
  318. package/dist/pkg-version.js +47 -0
  319. package/dist/pkg-version.js.map +1 -0
  320. package/dist/register/esm-exports.d.ts +26 -0
  321. package/dist/register/esm-exports.d.ts.map +1 -0
  322. package/dist/register/esm-exports.js +61 -0
  323. package/dist/register/esm-exports.js.map +1 -0
  324. package/dist/register/hooks.d.ts +13 -0
  325. package/dist/register/hooks.d.ts.map +1 -0
  326. package/dist/register/hooks.js +15 -0
  327. package/dist/register/hooks.js.map +1 -0
  328. package/dist/register/index.d.ts +5 -0
  329. package/dist/register/index.d.ts.map +1 -0
  330. package/dist/register/index.js +124 -0
  331. package/dist/register/index.js.map +1 -0
  332. package/dist/register/mapping.d.ts +19 -0
  333. package/dist/register/mapping.d.ts.map +1 -0
  334. package/dist/register/mapping.js +35 -0
  335. package/dist/register/mapping.js.map +1 -0
  336. package/dist/remote/index.d.ts +232 -0
  337. package/dist/remote/index.d.ts.map +1 -0
  338. package/dist/remote/index.js +720 -0
  339. package/dist/remote/index.js.map +1 -0
  340. package/dist/rtdb/crawl-snapshot.d.ts +17 -0
  341. package/dist/rtdb/crawl-snapshot.d.ts.map +1 -0
  342. package/dist/rtdb/crawl-snapshot.js +72 -0
  343. package/dist/rtdb/crawl-snapshot.js.map +1 -0
  344. package/dist/rtdb/inspection.d.ts +8 -0
  345. package/dist/rtdb/inspection.d.ts.map +1 -0
  346. package/dist/rtdb/inspection.js +111 -0
  347. package/dist/rtdb/inspection.js.map +1 -0
  348. package/dist/rtdb/load-rules-document.d.ts +25 -0
  349. package/dist/rtdb/load-rules-document.d.ts.map +1 -0
  350. package/dist/rtdb/load-rules-document.js +38 -0
  351. package/dist/rtdb/load-rules-document.js.map +1 -0
  352. package/dist/rtdb/rules-generation-tool.d.ts +4 -0
  353. package/dist/rtdb/rules-generation-tool.d.ts.map +1 -0
  354. package/dist/rtdb/rules-generation-tool.js +35 -0
  355. package/dist/rtdb/rules-generation-tool.js.map +1 -0
  356. package/dist/rtdb/rules-json.d.ts +8 -0
  357. package/dist/rtdb/rules-json.d.ts.map +1 -0
  358. package/dist/rtdb/rules-json.js +17 -0
  359. package/dist/rtdb/rules-json.js.map +1 -0
  360. package/dist/serve/bridge-mount.d.ts +36 -0
  361. package/dist/serve/bridge-mount.d.ts.map +1 -0
  362. package/dist/serve/bridge-mount.js +162 -0
  363. package/dist/serve/bridge-mount.js.map +1 -0
  364. package/dist/serve/bundler.d.ts +110 -0
  365. package/dist/serve/bundler.d.ts.map +1 -0
  366. package/dist/serve/bundler.js +432 -0
  367. package/dist/serve/bundler.js.map +1 -0
  368. package/dist/serve/capture-store.d.ts +27 -0
  369. package/dist/serve/capture-store.d.ts.map +1 -0
  370. package/dist/serve/capture-store.js +47 -0
  371. package/dist/serve/capture-store.js.map +1 -0
  372. package/dist/serve/discovery.d.ts +71 -0
  373. package/dist/serve/discovery.d.ts.map +1 -0
  374. package/dist/serve/discovery.js +158 -0
  375. package/dist/serve/discovery.js.map +1 -0
  376. package/dist/serve/docs-ui/_astro/_slug_.DPUwShm2.css +1 -0
  377. package/dist/serve/docs-ui/docs/_rhythm/index.html +99 -0
  378. package/dist/serve/docs-ui/docs/_rhythm.md +97 -0
  379. package/dist/serve/docs-ui/docs/agent/set-up-your-agent/index.html +42 -0
  380. package/dist/serve/docs-ui/docs/agent/set-up-your-agent.md +72 -0
  381. package/dist/serve/docs-ui/docs/agent/watch-and-review/index.html +25 -0
  382. package/dist/serve/docs-ui/docs/agent/watch-and-review.md +38 -0
  383. package/dist/serve/docs-ui/docs/agent/work-with-an-agent/index.html +69 -0
  384. package/dist/serve/docs-ui/docs/agent/work-with-an-agent.md +74 -0
  385. package/dist/serve/docs-ui/docs/ai-compat/index.html +423 -0
  386. package/dist/serve/docs-ui/docs/ai-compat.md +456 -0
  387. package/dist/serve/docs-ui/docs/api-reference/index.html +66 -0
  388. package/dist/serve/docs-ui/docs/api-reference.md +69 -0
  389. package/dist/serve/docs-ui/docs/app-compat/index.html +159 -0
  390. package/dist/serve/docs-ui/docs/app-compat.md +178 -0
  391. package/dist/serve/docs-ui/docs/auth-compat/index.html +644 -0
  392. package/dist/serve/docs-ui/docs/auth-compat.md +701 -0
  393. package/dist/serve/docs-ui/docs/build/ai-logic/index.html +27 -0
  394. package/dist/serve/docs-ui/docs/build/ai-logic.md +39 -0
  395. package/dist/serve/docs-ui/docs/build/authentication/index.html +65 -0
  396. package/dist/serve/docs-ui/docs/build/authentication.md +95 -0
  397. package/dist/serve/docs-ui/docs/build/cloud-firestore/index.html +69 -0
  398. package/dist/serve/docs-ui/docs/build/cloud-firestore.md +93 -0
  399. package/dist/serve/docs-ui/docs/build/cloud-messaging/index.html +27 -0
  400. package/dist/serve/docs-ui/docs/build/cloud-messaging.md +37 -0
  401. package/dist/serve/docs-ui/docs/build/cloud-storage/index.html +65 -0
  402. package/dist/serve/docs-ui/docs/build/cloud-storage.md +86 -0
  403. package/dist/serve/docs-ui/docs/build/realtime-database/index.html +49 -0
  404. package/dist/serve/docs-ui/docs/build/realtime-database.md +67 -0
  405. package/dist/serve/docs-ui/docs/conformance-scores/index.html +49 -0
  406. package/dist/serve/docs-ui/docs/conformance-scores.md +53 -0
  407. package/dist/serve/docs-ui/docs/create-pyric-reference-api/index.html +498 -0
  408. package/dist/serve/docs-ui/docs/create-pyric-reference-api.md +345 -0
  409. package/dist/serve/docs-ui/docs/database-compat/index.html +1037 -0
  410. package/dist/serve/docs-ui/docs/database-compat.md +1099 -0
  411. package/dist/serve/docs-ui/docs/firestore-compat/index.html +823 -0
  412. package/dist/serve/docs-ui/docs/firestore-compat.md +881 -0
  413. package/dist/serve/docs-ui/docs/functions-rtdb-compat/index.html +72 -0
  414. package/dist/serve/docs-ui/docs/functions-rtdb-compat.md +83 -0
  415. package/dist/serve/docs-ui/docs/get-started/how-the-swap-works/index.html +27 -0
  416. package/dist/serve/docs-ui/docs/get-started/how-the-swap-works.md +50 -0
  417. package/dist/serve/docs-ui/docs/get-started/start-building/index.html +31 -0
  418. package/dist/serve/docs-ui/docs/get-started/start-building.md +53 -0
  419. package/dist/serve/docs-ui/docs/index.html +2 -0
  420. package/dist/serve/docs-ui/docs/index.json +11719 -0
  421. package/dist/serve/docs-ui/docs/messaging-compat/index.html +264 -0
  422. package/dist/serve/docs-ui/docs/messaging-compat.md +285 -0
  423. package/dist/serve/docs-ui/docs/observe/see-whats-happening/index.html +73 -0
  424. package/dist/serve/docs-ui/docs/observe/see-whats-happening.md +69 -0
  425. package/dist/serve/docs-ui/docs/observe/shape-your-data/index.html +44 -0
  426. package/dist/serve/docs-ui/docs/observe/shape-your-data.md +74 -0
  427. package/dist/serve/docs-ui/docs/overview/index.html +16 -0
  428. package/dist/serve/docs-ui/docs/overview.md +31 -0
  429. package/dist/serve/docs-ui/docs/pyric-admin-app-reference-api/index.html +185 -0
  430. package/dist/serve/docs-ui/docs/pyric-admin-app-reference-api.md +206 -0
  431. package/dist/serve/docs-ui/docs/pyric-admin-auth-reference-api/index.html +617 -0
  432. package/dist/serve/docs-ui/docs/pyric-admin-auth-reference-api.md +441 -0
  433. package/dist/serve/docs-ui/docs/pyric-admin-database-reference-api/index.html +583 -0
  434. package/dist/serve/docs-ui/docs/pyric-admin-database-reference-api.md +597 -0
  435. package/dist/serve/docs-ui/docs/pyric-admin-firestore-reference-api/index.html +32 -0
  436. package/dist/serve/docs-ui/docs/pyric-admin-firestore-reference-api.md +30 -0
  437. package/dist/serve/docs-ui/docs/pyric-admin-storage-reference-api/index.html +317 -0
  438. package/dist/serve/docs-ui/docs/pyric-admin-storage-reference-api.md +285 -0
  439. package/dist/serve/docs-ui/docs/pyric-ai-reference-api/index.html +5830 -0
  440. package/dist/serve/docs-ui/docs/pyric-ai-reference-api.md +5439 -0
  441. package/dist/serve/docs-ui/docs/pyric-ai-scripting-reference-api/index.html +159 -0
  442. package/dist/serve/docs-ui/docs/pyric-ai-scripting-reference-api.md +122 -0
  443. package/dist/serve/docs-ui/docs/pyric-app-reference-api/index.html +420 -0
  444. package/dist/serve/docs-ui/docs/pyric-app-reference-api.md +326 -0
  445. package/dist/serve/docs-ui/docs/pyric-auth-reference-api/index.html +5452 -0
  446. package/dist/serve/docs-ui/docs/pyric-auth-reference-api.md +5271 -0
  447. package/dist/serve/docs-ui/docs/pyric-cli-assurance-browser-reference-api/index.html +98 -0
  448. package/dist/serve/docs-ui/docs/pyric-cli-assurance-browser-reference-api.md +88 -0
  449. package/dist/serve/docs-ui/docs/pyric-cli-assurance-reference-api/index.html +2263 -0
  450. package/dist/serve/docs-ui/docs/pyric-cli-assurance-reference-api.md +1477 -0
  451. package/dist/serve/docs-ui/docs/pyric-cli-bridge-client-reference-api/index.html +546 -0
  452. package/dist/serve/docs-ui/docs/pyric-cli-bridge-client-reference-api.md +485 -0
  453. package/dist/serve/docs-ui/docs/pyric-cli-bridge-reference-api/index.html +506 -0
  454. package/dist/serve/docs-ui/docs/pyric-cli-bridge-reference-api.md +419 -0
  455. package/dist/serve/docs-ui/docs/pyric-cli-conformance-browser-reference-api/index.html +257 -0
  456. package/dist/serve/docs-ui/docs/pyric-cli-conformance-browser-reference-api.md +197 -0
  457. package/dist/serve/docs-ui/docs/pyric-cli-conformance-reference-api/index.html +307 -0
  458. package/dist/serve/docs-ui/docs/pyric-cli-conformance-reference-api.md +254 -0
  459. package/dist/serve/docs-ui/docs/pyric-cli-credentials-node-reference-api/index.html +67 -0
  460. package/dist/serve/docs-ui/docs/pyric-cli-credentials-node-reference-api.md +59 -0
  461. package/dist/serve/docs-ui/docs/pyric-cli-discover-reference-api/index.html +2355 -0
  462. package/dist/serve/docs-ui/docs/pyric-cli-discover-reference-api.md +2036 -0
  463. package/dist/serve/docs-ui/docs/pyric-cli-register-reference-api/index.html +10 -0
  464. package/dist/serve/docs-ui/docs/pyric-cli-register-reference-api.md +16 -0
  465. package/dist/serve/docs-ui/docs/pyric-cli-remote-reference-api/index.html +1044 -0
  466. package/dist/serve/docs-ui/docs/pyric-cli-remote-reference-api.md +952 -0
  467. package/dist/serve/docs-ui/docs/pyric-cli-serve-worker-reference-api/index.html +5041 -0
  468. package/dist/serve/docs-ui/docs/pyric-cli-serve-worker-reference-api.md +4739 -0
  469. package/dist/serve/docs-ui/docs/pyric-cli-verify-reference-api/index.html +926 -0
  470. package/dist/serve/docs-ui/docs/pyric-cli-verify-reference-api.md +586 -0
  471. package/dist/serve/docs-ui/docs/pyric-cli-vite-reference-api/index.html +102 -0
  472. package/dist/serve/docs-ui/docs/pyric-cli-vite-reference-api.md +76 -0
  473. package/dist/serve/docs-ui/docs/pyric-database-reference-api/index.html +1851 -0
  474. package/dist/serve/docs-ui/docs/pyric-database-reference-api.md +1842 -0
  475. package/dist/serve/docs-ui/docs/pyric-firestore-reference-api/index.html +3623 -0
  476. package/dist/serve/docs-ui/docs/pyric-firestore-reference-api.md +3399 -0
  477. package/dist/serve/docs-ui/docs/pyric-firestore-values-reference-api/index.html +30 -0
  478. package/dist/serve/docs-ui/docs/pyric-firestore-values-reference-api.md +30 -0
  479. package/dist/serve/docs-ui/docs/pyric-messaging-reference-api/index.html +508 -0
  480. package/dist/serve/docs-ui/docs/pyric-messaging-reference-api.md +374 -0
  481. package/dist/serve/docs-ui/docs/pyric-messaging-sw-reference-api/index.html +482 -0
  482. package/dist/serve/docs-ui/docs/pyric-messaging-sw-reference-api.md +348 -0
  483. package/dist/serve/docs-ui/docs/pyric-rules-reference-api/index.html +2629 -0
  484. package/dist/serve/docs-ui/docs/pyric-rules-reference-api.md +2213 -0
  485. package/dist/serve/docs-ui/docs/pyric-sandbox-database-reference-api/index.html +120 -0
  486. package/dist/serve/docs-ui/docs/pyric-sandbox-database-reference-api.md +110 -0
  487. package/dist/serve/docs-ui/docs/pyric-sandbox-firestore-reference-api/index.html +202 -0
  488. package/dist/serve/docs-ui/docs/pyric-sandbox-firestore-reference-api.md +134 -0
  489. package/dist/serve/docs-ui/docs/pyric-sandbox-reference-api/index.html +5019 -0
  490. package/dist/serve/docs-ui/docs/pyric-sandbox-reference-api.md +4060 -0
  491. package/dist/serve/docs-ui/docs/pyric-storage-reference-api/index.html +2120 -0
  492. package/dist/serve/docs-ui/docs/pyric-storage-reference-api.md +1687 -0
  493. package/dist/serve/docs-ui/docs/pyric-ui-agents-reference-api/index.html +638 -0
  494. package/dist/serve/docs-ui/docs/pyric-ui-agents-reference-api.md +430 -0
  495. package/dist/serve/docs-ui/docs/pyric-ui-auth-hooks-reference-api/index.html +813 -0
  496. package/dist/serve/docs-ui/docs/pyric-ui-auth-hooks-reference-api.md +634 -0
  497. package/dist/serve/docs-ui/docs/pyric-ui-auth-reference-api/index.html +1708 -0
  498. package/dist/serve/docs-ui/docs/pyric-ui-auth-reference-api.md +1300 -0
  499. package/dist/serve/docs-ui/docs/pyric-ui-events-hooks-reference-api/index.html +177 -0
  500. package/dist/serve/docs-ui/docs/pyric-ui-events-hooks-reference-api.md +111 -0
  501. package/dist/serve/docs-ui/docs/pyric-ui-events-reference-api/index.html +1542 -0
  502. package/dist/serve/docs-ui/docs/pyric-ui-events-reference-api.md +903 -0
  503. package/dist/serve/docs-ui/docs/pyric-ui-firestore-hooks-reference-api/index.html +1024 -0
  504. package/dist/serve/docs-ui/docs/pyric-ui-firestore-hooks-reference-api.md +640 -0
  505. package/dist/serve/docs-ui/docs/pyric-ui-firestore-reference-api/index.html +2753 -0
  506. package/dist/serve/docs-ui/docs/pyric-ui-firestore-reference-api.md +2171 -0
  507. package/dist/serve/docs-ui/docs/pyric-ui-primitives-reference-api/index.html +1005 -0
  508. package/dist/serve/docs-ui/docs/pyric-ui-primitives-reference-api.md +693 -0
  509. package/dist/serve/docs-ui/docs/pyric-ui-rtdb-reference-api/index.html +1388 -0
  510. package/dist/serve/docs-ui/docs/pyric-ui-rtdb-reference-api.md +1340 -0
  511. package/dist/serve/docs-ui/docs/pyric-ui-rules-hooks-reference-api/index.html +131 -0
  512. package/dist/serve/docs-ui/docs/pyric-ui-rules-hooks-reference-api.md +76 -0
  513. package/dist/serve/docs-ui/docs/pyric-ui-rules-reference-api/index.html +648 -0
  514. package/dist/serve/docs-ui/docs/pyric-ui-rules-reference-api.md +508 -0
  515. package/dist/serve/docs-ui/docs/pyric-ui-storage-hooks-reference-api/index.html +1457 -0
  516. package/dist/serve/docs-ui/docs/pyric-ui-storage-hooks-reference-api.md +1029 -0
  517. package/dist/serve/docs-ui/docs/pyric-ui-storage-reference-api/index.html +2476 -0
  518. package/dist/serve/docs-ui/docs/pyric-ui-storage-reference-api.md +1919 -0
  519. package/dist/serve/docs-ui/docs/pyric-ui-traffic-hooks-reference-api/index.html +1241 -0
  520. package/dist/serve/docs-ui/docs/pyric-ui-traffic-hooks-reference-api.md +817 -0
  521. package/dist/serve/docs-ui/docs/pyric-ui-traffic-reference-api/index.html +2289 -0
  522. package/dist/serve/docs-ui/docs/pyric-ui-traffic-reference-api.md +1489 -0
  523. package/dist/serve/docs-ui/docs/rules-compat/index.html +272 -0
  524. package/dist/serve/docs-ui/docs/rules-compat.md +287 -0
  525. package/dist/serve/docs-ui/docs/secure/audit-your-rules/index.html +34 -0
  526. package/dist/serve/docs-ui/docs/secure/audit-your-rules.md +67 -0
  527. package/dist/serve/docs-ui/docs/secure/firestore-rules-limits/index.html +105 -0
  528. package/dist/serve/docs-ui/docs/secure/firestore-rules-limits.md +152 -0
  529. package/dist/serve/docs-ui/docs/secure/read-a-denial/index.html +40 -0
  530. package/dist/serve/docs-ui/docs/secure/read-a-denial.md +58 -0
  531. package/dist/serve/docs-ui/docs/secure/rtdb-rules-in-typescript/index.html +66 -0
  532. package/dist/serve/docs-ui/docs/secure/rtdb-rules-in-typescript.md +89 -0
  533. package/dist/serve/docs-ui/docs/secure/rules-standard-library/index.html +158 -0
  534. package/dist/serve/docs-ui/docs/secure/rules-standard-library.md +116 -0
  535. package/dist/serve/docs-ui/docs/secure/secure-it-with-rules/index.html +46 -0
  536. package/dist/serve/docs-ui/docs/secure/secure-it-with-rules.md +51 -0
  537. package/dist/serve/docs-ui/docs/secure/simulate-and-lint/index.html +94 -0
  538. package/dist/serve/docs-ui/docs/secure/simulate-and-lint.md +86 -0
  539. package/dist/serve/docs-ui/docs/secure/write-a-rules-test-suite/index.html +81 -0
  540. package/dist/serve/docs-ui/docs/secure/write-a-rules-test-suite.md +105 -0
  541. package/dist/serve/docs-ui/docs/ship/ship-to-production/index.html +36 -0
  542. package/dist/serve/docs-ui/docs/ship/ship-to-production.md +64 -0
  543. package/dist/serve/docs-ui/docs/ship/test-in-node/index.html +74 -0
  544. package/dist/serve/docs-ui/docs/ship/test-in-node.md +94 -0
  545. package/dist/serve/docs-ui/docs/storage-compat/index.html +532 -0
  546. package/dist/serve/docs-ui/docs/storage-compat.md +577 -0
  547. package/dist/serve/docs-ui/docs/trust/how-we-know-it-matches-firebase/index.html +131 -0
  548. package/dist/serve/docs-ui/docs/trust/how-we-know-it-matches-firebase.md +155 -0
  549. package/dist/serve/docs-ui/docs/trust/versioning-and-compatibility/index.html +13 -0
  550. package/dist/serve/docs-ui/docs/trust/versioning-and-compatibility.md +21 -0
  551. package/dist/serve/docs-ui/index.html +1 -0
  552. package/dist/serve/docs-ui/llms.txt +123 -0
  553. package/dist/serve/entries/ai.d.ts +4 -0
  554. package/dist/serve/entries/ai.d.ts.map +1 -0
  555. package/dist/serve/entries/ai.js +184 -0
  556. package/dist/serve/entries/ai.js.map +1 -0
  557. package/dist/serve/entries/app-backend.d.ts +2 -0
  558. package/dist/serve/entries/app-backend.d.ts.map +1 -0
  559. package/dist/serve/entries/app-backend.js +4 -0
  560. package/dist/serve/entries/app-backend.js.map +1 -0
  561. package/dist/serve/entries/app-client.d.ts +5 -0
  562. package/dist/serve/entries/app-client.d.ts.map +1 -0
  563. package/dist/serve/entries/app-client.js +23 -0
  564. package/dist/serve/entries/app-client.js.map +1 -0
  565. package/dist/serve/entries/app-session-store.d.ts +14 -0
  566. package/dist/serve/entries/app-session-store.d.ts.map +1 -0
  567. package/dist/serve/entries/app-session-store.js +37 -0
  568. package/dist/serve/entries/app-session-store.js.map +1 -0
  569. package/dist/serve/entries/app.d.ts +2 -0
  570. package/dist/serve/entries/app.d.ts.map +1 -0
  571. package/dist/serve/entries/app.js +10 -0
  572. package/dist/serve/entries/app.js.map +1 -0
  573. package/dist/serve/entries/auth-helper-core.d.ts +52 -0
  574. package/dist/serve/entries/auth-helper-core.d.ts.map +1 -0
  575. package/dist/serve/entries/auth-helper-core.js +118 -0
  576. package/dist/serve/entries/auth-helper-core.js.map +1 -0
  577. package/dist/serve/entries/auth-helper-dom.d.ts +14 -0
  578. package/dist/serve/entries/auth-helper-dom.d.ts.map +1 -0
  579. package/dist/serve/entries/auth-helper-dom.js +116 -0
  580. package/dist/serve/entries/auth-helper-dom.js.map +1 -0
  581. package/dist/serve/entries/auth-helper-runtime.d.ts +5 -0
  582. package/dist/serve/entries/auth-helper-runtime.d.ts.map +1 -0
  583. package/dist/serve/entries/auth-helper-runtime.js +11 -0
  584. package/dist/serve/entries/auth-helper-runtime.js.map +1 -0
  585. package/dist/serve/entries/auth.d.ts +77 -0
  586. package/dist/serve/entries/auth.d.ts.map +1 -0
  587. package/dist/serve/entries/auth.js +201 -0
  588. package/dist/serve/entries/auth.js.map +1 -0
  589. package/dist/serve/entries/bridge-url.d.ts +25 -0
  590. package/dist/serve/entries/bridge-url.d.ts.map +1 -0
  591. package/dist/serve/entries/bridge-url.js +30 -0
  592. package/dist/serve/entries/bridge-url.js.map +1 -0
  593. package/dist/serve/entries/database.d.ts +46 -0
  594. package/dist/serve/entries/database.d.ts.map +1 -0
  595. package/dist/serve/entries/database.js +80 -0
  596. package/dist/serve/entries/database.js.map +1 -0
  597. package/dist/serve/entries/firestore.d.ts +104 -0
  598. package/dist/serve/entries/firestore.d.ts.map +1 -0
  599. package/dist/serve/entries/firestore.js +202 -0
  600. package/dist/serve/entries/firestore.js.map +1 -0
  601. package/dist/serve/entries/init.d.ts +2 -0
  602. package/dist/serve/entries/init.d.ts.map +1 -0
  603. package/dist/serve/entries/init.js +40 -0
  604. package/dist/serve/entries/init.js.map +1 -0
  605. package/dist/serve/entries/keepalive.d.ts +20 -0
  606. package/dist/serve/entries/keepalive.d.ts.map +1 -0
  607. package/dist/serve/entries/keepalive.js +38 -0
  608. package/dist/serve/entries/keepalive.js.map +1 -0
  609. package/dist/serve/entries/messaging-sw.d.ts +10 -0
  610. package/dist/serve/entries/messaging-sw.d.ts.map +1 -0
  611. package/dist/serve/entries/messaging-sw.js +36 -0
  612. package/dist/serve/entries/messaging-sw.js.map +1 -0
  613. package/dist/serve/entries/messaging.d.ts +11 -0
  614. package/dist/serve/entries/messaging.d.ts.map +1 -0
  615. package/dist/serve/entries/messaging.js +53 -0
  616. package/dist/serve/entries/messaging.js.map +1 -0
  617. package/dist/serve/entries/runtime.d.ts +46 -0
  618. package/dist/serve/entries/runtime.d.ts.map +1 -0
  619. package/dist/serve/entries/runtime.js +435 -0
  620. package/dist/serve/entries/runtime.js.map +1 -0
  621. package/dist/serve/entries/session-store.d.ts +48 -0
  622. package/dist/serve/entries/session-store.d.ts.map +1 -0
  623. package/dist/serve/entries/session-store.js +82 -0
  624. package/dist/serve/entries/session-store.js.map +1 -0
  625. package/dist/serve/entries/storage.d.ts +25 -0
  626. package/dist/serve/entries/storage.d.ts.map +1 -0
  627. package/dist/serve/entries/storage.js +61 -0
  628. package/dist/serve/entries/storage.js.map +1 -0
  629. package/dist/serve/entries/tab-sync-wiring.d.ts +88 -0
  630. package/dist/serve/entries/tab-sync-wiring.d.ts.map +1 -0
  631. package/dist/serve/entries/tab-sync-wiring.js +217 -0
  632. package/dist/serve/entries/tab-sync-wiring.js.map +1 -0
  633. package/dist/serve/entries/worker-runtime.d.ts +10 -0
  634. package/dist/serve/entries/worker-runtime.d.ts.map +1 -0
  635. package/dist/serve/entries/worker-runtime.js +59 -0
  636. package/dist/serve/entries/worker-runtime.js.map +1 -0
  637. package/dist/serve/init-payload.d.ts +21 -0
  638. package/dist/serve/init-payload.d.ts.map +1 -0
  639. package/dist/serve/init-payload.js +2 -0
  640. package/dist/serve/init-payload.js.map +1 -0
  641. package/dist/serve/namespace.d.ts +73 -0
  642. package/dist/serve/namespace.d.ts.map +1 -0
  643. package/dist/serve/namespace.js +470 -0
  644. package/dist/serve/namespace.js.map +1 -0
  645. package/dist/serve/open-browser.d.ts +23 -0
  646. package/dist/serve/open-browser.d.ts.map +1 -0
  647. package/dist/serve/open-browser.js +58 -0
  648. package/dist/serve/open-browser.js.map +1 -0
  649. package/dist/serve/rules.d.ts +77 -0
  650. package/dist/serve/rules.d.ts.map +1 -0
  651. package/dist/serve/rules.js +202 -0
  652. package/dist/serve/rules.js.map +1 -0
  653. package/dist/serve/sandbox-marker.d.ts +9 -0
  654. package/dist/serve/sandbox-marker.d.ts.map +1 -0
  655. package/dist/serve/sandbox-marker.js +31 -0
  656. package/dist/serve/sandbox-marker.js.map +1 -0
  657. package/dist/serve/server.d.ts +135 -0
  658. package/dist/serve/server.d.ts.map +1 -0
  659. package/dist/serve/server.js +328 -0
  660. package/dist/serve/server.js.map +1 -0
  661. package/dist/serve/standalone-assets.d.ts +67 -0
  662. package/dist/serve/standalone-assets.d.ts.map +1 -0
  663. package/dist/serve/standalone-assets.js +134 -0
  664. package/dist/serve/standalone-assets.js.map +1 -0
  665. package/dist/serve/state-store.d.ts +45 -0
  666. package/dist/serve/state-store.d.ts.map +1 -0
  667. package/dist/serve/state-store.js +120 -0
  668. package/dist/serve/state-store.js.map +1 -0
  669. package/dist/serve/studio/disk-project-store.d.ts +9 -0
  670. package/dist/serve/studio/disk-project-store.d.ts.map +1 -0
  671. package/dist/serve/studio/disk-project-store.js +173 -0
  672. package/dist/serve/studio/disk-project-store.js.map +1 -0
  673. package/dist/serve/studio/disk-workspace.d.ts +14 -0
  674. package/dist/serve/studio/disk-workspace.d.ts.map +1 -0
  675. package/dist/serve/studio/disk-workspace.js +152 -0
  676. package/dist/serve/studio/disk-workspace.js.map +1 -0
  677. package/dist/serve/studio/index.d.ts +10 -0
  678. package/dist/serve/studio/index.d.ts.map +1 -0
  679. package/dist/serve/studio/index.js +9 -0
  680. package/dist/serve/studio/index.js.map +1 -0
  681. package/dist/serve/studio/routes.d.ts +40 -0
  682. package/dist/serve/studio/routes.d.ts.map +1 -0
  683. package/dist/serve/studio/routes.js +182 -0
  684. package/dist/serve/studio/routes.js.map +1 -0
  685. package/dist/serve/studio/store-types.d.ts +45 -0
  686. package/dist/serve/studio/store-types.d.ts.map +1 -0
  687. package/dist/serve/studio/store-types.js +11 -0
  688. package/dist/serve/studio/store-types.js.map +1 -0
  689. package/dist/serve/studio-ui/assets/RulesCodeEditor-CXdSLKhO.js +23 -0
  690. package/dist/serve/studio-ui/assets/index-BlSGru_r.css +1 -0
  691. package/dist/serve/studio-ui/assets/index-BvtQIpGn.js +1211 -0
  692. package/dist/serve/studio-ui/assets/seed-3DMedLL3.js +2 -0
  693. package/dist/serve/studio-ui/index.html +32 -0
  694. package/dist/serve/studio-ui/pyric-logo.svg +76 -0
  695. package/dist/serve/vite-plugin.d.ts +57 -0
  696. package/dist/serve/vite-plugin.d.ts.map +1 -0
  697. package/dist/serve/vite-plugin.js +664 -0
  698. package/dist/serve/vite-plugin.js.map +1 -0
  699. package/dist/serve/worker/client/admin-firestore.d.ts +18 -0
  700. package/dist/serve/worker/client/admin-firestore.d.ts.map +1 -0
  701. package/dist/serve/worker/client/admin-firestore.js +26 -0
  702. package/dist/serve/worker/client/admin-firestore.js.map +1 -0
  703. package/dist/serve/worker/client/ai.d.ts +31 -0
  704. package/dist/serve/worker/client/ai.d.ts.map +1 -0
  705. package/dist/serve/worker/client/ai.js +89 -0
  706. package/dist/serve/worker/client/ai.js.map +1 -0
  707. package/dist/serve/worker/client/auth.d.ts +168 -0
  708. package/dist/serve/worker/client/auth.d.ts.map +1 -0
  709. package/dist/serve/worker/client/auth.js +322 -0
  710. package/dist/serve/worker/client/auth.js.map +1 -0
  711. package/dist/serve/worker/client/connection.d.ts +80 -0
  712. package/dist/serve/worker/client/connection.d.ts.map +1 -0
  713. package/dist/serve/worker/client/connection.js +148 -0
  714. package/dist/serve/worker/client/connection.js.map +1 -0
  715. package/dist/serve/worker/client/core.d.ts +109 -0
  716. package/dist/serve/worker/client/core.d.ts.map +1 -0
  717. package/dist/serve/worker/client/core.js +248 -0
  718. package/dist/serve/worker/client/core.js.map +1 -0
  719. package/dist/serve/worker/client/disconnect.d.ts +7 -0
  720. package/dist/serve/worker/client/disconnect.d.ts.map +1 -0
  721. package/dist/serve/worker/client/disconnect.js +26 -0
  722. package/dist/serve/worker/client/disconnect.js.map +1 -0
  723. package/dist/serve/worker/client/firestore-reads.d.ts +49 -0
  724. package/dist/serve/worker/client/firestore-reads.d.ts.map +1 -0
  725. package/dist/serve/worker/client/firestore-reads.js +139 -0
  726. package/dist/serve/worker/client/firestore-reads.js.map +1 -0
  727. package/dist/serve/worker/client/firestore-refs.d.ts +54 -0
  728. package/dist/serve/worker/client/firestore-refs.d.ts.map +1 -0
  729. package/dist/serve/worker/client/firestore-refs.js +167 -0
  730. package/dist/serve/worker/client/firestore-refs.js.map +1 -0
  731. package/dist/serve/worker/client/firestore-writes.d.ts +70 -0
  732. package/dist/serve/worker/client/firestore-writes.d.ts.map +1 -0
  733. package/dist/serve/worker/client/firestore-writes.js +169 -0
  734. package/dist/serve/worker/client/firestore-writes.js.map +1 -0
  735. package/dist/serve/worker/client/handles.d.ts +73 -0
  736. package/dist/serve/worker/client/handles.d.ts.map +1 -0
  737. package/dist/serve/worker/client/handles.js +4 -0
  738. package/dist/serve/worker/client/handles.js.map +1 -0
  739. package/dist/serve/worker/client/messaging.d.ts +16 -0
  740. package/dist/serve/worker/client/messaging.d.ts.map +1 -0
  741. package/dist/serve/worker/client/messaging.js +60 -0
  742. package/dist/serve/worker/client/messaging.js.map +1 -0
  743. package/dist/serve/worker/client/presence.d.ts +43 -0
  744. package/dist/serve/worker/client/presence.d.ts.map +1 -0
  745. package/dist/serve/worker/client/presence.js +132 -0
  746. package/dist/serve/worker/client/presence.js.map +1 -0
  747. package/dist/serve/worker/client/rtdb.d.ts +36 -0
  748. package/dist/serve/worker/client/rtdb.d.ts.map +1 -0
  749. package/dist/serve/worker/client/rtdb.js +241 -0
  750. package/dist/serve/worker/client/rtdb.js.map +1 -0
  751. package/dist/serve/worker/client/rules.d.ts +24 -0
  752. package/dist/serve/worker/client/rules.d.ts.map +1 -0
  753. package/dist/serve/worker/client/rules.js +44 -0
  754. package/dist/serve/worker/client/rules.js.map +1 -0
  755. package/dist/serve/worker/client/service-worker-connection.d.ts +3 -0
  756. package/dist/serve/worker/client/service-worker-connection.d.ts.map +1 -0
  757. package/dist/serve/worker/client/service-worker-connection.js +53 -0
  758. package/dist/serve/worker/client/service-worker-connection.js.map +1 -0
  759. package/dist/serve/worker/client/snapshots.d.ts +32 -0
  760. package/dist/serve/worker/client/snapshots.d.ts.map +1 -0
  761. package/dist/serve/worker/client/snapshots.js +46 -0
  762. package/dist/serve/worker/client/snapshots.js.map +1 -0
  763. package/dist/serve/worker/client/storage.d.ts +64 -0
  764. package/dist/serve/worker/client/storage.d.ts.map +1 -0
  765. package/dist/serve/worker/client/storage.js +125 -0
  766. package/dist/serve/worker/client/storage.js.map +1 -0
  767. package/dist/serve/worker/client/studio.d.ts +32 -0
  768. package/dist/serve/worker/client/studio.d.ts.map +1 -0
  769. package/dist/serve/worker/client/studio.js +61 -0
  770. package/dist/serve/worker/client/studio.js.map +1 -0
  771. package/dist/serve/worker/client.d.ts +43 -0
  772. package/dist/serve/worker/client.d.ts.map +1 -0
  773. package/dist/serve/worker/client.js +44 -0
  774. package/dist/serve/worker/client.js.map +1 -0
  775. package/dist/serve/worker/entry.d.ts +40 -0
  776. package/dist/serve/worker/entry.d.ts.map +1 -0
  777. package/dist/serve/worker/entry.js +144 -0
  778. package/dist/serve/worker/entry.js.map +1 -0
  779. package/dist/serve/worker/host/admin-firestore.d.ts +17 -0
  780. package/dist/serve/worker/host/admin-firestore.d.ts.map +1 -0
  781. package/dist/serve/worker/host/admin-firestore.js +92 -0
  782. package/dist/serve/worker/host/admin-firestore.js.map +1 -0
  783. package/dist/serve/worker/host/connection.d.ts +40 -0
  784. package/dist/serve/worker/host/connection.d.ts.map +1 -0
  785. package/dist/serve/worker/host/connection.js +153 -0
  786. package/dist/serve/worker/host/connection.js.map +1 -0
  787. package/dist/serve/worker/host/core.d.ts +159 -0
  788. package/dist/serve/worker/host/core.d.ts.map +1 -0
  789. package/dist/serve/worker/host/core.js +296 -0
  790. package/dist/serve/worker/host/core.js.map +1 -0
  791. package/dist/serve/worker/host/dispatch.d.ts +34 -0
  792. package/dist/serve/worker/host/dispatch.d.ts.map +1 -0
  793. package/dist/serve/worker/host/dispatch.js +267 -0
  794. package/dist/serve/worker/host/dispatch.js.map +1 -0
  795. package/dist/serve/worker/host/firestore-reads.d.ts +17 -0
  796. package/dist/serve/worker/host/firestore-reads.d.ts.map +1 -0
  797. package/dist/serve/worker/host/firestore-reads.js +108 -0
  798. package/dist/serve/worker/host/firestore-reads.js.map +1 -0
  799. package/dist/serve/worker/host/firestore-writes.d.ts +37 -0
  800. package/dist/serve/worker/host/firestore-writes.d.ts.map +1 -0
  801. package/dist/serve/worker/host/firestore-writes.js +409 -0
  802. package/dist/serve/worker/host/firestore-writes.js.map +1 -0
  803. package/dist/serve/worker/host/presence.d.ts +38 -0
  804. package/dist/serve/worker/host/presence.d.ts.map +1 -0
  805. package/dist/serve/worker/host/presence.js +280 -0
  806. package/dist/serve/worker/host/presence.js.map +1 -0
  807. package/dist/serve/worker/host/rtdb.d.ts +18 -0
  808. package/dist/serve/worker/host/rtdb.d.ts.map +1 -0
  809. package/dist/serve/worker/host/rtdb.js +128 -0
  810. package/dist/serve/worker/host/rtdb.js.map +1 -0
  811. package/dist/serve/worker/host/rules.d.ts +17 -0
  812. package/dist/serve/worker/host/rules.d.ts.map +1 -0
  813. package/dist/serve/worker/host/rules.js +118 -0
  814. package/dist/serve/worker/host/rules.js.map +1 -0
  815. package/dist/serve/worker/host/storage.d.ts +19 -0
  816. package/dist/serve/worker/host/storage.d.ts.map +1 -0
  817. package/dist/serve/worker/host/storage.js +260 -0
  818. package/dist/serve/worker/host/storage.js.map +1 -0
  819. package/dist/serve/worker/host/studio.d.ts +13 -0
  820. package/dist/serve/worker/host/studio.d.ts.map +1 -0
  821. package/dist/serve/worker/host/studio.js +30 -0
  822. package/dist/serve/worker/host/studio.js.map +1 -0
  823. package/dist/serve/worker/host/subscriptions.d.ts +21 -0
  824. package/dist/serve/worker/host/subscriptions.d.ts.map +1 -0
  825. package/dist/serve/worker/host/subscriptions.js +162 -0
  826. package/dist/serve/worker/host/subscriptions.js.map +1 -0
  827. package/dist/serve/worker/host-ai.d.ts +59 -0
  828. package/dist/serve/worker/host-ai.d.ts.map +1 -0
  829. package/dist/serve/worker/host-ai.js +158 -0
  830. package/dist/serve/worker/host-ai.js.map +1 -0
  831. package/dist/serve/worker/host-auth.d.ts +47 -0
  832. package/dist/serve/worker/host-auth.d.ts.map +1 -0
  833. package/dist/serve/worker/host-auth.js +464 -0
  834. package/dist/serve/worker/host-auth.js.map +1 -0
  835. package/dist/serve/worker/host-context.d.ts +220 -0
  836. package/dist/serve/worker/host-context.d.ts.map +1 -0
  837. package/dist/serve/worker/host-context.js +45 -0
  838. package/dist/serve/worker/host-context.js.map +1 -0
  839. package/dist/serve/worker/host-events.d.ts +21 -0
  840. package/dist/serve/worker/host-events.d.ts.map +1 -0
  841. package/dist/serve/worker/host-events.js +87 -0
  842. package/dist/serve/worker/host-events.js.map +1 -0
  843. package/dist/serve/worker/host-messaging.d.ts +60 -0
  844. package/dist/serve/worker/host-messaging.d.ts.map +1 -0
  845. package/dist/serve/worker/host-messaging.js +226 -0
  846. package/dist/serve/worker/host-messaging.js.map +1 -0
  847. package/dist/serve/worker/host.d.ts +36 -0
  848. package/dist/serve/worker/host.d.ts.map +1 -0
  849. package/dist/serve/worker/host.js +39 -0
  850. package/dist/serve/worker/host.js.map +1 -0
  851. package/dist/serve/worker/index.d.ts +22 -0
  852. package/dist/serve/worker/index.d.ts.map +1 -0
  853. package/dist/serve/worker/index.js +61 -0
  854. package/dist/serve/worker/index.js.map +1 -0
  855. package/dist/serve/worker/presence-timing.d.ts +14 -0
  856. package/dist/serve/worker/presence-timing.d.ts.map +1 -0
  857. package/dist/serve/worker/presence-timing.js +14 -0
  858. package/dist/serve/worker/presence-timing.js.map +1 -0
  859. package/dist/serve/worker/protocol.d.ts +1150 -0
  860. package/dist/serve/worker/protocol.d.ts.map +1 -0
  861. package/dist/serve/worker/protocol.js +228 -0
  862. package/dist/serve/worker/protocol.js.map +1 -0
  863. package/dist/serve/worker/serve-init.d.ts +201 -0
  864. package/dist/serve/worker/serve-init.d.ts.map +1 -0
  865. package/dist/serve/worker/serve-init.js +579 -0
  866. package/dist/serve/worker/serve-init.js.map +1 -0
  867. package/dist/serve/worker/service-worker-channel.d.ts +23 -0
  868. package/dist/serve/worker/service-worker-channel.d.ts.map +1 -0
  869. package/dist/serve/worker/service-worker-channel.js +9 -0
  870. package/dist/serve/worker/service-worker-channel.js.map +1 -0
  871. package/dist/serve/worker/service-worker-relay.d.ts +22 -0
  872. package/dist/serve/worker/service-worker-relay.d.ts.map +1 -0
  873. package/dist/serve/worker/service-worker-relay.js +63 -0
  874. package/dist/serve/worker/service-worker-relay.js.map +1 -0
  875. package/dist/serve/writer-lock.d.ts +32 -0
  876. package/dist/serve/writer-lock.d.ts.map +1 -0
  877. package/dist/serve/writer-lock.js +43 -0
  878. package/dist/serve/writer-lock.js.map +1 -0
  879. package/dist/verify/cases.d.ts +37 -0
  880. package/dist/verify/cases.d.ts.map +1 -0
  881. package/dist/verify/cases.js +173 -0
  882. package/dist/verify/cases.js.map +1 -0
  883. package/dist/verify/fixture.d.ts +100 -0
  884. package/dist/verify/fixture.d.ts.map +1 -0
  885. package/dist/verify/fixture.js +156 -0
  886. package/dist/verify/fixture.js.map +1 -0
  887. package/dist/verify/index.d.ts +102 -0
  888. package/dist/verify/index.d.ts.map +1 -0
  889. package/dist/verify/index.js +318 -0
  890. package/dist/verify/index.js.map +1 -0
  891. package/dist/verify/tools.d.ts +7 -0
  892. package/dist/verify/tools.d.ts.map +1 -0
  893. package/dist/verify/tools.js +83 -0
  894. package/dist/verify/tools.js.map +1 -0
  895. package/dist/version/compat-target.d.ts +18 -0
  896. package/dist/version/compat-target.d.ts.map +1 -0
  897. package/dist/version/compat-target.js +18 -0
  898. package/dist/version/compat-target.js.map +1 -0
  899. package/dist/vite.d.ts +12 -0
  900. package/dist/vite.d.ts.map +1 -0
  901. package/dist/vite.js +16 -0
  902. package/dist/vite.js.map +1 -0
  903. package/package.json +144 -0
@@ -0,0 +1,3623 @@
1
+ <!DOCTYPE html><html lang="en"> <head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>API reference: pyric/firestore · Pyric Studio</title><meta name="description" content="Published declarations for pyric/firestore."><link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin><link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;700&display=swap" rel="stylesheet"><link rel="stylesheet" href="/__pyric/ui/_astro/_slug_.DPUwShm2.css"></head> <body> <header class="studio__bar"> <div class="studio__bar-inner"> <a class="studio__brand" href="/__pyric/ui/" aria-label="Pyric Studio">Pyric</a> <nav class="studio__nav" aria-label="Studio tabs"> <a class="studio__nav-tab" href="/__pyric/ui/"> Home </a><a class="studio__nav-tab" href="/__pyric/ui/firestore"> Firestore </a><a class="studio__nav-tab" href="/__pyric/ui/auth"> Auth </a><a class="studio__nav-tab" href="/__pyric/ui/rtdb"> RTDB </a><a class="studio__nav-tab" href="/__pyric/ui/storage"> Storage </a><a class="studio__nav-tab" href="/__pyric/ui/traffic"> Traffic </a><a class="studio__nav-tab" href="/__pyric/ui/settings"> Settings </a><a class="studio__nav-tab" href="/__pyric/ui/docs" aria-current="page"> Docs </a> </nav> </div> </header> <div class="docs-shell"> <details class="docs-nav-drawer"> <summary>Navigate</summary> <nav class="docs-nav" aria-label="Documentation"> <div class="docs-search" data-index-url="/__pyric/ui/docs/index.json"> <div class="docs-search-field"> <svg class="docs-search-icon" viewBox="0 0 16 16" width="14" height="14" aria-hidden="true"> <path d="M11.5 11.5 15 15M13 7A6 6 0 1 1 1 7a6 6 0 0 1 12 0Z" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round"></path> </svg> <input type="text" class="docs-search-input" placeholder="Search docs" aria-label="Search docs" autocomplete="off" spellcheck="false"> <kbd class="docs-search-kbd">⌘K</kbd> </div> <ul class="docs-search-results" hidden></ul> </div> <script type="module">let i=null;function d(t){return i||(i=fetch(t).then(e=>e.json())),i}function l(t,e){return t.title.toLowerCase().includes(e)||t.excerpt.toLowerCase().includes(e)?!0:t.headings.some(r=>r.text.toLowerCase().includes(e))}function u(t,e,r){if(e.innerHTML="",t.length===0){e.hidden=!1;{const n=document.createElement("li");n.className="docs-search-empty",n.textContent="No matches",e.appendChild(n)}return}e.hidden=!1;for(const n of t.slice(0,8)){const s=document.createElement("li"),c=document.createElement("a");c.href=n.path;const o=document.createElement("span");o.className="docs-search-result-title",o.textContent=n.title;const a=document.createElement("span");a.className="docs-search-result-meta",a.textContent=[n.group,n.section].filter(Boolean).join(" / "),c.append(o,a),s.appendChild(c),e.appendChild(s)}}document.querySelectorAll(".docs-search").forEach(t=>{const e=t.dataset.indexUrl,r=t.querySelector(".docs-search-input"),n=t.querySelector(".docs-search-results");r.addEventListener("input",async()=>{const s=r.value.trim().toLowerCase();if(!s){n.hidden=!0,n.innerHTML="";return}const{pages:c}=await d(e);r.value.trim().toLowerCase()===s&&u(c.filter(o=>l(o,s)),n)}),r.addEventListener("focus",()=>{d(e),n.childElementCount>0&&(n.hidden=!1)}),r.addEventListener("keydown",s=>{s.key==="Escape"&&(r.value="",n.hidden=!0,n.innerHTML="",r.blur())}),r.addEventListener("blur",()=>{window.setTimeout(()=>{n.hidden=!0},150)})});document.addEventListener("keydown",t=>{if(!(t.metaKey||t.ctrlKey)||t.key.toLowerCase()!=="k")return;const e=[...document.querySelectorAll(".docs-search-input")].find(r=>r.offsetParent!==null);e&&(t.preventDefault(),e.focus(),e.select())});</script> <a class="docs-nav-toplink" href="/__pyric/ui/docs/overview/"> Overview </a><details class="docs-nav-group"> <summary>Get started</summary> <div class="docs-nav-group-body"> <div class="docs-nav-section"> <ul> <li> <a href="/__pyric/ui/docs/get-started/start-building/"> Quickstart </a> </li><li> <a href="/__pyric/ui/docs/get-started/how-the-swap-works/"> How the swap works </a> </li> </ul> </div> </div> </details><details class="docs-nav-group"> <summary>Build</summary> <div class="docs-nav-group-body"> <div class="docs-nav-section"> <ul> <li> <a href="/__pyric/ui/docs/build/authentication/"> Authentication </a> </li><li> <a href="/__pyric/ui/docs/build/cloud-firestore/"> Cloud Firestore </a> </li><li> <a href="/__pyric/ui/docs/build/realtime-database/"> Realtime Database </a> </li><li> <a href="/__pyric/ui/docs/build/cloud-storage/"> Cloud Storage </a> </li><li> <a href="/__pyric/ui/docs/build/cloud-messaging/"> Cloud Messaging </a> </li><li> <a href="/__pyric/ui/docs/build/ai-logic/"> AI Logic </a> </li> </ul> </div> </div> </details><details class="docs-nav-group"> <summary>Secure &amp; debug</summary> <div class="docs-nav-group-body"> <div class="docs-nav-section"> <ul> <li> <a href="/__pyric/ui/docs/secure/secure-it-with-rules/"> Security Rules </a> </li><li> <a href="/__pyric/ui/docs/secure/simulate-and-lint/"> Simulate and lint before you deploy </a> </li><li> <a href="/__pyric/ui/docs/secure/write-a-rules-test-suite/"> Write a rules test suite </a> </li><li> <a href="/__pyric/ui/docs/secure/read-a-denial/"> Read a denial and understand it </a> </li><li> <a href="/__pyric/ui/docs/secure/rules-standard-library/"> The rules standard library </a> </li><li> <a href="/__pyric/ui/docs/secure/rtdb-rules-in-typescript/"> RTDB rules in TypeScript </a> </li><li> <a href="/__pyric/ui/docs/secure/firestore-rules-limits/"> Rules limits </a> </li><li> <a href="/__pyric/ui/docs/secure/audit-your-rules/"> Audit rules and data </a> </li> </ul> </div> </div> </details><details class="docs-nav-group"> <summary>Observe &amp; shape</summary> <div class="docs-nav-group-body"> <div class="docs-nav-section"> <ul> <li> <a href="/__pyric/ui/docs/observe/see-whats-happening/"> Traffic &amp; rule verdicts </a> </li><li> <a href="/__pyric/ui/docs/observe/shape-your-data/"> Seed, snapshot, replay </a> </li> </ul> </div> </div> </details><details class="docs-nav-group"> <summary>Ship &amp; test</summary> <div class="docs-nav-group-body"> <div class="docs-nav-section"> <ul> <li> <a href="/__pyric/ui/docs/ship/ship-to-production/"> Ship to production </a> </li><li> <a href="/__pyric/ui/docs/ship/test-in-node/"> Test in Node </a> </li> </ul> </div> </div> </details><details class="docs-nav-group"> <summary>Work with an agent</summary> <div class="docs-nav-group-body"> <div class="docs-nav-section"> <ul> <li> <a href="/__pyric/ui/docs/agent/set-up-your-agent/"> Connect an agent </a> </li><li> <a href="/__pyric/ui/docs/agent/work-with-an-agent/"> Use the MCP tools </a> </li><li> <a href="/__pyric/ui/docs/agent/watch-and-review/"> Watch in Pyric Studio </a> </li> </ul> </div> </div> </details><a class="docs-nav-toplink" href="/__pyric/ui/docs/trust/versioning-and-compatibility/"> Trust </a><details class="docs-nav-group"> <summary>Conformance</summary> <div class="docs-nav-group-body"> <div class="docs-nav-section"> <ul> <li> <a href="/__pyric/ui/docs/conformance-scores/"> Public API coverage </a> </li><li> <a href="/__pyric/ui/docs/trust/how-we-know-it-matches-firebase/"> How we know it matches Firebase </a> </li><li> <a href="/__pyric/ui/docs/app-compat/"> App </a> </li><li> <a href="/__pyric/ui/docs/ai-compat/"> AI Logic </a> </li><li> <a href="/__pyric/ui/docs/auth-compat/"> Auth </a> </li><li> <a href="/__pyric/ui/docs/firestore-compat/"> Firestore </a> </li><li> <a href="/__pyric/ui/docs/database-compat/"> Realtime Database </a> </li><li> <a href="/__pyric/ui/docs/storage-compat/"> Storage </a> </li><li> <a href="/__pyric/ui/docs/messaging-compat/"> Messaging </a> </li><li> <a href="/__pyric/ui/docs/functions-rtdb-compat/"> Functions · RTDB </a> </li><li> <a href="/__pyric/ui/docs/rules-compat/"> Rules </a> </li> </ul> </div> </div> </details> <details class="docs-nav-group" open> <summary>Reference</summary> <div class="docs-nav-group-body docs-nav-group-body--reference"> <div class="docs-nav-section"> <ul> <li> <a href="/__pyric/ui/docs/api-reference/"> API reference </a> </li> </ul> </div><div class="docs-nav-section"> <h2 class="docs-nav-heading">pyric</h2> <ul> <li> <a href="/__pyric/ui/docs/pyric-app-reference-api/"> pyric/app </a> </li><li> <a href="/__pyric/ui/docs/pyric-firestore-reference-api/" aria-current="page"> pyric/firestore </a> </li><li> <a href="/__pyric/ui/docs/pyric-auth-reference-api/"> pyric/auth </a> </li><li> <a href="/__pyric/ui/docs/pyric-ai-reference-api/"> pyric/ai </a> </li><li> <a href="/__pyric/ui/docs/pyric-ai-scripting-reference-api/"> pyric/ai/scripting </a> </li><li> <a href="/__pyric/ui/docs/pyric-database-reference-api/"> pyric/database </a> </li><li> <a href="/__pyric/ui/docs/pyric-storage-reference-api/"> pyric/storage </a> </li><li> <a href="/__pyric/ui/docs/pyric-messaging-reference-api/"> pyric/messaging </a> </li><li> <a href="/__pyric/ui/docs/pyric-messaging-sw-reference-api/"> pyric/messaging/sw </a> </li><li> <a href="/__pyric/ui/docs/pyric-rules-reference-api/"> pyric/rules </a> </li><li> <a href="/__pyric/ui/docs/pyric-firestore-values-reference-api/"> pyric/firestore-values </a> </li><li> <a href="/__pyric/ui/docs/pyric-sandbox-reference-api/"> pyric/sandbox </a> </li><li> <a href="/__pyric/ui/docs/pyric-sandbox-firestore-reference-api/"> pyric/sandbox/firestore </a> </li><li> <a href="/__pyric/ui/docs/pyric-sandbox-database-reference-api/"> pyric/sandbox/database </a> </li> </ul> </div><div class="docs-nav-section"> <h2 class="docs-nav-heading">pyric-admin</h2> <ul> <li> <a href="/__pyric/ui/docs/pyric-admin-app-reference-api/"> pyric-admin/app </a> </li><li> <a href="/__pyric/ui/docs/pyric-admin-firestore-reference-api/"> pyric-admin/firestore </a> </li><li> <a href="/__pyric/ui/docs/pyric-admin-auth-reference-api/"> pyric-admin/auth </a> </li><li> <a href="/__pyric/ui/docs/pyric-admin-database-reference-api/"> pyric-admin/database </a> </li><li> <a href="/__pyric/ui/docs/pyric-admin-storage-reference-api/"> pyric-admin/storage </a> </li> </ul> </div><div class="docs-nav-section"> <h2 class="docs-nav-heading">create-pyric</h2> <ul> <li> <a href="/__pyric/ui/docs/create-pyric-reference-api/"> create-pyric </a> </li> </ul> </div><div class="docs-nav-section"> <h2 class="docs-nav-heading">@pyric/cli</h2> <ul> <li> <a href="/__pyric/ui/docs/pyric-cli-credentials-node-reference-api/"> @pyric/cli/credentials/node </a> </li><li> <a href="/__pyric/ui/docs/pyric-cli-verify-reference-api/"> @pyric/cli/verify </a> </li><li> <a href="/__pyric/ui/docs/pyric-cli-conformance-reference-api/"> @pyric/cli/conformance </a> </li><li> <a href="/__pyric/ui/docs/pyric-cli-conformance-browser-reference-api/"> @pyric/cli/conformance/browser </a> </li><li> <a href="/__pyric/ui/docs/pyric-cli-assurance-reference-api/"> @pyric/cli/assurance </a> </li><li> <a href="/__pyric/ui/docs/pyric-cli-assurance-browser-reference-api/"> @pyric/cli/assurance/browser </a> </li><li> <a href="/__pyric/ui/docs/pyric-cli-bridge-reference-api/"> @pyric/cli/bridge </a> </li><li> <a href="/__pyric/ui/docs/pyric-cli-bridge-client-reference-api/"> @pyric/cli/bridge/client </a> </li><li> <a href="/__pyric/ui/docs/pyric-cli-discover-reference-api/"> @pyric/cli/discover </a> </li><li> <a href="/__pyric/ui/docs/pyric-cli-vite-reference-api/"> @pyric/cli/vite </a> </li><li> <a href="/__pyric/ui/docs/pyric-cli-serve-worker-reference-api/"> @pyric/cli/serve/worker </a> </li><li> <a href="/__pyric/ui/docs/pyric-cli-remote-reference-api/"> @pyric/cli/remote </a> </li><li> <a href="/__pyric/ui/docs/pyric-cli-register-reference-api/"> @pyric/cli/register </a> </li> </ul> </div><div class="docs-nav-section"> <h2 class="docs-nav-heading">@pyric/ui</h2> <ul> <li> <a href="/__pyric/ui/docs/pyric-ui-auth-reference-api/"> @pyric/ui/auth </a> </li><li> <a href="/__pyric/ui/docs/pyric-ui-auth-hooks-reference-api/"> @pyric/ui/auth/hooks </a> </li><li> <a href="/__pyric/ui/docs/pyric-ui-primitives-reference-api/"> @pyric/ui/primitives </a> </li><li> <a href="/__pyric/ui/docs/pyric-ui-firestore-reference-api/"> @pyric/ui/firestore </a> </li><li> <a href="/__pyric/ui/docs/pyric-ui-firestore-hooks-reference-api/"> @pyric/ui/firestore/hooks </a> </li><li> <a href="/__pyric/ui/docs/pyric-ui-rtdb-reference-api/"> @pyric/ui/rtdb </a> </li><li> <a href="/__pyric/ui/docs/pyric-ui-storage-reference-api/"> @pyric/ui/storage </a> </li><li> <a href="/__pyric/ui/docs/pyric-ui-storage-hooks-reference-api/"> @pyric/ui/storage/hooks </a> </li><li> <a href="/__pyric/ui/docs/pyric-ui-traffic-reference-api/"> @pyric/ui/traffic </a> </li><li> <a href="/__pyric/ui/docs/pyric-ui-traffic-hooks-reference-api/"> @pyric/ui/traffic/hooks </a> </li><li> <a href="/__pyric/ui/docs/pyric-ui-events-reference-api/"> @pyric/ui/events </a> </li><li> <a href="/__pyric/ui/docs/pyric-ui-events-hooks-reference-api/"> @pyric/ui/events/hooks </a> </li><li> <a href="/__pyric/ui/docs/pyric-ui-agents-reference-api/"> @pyric/ui/agents </a> </li><li> <a href="/__pyric/ui/docs/pyric-ui-rules-reference-api/"> @pyric/ui/rules </a> </li><li> <a href="/__pyric/ui/docs/pyric-ui-rules-hooks-reference-api/"> @pyric/ui/rules/hooks </a> </li> </ul> </div> </div> </details> </nav> </details> <nav class="docs-nav" aria-label="Documentation"> <div class="docs-search" data-index-url="/__pyric/ui/docs/index.json"> <div class="docs-search-field"> <svg class="docs-search-icon" viewBox="0 0 16 16" width="14" height="14" aria-hidden="true"> <path d="M11.5 11.5 15 15M13 7A6 6 0 1 1 1 7a6 6 0 0 1 12 0Z" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round"></path> </svg> <input type="text" class="docs-search-input" placeholder="Search docs" aria-label="Search docs" autocomplete="off" spellcheck="false"> <kbd class="docs-search-kbd">⌘K</kbd> </div> <ul class="docs-search-results" hidden></ul> </div> <a class="docs-nav-toplink" href="/__pyric/ui/docs/overview/" id="nav-group-overview"> Overview </a><details class="docs-nav-group" id="nav-group-get-started"> <summary>Get started</summary> <div class="docs-nav-group-body"> <div class="docs-nav-section"> <ul> <li> <a href="/__pyric/ui/docs/get-started/start-building/"> Quickstart </a> </li><li> <a href="/__pyric/ui/docs/get-started/how-the-swap-works/"> How the swap works </a> </li> </ul> </div> </div> </details><details class="docs-nav-group" id="nav-group-build"> <summary>Build</summary> <div class="docs-nav-group-body"> <div class="docs-nav-section"> <ul> <li> <a href="/__pyric/ui/docs/build/authentication/"> Authentication </a> </li><li> <a href="/__pyric/ui/docs/build/cloud-firestore/"> Cloud Firestore </a> </li><li> <a href="/__pyric/ui/docs/build/realtime-database/"> Realtime Database </a> </li><li> <a href="/__pyric/ui/docs/build/cloud-storage/"> Cloud Storage </a> </li><li> <a href="/__pyric/ui/docs/build/cloud-messaging/"> Cloud Messaging </a> </li><li> <a href="/__pyric/ui/docs/build/ai-logic/"> AI Logic </a> </li> </ul> </div> </div> </details><details class="docs-nav-group" id="nav-group-secure-debug"> <summary>Secure &amp; debug</summary> <div class="docs-nav-group-body"> <div class="docs-nav-section"> <ul> <li> <a href="/__pyric/ui/docs/secure/secure-it-with-rules/"> Security Rules </a> </li><li> <a href="/__pyric/ui/docs/secure/simulate-and-lint/"> Simulate and lint before you deploy </a> </li><li> <a href="/__pyric/ui/docs/secure/write-a-rules-test-suite/"> Write a rules test suite </a> </li><li> <a href="/__pyric/ui/docs/secure/read-a-denial/"> Read a denial and understand it </a> </li><li> <a href="/__pyric/ui/docs/secure/rules-standard-library/"> The rules standard library </a> </li><li> <a href="/__pyric/ui/docs/secure/rtdb-rules-in-typescript/"> RTDB rules in TypeScript </a> </li><li> <a href="/__pyric/ui/docs/secure/firestore-rules-limits/"> Rules limits </a> </li><li> <a href="/__pyric/ui/docs/secure/audit-your-rules/"> Audit rules and data </a> </li> </ul> </div> </div> </details><details class="docs-nav-group" id="nav-group-observe-shape"> <summary>Observe &amp; shape</summary> <div class="docs-nav-group-body"> <div class="docs-nav-section"> <ul> <li> <a href="/__pyric/ui/docs/observe/see-whats-happening/"> Traffic &amp; rule verdicts </a> </li><li> <a href="/__pyric/ui/docs/observe/shape-your-data/"> Seed, snapshot, replay </a> </li> </ul> </div> </div> </details><details class="docs-nav-group" id="nav-group-ship-test"> <summary>Ship &amp; test</summary> <div class="docs-nav-group-body"> <div class="docs-nav-section"> <ul> <li> <a href="/__pyric/ui/docs/ship/ship-to-production/"> Ship to production </a> </li><li> <a href="/__pyric/ui/docs/ship/test-in-node/"> Test in Node </a> </li> </ul> </div> </div> </details><details class="docs-nav-group" id="nav-group-work-with-an-agent"> <summary>Work with an agent</summary> <div class="docs-nav-group-body"> <div class="docs-nav-section"> <ul> <li> <a href="/__pyric/ui/docs/agent/set-up-your-agent/"> Connect an agent </a> </li><li> <a href="/__pyric/ui/docs/agent/work-with-an-agent/"> Use the MCP tools </a> </li><li> <a href="/__pyric/ui/docs/agent/watch-and-review/"> Watch in Pyric Studio </a> </li> </ul> </div> </div> </details><a class="docs-nav-toplink" href="/__pyric/ui/docs/trust/versioning-and-compatibility/" id="nav-group-trust"> Trust </a><details class="docs-nav-group" id="nav-group-conformance"> <summary>Conformance</summary> <div class="docs-nav-group-body"> <div class="docs-nav-section"> <ul> <li> <a href="/__pyric/ui/docs/conformance-scores/"> Public API coverage </a> </li><li> <a href="/__pyric/ui/docs/trust/how-we-know-it-matches-firebase/"> How we know it matches Firebase </a> </li><li> <a href="/__pyric/ui/docs/app-compat/"> App </a> </li><li> <a href="/__pyric/ui/docs/ai-compat/"> AI Logic </a> </li><li> <a href="/__pyric/ui/docs/auth-compat/"> Auth </a> </li><li> <a href="/__pyric/ui/docs/firestore-compat/"> Firestore </a> </li><li> <a href="/__pyric/ui/docs/database-compat/"> Realtime Database </a> </li><li> <a href="/__pyric/ui/docs/storage-compat/"> Storage </a> </li><li> <a href="/__pyric/ui/docs/messaging-compat/"> Messaging </a> </li><li> <a href="/__pyric/ui/docs/functions-rtdb-compat/"> Functions · RTDB </a> </li><li> <a href="/__pyric/ui/docs/rules-compat/"> Rules </a> </li> </ul> </div> </div> </details> <details class="docs-nav-group" id="nav-group-reference" open> <summary>Reference</summary> <div class="docs-nav-group-body docs-nav-group-body--reference"> <div class="docs-nav-section"> <ul> <li> <a href="/__pyric/ui/docs/api-reference/"> API reference </a> </li> </ul> </div><div class="docs-nav-section"> <h2 class="docs-nav-heading">pyric</h2> <ul> <li> <a href="/__pyric/ui/docs/pyric-app-reference-api/"> pyric/app </a> </li><li> <a href="/__pyric/ui/docs/pyric-firestore-reference-api/" aria-current="page"> pyric/firestore </a> </li><li> <a href="/__pyric/ui/docs/pyric-auth-reference-api/"> pyric/auth </a> </li><li> <a href="/__pyric/ui/docs/pyric-ai-reference-api/"> pyric/ai </a> </li><li> <a href="/__pyric/ui/docs/pyric-ai-scripting-reference-api/"> pyric/ai/scripting </a> </li><li> <a href="/__pyric/ui/docs/pyric-database-reference-api/"> pyric/database </a> </li><li> <a href="/__pyric/ui/docs/pyric-storage-reference-api/"> pyric/storage </a> </li><li> <a href="/__pyric/ui/docs/pyric-messaging-reference-api/"> pyric/messaging </a> </li><li> <a href="/__pyric/ui/docs/pyric-messaging-sw-reference-api/"> pyric/messaging/sw </a> </li><li> <a href="/__pyric/ui/docs/pyric-rules-reference-api/"> pyric/rules </a> </li><li> <a href="/__pyric/ui/docs/pyric-firestore-values-reference-api/"> pyric/firestore-values </a> </li><li> <a href="/__pyric/ui/docs/pyric-sandbox-reference-api/"> pyric/sandbox </a> </li><li> <a href="/__pyric/ui/docs/pyric-sandbox-firestore-reference-api/"> pyric/sandbox/firestore </a> </li><li> <a href="/__pyric/ui/docs/pyric-sandbox-database-reference-api/"> pyric/sandbox/database </a> </li> </ul> </div><div class="docs-nav-section"> <h2 class="docs-nav-heading">pyric-admin</h2> <ul> <li> <a href="/__pyric/ui/docs/pyric-admin-app-reference-api/"> pyric-admin/app </a> </li><li> <a href="/__pyric/ui/docs/pyric-admin-firestore-reference-api/"> pyric-admin/firestore </a> </li><li> <a href="/__pyric/ui/docs/pyric-admin-auth-reference-api/"> pyric-admin/auth </a> </li><li> <a href="/__pyric/ui/docs/pyric-admin-database-reference-api/"> pyric-admin/database </a> </li><li> <a href="/__pyric/ui/docs/pyric-admin-storage-reference-api/"> pyric-admin/storage </a> </li> </ul> </div><div class="docs-nav-section"> <h2 class="docs-nav-heading">create-pyric</h2> <ul> <li> <a href="/__pyric/ui/docs/create-pyric-reference-api/"> create-pyric </a> </li> </ul> </div><div class="docs-nav-section"> <h2 class="docs-nav-heading">@pyric/cli</h2> <ul> <li> <a href="/__pyric/ui/docs/pyric-cli-credentials-node-reference-api/"> @pyric/cli/credentials/node </a> </li><li> <a href="/__pyric/ui/docs/pyric-cli-verify-reference-api/"> @pyric/cli/verify </a> </li><li> <a href="/__pyric/ui/docs/pyric-cli-conformance-reference-api/"> @pyric/cli/conformance </a> </li><li> <a href="/__pyric/ui/docs/pyric-cli-conformance-browser-reference-api/"> @pyric/cli/conformance/browser </a> </li><li> <a href="/__pyric/ui/docs/pyric-cli-assurance-reference-api/"> @pyric/cli/assurance </a> </li><li> <a href="/__pyric/ui/docs/pyric-cli-assurance-browser-reference-api/"> @pyric/cli/assurance/browser </a> </li><li> <a href="/__pyric/ui/docs/pyric-cli-bridge-reference-api/"> @pyric/cli/bridge </a> </li><li> <a href="/__pyric/ui/docs/pyric-cli-bridge-client-reference-api/"> @pyric/cli/bridge/client </a> </li><li> <a href="/__pyric/ui/docs/pyric-cli-discover-reference-api/"> @pyric/cli/discover </a> </li><li> <a href="/__pyric/ui/docs/pyric-cli-vite-reference-api/"> @pyric/cli/vite </a> </li><li> <a href="/__pyric/ui/docs/pyric-cli-serve-worker-reference-api/"> @pyric/cli/serve/worker </a> </li><li> <a href="/__pyric/ui/docs/pyric-cli-remote-reference-api/"> @pyric/cli/remote </a> </li><li> <a href="/__pyric/ui/docs/pyric-cli-register-reference-api/"> @pyric/cli/register </a> </li> </ul> </div><div class="docs-nav-section"> <h2 class="docs-nav-heading">@pyric/ui</h2> <ul> <li> <a href="/__pyric/ui/docs/pyric-ui-auth-reference-api/"> @pyric/ui/auth </a> </li><li> <a href="/__pyric/ui/docs/pyric-ui-auth-hooks-reference-api/"> @pyric/ui/auth/hooks </a> </li><li> <a href="/__pyric/ui/docs/pyric-ui-primitives-reference-api/"> @pyric/ui/primitives </a> </li><li> <a href="/__pyric/ui/docs/pyric-ui-firestore-reference-api/"> @pyric/ui/firestore </a> </li><li> <a href="/__pyric/ui/docs/pyric-ui-firestore-hooks-reference-api/"> @pyric/ui/firestore/hooks </a> </li><li> <a href="/__pyric/ui/docs/pyric-ui-rtdb-reference-api/"> @pyric/ui/rtdb </a> </li><li> <a href="/__pyric/ui/docs/pyric-ui-storage-reference-api/"> @pyric/ui/storage </a> </li><li> <a href="/__pyric/ui/docs/pyric-ui-storage-hooks-reference-api/"> @pyric/ui/storage/hooks </a> </li><li> <a href="/__pyric/ui/docs/pyric-ui-traffic-reference-api/"> @pyric/ui/traffic </a> </li><li> <a href="/__pyric/ui/docs/pyric-ui-traffic-hooks-reference-api/"> @pyric/ui/traffic/hooks </a> </li><li> <a href="/__pyric/ui/docs/pyric-ui-events-reference-api/"> @pyric/ui/events </a> </li><li> <a href="/__pyric/ui/docs/pyric-ui-events-hooks-reference-api/"> @pyric/ui/events/hooks </a> </li><li> <a href="/__pyric/ui/docs/pyric-ui-agents-reference-api/"> @pyric/ui/agents </a> </li><li> <a href="/__pyric/ui/docs/pyric-ui-rules-reference-api/"> @pyric/ui/rules </a> </li><li> <a href="/__pyric/ui/docs/pyric-ui-rules-hooks-reference-api/"> @pyric/ui/rules/hooks </a> </li> </ul> </div> </div> </details> </nav> <main class="doc-main"> <nav class="docs-breadcrumbs" aria-label="Breadcrumb"> <ol> <li> <a href="/__pyric/ui/docs/api-reference/">API reference</a> </li><li> <span class="docs-breadcrumbs-sep" aria-hidden="true">/</span> <span>pyric</span> </li><li> <span class="docs-breadcrumbs-sep" aria-hidden="true">/</span> <span aria-current="page">pyric/firestore</span> </li> </ol> </nav> <header class="api-reference-header"> <p class="api-reference-kicker">API reference</p> <h1><code>pyric/firestore</code></h1> <p class="api-reference-meta"> 110 published symbols from <code>pyric</code> </p> <p class="api-reference-source">
2
+ Generated from the TypeScript declarations shipped at this import path.
3
+ </p> <a class="api-reference-evidence" href="/__pyric/ui/docs/firestore-compat/">
4
+ Check behavioral conformance
5
+ </a> </header> <article class="prose api-reference-body"> <!-- Generated from published package declarations via TypeDoc. Do not edit by hand; run bun run docs:api:generate. -->
6
+ <h2 id="classes">Classes</h2>
7
+ <p><a id="bytes"></a></p>
8
+ <h3 id="bytes">Bytes</h3>
9
+ <h4 id="methods">Methods</h4>
10
+ <p><a id="isequal"></a></p>
11
+ <h5 id="isequal">isEqual()</h5>
12
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#61AFEF">isEqual</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">other</span><span style="color:#ABB2BF">: </span><span style="color:#E06C75">Bytes</span><span style="color:#ABB2BF">): </span><span style="color:#E06C75">boolean</span><span style="color:#ABB2BF">;</span></span></code></pre>
13
+ <h6 id="parameters">Parameters</h6>
14
+ <div class="table-scroll">
15
+
16
+
17
+
18
+
19
+
20
+
21
+
22
+
23
+
24
+
25
+
26
+
27
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>other</code></td><td align="left"><a href="#bytes"><code>Bytes</code></a></td></tr></tbody></table></div>
28
+ <h6 id="returns">Returns</h6>
29
+ <p><code>boolean</code></p>
30
+ <p><a id="tobase64"></a></p>
31
+ <h5 id="tobase64">toBase64()</h5>
32
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#61AFEF">toBase64</span><span style="color:#ABB2BF">(): </span><span style="color:#E06C75">string</span><span style="color:#ABB2BF">;</span></span></code></pre>
33
+ <h6 id="returns-1">Returns</h6>
34
+ <p><code>string</code></p>
35
+ <p><a id="tojson"></a></p>
36
+ <h5 id="tojson">toJSON()</h5>
37
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#61AFEF">toJSON</span><span style="color:#ABB2BF">(): </span><span style="color:#E06C75">object</span><span style="color:#ABB2BF">;</span></span></code></pre>
38
+ <h6 id="returns-2">Returns</h6>
39
+ <p><code>object</code></p>
40
+ <p><a id="tostring"></a></p>
41
+ <h5 id="tostring">toString()</h5>
42
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#61AFEF">toString</span><span style="color:#ABB2BF">(): </span><span style="color:#E06C75">string</span><span style="color:#ABB2BF">;</span></span></code></pre>
43
+ <h6 id="returns-3">Returns</h6>
44
+ <p><code>string</code></p>
45
+ <p><a id="touint8array"></a></p>
46
+ <h5 id="touint8array">toUint8Array()</h5>
47
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#61AFEF">toUint8Array</span><span style="color:#ABB2BF">(): </span><span style="color:#E06C75">Uint8Array</span><span style="color:#ABB2BF">;</span></span></code></pre>
48
+ <h6 id="returns-4">Returns</h6>
49
+ <p><code>Uint8Array</code></p>
50
+ <p><a id="frombase64string"></a></p>
51
+ <h5 id="frombase64string">fromBase64String()</h5>
52
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#E06C75">static</span><span style="color:#61AFEF"> fromBase64String</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">base64</span><span style="color:#ABB2BF">: </span><span style="color:#E06C75">string</span><span style="color:#ABB2BF">): </span><span style="color:#E06C75">Bytes</span><span style="color:#ABB2BF">;</span></span></code></pre>
53
+ <h6 id="parameters-1">Parameters</h6>
54
+ <div class="table-scroll">
55
+
56
+
57
+
58
+
59
+
60
+
61
+
62
+
63
+
64
+
65
+
66
+
67
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>base64</code></td><td align="left"><code>string</code></td></tr></tbody></table></div>
68
+ <h6 id="returns-5">Returns</h6>
69
+ <p><a href="#bytes"><code>Bytes</code></a></p>
70
+ <p><a id="fromjson"></a></p>
71
+ <h5 id="fromjson">fromJSON()</h5>
72
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#E06C75">static</span><span style="color:#61AFEF"> fromJSON</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">json</span><span style="color:#ABB2BF">: </span><span style="color:#E06C75">object</span><span style="color:#ABB2BF">): </span><span style="color:#E06C75">Bytes</span><span style="color:#ABB2BF">;</span></span></code></pre>
73
+ <h6 id="parameters-2">Parameters</h6>
74
+ <div class="table-scroll">
75
+
76
+
77
+
78
+
79
+
80
+
81
+
82
+
83
+
84
+
85
+
86
+
87
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>json</code></td><td align="left"><code>object</code></td></tr></tbody></table></div>
88
+ <h6 id="returns-6">Returns</h6>
89
+ <p><a href="#bytes"><code>Bytes</code></a></p>
90
+ <p><a id="fromuint8array"></a></p>
91
+ <h5 id="fromuint8array">fromUint8Array()</h5>
92
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#E06C75">static</span><span style="color:#61AFEF"> fromUint8Array</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">array</span><span style="color:#ABB2BF">: </span><span style="color:#E06C75">Uint8Array</span><span style="color:#ABB2BF">): </span><span style="color:#E06C75">Bytes</span><span style="color:#ABB2BF">;</span></span></code></pre>
93
+ <h6 id="parameters-3">Parameters</h6>
94
+ <div class="table-scroll">
95
+
96
+
97
+
98
+
99
+
100
+
101
+
102
+
103
+
104
+
105
+
106
+
107
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>array</code></td><td align="left"><code>Uint8Array</code></td></tr></tbody></table></div>
108
+ <h6 id="returns-7">Returns</h6>
109
+ <p><a href="#bytes"><code>Bytes</code></a></p>
110
+ <hr>
111
+ <p><a id="fieldpath"></a></p>
112
+ <h3 id="fieldpath">FieldPath</h3>
113
+ <h4 id="constructors">Constructors</h4>
114
+ <p><a id="constructor"></a></p>
115
+ <h5 id="constructor">Constructor</h5>
116
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">new</span><span style="color:#61AFEF"> FieldPath</span><span style="color:#ABB2BF">(...</span><span style="color:#E06C75">fieldNames</span><span style="color:#ABB2BF">: </span><span style="color:#E06C75">string</span><span style="color:#ABB2BF">[]): </span><span style="color:#E06C75">FieldPath</span><span style="color:#ABB2BF">;</span></span></code></pre>
117
+ <h6 id="parameters-4">Parameters</h6>
118
+ <div class="table-scroll">
119
+
120
+
121
+
122
+
123
+
124
+
125
+
126
+
127
+
128
+
129
+
130
+
131
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left">…<code>fieldNames</code></td><td align="left"><code>string</code>[]</td></tr></tbody></table></div>
132
+ <h6 id="returns-8">Returns</h6>
133
+ <p><a href="#fieldpath"><code>FieldPath</code></a></p>
134
+ <h4 id="methods-1">Methods</h4>
135
+ <p><a id="isequal-2"></a></p>
136
+ <h5 id="isequal-1">isEqual()</h5>
137
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#61AFEF">isEqual</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">other</span><span style="color:#ABB2BF">: </span><span style="color:#E06C75">FieldPath</span><span style="color:#ABB2BF">): </span><span style="color:#E06C75">boolean</span><span style="color:#ABB2BF">;</span></span></code></pre>
138
+ <h6 id="parameters-5">Parameters</h6>
139
+ <div class="table-scroll">
140
+
141
+
142
+
143
+
144
+
145
+
146
+
147
+
148
+
149
+
150
+
151
+
152
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>other</code></td><td align="left"><a href="#fieldpath"><code>FieldPath</code></a></td></tr></tbody></table></div>
153
+ <h6 id="returns-9">Returns</h6>
154
+ <p><code>boolean</code></p>
155
+ <hr>
156
+ <p><a id="geopoint"></a></p>
157
+ <h3 id="geopoint">GeoPoint</h3>
158
+ <h4 id="constructors-1">Constructors</h4>
159
+ <p><a id="constructor-1"></a></p>
160
+ <h5 id="constructor-1">Constructor</h5>
161
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">new</span><span style="color:#61AFEF"> GeoPoint</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">lat</span><span style="color:#ABB2BF">: </span><span style="color:#E06C75">number</span><span style="color:#ABB2BF">, </span><span style="color:#E06C75">lng</span><span style="color:#ABB2BF">: </span><span style="color:#E06C75">number</span><span style="color:#ABB2BF">): </span><span style="color:#E06C75">GeoPoint</span><span style="color:#ABB2BF">;</span></span></code></pre>
162
+ <h6 id="parameters-6">Parameters</h6>
163
+ <div class="table-scroll">
164
+
165
+
166
+
167
+
168
+
169
+
170
+
171
+
172
+
173
+
174
+
175
+
176
+
177
+
178
+
179
+
180
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>lat</code></td><td align="left"><code>number</code></td></tr><tr><td align="left"><code>lng</code></td><td align="left"><code>number</code></td></tr></tbody></table></div>
181
+ <h6 id="returns-10">Returns</h6>
182
+ <p><a href="#geopoint"><code>GeoPoint</code></a></p>
183
+ <h4 id="accessors">Accessors</h4>
184
+ <p><a id="latitude"></a></p>
185
+ <h5 id="latitude">latitude</h5>
186
+ <h6 id="get-signature">Get Signature</h6>
187
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#E06C75">get</span><span style="color:#61AFEF"> latitude</span><span style="color:#ABB2BF">(): </span><span style="color:#E06C75">number</span><span style="color:#ABB2BF">;</span></span></code></pre>
188
+ <h6 id="returns-11">Returns</h6>
189
+ <p><code>number</code></p>
190
+ <p><a id="longitude"></a></p>
191
+ <h5 id="longitude">longitude</h5>
192
+ <h6 id="get-signature-1">Get Signature</h6>
193
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#E06C75">get</span><span style="color:#61AFEF"> longitude</span><span style="color:#ABB2BF">(): </span><span style="color:#E06C75">number</span><span style="color:#ABB2BF">;</span></span></code></pre>
194
+ <h6 id="returns-12">Returns</h6>
195
+ <p><code>number</code></p>
196
+ <h4 id="methods-2">Methods</h4>
197
+ <p><a id="isequal-4"></a></p>
198
+ <h5 id="isequal-2">isEqual()</h5>
199
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#61AFEF">isEqual</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">other</span><span style="color:#ABB2BF">: </span><span style="color:#E06C75">GeoPoint</span><span style="color:#ABB2BF">): </span><span style="color:#E06C75">boolean</span><span style="color:#ABB2BF">;</span></span></code></pre>
200
+ <h6 id="parameters-7">Parameters</h6>
201
+ <div class="table-scroll">
202
+
203
+
204
+
205
+
206
+
207
+
208
+
209
+
210
+
211
+
212
+
213
+
214
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>other</code></td><td align="left"><a href="#geopoint"><code>GeoPoint</code></a></td></tr></tbody></table></div>
215
+ <h6 id="returns-13">Returns</h6>
216
+ <p><code>boolean</code></p>
217
+ <p><a id="tojson-2"></a></p>
218
+ <h5 id="tojson-1">toJSON()</h5>
219
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#61AFEF">toJSON</span><span style="color:#ABB2BF">(): {</span></span>
220
+ <span class="line"><span style="color:#E06C75"> latitude</span><span style="color:#ABB2BF">: </span><span style="color:#E06C75">number</span><span style="color:#ABB2BF">;</span></span>
221
+ <span class="line"><span style="color:#E06C75"> longitude</span><span style="color:#ABB2BF">: </span><span style="color:#E06C75">number</span><span style="color:#ABB2BF">;</span></span>
222
+ <span class="line"><span style="color:#E06C75"> type</span><span style="color:#ABB2BF">: </span><span style="color:#E06C75">string</span><span style="color:#ABB2BF">;</span></span>
223
+ <span class="line"><span style="color:#ABB2BF">};</span></span></code></pre>
224
+ <h6 id="returns-14">Returns</h6>
225
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#ABB2BF">{</span></span>
226
+ <span class="line"><span style="color:#E06C75"> latitude</span><span style="color:#ABB2BF">: </span><span style="color:#E06C75">number</span><span style="color:#ABB2BF">;</span></span>
227
+ <span class="line"><span style="color:#E06C75"> longitude</span><span style="color:#ABB2BF">: </span><span style="color:#E06C75">number</span><span style="color:#ABB2BF">;</span></span>
228
+ <span class="line"><span style="color:#E06C75"> type</span><span style="color:#ABB2BF">: </span><span style="color:#E06C75">string</span><span style="color:#ABB2BF">;</span></span>
229
+ <span class="line"><span style="color:#ABB2BF">}</span></span></code></pre>
230
+ <h6 id="latitude-1">latitude</h6>
231
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#E06C75">latitude</span><span style="color:#ABB2BF">: </span><span style="color:#E06C75">number</span><span style="color:#ABB2BF">;</span></span></code></pre>
232
+ <h6 id="longitude-1">longitude</h6>
233
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#E06C75">longitude</span><span style="color:#ABB2BF">: </span><span style="color:#E06C75">number</span><span style="color:#ABB2BF">;</span></span></code></pre>
234
+ <h6 id="type">type</h6>
235
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#E06C75">type</span><span style="color:#ABB2BF">: </span><span style="color:#E06C75">string</span><span style="color:#ABB2BF">;</span></span></code></pre>
236
+ <p><a id="fromjson-2"></a></p>
237
+ <h5 id="fromjson-1">fromJSON()</h5>
238
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#E06C75">static</span><span style="color:#61AFEF"> fromJSON</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">json</span><span style="color:#ABB2BF">: </span><span style="color:#E06C75">object</span><span style="color:#ABB2BF">): </span><span style="color:#E06C75">GeoPoint</span><span style="color:#ABB2BF">;</span></span></code></pre>
239
+ <h6 id="parameters-8">Parameters</h6>
240
+ <div class="table-scroll">
241
+
242
+
243
+
244
+
245
+
246
+
247
+
248
+
249
+
250
+
251
+
252
+
253
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>json</code></td><td align="left"><code>object</code></td></tr></tbody></table></div>
254
+ <h6 id="returns-15">Returns</h6>
255
+ <p><a href="#geopoint"><code>GeoPoint</code></a></p>
256
+ <hr>
257
+ <p><a id="vectorvalue"></a></p>
258
+ <h3 id="vectorvalue">VectorValue</h3>
259
+ <h4 id="methods-3">Methods</h4>
260
+ <p><a id="isequal-6"></a></p>
261
+ <h5 id="isequal-3">isEqual()</h5>
262
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#61AFEF">isEqual</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">other</span><span style="color:#ABB2BF">: </span><span style="color:#E06C75">VectorValue</span><span style="color:#ABB2BF">): </span><span style="color:#E06C75">boolean</span><span style="color:#ABB2BF">;</span></span></code></pre>
263
+ <h6 id="parameters-9">Parameters</h6>
264
+ <div class="table-scroll">
265
+
266
+
267
+
268
+
269
+
270
+
271
+
272
+
273
+
274
+
275
+
276
+
277
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>other</code></td><td align="left"><a href="#vectorvalue"><code>VectorValue</code></a></td></tr></tbody></table></div>
278
+ <h6 id="returns-16">Returns</h6>
279
+ <p><code>boolean</code></p>
280
+ <p><a id="toarray"></a></p>
281
+ <h5 id="toarray">toArray()</h5>
282
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#61AFEF">toArray</span><span style="color:#ABB2BF">(): </span><span style="color:#E06C75">number</span><span style="color:#ABB2BF">[];</span></span></code></pre>
283
+ <h6 id="returns-17">Returns</h6>
284
+ <p><code>number</code>[]</p>
285
+ <p><a id="tojson-4"></a></p>
286
+ <h5 id="tojson-2">toJSON()</h5>
287
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#61AFEF">toJSON</span><span style="color:#ABB2BF">(): </span><span style="color:#E06C75">object</span><span style="color:#ABB2BF">;</span></span></code></pre>
288
+ <h6 id="returns-18">Returns</h6>
289
+ <p><code>object</code></p>
290
+ <p><a id="create"></a></p>
291
+ <h5 id="create">create()</h5>
292
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#E06C75">static</span><span style="color:#61AFEF"> create</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">values</span><span style="color:#ABB2BF">: </span><span style="color:#E06C75">number</span><span style="color:#ABB2BF">[]): </span><span style="color:#E06C75">VectorValue</span><span style="color:#ABB2BF">;</span></span></code></pre>
293
+ <h6 id="parameters-10">Parameters</h6>
294
+ <div class="table-scroll">
295
+
296
+
297
+
298
+
299
+
300
+
301
+
302
+
303
+
304
+
305
+
306
+
307
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>values</code></td><td align="left"><code>number</code>[]</td></tr></tbody></table></div>
308
+ <h6 id="returns-19">Returns</h6>
309
+ <p><a href="#vectorvalue"><code>VectorValue</code></a></p>
310
+ <p><a id="fromjson-4"></a></p>
311
+ <h5 id="fromjson-2">fromJSON()</h5>
312
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#E06C75">static</span><span style="color:#61AFEF"> fromJSON</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">json</span><span style="color:#ABB2BF">: </span><span style="color:#E06C75">object</span><span style="color:#ABB2BF">): </span><span style="color:#E06C75">VectorValue</span><span style="color:#ABB2BF">;</span></span></code></pre>
313
+ <h6 id="parameters-11">Parameters</h6>
314
+ <div class="table-scroll">
315
+
316
+
317
+
318
+
319
+
320
+
321
+
322
+
323
+
324
+
325
+
326
+
327
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>json</code></td><td align="left"><code>object</code></td></tr></tbody></table></div>
328
+ <h6 id="returns-20">Returns</h6>
329
+ <p><a href="#vectorvalue"><code>VectorValue</code></a></p>
330
+ <h2 id="interfaces">Interfaces</h2>
331
+ <p><a id="aggregatequerysnapshot"></a></p>
332
+ <h3 id="aggregatequerysnapshot">AggregateQuerySnapshot</h3>
333
+ <p>Snapshot returned by <code>getCountFromServer</code> /
334
+ <code>getAggregateFromServer</code>. <code>.data()</code> returns the computed numbers
335
+ keyed by the spec’s aliases (or <code>{ count: number }</code> for the
336
+ count-only entry point).</p>
337
+ <h4 id="type-parameters">Type Parameters</h4>
338
+ <div class="table-scroll">
339
+
340
+
341
+
342
+
343
+
344
+
345
+
346
+
347
+
348
+
349
+
350
+
351
+ <table><thead><tr><th align="left">Type Parameter</th><th align="left">Default type</th></tr></thead><tbody><tr><td align="left"><code>T</code> <em>extends</em> <code>Record</code>&#x3C;<code>string</code>, <code>number</code> | <code>null</code>></td><td align="left"><code>Record</code>&#x3C;<code>string</code>, <code>number</code> | <code>null</code>></td></tr></tbody></table></div>
352
+ <h4 id="methods-4">Methods</h4>
353
+ <p><a id="data"></a></p>
354
+ <h5 id="data">data()</h5>
355
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#61AFEF">data</span><span style="color:#ABB2BF">(): </span><span style="color:#E5C07B">T</span><span style="color:#ABB2BF">;</span></span></code></pre>
356
+ <h6 id="returns-21">Returns</h6>
357
+ <p><code>T</code></p>
358
+ <hr>
359
+ <p><a id="collectionreference"></a></p>
360
+ <h3 id="collectionreference">CollectionReference</h3>
361
+ <p>A reference to a Firestore collection. Backend-opaque.</p>
362
+ <h4 id="type-parameters-1">Type Parameters</h4>
363
+ <div class="table-scroll">
364
+
365
+
366
+
367
+
368
+
369
+
370
+
371
+
372
+
373
+
374
+
375
+
376
+ <table><thead><tr><th align="left">Type Parameter</th><th align="left">Default type</th></tr></thead><tbody><tr><td align="left"><code>_T</code></td><td align="left"><a href="#authstate"><code>AuthState</code></a></td></tr></tbody></table></div>
377
+ <h4 id="properties">Properties</h4>
378
+ <div class="table-scroll">
379
+
380
+
381
+
382
+
383
+
384
+
385
+
386
+
387
+
388
+
389
+
390
+
391
+
392
+
393
+
394
+
395
+
396
+
397
+
398
+ <table><thead><tr><th align="left">Property</th><th align="left">Modifier</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><a id="id"></a> <code>id</code></td><td align="left"><code>readonly</code></td><td align="left"><code>string</code></td></tr><tr><td align="left"><a id="path"></a> <code>path</code></td><td align="left"><code>readonly</code></td><td align="left"><code>string</code></td></tr></tbody></table></div>
399
+ <hr>
400
+ <p><a id="documentreference"></a></p>
401
+ <h3 id="documentreference">DocumentReference</h3>
402
+ <p>A reference to a Firestore document. Backend-opaque.</p>
403
+ <h4 id="type-parameters-2">Type Parameters</h4>
404
+ <div class="table-scroll">
405
+
406
+
407
+
408
+
409
+
410
+
411
+
412
+
413
+
414
+
415
+
416
+
417
+ <table><thead><tr><th align="left">Type Parameter</th><th align="left">Default type</th></tr></thead><tbody><tr><td align="left"><code>_T</code></td><td align="left"><a href="#authstate"><code>AuthState</code></a></td></tr></tbody></table></div>
418
+ <h4 id="properties-1">Properties</h4>
419
+ <div class="table-scroll">
420
+
421
+
422
+
423
+
424
+
425
+
426
+
427
+
428
+
429
+
430
+
431
+
432
+
433
+
434
+
435
+
436
+
437
+
438
+
439
+ <table><thead><tr><th align="left">Property</th><th align="left">Modifier</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><a id="id-1"></a> <code>id</code></td><td align="left"><code>readonly</code></td><td align="left"><code>string</code></td></tr><tr><td align="left"><a id="path-1"></a> <code>path</code></td><td align="left"><code>readonly</code></td><td align="left"><code>string</code></td></tr></tbody></table></div>
440
+ <hr>
441
+ <p><a id="documentsnapshot"></a></p>
442
+ <h3 id="documentsnapshot">DocumentSnapshot</h3>
443
+ <p>A point-in-time view of one document.</p>
444
+ <h4 id="extended-by">Extended by</h4>
445
+ <ul>
446
+ <li><a href="#querydocumentsnapshot"><code>QueryDocumentSnapshot</code></a></li>
447
+ </ul>
448
+ <h4 id="type-parameters-3">Type Parameters</h4>
449
+ <div class="table-scroll">
450
+
451
+
452
+
453
+
454
+
455
+
456
+
457
+
458
+
459
+
460
+
461
+
462
+ <table><thead><tr><th align="left">Type Parameter</th><th align="left">Default type</th></tr></thead><tbody><tr><td align="left"><code>T</code></td><td align="left"><a href="#authstate"><code>AuthState</code></a></td></tr></tbody></table></div>
463
+ <h4 id="properties-2">Properties</h4>
464
+ <div class="table-scroll">
465
+
466
+
467
+
468
+
469
+
470
+
471
+
472
+
473
+
474
+
475
+
476
+
477
+
478
+
479
+
480
+
481
+
482
+
483
+
484
+ <table><thead><tr><th align="left">Property</th><th align="left">Modifier</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><a id="exists"></a> <code>exists</code></td><td align="left"><code>readonly</code></td><td align="left"><code>boolean</code> | () => <code>boolean</code></td></tr><tr><td align="left"><a id="id-2"></a> <code>id</code></td><td align="left"><code>readonly</code></td><td align="left"><code>string</code></td></tr></tbody></table></div>
485
+ <h4 id="methods-5">Methods</h4>
486
+ <p><a id="data-2"></a></p>
487
+ <h5 id="data-1">data()</h5>
488
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#61AFEF">data</span><span style="color:#ABB2BF">(): </span><span style="color:#E5C07B">T</span><span style="color:#ABB2BF">;</span></span></code></pre>
489
+ <h6 id="returns-22">Returns</h6>
490
+ <p><code>T</code></p>
491
+ <hr>
492
+ <p><a id="firestore"></a></p>
493
+ <h3 id="firestore">Firestore</h3>
494
+ <p>Opaque sandbox handle carrying its owner via <a href="#target_symbol-1">TARGET_SYMBOL</a>.</p>
495
+ <h4 id="properties-3">Properties</h4>
496
+ <div class="table-scroll">
497
+
498
+
499
+
500
+
501
+
502
+
503
+
504
+
505
+
506
+
507
+
508
+
509
+
510
+
511
+
512
+
513
+
514
+
515
+
516
+ <table><thead><tr><th align="left">Property</th><th align="left">Modifier</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><a id="target_symbol"></a> <code>[TARGET_SYMBOL]</code></td><td align="left"><code>readonly</code></td><td align="left"><code>Target</code></td></tr><tr><td align="left"><a id="app"></a> <code>app?</code></td><td align="left"><code>readonly</code></td><td align="left"><code>FirebaseApp</code></td></tr></tbody></table></div>
517
+ <hr>
518
+ <p><a id="firestoredataconverter"></a></p>
519
+ <h3 id="firestoredataconverter">FirestoreDataConverter</h3>
520
+ <p>Pair of translators between the consumer’s app model and the
521
+ underlying Firestore representation. Mirrors <code>firebase/firestore</code>’s
522
+ <code>FirestoreDataConverter</code> shape.</p>
523
+ <ul>
524
+ <li><code>toFirestore(model)</code> runs on every write (<code>setDoc</code>, <code>addDoc</code>)
525
+ through a converted ref. Returns the <code>DocumentData</code> to send.</li>
526
+ <li><code>fromFirestore(snapshot)</code> runs on every read (<code>getDoc</code>,
527
+ <code>getDocs</code>, snapshot listener callback) through a converted ref.
528
+ Receives the raw snapshot, returns the typed model.</li>
529
+ </ul>
530
+ <h4 id="type-parameters-4">Type Parameters</h4>
531
+ <div class="table-scroll">
532
+
533
+
534
+
535
+
536
+
537
+
538
+
539
+
540
+
541
+
542
+
543
+
544
+
545
+
546
+
547
+
548
+ <table><thead><tr><th align="left">Type Parameter</th><th align="left">Default type</th></tr></thead><tbody><tr><td align="left"><code>AppModelType</code></td><td align="left">-</td></tr><tr><td align="left"><code>DbModelType</code> <em>extends</em> <a href="#authstate"><code>AuthState</code></a></td><td align="left"><a href="#authstate"><code>AuthState</code></a></td></tr></tbody></table></div>
549
+ <h4 id="methods-6">Methods</h4>
550
+ <p><a id="fromfirestore"></a></p>
551
+ <h5 id="fromfirestore">fromFirestore()</h5>
552
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#61AFEF">fromFirestore</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">snapshot</span><span style="color:#ABB2BF">: </span><span style="color:#E06C75">QueryDocumentSnapshot</span><span style="color:#56B6C2">&#x3C;</span><span style="color:#E06C75">DbModelType</span><span style="color:#56B6C2">></span><span style="color:#ABB2BF">): </span><span style="color:#E06C75">AppModelType</span><span style="color:#ABB2BF">;</span></span></code></pre>
553
+ <h6 id="parameters-12">Parameters</h6>
554
+ <div class="table-scroll">
555
+
556
+
557
+
558
+
559
+
560
+
561
+
562
+
563
+
564
+
565
+
566
+
567
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>snapshot</code></td><td align="left"><a href="#querydocumentsnapshot"><code>QueryDocumentSnapshot</code></a>&#x3C;<code>DbModelType</code>></td></tr></tbody></table></div>
568
+ <h6 id="returns-23">Returns</h6>
569
+ <p><code>AppModelType</code></p>
570
+ <p><a id="tofirestore"></a></p>
571
+ <h5 id="tofirestore">toFirestore()</h5>
572
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#61AFEF">toFirestore</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">modelObject</span><span style="color:#ABB2BF">: </span><span style="color:#E06C75">AppModelType</span><span style="color:#ABB2BF">): </span><span style="color:#E06C75">DbModelType</span><span style="color:#ABB2BF">;</span></span></code></pre>
573
+ <h6 id="parameters-13">Parameters</h6>
574
+ <div class="table-scroll">
575
+
576
+
577
+
578
+
579
+
580
+
581
+
582
+
583
+
584
+
585
+
586
+
587
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>modelObject</code></td><td align="left"><code>AppModelType</code></td></tr></tbody></table></div>
588
+ <h6 id="returns-24">Returns</h6>
589
+ <p><code>DbModelType</code></p>
590
+ <hr>
591
+ <p><a id="firestoredatatooldeps"></a></p>
592
+ <h3 id="firestoredatatooldeps">FirestoreDataToolDeps</h3>
593
+ <h4 id="methods-7">Methods</h4>
594
+ <p><a id="resolvedb"></a></p>
595
+ <h5 id="resolvedb">resolveDb()</h5>
596
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#61AFEF">resolveDb</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">as</span><span style="color:#C678DD">?:</span><span style="color:#E06C75"> As</span><span style="color:#ABB2BF">): </span><span style="color:#E06C75">Firestore</span><span style="color:#56B6C2"> |</span><span style="color:#E5C07B"> Promise</span><span style="color:#56B6C2">&#x3C;</span><span style="color:#E06C75">Firestore</span><span style="color:#56B6C2">></span><span style="color:#ABB2BF">;</span></span></code></pre>
597
+ <p>Resolver returning a <code>Firestore</code> handle. Called per-dispatch with the
598
+ op’s <code>as</code> value: <code>'admin'</code> (or undefined) → an admin-bypass Firestore;
599
+ <code>{ uid, claims? }</code> → a rules-enforcing Firestore acting as that user.</p>
600
+ <p>The host decides the posture; the tool layer does NOT enforce it. A sandbox
601
+ resolver may default to admin (rules bypass is the point of seeding), but a
602
+ resolver wired to a real backend should require an explicit identity or
603
+ confirm-gate admin writes (see the bridge’s prod confirm-policy).</p>
604
+ <h6 id="parameters-14">Parameters</h6>
605
+ <div class="table-scroll">
606
+
607
+
608
+
609
+
610
+
611
+
612
+
613
+
614
+
615
+
616
+
617
+
618
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>as?</code></td><td align="left"><a href="#as"><code>As</code></a></td></tr></tbody></table></div>
619
+ <h6 id="returns-25">Returns</h6>
620
+ <p><a href="#firestore"><code>Firestore</code></a> | <code>Promise</code>&#x3C;<a href="#firestore"><code>Firestore</code></a>></p>
621
+ <hr>
622
+ <p><a id="firestoreinspecttooldeps"></a></p>
623
+ <h3 id="firestoreinspecttooldeps">FirestoreInspectToolDeps</h3>
624
+ <h4 id="methods-8">Methods</h4>
625
+ <p><a id="resolvesandbox"></a></p>
626
+ <h5 id="resolvesandbox">resolveSandbox()</h5>
627
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#61AFEF">resolveSandbox</span><span style="color:#ABB2BF">(): </span><span style="color:#E06C75">any</span><span style="color:#ABB2BF">;</span></span></code></pre>
628
+ <p>Resolve the sandbox whose Firestore state should be inspected.</p>
629
+ <h6 id="returns-26">Returns</h6>
630
+ <p><code>any</code></p>
631
+ <hr>
632
+ <p><a id="firestoresettings"></a></p>
633
+ <h3 id="firestoresettings">FirestoreSettings</h3>
634
+ <p>Client-cache/network settings <code>initializeFirestore</code> accepts but no-ops
635
+ on sandbox targets — see the tier-1 section rationale above.</p>
636
+ <h4 id="properties-4">Properties</h4>
637
+ <div class="table-scroll">
638
+
639
+
640
+
641
+
642
+
643
+
644
+
645
+
646
+
647
+
648
+
649
+
650
+
651
+
652
+
653
+
654
+
655
+
656
+
657
+
658
+
659
+
660
+
661
+
662
+
663
+
664
+
665
+
666
+
667
+
668
+
669
+
670
+
671
+
672
+
673
+
674
+ <table><thead><tr><th align="left">Property</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><a id="cachesizebytes"></a> <code>cacheSizeBytes?</code></td><td align="left"><code>number</code></td></tr><tr><td align="left"><a id="experimentalautodetectlongpolling"></a> <code>experimentalAutoDetectLongPolling?</code></td><td align="left"><code>boolean</code></td></tr><tr><td align="left"><a id="experimentalforcelongpolling"></a> <code>experimentalForceLongPolling?</code></td><td align="left"><code>boolean</code></td></tr><tr><td align="left"><a id="host"></a> <code>host?</code></td><td align="left"><code>string</code></td></tr><tr><td align="left"><a id="ignoreundefinedproperties"></a> <code>ignoreUndefinedProperties?</code></td><td align="left"><code>boolean</code></td></tr><tr><td align="left"><a id="localcache"></a> <code>localCache?</code></td><td align="left"><a href="#localcache-1"><code>LocalCache</code></a></td></tr><tr><td align="left"><a id="ssl"></a> <code>ssl?</code></td><td align="left"><code>boolean</code></td></tr></tbody></table></div>
675
+ <hr>
676
+ <p><a id="localcache-1"></a></p>
677
+ <h3 id="localcache">LocalCache</h3>
678
+ <p>Opaque local-cache config token accepted by <a href="#initializefirestore">initializeFirestore</a>’s
679
+ <code>settings.localCache</code>. Inert — see the tier-1 section rationale above.</p>
680
+ <h4 id="properties-5">Properties</h4>
681
+ <div class="table-scroll">
682
+
683
+
684
+
685
+
686
+
687
+
688
+
689
+
690
+
691
+
692
+
693
+
694
+
695
+
696
+
697
+
698
+
699
+
700
+
701
+
702
+
703
+
704
+
705
+
706
+ <table><thead><tr><th align="left">Property</th><th align="left">Modifier</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><a id="local_cache_symbol"></a> <code>[LOCAL_CACHE_SYMBOL]</code></td><td align="left"><code>readonly</code></td><td align="left"><code>"persistent"</code> | <code>"memory"</code></td></tr><tr><td align="left"><a id="garbagecollector"></a> <code>garbageCollector?</code></td><td align="left"><code>readonly</code></td><td align="left"><a href="#memorygarbagecollector"><code>MemoryGarbageCollector</code></a></td></tr><tr><td align="left"><a id="tabmanager"></a> <code>tabManager?</code></td><td align="left"><code>readonly</code></td><td align="left"><a href="#persistenttabmanager"><code>PersistentTabManager</code></a></td></tr></tbody></table></div>
707
+ <hr>
708
+ <p><a id="memorygarbagecollector"></a></p>
709
+ <h3 id="memorygarbagecollector">MemoryGarbageCollector</h3>
710
+ <p>Opaque garbage-collector config token. Inert for the same reason —
711
+ there is no memory cache tier with GC pressure to tune.</p>
712
+ <h4 id="properties-6">Properties</h4>
713
+ <div class="table-scroll">
714
+
715
+
716
+
717
+
718
+
719
+
720
+
721
+
722
+
723
+
724
+
725
+
726
+
727
+
728
+ <table><thead><tr><th align="left">Property</th><th align="left">Modifier</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><a id="gc_symbol"></a> <code>[GC_SYMBOL]</code></td><td align="left"><code>readonly</code></td><td align="left"><code>"eager"</code> | <code>"lru"</code></td></tr></tbody></table></div>
729
+ <hr>
730
+ <p><a id="persistencesettings"></a></p>
731
+ <h3 id="persistencesettings">PersistenceSettings</h3>
732
+ <h4 id="properties-7">Properties</h4>
733
+ <div class="table-scroll">
734
+
735
+
736
+
737
+
738
+
739
+
740
+
741
+
742
+
743
+
744
+
745
+
746
+ <table><thead><tr><th align="left">Property</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><a id="forceownership"></a> <code>forceOwnership?</code></td><td align="left"><code>boolean</code></td></tr></tbody></table></div>
747
+ <hr>
748
+ <p><a id="persistenttabmanager"></a></p>
749
+ <h3 id="persistenttabmanager">PersistentTabManager</h3>
750
+ <p>Opaque tab-manager config token. Inert — persistence is always on,
751
+ and the SharedWorker/<code>pyric dev</code> path already is the one shared
752
+ store every tab talks to, so there is no separate multi-tab mode
753
+ to opt into. Carries the requested kind only for debugging.</p>
754
+ <h4 id="properties-8">Properties</h4>
755
+ <div class="table-scroll">
756
+
757
+
758
+
759
+
760
+
761
+
762
+
763
+
764
+
765
+
766
+
767
+
768
+
769
+
770
+ <table><thead><tr><th align="left">Property</th><th align="left">Modifier</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><a id="tab_manager_symbol"></a> <code>[TAB_MANAGER_SYMBOL]</code></td><td align="left"><code>readonly</code></td><td align="left"><code>"single"</code> | <code>"multiple"</code></td></tr></tbody></table></div>
771
+ <hr>
772
+ <p><a id="query"></a></p>
773
+ <h3 id="query">Query</h3>
774
+ <p>A Firestore query (a collection ref or one with where/orderBy/limit applied).</p>
775
+ <h4 id="type-parameters-5">Type Parameters</h4>
776
+ <div class="table-scroll">
777
+
778
+
779
+
780
+
781
+
782
+
783
+
784
+
785
+
786
+
787
+
788
+
789
+ <table><thead><tr><th align="left">Type Parameter</th><th align="left">Default type</th></tr></thead><tbody><tr><td align="left"><code>_T</code></td><td align="left"><a href="#authstate"><code>AuthState</code></a></td></tr></tbody></table></div>
790
+ <hr>
791
+ <p><a id="queryconstraint"></a></p>
792
+ <h3 id="queryconstraint">QueryConstraint</h3>
793
+ <h4 id="methods-9">Methods</h4>
794
+ <p><a id="applysandbox"></a></p>
795
+ <h5 id="applysandbox">applySandbox()</h5>
796
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#61AFEF">applySandbox</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">q</span><span style="color:#ABB2BF">: </span><span style="color:#E06C75">ChainQuery</span><span style="color:#ABB2BF">): </span><span style="color:#E06C75">ChainQuery</span><span style="color:#ABB2BF">;</span></span></code></pre>
797
+ <h6 id="parameters-15">Parameters</h6>
798
+ <div class="table-scroll">
799
+
800
+
801
+
802
+
803
+
804
+
805
+
806
+
807
+
808
+
809
+
810
+
811
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>q</code></td><td align="left"><code>ChainQuery</code></td></tr></tbody></table></div>
812
+ <h6 id="returns-27">Returns</h6>
813
+ <p><code>ChainQuery</code></p>
814
+ <hr>
815
+ <p><a id="querydocumentsnapshot"></a></p>
816
+ <h3 id="querydocumentsnapshot">QueryDocumentSnapshot</h3>
817
+ <p><code>QueryDocumentSnapshot</code> is a <code>DocumentSnapshot</code> known to exist —
818
+ <code>.data()</code> always returns the typed model, never <code>undefined</code>. Yielded
819
+ by <code>QuerySnapshot.docs</code> and passed to converter <code>fromFirestore</code>
820
+ callbacks. Mirrors the JS SDK’s narrowing.</p>
821
+ <h4 id="extends">Extends</h4>
822
+ <ul>
823
+ <li><a href="#documentsnapshot"><code>DocumentSnapshot</code></a>&#x3C;<code>T</code>></li>
824
+ </ul>
825
+ <h4 id="type-parameters-6">Type Parameters</h4>
826
+ <div class="table-scroll">
827
+
828
+
829
+
830
+
831
+
832
+
833
+
834
+
835
+
836
+
837
+
838
+
839
+ <table><thead><tr><th align="left">Type Parameter</th><th align="left">Default type</th></tr></thead><tbody><tr><td align="left"><code>T</code></td><td align="left"><a href="#authstate"><code>AuthState</code></a></td></tr></tbody></table></div>
840
+ <h4 id="properties-9">Properties</h4>
841
+ <div class="table-scroll">
842
+
843
+
844
+
845
+
846
+
847
+
848
+
849
+
850
+
851
+
852
+
853
+
854
+
855
+
856
+
857
+
858
+
859
+
860
+
861
+ <table><thead><tr><th align="left">Property</th><th align="left">Modifier</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><a id="exists-1"></a> <code>exists</code></td><td align="left"><code>readonly</code></td><td align="left"><code>boolean</code> | () => <code>boolean</code></td></tr><tr><td align="left"><a id="id-3"></a> <code>id</code></td><td align="left"><code>readonly</code></td><td align="left"><code>string</code></td></tr></tbody></table></div>
862
+ <h4 id="methods-10">Methods</h4>
863
+ <p><a id="data-4"></a></p>
864
+ <h5 id="data-2">data()</h5>
865
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#61AFEF">data</span><span style="color:#ABB2BF">(): </span><span style="color:#E5C07B">T</span><span style="color:#ABB2BF">;</span></span></code></pre>
866
+ <h6 id="returns-28">Returns</h6>
867
+ <p><code>T</code></p>
868
+ <h6 id="overrides">Overrides</h6>
869
+ <p><a href="#documentsnapshot"><code>DocumentSnapshot</code></a>.<a href="#data-2"><code>data</code></a></p>
870
+ <hr>
871
+ <p><a id="querysnapshot"></a></p>
872
+ <h3 id="querysnapshot">QuerySnapshot</h3>
873
+ <p>A point-in-time view of a query result.</p>
874
+ <h4 id="type-parameters-7">Type Parameters</h4>
875
+ <div class="table-scroll">
876
+
877
+
878
+
879
+
880
+
881
+
882
+
883
+
884
+
885
+
886
+
887
+
888
+ <table><thead><tr><th align="left">Type Parameter</th><th align="left">Default type</th></tr></thead><tbody><tr><td align="left"><code>T</code></td><td align="left"><a href="#authstate"><code>AuthState</code></a></td></tr></tbody></table></div>
889
+ <h4 id="properties-10">Properties</h4>
890
+ <div class="table-scroll">
891
+
892
+
893
+
894
+
895
+
896
+
897
+
898
+
899
+
900
+
901
+
902
+
903
+
904
+
905
+
906
+
907
+
908
+
909
+
910
+
911
+
912
+
913
+
914
+
915
+ <table><thead><tr><th align="left">Property</th><th align="left">Modifier</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><a id="docs"></a> <code>docs</code></td><td align="left"><code>readonly</code></td><td align="left">readonly <a href="#querydocumentsnapshot"><code>QueryDocumentSnapshot</code></a>&#x3C;<code>T</code>>[]</td></tr><tr><td align="left"><a id="empty"></a> <code>empty</code></td><td align="left"><code>readonly</code></td><td align="left"><code>boolean</code></td></tr><tr><td align="left"><a id="size"></a> <code>size</code></td><td align="left"><code>readonly</code></td><td align="left"><code>number</code></td></tr></tbody></table></div>
916
+ <hr>
917
+ <p><a id="setoptions"></a></p>
918
+ <h3 id="setoptions">SetOptions</h3>
919
+ <p>Modular Web-SDK-shaped <code>SetOptions</code>. Either flag controls how <code>data</code>
920
+ combines with the existing document; passing nothing replaces the
921
+ existing doc entirely (Firestore default).</p>
922
+ <ul>
923
+ <li><code>{ merge: true }</code> — shallow-merge every top-level field in
924
+ <code>data</code> into the existing document, preserving fields not in
925
+ <code>data</code>. Equivalent to <code>firebase/firestore</code>’s <code>setDoc(ref, data, { merge: true })</code>.</li>
926
+ <li><code>{ mergeFields: [...] }</code> — project <code>data</code> to just the listed
927
+ top-level fields, then merge. Other fields in <code>data</code> are
928
+ ignored; other fields in the existing doc are preserved.</li>
929
+ </ul>
930
+ <p><code>merge</code> and <code>mergeFields</code> are mutually exclusive; passing both is
931
+ a programming error (<code>mergeFields</code> wins on the sandbox path,
932
+ matching the JS SDK’s effective behavior).</p>
933
+ <h4 id="properties-11">Properties</h4>
934
+ <div class="table-scroll">
935
+
936
+
937
+
938
+
939
+
940
+
941
+
942
+
943
+
944
+
945
+
946
+
947
+
948
+
949
+
950
+
951
+ <table><thead><tr><th align="left">Property</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><a id="merge"></a> <code>merge?</code></td><td align="left"><code>boolean</code></td></tr><tr><td align="left"><a id="mergefields"></a> <code>mergeFields?</code></td><td align="left">readonly <code>string</code>[]</td></tr></tbody></table></div>
952
+ <hr>
953
+ <p><a id="snapshotlistenoptions"></a></p>
954
+ <h3 id="snapshotlistenoptions">SnapshotListenOptions</h3>
955
+ <h4 id="properties-12">Properties</h4>
956
+ <div class="table-scroll">
957
+
958
+
959
+
960
+
961
+
962
+
963
+
964
+
965
+
966
+
967
+
968
+
969
+ <table><thead><tr><th align="left">Property</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><a id="includemetadatachanges"></a> <code>includeMetadataChanges?</code></td><td align="left"><code>boolean</code></td></tr></tbody></table></div>
970
+ <hr>
971
+ <p><a id="snapshotobserver"></a></p>
972
+ <h3 id="snapshotobserver">SnapshotObserver</h3>
973
+ <h4 id="type-parameters-8">Type Parameters</h4>
974
+ <div class="table-scroll">
975
+
976
+
977
+
978
+
979
+
980
+
981
+
982
+
983
+
984
+
985
+ <table><thead><tr><th align="left">Type Parameter</th></tr></thead><tbody><tr><td align="left"><code>T</code></td></tr></tbody></table></div>
986
+ <h4 id="properties-13">Properties</h4>
987
+ <div class="table-scroll">
988
+
989
+
990
+
991
+
992
+
993
+
994
+
995
+
996
+
997
+
998
+
999
+
1000
+
1001
+
1002
+
1003
+
1004
+
1005
+
1006
+
1007
+
1008
+ <table><thead><tr><th align="left">Property</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><a id="complete"></a> <code>complete?</code></td><td align="left">() => <code>void</code></td></tr><tr><td align="left"><a id="error"></a> <code>error?</code></td><td align="left">(<code>error</code>: <code>unknown</code>) => <code>void</code></td></tr><tr><td align="left"><a id="next"></a> <code>next?</code></td><td align="left">(<code>snapshot</code>: <code>T</code>) => <code>void</code></td></tr></tbody></table></div>
1009
+ <hr>
1010
+ <p><a id="userauth"></a></p>
1011
+ <h3 id="userauth">UserAuth</h3>
1012
+ <h4 id="properties-14">Properties</h4>
1013
+ <div class="table-scroll">
1014
+
1015
+
1016
+
1017
+
1018
+
1019
+
1020
+
1021
+
1022
+
1023
+
1024
+
1025
+
1026
+
1027
+
1028
+
1029
+
1030
+ <table><thead><tr><th align="left">Property</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><a id="claims"></a> <code>claims?</code></td><td align="left"><code>Record</code>&#x3C;<code>string</code>, <code>unknown</code>></td></tr><tr><td align="left"><a id="uid"></a> <code>uid</code></td><td align="left"><code>string</code></td></tr></tbody></table></div>
1031
+ <h2 id="type-aliases">Type Aliases</h2>
1032
+ <p><a id="aggregatefield"></a></p>
1033
+ <h3 id="aggregatefield">AggregateField</h3>
1034
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">type</span><span style="color:#E5C07B"> AggregateField</span><span style="color:#56B6C2"> =</span></span>
1035
+ <span class="line"><span style="color:#ABB2BF"> | {</span></span>
1036
+ <span class="line"><span style="color:#E06C75"> kind</span><span style="color:#ABB2BF">: </span><span style="color:#98C379">"count"</span><span style="color:#ABB2BF">;</span></span>
1037
+ <span class="line"><span style="color:#ABB2BF">}</span></span>
1038
+ <span class="line"><span style="color:#ABB2BF"> | {</span></span>
1039
+ <span class="line"><span style="color:#E06C75"> field</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">string</span><span style="color:#ABB2BF">;</span></span>
1040
+ <span class="line"><span style="color:#E06C75"> kind</span><span style="color:#ABB2BF">: </span><span style="color:#98C379">"sum"</span><span style="color:#ABB2BF">;</span></span>
1041
+ <span class="line"><span style="color:#ABB2BF">}</span></span>
1042
+ <span class="line"><span style="color:#ABB2BF"> | {</span></span>
1043
+ <span class="line"><span style="color:#E06C75"> field</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">string</span><span style="color:#ABB2BF">;</span></span>
1044
+ <span class="line"><span style="color:#E06C75"> kind</span><span style="color:#ABB2BF">: </span><span style="color:#98C379">"average"</span><span style="color:#ABB2BF">;</span></span>
1045
+ <span class="line"><span style="color:#ABB2BF">};</span></span></code></pre>
1046
+ <p>Aggregate-field descriptor returned by <code>count()</code> / <code>sum(field)</code> /
1047
+ <code>average(field)</code>.</p>
1048
+ <hr>
1049
+ <p><a id="aggregatespec"></a></p>
1050
+ <h3 id="aggregatespec">AggregateSpec</h3>
1051
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">type</span><span style="color:#E5C07B"> AggregateSpec</span><span style="color:#56B6C2"> =</span><span style="color:#E5C07B"> Record</span><span style="color:#ABB2BF">&#x3C;</span><span style="color:#E5C07B">string</span><span style="color:#ABB2BF">, </span><span style="color:#E5C07B">AggregateField</span><span style="color:#ABB2BF">>;</span></span></code></pre>
1052
+ <p>Spec passed to <code>getAggregateFromServer(query, spec)</code>.</p>
1053
+ <hr>
1054
+ <p><a id="appfirestore"></a></p>
1055
+ <h3 id="appfirestore">AppFirestore</h3>
1056
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">type</span><span style="color:#E5C07B"> AppFirestore</span><span style="color:#56B6C2"> =</span><span style="color:#E5C07B"> Firestore</span><span style="color:#ABB2BF"> &#x26; {</span></span>
1057
+ <span class="line"><span style="color:#E06C75"> app</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">FirebaseApp</span><span style="color:#ABB2BF">;</span></span>
1058
+ <span class="line"><span style="color:#ABB2BF">};</span></span></code></pre>
1059
+ <p>Firestore handle returned by Firebase-shaped app overloads.</p>
1060
+ <h4 id="type-declaration">Type Declaration</h4>
1061
+ <h5 id="app">app</h5>
1062
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#E06C75">readonly</span><span style="color:#E06C75"> app</span><span style="color:#ABB2BF">: </span><span style="color:#E06C75">FirebaseApp</span><span style="color:#ABB2BF">;</span></span></code></pre>
1063
+ <hr>
1064
+ <p><a id="as"></a></p>
1065
+ <h3 id="as">As</h3>
1066
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">type</span><span style="color:#E5C07B"> As</span><span style="color:#56B6C2"> =</span><span style="color:#98C379"> "admin"</span><span style="color:#ABB2BF"> | </span><span style="color:#E5C07B">UserAuth</span><span style="color:#ABB2BF">;</span></span></code></pre>
1067
+ <p>Who a data-plane op runs as. The default (omitted, or the literal <code>'admin'</code>)
1068
+ is an ADMIN write that BYPASSES rules — the right mode for sandbox seeding.
1069
+ A <code>{ uid, claims? }</code> runs as that user with rules ENFORCED. The point of the
1070
+ explicit literal: bypass is NAMED (<code>as:'admin'</code>), not the silent consequence
1071
+ of omitting an auth field, and acting-as-a-user is named too.</p>
1072
+ <hr>
1073
+ <p><a id="authstate"></a></p>
1074
+ <h3 id="authstate">AuthState</h3>
1075
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">type</span><span style="color:#E5C07B"> AuthState</span><span style="color:#56B6C2"> =</span><span style="color:#E5C07B"> any</span><span style="color:#ABB2BF">;</span></span></code></pre>
1076
+ <hr>
1077
+ <p><a id="loglevel"></a></p>
1078
+ <h3 id="loglevel">LogLevel</h3>
1079
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">type</span><span style="color:#E5C07B"> LogLevel</span><span style="color:#56B6C2"> =</span><span style="color:#98C379"> "debug"</span><span style="color:#ABB2BF"> | </span><span style="color:#98C379">"verbose"</span><span style="color:#ABB2BF"> | </span><span style="color:#98C379">"info"</span><span style="color:#ABB2BF"> | </span><span style="color:#98C379">"warn"</span><span style="color:#ABB2BF"> | </span><span style="color:#98C379">"error"</span><span style="color:#ABB2BF"> | </span><span style="color:#98C379">"silent"</span><span style="color:#ABB2BF">;</span></span></code></pre>
1080
+ <p>Mirrors <code>firebase/firestore</code>’s <code>LogLevel</code> union.</p>
1081
+ <hr>
1082
+ <p><a id="transaction"></a></p>
1083
+ <h3 id="transaction">Transaction</h3>
1084
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">type</span><span style="color:#E5C07B"> Transaction</span><span style="color:#56B6C2"> =</span><span style="color:#E5C07B"> AuthState</span><span style="color:#ABB2BF">;</span></span></code></pre>
1085
+ <hr>
1086
+ <p><a id="unsubscribe"></a></p>
1087
+ <h3 id="unsubscribe">Unsubscribe()</h3>
1088
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">type</span><span style="color:#E5C07B"> Unsubscribe</span><span style="color:#56B6C2"> =</span><span style="color:#ABB2BF"> () </span><span style="color:#C678DD">=></span><span style="color:#E5C07B"> void</span><span style="color:#ABB2BF">;</span></span></code></pre>
1089
+ <h4 id="returns-29">Returns</h4>
1090
+ <p><code>void</code></p>
1091
+ <hr>
1092
+ <p><a id="writebatch"></a></p>
1093
+ <h3 id="writebatch">WriteBatch</h3>
1094
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">type</span><span style="color:#E5C07B"> WriteBatch</span><span style="color:#56B6C2"> =</span><span style="color:#E5C07B"> AuthState</span><span style="color:#ABB2BF">;</span></span></code></pre>
1095
+ <h2 id="variables">Variables</h2>
1096
+ <p><a id="target_symbol-1"></a></p>
1097
+ <h3 id="target_symbol">TARGET_SYMBOL</h3>
1098
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">const</span><span style="color:#E5C07B"> TARGET_SYMBOL</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">unique</span><span style="color:#E5C07B"> symbol</span><span style="color:#ABB2BF">;</span></span></code></pre>
1099
+ <p>Hidden property on every <a href="#firestore">Firestore</a> handle. Discriminates
1100
+ the sandbox backend so free functions can recover their owner.</p>
1101
+ <h2 id="functions">Functions</h2>
1102
+ <p><a id="actingas"></a></p>
1103
+ <h3 id="actingas">actingAs()</h3>
1104
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">function</span><span style="color:#61AFEF"> actingAs</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75;font-style:italic">sandbox</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">Sandbox</span><span style="color:#ABB2BF">, </span><span style="color:#E06C75;font-style:italic">identity</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">AuthState</span><span style="color:#ABB2BF">): </span><span style="color:#E5C07B">Firestore</span><span style="color:#ABB2BF">;</span></span></code></pre>
1105
+ <p>A Firestore handle scoped to a specific identity, for multi-user testing.</p>
1106
+ <p><code>actingAs(sandbox, { uid })</code> returns a <code>Firestore</code> whose ops evaluate security
1107
+ rules as that user (<code>request.auth.uid === uid</code>; custom claims via <code>token</code>);
1108
+ <code>actingAs(sandbox, null)</code> is the anonymous (signed-out) path. Multiple
1109
+ identities over ONE sandbox share the same store, so a write by one is
1110
+ delivered to another’s <code>onSnapshot</code>: the basis for multi-user sync testing.</p>
1111
+ <h4 id="parameters-16">Parameters</h4>
1112
+ <div class="table-scroll">
1113
+
1114
+
1115
+
1116
+
1117
+
1118
+
1119
+
1120
+
1121
+
1122
+
1123
+
1124
+
1125
+
1126
+
1127
+
1128
+
1129
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>sandbox</code></td><td align="left"><code>Sandbox</code></td></tr><tr><td align="left"><code>identity</code></td><td align="left"><code>AuthState</code></td></tr></tbody></table></div>
1130
+ <h4 id="returns-30">Returns</h4>
1131
+ <p><a href="#firestore"><code>Firestore</code></a></p>
1132
+ <h4 id="example">Example</h4>
1133
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">import</span><span style="color:#ABB2BF"> { </span><span style="color:#E06C75">initializeSandbox</span><span style="color:#ABB2BF"> } </span><span style="color:#C678DD">from</span><span style="color:#98C379"> 'pyric/sandbox'</span><span style="color:#ABB2BF">;</span></span>
1134
+ <span class="line"><span style="color:#C678DD">import</span><span style="color:#ABB2BF"> { </span><span style="color:#E06C75">actingAs</span><span style="color:#ABB2BF">, </span><span style="color:#E06C75">doc</span><span style="color:#ABB2BF">, </span><span style="color:#E06C75">setDoc</span><span style="color:#ABB2BF">, </span><span style="color:#E06C75">onSnapshot</span><span style="color:#ABB2BF"> } </span><span style="color:#C678DD">from</span><span style="color:#98C379"> 'pyric/firestore'</span><span style="color:#ABB2BF">;</span></span>
1135
+ <span class="line"><span style="color:#C678DD">const</span><span style="color:#E5C07B"> sandbox</span><span style="color:#56B6C2"> =</span><span style="color:#61AFEF"> initializeSandbox</span><span style="color:#ABB2BF">();</span></span>
1136
+ <span class="line"><span style="color:#C678DD">const</span><span style="color:#E5C07B"> alice</span><span style="color:#56B6C2"> =</span><span style="color:#61AFEF"> actingAs</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">sandbox</span><span style="color:#ABB2BF">, { </span><span style="color:#E06C75">uid</span><span style="color:#ABB2BF">: </span><span style="color:#98C379">'alice'</span><span style="color:#ABB2BF"> });</span></span>
1137
+ <span class="line"><span style="color:#C678DD">const</span><span style="color:#E5C07B"> bob</span><span style="color:#56B6C2"> =</span><span style="color:#61AFEF"> actingAs</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">sandbox</span><span style="color:#ABB2BF">, { </span><span style="color:#E06C75">uid</span><span style="color:#ABB2BF">: </span><span style="color:#98C379">'bob'</span><span style="color:#ABB2BF">, </span><span style="color:#E06C75">token</span><span style="color:#ABB2BF">: { </span><span style="color:#E06C75">role</span><span style="color:#ABB2BF">: </span><span style="color:#98C379">'member'</span><span style="color:#ABB2BF"> } });</span></span>
1138
+ <span class="line"><span style="color:#61AFEF">onSnapshot</span><span style="color:#ABB2BF">(</span><span style="color:#61AFEF">doc</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">bob</span><span style="color:#ABB2BF">, </span><span style="color:#98C379">'rooms/r1'</span><span style="color:#ABB2BF">), () </span><span style="color:#C678DD">=></span><span style="color:#ABB2BF"> {</span></span>
1139
+ <span class="line"><span style="color:#7F848E;font-style:italic"> // fires when alice writes (same store; rules evaluated as bob)</span></span>
1140
+ <span class="line"><span style="color:#ABB2BF">});</span></span>
1141
+ <span class="line"><span style="color:#C678DD">await</span><span style="color:#61AFEF"> setDoc</span><span style="color:#ABB2BF">(</span><span style="color:#61AFEF">doc</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">alice</span><span style="color:#ABB2BF">, </span><span style="color:#98C379">'rooms/r1'</span><span style="color:#ABB2BF">), { </span><span style="color:#E06C75">owner</span><span style="color:#ABB2BF">: </span><span style="color:#98C379">'alice'</span><span style="color:#ABB2BF"> });</span></span></code></pre>
1142
+ <p>Thin sugar over <code>getFirestore(sandbox.withAuth(identity))</code>; the value is a
1143
+ named, discoverable seam for multi-user scenarios. See
1144
+ the design rationale.</p>
1145
+ <hr>
1146
+ <p><a id="adddoc"></a></p>
1147
+ <h3 id="adddoc">addDoc()</h3>
1148
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">function</span><span style="color:#61AFEF"> addDoc</span><span style="color:#ABB2BF">&#x3C;</span><span style="color:#E5C07B">T</span><span style="color:#ABB2BF">>(</span><span style="color:#E06C75;font-style:italic">coll</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">CollectionReference</span><span style="color:#ABB2BF">&#x3C;</span><span style="color:#E5C07B">T</span><span style="color:#ABB2BF">>, </span><span style="color:#E06C75;font-style:italic">data</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">T</span><span style="color:#ABB2BF">): </span><span style="color:#E5C07B">Promise</span><span style="color:#ABB2BF">&#x3C;</span><span style="color:#E5C07B">DocumentReference</span><span style="color:#ABB2BF">&#x3C;</span><span style="color:#E5C07B">T</span><span style="color:#ABB2BF">>>;</span></span></code></pre>
1149
+ <h4 id="type-parameters-9">Type Parameters</h4>
1150
+ <div class="table-scroll">
1151
+
1152
+
1153
+
1154
+
1155
+
1156
+
1157
+
1158
+
1159
+
1160
+
1161
+
1162
+
1163
+ <table><thead><tr><th align="left">Type Parameter</th><th align="left">Default type</th></tr></thead><tbody><tr><td align="left"><code>T</code></td><td align="left"><code>DocumentData</code></td></tr></tbody></table></div>
1164
+ <h4 id="parameters-17">Parameters</h4>
1165
+ <div class="table-scroll">
1166
+
1167
+
1168
+
1169
+
1170
+
1171
+
1172
+
1173
+
1174
+
1175
+
1176
+
1177
+
1178
+
1179
+
1180
+
1181
+
1182
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>coll</code></td><td align="left"><a href="#collectionreference"><code>CollectionReference</code></a>&#x3C;<code>T</code>></td></tr><tr><td align="left"><code>data</code></td><td align="left"><code>T</code></td></tr></tbody></table></div>
1183
+ <h4 id="returns-31">Returns</h4>
1184
+ <p><code>Promise</code>&#x3C;<a href="#documentreference"><code>DocumentReference</code></a>&#x3C;<code>T</code>>></p>
1185
+ <hr>
1186
+ <p><a id="and"></a></p>
1187
+ <h3 id="and">and()</h3>
1188
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">function</span><span style="color:#61AFEF"> and</span><span style="color:#ABB2BF">(...</span><span style="color:#E06C75;font-style:italic">filters</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">QueryConstraint</span><span style="color:#ABB2BF">[]): </span><span style="color:#E5C07B">QueryConstraint</span><span style="color:#ABB2BF">;</span></span></code></pre>
1189
+ <p>AND composite. Same shape as <code>or()</code> but every inner constraint
1190
+ must match. Useful inside an <code>or()</code> to combine constraints that
1191
+ would otherwise be at the top level.</p>
1192
+ <h4 id="parameters-18">Parameters</h4>
1193
+ <div class="table-scroll">
1194
+
1195
+
1196
+
1197
+
1198
+
1199
+
1200
+
1201
+
1202
+
1203
+
1204
+
1205
+
1206
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left">…<code>filters</code></td><td align="left"><a href="#queryconstraint"><code>QueryConstraint</code></a>[]</td></tr></tbody></table></div>
1207
+ <h4 id="returns-32">Returns</h4>
1208
+ <p><a href="#queryconstraint"><code>QueryConstraint</code></a></p>
1209
+ <hr>
1210
+ <p><a id="arrayremove"></a></p>
1211
+ <h3 id="arrayremove">arrayRemove()</h3>
1212
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">function</span><span style="color:#61AFEF"> arrayRemove</span><span style="color:#ABB2BF">(...</span><span style="color:#E06C75;font-style:italic">values</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">unknown</span><span style="color:#ABB2BF">[]): </span><span style="color:#E5C07B">FieldValueSentinel</span><span style="color:#ABB2BF">;</span></span></code></pre>
1213
+ <h4 id="parameters-19">Parameters</h4>
1214
+ <div class="table-scroll">
1215
+
1216
+
1217
+
1218
+
1219
+
1220
+
1221
+
1222
+
1223
+
1224
+
1225
+
1226
+
1227
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left">…<code>values</code></td><td align="left"><code>unknown</code>[]</td></tr></tbody></table></div>
1228
+ <h4 id="returns-33">Returns</h4>
1229
+ <p><code>FieldValueSentinel</code></p>
1230
+ <hr>
1231
+ <p><a id="arrayunion"></a></p>
1232
+ <h3 id="arrayunion">arrayUnion()</h3>
1233
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">function</span><span style="color:#61AFEF"> arrayUnion</span><span style="color:#ABB2BF">(...</span><span style="color:#E06C75;font-style:italic">values</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">unknown</span><span style="color:#ABB2BF">[]): </span><span style="color:#E5C07B">FieldValueSentinel</span><span style="color:#ABB2BF">;</span></span></code></pre>
1234
+ <h4 id="parameters-20">Parameters</h4>
1235
+ <div class="table-scroll">
1236
+
1237
+
1238
+
1239
+
1240
+
1241
+
1242
+
1243
+
1244
+
1245
+
1246
+
1247
+
1248
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left">…<code>values</code></td><td align="left"><code>unknown</code>[]</td></tr></tbody></table></div>
1249
+ <h4 id="returns-34">Returns</h4>
1250
+ <p><code>FieldValueSentinel</code></p>
1251
+ <hr>
1252
+ <p><a id="average"></a></p>
1253
+ <h3 id="average">average()</h3>
1254
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">function</span><span style="color:#61AFEF"> average</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75;font-style:italic">field</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">string</span><span style="color:#ABB2BF">): </span><span style="color:#E5C07B">AggregateField</span><span style="color:#ABB2BF">;</span></span></code></pre>
1255
+ <p>Factory: average-of-<code>field</code> aggregate.</p>
1256
+ <h4 id="parameters-21">Parameters</h4>
1257
+ <div class="table-scroll">
1258
+
1259
+
1260
+
1261
+
1262
+
1263
+
1264
+
1265
+
1266
+
1267
+
1268
+
1269
+
1270
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>field</code></td><td align="left"><code>string</code></td></tr></tbody></table></div>
1271
+ <h4 id="returns-35">Returns</h4>
1272
+ <p><a href="#aggregatefield"><code>AggregateField</code></a></p>
1273
+ <hr>
1274
+ <p><a id="clearindexeddbpersistence"></a></p>
1275
+ <h3 id="clearindexeddbpersistence">clearIndexedDbPersistence()</h3>
1276
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">function</span><span style="color:#61AFEF"> clearIndexedDbPersistence</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75;font-style:italic">db</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">Firestore</span><span style="color:#ABB2BF">): </span><span style="color:#E5C07B">Promise</span><span style="color:#ABB2BF">&#x3C;</span><span style="color:#E5C07B">void</span><span style="color:#ABB2BF">>;</span></span></code></pre>
1277
+ <p>Sandbox: actually clears the sandbox’s persisted store via
1278
+ <code>Sandbox.clearPersistence()</code> — the honest mapping, not a no-op. This
1279
+ wipes the persisted blob (IndexedDB, or whatever backend
1280
+ <code>enablePersistence</code> was configured with) while leaving in-memory
1281
+ state untouched, matching <code>clearPersistence</code>’s own contract. It is
1282
+ ALREADY a no-op when persistence was never enabled, so callers that
1283
+ invoke this defensively at startup are safe either way.</p>
1284
+ <p><code>getFirestore(ctx)</code> (frozen <code>SandboxContext</code>) targets don’t carry a
1285
+ live <code>Sandbox</code> handle with a <code>clearPersistence</code> method reachable the
1286
+ same way as a <code>sandbox</code>/<code>sandbox-live</code> target’s <code>.sandbox</code> field —
1287
+ both variants do, in fact, so this always has a sandbox to call into.</p>
1288
+ <p>The real SDK requires this before Firestore starts; the sandbox’s mapped
1289
+ <code>clearPersistence()</code> has no such restriction.</p>
1290
+ <h4 id="parameters-22">Parameters</h4>
1291
+ <div class="table-scroll">
1292
+
1293
+
1294
+
1295
+
1296
+
1297
+
1298
+
1299
+
1300
+
1301
+
1302
+
1303
+
1304
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>db</code></td><td align="left"><a href="#firestore"><code>Firestore</code></a></td></tr></tbody></table></div>
1305
+ <h4 id="returns-36">Returns</h4>
1306
+ <p><code>Promise</code>&#x3C;<code>void</code>></p>
1307
+ <hr>
1308
+ <p><a id="collection"></a></p>
1309
+ <h3 id="collection">collection()</h3>
1310
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">function</span><span style="color:#61AFEF"> collection</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75;font-style:italic">parent</span><span style="color:#ABB2BF">:</span></span>
1311
+ <span class="line"><span style="color:#ABB2BF"> | </span><span style="color:#E5C07B">Firestore</span></span>
1312
+ <span class="line"><span style="color:#ABB2BF"> | </span><span style="color:#E5C07B">DocumentReference</span><span style="color:#ABB2BF">&#x3C;</span><span style="color:#E5C07B">DocumentData</span><span style="color:#ABB2BF">>, ...</span><span style="color:#E06C75;font-style:italic">pathSegments</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">string</span><span style="color:#ABB2BF">[]): </span><span style="color:#E5C07B">CollectionReference</span><span style="color:#ABB2BF">;</span></span></code></pre>
1313
+ <h4 id="parameters-23">Parameters</h4>
1314
+ <div class="table-scroll">
1315
+
1316
+
1317
+
1318
+
1319
+
1320
+
1321
+
1322
+
1323
+
1324
+
1325
+
1326
+
1327
+
1328
+
1329
+
1330
+
1331
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>parent</code></td><td align="left">| <a href="#firestore"><code>Firestore</code></a> | <a href="#documentreference"><code>DocumentReference</code></a>&#x3C;<code>DocumentData</code>></td></tr><tr><td align="left">…<code>pathSegments</code></td><td align="left"><code>string</code>[]</td></tr></tbody></table></div>
1332
+ <h4 id="returns-37">Returns</h4>
1333
+ <p><a href="#collectionreference"><code>CollectionReference</code></a></p>
1334
+ <hr>
1335
+ <p><a id="collectiongroup"></a></p>
1336
+ <h3 id="collectiongroup">collectionGroup()</h3>
1337
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">function</span><span style="color:#61AFEF"> collectionGroup</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75;font-style:italic">db</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">Firestore</span><span style="color:#ABB2BF">, </span><span style="color:#E06C75;font-style:italic">collectionId</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">string</span><span style="color:#ABB2BF">): </span><span style="color:#E5C07B">Query</span><span style="color:#ABB2BF">;</span></span></code></pre>
1338
+ <p>Cross-collection query — scans every document under every
1339
+ collection whose final segment matches <code>collectionId</code>. Mirrors
1340
+ <code>firebase/firestore</code>’s <code>collectionGroup(db, id)</code> shape.</p>
1341
+ <p>Returned <code>Query</code> accepts the same <code>where</code> / <code>orderBy</code> / <code>limit</code>
1342
+ constraints as any other query.</p>
1343
+ <h4 id="parameters-24">Parameters</h4>
1344
+ <div class="table-scroll">
1345
+
1346
+
1347
+
1348
+
1349
+
1350
+
1351
+
1352
+
1353
+
1354
+
1355
+
1356
+
1357
+
1358
+
1359
+
1360
+
1361
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>db</code></td><td align="left"><a href="#firestore"><code>Firestore</code></a></td></tr><tr><td align="left"><code>collectionId</code></td><td align="left"><code>string</code></td></tr></tbody></table></div>
1362
+ <h4 id="returns-38">Returns</h4>
1363
+ <p><a href="#query"><code>Query</code></a></p>
1364
+ <hr>
1365
+ <p><a id="connectfirestoreemulator"></a></p>
1366
+ <h3 id="connectfirestoreemulator">connectFirestoreEmulator()</h3>
1367
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">function</span><span style="color:#61AFEF"> connectFirestoreEmulator</span><span style="color:#ABB2BF">(</span></span>
1368
+ <span class="line"><span style="color:#E06C75;font-style:italic"> db</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">Firestore</span><span style="color:#ABB2BF">,</span></span>
1369
+ <span class="line"><span style="color:#E06C75;font-style:italic"> host</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">string</span><span style="color:#ABB2BF">,</span></span>
1370
+ <span class="line"><span style="color:#E06C75;font-style:italic"> port</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">number</span><span style="color:#ABB2BF">,</span></span>
1371
+ <span class="line"><span style="color:#E06C75;font-style:italic"> options</span><span style="color:#C678DD">?</span><span style="color:#ABB2BF">: {</span></span>
1372
+ <span class="line"><span style="color:#E06C75"> mockUserToken</span><span style="color:#C678DD">?</span><span style="color:#ABB2BF">: | </span><span style="color:#E5C07B">string</span></span>
1373
+ <span class="line"><span style="color:#ABB2BF"> | {</span></span>
1374
+ <span class="line"><span style="color:#ABB2BF"> [</span><span style="color:#E06C75;font-style:italic">claim</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">string</span><span style="color:#ABB2BF">]: </span><span style="color:#E5C07B">unknown</span><span style="color:#ABB2BF">;</span></span>
1375
+ <span class="line"><span style="color:#E06C75"> firebase</span><span style="color:#C678DD">?</span><span style="color:#ABB2BF">: {</span></span>
1376
+ <span class="line"><span style="color:#E06C75"> identities</span><span style="color:#C678DD">?</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">Record</span><span style="color:#ABB2BF">&#x3C;</span><span style="color:#E5C07B">string</span><span style="color:#ABB2BF">, </span><span style="color:#E5C07B">string</span><span style="color:#ABB2BF">[]>;</span></span>
1377
+ <span class="line"><span style="color:#E06C75"> sign_in_provider</span><span style="color:#C678DD">?</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">string</span><span style="color:#ABB2BF">;</span></span>
1378
+ <span class="line"><span style="color:#ABB2BF"> };</span></span>
1379
+ <span class="line"><span style="color:#E06C75"> sub</span><span style="color:#C678DD">?</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">string</span><span style="color:#ABB2BF">;</span></span>
1380
+ <span class="line"><span style="color:#E06C75"> user_id</span><span style="color:#C678DD">?</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">string</span><span style="color:#ABB2BF">;</span></span>
1381
+ <span class="line"><span style="color:#ABB2BF"> };</span></span>
1382
+ <span class="line"><span style="color:#ABB2BF">}): </span><span style="color:#E5C07B">void</span><span style="color:#ABB2BF">;</span></span></code></pre>
1383
+ <p>No-op in the sandbox mirror because the sandbox already runs locally.</p>
1384
+ <p>The option shape remains source-compatible with Firebase so canonical
1385
+ initialization code can call it unconditionally.</p>
1386
+ <h4 id="parameters-25">Parameters</h4>
1387
+ <div class="table-scroll">
1388
+
1389
+
1390
+
1391
+
1392
+
1393
+
1394
+
1395
+
1396
+
1397
+
1398
+
1399
+
1400
+
1401
+
1402
+
1403
+
1404
+
1405
+
1406
+
1407
+
1408
+
1409
+
1410
+
1411
+
1412
+
1413
+
1414
+
1415
+
1416
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>db</code></td><td align="left"><a href="#firestore"><code>Firestore</code></a></td></tr><tr><td align="left"><code>host</code></td><td align="left"><code>string</code></td></tr><tr><td align="left"><code>port</code></td><td align="left"><code>number</code></td></tr><tr><td align="left"><code>options?</code></td><td align="left">{ <code>mockUserToken?</code>: | <code>string</code> | { [<code>claim</code>: <code>string</code>]: <code>unknown</code>; <code>firebase?</code>: { <code>identities?</code>: <code>Record</code>&#x3C;<code>string</code>, <code>string</code>[]>; <code>sign_in_provider?</code>: <code>string</code>; }; <code>sub?</code>: <code>string</code>; <code>user_id?</code>: <code>string</code>; }; }</td></tr><tr><td align="left"><code>options.mockUserToken?</code></td><td align="left">| <code>string</code> | { [<code>claim</code>: <code>string</code>]: <code>unknown</code>; <code>firebase?</code>: { <code>identities?</code>: <code>Record</code>&#x3C;<code>string</code>, <code>string</code>[]>; <code>sign_in_provider?</code>: <code>string</code>; }; <code>sub?</code>: <code>string</code>; <code>user_id?</code>: <code>string</code>; }</td></tr></tbody></table></div>
1417
+ <h4 id="returns-39">Returns</h4>
1418
+ <p><code>void</code></p>
1419
+ <hr>
1420
+ <p><a id="count"></a></p>
1421
+ <h3 id="count">count()</h3>
1422
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">function</span><span style="color:#61AFEF"> count</span><span style="color:#ABB2BF">(): </span><span style="color:#E5C07B">AggregateField</span><span style="color:#ABB2BF">;</span></span></code></pre>
1423
+ <p>Factory: count() aggregate.</p>
1424
+ <h4 id="returns-40">Returns</h4>
1425
+ <p><a href="#aggregatefield"><code>AggregateField</code></a></p>
1426
+ <hr>
1427
+ <p><a id="createfirestoredatatools"></a></p>
1428
+ <h3 id="createfirestoredatatools">createFirestoreDataTools()</h3>
1429
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">function</span><span style="color:#61AFEF"> createFirestoreDataTools</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75;font-style:italic">deps</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">FirestoreDataToolDeps</span><span style="color:#ABB2BF">): </span><span style="color:#E5C07B">ToolHandler</span><span style="color:#ABB2BF">&#x3C;</span><span style="color:#E5C07B">unknown</span><span style="color:#ABB2BF">, </span><span style="color:#E5C07B">unknown</span><span style="color:#ABB2BF">>[];</span></span></code></pre>
1430
+ <p>Modular Web-SDK-shaped Firestore data tools — get, list, create,
1431
+ update, delete. Each tool’s <code>auth</code> arg is forwarded to the
1432
+ resolver; omitted = admin mode, supplied = user mode.</p>
1433
+ <h4 id="parameters-26">Parameters</h4>
1434
+ <div class="table-scroll">
1435
+
1436
+
1437
+
1438
+
1439
+
1440
+
1441
+
1442
+
1443
+
1444
+
1445
+
1446
+
1447
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>deps</code></td><td align="left"><a href="#firestoredatatooldeps"><code>FirestoreDataToolDeps</code></a></td></tr></tbody></table></div>
1448
+ <h4 id="returns-41">Returns</h4>
1449
+ <p><code>ToolHandler</code>&#x3C;<code>unknown</code>, <code>unknown</code>>[]</p>
1450
+ <hr>
1451
+ <p><a id="createfirestoreinspecttools"></a></p>
1452
+ <h3 id="createfirestoreinspecttools">createFirestoreInspectTools()</h3>
1453
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">function</span><span style="color:#61AFEF"> createFirestoreInspectTools</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75;font-style:italic">deps</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">FirestoreInspectToolDeps</span><span style="color:#ABB2BF">): </span><span style="color:#E5C07B">ToolHandler</span><span style="color:#ABB2BF">&#x3C;</span><span style="color:#E5C07B">unknown</span><span style="color:#ABB2BF">, </span><span style="color:#E5C07B">unknown</span><span style="color:#ABB2BF">>[];</span></span></code></pre>
1454
+ <p><code>sandbox_inspect</code> — the missing-tool tax this entire library
1455
+ used to charge agents. Without it, debugging “why aren’t my rules
1456
+ working?” took 51 tool calls + 72k tokens of grepping node_modules
1457
+ (recorded in CLAUDE_DEBUG_SESSION.md). With it, the same diagnosis
1458
+ is one tool call:</p>
1459
+ <p>{ rules: { source, sizeBytes, isEmpty, lint: { errors, warnings, findings } },
1460
+ documents: { totalCount, byCollection },
1461
+ events: { totalCount, recentDenials, recentRequests } }</p>
1462
+ <p>Returns a snapshot of sandbox state — current rules, lint summary,
1463
+ document census by collection, and the most-recent denials + requests
1464
+ from sandbox.history(). Everything an agent needs to localize a
1465
+ sandbox bug in one round-trip.</p>
1466
+ <p>Sandbox-only. <code>resolveSandbox</code> must return the owning Sandbox.</p>
1467
+ <h4 id="parameters-27">Parameters</h4>
1468
+ <div class="table-scroll">
1469
+
1470
+
1471
+
1472
+
1473
+
1474
+
1475
+
1476
+
1477
+
1478
+
1479
+
1480
+
1481
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>deps</code></td><td align="left"><a href="#firestoreinspecttooldeps"><code>FirestoreInspectToolDeps</code></a></td></tr></tbody></table></div>
1482
+ <h4 id="returns-42">Returns</h4>
1483
+ <p><code>ToolHandler</code>&#x3C;<code>unknown</code>, <code>unknown</code>>[]</p>
1484
+ <hr>
1485
+ <p><a id="deletedoc"></a></p>
1486
+ <h3 id="deletedoc">deleteDoc()</h3>
1487
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">function</span><span style="color:#61AFEF"> deleteDoc</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75;font-style:italic">ref</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">DocumentReference</span><span style="color:#ABB2BF">): </span><span style="color:#E5C07B">Promise</span><span style="color:#ABB2BF">&#x3C;</span><span style="color:#E5C07B">void</span><span style="color:#ABB2BF">>;</span></span></code></pre>
1488
+ <h4 id="parameters-28">Parameters</h4>
1489
+ <div class="table-scroll">
1490
+
1491
+
1492
+
1493
+
1494
+
1495
+
1496
+
1497
+
1498
+
1499
+
1500
+
1501
+
1502
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>ref</code></td><td align="left"><a href="#documentreference"><code>DocumentReference</code></a></td></tr></tbody></table></div>
1503
+ <h4 id="returns-43">Returns</h4>
1504
+ <p><code>Promise</code>&#x3C;<code>void</code>></p>
1505
+ <hr>
1506
+ <p><a id="deletefield"></a></p>
1507
+ <h3 id="deletefield">deleteField()</h3>
1508
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">function</span><span style="color:#61AFEF"> deleteField</span><span style="color:#ABB2BF">(): </span><span style="color:#E5C07B">FieldValueSentinel</span><span style="color:#ABB2BF">;</span></span></code></pre>
1509
+ <h4 id="returns-44">Returns</h4>
1510
+ <p><code>FieldValueSentinel</code></p>
1511
+ <hr>
1512
+ <p><a id="disablenetwork"></a></p>
1513
+ <h3 id="disablenetwork">disableNetwork()</h3>
1514
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">function</span><span style="color:#61AFEF"> disableNetwork</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75;font-style:italic">db</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">Firestore</span><span style="color:#ABB2BF">): </span><span style="color:#E5C07B">Promise</span><span style="color:#ABB2BF">&#x3C;</span><span style="color:#E5C07B">void</span><span style="color:#ABB2BF">>;</span></span></code></pre>
1515
+ <p>Sandbox: no-op success. There is no network in the sandbox — every
1516
+ op is a local call into the in-memory/IndexedDB-backed store — so
1517
+ there is nothing to disable. This deliberately does NOT simulate an
1518
+ offline mode: queued writes still commit immediately rather than
1519
+ queuing, because the sandbox cannot honestly deliver “queued until
1520
+ reconnected” when there is no connection to lose in the first place.
1521
+ App code that calls this to prep for flaky connectivity will not
1522
+ crash, but it also will not observe write-queuing behavior.</p>
1523
+ <h4 id="parameters-29">Parameters</h4>
1524
+ <div class="table-scroll">
1525
+
1526
+
1527
+
1528
+
1529
+
1530
+
1531
+
1532
+
1533
+
1534
+
1535
+
1536
+
1537
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>db</code></td><td align="left"><a href="#firestore"><code>Firestore</code></a></td></tr></tbody></table></div>
1538
+ <h4 id="returns-45">Returns</h4>
1539
+ <p><code>Promise</code>&#x3C;<code>void</code>></p>
1540
+ <hr>
1541
+ <p><a id="doc"></a></p>
1542
+ <h3 id="doc">doc()</h3>
1543
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">function</span><span style="color:#61AFEF"> doc</span><span style="color:#ABB2BF">&#x3C;</span><span style="color:#E5C07B">T</span><span style="color:#ABB2BF">>(</span><span style="color:#E06C75;font-style:italic">parent</span><span style="color:#ABB2BF">:</span></span>
1544
+ <span class="line"><span style="color:#ABB2BF"> | </span><span style="color:#E5C07B">Firestore</span></span>
1545
+ <span class="line"><span style="color:#ABB2BF">| </span><span style="color:#E5C07B">CollectionReference</span><span style="color:#ABB2BF">&#x3C;</span><span style="color:#E5C07B">T</span><span style="color:#ABB2BF">>, ...</span><span style="color:#E06C75;font-style:italic">pathSegments</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">string</span><span style="color:#ABB2BF">[]): </span><span style="color:#E5C07B">DocumentReference</span><span style="color:#ABB2BF">&#x3C;</span><span style="color:#E5C07B">T</span><span style="color:#ABB2BF">>;</span></span></code></pre>
1546
+ <h4 id="type-parameters-10">Type Parameters</h4>
1547
+ <div class="table-scroll">
1548
+
1549
+
1550
+
1551
+
1552
+
1553
+
1554
+
1555
+
1556
+
1557
+
1558
+
1559
+
1560
+ <table><thead><tr><th align="left">Type Parameter</th><th align="left">Default type</th></tr></thead><tbody><tr><td align="left"><code>T</code></td><td align="left"><code>DocumentData</code></td></tr></tbody></table></div>
1561
+ <h4 id="parameters-30">Parameters</h4>
1562
+ <div class="table-scroll">
1563
+
1564
+
1565
+
1566
+
1567
+
1568
+
1569
+
1570
+
1571
+
1572
+
1573
+
1574
+
1575
+
1576
+
1577
+
1578
+
1579
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>parent</code></td><td align="left">| <a href="#firestore"><code>Firestore</code></a> | <a href="#collectionreference"><code>CollectionReference</code></a>&#x3C;<code>T</code>></td></tr><tr><td align="left">…<code>pathSegments</code></td><td align="left"><code>string</code>[]</td></tr></tbody></table></div>
1580
+ <h4 id="returns-46">Returns</h4>
1581
+ <p><a href="#documentreference"><code>DocumentReference</code></a>&#x3C;<code>T</code>></p>
1582
+ <hr>
1583
+ <p><a id="documentid"></a></p>
1584
+ <h3 id="documentid">documentId()</h3>
1585
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">function</span><span style="color:#61AFEF"> documentId</span><span style="color:#ABB2BF">(): </span><span style="color:#E5C07B">FieldPath</span><span style="color:#ABB2BF">;</span></span></code></pre>
1586
+ <h4 id="returns-47">Returns</h4>
1587
+ <p><a href="#fieldpath"><code>FieldPath</code></a></p>
1588
+ <hr>
1589
+ <p><a id="enableindexeddbpersistence"></a></p>
1590
+ <h3 id="enableindexeddbpersistence">enableIndexedDbPersistence()</h3>
1591
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">function</span><span style="color:#61AFEF"> enableIndexedDbPersistence</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75;font-style:italic">db</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">Firestore</span><span style="color:#ABB2BF">, </span><span style="color:#E06C75;font-style:italic">persistenceSettings</span><span style="color:#C678DD">?</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">PersistenceSettings</span><span style="color:#ABB2BF">): </span><span style="color:#E5C07B">Promise</span><span style="color:#ABB2BF">&#x3C;</span><span style="color:#E5C07B">void</span><span style="color:#ABB2BF">>;</span></span></code></pre>
1592
+ <p>Sandbox: no-op success. The sandbox’s default persistence (IndexedDB
1593
+ on the SharedWorker/serve path, or whatever backend <code>enablePersistence</code>
1594
+ was configured with) already caches every write — this call has
1595
+ nothing left to enable. Resolves immediately.</p>
1596
+ <p>Unlike the real SDK, this does NOT reject with <code>'failed-precondition'</code>
1597
+ when called after other Firestore ops have already run. The guard
1598
+ exists in the real SDK to protect an actual cache-initialization
1599
+ race; the sandbox has no such race (there’s no cache to initialize),
1600
+ so enforcing the same restriction would only make app code that
1601
+ calls this defensively at startup fail for no local reason.</p>
1602
+ <h4 id="parameters-31">Parameters</h4>
1603
+ <div class="table-scroll">
1604
+
1605
+
1606
+
1607
+
1608
+
1609
+
1610
+
1611
+
1612
+
1613
+
1614
+
1615
+
1616
+
1617
+
1618
+
1619
+
1620
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>db</code></td><td align="left"><a href="#firestore"><code>Firestore</code></a></td></tr><tr><td align="left"><code>persistenceSettings?</code></td><td align="left"><a href="#persistencesettings"><code>PersistenceSettings</code></a></td></tr></tbody></table></div>
1621
+ <h4 id="returns-48">Returns</h4>
1622
+ <p><code>Promise</code>&#x3C;<code>void</code>></p>
1623
+ <hr>
1624
+ <p><a id="enablemultitabindexeddbpersistence"></a></p>
1625
+ <h3 id="enablemultitabindexeddbpersistence">enableMultiTabIndexedDbPersistence()</h3>
1626
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">function</span><span style="color:#61AFEF"> enableMultiTabIndexedDbPersistence</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75;font-style:italic">db</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">Firestore</span><span style="color:#ABB2BF">): </span><span style="color:#E5C07B">Promise</span><span style="color:#ABB2BF">&#x3C;</span><span style="color:#E5C07B">void</span><span style="color:#ABB2BF">>;</span></span></code></pre>
1627
+ <p>Sandbox: no-op success, same rationale as <a href="#enableindexeddbpersistence">enableIndexedDbPersistence</a>.
1628
+ Multi-tab coordination is meaningless here too: the sandbox’s
1629
+ SharedWorker path already IS the single shared store every tab talks
1630
+ to, so there’s no separate “multi-tab” mode to opt into.</p>
1631
+ <h4 id="parameters-32">Parameters</h4>
1632
+ <div class="table-scroll">
1633
+
1634
+
1635
+
1636
+
1637
+
1638
+
1639
+
1640
+
1641
+
1642
+
1643
+
1644
+
1645
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>db</code></td><td align="left"><a href="#firestore"><code>Firestore</code></a></td></tr></tbody></table></div>
1646
+ <h4 id="returns-49">Returns</h4>
1647
+ <p><code>Promise</code>&#x3C;<code>void</code>></p>
1648
+ <hr>
1649
+ <p><a id="enablenetwork"></a></p>
1650
+ <h3 id="enablenetwork">enableNetwork()</h3>
1651
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">function</span><span style="color:#61AFEF"> enableNetwork</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75;font-style:italic">db</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">Firestore</span><span style="color:#ABB2BF">): </span><span style="color:#E5C07B">Promise</span><span style="color:#ABB2BF">&#x3C;</span><span style="color:#E5C07B">void</span><span style="color:#ABB2BF">>;</span></span></code></pre>
1652
+ <p>Sandbox: no-op success, symmetric with <a href="#disablenetwork">disableNetwork</a> — since
1653
+ network was never disabled locally, there is nothing to re-enable.</p>
1654
+ <h4 id="parameters-33">Parameters</h4>
1655
+ <div class="table-scroll">
1656
+
1657
+
1658
+
1659
+
1660
+
1661
+
1662
+
1663
+
1664
+
1665
+
1666
+
1667
+
1668
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>db</code></td><td align="left"><a href="#firestore"><code>Firestore</code></a></td></tr></tbody></table></div>
1669
+ <h4 id="returns-50">Returns</h4>
1670
+ <p><code>Promise</code>&#x3C;<code>void</code>></p>
1671
+ <hr>
1672
+ <p><a id="endat"></a></p>
1673
+ <h3 id="endat">endAt()</h3>
1674
+ <h4 id="call-signature">Call Signature</h4>
1675
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">function</span><span style="color:#61AFEF"> endAt</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75;font-style:italic">snapshot</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">DocumentSnapshot</span><span style="color:#ABB2BF">): </span><span style="color:#E5C07B">QueryConstraint</span><span style="color:#ABB2BF">;</span></span></code></pre>
1676
+ <p>End the query at the document whose ordered field values match
1677
+ the cursor. Inclusive — the document at the cursor IS included.</p>
1678
+ <h5 id="parameters-34">Parameters</h5>
1679
+ <div class="table-scroll">
1680
+
1681
+
1682
+
1683
+
1684
+
1685
+
1686
+
1687
+
1688
+
1689
+
1690
+
1691
+
1692
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>snapshot</code></td><td align="left"><a href="#documentsnapshot"><code>DocumentSnapshot</code></a></td></tr></tbody></table></div>
1693
+ <h5 id="returns-51">Returns</h5>
1694
+ <p><a href="#queryconstraint"><code>QueryConstraint</code></a></p>
1695
+ <h4 id="call-signature-1">Call Signature</h4>
1696
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">function</span><span style="color:#61AFEF"> endAt</span><span style="color:#ABB2BF">(...</span><span style="color:#E06C75;font-style:italic">values</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">unknown</span><span style="color:#ABB2BF">[]): </span><span style="color:#E5C07B">QueryConstraint</span><span style="color:#ABB2BF">;</span></span></code></pre>
1697
+ <p>End the query at the document whose ordered field values match
1698
+ the cursor. Inclusive — the document at the cursor IS included.</p>
1699
+ <h5 id="parameters-35">Parameters</h5>
1700
+ <div class="table-scroll">
1701
+
1702
+
1703
+
1704
+
1705
+
1706
+
1707
+
1708
+
1709
+
1710
+
1711
+
1712
+
1713
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left">…<code>values</code></td><td align="left"><code>unknown</code>[]</td></tr></tbody></table></div>
1714
+ <h5 id="returns-52">Returns</h5>
1715
+ <p><a href="#queryconstraint"><code>QueryConstraint</code></a></p>
1716
+ <hr>
1717
+ <p><a id="endbefore"></a></p>
1718
+ <h3 id="endbefore">endBefore()</h3>
1719
+ <h4 id="call-signature-2">Call Signature</h4>
1720
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">function</span><span style="color:#61AFEF"> endBefore</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75;font-style:italic">snapshot</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">DocumentSnapshot</span><span style="color:#ABB2BF">): </span><span style="color:#E5C07B">QueryConstraint</span><span style="color:#ABB2BF">;</span></span></code></pre>
1721
+ <p>Same as <code>endAt</code>, but EXCLUDES the document at the cursor — the
1722
+ result ends at the prior ordered position.</p>
1723
+ <h5 id="parameters-36">Parameters</h5>
1724
+ <div class="table-scroll">
1725
+
1726
+
1727
+
1728
+
1729
+
1730
+
1731
+
1732
+
1733
+
1734
+
1735
+
1736
+
1737
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>snapshot</code></td><td align="left"><a href="#documentsnapshot"><code>DocumentSnapshot</code></a></td></tr></tbody></table></div>
1738
+ <h5 id="returns-53">Returns</h5>
1739
+ <p><a href="#queryconstraint"><code>QueryConstraint</code></a></p>
1740
+ <h4 id="call-signature-3">Call Signature</h4>
1741
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">function</span><span style="color:#61AFEF"> endBefore</span><span style="color:#ABB2BF">(...</span><span style="color:#E06C75;font-style:italic">values</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">unknown</span><span style="color:#ABB2BF">[]): </span><span style="color:#E5C07B">QueryConstraint</span><span style="color:#ABB2BF">;</span></span></code></pre>
1742
+ <p>Same as <code>endAt</code>, but EXCLUDES the document at the cursor — the
1743
+ result ends at the prior ordered position.</p>
1744
+ <h5 id="parameters-37">Parameters</h5>
1745
+ <div class="table-scroll">
1746
+
1747
+
1748
+
1749
+
1750
+
1751
+
1752
+
1753
+
1754
+
1755
+
1756
+
1757
+
1758
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left">…<code>values</code></td><td align="left"><code>unknown</code>[]</td></tr></tbody></table></div>
1759
+ <h5 id="returns-54">Returns</h5>
1760
+ <p><a href="#queryconstraint"><code>QueryConstraint</code></a></p>
1761
+ <hr>
1762
+ <p><a id="getadminfirestore"></a></p>
1763
+ <h3 id="getadminfirestore">getAdminFirestore()</h3>
1764
+ <h4 id="call-signature-4">Call Signature</h4>
1765
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">function</span><span style="color:#61AFEF"> getAdminFirestore</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75;font-style:italic">sandbox</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">Sandbox</span><span style="color:#ABB2BF">): </span><span style="color:#E5C07B">Firestore</span><span style="color:#ABB2BF">;</span></span></code></pre>
1766
+ <p>Construct a <strong>rules-bypassing</strong> sandbox Firestore handle — the Pyric
1767
+ Studio admin lens (Gap #2). Every modular op issued against the returned
1768
+ handle (<code>getDoc</code>/<code>getDocs</code>/<code>setDoc</code>/<code>updateDoc</code>/<code>deleteDoc</code>/<code>addDoc</code>/
1769
+ <code>count</code>/<code>writeBatch</code>/<code>runTransaction</code>) SKIPS security-rule evaluation and
1770
+ is treated as ALLOW, while still going through the same store + emitting
1771
+ the same events + waking the same listeners. This is the modular sibling
1772
+ of the path-string <code>sandbox.admin.*</code> bypass; it reuses the underlying
1773
+ <code>LocalEnvironment</code> bypass execution path (the <code>bypassRules</code> op flag),
1774
+ not a parallel reimplementation.</p>
1775
+ <p>Sandbox-only. There is no prod analog (you cannot bypass deployed
1776
+ security rules from a client), so this overload set accepts only a
1777
+ <code>Sandbox</code>, <code>SandboxContext</code>, or a privately-associated <code>FirebaseApp</code>.
1778
+ Admin ops are identity-agnostic (rules are off), so the
1779
+ handle is a FROZEN <code>sandbox</code> target: it does not track
1780
+ <code>sandbox.currentUser</code>.</p>
1781
+ <p>Intended for Studio’s “edit anything as admin” surfaces (F2) and the
1782
+ serve worker’s <code>{ mode: 'admin' }</code> auth lens. For rules-applied
1783
+ impersonation (“act as this user”), use <code>getFirestore(sandbox.withAuth({ uid }))</code> instead.</p>
1784
+ <h5 id="parameters-38">Parameters</h5>
1785
+ <div class="table-scroll">
1786
+
1787
+
1788
+
1789
+
1790
+
1791
+
1792
+
1793
+
1794
+
1795
+
1796
+
1797
+
1798
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>sandbox</code></td><td align="left"><code>Sandbox</code></td></tr></tbody></table></div>
1799
+ <h5 id="returns-55">Returns</h5>
1800
+ <p><a href="#firestore"><code>Firestore</code></a></p>
1801
+ <h5 id="example-1">Example</h5>
1802
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">import</span><span style="color:#ABB2BF"> { </span><span style="color:#E06C75">initializeSandbox</span><span style="color:#ABB2BF"> } </span><span style="color:#C678DD">from</span><span style="color:#98C379"> 'pyric/sandbox'</span><span style="color:#ABB2BF">;</span></span>
1803
+ <span class="line"><span style="color:#C678DD">import</span><span style="color:#ABB2BF"> { </span><span style="color:#E06C75">getAdminFirestore</span><span style="color:#ABB2BF">, </span><span style="color:#E06C75">doc</span><span style="color:#ABB2BF">, </span><span style="color:#E06C75">setDoc</span><span style="color:#ABB2BF"> } </span><span style="color:#C678DD">from</span><span style="color:#98C379"> 'pyric/firestore'</span><span style="color:#ABB2BF">;</span></span>
1804
+ <span class="line"><span style="color:#C678DD">const</span><span style="color:#E5C07B"> sandbox</span><span style="color:#56B6C2"> =</span><span style="color:#61AFEF"> initializeSandbox</span><span style="color:#ABB2BF">();</span></span>
1805
+ <span class="line"><span style="color:#C678DD">const</span><span style="color:#E5C07B"> adminDb</span><span style="color:#56B6C2"> =</span><span style="color:#61AFEF"> getAdminFirestore</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">sandbox</span><span style="color:#ABB2BF">);</span></span>
1806
+ <span class="line"><span style="color:#C678DD">await</span><span style="color:#61AFEF"> setDoc</span><span style="color:#ABB2BF">(</span><span style="color:#61AFEF">doc</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">adminDb</span><span style="color:#ABB2BF">, </span><span style="color:#98C379">'locked/x'</span><span style="color:#ABB2BF">), { </span><span style="color:#E06C75">a</span><span style="color:#ABB2BF">: </span><span style="color:#D19A66">1</span><span style="color:#ABB2BF"> }); </span><span style="color:#7F848E;font-style:italic">// bypasses rules</span></span></code></pre>
1807
+ <h4 id="call-signature-5">Call Signature</h4>
1808
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">function</span><span style="color:#61AFEF"> getAdminFirestore</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75;font-style:italic">ctx</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">SandboxContext</span><span style="color:#ABB2BF">): </span><span style="color:#E5C07B">Firestore</span><span style="color:#ABB2BF">;</span></span></code></pre>
1809
+ <p>Construct a <strong>rules-bypassing</strong> sandbox Firestore handle — the Pyric
1810
+ Studio admin lens (Gap #2). Every modular op issued against the returned
1811
+ handle (<code>getDoc</code>/<code>getDocs</code>/<code>setDoc</code>/<code>updateDoc</code>/<code>deleteDoc</code>/<code>addDoc</code>/
1812
+ <code>count</code>/<code>writeBatch</code>/<code>runTransaction</code>) SKIPS security-rule evaluation and
1813
+ is treated as ALLOW, while still going through the same store + emitting
1814
+ the same events + waking the same listeners. This is the modular sibling
1815
+ of the path-string <code>sandbox.admin.*</code> bypass; it reuses the underlying
1816
+ <code>LocalEnvironment</code> bypass execution path (the <code>bypassRules</code> op flag),
1817
+ not a parallel reimplementation.</p>
1818
+ <p>Sandbox-only. There is no prod analog (you cannot bypass deployed
1819
+ security rules from a client), so this overload set accepts only a
1820
+ <code>Sandbox</code>, <code>SandboxContext</code>, or a privately-associated <code>FirebaseApp</code>.
1821
+ Admin ops are identity-agnostic (rules are off), so the
1822
+ handle is a FROZEN <code>sandbox</code> target: it does not track
1823
+ <code>sandbox.currentUser</code>.</p>
1824
+ <p>Intended for Studio’s “edit anything as admin” surfaces (F2) and the
1825
+ serve worker’s <code>{ mode: 'admin' }</code> auth lens. For rules-applied
1826
+ impersonation (“act as this user”), use <code>getFirestore(sandbox.withAuth({ uid }))</code> instead.</p>
1827
+ <h5 id="parameters-39">Parameters</h5>
1828
+ <div class="table-scroll">
1829
+
1830
+
1831
+
1832
+
1833
+
1834
+
1835
+
1836
+
1837
+
1838
+
1839
+
1840
+
1841
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>ctx</code></td><td align="left"><code>SandboxContext</code></td></tr></tbody></table></div>
1842
+ <h5 id="returns-56">Returns</h5>
1843
+ <p><a href="#firestore"><code>Firestore</code></a></p>
1844
+ <h5 id="example-2">Example</h5>
1845
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">import</span><span style="color:#ABB2BF"> { </span><span style="color:#E06C75">initializeSandbox</span><span style="color:#ABB2BF"> } </span><span style="color:#C678DD">from</span><span style="color:#98C379"> 'pyric/sandbox'</span><span style="color:#ABB2BF">;</span></span>
1846
+ <span class="line"><span style="color:#C678DD">import</span><span style="color:#ABB2BF"> { </span><span style="color:#E06C75">getAdminFirestore</span><span style="color:#ABB2BF">, </span><span style="color:#E06C75">doc</span><span style="color:#ABB2BF">, </span><span style="color:#E06C75">setDoc</span><span style="color:#ABB2BF"> } </span><span style="color:#C678DD">from</span><span style="color:#98C379"> 'pyric/firestore'</span><span style="color:#ABB2BF">;</span></span>
1847
+ <span class="line"><span style="color:#C678DD">const</span><span style="color:#E5C07B"> sandbox</span><span style="color:#56B6C2"> =</span><span style="color:#61AFEF"> initializeSandbox</span><span style="color:#ABB2BF">();</span></span>
1848
+ <span class="line"><span style="color:#C678DD">const</span><span style="color:#E5C07B"> adminDb</span><span style="color:#56B6C2"> =</span><span style="color:#61AFEF"> getAdminFirestore</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">sandbox</span><span style="color:#ABB2BF">);</span></span>
1849
+ <span class="line"><span style="color:#C678DD">await</span><span style="color:#61AFEF"> setDoc</span><span style="color:#ABB2BF">(</span><span style="color:#61AFEF">doc</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">adminDb</span><span style="color:#ABB2BF">, </span><span style="color:#98C379">'locked/x'</span><span style="color:#ABB2BF">), { </span><span style="color:#E06C75">a</span><span style="color:#ABB2BF">: </span><span style="color:#D19A66">1</span><span style="color:#ABB2BF"> }); </span><span style="color:#7F848E;font-style:italic">// bypasses rules</span></span></code></pre>
1850
+ <h4 id="call-signature-6">Call Signature</h4>
1851
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">function</span><span style="color:#61AFEF"> getAdminFirestore</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75;font-style:italic">app</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">FirebaseApp</span><span style="color:#ABB2BF">): </span><span style="color:#E5C07B">Firestore</span><span style="color:#ABB2BF">;</span></span></code></pre>
1852
+ <p>Construct a <strong>rules-bypassing</strong> sandbox Firestore handle — the Pyric
1853
+ Studio admin lens (Gap #2). Every modular op issued against the returned
1854
+ handle (<code>getDoc</code>/<code>getDocs</code>/<code>setDoc</code>/<code>updateDoc</code>/<code>deleteDoc</code>/<code>addDoc</code>/
1855
+ <code>count</code>/<code>writeBatch</code>/<code>runTransaction</code>) SKIPS security-rule evaluation and
1856
+ is treated as ALLOW, while still going through the same store + emitting
1857
+ the same events + waking the same listeners. This is the modular sibling
1858
+ of the path-string <code>sandbox.admin.*</code> bypass; it reuses the underlying
1859
+ <code>LocalEnvironment</code> bypass execution path (the <code>bypassRules</code> op flag),
1860
+ not a parallel reimplementation.</p>
1861
+ <p>Sandbox-only. There is no prod analog (you cannot bypass deployed
1862
+ security rules from a client), so this overload set accepts only a
1863
+ <code>Sandbox</code>, <code>SandboxContext</code>, or a privately-associated <code>FirebaseApp</code>.
1864
+ Admin ops are identity-agnostic (rules are off), so the
1865
+ handle is a FROZEN <code>sandbox</code> target: it does not track
1866
+ <code>sandbox.currentUser</code>.</p>
1867
+ <p>Intended for Studio’s “edit anything as admin” surfaces (F2) and the
1868
+ serve worker’s <code>{ mode: 'admin' }</code> auth lens. For rules-applied
1869
+ impersonation (“act as this user”), use <code>getFirestore(sandbox.withAuth({ uid }))</code> instead.</p>
1870
+ <h5 id="parameters-40">Parameters</h5>
1871
+ <div class="table-scroll">
1872
+
1873
+
1874
+
1875
+
1876
+
1877
+
1878
+
1879
+
1880
+
1881
+
1882
+
1883
+
1884
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>app</code></td><td align="left"><code>FirebaseApp</code></td></tr></tbody></table></div>
1885
+ <h5 id="returns-57">Returns</h5>
1886
+ <p><a href="#firestore"><code>Firestore</code></a></p>
1887
+ <h5 id="example-3">Example</h5>
1888
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">import</span><span style="color:#ABB2BF"> { </span><span style="color:#E06C75">initializeSandbox</span><span style="color:#ABB2BF"> } </span><span style="color:#C678DD">from</span><span style="color:#98C379"> 'pyric/sandbox'</span><span style="color:#ABB2BF">;</span></span>
1889
+ <span class="line"><span style="color:#C678DD">import</span><span style="color:#ABB2BF"> { </span><span style="color:#E06C75">getAdminFirestore</span><span style="color:#ABB2BF">, </span><span style="color:#E06C75">doc</span><span style="color:#ABB2BF">, </span><span style="color:#E06C75">setDoc</span><span style="color:#ABB2BF"> } </span><span style="color:#C678DD">from</span><span style="color:#98C379"> 'pyric/firestore'</span><span style="color:#ABB2BF">;</span></span>
1890
+ <span class="line"><span style="color:#C678DD">const</span><span style="color:#E5C07B"> sandbox</span><span style="color:#56B6C2"> =</span><span style="color:#61AFEF"> initializeSandbox</span><span style="color:#ABB2BF">();</span></span>
1891
+ <span class="line"><span style="color:#C678DD">const</span><span style="color:#E5C07B"> adminDb</span><span style="color:#56B6C2"> =</span><span style="color:#61AFEF"> getAdminFirestore</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">sandbox</span><span style="color:#ABB2BF">);</span></span>
1892
+ <span class="line"><span style="color:#C678DD">await</span><span style="color:#61AFEF"> setDoc</span><span style="color:#ABB2BF">(</span><span style="color:#61AFEF">doc</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">adminDb</span><span style="color:#ABB2BF">, </span><span style="color:#98C379">'locked/x'</span><span style="color:#ABB2BF">), { </span><span style="color:#E06C75">a</span><span style="color:#ABB2BF">: </span><span style="color:#D19A66">1</span><span style="color:#ABB2BF"> }); </span><span style="color:#7F848E;font-style:italic">// bypasses rules</span></span></code></pre>
1893
+ <hr>
1894
+ <p><a id="getaggregatefromserver"></a></p>
1895
+ <h3 id="getaggregatefromserver">getAggregateFromServer()</h3>
1896
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">function</span><span style="color:#61AFEF"> getAggregateFromServer</span><span style="color:#ABB2BF">&#x3C;</span><span style="color:#E5C07B">S</span><span style="color:#ABB2BF">>(</span><span style="color:#E06C75;font-style:italic">source</span><span style="color:#ABB2BF">:</span></span>
1897
+ <span class="line"><span style="color:#ABB2BF"> | </span><span style="color:#E5C07B">Query</span><span style="color:#ABB2BF">&#x3C;</span><span style="color:#E5C07B">DocumentData</span><span style="color:#ABB2BF">></span></span>
1898
+ <span class="line"><span style="color:#ABB2BF">| </span><span style="color:#E5C07B">CollectionReference</span><span style="color:#ABB2BF">&#x3C;</span><span style="color:#E5C07B">DocumentData</span><span style="color:#ABB2BF">>, </span><span style="color:#E06C75;font-style:italic">spec</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">S</span><span style="color:#ABB2BF">): </span><span style="color:#E5C07B">Promise</span><span style="color:#ABB2BF">&#x3C;</span><span style="color:#E5C07B">AggregateQuerySnapshot</span><span style="color:#ABB2BF">&#x3C;{ [</span><span style="color:#E5C07B">K</span><span style="color:#C678DD"> in</span><span style="color:#E5C07B"> string</span><span style="color:#ABB2BF"> | </span><span style="color:#E5C07B">number</span><span style="color:#ABB2BF"> | </span><span style="color:#E5C07B">symbol</span><span style="color:#ABB2BF">]: </span><span style="color:#E5C07B">number</span><span style="color:#ABB2BF"> }>>;</span></span></code></pre>
1899
+ <p>Run a multi-field aggregate against the query. Spec entries are
1900
+ keyed by caller-chosen aliases; the returned snapshot’s <code>.data()</code>
1901
+ uses the same keys.</p>
1902
+ <p>The sandbox target dispatches straight into the chainable adapter.</p>
1903
+ <h4 id="type-parameters-11">Type Parameters</h4>
1904
+ <div class="table-scroll">
1905
+
1906
+
1907
+
1908
+
1909
+
1910
+
1911
+
1912
+
1913
+
1914
+
1915
+ <table><thead><tr><th align="left">Type Parameter</th></tr></thead><tbody><tr><td align="left"><code>S</code> <em>extends</em> <a href="#aggregatespec"><code>AggregateSpec</code></a></td></tr></tbody></table></div>
1916
+ <h4 id="parameters-41">Parameters</h4>
1917
+ <div class="table-scroll">
1918
+
1919
+
1920
+
1921
+
1922
+
1923
+
1924
+
1925
+
1926
+
1927
+
1928
+
1929
+
1930
+
1931
+
1932
+
1933
+
1934
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>source</code></td><td align="left">| <a href="#query"><code>Query</code></a>&#x3C;<code>DocumentData</code>> | <a href="#collectionreference"><code>CollectionReference</code></a>&#x3C;<code>DocumentData</code>></td></tr><tr><td align="left"><code>spec</code></td><td align="left"><code>S</code></td></tr></tbody></table></div>
1935
+ <h4 id="returns-58">Returns</h4>
1936
+ <p><code>Promise</code>&#x3C;<a href="#aggregatequerysnapshot"><code>AggregateQuerySnapshot</code></a>&#x3C;{ [K in string | number | symbol]: number }>></p>
1937
+ <hr>
1938
+ <p><a id="getcountfromserver"></a></p>
1939
+ <h3 id="getcountfromserver">getCountFromServer()</h3>
1940
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">function</span><span style="color:#61AFEF"> getCountFromServer</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75;font-style:italic">source</span><span style="color:#ABB2BF">:</span></span>
1941
+ <span class="line"><span style="color:#ABB2BF"> | </span><span style="color:#E5C07B">Query</span><span style="color:#ABB2BF">&#x3C;</span><span style="color:#E5C07B">DocumentData</span><span style="color:#ABB2BF">></span></span>
1942
+ <span class="line"><span style="color:#ABB2BF"> | </span><span style="color:#E5C07B">CollectionReference</span><span style="color:#ABB2BF">&#x3C;</span><span style="color:#E5C07B">DocumentData</span><span style="color:#ABB2BF">>): </span><span style="color:#E5C07B">Promise</span><span style="color:#ABB2BF">&#x3C;</span><span style="color:#E5C07B">AggregateQuerySnapshot</span><span style="color:#ABB2BF">&#x3C;{</span></span>
1943
+ <span class="line"><span style="color:#E06C75"> count</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">number</span><span style="color:#ABB2BF">;</span></span>
1944
+ <span class="line"><span style="color:#ABB2BF">}>>;</span></span></code></pre>
1945
+ <p>Count documents matching the query. Returns a snapshot whose
1946
+ <code>.data()</code> yields <code>{ count: N }</code> — same shape <code>firebase/firestore</code>’s
1947
+ <code>getCountFromServer</code> produces.</p>
1948
+ <h4 id="parameters-42">Parameters</h4>
1949
+ <div class="table-scroll">
1950
+
1951
+
1952
+
1953
+
1954
+
1955
+
1956
+
1957
+
1958
+
1959
+
1960
+
1961
+
1962
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>source</code></td><td align="left">| <a href="#query"><code>Query</code></a>&#x3C;<code>DocumentData</code>> | <a href="#collectionreference"><code>CollectionReference</code></a>&#x3C;<code>DocumentData</code>></td></tr></tbody></table></div>
1963
+ <h4 id="returns-59">Returns</h4>
1964
+ <p><code>Promise</code>&#x3C;<a href="#aggregatequerysnapshot"><code>AggregateQuerySnapshot</code></a>&#x3C;{
1965
+ <code>count</code>: <code>number</code>;
1966
+ }>></p>
1967
+ <hr>
1968
+ <p><a id="getdoc"></a></p>
1969
+ <h3 id="getdoc">getDoc()</h3>
1970
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">function</span><span style="color:#61AFEF"> getDoc</span><span style="color:#ABB2BF">&#x3C;</span><span style="color:#E5C07B">T</span><span style="color:#ABB2BF">>(</span><span style="color:#E06C75;font-style:italic">ref</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">DocumentReference</span><span style="color:#ABB2BF">&#x3C;</span><span style="color:#E5C07B">T</span><span style="color:#ABB2BF">>): </span><span style="color:#E5C07B">Promise</span><span style="color:#ABB2BF">&#x3C;</span><span style="color:#E5C07B">DocumentSnapshot</span><span style="color:#ABB2BF">&#x3C;</span><span style="color:#E5C07B">T</span><span style="color:#ABB2BF">>>;</span></span></code></pre>
1971
+ <h4 id="type-parameters-12">Type Parameters</h4>
1972
+ <div class="table-scroll">
1973
+
1974
+
1975
+
1976
+
1977
+
1978
+
1979
+
1980
+
1981
+
1982
+
1983
+
1984
+
1985
+ <table><thead><tr><th align="left">Type Parameter</th><th align="left">Default type</th></tr></thead><tbody><tr><td align="left"><code>T</code></td><td align="left"><code>DocumentData</code></td></tr></tbody></table></div>
1986
+ <h4 id="parameters-43">Parameters</h4>
1987
+ <div class="table-scroll">
1988
+
1989
+
1990
+
1991
+
1992
+
1993
+
1994
+
1995
+
1996
+
1997
+
1998
+
1999
+
2000
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>ref</code></td><td align="left"><a href="#documentreference"><code>DocumentReference</code></a>&#x3C;<code>T</code>></td></tr></tbody></table></div>
2001
+ <h4 id="returns-60">Returns</h4>
2002
+ <p><code>Promise</code>&#x3C;<a href="#documentsnapshot"><code>DocumentSnapshot</code></a>&#x3C;<code>T</code>>></p>
2003
+ <hr>
2004
+ <p><a id="getdocfromcache"></a></p>
2005
+ <h3 id="getdocfromcache">getDocFromCache()</h3>
2006
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">function</span><span style="color:#61AFEF"> getDocFromCache</span><span style="color:#ABB2BF">&#x3C;</span><span style="color:#E5C07B">T</span><span style="color:#ABB2BF">>(</span><span style="color:#E06C75;font-style:italic">ref</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">DocumentReference</span><span style="color:#ABB2BF">&#x3C;</span><span style="color:#E5C07B">T</span><span style="color:#ABB2BF">>): </span><span style="color:#E5C07B">Promise</span><span style="color:#ABB2BF">&#x3C;</span><span style="color:#E5C07B">DocumentSnapshot</span><span style="color:#ABB2BF">&#x3C;</span><span style="color:#E5C07B">T</span><span style="color:#ABB2BF">>>;</span></span></code></pre>
2007
+ <p>Sandbox: delegates to <a href="#getdoc">getDoc</a>. Real Firebase THROWS
2008
+ <code>'unavailable'</code> here on a cache miss (nothing local matches the
2009
+ ref); pyric never misses — the local store always has whatever is
2010
+ there — so this never throws for that reason. Documented divergence,
2011
+ not a claim of parity.</p>
2012
+ <h4 id="type-parameters-13">Type Parameters</h4>
2013
+ <div class="table-scroll">
2014
+
2015
+
2016
+
2017
+
2018
+
2019
+
2020
+
2021
+
2022
+
2023
+
2024
+
2025
+
2026
+ <table><thead><tr><th align="left">Type Parameter</th><th align="left">Default type</th></tr></thead><tbody><tr><td align="left"><code>T</code></td><td align="left"><code>DocumentData</code></td></tr></tbody></table></div>
2027
+ <h4 id="parameters-44">Parameters</h4>
2028
+ <div class="table-scroll">
2029
+
2030
+
2031
+
2032
+
2033
+
2034
+
2035
+
2036
+
2037
+
2038
+
2039
+
2040
+
2041
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>ref</code></td><td align="left"><a href="#documentreference"><code>DocumentReference</code></a>&#x3C;<code>T</code>></td></tr></tbody></table></div>
2042
+ <h4 id="returns-61">Returns</h4>
2043
+ <p><code>Promise</code>&#x3C;<a href="#documentsnapshot"><code>DocumentSnapshot</code></a>&#x3C;<code>T</code>>></p>
2044
+ <hr>
2045
+ <p><a id="getdocfromserver"></a></p>
2046
+ <h3 id="getdocfromserver">getDocFromServer()</h3>
2047
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">function</span><span style="color:#61AFEF"> getDocFromServer</span><span style="color:#ABB2BF">&#x3C;</span><span style="color:#E5C07B">T</span><span style="color:#ABB2BF">>(</span><span style="color:#E06C75;font-style:italic">ref</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">DocumentReference</span><span style="color:#ABB2BF">&#x3C;</span><span style="color:#E5C07B">T</span><span style="color:#ABB2BF">>): </span><span style="color:#E5C07B">Promise</span><span style="color:#ABB2BF">&#x3C;</span><span style="color:#E5C07B">DocumentSnapshot</span><span style="color:#ABB2BF">&#x3C;</span><span style="color:#E5C07B">T</span><span style="color:#ABB2BF">>>;</span></span></code></pre>
2048
+ <p>Sandbox: delegates to <a href="#getdoc">getDoc</a>. The sandbox store IS the
2049
+ authoritative, always-fresh source — there is no separate server
2050
+ round-trip to force, so “from server” and the default read are the
2051
+ same honest thing.</p>
2052
+ <h4 id="type-parameters-14">Type Parameters</h4>
2053
+ <div class="table-scroll">
2054
+
2055
+
2056
+
2057
+
2058
+
2059
+
2060
+
2061
+
2062
+
2063
+
2064
+
2065
+
2066
+ <table><thead><tr><th align="left">Type Parameter</th><th align="left">Default type</th></tr></thead><tbody><tr><td align="left"><code>T</code></td><td align="left"><code>DocumentData</code></td></tr></tbody></table></div>
2067
+ <h4 id="parameters-45">Parameters</h4>
2068
+ <div class="table-scroll">
2069
+
2070
+
2071
+
2072
+
2073
+
2074
+
2075
+
2076
+
2077
+
2078
+
2079
+
2080
+
2081
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>ref</code></td><td align="left"><a href="#documentreference"><code>DocumentReference</code></a>&#x3C;<code>T</code>></td></tr></tbody></table></div>
2082
+ <h4 id="returns-62">Returns</h4>
2083
+ <p><code>Promise</code>&#x3C;<a href="#documentsnapshot"><code>DocumentSnapshot</code></a>&#x3C;<code>T</code>>></p>
2084
+ <hr>
2085
+ <p><a id="getdocs"></a></p>
2086
+ <h3 id="getdocs">getDocs()</h3>
2087
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">function</span><span style="color:#61AFEF"> getDocs</span><span style="color:#ABB2BF">&#x3C;</span><span style="color:#E5C07B">T</span><span style="color:#ABB2BF">>(</span><span style="color:#E06C75;font-style:italic">query</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">Query</span><span style="color:#ABB2BF">&#x3C;</span><span style="color:#E5C07B">T</span><span style="color:#ABB2BF">>): </span><span style="color:#E5C07B">Promise</span><span style="color:#ABB2BF">&#x3C;</span><span style="color:#E5C07B">QuerySnapshot</span><span style="color:#ABB2BF">&#x3C;</span><span style="color:#E5C07B">T</span><span style="color:#ABB2BF">>>;</span></span></code></pre>
2088
+ <h4 id="type-parameters-15">Type Parameters</h4>
2089
+ <div class="table-scroll">
2090
+
2091
+
2092
+
2093
+
2094
+
2095
+
2096
+
2097
+
2098
+
2099
+
2100
+
2101
+
2102
+ <table><thead><tr><th align="left">Type Parameter</th><th align="left">Default type</th></tr></thead><tbody><tr><td align="left"><code>T</code></td><td align="left"><code>DocumentData</code></td></tr></tbody></table></div>
2103
+ <h4 id="parameters-46">Parameters</h4>
2104
+ <div class="table-scroll">
2105
+
2106
+
2107
+
2108
+
2109
+
2110
+
2111
+
2112
+
2113
+
2114
+
2115
+
2116
+
2117
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>query</code></td><td align="left"><a href="#query"><code>Query</code></a>&#x3C;<code>T</code>></td></tr></tbody></table></div>
2118
+ <h4 id="returns-63">Returns</h4>
2119
+ <p><code>Promise</code>&#x3C;<a href="#querysnapshot"><code>QuerySnapshot</code></a>&#x3C;<code>T</code>>></p>
2120
+ <hr>
2121
+ <p><a id="getdocsfromcache"></a></p>
2122
+ <h3 id="getdocsfromcache">getDocsFromCache()</h3>
2123
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">function</span><span style="color:#61AFEF"> getDocsFromCache</span><span style="color:#ABB2BF">&#x3C;</span><span style="color:#E5C07B">T</span><span style="color:#ABB2BF">>(</span><span style="color:#E06C75;font-style:italic">query</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">Query</span><span style="color:#ABB2BF">&#x3C;</span><span style="color:#E5C07B">T</span><span style="color:#ABB2BF">>): </span><span style="color:#E5C07B">Promise</span><span style="color:#ABB2BF">&#x3C;</span><span style="color:#E5C07B">QuerySnapshot</span><span style="color:#ABB2BF">&#x3C;</span><span style="color:#E5C07B">T</span><span style="color:#ABB2BF">>>;</span></span></code></pre>
2124
+ <p>Query-plural form of <a href="#getdocfromcache">getDocFromCache</a> — same cache-miss divergence.</p>
2125
+ <h4 id="type-parameters-16">Type Parameters</h4>
2126
+ <div class="table-scroll">
2127
+
2128
+
2129
+
2130
+
2131
+
2132
+
2133
+
2134
+
2135
+
2136
+
2137
+
2138
+
2139
+ <table><thead><tr><th align="left">Type Parameter</th><th align="left">Default type</th></tr></thead><tbody><tr><td align="left"><code>T</code></td><td align="left"><code>DocumentData</code></td></tr></tbody></table></div>
2140
+ <h4 id="parameters-47">Parameters</h4>
2141
+ <div class="table-scroll">
2142
+
2143
+
2144
+
2145
+
2146
+
2147
+
2148
+
2149
+
2150
+
2151
+
2152
+
2153
+
2154
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>query</code></td><td align="left"><a href="#query"><code>Query</code></a>&#x3C;<code>T</code>></td></tr></tbody></table></div>
2155
+ <h4 id="returns-64">Returns</h4>
2156
+ <p><code>Promise</code>&#x3C;<a href="#querysnapshot"><code>QuerySnapshot</code></a>&#x3C;<code>T</code>>></p>
2157
+ <hr>
2158
+ <p><a id="getdocsfromserver"></a></p>
2159
+ <h3 id="getdocsfromserver">getDocsFromServer()</h3>
2160
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">function</span><span style="color:#61AFEF"> getDocsFromServer</span><span style="color:#ABB2BF">&#x3C;</span><span style="color:#E5C07B">T</span><span style="color:#ABB2BF">>(</span><span style="color:#E06C75;font-style:italic">query</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">Query</span><span style="color:#ABB2BF">&#x3C;</span><span style="color:#E5C07B">T</span><span style="color:#ABB2BF">>): </span><span style="color:#E5C07B">Promise</span><span style="color:#ABB2BF">&#x3C;</span><span style="color:#E5C07B">QuerySnapshot</span><span style="color:#ABB2BF">&#x3C;</span><span style="color:#E5C07B">T</span><span style="color:#ABB2BF">>>;</span></span></code></pre>
2161
+ <p>Query-plural form of <a href="#getdocfromserver">getDocFromServer</a>.</p>
2162
+ <h4 id="type-parameters-17">Type Parameters</h4>
2163
+ <div class="table-scroll">
2164
+
2165
+
2166
+
2167
+
2168
+
2169
+
2170
+
2171
+
2172
+
2173
+
2174
+
2175
+
2176
+ <table><thead><tr><th align="left">Type Parameter</th><th align="left">Default type</th></tr></thead><tbody><tr><td align="left"><code>T</code></td><td align="left"><code>DocumentData</code></td></tr></tbody></table></div>
2177
+ <h4 id="parameters-48">Parameters</h4>
2178
+ <div class="table-scroll">
2179
+
2180
+
2181
+
2182
+
2183
+
2184
+
2185
+
2186
+
2187
+
2188
+
2189
+
2190
+
2191
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>query</code></td><td align="left"><a href="#query"><code>Query</code></a>&#x3C;<code>T</code>></td></tr></tbody></table></div>
2192
+ <h4 id="returns-65">Returns</h4>
2193
+ <p><code>Promise</code>&#x3C;<a href="#querysnapshot"><code>QuerySnapshot</code></a>&#x3C;<code>T</code>>></p>
2194
+ <hr>
2195
+ <p><a id="getfirestore"></a></p>
2196
+ <h3 id="getfirestore">getFirestore()</h3>
2197
+ <h4 id="call-signature-7">Call Signature</h4>
2198
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">function</span><span style="color:#61AFEF"> getFirestore</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75;font-style:italic">ctx</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">SandboxContext</span><span style="color:#ABB2BF">): </span><span style="color:#E5C07B">Firestore</span><span style="color:#ABB2BF">;</span></span></code></pre>
2199
+ <p>Construct a Firestore handle. Three overloads dispatch by the
2200
+ input’s shape:</p>
2201
+ <ul>
2202
+ <li><code>SandboxContext</code> → sandbox-backed Firestore with a frozen
2203
+ identity (the ctx’s <code>auth</code> chosen at <code>getFirestore</code> time). Best
2204
+ for runner/test code that names identity explicitly per
2205
+ scenario.</li>
2206
+ <li><code>Sandbox</code> → sandbox-backed Firestore that reads
2207
+ <code>sandbox.currentUser</code> per-call. Best for app code that drives
2208
+ identity through <code>pyric/auth</code> — every Firestore op evaluates
2209
+ rules under whatever user is currently signed in.</li>
2210
+ </ul>
2211
+ <h5 id="parameters-49">Parameters</h5>
2212
+ <div class="table-scroll">
2213
+
2214
+
2215
+
2216
+
2217
+
2218
+
2219
+
2220
+
2221
+
2222
+
2223
+
2224
+
2225
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>ctx</code></td><td align="left"><code>SandboxContext</code></td></tr></tbody></table></div>
2226
+ <h5 id="returns-66">Returns</h5>
2227
+ <p><a href="#firestore"><code>Firestore</code></a></p>
2228
+ <h5 id="example-4">Example</h5>
2229
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#7F848E;font-style:italic">// Sandbox, frozen identity (runner / explicit tests).</span></span>
2230
+ <span class="line"><span style="color:#C678DD">import</span><span style="color:#ABB2BF"> { </span><span style="color:#E06C75">initializeSandbox</span><span style="color:#ABB2BF"> } </span><span style="color:#C678DD">from</span><span style="color:#98C379"> 'pyric/sandbox'</span><span style="color:#ABB2BF">;</span></span>
2231
+ <span class="line"><span style="color:#C678DD">import</span><span style="color:#ABB2BF"> { </span><span style="color:#E06C75">getFirestore</span><span style="color:#ABB2BF">, </span><span style="color:#E06C75">doc</span><span style="color:#ABB2BF">, </span><span style="color:#E06C75">setDoc</span><span style="color:#ABB2BF"> } </span><span style="color:#C678DD">from</span><span style="color:#98C379"> 'pyric/firestore'</span><span style="color:#ABB2BF">;</span></span>
2232
+ <span class="line"><span style="color:#C678DD">const</span><span style="color:#E5C07B"> sandbox</span><span style="color:#56B6C2"> =</span><span style="color:#61AFEF"> initializeSandbox</span><span style="color:#ABB2BF">();</span></span>
2233
+ <span class="line"><span style="color:#C678DD">const</span><span style="color:#E5C07B"> db</span><span style="color:#56B6C2"> =</span><span style="color:#61AFEF"> getFirestore</span><span style="color:#ABB2BF">(</span><span style="color:#E5C07B">sandbox</span><span style="color:#ABB2BF">.</span><span style="color:#61AFEF">withAuth</span><span style="color:#ABB2BF">({ </span><span style="color:#E06C75">uid</span><span style="color:#ABB2BF">: </span><span style="color:#98C379">'alice'</span><span style="color:#ABB2BF"> }));</span></span>
2234
+ <span class="line"></span>
2235
+ <span class="line"><span style="color:#7F848E;font-style:italic">// Sandbox, live identity (app code paired with pyric/auth).</span></span>
2236
+ <span class="line"><span style="color:#C678DD">import</span><span style="color:#ABB2BF"> { </span><span style="color:#E06C75">initializeSandbox</span><span style="color:#ABB2BF"> } </span><span style="color:#C678DD">from</span><span style="color:#98C379"> 'pyric/sandbox'</span><span style="color:#ABB2BF">;</span></span>
2237
+ <span class="line"><span style="color:#C678DD">import</span><span style="color:#ABB2BF"> { </span><span style="color:#E06C75">getAuth</span><span style="color:#ABB2BF">, </span><span style="color:#E06C75">signInAnonymously</span><span style="color:#ABB2BF"> } </span><span style="color:#C678DD">from</span><span style="color:#98C379"> 'pyric/auth'</span><span style="color:#ABB2BF">;</span></span>
2238
+ <span class="line"><span style="color:#C678DD">const</span><span style="color:#E5C07B"> sandbox</span><span style="color:#56B6C2"> =</span><span style="color:#61AFEF"> initializeSandbox</span><span style="color:#ABB2BF">();</span></span>
2239
+ <span class="line"><span style="color:#C678DD">const</span><span style="color:#E5C07B"> auth</span><span style="color:#56B6C2"> =</span><span style="color:#61AFEF"> getAuth</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">sandbox</span><span style="color:#ABB2BF">);</span></span>
2240
+ <span class="line"><span style="color:#C678DD">const</span><span style="color:#E5C07B"> db</span><span style="color:#56B6C2"> =</span><span style="color:#61AFEF"> getFirestore</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">sandbox</span><span style="color:#ABB2BF">); </span><span style="color:#7F848E;font-style:italic">// reads sandbox.currentUser per op</span></span>
2241
+ <span class="line"><span style="color:#C678DD">await</span><span style="color:#61AFEF"> signInAnonymously</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">auth</span><span style="color:#ABB2BF">); </span><span style="color:#7F848E;font-style:italic">// subsequent db ops use the new identity</span></span>
2242
+ <span class="line"></span>
2243
+ <span class="line"><span style="color:#7F848E;font-style:italic">// Canonical imports are swapped to this mirror in a sandbox process.</span></span>
2244
+ <span class="line"><span style="color:#C678DD">import</span><span style="color:#ABB2BF"> { </span><span style="color:#E06C75">initializeApp</span><span style="color:#ABB2BF"> } </span><span style="color:#C678DD">from</span><span style="color:#98C379"> 'firebase/app'</span><span style="color:#ABB2BF">;</span></span>
2245
+ <span class="line"><span style="color:#C678DD">import</span><span style="color:#ABB2BF"> { </span><span style="color:#E06C75">getFirestore</span><span style="color:#ABB2BF"> } </span><span style="color:#C678DD">from</span><span style="color:#98C379"> 'firebase/firestore'</span><span style="color:#ABB2BF">;</span></span>
2246
+ <span class="line"><span style="color:#C678DD">const</span><span style="color:#E5C07B"> app</span><span style="color:#56B6C2"> =</span><span style="color:#61AFEF"> initializeApp</span><span style="color:#ABB2BF">({ </span><span style="color:#E06C75">projectId</span><span style="color:#ABB2BF">: </span><span style="color:#98C379">'demo-project'</span><span style="color:#ABB2BF"> });</span></span>
2247
+ <span class="line"><span style="color:#C678DD">const</span><span style="color:#E5C07B"> db</span><span style="color:#56B6C2"> =</span><span style="color:#61AFEF"> getFirestore</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">app</span><span style="color:#ABB2BF">);</span></span></code></pre>
2248
+ <h4 id="call-signature-8">Call Signature</h4>
2249
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">function</span><span style="color:#61AFEF"> getFirestore</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75;font-style:italic">sandbox</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">Sandbox</span><span style="color:#ABB2BF">): </span><span style="color:#E5C07B">Firestore</span><span style="color:#ABB2BF">;</span></span></code></pre>
2250
+ <p>Construct a Firestore handle. Three overloads dispatch by the
2251
+ input’s shape:</p>
2252
+ <ul>
2253
+ <li><code>SandboxContext</code> → sandbox-backed Firestore with a frozen
2254
+ identity (the ctx’s <code>auth</code> chosen at <code>getFirestore</code> time). Best
2255
+ for runner/test code that names identity explicitly per
2256
+ scenario.</li>
2257
+ <li><code>Sandbox</code> → sandbox-backed Firestore that reads
2258
+ <code>sandbox.currentUser</code> per-call. Best for app code that drives
2259
+ identity through <code>pyric/auth</code> — every Firestore op evaluates
2260
+ rules under whatever user is currently signed in.</li>
2261
+ </ul>
2262
+ <h5 id="parameters-50">Parameters</h5>
2263
+ <div class="table-scroll">
2264
+
2265
+
2266
+
2267
+
2268
+
2269
+
2270
+
2271
+
2272
+
2273
+
2274
+
2275
+
2276
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>sandbox</code></td><td align="left"><code>Sandbox</code></td></tr></tbody></table></div>
2277
+ <h5 id="returns-67">Returns</h5>
2278
+ <p><a href="#firestore"><code>Firestore</code></a></p>
2279
+ <h5 id="example-5">Example</h5>
2280
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#7F848E;font-style:italic">// Sandbox, frozen identity (runner / explicit tests).</span></span>
2281
+ <span class="line"><span style="color:#C678DD">import</span><span style="color:#ABB2BF"> { </span><span style="color:#E06C75">initializeSandbox</span><span style="color:#ABB2BF"> } </span><span style="color:#C678DD">from</span><span style="color:#98C379"> 'pyric/sandbox'</span><span style="color:#ABB2BF">;</span></span>
2282
+ <span class="line"><span style="color:#C678DD">import</span><span style="color:#ABB2BF"> { </span><span style="color:#E06C75">getFirestore</span><span style="color:#ABB2BF">, </span><span style="color:#E06C75">doc</span><span style="color:#ABB2BF">, </span><span style="color:#E06C75">setDoc</span><span style="color:#ABB2BF"> } </span><span style="color:#C678DD">from</span><span style="color:#98C379"> 'pyric/firestore'</span><span style="color:#ABB2BF">;</span></span>
2283
+ <span class="line"><span style="color:#C678DD">const</span><span style="color:#E5C07B"> sandbox</span><span style="color:#56B6C2"> =</span><span style="color:#61AFEF"> initializeSandbox</span><span style="color:#ABB2BF">();</span></span>
2284
+ <span class="line"><span style="color:#C678DD">const</span><span style="color:#E5C07B"> db</span><span style="color:#56B6C2"> =</span><span style="color:#61AFEF"> getFirestore</span><span style="color:#ABB2BF">(</span><span style="color:#E5C07B">sandbox</span><span style="color:#ABB2BF">.</span><span style="color:#61AFEF">withAuth</span><span style="color:#ABB2BF">({ </span><span style="color:#E06C75">uid</span><span style="color:#ABB2BF">: </span><span style="color:#98C379">'alice'</span><span style="color:#ABB2BF"> }));</span></span>
2285
+ <span class="line"></span>
2286
+ <span class="line"><span style="color:#7F848E;font-style:italic">// Sandbox, live identity (app code paired with pyric/auth).</span></span>
2287
+ <span class="line"><span style="color:#C678DD">import</span><span style="color:#ABB2BF"> { </span><span style="color:#E06C75">initializeSandbox</span><span style="color:#ABB2BF"> } </span><span style="color:#C678DD">from</span><span style="color:#98C379"> 'pyric/sandbox'</span><span style="color:#ABB2BF">;</span></span>
2288
+ <span class="line"><span style="color:#C678DD">import</span><span style="color:#ABB2BF"> { </span><span style="color:#E06C75">getAuth</span><span style="color:#ABB2BF">, </span><span style="color:#E06C75">signInAnonymously</span><span style="color:#ABB2BF"> } </span><span style="color:#C678DD">from</span><span style="color:#98C379"> 'pyric/auth'</span><span style="color:#ABB2BF">;</span></span>
2289
+ <span class="line"><span style="color:#C678DD">const</span><span style="color:#E5C07B"> sandbox</span><span style="color:#56B6C2"> =</span><span style="color:#61AFEF"> initializeSandbox</span><span style="color:#ABB2BF">();</span></span>
2290
+ <span class="line"><span style="color:#C678DD">const</span><span style="color:#E5C07B"> auth</span><span style="color:#56B6C2"> =</span><span style="color:#61AFEF"> getAuth</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">sandbox</span><span style="color:#ABB2BF">);</span></span>
2291
+ <span class="line"><span style="color:#C678DD">const</span><span style="color:#E5C07B"> db</span><span style="color:#56B6C2"> =</span><span style="color:#61AFEF"> getFirestore</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">sandbox</span><span style="color:#ABB2BF">); </span><span style="color:#7F848E;font-style:italic">// reads sandbox.currentUser per op</span></span>
2292
+ <span class="line"><span style="color:#C678DD">await</span><span style="color:#61AFEF"> signInAnonymously</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">auth</span><span style="color:#ABB2BF">); </span><span style="color:#7F848E;font-style:italic">// subsequent db ops use the new identity</span></span>
2293
+ <span class="line"></span>
2294
+ <span class="line"><span style="color:#7F848E;font-style:italic">// Canonical imports are swapped to this mirror in a sandbox process.</span></span>
2295
+ <span class="line"><span style="color:#C678DD">import</span><span style="color:#ABB2BF"> { </span><span style="color:#E06C75">initializeApp</span><span style="color:#ABB2BF"> } </span><span style="color:#C678DD">from</span><span style="color:#98C379"> 'firebase/app'</span><span style="color:#ABB2BF">;</span></span>
2296
+ <span class="line"><span style="color:#C678DD">import</span><span style="color:#ABB2BF"> { </span><span style="color:#E06C75">getFirestore</span><span style="color:#ABB2BF"> } </span><span style="color:#C678DD">from</span><span style="color:#98C379"> 'firebase/firestore'</span><span style="color:#ABB2BF">;</span></span>
2297
+ <span class="line"><span style="color:#C678DD">const</span><span style="color:#E5C07B"> app</span><span style="color:#56B6C2"> =</span><span style="color:#61AFEF"> initializeApp</span><span style="color:#ABB2BF">({ </span><span style="color:#E06C75">projectId</span><span style="color:#ABB2BF">: </span><span style="color:#98C379">'demo-project'</span><span style="color:#ABB2BF"> });</span></span>
2298
+ <span class="line"><span style="color:#C678DD">const</span><span style="color:#E5C07B"> db</span><span style="color:#56B6C2"> =</span><span style="color:#61AFEF"> getFirestore</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">app</span><span style="color:#ABB2BF">);</span></span></code></pre>
2299
+ <h4 id="call-signature-9">Call Signature</h4>
2300
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">function</span><span style="color:#61AFEF"> getFirestore</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75;font-style:italic">app</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">FirebaseApp</span><span style="color:#ABB2BF">): </span><span style="color:#E5C07B">AppFirestore</span><span style="color:#ABB2BF">;</span></span></code></pre>
2301
+ <p>Construct a Firestore handle. Three overloads dispatch by the
2302
+ input’s shape:</p>
2303
+ <ul>
2304
+ <li><code>SandboxContext</code> → sandbox-backed Firestore with a frozen
2305
+ identity (the ctx’s <code>auth</code> chosen at <code>getFirestore</code> time). Best
2306
+ for runner/test code that names identity explicitly per
2307
+ scenario.</li>
2308
+ <li><code>Sandbox</code> → sandbox-backed Firestore that reads
2309
+ <code>sandbox.currentUser</code> per-call. Best for app code that drives
2310
+ identity through <code>pyric/auth</code> — every Firestore op evaluates
2311
+ rules under whatever user is currently signed in.</li>
2312
+ </ul>
2313
+ <h5 id="parameters-51">Parameters</h5>
2314
+ <div class="table-scroll">
2315
+
2316
+
2317
+
2318
+
2319
+
2320
+
2321
+
2322
+
2323
+
2324
+
2325
+
2326
+
2327
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>app</code></td><td align="left"><code>FirebaseApp</code></td></tr></tbody></table></div>
2328
+ <h5 id="returns-68">Returns</h5>
2329
+ <p><a href="#appfirestore"><code>AppFirestore</code></a></p>
2330
+ <h5 id="example-6">Example</h5>
2331
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#7F848E;font-style:italic">// Sandbox, frozen identity (runner / explicit tests).</span></span>
2332
+ <span class="line"><span style="color:#C678DD">import</span><span style="color:#ABB2BF"> { </span><span style="color:#E06C75">initializeSandbox</span><span style="color:#ABB2BF"> } </span><span style="color:#C678DD">from</span><span style="color:#98C379"> 'pyric/sandbox'</span><span style="color:#ABB2BF">;</span></span>
2333
+ <span class="line"><span style="color:#C678DD">import</span><span style="color:#ABB2BF"> { </span><span style="color:#E06C75">getFirestore</span><span style="color:#ABB2BF">, </span><span style="color:#E06C75">doc</span><span style="color:#ABB2BF">, </span><span style="color:#E06C75">setDoc</span><span style="color:#ABB2BF"> } </span><span style="color:#C678DD">from</span><span style="color:#98C379"> 'pyric/firestore'</span><span style="color:#ABB2BF">;</span></span>
2334
+ <span class="line"><span style="color:#C678DD">const</span><span style="color:#E5C07B"> sandbox</span><span style="color:#56B6C2"> =</span><span style="color:#61AFEF"> initializeSandbox</span><span style="color:#ABB2BF">();</span></span>
2335
+ <span class="line"><span style="color:#C678DD">const</span><span style="color:#E5C07B"> db</span><span style="color:#56B6C2"> =</span><span style="color:#61AFEF"> getFirestore</span><span style="color:#ABB2BF">(</span><span style="color:#E5C07B">sandbox</span><span style="color:#ABB2BF">.</span><span style="color:#61AFEF">withAuth</span><span style="color:#ABB2BF">({ </span><span style="color:#E06C75">uid</span><span style="color:#ABB2BF">: </span><span style="color:#98C379">'alice'</span><span style="color:#ABB2BF"> }));</span></span>
2336
+ <span class="line"></span>
2337
+ <span class="line"><span style="color:#7F848E;font-style:italic">// Sandbox, live identity (app code paired with pyric/auth).</span></span>
2338
+ <span class="line"><span style="color:#C678DD">import</span><span style="color:#ABB2BF"> { </span><span style="color:#E06C75">initializeSandbox</span><span style="color:#ABB2BF"> } </span><span style="color:#C678DD">from</span><span style="color:#98C379"> 'pyric/sandbox'</span><span style="color:#ABB2BF">;</span></span>
2339
+ <span class="line"><span style="color:#C678DD">import</span><span style="color:#ABB2BF"> { </span><span style="color:#E06C75">getAuth</span><span style="color:#ABB2BF">, </span><span style="color:#E06C75">signInAnonymously</span><span style="color:#ABB2BF"> } </span><span style="color:#C678DD">from</span><span style="color:#98C379"> 'pyric/auth'</span><span style="color:#ABB2BF">;</span></span>
2340
+ <span class="line"><span style="color:#C678DD">const</span><span style="color:#E5C07B"> sandbox</span><span style="color:#56B6C2"> =</span><span style="color:#61AFEF"> initializeSandbox</span><span style="color:#ABB2BF">();</span></span>
2341
+ <span class="line"><span style="color:#C678DD">const</span><span style="color:#E5C07B"> auth</span><span style="color:#56B6C2"> =</span><span style="color:#61AFEF"> getAuth</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">sandbox</span><span style="color:#ABB2BF">);</span></span>
2342
+ <span class="line"><span style="color:#C678DD">const</span><span style="color:#E5C07B"> db</span><span style="color:#56B6C2"> =</span><span style="color:#61AFEF"> getFirestore</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">sandbox</span><span style="color:#ABB2BF">); </span><span style="color:#7F848E;font-style:italic">// reads sandbox.currentUser per op</span></span>
2343
+ <span class="line"><span style="color:#C678DD">await</span><span style="color:#61AFEF"> signInAnonymously</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">auth</span><span style="color:#ABB2BF">); </span><span style="color:#7F848E;font-style:italic">// subsequent db ops use the new identity</span></span>
2344
+ <span class="line"></span>
2345
+ <span class="line"><span style="color:#7F848E;font-style:italic">// Canonical imports are swapped to this mirror in a sandbox process.</span></span>
2346
+ <span class="line"><span style="color:#C678DD">import</span><span style="color:#ABB2BF"> { </span><span style="color:#E06C75">initializeApp</span><span style="color:#ABB2BF"> } </span><span style="color:#C678DD">from</span><span style="color:#98C379"> 'firebase/app'</span><span style="color:#ABB2BF">;</span></span>
2347
+ <span class="line"><span style="color:#C678DD">import</span><span style="color:#ABB2BF"> { </span><span style="color:#E06C75">getFirestore</span><span style="color:#ABB2BF"> } </span><span style="color:#C678DD">from</span><span style="color:#98C379"> 'firebase/firestore'</span><span style="color:#ABB2BF">;</span></span>
2348
+ <span class="line"><span style="color:#C678DD">const</span><span style="color:#E5C07B"> app</span><span style="color:#56B6C2"> =</span><span style="color:#61AFEF"> initializeApp</span><span style="color:#ABB2BF">({ </span><span style="color:#E06C75">projectId</span><span style="color:#ABB2BF">: </span><span style="color:#98C379">'demo-project'</span><span style="color:#ABB2BF"> });</span></span>
2349
+ <span class="line"><span style="color:#C678DD">const</span><span style="color:#E5C07B"> db</span><span style="color:#56B6C2"> =</span><span style="color:#61AFEF"> getFirestore</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">app</span><span style="color:#ABB2BF">);</span></span></code></pre>
2350
+ <h4 id="call-signature-10">Call Signature</h4>
2351
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">function</span><span style="color:#61AFEF"> getFirestore</span><span style="color:#ABB2BF">(): </span><span style="color:#E5C07B">AppFirestore</span><span style="color:#ABB2BF">;</span></span></code></pre>
2352
+ <p>Construct a Firestore handle. Three overloads dispatch by the
2353
+ input’s shape:</p>
2354
+ <ul>
2355
+ <li><code>SandboxContext</code> → sandbox-backed Firestore with a frozen
2356
+ identity (the ctx’s <code>auth</code> chosen at <code>getFirestore</code> time). Best
2357
+ for runner/test code that names identity explicitly per
2358
+ scenario.</li>
2359
+ <li><code>Sandbox</code> → sandbox-backed Firestore that reads
2360
+ <code>sandbox.currentUser</code> per-call. Best for app code that drives
2361
+ identity through <code>pyric/auth</code> — every Firestore op evaluates
2362
+ rules under whatever user is currently signed in.</li>
2363
+ </ul>
2364
+ <h5 id="returns-69">Returns</h5>
2365
+ <p><a href="#appfirestore"><code>AppFirestore</code></a></p>
2366
+ <h5 id="example-7">Example</h5>
2367
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#7F848E;font-style:italic">// Sandbox, frozen identity (runner / explicit tests).</span></span>
2368
+ <span class="line"><span style="color:#C678DD">import</span><span style="color:#ABB2BF"> { </span><span style="color:#E06C75">initializeSandbox</span><span style="color:#ABB2BF"> } </span><span style="color:#C678DD">from</span><span style="color:#98C379"> 'pyric/sandbox'</span><span style="color:#ABB2BF">;</span></span>
2369
+ <span class="line"><span style="color:#C678DD">import</span><span style="color:#ABB2BF"> { </span><span style="color:#E06C75">getFirestore</span><span style="color:#ABB2BF">, </span><span style="color:#E06C75">doc</span><span style="color:#ABB2BF">, </span><span style="color:#E06C75">setDoc</span><span style="color:#ABB2BF"> } </span><span style="color:#C678DD">from</span><span style="color:#98C379"> 'pyric/firestore'</span><span style="color:#ABB2BF">;</span></span>
2370
+ <span class="line"><span style="color:#C678DD">const</span><span style="color:#E5C07B"> sandbox</span><span style="color:#56B6C2"> =</span><span style="color:#61AFEF"> initializeSandbox</span><span style="color:#ABB2BF">();</span></span>
2371
+ <span class="line"><span style="color:#C678DD">const</span><span style="color:#E5C07B"> db</span><span style="color:#56B6C2"> =</span><span style="color:#61AFEF"> getFirestore</span><span style="color:#ABB2BF">(</span><span style="color:#E5C07B">sandbox</span><span style="color:#ABB2BF">.</span><span style="color:#61AFEF">withAuth</span><span style="color:#ABB2BF">({ </span><span style="color:#E06C75">uid</span><span style="color:#ABB2BF">: </span><span style="color:#98C379">'alice'</span><span style="color:#ABB2BF"> }));</span></span>
2372
+ <span class="line"></span>
2373
+ <span class="line"><span style="color:#7F848E;font-style:italic">// Sandbox, live identity (app code paired with pyric/auth).</span></span>
2374
+ <span class="line"><span style="color:#C678DD">import</span><span style="color:#ABB2BF"> { </span><span style="color:#E06C75">initializeSandbox</span><span style="color:#ABB2BF"> } </span><span style="color:#C678DD">from</span><span style="color:#98C379"> 'pyric/sandbox'</span><span style="color:#ABB2BF">;</span></span>
2375
+ <span class="line"><span style="color:#C678DD">import</span><span style="color:#ABB2BF"> { </span><span style="color:#E06C75">getAuth</span><span style="color:#ABB2BF">, </span><span style="color:#E06C75">signInAnonymously</span><span style="color:#ABB2BF"> } </span><span style="color:#C678DD">from</span><span style="color:#98C379"> 'pyric/auth'</span><span style="color:#ABB2BF">;</span></span>
2376
+ <span class="line"><span style="color:#C678DD">const</span><span style="color:#E5C07B"> sandbox</span><span style="color:#56B6C2"> =</span><span style="color:#61AFEF"> initializeSandbox</span><span style="color:#ABB2BF">();</span></span>
2377
+ <span class="line"><span style="color:#C678DD">const</span><span style="color:#E5C07B"> auth</span><span style="color:#56B6C2"> =</span><span style="color:#61AFEF"> getAuth</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">sandbox</span><span style="color:#ABB2BF">);</span></span>
2378
+ <span class="line"><span style="color:#C678DD">const</span><span style="color:#E5C07B"> db</span><span style="color:#56B6C2"> =</span><span style="color:#61AFEF"> getFirestore</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">sandbox</span><span style="color:#ABB2BF">); </span><span style="color:#7F848E;font-style:italic">// reads sandbox.currentUser per op</span></span>
2379
+ <span class="line"><span style="color:#C678DD">await</span><span style="color:#61AFEF"> signInAnonymously</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">auth</span><span style="color:#ABB2BF">); </span><span style="color:#7F848E;font-style:italic">// subsequent db ops use the new identity</span></span>
2380
+ <span class="line"></span>
2381
+ <span class="line"><span style="color:#7F848E;font-style:italic">// Canonical imports are swapped to this mirror in a sandbox process.</span></span>
2382
+ <span class="line"><span style="color:#C678DD">import</span><span style="color:#ABB2BF"> { </span><span style="color:#E06C75">initializeApp</span><span style="color:#ABB2BF"> } </span><span style="color:#C678DD">from</span><span style="color:#98C379"> 'firebase/app'</span><span style="color:#ABB2BF">;</span></span>
2383
+ <span class="line"><span style="color:#C678DD">import</span><span style="color:#ABB2BF"> { </span><span style="color:#E06C75">getFirestore</span><span style="color:#ABB2BF"> } </span><span style="color:#C678DD">from</span><span style="color:#98C379"> 'firebase/firestore'</span><span style="color:#ABB2BF">;</span></span>
2384
+ <span class="line"><span style="color:#C678DD">const</span><span style="color:#E5C07B"> app</span><span style="color:#56B6C2"> =</span><span style="color:#61AFEF"> initializeApp</span><span style="color:#ABB2BF">({ </span><span style="color:#E06C75">projectId</span><span style="color:#ABB2BF">: </span><span style="color:#98C379">'demo-project'</span><span style="color:#ABB2BF"> });</span></span>
2385
+ <span class="line"><span style="color:#C678DD">const</span><span style="color:#E5C07B"> db</span><span style="color:#56B6C2"> =</span><span style="color:#61AFEF"> getFirestore</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">app</span><span style="color:#ABB2BF">);</span></span></code></pre>
2386
+ <h4 id="call-signature-11">Call Signature</h4>
2387
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">function</span><span style="color:#61AFEF"> getFirestore</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75;font-style:italic">target</span><span style="color:#C678DD">?</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">any</span><span style="color:#ABB2BF">): </span><span style="color:#E5C07B">Firestore</span><span style="color:#ABB2BF">;</span></span></code></pre>
2388
+ <p>Construct a Firestore handle. Three overloads dispatch by the
2389
+ input’s shape:</p>
2390
+ <ul>
2391
+ <li><code>SandboxContext</code> → sandbox-backed Firestore with a frozen
2392
+ identity (the ctx’s <code>auth</code> chosen at <code>getFirestore</code> time). Best
2393
+ for runner/test code that names identity explicitly per
2394
+ scenario.</li>
2395
+ <li><code>Sandbox</code> → sandbox-backed Firestore that reads
2396
+ <code>sandbox.currentUser</code> per-call. Best for app code that drives
2397
+ identity through <code>pyric/auth</code> — every Firestore op evaluates
2398
+ rules under whatever user is currently signed in.</li>
2399
+ </ul>
2400
+ <h5 id="parameters-52">Parameters</h5>
2401
+ <div class="table-scroll">
2402
+
2403
+
2404
+
2405
+
2406
+
2407
+
2408
+
2409
+
2410
+
2411
+
2412
+
2413
+
2414
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>target?</code></td><td align="left"><code>any</code></td></tr></tbody></table></div>
2415
+ <h5 id="returns-70">Returns</h5>
2416
+ <p><a href="#firestore"><code>Firestore</code></a></p>
2417
+ <h5 id="example-8">Example</h5>
2418
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#7F848E;font-style:italic">// Sandbox, frozen identity (runner / explicit tests).</span></span>
2419
+ <span class="line"><span style="color:#C678DD">import</span><span style="color:#ABB2BF"> { </span><span style="color:#E06C75">initializeSandbox</span><span style="color:#ABB2BF"> } </span><span style="color:#C678DD">from</span><span style="color:#98C379"> 'pyric/sandbox'</span><span style="color:#ABB2BF">;</span></span>
2420
+ <span class="line"><span style="color:#C678DD">import</span><span style="color:#ABB2BF"> { </span><span style="color:#E06C75">getFirestore</span><span style="color:#ABB2BF">, </span><span style="color:#E06C75">doc</span><span style="color:#ABB2BF">, </span><span style="color:#E06C75">setDoc</span><span style="color:#ABB2BF"> } </span><span style="color:#C678DD">from</span><span style="color:#98C379"> 'pyric/firestore'</span><span style="color:#ABB2BF">;</span></span>
2421
+ <span class="line"><span style="color:#C678DD">const</span><span style="color:#E5C07B"> sandbox</span><span style="color:#56B6C2"> =</span><span style="color:#61AFEF"> initializeSandbox</span><span style="color:#ABB2BF">();</span></span>
2422
+ <span class="line"><span style="color:#C678DD">const</span><span style="color:#E5C07B"> db</span><span style="color:#56B6C2"> =</span><span style="color:#61AFEF"> getFirestore</span><span style="color:#ABB2BF">(</span><span style="color:#E5C07B">sandbox</span><span style="color:#ABB2BF">.</span><span style="color:#61AFEF">withAuth</span><span style="color:#ABB2BF">({ </span><span style="color:#E06C75">uid</span><span style="color:#ABB2BF">: </span><span style="color:#98C379">'alice'</span><span style="color:#ABB2BF"> }));</span></span>
2423
+ <span class="line"></span>
2424
+ <span class="line"><span style="color:#7F848E;font-style:italic">// Sandbox, live identity (app code paired with pyric/auth).</span></span>
2425
+ <span class="line"><span style="color:#C678DD">import</span><span style="color:#ABB2BF"> { </span><span style="color:#E06C75">initializeSandbox</span><span style="color:#ABB2BF"> } </span><span style="color:#C678DD">from</span><span style="color:#98C379"> 'pyric/sandbox'</span><span style="color:#ABB2BF">;</span></span>
2426
+ <span class="line"><span style="color:#C678DD">import</span><span style="color:#ABB2BF"> { </span><span style="color:#E06C75">getAuth</span><span style="color:#ABB2BF">, </span><span style="color:#E06C75">signInAnonymously</span><span style="color:#ABB2BF"> } </span><span style="color:#C678DD">from</span><span style="color:#98C379"> 'pyric/auth'</span><span style="color:#ABB2BF">;</span></span>
2427
+ <span class="line"><span style="color:#C678DD">const</span><span style="color:#E5C07B"> sandbox</span><span style="color:#56B6C2"> =</span><span style="color:#61AFEF"> initializeSandbox</span><span style="color:#ABB2BF">();</span></span>
2428
+ <span class="line"><span style="color:#C678DD">const</span><span style="color:#E5C07B"> auth</span><span style="color:#56B6C2"> =</span><span style="color:#61AFEF"> getAuth</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">sandbox</span><span style="color:#ABB2BF">);</span></span>
2429
+ <span class="line"><span style="color:#C678DD">const</span><span style="color:#E5C07B"> db</span><span style="color:#56B6C2"> =</span><span style="color:#61AFEF"> getFirestore</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">sandbox</span><span style="color:#ABB2BF">); </span><span style="color:#7F848E;font-style:italic">// reads sandbox.currentUser per op</span></span>
2430
+ <span class="line"><span style="color:#C678DD">await</span><span style="color:#61AFEF"> signInAnonymously</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">auth</span><span style="color:#ABB2BF">); </span><span style="color:#7F848E;font-style:italic">// subsequent db ops use the new identity</span></span>
2431
+ <span class="line"></span>
2432
+ <span class="line"><span style="color:#7F848E;font-style:italic">// Canonical imports are swapped to this mirror in a sandbox process.</span></span>
2433
+ <span class="line"><span style="color:#C678DD">import</span><span style="color:#ABB2BF"> { </span><span style="color:#E06C75">initializeApp</span><span style="color:#ABB2BF"> } </span><span style="color:#C678DD">from</span><span style="color:#98C379"> 'firebase/app'</span><span style="color:#ABB2BF">;</span></span>
2434
+ <span class="line"><span style="color:#C678DD">import</span><span style="color:#ABB2BF"> { </span><span style="color:#E06C75">getFirestore</span><span style="color:#ABB2BF"> } </span><span style="color:#C678DD">from</span><span style="color:#98C379"> 'firebase/firestore'</span><span style="color:#ABB2BF">;</span></span>
2435
+ <span class="line"><span style="color:#C678DD">const</span><span style="color:#E5C07B"> app</span><span style="color:#56B6C2"> =</span><span style="color:#61AFEF"> initializeApp</span><span style="color:#ABB2BF">({ </span><span style="color:#E06C75">projectId</span><span style="color:#ABB2BF">: </span><span style="color:#98C379">'demo-project'</span><span style="color:#ABB2BF"> });</span></span>
2436
+ <span class="line"><span style="color:#C678DD">const</span><span style="color:#E5C07B"> db</span><span style="color:#56B6C2"> =</span><span style="color:#61AFEF"> getFirestore</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">app</span><span style="color:#ABB2BF">);</span></span></code></pre>
2437
+ <hr>
2438
+ <p><a id="increment"></a></p>
2439
+ <h3 id="increment">increment()</h3>
2440
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">function</span><span style="color:#61AFEF"> increment</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75;font-style:italic">n</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">number</span><span style="color:#ABB2BF">): </span><span style="color:#E5C07B">FieldValueSentinel</span><span style="color:#ABB2BF">;</span></span></code></pre>
2441
+ <h4 id="parameters-53">Parameters</h4>
2442
+ <div class="table-scroll">
2443
+
2444
+
2445
+
2446
+
2447
+
2448
+
2449
+
2450
+
2451
+
2452
+
2453
+
2454
+
2455
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>n</code></td><td align="left"><code>number</code></td></tr></tbody></table></div>
2456
+ <h4 id="returns-71">Returns</h4>
2457
+ <p><code>FieldValueSentinel</code></p>
2458
+ <hr>
2459
+ <p><a id="initializefirestore"></a></p>
2460
+ <h3 id="initializefirestore">initializeFirestore()</h3>
2461
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">function</span><span style="color:#61AFEF"> initializeFirestore</span><span style="color:#ABB2BF">(</span></span>
2462
+ <span class="line"><span style="color:#E06C75;font-style:italic"> app</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">any</span><span style="color:#ABB2BF">,</span></span>
2463
+ <span class="line"><span style="color:#E06C75;font-style:italic"> _settings</span><span style="color:#C678DD">?</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">FirestoreSettings</span><span style="color:#ABB2BF">,</span></span>
2464
+ <span class="line"><span style="color:#E06C75;font-style:italic"> _databaseId</span><span style="color:#C678DD">?</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">string</span><span style="color:#ABB2BF">): </span><span style="color:#E5C07B">Firestore</span><span style="color:#ABB2BF">;</span></span></code></pre>
2465
+ <p>Delegates to <a href="#getfirestore">getFirestore</a> and returns the same handle. Accepts
2466
+ the <code>settings</code> argument (so the explicit-init pattern app code commonly
2467
+ writes — <code>initializeFirestore(app, { localCache: persistentLocalCache(...) } )</code>
2468
+ — no longer crashes at import) but no-ops the cache/network settings:
2469
+ persistence is already the sandbox default, so there is nothing left to
2470
+ configure into existence.</p>
2471
+ <h4 id="parameters-54">Parameters</h4>
2472
+ <div class="table-scroll">
2473
+
2474
+
2475
+
2476
+
2477
+
2478
+
2479
+
2480
+
2481
+
2482
+
2483
+
2484
+
2485
+
2486
+
2487
+
2488
+
2489
+
2490
+
2491
+
2492
+
2493
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>app</code></td><td align="left"><code>any</code></td></tr><tr><td align="left"><code>_settings?</code></td><td align="left"><a href="#firestoresettings"><code>FirestoreSettings</code></a></td></tr><tr><td align="left"><code>_databaseId?</code></td><td align="left"><code>string</code></td></tr></tbody></table></div>
2494
+ <h4 id="returns-72">Returns</h4>
2495
+ <p><a href="#firestore"><code>Firestore</code></a></p>
2496
+ <hr>
2497
+ <p><a id="limit"></a></p>
2498
+ <h3 id="limit">limit()</h3>
2499
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">function</span><span style="color:#61AFEF"> limit</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75;font-style:italic">n</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">number</span><span style="color:#ABB2BF">): </span><span style="color:#E5C07B">QueryConstraint</span><span style="color:#ABB2BF">;</span></span></code></pre>
2500
+ <h4 id="parameters-55">Parameters</h4>
2501
+ <div class="table-scroll">
2502
+
2503
+
2504
+
2505
+
2506
+
2507
+
2508
+
2509
+
2510
+
2511
+
2512
+
2513
+
2514
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>n</code></td><td align="left"><code>number</code></td></tr></tbody></table></div>
2515
+ <h4 id="returns-73">Returns</h4>
2516
+ <p><a href="#queryconstraint"><code>QueryConstraint</code></a></p>
2517
+ <hr>
2518
+ <p><a id="limittolast"></a></p>
2519
+ <h3 id="limittolast">limitToLast()</h3>
2520
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">function</span><span style="color:#61AFEF"> limitToLast</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75;font-style:italic">n</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">number</span><span style="color:#ABB2BF">): </span><span style="color:#E5C07B">QueryConstraint</span><span style="color:#ABB2BF">;</span></span></code></pre>
2521
+ <p>Limit the query to the LAST <code>n</code> documents in the ordered result.
2522
+ Requires at least one <code>orderBy</code> on the query (production-aligned —
2523
+ the simulator throws at execute time without one).</p>
2524
+ <h4 id="parameters-56">Parameters</h4>
2525
+ <div class="table-scroll">
2526
+
2527
+
2528
+
2529
+
2530
+
2531
+
2532
+
2533
+
2534
+
2535
+
2536
+
2537
+
2538
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>n</code></td><td align="left"><code>number</code></td></tr></tbody></table></div>
2539
+ <h4 id="returns-74">Returns</h4>
2540
+ <p><a href="#queryconstraint"><code>QueryConstraint</code></a></p>
2541
+ <hr>
2542
+ <p><a id="memoryeagergarbagecollector"></a></p>
2543
+ <h3 id="memoryeagergarbagecollector">memoryEagerGarbageCollector()</h3>
2544
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">function</span><span style="color:#61AFEF"> memoryEagerGarbageCollector</span><span style="color:#ABB2BF">(): </span><span style="color:#E5C07B">MemoryGarbageCollector</span><span style="color:#ABB2BF">;</span></span></code></pre>
2545
+ <p>Inert config token accepted by <a href="#memorylocalcache">memoryLocalCache</a>’s <code>garbageCollector</code>.</p>
2546
+ <h4 id="returns-75">Returns</h4>
2547
+ <p><a href="#memorygarbagecollector"><code>MemoryGarbageCollector</code></a></p>
2548
+ <hr>
2549
+ <p><a id="memorylocalcache"></a></p>
2550
+ <h3 id="memorylocalcache">memoryLocalCache()</h3>
2551
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">function</span><span style="color:#61AFEF"> memoryLocalCache</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75;font-style:italic">settings</span><span style="color:#C678DD">?</span><span style="color:#ABB2BF">: {</span></span>
2552
+ <span class="line"><span style="color:#E06C75"> garbageCollector</span><span style="color:#C678DD">?</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">MemoryGarbageCollector</span><span style="color:#ABB2BF">;</span></span>
2553
+ <span class="line"><span style="color:#ABB2BF">}): </span><span style="color:#E5C07B">LocalCache</span><span style="color:#ABB2BF">;</span></span></code></pre>
2554
+ <p>Inert config token — the memory-cache counterpart of <a href="#persistentlocalcache">persistentLocalCache</a>.</p>
2555
+ <h4 id="parameters-57">Parameters</h4>
2556
+ <div class="table-scroll">
2557
+
2558
+
2559
+
2560
+
2561
+
2562
+
2563
+
2564
+
2565
+
2566
+
2567
+
2568
+
2569
+
2570
+
2571
+
2572
+
2573
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>settings?</code></td><td align="left">{ <code>garbageCollector?</code>: <a href="#memorygarbagecollector"><code>MemoryGarbageCollector</code></a>; }</td></tr><tr><td align="left"><code>settings.garbageCollector?</code></td><td align="left"><a href="#memorygarbagecollector"><code>MemoryGarbageCollector</code></a></td></tr></tbody></table></div>
2574
+ <h4 id="returns-76">Returns</h4>
2575
+ <p><a href="#localcache-1"><code>LocalCache</code></a></p>
2576
+ <hr>
2577
+ <p><a id="memorylrugarbagecollector"></a></p>
2578
+ <h3 id="memorylrugarbagecollector">memoryLruGarbageCollector()</h3>
2579
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">function</span><span style="color:#61AFEF"> memoryLruGarbageCollector</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75;font-style:italic">_settings</span><span style="color:#C678DD">?</span><span style="color:#ABB2BF">: {</span></span>
2580
+ <span class="line"><span style="color:#E06C75"> cacheSizeBytes</span><span style="color:#C678DD">?</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">number</span><span style="color:#ABB2BF">;</span></span>
2581
+ <span class="line"><span style="color:#ABB2BF">}): </span><span style="color:#E5C07B">MemoryGarbageCollector</span><span style="color:#ABB2BF">;</span></span></code></pre>
2582
+ <p>Inert config token accepted by <a href="#memorylocalcache">memoryLocalCache</a>’s <code>garbageCollector</code>.</p>
2583
+ <h4 id="parameters-58">Parameters</h4>
2584
+ <div class="table-scroll">
2585
+
2586
+
2587
+
2588
+
2589
+
2590
+
2591
+
2592
+
2593
+
2594
+
2595
+
2596
+
2597
+
2598
+
2599
+
2600
+
2601
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>_settings?</code></td><td align="left">{ <code>cacheSizeBytes?</code>: <code>number</code>; }</td></tr><tr><td align="left"><code>_settings.cacheSizeBytes?</code></td><td align="left"><code>number</code></td></tr></tbody></table></div>
2602
+ <h4 id="returns-77">Returns</h4>
2603
+ <p><a href="#memorygarbagecollector"><code>MemoryGarbageCollector</code></a></p>
2604
+ <hr>
2605
+ <p><a id="onsnapshot"></a></p>
2606
+ <h3 id="onsnapshot">onSnapshot()</h3>
2607
+ <h4 id="call-signature-12">Call Signature</h4>
2608
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">function</span><span style="color:#61AFEF"> onSnapshot</span><span style="color:#ABB2BF">&#x3C;</span><span style="color:#E5C07B">T</span><span style="color:#ABB2BF">>(</span></span>
2609
+ <span class="line"><span style="color:#E06C75;font-style:italic"> ref</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">T</span><span style="color:#ABB2BF">,</span></span>
2610
+ <span class="line"><span style="color:#E06C75;font-style:italic"> observerOrNext</span><span style="color:#ABB2BF">:</span></span>
2611
+ <span class="line"><span style="color:#ABB2BF"> | </span><span style="color:#E5C07B">SnapshotObserver</span><span style="color:#ABB2BF">&#x3C;</span><span style="color:#E5C07B">unknown</span><span style="color:#ABB2BF">></span></span>
2612
+ <span class="line"><span style="color:#ABB2BF"> | (</span><span style="color:#E06C75;font-style:italic">snap</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">unknown</span><span style="color:#ABB2BF">) </span><span style="color:#C678DD">=></span><span style="color:#E5C07B"> void</span><span style="color:#ABB2BF">,</span></span>
2613
+ <span class="line"><span style="color:#61AFEF"> errorOrNothing</span><span style="color:#C678DD">?</span><span style="color:#ABB2BF">: (</span><span style="color:#E06C75;font-style:italic">error</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">unknown</span><span style="color:#ABB2BF">) </span><span style="color:#C678DD">=></span><span style="color:#E5C07B"> void</span><span style="color:#ABB2BF">): </span><span style="color:#E5C07B">Unsubscribe</span><span style="color:#ABB2BF">;</span></span></code></pre>
2614
+ <h5 id="type-parameters-18">Type Parameters</h5>
2615
+ <div class="table-scroll">
2616
+
2617
+
2618
+
2619
+
2620
+
2621
+
2622
+
2623
+
2624
+
2625
+
2626
+ <table><thead><tr><th align="left">Type Parameter</th></tr></thead><tbody><tr><td align="left"><code>T</code> <em>extends</em> | <a href="#documentreference"><code>DocumentReference</code></a>&#x3C;<code>DocumentData</code>> | <a href="#query"><code>Query</code></a>&#x3C;<code>DocumentData</code>></td></tr></tbody></table></div>
2627
+ <h5 id="parameters-59">Parameters</h5>
2628
+ <div class="table-scroll">
2629
+
2630
+
2631
+
2632
+
2633
+
2634
+
2635
+
2636
+
2637
+
2638
+
2639
+
2640
+
2641
+
2642
+
2643
+
2644
+
2645
+
2646
+
2647
+
2648
+
2649
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>ref</code></td><td align="left"><code>T</code></td></tr><tr><td align="left"><code>observerOrNext</code></td><td align="left">| <a href="#snapshotobserver"><code>SnapshotObserver</code></a>&#x3C;<code>unknown</code>> | (<code>snap</code>: <code>unknown</code>) => <code>void</code></td></tr><tr><td align="left"><code>errorOrNothing?</code></td><td align="left">(<code>error</code>: <code>unknown</code>) => <code>void</code></td></tr></tbody></table></div>
2650
+ <h5 id="returns-78">Returns</h5>
2651
+ <p><a href="#unsubscribe"><code>Unsubscribe</code></a></p>
2652
+ <h4 id="call-signature-13">Call Signature</h4>
2653
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">function</span><span style="color:#61AFEF"> onSnapshot</span><span style="color:#ABB2BF">&#x3C;</span><span style="color:#E5C07B">T</span><span style="color:#ABB2BF">>(</span></span>
2654
+ <span class="line"><span style="color:#E06C75;font-style:italic"> ref</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">T</span><span style="color:#ABB2BF">,</span></span>
2655
+ <span class="line"><span style="color:#E06C75;font-style:italic"> options</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">SnapshotListenOptions</span><span style="color:#ABB2BF">,</span></span>
2656
+ <span class="line"><span style="color:#E06C75;font-style:italic"> observerOrNext</span><span style="color:#ABB2BF">:</span></span>
2657
+ <span class="line"><span style="color:#ABB2BF"> | </span><span style="color:#E5C07B">SnapshotObserver</span><span style="color:#ABB2BF">&#x3C;</span><span style="color:#E5C07B">unknown</span><span style="color:#ABB2BF">></span></span>
2658
+ <span class="line"><span style="color:#ABB2BF"> | (</span><span style="color:#E06C75;font-style:italic">snap</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">unknown</span><span style="color:#ABB2BF">) </span><span style="color:#C678DD">=></span><span style="color:#E5C07B"> void</span><span style="color:#ABB2BF">,</span></span>
2659
+ <span class="line"><span style="color:#61AFEF"> errorOrNothing</span><span style="color:#C678DD">?</span><span style="color:#ABB2BF">: (</span><span style="color:#E06C75;font-style:italic">error</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">unknown</span><span style="color:#ABB2BF">) </span><span style="color:#C678DD">=></span><span style="color:#E5C07B"> void</span><span style="color:#ABB2BF">): </span><span style="color:#E5C07B">Unsubscribe</span><span style="color:#ABB2BF">;</span></span></code></pre>
2660
+ <h5 id="type-parameters-19">Type Parameters</h5>
2661
+ <div class="table-scroll">
2662
+
2663
+
2664
+
2665
+
2666
+
2667
+
2668
+
2669
+
2670
+
2671
+
2672
+ <table><thead><tr><th align="left">Type Parameter</th></tr></thead><tbody><tr><td align="left"><code>T</code> <em>extends</em> | <a href="#documentreference"><code>DocumentReference</code></a>&#x3C;<code>DocumentData</code>> | <a href="#query"><code>Query</code></a>&#x3C;<code>DocumentData</code>></td></tr></tbody></table></div>
2673
+ <h5 id="parameters-60">Parameters</h5>
2674
+ <div class="table-scroll">
2675
+
2676
+
2677
+
2678
+
2679
+
2680
+
2681
+
2682
+
2683
+
2684
+
2685
+
2686
+
2687
+
2688
+
2689
+
2690
+
2691
+
2692
+
2693
+
2694
+
2695
+
2696
+
2697
+
2698
+
2699
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>ref</code></td><td align="left"><code>T</code></td></tr><tr><td align="left"><code>options</code></td><td align="left"><a href="#snapshotlistenoptions"><code>SnapshotListenOptions</code></a></td></tr><tr><td align="left"><code>observerOrNext</code></td><td align="left">| <a href="#snapshotobserver"><code>SnapshotObserver</code></a>&#x3C;<code>unknown</code>> | (<code>snap</code>: <code>unknown</code>) => <code>void</code></td></tr><tr><td align="left"><code>errorOrNothing?</code></td><td align="left">(<code>error</code>: <code>unknown</code>) => <code>void</code></td></tr></tbody></table></div>
2700
+ <h5 id="returns-79">Returns</h5>
2701
+ <p><a href="#unsubscribe"><code>Unsubscribe</code></a></p>
2702
+ <hr>
2703
+ <p><a id="onsnapshotsinsync"></a></p>
2704
+ <h3 id="onsnapshotsinsync">onSnapshotsInSync()</h3>
2705
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">function</span><span style="color:#61AFEF"> onSnapshotsInSync</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75;font-style:italic">db</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">Firestore</span><span style="color:#ABB2BF">, </span><span style="color:#E06C75;font-style:italic">observerOrCallback</span><span style="color:#ABB2BF">:</span></span>
2706
+ <span class="line"><span style="color:#ABB2BF"> | () </span><span style="color:#C678DD">=></span><span style="color:#E5C07B"> void</span></span>
2707
+ <span class="line"><span style="color:#ABB2BF"> | {</span></span>
2708
+ <span class="line"><span style="color:#61AFEF"> complete</span><span style="color:#C678DD">?</span><span style="color:#ABB2BF">: () </span><span style="color:#C678DD">=></span><span style="color:#E5C07B"> void</span><span style="color:#ABB2BF">;</span></span>
2709
+ <span class="line"><span style="color:#61AFEF"> error</span><span style="color:#C678DD">?</span><span style="color:#ABB2BF">: (</span><span style="color:#E06C75;font-style:italic">error</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">unknown</span><span style="color:#ABB2BF">) </span><span style="color:#C678DD">=></span><span style="color:#E5C07B"> void</span><span style="color:#ABB2BF">;</span></span>
2710
+ <span class="line"><span style="color:#61AFEF"> next</span><span style="color:#C678DD">?</span><span style="color:#ABB2BF">: () </span><span style="color:#C678DD">=></span><span style="color:#E5C07B"> void</span><span style="color:#ABB2BF">;</span></span>
2711
+ <span class="line"><span style="color:#ABB2BF">}): </span><span style="color:#E5C07B">Unsubscribe</span><span style="color:#ABB2BF">;</span></span></code></pre>
2712
+ <p>Sandbox: fires the callback once the current snapshot-delivery
2713
+ microtask queue settles — the closest honest approximation of “every
2714
+ active listener has delivered its latest state” available without a
2715
+ true cross-listener sync signal (the sandbox doesn’t track one).
2716
+ This is NOT the real SDK’s guarantee (which is scoped to actual
2717
+ server round-trips); it is scoped to local delivery only.</p>
2718
+ <h4 id="parameters-61">Parameters</h4>
2719
+ <div class="table-scroll">
2720
+
2721
+
2722
+
2723
+
2724
+
2725
+
2726
+
2727
+
2728
+
2729
+
2730
+
2731
+
2732
+
2733
+
2734
+
2735
+
2736
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>db</code></td><td align="left"><a href="#firestore"><code>Firestore</code></a></td></tr><tr><td align="left"><code>observerOrCallback</code></td><td align="left">| () => <code>void</code> | { <code>complete?</code>: () => <code>void</code>; <code>error?</code>: (<code>error</code>: <code>unknown</code>) => <code>void</code>; <code>next?</code>: () => <code>void</code>; }</td></tr></tbody></table></div>
2737
+ <h4 id="returns-80">Returns</h4>
2738
+ <p><a href="#unsubscribe"><code>Unsubscribe</code></a></p>
2739
+ <hr>
2740
+ <p><a id="or"></a></p>
2741
+ <h3 id="or">or()</h3>
2742
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">function</span><span style="color:#61AFEF"> or</span><span style="color:#ABB2BF">(...</span><span style="color:#E06C75;font-style:italic">filters</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">QueryConstraint</span><span style="color:#ABB2BF">[]): </span><span style="color:#E5C07B">QueryConstraint</span><span style="color:#ABB2BF">;</span></span></code></pre>
2743
+ <p>OR composite — at least one of the inner constraints must match.
2744
+ Each argument must itself be a filter constraint (<code>where()</code>, or
2745
+ nested <code>or()</code> / <code>and()</code>); passing <code>orderBy()</code> or <code>limit()</code> here is
2746
+ a type error at runtime.</p>
2747
+ <p>Mirrors <code>firebase/firestore</code>’s <code>or(...filters)</code> shape.</p>
2748
+ <h4 id="parameters-62">Parameters</h4>
2749
+ <div class="table-scroll">
2750
+
2751
+
2752
+
2753
+
2754
+
2755
+
2756
+
2757
+
2758
+
2759
+
2760
+
2761
+
2762
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left">…<code>filters</code></td><td align="left"><a href="#queryconstraint"><code>QueryConstraint</code></a>[]</td></tr></tbody></table></div>
2763
+ <h4 id="returns-81">Returns</h4>
2764
+ <p><a href="#queryconstraint"><code>QueryConstraint</code></a></p>
2765
+ <hr>
2766
+ <p><a id="orderby"></a></p>
2767
+ <h3 id="orderby">orderBy()</h3>
2768
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">function</span><span style="color:#61AFEF"> orderBy</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75;font-style:italic">field</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">string</span><span style="color:#ABB2BF"> | </span><span style="color:#E5C07B">FieldPath</span><span style="color:#ABB2BF">, </span><span style="color:#E06C75;font-style:italic">direction</span><span style="color:#C678DD">?</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">OrderDirection</span><span style="color:#ABB2BF">): </span><span style="color:#E5C07B">QueryConstraint</span><span style="color:#ABB2BF">;</span></span></code></pre>
2769
+ <h4 id="parameters-63">Parameters</h4>
2770
+ <div class="table-scroll">
2771
+
2772
+
2773
+
2774
+
2775
+
2776
+
2777
+
2778
+
2779
+
2780
+
2781
+
2782
+
2783
+
2784
+
2785
+
2786
+
2787
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>field</code></td><td align="left"><code>string</code> | <a href="#fieldpath"><code>FieldPath</code></a></td></tr><tr><td align="left"><code>direction?</code></td><td align="left"><code>OrderDirection</code></td></tr></tbody></table></div>
2788
+ <h4 id="returns-82">Returns</h4>
2789
+ <p><a href="#queryconstraint"><code>QueryConstraint</code></a></p>
2790
+ <hr>
2791
+ <p><a id="persistentlocalcache"></a></p>
2792
+ <h3 id="persistentlocalcache">persistentLocalCache()</h3>
2793
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">function</span><span style="color:#61AFEF"> persistentLocalCache</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75;font-style:italic">settings</span><span style="color:#C678DD">?</span><span style="color:#ABB2BF">: {</span></span>
2794
+ <span class="line"><span style="color:#E06C75"> cacheSizeBytes</span><span style="color:#C678DD">?</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">number</span><span style="color:#ABB2BF">;</span></span>
2795
+ <span class="line"><span style="color:#E06C75"> tabManager</span><span style="color:#C678DD">?</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">PersistentTabManager</span><span style="color:#ABB2BF">;</span></span>
2796
+ <span class="line"><span style="color:#ABB2BF">}): </span><span style="color:#E5C07B">LocalCache</span><span style="color:#ABB2BF">;</span></span></code></pre>
2797
+ <p>Inert config token. Real Firebase uses this to select an on-disk,
2798
+ persistent IndexedDB cache tier; the sandbox has no separate cache
2799
+ tier — persistence is already the default — so this just returns a
2800
+ tagged token <code>initializeFirestore</code> can accept without crashing.</p>
2801
+ <h4 id="parameters-64">Parameters</h4>
2802
+ <div class="table-scroll">
2803
+
2804
+
2805
+
2806
+
2807
+
2808
+
2809
+
2810
+
2811
+
2812
+
2813
+
2814
+
2815
+
2816
+
2817
+
2818
+
2819
+
2820
+
2821
+
2822
+
2823
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>settings?</code></td><td align="left">{ <code>cacheSizeBytes?</code>: <code>number</code>; <code>tabManager?</code>: <a href="#persistenttabmanager"><code>PersistentTabManager</code></a>; }</td></tr><tr><td align="left"><code>settings.cacheSizeBytes?</code></td><td align="left"><code>number</code></td></tr><tr><td align="left"><code>settings.tabManager?</code></td><td align="left"><a href="#persistenttabmanager"><code>PersistentTabManager</code></a></td></tr></tbody></table></div>
2824
+ <h4 id="returns-83">Returns</h4>
2825
+ <p><a href="#localcache-1"><code>LocalCache</code></a></p>
2826
+ <hr>
2827
+ <p><a id="persistentmultipletabmanager"></a></p>
2828
+ <h3 id="persistentmultipletabmanager">persistentMultipleTabManager()</h3>
2829
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">function</span><span style="color:#61AFEF"> persistentMultipleTabManager</span><span style="color:#ABB2BF">(): </span><span style="color:#E5C07B">PersistentTabManager</span><span style="color:#ABB2BF">;</span></span></code></pre>
2830
+ <p>Inert config token accepted by <a href="#persistentlocalcache">persistentLocalCache</a>’s <code>tabManager</code>.</p>
2831
+ <h4 id="returns-84">Returns</h4>
2832
+ <p><a href="#persistenttabmanager"><code>PersistentTabManager</code></a></p>
2833
+ <hr>
2834
+ <p><a id="persistentsingletabmanager"></a></p>
2835
+ <h3 id="persistentsingletabmanager">persistentSingleTabManager()</h3>
2836
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">function</span><span style="color:#61AFEF"> persistentSingleTabManager</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75;font-style:italic">_settings</span><span style="color:#C678DD">?</span><span style="color:#ABB2BF">: {</span></span>
2837
+ <span class="line"><span style="color:#E06C75"> forceOwnership</span><span style="color:#C678DD">?</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">boolean</span><span style="color:#ABB2BF">;</span></span>
2838
+ <span class="line"><span style="color:#ABB2BF">}): </span><span style="color:#E5C07B">PersistentTabManager</span><span style="color:#ABB2BF">;</span></span></code></pre>
2839
+ <p>Inert config token accepted by <a href="#persistentlocalcache">persistentLocalCache</a>’s <code>tabManager</code>.</p>
2840
+ <h4 id="parameters-65">Parameters</h4>
2841
+ <div class="table-scroll">
2842
+
2843
+
2844
+
2845
+
2846
+
2847
+
2848
+
2849
+
2850
+
2851
+
2852
+
2853
+
2854
+
2855
+
2856
+
2857
+
2858
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>_settings?</code></td><td align="left">{ <code>forceOwnership?</code>: <code>boolean</code>; }</td></tr><tr><td align="left"><code>_settings.forceOwnership?</code></td><td align="left"><code>boolean</code></td></tr></tbody></table></div>
2859
+ <h4 id="returns-85">Returns</h4>
2860
+ <p><a href="#persistenttabmanager"><code>PersistentTabManager</code></a></p>
2861
+ <hr>
2862
+ <p><a id="query-1"></a></p>
2863
+ <h3 id="query-1">query()</h3>
2864
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">function</span><span style="color:#61AFEF"> query</span><span style="color:#ABB2BF">&#x3C;</span><span style="color:#E5C07B">T</span><span style="color:#ABB2BF">>(</span><span style="color:#E06C75;font-style:italic">source</span><span style="color:#ABB2BF">:</span></span>
2865
+ <span class="line"><span style="color:#ABB2BF"> | </span><span style="color:#E5C07B">CollectionReference</span><span style="color:#ABB2BF">&#x3C;</span><span style="color:#E5C07B">T</span><span style="color:#ABB2BF">></span></span>
2866
+ <span class="line"><span style="color:#ABB2BF">| </span><span style="color:#E5C07B">Query</span><span style="color:#ABB2BF">&#x3C;</span><span style="color:#E5C07B">T</span><span style="color:#ABB2BF">>, ...</span><span style="color:#E06C75;font-style:italic">constraints</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">QueryConstraint</span><span style="color:#ABB2BF">[]): </span><span style="color:#E5C07B">Query</span><span style="color:#ABB2BF">&#x3C;</span><span style="color:#E5C07B">T</span><span style="color:#ABB2BF">>;</span></span></code></pre>
2867
+ <h4 id="type-parameters-20">Type Parameters</h4>
2868
+ <div class="table-scroll">
2869
+
2870
+
2871
+
2872
+
2873
+
2874
+
2875
+
2876
+
2877
+
2878
+
2879
+
2880
+
2881
+ <table><thead><tr><th align="left">Type Parameter</th><th align="left">Default type</th></tr></thead><tbody><tr><td align="left"><code>T</code></td><td align="left"><code>DocumentData</code></td></tr></tbody></table></div>
2882
+ <h4 id="parameters-66">Parameters</h4>
2883
+ <div class="table-scroll">
2884
+
2885
+
2886
+
2887
+
2888
+
2889
+
2890
+
2891
+
2892
+
2893
+
2894
+
2895
+
2896
+
2897
+
2898
+
2899
+
2900
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>source</code></td><td align="left">| <a href="#collectionreference"><code>CollectionReference</code></a>&#x3C;<code>T</code>> | <a href="#query"><code>Query</code></a>&#x3C;<code>T</code>></td></tr><tr><td align="left">…<code>constraints</code></td><td align="left"><a href="#queryconstraint"><code>QueryConstraint</code></a>[]</td></tr></tbody></table></div>
2901
+ <h4 id="returns-86">Returns</h4>
2902
+ <p><a href="#query"><code>Query</code></a>&#x3C;<code>T</code>></p>
2903
+ <hr>
2904
+ <p><a id="queryequal"></a></p>
2905
+ <h3 id="queryequal">queryEqual()</h3>
2906
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">function</span><span style="color:#61AFEF"> queryEqual</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75;font-style:italic">a</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">Query</span><span style="color:#ABB2BF">, </span><span style="color:#E06C75;font-style:italic">b</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">Query</span><span style="color:#ABB2BF">): </span><span style="color:#E5C07B">boolean</span><span style="color:#ABB2BF">;</span></span></code></pre>
2907
+ <h4 id="parameters-67">Parameters</h4>
2908
+ <div class="table-scroll">
2909
+
2910
+
2911
+
2912
+
2913
+
2914
+
2915
+
2916
+
2917
+
2918
+
2919
+
2920
+
2921
+
2922
+
2923
+
2924
+
2925
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>a</code></td><td align="left"><a href="#query"><code>Query</code></a></td></tr><tr><td align="left"><code>b</code></td><td align="left"><a href="#query"><code>Query</code></a></td></tr></tbody></table></div>
2926
+ <h4 id="returns-87">Returns</h4>
2927
+ <p><code>boolean</code></p>
2928
+ <hr>
2929
+ <p><a id="refequal"></a></p>
2930
+ <h3 id="refequal">refEqual()</h3>
2931
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">function</span><span style="color:#61AFEF"> refEqual</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75;font-style:italic">a</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">DocumentReference</span><span style="color:#ABB2BF">, </span><span style="color:#E06C75;font-style:italic">b</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">DocumentReference</span><span style="color:#ABB2BF">): </span><span style="color:#E5C07B">boolean</span><span style="color:#ABB2BF">;</span></span></code></pre>
2932
+ <h4 id="parameters-68">Parameters</h4>
2933
+ <div class="table-scroll">
2934
+
2935
+
2936
+
2937
+
2938
+
2939
+
2940
+
2941
+
2942
+
2943
+
2944
+
2945
+
2946
+
2947
+
2948
+
2949
+
2950
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>a</code></td><td align="left"><a href="#documentreference"><code>DocumentReference</code></a></td></tr><tr><td align="left"><code>b</code></td><td align="left"><a href="#documentreference"><code>DocumentReference</code></a></td></tr></tbody></table></div>
2951
+ <h4 id="returns-88">Returns</h4>
2952
+ <p><code>boolean</code></p>
2953
+ <hr>
2954
+ <p><a id="runtransaction"></a></p>
2955
+ <h3 id="runtransaction">runTransaction()</h3>
2956
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">function</span><span style="color:#61AFEF"> runTransaction</span><span style="color:#ABB2BF">&#x3C;</span><span style="color:#E5C07B">R</span><span style="color:#ABB2BF">>(</span><span style="color:#E06C75;font-style:italic">db</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">Firestore</span><span style="color:#ABB2BF">, </span><span style="color:#61AFEF">fn</span><span style="color:#ABB2BF">: (</span><span style="color:#E06C75;font-style:italic">tx</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">ChainTransaction</span><span style="color:#ABB2BF">) </span><span style="color:#C678DD">=></span><span style="color:#E5C07B"> R</span><span style="color:#ABB2BF"> | </span><span style="color:#E5C07B">Promise</span><span style="color:#ABB2BF">&#x3C;</span><span style="color:#E5C07B">R</span><span style="color:#ABB2BF">>): </span><span style="color:#E5C07B">Promise</span><span style="color:#ABB2BF">&#x3C;</span><span style="color:#E5C07B">R</span><span style="color:#ABB2BF">>;</span></span></code></pre>
2957
+ <h4 id="type-parameters-21">Type Parameters</h4>
2958
+ <div class="table-scroll">
2959
+
2960
+
2961
+
2962
+
2963
+
2964
+
2965
+
2966
+
2967
+
2968
+
2969
+ <table><thead><tr><th align="left">Type Parameter</th></tr></thead><tbody><tr><td align="left"><code>R</code></td></tr></tbody></table></div>
2970
+ <h4 id="parameters-69">Parameters</h4>
2971
+ <div class="table-scroll">
2972
+
2973
+
2974
+
2975
+
2976
+
2977
+
2978
+
2979
+
2980
+
2981
+
2982
+
2983
+
2984
+
2985
+
2986
+
2987
+
2988
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>db</code></td><td align="left"><a href="#firestore"><code>Firestore</code></a></td></tr><tr><td align="left"><code>fn</code></td><td align="left">(<code>tx</code>: <code>ChainTransaction</code>) => <code>R</code> | <code>Promise</code>&#x3C;<code>R</code>></td></tr></tbody></table></div>
2989
+ <h4 id="returns-89">Returns</h4>
2990
+ <p><code>Promise</code>&#x3C;<code>R</code>></p>
2991
+ <hr>
2992
+ <p><a id="servertimestamp"></a></p>
2993
+ <h3 id="servertimestamp">serverTimestamp()</h3>
2994
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">function</span><span style="color:#61AFEF"> serverTimestamp</span><span style="color:#ABB2BF">(): </span><span style="color:#E5C07B">FieldValueSentinel</span><span style="color:#ABB2BF">;</span></span></code></pre>
2995
+ <h4 id="returns-90">Returns</h4>
2996
+ <p><code>FieldValueSentinel</code></p>
2997
+ <hr>
2998
+ <p><a id="setdoc"></a></p>
2999
+ <h3 id="setdoc">setDoc()</h3>
3000
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">function</span><span style="color:#61AFEF"> setDoc</span><span style="color:#ABB2BF">&#x3C;</span><span style="color:#E5C07B">T</span><span style="color:#ABB2BF">>(</span></span>
3001
+ <span class="line"><span style="color:#E06C75;font-style:italic"> ref</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">DocumentReference</span><span style="color:#ABB2BF">&#x3C;</span><span style="color:#E5C07B">T</span><span style="color:#ABB2BF">>,</span></span>
3002
+ <span class="line"><span style="color:#E06C75;font-style:italic"> data</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">T</span><span style="color:#ABB2BF">,</span></span>
3003
+ <span class="line"><span style="color:#E06C75;font-style:italic">options</span><span style="color:#C678DD">?</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">SetOptions</span><span style="color:#ABB2BF">): </span><span style="color:#E5C07B">Promise</span><span style="color:#ABB2BF">&#x3C;</span><span style="color:#E5C07B">void</span><span style="color:#ABB2BF">>;</span></span></code></pre>
3004
+ <h4 id="type-parameters-22">Type Parameters</h4>
3005
+ <div class="table-scroll">
3006
+
3007
+
3008
+
3009
+
3010
+
3011
+
3012
+
3013
+
3014
+
3015
+
3016
+
3017
+
3018
+ <table><thead><tr><th align="left">Type Parameter</th><th align="left">Default type</th></tr></thead><tbody><tr><td align="left"><code>T</code></td><td align="left"><code>DocumentData</code></td></tr></tbody></table></div>
3019
+ <h4 id="parameters-70">Parameters</h4>
3020
+ <div class="table-scroll">
3021
+
3022
+
3023
+
3024
+
3025
+
3026
+
3027
+
3028
+
3029
+
3030
+
3031
+
3032
+
3033
+
3034
+
3035
+
3036
+
3037
+
3038
+
3039
+
3040
+
3041
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>ref</code></td><td align="left"><a href="#documentreference"><code>DocumentReference</code></a>&#x3C;<code>T</code>></td></tr><tr><td align="left"><code>data</code></td><td align="left"><code>T</code></td></tr><tr><td align="left"><code>options?</code></td><td align="left"><a href="#setoptions"><code>SetOptions</code></a></td></tr></tbody></table></div>
3042
+ <h4 id="returns-91">Returns</h4>
3043
+ <p><code>Promise</code>&#x3C;<code>void</code>></p>
3044
+ <hr>
3045
+ <p><a id="setloglevel"></a></p>
3046
+ <h3 id="setloglevel">setLogLevel()</h3>
3047
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">function</span><span style="color:#61AFEF"> setLogLevel</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75;font-style:italic">logLevel</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">LogLevel</span><span style="color:#ABB2BF">): </span><span style="color:#E5C07B">void</span><span style="color:#ABB2BF">;</span></span></code></pre>
3048
+ <p>Accepted no-op: the sandbox has no modular-SDK-style logger to wire
3049
+ a level into (it uses host-level <code>console</code> logging directly, gated
3050
+ by <code>pyric dev</code>’s own flags, not this call). Exists purely so app
3051
+ code that calls this defensively at startup doesn’t crash on a
3052
+ missing export.</p>
3053
+ <h4 id="parameters-71">Parameters</h4>
3054
+ <div class="table-scroll">
3055
+
3056
+
3057
+
3058
+
3059
+
3060
+
3061
+
3062
+
3063
+
3064
+
3065
+
3066
+
3067
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>logLevel</code></td><td align="left"><a href="#loglevel"><code>LogLevel</code></a></td></tr></tbody></table></div>
3068
+ <h4 id="returns-92">Returns</h4>
3069
+ <p><code>void</code></p>
3070
+ <hr>
3071
+ <p><a id="snapshotequal"></a></p>
3072
+ <h3 id="snapshotequal">snapshotEqual()</h3>
3073
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">function</span><span style="color:#61AFEF"> snapshotEqual</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75;font-style:italic">a</span><span style="color:#ABB2BF">:</span></span>
3074
+ <span class="line"><span style="color:#ABB2BF"> | </span><span style="color:#E5C07B">DocumentSnapshot</span><span style="color:#ABB2BF">&#x3C;</span><span style="color:#E5C07B">DocumentData</span><span style="color:#ABB2BF">></span></span>
3075
+ <span class="line"><span style="color:#ABB2BF"> | </span><span style="color:#E5C07B">QuerySnapshot</span><span style="color:#ABB2BF">&#x3C;</span><span style="color:#E5C07B">DocumentData</span><span style="color:#ABB2BF">>, </span><span style="color:#E06C75;font-style:italic">b</span><span style="color:#ABB2BF">:</span></span>
3076
+ <span class="line"><span style="color:#ABB2BF"> | </span><span style="color:#E5C07B">DocumentSnapshot</span><span style="color:#ABB2BF">&#x3C;</span><span style="color:#E5C07B">DocumentData</span><span style="color:#ABB2BF">></span></span>
3077
+ <span class="line"><span style="color:#ABB2BF"> | </span><span style="color:#E5C07B">QuerySnapshot</span><span style="color:#ABB2BF">&#x3C;</span><span style="color:#E5C07B">DocumentData</span><span style="color:#ABB2BF">>): </span><span style="color:#E5C07B">boolean</span><span style="color:#ABB2BF">;</span></span></code></pre>
3078
+ <h4 id="parameters-72">Parameters</h4>
3079
+ <div class="table-scroll">
3080
+
3081
+
3082
+
3083
+
3084
+
3085
+
3086
+
3087
+
3088
+
3089
+
3090
+
3091
+
3092
+
3093
+
3094
+
3095
+
3096
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>a</code></td><td align="left">| <a href="#documentsnapshot"><code>DocumentSnapshot</code></a>&#x3C;<code>DocumentData</code>> | <a href="#querysnapshot"><code>QuerySnapshot</code></a>&#x3C;<code>DocumentData</code>></td></tr><tr><td align="left"><code>b</code></td><td align="left">| <a href="#documentsnapshot"><code>DocumentSnapshot</code></a>&#x3C;<code>DocumentData</code>> | <a href="#querysnapshot"><code>QuerySnapshot</code></a>&#x3C;<code>DocumentData</code>></td></tr></tbody></table></div>
3097
+ <h4 id="returns-93">Returns</h4>
3098
+ <p><code>boolean</code></p>
3099
+ <hr>
3100
+ <p><a id="startafter"></a></p>
3101
+ <h3 id="startafter">startAfter()</h3>
3102
+ <h4 id="call-signature-14">Call Signature</h4>
3103
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">function</span><span style="color:#61AFEF"> startAfter</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75;font-style:italic">snapshot</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">DocumentSnapshot</span><span style="color:#ABB2BF">): </span><span style="color:#E5C07B">QueryConstraint</span><span style="color:#ABB2BF">;</span></span></code></pre>
3104
+ <p>Same as <code>startAt</code>, but EXCLUDES the document at the cursor — the
3105
+ result starts at the next ordered position.</p>
3106
+ <h5 id="parameters-73">Parameters</h5>
3107
+ <div class="table-scroll">
3108
+
3109
+
3110
+
3111
+
3112
+
3113
+
3114
+
3115
+
3116
+
3117
+
3118
+
3119
+
3120
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>snapshot</code></td><td align="left"><a href="#documentsnapshot"><code>DocumentSnapshot</code></a></td></tr></tbody></table></div>
3121
+ <h5 id="returns-94">Returns</h5>
3122
+ <p><a href="#queryconstraint"><code>QueryConstraint</code></a></p>
3123
+ <h4 id="call-signature-15">Call Signature</h4>
3124
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">function</span><span style="color:#61AFEF"> startAfter</span><span style="color:#ABB2BF">(...</span><span style="color:#E06C75;font-style:italic">values</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">unknown</span><span style="color:#ABB2BF">[]): </span><span style="color:#E5C07B">QueryConstraint</span><span style="color:#ABB2BF">;</span></span></code></pre>
3125
+ <p>Same as <code>startAt</code>, but EXCLUDES the document at the cursor — the
3126
+ result starts at the next ordered position.</p>
3127
+ <h5 id="parameters-74">Parameters</h5>
3128
+ <div class="table-scroll">
3129
+
3130
+
3131
+
3132
+
3133
+
3134
+
3135
+
3136
+
3137
+
3138
+
3139
+
3140
+
3141
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left">…<code>values</code></td><td align="left"><code>unknown</code>[]</td></tr></tbody></table></div>
3142
+ <h5 id="returns-95">Returns</h5>
3143
+ <p><a href="#queryconstraint"><code>QueryConstraint</code></a></p>
3144
+ <hr>
3145
+ <p><a id="startat"></a></p>
3146
+ <h3 id="startat">startAt()</h3>
3147
+ <h4 id="call-signature-16">Call Signature</h4>
3148
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">function</span><span style="color:#61AFEF"> startAt</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75;font-style:italic">snapshot</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">DocumentSnapshot</span><span style="color:#ABB2BF">): </span><span style="color:#E5C07B">QueryConstraint</span><span style="color:#ABB2BF">;</span></span></code></pre>
3149
+ <p>Start the query at the document whose ordered field values match
3150
+ the cursor. Inclusive — the document at the cursor IS included in
3151
+ the result. Two overloads:</p>
3152
+ <p><code>startAt(snapshot)</code> — values come from <code>snapshot.data()</code> indexed
3153
+ by the query’s orderBy fields.
3154
+ <code>startAt(...values)</code> — explicit positional values (one per
3155
+ orderBy clause).</p>
3156
+ <h5 id="parameters-75">Parameters</h5>
3157
+ <div class="table-scroll">
3158
+
3159
+
3160
+
3161
+
3162
+
3163
+
3164
+
3165
+
3166
+
3167
+
3168
+
3169
+
3170
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>snapshot</code></td><td align="left"><a href="#documentsnapshot"><code>DocumentSnapshot</code></a></td></tr></tbody></table></div>
3171
+ <h5 id="returns-96">Returns</h5>
3172
+ <p><a href="#queryconstraint"><code>QueryConstraint</code></a></p>
3173
+ <h4 id="call-signature-17">Call Signature</h4>
3174
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">function</span><span style="color:#61AFEF"> startAt</span><span style="color:#ABB2BF">(...</span><span style="color:#E06C75;font-style:italic">values</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">unknown</span><span style="color:#ABB2BF">[]): </span><span style="color:#E5C07B">QueryConstraint</span><span style="color:#ABB2BF">;</span></span></code></pre>
3175
+ <p>Start the query at the document whose ordered field values match
3176
+ the cursor. Inclusive — the document at the cursor IS included in
3177
+ the result. Two overloads:</p>
3178
+ <p><code>startAt(snapshot)</code> — values come from <code>snapshot.data()</code> indexed
3179
+ by the query’s orderBy fields.
3180
+ <code>startAt(...values)</code> — explicit positional values (one per
3181
+ orderBy clause).</p>
3182
+ <h5 id="parameters-76">Parameters</h5>
3183
+ <div class="table-scroll">
3184
+
3185
+
3186
+
3187
+
3188
+
3189
+
3190
+
3191
+
3192
+
3193
+
3194
+
3195
+
3196
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left">…<code>values</code></td><td align="left"><code>unknown</code>[]</td></tr></tbody></table></div>
3197
+ <h5 id="returns-97">Returns</h5>
3198
+ <p><a href="#queryconstraint"><code>QueryConstraint</code></a></p>
3199
+ <hr>
3200
+ <p><a id="sum"></a></p>
3201
+ <h3 id="sum">sum()</h3>
3202
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">function</span><span style="color:#61AFEF"> sum</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75;font-style:italic">field</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">string</span><span style="color:#ABB2BF">): </span><span style="color:#E5C07B">AggregateField</span><span style="color:#ABB2BF">;</span></span></code></pre>
3203
+ <p>Factory: sum-of-<code>field</code> aggregate.</p>
3204
+ <h4 id="parameters-77">Parameters</h4>
3205
+ <div class="table-scroll">
3206
+
3207
+
3208
+
3209
+
3210
+
3211
+
3212
+
3213
+
3214
+
3215
+
3216
+
3217
+
3218
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>field</code></td><td align="left"><code>string</code></td></tr></tbody></table></div>
3219
+ <h4 id="returns-98">Returns</h4>
3220
+ <p><a href="#aggregatefield"><code>AggregateField</code></a></p>
3221
+ <hr>
3222
+ <p><a id="terminate"></a></p>
3223
+ <h3 id="terminate">terminate()</h3>
3224
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">function</span><span style="color:#61AFEF"> terminate</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75;font-style:italic">db</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">Firestore</span><span style="color:#ABB2BF">): </span><span style="color:#E5C07B">Promise</span><span style="color:#ABB2BF">&#x3C;</span><span style="color:#E5C07B">void</span><span style="color:#ABB2BF">>;</span></span></code></pre>
3225
+ <p>Sandbox: genuinely tears the target down by calling
3226
+ <code>Sandbox.dispose()</code> — NOT a pure no-op like the rest of this family.
3227
+ <code>dispose()</code> tears down listener registries on the sandbox’s
3228
+ environment without replacing it (idempotent, doesn’t touch data).
3229
+ This is the honest mapping of “terminate this Firestore instance”:
3230
+ a real app that calls <code>terminate(db)</code> expects listeners to stop and
3231
+ the instance to be unusable for further meaningful work, and
3232
+ <code>dispose()</code> delivers exactly that for the sandbox.</p>
3233
+ <p>Caveat: <code>dispose()</code> operates on the whole <code>Sandbox</code>, not a
3234
+ Firestore-only slice of it — if <code>pyric/database</code> or <code>pyric/storage</code>
3235
+ share the same <code>Sandbox</code>, their listener registries are torn down
3236
+ too. This differs from the real SDK, where <code>terminate()</code> only
3237
+ affects the one <code>Firestore</code> instance. Documented divergence.</p>
3238
+ <h4 id="parameters-78">Parameters</h4>
3239
+ <div class="table-scroll">
3240
+
3241
+
3242
+
3243
+
3244
+
3245
+
3246
+
3247
+
3248
+
3249
+
3250
+
3251
+
3252
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>db</code></td><td align="left"><a href="#firestore"><code>Firestore</code></a></td></tr></tbody></table></div>
3253
+ <h4 id="returns-99">Returns</h4>
3254
+ <p><code>Promise</code>&#x3C;<code>void</code>></p>
3255
+ <hr>
3256
+ <p><a id="updatedoc"></a></p>
3257
+ <h3 id="updatedoc">updateDoc()</h3>
3258
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">function</span><span style="color:#61AFEF"> updateDoc</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75;font-style:italic">ref</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">DocumentReference</span><span style="color:#ABB2BF">, </span><span style="color:#E06C75;font-style:italic">data</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">DocumentData</span><span style="color:#ABB2BF">): </span><span style="color:#E5C07B">Promise</span><span style="color:#ABB2BF">&#x3C;</span><span style="color:#E5C07B">void</span><span style="color:#ABB2BF">>;</span></span></code></pre>
3259
+ <p><code>updateDoc</code> does NOT run the converter. Matches <code>firebase/firestore</code>’s
3260
+ Web SDK shape — partial updates can target any subset of fields, so
3261
+ a translator built around a full <code>AppModelType</code> would be a type-shape
3262
+ mismatch. Use the underlying <code>DocumentData</code> view (<code>withConverter(ref, null)</code>) for typed-and-untyped mixed access if you need both styles
3263
+ against the same path.</p>
3264
+ <h4 id="parameters-79">Parameters</h4>
3265
+ <div class="table-scroll">
3266
+
3267
+
3268
+
3269
+
3270
+
3271
+
3272
+
3273
+
3274
+
3275
+
3276
+
3277
+
3278
+
3279
+
3280
+
3281
+
3282
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>ref</code></td><td align="left"><a href="#documentreference"><code>DocumentReference</code></a></td></tr><tr><td align="left"><code>data</code></td><td align="left"><code>DocumentData</code></td></tr></tbody></table></div>
3283
+ <h4 id="returns-100">Returns</h4>
3284
+ <p><code>Promise</code>&#x3C;<code>void</code>></p>
3285
+ <hr>
3286
+ <p><a id="vector"></a></p>
3287
+ <h3 id="vector">vector()</h3>
3288
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">function</span><span style="color:#61AFEF"> vector</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75;font-style:italic">values</span><span style="color:#C678DD">?</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">number</span><span style="color:#ABB2BF">[]): </span><span style="color:#E5C07B">VectorValue</span><span style="color:#ABB2BF">;</span></span></code></pre>
3289
+ <h4 id="parameters-80">Parameters</h4>
3290
+ <div class="table-scroll">
3291
+
3292
+
3293
+
3294
+
3295
+
3296
+
3297
+
3298
+
3299
+
3300
+
3301
+
3302
+
3303
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>values?</code></td><td align="left"><code>number</code>[]</td></tr></tbody></table></div>
3304
+ <h4 id="returns-101">Returns</h4>
3305
+ <p><a href="#vectorvalue"><code>VectorValue</code></a></p>
3306
+ <hr>
3307
+ <p><a id="waitforpendingwrites"></a></p>
3308
+ <h3 id="waitforpendingwrites">waitForPendingWrites()</h3>
3309
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">function</span><span style="color:#61AFEF"> waitForPendingWrites</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75;font-style:italic">db</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">Firestore</span><span style="color:#ABB2BF">): </span><span style="color:#E5C07B">Promise</span><span style="color:#ABB2BF">&#x3C;</span><span style="color:#E5C07B">void</span><span style="color:#ABB2BF">>;</span></span></code></pre>
3310
+ <p>Sandbox: resolves immediately. The real SDK’s version waits for
3311
+ queued writes to reach the server; the sandbox has no server to wait
3312
+ on — every write it accepts is already committed to the local store
3313
+ by the time the write’s own promise resolves, so by the time this is
3314
+ called there are, honestly, never any writes still pending a round
3315
+ trip.</p>
3316
+ <h4 id="parameters-81">Parameters</h4>
3317
+ <div class="table-scroll">
3318
+
3319
+
3320
+
3321
+
3322
+
3323
+
3324
+
3325
+
3326
+
3327
+
3328
+
3329
+
3330
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>db</code></td><td align="left"><a href="#firestore"><code>Firestore</code></a></td></tr></tbody></table></div>
3331
+ <h4 id="returns-102">Returns</h4>
3332
+ <p><code>Promise</code>&#x3C;<code>void</code>></p>
3333
+ <hr>
3334
+ <p><a id="where"></a></p>
3335
+ <h3 id="where">where()</h3>
3336
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">function</span><span style="color:#61AFEF"> where</span><span style="color:#ABB2BF">(</span></span>
3337
+ <span class="line"><span style="color:#E06C75;font-style:italic"> field</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">string</span><span style="color:#ABB2BF"> | </span><span style="color:#E5C07B">FieldPath</span><span style="color:#ABB2BF">,</span></span>
3338
+ <span class="line"><span style="color:#E06C75;font-style:italic"> op</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">WhereFilterOp</span><span style="color:#ABB2BF">,</span></span>
3339
+ <span class="line"><span style="color:#E06C75;font-style:italic"> value</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">unknown</span><span style="color:#ABB2BF">): </span><span style="color:#E5C07B">QueryConstraint</span><span style="color:#ABB2BF">;</span></span></code></pre>
3340
+ <h4 id="parameters-82">Parameters</h4>
3341
+ <div class="table-scroll">
3342
+
3343
+
3344
+
3345
+
3346
+
3347
+
3348
+
3349
+
3350
+
3351
+
3352
+
3353
+
3354
+
3355
+
3356
+
3357
+
3358
+
3359
+
3360
+
3361
+
3362
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>field</code></td><td align="left"><code>string</code> | <a href="#fieldpath"><code>FieldPath</code></a></td></tr><tr><td align="left"><code>op</code></td><td align="left"><code>WhereFilterOp</code></td></tr><tr><td align="left"><code>value</code></td><td align="left"><code>unknown</code></td></tr></tbody></table></div>
3363
+ <h4 id="returns-103">Returns</h4>
3364
+ <p><a href="#queryconstraint"><code>QueryConstraint</code></a></p>
3365
+ <hr>
3366
+ <p><a id="withconverter"></a></p>
3367
+ <h3 id="withconverter">withConverter()</h3>
3368
+ <h4 id="call-signature-18">Call Signature</h4>
3369
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">function</span><span style="color:#61AFEF"> withConverter</span><span style="color:#ABB2BF">&#x3C;</span><span style="color:#E5C07B">AppModel</span><span style="color:#ABB2BF">, </span><span style="color:#E5C07B">DbModel</span><span style="color:#ABB2BF">>(</span><span style="color:#E06C75;font-style:italic">ref</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">DocumentReference</span><span style="color:#ABB2BF">&#x3C;</span><span style="color:#E5C07B">DocumentData</span><span style="color:#ABB2BF">>, </span><span style="color:#E06C75;font-style:italic">converter</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">FirestoreDataConverter</span><span style="color:#ABB2BF">&#x3C;</span><span style="color:#E5C07B">AppModel</span><span style="color:#ABB2BF">, </span><span style="color:#E5C07B">DbModel</span><span style="color:#ABB2BF">>): </span><span style="color:#E5C07B">DocumentReference</span><span style="color:#ABB2BF">&#x3C;</span><span style="color:#E5C07B">AppModel</span><span style="color:#ABB2BF">>;</span></span></code></pre>
3370
+ <h5 id="type-parameters-23">Type Parameters</h5>
3371
+ <div class="table-scroll">
3372
+
3373
+
3374
+
3375
+
3376
+
3377
+
3378
+
3379
+
3380
+
3381
+
3382
+
3383
+
3384
+
3385
+
3386
+
3387
+
3388
+ <table><thead><tr><th align="left">Type Parameter</th><th align="left">Default type</th></tr></thead><tbody><tr><td align="left"><code>AppModel</code></td><td align="left">-</td></tr><tr><td align="left"><code>DbModel</code> <em>extends</em> <code>DocumentData</code></td><td align="left"><code>DocumentData</code></td></tr></tbody></table></div>
3389
+ <h5 id="parameters-83">Parameters</h5>
3390
+ <div class="table-scroll">
3391
+
3392
+
3393
+
3394
+
3395
+
3396
+
3397
+
3398
+
3399
+
3400
+
3401
+
3402
+
3403
+
3404
+
3405
+
3406
+
3407
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>ref</code></td><td align="left"><a href="#documentreference"><code>DocumentReference</code></a>&#x3C;<code>DocumentData</code>></td></tr><tr><td align="left"><code>converter</code></td><td align="left"><a href="#firestoredataconverter"><code>FirestoreDataConverter</code></a>&#x3C;<code>AppModel</code>, <code>DbModel</code>></td></tr></tbody></table></div>
3408
+ <h5 id="returns-104">Returns</h5>
3409
+ <p><a href="#documentreference"><code>DocumentReference</code></a>&#x3C;<code>AppModel</code>></p>
3410
+ <h4 id="call-signature-19">Call Signature</h4>
3411
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">function</span><span style="color:#61AFEF"> withConverter</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75;font-style:italic">ref</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">DocumentReference</span><span style="color:#ABB2BF">&#x3C;</span><span style="color:#E5C07B">unknown</span><span style="color:#ABB2BF">>, </span><span style="color:#E06C75;font-style:italic">converter</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">null</span><span style="color:#ABB2BF">): </span><span style="color:#E5C07B">DocumentReference</span><span style="color:#ABB2BF">&#x3C;</span><span style="color:#E5C07B">DocumentData</span><span style="color:#ABB2BF">>;</span></span></code></pre>
3412
+ <h5 id="parameters-84">Parameters</h5>
3413
+ <div class="table-scroll">
3414
+
3415
+
3416
+
3417
+
3418
+
3419
+
3420
+
3421
+
3422
+
3423
+
3424
+
3425
+
3426
+
3427
+
3428
+
3429
+
3430
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>ref</code></td><td align="left"><a href="#documentreference"><code>DocumentReference</code></a>&#x3C;<code>unknown</code>></td></tr><tr><td align="left"><code>converter</code></td><td align="left"><code>null</code></td></tr></tbody></table></div>
3431
+ <h5 id="returns-105">Returns</h5>
3432
+ <p><a href="#documentreference"><code>DocumentReference</code></a>&#x3C;<code>DocumentData</code>></p>
3433
+ <h4 id="call-signature-20">Call Signature</h4>
3434
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">function</span><span style="color:#61AFEF"> withConverter</span><span style="color:#ABB2BF">&#x3C;</span><span style="color:#E5C07B">AppModel</span><span style="color:#ABB2BF">, </span><span style="color:#E5C07B">DbModel</span><span style="color:#ABB2BF">>(</span><span style="color:#E06C75;font-style:italic">ref</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">CollectionReference</span><span style="color:#ABB2BF">&#x3C;</span><span style="color:#E5C07B">DocumentData</span><span style="color:#ABB2BF">>, </span><span style="color:#E06C75;font-style:italic">converter</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">FirestoreDataConverter</span><span style="color:#ABB2BF">&#x3C;</span><span style="color:#E5C07B">AppModel</span><span style="color:#ABB2BF">, </span><span style="color:#E5C07B">DbModel</span><span style="color:#ABB2BF">>): </span><span style="color:#E5C07B">CollectionReference</span><span style="color:#ABB2BF">&#x3C;</span><span style="color:#E5C07B">AppModel</span><span style="color:#ABB2BF">>;</span></span></code></pre>
3435
+ <h5 id="type-parameters-24">Type Parameters</h5>
3436
+ <div class="table-scroll">
3437
+
3438
+
3439
+
3440
+
3441
+
3442
+
3443
+
3444
+
3445
+
3446
+
3447
+
3448
+
3449
+
3450
+
3451
+
3452
+
3453
+ <table><thead><tr><th align="left">Type Parameter</th><th align="left">Default type</th></tr></thead><tbody><tr><td align="left"><code>AppModel</code></td><td align="left">-</td></tr><tr><td align="left"><code>DbModel</code> <em>extends</em> <code>DocumentData</code></td><td align="left"><code>DocumentData</code></td></tr></tbody></table></div>
3454
+ <h5 id="parameters-85">Parameters</h5>
3455
+ <div class="table-scroll">
3456
+
3457
+
3458
+
3459
+
3460
+
3461
+
3462
+
3463
+
3464
+
3465
+
3466
+
3467
+
3468
+
3469
+
3470
+
3471
+
3472
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>ref</code></td><td align="left"><a href="#collectionreference"><code>CollectionReference</code></a>&#x3C;<code>DocumentData</code>></td></tr><tr><td align="left"><code>converter</code></td><td align="left"><a href="#firestoredataconverter"><code>FirestoreDataConverter</code></a>&#x3C;<code>AppModel</code>, <code>DbModel</code>></td></tr></tbody></table></div>
3473
+ <h5 id="returns-106">Returns</h5>
3474
+ <p><a href="#collectionreference"><code>CollectionReference</code></a>&#x3C;<code>AppModel</code>></p>
3475
+ <h4 id="call-signature-21">Call Signature</h4>
3476
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">function</span><span style="color:#61AFEF"> withConverter</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75;font-style:italic">ref</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">CollectionReference</span><span style="color:#ABB2BF">&#x3C;</span><span style="color:#E5C07B">unknown</span><span style="color:#ABB2BF">>, </span><span style="color:#E06C75;font-style:italic">converter</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">null</span><span style="color:#ABB2BF">): </span><span style="color:#E5C07B">CollectionReference</span><span style="color:#ABB2BF">&#x3C;</span><span style="color:#E5C07B">DocumentData</span><span style="color:#ABB2BF">>;</span></span></code></pre>
3477
+ <h5 id="parameters-86">Parameters</h5>
3478
+ <div class="table-scroll">
3479
+
3480
+
3481
+
3482
+
3483
+
3484
+
3485
+
3486
+
3487
+
3488
+
3489
+
3490
+
3491
+
3492
+
3493
+
3494
+
3495
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>ref</code></td><td align="left"><a href="#collectionreference"><code>CollectionReference</code></a>&#x3C;<code>unknown</code>></td></tr><tr><td align="left"><code>converter</code></td><td align="left"><code>null</code></td></tr></tbody></table></div>
3496
+ <h5 id="returns-107">Returns</h5>
3497
+ <p><a href="#collectionreference"><code>CollectionReference</code></a>&#x3C;<code>DocumentData</code>></p>
3498
+ <h4 id="call-signature-22">Call Signature</h4>
3499
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">function</span><span style="color:#61AFEF"> withConverter</span><span style="color:#ABB2BF">&#x3C;</span><span style="color:#E5C07B">AppModel</span><span style="color:#ABB2BF">, </span><span style="color:#E5C07B">DbModel</span><span style="color:#ABB2BF">>(</span><span style="color:#E06C75;font-style:italic">q</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">Query</span><span style="color:#ABB2BF">&#x3C;</span><span style="color:#E5C07B">DocumentData</span><span style="color:#ABB2BF">>, </span><span style="color:#E06C75;font-style:italic">converter</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">FirestoreDataConverter</span><span style="color:#ABB2BF">&#x3C;</span><span style="color:#E5C07B">AppModel</span><span style="color:#ABB2BF">, </span><span style="color:#E5C07B">DbModel</span><span style="color:#ABB2BF">>): </span><span style="color:#E5C07B">Query</span><span style="color:#ABB2BF">&#x3C;</span><span style="color:#E5C07B">AppModel</span><span style="color:#ABB2BF">>;</span></span></code></pre>
3500
+ <h5 id="type-parameters-25">Type Parameters</h5>
3501
+ <div class="table-scroll">
3502
+
3503
+
3504
+
3505
+
3506
+
3507
+
3508
+
3509
+
3510
+
3511
+
3512
+
3513
+
3514
+
3515
+
3516
+
3517
+
3518
+ <table><thead><tr><th align="left">Type Parameter</th><th align="left">Default type</th></tr></thead><tbody><tr><td align="left"><code>AppModel</code></td><td align="left">-</td></tr><tr><td align="left"><code>DbModel</code> <em>extends</em> <code>DocumentData</code></td><td align="left"><code>DocumentData</code></td></tr></tbody></table></div>
3519
+ <h5 id="parameters-87">Parameters</h5>
3520
+ <div class="table-scroll">
3521
+
3522
+
3523
+
3524
+
3525
+
3526
+
3527
+
3528
+
3529
+
3530
+
3531
+
3532
+
3533
+
3534
+
3535
+
3536
+
3537
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>q</code></td><td align="left"><a href="#query"><code>Query</code></a>&#x3C;<code>DocumentData</code>></td></tr><tr><td align="left"><code>converter</code></td><td align="left"><a href="#firestoredataconverter"><code>FirestoreDataConverter</code></a>&#x3C;<code>AppModel</code>, <code>DbModel</code>></td></tr></tbody></table></div>
3538
+ <h5 id="returns-108">Returns</h5>
3539
+ <p><a href="#query"><code>Query</code></a>&#x3C;<code>AppModel</code>></p>
3540
+ <h4 id="call-signature-23">Call Signature</h4>
3541
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">function</span><span style="color:#61AFEF"> withConverter</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75;font-style:italic">q</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">Query</span><span style="color:#ABB2BF">&#x3C;</span><span style="color:#E5C07B">unknown</span><span style="color:#ABB2BF">>, </span><span style="color:#E06C75;font-style:italic">converter</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">null</span><span style="color:#ABB2BF">): </span><span style="color:#E5C07B">Query</span><span style="color:#ABB2BF">&#x3C;</span><span style="color:#E5C07B">DocumentData</span><span style="color:#ABB2BF">>;</span></span></code></pre>
3542
+ <h5 id="parameters-88">Parameters</h5>
3543
+ <div class="table-scroll">
3544
+
3545
+
3546
+
3547
+
3548
+
3549
+
3550
+
3551
+
3552
+
3553
+
3554
+
3555
+
3556
+
3557
+
3558
+
3559
+
3560
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>q</code></td><td align="left"><a href="#query"><code>Query</code></a>&#x3C;<code>unknown</code>></td></tr><tr><td align="left"><code>converter</code></td><td align="left"><code>null</code></td></tr></tbody></table></div>
3561
+ <h5 id="returns-109">Returns</h5>
3562
+ <p><a href="#query"><code>Query</code></a>&#x3C;<code>DocumentData</code>></p>
3563
+ <hr>
3564
+ <p><a id="writebatch-1"></a></p>
3565
+ <h3 id="writebatch-1">writeBatch()</h3>
3566
+ <pre class="astro-code one-dark-pro" style="background-color:#282c34;color:#abb2bf; overflow-x: auto;" tabindex="0" data-language="ts"><code><span class="line"><span style="color:#C678DD">function</span><span style="color:#61AFEF"> writeBatch</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75;font-style:italic">db</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">Firestore</span><span style="color:#ABB2BF">): </span><span style="color:#E5C07B">ChainWriteBatch</span><span style="color:#ABB2BF">;</span></span></code></pre>
3567
+ <h4 id="parameters-89">Parameters</h4>
3568
+ <div class="table-scroll">
3569
+
3570
+
3571
+
3572
+
3573
+
3574
+
3575
+
3576
+
3577
+
3578
+
3579
+
3580
+
3581
+ <table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>db</code></td><td align="left"><a href="#firestore"><code>Firestore</code></a></td></tr></tbody></table></div>
3582
+ <h4 id="returns-110">Returns</h4>
3583
+ <p><code>ChainWriteBatch</code></p>
3584
+ <h2 id="references">References</h2>
3585
+ <p><a id="documentdata"></a></p>
3586
+ <h3 id="documentdata">DocumentData</h3>
3587
+ <p>Renames and re-exports <a href="#authstate">AuthState</a></p>
3588
+ <hr>
3589
+ <p><a id="fieldvalue"></a></p>
3590
+ <h3 id="fieldvalue">FieldValue</h3>
3591
+ <p>Renames and re-exports <a href="#authstate">AuthState</a></p>
3592
+ <hr>
3593
+ <p><a id="fieldvaluesentinel"></a></p>
3594
+ <h3 id="fieldvaluesentinel">FieldValueSentinel</h3>
3595
+ <p>Renames and re-exports <a href="#authstate">AuthState</a></p>
3596
+ <hr>
3597
+ <p><a id="lintresult"></a></p>
3598
+ <h3 id="lintresult">LintResult</h3>
3599
+ <p>Renames and re-exports <a href="#authstate">AuthState</a></p>
3600
+ <hr>
3601
+ <p><a id="orderdirection"></a></p>
3602
+ <h3 id="orderdirection">OrderDirection</h3>
3603
+ <p>Renames and re-exports <a href="#authstate">AuthState</a></p>
3604
+ <hr>
3605
+ <p><a id="sandbox"></a></p>
3606
+ <h3 id="sandbox">Sandbox</h3>
3607
+ <p>Renames and re-exports <a href="#authstate">AuthState</a></p>
3608
+ <hr>
3609
+ <p><a id="sandboxcontext"></a></p>
3610
+ <h3 id="sandboxcontext">SandboxContext</h3>
3611
+ <p>Renames and re-exports <a href="#authstate">AuthState</a></p>
3612
+ <hr>
3613
+ <p><a id="sandboxerror"></a></p>
3614
+ <h3 id="sandboxerror">SandboxError</h3>
3615
+ <p>Renames and re-exports <a href="#authstate">AuthState</a></p>
3616
+ <hr>
3617
+ <p><a id="timestamp"></a></p>
3618
+ <h3 id="timestamp">Timestamp</h3>
3619
+ <p>Renames and re-exports <a href="#authstate">AuthState</a></p>
3620
+ <hr>
3621
+ <p><a id="wherefilterop"></a></p>
3622
+ <h3 id="wherefilterop">WhereFilterOp</h3>
3623
+ <p>Renames and re-exports <a href="#authstate">AuthState</a></p> </article> </main> <aside class="doc-toc api-symbols" aria-label="API symbols"> <h2 class="doc-toc-heading">Symbols</h2> <input class="api-symbol-filter" type="search" placeholder="Filter symbols" aria-label="Filter API symbols" data-api-symbol-filter> <div class="api-symbol-groups" data-api-symbol-groups> <section class="api-symbol-group" data-api-symbol-group> <a class="api-symbol-kind" href="#classes"> Classes </a> <ul> <li data-api-symbol="bytes"> <a href="#bytes">Bytes</a> </li><li data-api-symbol="fieldpath"> <a href="#fieldpath">FieldPath</a> </li><li data-api-symbol="geopoint"> <a href="#geopoint">GeoPoint</a> </li><li data-api-symbol="vectorvalue"> <a href="#vectorvalue">VectorValue</a> </li> </ul> </section><section class="api-symbol-group" data-api-symbol-group> <a class="api-symbol-kind" href="#interfaces"> Interfaces </a> <ul> <li data-api-symbol="aggregatequerysnapshot"> <a href="#aggregatequerysnapshot">AggregateQuerySnapshot</a> </li><li data-api-symbol="collectionreference"> <a href="#collectionreference">CollectionReference</a> </li><li data-api-symbol="documentreference"> <a href="#documentreference">DocumentReference</a> </li><li data-api-symbol="documentsnapshot"> <a href="#documentsnapshot">DocumentSnapshot</a> </li><li data-api-symbol="firestore"> <a href="#firestore">Firestore</a> </li><li data-api-symbol="firestoredataconverter"> <a href="#firestoredataconverter">FirestoreDataConverter</a> </li><li data-api-symbol="firestoredatatooldeps"> <a href="#firestoredatatooldeps">FirestoreDataToolDeps</a> </li><li data-api-symbol="firestoreinspecttooldeps"> <a href="#firestoreinspecttooldeps">FirestoreInspectToolDeps</a> </li><li data-api-symbol="firestoresettings"> <a href="#firestoresettings">FirestoreSettings</a> </li><li data-api-symbol="localcache"> <a href="#localcache">LocalCache</a> </li><li data-api-symbol="memorygarbagecollector"> <a href="#memorygarbagecollector">MemoryGarbageCollector</a> </li><li data-api-symbol="persistencesettings"> <a href="#persistencesettings">PersistenceSettings</a> </li><li data-api-symbol="persistenttabmanager"> <a href="#persistenttabmanager">PersistentTabManager</a> </li><li data-api-symbol="query"> <a href="#query">Query</a> </li><li data-api-symbol="queryconstraint"> <a href="#queryconstraint">QueryConstraint</a> </li><li data-api-symbol="querydocumentsnapshot"> <a href="#querydocumentsnapshot">QueryDocumentSnapshot</a> </li><li data-api-symbol="querysnapshot"> <a href="#querysnapshot">QuerySnapshot</a> </li><li data-api-symbol="setoptions"> <a href="#setoptions">SetOptions</a> </li><li data-api-symbol="snapshotlistenoptions"> <a href="#snapshotlistenoptions">SnapshotListenOptions</a> </li><li data-api-symbol="snapshotobserver"> <a href="#snapshotobserver">SnapshotObserver</a> </li><li data-api-symbol="userauth"> <a href="#userauth">UserAuth</a> </li> </ul> </section><section class="api-symbol-group" data-api-symbol-group> <a class="api-symbol-kind" href="#type-aliases"> Type Aliases </a> <ul> <li data-api-symbol="aggregatefield"> <a href="#aggregatefield">AggregateField</a> </li><li data-api-symbol="aggregatespec"> <a href="#aggregatespec">AggregateSpec</a> </li><li data-api-symbol="appfirestore"> <a href="#appfirestore">AppFirestore</a> </li><li data-api-symbol="as"> <a href="#as">As</a> </li><li data-api-symbol="authstate"> <a href="#authstate">AuthState</a> </li><li data-api-symbol="loglevel"> <a href="#loglevel">LogLevel</a> </li><li data-api-symbol="transaction"> <a href="#transaction">Transaction</a> </li><li data-api-symbol="unsubscribe()"> <a href="#unsubscribe">Unsubscribe()</a> </li><li data-api-symbol="writebatch"> <a href="#writebatch">WriteBatch</a> </li> </ul> </section><section class="api-symbol-group" data-api-symbol-group> <a class="api-symbol-kind" href="#variables"> Variables </a> <ul> <li data-api-symbol="target_symbol"> <a href="#target_symbol">TARGET_SYMBOL</a> </li> </ul> </section><section class="api-symbol-group" data-api-symbol-group> <a class="api-symbol-kind" href="#functions"> Functions </a> <ul> <li data-api-symbol="actingas()"> <a href="#actingas">actingAs()</a> </li><li data-api-symbol="adddoc()"> <a href="#adddoc">addDoc()</a> </li><li data-api-symbol="and()"> <a href="#and">and()</a> </li><li data-api-symbol="arrayremove()"> <a href="#arrayremove">arrayRemove()</a> </li><li data-api-symbol="arrayunion()"> <a href="#arrayunion">arrayUnion()</a> </li><li data-api-symbol="average()"> <a href="#average">average()</a> </li><li data-api-symbol="clearindexeddbpersistence()"> <a href="#clearindexeddbpersistence">clearIndexedDbPersistence()</a> </li><li data-api-symbol="collection()"> <a href="#collection">collection()</a> </li><li data-api-symbol="collectiongroup()"> <a href="#collectiongroup">collectionGroup()</a> </li><li data-api-symbol="connectfirestoreemulator()"> <a href="#connectfirestoreemulator">connectFirestoreEmulator()</a> </li><li data-api-symbol="count()"> <a href="#count">count()</a> </li><li data-api-symbol="createfirestoredatatools()"> <a href="#createfirestoredatatools">createFirestoreDataTools()</a> </li><li data-api-symbol="createfirestoreinspecttools()"> <a href="#createfirestoreinspecttools">createFirestoreInspectTools()</a> </li><li data-api-symbol="deletedoc()"> <a href="#deletedoc">deleteDoc()</a> </li><li data-api-symbol="deletefield()"> <a href="#deletefield">deleteField()</a> </li><li data-api-symbol="disablenetwork()"> <a href="#disablenetwork">disableNetwork()</a> </li><li data-api-symbol="doc()"> <a href="#doc">doc()</a> </li><li data-api-symbol="documentid()"> <a href="#documentid">documentId()</a> </li><li data-api-symbol="enableindexeddbpersistence()"> <a href="#enableindexeddbpersistence">enableIndexedDbPersistence()</a> </li><li data-api-symbol="enablemultitabindexeddbpersistence()"> <a href="#enablemultitabindexeddbpersistence">enableMultiTabIndexedDbPersistence()</a> </li><li data-api-symbol="enablenetwork()"> <a href="#enablenetwork">enableNetwork()</a> </li><li data-api-symbol="endat()"> <a href="#endat">endAt()</a> </li><li data-api-symbol="endbefore()"> <a href="#endbefore">endBefore()</a> </li><li data-api-symbol="getadminfirestore()"> <a href="#getadminfirestore">getAdminFirestore()</a> </li><li data-api-symbol="getaggregatefromserver()"> <a href="#getaggregatefromserver">getAggregateFromServer()</a> </li><li data-api-symbol="getcountfromserver()"> <a href="#getcountfromserver">getCountFromServer()</a> </li><li data-api-symbol="getdoc()"> <a href="#getdoc">getDoc()</a> </li><li data-api-symbol="getdocfromcache()"> <a href="#getdocfromcache">getDocFromCache()</a> </li><li data-api-symbol="getdocfromserver()"> <a href="#getdocfromserver">getDocFromServer()</a> </li><li data-api-symbol="getdocs()"> <a href="#getdocs">getDocs()</a> </li><li data-api-symbol="getdocsfromcache()"> <a href="#getdocsfromcache">getDocsFromCache()</a> </li><li data-api-symbol="getdocsfromserver()"> <a href="#getdocsfromserver">getDocsFromServer()</a> </li><li data-api-symbol="getfirestore()"> <a href="#getfirestore">getFirestore()</a> </li><li data-api-symbol="increment()"> <a href="#increment">increment()</a> </li><li data-api-symbol="initializefirestore()"> <a href="#initializefirestore">initializeFirestore()</a> </li><li data-api-symbol="limit()"> <a href="#limit">limit()</a> </li><li data-api-symbol="limittolast()"> <a href="#limittolast">limitToLast()</a> </li><li data-api-symbol="memoryeagergarbagecollector()"> <a href="#memoryeagergarbagecollector">memoryEagerGarbageCollector()</a> </li><li data-api-symbol="memorylocalcache()"> <a href="#memorylocalcache">memoryLocalCache()</a> </li><li data-api-symbol="memorylrugarbagecollector()"> <a href="#memorylrugarbagecollector">memoryLruGarbageCollector()</a> </li><li data-api-symbol="onsnapshot()"> <a href="#onsnapshot">onSnapshot()</a> </li><li data-api-symbol="onsnapshotsinsync()"> <a href="#onsnapshotsinsync">onSnapshotsInSync()</a> </li><li data-api-symbol="or()"> <a href="#or">or()</a> </li><li data-api-symbol="orderby()"> <a href="#orderby">orderBy()</a> </li><li data-api-symbol="persistentlocalcache()"> <a href="#persistentlocalcache">persistentLocalCache()</a> </li><li data-api-symbol="persistentmultipletabmanager()"> <a href="#persistentmultipletabmanager">persistentMultipleTabManager()</a> </li><li data-api-symbol="persistentsingletabmanager()"> <a href="#persistentsingletabmanager">persistentSingleTabManager()</a> </li><li data-api-symbol="query()"> <a href="#query-1">query()</a> </li><li data-api-symbol="queryequal()"> <a href="#queryequal">queryEqual()</a> </li><li data-api-symbol="refequal()"> <a href="#refequal">refEqual()</a> </li><li data-api-symbol="runtransaction()"> <a href="#runtransaction">runTransaction()</a> </li><li data-api-symbol="servertimestamp()"> <a href="#servertimestamp">serverTimestamp()</a> </li><li data-api-symbol="setdoc()"> <a href="#setdoc">setDoc()</a> </li><li data-api-symbol="setloglevel()"> <a href="#setloglevel">setLogLevel()</a> </li><li data-api-symbol="snapshotequal()"> <a href="#snapshotequal">snapshotEqual()</a> </li><li data-api-symbol="startafter()"> <a href="#startafter">startAfter()</a> </li><li data-api-symbol="startat()"> <a href="#startat">startAt()</a> </li><li data-api-symbol="sum()"> <a href="#sum">sum()</a> </li><li data-api-symbol="terminate()"> <a href="#terminate">terminate()</a> </li><li data-api-symbol="updatedoc()"> <a href="#updatedoc">updateDoc()</a> </li><li data-api-symbol="vector()"> <a href="#vector">vector()</a> </li><li data-api-symbol="waitforpendingwrites()"> <a href="#waitforpendingwrites">waitForPendingWrites()</a> </li><li data-api-symbol="where()"> <a href="#where">where()</a> </li><li data-api-symbol="withconverter()"> <a href="#withconverter">withConverter()</a> </li><li data-api-symbol="writebatch()"> <a href="#writebatch-1">writeBatch()</a> </li> </ul> </section><section class="api-symbol-group" data-api-symbol-group> <a class="api-symbol-kind" href="#references"> References </a> <ul> <li data-api-symbol="documentdata"> <a href="#documentdata">DocumentData</a> </li><li data-api-symbol="fieldvalue"> <a href="#fieldvalue">FieldValue</a> </li><li data-api-symbol="fieldvaluesentinel"> <a href="#fieldvaluesentinel">FieldValueSentinel</a> </li><li data-api-symbol="lintresult"> <a href="#lintresult">LintResult</a> </li><li data-api-symbol="orderdirection"> <a href="#orderdirection">OrderDirection</a> </li><li data-api-symbol="sandbox"> <a href="#sandbox">Sandbox</a> </li><li data-api-symbol="sandboxcontext"> <a href="#sandboxcontext">SandboxContext</a> </li><li data-api-symbol="sandboxerror"> <a href="#sandboxerror">SandboxError</a> </li><li data-api-symbol="timestamp"> <a href="#timestamp">Timestamp</a> </li><li data-api-symbol="wherefilterop"> <a href="#wherefilterop">WhereFilterOp</a> </li> </ul> </section> <p class="api-symbol-empty" data-api-symbol-empty hidden>No matching symbols</p> </div> </aside> </div> <script type="module">const a=document.querySelector("[data-api-symbol-filter]"),d=[...document.querySelectorAll("[data-api-symbol-group]")],n=document.querySelector("[data-api-symbol-empty]");a?.addEventListener("input",()=>{const t=a.value.trim().toLowerCase();let o=0;for(const i of d){let e=0;i.querySelectorAll("[data-api-symbol]").forEach(l=>{const r=!t||(l.dataset.apiSymbol??"").includes(t);l.hidden=!r,r&&e++}),i.hidden=e===0,o+=e}n&&(n.hidden=o>0)});</script> <script type="module">const s=new Map;document.querySelectorAll('.doc-toc a[href^="#"]').forEach(t=>s.set(decodeURIComponent(t.hash.slice(1)),t));if(s.size>0){const t=new Set,n=()=>{let o=null;for(const e of s.keys())if(t.has(e)){o=e;break}s.forEach((e,c)=>e.classList.toggle("active",c===o))},r=new IntersectionObserver(o=>{for(const e of o)e.isIntersecting?t.add(e.target.id):t.delete(e.target.id);n()},{rootMargin:"-72px 0px -60% 0px"});s.forEach((o,e)=>{const c=document.getElementById(e);c&&r.observe(c)})}</script> <script type="module">document.querySelector('.studio__nav [aria-current="page"]')?.scrollIntoView({block:"nearest",inline:"center"});</script> </body> </html>