@magemetrics/ai 0.0.58 → 0.1.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.
@@ -0,0 +1,1423 @@
1
+ import { AuthState } from '@magemetrics/core';
2
+ import { CreateFlowParam } from '@magemetrics/core';
3
+ import { default as default_2 } from 'react';
4
+ import { FetchNextPageOptions } from '@tanstack/react-query';
5
+ import { ForwardRefExoticComponent } from 'react';
6
+ import { GenerateInsightParam } from '@magemetrics/core';
7
+ import { InfiniteData } from '@tanstack/react-query';
8
+ import { InfiniteQueryObserverResult } from '@tanstack/react-query';
9
+ import { MageMetricsClient } from '@magemetrics/core';
10
+ import { MageMetricsClientConfig } from '@magemetrics/core';
11
+ import { PropsWithChildren } from 'react';
12
+ import { RefAttributes } from 'react';
13
+ import { SortingState } from '@tanstack/react-table';
14
+ import { UseMutateAsyncFunction } from '@tanstack/react-query';
15
+ import { UseMutateFunction } from '@tanstack/react-query';
16
+ import { UseMutationOptions } from '@tanstack/react-query';
17
+ import { UseQueryResult } from '@tanstack/react-query';
18
+ import { z } from 'zod';
19
+
20
+ export { AuthState }
21
+
22
+ export declare type CellContentProps = {
23
+ formattedValue: FormattedData | undefined;
24
+ unit?: string;
25
+ renderType?: string;
26
+ };
27
+
28
+ export declare const Chat: React.FC<ConversationContentProps>;
29
+
30
+ export declare const ChatLayoutProvider: default_2.FC<{
31
+ children: default_2.ReactNode;
32
+ }>;
33
+
34
+ export declare interface Components {
35
+ dataTableCells?: {
36
+ empty?: (props: CellContentProps) => default_2.ReactNode;
37
+ units?: {
38
+ [key: string]: (props: CellContentProps) => default_2.ReactNode;
39
+ };
40
+ renderTypes?: {
41
+ [key: string]: (props: CellContentProps) => default_2.ReactNode;
42
+ };
43
+ };
44
+ dataReportTable?: (props: DataReportMessageProps) => default_2.ReactNode;
45
+ messageActions?: (props: {
46
+ type: "data-report";
47
+ report: FrontendReport;
48
+ } | {
49
+ type: "visualization";
50
+ visualization: FrontendVisualization | V1FrontendVisualization;
51
+ }) => default_2.ReactNode;
52
+ avatar?: default_2.ReactNode;
53
+ }
54
+
55
+ declare type ControlledModalProps = {
56
+ visible: boolean;
57
+ onClose: () => void;
58
+ };
59
+
60
+ export declare const ConversationContent: React.FC<ConversationContentProps>;
61
+
62
+ declare interface ConversationContentProps {
63
+ flowId?: string;
64
+ className?: string;
65
+ style?: React.CSSProperties;
66
+ topBar?: React.ReactNode;
67
+ }
68
+
69
+ export { CreateFlowParam }
70
+
71
+ export declare const Dashboard: React.FC<React.ComponentProps<typeof Dashboard_2>>;
72
+
73
+ declare const Dashboard_2: React.FC<{
74
+ dashboardId: string;
75
+ }>;
76
+
77
+ export declare const DataReport: React.FC<{
78
+ reportId: number;
79
+ }>;
80
+
81
+ export declare interface DataReportMessageProps {
82
+ report: FrontendReport;
83
+ explainability: FrontendReportExplainability | null | undefined;
84
+ infiniteData: {
85
+ data?: {
86
+ pages: Record<string, unknown>[][];
87
+ };
88
+ isPending: boolean;
89
+ fetchNextPage: () => Promise<unknown>;
90
+ isFetching: boolean;
91
+ isFetchingNextPage: boolean;
92
+ hasNextPage: boolean | undefined;
93
+ };
94
+ columns: FrontendReportColumns;
95
+ totalRows: number;
96
+ }
97
+
98
+ export declare const DataTable: React.FC<DataReportMessageProps>;
99
+
100
+ declare type DisplayControlProps = {
101
+ showRecommendations?: boolean;
102
+ showRecentChats?: boolean;
103
+ showBackdrop?: boolean;
104
+ };
105
+
106
+ export declare const DomWrapper: React.FC<PropsWithChildren<DomWrapperProps>>;
107
+
108
+ declare type DomWrapperProps = {
109
+ display?: string;
110
+ };
111
+
112
+ declare type ExportReportDataParams = {
113
+ reportId: number;
114
+ filename?: string;
115
+ format?: "text" | "blob";
116
+ };
117
+
118
+ declare type ExportReportDataResult = {
119
+ filename: string;
120
+ data: Blob | string;
121
+ };
122
+
123
+ declare type ExtractInsightResponse = z.infer<typeof ExtractInsightResponseSchema>;
124
+
125
+ declare const ExtractInsightResponseSchema: z.ZodUnion<[z.ZodObject<{
126
+ type: z.ZodLiteral<"text">;
127
+ insight: z.ZodString;
128
+ }, "strip", z.ZodTypeAny, {
129
+ type: "text";
130
+ insight: string;
131
+ }, {
132
+ type: "text";
133
+ insight: string;
134
+ }>, z.ZodObject<{
135
+ type: z.ZodLiteral<"missing">;
136
+ }, "strip", z.ZodTypeAny, {
137
+ type: "missing";
138
+ }, {
139
+ type: "missing";
140
+ }>]>;
141
+
142
+ /**
143
+ * This module handles the formatting and normalization of table cell values for display and sorting.
144
+ *
145
+ * Problem:
146
+ * When displaying data in tables, we often receive values in various formats (strings, dates,
147
+ * JSON objects, etc.). We need to:
148
+ * 1. Display these values in a consistent, human-readable format
149
+ * 2. Enable proper sorting of these values regardless of their original format
150
+ *
151
+ * Solution:
152
+ * The FormattedData type and formatCellValue function transform any input value into a
153
+ * standardized format with two properties:
154
+ * - display: A string representation suitable for rendering
155
+ * - sortValue: A normalized value (string/number/date) suitable for consistent sorting
156
+ *
157
+ * The module handles various special cases:
158
+ * - JSON strings (parsing them to extract actual values)
159
+ * - Date/time values (converting to consistent format)
160
+ * - BigQuery-style objects with 'value' property
161
+ * - Nested objects (pretty-printing them)
162
+ * - Null/undefined values
163
+ */
164
+ declare type FormattedData = {
165
+ display: (string & {}) | "empty" | null;
166
+ sortValue: string | number | Date | null;
167
+ };
168
+
169
+ declare type FrontendReport = z.infer<typeof FrontendReportSchema>;
170
+
171
+ declare type FrontendReportColumns = z.infer<typeof FrontendReportColumnsSchema>;
172
+
173
+ declare const FrontendReportColumnsSchema: z.ZodArray<z.ZodObject<{
174
+ name: z.ZodString;
175
+ data_type: z.ZodString;
176
+ } & {
177
+ dataType: z.ZodString;
178
+ renderType: z.ZodOptional<z.ZodString>;
179
+ unit: z.ZodOptional<z.ZodString>;
180
+ }, "strip", z.ZodTypeAny, {
181
+ name: string;
182
+ data_type: string;
183
+ dataType: string;
184
+ unit?: string | undefined;
185
+ renderType?: string | undefined;
186
+ }, {
187
+ name: string;
188
+ data_type: string;
189
+ dataType: string;
190
+ unit?: string | undefined;
191
+ renderType?: string | undefined;
192
+ }>, "many">;
193
+
194
+ declare type FrontendReportExplainability = z.infer<typeof FrontendReportExplainabilitySchema>;
195
+
196
+ declare const FrontendReportExplainabilitySchema: z.ZodObject<Omit<{
197
+ sql_explanation: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
198
+ chunk_title: z.ZodString;
199
+ chunk_explanation: z.ZodString;
200
+ lines: z.ZodArray<z.ZodObject<{
201
+ sql: z.ZodString;
202
+ explanation: z.ZodString;
203
+ }, "strip", z.ZodTypeAny, {
204
+ explanation: string;
205
+ sql: string;
206
+ }, {
207
+ explanation: string;
208
+ sql: string;
209
+ }>, "many">;
210
+ }, "strip", z.ZodTypeAny, {
211
+ chunk_title: string;
212
+ chunk_explanation: string;
213
+ lines: {
214
+ explanation: string;
215
+ sql: string;
216
+ }[];
217
+ }, {
218
+ chunk_title: string;
219
+ chunk_explanation: string;
220
+ lines: {
221
+ explanation: string;
222
+ sql: string;
223
+ }[];
224
+ }>, "many">>>;
225
+ business_explanation: z.ZodOptional<z.ZodNullable<z.ZodObject<{
226
+ summary: z.ZodString;
227
+ implementation: z.ZodArray<z.ZodString, "many">;
228
+ assumptions: z.ZodArray<z.ZodObject<{
229
+ type: z.ZodEnum<["grain", "completeness", "transformation", "relationship", "other"]>;
230
+ details: z.ZodString;
231
+ explanation: z.ZodString;
232
+ }, "strip", z.ZodTypeAny, {
233
+ explanation: string;
234
+ type: "grain" | "completeness" | "transformation" | "relationship" | "other";
235
+ details: string;
236
+ }, {
237
+ explanation: string;
238
+ type: "grain" | "completeness" | "transformation" | "relationship" | "other";
239
+ details: string;
240
+ }>, "many">;
241
+ }, "strip", z.ZodTypeAny, {
242
+ implementation: string[];
243
+ summary: string;
244
+ assumptions: {
245
+ explanation: string;
246
+ type: "grain" | "completeness" | "transformation" | "relationship" | "other";
247
+ details: string;
248
+ }[];
249
+ }, {
250
+ implementation: string[];
251
+ summary: string;
252
+ assumptions: {
253
+ explanation: string;
254
+ type: "grain" | "completeness" | "transformation" | "relationship" | "other";
255
+ details: string;
256
+ }[];
257
+ }>>>;
258
+ columns_lineage: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{
259
+ nodes: z.ZodArray<z.ZodObject<{
260
+ id: z.ZodString;
261
+ type: z.ZodEnum<["entity", "attribute", "filter", "process", "combine", "result"]>;
262
+ explanation: z.ZodString;
263
+ }, "strip", z.ZodTypeAny, {
264
+ explanation: string;
265
+ type: "filter" | "result" | "entity" | "attribute" | "process" | "combine";
266
+ id: string;
267
+ }, {
268
+ explanation: string;
269
+ type: "filter" | "result" | "entity" | "attribute" | "process" | "combine";
270
+ id: string;
271
+ }>, "many">;
272
+ edges: z.ZodArray<z.ZodObject<{
273
+ source: z.ZodString;
274
+ target: z.ZodString;
275
+ }, "strip", z.ZodTypeAny, {
276
+ source: string;
277
+ target: string;
278
+ }, {
279
+ source: string;
280
+ target: string;
281
+ }>, "many">;
282
+ }, "strip", z.ZodTypeAny, {
283
+ nodes: {
284
+ explanation: string;
285
+ type: "filter" | "result" | "entity" | "attribute" | "process" | "combine";
286
+ id: string;
287
+ }[];
288
+ edges: {
289
+ source: string;
290
+ target: string;
291
+ }[];
292
+ }, {
293
+ nodes: {
294
+ explanation: string;
295
+ type: "filter" | "result" | "entity" | "attribute" | "process" | "combine";
296
+ id: string;
297
+ }[];
298
+ edges: {
299
+ source: string;
300
+ target: string;
301
+ }[];
302
+ }>>>>;
303
+ confidence_score: z.ZodNumber;
304
+ confidence_score_reason: z.ZodString;
305
+ assumptions_score: z.ZodOptional<z.ZodNumber>;
306
+ assumptions_score_reason: z.ZodOptional<z.ZodString>;
307
+ friendliness_score: z.ZodOptional<z.ZodNumber>;
308
+ friendliness_score_reason: z.ZodOptional<z.ZodString>;
309
+ id: z.ZodNumber;
310
+ flow_data_id: z.ZodNumber;
311
+ created_at: z.ZodString;
312
+ }, "id" | "created_at">, "strip", z.ZodTypeAny, {
313
+ flow_data_id: number;
314
+ confidence_score: number;
315
+ confidence_score_reason: string;
316
+ sql_explanation?: {
317
+ chunk_title: string;
318
+ chunk_explanation: string;
319
+ lines: {
320
+ explanation: string;
321
+ sql: string;
322
+ }[];
323
+ }[] | null | undefined;
324
+ business_explanation?: {
325
+ implementation: string[];
326
+ summary: string;
327
+ assumptions: {
328
+ explanation: string;
329
+ type: "grain" | "completeness" | "transformation" | "relationship" | "other";
330
+ details: string;
331
+ }[];
332
+ } | null | undefined;
333
+ columns_lineage?: Record<string, {
334
+ nodes: {
335
+ explanation: string;
336
+ type: "filter" | "result" | "entity" | "attribute" | "process" | "combine";
337
+ id: string;
338
+ }[];
339
+ edges: {
340
+ source: string;
341
+ target: string;
342
+ }[];
343
+ }> | null | undefined;
344
+ assumptions_score?: number | undefined;
345
+ assumptions_score_reason?: string | undefined;
346
+ friendliness_score?: number | undefined;
347
+ friendliness_score_reason?: string | undefined;
348
+ }, {
349
+ flow_data_id: number;
350
+ confidence_score: number;
351
+ confidence_score_reason: string;
352
+ sql_explanation?: {
353
+ chunk_title: string;
354
+ chunk_explanation: string;
355
+ lines: {
356
+ explanation: string;
357
+ sql: string;
358
+ }[];
359
+ }[] | null | undefined;
360
+ business_explanation?: {
361
+ implementation: string[];
362
+ summary: string;
363
+ assumptions: {
364
+ explanation: string;
365
+ type: "grain" | "completeness" | "transformation" | "relationship" | "other";
366
+ details: string;
367
+ }[];
368
+ } | null | undefined;
369
+ columns_lineage?: Record<string, {
370
+ nodes: {
371
+ explanation: string;
372
+ type: "filter" | "result" | "entity" | "attribute" | "process" | "combine";
373
+ id: string;
374
+ }[];
375
+ edges: {
376
+ source: string;
377
+ target: string;
378
+ }[];
379
+ }> | null | undefined;
380
+ assumptions_score?: number | undefined;
381
+ assumptions_score_reason?: string | undefined;
382
+ friendliness_score?: number | undefined;
383
+ friendliness_score_reason?: string | undefined;
384
+ }>;
385
+
386
+ declare const FrontendReportSchema: z.ZodObject<Omit<{
387
+ created_at: z.ZodString;
388
+ flow_id: z.ZodString;
389
+ id: z.ZodNumber;
390
+ is_sample: z.ZodBoolean;
391
+ schema: z.ZodString;
392
+ sql: z.ZodString;
393
+ table: z.ZodString;
394
+ title: z.ZodString;
395
+ request: z.ZodNullable<z.ZodString>;
396
+ data_sample: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">;
397
+ data_summary: z.ZodObject<{
398
+ columns: z.ZodRecord<z.ZodString, z.ZodObject<{
399
+ position: z.ZodOptional<z.ZodNumber>;
400
+ data_type: z.ZodString;
401
+ null_count: z.ZodNullable<z.ZodNumber>;
402
+ unique_count: z.ZodNullable<z.ZodNumber>;
403
+ unique_percentage: z.ZodNullable<z.ZodNumber>;
404
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
405
+ position: z.ZodOptional<z.ZodNumber>;
406
+ data_type: z.ZodString;
407
+ null_count: z.ZodNullable<z.ZodNumber>;
408
+ unique_count: z.ZodNullable<z.ZodNumber>;
409
+ unique_percentage: z.ZodNullable<z.ZodNumber>;
410
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
411
+ position: z.ZodOptional<z.ZodNumber>;
412
+ data_type: z.ZodString;
413
+ null_count: z.ZodNullable<z.ZodNumber>;
414
+ unique_count: z.ZodNullable<z.ZodNumber>;
415
+ unique_percentage: z.ZodNullable<z.ZodNumber>;
416
+ }, z.ZodTypeAny, "passthrough">>>;
417
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
418
+ columns: z.ZodRecord<z.ZodString, z.ZodObject<{
419
+ position: z.ZodOptional<z.ZodNumber>;
420
+ data_type: z.ZodString;
421
+ null_count: z.ZodNullable<z.ZodNumber>;
422
+ unique_count: z.ZodNullable<z.ZodNumber>;
423
+ unique_percentage: z.ZodNullable<z.ZodNumber>;
424
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
425
+ position: z.ZodOptional<z.ZodNumber>;
426
+ data_type: z.ZodString;
427
+ null_count: z.ZodNullable<z.ZodNumber>;
428
+ unique_count: z.ZodNullable<z.ZodNumber>;
429
+ unique_percentage: z.ZodNullable<z.ZodNumber>;
430
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
431
+ position: z.ZodOptional<z.ZodNumber>;
432
+ data_type: z.ZodString;
433
+ null_count: z.ZodNullable<z.ZodNumber>;
434
+ unique_count: z.ZodNullable<z.ZodNumber>;
435
+ unique_percentage: z.ZodNullable<z.ZodNumber>;
436
+ }, z.ZodTypeAny, "passthrough">>>;
437
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
438
+ columns: z.ZodRecord<z.ZodString, z.ZodObject<{
439
+ position: z.ZodOptional<z.ZodNumber>;
440
+ data_type: z.ZodString;
441
+ null_count: z.ZodNullable<z.ZodNumber>;
442
+ unique_count: z.ZodNullable<z.ZodNumber>;
443
+ unique_percentage: z.ZodNullable<z.ZodNumber>;
444
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
445
+ position: z.ZodOptional<z.ZodNumber>;
446
+ data_type: z.ZodString;
447
+ null_count: z.ZodNullable<z.ZodNumber>;
448
+ unique_count: z.ZodNullable<z.ZodNumber>;
449
+ unique_percentage: z.ZodNullable<z.ZodNumber>;
450
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
451
+ position: z.ZodOptional<z.ZodNumber>;
452
+ data_type: z.ZodString;
453
+ null_count: z.ZodNullable<z.ZodNumber>;
454
+ unique_count: z.ZodNullable<z.ZodNumber>;
455
+ unique_percentage: z.ZodNullable<z.ZodNumber>;
456
+ }, z.ZodTypeAny, "passthrough">>>;
457
+ }, z.ZodTypeAny, "passthrough">>;
458
+ bookmarked: z.ZodBoolean;
459
+ status: z.ZodNullable<z.ZodString>;
460
+ }, "schema" | "sql" | "table" | "data_sample" | "is_sample">, "strip", z.ZodTypeAny, {
461
+ title: string;
462
+ status: string | null;
463
+ id: number;
464
+ request: string | null;
465
+ created_at: string;
466
+ bookmarked: boolean;
467
+ data_summary: {
468
+ columns: Record<string, z.objectOutputType<{
469
+ position: z.ZodOptional<z.ZodNumber>;
470
+ data_type: z.ZodString;
471
+ null_count: z.ZodNullable<z.ZodNumber>;
472
+ unique_count: z.ZodNullable<z.ZodNumber>;
473
+ unique_percentage: z.ZodNullable<z.ZodNumber>;
474
+ }, z.ZodTypeAny, "passthrough">>;
475
+ } & {
476
+ [k: string]: unknown;
477
+ };
478
+ flow_id: string;
479
+ }, {
480
+ title: string;
481
+ status: string | null;
482
+ id: number;
483
+ request: string | null;
484
+ created_at: string;
485
+ bookmarked: boolean;
486
+ data_summary: {
487
+ columns: Record<string, z.objectInputType<{
488
+ position: z.ZodOptional<z.ZodNumber>;
489
+ data_type: z.ZodString;
490
+ null_count: z.ZodNullable<z.ZodNumber>;
491
+ unique_count: z.ZodNullable<z.ZodNumber>;
492
+ unique_percentage: z.ZodNullable<z.ZodNumber>;
493
+ }, z.ZodTypeAny, "passthrough">>;
494
+ } & {
495
+ [k: string]: unknown;
496
+ };
497
+ flow_id: string;
498
+ }>;
499
+
500
+ declare type FrontendVisualization = z.output<typeof FrontendVisualizationSchema>;
501
+
502
+ declare const FrontendVisualizationSchema: z.ZodObject<Omit<{
503
+ id: z.ZodNumber;
504
+ flow_data_id: z.ZodNumber;
505
+ created_at: z.ZodString;
506
+ sql: z.ZodString;
507
+ bookmarked: z.ZodBoolean;
508
+ data_sample: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">;
509
+ is_sample: z.ZodBoolean;
510
+ data_summary: z.ZodRecord<z.ZodString, z.ZodUnknown>;
511
+ } & {
512
+ configuration: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
513
+ config_version: z.ZodLiteral<2>;
514
+ xAxisLabel: z.ZodString;
515
+ yAxisLabel: z.ZodString;
516
+ categoryColumn: z.ZodString;
517
+ secondaryCategoryColumn: z.ZodOptional<z.ZodString>;
518
+ valueColumn: z.ZodString;
519
+ title: z.ZodString;
520
+ type: z.ZodLiteral<"bar">;
521
+ }, "strip", z.ZodTypeAny, {
522
+ type: "bar";
523
+ title: string;
524
+ xAxisLabel: string;
525
+ yAxisLabel: string;
526
+ config_version: 2;
527
+ categoryColumn: string;
528
+ valueColumn: string;
529
+ secondaryCategoryColumn?: string | undefined;
530
+ }, {
531
+ type: "bar";
532
+ title: string;
533
+ xAxisLabel: string;
534
+ yAxisLabel: string;
535
+ config_version: 2;
536
+ categoryColumn: string;
537
+ valueColumn: string;
538
+ secondaryCategoryColumn?: string | undefined;
539
+ }>, z.ZodObject<{
540
+ xAxisColumn: z.ZodString;
541
+ valueColumns: z.ZodArray<z.ZodString, "many">;
542
+ yAxisLabels: z.ZodArray<z.ZodString, "many">;
543
+ title: z.ZodString;
544
+ type: z.ZodLiteral<"line/area">;
545
+ config_version: z.ZodLiteral<2>;
546
+ }, "strip", z.ZodTypeAny, {
547
+ type: "line/area";
548
+ title: string;
549
+ valueColumns: string[];
550
+ config_version: 2;
551
+ xAxisColumn: string;
552
+ yAxisLabels: string[];
553
+ }, {
554
+ type: "line/area";
555
+ title: string;
556
+ valueColumns: string[];
557
+ config_version: 2;
558
+ xAxisColumn: string;
559
+ yAxisLabels: string[];
560
+ }>, z.ZodObject<{
561
+ config_version: z.ZodLiteral<2>;
562
+ valueColumn: z.ZodString;
563
+ xAxisColumn: z.ZodString;
564
+ xAxisLabel: z.ZodString;
565
+ yAxisLabel: z.ZodString;
566
+ categoryColumn: z.ZodString;
567
+ title: z.ZodString;
568
+ type: z.ZodLiteral<"line/area-categorical">;
569
+ }, "strip", z.ZodTypeAny, {
570
+ type: "line/area-categorical";
571
+ title: string;
572
+ xAxisLabel: string;
573
+ yAxisLabel: string;
574
+ config_version: 2;
575
+ categoryColumn: string;
576
+ valueColumn: string;
577
+ xAxisColumn: string;
578
+ }, {
579
+ type: "line/area-categorical";
580
+ title: string;
581
+ xAxisLabel: string;
582
+ yAxisLabel: string;
583
+ config_version: 2;
584
+ categoryColumn: string;
585
+ valueColumn: string;
586
+ xAxisColumn: string;
587
+ }>, z.ZodObject<{
588
+ config_version: z.ZodLiteral<2>;
589
+ xAxisLabel: z.ZodString;
590
+ yAxisLabel: z.ZodString;
591
+ xAxisValueColumn: z.ZodString;
592
+ yAxisValueColumn: z.ZodString;
593
+ title: z.ZodString;
594
+ type: z.ZodLiteral<"scatter">;
595
+ }, "strip", z.ZodTypeAny, {
596
+ type: "scatter";
597
+ title: string;
598
+ xAxisLabel: string;
599
+ yAxisLabel: string;
600
+ config_version: 2;
601
+ xAxisValueColumn: string;
602
+ yAxisValueColumn: string;
603
+ }, {
604
+ type: "scatter";
605
+ title: string;
606
+ xAxisLabel: string;
607
+ yAxisLabel: string;
608
+ config_version: 2;
609
+ xAxisValueColumn: string;
610
+ yAxisValueColumn: string;
611
+ }>, z.ZodObject<{
612
+ config_version: z.ZodLiteral<2>;
613
+ categoryColumn: z.ZodString;
614
+ valueColumn: z.ZodString;
615
+ title: z.ZodString;
616
+ type: z.ZodLiteral<"pie">;
617
+ }, "strip", z.ZodTypeAny, {
618
+ type: "pie";
619
+ title: string;
620
+ config_version: 2;
621
+ categoryColumn: string;
622
+ valueColumn: string;
623
+ }, {
624
+ type: "pie";
625
+ title: string;
626
+ config_version: 2;
627
+ categoryColumn: string;
628
+ valueColumn: string;
629
+ }>]>;
630
+ }, "sql" | "data_sample" | "is_sample" | "data_summary">, "strip", z.ZodTypeAny, {
631
+ id: number;
632
+ flow_data_id: number;
633
+ created_at: string;
634
+ bookmarked: boolean;
635
+ configuration: {
636
+ type: "bar";
637
+ title: string;
638
+ xAxisLabel: string;
639
+ yAxisLabel: string;
640
+ config_version: 2;
641
+ categoryColumn: string;
642
+ valueColumn: string;
643
+ secondaryCategoryColumn?: string | undefined;
644
+ } | {
645
+ type: "line/area";
646
+ title: string;
647
+ valueColumns: string[];
648
+ config_version: 2;
649
+ xAxisColumn: string;
650
+ yAxisLabels: string[];
651
+ } | {
652
+ type: "line/area-categorical";
653
+ title: string;
654
+ xAxisLabel: string;
655
+ yAxisLabel: string;
656
+ config_version: 2;
657
+ categoryColumn: string;
658
+ valueColumn: string;
659
+ xAxisColumn: string;
660
+ } | {
661
+ type: "scatter";
662
+ title: string;
663
+ xAxisLabel: string;
664
+ yAxisLabel: string;
665
+ config_version: 2;
666
+ xAxisValueColumn: string;
667
+ yAxisValueColumn: string;
668
+ } | {
669
+ type: "pie";
670
+ title: string;
671
+ config_version: 2;
672
+ categoryColumn: string;
673
+ valueColumn: string;
674
+ };
675
+ }, {
676
+ id: number;
677
+ flow_data_id: number;
678
+ created_at: string;
679
+ bookmarked: boolean;
680
+ configuration: {
681
+ type: "bar";
682
+ title: string;
683
+ xAxisLabel: string;
684
+ yAxisLabel: string;
685
+ config_version: 2;
686
+ categoryColumn: string;
687
+ valueColumn: string;
688
+ secondaryCategoryColumn?: string | undefined;
689
+ } | {
690
+ type: "line/area";
691
+ title: string;
692
+ valueColumns: string[];
693
+ config_version: 2;
694
+ xAxisColumn: string;
695
+ yAxisLabels: string[];
696
+ } | {
697
+ type: "line/area-categorical";
698
+ title: string;
699
+ xAxisLabel: string;
700
+ yAxisLabel: string;
701
+ config_version: 2;
702
+ categoryColumn: string;
703
+ valueColumn: string;
704
+ xAxisColumn: string;
705
+ } | {
706
+ type: "scatter";
707
+ title: string;
708
+ xAxisLabel: string;
709
+ yAxisLabel: string;
710
+ config_version: 2;
711
+ xAxisValueColumn: string;
712
+ yAxisValueColumn: string;
713
+ } | {
714
+ type: "pie";
715
+ title: string;
716
+ config_version: 2;
717
+ categoryColumn: string;
718
+ valueColumn: string;
719
+ };
720
+ }>;
721
+
722
+ export { GenerateInsightParam }
723
+
724
+ export declare const InfiniteDataTableUI: React.FC<InfiniteDataTableUIProps>;
725
+
726
+ declare type InfiniteDataTableUIProps = {
727
+ flowDataId: number;
728
+ data: Record<string, unknown>[];
729
+ columns: FrontendReportColumns;
730
+ explainability: FrontendReportExplainability | null | undefined;
731
+ hasNextPage: boolean | undefined;
732
+ fetchNextPage: () => Promise<unknown>;
733
+ isFetchingNextPage: boolean;
734
+ isFetching: boolean;
735
+ totalRows: number;
736
+ };
737
+
738
+ export declare const logout: () => Promise<void>;
739
+
740
+ export { MageMetricsClient }
741
+
742
+ export { MageMetricsClientConfig }
743
+
744
+ export declare const MageMetricsContextProvider: default_2.FC<MageMetricsContextProviderProps & MageMetricsPublicContextProviderProps>;
745
+
746
+ export declare type MageMetricsContextProviderProps = PropsWithChildren<MageMetricsClientConfig>;
747
+
748
+ export declare const MageMetricsPublicContextProvider: default_2.FC<MageMetricsPublicContextProviderProps>;
749
+
750
+ declare type MageMetricsPublicContextProviderProps = PropsWithChildren<Pick<MageMetricsClientConfig, "apiUrl" | "apiKey"> & {
751
+ experimental_components?: Components;
752
+ }>;
753
+
754
+ export declare const ManagedModal: React.FC<ManagedModalProps>;
755
+
756
+ declare interface ManagedModalProps extends ModalProps {
757
+ apiKey: string;
758
+ externalJwt: string;
759
+ apiUrl: string;
760
+ persist?: PersistenceOptions;
761
+ experimental_components?: Components;
762
+ }
763
+
764
+ declare interface ModalProps {
765
+ display?: string;
766
+ modal?: ControlledModalProps;
767
+ startOptions?: StartOptions;
768
+ }
769
+
770
+ declare type PersistenceOptions = "queryParam" | "none";
771
+
772
+ export declare const PublicDashboard: React.FC<React.ComponentProps<typeof Dashboard_2>>;
773
+
774
+ export declare const PublicDataReport: React.FC<{
775
+ dashboardId: string;
776
+ reportId: number;
777
+ }>;
778
+
779
+ declare type ReportDataFilters = {
780
+ columns?: string[];
781
+ limit: number;
782
+ sorting: SortingState;
783
+ filters: TableFilters;
784
+ cursor?: number;
785
+ };
786
+
787
+ export declare const StandaloneConversationModal: React.FC<StandaloneConversationModalProps>;
788
+
789
+ declare type StandaloneConversationModalProps = {
790
+ opened: boolean;
791
+ flowId: string;
792
+ onOpenChange?: (open: boolean) => void;
793
+ };
794
+
795
+ declare type StartOptions = DisplayControlProps & {
796
+ label?: string;
797
+ recommendationsLabel?: string;
798
+ placeholders?: string[];
799
+ };
800
+
801
+ declare type TableFilters = Record<string, string | number>;
802
+
803
+ export declare const useCreateFlow: (options?: UseMutationOptions<{
804
+ flowId: string;
805
+ }, Error, CreateFlowParam>) => {
806
+ createFlow: UseMutateFunction< {
807
+ flowId: string;
808
+ }, Error, CreateFlowParam, unknown>;
809
+ createFlowAsync: UseMutateAsyncFunction< {
810
+ flowId: string;
811
+ }, Error, CreateFlowParam, unknown>;
812
+ isCreatingFlow: boolean;
813
+ data: undefined;
814
+ variables: undefined;
815
+ error: null;
816
+ isError: false;
817
+ isIdle: true;
818
+ isPending: false;
819
+ isSuccess: false;
820
+ status: "idle";
821
+ mutate: UseMutateFunction< {
822
+ flowId: string;
823
+ }, Error, CreateFlowParam, unknown>;
824
+ reset: () => void;
825
+ context: unknown;
826
+ failureCount: number;
827
+ failureReason: Error | null;
828
+ isPaused: boolean;
829
+ submittedAt: number;
830
+ mutateAsync: UseMutateAsyncFunction< {
831
+ flowId: string;
832
+ }, Error, CreateFlowParam, unknown>;
833
+ } | {
834
+ createFlow: UseMutateFunction< {
835
+ flowId: string;
836
+ }, Error, CreateFlowParam, unknown>;
837
+ createFlowAsync: UseMutateAsyncFunction< {
838
+ flowId: string;
839
+ }, Error, CreateFlowParam, unknown>;
840
+ isCreatingFlow: boolean;
841
+ data: undefined;
842
+ variables: CreateFlowParam;
843
+ error: null;
844
+ isError: false;
845
+ isIdle: false;
846
+ isPending: true;
847
+ isSuccess: false;
848
+ status: "pending";
849
+ mutate: UseMutateFunction< {
850
+ flowId: string;
851
+ }, Error, CreateFlowParam, unknown>;
852
+ reset: () => void;
853
+ context: unknown;
854
+ failureCount: number;
855
+ failureReason: Error | null;
856
+ isPaused: boolean;
857
+ submittedAt: number;
858
+ mutateAsync: UseMutateAsyncFunction< {
859
+ flowId: string;
860
+ }, Error, CreateFlowParam, unknown>;
861
+ } | {
862
+ createFlow: UseMutateFunction< {
863
+ flowId: string;
864
+ }, Error, CreateFlowParam, unknown>;
865
+ createFlowAsync: UseMutateAsyncFunction< {
866
+ flowId: string;
867
+ }, Error, CreateFlowParam, unknown>;
868
+ isCreatingFlow: boolean;
869
+ data: undefined;
870
+ error: Error;
871
+ variables: CreateFlowParam;
872
+ isError: true;
873
+ isIdle: false;
874
+ isPending: false;
875
+ isSuccess: false;
876
+ status: "error";
877
+ mutate: UseMutateFunction< {
878
+ flowId: string;
879
+ }, Error, CreateFlowParam, unknown>;
880
+ reset: () => void;
881
+ context: unknown;
882
+ failureCount: number;
883
+ failureReason: Error | null;
884
+ isPaused: boolean;
885
+ submittedAt: number;
886
+ mutateAsync: UseMutateAsyncFunction< {
887
+ flowId: string;
888
+ }, Error, CreateFlowParam, unknown>;
889
+ } | {
890
+ createFlow: UseMutateFunction< {
891
+ flowId: string;
892
+ }, Error, CreateFlowParam, unknown>;
893
+ createFlowAsync: UseMutateAsyncFunction< {
894
+ flowId: string;
895
+ }, Error, CreateFlowParam, unknown>;
896
+ isCreatingFlow: boolean;
897
+ data: {
898
+ flowId: string;
899
+ };
900
+ error: null;
901
+ variables: CreateFlowParam;
902
+ isError: false;
903
+ isIdle: false;
904
+ isPending: false;
905
+ isSuccess: true;
906
+ status: "success";
907
+ mutate: UseMutateFunction< {
908
+ flowId: string;
909
+ }, Error, CreateFlowParam, unknown>;
910
+ reset: () => void;
911
+ context: unknown;
912
+ failureCount: number;
913
+ failureReason: Error | null;
914
+ isPaused: boolean;
915
+ submittedAt: number;
916
+ mutateAsync: UseMutateAsyncFunction< {
917
+ flowId: string;
918
+ }, Error, CreateFlowParam, unknown>;
919
+ };
920
+
921
+ export declare const useDataReport: (flowDataId: FrontendReport["id"]) => {
922
+ dataColumns: {
923
+ name: string;
924
+ data_type: string;
925
+ dataType: string;
926
+ renderType?: string;
927
+ unit?: string;
928
+ }[] | undefined;
929
+ isPendingColumns: boolean;
930
+ isPendingData: boolean;
931
+ fetchNextPage: (options?: FetchNextPageOptions) => Promise<InfiniteQueryObserverResult<InfiniteData<Record<string, unknown>[], unknown>, Error>>;
932
+ isFetching: boolean;
933
+ isFetchingNextPage: boolean;
934
+ hasNextPage: boolean;
935
+ allData: Record<string, unknown>[];
936
+ explainability: {
937
+ sql_explanation?: {
938
+ chunk_title: string;
939
+ chunk_explanation: string;
940
+ lines: {
941
+ sql: string;
942
+ explanation: string;
943
+ }[];
944
+ }[] | null;
945
+ business_explanation?: {
946
+ summary: string;
947
+ implementation: string[];
948
+ assumptions: {
949
+ type: "grain" | "completeness" | "transformation" | "relationship" | "other";
950
+ details: string;
951
+ explanation: string;
952
+ }[];
953
+ } | null;
954
+ columns_lineage?: {
955
+ [key: string]: {
956
+ nodes: {
957
+ id: string;
958
+ type: "entity" | "attribute" | "filter" | "process" | "combine" | "result";
959
+ explanation: string;
960
+ }[];
961
+ edges: {
962
+ source: string;
963
+ target: string;
964
+ }[];
965
+ };
966
+ } | null;
967
+ confidence_score: number;
968
+ confidence_score_reason: string;
969
+ assumptions_score?: number;
970
+ assumptions_score_reason?: string;
971
+ friendliness_score?: number;
972
+ friendliness_score_reason?: string;
973
+ flow_data_id: number;
974
+ } | null | undefined;
975
+ totalRows: number;
976
+ infiniteData: InfiniteData<Record<string, unknown>[], unknown> | undefined;
977
+ };
978
+
979
+ export declare const useDataReportColumnValue: (reportId: number, filters: ReportDataFilters) => UseQueryResult<Record<string, unknown>[], Error>;
980
+
981
+ export declare const useDownloadReportData: (options?: UseMutationOptions<ExportReportDataResult, Error, ExportReportDataParams>) => {
982
+ download: UseMutateFunction<ExportReportDataResult, Error, ExportReportDataParams, unknown>;
983
+ data: undefined;
984
+ variables: undefined;
985
+ error: null;
986
+ isError: false;
987
+ isIdle: true;
988
+ isPending: false;
989
+ isSuccess: false;
990
+ status: "idle";
991
+ mutate: UseMutateFunction<ExportReportDataResult, Error, ExportReportDataParams, unknown>;
992
+ reset: () => void;
993
+ context: unknown;
994
+ failureCount: number;
995
+ failureReason: Error | null;
996
+ isPaused: boolean;
997
+ submittedAt: number;
998
+ mutateAsync: UseMutateAsyncFunction<ExportReportDataResult, Error, ExportReportDataParams, unknown>;
999
+ } | {
1000
+ download: UseMutateFunction<ExportReportDataResult, Error, ExportReportDataParams, unknown>;
1001
+ data: undefined;
1002
+ variables: ExportReportDataParams;
1003
+ error: null;
1004
+ isError: false;
1005
+ isIdle: false;
1006
+ isPending: true;
1007
+ isSuccess: false;
1008
+ status: "pending";
1009
+ mutate: UseMutateFunction<ExportReportDataResult, Error, ExportReportDataParams, unknown>;
1010
+ reset: () => void;
1011
+ context: unknown;
1012
+ failureCount: number;
1013
+ failureReason: Error | null;
1014
+ isPaused: boolean;
1015
+ submittedAt: number;
1016
+ mutateAsync: UseMutateAsyncFunction<ExportReportDataResult, Error, ExportReportDataParams, unknown>;
1017
+ } | {
1018
+ download: UseMutateFunction<ExportReportDataResult, Error, ExportReportDataParams, unknown>;
1019
+ data: undefined;
1020
+ error: Error;
1021
+ variables: ExportReportDataParams;
1022
+ isError: true;
1023
+ isIdle: false;
1024
+ isPending: false;
1025
+ isSuccess: false;
1026
+ status: "error";
1027
+ mutate: UseMutateFunction<ExportReportDataResult, Error, ExportReportDataParams, unknown>;
1028
+ reset: () => void;
1029
+ context: unknown;
1030
+ failureCount: number;
1031
+ failureReason: Error | null;
1032
+ isPaused: boolean;
1033
+ submittedAt: number;
1034
+ mutateAsync: UseMutateAsyncFunction<ExportReportDataResult, Error, ExportReportDataParams, unknown>;
1035
+ } | {
1036
+ download: UseMutateFunction<ExportReportDataResult, Error, ExportReportDataParams, unknown>;
1037
+ data: ExportReportDataResult;
1038
+ error: null;
1039
+ variables: ExportReportDataParams;
1040
+ isError: false;
1041
+ isIdle: false;
1042
+ isPending: false;
1043
+ isSuccess: true;
1044
+ status: "success";
1045
+ mutate: UseMutateFunction<ExportReportDataResult, Error, ExportReportDataParams, unknown>;
1046
+ reset: () => void;
1047
+ context: unknown;
1048
+ failureCount: number;
1049
+ failureReason: Error | null;
1050
+ isPaused: boolean;
1051
+ submittedAt: number;
1052
+ mutateAsync: UseMutateAsyncFunction<ExportReportDataResult, Error, ExportReportDataParams, unknown>;
1053
+ };
1054
+
1055
+ export declare const useGenerateContextualInsight: (options?: UseMutationOptions<ExtractInsightResponse, Error, GenerateInsightParam>) => {
1056
+ generateInsight: UseMutateFunction< {
1057
+ type: "text";
1058
+ insight: string;
1059
+ } | {
1060
+ type: "missing";
1061
+ }, Error, GenerateInsightParam, unknown>;
1062
+ generateInsightAsync: UseMutateAsyncFunction< {
1063
+ type: "text";
1064
+ insight: string;
1065
+ } | {
1066
+ type: "missing";
1067
+ }, Error, GenerateInsightParam, unknown>;
1068
+ data: undefined;
1069
+ variables: undefined;
1070
+ error: null;
1071
+ isError: false;
1072
+ isIdle: true;
1073
+ isPending: false;
1074
+ isSuccess: false;
1075
+ status: "idle";
1076
+ mutate: UseMutateFunction< {
1077
+ type: "text";
1078
+ insight: string;
1079
+ } | {
1080
+ type: "missing";
1081
+ }, Error, GenerateInsightParam, unknown>;
1082
+ reset: () => void;
1083
+ context: unknown;
1084
+ failureCount: number;
1085
+ failureReason: Error | null;
1086
+ isPaused: boolean;
1087
+ submittedAt: number;
1088
+ mutateAsync: UseMutateAsyncFunction< {
1089
+ type: "text";
1090
+ insight: string;
1091
+ } | {
1092
+ type: "missing";
1093
+ }, Error, GenerateInsightParam, unknown>;
1094
+ } | {
1095
+ generateInsight: UseMutateFunction< {
1096
+ type: "text";
1097
+ insight: string;
1098
+ } | {
1099
+ type: "missing";
1100
+ }, Error, GenerateInsightParam, unknown>;
1101
+ generateInsightAsync: UseMutateAsyncFunction< {
1102
+ type: "text";
1103
+ insight: string;
1104
+ } | {
1105
+ type: "missing";
1106
+ }, Error, GenerateInsightParam, unknown>;
1107
+ data: undefined;
1108
+ variables: GenerateInsightParam;
1109
+ error: null;
1110
+ isError: false;
1111
+ isIdle: false;
1112
+ isPending: true;
1113
+ isSuccess: false;
1114
+ status: "pending";
1115
+ mutate: UseMutateFunction< {
1116
+ type: "text";
1117
+ insight: string;
1118
+ } | {
1119
+ type: "missing";
1120
+ }, Error, GenerateInsightParam, unknown>;
1121
+ reset: () => void;
1122
+ context: unknown;
1123
+ failureCount: number;
1124
+ failureReason: Error | null;
1125
+ isPaused: boolean;
1126
+ submittedAt: number;
1127
+ mutateAsync: UseMutateAsyncFunction< {
1128
+ type: "text";
1129
+ insight: string;
1130
+ } | {
1131
+ type: "missing";
1132
+ }, Error, GenerateInsightParam, unknown>;
1133
+ } | {
1134
+ generateInsight: UseMutateFunction< {
1135
+ type: "text";
1136
+ insight: string;
1137
+ } | {
1138
+ type: "missing";
1139
+ }, Error, GenerateInsightParam, unknown>;
1140
+ generateInsightAsync: UseMutateAsyncFunction< {
1141
+ type: "text";
1142
+ insight: string;
1143
+ } | {
1144
+ type: "missing";
1145
+ }, Error, GenerateInsightParam, unknown>;
1146
+ data: undefined;
1147
+ error: Error;
1148
+ variables: GenerateInsightParam;
1149
+ isError: true;
1150
+ isIdle: false;
1151
+ isPending: false;
1152
+ isSuccess: false;
1153
+ status: "error";
1154
+ mutate: UseMutateFunction< {
1155
+ type: "text";
1156
+ insight: string;
1157
+ } | {
1158
+ type: "missing";
1159
+ }, Error, GenerateInsightParam, unknown>;
1160
+ reset: () => void;
1161
+ context: unknown;
1162
+ failureCount: number;
1163
+ failureReason: Error | null;
1164
+ isPaused: boolean;
1165
+ submittedAt: number;
1166
+ mutateAsync: UseMutateAsyncFunction< {
1167
+ type: "text";
1168
+ insight: string;
1169
+ } | {
1170
+ type: "missing";
1171
+ }, Error, GenerateInsightParam, unknown>;
1172
+ } | {
1173
+ generateInsight: UseMutateFunction< {
1174
+ type: "text";
1175
+ insight: string;
1176
+ } | {
1177
+ type: "missing";
1178
+ }, Error, GenerateInsightParam, unknown>;
1179
+ generateInsightAsync: UseMutateAsyncFunction< {
1180
+ type: "text";
1181
+ insight: string;
1182
+ } | {
1183
+ type: "missing";
1184
+ }, Error, GenerateInsightParam, unknown>;
1185
+ data: {
1186
+ type: "text";
1187
+ insight: string;
1188
+ } | {
1189
+ type: "missing";
1190
+ };
1191
+ error: null;
1192
+ variables: GenerateInsightParam;
1193
+ isError: false;
1194
+ isIdle: false;
1195
+ isPending: false;
1196
+ isSuccess: true;
1197
+ status: "success";
1198
+ mutate: UseMutateFunction< {
1199
+ type: "text";
1200
+ insight: string;
1201
+ } | {
1202
+ type: "missing";
1203
+ }, Error, GenerateInsightParam, unknown>;
1204
+ reset: () => void;
1205
+ context: unknown;
1206
+ failureCount: number;
1207
+ failureReason: Error | null;
1208
+ isPaused: boolean;
1209
+ submittedAt: number;
1210
+ mutateAsync: UseMutateAsyncFunction< {
1211
+ type: "text";
1212
+ insight: string;
1213
+ } | {
1214
+ type: "missing";
1215
+ }, Error, GenerateInsightParam, unknown>;
1216
+ };
1217
+
1218
+ export declare const useMageMetricsApiUrl: () => string;
1219
+
1220
+ export declare const useMageMetricsClient: () => MageMetricsClient | undefined;
1221
+
1222
+ export declare const useMageMetricsReady: () => false | MageMetricsClient | undefined;
1223
+
1224
+ export declare const useRecentFlows: (limit?: number) => UseQueryResult< {
1225
+ id: string;
1226
+ request: string;
1227
+ created_at: string;
1228
+ user_id: string | null;
1229
+ }[], Error>;
1230
+
1231
+ declare type V1FrontendVisualization = z.output<typeof V1FrontendVisualizationSchema>;
1232
+
1233
+ declare const V1FrontendVisualizationSchema: z.ZodObject<Omit<{
1234
+ id: z.ZodNumber;
1235
+ flow_data_id: z.ZodNumber;
1236
+ created_at: z.ZodString;
1237
+ sql: z.ZodString;
1238
+ bookmarked: z.ZodBoolean;
1239
+ data_sample: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">;
1240
+ is_sample: z.ZodBoolean;
1241
+ data_summary: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1242
+ } & {
1243
+ configuration: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1244
+ xAxisLabel: z.ZodString;
1245
+ yAxisLabel: z.ZodString;
1246
+ xAxisDataKey: z.ZodOptional<z.ZodString>;
1247
+ yAxisDataKey: z.ZodOptional<z.ZodString>;
1248
+ dimensionDataKey: z.ZodOptional<z.ZodString>;
1249
+ valueColumns: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1250
+ title: z.ZodString;
1251
+ type: z.ZodLiteral<"bar">;
1252
+ }, "strip", z.ZodTypeAny, {
1253
+ type: "bar";
1254
+ title: string;
1255
+ xAxisLabel: string;
1256
+ yAxisLabel: string;
1257
+ valueColumns?: string[] | undefined;
1258
+ xAxisDataKey?: string | undefined;
1259
+ yAxisDataKey?: string | undefined;
1260
+ dimensionDataKey?: string | undefined;
1261
+ }, {
1262
+ type: "bar";
1263
+ title: string;
1264
+ xAxisLabel: string;
1265
+ yAxisLabel: string;
1266
+ valueColumns?: string[] | undefined;
1267
+ xAxisDataKey?: string | undefined;
1268
+ yAxisDataKey?: string | undefined;
1269
+ dimensionDataKey?: string | undefined;
1270
+ }>, z.ZodObject<{
1271
+ xAxisLabel: z.ZodString;
1272
+ yAxisLabel: z.ZodString;
1273
+ xAxisDataKey: z.ZodOptional<z.ZodString>;
1274
+ yAxisDataKey: z.ZodOptional<z.ZodString>;
1275
+ dimensionDataKey: z.ZodOptional<z.ZodString>;
1276
+ valueColumns: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1277
+ title: z.ZodString;
1278
+ type: z.ZodLiteral<"line/area">;
1279
+ }, "strip", z.ZodTypeAny, {
1280
+ type: "line/area";
1281
+ title: string;
1282
+ xAxisLabel: string;
1283
+ yAxisLabel: string;
1284
+ valueColumns?: string[] | undefined;
1285
+ xAxisDataKey?: string | undefined;
1286
+ yAxisDataKey?: string | undefined;
1287
+ dimensionDataKey?: string | undefined;
1288
+ }, {
1289
+ type: "line/area";
1290
+ title: string;
1291
+ xAxisLabel: string;
1292
+ yAxisLabel: string;
1293
+ valueColumns?: string[] | undefined;
1294
+ xAxisDataKey?: string | undefined;
1295
+ yAxisDataKey?: string | undefined;
1296
+ dimensionDataKey?: string | undefined;
1297
+ }>, z.ZodObject<{
1298
+ xAxisLabel: z.ZodString;
1299
+ yAxisLabel: z.ZodString;
1300
+ xAxisDataKey: z.ZodOptional<z.ZodString>;
1301
+ yAxisDataKey: z.ZodOptional<z.ZodString>;
1302
+ dimensionDataKey: z.ZodOptional<z.ZodString>;
1303
+ valueColumns: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1304
+ title: z.ZodString;
1305
+ type: z.ZodLiteral<"scatter">;
1306
+ }, "strip", z.ZodTypeAny, {
1307
+ type: "scatter";
1308
+ title: string;
1309
+ xAxisLabel: string;
1310
+ yAxisLabel: string;
1311
+ valueColumns?: string[] | undefined;
1312
+ xAxisDataKey?: string | undefined;
1313
+ yAxisDataKey?: string | undefined;
1314
+ dimensionDataKey?: string | undefined;
1315
+ }, {
1316
+ type: "scatter";
1317
+ title: string;
1318
+ xAxisLabel: string;
1319
+ yAxisLabel: string;
1320
+ valueColumns?: string[] | undefined;
1321
+ xAxisDataKey?: string | undefined;
1322
+ yAxisDataKey?: string | undefined;
1323
+ dimensionDataKey?: string | undefined;
1324
+ }>, z.ZodObject<{
1325
+ nameKey: z.ZodString;
1326
+ dataKey: z.ZodString;
1327
+ title: z.ZodString;
1328
+ type: z.ZodLiteral<"pie">;
1329
+ }, "strip", z.ZodTypeAny, {
1330
+ type: "pie";
1331
+ title: string;
1332
+ nameKey: string;
1333
+ dataKey: string;
1334
+ }, {
1335
+ type: "pie";
1336
+ title: string;
1337
+ nameKey: string;
1338
+ dataKey: string;
1339
+ }>]>;
1340
+ }, "sql" | "data_sample" | "is_sample" | "data_summary">, "strip", z.ZodTypeAny, {
1341
+ id: number;
1342
+ flow_data_id: number;
1343
+ created_at: string;
1344
+ bookmarked: boolean;
1345
+ configuration: {
1346
+ type: "bar";
1347
+ title: string;
1348
+ xAxisLabel: string;
1349
+ yAxisLabel: string;
1350
+ valueColumns?: string[] | undefined;
1351
+ xAxisDataKey?: string | undefined;
1352
+ yAxisDataKey?: string | undefined;
1353
+ dimensionDataKey?: string | undefined;
1354
+ } | {
1355
+ type: "line/area";
1356
+ title: string;
1357
+ xAxisLabel: string;
1358
+ yAxisLabel: string;
1359
+ valueColumns?: string[] | undefined;
1360
+ xAxisDataKey?: string | undefined;
1361
+ yAxisDataKey?: string | undefined;
1362
+ dimensionDataKey?: string | undefined;
1363
+ } | {
1364
+ type: "scatter";
1365
+ title: string;
1366
+ xAxisLabel: string;
1367
+ yAxisLabel: string;
1368
+ valueColumns?: string[] | undefined;
1369
+ xAxisDataKey?: string | undefined;
1370
+ yAxisDataKey?: string | undefined;
1371
+ dimensionDataKey?: string | undefined;
1372
+ } | {
1373
+ type: "pie";
1374
+ title: string;
1375
+ nameKey: string;
1376
+ dataKey: string;
1377
+ };
1378
+ }, {
1379
+ id: number;
1380
+ flow_data_id: number;
1381
+ created_at: string;
1382
+ bookmarked: boolean;
1383
+ configuration: {
1384
+ type: "bar";
1385
+ title: string;
1386
+ xAxisLabel: string;
1387
+ yAxisLabel: string;
1388
+ valueColumns?: string[] | undefined;
1389
+ xAxisDataKey?: string | undefined;
1390
+ yAxisDataKey?: string | undefined;
1391
+ dimensionDataKey?: string | undefined;
1392
+ } | {
1393
+ type: "line/area";
1394
+ title: string;
1395
+ xAxisLabel: string;
1396
+ yAxisLabel: string;
1397
+ valueColumns?: string[] | undefined;
1398
+ xAxisDataKey?: string | undefined;
1399
+ yAxisDataKey?: string | undefined;
1400
+ dimensionDataKey?: string | undefined;
1401
+ } | {
1402
+ type: "scatter";
1403
+ title: string;
1404
+ xAxisLabel: string;
1405
+ yAxisLabel: string;
1406
+ valueColumns?: string[] | undefined;
1407
+ xAxisDataKey?: string | undefined;
1408
+ yAxisDataKey?: string | undefined;
1409
+ dimensionDataKey?: string | undefined;
1410
+ } | {
1411
+ type: "pie";
1412
+ title: string;
1413
+ nameKey: string;
1414
+ dataKey: string;
1415
+ };
1416
+ }>;
1417
+
1418
+ export declare const Visualization: ForwardRefExoticComponent< {
1419
+ visualizationId: number;
1420
+ withTitle: boolean;
1421
+ } & RefAttributes<HTMLDivElement>>;
1422
+
1423
+ export { }