@pyric/cli 0.1.0-alpha.10 → 0.1.0-alpha.11
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.
- package/README.md.orig +2 -2
- package/dist/assurance/.generated/conformance-verdicts.d.ts +16 -0
- package/dist/assurance/.generated/conformance-verdicts.d.ts.map +1 -1
- package/dist/assurance/.generated/conformance-verdicts.js +16 -0
- package/dist/assurance/.generated/conformance-verdicts.js.map +1 -1
- package/dist/bridge/server/peer.d.ts +1 -1
- package/dist/bridge/server.d.ts +1 -1
- package/dist/bridge/server.js +1 -1
- package/dist/cli/index.d.ts +11 -0
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +13 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/init.d.ts +3 -3
- package/dist/cli/init.d.ts.map +1 -1
- package/dist/cli/init.js +5 -5
- package/dist/cli/init.js.map +1 -1
- package/dist/cli/serve.d.ts.map +1 -1
- package/dist/cli/serve.js +8 -2
- package/dist/cli/serve.js.map +1 -1
- package/dist/conformance/.generated/can-i-use-browser.d.ts.map +1 -1
- package/dist/conformance/.generated/can-i-use-browser.js +1 -1
- package/dist/conformance/.generated/can-i-use-browser.js.map +1 -1
- package/dist/conformance/.generated/can-i-use.d.ts.map +1 -1
- package/dist/conformance/.generated/can-i-use.js +1 -1
- package/dist/conformance/.generated/can-i-use.js.map +1 -1
- package/dist/conformance/.generated/conformance-docs.d.ts +12 -0
- package/dist/conformance/.generated/conformance-docs.d.ts.map +1 -0
- package/dist/conformance/.generated/conformance-docs.js +2 -0
- package/dist/conformance/.generated/conformance-docs.js.map +1 -0
- package/dist/conformance/docs.d.ts +6 -0
- package/dist/conformance/docs.d.ts.map +1 -0
- package/dist/conformance/docs.js +6 -0
- package/dist/conformance/docs.js.map +1 -0
- package/dist/remote/index.d.ts.map +1 -1
- package/dist/remote/index.js +1 -0
- package/dist/remote/index.js.map +1 -1
- package/dist/serve/activity-guard.d.ts +4 -0
- package/dist/serve/activity-guard.d.ts.map +1 -0
- package/dist/serve/activity-guard.js +22 -0
- package/dist/serve/activity-guard.js.map +1 -0
- package/dist/serve/activity-route.d.ts +4 -0
- package/dist/serve/activity-route.d.ts.map +1 -0
- package/dist/serve/activity-route.js +157 -0
- package/dist/serve/activity-route.js.map +1 -0
- package/dist/serve/activity-warning.d.ts +4 -0
- package/dist/serve/activity-warning.d.ts.map +1 -0
- package/dist/serve/activity-warning.js +21 -0
- package/dist/serve/activity-warning.js.map +1 -0
- package/dist/serve/bridge-mount.d.ts +5 -0
- package/dist/serve/bridge-mount.d.ts.map +1 -1
- package/dist/serve/bridge-mount.js +1 -0
- package/dist/serve/bridge-mount.js.map +1 -1
- package/dist/serve/docs-ui/404.html +3 -0
- package/dist/serve/docs-ui/_astro/{_slug_.DPUwShm2.css → _slug_.CXh9yTP1.css} +1 -1
- package/dist/serve/docs-ui/_astro/_slug_.DUci-duz.css +1 -0
- package/dist/serve/docs-ui/docs/_rhythm/index.html +2 -1
- package/dist/serve/docs-ui/docs/agent/set-up-your-agent/index.html +3 -2
- package/dist/serve/docs-ui/docs/agent/set-up-your-agent.md +1 -1
- package/dist/serve/docs-ui/docs/agent/watch-and-review/index.html +2 -1
- package/dist/serve/docs-ui/docs/agent/work-with-an-agent/index.html +2 -1
- package/dist/serve/docs-ui/docs/ai-compat/index.html +2 -1
- package/dist/serve/docs-ui/docs/api-reference/index.html +51 -49
- package/dist/serve/docs-ui/docs/api-reference.md +2 -2
- package/dist/serve/docs-ui/docs/app-compat/index.html +2 -1
- package/dist/serve/docs-ui/docs/auth-compat/index.html +2 -1
- package/dist/serve/docs-ui/docs/build/ai-logic/index.html +18 -3
- package/dist/serve/docs-ui/docs/build/ai-logic.md +30 -2
- package/dist/serve/docs-ui/docs/build/authentication/index.html +2 -1
- package/dist/serve/docs-ui/docs/build/authentication.md +1 -1
- package/dist/serve/docs-ui/docs/build/cloud-firestore/index.html +2 -1
- package/dist/serve/docs-ui/docs/build/cloud-messaging/index.html +46 -2
- package/dist/serve/docs-ui/docs/build/cloud-messaging.md +56 -1
- package/dist/serve/docs-ui/docs/build/cloud-storage/index.html +2 -1
- package/dist/serve/docs-ui/docs/build/cloud-storage.md +1 -1
- package/dist/serve/docs-ui/docs/build/realtime-database/index.html +21 -3
- package/dist/serve/docs-ui/docs/build/realtime-database.md +25 -1
- package/dist/serve/docs-ui/docs/conformance-scores/index.html +2 -1
- package/dist/serve/docs-ui/docs/create-pyric-reference-api/index.html +61 -28
- package/dist/serve/docs-ui/docs/create-pyric-reference-api.md +65 -20
- package/dist/serve/docs-ui/docs/database-compat/index.html +2 -1
- package/dist/serve/docs-ui/docs/firestore-compat/index.html +6 -5
- package/dist/serve/docs-ui/docs/firestore-compat.md +4 -4
- package/dist/serve/docs-ui/docs/functions-rtdb-compat/index.html +2 -1
- package/dist/serve/docs-ui/docs/get-started/how-the-swap-works/index.html +2 -1
- package/dist/serve/docs-ui/docs/get-started/start-building/index.html +4 -3
- package/dist/serve/docs-ui/docs/get-started/start-building.md +2 -2
- package/dist/serve/docs-ui/docs/index.json +800 -575
- package/dist/serve/docs-ui/docs/messaging-compat/index.html +2 -1
- package/dist/serve/docs-ui/docs/observe/see-whats-happening/index.html +2 -1
- package/dist/serve/docs-ui/docs/observe/shape-your-data/index.html +2 -1
- package/dist/serve/docs-ui/docs/overview/index.html +2 -1
- package/dist/serve/docs-ui/docs/pyric-admin-app-reference-api/index.html +5 -4
- package/dist/serve/docs-ui/docs/pyric-admin-app-reference-api.md +3 -4
- package/dist/serve/docs-ui/docs/pyric-admin-auth-reference-api/index.html +5 -4
- package/dist/serve/docs-ui/docs/pyric-admin-auth-reference-api.md +3 -4
- package/dist/serve/docs-ui/docs/pyric-admin-database-reference-api/index.html +5 -4
- package/dist/serve/docs-ui/docs/pyric-admin-database-reference-api.md +3 -4
- package/dist/serve/docs-ui/docs/pyric-admin-firestore-reference-api/index.html +2503 -12
- package/dist/serve/docs-ui/docs/pyric-admin-firestore-reference-api.md +2219 -8
- package/dist/serve/docs-ui/docs/pyric-admin-storage-reference-api/index.html +4 -3
- package/dist/serve/docs-ui/docs/pyric-admin-storage-reference-api.md +2 -3
- package/dist/serve/docs-ui/docs/pyric-ai-reference-api/index.html +16 -11
- package/dist/serve/docs-ui/docs/pyric-ai-reference-api.md +14 -13
- package/dist/serve/docs-ui/docs/pyric-ai-scripting-reference-api/index.html +4 -3
- package/dist/serve/docs-ui/docs/pyric-ai-scripting-reference-api.md +2 -3
- package/dist/serve/docs-ui/docs/pyric-app-reference-api/index.html +7 -2
- package/dist/serve/docs-ui/docs/pyric-app-reference-api.md +5 -2
- package/dist/serve/docs-ui/docs/pyric-auth-reference-api/index.html +23 -12
- package/dist/serve/docs-ui/docs/pyric-auth-reference-api.md +15 -12
- package/dist/serve/docs-ui/docs/pyric-cli-assurance-browser-reference-api/index.html +10 -48
- package/dist/serve/docs-ui/docs/pyric-cli-assurance-browser-reference-api.md +11 -24
- package/dist/serve/docs-ui/docs/pyric-cli-assurance-reference-api/index.html +87 -97
- package/dist/serve/docs-ui/docs/pyric-cli-assurance-reference-api.md +53 -65
- package/dist/serve/docs-ui/docs/pyric-cli-bridge-client-reference-api/index.html +14 -15
- package/dist/serve/docs-ui/docs/pyric-cli-bridge-client-reference-api.md +19 -28
- package/dist/serve/docs-ui/docs/pyric-cli-bridge-reference-api/index.html +4 -3
- package/dist/serve/docs-ui/docs/pyric-cli-bridge-reference-api.md +2 -3
- package/dist/serve/docs-ui/docs/pyric-cli-conformance-browser-reference-api/index.html +3 -2
- package/dist/serve/docs-ui/docs/pyric-cli-conformance-browser-reference-api.md +1 -2
- package/dist/serve/docs-ui/docs/pyric-cli-conformance-docs-reference-api/index.html +51 -0
- package/dist/serve/docs-ui/docs/pyric-cli-conformance-docs-reference-api.md +36 -0
- package/dist/serve/docs-ui/docs/pyric-cli-conformance-reference-api/index.html +3 -2
- package/dist/serve/docs-ui/docs/pyric-cli-conformance-reference-api.md +1 -2
- package/dist/serve/docs-ui/docs/pyric-cli-credentials-node-reference-api/index.html +3 -2
- package/dist/serve/docs-ui/docs/pyric-cli-credentials-node-reference-api.md +1 -2
- package/dist/serve/docs-ui/docs/pyric-cli-discover-reference-api/index.html +3 -2
- package/dist/serve/docs-ui/docs/pyric-cli-discover-reference-api.md +1 -2
- package/dist/serve/docs-ui/docs/pyric-cli-register-reference-api/index.html +3 -2
- package/dist/serve/docs-ui/docs/pyric-cli-register-reference-api.md +1 -2
- package/dist/serve/docs-ui/docs/pyric-cli-remote-reference-api/index.html +1067 -83
- package/dist/serve/docs-ui/docs/pyric-cli-remote-reference-api.md +1291 -160
- package/dist/serve/docs-ui/docs/pyric-cli-serve-worker-reference-api/index.html +123 -92
- package/dist/serve/docs-ui/docs/pyric-cli-serve-worker-reference-api.md +49 -20
- package/dist/serve/docs-ui/docs/pyric-cli-verify-reference-api/index.html +72 -7
- package/dist/serve/docs-ui/docs/pyric-cli-verify-reference-api.md +22 -7
- package/dist/serve/docs-ui/docs/pyric-cli-vite-reference-api/index.html +33 -12
- package/dist/serve/docs-ui/docs/pyric-cli-vite-reference-api.md +15 -12
- package/dist/serve/docs-ui/docs/pyric-database-reference-api/index.html +18 -17
- package/dist/serve/docs-ui/docs/pyric-database-reference-api.md +19 -22
- package/dist/serve/docs-ui/docs/pyric-firestore-reference-api/index.html +1512 -545
- package/dist/serve/docs-ui/docs/pyric-firestore-reference-api.md +1311 -316
- package/dist/serve/docs-ui/docs/pyric-firestore-values-reference-api/index.html +3 -2
- package/dist/serve/docs-ui/docs/pyric-firestore-values-reference-api.md +1 -2
- package/dist/serve/docs-ui/docs/pyric-messaging-reference-api/index.html +5 -4
- package/dist/serve/docs-ui/docs/pyric-messaging-reference-api.md +3 -4
- package/dist/serve/docs-ui/docs/pyric-messaging-sw-reference-api/index.html +69 -369
- package/dist/serve/docs-ui/docs/pyric-messaging-sw-reference-api.md +103 -216
- package/dist/serve/docs-ui/docs/pyric-rules-reference-api/index.html +10 -9
- package/dist/serve/docs-ui/docs/pyric-rules-reference-api.md +9 -10
- package/dist/serve/docs-ui/docs/pyric-sandbox-database-reference-api/index.html +8 -7
- package/dist/serve/docs-ui/docs/pyric-sandbox-database-reference-api.md +6 -7
- package/dist/serve/docs-ui/docs/pyric-sandbox-firestore-reference-api/index.html +10 -9
- package/dist/serve/docs-ui/docs/pyric-sandbox-firestore-reference-api.md +9 -10
- package/dist/serve/docs-ui/docs/pyric-sandbox-reference-api/index.html +374 -910
- package/dist/serve/docs-ui/docs/pyric-sandbox-reference-api.md +377 -911
- package/dist/serve/docs-ui/docs/pyric-storage-reference-api/index.html +25 -17
- package/dist/serve/docs-ui/docs/pyric-storage-reference-api.md +21 -19
- package/dist/serve/docs-ui/docs/pyric-ui-agents-reference-api/index.html +3 -2
- package/dist/serve/docs-ui/docs/pyric-ui-agents-reference-api.md +1 -2
- package/dist/serve/docs-ui/docs/pyric-ui-auth-hooks-reference-api/index.html +63 -776
- package/dist/serve/docs-ui/docs/pyric-ui-auth-hooks-reference-api.md +69 -510
- package/dist/serve/docs-ui/docs/pyric-ui-auth-reference-api/index.html +22 -21
- package/dist/serve/docs-ui/docs/pyric-ui-auth-reference-api.md +29 -30
- package/dist/serve/docs-ui/docs/pyric-ui-events-hooks-reference-api/index.html +15 -168
- package/dist/serve/docs-ui/docs/pyric-ui-events-hooks-reference-api.md +17 -87
- package/dist/serve/docs-ui/docs/pyric-ui-events-reference-api/index.html +6 -5
- package/dist/serve/docs-ui/docs/pyric-ui-events-reference-api.md +5 -6
- package/dist/serve/docs-ui/docs/pyric-ui-firestore-hooks-reference-api/index.html +82 -970
- package/dist/serve/docs-ui/docs/pyric-ui-firestore-hooks-reference-api.md +104 -479
- package/dist/serve/docs-ui/docs/pyric-ui-firestore-reference-api/index.html +30 -29
- package/dist/serve/docs-ui/docs/pyric-ui-firestore-reference-api.md +54 -55
- package/dist/serve/docs-ui/docs/pyric-ui-primitives-reference-api/index.html +3 -2
- package/dist/serve/docs-ui/docs/pyric-ui-primitives-reference-api.md +1 -2
- package/dist/serve/docs-ui/docs/pyric-ui-rtdb-reference-api/index.html +5 -4
- package/dist/serve/docs-ui/docs/pyric-ui-rtdb-reference-api.md +3 -4
- package/dist/serve/docs-ui/docs/pyric-ui-rules-hooks-reference-api/index.html +9 -124
- package/dist/serve/docs-ui/docs/pyric-ui-rules-hooks-reference-api.md +7 -58
- package/dist/serve/docs-ui/docs/pyric-ui-rules-reference-api/index.html +24 -23
- package/dist/serve/docs-ui/docs/pyric-ui-rules-reference-api.md +31 -34
- package/dist/serve/docs-ui/docs/pyric-ui-storage-hooks-reference-api/index.html +104 -1385
- package/dist/serve/docs-ui/docs/pyric-ui-storage-hooks-reference-api.md +133 -817
- package/dist/serve/docs-ui/docs/pyric-ui-storage-reference-api/index.html +34 -33
- package/dist/serve/docs-ui/docs/pyric-ui-storage-reference-api.md +37 -38
- package/dist/serve/docs-ui/docs/pyric-ui-traffic-hooks-reference-api/index.html +116 -1169
- package/dist/serve/docs-ui/docs/pyric-ui-traffic-hooks-reference-api.md +142 -590
- package/dist/serve/docs-ui/docs/pyric-ui-traffic-reference-api/index.html +4 -3
- package/dist/serve/docs-ui/docs/pyric-ui-traffic-reference-api.md +3 -4
- package/dist/serve/docs-ui/docs/rules-compat/index.html +34 -1
- package/dist/serve/docs-ui/docs/rules-compat.md +32 -0
- package/dist/serve/docs-ui/docs/secure/audit-your-rules/index.html +19 -2
- package/dist/serve/docs-ui/docs/secure/audit-your-rules.md +32 -0
- package/dist/serve/docs-ui/docs/secure/firestore-rules-limits/index.html +2 -1
- package/dist/serve/docs-ui/docs/secure/read-a-denial/index.html +2 -1
- package/dist/serve/docs-ui/docs/secure/rtdb-rules-in-typescript/index.html +2 -1
- package/dist/serve/docs-ui/docs/secure/rtdb-rules-in-typescript.md +1 -1
- package/dist/serve/docs-ui/docs/secure/rules-standard-library/index.html +2 -1
- package/dist/serve/docs-ui/docs/secure/secure-it-with-rules/index.html +2 -1
- package/dist/serve/docs-ui/docs/secure/simulate-and-lint/index.html +2 -1
- package/dist/serve/docs-ui/docs/secure/write-a-rules-test-suite/index.html +2 -1
- package/dist/serve/docs-ui/docs/ship/ship-to-production/index.html +2 -1
- package/dist/serve/docs-ui/docs/ship/test-in-node/index.html +2 -1
- package/dist/serve/docs-ui/docs/storage-compat/index.html +2 -1
- package/dist/serve/docs-ui/docs/trust/how-we-know-it-matches-firebase/index.html +2 -1
- package/dist/serve/docs-ui/docs/trust/versioning-and-compatibility/index.html +2 -1
- package/dist/serve/docs-ui/llms.txt +1 -0
- package/dist/serve/entries/ai.d.ts.map +1 -1
- package/dist/serve/entries/ai.js +39 -1
- package/dist/serve/entries/ai.js.map +1 -1
- package/dist/serve/entries/messaging-sw.d.ts.map +1 -1
- package/dist/serve/entries/messaging-sw.js +5 -1
- package/dist/serve/entries/messaging-sw.js.map +1 -1
- package/dist/serve/entries/messaging.d.ts.map +1 -1
- package/dist/serve/entries/messaging.js +7 -1
- package/dist/serve/entries/messaging.js.map +1 -1
- package/dist/serve/entries/runtime.d.ts.map +1 -1
- package/dist/serve/entries/runtime.js +20 -1
- package/dist/serve/entries/runtime.js.map +1 -1
- package/dist/serve/init-payload.d.ts +25 -0
- package/dist/serve/init-payload.d.ts.map +1 -1
- package/dist/serve/namespace.d.ts +39 -0
- package/dist/serve/namespace.d.ts.map +1 -1
- package/dist/serve/namespace.js +80 -1
- package/dist/serve/namespace.js.map +1 -1
- package/dist/serve/standalone-assets.d.ts +11 -9
- package/dist/serve/standalone-assets.d.ts.map +1 -1
- package/dist/serve/standalone-assets.js +6 -5
- package/dist/serve/standalone-assets.js.map +1 -1
- package/dist/serve/studio-ui/assets/{RulesCodeEditor-CXdSLKhO.js → RulesCodeEditor-CxVYcZXw.js} +1 -1
- package/dist/serve/studio-ui/assets/index-cpSfgQ7H.js +1218 -0
- package/dist/serve/studio-ui/assets/seed-DeuFKi4J.js +20 -0
- package/dist/serve/studio-ui/index.html +1 -1
- package/dist/serve/vite-plugin.d.ts +92 -15
- package/dist/serve/vite-plugin.d.ts.map +1 -1
- package/dist/serve/vite-plugin.js +281 -11
- package/dist/serve/vite-plugin.js.map +1 -1
- package/dist/serve/worker/activity-bootstrap.d.ts +8 -0
- package/dist/serve/worker/activity-bootstrap.d.ts.map +1 -0
- package/dist/serve/worker/activity-bootstrap.js +11 -0
- package/dist/serve/worker/activity-bootstrap.js.map +1 -0
- package/dist/serve/worker/client/connection.d.ts.map +1 -1
- package/dist/serve/worker/client/connection.js +17 -5
- package/dist/serve/worker/client/connection.js.map +1 -1
- package/dist/serve/worker/client/core.d.ts +2 -2
- package/dist/serve/worker/client/core.d.ts.map +1 -1
- package/dist/serve/worker/client/core.js +33 -5
- package/dist/serve/worker/client/core.js.map +1 -1
- package/dist/serve/worker/client/firestore-writes.d.ts.map +1 -1
- package/dist/serve/worker/client/firestore-writes.js +1 -0
- package/dist/serve/worker/client/firestore-writes.js.map +1 -1
- package/dist/serve/worker/client/messaging.d.ts +9 -1
- package/dist/serve/worker/client/messaging.d.ts.map +1 -1
- package/dist/serve/worker/client/messaging.js +15 -0
- package/dist/serve/worker/client/messaging.js.map +1 -1
- package/dist/serve/worker/client/studio.d.ts +10 -0
- package/dist/serve/worker/client/studio.d.ts.map +1 -1
- package/dist/serve/worker/client/studio.js +11 -0
- package/dist/serve/worker/client/studio.js.map +1 -1
- package/dist/serve/worker/durable-persistence.d.ts +12 -0
- package/dist/serve/worker/durable-persistence.d.ts.map +1 -0
- package/dist/serve/worker/durable-persistence.js +118 -0
- package/dist/serve/worker/durable-persistence.js.map +1 -0
- package/dist/serve/worker/entry.d.ts +7 -3
- package/dist/serve/worker/entry.d.ts.map +1 -1
- package/dist/serve/worker/entry.js +7 -3
- package/dist/serve/worker/entry.js.map +1 -1
- package/dist/serve/worker/host/core.d.ts +9 -5
- package/dist/serve/worker/host/core.d.ts.map +1 -1
- package/dist/serve/worker/host/core.js +33 -8
- package/dist/serve/worker/host/core.js.map +1 -1
- package/dist/serve/worker/host/dispatch.d.ts.map +1 -1
- package/dist/serve/worker/host/dispatch.js +9 -2
- package/dist/serve/worker/host/dispatch.js.map +1 -1
- package/dist/serve/worker/host/studio.d.ts +1 -1
- package/dist/serve/worker/host/studio.d.ts.map +1 -1
- package/dist/serve/worker/host/studio.js +36 -1
- package/dist/serve/worker/host/studio.js.map +1 -1
- package/dist/serve/worker/host/subscriptions.d.ts.map +1 -1
- package/dist/serve/worker/host/subscriptions.js +27 -7
- package/dist/serve/worker/host/subscriptions.js.map +1 -1
- package/dist/serve/worker/host-context.d.ts +15 -0
- package/dist/serve/worker/host-context.d.ts.map +1 -1
- package/dist/serve/worker/host-context.js +10 -0
- package/dist/serve/worker/host-context.js.map +1 -1
- package/dist/serve/worker/host-messaging.d.ts.map +1 -1
- package/dist/serve/worker/host-messaging.js +9 -2
- package/dist/serve/worker/host-messaging.js.map +1 -1
- package/dist/serve/worker/index.d.ts +1 -1
- package/dist/serve/worker/index.d.ts.map +1 -1
- package/dist/serve/worker/index.js +2 -0
- package/dist/serve/worker/index.js.map +1 -1
- package/dist/serve/worker/protocol.d.ts +25 -3
- package/dist/serve/worker/protocol.d.ts.map +1 -1
- package/dist/serve/worker/protocol.js.map +1 -1
- package/dist/serve/worker/serve-init.d.ts +23 -37
- package/dist/serve/worker/serve-init.d.ts.map +1 -1
- package/dist/serve/worker/serve-init.js +95 -172
- package/dist/serve/worker/serve-init.js.map +1 -1
- package/dist/vite.d.ts +4 -4
- package/dist/vite.d.ts.map +1 -1
- package/dist/vite.js +3 -3
- package/dist/vite.js.map +1 -1
- package/package.json +8 -4
- package/dist/serve/studio-ui/assets/index-BvtQIpGn.js +0 -1211
- package/dist/serve/studio-ui/assets/seed-3DMedLL3.js +0 -2
|
@@ -1,19 +1,2450 @@
|
|
|
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-admin/firestore · Pyric Studio</title><meta name="description" content="Published declarations for pyric-admin/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 & 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 & 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 & 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 & 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/"> 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/" aria-current="page"> 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 & 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 & 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 & 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 & 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/"> 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/" aria-current="page"> 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-admin</span> </li><li> <span class="docs-breadcrumbs-sep" aria-hidden="true">/</span> <span aria-current="page">pyric-admin/firestore</span> </li> </ol> </nav> <header class="api-reference-header"> <p class="api-reference-kicker">API reference</p> <h1><code>pyric-admin/firestore</code></h1> <p class="api-reference-meta"> 1 published symbols from <code>pyric-admin</code> </p> <p class="api-reference-source">
|
|
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-admin/firestore · Pyric Studio</title><meta name="description" content="Published declarations for pyric-admin/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_.CXh9yTP1.css">
|
|
2
|
+
<link rel="stylesheet" href="/__pyric/ui/_astro/_slug_.DUci-duz.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 & 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 & 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 & 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 & 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/"> 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/" aria-current="page"> 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-conformance-docs-reference-api/"> @pyric/cli/conformance/docs </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 & 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 & 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 & 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 & 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/"> 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/" aria-current="page"> 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-conformance-docs-reference-api/"> @pyric/cli/conformance/docs </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-admin</span> </li><li> <span class="docs-breadcrumbs-sep" aria-hidden="true">/</span> <span aria-current="page">pyric-admin/firestore</span> </li> </ol> </nav> <header class="api-reference-header"> <p class="api-reference-kicker">API reference</p> <h1><code>pyric-admin/firestore</code></h1> <p class="api-reference-meta"> 41 published symbols from <code>pyric-admin</code> </p> <p class="api-reference-source">
|
|
2
3
|
Generated from the TypeScript declarations shipped at this import path.
|
|
3
|
-
</p> </header> <article class="prose api-reference-body"> <!-- Generated from published package declarations via TypeDoc.
|
|
4
|
+
</p> </header> <article class="prose api-reference-body"> <!-- Generated from published package declarations via TypeDoc. Rendered by the api-reference content loader. -->
|
|
5
|
+
<h2 id="interfaces">Interfaces</h2>
|
|
6
|
+
<p><a id="admindocumentsnapshot"></a></p>
|
|
7
|
+
<h3 id="admindocumentsnapshot">AdminDocumentSnapshot</h3>
|
|
8
|
+
<h4 id="extended-by">Extended by</h4>
|
|
9
|
+
<ul>
|
|
10
|
+
<li><a href="#adminquerydocumentsnapshot"><code>AdminQueryDocumentSnapshot</code></a></li>
|
|
11
|
+
</ul>
|
|
12
|
+
<h4 id="properties">Properties</h4>
|
|
13
|
+
<div class="table-scroll">
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
<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></td></tr><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="ref"></a> <code>ref</code></td><td align="left"><code>readonly</code></td><td align="left"><a href="#documentreference"><code>DocumentReference</code></a></td></tr></tbody></table></div>
|
|
39
|
+
<h4 id="methods">Methods</h4>
|
|
40
|
+
<p><a id="data"></a></p>
|
|
41
|
+
<h5 id="data">data()</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">data</span><span style="color:#ABB2BF">(): </span><span style="color:#E06C75">DocumentData</span><span style="color:#ABB2BF">;</span></span></code></pre>
|
|
43
|
+
<h6 id="returns">Returns</h6>
|
|
44
|
+
<p><a href="/docs/pyric-firestore-reference-api/#documentdata"><code>DocumentData</code></a></p>
|
|
45
|
+
<hr>
|
|
46
|
+
<p><a id="adminquerydocumentsnapshot"></a></p>
|
|
47
|
+
<h3 id="adminquerydocumentsnapshot">AdminQueryDocumentSnapshot</h3>
|
|
48
|
+
<h4 id="extends">Extends</h4>
|
|
49
|
+
<ul>
|
|
50
|
+
<li><a href="#admindocumentsnapshot"><code>AdminDocumentSnapshot</code></a></li>
|
|
51
|
+
</ul>
|
|
52
|
+
<h4 id="properties-1">Properties</h4>
|
|
53
|
+
<div class="table-scroll">
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
<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></td></tr><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="ref-1"></a> <code>ref</code></td><td align="left"><code>readonly</code></td><td align="left"><a href="#documentreference"><code>DocumentReference</code></a></td></tr></tbody></table></div>
|
|
79
|
+
<h4 id="methods-1">Methods</h4>
|
|
80
|
+
<p><a id="data-2"></a></p>
|
|
81
|
+
<h5 id="data-1">data()</h5>
|
|
82
|
+
<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:#E06C75">DocumentData</span><span style="color:#ABB2BF">;</span></span></code></pre>
|
|
83
|
+
<h6 id="returns-1">Returns</h6>
|
|
84
|
+
<p><a href="/docs/pyric-firestore-reference-api/#documentdata"><code>DocumentData</code></a></p>
|
|
85
|
+
<h6 id="overrides">Overrides</h6>
|
|
86
|
+
<p><a href="#admindocumentsnapshot"><code>AdminDocumentSnapshot</code></a>.<a href="#data"><code>data</code></a></p>
|
|
87
|
+
<hr>
|
|
88
|
+
<p><a id="adminquerysnapshot"></a></p>
|
|
89
|
+
<h3 id="adminquerysnapshot">AdminQuerySnapshot</h3>
|
|
90
|
+
<h4 id="properties-2">Properties</h4>
|
|
91
|
+
<div class="table-scroll">
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
<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"><a href="#adminquerydocumentsnapshot"><code>AdminQueryDocumentSnapshot</code></a>[]</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>
|
|
117
|
+
<h4 id="methods-2">Methods</h4>
|
|
118
|
+
<p><a id="foreach"></a></p>
|
|
119
|
+
<h5 id="foreach">forEach()</h5>
|
|
120
|
+
<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">forEach</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">callback</span><span style="color:#ABB2BF">: (</span><span style="color:#E06C75;font-style:italic">snap</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">AdminQueryDocumentSnapshot</span><span style="color:#ABB2BF">) </span><span style="color:#C678DD">=></span><span style="color:#C678DD"> void</span><span style="color:#ABB2BF">): </span><span style="color:#C678DD">void</span><span style="color:#ABB2BF">;</span></span></code></pre>
|
|
121
|
+
<h6 id="parameters">Parameters</h6>
|
|
122
|
+
<div class="table-scroll">
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
<table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>callback</code></td><td align="left">(<code>snap</code>: <a href="#adminquerydocumentsnapshot"><code>AdminQueryDocumentSnapshot</code></a>) => <code>void</code></td></tr></tbody></table></div>
|
|
136
|
+
<h6 id="returns-2">Returns</h6>
|
|
137
|
+
<p><code>void</code></p>
|
|
138
|
+
<hr>
|
|
139
|
+
<p><a id="aggregatequerysnapshot"></a></p>
|
|
140
|
+
<h3 id="aggregatequerysnapshot">AggregateQuerySnapshot</h3>
|
|
141
|
+
<p>Result of <code>Query.aggregate(spec).get()</code>. <code>.data()</code> returns the
|
|
142
|
+
computed numbers under the spec’s aliases. Empty-input averages
|
|
143
|
+
resolve to <code>null</code> to mirror Firestore production behavior
|
|
144
|
+
(averaging over zero documents has no meaningful number).</p>
|
|
145
|
+
<h4 id="methods-3">Methods</h4>
|
|
146
|
+
<p><a id="data-4"></a></p>
|
|
147
|
+
<h5 id="data-2">data()</h5>
|
|
148
|
+
<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:#E06C75">Record</span><span style="color:#56B6C2"><</span><span style="color:#E06C75">string</span><span style="color:#ABB2BF">, </span><span style="color:#E06C75">number</span><span style="color:#56B6C2"> |</span><span style="color:#D19A66"> null</span><span style="color:#56B6C2">></span><span style="color:#ABB2BF">;</span></span></code></pre>
|
|
149
|
+
<h6 id="returns-3">Returns</h6>
|
|
150
|
+
<p><code>Record</code><<code>string</code>, <code>number</code> | <code>null</code>></p>
|
|
151
|
+
<hr>
|
|
152
|
+
<p><a id="collectionreference"></a></p>
|
|
153
|
+
<h3 id="collectionreference">CollectionReference</h3>
|
|
154
|
+
<h4 id="extends-1">Extends</h4>
|
|
155
|
+
<ul>
|
|
156
|
+
<li><a href="#query"><code>Query</code></a></li>
|
|
157
|
+
</ul>
|
|
158
|
+
<h4 id="properties-3">Properties</h4>
|
|
159
|
+
<div class="table-scroll">
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
<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-2"></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>
|
|
180
|
+
<h4 id="methods-4">Methods</h4>
|
|
181
|
+
<p><a id="add"></a></p>
|
|
182
|
+
<h5 id="add">add()</h5>
|
|
183
|
+
<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">add</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">data</span><span style="color:#ABB2BF">: </span><span style="color:#E06C75">DocumentData</span><span style="color:#ABB2BF">, </span><span style="color:#E06C75">opts</span><span style="color:#C678DD">?:</span><span style="color:#E06C75"> OperationOptions</span><span style="color:#ABB2BF">): </span><span style="color:#E5C07B">Promise</span><span style="color:#56B6C2"><</span><span style="color:#E06C75">DocumentReference</span><span style="color:#56B6C2">></span><span style="color:#ABB2BF">;</span></span></code></pre>
|
|
184
|
+
<h6 id="parameters-1">Parameters</h6>
|
|
185
|
+
<div class="table-scroll">
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
<table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>data</code></td><td align="left"><a href="/docs/pyric-firestore-reference-api/#documentdata"><code>DocumentData</code></a></td></tr><tr><td align="left"><code>opts?</code></td><td align="left"><code>OperationOptions</code></td></tr></tbody></table></div>
|
|
203
|
+
<h6 id="returns-4">Returns</h6>
|
|
204
|
+
<p><code>Promise</code><<a href="#documentreference"><code>DocumentReference</code></a>></p>
|
|
205
|
+
<p><a id="aggregate"></a></p>
|
|
206
|
+
<h5 id="aggregate">aggregate()</h5>
|
|
207
|
+
<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">aggregate</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">spec</span><span style="color:#ABB2BF">: </span><span style="color:#E06C75">AggregateSpec</span><span style="color:#ABB2BF">): </span><span style="color:#E5C07B">Promise</span><span style="color:#56B6C2"><</span><span style="color:#E06C75">AggregateQuerySnapshot</span><span style="color:#56B6C2">></span><span style="color:#ABB2BF">;</span></span></code></pre>
|
|
208
|
+
<p>Compute one or more aggregates over the documents matching this
|
|
209
|
+
query. Mirrors the Admin SDK’s <code>query.aggregate({ … }).get()</code>
|
|
210
|
+
pattern, collapsed into one call for the simulator (no need to
|
|
211
|
+
build an <code>AggregateQuery</code> reference type when there’s no remote
|
|
212
|
+
dispatch).</p>
|
|
213
|
+
<p>Each entry in <code>spec</code> is keyed by a caller-chosen alias and
|
|
214
|
+
resolves to an <code>AggregateField</code>. The returned snapshot exposes
|
|
215
|
+
the computed numbers under the same aliases via <code>.data()</code>.</p>
|
|
216
|
+
<p>Where / orderBy clauses ARE applied before aggregation (they
|
|
217
|
+
narrow the candidate doc set). <code>limit</code> is honored — the aggregate
|
|
218
|
+
computes against the limited set, matching production semantics.</p>
|
|
219
|
+
<h6 id="parameters-2">Parameters</h6>
|
|
220
|
+
<div class="table-scroll">
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
<table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>spec</code></td><td align="left"><a href="#aggregatespec"><code>AggregateSpec</code></a></td></tr></tbody></table></div>
|
|
234
|
+
<h6 id="returns-5">Returns</h6>
|
|
235
|
+
<p><code>Promise</code><<a href="#aggregatequerysnapshot"><code>AggregateQuerySnapshot</code></a>></p>
|
|
236
|
+
<h6 id="inherited-from">Inherited from</h6>
|
|
237
|
+
<p><a href="#query"><code>Query</code></a>.<a href="#aggregate-2"><code>aggregate</code></a></p>
|
|
238
|
+
<p><a id="applyfilter"></a></p>
|
|
239
|
+
<h5 id="applyfilter">applyFilter()</h5>
|
|
240
|
+
<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">applyFilter</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">filter</span><span style="color:#ABB2BF">: </span><span style="color:#E06C75">Filter</span><span style="color:#ABB2BF">): </span><span style="color:#E06C75">Query</span><span style="color:#ABB2BF">;</span></span></code></pre>
|
|
241
|
+
<p>Add a composite filter (leaf, AND, or OR) to the query’s filter
|
|
242
|
+
stack. Each <code>applyFilter</code> call AND-s with whatever filters are
|
|
243
|
+
already on the query — same implicit-AND semantics as multiple
|
|
244
|
+
<code>where()</code> calls. To OR multiple predicates, wrap them with
|
|
245
|
+
<code>{ kind: 'or', filters: [...] }</code> before calling. Backs the
|
|
246
|
+
modular <code>or()</code> / <code>and()</code> constraints in <code>pyric/firestore</code>.</p>
|
|
247
|
+
<h6 id="parameters-3">Parameters</h6>
|
|
248
|
+
<div class="table-scroll">
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
<table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>filter</code></td><td align="left"><a href="#filter"><code>Filter</code></a></td></tr></tbody></table></div>
|
|
262
|
+
<h6 id="returns-6">Returns</h6>
|
|
263
|
+
<p><a href="#query"><code>Query</code></a></p>
|
|
264
|
+
<h6 id="inherited-from-1">Inherited from</h6>
|
|
265
|
+
<p><a href="#query"><code>Query</code></a>.<a href="#applyfilter-2"><code>applyFilter</code></a></p>
|
|
266
|
+
<p><a id="doc"></a></p>
|
|
267
|
+
<h5 id="doc">doc()</h5>
|
|
268
|
+
<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">doc</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">id</span><span style="color:#C678DD">?:</span><span style="color:#E06C75"> string</span><span style="color:#ABB2BF">): </span><span style="color:#E06C75">DocumentReference</span><span style="color:#ABB2BF">;</span></span></code></pre>
|
|
269
|
+
<h6 id="parameters-4">Parameters</h6>
|
|
270
|
+
<div class="table-scroll">
|
|
271
|
+
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+
|
|
282
|
+
|
|
283
|
+
<table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>id?</code></td><td align="left"><code>string</code></td></tr></tbody></table></div>
|
|
284
|
+
<h6 id="returns-7">Returns</h6>
|
|
285
|
+
<p><a href="#documentreference"><code>DocumentReference</code></a></p>
|
|
286
|
+
<p><a id="endcursor"></a></p>
|
|
287
|
+
<h5 id="endcursor">endCursor()</h5>
|
|
288
|
+
<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">endCursor</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">values</span><span style="color:#ABB2BF">: </span><span style="color:#E06C75">unknown</span><span style="color:#ABB2BF">[], </span><span style="color:#E06C75">inclusive</span><span style="color:#ABB2BF">: </span><span style="color:#E06C75">boolean</span><span style="color:#ABB2BF">): </span><span style="color:#E06C75">Query</span><span style="color:#ABB2BF">;</span></span></code></pre>
|
|
289
|
+
<p>Set the end position of the query relative to the orderBy fields.
|
|
290
|
+
<code>inclusive</code> controls <code>endAt</code> (true) vs <code>endBefore</code> (false).</p>
|
|
291
|
+
<h6 id="parameters-5">Parameters</h6>
|
|
292
|
+
<div class="table-scroll">
|
|
293
|
+
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
|
|
306
|
+
|
|
307
|
+
|
|
308
|
+
|
|
309
|
+
<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><tr><td align="left"><code>inclusive</code></td><td align="left"><code>boolean</code></td></tr></tbody></table></div>
|
|
310
|
+
<h6 id="returns-8">Returns</h6>
|
|
311
|
+
<p><a href="#query"><code>Query</code></a></p>
|
|
312
|
+
<h6 id="inherited-from-2">Inherited from</h6>
|
|
313
|
+
<p><a href="#query"><code>Query</code></a>.<a href="#endcursor-2"><code>endCursor</code></a></p>
|
|
314
|
+
<p><a id="endcursorfromsnapshot"></a></p>
|
|
315
|
+
<h5 id="endcursorfromsnapshot">endCursorFromSnapshot()</h5>
|
|
316
|
+
<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">endCursorFromSnapshot</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">snapshot</span><span style="color:#ABB2BF">: </span><span style="color:#E06C75">AdminDocumentSnapshot</span><span style="color:#ABB2BF">, </span><span style="color:#E06C75">inclusive</span><span style="color:#ABB2BF">: </span><span style="color:#E06C75">boolean</span><span style="color:#ABB2BF">): </span><span style="color:#E06C75">Query</span><span style="color:#ABB2BF">;</span></span></code></pre>
|
|
317
|
+
<p>Snapshot-based variant of <a href="#endcursor-2">endCursor</a>.</p>
|
|
318
|
+
<h6 id="parameters-6">Parameters</h6>
|
|
319
|
+
<div class="table-scroll">
|
|
320
|
+
|
|
321
|
+
|
|
322
|
+
|
|
323
|
+
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
|
|
327
|
+
|
|
328
|
+
|
|
329
|
+
|
|
330
|
+
|
|
331
|
+
|
|
332
|
+
|
|
333
|
+
|
|
334
|
+
|
|
335
|
+
|
|
336
|
+
<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="#admindocumentsnapshot"><code>AdminDocumentSnapshot</code></a></td></tr><tr><td align="left"><code>inclusive</code></td><td align="left"><code>boolean</code></td></tr></tbody></table></div>
|
|
337
|
+
<h6 id="returns-9">Returns</h6>
|
|
338
|
+
<p><a href="#query"><code>Query</code></a></p>
|
|
339
|
+
<h6 id="inherited-from-3">Inherited from</h6>
|
|
340
|
+
<p><a href="#query"><code>Query</code></a>.<a href="#endcursorfromsnapshot-2"><code>endCursorFromSnapshot</code></a></p>
|
|
341
|
+
<p><a id="get"></a></p>
|
|
342
|
+
<h5 id="get">get()</h5>
|
|
343
|
+
<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">get</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">opts</span><span style="color:#C678DD">?:</span><span style="color:#E06C75"> OperationOptions</span><span style="color:#ABB2BF">): </span><span style="color:#E5C07B">Promise</span><span style="color:#56B6C2"><</span><span style="color:#E06C75">AdminQuerySnapshot</span><span style="color:#56B6C2">></span><span style="color:#ABB2BF">;</span></span></code></pre>
|
|
344
|
+
<h6 id="parameters-7">Parameters</h6>
|
|
345
|
+
<div class="table-scroll">
|
|
346
|
+
|
|
347
|
+
|
|
348
|
+
|
|
349
|
+
|
|
350
|
+
|
|
351
|
+
|
|
352
|
+
|
|
353
|
+
|
|
354
|
+
|
|
355
|
+
|
|
356
|
+
|
|
357
|
+
|
|
358
|
+
<table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>opts?</code></td><td align="left"><code>OperationOptions</code></td></tr></tbody></table></div>
|
|
359
|
+
<h6 id="returns-10">Returns</h6>
|
|
360
|
+
<p><code>Promise</code><<a href="#adminquerysnapshot"><code>AdminQuerySnapshot</code></a>></p>
|
|
361
|
+
<h6 id="inherited-from-4">Inherited from</h6>
|
|
362
|
+
<p><a href="#query"><code>Query</code></a>.<a href="#get-6"><code>get</code></a></p>
|
|
363
|
+
<p><a id="limit"></a></p>
|
|
364
|
+
<h5 id="limit">limit()</h5>
|
|
365
|
+
<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">limit</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">n</span><span style="color:#ABB2BF">: </span><span style="color:#E06C75">number</span><span style="color:#ABB2BF">): </span><span style="color:#E06C75">Query</span><span style="color:#ABB2BF">;</span></span></code></pre>
|
|
366
|
+
<h6 id="parameters-8">Parameters</h6>
|
|
367
|
+
<div class="table-scroll">
|
|
368
|
+
|
|
369
|
+
|
|
370
|
+
|
|
371
|
+
|
|
372
|
+
|
|
373
|
+
|
|
374
|
+
|
|
375
|
+
|
|
376
|
+
|
|
377
|
+
|
|
378
|
+
|
|
379
|
+
|
|
380
|
+
<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>
|
|
381
|
+
<h6 id="returns-11">Returns</h6>
|
|
382
|
+
<p><a href="#query"><code>Query</code></a></p>
|
|
383
|
+
<h6 id="inherited-from-5">Inherited from</h6>
|
|
384
|
+
<p><a href="#query"><code>Query</code></a>.<a href="#limit-2"><code>limit</code></a></p>
|
|
385
|
+
<p><a id="limittolast"></a></p>
|
|
386
|
+
<h5 id="limittolast">limitToLast()</h5>
|
|
387
|
+
<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">limitToLast</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">n</span><span style="color:#ABB2BF">: </span><span style="color:#E06C75">number</span><span style="color:#ABB2BF">): </span><span style="color:#E06C75">Query</span><span style="color:#ABB2BF">;</span></span></code></pre>
|
|
388
|
+
<p>Limit from the END of the ordered result. Equivalent to reversing
|
|
389
|
+
the orderBy, taking <code>n</code>, then re-reversing — the simulator
|
|
390
|
+
implements it that way. Requires at least one <code>orderBy</code> clause on
|
|
391
|
+
the query (matches the JS SDK’s runtime contract).</p>
|
|
392
|
+
<h6 id="parameters-9">Parameters</h6>
|
|
393
|
+
<div class="table-scroll">
|
|
394
|
+
|
|
395
|
+
|
|
396
|
+
|
|
397
|
+
|
|
398
|
+
|
|
399
|
+
|
|
400
|
+
|
|
401
|
+
|
|
402
|
+
|
|
403
|
+
|
|
404
|
+
|
|
405
|
+
|
|
406
|
+
<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>
|
|
407
|
+
<h6 id="returns-12">Returns</h6>
|
|
408
|
+
<p><a href="#query"><code>Query</code></a></p>
|
|
409
|
+
<h6 id="inherited-from-6">Inherited from</h6>
|
|
410
|
+
<p><a href="#query"><code>Query</code></a>.<a href="#limittolast-2"><code>limitToLast</code></a></p>
|
|
411
|
+
<p><a id="orderby"></a></p>
|
|
412
|
+
<h5 id="orderby">orderBy()</h5>
|
|
413
|
+
<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">orderBy</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">field</span><span style="color:#ABB2BF">: </span><span style="color:#E06C75">string</span><span style="color:#ABB2BF">, </span><span style="color:#E06C75">direction</span><span style="color:#C678DD">?:</span><span style="color:#E06C75"> OrderDirection</span><span style="color:#ABB2BF">): </span><span style="color:#E06C75">Query</span><span style="color:#ABB2BF">;</span></span></code></pre>
|
|
414
|
+
<h6 id="parameters-10">Parameters</h6>
|
|
415
|
+
<div class="table-scroll">
|
|
416
|
+
|
|
417
|
+
|
|
418
|
+
|
|
419
|
+
|
|
420
|
+
|
|
421
|
+
|
|
422
|
+
|
|
423
|
+
|
|
424
|
+
|
|
425
|
+
|
|
426
|
+
|
|
427
|
+
|
|
428
|
+
|
|
429
|
+
|
|
430
|
+
|
|
431
|
+
|
|
432
|
+
<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><tr><td align="left"><code>direction?</code></td><td align="left"><a href="/docs/pyric-firestore-reference-api/#orderdirection"><code>OrderDirection</code></a></td></tr></tbody></table></div>
|
|
433
|
+
<h6 id="returns-13">Returns</h6>
|
|
434
|
+
<p><a href="#query"><code>Query</code></a></p>
|
|
435
|
+
<h6 id="inherited-from-7">Inherited from</h6>
|
|
436
|
+
<p><a href="#query"><code>Query</code></a>.<a href="#orderby-2"><code>orderBy</code></a></p>
|
|
437
|
+
<p><a id="startcursor"></a></p>
|
|
438
|
+
<h5 id="startcursor">startCursor()</h5>
|
|
439
|
+
<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">startCursor</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">values</span><span style="color:#ABB2BF">: </span><span style="color:#E06C75">unknown</span><span style="color:#ABB2BF">[], </span><span style="color:#E06C75">inclusive</span><span style="color:#ABB2BF">: </span><span style="color:#E06C75">boolean</span><span style="color:#ABB2BF">): </span><span style="color:#E06C75">Query</span><span style="color:#ABB2BF">;</span></span></code></pre>
|
|
440
|
+
<p>Set the start position of the query relative to the orderBy
|
|
441
|
+
fields. <code>values</code> corresponds 1:1 with the orderBy clauses on the
|
|
442
|
+
query (one value per clause); <code>inclusive</code> controls <code>startAt</code> (true)
|
|
443
|
+
vs <code>startAfter</code> (false). Repeated calls replace the previous
|
|
444
|
+
cursor — matches production.</p>
|
|
445
|
+
<h6 id="parameters-11">Parameters</h6>
|
|
446
|
+
<div class="table-scroll">
|
|
447
|
+
|
|
448
|
+
|
|
449
|
+
|
|
450
|
+
|
|
451
|
+
|
|
452
|
+
|
|
453
|
+
|
|
454
|
+
|
|
455
|
+
|
|
456
|
+
|
|
457
|
+
|
|
458
|
+
|
|
459
|
+
|
|
460
|
+
|
|
461
|
+
|
|
462
|
+
|
|
463
|
+
<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><tr><td align="left"><code>inclusive</code></td><td align="left"><code>boolean</code></td></tr></tbody></table></div>
|
|
464
|
+
<h6 id="returns-14">Returns</h6>
|
|
465
|
+
<p><a href="#query"><code>Query</code></a></p>
|
|
466
|
+
<h6 id="inherited-from-8">Inherited from</h6>
|
|
467
|
+
<p><a href="#query"><code>Query</code></a>.<a href="#startcursor-2"><code>startCursor</code></a></p>
|
|
468
|
+
<p><a id="startcursorfromsnapshot"></a></p>
|
|
469
|
+
<h5 id="startcursorfromsnapshot">startCursorFromSnapshot()</h5>
|
|
470
|
+
<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">startCursorFromSnapshot</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">snapshot</span><span style="color:#ABB2BF">: </span><span style="color:#E06C75">AdminDocumentSnapshot</span><span style="color:#ABB2BF">, </span><span style="color:#E06C75">inclusive</span><span style="color:#ABB2BF">: </span><span style="color:#E06C75">boolean</span><span style="color:#ABB2BF">): </span><span style="color:#E06C75">Query</span><span style="color:#ABB2BF">;</span></span></code></pre>
|
|
471
|
+
<p>Variant of <a href="#startcursor-2">startCursor</a> that takes a <code>DocumentSnapshot</code>
|
|
472
|
+
and extracts the cursor values from the snapshot’s data at each
|
|
473
|
+
orderBy field. Mirrors the JS SDK’s <code>startAt(snapshot)</code> overload
|
|
474
|
+
and shines for cursor-based pagination (“hand me the next page
|
|
475
|
+
after this one”). Requires at least one <code>orderBy</code> clause —
|
|
476
|
+
thrown at call time, not at get-time, so the failure surfaces
|
|
477
|
+
close to the bug.</p>
|
|
478
|
+
<h6 id="parameters-12">Parameters</h6>
|
|
479
|
+
<div class="table-scroll">
|
|
480
|
+
|
|
481
|
+
|
|
482
|
+
|
|
483
|
+
|
|
484
|
+
|
|
485
|
+
|
|
486
|
+
|
|
487
|
+
|
|
488
|
+
|
|
489
|
+
|
|
490
|
+
|
|
491
|
+
|
|
492
|
+
|
|
493
|
+
|
|
494
|
+
|
|
495
|
+
|
|
496
|
+
<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="#admindocumentsnapshot"><code>AdminDocumentSnapshot</code></a></td></tr><tr><td align="left"><code>inclusive</code></td><td align="left"><code>boolean</code></td></tr></tbody></table></div>
|
|
497
|
+
<h6 id="returns-15">Returns</h6>
|
|
498
|
+
<p><a href="#query"><code>Query</code></a></p>
|
|
499
|
+
<h6 id="inherited-from-9">Inherited from</h6>
|
|
500
|
+
<p><a href="#query"><code>Query</code></a>.<a href="#startcursorfromsnapshot-2"><code>startCursorFromSnapshot</code></a></p>
|
|
501
|
+
<p><a id="where"></a></p>
|
|
502
|
+
<h5 id="where">where()</h5>
|
|
503
|
+
<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">where</span><span style="color:#ABB2BF">(</span></span>
|
|
504
|
+
<span class="line"><span style="color:#E06C75"> field</span><span style="color:#ABB2BF">: </span><span style="color:#E06C75">string</span><span style="color:#ABB2BF">,</span></span>
|
|
505
|
+
<span class="line"><span style="color:#E06C75"> op</span><span style="color:#ABB2BF">: </span><span style="color:#E06C75">WhereFilterOp</span><span style="color:#ABB2BF">,</span></span>
|
|
506
|
+
<span class="line"><span style="color:#E06C75"> value</span><span style="color:#ABB2BF">: </span><span style="color:#E06C75">unknown</span><span style="color:#ABB2BF">): </span><span style="color:#E06C75">Query</span><span style="color:#ABB2BF">;</span></span></code></pre>
|
|
507
|
+
<h6 id="parameters-13">Parameters</h6>
|
|
508
|
+
<div class="table-scroll">
|
|
509
|
+
|
|
510
|
+
|
|
511
|
+
|
|
512
|
+
|
|
513
|
+
|
|
514
|
+
|
|
515
|
+
|
|
516
|
+
|
|
517
|
+
|
|
518
|
+
|
|
519
|
+
|
|
520
|
+
|
|
521
|
+
|
|
522
|
+
|
|
523
|
+
|
|
524
|
+
|
|
525
|
+
|
|
526
|
+
|
|
527
|
+
|
|
528
|
+
|
|
529
|
+
<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><tr><td align="left"><code>op</code></td><td align="left"><a href="/docs/pyric-firestore-reference-api/#wherefilterop"><code>WhereFilterOp</code></a></td></tr><tr><td align="left"><code>value</code></td><td align="left"><code>unknown</code></td></tr></tbody></table></div>
|
|
530
|
+
<h6 id="returns-16">Returns</h6>
|
|
531
|
+
<p><a href="#query"><code>Query</code></a></p>
|
|
532
|
+
<h6 id="inherited-from-10">Inherited from</h6>
|
|
533
|
+
<p><a href="#query"><code>Query</code></a>.<a href="#where-2"><code>where</code></a></p>
|
|
534
|
+
<hr>
|
|
535
|
+
<p><a id="docchangesoptions"></a></p>
|
|
536
|
+
<h3 id="docchangesoptions">DocChangesOptions</h3>
|
|
537
|
+
<p>Options for <code>QuerySnapshot.docChanges</code>. Mirrors Web SDK shape.</p>
|
|
538
|
+
<h4 id="properties-4">Properties</h4>
|
|
539
|
+
<div class="table-scroll">
|
|
540
|
+
|
|
541
|
+
|
|
542
|
+
|
|
543
|
+
|
|
544
|
+
|
|
545
|
+
|
|
546
|
+
|
|
547
|
+
|
|
548
|
+
|
|
549
|
+
|
|
550
|
+
|
|
551
|
+
|
|
552
|
+
<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>
|
|
553
|
+
<hr>
|
|
554
|
+
<p><a id="documentchange"></a></p>
|
|
555
|
+
<h3 id="documentchange">DocumentChange</h3>
|
|
556
|
+
<h4 id="properties-5">Properties</h4>
|
|
557
|
+
<div class="table-scroll">
|
|
558
|
+
|
|
559
|
+
|
|
560
|
+
|
|
561
|
+
|
|
562
|
+
|
|
563
|
+
|
|
564
|
+
|
|
565
|
+
|
|
566
|
+
|
|
567
|
+
|
|
568
|
+
|
|
569
|
+
|
|
570
|
+
|
|
571
|
+
|
|
572
|
+
|
|
573
|
+
|
|
574
|
+
|
|
575
|
+
|
|
576
|
+
|
|
577
|
+
|
|
578
|
+
|
|
579
|
+
|
|
580
|
+
|
|
581
|
+
|
|
582
|
+
|
|
583
|
+
|
|
584
|
+
|
|
585
|
+
|
|
586
|
+
|
|
587
|
+
|
|
588
|
+
|
|
589
|
+
|
|
590
|
+
|
|
591
|
+
|
|
592
|
+
<table><thead><tr><th align="left">Property</th><th align="left">Modifier</th><th align="left">Type</th><th align="left">Description</th></tr></thead><tbody><tr><td align="left"><a id="doc-2"></a> <code>doc</code></td><td align="left"><code>readonly</code></td><td align="left"><a href="#querydocumentsnapshot"><code>QueryDocumentSnapshot</code></a></td><td align="left">-</td></tr><tr><td align="left"><a id="newindex"></a> <code>newIndex</code></td><td align="left"><code>readonly</code></td><td align="left"><code>number</code></td><td align="left">-1 for <code>removed</code>.</td></tr><tr><td align="left"><a id="oldindex"></a> <code>oldIndex</code></td><td align="left"><code>readonly</code></td><td align="left"><code>number</code></td><td align="left">-1 for <code>added</code>.</td></tr><tr><td align="left"><a id="type"></a> <code>type</code></td><td align="left"><code>readonly</code></td><td align="left"><a href="#documentchangetype-1"><code>DocumentChangeType</code></a></td><td align="left">-</td></tr></tbody></table></div>
|
|
593
|
+
<hr>
|
|
594
|
+
<p><a id="documentreference"></a></p>
|
|
595
|
+
<h3 id="documentreference">DocumentReference</h3>
|
|
596
|
+
<h4 id="properties-6">Properties</h4>
|
|
597
|
+
<div class="table-scroll">
|
|
598
|
+
|
|
599
|
+
|
|
600
|
+
|
|
601
|
+
|
|
602
|
+
|
|
603
|
+
|
|
604
|
+
|
|
605
|
+
|
|
606
|
+
|
|
607
|
+
|
|
608
|
+
|
|
609
|
+
|
|
610
|
+
|
|
611
|
+
|
|
612
|
+
|
|
613
|
+
|
|
614
|
+
|
|
615
|
+
|
|
616
|
+
|
|
617
|
+
|
|
618
|
+
|
|
619
|
+
|
|
620
|
+
|
|
621
|
+
|
|
622
|
+
<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-3"></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="parent"></a> <code>parent</code></td><td align="left"><code>readonly</code></td><td align="left"><a href="#collectionreference"><code>CollectionReference</code></a></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>
|
|
623
|
+
<h4 id="methods-5">Methods</h4>
|
|
624
|
+
<p><a id="collection"></a></p>
|
|
625
|
+
<h5 id="collection">collection()</h5>
|
|
626
|
+
<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">collection</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">name</span><span style="color:#ABB2BF">: </span><span style="color:#E06C75">string</span><span style="color:#ABB2BF">): </span><span style="color:#E06C75">CollectionReference</span><span style="color:#ABB2BF">;</span></span></code></pre>
|
|
627
|
+
<h6 id="parameters-14">Parameters</h6>
|
|
628
|
+
<div class="table-scroll">
|
|
629
|
+
|
|
630
|
+
|
|
631
|
+
|
|
632
|
+
|
|
633
|
+
|
|
634
|
+
|
|
635
|
+
|
|
636
|
+
|
|
637
|
+
|
|
638
|
+
|
|
639
|
+
|
|
640
|
+
|
|
641
|
+
<table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>name</code></td><td align="left"><code>string</code></td></tr></tbody></table></div>
|
|
642
|
+
<h6 id="returns-17">Returns</h6>
|
|
643
|
+
<p><a href="#collectionreference"><code>CollectionReference</code></a></p>
|
|
644
|
+
<p><a id="delete"></a></p>
|
|
645
|
+
<h5 id="delete">delete()</h5>
|
|
646
|
+
<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">delete</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">opts</span><span style="color:#C678DD">?:</span><span style="color:#E06C75"> OperationOptions</span><span style="color:#ABB2BF">): </span><span style="color:#E5C07B">Promise</span><span style="color:#56B6C2"><</span><span style="color:#C678DD">void</span><span style="color:#56B6C2">></span><span style="color:#ABB2BF">;</span></span></code></pre>
|
|
647
|
+
<h6 id="parameters-15">Parameters</h6>
|
|
648
|
+
<div class="table-scroll">
|
|
649
|
+
|
|
650
|
+
|
|
651
|
+
|
|
652
|
+
|
|
653
|
+
|
|
654
|
+
|
|
655
|
+
|
|
656
|
+
|
|
657
|
+
|
|
658
|
+
|
|
659
|
+
|
|
660
|
+
|
|
661
|
+
<table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>opts?</code></td><td align="left"><code>OperationOptions</code></td></tr></tbody></table></div>
|
|
662
|
+
<h6 id="returns-18">Returns</h6>
|
|
663
|
+
<p><code>Promise</code><<code>void</code>></p>
|
|
664
|
+
<p><a id="get-2"></a></p>
|
|
665
|
+
<h5 id="get-1">get()</h5>
|
|
666
|
+
<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">get</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">opts</span><span style="color:#C678DD">?:</span><span style="color:#E06C75"> OperationOptions</span><span style="color:#ABB2BF">): </span><span style="color:#E5C07B">Promise</span><span style="color:#56B6C2"><</span><span style="color:#E06C75">AdminDocumentSnapshot</span><span style="color:#56B6C2">></span><span style="color:#ABB2BF">;</span></span></code></pre>
|
|
667
|
+
<h6 id="parameters-16">Parameters</h6>
|
|
668
|
+
<div class="table-scroll">
|
|
669
|
+
|
|
670
|
+
|
|
671
|
+
|
|
672
|
+
|
|
673
|
+
|
|
674
|
+
|
|
675
|
+
|
|
676
|
+
|
|
677
|
+
|
|
678
|
+
|
|
679
|
+
|
|
680
|
+
|
|
681
|
+
<table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>opts?</code></td><td align="left"><code>OperationOptions</code></td></tr></tbody></table></div>
|
|
682
|
+
<h6 id="returns-19">Returns</h6>
|
|
683
|
+
<p><code>Promise</code><<a href="#admindocumentsnapshot"><code>AdminDocumentSnapshot</code></a>></p>
|
|
684
|
+
<p><a id="set"></a></p>
|
|
685
|
+
<h5 id="set">set()</h5>
|
|
686
|
+
<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">set</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">data</span><span style="color:#ABB2BF">: </span><span style="color:#E06C75">DocumentData</span><span style="color:#ABB2BF">, </span><span style="color:#E06C75">options</span><span style="color:#C678DD">?:</span><span style="color:#E06C75"> SetOptions</span><span style="color:#ABB2BF">): </span><span style="color:#E5C07B">Promise</span><span style="color:#56B6C2"><</span><span style="color:#C678DD">void</span><span style="color:#56B6C2">></span><span style="color:#ABB2BF">;</span></span></code></pre>
|
|
687
|
+
<h6 id="parameters-17">Parameters</h6>
|
|
688
|
+
<div class="table-scroll">
|
|
689
|
+
|
|
690
|
+
|
|
691
|
+
|
|
692
|
+
|
|
693
|
+
|
|
694
|
+
|
|
695
|
+
|
|
696
|
+
|
|
697
|
+
|
|
698
|
+
|
|
699
|
+
|
|
700
|
+
|
|
701
|
+
|
|
702
|
+
|
|
703
|
+
|
|
704
|
+
|
|
705
|
+
<table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>data</code></td><td align="left"><a href="/docs/pyric-firestore-reference-api/#documentdata"><code>DocumentData</code></a></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>
|
|
706
|
+
<h6 id="returns-20">Returns</h6>
|
|
707
|
+
<p><code>Promise</code><<code>void</code>></p>
|
|
708
|
+
<p><a id="update"></a></p>
|
|
709
|
+
<h5 id="update">update()</h5>
|
|
710
|
+
<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">update</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">data</span><span style="color:#ABB2BF">: </span><span style="color:#E06C75">DocumentData</span><span style="color:#ABB2BF">, </span><span style="color:#E06C75">opts</span><span style="color:#C678DD">?:</span><span style="color:#E06C75"> OperationOptions</span><span style="color:#ABB2BF">): </span><span style="color:#E5C07B">Promise</span><span style="color:#56B6C2"><</span><span style="color:#C678DD">void</span><span style="color:#56B6C2">></span><span style="color:#ABB2BF">;</span></span></code></pre>
|
|
711
|
+
<h6 id="parameters-18">Parameters</h6>
|
|
712
|
+
<div class="table-scroll">
|
|
713
|
+
|
|
714
|
+
|
|
715
|
+
|
|
716
|
+
|
|
717
|
+
|
|
718
|
+
|
|
719
|
+
|
|
720
|
+
|
|
721
|
+
|
|
722
|
+
|
|
723
|
+
|
|
724
|
+
|
|
725
|
+
|
|
726
|
+
|
|
727
|
+
|
|
728
|
+
|
|
729
|
+
<table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>data</code></td><td align="left"><a href="/docs/pyric-firestore-reference-api/#documentdata"><code>DocumentData</code></a></td></tr><tr><td align="left"><code>opts?</code></td><td align="left"><code>OperationOptions</code></td></tr></tbody></table></div>
|
|
730
|
+
<h6 id="returns-21">Returns</h6>
|
|
731
|
+
<p><code>Promise</code><<code>void</code>></p>
|
|
732
|
+
<hr>
|
|
733
|
+
<p><a id="documentsnapshot"></a></p>
|
|
734
|
+
<h3 id="documentsnapshot">DocumentSnapshot</h3>
|
|
735
|
+
<h4 id="extended-by-1">Extended by</h4>
|
|
736
|
+
<ul>
|
|
737
|
+
<li><a href="#querydocumentsnapshot"><code>QueryDocumentSnapshot</code></a></li>
|
|
738
|
+
</ul>
|
|
739
|
+
<h4 id="properties-7">Properties</h4>
|
|
740
|
+
<div class="table-scroll">
|
|
741
|
+
|
|
742
|
+
|
|
743
|
+
|
|
744
|
+
|
|
745
|
+
|
|
746
|
+
|
|
747
|
+
|
|
748
|
+
|
|
749
|
+
|
|
750
|
+
|
|
751
|
+
|
|
752
|
+
|
|
753
|
+
|
|
754
|
+
|
|
755
|
+
|
|
756
|
+
|
|
757
|
+
|
|
758
|
+
|
|
759
|
+
|
|
760
|
+
|
|
761
|
+
|
|
762
|
+
|
|
763
|
+
|
|
764
|
+
|
|
765
|
+
<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-4"></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="metadata"></a> <code>metadata</code></td><td align="left"><code>readonly</code></td><td align="left"><a href="#snapshotmetadata"><code>SnapshotMetadata</code></a></td></tr><tr><td align="left"><a id="ref-2"></a> <code>ref</code></td><td align="left"><code>readonly</code></td><td align="left"><code>SnapshotDocRef</code></td></tr></tbody></table></div>
|
|
766
|
+
<h4 id="methods-6">Methods</h4>
|
|
767
|
+
<p><a id="data-6"></a></p>
|
|
768
|
+
<h5 id="data-3">data()</h5>
|
|
769
|
+
<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:#E06C75">DocumentData</span><span style="color:#ABB2BF">;</span></span></code></pre>
|
|
770
|
+
<h6 id="returns-22">Returns</h6>
|
|
771
|
+
<p><code>DocumentData</code></p>
|
|
772
|
+
<p><a id="exists-2"></a></p>
|
|
773
|
+
<h5 id="exists">exists()</h5>
|
|
774
|
+
<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">exists</span><span style="color:#ABB2BF">(): </span><span style="color:#E06C75">boolean</span><span style="color:#ABB2BF">;</span></span></code></pre>
|
|
775
|
+
<h6 id="returns-23">Returns</h6>
|
|
776
|
+
<p><code>boolean</code></p>
|
|
777
|
+
<p><a id="get-4"></a></p>
|
|
778
|
+
<h5 id="get-2">get()</h5>
|
|
779
|
+
<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">get</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">fieldPath</span><span style="color:#ABB2BF">: </span><span style="color:#E06C75">string</span><span style="color:#ABB2BF">): </span><span style="color:#E06C75">unknown</span><span style="color:#ABB2BF">;</span></span></code></pre>
|
|
780
|
+
<p>Field accessor mirroring <code>firebase/firestore</code>’s <code>DocumentSnapshot.get(fieldPath)</code>.
|
|
781
|
+
Dotted paths supported. Missing intermediate keys yield <code>undefined</code>
|
|
782
|
+
— production behavior; agents commonly chain optional reads.</p>
|
|
783
|
+
<h6 id="parameters-19">Parameters</h6>
|
|
784
|
+
<div class="table-scroll">
|
|
785
|
+
|
|
786
|
+
|
|
787
|
+
|
|
788
|
+
|
|
789
|
+
|
|
790
|
+
|
|
791
|
+
|
|
792
|
+
|
|
793
|
+
|
|
794
|
+
|
|
795
|
+
|
|
796
|
+
|
|
797
|
+
<table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>fieldPath</code></td><td align="left"><code>string</code></td></tr></tbody></table></div>
|
|
798
|
+
<h6 id="returns-24">Returns</h6>
|
|
799
|
+
<p><code>unknown</code></p>
|
|
800
|
+
<hr>
|
|
801
|
+
<p><a id="firestore"></a></p>
|
|
802
|
+
<h3 id="firestore">Firestore</h3>
|
|
803
|
+
<h4 id="extended-by-2">Extended by</h4>
|
|
804
|
+
<ul>
|
|
805
|
+
<li><a href="#sandboxfirestore"><code>SandboxFirestore</code></a></li>
|
|
806
|
+
</ul>
|
|
807
|
+
<h4 id="methods-7">Methods</h4>
|
|
808
|
+
<p><a id="batch"></a></p>
|
|
809
|
+
<h5 id="batch">batch()</h5>
|
|
810
|
+
<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">batch</span><span style="color:#ABB2BF">(): </span><span style="color:#E06C75">WriteBatch</span><span style="color:#ABB2BF">;</span></span></code></pre>
|
|
811
|
+
<h6 id="returns-25">Returns</h6>
|
|
812
|
+
<p><a href="#writebatch"><code>WriteBatch</code></a></p>
|
|
813
|
+
<p><a id="collection-2"></a></p>
|
|
814
|
+
<h5 id="collection-1">collection()</h5>
|
|
815
|
+
<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">collection</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">path</span><span style="color:#ABB2BF">: </span><span style="color:#E06C75">string</span><span style="color:#ABB2BF">): </span><span style="color:#E06C75">CollectionReference</span><span style="color:#ABB2BF">;</span></span></code></pre>
|
|
816
|
+
<h6 id="parameters-20">Parameters</h6>
|
|
817
|
+
<div class="table-scroll">
|
|
818
|
+
|
|
819
|
+
|
|
820
|
+
|
|
821
|
+
|
|
822
|
+
|
|
823
|
+
|
|
824
|
+
|
|
825
|
+
|
|
826
|
+
|
|
827
|
+
|
|
828
|
+
|
|
829
|
+
|
|
830
|
+
<table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>path</code></td><td align="left"><code>string</code></td></tr></tbody></table></div>
|
|
831
|
+
<h6 id="returns-26">Returns</h6>
|
|
832
|
+
<p><a href="#collectionreference"><code>CollectionReference</code></a></p>
|
|
833
|
+
<p><a id="collectiongroup"></a></p>
|
|
834
|
+
<h5 id="collectiongroup">collectionGroup()</h5>
|
|
835
|
+
<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">collectionGroup</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">collectionId</span><span style="color:#ABB2BF">: </span><span style="color:#E06C75">string</span><span style="color:#ABB2BF">): </span><span style="color:#E06C75">Query</span><span style="color:#ABB2BF">;</span></span></code></pre>
|
|
836
|
+
<p>Cross-collection query — returns a <code>Query</code> that scans every
|
|
837
|
+
document under every collection whose final segment matches
|
|
838
|
+
<code>collectionId</code>, regardless of position in the path. Matches the
|
|
839
|
+
Admin SDK’s <code>Firestore.collectionGroup(id)</code> shape.</p>
|
|
840
|
+
<p>The returned <code>Query</code> accepts <code>where</code> / <code>orderBy</code> / <code>limit</code> like
|
|
841
|
+
any other; the simulator gathers all candidate docs first, then
|
|
842
|
+
applies the constraints in-memory.</p>
|
|
843
|
+
<h6 id="parameters-21">Parameters</h6>
|
|
844
|
+
<div class="table-scroll">
|
|
845
|
+
|
|
846
|
+
|
|
847
|
+
|
|
848
|
+
|
|
849
|
+
|
|
850
|
+
|
|
851
|
+
|
|
852
|
+
|
|
853
|
+
|
|
854
|
+
|
|
855
|
+
|
|
856
|
+
|
|
857
|
+
<table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>collectionId</code></td><td align="left"><code>string</code></td></tr></tbody></table></div>
|
|
858
|
+
<h6 id="returns-27">Returns</h6>
|
|
859
|
+
<p><a href="#query"><code>Query</code></a></p>
|
|
860
|
+
<p><a id="doc-3"></a></p>
|
|
861
|
+
<h5 id="doc-1">doc()</h5>
|
|
862
|
+
<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">doc</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">path</span><span style="color:#ABB2BF">: </span><span style="color:#E06C75">string</span><span style="color:#ABB2BF">): </span><span style="color:#E06C75">DocumentReference</span><span style="color:#ABB2BF">;</span></span></code></pre>
|
|
863
|
+
<h6 id="parameters-22">Parameters</h6>
|
|
864
|
+
<div class="table-scroll">
|
|
865
|
+
|
|
866
|
+
|
|
867
|
+
|
|
868
|
+
|
|
869
|
+
|
|
870
|
+
|
|
871
|
+
|
|
872
|
+
|
|
873
|
+
|
|
874
|
+
|
|
875
|
+
|
|
876
|
+
|
|
877
|
+
<table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>path</code></td><td align="left"><code>string</code></td></tr></tbody></table></div>
|
|
878
|
+
<h6 id="returns-28">Returns</h6>
|
|
879
|
+
<p><a href="#documentreference"><code>DocumentReference</code></a></p>
|
|
880
|
+
<p><a id="runtransaction"></a></p>
|
|
881
|
+
<h5 id="runtransaction">runTransaction()</h5>
|
|
882
|
+
<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">runTransaction</span><span style="color:#ABB2BF"><</span><span style="color:#E5C07B">R</span><span style="color:#ABB2BF">>(</span><span style="color:#E06C75">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">Transaction</span><span style="color:#ABB2BF">) </span><span style="color:#C678DD">=></span><span style="color:#E5C07B"> R</span><span style="color:#56B6C2"> |</span><span style="color:#E5C07B"> Promise</span><span style="color:#56B6C2"><</span><span style="color:#E5C07B">R</span><span style="color:#56B6C2">></span><span style="color:#ABB2BF">, </span><span style="color:#E06C75">opts</span><span style="color:#C678DD">?:</span><span style="color:#E06C75"> OperationOptions</span><span style="color:#ABB2BF">): </span><span style="color:#E5C07B">Promise</span><span style="color:#56B6C2"><</span><span style="color:#E5C07B">R</span><span style="color:#56B6C2">></span><span style="color:#ABB2BF">;</span></span></code></pre>
|
|
883
|
+
<h6 id="type-parameters">Type Parameters</h6>
|
|
884
|
+
<div class="table-scroll">
|
|
885
|
+
|
|
886
|
+
|
|
887
|
+
|
|
888
|
+
|
|
889
|
+
|
|
890
|
+
|
|
891
|
+
|
|
892
|
+
|
|
893
|
+
|
|
894
|
+
|
|
895
|
+
<table><thead><tr><th align="left">Type Parameter</th></tr></thead><tbody><tr><td align="left"><code>R</code></td></tr></tbody></table></div>
|
|
896
|
+
<h6 id="parameters-23">Parameters</h6>
|
|
897
|
+
<div class="table-scroll">
|
|
898
|
+
|
|
899
|
+
|
|
900
|
+
|
|
901
|
+
|
|
902
|
+
|
|
903
|
+
|
|
904
|
+
|
|
905
|
+
|
|
906
|
+
|
|
907
|
+
|
|
908
|
+
|
|
909
|
+
|
|
910
|
+
|
|
911
|
+
|
|
912
|
+
|
|
913
|
+
|
|
914
|
+
<table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>fn</code></td><td align="left">(<code>tx</code>: <a href="#transaction"><code>Transaction</code></a>) => <code>R</code> | <code>Promise</code><<code>R</code>></td></tr><tr><td align="left"><code>opts?</code></td><td align="left"><code>OperationOptions</code></td></tr></tbody></table></div>
|
|
915
|
+
<h6 id="returns-29">Returns</h6>
|
|
916
|
+
<p><code>Promise</code><<code>R</code>></p>
|
|
917
|
+
<hr>
|
|
918
|
+
<p><a id="lintwarning"></a></p>
|
|
919
|
+
<h3 id="lintwarning">LintWarning</h3>
|
|
920
|
+
<h4 id="properties-8">Properties</h4>
|
|
921
|
+
<div class="table-scroll">
|
|
922
|
+
|
|
923
|
+
|
|
924
|
+
|
|
925
|
+
|
|
926
|
+
|
|
927
|
+
|
|
928
|
+
|
|
929
|
+
|
|
930
|
+
|
|
931
|
+
|
|
932
|
+
|
|
933
|
+
|
|
934
|
+
|
|
935
|
+
|
|
936
|
+
|
|
937
|
+
|
|
938
|
+
|
|
939
|
+
|
|
940
|
+
|
|
941
|
+
|
|
942
|
+
|
|
943
|
+
|
|
944
|
+
|
|
945
|
+
|
|
946
|
+
|
|
947
|
+
|
|
948
|
+
|
|
949
|
+
|
|
950
|
+
|
|
951
|
+
|
|
952
|
+
|
|
953
|
+
|
|
954
|
+
|
|
955
|
+
|
|
956
|
+
|
|
957
|
+
|
|
958
|
+
|
|
959
|
+
|
|
960
|
+
|
|
961
|
+
|
|
962
|
+
|
|
963
|
+
|
|
964
|
+
|
|
965
|
+
|
|
966
|
+
|
|
967
|
+
|
|
968
|
+
|
|
969
|
+
|
|
970
|
+
|
|
971
|
+
|
|
972
|
+
|
|
973
|
+
|
|
974
|
+
|
|
975
|
+
|
|
976
|
+
<table><thead><tr><th align="left">Property</th><th align="left">Type</th><th align="left">Description</th></tr></thead><tbody><tr><td align="left"><a id="fix"></a> <code>fix?</code></td><td align="left"><code>string</code></td><td align="left">-</td></tr><tr><td align="left"><a id="location"></a> <code>location?</code></td><td align="left">{ <code>functionName?</code>: <code>string</code>; <code>matchPath?</code>: <code>string</code>; <code>ruleIndex?</code>: <code>number</code>; <code>testCaseDescription?</code>: <code>string</code>; }</td><td align="left">-</td></tr><tr><td align="left"><code>location.functionName?</code></td><td align="left"><code>string</code></td><td align="left">-</td></tr><tr><td align="left"><code>location.matchPath?</code></td><td align="left"><code>string</code></td><td align="left">-</td></tr><tr><td align="left"><code>location.ruleIndex?</code></td><td align="left"><code>number</code></td><td align="left">-</td></tr><tr><td align="left"><code>location.testCaseDescription?</code></td><td align="left"><code>string</code></td><td align="left">Test-case description from <code>TestCase.description</code>. Set only by rules that operate on the optional test suite (e.g. REQUEST_TIME_NOT_PINNED).</td></tr><tr><td align="left"><a id="message"></a> <code>message</code></td><td align="left"><code>string</code></td><td align="left">-</td></tr><tr><td align="left"><a id="rule"></a> <code>rule</code></td><td align="left"><code>string</code></td><td align="left">-</td></tr><tr><td align="left"><a id="severity"></a> <code>severity</code></td><td align="left"><code>"error"</code> | <code>"warning"</code></td><td align="left">-</td></tr></tbody></table></div>
|
|
977
|
+
<hr>
|
|
978
|
+
<p><a id="query"></a></p>
|
|
979
|
+
<h3 id="query">Query</h3>
|
|
980
|
+
<h4 id="extended-by-3">Extended by</h4>
|
|
981
|
+
<ul>
|
|
982
|
+
<li><a href="#collectionreference"><code>CollectionReference</code></a></li>
|
|
983
|
+
</ul>
|
|
984
|
+
<h4 id="methods-8">Methods</h4>
|
|
985
|
+
<p><a id="aggregate-2"></a></p>
|
|
986
|
+
<h5 id="aggregate-1">aggregate()</h5>
|
|
987
|
+
<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">aggregate</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">spec</span><span style="color:#ABB2BF">: </span><span style="color:#E06C75">AggregateSpec</span><span style="color:#ABB2BF">): </span><span style="color:#E5C07B">Promise</span><span style="color:#56B6C2"><</span><span style="color:#E06C75">AggregateQuerySnapshot</span><span style="color:#56B6C2">></span><span style="color:#ABB2BF">;</span></span></code></pre>
|
|
988
|
+
<p>Compute one or more aggregates over the documents matching this
|
|
989
|
+
query. Mirrors the Admin SDK’s <code>query.aggregate({ … }).get()</code>
|
|
990
|
+
pattern, collapsed into one call for the simulator (no need to
|
|
991
|
+
build an <code>AggregateQuery</code> reference type when there’s no remote
|
|
992
|
+
dispatch).</p>
|
|
993
|
+
<p>Each entry in <code>spec</code> is keyed by a caller-chosen alias and
|
|
994
|
+
resolves to an <code>AggregateField</code>. The returned snapshot exposes
|
|
995
|
+
the computed numbers under the same aliases via <code>.data()</code>.</p>
|
|
996
|
+
<p>Where / orderBy clauses ARE applied before aggregation (they
|
|
997
|
+
narrow the candidate doc set). <code>limit</code> is honored — the aggregate
|
|
998
|
+
computes against the limited set, matching production semantics.</p>
|
|
999
|
+
<h6 id="parameters-24">Parameters</h6>
|
|
1000
|
+
<div class="table-scroll">
|
|
1001
|
+
|
|
1002
|
+
|
|
1003
|
+
|
|
1004
|
+
|
|
1005
|
+
|
|
1006
|
+
|
|
1007
|
+
|
|
1008
|
+
|
|
1009
|
+
|
|
1010
|
+
|
|
1011
|
+
|
|
1012
|
+
|
|
1013
|
+
<table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>spec</code></td><td align="left"><a href="#aggregatespec"><code>AggregateSpec</code></a></td></tr></tbody></table></div>
|
|
1014
|
+
<h6 id="returns-30">Returns</h6>
|
|
1015
|
+
<p><code>Promise</code><<a href="#aggregatequerysnapshot"><code>AggregateQuerySnapshot</code></a>></p>
|
|
1016
|
+
<p><a id="applyfilter-2"></a></p>
|
|
1017
|
+
<h5 id="applyfilter-1">applyFilter()</h5>
|
|
1018
|
+
<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">applyFilter</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">filter</span><span style="color:#ABB2BF">: </span><span style="color:#E06C75">Filter</span><span style="color:#ABB2BF">): </span><span style="color:#E06C75">Query</span><span style="color:#ABB2BF">;</span></span></code></pre>
|
|
1019
|
+
<p>Add a composite filter (leaf, AND, or OR) to the query’s filter
|
|
1020
|
+
stack. Each <code>applyFilter</code> call AND-s with whatever filters are
|
|
1021
|
+
already on the query — same implicit-AND semantics as multiple
|
|
1022
|
+
<code>where()</code> calls. To OR multiple predicates, wrap them with
|
|
1023
|
+
<code>{ kind: 'or', filters: [...] }</code> before calling. Backs the
|
|
1024
|
+
modular <code>or()</code> / <code>and()</code> constraints in <code>pyric/firestore</code>.</p>
|
|
1025
|
+
<h6 id="parameters-25">Parameters</h6>
|
|
1026
|
+
<div class="table-scroll">
|
|
1027
|
+
|
|
1028
|
+
|
|
1029
|
+
|
|
1030
|
+
|
|
1031
|
+
|
|
1032
|
+
|
|
1033
|
+
|
|
1034
|
+
|
|
1035
|
+
|
|
1036
|
+
|
|
1037
|
+
|
|
1038
|
+
|
|
1039
|
+
<table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>filter</code></td><td align="left"><a href="#filter"><code>Filter</code></a></td></tr></tbody></table></div>
|
|
1040
|
+
<h6 id="returns-31">Returns</h6>
|
|
1041
|
+
<p><a href="#query"><code>Query</code></a></p>
|
|
1042
|
+
<p><a id="endcursor-2"></a></p>
|
|
1043
|
+
<h5 id="endcursor-1">endCursor()</h5>
|
|
1044
|
+
<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">endCursor</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">values</span><span style="color:#ABB2BF">: </span><span style="color:#E06C75">unknown</span><span style="color:#ABB2BF">[], </span><span style="color:#E06C75">inclusive</span><span style="color:#ABB2BF">: </span><span style="color:#E06C75">boolean</span><span style="color:#ABB2BF">): </span><span style="color:#E06C75">Query</span><span style="color:#ABB2BF">;</span></span></code></pre>
|
|
1045
|
+
<p>Set the end position of the query relative to the orderBy fields.
|
|
1046
|
+
<code>inclusive</code> controls <code>endAt</code> (true) vs <code>endBefore</code> (false).</p>
|
|
1047
|
+
<h6 id="parameters-26">Parameters</h6>
|
|
1048
|
+
<div class="table-scroll">
|
|
1049
|
+
|
|
1050
|
+
|
|
1051
|
+
|
|
1052
|
+
|
|
1053
|
+
|
|
1054
|
+
|
|
1055
|
+
|
|
1056
|
+
|
|
1057
|
+
|
|
1058
|
+
|
|
1059
|
+
|
|
1060
|
+
|
|
1061
|
+
|
|
1062
|
+
|
|
1063
|
+
|
|
1064
|
+
|
|
1065
|
+
<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><tr><td align="left"><code>inclusive</code></td><td align="left"><code>boolean</code></td></tr></tbody></table></div>
|
|
1066
|
+
<h6 id="returns-32">Returns</h6>
|
|
1067
|
+
<p><a href="#query"><code>Query</code></a></p>
|
|
1068
|
+
<p><a id="endcursorfromsnapshot-2"></a></p>
|
|
1069
|
+
<h5 id="endcursorfromsnapshot-1">endCursorFromSnapshot()</h5>
|
|
1070
|
+
<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">endCursorFromSnapshot</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">snapshot</span><span style="color:#ABB2BF">: </span><span style="color:#E06C75">AdminDocumentSnapshot</span><span style="color:#ABB2BF">, </span><span style="color:#E06C75">inclusive</span><span style="color:#ABB2BF">: </span><span style="color:#E06C75">boolean</span><span style="color:#ABB2BF">): </span><span style="color:#E06C75">Query</span><span style="color:#ABB2BF">;</span></span></code></pre>
|
|
1071
|
+
<p>Snapshot-based variant of <a href="#endcursor-2">endCursor</a>.</p>
|
|
1072
|
+
<h6 id="parameters-27">Parameters</h6>
|
|
1073
|
+
<div class="table-scroll">
|
|
1074
|
+
|
|
1075
|
+
|
|
1076
|
+
|
|
1077
|
+
|
|
1078
|
+
|
|
1079
|
+
|
|
1080
|
+
|
|
1081
|
+
|
|
1082
|
+
|
|
1083
|
+
|
|
1084
|
+
|
|
1085
|
+
|
|
1086
|
+
|
|
1087
|
+
|
|
1088
|
+
|
|
1089
|
+
|
|
1090
|
+
<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="#admindocumentsnapshot"><code>AdminDocumentSnapshot</code></a></td></tr><tr><td align="left"><code>inclusive</code></td><td align="left"><code>boolean</code></td></tr></tbody></table></div>
|
|
1091
|
+
<h6 id="returns-33">Returns</h6>
|
|
1092
|
+
<p><a href="#query"><code>Query</code></a></p>
|
|
1093
|
+
<p><a id="get-6"></a></p>
|
|
1094
|
+
<h5 id="get-3">get()</h5>
|
|
1095
|
+
<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">get</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">opts</span><span style="color:#C678DD">?:</span><span style="color:#E06C75"> OperationOptions</span><span style="color:#ABB2BF">): </span><span style="color:#E5C07B">Promise</span><span style="color:#56B6C2"><</span><span style="color:#E06C75">AdminQuerySnapshot</span><span style="color:#56B6C2">></span><span style="color:#ABB2BF">;</span></span></code></pre>
|
|
1096
|
+
<h6 id="parameters-28">Parameters</h6>
|
|
1097
|
+
<div class="table-scroll">
|
|
1098
|
+
|
|
1099
|
+
|
|
1100
|
+
|
|
1101
|
+
|
|
1102
|
+
|
|
1103
|
+
|
|
1104
|
+
|
|
1105
|
+
|
|
1106
|
+
|
|
1107
|
+
|
|
1108
|
+
|
|
1109
|
+
|
|
1110
|
+
<table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>opts?</code></td><td align="left"><code>OperationOptions</code></td></tr></tbody></table></div>
|
|
1111
|
+
<h6 id="returns-34">Returns</h6>
|
|
1112
|
+
<p><code>Promise</code><<a href="#adminquerysnapshot"><code>AdminQuerySnapshot</code></a>></p>
|
|
1113
|
+
<p><a id="limit-2"></a></p>
|
|
1114
|
+
<h5 id="limit-1">limit()</h5>
|
|
1115
|
+
<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">limit</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">n</span><span style="color:#ABB2BF">: </span><span style="color:#E06C75">number</span><span style="color:#ABB2BF">): </span><span style="color:#E06C75">Query</span><span style="color:#ABB2BF">;</span></span></code></pre>
|
|
1116
|
+
<h6 id="parameters-29">Parameters</h6>
|
|
1117
|
+
<div class="table-scroll">
|
|
1118
|
+
|
|
1119
|
+
|
|
1120
|
+
|
|
1121
|
+
|
|
1122
|
+
|
|
1123
|
+
|
|
1124
|
+
|
|
1125
|
+
|
|
1126
|
+
|
|
1127
|
+
|
|
1128
|
+
|
|
1129
|
+
|
|
1130
|
+
<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>
|
|
1131
|
+
<h6 id="returns-35">Returns</h6>
|
|
1132
|
+
<p><a href="#query"><code>Query</code></a></p>
|
|
1133
|
+
<p><a id="limittolast-2"></a></p>
|
|
1134
|
+
<h5 id="limittolast-1">limitToLast()</h5>
|
|
1135
|
+
<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">limitToLast</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">n</span><span style="color:#ABB2BF">: </span><span style="color:#E06C75">number</span><span style="color:#ABB2BF">): </span><span style="color:#E06C75">Query</span><span style="color:#ABB2BF">;</span></span></code></pre>
|
|
1136
|
+
<p>Limit from the END of the ordered result. Equivalent to reversing
|
|
1137
|
+
the orderBy, taking <code>n</code>, then re-reversing — the simulator
|
|
1138
|
+
implements it that way. Requires at least one <code>orderBy</code> clause on
|
|
1139
|
+
the query (matches the JS SDK’s runtime contract).</p>
|
|
1140
|
+
<h6 id="parameters-30">Parameters</h6>
|
|
1141
|
+
<div class="table-scroll">
|
|
1142
|
+
|
|
1143
|
+
|
|
1144
|
+
|
|
1145
|
+
|
|
1146
|
+
|
|
1147
|
+
|
|
1148
|
+
|
|
1149
|
+
|
|
1150
|
+
|
|
1151
|
+
|
|
1152
|
+
|
|
1153
|
+
|
|
1154
|
+
<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>
|
|
1155
|
+
<h6 id="returns-36">Returns</h6>
|
|
1156
|
+
<p><a href="#query"><code>Query</code></a></p>
|
|
1157
|
+
<p><a id="orderby-2"></a></p>
|
|
1158
|
+
<h5 id="orderby-1">orderBy()</h5>
|
|
1159
|
+
<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">orderBy</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">field</span><span style="color:#ABB2BF">: </span><span style="color:#E06C75">string</span><span style="color:#ABB2BF">, </span><span style="color:#E06C75">direction</span><span style="color:#C678DD">?:</span><span style="color:#E06C75"> OrderDirection</span><span style="color:#ABB2BF">): </span><span style="color:#E06C75">Query</span><span style="color:#ABB2BF">;</span></span></code></pre>
|
|
1160
|
+
<h6 id="parameters-31">Parameters</h6>
|
|
1161
|
+
<div class="table-scroll">
|
|
1162
|
+
|
|
1163
|
+
|
|
1164
|
+
|
|
1165
|
+
|
|
1166
|
+
|
|
1167
|
+
|
|
1168
|
+
|
|
1169
|
+
|
|
1170
|
+
|
|
1171
|
+
|
|
1172
|
+
|
|
1173
|
+
|
|
1174
|
+
|
|
1175
|
+
|
|
1176
|
+
|
|
1177
|
+
|
|
1178
|
+
<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><tr><td align="left"><code>direction?</code></td><td align="left"><a href="/docs/pyric-firestore-reference-api/#orderdirection"><code>OrderDirection</code></a></td></tr></tbody></table></div>
|
|
1179
|
+
<h6 id="returns-37">Returns</h6>
|
|
1180
|
+
<p><a href="#query"><code>Query</code></a></p>
|
|
1181
|
+
<p><a id="startcursor-2"></a></p>
|
|
1182
|
+
<h5 id="startcursor-1">startCursor()</h5>
|
|
1183
|
+
<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">startCursor</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">values</span><span style="color:#ABB2BF">: </span><span style="color:#E06C75">unknown</span><span style="color:#ABB2BF">[], </span><span style="color:#E06C75">inclusive</span><span style="color:#ABB2BF">: </span><span style="color:#E06C75">boolean</span><span style="color:#ABB2BF">): </span><span style="color:#E06C75">Query</span><span style="color:#ABB2BF">;</span></span></code></pre>
|
|
1184
|
+
<p>Set the start position of the query relative to the orderBy
|
|
1185
|
+
fields. <code>values</code> corresponds 1:1 with the orderBy clauses on the
|
|
1186
|
+
query (one value per clause); <code>inclusive</code> controls <code>startAt</code> (true)
|
|
1187
|
+
vs <code>startAfter</code> (false). Repeated calls replace the previous
|
|
1188
|
+
cursor — matches production.</p>
|
|
1189
|
+
<h6 id="parameters-32">Parameters</h6>
|
|
1190
|
+
<div class="table-scroll">
|
|
1191
|
+
|
|
1192
|
+
|
|
1193
|
+
|
|
1194
|
+
|
|
1195
|
+
|
|
1196
|
+
|
|
1197
|
+
|
|
1198
|
+
|
|
1199
|
+
|
|
1200
|
+
|
|
1201
|
+
|
|
1202
|
+
|
|
1203
|
+
|
|
1204
|
+
|
|
1205
|
+
|
|
1206
|
+
|
|
1207
|
+
<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><tr><td align="left"><code>inclusive</code></td><td align="left"><code>boolean</code></td></tr></tbody></table></div>
|
|
1208
|
+
<h6 id="returns-38">Returns</h6>
|
|
1209
|
+
<p><a href="#query"><code>Query</code></a></p>
|
|
1210
|
+
<p><a id="startcursorfromsnapshot-2"></a></p>
|
|
1211
|
+
<h5 id="startcursorfromsnapshot-1">startCursorFromSnapshot()</h5>
|
|
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:#61AFEF">startCursorFromSnapshot</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">snapshot</span><span style="color:#ABB2BF">: </span><span style="color:#E06C75">AdminDocumentSnapshot</span><span style="color:#ABB2BF">, </span><span style="color:#E06C75">inclusive</span><span style="color:#ABB2BF">: </span><span style="color:#E06C75">boolean</span><span style="color:#ABB2BF">): </span><span style="color:#E06C75">Query</span><span style="color:#ABB2BF">;</span></span></code></pre>
|
|
1213
|
+
<p>Variant of <a href="#startcursor-2">startCursor</a> that takes a <code>DocumentSnapshot</code>
|
|
1214
|
+
and extracts the cursor values from the snapshot’s data at each
|
|
1215
|
+
orderBy field. Mirrors the JS SDK’s <code>startAt(snapshot)</code> overload
|
|
1216
|
+
and shines for cursor-based pagination (“hand me the next page
|
|
1217
|
+
after this one”). Requires at least one <code>orderBy</code> clause —
|
|
1218
|
+
thrown at call time, not at get-time, so the failure surfaces
|
|
1219
|
+
close to the bug.</p>
|
|
1220
|
+
<h6 id="parameters-33">Parameters</h6>
|
|
1221
|
+
<div class="table-scroll">
|
|
1222
|
+
|
|
1223
|
+
|
|
1224
|
+
|
|
1225
|
+
|
|
1226
|
+
|
|
1227
|
+
|
|
1228
|
+
|
|
1229
|
+
|
|
1230
|
+
|
|
1231
|
+
|
|
1232
|
+
|
|
1233
|
+
|
|
1234
|
+
|
|
1235
|
+
|
|
1236
|
+
|
|
1237
|
+
|
|
1238
|
+
<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="#admindocumentsnapshot"><code>AdminDocumentSnapshot</code></a></td></tr><tr><td align="left"><code>inclusive</code></td><td align="left"><code>boolean</code></td></tr></tbody></table></div>
|
|
1239
|
+
<h6 id="returns-39">Returns</h6>
|
|
1240
|
+
<p><a href="#query"><code>Query</code></a></p>
|
|
1241
|
+
<p><a id="where-2"></a></p>
|
|
1242
|
+
<h5 id="where-1">where()</h5>
|
|
1243
|
+
<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">where</span><span style="color:#ABB2BF">(</span></span>
|
|
1244
|
+
<span class="line"><span style="color:#E06C75"> field</span><span style="color:#ABB2BF">: </span><span style="color:#E06C75">string</span><span style="color:#ABB2BF">,</span></span>
|
|
1245
|
+
<span class="line"><span style="color:#E06C75"> op</span><span style="color:#ABB2BF">: </span><span style="color:#E06C75">WhereFilterOp</span><span style="color:#ABB2BF">,</span></span>
|
|
1246
|
+
<span class="line"><span style="color:#E06C75"> value</span><span style="color:#ABB2BF">: </span><span style="color:#E06C75">unknown</span><span style="color:#ABB2BF">): </span><span style="color:#E06C75">Query</span><span style="color:#ABB2BF">;</span></span></code></pre>
|
|
1247
|
+
<h6 id="parameters-34">Parameters</h6>
|
|
1248
|
+
<div class="table-scroll">
|
|
1249
|
+
|
|
1250
|
+
|
|
1251
|
+
|
|
1252
|
+
|
|
1253
|
+
|
|
1254
|
+
|
|
1255
|
+
|
|
1256
|
+
|
|
1257
|
+
|
|
1258
|
+
|
|
1259
|
+
|
|
1260
|
+
|
|
1261
|
+
|
|
1262
|
+
|
|
1263
|
+
|
|
1264
|
+
|
|
1265
|
+
|
|
1266
|
+
|
|
1267
|
+
|
|
1268
|
+
|
|
1269
|
+
<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><tr><td align="left"><code>op</code></td><td align="left"><a href="/docs/pyric-firestore-reference-api/#wherefilterop"><code>WhereFilterOp</code></a></td></tr><tr><td align="left"><code>value</code></td><td align="left"><code>unknown</code></td></tr></tbody></table></div>
|
|
1270
|
+
<h6 id="returns-40">Returns</h6>
|
|
1271
|
+
<p><a href="#query"><code>Query</code></a></p>
|
|
1272
|
+
<hr>
|
|
1273
|
+
<p><a id="querydocumentsnapshot"></a></p>
|
|
1274
|
+
<h3 id="querydocumentsnapshot">QueryDocumentSnapshot</h3>
|
|
1275
|
+
<p>Production narrows <code>data()</code> to non-undefined here. We follow suit so
|
|
1276
|
+
that agent code calling <code>snap.data().foo</code> doesn’t need a guard for
|
|
1277
|
+
the items inside a <code>QuerySnapshot.docs</code> array.</p>
|
|
1278
|
+
<h4 id="extends-2">Extends</h4>
|
|
1279
|
+
<ul>
|
|
1280
|
+
<li><a href="#documentsnapshot"><code>DocumentSnapshot</code></a></li>
|
|
1281
|
+
</ul>
|
|
1282
|
+
<h4 id="properties-9">Properties</h4>
|
|
1283
|
+
<div class="table-scroll">
|
|
1284
|
+
|
|
1285
|
+
|
|
1286
|
+
|
|
1287
|
+
|
|
1288
|
+
|
|
1289
|
+
|
|
1290
|
+
|
|
1291
|
+
|
|
1292
|
+
|
|
1293
|
+
|
|
1294
|
+
|
|
1295
|
+
|
|
1296
|
+
|
|
1297
|
+
|
|
1298
|
+
|
|
1299
|
+
|
|
1300
|
+
|
|
1301
|
+
|
|
1302
|
+
|
|
1303
|
+
|
|
1304
|
+
|
|
1305
|
+
|
|
1306
|
+
|
|
1307
|
+
|
|
1308
|
+
<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-5"></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="metadata-1"></a> <code>metadata</code></td><td align="left"><code>readonly</code></td><td align="left"><a href="#snapshotmetadata"><code>SnapshotMetadata</code></a></td></tr><tr><td align="left"><a id="ref-3"></a> <code>ref</code></td><td align="left"><code>readonly</code></td><td align="left"><code>SnapshotDocRef</code></td></tr></tbody></table></div>
|
|
1309
|
+
<h4 id="methods-9">Methods</h4>
|
|
1310
|
+
<p><a id="data-8"></a></p>
|
|
1311
|
+
<h5 id="data-4">data()</h5>
|
|
1312
|
+
<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:#E06C75">DocumentData</span><span style="color:#ABB2BF">;</span></span></code></pre>
|
|
1313
|
+
<h6 id="returns-41">Returns</h6>
|
|
1314
|
+
<p><code>DocumentData</code></p>
|
|
1315
|
+
<h6 id="overrides-1">Overrides</h6>
|
|
1316
|
+
<p><a href="#documentsnapshot"><code>DocumentSnapshot</code></a>.<a href="#data-6"><code>data</code></a></p>
|
|
1317
|
+
<p><a id="exists-4"></a></p>
|
|
1318
|
+
<h5 id="exists-1">exists()</h5>
|
|
1319
|
+
<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">exists</span><span style="color:#ABB2BF">(): </span><span style="color:#E06C75">boolean</span><span style="color:#ABB2BF">;</span></span></code></pre>
|
|
1320
|
+
<h6 id="returns-42">Returns</h6>
|
|
1321
|
+
<p><code>boolean</code></p>
|
|
1322
|
+
<h6 id="inherited-from-11">Inherited from</h6>
|
|
1323
|
+
<p><a href="#documentsnapshot"><code>DocumentSnapshot</code></a>.<a href="#exists-2"><code>exists</code></a></p>
|
|
1324
|
+
<p><a id="get-8"></a></p>
|
|
1325
|
+
<h5 id="get-4">get()</h5>
|
|
1326
|
+
<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">get</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">fieldPath</span><span style="color:#ABB2BF">: </span><span style="color:#E06C75">string</span><span style="color:#ABB2BF">): </span><span style="color:#E06C75">unknown</span><span style="color:#ABB2BF">;</span></span></code></pre>
|
|
1327
|
+
<p>Field accessor mirroring <code>firebase/firestore</code>’s <code>DocumentSnapshot.get(fieldPath)</code>.
|
|
1328
|
+
Dotted paths supported. Missing intermediate keys yield <code>undefined</code>
|
|
1329
|
+
— production behavior; agents commonly chain optional reads.</p>
|
|
1330
|
+
<h6 id="parameters-35">Parameters</h6>
|
|
1331
|
+
<div class="table-scroll">
|
|
1332
|
+
|
|
1333
|
+
|
|
1334
|
+
|
|
1335
|
+
|
|
1336
|
+
|
|
1337
|
+
|
|
1338
|
+
|
|
1339
|
+
|
|
1340
|
+
|
|
1341
|
+
|
|
1342
|
+
|
|
1343
|
+
|
|
1344
|
+
<table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>fieldPath</code></td><td align="left"><code>string</code></td></tr></tbody></table></div>
|
|
1345
|
+
<h6 id="returns-43">Returns</h6>
|
|
1346
|
+
<p><code>unknown</code></p>
|
|
1347
|
+
<h6 id="inherited-from-12">Inherited from</h6>
|
|
1348
|
+
<p><a href="#documentsnapshot"><code>DocumentSnapshot</code></a>.<a href="#get-4"><code>get</code></a></p>
|
|
1349
|
+
<hr>
|
|
1350
|
+
<p><a id="querysnapshot"></a></p>
|
|
1351
|
+
<h3 id="querysnapshot">QuerySnapshot</h3>
|
|
1352
|
+
<h4 id="properties-10">Properties</h4>
|
|
1353
|
+
<div class="table-scroll">
|
|
1354
|
+
|
|
1355
|
+
|
|
1356
|
+
|
|
1357
|
+
|
|
1358
|
+
|
|
1359
|
+
|
|
1360
|
+
|
|
1361
|
+
|
|
1362
|
+
|
|
1363
|
+
|
|
1364
|
+
|
|
1365
|
+
|
|
1366
|
+
|
|
1367
|
+
|
|
1368
|
+
|
|
1369
|
+
|
|
1370
|
+
|
|
1371
|
+
|
|
1372
|
+
|
|
1373
|
+
|
|
1374
|
+
|
|
1375
|
+
|
|
1376
|
+
|
|
1377
|
+
|
|
1378
|
+
|
|
1379
|
+
|
|
1380
|
+
|
|
1381
|
+
|
|
1382
|
+
|
|
1383
|
+
|
|
1384
|
+
|
|
1385
|
+
|
|
1386
|
+
|
|
1387
|
+
|
|
1388
|
+
<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-1"></a> <code>docs</code></td><td align="left"><code>readonly</code></td><td align="left"><a href="#querydocumentsnapshot"><code>QueryDocumentSnapshot</code></a>[]</td></tr><tr><td align="left"><a id="empty-1"></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="metadata-2"></a> <code>metadata</code></td><td align="left"><code>readonly</code></td><td align="left"><a href="#snapshotmetadata"><code>SnapshotMetadata</code></a></td></tr><tr><td align="left"><a id="query-1"></a> <code>query</code></td><td align="left"><code>readonly</code></td><td align="left"><code>SnapshotQueryRef</code></td></tr><tr><td align="left"><a id="size-1"></a> <code>size</code></td><td align="left"><code>readonly</code></td><td align="left"><code>number</code></td></tr></tbody></table></div>
|
|
1389
|
+
<h4 id="methods-10">Methods</h4>
|
|
1390
|
+
<p><a id="docchanges"></a></p>
|
|
1391
|
+
<h5 id="docchanges">docChanges()</h5>
|
|
1392
|
+
<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">docChanges</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">options</span><span style="color:#C678DD">?:</span><span style="color:#E06C75"> DocChangesOptions</span><span style="color:#ABB2BF">): </span><span style="color:#E06C75">DocumentChange</span><span style="color:#ABB2BF">[];</span></span></code></pre>
|
|
1393
|
+
<p>Per findings section 4: cached by <code>includeMetadataChanges</code> value; throws if
|
|
1394
|
+
called with <code>true</code> when the listener did not subscribe with
|
|
1395
|
+
<code>includeMetadataChanges: true</code>. The Slice 2 implementation produces
|
|
1396
|
+
“all docs added” on the first fire — Slice 3 supplies real diffs.</p>
|
|
1397
|
+
<h6 id="parameters-36">Parameters</h6>
|
|
1398
|
+
<div class="table-scroll">
|
|
1399
|
+
|
|
1400
|
+
|
|
1401
|
+
|
|
1402
|
+
|
|
1403
|
+
|
|
1404
|
+
|
|
1405
|
+
|
|
1406
|
+
|
|
1407
|
+
|
|
1408
|
+
|
|
1409
|
+
|
|
1410
|
+
|
|
1411
|
+
<table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>options?</code></td><td align="left"><a href="#docchangesoptions"><code>DocChangesOptions</code></a></td></tr></tbody></table></div>
|
|
1412
|
+
<h6 id="returns-44">Returns</h6>
|
|
1413
|
+
<p><a href="#documentchange"><code>DocumentChange</code></a>[]</p>
|
|
1414
|
+
<p><a id="foreach-2"></a></p>
|
|
1415
|
+
<h5 id="foreach-1">forEach()</h5>
|
|
1416
|
+
<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">forEach</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">callback</span><span style="color:#ABB2BF">: (</span><span style="color:#E06C75;font-style:italic">snap</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">QueryDocumentSnapshot</span><span style="color:#ABB2BF">) </span><span style="color:#C678DD">=></span><span style="color:#C678DD"> void</span><span style="color:#ABB2BF">): </span><span style="color:#C678DD">void</span><span style="color:#ABB2BF">;</span></span></code></pre>
|
|
1417
|
+
<h6 id="parameters-37">Parameters</h6>
|
|
1418
|
+
<div class="table-scroll">
|
|
1419
|
+
|
|
1420
|
+
|
|
1421
|
+
|
|
1422
|
+
|
|
1423
|
+
|
|
1424
|
+
|
|
1425
|
+
|
|
1426
|
+
|
|
1427
|
+
|
|
1428
|
+
|
|
1429
|
+
|
|
1430
|
+
|
|
1431
|
+
<table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>callback</code></td><td align="left">(<code>snap</code>: <a href="#querydocumentsnapshot"><code>QueryDocumentSnapshot</code></a>) => <code>void</code></td></tr></tbody></table></div>
|
|
1432
|
+
<h6 id="returns-45">Returns</h6>
|
|
1433
|
+
<p><code>void</code></p>
|
|
1434
|
+
<hr>
|
|
1435
|
+
<p><a id="rulesmetrics"></a></p>
|
|
1436
|
+
<h3 id="rulesmetrics">RulesMetrics</h3>
|
|
1437
|
+
<h4 id="properties-11">Properties</h4>
|
|
1438
|
+
<div class="table-scroll">
|
|
1439
|
+
|
|
1440
|
+
|
|
1441
|
+
|
|
1442
|
+
|
|
1443
|
+
|
|
1444
|
+
|
|
1445
|
+
|
|
1446
|
+
|
|
1447
|
+
|
|
1448
|
+
|
|
1449
|
+
|
|
1450
|
+
|
|
1451
|
+
|
|
1452
|
+
|
|
1453
|
+
|
|
1454
|
+
|
|
1455
|
+
|
|
1456
|
+
|
|
1457
|
+
|
|
1458
|
+
|
|
1459
|
+
|
|
1460
|
+
|
|
1461
|
+
|
|
1462
|
+
|
|
1463
|
+
|
|
1464
|
+
|
|
1465
|
+
|
|
1466
|
+
|
|
1467
|
+
|
|
1468
|
+
|
|
1469
|
+
|
|
1470
|
+
|
|
1471
|
+
|
|
1472
|
+
|
|
1473
|
+
|
|
1474
|
+
|
|
1475
|
+
|
|
1476
|
+
|
|
1477
|
+
|
|
1478
|
+
|
|
1479
|
+
|
|
1480
|
+
|
|
1481
|
+
|
|
1482
|
+
|
|
1483
|
+
|
|
1484
|
+
|
|
1485
|
+
|
|
1486
|
+
|
|
1487
|
+
<table><thead><tr><th align="left">Property</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><a id="allowrulecount"></a> <code>allowRuleCount</code></td><td align="left"><code>number</code></td></tr><tr><td align="left"><a id="functioncount"></a> <code>functionCount</code></td><td align="left"><code>number</code></td></tr><tr><td align="left"><a id="getcallcount"></a> <code>getCallCount</code></td><td align="left"><code>number</code></td></tr><tr><td align="left"><a id="maxcalldepth"></a> <code>maxCallDepth</code></td><td align="left"><code>number</code></td></tr><tr><td align="left"><a id="maxchaindepth"></a> <code>maxChainDepth</code></td><td align="left"><code>number</code></td></tr><tr><td align="left"><a id="maxchainop"></a> <code>maxChainOp</code></td><td align="left"><code>string</code></td></tr><tr><td align="left"><a id="maxestimatedexpressions"></a> <code>maxEstimatedExpressions</code></td><td align="left"><code>number</code></td></tr><tr><td align="left"><a id="maxletbindings"></a> <code>maxLetBindings</code></td><td align="left"><code>number</code></td></tr><tr><td align="left"><a id="maxletbindingsfunction"></a> <code>maxLetBindingsFunction</code></td><td align="left"><code>string</code></td></tr><tr><td align="left"><a id="sourcesize"></a> <code>sourceSize</code></td><td align="left"><code>number</code></td></tr></tbody></table></div>
|
|
1488
|
+
<hr>
|
|
1489
|
+
<p><a id="sandboxfirestore"></a></p>
|
|
1490
|
+
<h3 id="sandboxfirestore">SandboxFirestore</h3>
|
|
1491
|
+
<p>Sandbox-extended Firestore handle. Adds three sandbox-only methods
|
|
1492
|
+
on top of the production-shaped <a href="#firestore">Firestore</a> surface:</p>
|
|
1493
|
+
<ul>
|
|
1494
|
+
<li><a href="#setrules">SandboxFirestore.setRules</a> — replace the active ruleset
|
|
1495
|
+
for subsequent operations.</li>
|
|
1496
|
+
<li><a href="#seed">SandboxFirestore.seed</a> — replace stored documents with a
|
|
1497
|
+
fresh seed map (rules are preserved).</li>
|
|
1498
|
+
<li><a href="#snapshot">SandboxFirestore.snapshot</a> — capture all stored documents
|
|
1499
|
+
as a path-keyed map.</li>
|
|
1500
|
+
</ul>
|
|
1501
|
+
<p>These have no production analog. They use sandbox vocabulary
|
|
1502
|
+
(<code>setRules</code>, <code>seed</code>, <code>snapshot</code>) deliberately so a reader can’t
|
|
1503
|
+
confuse them with Firebase deployment semantics.</p>
|
|
1504
|
+
<h4 id="extends-3">Extends</h4>
|
|
1505
|
+
<ul>
|
|
1506
|
+
<li><a href="#firestore"><code>Firestore</code></a></li>
|
|
1507
|
+
</ul>
|
|
1508
|
+
<h4 id="methods-11">Methods</h4>
|
|
1509
|
+
<p><a id="batch-2"></a></p>
|
|
1510
|
+
<h5 id="batch-1">batch()</h5>
|
|
1511
|
+
<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">batch</span><span style="color:#ABB2BF">(): </span><span style="color:#E06C75">WriteBatch</span><span style="color:#ABB2BF">;</span></span></code></pre>
|
|
1512
|
+
<h6 id="returns-46">Returns</h6>
|
|
1513
|
+
<p><a href="#writebatch"><code>WriteBatch</code></a></p>
|
|
1514
|
+
<h6 id="inherited-from-13">Inherited from</h6>
|
|
1515
|
+
<p><a href="#firestore"><code>Firestore</code></a>.<a href="#batch"><code>batch</code></a></p>
|
|
1516
|
+
<p><a id="collection-4"></a></p>
|
|
1517
|
+
<h5 id="collection-2">collection()</h5>
|
|
1518
|
+
<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">collection</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">path</span><span style="color:#ABB2BF">: </span><span style="color:#E06C75">string</span><span style="color:#ABB2BF">): </span><span style="color:#E06C75">CollectionReference</span><span style="color:#ABB2BF">;</span></span></code></pre>
|
|
1519
|
+
<h6 id="parameters-38">Parameters</h6>
|
|
1520
|
+
<div class="table-scroll">
|
|
1521
|
+
|
|
1522
|
+
|
|
1523
|
+
|
|
1524
|
+
|
|
1525
|
+
|
|
1526
|
+
|
|
1527
|
+
|
|
1528
|
+
|
|
1529
|
+
|
|
1530
|
+
|
|
1531
|
+
|
|
1532
|
+
|
|
1533
|
+
<table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>path</code></td><td align="left"><code>string</code></td></tr></tbody></table></div>
|
|
1534
|
+
<h6 id="returns-47">Returns</h6>
|
|
1535
|
+
<p><a href="#collectionreference"><code>CollectionReference</code></a></p>
|
|
1536
|
+
<h6 id="inherited-from-14">Inherited from</h6>
|
|
1537
|
+
<p><a href="#firestore"><code>Firestore</code></a>.<a href="#collection-2"><code>collection</code></a></p>
|
|
1538
|
+
<p><a id="collectiongroup-2"></a></p>
|
|
1539
|
+
<h5 id="collectiongroup-1">collectionGroup()</h5>
|
|
1540
|
+
<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">collectionGroup</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">collectionId</span><span style="color:#ABB2BF">: </span><span style="color:#E06C75">string</span><span style="color:#ABB2BF">): </span><span style="color:#E06C75">Query</span><span style="color:#ABB2BF">;</span></span></code></pre>
|
|
1541
|
+
<p>Cross-collection query — returns a <code>Query</code> that scans every
|
|
1542
|
+
document under every collection whose final segment matches
|
|
1543
|
+
<code>collectionId</code>, regardless of position in the path. Matches the
|
|
1544
|
+
Admin SDK’s <code>Firestore.collectionGroup(id)</code> shape.</p>
|
|
1545
|
+
<p>The returned <code>Query</code> accepts <code>where</code> / <code>orderBy</code> / <code>limit</code> like
|
|
1546
|
+
any other; the simulator gathers all candidate docs first, then
|
|
1547
|
+
applies the constraints in-memory.</p>
|
|
1548
|
+
<h6 id="parameters-39">Parameters</h6>
|
|
1549
|
+
<div class="table-scroll">
|
|
1550
|
+
|
|
1551
|
+
|
|
1552
|
+
|
|
1553
|
+
|
|
1554
|
+
|
|
1555
|
+
|
|
1556
|
+
|
|
1557
|
+
|
|
1558
|
+
|
|
1559
|
+
|
|
1560
|
+
|
|
1561
|
+
|
|
1562
|
+
<table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>collectionId</code></td><td align="left"><code>string</code></td></tr></tbody></table></div>
|
|
1563
|
+
<h6 id="returns-48">Returns</h6>
|
|
1564
|
+
<p><a href="#query"><code>Query</code></a></p>
|
|
1565
|
+
<h6 id="inherited-from-15">Inherited from</h6>
|
|
1566
|
+
<p><a href="#firestore"><code>Firestore</code></a>.<a href="#collectiongroup"><code>collectionGroup</code></a></p>
|
|
1567
|
+
<p><a id="doc-5"></a></p>
|
|
1568
|
+
<h5 id="doc-2">doc()</h5>
|
|
1569
|
+
<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">doc</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">path</span><span style="color:#ABB2BF">: </span><span style="color:#E06C75">string</span><span style="color:#ABB2BF">): </span><span style="color:#E06C75">DocumentReference</span><span style="color:#ABB2BF">;</span></span></code></pre>
|
|
1570
|
+
<h6 id="parameters-40">Parameters</h6>
|
|
1571
|
+
<div class="table-scroll">
|
|
1572
|
+
|
|
1573
|
+
|
|
1574
|
+
|
|
1575
|
+
|
|
1576
|
+
|
|
1577
|
+
|
|
1578
|
+
|
|
1579
|
+
|
|
1580
|
+
|
|
1581
|
+
|
|
1582
|
+
|
|
1583
|
+
|
|
1584
|
+
<table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>path</code></td><td align="left"><code>string</code></td></tr></tbody></table></div>
|
|
1585
|
+
<h6 id="returns-49">Returns</h6>
|
|
1586
|
+
<p><a href="#documentreference"><code>DocumentReference</code></a></p>
|
|
1587
|
+
<h6 id="inherited-from-16">Inherited from</h6>
|
|
1588
|
+
<p><a href="#firestore"><code>Firestore</code></a>.<a href="#doc-3"><code>doc</code></a></p>
|
|
1589
|
+
<p><a id="runtransaction-2"></a></p>
|
|
1590
|
+
<h5 id="runtransaction-1">runTransaction()</h5>
|
|
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:#61AFEF">runTransaction</span><span style="color:#ABB2BF"><</span><span style="color:#E5C07B">R</span><span style="color:#ABB2BF">>(</span><span style="color:#E06C75">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">Transaction</span><span style="color:#ABB2BF">) </span><span style="color:#C678DD">=></span><span style="color:#E5C07B"> R</span><span style="color:#56B6C2"> |</span><span style="color:#E5C07B"> Promise</span><span style="color:#56B6C2"><</span><span style="color:#E5C07B">R</span><span style="color:#56B6C2">></span><span style="color:#ABB2BF">, </span><span style="color:#E06C75">opts</span><span style="color:#C678DD">?:</span><span style="color:#E06C75"> OperationOptions</span><span style="color:#ABB2BF">): </span><span style="color:#E5C07B">Promise</span><span style="color:#56B6C2"><</span><span style="color:#E5C07B">R</span><span style="color:#56B6C2">></span><span style="color:#ABB2BF">;</span></span></code></pre>
|
|
1592
|
+
<h6 id="type-parameters-1">Type Parameters</h6>
|
|
1593
|
+
<div class="table-scroll">
|
|
1594
|
+
|
|
1595
|
+
|
|
1596
|
+
|
|
1597
|
+
|
|
1598
|
+
|
|
1599
|
+
|
|
1600
|
+
|
|
1601
|
+
|
|
1602
|
+
|
|
1603
|
+
|
|
1604
|
+
<table><thead><tr><th align="left">Type Parameter</th></tr></thead><tbody><tr><td align="left"><code>R</code></td></tr></tbody></table></div>
|
|
1605
|
+
<h6 id="parameters-41">Parameters</h6>
|
|
1606
|
+
<div class="table-scroll">
|
|
1607
|
+
|
|
1608
|
+
|
|
1609
|
+
|
|
1610
|
+
|
|
1611
|
+
|
|
1612
|
+
|
|
1613
|
+
|
|
1614
|
+
|
|
1615
|
+
|
|
1616
|
+
|
|
1617
|
+
|
|
1618
|
+
|
|
1619
|
+
|
|
1620
|
+
|
|
1621
|
+
|
|
1622
|
+
|
|
1623
|
+
<table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>fn</code></td><td align="left">(<code>tx</code>: <a href="#transaction"><code>Transaction</code></a>) => <code>R</code> | <code>Promise</code><<code>R</code>></td></tr><tr><td align="left"><code>opts?</code></td><td align="left"><code>OperationOptions</code></td></tr></tbody></table></div>
|
|
1624
|
+
<h6 id="returns-50">Returns</h6>
|
|
1625
|
+
<p><code>Promise</code><<code>R</code>></p>
|
|
1626
|
+
<h6 id="inherited-from-17">Inherited from</h6>
|
|
1627
|
+
<p><a href="#firestore"><code>Firestore</code></a>.<a href="#runtransaction"><code>runTransaction</code></a></p>
|
|
1628
|
+
<p><a id="seed"></a></p>
|
|
1629
|
+
<h5 id="seed">seed()</h5>
|
|
1630
|
+
<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">seed</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">options</span><span style="color:#C678DD">?:</span><span style="color:#ABB2BF"> {</span></span>
|
|
1631
|
+
<span class="line"><span style="color:#ABB2BF"> documents?: </span><span style="color:#E06C75">Record</span><span style="color:#56B6C2"><</span><span style="color:#E06C75">string</span><span style="color:#ABB2BF">, DocumentData>;</span></span>
|
|
1632
|
+
<span class="line"><span style="color:#ABB2BF">}): </span><span style="color:#E06C75">LintResult</span><span style="color:#ABB2BF">;</span></span></code></pre>
|
|
1633
|
+
<p>Replace stored documents with a new seed map. Active rules are
|
|
1634
|
+
preserved. Pass an empty <code>documents</code> map (or omit it) to clear
|
|
1635
|
+
state without touching rules.</p>
|
|
1636
|
+
<h6 id="parameters-42">Parameters</h6>
|
|
1637
|
+
<div class="table-scroll">
|
|
1638
|
+
|
|
1639
|
+
|
|
1640
|
+
|
|
1641
|
+
|
|
1642
|
+
|
|
1643
|
+
|
|
1644
|
+
|
|
1645
|
+
|
|
1646
|
+
|
|
1647
|
+
|
|
1648
|
+
|
|
1649
|
+
|
|
1650
|
+
|
|
1651
|
+
|
|
1652
|
+
|
|
1653
|
+
|
|
1654
|
+
<table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>options?</code></td><td align="left">{ <code>documents?</code>: <code>Record</code><<code>string</code>, <a href="/docs/pyric-firestore-reference-api/#documentdata"><code>DocumentData</code></a>>; }</td></tr><tr><td align="left"><code>options.documents?</code></td><td align="left"><code>Record</code><<code>string</code>, <a href="/docs/pyric-firestore-reference-api/#documentdata"><code>DocumentData</code></a>></td></tr></tbody></table></div>
|
|
1655
|
+
<h6 id="returns-51">Returns</h6>
|
|
1656
|
+
<p><a href="/docs/pyric-firestore-reference-api/#lintresult"><code>LintResult</code></a></p>
|
|
1657
|
+
<p><a id="setrules"></a></p>
|
|
1658
|
+
<h5 id="setrules">setRules()</h5>
|
|
1659
|
+
<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">setRules</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">rules</span><span style="color:#ABB2BF">: </span><span style="color:#E06C75">string</span><span style="color:#ABB2BF">): </span><span style="color:#E06C75">LintResult</span><span style="color:#ABB2BF">;</span></span></code></pre>
|
|
1660
|
+
<p>Replace the active ruleset. Returns the lint result so callers can
|
|
1661
|
+
surface warnings; if the source has parse-level errors, the rules
|
|
1662
|
+
are not swapped (consistent with <code>LocalEnvironment.deployRules</code>).</p>
|
|
1663
|
+
<h6 id="parameters-43">Parameters</h6>
|
|
1664
|
+
<div class="table-scroll">
|
|
1665
|
+
|
|
1666
|
+
|
|
1667
|
+
|
|
1668
|
+
|
|
1669
|
+
|
|
1670
|
+
|
|
1671
|
+
|
|
1672
|
+
|
|
1673
|
+
|
|
1674
|
+
|
|
1675
|
+
|
|
1676
|
+
|
|
1677
|
+
<table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>rules</code></td><td align="left"><code>string</code></td></tr></tbody></table></div>
|
|
1678
|
+
<h6 id="returns-52">Returns</h6>
|
|
1679
|
+
<p><a href="/docs/pyric-firestore-reference-api/#lintresult"><code>LintResult</code></a></p>
|
|
1680
|
+
<p><a id="snapshot"></a></p>
|
|
1681
|
+
<h5 id="snapshot">snapshot()</h5>
|
|
1682
|
+
<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">snapshot</span><span style="color:#ABB2BF">(): </span><span style="color:#E06C75">Record</span><span style="color:#56B6C2"><</span><span style="color:#E06C75">string</span><span style="color:#ABB2BF">, </span><span style="color:#E06C75">DocumentData</span><span style="color:#56B6C2">></span><span style="color:#ABB2BF">;</span></span></code></pre>
|
|
1683
|
+
<p>Capture every stored document as a <code>{ [path]: data }</code> map. Reads
|
|
1684
|
+
from the live state and is independent of rules.</p>
|
|
1685
|
+
<h6 id="returns-53">Returns</h6>
|
|
1686
|
+
<p><code>Record</code><<code>string</code>, <a href="/docs/pyric-firestore-reference-api/#documentdata"><code>DocumentData</code></a>></p>
|
|
1687
|
+
<hr>
|
|
1688
|
+
<p><a id="setoptions"></a></p>
|
|
1689
|
+
<h3 id="setoptions">SetOptions</h3>
|
|
1690
|
+
<p>Options for <code>DocumentReference.set</code>. Mirrors the modular Web-SDK’s
|
|
1691
|
+
<code>SetOptions</code> shape with pyric’s <code>auth</code> per-op override layered on.</p>
|
|
1692
|
+
<ul>
|
|
1693
|
+
<li>default (neither flag set) → REPLACE the existing document
|
|
1694
|
+
entirely. Firestore default for <code>set()</code>.</li>
|
|
1695
|
+
<li><code>{ merge: true }</code> → shallow-merge every top-level field in
|
|
1696
|
+
<code>data</code> into the existing document. Fields not in <code>data</code> are
|
|
1697
|
+
preserved. Rule eval still runs the <code>update</code> clause when the
|
|
1698
|
+
doc exists.</li>
|
|
1699
|
+
<li><code>{ mergeFields: [...] }</code> → project <code>data</code> down to just the
|
|
1700
|
+
listed top-level fields, then merge. Other fields in <code>data</code> are
|
|
1701
|
+
ignored; other fields in the existing doc are preserved.</li>
|
|
1702
|
+
</ul>
|
|
1703
|
+
<p><code>merge</code> and <code>mergeFields</code> are mutually exclusive at the JS-SDK
|
|
1704
|
+
level. We don’t currently enforce the constraint — if both are
|
|
1705
|
+
provided, <code>mergeFields</code> wins (matches the JS SDK’s effective
|
|
1706
|
+
behavior).</p>
|
|
1707
|
+
<h4 id="extends-4">Extends</h4>
|
|
1708
|
+
<ul>
|
|
1709
|
+
<li><code>OperationOptions</code></li>
|
|
1710
|
+
</ul>
|
|
1711
|
+
<h4 id="properties-12">Properties</h4>
|
|
1712
|
+
<div class="table-scroll">
|
|
1713
|
+
|
|
1714
|
+
|
|
1715
|
+
|
|
1716
|
+
|
|
1717
|
+
|
|
1718
|
+
|
|
1719
|
+
|
|
1720
|
+
|
|
1721
|
+
|
|
1722
|
+
|
|
1723
|
+
|
|
1724
|
+
|
|
1725
|
+
|
|
1726
|
+
|
|
1727
|
+
|
|
1728
|
+
|
|
1729
|
+
|
|
1730
|
+
|
|
1731
|
+
|
|
1732
|
+
|
|
1733
|
+
|
|
1734
|
+
|
|
1735
|
+
|
|
1736
|
+
|
|
1737
|
+
|
|
1738
|
+
|
|
1739
|
+
|
|
1740
|
+
|
|
1741
|
+
<table><thead><tr><th align="left">Property</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><a id="auth"></a> <code>auth?</code></td><td align="left">{ <code>token?</code>: <code>Record</code><<code>string</code>, <code>unknown</code>>; <code>uid</code>: <code>string</code>; }</td></tr><tr><td align="left"><code>auth.token?</code></td><td align="left"><code>Record</code><<code>string</code>, <code>unknown</code>></td></tr><tr><td align="left"><code>auth.uid</code></td><td align="left"><code>string</code></td></tr><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>
|
|
1742
|
+
<hr>
|
|
1743
|
+
<p><a id="snapshotmetadata"></a></p>
|
|
1744
|
+
<h3 id="snapshotmetadata">SnapshotMetadata</h3>
|
|
1745
|
+
<p>Mirrors <code>firebase/firestore</code>’s <code>SnapshotMetadata</code>. <code>fromCache</code> is always
|
|
1746
|
+
<code>false</code> (the sandbox has no offline cache). <code>hasPendingWrites</code> transitions
|
|
1747
|
+
(item 3): a local write’s optimistic echo carries <code>true</code>, and the server
|
|
1748
|
+
ack carries <code>false</code> — so <code>includeMetadataChanges</code> has an observable effect
|
|
1749
|
+
matching prod (COMPAT firestore#85).</p>
|
|
1750
|
+
<h4 id="properties-13">Properties</h4>
|
|
1751
|
+
<div class="table-scroll">
|
|
1752
|
+
|
|
1753
|
+
|
|
1754
|
+
|
|
1755
|
+
|
|
1756
|
+
|
|
1757
|
+
|
|
1758
|
+
|
|
1759
|
+
|
|
1760
|
+
|
|
1761
|
+
|
|
1762
|
+
|
|
1763
|
+
|
|
1764
|
+
|
|
1765
|
+
|
|
1766
|
+
|
|
1767
|
+
|
|
1768
|
+
|
|
1769
|
+
|
|
1770
|
+
|
|
1771
|
+
<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="fromcache"></a> <code>fromCache</code></td><td align="left"><code>readonly</code></td><td align="left"><code>false</code></td></tr><tr><td align="left"><a id="haspendingwrites"></a> <code>hasPendingWrites</code></td><td align="left"><code>readonly</code></td><td align="left"><code>boolean</code></td></tr></tbody></table></div>
|
|
1772
|
+
<hr>
|
|
1773
|
+
<p><a id="snapshotobserver"></a></p>
|
|
1774
|
+
<h3 id="snapshotobserver">SnapshotObserver</h3>
|
|
1775
|
+
<p>Observer form accepted by <code>onSnapshot</code>. Mirrors <code>firebase/firestore</code>’s
|
|
1776
|
+
<code>PartialObserver<T></code> shape — any subset of the three handlers. <code>complete</code>
|
|
1777
|
+
is accepted for shape parity but never fires in the sandbox: the local
|
|
1778
|
+
listener stream has no terminal state.</p>
|
|
1779
|
+
<h4 id="type-parameters-2">Type Parameters</h4>
|
|
1780
|
+
<div class="table-scroll">
|
|
1781
|
+
|
|
1782
|
+
|
|
1783
|
+
|
|
1784
|
+
|
|
1785
|
+
|
|
1786
|
+
|
|
1787
|
+
|
|
1788
|
+
|
|
1789
|
+
|
|
1790
|
+
|
|
1791
|
+
<table><thead><tr><th align="left">Type Parameter</th></tr></thead><tbody><tr><td align="left"><code>T</code></td></tr></tbody></table></div>
|
|
1792
|
+
<h4 id="properties-14">Properties</h4>
|
|
1793
|
+
<div class="table-scroll">
|
|
1794
|
+
|
|
1795
|
+
|
|
1796
|
+
|
|
1797
|
+
|
|
1798
|
+
|
|
1799
|
+
|
|
1800
|
+
|
|
1801
|
+
|
|
1802
|
+
|
|
1803
|
+
|
|
1804
|
+
|
|
1805
|
+
|
|
1806
|
+
|
|
1807
|
+
|
|
1808
|
+
|
|
1809
|
+
|
|
1810
|
+
|
|
1811
|
+
|
|
1812
|
+
|
|
1813
|
+
|
|
1814
|
+
<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>
|
|
1815
|
+
<hr>
|
|
1816
|
+
<p><a id="transaction"></a></p>
|
|
1817
|
+
<h3 id="transaction">Transaction</h3>
|
|
1818
|
+
<h4 id="methods-12">Methods</h4>
|
|
1819
|
+
<p><a id="delete-2"></a></p>
|
|
1820
|
+
<h5 id="delete-1">delete()</h5>
|
|
1821
|
+
<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">delete</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">Transaction</span><span style="color:#ABB2BF">;</span></span></code></pre>
|
|
1822
|
+
<h6 id="parameters-44">Parameters</h6>
|
|
1823
|
+
<div class="table-scroll">
|
|
1824
|
+
|
|
1825
|
+
|
|
1826
|
+
|
|
1827
|
+
|
|
1828
|
+
|
|
1829
|
+
|
|
1830
|
+
|
|
1831
|
+
|
|
1832
|
+
|
|
1833
|
+
|
|
1834
|
+
|
|
1835
|
+
|
|
1836
|
+
<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>
|
|
1837
|
+
<h6 id="returns-54">Returns</h6>
|
|
1838
|
+
<p><a href="#transaction"><code>Transaction</code></a></p>
|
|
1839
|
+
<p><a id="get-10"></a></p>
|
|
1840
|
+
<h5 id="get-5">get()</h5>
|
|
1841
|
+
<h6 id="call-signature">Call Signature</h6>
|
|
1842
|
+
<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">get</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">ref</span><span style="color:#ABB2BF">: </span><span style="color:#E06C75">DocumentReference</span><span style="color:#ABB2BF">): </span><span style="color:#E5C07B">Promise</span><span style="color:#56B6C2"><</span><span style="color:#E06C75">AdminDocumentSnapshot</span><span style="color:#56B6C2">></span><span style="color:#ABB2BF">;</span></span></code></pre>
|
|
1843
|
+
<h6 id="parameters-45">Parameters</h6>
|
|
1844
|
+
<div class="table-scroll">
|
|
1845
|
+
|
|
1846
|
+
|
|
1847
|
+
|
|
1848
|
+
|
|
1849
|
+
|
|
1850
|
+
|
|
1851
|
+
|
|
1852
|
+
|
|
1853
|
+
|
|
1854
|
+
|
|
1855
|
+
|
|
1856
|
+
|
|
1857
|
+
<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>
|
|
1858
|
+
<h6 id="returns-55">Returns</h6>
|
|
1859
|
+
<p><code>Promise</code><<a href="#admindocumentsnapshot"><code>AdminDocumentSnapshot</code></a>></p>
|
|
1860
|
+
<h6 id="call-signature-1">Call Signature</h6>
|
|
1861
|
+
<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">get</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">query</span><span style="color:#ABB2BF">: </span><span style="color:#E06C75">Query</span><span style="color:#ABB2BF">): </span><span style="color:#E5C07B">Promise</span><span style="color:#56B6C2"><</span><span style="color:#E06C75">AdminQuerySnapshot</span><span style="color:#56B6C2">></span><span style="color:#ABB2BF">;</span></span></code></pre>
|
|
1862
|
+
<h6 id="parameters-46">Parameters</h6>
|
|
1863
|
+
<div class="table-scroll">
|
|
1864
|
+
|
|
1865
|
+
|
|
1866
|
+
|
|
1867
|
+
|
|
1868
|
+
|
|
1869
|
+
|
|
1870
|
+
|
|
1871
|
+
|
|
1872
|
+
|
|
1873
|
+
|
|
1874
|
+
|
|
1875
|
+
|
|
1876
|
+
<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></td></tr></tbody></table></div>
|
|
1877
|
+
<h6 id="returns-56">Returns</h6>
|
|
1878
|
+
<p><code>Promise</code><<a href="#adminquerysnapshot"><code>AdminQuerySnapshot</code></a>></p>
|
|
1879
|
+
<p><a id="set-2"></a></p>
|
|
1880
|
+
<h5 id="set-1">set()</h5>
|
|
1881
|
+
<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">set</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">ref</span><span style="color:#ABB2BF">: </span><span style="color:#E06C75">DocumentReference</span><span style="color:#ABB2BF">, </span><span style="color:#E06C75">data</span><span style="color:#ABB2BF">: </span><span style="color:#E06C75">DocumentData</span><span style="color:#ABB2BF">): </span><span style="color:#E06C75">Transaction</span><span style="color:#ABB2BF">;</span></span></code></pre>
|
|
1882
|
+
<h6 id="parameters-47">Parameters</h6>
|
|
1883
|
+
<div class="table-scroll">
|
|
1884
|
+
|
|
1885
|
+
|
|
1886
|
+
|
|
1887
|
+
|
|
1888
|
+
|
|
1889
|
+
|
|
1890
|
+
|
|
1891
|
+
|
|
1892
|
+
|
|
1893
|
+
|
|
1894
|
+
|
|
1895
|
+
|
|
1896
|
+
|
|
1897
|
+
|
|
1898
|
+
|
|
1899
|
+
|
|
1900
|
+
<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"><a href="/docs/pyric-firestore-reference-api/#documentdata"><code>DocumentData</code></a></td></tr></tbody></table></div>
|
|
1901
|
+
<h6 id="returns-57">Returns</h6>
|
|
1902
|
+
<p><a href="#transaction"><code>Transaction</code></a></p>
|
|
1903
|
+
<p><a id="update-2"></a></p>
|
|
1904
|
+
<h5 id="update-1">update()</h5>
|
|
1905
|
+
<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">update</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">ref</span><span style="color:#ABB2BF">: </span><span style="color:#E06C75">DocumentReference</span><span style="color:#ABB2BF">, </span><span style="color:#E06C75">data</span><span style="color:#ABB2BF">: </span><span style="color:#E06C75">DocumentData</span><span style="color:#ABB2BF">): </span><span style="color:#E06C75">Transaction</span><span style="color:#ABB2BF">;</span></span></code></pre>
|
|
1906
|
+
<h6 id="parameters-48">Parameters</h6>
|
|
1907
|
+
<div class="table-scroll">
|
|
1908
|
+
|
|
1909
|
+
|
|
1910
|
+
|
|
1911
|
+
|
|
1912
|
+
|
|
1913
|
+
|
|
1914
|
+
|
|
1915
|
+
|
|
1916
|
+
|
|
1917
|
+
|
|
1918
|
+
|
|
1919
|
+
|
|
1920
|
+
|
|
1921
|
+
|
|
1922
|
+
|
|
1923
|
+
|
|
1924
|
+
<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"><a href="/docs/pyric-firestore-reference-api/#documentdata"><code>DocumentData</code></a></td></tr></tbody></table></div>
|
|
1925
|
+
<h6 id="returns-58">Returns</h6>
|
|
1926
|
+
<p><a href="#transaction"><code>Transaction</code></a></p>
|
|
1927
|
+
<hr>
|
|
1928
|
+
<p><a id="writebatch"></a></p>
|
|
1929
|
+
<h3 id="writebatch">WriteBatch</h3>
|
|
1930
|
+
<h4 id="methods-13">Methods</h4>
|
|
1931
|
+
<p><a id="commit"></a></p>
|
|
1932
|
+
<h5 id="commit">commit()</h5>
|
|
1933
|
+
<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">commit</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">opts</span><span style="color:#C678DD">?:</span><span style="color:#E06C75"> OperationOptions</span><span style="color:#ABB2BF">): </span><span style="color:#E5C07B">Promise</span><span style="color:#56B6C2"><</span><span style="color:#C678DD">void</span><span style="color:#56B6C2">></span><span style="color:#ABB2BF">;</span></span></code></pre>
|
|
1934
|
+
<h6 id="parameters-49">Parameters</h6>
|
|
1935
|
+
<div class="table-scroll">
|
|
1936
|
+
|
|
1937
|
+
|
|
1938
|
+
|
|
1939
|
+
|
|
1940
|
+
|
|
1941
|
+
|
|
1942
|
+
|
|
1943
|
+
|
|
1944
|
+
|
|
1945
|
+
|
|
1946
|
+
|
|
1947
|
+
|
|
1948
|
+
<table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>opts?</code></td><td align="left"><code>OperationOptions</code></td></tr></tbody></table></div>
|
|
1949
|
+
<h6 id="returns-59">Returns</h6>
|
|
1950
|
+
<p><code>Promise</code><<code>void</code>></p>
|
|
1951
|
+
<p><a id="delete-4"></a></p>
|
|
1952
|
+
<h5 id="delete-2">delete()</h5>
|
|
1953
|
+
<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">delete</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">WriteBatch</span><span style="color:#ABB2BF">;</span></span></code></pre>
|
|
1954
|
+
<h6 id="parameters-50">Parameters</h6>
|
|
1955
|
+
<div class="table-scroll">
|
|
1956
|
+
|
|
1957
|
+
|
|
1958
|
+
|
|
1959
|
+
|
|
1960
|
+
|
|
1961
|
+
|
|
1962
|
+
|
|
1963
|
+
|
|
1964
|
+
|
|
1965
|
+
|
|
1966
|
+
|
|
1967
|
+
|
|
1968
|
+
<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>
|
|
1969
|
+
<h6 id="returns-60">Returns</h6>
|
|
1970
|
+
<p><a href="#writebatch"><code>WriteBatch</code></a></p>
|
|
1971
|
+
<p><a id="set-4"></a></p>
|
|
1972
|
+
<h5 id="set-2">set()</h5>
|
|
1973
|
+
<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">set</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">ref</span><span style="color:#ABB2BF">: </span><span style="color:#E06C75">DocumentReference</span><span style="color:#ABB2BF">, </span><span style="color:#E06C75">data</span><span style="color:#ABB2BF">: </span><span style="color:#E06C75">DocumentData</span><span style="color:#ABB2BF">): </span><span style="color:#E06C75">WriteBatch</span><span style="color:#ABB2BF">;</span></span></code></pre>
|
|
1974
|
+
<h6 id="parameters-51">Parameters</h6>
|
|
1975
|
+
<div class="table-scroll">
|
|
1976
|
+
|
|
1977
|
+
|
|
1978
|
+
|
|
1979
|
+
|
|
1980
|
+
|
|
1981
|
+
|
|
1982
|
+
|
|
1983
|
+
|
|
1984
|
+
|
|
1985
|
+
|
|
1986
|
+
|
|
1987
|
+
|
|
1988
|
+
|
|
1989
|
+
|
|
1990
|
+
|
|
1991
|
+
|
|
1992
|
+
<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"><a href="/docs/pyric-firestore-reference-api/#documentdata"><code>DocumentData</code></a></td></tr></tbody></table></div>
|
|
1993
|
+
<h6 id="returns-61">Returns</h6>
|
|
1994
|
+
<p><a href="#writebatch"><code>WriteBatch</code></a></p>
|
|
1995
|
+
<p><a id="update-4"></a></p>
|
|
1996
|
+
<h5 id="update-2">update()</h5>
|
|
1997
|
+
<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">update</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">ref</span><span style="color:#ABB2BF">: </span><span style="color:#E06C75">DocumentReference</span><span style="color:#ABB2BF">, </span><span style="color:#E06C75">data</span><span style="color:#ABB2BF">: </span><span style="color:#E06C75">DocumentData</span><span style="color:#ABB2BF">): </span><span style="color:#E06C75">WriteBatch</span><span style="color:#ABB2BF">;</span></span></code></pre>
|
|
1998
|
+
<h6 id="parameters-52">Parameters</h6>
|
|
1999
|
+
<div class="table-scroll">
|
|
2000
|
+
|
|
2001
|
+
|
|
2002
|
+
|
|
2003
|
+
|
|
2004
|
+
|
|
2005
|
+
|
|
2006
|
+
|
|
2007
|
+
|
|
2008
|
+
|
|
2009
|
+
|
|
2010
|
+
|
|
2011
|
+
|
|
2012
|
+
|
|
2013
|
+
|
|
2014
|
+
|
|
2015
|
+
|
|
2016
|
+
<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"><a href="/docs/pyric-firestore-reference-api/#documentdata"><code>DocumentData</code></a></td></tr></tbody></table></div>
|
|
2017
|
+
<h6 id="returns-62">Returns</h6>
|
|
2018
|
+
<p><a href="#writebatch"><code>WriteBatch</code></a></p>
|
|
2019
|
+
<h2 id="type-aliases">Type Aliases</h2>
|
|
2020
|
+
<p><a id="aggregatefield"></a></p>
|
|
2021
|
+
<h3 id="aggregatefield">AggregateField</h3>
|
|
2022
|
+
<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>
|
|
2023
|
+
<span class="line"><span style="color:#ABB2BF"> | {</span></span>
|
|
2024
|
+
<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>
|
|
2025
|
+
<span class="line"><span style="color:#ABB2BF">}</span></span>
|
|
2026
|
+
<span class="line"><span style="color:#ABB2BF"> | {</span></span>
|
|
2027
|
+
<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>
|
|
2028
|
+
<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>
|
|
2029
|
+
<span class="line"><span style="color:#ABB2BF">}</span></span>
|
|
2030
|
+
<span class="line"><span style="color:#ABB2BF"> | {</span></span>
|
|
2031
|
+
<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>
|
|
2032
|
+
<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>
|
|
2033
|
+
<span class="line"><span style="color:#ABB2BF">};</span></span></code></pre>
|
|
2034
|
+
<p>Single aggregate definition. Field is required for sum / average,
|
|
2035
|
+
forbidden for count (no field has any meaning when you’re
|
|
2036
|
+
counting rows). Encoded as discriminated union so type errors
|
|
2037
|
+
surface at the call site, not at runtime.</p>
|
|
2038
|
+
<hr>
|
|
2039
|
+
<p><a id="aggregatespec"></a></p>
|
|
2040
|
+
<h3 id="aggregatespec">AggregateSpec</h3>
|
|
2041
|
+
<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"><</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>
|
|
2042
|
+
<p>Spec passed to <code>Query.aggregate(...)</code>. Aliases become the keys in
|
|
2043
|
+
the returned snapshot’s <code>.data()</code> object.</p>
|
|
2044
|
+
<hr>
|
|
2045
|
+
<p><a id="documentchangetype-1"></a></p>
|
|
2046
|
+
<h3 id="documentchangetype">DocumentChangeType</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">type</span><span style="color:#E5C07B"> DocumentChangeType</span><span style="color:#56B6C2"> =</span><span style="color:#98C379"> "added"</span><span style="color:#ABB2BF"> | </span><span style="color:#98C379">"modified"</span><span style="color:#ABB2BF"> | </span><span style="color:#98C379">"removed"</span><span style="color:#ABB2BF">;</span></span></code></pre>
|
|
2048
|
+
<hr>
|
|
2049
|
+
<p><a id="filter"></a></p>
|
|
2050
|
+
<h3 id="filter">Filter</h3>
|
|
2051
|
+
<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"> Filter</span><span style="color:#56B6C2"> =</span></span>
|
|
2052
|
+
<span class="line"><span style="color:#ABB2BF"> | {</span></span>
|
|
2053
|
+
<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>
|
|
2054
|
+
<span class="line"><span style="color:#E06C75"> kind</span><span style="color:#ABB2BF">: </span><span style="color:#98C379">"where"</span><span style="color:#ABB2BF">;</span></span>
|
|
2055
|
+
<span class="line"><span style="color:#E06C75"> op</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">WhereFilterOp</span><span style="color:#ABB2BF">;</span></span>
|
|
2056
|
+
<span class="line"><span style="color:#E06C75"> value</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">unknown</span><span style="color:#ABB2BF">;</span></span>
|
|
2057
|
+
<span class="line"><span style="color:#ABB2BF">}</span></span>
|
|
2058
|
+
<span class="line"><span style="color:#ABB2BF"> | {</span></span>
|
|
2059
|
+
<span class="line"><span style="color:#E06C75"> filters</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">Filter</span><span style="color:#ABB2BF">[];</span></span>
|
|
2060
|
+
<span class="line"><span style="color:#E06C75"> kind</span><span style="color:#ABB2BF">: </span><span style="color:#98C379">"and"</span><span style="color:#ABB2BF">;</span></span>
|
|
2061
|
+
<span class="line"><span style="color:#ABB2BF">}</span></span>
|
|
2062
|
+
<span class="line"><span style="color:#ABB2BF"> | {</span></span>
|
|
2063
|
+
<span class="line"><span style="color:#E06C75"> filters</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">Filter</span><span style="color:#ABB2BF">[];</span></span>
|
|
2064
|
+
<span class="line"><span style="color:#E06C75"> kind</span><span style="color:#ABB2BF">: </span><span style="color:#98C379">"or"</span><span style="color:#ABB2BF">;</span></span>
|
|
2065
|
+
<span class="line"><span style="color:#ABB2BF">};</span></span></code></pre>
|
|
2066
|
+
<p>Composite filter tree for <code>Query.applyFilter</code>. Recursive — <code>and</code> /
|
|
2067
|
+
<code>or</code> carry their own <code>filters</code> array of nested <code>Filter</code>s; the
|
|
2068
|
+
leaves are field/op/value triples (<code>kind: 'where'</code>).</p>
|
|
2069
|
+
<p>Mirrors <code>firebase/firestore</code>’s <code>QueryFilterConstraint</code> shape, just
|
|
2070
|
+
as a tagged-union value type (the SDK’s classes carry an <code>_op</code>
|
|
2071
|
+
field; ours is the <code>kind</code> discriminant).</p>
|
|
2072
|
+
<hr>
|
|
2073
|
+
<p><a id="snapshotlistenoptions"></a></p>
|
|
2074
|
+
<h3 id="snapshotlistenoptions">SnapshotListenOptions</h3>
|
|
2075
|
+
<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"> SnapshotListenOptions</span><span style="color:#56B6C2"> =</span><span style="color:#E5C07B"> SnapshotListenerOptions</span><span style="color:#ABB2BF">;</span></span></code></pre>
|
|
2076
|
+
<p>Mirrors <code>firebase/firestore</code>’s <code>SnapshotListenOptions</code>. The
|
|
2077
|
+
<code>includeMetadataChanges</code> flag is accepted for API parity but has no
|
|
2078
|
+
observable effect in the sandbox: there’s no offline cache and no
|
|
2079
|
+
pending-writes window, so <code>metadata.fromCache</code> and
|
|
2080
|
+
<code>metadata.hasPendingWrites</code> are always <code>false</code> (snapshot-listeners.ts section 6).</p>
|
|
2081
|
+
<hr>
|
|
2082
|
+
<p><a id="unsubscribe"></a></p>
|
|
2083
|
+
<h3 id="unsubscribe">Unsubscribe()</h3>
|
|
2084
|
+
<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>
|
|
2085
|
+
<p>Returned from <code>onSnapshot</code>. Calling it deregisters the listener and
|
|
2086
|
+
stops further callback invocations. Idempotent.</p>
|
|
2087
|
+
<h4 id="returns-63">Returns</h4>
|
|
2088
|
+
<p><code>void</code></p>
|
|
4
2089
|
<h2 id="functions">Functions</h2>
|
|
2090
|
+
<p><a id="getadminfirestore"></a></p>
|
|
2091
|
+
<h3 id="getadminfirestore">getAdminFirestore()</h3>
|
|
2092
|
+
<h4 id="call-signature-2">Call Signature</h4>
|
|
2093
|
+
<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">SandboxFirestore</span><span style="color:#ABB2BF">;</span></span></code></pre>
|
|
2094
|
+
<p>Resolve a <strong>rules-bypassing</strong> Firestore handle for a context — the
|
|
2095
|
+
Pyric Studio admin lens (Gap #2). Same chainable <code>SandboxFirestore</code>
|
|
2096
|
+
surface as <code>getFirestore</code>, but every operation it issues (reads,
|
|
2097
|
+
writes, queries, batches, transactions) SKIPS security-rule evaluation
|
|
2098
|
+
and is treated as ALLOW. This is the modular/chainable-shaped sibling of
|
|
2099
|
+
the path-string <code>sandbox.admin.*</code> bypass — it reuses the exact same
|
|
2100
|
+
<code>LocalEnvironment</code> bypass execution path (<code>bypassRules</code> on the op),
|
|
2101
|
+
rather than reimplementing it.</p>
|
|
2102
|
+
<p>Storage preconditions still apply (a <code>create</code> on an existing doc still
|
|
2103
|
+
fails <code>already-exists</code>, matching real Firestore admin), and the same
|
|
2104
|
+
<code>request</code>/<code>write</code> events fire + listeners wake, so the change shows up
|
|
2105
|
+
live and on the traffic log (stamped as an admin-bypass read/write).</p>
|
|
2106
|
+
<p>Use for “edit anything as admin” surfaces (Studio F2). For rules-applied
|
|
2107
|
+
impersonation (“act as this user”), use <code>getFirestore(sandbox.withAuth({ uid }))</code> instead — that path is unchanged.</p>
|
|
2108
|
+
<h5 id="parameters-53">Parameters</h5>
|
|
2109
|
+
<div class="table-scroll">
|
|
2110
|
+
|
|
2111
|
+
|
|
2112
|
+
|
|
2113
|
+
|
|
2114
|
+
|
|
2115
|
+
|
|
2116
|
+
|
|
2117
|
+
|
|
2118
|
+
|
|
2119
|
+
|
|
2120
|
+
|
|
2121
|
+
|
|
2122
|
+
<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"><a href="/docs/pyric-firestore-reference-api/#sandboxcontext"><code>SandboxContext</code></a></td></tr></tbody></table></div>
|
|
2123
|
+
<h5 id="returns-64">Returns</h5>
|
|
2124
|
+
<p><a href="#sandboxfirestore"><code>SandboxFirestore</code></a></p>
|
|
2125
|
+
<h5 id="example">Example</h5>
|
|
2126
|
+
<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>
|
|
2127
|
+
<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">getAdminFirestore</span><span style="color:#ABB2BF"> } </span><span style="color:#C678DD">from</span><span style="color:#98C379"> 'pyric-admin/firestore'</span><span style="color:#ABB2BF">;</span></span>
|
|
2128
|
+
<span class="line"></span>
|
|
2129
|
+
<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>
|
|
2130
|
+
<span class="line"><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:#D19A66">null</span><span style="color:#ABB2BF">)).</span><span style="color:#61AFEF">setRules</span><span style="color:#ABB2BF">(</span><span style="color:#98C379">'...deny everything...'</span><span style="color:#ABB2BF">);</span></span>
|
|
2131
|
+
<span class="line"></span>
|
|
2132
|
+
<span class="line"><span style="color:#7F848E;font-style:italic">// Denied under rules:</span></span>
|
|
2133
|
+
<span class="line"><span style="color:#C678DD">await</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>
|
|
2134
|
+
<span class="line"><span style="color:#ABB2BF"> .</span><span style="color:#61AFEF">doc</span><span style="color:#ABB2BF">(</span><span style="color:#98C379">'locked/x'</span><span style="color:#ABB2BF">).</span><span style="color:#61AFEF">set</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">// throws permission-denied</span></span>
|
|
2135
|
+
<span class="line"></span>
|
|
2136
|
+
<span class="line"><span style="color:#7F848E;font-style:italic">// Bypasses rules:</span></span>
|
|
2137
|
+
<span class="line"><span style="color:#C678DD">await</span><span style="color:#61AFEF"> getAdminFirestore</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">sandbox</span><span style="color:#ABB2BF">).</span><span style="color:#61AFEF">doc</span><span style="color:#ABB2BF">(</span><span style="color:#98C379">'locked/x'</span><span style="color:#ABB2BF">).</span><span style="color:#61AFEF">set</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">// ok</span></span></code></pre>
|
|
2138
|
+
<h4 id="call-signature-3">Call Signature</h4>
|
|
2139
|
+
<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">SandboxFirestore</span><span style="color:#ABB2BF">;</span></span></code></pre>
|
|
2140
|
+
<p>Resolve a <strong>rules-bypassing</strong> Firestore handle for a context — the
|
|
2141
|
+
Pyric Studio admin lens (Gap #2). Same chainable <code>SandboxFirestore</code>
|
|
2142
|
+
surface as <code>getFirestore</code>, but every operation it issues (reads,
|
|
2143
|
+
writes, queries, batches, transactions) SKIPS security-rule evaluation
|
|
2144
|
+
and is treated as ALLOW. This is the modular/chainable-shaped sibling of
|
|
2145
|
+
the path-string <code>sandbox.admin.*</code> bypass — it reuses the exact same
|
|
2146
|
+
<code>LocalEnvironment</code> bypass execution path (<code>bypassRules</code> on the op),
|
|
2147
|
+
rather than reimplementing it.</p>
|
|
2148
|
+
<p>Storage preconditions still apply (a <code>create</code> on an existing doc still
|
|
2149
|
+
fails <code>already-exists</code>, matching real Firestore admin), and the same
|
|
2150
|
+
<code>request</code>/<code>write</code> events fire + listeners wake, so the change shows up
|
|
2151
|
+
live and on the traffic log (stamped as an admin-bypass read/write).</p>
|
|
2152
|
+
<p>Use for “edit anything as admin” surfaces (Studio F2). For rules-applied
|
|
2153
|
+
impersonation (“act as this user”), use <code>getFirestore(sandbox.withAuth({ uid }))</code> instead — that path is unchanged.</p>
|
|
2154
|
+
<h5 id="parameters-54">Parameters</h5>
|
|
2155
|
+
<div class="table-scroll">
|
|
2156
|
+
|
|
2157
|
+
|
|
2158
|
+
|
|
2159
|
+
|
|
2160
|
+
|
|
2161
|
+
|
|
2162
|
+
|
|
2163
|
+
|
|
2164
|
+
|
|
2165
|
+
|
|
2166
|
+
|
|
2167
|
+
|
|
2168
|
+
<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"><a href="/docs/pyric-firestore-reference-api/#sandbox"><code>Sandbox</code></a></td></tr></tbody></table></div>
|
|
2169
|
+
<h5 id="returns-65">Returns</h5>
|
|
2170
|
+
<p><a href="#sandboxfirestore"><code>SandboxFirestore</code></a></p>
|
|
2171
|
+
<h5 id="example-1">Example</h5>
|
|
2172
|
+
<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>
|
|
2173
|
+
<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">getAdminFirestore</span><span style="color:#ABB2BF"> } </span><span style="color:#C678DD">from</span><span style="color:#98C379"> 'pyric-admin/firestore'</span><span style="color:#ABB2BF">;</span></span>
|
|
2174
|
+
<span class="line"></span>
|
|
2175
|
+
<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>
|
|
2176
|
+
<span class="line"><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:#D19A66">null</span><span style="color:#ABB2BF">)).</span><span style="color:#61AFEF">setRules</span><span style="color:#ABB2BF">(</span><span style="color:#98C379">'...deny everything...'</span><span style="color:#ABB2BF">);</span></span>
|
|
2177
|
+
<span class="line"></span>
|
|
2178
|
+
<span class="line"><span style="color:#7F848E;font-style:italic">// Denied under rules:</span></span>
|
|
2179
|
+
<span class="line"><span style="color:#C678DD">await</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>
|
|
2180
|
+
<span class="line"><span style="color:#ABB2BF"> .</span><span style="color:#61AFEF">doc</span><span style="color:#ABB2BF">(</span><span style="color:#98C379">'locked/x'</span><span style="color:#ABB2BF">).</span><span style="color:#61AFEF">set</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">// throws permission-denied</span></span>
|
|
2181
|
+
<span class="line"></span>
|
|
2182
|
+
<span class="line"><span style="color:#7F848E;font-style:italic">// Bypasses rules:</span></span>
|
|
2183
|
+
<span class="line"><span style="color:#C678DD">await</span><span style="color:#61AFEF"> getAdminFirestore</span><span style="color:#ABB2BF">(</span><span style="color:#E06C75">sandbox</span><span style="color:#ABB2BF">).</span><span style="color:#61AFEF">doc</span><span style="color:#ABB2BF">(</span><span style="color:#98C379">'locked/x'</span><span style="color:#ABB2BF">).</span><span style="color:#61AFEF">set</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">// ok</span></span></code></pre>
|
|
2184
|
+
<hr>
|
|
5
2185
|
<p><a id="getfirestore"></a></p>
|
|
6
2186
|
<h3 id="getfirestore">getFirestore()</h3>
|
|
7
|
-
<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"
|
|
2187
|
+
<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>
|
|
2188
|
+
<span class="line"><span style="color:#ABB2BF"> | </span><span style="color:#E5C07B">SandboxAdminApp</span></span>
|
|
2189
|
+
<span class="line"><span style="color:#ABB2BF"> | </span><span style="color:#E5C07B">SandboxContext</span><span style="color:#ABB2BF">): </span><span style="color:#E5C07B">SandboxFirestore</span><span style="color:#ABB2BF">;</span></span></code></pre>
|
|
8
2190
|
<p>Return the admin Firestore handle.</p>
|
|
9
2191
|
<ul>
|
|
10
|
-
<li><code>getFirestore(ctx)</code> — the original context form (rules-
|
|
11
|
-
ctx’s captured identity). Unchanged; idempotent per <code>SandboxContext</code
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
2192
|
+
<li><code>getFirestore(ctx)</code> — the original context form (rules-APPLIED for the
|
|
2193
|
+
ctx’s captured identity). Unchanged; idempotent per <code>SandboxContext</code>.
|
|
2194
|
+
This is the pyric-internal rules-simulation shape, not a firebase-admin
|
|
2195
|
+
shape, so it keeps rule evaluation.</li>
|
|
2196
|
+
<li><code>getFirestore(app)</code> — resolves a <a href="/docs/pyric-admin-app-reference-api/#pyricadminapp">PyricAdminApp</a>’s sandbox to the
|
|
2197
|
+
rules-BYPASS admin lens (firebase-admin parity, #394).</li>
|
|
2198
|
+
<li><code>getFirestore()</code> — resolves the default app to the rules-BYPASS admin
|
|
2199
|
+
lens; throws <code>app/no-app</code> when nothing is initialized.</li>
|
|
15
2200
|
</ul>
|
|
16
|
-
<
|
|
2201
|
+
<p>The app forms mirror <code>firebase-admin/firestore</code>’s <code>getFirestore(app?)</code>,
|
|
2202
|
+
which bypasses security rules — so a Cloud Function’s admin write lands the
|
|
2203
|
+
same way it does in production, instead of being denied as <code>request.auth == null</code> by the sandbox’s anon lens (the #394 deny-direction divergence).</p>
|
|
2204
|
+
<h4 id="parameters-55">Parameters</h4>
|
|
2205
|
+
<div class="table-scroll">
|
|
2206
|
+
|
|
2207
|
+
|
|
2208
|
+
|
|
2209
|
+
|
|
2210
|
+
|
|
2211
|
+
|
|
2212
|
+
|
|
2213
|
+
|
|
2214
|
+
|
|
2215
|
+
|
|
2216
|
+
|
|
2217
|
+
|
|
2218
|
+
<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">| <a href="/docs/pyric-admin-app-reference-api/#sandboxadminapp"><code>SandboxAdminApp</code></a> | <a href="/docs/pyric-firestore-reference-api/#sandboxcontext"><code>SandboxContext</code></a></td></tr></tbody></table></div>
|
|
2219
|
+
<h4 id="returns-66">Returns</h4>
|
|
2220
|
+
<p><a href="#sandboxfirestore"><code>SandboxFirestore</code></a></p>
|
|
2221
|
+
<hr>
|
|
2222
|
+
<p><a id="onsnapshot"></a></p>
|
|
2223
|
+
<h3 id="onsnapshot">onSnapshot()</h3>
|
|
2224
|
+
<h4 id="call-signature-4">Call Signature</h4>
|
|
2225
|
+
<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">(</span><span style="color:#E06C75;font-style:italic">reference</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">DocumentReference</span><span style="color:#ABB2BF">, </span><span style="color:#E06C75;font-style:italic">observer</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">SnapshotObserver</span><span style="color:#ABB2BF"><</span><span style="color:#E5C07B">DocumentSnapshot</span><span style="color:#ABB2BF">>): </span><span style="color:#E5C07B">Unsubscribe</span><span style="color:#ABB2BF">;</span></span></code></pre>
|
|
2226
|
+
<h5 id="parameters-56">Parameters</h5>
|
|
2227
|
+
<div class="table-scroll">
|
|
2228
|
+
|
|
2229
|
+
|
|
2230
|
+
|
|
2231
|
+
|
|
2232
|
+
|
|
2233
|
+
|
|
2234
|
+
|
|
2235
|
+
|
|
2236
|
+
|
|
2237
|
+
|
|
2238
|
+
|
|
2239
|
+
|
|
2240
|
+
|
|
2241
|
+
|
|
2242
|
+
|
|
2243
|
+
|
|
2244
|
+
<table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>reference</code></td><td align="left"><a href="#documentreference"><code>DocumentReference</code></a></td></tr><tr><td align="left"><code>observer</code></td><td align="left"><a href="#snapshotobserver"><code>SnapshotObserver</code></a><<a href="#documentsnapshot"><code>DocumentSnapshot</code></a>></td></tr></tbody></table></div>
|
|
2245
|
+
<h5 id="returns-67">Returns</h5>
|
|
2246
|
+
<p><a href="#unsubscribe"><code>Unsubscribe</code></a></p>
|
|
2247
|
+
<h4 id="call-signature-5">Call Signature</h4>
|
|
2248
|
+
<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">(</span></span>
|
|
2249
|
+
<span class="line"><span style="color:#E06C75;font-style:italic"> reference</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">DocumentReference</span><span style="color:#ABB2BF">,</span></span>
|
|
2250
|
+
<span class="line"><span style="color:#E06C75;font-style:italic"> options</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">SnapshotListenerOptions</span><span style="color:#ABB2BF">,</span></span>
|
|
2251
|
+
<span class="line"><span style="color:#E06C75;font-style:italic"> observer</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">SnapshotObserver</span><span style="color:#ABB2BF"><</span><span style="color:#E5C07B">DocumentSnapshot</span><span style="color:#ABB2BF">>): </span><span style="color:#E5C07B">Unsubscribe</span><span style="color:#ABB2BF">;</span></span></code></pre>
|
|
2252
|
+
<h5 id="parameters-57">Parameters</h5>
|
|
2253
|
+
<div class="table-scroll">
|
|
2254
|
+
|
|
2255
|
+
|
|
2256
|
+
|
|
2257
|
+
|
|
2258
|
+
|
|
2259
|
+
|
|
2260
|
+
|
|
2261
|
+
|
|
2262
|
+
|
|
2263
|
+
|
|
2264
|
+
|
|
2265
|
+
|
|
2266
|
+
|
|
2267
|
+
|
|
2268
|
+
|
|
2269
|
+
|
|
2270
|
+
|
|
2271
|
+
|
|
2272
|
+
|
|
2273
|
+
|
|
2274
|
+
<table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>reference</code></td><td align="left"><a href="#documentreference"><code>DocumentReference</code></a></td></tr><tr><td align="left"><code>options</code></td><td align="left"><code>SnapshotListenerOptions</code></td></tr><tr><td align="left"><code>observer</code></td><td align="left"><a href="#snapshotobserver"><code>SnapshotObserver</code></a><<a href="#documentsnapshot"><code>DocumentSnapshot</code></a>></td></tr></tbody></table></div>
|
|
2275
|
+
<h5 id="returns-68">Returns</h5>
|
|
2276
|
+
<p><a href="#unsubscribe"><code>Unsubscribe</code></a></p>
|
|
2277
|
+
<h4 id="call-signature-6">Call Signature</h4>
|
|
2278
|
+
<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">(</span></span>
|
|
2279
|
+
<span class="line"><span style="color:#E06C75;font-style:italic"> reference</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">DocumentReference</span><span style="color:#ABB2BF">,</span></span>
|
|
2280
|
+
<span class="line"><span style="color:#61AFEF"> onNext</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:#C678DD">=></span><span style="color:#E5C07B"> void</span><span style="color:#ABB2BF">,</span></span>
|
|
2281
|
+
<span class="line"><span style="color:#61AFEF"> onError</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>
|
|
2282
|
+
<span class="line"><span style="color:#61AFEF"> onCompletion</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 style="color:#E5C07B">Unsubscribe</span><span style="color:#ABB2BF">;</span></span></code></pre>
|
|
2283
|
+
<h5 id="parameters-58">Parameters</h5>
|
|
2284
|
+
<div class="table-scroll">
|
|
2285
|
+
|
|
2286
|
+
|
|
2287
|
+
|
|
2288
|
+
|
|
2289
|
+
|
|
2290
|
+
|
|
2291
|
+
|
|
2292
|
+
|
|
2293
|
+
|
|
2294
|
+
|
|
2295
|
+
|
|
2296
|
+
|
|
2297
|
+
|
|
2298
|
+
|
|
2299
|
+
|
|
2300
|
+
|
|
2301
|
+
|
|
2302
|
+
|
|
2303
|
+
|
|
2304
|
+
|
|
2305
|
+
|
|
2306
|
+
|
|
2307
|
+
|
|
2308
|
+
|
|
2309
|
+
<table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>reference</code></td><td align="left"><a href="#documentreference"><code>DocumentReference</code></a></td></tr><tr><td align="left"><code>onNext</code></td><td align="left">(<code>snapshot</code>: <a href="#documentsnapshot"><code>DocumentSnapshot</code></a>) => <code>void</code></td></tr><tr><td align="left"><code>onError?</code></td><td align="left">(<code>error</code>: <code>unknown</code>) => <code>void</code></td></tr><tr><td align="left"><code>onCompletion?</code></td><td align="left">() => <code>void</code></td></tr></tbody></table></div>
|
|
2310
|
+
<h5 id="returns-69">Returns</h5>
|
|
2311
|
+
<p><a href="#unsubscribe"><code>Unsubscribe</code></a></p>
|
|
2312
|
+
<h4 id="call-signature-7">Call Signature</h4>
|
|
2313
|
+
<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">(</span></span>
|
|
2314
|
+
<span class="line"><span style="color:#E06C75;font-style:italic"> reference</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">DocumentReference</span><span style="color:#ABB2BF">,</span></span>
|
|
2315
|
+
<span class="line"><span style="color:#E06C75;font-style:italic"> options</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">SnapshotListenerOptions</span><span style="color:#ABB2BF">,</span></span>
|
|
2316
|
+
<span class="line"><span style="color:#61AFEF"> onNext</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:#C678DD">=></span><span style="color:#E5C07B"> void</span><span style="color:#ABB2BF">,</span></span>
|
|
2317
|
+
<span class="line"><span style="color:#61AFEF"> onError</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>
|
|
2318
|
+
<span class="line"><span style="color:#61AFEF"> onCompletion</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 style="color:#E5C07B">Unsubscribe</span><span style="color:#ABB2BF">;</span></span></code></pre>
|
|
2319
|
+
<h5 id="parameters-59">Parameters</h5>
|
|
2320
|
+
<div class="table-scroll">
|
|
2321
|
+
|
|
2322
|
+
|
|
2323
|
+
|
|
2324
|
+
|
|
2325
|
+
|
|
2326
|
+
|
|
2327
|
+
|
|
2328
|
+
|
|
2329
|
+
|
|
2330
|
+
|
|
2331
|
+
|
|
2332
|
+
|
|
2333
|
+
|
|
2334
|
+
|
|
2335
|
+
|
|
2336
|
+
|
|
2337
|
+
|
|
2338
|
+
|
|
2339
|
+
|
|
2340
|
+
|
|
2341
|
+
|
|
2342
|
+
|
|
2343
|
+
|
|
2344
|
+
|
|
2345
|
+
|
|
2346
|
+
|
|
2347
|
+
|
|
2348
|
+
|
|
2349
|
+
<table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>reference</code></td><td align="left"><a href="#documentreference"><code>DocumentReference</code></a></td></tr><tr><td align="left"><code>options</code></td><td align="left"><code>SnapshotListenerOptions</code></td></tr><tr><td align="left"><code>onNext</code></td><td align="left">(<code>snapshot</code>: <a href="#documentsnapshot"><code>DocumentSnapshot</code></a>) => <code>void</code></td></tr><tr><td align="left"><code>onError?</code></td><td align="left">(<code>error</code>: <code>unknown</code>) => <code>void</code></td></tr><tr><td align="left"><code>onCompletion?</code></td><td align="left">() => <code>void</code></td></tr></tbody></table></div>
|
|
2350
|
+
<h5 id="returns-70">Returns</h5>
|
|
2351
|
+
<p><a href="#unsubscribe"><code>Unsubscribe</code></a></p>
|
|
2352
|
+
<h4 id="call-signature-8">Call Signature</h4>
|
|
2353
|
+
<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">(</span><span style="color:#E06C75;font-style:italic">reference</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">Query</span><span style="color:#ABB2BF"> | </span><span style="color:#E5C07B">CollectionReference</span><span style="color:#ABB2BF">, </span><span style="color:#E06C75;font-style:italic">observer</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">SnapshotObserver</span><span style="color:#ABB2BF"><</span><span style="color:#E5C07B">QuerySnapshot</span><span style="color:#ABB2BF">>): </span><span style="color:#E5C07B">Unsubscribe</span><span style="color:#ABB2BF">;</span></span></code></pre>
|
|
2354
|
+
<h5 id="parameters-60">Parameters</h5>
|
|
2355
|
+
<div class="table-scroll">
|
|
2356
|
+
|
|
2357
|
+
|
|
2358
|
+
|
|
2359
|
+
|
|
2360
|
+
|
|
2361
|
+
|
|
2362
|
+
|
|
2363
|
+
|
|
2364
|
+
|
|
2365
|
+
|
|
2366
|
+
|
|
2367
|
+
|
|
2368
|
+
|
|
2369
|
+
|
|
2370
|
+
|
|
2371
|
+
|
|
2372
|
+
<table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>reference</code></td><td align="left"><a href="#query"><code>Query</code></a> | <a href="#collectionreference"><code>CollectionReference</code></a></td></tr><tr><td align="left"><code>observer</code></td><td align="left"><a href="#snapshotobserver"><code>SnapshotObserver</code></a><<a href="#querysnapshot"><code>QuerySnapshot</code></a>></td></tr></tbody></table></div>
|
|
2373
|
+
<h5 id="returns-71">Returns</h5>
|
|
2374
|
+
<p><a href="#unsubscribe"><code>Unsubscribe</code></a></p>
|
|
2375
|
+
<h4 id="call-signature-9">Call Signature</h4>
|
|
2376
|
+
<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">(</span></span>
|
|
2377
|
+
<span class="line"><span style="color:#E06C75;font-style:italic"> reference</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">Query</span><span style="color:#ABB2BF"> | </span><span style="color:#E5C07B">CollectionReference</span><span style="color:#ABB2BF">,</span></span>
|
|
2378
|
+
<span class="line"><span style="color:#E06C75;font-style:italic"> options</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">SnapshotListenerOptions</span><span style="color:#ABB2BF">,</span></span>
|
|
2379
|
+
<span class="line"><span style="color:#E06C75;font-style:italic"> observer</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">SnapshotObserver</span><span style="color:#ABB2BF"><</span><span style="color:#E5C07B">QuerySnapshot</span><span style="color:#ABB2BF">>): </span><span style="color:#E5C07B">Unsubscribe</span><span style="color:#ABB2BF">;</span></span></code></pre>
|
|
2380
|
+
<h5 id="parameters-61">Parameters</h5>
|
|
2381
|
+
<div class="table-scroll">
|
|
2382
|
+
|
|
2383
|
+
|
|
2384
|
+
|
|
2385
|
+
|
|
2386
|
+
|
|
2387
|
+
|
|
2388
|
+
|
|
2389
|
+
|
|
2390
|
+
|
|
2391
|
+
|
|
2392
|
+
|
|
2393
|
+
|
|
2394
|
+
|
|
2395
|
+
|
|
2396
|
+
|
|
2397
|
+
|
|
2398
|
+
|
|
2399
|
+
|
|
2400
|
+
|
|
2401
|
+
|
|
2402
|
+
<table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>reference</code></td><td align="left"><a href="#query"><code>Query</code></a> | <a href="#collectionreference"><code>CollectionReference</code></a></td></tr><tr><td align="left"><code>options</code></td><td align="left"><code>SnapshotListenerOptions</code></td></tr><tr><td align="left"><code>observer</code></td><td align="left"><a href="#snapshotobserver"><code>SnapshotObserver</code></a><<a href="#querysnapshot"><code>QuerySnapshot</code></a>></td></tr></tbody></table></div>
|
|
2403
|
+
<h5 id="returns-72">Returns</h5>
|
|
2404
|
+
<p><a href="#unsubscribe"><code>Unsubscribe</code></a></p>
|
|
2405
|
+
<h4 id="call-signature-10">Call Signature</h4>
|
|
2406
|
+
<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">(</span></span>
|
|
2407
|
+
<span class="line"><span style="color:#E06C75;font-style:italic"> reference</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">Query</span><span style="color:#ABB2BF"> | </span><span style="color:#E5C07B">CollectionReference</span><span style="color:#ABB2BF">,</span></span>
|
|
2408
|
+
<span class="line"><span style="color:#61AFEF"> onNext</span><span style="color:#ABB2BF">: (</span><span style="color:#E06C75;font-style:italic">snapshot</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">QuerySnapshot</span><span style="color:#ABB2BF">) </span><span style="color:#C678DD">=></span><span style="color:#E5C07B"> void</span><span style="color:#ABB2BF">,</span></span>
|
|
2409
|
+
<span class="line"><span style="color:#61AFEF"> onError</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>
|
|
2410
|
+
<span class="line"><span style="color:#61AFEF"> onCompletion</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 style="color:#E5C07B">Unsubscribe</span><span style="color:#ABB2BF">;</span></span></code></pre>
|
|
2411
|
+
<h5 id="parameters-62">Parameters</h5>
|
|
2412
|
+
<div class="table-scroll">
|
|
2413
|
+
|
|
2414
|
+
|
|
2415
|
+
|
|
2416
|
+
|
|
2417
|
+
|
|
2418
|
+
|
|
2419
|
+
|
|
2420
|
+
|
|
2421
|
+
|
|
2422
|
+
|
|
2423
|
+
|
|
2424
|
+
|
|
2425
|
+
|
|
2426
|
+
|
|
2427
|
+
|
|
2428
|
+
|
|
2429
|
+
|
|
2430
|
+
|
|
2431
|
+
|
|
2432
|
+
|
|
2433
|
+
|
|
2434
|
+
|
|
2435
|
+
|
|
2436
|
+
|
|
2437
|
+
<table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>reference</code></td><td align="left"><a href="#query"><code>Query</code></a> | <a href="#collectionreference"><code>CollectionReference</code></a></td></tr><tr><td align="left"><code>onNext</code></td><td align="left">(<code>snapshot</code>: <a href="#querysnapshot"><code>QuerySnapshot</code></a>) => <code>void</code></td></tr><tr><td align="left"><code>onError?</code></td><td align="left">(<code>error</code>: <code>unknown</code>) => <code>void</code></td></tr><tr><td align="left"><code>onCompletion?</code></td><td align="left">() => <code>void</code></td></tr></tbody></table></div>
|
|
2438
|
+
<h5 id="returns-73">Returns</h5>
|
|
2439
|
+
<p><a href="#unsubscribe"><code>Unsubscribe</code></a></p>
|
|
2440
|
+
<h4 id="call-signature-11">Call Signature</h4>
|
|
2441
|
+
<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">(</span></span>
|
|
2442
|
+
<span class="line"><span style="color:#E06C75;font-style:italic"> reference</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">Query</span><span style="color:#ABB2BF"> | </span><span style="color:#E5C07B">CollectionReference</span><span style="color:#ABB2BF">,</span></span>
|
|
2443
|
+
<span class="line"><span style="color:#E06C75;font-style:italic"> options</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">SnapshotListenerOptions</span><span style="color:#ABB2BF">,</span></span>
|
|
2444
|
+
<span class="line"><span style="color:#61AFEF"> onNext</span><span style="color:#ABB2BF">: (</span><span style="color:#E06C75;font-style:italic">snapshot</span><span style="color:#ABB2BF">: </span><span style="color:#E5C07B">QuerySnapshot</span><span style="color:#ABB2BF">) </span><span style="color:#C678DD">=></span><span style="color:#E5C07B"> void</span><span style="color:#ABB2BF">,</span></span>
|
|
2445
|
+
<span class="line"><span style="color:#61AFEF"> onError</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>
|
|
2446
|
+
<span class="line"><span style="color:#61AFEF"> onCompletion</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 style="color:#E5C07B">Unsubscribe</span><span style="color:#ABB2BF">;</span></span></code></pre>
|
|
2447
|
+
<h5 id="parameters-63">Parameters</h5>
|
|
17
2448
|
<div class="table-scroll">
|
|
18
2449
|
|
|
19
2450
|
|
|
@@ -27,6 +2458,66 @@ nothing is initialized.</li>
|
|
|
27
2458
|
|
|
28
2459
|
|
|
29
2460
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
2461
|
+
|
|
2462
|
+
|
|
2463
|
+
|
|
2464
|
+
|
|
2465
|
+
|
|
2466
|
+
|
|
2467
|
+
|
|
2468
|
+
|
|
2469
|
+
|
|
2470
|
+
|
|
2471
|
+
|
|
2472
|
+
|
|
2473
|
+
|
|
2474
|
+
|
|
2475
|
+
|
|
2476
|
+
|
|
2477
|
+
<table><thead><tr><th align="left">Parameter</th><th align="left">Type</th></tr></thead><tbody><tr><td align="left"><code>reference</code></td><td align="left"><a href="#query"><code>Query</code></a> | <a href="#collectionreference"><code>CollectionReference</code></a></td></tr><tr><td align="left"><code>options</code></td><td align="left"><code>SnapshotListenerOptions</code></td></tr><tr><td align="left"><code>onNext</code></td><td align="left">(<code>snapshot</code>: <a href="#querysnapshot"><code>QuerySnapshot</code></a>) => <code>void</code></td></tr><tr><td align="left"><code>onError?</code></td><td align="left">(<code>error</code>: <code>unknown</code>) => <code>void</code></td></tr><tr><td align="left"><code>onCompletion?</code></td><td align="left">() => <code>void</code></td></tr></tbody></table></div>
|
|
2478
|
+
<h5 id="returns-74">Returns</h5>
|
|
2479
|
+
<p><a href="#unsubscribe"><code>Unsubscribe</code></a></p>
|
|
2480
|
+
<h2 id="references">References</h2>
|
|
2481
|
+
<p><a id="authstate"></a></p>
|
|
2482
|
+
<h3 id="authstate">AuthState</h3>
|
|
2483
|
+
<p>Re-exports <a href="/docs/pyric-firestore-reference-api/#authstate">AuthState</a></p>
|
|
2484
|
+
<hr>
|
|
2485
|
+
<p><a id="documentdata"></a></p>
|
|
2486
|
+
<h3 id="documentdata">DocumentData</h3>
|
|
2487
|
+
<p>Re-exports <a href="/docs/pyric-firestore-reference-api/#documentdata">DocumentData</a></p>
|
|
2488
|
+
<hr>
|
|
2489
|
+
<p><a id="fieldvalue"></a></p>
|
|
2490
|
+
<h3 id="fieldvalue">FieldValue</h3>
|
|
2491
|
+
<p>Re-exports <a href="/docs/pyric-firestore-reference-api/#fieldvalue">FieldValue</a></p>
|
|
2492
|
+
<hr>
|
|
2493
|
+
<p><a id="fieldvaluesentinel"></a></p>
|
|
2494
|
+
<h3 id="fieldvaluesentinel">FieldValueSentinel</h3>
|
|
2495
|
+
<p>Re-exports <a href="/docs/pyric-firestore-reference-api/#fieldvaluesentinel">FieldValueSentinel</a></p>
|
|
2496
|
+
<hr>
|
|
2497
|
+
<p><a id="lintresult"></a></p>
|
|
2498
|
+
<h3 id="lintresult">LintResult</h3>
|
|
2499
|
+
<p>Re-exports <a href="/docs/pyric-firestore-reference-api/#lintresult">LintResult</a></p>
|
|
2500
|
+
<hr>
|
|
2501
|
+
<p><a id="orderdirection"></a></p>
|
|
2502
|
+
<h3 id="orderdirection">OrderDirection</h3>
|
|
2503
|
+
<p>Re-exports <a href="/docs/pyric-firestore-reference-api/#orderdirection">OrderDirection</a></p>
|
|
2504
|
+
<hr>
|
|
2505
|
+
<p><a id="sandbox"></a></p>
|
|
2506
|
+
<h3 id="sandbox">Sandbox</h3>
|
|
2507
|
+
<p>Re-exports <a href="/docs/pyric-firestore-reference-api/#sandbox">Sandbox</a></p>
|
|
2508
|
+
<hr>
|
|
2509
|
+
<p><a id="sandboxcontext"></a></p>
|
|
2510
|
+
<h3 id="sandboxcontext">SandboxContext</h3>
|
|
2511
|
+
<p>Re-exports <a href="/docs/pyric-firestore-reference-api/#sandboxcontext">SandboxContext</a></p>
|
|
2512
|
+
<hr>
|
|
2513
|
+
<p><a id="sandboxerror"></a></p>
|
|
2514
|
+
<h3 id="sandboxerror">SandboxError</h3>
|
|
2515
|
+
<p>Re-exports <a href="/docs/pyric-firestore-reference-api/#sandboxerror">SandboxError</a></p>
|
|
2516
|
+
<hr>
|
|
2517
|
+
<p><a id="timestamp"></a></p>
|
|
2518
|
+
<h3 id="timestamp">Timestamp</h3>
|
|
2519
|
+
<p>Re-exports <a href="/docs/pyric-firestore-reference-api/#timestamp">Timestamp</a></p>
|
|
2520
|
+
<hr>
|
|
2521
|
+
<p><a id="wherefilterop"></a></p>
|
|
2522
|
+
<h3 id="wherefilterop">WhereFilterOp</h3>
|
|
2523
|
+
<p>Re-exports <a href="/docs/pyric-firestore-reference-api/#wherefilterop">WhereFilterOp</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="#interfaces"> Interfaces </a> <ul> <li data-api-symbol="admindocumentsnapshot"> <a href="#admindocumentsnapshot">AdminDocumentSnapshot</a> </li><li data-api-symbol="adminquerydocumentsnapshot"> <a href="#adminquerydocumentsnapshot">AdminQueryDocumentSnapshot</a> </li><li data-api-symbol="adminquerysnapshot"> <a href="#adminquerysnapshot">AdminQuerySnapshot</a> </li><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="docchangesoptions"> <a href="#docchangesoptions">DocChangesOptions</a> </li><li data-api-symbol="documentchange"> <a href="#documentchange">DocumentChange</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="lintwarning"> <a href="#lintwarning">LintWarning</a> </li><li data-api-symbol="query"> <a href="#query">Query</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="rulesmetrics"> <a href="#rulesmetrics">RulesMetrics</a> </li><li data-api-symbol="sandboxfirestore"> <a href="#sandboxfirestore">SandboxFirestore</a> </li><li data-api-symbol="setoptions"> <a href="#setoptions">SetOptions</a> </li><li data-api-symbol="snapshotmetadata"> <a href="#snapshotmetadata">SnapshotMetadata</a> </li><li data-api-symbol="snapshotobserver"> <a href="#snapshotobserver">SnapshotObserver</a> </li><li data-api-symbol="transaction"> <a href="#transaction">Transaction</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="#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="documentchangetype"> <a href="#documentchangetype">DocumentChangeType</a> </li><li data-api-symbol="filter"> <a href="#filter">Filter</a> </li><li data-api-symbol="snapshotlistenoptions"> <a href="#snapshotlistenoptions">SnapshotListenOptions</a> </li><li data-api-symbol="unsubscribe()"> <a href="#unsubscribe">Unsubscribe()</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="getadminfirestore()"> <a href="#getadminfirestore">getAdminFirestore()</a> </li><li data-api-symbol="getfirestore()"> <a href="#getfirestore">getFirestore()</a> </li><li data-api-symbol="onsnapshot()"> <a href="#onsnapshot">onSnapshot()</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="authstate"> <a href="#authstate">AuthState</a> </li><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>
|