@magemetrics/ai 0.9.1 → 0.10.0-rc2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/react/ai.js +11127 -11431
- package/dist/react/index.d.ts +185 -488
- package/dist/styles.css +1 -1
- package/dist/web-component/index.d.ts +185 -488
- package/dist/web-component/web-component.es.js +40462 -41331
- package/package.json +6 -6
package/dist/react/index.d.ts
CHANGED
|
@@ -1,22 +1,30 @@
|
|
|
1
1
|
import { AuthProvider } from '@magemetrics/core';
|
|
2
2
|
import { AuthState } from '@magemetrics/core';
|
|
3
|
+
import { Components } from './shared/context/MageMetricsContext';
|
|
4
|
+
import { Components as Components_2 } from '../shared/context/MageMetricsContext';
|
|
5
|
+
import { Components as Components_3 } from './MageMetricsContext';
|
|
3
6
|
import { CreateFlowParam } from '@magemetrics/core';
|
|
4
7
|
import { default as default_2 } from 'react';
|
|
5
8
|
import { DirectAuthProvider } from '@magemetrics/core';
|
|
6
|
-
import { Dispatch } from 'react';
|
|
7
9
|
import { ExternalAuthProvider } from '@magemetrics/core';
|
|
8
10
|
import { ExternalAuthProviderConfig } from '@magemetrics/core';
|
|
9
11
|
import { FetchNextPageOptions } from '@tanstack/react-query';
|
|
10
12
|
import { ForwardRefExoticComponent } from 'react';
|
|
11
13
|
import { InfiniteData } from '@tanstack/react-query';
|
|
12
14
|
import { InfiniteQueryObserverResult } from '@tanstack/react-query';
|
|
15
|
+
import { JSX } from 'react/jsx-runtime';
|
|
13
16
|
import { MageMetricsClient } from '@magemetrics/core';
|
|
14
17
|
import { MageMetricsClientConfig } from '@magemetrics/core';
|
|
15
|
-
import {
|
|
18
|
+
import { MageMetricsContextProvider } from './shared/context/MageMetricsContext';
|
|
19
|
+
import { MageMetricsContextProviderProps } from './shared/context/MageMetricsContext';
|
|
20
|
+
import { PersistenceOptions } from '../shared/context/MageMetricsContext';
|
|
16
21
|
import { PropsWithChildren } from 'react';
|
|
22
|
+
import { QueryObserverResult } from '@tanstack/react-query';
|
|
17
23
|
import { RefAttributes } from 'react';
|
|
18
|
-
import {
|
|
24
|
+
import { RefetchOptions } from '@tanstack/react-query';
|
|
19
25
|
import { SortingState as SortingState_2 } from '@tanstack/react-table';
|
|
26
|
+
import { useMageMetricsClient } from './shared/context/MageMetricsContext';
|
|
27
|
+
import { useMageMetricsReady } from './shared/context/MageMetricsContext';
|
|
20
28
|
import { UseMutateAsyncFunction } from '@tanstack/react-query';
|
|
21
29
|
import { UseMutateFunction } from '@tanstack/react-query';
|
|
22
30
|
import { UseMutationOptions } from '@tanstack/react-query';
|
|
@@ -120,38 +128,7 @@ declare interface ColumnSort {
|
|
|
120
128
|
id: string;
|
|
121
129
|
}
|
|
122
130
|
|
|
123
|
-
export
|
|
124
|
-
dataTableCells?: {
|
|
125
|
-
empty?: (props: CellContentProps) => default_2.ReactNode;
|
|
126
|
-
units?: {
|
|
127
|
-
[key: string]: (props: CellContentProps) => default_2.ReactNode;
|
|
128
|
-
};
|
|
129
|
-
renderTypes?: {
|
|
130
|
-
[key: string]: (props: CellContentProps) => default_2.ReactNode;
|
|
131
|
-
};
|
|
132
|
-
};
|
|
133
|
-
dataReportTable?: (props: DataReportMessageProps) => default_2.ReactNode;
|
|
134
|
-
dataReportMessageActions?: (props: {
|
|
135
|
-
report: FrontendReport;
|
|
136
|
-
isSelected: boolean;
|
|
137
|
-
}) => default_2.ReactNode;
|
|
138
|
-
visualizationMessageActions?: (props: {
|
|
139
|
-
visualization: FrontendVisualization | V1FrontendVisualization;
|
|
140
|
-
isSelected: boolean;
|
|
141
|
-
}) => default_2.ReactNode;
|
|
142
|
-
dataReportPanelActions?: (props: {
|
|
143
|
-
report: FrontendReport;
|
|
144
|
-
}) => default_2.ReactNode;
|
|
145
|
-
visualizationPanelActions?: (props: {
|
|
146
|
-
visualization: FrontendVisualization | V1FrontendVisualization;
|
|
147
|
-
}) => default_2.ReactNode;
|
|
148
|
-
avatar?: default_2.ReactNode;
|
|
149
|
-
getCanvasShareableLink?: (canvasId: string) => string;
|
|
150
|
-
canvasPanelActions?: (props: {
|
|
151
|
-
canvas: FrontendCanvas;
|
|
152
|
-
flowId: string;
|
|
153
|
-
}) => default_2.ReactNode;
|
|
154
|
-
}
|
|
131
|
+
export { Components }
|
|
155
132
|
|
|
156
133
|
export declare const ConfigurableChat: ConfigurableChatComponent;
|
|
157
134
|
|
|
@@ -178,8 +155,6 @@ declare type ControlledModalProps = {
|
|
|
178
155
|
onClose: () => void;
|
|
179
156
|
};
|
|
180
157
|
|
|
181
|
-
export declare const ConversationContent: React.FC<ConversationContentProps>;
|
|
182
|
-
|
|
183
158
|
declare interface ConversationContentProps {
|
|
184
159
|
flowId?: string;
|
|
185
160
|
className?: string;
|
|
@@ -192,44 +167,13 @@ declare interface ConversationContentProps {
|
|
|
192
167
|
|
|
193
168
|
export { CreateFlowParam }
|
|
194
169
|
|
|
195
|
-
|
|
196
|
-
* This component is not bounded in height and must be wrapped in a container to properly work
|
|
197
|
-
* @param props - props
|
|
198
|
-
* @param props.reportId - The ID of the report to display
|
|
199
|
-
* @param props.initialState - The initial state of data table
|
|
200
|
-
* @param props.onStateChange - Callback function to handle state changes
|
|
201
|
-
* @returns JSX.Element
|
|
202
|
-
*/
|
|
203
|
-
export declare const DataReport: React.FC<{
|
|
204
|
-
reportId: number;
|
|
205
|
-
initialState?: DataTableState;
|
|
206
|
-
onStateChange?: (state: DataTableState) => void;
|
|
207
|
-
}>;
|
|
208
|
-
|
|
209
|
-
export declare interface DataReportMessageProps {
|
|
210
|
-
report: FrontendReport;
|
|
211
|
-
explainability: FrontendReportExplainability | null | undefined;
|
|
212
|
-
infiniteData: {
|
|
213
|
-
data?: {
|
|
214
|
-
pages: Record<string, unknown>[][];
|
|
215
|
-
};
|
|
216
|
-
isPending: boolean;
|
|
217
|
-
fetchNextPage: () => Promise<unknown>;
|
|
218
|
-
isFetching: boolean;
|
|
219
|
-
isFetchingNextPage: boolean;
|
|
220
|
-
hasNextPage: boolean | undefined;
|
|
221
|
-
};
|
|
222
|
-
columns: FrontendReportColumns;
|
|
223
|
-
totalRows: number;
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
export declare const DataTable: React.FC<DataReportMessageProps>;
|
|
170
|
+
export declare const DataTable: () => JSX.Element;
|
|
227
171
|
|
|
228
172
|
declare type DataTableState = {
|
|
229
|
-
pageIndex
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
173
|
+
pageIndex?: number;
|
|
174
|
+
sorting?: SortingState;
|
|
175
|
+
filters?: TableFilters;
|
|
176
|
+
pageSize?: number;
|
|
233
177
|
};
|
|
234
178
|
|
|
235
179
|
export { DirectAuthProvider }
|
|
@@ -247,10 +191,6 @@ export declare const DomWrapper: React.FC<PropsWithChildren<DomWrapperProps>>;
|
|
|
247
191
|
|
|
248
192
|
declare type DomWrapperProps = InternalColorSwatchProps;
|
|
249
193
|
|
|
250
|
-
export declare const DownloadDataReportButton: React.FC<{
|
|
251
|
-
reportId: number;
|
|
252
|
-
}>;
|
|
253
|
-
|
|
254
194
|
declare type ExportReportDataParams = {
|
|
255
195
|
reportId: number;
|
|
256
196
|
filename?: string;
|
|
@@ -296,93 +236,17 @@ declare type FormattedData = {
|
|
|
296
236
|
declare type FrontendCanvas = z.infer<typeof FrontendCanvasSchema>;
|
|
297
237
|
|
|
298
238
|
declare const FrontendCanvasSchema: z.ZodObject<{
|
|
299
|
-
title: z.ZodNullable<z.ZodString>;
|
|
300
239
|
id: z.ZodUUID;
|
|
240
|
+
title: z.ZodNullable<z.ZodString>;
|
|
301
241
|
nodes: z.ZodArray<z.ZodAny>;
|
|
302
242
|
edges: z.ZodArray<z.ZodAny>;
|
|
303
243
|
is_public: z.ZodBoolean;
|
|
304
244
|
}, z.core.$strip>;
|
|
305
245
|
|
|
306
|
-
declare type FrontendReport = z.infer<typeof FrontendReportSchema>;
|
|
307
|
-
|
|
308
|
-
declare type FrontendReportColumns = z.infer<typeof FrontendReportColumnsSchema>;
|
|
309
|
-
|
|
310
|
-
declare const FrontendReportColumnsSchema: z.ZodArray<z.ZodObject<{
|
|
311
|
-
dataType: z.ZodString;
|
|
312
|
-
renderType: z.ZodOptional<z.ZodString>;
|
|
313
|
-
unit: z.ZodOptional<z.ZodString>;
|
|
314
|
-
canonicalDataType: z.ZodOptional<z.ZodEnum<{
|
|
315
|
-
boolean: "boolean";
|
|
316
|
-
array: "array";
|
|
317
|
-
text: "text";
|
|
318
|
-
json: "json";
|
|
319
|
-
other: "other";
|
|
320
|
-
datetime: "datetime";
|
|
321
|
-
numeric: "numeric";
|
|
322
|
-
}>>;
|
|
323
|
-
name: z.ZodString;
|
|
324
|
-
data_type: z.ZodString;
|
|
325
|
-
}, z.core.$strip>>;
|
|
326
|
-
|
|
327
|
-
declare type FrontendReportExplainability = z.infer<typeof FrontendReportExplainabilitySchema>;
|
|
328
|
-
|
|
329
|
-
declare const FrontendReportExplainabilitySchema: z.ZodObject<{
|
|
330
|
-
confidence_score: z.ZodNumber;
|
|
331
|
-
confidence_score_reason: z.ZodString;
|
|
332
|
-
assumptions_score: z.ZodOptional<z.ZodNumber>;
|
|
333
|
-
assumptions_score_reason: z.ZodOptional<z.ZodString>;
|
|
334
|
-
friendliness_score: z.ZodOptional<z.ZodNumber>;
|
|
335
|
-
friendliness_score_reason: z.ZodOptional<z.ZodString>;
|
|
336
|
-
columns_lineage: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
337
|
-
nodes: z.ZodArray<z.ZodObject<{
|
|
338
|
-
id: z.ZodString;
|
|
339
|
-
type: z.ZodEnum<{
|
|
340
|
-
result: "result";
|
|
341
|
-
filter: "filter";
|
|
342
|
-
entity: "entity";
|
|
343
|
-
attribute: "attribute";
|
|
344
|
-
process: "process";
|
|
345
|
-
combine: "combine";
|
|
346
|
-
}>;
|
|
347
|
-
explanation: z.ZodString;
|
|
348
|
-
}, z.core.$strip>>;
|
|
349
|
-
edges: z.ZodArray<z.ZodObject<{
|
|
350
|
-
source: z.ZodString;
|
|
351
|
-
target: z.ZodString;
|
|
352
|
-
}, z.core.$strip>>;
|
|
353
|
-
}, z.core.$strip>>>>;
|
|
354
|
-
sql_explanation: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
355
|
-
chunk_title: z.ZodString;
|
|
356
|
-
chunk_explanation: z.ZodString;
|
|
357
|
-
lines: z.ZodArray<z.ZodObject<{
|
|
358
|
-
sql: z.ZodString;
|
|
359
|
-
explanation: z.ZodString;
|
|
360
|
-
}, z.core.$strip>>;
|
|
361
|
-
}, z.core.$strip>>>>;
|
|
362
|
-
business_explanation: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
363
|
-
summary: z.ZodString;
|
|
364
|
-
implementation: z.ZodArray<z.ZodString>;
|
|
365
|
-
assumptions: z.ZodArray<z.ZodObject<{
|
|
366
|
-
type: z.ZodEnum<{
|
|
367
|
-
grain: "grain";
|
|
368
|
-
completeness: "completeness";
|
|
369
|
-
transformation: "transformation";
|
|
370
|
-
relationship: "relationship";
|
|
371
|
-
other: "other";
|
|
372
|
-
}>;
|
|
373
|
-
details: z.ZodString;
|
|
374
|
-
explanation: z.ZodString;
|
|
375
|
-
}, z.core.$strip>>;
|
|
376
|
-
}, z.core.$strip>>>;
|
|
377
|
-
flow_data_id: z.ZodNumber;
|
|
378
|
-
output_dataset: z.ZodOptional<z.ZodString>;
|
|
379
|
-
sql: z.ZodOptional<z.ZodString>;
|
|
380
|
-
}, z.core.$strip>;
|
|
381
|
-
|
|
382
246
|
declare const FrontendReportSchema: z.ZodObject<{
|
|
383
247
|
status: z.ZodNullable<z.ZodString>;
|
|
384
|
-
title: z.ZodString;
|
|
385
248
|
id: z.ZodNumber;
|
|
249
|
+
title: z.ZodString;
|
|
386
250
|
request: z.ZodNullable<z.ZodString>;
|
|
387
251
|
created_at: z.ZodString;
|
|
388
252
|
data_summary: z.ZodObject<{
|
|
@@ -417,79 +281,6 @@ declare const FrontendReportSchema: z.ZodObject<{
|
|
|
417
281
|
bookmarked: z.ZodBoolean;
|
|
418
282
|
}, z.core.$strip>;
|
|
419
283
|
|
|
420
|
-
declare type FrontendVisualization = z.output<typeof FrontendVisualizationSchema>;
|
|
421
|
-
|
|
422
|
-
declare const FrontendVisualizationSchema: z.ZodObject<{
|
|
423
|
-
id: z.ZodNumber;
|
|
424
|
-
configuration: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
425
|
-
config_version: z.ZodLiteral<2>;
|
|
426
|
-
xAxisLabel: z.ZodString;
|
|
427
|
-
yAxisLabel: z.ZodString;
|
|
428
|
-
categoryColumn: z.ZodString;
|
|
429
|
-
secondaryCategoryColumn: z.ZodOptional<z.ZodString>;
|
|
430
|
-
valueColumn: z.ZodString;
|
|
431
|
-
title: z.ZodString;
|
|
432
|
-
type: z.ZodLiteral<"bar">;
|
|
433
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
434
|
-
xAxisColumn: z.ZodString;
|
|
435
|
-
valueColumns: z.ZodArray<z.ZodString>;
|
|
436
|
-
yAxisLabels: z.ZodArray<z.ZodString>;
|
|
437
|
-
title: z.ZodString;
|
|
438
|
-
type: z.ZodLiteral<"line/area">;
|
|
439
|
-
config_version: z.ZodLiteral<2>;
|
|
440
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
441
|
-
config_version: z.ZodLiteral<2>;
|
|
442
|
-
valueColumn: z.ZodString;
|
|
443
|
-
xAxisColumn: z.ZodString;
|
|
444
|
-
xAxisLabel: z.ZodString;
|
|
445
|
-
yAxisLabel: z.ZodString;
|
|
446
|
-
categoryColumn: z.ZodString;
|
|
447
|
-
title: z.ZodString;
|
|
448
|
-
type: z.ZodLiteral<"line/area-categorical">;
|
|
449
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
450
|
-
config_version: z.ZodLiteral<2>;
|
|
451
|
-
xAxisLabel: z.ZodString;
|
|
452
|
-
yAxisLabel: z.ZodString;
|
|
453
|
-
xAxisValueColumn: z.ZodString;
|
|
454
|
-
yAxisValueColumn: z.ZodString;
|
|
455
|
-
title: z.ZodString;
|
|
456
|
-
type: z.ZodLiteral<"scatter">;
|
|
457
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
458
|
-
config_version: z.ZodLiteral<2>;
|
|
459
|
-
categoryColumn: z.ZodString;
|
|
460
|
-
valueColumn: z.ZodString;
|
|
461
|
-
title: z.ZodString;
|
|
462
|
-
type: z.ZodLiteral<"pie">;
|
|
463
|
-
}, z.core.$strip>], "type">;
|
|
464
|
-
created_at: z.ZodString;
|
|
465
|
-
bookmarked: z.ZodBoolean;
|
|
466
|
-
flow_data_id: z.ZodNumber;
|
|
467
|
-
flow_data: z.ZodOptional<z.ZodObject<{
|
|
468
|
-
is_materialized: z.ZodNullable<z.ZodBoolean>;
|
|
469
|
-
last_materialized_at: z.ZodNullable<z.ZodString>;
|
|
470
|
-
materialized_error_message: z.ZodNullable<z.ZodString>;
|
|
471
|
-
materialized_status: z.ZodNullable<z.ZodEnum<{
|
|
472
|
-
running: "running";
|
|
473
|
-
completed: "completed";
|
|
474
|
-
failed: "failed";
|
|
475
|
-
}>>;
|
|
476
|
-
}, z.core.$strip>>;
|
|
477
|
-
}, z.core.$strip>;
|
|
478
|
-
|
|
479
|
-
export declare const InfiniteDataTableUI: React.FC<InfiniteDataTableUIProps>;
|
|
480
|
-
|
|
481
|
-
declare type InfiniteDataTableUIProps = {
|
|
482
|
-
flowDataId: number;
|
|
483
|
-
data: Record<string, unknown>[];
|
|
484
|
-
columns: FrontendReportColumns;
|
|
485
|
-
explainability: FrontendReportExplainability | null | undefined;
|
|
486
|
-
hasNextPage: boolean | undefined;
|
|
487
|
-
fetchNextPage: () => Promise<unknown>;
|
|
488
|
-
isFetchingNextPage: boolean;
|
|
489
|
-
isFetching: boolean;
|
|
490
|
-
totalRows: number;
|
|
491
|
-
};
|
|
492
|
-
|
|
493
284
|
declare const InputContainer: default_2.FC<{
|
|
494
285
|
children?: default_2.ReactNode | ((context: ChatInputContextValue) => default_2.ReactNode);
|
|
495
286
|
}>;
|
|
@@ -511,28 +302,14 @@ export { MageMetricsClient }
|
|
|
511
302
|
|
|
512
303
|
export { MageMetricsClientConfig }
|
|
513
304
|
|
|
514
|
-
export
|
|
515
|
-
|
|
516
|
-
export
|
|
517
|
-
children: default_2.ReactNode;
|
|
518
|
-
components?: Components;
|
|
519
|
-
} & ({
|
|
520
|
-
/** Provide an external MageMetricsClient instance. */
|
|
521
|
-
client: MageMetricsClient;
|
|
522
|
-
apiKey?: never;
|
|
523
|
-
apiUrl?: never;
|
|
524
|
-
externalJwt?: never;
|
|
525
|
-
additionalHeaders?: never;
|
|
526
|
-
applicationName?: never;
|
|
527
|
-
} | ({
|
|
528
|
-
/** Configuration to create a new MageMetricsClient. */
|
|
529
|
-
client?: never;
|
|
530
|
-
} & MageMetricsClientConfig));
|
|
305
|
+
export { MageMetricsContextProvider }
|
|
306
|
+
|
|
307
|
+
export { MageMetricsContextProviderProps }
|
|
531
308
|
|
|
532
309
|
export declare const MageMetricsPublicContextProvider: React.FC<MageMetricsPublicContextProviderProps>;
|
|
533
310
|
|
|
534
311
|
declare type MageMetricsPublicContextProviderProps = PropsWithChildren<Pick<MageMetricsClientConfig, "apiUrl" | "apiKey"> & {
|
|
535
|
-
components?:
|
|
312
|
+
components?: Components_3;
|
|
536
313
|
}>;
|
|
537
314
|
|
|
538
315
|
export declare const ManagedModal: React.FC<ManagedModalProps>;
|
|
@@ -551,7 +328,7 @@ declare type ManagedModalBaseProps = ModalProps & {
|
|
|
551
328
|
/** Where to persist modal state (localStorage, queryParam, or none) */
|
|
552
329
|
persist?: PersistenceOptions;
|
|
553
330
|
/** Custom component overrides for extending functionality */
|
|
554
|
-
components?:
|
|
331
|
+
components?: Components_2;
|
|
555
332
|
/** Application name to associate with flows created through this modal */
|
|
556
333
|
applicationName?: string;
|
|
557
334
|
/**
|
|
@@ -595,39 +372,6 @@ declare interface ModalProps {
|
|
|
595
372
|
startOptions?: StartOptions;
|
|
596
373
|
}
|
|
597
374
|
|
|
598
|
-
export declare const PaginatedDataTableUI: React.FC<PaginatedDataTableUIProps>;
|
|
599
|
-
|
|
600
|
-
declare type PaginatedDataTableUIProps = {
|
|
601
|
-
reportId: number;
|
|
602
|
-
data: Record<string, unknown>[];
|
|
603
|
-
columns: FrontendReportColumns;
|
|
604
|
-
explainability: FrontendReportExplainability | null | undefined;
|
|
605
|
-
isFetching: boolean;
|
|
606
|
-
totalRows?: number;
|
|
607
|
-
pageIndex: number;
|
|
608
|
-
pageSize: number;
|
|
609
|
-
totalPages?: number;
|
|
610
|
-
hasNextPage: boolean;
|
|
611
|
-
hasPreviousPage: boolean;
|
|
612
|
-
onNextPage: () => void;
|
|
613
|
-
onPreviousPage: () => void;
|
|
614
|
-
goToPage: (page: number) => void;
|
|
615
|
-
sorting: SortingState;
|
|
616
|
-
onSortingChange: OnChangeFn<SortingState>;
|
|
617
|
-
filters: TableFilters;
|
|
618
|
-
onFiltersChange: (filters: TableFilters) => void;
|
|
619
|
-
onCalculatedPageSize?: (pageSize: number) => void;
|
|
620
|
-
onStateChange?: (state: {
|
|
621
|
-
pageIndex: number;
|
|
622
|
-
pageSize: number;
|
|
623
|
-
sorting: SortingState;
|
|
624
|
-
filters: TableFilters;
|
|
625
|
-
}) => void;
|
|
626
|
-
emptyState?: React.ReactNode;
|
|
627
|
-
};
|
|
628
|
-
|
|
629
|
-
declare type PersistenceOptions = "queryParam" | "none";
|
|
630
|
-
|
|
631
375
|
/**
|
|
632
376
|
* Primary color shade stops used in the UI.
|
|
633
377
|
*/
|
|
@@ -666,21 +410,8 @@ export declare type PublicChatProps = Omit<ConversationContentProps, "children">
|
|
|
666
410
|
appearance?: AppearanceConfig;
|
|
667
411
|
};
|
|
668
412
|
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
* @param props - props
|
|
672
|
-
* @param props.canvasId - The ID of the canvas to display
|
|
673
|
-
* @param props.reportId - The ID of the report to display
|
|
674
|
-
* @param props.initialState - The initial state of data table
|
|
675
|
-
* @param props.onStateChange - Callback function to handle state changes
|
|
676
|
-
* @returns JSX.Element
|
|
677
|
-
*/
|
|
678
|
-
export declare const PublicDataReport: React.FC<{
|
|
679
|
-
canvasId: string;
|
|
680
|
-
reportId: number;
|
|
681
|
-
initialState?: DataTableState;
|
|
682
|
-
onStateChange?: (state: DataTableState) => void;
|
|
683
|
-
}>;
|
|
413
|
+
declare type Report_2 = z.infer<typeof FrontendReportSchema>;
|
|
414
|
+
export { Report_2 as Report }
|
|
684
415
|
|
|
685
416
|
declare type ReportDataFilters = {
|
|
686
417
|
columns?: string[];
|
|
@@ -727,6 +458,20 @@ declare type StandaloneConversationModalProps = {
|
|
|
727
458
|
appearance?: AppearanceConfig;
|
|
728
459
|
};
|
|
729
460
|
|
|
461
|
+
/**
|
|
462
|
+
* This component is not bounded in height and must be wrapped in a container to properly work
|
|
463
|
+
* @param props - props
|
|
464
|
+
* @param props.report - The report to display
|
|
465
|
+
* @param props.initialState - Initial state for the report
|
|
466
|
+
* @param props.onStateChange - Callback function to handle state changes
|
|
467
|
+
* @returns JSX.Element
|
|
468
|
+
*/
|
|
469
|
+
export declare const StandaloneDataTable: React.FC<{
|
|
470
|
+
report: Report_2;
|
|
471
|
+
initialState?: DataTableState;
|
|
472
|
+
onStateChange?: (state: DataTableState) => void;
|
|
473
|
+
}>;
|
|
474
|
+
|
|
730
475
|
declare type StartOptions = DisplayControlProps & {
|
|
731
476
|
/** Label text displayed above the chat launcher input */
|
|
732
477
|
label?: string;
|
|
@@ -744,14 +489,14 @@ declare type TableFilterValue = z.infer<typeof TableFilterValueSchema>;
|
|
|
744
489
|
|
|
745
490
|
declare const TableFilterValueSchema: z.ZodObject<{
|
|
746
491
|
operator: z.ZodEnum<{
|
|
747
|
-
endsWith: "endsWith";
|
|
748
|
-
startsWith: "startsWith";
|
|
749
492
|
contains: "contains";
|
|
750
493
|
eq: "eq";
|
|
751
494
|
gt: "gt";
|
|
752
495
|
gte: "gte";
|
|
753
496
|
lt: "lt";
|
|
754
497
|
lte: "lte";
|
|
498
|
+
endsWith: "endsWith";
|
|
499
|
+
startsWith: "startsWith";
|
|
755
500
|
neq: "neq";
|
|
756
501
|
regex: "regex";
|
|
757
502
|
between: "between";
|
|
@@ -773,8 +518,8 @@ declare const TableFilterValueSchema: z.ZodObject<{
|
|
|
773
518
|
* ```
|
|
774
519
|
*/
|
|
775
520
|
export declare const useCanvas: (canvasId: string | undefined | null, options?: Omit<UseQueryOptions<FrontendCanvas, unknown>, "queryKey" | "queryFn">) => UseQueryResult< {
|
|
776
|
-
title: string | null;
|
|
777
521
|
id: string;
|
|
522
|
+
title: string | null;
|
|
778
523
|
nodes: any[];
|
|
779
524
|
edges: any[];
|
|
780
525
|
is_public: boolean;
|
|
@@ -902,7 +647,52 @@ export declare const useCreateFlow: (options?: UseMutationOptions<{
|
|
|
902
647
|
}, Error, CreateFlowParam, unknown>;
|
|
903
648
|
};
|
|
904
649
|
|
|
905
|
-
export declare const
|
|
650
|
+
export declare const useDataReportColumnValue: (reportId: number, filters: ReportDataFilters) => UseQueryResult< {
|
|
651
|
+
[key: string]: unknown;
|
|
652
|
+
}[], Error>;
|
|
653
|
+
|
|
654
|
+
export declare const useDataTableContext: () => {
|
|
655
|
+
report: {
|
|
656
|
+
status: string | null;
|
|
657
|
+
id: number;
|
|
658
|
+
title: string;
|
|
659
|
+
request: string | null;
|
|
660
|
+
created_at: string;
|
|
661
|
+
data_summary: {
|
|
662
|
+
[x: string]: unknown;
|
|
663
|
+
columns: Record<string, {
|
|
664
|
+
[x: string]: unknown;
|
|
665
|
+
data_type: string;
|
|
666
|
+
null_count: number | null;
|
|
667
|
+
unique_count: number | null;
|
|
668
|
+
unique_percentage: number | null;
|
|
669
|
+
position?: number | undefined;
|
|
670
|
+
min_value?: number | null | undefined;
|
|
671
|
+
max_value?: number | null | undefined;
|
|
672
|
+
avg_value?: number | null | undefined;
|
|
673
|
+
median_value?: number | null | undefined;
|
|
674
|
+
std_value?: number | null | undefined;
|
|
675
|
+
min_date?: string | null | undefined;
|
|
676
|
+
max_date?: string | null | undefined;
|
|
677
|
+
min_length?: number | null | undefined;
|
|
678
|
+
max_length?: number | null | undefined;
|
|
679
|
+
avg_length?: number | null | undefined;
|
|
680
|
+
}>;
|
|
681
|
+
};
|
|
682
|
+
is_removed: boolean;
|
|
683
|
+
flow_id: string;
|
|
684
|
+
is_materialized: boolean | null;
|
|
685
|
+
last_materialized_at: string | null;
|
|
686
|
+
materialized_error_message: string | null;
|
|
687
|
+
materialized_status: "completed" | "running" | "failed" | null;
|
|
688
|
+
bookmarked: boolean;
|
|
689
|
+
};
|
|
690
|
+
fetchNextPage: (options?: FetchNextPageOptions) => Promise<InfiniteQueryObserverResult<InfiniteData< {
|
|
691
|
+
[key: string]: unknown;
|
|
692
|
+
}[], unknown>, Error>>;
|
|
693
|
+
pages: {
|
|
694
|
+
[key: string]: unknown;
|
|
695
|
+
}[][] | undefined;
|
|
906
696
|
columns: {
|
|
907
697
|
name: string;
|
|
908
698
|
data_type: string;
|
|
@@ -912,67 +702,15 @@ export declare const useDataReport: (reportId: FrontendReport["id"]) => {
|
|
|
912
702
|
canonicalDataType?: "numeric" | "boolean" | "datetime" | "text" | "array" | "json" | "other";
|
|
913
703
|
}[] | undefined;
|
|
914
704
|
isPendingColumns: boolean;
|
|
915
|
-
|
|
916
|
-
fetchNextPage: (options?: FetchNextPageOptions) => Promise<InfiniteQueryObserverResult<InfiniteData< {
|
|
917
|
-
[key: string]: unknown;
|
|
918
|
-
}[], unknown>, Error>>;
|
|
705
|
+
hasMoreData: boolean;
|
|
919
706
|
isFetching: boolean;
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
explainability: {
|
|
926
|
-
sql_explanation?: {
|
|
927
|
-
chunk_title: string;
|
|
928
|
-
chunk_explanation: string;
|
|
929
|
-
lines: {
|
|
930
|
-
sql: string;
|
|
931
|
-
explanation: string;
|
|
932
|
-
}[];
|
|
933
|
-
}[] | null;
|
|
934
|
-
business_explanation?: {
|
|
935
|
-
summary: string;
|
|
936
|
-
implementation: string[];
|
|
937
|
-
assumptions: {
|
|
938
|
-
type: "grain" | "completeness" | "transformation" | "relationship" | "other";
|
|
939
|
-
details: string;
|
|
940
|
-
explanation: string;
|
|
941
|
-
}[];
|
|
942
|
-
} | null;
|
|
943
|
-
columns_lineage?: {
|
|
944
|
-
[key: string]: {
|
|
945
|
-
nodes: {
|
|
946
|
-
id: string;
|
|
947
|
-
type: "entity" | "attribute" | "filter" | "process" | "combine" | "result";
|
|
948
|
-
explanation: string;
|
|
949
|
-
}[];
|
|
950
|
-
edges: {
|
|
951
|
-
source: string;
|
|
952
|
-
target: string;
|
|
953
|
-
}[];
|
|
954
|
-
};
|
|
955
|
-
} | null;
|
|
956
|
-
confidence_score: number;
|
|
957
|
-
confidence_score_reason: string;
|
|
958
|
-
assumptions_score?: number;
|
|
959
|
-
assumptions_score_reason?: string;
|
|
960
|
-
friendliness_score?: number;
|
|
961
|
-
friendliness_score_reason?: string;
|
|
962
|
-
flow_data_id: number;
|
|
963
|
-
output_dataset?: string;
|
|
964
|
-
sql?: string;
|
|
965
|
-
} | null | undefined;
|
|
966
|
-
totalRows: number;
|
|
967
|
-
infiniteData: InfiniteData< {
|
|
968
|
-
[key: string]: unknown;
|
|
969
|
-
}[], unknown> | undefined;
|
|
707
|
+
isPendingData: boolean;
|
|
708
|
+
totalRows: number | undefined;
|
|
709
|
+
totalPages: number | undefined;
|
|
710
|
+
sorting: SortingState_2;
|
|
711
|
+
filters: TableFilters;
|
|
970
712
|
};
|
|
971
713
|
|
|
972
|
-
export declare const useDataReportColumnValue: (reportId: number, filters: ReportDataFilters) => UseQueryResult< {
|
|
973
|
-
[key: string]: unknown;
|
|
974
|
-
}[], Error>;
|
|
975
|
-
|
|
976
714
|
export declare const useDownloadReportData: (options?: UseMutationOptions<ExportReportDataResult, Error, ExportReportDataParams>) => {
|
|
977
715
|
download: UseMutateFunction<ExportReportDataResult, Error, ExportReportDataParams, unknown>;
|
|
978
716
|
data: undefined;
|
|
@@ -1049,148 +787,107 @@ export declare const useDownloadReportData: (options?: UseMutationOptions<Export
|
|
|
1049
787
|
|
|
1050
788
|
export declare const useMageMetricsApiUrl: () => string;
|
|
1051
789
|
|
|
1052
|
-
export
|
|
790
|
+
export { useMageMetricsClient }
|
|
1053
791
|
|
|
1054
|
-
export
|
|
1055
|
-
|
|
1056
|
-
export declare const usePaginatedDataReport: (reportId: FrontendReport["id"], options?: {
|
|
1057
|
-
pageSize?: number;
|
|
1058
|
-
initialPageIndex?: number;
|
|
1059
|
-
initialSorting?: SortingState_2;
|
|
1060
|
-
initialFilters?: TableFilters;
|
|
1061
|
-
}) => {
|
|
1062
|
-
columns: {
|
|
1063
|
-
name: string;
|
|
1064
|
-
data_type: string;
|
|
1065
|
-
dataType: string;
|
|
1066
|
-
renderType?: string;
|
|
1067
|
-
unit?: string;
|
|
1068
|
-
canonicalDataType?: "numeric" | "boolean" | "datetime" | "text" | "array" | "json" | "other";
|
|
1069
|
-
}[] | undefined;
|
|
1070
|
-
isPendingColumns: boolean;
|
|
1071
|
-
isPendingData: boolean;
|
|
1072
|
-
isFetching: boolean;
|
|
1073
|
-
data: {
|
|
1074
|
-
[key: string]: unknown;
|
|
1075
|
-
}[];
|
|
1076
|
-
explainability: {
|
|
1077
|
-
sql_explanation?: {
|
|
1078
|
-
chunk_title: string;
|
|
1079
|
-
chunk_explanation: string;
|
|
1080
|
-
lines: {
|
|
1081
|
-
sql: string;
|
|
1082
|
-
explanation: string;
|
|
1083
|
-
}[];
|
|
1084
|
-
}[] | null;
|
|
1085
|
-
business_explanation?: {
|
|
1086
|
-
summary: string;
|
|
1087
|
-
implementation: string[];
|
|
1088
|
-
assumptions: {
|
|
1089
|
-
type: "grain" | "completeness" | "transformation" | "relationship" | "other";
|
|
1090
|
-
details: string;
|
|
1091
|
-
explanation: string;
|
|
1092
|
-
}[];
|
|
1093
|
-
} | null;
|
|
1094
|
-
columns_lineage?: {
|
|
1095
|
-
[key: string]: {
|
|
1096
|
-
nodes: {
|
|
1097
|
-
id: string;
|
|
1098
|
-
type: "entity" | "attribute" | "filter" | "process" | "combine" | "result";
|
|
1099
|
-
explanation: string;
|
|
1100
|
-
}[];
|
|
1101
|
-
edges: {
|
|
1102
|
-
source: string;
|
|
1103
|
-
target: string;
|
|
1104
|
-
}[];
|
|
1105
|
-
};
|
|
1106
|
-
} | null;
|
|
1107
|
-
confidence_score: number;
|
|
1108
|
-
confidence_score_reason: string;
|
|
1109
|
-
assumptions_score?: number;
|
|
1110
|
-
assumptions_score_reason?: string;
|
|
1111
|
-
friendliness_score?: number;
|
|
1112
|
-
friendliness_score_reason?: string;
|
|
1113
|
-
flow_data_id: number;
|
|
1114
|
-
output_dataset?: string;
|
|
1115
|
-
sql?: string;
|
|
1116
|
-
} | null | undefined;
|
|
1117
|
-
totalRows: number | undefined;
|
|
1118
|
-
pageIndex: number;
|
|
1119
|
-
pageSize: number;
|
|
1120
|
-
totalPages: number | undefined;
|
|
1121
|
-
nextPage: () => void;
|
|
1122
|
-
previousPage: () => void;
|
|
1123
|
-
goToPage: (page: number) => void;
|
|
1124
|
-
hasNextPage: boolean;
|
|
1125
|
-
hasPreviousPage: boolean;
|
|
1126
|
-
sorting: SortingState_2;
|
|
1127
|
-
setSorting: Dispatch<SetStateAction<SortingState_2>>;
|
|
1128
|
-
filters: TableFilters;
|
|
1129
|
-
setFilters: (newFilters: TableFilters) => void;
|
|
1130
|
-
};
|
|
792
|
+
export { useMageMetricsReady }
|
|
1131
793
|
|
|
1132
794
|
export declare const useRecentFlows: (limit?: number) => UseQueryResult< {
|
|
1133
|
-
title: string | null;
|
|
1134
795
|
id: string;
|
|
796
|
+
title: string | null;
|
|
1135
797
|
request: string;
|
|
1136
798
|
created_at: string;
|
|
1137
799
|
user_id: string | null;
|
|
1138
800
|
application_id?: number | null | undefined;
|
|
1139
801
|
}[], Error>;
|
|
1140
802
|
|
|
1141
|
-
export declare const
|
|
1142
|
-
|
|
1143
|
-
|
|
803
|
+
export declare const useReport: (reportId: number) => {
|
|
804
|
+
data: {
|
|
805
|
+
created_at: string;
|
|
806
|
+
flow_id: string;
|
|
807
|
+
id: number;
|
|
808
|
+
title: string;
|
|
809
|
+
request: string | null;
|
|
810
|
+
data_summary: {
|
|
811
|
+
columns: {
|
|
812
|
+
[key: string]: {
|
|
813
|
+
position?: number;
|
|
814
|
+
data_type: string;
|
|
815
|
+
null_count: number | null;
|
|
816
|
+
unique_count: number | null;
|
|
817
|
+
unique_percentage: number | null;
|
|
818
|
+
min_value?: number | null;
|
|
819
|
+
max_value?: number | null;
|
|
820
|
+
avg_value?: number | null;
|
|
821
|
+
median_value?: number | null;
|
|
822
|
+
std_value?: number | null;
|
|
823
|
+
min_date?: string | null;
|
|
824
|
+
max_date?: string | null;
|
|
825
|
+
min_length?: number | null;
|
|
826
|
+
max_length?: number | null;
|
|
827
|
+
avg_length?: number | null;
|
|
828
|
+
} & {
|
|
829
|
+
[key: string]: unknown;
|
|
830
|
+
};
|
|
831
|
+
};
|
|
832
|
+
} & {
|
|
833
|
+
[key: string]: unknown;
|
|
834
|
+
};
|
|
835
|
+
bookmarked: boolean;
|
|
836
|
+
status: string | null;
|
|
837
|
+
is_removed: boolean;
|
|
838
|
+
is_materialized: boolean | null;
|
|
839
|
+
last_materialized_at: string | null;
|
|
840
|
+
materialized_error_message: string | null;
|
|
841
|
+
materialized_status: "completed" | "running" | "failed" | null;
|
|
842
|
+
} | null | undefined;
|
|
843
|
+
isLoading: boolean;
|
|
844
|
+
error: Error | null;
|
|
845
|
+
isError: boolean;
|
|
846
|
+
isSuccess: boolean;
|
|
847
|
+
refetch: (options?: RefetchOptions) => Promise<QueryObserverResult< {
|
|
848
|
+
created_at: string;
|
|
849
|
+
flow_id: string;
|
|
850
|
+
id: number;
|
|
851
|
+
title: string;
|
|
852
|
+
request: string | null;
|
|
853
|
+
data_summary: {
|
|
854
|
+
columns: {
|
|
855
|
+
[key: string]: {
|
|
856
|
+
position?: number;
|
|
857
|
+
data_type: string;
|
|
858
|
+
null_count: number | null;
|
|
859
|
+
unique_count: number | null;
|
|
860
|
+
unique_percentage: number | null;
|
|
861
|
+
min_value?: number | null;
|
|
862
|
+
max_value?: number | null;
|
|
863
|
+
avg_value?: number | null;
|
|
864
|
+
median_value?: number | null;
|
|
865
|
+
std_value?: number | null;
|
|
866
|
+
min_date?: string | null;
|
|
867
|
+
max_date?: string | null;
|
|
868
|
+
min_length?: number | null;
|
|
869
|
+
max_length?: number | null;
|
|
870
|
+
avg_length?: number | null;
|
|
871
|
+
} & {
|
|
872
|
+
[key: string]: unknown;
|
|
873
|
+
};
|
|
874
|
+
};
|
|
875
|
+
} & {
|
|
876
|
+
[key: string]: unknown;
|
|
877
|
+
};
|
|
878
|
+
bookmarked: boolean;
|
|
879
|
+
status: string | null;
|
|
880
|
+
is_removed: boolean;
|
|
881
|
+
is_materialized: boolean | null;
|
|
882
|
+
last_materialized_at: string | null;
|
|
883
|
+
materialized_error_message: string | null;
|
|
884
|
+
materialized_status: "completed" | "running" | "failed" | null;
|
|
885
|
+
} | null, Error>>;
|
|
886
|
+
isRefetching: boolean;
|
|
887
|
+
isFetching: boolean;
|
|
888
|
+
};
|
|
1144
889
|
|
|
1145
|
-
declare const
|
|
1146
|
-
id: z.ZodNumber;
|
|
1147
|
-
configuration: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1148
|
-
xAxisLabel: z.ZodString;
|
|
1149
|
-
yAxisLabel: z.ZodString;
|
|
1150
|
-
xAxisDataKey: z.ZodOptional<z.ZodString>;
|
|
1151
|
-
yAxisDataKey: z.ZodOptional<z.ZodString>;
|
|
1152
|
-
dimensionDataKey: z.ZodOptional<z.ZodString>;
|
|
1153
|
-
valueColumns: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1154
|
-
title: z.ZodString;
|
|
1155
|
-
type: z.ZodLiteral<"bar">;
|
|
1156
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1157
|
-
xAxisLabel: z.ZodString;
|
|
1158
|
-
yAxisLabel: z.ZodString;
|
|
1159
|
-
xAxisDataKey: z.ZodOptional<z.ZodString>;
|
|
1160
|
-
yAxisDataKey: z.ZodOptional<z.ZodString>;
|
|
1161
|
-
dimensionDataKey: z.ZodOptional<z.ZodString>;
|
|
1162
|
-
valueColumns: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1163
|
-
title: z.ZodString;
|
|
1164
|
-
type: z.ZodLiteral<"line/area">;
|
|
1165
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1166
|
-
xAxisLabel: z.ZodString;
|
|
1167
|
-
yAxisLabel: z.ZodString;
|
|
1168
|
-
xAxisDataKey: z.ZodOptional<z.ZodString>;
|
|
1169
|
-
yAxisDataKey: z.ZodOptional<z.ZodString>;
|
|
1170
|
-
dimensionDataKey: z.ZodOptional<z.ZodString>;
|
|
1171
|
-
valueColumns: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1172
|
-
title: z.ZodString;
|
|
1173
|
-
type: z.ZodLiteral<"scatter">;
|
|
1174
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1175
|
-
nameKey: z.ZodString;
|
|
1176
|
-
dataKey: z.ZodString;
|
|
1177
|
-
title: z.ZodString;
|
|
1178
|
-
type: z.ZodLiteral<"pie">;
|
|
1179
|
-
}, z.core.$strip>], "type">;
|
|
1180
|
-
created_at: z.ZodString;
|
|
1181
|
-
bookmarked: z.ZodBoolean;
|
|
1182
|
-
flow_data_id: z.ZodNumber;
|
|
1183
|
-
flow_data: z.ZodOptional<z.ZodObject<{
|
|
1184
|
-
is_materialized: z.ZodNullable<z.ZodBoolean>;
|
|
1185
|
-
last_materialized_at: z.ZodNullable<z.ZodString>;
|
|
1186
|
-
materialized_error_message: z.ZodNullable<z.ZodString>;
|
|
1187
|
-
materialized_status: z.ZodNullable<z.ZodEnum<{
|
|
1188
|
-
running: "running";
|
|
1189
|
-
completed: "completed";
|
|
1190
|
-
failed: "failed";
|
|
1191
|
-
}>>;
|
|
1192
|
-
}, z.core.$strip>>;
|
|
1193
|
-
}, z.core.$strip>;
|
|
890
|
+
export declare const useSpeechToText: () => AssemblyAIMicrophoneController;
|
|
1194
891
|
|
|
1195
892
|
export declare const Visualization: ForwardRefExoticComponent< {
|
|
1196
893
|
visualizationId: number;
|