@vertesia/common 1.5.0-dev.20260725.083715Z → 1.5.0-dev.20260804.124748Z
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/lib/access-control-values.d.ts +98 -0
- package/lib/access-control-values.d.ts.map +1 -0
- package/lib/access-control-values.js +101 -0
- package/lib/access-control-values.js.map +1 -0
- package/lib/access-control.d.ts +22 -119
- package/lib/access-control.d.ts.map +1 -1
- package/lib/access-control.js +6 -78
- package/lib/access-control.js.map +1 -1
- package/lib/account-values.d.ts +53 -0
- package/lib/account-values.d.ts.map +1 -0
- package/lib/account-values.js +91 -0
- package/lib/account-values.js.map +1 -0
- package/lib/analytics.d.ts +12 -38
- package/lib/analytics.d.ts.map +1 -1
- package/lib/api-schemas/access-control.d.ts +215 -0
- package/lib/api-schemas/access-control.d.ts.map +1 -0
- package/lib/api-schemas/access-control.js +165 -0
- package/lib/api-schemas/access-control.js.map +1 -0
- package/lib/api-schemas/account.d.ts +101 -0
- package/lib/api-schemas/account.d.ts.map +1 -0
- package/lib/api-schemas/account.js +136 -0
- package/lib/api-schemas/account.js.map +1 -0
- package/lib/api-schemas/adapter.d.ts +80 -0
- package/lib/api-schemas/adapter.d.ts.map +1 -0
- package/lib/api-schemas/adapter.js +726 -0
- package/lib/api-schemas/adapter.js.map +1 -0
- package/lib/api-schemas/agent-runs.d.ts +3781 -0
- package/lib/api-schemas/agent-runs.d.ts.map +1 -0
- package/lib/api-schemas/agent-runs.js +991 -0
- package/lib/api-schemas/agent-runs.js.map +1 -0
- package/lib/api-schemas/analytics.d.ts +86 -0
- package/lib/api-schemas/analytics.d.ts.map +1 -0
- package/lib/api-schemas/analytics.js +58 -0
- package/lib/api-schemas/analytics.js.map +1 -0
- package/lib/api-schemas/apikey.d.ts +231 -0
- package/lib/api-schemas/apikey.d.ts.map +1 -0
- package/lib/api-schemas/apikey.js +172 -0
- package/lib/api-schemas/apikey.js.map +1 -0
- package/lib/api-schemas/app-lifecycle.d.ts +1114 -0
- package/lib/api-schemas/app-lifecycle.d.ts.map +1 -0
- package/lib/api-schemas/app-lifecycle.js +750 -0
- package/lib/api-schemas/app-lifecycle.js.map +1 -0
- package/lib/api-schemas/app-runtime.d.ts +9056 -0
- package/lib/api-schemas/app-runtime.d.ts.map +1 -0
- package/lib/api-schemas/app-runtime.js +782 -0
- package/lib/api-schemas/app-runtime.js.map +1 -0
- package/lib/api-schemas/apps.d.ts +247 -0
- package/lib/api-schemas/apps.d.ts.map +1 -0
- package/lib/api-schemas/apps.js +366 -0
- package/lib/api-schemas/apps.js.map +1 -0
- package/lib/api-schemas/audit-trail.d.ts +465 -0
- package/lib/api-schemas/audit-trail.d.ts.map +1 -0
- package/lib/api-schemas/audit-trail.js +218 -0
- package/lib/api-schemas/audit-trail.js.map +1 -0
- package/lib/api-schemas/bulk-operation.d.ts +104 -0
- package/lib/api-schemas/bulk-operation.d.ts.map +1 -0
- package/lib/api-schemas/bulk-operation.js +66 -0
- package/lib/api-schemas/bulk-operation.js.map +1 -0
- package/lib/api-schemas/commands.d.ts +50 -0
- package/lib/api-schemas/commands.d.ts.map +1 -0
- package/lib/api-schemas/commands.js +58 -0
- package/lib/api-schemas/commands.js.map +1 -0
- package/lib/api-schemas/content.d.ts +3561 -0
- package/lib/api-schemas/content.d.ts.map +1 -0
- package/lib/api-schemas/content.js +842 -0
- package/lib/api-schemas/content.js.map +1 -0
- package/lib/api-schemas/cost-analytics.d.ts +300 -0
- package/lib/api-schemas/cost-analytics.d.ts.map +1 -0
- package/lib/api-schemas/cost-analytics.js +218 -0
- package/lib/api-schemas/cost-analytics.js.map +1 -0
- package/lib/api-schemas/dashboard.d.ts +408 -0
- package/lib/api-schemas/dashboard.d.ts.map +1 -0
- package/lib/api-schemas/dashboard.js +311 -0
- package/lib/api-schemas/dashboard.js.map +1 -0
- package/lib/api-schemas/data-store.d.ts +1650 -0
- package/lib/api-schemas/data-store.d.ts.map +1 -0
- package/lib/api-schemas/data-store.js +504 -0
- package/lib/api-schemas/data-store.js.map +1 -0
- package/lib/api-schemas/document-processing.d.ts +1501 -0
- package/lib/api-schemas/document-processing.d.ts.map +1 -0
- package/lib/api-schemas/document-processing.js +312 -0
- package/lib/api-schemas/document-processing.js.map +1 -0
- package/lib/api-schemas/embeddings.d.ts +184 -0
- package/lib/api-schemas/embeddings.d.ts.map +1 -0
- package/lib/api-schemas/embeddings.js +102 -0
- package/lib/api-schemas/embeddings.js.map +1 -0
- package/lib/api-schemas/environment.d.ts +412 -0
- package/lib/api-schemas/environment.d.ts.map +1 -0
- package/lib/api-schemas/environment.js +170 -0
- package/lib/api-schemas/environment.js.map +1 -0
- package/lib/api-schemas/events.d.ts +4880 -0
- package/lib/api-schemas/events.d.ts.map +1 -0
- package/lib/api-schemas/events.js +832 -0
- package/lib/api-schemas/events.js.map +1 -0
- package/lib/api-schemas/files.d.ts +107 -0
- package/lib/api-schemas/files.d.ts.map +1 -0
- package/lib/api-schemas/files.js +137 -0
- package/lib/api-schemas/files.js.map +1 -0
- package/lib/api-schemas/group.d.ts +122 -0
- package/lib/api-schemas/group.d.ts.map +1 -0
- package/lib/api-schemas/group.js +142 -0
- package/lib/api-schemas/group.js.map +1 -0
- package/lib/api-schemas/index.d.ts +36 -0
- package/lib/api-schemas/index.d.ts.map +1 -0
- package/lib/api-schemas/index.js +36 -0
- package/lib/api-schemas/index.js.map +1 -0
- package/lib/api-schemas/indexing.d.ts +144 -0
- package/lib/api-schemas/indexing.d.ts.map +1 -0
- package/lib/api-schemas/indexing.js +217 -0
- package/lib/api-schemas/indexing.js.map +1 -0
- package/lib/api-schemas/integrations.d.ts +269 -0
- package/lib/api-schemas/integrations.d.ts.map +1 -0
- package/lib/api-schemas/integrations.js +335 -0
- package/lib/api-schemas/integrations.js.map +1 -0
- package/lib/api-schemas/interaction.d.ts +22454 -0
- package/lib/api-schemas/interaction.d.ts.map +1 -0
- package/lib/api-schemas/interaction.js +2065 -0
- package/lib/api-schemas/interaction.js.map +1 -0
- package/lib/api-schemas/invites.d.ts +162 -0
- package/lib/api-schemas/invites.d.ts.map +1 -0
- package/lib/api-schemas/invites.js +106 -0
- package/lib/api-schemas/invites.js.map +1 -0
- package/lib/api-schemas/oauth-server.d.ts +415 -0
- package/lib/api-schemas/oauth-server.d.ts.map +1 -0
- package/lib/api-schemas/oauth-server.js +193 -0
- package/lib/api-schemas/oauth-server.js.map +1 -0
- package/lib/api-schemas/oauth.d.ts +150 -0
- package/lib/api-schemas/oauth.d.ts.map +1 -0
- package/lib/api-schemas/oauth.js +148 -0
- package/lib/api-schemas/oauth.js.map +1 -0
- package/lib/api-schemas/parameters.d.ts +64 -0
- package/lib/api-schemas/parameters.d.ts.map +1 -0
- package/lib/api-schemas/parameters.js +246 -0
- package/lib/api-schemas/parameters.js.map +1 -0
- package/lib/api-schemas/process.d.ts +499 -0
- package/lib/api-schemas/process.d.ts.map +1 -0
- package/lib/api-schemas/process.js +817 -0
- package/lib/api-schemas/process.js.map +1 -0
- package/lib/api-schemas/project-configuration.d.ts +4900 -0
- package/lib/api-schemas/project-configuration.d.ts.map +1 -0
- package/lib/api-schemas/project-configuration.js +425 -0
- package/lib/api-schemas/project-configuration.js.map +1 -0
- package/lib/api-schemas/project.d.ts +7247 -0
- package/lib/api-schemas/project.d.ts.map +1 -0
- package/lib/api-schemas/project.js +185 -0
- package/lib/api-schemas/project.js.map +1 -0
- package/lib/api-schemas/prompt.d.ts +70 -0
- package/lib/api-schemas/prompt.d.ts.map +1 -0
- package/lib/api-schemas/prompt.js +77 -0
- package/lib/api-schemas/prompt.js.map +1 -0
- package/lib/api-schemas/quota.d.ts +90 -0
- package/lib/api-schemas/quota.d.ts.map +1 -0
- package/lib/api-schemas/quota.js +95 -0
- package/lib/api-schemas/quota.js.map +1 -0
- package/lib/api-schemas/registry.d.ts +97458 -0
- package/lib/api-schemas/registry.d.ts.map +1 -0
- package/lib/api-schemas/registry.js +2586 -0
- package/lib/api-schemas/registry.js.map +1 -0
- package/lib/api-schemas/schema-primitives.d.ts +5 -0
- package/lib/api-schemas/schema-primitives.d.ts.map +1 -0
- package/lib/api-schemas/schema-primitives.js +11 -0
- package/lib/api-schemas/schema-primitives.js.map +1 -0
- package/lib/api-schemas/secrets.d.ts +497 -0
- package/lib/api-schemas/secrets.d.ts.map +1 -0
- package/lib/api-schemas/secrets.js +298 -0
- package/lib/api-schemas/secrets.js.map +1 -0
- package/lib/api-schemas/store.d.ts +22140 -0
- package/lib/api-schemas/store.d.ts.map +1 -0
- package/lib/api-schemas/store.js +557 -0
- package/lib/api-schemas/store.js.map +1 -0
- package/lib/api-schemas/sts.d.ts +156 -0
- package/lib/api-schemas/sts.d.ts.map +1 -0
- package/lib/api-schemas/sts.js +96 -0
- package/lib/api-schemas/sts.js.map +1 -0
- package/lib/api-schemas/task.d.ts +215 -0
- package/lib/api-schemas/task.d.ts.map +1 -0
- package/lib/api-schemas/task.js +95 -0
- package/lib/api-schemas/task.js.map +1 -0
- package/lib/api-schemas/tools.d.ts +111 -0
- package/lib/api-schemas/tools.d.ts.map +1 -0
- package/lib/api-schemas/tools.js +122 -0
- package/lib/api-schemas/tools.js.map +1 -0
- package/lib/api-schemas/user.d.ts +208 -0
- package/lib/api-schemas/user.d.ts.map +1 -0
- package/lib/api-schemas/user.js +180 -0
- package/lib/api-schemas/user.js.map +1 -0
- package/lib/api-schemas/view-execution.d.ts +3163 -0
- package/lib/api-schemas/view-execution.d.ts.map +1 -0
- package/lib/api-schemas/view-execution.js +172 -0
- package/lib/api-schemas/view-execution.js.map +1 -0
- package/lib/api-schemas/views.d.ts +5990 -0
- package/lib/api-schemas/views.d.ts.map +1 -0
- package/lib/api-schemas/views.js +396 -0
- package/lib/api-schemas/views.js.map +1 -0
- package/lib/api-schemas/workflow-runs.d.ts +2209 -0
- package/lib/api-schemas/workflow-runs.d.ts.map +1 -0
- package/lib/api-schemas/workflow-runs.js +589 -0
- package/lib/api-schemas/workflow-runs.js.map +1 -0
- package/lib/apikey-values.d.ts +10 -0
- package/lib/apikey-values.d.ts.map +1 -0
- package/lib/apikey-values.js +11 -0
- package/lib/apikey-values.js.map +1 -0
- package/lib/apikey.d.ts +37 -36
- package/lib/apikey.d.ts.map +1 -1
- package/lib/apikey.js +5 -4
- package/lib/apikey.js.map +1 -1
- package/lib/apps.d.ts +107 -1151
- package/lib/apps.d.ts.map +1 -1
- package/lib/apps.js.map +1 -1
- package/lib/ask-user.d.ts +8 -1
- package/lib/ask-user.d.ts.map +1 -1
- package/lib/audit-trail.d.ts +17 -128
- package/lib/audit-trail.d.ts.map +1 -1
- package/lib/audit-trail.js.map +1 -1
- package/lib/browser-credentials.d.ts +11 -106
- package/lib/browser-credentials.d.ts.map +1 -1
- package/lib/common.d.ts +59 -81
- package/lib/common.d.ts.map +1 -1
- package/lib/cost-analytics.d.ts +14 -167
- package/lib/cost-analytics.d.ts.map +1 -1
- package/lib/cost-analytics.js.map +1 -1
- package/lib/data-platform.d.ts +122 -786
- package/lib/data-platform.d.ts.map +1 -1
- package/lib/data-platform.js +41 -61
- package/lib/data-platform.js.map +1 -1
- package/lib/email.d.ts +5 -17
- package/lib/email.d.ts.map +1 -1
- package/lib/email.js +0 -3
- package/lib/email.js.map +1 -1
- package/lib/embeddings.d.ts +14 -56
- package/lib/embeddings.d.ts.map +1 -1
- package/lib/environment.d.ts +19 -115
- package/lib/environment.d.ts.map +1 -1
- package/lib/environment.js +3 -0
- package/lib/environment.js.map +1 -1
- package/lib/facets.d.ts +4 -7
- package/lib/facets.d.ts.map +1 -1
- package/lib/group.d.ts +33 -39
- package/lib/group.d.ts.map +1 -1
- package/lib/group.js +0 -1
- package/lib/group.js.map +1 -1
- package/lib/index.d.ts +7 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/integrations.d.ts +20 -108
- package/lib/integrations.d.ts.map +1 -1
- package/lib/integrations.js.map +1 -1
- package/lib/interaction-values.d.ts +11 -0
- package/lib/interaction-values.d.ts.map +1 -0
- package/lib/interaction-values.js +24 -0
- package/lib/interaction-values.js.map +1 -0
- package/lib/interaction.d.ts +88 -778
- package/lib/interaction.d.ts.map +1 -1
- package/lib/interaction.js +8 -12
- package/lib/interaction.js.map +1 -1
- package/lib/meters.d.ts +11 -7
- package/lib/meters.d.ts.map +1 -1
- package/lib/meters.js.map +1 -1
- package/lib/oauth-server.d.ts +33 -119
- package/lib/oauth-server.d.ts.map +1 -1
- package/lib/oauth.d.ts +14 -96
- package/lib/oauth.d.ts.map +1 -1
- package/lib/oauth.js +0 -4
- package/lib/oauth.js.map +1 -1
- package/lib/payload.d.ts +15 -38
- package/lib/payload.d.ts.map +1 -1
- package/lib/platform-event.d.ts +49 -462
- package/lib/platform-event.d.ts.map +1 -1
- package/lib/platform-event.js.map +1 -1
- package/lib/principal-context.d.ts +10 -15
- package/lib/principal-context.d.ts.map +1 -1
- package/lib/project-values.d.ts +24 -0
- package/lib/project-values.d.ts.map +1 -0
- package/lib/project-values.js +42 -0
- package/lib/project-values.js.map +1 -0
- package/lib/project.d.ts +55 -503
- package/lib/project.d.ts.map +1 -1
- package/lib/project.js +6 -76
- package/lib/project.js.map +1 -1
- package/lib/prompt.d.ts +20 -51
- package/lib/prompt.d.ts.map +1 -1
- package/lib/prompt.js.map +1 -1
- package/lib/query.d.ts +27 -88
- package/lib/query.d.ts.map +1 -1
- package/lib/rate-limiter.d.ts +19 -70
- package/lib/rate-limiter.d.ts.map +1 -1
- package/lib/rate-limiter.js +0 -3
- package/lib/rate-limiter.js.map +1 -1
- package/lib/refs.d.ts +3 -11
- package/lib/refs.d.ts.map +1 -1
- package/lib/refs.js.map +1 -1
- package/lib/roles/types.d.ts +14 -20
- package/lib/roles/types.d.ts.map +1 -1
- package/lib/roles/types.js +5 -9
- package/lib/roles/types.js.map +1 -1
- package/lib/runs.d.ts +6 -25
- package/lib/runs.d.ts.map +1 -1
- package/lib/secrets.d.ts +20 -105
- package/lib/secrets.d.ts.map +1 -1
- package/lib/store/agent-approval.d.ts +5 -14
- package/lib/store/agent-approval.d.ts.map +1 -1
- package/lib/store/agent-approval.js.map +1 -1
- package/lib/store/agent-run.d.ts +57 -358
- package/lib/store/agent-run.d.ts.map +1 -1
- package/lib/store/collections.d.ts +11 -63
- package/lib/store/collections.d.ts.map +1 -1
- package/lib/store/collections.js.map +1 -1
- package/lib/store/conversation-state.d.ts +61 -61
- package/lib/store/conversation-state.d.ts.map +1 -1
- package/lib/store/conversation-state.js +2 -0
- package/lib/store/conversation-state.js.map +1 -1
- package/lib/store/doc-analyzer.d.ts +9 -32
- package/lib/store/doc-analyzer.d.ts.map +1 -1
- package/lib/store/dsl-workflow.d.ts +37 -151
- package/lib/store/dsl-workflow.d.ts.map +1 -1
- package/lib/store/dsl-workflow.js.map +1 -1
- package/lib/store/editing-policy-schema.generated.d.ts +3 -0
- package/lib/store/editing-policy-schema.generated.d.ts.map +1 -0
- package/lib/store/editing-policy-schema.generated.js +28 -0
- package/lib/store/editing-policy-schema.generated.js.map +1 -0
- package/lib/store/grounded-extraction.d.ts +7 -104
- package/lib/store/grounded-extraction.d.ts.map +1 -1
- package/lib/store/grounded-extraction.js.map +1 -1
- package/lib/store/index.d.ts +2 -0
- package/lib/store/index.d.ts.map +1 -1
- package/lib/store/index.js +3 -0
- package/lib/store/index.js.map +1 -1
- package/lib/store/intake-policy-schema.generated.d.ts +3 -0
- package/lib/store/intake-policy-schema.generated.d.ts.map +1 -0
- package/lib/store/intake-policy-schema.generated.js +1425 -0
- package/lib/store/intake-policy-schema.generated.js.map +1 -0
- package/lib/store/process-schema.d.ts +80 -0
- package/lib/store/process-schema.d.ts.map +1 -1
- package/lib/store/process-schema.js +79 -0
- package/lib/store/process-schema.js.map +1 -1
- package/lib/store/process-validation.d.ts.map +1 -1
- package/lib/store/process-validation.js +70 -2
- package/lib/store/process-validation.js.map +1 -1
- package/lib/store/process.d.ts +36 -125
- package/lib/store/process.d.ts.map +1 -1
- package/lib/store/process.js.map +1 -1
- package/lib/store/rendering.d.ts +9 -64
- package/lib/store/rendering.d.ts.map +1 -1
- package/lib/store/rendering.js.map +1 -1
- package/lib/store/store.d.ts +98 -700
- package/lib/store/store.d.ts.map +1 -1
- package/lib/store/store.js +4 -456
- package/lib/store/store.js.map +1 -1
- package/lib/store/task.d.ts +15 -59
- package/lib/store/task.d.ts.map +1 -1
- package/lib/store/task.js +0 -3
- package/lib/store/task.js.map +1 -1
- package/lib/store/workflow.d.ts +54 -518
- package/lib/store/workflow.d.ts.map +1 -1
- package/lib/store/workflow.js +23 -11
- package/lib/store/workflow.js.map +1 -1
- package/lib/sts-token-types.d.ts +12 -66
- package/lib/sts-token-types.d.ts.map +1 -1
- package/lib/sts-token-types.js.map +1 -1
- package/lib/tools.d.ts +8 -100
- package/lib/tools.d.ts.map +1 -1
- package/lib/transient-tokens-values.d.ts +11 -0
- package/lib/transient-tokens-values.d.ts.map +1 -0
- package/lib/transient-tokens-values.js +12 -0
- package/lib/transient-tokens-values.js.map +1 -0
- package/lib/transient-tokens.d.ts +15 -13
- package/lib/transient-tokens.d.ts.map +1 -1
- package/lib/transient-tokens.js +5 -5
- package/lib/transient-tokens.js.map +1 -1
- package/lib/user.d.ts +54 -155
- package/lib/user.d.ts.map +1 -1
- package/lib/user.js +1 -78
- package/lib/user.js.map +1 -1
- package/lib/versions.d.ts +24 -1
- package/lib/versions.d.ts.map +1 -1
- package/lib/versions.js +23 -0
- package/lib/versions.js.map +1 -1
- package/lib/vertesia-common.js +6 -2
- package/lib/vertesia-common.js.map +1 -1
- package/lib/views-schema.d.ts +4 -4
- package/lib/views.d.ts +56 -312
- package/lib/views.d.ts.map +1 -1
- package/lib/views.js.map +1 -1
- package/package.json +13 -4
- package/src/access-control-values.ts +113 -0
- package/src/access-control.ts +33 -138
- package/src/account-values.ts +95 -0
- package/src/analytics.ts +18 -42
- package/src/api-schemas/access-control.contract.test.ts +209 -0
- package/src/api-schemas/access-control.ts +208 -0
- package/src/api-schemas/account.contract.test.ts +318 -0
- package/src/api-schemas/account.ts +150 -0
- package/src/api-schemas/adapter-edge-cases.test.ts +480 -0
- package/src/api-schemas/adapter.ts +778 -0
- package/src/api-schemas/agent-runs.ts +1081 -0
- package/src/api-schemas/analytics.ts +65 -0
- package/src/api-schemas/apikey.contract.test.ts +270 -0
- package/src/api-schemas/apikey.ts +199 -0
- package/src/api-schemas/app-lifecycle.ts +841 -0
- package/src/api-schemas/app-runtime.ts +919 -0
- package/src/api-schemas/apps.ts +415 -0
- package/src/api-schemas/audit-trail.ts +243 -0
- package/src/api-schemas/bulk-operation.contract.test.ts +39 -0
- package/src/api-schemas/bulk-operation.ts +75 -0
- package/src/api-schemas/bundle-isolation.test.ts +80 -0
- package/src/api-schemas/commands.contract.test.ts +51 -0
- package/src/api-schemas/commands.ts +62 -0
- package/src/api-schemas/content.ts +939 -0
- package/src/api-schemas/cost-analytics.contract.test.ts +64 -0
- package/src/api-schemas/cost-analytics.ts +235 -0
- package/src/api-schemas/dashboard.contract.test.ts +127 -0
- package/src/api-schemas/dashboard.ts +351 -0
- package/src/api-schemas/data-store.contract.test.ts +91 -0
- package/src/api-schemas/data-store.ts +571 -0
- package/src/api-schemas/document-processing.contract.test.ts +76 -0
- package/src/api-schemas/document-processing.ts +344 -0
- package/src/api-schemas/embeddings.ts +113 -0
- package/src/api-schemas/environment.contract.test.ts +184 -0
- package/src/api-schemas/environment.ts +190 -0
- package/src/api-schemas/events.ts +921 -0
- package/src/api-schemas/files.ts +159 -0
- package/src/api-schemas/group.contract.test.ts +205 -0
- package/src/api-schemas/group.ts +155 -0
- package/src/api-schemas/index.ts +35 -0
- package/src/api-schemas/indexing.contract.test.ts +83 -0
- package/src/api-schemas/indexing.ts +234 -0
- package/src/api-schemas/integrations.ts +369 -0
- package/src/api-schemas/interaction.ts +2357 -0
- package/src/api-schemas/invites.contract.test.ts +268 -0
- package/src/api-schemas/invites.ts +127 -0
- package/src/api-schemas/llumiverse.contract.test.ts +108 -0
- package/src/api-schemas/oauth-server.ts +219 -0
- package/src/api-schemas/oauth.contract.test.ts +118 -0
- package/src/api-schemas/oauth.ts +166 -0
- package/src/api-schemas/parameters.test.ts +402 -0
- package/src/api-schemas/parameters.ts +310 -0
- package/src/api-schemas/process.ts +929 -0
- package/src/api-schemas/project-configuration.ts +478 -0
- package/src/api-schemas/project.contract.test.ts +365 -0
- package/src/api-schemas/project.ts +214 -0
- package/src/api-schemas/prompt.ts +88 -0
- package/src/api-schemas/pruning-limits.test.ts +189 -0
- package/src/api-schemas/quota.contract.test.ts +147 -0
- package/src/api-schemas/quota.ts +122 -0
- package/src/api-schemas/registry-groups.test.ts +91 -0
- package/src/api-schemas/registry.ts +3487 -0
- package/src/api-schemas/response-pruning.test.ts +260 -0
- package/src/api-schemas/schema-primitives.ts +12 -0
- package/src/api-schemas/secrets.ts +332 -0
- package/src/api-schemas/store.contract.test.ts +450 -0
- package/src/api-schemas/store.ts +604 -0
- package/src/api-schemas/sts.contract.test.ts +80 -0
- package/src/api-schemas/sts.ts +110 -0
- package/src/api-schemas/task.ts +104 -0
- package/src/api-schemas/tools.ts +140 -0
- package/src/api-schemas/user.contract.test.ts +191 -0
- package/src/api-schemas/user.ts +204 -0
- package/src/api-schemas/view-execution.ts +200 -0
- package/src/api-schemas/views.ts +437 -0
- package/src/api-schemas/workflow-runs.ts +653 -0
- package/src/apikey-values.ts +10 -0
- package/src/apikey.ts +49 -40
- package/src/apps.ts +234 -1213
- package/src/ask-user.ts +9 -1
- package/src/audit-trail.ts +45 -137
- package/src/browser-credentials.ts +21 -106
- package/src/common.ts +67 -78
- package/src/cost-analytics.ts +37 -176
- package/src/data-platform.ts +205 -776
- package/src/email.ts +5 -17
- package/src/embeddings.ts +22 -60
- package/src/environment.ts +52 -126
- package/src/facets.ts +4 -7
- package/src/group.ts +38 -42
- package/src/index.ts +11 -0
- package/src/integrations.ts +39 -129
- package/src/interaction-values.ts +23 -0
- package/src/interaction.ts +162 -902
- package/src/meters.ts +11 -7
- package/src/oauth-server.ts +58 -127
- package/src/oauth.ts +24 -108
- package/src/payload.ts +25 -40
- package/src/platform-event.ts +98 -484
- package/src/principal-context.ts +11 -15
- package/src/project-values.ts +41 -0
- package/src/project.ts +116 -588
- package/src/prompt.ts +34 -61
- package/src/query.ts +34 -93
- package/src/rate-limiter.ts +27 -75
- package/src/refs.ts +4 -11
- package/src/roles/types.ts +20 -20
- package/src/runs.ts +11 -24
- package/src/secrets.ts +38 -117
- package/src/store/agent-approval.ts +9 -14
- package/src/store/agent-run.ts +93 -450
- package/src/store/collections.ts +21 -63
- package/src/store/content-type-editing.test.ts +1 -1
- package/src/store/conversation-state.ts +75 -64
- package/src/store/doc-analyzer.ts +17 -33
- package/src/store/dsl-workflow.ts +62 -158
- package/src/store/editing-policy-schema.generated.ts +30 -0
- package/src/store/grounded-extraction.ts +13 -104
- package/src/store/index.ts +3 -0
- package/src/store/intake-policy-schema.generated.ts +1442 -0
- package/src/store/process-schema.test.ts +43 -0
- package/src/store/process-schema.ts +79 -0
- package/src/store/process-validation.test.ts +141 -0
- package/src/store/process-validation.ts +82 -2
- package/src/store/process.ts +70 -146
- package/src/store/rendering.ts +15 -64
- package/src/store/store.ts +197 -1204
- package/src/store/task.ts +25 -59
- package/src/store/workflow.ts +97 -557
- package/src/sts-token-types.ts +24 -75
- package/src/tools.ts +18 -97
- package/src/transient-tokens-values.ts +11 -0
- package/src/transient-tokens.ts +16 -13
- package/src/user.ts +74 -214
- package/src/versions.ts +24 -0
- package/src/views-schema.test.ts +9 -1
- package/src/views.ts +106 -329
package/src/data-platform.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { AppDashboardDefinitionSchema } from './api-schemas/app-runtime.js';
|
|
1
2
|
/**
|
|
2
3
|
* Data Platform Types
|
|
3
4
|
*
|
|
@@ -5,7 +6,87 @@
|
|
|
5
6
|
* Supports AI-manageable schemas and multi-table atomic operations.
|
|
6
7
|
*/
|
|
7
8
|
|
|
8
|
-
import type {
|
|
9
|
+
import type { z } from 'zod';
|
|
10
|
+
import type {
|
|
11
|
+
CreateDashboardPayloadSchema,
|
|
12
|
+
CreateDashboardSnapshotPayloadSchema,
|
|
13
|
+
DashboardArchiveResultSchema,
|
|
14
|
+
DashboardBulkArchiveResultSchema,
|
|
15
|
+
DashboardBulkDeleteResultSchema,
|
|
16
|
+
DashboardDataSourceSchema,
|
|
17
|
+
DashboardElasticsearchDslSchema,
|
|
18
|
+
DashboardElasticsearchResultMappingSchema,
|
|
19
|
+
DashboardItemSchema,
|
|
20
|
+
DashboardLayoutSchema,
|
|
21
|
+
DashboardPanelPositionSchema,
|
|
22
|
+
DashboardPanelSchema,
|
|
23
|
+
DashboardQuerySchema,
|
|
24
|
+
DashboardSchema,
|
|
25
|
+
DashboardSqlDataSourceSchema,
|
|
26
|
+
DashboardStatusSchema,
|
|
27
|
+
DashboardStoreElasticsearchDataSourceSchema,
|
|
28
|
+
DashboardVersionItemSchema,
|
|
29
|
+
DashboardVersioningPayloadSchema,
|
|
30
|
+
DashboardVersioningStatusResponseSchema,
|
|
31
|
+
DashboardVersionSchema,
|
|
32
|
+
PromoteDashboardVersionPayloadSchema,
|
|
33
|
+
UpdateDashboardPayloadSchema,
|
|
34
|
+
} from './api-schemas/dashboard.js';
|
|
35
|
+
import type {
|
|
36
|
+
AlterTableOperationSchema,
|
|
37
|
+
AlterTablePayloadSchema,
|
|
38
|
+
BatchQueryPayloadSchema,
|
|
39
|
+
BatchQueryResultItemSchema,
|
|
40
|
+
BatchQueryResultSchema,
|
|
41
|
+
CreateDataStorePayloadSchema,
|
|
42
|
+
CreateSnapshotPayloadSchema,
|
|
43
|
+
CreateTablePayloadSchema,
|
|
44
|
+
CreateTablesPayloadSchema,
|
|
45
|
+
DataColumnForAISchema,
|
|
46
|
+
DataColumnSchema,
|
|
47
|
+
DataColumnTypeSchema,
|
|
48
|
+
DataForeignKeyForAISchema,
|
|
49
|
+
DataForeignKeySchema,
|
|
50
|
+
DataIndexSchema,
|
|
51
|
+
DataRelationshipForAISchema,
|
|
52
|
+
DataRelationshipSchema,
|
|
53
|
+
DataRelationshipTypeSchema,
|
|
54
|
+
DataSchemaForAISchema,
|
|
55
|
+
DataSchemaSchema,
|
|
56
|
+
DataStoreArchiveResultSchema,
|
|
57
|
+
DataStoreDownloadInfoSchema,
|
|
58
|
+
DataStoreFullSchemaResponseSchema,
|
|
59
|
+
DataStoreItemSchema,
|
|
60
|
+
DataStoreMutateRowsPayloadSchema,
|
|
61
|
+
DataStoreMutateRowsResultSchema,
|
|
62
|
+
DataStoreSchema,
|
|
63
|
+
DataStoreSchemaResponseSchema,
|
|
64
|
+
DataStoreStatusSchema,
|
|
65
|
+
DataStoreTableDetailSchema,
|
|
66
|
+
DataStoreTableDropResultSchema,
|
|
67
|
+
DataStoreVersionSchema,
|
|
68
|
+
DataStoreVersionTableStateSchema,
|
|
69
|
+
DataTableForAISchema,
|
|
70
|
+
DataTableSchema,
|
|
71
|
+
DataTableSemanticTypeSchema,
|
|
72
|
+
DataTableSummarySchema,
|
|
73
|
+
GetDataStoreTableQuerySchema,
|
|
74
|
+
ImportDataFormatSchema,
|
|
75
|
+
ImportDataPayloadSchema,
|
|
76
|
+
ImportDataSourceSchema,
|
|
77
|
+
ImportJobSchema,
|
|
78
|
+
ImportStatusSchema,
|
|
79
|
+
ImportTableDataSchema,
|
|
80
|
+
ListDataStoreVersionsQuerySchema,
|
|
81
|
+
QueryPayloadSchema,
|
|
82
|
+
QueryResultColumnSchema,
|
|
83
|
+
QueryResultSchema,
|
|
84
|
+
QueryValidationErrorSchema,
|
|
85
|
+
QueryValidationPayloadSchema,
|
|
86
|
+
QueryValidationResultSchema,
|
|
87
|
+
SemanticColumnTypeSchema,
|
|
88
|
+
UpdateSchemaPayloadSchema,
|
|
89
|
+
} from './api-schemas/data-store.js';
|
|
9
90
|
|
|
10
91
|
// ============================================================================
|
|
11
92
|
// Column Types
|
|
@@ -14,34 +95,38 @@ import type { BaseObject } from './store/common.js';
|
|
|
14
95
|
/**
|
|
15
96
|
* Supported column data types for DuckDB tables.
|
|
16
97
|
*/
|
|
17
|
-
export
|
|
18
|
-
STRING
|
|
19
|
-
INTEGER
|
|
20
|
-
BIGINT
|
|
21
|
-
FLOAT
|
|
22
|
-
DOUBLE
|
|
23
|
-
DECIMAL
|
|
24
|
-
BOOLEAN
|
|
25
|
-
DATE
|
|
26
|
-
TIMESTAMP
|
|
27
|
-
JSON
|
|
28
|
-
}
|
|
98
|
+
export const DataColumnType = {
|
|
99
|
+
STRING: 'STRING',
|
|
100
|
+
INTEGER: 'INTEGER',
|
|
101
|
+
BIGINT: 'BIGINT',
|
|
102
|
+
FLOAT: 'FLOAT',
|
|
103
|
+
DOUBLE: 'DOUBLE',
|
|
104
|
+
DECIMAL: 'DECIMAL',
|
|
105
|
+
BOOLEAN: 'BOOLEAN',
|
|
106
|
+
DATE: 'DATE',
|
|
107
|
+
TIMESTAMP: 'TIMESTAMP',
|
|
108
|
+
JSON: 'JSON',
|
|
109
|
+
} as const;
|
|
110
|
+
|
|
111
|
+
export type DataColumnType = z.infer<typeof DataColumnTypeSchema>;
|
|
29
112
|
|
|
30
113
|
/**
|
|
31
114
|
* Semantic types that provide AI agents with context about column meaning.
|
|
32
115
|
*/
|
|
33
|
-
export
|
|
34
|
-
EMAIL
|
|
35
|
-
PHONE
|
|
36
|
-
URL
|
|
37
|
-
CURRENCY
|
|
38
|
-
PERCENTAGE
|
|
39
|
-
PERSON_NAME
|
|
40
|
-
ADDRESS
|
|
41
|
-
COUNTRY
|
|
42
|
-
DATE_ISO
|
|
43
|
-
IDENTIFIER
|
|
44
|
-
}
|
|
116
|
+
export const SemanticColumnType = {
|
|
117
|
+
EMAIL: 'email',
|
|
118
|
+
PHONE: 'phone',
|
|
119
|
+
URL: 'url',
|
|
120
|
+
CURRENCY: 'currency',
|
|
121
|
+
PERCENTAGE: 'percentage',
|
|
122
|
+
PERSON_NAME: 'person_name',
|
|
123
|
+
ADDRESS: 'address',
|
|
124
|
+
COUNTRY: 'country',
|
|
125
|
+
DATE_ISO: 'date_iso',
|
|
126
|
+
IDENTIFIER: 'identifier',
|
|
127
|
+
} as const;
|
|
128
|
+
|
|
129
|
+
export type SemanticColumnType = z.infer<typeof SemanticColumnTypeSchema>;
|
|
45
130
|
|
|
46
131
|
/**
|
|
47
132
|
* Mapping from DataColumnType to DuckDB SQL types.
|
|
@@ -66,150 +151,49 @@ export const DATA_COLUMN_TYPE_TO_DUCKDB: Record<DataColumnType, string> = {
|
|
|
66
151
|
/**
|
|
67
152
|
* Column definition for a data table.
|
|
68
153
|
*/
|
|
69
|
-
export
|
|
70
|
-
/** Column name (must be valid SQL identifier) */
|
|
71
|
-
name: string;
|
|
72
|
-
/** Data type */
|
|
73
|
-
type: DataColumnType;
|
|
74
|
-
/** Human-readable description */
|
|
75
|
-
description?: string;
|
|
76
|
-
/** Whether the column allows NULL values */
|
|
77
|
-
nullable?: boolean;
|
|
78
|
-
/** Default value (SQL expression as string) */
|
|
79
|
-
default?: string;
|
|
80
|
-
/** Whether this is the primary key */
|
|
81
|
-
primary_key?: boolean;
|
|
82
|
-
/** Whether this column should use a sequence-backed auto-increment default */
|
|
83
|
-
auto_increment?: boolean;
|
|
84
|
-
/** Whether values must be unique */
|
|
85
|
-
unique?: boolean;
|
|
86
|
-
/** Semantic type for AI understanding */
|
|
87
|
-
semantic_type?: SemanticColumnType;
|
|
88
|
-
/** Example values for AI context */
|
|
89
|
-
examples?: string[];
|
|
90
|
-
}
|
|
154
|
+
export type DataColumn = z.infer<typeof DataColumnSchema>;
|
|
91
155
|
|
|
92
156
|
/**
|
|
93
157
|
* Foreign key constraint definition.
|
|
94
158
|
*/
|
|
95
|
-
export
|
|
96
|
-
/** Column in this table */
|
|
97
|
-
column: string;
|
|
98
|
-
/** Referenced table name */
|
|
99
|
-
references_table: string;
|
|
100
|
-
/** Referenced column name */
|
|
101
|
-
references_column: string;
|
|
102
|
-
/** Action on delete */
|
|
103
|
-
on_delete?: 'CASCADE' | 'SET NULL' | 'NO ACTION';
|
|
104
|
-
}
|
|
159
|
+
export type DataForeignKey = z.infer<typeof DataForeignKeySchema>;
|
|
105
160
|
|
|
106
161
|
/**
|
|
107
162
|
* Index definition for a table.
|
|
108
163
|
*/
|
|
109
|
-
export
|
|
110
|
-
/** Index name */
|
|
111
|
-
name: string;
|
|
112
|
-
/** Columns included in the index */
|
|
113
|
-
columns: string[];
|
|
114
|
-
/** Whether the index enforces uniqueness */
|
|
115
|
-
unique?: boolean;
|
|
116
|
-
}
|
|
164
|
+
export type DataIndex = z.infer<typeof DataIndexSchema>;
|
|
117
165
|
|
|
118
166
|
/**
|
|
119
167
|
* Semantic type categorization for tables.
|
|
120
168
|
*/
|
|
121
|
-
export type DataTableSemanticType =
|
|
169
|
+
export type DataTableSemanticType = z.infer<typeof DataTableSemanticTypeSchema>;
|
|
122
170
|
|
|
123
171
|
/**
|
|
124
172
|
* Table definition within a data schema.
|
|
125
173
|
*/
|
|
126
|
-
export
|
|
127
|
-
/** Table name (must be valid SQL identifier) */
|
|
128
|
-
name: string;
|
|
129
|
-
/** Human-readable description */
|
|
130
|
-
description?: string;
|
|
131
|
-
/** Column definitions */
|
|
132
|
-
columns: DataColumn[];
|
|
133
|
-
/** Foreign key constraints */
|
|
134
|
-
foreign_keys?: DataForeignKey[];
|
|
135
|
-
/** Index definitions */
|
|
136
|
-
indexes?: DataIndex[];
|
|
137
|
-
/** Semantic categorization for AI understanding */
|
|
138
|
-
semantic_type?: DataTableSemanticType;
|
|
139
|
-
/** Tags for organization */
|
|
140
|
-
tags: string[];
|
|
141
|
-
/** Current row count (updated after imports) */
|
|
142
|
-
row_count?: number;
|
|
143
|
-
/** Table creation timestamp */
|
|
144
|
-
created_at?: string;
|
|
145
|
-
/** Last modification timestamp */
|
|
146
|
-
updated_at?: string;
|
|
147
|
-
}
|
|
174
|
+
export type DataTable = z.infer<typeof DataTableSchema>;
|
|
148
175
|
|
|
149
176
|
/**
|
|
150
177
|
* Summary view of a data table (for listings).
|
|
151
178
|
*/
|
|
152
|
-
export
|
|
153
|
-
/** Table name */
|
|
154
|
-
name: string;
|
|
155
|
-
/** Human-readable description */
|
|
156
|
-
description?: string;
|
|
157
|
-
/** Semantic categorization for AI understanding */
|
|
158
|
-
semantic_type?: DataTableSemanticType;
|
|
159
|
-
/** Number of columns */
|
|
160
|
-
column_count: number;
|
|
161
|
-
/** Current row count */
|
|
162
|
-
row_count?: number;
|
|
163
|
-
/** Tags for organization */
|
|
164
|
-
tags: string[];
|
|
165
|
-
}
|
|
179
|
+
export type DataTableSummary = z.infer<typeof DataTableSummarySchema>;
|
|
166
180
|
|
|
167
181
|
/**
|
|
168
182
|
* Relationship type between tables.
|
|
169
183
|
*/
|
|
170
|
-
export type DataRelationshipType =
|
|
184
|
+
export type DataRelationshipType = z.infer<typeof DataRelationshipTypeSchema>;
|
|
171
185
|
|
|
172
186
|
/**
|
|
173
187
|
* Semantic relationship between tables for AI understanding.
|
|
174
188
|
*/
|
|
175
|
-
export
|
|
176
|
-
/** Relationship name */
|
|
177
|
-
name: string;
|
|
178
|
-
/** Source table */
|
|
179
|
-
from_table: string;
|
|
180
|
-
/** Source column */
|
|
181
|
-
from_column: string;
|
|
182
|
-
/** Target table */
|
|
183
|
-
to_table: string;
|
|
184
|
-
/** Target column */
|
|
185
|
-
to_column: string;
|
|
186
|
-
/** Relationship cardinality */
|
|
187
|
-
relationship_type: DataRelationshipType;
|
|
188
|
-
/** Human-readable description */
|
|
189
|
-
description?: string;
|
|
190
|
-
}
|
|
189
|
+
export type DataRelationship = z.infer<typeof DataRelationshipSchema>;
|
|
191
190
|
|
|
192
191
|
/**
|
|
193
192
|
* Complete schema definition for a data store.
|
|
194
193
|
*/
|
|
195
|
-
export
|
|
196
|
-
/** Semantic version (e.g., "1.2.0") */
|
|
197
|
-
version: string;
|
|
198
|
-
/** Schema description */
|
|
199
|
-
description?: string;
|
|
200
|
-
/** Table definitions */
|
|
201
|
-
tables: DataTable[];
|
|
202
|
-
/** Relationship definitions */
|
|
203
|
-
relationships: DataRelationship[];
|
|
204
|
-
/** Last update timestamp */
|
|
205
|
-
updated_at: string;
|
|
206
|
-
/** User/agent who last updated */
|
|
207
|
-
updated_by?: string;
|
|
208
|
-
}
|
|
194
|
+
export type DataSchema = z.infer<typeof DataSchemaSchema>;
|
|
209
195
|
|
|
210
|
-
export
|
|
211
|
-
schema_format: 'full';
|
|
212
|
-
}
|
|
196
|
+
export type DataStoreFullSchemaResponse = z.infer<typeof DataStoreFullSchemaResponseSchema>;
|
|
213
197
|
|
|
214
198
|
// ============================================================================
|
|
215
199
|
// Data Store Types
|
|
@@ -218,50 +202,24 @@ export interface DataStoreFullSchemaResponse extends DataSchema {
|
|
|
218
202
|
/**
|
|
219
203
|
* Data store lifecycle status.
|
|
220
204
|
*/
|
|
221
|
-
export
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
ARCHIVED = 'archived',
|
|
230
|
-
}
|
|
205
|
+
export const DataStoreStatus = {
|
|
206
|
+
CREATING: 'creating',
|
|
207
|
+
ACTIVE: 'active',
|
|
208
|
+
ERROR: 'error',
|
|
209
|
+
ARCHIVED: 'archived',
|
|
210
|
+
} as const;
|
|
211
|
+
|
|
212
|
+
export type DataStoreStatus = z.infer<typeof DataStoreStatusSchema>;
|
|
231
213
|
|
|
232
214
|
/**
|
|
233
215
|
* Summary view of a data store (for listings).
|
|
234
216
|
*/
|
|
235
|
-
export
|
|
236
|
-
/** Current status */
|
|
237
|
-
status: DataStoreStatus;
|
|
238
|
-
/** Current schema version */
|
|
239
|
-
schema_version: string;
|
|
240
|
-
/** Number of tables */
|
|
241
|
-
table_count: number;
|
|
242
|
-
/** Total rows across all tables */
|
|
243
|
-
total_rows: number;
|
|
244
|
-
/** Storage size in bytes */
|
|
245
|
-
storage_bytes: number;
|
|
246
|
-
/** Last import timestamp */
|
|
247
|
-
last_import_at?: string;
|
|
248
|
-
/** Number of versions stored */
|
|
249
|
-
version_count: number;
|
|
250
|
-
/** Tags for organization */
|
|
251
|
-
tags: string[];
|
|
252
|
-
}
|
|
217
|
+
export type DataStoreItem = z.infer<typeof DataStoreItemSchema>;
|
|
253
218
|
|
|
254
219
|
/**
|
|
255
220
|
* Full data store with schema details.
|
|
256
221
|
*/
|
|
257
|
-
export
|
|
258
|
-
/** Complete schema definition */
|
|
259
|
-
schema: DataSchema;
|
|
260
|
-
/** GCS bucket name */
|
|
261
|
-
gcs_bucket: string;
|
|
262
|
-
/** Path prefix within the bucket */
|
|
263
|
-
gcs_path: string;
|
|
264
|
-
}
|
|
222
|
+
export type DataStore = z.infer<typeof DataStoreSchema>;
|
|
265
223
|
|
|
266
224
|
// ============================================================================
|
|
267
225
|
// Version Types
|
|
@@ -270,49 +228,16 @@ export interface DataStore extends DataStoreItem {
|
|
|
270
228
|
/**
|
|
271
229
|
* Table state within a version.
|
|
272
230
|
*/
|
|
273
|
-
export
|
|
274
|
-
/** Row count at this version */
|
|
275
|
-
row_count: number;
|
|
276
|
-
/** Content checksum */
|
|
277
|
-
checksum: string;
|
|
278
|
-
}
|
|
231
|
+
export type DataStoreVersionTableState = z.infer<typeof DataStoreVersionTableStateSchema>;
|
|
279
232
|
|
|
280
233
|
/**
|
|
281
234
|
* A point-in-time version of a data store.
|
|
282
235
|
*/
|
|
283
|
-
export
|
|
284
|
-
/** Version ID */
|
|
285
|
-
id: string;
|
|
286
|
-
/** Parent store ID */
|
|
287
|
-
store_id: string;
|
|
288
|
-
/** Commit message */
|
|
289
|
-
message: string;
|
|
290
|
-
/** Schema version at this point */
|
|
291
|
-
schema_version: string;
|
|
292
|
-
/** Table states at this version */
|
|
293
|
-
tables: Record<string, DataStoreVersionTableState>;
|
|
294
|
-
/** Creation timestamp */
|
|
295
|
-
created_at: string;
|
|
296
|
-
/** User/agent who created */
|
|
297
|
-
created_by?: string;
|
|
298
|
-
/** GCS object generation number */
|
|
299
|
-
gcs_generation: number;
|
|
300
|
-
/** Timestamp-based ID used for GCS path (internal) */
|
|
301
|
-
gcs_path_id?: string;
|
|
302
|
-
/** Whether this is a named snapshot */
|
|
303
|
-
is_snapshot?: boolean;
|
|
304
|
-
/** Snapshot name (if is_snapshot) */
|
|
305
|
-
snapshot_name?: string;
|
|
306
|
-
}
|
|
236
|
+
export type DataStoreVersion = z.infer<typeof DataStoreVersionSchema>;
|
|
307
237
|
|
|
308
|
-
export
|
|
309
|
-
limit?: number;
|
|
310
|
-
snapshots_only?: boolean;
|
|
311
|
-
}
|
|
238
|
+
export type ListDataStoreVersionsQuery = z.infer<typeof ListDataStoreVersionsQuerySchema>;
|
|
312
239
|
|
|
313
|
-
export
|
|
314
|
-
sample?: boolean;
|
|
315
|
-
}
|
|
240
|
+
export type GetDataStoreTableQuery = z.infer<typeof GetDataStoreTableQuerySchema>;
|
|
316
241
|
|
|
317
242
|
// ============================================================================
|
|
318
243
|
// Import Types
|
|
@@ -321,48 +246,20 @@ export interface GetDataStoreTableQuery {
|
|
|
321
246
|
/**
|
|
322
247
|
* Import job status.
|
|
323
248
|
*/
|
|
324
|
-
export
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
/** Job was rolled back */
|
|
334
|
-
ROLLED_BACK = 'rolled_back',
|
|
335
|
-
}
|
|
249
|
+
export const ImportStatus = {
|
|
250
|
+
PENDING: 'pending',
|
|
251
|
+
PROCESSING: 'processing',
|
|
252
|
+
COMPLETED: 'completed',
|
|
253
|
+
FAILED: 'failed',
|
|
254
|
+
ROLLED_BACK: 'rolled_back',
|
|
255
|
+
} as const;
|
|
256
|
+
|
|
257
|
+
export type ImportStatus = z.infer<typeof ImportStatusSchema>;
|
|
336
258
|
|
|
337
259
|
/**
|
|
338
260
|
* Import job tracking.
|
|
339
261
|
*/
|
|
340
|
-
export
|
|
341
|
-
/** Job ID */
|
|
342
|
-
id: string;
|
|
343
|
-
/** Parent store ID */
|
|
344
|
-
store_id: string;
|
|
345
|
-
/** Current status */
|
|
346
|
-
status: ImportStatus;
|
|
347
|
-
/** Tables being imported */
|
|
348
|
-
tables: string[];
|
|
349
|
-
/** Import mode */
|
|
350
|
-
mode: 'append' | 'replace';
|
|
351
|
-
/** Commit message */
|
|
352
|
-
message?: string;
|
|
353
|
-
/** Error message (if failed) */
|
|
354
|
-
error?: string;
|
|
355
|
-
/** Total rows imported */
|
|
356
|
-
rows_imported: number;
|
|
357
|
-
/** Job start timestamp */
|
|
358
|
-
started_at: string;
|
|
359
|
-
/** Job completion timestamp */
|
|
360
|
-
completed_at?: string;
|
|
361
|
-
/** Resulting version ID (if completed) */
|
|
362
|
-
version_id?: string;
|
|
363
|
-
/** User/agent who initiated */
|
|
364
|
-
created_by?: string;
|
|
365
|
-
}
|
|
262
|
+
export type ImportJob = z.infer<typeof ImportJobSchema>;
|
|
366
263
|
|
|
367
264
|
// ============================================================================
|
|
368
265
|
// API Payloads
|
|
@@ -371,52 +268,21 @@ export interface ImportJob {
|
|
|
371
268
|
/**
|
|
372
269
|
* Payload for creating a new data store.
|
|
373
270
|
*/
|
|
374
|
-
export
|
|
375
|
-
/** Store name (unique within project) */
|
|
376
|
-
name: string;
|
|
377
|
-
/** Store description */
|
|
378
|
-
description?: string;
|
|
379
|
-
/** Tags for organization */
|
|
380
|
-
tags?: string[];
|
|
381
|
-
}
|
|
271
|
+
export type CreateDataStorePayload = z.infer<typeof CreateDataStorePayloadSchema>;
|
|
382
272
|
|
|
383
273
|
/**
|
|
384
274
|
* Payload for creating a new table.
|
|
385
275
|
*/
|
|
386
|
-
export
|
|
387
|
-
/** Table name */
|
|
388
|
-
name: string;
|
|
389
|
-
/** Table description */
|
|
390
|
-
description?: string;
|
|
391
|
-
/** Column definitions (at least one required) */
|
|
392
|
-
columns: DataColumn[];
|
|
393
|
-
/** Foreign key constraints */
|
|
394
|
-
foreign_keys?: DataForeignKey[];
|
|
395
|
-
/** Index definitions */
|
|
396
|
-
indexes?: DataIndex[];
|
|
397
|
-
/** Semantic type */
|
|
398
|
-
semantic_type?: DataTableSemanticType;
|
|
399
|
-
/** Tags */
|
|
400
|
-
tags?: string[];
|
|
401
|
-
}
|
|
276
|
+
export type CreateTablePayload = z.infer<typeof CreateTablePayloadSchema>;
|
|
402
277
|
|
|
403
278
|
/**
|
|
404
279
|
* Payload for creating multiple tables atomically.
|
|
405
280
|
*/
|
|
406
|
-
export
|
|
407
|
-
/** Table definitions to create */
|
|
408
|
-
tables: CreateTablePayload[];
|
|
409
|
-
/** Commit message */
|
|
410
|
-
message: string;
|
|
411
|
-
}
|
|
281
|
+
export type CreateTablesPayload = z.infer<typeof CreateTablesPayloadSchema>;
|
|
412
282
|
|
|
413
|
-
export
|
|
414
|
-
queries: Array<{ name: string; sql: string }>;
|
|
415
|
-
}
|
|
283
|
+
export type QueryValidationPayload = z.infer<typeof QueryValidationPayloadSchema>;
|
|
416
284
|
|
|
417
|
-
export
|
|
418
|
-
queries: Array<{ name: string; sql: string; limit?: number }>;
|
|
419
|
-
}
|
|
285
|
+
export type BatchQueryPayload = z.infer<typeof BatchQueryPayloadSchema>;
|
|
420
286
|
|
|
421
287
|
/**
|
|
422
288
|
* Schema change operation types.
|
|
@@ -424,35 +290,17 @@ export interface BatchQueryPayload {
|
|
|
424
290
|
/**
|
|
425
291
|
* @discriminator op
|
|
426
292
|
*/
|
|
427
|
-
export type AlterTableOperation =
|
|
428
|
-
| { op: 'add_column'; column: DataColumn }
|
|
429
|
-
| { op: 'drop_column'; column: string }
|
|
430
|
-
| { op: 'rename_column'; from: string; to: string }
|
|
431
|
-
| { op: 'modify_column'; column: string; updates: Partial<Omit<DataColumn, 'name'>> };
|
|
293
|
+
export type AlterTableOperation = z.infer<typeof AlterTableOperationSchema>;
|
|
432
294
|
|
|
433
295
|
/**
|
|
434
296
|
* Payload for altering a table schema.
|
|
435
297
|
*/
|
|
436
|
-
export
|
|
437
|
-
/** List of schema changes to apply */
|
|
438
|
-
changes: AlterTableOperation[];
|
|
439
|
-
}
|
|
298
|
+
export type AlterTablePayload = z.infer<typeof AlterTablePayloadSchema>;
|
|
440
299
|
|
|
441
300
|
/**
|
|
442
301
|
* Payload for AI-driven bulk schema updates.
|
|
443
302
|
*/
|
|
444
|
-
export
|
|
445
|
-
/** Updated schema description */
|
|
446
|
-
description?: string;
|
|
447
|
-
/** Tables to create or update */
|
|
448
|
-
tables?: CreateTablePayload[];
|
|
449
|
-
/** Relationships to set */
|
|
450
|
-
relationships?: DataRelationship[];
|
|
451
|
-
/** Tables to drop */
|
|
452
|
-
drop_tables?: string[];
|
|
453
|
-
/** Commit message (required) */
|
|
454
|
-
message: string;
|
|
455
|
-
}
|
|
303
|
+
export type UpdateSchemaPayload = z.infer<typeof UpdateSchemaPayloadSchema>;
|
|
456
304
|
|
|
457
305
|
/**
|
|
458
306
|
* Data source for import.
|
|
@@ -461,183 +309,83 @@ export interface UpdateSchemaPayload {
|
|
|
461
309
|
* - 'url': data at an HTTPS URL
|
|
462
310
|
* - 'artifact': data from workflow artifact (resolved to GCS by tool)
|
|
463
311
|
*/
|
|
464
|
-
export type ImportDataSource =
|
|
312
|
+
export type ImportDataSource = z.infer<typeof ImportDataSourceSchema>;
|
|
465
313
|
|
|
466
314
|
/**
|
|
467
315
|
* Data format for external sources.
|
|
468
316
|
*/
|
|
469
|
-
export type ImportDataFormat =
|
|
317
|
+
export type ImportDataFormat = z.infer<typeof ImportDataFormatSchema>;
|
|
470
318
|
|
|
471
319
|
/**
|
|
472
320
|
* Table data specification for import.
|
|
473
321
|
*/
|
|
474
|
-
export
|
|
475
|
-
/** Where the data comes from */
|
|
476
|
-
source: ImportDataSource;
|
|
477
|
-
/** Inline data (when source is 'inline') */
|
|
478
|
-
data?: Record<string, unknown>[];
|
|
479
|
-
/** URI for external data (gcs: gs://..., url: https://..., artifact: out/file.csv) */
|
|
480
|
-
uri?: string;
|
|
481
|
-
/** Data format for external sources */
|
|
482
|
-
format?: ImportDataFormat;
|
|
483
|
-
}
|
|
322
|
+
export type ImportTableData = z.infer<typeof ImportTableDataSchema>;
|
|
484
323
|
|
|
485
324
|
/**
|
|
486
325
|
* Payload for importing data into tables.
|
|
487
326
|
*/
|
|
488
|
-
export
|
|
489
|
-
/** Map of table name to data specification */
|
|
490
|
-
tables: Record<string, ImportTableData>;
|
|
491
|
-
/** Import mode */
|
|
492
|
-
mode: 'append' | 'replace';
|
|
493
|
-
/** Commit message */
|
|
494
|
-
message: string;
|
|
495
|
-
}
|
|
327
|
+
export type ImportDataPayload = z.infer<typeof ImportDataPayloadSchema>;
|
|
496
328
|
|
|
497
329
|
/**
|
|
498
330
|
* Payload for creating a named snapshot.
|
|
499
331
|
*/
|
|
500
|
-
export
|
|
501
|
-
/** Snapshot name (must be unique within store) */
|
|
502
|
-
name: string;
|
|
503
|
-
/** Snapshot description */
|
|
504
|
-
message: string;
|
|
505
|
-
}
|
|
332
|
+
export type CreateSnapshotPayload = z.infer<typeof CreateSnapshotPayloadSchema>;
|
|
506
333
|
|
|
507
334
|
/**
|
|
508
335
|
* Payload for executing a query.
|
|
509
336
|
*/
|
|
510
|
-
export
|
|
511
|
-
/** SQL query (SELECT only) */
|
|
512
|
-
sql: string;
|
|
513
|
-
/** Query parameters (for prepared statements) */
|
|
514
|
-
params?: Record<string, unknown>;
|
|
515
|
-
/** Maximum rows to return */
|
|
516
|
-
limit?: number;
|
|
517
|
-
/** Query against a specific version (optional) */
|
|
518
|
-
version_id?: string;
|
|
519
|
-
}
|
|
337
|
+
export type QueryPayload = z.infer<typeof QueryPayloadSchema>;
|
|
520
338
|
|
|
521
339
|
/**
|
|
522
340
|
* Payload for mutating data rows with a single SQL statement.
|
|
523
341
|
*/
|
|
524
|
-
export
|
|
525
|
-
/** SQL statement. Only UPDATE and DELETE statements are accepted. */
|
|
526
|
-
sql: string;
|
|
527
|
-
/** Commit message recorded on the resulting data store version. */
|
|
528
|
-
message: string;
|
|
529
|
-
/** Allow UPDATE/DELETE statements without a WHERE clause. Defaults to false. */
|
|
530
|
-
allow_full_table?: boolean;
|
|
531
|
-
}
|
|
342
|
+
export type DataStoreMutateRowsPayload = z.infer<typeof DataStoreMutateRowsPayloadSchema>;
|
|
532
343
|
|
|
533
344
|
/**
|
|
534
345
|
* Result from mutating rows in a data store.
|
|
535
346
|
*/
|
|
536
|
-
export
|
|
537
|
-
/** Resulting data store version ID */
|
|
538
|
-
version_id: string;
|
|
539
|
-
/** Tables affected by the statement */
|
|
540
|
-
affected_tables: string[];
|
|
541
|
-
/** Current row counts for affected tables after the mutation */
|
|
542
|
-
row_counts: Record<string, number>;
|
|
543
|
-
/** Statement execution time in milliseconds */
|
|
544
|
-
execution_time_ms: number;
|
|
545
|
-
}
|
|
347
|
+
export type DataStoreMutateRowsResult = z.infer<typeof DataStoreMutateRowsResultSchema>;
|
|
546
348
|
|
|
547
349
|
/**
|
|
548
350
|
* Column metadata in query results.
|
|
549
351
|
*/
|
|
550
|
-
export
|
|
551
|
-
/** Column name */
|
|
552
|
-
name: string;
|
|
553
|
-
/** Column type */
|
|
554
|
-
type: string;
|
|
555
|
-
}
|
|
352
|
+
export type QueryResultColumn = z.infer<typeof QueryResultColumnSchema>;
|
|
556
353
|
|
|
557
354
|
/**
|
|
558
355
|
* Query execution result.
|
|
559
356
|
*/
|
|
560
|
-
export
|
|
561
|
-
/** Column metadata */
|
|
562
|
-
columns: QueryResultColumn[];
|
|
563
|
-
/** Result rows */
|
|
564
|
-
rows: Record<string, unknown>[];
|
|
565
|
-
/** Number of rows returned */
|
|
566
|
-
row_count: number;
|
|
567
|
-
/** Query execution time in milliseconds */
|
|
568
|
-
execution_time_ms: number;
|
|
569
|
-
/** Error message if query failed (used in batch queries) */
|
|
570
|
-
error?: string;
|
|
571
|
-
}
|
|
357
|
+
export type QueryResult = z.infer<typeof QueryResultSchema>;
|
|
572
358
|
|
|
573
|
-
export
|
|
574
|
-
name: string;
|
|
575
|
-
}
|
|
359
|
+
export type BatchQueryResultItem = z.infer<typeof BatchQueryResultItemSchema>;
|
|
576
360
|
|
|
577
|
-
export
|
|
578
|
-
results: BatchQueryResultItem[];
|
|
579
|
-
}
|
|
361
|
+
export type BatchQueryResult = z.infer<typeof BatchQueryResultSchema>;
|
|
580
362
|
|
|
581
|
-
export
|
|
582
|
-
query: string;
|
|
583
|
-
error: string;
|
|
584
|
-
}
|
|
363
|
+
export type QueryValidationError = z.infer<typeof QueryValidationErrorSchema>;
|
|
585
364
|
|
|
586
|
-
export
|
|
587
|
-
valid: boolean;
|
|
588
|
-
errors: QueryValidationError[];
|
|
589
|
-
}
|
|
365
|
+
export type QueryValidationResult = z.infer<typeof QueryValidationResultSchema>;
|
|
590
366
|
|
|
591
|
-
export
|
|
592
|
-
url: string;
|
|
593
|
-
gcs_generation: number;
|
|
594
|
-
schema_version: string;
|
|
595
|
-
store_id: string;
|
|
596
|
-
store_name: string;
|
|
597
|
-
tables: string[];
|
|
598
|
-
expires_in: number;
|
|
599
|
-
}
|
|
367
|
+
export type DataStoreDownloadInfo = z.infer<typeof DataStoreDownloadInfoSchema>;
|
|
600
368
|
|
|
601
|
-
export
|
|
602
|
-
id: string;
|
|
603
|
-
status: DataStoreStatus;
|
|
604
|
-
}
|
|
369
|
+
export type DataStoreArchiveResult = z.infer<typeof DataStoreArchiveResultSchema>;
|
|
605
370
|
|
|
606
371
|
/**
|
|
607
372
|
* @discriminator schema_format
|
|
608
373
|
*/
|
|
609
|
-
export type DataStoreSchemaResponse =
|
|
374
|
+
export type DataStoreSchemaResponse = z.infer<typeof DataStoreSchemaResponseSchema>;
|
|
610
375
|
|
|
611
|
-
export
|
|
612
|
-
sample_data?: Record<string, unknown>[];
|
|
613
|
-
}
|
|
376
|
+
export type DataStoreTableDetail = z.infer<typeof DataStoreTableDetailSchema>;
|
|
614
377
|
|
|
615
|
-
export
|
|
616
|
-
dropped: string;
|
|
617
|
-
}
|
|
378
|
+
export type DataStoreTableDropResult = z.infer<typeof DataStoreTableDropResultSchema>;
|
|
618
379
|
|
|
619
|
-
export
|
|
620
|
-
id: string;
|
|
621
|
-
status: DashboardStatus;
|
|
622
|
-
}
|
|
380
|
+
export type DashboardArchiveResult = z.infer<typeof DashboardArchiveResultSchema>;
|
|
623
381
|
|
|
624
|
-
export
|
|
625
|
-
archived: number;
|
|
626
|
-
failed: number;
|
|
627
|
-
}
|
|
382
|
+
export type DashboardBulkArchiveResult = z.infer<typeof DashboardBulkArchiveResultSchema>;
|
|
628
383
|
|
|
629
|
-
export
|
|
630
|
-
deleted: number;
|
|
631
|
-
failed: number;
|
|
632
|
-
}
|
|
384
|
+
export type DashboardBulkDeleteResult = z.infer<typeof DashboardBulkDeleteResultSchema>;
|
|
633
385
|
|
|
634
|
-
export
|
|
635
|
-
versioning_enabled: boolean;
|
|
636
|
-
}
|
|
386
|
+
export type DashboardVersioningStatusResponse = z.infer<typeof DashboardVersioningStatusResponseSchema>;
|
|
637
387
|
|
|
638
|
-
export
|
|
639
|
-
enabled: boolean;
|
|
640
|
-
}
|
|
388
|
+
export type DashboardVersioningPayload = z.infer<typeof DashboardVersioningPayloadSchema>;
|
|
641
389
|
|
|
642
390
|
// ============================================================================
|
|
643
391
|
// AI Agent Interface
|
|
@@ -646,80 +394,28 @@ export interface DashboardVersioningPayload {
|
|
|
646
394
|
/**
|
|
647
395
|
* Simplified column representation for AI agents.
|
|
648
396
|
*/
|
|
649
|
-
export
|
|
650
|
-
/** Data type */
|
|
651
|
-
type: DataColumnType;
|
|
652
|
-
/** Description */
|
|
653
|
-
description?: string;
|
|
654
|
-
/** Semantic type */
|
|
655
|
-
semantic_type?: SemanticColumnType;
|
|
656
|
-
/** Whether nullable */
|
|
657
|
-
nullable: boolean;
|
|
658
|
-
/** Whether primary key */
|
|
659
|
-
primary_key: boolean;
|
|
660
|
-
/** Whether sequence-backed auto-increment is enabled */
|
|
661
|
-
auto_increment: boolean;
|
|
662
|
-
/** Example values */
|
|
663
|
-
examples?: string[];
|
|
664
|
-
}
|
|
397
|
+
export type DataColumnForAI = z.infer<typeof DataColumnForAISchema>;
|
|
665
398
|
|
|
666
399
|
/**
|
|
667
400
|
* Simplified foreign key representation for AI agents.
|
|
668
401
|
*/
|
|
669
|
-
export
|
|
670
|
-
/** Column name */
|
|
671
|
-
column: string;
|
|
672
|
-
/** Reference in "table.column" format */
|
|
673
|
-
references: string;
|
|
674
|
-
}
|
|
402
|
+
export type DataForeignKeyForAI = z.infer<typeof DataForeignKeyForAISchema>;
|
|
675
403
|
|
|
676
404
|
/**
|
|
677
405
|
* Simplified table representation for AI agents.
|
|
678
406
|
*/
|
|
679
|
-
export
|
|
680
|
-
/** Description */
|
|
681
|
-
description?: string;
|
|
682
|
-
/** Semantic type */
|
|
683
|
-
semantic_type?: DataTableSemanticType;
|
|
684
|
-
/** Columns by name */
|
|
685
|
-
columns: Record<string, DataColumnForAI>;
|
|
686
|
-
/** Foreign keys */
|
|
687
|
-
foreign_keys: DataForeignKeyForAI[];
|
|
688
|
-
}
|
|
407
|
+
export type DataTableForAI = z.infer<typeof DataTableForAISchema>;
|
|
689
408
|
|
|
690
409
|
/**
|
|
691
410
|
* Simplified relationship representation for AI agents.
|
|
692
411
|
*/
|
|
693
|
-
export
|
|
694
|
-
/** Relationship name */
|
|
695
|
-
name: string;
|
|
696
|
-
/** Source in "table.column" format */
|
|
697
|
-
from: string;
|
|
698
|
-
/** Target in "table.column" format */
|
|
699
|
-
to: string;
|
|
700
|
-
/** Relationship type */
|
|
701
|
-
type: DataRelationshipType;
|
|
702
|
-
/** Description */
|
|
703
|
-
description?: string;
|
|
704
|
-
}
|
|
412
|
+
export type DataRelationshipForAI = z.infer<typeof DataRelationshipForAISchema>;
|
|
705
413
|
|
|
706
414
|
/**
|
|
707
415
|
* Simplified schema representation optimized for AI agent consumption.
|
|
708
416
|
* Provides semantic context for understanding the data model.
|
|
709
417
|
*/
|
|
710
|
-
export
|
|
711
|
-
schema_format: 'ai';
|
|
712
|
-
/** Store name */
|
|
713
|
-
name: string;
|
|
714
|
-
/** Schema version */
|
|
715
|
-
version: string;
|
|
716
|
-
/** Schema description */
|
|
717
|
-
description?: string;
|
|
718
|
-
/** Tables by name */
|
|
719
|
-
tables: Record<string, DataTableForAI>;
|
|
720
|
-
/** Relationships */
|
|
721
|
-
relationships: DataRelationshipForAI[];
|
|
722
|
-
}
|
|
418
|
+
export type DataSchemaForAI = z.infer<typeof DataSchemaForAISchema>;
|
|
723
419
|
|
|
724
420
|
// ============================================================================
|
|
725
421
|
// Utility Types
|
|
@@ -750,12 +446,14 @@ export const DEFAULT_RETENTION_CONFIG: DataStoreRetentionConfig = {
|
|
|
750
446
|
/**
|
|
751
447
|
* Dashboard lifecycle status.
|
|
752
448
|
*/
|
|
753
|
-
export
|
|
449
|
+
export const DashboardStatus = {
|
|
754
450
|
/** Dashboard is active and usable */
|
|
755
|
-
ACTIVE
|
|
451
|
+
ACTIVE: 'active',
|
|
756
452
|
/** Dashboard has been archived (soft deleted) */
|
|
757
|
-
ARCHIVED
|
|
758
|
-
}
|
|
453
|
+
ARCHIVED: 'archived',
|
|
454
|
+
} as const;
|
|
455
|
+
|
|
456
|
+
export type DashboardStatus = z.infer<typeof DashboardStatusSchema>;
|
|
759
457
|
|
|
760
458
|
/**
|
|
761
459
|
* Named SQL query that maps to a Vega data source.
|
|
@@ -764,34 +462,14 @@ export enum DashboardStatus {
|
|
|
764
462
|
* @deprecated Use single `query` field on Dashboard instead. Multiple queries
|
|
765
463
|
* prevent cross-panel interactivity. Use JOINs/CTEs in a single query.
|
|
766
464
|
*/
|
|
767
|
-
export
|
|
768
|
-
/** Query name (used as data source reference in Vega specs) */
|
|
769
|
-
name: string;
|
|
770
|
-
/** SQL query (SELECT only). Can include {{param_name}} placeholders for dynamic values. */
|
|
771
|
-
sql: string;
|
|
772
|
-
/** Human-readable description */
|
|
773
|
-
description?: string;
|
|
774
|
-
/** Maximum rows to return */
|
|
775
|
-
limit?: number;
|
|
776
|
-
/** Default values for SQL parameters. Keys are parameter names (without braces). */
|
|
777
|
-
parameters?: Record<string, string>;
|
|
778
|
-
}
|
|
465
|
+
export type DashboardQuery = z.infer<typeof DashboardQuerySchema>;
|
|
779
466
|
|
|
780
467
|
/**
|
|
781
468
|
* Panel position within the dashboard grid.
|
|
782
469
|
*
|
|
783
470
|
* @deprecated Use combined Vega-Lite spec with vconcat/hconcat instead.
|
|
784
471
|
*/
|
|
785
|
-
export
|
|
786
|
-
/** Row index (0-based) */
|
|
787
|
-
row: number;
|
|
788
|
-
/** Column index (0-based) */
|
|
789
|
-
col: number;
|
|
790
|
-
/** Width in grid cells (default: 1) */
|
|
791
|
-
width?: number;
|
|
792
|
-
/** Height in grid cells (default: 1) */
|
|
793
|
-
height?: number;
|
|
794
|
-
}
|
|
472
|
+
export type DashboardPanelPosition = z.infer<typeof DashboardPanelPositionSchema>;
|
|
795
473
|
|
|
796
474
|
/**
|
|
797
475
|
* Dashboard panel with Vega/Vega-Lite visualization.
|
|
@@ -799,36 +477,14 @@ export interface DashboardPanelPosition {
|
|
|
799
477
|
* @deprecated Use combined Vega-Lite spec with vconcat/hconcat instead.
|
|
800
478
|
* Combined specs enable cross-panel interactivity (selections filtering other panels).
|
|
801
479
|
*/
|
|
802
|
-
export
|
|
803
|
-
/** Panel ID (auto-generated if not provided) */
|
|
804
|
-
id?: string;
|
|
805
|
-
/** Panel title */
|
|
806
|
-
title: string;
|
|
807
|
-
/** Vega or Vega-Lite specification */
|
|
808
|
-
spec: Record<string, unknown>;
|
|
809
|
-
/** Whether spec is Vega-Lite (default: true) */
|
|
810
|
-
vegaLite?: boolean;
|
|
811
|
-
/** Query names that populate this panel's data sources */
|
|
812
|
-
dataSources: string[];
|
|
813
|
-
/** Position in the dashboard grid */
|
|
814
|
-
position: DashboardPanelPosition;
|
|
815
|
-
}
|
|
480
|
+
export type DashboardPanel = z.infer<typeof DashboardPanelSchema>;
|
|
816
481
|
|
|
817
482
|
/**
|
|
818
483
|
* Dashboard layout configuration.
|
|
819
484
|
*
|
|
820
485
|
* @deprecated Layout is now handled within the Vega-Lite spec via vconcat/hconcat.
|
|
821
486
|
*/
|
|
822
|
-
export
|
|
823
|
-
/** Number of columns in the grid (default: 2) */
|
|
824
|
-
columns: number;
|
|
825
|
-
/** Width of each cell in pixels (default: 600) */
|
|
826
|
-
cellWidth: number;
|
|
827
|
-
/** Height of each cell in pixels (default: 400) */
|
|
828
|
-
cellHeight: number;
|
|
829
|
-
/** Padding between cells in pixels (default: 20) */
|
|
830
|
-
padding: number;
|
|
831
|
-
}
|
|
487
|
+
export type DashboardLayout = z.infer<typeof DashboardLayoutSchema>;
|
|
832
488
|
|
|
833
489
|
/**
|
|
834
490
|
* Default layout configuration for dashboards.
|
|
@@ -855,59 +511,27 @@ export interface DashboardQueryParameters {
|
|
|
855
511
|
* Elasticsearch DSL supported by dashboard data sources.
|
|
856
512
|
* Queries execute through Vertesia Store, so project/security filtering remains server-side.
|
|
857
513
|
*/
|
|
858
|
-
export
|
|
859
|
-
query?: Record<string, unknown>;
|
|
860
|
-
aggs?: Record<string, unknown>;
|
|
861
|
-
size?: number;
|
|
862
|
-
from?: number;
|
|
863
|
-
sort?: Array<Record<string, unknown>>;
|
|
864
|
-
}
|
|
514
|
+
export type DashboardElasticsearchDsl = z.infer<typeof DashboardElasticsearchDslSchema>;
|
|
865
515
|
|
|
866
516
|
/**
|
|
867
517
|
* How an Elasticsearch DSL result should be converted into Vega rows.
|
|
868
518
|
*/
|
|
869
|
-
export type DashboardElasticsearchResultMapping =
|
|
870
|
-
| {
|
|
871
|
-
type: 'hits';
|
|
872
|
-
}
|
|
873
|
-
| {
|
|
874
|
-
type: 'aggregation_buckets';
|
|
875
|
-
/** Dot path under `aggregations` that contains a `buckets` array. */
|
|
876
|
-
path: string;
|
|
877
|
-
/** Output field name for bucket key. Defaults to `key`. */
|
|
878
|
-
keyField?: string;
|
|
879
|
-
/** Output field name for doc count. Defaults to `doc_count`. */
|
|
880
|
-
countField?: string;
|
|
881
|
-
};
|
|
519
|
+
export type DashboardElasticsearchResultMapping = z.infer<typeof DashboardElasticsearchResultMappingSchema>;
|
|
882
520
|
|
|
883
521
|
/**
|
|
884
522
|
* Dashboard data source backed by a Data Platform SQL query.
|
|
885
523
|
*/
|
|
886
|
-
export
|
|
887
|
-
kind: 'data_sql';
|
|
888
|
-
/** SQL query that returns all rows for the dashboard. */
|
|
889
|
-
query: string;
|
|
890
|
-
/** Maximum rows to return from the query. */
|
|
891
|
-
queryLimit?: number;
|
|
892
|
-
/** Default values for SQL {{param}} placeholders. */
|
|
893
|
-
queryParameters?: Record<string, string>;
|
|
894
|
-
}
|
|
524
|
+
export type DashboardSqlDataSource = z.infer<typeof DashboardSqlDataSourceSchema>;
|
|
895
525
|
|
|
896
526
|
/**
|
|
897
527
|
* Dashboard data source backed by Vertesia Store Elasticsearch DSL.
|
|
898
528
|
*/
|
|
899
|
-
export
|
|
900
|
-
kind: 'store_es_dsl';
|
|
901
|
-
/** Elasticsearch DSL query executed through the secured Store query API. */
|
|
902
|
-
dsl: DashboardElasticsearchDsl;
|
|
903
|
-
/** Result mapping. Defaults to `hits`. */
|
|
904
|
-
result?: DashboardElasticsearchResultMapping;
|
|
905
|
-
}
|
|
529
|
+
export type DashboardStoreElasticsearchDataSource = z.infer<typeof DashboardStoreElasticsearchDataSourceSchema>;
|
|
906
530
|
|
|
907
531
|
/**
|
|
908
532
|
* Data source for a Vega dashboard.
|
|
909
533
|
*/
|
|
910
|
-
export type DashboardDataSource =
|
|
534
|
+
export type DashboardDataSource = z.infer<typeof DashboardDataSourceSchema>;
|
|
911
535
|
|
|
912
536
|
/**
|
|
913
537
|
* Dashboard definition contributed by an app package.
|
|
@@ -915,58 +539,12 @@ export type DashboardDataSource = DashboardSqlDataSource | DashboardStoreElastic
|
|
|
915
539
|
* App dashboard IDs are local to the app. The platform exposes them as
|
|
916
540
|
* `app:<app_name>:<id>` when listing or retrieving dashboards.
|
|
917
541
|
*/
|
|
918
|
-
export
|
|
919
|
-
/** Local app dashboard ID. */
|
|
920
|
-
id: string;
|
|
921
|
-
/** Machine-friendly dashboard name. Defaults to `id`. */
|
|
922
|
-
name?: string;
|
|
923
|
-
/** Display title. Defaults to `name` or `id`. */
|
|
924
|
-
title?: string;
|
|
925
|
-
/** User-facing description. */
|
|
926
|
-
description?: string;
|
|
927
|
-
/** Tags for discovery and filtering. */
|
|
928
|
-
tags?: string[];
|
|
929
|
-
/** Data source used to populate Vega `data.values`. */
|
|
930
|
-
dataSource?: DashboardDataSource;
|
|
931
|
-
/** SQL query shortcut for app dashboards backed by data stores. */
|
|
932
|
-
query?: string;
|
|
933
|
-
/** Maximum SQL rows to return. */
|
|
934
|
-
queryLimit?: number;
|
|
935
|
-
/** Default values for SQL {{param}} placeholders. */
|
|
936
|
-
queryParameters?: Record<string, string>;
|
|
937
|
-
/** Complete Vega-Lite specification for the dashboard. */
|
|
938
|
-
spec?: Record<string, unknown>;
|
|
939
|
-
/** Legacy named SQL queries. */
|
|
940
|
-
queries?: DashboardQuery[];
|
|
941
|
-
/** Legacy panel definitions. */
|
|
942
|
-
panels?: DashboardPanel[];
|
|
943
|
-
/** Legacy dashboard layout. */
|
|
944
|
-
layout?: DashboardLayout;
|
|
945
|
-
}
|
|
542
|
+
export type AppDashboardDefinition = z.infer<typeof AppDashboardDefinitionSchema>;
|
|
946
543
|
|
|
947
544
|
/**
|
|
948
545
|
* Summary view of a dashboard (for listings).
|
|
949
546
|
*/
|
|
950
|
-
export
|
|
951
|
-
/** Parent data store ID */
|
|
952
|
-
store_id: string;
|
|
953
|
-
/** Current status */
|
|
954
|
-
status: DashboardStatus;
|
|
955
|
-
/** Number of panels (deprecated, kept for backwards compat) */
|
|
956
|
-
panel_count: number;
|
|
957
|
-
/** Number of queries (deprecated, kept for backwards compat) */
|
|
958
|
-
query_count: number;
|
|
959
|
-
/** Last render timestamp */
|
|
960
|
-
last_rendered_at?: string;
|
|
961
|
-
/** Tags for organization */
|
|
962
|
-
tags: string[];
|
|
963
|
-
/** Source of the dashboard definition. Defaults to stored dashboards. */
|
|
964
|
-
source?: 'stored' | 'app';
|
|
965
|
-
/** App name when `source` is `app`. */
|
|
966
|
-
app_name?: string;
|
|
967
|
-
/** App dashboards are read-only until cloned into a stored dashboard. */
|
|
968
|
-
readonly?: boolean;
|
|
969
|
-
}
|
|
547
|
+
export type DashboardItem = z.infer<typeof DashboardItemSchema>;
|
|
970
548
|
|
|
971
549
|
/**
|
|
972
550
|
* Full dashboard with SQL query and Vega-Lite specification.
|
|
@@ -983,101 +561,18 @@ export interface DashboardItem extends BaseObject {
|
|
|
983
561
|
* - `layout` for grid positioning
|
|
984
562
|
* - No cross-panel interactivity
|
|
985
563
|
*/
|
|
986
|
-
export
|
|
987
|
-
// ============= New architecture (v2) =============
|
|
988
|
-
/**
|
|
989
|
-
* Data source used to populate Vega `data.values`.
|
|
990
|
-
* When omitted, top-level `query` is treated as a SQL data source for backwards compatibility.
|
|
991
|
-
*/
|
|
992
|
-
dataSource?: DashboardDataSource;
|
|
993
|
-
/**
|
|
994
|
-
* SQL query that returns all data for the dashboard.
|
|
995
|
-
* Use JOINs, CTEs, or UNION ALL to combine data from multiple tables.
|
|
996
|
-
* Can include {{param_name}} placeholders for dynamic values.
|
|
997
|
-
* @deprecated Use `dataSource: { kind: 'data_sql', query }` instead.
|
|
998
|
-
*/
|
|
999
|
-
query?: string;
|
|
1000
|
-
/**
|
|
1001
|
-
* Maximum rows to return from the query (default: 10000).
|
|
1002
|
-
* @deprecated Use `dataSource.queryLimit` instead.
|
|
1003
|
-
*/
|
|
1004
|
-
queryLimit?: number;
|
|
1005
|
-
/**
|
|
1006
|
-
* Default values for SQL parameters.
|
|
1007
|
-
* @deprecated Use `dataSource.queryParameters` instead.
|
|
1008
|
-
*/
|
|
1009
|
-
queryParameters?: Record<string, string>;
|
|
1010
|
-
/**
|
|
1011
|
-
* Complete Vega-Lite specification for the entire dashboard.
|
|
1012
|
-
* Use vconcat/hconcat for multiple panels, params for interactivity.
|
|
1013
|
-
* Data is injected at runtime from query results.
|
|
1014
|
-
*/
|
|
1015
|
-
spec?: Record<string, unknown>;
|
|
1016
|
-
|
|
1017
|
-
// ============= Legacy architecture (v1, deprecated) =============
|
|
1018
|
-
/**
|
|
1019
|
-
* @deprecated Use single `query` field instead.
|
|
1020
|
-
* Named SQL queries (kept for backwards compatibility).
|
|
1021
|
-
*/
|
|
1022
|
-
queries: DashboardQuery[];
|
|
1023
|
-
/**
|
|
1024
|
-
* @deprecated Use single `spec` field with vconcat/hconcat instead.
|
|
1025
|
-
* Panel definitions (kept for backwards compatibility).
|
|
1026
|
-
*/
|
|
1027
|
-
panels: DashboardPanel[];
|
|
1028
|
-
/**
|
|
1029
|
-
* @deprecated Layout is now handled within the Vega-Lite spec.
|
|
1030
|
-
* Layout configuration (kept for backwards compatibility).
|
|
1031
|
-
*/
|
|
1032
|
-
layout: DashboardLayout;
|
|
1033
|
-
|
|
1034
|
-
// ============= Common fields =============
|
|
1035
|
-
/** URL of last rendered image */
|
|
1036
|
-
last_render_url?: string;
|
|
1037
|
-
}
|
|
564
|
+
export type Dashboard = z.infer<typeof DashboardSchema>;
|
|
1038
565
|
|
|
1039
566
|
/**
|
|
1040
567
|
* Payload for creating a new dashboard.
|
|
1041
568
|
* Requires a data source and spec (Vega-Lite).
|
|
1042
569
|
*/
|
|
1043
|
-
export
|
|
1044
|
-
/** Dashboard name (unique within store) */
|
|
1045
|
-
name: string;
|
|
1046
|
-
/** Dashboard summary */
|
|
1047
|
-
summary?: string;
|
|
1048
|
-
/** Data source used to populate Vega `data.values`. */
|
|
1049
|
-
dataSource?: DashboardDataSource;
|
|
1050
|
-
/** SQL query that returns all data for the dashboard. Deprecated shortcut for a SQL data source. */
|
|
1051
|
-
query?: string;
|
|
1052
|
-
/** Maximum rows to return from the query (default: 10000) */
|
|
1053
|
-
queryLimit?: number;
|
|
1054
|
-
/** Default values for SQL {{param}} placeholders */
|
|
1055
|
-
queryParameters?: Record<string, string>;
|
|
1056
|
-
/** Complete Vega-Lite specification (use vconcat/hconcat for multiple panels) */
|
|
1057
|
-
spec: Record<string, unknown>;
|
|
1058
|
-
}
|
|
570
|
+
export type CreateDashboardPayload = z.infer<typeof CreateDashboardPayloadSchema>;
|
|
1059
571
|
|
|
1060
572
|
/**
|
|
1061
573
|
* Payload for updating a dashboard.
|
|
1062
574
|
*/
|
|
1063
|
-
export
|
|
1064
|
-
/** Dashboard name */
|
|
1065
|
-
name?: string;
|
|
1066
|
-
/** Dashboard summary */
|
|
1067
|
-
summary?: string;
|
|
1068
|
-
/** Data source used to populate Vega `data.values`. */
|
|
1069
|
-
dataSource?: DashboardDataSource;
|
|
1070
|
-
/** SQL query that returns all data for the dashboard. Deprecated shortcut for a SQL data source. */
|
|
1071
|
-
query?: string;
|
|
1072
|
-
/** Maximum rows to return from the query (default: 10000) */
|
|
1073
|
-
queryLimit?: number;
|
|
1074
|
-
/** Default values for SQL {{param}} placeholders */
|
|
1075
|
-
queryParameters?: Record<string, string>;
|
|
1076
|
-
/** Complete Vega-Lite specification (use vconcat/hconcat for multiple panels) */
|
|
1077
|
-
spec?: Record<string, unknown>;
|
|
1078
|
-
/** Skip auto-version creation */
|
|
1079
|
-
skip_versioning?: boolean;
|
|
1080
|
-
}
|
|
575
|
+
export type UpdateDashboardPayload = z.infer<typeof UpdateDashboardPayloadSchema>;
|
|
1081
576
|
|
|
1082
577
|
/**
|
|
1083
578
|
* Payload for previewing a dashboard (render without saving).
|
|
@@ -1140,85 +635,19 @@ export interface RenderDashboardResult {
|
|
|
1140
635
|
* A point-in-time version of a dashboard.
|
|
1141
636
|
* Stores full snapshot inline (no external storage needed for small JSON documents).
|
|
1142
637
|
*/
|
|
1143
|
-
export
|
|
1144
|
-
/** Version ID */
|
|
1145
|
-
id: string;
|
|
1146
|
-
/** Parent dashboard ID */
|
|
1147
|
-
dashboard_id: string;
|
|
1148
|
-
/** Version number (auto-incremented) */
|
|
1149
|
-
version_number: number;
|
|
1150
|
-
/** Commit message describing the change */
|
|
1151
|
-
message: string;
|
|
1152
|
-
/** Snapshot of v2 data source at this version */
|
|
1153
|
-
dataSource?: DashboardDataSource;
|
|
1154
|
-
/** Snapshot of v2 SQL query at this version */
|
|
1155
|
-
query?: string;
|
|
1156
|
-
/** Snapshot of v2 query limit at this version */
|
|
1157
|
-
queryLimit?: number;
|
|
1158
|
-
/** Snapshot of v2 query parameters at this version */
|
|
1159
|
-
queryParameters?: Record<string, string>;
|
|
1160
|
-
/** Snapshot of v2 Vega-Lite spec at this version */
|
|
1161
|
-
spec?: Record<string, unknown>;
|
|
1162
|
-
/** Snapshot of queries at this version */
|
|
1163
|
-
queries: DashboardQuery[];
|
|
1164
|
-
/** Snapshot of panels at this version */
|
|
1165
|
-
panels: DashboardPanel[];
|
|
1166
|
-
/** Snapshot of layout at this version */
|
|
1167
|
-
layout: DashboardLayout;
|
|
1168
|
-
/** Whether this is the currently active/displayed version */
|
|
1169
|
-
is_current: boolean;
|
|
1170
|
-
/** Whether this is a named snapshot (protected from TTL cleanup) */
|
|
1171
|
-
is_snapshot: boolean;
|
|
1172
|
-
/** Snapshot name (if is_snapshot) */
|
|
1173
|
-
snapshot_name?: string;
|
|
1174
|
-
/** Creation timestamp */
|
|
1175
|
-
created_at: string;
|
|
1176
|
-
/** User/agent who created this version */
|
|
1177
|
-
created_by?: string;
|
|
1178
|
-
}
|
|
638
|
+
export type DashboardVersion = z.infer<typeof DashboardVersionSchema>;
|
|
1179
639
|
|
|
1180
640
|
/**
|
|
1181
641
|
* Summary view of a dashboard version (for listings).
|
|
1182
642
|
*/
|
|
1183
|
-
export
|
|
1184
|
-
/** Version ID */
|
|
1185
|
-
id: string;
|
|
1186
|
-
/** Parent dashboard ID */
|
|
1187
|
-
dashboard_id: string;
|
|
1188
|
-
/** Version number */
|
|
1189
|
-
version_number: number;
|
|
1190
|
-
/** Commit message */
|
|
1191
|
-
message: string;
|
|
1192
|
-
/** Whether this is the current version */
|
|
1193
|
-
is_current: boolean;
|
|
1194
|
-
/** Whether this is a named snapshot */
|
|
1195
|
-
is_snapshot: boolean;
|
|
1196
|
-
/** Snapshot name (if is_snapshot) */
|
|
1197
|
-
snapshot_name?: string;
|
|
1198
|
-
/** Number of panels in this version */
|
|
1199
|
-
panel_count: number;
|
|
1200
|
-
/** Number of queries in this version */
|
|
1201
|
-
query_count: number;
|
|
1202
|
-
/** Creation timestamp */
|
|
1203
|
-
created_at: string;
|
|
1204
|
-
/** User/agent who created */
|
|
1205
|
-
created_by?: string;
|
|
1206
|
-
}
|
|
643
|
+
export type DashboardVersionItem = z.infer<typeof DashboardVersionItemSchema>;
|
|
1207
644
|
|
|
1208
645
|
/**
|
|
1209
646
|
* Payload for creating a named snapshot.
|
|
1210
647
|
*/
|
|
1211
|
-
export
|
|
1212
|
-
/** Snapshot name (must be unique within dashboard) */
|
|
1213
|
-
name: string;
|
|
1214
|
-
/** Snapshot description/message */
|
|
1215
|
-
message: string;
|
|
1216
|
-
}
|
|
648
|
+
export type CreateDashboardSnapshotPayload = z.infer<typeof CreateDashboardSnapshotPayloadSchema>;
|
|
1217
649
|
|
|
1218
650
|
/**
|
|
1219
651
|
* Payload for promoting a version to current.
|
|
1220
652
|
*/
|
|
1221
|
-
export
|
|
1222
|
-
/** Commit message for the promotion */
|
|
1223
|
-
message?: string;
|
|
1224
|
-
}
|
|
653
|
+
export type PromoteDashboardVersionPayload = z.infer<typeof PromoteDashboardVersionPayloadSchema>;
|