@lightdash/common 0.1969.0 → 0.1970.0
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/ee/AiAgent/schemas/customMetrics.d.ts +42 -0
- package/dist/cjs/ee/AiAgent/schemas/customMetrics.d.ts.map +1 -0
- package/dist/cjs/ee/AiAgent/schemas/customMetrics.js +50 -0
- package/dist/cjs/ee/AiAgent/schemas/customMetrics.js.map +1 -0
- package/dist/cjs/ee/AiAgent/schemas/index.d.ts +106 -6
- package/dist/cjs/ee/AiAgent/schemas/index.d.ts.map +1 -1
- package/dist/cjs/ee/AiAgent/schemas/index.js +1 -0
- package/dist/cjs/ee/AiAgent/schemas/index.js.map +1 -1
- package/dist/cjs/ee/AiAgent/schemas/tools/toolTableVizArgs.d.ts +87 -7
- package/dist/cjs/ee/AiAgent/schemas/tools/toolTableVizArgs.d.ts.map +1 -1
- package/dist/cjs/ee/AiAgent/schemas/tools/toolTableVizArgs.js +8 -1
- package/dist/cjs/ee/AiAgent/schemas/tools/toolTableVizArgs.js.map +1 -1
- package/dist/cjs/ee/AiAgent/schemas/tools/toolTimeSeriesArgs.d.ts +86 -6
- package/dist/cjs/ee/AiAgent/schemas/tools/toolTimeSeriesArgs.d.ts.map +1 -1
- package/dist/cjs/ee/AiAgent/schemas/tools/toolTimeSeriesArgs.js +4 -0
- package/dist/cjs/ee/AiAgent/schemas/tools/toolTimeSeriesArgs.js.map +1 -1
- package/dist/cjs/ee/AiAgent/schemas/tools/toolVerticalBarArgs.d.ts +87 -7
- package/dist/cjs/ee/AiAgent/schemas/tools/toolVerticalBarArgs.d.ts.map +1 -1
- package/dist/cjs/ee/AiAgent/schemas/tools/toolVerticalBarArgs.js +8 -1
- package/dist/cjs/ee/AiAgent/schemas/tools/toolVerticalBarArgs.js.map +1 -1
- package/dist/cjs/ee/AiAgent/schemas/visualizations/tableViz.d.ts +7 -1
- package/dist/cjs/ee/AiAgent/schemas/visualizations/tableViz.d.ts.map +1 -1
- package/dist/cjs/ee/AiAgent/schemas/visualizations/tableViz.js +2 -1
- package/dist/cjs/ee/AiAgent/schemas/visualizations/tableViz.js.map +1 -1
- package/dist/cjs/ee/AiAgent/schemas/visualizations/timeSeriesViz.d.ts +7 -1
- package/dist/cjs/ee/AiAgent/schemas/visualizations/timeSeriesViz.d.ts.map +1 -1
- package/dist/cjs/ee/AiAgent/schemas/visualizations/timeSeriesViz.js +2 -1
- package/dist/cjs/ee/AiAgent/schemas/visualizations/timeSeriesViz.js.map +1 -1
- package/dist/cjs/ee/AiAgent/schemas/visualizations/verticalBarViz.d.ts +7 -1
- package/dist/cjs/ee/AiAgent/schemas/visualizations/verticalBarViz.d.ts.map +1 -1
- package/dist/cjs/ee/AiAgent/schemas/visualizations/verticalBarViz.js +2 -1
- package/dist/cjs/ee/AiAgent/schemas/visualizations/verticalBarViz.js.map +1 -1
- package/dist/cjs/ee/AiAgent/types.d.ts +4 -2
- package/dist/cjs/ee/AiAgent/types.d.ts.map +1 -1
- package/dist/cjs/ee/AiAgent/utils.d.ts +24 -3
- package/dist/cjs/ee/AiAgent/utils.d.ts.map +1 -1
- package/dist/cjs/ee/AiAgent/utils.js +18 -3
- package/dist/cjs/ee/AiAgent/utils.js.map +1 -1
- package/dist/cjs/utils/additionalMetrics.d.ts +7 -1
- package/dist/cjs/utils/additionalMetrics.d.ts.map +1 -1
- package/dist/cjs/utils/additionalMetrics.js +36 -1
- package/dist/cjs/utils/additionalMetrics.js.map +1 -1
- package/dist/esm/ee/AiAgent/schemas/customMetrics.d.ts +42 -0
- package/dist/esm/ee/AiAgent/schemas/customMetrics.d.ts.map +1 -0
- package/dist/esm/ee/AiAgent/schemas/customMetrics.js +47 -0
- package/dist/esm/ee/AiAgent/schemas/customMetrics.js.map +1 -0
- package/dist/esm/ee/AiAgent/schemas/index.d.ts +106 -6
- package/dist/esm/ee/AiAgent/schemas/index.d.ts.map +1 -1
- package/dist/esm/ee/AiAgent/schemas/index.js +1 -0
- package/dist/esm/ee/AiAgent/schemas/index.js.map +1 -1
- package/dist/esm/ee/AiAgent/schemas/tools/toolTableVizArgs.d.ts +87 -7
- package/dist/esm/ee/AiAgent/schemas/tools/toolTableVizArgs.d.ts.map +1 -1
- package/dist/esm/ee/AiAgent/schemas/tools/toolTableVizArgs.js +8 -1
- package/dist/esm/ee/AiAgent/schemas/tools/toolTableVizArgs.js.map +1 -1
- package/dist/esm/ee/AiAgent/schemas/tools/toolTimeSeriesArgs.d.ts +86 -6
- package/dist/esm/ee/AiAgent/schemas/tools/toolTimeSeriesArgs.d.ts.map +1 -1
- package/dist/esm/ee/AiAgent/schemas/tools/toolTimeSeriesArgs.js +4 -0
- package/dist/esm/ee/AiAgent/schemas/tools/toolTimeSeriesArgs.js.map +1 -1
- package/dist/esm/ee/AiAgent/schemas/tools/toolVerticalBarArgs.d.ts +87 -7
- package/dist/esm/ee/AiAgent/schemas/tools/toolVerticalBarArgs.d.ts.map +1 -1
- package/dist/esm/ee/AiAgent/schemas/tools/toolVerticalBarArgs.js +8 -1
- package/dist/esm/ee/AiAgent/schemas/tools/toolVerticalBarArgs.js.map +1 -1
- package/dist/esm/ee/AiAgent/schemas/visualizations/tableViz.d.ts +7 -1
- package/dist/esm/ee/AiAgent/schemas/visualizations/tableViz.d.ts.map +1 -1
- package/dist/esm/ee/AiAgent/schemas/visualizations/tableViz.js +2 -1
- package/dist/esm/ee/AiAgent/schemas/visualizations/tableViz.js.map +1 -1
- package/dist/esm/ee/AiAgent/schemas/visualizations/timeSeriesViz.d.ts +7 -1
- package/dist/esm/ee/AiAgent/schemas/visualizations/timeSeriesViz.d.ts.map +1 -1
- package/dist/esm/ee/AiAgent/schemas/visualizations/timeSeriesViz.js +2 -1
- package/dist/esm/ee/AiAgent/schemas/visualizations/timeSeriesViz.js.map +1 -1
- package/dist/esm/ee/AiAgent/schemas/visualizations/verticalBarViz.d.ts +7 -1
- package/dist/esm/ee/AiAgent/schemas/visualizations/verticalBarViz.d.ts.map +1 -1
- package/dist/esm/ee/AiAgent/schemas/visualizations/verticalBarViz.js +2 -1
- package/dist/esm/ee/AiAgent/schemas/visualizations/verticalBarViz.js.map +1 -1
- package/dist/esm/ee/AiAgent/types.d.ts +4 -2
- package/dist/esm/ee/AiAgent/types.d.ts.map +1 -1
- package/dist/esm/ee/AiAgent/utils.d.ts +24 -3
- package/dist/esm/ee/AiAgent/utils.d.ts.map +1 -1
- package/dist/esm/ee/AiAgent/utils.js +18 -3
- package/dist/esm/ee/AiAgent/utils.js.map +1 -1
- package/dist/esm/utils/additionalMetrics.d.ts +7 -1
- package/dist/esm/utils/additionalMetrics.d.ts.map +1 -1
- package/dist/esm/utils/additionalMetrics.js +34 -0
- package/dist/esm/utils/additionalMetrics.js.map +1 -1
- package/dist/tsconfig.types.tsbuildinfo +1 -1
- package/dist/types/ee/AiAgent/schemas/customMetrics.d.ts +42 -0
- package/dist/types/ee/AiAgent/schemas/customMetrics.d.ts.map +1 -0
- package/dist/types/ee/AiAgent/schemas/index.d.ts +106 -6
- package/dist/types/ee/AiAgent/schemas/index.d.ts.map +1 -1
- package/dist/types/ee/AiAgent/schemas/tools/toolTableVizArgs.d.ts +87 -7
- package/dist/types/ee/AiAgent/schemas/tools/toolTableVizArgs.d.ts.map +1 -1
- package/dist/types/ee/AiAgent/schemas/tools/toolTimeSeriesArgs.d.ts +86 -6
- package/dist/types/ee/AiAgent/schemas/tools/toolTimeSeriesArgs.d.ts.map +1 -1
- package/dist/types/ee/AiAgent/schemas/tools/toolVerticalBarArgs.d.ts +87 -7
- package/dist/types/ee/AiAgent/schemas/tools/toolVerticalBarArgs.d.ts.map +1 -1
- package/dist/types/ee/AiAgent/schemas/visualizations/tableViz.d.ts +7 -1
- package/dist/types/ee/AiAgent/schemas/visualizations/tableViz.d.ts.map +1 -1
- package/dist/types/ee/AiAgent/schemas/visualizations/timeSeriesViz.d.ts +7 -1
- package/dist/types/ee/AiAgent/schemas/visualizations/timeSeriesViz.d.ts.map +1 -1
- package/dist/types/ee/AiAgent/schemas/visualizations/verticalBarViz.d.ts +7 -1
- package/dist/types/ee/AiAgent/schemas/visualizations/verticalBarViz.d.ts.map +1 -1
- package/dist/types/ee/AiAgent/types.d.ts +4 -2
- package/dist/types/ee/AiAgent/types.d.ts.map +1 -1
- package/dist/types/ee/AiAgent/utils.d.ts +24 -3
- package/dist/types/ee/AiAgent/utils.d.ts.map +1 -1
- package/dist/types/utils/additionalMetrics.d.ts +7 -1
- package/dist/types/utils/additionalMetrics.d.ts.map +1 -1
- package/package.json +1 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"verticalBarViz.d.ts","sourceRoot":"","sources":["../../../../../../src/ee/AiAgent/schemas/visualizations/verticalBarViz.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAExD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;
|
1
|
+
{"version":3,"file":"verticalBarViz.d.ts","sourceRoot":"","sources":["../../../../../../src/ee/AiAgent/schemas/visualizations/verticalBarViz.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAExD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAI5D,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,UAAU,CAAC;AAE/D,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmD3C,CAAC;AAEH,MAAM,MAAM,oCAAoC,GAAG,CAAC,CAAC,KAAK,CACtD,OAAO,gCAAgC,CAC1C,CAAC;AAEF,eAAO,MAAM,yBAAyB,qDAKnC;IACC,SAAS,EAAE,oCAAoC,CAAC;IAChD,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,8BAA8B,CAAC,eAAe,CAAC,GAAG,IAAI,CAAC;CACzE,KAAG,wBAqBH,CAAC"}
|
@@ -45,7 +45,7 @@ exports.verticalBarMetricVizConfigSchema = zod_1.z.object({
|
|
45
45
|
.nullable()
|
46
46
|
.describe('A helpful label to explain the y-axis'),
|
47
47
|
});
|
48
|
-
const metricQueryVerticalBarViz = (vizConfig, filters, maxLimit) => {
|
48
|
+
const metricQueryVerticalBarViz = ({ vizConfig, filters, maxLimit, customMetrics, }) => {
|
49
49
|
const metrics = vizConfig.yMetrics;
|
50
50
|
const dimensions = [
|
51
51
|
vizConfig.xDimension,
|
@@ -64,6 +64,7 @@ const metricQueryVerticalBarViz = (vizConfig, filters, maxLimit) => {
|
|
64
64
|
})),
|
65
65
|
exploreName: vizConfig.exploreName,
|
66
66
|
filters,
|
67
|
+
additionalMetrics: customMetrics ?? [],
|
67
68
|
};
|
68
69
|
};
|
69
70
|
exports.metricQueryVerticalBarViz = metricQueryVerticalBarViz;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"verticalBarViz.js","sourceRoot":"","sources":["../../../../../../src/ee/AiAgent/schemas/visualizations/verticalBarViz.ts"],"names":[],"mappings":";;;;AAAA,6BAAwB;AAExB,+CAA6D;AAE7D,iDAAwD;AACxD,wCAA8C;AAC9C,qEAA2C;
|
1
|
+
{"version":3,"file":"verticalBarViz.js","sourceRoot":"","sources":["../../../../../../src/ee/AiAgent/schemas/visualizations/verticalBarViz.ts"],"names":[],"mappings":";;;;AAAA,6BAAwB;AAExB,+CAA6D;AAE7D,iDAAwD;AACxD,wCAA8C;AAC9C,qEAA2C;AAG9B,QAAA,gCAAgC,GAAG,OAAC,CAAC,MAAM,CAAC;IACrD,WAAW,EAAE,OAAC;SACT,MAAM,EAAE;SACR,QAAQ,CACL,mFAAmF,CACtF;IACL,UAAU,EAAE,IAAA,0BAAgB,EAAC;Q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AC,SAAS,CAAC,oBAAoB,CAAC;YAClC,CAAC,CAAC,EAAE,CAAC;KACZ,CAAC;IACF,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,SAAS,CAAC;IACnC,OAAO;QACH,OAAO;QACP,UAAU;QACV,KAAK,EAAE,IAAA,iCAAoB,EAAC,KAAK,EAAE,QAAQ,CAAC;QAC5C,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;YACxB,GAAG,IAAI;YACP,UAAU,EAAE,IAAI,CAAC,UAAU,IAAI,SAAS;SAC3C,CAAC,CAAC;QACH,WAAW,EAAE,SAAS,CAAC,WAAW;QAClC,OAAO;QACP,iBAAiB,EAAE,aAAa,IAAI,EAAE;KACzC,CAAC;AACN,CAAC,CAAC;AA/BW,QAAA,yBAAyB,6BA+BpC"}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import type { Filters } from '../../types/filter';
|
2
|
-
import type { MetricQuery } from '../../types/metricQuery';
|
2
|
+
import type { AdditionalMetric, MetricQuery } from '../../types/metricQuery';
|
3
3
|
import type { ToolTableVizArgs, ToolTimeSeriesArgs, ToolVerticalBarArgs } from './schemas/tools';
|
4
4
|
export declare enum AiResultType {
|
5
5
|
TIME_SERIES_RESULT = "time_series_chart",
|
@@ -7,7 +7,9 @@ export declare enum AiResultType {
|
|
7
7
|
ONE_LINE_RESULT = "one_line_result",
|
8
8
|
TABLE_RESULT = "table"
|
9
9
|
}
|
10
|
-
export type AiMetricQuery = Pick<MetricQuery, 'metrics' | 'dimensions' | 'sorts' | 'limit' | 'exploreName'
|
10
|
+
export type AiMetricQuery = Pick<MetricQuery, 'metrics' | 'dimensions' | 'sorts' | 'limit' | 'exploreName'> & {
|
11
|
+
additionalMetrics: Omit<AdditionalMetric, 'sql'>[];
|
12
|
+
};
|
11
13
|
export type AiMetricQueryWithFilters = AiMetricQuery & {
|
12
14
|
filters: Filters;
|
13
15
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/ee/AiAgent/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/ee/AiAgent/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,KAAK,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC7E,OAAO,KAAK,EACR,gBAAgB,EAChB,kBAAkB,EAClB,mBAAmB,EACtB,MAAM,iBAAiB,CAAC;AAEzB,oBAAY,YAAY;IACpB,kBAAkB,sBAAsB;IACxC,mBAAmB,uBAAuB;IAC1C,eAAe,oBAAoB;IACnC,YAAY,UAAU;CACzB;AAED,MAAM,MAAM,aAAa,GAAG,IAAI,CAC5B,WAAW,EACX,SAAS,GAAG,YAAY,GAAG,OAAO,GAAG,OAAO,GAAG,aAAa,CAC/D,GAAG;IACA,iBAAiB,EAAE,IAAI,CAAC,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC;CACtD,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG,aAAa,GAAG;IACnD,OAAO,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GACtB;IACI,IAAI,EAAE,oBAAoB,CAAC;IAC3B,MAAM,EAAE,mBAAmB,CAAC;CAC/B,GACD;IACI,IAAI,EAAE,mBAAmB,CAAC;IAC1B,MAAM,EAAE,kBAAkB,CAAC;CAC9B,GACD;IACI,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,EAAE,gBAAgB,CAAC;CAC5B,CAAC"}
|
@@ -5,6 +5,14 @@ export declare const parseVizConfig: (vizConfigUnknown: object | null, maxLimit?
|
|
5
5
|
filters: import("../..").Filters;
|
6
6
|
type: AiResultType.VERTICAL_BAR_RESULT;
|
7
7
|
description: string;
|
8
|
+
customMetrics: {
|
9
|
+
name: string;
|
10
|
+
label: string;
|
11
|
+
table: string;
|
12
|
+
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;
|
13
|
+
baseDimensionName: string;
|
14
|
+
}[] | null;
|
15
|
+
title: string;
|
8
16
|
vizConfig: {
|
9
17
|
limit: number | null;
|
10
18
|
exploreName: string;
|
@@ -21,7 +29,6 @@ export declare const parseVizConfig: (vizConfigUnknown: object | null, maxLimit?
|
|
21
29
|
stackBars: boolean | null;
|
22
30
|
xAxisType: "time" | "category";
|
23
31
|
};
|
24
|
-
title: string;
|
25
32
|
followUpTools: (import("./followUpTools").FollowUpTools.GENERATE_BAR_VIZ | import("./followUpTools").FollowUpTools.GENERATE_TIME_SERIES_VIZ)[];
|
26
33
|
};
|
27
34
|
readonly metricQuery: import("./types").AiMetricQueryWithFilters;
|
@@ -31,6 +38,14 @@ export declare const parseVizConfig: (vizConfigUnknown: object | null, maxLimit?
|
|
31
38
|
filters: import("../..").Filters;
|
32
39
|
type: AiResultType.TIME_SERIES_RESULT;
|
33
40
|
description: string;
|
41
|
+
customMetrics: {
|
42
|
+
name: string;
|
43
|
+
label: string;
|
44
|
+
table: string;
|
45
|
+
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;
|
46
|
+
baseDimensionName: string;
|
47
|
+
}[] | null;
|
48
|
+
title: string;
|
34
49
|
vizConfig: {
|
35
50
|
limit: number | null;
|
36
51
|
exploreName: string;
|
@@ -46,7 +61,6 @@ export declare const parseVizConfig: (vizConfigUnknown: object | null, maxLimit?
|
|
46
61
|
xAxisLabel: string;
|
47
62
|
yAxisLabel: string;
|
48
63
|
};
|
49
|
-
title: string;
|
50
64
|
followUpTools: (import("./followUpTools").FollowUpTools.GENERATE_BAR_VIZ | import("./followUpTools").FollowUpTools.GENERATE_TIME_SERIES_VIZ)[];
|
51
65
|
};
|
52
66
|
readonly metricQuery: import("./types").AiMetricQueryWithFilters;
|
@@ -56,6 +70,14 @@ export declare const parseVizConfig: (vizConfigUnknown: object | null, maxLimit?
|
|
56
70
|
filters: import("../..").Filters;
|
57
71
|
type: AiResultType.TABLE_RESULT;
|
58
72
|
description: string;
|
73
|
+
customMetrics: {
|
74
|
+
name: string;
|
75
|
+
label: string;
|
76
|
+
table: string;
|
77
|
+
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;
|
78
|
+
baseDimensionName: string;
|
79
|
+
}[] | null;
|
80
|
+
title: string;
|
59
81
|
vizConfig: {
|
60
82
|
dimensions: string[];
|
61
83
|
metrics: string[];
|
@@ -67,7 +89,6 @@ export declare const parseVizConfig: (vizConfigUnknown: object | null, maxLimit?
|
|
67
89
|
nullsFirst: boolean | null;
|
68
90
|
}[];
|
69
91
|
};
|
70
|
-
title: string;
|
71
92
|
followUpTools: (import("./followUpTools").FollowUpTools.GENERATE_BAR_VIZ | import("./followUpTools").FollowUpTools.GENERATE_TIME_SERIES_VIZ)[];
|
72
93
|
};
|
73
94
|
readonly metricQuery: import("./types").AiMetricQueryWithFilters;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/ee/AiAgent/utils.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC,eAAO,MAAM,cAAc,qBACL,MAAM,GAAG,IAAI,aACpB,MAAM,GAAG,SAAS
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/ee/AiAgent/utils.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC,eAAO,MAAM,cAAc,qBACL,MAAM,GAAG,IAAI,aACpB,MAAM,GAAG,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QA2DhC,CAAC"}
|
@@ -11,7 +11,12 @@ const parseVizConfig = (vizConfigUnknown, maxLimit) => {
|
|
11
11
|
const toolVerticalBarArgsParsed = schemas_1.toolVerticalBarArgsSchemaTransformed.safeParse(vizConfigUnknown);
|
12
12
|
if (toolVerticalBarArgsParsed.success) {
|
13
13
|
const vizTool = toolVerticalBarArgsParsed.data;
|
14
|
-
const metricQuery = (0, schemas_1.metricQueryVerticalBarViz)(
|
14
|
+
const metricQuery = (0, schemas_1.metricQueryVerticalBarViz)({
|
15
|
+
vizConfig: vizTool.vizConfig,
|
16
|
+
filters: vizTool.filters,
|
17
|
+
maxLimit: maxLimit ?? constants_1.AI_DEFAULT_MAX_QUERY_LIMIT,
|
18
|
+
customMetrics: vizTool.customMetrics ?? null,
|
19
|
+
});
|
15
20
|
return {
|
16
21
|
type: types_1.AiResultType.VERTICAL_BAR_RESULT,
|
17
22
|
vizTool,
|
@@ -21,7 +26,12 @@ const parseVizConfig = (vizConfigUnknown, maxLimit) => {
|
|
21
26
|
const toolTimeSeriesArgsParsed = schemas_1.toolTimeSeriesArgsSchemaTransformed.safeParse(vizConfigUnknown);
|
22
27
|
if (toolTimeSeriesArgsParsed.success) {
|
23
28
|
const vizTool = toolTimeSeriesArgsParsed.data;
|
24
|
-
const metricQuery = (0, schemas_1.metricQueryTimeSeriesViz)(
|
29
|
+
const metricQuery = (0, schemas_1.metricQueryTimeSeriesViz)({
|
30
|
+
vizConfig: vizTool.vizConfig,
|
31
|
+
filters: vizTool.filters,
|
32
|
+
maxLimit: maxLimit ?? constants_1.AI_DEFAULT_MAX_QUERY_LIMIT,
|
33
|
+
customMetrics: vizTool.customMetrics ?? null,
|
34
|
+
});
|
25
35
|
return {
|
26
36
|
type: types_1.AiResultType.TIME_SERIES_RESULT,
|
27
37
|
vizTool,
|
@@ -31,7 +41,12 @@ const parseVizConfig = (vizConfigUnknown, maxLimit) => {
|
|
31
41
|
const toolTableVizArgsParsed = schemas_1.toolTableVizArgsSchemaTransformed.safeParse(vizConfigUnknown);
|
32
42
|
if (toolTableVizArgsParsed.success) {
|
33
43
|
const vizTool = toolTableVizArgsParsed.data;
|
34
|
-
const metricQuery = (0, schemas_1.metricQueryTableViz)(
|
44
|
+
const metricQuery = (0, schemas_1.metricQueryTableViz)({
|
45
|
+
vizConfig: vizTool.vizConfig,
|
46
|
+
filters: vizTool.filters,
|
47
|
+
maxLimit: maxLimit ?? constants_1.AI_DEFAULT_MAX_QUERY_LIMIT,
|
48
|
+
customMetrics: vizTool.customMetrics ?? null,
|
49
|
+
});
|
35
50
|
return {
|
36
51
|
type: types_1.AiResultType.TABLE_RESULT,
|
37
52
|
vizTool,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../src/ee/AiAgent/utils.ts"],"names":[],"mappings":";;;AAAA,2CAAyD;AACzD,uCAOmB;AACnB,mCAAuC;AAEhC,MAAM,cAAc,GAAG,CAC1B,gBAA+B,EAC/B,QAA6B,EAC/B,EAAE;IACA,IAAI,CAAC,gBAAgB,EAAE,CAAC;QACpB,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,MAAM,yBAAyB,GAC3B,8CAAoC,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;IAErE,IAAI,yBAAyB,CAAC,OAAO,EAAE,CAAC;QACpC,MAAM,OAAO,G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H,OAAO;YACH,IAAI,EAAE,oBAAY,CAAC,kBAAkB;YACrC,OAAO;YACP,WAAW;SACL,CAAC;IACf,CAAC;IAED,MAAM,sBAAsB,GACxB,2CAAiC,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;IAClE,IAAI,sBAAsB,CAAC,OAAO,EAAE,CAAC;QACjC,MAAM,OAAO,GAAG,sBAAsB,CAAC,IAAI,CAAC;QAC5C,MAAM,WAAW,GAAG,IAAA,6BAAmB,EAAC;YACpC,SAAS,EAAE,OAAO,CAAC,SAAS;YAC5B,OAAO,EAAE,OAAO,CAAC,OAAO;YACxB,QAAQ,EAAE,QAAQ,IAAI,sCAA0B;YAChD,aAAa,EAAE,OAAO,CAAC,aAAa,IAAI,IAAI;SAC/C,CAAC,CAAC;QACH,OAAO;YACH,IAAI,EAAE,oBAAY,CAAC,YAAY;YAC/B,OAAO;YACP,WAAW;SACL,CAAC;IACf,CAAC;IAED,OAAO,IAAI,CAAC;AAChB,CAAC,CAAC;AA7DW,QAAA,cAAc,kBA6DzB"}
|
@@ -1,10 +1,16 @@
|
|
1
1
|
import { type CompiledTable } from '../types/explore';
|
2
|
-
import { type Metric } from '../types/field';
|
2
|
+
import { DimensionType, MetricType, type Metric } from '../types/field';
|
3
3
|
import { type AdditionalMetric } from '../types/metricQuery';
|
4
4
|
type ConvertAdditionalMetricArgs = {
|
5
5
|
additionalMetric: AdditionalMetric;
|
6
6
|
table: CompiledTable;
|
7
7
|
};
|
8
8
|
export declare const convertAdditionalMetric: ({ additionalMetric, table, }: ConvertAdditionalMetricArgs) => Metric;
|
9
|
+
/**
|
10
|
+
* Get the custom metric types for a given dimension type
|
11
|
+
* @param type
|
12
|
+
* @returns
|
13
|
+
*/
|
14
|
+
export declare const getCustomMetricType: (type: DimensionType) => MetricType[];
|
9
15
|
export {};
|
10
16
|
//# sourceMappingURL=additionalMetrics.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"additionalMetrics.d.ts","sourceRoot":"","sources":["../../../src/utils/additionalMetrics.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,gBAAgB,CAAC;
|
1
|
+
{"version":3,"file":"additionalMetrics.d.ts","sourceRoot":"","sources":["../../../src/utils/additionalMetrics.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,KAAK,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxE,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAE7D,KAAK,2BAA2B,GAAG;IAC/B,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,KAAK,EAAE,aAAa,CAAC;CACxB,CAAC;AAEF,eAAO,MAAM,uBAAuB,iCAGjC,2BAA2B,KAAG,MAkBhC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,SAAU,aAAa,KAAG,UAAU,EA2BnE,CAAC"}
|
@@ -1,7 +1,8 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.convertAdditionalMetric = void 0;
|
3
|
+
exports.getCustomMetricType = exports.convertAdditionalMetric = void 0;
|
4
4
|
const dbt_1 = require("../types/dbt");
|
5
|
+
const field_1 = require("../types/field");
|
5
6
|
const convertAdditionalMetric = ({ additionalMetric, table, }) => {
|
6
7
|
const metric = (0, dbt_1.convertColumnMetric)({
|
7
8
|
modelName: table.name,
|
@@ -21,4 +22,38 @@ const convertAdditionalMetric = ({ additionalMetric, table, }) => {
|
|
21
22
|
};
|
22
23
|
};
|
23
24
|
exports.convertAdditionalMetric = convertAdditionalMetric;
|
25
|
+
/**
|
26
|
+
* Get the custom metric types for a given dimension type
|
27
|
+
* @param type
|
28
|
+
* @returns
|
29
|
+
*/
|
30
|
+
const getCustomMetricType = (type) => {
|
31
|
+
switch (type) {
|
32
|
+
case field_1.DimensionType.STRING:
|
33
|
+
case field_1.DimensionType.TIMESTAMP:
|
34
|
+
case field_1.DimensionType.DATE:
|
35
|
+
return [
|
36
|
+
field_1.MetricType.COUNT_DISTINCT,
|
37
|
+
field_1.MetricType.COUNT,
|
38
|
+
field_1.MetricType.MIN,
|
39
|
+
field_1.MetricType.MAX,
|
40
|
+
];
|
41
|
+
case field_1.DimensionType.NUMBER:
|
42
|
+
return [
|
43
|
+
field_1.MetricType.MIN,
|
44
|
+
field_1.MetricType.MAX,
|
45
|
+
field_1.MetricType.SUM,
|
46
|
+
field_1.MetricType.PERCENTILE,
|
47
|
+
field_1.MetricType.MEDIAN,
|
48
|
+
field_1.MetricType.AVERAGE,
|
49
|
+
field_1.MetricType.COUNT_DISTINCT,
|
50
|
+
field_1.MetricType.COUNT,
|
51
|
+
];
|
52
|
+
case field_1.DimensionType.BOOLEAN:
|
53
|
+
return [field_1.MetricType.COUNT_DISTINCT, field_1.MetricType.COUNT];
|
54
|
+
default:
|
55
|
+
return [];
|
56
|
+
}
|
57
|
+
};
|
58
|
+
exports.getCustomMetricType = getCustomMetricType;
|
24
59
|
//# sourceMappingURL=additionalMetrics.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"additionalMetrics.js","sourceRoot":"","sources":["../../../src/utils/additionalMetrics.ts"],"names":[],"mappings":";;;AAAA,sCAAmD;
|
1
|
+
{"version":3,"file":"additionalMetrics.js","sourceRoot":"","sources":["../../../src/utils/additionalMetrics.ts"],"names":[],"mappings":";;;AAAA,sCAAmD;AAEnD,0CAAwE;AAQjE,MAAM,uBAAuB,GAAG,CAAC,EACpC,gBAAgB,EAChB,KAAK,GACqB,EAAU,EAAE;IACtC,MAAM,MAAM,GAAG,IAAA,yBAAmB,EAAC;QAC/B,SAAS,EAAE,KAAK,CAAC,IAAI;QACrB,YAAY,EAAE,gBAAgB,CAAC,GAAG;QAClC,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,0 +1,42 @@
|
|
1
|
+
import { z } from 'zod';
|
2
|
+
import { MetricType } from '../../../types/field';
|
3
|
+
export declare const customMetricBaseSchema: z.ZodObject<{
|
4
|
+
name: z.ZodString;
|
5
|
+
label: z.ZodString;
|
6
|
+
baseDimensionName: z.ZodString;
|
7
|
+
table: z.ZodString;
|
8
|
+
type: z.ZodEnum<[MetricType.AVERAGE, MetricType.COUNT, MetricType.COUNT_DISTINCT, MetricType.MAX, MetricType.MIN, MetricType.SUM, MetricType.PERCENTILE, MetricType.MEDIAN]>;
|
9
|
+
}, "strip", z.ZodTypeAny, {
|
10
|
+
name: string;
|
11
|
+
label: string;
|
12
|
+
table: string;
|
13
|
+
type: MetricType.PERCENTILE | MetricType.AVERAGE | MetricType.COUNT | MetricType.COUNT_DISTINCT | MetricType.SUM | MetricType.MIN | MetricType.MAX | MetricType.MEDIAN;
|
14
|
+
baseDimensionName: string;
|
15
|
+
}, {
|
16
|
+
name: string;
|
17
|
+
label: string;
|
18
|
+
table: string;
|
19
|
+
type: MetricType.PERCENTILE | MetricType.AVERAGE | MetricType.COUNT | MetricType.COUNT_DISTINCT | MetricType.SUM | MetricType.MIN | MetricType.MAX | MetricType.MEDIAN;
|
20
|
+
baseDimensionName: string;
|
21
|
+
}>;
|
22
|
+
export type CustomMetricBaseSchema = z.infer<typeof customMetricBaseSchema>;
|
23
|
+
export declare const customMetricsSchema: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
24
|
+
name: z.ZodString;
|
25
|
+
label: z.ZodString;
|
26
|
+
baseDimensionName: z.ZodString;
|
27
|
+
table: z.ZodString;
|
28
|
+
type: z.ZodEnum<[MetricType.AVERAGE, MetricType.COUNT, MetricType.COUNT_DISTINCT, MetricType.MAX, MetricType.MIN, MetricType.SUM, MetricType.PERCENTILE, MetricType.MEDIAN]>;
|
29
|
+
}, "strip", z.ZodTypeAny, {
|
30
|
+
name: string;
|
31
|
+
label: string;
|
32
|
+
table: string;
|
33
|
+
type: MetricType.PERCENTILE | MetricType.AVERAGE | MetricType.COUNT | MetricType.COUNT_DISTINCT | MetricType.SUM | MetricType.MIN | MetricType.MAX | MetricType.MEDIAN;
|
34
|
+
baseDimensionName: string;
|
35
|
+
}, {
|
36
|
+
name: string;
|
37
|
+
label: string;
|
38
|
+
table: string;
|
39
|
+
type: MetricType.PERCENTILE | MetricType.AVERAGE | MetricType.COUNT | MetricType.COUNT_DISTINCT | MetricType.SUM | MetricType.MIN | MetricType.MAX | MetricType.MEDIAN;
|
40
|
+
baseDimensionName: string;
|
41
|
+
}>, "many">>;
|
42
|
+
//# sourceMappingURL=customMetrics.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"customMetrics.d.ts","sourceRoot":"","sources":["../../../../../src/ee/AiAgent/schemas/customMetrics.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;EAmCjC,CAAC;AAEH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAE5E,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;YAmB3B,CAAC"}
|
@@ -0,0 +1,47 @@
|
|
1
|
+
import { z } from 'zod';
|
2
|
+
import { MetricType } from '../../../types/field';
|
3
|
+
export const customMetricBaseSchema = z.object({
|
4
|
+
name: z
|
5
|
+
.string()
|
6
|
+
.describe('Unique metric name using snake_case (e.g., "avg_customer_age", "total_revenue")'),
|
7
|
+
label: z
|
8
|
+
.string()
|
9
|
+
.describe('Human-readable label for the metric (e.g., "Average Customer Age", "Total Revenue")'),
|
10
|
+
baseDimensionName: z
|
11
|
+
.string()
|
12
|
+
.describe('Name of the base dimension/column this metric calculates from'),
|
13
|
+
table: z
|
14
|
+
.string()
|
15
|
+
.describe('Table name where the base column exists. Match with available dimensions in the explore.'),
|
16
|
+
type: z
|
17
|
+
.enum([
|
18
|
+
MetricType.AVERAGE,
|
19
|
+
MetricType.COUNT,
|
20
|
+
MetricType.COUNT_DISTINCT,
|
21
|
+
MetricType.MAX,
|
22
|
+
MetricType.MIN,
|
23
|
+
MetricType.SUM,
|
24
|
+
MetricType.PERCENTILE,
|
25
|
+
MetricType.MEDIAN,
|
26
|
+
])
|
27
|
+
.describe(`Choose based on the user's request. If the base dimension type is STRING, TIMESTAMP, DATE, BOOLEAN, use COUNT_DISTINCT, COUNT, MIN, MAX. If the base dimension type is NUMBER, use MIN, MAX, SUM, PERCENTILE, MEDIAN, AVERAGE, COUNT_DISTINCT, COUNT. If the base dimension type is BOOLEAN, use COUNT_DISTINCT, COUNT.`),
|
28
|
+
});
|
29
|
+
export const customMetricsSchema = z
|
30
|
+
.array(customMetricBaseSchema)
|
31
|
+
.nullable()
|
32
|
+
.describe(`Create custom metrics when requested metrics don't exist. Only create if no existing metric matches the user's request. Use null if no custom metrics needed.
|
33
|
+
|
34
|
+
IMPORTANT: If the user requests metrics that don't exist (like "average customer age"), create them using the customMetrics field. Analyze available dimensions from findFields results and create appropriate SQL aggregations.
|
35
|
+
|
36
|
+
When using custom metrics:
|
37
|
+
1. Create the metric in customMetrics array with just the metric name (e.g., "avg_customer_age")
|
38
|
+
2. Reference it in metrics array using the format "table_metricname" (e.g., "customers_avg_customer_age")
|
39
|
+
3. Reference it in sorts array using the format "table_metricname" (e.g., "customers_avg_customer_age")
|
40
|
+
4. DO NOT use the raw metric name in metrics or sorts arrays
|
41
|
+
|
42
|
+
For example:
|
43
|
+
- "Show me average customer age sorted descending" →
|
44
|
+
customMetrics: [{name: "avg_customer_age", label: "Average Customer Age", type: "AVERAGE", baseDimensionName: "age", table: "customers"}]
|
45
|
+
metrics: ["customers_avg_customer_age"]
|
46
|
+
sorts: [{fieldId: "customers_avg_customer_age", descending: true}]`);
|
47
|
+
//# sourceMappingURL=customMetrics.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"customMetrics.js","sourceRoot":"","sources":["../../../../../src/ee/AiAgent/schemas/customMetrics.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,IAAI,EAAE,CAAC;SACF,MAAM,EAAE;SACR,QAAQ,CACL,iFAAiF,CACpF;IACL,KAAK,EAAE,CAAC;SACH,MAAM,EAAE;SACR,QAAQ,CACL,qFAAqF,CACxF;IACL,iBAAiB,EAAE,CAAC;SACf,MAAM,EAAE;SACR,QAAQ,CACL,+DAA+D,CAClE;IACL,KAAK,EAAE,CAAC;SACH,MAAM,EAAE;SACR,QAAQ,CACL,0FAA0F,CAC7F;IACL,IAAI,EAAE,CAAC;SACF,IAAI,CAAC;QACF,UAAU,CAAC,OAAO;QAClB,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,GAAG;QACd,UAAU,CAAC,GAAG;QACd,UAAU,CAAC,GAAG;QACd,UAAU,CAAC,UAAU;QACrB,UAAU,CAAC,MAAM;KACpB,CAAC;SACD,QAAQ,CACL,yTAAyT,CAC5T;CACR,CAAC,CAAC;AAIH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC;KAC/B,KAAK,CAAC,sBAAsB,CAAC;KAC7B,QAAQ,EAAE;KACV,QAAQ,CACL;;;;;;;;;;;;;;mFAc2E,CAC9E,CAAC"}
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import { z } from 'zod';
|
2
|
+
export * from './customMetrics';
|
2
3
|
export * from './filters';
|
3
4
|
export * from './tools';
|
4
5
|
export * from './visualizations';
|
@@ -80,6 +81,25 @@ export declare const AgentToolCallArgsSchema: z.ZodDiscriminatedUnion<"type", [z
|
|
80
81
|
}>, z.ZodObject<{
|
81
82
|
type: z.ZodLiteral<import("..").AiResultType.VERTICAL_BAR_RESULT>;
|
82
83
|
} & {
|
84
|
+
customMetrics: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
85
|
+
name: z.ZodString;
|
86
|
+
label: z.ZodString;
|
87
|
+
baseDimensionName: z.ZodString;
|
88
|
+
table: z.ZodString;
|
89
|
+
type: z.ZodEnum<[import("../../..").MetricType.AVERAGE, import("../../..").MetricType.COUNT, import("../../..").MetricType.COUNT_DISTINCT, import("../../..").MetricType.MAX, import("../../..").MetricType.MIN, import("../../..").MetricType.SUM, import("../../..").MetricType.PERCENTILE, import("../../..").MetricType.MEDIAN]>;
|
90
|
+
}, "strip", z.ZodTypeAny, {
|
91
|
+
name: string;
|
92
|
+
label: string;
|
93
|
+
table: string;
|
94
|
+
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;
|
95
|
+
baseDimensionName: string;
|
96
|
+
}, {
|
97
|
+
name: string;
|
98
|
+
label: string;
|
99
|
+
table: string;
|
100
|
+
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;
|
101
|
+
baseDimensionName: string;
|
102
|
+
}>, "many">>;
|
83
103
|
vizConfig: z.ZodObject<{
|
84
104
|
exploreName: z.ZodString;
|
85
105
|
xDimension: z.ZodString;
|
@@ -1266,6 +1286,14 @@ export declare const AgentToolCallArgsSchema: z.ZodDiscriminatedUnion<"type", [z
|
|
1266
1286
|
})[] | null;
|
1267
1287
|
type: "and" | "or";
|
1268
1288
|
} | null;
|
1289
|
+
customMetrics: {
|
1290
|
+
name: string;
|
1291
|
+
label: string;
|
1292
|
+
table: string;
|
1293
|
+
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;
|
1294
|
+
baseDimensionName: string;
|
1295
|
+
}[] | null;
|
1296
|
+
title: string;
|
1269
1297
|
vizConfig: {
|
1270
1298
|
limit: number | null;
|
1271
1299
|
exploreName: string;
|
@@ -1282,7 +1310,6 @@ export declare const AgentToolCallArgsSchema: z.ZodDiscriminatedUnion<"type", [z
|
|
1282
1310
|
stackBars: boolean | null;
|
1283
1311
|
xAxisType: "time" | "category";
|
1284
1312
|
};
|
1285
|
-
title: string;
|
1286
1313
|
followUpTools: (import("..").FollowUpTools.GENERATE_BAR_VIZ | import("..").FollowUpTools.GENERATE_TIME_SERIES_VIZ)[];
|
1287
1314
|
}, {
|
1288
1315
|
type: import("..").AiResultType.VERTICAL_BAR_RESULT;
|
@@ -1468,6 +1495,14 @@ export declare const AgentToolCallArgsSchema: z.ZodDiscriminatedUnion<"type", [z
|
|
1468
1495
|
})[] | null;
|
1469
1496
|
type: "and" | "or";
|
1470
1497
|
} | null;
|
1498
|
+
customMetrics: {
|
1499
|
+
name: string;
|
1500
|
+
label: string;
|
1501
|
+
table: string;
|
1502
|
+
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;
|
1503
|
+
baseDimensionName: string;
|
1504
|
+
}[] | null;
|
1505
|
+
title: string;
|
1471
1506
|
vizConfig: {
|
1472
1507
|
limit: number | null;
|
1473
1508
|
exploreName: string;
|
@@ -1484,11 +1519,29 @@ export declare const AgentToolCallArgsSchema: z.ZodDiscriminatedUnion<"type", [z
|
|
1484
1519
|
stackBars: boolean | null;
|
1485
1520
|
xAxisType: "time" | "category";
|
1486
1521
|
};
|
1487
|
-
title: string;
|
1488
1522
|
followUpTools: (import("..").FollowUpTools.GENERATE_BAR_VIZ | import("..").FollowUpTools.GENERATE_TIME_SERIES_VIZ)[];
|
1489
1523
|
}>, z.ZodObject<{
|
1490
1524
|
type: z.ZodLiteral<import("..").AiResultType.TABLE_RESULT>;
|
1491
1525
|
} & {
|
1526
|
+
customMetrics: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
1527
|
+
name: z.ZodString;
|
1528
|
+
label: z.ZodString;
|
1529
|
+
baseDimensionName: z.ZodString;
|
1530
|
+
table: z.ZodString;
|
1531
|
+
type: z.ZodEnum<[import("../../..").MetricType.AVERAGE, import("../../..").MetricType.COUNT, import("../../..").MetricType.COUNT_DISTINCT, import("../../..").MetricType.MAX, import("../../..").MetricType.MIN, import("../../..").MetricType.SUM, import("../../..").MetricType.PERCENTILE, import("../../..").MetricType.MEDIAN]>;
|
1532
|
+
}, "strip", z.ZodTypeAny, {
|
1533
|
+
name: string;
|
1534
|
+
label: string;
|
1535
|
+
table: string;
|
1536
|
+
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;
|
1537
|
+
baseDimensionName: string;
|
1538
|
+
}, {
|
1539
|
+
name: string;
|
1540
|
+
label: string;
|
1541
|
+
table: string;
|
1542
|
+
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;
|
1543
|
+
baseDimensionName: string;
|
1544
|
+
}>, "many">>;
|
1492
1545
|
vizConfig: z.ZodObject<{
|
1493
1546
|
exploreName: z.ZodString;
|
1494
1547
|
metrics: z.ZodArray<z.ZodString, "many">;
|
@@ -2660,6 +2713,14 @@ export declare const AgentToolCallArgsSchema: z.ZodDiscriminatedUnion<"type", [z
|
|
2660
2713
|
})[] | null;
|
2661
2714
|
type: "and" | "or";
|
2662
2715
|
} | null;
|
2716
|
+
customMetrics: {
|
2717
|
+
name: string;
|
2718
|
+
label: string;
|
2719
|
+
table: string;
|
2720
|
+
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;
|
2721
|
+
baseDimensionName: string;
|
2722
|
+
}[] | null;
|
2723
|
+
title: string;
|
2663
2724
|
vizConfig: {
|
2664
2725
|
dimensions: string[];
|
2665
2726
|
metrics: string[];
|
@@ -2671,7 +2732,6 @@ export declare const AgentToolCallArgsSchema: z.ZodDiscriminatedUnion<"type", [z
|
|
2671
2732
|
nullsFirst: boolean | null;
|
2672
2733
|
}[];
|
2673
2734
|
};
|
2674
|
-
title: string;
|
2675
2735
|
followUpTools: (import("..").FollowUpTools.GENERATE_BAR_VIZ | import("..").FollowUpTools.GENERATE_TIME_SERIES_VIZ)[];
|
2676
2736
|
}, {
|
2677
2737
|
type: import("..").AiResultType.TABLE_RESULT;
|
@@ -2857,6 +2917,14 @@ export declare const AgentToolCallArgsSchema: z.ZodDiscriminatedUnion<"type", [z
|
|
2857
2917
|
})[] | null;
|
2858
2918
|
type: "and" | "or";
|
2859
2919
|
} | null;
|
2920
|
+
customMetrics: {
|
2921
|
+
name: string;
|
2922
|
+
label: string;
|
2923
|
+
table: string;
|
2924
|
+
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;
|
2925
|
+
baseDimensionName: string;
|
2926
|
+
}[] | null;
|
2927
|
+
title: string;
|
2860
2928
|
vizConfig: {
|
2861
2929
|
dimensions: string[];
|
2862
2930
|
metrics: string[];
|
@@ -2868,11 +2936,29 @@ export declare const AgentToolCallArgsSchema: z.ZodDiscriminatedUnion<"type", [z
|
|
2868
2936
|
nullsFirst: boolean | null;
|
2869
2937
|
}[];
|
2870
2938
|
};
|
2871
|
-
title: string;
|
2872
2939
|
followUpTools: (import("..").FollowUpTools.GENERATE_BAR_VIZ | import("..").FollowUpTools.GENERATE_TIME_SERIES_VIZ)[];
|
2873
2940
|
}>, z.ZodObject<{
|
2874
2941
|
type: z.ZodLiteral<import("..").AiResultType.TIME_SERIES_RESULT>;
|
2875
2942
|
} & {
|
2943
|
+
customMetrics: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
2944
|
+
name: z.ZodString;
|
2945
|
+
label: z.ZodString;
|
2946
|
+
baseDimensionName: z.ZodString;
|
2947
|
+
table: z.ZodString;
|
2948
|
+
type: z.ZodEnum<[import("../../..").MetricType.AVERAGE, import("../../..").MetricType.COUNT, import("../../..").MetricType.COUNT_DISTINCT, import("../../..").MetricType.MAX, import("../../..").MetricType.MIN, import("../../..").MetricType.SUM, import("../../..").MetricType.PERCENTILE, import("../../..").MetricType.MEDIAN]>;
|
2949
|
+
}, "strip", z.ZodTypeAny, {
|
2950
|
+
name: string;
|
2951
|
+
label: string;
|
2952
|
+
table: string;
|
2953
|
+
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;
|
2954
|
+
baseDimensionName: string;
|
2955
|
+
}, {
|
2956
|
+
name: string;
|
2957
|
+
label: string;
|
2958
|
+
table: string;
|
2959
|
+
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;
|
2960
|
+
baseDimensionName: string;
|
2961
|
+
}>, "many">>;
|
2876
2962
|
vizConfig: z.ZodObject<{
|
2877
2963
|
exploreName: z.ZodString;
|
2878
2964
|
xDimension: z.ZodString;
|
@@ -4056,6 +4142,14 @@ export declare const AgentToolCallArgsSchema: z.ZodDiscriminatedUnion<"type", [z
|
|
4056
4142
|
})[] | null;
|
4057
4143
|
type: "and" | "or";
|
4058
4144
|
} | null;
|
4145
|
+
customMetrics: {
|
4146
|
+
name: string;
|
4147
|
+
label: string;
|
4148
|
+
table: string;
|
4149
|
+
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;
|
4150
|
+
baseDimensionName: string;
|
4151
|
+
}[] | null;
|
4152
|
+
title: string;
|
4059
4153
|
vizConfig: {
|
4060
4154
|
limit: number | null;
|
4061
4155
|
exploreName: string;
|
@@ -4071,7 +4165,6 @@ export declare const AgentToolCallArgsSchema: z.ZodDiscriminatedUnion<"type", [z
|
|
4071
4165
|
xAxisLabel: string | null;
|
4072
4166
|
yAxisLabel: string | null;
|
4073
4167
|
};
|
4074
|
-
title: string;
|
4075
4168
|
followUpTools: (import("..").FollowUpTools.GENERATE_BAR_VIZ | import("..").FollowUpTools.GENERATE_TIME_SERIES_VIZ)[];
|
4076
4169
|
}, {
|
4077
4170
|
type: import("..").AiResultType.TIME_SERIES_RESULT;
|
@@ -4257,6 +4350,14 @@ export declare const AgentToolCallArgsSchema: z.ZodDiscriminatedUnion<"type", [z
|
|
4257
4350
|
})[] | null;
|
4258
4351
|
type: "and" | "or";
|
4259
4352
|
} | null;
|
4353
|
+
customMetrics: {
|
4354
|
+
name: string;
|
4355
|
+
label: string;
|
4356
|
+
table: string;
|
4357
|
+
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;
|
4358
|
+
baseDimensionName: string;
|
4359
|
+
}[] | null;
|
4360
|
+
title: string;
|
4260
4361
|
vizConfig: {
|
4261
4362
|
limit: number | null;
|
4262
4363
|
exploreName: string;
|
@@ -4272,7 +4373,6 @@ export declare const AgentToolCallArgsSchema: z.ZodDiscriminatedUnion<"type", [z
|
|
4272
4373
|
xAxisLabel: string | null;
|
4273
4374
|
yAxisLabel: string | null;
|
4274
4375
|
};
|
4275
|
-
title: string;
|
4276
4376
|
followUpTools: (import("..").FollowUpTools.GENERATE_BAR_VIZ | import("..").FollowUpTools.GENERATE_TIME_SERIES_VIZ)[];
|
4277
4377
|
}>, z.ZodObject<{
|
4278
4378
|
type: z.ZodLiteral<"find_explores">;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/ee/AiAgent/schemas/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAWxB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,kBAAkB,CAAC;AAEjC,eAAO,MAAM,uBAAuB
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/ee/AiAgent/schemas/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAWxB,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAQlC,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import { z } from 'zod';
|
2
2
|
import { toolFindChartsArgsSchema, toolFindDashboardsArgsSchema, toolFindExploresArgsSchema, toolFindFieldsArgsSchema, toolTableVizArgsSchema, toolTimeSeriesArgsSchema, toolVerticalBarArgsSchema, } from './tools';
|
3
|
+
export * from './customMetrics';
|
3
4
|
export * from './filters';
|
4
5
|
export * from './tools';
|
5
6
|
export * from './visualizations';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/ee/AiAgent/schemas/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACH,wBAAwB,EACxB,4BAA4B,EAC5B,0BAA0B,EAC1B,wBAAwB,EACxB,sBAAsB,EACtB,wBAAwB,EACxB,yBAAyB,GAC5B,MAAM,SAAS,CAAC;AAEjB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,kBAAkB,CAAC;AAEjC,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,kBAAkB,CAAC,MAAM,EAAE;IAChE,wBAAwB;IACxB,4BAA4B;IAC5B,wBAAwB;IACxB,yBAAyB;IACzB,sBAAsB;IACtB,wBAAwB;IACxB,0BAA0B;CAC7B,CAAC,CAAC"}
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/ee/AiAgent/schemas/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACH,wBAAwB,EACxB,4BAA4B,EAC5B,0BAA0B,EAC1B,wBAAwB,EACxB,sBAAsB,EACtB,wBAAwB,EACxB,yBAAyB,GAC5B,MAAM,SAAS,CAAC;AAEjB,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,kBAAkB,CAAC;AAEjC,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,kBAAkB,CAAC,MAAM,EAAE;IAChE,wBAAwB;IACxB,4BAA4B;IAC5B,wBAAwB;IACxB,yBAAyB;IACzB,sBAAsB;IACtB,wBAAwB;IACxB,0BAA0B;CAC7B,CAAC,CAAC"}
|