drizzle-cube 0.6.1 → 0.6.2
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/dist/adapters/express/index.cjs +1 -1
- package/dist/adapters/express/index.js +1 -1
- package/dist/adapters/fastify/index.cjs +1 -1
- package/dist/adapters/fastify/index.js +1 -1
- package/dist/adapters/{handler-CfgE0JSL.js → handler-CtaSua-i.js} +1 -1
- package/dist/adapters/{handler-Cn0dOctE.cjs → handler-OwxSBJH8.cjs} +1 -1
- package/dist/adapters/hono/index.cjs +1 -1
- package/dist/adapters/hono/index.js +1 -1
- package/dist/adapters/nextjs/index.cjs +1 -1
- package/dist/adapters/nextjs/index.js +1 -1
- package/dist/{server/openai-B5jEiqiB.js → adapters/openai-CmVRIbUg.js} +18 -2
- package/dist/adapters/{openai-cDlFSTk6.js → openai-CtXqeznO.js} +1 -1
- package/dist/{server/openai-D0musiYP.cjs → adapters/openai-D-6l1Y8h.cjs} +3 -3
- package/dist/adapters/{openai-vXvLni8v.cjs → openai-DTSTMiXL.cjs} +1 -1
- package/dist/cjs/adapters/express/index.d.ts +114 -0
- package/dist/cjs/adapters/fastify/index.d.ts +113 -0
- package/dist/cjs/adapters/hono/agent-handler.d.ts +9 -0
- package/dist/cjs/adapters/hono/index.d.ts +120 -0
- package/dist/cjs/adapters/hono/mcp-handler.d.ts +37 -0
- package/dist/cjs/adapters/locale.d.ts +8 -0
- package/dist/cjs/adapters/mcp-tools-handlers.d.ts +18 -0
- package/dist/cjs/adapters/mcp-tools.d.ts +134 -0
- package/dist/cjs/adapters/mcp-transport.d.ts +158 -0
- package/dist/cjs/adapters/nextjs/index.d.ts +196 -0
- package/dist/cjs/adapters/nextjs/mcp-handler.d.ts +36 -0
- package/dist/cjs/adapters/types.d.ts +41 -0
- package/dist/cjs/adapters/utils.d.ts +354 -0
- package/dist/cjs/client/adapters/adapterRegistry.d.ts +44 -0
- package/dist/cjs/client/adapters/flowModeAdapter.d.ts +3 -0
- package/dist/cjs/client/adapters/funnelModeAdapter.d.ts +19 -0
- package/dist/cjs/client/adapters/index.d.ts +29 -0
- package/dist/cjs/client/adapters/modeAdapter.d.ts +117 -0
- package/dist/cjs/client/adapters/queryModeAdapter.d.ts +16 -0
- package/dist/cjs/client/adapters/retentionModeAdapter.d.ts +3 -0
- package/dist/cjs/client/charts/ChartLoader.d.ts +69 -0
- package/dist/cjs/client/charts/chartComponentRegistry.d.ts +46 -0
- package/dist/cjs/client/charts/chartConfigHelpers.d.ts +38 -0
- package/dist/cjs/client/charts/chartConfigRegistry.d.ts +15 -0
- package/dist/cjs/client/charts/chartConfigs.d.ts +142 -0
- package/dist/cjs/client/charts/chartPlugin.d.ts +74 -0
- package/dist/cjs/client/charts/lazyChartConfigRegistry.d.ts +100 -0
- package/dist/cjs/client/charts.d.ts +17 -0
- package/dist/cjs/client/client/BatchCoordinator.d.ts +38 -0
- package/dist/cjs/client/client/CubeClient.d.ts +32 -0
- package/dist/cjs/client/components/AIAssistant/constants.d.ts +11 -0
- package/dist/cjs/client/components/AIAssistant/index.d.ts +10 -0
- package/dist/cjs/client/components/AIAssistant/types.d.ts +49 -0
- package/dist/cjs/client/components/AIAssistant/utils.d.ts +17 -0
- package/dist/cjs/client/components/AgenticNotebook/AgentChatPanel.d.ts +27 -0
- package/dist/cjs/client/components/AgenticNotebook/ChatInput.d.ts +14 -0
- package/dist/cjs/client/components/AgenticNotebook/ChatMessage.d.ts +9 -0
- package/dist/cjs/client/components/AgenticNotebook/NotebookCanvas.d.ts +6 -0
- package/dist/cjs/client/components/AgenticNotebook/NotebookMarkdownBlock.d.ts +12 -0
- package/dist/cjs/client/components/AgenticNotebook/NotebookPortletBlock.d.ts +15 -0
- package/dist/cjs/client/components/AgenticNotebook/agentChatParts.d.ts +34 -0
- package/dist/cjs/client/components/AgenticNotebook/chatMessageParts.d.ts +39 -0
- package/dist/cjs/client/components/AgenticNotebook/index.d.ts +56 -0
- package/dist/cjs/client/components/AgenticNotebook/useAgentChatController.d.ts +25 -0
- package/dist/cjs/client/components/AgenticNotebook/useNotebookAutosave.d.ts +12 -0
- package/dist/cjs/client/components/AnalysisBuilder/AnalysisAIPanel.d.ts +25 -0
- package/dist/cjs/client/components/AnalysisBuilder/AnalysisAxisDropZone.d.ts +29 -0
- package/dist/cjs/client/components/AnalysisBuilder/AnalysisChartConfigPanel.d.ts +18 -0
- package/dist/cjs/client/components/AnalysisBuilder/AnalysisDisplayConfigPanel.d.ts +11 -0
- package/dist/cjs/client/components/AnalysisBuilder/AnalysisFilterGroup.d.ts +20 -0
- package/dist/cjs/client/components/AnalysisBuilder/AnalysisFilterItem.d.ts +14 -0
- package/dist/cjs/client/components/AnalysisBuilder/AnalysisFilterSection.d.ts +16 -0
- package/dist/cjs/client/components/AnalysisBuilder/AnalysisModeErrorBoundary.d.ts +27 -0
- package/dist/cjs/client/components/AnalysisBuilder/AnalysisQueryPanel.d.ts +12 -0
- package/dist/cjs/client/components/AnalysisBuilder/AnalysisQueryPanelParts.d.ts +64 -0
- package/dist/cjs/client/components/AnalysisBuilder/AnalysisResultsHeader.d.ts +67 -0
- package/dist/cjs/client/components/AnalysisBuilder/AnalysisResultsPanel.d.ts +14 -0
- package/dist/cjs/client/components/AnalysisBuilder/AnalysisTypeSelector.d.ts +17 -0
- package/dist/cjs/client/components/AnalysisBuilder/BreakdownComparisonToggle.d.ts +13 -0
- package/dist/cjs/client/components/AnalysisBuilder/BreakdownItemCard.d.ts +12 -0
- package/dist/cjs/client/components/AnalysisBuilder/BreakdownRow.d.ts +26 -0
- package/dist/cjs/client/components/AnalysisBuilder/BreakdownSection.d.ts +9 -0
- package/dist/cjs/client/components/AnalysisBuilder/DisplayOptionControl.d.ts +10 -0
- package/dist/cjs/client/components/AnalysisBuilder/ExecutionPlanPanel.d.ts +49 -0
- package/dist/cjs/client/components/AnalysisBuilder/ExecutionPlanPanelParts.d.ts +22 -0
- package/dist/cjs/client/components/AnalysisBuilder/ExplainAIPanel.d.ts +16 -0
- package/dist/cjs/client/components/AnalysisBuilder/FieldDetailPanel.d.ts +4 -0
- package/dist/cjs/client/components/AnalysisBuilder/FieldSearchItem.d.ts +6 -0
- package/dist/cjs/client/components/AnalysisBuilder/FieldSearchModal.d.ts +2 -0
- package/dist/cjs/client/components/AnalysisBuilder/FieldSearchResults.d.ts +16 -0
- package/dist/cjs/client/components/AnalysisBuilder/FilterConfigModal.d.ts +17 -0
- package/dist/cjs/client/components/AnalysisBuilder/FilterValueInput.d.ts +63 -0
- package/dist/cjs/client/components/AnalysisBuilder/FlowConfigPanel.d.ts +28 -0
- package/dist/cjs/client/components/AnalysisBuilder/FlowDepthControls.d.ts +10 -0
- package/dist/cjs/client/components/AnalysisBuilder/FlowModeContent.d.ts +57 -0
- package/dist/cjs/client/components/AnalysisBuilder/FlowVisualizationPicker.d.ts +7 -0
- package/dist/cjs/client/components/AnalysisBuilder/FunnelBindingKeySelector.d.ts +21 -0
- package/dist/cjs/client/components/AnalysisBuilder/FunnelConfigPanel.d.ts +24 -0
- package/dist/cjs/client/components/AnalysisBuilder/FunnelModeContent.d.ts +48 -0
- package/dist/cjs/client/components/AnalysisBuilder/FunnelStepCard.d.ts +25 -0
- package/dist/cjs/client/components/AnalysisBuilder/FunnelStepList.d.ts +26 -0
- package/dist/cjs/client/components/AnalysisBuilder/LegacyBooleanOptions.d.ts +8 -0
- package/dist/cjs/client/components/AnalysisBuilder/LimitSection.d.ts +14 -0
- package/dist/cjs/client/components/AnalysisBuilder/MetricItemCard.d.ts +11 -0
- package/dist/cjs/client/components/AnalysisBuilder/MetricRow.d.ts +23 -0
- package/dist/cjs/client/components/AnalysisBuilder/MetricsSection.d.ts +9 -0
- package/dist/cjs/client/components/AnalysisBuilder/RetentionConfigPanel.d.ts +36 -0
- package/dist/cjs/client/components/AnalysisBuilder/RetentionModeContent.d.ts +71 -0
- package/dist/cjs/client/components/AnalysisBuilder/SectionHeading.d.ts +12 -0
- package/dist/cjs/client/components/AnalysisBuilder/SortToggleButton.d.ts +13 -0
- package/dist/cjs/client/components/AnalysisBuilder/StringArrayInput.d.ts +17 -0
- package/dist/cjs/client/components/AnalysisBuilder/filterConfigModalUtils.d.ts +30 -0
- package/dist/cjs/client/components/AnalysisBuilder/hooks/useAnalysisBuilderImperativeHandle.d.ts +13 -0
- package/dist/cjs/client/components/AnalysisBuilder/hooks/useDragReorder.d.ts +25 -0
- package/dist/cjs/client/components/AnalysisBuilder/hooks/useFieldSearchKeyboard.d.ts +11 -0
- package/dist/cjs/client/components/AnalysisBuilder/index.d.ts +9 -0
- package/dist/cjs/client/components/AnalysisBuilder/types.d.ts +851 -0
- package/dist/cjs/client/components/AnalysisBuilder/utils/axisConfigUtils.d.ts +23 -0
- package/dist/cjs/client/components/AnalysisBuilder/utils/executionPlanMarkdown.d.ts +8 -0
- package/dist/cjs/client/components/AnalysisBuilder/utils/fieldUtils.d.ts +69 -0
- package/dist/cjs/client/components/AnalysisBuilder/utils/filterUtils.d.ts +19 -0
- package/dist/cjs/client/components/AnalysisBuilder/utils/idUtils.d.ts +11 -0
- package/dist/cjs/client/components/AnalysisBuilder/utils/index.d.ts +11 -0
- package/dist/cjs/client/components/AnalysisBuilder/utils/queryUtils.d.ts +11 -0
- package/dist/cjs/client/components/AnalysisBuilder/utils/recentFieldsUtils.d.ts +14 -0
- package/dist/cjs/client/components/AnalysisBuilder/utils/resultsPanelDerive.d.ts +68 -0
- package/dist/cjs/client/components/AnalysisBuilder/utils/shareStateUtils.d.ts +68 -0
- package/dist/cjs/client/components/AnalysisBuilder/utils/sortUtils.d.ts +7 -0
- package/dist/cjs/client/components/AnalysisBuilder/utils/storageUtils.d.ts +44 -0
- package/dist/cjs/client/components/AnalysisBuilderLazy.d.ts +4 -0
- package/dist/cjs/client/components/AnalyticsDashboard.d.ts +2 -0
- package/dist/cjs/client/components/AnalyticsPage.d.ts +1 -0
- package/dist/cjs/client/components/AnalyticsPortlet.d.ts +10 -0
- package/dist/cjs/client/components/ChartErrorBoundary.d.ts +21 -0
- package/dist/cjs/client/components/ChartTypeSelector.d.ts +15 -0
- package/dist/cjs/client/components/ColorPaletteSelector.d.ts +11 -0
- package/dist/cjs/client/components/ConfirmModal.d.ts +30 -0
- package/dist/cjs/client/components/DashboardEditModal.d.ts +15 -0
- package/dist/cjs/client/components/DashboardFilterPanel.d.ts +15 -0
- package/dist/cjs/client/components/DashboardFilters/CompactFilterBar.d.ts +13 -0
- package/dist/cjs/client/components/DashboardFilters/CompactFilterBarParts.d.ts +26 -0
- package/dist/cjs/client/components/DashboardFilters/CustomDateDropdown.d.ts +10 -0
- package/dist/cjs/client/components/DashboardFilters/DashboardFilterConfigModal.d.ts +20 -0
- package/dist/cjs/client/components/DashboardFilters/DashboardFilterConfigModalParts.d.ts +27 -0
- package/dist/cjs/client/components/DashboardFilters/DashboardFilterItem.d.ts +14 -0
- package/dist/cjs/client/components/DashboardFilters/DashboardFilterValueInput.d.ts +39 -0
- package/dist/cjs/client/components/DashboardFilters/DatePresetChips.d.ts +8 -0
- package/dist/cjs/client/components/DashboardFilters/EditModeFilterList.d.ts +13 -0
- package/dist/cjs/client/components/DashboardFilters/FilterChip.d.ts +12 -0
- package/dist/cjs/client/components/DashboardFilters/FilterEditModal.d.ts +15 -0
- package/dist/cjs/client/components/DashboardFilters/FilterValuePopover.d.ts +11 -0
- package/dist/cjs/client/components/DashboardFilters/ReadOnlyFilterList.d.ts +13 -0
- package/dist/cjs/client/components/DashboardFilters/XTDDropdown.d.ts +10 -0
- package/dist/cjs/client/components/DashboardFilters/dashboardFilterConfigModalUtils.d.ts +21 -0
- package/dist/cjs/client/components/DashboardFilters/useCompactFilterBar.d.ts +19 -0
- package/dist/cjs/client/components/DashboardFilters/useDashboardFilterConfigModal.d.ts +69 -0
- package/dist/cjs/client/components/DashboardFilters/useDateRangeState.d.ts +19 -0
- package/dist/cjs/client/components/DashboardFilters/useFilterDropdowns.d.ts +21 -0
- package/dist/cjs/client/components/DashboardFilters/useFilterValueFetch.d.ts +23 -0
- package/dist/cjs/client/components/DashboardGrid.d.ts +22 -0
- package/dist/cjs/client/components/DashboardPortletCard.d.ts +4 -0
- package/dist/cjs/client/components/DashboardThumbnailPlaceholder.d.ts +13 -0
- package/dist/cjs/client/components/DataBrowser/DataBrowserSidebar.d.ts +16 -0
- package/dist/cjs/client/components/DataBrowser/DataBrowserTable.d.ts +16 -0
- package/dist/cjs/client/components/DataBrowser/DataBrowserToolbar.d.ts +22 -0
- package/dist/cjs/client/components/DataBrowser/index.d.ts +28 -0
- package/dist/cjs/client/components/DataHistogram.d.ts +27 -0
- package/dist/cjs/client/components/DebugModal.d.ts +17 -0
- package/dist/cjs/client/components/DrillBreadcrumb.d.ts +7 -0
- package/dist/cjs/client/components/DrillMenu.d.ts +8 -0
- package/dist/cjs/client/components/FloatingEditToolbar.d.ts +30 -0
- package/dist/cjs/client/components/LoadingIndicator.d.ts +16 -0
- package/dist/cjs/client/components/MobileStackedLayout.d.ts +14 -0
- package/dist/cjs/client/components/Modal.d.ts +16 -0
- package/dist/cjs/client/components/PortletAnalysisModal.d.ts +27 -0
- package/dist/cjs/client/components/PortletContainer.d.ts +10 -0
- package/dist/cjs/client/components/PortletFilterConfigModal.d.ts +13 -0
- package/dist/cjs/client/components/RowManagedLayout.d.ts +19 -0
- package/dist/cjs/client/components/ScaledGridWrapper.d.ts +12 -0
- package/dist/cjs/client/components/SchemaVisualization/CubeNode.d.ts +25 -0
- package/dist/cjs/client/components/SchemaVisualization/FieldDetailPanel.d.ts +15 -0
- package/dist/cjs/client/components/SchemaVisualization/RelationshipEdge.d.ts +13 -0
- package/dist/cjs/client/components/SchemaVisualization/SchemaVisualizationLazy.d.ts +3 -0
- package/dist/cjs/client/components/SchemaVisualization/index.d.ts +10 -0
- package/dist/cjs/client/components/SchemaVisualization/useERDLayout.d.ts +39 -0
- package/dist/cjs/client/components/SchemaVisualization/xyflowContext.d.ts +11 -0
- package/dist/cjs/client/components/TextPortletModal.d.ts +12 -0
- package/dist/cjs/client/components/analyticsPortlet/PortletChart.d.ts +31 -0
- package/dist/cjs/client/components/analyticsPortlet/PortletChartView.d.ts +35 -0
- package/dist/cjs/client/components/analyticsPortlet/PortletStates.d.ts +65 -0
- package/dist/cjs/client/components/analyticsPortlet/parsePortletQuery.d.ts +22 -0
- package/dist/cjs/client/components/analyticsPortlet/portletRenderState.d.ts +31 -0
- package/dist/cjs/client/components/analyticsPortlet/usePortletDebugData.d.ts +37 -0
- package/dist/cjs/client/components/analyticsPortlet/usePortletDrillState.d.ts +17 -0
- package/dist/cjs/client/components/analyticsPortlet/usePortletQueryResults.d.ts +37 -0
- package/dist/cjs/client/components/charts/ActivityGridChart.config.d.ts +5 -0
- package/dist/cjs/client/components/charts/ActivityGridChart.d.ts +4 -0
- package/dist/cjs/client/components/charts/ActivityGridChart.helpers.d.ts +33 -0
- package/dist/cjs/client/components/charts/ActivityGridChart.render.d.ts +31 -0
- package/dist/cjs/client/components/charts/AngledXAxisTick.d.ts +19 -0
- package/dist/cjs/client/components/charts/AreaChart.config.d.ts +5 -0
- package/dist/cjs/client/components/charts/AreaChart.d.ts +4 -0
- package/dist/cjs/client/components/charts/AxisFormatControls.d.ts +37 -0
- package/dist/cjs/client/components/charts/BarChart.config.d.ts +5 -0
- package/dist/cjs/client/components/charts/BarChart.d.ts +4 -0
- package/dist/cjs/client/components/charts/BarChart.helpers.d.ts +23 -0
- package/dist/cjs/client/components/charts/BarSeries.d.ts +29 -0
- package/dist/cjs/client/components/charts/BoxPlotChart.config.d.ts +5 -0
- package/dist/cjs/client/components/charts/BoxPlotChart.d.ts +4 -0
- package/dist/cjs/client/components/charts/BubbleChart.config.d.ts +5 -0
- package/dist/cjs/client/components/charts/BubbleChart.d.ts +4 -0
- package/dist/cjs/client/components/charts/BubbleChart.helpers.d.ts +43 -0
- package/dist/cjs/client/components/charts/BubbleChart.render.d.ts +21 -0
- package/dist/cjs/client/components/charts/CandlestickChart.config.d.ts +5 -0
- package/dist/cjs/client/components/charts/CandlestickChart.d.ts +4 -0
- package/dist/cjs/client/components/charts/ChartContainer.d.ts +7 -0
- package/dist/cjs/client/components/charts/ChartLegend.d.ts +7 -0
- package/dist/cjs/client/components/charts/ChartStates.d.ts +38 -0
- package/dist/cjs/client/components/charts/ChartTooltip.d.ts +7 -0
- package/dist/cjs/client/components/charts/DataTable.config.d.ts +5 -0
- package/dist/cjs/client/components/charts/DataTable.d.ts +4 -0
- package/dist/cjs/client/components/charts/FunnelChart.config.d.ts +9 -0
- package/dist/cjs/client/components/charts/FunnelChart.d.ts +11 -0
- package/dist/cjs/client/components/charts/FunnelChart.helpers.d.ts +25 -0
- package/dist/cjs/client/components/charts/FunnelViews.d.ts +16 -0
- package/dist/cjs/client/components/charts/GaugeChart.config.d.ts +5 -0
- package/dist/cjs/client/components/charts/GaugeChart.d.ts +4 -0
- package/dist/cjs/client/components/charts/HeatMapCanvas.d.ts +25 -0
- package/dist/cjs/client/components/charts/HeatMapChart.config.d.ts +8 -0
- package/dist/cjs/client/components/charts/HeatMapChart.d.ts +10 -0
- package/dist/cjs/client/components/charts/HeatMapChart.helpers.d.ts +64 -0
- package/dist/cjs/client/components/charts/KpiDelta.config.d.ts +5 -0
- package/dist/cjs/client/components/charts/KpiDelta.d.ts +4 -0
- package/dist/cjs/client/components/charts/KpiDelta.helpers.d.ts +20 -0
- package/dist/cjs/client/components/charts/KpiNumber.config.d.ts +5 -0
- package/dist/cjs/client/components/charts/KpiNumber.d.ts +4 -0
- package/dist/cjs/client/components/charts/KpiNumber.helpers.d.ts +30 -0
- package/dist/cjs/client/components/charts/KpiStates.d.ts +19 -0
- package/dist/cjs/client/components/charts/KpiText.config.d.ts +5 -0
- package/dist/cjs/client/components/charts/KpiText.d.ts +4 -0
- package/dist/cjs/client/components/charts/LineChart.config.d.ts +5 -0
- package/dist/cjs/client/components/charts/LineChart.d.ts +4 -0
- package/dist/cjs/client/components/charts/MarkdownChart.config.d.ts +5 -0
- package/dist/cjs/client/components/charts/MarkdownChart.d.ts +4 -0
- package/dist/cjs/client/components/charts/MeasureProfileChart.config.d.ts +5 -0
- package/dist/cjs/client/components/charts/MeasureProfileChart.d.ts +4 -0
- package/dist/cjs/client/components/charts/MissingDependencyFallback.d.ts +12 -0
- package/dist/cjs/client/components/charts/PieChart.config.d.ts +5 -0
- package/dist/cjs/client/components/charts/PieChart.d.ts +4 -0
- package/dist/cjs/client/components/charts/RadarChart.config.d.ts +5 -0
- package/dist/cjs/client/components/charts/RadarChart.d.ts +4 -0
- package/dist/cjs/client/components/charts/RadialBarChart.config.d.ts +5 -0
- package/dist/cjs/client/components/charts/RadialBarChart.d.ts +4 -0
- package/dist/cjs/client/components/charts/RetentionCombinedChart.config.d.ts +2 -0
- package/dist/cjs/client/components/charts/RetentionCombinedChart.d.ts +14 -0
- package/dist/cjs/client/components/charts/RetentionHeatmap.config.d.ts +2 -0
- package/dist/cjs/client/components/charts/RetentionHeatmap.d.ts +7 -0
- package/dist/cjs/client/components/charts/SankeyChart.config.d.ts +9 -0
- package/dist/cjs/client/components/charts/SankeyChart.d.ts +10 -0
- package/dist/cjs/client/components/charts/ScatterChart.config.d.ts +5 -0
- package/dist/cjs/client/components/charts/ScatterChart.d.ts +4 -0
- package/dist/cjs/client/components/charts/ScatterChart.helpers.d.ts +43 -0
- package/dist/cjs/client/components/charts/ScatterSeries.d.ts +17 -0
- package/dist/cjs/client/components/charts/ScatterTooltip.d.ts +21 -0
- package/dist/cjs/client/components/charts/SunburstChart.config.d.ts +9 -0
- package/dist/cjs/client/components/charts/SunburstChart.d.ts +10 -0
- package/dist/cjs/client/components/charts/TreeMapChart.config.d.ts +5 -0
- package/dist/cjs/client/components/charts/TreeMapChart.d.ts +4 -0
- package/dist/cjs/client/components/charts/TreeMapChart.helpers.d.ts +37 -0
- package/dist/cjs/client/components/charts/TreeMapContent.d.ts +24 -0
- package/dist/cjs/client/components/charts/TreeMapLegend.d.ts +13 -0
- package/dist/cjs/client/components/charts/WaterfallChart.config.d.ts +5 -0
- package/dist/cjs/client/components/charts/WaterfallChart.d.ts +4 -0
- package/dist/cjs/client/components/charts/cartesianChartHelpers.d.ts +126 -0
- package/dist/cjs/client/components/charts/chartAxisResolution.d.ts +32 -0
- package/dist/cjs/client/components/charts/chartScaffolding.d.ts +77 -0
- package/dist/cjs/client/components/charts/gaugeChartHelpers.d.ts +36 -0
- package/dist/cjs/client/components/charts/index.d.ts +25 -0
- package/dist/cjs/client/components/charts/kpiTextHelpers.d.ts +46 -0
- package/dist/cjs/client/components/charts/radarChartHelpers.d.ts +14 -0
- package/dist/cjs/client/components/charts/radialBarChartHelpers.d.ts +22 -0
- package/dist/cjs/client/components/charts/useChartDimensions.d.ts +20 -0
- package/dist/cjs/client/components/charts/useKpiDimensions.d.ts +30 -0
- package/dist/cjs/client/components/dashboard/DashboardContext.d.ts +113 -0
- package/dist/cjs/client/components/dashboard/DashboardCoordinator.d.ts +2 -0
- package/dist/cjs/client/components/dashboard/DashboardEditBar.d.ts +5 -0
- package/dist/cjs/client/components/dashboard/DashboardFilterBar.d.ts +8 -0
- package/dist/cjs/client/components/dashboard/DashboardGridSurface.d.ts +8 -0
- package/dist/cjs/client/components/dashboard/DashboardModals.d.ts +8 -0
- package/dist/cjs/client/components/dashboard/DashboardProvider.d.ts +2 -0
- package/dist/cjs/client/components/dashboard/DashboardToolbar.d.ts +11 -0
- package/dist/cjs/client/components/dashboard/LayoutModeToggle.d.ts +10 -0
- package/dist/cjs/client/components/dashboard/dashboardGridUtils.d.ts +17 -0
- package/dist/cjs/client/components/dashboard/index.d.ts +13 -0
- package/dist/cjs/client/components/dashboardPortletCard/FilterFieldChip.d.ts +12 -0
- package/dist/cjs/client/components/dashboardPortletCard/PortletCardHeader.d.ts +43 -0
- package/dist/cjs/client/components/dashboardPortletCard/cardStyles.d.ts +33 -0
- package/dist/cjs/client/components/dashboardPortletCard/filterField.d.ts +12 -0
- package/dist/cjs/client/components/dashboardPortletCard/propsEqual.d.ts +55 -0
- package/dist/cjs/client/components/dashboardPortletCard/usePortletCardActions.d.ts +16 -0
- package/dist/cjs/client/components/portletAnalysisModal/saveValidation.d.ts +8 -0
- package/dist/cjs/client/components/shared/DateRangeFilter.d.ts +4 -0
- package/dist/cjs/client/components/shared/DateRangeSelector.d.ts +13 -0
- package/dist/cjs/client/components/shared/FilterBuilder.d.ts +4 -0
- package/dist/cjs/client/components/shared/FilterGroup.d.ts +4 -0
- package/dist/cjs/client/components/shared/FilterItem.d.ts +4 -0
- package/dist/cjs/client/components/shared/FilterValueSelector.d.ts +4 -0
- package/dist/cjs/client/components/shared/dateRangeUtils.d.ts +40 -0
- package/dist/cjs/client/components/shared/filterDisplayUtils.d.ts +10 -0
- package/dist/cjs/client/components/shared/filterItem/FilterDateRangeSelector.d.ts +17 -0
- package/dist/cjs/client/components/shared/filterItem/FilterFieldDropdown.d.ts +16 -0
- package/dist/cjs/client/components/shared/filterItem/dateRangeSync.d.ts +14 -0
- package/dist/cjs/client/components/shared/filterItem/fieldVisuals.d.ts +5 -0
- package/dist/cjs/client/components/shared/filterValueSelector/FilterValueInputs.d.ts +55 -0
- package/dist/cjs/client/components/shared/filterValueSelector/useFilterValueSelectorState.d.ts +25 -0
- package/dist/cjs/client/components/shared/queryFieldUtils.d.ts +21 -0
- package/dist/cjs/client/components/shared/types.d.ts +60 -0
- package/dist/cjs/client/components/shared/utils.d.ts +71 -0
- package/dist/cjs/client/components.d.ts +17 -0
- package/dist/cjs/client/hooks/agentChatStream.d.ts +39 -0
- package/dist/cjs/client/hooks/analysisQueryExecutionModes.d.ts +133 -0
- package/dist/cjs/client/hooks/dashboard/layoutUtils.d.ts +7 -0
- package/dist/cjs/client/hooks/dashboard/useDashboardController.d.ts +53 -0
- package/dist/cjs/client/hooks/dashboard/useGridLayoutEngine.d.ts +10 -0
- package/dist/cjs/client/hooks/dashboard/useRowLayoutEngine.d.ts +18 -0
- package/dist/cjs/client/hooks/drillNavigation.d.ts +25 -0
- package/dist/cjs/client/hooks/queries/index.d.ts +20 -0
- package/dist/cjs/client/hooks/queries/useCubeLoadQuery.d.ts +85 -0
- package/dist/cjs/client/hooks/queries/useCubeMetaQuery.d.ts +51 -0
- package/dist/cjs/client/hooks/queries/useDryRunQuery.d.ts +153 -0
- package/dist/cjs/client/hooks/queries/useExplainAI.d.ts +62 -0
- package/dist/cjs/client/hooks/queries/useExplainQuery.d.ts +62 -0
- package/dist/cjs/client/hooks/queries/useFlowQuery.d.ts +72 -0
- package/dist/cjs/client/hooks/queries/useFunnelQuery.d.ts +20 -0
- package/dist/cjs/client/hooks/queries/useMultiCubeLoadQuery.d.ts +70 -0
- package/dist/cjs/client/hooks/queries/useRetentionQuery.d.ts +67 -0
- package/dist/cjs/client/hooks/useAgentChat.d.ts +60 -0
- package/dist/cjs/client/hooks/useAnalysisAI.d.ts +56 -0
- package/dist/cjs/client/hooks/useAnalysisBuilderHook.d.ts +245 -0
- package/dist/cjs/client/hooks/useAnalysisChartDefaults.d.ts +35 -0
- package/dist/cjs/client/hooks/useAnalysisCombinedFields.d.ts +18 -0
- package/dist/cjs/client/hooks/useAnalysisInitialization.d.ts +25 -0
- package/dist/cjs/client/hooks/useAnalysisQueryBuilder.d.ts +32 -0
- package/dist/cjs/client/hooks/useAnalysisQueryExecution.d.ts +144 -0
- package/dist/cjs/client/hooks/useAnalysisShare.d.ts +18 -0
- package/dist/cjs/client/hooks/useAnalysisUIState.d.ts +24 -0
- package/dist/cjs/client/hooks/useCubeFieldLabel.d.ts +16 -0
- package/dist/cjs/client/hooks/useDashboardHook.d.ts +123 -0
- package/dist/cjs/client/hooks/useDataBrowser.d.ts +67 -0
- package/dist/cjs/client/hooks/useDebounce.d.ts +12 -0
- package/dist/cjs/client/hooks/useDebounceQuery.d.ts +48 -0
- package/dist/cjs/client/hooks/useDirtyStateTracking.d.ts +37 -0
- package/dist/cjs/client/hooks/useDragAutoScroll.d.ts +18 -0
- package/dist/cjs/client/hooks/useDrillInteraction.d.ts +9 -0
- package/dist/cjs/client/hooks/useElementVisibility.d.ts +30 -0
- package/dist/cjs/client/hooks/useFilterValues.d.ts +19 -0
- package/dist/cjs/client/hooks/useNotebookLayout.d.ts +8 -0
- package/dist/cjs/client/hooks/useResponsiveDashboard.d.ts +16 -0
- package/dist/cjs/client/hooks/useScrollDetection.d.ts +29 -0
- package/dist/cjs/client/hooks/useTheme.d.ts +11 -0
- package/dist/cjs/client/hooks/useTranslation.d.ts +21 -0
- package/dist/cjs/client/hooks.d.ts +17 -0
- package/dist/cjs/client/icons/customIcons.d.ts +22 -0
- package/dist/cjs/client/icons/defaultIcons.d.ts +5 -0
- package/dist/cjs/client/icons/index.d.ts +22 -0
- package/dist/cjs/client/icons/registry.d.ts +64 -0
- package/dist/cjs/client/icons/types.d.ts +129 -0
- package/dist/cjs/client/icons.d.ts +2 -0
- package/dist/cjs/client/index.d.ts +76 -0
- package/dist/cjs/client/providers/CubeApiProvider.d.ts +24 -0
- package/dist/cjs/client/providers/CubeFeaturesProvider.d.ts +19 -0
- package/dist/cjs/client/providers/CubeMetaContext.d.ts +11 -0
- package/dist/cjs/client/providers/CubeMetaProvider.d.ts +6 -0
- package/dist/cjs/client/providers/CubeProvider.d.ts +70 -0
- package/dist/cjs/client/providers/I18nProvider.d.ts +18 -0
- package/dist/cjs/client/providers/ScrollContainerContext.d.ts +19 -0
- package/dist/cjs/client/providers.d.ts +10 -0
- package/dist/cjs/client/schema.d.ts +13 -0
- package/dist/cjs/client/shared/chartConfigBuilders.d.ts +18 -0
- package/dist/cjs/client/shared/chartDefaults.d.ts +59 -0
- package/dist/cjs/client/shared/components/CodeBlock.d.ts +13 -0
- package/dist/cjs/client/shared/components/QueryAnalysisPanel.d.ts +7 -0
- package/dist/cjs/client/shared/components/QueryAnalysisPanel.sections.d.ts +41 -0
- package/dist/cjs/client/shared/index.d.ts +11 -0
- package/dist/cjs/client/shared/queryKey.d.ts +1 -0
- package/dist/cjs/client/shared/queryTransforms.d.ts +20 -0
- package/dist/cjs/client/shared/types.d.ts +184 -0
- package/dist/cjs/client/shared/utils.d.ts +104 -0
- package/dist/cjs/client/stores/analysisBuilderStore.d.ts +578 -0
- package/dist/cjs/client/stores/dashboardStore.d.ts +292 -0
- package/dist/cjs/client/stores/dataBrowserStore.d.ts +34 -0
- package/dist/cjs/client/stores/index.d.ts +13 -0
- package/dist/cjs/client/stores/notebookStore.d.ts +157 -0
- package/dist/cjs/client/stores/optionsToAnalysisConfig.d.ts +17 -0
- package/dist/cjs/client/stores/slices/coreSlice.d.ts +96 -0
- package/dist/cjs/client/stores/slices/flowSlice.d.ts +69 -0
- package/dist/cjs/client/stores/slices/funnelSlice.d.ts +61 -0
- package/dist/cjs/client/stores/slices/index.d.ts +13 -0
- package/dist/cjs/client/stores/slices/querySlice.d.ts +55 -0
- package/dist/cjs/client/stores/slices/retentionSlice.d.ts +66 -0
- package/dist/cjs/client/stores/slices/uiSlice.d.ts +52 -0
- package/dist/cjs/client/theme/index.d.ts +135 -0
- package/dist/cjs/client/types/analysisConfig.d.ts +185 -0
- package/dist/cjs/client/types/drill.d.ts +240 -0
- package/dist/cjs/client/types/flow.d.ts +191 -0
- package/dist/cjs/client/types/funnel.d.ts +288 -0
- package/dist/cjs/client/types/retention.d.ts +301 -0
- package/dist/cjs/client/types.d.ts +600 -0
- package/dist/cjs/client/utils/axisValueFormatting.d.ts +32 -0
- package/dist/cjs/client/utils/chartConstants.d.ts +16 -0
- package/dist/cjs/client/utils/chartUtils.d.ts +35 -0
- package/dist/cjs/client/utils/colorPalettes.d.ts +35 -0
- package/dist/cjs/client/utils/comparisonUtils.d.ts +96 -0
- package/dist/cjs/client/utils/configMigration.d.ts +85 -0
- package/dist/cjs/client/utils/drillQueryBuilder.d.ts +41 -0
- package/dist/cjs/client/utils/exportXlsx.d.ts +20 -0
- package/dist/cjs/client/utils/filterUtils.d.ts +113 -0
- package/dist/cjs/client/utils/funnelExecution.d.ts +211 -0
- package/dist/cjs/client/utils/funnelValidation.d.ts +46 -0
- package/dist/cjs/client/utils/index.d.ts +94 -0
- package/dist/cjs/client/utils/joinReachability.d.ts +27 -0
- package/dist/cjs/client/utils/measureIcons.d.ts +11 -0
- package/dist/cjs/client/utils/multiQueryUtils.d.ts +86 -0
- package/dist/cjs/client/utils/multiQueryValidation.d.ts +69 -0
- package/dist/cjs/client/utils/periodUtils.d.ts +40 -0
- package/dist/cjs/client/utils/pivotUtils.d.ts +87 -0
- package/dist/cjs/client/utils/shareUtils.d.ts +61 -0
- package/dist/cjs/client/utils/syntaxHighlighting.d.ts +36 -0
- package/dist/cjs/client/utils/targetUtils.d.ts +36 -0
- package/dist/cjs/client/utils/thumbnail.d.ts +36 -0
- package/dist/cjs/client/utils/timeValueFormatting.d.ts +32 -0
- package/dist/cjs/client/utils.d.ts +8 -0
- package/dist/cjs/package.json +3 -0
- package/dist/cjs/server/adapters/base-adapter.d.ts +332 -0
- package/dist/cjs/server/adapters/databend-adapter.d.ts +63 -0
- package/dist/cjs/server/adapters/duckdb-adapter.d.ts +68 -0
- package/dist/cjs/server/adapters/mysql-adapter.d.ts +65 -0
- package/dist/cjs/server/adapters/postgres-adapter.d.ts +55 -0
- package/dist/cjs/server/adapters/singlestore-adapter.d.ts +4 -0
- package/dist/cjs/server/adapters/snowflake-adapter.d.ts +53 -0
- package/dist/cjs/server/adapters/sqlite-adapter.d.ts +120 -0
- package/dist/cjs/server/adapters/window-function-builder.d.ts +11 -0
- package/dist/cjs/server/agent/chart-validation.d.ts +22 -0
- package/dist/cjs/server/agent/handler-steps.d.ts +37 -0
- package/dist/cjs/server/agent/handler.d.ts +25 -0
- package/dist/cjs/server/agent/index.d.ts +11 -0
- package/dist/cjs/server/agent/providers/anthropic.d.ts +24 -0
- package/dist/cjs/server/agent/providers/factory.d.ts +12 -0
- package/dist/cjs/server/agent/providers/google.d.ts +23 -0
- package/dist/cjs/server/agent/providers/index.d.ts +6 -0
- package/dist/cjs/server/agent/providers/openai.d.ts +26 -0
- package/dist/cjs/server/agent/providers/types.d.ts +95 -0
- package/dist/cjs/server/agent/system-prompt.d.ts +5 -0
- package/dist/cjs/server/agent/tools.d.ts +28 -0
- package/dist/cjs/server/agent/types.d.ts +192 -0
- package/dist/cjs/server/ai/discovery-helpers.d.ts +29 -0
- package/dist/cjs/server/ai/discovery.d.ts +66 -0
- package/dist/cjs/server/ai/index.d.ts +10 -0
- package/dist/cjs/server/ai/mcp-prompts.d.ts +83 -0
- package/dist/cjs/server/ai/query-schema.d.ts +258 -0
- package/dist/cjs/server/ai/schemas.d.ts +63 -0
- package/dist/cjs/server/ai/suggestion-helpers.d.ts +33 -0
- package/dist/cjs/server/ai/suggestion.d.ts +16 -0
- package/dist/cjs/server/ai/validation-helpers.d.ts +21 -0
- package/dist/cjs/server/ai/validation.d.ts +31 -0
- package/dist/cjs/server/builders/analysis-utils.d.ts +106 -0
- package/dist/cjs/server/builders/comparison-query-builder.d.ts +70 -0
- package/dist/cjs/server/builders/cte-builder.d.ts +108 -0
- package/dist/cjs/server/builders/date-time-builder.d.ts +34 -0
- package/dist/cjs/server/builders/date-time-helpers.d.ts +34 -0
- package/dist/cjs/server/builders/filter-builder.d.ts +25 -0
- package/dist/cjs/server/builders/filter-operators.d.ts +23 -0
- package/dist/cjs/server/builders/flow-query-builder.d.ts +136 -0
- package/dist/cjs/server/builders/funnel-query-builder.d.ts +145 -0
- package/dist/cjs/server/builders/group-by-builder.d.ts +38 -0
- package/dist/cjs/server/builders/index.d.ts +13 -0
- package/dist/cjs/server/builders/measure-builder.d.ts +185 -0
- package/dist/cjs/server/builders/retention-query-builder.d.ts +98 -0
- package/dist/cjs/server/cache-providers/index.d.ts +5 -0
- package/dist/cjs/server/cache-providers/memory.d.ts +105 -0
- package/dist/cjs/server/cache-utils.d.ts +85 -0
- package/dist/cjs/server/compiler-metadata.d.ts +11 -0
- package/dist/cjs/server/compiler.d.ts +212 -0
- package/dist/cjs/server/cube-utils.d.ts +158 -0
- package/dist/cjs/server/database-utils.d.ts +18 -0
- package/dist/cjs/server/execution/annotation-builder.d.ts +12 -0
- package/dist/cjs/server/execution/filter-cache-preloader.d.ts +19 -0
- package/dist/cjs/server/execution/mode-router.d.ts +25 -0
- package/dist/cjs/server/execution/query-result-cache.d.ts +21 -0
- package/dist/cjs/server/execution/result-post-processor.d.ts +10 -0
- package/dist/cjs/server/executor.d.ts +186 -0
- package/dist/cjs/server/executors/base-executor.d.ts +16 -0
- package/dist/cjs/server/executors/databend-executor.d.ts +33 -0
- package/dist/cjs/server/executors/duckdb-executor.d.ts +33 -0
- package/dist/cjs/server/executors/explain-utils.d.ts +28 -0
- package/dist/cjs/server/executors/index.d.ts +21 -0
- package/dist/cjs/server/executors/mysql-executor.d.ts +27 -0
- package/dist/cjs/server/executors/postgres-executor.d.ts +27 -0
- package/dist/cjs/server/executors/singlestore-executor.d.ts +9 -0
- package/dist/cjs/server/executors/snowflake-executor.d.ts +33 -0
- package/dist/cjs/server/executors/sqlite-executor.d.ts +28 -0
- package/dist/cjs/server/explain/databend-parser.d.ts +16 -0
- package/dist/cjs/server/explain/duckdb-parser.d.ts +28 -0
- package/dist/cjs/server/explain/explain-tree.d.ts +20 -0
- package/dist/cjs/server/explain/index.d.ts +9 -0
- package/dist/cjs/server/explain/mysql-parser.d.ts +38 -0
- package/dist/cjs/server/explain/postgres-parser.d.ts +18 -0
- package/dist/cjs/server/explain/snowflake-parser.d.ts +17 -0
- package/dist/cjs/server/explain/sqlite-parser.d.ts +23 -0
- package/dist/cjs/server/filter-cache.d.ts +73 -0
- package/dist/cjs/server/gap-filler.d.ts +48 -0
- package/dist/cjs/server/index.d.ts +38 -0
- package/dist/cjs/server/logical-plan/cte-planner-helpers.d.ts +37 -0
- package/dist/cjs/server/logical-plan/cte-planner.d.ts +104 -0
- package/dist/cjs/server/logical-plan/filter-propagation.d.ts +44 -0
- package/dist/cjs/server/logical-plan/index.d.ts +19 -0
- package/dist/cjs/server/logical-plan/join-planner.d.ts +27 -0
- package/dist/cjs/server/logical-plan/logical-plan-builder.d.ts +58 -0
- package/dist/cjs/server/logical-plan/logical-planner.d.ts +39 -0
- package/dist/cjs/server/logical-plan/optimiser.d.ts +34 -0
- package/dist/cjs/server/logical-plan/plan-analysis-reporter.d.ts +59 -0
- package/dist/cjs/server/logical-plan/planner-utils.d.ts +20 -0
- package/dist/cjs/server/logical-plan/types.d.ts +199 -0
- package/dist/cjs/server/measure-classification.d.ts +40 -0
- package/dist/cjs/server/physical-plan/drizzle-plan-builder.d.ts +50 -0
- package/dist/cjs/server/physical-plan/drizzle-sql-builder.d.ts +118 -0
- package/dist/cjs/server/physical-plan/index.d.ts +2 -0
- package/dist/cjs/server/physical-plan/processors/cte-processor.d.ts +6 -0
- package/dist/cjs/server/physical-plan/processors/index.d.ts +8 -0
- package/dist/cjs/server/physical-plan/processors/joins-processor.d.ts +6 -0
- package/dist/cjs/server/physical-plan/processors/keys-dedup-processor.d.ts +13 -0
- package/dist/cjs/server/physical-plan/processors/multi-fact-processor.d.ts +13 -0
- package/dist/cjs/server/physical-plan/processors/predicates-processor.d.ts +6 -0
- package/dist/cjs/server/physical-plan/processors/selection-processor.d.ts +6 -0
- package/dist/cjs/server/physical-plan/processors/shared.d.ts +38 -0
- package/dist/cjs/server/physical-plan/processors/window-processor.d.ts +6 -0
- package/dist/cjs/server/prompts/explain-analysis-prompt.d.ts +47 -0
- package/dist/cjs/server/prompts/index.d.ts +27 -0
- package/dist/cjs/server/prompts/single-step-prompt.d.ts +31 -0
- package/dist/cjs/server/prompts/step0-validation-prompt.d.ts +39 -0
- package/dist/cjs/server/prompts/step1-shape-prompt.d.ts +29 -0
- package/dist/cjs/server/prompts/step2-complete-prompt.d.ts +19 -0
- package/dist/cjs/server/prompts/types.d.ts +37 -0
- package/dist/cjs/server/query-handlers.d.ts +79 -0
- package/dist/cjs/server/query-modes.d.ts +28 -0
- package/dist/cjs/server/query-validator.d.ts +9 -0
- package/dist/cjs/server/resolvers/calculated-measure-resolver.d.ts +98 -0
- package/dist/cjs/server/resolvers/index.d.ts +6 -0
- package/dist/cjs/server/resolvers/join-path-resolver.d.ts +158 -0
- package/dist/cjs/server/sql-format.d.ts +11 -0
- package/dist/cjs/server/template-substitution.d.ts +57 -0
- package/dist/cjs/server/types/analysis.d.ts +189 -0
- package/dist/cjs/server/types/cache.d.ts +132 -0
- package/dist/cjs/server/types/core.d.ts +164 -0
- package/dist/cjs/server/types/cube.d.ts +544 -0
- package/dist/cjs/server/types/executor.d.ts +156 -0
- package/dist/cjs/server/types/flow.d.ts +144 -0
- package/dist/cjs/server/types/funnel.d.ts +118 -0
- package/dist/cjs/server/types/index.d.ts +11 -0
- package/dist/cjs/server/types/metadata.d.ts +113 -0
- package/dist/cjs/server/types/query.d.ts +153 -0
- package/dist/cjs/server/types/retention.d.ts +141 -0
- package/dist/cjs/server/types/utils.d.ts +11 -0
- package/dist/cjs/server/types/validation.d.ts +14 -0
- package/dist/server/index.cjs +1 -1
- package/dist/server/index.js +1 -1
- package/dist/{adapters/openai-B5jEiqiB.js → server/openai-CmVRIbUg.js} +18 -2
- package/dist/server/{openai-cDlFSTk6.js → openai-CtXqeznO.js} +1 -1
- package/dist/{adapters/openai-D0musiYP.cjs → server/openai-D-6l1Y8h.cjs} +3 -3
- package/dist/server/{openai-vXvLni8v.cjs → openai-DTSTMiXL.cjs} +1 -1
- package/package.json +75 -29
|
@@ -0,0 +1,354 @@
|
|
|
1
|
+
import { SemanticLayerCompiler, SemanticQuery, SecurityContext, QuerySuggestion, AIValidationResult } from '../server/index.js';
|
|
2
|
+
import { normalizeQueryFields } from '../server/query-handlers.js';
|
|
3
|
+
import { MCPPromptResolver, MCPResourceResolver, MCPInstructionsResolver } from './mcp-transport.js';
|
|
4
|
+
export { handleDiscover, handleLoad } from '../server/query-handlers.js';
|
|
5
|
+
export type { DiscoverRequest, LoadRequest, DiscoverResponse } from '../server/query-handlers.js';
|
|
6
|
+
export { formatSqlString } from '../server/sql-format.js';
|
|
7
|
+
export { normalizeQueryFields };
|
|
8
|
+
/**
|
|
9
|
+
* Calculate query complexity based on query structure
|
|
10
|
+
*/
|
|
11
|
+
export declare function calculateQueryComplexity(query: SemanticQuery): string;
|
|
12
|
+
/**
|
|
13
|
+
* Generate a unique request ID
|
|
14
|
+
*/
|
|
15
|
+
export declare function generateRequestId(): string;
|
|
16
|
+
/**
|
|
17
|
+
* Build transformed query metadata for Cube.js compatibility
|
|
18
|
+
*/
|
|
19
|
+
export declare function buildTransformedQuery(query: SemanticQuery): any;
|
|
20
|
+
/**
|
|
21
|
+
* Get database type from semantic layer
|
|
22
|
+
*/
|
|
23
|
+
export declare function getDatabaseType(semanticLayer: SemanticLayerCompiler): string;
|
|
24
|
+
/**
|
|
25
|
+
* Helper function to handle dry-run logic for all adapters
|
|
26
|
+
*/
|
|
27
|
+
export declare function handleDryRun(query: SemanticQuery, securityContext: SecurityContext, semanticLayer: SemanticLayerCompiler): Promise<any>;
|
|
28
|
+
/**
|
|
29
|
+
* Format standard Cube.js API response
|
|
30
|
+
*/
|
|
31
|
+
export declare function formatCubeResponse(query: SemanticQuery, result: {
|
|
32
|
+
data: any[];
|
|
33
|
+
annotation?: any;
|
|
34
|
+
cache?: {
|
|
35
|
+
hit: boolean;
|
|
36
|
+
cachedAt?: string;
|
|
37
|
+
ttlMs?: number;
|
|
38
|
+
ttlRemainingMs?: number;
|
|
39
|
+
};
|
|
40
|
+
warnings?: Array<{
|
|
41
|
+
code: string;
|
|
42
|
+
message: string;
|
|
43
|
+
severity: string;
|
|
44
|
+
cubes?: string[];
|
|
45
|
+
measures?: string[];
|
|
46
|
+
suggestion?: string;
|
|
47
|
+
}>;
|
|
48
|
+
}, semanticLayer: SemanticLayerCompiler): {
|
|
49
|
+
queryType: string;
|
|
50
|
+
results: {
|
|
51
|
+
warnings?: {
|
|
52
|
+
code: string;
|
|
53
|
+
message: string;
|
|
54
|
+
severity: string;
|
|
55
|
+
cubes?: string[];
|
|
56
|
+
measures?: string[];
|
|
57
|
+
suggestion?: string;
|
|
58
|
+
}[] | undefined;
|
|
59
|
+
cache?: {
|
|
60
|
+
hit: boolean;
|
|
61
|
+
cachedAt?: string;
|
|
62
|
+
ttlMs?: number;
|
|
63
|
+
ttlRemainingMs?: number;
|
|
64
|
+
} | undefined;
|
|
65
|
+
query: SemanticQuery;
|
|
66
|
+
lastRefreshTime: string;
|
|
67
|
+
usedPreAggregations: {};
|
|
68
|
+
transformedQuery: any;
|
|
69
|
+
requestId: string;
|
|
70
|
+
annotation: any;
|
|
71
|
+
dataSource: string;
|
|
72
|
+
dbType: string;
|
|
73
|
+
extDbType: string;
|
|
74
|
+
external: boolean;
|
|
75
|
+
slowQuery: boolean;
|
|
76
|
+
data: any[];
|
|
77
|
+
}[];
|
|
78
|
+
pivotQuery: {
|
|
79
|
+
queryType: string;
|
|
80
|
+
measures?: string[];
|
|
81
|
+
dimensions?: string[];
|
|
82
|
+
filters?: Array<import('../server/index.js').Filter>;
|
|
83
|
+
timeDimensions?: Array<import('../server/index.js').TimeDimension>;
|
|
84
|
+
limit?: number;
|
|
85
|
+
offset?: number;
|
|
86
|
+
order?: Record<string, "asc" | "desc">;
|
|
87
|
+
fillMissingDatesValue?: number | null;
|
|
88
|
+
ungrouped?: boolean;
|
|
89
|
+
funnel?: import('../server/index.js').FunnelQueryConfig;
|
|
90
|
+
flow?: import('../server/types/flow.js').FlowQueryConfig;
|
|
91
|
+
retention?: import('../server/index.js').RetentionQueryConfig;
|
|
92
|
+
};
|
|
93
|
+
slowQuery: boolean;
|
|
94
|
+
};
|
|
95
|
+
/**
|
|
96
|
+
* Format SQL generation response
|
|
97
|
+
*/
|
|
98
|
+
export declare function formatSqlResponse(query: SemanticQuery, sqlResult: {
|
|
99
|
+
sql: string;
|
|
100
|
+
params?: any[];
|
|
101
|
+
}): {
|
|
102
|
+
sql: string;
|
|
103
|
+
params: any[];
|
|
104
|
+
query: SemanticQuery;
|
|
105
|
+
};
|
|
106
|
+
/**
|
|
107
|
+
* Format metadata response with query guidance for AI consumers
|
|
108
|
+
*/
|
|
109
|
+
export declare function formatMetaResponse(metadata: any): {
|
|
110
|
+
cubes: any;
|
|
111
|
+
queryGuidance: {
|
|
112
|
+
dateHandling: {
|
|
113
|
+
critical: string;
|
|
114
|
+
forAggregatedTotals: {
|
|
115
|
+
description: string;
|
|
116
|
+
example: {
|
|
117
|
+
filters: {
|
|
118
|
+
member: string;
|
|
119
|
+
operator: string;
|
|
120
|
+
values: string[];
|
|
121
|
+
}[];
|
|
122
|
+
};
|
|
123
|
+
useCase: string;
|
|
124
|
+
};
|
|
125
|
+
forTimeSeries: {
|
|
126
|
+
description: string;
|
|
127
|
+
example: {
|
|
128
|
+
timeDimensions: {
|
|
129
|
+
dimension: string;
|
|
130
|
+
granularity: string;
|
|
131
|
+
dateRange: string;
|
|
132
|
+
}[];
|
|
133
|
+
};
|
|
134
|
+
useCase: string;
|
|
135
|
+
};
|
|
136
|
+
warning: string;
|
|
137
|
+
};
|
|
138
|
+
crossCubeQueries: {
|
|
139
|
+
description: string;
|
|
140
|
+
example: string;
|
|
141
|
+
howToFind: string;
|
|
142
|
+
};
|
|
143
|
+
topNPattern: {
|
|
144
|
+
description: string;
|
|
145
|
+
example: {
|
|
146
|
+
measures: string[];
|
|
147
|
+
dimensions: string[];
|
|
148
|
+
filters: {
|
|
149
|
+
member: string;
|
|
150
|
+
operator: string;
|
|
151
|
+
values: string[];
|
|
152
|
+
}[];
|
|
153
|
+
order: {
|
|
154
|
+
'Cube.total': string;
|
|
155
|
+
};
|
|
156
|
+
limit: number;
|
|
157
|
+
};
|
|
158
|
+
};
|
|
159
|
+
filterSyntax: {
|
|
160
|
+
description: string;
|
|
161
|
+
operators: string[];
|
|
162
|
+
dateRangeValues: {
|
|
163
|
+
relative: string[];
|
|
164
|
+
absolute: string[];
|
|
165
|
+
};
|
|
166
|
+
};
|
|
167
|
+
};
|
|
168
|
+
};
|
|
169
|
+
/**
|
|
170
|
+
* Standard error response format
|
|
171
|
+
*/
|
|
172
|
+
export declare function formatErrorResponse(error: string | Error, status?: number): {
|
|
173
|
+
error: string;
|
|
174
|
+
status: number;
|
|
175
|
+
};
|
|
176
|
+
/**
|
|
177
|
+
* Options for batch request handling
|
|
178
|
+
*/
|
|
179
|
+
export interface BatchRequestOptions {
|
|
180
|
+
/**
|
|
181
|
+
* Whether to bypass server-side cache for all queries in the batch
|
|
182
|
+
* When true, all queries will be executed fresh without cache
|
|
183
|
+
*/
|
|
184
|
+
skipCache?: boolean;
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Handle batch query requests - wrapper around existing single query execution
|
|
188
|
+
* Executes multiple queries in parallel and returns partial success results
|
|
189
|
+
*
|
|
190
|
+
* @param queries - Array of semantic queries to execute
|
|
191
|
+
* @param securityContext - Security context (extracted once, shared across all queries)
|
|
192
|
+
* @param semanticLayer - Semantic layer compiler instance
|
|
193
|
+
* @param options - Optional batch request options (e.g., skipCache)
|
|
194
|
+
* @returns Array of results matching input query order (successful or error results)
|
|
195
|
+
*/
|
|
196
|
+
export declare function handleBatchRequest(queries: SemanticQuery[], securityContext: SecurityContext, semanticLayer: SemanticLayerCompiler, options?: BatchRequestOptions): Promise<{
|
|
197
|
+
results: ({
|
|
198
|
+
queryType: string;
|
|
199
|
+
results: {
|
|
200
|
+
warnings?: {
|
|
201
|
+
code: string;
|
|
202
|
+
message: string;
|
|
203
|
+
severity: string;
|
|
204
|
+
cubes?: string[];
|
|
205
|
+
measures?: string[];
|
|
206
|
+
suggestion?: string;
|
|
207
|
+
}[] | undefined;
|
|
208
|
+
cache?: {
|
|
209
|
+
hit: boolean;
|
|
210
|
+
cachedAt?: string;
|
|
211
|
+
ttlMs?: number;
|
|
212
|
+
ttlRemainingMs?: number;
|
|
213
|
+
} | undefined;
|
|
214
|
+
query: SemanticQuery;
|
|
215
|
+
lastRefreshTime: string;
|
|
216
|
+
usedPreAggregations: {};
|
|
217
|
+
transformedQuery: any;
|
|
218
|
+
requestId: string;
|
|
219
|
+
annotation: any;
|
|
220
|
+
dataSource: string;
|
|
221
|
+
dbType: string;
|
|
222
|
+
extDbType: string;
|
|
223
|
+
external: boolean;
|
|
224
|
+
slowQuery: boolean;
|
|
225
|
+
data: any[];
|
|
226
|
+
}[];
|
|
227
|
+
pivotQuery: {
|
|
228
|
+
queryType: string;
|
|
229
|
+
measures?: string[];
|
|
230
|
+
dimensions?: string[];
|
|
231
|
+
filters?: Array<import('../server/index.js').Filter>;
|
|
232
|
+
timeDimensions?: Array<import('../server/index.js').TimeDimension>;
|
|
233
|
+
limit?: number;
|
|
234
|
+
offset?: number;
|
|
235
|
+
order?: Record<string, "asc" | "desc">;
|
|
236
|
+
fillMissingDatesValue?: number | null;
|
|
237
|
+
ungrouped?: boolean;
|
|
238
|
+
funnel?: import('../server/index.js').FunnelQueryConfig;
|
|
239
|
+
flow?: import('../server/types/flow.js').FlowQueryConfig;
|
|
240
|
+
retention?: import('../server/index.js').RetentionQueryConfig;
|
|
241
|
+
};
|
|
242
|
+
slowQuery: boolean;
|
|
243
|
+
success: boolean;
|
|
244
|
+
error?: undefined;
|
|
245
|
+
query?: undefined;
|
|
246
|
+
} | {
|
|
247
|
+
success: boolean;
|
|
248
|
+
error: string;
|
|
249
|
+
query: SemanticQuery;
|
|
250
|
+
})[];
|
|
251
|
+
}>;
|
|
252
|
+
/**
|
|
253
|
+
* Locale configuration for the MCP App visualization.
|
|
254
|
+
*/
|
|
255
|
+
export interface McpAppConfig {
|
|
256
|
+
/**
|
|
257
|
+
* Default locale to use when the browser locale is unavailable or detection is disabled.
|
|
258
|
+
* BCP-47 format (e.g. 'en-GB', 'nl-NL', 'en-US'). Defaults to 'en-GB'.
|
|
259
|
+
*/
|
|
260
|
+
defaultLocale?: string;
|
|
261
|
+
/**
|
|
262
|
+
* When true (default), the MCP App will prefer the browser/runtime locale over defaultLocale.
|
|
263
|
+
* Set to false to force defaultLocale regardless of the browser setting.
|
|
264
|
+
*/
|
|
265
|
+
detectBrowserLocale?: boolean;
|
|
266
|
+
}
|
|
267
|
+
/**
|
|
268
|
+
* MCP Endpoint Options
|
|
269
|
+
*/
|
|
270
|
+
export interface MCPOptions {
|
|
271
|
+
/** Enable MCP endpoints (default: true) */
|
|
272
|
+
enabled?: boolean;
|
|
273
|
+
/** Which MCP tools to expose (default: all) */
|
|
274
|
+
tools?: ('discover' | 'suggest' | 'validate' | 'load')[];
|
|
275
|
+
/** Base path for MCP endpoints (default: '/mcp') */
|
|
276
|
+
basePath?: string;
|
|
277
|
+
/**
|
|
278
|
+
* Allowed origins for MCP requests (for Origin header validation per MCP 2025-11-25).
|
|
279
|
+
* If not provided, all origins are allowed (permissive mode).
|
|
280
|
+
* Set this to restrict access to specific origins for production security.
|
|
281
|
+
* Example: ['http://localhost:3000', 'https://myapp.com']
|
|
282
|
+
*/
|
|
283
|
+
allowedOrigins?: string[];
|
|
284
|
+
/**
|
|
285
|
+
* Enable MCP App visualization for load tool results.
|
|
286
|
+
* Pass `true` to enable with defaults, or a config object to set locale options.
|
|
287
|
+
* @example app: { defaultLocale: 'nl-NL', detectBrowserLocale: false }
|
|
288
|
+
*/
|
|
289
|
+
app?: boolean | McpAppConfig;
|
|
290
|
+
/**
|
|
291
|
+
* Override the MCP prompt set exposed by the built-in endpoint.
|
|
292
|
+
* Pass an array to replace the defaults, or a function to derive from them.
|
|
293
|
+
*/
|
|
294
|
+
prompts?: MCPPromptResolver;
|
|
295
|
+
/**
|
|
296
|
+
* Override the MCP resources exposed by the built-in endpoint.
|
|
297
|
+
* Pass an array to replace the defaults, or a function to derive from them.
|
|
298
|
+
* The live schema resource is always appended automatically.
|
|
299
|
+
*/
|
|
300
|
+
resources?: MCPResourceResolver;
|
|
301
|
+
/**
|
|
302
|
+
* Override the `InitializeResult.instructions` string returned by the
|
|
303
|
+
* MCP `initialize` handshake. Per the MCP spec, this is the only
|
|
304
|
+
* server-authored guidance that clients are expected to surface to the
|
|
305
|
+
* model (it is typically merged into the system prompt).
|
|
306
|
+
*
|
|
307
|
+
* Pass a string to replace the defaults entirely, or a function to
|
|
308
|
+
* derive from / extend them. Use this to append project-specific
|
|
309
|
+
* guidance (e.g. cube semantics, naming conventions) without losing
|
|
310
|
+
* the built-in workflow rules.
|
|
311
|
+
*/
|
|
312
|
+
instructions?: MCPInstructionsResolver;
|
|
313
|
+
/**
|
|
314
|
+
* OAuth 2.1 Protected Resource Metadata URL (RFC 9728).
|
|
315
|
+
* When set, MCP endpoints require a Bearer token in the Authorization header.
|
|
316
|
+
* Unauthenticated requests receive 401 with WWW-Authenticate pointing to this URL.
|
|
317
|
+
* Token validation is the responsibility of extractSecurityContext.
|
|
318
|
+
*/
|
|
319
|
+
resourceMetadataUrl?: string;
|
|
320
|
+
/**
|
|
321
|
+
* Optional name to use in the MCP serverInfo.name field (initialize response).
|
|
322
|
+
* Defaults to 'drizzle-cube'. Override to match your product branding.
|
|
323
|
+
*/
|
|
324
|
+
serverName?: string;
|
|
325
|
+
}
|
|
326
|
+
/**
|
|
327
|
+
* Suggest request body
|
|
328
|
+
*/
|
|
329
|
+
export interface SuggestRequest {
|
|
330
|
+
/** Natural language query */
|
|
331
|
+
naturalLanguage: string;
|
|
332
|
+
/** Optional target cube name */
|
|
333
|
+
cube?: string;
|
|
334
|
+
}
|
|
335
|
+
/**
|
|
336
|
+
* Validate request body
|
|
337
|
+
*/
|
|
338
|
+
export interface ValidateRequest {
|
|
339
|
+
/** Query to validate */
|
|
340
|
+
query: SemanticQuery;
|
|
341
|
+
}
|
|
342
|
+
/**
|
|
343
|
+
* Handle /suggest endpoint - generate query from natural language
|
|
344
|
+
*/
|
|
345
|
+
export declare function handleSuggest(semanticLayer: SemanticLayerCompiler, body: SuggestRequest): Promise<QuerySuggestion>;
|
|
346
|
+
/**
|
|
347
|
+
* Handle /validate endpoint - validate query with corrections
|
|
348
|
+
*/
|
|
349
|
+
export declare function handleValidate(semanticLayer: SemanticLayerCompiler, body: ValidateRequest, securityContext?: SecurityContext): Promise<AIValidationResult & {
|
|
350
|
+
sql?: {
|
|
351
|
+
sql: string;
|
|
352
|
+
params?: any[];
|
|
353
|
+
};
|
|
354
|
+
}>;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { ModeAdapter } from './modeAdapter.js';
|
|
2
|
+
import { AnalysisType } from '../types/analysisConfig.js';
|
|
3
|
+
/**
|
|
4
|
+
* Adapter registry - manages mode adapters
|
|
5
|
+
*/
|
|
6
|
+
export declare const adapterRegistry: {
|
|
7
|
+
/**
|
|
8
|
+
* Register an adapter for a specific analysis type.
|
|
9
|
+
* Should be called once at app initialization.
|
|
10
|
+
*
|
|
11
|
+
* @param adapter - The adapter to register
|
|
12
|
+
*/
|
|
13
|
+
register<T>(adapter: ModeAdapter<T>): void;
|
|
14
|
+
/**
|
|
15
|
+
* Get the adapter for a specific analysis type.
|
|
16
|
+
* Built-in adapters (query, funnel) are initialized automatically.
|
|
17
|
+
*
|
|
18
|
+
* @param type - The analysis type to get adapter for
|
|
19
|
+
* @returns The registered adapter
|
|
20
|
+
* @throws Error if no adapter is registered for the type
|
|
21
|
+
*/
|
|
22
|
+
get<T>(type: AnalysisType): ModeAdapter<T>;
|
|
23
|
+
/**
|
|
24
|
+
* Check if an adapter is registered for a specific type.
|
|
25
|
+
* Built-in adapters (query, funnel) are initialized automatically.
|
|
26
|
+
*
|
|
27
|
+
* @param type - The analysis type to check
|
|
28
|
+
* @returns True if an adapter is registered
|
|
29
|
+
*/
|
|
30
|
+
has(type: AnalysisType): boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Get all registered analysis types.
|
|
33
|
+
* Built-in adapters (query, funnel) are initialized automatically.
|
|
34
|
+
*
|
|
35
|
+
* @returns Array of registered types
|
|
36
|
+
*/
|
|
37
|
+
getRegisteredTypes(): AnalysisType[];
|
|
38
|
+
/**
|
|
39
|
+
* Clear all registered adapters.
|
|
40
|
+
* Primarily useful for testing.
|
|
41
|
+
* Note: Built-in adapters will be re-initialized on next access.
|
|
42
|
+
*/
|
|
43
|
+
clear(): void;
|
|
44
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ModeAdapter } from './modeAdapter.js';
|
|
2
|
+
import { FunnelStepState, FunnelBindingKey } from '../types.js';
|
|
3
|
+
/**
|
|
4
|
+
* The shape of funnel mode state in the store.
|
|
5
|
+
* This is what the adapter's load() returns and save() receives.
|
|
6
|
+
*/
|
|
7
|
+
export interface FunnelSliceState {
|
|
8
|
+
/** The cube all funnel steps use (single-cube mode) */
|
|
9
|
+
funnelCube: string | null;
|
|
10
|
+
/** Funnel step definitions */
|
|
11
|
+
funnelSteps: FunnelStepState[];
|
|
12
|
+
/** Currently selected step index */
|
|
13
|
+
activeFunnelStepIndex: number;
|
|
14
|
+
/** Time dimension for temporal ordering */
|
|
15
|
+
funnelTimeDimension: string | null;
|
|
16
|
+
/** Binding key that links entities across steps */
|
|
17
|
+
funnelBindingKey: FunnelBindingKey | null;
|
|
18
|
+
}
|
|
19
|
+
export declare const funnelModeAdapter: ModeAdapter<FunnelSliceState>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Adapters Index
|
|
3
|
+
*
|
|
4
|
+
* Barrel export for all adapter-related modules.
|
|
5
|
+
* Also handles adapter registration.
|
|
6
|
+
*/
|
|
7
|
+
export type { ModeAdapter, ValidationResult } from './modeAdapter.js';
|
|
8
|
+
export { adapterRegistry } from './adapterRegistry.js';
|
|
9
|
+
export { queryModeAdapter } from './queryModeAdapter.js';
|
|
10
|
+
export type { QuerySliceState } from './queryModeAdapter.js';
|
|
11
|
+
export { funnelModeAdapter } from './funnelModeAdapter.js';
|
|
12
|
+
export type { FunnelSliceState } from './funnelModeAdapter.js';
|
|
13
|
+
export { flowModeAdapter } from './flowModeAdapter.js';
|
|
14
|
+
export { retentionModeAdapter } from './retentionModeAdapter.js';
|
|
15
|
+
export type { RetentionSliceState } from '../types/retention.js';
|
|
16
|
+
/**
|
|
17
|
+
* Manually initialize and register all adapters.
|
|
18
|
+
*
|
|
19
|
+
* Note: This function is no longer required to be called. Built-in adapters
|
|
20
|
+
* (query, funnel) are now automatically initialized on first access to the
|
|
21
|
+
* registry. This function is kept for backward compatibility and for cases
|
|
22
|
+
* where explicit early initialization is preferred.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* // Optional - adapters auto-initialize on first use
|
|
26
|
+
* import { initializeAdapters } from './adapters'
|
|
27
|
+
* initializeAdapters()
|
|
28
|
+
*/
|
|
29
|
+
export declare function initializeAdapters(): void;
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { AnalysisConfig, AnalysisType, ChartConfig } from '../types/analysisConfig.js';
|
|
2
|
+
/**
|
|
3
|
+
* Result from adapter validation
|
|
4
|
+
*/
|
|
5
|
+
export interface ValidationResult {
|
|
6
|
+
/** Whether the state is valid for execution */
|
|
7
|
+
isValid: boolean;
|
|
8
|
+
/** Errors that prevent execution */
|
|
9
|
+
errors: string[];
|
|
10
|
+
/** Warnings that don't prevent execution but should be shown */
|
|
11
|
+
warnings: string[];
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Mode adapter interface - owns all mode-specific logic
|
|
15
|
+
*
|
|
16
|
+
* TUIState is the shape of the UI state for this mode. For example:
|
|
17
|
+
* - Query mode: { queryStates, activeQueryIndex, mergeStrategy }
|
|
18
|
+
* - Funnel mode: { funnelCube, funnelSteps, funnelBindingKey, ... }
|
|
19
|
+
*
|
|
20
|
+
* The adapter handles conversion between this UI state and the
|
|
21
|
+
* persisted AnalysisConfig format.
|
|
22
|
+
*/
|
|
23
|
+
export interface ModeAdapter<TUIState> {
|
|
24
|
+
/**
|
|
25
|
+
* The analysis type this adapter handles.
|
|
26
|
+
* Must match one of the AnalysisType union values.
|
|
27
|
+
*/
|
|
28
|
+
readonly type: AnalysisType;
|
|
29
|
+
/**
|
|
30
|
+
* Create initial empty UI state for this mode.
|
|
31
|
+
* Called on store initialization and when clearing state.
|
|
32
|
+
*/
|
|
33
|
+
createInitial(): TUIState;
|
|
34
|
+
/**
|
|
35
|
+
* Extract this mode's state from the full store state.
|
|
36
|
+
* This replaces the need for hardcoded property access in the store.
|
|
37
|
+
*
|
|
38
|
+
* Called when:
|
|
39
|
+
* - Saving state to AnalysisConfig
|
|
40
|
+
* - Getting validation for current mode
|
|
41
|
+
*
|
|
42
|
+
* @param storeState - The full store state object
|
|
43
|
+
* @returns The extracted UI state for this mode
|
|
44
|
+
*/
|
|
45
|
+
extractState(storeState: Record<string, unknown>): TUIState;
|
|
46
|
+
/**
|
|
47
|
+
* Convert AnalysisConfig → UI state (loading).
|
|
48
|
+
*
|
|
49
|
+
* Called when:
|
|
50
|
+
* - Loading from portlet (editing a dashboard widget)
|
|
51
|
+
* - Loading from share URL
|
|
52
|
+
* - Loading from localStorage
|
|
53
|
+
*
|
|
54
|
+
* @param config - The AnalysisConfig to load
|
|
55
|
+
* @returns The UI state for this mode's slice
|
|
56
|
+
* @throws Error if config cannot be loaded (malformed data)
|
|
57
|
+
*/
|
|
58
|
+
load(config: AnalysisConfig): TUIState;
|
|
59
|
+
/**
|
|
60
|
+
* Check if this adapter can load the given config.
|
|
61
|
+
* Used for graceful error handling before attempting load.
|
|
62
|
+
*
|
|
63
|
+
* Should return false for:
|
|
64
|
+
* - Wrong analysis type
|
|
65
|
+
* - Missing required fields
|
|
66
|
+
* - Invalid version
|
|
67
|
+
*
|
|
68
|
+
* @param config - Unknown value to check
|
|
69
|
+
* @returns Type guard indicating if config is valid for this adapter
|
|
70
|
+
*/
|
|
71
|
+
canLoad(config: unknown): config is AnalysisConfig;
|
|
72
|
+
/**
|
|
73
|
+
* Convert UI state → AnalysisConfig (saving).
|
|
74
|
+
*
|
|
75
|
+
* Builds the executable query from UI state. Called when:
|
|
76
|
+
* - Saving a portlet
|
|
77
|
+
* - Creating a share URL
|
|
78
|
+
* - Persisting to localStorage
|
|
79
|
+
*
|
|
80
|
+
* @param state - The current UI state for this mode
|
|
81
|
+
* @param charts - The charts config map from store
|
|
82
|
+
* @param activeView - Current active view ('table' or 'chart')
|
|
83
|
+
* @returns The persisted AnalysisConfig
|
|
84
|
+
*/
|
|
85
|
+
save(state: TUIState, charts: Partial<Record<AnalysisType, ChartConfig>>, activeView: 'table' | 'chart'): AnalysisConfig;
|
|
86
|
+
/**
|
|
87
|
+
* Validate UI state before execution.
|
|
88
|
+
*
|
|
89
|
+
* Returns validation errors/warnings that can be displayed to user.
|
|
90
|
+
* A query with errors should not be executed.
|
|
91
|
+
*
|
|
92
|
+
* @param state - The current UI state to validate
|
|
93
|
+
* @returns Validation result with errors and warnings
|
|
94
|
+
*/
|
|
95
|
+
validate(state: TUIState): ValidationResult;
|
|
96
|
+
/**
|
|
97
|
+
* Reset UI state to initial (optionally preserve cube selection).
|
|
98
|
+
*
|
|
99
|
+
* Called when user clicks "Clear" in the mode.
|
|
100
|
+
* May preserve certain selections like the current cube.
|
|
101
|
+
*
|
|
102
|
+
* @param state - Current state to clear
|
|
103
|
+
* @returns New cleared state
|
|
104
|
+
*/
|
|
105
|
+
clear(state: TUIState): TUIState;
|
|
106
|
+
/**
|
|
107
|
+
* Default chart config for this mode.
|
|
108
|
+
*
|
|
109
|
+
* Called when:
|
|
110
|
+
* - Mode switch with no existing chart config for this mode
|
|
111
|
+
* - Load with missing chart config in the AnalysisConfig
|
|
112
|
+
* - Initial store creation
|
|
113
|
+
*
|
|
114
|
+
* @returns Default ChartConfig for this mode
|
|
115
|
+
*/
|
|
116
|
+
getDefaultChartConfig(): ChartConfig;
|
|
117
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ModeAdapter } from './modeAdapter.js';
|
|
2
|
+
import { QueryMergeStrategy } from '../types.js';
|
|
3
|
+
import { AnalysisBuilderState } from '../components/AnalysisBuilder/types.js';
|
|
4
|
+
/**
|
|
5
|
+
* The shape of query mode state in the store.
|
|
6
|
+
* This is what the adapter's load() returns and save() receives.
|
|
7
|
+
*/
|
|
8
|
+
export interface QuerySliceState {
|
|
9
|
+
/** Array of query states (one per query tab) */
|
|
10
|
+
queryStates: AnalysisBuilderState[];
|
|
11
|
+
/** Index of the active query tab */
|
|
12
|
+
activeQueryIndex: number;
|
|
13
|
+
/** Strategy for combining multiple queries */
|
|
14
|
+
mergeStrategy: QueryMergeStrategy;
|
|
15
|
+
}
|
|
16
|
+
export declare const queryModeAdapter: ModeAdapter<QuerySliceState>;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { ChartType, ChartProps } from '../types.js';
|
|
3
|
+
export { registerChartComponent, unregisterChartComponent } from './chartComponentRegistry.js';
|
|
4
|
+
/**
|
|
5
|
+
* Check if a chart type is supported (built-in or custom plugin)
|
|
6
|
+
*/
|
|
7
|
+
export declare function isValidChartType(chartType: string): chartType is ChartType;
|
|
8
|
+
export interface LazyChartProps extends ChartProps {
|
|
9
|
+
chartType: ChartType;
|
|
10
|
+
fallback?: ReactNode;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Lazy Chart Component
|
|
14
|
+
*
|
|
15
|
+
* Renders a chart component with React.lazy dynamic loading.
|
|
16
|
+
* The chart type determines which chart component is loaded.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```tsx
|
|
20
|
+
* <LazyChart
|
|
21
|
+
* chartType="bar"
|
|
22
|
+
* data={chartData}
|
|
23
|
+
* chartConfig={{ yAxis: ['value'] }}
|
|
24
|
+
* height={300}
|
|
25
|
+
* />
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
export declare function LazyChart({ chartType, fallback, height, ...chartProps }: LazyChartProps): import("react").JSX.Element;
|
|
29
|
+
/**
|
|
30
|
+
* Preload a chart type
|
|
31
|
+
*
|
|
32
|
+
* Triggers the dynamic import without rendering.
|
|
33
|
+
* Useful for prefetching charts that will likely be needed.
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```tsx
|
|
37
|
+
* // Preload bar chart on hover
|
|
38
|
+
* onMouseEnter={() => preloadChart('bar')}
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
export declare function preloadChart(chartType: ChartType): void;
|
|
42
|
+
/**
|
|
43
|
+
* Preload multiple chart types
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* ```tsx
|
|
47
|
+
* // Preload common charts on app init
|
|
48
|
+
* useEffect(() => {
|
|
49
|
+
* preloadCharts(['bar', 'line', 'pie'])
|
|
50
|
+
* }, [])
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
export declare function preloadCharts(chartTypes: ChartType[]): void;
|
|
54
|
+
/**
|
|
55
|
+
* Get all available chart types (built-in + custom plugins)
|
|
56
|
+
*/
|
|
57
|
+
export declare function getAvailableChartTypes(): ChartType[];
|
|
58
|
+
/**
|
|
59
|
+
* Check if a chart type has loaded successfully.
|
|
60
|
+
* Returns false if the chart failed to load due to missing dependencies.
|
|
61
|
+
*
|
|
62
|
+
* Note: This only returns accurate results after the chart has been attempted to load.
|
|
63
|
+
* Use this for conditional UI logic (e.g., hiding unavailable chart types).
|
|
64
|
+
*/
|
|
65
|
+
export declare function isChartTypeAvailable(chartType: ChartType): boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Get list of chart types that failed to load due to missing dependencies.
|
|
68
|
+
*/
|
|
69
|
+
export declare function getUnavailableChartTypes(): ChartType[];
|