@magemetrics/ai 0.0.58 → 0.1.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.
@@ -1,13 +1,15 @@
1
- import type { Client } from 'openapi-fetch';
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';
6
+ import { GenerateInsightParam } from '@magemetrics/core';
5
7
  import { InfiniteData } from '@tanstack/react-query';
6
8
  import { InfiniteQueryObserverResult } from '@tanstack/react-query';
7
- import { JSX } from 'react/jsx-runtime';
9
+ import { MageMetricsClient } from '@magemetrics/core';
10
+ import { MageMetricsClientConfig } from '@magemetrics/core';
8
11
  import { PropsWithChildren } from 'react';
9
12
  import { RefAttributes } from 'react';
10
- import type { Simplify } from 'type-fest';
11
13
  import { SortingState } from '@tanstack/react-table';
12
14
  import { UseMutateAsyncFunction } from '@tanstack/react-query';
13
15
  import { UseMutateFunction } from '@tanstack/react-query';
@@ -15,38 +17,20 @@ import { UseMutationOptions } from '@tanstack/react-query';
15
17
  import { UseQueryResult } from '@tanstack/react-query';
16
18
  import { z } from 'zod';
17
19
 
18
- export declare type AuthState = "initializing" | "ready" | "error";
20
+ export { AuthState }
19
21
 
20
22
  export declare type CellContentProps = {
21
23
  formattedValue: FormattedData | undefined;
22
- isOpened: boolean;
23
24
  unit?: string;
24
25
  renderType?: string;
25
26
  };
26
27
 
27
- export declare const Chat: React.FC<React.ComponentProps<typeof Chat_2>>;
28
-
29
- declare const Chat_2: default_2.MemoExoticComponent<({ flowId, className }: {
30
- flowId: string;
31
- className?: string;
32
- }) => JSX.Element>;
33
-
34
- export declare const ChatInput: React.FC<React.ComponentProps<typeof ChatInput_2>>;
35
-
36
- declare const ChatInput_2: React.FC<{
37
- flowId: string;
38
- }>;
28
+ export declare const Chat: React.FC<ConversationContentProps>;
39
29
 
40
30
  export declare const ChatLayoutProvider: default_2.FC<{
41
31
  children: default_2.ReactNode;
42
32
  }>;
43
33
 
44
- export declare const ChatMessages: React.FC<React.ComponentProps<typeof ChatMessages_2>>;
45
-
46
- declare const ChatMessages_2: default_2.FC<{
47
- flowId: string;
48
- }>;
49
-
50
34
  export declare interface Components {
51
35
  dataTableCells?: {
52
36
  empty?: (props: CellContentProps) => default_2.ReactNode;
@@ -65,145 +49,7 @@ export declare interface Components {
65
49
  type: "visualization";
66
50
  visualization: FrontendVisualization | V1FrontendVisualization;
67
51
  }) => default_2.ReactNode;
68
- }
69
-
70
- declare interface components {
71
- schemas: {
72
- VisualizationData: {
73
- [key: string]: string | (number | null) | unknown | null;
74
- }[];
75
- VisualizationWithData: {
76
- id: number;
77
- flow_data_id: number;
78
- created_at: string;
79
- bookmarked: boolean;
80
- configuration: {
81
- /** @enum {string} */
82
- type: "bar";
83
- title: string;
84
- /** @enum {number} */
85
- config_version: 2;
86
- xAxisLabel: string;
87
- yAxisLabel: string;
88
- categoryColumn: string;
89
- secondaryCategoryColumn?: string;
90
- valueColumn: string;
91
- } | {
92
- /** @enum {string} */
93
- type: "line/area";
94
- /** @enum {number} */
95
- config_version: 2;
96
- title: string;
97
- xAxisColumn: string;
98
- valueColumns: string[];
99
- yAxisLabels: string[];
100
- } | {
101
- /** @enum {string} */
102
- type: "line/area-categorical";
103
- title: string;
104
- /** @enum {number} */
105
- config_version: 2;
106
- valueColumn: string;
107
- xAxisColumn: string;
108
- xAxisLabel: string;
109
- yAxisLabel: string;
110
- categoryColumn: string;
111
- } | {
112
- /** @enum {string} */
113
- type: "scatter";
114
- title: string;
115
- /** @enum {number} */
116
- config_version: 2;
117
- xAxisLabel: string;
118
- yAxisLabel: string;
119
- xAxisValueColumn: string;
120
- yAxisValueColumn: string;
121
- } | {
122
- /** @enum {string} */
123
- type: "pie";
124
- title: string;
125
- /** @enum {number} */
126
- config_version: 2;
127
- categoryColumn: string;
128
- valueColumn: string;
129
- };
130
- data: components["schemas"]["VisualizationData"];
131
- _metadata?: {
132
- wasSampled: boolean;
133
- originalCount: number;
134
- sampledCount: number;
135
- };
136
- } | {
137
- id: number;
138
- flow_data_id: number;
139
- created_at: string;
140
- bookmarked: boolean;
141
- configuration: {
142
- /** @enum {string} */
143
- type: "bar";
144
- title: string;
145
- xAxisLabel: string;
146
- yAxisLabel: string;
147
- xAxisDataKey?: string;
148
- yAxisDataKey?: string;
149
- dimensionDataKey?: string;
150
- valueColumns?: string[];
151
- } | {
152
- /** @enum {string} */
153
- type: "line/area";
154
- title: string;
155
- xAxisLabel: string;
156
- yAxisLabel: string;
157
- xAxisDataKey?: string;
158
- yAxisDataKey?: string;
159
- dimensionDataKey?: string;
160
- valueColumns?: string[];
161
- } | {
162
- /** @enum {string} */
163
- type: "scatter";
164
- title: string;
165
- xAxisLabel: string;
166
- yAxisLabel: string;
167
- xAxisDataKey?: string;
168
- yAxisDataKey?: string;
169
- dimensionDataKey?: string;
170
- valueColumns?: string[];
171
- } | {
172
- /** @enum {string} */
173
- type: "pie";
174
- title: string;
175
- nameKey: string;
176
- dataKey: string;
177
- };
178
- data: components["schemas"]["VisualizationData"];
179
- _metadata?: {
180
- wasSampled: boolean;
181
- originalCount: number;
182
- sampledCount: number;
183
- };
184
- };
185
- /** Format: uuid */
186
- DashboardId: string;
187
- ReportColumns: {
188
- name: string;
189
- data_type: string;
190
- dataType: string;
191
- renderType?: string;
192
- unit?: string;
193
- }[];
194
- ReportData: Record<string, unknown>[];
195
- /** @description Starter recommendations */
196
- StarterRecommendation: {
197
- starter: string;
198
- explanation: string;
199
- type: string;
200
- };
201
- };
202
- responses: never;
203
- parameters: never;
204
- requestBodies: never;
205
- headers: never;
206
- pathItems: never;
52
+ avatar?: default_2.ReactNode;
207
53
  }
208
54
 
209
55
  declare type ControlledModalProps = {
@@ -211,6 +57,17 @@ declare type ControlledModalProps = {
211
57
  onClose: () => void;
212
58
  };
213
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
+
214
71
  export declare const Dashboard: React.FC<React.ComponentProps<typeof Dashboard_2>>;
215
72
 
216
73
  declare const Dashboard_2: React.FC<{
@@ -223,8 +80,6 @@ export declare const DataReport: React.FC<{
223
80
 
224
81
  export declare interface DataReportMessageProps {
225
82
  report: FrontendReport;
226
- isOpened: boolean;
227
- setIsOpened: (opened: boolean) => void;
228
83
  explainability: FrontendReportExplainability | null | undefined;
229
84
  infiniteData: {
230
85
  data?: {
@@ -864,10 +719,7 @@ declare const FrontendVisualizationSchema: z.ZodObject<Omit<{
864
719
  };
865
720
  }>;
866
721
 
867
- export declare type GenerateInsightParam = {
868
- selectedFilterValue: string;
869
- customId: string;
870
- };
722
+ export { GenerateInsightParam }
871
723
 
872
724
  export declare const InfiniteDataTableUI: React.FC<InfiniteDataTableUIProps>;
873
725
 
@@ -876,8 +728,6 @@ declare type InfiniteDataTableUIProps = {
876
728
  data: Record<string, unknown>[];
877
729
  columns: FrontendReportColumns;
878
730
  explainability: FrontendReportExplainability | null | undefined;
879
- isOpened: boolean;
880
- setIsOpened: (opened: boolean) => void;
881
731
  hasNextPage: boolean | undefined;
882
732
  fetchNextPage: () => Promise<unknown>;
883
733
  isFetchingNextPage: boolean;
@@ -885,116 +735,11 @@ declare type InfiniteDataTableUIProps = {
885
735
  totalRows: number;
886
736
  };
887
737
 
888
- declare type InternalApiClient = Simplify<Client<NoAuthPaths, `${string}/${string}`>>;
889
-
890
738
  export declare const logout: () => Promise<void>;
891
739
 
892
- /**
893
- * Core MageMetrics client that handles authentication lifecycle and provides
894
- * a promise-based API that automatically waits for authentication to complete.
895
- */
896
- export declare class MageMetricsClient extends EventTarget {
897
- private config;
898
- private authState;
899
- private supabaseClient;
900
- private internalApiClient;
901
- private noAuthApiClient;
902
- private authApiResponse;
903
- private authPromise;
904
- private processedJwt;
905
- constructor(config: MageMetricsClientConfig);
906
- waitForAuth(): Promise<void>;
907
- updateExternalJwt(jwt: string): Promise<void>;
908
- get state(): AuthState;
909
- getAuthHeaders(): Promise<Record<string, string>>;
910
- private clearStorage;
911
- logout(): Promise<void>;
912
- /**
913
- * Public API methods that automatically wait for authentication
914
- */
915
- api: {
916
- getRecentFlows: (params?: {
917
- limit?: number;
918
- }) => Promise<{
919
- created_at: string;
920
- id: string;
921
- request: string;
922
- user_id: string | null;
923
- }[]>;
924
- /**
925
- * @deprecated Use `createFlow` instead.
926
- * @param request the user request
927
- * @returns the id of the created flow
928
- */
929
- startFlow: (request: StartFlowParam) => Promise<string>;
930
- createFlow: (request: StartFlowParam) => Promise<{
931
- flowId: string;
932
- }>;
933
- getDashboard: (dashboardId: string) => Promise<{
934
- description: string | null;
935
- id: string;
936
- name: string;
937
- positions: ({
938
- type: "data-report";
939
- flowId: string;
940
- flowDataId: number;
941
- title: string;
942
- col: number;
943
- colSpan: number;
944
- rowSpan: number;
945
- } | {
946
- type: "visualization";
947
- visualizationId: number;
948
- title: string;
949
- col: number;
950
- colSpan: number;
951
- rowSpan: number;
952
- })[];
953
- is_public: boolean;
954
- }>;
955
- exportReportData: (reportId: number, format?: "text" | "blob") => Promise<{
956
- filename: string;
957
- data: string | Blob;
958
- }>;
959
- generateContextualInsight: (payload: GenerateInsightParam) => Promise<ExtractInsightResponse>;
960
- };
961
- /**
962
- * Initialize authentication flow
963
- */
964
- private initializeAuth;
965
- /**
966
- * Perform the complete authentication flow
967
- */
968
- private performAuthFlow;
969
- private getApiInformation;
970
- private initializeSupabaseClient;
971
- client(): Promise<InternalApiClient>;
972
- /**
973
- * Initialize the API client with Supabase headers
974
- */
975
- private initializeApiClient;
976
- /**
977
- * Handle the authentication logic (check session or exchange token)
978
- */
979
- private handleAuthentication;
980
- /**
981
- * Exchange external JWT for Supabase tokens
982
- */
983
- private exchangeExternalToken;
984
- private createSupabaseHeaderMiddleware;
985
- private setState;
986
- private encodeCheckKey;
987
- saveCheckKey(externalJwt: string, apiKey: string): Promise<void>;
988
- compareCheckKey(externalJwt: string, apiKey: string): Promise<boolean>;
989
- clearCheckKey(): void;
990
- }
740
+ export { MageMetricsClient }
991
741
 
992
- export declare interface MageMetricsClientConfig {
993
- apiUrl: string;
994
- apiKey: string;
995
- externalJwt?: string;
996
- additionalHeaders?: Record<string, string>;
997
- }
742
+ export { MageMetricsClientConfig }
998
743
 
999
744
  export declare const MageMetricsContextProvider: default_2.FC<MageMetricsContextProviderProps & MageMetricsPublicContextProviderProps>;
1000
745
 
@@ -1022,3290 +767,201 @@ declare interface ModalProps {
1022
767
  startOptions?: StartOptions;
1023
768
  }
1024
769
 
1025
- declare type NoAuthPaths = Simplify<{
1026
- [Path in keyof paths]: RemoveAuthHeader<paths[Path]>;
770
+ declare type PersistenceOptions = "queryParam" | "none";
771
+
772
+ export declare const PublicDashboard: React.FC<React.ComponentProps<typeof Dashboard_2>>;
773
+
774
+ export declare const PublicDataReport: React.FC<{
775
+ dashboardId: string;
776
+ reportId: number;
1027
777
  }>;
1028
778
 
1029
- declare interface operations {
1030
- exchangeExternalToken: {
1031
- parameters: {
1032
- query?: never;
1033
- header?: never;
1034
- path?: never;
1035
- cookie?: never;
1036
- };
1037
- requestBody: {
1038
- content: {
1039
- "application/json": {
1040
- apiKey: string;
1041
- externalJWT: string;
1042
- };
1043
- };
1044
- };
1045
- responses: {
1046
- /** @description Retrieve a JWT for an external user */
1047
- 200: {
1048
- headers: {
1049
- [name: string]: unknown;
1050
- };
1051
- content: {
1052
- "application/json": {
1053
- accessToken: string;
1054
- refreshToken: string;
1055
- };
1056
- };
1057
- };
1058
- /** @description Invalid input */
1059
- 400: {
1060
- headers: {
1061
- [name: string]: unknown;
1062
- };
1063
- content: {
1064
- "application/json": {
1065
- error: string;
1066
- };
1067
- };
1068
- };
1069
- /** @description Unable to retrieve a JWT for an external user */
1070
- 500: {
1071
- headers: {
1072
- [name: string]: unknown;
1073
- };
1074
- content: {
1075
- "application/json": {
1076
- error: string;
1077
- };
1078
- };
1079
- };
1080
- };
1081
- };
1082
- getApiInformation: {
1083
- parameters: {
1084
- query: {
1085
- apiKey: string;
1086
- };
1087
- header?: never;
1088
- path?: never;
1089
- cookie?: never;
1090
- };
1091
- requestBody?: never;
1092
- responses: {
1093
- /** @description Retrieve the API URL and anon key */
1094
- 200: {
1095
- headers: {
1096
- [name: string]: unknown;
1097
- };
1098
- content: {
1099
- "application/json": {
1100
- apiUrl: string;
1101
- anonKey: string;
1102
- };
1103
- };
1104
- };
1105
- /** @description Invalid input */
1106
- 400: {
1107
- headers: {
1108
- [name: string]: unknown;
1109
- };
1110
- content: {
1111
- "application/json": {
1112
- error: string;
1113
- };
1114
- };
1115
- };
1116
- /** @description Unable to retrieve the API URL and anon key */
1117
- 500: {
1118
- headers: {
1119
- [name: string]: unknown;
1120
- };
1121
- content: {
1122
- "application/json": {
1123
- error: string;
1124
- };
1125
- };
1126
- };
1127
- };
1128
- };
1129
- getApiInformation: {
1130
- parameters: {
1131
- query: {
1132
- apiKey: string;
1133
- };
1134
- header?: never;
1135
- path?: never;
1136
- cookie?: never;
1137
- };
1138
- requestBody?: never;
1139
- responses: {
1140
- /** @description Retrieve the API URL and anon key */
1141
- 200: {
1142
- headers: {
1143
- [name: string]: unknown;
1144
- };
1145
- content: {
1146
- "application/json": {
1147
- apiUrl: string;
1148
- anonKey: string;
1149
- };
1150
- };
1151
- };
1152
- /** @description Invalid input */
1153
- 400: {
1154
- headers: {
1155
- [name: string]: unknown;
1156
- };
1157
- content: {
1158
- "application/json": {
1159
- error: string;
1160
- };
1161
- };
1162
- };
1163
- /** @description Unable to retrieve the API URL and anon key */
1164
- 500: {
1165
- headers: {
1166
- [name: string]: unknown;
1167
- };
1168
- content: {
1169
- "application/json": {
1170
- error: string;
1171
- };
1172
- };
1173
- };
1174
- };
1175
- };
1176
- PublicDashboardFetchVisualization: {
1177
- parameters: {
1178
- query?: never;
1179
- header?: never;
1180
- path: {
1181
- visualization_id: string;
1182
- dashboard_id: string;
1183
- };
1184
- cookie?: never;
1185
- };
1186
- requestBody?: never;
1187
- responses: {
1188
- /** @description The content of the visualization */
1189
- 200: {
1190
- headers: {
1191
- [name: string]: unknown;
1192
- };
1193
- content: {
1194
- "application/json": components["schemas"]["VisualizationWithData"];
1195
- };
1196
- };
1197
- /** @description Invalid arguments to fetch visualization */
1198
- 400: {
1199
- headers: {
1200
- [name: string]: unknown;
1201
- };
1202
- content: {
1203
- "application/json": {
1204
- error: string;
1205
- };
1206
- };
1207
- };
1208
- /** @description Unable to fetch visualization with this id */
1209
- 404: {
1210
- headers: {
1211
- [name: string]: unknown;
1212
- };
1213
- content: {
1214
- "application/json": {
1215
- error: string;
1216
- };
1217
- };
1218
- };
1219
- /** @description Something wrong happened */
1220
- 500: {
1221
- headers: {
1222
- [name: string]: unknown;
1223
- };
1224
- content: {
1225
- "application/json": {
1226
- error: string;
1227
- };
1228
- };
1229
- };
1230
- };
1231
- };
1232
- retrievePublicDashboard: {
1233
- parameters: {
1234
- query?: never;
1235
- header?: never;
1236
- path: {
1237
- dashboard_id: components["schemas"]["DashboardId"];
1238
- };
1239
- cookie?: never;
1240
- };
1241
- requestBody?: never;
1242
- responses: {
1243
- /** @description The dashboard with the given id */
1244
- 200: {
1245
- headers: {
1246
- [name: string]: unknown;
1247
- };
1248
- content: {
1249
- "application/json": {
1250
- description: string | null;
1251
- /** Format: uuid */
1252
- id: string;
1253
- name: string;
1254
- positions: ({
1255
- /** @enum {string} */
1256
- type: "data-report";
1257
- flowId: string;
1258
- flowDataId: number;
1259
- title: string;
1260
- col: number;
1261
- colSpan: number;
1262
- rowSpan: number;
1263
- } | {
1264
- /** @enum {string} */
1265
- type: "visualization";
1266
- visualizationId: number;
1267
- title: string;
1268
- col: number;
1269
- colSpan: number;
1270
- rowSpan: number;
1271
- })[];
1272
- is_public: boolean;
1273
- };
1274
- };
1275
- };
1276
- /** @description Unable to retrieve dashboard with this id */
1277
- 404: {
1278
- headers: {
1279
- [name: string]: unknown;
1280
- };
1281
- content: {
1282
- "application/json": {
1283
- error: string;
1284
- };
1285
- };
1286
- };
1287
- /** @description Something wrong happened */
1288
- 500: {
1289
- headers: {
1290
- [name: string]: unknown;
1291
- };
1292
- content: {
1293
- "application/json": {
1294
- error: string;
1295
- };
1296
- };
1297
- };
1298
- };
1299
- };
1300
- getPublicDataReportColumns: {
1301
- parameters: {
1302
- query?: never;
1303
- header?: never;
1304
- path: {
1305
- report_id: string;
1306
- dashboard_id: components["schemas"]["DashboardId"];
1307
- };
1308
- cookie?: never;
1309
- };
1310
- requestBody?: never;
1311
- responses: {
1312
- /** @description A list containing the columns of the report */
1313
- 200: {
1314
- headers: {
1315
- [name: string]: unknown;
1316
- };
1317
- content: {
1318
- "application/json": components["schemas"]["ReportColumns"];
1319
- };
1320
- };
1321
- /** @description Unable to retrieve report with this id */
1322
- 404: {
1323
- headers: {
1324
- [name: string]: unknown;
1325
- };
1326
- content: {
1327
- "application/json": {
1328
- error: string;
1329
- };
1330
- };
1331
- };
1332
- /** @description Something wrong happened */
1333
- 500: {
1334
- headers: {
1335
- [name: string]: unknown;
1336
- };
1337
- content: {
1338
- "application/json": {
1339
- error: string;
1340
- };
1341
- };
1342
- };
1343
- };
779
+ declare type ReportDataFilters = {
780
+ columns?: string[];
781
+ limit: number;
782
+ sorting: SortingState;
783
+ filters: TableFilters;
784
+ cursor?: number;
785
+ };
786
+
787
+ export declare const StandaloneConversationModal: React.FC<StandaloneConversationModalProps>;
788
+
789
+ declare type StandaloneConversationModalProps = {
790
+ opened: boolean;
791
+ flowId: string;
792
+ onOpenChange?: (open: boolean) => void;
793
+ };
794
+
795
+ declare type StartOptions = DisplayControlProps & {
796
+ label?: string;
797
+ recommendationsLabel?: string;
798
+ placeholders?: string[];
799
+ };
800
+
801
+ declare type TableFilters = Record<string, string | number>;
802
+
803
+ export declare const useCreateFlow: (options?: UseMutationOptions<{
804
+ flowId: string;
805
+ }, Error, CreateFlowParam>) => {
806
+ createFlow: UseMutateFunction< {
807
+ flowId: string;
808
+ }, Error, CreateFlowParam, unknown>;
809
+ createFlowAsync: UseMutateAsyncFunction< {
810
+ flowId: string;
811
+ }, Error, CreateFlowParam, unknown>;
812
+ isCreatingFlow: boolean;
813
+ data: undefined;
814
+ variables: undefined;
815
+ error: null;
816
+ isError: false;
817
+ isIdle: true;
818
+ isPending: false;
819
+ isSuccess: false;
820
+ status: "idle";
821
+ mutate: UseMutateFunction< {
822
+ flowId: string;
823
+ }, Error, CreateFlowParam, unknown>;
824
+ reset: () => void;
825
+ context: unknown;
826
+ failureCount: number;
827
+ failureReason: Error | null;
828
+ isPaused: boolean;
829
+ submittedAt: number;
830
+ mutateAsync: UseMutateAsyncFunction< {
831
+ flowId: string;
832
+ }, Error, CreateFlowParam, unknown>;
833
+ } | {
834
+ createFlow: UseMutateFunction< {
835
+ flowId: string;
836
+ }, Error, CreateFlowParam, unknown>;
837
+ createFlowAsync: UseMutateAsyncFunction< {
838
+ flowId: string;
839
+ }, Error, CreateFlowParam, unknown>;
840
+ isCreatingFlow: boolean;
841
+ data: undefined;
842
+ variables: CreateFlowParam;
843
+ error: null;
844
+ isError: false;
845
+ isIdle: false;
846
+ isPending: true;
847
+ isSuccess: false;
848
+ status: "pending";
849
+ mutate: UseMutateFunction< {
850
+ flowId: string;
851
+ }, Error, CreateFlowParam, unknown>;
852
+ reset: () => void;
853
+ context: unknown;
854
+ failureCount: number;
855
+ failureReason: Error | null;
856
+ isPaused: boolean;
857
+ submittedAt: number;
858
+ mutateAsync: UseMutateAsyncFunction< {
859
+ flowId: string;
860
+ }, Error, CreateFlowParam, unknown>;
861
+ } | {
862
+ createFlow: UseMutateFunction< {
863
+ flowId: string;
864
+ }, Error, CreateFlowParam, unknown>;
865
+ createFlowAsync: UseMutateAsyncFunction< {
866
+ flowId: string;
867
+ }, Error, CreateFlowParam, unknown>;
868
+ isCreatingFlow: boolean;
869
+ data: undefined;
870
+ error: Error;
871
+ variables: CreateFlowParam;
872
+ isError: true;
873
+ isIdle: false;
874
+ isPending: false;
875
+ isSuccess: false;
876
+ status: "error";
877
+ mutate: UseMutateFunction< {
878
+ flowId: string;
879
+ }, Error, CreateFlowParam, unknown>;
880
+ reset: () => void;
881
+ context: unknown;
882
+ failureCount: number;
883
+ failureReason: Error | null;
884
+ isPaused: boolean;
885
+ submittedAt: number;
886
+ mutateAsync: UseMutateAsyncFunction< {
887
+ flowId: string;
888
+ }, Error, CreateFlowParam, unknown>;
889
+ } | {
890
+ createFlow: UseMutateFunction< {
891
+ flowId: string;
892
+ }, Error, CreateFlowParam, unknown>;
893
+ createFlowAsync: UseMutateAsyncFunction< {
894
+ flowId: string;
895
+ }, Error, CreateFlowParam, unknown>;
896
+ isCreatingFlow: boolean;
897
+ data: {
898
+ flowId: string;
1344
899
  };
1345
- getPublicDataReportData: {
1346
- parameters: {
1347
- query?: {
1348
- limit?: number;
1349
- /** @example name:asc,date:desc */
1350
- order?: string;
1351
- cursor?: number;
1352
- /** @example status:active,name:John%20Doe */
1353
- filter?: string;
1354
- };
1355
- header?: never;
1356
- path: {
1357
- report_id: string;
1358
- dashboard_id: components["schemas"]["DashboardId"];
1359
- };
1360
- cookie?: never;
1361
- };
1362
- requestBody?: never;
1363
- responses: {
1364
- /** @description The content of the report */
1365
- 200: {
1366
- headers: {
1367
- [name: string]: unknown;
1368
- };
1369
- content: {
1370
- "application/json": components["schemas"]["ReportData"];
1371
- };
1372
- };
1373
- /** @description Unable to retrieve report with this id */
1374
- 404: {
1375
- headers: {
1376
- [name: string]: unknown;
1377
- };
1378
- content: {
1379
- "application/json": {
1380
- error: string;
1381
- };
1382
- };
1383
- };
1384
- /** @description Something wrong happened */
1385
- 500: {
1386
- headers: {
1387
- [name: string]: unknown;
1388
- };
1389
- content: {
1390
- "application/json": {
1391
- error: string;
1392
- };
1393
- };
1394
- };
1395
- };
1396
- };
1397
- getPublicDataReportRowCount: {
1398
- parameters: {
1399
- query?: never;
1400
- header?: never;
1401
- path: {
1402
- report_id: string;
1403
- dashboard_id: components["schemas"]["DashboardId"];
1404
- };
1405
- cookie?: never;
1406
- };
1407
- requestBody?: never;
1408
- responses: {
1409
- /** @description The total count of rows in the report */
1410
- 200: {
1411
- headers: {
1412
- [name: string]: unknown;
1413
- };
1414
- content: {
1415
- "application/json": {
1416
- /** @description Total number of rows in the report */
1417
- count: number;
1418
- };
1419
- };
1420
- };
1421
- /** @description Unable to retrieve report with this id */
1422
- 404: {
1423
- headers: {
1424
- [name: string]: unknown;
1425
- };
1426
- content: {
1427
- "application/json": {
1428
- error: string;
1429
- };
1430
- };
1431
- };
1432
- /** @description Something wrong happened */
1433
- 500: {
1434
- headers: {
1435
- [name: string]: unknown;
1436
- };
1437
- content: {
1438
- "application/json": {
1439
- error: string;
1440
- };
1441
- };
1442
- };
1443
- };
1444
- };
1445
- runEnd2EndFlow: {
1446
- parameters: {
1447
- query?: never;
1448
- header: {
1449
- "sp-access-token": string;
1450
- };
1451
- path?: never;
1452
- cookie?: never;
1453
- };
1454
- requestBody: {
1455
- content: {
1456
- "application/json": {
1457
- userQuery: string;
1458
- /** @default true */
1459
- isNewAnalysisGoal?: boolean;
1460
- /**
1461
- * @default complex
1462
- * @enum {string}
1463
- */
1464
- difficultyLevel?: "simple" | "moderate" | "complex";
1465
- };
1466
- };
1467
- };
1468
- responses: {
1469
- /** @description Run the end2end flow */
1470
- 200: {
1471
- headers: {
1472
- [name: string]: unknown;
1473
- };
1474
- content: {
1475
- "application/json": {
1476
- /** @enum {string} */
1477
- status: "error";
1478
- error: string;
1479
- } | {
1480
- /** @enum {string} */
1481
- status: "success";
1482
- flowId: string;
1483
- };
1484
- };
1485
- };
1486
- };
1487
- };
1488
- retrieveFlow: {
1489
- parameters: {
1490
- query?: never;
1491
- header: {
1492
- "sp-access-token": string;
1493
- };
1494
- path: {
1495
- flowId: string;
1496
- };
1497
- cookie?: never;
1498
- };
1499
- requestBody?: never;
1500
- responses: {
1501
- /** @description The flow with its steps */
1502
- 200: {
1503
- headers: {
1504
- [name: string]: unknown;
1505
- };
1506
- content: {
1507
- "application/json": {
1508
- created_at: string;
1509
- id: string;
1510
- request: string;
1511
- user_id: string | null;
1512
- user_friendly_goal?: string;
1513
- has_chat_messages: boolean;
1514
- };
1515
- };
1516
- };
1517
- /** @description Unable to retrieve flow with this id */
1518
- 404: {
1519
- headers: {
1520
- [name: string]: unknown;
1521
- };
1522
- content: {
1523
- "application/json": {
1524
- error: string;
1525
- };
1526
- };
1527
- };
1528
- /** @description Something wrong happened */
1529
- 500: {
1530
- headers: {
1531
- [name: string]: unknown;
1532
- };
1533
- content: {
1534
- "application/json": {
1535
- error: string;
1536
- };
1537
- };
1538
- };
1539
- };
1540
- };
1541
- retrieveRecentFlows: {
1542
- parameters: {
1543
- query?: {
1544
- limit?: number;
1545
- };
1546
- header: {
1547
- "sp-access-token": string;
1548
- };
1549
- path?: never;
1550
- cookie?: never;
1551
- };
1552
- requestBody?: never;
1553
- responses: {
1554
- /** @description A list of recent flows */
1555
- 200: {
1556
- headers: {
1557
- [name: string]: unknown;
1558
- };
1559
- content: {
1560
- "application/json": {
1561
- created_at: string;
1562
- id: string;
1563
- request: string;
1564
- user_id: string | null;
1565
- }[];
1566
- };
1567
- };
1568
- /** @description Something wrong happened */
1569
- 500: {
1570
- headers: {
1571
- [name: string]: unknown;
1572
- };
1573
- content: {
1574
- "application/json": {
1575
- error: string;
1576
- };
1577
- };
1578
- };
1579
- };
1580
- };
1581
- retrieveFlowDataReports: {
1582
- parameters: {
1583
- query?: never;
1584
- header: {
1585
- "sp-access-token": string;
1586
- };
1587
- path: {
1588
- flowId: string;
1589
- };
1590
- cookie?: never;
1591
- };
1592
- requestBody?: never;
1593
- responses: {
1594
- /** @description The data reports associated with the flow */
1595
- 200: {
1596
- headers: {
1597
- [name: string]: unknown;
1598
- };
1599
- content: {
1600
- "application/json": {
1601
- created_at: string;
1602
- flow_id: string;
1603
- id: number;
1604
- title: string;
1605
- request: string | null;
1606
- data_summary: {
1607
- columns: {
1608
- [key: string]: {
1609
- position?: number;
1610
- data_type: string;
1611
- null_count: number | null;
1612
- unique_count: number | null;
1613
- unique_percentage: number | null;
1614
- };
1615
- };
1616
- };
1617
- bookmarked: boolean;
1618
- status: string | null;
1619
- }[];
1620
- };
1621
- };
1622
- /** @description Unable to retrieve flow with this id */
1623
- 404: {
1624
- headers: {
1625
- [name: string]: unknown;
1626
- };
1627
- content: {
1628
- "application/json": {
1629
- error: string;
1630
- };
1631
- };
1632
- };
1633
- /** @description Something wrong happened */
1634
- 500: {
1635
- headers: {
1636
- [name: string]: unknown;
1637
- };
1638
- content: {
1639
- "application/json": {
1640
- error: string;
1641
- };
1642
- };
1643
- };
1644
- };
1645
- };
1646
- getDataReportFeedback: {
1647
- parameters: {
1648
- query?: never;
1649
- header: {
1650
- "sp-access-token": string;
1651
- };
1652
- path: {
1653
- report_id: string;
1654
- };
1655
- cookie?: never;
1656
- };
1657
- requestBody?: never;
1658
- responses: {
1659
- /** @description The feedback for the report */
1660
- 200: {
1661
- headers: {
1662
- [name: string]: unknown;
1663
- };
1664
- content: {
1665
- "application/json": {
1666
- created_at: string;
1667
- flow_data_id: number;
1668
- /** @enum {string} */
1669
- helpfulness: "helpful" | "partially helpful" | "not helpful" | "incorrect";
1670
- id: number;
1671
- } | null;
1672
- };
1673
- };
1674
- /** @description Unable to retrieve feedback */
1675
- 404: {
1676
- headers: {
1677
- [name: string]: unknown;
1678
- };
1679
- content: {
1680
- "application/json": {
1681
- error: string;
1682
- };
1683
- };
1684
- };
1685
- /** @description Something wrong happened */
1686
- 500: {
1687
- headers: {
1688
- [name: string]: unknown;
1689
- };
1690
- content: {
1691
- "application/json": {
1692
- error: string;
1693
- };
1694
- };
1695
- };
1696
- };
1697
- };
1698
- upsertReportFeedback: {
1699
- parameters: {
1700
- query?: never;
1701
- header: {
1702
- "sp-access-token": string;
1703
- };
1704
- path: {
1705
- report_id: string;
1706
- };
1707
- cookie?: never;
1708
- };
1709
- /** @description The feedback for the flow data */
1710
- requestBody: {
1711
- content: {
1712
- "application/json": {
1713
- /** @enum {string} */
1714
- helpfulness: "helpful" | "partially helpful" | "not helpful" | "incorrect";
1715
- };
1716
- };
1717
- };
1718
- responses: {
1719
- /** @description Successfully upserted feedback */
1720
- 200: {
1721
- headers: {
1722
- [name: string]: unknown;
1723
- };
1724
- content?: never;
1725
- };
1726
- /** @description Something wrong happened */
1727
- 500: {
1728
- headers: {
1729
- [name: string]: unknown;
1730
- };
1731
- content: {
1732
- "application/json": {
1733
- error: string;
1734
- };
1735
- };
1736
- };
1737
- };
1738
- };
1739
- deleteReportFeedback: {
1740
- parameters: {
1741
- query?: never;
1742
- header: {
1743
- "sp-access-token": string;
1744
- };
1745
- path: {
1746
- report_id: string;
1747
- };
1748
- cookie?: never;
1749
- };
1750
- requestBody?: never;
1751
- responses: {
1752
- /** @description Successfully deleted feedback */
1753
- 200: {
1754
- headers: {
1755
- [name: string]: unknown;
1756
- };
1757
- content?: never;
1758
- };
1759
- /** @description Unable to retrieve feedback */
1760
- 404: {
1761
- headers: {
1762
- [name: string]: unknown;
1763
- };
1764
- content: {
1765
- "application/json": {
1766
- error: string;
1767
- };
1768
- };
1769
- };
1770
- /** @description Something wrong happened */
1771
- 500: {
1772
- headers: {
1773
- [name: string]: unknown;
1774
- };
1775
- content: {
1776
- "application/json": {
1777
- error: string;
1778
- };
1779
- };
1780
- };
1781
- };
1782
- };
1783
- retrieveLatestDataReportStatus: {
1784
- parameters: {
1785
- query?: never;
1786
- header: {
1787
- "sp-access-token": string;
1788
- };
1789
- path: {
1790
- flowId: string;
1791
- };
1792
- cookie?: never;
1793
- };
1794
- requestBody?: never;
1795
- responses: {
1796
- /** @description The status of the latest flow data for a given flow */
1797
- 200: {
1798
- headers: {
1799
- [name: string]: unknown;
1800
- };
1801
- content: {
1802
- "application/json": {
1803
- status: string | null;
1804
- };
1805
- };
1806
- };
1807
- /** @description Unable to retrieve status for latest flow data of flow with this id */
1808
- 404: {
1809
- headers: {
1810
- [name: string]: unknown;
1811
- };
1812
- content: {
1813
- "application/json": {
1814
- error: string;
1815
- };
1816
- };
1817
- };
1818
- /** @description Something wrong happened */
1819
- 500: {
1820
- headers: {
1821
- [name: string]: unknown;
1822
- };
1823
- content: {
1824
- "application/json": {
1825
- error: string;
1826
- };
1827
- };
1828
- };
1829
- };
1830
- };
1831
- getDataReportExplainability: {
1832
- parameters: {
1833
- query?: never;
1834
- header: {
1835
- "sp-access-token": string;
1836
- };
1837
- path: {
1838
- report_id: string;
1839
- };
1840
- cookie?: never;
1841
- };
1842
- requestBody?: never;
1843
- responses: {
1844
- /** @description The explainability of the report */
1845
- 200: {
1846
- headers: {
1847
- [name: string]: unknown;
1848
- };
1849
- content: {
1850
- "application/json": {
1851
- sql_explanation?: {
1852
- chunk_title: string;
1853
- chunk_explanation: string;
1854
- lines: {
1855
- sql: string;
1856
- explanation: string;
1857
- }[];
1858
- }[] | null;
1859
- business_explanation?: {
1860
- summary: string;
1861
- implementation: string[];
1862
- assumptions: {
1863
- /** @enum {string} */
1864
- type: "grain" | "completeness" | "transformation" | "relationship" | "other";
1865
- details: string;
1866
- explanation: string;
1867
- }[];
1868
- } | null;
1869
- columns_lineage?: {
1870
- [key: string]: {
1871
- nodes: {
1872
- id: string;
1873
- /** @enum {string} */
1874
- type: "entity" | "attribute" | "filter" | "process" | "combine" | "result";
1875
- explanation: string;
1876
- }[];
1877
- edges: {
1878
- source: string;
1879
- target: string;
1880
- }[];
1881
- };
1882
- } | null;
1883
- confidence_score: number;
1884
- confidence_score_reason: string;
1885
- assumptions_score?: number;
1886
- assumptions_score_reason?: string;
1887
- friendliness_score?: number;
1888
- friendliness_score_reason?: string;
1889
- flow_data_id: number;
1890
- };
1891
- };
1892
- };
1893
- /** @description Unable to retrieve report with this id */
1894
- 404: {
1895
- headers: {
1896
- [name: string]: unknown;
1897
- };
1898
- content: {
1899
- "application/json": {
1900
- error: string;
1901
- };
1902
- };
1903
- };
1904
- /** @description Something wrong happened */
1905
- 500: {
1906
- headers: {
1907
- [name: string]: unknown;
1908
- };
1909
- content: {
1910
- "application/json": {
1911
- error: string;
1912
- };
1913
- };
1914
- };
1915
- };
1916
- };
1917
- toggleBookmark: {
1918
- parameters: {
1919
- query?: never;
1920
- header: {
1921
- "sp-access-token": string;
1922
- };
1923
- path?: never;
1924
- cookie?: never;
1925
- };
1926
- /** @description Toggle bookmark for timeline item */
1927
- requestBody: {
1928
- content: {
1929
- "application/json": {
1930
- /** @enum {string} */
1931
- type: "dataReport";
1932
- flowDataId: number;
1933
- bookmarked: boolean;
1934
- } | {
1935
- /** @enum {string} */
1936
- type: "visualization";
1937
- flowDataVisualizationId: number;
1938
- bookmarked: boolean;
1939
- };
1940
- };
1941
- };
1942
- responses: {
1943
- /** @description Successfully toggled bookmark */
1944
- 200: {
1945
- headers: {
1946
- [name: string]: unknown;
1947
- };
1948
- content: {
1949
- "application/json": {
1950
- success: boolean;
1951
- bookmarked: boolean;
1952
- };
1953
- };
1954
- };
1955
- /** @description Timeline item not found */
1956
- 404: {
1957
- headers: {
1958
- [name: string]: unknown;
1959
- };
1960
- content: {
1961
- "application/json": {
1962
- error: string;
1963
- };
1964
- };
1965
- };
1966
- /** @description Something wrong happened */
1967
- 500: {
1968
- headers: {
1969
- [name: string]: unknown;
1970
- };
1971
- content: {
1972
- "application/json": {
1973
- error: string;
1974
- };
1975
- };
1976
- };
1977
- };
1978
- };
1979
- retrieveLatestDataRefresh: {
1980
- parameters: {
1981
- query?: never;
1982
- header: {
1983
- "sp-access-token": string;
1984
- };
1985
- path?: never;
1986
- cookie?: never;
1987
- };
1988
- requestBody?: never;
1989
- responses: {
1990
- /** @description The latest data refresh */
1991
- 200: {
1992
- headers: {
1993
- [name: string]: unknown;
1994
- };
1995
- content: {
1996
- "application/json": {
1997
- updated_at: string;
1998
- };
1999
- };
2000
- };
2001
- /** @description Unable to retrieve latest data refresh */
2002
- 404: {
2003
- headers: {
2004
- [name: string]: unknown;
2005
- };
2006
- content: {
2007
- "application/json": {
2008
- error: string;
2009
- };
2010
- };
2011
- };
2012
- /** @description Something wrong happened */
2013
- 500: {
2014
- headers: {
2015
- [name: string]: unknown;
2016
- };
2017
- content: {
2018
- "application/json": {
2019
- error: string;
2020
- };
2021
- };
2022
- };
2023
- };
2024
- };
2025
- exportReportData: {
2026
- parameters: {
2027
- query?: never;
2028
- header: {
2029
- "sp-access-token": string;
2030
- };
2031
- path: {
2032
- report_id: string;
2033
- };
2034
- cookie?: never;
2035
- };
2036
- requestBody?: never;
2037
- responses: {
2038
- /** @description The report data exported in CSV format */
2039
- 200: {
2040
- headers: {
2041
- [name: string]: unknown;
2042
- };
2043
- content: {
2044
- "text/csv": string;
2045
- };
2046
- };
2047
- /** @description Unable to retrieve flow with this id */
2048
- 404: {
2049
- headers: {
2050
- [name: string]: unknown;
2051
- };
2052
- content: {
2053
- "application/json": {
2054
- error: string;
2055
- };
2056
- };
2057
- };
2058
- /** @description Something wrong happened */
2059
- 500: {
2060
- headers: {
2061
- [name: string]: unknown;
2062
- };
2063
- content: {
2064
- "application/json": {
2065
- error: string;
2066
- };
2067
- };
2068
- };
2069
- };
2070
- };
2071
- getDataReportColumns: {
2072
- parameters: {
2073
- query?: never;
2074
- header: {
2075
- "sp-access-token": string;
2076
- };
2077
- path: {
2078
- report_id: string;
2079
- };
2080
- cookie?: never;
2081
- };
2082
- requestBody?: never;
2083
- responses: {
2084
- /** @description A list containing the columns of the report */
2085
- 200: {
2086
- headers: {
2087
- [name: string]: unknown;
2088
- };
2089
- content: {
2090
- "application/json": components["schemas"]["ReportColumns"];
2091
- };
2092
- };
2093
- /** @description Unable to retrieve report with this id */
2094
- 404: {
2095
- headers: {
2096
- [name: string]: unknown;
2097
- };
2098
- content: {
2099
- "application/json": {
2100
- error: string;
2101
- };
2102
- };
2103
- };
2104
- /** @description Something wrong happened */
2105
- 500: {
2106
- headers: {
2107
- [name: string]: unknown;
2108
- };
2109
- content: {
2110
- "application/json": {
2111
- error: string;
2112
- };
2113
- };
2114
- };
2115
- };
2116
- };
2117
- getDataReportData: {
2118
- parameters: {
2119
- query?: {
2120
- /** @example name,date */
2121
- columns?: string;
2122
- limit?: number;
2123
- /** @example name:asc,date:desc */
2124
- order?: string;
2125
- cursor?: number;
2126
- /** @example status:active,name:John%20Doe */
2127
- filter?: string;
2128
- };
2129
- header: {
2130
- "sp-access-token": string;
2131
- };
2132
- path: {
2133
- report_id: string;
2134
- };
2135
- cookie?: never;
2136
- };
2137
- requestBody?: never;
2138
- responses: {
2139
- /** @description The content of the report */
2140
- 200: {
2141
- headers: {
2142
- [name: string]: unknown;
2143
- };
2144
- content: {
2145
- "application/json": components["schemas"]["ReportData"];
2146
- };
2147
- };
2148
- /** @description Unable to retrieve report with this id */
2149
- 404: {
2150
- headers: {
2151
- [name: string]: unknown;
2152
- };
2153
- content: {
2154
- "application/json": {
2155
- error: string;
2156
- };
2157
- };
2158
- };
2159
- /** @description Something wrong happened */
2160
- 500: {
2161
- headers: {
2162
- [name: string]: unknown;
2163
- };
2164
- content: {
2165
- "application/json": {
2166
- error: string;
2167
- };
2168
- };
2169
- };
2170
- };
2171
- };
2172
- getDataReportRowCount: {
2173
- parameters: {
2174
- query?: never;
2175
- header: {
2176
- "sp-access-token": string;
2177
- };
2178
- path: {
2179
- report_id: string;
2180
- };
2181
- cookie?: never;
2182
- };
2183
- requestBody?: never;
2184
- responses: {
2185
- /** @description The total count of rows in the report */
2186
- 200: {
2187
- headers: {
2188
- [name: string]: unknown;
2189
- };
2190
- content: {
2191
- "application/json": {
2192
- /** @description Total number of rows in the report */
2193
- count: number;
2194
- };
2195
- };
2196
- };
2197
- /** @description Unable to retrieve report with this id */
2198
- 404: {
2199
- headers: {
2200
- [name: string]: unknown;
2201
- };
2202
- content: {
2203
- "application/json": {
2204
- error: string;
2205
- };
2206
- };
2207
- };
2208
- /** @description Something wrong happened */
2209
- 500: {
2210
- headers: {
2211
- [name: string]: unknown;
2212
- };
2213
- content: {
2214
- "application/json": {
2215
- error: string;
2216
- };
2217
- };
2218
- };
2219
- };
2220
- };
2221
- getDataReportVisualizations: {
2222
- parameters: {
2223
- query?: never;
2224
- header: {
2225
- "sp-access-token": string;
2226
- };
2227
- path: {
2228
- report_id: string;
2229
- };
2230
- cookie?: never;
2231
- };
2232
- requestBody?: never;
2233
- responses: {
2234
- /** @description The visualizations for the report */
2235
- 200: {
2236
- headers: {
2237
- [name: string]: unknown;
2238
- };
2239
- content: {
2240
- "application/json": {
2241
- created_at: string;
2242
- flow_id: string;
2243
- id: number;
2244
- title: string;
2245
- request: string | null;
2246
- data_summary: {
2247
- columns: {
2248
- [key: string]: {
2249
- position?: number;
2250
- data_type: string;
2251
- null_count: number | null;
2252
- unique_count: number | null;
2253
- unique_percentage: number | null;
2254
- };
2255
- };
2256
- };
2257
- bookmarked: boolean;
2258
- status: string | null;
2259
- visualizations: ({
2260
- id: number;
2261
- flow_data_id: number;
2262
- created_at: string;
2263
- bookmarked: boolean;
2264
- configuration: {
2265
- /** @enum {string} */
2266
- type: "bar";
2267
- title: string;
2268
- xAxisLabel: string;
2269
- yAxisLabel: string;
2270
- xAxisDataKey?: string;
2271
- yAxisDataKey?: string;
2272
- dimensionDataKey?: string;
2273
- valueColumns?: string[];
2274
- } | {
2275
- /** @enum {string} */
2276
- type: "line/area";
2277
- title: string;
2278
- xAxisLabel: string;
2279
- yAxisLabel: string;
2280
- xAxisDataKey?: string;
2281
- yAxisDataKey?: string;
2282
- dimensionDataKey?: string;
2283
- valueColumns?: string[];
2284
- } | {
2285
- /** @enum {string} */
2286
- type: "scatter";
2287
- title: string;
2288
- xAxisLabel: string;
2289
- yAxisLabel: string;
2290
- xAxisDataKey?: string;
2291
- yAxisDataKey?: string;
2292
- dimensionDataKey?: string;
2293
- valueColumns?: string[];
2294
- } | {
2295
- /** @enum {string} */
2296
- type: "pie";
2297
- title: string;
2298
- nameKey: string;
2299
- dataKey: string;
2300
- };
2301
- } | {
2302
- id: number;
2303
- flow_data_id: number;
2304
- created_at: string;
2305
- bookmarked: boolean;
2306
- configuration: {
2307
- /** @enum {string} */
2308
- type: "bar";
2309
- title: string;
2310
- /** @enum {number} */
2311
- config_version: 2;
2312
- xAxisLabel: string;
2313
- yAxisLabel: string;
2314
- categoryColumn: string;
2315
- secondaryCategoryColumn?: string;
2316
- valueColumn: string;
2317
- } | {
2318
- /** @enum {string} */
2319
- type: "line/area";
2320
- /** @enum {number} */
2321
- config_version: 2;
2322
- title: string;
2323
- xAxisColumn: string;
2324
- valueColumns: string[];
2325
- yAxisLabels: string[];
2326
- } | {
2327
- /** @enum {string} */
2328
- type: "line/area-categorical";
2329
- title: string;
2330
- /** @enum {number} */
2331
- config_version: 2;
2332
- valueColumn: string;
2333
- xAxisColumn: string;
2334
- xAxisLabel: string;
2335
- yAxisLabel: string;
2336
- categoryColumn: string;
2337
- } | {
2338
- /** @enum {string} */
2339
- type: "scatter";
2340
- title: string;
2341
- /** @enum {number} */
2342
- config_version: 2;
2343
- xAxisLabel: string;
2344
- yAxisLabel: string;
2345
- xAxisValueColumn: string;
2346
- yAxisValueColumn: string;
2347
- } | {
2348
- /** @enum {string} */
2349
- type: "pie";
2350
- title: string;
2351
- /** @enum {number} */
2352
- config_version: 2;
2353
- categoryColumn: string;
2354
- valueColumn: string;
2355
- };
2356
- })[];
2357
- };
2358
- };
2359
- };
2360
- /** @description Unable to retrieve report with this id */
2361
- 404: {
2362
- headers: {
2363
- [name: string]: unknown;
2364
- };
2365
- content: {
2366
- "application/json": {
2367
- error: string;
2368
- };
2369
- };
2370
- };
2371
- /** @description Something wrong happened */
2372
- 500: {
2373
- headers: {
2374
- [name: string]: unknown;
2375
- };
2376
- content: {
2377
- "application/json": {
2378
- error: string;
2379
- };
2380
- };
2381
- };
2382
- };
2383
- };
2384
- createFlow: {
2385
- parameters: {
2386
- query?: never;
2387
- header: {
2388
- "sp-access-token": string;
2389
- };
2390
- path?: never;
2391
- cookie?: never;
2392
- };
2393
- requestBody: {
2394
- content: {
2395
- "application/json": {
2396
- userQuery: string;
2397
- };
2398
- };
2399
- };
2400
- responses: {
2401
- /** @description Create a new flow */
2402
- 200: {
2403
- headers: {
2404
- [name: string]: unknown;
2405
- };
2406
- content: {
2407
- "application/json": {
2408
- /** @enum {string} */
2409
- status: "success";
2410
- flowId: string;
2411
- };
2412
- };
2413
- };
2414
- /** @description Something wrong happened */
2415
- 500: {
2416
- headers: {
2417
- [name: string]: unknown;
2418
- };
2419
- content: {
2420
- "application/json": {
2421
- error: string;
2422
- };
2423
- };
2424
- };
2425
- };
2426
- };
2427
- retrieveChatTimeline: {
2428
- parameters: {
2429
- query?: never;
2430
- header: {
2431
- "sp-access-token": string;
2432
- };
2433
- path: {
2434
- flowId: string;
2435
- };
2436
- cookie?: never;
2437
- };
2438
- requestBody?: never;
2439
- responses: {
2440
- /** @description The timeline of generated insights for the flow */
2441
- 200: {
2442
- headers: {
2443
- [name: string]: unknown;
2444
- };
2445
- content: {
2446
- "application/json": ({
2447
- /** @enum {string} */
2448
- type: "dataReport";
2449
- flowDataId: number;
2450
- flowId: string;
2451
- title: string;
2452
- bookmarked: boolean;
2453
- answer: string | null;
2454
- } | {
2455
- /** @enum {string} */
2456
- type: "visualization";
2457
- flowId: string;
2458
- flowDataId: number;
2459
- flowDataVisualizationId: number;
2460
- title: string;
2461
- bookmarked: boolean;
2462
- } | {
2463
- /** @enum {string} */
2464
- type: "message";
2465
- })[];
2466
- };
2467
- };
2468
- /** @description Unable to retrieve flow with this id */
2469
- 404: {
2470
- headers: {
2471
- [name: string]: unknown;
2472
- };
2473
- content: {
2474
- "application/json": {
2475
- error: string;
2476
- };
2477
- };
2478
- };
2479
- /** @description Something wrong happened */
2480
- 500: {
2481
- headers: {
2482
- [name: string]: unknown;
2483
- };
2484
- content: {
2485
- "application/json": {
2486
- error: string;
2487
- };
2488
- };
2489
- };
2490
- };
2491
- };
2492
- retrieveChatMessages: {
2493
- parameters: {
2494
- query?: never;
2495
- header: {
2496
- "sp-access-token": string;
2497
- };
2498
- path: {
2499
- flowId: string;
2500
- };
2501
- cookie?: never;
2502
- };
2503
- requestBody?: never;
2504
- responses: {
2505
- /** @description The messages from the given flow */
2506
- 200: {
2507
- headers: {
2508
- [name: string]: unknown;
2509
- };
2510
- content: {
2511
- "application/json": {
2512
- messages: Record<string, unknown>[];
2513
- };
2514
- };
2515
- };
2516
- /** @description Unable to retrieve flow with this id */
2517
- 404: {
2518
- headers: {
2519
- [name: string]: unknown;
2520
- };
2521
- content: {
2522
- "application/json": {
2523
- error: string;
2524
- };
2525
- };
2526
- };
2527
- /** @description Something wrong happened */
2528
- 500: {
2529
- headers: {
2530
- [name: string]: unknown;
2531
- };
2532
- content: {
2533
- "application/json": {
2534
- error: string;
2535
- };
2536
- };
2537
- };
2538
- };
2539
- };
2540
- getStarterRecommendations: {
2541
- parameters: {
2542
- query?: {
2543
- count?: number;
2544
- };
2545
- header: {
2546
- "sp-access-token": string;
2547
- };
2548
- path?: never;
2549
- cookie?: never;
2550
- };
2551
- requestBody?: never;
2552
- responses: {
2553
- /** @description Get starter recommendations */
2554
- 200: {
2555
- headers: {
2556
- [name: string]: unknown;
2557
- };
2558
- content: {
2559
- "application/json": {
2560
- recommendations: components["schemas"]["StarterRecommendation"][];
2561
- };
2562
- };
2563
- };
2564
- /** @description Something wrong happened */
2565
- 500: {
2566
- headers: {
2567
- [name: string]: unknown;
2568
- };
2569
- content: {
2570
- "application/json": {
2571
- error: string;
2572
- };
2573
- };
2574
- };
2575
- };
2576
- };
2577
- fetchVisualization: {
2578
- parameters: {
2579
- query?: never;
2580
- header: {
2581
- "sp-access-token": string;
2582
- };
2583
- path: {
2584
- visualization_id: string;
2585
- };
2586
- cookie?: never;
2587
- };
2588
- requestBody?: never;
2589
- responses: {
2590
- /** @description The content of the visualization */
2591
- 200: {
2592
- headers: {
2593
- [name: string]: unknown;
2594
- };
2595
- content: {
2596
- "application/json": components["schemas"]["VisualizationWithData"];
2597
- };
2598
- };
2599
- /** @description Invalid arguments to fetch visualization */
2600
- 400: {
2601
- headers: {
2602
- [name: string]: unknown;
2603
- };
2604
- content: {
2605
- "application/json": {
2606
- error: string;
2607
- };
2608
- };
2609
- };
2610
- /** @description Unable to fetch visualization with this id */
2611
- 404: {
2612
- headers: {
2613
- [name: string]: unknown;
2614
- };
2615
- content: {
2616
- "application/json": {
2617
- error: string;
2618
- };
2619
- };
2620
- };
2621
- /** @description Something wrong happened */
2622
- 500: {
2623
- headers: {
2624
- [name: string]: unknown;
2625
- };
2626
- content: {
2627
- "application/json": {
2628
- error: string;
2629
- };
2630
- };
2631
- };
2632
- };
2633
- };
2634
- listVisualizationsForFlow: {
2635
- parameters: {
2636
- query?: {
2637
- flowDataId?: string;
2638
- };
2639
- header: {
2640
- "sp-access-token": string;
2641
- };
2642
- path: {
2643
- flowId: string;
2644
- };
2645
- cookie?: never;
2646
- };
2647
- requestBody?: never;
2648
- responses: {
2649
- /** @description List visualizations for a given flow. Can be filtered by flow data id as well */
2650
- 200: {
2651
- headers: {
2652
- [name: string]: unknown;
2653
- };
2654
- content: {
2655
- "application/json": {
2656
- id: number;
2657
- flow_data_id: number;
2658
- created_at: string;
2659
- bookmarked: boolean;
2660
- configuration: {
2661
- /** @enum {string} */
2662
- type: "bar";
2663
- title: string;
2664
- /** @enum {number} */
2665
- config_version: 2;
2666
- xAxisLabel: string;
2667
- yAxisLabel: string;
2668
- categoryColumn: string;
2669
- secondaryCategoryColumn?: string;
2670
- valueColumn: string;
2671
- } | {
2672
- /** @enum {string} */
2673
- type: "line/area";
2674
- /** @enum {number} */
2675
- config_version: 2;
2676
- title: string;
2677
- xAxisColumn: string;
2678
- valueColumns: string[];
2679
- yAxisLabels: string[];
2680
- } | {
2681
- /** @enum {string} */
2682
- type: "line/area-categorical";
2683
- title: string;
2684
- /** @enum {number} */
2685
- config_version: 2;
2686
- valueColumn: string;
2687
- xAxisColumn: string;
2688
- xAxisLabel: string;
2689
- yAxisLabel: string;
2690
- categoryColumn: string;
2691
- } | {
2692
- /** @enum {string} */
2693
- type: "scatter";
2694
- title: string;
2695
- /** @enum {number} */
2696
- config_version: 2;
2697
- xAxisLabel: string;
2698
- yAxisLabel: string;
2699
- xAxisValueColumn: string;
2700
- yAxisValueColumn: string;
2701
- } | {
2702
- /** @enum {string} */
2703
- type: "pie";
2704
- title: string;
2705
- /** @enum {number} */
2706
- config_version: 2;
2707
- categoryColumn: string;
2708
- valueColumn: string;
2709
- };
2710
- }[];
2711
- };
2712
- };
2713
- /** @description Invalid arguments to fetch visualization */
2714
- 400: {
2715
- headers: {
2716
- [name: string]: unknown;
2717
- };
2718
- content: {
2719
- "application/json": {
2720
- error: string;
2721
- };
2722
- };
2723
- };
2724
- /** @description Unable to list visualizations */
2725
- 404: {
2726
- headers: {
2727
- [name: string]: unknown;
2728
- };
2729
- content: {
2730
- "application/json": {
2731
- error: string;
2732
- };
2733
- };
2734
- };
2735
- /** @description Something wrong happened */
2736
- 500: {
2737
- headers: {
2738
- [name: string]: unknown;
2739
- };
2740
- content: {
2741
- "application/json": {
2742
- error: string;
2743
- };
2744
- };
2745
- };
2746
- };
2747
- };
2748
- triggerFlow: {
2749
- parameters: {
2750
- query?: never;
2751
- header: {
2752
- "sp-access-token": string;
2753
- };
2754
- path?: never;
2755
- cookie?: never;
2756
- };
2757
- /** @description Trigger flow request body */
2758
- requestBody: {
2759
- content: {
2760
- "application/json": {
2761
- triggerId: string;
2762
- variables: {
2763
- [key: string]: string;
2764
- };
2765
- };
2766
- };
2767
- };
2768
- responses: {
2769
- /** @description Flow id */
2770
- 200: {
2771
- headers: {
2772
- [name: string]: unknown;
2773
- };
2774
- content: {
2775
- "application/json": {
2776
- /** @enum {string} */
2777
- status: "error";
2778
- error: string;
2779
- } | {
2780
- /** @enum {string} */
2781
- status: "success";
2782
- flowId: string;
2783
- };
2784
- };
2785
- };
2786
- /** @description Invalid template or variable values */
2787
- 400: {
2788
- headers: {
2789
- [name: string]: unknown;
2790
- };
2791
- content: {
2792
- "application/json": {
2793
- error: string;
2794
- };
2795
- };
2796
- };
2797
- /** @description Unable to retrieve trigger with this id */
2798
- 404: {
2799
- headers: {
2800
- [name: string]: unknown;
2801
- };
2802
- content: {
2803
- "application/json": {
2804
- error: string;
2805
- };
2806
- };
2807
- };
2808
- /** @description Something wrong happened */
2809
- 500: {
2810
- headers: {
2811
- [name: string]: unknown;
2812
- };
2813
- content: {
2814
- "application/json": {
2815
- error: string;
2816
- };
2817
- };
2818
- };
2819
- };
2820
- };
2821
- retrieveDashboard: {
2822
- parameters: {
2823
- query?: never;
2824
- header: {
2825
- "sp-access-token": string;
2826
- };
2827
- path: {
2828
- dashboard_id: components["schemas"]["DashboardId"];
2829
- };
2830
- cookie?: never;
2831
- };
2832
- requestBody?: never;
2833
- responses: {
2834
- /** @description The dashboard with the given id */
2835
- 200: {
2836
- headers: {
2837
- [name: string]: unknown;
2838
- };
2839
- content: {
2840
- "application/json": {
2841
- description: string | null;
2842
- /** Format: uuid */
2843
- id: string;
2844
- name: string;
2845
- positions: ({
2846
- /** @enum {string} */
2847
- type: "data-report";
2848
- flowId: string;
2849
- flowDataId: number;
2850
- title: string;
2851
- col: number;
2852
- colSpan: number;
2853
- rowSpan: number;
2854
- } | {
2855
- /** @enum {string} */
2856
- type: "visualization";
2857
- visualizationId: number;
2858
- title: string;
2859
- col: number;
2860
- colSpan: number;
2861
- rowSpan: number;
2862
- })[];
2863
- is_public: boolean;
2864
- };
2865
- };
2866
- };
2867
- /** @description Unable to retrieve dashboard with this id */
2868
- 404: {
2869
- headers: {
2870
- [name: string]: unknown;
2871
- };
2872
- content: {
2873
- "application/json": {
2874
- error: string;
2875
- };
2876
- };
2877
- };
2878
- /** @description Something wrong happened */
2879
- 500: {
2880
- headers: {
2881
- [name: string]: unknown;
2882
- };
2883
- content: {
2884
- "application/json": {
2885
- error: string;
2886
- };
2887
- };
2888
- };
2889
- };
2890
- };
2891
- generateInsight: {
2892
- parameters: {
2893
- query?: never;
2894
- header?: never;
2895
- path?: never;
2896
- cookie?: never;
2897
- };
2898
- requestBody?: {
2899
- content: {
2900
- "application/json": {
2901
- selected_filter_value: string;
2902
- custom_id: string;
2903
- };
2904
- };
2905
- };
2906
- responses: {
2907
- /** @description Insight generated successfully */
2908
- 200: {
2909
- headers: {
2910
- [name: string]: unknown;
2911
- };
2912
- content: {
2913
- "application/json": {
2914
- /** @enum {string} */
2915
- type: "text";
2916
- insight: string;
2917
- } | {
2918
- /** @enum {string} */
2919
- type: "missing";
2920
- };
2921
- };
2922
- };
2923
- /** @description Invalid request */
2924
- 400: {
2925
- headers: {
2926
- [name: string]: unknown;
2927
- };
2928
- content: {
2929
- "application/json": {
2930
- error: string;
2931
- };
2932
- };
2933
- };
2934
- /** @description Insight not found */
2935
- 404: {
2936
- headers: {
2937
- [name: string]: unknown;
2938
- };
2939
- content: {
2940
- "application/json": {
2941
- error: string;
2942
- };
2943
- };
2944
- };
2945
- /** @description Something wrong happened */
2946
- 500: {
2947
- headers: {
2948
- [name: string]: unknown;
2949
- };
2950
- content: {
2951
- "application/json": {
2952
- error: string;
2953
- };
2954
- };
2955
- };
2956
- };
2957
- };
2958
- createQueryExample: {
2959
- parameters: {
2960
- query?: never;
2961
- header?: never;
2962
- path?: never;
2963
- cookie?: never;
2964
- };
2965
- requestBody?: {
2966
- content: {
2967
- "application/json": {
2968
- request: string;
2969
- sql: string;
2970
- };
2971
- };
2972
- };
2973
- responses: {
2974
- /** @description Query example created successfully */
2975
- 200: {
2976
- headers: {
2977
- [name: string]: unknown;
2978
- };
2979
- content: {
2980
- "application/json": {
2981
- id: number;
2982
- };
2983
- };
2984
- };
2985
- /** @description Something wrong happened */
2986
- 500: {
2987
- headers: {
2988
- [name: string]: unknown;
2989
- };
2990
- content: {
2991
- "application/json": {
2992
- error: string;
2993
- };
2994
- };
2995
- };
2996
- };
2997
- };
2998
- updateQueryExample: {
2999
- parameters: {
3000
- query?: never;
3001
- header?: never;
3002
- path: {
3003
- id: string;
3004
- };
3005
- cookie?: never;
3006
- };
3007
- requestBody?: {
3008
- content: {
3009
- "application/json": {
3010
- request?: string;
3011
- sql?: string;
3012
- is_active?: boolean;
3013
- is_removed?: boolean;
3014
- };
3015
- };
3016
- };
3017
- responses: {
3018
- /** @description Query example updated successfully */
3019
- 200: {
3020
- headers: {
3021
- [name: string]: unknown;
3022
- };
3023
- content: {
3024
- "application/json": {
3025
- id: number;
3026
- };
3027
- };
3028
- };
3029
- /** @description Something wrong happened */
3030
- 500: {
3031
- headers: {
3032
- [name: string]: unknown;
3033
- };
3034
- content: {
3035
- "application/json": {
3036
- error: string;
3037
- };
3038
- };
3039
- };
3040
- };
3041
- };
3042
- sqlPreview: {
3043
- parameters: {
3044
- query?: never;
3045
- header?: never;
3046
- path?: never;
3047
- cookie?: never;
3048
- };
3049
- requestBody?: {
3050
- content: {
3051
- "application/json": {
3052
- sql: string;
3053
- };
3054
- };
3055
- };
3056
- responses: {
3057
- /** @description SQL query executed successfully */
3058
- 200: {
3059
- headers: {
3060
- [name: string]: unknown;
3061
- };
3062
- content: {
3063
- "application/json": {
3064
- columns: {
3065
- id: string;
3066
- accessorKey: string;
3067
- header: string;
3068
- cell?: unknown;
3069
- meta?: {
3070
- [key: string]: unknown;
3071
- };
3072
- }[];
3073
- data: {
3074
- [key: string]: unknown;
3075
- }[];
3076
- metadata?: {
3077
- wasSampled: boolean;
3078
- originalCount: number;
3079
- sampledCount: number;
3080
- };
3081
- };
3082
- };
3083
- };
3084
- /** @description Invalid SQL query or request */
3085
- 400: {
3086
- headers: {
3087
- [name: string]: unknown;
3088
- };
3089
- content: {
3090
- "application/json": {
3091
- error: string;
3092
- };
3093
- };
3094
- };
3095
- /** @description Internal server error */
3096
- 500: {
3097
- headers: {
3098
- [name: string]: unknown;
3099
- };
3100
- content: {
3101
- "application/json": {
3102
- error: string;
3103
- };
3104
- };
3105
- };
3106
- };
3107
- };
3108
- getSankeyData: {
3109
- parameters: {
3110
- query?: never;
3111
- header?: never;
3112
- path?: never;
3113
- cookie?: never;
3114
- };
3115
- requestBody?: never;
3116
- responses: {
3117
- /** @description Sankey data retrieved successfully */
3118
- 200: {
3119
- headers: {
3120
- [name: string]: unknown;
3121
- };
3122
- content: {
3123
- "application/json": {
3124
- metadata: {
3125
- embedding_type: string;
3126
- approach: string;
3127
- total_clusters: number;
3128
- total_noise_points: number;
3129
- total_requests: number;
3130
- generation_timestamp: string;
3131
- };
3132
- clusters: {
3133
- cluster_id: number;
3134
- cluster_name: string;
3135
- representative_questions: {
3136
- question: string;
3137
- count: number;
3138
- sample_requests: string[];
3139
- avg_confidence_score?: number | null;
3140
- avg_assumptions_score?: number | null;
3141
- avg_friendliness_score?: number | null;
3142
- }[];
3143
- count: number;
3144
- avg_confidence_score?: number | null;
3145
- avg_assumptions_score?: number | null;
3146
- avg_friendliness_score?: number | null;
3147
- }[];
3148
- };
3149
- };
3150
- };
3151
- /** @description Something wrong happened */
3152
- 500: {
3153
- headers: {
3154
- [name: string]: unknown;
3155
- };
3156
- content: {
3157
- "application/json": {
3158
- error: string;
3159
- };
3160
- };
3161
- };
3162
- };
3163
- };
3164
- generateInsightTemplate: {
3165
- parameters: {
3166
- query?: never;
3167
- header?: never;
3168
- path?: never;
3169
- cookie?: never;
3170
- };
3171
- requestBody?: {
3172
- content: {
3173
- "application/json": {
3174
- request: string;
3175
- insight_type: string;
3176
- additional_context?: string;
3177
- };
3178
- };
3179
- };
3180
- responses: {
3181
- /** @description Insight template generated successfully */
3182
- 200: {
3183
- headers: {
3184
- [name: string]: unknown;
3185
- };
3186
- content: {
3187
- "application/json": {
3188
- expanded_request: string;
3189
- };
3190
- };
3191
- };
3192
- /** @description Something wrong happened */
3193
- 500: {
3194
- headers: {
3195
- [name: string]: unknown;
3196
- };
3197
- content: {
3198
- "application/json": {
3199
- error: string;
3200
- };
3201
- };
3202
- };
3203
- };
3204
- };
3205
- getContextualInsightPreviewData: {
3206
- parameters: {
3207
- query?: {
3208
- limit?: number;
3209
- /** @example name:asc,date:desc */
3210
- order?: string;
3211
- cursor?: number;
3212
- /** @example status:active,name:John%20Doe */
3213
- filter?: string;
3214
- };
3215
- header?: never;
3216
- path: {
3217
- report_id: string;
3218
- };
3219
- cookie?: never;
3220
- };
3221
- requestBody?: never;
3222
- responses: {
3223
- /** @description The preview data for the contextual insight */
3224
- 200: {
3225
- headers: {
3226
- [name: string]: unknown;
3227
- };
3228
- content: {
3229
- "application/json": {
3230
- columns: {
3231
- id: string;
3232
- accessorKey: string;
3233
- header: string;
3234
- cell?: unknown;
3235
- meta?: {
3236
- [key: string]: unknown;
3237
- };
3238
- }[];
3239
- data: {
3240
- [key: string]: unknown;
3241
- }[];
3242
- metadata?: {
3243
- wasSampled: boolean;
3244
- originalCount: number;
3245
- sampledCount: number;
3246
- };
3247
- };
3248
- };
3249
- };
3250
- /** @description Unable to retrieve flow data with this id */
3251
- 404: {
3252
- headers: {
3253
- [name: string]: unknown;
3254
- };
3255
- content: {
3256
- "application/json": {
3257
- error: string;
3258
- };
3259
- };
3260
- };
3261
- /** @description Something wrong happened */
3262
- 500: {
3263
- headers: {
3264
- [name: string]: unknown;
3265
- };
3266
- content: {
3267
- "application/json": {
3268
- error: string;
3269
- };
3270
- };
3271
- };
3272
- };
3273
- };
3274
- getContextualInsightColumnSampleValues: {
3275
- parameters: {
3276
- query: {
3277
- column_name: string;
3278
- };
3279
- header?: never;
3280
- path: {
3281
- report_id: string;
3282
- };
3283
- cookie?: never;
3284
- };
3285
- requestBody?: never;
3286
- responses: {
3287
- /** @description Sample values for the specified column */
3288
- 200: {
3289
- headers: {
3290
- [name: string]: unknown;
3291
- };
3292
- content: {
3293
- "application/json": {
3294
- options: unknown[];
3295
- };
3296
- };
3297
- };
3298
- /** @description Unable to retrieve flow data with this id */
3299
- 404: {
3300
- headers: {
3301
- [name: string]: unknown;
3302
- };
3303
- content: {
3304
- "application/json": {
3305
- error: string;
3306
- };
3307
- };
3308
- };
3309
- /** @description Something wrong happened */
3310
- 500: {
3311
- headers: {
3312
- [name: string]: unknown;
3313
- };
3314
- content: {
3315
- "application/json": {
3316
- error: string;
3317
- };
3318
- };
3319
- };
3320
- };
3321
- };
3322
- extractInsight: {
3323
- parameters: {
3324
- query?: never;
3325
- header?: never;
3326
- path?: never;
3327
- cookie?: never;
3328
- };
3329
- requestBody?: {
3330
- content: {
3331
- "application/json": {
3332
- flow_id: string;
3333
- report_id: number;
3334
- topic: string;
3335
- expanded_request: string;
3336
- insight_type: string;
3337
- selected_filter: string;
3338
- selected_filter_value: string;
3339
- additional_context?: string;
3340
- };
3341
- };
3342
- };
3343
- responses: {
3344
- /** @description Insight extracted successfully */
3345
- 200: {
3346
- headers: {
3347
- [name: string]: unknown;
3348
- };
3349
- content: {
3350
- "application/json": {
3351
- /** @enum {string} */
3352
- type: "text";
3353
- insight: string;
3354
- } | {
3355
- /** @enum {string} */
3356
- type: "missing";
3357
- };
3358
- };
3359
- };
3360
- /** @description Something wrong happened */
3361
- 500: {
3362
- headers: {
3363
- [name: string]: unknown;
3364
- };
3365
- content: {
3366
- "application/json": {
3367
- error: string;
3368
- };
3369
- };
3370
- };
3371
- };
3372
- };
3373
- suggestFilterColumn: {
3374
- parameters: {
3375
- query?: never;
3376
- header?: never;
3377
- path?: never;
3378
- cookie?: never;
3379
- };
3380
- requestBody?: {
3381
- content: {
3382
- "application/json": {
3383
- report_id: number;
3384
- request: string;
3385
- insight_type: string;
3386
- additional_context?: string;
3387
- };
3388
- };
3389
- };
3390
- responses: {
3391
- /** @description Filter column suggestion generated successfully */
3392
- 200: {
3393
- headers: {
3394
- [name: string]: unknown;
3395
- };
3396
- content: {
3397
- "application/json": {
3398
- recommended_column: string;
3399
- reasoning: string;
3400
- };
3401
- };
3402
- };
3403
- /** @description Report not found */
3404
- 404: {
3405
- headers: {
3406
- [name: string]: unknown;
3407
- };
3408
- content: {
3409
- "application/json": {
3410
- error: string;
3411
- };
3412
- };
3413
- };
3414
- /** @description Something wrong happened */
3415
- 500: {
3416
- headers: {
3417
- [name: string]: unknown;
3418
- };
3419
- content: {
3420
- "application/json": {
3421
- error: string;
3422
- };
3423
- };
3424
- };
3425
- };
3426
- };
3427
- }
3428
-
3429
- declare type PatchParam<T, Config extends RemoveParamsConfig, P extends keyof Config> = Simplify<T extends {
3430
- [key in P]: infer H;
3431
- } ? H extends Partial<Record<string, unknown>> ? Config[P] extends string ? Omit<H, Config[P]> : H : never : never>;
3432
-
3433
- /**
3434
- * This file was auto-generated by openapi-typescript.
3435
- * Do not make direct changes to the file.
3436
- */
3437
-
3438
- declare interface paths {
3439
- "/api/v1/auth/exchangeExternalToken": {
3440
- parameters: {
3441
- query?: never;
3442
- header?: never;
3443
- path?: never;
3444
- cookie?: never;
3445
- };
3446
- get?: never;
3447
- put?: never;
3448
- post: operations["exchangeExternalToken"];
3449
- delete?: never;
3450
- options?: never;
3451
- head?: never;
3452
- patch?: never;
3453
- trace?: never;
3454
- };
3455
- "/api/v1/auth/apiInformation": {
3456
- parameters: {
3457
- query?: never;
3458
- header?: never;
3459
- path?: never;
3460
- cookie?: never;
3461
- };
3462
- get: operations["getApiInformation"];
3463
- put?: never;
3464
- post?: never;
3465
- delete?: never;
3466
- options?: never;
3467
- head?: never;
3468
- patch?: never;
3469
- trace?: never;
3470
- };
3471
- "/api/auth/apiInformation": {
3472
- parameters: {
3473
- query?: never;
3474
- header?: never;
3475
- path?: never;
3476
- cookie?: never;
3477
- };
3478
- get: operations["getApiInformation"];
3479
- put?: never;
3480
- post?: never;
3481
- delete?: never;
3482
- options?: never;
3483
- head?: never;
3484
- patch?: never;
3485
- trace?: never;
3486
- };
3487
- "/api/v1/public/dashboards/{dashboard_id}/visualizations/{visualization_id}": {
3488
- parameters: {
3489
- query?: never;
3490
- header?: never;
3491
- path?: never;
3492
- cookie?: never;
3493
- };
3494
- get: operations["PublicDashboardFetchVisualization"];
3495
- put?: never;
3496
- post?: never;
3497
- delete?: never;
3498
- options?: never;
3499
- head?: never;
3500
- patch?: never;
3501
- trace?: never;
3502
- };
3503
- "/api/v1/public/dashboards/{dashboard_id}": {
3504
- parameters: {
3505
- query?: never;
3506
- header?: never;
3507
- path?: never;
3508
- cookie?: never;
3509
- };
3510
- get: operations["retrievePublicDashboard"];
3511
- put?: never;
3512
- post?: never;
3513
- delete?: never;
3514
- options?: never;
3515
- head?: never;
3516
- patch?: never;
3517
- trace?: never;
3518
- };
3519
- "/api/v1/public/dashboards/{dashboard_id}/data-reports/{report_id}/columns": {
3520
- parameters: {
3521
- query?: never;
3522
- header?: never;
3523
- path?: never;
3524
- cookie?: never;
3525
- };
3526
- get: operations["getPublicDataReportColumns"];
3527
- put?: never;
3528
- post?: never;
3529
- delete?: never;
3530
- options?: never;
3531
- head?: never;
3532
- patch?: never;
3533
- trace?: never;
3534
- };
3535
- "/api/v1/public/dashboards/{dashboard_id}/data-reports/{report_id}/data": {
3536
- parameters: {
3537
- query?: never;
3538
- header?: never;
3539
- path?: never;
3540
- cookie?: never;
3541
- };
3542
- get: operations["getPublicDataReportData"];
3543
- put?: never;
3544
- post?: never;
3545
- delete?: never;
3546
- options?: never;
3547
- head?: never;
3548
- patch?: never;
3549
- trace?: never;
3550
- };
3551
- "/api/v1/public/dashboards/{dashboard_id}/data-reports/{report_id}/count": {
3552
- parameters: {
3553
- query?: never;
3554
- header?: never;
3555
- path?: never;
3556
- cookie?: never;
3557
- };
3558
- get: operations["getPublicDataReportRowCount"];
3559
- put?: never;
3560
- post?: never;
3561
- delete?: never;
3562
- options?: never;
3563
- head?: never;
3564
- patch?: never;
3565
- trace?: never;
3566
- };
3567
- "/api/v1/end2end": {
3568
- parameters: {
3569
- query?: never;
3570
- header?: never;
3571
- path?: never;
3572
- cookie?: never;
3573
- };
3574
- get?: never;
3575
- put?: never;
3576
- post: operations["runEnd2EndFlow"];
3577
- delete?: never;
3578
- options?: never;
3579
- head?: never;
3580
- patch?: never;
3581
- trace?: never;
3582
- };
3583
- "/api/v1/flows/{flowId}": {
3584
- parameters: {
3585
- query?: never;
3586
- header?: never;
3587
- path?: never;
3588
- cookie?: never;
3589
- };
3590
- get: operations["retrieveFlow"];
3591
- put?: never;
3592
- post?: never;
3593
- delete?: never;
3594
- options?: never;
3595
- head?: never;
3596
- patch?: never;
3597
- trace?: never;
3598
- };
3599
- "/api/v1/recent-flows": {
3600
- parameters: {
3601
- query?: never;
3602
- header?: never;
3603
- path?: never;
3604
- cookie?: never;
3605
- };
3606
- get: operations["retrieveRecentFlows"];
3607
- put?: never;
3608
- post?: never;
3609
- delete?: never;
3610
- options?: never;
3611
- head?: never;
3612
- patch?: never;
3613
- trace?: never;
3614
- };
3615
- "/api/v1/flows/{flowId}/data-reports": {
3616
- parameters: {
3617
- query?: never;
3618
- header?: never;
3619
- path?: never;
3620
- cookie?: never;
3621
- };
3622
- get: operations["retrieveFlowDataReports"];
3623
- put?: never;
3624
- post?: never;
3625
- delete?: never;
3626
- options?: never;
3627
- head?: never;
3628
- patch?: never;
3629
- trace?: never;
3630
- };
3631
- "/api/v1/data-reports/{report_id}/feedback": {
3632
- parameters: {
3633
- query?: never;
3634
- header?: never;
3635
- path?: never;
3636
- cookie?: never;
3637
- };
3638
- get: operations["getDataReportFeedback"];
3639
- put?: never;
3640
- post: operations["upsertReportFeedback"];
3641
- delete: operations["deleteReportFeedback"];
3642
- options?: never;
3643
- head?: never;
3644
- patch?: never;
3645
- trace?: never;
3646
- };
3647
- "/api/v1/flows/{flowId}/data-reports/last/status": {
3648
- parameters: {
3649
- query?: never;
3650
- header?: never;
3651
- path?: never;
3652
- cookie?: never;
3653
- };
3654
- get: operations["retrieveLatestDataReportStatus"];
3655
- put?: never;
3656
- post?: never;
3657
- delete?: never;
3658
- options?: never;
3659
- head?: never;
3660
- patch?: never;
3661
- trace?: never;
3662
- };
3663
- "/api/v1/data-reports/{report_id}/explainability": {
3664
- parameters: {
3665
- query?: never;
3666
- header?: never;
3667
- path?: never;
3668
- cookie?: never;
3669
- };
3670
- get: operations["getDataReportExplainability"];
3671
- put?: never;
3672
- post?: never;
3673
- delete?: never;
3674
- options?: never;
3675
- head?: never;
3676
- patch?: never;
3677
- trace?: never;
3678
- };
3679
- "/api/v1/timeline/bookmark": {
3680
- parameters: {
3681
- query?: never;
3682
- header?: never;
3683
- path?: never;
3684
- cookie?: never;
3685
- };
3686
- get?: never;
3687
- put?: never;
3688
- post: operations["toggleBookmark"];
3689
- delete?: never;
3690
- options?: never;
3691
- head?: never;
3692
- patch?: never;
3693
- trace?: never;
3694
- };
3695
- "/api/v1/data-tables/latest-refresh": {
3696
- parameters: {
3697
- query?: never;
3698
- header?: never;
3699
- path?: never;
3700
- cookie?: never;
3701
- };
3702
- get: operations["retrieveLatestDataRefresh"];
3703
- put?: never;
3704
- post?: never;
3705
- delete?: never;
3706
- options?: never;
3707
- head?: never;
3708
- patch?: never;
3709
- trace?: never;
3710
- };
3711
- "/api/v1/data-reports/{report_id}/export": {
3712
- parameters: {
3713
- query?: never;
3714
- header?: never;
3715
- path?: never;
3716
- cookie?: never;
3717
- };
3718
- get: operations["exportReportData"];
3719
- put?: never;
3720
- post?: never;
3721
- delete?: never;
3722
- options?: never;
3723
- head?: never;
3724
- patch?: never;
3725
- trace?: never;
3726
- };
3727
- "/api/v1/data-reports/{report_id}/columns": {
3728
- parameters: {
3729
- query?: never;
3730
- header?: never;
3731
- path?: never;
3732
- cookie?: never;
3733
- };
3734
- get: operations["getDataReportColumns"];
3735
- put?: never;
3736
- post?: never;
3737
- delete?: never;
3738
- options?: never;
3739
- head?: never;
3740
- patch?: never;
3741
- trace?: never;
3742
- };
3743
- "/api/v1/data-reports/{report_id}/data": {
3744
- parameters: {
3745
- query?: never;
3746
- header?: never;
3747
- path?: never;
3748
- cookie?: never;
3749
- };
3750
- get: operations["getDataReportData"];
3751
- put?: never;
3752
- post?: never;
3753
- delete?: never;
3754
- options?: never;
3755
- head?: never;
3756
- patch?: never;
3757
- trace?: never;
3758
- };
3759
- "/api/v1/data-reports/{report_id}/count": {
3760
- parameters: {
3761
- query?: never;
3762
- header?: never;
3763
- path?: never;
3764
- cookie?: never;
3765
- };
3766
- get: operations["getDataReportRowCount"];
3767
- put?: never;
3768
- post?: never;
3769
- delete?: never;
3770
- options?: never;
3771
- head?: never;
3772
- patch?: never;
3773
- trace?: never;
3774
- };
3775
- "/api/v1/data-reports/{report_id}/visualizations": {
3776
- parameters: {
3777
- query?: never;
3778
- header?: never;
3779
- path?: never;
3780
- cookie?: never;
3781
- };
3782
- get: operations["getDataReportVisualizations"];
3783
- put?: never;
3784
- post?: never;
3785
- delete?: never;
3786
- options?: never;
3787
- head?: never;
3788
- patch?: never;
3789
- trace?: never;
3790
- };
3791
- "/api/v1/flows": {
3792
- parameters: {
3793
- query?: never;
3794
- header?: never;
3795
- path?: never;
3796
- cookie?: never;
3797
- };
3798
- get?: never;
3799
- put?: never;
3800
- post: operations["createFlow"];
3801
- delete?: never;
3802
- options?: never;
3803
- head?: never;
3804
- patch?: never;
3805
- trace?: never;
3806
- };
3807
- "/api/v1/chat/{flowId}/timeline": {
3808
- parameters: {
3809
- query?: never;
3810
- header?: never;
3811
- path?: never;
3812
- cookie?: never;
3813
- };
3814
- get: operations["retrieveChatTimeline"];
3815
- put?: never;
3816
- post?: never;
3817
- delete?: never;
3818
- options?: never;
3819
- head?: never;
3820
- patch?: never;
3821
- trace?: never;
3822
- };
3823
- "/api/v1/chat/{flowId}/messages": {
3824
- parameters: {
3825
- query?: never;
3826
- header?: never;
3827
- path?: never;
3828
- cookie?: never;
3829
- };
3830
- get: operations["retrieveChatMessages"];
3831
- put?: never;
3832
- post?: never;
3833
- delete?: never;
3834
- options?: never;
3835
- head?: never;
3836
- patch?: never;
3837
- trace?: never;
3838
- };
3839
- "/api/v1/recommendations": {
3840
- parameters: {
3841
- query?: never;
3842
- header?: never;
3843
- path?: never;
3844
- cookie?: never;
3845
- };
3846
- get: operations["getStarterRecommendations"];
3847
- put?: never;
3848
- post?: never;
3849
- delete?: never;
3850
- options?: never;
3851
- head?: never;
3852
- patch?: never;
3853
- trace?: never;
3854
- };
3855
- "/api/v1/visualizations/{visualization_id}": {
3856
- parameters: {
3857
- query?: never;
3858
- header?: never;
3859
- path?: never;
3860
- cookie?: never;
3861
- };
3862
- get: operations["fetchVisualization"];
3863
- put?: never;
3864
- post?: never;
3865
- delete?: never;
3866
- options?: never;
3867
- head?: never;
3868
- patch?: never;
3869
- trace?: never;
3870
- };
3871
- "/api/v1/flows/{flowId}/visualizations": {
3872
- parameters: {
3873
- query?: never;
3874
- header?: never;
3875
- path?: never;
3876
- cookie?: never;
3877
- };
3878
- get: operations["listVisualizationsForFlow"];
3879
- put?: never;
3880
- post?: never;
3881
- delete?: never;
3882
- options?: never;
3883
- head?: never;
3884
- patch?: never;
3885
- trace?: never;
3886
- };
3887
- "/api/v1/trigger-flow/": {
3888
- parameters: {
3889
- query?: never;
3890
- header?: never;
3891
- path?: never;
3892
- cookie?: never;
3893
- };
3894
- get?: never;
3895
- put?: never;
3896
- post: operations["triggerFlow"];
3897
- delete?: never;
3898
- options?: never;
3899
- head?: never;
3900
- patch?: never;
3901
- trace?: never;
3902
- };
3903
- "/api/v1/dashboard/{dashboard_id}": {
3904
- parameters: {
3905
- query?: never;
3906
- header?: never;
3907
- path?: never;
3908
- cookie?: never;
3909
- };
3910
- get: operations["retrieveDashboard"];
3911
- put?: never;
3912
- post?: never;
3913
- delete?: never;
3914
- options?: never;
3915
- head?: never;
3916
- patch?: never;
3917
- trace?: never;
3918
- };
3919
- "/api/v1/contextual-insights/generate-insight": {
3920
- parameters: {
3921
- query?: never;
3922
- header?: never;
3923
- path?: never;
3924
- cookie?: never;
3925
- };
3926
- get?: never;
3927
- put?: never;
3928
- post: operations["generateInsight"];
3929
- delete?: never;
3930
- options?: never;
3931
- head?: never;
3932
- patch?: never;
3933
- trace?: never;
3934
- };
3935
- "/api/v1/admin-console/query-examples": {
3936
- parameters: {
3937
- query?: never;
3938
- header?: never;
3939
- path?: never;
3940
- cookie?: never;
3941
- };
3942
- get?: never;
3943
- put?: never;
3944
- post: operations["createQueryExample"];
3945
- delete?: never;
3946
- options?: never;
3947
- head?: never;
3948
- patch?: never;
3949
- trace?: never;
3950
- };
3951
- "/api/v1/admin-console/query-examples/{id}": {
3952
- parameters: {
3953
- query?: never;
3954
- header?: never;
3955
- path?: never;
3956
- cookie?: never;
3957
- };
3958
- get?: never;
3959
- put?: never;
3960
- post?: never;
3961
- delete?: never;
3962
- options?: never;
3963
- head?: never;
3964
- patch: operations["updateQueryExample"];
3965
- trace?: never;
3966
- };
3967
- "/api/v1/admin-console/sql/preview": {
3968
- parameters: {
3969
- query?: never;
3970
- header?: never;
3971
- path?: never;
3972
- cookie?: never;
3973
- };
3974
- get?: never;
3975
- put?: never;
3976
- post: operations["sqlPreview"];
3977
- delete?: never;
3978
- options?: never;
3979
- head?: never;
3980
- patch?: never;
3981
- trace?: never;
3982
- };
3983
- "/api/v1/admin-console/usage-insights/sankey": {
3984
- parameters: {
3985
- query?: never;
3986
- header?: never;
3987
- path?: never;
3988
- cookie?: never;
3989
- };
3990
- get: operations["getSankeyData"];
3991
- put?: never;
3992
- post?: never;
3993
- delete?: never;
3994
- options?: never;
3995
- head?: never;
3996
- patch?: never;
3997
- trace?: never;
3998
- };
3999
- "/api/v1/admin-console/contextual-insights/generate-template": {
4000
- parameters: {
4001
- query?: never;
4002
- header?: never;
4003
- path?: never;
4004
- cookie?: never;
4005
- };
4006
- get?: never;
4007
- put?: never;
4008
- post: operations["generateInsightTemplate"];
4009
- delete?: never;
4010
- options?: never;
4011
- head?: never;
4012
- patch?: never;
4013
- trace?: never;
4014
- };
4015
- "/api/v1/admin-console/contextual-insights/preview/{report_id}/data": {
4016
- parameters: {
4017
- query?: never;
4018
- header?: never;
4019
- path?: never;
4020
- cookie?: never;
4021
- };
4022
- get: operations["getContextualInsightPreviewData"];
4023
- put?: never;
4024
- post?: never;
4025
- delete?: never;
4026
- options?: never;
4027
- head?: never;
4028
- patch?: never;
4029
- trace?: never;
4030
- };
4031
- "/api/v1/admin-console/contextual-insights/preview/{report_id}/sample-values": {
4032
- parameters: {
4033
- query?: never;
4034
- header?: never;
4035
- path?: never;
4036
- cookie?: never;
4037
- };
4038
- get: operations["getContextualInsightColumnSampleValues"];
4039
- put?: never;
4040
- post?: never;
4041
- delete?: never;
4042
- options?: never;
4043
- head?: never;
4044
- patch?: never;
4045
- trace?: never;
4046
- };
4047
- "/api/v1/admin-console/contextual-insights/extract-insight": {
4048
- parameters: {
4049
- query?: never;
4050
- header?: never;
4051
- path?: never;
4052
- cookie?: never;
4053
- };
4054
- get?: never;
4055
- put?: never;
4056
- post: operations["extractInsight"];
4057
- delete?: never;
4058
- options?: never;
4059
- head?: never;
4060
- patch?: never;
4061
- trace?: never;
4062
- };
4063
- "/api/v1/admin-console/contextual-insights/suggest-filter-column": {
4064
- parameters: {
4065
- query?: never;
4066
- header?: never;
4067
- path?: never;
4068
- cookie?: never;
4069
- };
4070
- get?: never;
4071
- put?: never;
4072
- post: operations["suggestFilterColumn"];
4073
- delete?: never;
4074
- options?: never;
4075
- head?: never;
4076
- patch?: never;
4077
- trace?: never;
4078
- };
4079
- }
4080
-
4081
- declare type PersistenceOptions = "queryParam" | "none";
4082
-
4083
- export declare const PublicDashboard: React.FC<React.ComponentProps<typeof Dashboard_2>>;
4084
-
4085
- export declare const PublicDataReport: React.FC<{
4086
- dashboardId: string;
4087
- reportId: number;
4088
- }>;
4089
-
4090
- declare type RemoveAuthHeader<PathSchema> = Simplify<{
4091
- [Method in keyof PathSchema]: RemoveParams<PathSchema[Method], ToRemove>;
4092
- }>;
4093
-
4094
- declare type RemoveParams<MethodSchema, Config extends RemoveParamsConfig> = Simplify<MethodSchema extends {
4095
- parameters: infer P;
4096
- } ? Omit<MethodSchema, "parameters"> & {
4097
- parameters: {
4098
- header?: PatchParam<P, Config, "header">;
4099
- query?: PatchParam<P, Config, "query">;
4100
- path?: PatchParam<P, Config, "path">;
4101
- cookie?: PatchParam<P, Config, "cookie">;
4102
- };
4103
- } : MethodSchema>;
4104
-
4105
- declare type RemoveParamsConfig = Simplify<{
4106
- header?: string;
4107
- query?: string;
4108
- path?: string;
4109
- cookie?: string;
4110
- }>;
4111
-
4112
- declare type ReportDataFilters = {
4113
- columns?: string[];
4114
- limit: number;
4115
- sorting: SortingState;
4116
- filters: TableFilters;
4117
- cursor?: number;
4118
- };
4119
-
4120
- export declare const StandaloneConversationModal: React.FC<StandaloneConversationModalProps>;
4121
-
4122
- declare type StandaloneConversationModalProps = {
4123
- opened: boolean;
4124
- flowId: string;
4125
- onOpenChange?: (open: boolean) => void;
4126
- };
4127
-
4128
- export declare type StartFlowParam = {
4129
- query: string;
4130
- } | {
4131
- triggerId: string;
4132
- variables: Record<string, string>;
4133
- };
4134
-
4135
- declare type StartOptions = DisplayControlProps & {
4136
- label?: string;
4137
- recommendationsLabel?: string;
4138
- placeholders?: string[];
4139
- };
4140
-
4141
- declare type TableFilters = Record<string, string | number>;
4142
-
4143
- declare type ToRemove = Simplify<{
4144
- header: "sp-access-token";
4145
- }>;
4146
-
4147
- export declare const useCreateFlow: (options?: UseMutationOptions<{
4148
- flowId: string;
4149
- }, Error, StartFlowParam>) => {
4150
- createFlow: UseMutateFunction< {
4151
- flowId: string;
4152
- }, Error, StartFlowParam, unknown>;
4153
- createFlowAsync: UseMutateAsyncFunction< {
4154
- flowId: string;
4155
- }, Error, StartFlowParam, unknown>;
4156
- isCreatingFlow: boolean;
4157
- data: undefined;
4158
- variables: undefined;
4159
- error: null;
4160
- isError: false;
4161
- isIdle: true;
4162
- isPending: false;
4163
- isSuccess: false;
4164
- status: "idle";
4165
- mutate: UseMutateFunction< {
4166
- flowId: string;
4167
- }, Error, StartFlowParam, unknown>;
4168
- reset: () => void;
4169
- context: unknown;
4170
- failureCount: number;
4171
- failureReason: Error | null;
4172
- isPaused: boolean;
4173
- submittedAt: number;
4174
- mutateAsync: UseMutateAsyncFunction< {
4175
- flowId: string;
4176
- }, Error, StartFlowParam, unknown>;
4177
- } | {
4178
- createFlow: UseMutateFunction< {
4179
- flowId: string;
4180
- }, Error, StartFlowParam, unknown>;
4181
- createFlowAsync: UseMutateAsyncFunction< {
4182
- flowId: string;
4183
- }, Error, StartFlowParam, unknown>;
4184
- isCreatingFlow: boolean;
4185
- data: undefined;
4186
- variables: StartFlowParam;
4187
- error: null;
4188
- isError: false;
4189
- isIdle: false;
4190
- isPending: true;
4191
- isSuccess: false;
4192
- status: "pending";
4193
- mutate: UseMutateFunction< {
4194
- flowId: string;
4195
- }, Error, StartFlowParam, unknown>;
4196
- reset: () => void;
4197
- context: unknown;
4198
- failureCount: number;
4199
- failureReason: Error | null;
4200
- isPaused: boolean;
4201
- submittedAt: number;
4202
- mutateAsync: UseMutateAsyncFunction< {
4203
- flowId: string;
4204
- }, Error, StartFlowParam, unknown>;
4205
- } | {
4206
- createFlow: UseMutateFunction< {
4207
- flowId: string;
4208
- }, Error, StartFlowParam, unknown>;
4209
- createFlowAsync: UseMutateAsyncFunction< {
4210
- flowId: string;
4211
- }, Error, StartFlowParam, unknown>;
4212
- isCreatingFlow: boolean;
4213
- data: undefined;
4214
- error: Error;
4215
- variables: StartFlowParam;
4216
- isError: true;
4217
- isIdle: false;
4218
- isPending: false;
4219
- isSuccess: false;
4220
- status: "error";
4221
- mutate: UseMutateFunction< {
4222
- flowId: string;
4223
- }, Error, StartFlowParam, unknown>;
4224
- reset: () => void;
4225
- context: unknown;
4226
- failureCount: number;
4227
- failureReason: Error | null;
4228
- isPaused: boolean;
4229
- submittedAt: number;
4230
- mutateAsync: UseMutateAsyncFunction< {
4231
- flowId: string;
4232
- }, Error, StartFlowParam, unknown>;
4233
- } | {
4234
- createFlow: UseMutateFunction< {
4235
- flowId: string;
4236
- }, Error, StartFlowParam, unknown>;
4237
- createFlowAsync: UseMutateAsyncFunction< {
4238
- flowId: string;
4239
- }, Error, StartFlowParam, unknown>;
4240
- isCreatingFlow: boolean;
4241
- data: {
4242
- flowId: string;
4243
- };
4244
- error: null;
4245
- variables: StartFlowParam;
4246
- isError: false;
4247
- isIdle: false;
4248
- isPending: false;
4249
- isSuccess: true;
4250
- status: "success";
4251
- mutate: UseMutateFunction< {
4252
- flowId: string;
4253
- }, Error, StartFlowParam, unknown>;
4254
- reset: () => void;
4255
- context: unknown;
4256
- failureCount: number;
4257
- failureReason: Error | null;
4258
- isPaused: boolean;
4259
- submittedAt: number;
4260
- mutateAsync: UseMutateAsyncFunction< {
4261
- flowId: string;
4262
- }, Error, StartFlowParam, unknown>;
4263
- };
4264
-
4265
- export declare const useDataReport: (flowDataId: FrontendReport["id"]) => {
4266
- dataColumns: {
4267
- name: string;
4268
- data_type: string;
4269
- dataType: string;
4270
- renderType?: string;
4271
- unit?: string;
4272
- }[] | undefined;
4273
- isPendingColumns: boolean;
4274
- isPendingData: boolean;
4275
- fetchNextPage: (options?: FetchNextPageOptions) => Promise<InfiniteQueryObserverResult<InfiniteData<Record<string, unknown>[], unknown>, Error>>;
4276
- isFetching: boolean;
4277
- isFetchingNextPage: boolean;
4278
- hasNextPage: boolean;
4279
- allData: Record<string, unknown>[];
4280
- explainability: {
4281
- sql_explanation?: {
4282
- chunk_title: string;
4283
- chunk_explanation: string;
4284
- lines: {
4285
- sql: string;
4286
- explanation: string;
4287
- }[];
4288
- }[] | null;
4289
- business_explanation?: {
4290
- summary: string;
4291
- implementation: string[];
4292
- assumptions: {
4293
- type: "grain" | "completeness" | "transformation" | "relationship" | "other";
4294
- details: string;
4295
- explanation: string;
4296
- }[];
4297
- } | null;
4298
- columns_lineage?: {
4299
- [key: string]: {
4300
- nodes: {
4301
- id: string;
4302
- type: "entity" | "attribute" | "filter" | "process" | "combine" | "result";
4303
- explanation: string;
4304
- }[];
4305
- edges: {
4306
- source: string;
4307
- target: string;
4308
- }[];
900
+ error: null;
901
+ variables: CreateFlowParam;
902
+ isError: false;
903
+ isIdle: false;
904
+ isPending: false;
905
+ isSuccess: true;
906
+ status: "success";
907
+ mutate: UseMutateFunction< {
908
+ flowId: string;
909
+ }, Error, CreateFlowParam, unknown>;
910
+ reset: () => void;
911
+ context: unknown;
912
+ failureCount: number;
913
+ failureReason: Error | null;
914
+ isPaused: boolean;
915
+ submittedAt: number;
916
+ mutateAsync: UseMutateAsyncFunction< {
917
+ flowId: string;
918
+ }, Error, CreateFlowParam, unknown>;
919
+ };
920
+
921
+ export declare const useDataReport: (flowDataId: FrontendReport["id"]) => {
922
+ dataColumns: {
923
+ name: string;
924
+ data_type: string;
925
+ dataType: string;
926
+ renderType?: string;
927
+ unit?: string;
928
+ }[] | undefined;
929
+ isPendingColumns: boolean;
930
+ isPendingData: boolean;
931
+ fetchNextPage: (options?: FetchNextPageOptions) => Promise<InfiniteQueryObserverResult<InfiniteData<Record<string, unknown>[], unknown>, Error>>;
932
+ isFetching: boolean;
933
+ isFetchingNextPage: boolean;
934
+ hasNextPage: boolean;
935
+ allData: Record<string, unknown>[];
936
+ explainability: {
937
+ sql_explanation?: {
938
+ chunk_title: string;
939
+ chunk_explanation: string;
940
+ lines: {
941
+ sql: string;
942
+ explanation: string;
943
+ }[];
944
+ }[] | null;
945
+ business_explanation?: {
946
+ summary: string;
947
+ implementation: string[];
948
+ assumptions: {
949
+ type: "grain" | "completeness" | "transformation" | "relationship" | "other";
950
+ details: string;
951
+ explanation: string;
952
+ }[];
953
+ } | null;
954
+ columns_lineage?: {
955
+ [key: string]: {
956
+ nodes: {
957
+ id: string;
958
+ type: "entity" | "attribute" | "filter" | "process" | "combine" | "result";
959
+ explanation: string;
960
+ }[];
961
+ edges: {
962
+ source: string;
963
+ target: string;
964
+ }[];
4309
965
  };
4310
966
  } | null;
4311
967
  confidence_score: number;
@@ -4566,96 +1222,12 @@ export declare const useMageMetricsClient: () => MageMetricsClient | undefined;
4566
1222
  export declare const useMageMetricsReady: () => false | MageMetricsClient | undefined;
4567
1223
 
4568
1224
  export declare const useRecentFlows: (limit?: number) => UseQueryResult< {
4569
- created_at: string;
4570
1225
  id: string;
4571
1226
  request: string;
1227
+ created_at: string;
4572
1228
  user_id: string | null;
4573
1229
  }[], Error>;
4574
1230
 
4575
- /**
4576
- * Create a new flow with the given user query.
4577
- * @deprecated Use `useCreateFlow` instead.
4578
- * @param options tanstack query options to create the flow
4579
- * @returns a mutation
4580
- */
4581
- export declare const useStartFlow: (options?: UseMutationOptions<string, Error, StartFlowParam>) => {
4582
- startFlow: UseMutateFunction<string, Error, StartFlowParam, unknown>;
4583
- startFlowAsync: UseMutateAsyncFunction<string, Error, StartFlowParam, unknown>;
4584
- data: undefined;
4585
- variables: undefined;
4586
- error: null;
4587
- isError: false;
4588
- isIdle: true;
4589
- isPending: false;
4590
- isSuccess: false;
4591
- status: "idle";
4592
- mutate: UseMutateFunction<string, Error, StartFlowParam, unknown>;
4593
- reset: () => void;
4594
- context: unknown;
4595
- failureCount: number;
4596
- failureReason: Error | null;
4597
- isPaused: boolean;
4598
- submittedAt: number;
4599
- mutateAsync: UseMutateAsyncFunction<string, Error, StartFlowParam, unknown>;
4600
- } | {
4601
- startFlow: UseMutateFunction<string, Error, StartFlowParam, unknown>;
4602
- startFlowAsync: UseMutateAsyncFunction<string, Error, StartFlowParam, unknown>;
4603
- data: undefined;
4604
- variables: StartFlowParam;
4605
- error: null;
4606
- isError: false;
4607
- isIdle: false;
4608
- isPending: true;
4609
- isSuccess: false;
4610
- status: "pending";
4611
- mutate: UseMutateFunction<string, Error, StartFlowParam, unknown>;
4612
- reset: () => void;
4613
- context: unknown;
4614
- failureCount: number;
4615
- failureReason: Error | null;
4616
- isPaused: boolean;
4617
- submittedAt: number;
4618
- mutateAsync: UseMutateAsyncFunction<string, Error, StartFlowParam, unknown>;
4619
- } | {
4620
- startFlow: UseMutateFunction<string, Error, StartFlowParam, unknown>;
4621
- startFlowAsync: UseMutateAsyncFunction<string, Error, StartFlowParam, unknown>;
4622
- data: undefined;
4623
- error: Error;
4624
- variables: StartFlowParam;
4625
- isError: true;
4626
- isIdle: false;
4627
- isPending: false;
4628
- isSuccess: false;
4629
- status: "error";
4630
- mutate: UseMutateFunction<string, Error, StartFlowParam, unknown>;
4631
- reset: () => void;
4632
- context: unknown;
4633
- failureCount: number;
4634
- failureReason: Error | null;
4635
- isPaused: boolean;
4636
- submittedAt: number;
4637
- mutateAsync: UseMutateAsyncFunction<string, Error, StartFlowParam, unknown>;
4638
- } | {
4639
- startFlow: UseMutateFunction<string, Error, StartFlowParam, unknown>;
4640
- startFlowAsync: UseMutateAsyncFunction<string, Error, StartFlowParam, unknown>;
4641
- data: string;
4642
- error: null;
4643
- variables: StartFlowParam;
4644
- isError: false;
4645
- isIdle: false;
4646
- isPending: false;
4647
- isSuccess: true;
4648
- status: "success";
4649
- mutate: UseMutateFunction<string, Error, StartFlowParam, unknown>;
4650
- reset: () => void;
4651
- context: unknown;
4652
- failureCount: number;
4653
- failureReason: Error | null;
4654
- isPaused: boolean;
4655
- submittedAt: number;
4656
- mutateAsync: UseMutateAsyncFunction<string, Error, StartFlowParam, unknown>;
4657
- };
4658
-
4659
1231
  declare type V1FrontendVisualization = z.output<typeof V1FrontendVisualizationSchema>;
4660
1232
 
4661
1233
  declare const V1FrontendVisualizationSchema: z.ZodObject<Omit<{
@@ -4845,13 +1417,21 @@ declare const V1FrontendVisualizationSchema: z.ZodObject<Omit<{
4845
1417
 
4846
1418
  export declare const Visualization: ForwardRefExoticComponent< {
4847
1419
  visualizationId: number;
4848
- isFullWidth: boolean;
4849
1420
  withTitle: boolean;
4850
1421
  } & RefAttributes<HTMLDivElement>>;
4851
1422
 
4852
1423
  export { }
4853
1424
 
4854
1425
 
1426
+ declare module "react" {
1427
+ namespace JSX {
1428
+ interface IntrinsicElements {
1429
+ "magemetrics-ai": ManagedModalProps;
1430
+ }
1431
+ }
1432
+ }
1433
+
1434
+
4855
1435
  declare module "react" {
4856
1436
  namespace JSX {
4857
1437
  interface IntrinsicElements {