@magemetrics/core 0.13.0 → 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/README.md +220 -0
- package/dist/index.d.ts +794 -28
- package/dist/index.js +977 -334
- package/package.json +8 -8
package/dist/index.d.ts
CHANGED
|
@@ -9,8 +9,17 @@ import type { NodeBase } from '@xyflow/system';
|
|
|
9
9
|
import type { Simplify } from 'type-fest';
|
|
10
10
|
import type { Tool } from 'ai';
|
|
11
11
|
import type { UIMessage } from 'ai';
|
|
12
|
+
import type { UIMessagePart } from 'ai';
|
|
12
13
|
import { z } from 'zod';
|
|
13
14
|
|
|
15
|
+
export declare const ASK_USER_QUESTION: "askUserQuestion";
|
|
16
|
+
|
|
17
|
+
export declare type AskUserQuestionInput = z.infer<typeof inputSchema_9>;
|
|
18
|
+
|
|
19
|
+
export declare type AskUserQuestionPart = Extract<MMChatUIMessagePart, {
|
|
20
|
+
type: `tool-${typeof ASK_USER_QUESTION}`;
|
|
21
|
+
}>;
|
|
22
|
+
|
|
14
23
|
/**
|
|
15
24
|
* Universal storage adapter interface for cross-platform compatibility.
|
|
16
25
|
* All operations are async to accommodate different storage mechanisms.
|
|
@@ -111,6 +120,11 @@ export declare interface AuthProvider {
|
|
|
111
120
|
* @param listener the listener to remove
|
|
112
121
|
*/
|
|
113
122
|
removeEventListener<T extends MageMetricsEvent>(type: T["type"], listener: MageMetricsEventListener<T>): void;
|
|
123
|
+
/**
|
|
124
|
+
* Clean up resources held by the auth provider.
|
|
125
|
+
* Called when the provider is no longer needed (e.g., client is being replaced).
|
|
126
|
+
*/
|
|
127
|
+
destroy(): void;
|
|
114
128
|
}
|
|
115
129
|
|
|
116
130
|
/**
|
|
@@ -128,6 +142,39 @@ export declare class BrowserStorageAdapter implements AsyncStorage {
|
|
|
128
142
|
removeItem(key: string): Promise<void>;
|
|
129
143
|
}
|
|
130
144
|
|
|
145
|
+
export declare type CanonicalDataType = z.infer<typeof CanonicalDataTypeSchema>;
|
|
146
|
+
|
|
147
|
+
declare const CanonicalDataTypeSchema: z.ZodEnum<{
|
|
148
|
+
boolean: "boolean";
|
|
149
|
+
array: "array";
|
|
150
|
+
text: "text";
|
|
151
|
+
json: "json";
|
|
152
|
+
other: "other";
|
|
153
|
+
datetime: "datetime";
|
|
154
|
+
numeric: "numeric";
|
|
155
|
+
}>;
|
|
156
|
+
|
|
157
|
+
/** Allowed media types for chat file attachments. */
|
|
158
|
+
export declare const CHAT_ALLOWED_FILE_MEDIA_TYPES: Set<string>;
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* Value for the HTML `<input accept>` attribute, derived from
|
|
162
|
+
* {@link CHAT_ALLOWED_FILE_MEDIA_TYPES} so it stays in sync automatically.
|
|
163
|
+
*/
|
|
164
|
+
export declare const CHAT_FILE_ACCEPT: string;
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* Maximum combined size of all chat file attachments in a single message.
|
|
168
|
+
* Intentional semantic alias of the conversation-level budget.
|
|
169
|
+
*/
|
|
170
|
+
export declare const CHAT_MAX_COMBINED_FILE_SIZE: number;
|
|
171
|
+
|
|
172
|
+
/** Maximum number of file attachments per message. */
|
|
173
|
+
export declare const CHAT_MAX_FILE_COUNT = 10;
|
|
174
|
+
|
|
175
|
+
/** Maximum size of a single chat file attachment in bytes (10 MB). */
|
|
176
|
+
export declare const CHAT_MAX_FILE_SIZE: number;
|
|
177
|
+
|
|
131
178
|
export declare const CHECK_KEY = "mm-ai-check-key";
|
|
132
179
|
|
|
133
180
|
export declare interface ColumnSort {
|
|
@@ -145,6 +192,10 @@ declare interface components {
|
|
|
145
192
|
unit?: string;
|
|
146
193
|
/** @enum {string} */
|
|
147
194
|
canonicalDataType?: "numeric" | "boolean" | "datetime" | "text" | "array" | "json" | "other";
|
|
195
|
+
formatHint?: {
|
|
196
|
+
isNumeric?: boolean;
|
|
197
|
+
isLikelyYear?: boolean;
|
|
198
|
+
};
|
|
148
199
|
}[];
|
|
149
200
|
/** Format: uuid */
|
|
150
201
|
CanvasId: string;
|
|
@@ -378,6 +429,12 @@ declare interface components {
|
|
|
378
429
|
/** Format: uuid */
|
|
379
430
|
agent_version_id?: string | null;
|
|
380
431
|
cached?: boolean;
|
|
432
|
+
/** Format: uuid */
|
|
433
|
+
cached_from?: string | null;
|
|
434
|
+
/** @default 0 */
|
|
435
|
+
report_count: number;
|
|
436
|
+
/** @default 0 */
|
|
437
|
+
visualization_count: number;
|
|
381
438
|
};
|
|
382
439
|
StartAgentRunRequest: {
|
|
383
440
|
/** Format: uuid */
|
|
@@ -709,6 +766,7 @@ export declare class DirectAuthProvider implements AuthProvider {
|
|
|
709
766
|
signal?: AbortSignal;
|
|
710
767
|
}): void;
|
|
711
768
|
removeEventListener<T extends MageMetricsEvent>(type: T["type"], listener: MageMetricsEventListener<T>): void;
|
|
769
|
+
destroy(): void;
|
|
712
770
|
private setState;
|
|
713
771
|
}
|
|
714
772
|
|
|
@@ -732,6 +790,7 @@ export declare class ExternalAuthProvider implements AuthProvider {
|
|
|
732
790
|
private processedJwt;
|
|
733
791
|
private userId;
|
|
734
792
|
private events;
|
|
793
|
+
private authSubscription;
|
|
735
794
|
constructor(config: ExternalAuthProviderConfig);
|
|
736
795
|
initialize(): Promise<void>;
|
|
737
796
|
getHeaders(): Promise<Record<string, string>>;
|
|
@@ -745,6 +804,7 @@ export declare class ExternalAuthProvider implements AuthProvider {
|
|
|
745
804
|
removeEventListener<T extends MageMetricsEvent>(type: T["type"], listener: MageMetricsEventListener<T>): void;
|
|
746
805
|
startAutoRefresh(): Promise<void> | undefined;
|
|
747
806
|
stopAutoRefresh(): Promise<void> | undefined;
|
|
807
|
+
destroy(): void;
|
|
748
808
|
private getApiInformation;
|
|
749
809
|
private initializeSupabaseClient;
|
|
750
810
|
private handleAuthentication;
|
|
@@ -767,7 +827,18 @@ export declare interface ExternalAuthProviderConfig {
|
|
|
767
827
|
authOptions?: Pick<GoTrueClientOptions, "fetch">;
|
|
768
828
|
}
|
|
769
829
|
|
|
770
|
-
declare type
|
|
830
|
+
export declare type FrontendFlow = z.infer<typeof FrontendFlowSchema>;
|
|
831
|
+
|
|
832
|
+
declare const FrontendFlowSchema: z.ZodObject<{
|
|
833
|
+
title: z.ZodNullable<z.ZodString>;
|
|
834
|
+
id: z.ZodString;
|
|
835
|
+
request: z.ZodString;
|
|
836
|
+
created_at: z.ZodString;
|
|
837
|
+
application_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
838
|
+
user_id: z.ZodNullable<z.ZodString>;
|
|
839
|
+
}, z.core.$strip>;
|
|
840
|
+
|
|
841
|
+
export declare type FrontendRecentFlows = z.infer<typeof FrontendRecentFlowsSchema>;
|
|
771
842
|
|
|
772
843
|
declare const FrontendRecentFlowsSchema: z.ZodObject<{
|
|
773
844
|
title: z.ZodNullable<z.ZodString>;
|
|
@@ -776,13 +847,310 @@ declare const FrontendRecentFlowsSchema: z.ZodObject<{
|
|
|
776
847
|
created_at: z.ZodString;
|
|
777
848
|
application_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
778
849
|
user_id: z.ZodNullable<z.ZodString>;
|
|
779
|
-
context_tokens: z.ZodOptional<z.ZodNumber>;
|
|
780
|
-
acc_input_tokens: z.ZodOptional<z.ZodNumber>;
|
|
781
|
-
acc_output_tokens: z.ZodOptional<z.ZodNumber>;
|
|
782
850
|
}, z.core.$strip>;
|
|
783
851
|
|
|
852
|
+
export declare type FrontendRecommendations = z.infer<typeof FrontendRecommendationsSchema>;
|
|
853
|
+
|
|
854
|
+
declare const FrontendRecommendationsSchema: z.ZodObject<{
|
|
855
|
+
starter: z.ZodString;
|
|
856
|
+
explanation: z.ZodString;
|
|
857
|
+
type: z.ZodString;
|
|
858
|
+
}, z.core.$strip>;
|
|
859
|
+
|
|
860
|
+
export declare type FrontendReport = z.infer<typeof FrontendReportSchema>;
|
|
861
|
+
|
|
862
|
+
export declare type FrontendReportColumns = z.infer<typeof FrontendReportColumnsSchema>;
|
|
863
|
+
|
|
864
|
+
declare const FrontendReportColumnsSchema: z.ZodArray<z.ZodObject<{
|
|
865
|
+
dataType: z.ZodString;
|
|
866
|
+
renderType: z.ZodOptional<z.ZodString>;
|
|
867
|
+
unit: z.ZodOptional<z.ZodString>;
|
|
868
|
+
canonicalDataType: z.ZodOptional<z.ZodEnum<{
|
|
869
|
+
boolean: "boolean";
|
|
870
|
+
array: "array";
|
|
871
|
+
text: "text";
|
|
872
|
+
json: "json";
|
|
873
|
+
other: "other";
|
|
874
|
+
datetime: "datetime";
|
|
875
|
+
numeric: "numeric";
|
|
876
|
+
}>>;
|
|
877
|
+
formatHint: z.ZodOptional<z.ZodObject<{
|
|
878
|
+
isNumeric: z.ZodOptional<z.ZodBoolean>;
|
|
879
|
+
isLikelyYear: z.ZodOptional<z.ZodBoolean>;
|
|
880
|
+
}, z.core.$strip>>;
|
|
881
|
+
name: z.ZodString;
|
|
882
|
+
data_type: z.ZodString;
|
|
883
|
+
}, z.core.$strip>>;
|
|
884
|
+
|
|
885
|
+
export declare type FrontendReportExplainability = z.infer<typeof FrontendReportExplainabilitySchema>;
|
|
886
|
+
|
|
887
|
+
declare const FrontendReportExplainabilitySchema: z.ZodObject<{
|
|
888
|
+
columns_lineage: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
889
|
+
nodes: z.ZodArray<z.ZodObject<{
|
|
890
|
+
id: z.ZodString;
|
|
891
|
+
type: z.ZodEnum<{
|
|
892
|
+
result: "result";
|
|
893
|
+
filter: "filter";
|
|
894
|
+
entity: "entity";
|
|
895
|
+
attribute: "attribute";
|
|
896
|
+
process: "process";
|
|
897
|
+
combine: "combine";
|
|
898
|
+
}>;
|
|
899
|
+
explanation: z.ZodString;
|
|
900
|
+
}, z.core.$strip>>;
|
|
901
|
+
edges: z.ZodArray<z.ZodObject<{
|
|
902
|
+
source: z.ZodString;
|
|
903
|
+
target: z.ZodString;
|
|
904
|
+
}, z.core.$strip>>;
|
|
905
|
+
}, z.core.$strip>>>>;
|
|
906
|
+
report_id: z.ZodUUID;
|
|
907
|
+
sql_explanation: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
908
|
+
chunk_title: z.ZodString;
|
|
909
|
+
chunk_explanation: z.ZodString;
|
|
910
|
+
lines: z.ZodArray<z.ZodObject<{
|
|
911
|
+
sql: z.ZodString;
|
|
912
|
+
explanation: z.ZodString;
|
|
913
|
+
}, z.core.$strip>>;
|
|
914
|
+
}, z.core.$strip>>>>;
|
|
915
|
+
business_explanation: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
916
|
+
summary: z.ZodString;
|
|
917
|
+
implementation: z.ZodArray<z.ZodString>;
|
|
918
|
+
assumptions: z.ZodArray<z.ZodObject<{
|
|
919
|
+
type: z.ZodEnum<{
|
|
920
|
+
grain: "grain";
|
|
921
|
+
completeness: "completeness";
|
|
922
|
+
transformation: "transformation";
|
|
923
|
+
relationship: "relationship";
|
|
924
|
+
other: "other";
|
|
925
|
+
}>;
|
|
926
|
+
details: z.ZodString;
|
|
927
|
+
explanation: z.ZodString;
|
|
928
|
+
}, z.core.$strip>>;
|
|
929
|
+
}, z.core.$strip>>>;
|
|
930
|
+
flow_data_id: z.ZodNumber;
|
|
931
|
+
confidence_score: z.ZodOptional<z.ZodNumber>;
|
|
932
|
+
confidence_score_reason: z.ZodOptional<z.ZodString>;
|
|
933
|
+
assumptions_score: z.ZodOptional<z.ZodNumber>;
|
|
934
|
+
assumptions_score_reason: z.ZodOptional<z.ZodString>;
|
|
935
|
+
friendliness_score: z.ZodOptional<z.ZodNumber>;
|
|
936
|
+
friendliness_score_reason: z.ZodOptional<z.ZodString>;
|
|
937
|
+
output_dataset: z.ZodOptional<z.ZodString>;
|
|
938
|
+
sql: z.ZodOptional<z.ZodString>;
|
|
939
|
+
}, z.core.$strip>;
|
|
940
|
+
|
|
941
|
+
declare const FrontendReportSchema: z.ZodObject<{
|
|
942
|
+
status: z.ZodNullable<z.ZodString>;
|
|
943
|
+
title: z.ZodString;
|
|
944
|
+
id: z.ZodNumber;
|
|
945
|
+
uuid: z.ZodString;
|
|
946
|
+
request: z.ZodNullable<z.ZodString>;
|
|
947
|
+
created_at: z.ZodString;
|
|
948
|
+
data_summary: z.ZodObject<{
|
|
949
|
+
columns: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
950
|
+
position: z.ZodOptional<z.ZodNumber>;
|
|
951
|
+
data_type: z.ZodString;
|
|
952
|
+
null_count: z.ZodNullable<z.ZodNumber>;
|
|
953
|
+
unique_count: z.ZodNullable<z.ZodNumber>;
|
|
954
|
+
unique_percentage: z.ZodNullable<z.ZodNumber>;
|
|
955
|
+
min_value: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
956
|
+
max_value: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
957
|
+
avg_value: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
958
|
+
median_value: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
959
|
+
std_value: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
960
|
+
min_date: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
961
|
+
max_date: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
962
|
+
min_length: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
963
|
+
max_length: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
964
|
+
avg_length: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
965
|
+
}, z.core.$loose>>;
|
|
966
|
+
}, z.core.$loose>;
|
|
967
|
+
is_removed: z.ZodBoolean;
|
|
968
|
+
is_materialized: z.ZodNullable<z.ZodBoolean>;
|
|
969
|
+
last_materialized_at: z.ZodNullable<z.ZodString>;
|
|
970
|
+
materialized_error_message: z.ZodNullable<z.ZodString>;
|
|
971
|
+
materialized_status: z.ZodNullable<z.ZodEnum<{
|
|
972
|
+
completed: "completed";
|
|
973
|
+
failed: "failed";
|
|
974
|
+
running: "running";
|
|
975
|
+
}>>;
|
|
976
|
+
}, z.core.$strip>;
|
|
977
|
+
|
|
978
|
+
export declare type FrontendVisualization = z.output<typeof FrontendVisualizationSchema>;
|
|
979
|
+
|
|
980
|
+
declare const FrontendVisualizationSchema: z.ZodObject<{
|
|
981
|
+
id: z.ZodNumber;
|
|
982
|
+
uuid: z.ZodString;
|
|
983
|
+
configuration: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
984
|
+
config_version: z.ZodLiteral<2>;
|
|
985
|
+
xAxisLabel: z.ZodString;
|
|
986
|
+
yAxisLabel: z.ZodString;
|
|
987
|
+
categoryColumn: z.ZodString;
|
|
988
|
+
secondaryCategoryColumn: z.ZodOptional<z.ZodString>;
|
|
989
|
+
valueColumn: z.ZodString;
|
|
990
|
+
title: z.ZodString;
|
|
991
|
+
type: z.ZodLiteral<"bar">;
|
|
992
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
993
|
+
xAxisColumn: z.ZodString;
|
|
994
|
+
valueColumns: z.ZodArray<z.ZodString>;
|
|
995
|
+
yAxisLabels: z.ZodArray<z.ZodString>;
|
|
996
|
+
title: z.ZodString;
|
|
997
|
+
type: z.ZodLiteral<"line/area">;
|
|
998
|
+
config_version: z.ZodLiteral<2>;
|
|
999
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1000
|
+
config_version: z.ZodLiteral<2>;
|
|
1001
|
+
valueColumn: z.ZodString;
|
|
1002
|
+
xAxisColumn: z.ZodString;
|
|
1003
|
+
xAxisLabel: z.ZodString;
|
|
1004
|
+
yAxisLabel: z.ZodString;
|
|
1005
|
+
categoryColumn: z.ZodString;
|
|
1006
|
+
title: z.ZodString;
|
|
1007
|
+
type: z.ZodLiteral<"line/area-categorical">;
|
|
1008
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1009
|
+
config_version: z.ZodLiteral<2>;
|
|
1010
|
+
xAxisLabel: z.ZodString;
|
|
1011
|
+
yAxisLabel: z.ZodString;
|
|
1012
|
+
xAxisValueColumn: z.ZodString;
|
|
1013
|
+
yAxisValueColumn: z.ZodString;
|
|
1014
|
+
title: z.ZodString;
|
|
1015
|
+
type: z.ZodLiteral<"scatter">;
|
|
1016
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1017
|
+
config_version: z.ZodLiteral<2>;
|
|
1018
|
+
categoryColumn: z.ZodString;
|
|
1019
|
+
valueColumn: z.ZodString;
|
|
1020
|
+
title: z.ZodString;
|
|
1021
|
+
type: z.ZodLiteral<"pie">;
|
|
1022
|
+
}, z.core.$strip>], "type">;
|
|
1023
|
+
created_at: z.ZodString;
|
|
1024
|
+
flow_data_id: z.ZodNumber;
|
|
1025
|
+
report_uuid: z.ZodString;
|
|
1026
|
+
flow_data: z.ZodOptional<z.ZodObject<{
|
|
1027
|
+
is_materialized: z.ZodNullable<z.ZodBoolean>;
|
|
1028
|
+
last_materialized_at: z.ZodNullable<z.ZodString>;
|
|
1029
|
+
materialized_error_message: z.ZodNullable<z.ZodString>;
|
|
1030
|
+
materialized_status: z.ZodNullable<z.ZodEnum<{
|
|
1031
|
+
completed: "completed";
|
|
1032
|
+
failed: "failed";
|
|
1033
|
+
running: "running";
|
|
1034
|
+
}>>;
|
|
1035
|
+
}, z.core.$strip>>;
|
|
1036
|
+
materialization: z.ZodOptional<z.ZodObject<{
|
|
1037
|
+
is_materialized: z.ZodNullable<z.ZodBoolean>;
|
|
1038
|
+
last_materialized_at: z.ZodNullable<z.ZodString>;
|
|
1039
|
+
materialized_error_message: z.ZodNullable<z.ZodString>;
|
|
1040
|
+
materialized_status: z.ZodNullable<z.ZodEnum<{
|
|
1041
|
+
completed: "completed";
|
|
1042
|
+
failed: "failed";
|
|
1043
|
+
running: "running";
|
|
1044
|
+
}>>;
|
|
1045
|
+
}, z.core.$strip>>;
|
|
1046
|
+
}, z.core.$strip>;
|
|
1047
|
+
|
|
1048
|
+
export declare type FrontendVisualizationWithData = z.output<typeof FrontendVisualizationWithDataSchema>;
|
|
1049
|
+
|
|
1050
|
+
declare const FrontendVisualizationWithDataSchema: z.ZodObject<{
|
|
1051
|
+
id: z.ZodNumber;
|
|
1052
|
+
uuid: z.ZodString;
|
|
1053
|
+
configuration: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1054
|
+
config_version: z.ZodLiteral<2>;
|
|
1055
|
+
xAxisLabel: z.ZodString;
|
|
1056
|
+
yAxisLabel: z.ZodString;
|
|
1057
|
+
categoryColumn: z.ZodString;
|
|
1058
|
+
secondaryCategoryColumn: z.ZodOptional<z.ZodString>;
|
|
1059
|
+
valueColumn: z.ZodString;
|
|
1060
|
+
title: z.ZodString;
|
|
1061
|
+
type: z.ZodLiteral<"bar">;
|
|
1062
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1063
|
+
xAxisColumn: z.ZodString;
|
|
1064
|
+
valueColumns: z.ZodArray<z.ZodString>;
|
|
1065
|
+
yAxisLabels: z.ZodArray<z.ZodString>;
|
|
1066
|
+
title: z.ZodString;
|
|
1067
|
+
type: z.ZodLiteral<"line/area">;
|
|
1068
|
+
config_version: z.ZodLiteral<2>;
|
|
1069
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1070
|
+
config_version: z.ZodLiteral<2>;
|
|
1071
|
+
valueColumn: z.ZodString;
|
|
1072
|
+
xAxisColumn: z.ZodString;
|
|
1073
|
+
xAxisLabel: z.ZodString;
|
|
1074
|
+
yAxisLabel: z.ZodString;
|
|
1075
|
+
categoryColumn: z.ZodString;
|
|
1076
|
+
title: z.ZodString;
|
|
1077
|
+
type: z.ZodLiteral<"line/area-categorical">;
|
|
1078
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1079
|
+
config_version: z.ZodLiteral<2>;
|
|
1080
|
+
xAxisLabel: z.ZodString;
|
|
1081
|
+
yAxisLabel: z.ZodString;
|
|
1082
|
+
xAxisValueColumn: z.ZodString;
|
|
1083
|
+
yAxisValueColumn: z.ZodString;
|
|
1084
|
+
title: z.ZodString;
|
|
1085
|
+
type: z.ZodLiteral<"scatter">;
|
|
1086
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1087
|
+
config_version: z.ZodLiteral<2>;
|
|
1088
|
+
categoryColumn: z.ZodString;
|
|
1089
|
+
valueColumn: z.ZodString;
|
|
1090
|
+
title: z.ZodString;
|
|
1091
|
+
type: z.ZodLiteral<"pie">;
|
|
1092
|
+
}, z.core.$strip>], "type">;
|
|
1093
|
+
created_at: z.ZodString;
|
|
1094
|
+
flow_data_id: z.ZodNumber;
|
|
1095
|
+
report_uuid: z.ZodString;
|
|
1096
|
+
flow_data: z.ZodOptional<z.ZodObject<{
|
|
1097
|
+
is_materialized: z.ZodNullable<z.ZodBoolean>;
|
|
1098
|
+
last_materialized_at: z.ZodNullable<z.ZodString>;
|
|
1099
|
+
materialized_error_message: z.ZodNullable<z.ZodString>;
|
|
1100
|
+
materialized_status: z.ZodNullable<z.ZodEnum<{
|
|
1101
|
+
completed: "completed";
|
|
1102
|
+
failed: "failed";
|
|
1103
|
+
running: "running";
|
|
1104
|
+
}>>;
|
|
1105
|
+
}, z.core.$strip>>;
|
|
1106
|
+
materialization: z.ZodOptional<z.ZodObject<{
|
|
1107
|
+
is_materialized: z.ZodNullable<z.ZodBoolean>;
|
|
1108
|
+
last_materialized_at: z.ZodNullable<z.ZodString>;
|
|
1109
|
+
materialized_error_message: z.ZodNullable<z.ZodString>;
|
|
1110
|
+
materialized_status: z.ZodNullable<z.ZodEnum<{
|
|
1111
|
+
completed: "completed";
|
|
1112
|
+
failed: "failed";
|
|
1113
|
+
running: "running";
|
|
1114
|
+
}>>;
|
|
1115
|
+
}, z.core.$strip>>;
|
|
1116
|
+
data: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodDate, z.ZodCoercedNumber<unknown>, z.ZodPipe<z.ZodUnknown, z.ZodTransform<"empty" | (string & {}) | null, unknown>>]>>>;
|
|
1117
|
+
_metadata: z.ZodOptional<z.ZodObject<{
|
|
1118
|
+
wasSampled: z.ZodBoolean;
|
|
1119
|
+
originalCount: z.ZodNumber;
|
|
1120
|
+
sampledCount: z.ZodNumber;
|
|
1121
|
+
}, z.core.$strip>>;
|
|
1122
|
+
}, z.core.$strip>;
|
|
1123
|
+
|
|
1124
|
+
export declare const GENERATE_DATA_REPORT: "generateDataReport";
|
|
1125
|
+
|
|
1126
|
+
export declare const GENERATE_VISUALIZATION: "generateVisualization";
|
|
1127
|
+
|
|
1128
|
+
export declare const GET_AVAILABLE_COLUMNS_FOR_TABLE: "getAvailableColumnsForTable";
|
|
1129
|
+
|
|
1130
|
+
export declare const GET_AVAILABLE_TABLES: "getAvailableTables";
|
|
1131
|
+
|
|
1132
|
+
export declare const getMessageTextContent: (message: MMChatUIMessage) => string | undefined;
|
|
1133
|
+
|
|
784
1134
|
export declare const getPublicApiClient: (apiUrl: string, apiKey: string) => Client<PublicPaths>;
|
|
785
1135
|
|
|
1136
|
+
/**
|
|
1137
|
+
* Extracts an uploaded file id from a `uploaded-file:{id}` reference.
|
|
1138
|
+
* @param url the url of the file
|
|
1139
|
+
* @returns file id
|
|
1140
|
+
*/
|
|
1141
|
+
export declare const getUploadedFileIdFromUrl: (url: string) => string | null;
|
|
1142
|
+
|
|
1143
|
+
/**
|
|
1144
|
+
* Returns true when a flow contains only the initial user message created via
|
|
1145
|
+
* `createFlow(...)` and no assistant response yet.
|
|
1146
|
+
*
|
|
1147
|
+
* In headless AI SDK integrations, this is the state where the frontend should
|
|
1148
|
+
* trigger a one-time `regenerate()` to start the first assistant turn.
|
|
1149
|
+
* @param messages - Chat messages for the flow.
|
|
1150
|
+
* @returns Whether the flow still has only its initial user message.
|
|
1151
|
+
*/
|
|
1152
|
+
export declare const hasOnlyInitialUserMessage: (messages: MMChatUIMessage[]) => boolean;
|
|
1153
|
+
|
|
786
1154
|
declare const HEADER_SP_TOKEN: "sp-access-token";
|
|
787
1155
|
|
|
788
1156
|
declare const inputSchema: z.ZodObject<{
|
|
@@ -851,11 +1219,21 @@ declare const inputSchema_9: z.ZodObject<{
|
|
|
851
1219
|
}, z.core.$strip>>;
|
|
852
1220
|
}, z.core.$strip>;
|
|
853
1221
|
|
|
1222
|
+
export declare const isAskUserQuestionPart: (part: MMChatUIMessagePart) => part is AskUserQuestionPart;
|
|
1223
|
+
|
|
1224
|
+
export declare const isFrontendV1Visualization: (visualization: FrontendVisualization | V1FrontendVisualization) => visualization is V1FrontendVisualization;
|
|
1225
|
+
|
|
1226
|
+
export declare const isFrontendV1VisualizationWithData: (visualization: FrontendVisualizationWithData | V1FrontendVisualizationWithData) => visualization is V1FrontendVisualizationWithData;
|
|
1227
|
+
|
|
1228
|
+
export declare const isFrontendV2Visualization: (visualization: FrontendVisualization | V1FrontendVisualization) => visualization is FrontendVisualization;
|
|
1229
|
+
|
|
1230
|
+
export declare const isFrontendV2VisualizationWithData: (visualization: FrontendVisualizationWithData | V1FrontendVisualizationWithData) => visualization is FrontendVisualizationWithData;
|
|
1231
|
+
|
|
854
1232
|
export declare class MageMetricsChatTransport extends DefaultChatTransport<MMChatUIMessage> {
|
|
855
1233
|
constructor(apiUrl: string, flowId: string, options: MageMetricsChatTransportOptions);
|
|
856
1234
|
}
|
|
857
1235
|
|
|
858
|
-
declare type MageMetricsChatTransportOptions = Omit<HttpChatTransportInitOptions<MMChatUIMessage>, "api" | "prepareSendMessagesRequest">;
|
|
1236
|
+
export declare type MageMetricsChatTransportOptions = Omit<HttpChatTransportInitOptions<MMChatUIMessage>, "api" | "prepareSendMessagesRequest">;
|
|
859
1237
|
|
|
860
1238
|
/**
|
|
861
1239
|
* Core MageMetrics client that handles authentication lifecycle and provides
|
|
@@ -898,6 +1276,14 @@ export declare class MageMetricsClient {
|
|
|
898
1276
|
get state(): AuthState;
|
|
899
1277
|
getHeaders(): Promise<Record<string, string>>;
|
|
900
1278
|
logout(): Promise<void>;
|
|
1279
|
+
/**
|
|
1280
|
+
* Clean up all resources held by this client.
|
|
1281
|
+
* Unsubscribes auth state listeners, stops auto-refresh timers,
|
|
1282
|
+
* and removes global event listeners (e.g. visibilitychange).
|
|
1283
|
+
*
|
|
1284
|
+
* Call this before discarding a client instance to prevent leaks.
|
|
1285
|
+
*/
|
|
1286
|
+
destroy(): void;
|
|
901
1287
|
auth: {
|
|
902
1288
|
startAutoRefresh: () => Promise<void> | undefined;
|
|
903
1289
|
stopAuthRefresh: () => Promise<void> | undefined;
|
|
@@ -1103,9 +1489,6 @@ export declare class MageMetricsClient {
|
|
|
1103
1489
|
title: string | null;
|
|
1104
1490
|
user_id: string | null;
|
|
1105
1491
|
application_id?: number | null | undefined;
|
|
1106
|
-
context_tokens?: number | undefined;
|
|
1107
|
-
acc_input_tokens?: number | undefined;
|
|
1108
|
-
acc_output_tokens?: number | undefined;
|
|
1109
1492
|
}>;
|
|
1110
1493
|
getRecentFlows: (params?: {
|
|
1111
1494
|
limit?: number;
|
|
@@ -1134,9 +1517,6 @@ export declare class MageMetricsClient {
|
|
|
1134
1517
|
title: string | null;
|
|
1135
1518
|
user_id: string | null;
|
|
1136
1519
|
application_id?: number | null | undefined;
|
|
1137
|
-
context_tokens?: number | undefined;
|
|
1138
|
-
acc_input_tokens?: number | undefined;
|
|
1139
|
-
acc_output_tokens?: number | undefined;
|
|
1140
1520
|
}[];
|
|
1141
1521
|
}[]>;
|
|
1142
1522
|
get: (canvasId: string) => Promise<{
|
|
@@ -1182,6 +1562,10 @@ export declare class MageMetricsClient {
|
|
|
1182
1562
|
renderType?: string | undefined;
|
|
1183
1563
|
unit?: string | undefined;
|
|
1184
1564
|
canonicalDataType?: "numeric" | "boolean" | "datetime" | "text" | "array" | "json" | "other" | undefined;
|
|
1565
|
+
formatHint?: {
|
|
1566
|
+
isNumeric?: boolean | undefined;
|
|
1567
|
+
isLikelyYear?: boolean | undefined;
|
|
1568
|
+
} | undefined;
|
|
1185
1569
|
}[];
|
|
1186
1570
|
rowCount: {
|
|
1187
1571
|
count: number;
|
|
@@ -1195,6 +1579,7 @@ export declare class MageMetricsClient {
|
|
|
1195
1579
|
explanation: string;
|
|
1196
1580
|
type: string;
|
|
1197
1581
|
}[]>;
|
|
1582
|
+
getPromptStarters: (input?: string) => Promise<PromptStarter[]>;
|
|
1198
1583
|
};
|
|
1199
1584
|
client(): PublicApiClient;
|
|
1200
1585
|
private createSupabaseHeaderMiddleware;
|
|
@@ -1255,7 +1640,9 @@ export declare class MemoryStorageAdapter implements AsyncStorage {
|
|
|
1255
1640
|
|
|
1256
1641
|
export declare type MMChatUIMessage = UIMessage<unknown, CustomDataParts, MMUiTools>;
|
|
1257
1642
|
|
|
1258
|
-
declare type
|
|
1643
|
+
export declare type MMChatUIMessagePart = UIMessagePart<CustomDataParts, MMUiTools>;
|
|
1644
|
+
|
|
1645
|
+
export declare type MMUiTools = {
|
|
1259
1646
|
generateDataReport: UiTool;
|
|
1260
1647
|
generateVisualization: UiTool_2;
|
|
1261
1648
|
think: UiTool_3;
|
|
@@ -1471,6 +1858,8 @@ declare interface operations {
|
|
|
1471
1858
|
content: {
|
|
1472
1859
|
"application/json": {
|
|
1473
1860
|
error: string;
|
|
1861
|
+
/** @enum {string} */
|
|
1862
|
+
code: "QUERY_LIMIT_EXCEEDED" | "QUERY_TIMEOUT" | "QUERY_EXECUTION_FAILED";
|
|
1474
1863
|
};
|
|
1475
1864
|
};
|
|
1476
1865
|
};
|
|
@@ -1531,6 +1920,8 @@ declare interface operations {
|
|
|
1531
1920
|
content: {
|
|
1532
1921
|
"application/json": {
|
|
1533
1922
|
error: string;
|
|
1923
|
+
/** @enum {string} */
|
|
1924
|
+
code: "QUERY_LIMIT_EXCEEDED" | "QUERY_TIMEOUT" | "QUERY_EXECUTION_FAILED";
|
|
1534
1925
|
};
|
|
1535
1926
|
};
|
|
1536
1927
|
};
|
|
@@ -1592,6 +1983,7 @@ declare interface operations {
|
|
|
1592
1983
|
query?: never;
|
|
1593
1984
|
header?: never;
|
|
1594
1985
|
path: {
|
|
1986
|
+
/** @description Numeric legacy ID or UUID */
|
|
1595
1987
|
visualization_id: string;
|
|
1596
1988
|
canvas_id: components["schemas"]["CanvasId"];
|
|
1597
1989
|
};
|
|
@@ -1669,9 +2061,6 @@ declare interface operations {
|
|
|
1669
2061
|
title: string | null;
|
|
1670
2062
|
user_id: string | null;
|
|
1671
2063
|
application_id?: number | null;
|
|
1672
|
-
context_tokens?: number;
|
|
1673
|
-
acc_input_tokens?: number;
|
|
1674
|
-
acc_output_tokens?: number;
|
|
1675
2064
|
};
|
|
1676
2065
|
};
|
|
1677
2066
|
};
|
|
@@ -1725,9 +2114,6 @@ declare interface operations {
|
|
|
1725
2114
|
title: string | null;
|
|
1726
2115
|
user_id: string | null;
|
|
1727
2116
|
application_id?: number | null;
|
|
1728
|
-
context_tokens?: number;
|
|
1729
|
-
acc_input_tokens?: number;
|
|
1730
|
-
acc_output_tokens?: number;
|
|
1731
2117
|
}[];
|
|
1732
2118
|
};
|
|
1733
2119
|
};
|
|
@@ -1982,6 +2368,7 @@ declare interface operations {
|
|
|
1982
2368
|
query?: never;
|
|
1983
2369
|
header?: {
|
|
1984
2370
|
"sp-access-token"?: string;
|
|
2371
|
+
"X-Application-Name"?: string;
|
|
1985
2372
|
};
|
|
1986
2373
|
path?: never;
|
|
1987
2374
|
cookie?: never;
|
|
@@ -2247,6 +2634,8 @@ declare interface operations {
|
|
|
2247
2634
|
content: {
|
|
2248
2635
|
"application/json": {
|
|
2249
2636
|
error: string;
|
|
2637
|
+
/** @enum {string} */
|
|
2638
|
+
code: "QUERY_LIMIT_EXCEEDED" | "QUERY_TIMEOUT" | "QUERY_EXECUTION_FAILED";
|
|
2250
2639
|
};
|
|
2251
2640
|
};
|
|
2252
2641
|
};
|
|
@@ -2297,6 +2686,8 @@ declare interface operations {
|
|
|
2297
2686
|
content: {
|
|
2298
2687
|
"application/json": {
|
|
2299
2688
|
error: string;
|
|
2689
|
+
/** @enum {string} */
|
|
2690
|
+
code: "QUERY_LIMIT_EXCEEDED" | "QUERY_TIMEOUT" | "QUERY_EXECUTION_FAILED";
|
|
2300
2691
|
};
|
|
2301
2692
|
};
|
|
2302
2693
|
};
|
|
@@ -2626,6 +3017,7 @@ declare interface operations {
|
|
|
2626
3017
|
"sp-access-token"?: string;
|
|
2627
3018
|
};
|
|
2628
3019
|
path: {
|
|
3020
|
+
/** @description Numeric legacy ID or UUID */
|
|
2629
3021
|
visualization_id: string;
|
|
2630
3022
|
};
|
|
2631
3023
|
cookie?: never;
|
|
@@ -3131,9 +3523,6 @@ declare interface operations {
|
|
|
3131
3523
|
title: string | null;
|
|
3132
3524
|
user_id: string | null;
|
|
3133
3525
|
application_id?: number | null;
|
|
3134
|
-
context_tokens?: number;
|
|
3135
|
-
acc_input_tokens?: number;
|
|
3136
|
-
acc_output_tokens?: number;
|
|
3137
3526
|
}[];
|
|
3138
3527
|
}[];
|
|
3139
3528
|
};
|
|
@@ -5949,6 +6338,8 @@ declare interface operations {
|
|
|
5949
6338
|
};
|
|
5950
6339
|
}
|
|
5951
6340
|
|
|
6341
|
+
export declare const PAGINATE_DATA_REPORT: "paginateDataReport";
|
|
6342
|
+
|
|
5952
6343
|
declare type PatchParam<T, Config extends RemoveParamsConfig, P extends keyof Config> = Simplify<T extends {
|
|
5953
6344
|
[key in P]: infer H;
|
|
5954
6345
|
} ? H extends Partial<Record<string, unknown>> ? Config[P] extends string ? Omit<H, Config[P]> : H : never : never>;
|
|
@@ -6793,13 +7184,36 @@ declare interface paths {
|
|
|
6793
7184
|
};
|
|
6794
7185
|
}
|
|
6795
7186
|
|
|
6796
|
-
declare type
|
|
7187
|
+
export declare type PromptStarter = z.infer<typeof PromptStarterSchema>;
|
|
7188
|
+
|
|
7189
|
+
declare const PromptStarterSchema: z.ZodObject<{
|
|
7190
|
+
id: z.ZodNumber;
|
|
7191
|
+
title: z.ZodString;
|
|
7192
|
+
template: z.ZodString;
|
|
7193
|
+
is_default: z.ZodBoolean;
|
|
7194
|
+
}, z.core.$strip>;
|
|
7195
|
+
|
|
7196
|
+
export declare type PublicApiClient = Simplify<Client<PublicPaths, `${string}/${string}`>>;
|
|
6797
7197
|
|
|
6798
7198
|
declare type PublicPaths = Simplify<{
|
|
6799
7199
|
[Path in keyof paths]: RemoveAuthHeader<paths[Path]>;
|
|
6800
7200
|
}>;
|
|
6801
7201
|
|
|
6802
|
-
declare type
|
|
7202
|
+
export declare type QuestionInput = z.infer<typeof questionSchema>;
|
|
7203
|
+
|
|
7204
|
+
declare const questionSchema: z.ZodObject<{
|
|
7205
|
+
question: z.ZodString;
|
|
7206
|
+
header: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
7207
|
+
multiSelect: z.ZodBoolean;
|
|
7208
|
+
options: z.ZodArray<z.ZodObject<{
|
|
7209
|
+
label: z.ZodString;
|
|
7210
|
+
description: z.ZodString;
|
|
7211
|
+
}, z.core.$strip>>;
|
|
7212
|
+
}, z.core.$strip>;
|
|
7213
|
+
|
|
7214
|
+
export declare type QuickAction = QuickActions[number];
|
|
7215
|
+
|
|
7216
|
+
export declare type QuickActions = z.infer<typeof QuickActionsSchema>;
|
|
6803
7217
|
|
|
6804
7218
|
declare const QuickActionsSchema: z.ZodArray<z.ZodObject<{
|
|
6805
7219
|
label: z.ZodString;
|
|
@@ -6817,6 +7231,91 @@ declare const RedactedAskUserQuestionResponse: z.ZodObject<{
|
|
|
6817
7231
|
}, z.core.$strip>], "status">;
|
|
6818
7232
|
}, z.core.$strip>;
|
|
6819
7233
|
|
|
7234
|
+
export declare type RedactedAskUserQuestionResponseType = z.output<typeof RedactedAskUserQuestionResponse>;
|
|
7235
|
+
|
|
7236
|
+
declare const RedactedGenerateDataReportResponse: z.ZodObject<{
|
|
7237
|
+
tool: z.ZodDefault<z.ZodLiteral<"generateDataReport">>;
|
|
7238
|
+
result: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
7239
|
+
status: z.ZodLiteral<"success">;
|
|
7240
|
+
public: z.ZodObject<{
|
|
7241
|
+
flowDataId: z.ZodNumber;
|
|
7242
|
+
reportId: z.ZodString;
|
|
7243
|
+
answer: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
7244
|
+
title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
7245
|
+
}, z.core.$strip>;
|
|
7246
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
7247
|
+
status: z.ZodLiteral<"error">;
|
|
7248
|
+
category: z.ZodOptional<z.ZodEnum<{
|
|
7249
|
+
unknown: "unknown";
|
|
7250
|
+
timeout: "timeout";
|
|
7251
|
+
connection_error: "connection_error";
|
|
7252
|
+
auth_error: "auth_error";
|
|
7253
|
+
resource_exhausted: "resource_exhausted";
|
|
7254
|
+
table_not_found: "table_not_found";
|
|
7255
|
+
column_not_found: "column_not_found";
|
|
7256
|
+
schema_not_found: "schema_not_found";
|
|
7257
|
+
view_not_found: "view_not_found";
|
|
7258
|
+
function_not_found: "function_not_found";
|
|
7259
|
+
syntax_error: "syntax_error";
|
|
7260
|
+
ambiguous_column: "ambiguous_column";
|
|
7261
|
+
type_mismatch: "type_mismatch";
|
|
7262
|
+
invalid_cast: "invalid_cast";
|
|
7263
|
+
invalid_argument: "invalid_argument";
|
|
7264
|
+
division_by_zero: "division_by_zero";
|
|
7265
|
+
constraint_violation: "constraint_violation";
|
|
7266
|
+
permission_denied: "permission_denied";
|
|
7267
|
+
}>>;
|
|
7268
|
+
}, z.core.$strip>], "status">>;
|
|
7269
|
+
}, z.core.$strip>;
|
|
7270
|
+
|
|
7271
|
+
export declare type RedactedGenerateDataReportResponseType = z.infer<typeof RedactedGenerateDataReportResponse>;
|
|
7272
|
+
|
|
7273
|
+
declare const RedactedGenerateVisualizationResponse: z.ZodObject<{
|
|
7274
|
+
tool: z.ZodDefault<z.ZodLiteral<"generateVisualization">>;
|
|
7275
|
+
result: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
7276
|
+
status: z.ZodLiteral<"success">;
|
|
7277
|
+
public: z.ZodObject<{
|
|
7278
|
+
flowDataId: z.ZodNumber;
|
|
7279
|
+
reportId: z.ZodString;
|
|
7280
|
+
flowDataVisualizationId: z.ZodNumber;
|
|
7281
|
+
visualizationId: z.ZodString;
|
|
7282
|
+
title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
7283
|
+
type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
7284
|
+
}, z.core.$strip>;
|
|
7285
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
7286
|
+
status: z.ZodLiteral<"error">;
|
|
7287
|
+
message: z.ZodString;
|
|
7288
|
+
}, z.core.$strip>], "status">>;
|
|
7289
|
+
}, z.core.$strip>;
|
|
7290
|
+
|
|
7291
|
+
export declare type RedactedGenerateVisualizationResponseType = z.infer<typeof RedactedGenerateVisualizationResponse>;
|
|
7292
|
+
|
|
7293
|
+
declare const RedactedGetAvailableColumnsForTableResponse: z.ZodObject<{
|
|
7294
|
+
tool: z.ZodDefault<z.ZodLiteral<"getAvailableColumnsForTable">>;
|
|
7295
|
+
result: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
7296
|
+
status: z.ZodLiteral<"success">;
|
|
7297
|
+
public: z.ZodObject<{}, z.core.$loose>;
|
|
7298
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
7299
|
+
status: z.ZodLiteral<"error">;
|
|
7300
|
+
message: z.ZodString;
|
|
7301
|
+
}, z.core.$strip>], "status">>;
|
|
7302
|
+
}, z.core.$strip>;
|
|
7303
|
+
|
|
7304
|
+
export declare type RedactedGetAvailableColumnsForTableResponseType = z.infer<typeof RedactedGetAvailableColumnsForTableResponse>;
|
|
7305
|
+
|
|
7306
|
+
declare const RedactedGetAvailableTablesResponse: z.ZodObject<{
|
|
7307
|
+
tool: z.ZodDefault<z.ZodLiteral<"getAvailableTables">>;
|
|
7308
|
+
result: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
7309
|
+
status: z.ZodLiteral<"success">;
|
|
7310
|
+
public: z.ZodObject<{}, z.core.$loose>;
|
|
7311
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
7312
|
+
status: z.ZodLiteral<"error">;
|
|
7313
|
+
message: z.ZodString;
|
|
7314
|
+
}, z.core.$strip>], "status">>;
|
|
7315
|
+
}, z.core.$strip>;
|
|
7316
|
+
|
|
7317
|
+
export declare type RedactedGetAvailableTablesResponseType = z.output<typeof RedactedGetAvailableTablesResponse>;
|
|
7318
|
+
|
|
6820
7319
|
declare const redactedOutputSchema: z.ZodObject<{
|
|
6821
7320
|
tool: z.ZodLiteral<"generateDataReport">;
|
|
6822
7321
|
result: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -6948,6 +7447,24 @@ declare const redactedOutputSchema_8: z.ZodObject<{
|
|
|
6948
7447
|
}, z.core.$strip>], "status">>;
|
|
6949
7448
|
}, z.core.$strip>;
|
|
6950
7449
|
|
|
7450
|
+
declare const RedactedPaginateDataReportResponse: z.ZodObject<{
|
|
7451
|
+
tool: z.ZodDefault<z.ZodLiteral<"paginateDataReport">>;
|
|
7452
|
+
result: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
7453
|
+
status: z.ZodLiteral<"success">;
|
|
7454
|
+
public: z.ZodObject<{
|
|
7455
|
+
totalRows: z.ZodNumber;
|
|
7456
|
+
fetchedRows: z.ZodNumber;
|
|
7457
|
+
offset: z.ZodNumber;
|
|
7458
|
+
hasMore: z.ZodBoolean;
|
|
7459
|
+
}, z.core.$strip>;
|
|
7460
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
7461
|
+
status: z.ZodLiteral<"error">;
|
|
7462
|
+
message: z.ZodString;
|
|
7463
|
+
}, z.core.$strip>], "status">>;
|
|
7464
|
+
}, z.core.$strip>;
|
|
7465
|
+
|
|
7466
|
+
export declare type RedactedPaginateDataReportResponseType = z.output<typeof RedactedPaginateDataReportResponse>;
|
|
7467
|
+
|
|
6951
7468
|
declare const RedactedThinkResponse: z.ZodObject<{
|
|
6952
7469
|
tool: z.ZodDefault<z.ZodLiteral<"think">>;
|
|
6953
7470
|
result: z.ZodOptional<z.ZodObject<{
|
|
@@ -6956,6 +7473,41 @@ declare const RedactedThinkResponse: z.ZodObject<{
|
|
|
6956
7473
|
}, z.core.$strip>>;
|
|
6957
7474
|
}, z.core.$strip>;
|
|
6958
7475
|
|
|
7476
|
+
export declare type RedactedThinkResponseType = z.output<typeof RedactedThinkResponse>;
|
|
7477
|
+
|
|
7478
|
+
declare const RedactedValueBasedColumnSearchResponse: z.ZodObject<{
|
|
7479
|
+
tool: z.ZodDefault<z.ZodLiteral<"valueBasedColumnSearch">>;
|
|
7480
|
+
result: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
7481
|
+
status: z.ZodLiteral<"success">;
|
|
7482
|
+
public: z.ZodObject<{}, z.core.$loose>;
|
|
7483
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
7484
|
+
status: z.ZodLiteral<"error">;
|
|
7485
|
+
message: z.ZodString;
|
|
7486
|
+
}, z.core.$strip>], "status">>;
|
|
7487
|
+
}, z.core.$strip>;
|
|
7488
|
+
|
|
7489
|
+
export declare type RedactedValueBasedColumnSearchResponseType = z.infer<typeof RedactedValueBasedColumnSearchResponse>;
|
|
7490
|
+
|
|
7491
|
+
declare const RedactedWebSearchToolResponse: z.ZodObject<{
|
|
7492
|
+
tool: z.ZodDefault<z.ZodLiteral<"search">>;
|
|
7493
|
+
result: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
7494
|
+
status: z.ZodLiteral<"success">;
|
|
7495
|
+
public: z.ZodObject<{
|
|
7496
|
+
sources: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
7497
|
+
sourceType: z.ZodLiteral<"url">;
|
|
7498
|
+
id: z.ZodString;
|
|
7499
|
+
url: z.ZodString;
|
|
7500
|
+
title: z.ZodString;
|
|
7501
|
+
}, z.core.$strip>>>;
|
|
7502
|
+
}, z.core.$strip>;
|
|
7503
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
7504
|
+
status: z.ZodLiteral<"error">;
|
|
7505
|
+
message: z.ZodString;
|
|
7506
|
+
}, z.core.$strip>], "status">>;
|
|
7507
|
+
}, z.core.$strip>;
|
|
7508
|
+
|
|
7509
|
+
export declare type RedactedWebSearchToolResponseType = z.infer<typeof RedactedWebSearchToolResponse>;
|
|
7510
|
+
|
|
6959
7511
|
declare type RemoveAuthHeader<PathSchema> = Simplify<{
|
|
6960
7512
|
[Method in keyof PathSchema]: RemoveParams<PathSchema[Method], ToRemove>;
|
|
6961
7513
|
}>;
|
|
@@ -6978,6 +7530,8 @@ declare type RemoveParamsConfig = Simplify<{
|
|
|
6978
7530
|
cookie?: string;
|
|
6979
7531
|
}>;
|
|
6980
7532
|
|
|
7533
|
+
export declare type ReportData = z.infer<typeof ReportDataSchema>;
|
|
7534
|
+
|
|
6981
7535
|
declare type ReportDataFilters = {
|
|
6982
7536
|
columns?: string[];
|
|
6983
7537
|
limit: number;
|
|
@@ -6986,7 +7540,18 @@ declare type ReportDataFilters = {
|
|
|
6986
7540
|
cursor?: number;
|
|
6987
7541
|
};
|
|
6988
7542
|
|
|
6989
|
-
declare
|
|
7543
|
+
declare const ReportDataSchema: z.ZodArray<z.ZodObject<{}, z.core.$loose>>;
|
|
7544
|
+
|
|
7545
|
+
export declare type Signal = z.infer<typeof SignalSchema>;
|
|
7546
|
+
|
|
7547
|
+
declare const SignalSchema: z.ZodObject<{
|
|
7548
|
+
rule: z.ZodString;
|
|
7549
|
+
metric: z.ZodString;
|
|
7550
|
+
trigger: z.ZodString;
|
|
7551
|
+
implementation: z.ZodString;
|
|
7552
|
+
}, z.core.$strip>;
|
|
7553
|
+
|
|
7554
|
+
export declare type SignalWithReportId = z.infer<typeof SignalWithReportIdSchema>;
|
|
6990
7555
|
|
|
6991
7556
|
declare const SignalWithReportIdSchema: z.ZodObject<{
|
|
6992
7557
|
rule: z.ZodString;
|
|
@@ -6996,11 +7561,34 @@ declare const SignalWithReportIdSchema: z.ZodObject<{
|
|
|
6996
7561
|
reportId: z.ZodNumber;
|
|
6997
7562
|
}, z.core.$strip>;
|
|
6998
7563
|
|
|
6999
|
-
declare type SortingState = ColumnSort[];
|
|
7564
|
+
export declare type SortingState = ColumnSort[];
|
|
7000
7565
|
|
|
7001
|
-
declare
|
|
7566
|
+
export declare const SqlErrorCategory: z.ZodEnum<{
|
|
7567
|
+
unknown: "unknown";
|
|
7568
|
+
timeout: "timeout";
|
|
7569
|
+
connection_error: "connection_error";
|
|
7570
|
+
auth_error: "auth_error";
|
|
7571
|
+
resource_exhausted: "resource_exhausted";
|
|
7572
|
+
table_not_found: "table_not_found";
|
|
7573
|
+
column_not_found: "column_not_found";
|
|
7574
|
+
schema_not_found: "schema_not_found";
|
|
7575
|
+
view_not_found: "view_not_found";
|
|
7576
|
+
function_not_found: "function_not_found";
|
|
7577
|
+
syntax_error: "syntax_error";
|
|
7578
|
+
ambiguous_column: "ambiguous_column";
|
|
7579
|
+
type_mismatch: "type_mismatch";
|
|
7580
|
+
invalid_cast: "invalid_cast";
|
|
7581
|
+
invalid_argument: "invalid_argument";
|
|
7582
|
+
division_by_zero: "division_by_zero";
|
|
7583
|
+
constraint_violation: "constraint_violation";
|
|
7584
|
+
permission_denied: "permission_denied";
|
|
7585
|
+
}>;
|
|
7586
|
+
|
|
7587
|
+
export declare type SqlErrorCategory = z.infer<typeof SqlErrorCategory>;
|
|
7002
7588
|
|
|
7003
|
-
declare type
|
|
7589
|
+
export declare type TableFilters = Record<string, TableFilterValue>;
|
|
7590
|
+
|
|
7591
|
+
export declare type TableFilterValue = z.infer<typeof TableFilterValueSchema>;
|
|
7004
7592
|
|
|
7005
7593
|
declare const TableFilterValueSchema: z.ZodObject<{
|
|
7006
7594
|
operator: z.ZodEnum<{
|
|
@@ -7019,6 +7607,8 @@ declare const TableFilterValueSchema: z.ZodObject<{
|
|
|
7019
7607
|
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>]>;
|
|
7020
7608
|
}, z.core.$strip>;
|
|
7021
7609
|
|
|
7610
|
+
export declare const THINK: "think";
|
|
7611
|
+
|
|
7022
7612
|
/**
|
|
7023
7613
|
* Token storage keys
|
|
7024
7614
|
*/
|
|
@@ -7028,6 +7618,25 @@ declare type ToRemove = {
|
|
|
7028
7618
|
header: typeof HEADER_SP_TOKEN;
|
|
7029
7619
|
};
|
|
7030
7620
|
|
|
7621
|
+
export declare const toSearchParams: ({ cursor, filters, sorting, limit, }: {
|
|
7622
|
+
cursor?: number;
|
|
7623
|
+
filters?: TableFilters;
|
|
7624
|
+
sorting?: SortingState;
|
|
7625
|
+
limit?: number;
|
|
7626
|
+
}) => {
|
|
7627
|
+
limit?: number;
|
|
7628
|
+
cursor?: number;
|
|
7629
|
+
order?: string;
|
|
7630
|
+
filter?: string;
|
|
7631
|
+
};
|
|
7632
|
+
|
|
7633
|
+
/**
|
|
7634
|
+
* Builds a `uploaded-file:{id}` reference string.
|
|
7635
|
+
* @param uploadedFileId the id of the file
|
|
7636
|
+
* @returns a prefixed handler
|
|
7637
|
+
*/
|
|
7638
|
+
export declare const toUploadedFileRefUrl: (uploadedFileId: string) => string;
|
|
7639
|
+
|
|
7031
7640
|
declare type UiTool = InferUITool<Tool<z.infer<typeof inputSchema>, z.infer<typeof redactedOutputSchema>>>;
|
|
7032
7641
|
|
|
7033
7642
|
declare type UiTool_10 = InferUITool<Tool<z.infer<typeof inputSchema_10>, z.infer<typeof redactedOutputSchema_8>>>;
|
|
@@ -7056,9 +7665,166 @@ declare const UpdateCanvasSchema: z.ZodObject<{
|
|
|
7056
7665
|
is_public: z.ZodOptional<z.ZodBoolean>;
|
|
7057
7666
|
}, z.core.$strip>;
|
|
7058
7667
|
|
|
7668
|
+
/** Prefix used by new clients to reference a file uploaded separately from chat JSON. */
|
|
7669
|
+
export declare const UPLOADED_FILE_REF_PREFIX = "uploaded-file:";
|
|
7670
|
+
|
|
7671
|
+
/** Response payload returned when a file is uploaded successfully. */
|
|
7672
|
+
export declare type UploadedFile = {
|
|
7673
|
+
uploadedFileId: string;
|
|
7674
|
+
filename: string;
|
|
7675
|
+
mediaType: string;
|
|
7676
|
+
sizeBytes: number;
|
|
7677
|
+
};
|
|
7678
|
+
|
|
7059
7679
|
/** A previously uploaded file identifier to attach to the first message of a flow. */
|
|
7060
|
-
declare type UploadedFileId = default_2.infer<typeof UploadedFileIdSchema>;
|
|
7680
|
+
export declare type UploadedFileId = default_2.infer<typeof UploadedFileIdSchema>;
|
|
7061
7681
|
|
|
7062
7682
|
declare const UploadedFileIdSchema: z.ZodUUID;
|
|
7063
7683
|
|
|
7684
|
+
export declare type V1FrontendVisualization = z.output<typeof V1FrontendVisualizationSchema>;
|
|
7685
|
+
|
|
7686
|
+
declare const V1FrontendVisualizationSchema: z.ZodObject<{
|
|
7687
|
+
id: z.ZodNumber;
|
|
7688
|
+
uuid: z.ZodString;
|
|
7689
|
+
configuration: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
7690
|
+
xAxisLabel: z.ZodString;
|
|
7691
|
+
yAxisLabel: z.ZodString;
|
|
7692
|
+
xAxisDataKey: z.ZodOptional<z.ZodString>;
|
|
7693
|
+
yAxisDataKey: z.ZodOptional<z.ZodString>;
|
|
7694
|
+
dimensionDataKey: z.ZodOptional<z.ZodString>;
|
|
7695
|
+
valueColumns: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
7696
|
+
title: z.ZodString;
|
|
7697
|
+
type: z.ZodLiteral<"bar">;
|
|
7698
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
7699
|
+
xAxisLabel: z.ZodString;
|
|
7700
|
+
yAxisLabel: z.ZodString;
|
|
7701
|
+
xAxisDataKey: z.ZodOptional<z.ZodString>;
|
|
7702
|
+
yAxisDataKey: z.ZodOptional<z.ZodString>;
|
|
7703
|
+
dimensionDataKey: z.ZodOptional<z.ZodString>;
|
|
7704
|
+
valueColumns: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
7705
|
+
title: z.ZodString;
|
|
7706
|
+
type: z.ZodLiteral<"line/area">;
|
|
7707
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
7708
|
+
xAxisLabel: z.ZodString;
|
|
7709
|
+
yAxisLabel: z.ZodString;
|
|
7710
|
+
xAxisDataKey: z.ZodOptional<z.ZodString>;
|
|
7711
|
+
yAxisDataKey: z.ZodOptional<z.ZodString>;
|
|
7712
|
+
dimensionDataKey: z.ZodOptional<z.ZodString>;
|
|
7713
|
+
valueColumns: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
7714
|
+
title: z.ZodString;
|
|
7715
|
+
type: z.ZodLiteral<"scatter">;
|
|
7716
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
7717
|
+
nameKey: z.ZodString;
|
|
7718
|
+
dataKey: z.ZodString;
|
|
7719
|
+
title: z.ZodString;
|
|
7720
|
+
type: z.ZodLiteral<"pie">;
|
|
7721
|
+
}, z.core.$strip>], "type">;
|
|
7722
|
+
created_at: z.ZodString;
|
|
7723
|
+
flow_data_id: z.ZodNumber;
|
|
7724
|
+
report_uuid: z.ZodString;
|
|
7725
|
+
flow_data: z.ZodOptional<z.ZodObject<{
|
|
7726
|
+
is_materialized: z.ZodNullable<z.ZodBoolean>;
|
|
7727
|
+
last_materialized_at: z.ZodNullable<z.ZodString>;
|
|
7728
|
+
materialized_error_message: z.ZodNullable<z.ZodString>;
|
|
7729
|
+
materialized_status: z.ZodNullable<z.ZodEnum<{
|
|
7730
|
+
completed: "completed";
|
|
7731
|
+
failed: "failed";
|
|
7732
|
+
running: "running";
|
|
7733
|
+
}>>;
|
|
7734
|
+
}, z.core.$strip>>;
|
|
7735
|
+
materialization: z.ZodOptional<z.ZodObject<{
|
|
7736
|
+
is_materialized: z.ZodNullable<z.ZodBoolean>;
|
|
7737
|
+
last_materialized_at: z.ZodNullable<z.ZodString>;
|
|
7738
|
+
materialized_error_message: z.ZodNullable<z.ZodString>;
|
|
7739
|
+
materialized_status: z.ZodNullable<z.ZodEnum<{
|
|
7740
|
+
completed: "completed";
|
|
7741
|
+
failed: "failed";
|
|
7742
|
+
running: "running";
|
|
7743
|
+
}>>;
|
|
7744
|
+
}, z.core.$strip>>;
|
|
7745
|
+
}, z.core.$strip>;
|
|
7746
|
+
|
|
7747
|
+
export declare type V1FrontendVisualizationWithData = z.output<typeof V1FrontendVisualizationWithDataSchema>;
|
|
7748
|
+
|
|
7749
|
+
declare const V1FrontendVisualizationWithDataSchema: z.ZodObject<{
|
|
7750
|
+
id: z.ZodNumber;
|
|
7751
|
+
uuid: z.ZodString;
|
|
7752
|
+
configuration: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
7753
|
+
xAxisLabel: z.ZodString;
|
|
7754
|
+
yAxisLabel: z.ZodString;
|
|
7755
|
+
xAxisDataKey: z.ZodOptional<z.ZodString>;
|
|
7756
|
+
yAxisDataKey: z.ZodOptional<z.ZodString>;
|
|
7757
|
+
dimensionDataKey: z.ZodOptional<z.ZodString>;
|
|
7758
|
+
valueColumns: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
7759
|
+
title: z.ZodString;
|
|
7760
|
+
type: z.ZodLiteral<"bar">;
|
|
7761
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
7762
|
+
xAxisLabel: z.ZodString;
|
|
7763
|
+
yAxisLabel: z.ZodString;
|
|
7764
|
+
xAxisDataKey: z.ZodOptional<z.ZodString>;
|
|
7765
|
+
yAxisDataKey: z.ZodOptional<z.ZodString>;
|
|
7766
|
+
dimensionDataKey: z.ZodOptional<z.ZodString>;
|
|
7767
|
+
valueColumns: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
7768
|
+
title: z.ZodString;
|
|
7769
|
+
type: z.ZodLiteral<"line/area">;
|
|
7770
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
7771
|
+
xAxisLabel: z.ZodString;
|
|
7772
|
+
yAxisLabel: z.ZodString;
|
|
7773
|
+
xAxisDataKey: z.ZodOptional<z.ZodString>;
|
|
7774
|
+
yAxisDataKey: z.ZodOptional<z.ZodString>;
|
|
7775
|
+
dimensionDataKey: z.ZodOptional<z.ZodString>;
|
|
7776
|
+
valueColumns: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
7777
|
+
title: z.ZodString;
|
|
7778
|
+
type: z.ZodLiteral<"scatter">;
|
|
7779
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
7780
|
+
nameKey: z.ZodString;
|
|
7781
|
+
dataKey: z.ZodString;
|
|
7782
|
+
title: z.ZodString;
|
|
7783
|
+
type: z.ZodLiteral<"pie">;
|
|
7784
|
+
}, z.core.$strip>], "type">;
|
|
7785
|
+
created_at: z.ZodString;
|
|
7786
|
+
flow_data_id: z.ZodNumber;
|
|
7787
|
+
report_uuid: z.ZodString;
|
|
7788
|
+
flow_data: z.ZodOptional<z.ZodObject<{
|
|
7789
|
+
is_materialized: z.ZodNullable<z.ZodBoolean>;
|
|
7790
|
+
last_materialized_at: z.ZodNullable<z.ZodString>;
|
|
7791
|
+
materialized_error_message: z.ZodNullable<z.ZodString>;
|
|
7792
|
+
materialized_status: z.ZodNullable<z.ZodEnum<{
|
|
7793
|
+
completed: "completed";
|
|
7794
|
+
failed: "failed";
|
|
7795
|
+
running: "running";
|
|
7796
|
+
}>>;
|
|
7797
|
+
}, z.core.$strip>>;
|
|
7798
|
+
materialization: z.ZodOptional<z.ZodObject<{
|
|
7799
|
+
is_materialized: z.ZodNullable<z.ZodBoolean>;
|
|
7800
|
+
last_materialized_at: z.ZodNullable<z.ZodString>;
|
|
7801
|
+
materialized_error_message: z.ZodNullable<z.ZodString>;
|
|
7802
|
+
materialized_status: z.ZodNullable<z.ZodEnum<{
|
|
7803
|
+
completed: "completed";
|
|
7804
|
+
failed: "failed";
|
|
7805
|
+
running: "running";
|
|
7806
|
+
}>>;
|
|
7807
|
+
}, z.core.$strip>>;
|
|
7808
|
+
data: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodDate, z.ZodCoercedNumber<unknown>, z.ZodPipe<z.ZodUnknown, z.ZodTransform<"empty" | (string & {}) | null, unknown>>]>>>;
|
|
7809
|
+
_metadata: z.ZodOptional<z.ZodObject<{
|
|
7810
|
+
wasSampled: z.ZodBoolean;
|
|
7811
|
+
originalCount: z.ZodNumber;
|
|
7812
|
+
sampledCount: z.ZodNumber;
|
|
7813
|
+
}, z.core.$strip>>;
|
|
7814
|
+
}, z.core.$strip>;
|
|
7815
|
+
|
|
7816
|
+
/**
|
|
7817
|
+
* Validates that an array of uploaded files does not exceed the count or
|
|
7818
|
+
* combined-size limits. The function accepts any object with `size_bytes` so
|
|
7819
|
+
* callers don't need to import Supabase-specific row types.
|
|
7820
|
+
* @param uploadedFiles - The files to validate.
|
|
7821
|
+
*/
|
|
7822
|
+
export declare const validateUploadedFiles: (uploadedFiles: ReadonlyArray<{
|
|
7823
|
+
size_bytes: number;
|
|
7824
|
+
}>) => void;
|
|
7825
|
+
|
|
7826
|
+
export declare const VALUE_BASED_COLUMN_SEARCH: "valueBasedColumnSearch";
|
|
7827
|
+
|
|
7828
|
+
export declare const WEB_SEARCH: "webSearch";
|
|
7829
|
+
|
|
7064
7830
|
export { }
|