@vibesdotdev/storage 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +75 -0
- package/SPEC.md +60 -0
- package/dist/adapters/index.d.ts +14 -0
- package/dist/adapters/index.d.ts.map +1 -0
- package/dist/adapters/index.js +15 -0
- package/dist/adapters/index.js.map +1 -0
- package/dist/bridge/index.d.ts +3 -0
- package/dist/bridge/index.d.ts.map +1 -0
- package/dist/bridge/index.js +2 -0
- package/dist/bridge/index.js.map +1 -0
- package/dist/bridge/storage-kind-bridge.d.ts +27 -0
- package/dist/bridge/storage-kind-bridge.d.ts.map +1 -0
- package/dist/bridge/storage-kind-bridge.js +110 -0
- package/dist/bridge/storage-kind-bridge.js.map +1 -0
- package/dist/bridge/types.d.ts +45 -0
- package/dist/bridge/types.d.ts.map +1 -0
- package/dist/bridge/types.js +8 -0
- package/dist/bridge/types.js.map +1 -0
- package/dist/cli/commands/list/storage.list.cli-command.descriptor.d.ts +4 -0
- package/dist/cli/commands/list/storage.list.cli-command.descriptor.d.ts.map +1 -0
- package/dist/cli/commands/list/storage.list.cli-command.descriptor.js +18 -0
- package/dist/cli/commands/list/storage.list.cli-command.descriptor.js.map +1 -0
- package/dist/cli/commands/list/storage.list.cli-command.impl.d.ts +11 -0
- package/dist/cli/commands/list/storage.list.cli-command.impl.d.ts.map +1 -0
- package/dist/cli/commands/list/storage.list.cli-command.impl.js +48 -0
- package/dist/cli/commands/list/storage.list.cli-command.impl.js.map +1 -0
- package/dist/cli/commands/sync/pull/storage.sync.pull.cli-command.descriptor.d.ts +4 -0
- package/dist/cli/commands/sync/pull/storage.sync.pull.cli-command.descriptor.d.ts.map +1 -0
- package/dist/cli/commands/sync/pull/storage.sync.pull.cli-command.descriptor.js +26 -0
- package/dist/cli/commands/sync/pull/storage.sync.pull.cli-command.descriptor.js.map +1 -0
- package/dist/cli/commands/sync/pull/storage.sync.pull.cli-command.impl.d.ts +13 -0
- package/dist/cli/commands/sync/pull/storage.sync.pull.cli-command.impl.d.ts.map +1 -0
- package/dist/cli/commands/sync/pull/storage.sync.pull.cli-command.impl.js +136 -0
- package/dist/cli/commands/sync/pull/storage.sync.pull.cli-command.impl.js.map +1 -0
- package/dist/cli/commands/sync/push/storage.sync.push.cli-command.descriptor.d.ts +4 -0
- package/dist/cli/commands/sync/push/storage.sync.push.cli-command.descriptor.d.ts.map +1 -0
- package/dist/cli/commands/sync/push/storage.sync.push.cli-command.descriptor.js +26 -0
- package/dist/cli/commands/sync/push/storage.sync.push.cli-command.descriptor.js.map +1 -0
- package/dist/cli/commands/sync/push/storage.sync.push.cli-command.impl.d.ts +13 -0
- package/dist/cli/commands/sync/push/storage.sync.push.cli-command.impl.d.ts.map +1 -0
- package/dist/cli/commands/sync/push/storage.sync.push.cli-command.impl.js +165 -0
- package/dist/cli/commands/sync/push/storage.sync.push.cli-command.impl.js.map +1 -0
- package/dist/cli/commands/sync/resolve/storage.sync.resolve.cli-command.descriptor.d.ts +4 -0
- package/dist/cli/commands/sync/resolve/storage.sync.resolve.cli-command.descriptor.d.ts.map +1 -0
- package/dist/cli/commands/sync/resolve/storage.sync.resolve.cli-command.descriptor.js +20 -0
- package/dist/cli/commands/sync/resolve/storage.sync.resolve.cli-command.descriptor.js.map +1 -0
- package/dist/cli/commands/sync/resolve/storage.sync.resolve.cli-command.impl.d.ts +12 -0
- package/dist/cli/commands/sync/resolve/storage.sync.resolve.cli-command.impl.d.ts.map +1 -0
- package/dist/cli/commands/sync/resolve/storage.sync.resolve.cli-command.impl.js +95 -0
- package/dist/cli/commands/sync/resolve/storage.sync.resolve.cli-command.impl.js.map +1 -0
- package/dist/cli/commands/sync/status/storage.sync.status.cli-command.descriptor.d.ts +4 -0
- package/dist/cli/commands/sync/status/storage.sync.status.cli-command.descriptor.d.ts.map +1 -0
- package/dist/cli/commands/sync/status/storage.sync.status.cli-command.descriptor.js +15 -0
- package/dist/cli/commands/sync/status/storage.sync.status.cli-command.descriptor.js.map +1 -0
- package/dist/cli/commands/sync/status/storage.sync.status.cli-command.impl.d.ts +13 -0
- package/dist/cli/commands/sync/status/storage.sync.status.cli-command.impl.d.ts.map +1 -0
- package/dist/cli/commands/sync/status/storage.sync.status.cli-command.impl.js +150 -0
- package/dist/cli/commands/sync/status/storage.sync.status.cli-command.impl.js.map +1 -0
- package/dist/cli/context.consumer.d.ts +26 -0
- package/dist/cli/context.consumer.d.ts.map +1 -0
- package/dist/cli/context.consumer.js +164 -0
- package/dist/cli/context.consumer.js.map +1 -0
- package/dist/cli/storage.cli-group.descriptor.d.ts +4 -0
- package/dist/cli/storage.cli-group.descriptor.d.ts.map +1 -0
- package/dist/cli/storage.cli-group.descriptor.js +11 -0
- package/dist/cli/storage.cli-group.descriptor.js.map +1 -0
- package/dist/cli/storage.sync.cli-group.descriptor.d.ts +4 -0
- package/dist/cli/storage.sync.cli-group.descriptor.d.ts.map +1 -0
- package/dist/cli/storage.sync.cli-group.descriptor.js +12 -0
- package/dist/cli/storage.sync.cli-group.descriptor.js.map +1 -0
- package/dist/cli/types.d.ts +26 -0
- package/dist/cli/types.d.ts.map +1 -0
- package/dist/cli/types.js +11 -0
- package/dist/cli/types.js.map +1 -0
- package/dist/client/index.d.ts +10 -0
- package/dist/client/index.d.ts.map +1 -0
- package/dist/client/index.js +10 -0
- package/dist/client/index.js.map +1 -0
- package/dist/client/list-browsable-adapters.d.ts +31 -0
- package/dist/client/list-browsable-adapters.d.ts.map +1 -0
- package/dist/client/list-browsable-adapters.js +40 -0
- package/dist/client/list-browsable-adapters.js.map +1 -0
- package/dist/daemon/commands/sync.d.ts +23 -0
- package/dist/daemon/commands/sync.d.ts.map +1 -0
- package/dist/daemon/commands/sync.js +169 -0
- package/dist/daemon/commands/sync.js.map +1 -0
- package/dist/docs/adapters.docs.descriptor.d.ts +4 -0
- package/dist/docs/adapters.docs.descriptor.d.ts.map +1 -0
- package/dist/docs/adapters.docs.descriptor.js +223 -0
- package/dist/docs/adapters.docs.descriptor.js.map +1 -0
- package/dist/docs/manifests.docs.descriptor.d.ts +4 -0
- package/dist/docs/manifests.docs.descriptor.d.ts.map +1 -0
- package/dist/docs/manifests.docs.descriptor.js +316 -0
- package/dist/docs/manifests.docs.descriptor.js.map +1 -0
- package/dist/docs/records.docs.descriptor.d.ts +4 -0
- package/dist/docs/records.docs.descriptor.d.ts.map +1 -0
- package/dist/docs/records.docs.descriptor.js +269 -0
- package/dist/docs/records.docs.descriptor.js.map +1 -0
- package/dist/docs/sync.docs.descriptor.d.ts +4 -0
- package/dist/docs/sync.docs.descriptor.d.ts.map +1 -0
- package/dist/docs/sync.docs.descriptor.js +279 -0
- package/dist/docs/sync.docs.descriptor.js.map +1 -0
- package/dist/index.d.ts +27 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +29 -0
- package/dist/index.js.map +1 -0
- package/dist/interfaces/adapter.d.ts +382 -0
- package/dist/interfaces/adapter.d.ts.map +1 -0
- package/dist/interfaces/adapter.js +11 -0
- package/dist/interfaces/adapter.js.map +1 -0
- package/dist/interfaces/document-store.d.ts +62 -0
- package/dist/interfaces/document-store.d.ts.map +1 -0
- package/dist/interfaces/document-store.js +8 -0
- package/dist/interfaces/document-store.js.map +1 -0
- package/dist/interfaces/index.d.ts +17 -0
- package/dist/interfaces/index.d.ts.map +1 -0
- package/dist/interfaces/index.js +24 -0
- package/dist/interfaces/index.js.map +1 -0
- package/dist/interfaces/key-value.d.ts +95 -0
- package/dist/interfaces/key-value.d.ts.map +1 -0
- package/dist/interfaces/key-value.js +8 -0
- package/dist/interfaces/key-value.js.map +1 -0
- package/dist/interfaces/query-builder.d.ts +31 -0
- package/dist/interfaces/query-builder.d.ts.map +1 -0
- package/dist/interfaces/query-builder.js +11 -0
- package/dist/interfaces/query-builder.js.map +1 -0
- package/dist/interfaces/record/index.d.ts +7 -0
- package/dist/interfaces/record/index.d.ts.map +1 -0
- package/dist/interfaces/record/index.js +7 -0
- package/dist/interfaces/record/index.js.map +1 -0
- package/dist/interfaces/record/interface.d.ts +593 -0
- package/dist/interfaces/record/interface.d.ts.map +1 -0
- package/dist/interfaces/record/interface.js +49 -0
- package/dist/interfaces/record/interface.js.map +1 -0
- package/dist/interfaces/repository.d.ts +262 -0
- package/dist/interfaces/repository.d.ts.map +1 -0
- package/dist/interfaces/repository.js +8 -0
- package/dist/interfaces/repository.js.map +1 -0
- package/dist/interfaces/schema/index.d.ts +8 -0
- package/dist/interfaces/schema/index.d.ts.map +1 -0
- package/dist/interfaces/schema/index.js +10 -0
- package/dist/interfaces/schema/index.js.map +1 -0
- package/dist/interfaces/schema/schema-interface.d.ts +516 -0
- package/dist/interfaces/schema/schema-interface.d.ts.map +1 -0
- package/dist/interfaces/schema/schema-interface.js +31 -0
- package/dist/interfaces/schema/schema-interface.js.map +1 -0
- package/dist/interfaces/schema/table-interface.d.ts +250 -0
- package/dist/interfaces/schema/table-interface.d.ts.map +1 -0
- package/dist/interfaces/schema/table-interface.js +31 -0
- package/dist/interfaces/schema/table-interface.js.map +1 -0
- package/dist/interfaces/storage-consumer-fs.d.ts +40 -0
- package/dist/interfaces/storage-consumer-fs.d.ts.map +1 -0
- package/dist/interfaces/storage-consumer-fs.js +42 -0
- package/dist/interfaces/storage-consumer-fs.js.map +1 -0
- package/dist/manifest/base.d.ts +187 -0
- package/dist/manifest/base.d.ts.map +1 -0
- package/dist/manifest/base.js +516 -0
- package/dist/manifest/base.js.map +1 -0
- package/dist/manifest/cloud-sync.consumer.d.ts +7 -0
- package/dist/manifest/cloud-sync.consumer.d.ts.map +1 -0
- package/dist/manifest/cloud-sync.consumer.js +82 -0
- package/dist/manifest/cloud-sync.consumer.js.map +1 -0
- package/dist/manifest/index.d.ts +7 -0
- package/dist/manifest/index.d.ts.map +1 -0
- package/dist/manifest/index.js +7 -0
- package/dist/manifest/index.js.map +1 -0
- package/dist/manifest/source-policy.d.ts +8 -0
- package/dist/manifest/source-policy.d.ts.map +1 -0
- package/dist/manifest/source-policy.js +62 -0
- package/dist/manifest/source-policy.js.map +1 -0
- package/dist/paths.d.ts +6 -0
- package/dist/paths.d.ts.map +1 -0
- package/dist/paths.js +152 -0
- package/dist/paths.js.map +1 -0
- package/dist/policy/context.d.ts +9 -0
- package/dist/policy/context.d.ts.map +1 -0
- package/dist/policy/context.js +29 -0
- package/dist/policy/context.js.map +1 -0
- package/dist/policy/index.d.ts +4 -0
- package/dist/policy/index.d.ts.map +1 -0
- package/dist/policy/index.js +4 -0
- package/dist/policy/index.js.map +1 -0
- package/dist/policy/overrides.d.ts +40 -0
- package/dist/policy/overrides.d.ts.map +1 -0
- package/dist/policy/overrides.js +37 -0
- package/dist/policy/overrides.js.map +1 -0
- package/dist/policy/persistence.d.ts +38 -0
- package/dist/policy/persistence.d.ts.map +1 -0
- package/dist/policy/persistence.js +65 -0
- package/dist/policy/persistence.js.map +1 -0
- package/dist/policy/types.d.ts +21 -0
- package/dist/policy/types.d.ts.map +1 -0
- package/dist/policy/types.js +7 -0
- package/dist/policy/types.js.map +1 -0
- package/dist/record/base.d.ts +186 -0
- package/dist/record/base.d.ts.map +1 -0
- package/dist/record/base.js +1437 -0
- package/dist/record/base.js.map +1 -0
- package/dist/record/events.d.ts +71 -0
- package/dist/record/events.d.ts.map +1 -0
- package/dist/record/events.js +52 -0
- package/dist/record/events.js.map +1 -0
- package/dist/record/extensions.d.ts +51 -0
- package/dist/record/extensions.d.ts.map +1 -0
- package/dist/record/extensions.js +222 -0
- package/dist/record/extensions.js.map +1 -0
- package/dist/record/index.d.ts +7 -0
- package/dist/record/index.d.ts.map +1 -0
- package/dist/record/index.js +7 -0
- package/dist/record/index.js.map +1 -0
- package/dist/resolver/storage-backed-resolver.d.ts +23 -0
- package/dist/resolver/storage-backed-resolver.d.ts.map +1 -0
- package/dist/resolver/storage-backed-resolver.js +187 -0
- package/dist/resolver/storage-backed-resolver.js.map +1 -0
- package/dist/schemas/adapter-descriptor.d.ts +108 -0
- package/dist/schemas/adapter-descriptor.d.ts.map +1 -0
- package/dist/schemas/adapter-descriptor.js +101 -0
- package/dist/schemas/adapter-descriptor.js.map +1 -0
- package/dist/schemas/index.d.ts +14 -0
- package/dist/schemas/index.d.ts.map +1 -0
- package/dist/schemas/index.js +12 -0
- package/dist/schemas/index.js.map +1 -0
- package/dist/schemas/manifest-descriptor.d.ts +110 -0
- package/dist/schemas/manifest-descriptor.d.ts.map +1 -0
- package/dist/schemas/manifest-descriptor.js +114 -0
- package/dist/schemas/manifest-descriptor.js.map +1 -0
- package/dist/schemas/record/descriptor.d.ts +570 -0
- package/dist/schemas/record/descriptor.d.ts.map +1 -0
- package/dist/schemas/record/descriptor.js +389 -0
- package/dist/schemas/record/descriptor.js.map +1 -0
- package/dist/schemas/record/index.d.ts +8 -0
- package/dist/schemas/record/index.d.ts.map +1 -0
- package/dist/schemas/record/index.js +7 -0
- package/dist/schemas/record/index.js.map +1 -0
- package/dist/schemas/record/relation.d.ts +36 -0
- package/dist/schemas/record/relation.d.ts.map +1 -0
- package/dist/schemas/record/relation.js +37 -0
- package/dist/schemas/record/relation.js.map +1 -0
- package/dist/schemas/schema/descriptor.d.ts +231 -0
- package/dist/schemas/schema/descriptor.d.ts.map +1 -0
- package/dist/schemas/schema/descriptor.js +205 -0
- package/dist/schemas/schema/descriptor.js.map +1 -0
- package/dist/schemas/schema/index.d.ts +7 -0
- package/dist/schemas/schema/index.d.ts.map +1 -0
- package/dist/schemas/schema/index.js +7 -0
- package/dist/schemas/schema/index.js.map +1 -0
- package/dist/schemas/sync-bridge-descriptor.d.ts +124 -0
- package/dist/schemas/sync-bridge-descriptor.d.ts.map +1 -0
- package/dist/schemas/sync-bridge-descriptor.js +67 -0
- package/dist/schemas/sync-bridge-descriptor.js.map +1 -0
- package/dist/server/manifest-route.d.ts +92 -0
- package/dist/server/manifest-route.d.ts.map +1 -0
- package/dist/server/manifest-route.js +226 -0
- package/dist/server/manifest-route.js.map +1 -0
- package/dist/storage-policy.context.descriptor.d.ts +16 -0
- package/dist/storage-policy.context.descriptor.d.ts.map +1 -0
- package/dist/storage-policy.context.descriptor.js +16 -0
- package/dist/storage-policy.context.descriptor.js.map +1 -0
- package/dist/storage-policy.context.server.d.ts +14 -0
- package/dist/storage-policy.context.server.d.ts.map +1 -0
- package/dist/storage-policy.context.server.js +27 -0
- package/dist/storage-policy.context.server.js.map +1 -0
- package/dist/storage.plugin.d.ts +38 -0
- package/dist/storage.plugin.d.ts.map +1 -0
- package/dist/storage.plugin.js +204 -0
- package/dist/storage.plugin.js.map +1 -0
- package/dist/sync/cloud-pull.d.ts +15 -0
- package/dist/sync/cloud-pull.d.ts.map +1 -0
- package/dist/sync/cloud-pull.js +130 -0
- package/dist/sync/cloud-pull.js.map +1 -0
- package/dist/sync/cloud-record-crud-config.d.ts +19 -0
- package/dist/sync/cloud-record-crud-config.d.ts.map +1 -0
- package/dist/sync/cloud-record-crud-config.js +22 -0
- package/dist/sync/cloud-record-crud-config.js.map +1 -0
- package/dist/sync/record-sync-bridge.d.ts +5 -0
- package/dist/sync/record-sync-bridge.d.ts.map +1 -0
- package/dist/sync/record-sync-bridge.js +121 -0
- package/dist/sync/record-sync-bridge.js.map +1 -0
- package/dist/sync/resolve-sync-target.d.ts +23 -0
- package/dist/sync/resolve-sync-target.d.ts.map +1 -0
- package/dist/sync/resolve-sync-target.js +45 -0
- package/dist/sync/resolve-sync-target.js.map +1 -0
- package/dist/sync/schemas/cloud-pull.d.ts +25 -0
- package/dist/sync/schemas/cloud-pull.d.ts.map +1 -0
- package/dist/sync/schemas/cloud-pull.js +7 -0
- package/dist/sync/schemas/cloud-pull.js.map +1 -0
- package/dist/sync/schemas/index.d.ts +9 -0
- package/dist/sync/schemas/index.d.ts.map +1 -0
- package/dist/sync/schemas/index.js +9 -0
- package/dist/sync/schemas/index.js.map +1 -0
- package/dist/sync/schemas/sync-helpers.d.ts +17 -0
- package/dist/sync/schemas/sync-helpers.d.ts.map +1 -0
- package/dist/sync/schemas/sync-helpers.js +7 -0
- package/dist/sync/schemas/sync-helpers.js.map +1 -0
- package/dist/sync/schemas/sync-state.d.ts +65 -0
- package/dist/sync/schemas/sync-state.d.ts.map +1 -0
- package/dist/sync/schemas/sync-state.js +32 -0
- package/dist/sync/schemas/sync-state.js.map +1 -0
- package/dist/sync/sync-bridge.d.ts +80 -0
- package/dist/sync/sync-bridge.d.ts.map +1 -0
- package/dist/sync/sync-bridge.js +617 -0
- package/dist/sync/sync-bridge.js.map +1 -0
- package/dist/sync/sync-manifest.d.ts +20 -0
- package/dist/sync/sync-manifest.d.ts.map +1 -0
- package/dist/sync/sync-manifest.js +140 -0
- package/dist/sync/sync-manifest.js.map +1 -0
- package/dist/sync/sync-state.consumer.d.ts +23 -0
- package/dist/sync/sync-state.consumer.d.ts.map +1 -0
- package/dist/sync/sync-state.consumer.js +111 -0
- package/dist/sync/sync-state.consumer.js.map +1 -0
- package/dist/transform/index.d.ts +75 -0
- package/dist/transform/index.d.ts.map +1 -0
- package/dist/transform/index.js +81 -0
- package/dist/transform/index.js.map +1 -0
- package/dist/transform/transform-descriptor.d.ts +51 -0
- package/dist/transform/transform-descriptor.d.ts.map +1 -0
- package/dist/transform/transform-descriptor.js +30 -0
- package/dist/transform/transform-descriptor.js.map +1 -0
- package/dist/tui/storage-explorer.descriptor.d.ts +14 -0
- package/dist/tui/storage-explorer.descriptor.d.ts.map +1 -0
- package/dist/tui/storage-explorer.descriptor.js +29 -0
- package/dist/tui/storage-explorer.descriptor.js.map +1 -0
- package/dist/tui/storage-explorer.impl.consumer.d.ts +11 -0
- package/dist/tui/storage-explorer.impl.consumer.d.ts.map +1 -0
- package/dist/tui/storage-explorer.impl.consumer.js +13 -0
- package/dist/tui/storage-explorer.impl.consumer.js.map +1 -0
- package/dist/tui/storage-open.descriptor.d.ts +14 -0
- package/dist/tui/storage-open.descriptor.d.ts.map +1 -0
- package/dist/tui/storage-open.descriptor.js +28 -0
- package/dist/tui/storage-open.descriptor.js.map +1 -0
- package/dist/tui/storage-open.impl.consumer.d.ts +11 -0
- package/dist/tui/storage-open.impl.consumer.d.ts.map +1 -0
- package/dist/tui/storage-open.impl.consumer.js +13 -0
- package/dist/tui/storage-open.impl.consumer.js.map +1 -0
- package/dist/utils/error-context.d.ts +2 -0
- package/dist/utils/error-context.d.ts.map +1 -0
- package/dist/utils/error-context.js +17 -0
- package/dist/utils/error-context.js.map +1 -0
- package/package.json +241 -0
- package/src/adapters/index.ts +13 -0
- package/src/bridge/index.ts +2 -0
- package/src/bridge/storage-kind-bridge.ts +131 -0
- package/src/bridge/types.ts +46 -0
- package/src/cli/commands/list/storage.list.cli-command.descriptor.ts +20 -0
- package/src/cli/commands/list/storage.list.cli-command.impl.ts +72 -0
- package/src/cli/commands/sync/pull/storage.sync.pull.cli-command.descriptor.ts +28 -0
- package/src/cli/commands/sync/pull/storage.sync.pull.cli-command.impl.ts +171 -0
- package/src/cli/commands/sync/push/storage.sync.push.cli-command.descriptor.ts +28 -0
- package/src/cli/commands/sync/push/storage.sync.push.cli-command.impl.ts +213 -0
- package/src/cli/commands/sync/resolve/storage.sync.resolve.cli-command.descriptor.ts +22 -0
- package/src/cli/commands/sync/resolve/storage.sync.resolve.cli-command.impl.ts +129 -0
- package/src/cli/commands/sync/status/storage.sync.status.cli-command.descriptor.ts +17 -0
- package/src/cli/commands/sync/status/storage.sync.status.cli-command.impl.ts +192 -0
- package/src/cli/context.consumer.ts +195 -0
- package/src/cli/storage.cli-group.descriptor.ts +13 -0
- package/src/cli/storage.sync.cli-group.descriptor.ts +14 -0
- package/src/cli/types.ts +25 -0
- package/src/client/index.ts +10 -0
- package/src/client/list-browsable-adapters.ts +42 -0
- package/src/daemon/commands/sync.ts +225 -0
- package/src/docs/adapters.docs.descriptor.ts +225 -0
- package/src/docs/manifests.docs.descriptor.ts +318 -0
- package/src/docs/records.docs.descriptor.ts +271 -0
- package/src/docs/sync.docs.descriptor.ts +281 -0
- package/src/index.ts +109 -0
- package/src/interfaces/adapter.ts +451 -0
- package/src/interfaces/document-store.ts +74 -0
- package/src/interfaces/index.ts +117 -0
- package/src/interfaces/key-value.ts +112 -0
- package/src/interfaces/query-builder.ts +31 -0
- package/src/interfaces/record/index.ts +58 -0
- package/src/interfaces/record/interface.ts +723 -0
- package/src/interfaces/repository.ts +300 -0
- package/src/interfaces/schema/index.ts +37 -0
- package/src/interfaces/schema/schema-interface.ts +586 -0
- package/src/interfaces/schema/table-interface.ts +314 -0
- package/src/interfaces/storage-consumer-fs.ts +66 -0
- package/src/manifest/base.ts +594 -0
- package/src/manifest/cloud-sync.consumer.ts +120 -0
- package/src/manifest/index.ts +7 -0
- package/src/manifest/source-policy.ts +74 -0
- package/src/paths.ts +171 -0
- package/src/policy/context.ts +30 -0
- package/src/policy/index.ts +20 -0
- package/src/policy/overrides.ts +46 -0
- package/src/policy/persistence.ts +117 -0
- package/src/policy/types.ts +28 -0
- package/src/record/base.ts +1872 -0
- package/src/record/events.ts +56 -0
- package/src/record/extensions.ts +308 -0
- package/src/record/index.ts +7 -0
- package/src/resolver/storage-backed-resolver.ts +255 -0
- package/src/schemas/adapter-descriptor.ts +128 -0
- package/src/schemas/index.ts +104 -0
- package/src/schemas/manifest-descriptor.ts +143 -0
- package/src/schemas/record/descriptor.ts +621 -0
- package/src/schemas/record/index.ts +60 -0
- package/src/schemas/record/relation.ts +49 -0
- package/src/schemas/schema/descriptor.ts +278 -0
- package/src/schemas/schema/index.ts +14 -0
- package/src/schemas/sync-bridge-descriptor.ts +143 -0
- package/src/server/manifest-route.ts +319 -0
- package/src/storage-policy.context.descriptor.ts +17 -0
- package/src/storage-policy.context.server.ts +34 -0
- package/src/storage.plugin.ts +264 -0
- package/src/sync/cloud-pull.ts +202 -0
- package/src/sync/cloud-record-crud-config.ts +41 -0
- package/src/sync/record-sync-bridge.ts +183 -0
- package/src/sync/resolve-sync-target.ts +57 -0
- package/src/sync/schemas/cloud-pull.ts +26 -0
- package/src/sync/schemas/index.ts +18 -0
- package/src/sync/schemas/sync-helpers.ts +18 -0
- package/src/sync/schemas/sync-state.ts +41 -0
- package/src/sync/sync-bridge.ts +763 -0
- package/src/sync/sync-manifest.ts +212 -0
- package/src/sync/sync-state.consumer.ts +144 -0
- package/src/transform/index.ts +130 -0
- package/src/transform/transform-descriptor.ts +53 -0
- package/src/tui/storage-explorer.descriptor.ts +32 -0
- package/src/tui/storage-explorer.impl.consumer.ts +14 -0
- package/src/tui/storage-open.descriptor.ts +31 -0
- package/src/tui/storage-open.impl.consumer.ts +14 -0
- package/src/utils/error-context.ts +19 -0
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Storage Manifest Descriptor Schema
|
|
3
|
+
*
|
|
4
|
+
* Schema for storage/manifest kind descriptors.
|
|
5
|
+
* Describes a data type that can be stored.
|
|
6
|
+
*/
|
|
7
|
+
import * as z from 'zod/v4';
|
|
8
|
+
import { RuntimeDescriptorSchema } from '@vibesdotdev/runtime/schemas/descriptor';
|
|
9
|
+
/**
|
|
10
|
+
* Storage scope for path resolution
|
|
11
|
+
*/
|
|
12
|
+
export const StorageScopeSchema = z.enum(['global', 'project', 'local', 'auto']);
|
|
13
|
+
/**
|
|
14
|
+
* Canonical storage data shape.
|
|
15
|
+
*
|
|
16
|
+
* - raw: keyed raw text values
|
|
17
|
+
* - records: structured row collection with CRUD semantics
|
|
18
|
+
* - objects: keyed JSON/blob objects or a whole document object
|
|
19
|
+
*/
|
|
20
|
+
export const StorageDataTypeSchema = z.enum(['raw', 'records', 'objects']);
|
|
21
|
+
/**
|
|
22
|
+
* Per-scope path configuration
|
|
23
|
+
* Allows manifests to customize base paths for each scope
|
|
24
|
+
*/
|
|
25
|
+
export const ScopePathConfigSchema = z
|
|
26
|
+
.object({
|
|
27
|
+
global: z.string().optional(),
|
|
28
|
+
project: z.string().optional(),
|
|
29
|
+
local: z.string().optional()
|
|
30
|
+
})
|
|
31
|
+
.optional();
|
|
32
|
+
/**
|
|
33
|
+
* Adapter-specific configuration
|
|
34
|
+
* Each adapter can define its own config shape
|
|
35
|
+
*
|
|
36
|
+
* Examples:
|
|
37
|
+
* - storage.drizzle: { tableName: 'ai_models', transforms: { toDb, fromDb } }
|
|
38
|
+
* - storage.localdb: { tableName: 'ai_models', createTable: 'CREATE TABLE...', dbName: 'custom.db', migrationKey: 'my-migrations' }
|
|
39
|
+
* - storage.json: { filename: 'ai-models.json' }
|
|
40
|
+
* - storage.cloud-api: { endpoint: '/api/models', ownerApp: 'ai' }
|
|
41
|
+
*/
|
|
42
|
+
export const StorageAdapterConfigSchema = z.record(z.string(), z.unknown());
|
|
43
|
+
export const StorageCloudApiAdapterConfigSchema = z.object({
|
|
44
|
+
/** Owning app id used to resolve the base origin from config/environment.apps. */
|
|
45
|
+
ownerApp: z.string().optional(),
|
|
46
|
+
/** Canonical collection endpoint on the owning app, e.g. /api/providers. */
|
|
47
|
+
endpoint: z.string().optional(),
|
|
48
|
+
/** Optional explicit base origin, e.g. https://ai.vibes.dev. */
|
|
49
|
+
apiEndpoint: z.string().optional(),
|
|
50
|
+
/** Field that uniquely identifies records/objects in collection responses. */
|
|
51
|
+
idField: z.string().default('id'),
|
|
52
|
+
/** Declared transform ids. Runtime functions live in storage/transform. */
|
|
53
|
+
transform: z
|
|
54
|
+
.object({
|
|
55
|
+
from: z.string().optional(),
|
|
56
|
+
to: z.string().optional()
|
|
57
|
+
})
|
|
58
|
+
.optional()
|
|
59
|
+
});
|
|
60
|
+
/**
|
|
61
|
+
* Storage manifest descriptor schema
|
|
62
|
+
*/
|
|
63
|
+
export const StorageManifestDescriptorSchema = RuntimeDescriptorSchema.extend({
|
|
64
|
+
kind: z.literal('storage/manifest'),
|
|
65
|
+
/** Storage namespace (e.g., 'ai.providers', 'session') */
|
|
66
|
+
namespace: z.string().min(1),
|
|
67
|
+
/** Zod schema for the stored data (stored as unknown, validated at runtime) */
|
|
68
|
+
schema: z.unknown(),
|
|
69
|
+
/** Canonical storage data shape. Omitted legacy descriptors are treated as objects. */
|
|
70
|
+
dataType: StorageDataTypeSchema.optional(),
|
|
71
|
+
/** Field that uniquely identifies items for records/object collections. */
|
|
72
|
+
idField: z.string().default('id').optional(),
|
|
73
|
+
/** Optional field containing the record collection inside a state object. */
|
|
74
|
+
collectionField: z.string().optional(),
|
|
75
|
+
/** Allowed adapter IDs (e.g., ['storage.localdb', 'storage.json']) */
|
|
76
|
+
allowedAdapters: z.array(z.string()).min(1),
|
|
77
|
+
/** Default adapter to use when not specified */
|
|
78
|
+
defaultAdapter: z.string().optional(),
|
|
79
|
+
/** Adapter-specific configuration (e.g., table names, transforms, filenames) */
|
|
80
|
+
adapterConfig: StorageAdapterConfigSchema.optional(),
|
|
81
|
+
/** Storage scope for path resolution */
|
|
82
|
+
scope: StorageScopeSchema.default('auto'),
|
|
83
|
+
/** Custom base paths for each scope (overrides default scope paths) */
|
|
84
|
+
scopePaths: ScopePathConfigSchema,
|
|
85
|
+
/** Fields that require encryption (dot paths, e.g., 'apiKey', 'credentials.token') */
|
|
86
|
+
sensitiveFields: z.array(z.string()).optional(),
|
|
87
|
+
/** Whether this manifest uses custom tables instead of generic document storage */
|
|
88
|
+
customTables: z.boolean().default(false),
|
|
89
|
+
/** Migration key for custom tables (required if customTables = true) */
|
|
90
|
+
migrationKey: z.string().optional(),
|
|
91
|
+
/** Version for migrations (default: 1) */
|
|
92
|
+
version: z.number().int().positive().default(1),
|
|
93
|
+
/** Whether this manifest is internal (not user-editable) */
|
|
94
|
+
internal: z.boolean().default(false),
|
|
95
|
+
/**
|
|
96
|
+
* ID of the corresponding config/manifest that stores the same data shape.
|
|
97
|
+
*
|
|
98
|
+
* When set, the save routing layer can pick the correct manifest kind based
|
|
99
|
+
* on the target adapter: custom tables (localdb) use the storage/manifest,
|
|
100
|
+
* while file/cloud targets use the config/manifest.
|
|
101
|
+
*/
|
|
102
|
+
configManifestId: z.string().optional(),
|
|
103
|
+
/**
|
|
104
|
+
* Declares that items in this storage can source runtime kind queries.
|
|
105
|
+
*
|
|
106
|
+
* Keys are kind IDs (e.g., 'ai/agent', 'tools/tool').
|
|
107
|
+
* Values are StorageKindBridgeConfig objects with toDescriptor, implementation, and filter.
|
|
108
|
+
* Stored as z.unknown() because the config contains functions.
|
|
109
|
+
*
|
|
110
|
+
* @see StorageKindBridgeConfig in storage/bridge/types.ts
|
|
111
|
+
*/
|
|
112
|
+
providesRuntimeKinds: z.record(z.string(), z.unknown()).optional()
|
|
113
|
+
});
|
|
114
|
+
//# sourceMappingURL=manifest-descriptor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manifest-descriptor.js","sourceRoot":"","sources":["../../src/schemas/manifest-descriptor.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,570 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Storage Record Descriptor Schema
|
|
3
|
+
*
|
|
4
|
+
* Defines a record type that provides CRUD operations on a single table.
|
|
5
|
+
* Used for modules that need structured storage with relations and queries.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```typescript
|
|
9
|
+
* const todoDescriptor: StorageRecordDescriptor = {
|
|
10
|
+
* kind: 'storage/record',
|
|
11
|
+
* id: 'session.todos',
|
|
12
|
+
* name: 'Session Todos',
|
|
13
|
+
* description: 'Todo items within sessions',
|
|
14
|
+
* schema: TodoSchema,
|
|
15
|
+
* tableName: 'todos',
|
|
16
|
+
* primaryKey: 'id',
|
|
17
|
+
* relations: {
|
|
18
|
+
* session: {
|
|
19
|
+
* type: 'belongs_to',
|
|
20
|
+
* target: 'session.sessions',
|
|
21
|
+
* foreignKey: 'sessionId'
|
|
22
|
+
* }
|
|
23
|
+
* },
|
|
24
|
+
* fts: {
|
|
25
|
+
* fields: ['content', 'activeForm']
|
|
26
|
+
* },
|
|
27
|
+
* hierarchy: {
|
|
28
|
+
* parentField: 'parentId'
|
|
29
|
+
* },
|
|
30
|
+
* allowedAdapters: ['storage.localdb'],
|
|
31
|
+
* defaultAdapter: 'storage.localdb'
|
|
32
|
+
* };
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
import * as z from 'zod/v4';
|
|
36
|
+
import type { VibesRuntime } from '@vibesdotdev/runtime';
|
|
37
|
+
import type { StorageRecordInterface } from '../../interfaces/record/interface';
|
|
38
|
+
export { StorageRelationSchema, StorageRelationTypeSchema } from './relation';
|
|
39
|
+
export type { StorageRelation, StorageRelationType } from './relation';
|
|
40
|
+
/**
|
|
41
|
+
* Index definition for a storage record
|
|
42
|
+
*/
|
|
43
|
+
export declare const StorageIndexSchema: z.ZodObject<{
|
|
44
|
+
name: z.ZodOptional<z.ZodString>;
|
|
45
|
+
fields: z.ZodArray<z.ZodString>;
|
|
46
|
+
unique: z.ZodDefault<z.ZodBoolean>;
|
|
47
|
+
type: z.ZodOptional<z.ZodString>;
|
|
48
|
+
where: z.ZodOptional<z.ZodString>;
|
|
49
|
+
}, z.core.$strip>;
|
|
50
|
+
/**
|
|
51
|
+
* Migration definition for storage records
|
|
52
|
+
*/
|
|
53
|
+
export declare const StorageMigrationSchema: z.ZodObject<{
|
|
54
|
+
version: z.ZodNumber;
|
|
55
|
+
name: z.ZodOptional<z.ZodString>;
|
|
56
|
+
up: z.ZodUnion<readonly [z.ZodString, z.ZodUnknown]>;
|
|
57
|
+
down: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodUnknown]>>;
|
|
58
|
+
}, z.core.$strip>;
|
|
59
|
+
/**
|
|
60
|
+
* Field configuration for auto-managed fields
|
|
61
|
+
*/
|
|
62
|
+
export declare const StorageFieldConfigSchema: z.ZodObject<{
|
|
63
|
+
autoIncrement: z.ZodOptional<z.ZodBoolean>;
|
|
64
|
+
generator: z.ZodOptional<z.ZodUnknown>;
|
|
65
|
+
type: z.ZodOptional<z.ZodString>;
|
|
66
|
+
default: z.ZodOptional<z.ZodUnknown>;
|
|
67
|
+
}, z.core.$strip>;
|
|
68
|
+
/**
|
|
69
|
+
* FTS configuration for storage records
|
|
70
|
+
*/
|
|
71
|
+
export declare const StorageFtsConfigSchema: z.ZodObject<{
|
|
72
|
+
fields: z.ZodArray<z.ZodString>;
|
|
73
|
+
tokenizer: z.ZodOptional<z.ZodString>;
|
|
74
|
+
tableName: z.ZodOptional<z.ZodString>;
|
|
75
|
+
options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
76
|
+
}, z.core.$strip>;
|
|
77
|
+
/**
|
|
78
|
+
* Computed field definition
|
|
79
|
+
*/
|
|
80
|
+
export declare const StorageComputedFieldSchema: z.ZodObject<{
|
|
81
|
+
type: z.ZodEnum<{
|
|
82
|
+
count: "count";
|
|
83
|
+
sum: "sum";
|
|
84
|
+
avg: "avg";
|
|
85
|
+
min: "min";
|
|
86
|
+
max: "max";
|
|
87
|
+
exists: "exists";
|
|
88
|
+
}>;
|
|
89
|
+
relation: z.ZodString;
|
|
90
|
+
field: z.ZodOptional<z.ZodString>;
|
|
91
|
+
where: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
92
|
+
expression: z.ZodOptional<z.ZodString>;
|
|
93
|
+
cached: z.ZodDefault<z.ZodBoolean>;
|
|
94
|
+
cacheStrategy: z.ZodOptional<z.ZodEnum<{
|
|
95
|
+
on_write: "on_write";
|
|
96
|
+
manual: "manual";
|
|
97
|
+
ttl: "ttl";
|
|
98
|
+
}>>;
|
|
99
|
+
cacheTtl: z.ZodOptional<z.ZodNumber>;
|
|
100
|
+
}, z.core.$strip>;
|
|
101
|
+
/**
|
|
102
|
+
* Hierarchy configuration for recursive data
|
|
103
|
+
*/
|
|
104
|
+
export declare const StorageHierarchyConfigSchema: z.ZodObject<{
|
|
105
|
+
parentField: z.ZodString;
|
|
106
|
+
childrenRelation: z.ZodOptional<z.ZodString>;
|
|
107
|
+
includeDepth: z.ZodDefault<z.ZodBoolean>;
|
|
108
|
+
includePath: z.ZodDefault<z.ZodBoolean>;
|
|
109
|
+
maxDepth: z.ZodOptional<z.ZodNumber>;
|
|
110
|
+
}, z.core.$strip>;
|
|
111
|
+
/**
|
|
112
|
+
* Remote CRUD configuration for cloud sync
|
|
113
|
+
*/
|
|
114
|
+
export declare const StorageRemoteCrudSchema: z.ZodObject<{
|
|
115
|
+
apiPath: z.ZodString;
|
|
116
|
+
entityPath: z.ZodOptional<z.ZodString>;
|
|
117
|
+
listField: z.ZodOptional<z.ZodString>;
|
|
118
|
+
totalField: z.ZodOptional<z.ZodString>;
|
|
119
|
+
updateMethod: z.ZodDefault<z.ZodEnum<{
|
|
120
|
+
PUT: "PUT";
|
|
121
|
+
PATCH: "PATCH";
|
|
122
|
+
}>>;
|
|
123
|
+
createMethod: z.ZodDefault<z.ZodEnum<{
|
|
124
|
+
PUT: "PUT";
|
|
125
|
+
POST: "POST";
|
|
126
|
+
}>>;
|
|
127
|
+
deleteMethod: z.ZodDefault<z.ZodLiteral<"DELETE">>;
|
|
128
|
+
}, z.core.$strip>;
|
|
129
|
+
/**
|
|
130
|
+
* Remote adapter configuration
|
|
131
|
+
*/
|
|
132
|
+
export declare const StorageRemoteConfigSchema: z.ZodObject<{
|
|
133
|
+
adapter: z.ZodDefault<z.ZodString>;
|
|
134
|
+
crud: z.ZodOptional<z.ZodObject<{
|
|
135
|
+
apiPath: z.ZodString;
|
|
136
|
+
entityPath: z.ZodOptional<z.ZodString>;
|
|
137
|
+
listField: z.ZodOptional<z.ZodString>;
|
|
138
|
+
totalField: z.ZodOptional<z.ZodString>;
|
|
139
|
+
updateMethod: z.ZodDefault<z.ZodEnum<{
|
|
140
|
+
PUT: "PUT";
|
|
141
|
+
PATCH: "PATCH";
|
|
142
|
+
}>>;
|
|
143
|
+
createMethod: z.ZodDefault<z.ZodEnum<{
|
|
144
|
+
PUT: "PUT";
|
|
145
|
+
POST: "POST";
|
|
146
|
+
}>>;
|
|
147
|
+
deleteMethod: z.ZodDefault<z.ZodLiteral<"DELETE">>;
|
|
148
|
+
}, z.core.$strip>>;
|
|
149
|
+
}, z.core.$strip>;
|
|
150
|
+
/**
|
|
151
|
+
* Persistence mode for data storage
|
|
152
|
+
*/
|
|
153
|
+
export declare const StoragePersistenceModeSchema: z.ZodEnum<{
|
|
154
|
+
auto: "auto";
|
|
155
|
+
"local-only": "local-only";
|
|
156
|
+
"remote-only": "remote-only";
|
|
157
|
+
"local-first": "local-first";
|
|
158
|
+
"remote-first": "remote-first";
|
|
159
|
+
}>;
|
|
160
|
+
/**
|
|
161
|
+
* Persistence policy configuration
|
|
162
|
+
*/
|
|
163
|
+
export declare const StoragePersistencePolicySchema: z.ZodObject<{
|
|
164
|
+
mode: z.ZodEnum<{
|
|
165
|
+
auto: "auto";
|
|
166
|
+
"local-only": "local-only";
|
|
167
|
+
"remote-only": "remote-only";
|
|
168
|
+
"local-first": "local-first";
|
|
169
|
+
"remote-first": "remote-first";
|
|
170
|
+
}>;
|
|
171
|
+
localAdapters: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
172
|
+
remoteAdapters: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
173
|
+
}, z.core.$strip>;
|
|
174
|
+
/**
|
|
175
|
+
* Ownership filter for sync operations
|
|
176
|
+
*/
|
|
177
|
+
export declare const StorageOwnershipFilterSchema: z.ZodEnum<{
|
|
178
|
+
all: "all";
|
|
179
|
+
"user-only": "user-only";
|
|
180
|
+
"system-only": "system-only";
|
|
181
|
+
}>;
|
|
182
|
+
/**
|
|
183
|
+
* Sync configuration for storage records
|
|
184
|
+
*/
|
|
185
|
+
export declare const StorageSyncConfigSchema: z.ZodObject<{
|
|
186
|
+
ownershipFilter: z.ZodDefault<z.ZodEnum<{
|
|
187
|
+
all: "all";
|
|
188
|
+
"user-only": "user-only";
|
|
189
|
+
"system-only": "system-only";
|
|
190
|
+
}>>;
|
|
191
|
+
idField: z.ZodOptional<z.ZodString>;
|
|
192
|
+
conflictStrategy: z.ZodDefault<z.ZodEnum<{
|
|
193
|
+
manual: "manual";
|
|
194
|
+
"local-wins": "local-wins";
|
|
195
|
+
"remote-wins": "remote-wins";
|
|
196
|
+
newest: "newest";
|
|
197
|
+
}>>;
|
|
198
|
+
sensitiveFields: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
199
|
+
collect: z.ZodOptional<z.ZodUnknown>;
|
|
200
|
+
toRemote: z.ZodOptional<z.ZodUnknown>;
|
|
201
|
+
fromRemote: z.ZodOptional<z.ZodUnknown>;
|
|
202
|
+
beforePush: z.ZodOptional<z.ZodUnknown>;
|
|
203
|
+
deleteRemote: z.ZodOptional<z.ZodUnknown>;
|
|
204
|
+
writePulled: z.ZodOptional<z.ZodUnknown>;
|
|
205
|
+
}, z.core.$strip>;
|
|
206
|
+
export type StorageSyncContext = {
|
|
207
|
+
runtime: VibesRuntime;
|
|
208
|
+
record?: StorageRecordInterface<unknown>;
|
|
209
|
+
apiEndpoint: string;
|
|
210
|
+
apiToken?: string;
|
|
211
|
+
fetch: (input: string, init?: RequestInit) => Promise<Response>;
|
|
212
|
+
};
|
|
213
|
+
export type StorageRecordLocalSyncContext = {
|
|
214
|
+
runtime: VibesRuntime;
|
|
215
|
+
record: StorageRecordInterface<Record<string, unknown>>;
|
|
216
|
+
apiEndpoint?: never;
|
|
217
|
+
apiToken?: never;
|
|
218
|
+
fetch?: never;
|
|
219
|
+
};
|
|
220
|
+
export type StorageRecordRemoteSyncContext = {
|
|
221
|
+
runtime: VibesRuntime;
|
|
222
|
+
record?: never;
|
|
223
|
+
apiEndpoint: string;
|
|
224
|
+
apiToken?: string;
|
|
225
|
+
fetch: (input: string, init?: RequestInit) => Promise<Response>;
|
|
226
|
+
};
|
|
227
|
+
export type StorageRecordSyncHooks = {
|
|
228
|
+
collect?: (context: StorageRecordLocalSyncContext) => Promise<Record<string, unknown>[]>;
|
|
229
|
+
toRemote?: (item: Record<string, unknown>, context?: StorageRecordLocalSyncContext) => Record<string, unknown>;
|
|
230
|
+
fromRemote?: (item: Record<string, unknown>) => Record<string, unknown>;
|
|
231
|
+
beforePush?: (item: Record<string, unknown>, context: StorageRecordRemoteSyncContext) => Promise<void>;
|
|
232
|
+
deleteRemote?: (item: Record<string, unknown>, context: StorageRecordRemoteSyncContext) => Promise<void>;
|
|
233
|
+
writePulled?: (items: Record<string, unknown>[], context: StorageRecordLocalSyncContext) => Promise<void>;
|
|
234
|
+
};
|
|
235
|
+
/**
|
|
236
|
+
* Side effect operation types
|
|
237
|
+
*/
|
|
238
|
+
export declare const StorageSideEffectOperationSchema: z.ZodEnum<{
|
|
239
|
+
update: "update";
|
|
240
|
+
touch: "touch";
|
|
241
|
+
increment: "increment";
|
|
242
|
+
decrement: "decrement";
|
|
243
|
+
refresh: "refresh";
|
|
244
|
+
}>;
|
|
245
|
+
/**
|
|
246
|
+
* Side effect definition
|
|
247
|
+
*/
|
|
248
|
+
export declare const StorageSideEffectSchema: z.ZodObject<{
|
|
249
|
+
target: z.ZodString;
|
|
250
|
+
operation: z.ZodEnum<{
|
|
251
|
+
update: "update";
|
|
252
|
+
touch: "touch";
|
|
253
|
+
increment: "increment";
|
|
254
|
+
decrement: "decrement";
|
|
255
|
+
refresh: "refresh";
|
|
256
|
+
}>;
|
|
257
|
+
field: z.ZodOptional<z.ZodString>;
|
|
258
|
+
value: z.ZodOptional<z.ZodUnknown>;
|
|
259
|
+
valueFn: z.ZodOptional<z.ZodUnknown>;
|
|
260
|
+
foreignKey: z.ZodOptional<z.ZodString>;
|
|
261
|
+
sameTransaction: z.ZodDefault<z.ZodBoolean>;
|
|
262
|
+
ignoreMissing: z.ZodDefault<z.ZodBoolean>;
|
|
263
|
+
}, z.core.$strip>;
|
|
264
|
+
/**
|
|
265
|
+
* Side effects configuration by operation
|
|
266
|
+
*/
|
|
267
|
+
export declare const StorageSideEffectsConfigSchema: z.ZodObject<{
|
|
268
|
+
onCreate: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
269
|
+
target: z.ZodString;
|
|
270
|
+
operation: z.ZodEnum<{
|
|
271
|
+
update: "update";
|
|
272
|
+
touch: "touch";
|
|
273
|
+
increment: "increment";
|
|
274
|
+
decrement: "decrement";
|
|
275
|
+
refresh: "refresh";
|
|
276
|
+
}>;
|
|
277
|
+
field: z.ZodOptional<z.ZodString>;
|
|
278
|
+
value: z.ZodOptional<z.ZodUnknown>;
|
|
279
|
+
valueFn: z.ZodOptional<z.ZodUnknown>;
|
|
280
|
+
foreignKey: z.ZodOptional<z.ZodString>;
|
|
281
|
+
sameTransaction: z.ZodDefault<z.ZodBoolean>;
|
|
282
|
+
ignoreMissing: z.ZodDefault<z.ZodBoolean>;
|
|
283
|
+
}, z.core.$strip>>>;
|
|
284
|
+
onUpdate: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
285
|
+
target: z.ZodString;
|
|
286
|
+
operation: z.ZodEnum<{
|
|
287
|
+
update: "update";
|
|
288
|
+
touch: "touch";
|
|
289
|
+
increment: "increment";
|
|
290
|
+
decrement: "decrement";
|
|
291
|
+
refresh: "refresh";
|
|
292
|
+
}>;
|
|
293
|
+
field: z.ZodOptional<z.ZodString>;
|
|
294
|
+
value: z.ZodOptional<z.ZodUnknown>;
|
|
295
|
+
valueFn: z.ZodOptional<z.ZodUnknown>;
|
|
296
|
+
foreignKey: z.ZodOptional<z.ZodString>;
|
|
297
|
+
sameTransaction: z.ZodDefault<z.ZodBoolean>;
|
|
298
|
+
ignoreMissing: z.ZodDefault<z.ZodBoolean>;
|
|
299
|
+
}, z.core.$strip>>>;
|
|
300
|
+
onDelete: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
301
|
+
target: z.ZodString;
|
|
302
|
+
operation: z.ZodEnum<{
|
|
303
|
+
update: "update";
|
|
304
|
+
touch: "touch";
|
|
305
|
+
increment: "increment";
|
|
306
|
+
decrement: "decrement";
|
|
307
|
+
refresh: "refresh";
|
|
308
|
+
}>;
|
|
309
|
+
field: z.ZodOptional<z.ZodString>;
|
|
310
|
+
value: z.ZodOptional<z.ZodUnknown>;
|
|
311
|
+
valueFn: z.ZodOptional<z.ZodUnknown>;
|
|
312
|
+
foreignKey: z.ZodOptional<z.ZodString>;
|
|
313
|
+
sameTransaction: z.ZodDefault<z.ZodBoolean>;
|
|
314
|
+
ignoreMissing: z.ZodDefault<z.ZodBoolean>;
|
|
315
|
+
}, z.core.$strip>>>;
|
|
316
|
+
}, z.core.$strip>;
|
|
317
|
+
/**
|
|
318
|
+
* Storage record descriptor schema
|
|
319
|
+
*/
|
|
320
|
+
export declare const StorageRecordDescriptorSchema: z.ZodObject<{
|
|
321
|
+
id: z.ZodString;
|
|
322
|
+
hardware: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
323
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
324
|
+
priority: z.ZodOptional<z.ZodNumber>;
|
|
325
|
+
requiredContext: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
326
|
+
optionalContext: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
327
|
+
config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
328
|
+
kind: z.ZodLiteral<"storage/record">;
|
|
329
|
+
name: z.ZodString;
|
|
330
|
+
description: z.ZodOptional<z.ZodString>;
|
|
331
|
+
schema: z.ZodUnknown;
|
|
332
|
+
tableName: z.ZodString;
|
|
333
|
+
primaryKey: z.ZodDefault<z.ZodString>;
|
|
334
|
+
relations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
335
|
+
type: z.ZodEnum<{
|
|
336
|
+
belongs_to: "belongs_to";
|
|
337
|
+
has_one: "has_one";
|
|
338
|
+
has_many: "has_many";
|
|
339
|
+
many_to_many: "many_to_many";
|
|
340
|
+
}>;
|
|
341
|
+
target: z.ZodString;
|
|
342
|
+
foreignKey: z.ZodOptional<z.ZodString>;
|
|
343
|
+
foreignKeyTarget: z.ZodOptional<z.ZodString>;
|
|
344
|
+
through: z.ZodOptional<z.ZodString>;
|
|
345
|
+
optional: z.ZodDefault<z.ZodBoolean>;
|
|
346
|
+
cascadeDelete: z.ZodDefault<z.ZodBoolean>;
|
|
347
|
+
as: z.ZodOptional<z.ZodString>;
|
|
348
|
+
}, z.core.$strip>>>;
|
|
349
|
+
indexes: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
350
|
+
name: z.ZodOptional<z.ZodString>;
|
|
351
|
+
fields: z.ZodArray<z.ZodString>;
|
|
352
|
+
unique: z.ZodDefault<z.ZodBoolean>;
|
|
353
|
+
type: z.ZodOptional<z.ZodString>;
|
|
354
|
+
where: z.ZodOptional<z.ZodString>;
|
|
355
|
+
}, z.core.$strip>>>;
|
|
356
|
+
fts: z.ZodOptional<z.ZodObject<{
|
|
357
|
+
fields: z.ZodArray<z.ZodString>;
|
|
358
|
+
tokenizer: z.ZodOptional<z.ZodString>;
|
|
359
|
+
tableName: z.ZodOptional<z.ZodString>;
|
|
360
|
+
options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
361
|
+
}, z.core.$strip>>;
|
|
362
|
+
computedFields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
363
|
+
type: z.ZodEnum<{
|
|
364
|
+
count: "count";
|
|
365
|
+
sum: "sum";
|
|
366
|
+
avg: "avg";
|
|
367
|
+
min: "min";
|
|
368
|
+
max: "max";
|
|
369
|
+
exists: "exists";
|
|
370
|
+
}>;
|
|
371
|
+
relation: z.ZodString;
|
|
372
|
+
field: z.ZodOptional<z.ZodString>;
|
|
373
|
+
where: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
374
|
+
expression: z.ZodOptional<z.ZodString>;
|
|
375
|
+
cached: z.ZodDefault<z.ZodBoolean>;
|
|
376
|
+
cacheStrategy: z.ZodOptional<z.ZodEnum<{
|
|
377
|
+
on_write: "on_write";
|
|
378
|
+
manual: "manual";
|
|
379
|
+
ttl: "ttl";
|
|
380
|
+
}>>;
|
|
381
|
+
cacheTtl: z.ZodOptional<z.ZodNumber>;
|
|
382
|
+
}, z.core.$strip>>>;
|
|
383
|
+
hierarchy: z.ZodOptional<z.ZodObject<{
|
|
384
|
+
parentField: z.ZodString;
|
|
385
|
+
childrenRelation: z.ZodOptional<z.ZodString>;
|
|
386
|
+
includeDepth: z.ZodDefault<z.ZodBoolean>;
|
|
387
|
+
includePath: z.ZodDefault<z.ZodBoolean>;
|
|
388
|
+
maxDepth: z.ZodOptional<z.ZodNumber>;
|
|
389
|
+
}, z.core.$strip>>;
|
|
390
|
+
sideEffects: z.ZodOptional<z.ZodObject<{
|
|
391
|
+
onCreate: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
392
|
+
target: z.ZodString;
|
|
393
|
+
operation: z.ZodEnum<{
|
|
394
|
+
update: "update";
|
|
395
|
+
touch: "touch";
|
|
396
|
+
increment: "increment";
|
|
397
|
+
decrement: "decrement";
|
|
398
|
+
refresh: "refresh";
|
|
399
|
+
}>;
|
|
400
|
+
field: z.ZodOptional<z.ZodString>;
|
|
401
|
+
value: z.ZodOptional<z.ZodUnknown>;
|
|
402
|
+
valueFn: z.ZodOptional<z.ZodUnknown>;
|
|
403
|
+
foreignKey: z.ZodOptional<z.ZodString>;
|
|
404
|
+
sameTransaction: z.ZodDefault<z.ZodBoolean>;
|
|
405
|
+
ignoreMissing: z.ZodDefault<z.ZodBoolean>;
|
|
406
|
+
}, z.core.$strip>>>;
|
|
407
|
+
onUpdate: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
408
|
+
target: z.ZodString;
|
|
409
|
+
operation: z.ZodEnum<{
|
|
410
|
+
update: "update";
|
|
411
|
+
touch: "touch";
|
|
412
|
+
increment: "increment";
|
|
413
|
+
decrement: "decrement";
|
|
414
|
+
refresh: "refresh";
|
|
415
|
+
}>;
|
|
416
|
+
field: z.ZodOptional<z.ZodString>;
|
|
417
|
+
value: z.ZodOptional<z.ZodUnknown>;
|
|
418
|
+
valueFn: z.ZodOptional<z.ZodUnknown>;
|
|
419
|
+
foreignKey: z.ZodOptional<z.ZodString>;
|
|
420
|
+
sameTransaction: z.ZodDefault<z.ZodBoolean>;
|
|
421
|
+
ignoreMissing: z.ZodDefault<z.ZodBoolean>;
|
|
422
|
+
}, z.core.$strip>>>;
|
|
423
|
+
onDelete: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
424
|
+
target: z.ZodString;
|
|
425
|
+
operation: z.ZodEnum<{
|
|
426
|
+
update: "update";
|
|
427
|
+
touch: "touch";
|
|
428
|
+
increment: "increment";
|
|
429
|
+
decrement: "decrement";
|
|
430
|
+
refresh: "refresh";
|
|
431
|
+
}>;
|
|
432
|
+
field: z.ZodOptional<z.ZodString>;
|
|
433
|
+
value: z.ZodOptional<z.ZodUnknown>;
|
|
434
|
+
valueFn: z.ZodOptional<z.ZodUnknown>;
|
|
435
|
+
foreignKey: z.ZodOptional<z.ZodString>;
|
|
436
|
+
sameTransaction: z.ZodDefault<z.ZodBoolean>;
|
|
437
|
+
ignoreMissing: z.ZodDefault<z.ZodBoolean>;
|
|
438
|
+
}, z.core.$strip>>>;
|
|
439
|
+
}, z.core.$strip>>;
|
|
440
|
+
migrations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
441
|
+
version: z.ZodNumber;
|
|
442
|
+
name: z.ZodOptional<z.ZodString>;
|
|
443
|
+
up: z.ZodUnion<readonly [z.ZodString, z.ZodUnknown]>;
|
|
444
|
+
down: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodUnknown]>>;
|
|
445
|
+
}, z.core.$strip>>>;
|
|
446
|
+
migrationKey: z.ZodOptional<z.ZodString>;
|
|
447
|
+
version: z.ZodDefault<z.ZodNumber>;
|
|
448
|
+
timestamps: z.ZodDefault<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
|
|
449
|
+
createdAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
450
|
+
updatedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
451
|
+
}, z.core.$strip>]>>;
|
|
452
|
+
autoId: z.ZodDefault<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
|
|
453
|
+
field: z.ZodOptional<z.ZodString>;
|
|
454
|
+
strategy: z.ZodOptional<z.ZodEnum<{
|
|
455
|
+
custom: "custom";
|
|
456
|
+
uuid: "uuid";
|
|
457
|
+
nanoid: "nanoid";
|
|
458
|
+
}>>;
|
|
459
|
+
generator: z.ZodOptional<z.ZodUnknown>;
|
|
460
|
+
}, z.core.$strip>]>>;
|
|
461
|
+
softDelete: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
462
|
+
fieldConfig: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
463
|
+
autoIncrement: z.ZodOptional<z.ZodBoolean>;
|
|
464
|
+
generator: z.ZodOptional<z.ZodUnknown>;
|
|
465
|
+
type: z.ZodOptional<z.ZodString>;
|
|
466
|
+
default: z.ZodOptional<z.ZodUnknown>;
|
|
467
|
+
}, z.core.$strip>>>;
|
|
468
|
+
allowedAdapters: z.ZodArray<z.ZodString>;
|
|
469
|
+
defaultAdapter: z.ZodOptional<z.ZodString>;
|
|
470
|
+
adapterConfig: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
471
|
+
scope: z.ZodDefault<z.ZodEnum<{
|
|
472
|
+
global: "global";
|
|
473
|
+
project: "project";
|
|
474
|
+
local: "local";
|
|
475
|
+
auto: "auto";
|
|
476
|
+
}>>;
|
|
477
|
+
dbName: z.ZodOptional<z.ZodString>;
|
|
478
|
+
dbSchema: z.ZodOptional<z.ZodString>;
|
|
479
|
+
versioning: z.ZodDefault<z.ZodBoolean>;
|
|
480
|
+
audit: z.ZodDefault<z.ZodBoolean>;
|
|
481
|
+
changeTracking: z.ZodDefault<z.ZodBoolean>;
|
|
482
|
+
validate: z.ZodOptional<z.ZodUnknown>;
|
|
483
|
+
validateOnWrite: z.ZodDefault<z.ZodBoolean>;
|
|
484
|
+
validateOnRead: z.ZodDefault<z.ZodBoolean>;
|
|
485
|
+
beforeCreate: z.ZodOptional<z.ZodUnknown>;
|
|
486
|
+
afterCreate: z.ZodOptional<z.ZodUnknown>;
|
|
487
|
+
beforeUpdate: z.ZodOptional<z.ZodUnknown>;
|
|
488
|
+
afterUpdate: z.ZodOptional<z.ZodUnknown>;
|
|
489
|
+
beforeDelete: z.ZodOptional<z.ZodUnknown>;
|
|
490
|
+
afterDelete: z.ZodOptional<z.ZodUnknown>;
|
|
491
|
+
internal: z.ZodDefault<z.ZodBoolean>;
|
|
492
|
+
namespace: z.ZodOptional<z.ZodString>;
|
|
493
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
494
|
+
remote: z.ZodOptional<z.ZodObject<{
|
|
495
|
+
adapter: z.ZodDefault<z.ZodString>;
|
|
496
|
+
crud: z.ZodOptional<z.ZodObject<{
|
|
497
|
+
apiPath: z.ZodString;
|
|
498
|
+
entityPath: z.ZodOptional<z.ZodString>;
|
|
499
|
+
listField: z.ZodOptional<z.ZodString>;
|
|
500
|
+
totalField: z.ZodOptional<z.ZodString>;
|
|
501
|
+
updateMethod: z.ZodDefault<z.ZodEnum<{
|
|
502
|
+
PUT: "PUT";
|
|
503
|
+
PATCH: "PATCH";
|
|
504
|
+
}>>;
|
|
505
|
+
createMethod: z.ZodDefault<z.ZodEnum<{
|
|
506
|
+
PUT: "PUT";
|
|
507
|
+
POST: "POST";
|
|
508
|
+
}>>;
|
|
509
|
+
deleteMethod: z.ZodDefault<z.ZodLiteral<"DELETE">>;
|
|
510
|
+
}, z.core.$strip>>;
|
|
511
|
+
}, z.core.$strip>>;
|
|
512
|
+
persistence: z.ZodOptional<z.ZodObject<{
|
|
513
|
+
mode: z.ZodEnum<{
|
|
514
|
+
auto: "auto";
|
|
515
|
+
"local-only": "local-only";
|
|
516
|
+
"remote-only": "remote-only";
|
|
517
|
+
"local-first": "local-first";
|
|
518
|
+
"remote-first": "remote-first";
|
|
519
|
+
}>;
|
|
520
|
+
localAdapters: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
521
|
+
remoteAdapters: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
522
|
+
}, z.core.$strip>>;
|
|
523
|
+
sync: z.ZodOptional<z.ZodObject<{
|
|
524
|
+
ownershipFilter: z.ZodDefault<z.ZodEnum<{
|
|
525
|
+
all: "all";
|
|
526
|
+
"user-only": "user-only";
|
|
527
|
+
"system-only": "system-only";
|
|
528
|
+
}>>;
|
|
529
|
+
idField: z.ZodOptional<z.ZodString>;
|
|
530
|
+
conflictStrategy: z.ZodDefault<z.ZodEnum<{
|
|
531
|
+
manual: "manual";
|
|
532
|
+
"local-wins": "local-wins";
|
|
533
|
+
"remote-wins": "remote-wins";
|
|
534
|
+
newest: "newest";
|
|
535
|
+
}>>;
|
|
536
|
+
sensitiveFields: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
537
|
+
collect: z.ZodOptional<z.ZodUnknown>;
|
|
538
|
+
toRemote: z.ZodOptional<z.ZodUnknown>;
|
|
539
|
+
fromRemote: z.ZodOptional<z.ZodUnknown>;
|
|
540
|
+
beforePush: z.ZodOptional<z.ZodUnknown>;
|
|
541
|
+
deleteRemote: z.ZodOptional<z.ZodUnknown>;
|
|
542
|
+
writePulled: z.ZodOptional<z.ZodUnknown>;
|
|
543
|
+
}, z.core.$strip>>;
|
|
544
|
+
}, z.core.$strip>;
|
|
545
|
+
export type StorageIndex = z.infer<typeof StorageIndexSchema>;
|
|
546
|
+
export type StorageIndexInput = z.input<typeof StorageIndexSchema>;
|
|
547
|
+
export type StorageMigration = z.infer<typeof StorageMigrationSchema>;
|
|
548
|
+
export type StorageMigrationInput = z.input<typeof StorageMigrationSchema>;
|
|
549
|
+
export type StorageFieldConfig = z.infer<typeof StorageFieldConfigSchema>;
|
|
550
|
+
export type StorageFieldConfigInput = z.input<typeof StorageFieldConfigSchema>;
|
|
551
|
+
export type StorageFtsConfig = z.infer<typeof StorageFtsConfigSchema>;
|
|
552
|
+
export type StorageFtsConfigInput = z.input<typeof StorageFtsConfigSchema>;
|
|
553
|
+
export type StorageComputedField = z.infer<typeof StorageComputedFieldSchema>;
|
|
554
|
+
export type StorageComputedFieldInput = z.input<typeof StorageComputedFieldSchema>;
|
|
555
|
+
export type StorageHierarchyConfig = z.infer<typeof StorageHierarchyConfigSchema>;
|
|
556
|
+
export type StorageHierarchyConfigInput = z.input<typeof StorageHierarchyConfigSchema>;
|
|
557
|
+
export type StorageSideEffectOperation = z.infer<typeof StorageSideEffectOperationSchema>;
|
|
558
|
+
export type StorageSideEffect = z.infer<typeof StorageSideEffectSchema>;
|
|
559
|
+
export type StorageSideEffectInput = z.input<typeof StorageSideEffectSchema>;
|
|
560
|
+
export type StorageSideEffectsConfig = z.infer<typeof StorageSideEffectsConfigSchema>;
|
|
561
|
+
export type StorageSideEffectsConfigInput = z.input<typeof StorageSideEffectsConfigSchema>;
|
|
562
|
+
export type StorageRecordDescriptor = z.infer<typeof StorageRecordDescriptorSchema>;
|
|
563
|
+
export type StorageRecordDescriptorInput = z.input<typeof StorageRecordDescriptorSchema>;
|
|
564
|
+
export type StorageRemoteCrud = z.infer<typeof StorageRemoteCrudSchema>;
|
|
565
|
+
export type StorageRemoteConfig = z.infer<typeof StorageRemoteConfigSchema>;
|
|
566
|
+
export type StoragePersistenceMode = z.infer<typeof StoragePersistenceModeSchema>;
|
|
567
|
+
export type StoragePersistencePolicy = z.infer<typeof StoragePersistencePolicySchema>;
|
|
568
|
+
export type StorageOwnershipFilter = z.infer<typeof StorageOwnershipFilterSchema>;
|
|
569
|
+
export type StorageSyncConfig = z.infer<typeof StorageSyncConfigSchema>;
|
|
570
|
+
//# sourceMappingURL=descriptor.d.ts.map
|