@lightdash/common 0.2104.6 → 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,60 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { AiResultType } from '../../types';
|
|
3
|
+
import { baseOutputMetadataSchema } from '../outputMetadata';
|
|
4
|
+
import { createToolSchema } from '../toolSchemaBuilder';
|
|
5
|
+
export const TOOL_IMPROVE_CONTEXT_DESCRIPTION = `
|
|
6
|
+
Captures learnings from user corrections, clarifications, and guidance to improve future responses.
|
|
7
|
+
|
|
8
|
+
**Supported Learning Categories:**
|
|
9
|
+
- explore_selection: Which tables/explores to use for specific types of queries
|
|
10
|
+
- field_selection: Which fields to use for specific metrics or dimensions
|
|
11
|
+
- filter_logic: How to apply filters for calculations
|
|
12
|
+
- calculation: How to perform specific calculations or aggregations
|
|
13
|
+
- other: General preferences, formatting, or methodologies
|
|
14
|
+
|
|
15
|
+
**Technical Requirements:**
|
|
16
|
+
- Must provide original query context that led to the learning
|
|
17
|
+
- Must capture what was incorrect and what the correct approach is
|
|
18
|
+
- Must categorize the learning into one of the supported categories
|
|
19
|
+
- Must provide a confidence score (0-1) indicating if this is a learnable pattern
|
|
20
|
+
- Must generate a clear, actionable instruction to append to agent settings
|
|
21
|
+
- Instructions should be specific and context-aware (not overly generic)
|
|
22
|
+
`;
|
|
23
|
+
export const toolImproveContextArgsSchema = createToolSchema({
|
|
24
|
+
type: AiResultType.IMPROVE_CONTEXT,
|
|
25
|
+
description: TOOL_IMPROVE_CONTEXT_DESCRIPTION,
|
|
26
|
+
})
|
|
27
|
+
.extend({
|
|
28
|
+
originalQuery: z
|
|
29
|
+
.string()
|
|
30
|
+
.describe('The original user query that led to incorrect results'),
|
|
31
|
+
incorrectResponse: z
|
|
32
|
+
.string()
|
|
33
|
+
.describe('What the AI incorrectly suggested or returned'),
|
|
34
|
+
correctResponse: z
|
|
35
|
+
.string()
|
|
36
|
+
.describe('What the user corrected or clarified'),
|
|
37
|
+
category: z
|
|
38
|
+
.enum([
|
|
39
|
+
'explore_selection',
|
|
40
|
+
'field_selection',
|
|
41
|
+
'filter_logic',
|
|
42
|
+
'calculation',
|
|
43
|
+
'other',
|
|
44
|
+
])
|
|
45
|
+
.describe('Category of the learning'),
|
|
46
|
+
confidence: z
|
|
47
|
+
.number()
|
|
48
|
+
.min(0)
|
|
49
|
+
.max(1)
|
|
50
|
+
.describe('Confidence score that this is a learnable learning or more context is needed'),
|
|
51
|
+
suggestedInstruction: z
|
|
52
|
+
.string()
|
|
53
|
+
.describe('The instruction to append to agent settings'),
|
|
54
|
+
})
|
|
55
|
+
.build();
|
|
56
|
+
export const toolImproveContextOutputSchema = z.object({
|
|
57
|
+
result: z.string(),
|
|
58
|
+
metadata: baseOutputMetadataSchema,
|
|
59
|
+
});
|
|
60
|
+
//# sourceMappingURL=toolImproveContextArgs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toolImproveContextArgs.js","sourceRoot":"","sources":["../../../../../../src/ee/AiAgent/schemas/tools/toolImproveContextArgs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD,MAAM,CAAC,MAAM,gCAAgC,GAAG;;;;;;;;;;;;;;;;;CAiB/C,CAAC;AAEF,MAAM,CAAC,MAAM,4BAA4B,GAAG,gBAAgB,CAAC;IACzD,IAAI,EAAE,YAAY,CAAC,eAAe;IAClC,WAAW,EAAE,gCAAgC;CAChD,CAAC;KACG,MAAM,CAAC;IACJ,aAAa,EAAE,CAAC;SACX,MAAM,EAAE;SACR,QAAQ,CAAC,uDAAuD,CAAC;IACtE,iBAAiB,EAAE,CAAC;SACf,MAAM,EAAE;SACR,QAAQ,CAAC,+CAA+C,CAAC;IAC9D,eAAe,EAAE,CAAC;SACb,MAAM,EAAE;SACR,QAAQ,CAAC,sCAAsC,CAAC;IACrD,QAAQ,EAAE,CAAC;SACN,IAAI,CAAC;QACF,mBAAmB;QACnB,iBAAiB;QACjB,cAAc;QACd,aAAa;QACb,OAAO;KACV,CAAC;SACD,QAAQ,CAAC,0BAA0B,CAAC;IACzC,UAAU,EAAE,CAAC;SACR,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,CAAC;SACN,GAAG,CAAC,CAAC,CAAC;SACN,QAAQ,CACL,8EAA8E,CACjF;IACL,oBAAoB,EAAE,CAAC;SAClB,MAAM,EAAE;SACR,QAAQ,CAAC,6CAA6C,CAAC;CAC/D,CAAC;KACD,KAAK,EAAE,CAAC;AAMb,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,CAAC,MAAM,CAAC;IACnD,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAClB,QAAQ,EAAE,wBAAwB;CACrC,CAAC,CAAC"}
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { AiResultType } from '../../types';
|
|
3
|
+
import { customMetricBaseSchema } from '../customMetrics';
|
|
4
|
+
import { getFieldIdSchema } from '../fieldId';
|
|
5
|
+
import { createToolSchema } from '../toolSchemaBuilder';
|
|
6
|
+
// ============================================================================
|
|
7
|
+
// Tool Description
|
|
8
|
+
// ============================================================================
|
|
9
|
+
export const TOOL_PROPOSE_CHANGE_DESCRIPTION = `
|
|
10
|
+
Creates a change proposal for tables, metrics, and dimensions. Changes are applied immediately but can be reviewed and rejected afterward.
|
|
11
|
+
|
|
12
|
+
**Supported Operations:**
|
|
13
|
+
- Update table descriptions and labels
|
|
14
|
+
- Update metric/dimension descriptions and labels
|
|
15
|
+
- Create new metrics
|
|
16
|
+
|
|
17
|
+
**Technical Requirements:**
|
|
18
|
+
- When updating descriptions or labels, must preserve as much original content as possible
|
|
19
|
+
- Descriptions should maintain their original format (preserve complete value and formatting)
|
|
20
|
+
- Must provide entity table name, rationale, and change details
|
|
21
|
+
- Changes are tracked with proposer information and timestamp
|
|
22
|
+
- For updates: use "replace" operation with complete updated value (not partial)
|
|
23
|
+
- For adding new properties: use "add" operation (creates property if it does not exist)
|
|
24
|
+
- For new metrics: use "create" operation with full metric definition
|
|
25
|
+
`;
|
|
26
|
+
const getPatchDescription = (type) => `Patch to apply to the ${type}. You can omit/set-to-null any fields you don't want to change.`;
|
|
27
|
+
// ============================================================================
|
|
28
|
+
// Operation Schemas
|
|
29
|
+
// ============================================================================
|
|
30
|
+
/**
|
|
31
|
+
* Op schema can be configured on per-field basis to have a appropriate type and allow applicable operations
|
|
32
|
+
*/
|
|
33
|
+
const getOpSchema = (type) => z.discriminatedUnion('op', [
|
|
34
|
+
z
|
|
35
|
+
.object({ op: z.literal('replace'), value: type })
|
|
36
|
+
.describe([
|
|
37
|
+
'Replace (overwrite) the value of the field.',
|
|
38
|
+
'Updates the **entire** value of the field to reflect the necessary changes, replacing the current value entirely.',
|
|
39
|
+
'Even if only the part is being changed, make sure to pass the entire value with changes included so that no part is lost.',
|
|
40
|
+
].join('\n')),
|
|
41
|
+
z
|
|
42
|
+
.object({ op: z.literal('add'), value: type })
|
|
43
|
+
.describe('Add a new value to the field. (Creates a new property if it does not exist)'),
|
|
44
|
+
// z.object({
|
|
45
|
+
// op: z.literal("push"),
|
|
46
|
+
// value: z.any(),
|
|
47
|
+
// index: z.number().nullable() // add later to support `"path": "/tags/-"` / "path": "/tags/0" if no index, default to ops on array
|
|
48
|
+
// }),
|
|
49
|
+
// z.object({ op: z.literal("remove") }),
|
|
50
|
+
]);
|
|
51
|
+
const stringOpSchema = getOpSchema(z.string());
|
|
52
|
+
// ============================================================================
|
|
53
|
+
// Entity Change Schemas
|
|
54
|
+
// ============================================================================
|
|
55
|
+
const TableChangeSchema = z.discriminatedUnion('type', [
|
|
56
|
+
z.object({
|
|
57
|
+
type: z.literal('update'),
|
|
58
|
+
patch: z
|
|
59
|
+
.object({
|
|
60
|
+
description: stringOpSchema.nullable(),
|
|
61
|
+
label: stringOpSchema.nullable(),
|
|
62
|
+
})
|
|
63
|
+
.describe(getPatchDescription('table')),
|
|
64
|
+
}),
|
|
65
|
+
]);
|
|
66
|
+
const DimensionChangeSchema = z.discriminatedUnion('type', [
|
|
67
|
+
z.object({
|
|
68
|
+
type: z.literal('update'),
|
|
69
|
+
patch: z
|
|
70
|
+
.object({
|
|
71
|
+
label: stringOpSchema.nullable(),
|
|
72
|
+
description: stringOpSchema.nullable(),
|
|
73
|
+
})
|
|
74
|
+
.describe(getPatchDescription('dimension')),
|
|
75
|
+
}),
|
|
76
|
+
// z.object({
|
|
77
|
+
// type: z.literal('delete'),
|
|
78
|
+
// })
|
|
79
|
+
]);
|
|
80
|
+
const MetricChangeSchema = z.discriminatedUnion('type', [
|
|
81
|
+
z.object({
|
|
82
|
+
type: z.literal('create'),
|
|
83
|
+
value: z.discriminatedUnion('entityType', [
|
|
84
|
+
z
|
|
85
|
+
.object({
|
|
86
|
+
entityType: z.literal('metric'),
|
|
87
|
+
metric: customMetricBaseSchema,
|
|
88
|
+
})
|
|
89
|
+
.describe('Create a new metric'),
|
|
90
|
+
]),
|
|
91
|
+
}),
|
|
92
|
+
z.object({
|
|
93
|
+
type: z.literal('update'),
|
|
94
|
+
patch: z
|
|
95
|
+
.object({
|
|
96
|
+
label: stringOpSchema.nullable(),
|
|
97
|
+
description: stringOpSchema.nullable(),
|
|
98
|
+
// aiHint: OpSchema,
|
|
99
|
+
})
|
|
100
|
+
.describe(getPatchDescription('metric')),
|
|
101
|
+
}),
|
|
102
|
+
]);
|
|
103
|
+
// ============================================================================
|
|
104
|
+
// Main Change Schema
|
|
105
|
+
// ============================================================================
|
|
106
|
+
const changeSchema = z.discriminatedUnion('entityType', [
|
|
107
|
+
z.object({
|
|
108
|
+
entityType: z.literal('table'),
|
|
109
|
+
value: TableChangeSchema,
|
|
110
|
+
}),
|
|
111
|
+
z.object({
|
|
112
|
+
entityType: z.literal('dimension'),
|
|
113
|
+
fieldId: getFieldIdSchema({ additionalDescription: '' }),
|
|
114
|
+
value: DimensionChangeSchema,
|
|
115
|
+
}),
|
|
116
|
+
z.object({
|
|
117
|
+
entityType: z.literal('metric'),
|
|
118
|
+
fieldId: getFieldIdSchema({
|
|
119
|
+
additionalDescription: 'if you are creating a new metric, this is the field id of the new metric not the dimension id',
|
|
120
|
+
}),
|
|
121
|
+
value: MetricChangeSchema,
|
|
122
|
+
}),
|
|
123
|
+
]);
|
|
124
|
+
// ============================================================================
|
|
125
|
+
// Tool Schema Export
|
|
126
|
+
// ============================================================================
|
|
127
|
+
export const toolProposeChangeArgsSchema = createToolSchema({
|
|
128
|
+
type: AiResultType.PROPOSE_CHANGE,
|
|
129
|
+
description: TOOL_PROPOSE_CHANGE_DESCRIPTION,
|
|
130
|
+
})
|
|
131
|
+
.extend({
|
|
132
|
+
entityTableName: z
|
|
133
|
+
.string()
|
|
134
|
+
.describe('The name of the table/explore being modified'),
|
|
135
|
+
rationale: z
|
|
136
|
+
.string()
|
|
137
|
+
.describe('Brief explanation of why this change is being proposed and what it improves'),
|
|
138
|
+
change: changeSchema,
|
|
139
|
+
})
|
|
140
|
+
.build();
|
|
141
|
+
export const toolProposeChangeOutputSchema = z.object({
|
|
142
|
+
result: z.string(),
|
|
143
|
+
metadata: z.discriminatedUnion('status', [
|
|
144
|
+
z.object({
|
|
145
|
+
status: z.literal('success'),
|
|
146
|
+
changeUuid: z.string(),
|
|
147
|
+
userFeedback: z
|
|
148
|
+
.enum(['accepted', 'rejected'])
|
|
149
|
+
.default('accepted')
|
|
150
|
+
.optional(),
|
|
151
|
+
}),
|
|
152
|
+
z.object({
|
|
153
|
+
status: z.literal('error'),
|
|
154
|
+
}),
|
|
155
|
+
]),
|
|
156
|
+
});
|
|
157
|
+
//# sourceMappingURL=toolProposeChangeArgs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toolProposeChangeArgs.js","sourceRoot":"","sources":["../../../../../../src/ee/AiAgent/schemas/tools/toolProposeChangeArgs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CA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,MAAM,6BAA6B,GAAG,CAAC,CAAC,MAAM,CAAC;IAClD,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAClB,QAAQ,EAAE,CAAC,CAAC,kBAAkB,CAAC,QAAQ,EAAE;QACrC,CAAC,CAAC,MAAM,CAAC;YACL,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;YAC5B,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;YACtB,YAAY,EAAE,CAAC;iBACV,IAAI,CAAC,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;iBAC9B,OAAO,CAAC,UAAU,CAAC;iBACnB,QAAQ,EAAE;SAClB,CAAC;QACF,CAAC,CAAC,MAAM,CAAC;YACL,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC;SAC7B,CAAC;KACL,CAAC;CACL,CAAC,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { customMetricsSchema } from '../customMetrics';
|
|
3
|
+
import { filtersSchemaTransformed, filtersSchemaV2 } from '../filters';
|
|
4
|
+
import { baseOutputMetadataSchema } from '../outputMetadata';
|
|
5
|
+
import { tableCalcsSchema } from '../tableCalcs/tableCalcs';
|
|
6
|
+
import { createToolSchema } from '../toolSchemaBuilder';
|
|
7
|
+
import { tableVizConfigSchema } from '../visualizations';
|
|
8
|
+
export const TOOL_RUN_METRIC_QUERY_DESCRIPTION = `Tool: runMetricQuery
|
|
9
|
+
|
|
10
|
+
Purpose:
|
|
11
|
+
Run a metric query and get the results as CSV data. This is useful for data analysis and export.
|
|
12
|
+
|
|
13
|
+
Usage Tips:
|
|
14
|
+
- Specify the exploreName, dimensions, metrics, and any filters needed for your query
|
|
15
|
+
- Results are returned as CSV formatted text
|
|
16
|
+
- Use this when you need to analyze data or export query results
|
|
17
|
+
- The query respects the same limits and permissions as other visualization tools
|
|
18
|
+
`;
|
|
19
|
+
export const toolRunMetricQueryArgsSchema = createToolSchema({
|
|
20
|
+
type: 'run_metric_query',
|
|
21
|
+
description: TOOL_RUN_METRIC_QUERY_DESCRIPTION,
|
|
22
|
+
})
|
|
23
|
+
.extend({
|
|
24
|
+
vizConfig: tableVizConfigSchema,
|
|
25
|
+
customMetrics: customMetricsSchema,
|
|
26
|
+
tableCalculations: tableCalcsSchema,
|
|
27
|
+
filters: filtersSchemaV2
|
|
28
|
+
.nullable()
|
|
29
|
+
.describe('Filters to apply to the query. Filtered fields must exist in the selected explore or should be referenced from the custom metrics.'),
|
|
30
|
+
})
|
|
31
|
+
.build();
|
|
32
|
+
export const toolRunMetricQueryArgsSchemaTransformed = toolRunMetricQueryArgsSchema.transform((data) => ({
|
|
33
|
+
...data,
|
|
34
|
+
customMetrics: customMetricsSchema.parse(data.customMetrics ?? []),
|
|
35
|
+
filters: filtersSchemaTransformed.parse(data.filters ?? null),
|
|
36
|
+
}));
|
|
37
|
+
export const toolRunMetricQueryOutputSchema = z.object({
|
|
38
|
+
result: z.string(),
|
|
39
|
+
metadata: baseOutputMetadataSchema,
|
|
40
|
+
});
|
|
41
|
+
//# sourceMappingURL=toolRunMetricQueryArgs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toolRunMetricQueryArgs.js","sourceRoot":"","sources":["../../../../../../src/ee/AiAgent/schemas/tools/toolRunMetricQueryArgs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,wBAAwB,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AACvE,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAEzD,MAAM,CAAC,MAAM,iCAAiC,GAAG;;;;;;;;;;CAUhD,CAAC;AAEF,MAAM,CAAC,MAAM,4BAA4B,GAAG,gBAAgB,CAAC;IACzD,IAAI,EAAE,kBAAkB;IACxB,WAAW,EAAE,iCAAiC;CACjD,CAAC;KACG,MAAM,CAAC;IACJ,SAAS,EAAE,oBAAoB;IAC/B,aAAa,EAAE,mBAAmB;IAClC,iBAAiB,EAAE,gBAAgB;IACnC,OAAO,EAAE,eAAe;SACnB,QAAQ,EAAE;SACV,QAAQ,CACL,oIAAoI,CACvI;CACR,CAAC;KACD,KAAK,EAAE,CAAC;AAMb,MAAM,CAAC,MAAM,uCAAuC,GAChD,4BAA4B,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;IAC9C,GAAG,IAAI;IACP,aAAa,EAAE,mBAAmB,CAAC,KAAK,CAAC,IAAI,CAAC,aAAa,IAAI,EAAE,CAAC;IAClE,OAAO,EAAE,wBAAwB,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC;CAChE,CAAC,CAAC,CAAC;AAMR,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,CAAC,MAAM,CAAC;IACnD,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAClB,QAAQ,EAAE,wBAAwB;CACrC,CAAC,CAAC"}
|
|
@@ -1665,14 +1665,6 @@ export declare const toolRunQueryArgsSchema: z.ZodObject<{
|
|
|
1665
1665
|
})[] | null;
|
|
1666
1666
|
type: "and" | "or";
|
|
1667
1667
|
} | null;
|
|
1668
|
-
customMetrics: {
|
|
1669
|
-
name: string;
|
|
1670
|
-
label: string;
|
|
1671
|
-
table: string;
|
|
1672
|
-
type: import("../../../..").MetricType.PERCENTILE | import("../../../..").MetricType.AVERAGE | import("../../../..").MetricType.COUNT | import("../../../..").MetricType.COUNT_DISTINCT | import("../../../..").MetricType.SUM | import("../../../..").MetricType.MIN | import("../../../..").MetricType.MAX | import("../../../..").MetricType.MEDIAN;
|
|
1673
|
-
description: string;
|
|
1674
|
-
baseDimensionName: string;
|
|
1675
|
-
}[] | null;
|
|
1676
1668
|
chartConfig: {
|
|
1677
1669
|
groupBy: string[] | null;
|
|
1678
1670
|
stackBars: boolean | null;
|
|
@@ -1687,6 +1679,14 @@ export declare const toolRunQueryArgsSchema: z.ZodObject<{
|
|
|
1687
1679
|
secondaryYAxisMetric: string | null;
|
|
1688
1680
|
secondaryYAxisLabel: string | null;
|
|
1689
1681
|
} | null;
|
|
1682
|
+
customMetrics: {
|
|
1683
|
+
name: string;
|
|
1684
|
+
label: string;
|
|
1685
|
+
table: string;
|
|
1686
|
+
type: import("../../../..").MetricType.PERCENTILE | import("../../../..").MetricType.AVERAGE | import("../../../..").MetricType.COUNT | import("../../../..").MetricType.COUNT_DISTINCT | import("../../../..").MetricType.SUM | import("../../../..").MetricType.MIN | import("../../../..").MetricType.MAX | import("../../../..").MetricType.MEDIAN;
|
|
1687
|
+
description: string;
|
|
1688
|
+
baseDimensionName: string;
|
|
1689
|
+
}[] | null;
|
|
1690
1690
|
title: string;
|
|
1691
1691
|
queryConfig: {
|
|
1692
1692
|
dimensions: string[];
|
|
@@ -1964,14 +1964,6 @@ export declare const toolRunQueryArgsSchema: z.ZodObject<{
|
|
|
1964
1964
|
})[] | null;
|
|
1965
1965
|
type: "and" | "or";
|
|
1966
1966
|
} | null;
|
|
1967
|
-
customMetrics: {
|
|
1968
|
-
name: string;
|
|
1969
|
-
label: string;
|
|
1970
|
-
table: string;
|
|
1971
|
-
type: import("../../../..").MetricType.PERCENTILE | import("../../../..").MetricType.AVERAGE | import("../../../..").MetricType.COUNT | import("../../../..").MetricType.COUNT_DISTINCT | import("../../../..").MetricType.SUM | import("../../../..").MetricType.MIN | import("../../../..").MetricType.MAX | import("../../../..").MetricType.MEDIAN;
|
|
1972
|
-
description: string;
|
|
1973
|
-
baseDimensionName: string;
|
|
1974
|
-
}[] | null;
|
|
1975
1967
|
chartConfig: {
|
|
1976
1968
|
groupBy: string[] | null;
|
|
1977
1969
|
stackBars: boolean | null;
|
|
@@ -1986,6 +1978,14 @@ export declare const toolRunQueryArgsSchema: z.ZodObject<{
|
|
|
1986
1978
|
secondaryYAxisMetric: string | null;
|
|
1987
1979
|
secondaryYAxisLabel: string | null;
|
|
1988
1980
|
} | null;
|
|
1981
|
+
customMetrics: {
|
|
1982
|
+
name: string;
|
|
1983
|
+
label: string;
|
|
1984
|
+
table: string;
|
|
1985
|
+
type: import("../../../..").MetricType.PERCENTILE | import("../../../..").MetricType.AVERAGE | import("../../../..").MetricType.COUNT | import("../../../..").MetricType.COUNT_DISTINCT | import("../../../..").MetricType.SUM | import("../../../..").MetricType.MIN | import("../../../..").MetricType.MAX | import("../../../..").MetricType.MEDIAN;
|
|
1986
|
+
description: string;
|
|
1987
|
+
baseDimensionName: string;
|
|
1988
|
+
}[] | null;
|
|
1989
1989
|
title: string;
|
|
1990
1990
|
queryConfig: {
|
|
1991
1991
|
dimensions: string[];
|
|
@@ -3664,14 +3664,6 @@ export declare const toolRunQueryArgsSchemaTransformed: z.ZodEffects<z.ZodObject
|
|
|
3664
3664
|
})[] | null;
|
|
3665
3665
|
type: "and" | "or";
|
|
3666
3666
|
} | null;
|
|
3667
|
-
customMetrics: {
|
|
3668
|
-
name: string;
|
|
3669
|
-
label: string;
|
|
3670
|
-
table: string;
|
|
3671
|
-
type: import("../../../..").MetricType.PERCENTILE | import("../../../..").MetricType.AVERAGE | import("../../../..").MetricType.COUNT | import("../../../..").MetricType.COUNT_DISTINCT | import("../../../..").MetricType.SUM | import("../../../..").MetricType.MIN | import("../../../..").MetricType.MAX | import("../../../..").MetricType.MEDIAN;
|
|
3672
|
-
description: string;
|
|
3673
|
-
baseDimensionName: string;
|
|
3674
|
-
}[] | null;
|
|
3675
3667
|
chartConfig: {
|
|
3676
3668
|
groupBy: string[] | null;
|
|
3677
3669
|
stackBars: boolean | null;
|
|
@@ -3686,6 +3678,14 @@ export declare const toolRunQueryArgsSchemaTransformed: z.ZodEffects<z.ZodObject
|
|
|
3686
3678
|
secondaryYAxisMetric: string | null;
|
|
3687
3679
|
secondaryYAxisLabel: string | null;
|
|
3688
3680
|
} | null;
|
|
3681
|
+
customMetrics: {
|
|
3682
|
+
name: string;
|
|
3683
|
+
label: string;
|
|
3684
|
+
table: string;
|
|
3685
|
+
type: import("../../../..").MetricType.PERCENTILE | import("../../../..").MetricType.AVERAGE | import("../../../..").MetricType.COUNT | import("../../../..").MetricType.COUNT_DISTINCT | import("../../../..").MetricType.SUM | import("../../../..").MetricType.MIN | import("../../../..").MetricType.MAX | import("../../../..").MetricType.MEDIAN;
|
|
3686
|
+
description: string;
|
|
3687
|
+
baseDimensionName: string;
|
|
3688
|
+
}[] | null;
|
|
3689
3689
|
title: string;
|
|
3690
3690
|
queryConfig: {
|
|
3691
3691
|
dimensions: string[];
|
|
@@ -3975,14 +3975,6 @@ export declare const toolRunQueryArgsSchemaTransformed: z.ZodEffects<z.ZodObject
|
|
|
3975
3975
|
frameType: "rows" | "range";
|
|
3976
3976
|
} | null;
|
|
3977
3977
|
})[] | null | undefined;
|
|
3978
|
-
customMetrics?: {
|
|
3979
|
-
name: string;
|
|
3980
|
-
label: string;
|
|
3981
|
-
table: string;
|
|
3982
|
-
type: import("../../../..").MetricType.PERCENTILE | import("../../../..").MetricType.AVERAGE | import("../../../..").MetricType.COUNT | import("../../../..").MetricType.COUNT_DISTINCT | import("../../../..").MetricType.SUM | import("../../../..").MetricType.MIN | import("../../../..").MetricType.MAX | import("../../../..").MetricType.MEDIAN;
|
|
3983
|
-
description: string;
|
|
3984
|
-
baseDimensionName: string;
|
|
3985
|
-
}[] | null | undefined;
|
|
3986
3978
|
chartConfig?: {
|
|
3987
3979
|
groupBy: string[] | null;
|
|
3988
3980
|
stackBars: boolean | null;
|
|
@@ -3997,6 +3989,14 @@ export declare const toolRunQueryArgsSchemaTransformed: z.ZodEffects<z.ZodObject
|
|
|
3997
3989
|
secondaryYAxisMetric: string | null;
|
|
3998
3990
|
secondaryYAxisLabel: string | null;
|
|
3999
3991
|
} | null | undefined;
|
|
3992
|
+
customMetrics?: {
|
|
3993
|
+
name: string;
|
|
3994
|
+
label: string;
|
|
3995
|
+
table: string;
|
|
3996
|
+
type: import("../../../..").MetricType.PERCENTILE | import("../../../..").MetricType.AVERAGE | import("../../../..").MetricType.COUNT | import("../../../..").MetricType.COUNT_DISTINCT | import("../../../..").MetricType.SUM | import("../../../..").MetricType.MIN | import("../../../..").MetricType.MAX | import("../../../..").MetricType.MEDIAN;
|
|
3997
|
+
description: string;
|
|
3998
|
+
baseDimensionName: string;
|
|
3999
|
+
}[] | null | undefined;
|
|
4000
4000
|
}>, {
|
|
4001
4001
|
filters: import("../../../..").Filters;
|
|
4002
4002
|
tableCalculations: ({
|
|
@@ -4058,14 +4058,6 @@ export declare const toolRunQueryArgsSchemaTransformed: z.ZodEffects<z.ZodObject
|
|
|
4058
4058
|
})[] | null;
|
|
4059
4059
|
type: AiResultType.QUERY_RESULT;
|
|
4060
4060
|
description: string;
|
|
4061
|
-
customMetrics: {
|
|
4062
|
-
name: string;
|
|
4063
|
-
label: string;
|
|
4064
|
-
table: string;
|
|
4065
|
-
type: import("../../../..").MetricType.PERCENTILE | import("../../../..").MetricType.AVERAGE | import("../../../..").MetricType.COUNT | import("../../../..").MetricType.COUNT_DISTINCT | import("../../../..").MetricType.SUM | import("../../../..").MetricType.MIN | import("../../../..").MetricType.MAX | import("../../../..").MetricType.MEDIAN;
|
|
4066
|
-
description: string;
|
|
4067
|
-
baseDimensionName: string;
|
|
4068
|
-
}[] | null;
|
|
4069
4061
|
chartConfig: {
|
|
4070
4062
|
groupBy: string[] | null;
|
|
4071
4063
|
stackBars: boolean | null;
|
|
@@ -4080,6 +4072,14 @@ export declare const toolRunQueryArgsSchemaTransformed: z.ZodEffects<z.ZodObject
|
|
|
4080
4072
|
secondaryYAxisMetric: string | null;
|
|
4081
4073
|
secondaryYAxisLabel: string | null;
|
|
4082
4074
|
} | null;
|
|
4075
|
+
customMetrics: {
|
|
4076
|
+
name: string;
|
|
4077
|
+
label: string;
|
|
4078
|
+
table: string;
|
|
4079
|
+
type: import("../../../..").MetricType.PERCENTILE | import("../../../..").MetricType.AVERAGE | import("../../../..").MetricType.COUNT | import("../../../..").MetricType.COUNT_DISTINCT | import("../../../..").MetricType.SUM | import("../../../..").MetricType.MIN | import("../../../..").MetricType.MAX | import("../../../..").MetricType.MEDIAN;
|
|
4080
|
+
description: string;
|
|
4081
|
+
baseDimensionName: string;
|
|
4082
|
+
}[] | null;
|
|
4083
4083
|
title: string;
|
|
4084
4084
|
queryConfig: {
|
|
4085
4085
|
dimensions: string[];
|
|
@@ -4369,14 +4369,6 @@ export declare const toolRunQueryArgsSchemaTransformed: z.ZodEffects<z.ZodObject
|
|
|
4369
4369
|
frameType: "rows" | "range";
|
|
4370
4370
|
} | null;
|
|
4371
4371
|
})[] | null | undefined;
|
|
4372
|
-
customMetrics?: {
|
|
4373
|
-
name: string;
|
|
4374
|
-
label: string;
|
|
4375
|
-
table: string;
|
|
4376
|
-
type: import("../../../..").MetricType.PERCENTILE | import("../../../..").MetricType.AVERAGE | import("../../../..").MetricType.COUNT | import("../../../..").MetricType.COUNT_DISTINCT | import("../../../..").MetricType.SUM | import("../../../..").MetricType.MIN | import("../../../..").MetricType.MAX | import("../../../..").MetricType.MEDIAN;
|
|
4377
|
-
description: string;
|
|
4378
|
-
baseDimensionName: string;
|
|
4379
|
-
}[] | null | undefined;
|
|
4380
4372
|
chartConfig?: {
|
|
4381
4373
|
groupBy: string[] | null;
|
|
4382
4374
|
stackBars: boolean | null;
|
|
@@ -4391,6 +4383,14 @@ export declare const toolRunQueryArgsSchemaTransformed: z.ZodEffects<z.ZodObject
|
|
|
4391
4383
|
secondaryYAxisMetric: string | null;
|
|
4392
4384
|
secondaryYAxisLabel: string | null;
|
|
4393
4385
|
} | null | undefined;
|
|
4386
|
+
customMetrics?: {
|
|
4387
|
+
name: string;
|
|
4388
|
+
label: string;
|
|
4389
|
+
table: string;
|
|
4390
|
+
type: import("../../../..").MetricType.PERCENTILE | import("../../../..").MetricType.AVERAGE | import("../../../..").MetricType.COUNT | import("../../../..").MetricType.COUNT_DISTINCT | import("../../../..").MetricType.SUM | import("../../../..").MetricType.MIN | import("../../../..").MetricType.MAX | import("../../../..").MetricType.MEDIAN;
|
|
4391
|
+
description: string;
|
|
4392
|
+
baseDimensionName: string;
|
|
4393
|
+
}[] | null | undefined;
|
|
4394
4394
|
}>;
|
|
4395
4395
|
export type ToolRunQueryArgsTransformed = z.infer<typeof toolRunQueryArgsSchemaTransformed>;
|
|
4396
4396
|
export declare const toolRunQueryOutputSchema: z.ZodObject<{
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { AiResultType } from '../../types';
|
|
3
|
+
import { customMetricsSchema } from '../customMetrics';
|
|
4
|
+
import { getFieldIdSchema } from '../fieldId';
|
|
5
|
+
import { filtersSchemaTransformed, filtersSchemaV2 } from '../filters';
|
|
6
|
+
import { baseOutputMetadataSchema } from '../outputMetadata';
|
|
7
|
+
import sortFieldSchema from '../sortField';
|
|
8
|
+
import { tableCalcsSchema } from '../tableCalcs/tableCalcs';
|
|
9
|
+
import { createToolSchema } from '../toolSchemaBuilder';
|
|
10
|
+
import visualizationMetadataSchema from '../visualizationMetadata';
|
|
11
|
+
// Query configuration schema - what data to fetch
|
|
12
|
+
const queryConfigSchema = z.object({
|
|
13
|
+
exploreName: z
|
|
14
|
+
.string()
|
|
15
|
+
.describe('The name of the explore containing the metrics and dimensions used for the chart.'),
|
|
16
|
+
dimensions: z
|
|
17
|
+
.array(getFieldIdSchema({ additionalDescription: null }))
|
|
18
|
+
.describe('The field ids for the dimensions to group the metrics by. dimensions[0] is the primary grouping (x-axis for charts). dimensions[1+] create additional grouping levels.'),
|
|
19
|
+
metrics: z
|
|
20
|
+
.array(getFieldIdSchema({ additionalDescription: null }))
|
|
21
|
+
.describe('The field ids of the metrics to be calculated. They will be grouped by the dimensions.'),
|
|
22
|
+
sorts: z
|
|
23
|
+
.array(sortFieldSchema)
|
|
24
|
+
.describe('Sort configuration for the query, it can use a combination of metrics and dimensions.'),
|
|
25
|
+
limit: z
|
|
26
|
+
.number()
|
|
27
|
+
.nullable()
|
|
28
|
+
.describe('The total number of data points / rows allowed on the chart.'),
|
|
29
|
+
});
|
|
30
|
+
// Chart-specific configuration for rendering hints
|
|
31
|
+
const chartConfigSchema = z
|
|
32
|
+
.object({
|
|
33
|
+
defaultVizType: z
|
|
34
|
+
.enum([
|
|
35
|
+
'table',
|
|
36
|
+
'bar',
|
|
37
|
+
'horizontal',
|
|
38
|
+
'line',
|
|
39
|
+
'scatter',
|
|
40
|
+
'pie',
|
|
41
|
+
'funnel',
|
|
42
|
+
])
|
|
43
|
+
.describe('The default visualization type to render'),
|
|
44
|
+
// Axis field selection
|
|
45
|
+
xAxisDimension: z
|
|
46
|
+
.string()
|
|
47
|
+
.nullable()
|
|
48
|
+
.describe('The dimension field ID to use for the x-axis. Must be included in queryConfig.dimensions'),
|
|
49
|
+
yAxisMetrics: z
|
|
50
|
+
.array(getFieldIdSchema({ additionalDescription: null }))
|
|
51
|
+
.nullable()
|
|
52
|
+
.describe('The metric field IDs to display on the y-axis. Must be included in queryConfig.metrics or come from tableCalculations'),
|
|
53
|
+
// Series creation control
|
|
54
|
+
groupBy: z
|
|
55
|
+
.array(getFieldIdSchema({ additionalDescription: null }))
|
|
56
|
+
.nullable()
|
|
57
|
+
.describe('Dimensions to split metrics into separate series (e.g., one line per region, one bar per status). IMPORTANT: Do NOT include the x-axis dimension in groupBy - only include dimensions you want to use for breaking down the data into multiple series. Example: dimensions=["order_date", "status"], groupBy=["status"] creates separate series for each status value. Leave null for simple single-series charts.'),
|
|
58
|
+
// Bar and horizontal bar chart specific
|
|
59
|
+
xAxisType: z
|
|
60
|
+
.enum(['category', 'time'])
|
|
61
|
+
.nullable()
|
|
62
|
+
.describe('The x-axis type can be categorical for string value or time if the dimension is a date or timestamp. Applies to bar, horizontal, and scatter charts.'),
|
|
63
|
+
stackBars: z
|
|
64
|
+
.boolean()
|
|
65
|
+
.nullable()
|
|
66
|
+
.describe('If groupBy is provided then this will stack the bars on top of each other instead of side by side. Applies to bar and horizontal charts.'),
|
|
67
|
+
// Line chart specific
|
|
68
|
+
lineType: z
|
|
69
|
+
.enum(['line', 'area'])
|
|
70
|
+
.nullable()
|
|
71
|
+
.describe('default line. The type of line to display. If area then the area under the line will be filled in.'),
|
|
72
|
+
// Funnel chart specific
|
|
73
|
+
funnelDataInput: z
|
|
74
|
+
.enum(['row', 'column'])
|
|
75
|
+
.nullable()
|
|
76
|
+
.describe('How to interpret funnel data. Use "row" when each row represents a funnel stage (most common). Use "column" when comparing multiple funnels side-by-side.'),
|
|
77
|
+
// Common display properties
|
|
78
|
+
xAxisLabel: z
|
|
79
|
+
.string()
|
|
80
|
+
.describe('A helpful label to explain the x-axis'),
|
|
81
|
+
yAxisLabel: z
|
|
82
|
+
.string()
|
|
83
|
+
.describe('A helpful label to explain the y-axis'),
|
|
84
|
+
secondaryYAxisMetric: z
|
|
85
|
+
.string()
|
|
86
|
+
.nullable()
|
|
87
|
+
.describe('(Optional) A single metric field ID to display on a secondary (right) y-axis. Must NOT be included in yAxisMetrics. Use when one metric has a very different scale than others (e.g., percentage vs count).'),
|
|
88
|
+
secondaryYAxisLabel: z
|
|
89
|
+
.string()
|
|
90
|
+
.nullable()
|
|
91
|
+
.describe('A helpful label for the secondary y-axis'),
|
|
92
|
+
})
|
|
93
|
+
.nullable();
|
|
94
|
+
export const TOOL_RUN_QUERY_DESCRIPTION = `Tool: runQuery
|
|
95
|
+
|
|
96
|
+
Purpose:
|
|
97
|
+
Execute a metric query and create a chart artifact. The results can be viewed as a table, bar, horizontal bar, line, scatter, pie, or funnel chart.
|
|
98
|
+
You define the default visualization type to render but users can switch between visualization types after creation.
|
|
99
|
+
|
|
100
|
+
Chart Type Selection Guide:
|
|
101
|
+
- 'bar': Vertical bars for categorical comparisons (e.g., sales by product)
|
|
102
|
+
- 'horizontal': Horizontal bars for long category names or ranking (e.g., top 10 customers)
|
|
103
|
+
- 'line': Time series trends (e.g., revenue over months)
|
|
104
|
+
- 'scatter': Correlation between two metrics (e.g., ad spend vs revenue)
|
|
105
|
+
- 'pie': Part-to-whole proportions (e.g., market share by segment)
|
|
106
|
+
- 'funnel': Sequential conversion flows (e.g., sales funnel stages)
|
|
107
|
+
- 'table': Raw data display with all fields
|
|
108
|
+
|
|
109
|
+
Configuration Tips:
|
|
110
|
+
- Specify exploreName, dimensions (for grouping/x-axis), and metrics (for y-axis values)
|
|
111
|
+
- First dimension is the x-axis; additional dimensions can be used for series breakdown via groupBy
|
|
112
|
+
- At least one metric is required for all chart types except table
|
|
113
|
+
- chartConfig.xAxisDimension: Select the primary dimension from queryConfig.dimensions (typically dimensions[0])
|
|
114
|
+
- chartConfig.yAxisMetrics: Select the metrics to display from queryConfig.metrics or tableCalculations
|
|
115
|
+
- chartConfig.groupBy: Use to split data into multiple series (e.g., one line per region). Do NOT include the x-axis dimension. Only include dimensions for series breakdown. Leave null for simple single-series charts.
|
|
116
|
+
- For bar/horizontal charts: use xAxisType 'category' for strings or 'time' for dates/timestamps
|
|
117
|
+
- For bar/horizontal charts: stackBars (when groupBy is provided) stacks bars instead of placing them side by side
|
|
118
|
+
- For line charts: use lineType 'area' to fill the area under the line
|
|
119
|
+
- For scatter charts: each point represents one row of data
|
|
120
|
+
- For funnel charts: set funnelDataInput to 'row' (each row = stage) or 'column' (multiple funnels)
|
|
121
|
+
- Users can switch between visualization types in the UI after creation
|
|
122
|
+
- xAxisLabel and yAxisLabel provide helpful context for chart axes
|
|
123
|
+
`;
|
|
124
|
+
export const toolRunQueryArgsSchema = createToolSchema({
|
|
125
|
+
type: AiResultType.QUERY_RESULT,
|
|
126
|
+
description: TOOL_RUN_QUERY_DESCRIPTION,
|
|
127
|
+
})
|
|
128
|
+
.extend({
|
|
129
|
+
...visualizationMetadataSchema.shape,
|
|
130
|
+
queryConfig: queryConfigSchema,
|
|
131
|
+
chartConfig: chartConfigSchema,
|
|
132
|
+
customMetrics: customMetricsSchema,
|
|
133
|
+
tableCalculations: tableCalcsSchema,
|
|
134
|
+
filters: filtersSchemaV2.nullable(),
|
|
135
|
+
})
|
|
136
|
+
.build();
|
|
137
|
+
export const toolRunQueryArgsSchemaTransformed = toolRunQueryArgsSchema
|
|
138
|
+
.extend({
|
|
139
|
+
customMetrics: customMetricsSchema.default(null),
|
|
140
|
+
tableCalculations: tableCalcsSchema.default(null),
|
|
141
|
+
chartConfig: chartConfigSchema.default(null),
|
|
142
|
+
})
|
|
143
|
+
.transform((data) => ({
|
|
144
|
+
...data,
|
|
145
|
+
filters: filtersSchemaTransformed.parse(data.filters),
|
|
146
|
+
}));
|
|
147
|
+
export const toolRunQueryOutputSchema = z.object({
|
|
148
|
+
result: z.string(),
|
|
149
|
+
metadata: baseOutputMetadataSchema,
|
|
150
|
+
});
|
|
151
|
+
//# sourceMappingURL=toolRunQueryArgs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toolRunQueryArgs.js","sourceRoot":"","sources":["../../../../../../src/ee/AiAgent/schemas/tools/toolRunQueryArgs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,wBAAwB,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AACvE,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,eAAe,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,gBAAgB,E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