@magemetrics/ai 0.12.2 → 0.14.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.
- package/dist/fonts.css +2 -1
- package/dist/fonts.js +0 -1
- package/dist/react/ai.js +39184 -37072
- package/dist/react/index.d.ts +108 -106
- package/dist/styles.css +2 -1
- package/dist/styles.js +0 -1
- package/dist/web-component/web-component.es.js +98239 -99708
- package/package.json +36 -36
package/dist/react/index.d.ts
CHANGED
|
@@ -77,6 +77,7 @@ export declare type CellContentProps = {
|
|
|
77
77
|
formattedValue: FormattedData | undefined;
|
|
78
78
|
unit?: string;
|
|
79
79
|
renderType?: string;
|
|
80
|
+
isNumeric?: boolean;
|
|
80
81
|
};
|
|
81
82
|
|
|
82
83
|
export declare const Chat: React.FC<PublicChatProps>;
|
|
@@ -94,6 +95,7 @@ export declare interface ChatContextValue {
|
|
|
94
95
|
flowId: string | undefined | null;
|
|
95
96
|
enableSpeechToText?: boolean;
|
|
96
97
|
enableFileUpload?: boolean;
|
|
98
|
+
readOnly?: boolean;
|
|
97
99
|
}
|
|
98
100
|
|
|
99
101
|
/**
|
|
@@ -156,6 +158,7 @@ declare interface ChatProps {
|
|
|
156
158
|
flowId: string | undefined | null;
|
|
157
159
|
enableSpeechToText?: boolean;
|
|
158
160
|
enableFileUpload?: boolean;
|
|
161
|
+
readOnly?: boolean;
|
|
159
162
|
children?: default_2.ReactNode;
|
|
160
163
|
}
|
|
161
164
|
|
|
@@ -211,6 +214,7 @@ declare type ConfigurableChatComponentProps = {
|
|
|
211
214
|
enableSpeechToText?: boolean;
|
|
212
215
|
enableFileUpload?: boolean;
|
|
213
216
|
disableCanvas?: boolean;
|
|
217
|
+
readOnly?: boolean;
|
|
214
218
|
children?: default_2.ReactNode;
|
|
215
219
|
/**
|
|
216
220
|
* Appearance configuration for customizing the visual style.
|
|
@@ -240,6 +244,7 @@ declare interface ConversationContentProps {
|
|
|
240
244
|
style?: React.CSSProperties;
|
|
241
245
|
topBar?: React.ReactNode;
|
|
242
246
|
disableCanvas?: boolean;
|
|
247
|
+
readOnly?: boolean;
|
|
243
248
|
enableSpeechToText?: boolean;
|
|
244
249
|
enableFileUpload?: boolean;
|
|
245
250
|
children?: React.ReactNode;
|
|
@@ -272,7 +277,7 @@ export declare const DomWrapper: React.FC<PropsWithChildren<DomWrapperProps>>;
|
|
|
272
277
|
declare type DomWrapperProps = InternalColorSwatchProps;
|
|
273
278
|
|
|
274
279
|
declare type ExportReportDataParams = {
|
|
275
|
-
reportId:
|
|
280
|
+
reportId: string;
|
|
276
281
|
filename?: string;
|
|
277
282
|
format?: "text" | "blob";
|
|
278
283
|
};
|
|
@@ -403,7 +408,6 @@ declare const FrontendReportSchema: z.ZodObject<{
|
|
|
403
408
|
avg_length: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
404
409
|
}, z.core.$loose>>;
|
|
405
410
|
}, z.core.$loose>;
|
|
406
|
-
flow_id: z.ZodString;
|
|
407
411
|
is_removed: z.ZodBoolean;
|
|
408
412
|
is_materialized: z.ZodNullable<z.ZodBoolean>;
|
|
409
413
|
last_materialized_at: z.ZodNullable<z.ZodString>;
|
|
@@ -461,6 +465,8 @@ declare const FrontendVisualizationSchema: z.ZodObject<{
|
|
|
461
465
|
type: z.ZodLiteral<"pie">;
|
|
462
466
|
}, z.core.$strip>], "type">;
|
|
463
467
|
created_at: z.ZodString;
|
|
468
|
+
flow_data_id: z.ZodNumber;
|
|
469
|
+
report_uuid: z.ZodString;
|
|
464
470
|
flow_data: z.ZodOptional<z.ZodObject<{
|
|
465
471
|
is_materialized: z.ZodNullable<z.ZodBoolean>;
|
|
466
472
|
last_materialized_at: z.ZodNullable<z.ZodString>;
|
|
@@ -471,8 +477,6 @@ declare const FrontendVisualizationSchema: z.ZodObject<{
|
|
|
471
477
|
running: "running";
|
|
472
478
|
}>>;
|
|
473
479
|
}, z.core.$strip>>;
|
|
474
|
-
flow_data_id: z.ZodNumber;
|
|
475
|
-
report_uuid: z.ZodString;
|
|
476
480
|
materialization: z.ZodOptional<z.ZodObject<{
|
|
477
481
|
is_materialized: z.ZodNullable<z.ZodBoolean>;
|
|
478
482
|
last_materialized_at: z.ZodNullable<z.ZodString>;
|
|
@@ -759,12 +763,12 @@ declare const TableFilterValueSchema: z.ZodObject<{
|
|
|
759
763
|
* }
|
|
760
764
|
* ```
|
|
761
765
|
*/
|
|
762
|
-
export declare const useCanvas: (canvasId: string | undefined | null, options?: Omit<UseQueryOptions<FrontendCanvas, unknown>, "queryKey" | "queryFn">) => UseQueryResult<
|
|
763
|
-
title: string | null;
|
|
764
|
-
id: string;
|
|
765
|
-
nodes: any[];
|
|
766
|
-
edges: any[];
|
|
767
|
-
is_public: boolean;
|
|
766
|
+
export declare const useCanvas: (canvasId: string | undefined | null, options?: Omit<UseQueryOptions<FrontendCanvas, unknown>, "queryKey" | "queryFn">) => UseQueryResult<{
|
|
767
|
+
title: string | null;
|
|
768
|
+
id: string;
|
|
769
|
+
nodes: any[];
|
|
770
|
+
edges: any[];
|
|
771
|
+
is_public: boolean;
|
|
768
772
|
}, unknown>;
|
|
769
773
|
|
|
770
774
|
export declare const useChatContext: () => ChatContextValue;
|
|
@@ -780,11 +784,11 @@ export declare const useChatInputContext: () => ChatInputContextValue;
|
|
|
780
784
|
export declare const useCreateFlow: (options?: UseMutationOptions<{
|
|
781
785
|
flowId: string;
|
|
782
786
|
}, Error, CreateFlowParam>) => {
|
|
783
|
-
createFlow: UseMutateFunction<
|
|
784
|
-
|
|
787
|
+
createFlow: UseMutateFunction<{
|
|
788
|
+
flowId: string;
|
|
785
789
|
}, Error, CreateFlowParam, unknown>;
|
|
786
|
-
createFlowAsync: UseMutateAsyncFunction<
|
|
787
|
-
|
|
790
|
+
createFlowAsync: UseMutateAsyncFunction<{
|
|
791
|
+
flowId: string;
|
|
788
792
|
}, Error, CreateFlowParam, unknown>;
|
|
789
793
|
isCreatingFlow: boolean;
|
|
790
794
|
data: undefined;
|
|
@@ -795,8 +799,8 @@ export declare const useCreateFlow: (options?: UseMutationOptions<{
|
|
|
795
799
|
isPending: false;
|
|
796
800
|
isSuccess: false;
|
|
797
801
|
status: "idle";
|
|
798
|
-
mutate: UseMutateFunction<
|
|
799
|
-
|
|
802
|
+
mutate: UseMutateFunction<{
|
|
803
|
+
flowId: string;
|
|
800
804
|
}, Error, CreateFlowParam, unknown>;
|
|
801
805
|
reset: () => void;
|
|
802
806
|
context: unknown;
|
|
@@ -804,15 +808,15 @@ export declare const useCreateFlow: (options?: UseMutationOptions<{
|
|
|
804
808
|
failureReason: Error | null;
|
|
805
809
|
isPaused: boolean;
|
|
806
810
|
submittedAt: number;
|
|
807
|
-
mutateAsync: UseMutateAsyncFunction<
|
|
808
|
-
|
|
811
|
+
mutateAsync: UseMutateAsyncFunction<{
|
|
812
|
+
flowId: string;
|
|
809
813
|
}, Error, CreateFlowParam, unknown>;
|
|
810
814
|
} | {
|
|
811
|
-
createFlow: UseMutateFunction<
|
|
812
|
-
|
|
815
|
+
createFlow: UseMutateFunction<{
|
|
816
|
+
flowId: string;
|
|
813
817
|
}, Error, CreateFlowParam, unknown>;
|
|
814
|
-
createFlowAsync: UseMutateAsyncFunction<
|
|
815
|
-
|
|
818
|
+
createFlowAsync: UseMutateAsyncFunction<{
|
|
819
|
+
flowId: string;
|
|
816
820
|
}, Error, CreateFlowParam, unknown>;
|
|
817
821
|
isCreatingFlow: boolean;
|
|
818
822
|
data: undefined;
|
|
@@ -823,8 +827,8 @@ export declare const useCreateFlow: (options?: UseMutationOptions<{
|
|
|
823
827
|
isPending: true;
|
|
824
828
|
isSuccess: false;
|
|
825
829
|
status: "pending";
|
|
826
|
-
mutate: UseMutateFunction<
|
|
827
|
-
|
|
830
|
+
mutate: UseMutateFunction<{
|
|
831
|
+
flowId: string;
|
|
828
832
|
}, Error, CreateFlowParam, unknown>;
|
|
829
833
|
reset: () => void;
|
|
830
834
|
context: unknown;
|
|
@@ -832,15 +836,15 @@ export declare const useCreateFlow: (options?: UseMutationOptions<{
|
|
|
832
836
|
failureReason: Error | null;
|
|
833
837
|
isPaused: boolean;
|
|
834
838
|
submittedAt: number;
|
|
835
|
-
mutateAsync: UseMutateAsyncFunction<
|
|
836
|
-
|
|
839
|
+
mutateAsync: UseMutateAsyncFunction<{
|
|
840
|
+
flowId: string;
|
|
837
841
|
}, Error, CreateFlowParam, unknown>;
|
|
838
842
|
} | {
|
|
839
|
-
createFlow: UseMutateFunction<
|
|
840
|
-
|
|
843
|
+
createFlow: UseMutateFunction<{
|
|
844
|
+
flowId: string;
|
|
841
845
|
}, Error, CreateFlowParam, unknown>;
|
|
842
|
-
createFlowAsync: UseMutateAsyncFunction<
|
|
843
|
-
|
|
846
|
+
createFlowAsync: UseMutateAsyncFunction<{
|
|
847
|
+
flowId: string;
|
|
844
848
|
}, Error, CreateFlowParam, unknown>;
|
|
845
849
|
isCreatingFlow: boolean;
|
|
846
850
|
data: undefined;
|
|
@@ -851,8 +855,8 @@ export declare const useCreateFlow: (options?: UseMutationOptions<{
|
|
|
851
855
|
isPending: false;
|
|
852
856
|
isSuccess: false;
|
|
853
857
|
status: "error";
|
|
854
|
-
mutate: UseMutateFunction<
|
|
855
|
-
|
|
858
|
+
mutate: UseMutateFunction<{
|
|
859
|
+
flowId: string;
|
|
856
860
|
}, Error, CreateFlowParam, unknown>;
|
|
857
861
|
reset: () => void;
|
|
858
862
|
context: unknown;
|
|
@@ -860,15 +864,15 @@ export declare const useCreateFlow: (options?: UseMutationOptions<{
|
|
|
860
864
|
failureReason: Error | null;
|
|
861
865
|
isPaused: boolean;
|
|
862
866
|
submittedAt: number;
|
|
863
|
-
mutateAsync: UseMutateAsyncFunction<
|
|
864
|
-
|
|
867
|
+
mutateAsync: UseMutateAsyncFunction<{
|
|
868
|
+
flowId: string;
|
|
865
869
|
}, Error, CreateFlowParam, unknown>;
|
|
866
870
|
} | {
|
|
867
|
-
createFlow: UseMutateFunction<
|
|
868
|
-
|
|
871
|
+
createFlow: UseMutateFunction<{
|
|
872
|
+
flowId: string;
|
|
869
873
|
}, Error, CreateFlowParam, unknown>;
|
|
870
|
-
createFlowAsync: UseMutateAsyncFunction<
|
|
871
|
-
|
|
874
|
+
createFlowAsync: UseMutateAsyncFunction<{
|
|
875
|
+
flowId: string;
|
|
872
876
|
}, Error, CreateFlowParam, unknown>;
|
|
873
877
|
isCreatingFlow: boolean;
|
|
874
878
|
data: {
|
|
@@ -881,8 +885,8 @@ export declare const useCreateFlow: (options?: UseMutationOptions<{
|
|
|
881
885
|
isPending: false;
|
|
882
886
|
isSuccess: true;
|
|
883
887
|
status: "success";
|
|
884
|
-
mutate: UseMutateFunction<
|
|
885
|
-
|
|
888
|
+
mutate: UseMutateFunction<{
|
|
889
|
+
flowId: string;
|
|
886
890
|
}, Error, CreateFlowParam, unknown>;
|
|
887
891
|
reset: () => void;
|
|
888
892
|
context: unknown;
|
|
@@ -890,13 +894,13 @@ export declare const useCreateFlow: (options?: UseMutationOptions<{
|
|
|
890
894
|
failureReason: Error | null;
|
|
891
895
|
isPaused: boolean;
|
|
892
896
|
submittedAt: number;
|
|
893
|
-
mutateAsync: UseMutateAsyncFunction<
|
|
894
|
-
|
|
897
|
+
mutateAsync: UseMutateAsyncFunction<{
|
|
898
|
+
flowId: string;
|
|
895
899
|
}, Error, CreateFlowParam, unknown>;
|
|
896
900
|
};
|
|
897
901
|
|
|
898
|
-
export declare const useDataReportColumnValue: (reportId:
|
|
899
|
-
[x: string]: unknown;
|
|
902
|
+
export declare const useDataReportColumnValue: (reportId: string, filters: ReportDataFilters) => UseQueryResult<{
|
|
903
|
+
[x: string]: unknown;
|
|
900
904
|
}[], Error>;
|
|
901
905
|
|
|
902
906
|
export declare const useDataTableContext: () => {
|
|
@@ -928,16 +932,15 @@ export declare const useDataTableContext: () => {
|
|
|
928
932
|
avg_length?: number | null | undefined;
|
|
929
933
|
}>;
|
|
930
934
|
};
|
|
931
|
-
flow_id: string;
|
|
932
935
|
is_removed: boolean;
|
|
933
936
|
is_materialized: boolean | null;
|
|
934
937
|
last_materialized_at: string | null;
|
|
935
938
|
materialized_error_message: string | null;
|
|
936
939
|
materialized_status: "completed" | "running" | "failed" | null;
|
|
937
940
|
};
|
|
938
|
-
fetchNextPage: (options?: FetchNextPageOptions) => Promise<InfiniteQueryObserverResult<InfiniteData<
|
|
939
|
-
|
|
940
|
-
}[], unknown>,
|
|
941
|
+
fetchNextPage: (options?: FetchNextPageOptions) => Promise< InfiniteQueryObserverResult<InfiniteData<{
|
|
942
|
+
[x: string]: unknown;
|
|
943
|
+
}[], unknown>, unknown>>;
|
|
941
944
|
pages: {
|
|
942
945
|
[x: string]: unknown;
|
|
943
946
|
}[][] | undefined;
|
|
@@ -948,6 +951,10 @@ export declare const useDataTableContext: () => {
|
|
|
948
951
|
renderType?: string | undefined;
|
|
949
952
|
unit?: string | undefined;
|
|
950
953
|
canonicalDataType?: "numeric" | "boolean" | "datetime" | "text" | "array" | "json" | "other" | undefined;
|
|
954
|
+
formatHint?: {
|
|
955
|
+
isNumeric?: boolean | undefined;
|
|
956
|
+
isLikelyYear?: boolean | undefined;
|
|
957
|
+
} | undefined;
|
|
951
958
|
}[] | undefined;
|
|
952
959
|
isPendingColumns: boolean;
|
|
953
960
|
hasMoreData: boolean;
|
|
@@ -1041,28 +1048,24 @@ export declare const useMageMetricsClient: () => MageMetricsClient;
|
|
|
1041
1048
|
|
|
1042
1049
|
export declare const useMageMetricsReady: () => false | MageMetricsClient;
|
|
1043
1050
|
|
|
1044
|
-
export declare const useRecentFlows: (limit?: number) => UseQueryResult<
|
|
1045
|
-
title: string | null;
|
|
1046
|
-
id: string;
|
|
1047
|
-
request: string;
|
|
1048
|
-
created_at: string;
|
|
1049
|
-
user_id: string | null;
|
|
1050
|
-
application_id?: number | null | undefined;
|
|
1051
|
-
context_tokens?: number | undefined;
|
|
1052
|
-
acc_input_tokens?: number | undefined;
|
|
1053
|
-
acc_output_tokens?: number | undefined;
|
|
1051
|
+
export declare const useRecentFlows: (limit?: number) => UseQueryResult<{
|
|
1052
|
+
title: string | null;
|
|
1053
|
+
id: string;
|
|
1054
|
+
request: string;
|
|
1055
|
+
created_at: string;
|
|
1056
|
+
user_id: string | null;
|
|
1057
|
+
application_id?: number | null | undefined;
|
|
1054
1058
|
}[], Error>;
|
|
1055
1059
|
|
|
1056
|
-
export declare const useRecommendations: (count: number) => UseQueryResult<
|
|
1057
|
-
starter: string;
|
|
1058
|
-
explanation: string;
|
|
1059
|
-
type: string;
|
|
1060
|
+
export declare const useRecommendations: (count: number) => UseQueryResult<{
|
|
1061
|
+
starter: string;
|
|
1062
|
+
explanation: string;
|
|
1063
|
+
type: string;
|
|
1060
1064
|
}[], Error>;
|
|
1061
1065
|
|
|
1062
|
-
export declare const useReport: (reportId:
|
|
1066
|
+
export declare const useReport: (reportId: string | undefined) => {
|
|
1063
1067
|
data: {
|
|
1064
1068
|
created_at: string;
|
|
1065
|
-
flow_id: string;
|
|
1066
1069
|
id: number;
|
|
1067
1070
|
uuid: string;
|
|
1068
1071
|
title: string;
|
|
@@ -1101,42 +1104,41 @@ export declare const useReport: (reportId: number | undefined) => {
|
|
|
1101
1104
|
error: Error | null;
|
|
1102
1105
|
isError: boolean;
|
|
1103
1106
|
isSuccess: boolean;
|
|
1104
|
-
refetch: (options?: RefetchOptions) => Promise<QueryObserverResult<
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
materialized_status: "completed" | "running" | "failed" | null;
|
|
1107
|
+
refetch: (options?: RefetchOptions) => Promise< QueryObserverResult<{
|
|
1108
|
+
created_at: string;
|
|
1109
|
+
id: number;
|
|
1110
|
+
uuid: string;
|
|
1111
|
+
title: string;
|
|
1112
|
+
request: string | null;
|
|
1113
|
+
data_summary: {
|
|
1114
|
+
[x: string]: unknown;
|
|
1115
|
+
columns: {
|
|
1116
|
+
[x: string]: {
|
|
1117
|
+
[x: string]: unknown;
|
|
1118
|
+
position?: number | undefined;
|
|
1119
|
+
data_type: string;
|
|
1120
|
+
null_count: number | null;
|
|
1121
|
+
unique_count: number | null;
|
|
1122
|
+
unique_percentage: number | null;
|
|
1123
|
+
min_value?: number | null | undefined;
|
|
1124
|
+
max_value?: number | null | undefined;
|
|
1125
|
+
avg_value?: number | null | undefined;
|
|
1126
|
+
median_value?: number | null | undefined;
|
|
1127
|
+
std_value?: number | null | undefined;
|
|
1128
|
+
min_date?: string | null | undefined;
|
|
1129
|
+
max_date?: string | null | undefined;
|
|
1130
|
+
min_length?: number | null | undefined;
|
|
1131
|
+
max_length?: number | null | undefined;
|
|
1132
|
+
avg_length?: number | null | undefined;
|
|
1133
|
+
};
|
|
1134
|
+
};
|
|
1135
|
+
};
|
|
1136
|
+
status: string | null;
|
|
1137
|
+
is_removed: boolean;
|
|
1138
|
+
is_materialized: boolean | null;
|
|
1139
|
+
last_materialized_at: string | null;
|
|
1140
|
+
materialized_error_message: string | null;
|
|
1141
|
+
materialized_status: "completed" | "running" | "failed" | null;
|
|
1140
1142
|
} | null, Error>>;
|
|
1141
1143
|
isRefetching: boolean;
|
|
1142
1144
|
isFetching: boolean;
|
|
@@ -1183,6 +1185,8 @@ declare const V1FrontendVisualizationSchema: z.ZodObject<{
|
|
|
1183
1185
|
type: z.ZodLiteral<"pie">;
|
|
1184
1186
|
}, z.core.$strip>], "type">;
|
|
1185
1187
|
created_at: z.ZodString;
|
|
1188
|
+
flow_data_id: z.ZodNumber;
|
|
1189
|
+
report_uuid: z.ZodString;
|
|
1186
1190
|
flow_data: z.ZodOptional<z.ZodObject<{
|
|
1187
1191
|
is_materialized: z.ZodNullable<z.ZodBoolean>;
|
|
1188
1192
|
last_materialized_at: z.ZodNullable<z.ZodString>;
|
|
@@ -1193,8 +1197,6 @@ declare const V1FrontendVisualizationSchema: z.ZodObject<{
|
|
|
1193
1197
|
running: "running";
|
|
1194
1198
|
}>>;
|
|
1195
1199
|
}, z.core.$strip>>;
|
|
1196
|
-
flow_data_id: z.ZodNumber;
|
|
1197
|
-
report_uuid: z.ZodString;
|
|
1198
1200
|
materialization: z.ZodOptional<z.ZodObject<{
|
|
1199
1201
|
is_materialized: z.ZodNullable<z.ZodBoolean>;
|
|
1200
1202
|
last_materialized_at: z.ZodNullable<z.ZodString>;
|
|
@@ -1207,10 +1209,10 @@ declare const V1FrontendVisualizationSchema: z.ZodObject<{
|
|
|
1207
1209
|
}, z.core.$strip>>;
|
|
1208
1210
|
}, z.core.$strip>;
|
|
1209
1211
|
|
|
1210
|
-
export declare const Visualization: ForwardRefExoticComponent<
|
|
1211
|
-
visualizationId:
|
|
1212
|
-
withTitle: boolean;
|
|
1213
|
-
exportingEnabled?: boolean;
|
|
1212
|
+
export declare const Visualization: ForwardRefExoticComponent<{
|
|
1213
|
+
visualizationId: string;
|
|
1214
|
+
withTitle: boolean;
|
|
1215
|
+
exportingEnabled?: boolean;
|
|
1214
1216
|
} & RefAttributes<HTMLDivElement>>;
|
|
1215
1217
|
|
|
1216
1218
|
export declare type WebComponentManagedModalProps = StandaloneManagedModalProps & {
|