@sisense/sdk-ai-core 0.9.0 → 0.13.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/constants.d.ts +2 -0
- package/dist/constants.d.ts.map +1 -1
- package/dist/engines/build-chart/build-chart-engine.d.ts +4 -5
- package/dist/engines/build-chart/build-chart-engine.d.ts.map +1 -1
- package/dist/engines/build-chart/build-chart-service.d.ts +3 -3
- package/dist/engines/build-chart/build-chart-service.d.ts.map +1 -1
- package/dist/engines/build-chart/create-chart/assemble-chart-widget.d.ts +26 -0
- package/dist/engines/build-chart/create-chart/assemble-chart-widget.d.ts.map +1 -0
- package/dist/engines/build-chart/create-chart/chart-json-axes-mapping.d.ts +27 -0
- package/dist/engines/build-chart/create-chart/chart-json-axes-mapping.d.ts.map +1 -0
- package/dist/engines/build-chart/create-chart/create-chart.d.ts +5 -18
- package/dist/engines/build-chart/create-chart/create-chart.d.ts.map +1 -1
- package/dist/engines/build-chart/create-chart/generate-chart-recommendations.d.ts +8 -4
- package/dist/engines/build-chart/create-chart/generate-chart-recommendations.d.ts.map +1 -1
- package/dist/engines/build-chart/create-chart/generate-chart.d.ts +18 -0
- package/dist/engines/build-chart/create-chart/generate-chart.d.ts.map +1 -0
- package/dist/engines/build-chart/create-chart/get-columns-json.d.ts +15 -0
- package/dist/engines/build-chart/create-chart/get-columns-json.d.ts.map +1 -0
- package/dist/engines/build-chart/create-chart/resolve-chart-query.d.ts +11 -0
- package/dist/engines/build-chart/create-chart/resolve-chart-query.d.ts.map +1 -0
- package/dist/engines/build-chart/dataset-from-saved-chart-widget.d.ts +11 -0
- package/dist/engines/build-chart/dataset-from-saved-chart-widget.d.ts.map +1 -0
- package/dist/engines/build-chart/shared/csdk-data-options-for-llm.d.ts +14 -0
- package/dist/engines/build-chart/shared/csdk-data-options-for-llm.d.ts.map +1 -0
- package/dist/engines/build-chart/types.d.ts +283 -533
- package/dist/engines/build-chart/types.d.ts.map +1 -1
- package/dist/engines/build-chart/update-chart/apply-prior-chart-style.d.ts +10 -0
- package/dist/engines/build-chart/update-chart/apply-prior-chart-style.d.ts.map +1 -0
- package/dist/engines/build-chart/update-chart/chart-options-schemas.d.ts +1825 -7310
- package/dist/engines/build-chart/update-chart/chart-options-schemas.d.ts.map +1 -1
- package/dist/engines/build-chart/update-chart/schemas.d.ts +68 -977
- package/dist/engines/build-chart/update-chart/schemas.d.ts.map +1 -1
- package/dist/engines/build-chart/update-chart/update-chart-data-options.d.ts +1 -1
- package/dist/engines/build-chart/update-chart/update-chart-data-options.d.ts.map +1 -1
- package/dist/engines/build-chart/update-chart/update-chart-query.d.ts +8 -0
- package/dist/engines/build-chart/update-chart/update-chart-query.d.ts.map +1 -0
- package/dist/engines/build-chart/update-chart/update-chart-style-options.d.ts +1 -1
- package/dist/engines/build-chart/update-chart/update-chart-style-options.d.ts.map +1 -1
- package/dist/engines/build-chart/update-chart/update-chart-title.d.ts +1 -1
- package/dist/engines/build-chart/update-chart/update-chart-title.d.ts.map +1 -1
- package/dist/engines/build-chart/update-chart/update-chart-type.d.ts +1 -1
- package/dist/engines/build-chart/update-chart/update-chart-type.d.ts.map +1 -1
- package/dist/engines/build-csv-model/build-csv-model-engine.d.ts +1 -1
- package/dist/engines/build-csv-model/build-csv-model-engine.d.ts.map +1 -1
- package/dist/engines/build-csv-model/rest-build.d.ts.map +1 -1
- package/dist/engines/build-csv-model/types.d.ts +18 -70
- package/dist/engines/build-csv-model/types.d.ts.map +1 -1
- package/dist/engines/build-dashboard/add-dashboard-filters.d.ts.map +1 -1
- package/dist/engines/build-dashboard/add-dashboard-widgets.d.ts.map +1 -1
- package/dist/engines/build-dashboard/build-dashboard-engine.d.ts +3 -6
- package/dist/engines/build-dashboard/build-dashboard-engine.d.ts.map +1 -1
- package/dist/engines/build-dashboard/build-dashboard-service.d.ts +3 -3
- package/dist/engines/build-dashboard/build-dashboard-service.d.ts.map +1 -1
- package/dist/engines/build-dashboard/create-chart-widget.d.ts.map +1 -1
- package/dist/engines/build-dashboard/create-dashboard.d.ts.map +1 -1
- package/dist/engines/build-dashboard/dashboard-filters/manipulate-dashboard-filters.d.ts +2 -2
- package/dist/engines/build-dashboard/dashboard-filters/manipulate-dashboard-filters.d.ts.map +1 -1
- package/dist/engines/build-dashboard/load-existing-fusion-dashboard.d.ts.map +1 -1
- package/dist/engines/build-dashboard/types.d.ts +46 -90
- package/dist/engines/build-dashboard/types.d.ts.map +1 -1
- package/dist/engines/build-dashboard/update-chart-widget.d.ts.map +1 -1
- package/dist/engines/build-dashboard/update-dashboard.d.ts.map +1 -1
- package/dist/engines/build-data-model/build-data-model-engine.d.ts +1 -1
- package/dist/engines/build-data-model/build-data-model-engine.d.ts.map +1 -1
- package/dist/engines/build-data-model/types.d.ts +59 -316
- package/dist/engines/build-data-model/types.d.ts.map +1 -1
- package/dist/engines/build-query/build-query-engine.d.ts +1 -1
- package/dist/engines/build-query/build-query-engine.d.ts.map +1 -1
- package/dist/engines/build-query/types.d.ts +28 -17
- package/dist/engines/build-query/types.d.ts.map +1 -1
- package/dist/engines/get-dashboards/get-dashboards-engine.d.ts +1 -1
- package/dist/engines/get-dashboards/get-dashboards-engine.d.ts.map +1 -1
- package/dist/engines/get-dashboards/types.d.ts +7 -2
- package/dist/engines/get-dashboards/types.d.ts.map +1 -1
- package/dist/engines/get-data-source-fields/get-data-source-fields-engine.d.ts +5 -4
- package/dist/engines/get-data-source-fields/get-data-source-fields-engine.d.ts.map +1 -1
- package/dist/engines/get-data-source-fields/types.d.ts +10 -8
- package/dist/engines/get-data-source-fields/types.d.ts.map +1 -1
- package/dist/engines/get-data-sources/get-data-sources-engine.d.ts +1 -1
- package/dist/engines/get-data-sources/get-data-sources-engine.d.ts.map +1 -1
- package/dist/engines/get-data-sources/types.d.ts +7 -2
- package/dist/engines/get-data-sources/types.d.ts.map +1 -1
- package/dist/engines/index.d.ts +1 -1
- package/dist/engines/index.d.ts.map +1 -1
- package/dist/engines/manage-perspectives/manage-perspectives-engine.d.ts +1 -1
- package/dist/engines/manage-perspectives/manage-perspectives-engine.d.ts.map +1 -1
- package/dist/engines/manage-perspectives/types.d.ts +95 -194
- package/dist/engines/manage-perspectives/types.d.ts.map +1 -1
- package/dist/engines/recommend-queries/recommend-queries-engine.d.ts +1 -1
- package/dist/engines/recommend-queries/recommend-queries-engine.d.ts.map +1 -1
- package/dist/engines/recommend-queries/types.d.ts +10 -17
- package/dist/engines/recommend-queries/types.d.ts.map +1 -1
- package/dist/engines/shared/get-filters-json-for-llm-summary.d.ts +12 -0
- package/dist/engines/shared/get-filters-json-for-llm-summary.d.ts.map +1 -0
- package/dist/engines/shared/nlq-query-helpers.d.ts +13 -3
- package/dist/engines/shared/nlq-query-helpers.d.ts.map +1 -1
- package/dist/index.d.ts +16 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +26924 -7402
- package/dist/index.js.map +1 -1
- package/dist/services/dashboards/fusion-dashboards-service.d.ts.map +1 -1
- package/dist/services/data-models/ecm-service.d.ts +14 -0
- package/dist/services/data-models/ecm-service.d.ts.map +1 -1
- package/dist/services/data-sources/data-sources-service.d.ts.map +1 -1
- package/dist/services/llm/llm-consumption-service.d.ts.map +1 -1
- package/dist/services/llm/llm-models-service.d.ts +15 -0
- package/dist/services/llm/llm-models-service.d.ts.map +1 -0
- package/dist/services/nlq/nlq-service.d.ts +34 -15
- package/dist/services/nlq/nlq-service.d.ts.map +1 -1
- package/dist/singleton-clients.d.ts +4 -22
- package/dist/singleton-clients.d.ts.map +1 -1
- package/dist/utils/abort-signal.d.ts +3 -0
- package/dist/utils/abort-signal.d.ts.map +1 -0
- package/dist/utils/create-custom-fetch.d.ts +2 -3
- package/dist/utils/create-custom-fetch.d.ts.map +1 -1
- package/dist/utils/create-serialized-tool-group.d.ts +24 -0
- package/dist/utils/create-serialized-tool-group.d.ts.map +1 -0
- package/dist/utils/create-stream-completion.d.ts +69 -0
- package/dist/utils/create-stream-completion.d.ts.map +1 -0
- package/dist/utils/create-structured-completion.d.ts +18 -0
- package/dist/utils/create-structured-completion.d.ts.map +1 -0
- package/dist/utils/create-tools-completion.d.ts +28 -0
- package/dist/utils/create-tools-completion.d.ts.map +1 -0
- package/dist/utils/dev-debug.d.ts +8 -0
- package/dist/utils/dev-debug.d.ts.map +1 -0
- package/dist/utils/llm-client.d.ts +8 -0
- package/dist/utils/llm-client.d.ts.map +1 -0
- package/dist/utils/llm-provider-options.d.ts +14 -0
- package/dist/utils/llm-provider-options.d.ts.map +1 -0
- package/dist/utils/zod-utils.d.ts +9 -17
- package/dist/utils/zod-utils.d.ts.map +1 -1
- package/package.json +20 -18
- package/dist/engines/build-chart/create-chart/generate-chart-table.d.ts +0 -9
- package/dist/engines/build-chart/create-chart/generate-chart-table.d.ts.map +0 -1
- package/dist/services/globals/globals-service.d.ts +0 -2
- package/dist/services/globals/globals-service.d.ts.map +0 -1
- package/dist/utils/chat-completion-utils.d.ts +0 -55
- package/dist/utils/chat-completion-utils.d.ts.map +0 -1
- package/dist/utils/openai-client.d.ts +0 -11
- package/dist/utils/openai-client.d.ts.map +0 -1
|
@@ -1,37 +1,26 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ChartType, ChartWidgetProps, StyledColumn, StyledMeasureColumn, WithCommonWidgetProps } from '@sisense/sdk-ui';
|
|
1
|
+
import { ChartType, ChartWidgetProps, WithCommonWidgetProps } from '@sisense/sdk-ui';
|
|
3
2
|
import { HttpClient } from '@sisense/sdk-rest-client';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
3
|
+
import { z } from 'zod/v4';
|
|
4
|
+
import { QueryResult } from '../build-query/types';
|
|
5
|
+
import { ChartState, Dataset, QueryState } from '../../services/nlq/nlq-service';
|
|
6
|
+
import { LanguageModel } from 'ai';
|
|
8
7
|
export type ArtifactReference = {
|
|
9
8
|
artifactId?: string;
|
|
10
9
|
};
|
|
11
10
|
export type ExtendedChartWidgetProps = WithCommonWidgetProps<ChartWidgetProps, 'chart'> & ArtifactReference & {
|
|
12
|
-
/**
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
/** Query state used to generate this chart — needed to revise query structure incrementally */
|
|
12
|
+
queryState?: QueryState;
|
|
13
|
+
/** Sample / tabular payload from the query execution. */
|
|
14
|
+
dataset?: Dataset;
|
|
15
|
+
/** Optional CSDK chart JSON when a caller persists it alongside NLQ state (distinct from REST `chartState` / {@link QueryState}). */
|
|
16
|
+
chartState?: ChartState;
|
|
16
17
|
};
|
|
17
18
|
export type NullableChartType = ChartType | null | undefined;
|
|
18
19
|
/**
|
|
19
|
-
*
|
|
20
|
+
* Compact CSDK chart configuration for LLM consumption.
|
|
21
|
+
* Alias for {@link ChartState} — the serialized form produced by `translateChartToJSON`.
|
|
20
22
|
*/
|
|
21
|
-
export type BaseChartSummary =
|
|
22
|
-
/** Human-readable title of the chart */
|
|
23
|
-
title?: string;
|
|
24
|
-
/** Name of the data source used for the chart */
|
|
25
|
-
dataSourceTitle: string;
|
|
26
|
-
/** Type of chart (line, bar, pie, etc.) */
|
|
27
|
-
chartType?: ChartType;
|
|
28
|
-
/** Summary of applied filters */
|
|
29
|
-
filters: string;
|
|
30
|
-
/** Summary of data configuration options */
|
|
31
|
-
dataOptions: string;
|
|
32
|
-
/** Summary of styling and visual options */
|
|
33
|
-
styleOptions: string;
|
|
34
|
-
};
|
|
23
|
+
export type BaseChartSummary = ChartState;
|
|
35
24
|
/**
|
|
36
25
|
* Summary of a chart for LLM consumption and asset extraction
|
|
37
26
|
*/
|
|
@@ -42,564 +31,322 @@ export interface ChartSummary {
|
|
|
42
31
|
createdAt: string;
|
|
43
32
|
/** Unique identifier for the chart (typically the tool call ID) */
|
|
44
33
|
chartId: string;
|
|
45
|
-
/**
|
|
46
|
-
|
|
34
|
+
/** Data source the chart was built from */
|
|
35
|
+
dataSourceTitle: string;
|
|
36
|
+
/** Compact CSDK chart configuration (chartType, dataOptions, filters, styleOptions) */
|
|
37
|
+
chartState?: BaseChartSummary;
|
|
47
38
|
/** Whether this chart creation resulted in an error */
|
|
48
39
|
isError?: boolean;
|
|
49
|
-
/** Dataset from
|
|
40
|
+
/** Dataset rows/sample from NLQ when present on the saved chart widget; surfaced on {@link ChartSummary} when `naturalResponseEnabled` */
|
|
50
41
|
dataset?: Dataset;
|
|
51
42
|
}
|
|
52
|
-
|
|
53
|
-
|
|
43
|
+
/**
|
|
44
|
+
* Row in the `charts` array of the build-chart system prompt: either a full
|
|
45
|
+
* {@link ChartSummary} from the host or a single targeted entry when revising by id.
|
|
46
|
+
*/
|
|
47
|
+
export type ChartContextPromptEntry = ChartSummary | {
|
|
48
|
+
chartId: string;
|
|
49
|
+
chartState: BaseChartSummary;
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* Normalized styled-column shape used throughout the chart pipeline.
|
|
53
|
+
* `queryState` elements are normalized to this form before use (see `getColumnsJSON`).
|
|
54
|
+
* `dataOptions` items are already in this form after `translateChartFromJSON`.
|
|
55
|
+
* The `column` value is opaque — never inspected by chart manipulation code.
|
|
56
|
+
*/
|
|
57
|
+
export type ColumnJSON = {
|
|
58
|
+
column: unknown;
|
|
59
|
+
[key: string]: unknown;
|
|
60
|
+
};
|
|
61
|
+
export interface ColumnSummary {
|
|
54
62
|
id?: number;
|
|
55
63
|
name: string;
|
|
56
64
|
type?: string;
|
|
57
65
|
}
|
|
58
|
-
export declare const chartType: z.ZodEnum<
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
66
|
+
export declare const chartType: z.ZodEnum<{
|
|
67
|
+
area: "area";
|
|
68
|
+
table: "table";
|
|
69
|
+
indicator: "indicator";
|
|
70
|
+
column: "column";
|
|
71
|
+
line: "line";
|
|
72
|
+
pie: "pie";
|
|
73
|
+
bar: "bar";
|
|
74
|
+
polar: "polar";
|
|
75
|
+
funnel: "funnel";
|
|
76
|
+
treemap: "treemap";
|
|
77
|
+
sunburst: "sunburst";
|
|
78
|
+
scatter: "scatter";
|
|
79
|
+
areamap: "areamap";
|
|
80
|
+
boxplot: "boxplot";
|
|
81
|
+
scattermap: "scattermap";
|
|
82
|
+
arearange: "arearange";
|
|
83
|
+
}>;
|
|
84
|
+
export declare const axesMappingSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
85
|
+
type: z.ZodEnum<{
|
|
86
|
+
area: "area";
|
|
87
|
+
column: "column";
|
|
88
|
+
line: "line";
|
|
89
|
+
bar: "bar";
|
|
90
|
+
polar: "polar";
|
|
91
|
+
}>;
|
|
92
|
+
category: z.ZodArray<z.ZodNumber>;
|
|
93
|
+
value: z.ZodArray<z.ZodNumber>;
|
|
94
|
+
breakBy: z.ZodArray<z.ZodNumber>;
|
|
95
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
96
|
+
type: z.ZodEnum<{
|
|
97
|
+
pie: "pie";
|
|
98
|
+
funnel: "funnel";
|
|
99
|
+
treemap: "treemap";
|
|
100
|
+
sunburst: "sunburst";
|
|
101
|
+
}>;
|
|
102
|
+
category: z.ZodArray<z.ZodNumber>;
|
|
103
|
+
value: z.ZodArray<z.ZodNumber>;
|
|
104
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
87
105
|
type: z.ZodLiteral<"scatter">;
|
|
88
|
-
x: z.ZodArray<z.ZodNumber
|
|
89
|
-
y: z.ZodArray<z.ZodNumber
|
|
90
|
-
breakByPoint: z.ZodArray<z.ZodNumber
|
|
91
|
-
breakByColor: z.ZodArray<z.ZodNumber
|
|
92
|
-
size: z.ZodArray<z.ZodNumber
|
|
93
|
-
},
|
|
94
|
-
type: "scatter";
|
|
95
|
-
x: number[];
|
|
96
|
-
y: number[];
|
|
97
|
-
breakByPoint: number[];
|
|
98
|
-
breakByColor: number[];
|
|
99
|
-
size: number[];
|
|
100
|
-
}, {
|
|
101
|
-
type: "scatter";
|
|
102
|
-
x: number[];
|
|
103
|
-
y: number[];
|
|
104
|
-
breakByPoint: number[];
|
|
105
|
-
breakByColor: number[];
|
|
106
|
-
size: number[];
|
|
107
|
-
}>, z.ZodObject<{
|
|
106
|
+
x: z.ZodArray<z.ZodNumber>;
|
|
107
|
+
y: z.ZodArray<z.ZodNumber>;
|
|
108
|
+
breakByPoint: z.ZodArray<z.ZodNumber>;
|
|
109
|
+
breakByColor: z.ZodArray<z.ZodNumber>;
|
|
110
|
+
size: z.ZodArray<z.ZodNumber>;
|
|
111
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
108
112
|
type: z.ZodLiteral<"table">;
|
|
109
|
-
columns: z.ZodArray<z.ZodNumber
|
|
110
|
-
|
|
111
|
-
rowsPerPage: z.ZodNumber;
|
|
112
|
-
}, "strict", z.ZodTypeAny, {
|
|
113
|
-
type: "table";
|
|
114
|
-
columns: number[];
|
|
115
|
-
pagination: boolean;
|
|
116
|
-
rowsPerPage: number;
|
|
117
|
-
}, {
|
|
118
|
-
type: "table";
|
|
119
|
-
columns: number[];
|
|
120
|
-
pagination: boolean;
|
|
121
|
-
rowsPerPage: number;
|
|
122
|
-
}>, z.ZodObject<{
|
|
113
|
+
columns: z.ZodArray<z.ZodNumber>;
|
|
114
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
123
115
|
type: z.ZodLiteral<"range">;
|
|
124
|
-
category: z.ZodArray<z.ZodNumber
|
|
125
|
-
value: z.ZodArray<z.ZodNumber
|
|
126
|
-
breakBy: z.ZodArray<z.ZodNumber
|
|
127
|
-
},
|
|
128
|
-
value: number[];
|
|
129
|
-
type: "range";
|
|
130
|
-
category: number[];
|
|
131
|
-
breakBy: number[];
|
|
132
|
-
}, {
|
|
133
|
-
value: number[];
|
|
134
|
-
type: "range";
|
|
135
|
-
category: number[];
|
|
136
|
-
breakBy: number[];
|
|
137
|
-
}>, z.ZodObject<{
|
|
116
|
+
category: z.ZodArray<z.ZodNumber>;
|
|
117
|
+
value: z.ZodArray<z.ZodNumber>;
|
|
118
|
+
breakBy: z.ZodArray<z.ZodNumber>;
|
|
119
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
138
120
|
type: z.ZodLiteral<"indicator">;
|
|
139
|
-
value: z.ZodArray<z.ZodNumber
|
|
140
|
-
secondary: z.ZodArray<z.ZodNumber
|
|
141
|
-
min: z.ZodArray<z.ZodNumber
|
|
142
|
-
max: z.ZodArray<z.ZodNumber
|
|
143
|
-
},
|
|
144
|
-
value: number[];
|
|
145
|
-
type: "indicator";
|
|
146
|
-
secondary: number[];
|
|
147
|
-
min: number[];
|
|
148
|
-
max: number[];
|
|
149
|
-
}, {
|
|
150
|
-
value: number[];
|
|
151
|
-
type: "indicator";
|
|
152
|
-
secondary: number[];
|
|
153
|
-
min: number[];
|
|
154
|
-
max: number[];
|
|
155
|
-
}>, z.ZodObject<{
|
|
121
|
+
value: z.ZodArray<z.ZodNumber>;
|
|
122
|
+
secondary: z.ZodArray<z.ZodNumber>;
|
|
123
|
+
min: z.ZodArray<z.ZodNumber>;
|
|
124
|
+
max: z.ZodArray<z.ZodNumber>;
|
|
125
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
156
126
|
type: z.ZodLiteral<"boxplot">;
|
|
157
|
-
category: z.ZodArray<z.ZodNumber
|
|
158
|
-
value: z.ZodArray<z.ZodNumber
|
|
159
|
-
boxType: z.ZodEnum<
|
|
127
|
+
category: z.ZodArray<z.ZodNumber>;
|
|
128
|
+
value: z.ZodArray<z.ZodNumber>;
|
|
129
|
+
boxType: z.ZodEnum<{
|
|
130
|
+
iqr: "iqr";
|
|
131
|
+
extremums: "extremums";
|
|
132
|
+
standardDeviation: "standardDeviation";
|
|
133
|
+
}>;
|
|
160
134
|
outliersEnabled: z.ZodBoolean;
|
|
161
|
-
},
|
|
162
|
-
value: number[];
|
|
163
|
-
type: "boxplot";
|
|
164
|
-
category: number[];
|
|
165
|
-
boxType: "iqr" | "extremums" | "standardDeviation";
|
|
166
|
-
outliersEnabled: boolean;
|
|
167
|
-
}, {
|
|
168
|
-
value: number[];
|
|
169
|
-
type: "boxplot";
|
|
170
|
-
category: number[];
|
|
171
|
-
boxType: "iqr" | "extremums" | "standardDeviation";
|
|
172
|
-
outliersEnabled: boolean;
|
|
173
|
-
}>, z.ZodObject<{
|
|
135
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
174
136
|
type: z.ZodLiteral<"areamap">;
|
|
175
|
-
geo: z.ZodArray<z.ZodNumber
|
|
176
|
-
color: z.ZodArray<z.ZodNumber
|
|
177
|
-
},
|
|
178
|
-
type: "areamap";
|
|
179
|
-
geo: number[];
|
|
180
|
-
color: number[];
|
|
181
|
-
}, {
|
|
182
|
-
type: "areamap";
|
|
183
|
-
geo: number[];
|
|
184
|
-
color: number[];
|
|
185
|
-
}>, z.ZodObject<{
|
|
137
|
+
geo: z.ZodArray<z.ZodNumber>;
|
|
138
|
+
color: z.ZodArray<z.ZodNumber>;
|
|
139
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
186
140
|
type: z.ZodLiteral<"scattermap">;
|
|
187
|
-
geo: z.ZodArray<z.ZodNumber
|
|
188
|
-
size: z.ZodArray<z.ZodNumber
|
|
189
|
-
colorBy: z.ZodArray<z.ZodNumber
|
|
190
|
-
details: z.ZodArray<z.ZodNumber
|
|
191
|
-
locationLevel: z.ZodEnum<
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
141
|
+
geo: z.ZodArray<z.ZodNumber>;
|
|
142
|
+
size: z.ZodArray<z.ZodNumber>;
|
|
143
|
+
colorBy: z.ZodArray<z.ZodNumber>;
|
|
144
|
+
details: z.ZodArray<z.ZodNumber>;
|
|
145
|
+
locationLevel: z.ZodEnum<{
|
|
146
|
+
auto: "auto";
|
|
147
|
+
country: "country";
|
|
148
|
+
state: "state";
|
|
149
|
+
city: "city";
|
|
150
|
+
}>;
|
|
151
|
+
}, z.core.$strict>]>;
|
|
152
|
+
export declare const nullableChartType: z.ZodNullable<z.ZodEnum<{
|
|
153
|
+
area: "area";
|
|
154
|
+
table: "table";
|
|
155
|
+
indicator: "indicator";
|
|
156
|
+
column: "column";
|
|
157
|
+
line: "line";
|
|
158
|
+
pie: "pie";
|
|
159
|
+
bar: "bar";
|
|
160
|
+
polar: "polar";
|
|
161
|
+
funnel: "funnel";
|
|
162
|
+
treemap: "treemap";
|
|
163
|
+
sunburst: "sunburst";
|
|
164
|
+
scatter: "scatter";
|
|
165
|
+
areamap: "areamap";
|
|
166
|
+
boxplot: "boxplot";
|
|
167
|
+
scattermap: "scattermap";
|
|
168
|
+
arearange: "arearange";
|
|
169
|
+
}>>;
|
|
208
170
|
export declare const chartIdSchema: z.ZodDefault<z.ZodString>;
|
|
209
171
|
export declare const queryIdSchema: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
210
172
|
export declare const chartRecommendationsSchema: z.ZodObject<{
|
|
211
|
-
chartType: z.ZodEnum<
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
173
|
+
chartType: z.ZodEnum<{
|
|
174
|
+
area: "area";
|
|
175
|
+
table: "table";
|
|
176
|
+
indicator: "indicator";
|
|
177
|
+
column: "column";
|
|
178
|
+
line: "line";
|
|
179
|
+
pie: "pie";
|
|
180
|
+
bar: "bar";
|
|
181
|
+
polar: "polar";
|
|
182
|
+
funnel: "funnel";
|
|
183
|
+
treemap: "treemap";
|
|
184
|
+
sunburst: "sunburst";
|
|
185
|
+
scatter: "scatter";
|
|
186
|
+
areamap: "areamap";
|
|
187
|
+
boxplot: "boxplot";
|
|
188
|
+
scattermap: "scattermap";
|
|
189
|
+
arearange: "arearange";
|
|
190
|
+
}>;
|
|
191
|
+
axesMapping: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
192
|
+
type: z.ZodEnum<{
|
|
193
|
+
area: "area";
|
|
194
|
+
column: "column";
|
|
195
|
+
line: "line";
|
|
196
|
+
bar: "bar";
|
|
197
|
+
polar: "polar";
|
|
198
|
+
}>;
|
|
199
|
+
category: z.ZodArray<z.ZodNumber>;
|
|
200
|
+
value: z.ZodArray<z.ZodNumber>;
|
|
201
|
+
breakBy: z.ZodArray<z.ZodNumber>;
|
|
202
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
203
|
+
type: z.ZodEnum<{
|
|
204
|
+
pie: "pie";
|
|
205
|
+
funnel: "funnel";
|
|
206
|
+
treemap: "treemap";
|
|
207
|
+
sunburst: "sunburst";
|
|
208
|
+
}>;
|
|
209
|
+
category: z.ZodArray<z.ZodNumber>;
|
|
210
|
+
value: z.ZodArray<z.ZodNumber>;
|
|
211
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
240
212
|
type: z.ZodLiteral<"scatter">;
|
|
241
|
-
x: z.ZodArray<z.ZodNumber
|
|
242
|
-
y: z.ZodArray<z.ZodNumber
|
|
243
|
-
breakByPoint: z.ZodArray<z.ZodNumber
|
|
244
|
-
breakByColor: z.ZodArray<z.ZodNumber
|
|
245
|
-
size: z.ZodArray<z.ZodNumber
|
|
246
|
-
},
|
|
247
|
-
type: "scatter";
|
|
248
|
-
x: number[];
|
|
249
|
-
y: number[];
|
|
250
|
-
breakByPoint: number[];
|
|
251
|
-
breakByColor: number[];
|
|
252
|
-
size: number[];
|
|
253
|
-
}, {
|
|
254
|
-
type: "scatter";
|
|
255
|
-
x: number[];
|
|
256
|
-
y: number[];
|
|
257
|
-
breakByPoint: number[];
|
|
258
|
-
breakByColor: number[];
|
|
259
|
-
size: number[];
|
|
260
|
-
}>, z.ZodObject<{
|
|
213
|
+
x: z.ZodArray<z.ZodNumber>;
|
|
214
|
+
y: z.ZodArray<z.ZodNumber>;
|
|
215
|
+
breakByPoint: z.ZodArray<z.ZodNumber>;
|
|
216
|
+
breakByColor: z.ZodArray<z.ZodNumber>;
|
|
217
|
+
size: z.ZodArray<z.ZodNumber>;
|
|
218
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
261
219
|
type: z.ZodLiteral<"table">;
|
|
262
|
-
columns: z.ZodArray<z.ZodNumber
|
|
263
|
-
|
|
264
|
-
rowsPerPage: z.ZodNumber;
|
|
265
|
-
}, "strict", z.ZodTypeAny, {
|
|
266
|
-
type: "table";
|
|
267
|
-
columns: number[];
|
|
268
|
-
pagination: boolean;
|
|
269
|
-
rowsPerPage: number;
|
|
270
|
-
}, {
|
|
271
|
-
type: "table";
|
|
272
|
-
columns: number[];
|
|
273
|
-
pagination: boolean;
|
|
274
|
-
rowsPerPage: number;
|
|
275
|
-
}>, z.ZodObject<{
|
|
220
|
+
columns: z.ZodArray<z.ZodNumber>;
|
|
221
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
276
222
|
type: z.ZodLiteral<"range">;
|
|
277
|
-
category: z.ZodArray<z.ZodNumber
|
|
278
|
-
value: z.ZodArray<z.ZodNumber
|
|
279
|
-
breakBy: z.ZodArray<z.ZodNumber
|
|
280
|
-
},
|
|
281
|
-
value: number[];
|
|
282
|
-
type: "range";
|
|
283
|
-
category: number[];
|
|
284
|
-
breakBy: number[];
|
|
285
|
-
}, {
|
|
286
|
-
value: number[];
|
|
287
|
-
type: "range";
|
|
288
|
-
category: number[];
|
|
289
|
-
breakBy: number[];
|
|
290
|
-
}>, z.ZodObject<{
|
|
223
|
+
category: z.ZodArray<z.ZodNumber>;
|
|
224
|
+
value: z.ZodArray<z.ZodNumber>;
|
|
225
|
+
breakBy: z.ZodArray<z.ZodNumber>;
|
|
226
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
291
227
|
type: z.ZodLiteral<"indicator">;
|
|
292
|
-
value: z.ZodArray<z.ZodNumber
|
|
293
|
-
secondary: z.ZodArray<z.ZodNumber
|
|
294
|
-
min: z.ZodArray<z.ZodNumber
|
|
295
|
-
max: z.ZodArray<z.ZodNumber
|
|
296
|
-
},
|
|
297
|
-
value: number[];
|
|
298
|
-
type: "indicator";
|
|
299
|
-
secondary: number[];
|
|
300
|
-
min: number[];
|
|
301
|
-
max: number[];
|
|
302
|
-
}, {
|
|
303
|
-
value: number[];
|
|
304
|
-
type: "indicator";
|
|
305
|
-
secondary: number[];
|
|
306
|
-
min: number[];
|
|
307
|
-
max: number[];
|
|
308
|
-
}>, z.ZodObject<{
|
|
228
|
+
value: z.ZodArray<z.ZodNumber>;
|
|
229
|
+
secondary: z.ZodArray<z.ZodNumber>;
|
|
230
|
+
min: z.ZodArray<z.ZodNumber>;
|
|
231
|
+
max: z.ZodArray<z.ZodNumber>;
|
|
232
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
309
233
|
type: z.ZodLiteral<"boxplot">;
|
|
310
|
-
category: z.ZodArray<z.ZodNumber
|
|
311
|
-
value: z.ZodArray<z.ZodNumber
|
|
312
|
-
boxType: z.ZodEnum<
|
|
234
|
+
category: z.ZodArray<z.ZodNumber>;
|
|
235
|
+
value: z.ZodArray<z.ZodNumber>;
|
|
236
|
+
boxType: z.ZodEnum<{
|
|
237
|
+
iqr: "iqr";
|
|
238
|
+
extremums: "extremums";
|
|
239
|
+
standardDeviation: "standardDeviation";
|
|
240
|
+
}>;
|
|
313
241
|
outliersEnabled: z.ZodBoolean;
|
|
314
|
-
},
|
|
315
|
-
value: number[];
|
|
316
|
-
type: "boxplot";
|
|
317
|
-
category: number[];
|
|
318
|
-
boxType: "iqr" | "extremums" | "standardDeviation";
|
|
319
|
-
outliersEnabled: boolean;
|
|
320
|
-
}, {
|
|
321
|
-
value: number[];
|
|
322
|
-
type: "boxplot";
|
|
323
|
-
category: number[];
|
|
324
|
-
boxType: "iqr" | "extremums" | "standardDeviation";
|
|
325
|
-
outliersEnabled: boolean;
|
|
326
|
-
}>, z.ZodObject<{
|
|
242
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
327
243
|
type: z.ZodLiteral<"areamap">;
|
|
328
|
-
geo: z.ZodArray<z.ZodNumber
|
|
329
|
-
color: z.ZodArray<z.ZodNumber
|
|
330
|
-
},
|
|
331
|
-
type: "areamap";
|
|
332
|
-
geo: number[];
|
|
333
|
-
color: number[];
|
|
334
|
-
}, {
|
|
335
|
-
type: "areamap";
|
|
336
|
-
geo: number[];
|
|
337
|
-
color: number[];
|
|
338
|
-
}>, z.ZodObject<{
|
|
244
|
+
geo: z.ZodArray<z.ZodNumber>;
|
|
245
|
+
color: z.ZodArray<z.ZodNumber>;
|
|
246
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
339
247
|
type: z.ZodLiteral<"scattermap">;
|
|
340
|
-
geo: z.ZodArray<z.ZodNumber
|
|
341
|
-
size: z.ZodArray<z.ZodNumber
|
|
342
|
-
colorBy: z.ZodArray<z.ZodNumber
|
|
343
|
-
details: z.ZodArray<z.ZodNumber
|
|
344
|
-
locationLevel: z.ZodEnum<
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
colorBy: number[];
|
|
358
|
-
locationLevel: "auto" | "country" | "state" | "city";
|
|
359
|
-
}>]>;
|
|
360
|
-
}, "strip", z.ZodTypeAny, {
|
|
361
|
-
chartType: "area" | "table" | "indicator" | "column" | "line" | "pie" | "bar" | "polar" | "funnel" | "treemap" | "sunburst" | "scatter" | "areamap" | "boxplot" | "scattermap" | "arearange";
|
|
362
|
-
axesMapping: {
|
|
363
|
-
value: number[];
|
|
364
|
-
type: "area" | "column" | "line" | "bar" | "polar";
|
|
365
|
-
category: number[];
|
|
366
|
-
breakBy: number[];
|
|
367
|
-
} | {
|
|
368
|
-
value: number[];
|
|
369
|
-
type: "pie" | "funnel" | "treemap" | "sunburst";
|
|
370
|
-
category: number[];
|
|
371
|
-
} | {
|
|
372
|
-
type: "scatter";
|
|
373
|
-
x: number[];
|
|
374
|
-
y: number[];
|
|
375
|
-
breakByPoint: number[];
|
|
376
|
-
breakByColor: number[];
|
|
377
|
-
size: number[];
|
|
378
|
-
} | {
|
|
379
|
-
type: "table";
|
|
380
|
-
columns: number[];
|
|
381
|
-
pagination: boolean;
|
|
382
|
-
rowsPerPage: number;
|
|
383
|
-
} | {
|
|
384
|
-
value: number[];
|
|
385
|
-
type: "range";
|
|
386
|
-
category: number[];
|
|
387
|
-
breakBy: number[];
|
|
388
|
-
} | {
|
|
389
|
-
value: number[];
|
|
390
|
-
type: "indicator";
|
|
391
|
-
secondary: number[];
|
|
392
|
-
min: number[];
|
|
393
|
-
max: number[];
|
|
394
|
-
} | {
|
|
395
|
-
value: number[];
|
|
396
|
-
type: "boxplot";
|
|
397
|
-
category: number[];
|
|
398
|
-
boxType: "iqr" | "extremums" | "standardDeviation";
|
|
399
|
-
outliersEnabled: boolean;
|
|
400
|
-
} | {
|
|
401
|
-
type: "areamap";
|
|
402
|
-
geo: number[];
|
|
403
|
-
color: number[];
|
|
404
|
-
} | {
|
|
405
|
-
type: "scattermap";
|
|
406
|
-
details: number[];
|
|
407
|
-
size: number[];
|
|
408
|
-
geo: number[];
|
|
409
|
-
colorBy: number[];
|
|
410
|
-
locationLevel: "auto" | "country" | "state" | "city";
|
|
411
|
-
};
|
|
412
|
-
}, {
|
|
413
|
-
chartType: "area" | "table" | "indicator" | "column" | "line" | "pie" | "bar" | "polar" | "funnel" | "treemap" | "sunburst" | "scatter" | "areamap" | "boxplot" | "scattermap" | "arearange";
|
|
414
|
-
axesMapping: {
|
|
415
|
-
value: number[];
|
|
416
|
-
type: "area" | "column" | "line" | "bar" | "polar";
|
|
417
|
-
category: number[];
|
|
418
|
-
breakBy: number[];
|
|
419
|
-
} | {
|
|
420
|
-
value: number[];
|
|
421
|
-
type: "pie" | "funnel" | "treemap" | "sunburst";
|
|
422
|
-
category: number[];
|
|
423
|
-
} | {
|
|
424
|
-
type: "scatter";
|
|
425
|
-
x: number[];
|
|
426
|
-
y: number[];
|
|
427
|
-
breakByPoint: number[];
|
|
428
|
-
breakByColor: number[];
|
|
429
|
-
size: number[];
|
|
430
|
-
} | {
|
|
431
|
-
type: "table";
|
|
432
|
-
columns: number[];
|
|
433
|
-
pagination: boolean;
|
|
434
|
-
rowsPerPage: number;
|
|
435
|
-
} | {
|
|
436
|
-
value: number[];
|
|
437
|
-
type: "range";
|
|
438
|
-
category: number[];
|
|
439
|
-
breakBy: number[];
|
|
440
|
-
} | {
|
|
441
|
-
value: number[];
|
|
442
|
-
type: "indicator";
|
|
443
|
-
secondary: number[];
|
|
444
|
-
min: number[];
|
|
445
|
-
max: number[];
|
|
446
|
-
} | {
|
|
447
|
-
value: number[];
|
|
448
|
-
type: "boxplot";
|
|
449
|
-
category: number[];
|
|
450
|
-
boxType: "iqr" | "extremums" | "standardDeviation";
|
|
451
|
-
outliersEnabled: boolean;
|
|
452
|
-
} | {
|
|
453
|
-
type: "areamap";
|
|
454
|
-
geo: number[];
|
|
455
|
-
color: number[];
|
|
456
|
-
} | {
|
|
457
|
-
type: "scattermap";
|
|
458
|
-
details: number[];
|
|
459
|
-
size: number[];
|
|
460
|
-
geo: number[];
|
|
461
|
-
colorBy: number[];
|
|
462
|
-
locationLevel: "auto" | "country" | "state" | "city";
|
|
463
|
-
};
|
|
464
|
-
}>;
|
|
248
|
+
geo: z.ZodArray<z.ZodNumber>;
|
|
249
|
+
size: z.ZodArray<z.ZodNumber>;
|
|
250
|
+
colorBy: z.ZodArray<z.ZodNumber>;
|
|
251
|
+
details: z.ZodArray<z.ZodNumber>;
|
|
252
|
+
locationLevel: z.ZodEnum<{
|
|
253
|
+
auto: "auto";
|
|
254
|
+
country: "country";
|
|
255
|
+
state: "state";
|
|
256
|
+
city: "city";
|
|
257
|
+
}>;
|
|
258
|
+
}, z.core.$strict>]>;
|
|
259
|
+
}, z.core.$strip>;
|
|
260
|
+
/**
|
|
261
|
+
* Canonical tool description for buildChart — reusable by any host (sdk-assistant, MCP server, custom integrations).
|
|
262
|
+
* Hosts may append host-specific notes but should not duplicate or contradict this text.
|
|
263
|
+
*/
|
|
264
|
+
export declare const buildChartToolDescription = "Creates or revises a chart from a natural language prompt.\n\nRevising a chart includes updating the chart's data structure (data options), sorting, trend and forecast, style options, and filters. \n\nThree ways to scope the run:\n\n1. **New chart from scratch:** omit both `priorChartId` and `queryId` and describe the desired chart in `userPrompt`.\n2. **Revise an existing chart:** pass `priorChartId` (the chartId from a prior buildChart result, or the widget id when inside a dashboard). The chart's existing data context and style are preserved across revisions.\n3. **Verbatim prior query:** pass `queryId` (an id from a prior data query result) to chart to reuse that query result if needed to not waste the prior query work.\n\nWhen revising an existing chart, do not run other tools (e.g. query tool) and do not pass `queryId`.\n\nPass the user prompt exactly as received \u2014 do not transform or modify it.";
|
|
465
265
|
export declare const buildChartSchema: z.ZodObject<{
|
|
466
266
|
dataSourceTitle: z.ZodString;
|
|
467
267
|
userPrompt: z.ZodString;
|
|
468
|
-
|
|
469
|
-
dataSourceTitle: string;
|
|
470
|
-
userPrompt: string;
|
|
471
|
-
}, {
|
|
472
|
-
dataSourceTitle: string;
|
|
473
|
-
userPrompt: string;
|
|
474
|
-
}>;
|
|
475
|
-
export declare const buildChartSchemaNaturalConversation: z.ZodObject<{
|
|
476
|
-
dataSourceTitle: z.ZodString;
|
|
477
|
-
userPrompt: z.ZodString;
|
|
268
|
+
priorChartId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
478
269
|
queryId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
479
|
-
},
|
|
480
|
-
dataSourceTitle: string;
|
|
481
|
-
userPrompt: string;
|
|
482
|
-
queryId?: string | null | undefined;
|
|
483
|
-
}, {
|
|
484
|
-
dataSourceTitle: string;
|
|
485
|
-
userPrompt: string;
|
|
486
|
-
queryId?: string | null | undefined;
|
|
487
|
-
}>;
|
|
270
|
+
}, z.core.$strip>;
|
|
488
271
|
export declare const createChartSchema: z.ZodObject<{
|
|
489
272
|
queryPrompt: z.ZodString;
|
|
490
273
|
chartPrompt: z.ZodString;
|
|
491
|
-
chartType: z.ZodNullable<z.ZodEnum<
|
|
274
|
+
chartType: z.ZodNullable<z.ZodEnum<{
|
|
275
|
+
area: "area";
|
|
276
|
+
table: "table";
|
|
277
|
+
indicator: "indicator";
|
|
278
|
+
column: "column";
|
|
279
|
+
line: "line";
|
|
280
|
+
pie: "pie";
|
|
281
|
+
bar: "bar";
|
|
282
|
+
polar: "polar";
|
|
283
|
+
funnel: "funnel";
|
|
284
|
+
treemap: "treemap";
|
|
285
|
+
sunburst: "sunburst";
|
|
286
|
+
scatter: "scatter";
|
|
287
|
+
areamap: "areamap";
|
|
288
|
+
boxplot: "boxplot";
|
|
289
|
+
scattermap: "scattermap";
|
|
290
|
+
arearange: "arearange";
|
|
291
|
+
}>>;
|
|
492
292
|
chartTitle: z.ZodString;
|
|
493
293
|
queryId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
494
|
-
},
|
|
495
|
-
queryPrompt: string;
|
|
496
|
-
chartType: "area" | "table" | "indicator" | "column" | "line" | "pie" | "bar" | "polar" | "funnel" | "treemap" | "sunburst" | "scatter" | "areamap" | "boxplot" | "scattermap" | "arearange" | null;
|
|
497
|
-
queryId: string | null;
|
|
498
|
-
chartPrompt: string;
|
|
499
|
-
chartTitle: string;
|
|
500
|
-
}, {
|
|
501
|
-
queryPrompt: string;
|
|
502
|
-
chartType: "area" | "table" | "indicator" | "column" | "line" | "pie" | "bar" | "polar" | "funnel" | "treemap" | "sunburst" | "scatter" | "areamap" | "boxplot" | "scattermap" | "arearange" | null;
|
|
503
|
-
chartPrompt: string;
|
|
504
|
-
chartTitle: string;
|
|
505
|
-
queryId?: string | null | undefined;
|
|
506
|
-
}>;
|
|
294
|
+
}, z.core.$strip>;
|
|
507
295
|
export declare const updateChartSchema: z.ZodObject<{
|
|
508
296
|
userPrompt: z.ZodString;
|
|
509
|
-
} & {
|
|
510
297
|
chartId: z.ZodDefault<z.ZodString>;
|
|
511
|
-
},
|
|
512
|
-
userPrompt: string;
|
|
513
|
-
chartId: string;
|
|
514
|
-
}, {
|
|
515
|
-
userPrompt: string;
|
|
516
|
-
chartId?: string | undefined;
|
|
517
|
-
}>;
|
|
298
|
+
}, z.core.$strip>;
|
|
518
299
|
export declare const updateChartTitleSchema: z.ZodObject<{
|
|
519
300
|
userPrompt: z.ZodString;
|
|
520
|
-
} & {
|
|
521
301
|
chartId: z.ZodDefault<z.ZodString>;
|
|
522
|
-
} & {
|
|
523
302
|
chartTitle: z.ZodString;
|
|
524
|
-
},
|
|
525
|
-
userPrompt: string;
|
|
526
|
-
chartTitle: string;
|
|
527
|
-
chartId: string;
|
|
528
|
-
}, {
|
|
529
|
-
userPrompt: string;
|
|
530
|
-
chartTitle: string;
|
|
531
|
-
chartId?: string | undefined;
|
|
532
|
-
}>;
|
|
303
|
+
}, z.core.$strip>;
|
|
533
304
|
export declare const updateChartTypeSchema: z.ZodObject<{
|
|
534
305
|
userPrompt: z.ZodString;
|
|
535
|
-
} & {
|
|
536
306
|
chartId: z.ZodDefault<z.ZodString>;
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
307
|
+
chartType: z.ZodEnum<{
|
|
308
|
+
area: "area";
|
|
309
|
+
table: "table";
|
|
310
|
+
indicator: "indicator";
|
|
311
|
+
column: "column";
|
|
312
|
+
line: "line";
|
|
313
|
+
pie: "pie";
|
|
314
|
+
bar: "bar";
|
|
315
|
+
polar: "polar";
|
|
316
|
+
funnel: "funnel";
|
|
317
|
+
treemap: "treemap";
|
|
318
|
+
sunburst: "sunburst";
|
|
319
|
+
scatter: "scatter";
|
|
320
|
+
areamap: "areamap";
|
|
321
|
+
boxplot: "boxplot";
|
|
322
|
+
scattermap: "scattermap";
|
|
323
|
+
arearange: "arearange";
|
|
324
|
+
}>;
|
|
325
|
+
}, z.core.$strip>;
|
|
548
326
|
export declare const updateChartTypeOfMeasuresSchema: z.ZodObject<{
|
|
549
327
|
userPrompt: z.ZodString;
|
|
550
|
-
} & {
|
|
551
328
|
chartId: z.ZodDefault<z.ZodString>;
|
|
552
|
-
},
|
|
553
|
-
userPrompt: string;
|
|
554
|
-
chartId: string;
|
|
555
|
-
}, {
|
|
556
|
-
userPrompt: string;
|
|
557
|
-
chartId?: string | undefined;
|
|
558
|
-
}>;
|
|
329
|
+
}, z.core.$strip>;
|
|
559
330
|
export declare const updateChartSortingSchema: z.ZodObject<{
|
|
560
331
|
userPrompt: z.ZodString;
|
|
561
|
-
} & {
|
|
562
332
|
chartId: z.ZodDefault<z.ZodString>;
|
|
563
|
-
},
|
|
564
|
-
userPrompt: string;
|
|
565
|
-
chartId: string;
|
|
566
|
-
}, {
|
|
567
|
-
userPrompt: string;
|
|
568
|
-
chartId?: string | undefined;
|
|
569
|
-
}>;
|
|
333
|
+
}, z.core.$strip>;
|
|
570
334
|
export declare const updateTrendAndForecastSchema: z.ZodObject<{
|
|
571
335
|
userPrompt: z.ZodString;
|
|
572
|
-
} & {
|
|
573
336
|
chartId: z.ZodDefault<z.ZodString>;
|
|
574
|
-
},
|
|
575
|
-
userPrompt: string;
|
|
576
|
-
chartId: string;
|
|
577
|
-
}, {
|
|
578
|
-
userPrompt: string;
|
|
579
|
-
chartId?: string | undefined;
|
|
580
|
-
}>;
|
|
337
|
+
}, z.core.$strip>;
|
|
581
338
|
export declare const updateOtherChartDataOptionsSchema: z.ZodObject<{
|
|
582
339
|
userPrompt: z.ZodString;
|
|
583
|
-
} & {
|
|
584
340
|
chartId: z.ZodDefault<z.ZodString>;
|
|
585
|
-
},
|
|
586
|
-
userPrompt: string;
|
|
587
|
-
chartId: string;
|
|
588
|
-
}, {
|
|
589
|
-
userPrompt: string;
|
|
590
|
-
chartId?: string | undefined;
|
|
591
|
-
}>;
|
|
341
|
+
}, z.core.$strip>;
|
|
592
342
|
export declare const updateChartStyleOptionsSchema: z.ZodObject<{
|
|
593
343
|
userPrompt: z.ZodString;
|
|
594
|
-
} & {
|
|
595
344
|
chartId: z.ZodDefault<z.ZodString>;
|
|
596
|
-
},
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
chartId?: string | undefined;
|
|
602
|
-
}>;
|
|
345
|
+
}, z.core.$strip>;
|
|
346
|
+
export declare const updateChartQuerySchema: z.ZodObject<{
|
|
347
|
+
revisionPrompt: z.ZodString;
|
|
348
|
+
chartId: z.ZodString;
|
|
349
|
+
}, z.core.$strip>;
|
|
603
350
|
/**
|
|
604
351
|
* Build chart context interface
|
|
605
352
|
*/
|
|
@@ -608,14 +355,13 @@ export interface BuildChartContext {
|
|
|
608
355
|
* Tool call ID
|
|
609
356
|
*/
|
|
610
357
|
toolCallId: string;
|
|
358
|
+
abortSignal?: AbortSignal;
|
|
611
359
|
/**
|
|
612
360
|
* Data source title (required)
|
|
613
361
|
*/
|
|
614
362
|
dataSourceTitle: string;
|
|
615
363
|
/** Chart summaries to be used as context */
|
|
616
364
|
chartSummaries?: ChartSummary[];
|
|
617
|
-
/** query results to be used as context */
|
|
618
|
-
querySummaries?: QuerySummary[];
|
|
619
365
|
/**
|
|
620
366
|
* Retrieve a chart by its ID
|
|
621
367
|
* @param chartId - The ID of the chart to retrieve
|
|
@@ -634,17 +380,21 @@ export interface BuildChartContext {
|
|
|
634
380
|
* @returns The query result, or null if not found
|
|
635
381
|
*/
|
|
636
382
|
retrieveQuery?: (queryId: string) => QueryResult | null;
|
|
637
|
-
/**
|
|
638
|
-
|
|
383
|
+
/**
|
|
384
|
+
* When false, incremental NLQ uses Layer-2 text augmentation instead of REST `chartState`.
|
|
385
|
+
* Typically threaded from host config when available.
|
|
386
|
+
*/
|
|
387
|
+
isNlqDeltaEnabled?: boolean;
|
|
639
388
|
httpClient?: HttpClient;
|
|
640
|
-
|
|
389
|
+
llmClient?: LanguageModel;
|
|
390
|
+
/**
|
|
391
|
+
* When true, include `dataset` on the returned {@link ChartSummary} when the saved chart
|
|
392
|
+
* widget carries `dataset`.
|
|
393
|
+
*/
|
|
394
|
+
naturalResponseEnabled?: boolean;
|
|
395
|
+
/** Common filters (e.g., from dashboard filters) to be applied to the query of the chart. */
|
|
396
|
+
commonFilters?: unknown;
|
|
641
397
|
/** ID of a prior query result when this chart uses that query; otherwise null/undefined */
|
|
642
398
|
queryId?: string | null;
|
|
643
|
-
/** When true, include dataset in ChartSummary when build chart fetches data internally (no queryId) */
|
|
644
|
-
naturalResponseEnabled?: boolean;
|
|
645
|
-
/** Callback to capture query result when build chart fetches data internally via buildQueryEngine */
|
|
646
|
-
onInternalQueryResult?: (result: QueryResult) => void;
|
|
647
|
-
/** Translated dashboard filters for NLQ smart-query `commonFilters` when build chart calls buildQueryEngine (no queryId) */
|
|
648
|
-
filters?: unknown;
|
|
649
399
|
}
|
|
650
400
|
//# sourceMappingURL=types.d.ts.map
|