@lightdash/common 0.2104.7 → 0.2104.8
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/cjs/.tsbuildinfo +1 -0
- package/dist/cjs/authorization/index.d.ts +1 -4
- package/dist/cjs/authorization/index.d.ts.map +1 -1
- package/dist/cjs/authorization/index.js +0 -4
- package/dist/cjs/authorization/index.js.map +1 -1
- package/dist/cjs/ee/AiAgent/chartConfig/web/getWebAiChartConfig.d.ts +8 -8
- package/dist/cjs/ee/AiAgent/index.d.ts +2 -2
- package/dist/cjs/ee/AiAgent/schemas/parser.d.ts +24 -24
- package/dist/cjs/ee/AiAgent/schemas/tools/toolDashboardV2Args.d.ts +96 -96
- package/dist/cjs/ee/AiAgent/schemas/tools/toolRunQueryArgs.d.ts +48 -48
- package/dist/cjs/ee/AiAgent/utils.d.ts +8 -8
- package/dist/cjs/index.d.ts +23 -449
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +21 -55
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/pivot/index.d.ts +1 -0
- package/dist/cjs/pivot/index.d.ts.map +1 -1
- package/dist/cjs/pivot/index.js +1 -0
- package/dist/cjs/pivot/index.js.map +1 -1
- package/dist/cjs/pivot/pivotConfig.d.ts +7 -0
- package/dist/cjs/pivot/pivotConfig.d.ts.map +1 -0
- package/dist/cjs/pivot/pivotConfig.js +32 -0
- package/dist/cjs/pivot/pivotConfig.js.map +1 -0
- package/dist/cjs/types/api.d.ts +447 -0
- package/dist/cjs/types/api.d.ts.map +1 -1
- package/dist/cjs/types/api.js +50 -1
- package/dist/cjs/types/api.js.map +1 -1
- package/dist/cjs/types/auth.d.ts +2 -1
- package/dist/cjs/types/auth.d.ts.map +1 -1
- package/dist/cjs/types/auth.js +4 -4
- package/dist/cjs/types/auth.js.map +1 -1
- package/dist/cjs/types/changeset.d.ts +10 -10
- package/dist/cjs/types/pivot.d.ts +0 -2
- package/dist/cjs/types/pivot.d.ts.map +1 -1
- package/dist/cjs/types/pivot.js +0 -29
- package/dist/cjs/types/pivot.js.map +1 -1
- package/dist/cjs/types/resourceViewItem.d.ts +1 -1
- package/dist/esm/.tsbuildinfo +1 -0
- package/dist/esm/authorization/index.d.ts +1 -4
- package/dist/esm/authorization/index.d.ts.map +1 -1
- package/dist/esm/authorization/index.js +0 -4
- package/dist/esm/authorization/index.js.map +1 -1
- package/dist/esm/ee/AiAgent/chartConfig/web/getWebAiChartConfig.d.ts +8 -8
- package/dist/esm/ee/AiAgent/index.d.ts +2 -2
- package/dist/esm/ee/AiAgent/schemas/parser.d.ts +24 -24
- package/dist/esm/ee/AiAgent/schemas/tools/toolDashboardV2Args.d.ts +96 -96
- package/dist/esm/ee/AiAgent/schemas/tools/toolRunQueryArgs.d.ts +48 -48
- package/dist/esm/ee/AiAgent/utils.d.ts +8 -8
- package/dist/esm/index.d.ts +23 -449
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +16 -50
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/pivot/index.d.ts +1 -0
- package/dist/esm/pivot/index.d.ts.map +1 -1
- package/dist/esm/pivot/index.js +1 -0
- package/dist/esm/pivot/index.js.map +1 -1
- package/dist/esm/pivot/pivotConfig.d.ts +7 -0
- package/dist/esm/pivot/pivotConfig.d.ts.map +1 -0
- package/dist/esm/pivot/pivotConfig.js +28 -0
- package/dist/esm/pivot/pivotConfig.js.map +1 -0
- package/dist/esm/types/api.d.ts +447 -0
- package/dist/esm/types/api.d.ts.map +1 -1
- package/dist/esm/types/api.js +46 -0
- package/dist/esm/types/api.js.map +1 -1
- package/dist/esm/types/auth.d.ts +2 -1
- package/dist/esm/types/auth.d.ts.map +1 -1
- package/dist/esm/types/auth.js +2 -2
- package/dist/esm/types/auth.js.map +1 -1
- package/dist/esm/types/changeset.d.ts +10 -10
- package/dist/esm/types/pivot.d.ts +0 -2
- package/dist/esm/types/pivot.d.ts.map +1 -1
- package/dist/esm/types/pivot.js +1 -27
- package/dist/esm/types/pivot.js.map +1 -1
- package/dist/esm/types/resourceViewItem.d.ts +1 -1
- package/dist/types/.tsbuildinfo +1 -0
- package/dist/types/authorization/buildAccountHelpers.js +11 -0
- package/dist/types/authorization/buildAccountHelpers.js.map +1 -0
- package/dist/types/authorization/index.d.ts +1 -4
- package/dist/types/authorization/index.d.ts.map +1 -1
- package/dist/types/authorization/index.js +62 -0
- package/dist/types/authorization/index.js.map +1 -0
- package/dist/types/authorization/index.mock.js +42 -0
- package/dist/types/authorization/index.mock.js.map +1 -0
- package/dist/types/authorization/index.test.js +220 -0
- package/dist/types/authorization/index.test.js.map +1 -0
- package/dist/types/authorization/jwtAbility.js +77 -0
- package/dist/types/authorization/jwtAbility.js.map +1 -0
- package/dist/types/authorization/jwtAbility.test.js +416 -0
- package/dist/types/authorization/jwtAbility.test.js.map +1 -0
- package/dist/types/authorization/organizationMemberAbility.js +318 -0
- package/dist/types/authorization/organizationMemberAbility.js.map +1 -0
- package/dist/types/authorization/organizationMemberAbility.mock.js +34 -0
- package/dist/types/authorization/organizationMemberAbility.mock.js.map +1 -0
- package/dist/types/authorization/organizationMemberAbility.test.js +1265 -0
- package/dist/types/authorization/organizationMemberAbility.test.js.map +1 -0
- package/dist/types/authorization/parseAccount.js +28 -0
- package/dist/types/authorization/parseAccount.js.map +1 -0
- package/dist/types/authorization/parseScopes.js +31 -0
- package/dist/types/authorization/parseScopes.js.map +1 -0
- package/dist/types/authorization/parseScopes.test.js +102 -0
- package/dist/types/authorization/parseScopes.test.js.map +1 -0
- package/dist/types/authorization/projectMemberAbility.js +239 -0
- package/dist/types/authorization/projectMemberAbility.js.map +1 -0
- package/dist/types/authorization/projectMemberAbility.mock.js +27 -0
- package/dist/types/authorization/projectMemberAbility.mock.js.map +1 -0
- package/dist/types/authorization/projectMemberAbility.test.js +1031 -0
- package/dist/types/authorization/projectMemberAbility.test.js.map +1 -0
- package/dist/types/authorization/roleToScopeMapping.js +150 -0
- package/dist/types/authorization/roleToScopeMapping.js.map +1 -0
- package/dist/types/authorization/roleToScopeMapping.test.js +561 -0
- package/dist/types/authorization/roleToScopeMapping.test.js.map +1 -0
- package/dist/types/authorization/roleToScopeMapping.testUtils.js +319 -0
- package/dist/types/authorization/roleToScopeMapping.testUtils.js.map +1 -0
- package/dist/types/authorization/roleToScopeParity.test.js +194 -0
- package/dist/types/authorization/roleToScopeParity.test.js.map +1 -0
- package/dist/types/authorization/scopeAbilityBuilder.js +57 -0
- package/dist/types/authorization/scopeAbilityBuilder.js.map +1 -0
- package/dist/types/authorization/scopeAbilityBuilder.test.js +1348 -0
- package/dist/types/authorization/scopeAbilityBuilder.test.js.map +1 -0
- package/dist/types/authorization/scopes.js +613 -0
- package/dist/types/authorization/scopes.js.map +1 -0
- package/dist/types/authorization/serviceAccountAbility.js +303 -0
- package/dist/types/authorization/serviceAccountAbility.js.map +1 -0
- package/dist/types/authorization/types.js +2 -0
- package/dist/types/authorization/types.js.map +1 -0
- package/dist/types/compiler/exploreCompiler.js +462 -0
- package/dist/types/compiler/exploreCompiler.js.map +1 -0
- package/dist/types/compiler/exploreCompiler.mock.js +2016 -0
- package/dist/types/compiler/exploreCompiler.mock.js.map +1 -0
- package/dist/types/compiler/exploreCompiler.test.js +679 -0
- package/dist/types/compiler/exploreCompiler.test.js.map +1 -0
- package/dist/types/compiler/fieldSetExpander.js +119 -0
- package/dist/types/compiler/fieldSetExpander.js.map +1 -0
- package/dist/types/compiler/fieldSetExpander.test.js +184 -0
- package/dist/types/compiler/fieldSetExpander.test.js.map +1 -0
- package/dist/types/compiler/filtersCompiler.js +337 -0
- package/dist/types/compiler/filtersCompiler.js.map +1 -0
- package/dist/types/compiler/filtersCompiler.mock.js +496 -0
- package/dist/types/compiler/filtersCompiler.mock.js.map +1 -0
- package/dist/types/compiler/filtersCompiler.test.js +570 -0
- package/dist/types/compiler/filtersCompiler.test.js.map +1 -0
- package/dist/types/compiler/lightdashProjectConfig.js +37 -0
- package/dist/types/compiler/lightdashProjectConfig.js.map +1 -0
- package/dist/types/compiler/parameters.js +75 -0
- package/dist/types/compiler/parameters.js.map +1 -0
- package/dist/types/compiler/parameters.test.js +216 -0
- package/dist/types/compiler/parameters.test.js.map +1 -0
- package/dist/types/compiler/translator.js +707 -0
- package/dist/types/compiler/translator.js.map +1 -0
- package/dist/types/compiler/translator.mock.js +1901 -0
- package/dist/types/compiler/translator.mock.js.map +1 -0
- package/dist/types/compiler/translator.test.js +323 -0
- package/dist/types/compiler/translator.test.js.map +1 -0
- package/dist/types/constants/pivot.js +7 -0
- package/dist/types/constants/pivot.js.map +1 -0
- package/dist/types/constants/sessionStorageKeys.js +6 -0
- package/dist/types/constants/sessionStorageKeys.js.map +1 -0
- package/dist/types/constants/sqlRunner.js +3 -0
- package/dist/types/constants/sqlRunner.js.map +1 -0
- package/dist/types/dbt/DbtSchemaEditor/DbtSchemaEditor.js +285 -0
- package/dist/types/dbt/DbtSchemaEditor/DbtSchemaEditor.js.map +1 -0
- package/dist/types/dbt/DbtSchemaEditor/DbtSchemaEditor.mock.js +224 -0
- package/dist/types/dbt/DbtSchemaEditor/DbtSchemaEditor.mock.js.map +1 -0
- package/dist/types/dbt/DbtSchemaEditor/DbtSchemaEditor.test.js +129 -0
- package/dist/types/dbt/DbtSchemaEditor/DbtSchemaEditor.test.js.map +1 -0
- package/dist/types/dbt/schemas/lightdashMetadata.json +385 -0
- package/dist/types/dbt/schemas/lightdashV10.json +72 -0
- package/dist/types/dbt/schemas/lightdashV11.json +72 -0
- package/dist/types/dbt/schemas/lightdashV12.json +63 -0
- package/dist/types/dbt/schemas/lightdashV7.json +72 -0
- package/dist/types/dbt/schemas/lightdashV8.json +76 -0
- package/dist/types/dbt/schemas/lightdashV9.json +72 -0
- package/dist/types/dbt/schemas/manifestV10.json +5545 -0
- package/dist/types/dbt/schemas/manifestV11.json +6041 -0
- package/dist/types/dbt/schemas/manifestV12.json +22567 -0
- package/dist/types/dbt/schemas/manifestV7.json +6481 -0
- package/dist/types/dbt/schemas/manifestV8.json +4358 -0
- package/dist/types/dbt/schemas/manifestV9.json +4879 -0
- package/dist/types/dbt/validation.js +67 -0
- package/dist/types/dbt/validation.js.map +1 -0
- package/dist/types/ee/AiAgent/adminTypes.js +2 -0
- package/dist/types/ee/AiAgent/adminTypes.js.map +1 -0
- package/dist/types/ee/AiAgent/chartConfig/shared/formatFieldLabel.js +10 -0
- package/dist/types/ee/AiAgent/chartConfig/shared/formatFieldLabel.js.map +1 -0
- package/dist/types/ee/AiAgent/chartConfig/slack/generateBarVizConfigTool/getVerticalBarChartEchartsConfig.js +60 -0
- package/dist/types/ee/AiAgent/chartConfig/slack/generateBarVizConfigTool/getVerticalBarChartEchartsConfig.js.map +1 -0
- package/dist/types/ee/AiAgent/chartConfig/slack/generateTimeSeriesVizConfigTool/getTimeSeriesChartEchartsConfig.js +60 -0
- package/dist/types/ee/AiAgent/chartConfig/slack/generateTimeSeriesVizConfigTool/getTimeSeriesChartEchartsConfig.js.map +1 -0
- package/dist/types/ee/AiAgent/chartConfig/slack/getSlackAiEchartsConfig.js +33 -0
- package/dist/types/ee/AiAgent/chartConfig/slack/getSlackAiEchartsConfig.js.map +1 -0
- package/dist/types/ee/AiAgent/chartConfig/slack/index.js +2 -0
- package/dist/types/ee/AiAgent/chartConfig/slack/index.js.map +1 -0
- package/dist/types/ee/AiAgent/chartConfig/slack/runQueryTool/getRunQueryEchartsConfig.js +43 -0
- package/dist/types/ee/AiAgent/chartConfig/slack/runQueryTool/getRunQueryEchartsConfig.js.map +1 -0
- package/dist/types/ee/AiAgent/chartConfig/slack/runQueryTool/viz/bar.js +98 -0
- package/dist/types/ee/AiAgent/chartConfig/slack/runQueryTool/viz/bar.js.map +1 -0
- package/dist/types/ee/AiAgent/chartConfig/slack/runQueryTool/viz/funnel.js +38 -0
- package/dist/types/ee/AiAgent/chartConfig/slack/runQueryTool/viz/funnel.js.map +1 -0
- package/dist/types/ee/AiAgent/chartConfig/slack/runQueryTool/viz/horizontalBar.js +65 -0
- package/dist/types/ee/AiAgent/chartConfig/slack/runQueryTool/viz/horizontalBar.js.map +1 -0
- package/dist/types/ee/AiAgent/chartConfig/slack/runQueryTool/viz/line.js +105 -0
- package/dist/types/ee/AiAgent/chartConfig/slack/runQueryTool/viz/line.js.map +1 -0
- package/dist/types/ee/AiAgent/chartConfig/slack/runQueryTool/viz/pie.js +34 -0
- package/dist/types/ee/AiAgent/chartConfig/slack/runQueryTool/viz/pie.js.map +1 -0
- package/dist/types/ee/AiAgent/chartConfig/slack/runQueryTool/viz/scatter.js +66 -0
- package/dist/types/ee/AiAgent/chartConfig/slack/runQueryTool/viz/scatter.js.map +1 -0
- package/dist/types/ee/AiAgent/chartConfig/slack/shared/getCommonEChartsConfig.js +104 -0
- package/dist/types/ee/AiAgent/chartConfig/slack/shared/getCommonEChartsConfig.js.map +1 -0
- package/dist/types/ee/AiAgent/chartConfig/slack/types.js +2 -0
- package/dist/types/ee/AiAgent/chartConfig/slack/types.js.map +1 -0
- package/dist/types/ee/AiAgent/chartConfig/web/generateBarVizConfigTool/getVerticalBarChartConfig.js +65 -0
- package/dist/types/ee/AiAgent/chartConfig/web/generateBarVizConfigTool/getVerticalBarChartConfig.js.map +1 -0
- package/dist/types/ee/AiAgent/chartConfig/web/generateTableVizConfigTool/getTableChartConfig.js +5 -0
- package/dist/types/ee/AiAgent/chartConfig/web/generateTableVizConfigTool/getTableChartConfig.js.map +1 -0
- package/dist/types/ee/AiAgent/chartConfig/web/generateTimeSeriesVizConfigTool/getTimeSeriesChartConfig.js +63 -0
- package/dist/types/ee/AiAgent/chartConfig/web/generateTimeSeriesVizConfigTool/getTimeSeriesChartConfig.js.map +1 -0
- package/dist/types/ee/AiAgent/chartConfig/web/getWebAiChartConfig.d.ts +8 -8
- package/dist/types/ee/AiAgent/chartConfig/web/getWebAiChartConfig.js +51 -0
- package/dist/types/ee/AiAgent/chartConfig/web/getWebAiChartConfig.js.map +1 -0
- package/dist/types/ee/AiAgent/chartConfig/web/index.js +6 -0
- package/dist/types/ee/AiAgent/chartConfig/web/index.js.map +1 -0
- package/dist/types/ee/AiAgent/chartConfig/web/runQueryTool/getRunQueryChartConfig.js +73 -0
- package/dist/types/ee/AiAgent/chartConfig/web/runQueryTool/getRunQueryChartConfig.js.map +1 -0
- package/dist/types/ee/AiAgent/chartConfig/web/runQueryTool/viz/bar.js +91 -0
- package/dist/types/ee/AiAgent/chartConfig/web/runQueryTool/viz/bar.js.map +1 -0
- package/dist/types/ee/AiAgent/chartConfig/web/runQueryTool/viz/funnel.js +17 -0
- package/dist/types/ee/AiAgent/chartConfig/web/runQueryTool/viz/funnel.js.map +1 -0
- package/dist/types/ee/AiAgent/chartConfig/web/runQueryTool/viz/horizontalBar.js +52 -0
- package/dist/types/ee/AiAgent/chartConfig/web/runQueryTool/viz/horizontalBar.js.map +1 -0
- package/dist/types/ee/AiAgent/chartConfig/web/runQueryTool/viz/line.js +96 -0
- package/dist/types/ee/AiAgent/chartConfig/web/runQueryTool/viz/line.js.map +1 -0
- package/dist/types/ee/AiAgent/chartConfig/web/runQueryTool/viz/pie.js +15 -0
- package/dist/types/ee/AiAgent/chartConfig/web/runQueryTool/viz/pie.js.map +1 -0
- package/dist/types/ee/AiAgent/chartConfig/web/runQueryTool/viz/scatter.js +66 -0
- package/dist/types/ee/AiAgent/chartConfig/web/runQueryTool/viz/scatter.js.map +1 -0
- package/dist/types/ee/AiAgent/chartConfig/web/shared/canRenderAsChart.js +24 -0
- package/dist/types/ee/AiAgent/chartConfig/web/shared/canRenderAsChart.js.map +1 -0
- package/dist/types/ee/AiAgent/chartConfig/web/shared/formatPivotValueLabel.js +15 -0
- package/dist/types/ee/AiAgent/chartConfig/web/shared/formatPivotValueLabel.js.map +1 -0
- package/dist/types/ee/AiAgent/chartConfig/web/shared/getAvailableChartTypes.js +11 -0
- package/dist/types/ee/AiAgent/chartConfig/web/shared/getAvailableChartTypes.js.map +1 -0
- package/dist/types/ee/AiAgent/chartConfig/web/shared/getGroupByDimensions.js +15 -0
- package/dist/types/ee/AiAgent/chartConfig/web/shared/getGroupByDimensions.js.map +1 -0
- package/dist/types/ee/AiAgent/chartConfig/web/types.js +2 -0
- package/dist/types/ee/AiAgent/chartConfig/web/types.js.map +1 -0
- package/dist/types/ee/AiAgent/constants.js +2 -0
- package/dist/types/ee/AiAgent/constants.js.map +1 -0
- package/dist/types/ee/AiAgent/filterExploreByTags.js +94 -0
- package/dist/types/ee/AiAgent/filterExploreByTags.js.map +1 -0
- package/dist/types/ee/AiAgent/filterExploreByTags.test.js +634 -0
- package/dist/types/ee/AiAgent/filterExploreByTags.test.js.map +1 -0
- package/dist/types/ee/AiAgent/followUpTools.js +33 -0
- package/dist/types/ee/AiAgent/followUpTools.js.map +1 -0
- package/dist/types/ee/AiAgent/index.d.ts +2 -2
- package/dist/types/ee/AiAgent/index.js +43 -0
- package/dist/types/ee/AiAgent/index.js.map +1 -0
- package/dist/types/ee/AiAgent/requestTypes.js +2 -0
- package/dist/types/ee/AiAgent/requestTypes.js.map +1 -0
- package/dist/types/ee/AiAgent/schemas/customMetrics.js +50 -0
- package/dist/types/ee/AiAgent/schemas/customMetrics.js.map +1 -0
- package/dist/types/ee/AiAgent/schemas/fieldId.js +11 -0
- package/dist/types/ee/AiAgent/schemas/fieldId.js.map +1 -0
- package/dist/types/ee/AiAgent/schemas/filters/booleanFilters.js +29 -0
- package/dist/types/ee/AiAgent/schemas/filters/booleanFilters.js.map +1 -0
- package/dist/types/ee/AiAgent/schemas/filters/dateFilters.js +84 -0
- package/dist/types/ee/AiAgent/schemas/filters/dateFilters.js.map +1 -0
- package/dist/types/ee/AiAgent/schemas/filters/index.js +98 -0
- package/dist/types/ee/AiAgent/schemas/filters/index.js.map +1 -0
- package/dist/types/ee/AiAgent/schemas/filters/numberFilters.js +53 -0
- package/dist/types/ee/AiAgent/schemas/filters/numberFilters.js.map +1 -0
- package/dist/types/ee/AiAgent/schemas/filters/stringFilters.js +33 -0
- package/dist/types/ee/AiAgent/schemas/filters/stringFilters.js.map +1 -0
- package/dist/types/ee/AiAgent/schemas/index.js +9 -0
- package/dist/types/ee/AiAgent/schemas/index.js.map +1 -0
- package/dist/types/ee/AiAgent/schemas/outputMetadata.js +5 -0
- package/dist/types/ee/AiAgent/schemas/outputMetadata.js.map +1 -0
- package/dist/types/ee/AiAgent/schemas/parser.d.ts +24 -24
- package/dist/types/ee/AiAgent/schemas/parser.js +43 -0
- package/dist/types/ee/AiAgent/schemas/parser.js.map +1 -0
- package/dist/types/ee/AiAgent/schemas/sortField.js +14 -0
- package/dist/types/ee/AiAgent/schemas/sortField.js.map +1 -0
- package/dist/types/ee/AiAgent/schemas/tableCalcs/tableCalcBaseSchemas.js +28 -0
- package/dist/types/ee/AiAgent/schemas/tableCalcs/tableCalcBaseSchemas.js.map +1 -0
- package/dist/types/ee/AiAgent/schemas/tableCalcs/tableCalcPercentChangeFromPrevious.js +14 -0
- package/dist/types/ee/AiAgent/schemas/tableCalcs/tableCalcPercentChangeFromPrevious.js.map +1 -0
- package/dist/types/ee/AiAgent/schemas/tableCalcs/tableCalcPercentOfColumnTotal.js +14 -0
- package/dist/types/ee/AiAgent/schemas/tableCalcs/tableCalcPercentOfColumnTotal.js.map +1 -0
- package/dist/types/ee/AiAgent/schemas/tableCalcs/tableCalcPercentOfPreviousValue.js +14 -0
- package/dist/types/ee/AiAgent/schemas/tableCalcs/tableCalcPercentOfPreviousValue.js.map +1 -0
- package/dist/types/ee/AiAgent/schemas/tableCalcs/tableCalcRankInColumn.js +10 -0
- package/dist/types/ee/AiAgent/schemas/tableCalcs/tableCalcRankInColumn.js.map +1 -0
- package/dist/types/ee/AiAgent/schemas/tableCalcs/tableCalcRunningTotal.js +10 -0
- package/dist/types/ee/AiAgent/schemas/tableCalcs/tableCalcRunningTotal.js.map +1 -0
- package/dist/types/ee/AiAgent/schemas/tableCalcs/tableCalcWindowFunction.js +105 -0
- package/dist/types/ee/AiAgent/schemas/tableCalcs/tableCalcWindowFunction.js.map +1 -0
- package/dist/types/ee/AiAgent/schemas/tableCalcs/tableCalcs.js +168 -0
- package/dist/types/ee/AiAgent/schemas/tableCalcs/tableCalcs.js.map +1 -0
- package/dist/types/ee/AiAgent/schemas/toolSchemaBuilder.js +37 -0
- package/dist/types/ee/AiAgent/schemas/toolSchemaBuilder.js.map +1 -0
- package/dist/types/ee/AiAgent/schemas/tools/index.js +16 -0
- package/dist/types/ee/AiAgent/schemas/tools/index.js.map +1 -0
- package/dist/types/ee/AiAgent/schemas/tools/toolDashboardArgs.js +103 -0
- package/dist/types/ee/AiAgent/schemas/tools/toolDashboardArgs.js.map +1 -0
- package/dist/types/ee/AiAgent/schemas/tools/toolDashboardV2Args.d.ts +96 -96
- package/dist/types/ee/AiAgent/schemas/tools/toolDashboardV2Args.js +50 -0
- package/dist/types/ee/AiAgent/schemas/tools/toolDashboardV2Args.js.map +1 -0
- package/dist/types/ee/AiAgent/schemas/tools/toolFindChartsArgs.js +34 -0
- package/dist/types/ee/AiAgent/schemas/tools/toolFindChartsArgs.js.map +1 -0
- package/dist/types/ee/AiAgent/schemas/tools/toolFindContentArgs.js +33 -0
- package/dist/types/ee/AiAgent/schemas/tools/toolFindContentArgs.js.map +1 -0
- package/dist/types/ee/AiAgent/schemas/tools/toolFindDashboardsArgs.js +36 -0
- package/dist/types/ee/AiAgent/schemas/tools/toolFindDashboardsArgs.js.map +1 -0
- package/dist/types/ee/AiAgent/schemas/tools/toolFindExploresArgs.js +45 -0
- package/dist/types/ee/AiAgent/schemas/tools/toolFindExploresArgs.js.map +1 -0
- package/dist/types/ee/AiAgent/schemas/tools/toolFindFieldsArgs.js +34 -0
- package/dist/types/ee/AiAgent/schemas/tools/toolFindFieldsArgs.js.map +1 -0
- package/dist/types/ee/AiAgent/schemas/tools/toolImproveContextArgs.js +60 -0
- package/dist/types/ee/AiAgent/schemas/tools/toolImproveContextArgs.js.map +1 -0
- package/dist/types/ee/AiAgent/schemas/tools/toolProposeChangeArgs.js +157 -0
- package/dist/types/ee/AiAgent/schemas/tools/toolProposeChangeArgs.js.map +1 -0
- package/dist/types/ee/AiAgent/schemas/tools/toolRunMetricQueryArgs.js +41 -0
- package/dist/types/ee/AiAgent/schemas/tools/toolRunMetricQueryArgs.js.map +1 -0
- package/dist/types/ee/AiAgent/schemas/tools/toolRunQueryArgs.d.ts +48 -48
- package/dist/types/ee/AiAgent/schemas/tools/toolRunQueryArgs.js +151 -0
- package/dist/types/ee/AiAgent/schemas/tools/toolRunQueryArgs.js.map +1 -0
- package/dist/types/ee/AiAgent/schemas/tools/toolSearchFieldValuesArgs.js +46 -0
- package/dist/types/ee/AiAgent/schemas/tools/toolSearchFieldValuesArgs.js.map +1 -0
- package/dist/types/ee/AiAgent/schemas/tools/toolTableVizArgs.js +53 -0
- package/dist/types/ee/AiAgent/schemas/tools/toolTableVizArgs.js.map +1 -0
- package/dist/types/ee/AiAgent/schemas/tools/toolTimeSeriesArgs.js +58 -0
- package/dist/types/ee/AiAgent/schemas/tools/toolTimeSeriesArgs.js.map +1 -0
- package/dist/types/ee/AiAgent/schemas/tools/toolVerticalBarArgs.js +53 -0
- package/dist/types/ee/AiAgent/schemas/tools/toolVerticalBarArgs.js.map +1 -0
- package/dist/types/ee/AiAgent/schemas/visualizationMetadata.js +9 -0
- package/dist/types/ee/AiAgent/schemas/visualizationMetadata.js.map +1 -0
- package/dist/types/ee/AiAgent/schemas/visualizations/index.js +58 -0
- package/dist/types/ee/AiAgent/schemas/visualizations/index.js.map +1 -0
- package/dist/types/ee/AiAgent/schemas/visualizations/tableViz.js +38 -0
- package/dist/types/ee/AiAgent/schemas/visualizations/tableViz.js.map +1 -0
- package/dist/types/ee/AiAgent/schemas/visualizations/timeSeriesViz.js +63 -0
- package/dist/types/ee/AiAgent/schemas/visualizations/timeSeriesViz.js.map +1 -0
- package/dist/types/ee/AiAgent/schemas/visualizations/verticalBarViz.js +68 -0
- package/dist/types/ee/AiAgent/schemas/visualizations/verticalBarViz.js.map +1 -0
- package/dist/types/ee/AiAgent/types.js +12 -0
- package/dist/types/ee/AiAgent/types.js.map +1 -0
- package/dist/types/ee/AiAgent/utils.d.ts +8 -8
- package/dist/types/ee/AiAgent/utils.js +82 -0
- package/dist/types/ee/AiAgent/utils.js.map +1 -0
- package/dist/types/ee/AiAgent/validators.js +10 -0
- package/dist/types/ee/AiAgent/validators.js.map +1 -0
- package/dist/types/ee/commercialFeatureFlags.js +10 -0
- package/dist/types/ee/commercialFeatureFlags.js.map +1 -0
- package/dist/types/ee/embed/index.js +90 -0
- package/dist/types/ee/embed/index.js.map +1 -0
- package/dist/types/ee/index.js +19 -0
- package/dist/types/ee/index.js.map +1 -0
- package/dist/types/ee/scim/errors.js +22 -0
- package/dist/types/ee/scim/errors.js.map +1 -0
- package/dist/types/ee/scim/types.js +2 -0
- package/dist/types/ee/scim/types.js.map +1 -0
- package/dist/types/ee/serviceAccounts/types.js +8 -0
- package/dist/types/ee/serviceAccounts/types.js.map +1 -0
- package/dist/types/index.d.ts +23 -449
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +652 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/index.mock.js +44 -0
- package/dist/types/index.mock.js.map +1 -0
- package/dist/types/index.test.js +123 -0
- package/dist/types/index.test.js.map +1 -0
- package/dist/types/pivot/derivePivotConfigFromChart.js +206 -0
- package/dist/types/pivot/derivePivotConfigFromChart.js.map +1 -0
- package/dist/types/pivot/derivePivotConfigFromChart.mock.js +112 -0
- package/dist/types/pivot/derivePivotConfigFromChart.mock.js.map +1 -0
- package/dist/types/pivot/derivePivotConfigFromChart.test.js +418 -0
- package/dist/types/pivot/derivePivotConfigFromChart.test.js.map +1 -0
- package/dist/types/pivot/index.d.ts +1 -0
- package/dist/types/pivot/index.d.ts.map +1 -1
- package/dist/types/pivot/index.js +5 -0
- package/dist/types/pivot/index.js.map +1 -0
- package/dist/types/pivot/pivotConfig.d.ts +7 -0
- package/dist/types/pivot/pivotConfig.d.ts.map +1 -0
- package/dist/types/pivot/pivotConfig.js +28 -0
- package/dist/types/pivot/pivotConfig.js.map +1 -0
- package/dist/types/pivot/pivotQueryResults.js +1034 -0
- package/dist/types/pivot/pivotQueryResults.js.map +1 -0
- package/dist/types/pivot/pivotQueryResults.mock.js +2412 -0
- package/dist/types/pivot/pivotQueryResults.mock.js.map +1 -0
- package/dist/types/pivot/pivotQueryResults.test.js +1222 -0
- package/dist/types/pivot/pivotQueryResults.test.js.map +1 -0
- package/dist/types/pivot/utils.js +14 -0
- package/dist/types/pivot/utils.js.map +1 -0
- package/dist/types/schemas/json/chart-as-code-1.0.json +436 -0
- package/dist/types/schemas/json/dashboard-as-code-1.0.json +349 -0
- package/dist/types/schemas/json/lightdash-dbt-2.0.json +1417 -0
- package/dist/types/schemas/json/lightdash-project-config-1.0.json +138 -0
- package/dist/types/templating/template.js +30 -0
- package/dist/types/templating/template.js.map +1 -0
- package/dist/types/templating/template.mock.js +45 -0
- package/dist/types/templating/template.mock.js.map +1 -0
- package/dist/types/templating/template.test.js +21 -0
- package/dist/types/templating/template.test.js.map +1 -0
- package/dist/types/types/SshKeyPair.js +2 -0
- package/dist/types/types/SshKeyPair.js.map +1 -0
- package/dist/types/types/account.js +2 -0
- package/dist/types/types/account.js.map +1 -0
- package/dist/types/types/analytics.js +29 -0
- package/dist/types/types/analytics.js.map +1 -0
- package/dist/types/types/any.js +2 -0
- package/dist/types/types/any.js.map +1 -0
- package/dist/types/types/api/comments.js +2 -0
- package/dist/types/types/api/comments.js.map +1 -0
- package/dist/types/types/api/email.js +2 -0
- package/dist/types/types/api/email.js.map +1 -0
- package/dist/types/types/api/errors.js +2 -0
- package/dist/types/types/api/errors.js.map +1 -0
- package/dist/types/types/api/notifications.js +5 -0
- package/dist/types/types/api/notifications.js.map +1 -0
- package/dist/types/types/api/paginatedQuery.js +3 -0
- package/dist/types/types/api/paginatedQuery.js.map +1 -0
- package/dist/types/types/api/parameters.js +2 -0
- package/dist/types/types/api/parameters.js.map +1 -0
- package/dist/types/types/api/share.js +2 -0
- package/dist/types/types/api/share.js.map +1 -0
- package/dist/types/types/api/sort.js +2 -0
- package/dist/types/types/api/sort.js.map +1 -0
- package/dist/types/types/api/spotlight.js +2 -0
- package/dist/types/types/api/spotlight.js.map +1 -0
- package/dist/types/types/api/success.js +2 -0
- package/dist/types/types/api/success.js.map +1 -0
- package/dist/types/types/api/uuid.js +2 -0
- package/dist/types/types/api/uuid.js.map +1 -0
- package/dist/types/types/api.d.ts +447 -0
- package/dist/types/types/api.d.ts.map +1 -1
- package/dist/types/types/api.js +57 -0
- package/dist/types/types/api.js.map +1 -0
- package/dist/types/types/applyDimensionOverrides.test.js +338 -0
- package/dist/types/types/applyDimensionOverrides.test.js.map +1 -0
- package/dist/types/types/auth.d.ts +2 -1
- package/dist/types/types/auth.d.ts.map +1 -1
- package/dist/types/types/auth.js +42 -0
- package/dist/types/types/auth.js.map +1 -0
- package/dist/types/types/bigQuerySSO.js +2 -0
- package/dist/types/types/bigQuerySSO.js.map +1 -0
- package/dist/types/types/catalog.js +50 -0
- package/dist/types/types/catalog.js.map +1 -0
- package/dist/types/types/changeset.d.ts +10 -10
- package/dist/types/types/changeset.js +72 -0
- package/dist/types/types/changeset.js.map +1 -0
- package/dist/types/types/coder.js +2 -0
- package/dist/types/types/coder.js.map +1 -0
- package/dist/types/types/comments.js +2 -0
- package/dist/types/types/comments.js.map +1 -0
- package/dist/types/types/conditionalFormatting.js +25 -0
- package/dist/types/types/conditionalFormatting.js.map +1 -0
- package/dist/types/types/content.js +19 -0
- package/dist/types/types/content.js.map +1 -0
- package/dist/types/types/csv.js +2 -0
- package/dist/types/types/csv.js.map +1 -0
- package/dist/types/types/dashboard.js +46 -0
- package/dist/types/types/dashboard.js.map +1 -0
- package/dist/types/types/dbt.js +262 -0
- package/dist/types/types/dbt.js.map +1 -0
- package/dist/types/types/dbtFromSchema.js +2 -0
- package/dist/types/types/dbtFromSchema.js.map +1 -0
- package/dist/types/types/deepPartial.js +7 -0
- package/dist/types/types/deepPartial.js.map +1 -0
- package/dist/types/types/downloadFile.js +9 -0
- package/dist/types/types/downloadFile.js.map +1 -0
- package/dist/types/types/email.js +2 -0
- package/dist/types/types/email.js.map +1 -0
- package/dist/types/types/errors.js +496 -0
- package/dist/types/types/errors.js.map +1 -0
- package/dist/types/types/explore.js +24 -0
- package/dist/types/types/explore.js.map +1 -0
- package/dist/types/types/featureFlags.js +62 -0
- package/dist/types/types/featureFlags.js.map +1 -0
- package/dist/types/types/field.js +473 -0
- package/dist/types/types/field.js.map +1 -0
- package/dist/types/types/field.test.js +90 -0
- package/dist/types/types/field.test.js.map +1 -0
- package/dist/types/types/fieldMatch.js +2 -0
- package/dist/types/types/fieldMatch.js.map +1 -0
- package/dist/types/types/filter.js +287 -0
- package/dist/types/types/filter.js.map +1 -0
- package/dist/types/types/filter.test.js +372 -0
- package/dist/types/types/filter.test.js.map +1 -0
- package/dist/types/types/filterGrammar.js +358 -0
- package/dist/types/types/filterGrammar.js.map +1 -0
- package/dist/types/types/filterGrammar.test.js +549 -0
- package/dist/types/types/filterGrammar.test.js.map +1 -0
- package/dist/types/types/filterGrammarConversion.js +94 -0
- package/dist/types/types/filterGrammarConversion.js.map +1 -0
- package/dist/types/types/filterGrammarConversion.test.js +260 -0
- package/dist/types/types/filterGrammarConversion.test.js.map +1 -0
- package/dist/types/types/gdrive.js +2 -0
- package/dist/types/types/gdrive.js.map +1 -0
- package/dist/types/types/gitIntegration.js +2 -0
- package/dist/types/types/gitIntegration.js.map +1 -0
- package/dist/types/types/groups.js +4 -0
- package/dist/types/types/groups.js.map +1 -0
- package/dist/types/types/job.js +67 -0
- package/dist/types/types/job.js.map +1 -0
- package/dist/types/types/knex-paginate.js +2 -0
- package/dist/types/types/knex-paginate.js.map +1 -0
- package/dist/types/types/lightdashProjectConfig.js +4 -0
- package/dist/types/types/lightdashProjectConfig.js.map +1 -0
- package/dist/types/types/metricQuery.js +20 -0
- package/dist/types/types/metricQuery.js.map +1 -0
- package/dist/types/types/metricsExplorer.js +12 -0
- package/dist/types/types/metricsExplorer.js.map +1 -0
- package/dist/types/types/notifications.js +2 -0
- package/dist/types/types/notifications.js.map +1 -0
- package/dist/types/types/oauth.js +2 -0
- package/dist/types/types/oauth.js.map +1 -0
- package/dist/types/types/openIdIdentity.js +12 -0
- package/dist/types/types/openIdIdentity.js.map +1 -0
- package/dist/types/types/organization.js +20 -0
- package/dist/types/types/organization.js.map +1 -0
- package/dist/types/types/organizationMemberProfile.js +30 -0
- package/dist/types/types/organizationMemberProfile.js.map +1 -0
- package/dist/types/types/organizationWarehouseCredentials.js +2 -0
- package/dist/types/types/organizationWarehouseCredentials.js.map +1 -0
- package/dist/types/types/paginateResults.js +2 -0
- package/dist/types/types/paginateResults.js.map +1 -0
- package/dist/types/types/parameters.js +2 -0
- package/dist/types/types/parameters.js.map +1 -0
- package/dist/types/types/personalAccessToken.js +2 -0
- package/dist/types/types/personalAccessToken.js.map +1 -0
- package/dist/types/types/pinning.js +5 -0
- package/dist/types/types/pinning.js.map +1 -0
- package/dist/types/types/pivot.d.ts +0 -2
- package/dist/types/types/pivot.d.ts.map +1 -1
- package/dist/types/types/pivot.js +2 -0
- package/dist/types/types/pivot.js.map +1 -0
- package/dist/types/types/projectGroupAccess.js +2 -0
- package/dist/types/types/projectGroupAccess.js.map +1 -0
- package/dist/types/types/projectMemberProfile.js +2 -0
- package/dist/types/types/projectMemberProfile.js.map +1 -0
- package/dist/types/types/projectMemberRole.js +30 -0
- package/dist/types/types/projectMemberRole.js.map +1 -0
- package/dist/types/types/projects.js +149 -0
- package/dist/types/types/projects.js.map +1 -0
- package/dist/types/types/promotion.js +8 -0
- package/dist/types/types/promotion.js.map +1 -0
- package/dist/types/types/queryHistory.js +8 -0
- package/dist/types/types/queryHistory.js.map +1 -0
- package/dist/types/types/rename.js +6 -0
- package/dist/types/types/rename.js.map +1 -0
- package/dist/types/types/resourceViewItem.d.ts +1 -1
- package/dist/types/types/resourceViewItem.js +103 -0
- package/dist/types/types/resourceViewItem.js.map +1 -0
- package/dist/types/types/results.js +51 -0
- package/dist/types/types/results.js.map +1 -0
- package/dist/types/types/roles.js +2 -0
- package/dist/types/types/roles.js.map +1 -0
- package/dist/types/types/savedCharts.js +225 -0
- package/dist/types/types/savedCharts.js.map +1 -0
- package/dist/types/types/scheduler.js +87 -0
- package/dist/types/types/scheduler.js.map +1 -0
- package/dist/types/types/schedulerLog.js +2 -0
- package/dist/types/types/schedulerLog.js.map +1 -0
- package/dist/types/types/schedulerTaskList.js +31 -0
- package/dist/types/types/schedulerTaskList.js.map +1 -0
- package/dist/types/types/scopes.js +14 -0
- package/dist/types/types/scopes.js.map +1 -0
- package/dist/types/types/search.js +53 -0
- package/dist/types/types/search.js.map +1 -0
- package/dist/types/types/share.js +2 -0
- package/dist/types/types/share.js.map +1 -0
- package/dist/types/types/slack.js +2 -0
- package/dist/types/types/slack.js.map +1 -0
- package/dist/types/types/slackSettings.js +2 -0
- package/dist/types/types/slackSettings.js.map +1 -0
- package/dist/types/types/space.js +7 -0
- package/dist/types/types/space.js.map +1 -0
- package/dist/types/types/spotlightTableConfig.js +17 -0
- package/dist/types/types/spotlightTableConfig.js.map +1 -0
- package/dist/types/types/sqlRunner.js +41 -0
- package/dist/types/types/sqlRunner.js.map +1 -0
- package/dist/types/types/table.js +6 -0
- package/dist/types/types/table.js.map +1 -0
- package/dist/types/types/tags.js +2 -0
- package/dist/types/types/tags.js.map +1 -0
- package/dist/types/types/timeFrames.js +42 -0
- package/dist/types/types/timeFrames.js.map +1 -0
- package/dist/types/types/timezone.js +33 -0
- package/dist/types/types/timezone.js.map +1 -0
- package/dist/types/types/user.js +23 -0
- package/dist/types/types/user.js.map +1 -0
- package/dist/types/types/userAttributes.js +2 -0
- package/dist/types/types/userAttributes.js.map +1 -0
- package/dist/types/types/userWarehouseCredentials.js +2 -0
- package/dist/types/types/userWarehouseCredentials.js.map +1 -0
- package/dist/types/types/validation.js +29 -0
- package/dist/types/types/validation.js.map +1 -0
- package/dist/types/types/warehouse.js +6 -0
- package/dist/types/types/warehouse.js.map +1 -0
- package/dist/types/types/yamlSchema.js +2 -0
- package/dist/types/types/yamlSchema.js.map +1 -0
- package/dist/types/utils/accessors.js +27 -0
- package/dist/types/utils/accessors.js.map +1 -0
- package/dist/types/utils/accessors.test.js +45 -0
- package/dist/types/utils/accessors.test.js.map +1 -0
- package/dist/types/utils/additionalMetrics.js +54 -0
- package/dist/types/utils/additionalMetrics.js.map +1 -0
- package/dist/types/utils/api.js +5 -0
- package/dist/types/utils/api.js.map +1 -0
- package/dist/types/utils/assertUnreachable.js +10 -0
- package/dist/types/utils/assertUnreachable.js.map +1 -0
- package/dist/types/utils/booleanConverter.js +27 -0
- package/dist/types/utils/booleanConverter.js.map +1 -0
- package/dist/types/utils/booleanConverter.test.js +59 -0
- package/dist/types/utils/booleanConverter.test.js.map +1 -0
- package/dist/types/utils/catalogMetricsTree.js +2 -0
- package/dist/types/utils/catalogMetricsTree.js.map +1 -0
- package/dist/types/utils/changeset.js +132 -0
- package/dist/types/utils/changeset.js.map +1 -0
- package/dist/types/utils/changeset.mock.js +146 -0
- package/dist/types/utils/changeset.mock.js.map +1 -0
- package/dist/types/utils/changeset.test.js +248 -0
- package/dist/types/utils/changeset.test.js.map +1 -0
- package/dist/types/utils/charts.js +74 -0
- package/dist/types/utils/charts.js.map +1 -0
- package/dist/types/utils/colors.js +15 -0
- package/dist/types/utils/colors.js.map +1 -0
- package/dist/types/utils/colors.test.js +85 -0
- package/dist/types/utils/colors.test.js.map +1 -0
- package/dist/types/utils/conditionalFormatting.js +436 -0
- package/dist/types/utils/conditionalFormatting.js.map +1 -0
- package/dist/types/utils/conditionalFormatting.test.js +105 -0
- package/dist/types/utils/conditionalFormatting.test.js.map +1 -0
- package/dist/types/utils/convertCustomDimensionsToYaml.js +115 -0
- package/dist/types/utils/convertCustomDimensionsToYaml.js.map +1 -0
- package/dist/types/utils/convertCustomMetricsToYaml.js +15 -0
- package/dist/types/utils/convertCustomMetricsToYaml.js.map +1 -0
- package/dist/types/utils/customDimensions.js +27 -0
- package/dist/types/utils/customDimensions.js.map +1 -0
- package/dist/types/utils/dashboard.js +35 -0
- package/dist/types/utils/dashboard.js.map +1 -0
- package/dist/types/utils/dashboard.test.js +36 -0
- package/dist/types/utils/dashboard.test.js.map +1 -0
- package/dist/types/utils/dbt.js +4 -0
- package/dist/types/utils/dbt.js.map +1 -0
- package/dist/types/utils/dbt.test.js +39 -0
- package/dist/types/utils/dbt.test.js.map +1 -0
- package/dist/types/utils/dependencyGraph.js +51 -0
- package/dist/types/utils/dependencyGraph.js.map +1 -0
- package/dist/types/utils/dependencyGraph.test.js +113 -0
- package/dist/types/utils/dependencyGraph.test.js.map +1 -0
- package/dist/types/utils/email.js +76 -0
- package/dist/types/utils/email.js.map +1 -0
- package/dist/types/utils/email.test.js +49 -0
- package/dist/types/utils/email.test.js.map +1 -0
- package/dist/types/utils/fields.js +183 -0
- package/dist/types/utils/fields.js.map +1 -0
- package/dist/types/utils/fields.mock.js +150 -0
- package/dist/types/utils/fields.mock.js.map +1 -0
- package/dist/types/utils/fields.test.js +259 -0
- package/dist/types/utils/fields.test.js.map +1 -0
- package/dist/types/utils/filters.js +763 -0
- package/dist/types/utils/filters.js.map +1 -0
- package/dist/types/utils/filters.mock.js +450 -0
- package/dist/types/utils/filters.mock.js.map +1 -0
- package/dist/types/utils/filters.test.js +360 -0
- package/dist/types/utils/filters.test.js.map +1 -0
- package/dist/types/utils/formatting.js +552 -0
- package/dist/types/utils/formatting.js.map +1 -0
- package/dist/types/utils/formatting.mock.js +28 -0
- package/dist/types/utils/formatting.mock.js.map +1 -0
- package/dist/types/utils/formatting.test.js +1047 -0
- package/dist/types/utils/formatting.test.js.map +1 -0
- package/dist/types/utils/github.js +11 -0
- package/dist/types/utils/github.js.map +1 -0
- package/dist/types/utils/i18n/abstract.js +3 -0
- package/dist/types/utils/i18n/abstract.js.map +1 -0
- package/dist/types/utils/i18n/chartAsCode.js +132 -0
- package/dist/types/utils/i18n/chartAsCode.js.map +1 -0
- package/dist/types/utils/i18n/chartAsCode.test.js +350 -0
- package/dist/types/utils/i18n/chartAsCode.test.js.map +1 -0
- package/dist/types/utils/i18n/dashboardAsCode.js +58 -0
- package/dist/types/utils/i18n/dashboardAsCode.js.map +1 -0
- package/dist/types/utils/i18n/index.js +5 -0
- package/dist/types/utils/i18n/index.js.map +1 -0
- package/dist/types/utils/i18n/merge.js +20 -0
- package/dist/types/utils/i18n/merge.js.map +1 -0
- package/dist/types/utils/i18n/types.js +2 -0
- package/dist/types/utils/i18n/types.js.map +1 -0
- package/dist/types/utils/item.js +154 -0
- package/dist/types/utils/item.js.map +1 -0
- package/dist/types/utils/loadLightdashProjectConfig.js +49 -0
- package/dist/types/utils/loadLightdashProjectConfig.js.map +1 -0
- package/dist/types/utils/loadLightdashProjectConfig.mock.js +127 -0
- package/dist/types/utils/loadLightdashProjectConfig.mock.js.map +1 -0
- package/dist/types/utils/loadLightdashProjectConfig.test.js +137 -0
- package/dist/types/utils/loadLightdashProjectConfig.test.js.map +1 -0
- package/dist/types/utils/metricsExplorer.js +365 -0
- package/dist/types/utils/metricsExplorer.js.map +1 -0
- package/dist/types/utils/oauth.js +242 -0
- package/dist/types/utils/oauth.js.map +1 -0
- package/dist/types/utils/organization.js +23 -0
- package/dist/types/utils/organization.js.map +1 -0
- package/dist/types/utils/projectMemberRole.js +85 -0
- package/dist/types/utils/projectMemberRole.js.map +1 -0
- package/dist/types/utils/projectMemberRole.test.js +36 -0
- package/dist/types/utils/projectMemberRole.test.js.map +1 -0
- package/dist/types/utils/promises.js +5 -0
- package/dist/types/utils/promises.js.map +1 -0
- package/dist/types/utils/sanitizeHtml.js +111 -0
- package/dist/types/utils/sanitizeHtml.js.map +1 -0
- package/dist/types/utils/sanitizeHtml.test.js +101 -0
- package/dist/types/utils/sanitizeHtml.test.js.map +1 -0
- package/dist/types/utils/scheduler.js +85 -0
- package/dist/types/utils/scheduler.js.map +1 -0
- package/dist/types/utils/scheduler.test.js +41 -0
- package/dist/types/utils/scheduler.test.js.map +1 -0
- package/dist/types/utils/searchParams.js +8 -0
- package/dist/types/utils/searchParams.js.map +1 -0
- package/dist/types/utils/sleep.js +6 -0
- package/dist/types/utils/sleep.js.map +1 -0
- package/dist/types/utils/slug.test.js +129 -0
- package/dist/types/utils/slug.test.js.map +1 -0
- package/dist/types/utils/slugs.js +55 -0
- package/dist/types/utils/slugs.js.map +1 -0
- package/dist/types/utils/subtotals.js +4 -0
- package/dist/types/utils/subtotals.js.map +1 -0
- package/dist/types/utils/time.js +25 -0
- package/dist/types/utils/time.js.map +1 -0
- package/dist/types/utils/timeFrames.js +529 -0
- package/dist/types/utils/timeFrames.js.map +1 -0
- package/dist/types/utils/timeFrames.test.js +50 -0
- package/dist/types/utils/timeFrames.test.js.map +1 -0
- package/dist/types/utils/virtualView.js +98 -0
- package/dist/types/utils/virtualView.js.map +1 -0
- package/dist/types/utils/warehouse.js +57 -0
- package/dist/types/utils/warehouse.js.map +1 -0
- package/dist/types/visualizations/CartesianChartDataModel.js +515 -0
- package/dist/types/visualizations/CartesianChartDataModel.js.map +1 -0
- package/dist/types/visualizations/PieChartDataModel.js +258 -0
- package/dist/types/visualizations/PieChartDataModel.js.map +1 -0
- package/dist/types/visualizations/TableDataModel.js +96 -0
- package/dist/types/visualizations/TableDataModel.js.map +1 -0
- package/dist/types/visualizations/chartTransformations.js +107 -0
- package/dist/types/visualizations/chartTransformations.js.map +1 -0
- package/dist/types/visualizations/helpers/getCartesianAxisFormatterConfig.js +142 -0
- package/dist/types/visualizations/helpers/getCartesianAxisFormatterConfig.js.map +1 -0
- package/dist/types/visualizations/types/IResultsRunner.js +2 -0
- package/dist/types/visualizations/types/IResultsRunner.js.map +1 -0
- package/dist/types/visualizations/types/index.js +78 -0
- package/dist/types/visualizations/types/index.js.map +1 -0
- package/package.json +1 -1
- package/dist/tsconfig.types.tsbuildinfo +0 -1
|
@@ -0,0 +1,652 @@
|
|
|
1
|
+
import dayjs from 'dayjs';
|
|
2
|
+
import utc from 'dayjs/plugin/utc';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
import { LightdashMode } from './types/api';
|
|
5
|
+
import { DimensionType, friendlyName, isCustomDimension, isDimension, isField, isFilterableDimension, isMetric, isTableCalculation, } from './types/field';
|
|
6
|
+
import { OrganizationMemberRole } from './types/organizationMemberProfile';
|
|
7
|
+
import { DbtProjectType, ProjectType, } from './types/projects';
|
|
8
|
+
import { SpaceMemberRole } from './types/space';
|
|
9
|
+
import { TimeFrames } from './types/timeFrames';
|
|
10
|
+
import { convertAdditionalMetric } from './utils/additionalMetrics';
|
|
11
|
+
import { getFields } from './utils/fields';
|
|
12
|
+
import { formatItemValue } from './utils/formatting';
|
|
13
|
+
import { getItemId, getItemLabelWithoutTableName } from './utils/item';
|
|
14
|
+
import { getOrganizationNameSchema } from './utils/organization';
|
|
15
|
+
dayjs.extend(utc);
|
|
16
|
+
export * from './authorization/buildAccountHelpers';
|
|
17
|
+
export { defineUserAbility, getUserAbilityBuilder, JWT_HEADER_NAME, } from './authorization/index';
|
|
18
|
+
export * from './authorization/jwtAbility';
|
|
19
|
+
export * from './authorization/parseAccount';
|
|
20
|
+
export * from './authorization/roleToScopeMapping';
|
|
21
|
+
export * from './authorization/scopes';
|
|
22
|
+
export * from './authorization/serviceAccountAbility';
|
|
23
|
+
export * from './authorization/types';
|
|
24
|
+
export * from './compiler/exploreCompiler';
|
|
25
|
+
export * from './compiler/filtersCompiler';
|
|
26
|
+
export * from './compiler/parameters';
|
|
27
|
+
export * from './compiler/translator';
|
|
28
|
+
export * from './constants/pivot';
|
|
29
|
+
export * from './constants/sessionStorageKeys';
|
|
30
|
+
export * from './constants/sqlRunner';
|
|
31
|
+
export { default as DbtSchemaEditor } from './dbt/DbtSchemaEditor/DbtSchemaEditor';
|
|
32
|
+
export * from './dbt/validation';
|
|
33
|
+
export * from './ee';
|
|
34
|
+
export * from './pivot/derivePivotConfigFromChart';
|
|
35
|
+
export * from './pivot/pivotConfig';
|
|
36
|
+
export * from './pivot/pivotQueryResults';
|
|
37
|
+
export * from './pivot/utils';
|
|
38
|
+
export { default as lightdashDbtYamlSchema } from './schemas/json/lightdash-dbt-2.0.json';
|
|
39
|
+
export { default as lightdashProjectConfigSchema } from './schemas/json/lightdash-project-config-1.0.json';
|
|
40
|
+
export * from './templating/template';
|
|
41
|
+
export * from './types/account';
|
|
42
|
+
export * from './types/analytics';
|
|
43
|
+
export * from './types/any';
|
|
44
|
+
export * from './types/api';
|
|
45
|
+
export * from './types/api/comments';
|
|
46
|
+
export * from './types/api/errors';
|
|
47
|
+
export * from './types/api/notifications';
|
|
48
|
+
export * from './types/api/paginatedQuery';
|
|
49
|
+
export * from './types/api/parameters';
|
|
50
|
+
export * from './types/api/share';
|
|
51
|
+
export * from './types/api/sort';
|
|
52
|
+
export * from './types/api/spotlight';
|
|
53
|
+
export * from './types/api/success';
|
|
54
|
+
export * from './types/api/uuid';
|
|
55
|
+
export * from './types/auth';
|
|
56
|
+
export * from './types/bigQuerySSO';
|
|
57
|
+
export * from './types/catalog';
|
|
58
|
+
export * from './types/changeset';
|
|
59
|
+
export * from './types/coder';
|
|
60
|
+
export * from './types/comments';
|
|
61
|
+
export * from './types/conditionalFormatting';
|
|
62
|
+
export * from './types/content';
|
|
63
|
+
export * from './types/csv';
|
|
64
|
+
export * from './types/dashboard';
|
|
65
|
+
export * from './types/dbt';
|
|
66
|
+
export * from './types/downloadFile';
|
|
67
|
+
export * from './types/email';
|
|
68
|
+
export * from './types/errors';
|
|
69
|
+
export * from './types/explore';
|
|
70
|
+
export * from './types/featureFlags';
|
|
71
|
+
export * from './types/field';
|
|
72
|
+
export * from './types/fieldMatch';
|
|
73
|
+
export * from './types/filter';
|
|
74
|
+
export * from './types/gdrive';
|
|
75
|
+
export * from './types/gitIntegration';
|
|
76
|
+
export * from './types/groups';
|
|
77
|
+
export * from './types/job';
|
|
78
|
+
export * from './types/knex-paginate';
|
|
79
|
+
export * from './types/lightdashProjectConfig';
|
|
80
|
+
export * from './types/metricQuery';
|
|
81
|
+
export * from './types/metricsExplorer';
|
|
82
|
+
export * from './types/notifications';
|
|
83
|
+
export * from './types/oauth';
|
|
84
|
+
export * from './types/openIdIdentity';
|
|
85
|
+
export * from './types/organization';
|
|
86
|
+
export * from './types/organizationMemberProfile';
|
|
87
|
+
export * from './types/organizationWarehouseCredentials';
|
|
88
|
+
export * from './types/paginateResults';
|
|
89
|
+
export * from './types/parameters';
|
|
90
|
+
export * from './types/personalAccessToken';
|
|
91
|
+
export * from './types/pinning';
|
|
92
|
+
export * from './types/pivot';
|
|
93
|
+
export * from './types/projectGroupAccess';
|
|
94
|
+
export * from './types/projectMemberProfile';
|
|
95
|
+
export * from './types/projectMemberRole';
|
|
96
|
+
export * from './types/projects';
|
|
97
|
+
export * from './types/promotion';
|
|
98
|
+
export * from './types/queryHistory';
|
|
99
|
+
export * from './types/rename';
|
|
100
|
+
export * from './types/resourceViewItem';
|
|
101
|
+
export * from './types/results';
|
|
102
|
+
export * from './types/roles';
|
|
103
|
+
export * from './types/savedCharts';
|
|
104
|
+
export * from './types/scheduler';
|
|
105
|
+
export * from './types/schedulerLog';
|
|
106
|
+
export * from './types/schedulerTaskList';
|
|
107
|
+
export * from './types/scopes';
|
|
108
|
+
export * from './types/search';
|
|
109
|
+
export * from './types/share';
|
|
110
|
+
export * from './types/slack';
|
|
111
|
+
export * from './types/slackSettings';
|
|
112
|
+
export * from './types/space';
|
|
113
|
+
export * from './types/spotlightTableConfig';
|
|
114
|
+
export * from './types/sqlRunner';
|
|
115
|
+
export * from './types/SshKeyPair';
|
|
116
|
+
export * from './types/table';
|
|
117
|
+
export * from './types/tags';
|
|
118
|
+
export * from './types/timeFrames';
|
|
119
|
+
export * from './types/timezone';
|
|
120
|
+
export * from './types/user';
|
|
121
|
+
export * from './types/userAttributes';
|
|
122
|
+
export * from './types/userWarehouseCredentials';
|
|
123
|
+
export * from './types/validation';
|
|
124
|
+
export * from './types/warehouse';
|
|
125
|
+
export * from './types/yamlSchema';
|
|
126
|
+
export * from './utils/accessors';
|
|
127
|
+
export * from './utils/additionalMetrics';
|
|
128
|
+
export * from './utils/api';
|
|
129
|
+
export { default as assertUnreachable } from './utils/assertUnreachable';
|
|
130
|
+
export * from './utils/catalogMetricsTree';
|
|
131
|
+
export * from './utils/changeset';
|
|
132
|
+
export * from './utils/charts';
|
|
133
|
+
export * from './utils/colors';
|
|
134
|
+
export * from './utils/conditionalFormatting';
|
|
135
|
+
export * from './utils/convertCustomDimensionsToYaml';
|
|
136
|
+
export * from './utils/convertCustomMetricsToYaml';
|
|
137
|
+
export * from './utils/customDimensions';
|
|
138
|
+
export * from './utils/dashboard';
|
|
139
|
+
export * from './utils/dbt';
|
|
140
|
+
export * from './utils/dependencyGraph';
|
|
141
|
+
export * from './utils/email';
|
|
142
|
+
export * from './utils/fields';
|
|
143
|
+
export * from './utils/filters';
|
|
144
|
+
export * from './utils/formatting';
|
|
145
|
+
export * from './utils/github';
|
|
146
|
+
export * from './utils/i18n/chartAsCode';
|
|
147
|
+
export * from './utils/i18n/dashboardAsCode';
|
|
148
|
+
export * from './utils/i18n/merge';
|
|
149
|
+
export * from './utils/i18n/types';
|
|
150
|
+
export * from './utils/item';
|
|
151
|
+
export * from './utils/loadLightdashProjectConfig';
|
|
152
|
+
export * from './utils/metricsExplorer';
|
|
153
|
+
export * from './utils/oauth';
|
|
154
|
+
export * from './utils/organization';
|
|
155
|
+
export * from './utils/projectMemberRole';
|
|
156
|
+
export * from './utils/promises';
|
|
157
|
+
export * from './utils/sanitizeHtml';
|
|
158
|
+
export * from './utils/scheduler';
|
|
159
|
+
export * from './utils/searchParams';
|
|
160
|
+
export * from './utils/sleep';
|
|
161
|
+
export * from './utils/slugs';
|
|
162
|
+
export * from './utils/subtotals';
|
|
163
|
+
export * from './utils/time';
|
|
164
|
+
export * from './utils/timeFrames';
|
|
165
|
+
export * from './utils/virtualView';
|
|
166
|
+
export * from './utils/warehouse';
|
|
167
|
+
export * from './visualizations/CartesianChartDataModel';
|
|
168
|
+
export * from './visualizations/chartTransformations';
|
|
169
|
+
export * from './visualizations/helpers/getCartesianAxisFormatterConfig';
|
|
170
|
+
export * from './visualizations/PieChartDataModel';
|
|
171
|
+
export * from './visualizations/TableDataModel';
|
|
172
|
+
export * from './visualizations/types';
|
|
173
|
+
export * from './visualizations/types/IResultsRunner';
|
|
174
|
+
export const validateEmail = (email) => {
|
|
175
|
+
if (/\s/.test(email)) {
|
|
176
|
+
return false;
|
|
177
|
+
}
|
|
178
|
+
const re = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
|
|
179
|
+
return re.test(String(email).toLowerCase());
|
|
180
|
+
};
|
|
181
|
+
export const getEmailSchema = () => z
|
|
182
|
+
.string()
|
|
183
|
+
.refine((email) => validateEmail(email), {
|
|
184
|
+
message: 'Email address is not valid',
|
|
185
|
+
})
|
|
186
|
+
.refine((email) => !/\s/.test(email), {
|
|
187
|
+
message: 'Email address must not contain whitespaces',
|
|
188
|
+
});
|
|
189
|
+
export const getPasswordSchema = () => z
|
|
190
|
+
.string()
|
|
191
|
+
.min(8, { message: 'must be at least 8 characters long' })
|
|
192
|
+
.regex(/[a-zA-Z]/, { message: 'must contain a letter' })
|
|
193
|
+
.regex(/[\d\W_]/, { message: 'must contain a number or symbol' });
|
|
194
|
+
export const validatePassword = (password) => getPasswordSchema().safeParse(password).success;
|
|
195
|
+
export const hasIntersection = (tags, tags2) => {
|
|
196
|
+
const intersection = tags.filter((value) => tags2.includes(value));
|
|
197
|
+
return intersection.length > 0;
|
|
198
|
+
};
|
|
199
|
+
export const toggleArrayValue = (initialArray, value) => {
|
|
200
|
+
const array = [...initialArray];
|
|
201
|
+
const index = array.indexOf(value);
|
|
202
|
+
if (index === -1) {
|
|
203
|
+
array.push(value);
|
|
204
|
+
}
|
|
205
|
+
else {
|
|
206
|
+
array.splice(index, 1);
|
|
207
|
+
}
|
|
208
|
+
return array;
|
|
209
|
+
};
|
|
210
|
+
export const replaceStringInArray = (arrayToUpdate, valueToReplace, newValue) => arrayToUpdate.map((value) => (value === valueToReplace ? newValue : value));
|
|
211
|
+
export function hexToRGB(hex, alpha) {
|
|
212
|
+
const r = parseInt(hex.slice(1, 3), 16);
|
|
213
|
+
const g = parseInt(hex.slice(3, 5), 16);
|
|
214
|
+
const b = parseInt(hex.slice(5, 7), 16);
|
|
215
|
+
if (alpha !== undefined) {
|
|
216
|
+
return `rgba(${r}, ${g}, ${b}, ${alpha})`;
|
|
217
|
+
}
|
|
218
|
+
return `rgb(${r}, ${g}, ${b})`;
|
|
219
|
+
}
|
|
220
|
+
// Seeds
|
|
221
|
+
export const SEED_ORG_1 = {
|
|
222
|
+
organization_uuid: '172a2270-000f-42be-9c68-c4752c23ae51',
|
|
223
|
+
organization_name: 'Jaffle Shop',
|
|
224
|
+
};
|
|
225
|
+
export const SEED_ORG_1_ADMIN = {
|
|
226
|
+
user_uuid: 'b264d83a-9000-426a-85ec-3f9c20f368ce',
|
|
227
|
+
first_name: 'David',
|
|
228
|
+
last_name: 'Attenborough',
|
|
229
|
+
is_marketing_opted_in: true,
|
|
230
|
+
is_tracking_anonymized: false,
|
|
231
|
+
is_setup_complete: true,
|
|
232
|
+
is_active: true,
|
|
233
|
+
};
|
|
234
|
+
export const SEED_ORG_1_ADMIN_EMAIL = {
|
|
235
|
+
email: 'demo@lightdash.com',
|
|
236
|
+
is_primary: true,
|
|
237
|
+
};
|
|
238
|
+
export const SEED_ORG_1_ADMIN_PASSWORD = {
|
|
239
|
+
password: 'demo_password!',
|
|
240
|
+
};
|
|
241
|
+
export const SEED_ORG_1_ADMIN_ROLE = OrganizationMemberRole.ADMIN;
|
|
242
|
+
export const SEED_ORG_1_EDITOR = {
|
|
243
|
+
user_uuid: '80fb8b59-d6b7-4ed6-b969-9849310f3e53',
|
|
244
|
+
first_name: 'Editor',
|
|
245
|
+
last_name: 'User',
|
|
246
|
+
is_marketing_opted_in: true,
|
|
247
|
+
is_tracking_anonymized: false,
|
|
248
|
+
is_setup_complete: true,
|
|
249
|
+
is_active: true,
|
|
250
|
+
};
|
|
251
|
+
export const SEED_ORG_1_EDITOR_EMAIL = {
|
|
252
|
+
email: 'demo2@lightdash.com',
|
|
253
|
+
is_primary: true,
|
|
254
|
+
};
|
|
255
|
+
export const SEED_ORG_1_EDITOR_PASSWORD = {
|
|
256
|
+
password: 'demo_password!',
|
|
257
|
+
};
|
|
258
|
+
export const SEED_ORG_1_EDITOR_ROLE = OrganizationMemberRole.EDITOR;
|
|
259
|
+
export const SEED_ORG_1_VIEWER = {
|
|
260
|
+
user_uuid: 'e0dd2003-c291-4e14-b977-7a03b7edc842',
|
|
261
|
+
first_name: 'Viewer',
|
|
262
|
+
last_name: 'User',
|
|
263
|
+
is_marketing_opted_in: true,
|
|
264
|
+
is_tracking_anonymized: false,
|
|
265
|
+
is_setup_complete: true,
|
|
266
|
+
is_active: true,
|
|
267
|
+
};
|
|
268
|
+
export const SEED_ORG_1_VIEWER_EMAIL = {
|
|
269
|
+
email: 'demo3@lightdash.com',
|
|
270
|
+
is_primary: true,
|
|
271
|
+
};
|
|
272
|
+
export const SEED_ORG_1_VIEWER_PASSWORD = {
|
|
273
|
+
password: 'demo_password!',
|
|
274
|
+
};
|
|
275
|
+
export const SEED_ORG_1_VIEWER_ROLE = OrganizationMemberRole.VIEWER;
|
|
276
|
+
// Another user
|
|
277
|
+
export const SEED_ORG_2 = {
|
|
278
|
+
organization_uuid: '42339eef-359e-4ec4-b810-54ef0b4e3446',
|
|
279
|
+
organization_name: 'Another Shop',
|
|
280
|
+
};
|
|
281
|
+
export const SEED_ORG_2_ADMIN = {
|
|
282
|
+
user_uuid: '57cd4548-cbe3-42b3-aa13-97821713e307',
|
|
283
|
+
first_name: 'Another',
|
|
284
|
+
last_name: 'User',
|
|
285
|
+
is_marketing_opted_in: true,
|
|
286
|
+
is_tracking_anonymized: false,
|
|
287
|
+
is_setup_complete: true,
|
|
288
|
+
is_active: true,
|
|
289
|
+
};
|
|
290
|
+
export const SEED_ORG_2_ADMIN_EMAIL = {
|
|
291
|
+
email: 'another@lightdash.com',
|
|
292
|
+
is_primary: true,
|
|
293
|
+
};
|
|
294
|
+
export const SEED_ORG_2_ADMIN_PASSWORD = {
|
|
295
|
+
password: 'demo_password!',
|
|
296
|
+
};
|
|
297
|
+
export const SEED_ORG_2_ADMIN_ROLE = OrganizationMemberRole.ADMIN;
|
|
298
|
+
export const SEED_EMBED_SECRET = 'zU3h50saDOO20czNFNRok';
|
|
299
|
+
export const SEED_PROJECT = {
|
|
300
|
+
project_uuid: '3675b69e-8324-4110-bdca-059031aa8da3',
|
|
301
|
+
name: 'Jaffle shop',
|
|
302
|
+
project_type: ProjectType.DEFAULT,
|
|
303
|
+
dbt_connection_type: DbtProjectType.DBT,
|
|
304
|
+
dbt_connection: null,
|
|
305
|
+
copied_from_project_uuid: null,
|
|
306
|
+
organization_warehouse_credentials_uuid: null,
|
|
307
|
+
};
|
|
308
|
+
export const SEED_SPACE = {
|
|
309
|
+
name: SEED_PROJECT.name,
|
|
310
|
+
};
|
|
311
|
+
export const SEED_GROUP = {
|
|
312
|
+
groupUuid: '9d615ede-5758-4954-9fb9-2a07fc415ba5',
|
|
313
|
+
name: 'Org 1 Group',
|
|
314
|
+
};
|
|
315
|
+
export const SEED_GROUP_2 = {
|
|
316
|
+
groupUuid: '1456c265-f375-4d64-bd33-105c84ad9b5d',
|
|
317
|
+
name: 'Org 1 Editor Group',
|
|
318
|
+
};
|
|
319
|
+
export const getVisibleFields = (explore) => getFields(explore).filter(({ hidden }) => !hidden);
|
|
320
|
+
export const findFieldByIdInExplore = (explore, id) => getFields(explore).find((field) => getItemId(field) === id);
|
|
321
|
+
export const snakeCaseName = (text) => text
|
|
322
|
+
.replace(/\W+/g, ' ')
|
|
323
|
+
.split(/ |\B(?=[A-Z])/)
|
|
324
|
+
.map((word) => word.toLowerCase())
|
|
325
|
+
.join('_');
|
|
326
|
+
export const hasSpecialCharacters = (text) => /[^a-zA-Z ]/g.test(text);
|
|
327
|
+
export const CompleteUserSchema = z.object({
|
|
328
|
+
organizationName: getOrganizationNameSchema().optional(),
|
|
329
|
+
jobTitle: z.string().min(0),
|
|
330
|
+
enableEmailDomainAccess: z.boolean().default(false),
|
|
331
|
+
isMarketingOptedIn: z.boolean().default(true),
|
|
332
|
+
isTrackingAnonymized: z.boolean().default(false),
|
|
333
|
+
});
|
|
334
|
+
export const isLightdashMode = (x) => Object.values(LightdashMode).includes(x);
|
|
335
|
+
export var LightdashInstallType;
|
|
336
|
+
(function (LightdashInstallType) {
|
|
337
|
+
LightdashInstallType["DOCKER_IMAGE"] = "docker_image";
|
|
338
|
+
LightdashInstallType["BASH_INSTALL"] = "bash_install";
|
|
339
|
+
LightdashInstallType["HEROKU"] = "heroku";
|
|
340
|
+
LightdashInstallType["UNKNOWN"] = "unknown";
|
|
341
|
+
})(LightdashInstallType || (LightdashInstallType = {}));
|
|
342
|
+
export const getResultValueArray = (rows, preferRaw = false, calculateMinAndMax = false, excludeNulls = false) => {
|
|
343
|
+
const minMax = {};
|
|
344
|
+
const results = rows.map((row) => Object.keys(row).reduce((acc, key) => {
|
|
345
|
+
if (excludeNulls && row[key]?.value.raw === null) {
|
|
346
|
+
return acc;
|
|
347
|
+
}
|
|
348
|
+
const rawWithFallback = row[key]?.value.raw ?? row[key]?.value.formatted; // using nullish coalescing operator to handle null and undefined only
|
|
349
|
+
const formattedWithFallback = row[key]?.value.formatted || row[key]?.value.raw;
|
|
350
|
+
const value = preferRaw ? rawWithFallback : formattedWithFallback;
|
|
351
|
+
acc[key] = value;
|
|
352
|
+
if (calculateMinAndMax) {
|
|
353
|
+
const numericValue = Number(value);
|
|
354
|
+
if (!Number.isNaN(numericValue)) {
|
|
355
|
+
if (!minMax[key]) {
|
|
356
|
+
minMax[key] = { min: numericValue, max: numericValue };
|
|
357
|
+
}
|
|
358
|
+
else {
|
|
359
|
+
minMax[key].min = Math.min(minMax[key].min, numericValue);
|
|
360
|
+
minMax[key].max = Math.max(minMax[key].max, numericValue);
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
return acc;
|
|
365
|
+
}, {}));
|
|
366
|
+
return calculateMinAndMax ? { results, minsAndMaxes: minMax } : { results };
|
|
367
|
+
};
|
|
368
|
+
export const getDateGroupLabel = (axisItem) => {
|
|
369
|
+
if (isDimension(axisItem) &&
|
|
370
|
+
[DimensionType.DATE, DimensionType.TIMESTAMP].includes(axisItem.type) &&
|
|
371
|
+
(axisItem.group || (axisItem.groups && axisItem.groups.length > 0)) &&
|
|
372
|
+
axisItem.label &&
|
|
373
|
+
axisItem.timeInterval) {
|
|
374
|
+
const timeFrame = TimeFrames[axisItem.timeInterval]?.toLowerCase() || '';
|
|
375
|
+
if (timeFrame && axisItem.label.endsWith(` ${timeFrame}`)) {
|
|
376
|
+
// Remove the time frame from the end of the label - e.g. from 'Order created day' to 'Order created'.
|
|
377
|
+
return getItemLabelWithoutTableName(axisItem).replace(new RegExp(`\\s+${timeFrame}$`), '');
|
|
378
|
+
}
|
|
379
|
+
return friendlyName(axisItem.label);
|
|
380
|
+
}
|
|
381
|
+
return undefined;
|
|
382
|
+
};
|
|
383
|
+
export const getAxisName = ({ isAxisTheSameForAllSeries, selectedAxisIndex, axisReference, axisIndex, axisName, series, itemsMap, }) => {
|
|
384
|
+
const itemIndex = (series || [])[0]?.encode[axisReference].field;
|
|
385
|
+
const defaultItem = itemsMap && itemIndex ? itemsMap[itemIndex] : undefined;
|
|
386
|
+
const dateGroupName = defaultItem
|
|
387
|
+
? getDateGroupLabel(defaultItem)
|
|
388
|
+
: undefined;
|
|
389
|
+
const fallbackSeriesName = series && series.length === 1
|
|
390
|
+
? series[0]?.name ||
|
|
391
|
+
(defaultItem && getItemLabelWithoutTableName(defaultItem))
|
|
392
|
+
: undefined;
|
|
393
|
+
return !isAxisTheSameForAllSeries || selectedAxisIndex === axisIndex
|
|
394
|
+
? axisName || dateGroupName || fallbackSeriesName
|
|
395
|
+
: undefined;
|
|
396
|
+
};
|
|
397
|
+
export function getFieldMap(explore, additionalMetrics = []) {
|
|
398
|
+
return [...getFields(explore), ...additionalMetrics].reduce((sum, field) => ({
|
|
399
|
+
...sum,
|
|
400
|
+
[getItemId(field)]: field,
|
|
401
|
+
}), {});
|
|
402
|
+
}
|
|
403
|
+
export function getItemMap(explore, additionalMetrics = [], tableCalculations = [], customDimensions = []) {
|
|
404
|
+
const convertedAdditionalMetrics = (additionalMetrics || []).reduce((acc, additionalMetric) => {
|
|
405
|
+
const table = explore.tables[additionalMetric.table];
|
|
406
|
+
if (table) {
|
|
407
|
+
const metric = convertAdditionalMetric({
|
|
408
|
+
additionalMetric,
|
|
409
|
+
table,
|
|
410
|
+
});
|
|
411
|
+
return [...acc, metric];
|
|
412
|
+
}
|
|
413
|
+
return acc;
|
|
414
|
+
}, []);
|
|
415
|
+
return [
|
|
416
|
+
...getFields(explore),
|
|
417
|
+
...convertedAdditionalMetrics,
|
|
418
|
+
...tableCalculations,
|
|
419
|
+
...customDimensions,
|
|
420
|
+
].reduce((acc, item) => ({
|
|
421
|
+
...acc,
|
|
422
|
+
[getItemId(item)]: item,
|
|
423
|
+
}), {});
|
|
424
|
+
}
|
|
425
|
+
export const getDimensionsFromItemsMap = (itemsMap) => Object.entries(itemsMap).reduce((acc, [key, value]) => {
|
|
426
|
+
if (isDimension(value) || isCustomDimension(value)) {
|
|
427
|
+
return { ...acc, [key]: value };
|
|
428
|
+
}
|
|
429
|
+
return acc;
|
|
430
|
+
}, {});
|
|
431
|
+
export const getFilterableDimensionsFromItemsMap = (itemsMap) => Object.entries(itemsMap).reduce((acc, [key, value]) => {
|
|
432
|
+
if (isDimension(value) && isFilterableDimension(value)) {
|
|
433
|
+
return { ...acc, [key]: value };
|
|
434
|
+
}
|
|
435
|
+
return acc;
|
|
436
|
+
}, {});
|
|
437
|
+
export const getMetricsFromItemsMap = (itemsMap, filter = () => true) => Object.entries(itemsMap).reduce((acc, [key, value]) => {
|
|
438
|
+
if (isField(value) && isMetric(value) && filter(value)) {
|
|
439
|
+
return { ...acc, [key]: value };
|
|
440
|
+
}
|
|
441
|
+
return acc;
|
|
442
|
+
}, {});
|
|
443
|
+
export const getTableCalculationsFromItemsMap = (itemsMap) => Object.entries(itemsMap ?? {}).reduce((acc, [key, value]) => {
|
|
444
|
+
if (isTableCalculation(value)) {
|
|
445
|
+
return { ...acc, [key]: value };
|
|
446
|
+
}
|
|
447
|
+
return acc;
|
|
448
|
+
}, {});
|
|
449
|
+
export function itemsInMetricQuery(metricQuery) {
|
|
450
|
+
return metricQuery === undefined
|
|
451
|
+
? []
|
|
452
|
+
: [
|
|
453
|
+
...metricQuery.metrics,
|
|
454
|
+
...metricQuery.dimensions,
|
|
455
|
+
...(metricQuery.tableCalculations || []).map((tc) => tc.name),
|
|
456
|
+
];
|
|
457
|
+
}
|
|
458
|
+
export function formatRawValue(field, value) {
|
|
459
|
+
const isTimestamp = isField(field) &&
|
|
460
|
+
(field.type === DimensionType.DATE ||
|
|
461
|
+
field.type === DimensionType.TIMESTAMP);
|
|
462
|
+
if (isTimestamp && value !== null) {
|
|
463
|
+
// We want to return the datetime in UTC to avoid timezone issues in the frontend like in chart tooltips
|
|
464
|
+
return dayjs(value).utc(true).format();
|
|
465
|
+
}
|
|
466
|
+
return value;
|
|
467
|
+
}
|
|
468
|
+
// ! We format raw values so we can't use the values directly from the warehouse to compare with subtotals of date dimensions
|
|
469
|
+
export function formatRawRows(rows, itemsMap) {
|
|
470
|
+
return rows.map((row) => {
|
|
471
|
+
const resultRow = {};
|
|
472
|
+
const columnNames = Object.keys(row || {});
|
|
473
|
+
for (const columnName of columnNames) {
|
|
474
|
+
const value = row[columnName];
|
|
475
|
+
const item = itemsMap[columnName];
|
|
476
|
+
resultRow[columnName] = formatRawValue(item, value);
|
|
477
|
+
}
|
|
478
|
+
return resultRow;
|
|
479
|
+
});
|
|
480
|
+
}
|
|
481
|
+
export function formatRow(row, itemsMap, pivotValuesColumns) {
|
|
482
|
+
const resultRow = {};
|
|
483
|
+
const columnNames = Object.keys(row || {});
|
|
484
|
+
for (const columnName of columnNames) {
|
|
485
|
+
const value = row[columnName];
|
|
486
|
+
const pivotValuesColumn = pivotValuesColumns?.[columnName];
|
|
487
|
+
const item = itemsMap[pivotValuesColumn?.referenceField ?? columnName];
|
|
488
|
+
resultRow[columnName] = {
|
|
489
|
+
value: {
|
|
490
|
+
raw: formatRawValue(item, value),
|
|
491
|
+
formatted: formatItemValue(item, value),
|
|
492
|
+
},
|
|
493
|
+
};
|
|
494
|
+
}
|
|
495
|
+
return resultRow;
|
|
496
|
+
}
|
|
497
|
+
export function formatRows(rows, itemsMap, pivotValuesColumns) {
|
|
498
|
+
return rows.map((row) => formatRow(row, itemsMap, pivotValuesColumns));
|
|
499
|
+
}
|
|
500
|
+
const isObject = (object) => object != null && typeof object === 'object';
|
|
501
|
+
export const removeEmptyProperties = (object) => {
|
|
502
|
+
const newObj = {};
|
|
503
|
+
Object.keys(object).forEach((key) => {
|
|
504
|
+
if (object[key] === Object(object[key]))
|
|
505
|
+
newObj[key] = removeEmptyProperties(object[key]);
|
|
506
|
+
else if (object[key] !== undefined && object[key] !== null)
|
|
507
|
+
newObj[key] = object[key];
|
|
508
|
+
});
|
|
509
|
+
return newObj;
|
|
510
|
+
};
|
|
511
|
+
export const deepEqual = (object1, object2) => {
|
|
512
|
+
const keys1 = Object.keys(object1);
|
|
513
|
+
const keys2 = Object.keys(object2);
|
|
514
|
+
if (keys1.length !== keys2.length) {
|
|
515
|
+
return false;
|
|
516
|
+
}
|
|
517
|
+
return keys1.every((key) => {
|
|
518
|
+
const val1 = object1[key];
|
|
519
|
+
const val2 = object2[key];
|
|
520
|
+
const areObjects = isObject(val1) && isObject(val2);
|
|
521
|
+
return !((areObjects && !deepEqual(val1, val2)) ||
|
|
522
|
+
(!areObjects && val1 !== val2));
|
|
523
|
+
});
|
|
524
|
+
};
|
|
525
|
+
export const getProjectDirectory = (dbtConnection) => {
|
|
526
|
+
if (!dbtConnection)
|
|
527
|
+
return undefined;
|
|
528
|
+
switch (dbtConnection.type) {
|
|
529
|
+
case DbtProjectType.DBT:
|
|
530
|
+
return dbtConnection.project_dir;
|
|
531
|
+
case DbtProjectType.GITHUB:
|
|
532
|
+
case DbtProjectType.GITLAB:
|
|
533
|
+
case DbtProjectType.BITBUCKET:
|
|
534
|
+
case DbtProjectType.AZURE_DEVOPS:
|
|
535
|
+
return dbtConnection.project_sub_path;
|
|
536
|
+
case DbtProjectType.DBT_CLOUD_IDE:
|
|
537
|
+
case DbtProjectType.NONE:
|
|
538
|
+
return undefined;
|
|
539
|
+
default:
|
|
540
|
+
return undefined;
|
|
541
|
+
}
|
|
542
|
+
};
|
|
543
|
+
export function isNotNull(arg) {
|
|
544
|
+
return arg !== null;
|
|
545
|
+
}
|
|
546
|
+
export const SPACE_TREE_1 = [
|
|
547
|
+
{
|
|
548
|
+
name: 'Parent Space 1',
|
|
549
|
+
children: [
|
|
550
|
+
{
|
|
551
|
+
name: 'Child Space 1.1',
|
|
552
|
+
children: [
|
|
553
|
+
{
|
|
554
|
+
name: 'Grandchild Space 1.1.1',
|
|
555
|
+
},
|
|
556
|
+
{
|
|
557
|
+
name: 'Grandchild Space 1.1.2',
|
|
558
|
+
},
|
|
559
|
+
],
|
|
560
|
+
},
|
|
561
|
+
{
|
|
562
|
+
name: 'Child Space 1.2',
|
|
563
|
+
children: [
|
|
564
|
+
{
|
|
565
|
+
name: 'Grandchild Space 1.2.1',
|
|
566
|
+
},
|
|
567
|
+
{
|
|
568
|
+
name: 'Grandchild Space 1.2.2',
|
|
569
|
+
children: [
|
|
570
|
+
{
|
|
571
|
+
name: 'Great Grandchild Space 1.2.2.1',
|
|
572
|
+
},
|
|
573
|
+
],
|
|
574
|
+
},
|
|
575
|
+
],
|
|
576
|
+
},
|
|
577
|
+
{
|
|
578
|
+
name: 'Child Space 1.3',
|
|
579
|
+
children: [
|
|
580
|
+
{
|
|
581
|
+
name: 'Grandchild Space 1.3.1',
|
|
582
|
+
children: [
|
|
583
|
+
{
|
|
584
|
+
name: 'Great Grandchild Space 1.3.1.1',
|
|
585
|
+
},
|
|
586
|
+
],
|
|
587
|
+
},
|
|
588
|
+
],
|
|
589
|
+
},
|
|
590
|
+
],
|
|
591
|
+
},
|
|
592
|
+
{
|
|
593
|
+
name: 'Parent Space 2',
|
|
594
|
+
isPrivate: true,
|
|
595
|
+
children: [
|
|
596
|
+
{
|
|
597
|
+
name: 'Child Space 2.1',
|
|
598
|
+
children: [
|
|
599
|
+
{
|
|
600
|
+
name: 'Grandchild Space 2.1.1',
|
|
601
|
+
},
|
|
602
|
+
],
|
|
603
|
+
},
|
|
604
|
+
],
|
|
605
|
+
},
|
|
606
|
+
{
|
|
607
|
+
name: 'Parent Space 3',
|
|
608
|
+
isPrivate: true,
|
|
609
|
+
access: [
|
|
610
|
+
// Admin will automatically be added, we only seed editor
|
|
611
|
+
{
|
|
612
|
+
userUuid: SEED_ORG_1_EDITOR.user_uuid,
|
|
613
|
+
role: SpaceMemberRole.EDITOR,
|
|
614
|
+
},
|
|
615
|
+
],
|
|
616
|
+
children: [
|
|
617
|
+
{
|
|
618
|
+
name: 'Child Space 3.1',
|
|
619
|
+
},
|
|
620
|
+
],
|
|
621
|
+
},
|
|
622
|
+
// Created by admin and added group access
|
|
623
|
+
{
|
|
624
|
+
name: 'Parent Space 5',
|
|
625
|
+
isPrivate: true,
|
|
626
|
+
access: [],
|
|
627
|
+
groupAccess: [
|
|
628
|
+
{
|
|
629
|
+
groupUuid: SEED_GROUP_2.groupUuid,
|
|
630
|
+
role: SpaceMemberRole.EDITOR,
|
|
631
|
+
},
|
|
632
|
+
],
|
|
633
|
+
children: [
|
|
634
|
+
{
|
|
635
|
+
name: 'Child Space 5.1',
|
|
636
|
+
},
|
|
637
|
+
],
|
|
638
|
+
},
|
|
639
|
+
];
|
|
640
|
+
export const SPACE_TREE_2 = [
|
|
641
|
+
{
|
|
642
|
+
name: 'Parent Space 4',
|
|
643
|
+
isPrivate: true,
|
|
644
|
+
access: [],
|
|
645
|
+
children: [
|
|
646
|
+
{
|
|
647
|
+
name: 'Child Space 4.1',
|
|
648
|
+
},
|
|
649
|
+
],
|
|
650
|
+
},
|
|
651
|
+
];
|
|
652
|
+
//# sourceMappingURL=index.js.map
|