@panoboard/core 1.1.5
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/cache/cache.d.ts +11 -0
- package/dist/cache/cache.d.ts.map +1 -0
- package/dist/cache/cache.js +42 -0
- package/dist/cache/cache.js.map +1 -0
- package/dist/cache/client.d.ts +9 -0
- package/dist/cache/client.d.ts.map +1 -0
- package/dist/cache/client.js +63 -0
- package/dist/cache/client.js.map +1 -0
- package/dist/cache/index.d.ts +4 -0
- package/dist/cache/index.d.ts.map +1 -0
- package/dist/cache/index.js +17 -0
- package/dist/cache/index.js.map +1 -0
- package/dist/cache/keys.d.ts +2 -0
- package/dist/cache/keys.d.ts.map +1 -0
- package/dist/cache/keys.js +26 -0
- package/dist/cache/keys.js.map +1 -0
- package/dist/components/DashboardCard.d.ts +15 -0
- package/dist/components/DashboardCard.d.ts.map +1 -0
- package/dist/components/DashboardCard.js +80 -0
- package/dist/components/DashboardCard.js.map +1 -0
- package/dist/components/DashboardShell.d.ts +11 -0
- package/dist/components/DashboardShell.d.ts.map +1 -0
- package/dist/components/DashboardShell.js +115 -0
- package/dist/components/DashboardShell.js.map +1 -0
- package/dist/components/EmptyState.d.ts +6 -0
- package/dist/components/EmptyState.d.ts.map +1 -0
- package/dist/components/EmptyState.js +29 -0
- package/dist/components/EmptyState.js.map +1 -0
- package/dist/components/ErrorPage.d.ts +14 -0
- package/dist/components/ErrorPage.d.ts.map +1 -0
- package/dist/components/ErrorPage.js +132 -0
- package/dist/components/ErrorPage.js.map +1 -0
- package/dist/components/FilterBar.d.ts +8 -0
- package/dist/components/FilterBar.d.ts.map +1 -0
- package/dist/components/FilterBar.js +70 -0
- package/dist/components/FilterBar.js.map +1 -0
- package/dist/components/PanelGrid.d.ts +9 -0
- package/dist/components/PanelGrid.d.ts.map +1 -0
- package/dist/components/PanelGrid.js +26 -0
- package/dist/components/PanelGrid.js.map +1 -0
- package/dist/components/PanelWrapper.d.ts +8 -0
- package/dist/components/PanelWrapper.d.ts.map +1 -0
- package/dist/components/PanelWrapper.js +154 -0
- package/dist/components/PanelWrapper.js.map +1 -0
- package/dist/components/filters/BooleanFilter.d.ts +8 -0
- package/dist/components/filters/BooleanFilter.d.ts.map +1 -0
- package/dist/components/filters/BooleanFilter.js +36 -0
- package/dist/components/filters/BooleanFilter.js.map +1 -0
- package/dist/components/filters/CalendarGrid.d.ts +8 -0
- package/dist/components/filters/CalendarGrid.d.ts.map +1 -0
- package/dist/components/filters/CalendarGrid.js +159 -0
- package/dist/components/filters/CalendarGrid.js.map +1 -0
- package/dist/components/filters/DateRangeFilter.d.ts +10 -0
- package/dist/components/filters/DateRangeFilter.d.ts.map +1 -0
- package/dist/components/filters/DateRangeFilter.js +80 -0
- package/dist/components/filters/DateRangeFilter.js.map +1 -0
- package/dist/components/filters/FilterChips.d.ts +8 -0
- package/dist/components/filters/FilterChips.d.ts.map +1 -0
- package/dist/components/filters/FilterChips.js +94 -0
- package/dist/components/filters/FilterChips.js.map +1 -0
- package/dist/components/filters/MultiSelectFilter.d.ts +17 -0
- package/dist/components/filters/MultiSelectFilter.d.ts.map +1 -0
- package/dist/components/filters/MultiSelectFilter.js +80 -0
- package/dist/components/filters/MultiSelectFilter.js.map +1 -0
- package/dist/components/filters/NumberFilter.d.ts +10 -0
- package/dist/components/filters/NumberFilter.d.ts.map +1 -0
- package/dist/components/filters/NumberFilter.js +47 -0
- package/dist/components/filters/NumberFilter.js.map +1 -0
- package/dist/components/filters/SelectFilter.d.ts +16 -0
- package/dist/components/filters/SelectFilter.d.ts.map +1 -0
- package/dist/components/filters/SelectFilter.js +71 -0
- package/dist/components/filters/SelectFilter.js.map +1 -0
- package/dist/components/filters/TextFilter.d.ts +8 -0
- package/dist/components/filters/TextFilter.d.ts.map +1 -0
- package/dist/components/filters/TextFilter.js +57 -0
- package/dist/components/filters/TextFilter.js.map +1 -0
- package/dist/components/filters/useDropdown.d.ts +7 -0
- package/dist/components/filters/useDropdown.d.ts.map +1 -0
- package/dist/components/filters/useDropdown.js +41 -0
- package/dist/components/filters/useDropdown.js.map +1 -0
- package/dist/components/filters/useFilterUpdate.d.ts +2 -0
- package/dist/components/filters/useFilterUpdate.d.ts.map +1 -0
- package/dist/components/filters/useFilterUpdate.js +30 -0
- package/dist/components/filters/useFilterUpdate.js.map +1 -0
- package/dist/components/index.d.ts +59 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/index.js +75 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/panels/AreaChart.d.ts +7 -0
- package/dist/components/panels/AreaChart.d.ts.map +1 -0
- package/dist/components/panels/AreaChart.js +88 -0
- package/dist/components/panels/AreaChart.js.map +1 -0
- package/dist/components/panels/BarChart.d.ts +7 -0
- package/dist/components/panels/BarChart.d.ts.map +1 -0
- package/dist/components/panels/BarChart.js +99 -0
- package/dist/components/panels/BarChart.js.map +1 -0
- package/dist/components/panels/BoxPlotChart.d.ts +7 -0
- package/dist/components/panels/BoxPlotChart.d.ts.map +1 -0
- package/dist/components/panels/BoxPlotChart.js +41 -0
- package/dist/components/panels/BoxPlotChart.js.map +1 -0
- package/dist/components/panels/BulletChart.d.ts +7 -0
- package/dist/components/panels/BulletChart.d.ts.map +1 -0
- package/dist/components/panels/BulletChart.js +46 -0
- package/dist/components/panels/BulletChart.js.map +1 -0
- package/dist/components/panels/BumpChart.d.ts +7 -0
- package/dist/components/panels/BumpChart.d.ts.map +1 -0
- package/dist/components/panels/BumpChart.js +38 -0
- package/dist/components/panels/BumpChart.js.map +1 -0
- package/dist/components/panels/CalendarHeatmap.d.ts +7 -0
- package/dist/components/panels/CalendarHeatmap.d.ts.map +1 -0
- package/dist/components/panels/CalendarHeatmap.js +41 -0
- package/dist/components/panels/CalendarHeatmap.js.map +1 -0
- package/dist/components/panels/ChartTooltip.d.ts +48 -0
- package/dist/components/panels/ChartTooltip.d.ts.map +1 -0
- package/dist/components/panels/ChartTooltip.js +129 -0
- package/dist/components/panels/ChartTooltip.js.map +1 -0
- package/dist/components/panels/DonutChart.d.ts +7 -0
- package/dist/components/panels/DonutChart.d.ts.map +1 -0
- package/dist/components/panels/DonutChart.js +40 -0
- package/dist/components/panels/DonutChart.js.map +1 -0
- package/dist/components/panels/FunnelChart.d.ts +7 -0
- package/dist/components/panels/FunnelChart.d.ts.map +1 -0
- package/dist/components/panels/FunnelChart.js +32 -0
- package/dist/components/panels/FunnelChart.js.map +1 -0
- package/dist/components/panels/HeatmapChart.d.ts +7 -0
- package/dist/components/panels/HeatmapChart.d.ts.map +1 -0
- package/dist/components/panels/HeatmapChart.js +41 -0
- package/dist/components/panels/HeatmapChart.js.map +1 -0
- package/dist/components/panels/IframePanel.d.ts +6 -0
- package/dist/components/panels/IframePanel.d.ts.map +1 -0
- package/dist/components/panels/IframePanel.js +5 -0
- package/dist/components/panels/IframePanel.js.map +1 -0
- package/dist/components/panels/ImagePanel.d.ts +7 -0
- package/dist/components/panels/ImagePanel.d.ts.map +1 -0
- package/dist/components/panels/ImagePanel.js +9 -0
- package/dist/components/panels/ImagePanel.js.map +1 -0
- package/dist/components/panels/LineChart.d.ts +7 -0
- package/dist/components/panels/LineChart.d.ts.map +1 -0
- package/dist/components/panels/LineChart.js +87 -0
- package/dist/components/panels/LineChart.js.map +1 -0
- package/dist/components/panels/ListPanel.d.ts +7 -0
- package/dist/components/panels/ListPanel.d.ts.map +1 -0
- package/dist/components/panels/ListPanel.js +24 -0
- package/dist/components/panels/ListPanel.js.map +1 -0
- package/dist/components/panels/MarkdownPanel.d.ts +7 -0
- package/dist/components/panels/MarkdownPanel.d.ts.map +1 -0
- package/dist/components/panels/MarkdownPanel.js +39 -0
- package/dist/components/panels/MarkdownPanel.js.map +1 -0
- package/dist/components/panels/MetricPanel.d.ts +7 -0
- package/dist/components/panels/MetricPanel.d.ts.map +1 -0
- package/dist/components/panels/MetricPanel.js +23 -0
- package/dist/components/panels/MetricPanel.js.map +1 -0
- package/dist/components/panels/PanelEmpty.d.ts +2 -0
- package/dist/components/panels/PanelEmpty.d.ts.map +1 -0
- package/dist/components/panels/PanelEmpty.js +27 -0
- package/dist/components/panels/PanelEmpty.js.map +1 -0
- package/dist/components/panels/PanelError.d.ts +7 -0
- package/dist/components/panels/PanelError.d.ts.map +1 -0
- package/dist/components/panels/PanelError.js +21 -0
- package/dist/components/panels/PanelError.js.map +1 -0
- package/dist/components/panels/PanelSkeleton.d.ts +6 -0
- package/dist/components/panels/PanelSkeleton.d.ts.map +1 -0
- package/dist/components/panels/PanelSkeleton.js +24 -0
- package/dist/components/panels/PanelSkeleton.js.map +1 -0
- package/dist/components/panels/PieChart.d.ts +7 -0
- package/dist/components/panels/PieChart.d.ts.map +1 -0
- package/dist/components/panels/PieChart.js +40 -0
- package/dist/components/panels/PieChart.js.map +1 -0
- package/dist/components/panels/RadarChart.d.ts +7 -0
- package/dist/components/panels/RadarChart.d.ts.map +1 -0
- package/dist/components/panels/RadarChart.js +50 -0
- package/dist/components/panels/RadarChart.js.map +1 -0
- package/dist/components/panels/RadialBarChart.d.ts +7 -0
- package/dist/components/panels/RadialBarChart.d.ts.map +1 -0
- package/dist/components/panels/RadialBarChart.js +49 -0
- package/dist/components/panels/RadialBarChart.js.map +1 -0
- package/dist/components/panels/SankeyChart.d.ts +7 -0
- package/dist/components/panels/SankeyChart.d.ts.map +1 -0
- package/dist/components/panels/SankeyChart.js +39 -0
- package/dist/components/panels/SankeyChart.js.map +1 -0
- package/dist/components/panels/ScatterChart.d.ts +7 -0
- package/dist/components/panels/ScatterChart.d.ts.map +1 -0
- package/dist/components/panels/ScatterChart.js +54 -0
- package/dist/components/panels/ScatterChart.js.map +1 -0
- package/dist/components/panels/StatPanel.d.ts +8 -0
- package/dist/components/panels/StatPanel.d.ts.map +1 -0
- package/dist/components/panels/StatPanel.js +40 -0
- package/dist/components/panels/StatPanel.js.map +1 -0
- package/dist/components/panels/StreamChart.d.ts +7 -0
- package/dist/components/panels/StreamChart.d.ts.map +1 -0
- package/dist/components/panels/StreamChart.js +54 -0
- package/dist/components/panels/StreamChart.js.map +1 -0
- package/dist/components/panels/SunburstChart.d.ts +7 -0
- package/dist/components/panels/SunburstChart.d.ts.map +1 -0
- package/dist/components/panels/SunburstChart.js +60 -0
- package/dist/components/panels/SunburstChart.js.map +1 -0
- package/dist/components/panels/TablePanel.d.ts +7 -0
- package/dist/components/panels/TablePanel.d.ts.map +1 -0
- package/dist/components/panels/TablePanel.js +79 -0
- package/dist/components/panels/TablePanel.js.map +1 -0
- package/dist/components/panels/TreemapChart.d.ts +7 -0
- package/dist/components/panels/TreemapChart.d.ts.map +1 -0
- package/dist/components/panels/TreemapChart.js +59 -0
- package/dist/components/panels/TreemapChart.js.map +1 -0
- package/dist/components/panels/VideoPanel.d.ts +15 -0
- package/dist/components/panels/VideoPanel.d.ts.map +1 -0
- package/dist/components/panels/VideoPanel.js +25 -0
- package/dist/components/panels/VideoPanel.js.map +1 -0
- package/dist/components/panels/WaffleChart.d.ts +7 -0
- package/dist/components/panels/WaffleChart.d.ts.map +1 -0
- package/dist/components/panels/WaffleChart.js +46 -0
- package/dist/components/panels/WaffleChart.js.map +1 -0
- package/dist/components/panels/index.d.ts +3 -0
- package/dist/components/panels/index.d.ts.map +1 -0
- package/dist/components/panels/index.js +60 -0
- package/dist/components/panels/index.js.map +1 -0
- package/dist/components/panels/nivo-theme.d.ts +95 -0
- package/dist/components/panels/nivo-theme.d.ts.map +1 -0
- package/dist/components/panels/nivo-theme.js +140 -0
- package/dist/components/panels/nivo-theme.js.map +1 -0
- package/dist/components/panels/semantic-colors.d.ts +7 -0
- package/dist/components/panels/semantic-colors.d.ts.map +1 -0
- package/dist/components/panels/semantic-colors.js +100 -0
- package/dist/components/panels/semantic-colors.js.map +1 -0
- package/dist/components/ui/Button.d.ts +9 -0
- package/dist/components/ui/Button.d.ts.map +1 -0
- package/dist/components/ui/Button.js +40 -0
- package/dist/components/ui/Button.js.map +1 -0
- package/dist/components/ui/Tabs.d.ts +11 -0
- package/dist/components/ui/Tabs.d.ts.map +1 -0
- package/dist/components/ui/Tabs.js +28 -0
- package/dist/components/ui/Tabs.js.map +1 -0
- package/dist/connectors/bigquery.d.ts +26 -0
- package/dist/connectors/bigquery.d.ts.map +1 -0
- package/dist/connectors/bigquery.js +113 -0
- package/dist/connectors/bigquery.js.map +1 -0
- package/dist/connectors/index.d.ts +17 -0
- package/dist/connectors/index.d.ts.map +1 -0
- package/dist/connectors/index.js +23 -0
- package/dist/connectors/index.js.map +1 -0
- package/dist/connectors/params.d.ts +15 -0
- package/dist/connectors/params.d.ts.map +1 -0
- package/dist/connectors/params.js +46 -0
- package/dist/connectors/params.js.map +1 -0
- package/dist/connectors/postgres.d.ts +29 -0
- package/dist/connectors/postgres.d.ts.map +1 -0
- package/dist/connectors/postgres.js +130 -0
- package/dist/connectors/postgres.js.map +1 -0
- package/dist/connectors/redshift-data.d.ts +25 -0
- package/dist/connectors/redshift-data.d.ts.map +1 -0
- package/dist/connectors/redshift-data.js +237 -0
- package/dist/connectors/redshift-data.js.map +1 -0
- package/dist/connectors/redshift.d.ts +29 -0
- package/dist/connectors/redshift.d.ts.map +1 -0
- package/dist/connectors/redshift.js +138 -0
- package/dist/connectors/redshift.js.map +1 -0
- package/dist/connectors/registry.d.ts +7 -0
- package/dist/connectors/registry.d.ts.map +1 -0
- package/dist/connectors/registry.js +30 -0
- package/dist/connectors/registry.js.map +1 -0
- package/dist/connectors/snowflake.d.ts +37 -0
- package/dist/connectors/snowflake.d.ts.map +1 -0
- package/dist/connectors/snowflake.js +181 -0
- package/dist/connectors/snowflake.js.map +1 -0
- package/dist/connectors/types.d.ts +41 -0
- package/dist/connectors/types.d.ts.map +1 -0
- package/dist/connectors/types.js +15 -0
- package/dist/connectors/types.js.map +1 -0
- package/dist/connectors/url-parsers.d.ts +13 -0
- package/dist/connectors/url-parsers.d.ts.map +1 -0
- package/dist/connectors/url-parsers.js +95 -0
- package/dist/connectors/url-parsers.js.map +1 -0
- package/dist/connectors/url.d.ts +36 -0
- package/dist/connectors/url.d.ts.map +1 -0
- package/dist/connectors/url.js +139 -0
- package/dist/connectors/url.js.map +1 -0
- package/dist/filters/cascade.d.ts +13 -0
- package/dist/filters/cascade.d.ts.map +1 -0
- package/dist/filters/cascade.js +32 -0
- package/dist/filters/cascade.js.map +1 -0
- package/dist/filters/daterange.d.ts +8 -0
- package/dist/filters/daterange.d.ts.map +1 -0
- package/dist/filters/daterange.js +119 -0
- package/dist/filters/daterange.js.map +1 -0
- package/dist/filters/index.d.ts +7 -0
- package/dist/filters/index.d.ts.map +1 -0
- package/dist/filters/index.js +18 -0
- package/dist/filters/index.js.map +1 -0
- package/dist/filters/resolver.d.ts +3 -0
- package/dist/filters/resolver.d.ts.map +1 -0
- package/dist/filters/resolver.js +122 -0
- package/dist/filters/resolver.js.map +1 -0
- package/dist/filters/validation.d.ts +17 -0
- package/dist/filters/validation.d.ts.map +1 -0
- package/dist/filters/validation.js +84 -0
- package/dist/filters/validation.js.map +1 -0
- package/dist/formats.d.ts +4 -0
- package/dist/formats.d.ts.map +1 -0
- package/dist/formats.js +127 -0
- package/dist/formats.js.map +1 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +37 -0
- package/dist/index.js.map +1 -0
- package/dist/interfaces/auth-provider.d.ts +22 -0
- package/dist/interfaces/auth-provider.d.ts.map +1 -0
- package/dist/interfaces/auth-provider.js +15 -0
- package/dist/interfaces/auth-provider.js.map +1 -0
- package/dist/interfaces/dashboard-store.d.ts +17 -0
- package/dist/interfaces/dashboard-store.d.ts.map +1 -0
- package/dist/interfaces/dashboard-store.js +15 -0
- package/dist/interfaces/dashboard-store.js.map +1 -0
- package/dist/interfaces/datasource-store.d.ts +6 -0
- package/dist/interfaces/datasource-store.d.ts.map +1 -0
- package/dist/interfaces/datasource-store.js +15 -0
- package/dist/interfaces/datasource-store.js.map +1 -0
- package/dist/interfaces/index.d.ts +4 -0
- package/dist/interfaces/index.d.ts.map +1 -0
- package/dist/interfaces/index.js +15 -0
- package/dist/interfaces/index.js.map +1 -0
- package/dist/locale/context.d.ts +6 -0
- package/dist/locale/context.d.ts.map +1 -0
- package/dist/locale/context.js +23 -0
- package/dist/locale/context.js.map +1 -0
- package/dist/locale/index.d.ts +2 -0
- package/dist/locale/index.d.ts.map +1 -0
- package/dist/locale/index.js +15 -0
- package/dist/locale/index.js.map +1 -0
- package/dist/query/array-expansion.d.ts +5 -0
- package/dist/query/array-expansion.d.ts.map +1 -0
- package/dist/query/array-expansion.js +39 -0
- package/dist/query/array-expansion.js.map +1 -0
- package/dist/query/index.d.ts +8 -0
- package/dist/query/index.d.ts.map +1 -0
- package/dist/query/index.js +20 -0
- package/dist/query/index.js.map +1 -0
- package/dist/query/pipeline.d.ts +27 -0
- package/dist/query/pipeline.d.ts.map +1 -0
- package/dist/query/pipeline.js +49 -0
- package/dist/query/pipeline.js.map +1 -0
- package/dist/query/strategy/http.d.ts +7 -0
- package/dist/query/strategy/http.d.ts.map +1 -0
- package/dist/query/strategy/http.js +26 -0
- package/dist/query/strategy/http.js.map +1 -0
- package/dist/query/strategy/index.d.ts +4 -0
- package/dist/query/strategy/index.d.ts.map +1 -0
- package/dist/query/strategy/index.js +32 -0
- package/dist/query/strategy/index.js.map +1 -0
- package/dist/query/strategy/sql.d.ts +7 -0
- package/dist/query/strategy/sql.d.ts.map +1 -0
- package/dist/query/strategy/sql.js +40 -0
- package/dist/query/strategy/sql.js.map +1 -0
- package/dist/query/strategy/types.d.ts +6 -0
- package/dist/query/strategy/types.d.ts.map +1 -0
- package/dist/query/strategy/types.js +15 -0
- package/dist/query/strategy/types.js.map +1 -0
- package/dist/query/template.d.ts +7 -0
- package/dist/query/template.d.ts.map +1 -0
- package/dist/query/template.js +36 -0
- package/dist/query/template.js.map +1 -0
- package/dist/schemas/config.d.ts +74 -0
- package/dist/schemas/config.d.ts.map +1 -0
- package/dist/schemas/config.js +129 -0
- package/dist/schemas/config.js.map +1 -0
- package/dist/schemas/dashboard.d.ts +716 -0
- package/dist/schemas/dashboard.d.ts.map +1 -0
- package/dist/schemas/dashboard.js +314 -0
- package/dist/schemas/dashboard.js.map +1 -0
- package/dist/schemas/datasource.d.ts +252 -0
- package/dist/schemas/datasource.d.ts.map +1 -0
- package/dist/schemas/datasource.js +186 -0
- package/dist/schemas/datasource.js.map +1 -0
- package/dist/schemas/index.d.ts +5 -0
- package/dist/schemas/index.d.ts.map +1 -0
- package/dist/schemas/index.js +18 -0
- package/dist/schemas/index.js.map +1 -0
- package/dist/schemas/theme.d.ts +36 -0
- package/dist/schemas/theme.d.ts.map +1 -0
- package/dist/schemas/theme.js +48 -0
- package/dist/schemas/theme.js.map +1 -0
- package/dist/startup/index.d.ts +3 -0
- package/dist/startup/index.d.ts.map +1 -0
- package/dist/startup/index.js +15 -0
- package/dist/startup/index.js.map +1 -0
- package/dist/startup/sql-lint.d.ts +13 -0
- package/dist/startup/sql-lint.d.ts.map +1 -0
- package/dist/startup/sql-lint.js +86 -0
- package/dist/startup/sql-lint.js.map +1 -0
- package/dist/theme/builtin.d.ts +5 -0
- package/dist/theme/builtin.d.ts.map +1 -0
- package/dist/theme/builtin.js +102 -0
- package/dist/theme/builtin.js.map +1 -0
- package/dist/theme/context.d.ts +7 -0
- package/dist/theme/context.d.ts.map +1 -0
- package/dist/theme/context.js +26 -0
- package/dist/theme/context.js.map +1 -0
- package/dist/theme/index.d.ts +3 -0
- package/dist/theme/index.d.ts.map +1 -0
- package/dist/theme/index.js +16 -0
- package/dist/theme/index.js.map +1 -0
- package/dist/theme/loader-export.d.ts +2 -0
- package/dist/theme/loader-export.d.ts.map +1 -0
- package/dist/theme/loader-export.js +15 -0
- package/dist/theme/loader-export.js.map +1 -0
- package/dist/theme/loader.d.ts +11 -0
- package/dist/theme/loader.d.ts.map +1 -0
- package/dist/theme/loader.js +60 -0
- package/dist/theme/loader.js.map +1 -0
- package/package.json +148 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export interface AuthProvider {
|
|
2
|
+
getCurrentUser(request: Request): Promise<User | null>;
|
|
3
|
+
checkAccess(user: User | null, dashboard: {
|
|
4
|
+
access?: DashboardAccess;
|
|
5
|
+
}): boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface User {
|
|
8
|
+
sub: string;
|
|
9
|
+
name: string;
|
|
10
|
+
roles: string[];
|
|
11
|
+
ctx?: Record<string, unknown>;
|
|
12
|
+
}
|
|
13
|
+
export interface DashboardAccess {
|
|
14
|
+
public?: boolean;
|
|
15
|
+
roles?: string[];
|
|
16
|
+
users?: string[];
|
|
17
|
+
context?: {
|
|
18
|
+
claim: string;
|
|
19
|
+
values: string[];
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=auth-provider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth-provider.d.ts","sourceRoot":"","sources":["../../src/interfaces/auth-provider.ts"],"names":[],"mappings":"AAcA,MAAM,WAAW,YAAY;IAC3B,cAAc,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC;IACvD,WAAW,CACT,IAAI,EAAE,IAAI,GAAG,IAAI,EACjB,SAAS,EAAE;QAAE,MAAM,CAAC,EAAE,eAAe,CAAA;KAAE,GACtC,OAAO,CAAC;CACZ;AAED,MAAM,WAAW,IAAI;IACnB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC/B;AAED,MAAM,WAAW,eAAe;IAC9B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,OAAO,CAAC,EAAE;QACR,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,MAAM,EAAE,CAAC;KAClB,CAAC;CACH"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// Copyright 2026 Mataki Labs LLC
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Business Source License 1.1 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// https://github.com/panoboard/panoboard/blob/main/LICENSE
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=auth-provider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth-provider.js","sourceRoot":"","sources":["../../src/interfaces/auth-provider.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,+DAA+D;AAC/D,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Dashboard } from "../schemas/dashboard";
|
|
2
|
+
export interface DashboardStore {
|
|
3
|
+
list(workspaceId: string): Promise<DashboardSummary[]>;
|
|
4
|
+
get(workspaceId: string, slug: string): Promise<DashboardWithSlug | null>;
|
|
5
|
+
save(workspaceId: string, slug: string, dashboard: Dashboard): Promise<void>;
|
|
6
|
+
delete(workspaceId: string, slug: string): Promise<void>;
|
|
7
|
+
}
|
|
8
|
+
export interface DashboardSummary {
|
|
9
|
+
slug: string;
|
|
10
|
+
title: string;
|
|
11
|
+
description?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface DashboardWithSlug {
|
|
14
|
+
slug: string;
|
|
15
|
+
dashboard: Dashboard;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=dashboard-store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dashboard-store.d.ts","sourceRoot":"","sources":["../../src/interfaces/dashboard-store.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEtD,MAAM,WAAW,cAAc;IAC7B,IAAI,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAAC;IACvD,GAAG,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAAC;IAC1E,IAAI,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7E,MAAM,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC1D;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,SAAS,CAAC;CACtB"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// Copyright 2026 Mataki Labs LLC
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Business Source License 1.1 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// https://github.com/panoboard/panoboard/blob/main/LICENSE
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=dashboard-store.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dashboard-store.js","sourceRoot":"","sources":["../../src/interfaces/dashboard-store.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,+DAA+D;AAC/D,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { DatasourceDefinition } from "../schemas/datasource";
|
|
2
|
+
export interface DatasourceStore {
|
|
3
|
+
list(workspaceId: string): Promise<DatasourceDefinition[]>;
|
|
4
|
+
get(workspaceId: string, id: string): Promise<DatasourceDefinition | null>;
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=datasource-store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"datasource-store.d.ts","sourceRoot":"","sources":["../../src/interfaces/datasource-store.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAElE,MAAM,WAAW,eAAe;IAC9B,IAAI,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,oBAAoB,EAAE,CAAC,CAAC;IAC3D,GAAG,CAAC,WAAW,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC,CAAC;CAC5E"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// Copyright 2026 Mataki Labs LLC
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Business Source License 1.1 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// https://github.com/panoboard/panoboard/blob/main/LICENSE
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=datasource-store.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"datasource-store.js","sourceRoot":"","sources":["../../src/interfaces/datasource-store.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,+DAA+D;AAC/D,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":"AAcA,YAAY,EACV,cAAc,EACd,gBAAgB,EAChB,iBAAiB,GAClB,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAC1D,YAAY,EAAE,YAAY,EAAE,IAAI,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// Copyright 2026 Mataki Labs LLC
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Business Source License 1.1 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// https://github.com/panoboard/panoboard/blob/main/LICENSE
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,+DAA+D;AAC/D,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/locale/context.tsx"],"names":[],"mappings":"AAkBA,wBAAgB,cAAc,CAAC,EAC7B,MAAM,EACN,QAAQ,GACT,EAAE;IACD,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,2CAIA;AAED,wBAAgB,SAAS,IAAI,MAAM,CAElC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
// Copyright 2026 Mataki Labs LLC
|
|
3
|
+
//
|
|
4
|
+
// Licensed under the Business Source License 1.1 (the "License");
|
|
5
|
+
// you may not use this file except in compliance with the License.
|
|
6
|
+
// You may obtain a copy of the License at
|
|
7
|
+
//
|
|
8
|
+
// https://github.com/panoboard/panoboard/blob/main/LICENSE
|
|
9
|
+
//
|
|
10
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
// See the License for the specific language governing permissions and
|
|
14
|
+
// limitations under the License.
|
|
15
|
+
import { createContext, useContext } from "react";
|
|
16
|
+
const LocaleContext = createContext("en-US");
|
|
17
|
+
export function LocaleProvider({ locale, children, }) {
|
|
18
|
+
return (_jsx(LocaleContext.Provider, { value: locale, children: children }));
|
|
19
|
+
}
|
|
20
|
+
export function useLocale() {
|
|
21
|
+
return useContext(LocaleContext);
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../src/locale/context.tsx"],"names":[],"mappings":";AAAA,iCAAiC;AACjC,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,+DAA+D;AAC/D,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAElD,MAAM,aAAa,GAAG,aAAa,CAAS,OAAO,CAAC,CAAC;AAErD,MAAM,UAAU,cAAc,CAAC,EAC7B,MAAM,EACN,QAAQ,GAIT;IACC,OAAO,CACL,KAAC,aAAa,CAAC,QAAQ,IAAC,KAAK,EAAE,MAAM,YAAG,QAAQ,GAA0B,CAC3E,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,SAAS;IACvB,OAAO,UAAU,CAAC,aAAa,CAAC,CAAC;AACnC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/locale/index.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// Copyright 2026 Mataki Labs LLC
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Business Source License 1.1 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// https://github.com/panoboard/panoboard/blob/main/LICENSE
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
export { LocaleProvider, useLocale } from "./context";
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/locale/index.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,+DAA+D;AAC/D,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"array-expansion.d.ts","sourceRoot":"","sources":["../../src/query/array-expansion.ts"],"names":[],"mappings":"AAgBA,wBAAgB,iBAAiB,CAC/B,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC9B;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,CA6BlD"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
// Copyright 2026 Mataki Labs LLC
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Business Source License 1.1 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// https://github.com/panoboard/panoboard/blob/main/LICENSE
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
// packages/core/src/query/array-expansion.ts
|
|
15
|
+
export function expandArrayParams(sql, params) {
|
|
16
|
+
const expandedParams = {};
|
|
17
|
+
let expandedSql = sql;
|
|
18
|
+
for (const [name, value] of Object.entries(params)) {
|
|
19
|
+
if (Array.isArray(value)) {
|
|
20
|
+
if (value.length === 0) {
|
|
21
|
+
// Empty array -> replace IN (:name) with IN (SELECT NULL WHERE 1=0)
|
|
22
|
+
expandedSql = expandedSql.replace(new RegExp(`IN\\s*\\(\\s*:${name}\\b\\s*\\)`, "gi"), "IN (SELECT NULL WHERE 1=0)");
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
// Expand :regions -> :regions_0, :regions_1, :regions_2
|
|
26
|
+
const expandedNames = value.map((_, i) => `:${name}_${i}`);
|
|
27
|
+
expandedSql = expandedSql.replace(new RegExp(`:${name}\\b`, "g"), expandedNames.join(", "));
|
|
28
|
+
value.forEach((v, i) => {
|
|
29
|
+
expandedParams[`${name}_${i}`] = v;
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
expandedParams[name] = value;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return { sql: expandedSql, params: expandedParams };
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=array-expansion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"array-expansion.js","sourceRoot":"","sources":["../../src/query/array-expansion.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,+DAA+D;AAC/D,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,6CAA6C;AAE7C,MAAM,UAAU,iBAAiB,CAC/B,GAAW,EACX,MAA+B;IAE/B,MAAM,cAAc,GAA4B,EAAE,CAAC;IACnD,IAAI,WAAW,GAAG,GAAG,CAAC;IAEtB,KAAK,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;QACnD,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;YACzB,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBACvB,oEAAoE;gBACpE,WAAW,GAAG,WAAW,CAAC,OAAO,CAC/B,IAAI,MAAM,CAAC,iBAAiB,IAAI,YAAY,EAAE,IAAI,CAAC,EACnD,4BAA4B,CAC7B,CAAC;YACJ,CAAC;iBAAM,CAAC;gBACN,wDAAwD;gBACxD,MAAM,aAAa,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,IAAI,IAAI,IAAI,CAAC,EAAE,CAAC,CAAC;gBAC3D,WAAW,GAAG,WAAW,CAAC,OAAO,CAC/B,IAAI,MAAM,CAAC,IAAI,IAAI,KAAK,EAAE,GAAG,CAAC,EAC9B,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CACzB,CAAC;gBACF,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;oBACrB,cAAc,CAAC,GAAG,IAAI,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;gBACrC,CAAC,CAAC,CAAC;YACL,CAAC;QACH,CAAC;aAAM,CAAC;YACN,cAAc,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC;QAC/B,CAAC;IACH,CAAC;IAED,OAAO,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC;AACtD,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { executePanelQuery, type PanelQuery } from "./pipeline";
|
|
2
|
+
export { renderTemplate, type TemplateVar } from "./template";
|
|
3
|
+
export { expandArrayParams } from "./array-expansion";
|
|
4
|
+
export { getStrategy } from "./strategy";
|
|
5
|
+
export type { QueryStrategy } from "./strategy/types";
|
|
6
|
+
export { SqlStrategy } from "./strategy/sql";
|
|
7
|
+
export { HttpStrategy } from "./strategy/http";
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/query/index.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,iBAAiB,EAAE,KAAK,UAAU,EAAE,MAAM,YAAY,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,KAAK,WAAW,EAAE,MAAM,YAAY,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,YAAY,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// Copyright 2026 Mataki Labs LLC
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Business Source License 1.1 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// https://github.com/panoboard/panoboard/blob/main/LICENSE
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
export { executePanelQuery } from "./pipeline";
|
|
15
|
+
export { renderTemplate } from "./template";
|
|
16
|
+
export { expandArrayParams } from "./array-expansion";
|
|
17
|
+
export { getStrategy } from "./strategy";
|
|
18
|
+
export { SqlStrategy } from "./strategy/sql";
|
|
19
|
+
export { HttpStrategy } from "./strategy/http";
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/query/index.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,+DAA+D;AAC/D,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,OAAO,EAAE,iBAAiB,EAAmB,MAAM,YAAY,CAAC;AAChE,OAAO,EAAE,cAAc,EAAoB,MAAM,YAAY,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { Connector, QueryResult } from "../connectors/types";
|
|
2
|
+
export interface PanelQuery {
|
|
3
|
+
sql?: string;
|
|
4
|
+
path?: string;
|
|
5
|
+
params?: Record<string, {
|
|
6
|
+
filter?: string;
|
|
7
|
+
ctx?: string;
|
|
8
|
+
format?: string;
|
|
9
|
+
}>;
|
|
10
|
+
template_vars?: Record<string, {
|
|
11
|
+
allowlist: string[];
|
|
12
|
+
from_filter?: string;
|
|
13
|
+
value?: string;
|
|
14
|
+
}>;
|
|
15
|
+
columns?: {
|
|
16
|
+
name: string;
|
|
17
|
+
type: string;
|
|
18
|
+
nullable?: boolean;
|
|
19
|
+
}[];
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Orchestrates query execution via the appropriate strategy:
|
|
23
|
+
* - SQL datasources: template rendering -> array expansion -> connector.query()
|
|
24
|
+
* - URL datasources: path + params -> connector.query()
|
|
25
|
+
*/
|
|
26
|
+
export declare function executePanelQuery(query: PanelQuery, resolvedParams: Record<string, unknown>, connector: Connector): Promise<QueryResult>;
|
|
27
|
+
//# sourceMappingURL=pipeline.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pipeline.d.ts","sourceRoot":"","sources":["../../src/query/pipeline.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EACV,SAAS,EACT,WAAW,EAGZ,MAAM,qBAAqB,CAAC;AAI7B,MAAM,WAAW,UAAU;IACzB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC5E,aAAa,CAAC,EAAE,MAAM,CACpB,MAAM,EACN;QAAE,SAAS,EAAE,MAAM,EAAE,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAC9D,CAAC;IACF,OAAO,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE,EAAE,CAAC;CAChE;AAED;;;;GAIG;AACH,wBAAsB,iBAAiB,CACrC,KAAK,EAAE,UAAU,EACjB,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACvC,SAAS,EAAE,SAAS,GACnB,OAAO,CAAC,WAAW,CAAC,CAmCtB"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
// Copyright 2026 Mataki Labs LLC
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Business Source License 1.1 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// https://github.com/panoboard/panoboard/blob/main/LICENSE
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
import { getStrategy } from "./strategy";
|
|
15
|
+
const SORT_DIRECTION_ALLOWLIST = new Set(["ASC", "DESC", "asc", "desc"]);
|
|
16
|
+
/**
|
|
17
|
+
* Orchestrates query execution via the appropriate strategy:
|
|
18
|
+
* - SQL datasources: template rendering -> array expansion -> connector.query()
|
|
19
|
+
* - URL datasources: path + params -> connector.query()
|
|
20
|
+
*/
|
|
21
|
+
export async function executePanelQuery(query, resolvedParams, connector) {
|
|
22
|
+
// 0. Validate format-constrained param bindings (e.g. format: "sort_direction")
|
|
23
|
+
for (const [paramName, binding] of Object.entries(query.params ?? {})) {
|
|
24
|
+
if (binding.format === "sort_direction") {
|
|
25
|
+
const value = resolvedParams[paramName];
|
|
26
|
+
if (value !== undefined && value !== null) {
|
|
27
|
+
if (!SORT_DIRECTION_ALLOWLIST.has(String(value))) {
|
|
28
|
+
throw new Error(`Invalid sort_direction value "${value}" for param "${paramName}". Must be one of: ASC, DESC, asc, desc`);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
const strategy = getStrategy(connector.type);
|
|
34
|
+
const request = strategy.prepare(query, resolvedParams);
|
|
35
|
+
// For URL queries, pass panel-level columns via options so the connector can use them for parsing
|
|
36
|
+
const options = query.columns
|
|
37
|
+
? {
|
|
38
|
+
panelColumns: query.columns.map((c) => ({
|
|
39
|
+
name: c.name,
|
|
40
|
+
type: (c.type === "integer"
|
|
41
|
+
? "number"
|
|
42
|
+
: c.type),
|
|
43
|
+
nullable: c.nullable ?? true,
|
|
44
|
+
})),
|
|
45
|
+
}
|
|
46
|
+
: undefined;
|
|
47
|
+
return strategy.execute(connector, request, options);
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=pipeline.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pipeline.js","sourceRoot":"","sources":["../../src/query/pipeline.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,+DAA+D;AAC/D,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAQzC,MAAM,wBAAwB,GAAG,IAAI,GAAG,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC;AAazE;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACrC,KAAiB,EACjB,cAAuC,EACvC,SAAoB;IAEpB,gFAAgF;IAChF,KAAK,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,IAAI,EAAE,CAAC,EAAE,CAAC;QACtE,IAAI,OAAO,CAAC,MAAM,KAAK,gBAAgB,EAAE,CAAC;YACxC,MAAM,KAAK,GAAG,cAAc,CAAC,SAAS,CAAC,CAAC;YACxC,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;gBAC1C,IAAI,CAAC,wBAAwB,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC;oBACjD,MAAM,IAAI,KAAK,CACb,iCAAiC,KAAK,gBAAgB,SAAS,yCAAyC,CACzG,CAAC;gBACJ,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;IAED,MAAM,QAAQ,GAAG,WAAW,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IAC7C,MAAM,OAAO,GAAG,QAAQ,CAAC,OAAO,CAC9B,KAAgC,EAChC,cAAc,CACf,CAAC;IAEF,kGAAkG;IAClG,MAAM,OAAO,GAA6B,KAAK,CAAC,OAAO;QACrD,CAAC,CAAC;YACE,YAAY,EAAE,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;gBACtC,IAAI,EAAE,CAAC,CAAC,IAAI;gBACZ,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,SAAS;oBACzB,CAAC,CAAC,QAAQ;oBACV,CAAC,CAAC,CAAC,CAAC,IAAI,CAAuB;gBACjC,QAAQ,EAAE,CAAC,CAAC,QAAQ,IAAI,IAAI;aAC7B,CAAC,CAAC;SACJ;QACH,CAAC,CAAC,SAAS,CAAC;IAEd,OAAO,QAAQ,CAAC,OAAO,CAAC,SAAS,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;AACvD,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { QueryStrategy } from "./types";
|
|
2
|
+
import type { QueryRequest, Connector, QueryResult, QueryOptions } from "../../connectors/types";
|
|
3
|
+
export declare class HttpStrategy implements QueryStrategy {
|
|
4
|
+
prepare(query: Record<string, unknown>, resolvedParams: Record<string, unknown>): QueryRequest;
|
|
5
|
+
execute(connector: Connector, request: QueryRequest, options?: QueryOptions): Promise<QueryResult>;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=http.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../../src/query/strategy/http.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,KAAK,EACV,YAAY,EACZ,SAAS,EACT,WAAW,EACX,YAAY,EACb,MAAM,wBAAwB,CAAC;AAEhC,qBAAa,YAAa,YAAW,aAAa;IAChD,OAAO,CACL,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC9B,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACtC,YAAY;IAUT,OAAO,CACX,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,YAAY,EACrB,OAAO,CAAC,EAAE,YAAY,GACrB,OAAO,CAAC,WAAW,CAAC;CAGxB"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// Copyright 2026 Mataki Labs LLC
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Business Source License 1.1 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// https://github.com/panoboard/panoboard/blob/main/LICENSE
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
export class HttpStrategy {
|
|
15
|
+
prepare(query, resolvedParams) {
|
|
16
|
+
const path = query.path;
|
|
17
|
+
if (!path) {
|
|
18
|
+
throw new Error("HttpStrategy requires a 'path' field in the query definition");
|
|
19
|
+
}
|
|
20
|
+
return { type: "http", path, params: { ...resolvedParams } };
|
|
21
|
+
}
|
|
22
|
+
async execute(connector, request, options) {
|
|
23
|
+
return connector.query(request, options);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=http.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http.js","sourceRoot":"","sources":["../../../src/query/strategy/http.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,+DAA+D;AAC/D,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAUjC,MAAM,OAAO,YAAY;IACvB,OAAO,CACL,KAA8B,EAC9B,cAAuC;QAEvC,MAAM,IAAI,GAAG,KAAK,CAAC,IAA0B,CAAC;QAC9C,IAAI,CAAC,IAAI,EAAE,CAAC;YACV,MAAM,IAAI,KAAK,CACb,8DAA8D,CAC/D,CAAC;QACJ,CAAC;QACD,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,cAAc,EAAE,EAAE,CAAC;IAC/D,CAAC;IAED,KAAK,CAAC,OAAO,CACX,SAAoB,EACpB,OAAqB,EACrB,OAAsB;QAEtB,OAAO,SAAS,CAAC,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAC3C,CAAC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/query/strategy/index.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAO7C,wBAAgB,WAAW,CAAC,IAAI,EAAE,cAAc,GAAG,aAAa,CAa/D"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// Copyright 2026 Mataki Labs LLC
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Business Source License 1.1 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// https://github.com/panoboard/panoboard/blob/main/LICENSE
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
import { SqlStrategy } from "./sql";
|
|
15
|
+
import { HttpStrategy } from "./http";
|
|
16
|
+
const sqlStrategy = new SqlStrategy();
|
|
17
|
+
const httpStrategy = new HttpStrategy();
|
|
18
|
+
export function getStrategy(type) {
|
|
19
|
+
switch (type) {
|
|
20
|
+
case "postgres":
|
|
21
|
+
case "bigquery":
|
|
22
|
+
case "redshift":
|
|
23
|
+
case "redshift-data":
|
|
24
|
+
case "snowflake":
|
|
25
|
+
return sqlStrategy;
|
|
26
|
+
case "url":
|
|
27
|
+
return httpStrategy;
|
|
28
|
+
default:
|
|
29
|
+
throw new Error(`No strategy for datasource type: ${type}`);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/query/strategy/index.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,+DAA+D;AAC/D,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAIjC,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAEtC,MAAM,WAAW,GAAG,IAAI,WAAW,EAAE,CAAC;AACtC,MAAM,YAAY,GAAG,IAAI,YAAY,EAAE,CAAC;AAExC,MAAM,UAAU,WAAW,CAAC,IAAoB;IAC9C,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,UAAU,CAAC;QAChB,KAAK,UAAU,CAAC;QAChB,KAAK,UAAU,CAAC;QAChB,KAAK,eAAe,CAAC;QACrB,KAAK,WAAW;YACd,OAAO,WAAW,CAAC;QACrB,KAAK,KAAK;YACR,OAAO,YAAY,CAAC;QACtB;YACE,MAAM,IAAI,KAAK,CAAC,oCAAoC,IAAI,EAAE,CAAC,CAAC;IAChE,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { QueryStrategy } from "./types";
|
|
2
|
+
import type { QueryRequest, Connector, QueryResult, QueryOptions } from "../../connectors/types";
|
|
3
|
+
export declare class SqlStrategy implements QueryStrategy {
|
|
4
|
+
prepare(query: Record<string, unknown>, resolvedParams: Record<string, unknown>): QueryRequest;
|
|
5
|
+
execute(connector: Connector, request: QueryRequest, options?: QueryOptions): Promise<QueryResult>;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=sql.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sql.d.ts","sourceRoot":"","sources":["../../../src/query/strategy/sql.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,KAAK,EACV,YAAY,EACZ,SAAS,EACT,WAAW,EACX,YAAY,EACb,MAAM,wBAAwB,CAAC;AAIhC,qBAAa,WAAY,YAAW,aAAa;IAC/C,OAAO,CACL,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC9B,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACtC,YAAY;IAgCT,OAAO,CACX,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,YAAY,EACrB,OAAO,CAAC,EAAE,YAAY,GACrB,OAAO,CAAC,WAAW,CAAC;CAGxB"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// Copyright 2026 Mataki Labs LLC
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Business Source License 1.1 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// https://github.com/panoboard/panoboard/blob/main/LICENSE
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
import { renderTemplate } from "../template";
|
|
15
|
+
import { expandArrayParams } from "../array-expansion";
|
|
16
|
+
export class SqlStrategy {
|
|
17
|
+
prepare(query, resolvedParams) {
|
|
18
|
+
const sql = query.sql;
|
|
19
|
+
if (!sql) {
|
|
20
|
+
throw new Error("SqlStrategy requires a 'sql' field in the query definition");
|
|
21
|
+
}
|
|
22
|
+
const templateVars = (query.template_vars ?? {});
|
|
23
|
+
const resolvedVarValues = {};
|
|
24
|
+
for (const [name, def] of Object.entries(templateVars)) {
|
|
25
|
+
if (def.from_filter && resolvedParams[def.from_filter] !== undefined) {
|
|
26
|
+
resolvedVarValues[name] = String(resolvedParams[def.from_filter]);
|
|
27
|
+
}
|
|
28
|
+
else if (def.value) {
|
|
29
|
+
resolvedVarValues[name] = def.value;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
const renderedSql = renderTemplate(sql, templateVars, resolvedVarValues, resolvedParams);
|
|
33
|
+
const expanded = expandArrayParams(renderedSql, resolvedParams);
|
|
34
|
+
return { type: "sql", sql: expanded.sql, params: expanded.params };
|
|
35
|
+
}
|
|
36
|
+
async execute(connector, request, options) {
|
|
37
|
+
return connector.query(request, options);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=sql.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sql.js","sourceRoot":"","sources":["../../../src/query/strategy/sql.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,+DAA+D;AAC/D,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AASjC,OAAO,EAAE,cAAc,EAAoB,MAAM,aAAa,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEvD,MAAM,OAAO,WAAW;IACtB,OAAO,CACL,KAA8B,EAC9B,cAAuC;QAEvC,MAAM,GAAG,GAAG,KAAK,CAAC,GAAyB,CAAC;QAC5C,IAAI,CAAC,GAAG,EAAE,CAAC;YACT,MAAM,IAAI,KAAK,CACb,4DAA4D,CAC7D,CAAC;QACJ,CAAC;QACD,MAAM,YAAY,GAAG,CAAC,KAAK,CAAC,aAAa,IAAI,EAAE,CAG9C,CAAC;QAEF,MAAM,iBAAiB,GAA2B,EAAE,CAAC;QACrD,KAAK,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,CAAC;YACvD,IAAI,GAAG,CAAC,WAAW,IAAI,cAAc,CAAC,GAAG,CAAC,WAAW,CAAC,KAAK,SAAS,EAAE,CAAC;gBACrE,iBAAiB,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,cAAc,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC;YACpE,CAAC;iBAAM,IAAI,GAAG,CAAC,KAAK,EAAE,CAAC;gBACrB,iBAAiB,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC,KAAK,CAAC;YACtC,CAAC;QACH,CAAC;QAED,MAAM,WAAW,GAAG,cAAc,CAChC,GAAG,EACH,YAAY,EACZ,iBAAiB,EACjB,cAAc,CACf,CAAC;QACF,MAAM,QAAQ,GAAG,iBAAiB,CAAC,WAAW,EAAE,cAAc,CAAC,CAAC;QAEhE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,MAAM,EAAE,CAAC;IACrE,CAAC;IAED,KAAK,CAAC,OAAO,CACX,SAAoB,EACpB,OAAqB,EACrB,OAAsB;QAEtB,OAAO,SAAS,CAAC,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAC3C,CAAC;CACF"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { QueryRequest, Connector, QueryResult, QueryOptions } from "../../connectors/types";
|
|
2
|
+
export interface QueryStrategy {
|
|
3
|
+
prepare(query: Record<string, unknown>, resolvedParams: Record<string, unknown>): QueryRequest;
|
|
4
|
+
execute(connector: Connector, request: QueryRequest, options?: QueryOptions): Promise<QueryResult>;
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/query/strategy/types.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EACV,YAAY,EACZ,SAAS,EACT,WAAW,EACX,YAAY,EACb,MAAM,wBAAwB,CAAC;AAEhC,MAAM,WAAW,aAAa;IAC5B,OAAO,CACL,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC9B,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACtC,YAAY,CAAC;IAChB,OAAO,CACL,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,YAAY,EACrB,OAAO,CAAC,EAAE,YAAY,GACrB,OAAO,CAAC,WAAW,CAAC,CAAC;CACzB"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// Copyright 2026 Mataki Labs LLC
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Business Source License 1.1 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// https://github.com/panoboard/panoboard/blob/main/LICENSE
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/query/strategy/types.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,+DAA+D;AAC/D,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export interface TemplateVar {
|
|
2
|
+
allowlist: string[];
|
|
3
|
+
from_filter?: string;
|
|
4
|
+
value?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function renderTemplate(sql: string, templateVars: Record<string, TemplateVar>, resolvedVarValues: Record<string, string>, params: Record<string, unknown>): string;
|
|
7
|
+
//# sourceMappingURL=template.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"template.d.ts","sourceRoot":"","sources":["../../src/query/template.ts"],"names":[],"mappings":"AAkBA,MAAM,WAAW,WAAW;IAC1B,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,cAAc,CAC5B,GAAG,EAAE,MAAM,EACX,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,EACzC,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EACzC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC9B,MAAM,CAuBR"}
|