@pyric/cli 0.1.0-alpha.10 → 0.1.0-alpha.12
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 +2 -2
- 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 +3 -3
- 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 +979 -579
- 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-messaging-reference-api/index.html +916 -0
- package/dist/serve/docs-ui/docs/pyric-admin-messaging-reference-api.md +706 -0
- 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 +253 -157
- package/dist/serve/docs-ui/docs/pyric-cli-serve-worker-reference-api.md +179 -85
- 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-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 +371 -884
- package/dist/serve/docs-ui/docs/pyric-sandbox-reference-api.md +369 -883
- 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 +2 -1
- 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 +34 -9
- 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/firestore-writes.d.ts.map +1 -1
- package/dist/serve/worker/host/firestore-writes.js +3 -2
- package/dist/serve/worker/host/firestore-writes.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 +3 -2
- package/dist/serve/worker/index.d.ts.map +1 -1
- package/dist/serve/worker/index.js +4 -1
- 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 +2 -2
- 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 +9 -4
- package/src/assurance/.generated/conformance-verdicts.ts +1090 -0
- package/src/assurance/attachment.ts +211 -0
- package/src/assurance/browser.ts +80 -0
- package/src/assurance/campaign.ts +496 -0
- package/src/assurance/capabilities.ts +446 -0
- package/src/assurance/cases.ts +43 -0
- package/src/assurance/index.ts +75 -0
- package/src/assurance/runner.ts +885 -0
- package/src/assurance/tool-names.ts +15 -0
- package/src/assurance/tools.ts +830 -0
- package/src/assurance/types.ts +352 -0
- package/src/assurance/validation.ts +434 -0
- package/src/bridge/client/bridge.ts +550 -0
- package/src/bridge/client/dispatch.ts +137 -0
- package/src/bridge/client.ts +45 -0
- package/src/bridge/protocol.ts +351 -0
- package/src/bridge/server/audit.ts +53 -0
- package/src/bridge/server/bridge.ts +597 -0
- package/src/bridge/server/headless.ts +160 -0
- package/src/bridge/server/json-schema-to-zod.ts +108 -0
- package/src/bridge/server/local-bridge.ts +66 -0
- package/src/bridge/server/logger.ts +50 -0
- package/src/bridge/server/mcp-contract.ts +93 -0
- package/src/bridge/server/mcp.ts +129 -0
- package/src/bridge/server/peer.ts +232 -0
- package/src/bridge/server/standalone.ts +347 -0
- package/src/bridge/server/tool-metadata.ts +99 -0
- package/src/bridge/server.ts +28 -0
- package/src/cli/can-i-use.ts +50 -0
- package/src/cli/cli.test.ts +493 -0
- package/src/cli/database-rules.ts +329 -0
- package/src/cli/dev-runner.ts +282 -0
- package/src/cli/firebase-json.ts +100 -0
- package/src/cli/firestore-indexes.ts +70 -0
- package/src/cli/index.ts +425 -0
- package/src/cli/init.ts +260 -0
- package/src/cli/mcp-proxy.ts +196 -0
- package/src/cli/parse-args.ts +80 -0
- package/src/cli/rules.ts +259 -0
- package/src/cli/scope.ts +67 -0
- package/src/cli/serve.ts +996 -0
- package/src/cli/service-commands.ts +73 -0
- package/src/cli/snapshot.ts +164 -0
- package/src/cli/storage-rules.ts +172 -0
- package/src/cli/verify.ts +416 -0
- package/src/conformance/.generated/can-i-use-browser.ts +113 -0
- package/src/conformance/.generated/can-i-use.ts +117 -0
- package/src/conformance/.generated/conformance-docs.ts +14 -0
- package/src/conformance/browser.ts +24 -0
- package/src/conformance/can-i-use-tool.ts +51 -0
- package/src/conformance/can-i-use.ts +18 -0
- package/src/conformance/docs.ts +8 -0
- package/src/conformance/index.ts +20 -0
- package/src/conformance/tools.ts +16 -0
- package/src/credentials/core/memoize-ttl.ts +142 -0
- package/src/credentials/core/types.ts +10 -0
- package/src/credentials/node/from-adc.ts +96 -0
- package/src/credentials/node/from-service-account.ts +133 -0
- package/src/credentials/node/index.ts +6 -0
- package/src/discover/concurrency.ts +127 -0
- package/src/discover/crawler-adapter.ts +142 -0
- package/src/discover/crawler.ts +1127 -0
- package/src/discover/credential-free.ts +27 -0
- package/src/discover/findCollectionGroup.ts +131 -0
- package/src/discover/firestore-source.ts +59 -0
- package/src/discover/index.ts +5 -0
- package/src/discover/merge.ts +523 -0
- package/src/discover/session.ts +402 -0
- package/src/discover/tools.ts +201 -0
- package/src/discover/types.ts +187 -0
- package/src/discover/wire.ts +324 -0
- package/src/functions-rtdb/child.ts +382 -0
- package/src/functions-rtdb/delivery.ts +7 -0
- package/src/functions-rtdb/discovery.ts +136 -0
- package/src/functions-rtdb/event.ts +64 -0
- package/src/functions-rtdb/execution.ts +111 -0
- package/src/functions-rtdb/in-memory-delivery.ts +40 -0
- package/src/functions-rtdb/project.ts +74 -0
- package/src/functions-rtdb/projection.ts +104 -0
- package/src/functions-rtdb/reference-pattern.ts +20 -0
- package/src/functions-rtdb/remote-delivery.ts +23 -0
- package/src/pkg-version.ts +49 -0
- package/src/register/esm-exports.ts +63 -0
- package/src/register/hooks.ts +30 -0
- package/src/register/index.ts +150 -0
- package/src/register/mapping.ts +33 -0
- package/src/remote/index.ts +1050 -0
- package/src/rtdb/crawl-snapshot.ts +118 -0
- package/src/rtdb/inspection.ts +137 -0
- package/src/rtdb/load-rules-document.ts +56 -0
- package/src/rtdb/rules-generation-tool.ts +38 -0
- package/src/rtdb/rules-json.ts +29 -0
- package/src/serve/activity-guard.ts +29 -0
- package/src/serve/activity-route.ts +164 -0
- package/src/serve/activity-warning.ts +26 -0
- package/src/serve/bridge-mount.ts +200 -0
- package/src/serve/bundler.ts +493 -0
- package/src/serve/capture-store.ts +65 -0
- package/src/serve/discovery.ts +199 -0
- package/src/serve/entries/ai.ts +292 -0
- package/src/serve/entries/app-backend.ts +4 -0
- package/src/serve/entries/app-client.ts +26 -0
- package/src/serve/entries/app-session-store.ts +47 -0
- package/src/serve/entries/app.ts +11 -0
- package/src/serve/entries/auth-helper-core.ts +181 -0
- package/src/serve/entries/auth-helper-dom.ts +134 -0
- package/src/serve/entries/auth-helper-runtime.ts +20 -0
- package/src/serve/entries/auth.ts +255 -0
- package/src/serve/entries/bridge-url.ts +31 -0
- package/src/serve/entries/database.ts +129 -0
- package/src/serve/entries/firestore.ts +232 -0
- package/src/serve/entries/init.ts +46 -0
- package/src/serve/entries/keepalive.ts +46 -0
- package/src/serve/entries/messaging-sw.ts +75 -0
- package/src/serve/entries/messaging.ts +96 -0
- package/src/serve/entries/runtime.ts +540 -0
- package/src/serve/entries/session-store.ts +97 -0
- package/src/serve/entries/storage.ts +92 -0
- package/src/serve/entries/tab-sync-wiring.ts +274 -0
- package/src/serve/entries/worker-runtime.ts +75 -0
- package/src/serve/init-payload.ts +42 -0
- package/src/serve/namespace.ts +675 -0
- package/src/serve/open-browser.ts +68 -0
- package/src/serve/rules.ts +272 -0
- package/src/serve/sandbox-marker.ts +31 -0
- package/src/serve/server.ts +428 -0
- package/src/serve/standalone-assets.ts +180 -0
- package/src/serve/state-store.ts +166 -0
- package/src/serve/studio/disk-project-store.ts +185 -0
- package/src/serve/studio/disk-workspace.ts +162 -0
- package/src/serve/studio/index.ts +20 -0
- package/src/serve/studio/routes.ts +237 -0
- package/src/serve/studio/store-types.ts +48 -0
- package/src/serve/studio/studio-storage.test.ts +289 -0
- package/src/serve/vite-plugin.ts +1102 -0
- package/src/serve/worker/activity-bootstrap.ts +24 -0
- package/src/serve/worker/client/admin-firestore.ts +38 -0
- package/src/serve/worker/client/ai.ts +124 -0
- package/src/serve/worker/client/auth.ts +489 -0
- package/src/serve/worker/client/connection.ts +202 -0
- package/src/serve/worker/client/core.ts +350 -0
- package/src/serve/worker/client/disconnect.ts +45 -0
- package/src/serve/worker/client/firestore-reads.ts +181 -0
- package/src/serve/worker/client/firestore-refs.ts +226 -0
- package/src/serve/worker/client/firestore-writes.ts +232 -0
- package/src/serve/worker/client/handles.ts +91 -0
- package/src/serve/worker/client/messaging.ts +119 -0
- package/src/serve/worker/client/presence.ts +174 -0
- package/src/serve/worker/client/rtdb.ts +311 -0
- package/src/serve/worker/client/rules.ts +63 -0
- package/src/serve/worker/client/service-worker-connection.ts +59 -0
- package/src/serve/worker/client/snapshots.ts +86 -0
- package/src/serve/worker/client/storage.ts +195 -0
- package/src/serve/worker/client/studio.ts +88 -0
- package/src/serve/worker/client.ts +57 -0
- package/src/serve/worker/durable-persistence.ts +137 -0
- package/src/serve/worker/entry.ts +179 -0
- package/src/serve/worker/host/admin-firestore.ts +88 -0
- package/src/serve/worker/host/connection.ts +179 -0
- package/src/serve/worker/host/core.ts +387 -0
- package/src/serve/worker/host/dispatch.ts +316 -0
- package/src/serve/worker/host/firestore-reads.ts +117 -0
- package/src/serve/worker/host/firestore-writes.ts +456 -0
- package/src/serve/worker/host/presence.ts +312 -0
- package/src/serve/worker/host/rtdb.ts +136 -0
- package/src/serve/worker/host/rules.ts +128 -0
- package/src/serve/worker/host/storage.ts +312 -0
- package/src/serve/worker/host/studio.ts +75 -0
- package/src/serve/worker/host/subscriptions.ts +238 -0
- package/src/serve/worker/host-ai.ts +165 -0
- package/src/serve/worker/host-auth.ts +469 -0
- package/src/serve/worker/host-context.ts +273 -0
- package/src/serve/worker/host-events.ts +94 -0
- package/src/serve/worker/host-messaging.ts +240 -0
- package/src/serve/worker/host.ts +47 -0
- package/src/serve/worker/index.ts +196 -0
- package/src/serve/worker/presence-timing.ts +15 -0
- package/src/serve/worker/protocol.ts +1112 -0
- package/src/serve/worker/serve-init.ts +606 -0
- package/src/serve/worker/service-worker-channel.ts +33 -0
- package/src/serve/worker/service-worker-relay.ts +86 -0
- package/src/serve/writer-lock.ts +53 -0
- package/src/verify/cases.ts +233 -0
- package/src/verify/fixture.ts +258 -0
- package/src/verify/index.ts +519 -0
- package/src/verify/tools.ts +108 -0
- package/src/version/compat-target.ts +17 -0
- package/src/vite.ts +17 -0
- package/dist/serve/docs-ui/docs/pyric-firestore-values-reference-api/index.html +0 -30
- package/dist/serve/docs-ui/docs/pyric-firestore-values-reference-api.md +0 -30
- package/dist/serve/studio-ui/assets/index-BvtQIpGn.js +0 -1211
- package/dist/serve/studio-ui/assets/seed-3DMedLL3.js +0 -2
|
@@ -1,1029 +1,345 @@
|
|
|
1
|
+
<!-- Generated from published package declarations via TypeDoc. Rendered by the api-reference content loader. -->
|
|
1
2
|
|
|
2
|
-
|
|
3
|
+
## References
|
|
3
4
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
<a id="custommetadataentry"></a>
|
|
7
|
-
|
|
8
|
-
### CustomMetadataEntry
|
|
9
|
-
|
|
10
|
-
One `customMetadata` row. `id` is a stable render key — keys are
|
|
11
|
-
user-editable, so they can't key the rows themselves.
|
|
5
|
+
<a id="createlistalldeleteimpl"></a>
|
|
12
6
|
|
|
13
|
-
|
|
7
|
+
### createListAllDeleteImpl
|
|
14
8
|
|
|
15
|
-
|
|
16
|
-
| :------ | :------ | :------ |
|
|
17
|
-
| <a id="error"></a> `error?` | `string` | Validation error (`'Key is required'` / `'Duplicate key'`). |
|
|
18
|
-
| <a id="id"></a> `id` | `string` | - |
|
|
19
|
-
| <a id="key"></a> `key` | `string` | - |
|
|
20
|
-
| <a id="value"></a> `value` | `string` | - |
|
|
9
|
+
Re-exports [createListAllDeleteImpl](pyric-ui-storage-reference-api.md#createlistalldeleteimpl)
|
|
21
10
|
|
|
22
11
|
***
|
|
23
12
|
|
|
24
|
-
<a id="
|
|
25
|
-
|
|
26
|
-
### MetadataEditorState
|
|
13
|
+
<a id="custommetadataentry"></a>
|
|
27
14
|
|
|
28
|
-
|
|
15
|
+
### CustomMetadataEntry
|
|
29
16
|
|
|
30
|
-
|
|
31
|
-
| :------ | :------ | :------ |
|
|
32
|
-
| <a id="draft"></a> `draft` | `MetadataDraft` | - |
|
|
33
|
-
| <a id="errorcount"></a> `errorCount` | `number` | - |
|
|
34
|
-
| <a id="initial"></a> `initial` | `MetadataDraft` | Snapshot for `isDirty` / `reset` — same reference-compare semantics as the document editor's `tree !== initial`. |
|
|
17
|
+
Re-exports [CustomMetadataEntry](pyric-ui-storage-reference-api.md#custommetadataentry)
|
|
35
18
|
|
|
36
19
|
***
|
|
37
20
|
|
|
38
|
-
<a id="
|
|
39
|
-
|
|
40
|
-
### StorageDeleteFailure
|
|
41
|
-
|
|
42
|
-
One entry's failure in a bulk run. `error` is the typed
|
|
43
|
-
`StorageError` (`.code` e.g. `storage/unauthorized`).
|
|
21
|
+
<a id="initmetadataeditorstate"></a>
|
|
44
22
|
|
|
45
|
-
|
|
23
|
+
### initMetadataEditorState
|
|
46
24
|
|
|
47
|
-
|
|
48
|
-
| :------ | :------ |
|
|
49
|
-
| <a id="error-1"></a> `error` | `Error` |
|
|
50
|
-
| <a id="fullpath"></a> `fullPath` | `string` |
|
|
25
|
+
Re-exports [initMetadataEditorState](pyric-ui-storage-reference-api.md#initmetadataeditorstate)
|
|
51
26
|
|
|
52
27
|
***
|
|
53
28
|
|
|
54
|
-
<a id="
|
|
55
|
-
|
|
56
|
-
### StorageDeleteOutcome
|
|
29
|
+
<a id="metadataeditoraction"></a>
|
|
57
30
|
|
|
58
|
-
|
|
31
|
+
### MetadataEditorAction
|
|
59
32
|
|
|
60
|
-
|
|
61
|
-
| :------ | :------ | :------ |
|
|
62
|
-
| <a id="deleted"></a> `deleted` | `string`[] | fullPaths of entries fully deleted. |
|
|
63
|
-
| <a id="failed"></a> `failed` | [`StorageDeleteFailure`](#storagedeletefailure)[] | - |
|
|
33
|
+
Re-exports [MetadataEditorAction](pyric-ui-storage-reference-api.md#metadataeditoraction)
|
|
64
34
|
|
|
65
35
|
***
|
|
66
36
|
|
|
67
|
-
<a id="
|
|
68
|
-
|
|
69
|
-
### StorageDeleteProgress
|
|
37
|
+
<a id="metadataeditorreducer"></a>
|
|
70
38
|
|
|
71
|
-
|
|
39
|
+
### metadataEditorReducer
|
|
72
40
|
|
|
73
|
-
|
|
74
|
-
| :------ | :------ | :------ |
|
|
75
|
-
| <a id="deletedcount"></a> `deletedCount` | `number` | Objects deleted so far in this folder walk. |
|
|
76
|
-
| <a id="done"></a> `done` | `boolean` | True for the final emission. |
|
|
41
|
+
Re-exports [metadataEditorReducer](pyric-ui-storage-reference-api.md#metadataeditorreducer)
|
|
77
42
|
|
|
78
43
|
***
|
|
79
44
|
|
|
80
|
-
<a id="
|
|
81
|
-
|
|
82
|
-
### StorageGateVerdict
|
|
83
|
-
|
|
84
|
-
Per-path verdict. `pyric/storage`'s rules subset has exactly two
|
|
85
|
-
verbs (`read` | `write` — the granular get/list/create/update/
|
|
86
|
-
delete forms are a parser follow-up), so `delete` and `upload` are
|
|
87
|
-
DERIVED aliases of `write`: Firebase Storage's `write` permission
|
|
88
|
-
governs create, overwrite, AND delete.
|
|
45
|
+
<a id="metadataeditorstate"></a>
|
|
89
46
|
|
|
90
|
-
|
|
47
|
+
### MetadataEditorState
|
|
91
48
|
|
|
92
|
-
|
|
93
|
-
| :------ | :------ | :------ |
|
|
94
|
-
| <a id="delete"></a> `delete` | `boolean` | Derived — always `=== write` under the two-verb subset. |
|
|
95
|
-
| <a id="read"></a> `read` | `boolean` | - |
|
|
96
|
-
| <a id="reasons"></a> `reasons` | \{ `read`: `string`[]; `write`: `string`[]; \} | Evaluator reason traces for DENIED verbs (`"no rule matches…"` / `"match /… : condition false"`); empty arrays when allowed. Feed into disabled-state tooltips and `data-*-reason` attributes. |
|
|
97
|
-
| `reasons.read` | `string`[] | - |
|
|
98
|
-
| `reasons.write` | `string`[] | - |
|
|
99
|
-
| <a id="upload"></a> `upload` | `boolean` | Derived — always `=== write` under the two-verb subset. |
|
|
100
|
-
| <a id="write"></a> `write` | `boolean` | - |
|
|
49
|
+
Re-exports [MetadataEditorState](pyric-ui-storage-reference-api.md#metadataeditorstate)
|
|
101
50
|
|
|
102
51
|
***
|
|
103
52
|
|
|
104
|
-
<a id="
|
|
105
|
-
|
|
106
|
-
### StorageListEntry
|
|
107
|
-
|
|
108
|
-
One row of the merged folder/object model, the prefix→folder
|
|
109
|
-
synthesis ported (as an idea, not code) from the emulator UI's
|
|
110
|
-
`useStorageFiles`: `listAll`'s `prefixes` become `kind: 'folder'`
|
|
111
|
-
rows, its `items` become `kind: 'object'` rows, folders first.
|
|
53
|
+
<a id="normalizestoragepath"></a>
|
|
112
54
|
|
|
113
|
-
|
|
55
|
+
### normalizeStoragePath
|
|
114
56
|
|
|
115
|
-
|
|
116
|
-
| :------ | :------ | :------ |
|
|
117
|
-
| <a id="fullpath-1"></a> `fullPath` | `string` | Bucket-rooted path (no trailing slash, even for folders). |
|
|
118
|
-
| <a id="kind"></a> `kind` | `"object"` \| `"folder"` | - |
|
|
119
|
-
| <a id="name"></a> `name` | `string` | Last path segment, display name. |
|
|
120
|
-
| <a id="ref"></a> `ref` | `StorageReference` | - |
|
|
57
|
+
Re-exports [normalizeStoragePath](pyric-ui-storage-reference-api.md#normalizestoragepath)
|
|
121
58
|
|
|
122
59
|
***
|
|
123
60
|
|
|
124
|
-
<a id="
|
|
125
|
-
|
|
126
|
-
### StorageRecursiveDeleteImpl
|
|
127
|
-
|
|
128
|
-
Recursive folder delete implementation — the same injection seam
|
|
129
|
-
as the Firestore half's `RecursiveDeleteImpl`. Unlike Firestore
|
|
130
|
-
(where tree-walking needs sandbox introspection or a Cloud
|
|
131
|
-
Function), the public storage surface CAN walk a prefix, so the
|
|
132
|
-
package ships [createListAllDeleteImpl](#createlistalldeleteimpl) as the default;
|
|
133
|
-
inject your own for server-driven deletes.
|
|
61
|
+
<a id="storagedeletefailure"></a>
|
|
134
62
|
|
|
135
|
-
|
|
63
|
+
### StorageDeleteFailure
|
|
136
64
|
|
|
137
|
-
|
|
138
|
-
| :------ | :------ |
|
|
139
|
-
| <a id="start"></a> `start` | (`target`: `StorageReference`) => `AsyncIterableIterator`\<[`StorageDeleteProgress`](#storagedeleteprogress)\> |
|
|
65
|
+
Re-exports [StorageDeleteFailure](pyric-ui-storage-reference-api.md#storagedeletefailure)
|
|
140
66
|
|
|
141
67
|
***
|
|
142
68
|
|
|
143
|
-
<a id="
|
|
144
|
-
|
|
145
|
-
### StorageSelectionEntry
|
|
146
|
-
|
|
147
|
-
What the selection tracks per row — a structural subset of
|
|
148
|
-
`StorageListEntry`, so `useStorageList`'s entries pass straight
|
|
149
|
-
in. The `kind` decides the delete verb later (object →
|
|
150
|
-
`deleteObject`, folder → recursive).
|
|
69
|
+
<a id="storagedeleteoutcome"></a>
|
|
151
70
|
|
|
152
|
-
|
|
71
|
+
### StorageDeleteOutcome
|
|
153
72
|
|
|
154
|
-
|
|
155
|
-
| :------ | :------ |
|
|
156
|
-
| <a id="fullpath-2"></a> `fullPath` | `string` |
|
|
157
|
-
| <a id="kind-1"></a> `kind` | `"object"` \| `"folder"` |
|
|
73
|
+
Re-exports [StorageDeleteOutcome](pyric-ui-storage-reference-api.md#storagedeleteoutcome)
|
|
158
74
|
|
|
159
75
|
***
|
|
160
76
|
|
|
161
|
-
<a id="
|
|
162
|
-
|
|
163
|
-
### UploadEntry
|
|
164
|
-
|
|
165
|
-
Explicit-path upload input. `path` is relative to the hook's
|
|
166
|
-
`path` option (the destination folder).
|
|
77
|
+
<a id="storagedeleteprogress"></a>
|
|
167
78
|
|
|
168
|
-
|
|
79
|
+
### StorageDeleteProgress
|
|
169
80
|
|
|
170
|
-
|
|
171
|
-
| :------ | :------ |
|
|
172
|
-
| <a id="data"></a> `data` | `Blob` \| `ArrayBuffer` \| `Uint8Array`\<`ArrayBufferLike`\> |
|
|
173
|
-
| <a id="metadata"></a> `metadata?` | `SettableMetadata` |
|
|
174
|
-
| <a id="path"></a> `path` | `string` |
|
|
81
|
+
Re-exports [StorageDeleteProgress](pyric-ui-storage-reference-api.md#storagedeleteprogress)
|
|
175
82
|
|
|
176
83
|
***
|
|
177
84
|
|
|
178
|
-
<a id="
|
|
85
|
+
<a id="storagegateverdict"></a>
|
|
179
86
|
|
|
180
|
-
###
|
|
87
|
+
### StorageGateVerdict
|
|
181
88
|
|
|
182
|
-
|
|
183
|
-
byte counters and the `onProgress` callback are in the type NOW so
|
|
184
|
-
a future `uploadBytesResumable`-backed implementation emits real
|
|
185
|
-
intermediate snapshots without a breaking change. Today
|
|
186
|
-
(`pyric/storage` has no resumable uploads — COMPAT) a task
|
|
187
|
-
completes in one tick: `onProgress` fires once at 0 bytes and once
|
|
188
|
-
at `totalBytes`.
|
|
189
|
-
|
|
190
|
-
#### Properties
|
|
191
|
-
|
|
192
|
-
| Property | Type | Description |
|
|
193
|
-
| :------ | :------ | :------ |
|
|
194
|
-
| <a id="bytestransferred"></a> `bytesTransferred` | `number` | - |
|
|
195
|
-
| <a id="error-2"></a> `error?` | `Error` | Populated on `'error'` — a typed `StorageError` from the sandbox (`.code` is `storage/<code>`, e.g. `storage/unauthorized` for a rules-denied write). |
|
|
196
|
-
| <a id="fullpath-3"></a> `fullPath` | `string` | Bucket-rooted destination path. |
|
|
197
|
-
| <a id="id-1"></a> `id` | `string` | Stable id — key task rows on this, not on `fullPath` (two uploads can target the same path). |
|
|
198
|
-
| <a id="metadata-1"></a> `metadata?` | `FullMetadata` | Populated on `'success'`. |
|
|
199
|
-
| <a id="status"></a> `status` | [`UploadTaskStatus`](#uploadtaskstatus-1) | - |
|
|
200
|
-
| <a id="totalbytes"></a> `totalBytes` | `number` | - |
|
|
89
|
+
Re-exports [StorageGateVerdict](pyric-ui-storage-reference-api.md#storagegateverdict)
|
|
201
90
|
|
|
202
91
|
***
|
|
203
92
|
|
|
204
|
-
<a id="
|
|
205
|
-
|
|
206
|
-
### UseMetadataEditorOptions
|
|
93
|
+
<a id="storagelistentry"></a>
|
|
207
94
|
|
|
208
|
-
|
|
95
|
+
### StorageListEntry
|
|
209
96
|
|
|
210
|
-
|
|
211
|
-
| :------ | :------ | :------ |
|
|
212
|
-
| <a id="initial-1"></a> `initial?` | `SettableMetadata` | The metadata being edited — the same shape `useStorageObject`'s `metadata` carries. Read once on mount (the editor is a stateful workspace, like the document editor); `reset()` + remount to re-initialize. |
|
|
97
|
+
Re-exports [StorageListEntry](pyric-ui-storage-reference-api.md#storagelistentry)
|
|
213
98
|
|
|
214
99
|
***
|
|
215
100
|
|
|
216
|
-
<a id="
|
|
101
|
+
<a id="storageliststatus"></a>
|
|
217
102
|
|
|
218
|
-
###
|
|
103
|
+
### StorageListStatus
|
|
219
104
|
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
| Property | Type | Description |
|
|
223
|
-
| :------ | :------ | :------ |
|
|
224
|
-
| <a id="addcustomentry"></a> `addCustomEntry` | (`key?`: `string`, `value?`: `string`) => `void` | - |
|
|
225
|
-
| <a id="cachecontrol"></a> `cacheControl` | `string` | - |
|
|
226
|
-
| <a id="contenttype"></a> `contentType` | `string` | - |
|
|
227
|
-
| <a id="custom"></a> `custom` | [`CustomMetadataEntry`](#custommetadataentry)[] | - |
|
|
228
|
-
| <a id="dispatch"></a> `dispatch` | (`action`: [`MetadataEditorAction`](#metadataeditoraction)) => `void` | Raw dispatch — prefer the named helpers. |
|
|
229
|
-
| <a id="errorcount-1"></a> `errorCount` | `number` | - |
|
|
230
|
-
| <a id="isdirty"></a> `isDirty` | `boolean` | `true` once any modifying action fired since the last `reset`/successful `save`. Reference-compare semantics — manual re-entry of the original values does NOT clear it. |
|
|
231
|
-
| <a id="issaving"></a> `isSaving` | `boolean` | - |
|
|
232
|
-
| <a id="isvalid"></a> `isValid` | `boolean` | Convenience: `errorCount === 0`. |
|
|
233
|
-
| <a id="removecustomentry"></a> `removeCustomEntry` | (`id`: `string`) => `void` | - |
|
|
234
|
-
| <a id="reset"></a> `reset` | () => `void` | Restore the initial values. Clears `isDirty`. |
|
|
235
|
-
| <a id="save"></a> `save` | () => `Promise`\<`any`\> | `updateMetadata(ref(storage, path), toPatch())`. Errors surface via `saveError` (typed `StorageError`), not throws — resolves `undefined` on failure or when the draft is invalid. On success the draft becomes the new baseline (`isDirty` clears) and the fresh `FullMetadata` is returned. |
|
|
236
|
-
| <a id="saveerror"></a> `saveError` | `Error` | - |
|
|
237
|
-
| <a id="setcachecontrol"></a> `setCacheControl` | (`value`: `string`) => `void` | - |
|
|
238
|
-
| <a id="setcontenttype"></a> `setContentType` | (`value`: `string`) => `void` | - |
|
|
239
|
-
| <a id="setcustomkey"></a> `setCustomKey` | (`id`: `string`, `key`: `string`) => `void` | - |
|
|
240
|
-
| <a id="setcustomvalue"></a> `setCustomValue` | (`id`: `string`, `value`: `string`) => `void` | - |
|
|
241
|
-
| <a id="topatch"></a> `toPatch` | () => `SettableMetadata` | Serialize the draft to an `updateMetadata` patch. Empty `contentType`/`cacheControl` become `undefined` — which LEAVES the previous value (the sandbox doesn't model null-clears; see `pyric/storage`'s `updateMetadata` doc). `customMetadata` is always included and replaces wholesale, so row removal works. |
|
|
105
|
+
Re-exports [StorageListStatus](pyric-ui-storage-reference-api.md#storageliststatus)
|
|
242
106
|
|
|
243
107
|
***
|
|
244
108
|
|
|
245
|
-
<a id="
|
|
246
|
-
|
|
247
|
-
### UseObjectUploadOptions
|
|
109
|
+
<a id="storageobjectstatus"></a>
|
|
248
110
|
|
|
249
|
-
|
|
111
|
+
### StorageObjectStatus
|
|
250
112
|
|
|
251
|
-
|
|
252
|
-
| :------ | :------ | :------ |
|
|
253
|
-
| <a id="list"></a> `list?` | `Pick`\<[`UseStorageListResult`](#usestoragelistresult), `"insertItem"` \| `"removeItem"`\> | Optimistic seam from `useStorageList`: each upload inserts its path immediately and rolls back via `removeItem` on failure. Caveat: rolling back an upload that was OVERWRITING an existing object drops that object's row locally (the seam can't tell an optimistic row from a listed one) — `refresh()` restores server truth. |
|
|
254
|
-
| <a id="oncomplete"></a> `onComplete?` | (`task`: [`UploadTask`](#uploadtask)) => `void` | Fired once per task reaching `'success'`. |
|
|
255
|
-
| <a id="onerror"></a> `onError?` | (`task`: [`UploadTask`](#uploadtask)) => `void` | Fired once per task reaching `'error'`. |
|
|
256
|
-
| <a id="onprogress"></a> `onProgress?` | (`task`: [`UploadTask`](#uploadtask)) => `void` | Task-shaped progress callback (see [UploadTask](#uploadtask)). |
|
|
257
|
-
| <a id="path-1"></a> `path?` | `string` | Destination folder, bucket-rooted. Default `''` (root). Wire to `usePathState().path` so uploads land in the browsed folder. |
|
|
113
|
+
Re-exports [StorageObjectStatus](pyric-ui-storage-reference-api.md#storageobjectstatus)
|
|
258
114
|
|
|
259
115
|
***
|
|
260
116
|
|
|
261
|
-
<a id="
|
|
262
|
-
|
|
263
|
-
### UseObjectUploadResult
|
|
117
|
+
<a id="storagerecursivedeleteimpl"></a>
|
|
264
118
|
|
|
265
|
-
|
|
119
|
+
### StorageRecursiveDeleteImpl
|
|
266
120
|
|
|
267
|
-
|
|
268
|
-
| :------ | :------ | :------ |
|
|
269
|
-
| <a id="clearcompleted"></a> `clearCompleted` | () => `void` | Drop settled (`success`/`error`) tasks from `tasks`. |
|
|
270
|
-
| <a id="createfolder"></a> `createFolder` | (`name`: `string`) => `Promise`\<`void`\> | Create an empty folder under the hook's `path`: writes the GCS placeholder convention — a zero-byte object named `<path>/` (trailing slash). `listAll` hides the placeholder from `items` at every level (it only surfaces as a prefix), so the folder appears in the browser with no phantom file inside. `ref()` normalizes the trailing slash away, so the placeholder is written through a structural value-object reference the sandbox accepts. Throws the underlying error after rolling back the optimistic prefix insert. ALTERNATIVE: when the store must stay free of placeholder objects (Pyric Studio's choice), use the client-side pending-prefix mechanism instead — see `pendingPrefixes.ts` for the reducer and the recorded tradeoff. |
|
|
271
|
-
| <a id="isuploading"></a> `isUploading` | `boolean` | `true` while any task is `'running'`. |
|
|
272
|
-
| <a id="tasks"></a> `tasks` | [`UploadTask`](#uploadtask)[] | Every task started by this hook instance, oldest first. |
|
|
273
|
-
| <a id="upload-1"></a> `upload` | (`input`: [`UploadInput`](#uploadinput) \| [`UploadInput`](#uploadinput)[]) => `Promise`\<[`UploadTask`](#uploadtask)[]\> | Upload one or many files. Tasks run concurrently; the promise resolves with the settled tasks once ALL finish and never rejects — per-file failures land on `task.error` (and `onError`), so one bad file doesn't mask the others. |
|
|
121
|
+
Re-exports [StorageRecursiveDeleteImpl](pyric-ui-storage-reference-api.md#storagerecursivedeleteimpl)
|
|
274
122
|
|
|
275
123
|
***
|
|
276
124
|
|
|
277
|
-
<a id="
|
|
278
|
-
|
|
279
|
-
### UsePathStateOptions
|
|
125
|
+
<a id="storagerulesgatestatus"></a>
|
|
280
126
|
|
|
281
|
-
|
|
127
|
+
### StorageRulesGateStatus
|
|
282
128
|
|
|
283
|
-
|
|
284
|
-
| :------ | :------ | :------ |
|
|
285
|
-
| <a id="defaultpath"></a> `defaultPath?` | `string` | Uncontrolled initial value. Default `''` (bucket root). |
|
|
286
|
-
| <a id="onpathchange"></a> `onPathChange?` | (`path`: `string`) => `void` | Fired with the normalized next path on every navigation. Called in both modes. |
|
|
287
|
-
| <a id="path-2"></a> `path?` | `string` | Controlled value. When provided, the hook derives everything from it and navigation calls only fire `onPathChange` — the owner owns the state (e.g. a router binding `?path=`). |
|
|
129
|
+
Re-exports [StorageRulesGateStatus](pyric-ui-storage-reference-api.md#storagerulesgatestatus)
|
|
288
130
|
|
|
289
131
|
***
|
|
290
132
|
|
|
291
|
-
<a id="
|
|
292
|
-
|
|
293
|
-
### UsePathStateResult
|
|
133
|
+
<a id="storagerulessource"></a>
|
|
294
134
|
|
|
295
|
-
|
|
135
|
+
### StorageRulesSource
|
|
296
136
|
|
|
297
|
-
|
|
298
|
-
| :------ | :------ | :------ |
|
|
299
|
-
| <a id="enter"></a> `enter` | (`nameOrPath`: `string`) => `void` | Descend into a child folder — accepts a bare name (`'sub'`) or an absolute path (`'docs/sub'`, e.g. a prefix's `fullPath`). |
|
|
300
|
-
| <a id="navigatetoindex"></a> `navigateToIndex` | (`index`: `number`) => `void` | Jump to the ancestor ending at `segments[index]` — the breadcrumb click. `navigateToIndex(-1)` (or any negative) is the root. |
|
|
301
|
-
| <a id="path-3"></a> `path` | `string` | Current normalized path. `''` is the bucket root. |
|
|
302
|
-
| <a id="segments"></a> `segments` | `string`[] | Path split into segments. `[]` at root. |
|
|
303
|
-
| <a id="setpath"></a> `setPath` | (`path`: `string`) => `void` | Jump to an absolute path (normalized). |
|
|
304
|
-
| <a id="up"></a> `up` | () => `void` | Ascend one level. No-op at root. |
|
|
137
|
+
Re-exports [StorageRulesSource](pyric-ui-storage-reference-api.md#storagerulessource)
|
|
305
138
|
|
|
306
139
|
***
|
|
307
140
|
|
|
308
|
-
<a id="
|
|
309
|
-
|
|
310
|
-
### UseStorageDeleteOptions
|
|
141
|
+
<a id="storageselectionentry"></a>
|
|
311
142
|
|
|
312
|
-
|
|
143
|
+
### StorageSelectionEntry
|
|
313
144
|
|
|
314
|
-
|
|
315
|
-
| :------ | :------ | :------ |
|
|
316
|
-
| <a id="impl"></a> `impl?` | [`StorageRecursiveDeleteImpl`](#storagerecursivedeleteimpl) | Folder-walk implementation. Default [createListAllDeleteImpl](#createlistalldeleteimpl). |
|
|
317
|
-
| <a id="list-1"></a> `list?` | `Pick`\<[`UseStorageListResult`](#usestoragelistresult), `"insertItem"` \| `"removeItem"`\> | Optimistic seam from `useStorageList`: entries vanish from the local list immediately and roll back (object → item, folder → trailing-slash prefix insert) on failure. |
|
|
145
|
+
Re-exports [StorageSelectionEntry](pyric-ui-storage-reference-api.md#storageselectionentry)
|
|
318
146
|
|
|
319
147
|
***
|
|
320
148
|
|
|
321
|
-
<a id="
|
|
322
|
-
|
|
323
|
-
### UseStorageDeleteResult
|
|
149
|
+
<a id="uploadentry"></a>
|
|
324
150
|
|
|
325
|
-
|
|
151
|
+
### UploadEntry
|
|
326
152
|
|
|
327
|
-
|
|
328
|
-
| :------ | :------ | :------ |
|
|
329
|
-
| <a id="deleteentries"></a> `deleteEntries` | (`entries`: [`StorageSelectionEntry`](#storageselectionentry)[]) => `Promise`\<[`StorageDeleteOutcome`](#storagedeleteoutcome)\> | Delete a mixed object/folder selection (objects via `deleteObject`, folders via the recursive impl), sequentially in selection order. Resolves with the outcome and never rejects — per-entry failures land in `outcome.failed` (and `error` keeps the first one for simple renders). |
|
|
330
|
-
| <a id="error-3"></a> `error` | `Error` | First failure of the current/last run. Cleared on the next call. |
|
|
331
|
-
| <a id="isrunning"></a> `isRunning` | `boolean` | - |
|
|
332
|
-
| <a id="progress"></a> `progress` | `number` | Objects deleted in the current/last run (folder walks included). |
|
|
153
|
+
Re-exports [UploadEntry](pyric-ui-storage-reference-api.md#uploadentry)
|
|
333
154
|
|
|
334
155
|
***
|
|
335
156
|
|
|
336
|
-
<a id="
|
|
337
|
-
|
|
338
|
-
### UseStorageListResult
|
|
157
|
+
<a id="uploadinput"></a>
|
|
339
158
|
|
|
340
|
-
|
|
159
|
+
### UploadInput
|
|
341
160
|
|
|
342
|
-
|
|
343
|
-
| :------ | :------ | :------ |
|
|
344
|
-
| <a id="entries"></a> `entries` | [`StorageListEntry`](#storagelistentry)[] | Folders-first merged row model. Derived from `prefixes` + `items`. |
|
|
345
|
-
| <a id="error-4"></a> `error` | `Error` | `StorageError` (with a typed `storage/<code>` on `.code`) from the sandbox. A denied list is `error.code === 'storage/unauthorized'` (ST-B2). |
|
|
346
|
-
| <a id="insertitem"></a> `insertItem` | (`fullPath`: `string`) => `void` | Optimistic seam (consumed by M3 upload / M6 bulk ops, exposed now so those hooks layer on without reshaping this one). Inserts `fullPath` into the local list immediately, applying the same prefix→folder synthesis `listAll` would: a direct child becomes an item, a deeper descendant surfaces as its first-segment folder. A trailing slash declares a folder (the GCS placeholder convention `useObjectUpload.createFolder` writes): a direct trailing-slash child inserts a prefix, not an item. No-op for paths outside the listed path, duplicates, or when `status` is `'idle'`. What each call ACTUALLY inserted is recorded (keyed by the given `fullPath`) so `removeItem` can reverse it precisely. Rollback = `removeItem` or `refresh`. |
|
|
347
|
-
| <a id="items"></a> `items` | `StorageReference`[] | Direct child objects under `path`. Sorted by `fullPath`. |
|
|
348
|
-
| <a id="prefixes"></a> `prefixes` | `StorageReference`[] | Synthetic folder prefixes under `path`. Sorted by `fullPath`. |
|
|
349
|
-
| <a id="refresh"></a> `refresh` | () => `void` | Re-run `listAll` for the current path. |
|
|
350
|
-
| <a id="removeitem"></a> `removeItem` | (`fullPath`: `string`) => `void` | Optimistic counterpart. When `fullPath` was previously given to `insertItem`, this reverses EXACTLY what that call inserted: a deep upload that synthesized a first-segment folder row removes that folder row, and an insert that was a no-op (the row already existed — e.g. a real, listed folder) removes NOTHING, so a failed upload can never delete server-truth rows. For paths never seen by `insertItem` it removes the matching item/folder row directly (the optimistic-delete use). Rollback = `refresh`. |
|
|
351
|
-
| <a id="status-1"></a> `status` | [`StorageListStatus`](#storageliststatus) | `'idle'` only when `storage` is null/undefined. |
|
|
161
|
+
Re-exports [UploadInput](pyric-ui-storage-reference-api.md#uploadinput)
|
|
352
162
|
|
|
353
163
|
***
|
|
354
164
|
|
|
355
|
-
<a id="
|
|
356
|
-
|
|
357
|
-
### UseStorageObjectResult
|
|
165
|
+
<a id="uploadtask"></a>
|
|
358
166
|
|
|
359
|
-
|
|
167
|
+
### UploadTask
|
|
360
168
|
|
|
361
|
-
|
|
362
|
-
| :------ | :------ | :------ |
|
|
363
|
-
| <a id="blob"></a> `blob` | `Blob` | - |
|
|
364
|
-
| <a id="bloberror"></a> `blobError` | `Error` | - |
|
|
365
|
-
| <a id="blobstatus"></a> `blobStatus` | [`StorageObjectStatus`](#storageobjectstatus) | Blob read state. Stays `'idle'` until `loadBlob()`, the blob is LAZY; metadata alone never downloads bytes. |
|
|
366
|
-
| <a id="bloburl"></a> `blobUrl` | `string` | `URL.createObjectURL` handle for the loaded blob, used as the local preview channel. Revoked automatically when the blob is replaced, the path changes, or the hook unmounts. |
|
|
367
|
-
| <a id="error-5"></a> `error` | `Error` | Typed `StorageError` (`storage/object-not-found`, `storage/unauthorized`, …). |
|
|
368
|
-
| <a id="loadblob"></a> `loadBlob` | () => `void` | Fetch the bytes via `getBlob`. Subsequent calls re-fetch. |
|
|
369
|
-
| <a id="metadata-2"></a> `metadata` | `any` | - |
|
|
370
|
-
| <a id="refresh-1"></a> `refresh` | () => `void` | Re-read the metadata (also resets the blob, the object may have been overwritten). |
|
|
371
|
-
| <a id="status-2"></a> `status` | [`StorageObjectStatus`](#storageobjectstatus) | Metadata read state. `'idle'` when `storage` or `path` is null. |
|
|
169
|
+
Re-exports [UploadTask](pyric-ui-storage-reference-api.md#uploadtask)
|
|
372
170
|
|
|
373
171
|
***
|
|
374
172
|
|
|
375
|
-
<a id="
|
|
173
|
+
<a id="uploadtaskstatus"></a>
|
|
376
174
|
|
|
377
|
-
###
|
|
378
|
-
|
|
379
|
-
#### Properties
|
|
175
|
+
### UploadTaskStatus
|
|
380
176
|
|
|
381
|
-
|
|
382
|
-
| :------ | :------ | :------ |
|
|
383
|
-
| <a id="identity"></a> `identity?` | `any` | Identity override. `null` is anonymous; OMIT the field to use the handle's own identity (the sandbox context's `auth`). |
|
|
384
|
-
| <a id="paths"></a> `paths?` | `string` \| readonly `string`[] | Path (or paths) to pre-evaluate into `verdicts`, keyed by the normalized path. Ad-hoc paths (e.g. browser rows) go through `verdictFor` instead — the two are the same evaluation. |
|
|
385
|
-
| <a id="rules"></a> `rules?` | `any` | Explicit rules source — raw rules text (parsed here; a malformed string surfaces as `status: 'error'`) or a pre-parsed `StorageRules` handle. Overrides the sandbox's deployed ruleset when both exist. |
|
|
386
|
-
| <a id="writeresource"></a> `writeResource?` | \{ `contentType?`: `string`; `size`: `number`; \} | The about-to-write payload bound to `request.resource` for the WRITE evaluation — pass `{ size, contentType }` when gating a specific upload so size/contentType-conditioned rules evaluate truthfully. When omitted, `request.resource` is unset, which is exactly DELETE semantics (deletes carry no inbound payload) — a rule like `request.resource.size < N` then denies, the conservative answer for uploads. |
|
|
387
|
-
| `writeResource.contentType?` | `string` | - |
|
|
388
|
-
| `writeResource.size` | `number` | - |
|
|
177
|
+
Re-exports [UploadTaskStatus](pyric-ui-storage-reference-api.md#uploadtaskstatus-1)
|
|
389
178
|
|
|
390
179
|
***
|
|
391
180
|
|
|
392
|
-
<a id="
|
|
393
|
-
|
|
394
|
-
### UseStorageRulesGateResult
|
|
181
|
+
<a id="usemetadataeditor"></a>
|
|
395
182
|
|
|
396
|
-
|
|
183
|
+
### useMetadataEditor
|
|
397
184
|
|
|
398
|
-
|
|
399
|
-
| :------ | :------ | :------ |
|
|
400
|
-
| <a id="advisory"></a> `advisory` | `boolean` | Always false: `pyric/storage` handles are sandbox mirrors. |
|
|
401
|
-
| <a id="error-6"></a> `error` | `Error` | Rules-resolution failure (e.g. a malformed `rules` string). |
|
|
402
|
-
| <a id="identity-1"></a> `identity` | `any` | The identity the verdicts evaluate under. |
|
|
403
|
-
| <a id="source"></a> `source` | [`StorageRulesSource`](#storagerulessource) | Where the active ruleset came from. |
|
|
404
|
-
| <a id="status-3"></a> `status` | [`StorageRulesGateStatus`](#storagerulesgatestatus) | `'idle'` only when `storage` is null/undefined. |
|
|
405
|
-
| <a id="verdictfor"></a> `verdictFor` | (`path`: `string`) => [`StorageGateVerdict`](#storagegateverdict) | Evaluate an arbitrary path under the current ruleset + identity. Pure and synchronous once `status` is `'ready'`; before that (and whenever no rules are reachable) it returns the allow-all verdict — the gate FAILS OPEN, because affordances are advisory and the real enforcement (sandbox throw / server denial) stays authoritative. |
|
|
406
|
-
| <a id="verdicts"></a> `verdicts` | `Record`\<`string`, [`StorageGateVerdict`](#storagegateverdict)\> | Pre-evaluated verdicts for `options.paths`, keyed by normalized path. |
|
|
185
|
+
Re-exports [useMetadataEditor](pyric-ui-storage-reference-api.md#usemetadataeditor)
|
|
407
186
|
|
|
408
187
|
***
|
|
409
188
|
|
|
410
|
-
<a id="
|
|
411
|
-
|
|
412
|
-
### UseStorageSelectionResult
|
|
413
|
-
|
|
414
|
-
#### Properties
|
|
415
|
-
|
|
416
|
-
| Property | Type | Description |
|
|
417
|
-
| :------ | :------ | :------ |
|
|
418
|
-
| <a id="clear"></a> `clear` | () => `void` | - |
|
|
419
|
-
| <a id="deselect"></a> `deselect` | (`fullPath`: `string`) => `void` | - |
|
|
420
|
-
| <a id="isselected"></a> `isSelected` | (`fullPath`: `string`) => `boolean` | - |
|
|
421
|
-
| <a id="select"></a> `select` | (`entry`: [`StorageSelectionEntry`](#storageselectionentry)) => `void` | - |
|
|
422
|
-
| <a id="selectall"></a> `selectAll` | (`entries`: [`StorageSelectionEntry`](#storageselectionentry)[]) => `void` | Replace the selection (e.g. a "select all" over `list.entries`). |
|
|
423
|
-
| <a id="selected"></a> `selected` | [`StorageSelectionEntry`](#storageselectionentry)[] | Selected entries in selection order. |
|
|
424
|
-
| <a id="size"></a> `size` | `number` | - |
|
|
425
|
-
| <a id="toggle"></a> `toggle` | (`entry`: [`StorageSelectionEntry`](#storageselectionentry)) => `void` | Add/remove — the checkbox verb. |
|
|
426
|
-
|
|
427
|
-
## Type Aliases
|
|
428
|
-
|
|
429
|
-
<a id="metadataeditoraction"></a>
|
|
430
|
-
|
|
431
|
-
### MetadataEditorAction
|
|
432
|
-
|
|
433
|
-
```ts
|
|
434
|
-
type MetadataEditorAction =
|
|
435
|
-
| {
|
|
436
|
-
type: "setContentType";
|
|
437
|
-
value: string;
|
|
438
|
-
}
|
|
439
|
-
| {
|
|
440
|
-
type: "setCacheControl";
|
|
441
|
-
value: string;
|
|
442
|
-
}
|
|
443
|
-
| {
|
|
444
|
-
id: string;
|
|
445
|
-
key: string;
|
|
446
|
-
type: "setCustomKey";
|
|
447
|
-
}
|
|
448
|
-
| {
|
|
449
|
-
id: string;
|
|
450
|
-
type: "setCustomValue";
|
|
451
|
-
value: string;
|
|
452
|
-
}
|
|
453
|
-
| {
|
|
454
|
-
key?: string;
|
|
455
|
-
type: "addCustomEntry";
|
|
456
|
-
value?: string;
|
|
457
|
-
}
|
|
458
|
-
| {
|
|
459
|
-
id: string;
|
|
460
|
-
type: "removeCustomEntry";
|
|
461
|
-
}
|
|
462
|
-
| {
|
|
463
|
-
type: "reset";
|
|
464
|
-
}
|
|
465
|
-
| {
|
|
466
|
-
type: "commit";
|
|
467
|
-
};
|
|
468
|
-
```
|
|
469
|
-
|
|
470
|
-
#### Type Declaration
|
|
471
|
-
|
|
472
|
-
```ts
|
|
473
|
-
{
|
|
474
|
-
type: "setContentType";
|
|
475
|
-
value: string;
|
|
476
|
-
}
|
|
477
|
-
```
|
|
478
|
-
|
|
479
|
-
##### type
|
|
480
|
-
|
|
481
|
-
```ts
|
|
482
|
-
type: "setContentType";
|
|
483
|
-
```
|
|
484
|
-
|
|
485
|
-
##### value
|
|
486
|
-
|
|
487
|
-
```ts
|
|
488
|
-
value: string;
|
|
489
|
-
```
|
|
490
|
-
|
|
491
|
-
```ts
|
|
492
|
-
{
|
|
493
|
-
type: "setCacheControl";
|
|
494
|
-
value: string;
|
|
495
|
-
}
|
|
496
|
-
```
|
|
497
|
-
|
|
498
|
-
##### type
|
|
499
|
-
|
|
500
|
-
```ts
|
|
501
|
-
type: "setCacheControl";
|
|
502
|
-
```
|
|
503
|
-
|
|
504
|
-
##### value
|
|
505
|
-
|
|
506
|
-
```ts
|
|
507
|
-
value: string;
|
|
508
|
-
```
|
|
509
|
-
|
|
510
|
-
```ts
|
|
511
|
-
{
|
|
512
|
-
id: string;
|
|
513
|
-
key: string;
|
|
514
|
-
type: "setCustomKey";
|
|
515
|
-
}
|
|
516
|
-
```
|
|
517
|
-
|
|
518
|
-
##### id
|
|
519
|
-
|
|
520
|
-
```ts
|
|
521
|
-
id: string;
|
|
522
|
-
```
|
|
523
|
-
|
|
524
|
-
##### key
|
|
525
|
-
|
|
526
|
-
```ts
|
|
527
|
-
key: string;
|
|
528
|
-
```
|
|
529
|
-
|
|
530
|
-
##### type
|
|
531
|
-
|
|
532
|
-
```ts
|
|
533
|
-
type: "setCustomKey";
|
|
534
|
-
```
|
|
535
|
-
|
|
536
|
-
```ts
|
|
537
|
-
{
|
|
538
|
-
id: string;
|
|
539
|
-
type: "setCustomValue";
|
|
540
|
-
value: string;
|
|
541
|
-
}
|
|
542
|
-
```
|
|
543
|
-
|
|
544
|
-
##### id
|
|
545
|
-
|
|
546
|
-
```ts
|
|
547
|
-
id: string;
|
|
548
|
-
```
|
|
549
|
-
|
|
550
|
-
##### type
|
|
551
|
-
|
|
552
|
-
```ts
|
|
553
|
-
type: "setCustomValue";
|
|
554
|
-
```
|
|
555
|
-
|
|
556
|
-
##### value
|
|
557
|
-
|
|
558
|
-
```ts
|
|
559
|
-
value: string;
|
|
560
|
-
```
|
|
561
|
-
|
|
562
|
-
```ts
|
|
563
|
-
{
|
|
564
|
-
key?: string;
|
|
565
|
-
type: "addCustomEntry";
|
|
566
|
-
value?: string;
|
|
567
|
-
}
|
|
568
|
-
```
|
|
569
|
-
|
|
570
|
-
##### key?
|
|
571
|
-
|
|
572
|
-
```ts
|
|
573
|
-
optional key: string;
|
|
574
|
-
```
|
|
575
|
-
|
|
576
|
-
##### type
|
|
577
|
-
|
|
578
|
-
```ts
|
|
579
|
-
type: "addCustomEntry";
|
|
580
|
-
```
|
|
581
|
-
|
|
582
|
-
##### value?
|
|
583
|
-
|
|
584
|
-
```ts
|
|
585
|
-
optional value: string;
|
|
586
|
-
```
|
|
587
|
-
|
|
588
|
-
```ts
|
|
589
|
-
{
|
|
590
|
-
id: string;
|
|
591
|
-
type: "removeCustomEntry";
|
|
592
|
-
}
|
|
593
|
-
```
|
|
594
|
-
|
|
595
|
-
##### id
|
|
596
|
-
|
|
597
|
-
```ts
|
|
598
|
-
id: string;
|
|
599
|
-
```
|
|
600
|
-
|
|
601
|
-
##### type
|
|
602
|
-
|
|
603
|
-
```ts
|
|
604
|
-
type: "removeCustomEntry";
|
|
605
|
-
```
|
|
606
|
-
|
|
607
|
-
```ts
|
|
608
|
-
{
|
|
609
|
-
type: "reset";
|
|
610
|
-
}
|
|
611
|
-
```
|
|
612
|
-
|
|
613
|
-
##### type
|
|
614
|
-
|
|
615
|
-
```ts
|
|
616
|
-
type: "reset";
|
|
617
|
-
```
|
|
618
|
-
|
|
619
|
-
```ts
|
|
620
|
-
{
|
|
621
|
-
type: "commit";
|
|
622
|
-
}
|
|
623
|
-
```
|
|
624
|
-
|
|
625
|
-
##### type
|
|
189
|
+
<a id="usemetadataeditoroptions"></a>
|
|
626
190
|
|
|
627
|
-
|
|
628
|
-
type: "commit";
|
|
629
|
-
```
|
|
191
|
+
### UseMetadataEditorOptions
|
|
630
192
|
|
|
631
|
-
|
|
193
|
+
Re-exports [UseMetadataEditorOptions](pyric-ui-storage-reference-api.md#usemetadataeditoroptions)
|
|
632
194
|
|
|
633
195
|
***
|
|
634
196
|
|
|
635
|
-
<a id="
|
|
197
|
+
<a id="usemetadataeditorresult"></a>
|
|
636
198
|
|
|
637
|
-
###
|
|
199
|
+
### UseMetadataEditorResult
|
|
638
200
|
|
|
639
|
-
|
|
640
|
-
type StorageListStatus = "idle" | "loading" | "success" | "error";
|
|
641
|
-
```
|
|
201
|
+
Re-exports [UseMetadataEditorResult](pyric-ui-storage-reference-api.md#usemetadataeditorresult)
|
|
642
202
|
|
|
643
203
|
***
|
|
644
204
|
|
|
645
|
-
<a id="
|
|
205
|
+
<a id="useobjectupload"></a>
|
|
646
206
|
|
|
647
|
-
###
|
|
207
|
+
### useObjectUpload
|
|
648
208
|
|
|
649
|
-
|
|
650
|
-
type StorageObjectStatus = "idle" | "loading" | "success" | "error";
|
|
651
|
-
```
|
|
209
|
+
Re-exports [useObjectUpload](pyric-ui-storage-reference-api.md#useobjectupload)
|
|
652
210
|
|
|
653
211
|
***
|
|
654
212
|
|
|
655
|
-
<a id="
|
|
213
|
+
<a id="useobjectuploadoptions"></a>
|
|
656
214
|
|
|
657
|
-
###
|
|
215
|
+
### UseObjectUploadOptions
|
|
658
216
|
|
|
659
|
-
|
|
660
|
-
type StorageRulesGateStatus = "idle" | "loading" | "ready" | "error";
|
|
661
|
-
```
|
|
217
|
+
Re-exports [UseObjectUploadOptions](pyric-ui-storage-reference-api.md#useobjectuploadoptions)
|
|
662
218
|
|
|
663
219
|
***
|
|
664
220
|
|
|
665
|
-
<a id="
|
|
666
|
-
|
|
667
|
-
### StorageRulesSource
|
|
221
|
+
<a id="useobjectuploadresult"></a>
|
|
668
222
|
|
|
669
|
-
|
|
670
|
-
type StorageRulesSource = "option" | "sandbox" | "none";
|
|
671
|
-
```
|
|
223
|
+
### UseObjectUploadResult
|
|
672
224
|
|
|
673
|
-
|
|
674
|
-
- `'option'` — the explicit `rules` option (string or pre-parsed).
|
|
675
|
-
- `'sandbox'` — the ruleset deployed on the sandbox handle
|
|
676
|
-
(`getStorageSandbox(ctx, { rules })`), read off the handle's
|
|
677
|
-
`StorageService`.
|
|
678
|
-
- `'none'` — no rules reachable. Every verdict allows
|
|
679
|
-
(open-by-default, the same semantics `pyric/storage`'s
|
|
680
|
-
enforcement layer applies when no rules are configured).
|
|
225
|
+
Re-exports [UseObjectUploadResult](pyric-ui-storage-reference-api.md#useobjectuploadresult)
|
|
681
226
|
|
|
682
227
|
***
|
|
683
228
|
|
|
684
|
-
<a id="
|
|
685
|
-
|
|
686
|
-
### UploadInput
|
|
229
|
+
<a id="usepathstate"></a>
|
|
687
230
|
|
|
688
|
-
|
|
689
|
-
type UploadInput = File | UploadEntry;
|
|
690
|
-
```
|
|
231
|
+
### usePathState
|
|
691
232
|
|
|
692
|
-
|
|
693
|
-
`webkitRelativePath` when present — folder drops keep their
|
|
694
|
-
structure — else its `name`) or explicit [UploadEntry](#uploadentry)s.
|
|
233
|
+
Re-exports [usePathState](pyric-ui-storage-reference-api.md#usepathstate)
|
|
695
234
|
|
|
696
235
|
***
|
|
697
236
|
|
|
698
|
-
<a id="
|
|
699
|
-
|
|
700
|
-
### UploadTaskStatus
|
|
701
|
-
|
|
702
|
-
```ts
|
|
703
|
-
type UploadTaskStatus = "running" | "success" | "error";
|
|
704
|
-
```
|
|
705
|
-
|
|
706
|
-
## Functions
|
|
707
|
-
|
|
708
|
-
<a id="createlistalldeleteimpl"></a>
|
|
709
|
-
|
|
710
|
-
### createListAllDeleteImpl()
|
|
711
|
-
|
|
712
|
-
```ts
|
|
713
|
-
function createListAllDeleteImpl(api?: Pick<StorageApi, "listAll" | "deleteObject">): StorageRecursiveDeleteImpl;
|
|
714
|
-
```
|
|
715
|
-
|
|
716
|
-
The default, `listAll`-driven impl: walks the prefix tree,
|
|
717
|
-
`deleteObject`s every item (yielding progress per object), then
|
|
718
|
-
sweeps each visited folder's `<path>/` placeholder so emptied
|
|
719
|
-
create-folder folders disappear too (`listAll` hides placeholders,
|
|
720
|
-
so the walk alone would leave ghost folders). Placeholder sweeps
|
|
721
|
-
are best-effort — `deletedCount` counts listed objects only.
|
|
722
|
-
|
|
723
|
-
#### Parameters
|
|
724
|
-
|
|
725
|
-
| Parameter | Type |
|
|
726
|
-
| :------ | :------ |
|
|
727
|
-
| `api?` | `Pick`\<`StorageApi`, `"listAll"` \| `"deleteObject"`\> |
|
|
237
|
+
<a id="usepathstateoptions"></a>
|
|
728
238
|
|
|
729
|
-
|
|
239
|
+
### UsePathStateOptions
|
|
730
240
|
|
|
731
|
-
[
|
|
241
|
+
Re-exports [UsePathStateOptions](pyric-ui-storage-reference-api.md#usepathstateoptions)
|
|
732
242
|
|
|
733
243
|
***
|
|
734
244
|
|
|
735
|
-
<a id="
|
|
736
|
-
|
|
737
|
-
### initMetadataEditorState()
|
|
738
|
-
|
|
739
|
-
```ts
|
|
740
|
-
function initMetadataEditorState(initial: any): MetadataEditorState;
|
|
741
|
-
```
|
|
742
|
-
|
|
743
|
-
Build the edit state from the metadata a `getMetadata` /
|
|
744
|
-
`useStorageObject` read returned.
|
|
745
|
-
|
|
746
|
-
#### Parameters
|
|
747
|
-
|
|
748
|
-
| Parameter | Type |
|
|
749
|
-
| :------ | :------ |
|
|
750
|
-
| `initial` | `any` |
|
|
245
|
+
<a id="usepathstateresult"></a>
|
|
751
246
|
|
|
752
|
-
|
|
247
|
+
### UsePathStateResult
|
|
753
248
|
|
|
754
|
-
[
|
|
249
|
+
Re-exports [UsePathStateResult](pyric-ui-storage-reference-api.md#usepathstateresult)
|
|
755
250
|
|
|
756
251
|
***
|
|
757
252
|
|
|
758
|
-
<a id="
|
|
759
|
-
|
|
760
|
-
### metadataEditorReducer()
|
|
761
|
-
|
|
762
|
-
```ts
|
|
763
|
-
function metadataEditorReducer(state: MetadataEditorState, action: MetadataEditorAction): MetadataEditorState;
|
|
764
|
-
```
|
|
765
|
-
|
|
766
|
-
Pure reducer — exported (with [initMetadataEditorState](#initmetadataeditorstate)) so
|
|
767
|
-
the edit state is testable without React, mirroring the document
|
|
768
|
-
editor's reducer/hook split.
|
|
769
|
-
|
|
770
|
-
#### Parameters
|
|
771
|
-
|
|
772
|
-
| Parameter | Type |
|
|
773
|
-
| :------ | :------ |
|
|
774
|
-
| `state` | [`MetadataEditorState`](#metadataeditorstate) |
|
|
775
|
-
| `action` | [`MetadataEditorAction`](#metadataeditoraction) |
|
|
253
|
+
<a id="usestoragedelete"></a>
|
|
776
254
|
|
|
777
|
-
|
|
255
|
+
### useStorageDelete
|
|
778
256
|
|
|
779
|
-
[
|
|
257
|
+
Re-exports [useStorageDelete](pyric-ui-storage-reference-api.md#usestoragedelete)
|
|
780
258
|
|
|
781
259
|
***
|
|
782
260
|
|
|
783
|
-
<a id="
|
|
784
|
-
|
|
785
|
-
### normalizeStoragePath()
|
|
786
|
-
|
|
787
|
-
```ts
|
|
788
|
-
function normalizeStoragePath(path: string): string;
|
|
789
|
-
```
|
|
790
|
-
|
|
791
|
-
Strip leading/trailing slashes and collapse repeats — mirrors
|
|
792
|
-
`pyric/storage`'s reference normalization so `usePathState` and
|
|
793
|
-
`useStorageList` always agree on what a path is.
|
|
794
|
-
|
|
795
|
-
#### Parameters
|
|
796
|
-
|
|
797
|
-
| Parameter | Type |
|
|
798
|
-
| :------ | :------ |
|
|
799
|
-
| `path` | `string` |
|
|
261
|
+
<a id="usestoragedeleteoptions"></a>
|
|
800
262
|
|
|
801
|
-
|
|
263
|
+
### UseStorageDeleteOptions
|
|
802
264
|
|
|
803
|
-
|
|
265
|
+
Re-exports [UseStorageDeleteOptions](pyric-ui-storage-reference-api.md#usestoragedeleteoptions)
|
|
804
266
|
|
|
805
267
|
***
|
|
806
268
|
|
|
807
|
-
<a id="
|
|
808
|
-
|
|
809
|
-
### useMetadataEditor()
|
|
810
|
-
|
|
811
|
-
```ts
|
|
812
|
-
function useMetadataEditor(
|
|
813
|
-
storage: any,
|
|
814
|
-
path: string,
|
|
815
|
-
options?: UseMetadataEditorOptions): UseMetadataEditorResult;
|
|
816
|
-
```
|
|
817
|
-
|
|
818
|
-
Headless metadata editor — the `useDocumentEditor` reducer pattern
|
|
819
|
-
over `updateMetadata`: a pure reducer owns the draft (contentType,
|
|
820
|
-
cacheControl, customMetadata k/v rows with stable ids +
|
|
821
|
-
empty/duplicate-key validation); the hook adds named dispatch
|
|
822
|
-
helpers and the save half.
|
|
823
|
-
|
|
824
|
-
#### Parameters
|
|
825
|
-
|
|
826
|
-
| Parameter | Type |
|
|
827
|
-
| :------ | :------ |
|
|
828
|
-
| `storage` | `any` |
|
|
829
|
-
| `path` | `string` |
|
|
830
|
-
| `options?` | [`UseMetadataEditorOptions`](#usemetadataeditoroptions) |
|
|
269
|
+
<a id="usestoragedeleteresult"></a>
|
|
831
270
|
|
|
832
|
-
|
|
271
|
+
### UseStorageDeleteResult
|
|
833
272
|
|
|
834
|
-
[
|
|
273
|
+
Re-exports [UseStorageDeleteResult](pyric-ui-storage-reference-api.md#usestoragedeleteresult)
|
|
835
274
|
|
|
836
275
|
***
|
|
837
276
|
|
|
838
|
-
<a id="
|
|
839
|
-
|
|
840
|
-
### useObjectUpload()
|
|
841
|
-
|
|
842
|
-
```ts
|
|
843
|
-
function useObjectUpload(storage: any, options?: UseObjectUploadOptions): UseObjectUploadResult;
|
|
844
|
-
```
|
|
845
|
-
|
|
846
|
-
Multi-file upload over the package's single Storage handle prop.
|
|
847
|
-
Headless: returns task state; render it however you like (the
|
|
848
|
-
`<UploadDropzone>` component is one producer of `upload()` calls).
|
|
849
|
-
|
|
850
|
-
Optimistic-with-rollback: with the `list` seam wired, each upload's
|
|
851
|
-
row appears in `useStorageList` immediately and disappears again if
|
|
852
|
-
the write fails (typed `StorageError` on `task.error`).
|
|
853
|
-
|
|
854
|
-
#### Parameters
|
|
855
|
-
|
|
856
|
-
| Parameter | Type |
|
|
857
|
-
| :------ | :------ |
|
|
858
|
-
| `storage` | `any` |
|
|
859
|
-
| `options?` | [`UseObjectUploadOptions`](#useobjectuploadoptions) |
|
|
277
|
+
<a id="usestoragelist"></a>
|
|
860
278
|
|
|
861
|
-
|
|
279
|
+
### useStorageList
|
|
862
280
|
|
|
863
|
-
[
|
|
281
|
+
Re-exports [useStorageList](pyric-ui-storage-reference-api.md#usestoragelist)
|
|
864
282
|
|
|
865
283
|
***
|
|
866
284
|
|
|
867
|
-
<a id="
|
|
868
|
-
|
|
869
|
-
### usePathState()
|
|
870
|
-
|
|
871
|
-
```ts
|
|
872
|
-
function usePathState(options?: UsePathStateOptions): UsePathStateResult;
|
|
873
|
-
```
|
|
874
|
-
|
|
875
|
-
Path navigation state for the storage browser. Controlled when
|
|
876
|
-
`path` is provided (the owner re-renders with the next value),
|
|
877
|
-
uncontrolled otherwise — standard React value/defaultValue
|
|
878
|
-
semantics. All emitted paths are normalized (`normalizeStoragePath`).
|
|
879
|
-
|
|
880
|
-
#### Parameters
|
|
881
|
-
|
|
882
|
-
| Parameter | Type |
|
|
883
|
-
| :------ | :------ |
|
|
884
|
-
| `options?` | [`UsePathStateOptions`](#usepathstateoptions) |
|
|
285
|
+
<a id="usestoragelistresult"></a>
|
|
885
286
|
|
|
886
|
-
|
|
287
|
+
### UseStorageListResult
|
|
887
288
|
|
|
888
|
-
[
|
|
289
|
+
Re-exports [UseStorageListResult](pyric-ui-storage-reference-api.md#usestoragelistresult)
|
|
889
290
|
|
|
890
291
|
***
|
|
891
292
|
|
|
892
|
-
<a id="
|
|
893
|
-
|
|
894
|
-
### useStorageDelete()
|
|
895
|
-
|
|
896
|
-
```ts
|
|
897
|
-
function useStorageDelete(storage: any, options?: UseStorageDeleteOptions): UseStorageDeleteResult;
|
|
898
|
-
```
|
|
899
|
-
|
|
900
|
-
Drive bulk + recursive deletes from a React component — the
|
|
901
|
-
storage counterpart of `useRecursiveDelete` (same progress /
|
|
902
|
-
isRunning / error shape, same stale-run generation token), bulk
|
|
903
|
-
because storage selections are flat multi-row affairs.
|
|
904
|
-
|
|
905
|
-
#### Parameters
|
|
906
|
-
|
|
907
|
-
| Parameter | Type |
|
|
908
|
-
| :------ | :------ |
|
|
909
|
-
| `storage` | `any` |
|
|
910
|
-
| `options?` | [`UseStorageDeleteOptions`](#usestoragedeleteoptions) |
|
|
293
|
+
<a id="usestorageobject"></a>
|
|
911
294
|
|
|
912
|
-
|
|
295
|
+
### useStorageObject
|
|
913
296
|
|
|
914
|
-
[
|
|
297
|
+
Re-exports [useStorageObject](pyric-ui-storage-reference-api.md#usestorageobject)
|
|
915
298
|
|
|
916
299
|
***
|
|
917
300
|
|
|
918
|
-
<a id="
|
|
919
|
-
|
|
920
|
-
### useStorageList()
|
|
921
|
-
|
|
922
|
-
```ts
|
|
923
|
-
function useStorageList(storage: any, path: string): UseStorageListResult;
|
|
924
|
-
```
|
|
925
|
-
|
|
926
|
-
List the objects + synthetic folders directly under `path` :
|
|
927
|
-
`listAll` over the package's sandbox Storage handle. Read-via-get,
|
|
928
|
-
not realtime: the list updates on `refresh`, path change, or the
|
|
929
|
-
optimistic seam. Pass `''` (or the result of `usePathState`) for
|
|
930
|
-
the bucket root.
|
|
931
|
-
|
|
932
|
-
`listAll` has no pagination; a very large prefix arrives as one flat
|
|
933
|
-
result (virtualize the rendering, which `<ObjectBrowser>` does).
|
|
934
|
-
|
|
935
|
-
#### Parameters
|
|
936
|
-
|
|
937
|
-
| Parameter | Type |
|
|
938
|
-
| :------ | :------ |
|
|
939
|
-
| `storage` | `any` |
|
|
940
|
-
| `path` | `string` |
|
|
301
|
+
<a id="usestorageobjectresult"></a>
|
|
941
302
|
|
|
942
|
-
|
|
303
|
+
### UseStorageObjectResult
|
|
943
304
|
|
|
944
|
-
[
|
|
305
|
+
Re-exports [UseStorageObjectResult](pyric-ui-storage-reference-api.md#usestorageobjectresult)
|
|
945
306
|
|
|
946
307
|
***
|
|
947
308
|
|
|
948
|
-
<a id="
|
|
949
|
-
|
|
950
|
-
### useStorageObject()
|
|
951
|
-
|
|
952
|
-
```ts
|
|
953
|
-
function useStorageObject(storage: any, path: string): UseStorageObjectResult;
|
|
954
|
-
```
|
|
955
|
-
|
|
956
|
-
One object's metadata + lazily-loaded bytes, the data source for
|
|
957
|
-
`<ObjectInspector>`. Read-via-get like the rest of the storage
|
|
958
|
-
half: updates on `refresh`, `path` change, or `loadBlob`.
|
|
959
|
-
|
|
960
|
-
#### Parameters
|
|
961
|
-
|
|
962
|
-
| Parameter | Type |
|
|
963
|
-
| :------ | :------ |
|
|
964
|
-
| `storage` | `any` |
|
|
965
|
-
| `path` | `string` |
|
|
309
|
+
<a id="usestoragerulesgate"></a>
|
|
966
310
|
|
|
967
|
-
|
|
311
|
+
### useStorageRulesGate
|
|
968
312
|
|
|
969
|
-
[
|
|
313
|
+
Re-exports [useStorageRulesGate](pyric-ui-storage-reference-api.md#usestoragerulesgate)
|
|
970
314
|
|
|
971
315
|
***
|
|
972
316
|
|
|
973
|
-
<a id="
|
|
974
|
-
|
|
975
|
-
### useStorageRulesGate()
|
|
976
|
-
|
|
977
|
-
```ts
|
|
978
|
-
function useStorageRulesGate(storage: any, options?: UseStorageRulesGateOptions): UseStorageRulesGateResult;
|
|
979
|
-
```
|
|
980
|
-
|
|
981
|
-
Pre-flight rules evaluation — the M7 differentiator. Evaluates the
|
|
982
|
-
current identity against paths BEFORE the click, so components can
|
|
983
|
-
annotate denied affordances (`data-pyric-denied`, disabled-with-
|
|
984
|
-
reason) instead of letting the user discover a denial via a thrown
|
|
985
|
-
`storage/unauthorized`.
|
|
317
|
+
<a id="usestoragerulesgateoptions"></a>
|
|
986
318
|
|
|
987
|
-
|
|
988
|
-
(`getStorageSandbox(ctx, { rules })` parses it into the handle's
|
|
989
|
-
`StorageService`) — the hook reads it through the handle's target,
|
|
990
|
-
so sandbox callers pass nothing. Identity likewise defaults to the
|
|
991
|
-
handle's `SandboxContext.auth`. An explicit `rules` or `identity`
|
|
992
|
-
option overrides the handle when evaluating a what-if scenario.
|
|
319
|
+
### UseStorageRulesGateOptions
|
|
993
320
|
|
|
994
|
-
|
|
995
|
-
`resource` (the existing object) is bound as `null` — the gate
|
|
996
|
-
pre-evaluates without fetching per-path metadata, matching how the
|
|
997
|
-
sandbox enforces `listAll`. Rules conditioned on existing-object
|
|
998
|
-
state (`resource.*`) evaluate as if the object doesn't exist; the
|
|
999
|
-
common identity/path/payload-shaped rules evaluate exactly.
|
|
321
|
+
Re-exports [UseStorageRulesGateOptions](pyric-ui-storage-reference-api.md#usestoragerulesgateoptions)
|
|
1000
322
|
|
|
1001
|
-
|
|
323
|
+
***
|
|
1002
324
|
|
|
1003
|
-
|
|
1004
|
-
| :------ | :------ |
|
|
1005
|
-
| `storage` | `any` |
|
|
1006
|
-
| `options?` | [`UseStorageRulesGateOptions`](#usestoragerulesgateoptions) |
|
|
325
|
+
<a id="usestoragerulesgateresult"></a>
|
|
1007
326
|
|
|
1008
|
-
|
|
327
|
+
### UseStorageRulesGateResult
|
|
1009
328
|
|
|
1010
|
-
[
|
|
329
|
+
Re-exports [UseStorageRulesGateResult](pyric-ui-storage-reference-api.md#usestoragerulesgateresult)
|
|
1011
330
|
|
|
1012
331
|
***
|
|
1013
332
|
|
|
1014
333
|
<a id="usestorageselection"></a>
|
|
1015
334
|
|
|
1016
|
-
### useStorageSelection
|
|
335
|
+
### useStorageSelection
|
|
1017
336
|
|
|
1018
|
-
|
|
1019
|
-
function useStorageSelection(): UseStorageSelectionResult;
|
|
1020
|
-
```
|
|
337
|
+
Re-exports [useStorageSelection](pyric-ui-storage-reference-api.md#usestorageselection)
|
|
1021
338
|
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
consumer owns that policy.
|
|
339
|
+
***
|
|
340
|
+
|
|
341
|
+
<a id="usestorageselectionresult"></a>
|
|
1026
342
|
|
|
1027
|
-
|
|
343
|
+
### UseStorageSelectionResult
|
|
1028
344
|
|
|
1029
|
-
[
|
|
345
|
+
Re-exports [UseStorageSelectionResult](pyric-ui-storage-reference-api.md#usestorageselectionresult)
|