drizzle-cube 0.5.8 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/dist/adapters/express/index.cjs +1 -1
- package/dist/adapters/{adapters/express → express}/index.d.ts +3 -3
- package/dist/adapters/express/index.js +50 -50
- package/dist/adapters/fastify/index.cjs +1 -1
- package/dist/adapters/{adapters/fastify → fastify}/index.d.ts +3 -3
- package/dist/adapters/fastify/index.js +78 -78
- package/dist/adapters/google-BOnRIN1w.cjs +2 -0
- package/dist/{server/google-CFYljAOF.js → adapters/google-CvKM9yVM.js} +83 -71
- package/dist/adapters/{handler-Cx8QYLk6.js → handler-CfgE0JSL.js} +499 -576
- package/dist/adapters/handler-Cn0dOctE.cjs +25 -0
- package/dist/adapters/hono/agent-handler.d.ts +9 -0
- package/dist/adapters/hono/index.cjs +2 -2
- package/dist/adapters/{adapters/hono → hono}/index.d.ts +4 -4
- package/dist/adapters/hono/index.js +205 -175
- package/dist/adapters/hono/mcp-handler.d.ts +37 -0
- package/dist/adapters/locale-DDvZDFVn.js +8114 -0
- package/dist/adapters/locale-ZLUUNUxr.cjs +166 -0
- package/dist/adapters/{adapters/locale.d.ts → locale.d.ts} +1 -1
- package/dist/adapters/mcp-tools-handlers.d.ts +18 -0
- package/dist/adapters/mcp-tools.cjs +1 -1
- package/dist/adapters/{adapters/mcp-tools.d.ts → mcp-tools.d.ts} +5 -5
- package/dist/adapters/mcp-tools.js +49 -38
- package/dist/adapters/mcp-transport-B7ddET3M.cjs +40 -0
- package/dist/adapters/mcp-transport-Dfuj4j4q.js +591 -0
- package/dist/adapters/{adapters/mcp-transport.d.ts → mcp-transport.d.ts} +3 -3
- package/dist/adapters/nextjs/index.cjs +1 -1
- package/dist/adapters/{adapters/nextjs → nextjs}/index.d.ts +3 -3
- package/dist/adapters/nextjs/index.js +190 -197
- package/dist/adapters/nextjs/mcp-handler.d.ts +36 -0
- package/dist/adapters/{openai-BZdAA7Ji.js → openai-cDlFSTk6.js} +60 -58
- package/dist/adapters/openai-vXvLni8v.cjs +1 -0
- package/dist/adapters/{adapters/types.d.ts → types.d.ts} +1 -1
- package/dist/adapters/{utils-D9JPLmfl.js → utils-BPWZsX7k.js} +1271 -1218
- package/dist/adapters/utils-_whV4fXL.cjs +128 -0
- package/dist/adapters/utils.cjs +1 -1
- package/dist/adapters/{adapters/utils.d.ts → utils.d.ts} +17 -92
- package/dist/adapters/utils.js +2 -2
- package/dist/cli/index.cjs +2 -2
- package/dist/client/adapters/adapterRegistry.d.ts +2 -2
- package/dist/client/adapters/flowModeAdapter.d.ts +2 -2
- package/dist/client/adapters/funnelModeAdapter.d.ts +2 -2
- package/dist/client/adapters/index.d.ts +9 -9
- package/dist/client/adapters/modeAdapter.d.ts +1 -1
- package/dist/client/adapters/queryModeAdapter.d.ts +3 -3
- package/dist/client/adapters/retentionModeAdapter.d.ts +2 -2
- package/dist/client/charts/ChartLoader.d.ts +3 -17
- package/dist/client/charts/chartComponentRegistry.d.ts +46 -0
- package/dist/client/charts/chartConfigHelpers.d.ts +38 -0
- package/dist/client/charts/chartConfigRegistry.d.ts +1 -1
- package/dist/client/charts/chartPlugin.d.ts +3 -3
- package/dist/client/charts/lazyChartConfigRegistry.d.ts +2 -2
- package/dist/client/charts.d.ts +8 -8
- package/dist/client/charts.js +14 -13
- package/dist/client/chunks/{DashboardEditModal-CjCIAT-J.js → DashboardEditModal-okVfH8ZK.js} +5296 -4544
- package/dist/client/chunks/DashboardEditModal-okVfH8ZK.js.map +1 -0
- package/dist/client/chunks/{RetentionCombinedChart-BPkfcTa8.js → RetentionCombinedChart-BgbDhsPz.js} +10 -10
- package/dist/client/chunks/RetentionCombinedChart-BgbDhsPz.js.map +1 -0
- package/dist/client/chunks/{RetentionHeatmap-DGzLzr7h.js → RetentionHeatmap-DjXZaTPq.js} +5 -5
- package/dist/client/chunks/RetentionHeatmap-DjXZaTPq.js.map +1 -0
- package/dist/client/chunks/analysis-builder-DB88FojM.js +5674 -0
- package/dist/client/chunks/analysis-builder-DB88FojM.js.map +1 -0
- package/dist/client/chunks/{analysis-builder-shared-CYVwSPqt.js → analysis-builder-shared-BVK4TYfR.js} +1578 -1292
- package/dist/client/chunks/analysis-builder-shared-BVK4TYfR.js.map +1 -0
- package/dist/client/chunks/{chart-activity-grid-DmruKPab.js → chart-activity-grid-DX0SJbxs.js} +635 -492
- package/dist/client/chunks/chart-activity-grid-DX0SJbxs.js.map +1 -0
- package/dist/client/chunks/chart-area-of01_62R.js +775 -0
- package/dist/client/chunks/chart-area-of01_62R.js.map +1 -0
- package/dist/client/chunks/chart-bar-BqelQE_I.js +194 -0
- package/dist/client/chunks/chart-bar-BqelQE_I.js.map +1 -0
- package/dist/client/chunks/{chart-box-plot-DYKfyOI8.js → chart-box-plot-kkBixZ27.js} +2 -2
- package/dist/client/chunks/chart-box-plot-kkBixZ27.js.map +1 -0
- package/dist/client/chunks/chart-bubble-B2he1--4.js +221 -0
- package/dist/client/chunks/chart-bubble-B2he1--4.js.map +1 -0
- package/dist/client/chunks/{chart-candlestick-Dwc92Mrj.js → chart-candlestick-DZp19Tzh.js} +2 -2
- package/dist/client/chunks/chart-candlestick-DZp19Tzh.js.map +1 -0
- package/dist/client/chunks/chart-config-activity-grid-D_UX4NHC.js.map +1 -1
- package/dist/client/chunks/chart-config-area-BNigHUy8.js +124 -0
- package/dist/client/chunks/chart-config-area-BNigHUy8.js.map +1 -0
- package/dist/client/chunks/chart-config-bar-DSO_LRTx.js +54 -0
- package/dist/client/chunks/chart-config-bar-DSO_LRTx.js.map +1 -0
- package/dist/client/chunks/{chart-config-box-plot-DJ-dWWXA.js → chart-config-box-plot-oW8axV2q.js} +5 -10
- package/dist/client/chunks/chart-config-box-plot-oW8axV2q.js.map +1 -0
- package/dist/client/chunks/chart-config-bubble-gIoqVyjZ.js.map +1 -1
- package/dist/client/chunks/chart-config-candlestick-N6DchAA3.js.map +1 -1
- package/dist/client/chunks/chart-config-data-table-d7VBY-y_.js.map +1 -1
- package/dist/client/chunks/chart-config-funnel-DEYMcxsD.js.map +1 -1
- package/dist/client/chunks/{chart-config-gauge-DSwC04l0.js → chart-config-gauge-Dq-_H9UN.js} +5 -7
- package/dist/client/chunks/chart-config-gauge-Dq-_H9UN.js.map +1 -0
- package/dist/client/chunks/chart-config-heat-map-CfRnRNcw.js.map +1 -1
- package/dist/client/chunks/{chart-config-kpi-delta-D6BIkHL3.js → chart-config-kpi-delta-DSQbvqu_.js} +5 -10
- package/dist/client/chunks/chart-config-kpi-delta-DSQbvqu_.js.map +1 -0
- package/dist/client/chunks/{chart-config-kpi-number-Bx-V9a62.js → chart-config-kpi-number-EFSWY1We.js} +5 -7
- package/dist/client/chunks/chart-config-kpi-number-EFSWY1We.js.map +1 -0
- package/dist/client/chunks/{chart-config-kpi-text-CcqC1u-8.js → chart-config-kpi-text-KM3V5X2u.js} +5 -7
- package/dist/client/chunks/chart-config-kpi-text-KM3V5X2u.js.map +1 -0
- package/dist/client/chunks/{chart-config-line-Db3jDsWc.js → chart-config-line-D6jG8PCH.js} +9 -36
- package/dist/client/chunks/chart-config-line-D6jG8PCH.js.map +1 -0
- package/dist/client/chunks/chart-config-markdown-BtRIe8JN.js.map +1 -1
- package/dist/client/chunks/chart-config-measure-profile-DxRGa-zf.js.map +1 -1
- package/dist/client/chunks/{chart-config-pie-DD4SmRTF.js → chart-config-pie-BhzW-fdn.js} +6 -16
- package/dist/client/chunks/chart-config-pie-BhzW-fdn.js.map +1 -0
- package/dist/client/chunks/{chart-config-radar-CC2XAaGr.js → chart-config-radar-D7REP1q_.js} +6 -16
- package/dist/client/chunks/chart-config-radar-D7REP1q_.js.map +1 -0
- package/dist/client/chunks/{chart-config-radial-bar-DmxKx1R0.js → chart-config-radial-bar-Byx6qOPU.js} +6 -16
- package/dist/client/chunks/chart-config-radial-bar-Byx6qOPU.js.map +1 -0
- package/dist/client/chunks/chart-config-sankey-BTnWA7EW.js.map +1 -1
- package/dist/client/chunks/chart-config-scatter-DSYTjwRb.js.map +1 -1
- package/dist/client/chunks/chart-config-sunburst-Bwjtdf7X.js.map +1 -1
- package/dist/client/chunks/{chart-config-tree-map-BI-oQStO.js → chart-config-tree-map-DVrvf3yQ.js} +6 -16
- package/dist/client/chunks/chart-config-tree-map-DVrvf3yQ.js.map +1 -0
- package/dist/client/chunks/{chart-config-waterfall-DSnyixbI.js → chart-config-waterfall-DmFeQdIk.js} +5 -10
- package/dist/client/chunks/chart-config-waterfall-DmFeQdIk.js.map +1 -0
- package/dist/client/chunks/{chart-data-table-BO4sXsim.js → chart-data-table-CKauQXme.js} +1046 -1121
- package/dist/client/chunks/chart-data-table-CKauQXme.js.map +1 -0
- package/dist/client/chunks/{chart-funnel-DnWRsmnS.js → chart-funnel-CToKSBaL.js} +184 -222
- package/dist/client/chunks/chart-funnel-CToKSBaL.js.map +1 -0
- package/dist/client/chunks/chart-gauge-DTVezSk7.js +403 -0
- package/dist/client/chunks/chart-gauge-DTVezSk7.js.map +1 -0
- package/dist/client/chunks/chart-heat-map-DTuUl0BR.js +236 -0
- package/dist/client/chunks/chart-heat-map-DTuUl0BR.js.map +1 -0
- package/dist/client/chunks/chart-kpi-delta-Dn-jjO-2.js +408 -0
- package/dist/client/chunks/chart-kpi-delta-Dn-jjO-2.js.map +1 -0
- package/dist/client/chunks/chart-kpi-number-P_WBiO5S.js +244 -0
- package/dist/client/chunks/chart-kpi-number-P_WBiO5S.js.map +1 -0
- package/dist/client/chunks/chart-kpi-text-C-Y4eb5H.js +185 -0
- package/dist/client/chunks/chart-kpi-text-C-Y4eb5H.js.map +1 -0
- package/dist/client/chunks/chart-line-DKgrQA6c.js +101 -0
- package/dist/client/chunks/chart-line-DKgrQA6c.js.map +1 -0
- package/dist/client/chunks/{chart-markdown-dgUetjyM.js → chart-markdown-CV75S_zL.js} +2 -2
- package/dist/client/chunks/chart-markdown-CV75S_zL.js.map +1 -0
- package/dist/client/chunks/{chart-measure-profile-ClfpLs4q.js → chart-measure-profile-Ket8fJyf.js} +7 -7
- package/dist/client/chunks/chart-measure-profile-Ket8fJyf.js.map +1 -0
- package/dist/client/chunks/chart-pie-ByieAX5H.js +119 -0
- package/dist/client/chunks/chart-pie-ByieAX5H.js.map +1 -0
- package/dist/client/chunks/chart-radar-CiSwHWp4.js +138 -0
- package/dist/client/chunks/chart-radar-CiSwHWp4.js.map +1 -0
- package/dist/client/chunks/chart-radial-bar-BF6Mhl6f.js +122 -0
- package/dist/client/chunks/chart-radial-bar-BF6Mhl6f.js.map +1 -0
- package/dist/client/chunks/{chart-sankey-M3XpO_ah.js → chart-sankey-DjrvKw6K.js} +36 -39
- package/dist/client/chunks/chart-sankey-DjrvKw6K.js.map +1 -0
- package/dist/client/chunks/chart-scatter-Dd9WFqnS.js +258 -0
- package/dist/client/chunks/chart-scatter-Dd9WFqnS.js.map +1 -0
- package/dist/client/chunks/{chart-sunburst-A_u6lqlS.js → chart-sunburst-leGpuDj7.js} +3 -3
- package/dist/client/chunks/chart-sunburst-leGpuDj7.js.map +1 -0
- package/dist/client/chunks/chart-tree-map-Ceq5sLZA.js +323 -0
- package/dist/client/chunks/chart-tree-map-Ceq5sLZA.js.map +1 -0
- package/dist/client/chunks/{chart-waterfall-BuhMoagf.js → chart-waterfall-DyvQReN5.js} +7 -7
- package/dist/client/chunks/chart-waterfall-DyvQReN5.js.map +1 -0
- package/dist/client/chunks/{charts-core-jRtb0S2M.js → charts-core-DaXSt1Dd.js} +2 -2
- package/dist/client/chunks/charts-core-DaXSt1Dd.js.map +1 -0
- package/dist/client/chunks/charts-loader-DdTeCeNo.js +84 -0
- package/dist/client/chunks/charts-loader-DdTeCeNo.js.map +1 -0
- package/dist/client/chunks/{nl-NL-CpVs7ox3.js → nl-NL-2zTAWTej.js} +2 -1
- package/dist/client/chunks/{nl-NL-CpVs7ox3.js.map → nl-NL-2zTAWTej.js.map} +1 -1
- package/dist/client/chunks/retention-ChW9jYdy.js.map +1 -1
- package/dist/client/chunks/{schema-visualization-DE09kQE3.js → schema-visualization-Cb_E9_Gd.js} +12 -12
- package/dist/client/chunks/schema-visualization-Cb_E9_Gd.js.map +1 -0
- package/dist/client/chunks/{useDirtyStateTracking-CoeQbprt.js → useDirtyStateTracking-MbpxH_v6.js} +95 -84
- package/dist/client/chunks/useDirtyStateTracking-MbpxH_v6.js.map +1 -0
- package/dist/client/chunks/{useExplainAI-DlnXWdmz.js → useExplainAI-evnZkjCY.js} +14 -14
- package/dist/client/chunks/useExplainAI-evnZkjCY.js.map +1 -0
- package/dist/client/chunks/{utils-CTKNaXS8.js → utils-3P6z1vz5.js} +2 -2
- package/dist/client/chunks/utils-3P6z1vz5.js.map +1 -0
- package/dist/client/chunks/{vendor-CPIYyeuD.js → vendor-DSpR0IW6.js} +43 -43
- package/dist/client/chunks/{vendor-CPIYyeuD.js.map → vendor-DSpR0IW6.js.map} +1 -1
- package/dist/client/client/BatchCoordinator.d.ts +1 -1
- package/dist/client/client/CubeClient.d.ts +1 -1
- package/dist/client/components/AIAssistant/index.d.ts +3 -3
- package/dist/client/components/AIAssistant/utils.d.ts +1 -1
- package/dist/client/components/AgenticNotebook/ChatMessage.d.ts +1 -1
- package/dist/client/components/AgenticNotebook/NotebookCanvas.d.ts +1 -1
- package/dist/client/components/AgenticNotebook/NotebookMarkdownBlock.d.ts +1 -1
- package/dist/client/components/AgenticNotebook/NotebookPortletBlock.d.ts +2 -2
- package/dist/client/components/AgenticNotebook/agentChatParts.d.ts +34 -0
- package/dist/client/components/AgenticNotebook/chatMessageParts.d.ts +39 -0
- package/dist/client/components/AgenticNotebook/index.d.ts +2 -2
- package/dist/client/components/AgenticNotebook/useAgentChatController.d.ts +25 -0
- package/dist/client/components/AgenticNotebook/useNotebookAutosave.d.ts +12 -0
- package/dist/client/components/AnalysisBuilder/AnalysisAxisDropZone.d.ts +1 -1
- package/dist/client/components/AnalysisBuilder/AnalysisChartConfigPanel.d.ts +4 -4
- package/dist/client/components/AnalysisBuilder/AnalysisDisplayConfigPanel.d.ts +1 -1
- package/dist/client/components/AnalysisBuilder/AnalysisFilterGroup.d.ts +2 -2
- package/dist/client/components/AnalysisBuilder/AnalysisFilterItem.d.ts +2 -2
- package/dist/client/components/AnalysisBuilder/AnalysisFilterSection.d.ts +2 -2
- package/dist/client/components/AnalysisBuilder/AnalysisModeErrorBoundary.d.ts +1 -1
- package/dist/client/components/AnalysisBuilder/AnalysisQueryPanel.d.ts +1 -1
- package/dist/client/components/AnalysisBuilder/AnalysisQueryPanelParts.d.ts +64 -0
- package/dist/client/components/AnalysisBuilder/AnalysisResultsHeader.d.ts +67 -0
- package/dist/client/components/AnalysisBuilder/AnalysisResultsPanel.d.ts +1 -1
- package/dist/client/components/AnalysisBuilder/AnalysisTypeSelector.d.ts +1 -1
- package/dist/client/components/AnalysisBuilder/BreakdownComparisonToggle.d.ts +13 -0
- package/dist/client/components/AnalysisBuilder/BreakdownItemCard.d.ts +1 -1
- package/dist/client/components/AnalysisBuilder/BreakdownRow.d.ts +26 -0
- package/dist/client/components/AnalysisBuilder/BreakdownSection.d.ts +1 -1
- package/dist/client/components/AnalysisBuilder/DisplayOptionControl.d.ts +10 -0
- package/dist/client/components/AnalysisBuilder/ExecutionPlanPanel.d.ts +1 -1
- package/dist/client/components/AnalysisBuilder/ExecutionPlanPanelParts.d.ts +22 -0
- package/dist/client/components/AnalysisBuilder/ExplainAIPanel.d.ts +1 -1
- package/dist/client/components/AnalysisBuilder/FieldDetailPanel.d.ts +1 -1
- package/dist/client/components/AnalysisBuilder/FieldSearchItem.d.ts +1 -1
- package/dist/client/components/AnalysisBuilder/FieldSearchModal.d.ts +1 -1
- package/dist/client/components/AnalysisBuilder/FieldSearchResults.d.ts +16 -0
- package/dist/client/components/AnalysisBuilder/FilterConfigModal.d.ts +2 -2
- package/dist/client/components/AnalysisBuilder/FilterValueInput.d.ts +63 -0
- package/dist/client/components/AnalysisBuilder/FlowConfigPanel.d.ts +1 -1
- package/dist/client/components/AnalysisBuilder/FlowDepthControls.d.ts +10 -0
- package/dist/client/components/AnalysisBuilder/FlowModeContent.d.ts +3 -3
- package/dist/client/components/AnalysisBuilder/FlowVisualizationPicker.d.ts +7 -0
- package/dist/client/components/AnalysisBuilder/FunnelBindingKeySelector.d.ts +1 -1
- package/dist/client/components/AnalysisBuilder/FunnelConfigPanel.d.ts +1 -1
- package/dist/client/components/AnalysisBuilder/FunnelModeContent.d.ts +2 -2
- package/dist/client/components/AnalysisBuilder/FunnelStepCard.d.ts +1 -1
- package/dist/client/components/AnalysisBuilder/FunnelStepList.d.ts +1 -1
- package/dist/client/components/AnalysisBuilder/LegacyBooleanOptions.d.ts +8 -0
- package/dist/client/components/AnalysisBuilder/MetricItemCard.d.ts +1 -1
- package/dist/client/components/AnalysisBuilder/MetricRow.d.ts +23 -0
- package/dist/client/components/AnalysisBuilder/MetricsSection.d.ts +1 -1
- package/dist/client/components/AnalysisBuilder/RetentionConfigPanel.d.ts +2 -2
- package/dist/client/components/AnalysisBuilder/RetentionModeContent.d.ts +3 -3
- package/dist/client/components/AnalysisBuilder/SortToggleButton.d.ts +13 -0
- package/dist/client/components/AnalysisBuilder/StringArrayInput.d.ts +17 -0
- package/dist/client/components/AnalysisBuilder/filterConfigModalUtils.d.ts +30 -0
- package/dist/client/components/AnalysisBuilder/hooks/useAnalysisBuilderImperativeHandle.d.ts +13 -0
- package/dist/client/components/AnalysisBuilder/hooks/useDragReorder.d.ts +25 -0
- package/dist/client/components/AnalysisBuilder/hooks/useFieldSearchKeyboard.d.ts +11 -0
- package/dist/client/components/AnalysisBuilder/index.d.ts +1 -1
- package/dist/client/components/AnalysisBuilder/types.d.ts +28 -28
- package/dist/client/components/AnalysisBuilder/utils/axisConfigUtils.d.ts +23 -0
- package/dist/client/components/AnalysisBuilder/utils/executionPlanMarkdown.d.ts +8 -0
- package/dist/client/components/AnalysisBuilder/utils/fieldUtils.d.ts +7 -2
- package/dist/client/components/AnalysisBuilder/utils/filterUtils.d.ts +1 -1
- package/dist/client/components/AnalysisBuilder/utils/index.d.ts +6 -6
- package/dist/client/components/AnalysisBuilder/utils/queryUtils.d.ts +2 -2
- package/dist/client/components/AnalysisBuilder/utils/recentFieldsUtils.d.ts +2 -2
- package/dist/client/components/AnalysisBuilder/utils/resultsPanelDerive.d.ts +68 -0
- package/dist/client/components/AnalysisBuilder/utils/shareStateUtils.d.ts +68 -0
- package/dist/client/components/AnalysisBuilder/utils/sortUtils.d.ts +7 -0
- package/dist/client/components/AnalysisBuilder/utils/storageUtils.d.ts +2 -2
- package/dist/client/components/AnalysisBuilderLazy.d.ts +1 -1
- package/dist/client/components/AnalyticsDashboard.d.ts +1 -1
- package/dist/client/components/AnalyticsPortlet.d.ts +1 -1
- package/dist/client/components/ChartTypeSelector.d.ts +2 -2
- package/dist/client/components/DashboardFilterPanel.d.ts +1 -1
- package/dist/client/components/DashboardFilters/CompactFilterBar.d.ts +1 -1
- package/dist/client/components/DashboardFilters/CompactFilterBarParts.d.ts +26 -0
- package/dist/client/components/DashboardFilters/DashboardFilterConfigModal.d.ts +2 -2
- package/dist/client/components/DashboardFilters/DashboardFilterConfigModalParts.d.ts +27 -0
- package/dist/client/components/DashboardFilters/DashboardFilterItem.d.ts +2 -2
- package/dist/client/components/DashboardFilters/DashboardFilterValueInput.d.ts +39 -0
- package/dist/client/components/DashboardFilters/EditModeFilterList.d.ts +1 -1
- package/dist/client/components/DashboardFilters/FilterChip.d.ts +1 -1
- package/dist/client/components/DashboardFilters/FilterEditModal.d.ts +2 -2
- package/dist/client/components/DashboardFilters/FilterValuePopover.d.ts +1 -1
- package/dist/client/components/DashboardFilters/ReadOnlyFilterList.d.ts +2 -2
- package/dist/client/components/DashboardFilters/dashboardFilterConfigModalUtils.d.ts +21 -0
- package/dist/client/components/DashboardFilters/useCompactFilterBar.d.ts +19 -0
- package/dist/client/components/DashboardFilters/useDashboardFilterConfigModal.d.ts +69 -0
- package/dist/client/components/DashboardFilters/useDateRangeState.d.ts +19 -0
- package/dist/client/components/DashboardFilters/useFilterDropdowns.d.ts +21 -0
- package/dist/client/components/DashboardFilters/useFilterValueFetch.d.ts +23 -0
- package/dist/client/components/DashboardGrid.d.ts +2 -2
- package/dist/client/components/DashboardPortletCard.d.ts +2 -57
- package/dist/client/components/DebugModal.d.ts +2 -2
- package/dist/client/components/DrillBreadcrumb.d.ts +1 -1
- package/dist/client/components/DrillMenu.d.ts +1 -1
- package/dist/client/components/FloatingEditToolbar.d.ts +1 -1
- package/dist/client/components/MobileStackedLayout.d.ts +2 -2
- package/dist/client/components/PortletAnalysisModal.d.ts +1 -1
- package/dist/client/components/PortletContainer.d.ts +1 -1
- package/dist/client/components/PortletFilterConfigModal.d.ts +1 -1
- package/dist/client/components/RowManagedLayout.d.ts +1 -1
- package/dist/client/components/SchemaVisualization/CubeNode.d.ts +1 -1
- package/dist/client/components/SchemaVisualization/FieldDetailPanel.d.ts +1 -1
- package/dist/client/components/SchemaVisualization/RelationshipEdge.d.ts +1 -1
- package/dist/client/components/SchemaVisualization/SchemaVisualizationLazy.d.ts +1 -1
- package/dist/client/components/TextPortletModal.d.ts +2 -2
- package/dist/client/components/analyticsPortlet/PortletChart.d.ts +31 -0
- package/dist/client/components/analyticsPortlet/PortletChartView.d.ts +35 -0
- package/dist/client/components/analyticsPortlet/PortletStates.d.ts +65 -0
- package/dist/client/components/analyticsPortlet/parsePortletQuery.d.ts +22 -0
- package/dist/client/components/analyticsPortlet/portletRenderState.d.ts +31 -0
- package/dist/client/components/analyticsPortlet/usePortletDebugData.d.ts +37 -0
- package/dist/client/components/analyticsPortlet/usePortletDrillState.d.ts +17 -0
- package/dist/client/components/analyticsPortlet/usePortletQueryResults.d.ts +37 -0
- package/dist/client/components/charts/ActivityGridChart.config.d.ts +1 -1
- package/dist/client/components/charts/ActivityGridChart.d.ts +1 -1
- package/dist/client/components/charts/ActivityGridChart.helpers.d.ts +33 -0
- package/dist/client/components/charts/ActivityGridChart.render.d.ts +31 -0
- package/dist/client/components/charts/AreaChart.config.d.ts +1 -1
- package/dist/client/components/charts/AreaChart.d.ts +1 -1
- package/dist/client/components/charts/AxisFormatControls.d.ts +4 -2
- package/dist/client/components/charts/BarChart.config.d.ts +1 -1
- package/dist/client/components/charts/BarChart.d.ts +1 -1
- package/dist/client/components/charts/BarChart.helpers.d.ts +23 -0
- package/dist/client/components/charts/BarSeries.d.ts +29 -0
- package/dist/client/components/charts/BoxPlotChart.config.d.ts +1 -1
- package/dist/client/components/charts/BoxPlotChart.d.ts +1 -1
- package/dist/client/components/charts/BubbleChart.config.d.ts +1 -1
- package/dist/client/components/charts/BubbleChart.d.ts +1 -1
- package/dist/client/components/charts/BubbleChart.helpers.d.ts +43 -0
- package/dist/client/components/charts/BubbleChart.render.d.ts +21 -0
- package/dist/client/components/charts/CandlestickChart.config.d.ts +1 -1
- package/dist/client/components/charts/CandlestickChart.d.ts +1 -1
- package/dist/client/components/charts/ChartStates.d.ts +38 -0
- package/dist/client/components/charts/DataTable.config.d.ts +1 -1
- package/dist/client/components/charts/DataTable.d.ts +1 -1
- package/dist/client/components/charts/FunnelChart.config.d.ts +1 -1
- package/dist/client/components/charts/FunnelChart.d.ts +1 -1
- package/dist/client/components/charts/FunnelChart.helpers.d.ts +25 -0
- package/dist/client/components/charts/FunnelViews.d.ts +16 -0
- package/dist/client/components/charts/GaugeChart.config.d.ts +1 -1
- package/dist/client/components/charts/GaugeChart.d.ts +1 -1
- package/dist/client/components/charts/HeatMapCanvas.d.ts +25 -0
- package/dist/client/components/charts/HeatMapChart.config.d.ts +1 -1
- package/dist/client/components/charts/HeatMapChart.d.ts +1 -1
- package/dist/client/components/charts/HeatMapChart.helpers.d.ts +64 -0
- package/dist/client/components/charts/KpiDelta.config.d.ts +1 -1
- package/dist/client/components/charts/KpiDelta.d.ts +1 -1
- package/dist/client/components/charts/KpiDelta.helpers.d.ts +20 -0
- package/dist/client/components/charts/KpiNumber.config.d.ts +1 -1
- package/dist/client/components/charts/KpiNumber.d.ts +1 -1
- package/dist/client/components/charts/KpiNumber.helpers.d.ts +30 -0
- package/dist/client/components/charts/KpiStates.d.ts +19 -0
- package/dist/client/components/charts/KpiText.config.d.ts +1 -1
- package/dist/client/components/charts/KpiText.d.ts +1 -1
- package/dist/client/components/charts/LineChart.config.d.ts +1 -1
- package/dist/client/components/charts/LineChart.d.ts +1 -1
- package/dist/client/components/charts/MarkdownChart.config.d.ts +1 -1
- package/dist/client/components/charts/MarkdownChart.d.ts +1 -1
- package/dist/client/components/charts/MeasureProfileChart.config.d.ts +1 -1
- package/dist/client/components/charts/MeasureProfileChart.d.ts +1 -1
- package/dist/client/components/charts/PieChart.config.d.ts +1 -1
- package/dist/client/components/charts/PieChart.d.ts +1 -1
- package/dist/client/components/charts/RadarChart.config.d.ts +1 -1
- package/dist/client/components/charts/RadarChart.d.ts +1 -1
- package/dist/client/components/charts/RadialBarChart.config.d.ts +1 -1
- package/dist/client/components/charts/RadialBarChart.d.ts +1 -1
- package/dist/client/components/charts/RetentionCombinedChart.config.d.ts +1 -1
- package/dist/client/components/charts/RetentionCombinedChart.d.ts +1 -1
- package/dist/client/components/charts/RetentionHeatmap.config.d.ts +1 -1
- package/dist/client/components/charts/RetentionHeatmap.d.ts +1 -1
- package/dist/client/components/charts/SankeyChart.config.d.ts +1 -1
- package/dist/client/components/charts/SankeyChart.d.ts +1 -1
- package/dist/client/components/charts/ScatterChart.config.d.ts +1 -1
- package/dist/client/components/charts/ScatterChart.d.ts +1 -1
- package/dist/client/components/charts/ScatterChart.helpers.d.ts +43 -0
- package/dist/client/components/charts/ScatterSeries.d.ts +17 -0
- package/dist/client/components/charts/ScatterTooltip.d.ts +21 -0
- package/dist/client/components/charts/SunburstChart.config.d.ts +1 -1
- package/dist/client/components/charts/SunburstChart.d.ts +1 -1
- package/dist/client/components/charts/TreeMapChart.config.d.ts +1 -1
- package/dist/client/components/charts/TreeMapChart.d.ts +1 -1
- package/dist/client/components/charts/TreeMapChart.helpers.d.ts +37 -0
- package/dist/client/components/charts/TreeMapContent.d.ts +24 -0
- package/dist/client/components/charts/TreeMapLegend.d.ts +13 -0
- package/dist/client/components/charts/WaterfallChart.config.d.ts +1 -1
- package/dist/client/components/charts/WaterfallChart.d.ts +1 -1
- package/dist/client/components/charts/cartesianChartHelpers.d.ts +126 -0
- package/dist/client/components/charts/chartAxisResolution.d.ts +32 -0
- package/dist/client/components/charts/chartScaffolding.d.ts +77 -0
- package/dist/client/components/charts/gaugeChartHelpers.d.ts +36 -0
- package/dist/client/components/charts/index.d.ts +21 -21
- package/dist/client/components/charts/kpiTextHelpers.d.ts +46 -0
- package/dist/client/components/charts/radarChartHelpers.d.ts +14 -0
- package/dist/client/components/charts/radialBarChartHelpers.d.ts +22 -0
- package/dist/client/components/charts/useChartDimensions.d.ts +20 -0
- package/dist/client/components/charts/useKpiDimensions.d.ts +30 -0
- package/dist/client/components/dashboard/DashboardContext.d.ts +6 -6
- package/dist/client/components/dashboard/DashboardCoordinator.d.ts +1 -1
- package/dist/client/components/dashboard/DashboardEditBar.d.ts +5 -0
- package/dist/client/components/dashboard/DashboardProvider.d.ts +1 -1
- package/dist/client/components/dashboard/LayoutModeToggle.d.ts +10 -0
- package/dist/client/components/dashboard/dashboardGridUtils.d.ts +1 -1
- package/dist/client/components/dashboard/index.d.ts +7 -7
- package/dist/client/components/dashboardPortletCard/FilterFieldChip.d.ts +12 -0
- package/dist/client/components/dashboardPortletCard/PortletCardHeader.d.ts +43 -0
- package/dist/client/components/dashboardPortletCard/cardStyles.d.ts +33 -0
- package/dist/client/components/dashboardPortletCard/filterField.d.ts +12 -0
- package/dist/client/components/dashboardPortletCard/propsEqual.d.ts +55 -0
- package/dist/client/components/dashboardPortletCard/usePortletCardActions.d.ts +16 -0
- package/dist/client/components/portletAnalysisModal/saveValidation.d.ts +8 -0
- package/dist/client/components/shared/DateRangeFilter.d.ts +1 -1
- package/dist/client/components/shared/FilterBuilder.d.ts +1 -1
- package/dist/client/components/shared/FilterGroup.d.ts +1 -1
- package/dist/client/components/shared/FilterItem.d.ts +1 -1
- package/dist/client/components/shared/FilterValueSelector.d.ts +1 -1
- package/dist/client/components/shared/dateRangeUtils.d.ts +40 -0
- package/dist/client/components/shared/filterDisplayUtils.d.ts +10 -0
- package/dist/client/components/shared/filterItem/FilterDateRangeSelector.d.ts +17 -0
- package/dist/client/components/shared/filterItem/FilterFieldDropdown.d.ts +16 -0
- package/dist/client/components/shared/filterItem/dateRangeSync.d.ts +14 -0
- package/dist/client/components/shared/filterItem/fieldVisuals.d.ts +5 -0
- package/dist/client/components/shared/filterValueSelector/FilterValueInputs.d.ts +55 -0
- package/dist/client/components/shared/filterValueSelector/useFilterValueSelectorState.d.ts +25 -0
- package/dist/client/components/shared/queryFieldUtils.d.ts +21 -0
- package/dist/client/components/shared/types.d.ts +8 -8
- package/dist/client/components/shared/utils.d.ts +7 -46
- package/dist/client/components.d.ts +11 -11
- package/dist/client/components.js +3 -3
- package/dist/client/hooks/agentChatStream.d.ts +39 -0
- package/dist/client/hooks/analysisQueryExecutionModes.d.ts +133 -0
- package/dist/client/hooks/dashboard/layoutUtils.d.ts +1 -1
- package/dist/client/hooks/dashboard/useDashboardController.d.ts +2 -2
- package/dist/client/hooks/dashboard/useGridLayoutEngine.d.ts +1 -1
- package/dist/client/hooks/dashboard/useRowLayoutEngine.d.ts +1 -1
- package/dist/client/hooks/drillNavigation.d.ts +25 -0
- package/dist/client/hooks/queries/index.d.ts +9 -9
- package/dist/client/hooks/queries/useCubeLoadQuery.d.ts +2 -2
- package/dist/client/hooks/queries/useCubeMetaQuery.d.ts +2 -2
- package/dist/client/hooks/queries/useDryRunQuery.d.ts +2 -2
- package/dist/client/hooks/queries/useExplainAI.d.ts +1 -1
- package/dist/client/hooks/queries/useExplainQuery.d.ts +1 -1
- package/dist/client/hooks/queries/useFlowQuery.d.ts +1 -1
- package/dist/client/hooks/queries/useFunnelQuery.d.ts +1 -1
- package/dist/client/hooks/queries/useMultiCubeLoadQuery.d.ts +1 -1
- package/dist/client/hooks/queries/useRetentionQuery.d.ts +1 -1
- package/dist/client/hooks/useAgentChat.d.ts +1 -1
- package/dist/client/hooks/useAnalysisAI.d.ts +4 -4
- package/dist/client/hooks/useAnalysisBuilderHook.d.ts +27 -27
- package/dist/client/hooks/useAnalysisChartDefaults.d.ts +4 -4
- package/dist/client/hooks/useAnalysisCombinedFields.d.ts +2 -2
- package/dist/client/hooks/useAnalysisInitialization.d.ts +1 -1
- package/dist/client/hooks/useAnalysisQueryBuilder.d.ts +3 -3
- package/dist/client/hooks/useAnalysisQueryExecution.d.ts +7 -7
- package/dist/client/hooks/useAnalysisShare.d.ts +1 -1
- package/dist/client/hooks/useAnalysisUIState.d.ts +2 -2
- package/dist/client/hooks/useDashboardHook.d.ts +2 -2
- package/dist/client/hooks/useDataBrowser.d.ts +5 -5
- package/dist/client/hooks/useDrillInteraction.d.ts +1 -1
- package/dist/client/hooks/useTheme.d.ts +1 -1
- package/dist/client/hooks/useTranslation.d.ts +1 -1
- package/dist/client/hooks.d.ts +11 -11
- package/dist/client/hooks.js +3 -3
- package/dist/client/icons/defaultIcons.d.ts +1 -1
- package/dist/client/icons/index.d.ts +3 -3
- package/dist/client/icons/registry.d.ts +1 -1
- package/dist/client/icons.js +2 -2
- package/dist/client/index.d.ts +74 -74
- package/dist/client/index.js +816 -669
- package/dist/client/index.js.map +1 -1
- package/dist/client/providers/CubeApiProvider.d.ts +3 -3
- package/dist/client/providers/CubeFeaturesProvider.d.ts +1 -1
- package/dist/client/providers/CubeMetaContext.d.ts +1 -1
- package/dist/client/providers/CubeProvider.d.ts +7 -7
- package/dist/client/providers/I18nProvider.d.ts +1 -1
- package/dist/client/providers.d.ts +4 -4
- package/dist/client/providers.js +3 -3
- package/dist/client/schema.d.ts +2 -2
- package/dist/client/schema.js +1 -1
- package/dist/client/shared/chartConfigBuilders.d.ts +18 -0
- package/dist/client/shared/chartDefaults.d.ts +4 -4
- package/dist/client/shared/components/QueryAnalysisPanel.d.ts +1 -1
- package/dist/client/shared/components/QueryAnalysisPanel.sections.d.ts +41 -0
- package/dist/client/shared/index.d.ts +7 -7
- package/dist/client/shared/queryTransforms.d.ts +20 -0
- package/dist/client/shared/types.d.ts +1 -1
- package/dist/client/shared/utils.d.ts +4 -6
- package/dist/client/stores/analysisBuilderStore.d.ts +9 -9
- package/dist/client/stores/dashboardStore.d.ts +3 -3
- package/dist/client/stores/dataBrowserStore.d.ts +1 -1
- package/dist/client/stores/notebookStore.d.ts +1 -1
- package/dist/client/stores/optionsToAnalysisConfig.d.ts +17 -0
- package/dist/client/stores/slices/coreSlice.d.ts +3 -3
- package/dist/client/stores/slices/flowSlice.d.ts +3 -3
- package/dist/client/stores/slices/funnelSlice.d.ts +3 -3
- package/dist/client/stores/slices/index.d.ts +7 -7
- package/dist/client/stores/slices/querySlice.d.ts +3 -3
- package/dist/client/stores/slices/retentionSlice.d.ts +3 -3
- package/dist/client/stores/slices/uiSlice.d.ts +2 -2
- package/dist/client/styles.css +1 -1
- package/dist/client/types/analysisConfig.d.ts +4 -4
- package/dist/client/types/drill.d.ts +5 -5
- package/dist/client/types/flow.d.ts +2 -2
- package/dist/client/types/funnel.d.ts +1 -1
- package/dist/client/types/retention.d.ts +2 -2
- package/dist/client/types.d.ts +12 -12
- package/dist/client/utils/axisValueFormatting.d.ts +32 -0
- package/dist/client/utils/chartUtils.d.ts +1 -1
- package/dist/client/utils/configMigration.d.ts +2 -2
- package/dist/client/utils/drillQueryBuilder.d.ts +2 -2
- package/dist/client/utils/exportXlsx.d.ts +2 -2
- package/dist/client/utils/filterUtils.d.ts +1 -1
- package/dist/client/utils/funnelExecution.d.ts +2 -2
- package/dist/client/utils/funnelValidation.d.ts +2 -2
- package/dist/client/utils/index.d.ts +10 -10
- package/dist/client/utils/joinReachability.d.ts +1 -1
- package/dist/client/utils/multiQueryUtils.d.ts +1 -1
- package/dist/client/utils/multiQueryValidation.d.ts +1 -1
- package/dist/client/utils/pivotUtils.d.ts +1 -1
- package/dist/client/utils/shareUtils.d.ts +1 -1
- package/dist/client/utils/thumbnail.d.ts +1 -1
- package/dist/client/utils/timeValueFormatting.d.ts +32 -0
- package/dist/client/utils.d.ts +2 -2
- package/dist/client/utils.js +6 -6
- package/dist/client-bundle-stats.html +1 -1
- package/dist/mcp-app/mcp-app.html +55 -55
- package/dist/server/{server/adapters → adapters}/base-adapter.d.ts +81 -36
- package/dist/server/adapters/databend-adapter.d.ts +63 -0
- package/dist/server/{server/adapters → adapters}/duckdb-adapter.d.ts +6 -60
- package/dist/server/adapters/mysql-adapter.d.ts +65 -0
- package/dist/server/adapters/postgres-adapter.d.ts +55 -0
- package/dist/server/{server/adapters → adapters}/singlestore-adapter.d.ts +1 -1
- package/dist/server/adapters/snowflake-adapter.d.ts +53 -0
- package/dist/server/{server/adapters → adapters}/sqlite-adapter.d.ts +13 -33
- package/dist/server/adapters/window-function-builder.d.ts +11 -0
- package/dist/server/{server/agent → agent}/chart-validation.d.ts +0 -5
- package/dist/server/agent/handler-steps.d.ts +37 -0
- package/dist/server/{server/agent → agent}/handler.d.ts +3 -3
- package/dist/server/agent/index.d.ts +11 -0
- package/dist/server/{server/agent → agent}/providers/anthropic.d.ts +1 -1
- package/dist/server/{server/agent → agent}/providers/factory.d.ts +1 -1
- package/dist/server/{server/agent → agent}/providers/google.d.ts +1 -1
- package/dist/server/agent/providers/index.d.ts +6 -0
- package/dist/server/{server/agent → agent}/providers/openai.d.ts +1 -1
- package/dist/server/{server/agent → agent}/system-prompt.d.ts +1 -1
- package/dist/server/{server/agent → agent}/tools.d.ts +4 -4
- package/dist/server/{server/agent → agent}/types.d.ts +1 -1
- package/dist/server/ai/discovery-helpers.d.ts +29 -0
- package/dist/server/{server/ai → ai}/discovery.d.ts +6 -2
- package/dist/server/{server/ai → ai}/index.d.ts +6 -6
- package/dist/server/ai/suggestion-helpers.d.ts +33 -0
- package/dist/server/{server/ai → ai}/suggestion.d.ts +2 -5
- package/dist/server/ai/validation-helpers.d.ts +21 -0
- package/dist/server/{server/ai → ai}/validation.d.ts +2 -5
- package/dist/server/builders/analysis-utils.d.ts +106 -0
- package/dist/server/{server/builders → builders}/comparison-query-builder.d.ts +2 -2
- package/dist/server/{server/builders → builders}/cte-builder.d.ts +48 -2
- package/dist/server/{server/builders → builders}/date-time-builder.d.ts +7 -2
- package/dist/server/builders/date-time-helpers.d.ts +34 -0
- package/dist/server/{server/builders → builders}/filter-builder.d.ts +5 -3
- package/dist/server/builders/filter-operators.d.ts +23 -0
- package/dist/server/builders/flow-query-builder.d.ts +136 -0
- package/dist/server/{server/builders → builders}/funnel-query-builder.d.ts +18 -7
- package/dist/server/{server/builders → builders}/group-by-builder.d.ts +13 -2
- package/dist/server/builders/index.d.ts +13 -0
- package/dist/server/{server/builders → builders}/measure-builder.d.ts +46 -3
- package/dist/server/{server/builders → builders}/retention-query-builder.d.ts +14 -16
- package/dist/server/cache-providers/index.d.ts +5 -0
- package/dist/server/{server/cache-providers → cache-providers}/memory.d.ts +1 -1
- package/dist/server/{server/cache-utils.d.ts → cache-utils.d.ts} +26 -6
- package/dist/server/compiler-metadata.d.ts +11 -0
- package/dist/server/{server/compiler.d.ts → compiler.d.ts} +9 -15
- package/dist/server/{server/cube-utils.d.ts → cube-utils.d.ts} +29 -4
- package/dist/server/{server/database-utils.d.ts → database-utils.d.ts} +1 -1
- package/dist/server/execution/annotation-builder.d.ts +12 -0
- package/dist/server/execution/filter-cache-preloader.d.ts +19 -0
- package/dist/server/execution/mode-router.d.ts +25 -0
- package/dist/server/execution/query-result-cache.d.ts +21 -0
- package/dist/server/execution/result-post-processor.d.ts +10 -0
- package/dist/server/{server/executor.d.ts → executor.d.ts} +35 -32
- package/dist/server/{server/executors → executors}/base-executor.d.ts +2 -2
- package/dist/server/{server/executors → executors}/databend-executor.d.ts +2 -2
- package/dist/server/{server/executors → executors}/duckdb-executor.d.ts +2 -2
- package/dist/server/executors/explain-utils.d.ts +28 -0
- package/dist/server/{server/executors → executors}/index.d.ts +9 -9
- package/dist/server/{server/executors → executors}/mysql-executor.d.ts +2 -2
- package/dist/server/{server/executors → executors}/postgres-executor.d.ts +2 -2
- package/dist/server/{server/executors → executors}/singlestore-executor.d.ts +2 -2
- package/dist/server/{server/executors → executors}/snowflake-executor.d.ts +2 -2
- package/dist/server/{server/executors → executors}/sqlite-executor.d.ts +2 -2
- package/dist/server/{server/explain → explain}/databend-parser.d.ts +1 -1
- package/dist/server/{server/explain → explain}/duckdb-parser.d.ts +1 -1
- package/dist/server/explain/explain-tree.d.ts +20 -0
- package/dist/server/explain/index.d.ts +9 -0
- package/dist/server/{server/explain → explain}/mysql-parser.d.ts +1 -1
- package/dist/server/{server/explain → explain}/postgres-parser.d.ts +1 -1
- package/dist/server/{server/explain → explain}/snowflake-parser.d.ts +1 -1
- package/dist/server/{server/explain → explain}/sqlite-parser.d.ts +1 -1
- package/dist/server/{server/filter-cache.d.ts → filter-cache.d.ts} +2 -2
- package/dist/server/{server/gap-filler.d.ts → gap-filler.d.ts} +8 -2
- package/dist/server/google-BOnRIN1w.cjs +2 -0
- package/dist/{adapters/google-CFYljAOF.js → server/google-CvKM9yVM.js} +83 -71
- package/dist/server/index.cjs +179 -211
- package/dist/server/index.d.ts +38 -2
- package/dist/server/index.js +6330 -6458
- package/dist/server/logical-plan/cte-planner-helpers.d.ts +37 -0
- package/dist/server/logical-plan/cte-planner.d.ts +104 -0
- package/dist/server/logical-plan/filter-propagation.d.ts +44 -0
- package/dist/server/{server/logical-plan → logical-plan}/index.d.ts +11 -6
- package/dist/server/logical-plan/join-planner.d.ts +27 -0
- package/dist/server/{server/logical-plan → logical-plan}/logical-plan-builder.d.ts +5 -5
- package/dist/server/logical-plan/logical-planner.d.ts +39 -0
- package/dist/server/{server/logical-plan → logical-plan}/optimiser.d.ts +4 -2
- package/dist/server/logical-plan/plan-analysis-reporter.d.ts +59 -0
- package/dist/server/logical-plan/planner-utils.d.ts +20 -0
- package/dist/server/{server/logical-plan → logical-plan}/types.d.ts +18 -10
- package/dist/server/measure-classification.d.ts +40 -0
- package/dist/server/{openai-BZdAA7Ji.js → openai-cDlFSTk6.js} +60 -58
- package/dist/server/openai-vXvLni8v.cjs +1 -0
- package/dist/server/physical-plan/drizzle-plan-builder.d.ts +50 -0
- package/dist/server/{server/physical-plan → physical-plan}/drizzle-sql-builder.d.ts +14 -3
- package/dist/server/physical-plan/index.d.ts +2 -0
- package/dist/server/{server/physical-plan → physical-plan}/processors/cte-processor.d.ts +2 -2
- package/dist/server/physical-plan/processors/index.d.ts +8 -0
- package/dist/server/{server/physical-plan → physical-plan}/processors/joins-processor.d.ts +2 -2
- package/dist/server/physical-plan/processors/keys-dedup-processor.d.ts +13 -0
- package/dist/server/physical-plan/processors/multi-fact-processor.d.ts +13 -0
- package/dist/server/{server/physical-plan → physical-plan}/processors/predicates-processor.d.ts +2 -2
- package/dist/server/{server/physical-plan → physical-plan}/processors/selection-processor.d.ts +2 -2
- package/dist/server/{server/physical-plan → physical-plan}/processors/shared.d.ts +9 -4
- package/dist/server/{server/physical-plan → physical-plan}/processors/window-processor.d.ts +2 -2
- package/dist/server/query-handlers.d.ts +79 -0
- package/dist/server/query-modes.d.ts +28 -0
- package/dist/server/query-validator.d.ts +9 -0
- package/dist/server/{server/resolvers → resolvers}/calculated-measure-resolver.d.ts +6 -1
- package/dist/server/{server/resolvers → resolvers}/index.d.ts +2 -2
- package/dist/server/{server/resolvers → resolvers}/join-path-resolver.d.ts +7 -1
- package/dist/server/sql-format.d.ts +11 -0
- package/dist/server/{server/template-substitution.d.ts → template-substitution.d.ts} +1 -1
- package/dist/server/{server/types → types}/cache.d.ts +1 -1
- package/dist/server/{server/types → types}/cube.d.ts +22 -8
- package/dist/server/{server/types → types}/executor.d.ts +2 -2
- package/dist/server/{server/types → types}/flow.d.ts +7 -6
- package/dist/server/{server/types → types}/funnel.d.ts +1 -1
- package/dist/server/types/index.d.ts +11 -0
- package/dist/server/{server/types → types}/metadata.d.ts +1 -1
- package/dist/server/{server/types → types}/query.d.ts +4 -4
- package/dist/server/{server/types → types}/retention.d.ts +1 -1
- package/dist/server/{server/types → types}/utils.d.ts +1 -1
- package/dist/server/types/validation.d.ts +14 -0
- package/package.json +22 -7
- package/dist/adapters/google-DUlXeeDA.cjs +0 -2
- package/dist/adapters/handler-CzbCuS6_.cjs +0 -25
- package/dist/adapters/locale-BPB7flIG.js +0 -8249
- package/dist/adapters/locale-tIMrNcCr.cjs +0 -198
- package/dist/adapters/mcp-transport-C2QzXm6h.cjs +0 -40
- package/dist/adapters/mcp-transport-D0B3S1tB.js +0 -579
- package/dist/adapters/openai-D_U4V0kT.cjs +0 -1
- package/dist/adapters/utils-KV37IBIv.cjs +0 -128
- package/dist/client/chunks/DashboardEditModal-CjCIAT-J.js.map +0 -1
- package/dist/client/chunks/RetentionCombinedChart-BPkfcTa8.js.map +0 -1
- package/dist/client/chunks/RetentionHeatmap-DGzLzr7h.js.map +0 -1
- package/dist/client/chunks/analysis-builder-MuMIzoRq.js +0 -5367
- package/dist/client/chunks/analysis-builder-MuMIzoRq.js.map +0 -1
- package/dist/client/chunks/analysis-builder-shared-CYVwSPqt.js.map +0 -1
- package/dist/client/chunks/chart-activity-grid-DmruKPab.js.map +0 -1
- package/dist/client/chunks/chart-area-DHCPM4Em.js +0 -450
- package/dist/client/chunks/chart-area-DHCPM4Em.js.map +0 -1
- package/dist/client/chunks/chart-bar-KddciGDv.js +0 -271
- package/dist/client/chunks/chart-bar-KddciGDv.js.map +0 -1
- package/dist/client/chunks/chart-box-plot-DYKfyOI8.js.map +0 -1
- package/dist/client/chunks/chart-bubble-CfqiB538.js +0 -273
- package/dist/client/chunks/chart-bubble-CfqiB538.js.map +0 -1
- package/dist/client/chunks/chart-candlestick-Dwc92Mrj.js.map +0 -1
- package/dist/client/chunks/chart-config-area-Bq_UsW3x.js +0 -101
- package/dist/client/chunks/chart-config-area-Bq_UsW3x.js.map +0 -1
- package/dist/client/chunks/chart-config-bar-_JEGZnAu.js +0 -95
- package/dist/client/chunks/chart-config-bar-_JEGZnAu.js.map +0 -1
- package/dist/client/chunks/chart-config-box-plot-DJ-dWWXA.js.map +0 -1
- package/dist/client/chunks/chart-config-gauge-DSwC04l0.js.map +0 -1
- package/dist/client/chunks/chart-config-kpi-delta-D6BIkHL3.js.map +0 -1
- package/dist/client/chunks/chart-config-kpi-number-Bx-V9a62.js.map +0 -1
- package/dist/client/chunks/chart-config-kpi-text-CcqC1u-8.js.map +0 -1
- package/dist/client/chunks/chart-config-line-Db3jDsWc.js.map +0 -1
- package/dist/client/chunks/chart-config-pie-DD4SmRTF.js.map +0 -1
- package/dist/client/chunks/chart-config-radar-CC2XAaGr.js.map +0 -1
- package/dist/client/chunks/chart-config-radial-bar-DmxKx1R0.js.map +0 -1
- package/dist/client/chunks/chart-config-tree-map-BI-oQStO.js.map +0 -1
- package/dist/client/chunks/chart-config-waterfall-DSnyixbI.js.map +0 -1
- package/dist/client/chunks/chart-data-table-BO4sXsim.js.map +0 -1
- package/dist/client/chunks/chart-funnel-DnWRsmnS.js.map +0 -1
- package/dist/client/chunks/chart-gauge-CgMeqeGb.js +0 -424
- package/dist/client/chunks/chart-gauge-CgMeqeGb.js.map +0 -1
- package/dist/client/chunks/chart-heat-map-DcGm9SWK.js +0 -231
- package/dist/client/chunks/chart-heat-map-DcGm9SWK.js.map +0 -1
- package/dist/client/chunks/chart-kpi-delta-C2wKPqCb.js +0 -343
- package/dist/client/chunks/chart-kpi-delta-C2wKPqCb.js.map +0 -1
- package/dist/client/chunks/chart-kpi-number-gWYF44ol.js +0 -322
- package/dist/client/chunks/chart-kpi-number-gWYF44ol.js.map +0 -1
- package/dist/client/chunks/chart-kpi-text-DIYtJtk4.js +0 -149
- package/dist/client/chunks/chart-kpi-text-DIYtJtk4.js.map +0 -1
- package/dist/client/chunks/chart-line-9BEGN5Ti.js +0 -433
- package/dist/client/chunks/chart-line-9BEGN5Ti.js.map +0 -1
- package/dist/client/chunks/chart-markdown-dgUetjyM.js.map +0 -1
- package/dist/client/chunks/chart-measure-profile-ClfpLs4q.js.map +0 -1
- package/dist/client/chunks/chart-pie-BjAIhyOi.js +0 -172
- package/dist/client/chunks/chart-pie-BjAIhyOi.js.map +0 -1
- package/dist/client/chunks/chart-radar-Dgkcl2bN.js +0 -154
- package/dist/client/chunks/chart-radar-Dgkcl2bN.js.map +0 -1
- package/dist/client/chunks/chart-radial-bar-DdWJjAhK.js +0 -148
- package/dist/client/chunks/chart-radial-bar-DdWJjAhK.js.map +0 -1
- package/dist/client/chunks/chart-sankey-M3XpO_ah.js.map +0 -1
- package/dist/client/chunks/chart-scatter-DaHYP_OL.js +0 -255
- package/dist/client/chunks/chart-scatter-DaHYP_OL.js.map +0 -1
- package/dist/client/chunks/chart-sunburst-A_u6lqlS.js.map +0 -1
- package/dist/client/chunks/chart-tree-map-uiwUU4nb.js +0 -298
- package/dist/client/chunks/chart-tree-map-uiwUU4nb.js.map +0 -1
- package/dist/client/chunks/chart-waterfall-BuhMoagf.js.map +0 -1
- package/dist/client/chunks/charts-core-jRtb0S2M.js.map +0 -1
- package/dist/client/chunks/schema-visualization-DE09kQE3.js.map +0 -1
- package/dist/client/chunks/useDirtyStateTracking-CoeQbprt.js.map +0 -1
- package/dist/client/chunks/useExplainAI-DlnXWdmz.js.map +0 -1
- package/dist/client/chunks/utils-CTKNaXS8.js.map +0 -1
- package/dist/server/google-DUlXeeDA.cjs +0 -2
- package/dist/server/openai-D_U4V0kT.cjs +0 -1
- package/dist/server/server/adapters/databend-adapter.d.ts +0 -114
- package/dist/server/server/adapters/mysql-adapter.d.ts +0 -122
- package/dist/server/server/adapters/postgres-adapter.d.ts +0 -119
- package/dist/server/server/adapters/snowflake-adapter.d.ts +0 -116
- package/dist/server/server/agent/index.d.ts +0 -11
- package/dist/server/server/agent/providers/index.d.ts +0 -6
- package/dist/server/server/builders/flow-query-builder.d.ts +0 -109
- package/dist/server/server/builders/index.d.ts +0 -13
- package/dist/server/server/cache-providers/index.d.ts +0 -5
- package/dist/server/server/explain/index.d.ts +0 -9
- package/dist/server/server/index.d.ts +0 -36
- package/dist/server/server/logical-plan/logical-planner.d.ts +0 -232
- package/dist/server/server/physical-plan/drizzle-plan-builder.d.ts +0 -50
- package/dist/server/server/physical-plan/index.d.ts +0 -2
- package/dist/server/server/physical-plan/processors/index.d.ts +0 -6
- package/dist/server/server/types/index.d.ts +0 -11
- /package/dist/server/{server/agent → agent}/providers/types.d.ts +0 -0
- /package/dist/server/{server/ai → ai}/mcp-prompts.d.ts +0 -0
- /package/dist/server/{server/ai → ai}/query-schema.d.ts +0 -0
- /package/dist/server/{server/ai → ai}/schemas.d.ts +0 -0
- /package/dist/server/{server/prompts → prompts}/explain-analysis-prompt.d.ts +0 -0
- /package/dist/server/{server/prompts → prompts}/index.d.ts +0 -0
- /package/dist/server/{server/prompts → prompts}/single-step-prompt.d.ts +0 -0
- /package/dist/server/{server/prompts → prompts}/step0-validation-prompt.d.ts +0 -0
- /package/dist/server/{server/prompts → prompts}/step1-shape-prompt.d.ts +0 -0
- /package/dist/server/{server/prompts → prompts}/step2-complete-prompt.d.ts +0 -0
- /package/dist/server/{server/prompts → prompts}/types.d.ts +0 -0
- /package/dist/server/{server/types → types}/analysis.d.ts +0 -0
- /package/dist/server/{server/types → types}/core.d.ts +0 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { DatabaseAdapter } from '../adapters/base-adapter.js';
|
|
2
|
+
import { DrizzleSqlBuilder } from './drizzle-sql-builder.js';
|
|
3
|
+
import { CTEBuilder } from '../builders/cte-builder.js';
|
|
4
|
+
import { PhysicalQueryPlan, QueryContext, SemanticQuery } from '../types/index.js';
|
|
5
|
+
import { QueryNode } from '../logical-plan/index.js';
|
|
6
|
+
/**
|
|
7
|
+
* Converts optimised logical plans into runtime physical query plans,
|
|
8
|
+
* then builds executable Drizzle queries.
|
|
9
|
+
*/
|
|
10
|
+
export declare class DrizzlePlanBuilder {
|
|
11
|
+
private readonly queryBuilder;
|
|
12
|
+
private readonly cteBuilder;
|
|
13
|
+
private readonly databaseAdapter;
|
|
14
|
+
constructor(queryBuilder: DrizzleSqlBuilder, cteBuilder: CTEBuilder, databaseAdapter: DatabaseAdapter);
|
|
15
|
+
/**
|
|
16
|
+
* Build runtime physical context from an optimised logical plan.
|
|
17
|
+
* This is the physical-builder input for SQL generation.
|
|
18
|
+
*/
|
|
19
|
+
derivePhysicalPlanContext(plan: QueryNode): PhysicalQueryPlan;
|
|
20
|
+
/**
|
|
21
|
+
* Materialize a symbolic JoinRef into a runtime JoinCubePlanEntry, building
|
|
22
|
+
* the Drizzle join condition(s) from the join definition. This is the seam
|
|
23
|
+
* where the logical plan's symbolic join refs become executable SQL — the
|
|
24
|
+
* planner no longer pre-builds any join SQL.
|
|
25
|
+
*
|
|
26
|
+
* Junction-table security is NOT materialized here: the stored
|
|
27
|
+
* `through.securitySql` function is carried forward and applied (in the WHERE
|
|
28
|
+
* clause) at build time with the request's security context.
|
|
29
|
+
*/
|
|
30
|
+
private materializeJoin;
|
|
31
|
+
private derivePhysicalPlanContextFromMultiFact;
|
|
32
|
+
private derivePhysicalPlanContextFromFullKeyAggregate;
|
|
33
|
+
/**
|
|
34
|
+
* Reconstruct a SemanticQuery from a (possibly optimised) QueryNode.
|
|
35
|
+
*
|
|
36
|
+
* This is the materialization seam that makes the logical plan a real IR:
|
|
37
|
+
* the executor derives the query the physical builder consumes from the
|
|
38
|
+
* optimised plan, so optimiser rewrites of measures/filters/limit/etc. take
|
|
39
|
+
* effect in the generated SQL. Must faithfully round-trip every field the
|
|
40
|
+
* physical builder and processors read off a SemanticQuery.
|
|
41
|
+
*/
|
|
42
|
+
toSemanticQuery(node: QueryNode): SemanticQuery;
|
|
43
|
+
private resolvePhysicalSimpleSource;
|
|
44
|
+
private resolvePhysicalSimpleSourceFromKeysDedup;
|
|
45
|
+
private resolveKeysDeduplicationMeta;
|
|
46
|
+
/**
|
|
47
|
+
* Build unified query that works for both single and multi-cube queries.
|
|
48
|
+
*/
|
|
49
|
+
build(queryPlan: PhysicalQueryPlan, query: SemanticQuery, context: QueryContext): any;
|
|
50
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SQL, AnyColumn } from 'drizzle-orm';
|
|
2
|
-
import { SemanticQuery, FilterOperator, Filter, Cube, QueryContext, PhysicalQueryPlan } from '../types';
|
|
3
|
-
import { DatabaseAdapter } from '../adapters/base-adapter';
|
|
4
|
-
import { ResolvedMeasures } from '../template-substitution';
|
|
2
|
+
import { SemanticQuery, FilterOperator, Filter, Cube, QueryContext, PhysicalQueryPlan } from '../types/index.js';
|
|
3
|
+
import { DatabaseAdapter } from '../adapters/base-adapter.js';
|
|
4
|
+
import { ResolvedMeasures } from '../template-substitution.js';
|
|
5
5
|
export declare class DrizzleSqlBuilder {
|
|
6
6
|
private dateTimeBuilder;
|
|
7
7
|
private filterBuilder;
|
|
@@ -54,6 +54,15 @@ export declare class DrizzleSqlBuilder {
|
|
|
54
54
|
* @param preBuiltFilters - Optional map of cube name to pre-built filter SQL for parameter deduplication
|
|
55
55
|
*/
|
|
56
56
|
buildWhereConditions(cubes: Map<string, Cube> | Cube, query: SemanticQuery, context: QueryContext, queryPlan?: PhysicalQueryPlan, preBuiltFilters?: Map<string, SQL[]>): SQL[];
|
|
57
|
+
/**
|
|
58
|
+
* Append a single regular filter's WHERE condition, preferring pre-built
|
|
59
|
+
* filter SQL (for parameter deduplication) and skipping CTE-handled cubes.
|
|
60
|
+
*/
|
|
61
|
+
private appendWhereFilter;
|
|
62
|
+
/** Append a time dimension's date-range WHERE condition (cached when possible). */
|
|
63
|
+
private appendTimeDimensionWhere;
|
|
64
|
+
/** Whether a cube is materialized in a pre-aggregation CTE of the plan. */
|
|
65
|
+
private cubeIsInCTE;
|
|
57
66
|
/**
|
|
58
67
|
* Build HAVING conditions from semantic query filters (measures only)
|
|
59
68
|
* Works for both single and multi-cube queries
|
|
@@ -64,6 +73,8 @@ export declare class DrizzleSqlBuilder {
|
|
|
64
73
|
* @param filterType - 'where' for dimension filters, 'having' for measure filters
|
|
65
74
|
*/
|
|
66
75
|
private processFilter;
|
|
76
|
+
/** Build a WHERE condition for a dimension filter, honouring CTE skips and the filter cache. */
|
|
77
|
+
private processWhereDimensionFilter;
|
|
67
78
|
/**
|
|
68
79
|
* Build filter condition using Drizzle operators
|
|
69
80
|
* Delegates to FilterBuilder
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PhysicalQueryPlan, QueryContext, SemanticQuery } from '../../types';
|
|
2
|
-
import { PhysicalBuildDependencies, CTEBuildState } from './shared';
|
|
1
|
+
import { PhysicalQueryPlan, QueryContext, SemanticQuery } from '../../types/index.js';
|
|
2
|
+
import { PhysicalBuildDependencies, CTEBuildState } from './shared.js';
|
|
3
3
|
/**
|
|
4
4
|
* Builds pre-aggregation CTE state used by selection/join/predicate processors.
|
|
5
5
|
*/
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { buildCTEState } from './cte-processor.js';
|
|
2
|
+
export { buildModifiedSelections } from './selection-processor.js';
|
|
3
|
+
export { applyJoins } from './joins-processor.js';
|
|
4
|
+
export { applyPredicatesAndFinalize } from './predicates-processor.js';
|
|
5
|
+
export { buildKeysDeduplicationQuery } from './keys-dedup-processor.js';
|
|
6
|
+
export { buildMultiFactMergeQuery } from './multi-fact-processor.js';
|
|
7
|
+
export type { PhysicalBuildDependencies, CTEBuildState, JoinBuildState, SelectionMap, DownstreamJoinState } from './shared.js';
|
|
8
|
+
export { getCubesFromPlan } from './shared.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Cube, PhysicalQueryPlan, QueryContext } from '../../types';
|
|
2
|
-
import { CTEBuildState, JoinBuildState, PhysicalBuildDependencies, SelectionMap } from './shared';
|
|
1
|
+
import { Cube, PhysicalQueryPlan, QueryContext } from '../../types/index.js';
|
|
2
|
+
import { CTEBuildState, JoinBuildState, PhysicalBuildDependencies, SelectionMap } from './shared.js';
|
|
3
3
|
/**
|
|
4
4
|
* Applies CTEs and JOIN graph construction to the query builder.
|
|
5
5
|
*/
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { PhysicalQueryPlan, QueryContext, SemanticQuery } from '../../types/index.js';
|
|
2
|
+
import { PhysicalBuildDependencies } from './shared.js';
|
|
3
|
+
/**
|
|
4
|
+
* Build the dual-CTE keys-deduplication query, or return null when the plan
|
|
5
|
+
* does not qualify (caller falls back to the standard build).
|
|
6
|
+
*
|
|
7
|
+
* The query splits into:
|
|
8
|
+
* - a "keys" CTE that groups by the query grain + multiplied cube primary key
|
|
9
|
+
* (pre-aggregating regular measures), and
|
|
10
|
+
* - a "pk_agg" CTE that pre-aggregates the multiplied cube's measures per PK,
|
|
11
|
+
* then re-aggregates both in an outer query joined on the primary key.
|
|
12
|
+
*/
|
|
13
|
+
export declare function buildKeysDeduplicationQuery(queryPlan: PhysicalQueryPlan, query: SemanticQuery, context: QueryContext, deps: PhysicalBuildDependencies): any | null;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { PhysicalQueryPlan, QueryContext, SemanticQuery } from '../../types/index.js';
|
|
2
|
+
import { PhysicalBuildDependencies } from './shared.js';
|
|
3
|
+
/**
|
|
4
|
+
* Build a function for `build()` so each group CTE can be materialized through
|
|
5
|
+
* the standard physical-plan builder without a class dependency.
|
|
6
|
+
*/
|
|
7
|
+
export type GroupQueryBuilder = (queryPlan: PhysicalQueryPlan, query: SemanticQuery, context: QueryContext) => any;
|
|
8
|
+
/**
|
|
9
|
+
* Build a multi-fact-merge query (joining independent measure groups on shared
|
|
10
|
+
* grain keys), or return null when the plan does not qualify. Falls back to a
|
|
11
|
+
* UNION-of-keys strategy when a FULL OUTER JOIN is requested but unsupported.
|
|
12
|
+
*/
|
|
13
|
+
export declare function buildMultiFactMergeQuery(queryPlan: PhysicalQueryPlan, query: SemanticQuery, context: QueryContext, deps: PhysicalBuildDependencies, buildGroup: GroupQueryBuilder): any | null;
|
package/dist/server/{server/physical-plan → physical-plan}/processors/predicates-processor.d.ts
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Cube, PhysicalQueryPlan, QueryContext, SemanticQuery } from '../../types';
|
|
2
|
-
import { CTEBuildState, JoinBuildState, PhysicalBuildDependencies } from './shared';
|
|
1
|
+
import { Cube, PhysicalQueryPlan, QueryContext, SemanticQuery } from '../../types/index.js';
|
|
2
|
+
import { CTEBuildState, JoinBuildState, PhysicalBuildDependencies } from './shared.js';
|
|
3
3
|
/**
|
|
4
4
|
* Applies WHERE/GROUP/HAVING/ORDER/LIMIT phases.
|
|
5
5
|
*/
|
package/dist/server/{server/physical-plan → physical-plan}/processors/selection-processor.d.ts
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Cube, PhysicalQueryPlan, QueryContext, SemanticQuery } from '../../types';
|
|
2
|
-
import { PhysicalBuildDependencies, SelectionMap } from './shared';
|
|
1
|
+
import { Cube, PhysicalQueryPlan, QueryContext, SemanticQuery } from '../../types/index.js';
|
|
2
|
+
import { PhysicalBuildDependencies, SelectionMap } from './shared.js';
|
|
3
3
|
/**
|
|
4
4
|
* Builds and rewrites selections (including CTE and window handling).
|
|
5
5
|
*/
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { SQL } from 'drizzle-orm';
|
|
2
|
-
import { DatabaseAdapter } from '../../adapters/base-adapter';
|
|
3
|
-
import { DrizzleSqlBuilder } from '../drizzle-sql-builder';
|
|
4
|
-
import { CTEBuilder } from '../../builders/cte-builder';
|
|
5
|
-
import { Cube, PhysicalQueryPlan } from '../../types';
|
|
2
|
+
import { DatabaseAdapter } from '../../adapters/base-adapter.js';
|
|
3
|
+
import { DrizzleSqlBuilder } from '../drizzle-sql-builder.js';
|
|
4
|
+
import { CTEBuilder } from '../../builders/cte-builder.js';
|
|
5
|
+
import { Cube, PhysicalQueryPlan } from '../../types/index.js';
|
|
6
6
|
export interface PhysicalBuildDependencies {
|
|
7
7
|
queryBuilder: DrizzleSqlBuilder;
|
|
8
8
|
cteBuilder: CTEBuilder;
|
|
@@ -30,4 +30,9 @@ export interface JoinBuildState {
|
|
|
30
30
|
absorbedIntermediateCubes: Set<string>;
|
|
31
31
|
}
|
|
32
32
|
export type SelectionMap = Record<string, any>;
|
|
33
|
+
/**
|
|
34
|
+
* Apply a join of the given type to a Drizzle query builder.
|
|
35
|
+
* Shared by the physical-plan builders that assemble CTE/merge queries.
|
|
36
|
+
*/
|
|
37
|
+
export declare function applyJoinByType(drizzleQuery: any, joinType: 'inner' | 'left' | 'right' | 'full', joinTarget: any, joinCondition: SQL): any;
|
|
33
38
|
export declare function getCubesFromPlan(queryPlan: PhysicalQueryPlan): Map<string, Cube>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Cube, PhysicalQueryPlan, QueryContext, SemanticQuery } from '../../types';
|
|
2
|
-
import { PhysicalBuildDependencies, SelectionMap } from './shared';
|
|
1
|
+
import { Cube, PhysicalQueryPlan, QueryContext, SemanticQuery } from '../../types/index.js';
|
|
2
|
+
import { PhysicalBuildDependencies, SelectionMap } from './shared.js';
|
|
3
3
|
/**
|
|
4
4
|
* Applies post-aggregation window measures to the selection map.
|
|
5
5
|
*/
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { SemanticLayerCompiler } from './compiler.js';
|
|
2
|
+
import { SemanticQuery, SecurityContext } from './types/index.js';
|
|
3
|
+
import { CubeDiscoveryResult } from './ai/discovery.js';
|
|
4
|
+
/**
|
|
5
|
+
* Discovery request body
|
|
6
|
+
*/
|
|
7
|
+
export interface DiscoverRequest {
|
|
8
|
+
/** Topic or keyword to search for */
|
|
9
|
+
topic?: string;
|
|
10
|
+
/** Natural language intent */
|
|
11
|
+
intent?: string;
|
|
12
|
+
/** Maximum results to return */
|
|
13
|
+
limit?: number;
|
|
14
|
+
/** Minimum relevance score (0-1) */
|
|
15
|
+
minScore?: number;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Load request body - execute a query
|
|
19
|
+
*/
|
|
20
|
+
export interface LoadRequest {
|
|
21
|
+
/** Query to execute */
|
|
22
|
+
query: SemanticQuery;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Discovery response shape returned by `handleDiscover`.
|
|
26
|
+
*
|
|
27
|
+
* In addition to the matched cubes, the response embeds the full query
|
|
28
|
+
* language reference and the date filtering decision tree. This is the
|
|
29
|
+
* primary delivery mechanism for query-construction guidance: clients
|
|
30
|
+
* cannot be relied upon to forward `prompts/*` content to the model, so
|
|
31
|
+
* we piggyback on `discover` (the mandated first call in our workflow)
|
|
32
|
+
* to guarantee the model sees the rules before it builds a query.
|
|
33
|
+
*
|
|
34
|
+
* The fields are stable strings — consumers may render or strip them as
|
|
35
|
+
* they see fit, but the MCP `discover` tool relies on them being present.
|
|
36
|
+
*/
|
|
37
|
+
export interface DiscoverResponse {
|
|
38
|
+
/** Matched cubes (possibly empty) with measures, dimensions, and joins */
|
|
39
|
+
cubes: CubeDiscoveryResult[];
|
|
40
|
+
/**
|
|
41
|
+
* Complete TypeScript DSL reference for query construction. Source of
|
|
42
|
+
* truth for field naming, filter operators, time dimensions, and
|
|
43
|
+
* analysis modes (funnel/flow/retention).
|
|
44
|
+
*/
|
|
45
|
+
queryLanguageReference: string;
|
|
46
|
+
/**
|
|
47
|
+
* Decision tree for date filtering vs time grouping. The single most
|
|
48
|
+
* common source of incorrect queries — read this whenever the user
|
|
49
|
+
* mentions a time period.
|
|
50
|
+
*/
|
|
51
|
+
dateFilteringGuide: string;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Handle /discover endpoint - find relevant cubes based on topic/intent.
|
|
55
|
+
*
|
|
56
|
+
* Always returns `queryLanguageReference` and `dateFilteringGuide` alongside
|
|
57
|
+
* the matched cubes. See `DiscoverResponse` for the rationale.
|
|
58
|
+
*/
|
|
59
|
+
export declare function handleDiscover(semanticLayer: SemanticLayerCompiler, body: DiscoverRequest): Promise<DiscoverResponse>;
|
|
60
|
+
/**
|
|
61
|
+
* Normalize AI-generated query fields before validation/execution.
|
|
62
|
+
* Fixes common LLM mistakes:
|
|
63
|
+
* - Double-prefixed fields: "Teams.Teams.name" -> "Teams.name"
|
|
64
|
+
* - Order as array: [{key: dir}] -> {key: dir}
|
|
65
|
+
* - Underscore order keys: "Teams_count" -> "Teams.count"
|
|
66
|
+
* - Invalid order keys dropped (falls back to first measure desc)
|
|
67
|
+
*
|
|
68
|
+
* This runs in the shared handleLoad path so both MCP and Agent benefit.
|
|
69
|
+
*/
|
|
70
|
+
export declare function normalizeQueryFields(query: Record<string, unknown>): Record<string, unknown>;
|
|
71
|
+
/**
|
|
72
|
+
* Handle /load endpoint - execute a query and return results
|
|
73
|
+
* This completes the AI workflow: discover → suggest → validate → load
|
|
74
|
+
*/
|
|
75
|
+
export declare function handleLoad(semanticLayer: SemanticLayerCompiler, securityContext: SecurityContext, body: LoadRequest): Promise<{
|
|
76
|
+
data: Record<string, unknown>[];
|
|
77
|
+
annotation: any;
|
|
78
|
+
query: SemanticQuery;
|
|
79
|
+
}>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { SemanticQuery } from './types/index.js';
|
|
2
|
+
export type QueryMode = 'regular' | 'comparison' | 'funnel' | 'flow' | 'retention';
|
|
3
|
+
export interface QueryModeFlags {
|
|
4
|
+
comparison: boolean;
|
|
5
|
+
funnel: boolean;
|
|
6
|
+
flow: boolean;
|
|
7
|
+
retention: boolean;
|
|
8
|
+
}
|
|
9
|
+
/** A query is a comparison when a time dimension carries a compareDateRange with ≥2 ranges. */
|
|
10
|
+
export declare function hasComparisonMode(query: SemanticQuery): boolean;
|
|
11
|
+
/**
|
|
12
|
+
* A query is a funnel when it has a funnel config with ≥2 steps.
|
|
13
|
+
* Null-safe on `steps` — a `funnel: {}` payload must not throw here.
|
|
14
|
+
*/
|
|
15
|
+
export declare function hasFunnelMode(query: SemanticQuery): boolean;
|
|
16
|
+
/** A query is a flow when it has a flow config with a startingStep and eventDimension. */
|
|
17
|
+
export declare function hasFlowMode(query: SemanticQuery): boolean;
|
|
18
|
+
/** A query is a retention when it has a retention config with a timeDimension and bindingKey. */
|
|
19
|
+
export declare function hasRetentionMode(query: SemanticQuery): boolean;
|
|
20
|
+
/** Per-mode booleans for a query. */
|
|
21
|
+
export declare function detectQueryModes(query: SemanticQuery): QueryModeFlags;
|
|
22
|
+
/**
|
|
23
|
+
* Active non-regular modes for a query, in execution-priority order
|
|
24
|
+
* (comparison, funnel, flow, retention). A well-formed query matches at most one.
|
|
25
|
+
*/
|
|
26
|
+
export declare function getActiveQueryModes(query: SemanticQuery): Exclude<QueryMode, 'regular'>[];
|
|
27
|
+
/** The single priority mode for a query, or 'regular' when none match. */
|
|
28
|
+
export declare function detectQueryMode(query: SemanticQuery): QueryMode;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { SemanticQuery, Cube } from './types/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* Validate a query against a cubes map
|
|
4
|
+
* Standalone function that can be used by both compiler and executor
|
|
5
|
+
*/
|
|
6
|
+
export declare function validateQueryAgainstCubes(cubes: Map<string, Cube>, query: SemanticQuery): {
|
|
7
|
+
isValid: boolean;
|
|
8
|
+
errors: string[];
|
|
9
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Cube, Measure } from '../types/cube';
|
|
1
|
+
import { Cube, Measure } from '../types/cube.js';
|
|
2
2
|
/**
|
|
3
3
|
* Dependency information for a calculated measure
|
|
4
4
|
*/
|
|
@@ -51,6 +51,11 @@ export declare class CalculatedMeasureResolver {
|
|
|
51
51
|
* @throws Error if circular dependency detected
|
|
52
52
|
*/
|
|
53
53
|
topologicalSort(measureNames: string[]): string[];
|
|
54
|
+
/**
|
|
55
|
+
* Build a subgraph containing only the requested measures, with in-degrees
|
|
56
|
+
* recomputed to count only dependencies that are within the subgraph.
|
|
57
|
+
*/
|
|
58
|
+
private buildSubgraph;
|
|
54
59
|
/**
|
|
55
60
|
* Detect circular dependencies using DFS
|
|
56
61
|
* Returns the cycle path if found, null otherwise
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
* Resolvers Index
|
|
3
3
|
* Re-exports resolver components for modular imports
|
|
4
4
|
*/
|
|
5
|
-
export { CalculatedMeasureResolver } from './calculated-measure-resolver';
|
|
6
|
-
export { JoinPathResolver } from './join-path-resolver';
|
|
5
|
+
export { CalculatedMeasureResolver } from './calculated-measure-resolver.js';
|
|
6
|
+
export { JoinPathResolver } from './join-path-resolver.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Cube, CubeJoin } from '../types';
|
|
1
|
+
import { Cube, CubeJoin } from '../types/index.js';
|
|
2
2
|
import { SQL } from 'drizzle-orm';
|
|
3
3
|
/**
|
|
4
4
|
* Internal representation of a join path step
|
|
@@ -78,6 +78,12 @@ export declare class JoinPathResolver {
|
|
|
78
78
|
* @returns Array of join steps or null if no path exists
|
|
79
79
|
*/
|
|
80
80
|
findPath(fromCube: string, toCube: string, alreadyProcessed?: Set<string>): InternalJoinPathStep[] | null;
|
|
81
|
+
/**
|
|
82
|
+
* Enumerate the neighbouring cubes reachable from `currentCube` in one hop,
|
|
83
|
+
* yielding the resulting join step. Forward edges (outgoing joins) come first,
|
|
84
|
+
* then reverse edges (incoming joins) unless `forwardOnly` is set.
|
|
85
|
+
*/
|
|
86
|
+
private neighbourSteps;
|
|
81
87
|
/**
|
|
82
88
|
* Find path that prefers going through specified cubes when possible
|
|
83
89
|
* Used when certain cubes have measures in the query - ensures joins go through
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SQL pretty-printing for generated queries.
|
|
3
|
+
*
|
|
4
|
+
* Lives in the server layer (rather than adapters/) so that the compiler can
|
|
5
|
+
* format SQL without importing up into the framework-adapter layer — which
|
|
6
|
+
* would create an import cycle (compiler → adapters/utils → server).
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Format SQL string using sql-formatter with appropriate dialect
|
|
10
|
+
*/
|
|
11
|
+
export declare function formatSqlString(sqlString: string, engineType: 'postgres' | 'mysql' | 'sqlite' | 'singlestore' | 'duckdb' | 'databend' | 'snowflake'): string;
|
|
@@ -1,7 +1,23 @@
|
|
|
1
1
|
import { SQL, AnyColumn, Table, Subquery, View } from 'drizzle-orm';
|
|
2
|
-
import { SecurityContext, DrizzleDatabase, QueryResult, MeasureType, DimensionType, TimeGranularity } from './core';
|
|
3
|
-
import { SemanticQuery } from './query';
|
|
4
|
-
|
|
2
|
+
import { SecurityContext, DrizzleDatabase, QueryResult, MeasureType, DimensionType, TimeGranularity } from './core.js';
|
|
3
|
+
import { SemanticQuery } from './query.js';
|
|
4
|
+
/**
|
|
5
|
+
* Filter SQL cache used for parameter deduplication across CTEs and the main
|
|
6
|
+
* query. Defined here (rather than imported from the runtime filter-cache
|
|
7
|
+
* module) so the types package has no dependency on runtime modules.
|
|
8
|
+
* Implemented by `FilterCacheManager`.
|
|
9
|
+
*/
|
|
10
|
+
export interface FilterCache {
|
|
11
|
+
getOrBuild(key: string, builder: () => SQL | null): SQL | null;
|
|
12
|
+
has(key: string): boolean;
|
|
13
|
+
get(key: string): SQL | undefined;
|
|
14
|
+
preload(entries: Array<{
|
|
15
|
+
key: string;
|
|
16
|
+
sql: SQL;
|
|
17
|
+
}>): void;
|
|
18
|
+
set(key: string, sql: SQL): void;
|
|
19
|
+
clear(): void;
|
|
20
|
+
}
|
|
5
21
|
/**
|
|
6
22
|
* Any queryable relation that can be used in FROM/JOIN clauses
|
|
7
23
|
* Supports tables, views, subqueries, and raw SQL expressions
|
|
@@ -42,7 +58,7 @@ export interface QueryContext {
|
|
|
42
58
|
* Filter cache for parameter deduplication across CTEs
|
|
43
59
|
* Created at query start and used throughout query building
|
|
44
60
|
*/
|
|
45
|
-
filterCache?:
|
|
61
|
+
filterCache?: FilterCache;
|
|
46
62
|
/**
|
|
47
63
|
* When true, measures should be rendered as raw column expressions
|
|
48
64
|
* without aggregation wrappers. Set from SemanticQuery.ungrouped.
|
|
@@ -360,7 +376,7 @@ export interface PropagatingFilter {
|
|
|
360
376
|
/** The source cube whose filters need to propagate */
|
|
361
377
|
sourceCube: Cube;
|
|
362
378
|
/** Filters from the source cube to apply */
|
|
363
|
-
filters: import('./query').Filter[];
|
|
379
|
+
filters: import('./query.js').Filter[];
|
|
364
380
|
/** Join conditions linking source cube PK(s) to target cube FK(s) - supports composite keys */
|
|
365
381
|
joinConditions: JoinKeyPair[];
|
|
366
382
|
/** Pre-built filter SQL for parameter deduplication (optional, built during query planning) */
|
|
@@ -376,8 +392,6 @@ export interface IntermediateJoinInfo {
|
|
|
376
392
|
cube: Cube;
|
|
377
393
|
/** The join definition from the intermediate cube to this CTE cube */
|
|
378
394
|
joinDef: CubeJoin;
|
|
379
|
-
/** Security filter to apply to the intermediate table within the CTE */
|
|
380
|
-
securityFilter?: SQL;
|
|
381
395
|
/** The column on the intermediate table that connects to the primary cube */
|
|
382
396
|
primaryJoinColumn: AnyColumn;
|
|
383
397
|
/** The column on the intermediate table that connects to the CTE cube */
|
|
@@ -512,7 +526,7 @@ export interface PhysicalQueryPlan {
|
|
|
512
526
|
}>;
|
|
513
527
|
};
|
|
514
528
|
/** Warnings about potential query issues (e.g., fan-out without dimensions) */
|
|
515
|
-
warnings?: import('./core').QueryWarning[];
|
|
529
|
+
warnings?: import('./core.js').QueryWarning[];
|
|
516
530
|
}
|
|
517
531
|
/**
|
|
518
532
|
* Utility type for cube definition with schema inference
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SQL } from 'drizzle-orm';
|
|
2
|
-
import { DrizzleDatabase } from './core';
|
|
3
|
-
import { DatabaseAdapter } from '../adapters/base-adapter';
|
|
2
|
+
import { DrizzleDatabase } from './core.js';
|
|
3
|
+
import { DatabaseAdapter } from '../adapters/base-adapter.js';
|
|
4
4
|
/**
|
|
5
5
|
* Database executor interface that wraps Drizzle ORM
|
|
6
6
|
* Provides type-safe SQL execution with engine-specific implementations
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { Filter } from './query';
|
|
1
|
+
import { Filter } from './query.js';
|
|
2
|
+
import { AnalysisConfigValidationResult } from './validation.js';
|
|
2
3
|
/**
|
|
3
4
|
* Flow query configuration for server-side execution
|
|
4
5
|
* This is the configuration extracted from SemanticQuery.flow
|
|
@@ -131,12 +132,12 @@ export interface RawFlowLinkRow {
|
|
|
131
132
|
}
|
|
132
133
|
/**
|
|
133
134
|
* Flow validation result
|
|
135
|
+
*
|
|
136
|
+
* Alias of the shared {@link AnalysisConfigValidationResult} used by all
|
|
137
|
+
* analysis-mode builders. Kept as a named export for backwards compatibility
|
|
138
|
+
* with existing consumers.
|
|
134
139
|
*/
|
|
135
|
-
export
|
|
136
|
-
isValid: boolean;
|
|
137
|
-
errors: string[];
|
|
138
|
-
warnings: string[];
|
|
139
|
-
}
|
|
140
|
+
export type FlowValidationResult = AnalysisConfigValidationResult;
|
|
140
141
|
/** Minimum number of steps before/after */
|
|
141
142
|
export declare const FLOW_MIN_DEPTH = 0;
|
|
142
143
|
/** Maximum number of steps before/after */
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export * from './core.js';
|
|
2
|
+
export * from './query.js';
|
|
3
|
+
export * from './funnel.js';
|
|
4
|
+
export * from './retention.js';
|
|
5
|
+
export * from './cube.js';
|
|
6
|
+
export * from './executor.js';
|
|
7
|
+
export * from './metadata.js';
|
|
8
|
+
export * from './analysis.js';
|
|
9
|
+
export * from './validation.js';
|
|
10
|
+
export * from './utils.js';
|
|
11
|
+
export * from './cache.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { TimeGranularity } from './core';
|
|
2
|
-
import { FunnelQueryConfig } from './funnel';
|
|
3
|
-
import { FlowQueryConfig } from './flow';
|
|
4
|
-
import { RetentionQueryConfig } from './retention';
|
|
1
|
+
import { TimeGranularity } from './core.js';
|
|
2
|
+
import { FunnelQueryConfig } from './funnel.js';
|
|
3
|
+
import { FlowQueryConfig } from './flow.js';
|
|
4
|
+
import { RetentionQueryConfig } from './retention.js';
|
|
5
5
|
/**
|
|
6
6
|
* Semantic query structure (Cube.js compatible)
|
|
7
7
|
*/
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared validation types for analysis-mode config validation
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Result of validating an analysis-mode config (funnel, flow, retention).
|
|
6
|
+
*
|
|
7
|
+
* `warnings` is optional — flow analysis surfaces non-fatal warnings, while
|
|
8
|
+
* funnel and retention only produce errors (and omit the field entirely).
|
|
9
|
+
*/
|
|
10
|
+
export interface AnalysisConfigValidationResult {
|
|
11
|
+
isValid: boolean;
|
|
12
|
+
errors: string[];
|
|
13
|
+
warnings?: string[];
|
|
14
|
+
}
|