@sisense/sdk-ai-core 0.2.11

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.
Files changed (66) hide show
  1. package/README.md +51 -0
  2. package/dist/constants.d.ts +9 -0
  3. package/dist/constants.d.ts.map +1 -0
  4. package/dist/engines/chart-builder/chart-builder-engine.d.ts +14 -0
  5. package/dist/engines/chart-builder/chart-builder-engine.d.ts.map +1 -0
  6. package/dist/engines/chart-builder/chart-builder-service.d.ts +7 -0
  7. package/dist/engines/chart-builder/chart-builder-service.d.ts.map +1 -0
  8. package/dist/engines/chart-builder/create-chart/create-chart.d.ts +14 -0
  9. package/dist/engines/chart-builder/create-chart/create-chart.d.ts.map +1 -0
  10. package/dist/engines/chart-builder/create-chart/generate-chart-recommendations.d.ts +5 -0
  11. package/dist/engines/chart-builder/create-chart/generate-chart-recommendations.d.ts.map +1 -0
  12. package/dist/engines/chart-builder/create-chart/generate-chart-table.d.ts +3 -0
  13. package/dist/engines/chart-builder/create-chart/generate-chart-table.d.ts.map +1 -0
  14. package/dist/engines/chart-builder/types.d.ts +612 -0
  15. package/dist/engines/chart-builder/types.d.ts.map +1 -0
  16. package/dist/engines/chart-builder/update-chart/chart-options-schemas.d.ts +8629 -0
  17. package/dist/engines/chart-builder/update-chart/chart-options-schemas.d.ts.map +1 -0
  18. package/dist/engines/chart-builder/update-chart/schemas.d.ts +1136 -0
  19. package/dist/engines/chart-builder/update-chart/schemas.d.ts.map +1 -0
  20. package/dist/engines/chart-builder/update-chart/update-chart-data-options.d.ts +18 -0
  21. package/dist/engines/chart-builder/update-chart/update-chart-data-options.d.ts.map +1 -0
  22. package/dist/engines/chart-builder/update-chart/update-chart-style-options.d.ts +18 -0
  23. package/dist/engines/chart-builder/update-chart/update-chart-style-options.d.ts.map +1 -0
  24. package/dist/engines/chart-builder/update-chart/update-chart-title.d.ts +12 -0
  25. package/dist/engines/chart-builder/update-chart/update-chart-title.d.ts.map +1 -0
  26. package/dist/engines/chart-builder/update-chart/update-chart-type.d.ts +14 -0
  27. package/dist/engines/chart-builder/update-chart/update-chart-type.d.ts.map +1 -0
  28. package/dist/engines/index.d.ts +6 -0
  29. package/dist/engines/index.d.ts.map +1 -0
  30. package/dist/index.d.ts +18 -0
  31. package/dist/index.d.ts.map +1 -0
  32. package/dist/index.js +5035 -0
  33. package/dist/index.js.map +1 -0
  34. package/dist/services/dashboards/dashboards-service.d.ts +47 -0
  35. package/dist/services/dashboards/dashboards-service.d.ts.map +1 -0
  36. package/dist/services/dashboards/fusion-dashboards-service.d.ts +71 -0
  37. package/dist/services/dashboards/fusion-dashboards-service.d.ts.map +1 -0
  38. package/dist/services/data-models/data-models-service.d.ts +6 -0
  39. package/dist/services/data-models/data-models-service.d.ts.map +1 -0
  40. package/dist/services/data-models/ecm-service.d.ts +497 -0
  41. package/dist/services/data-models/ecm-service.d.ts.map +1 -0
  42. package/dist/services/data-sources/data-sources-service.d.ts +41 -0
  43. package/dist/services/data-sources/data-sources-service.d.ts.map +1 -0
  44. package/dist/services/globals/globals-service.d.ts +2 -0
  45. package/dist/services/globals/globals-service.d.ts.map +1 -0
  46. package/dist/services/llm/llm-settings-service.d.ts +18 -0
  47. package/dist/services/llm/llm-settings-service.d.ts.map +1 -0
  48. package/dist/services/nlq/nlq-service.d.ts +33 -0
  49. package/dist/services/nlq/nlq-service.d.ts.map +1 -0
  50. package/dist/singleton-clients.d.ts +48 -0
  51. package/dist/singleton-clients.d.ts.map +1 -0
  52. package/dist/utils/chat-completion-utils.d.ts +55 -0
  53. package/dist/utils/chat-completion-utils.d.ts.map +1 -0
  54. package/dist/utils/http-client.d.ts +33 -0
  55. package/dist/utils/http-client.d.ts.map +1 -0
  56. package/dist/utils/id-utils.d.ts +9 -0
  57. package/dist/utils/id-utils.d.ts.map +1 -0
  58. package/dist/utils/openai-client.d.ts +11 -0
  59. package/dist/utils/openai-client.d.ts.map +1 -0
  60. package/dist/utils/proxy-utils.d.ts +5 -0
  61. package/dist/utils/proxy-utils.d.ts.map +1 -0
  62. package/dist/utils/utils.d.ts +12 -0
  63. package/dist/utils/utils.d.ts.map +1 -0
  64. package/dist/utils/zod-utils.d.ts +60 -0
  65. package/dist/utils/zod-utils.d.ts.map +1 -0
  66. package/package.json +62 -0
@@ -0,0 +1,612 @@
1
+ import { CalculatedMeasureColumn, MeasureColumn } from '@sisense/sdk-data';
2
+ import { ChartType, ChartWidgetProps, StyledColumn, StyledMeasureColumn, WithCommonWidgetProps } from '@sisense/sdk-ui';
3
+ import { z } from 'zod';
4
+ import { NlqResponseData } from '@sisense/sdk-ui/ai';
5
+ export type ArtifactReference = {
6
+ artifactId?: string;
7
+ };
8
+ export type ExtendedChartWidgetProps = WithCommonWidgetProps<ChartWidgetProps, 'chart'> & ArtifactReference & {
9
+ /**
10
+ * data columns used to generate chart recommendations
11
+ */
12
+ dataColumns?: ColumnType[];
13
+ /**
14
+ * nlq result used to generate chart insights
15
+ */
16
+ nlqResponse?: NlqResponseData;
17
+ };
18
+ export type NullableChartType = ChartType | null | undefined;
19
+ /**
20
+ * Base chart summary for LLM consumption and asset extraction
21
+ */
22
+ export type BaseChartSummary = {
23
+ /** Human-readable title of the chart */
24
+ title?: string;
25
+ /** Name of the data source used for the chart */
26
+ dataSourceTitle: string;
27
+ /** Type of chart (line, bar, pie, etc.) */
28
+ chartType?: ChartType;
29
+ /** Summary of applied filters */
30
+ filters: string;
31
+ /** Summary of data configuration options */
32
+ dataOptions: string;
33
+ /** Summary of styling and visual options */
34
+ styleOptions: string;
35
+ };
36
+ /**
37
+ * Summary of a chart for LLM consumption and asset extraction
38
+ */
39
+ export interface ChartSummary {
40
+ /** Status message indicating success or failure */
41
+ message: string;
42
+ /** Date and time ISO string of when the chart was created */
43
+ createdAt: string;
44
+ /** Unique identifier for the chart (typically the tool call ID) */
45
+ chartId: string;
46
+ /** Chart details, undefined if chart creation failed */
47
+ chart?: BaseChartSummary;
48
+ /** Whether this chart creation resulted in an error */
49
+ isError?: boolean;
50
+ }
51
+ export type ColumnType = StyledColumn | StyledMeasureColumn | Column | MeasureColumn | CalculatedMeasureColumn;
52
+ export interface Column {
53
+ id?: number;
54
+ name: string;
55
+ type?: string;
56
+ }
57
+ export declare const chartType: z.ZodEnum<["bar", "column", "area", "line", "polar", "pie", "funnel", "treemap", "sunburst", "scatter", "table", "indicator", "boxplot", "areamap", "scattermap", "arearange"]>;
58
+ export declare const axesMapping: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
59
+ type: z.ZodEnum<["bar", "column", "area", "line", "polar"]>;
60
+ category: z.ZodArray<z.ZodNumber, "many">;
61
+ value: z.ZodArray<z.ZodNumber, "many">;
62
+ breakBy: z.ZodArray<z.ZodNumber, "many">;
63
+ }, "strict", z.ZodTypeAny, {
64
+ type: "line" | "area" | "bar" | "column" | "polar";
65
+ value: number[];
66
+ category: number[];
67
+ breakBy: number[];
68
+ }, {
69
+ type: "line" | "area" | "bar" | "column" | "polar";
70
+ value: number[];
71
+ category: number[];
72
+ breakBy: number[];
73
+ }>, z.ZodObject<{
74
+ type: z.ZodEnum<["pie", "funnel", "treemap", "sunburst"]>;
75
+ category: z.ZodArray<z.ZodNumber, "many">;
76
+ value: z.ZodArray<z.ZodNumber, "many">;
77
+ }, "strict", z.ZodTypeAny, {
78
+ type: "pie" | "funnel" | "treemap" | "sunburst";
79
+ value: number[];
80
+ category: number[];
81
+ }, {
82
+ type: "pie" | "funnel" | "treemap" | "sunburst";
83
+ value: number[];
84
+ category: number[];
85
+ }>, z.ZodObject<{
86
+ type: z.ZodLiteral<"scatter">;
87
+ x: z.ZodArray<z.ZodNumber, "many">;
88
+ y: z.ZodArray<z.ZodNumber, "many">;
89
+ breakByPoint: z.ZodArray<z.ZodNumber, "many">;
90
+ breakByColor: z.ZodArray<z.ZodNumber, "many">;
91
+ size: z.ZodArray<z.ZodNumber, "many">;
92
+ }, "strict", z.ZodTypeAny, {
93
+ type: "scatter";
94
+ x: number[];
95
+ y: number[];
96
+ breakByPoint: number[];
97
+ breakByColor: number[];
98
+ size: number[];
99
+ }, {
100
+ type: "scatter";
101
+ x: number[];
102
+ y: number[];
103
+ breakByPoint: number[];
104
+ breakByColor: number[];
105
+ size: number[];
106
+ }>, z.ZodObject<{
107
+ type: z.ZodLiteral<"table">;
108
+ columns: z.ZodArray<z.ZodNumber, "many">;
109
+ pagination: z.ZodBoolean;
110
+ rowsPerPage: z.ZodNumber;
111
+ }, "strict", z.ZodTypeAny, {
112
+ type: "table";
113
+ columns: number[];
114
+ pagination: boolean;
115
+ rowsPerPage: number;
116
+ }, {
117
+ type: "table";
118
+ columns: number[];
119
+ pagination: boolean;
120
+ rowsPerPage: number;
121
+ }>, z.ZodObject<{
122
+ type: z.ZodLiteral<"range">;
123
+ category: z.ZodArray<z.ZodNumber, "many">;
124
+ value: z.ZodArray<z.ZodNumber, "many">;
125
+ breakBy: z.ZodArray<z.ZodNumber, "many">;
126
+ }, "strict", z.ZodTypeAny, {
127
+ type: "range";
128
+ value: number[];
129
+ category: number[];
130
+ breakBy: number[];
131
+ }, {
132
+ type: "range";
133
+ value: number[];
134
+ category: number[];
135
+ breakBy: number[];
136
+ }>, z.ZodObject<{
137
+ type: z.ZodLiteral<"indicator">;
138
+ value: z.ZodArray<z.ZodNumber, "many">;
139
+ secondary: z.ZodArray<z.ZodNumber, "many">;
140
+ min: z.ZodArray<z.ZodNumber, "many">;
141
+ max: z.ZodArray<z.ZodNumber, "many">;
142
+ }, "strict", z.ZodTypeAny, {
143
+ type: "indicator";
144
+ value: number[];
145
+ secondary: number[];
146
+ min: number[];
147
+ max: number[];
148
+ }, {
149
+ type: "indicator";
150
+ value: number[];
151
+ secondary: number[];
152
+ min: number[];
153
+ max: number[];
154
+ }>, z.ZodObject<{
155
+ type: z.ZodLiteral<"boxplot">;
156
+ category: z.ZodArray<z.ZodNumber, "many">;
157
+ value: z.ZodArray<z.ZodNumber, "many">;
158
+ boxType: z.ZodEnum<["iqr", "extremums", "standardDeviation"]>;
159
+ outliersEnabled: z.ZodBoolean;
160
+ }, "strict", z.ZodTypeAny, {
161
+ type: "boxplot";
162
+ value: number[];
163
+ category: number[];
164
+ boxType: "iqr" | "extremums" | "standardDeviation";
165
+ outliersEnabled: boolean;
166
+ }, {
167
+ type: "boxplot";
168
+ value: number[];
169
+ category: number[];
170
+ boxType: "iqr" | "extremums" | "standardDeviation";
171
+ outliersEnabled: boolean;
172
+ }>, z.ZodObject<{
173
+ type: z.ZodLiteral<"areamap">;
174
+ geo: z.ZodArray<z.ZodNumber, "many">;
175
+ color: z.ZodArray<z.ZodNumber, "many">;
176
+ }, "strict", z.ZodTypeAny, {
177
+ type: "areamap";
178
+ geo: number[];
179
+ color: number[];
180
+ }, {
181
+ type: "areamap";
182
+ geo: number[];
183
+ color: number[];
184
+ }>, z.ZodObject<{
185
+ type: z.ZodLiteral<"scattermap">;
186
+ geo: z.ZodArray<z.ZodNumber, "many">;
187
+ size: z.ZodArray<z.ZodNumber, "many">;
188
+ colorBy: z.ZodArray<z.ZodNumber, "many">;
189
+ details: z.ZodArray<z.ZodNumber, "many">;
190
+ locationLevel: z.ZodEnum<["auto", "country", "state", "city"]>;
191
+ }, "strict", z.ZodTypeAny, {
192
+ type: "scattermap";
193
+ size: number[];
194
+ geo: number[];
195
+ colorBy: number[];
196
+ details: number[];
197
+ locationLevel: "auto" | "country" | "state" | "city";
198
+ }, {
199
+ type: "scattermap";
200
+ size: number[];
201
+ geo: number[];
202
+ colorBy: number[];
203
+ details: number[];
204
+ locationLevel: "auto" | "country" | "state" | "city";
205
+ }>]>;
206
+ export declare const nullableChartType: z.ZodNullable<z.ZodEnum<["bar", "column", "area", "line", "polar", "pie", "funnel", "treemap", "sunburst", "scatter", "table", "indicator", "boxplot", "areamap", "scattermap", "arearange"]>>;
207
+ export declare const chartIdSchema: z.ZodDefault<z.ZodString>;
208
+ export declare const chartRecommendationsSchema: z.ZodObject<{
209
+ chartType: z.ZodEnum<["bar", "column", "area", "line", "polar", "pie", "funnel", "treemap", "sunburst", "scatter", "table", "indicator", "boxplot", "areamap", "scattermap", "arearange"]>;
210
+ axesMapping: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
211
+ type: z.ZodEnum<["bar", "column", "area", "line", "polar"]>;
212
+ category: z.ZodArray<z.ZodNumber, "many">;
213
+ value: z.ZodArray<z.ZodNumber, "many">;
214
+ breakBy: z.ZodArray<z.ZodNumber, "many">;
215
+ }, "strict", z.ZodTypeAny, {
216
+ type: "line" | "area" | "bar" | "column" | "polar";
217
+ value: number[];
218
+ category: number[];
219
+ breakBy: number[];
220
+ }, {
221
+ type: "line" | "area" | "bar" | "column" | "polar";
222
+ value: number[];
223
+ category: number[];
224
+ breakBy: number[];
225
+ }>, z.ZodObject<{
226
+ type: z.ZodEnum<["pie", "funnel", "treemap", "sunburst"]>;
227
+ category: z.ZodArray<z.ZodNumber, "many">;
228
+ value: z.ZodArray<z.ZodNumber, "many">;
229
+ }, "strict", z.ZodTypeAny, {
230
+ type: "pie" | "funnel" | "treemap" | "sunburst";
231
+ value: number[];
232
+ category: number[];
233
+ }, {
234
+ type: "pie" | "funnel" | "treemap" | "sunburst";
235
+ value: number[];
236
+ category: number[];
237
+ }>, z.ZodObject<{
238
+ type: z.ZodLiteral<"scatter">;
239
+ x: z.ZodArray<z.ZodNumber, "many">;
240
+ y: z.ZodArray<z.ZodNumber, "many">;
241
+ breakByPoint: z.ZodArray<z.ZodNumber, "many">;
242
+ breakByColor: z.ZodArray<z.ZodNumber, "many">;
243
+ size: z.ZodArray<z.ZodNumber, "many">;
244
+ }, "strict", z.ZodTypeAny, {
245
+ type: "scatter";
246
+ x: number[];
247
+ y: number[];
248
+ breakByPoint: number[];
249
+ breakByColor: number[];
250
+ size: number[];
251
+ }, {
252
+ type: "scatter";
253
+ x: number[];
254
+ y: number[];
255
+ breakByPoint: number[];
256
+ breakByColor: number[];
257
+ size: number[];
258
+ }>, z.ZodObject<{
259
+ type: z.ZodLiteral<"table">;
260
+ columns: z.ZodArray<z.ZodNumber, "many">;
261
+ pagination: z.ZodBoolean;
262
+ rowsPerPage: z.ZodNumber;
263
+ }, "strict", z.ZodTypeAny, {
264
+ type: "table";
265
+ columns: number[];
266
+ pagination: boolean;
267
+ rowsPerPage: number;
268
+ }, {
269
+ type: "table";
270
+ columns: number[];
271
+ pagination: boolean;
272
+ rowsPerPage: number;
273
+ }>, z.ZodObject<{
274
+ type: z.ZodLiteral<"range">;
275
+ category: z.ZodArray<z.ZodNumber, "many">;
276
+ value: z.ZodArray<z.ZodNumber, "many">;
277
+ breakBy: z.ZodArray<z.ZodNumber, "many">;
278
+ }, "strict", z.ZodTypeAny, {
279
+ type: "range";
280
+ value: number[];
281
+ category: number[];
282
+ breakBy: number[];
283
+ }, {
284
+ type: "range";
285
+ value: number[];
286
+ category: number[];
287
+ breakBy: number[];
288
+ }>, z.ZodObject<{
289
+ type: z.ZodLiteral<"indicator">;
290
+ value: z.ZodArray<z.ZodNumber, "many">;
291
+ secondary: z.ZodArray<z.ZodNumber, "many">;
292
+ min: z.ZodArray<z.ZodNumber, "many">;
293
+ max: z.ZodArray<z.ZodNumber, "many">;
294
+ }, "strict", z.ZodTypeAny, {
295
+ type: "indicator";
296
+ value: number[];
297
+ secondary: number[];
298
+ min: number[];
299
+ max: number[];
300
+ }, {
301
+ type: "indicator";
302
+ value: number[];
303
+ secondary: number[];
304
+ min: number[];
305
+ max: number[];
306
+ }>, z.ZodObject<{
307
+ type: z.ZodLiteral<"boxplot">;
308
+ category: z.ZodArray<z.ZodNumber, "many">;
309
+ value: z.ZodArray<z.ZodNumber, "many">;
310
+ boxType: z.ZodEnum<["iqr", "extremums", "standardDeviation"]>;
311
+ outliersEnabled: z.ZodBoolean;
312
+ }, "strict", z.ZodTypeAny, {
313
+ type: "boxplot";
314
+ value: number[];
315
+ category: number[];
316
+ boxType: "iqr" | "extremums" | "standardDeviation";
317
+ outliersEnabled: boolean;
318
+ }, {
319
+ type: "boxplot";
320
+ value: number[];
321
+ category: number[];
322
+ boxType: "iqr" | "extremums" | "standardDeviation";
323
+ outliersEnabled: boolean;
324
+ }>, z.ZodObject<{
325
+ type: z.ZodLiteral<"areamap">;
326
+ geo: z.ZodArray<z.ZodNumber, "many">;
327
+ color: z.ZodArray<z.ZodNumber, "many">;
328
+ }, "strict", z.ZodTypeAny, {
329
+ type: "areamap";
330
+ geo: number[];
331
+ color: number[];
332
+ }, {
333
+ type: "areamap";
334
+ geo: number[];
335
+ color: number[];
336
+ }>, z.ZodObject<{
337
+ type: z.ZodLiteral<"scattermap">;
338
+ geo: z.ZodArray<z.ZodNumber, "many">;
339
+ size: z.ZodArray<z.ZodNumber, "many">;
340
+ colorBy: z.ZodArray<z.ZodNumber, "many">;
341
+ details: z.ZodArray<z.ZodNumber, "many">;
342
+ locationLevel: z.ZodEnum<["auto", "country", "state", "city"]>;
343
+ }, "strict", z.ZodTypeAny, {
344
+ type: "scattermap";
345
+ size: number[];
346
+ geo: number[];
347
+ colorBy: number[];
348
+ details: number[];
349
+ locationLevel: "auto" | "country" | "state" | "city";
350
+ }, {
351
+ type: "scattermap";
352
+ size: number[];
353
+ geo: number[];
354
+ colorBy: number[];
355
+ details: number[];
356
+ locationLevel: "auto" | "country" | "state" | "city";
357
+ }>]>;
358
+ }, "strip", z.ZodTypeAny, {
359
+ chartType: "line" | "area" | "bar" | "column" | "polar" | "pie" | "funnel" | "treemap" | "sunburst" | "scatter" | "indicator" | "areamap" | "boxplot" | "scattermap" | "arearange" | "table";
360
+ axesMapping: {
361
+ type: "line" | "area" | "bar" | "column" | "polar";
362
+ value: number[];
363
+ category: number[];
364
+ breakBy: number[];
365
+ } | {
366
+ type: "pie" | "funnel" | "treemap" | "sunburst";
367
+ value: number[];
368
+ category: number[];
369
+ } | {
370
+ type: "scatter";
371
+ x: number[];
372
+ y: number[];
373
+ breakByPoint: number[];
374
+ breakByColor: number[];
375
+ size: number[];
376
+ } | {
377
+ type: "table";
378
+ columns: number[];
379
+ pagination: boolean;
380
+ rowsPerPage: number;
381
+ } | {
382
+ type: "range";
383
+ value: number[];
384
+ category: number[];
385
+ breakBy: number[];
386
+ } | {
387
+ type: "indicator";
388
+ value: number[];
389
+ secondary: number[];
390
+ min: number[];
391
+ max: number[];
392
+ } | {
393
+ type: "boxplot";
394
+ value: number[];
395
+ category: number[];
396
+ boxType: "iqr" | "extremums" | "standardDeviation";
397
+ outliersEnabled: boolean;
398
+ } | {
399
+ type: "areamap";
400
+ geo: number[];
401
+ color: number[];
402
+ } | {
403
+ type: "scattermap";
404
+ size: number[];
405
+ geo: number[];
406
+ colorBy: number[];
407
+ details: number[];
408
+ locationLevel: "auto" | "country" | "state" | "city";
409
+ };
410
+ }, {
411
+ chartType: "line" | "area" | "bar" | "column" | "polar" | "pie" | "funnel" | "treemap" | "sunburst" | "scatter" | "indicator" | "areamap" | "boxplot" | "scattermap" | "arearange" | "table";
412
+ axesMapping: {
413
+ type: "line" | "area" | "bar" | "column" | "polar";
414
+ value: number[];
415
+ category: number[];
416
+ breakBy: number[];
417
+ } | {
418
+ type: "pie" | "funnel" | "treemap" | "sunburst";
419
+ value: number[];
420
+ category: number[];
421
+ } | {
422
+ type: "scatter";
423
+ x: number[];
424
+ y: number[];
425
+ breakByPoint: number[];
426
+ breakByColor: number[];
427
+ size: number[];
428
+ } | {
429
+ type: "table";
430
+ columns: number[];
431
+ pagination: boolean;
432
+ rowsPerPage: number;
433
+ } | {
434
+ type: "range";
435
+ value: number[];
436
+ category: number[];
437
+ breakBy: number[];
438
+ } | {
439
+ type: "indicator";
440
+ value: number[];
441
+ secondary: number[];
442
+ min: number[];
443
+ max: number[];
444
+ } | {
445
+ type: "boxplot";
446
+ value: number[];
447
+ category: number[];
448
+ boxType: "iqr" | "extremums" | "standardDeviation";
449
+ outliersEnabled: boolean;
450
+ } | {
451
+ type: "areamap";
452
+ geo: number[];
453
+ color: number[];
454
+ } | {
455
+ type: "scattermap";
456
+ size: number[];
457
+ geo: number[];
458
+ colorBy: number[];
459
+ details: number[];
460
+ locationLevel: "auto" | "country" | "state" | "city";
461
+ };
462
+ }>;
463
+ export declare const buildChartSchema: z.ZodObject<{
464
+ dataSourceTitle: z.ZodString;
465
+ userPrompt: z.ZodString;
466
+ }, "strip", z.ZodTypeAny, {
467
+ dataSourceTitle: string;
468
+ userPrompt: string;
469
+ }, {
470
+ dataSourceTitle: string;
471
+ userPrompt: string;
472
+ }>;
473
+ export declare const createChartSchema: z.ZodObject<{
474
+ userPrompt: z.ZodString;
475
+ } & {
476
+ chartType: z.ZodNullable<z.ZodEnum<["bar", "column", "area", "line", "polar", "pie", "funnel", "treemap", "sunburst", "scatter", "table", "indicator", "boxplot", "areamap", "scattermap", "arearange"]>>;
477
+ chartTitle: z.ZodString;
478
+ }, "strip", z.ZodTypeAny, {
479
+ chartType: "line" | "area" | "bar" | "column" | "polar" | "pie" | "funnel" | "treemap" | "sunburst" | "scatter" | "indicator" | "areamap" | "boxplot" | "scattermap" | "arearange" | "table" | null;
480
+ userPrompt: string;
481
+ chartTitle: string;
482
+ }, {
483
+ chartType: "line" | "area" | "bar" | "column" | "polar" | "pie" | "funnel" | "treemap" | "sunburst" | "scatter" | "indicator" | "areamap" | "boxplot" | "scattermap" | "arearange" | "table" | null;
484
+ userPrompt: string;
485
+ chartTitle: string;
486
+ }>;
487
+ export declare const updateChartSchema: z.ZodObject<{
488
+ userPrompt: z.ZodString;
489
+ } & {
490
+ chartId: z.ZodDefault<z.ZodString>;
491
+ }, "strip", z.ZodTypeAny, {
492
+ userPrompt: string;
493
+ chartId: string;
494
+ }, {
495
+ userPrompt: string;
496
+ chartId?: string | undefined;
497
+ }>;
498
+ export declare const updateChartTitleSchema: z.ZodObject<{
499
+ userPrompt: z.ZodString;
500
+ } & {
501
+ chartId: z.ZodDefault<z.ZodString>;
502
+ } & {
503
+ chartTitle: z.ZodString;
504
+ }, "strip", z.ZodTypeAny, {
505
+ userPrompt: string;
506
+ chartTitle: string;
507
+ chartId: string;
508
+ }, {
509
+ userPrompt: string;
510
+ chartTitle: string;
511
+ chartId?: string | undefined;
512
+ }>;
513
+ export declare const updateChartTypeSchema: z.ZodObject<{
514
+ userPrompt: z.ZodString;
515
+ } & {
516
+ chartId: z.ZodDefault<z.ZodString>;
517
+ } & {
518
+ chartType: z.ZodEnum<["bar", "column", "area", "line", "polar", "pie", "funnel", "treemap", "sunburst", "scatter", "table", "indicator", "boxplot", "areamap", "scattermap", "arearange"]>;
519
+ }, "strip", z.ZodTypeAny, {
520
+ chartType: "line" | "area" | "bar" | "column" | "polar" | "pie" | "funnel" | "treemap" | "sunburst" | "scatter" | "indicator" | "areamap" | "boxplot" | "scattermap" | "arearange" | "table";
521
+ userPrompt: string;
522
+ chartId: string;
523
+ }, {
524
+ chartType: "line" | "area" | "bar" | "column" | "polar" | "pie" | "funnel" | "treemap" | "sunburst" | "scatter" | "indicator" | "areamap" | "boxplot" | "scattermap" | "arearange" | "table";
525
+ userPrompt: string;
526
+ chartId?: string | undefined;
527
+ }>;
528
+ export declare const updateChartTypeOfMeasuresSchema: z.ZodObject<{
529
+ userPrompt: z.ZodString;
530
+ } & {
531
+ chartId: z.ZodDefault<z.ZodString>;
532
+ }, "strip", z.ZodTypeAny, {
533
+ userPrompt: string;
534
+ chartId: string;
535
+ }, {
536
+ userPrompt: string;
537
+ chartId?: string | undefined;
538
+ }>;
539
+ export declare const updateChartSortingSchema: z.ZodObject<{
540
+ userPrompt: z.ZodString;
541
+ } & {
542
+ chartId: z.ZodDefault<z.ZodString>;
543
+ }, "strip", z.ZodTypeAny, {
544
+ userPrompt: string;
545
+ chartId: string;
546
+ }, {
547
+ userPrompt: string;
548
+ chartId?: string | undefined;
549
+ }>;
550
+ export declare const updateTrendAndForecastSchema: z.ZodObject<{
551
+ userPrompt: z.ZodString;
552
+ } & {
553
+ chartId: z.ZodDefault<z.ZodString>;
554
+ }, "strip", z.ZodTypeAny, {
555
+ userPrompt: string;
556
+ chartId: string;
557
+ }, {
558
+ userPrompt: string;
559
+ chartId?: string | undefined;
560
+ }>;
561
+ export declare const updateOtherChartDataOptionsSchema: z.ZodObject<{
562
+ userPrompt: z.ZodString;
563
+ } & {
564
+ chartId: z.ZodDefault<z.ZodString>;
565
+ }, "strip", z.ZodTypeAny, {
566
+ userPrompt: string;
567
+ chartId: string;
568
+ }, {
569
+ userPrompt: string;
570
+ chartId?: string | undefined;
571
+ }>;
572
+ export declare const updateChartStyleOptionsSchema: z.ZodObject<{
573
+ userPrompt: z.ZodString;
574
+ } & {
575
+ chartId: z.ZodDefault<z.ZodString>;
576
+ }, "strip", z.ZodTypeAny, {
577
+ userPrompt: string;
578
+ chartId: string;
579
+ }, {
580
+ userPrompt: string;
581
+ chartId?: string | undefined;
582
+ }>;
583
+ /**
584
+ * Build chart context interface
585
+ */
586
+ export interface BuildChartContext {
587
+ /**
588
+ * Tool call ID
589
+ */
590
+ toolCallId: string;
591
+ /**
592
+ * Data source title (optional)
593
+ */
594
+ dataSourceTitle?: string;
595
+ /** Chart summaries to be used as context */
596
+ chartSummaries?: ChartSummary[];
597
+ /**
598
+ * Retrieve a chart by its ID
599
+ * @param chartId - The ID of the chart to retrieve
600
+ * @returns The chart widget props
601
+ */
602
+ retrieveChart?: (chartId: string) => ExtendedChartWidgetProps | null;
603
+ /**
604
+ * Save a chart widget props
605
+ * @param chartId - The ID of the chart to save
606
+ * @param chartWidgetProps - The chart widget props to save
607
+ */
608
+ saveChart?: (chartId: string, chartWidgetProps: ExtendedChartWidgetProps) => void;
609
+ /** Whether NLQ V3 is enabled */
610
+ isNlqV3Enabled?: boolean;
611
+ }
612
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/engines/chart-builder/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAC3E,OAAO,EACN,SAAS,EACT,gBAAgB,EAChB,YAAY,EACZ,mBAAmB,EACnB,qBAAqB,EACrB,MAAM,iBAAiB,CAA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