@magemetrics/ai 0.3.1 → 0.3.3

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.
@@ -102,8 +102,11 @@ export declare interface DataReportMessageProps {
102
102
  export declare const DataTable: React.FC<DataReportMessageProps>;
103
103
 
104
104
  declare type DisplayControlProps = {
105
+ /** Whether to display the recommendations section when the input is active */
105
106
  showRecommendations?: boolean;
107
+ /** Whether to display recent chats when the input is active */
106
108
  showRecentChats?: boolean;
109
+ /** Whether to display a backdrop overlay when the input is active */
107
110
  showBackdrop?: boolean;
108
111
  };
109
112
 
@@ -113,6 +116,10 @@ declare type DomWrapperProps = {
113
116
  display?: string;
114
117
  };
115
118
 
119
+ export declare const DownloadDataReportButton: React.FC<{
120
+ reportId: number;
121
+ }>;
122
+
116
123
  declare type ExportReportDataParams = {
117
124
  reportId: number;
118
125
  filename?: string;
@@ -129,19 +136,9 @@ declare type ExtractInsightResponse = z.infer<typeof ExtractInsightResponseSchem
129
136
  declare const ExtractInsightResponseSchema: z.ZodUnion<[z.ZodObject<{
130
137
  type: z.ZodLiteral<"text">;
131
138
  insight: z.ZodString;
132
- }, "strip", z.ZodTypeAny, {
133
- type: "text";
134
- insight: string;
135
- }, {
136
- type: "text";
137
- insight: string;
138
- }>, z.ZodObject<{
139
+ }, z.core.$strip>, z.ZodObject<{
139
140
  type: z.ZodLiteral<"missing">;
140
- }, "strip", z.ZodTypeAny, {
141
- type: "missing";
142
- }, {
143
- type: "missing";
144
- }>]>;
141
+ }, z.core.$strip>]>;
145
142
 
146
143
  /**
147
144
  * This module handles the formatting and normalization of table cell values for display and sorting.
@@ -175,229 +172,75 @@ declare type FrontendReport = z.infer<typeof FrontendReportSchema>;
175
172
  declare type FrontendReportColumns = z.infer<typeof FrontendReportColumnsSchema>;
176
173
 
177
174
  declare const FrontendReportColumnsSchema: z.ZodArray<z.ZodObject<{
178
- name: z.ZodString;
179
- data_type: z.ZodString;
180
- } & {
181
175
  dataType: z.ZodString;
182
176
  renderType: z.ZodOptional<z.ZodString>;
183
177
  unit: z.ZodOptional<z.ZodString>;
184
- }, "strip", z.ZodTypeAny, {
185
- name: string;
186
- data_type: string;
187
- dataType: string;
188
- unit?: string | undefined;
189
- renderType?: string | undefined;
190
- }, {
191
- name: string;
192
- data_type: string;
193
- dataType: string;
194
- unit?: string | undefined;
195
- renderType?: string | undefined;
196
- }>, "many">;
178
+ name: z.ZodString;
179
+ data_type: z.ZodString;
180
+ }, z.core.$strip>>;
197
181
 
198
182
  declare type FrontendReportExplainability = z.infer<typeof FrontendReportExplainabilitySchema>;
199
183
 
200
- declare const FrontendReportExplainabilitySchema: z.ZodObject<Omit<{
184
+ declare const FrontendReportExplainabilitySchema: z.ZodObject<{
185
+ flow_data_id: z.ZodNumber;
201
186
  sql_explanation: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
202
187
  chunk_title: z.ZodString;
203
188
  chunk_explanation: z.ZodString;
204
189
  lines: z.ZodArray<z.ZodObject<{
205
190
  sql: z.ZodString;
206
191
  explanation: z.ZodString;
207
- }, "strip", z.ZodTypeAny, {
208
- explanation: string;
209
- sql: string;
210
- }, {
211
- explanation: string;
212
- sql: string;
213
- }>, "many">;
214
- }, "strip", z.ZodTypeAny, {
215
- chunk_title: string;
216
- chunk_explanation: string;
217
- lines: {
218
- explanation: string;
219
- sql: string;
220
- }[];
221
- }, {
222
- chunk_title: string;
223
- chunk_explanation: string;
224
- lines: {
225
- explanation: string;
226
- sql: string;
227
- }[];
228
- }>, "many">>>;
192
+ }, z.core.$strip>>;
193
+ }, z.core.$strip>>>>;
229
194
  business_explanation: z.ZodOptional<z.ZodNullable<z.ZodObject<{
230
195
  summary: z.ZodString;
231
- implementation: z.ZodArray<z.ZodString, "many">;
196
+ implementation: z.ZodArray<z.ZodString>;
232
197
  assumptions: z.ZodArray<z.ZodObject<{
233
- type: z.ZodEnum<["grain", "completeness", "transformation", "relationship", "other"]>;
198
+ type: z.ZodEnum<{
199
+ grain: "grain";
200
+ completeness: "completeness";
201
+ transformation: "transformation";
202
+ relationship: "relationship";
203
+ other: "other";
204
+ }>;
234
205
  details: z.ZodString;
235
206
  explanation: z.ZodString;
236
- }, "strip", z.ZodTypeAny, {
237
- explanation: string;
238
- type: "grain" | "completeness" | "transformation" | "relationship" | "other";
239
- details: string;
240
- }, {
241
- explanation: string;
242
- type: "grain" | "completeness" | "transformation" | "relationship" | "other";
243
- details: string;
244
- }>, "many">;
245
- }, "strip", z.ZodTypeAny, {
246
- implementation: string[];
247
- summary: string;
248
- assumptions: {
249
- explanation: string;
250
- type: "grain" | "completeness" | "transformation" | "relationship" | "other";
251
- details: string;
252
- }[];
253
- }, {
254
- implementation: string[];
255
- summary: string;
256
- assumptions: {
257
- explanation: string;
258
- type: "grain" | "completeness" | "transformation" | "relationship" | "other";
259
- details: string;
260
- }[];
261
- }>>>;
207
+ }, z.core.$strip>>;
208
+ }, z.core.$strip>>>;
262
209
  columns_lineage: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{
263
210
  nodes: z.ZodArray<z.ZodObject<{
264
211
  id: z.ZodString;
265
- type: z.ZodEnum<["entity", "attribute", "filter", "process", "combine", "result"]>;
212
+ type: z.ZodEnum<{
213
+ result: "result";
214
+ filter: "filter";
215
+ entity: "entity";
216
+ attribute: "attribute";
217
+ process: "process";
218
+ combine: "combine";
219
+ }>;
266
220
  explanation: z.ZodString;
267
- }, "strip", z.ZodTypeAny, {
268
- explanation: string;
269
- type: "filter" | "result" | "entity" | "attribute" | "process" | "combine";
270
- id: string;
271
- }, {
272
- explanation: string;
273
- type: "filter" | "result" | "entity" | "attribute" | "process" | "combine";
274
- id: string;
275
- }>, "many">;
221
+ }, z.core.$strip>>;
276
222
  edges: z.ZodArray<z.ZodObject<{
277
223
  source: z.ZodString;
278
224
  target: z.ZodString;
279
- }, "strip", z.ZodTypeAny, {
280
- source: string;
281
- target: string;
282
- }, {
283
- source: string;
284
- target: string;
285
- }>, "many">;
286
- }, "strip", z.ZodTypeAny, {
287
- nodes: {
288
- explanation: string;
289
- type: "filter" | "result" | "entity" | "attribute" | "process" | "combine";
290
- id: string;
291
- }[];
292
- edges: {
293
- source: string;
294
- target: string;
295
- }[];
296
- }, {
297
- nodes: {
298
- explanation: string;
299
- type: "filter" | "result" | "entity" | "attribute" | "process" | "combine";
300
- id: string;
301
- }[];
302
- edges: {
303
- source: string;
304
- target: string;
305
- }[];
306
- }>>>>;
225
+ }, z.core.$strip>>;
226
+ }, z.core.$strip>>>>;
307
227
  confidence_score: z.ZodNumber;
308
228
  confidence_score_reason: z.ZodString;
309
229
  assumptions_score: z.ZodOptional<z.ZodNumber>;
310
230
  assumptions_score_reason: z.ZodOptional<z.ZodString>;
311
231
  friendliness_score: z.ZodOptional<z.ZodNumber>;
312
232
  friendliness_score_reason: z.ZodOptional<z.ZodString>;
313
- id: z.ZodNumber;
314
- flow_data_id: z.ZodNumber;
315
- created_at: z.ZodString;
316
- }, "id" | "created_at">, "strip", z.ZodTypeAny, {
317
- flow_data_id: number;
318
- confidence_score: number;
319
- confidence_score_reason: string;
320
- sql_explanation?: {
321
- chunk_title: string;
322
- chunk_explanation: string;
323
- lines: {
324
- explanation: string;
325
- sql: string;
326
- }[];
327
- }[] | null | undefined;
328
- business_explanation?: {
329
- implementation: string[];
330
- summary: string;
331
- assumptions: {
332
- explanation: string;
333
- type: "grain" | "completeness" | "transformation" | "relationship" | "other";
334
- details: string;
335
- }[];
336
- } | null | undefined;
337
- columns_lineage?: Record<string, {
338
- nodes: {
339
- explanation: string;
340
- type: "filter" | "result" | "entity" | "attribute" | "process" | "combine";
341
- id: string;
342
- }[];
343
- edges: {
344
- source: string;
345
- target: string;
346
- }[];
347
- }> | null | undefined;
348
- assumptions_score?: number | undefined;
349
- assumptions_score_reason?: string | undefined;
350
- friendliness_score?: number | undefined;
351
- friendliness_score_reason?: string | undefined;
352
- }, {
353
- flow_data_id: number;
354
- confidence_score: number;
355
- confidence_score_reason: string;
356
- sql_explanation?: {
357
- chunk_title: string;
358
- chunk_explanation: string;
359
- lines: {
360
- explanation: string;
361
- sql: string;
362
- }[];
363
- }[] | null | undefined;
364
- business_explanation?: {
365
- implementation: string[];
366
- summary: string;
367
- assumptions: {
368
- explanation: string;
369
- type: "grain" | "completeness" | "transformation" | "relationship" | "other";
370
- details: string;
371
- }[];
372
- } | null | undefined;
373
- columns_lineage?: Record<string, {
374
- nodes: {
375
- explanation: string;
376
- type: "filter" | "result" | "entity" | "attribute" | "process" | "combine";
377
- id: string;
378
- }[];
379
- edges: {
380
- source: string;
381
- target: string;
382
- }[];
383
- }> | null | undefined;
384
- assumptions_score?: number | undefined;
385
- assumptions_score_reason?: string | undefined;
386
- friendliness_score?: number | undefined;
387
- friendliness_score_reason?: string | undefined;
388
- }>;
233
+ }, z.core.$strip>;
389
234
 
390
- declare const FrontendReportSchema: z.ZodObject<Omit<{
391
- created_at: z.ZodString;
392
- flow_id: z.ZodString;
393
- id: z.ZodNumber;
394
- is_sample: z.ZodBoolean;
395
- schema: z.ZodString;
396
- sql: z.ZodString;
397
- table: z.ZodString;
235
+ declare const FrontendReportSchema: z.ZodObject<{
236
+ status: z.ZodNullable<z.ZodString>;
398
237
  title: z.ZodString;
238
+ id: z.ZodNumber;
399
239
  request: z.ZodNullable<z.ZodString>;
400
- data_sample: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">;
240
+ created_at: z.ZodString;
241
+ is_removed: z.ZodBoolean;
242
+ flow_id: z.ZodString;
243
+ bookmarked: z.ZodBoolean;
401
244
  data_summary: z.ZodObject<{
402
245
  columns: z.ZodRecord<z.ZodString, z.ZodObject<{
403
246
  position: z.ZodOptional<z.ZodNumber>;
@@ -405,118 +248,18 @@ declare const FrontendReportSchema: z.ZodObject<Omit<{
405
248
  null_count: z.ZodNullable<z.ZodNumber>;
406
249
  unique_count: z.ZodNullable<z.ZodNumber>;
407
250
  unique_percentage: z.ZodNullable<z.ZodNumber>;
408
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
409
- position: z.ZodOptional<z.ZodNumber>;
410
- data_type: z.ZodString;
411
- null_count: z.ZodNullable<z.ZodNumber>;
412
- unique_count: z.ZodNullable<z.ZodNumber>;
413
- unique_percentage: z.ZodNullable<z.ZodNumber>;
414
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
415
- position: z.ZodOptional<z.ZodNumber>;
416
- data_type: z.ZodString;
417
- null_count: z.ZodNullable<z.ZodNumber>;
418
- unique_count: z.ZodNullable<z.ZodNumber>;
419
- unique_percentage: z.ZodNullable<z.ZodNumber>;
420
- }, z.ZodTypeAny, "passthrough">>>;
421
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
422
- columns: z.ZodRecord<z.ZodString, z.ZodObject<{
423
- position: z.ZodOptional<z.ZodNumber>;
424
- data_type: z.ZodString;
425
- null_count: z.ZodNullable<z.ZodNumber>;
426
- unique_count: z.ZodNullable<z.ZodNumber>;
427
- unique_percentage: z.ZodNullable<z.ZodNumber>;
428
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
429
- position: z.ZodOptional<z.ZodNumber>;
430
- data_type: z.ZodString;
431
- null_count: z.ZodNullable<z.ZodNumber>;
432
- unique_count: z.ZodNullable<z.ZodNumber>;
433
- unique_percentage: z.ZodNullable<z.ZodNumber>;
434
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
435
- position: z.ZodOptional<z.ZodNumber>;
436
- data_type: z.ZodString;
437
- null_count: z.ZodNullable<z.ZodNumber>;
438
- unique_count: z.ZodNullable<z.ZodNumber>;
439
- unique_percentage: z.ZodNullable<z.ZodNumber>;
440
- }, z.ZodTypeAny, "passthrough">>>;
441
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
442
- columns: z.ZodRecord<z.ZodString, z.ZodObject<{
443
- position: z.ZodOptional<z.ZodNumber>;
444
- data_type: z.ZodString;
445
- null_count: z.ZodNullable<z.ZodNumber>;
446
- unique_count: z.ZodNullable<z.ZodNumber>;
447
- unique_percentage: z.ZodNullable<z.ZodNumber>;
448
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
449
- position: z.ZodOptional<z.ZodNumber>;
450
- data_type: z.ZodString;
451
- null_count: z.ZodNullable<z.ZodNumber>;
452
- unique_count: z.ZodNullable<z.ZodNumber>;
453
- unique_percentage: z.ZodNullable<z.ZodNumber>;
454
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
455
- position: z.ZodOptional<z.ZodNumber>;
456
- data_type: z.ZodString;
457
- null_count: z.ZodNullable<z.ZodNumber>;
458
- unique_count: z.ZodNullable<z.ZodNumber>;
459
- unique_percentage: z.ZodNullable<z.ZodNumber>;
460
- }, z.ZodTypeAny, "passthrough">>>;
461
- }, z.ZodTypeAny, "passthrough">>;
462
- bookmarked: z.ZodBoolean;
463
- status: z.ZodNullable<z.ZodString>;
464
- is_removed: z.ZodBoolean;
465
- }, "schema" | "sql" | "table" | "data_sample" | "is_sample">, "strip", z.ZodTypeAny, {
466
- title: string;
467
- status: string | null;
468
- id: number;
469
- request: string | null;
470
- created_at: string;
471
- is_removed: boolean;
472
- flow_id: string;
473
- bookmarked: boolean;
474
- data_summary: {
475
- columns: Record<string, z.objectOutputType<{
476
- position: z.ZodOptional<z.ZodNumber>;
477
- data_type: z.ZodString;
478
- null_count: z.ZodNullable<z.ZodNumber>;
479
- unique_count: z.ZodNullable<z.ZodNumber>;
480
- unique_percentage: z.ZodNullable<z.ZodNumber>;
481
- }, z.ZodTypeAny, "passthrough">>;
482
- } & {
483
- [k: string]: unknown;
484
- };
485
- }, {
486
- title: string;
487
- status: string | null;
488
- id: number;
489
- request: string | null;
490
- created_at: string;
491
- is_removed: boolean;
492
- flow_id: string;
493
- bookmarked: boolean;
494
- data_summary: {
495
- columns: Record<string, z.objectInputType<{
496
- position: z.ZodOptional<z.ZodNumber>;
497
- data_type: z.ZodString;
498
- null_count: z.ZodNullable<z.ZodNumber>;
499
- unique_count: z.ZodNullable<z.ZodNumber>;
500
- unique_percentage: z.ZodNullable<z.ZodNumber>;
501
- }, z.ZodTypeAny, "passthrough">>;
502
- } & {
503
- [k: string]: unknown;
504
- };
505
- }>;
251
+ }, z.core.$loose>>;
252
+ }, z.core.$loose>;
253
+ }, z.core.$strip>;
506
254
 
507
255
  declare type FrontendVisualization = z.output<typeof FrontendVisualizationSchema>;
508
256
 
509
- declare const FrontendVisualizationSchema: z.ZodObject<Omit<{
257
+ declare const FrontendVisualizationSchema: z.ZodObject<{
510
258
  id: z.ZodNumber;
511
- flow_data_id: z.ZodNumber;
512
259
  created_at: z.ZodString;
513
- sql: z.ZodString;
260
+ flow_data_id: z.ZodNumber;
514
261
  bookmarked: z.ZodBoolean;
515
- data_sample: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">;
516
- is_sample: z.ZodBoolean;
517
- data_summary: z.ZodRecord<z.ZodString, z.ZodUnknown>;
518
- } & {
519
- configuration: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
262
+ configuration: z.ZodDiscriminatedUnion<[z.ZodObject<{
520
263
  config_version: z.ZodLiteral<2>;
521
264
  xAxisLabel: z.ZodString;
522
265
  yAxisLabel: z.ZodString;
@@ -525,46 +268,14 @@ declare const FrontendVisualizationSchema: z.ZodObject<Omit<{
525
268
  valueColumn: z.ZodString;
526
269
  title: z.ZodString;
527
270
  type: z.ZodLiteral<"bar">;
528
- }, "strip", z.ZodTypeAny, {
529
- type: "bar";
530
- title: string;
531
- xAxisLabel: string;
532
- yAxisLabel: string;
533
- config_version: 2;
534
- categoryColumn: string;
535
- valueColumn: string;
536
- secondaryCategoryColumn?: string | undefined;
537
- }, {
538
- type: "bar";
539
- title: string;
540
- xAxisLabel: string;
541
- yAxisLabel: string;
542
- config_version: 2;
543
- categoryColumn: string;
544
- valueColumn: string;
545
- secondaryCategoryColumn?: string | undefined;
546
- }>, z.ZodObject<{
271
+ }, z.core.$strip>, z.ZodObject<{
547
272
  xAxisColumn: z.ZodString;
548
- valueColumns: z.ZodArray<z.ZodString, "many">;
549
- yAxisLabels: z.ZodArray<z.ZodString, "many">;
273
+ valueColumns: z.ZodArray<z.ZodString>;
274
+ yAxisLabels: z.ZodArray<z.ZodString>;
550
275
  title: z.ZodString;
551
276
  type: z.ZodLiteral<"line/area">;
552
277
  config_version: z.ZodLiteral<2>;
553
- }, "strip", z.ZodTypeAny, {
554
- type: "line/area";
555
- title: string;
556
- valueColumns: string[];
557
- config_version: 2;
558
- xAxisColumn: string;
559
- yAxisLabels: string[];
560
- }, {
561
- type: "line/area";
562
- title: string;
563
- valueColumns: string[];
564
- config_version: 2;
565
- xAxisColumn: string;
566
- yAxisLabels: string[];
567
- }>, z.ZodObject<{
278
+ }, z.core.$strip>, z.ZodObject<{
568
279
  config_version: z.ZodLiteral<2>;
569
280
  valueColumn: z.ZodString;
570
281
  xAxisColumn: z.ZodString;
@@ -573,25 +284,7 @@ declare const FrontendVisualizationSchema: z.ZodObject<Omit<{
573
284
  categoryColumn: z.ZodString;
574
285
  title: z.ZodString;
575
286
  type: z.ZodLiteral<"line/area-categorical">;
576
- }, "strip", z.ZodTypeAny, {
577
- type: "line/area-categorical";
578
- title: string;
579
- xAxisLabel: string;
580
- yAxisLabel: string;
581
- config_version: 2;
582
- categoryColumn: string;
583
- valueColumn: string;
584
- xAxisColumn: string;
585
- }, {
586
- type: "line/area-categorical";
587
- title: string;
588
- xAxisLabel: string;
589
- yAxisLabel: string;
590
- config_version: 2;
591
- categoryColumn: string;
592
- valueColumn: string;
593
- xAxisColumn: string;
594
- }>, z.ZodObject<{
287
+ }, z.core.$strip>, z.ZodObject<{
595
288
  config_version: z.ZodLiteral<2>;
596
289
  xAxisLabel: z.ZodString;
597
290
  yAxisLabel: z.ZodString;
@@ -599,132 +292,14 @@ declare const FrontendVisualizationSchema: z.ZodObject<Omit<{
599
292
  yAxisValueColumn: z.ZodString;
600
293
  title: z.ZodString;
601
294
  type: z.ZodLiteral<"scatter">;
602
- }, "strip", z.ZodTypeAny, {
603
- type: "scatter";
604
- title: string;
605
- xAxisLabel: string;
606
- yAxisLabel: string;
607
- config_version: 2;
608
- xAxisValueColumn: string;
609
- yAxisValueColumn: string;
610
- }, {
611
- type: "scatter";
612
- title: string;
613
- xAxisLabel: string;
614
- yAxisLabel: string;
615
- config_version: 2;
616
- xAxisValueColumn: string;
617
- yAxisValueColumn: string;
618
- }>, z.ZodObject<{
295
+ }, z.core.$strip>, z.ZodObject<{
619
296
  config_version: z.ZodLiteral<2>;
620
297
  categoryColumn: z.ZodString;
621
298
  valueColumn: z.ZodString;
622
299
  title: z.ZodString;
623
300
  type: z.ZodLiteral<"pie">;
624
- }, "strip", z.ZodTypeAny, {
625
- type: "pie";
626
- title: string;
627
- config_version: 2;
628
- categoryColumn: string;
629
- valueColumn: string;
630
- }, {
631
- type: "pie";
632
- title: string;
633
- config_version: 2;
634
- categoryColumn: string;
635
- valueColumn: string;
636
- }>]>;
637
- }, "sql" | "data_sample" | "is_sample" | "data_summary">, "strip", z.ZodTypeAny, {
638
- id: number;
639
- created_at: string;
640
- flow_data_id: number;
641
- bookmarked: boolean;
642
- configuration: {
643
- type: "bar";
644
- title: string;
645
- xAxisLabel: string;
646
- yAxisLabel: string;
647
- config_version: 2;
648
- categoryColumn: string;
649
- valueColumn: string;
650
- secondaryCategoryColumn?: string | undefined;
651
- } | {
652
- type: "line/area";
653
- title: string;
654
- valueColumns: string[];
655
- config_version: 2;
656
- xAxisColumn: string;
657
- yAxisLabels: string[];
658
- } | {
659
- type: "line/area-categorical";
660
- title: string;
661
- xAxisLabel: string;
662
- yAxisLabel: string;
663
- config_version: 2;
664
- categoryColumn: string;
665
- valueColumn: string;
666
- xAxisColumn: string;
667
- } | {
668
- type: "scatter";
669
- title: string;
670
- xAxisLabel: string;
671
- yAxisLabel: string;
672
- config_version: 2;
673
- xAxisValueColumn: string;
674
- yAxisValueColumn: string;
675
- } | {
676
- type: "pie";
677
- title: string;
678
- config_version: 2;
679
- categoryColumn: string;
680
- valueColumn: string;
681
- };
682
- }, {
683
- id: number;
684
- created_at: string;
685
- flow_data_id: number;
686
- bookmarked: boolean;
687
- configuration: {
688
- type: "bar";
689
- title: string;
690
- xAxisLabel: string;
691
- yAxisLabel: string;
692
- config_version: 2;
693
- categoryColumn: string;
694
- valueColumn: string;
695
- secondaryCategoryColumn?: string | undefined;
696
- } | {
697
- type: "line/area";
698
- title: string;
699
- valueColumns: string[];
700
- config_version: 2;
701
- xAxisColumn: string;
702
- yAxisLabels: string[];
703
- } | {
704
- type: "line/area-categorical";
705
- title: string;
706
- xAxisLabel: string;
707
- yAxisLabel: string;
708
- config_version: 2;
709
- categoryColumn: string;
710
- valueColumn: string;
711
- xAxisColumn: string;
712
- } | {
713
- type: "scatter";
714
- title: string;
715
- xAxisLabel: string;
716
- yAxisLabel: string;
717
- config_version: 2;
718
- xAxisValueColumn: string;
719
- yAxisValueColumn: string;
720
- } | {
721
- type: "pie";
722
- title: string;
723
- config_version: 2;
724
- categoryColumn: string;
725
- valueColumn: string;
726
- };
727
- }>;
301
+ }, z.core.$strip>], "type">;
302
+ }, z.core.$strip>;
728
303
 
729
304
  export { GenerateInsightParam }
730
305
 
@@ -742,7 +317,7 @@ declare type InfiniteDataTableUIProps = {
742
317
  totalRows: number;
743
318
  };
744
319
 
745
- export declare const logout: () => Promise<void>;
320
+ export declare const logout: () => void;
746
321
 
747
322
  export { MageMetricsClient }
748
323
 
@@ -774,16 +349,26 @@ declare type MageMetricsPublicContextProviderProps = PropsWithChildren<Pick<Mage
774
349
  export declare const ManagedModal: React.FC<ManagedModalProps>;
775
350
 
776
351
  declare interface ManagedModalProps extends ModalProps {
352
+ /** API key for authenticating with the MageMetrics service */
777
353
  apiKey: string;
354
+ /** External JWT token for user authentication */
778
355
  externalJwt: string;
356
+ /** Base URL for the MageMetrics API */
779
357
  apiUrl: string;
358
+ /** Whether to disable canvas functionality in conversations */
359
+ disableCanvas?: boolean;
360
+ /** Where to persist modal state (localStorage, queryParam, or none) */
780
361
  persist?: PersistenceOptions;
362
+ /** Custom component overrides for extending functionality */
781
363
  components?: Components;
782
364
  }
783
365
 
784
366
  declare interface ModalProps {
367
+ /** CSS display property for the wrapper element */
785
368
  display?: string;
369
+ /** Control modal visibility and close behavior externally */
786
370
  modal?: ControlledModalProps;
371
+ /** Configuration options for the start modal (chat launcher, recommendations, etc.) */
787
372
  startOptions?: StartOptions;
788
373
  }
789
374
 
@@ -816,13 +401,19 @@ export declare const StandaloneConversationModal: React.FC<StandaloneConversatio
816
401
  declare type StandaloneConversationModalProps = {
817
402
  opened: boolean;
818
403
  flowId: string;
404
+ disableCanvas?: boolean;
819
405
  onOpenChange?: (open: boolean) => void;
820
406
  };
821
407
 
822
408
  declare type StartOptions = DisplayControlProps & {
409
+ /** Label text displayed above the chat launcher input */
823
410
  label?: string;
411
+ /** Label text displayed above the recommendations section */
824
412
  recommendationsLabel?: string;
413
+ /** Placeholder text for the chat launcher input field */
825
414
  placeholder?: string;
415
+ /** Whether the chat launcher input should auto-focus on mount */
416
+ autoFocus?: boolean;
826
417
  };
827
418
 
828
419
  declare type TableFilters = Record<string, string | number>;
@@ -955,11 +546,15 @@ export declare const useDataReport: (reportId: FrontendReport["id"]) => {
955
546
  }[] | undefined;
956
547
  isPendingColumns: boolean;
957
548
  isPendingData: boolean;
958
- fetchNextPage: (options?: FetchNextPageOptions) => Promise<InfiniteQueryObserverResult<InfiniteData<Record<string, unknown>[], unknown>, Error>>;
549
+ fetchNextPage: (options?: FetchNextPageOptions) => Promise<InfiniteQueryObserverResult<InfiniteData< {
550
+ [key: string]: unknown;
551
+ }[], unknown>, Error>>;
959
552
  isFetching: boolean;
960
553
  isFetchingNextPage: boolean;
961
554
  hasNextPage: boolean;
962
- allData: Record<string, unknown>[];
555
+ allData: {
556
+ [key: string]: unknown;
557
+ }[];
963
558
  explainability: {
964
559
  sql_explanation?: {
965
560
  chunk_title: string;
@@ -1000,10 +595,14 @@ export declare const useDataReport: (reportId: FrontendReport["id"]) => {
1000
595
  flow_data_id: number;
1001
596
  } | null | undefined;
1002
597
  totalRows: number;
1003
- infiniteData: InfiniteData<Record<string, unknown>[], unknown> | undefined;
598
+ infiniteData: InfiniteData< {
599
+ [key: string]: unknown;
600
+ }[], unknown> | undefined;
1004
601
  };
1005
602
 
1006
- export declare const useDataReportColumnValue: (reportId: number, filters: ReportDataFilters) => UseQueryResult<Record<string, unknown>[], Error>;
603
+ export declare const useDataReportColumnValue: (reportId: number, filters: ReportDataFilters) => UseQueryResult< {
604
+ [key: string]: unknown;
605
+ }[], Error>;
1007
606
 
1008
607
  export declare const useDownloadReportData: (options?: UseMutationOptions<ExportReportDataResult, Error, ExportReportDataParams>) => {
1009
608
  download: UseMutateFunction<ExportReportDataResult, Error, ExportReportDataParams, unknown>;
@@ -1257,194 +856,50 @@ export declare const useRecentFlows: (limit?: number) => UseQueryResult< {
1257
856
 
1258
857
  declare type V1FrontendVisualization = z.output<typeof V1FrontendVisualizationSchema>;
1259
858
 
1260
- declare const V1FrontendVisualizationSchema: z.ZodObject<Omit<{
859
+ declare const V1FrontendVisualizationSchema: z.ZodObject<{
1261
860
  id: z.ZodNumber;
1262
- flow_data_id: z.ZodNumber;
1263
861
  created_at: z.ZodString;
1264
- sql: z.ZodString;
862
+ flow_data_id: z.ZodNumber;
1265
863
  bookmarked: z.ZodBoolean;
1266
- data_sample: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">;
1267
- is_sample: z.ZodBoolean;
1268
- data_summary: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1269
- } & {
1270
- configuration: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
864
+ configuration: z.ZodDiscriminatedUnion<[z.ZodObject<{
1271
865
  xAxisLabel: z.ZodString;
1272
866
  yAxisLabel: z.ZodString;
1273
867
  xAxisDataKey: z.ZodOptional<z.ZodString>;
1274
868
  yAxisDataKey: z.ZodOptional<z.ZodString>;
1275
869
  dimensionDataKey: z.ZodOptional<z.ZodString>;
1276
- valueColumns: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
870
+ valueColumns: z.ZodOptional<z.ZodArray<z.ZodString>>;
1277
871
  title: z.ZodString;
1278
872
  type: z.ZodLiteral<"bar">;
1279
- }, "strip", z.ZodTypeAny, {
1280
- type: "bar";
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: "bar";
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<{
873
+ }, z.core.$strip>, z.ZodObject<{
1298
874
  xAxisLabel: z.ZodString;
1299
875
  yAxisLabel: z.ZodString;
1300
876
  xAxisDataKey: z.ZodOptional<z.ZodString>;
1301
877
  yAxisDataKey: z.ZodOptional<z.ZodString>;
1302
878
  dimensionDataKey: z.ZodOptional<z.ZodString>;
1303
- valueColumns: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
879
+ valueColumns: z.ZodOptional<z.ZodArray<z.ZodString>>;
1304
880
  title: z.ZodString;
1305
881
  type: z.ZodLiteral<"line/area">;
1306
- }, "strip", z.ZodTypeAny, {
1307
- type: "line/area";
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: "line/area";
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<{
882
+ }, z.core.$strip>, z.ZodObject<{
1325
883
  xAxisLabel: z.ZodString;
1326
884
  yAxisLabel: z.ZodString;
1327
885
  xAxisDataKey: z.ZodOptional<z.ZodString>;
1328
886
  yAxisDataKey: z.ZodOptional<z.ZodString>;
1329
887
  dimensionDataKey: z.ZodOptional<z.ZodString>;
1330
- valueColumns: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
888
+ valueColumns: z.ZodOptional<z.ZodArray<z.ZodString>>;
1331
889
  title: z.ZodString;
1332
890
  type: z.ZodLiteral<"scatter">;
1333
- }, "strip", z.ZodTypeAny, {
1334
- type: "scatter";
1335
- title: string;
1336
- xAxisLabel: string;
1337
- yAxisLabel: string;
1338
- valueColumns?: string[] | undefined;
1339
- xAxisDataKey?: string | undefined;
1340
- yAxisDataKey?: string | undefined;
1341
- dimensionDataKey?: string | undefined;
1342
- }, {
1343
- type: "scatter";
1344
- title: string;
1345
- xAxisLabel: string;
1346
- yAxisLabel: string;
1347
- valueColumns?: string[] | undefined;
1348
- xAxisDataKey?: string | undefined;
1349
- yAxisDataKey?: string | undefined;
1350
- dimensionDataKey?: string | undefined;
1351
- }>, z.ZodObject<{
891
+ }, z.core.$strip>, z.ZodObject<{
1352
892
  nameKey: z.ZodString;
1353
893
  dataKey: z.ZodString;
1354
894
  title: z.ZodString;
1355
895
  type: z.ZodLiteral<"pie">;
1356
- }, "strip", z.ZodTypeAny, {
1357
- type: "pie";
1358
- title: string;
1359
- nameKey: string;
1360
- dataKey: string;
1361
- }, {
1362
- type: "pie";
1363
- title: string;
1364
- nameKey: string;
1365
- dataKey: string;
1366
- }>]>;
1367
- }, "sql" | "data_sample" | "is_sample" | "data_summary">, "strip", z.ZodTypeAny, {
1368
- id: number;
1369
- created_at: string;
1370
- flow_data_id: number;
1371
- bookmarked: boolean;
1372
- configuration: {
1373
- type: "bar";
1374
- title: string;
1375
- xAxisLabel: string;
1376
- yAxisLabel: string;
1377
- valueColumns?: string[] | undefined;
1378
- xAxisDataKey?: string | undefined;
1379
- yAxisDataKey?: string | undefined;
1380
- dimensionDataKey?: string | undefined;
1381
- } | {
1382
- type: "line/area";
1383
- title: string;
1384
- xAxisLabel: string;
1385
- yAxisLabel: string;
1386
- valueColumns?: string[] | undefined;
1387
- xAxisDataKey?: string | undefined;
1388
- yAxisDataKey?: string | undefined;
1389
- dimensionDataKey?: string | undefined;
1390
- } | {
1391
- type: "scatter";
1392
- title: string;
1393
- xAxisLabel: string;
1394
- yAxisLabel: string;
1395
- valueColumns?: string[] | undefined;
1396
- xAxisDataKey?: string | undefined;
1397
- yAxisDataKey?: string | undefined;
1398
- dimensionDataKey?: string | undefined;
1399
- } | {
1400
- type: "pie";
1401
- title: string;
1402
- nameKey: string;
1403
- dataKey: string;
1404
- };
1405
- }, {
1406
- id: number;
1407
- created_at: string;
1408
- flow_data_id: number;
1409
- bookmarked: boolean;
1410
- configuration: {
1411
- type: "bar";
1412
- title: string;
1413
- xAxisLabel: string;
1414
- yAxisLabel: string;
1415
- valueColumns?: string[] | undefined;
1416
- xAxisDataKey?: string | undefined;
1417
- yAxisDataKey?: string | undefined;
1418
- dimensionDataKey?: string | undefined;
1419
- } | {
1420
- type: "line/area";
1421
- title: string;
1422
- xAxisLabel: string;
1423
- yAxisLabel: string;
1424
- valueColumns?: string[] | undefined;
1425
- xAxisDataKey?: string | undefined;
1426
- yAxisDataKey?: string | undefined;
1427
- dimensionDataKey?: string | undefined;
1428
- } | {
1429
- type: "scatter";
1430
- title: string;
1431
- xAxisLabel: string;
1432
- yAxisLabel: string;
1433
- valueColumns?: string[] | undefined;
1434
- xAxisDataKey?: string | undefined;
1435
- yAxisDataKey?: string | undefined;
1436
- dimensionDataKey?: string | undefined;
1437
- } | {
1438
- type: "pie";
1439
- title: string;
1440
- nameKey: string;
1441
- dataKey: string;
1442
- };
1443
- }>;
896
+ }, z.core.$strip>], "type">;
897
+ }, z.core.$strip>;
1444
898
 
1445
899
  export declare const Visualization: ForwardRefExoticComponent< {
1446
900
  visualizationId: number;
1447
901
  withTitle: boolean;
902
+ exportingEnabled?: boolean;
1448
903
  } & RefAttributes<HTMLDivElement>>;
1449
904
 
1450
905
  export { }