@magemetrics/ai 0.0.60 → 0.1.1
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.css +1 -1
- package/dist/react/ai.js +12177 -12106
- package/dist/react/index.d.ts +34 -132
- package/dist/styles.css +1 -1
- package/dist/web-component/ai.css +1 -1
- package/dist/web-component/index.d.ts +34 -132
- package/dist/web-component/web-component.es.js +68849 -79900
- package/package.json +21 -21
package/dist/react/index.d.ts
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import { AuthState } from '@magemetrics/core';
|
|
2
|
+
import { CreateFlowParam } from '@magemetrics/core';
|
|
2
3
|
import { default as default_2 } from 'react';
|
|
3
4
|
import { FetchNextPageOptions } from '@tanstack/react-query';
|
|
4
5
|
import { ForwardRefExoticComponent } from 'react';
|
|
5
6
|
import { GenerateInsightParam } from '@magemetrics/core';
|
|
6
7
|
import { InfiniteData } from '@tanstack/react-query';
|
|
7
8
|
import { InfiniteQueryObserverResult } from '@tanstack/react-query';
|
|
8
|
-
import { JSX } from 'react/jsx-runtime';
|
|
9
9
|
import { MageMetricsClient } from '@magemetrics/core';
|
|
10
10
|
import { MageMetricsClientConfig } from '@magemetrics/core';
|
|
11
11
|
import { PropsWithChildren } from 'react';
|
|
12
12
|
import { RefAttributes } from 'react';
|
|
13
13
|
import { SortingState } from '@tanstack/react-table';
|
|
14
|
-
import { StartFlowParam } from '@magemetrics/core';
|
|
15
14
|
import { UseMutateAsyncFunction } from '@tanstack/react-query';
|
|
16
15
|
import { UseMutateFunction } from '@tanstack/react-query';
|
|
17
16
|
import { UseMutationOptions } from '@tanstack/react-query';
|
|
@@ -22,34 +21,16 @@ export { AuthState }
|
|
|
22
21
|
|
|
23
22
|
export declare type CellContentProps = {
|
|
24
23
|
formattedValue: FormattedData | undefined;
|
|
25
|
-
isOpened: boolean;
|
|
26
24
|
unit?: string;
|
|
27
25
|
renderType?: string;
|
|
28
26
|
};
|
|
29
27
|
|
|
30
|
-
export declare const Chat: React.FC<
|
|
31
|
-
|
|
32
|
-
declare const Chat_2: default_2.MemoExoticComponent<({ flowId, className }: {
|
|
33
|
-
flowId: string;
|
|
34
|
-
className?: string;
|
|
35
|
-
}) => JSX.Element>;
|
|
36
|
-
|
|
37
|
-
export declare const ChatInput: React.FC<React.ComponentProps<typeof ChatInput_2>>;
|
|
38
|
-
|
|
39
|
-
declare const ChatInput_2: React.FC<{
|
|
40
|
-
flowId: string;
|
|
41
|
-
}>;
|
|
28
|
+
export declare const Chat: React.FC<ConversationContentProps>;
|
|
42
29
|
|
|
43
30
|
export declare const ChatLayoutProvider: default_2.FC<{
|
|
44
31
|
children: default_2.ReactNode;
|
|
45
32
|
}>;
|
|
46
33
|
|
|
47
|
-
export declare const ChatMessages: React.FC<React.ComponentProps<typeof ChatMessages_2>>;
|
|
48
|
-
|
|
49
|
-
declare const ChatMessages_2: default_2.FC<{
|
|
50
|
-
flowId: string;
|
|
51
|
-
}>;
|
|
52
|
-
|
|
53
34
|
export declare interface Components {
|
|
54
35
|
dataTableCells?: {
|
|
55
36
|
empty?: (props: CellContentProps) => default_2.ReactNode;
|
|
@@ -68,6 +49,7 @@ export declare interface Components {
|
|
|
68
49
|
type: "visualization";
|
|
69
50
|
visualization: FrontendVisualization | V1FrontendVisualization;
|
|
70
51
|
}) => default_2.ReactNode;
|
|
52
|
+
avatar?: default_2.ReactNode;
|
|
71
53
|
}
|
|
72
54
|
|
|
73
55
|
declare type ControlledModalProps = {
|
|
@@ -75,6 +57,17 @@ declare type ControlledModalProps = {
|
|
|
75
57
|
onClose: () => void;
|
|
76
58
|
};
|
|
77
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
|
+
|
|
78
71
|
export declare const Dashboard: React.FC<React.ComponentProps<typeof Dashboard_2>>;
|
|
79
72
|
|
|
80
73
|
declare const Dashboard_2: React.FC<{
|
|
@@ -87,8 +80,6 @@ export declare const DataReport: React.FC<{
|
|
|
87
80
|
|
|
88
81
|
export declare interface DataReportMessageProps {
|
|
89
82
|
report: FrontendReport;
|
|
90
|
-
isOpened: boolean;
|
|
91
|
-
setIsOpened: (opened: boolean) => void;
|
|
92
83
|
explainability: FrontendReportExplainability | null | undefined;
|
|
93
84
|
infiniteData: {
|
|
94
85
|
data?: {
|
|
@@ -737,8 +728,6 @@ declare type InfiniteDataTableUIProps = {
|
|
|
737
728
|
data: Record<string, unknown>[];
|
|
738
729
|
columns: FrontendReportColumns;
|
|
739
730
|
explainability: FrontendReportExplainability | null | undefined;
|
|
740
|
-
isOpened: boolean;
|
|
741
|
-
setIsOpened: (opened: boolean) => void;
|
|
742
731
|
hasNextPage: boolean | undefined;
|
|
743
732
|
fetchNextPage: () => Promise<unknown>;
|
|
744
733
|
isFetchingNextPage: boolean;
|
|
@@ -803,8 +792,6 @@ declare type StandaloneConversationModalProps = {
|
|
|
803
792
|
onOpenChange?: (open: boolean) => void;
|
|
804
793
|
};
|
|
805
794
|
|
|
806
|
-
export { StartFlowParam }
|
|
807
|
-
|
|
808
795
|
declare type StartOptions = DisplayControlProps & {
|
|
809
796
|
label?: string;
|
|
810
797
|
recommendationsLabel?: string;
|
|
@@ -815,13 +802,13 @@ declare type TableFilters = Record<string, string | number>;
|
|
|
815
802
|
|
|
816
803
|
export declare const useCreateFlow: (options?: UseMutationOptions<{
|
|
817
804
|
flowId: string;
|
|
818
|
-
}, Error,
|
|
805
|
+
}, Error, CreateFlowParam>) => {
|
|
819
806
|
createFlow: UseMutateFunction< {
|
|
820
807
|
flowId: string;
|
|
821
|
-
}, Error,
|
|
808
|
+
}, Error, CreateFlowParam, unknown>;
|
|
822
809
|
createFlowAsync: UseMutateAsyncFunction< {
|
|
823
810
|
flowId: string;
|
|
824
|
-
}, Error,
|
|
811
|
+
}, Error, CreateFlowParam, unknown>;
|
|
825
812
|
isCreatingFlow: boolean;
|
|
826
813
|
data: undefined;
|
|
827
814
|
variables: undefined;
|
|
@@ -833,7 +820,7 @@ export declare const useCreateFlow: (options?: UseMutationOptions<{
|
|
|
833
820
|
status: "idle";
|
|
834
821
|
mutate: UseMutateFunction< {
|
|
835
822
|
flowId: string;
|
|
836
|
-
}, Error,
|
|
823
|
+
}, Error, CreateFlowParam, unknown>;
|
|
837
824
|
reset: () => void;
|
|
838
825
|
context: unknown;
|
|
839
826
|
failureCount: number;
|
|
@@ -842,17 +829,17 @@ export declare const useCreateFlow: (options?: UseMutationOptions<{
|
|
|
842
829
|
submittedAt: number;
|
|
843
830
|
mutateAsync: UseMutateAsyncFunction< {
|
|
844
831
|
flowId: string;
|
|
845
|
-
}, Error,
|
|
832
|
+
}, Error, CreateFlowParam, unknown>;
|
|
846
833
|
} | {
|
|
847
834
|
createFlow: UseMutateFunction< {
|
|
848
835
|
flowId: string;
|
|
849
|
-
}, Error,
|
|
836
|
+
}, Error, CreateFlowParam, unknown>;
|
|
850
837
|
createFlowAsync: UseMutateAsyncFunction< {
|
|
851
838
|
flowId: string;
|
|
852
|
-
}, Error,
|
|
839
|
+
}, Error, CreateFlowParam, unknown>;
|
|
853
840
|
isCreatingFlow: boolean;
|
|
854
841
|
data: undefined;
|
|
855
|
-
variables:
|
|
842
|
+
variables: CreateFlowParam;
|
|
856
843
|
error: null;
|
|
857
844
|
isError: false;
|
|
858
845
|
isIdle: false;
|
|
@@ -861,7 +848,7 @@ export declare const useCreateFlow: (options?: UseMutationOptions<{
|
|
|
861
848
|
status: "pending";
|
|
862
849
|
mutate: UseMutateFunction< {
|
|
863
850
|
flowId: string;
|
|
864
|
-
}, Error,
|
|
851
|
+
}, Error, CreateFlowParam, unknown>;
|
|
865
852
|
reset: () => void;
|
|
866
853
|
context: unknown;
|
|
867
854
|
failureCount: number;
|
|
@@ -870,18 +857,18 @@ export declare const useCreateFlow: (options?: UseMutationOptions<{
|
|
|
870
857
|
submittedAt: number;
|
|
871
858
|
mutateAsync: UseMutateAsyncFunction< {
|
|
872
859
|
flowId: string;
|
|
873
|
-
}, Error,
|
|
860
|
+
}, Error, CreateFlowParam, unknown>;
|
|
874
861
|
} | {
|
|
875
862
|
createFlow: UseMutateFunction< {
|
|
876
863
|
flowId: string;
|
|
877
|
-
}, Error,
|
|
864
|
+
}, Error, CreateFlowParam, unknown>;
|
|
878
865
|
createFlowAsync: UseMutateAsyncFunction< {
|
|
879
866
|
flowId: string;
|
|
880
|
-
}, Error,
|
|
867
|
+
}, Error, CreateFlowParam, unknown>;
|
|
881
868
|
isCreatingFlow: boolean;
|
|
882
869
|
data: undefined;
|
|
883
870
|
error: Error;
|
|
884
|
-
variables:
|
|
871
|
+
variables: CreateFlowParam;
|
|
885
872
|
isError: true;
|
|
886
873
|
isIdle: false;
|
|
887
874
|
isPending: false;
|
|
@@ -889,7 +876,7 @@ export declare const useCreateFlow: (options?: UseMutationOptions<{
|
|
|
889
876
|
status: "error";
|
|
890
877
|
mutate: UseMutateFunction< {
|
|
891
878
|
flowId: string;
|
|
892
|
-
}, Error,
|
|
879
|
+
}, Error, CreateFlowParam, unknown>;
|
|
893
880
|
reset: () => void;
|
|
894
881
|
context: unknown;
|
|
895
882
|
failureCount: number;
|
|
@@ -898,20 +885,20 @@ export declare const useCreateFlow: (options?: UseMutationOptions<{
|
|
|
898
885
|
submittedAt: number;
|
|
899
886
|
mutateAsync: UseMutateAsyncFunction< {
|
|
900
887
|
flowId: string;
|
|
901
|
-
}, Error,
|
|
888
|
+
}, Error, CreateFlowParam, unknown>;
|
|
902
889
|
} | {
|
|
903
890
|
createFlow: UseMutateFunction< {
|
|
904
891
|
flowId: string;
|
|
905
|
-
}, Error,
|
|
892
|
+
}, Error, CreateFlowParam, unknown>;
|
|
906
893
|
createFlowAsync: UseMutateAsyncFunction< {
|
|
907
894
|
flowId: string;
|
|
908
|
-
}, Error,
|
|
895
|
+
}, Error, CreateFlowParam, unknown>;
|
|
909
896
|
isCreatingFlow: boolean;
|
|
910
897
|
data: {
|
|
911
898
|
flowId: string;
|
|
912
899
|
};
|
|
913
900
|
error: null;
|
|
914
|
-
variables:
|
|
901
|
+
variables: CreateFlowParam;
|
|
915
902
|
isError: false;
|
|
916
903
|
isIdle: false;
|
|
917
904
|
isPending: false;
|
|
@@ -919,7 +906,7 @@ export declare const useCreateFlow: (options?: UseMutationOptions<{
|
|
|
919
906
|
status: "success";
|
|
920
907
|
mutate: UseMutateFunction< {
|
|
921
908
|
flowId: string;
|
|
922
|
-
}, Error,
|
|
909
|
+
}, Error, CreateFlowParam, unknown>;
|
|
923
910
|
reset: () => void;
|
|
924
911
|
context: unknown;
|
|
925
912
|
failureCount: number;
|
|
@@ -928,7 +915,7 @@ export declare const useCreateFlow: (options?: UseMutationOptions<{
|
|
|
928
915
|
submittedAt: number;
|
|
929
916
|
mutateAsync: UseMutateAsyncFunction< {
|
|
930
917
|
flowId: string;
|
|
931
|
-
}, Error,
|
|
918
|
+
}, Error, CreateFlowParam, unknown>;
|
|
932
919
|
};
|
|
933
920
|
|
|
934
921
|
export declare const useDataReport: (flowDataId: FrontendReport["id"]) => {
|
|
@@ -1241,90 +1228,6 @@ created_at: string;
|
|
|
1241
1228
|
user_id: string | null;
|
|
1242
1229
|
}[], Error>;
|
|
1243
1230
|
|
|
1244
|
-
/**
|
|
1245
|
-
* Create a new flow with the given user query.
|
|
1246
|
-
* @deprecated Use `useCreateFlow` instead.
|
|
1247
|
-
* @param options tanstack query options to create the flow
|
|
1248
|
-
* @returns a mutation
|
|
1249
|
-
*/
|
|
1250
|
-
export declare const useStartFlow: (options?: UseMutationOptions<string, Error, StartFlowParam>) => {
|
|
1251
|
-
startFlow: UseMutateFunction<string, Error, StartFlowParam, unknown>;
|
|
1252
|
-
startFlowAsync: UseMutateAsyncFunction<string, Error, StartFlowParam, unknown>;
|
|
1253
|
-
data: undefined;
|
|
1254
|
-
variables: undefined;
|
|
1255
|
-
error: null;
|
|
1256
|
-
isError: false;
|
|
1257
|
-
isIdle: true;
|
|
1258
|
-
isPending: false;
|
|
1259
|
-
isSuccess: false;
|
|
1260
|
-
status: "idle";
|
|
1261
|
-
mutate: UseMutateFunction<string, Error, StartFlowParam, unknown>;
|
|
1262
|
-
reset: () => void;
|
|
1263
|
-
context: unknown;
|
|
1264
|
-
failureCount: number;
|
|
1265
|
-
failureReason: Error | null;
|
|
1266
|
-
isPaused: boolean;
|
|
1267
|
-
submittedAt: number;
|
|
1268
|
-
mutateAsync: UseMutateAsyncFunction<string, Error, StartFlowParam, unknown>;
|
|
1269
|
-
} | {
|
|
1270
|
-
startFlow: UseMutateFunction<string, Error, StartFlowParam, unknown>;
|
|
1271
|
-
startFlowAsync: UseMutateAsyncFunction<string, Error, StartFlowParam, unknown>;
|
|
1272
|
-
data: undefined;
|
|
1273
|
-
variables: StartFlowParam;
|
|
1274
|
-
error: null;
|
|
1275
|
-
isError: false;
|
|
1276
|
-
isIdle: false;
|
|
1277
|
-
isPending: true;
|
|
1278
|
-
isSuccess: false;
|
|
1279
|
-
status: "pending";
|
|
1280
|
-
mutate: UseMutateFunction<string, Error, StartFlowParam, unknown>;
|
|
1281
|
-
reset: () => void;
|
|
1282
|
-
context: unknown;
|
|
1283
|
-
failureCount: number;
|
|
1284
|
-
failureReason: Error | null;
|
|
1285
|
-
isPaused: boolean;
|
|
1286
|
-
submittedAt: number;
|
|
1287
|
-
mutateAsync: UseMutateAsyncFunction<string, Error, StartFlowParam, unknown>;
|
|
1288
|
-
} | {
|
|
1289
|
-
startFlow: UseMutateFunction<string, Error, StartFlowParam, unknown>;
|
|
1290
|
-
startFlowAsync: UseMutateAsyncFunction<string, Error, StartFlowParam, unknown>;
|
|
1291
|
-
data: undefined;
|
|
1292
|
-
error: Error;
|
|
1293
|
-
variables: StartFlowParam;
|
|
1294
|
-
isError: true;
|
|
1295
|
-
isIdle: false;
|
|
1296
|
-
isPending: false;
|
|
1297
|
-
isSuccess: false;
|
|
1298
|
-
status: "error";
|
|
1299
|
-
mutate: UseMutateFunction<string, Error, StartFlowParam, unknown>;
|
|
1300
|
-
reset: () => void;
|
|
1301
|
-
context: unknown;
|
|
1302
|
-
failureCount: number;
|
|
1303
|
-
failureReason: Error | null;
|
|
1304
|
-
isPaused: boolean;
|
|
1305
|
-
submittedAt: number;
|
|
1306
|
-
mutateAsync: UseMutateAsyncFunction<string, Error, StartFlowParam, unknown>;
|
|
1307
|
-
} | {
|
|
1308
|
-
startFlow: UseMutateFunction<string, Error, StartFlowParam, unknown>;
|
|
1309
|
-
startFlowAsync: UseMutateAsyncFunction<string, Error, StartFlowParam, unknown>;
|
|
1310
|
-
data: string;
|
|
1311
|
-
error: null;
|
|
1312
|
-
variables: StartFlowParam;
|
|
1313
|
-
isError: false;
|
|
1314
|
-
isIdle: false;
|
|
1315
|
-
isPending: false;
|
|
1316
|
-
isSuccess: true;
|
|
1317
|
-
status: "success";
|
|
1318
|
-
mutate: UseMutateFunction<string, Error, StartFlowParam, unknown>;
|
|
1319
|
-
reset: () => void;
|
|
1320
|
-
context: unknown;
|
|
1321
|
-
failureCount: number;
|
|
1322
|
-
failureReason: Error | null;
|
|
1323
|
-
isPaused: boolean;
|
|
1324
|
-
submittedAt: number;
|
|
1325
|
-
mutateAsync: UseMutateAsyncFunction<string, Error, StartFlowParam, unknown>;
|
|
1326
|
-
};
|
|
1327
|
-
|
|
1328
1231
|
declare type V1FrontendVisualization = z.output<typeof V1FrontendVisualizationSchema>;
|
|
1329
1232
|
|
|
1330
1233
|
declare const V1FrontendVisualizationSchema: z.ZodObject<Omit<{
|
|
@@ -1514,7 +1417,6 @@ declare const V1FrontendVisualizationSchema: z.ZodObject<Omit<{
|
|
|
1514
1417
|
|
|
1515
1418
|
export declare const Visualization: ForwardRefExoticComponent< {
|
|
1516
1419
|
visualizationId: number;
|
|
1517
|
-
isFullWidth: boolean;
|
|
1518
1420
|
withTitle: boolean;
|
|
1519
1421
|
} & RefAttributes<HTMLDivElement>>;
|
|
1520
1422
|
|