@agent-native/core 0.114.16 → 0.115.3
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/agent-native.eject.json +2 -0
- package/corpus/README.md +3 -3
- package/corpus/core/CHANGELOG.md +41 -0
- package/corpus/core/agent-native.eject.json +2 -0
- package/corpus/core/docs/content/agent-native-toolkit.mdx +16 -0
- package/corpus/core/docs/content/recurring-jobs.mdx +35 -6
- package/corpus/core/export-snapshot.json +4 -0
- package/corpus/core/package.json +5 -1
- package/corpus/core/src/action.ts +22 -1
- package/corpus/core/src/agent/production-agent.ts +122 -3
- package/corpus/core/src/cli/skills-content/visual-plan-skill.ts +19 -2
- package/corpus/core/src/cli/templates-meta.ts +12 -0
- package/corpus/core/src/client/AssistantChat.tsx +53 -26
- package/corpus/core/src/client/agent-page/AgentJobsTab.tsx +19 -0
- package/corpus/core/src/client/agent-page/use-jobs.ts +1 -0
- package/corpus/core/src/client/blocks/library/wireframe.tsx +3 -1
- package/corpus/core/src/client/chat/message-components.tsx +35 -1
- package/corpus/core/src/client/chat/tool-call-display.tsx +38 -3
- package/corpus/core/src/connections/catalog.ts +20 -1
- package/corpus/core/src/connections/reader.ts +65 -0
- package/corpus/core/src/dashboard-storage/index.ts +27 -0
- package/corpus/core/src/dashboard-storage/panel-source.ts +168 -0
- package/corpus/core/src/dashboard-storage/schema.ts +62 -0
- package/corpus/core/src/dashboard-storage/store.ts +333 -0
- package/corpus/core/src/deploy/build.ts +95 -16
- package/corpus/core/src/eject/provider-api-definitions.ts +1 -0
- package/corpus/core/src/eject/workspace-connections.ts +1 -0
- package/corpus/core/src/extensions/actions.ts +199 -73
- package/corpus/core/src/jobs/actions/list-recurring-jobs.ts +2 -0
- package/corpus/core/src/jobs/scheduler.ts +71 -4
- package/corpus/core/src/jobs/tools.ts +31 -1
- package/corpus/core/src/localization/default-messages.ts +1 -0
- package/corpus/core/src/mcp-client/index.ts +6 -0
- package/corpus/core/src/provider-api/actions/provider-api.ts +1 -1
- package/corpus/core/src/provider-api/index.ts +190 -5
- package/corpus/core/src/secrets/register-framework-secrets.ts +8 -0
- package/corpus/core/src/server/agent-chat/context-tools.ts +9 -0
- package/corpus/core/src/server/agent-chat/framework-prompts.ts +2 -2
- package/corpus/core/src/server/agent-chat-plugin.ts +22 -2
- package/corpus/core/src/server/core-routes-plugin.ts +1 -0
- package/corpus/core/src/server/credential-provider.ts +9 -3
- package/corpus/core/src/server/workspace-provider-oauth.ts +181 -4
- package/corpus/core/src/styles/agent-native.css +45 -2
- package/corpus/core/src/templates/default/.agents/skills/agent-native-docs/SKILL.md +27 -0
- package/corpus/core/src/templates/default/.agents/skills/app-branding/SKILL.md +159 -0
- package/corpus/core/src/templates/default/.agents/skills/app-permissions/SKILL.md +155 -0
- package/corpus/core/src/templates/headless/.agents/skills/agent-native-docs/SKILL.md +27 -0
- package/corpus/core/src/templates/workspace-core/.agents/skills/agent-native-docs/SKILL.md +27 -0
- package/corpus/core/src/templates/workspace-core/.agents/skills/extensions/SKILL.md +31 -18
- package/corpus/core/src/templates/workspace-core/.agents/skills/recurring-jobs/SKILL.md +15 -0
- package/corpus/core/src/triggers/actions.ts +11 -2
- package/corpus/core/src/triggers/dispatcher.ts +20 -1
- package/corpus/core/src/triggers/types.ts +5 -0
- package/corpus/core/src/vite/action-types-plugin.ts +9 -1
- package/corpus/templates/analytics/.agents/skills/agent-native-docs/SKILL.md +115 -0
- package/corpus/templates/analytics/AGENTS.md +11 -11
- package/corpus/templates/analytics/_gitignore +39 -0
- package/corpus/templates/analytics/actions/query-dashboard-panel.ts +30 -0
- package/corpus/templates/analytics/actions/update-dashboard.ts +2 -1
- package/corpus/templates/analytics/app/lib/sql-query.ts +11 -25
- package/corpus/templates/analytics/changelog/2026-07-21-fixed-extension-updates-failing-before-changes-could-be-appl.md +6 -0
- package/corpus/templates/analytics/server/lib/dashboard-panel-query.ts +1 -0
- package/corpus/templates/analytics/server/lib/dashboard-panel-source-resolver.ts +51 -0
- package/corpus/templates/analytics/server/lib/prometheus.ts +1 -1
- package/corpus/templates/analytics/server/plugins/agent-chat.ts +1 -1
- package/corpus/templates/assets/.agents/skills/agent-native-docs/SKILL.md +115 -0
- package/corpus/templates/brain/.agents/skills/agent-native-docs/SKILL.md +115 -0
- package/corpus/templates/calendar/.agents/skills/agent-native-docs/SKILL.md +115 -0
- package/corpus/templates/calendar/_gitignore +39 -0
- package/corpus/templates/chat/.agents/skills/agent-native-docs/SKILL.md +27 -0
- package/corpus/templates/chat/AGENTS.md +1 -1
- package/corpus/templates/clips/.agents/skills/agent-native-docs/SKILL.md +115 -0
- package/corpus/templates/clips/AGENTS.md +7 -0
- package/corpus/templates/clips/actions/prepare-crm-call-evidence.ts +58 -0
- package/corpus/templates/clips/app/components/recorder/recorder-engine.ts +88 -11
- package/corpus/templates/clips/changelog/2026-07-21-crm-call-evidence-handoff.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-21-recording-retries-and-restarts-keep-their-upload-session-so-.md +6 -0
- package/corpus/templates/clips/chrome-extension/src/background.ts +20 -5
- package/corpus/templates/clips/chrome-extension/src/native-recording-state.ts +19 -0
- package/corpus/templates/clips/chrome-extension/src/offscreen.ts +8 -0
- package/corpus/templates/clips/desktop/src/overlays/recording-pill.tsx +9 -0
- package/corpus/templates/clips/desktop/src-tauri/src/recording_indicator.rs +54 -28
- package/corpus/templates/clips/server/plugins/agent-chat.ts +1 -0
- package/corpus/templates/content/.agents/skills/agent-native-docs/SKILL.md +115 -0
- package/corpus/templates/content/_gitignore +39 -0
- package/corpus/templates/content/learnings.defaults.md +5 -0
- package/corpus/templates/crm/.agents/skills/agent-native-docs/SKILL.md +115 -0
- package/corpus/templates/crm/.agents/skills/agent-native-toolkit/SKILL.md +133 -0
- package/corpus/templates/crm/.agents/skills/crm/SKILL.md +128 -0
- package/corpus/templates/crm/.agents/skills/customizing-agent-native/SKILL.md +145 -0
- package/corpus/templates/crm/.agents/skills/feature-flags/SKILL.md +169 -0
- package/corpus/templates/crm/.agents/skills/upgrade-agent-native/SKILL.md +100 -0
- package/corpus/templates/crm/.env.example +5 -0
- package/corpus/templates/crm/AGENTS.md +120 -0
- package/corpus/templates/crm/CHANGELOG.md +1 -0
- package/corpus/templates/crm/DEVELOPING.md +66 -0
- package/corpus/templates/crm/README.md +106 -0
- package/corpus/templates/crm/_gitignore +12 -0
- package/corpus/templates/crm/actions/_crm-action-utils.ts +87 -0
- package/corpus/templates/crm/actions/_crm-dashboard.ts +69 -0
- package/corpus/templates/crm/actions/_crm-signal-utils.ts +79 -0
- package/corpus/templates/crm/actions/apply-crm-proposals.ts +203 -0
- package/corpus/templates/crm/actions/attach-call-evidence.ts +170 -0
- package/corpus/templates/crm/actions/configure-crm-connection.ts +126 -0
- package/corpus/templates/crm/actions/configure-native-crm.ts +44 -0
- package/corpus/templates/crm/actions/create-crm-record.ts +148 -0
- package/corpus/templates/crm/actions/create-crm-signal-tracker.ts +58 -0
- package/corpus/templates/crm/actions/delete-staged-dataset.ts +14 -0
- package/corpus/templates/crm/actions/get-crm-automation-recipe.ts +36 -0
- package/corpus/templates/crm/actions/get-crm-dashboard-panel.ts +33 -0
- package/corpus/templates/crm/actions/get-crm-dashboard.ts +14 -0
- package/corpus/templates/crm/actions/get-crm-overview.ts +13 -0
- package/corpus/templates/crm/actions/get-crm-pipeline-data.ts +61 -0
- package/corpus/templates/crm/actions/get-crm-record.ts +75 -0
- package/corpus/templates/crm/actions/install-crm-pipeline-dashboard.ts +81 -0
- package/corpus/templates/crm/actions/list-crm-dashboard-revisions.ts +15 -0
- package/corpus/templates/crm/actions/list-crm-dashboards.ts +15 -0
- package/corpus/templates/crm/actions/list-crm-proposals.ts +31 -0
- package/corpus/templates/crm/actions/list-crm-records.ts +79 -0
- package/corpus/templates/crm/actions/list-crm-saved-views.ts +15 -0
- package/corpus/templates/crm/actions/list-crm-signal-hits.ts +43 -0
- package/corpus/templates/crm/actions/list-crm-signal-trackers.ts +32 -0
- package/corpus/templates/crm/actions/list-crm-tasks.ts +22 -0
- package/corpus/templates/crm/actions/list-staged-datasets.ts +14 -0
- package/corpus/templates/crm/actions/list-workspace-connections.ts +47 -0
- package/corpus/templates/crm/actions/manage-crm-signal-tracker.ts +87 -0
- package/corpus/templates/crm/actions/manage-crm-task.ts +132 -0
- package/corpus/templates/crm/actions/navigate.ts +63 -0
- package/corpus/templates/crm/actions/provider-api-catalog.ts +22 -0
- package/corpus/templates/crm/actions/provider-api-docs.ts +54 -0
- package/corpus/templates/crm/actions/provider-api-request.ts +92 -0
- package/corpus/templates/crm/actions/query-staged-dataset.ts +44 -0
- package/corpus/templates/crm/actions/record-crm-call-insight.ts +160 -0
- package/corpus/templates/crm/actions/record-crm-smart-signal.ts +150 -0
- package/corpus/templates/crm/actions/restore-crm-dashboard-revision.ts +23 -0
- package/corpus/templates/crm/actions/review-crm-signal.ts +31 -0
- package/corpus/templates/crm/actions/run-crm-saved-view-program.ts +103 -0
- package/corpus/templates/crm/actions/run-crm-signal-trackers.ts +275 -0
- package/corpus/templates/crm/actions/run.ts +11 -0
- package/corpus/templates/crm/actions/save-crm-dashboard.ts +51 -0
- package/corpus/templates/crm/actions/save-crm-saved-view.ts +119 -0
- package/corpus/templates/crm/actions/sync-crm.ts +146 -0
- package/corpus/templates/crm/actions/update-crm-record.ts +508 -0
- package/corpus/templates/crm/actions/view-screen.ts +218 -0
- package/corpus/templates/crm/agent-native.app-skill.json +58 -0
- package/corpus/templates/crm/app/components/crm/CreateCrmRecordDialog.tsx +158 -0
- package/corpus/templates/crm/app/components/crm/CrmDashboardPanel.tsx +83 -0
- package/corpus/templates/crm/app/components/crm/CrmSignalsPanel.tsx +225 -0
- package/corpus/templates/crm/app/components/crm/IntelligenceSettings.tsx +413 -0
- package/corpus/templates/crm/app/components/crm/RecordActions.tsx +510 -0
- package/corpus/templates/crm/app/components/crm/RecordGrid.tsx +134 -0
- package/corpus/templates/crm/app/components/crm/RecordWorkspace.tsx +367 -0
- package/corpus/templates/crm/app/components/crm/SavedViewDataProgram.tsx +92 -0
- package/corpus/templates/crm/app/components/crm/Surface.tsx +96 -0
- package/corpus/templates/crm/app/components/crm/WorkOverview.tsx +180 -0
- package/corpus/templates/crm/app/components/layout/CrmLayout.tsx +106 -0
- package/corpus/templates/crm/app/components/layout/CrmSidebar.tsx +84 -0
- package/corpus/templates/crm/app/entry.client.tsx +16 -0
- package/corpus/templates/crm/app/entry.server.tsx +10 -0
- package/corpus/templates/crm/app/global.css +167 -0
- package/corpus/templates/crm/app/hooks/use-navigation-state.ts +60 -0
- package/corpus/templates/crm/app/i18n/en-US.ts +89 -0
- package/corpus/templates/crm/app/i18n/index.ts +34 -0
- package/corpus/templates/crm/app/lib/dashboard.ts +13 -0
- package/corpus/templates/crm/app/lib/navigation.ts +54 -0
- package/corpus/templates/crm/app/lib/tab-id.ts +1 -0
- package/corpus/templates/crm/app/lib/types.ts +172 -0
- package/corpus/templates/crm/app/lib/utils.ts +1 -0
- package/corpus/templates/crm/app/root.tsx +88 -0
- package/corpus/templates/crm/app/routes/_index.tsx +26 -0
- package/corpus/templates/crm/app/routes/accounts.tsx +41 -0
- package/corpus/templates/crm/app/routes/agent.tsx +5 -0
- package/corpus/templates/crm/app/routes/ask.tsx +53 -0
- package/corpus/templates/crm/app/routes/dashboard.tsx +118 -0
- package/corpus/templates/crm/app/routes/opportunities.tsx +41 -0
- package/corpus/templates/crm/app/routes/people.tsx +41 -0
- package/corpus/templates/crm/app/routes/proposals.tsx +266 -0
- package/corpus/templates/crm/app/routes/records.$recordId.tsx +35 -0
- package/corpus/templates/crm/app/routes/settings.tsx +63 -0
- package/corpus/templates/crm/app/routes/setup.tsx +308 -0
- package/corpus/templates/crm/app/routes/tasks.tsx +252 -0
- package/corpus/templates/crm/app/routes/views.tsx +333 -0
- package/corpus/templates/crm/app/routes.ts +17 -0
- package/corpus/templates/crm/app/vite-env.d.ts +6 -0
- package/corpus/templates/crm/changelog/2026-07-21-agent-native-crm.md +6 -0
- package/corpus/templates/crm/changelog/2026-07-21-clips-call-evidence-review-recipe.md +6 -0
- package/corpus/templates/crm/changelog/2026-07-21-crm-can-now-find-and-review-evidence-grounded-call-signals-w.md +6 -0
- package/corpus/templates/crm/changelog/2026-07-21-crm-can-now-manage-keyword-and-smart-call-signal-trackers-fr.md +6 -0
- package/corpus/templates/crm/changelog/2026-07-21-delegated-local-crm-automation.md +6 -0
- package/corpus/templates/crm/changelog/2026-07-21-native-sql.md +6 -0
- package/corpus/templates/crm/changelog/2026-07-21-pipeline-dashboard.md +6 -0
- package/corpus/templates/crm/changelog/2026-07-21-pipeline-dashboards-now-install-correctly-from-the-crm-actio.md +6 -0
- package/corpus/templates/crm/changelog/2026-07-21-salesforce-connection.md +6 -0
- package/corpus/templates/crm/components.json +20 -0
- package/corpus/templates/crm/docs/architecture/crm-contract.md +180 -0
- package/corpus/templates/crm/learnings.defaults.md +5 -0
- package/corpus/templates/crm/package.json +59 -0
- package/corpus/templates/crm/public/favicon.svg +1 -0
- package/corpus/templates/crm/public/icon-180.svg +1 -0
- package/corpus/templates/crm/public/manifest.json +11 -0
- package/corpus/templates/crm/react-router.config.ts +7 -0
- package/corpus/templates/crm/server/crm/adapter.ts +32 -0
- package/corpus/templates/crm/server/crm/crm-field-firewall.ts +64 -0
- package/corpus/templates/crm/server/crm/crm-mirror.ts +711 -0
- package/corpus/templates/crm/server/crm/hubspot-adapter.ts +1143 -0
- package/corpus/templates/crm/server/crm/native-adapter.ts +1715 -0
- package/corpus/templates/crm/server/crm/read-through.ts +207 -0
- package/corpus/templates/crm/server/crm/salesforce-adapter.ts +1255 -0
- package/corpus/templates/crm/server/db/crm-store.ts +1170 -0
- package/corpus/templates/crm/server/db/index.ts +169 -0
- package/corpus/templates/crm/server/db/schema.ts +441 -0
- package/corpus/templates/crm/server/lib/intelligence/default-detectors.ts +65 -0
- package/corpus/templates/crm/server/lib/intelligence/evidence.ts +105 -0
- package/corpus/templates/crm/server/lib/intelligence/keyword-detector.ts +100 -0
- package/corpus/templates/crm/server/lib/intelligence/smart-detector.ts +144 -0
- package/corpus/templates/crm/server/lib/intelligence/summary.ts +141 -0
- package/corpus/templates/crm/server/lib/provider-api.ts +64 -0
- package/corpus/templates/crm/server/middleware/auth.ts +4 -0
- package/corpus/templates/crm/server/plugins/agent-chat.ts +68 -0
- package/corpus/templates/crm/server/plugins/auth.ts +14 -0
- package/corpus/templates/crm/server/plugins/core-routes.ts +17 -0
- package/corpus/templates/crm/server/plugins/db.ts +454 -0
- package/corpus/templates/crm/server/routes/[...page].get.ts +5 -0
- package/corpus/templates/crm/shared/crm-automation-recipes.ts +132 -0
- package/corpus/templates/crm/shared/crm-contract.ts +254 -0
- package/corpus/templates/crm/shared/crm-sales-config.ts +63 -0
- package/corpus/templates/crm/ssr-entry.ts +11 -0
- package/corpus/templates/crm/tsconfig.json +24 -0
- package/corpus/templates/crm/vite.config.ts +15 -0
- package/corpus/templates/crm/vitest.config.ts +5 -0
- package/corpus/templates/design/.agents/skills/agent-native-docs/SKILL.md +115 -0
- package/corpus/templates/dispatch/.agents/skills/agent-native-docs/SKILL.md +115 -0
- package/corpus/templates/forms/.agents/skills/agent-native-docs/SKILL.md +115 -0
- package/corpus/templates/forms/_gitignore +39 -0
- package/corpus/templates/forms/learnings.defaults.md +5 -0
- package/corpus/templates/macros/.agents/skills/agent-native-docs/SKILL.md +115 -0
- package/corpus/templates/macros/_gitignore +39 -0
- package/corpus/templates/macros/learnings.defaults.md +5 -0
- package/corpus/templates/mail/.agents/skills/agent-native-docs/SKILL.md +115 -0
- package/corpus/templates/mail/_gitignore +39 -0
- package/corpus/templates/plan/.agents/skills/agent-native-docs/SKILL.md +115 -0
- package/corpus/templates/plan/.agents/skills/visual-plan/SKILL.md +19 -2
- package/corpus/templates/plan/AGENTS.md +10 -0
- package/corpus/templates/plan/actions/create-prototype-plan.ts +27 -3
- package/corpus/templates/plan/actions/get-plan-blocks.ts +1 -1
- package/corpus/templates/plan/actions/update-visual-plan.ts +3 -2
- package/corpus/templates/plan/app/components/plan/PlanContentRenderer.tsx +18 -4
- package/corpus/templates/plan/app/components/plan/PlanVisualSurface.tsx +10 -3
- package/corpus/templates/plan/app/components/plan/wireframe/Wireframe.tsx +3 -1
- package/corpus/templates/plan/app/i18n/en-US.ts +6 -0
- package/corpus/templates/plan/app/lib/create-plan-routing.ts +39 -0
- package/corpus/templates/plan/app/pages/PlansPage.tsx +31 -107
- package/corpus/templates/plan/changelog/2026-07-22-high-fidelity-mockup-requests-now-preserve-branded-css-use-d.md +6 -0
- package/corpus/templates/plan/shared/plan-content.ts +110 -2
- package/corpus/templates/slides/.agents/skills/agent-native-docs/SKILL.md +115 -0
- package/corpus/templates/slides/_gitignore +39 -0
- package/corpus/templates/tasks/.agents/skills/agent-native-docs/SKILL.md +27 -0
- package/corpus/templates/tasks/_gitignore +39 -0
- package/corpus/toolkit/CHANGELOG.md +12 -0
- package/corpus/toolkit/README.md +30 -0
- package/corpus/toolkit/agent-native.eject.json +33 -0
- package/corpus/toolkit/package.json +15 -1
- package/corpus/toolkit/src/dashboard/DataTable.tsx +273 -0
- package/corpus/toolkit/src/dashboard/DateRangePicker.tsx +57 -0
- package/corpus/toolkit/src/dashboard/GenericChartPanel.tsx +461 -0
- package/corpus/toolkit/src/dashboard/MetricCard.tsx +54 -0
- package/corpus/toolkit/src/dashboard/StatsCard.tsx +49 -0
- package/corpus/toolkit/src/dashboard/dashboard-layout.ts +329 -0
- package/corpus/toolkit/src/dashboard/index.ts +6 -0
- package/corpus/toolkit/src/index.ts +1 -0
- package/corpus/toolkit/src/ui/calendar.tsx +8 -8
- package/corpus/toolkit/src/ui/date-picker.tsx +4 -1
- package/dist/action.d.ts +14 -1
- package/dist/action.d.ts.map +1 -1
- package/dist/action.js.map +1 -1
- package/dist/agent/production-agent.d.ts +3 -1
- package/dist/agent/production-agent.d.ts.map +1 -1
- package/dist/agent/production-agent.js +97 -3
- package/dist/agent/production-agent.js.map +1 -1
- package/dist/cli/skills-content/visual-plan-skill.d.ts +1 -1
- package/dist/cli/skills-content/visual-plan-skill.d.ts.map +1 -1
- package/dist/cli/skills-content/visual-plan-skill.js +19 -2
- package/dist/cli/skills-content/visual-plan-skill.js.map +1 -1
- package/dist/cli/templates-meta.d.ts.map +1 -1
- package/dist/cli/templates-meta.js +12 -0
- package/dist/cli/templates-meta.js.map +1 -1
- package/dist/client/AssistantChat.d.ts +4 -0
- package/dist/client/AssistantChat.d.ts.map +1 -1
- package/dist/client/AssistantChat.js +30 -17
- package/dist/client/AssistantChat.js.map +1 -1
- package/dist/client/agent-page/AgentJobsTab.d.ts.map +1 -1
- package/dist/client/agent-page/AgentJobsTab.js +3 -1
- package/dist/client/agent-page/AgentJobsTab.js.map +1 -1
- package/dist/client/agent-page/use-jobs.d.ts +1 -0
- package/dist/client/agent-page/use-jobs.d.ts.map +1 -1
- package/dist/client/agent-page/use-jobs.js.map +1 -1
- package/dist/client/blocks/library/wireframe.d.ts.map +1 -1
- package/dist/client/blocks/library/wireframe.js +3 -2
- package/dist/client/blocks/library/wireframe.js.map +1 -1
- package/dist/client/chat/message-components.d.ts +5 -0
- package/dist/client/chat/message-components.d.ts.map +1 -1
- package/dist/client/chat/message-components.js +17 -1
- package/dist/client/chat/message-components.js.map +1 -1
- package/dist/client/chat/tool-call-display.d.ts +3 -1
- package/dist/client/chat/tool-call-display.d.ts.map +1 -1
- package/dist/client/chat/tool-call-display.js +17 -7
- package/dist/client/chat/tool-call-display.js.map +1 -1
- package/dist/collab/routes.d.ts +1 -1
- package/dist/collab/struct-routes.d.ts +1 -1
- package/dist/connections/catalog.d.ts +17 -3
- package/dist/connections/catalog.d.ts.map +1 -1
- package/dist/connections/catalog.js +16 -1
- package/dist/connections/catalog.js.map +1 -1
- package/dist/connections/reader.d.ts +18 -0
- package/dist/connections/reader.d.ts.map +1 -1
- package/dist/connections/reader.js +41 -0
- package/dist/connections/reader.js.map +1 -1
- package/dist/dashboard-storage/index.d.ts +4 -0
- package/dist/dashboard-storage/index.d.ts.map +1 -0
- package/dist/dashboard-storage/index.js +4 -0
- package/dist/dashboard-storage/index.js.map +1 -0
- package/dist/dashboard-storage/panel-source.d.ts +68 -0
- package/dist/dashboard-storage/panel-source.d.ts.map +1 -0
- package/dist/dashboard-storage/panel-source.js +76 -0
- package/dist/dashboard-storage/panel-source.js.map +1 -0
- package/dist/dashboard-storage/schema.d.ts +562 -0
- package/dist/dashboard-storage/schema.d.ts.map +1 -0
- package/dist/dashboard-storage/schema.js +32 -0
- package/dist/dashboard-storage/schema.js.map +1 -0
- package/dist/dashboard-storage/store.d.ts +62 -0
- package/dist/dashboard-storage/store.d.ts.map +1 -0
- package/dist/dashboard-storage/store.js +227 -0
- package/dist/dashboard-storage/store.js.map +1 -0
- package/dist/deploy/build.d.ts +7 -0
- package/dist/deploy/build.d.ts.map +1 -1
- package/dist/deploy/build.js +78 -14
- package/dist/deploy/build.js.map +1 -1
- package/dist/eject/provider-api-definitions.d.ts +2 -1
- package/dist/eject/provider-api-definitions.d.ts.map +1 -1
- package/dist/eject/provider-api-definitions.js +1 -0
- package/dist/eject/provider-api-definitions.js.map +1 -1
- package/dist/eject/workspace-connections.d.ts.map +1 -1
- package/dist/eject/workspace-connections.js +1 -0
- package/dist/eject/workspace-connections.js.map +1 -1
- package/dist/extensions/actions.d.ts.map +1 -1
- package/dist/extensions/actions.js +165 -67
- package/dist/extensions/actions.js.map +1 -1
- package/dist/file-upload/actions/upload-image.d.ts +1 -1
- package/dist/jobs/actions/list-recurring-jobs.d.ts +1 -0
- package/dist/jobs/actions/list-recurring-jobs.d.ts.map +1 -1
- package/dist/jobs/actions/list-recurring-jobs.js +1 -0
- package/dist/jobs/actions/list-recurring-jobs.js.map +1 -1
- package/dist/jobs/scheduler.d.ts +17 -2
- package/dist/jobs/scheduler.d.ts.map +1 -1
- package/dist/jobs/scheduler.js +51 -2
- package/dist/jobs/scheduler.js.map +1 -1
- package/dist/jobs/tools.d.ts.map +1 -1
- package/dist/jobs/tools.js +32 -2
- package/dist/jobs/tools.js.map +1 -1
- package/dist/localization/default-messages.d.ts +1 -0
- package/dist/localization/default-messages.d.ts.map +1 -1
- package/dist/localization/default-messages.js +1 -0
- package/dist/localization/default-messages.js.map +1 -1
- package/dist/mcp-client/index.d.ts +2 -0
- package/dist/mcp-client/index.d.ts.map +1 -1
- package/dist/mcp-client/index.js +5 -0
- package/dist/mcp-client/index.js.map +1 -1
- package/dist/notifications/routes.d.ts +3 -3
- package/dist/progress/routes.d.ts +1 -1
- package/dist/provider-api/actions/custom-provider-registration.d.ts +8 -8
- package/dist/provider-api/actions/provider-api.d.ts +8 -6
- package/dist/provider-api/actions/provider-api.d.ts.map +1 -1
- package/dist/provider-api/actions/provider-api.js +1 -1
- package/dist/provider-api/actions/provider-api.js.map +1 -1
- package/dist/provider-api/index.d.ts +11 -7
- package/dist/provider-api/index.d.ts.map +1 -1
- package/dist/provider-api/index.js +143 -5
- package/dist/provider-api/index.js.map +1 -1
- package/dist/resources/handlers.d.ts +1 -1
- package/dist/secrets/register-framework-secrets.d.ts.map +1 -1
- package/dist/secrets/register-framework-secrets.js +7 -0
- package/dist/secrets/register-framework-secrets.js.map +1 -1
- package/dist/server/agent-chat/context-tools.d.ts.map +1 -1
- package/dist/server/agent-chat/context-tools.js +9 -0
- package/dist/server/agent-chat/context-tools.js.map +1 -1
- package/dist/server/agent-chat/framework-prompts.js +2 -2
- package/dist/server/agent-chat/framework-prompts.js.map +1 -1
- package/dist/server/agent-chat-plugin.d.ts.map +1 -1
- package/dist/server/agent-chat-plugin.js +18 -2
- package/dist/server/agent-chat-plugin.js.map +1 -1
- package/dist/server/core-routes-plugin.d.ts.map +1 -1
- package/dist/server/core-routes-plugin.js +1 -0
- package/dist/server/core-routes-plugin.js.map +1 -1
- package/dist/server/credential-provider.d.ts +4 -3
- package/dist/server/credential-provider.d.ts.map +1 -1
- package/dist/server/credential-provider.js +9 -3
- package/dist/server/credential-provider.js.map +1 -1
- package/dist/server/workspace-provider-oauth.d.ts +6 -1
- package/dist/server/workspace-provider-oauth.d.ts.map +1 -1
- package/dist/server/workspace-provider-oauth.js +141 -4
- package/dist/server/workspace-provider-oauth.js.map +1 -1
- package/dist/styles/agent-native.css +45 -2
- package/dist/templates/chat/.agents/skills/agent-native-docs/SKILL.md +27 -0
- package/dist/templates/chat/AGENTS.md +1 -1
- package/dist/templates/default/.agents/skills/agent-native-docs/SKILL.md +27 -0
- package/dist/templates/default/.agents/skills/app-branding/SKILL.md +159 -0
- package/dist/templates/default/.agents/skills/app-permissions/SKILL.md +155 -0
- package/dist/templates/headless/.agents/skills/agent-native-docs/SKILL.md +27 -0
- package/dist/templates/workspace-core/.agents/skills/agent-native-docs/SKILL.md +27 -0
- package/dist/templates/workspace-core/.agents/skills/extensions/SKILL.md +31 -18
- package/dist/templates/workspace-core/.agents/skills/recurring-jobs/SKILL.md +15 -0
- package/dist/triggers/actions.d.ts.map +1 -1
- package/dist/triggers/actions.js +10 -2
- package/dist/triggers/actions.js.map +1 -1
- package/dist/triggers/dispatcher.d.ts.map +1 -1
- package/dist/triggers/dispatcher.js +15 -0
- package/dist/triggers/dispatcher.js.map +1 -1
- package/dist/triggers/types.d.ts +5 -0
- package/dist/triggers/types.d.ts.map +1 -1
- package/dist/triggers/types.js.map +1 -1
- package/dist/vite/action-types-plugin.d.ts.map +1 -1
- package/dist/vite/action-types-plugin.js +4 -1
- package/dist/vite/action-types-plugin.js.map +1 -1
- package/docs/content/agent-native-toolkit.mdx +16 -0
- package/docs/content/recurring-jobs.mdx +35 -6
- package/package.json +7 -3
- package/src/action.ts +22 -1
- package/src/agent/production-agent.ts +122 -3
- package/src/cli/skills-content/visual-plan-skill.ts +19 -2
- package/src/cli/templates-meta.ts +12 -0
- package/src/client/AssistantChat.tsx +53 -26
- package/src/client/agent-page/AgentJobsTab.tsx +19 -0
- package/src/client/agent-page/use-jobs.ts +1 -0
- package/src/client/blocks/library/wireframe.tsx +3 -1
- package/src/client/chat/message-components.tsx +35 -1
- package/src/client/chat/tool-call-display.tsx +38 -3
- package/src/connections/catalog.ts +20 -1
- package/src/connections/reader.ts +65 -0
- package/src/dashboard-storage/index.ts +27 -0
- package/src/dashboard-storage/panel-source.ts +168 -0
- package/src/dashboard-storage/schema.ts +62 -0
- package/src/dashboard-storage/store.ts +333 -0
- package/src/deploy/build.ts +95 -16
- package/src/eject/provider-api-definitions.ts +1 -0
- package/src/eject/workspace-connections.ts +1 -0
- package/src/extensions/actions.ts +199 -73
- package/src/jobs/actions/list-recurring-jobs.ts +2 -0
- package/src/jobs/scheduler.ts +71 -4
- package/src/jobs/tools.ts +31 -1
- package/src/localization/default-messages.ts +1 -0
- package/src/mcp-client/index.ts +6 -0
- package/src/provider-api/actions/provider-api.ts +1 -1
- package/src/provider-api/index.ts +190 -5
- package/src/secrets/register-framework-secrets.ts +8 -0
- package/src/server/agent-chat/context-tools.ts +9 -0
- package/src/server/agent-chat/framework-prompts.ts +2 -2
- package/src/server/agent-chat-plugin.ts +22 -2
- package/src/server/core-routes-plugin.ts +1 -0
- package/src/server/credential-provider.ts +9 -3
- package/src/server/workspace-provider-oauth.ts +181 -4
- package/src/styles/agent-native.css +45 -2
- package/src/templates/chat/.agents/skills/agent-native-docs/SKILL.md +27 -0
- package/src/templates/chat/AGENTS.md +1 -1
- package/src/templates/default/.agents/skills/agent-native-docs/SKILL.md +27 -0
- package/src/templates/default/.agents/skills/app-branding/SKILL.md +159 -0
- package/src/templates/default/.agents/skills/app-permissions/SKILL.md +155 -0
- package/src/templates/headless/.agents/skills/agent-native-docs/SKILL.md +27 -0
- package/src/templates/workspace-core/.agents/skills/agent-native-docs/SKILL.md +27 -0
- package/src/templates/workspace-core/.agents/skills/extensions/SKILL.md +31 -18
- package/src/templates/workspace-core/.agents/skills/recurring-jobs/SKILL.md +15 -0
- package/src/triggers/actions.ts +11 -2
- package/src/triggers/dispatcher.ts +20 -1
- package/src/triggers/types.ts +5 -0
- package/src/vite/action-types-plugin.ts +9 -1
- package/corpus/templates/analytics/server/handlers/sql-query.ts +0 -36
- package/corpus/templates/analytics/server/routes/api/sql-query.post.ts +0 -1
|
@@ -0,0 +1,562 @@
|
|
|
1
|
+
export interface DashboardStorageSchemaOptions {
|
|
2
|
+
dashboardsTable?: string;
|
|
3
|
+
revisionsTable?: string;
|
|
4
|
+
sharesTable?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function createDashboardStorageSchema(options?: DashboardStorageSchemaOptions): {
|
|
7
|
+
dashboards: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
|
|
8
|
+
name: string;
|
|
9
|
+
schema: undefined;
|
|
10
|
+
columns: {
|
|
11
|
+
ownerEmail: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
12
|
+
name: "owner_email";
|
|
13
|
+
tableName: string;
|
|
14
|
+
dataType: "string";
|
|
15
|
+
columnType: "SQLiteText";
|
|
16
|
+
data: string;
|
|
17
|
+
driverParam: string;
|
|
18
|
+
notNull: true;
|
|
19
|
+
hasDefault: true;
|
|
20
|
+
isPrimaryKey: false;
|
|
21
|
+
isAutoincrement: false;
|
|
22
|
+
hasRuntimeDefault: false;
|
|
23
|
+
enumValues: [string, ...string[]];
|
|
24
|
+
baseColumn: never;
|
|
25
|
+
identity: undefined;
|
|
26
|
+
generated: undefined;
|
|
27
|
+
}, {}, {
|
|
28
|
+
length: number | undefined;
|
|
29
|
+
}>;
|
|
30
|
+
orgId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
31
|
+
name: "org_id";
|
|
32
|
+
tableName: string;
|
|
33
|
+
dataType: "string";
|
|
34
|
+
columnType: "SQLiteText";
|
|
35
|
+
data: string;
|
|
36
|
+
driverParam: string;
|
|
37
|
+
notNull: false;
|
|
38
|
+
hasDefault: false;
|
|
39
|
+
isPrimaryKey: false;
|
|
40
|
+
isAutoincrement: false;
|
|
41
|
+
hasRuntimeDefault: false;
|
|
42
|
+
enumValues: [string, ...string[]];
|
|
43
|
+
baseColumn: never;
|
|
44
|
+
identity: undefined;
|
|
45
|
+
generated: undefined;
|
|
46
|
+
}, {}, {
|
|
47
|
+
length: number | undefined;
|
|
48
|
+
}>;
|
|
49
|
+
visibility: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
50
|
+
name: "visibility";
|
|
51
|
+
tableName: string;
|
|
52
|
+
dataType: "string";
|
|
53
|
+
columnType: "SQLiteText";
|
|
54
|
+
data: "org" | "private" | "public";
|
|
55
|
+
driverParam: string;
|
|
56
|
+
notNull: true;
|
|
57
|
+
hasDefault: true;
|
|
58
|
+
isPrimaryKey: false;
|
|
59
|
+
isAutoincrement: false;
|
|
60
|
+
hasRuntimeDefault: false;
|
|
61
|
+
enumValues: ["private", "org", "public"];
|
|
62
|
+
baseColumn: never;
|
|
63
|
+
identity: undefined;
|
|
64
|
+
generated: undefined;
|
|
65
|
+
}, {}, {
|
|
66
|
+
length: number | undefined;
|
|
67
|
+
}>;
|
|
68
|
+
id: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
69
|
+
name: "id";
|
|
70
|
+
tableName: string;
|
|
71
|
+
dataType: "string";
|
|
72
|
+
columnType: "SQLiteText";
|
|
73
|
+
data: string;
|
|
74
|
+
driverParam: string;
|
|
75
|
+
notNull: true;
|
|
76
|
+
hasDefault: false;
|
|
77
|
+
isPrimaryKey: true;
|
|
78
|
+
isAutoincrement: false;
|
|
79
|
+
hasRuntimeDefault: false;
|
|
80
|
+
enumValues: [string, ...string[]];
|
|
81
|
+
baseColumn: never;
|
|
82
|
+
identity: undefined;
|
|
83
|
+
generated: undefined;
|
|
84
|
+
}, {}, {
|
|
85
|
+
length: number | undefined;
|
|
86
|
+
}>;
|
|
87
|
+
kind: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
88
|
+
name: "kind";
|
|
89
|
+
tableName: string;
|
|
90
|
+
dataType: "string";
|
|
91
|
+
columnType: "SQLiteText";
|
|
92
|
+
data: string;
|
|
93
|
+
driverParam: string;
|
|
94
|
+
notNull: true;
|
|
95
|
+
hasDefault: false;
|
|
96
|
+
isPrimaryKey: false;
|
|
97
|
+
isAutoincrement: false;
|
|
98
|
+
hasRuntimeDefault: false;
|
|
99
|
+
enumValues: [string, ...string[]];
|
|
100
|
+
baseColumn: never;
|
|
101
|
+
identity: undefined;
|
|
102
|
+
generated: undefined;
|
|
103
|
+
}, {}, {
|
|
104
|
+
length: number | undefined;
|
|
105
|
+
}>;
|
|
106
|
+
title: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
107
|
+
name: "title";
|
|
108
|
+
tableName: string;
|
|
109
|
+
dataType: "string";
|
|
110
|
+
columnType: "SQLiteText";
|
|
111
|
+
data: string;
|
|
112
|
+
driverParam: string;
|
|
113
|
+
notNull: true;
|
|
114
|
+
hasDefault: true;
|
|
115
|
+
isPrimaryKey: false;
|
|
116
|
+
isAutoincrement: false;
|
|
117
|
+
hasRuntimeDefault: false;
|
|
118
|
+
enumValues: [string, ...string[]];
|
|
119
|
+
baseColumn: never;
|
|
120
|
+
identity: undefined;
|
|
121
|
+
generated: undefined;
|
|
122
|
+
}, {}, {
|
|
123
|
+
length: number | undefined;
|
|
124
|
+
}>;
|
|
125
|
+
config: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
126
|
+
name: "config";
|
|
127
|
+
tableName: string;
|
|
128
|
+
dataType: "string";
|
|
129
|
+
columnType: "SQLiteText";
|
|
130
|
+
data: string;
|
|
131
|
+
driverParam: string;
|
|
132
|
+
notNull: true;
|
|
133
|
+
hasDefault: false;
|
|
134
|
+
isPrimaryKey: false;
|
|
135
|
+
isAutoincrement: false;
|
|
136
|
+
hasRuntimeDefault: false;
|
|
137
|
+
enumValues: [string, ...string[]];
|
|
138
|
+
baseColumn: never;
|
|
139
|
+
identity: undefined;
|
|
140
|
+
generated: undefined;
|
|
141
|
+
}, {}, {
|
|
142
|
+
length: number | undefined;
|
|
143
|
+
}>;
|
|
144
|
+
createdAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
145
|
+
name: "created_at";
|
|
146
|
+
tableName: string;
|
|
147
|
+
dataType: "string";
|
|
148
|
+
columnType: "SQLiteText";
|
|
149
|
+
data: string;
|
|
150
|
+
driverParam: string;
|
|
151
|
+
notNull: true;
|
|
152
|
+
hasDefault: true;
|
|
153
|
+
isPrimaryKey: false;
|
|
154
|
+
isAutoincrement: false;
|
|
155
|
+
hasRuntimeDefault: false;
|
|
156
|
+
enumValues: [string, ...string[]];
|
|
157
|
+
baseColumn: never;
|
|
158
|
+
identity: undefined;
|
|
159
|
+
generated: undefined;
|
|
160
|
+
}, {}, {
|
|
161
|
+
length: number | undefined;
|
|
162
|
+
}>;
|
|
163
|
+
updatedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
164
|
+
name: "updated_at";
|
|
165
|
+
tableName: string;
|
|
166
|
+
dataType: "string";
|
|
167
|
+
columnType: "SQLiteText";
|
|
168
|
+
data: string;
|
|
169
|
+
driverParam: string;
|
|
170
|
+
notNull: true;
|
|
171
|
+
hasDefault: true;
|
|
172
|
+
isPrimaryKey: false;
|
|
173
|
+
isAutoincrement: false;
|
|
174
|
+
hasRuntimeDefault: false;
|
|
175
|
+
enumValues: [string, ...string[]];
|
|
176
|
+
baseColumn: never;
|
|
177
|
+
identity: undefined;
|
|
178
|
+
generated: undefined;
|
|
179
|
+
}, {}, {
|
|
180
|
+
length: number | undefined;
|
|
181
|
+
}>;
|
|
182
|
+
updatedBy: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
183
|
+
name: "updated_by";
|
|
184
|
+
tableName: string;
|
|
185
|
+
dataType: "string";
|
|
186
|
+
columnType: "SQLiteText";
|
|
187
|
+
data: string;
|
|
188
|
+
driverParam: string;
|
|
189
|
+
notNull: false;
|
|
190
|
+
hasDefault: false;
|
|
191
|
+
isPrimaryKey: false;
|
|
192
|
+
isAutoincrement: false;
|
|
193
|
+
hasRuntimeDefault: false;
|
|
194
|
+
enumValues: [string, ...string[]];
|
|
195
|
+
baseColumn: never;
|
|
196
|
+
identity: undefined;
|
|
197
|
+
generated: undefined;
|
|
198
|
+
}, {}, {
|
|
199
|
+
length: number | undefined;
|
|
200
|
+
}>;
|
|
201
|
+
archivedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
202
|
+
name: "archived_at";
|
|
203
|
+
tableName: string;
|
|
204
|
+
dataType: "string";
|
|
205
|
+
columnType: "SQLiteText";
|
|
206
|
+
data: string;
|
|
207
|
+
driverParam: string;
|
|
208
|
+
notNull: false;
|
|
209
|
+
hasDefault: false;
|
|
210
|
+
isPrimaryKey: false;
|
|
211
|
+
isAutoincrement: false;
|
|
212
|
+
hasRuntimeDefault: false;
|
|
213
|
+
enumValues: [string, ...string[]];
|
|
214
|
+
baseColumn: never;
|
|
215
|
+
identity: undefined;
|
|
216
|
+
generated: undefined;
|
|
217
|
+
}, {}, {
|
|
218
|
+
length: number | undefined;
|
|
219
|
+
}>;
|
|
220
|
+
};
|
|
221
|
+
dialect: 'sqlite';
|
|
222
|
+
}>;
|
|
223
|
+
dashboardRevisions: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
|
|
224
|
+
name: string;
|
|
225
|
+
schema: undefined;
|
|
226
|
+
columns: {
|
|
227
|
+
ownerEmail: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
228
|
+
name: "owner_email";
|
|
229
|
+
tableName: string;
|
|
230
|
+
dataType: "string";
|
|
231
|
+
columnType: "SQLiteText";
|
|
232
|
+
data: string;
|
|
233
|
+
driverParam: string;
|
|
234
|
+
notNull: true;
|
|
235
|
+
hasDefault: true;
|
|
236
|
+
isPrimaryKey: false;
|
|
237
|
+
isAutoincrement: false;
|
|
238
|
+
hasRuntimeDefault: false;
|
|
239
|
+
enumValues: [string, ...string[]];
|
|
240
|
+
baseColumn: never;
|
|
241
|
+
identity: undefined;
|
|
242
|
+
generated: undefined;
|
|
243
|
+
}, {}, {
|
|
244
|
+
length: number | undefined;
|
|
245
|
+
}>;
|
|
246
|
+
orgId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
247
|
+
name: "org_id";
|
|
248
|
+
tableName: string;
|
|
249
|
+
dataType: "string";
|
|
250
|
+
columnType: "SQLiteText";
|
|
251
|
+
data: string;
|
|
252
|
+
driverParam: string;
|
|
253
|
+
notNull: false;
|
|
254
|
+
hasDefault: false;
|
|
255
|
+
isPrimaryKey: false;
|
|
256
|
+
isAutoincrement: false;
|
|
257
|
+
hasRuntimeDefault: false;
|
|
258
|
+
enumValues: [string, ...string[]];
|
|
259
|
+
baseColumn: never;
|
|
260
|
+
identity: undefined;
|
|
261
|
+
generated: undefined;
|
|
262
|
+
}, {}, {
|
|
263
|
+
length: number | undefined;
|
|
264
|
+
}>;
|
|
265
|
+
visibility: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
266
|
+
name: "visibility";
|
|
267
|
+
tableName: string;
|
|
268
|
+
dataType: "string";
|
|
269
|
+
columnType: "SQLiteText";
|
|
270
|
+
data: "org" | "private" | "public";
|
|
271
|
+
driverParam: string;
|
|
272
|
+
notNull: true;
|
|
273
|
+
hasDefault: true;
|
|
274
|
+
isPrimaryKey: false;
|
|
275
|
+
isAutoincrement: false;
|
|
276
|
+
hasRuntimeDefault: false;
|
|
277
|
+
enumValues: ["private", "org", "public"];
|
|
278
|
+
baseColumn: never;
|
|
279
|
+
identity: undefined;
|
|
280
|
+
generated: undefined;
|
|
281
|
+
}, {}, {
|
|
282
|
+
length: number | undefined;
|
|
283
|
+
}>;
|
|
284
|
+
id: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
285
|
+
name: "id";
|
|
286
|
+
tableName: string;
|
|
287
|
+
dataType: "string";
|
|
288
|
+
columnType: "SQLiteText";
|
|
289
|
+
data: string;
|
|
290
|
+
driverParam: string;
|
|
291
|
+
notNull: true;
|
|
292
|
+
hasDefault: false;
|
|
293
|
+
isPrimaryKey: true;
|
|
294
|
+
isAutoincrement: false;
|
|
295
|
+
hasRuntimeDefault: false;
|
|
296
|
+
enumValues: [string, ...string[]];
|
|
297
|
+
baseColumn: never;
|
|
298
|
+
identity: undefined;
|
|
299
|
+
generated: undefined;
|
|
300
|
+
}, {}, {
|
|
301
|
+
length: number | undefined;
|
|
302
|
+
}>;
|
|
303
|
+
dashboardId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
304
|
+
name: "dashboard_id";
|
|
305
|
+
tableName: string;
|
|
306
|
+
dataType: "string";
|
|
307
|
+
columnType: "SQLiteText";
|
|
308
|
+
data: string;
|
|
309
|
+
driverParam: string;
|
|
310
|
+
notNull: true;
|
|
311
|
+
hasDefault: false;
|
|
312
|
+
isPrimaryKey: false;
|
|
313
|
+
isAutoincrement: false;
|
|
314
|
+
hasRuntimeDefault: false;
|
|
315
|
+
enumValues: [string, ...string[]];
|
|
316
|
+
baseColumn: never;
|
|
317
|
+
identity: undefined;
|
|
318
|
+
generated: undefined;
|
|
319
|
+
}, {}, {
|
|
320
|
+
length: number | undefined;
|
|
321
|
+
}>;
|
|
322
|
+
kind: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
323
|
+
name: "kind";
|
|
324
|
+
tableName: string;
|
|
325
|
+
dataType: "string";
|
|
326
|
+
columnType: "SQLiteText";
|
|
327
|
+
data: string;
|
|
328
|
+
driverParam: string;
|
|
329
|
+
notNull: true;
|
|
330
|
+
hasDefault: false;
|
|
331
|
+
isPrimaryKey: false;
|
|
332
|
+
isAutoincrement: false;
|
|
333
|
+
hasRuntimeDefault: false;
|
|
334
|
+
enumValues: [string, ...string[]];
|
|
335
|
+
baseColumn: never;
|
|
336
|
+
identity: undefined;
|
|
337
|
+
generated: undefined;
|
|
338
|
+
}, {}, {
|
|
339
|
+
length: number | undefined;
|
|
340
|
+
}>;
|
|
341
|
+
title: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
342
|
+
name: "title";
|
|
343
|
+
tableName: string;
|
|
344
|
+
dataType: "string";
|
|
345
|
+
columnType: "SQLiteText";
|
|
346
|
+
data: string;
|
|
347
|
+
driverParam: string;
|
|
348
|
+
notNull: true;
|
|
349
|
+
hasDefault: false;
|
|
350
|
+
isPrimaryKey: false;
|
|
351
|
+
isAutoincrement: false;
|
|
352
|
+
hasRuntimeDefault: false;
|
|
353
|
+
enumValues: [string, ...string[]];
|
|
354
|
+
baseColumn: never;
|
|
355
|
+
identity: undefined;
|
|
356
|
+
generated: undefined;
|
|
357
|
+
}, {}, {
|
|
358
|
+
length: number | undefined;
|
|
359
|
+
}>;
|
|
360
|
+
config: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
361
|
+
name: "config";
|
|
362
|
+
tableName: string;
|
|
363
|
+
dataType: "string";
|
|
364
|
+
columnType: "SQLiteText";
|
|
365
|
+
data: string;
|
|
366
|
+
driverParam: string;
|
|
367
|
+
notNull: true;
|
|
368
|
+
hasDefault: false;
|
|
369
|
+
isPrimaryKey: false;
|
|
370
|
+
isAutoincrement: false;
|
|
371
|
+
hasRuntimeDefault: false;
|
|
372
|
+
enumValues: [string, ...string[]];
|
|
373
|
+
baseColumn: never;
|
|
374
|
+
identity: undefined;
|
|
375
|
+
generated: undefined;
|
|
376
|
+
}, {}, {
|
|
377
|
+
length: number | undefined;
|
|
378
|
+
}>;
|
|
379
|
+
createdAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
380
|
+
name: "created_at";
|
|
381
|
+
tableName: string;
|
|
382
|
+
dataType: "string";
|
|
383
|
+
columnType: "SQLiteText";
|
|
384
|
+
data: string;
|
|
385
|
+
driverParam: string;
|
|
386
|
+
notNull: true;
|
|
387
|
+
hasDefault: true;
|
|
388
|
+
isPrimaryKey: false;
|
|
389
|
+
isAutoincrement: false;
|
|
390
|
+
hasRuntimeDefault: false;
|
|
391
|
+
enumValues: [string, ...string[]];
|
|
392
|
+
baseColumn: never;
|
|
393
|
+
identity: undefined;
|
|
394
|
+
generated: undefined;
|
|
395
|
+
}, {}, {
|
|
396
|
+
length: number | undefined;
|
|
397
|
+
}>;
|
|
398
|
+
createdBy: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
399
|
+
name: "created_by";
|
|
400
|
+
tableName: string;
|
|
401
|
+
dataType: "string";
|
|
402
|
+
columnType: "SQLiteText";
|
|
403
|
+
data: string;
|
|
404
|
+
driverParam: string;
|
|
405
|
+
notNull: false;
|
|
406
|
+
hasDefault: false;
|
|
407
|
+
isPrimaryKey: false;
|
|
408
|
+
isAutoincrement: false;
|
|
409
|
+
hasRuntimeDefault: false;
|
|
410
|
+
enumValues: [string, ...string[]];
|
|
411
|
+
baseColumn: never;
|
|
412
|
+
identity: undefined;
|
|
413
|
+
generated: undefined;
|
|
414
|
+
}, {}, {
|
|
415
|
+
length: number | undefined;
|
|
416
|
+
}>;
|
|
417
|
+
};
|
|
418
|
+
dialect: 'sqlite';
|
|
419
|
+
}>;
|
|
420
|
+
dashboardShares: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
|
|
421
|
+
name: string;
|
|
422
|
+
schema: undefined;
|
|
423
|
+
columns: {
|
|
424
|
+
id: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
425
|
+
name: "id";
|
|
426
|
+
tableName: string;
|
|
427
|
+
dataType: "string";
|
|
428
|
+
columnType: "SQLiteText";
|
|
429
|
+
data: string;
|
|
430
|
+
driverParam: string;
|
|
431
|
+
notNull: true;
|
|
432
|
+
hasDefault: false;
|
|
433
|
+
isPrimaryKey: true;
|
|
434
|
+
isAutoincrement: false;
|
|
435
|
+
hasRuntimeDefault: false;
|
|
436
|
+
enumValues: [string, ...string[]];
|
|
437
|
+
baseColumn: never;
|
|
438
|
+
identity: undefined;
|
|
439
|
+
generated: undefined;
|
|
440
|
+
}, {}, {
|
|
441
|
+
length: number | undefined;
|
|
442
|
+
}>;
|
|
443
|
+
resourceId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
444
|
+
name: "resource_id";
|
|
445
|
+
tableName: string;
|
|
446
|
+
dataType: "string";
|
|
447
|
+
columnType: "SQLiteText";
|
|
448
|
+
data: string;
|
|
449
|
+
driverParam: string;
|
|
450
|
+
notNull: true;
|
|
451
|
+
hasDefault: false;
|
|
452
|
+
isPrimaryKey: false;
|
|
453
|
+
isAutoincrement: false;
|
|
454
|
+
hasRuntimeDefault: false;
|
|
455
|
+
enumValues: [string, ...string[]];
|
|
456
|
+
baseColumn: never;
|
|
457
|
+
identity: undefined;
|
|
458
|
+
generated: undefined;
|
|
459
|
+
}, {}, {
|
|
460
|
+
length: number | undefined;
|
|
461
|
+
}>;
|
|
462
|
+
principalType: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
463
|
+
name: "principal_type";
|
|
464
|
+
tableName: string;
|
|
465
|
+
dataType: "string";
|
|
466
|
+
columnType: "SQLiteText";
|
|
467
|
+
data: "org" | "user";
|
|
468
|
+
driverParam: string;
|
|
469
|
+
notNull: true;
|
|
470
|
+
hasDefault: false;
|
|
471
|
+
isPrimaryKey: false;
|
|
472
|
+
isAutoincrement: false;
|
|
473
|
+
hasRuntimeDefault: false;
|
|
474
|
+
enumValues: ["user", "org"];
|
|
475
|
+
baseColumn: never;
|
|
476
|
+
identity: undefined;
|
|
477
|
+
generated: undefined;
|
|
478
|
+
}, {}, {
|
|
479
|
+
length: number | undefined;
|
|
480
|
+
}>;
|
|
481
|
+
principalId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
482
|
+
name: "principal_id";
|
|
483
|
+
tableName: string;
|
|
484
|
+
dataType: "string";
|
|
485
|
+
columnType: "SQLiteText";
|
|
486
|
+
data: string;
|
|
487
|
+
driverParam: string;
|
|
488
|
+
notNull: true;
|
|
489
|
+
hasDefault: false;
|
|
490
|
+
isPrimaryKey: false;
|
|
491
|
+
isAutoincrement: false;
|
|
492
|
+
hasRuntimeDefault: false;
|
|
493
|
+
enumValues: [string, ...string[]];
|
|
494
|
+
baseColumn: never;
|
|
495
|
+
identity: undefined;
|
|
496
|
+
generated: undefined;
|
|
497
|
+
}, {}, {
|
|
498
|
+
length: number | undefined;
|
|
499
|
+
}>;
|
|
500
|
+
role: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
501
|
+
name: "role";
|
|
502
|
+
tableName: string;
|
|
503
|
+
dataType: "string";
|
|
504
|
+
columnType: "SQLiteText";
|
|
505
|
+
data: "admin" | "editor" | "viewer";
|
|
506
|
+
driverParam: string;
|
|
507
|
+
notNull: true;
|
|
508
|
+
hasDefault: true;
|
|
509
|
+
isPrimaryKey: false;
|
|
510
|
+
isAutoincrement: false;
|
|
511
|
+
hasRuntimeDefault: false;
|
|
512
|
+
enumValues: ["viewer", "editor", "admin"];
|
|
513
|
+
baseColumn: never;
|
|
514
|
+
identity: undefined;
|
|
515
|
+
generated: undefined;
|
|
516
|
+
}, {}, {
|
|
517
|
+
length: number | undefined;
|
|
518
|
+
}>;
|
|
519
|
+
createdBy: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
520
|
+
name: "created_by";
|
|
521
|
+
tableName: string;
|
|
522
|
+
dataType: "string";
|
|
523
|
+
columnType: "SQLiteText";
|
|
524
|
+
data: string;
|
|
525
|
+
driverParam: string;
|
|
526
|
+
notNull: true;
|
|
527
|
+
hasDefault: false;
|
|
528
|
+
isPrimaryKey: false;
|
|
529
|
+
isAutoincrement: false;
|
|
530
|
+
hasRuntimeDefault: false;
|
|
531
|
+
enumValues: [string, ...string[]];
|
|
532
|
+
baseColumn: never;
|
|
533
|
+
identity: undefined;
|
|
534
|
+
generated: undefined;
|
|
535
|
+
}, {}, {
|
|
536
|
+
length: number | undefined;
|
|
537
|
+
}>;
|
|
538
|
+
createdAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
539
|
+
name: "created_at";
|
|
540
|
+
tableName: string;
|
|
541
|
+
dataType: "string";
|
|
542
|
+
columnType: "SQLiteText";
|
|
543
|
+
data: string;
|
|
544
|
+
driverParam: string;
|
|
545
|
+
notNull: true;
|
|
546
|
+
hasDefault: true;
|
|
547
|
+
isPrimaryKey: false;
|
|
548
|
+
isAutoincrement: false;
|
|
549
|
+
hasRuntimeDefault: false;
|
|
550
|
+
enumValues: [string, ...string[]];
|
|
551
|
+
baseColumn: never;
|
|
552
|
+
identity: undefined;
|
|
553
|
+
generated: undefined;
|
|
554
|
+
}, {}, {
|
|
555
|
+
length: number | undefined;
|
|
556
|
+
}>;
|
|
557
|
+
};
|
|
558
|
+
dialect: 'sqlite';
|
|
559
|
+
}>;
|
|
560
|
+
};
|
|
561
|
+
export type DashboardStorageSchema = ReturnType<typeof createDashboardStorageSchema>;
|
|
562
|
+
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/dashboard-storage/schema.ts"],"names":[],"mappings":"AASA,MAAM,WAAW,6BAA6B;IAC5C,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,wBAAgB,4BAA4B,CAC1C,OAAO,GAAE,6BAAkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyC5C;AAED,MAAM,MAAM,sBAAsB,GAAG,UAAU,CAC7C,OAAO,4BAA4B,CACpC,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { createSharesTable, index, now, ownableColumns, table, text, } from "../db/schema.js";
|
|
2
|
+
export function createDashboardStorageSchema(options = {}) {
|
|
3
|
+
const dashboardsTable = options.dashboardsTable ?? "dashboards";
|
|
4
|
+
const revisionsTable = options.revisionsTable ?? "dashboard_revisions";
|
|
5
|
+
const sharesTable = options.sharesTable ?? "dashboard_shares";
|
|
6
|
+
const dashboards = table(dashboardsTable, {
|
|
7
|
+
id: text("id").primaryKey(),
|
|
8
|
+
kind: text("kind").notNull(),
|
|
9
|
+
title: text("title").notNull().default("Untitled"),
|
|
10
|
+
config: text("config").notNull(),
|
|
11
|
+
createdAt: text("created_at").notNull().default(now()),
|
|
12
|
+
updatedAt: text("updated_at").notNull().default(now()),
|
|
13
|
+
updatedBy: text("updated_by"),
|
|
14
|
+
archivedAt: text("archived_at"),
|
|
15
|
+
...ownableColumns(),
|
|
16
|
+
});
|
|
17
|
+
const dashboardShares = createSharesTable(sharesTable);
|
|
18
|
+
const dashboardRevisions = table(revisionsTable, {
|
|
19
|
+
id: text("id").primaryKey(),
|
|
20
|
+
dashboardId: text("dashboard_id").notNull(),
|
|
21
|
+
kind: text("kind").notNull(),
|
|
22
|
+
title: text("title").notNull(),
|
|
23
|
+
config: text("config").notNull(),
|
|
24
|
+
createdAt: text("created_at").notNull().default(now()),
|
|
25
|
+
createdBy: text("created_by"),
|
|
26
|
+
...ownableColumns(),
|
|
27
|
+
}, (revision) => ({
|
|
28
|
+
dashboardCreatedIdx: index(`${revisionsTable}_dashboard_created_idx`).on(revision.dashboardId, revision.createdAt),
|
|
29
|
+
}));
|
|
30
|
+
return { dashboards, dashboardRevisions, dashboardShares };
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../src/dashboard-storage/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,KAAK,EACL,GAAG,EACH,cAAc,EACd,KAAK,EACL,IAAI,GACL,MAAM,iBAAiB,CAAC;AAQzB,MAAM,UAAU,4BAA4B,CAC1C,OAAO,GAAkC,EAAE;IAE3C,MAAM,eAAe,GAAG,OAAO,CAAC,eAAe,IAAI,YAAY,CAAC;IAChE,MAAM,cAAc,GAAG,OAAO,CAAC,cAAc,IAAI,qBAAqB,CAAC;IACvE,MAAM,WAAW,GAAG,OAAO,CAAC,WAAW,IAAI,kBAAkB,CAAC;IAE9D,MAAM,UAAU,GAAG,KAAK,CAAC,eAAe,EAAE;QACxC,EAAE,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE;QAC3B,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE;QAC5B,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,UAAU,CAAC;QAClD,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,OAAO,EAAE;QAChC,SAAS,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC;QACtD,SAAS,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC;QACtD,SAAS,EAAE,IAAI,CAAC,YAAY,CAAC;QAC7B,UAAU,EAAE,IAAI,CAAC,aAAa,CAAC;QAC/B,GAAG,cAAc,EAAE;KACpB,CAAC,CAAC;IAEH,MAAM,eAAe,GAAG,iBAAiB,CAAC,WAAW,CAAC,CAAC;IAEvD,MAAM,kBAAkB,GAAG,KAAK,CAC9B,cAAc,EACd;QACE,EAAE,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE;QAC3B,WAAW,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC,OAAO,EAAE;QAC3C,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE;QAC5B,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE;QAC9B,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,OAAO,EAAE;QAChC,SAAS,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC;QACtD,SAAS,EAAE,IAAI,CAAC,YAAY,CAAC;QAC7B,GAAG,cAAc,EAAE;KACpB,EACD,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;QACb,mBAAmB,EAAE,KAAK,CAAC,GAAG,cAAc,wBAAwB,CAAC,CAAC,EAAE,CACtE,QAAQ,CAAC,WAAW,EACpB,QAAQ,CAAC,SAAS,CACnB;KACF,CAAC,CACH,CAAC;IAEF,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,eAAe,EAAE,CAAC;AAC7D,CAAC","sourcesContent":["import {\n createSharesTable,\n index,\n now,\n ownableColumns,\n table,\n text,\n} from \"../db/schema.js\";\n\nexport interface DashboardStorageSchemaOptions {\n dashboardsTable?: string;\n revisionsTable?: string;\n sharesTable?: string;\n}\n\nexport function createDashboardStorageSchema(\n options: DashboardStorageSchemaOptions = {},\n) {\n const dashboardsTable = options.dashboardsTable ?? \"dashboards\";\n const revisionsTable = options.revisionsTable ?? \"dashboard_revisions\";\n const sharesTable = options.sharesTable ?? \"dashboard_shares\";\n\n const dashboards = table(dashboardsTable, {\n id: text(\"id\").primaryKey(),\n kind: text(\"kind\").notNull(),\n title: text(\"title\").notNull().default(\"Untitled\"),\n config: text(\"config\").notNull(),\n createdAt: text(\"created_at\").notNull().default(now()),\n updatedAt: text(\"updated_at\").notNull().default(now()),\n updatedBy: text(\"updated_by\"),\n archivedAt: text(\"archived_at\"),\n ...ownableColumns(),\n });\n\n const dashboardShares = createSharesTable(sharesTable);\n\n const dashboardRevisions = table(\n revisionsTable,\n {\n id: text(\"id\").primaryKey(),\n dashboardId: text(\"dashboard_id\").notNull(),\n kind: text(\"kind\").notNull(),\n title: text(\"title\").notNull(),\n config: text(\"config\").notNull(),\n createdAt: text(\"created_at\").notNull().default(now()),\n createdBy: text(\"created_by\"),\n ...ownableColumns(),\n },\n (revision) => ({\n dashboardCreatedIdx: index(`${revisionsTable}_dashboard_created_idx`).on(\n revision.dashboardId,\n revision.createdAt,\n ),\n }),\n );\n\n return { dashboards, dashboardRevisions, dashboardShares };\n}\n\nexport type DashboardStorageSchema = ReturnType<\n typeof createDashboardStorageSchema\n>;\n"]}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import type { AccessContext } from "../sharing/access.js";
|
|
2
|
+
import type { DashboardStorageSchema } from "./schema.js";
|
|
3
|
+
export interface DashboardRecord<TKind extends string = string, TConfig = Record<string, unknown>> {
|
|
4
|
+
id: string;
|
|
5
|
+
kind: TKind;
|
|
6
|
+
title: string;
|
|
7
|
+
config: TConfig;
|
|
8
|
+
ownerEmail: string;
|
|
9
|
+
orgId: string | null;
|
|
10
|
+
visibility: "private" | "org" | "public";
|
|
11
|
+
createdAt: string;
|
|
12
|
+
updatedAt: string;
|
|
13
|
+
updatedBy: string | null;
|
|
14
|
+
archivedAt: string | null;
|
|
15
|
+
}
|
|
16
|
+
export interface DashboardRevisionRecord<TKind extends string = string, TConfig = Record<string, unknown>> {
|
|
17
|
+
id: string;
|
|
18
|
+
dashboardId: string;
|
|
19
|
+
kind: TKind;
|
|
20
|
+
title: string;
|
|
21
|
+
config: TConfig;
|
|
22
|
+
createdAt: string;
|
|
23
|
+
createdBy: string | null;
|
|
24
|
+
}
|
|
25
|
+
export interface DashboardWriteInput<TKind extends string = string, TConfig = Record<string, unknown>> {
|
|
26
|
+
id: string;
|
|
27
|
+
kind: TKind;
|
|
28
|
+
title: string;
|
|
29
|
+
config: TConfig;
|
|
30
|
+
expectedUpdatedAt?: string;
|
|
31
|
+
}
|
|
32
|
+
export declare class DashboardStorageConflictError extends Error {
|
|
33
|
+
constructor(id: string);
|
|
34
|
+
}
|
|
35
|
+
export interface DashboardStorageOptions<TKind extends string, TConfig> {
|
|
36
|
+
schema: DashboardStorageSchema;
|
|
37
|
+
getDb: () => any;
|
|
38
|
+
resourceType: string;
|
|
39
|
+
displayName?: string;
|
|
40
|
+
maxRevisions?: number;
|
|
41
|
+
validateKind?: (kind: string) => kind is TKind;
|
|
42
|
+
parseConfig?: (raw: string) => TConfig;
|
|
43
|
+
serializeConfig?: (config: TConfig) => string;
|
|
44
|
+
getResourcePath?: (dashboard: {
|
|
45
|
+
id: string;
|
|
46
|
+
}) => string;
|
|
47
|
+
allowPublic?: boolean;
|
|
48
|
+
requireOrgMemberForUserShares?: boolean;
|
|
49
|
+
onChange?: (event: {
|
|
50
|
+
type: "change" | "delete";
|
|
51
|
+
dashboard: DashboardRecord<TKind, TConfig>;
|
|
52
|
+
}) => void;
|
|
53
|
+
}
|
|
54
|
+
export declare function createDashboardStorage<TKind extends string = string, TConfig = Record<string, unknown>>(options: DashboardStorageOptions<TKind, TConfig>): {
|
|
55
|
+
get: (id: string, ctx: AccessContext) => Promise<DashboardRecord<TKind, TConfig> | null>;
|
|
56
|
+
list: (ctx: AccessContext, archive?: "active" | "archived" | "all") => Promise<any>;
|
|
57
|
+
write: (input: DashboardWriteInput<TKind, TConfig>, ctx: AccessContext) => Promise<DashboardRecord<TKind, TConfig>>;
|
|
58
|
+
listRevisions: (id: string, ctx: AccessContext) => Promise<any>;
|
|
59
|
+
restore: (id: string, revisionId: string, ctx: AccessContext) => Promise<DashboardRecord<TKind, TConfig> | null>;
|
|
60
|
+
registerShareable: () => void;
|
|
61
|
+
};
|
|
62
|
+
//# sourceMappingURL=store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../src/dashboard-storage/store.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAG1D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAE1D,MAAM,WAAW,eAAe,CAC9B,KAAK,SAAS,MAAM,GAAG,MAAM,EAC7B,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAEjC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,KAAK,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,OAAO,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,UAAU,EAAE,SAAS,GAAG,KAAK,GAAG,QAAQ,CAAC;IACzC,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAED,MAAM,WAAW,uBAAuB,CACtC,KAAK,SAAS,MAAM,GAAG,MAAM,EAC7B,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAEjC,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,KAAK,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,OAAO,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAED,MAAM,WAAW,mBAAmB,CAClC,KAAK,SAAS,MAAM,GAAG,MAAM,EAC7B,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAEjC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,KAAK,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,OAAO,CAAC;IAChB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,qBAAa,6BAA8B,SAAQ,KAAK;IACtD,YAAY,EAAE,EAAE,MAAM,EAGrB;CACF;AAED,MAAM,WAAW,uBAAuB,CAAC,KAAK,SAAS,MAAM,EAAE,OAAO;IACpE,MAAM,EAAE,sBAAsB,CAAC;IAC/B,KAAK,EAAE,MAAM,GAAG,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,IAAI,KAAK,CAAC;IAC/C,WAAW,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC;IACvC,eAAe,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,MAAM,CAAC;IAC9C,eAAe,CAAC,EAAE,CAAC,SAAS,EAAE;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,KAAK,MAAM,CAAC;IACxD,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,6BAA6B,CAAC,EAAE,OAAO,CAAC;IACxC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE;QACjB,IAAI,EAAE,QAAQ,GAAG,QAAQ,CAAC;QAC1B,SAAS,EAAE,eAAe,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;KAC5C,KAAK,IAAI,CAAC;CACZ;AAmBD,wBAAgB,sBAAsB,CACpC,KAAK,SAAS,MAAM,GAAG,MAAM,EAC7B,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACjC,OAAO,EAAE,uBAAuB,CAAC,KAAK,EAAE,OAAO,CAAC;cAsCzB,MAAM,OAAO,aAAa;gBAgB1C,aAAa,YACT,QAAQ,GAAG,UAAU,GAAG,KAAK;mBA8D/B,mBAAmB,CAAC,KAAK,EAAE,OAAO,CAAC,OACrC,aAAa;wBA6Da,MAAM,OAAO,aAAa;kBAchC,MAAM,cAAc,MAAM,OAAO,aAAa;;EA4C1E"}
|