@magemetrics/ai 0.0.56 → 0.0.57

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.
@@ -5,20 +5,15 @@ import { ForwardRefExoticComponent } from 'react';
5
5
  import { InfiniteData } from '@tanstack/react-query';
6
6
  import { InfiniteQueryObserverResult } from '@tanstack/react-query';
7
7
  import { JSX } from 'react/jsx-runtime';
8
- import { objectOutputType } from 'zod';
9
8
  import { PropsWithChildren } from 'react';
10
9
  import { RefAttributes } from 'react';
11
10
  import type { Simplify } from 'type-fest';
11
+ import { SortingState } from '@tanstack/react-table';
12
12
  import { UseMutateAsyncFunction } from '@tanstack/react-query';
13
13
  import { UseMutateFunction } from '@tanstack/react-query';
14
14
  import { UseMutationOptions } from '@tanstack/react-query';
15
15
  import { UseQueryResult } from '@tanstack/react-query';
16
16
  import { z } from 'zod';
17
- import { ZodNullable } from 'zod';
18
- import { ZodNumber } from 'zod';
19
- import { ZodOptional } from 'zod';
20
- import { ZodString } from 'zod';
21
- import { ZodTypeAny } from 'zod';
22
17
 
23
18
  export declare type AuthState = "initializing" | "ready" | "error";
24
19
 
@@ -74,6 +69,121 @@ export declare interface Components {
74
69
 
75
70
  declare interface components {
76
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;
77
187
  ReportColumns: {
78
188
  name: string;
79
189
  data_type: string;
@@ -88,9 +198,6 @@ declare interface components {
88
198
  explanation: string;
89
199
  type: string;
90
200
  };
91
- VisualizationData: {
92
- [key: string]: string | (number | null) | unknown | null;
93
- }[];
94
201
  };
95
202
  responses: never;
96
203
  parameters: never;
@@ -495,14 +602,13 @@ declare const FrontendReportSchema: z.ZodObject<Omit<{
495
602
  }, z.ZodTypeAny, "passthrough">>;
496
603
  bookmarked: z.ZodBoolean;
497
604
  status: z.ZodNullable<z.ZodString>;
498
- }, "schema" | "sql" | "table" | "is_sample" | "data_sample">, "strip", z.ZodTypeAny, {
605
+ }, "schema" | "sql" | "table" | "data_sample" | "is_sample">, "strip", z.ZodTypeAny, {
499
606
  title: string;
500
607
  status: string | null;
501
608
  id: number;
502
609
  request: string | null;
503
610
  created_at: string;
504
611
  bookmarked: boolean;
505
- flow_id: string;
506
612
  data_summary: {
507
613
  columns: Record<string, z.objectOutputType<{
508
614
  position: z.ZodOptional<z.ZodNumber>;
@@ -514,6 +620,7 @@ declare const FrontendReportSchema: z.ZodObject<Omit<{
514
620
  } & {
515
621
  [k: string]: unknown;
516
622
  };
623
+ flow_id: string;
517
624
  }, {
518
625
  title: string;
519
626
  status: string | null;
@@ -521,7 +628,6 @@ declare const FrontendReportSchema: z.ZodObject<Omit<{
521
628
  request: string | null;
522
629
  created_at: string;
523
630
  bookmarked: boolean;
524
- flow_id: string;
525
631
  data_summary: {
526
632
  columns: Record<string, z.objectInputType<{
527
633
  position: z.ZodOptional<z.ZodNumber>;
@@ -533,6 +639,7 @@ declare const FrontendReportSchema: z.ZodObject<Omit<{
533
639
  } & {
534
640
  [k: string]: unknown;
535
641
  };
642
+ flow_id: string;
536
643
  }>;
537
644
 
538
645
  declare type FrontendVisualization = z.output<typeof FrontendVisualizationSchema>;
@@ -541,6 +648,12 @@ declare const FrontendVisualizationSchema: z.ZodObject<Omit<{
541
648
  id: z.ZodNumber;
542
649
  flow_data_id: z.ZodNumber;
543
650
  created_at: z.ZodString;
651
+ sql: z.ZodString;
652
+ bookmarked: z.ZodBoolean;
653
+ data_sample: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">;
654
+ is_sample: z.ZodBoolean;
655
+ data_summary: z.ZodRecord<z.ZodString, z.ZodUnknown>;
656
+ } & {
544
657
  configuration: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
545
658
  config_version: z.ZodLiteral<2>;
546
659
  xAxisLabel: z.ZodString;
@@ -659,12 +772,11 @@ declare const FrontendVisualizationSchema: z.ZodObject<Omit<{
659
772
  categoryColumn: string;
660
773
  valueColumn: string;
661
774
  }>]>;
662
- sql: z.ZodString;
663
- bookmarked: z.ZodBoolean;
664
- }, "sql">, "strip", z.ZodTypeAny, {
775
+ }, "sql" | "data_sample" | "is_sample" | "data_summary">, "strip", z.ZodTypeAny, {
665
776
  id: number;
666
777
  flow_data_id: number;
667
778
  created_at: string;
779
+ bookmarked: boolean;
668
780
  configuration: {
669
781
  type: "bar";
670
782
  title: string;
@@ -705,11 +817,11 @@ declare const FrontendVisualizationSchema: z.ZodObject<Omit<{
705
817
  categoryColumn: string;
706
818
  valueColumn: string;
707
819
  };
708
- bookmarked: boolean;
709
820
  }, {
710
821
  id: number;
711
822
  flow_data_id: number;
712
823
  created_at: string;
824
+ bookmarked: boolean;
713
825
  configuration: {
714
826
  type: "bar";
715
827
  title: string;
@@ -750,7 +862,6 @@ declare const FrontendVisualizationSchema: z.ZodObject<Omit<{
750
862
  categoryColumn: string;
751
863
  valueColumn: string;
752
864
  };
753
- bookmarked: boolean;
754
865
  }>;
755
866
 
756
867
  export declare type GenerateInsightParam = {
@@ -796,6 +907,7 @@ export declare class MageMetricsClient extends EventTarget {
796
907
  updateExternalJwt(jwt: string): Promise<void>;
797
908
  get state(): AuthState;
798
909
  getAuthHeaders(): Promise<Record<string, string>>;
910
+ private clearStorage;
799
911
  logout(): Promise<void>;
800
912
  /**
801
913
  * Public API methods that automatically wait for authentication
@@ -809,81 +921,6 @@ export declare class MageMetricsClient extends EventTarget {
809
921
  request: string;
810
922
  user_id: string | null;
811
923
  }[]>;
812
- getFlowDataInsights: (flowId: string, { count }: {
813
- count: boolean;
814
- }) => Promise<{
815
- count: false;
816
- data_reports: {
817
- title: string;
818
- status: string | null;
819
- id: number;
820
- request: string | null;
821
- created_at: string;
822
- bookmarked: boolean;
823
- flow_id: string;
824
- data_summary: {
825
- columns: Record<string, objectOutputType< {
826
- position: ZodOptional<ZodNumber>;
827
- data_type: ZodString;
828
- null_count: ZodNullable<ZodNumber>;
829
- unique_count: ZodNullable<ZodNumber>;
830
- unique_percentage: ZodNullable<ZodNumber>;
831
- }, ZodTypeAny, "passthrough">>;
832
- } & {
833
- [k: string]: unknown;
834
- };
835
- }[];
836
- visualizations: {
837
- id: number;
838
- flow_data_id: number;
839
- created_at: string;
840
- configuration: {
841
- type: "bar";
842
- title: string;
843
- xAxisLabel: string;
844
- yAxisLabel: string;
845
- config_version: 2;
846
- categoryColumn: string;
847
- valueColumn: string;
848
- secondaryCategoryColumn?: string | undefined;
849
- } | {
850
- type: "line/area";
851
- title: string;
852
- valueColumns: string[];
853
- config_version: 2;
854
- xAxisColumn: string;
855
- yAxisLabels: string[];
856
- } | {
857
- type: "line/area-categorical";
858
- title: string;
859
- xAxisLabel: string;
860
- yAxisLabel: string;
861
- config_version: 2;
862
- categoryColumn: string;
863
- valueColumn: string;
864
- xAxisColumn: string;
865
- } | {
866
- type: "scatter";
867
- title: string;
868
- xAxisLabel: string;
869
- yAxisLabel: string;
870
- config_version: 2;
871
- xAxisValueColumn: string;
872
- yAxisValueColumn: string;
873
- } | {
874
- type: "pie";
875
- title: string;
876
- config_version: 2;
877
- categoryColumn: string;
878
- valueColumn: string;
879
- };
880
- bookmarked: boolean;
881
- }[];
882
- } | {
883
- count: true;
884
- data_reports: number;
885
- visualizations: number;
886
- }>;
887
924
  /**
888
925
  * @deprecated Use `createFlow` instead.
889
926
  * @param request the user request
@@ -913,6 +950,7 @@ export declare class MageMetricsClient extends EventTarget {
913
950
  colSpan: number;
914
951
  rowSpan: number;
915
952
  })[];
953
+ is_public: boolean;
916
954
  }>;
917
955
  exportReportData: (reportId: number, format?: "text" | "blob") => Promise<{
918
956
  filename: string;
@@ -958,12 +996,15 @@ export declare interface MageMetricsClientConfig {
958
996
  additionalHeaders?: Record<string, string>;
959
997
  }
960
998
 
961
- export declare const MageMetricsContextProvider: default_2.FC<MageMetricsContextProviderProps>;
999
+ export declare const MageMetricsContextProvider: default_2.FC<MageMetricsContextProviderProps & MageMetricsPublicContextProviderProps>;
962
1000
 
963
- export declare interface MageMetricsContextProviderProps extends MageMetricsClientConfig {
964
- children: default_2.ReactNode;
1001
+ export declare type MageMetricsContextProviderProps = PropsWithChildren<MageMetricsClientConfig>;
1002
+
1003
+ export declare const MageMetricsPublicContextProvider: default_2.FC<MageMetricsPublicContextProviderProps>;
1004
+
1005
+ declare type MageMetricsPublicContextProviderProps = PropsWithChildren<Pick<MageMetricsClientConfig, "apiUrl" | "apiKey"> & {
965
1006
  experimental_components?: Components;
966
- }
1007
+ }>;
967
1008
 
968
1009
  export declare const ManagedModal: React.FC<ManagedModalProps>;
969
1010
 
@@ -1132,81 +1173,107 @@ declare interface operations {
1132
1173
  };
1133
1174
  };
1134
1175
  };
1135
- runEnd2EndFlow: {
1176
+ PublicDashboardFetchVisualization: {
1136
1177
  parameters: {
1137
1178
  query?: never;
1138
- header: {
1139
- "sp-access-token": string;
1140
- "sp-refresh-token"?: string;
1179
+ header?: never;
1180
+ path: {
1181
+ visualization_id: string;
1182
+ dashboard_id: string;
1141
1183
  };
1142
- path?: never;
1143
1184
  cookie?: never;
1144
1185
  };
1145
- requestBody: {
1146
- content: {
1147
- "application/json": {
1148
- userQuery: string;
1149
- /** @default true */
1150
- isNewAnalysisGoal?: boolean;
1151
- /**
1152
- * @default complex
1153
- * @enum {string}
1154
- */
1155
- difficultyLevel?: "simple" | "moderate" | "complex";
1156
- };
1157
- };
1158
- };
1186
+ requestBody?: never;
1159
1187
  responses: {
1160
- /** @description Run the end2end flow */
1188
+ /** @description The content of the visualization */
1161
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: {
1162
1221
  headers: {
1163
1222
  [name: string]: unknown;
1164
1223
  };
1165
1224
  content: {
1166
1225
  "application/json": {
1167
- /** @enum {string} */
1168
- status: "error";
1169
1226
  error: string;
1170
- } | {
1171
- /** @enum {string} */
1172
- status: "success";
1173
- flowId: string;
1174
1227
  };
1175
1228
  };
1176
1229
  };
1177
1230
  };
1178
1231
  };
1179
- retrieveFlow: {
1232
+ retrievePublicDashboard: {
1180
1233
  parameters: {
1181
1234
  query?: never;
1182
- header: {
1183
- "sp-access-token": string;
1184
- "sp-refresh-token"?: string;
1185
- };
1235
+ header?: never;
1186
1236
  path: {
1187
- flowId: string;
1237
+ dashboard_id: components["schemas"]["DashboardId"];
1188
1238
  };
1189
1239
  cookie?: never;
1190
1240
  };
1191
1241
  requestBody?: never;
1192
1242
  responses: {
1193
- /** @description The flow with its steps */
1243
+ /** @description The dashboard with the given id */
1194
1244
  200: {
1195
1245
  headers: {
1196
1246
  [name: string]: unknown;
1197
1247
  };
1198
1248
  content: {
1199
1249
  "application/json": {
1200
- created_at: string;
1250
+ description: string | null;
1251
+ /** Format: uuid */
1201
1252
  id: string;
1202
- request: string;
1203
- user_id: string | null;
1204
- user_friendly_goal?: string;
1205
- has_chat_messages: boolean;
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;
1206
1273
  };
1207
1274
  };
1208
1275
  };
1209
- /** @description Unable to retrieve flow with this id */
1276
+ /** @description Unable to retrieve dashboard with this id */
1210
1277
  404: {
1211
1278
  headers: {
1212
1279
  [name: string]: unknown;
@@ -1230,32 +1297,88 @@ declare interface operations {
1230
1297
  };
1231
1298
  };
1232
1299
  };
1233
- retrieveRecentFlows: {
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
+ };
1344
+ };
1345
+ getPublicDataReportData: {
1234
1346
  parameters: {
1235
1347
  query?: {
1236
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;
1237
1354
  };
1238
- header: {
1239
- "sp-access-token": string;
1240
- "sp-refresh-token"?: string;
1355
+ header?: never;
1356
+ path: {
1357
+ report_id: string;
1358
+ dashboard_id: components["schemas"]["DashboardId"];
1241
1359
  };
1242
- path?: never;
1243
1360
  cookie?: never;
1244
1361
  };
1245
1362
  requestBody?: never;
1246
1363
  responses: {
1247
- /** @description A list of recent flows */
1364
+ /** @description The content of the report */
1248
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: {
1249
1375
  headers: {
1250
1376
  [name: string]: unknown;
1251
1377
  };
1252
1378
  content: {
1253
1379
  "application/json": {
1254
- created_at: string;
1255
- id: string;
1256
- request: string;
1257
- user_id: string | null;
1258
- }[];
1380
+ error: string;
1381
+ };
1259
1382
  };
1260
1383
  };
1261
1384
  /** @description Something wrong happened */
@@ -1271,112 +1394,123 @@ declare interface operations {
1271
1394
  };
1272
1395
  };
1273
1396
  };
1274
- retrieveFlowDataInsights: {
1397
+ getPublicDataReportRowCount: {
1275
1398
  parameters: {
1276
- query?: {
1277
- count?: boolean;
1399
+ query?: never;
1400
+ header?: never;
1401
+ path: {
1402
+ report_id: string;
1403
+ dashboard_id: components["schemas"]["DashboardId"];
1278
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;
1279
1448
  header: {
1280
1449
  "sp-access-token": string;
1281
- "sp-refresh-token"?: string;
1282
- };
1283
- path: {
1284
- flowId: string;
1285
1450
  };
1451
+ path?: never;
1286
1452
  cookie?: never;
1287
1453
  };
1288
- requestBody?: never;
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
+ };
1289
1468
  responses: {
1290
- /** @description Flow data insights (data reports and visualizations) */
1469
+ /** @description Run the end2end flow */
1291
1470
  200: {
1292
1471
  headers: {
1293
1472
  [name: string]: unknown;
1294
1473
  };
1295
1474
  content: {
1296
1475
  "application/json": {
1297
- /** @enum {boolean} */
1298
- count: false;
1299
- data_reports: {
1300
- created_at: string;
1301
- flow_id: string;
1302
- id: number;
1303
- title: string;
1304
- request: string | null;
1305
- data_summary: {
1306
- columns: {
1307
- [key: string]: {
1308
- position?: number;
1309
- data_type: string;
1310
- null_count: number | null;
1311
- unique_count: number | null;
1312
- unique_percentage: number | null;
1313
- };
1314
- };
1315
- };
1316
- bookmarked: boolean;
1317
- status: string | null;
1318
- }[];
1319
- visualizations: {
1320
- id: number;
1321
- flow_data_id: number;
1322
- created_at: string;
1323
- configuration: {
1324
- /** @enum {string} */
1325
- type: "bar";
1326
- title: string;
1327
- /** @enum {number} */
1328
- config_version: 2;
1329
- xAxisLabel: string;
1330
- yAxisLabel: string;
1331
- categoryColumn: string;
1332
- secondaryCategoryColumn?: string;
1333
- valueColumn: string;
1334
- } | {
1335
- /** @enum {string} */
1336
- type: "line/area";
1337
- /** @enum {number} */
1338
- config_version: 2;
1339
- title: string;
1340
- xAxisColumn: string;
1341
- valueColumns: string[];
1342
- yAxisLabels: string[];
1343
- } | {
1344
- /** @enum {string} */
1345
- type: "line/area-categorical";
1346
- title: string;
1347
- /** @enum {number} */
1348
- config_version: 2;
1349
- valueColumn: string;
1350
- xAxisColumn: string;
1351
- xAxisLabel: string;
1352
- yAxisLabel: string;
1353
- categoryColumn: string;
1354
- } | {
1355
- /** @enum {string} */
1356
- type: "scatter";
1357
- title: string;
1358
- /** @enum {number} */
1359
- config_version: 2;
1360
- xAxisLabel: string;
1361
- yAxisLabel: string;
1362
- xAxisValueColumn: string;
1363
- yAxisValueColumn: string;
1364
- } | {
1365
- /** @enum {string} */
1366
- type: "pie";
1367
- title: string;
1368
- /** @enum {number} */
1369
- config_version: 2;
1370
- categoryColumn: string;
1371
- valueColumn: string;
1372
- };
1373
- bookmarked: boolean;
1374
- }[];
1476
+ /** @enum {string} */
1477
+ status: "error";
1478
+ error: string;
1375
1479
  } | {
1376
- /** @enum {boolean} */
1377
- count: true;
1378
- data_reports: number;
1379
- visualizations: number;
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;
1380
1514
  };
1381
1515
  };
1382
1516
  };
@@ -1404,12 +1538,51 @@ declare interface operations {
1404
1538
  };
1405
1539
  };
1406
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
+ };
1407
1581
  retrieveFlowDataReports: {
1408
1582
  parameters: {
1409
1583
  query?: never;
1410
1584
  header: {
1411
1585
  "sp-access-token": string;
1412
- "sp-refresh-token"?: string;
1413
1586
  };
1414
1587
  path: {
1415
1588
  flowId: string;
@@ -1475,7 +1648,6 @@ declare interface operations {
1475
1648
  query?: never;
1476
1649
  header: {
1477
1650
  "sp-access-token": string;
1478
- "sp-refresh-token"?: string;
1479
1651
  };
1480
1652
  path: {
1481
1653
  report_id: string;
@@ -1528,7 +1700,6 @@ declare interface operations {
1528
1700
  query?: never;
1529
1701
  header: {
1530
1702
  "sp-access-token": string;
1531
- "sp-refresh-token"?: string;
1532
1703
  };
1533
1704
  path: {
1534
1705
  report_id: string;
@@ -1570,7 +1741,6 @@ declare interface operations {
1570
1741
  query?: never;
1571
1742
  header: {
1572
1743
  "sp-access-token": string;
1573
- "sp-refresh-token"?: string;
1574
1744
  };
1575
1745
  path: {
1576
1746
  report_id: string;
@@ -1615,7 +1785,6 @@ declare interface operations {
1615
1785
  query?: never;
1616
1786
  header: {
1617
1787
  "sp-access-token": string;
1618
- "sp-refresh-token"?: string;
1619
1788
  };
1620
1789
  path: {
1621
1790
  flowId: string;
@@ -1664,7 +1833,6 @@ declare interface operations {
1664
1833
  query?: never;
1665
1834
  header: {
1666
1835
  "sp-access-token": string;
1667
- "sp-refresh-token"?: string;
1668
1836
  };
1669
1837
  path: {
1670
1838
  report_id: string;
@@ -1751,7 +1919,6 @@ declare interface operations {
1751
1919
  query?: never;
1752
1920
  header: {
1753
1921
  "sp-access-token": string;
1754
- "sp-refresh-token"?: string;
1755
1922
  };
1756
1923
  path?: never;
1757
1924
  cookie?: never;
@@ -1814,7 +1981,6 @@ declare interface operations {
1814
1981
  query?: never;
1815
1982
  header: {
1816
1983
  "sp-access-token": string;
1817
- "sp-refresh-token"?: string;
1818
1984
  };
1819
1985
  path?: never;
1820
1986
  cookie?: never;
@@ -1861,7 +2027,6 @@ declare interface operations {
1861
2027
  query?: never;
1862
2028
  header: {
1863
2029
  "sp-access-token": string;
1864
- "sp-refresh-token"?: string;
1865
2030
  };
1866
2031
  path: {
1867
2032
  report_id: string;
@@ -1908,7 +2073,6 @@ declare interface operations {
1908
2073
  query?: never;
1909
2074
  header: {
1910
2075
  "sp-access-token": string;
1911
- "sp-refresh-token"?: string;
1912
2076
  };
1913
2077
  path: {
1914
2078
  report_id: string;
@@ -1953,6 +2117,8 @@ declare interface operations {
1953
2117
  getDataReportData: {
1954
2118
  parameters: {
1955
2119
  query?: {
2120
+ /** @example name,date */
2121
+ columns?: string;
1956
2122
  limit?: number;
1957
2123
  /** @example name:asc,date:desc */
1958
2124
  order?: string;
@@ -1962,7 +2128,6 @@ declare interface operations {
1962
2128
  };
1963
2129
  header: {
1964
2130
  "sp-access-token": string;
1965
- "sp-refresh-token"?: string;
1966
2131
  };
1967
2132
  path: {
1968
2133
  report_id: string;
@@ -2009,7 +2174,6 @@ declare interface operations {
2009
2174
  query?: never;
2010
2175
  header: {
2011
2176
  "sp-access-token": string;
2012
- "sp-refresh-token"?: string;
2013
2177
  };
2014
2178
  path: {
2015
2179
  report_id: string;
@@ -2059,7 +2223,6 @@ declare interface operations {
2059
2223
  query?: never;
2060
2224
  header: {
2061
2225
  "sp-access-token": string;
2062
- "sp-refresh-token"?: string;
2063
2226
  };
2064
2227
  path: {
2065
2228
  report_id: string;
@@ -2097,6 +2260,7 @@ declare interface operations {
2097
2260
  id: number;
2098
2261
  flow_data_id: number;
2099
2262
  created_at: string;
2263
+ bookmarked: boolean;
2100
2264
  configuration: {
2101
2265
  /** @enum {string} */
2102
2266
  type: "bar";
@@ -2134,11 +2298,11 @@ declare interface operations {
2134
2298
  nameKey: string;
2135
2299
  dataKey: string;
2136
2300
  };
2137
- bookmarked: boolean;
2138
2301
  } | {
2139
2302
  id: number;
2140
2303
  flow_data_id: number;
2141
2304
  created_at: string;
2305
+ bookmarked: boolean;
2142
2306
  configuration: {
2143
2307
  /** @enum {string} */
2144
2308
  type: "bar";
@@ -2189,7 +2353,6 @@ declare interface operations {
2189
2353
  categoryColumn: string;
2190
2354
  valueColumn: string;
2191
2355
  };
2192
- bookmarked: boolean;
2193
2356
  })[];
2194
2357
  };
2195
2358
  };
@@ -2223,7 +2386,6 @@ declare interface operations {
2223
2386
  query?: never;
2224
2387
  header: {
2225
2388
  "sp-access-token": string;
2226
- "sp-refresh-token"?: string;
2227
2389
  };
2228
2390
  path?: never;
2229
2391
  cookie?: never;
@@ -2267,7 +2429,6 @@ declare interface operations {
2267
2429
  query?: never;
2268
2430
  header: {
2269
2431
  "sp-access-token": string;
2270
- "sp-refresh-token"?: string;
2271
2432
  };
2272
2433
  path: {
2273
2434
  flowId: string;
@@ -2333,7 +2494,6 @@ declare interface operations {
2333
2494
  query?: never;
2334
2495
  header: {
2335
2496
  "sp-access-token": string;
2336
- "sp-refresh-token"?: string;
2337
2497
  };
2338
2498
  path: {
2339
2499
  flowId: string;
@@ -2384,7 +2544,6 @@ declare interface operations {
2384
2544
  };
2385
2545
  header: {
2386
2546
  "sp-access-token": string;
2387
- "sp-refresh-token"?: string;
2388
2547
  };
2389
2548
  path?: never;
2390
2549
  cookie?: never;
@@ -2420,10 +2579,9 @@ declare interface operations {
2420
2579
  query?: never;
2421
2580
  header: {
2422
2581
  "sp-access-token": string;
2423
- "sp-refresh-token"?: string;
2424
2582
  };
2425
2583
  path: {
2426
- flowDataVisualizationId: string;
2584
+ visualization_id: string;
2427
2585
  };
2428
2586
  cookie?: never;
2429
2587
  };
@@ -2435,116 +2593,7 @@ declare interface operations {
2435
2593
  [name: string]: unknown;
2436
2594
  };
2437
2595
  content: {
2438
- "application/json": {
2439
- id: number;
2440
- flow_data_id: number;
2441
- created_at: string;
2442
- configuration: {
2443
- /** @enum {string} */
2444
- type: "bar";
2445
- title: string;
2446
- xAxisLabel: string;
2447
- yAxisLabel: string;
2448
- xAxisDataKey?: string;
2449
- yAxisDataKey?: string;
2450
- dimensionDataKey?: string;
2451
- valueColumns?: string[];
2452
- } | {
2453
- /** @enum {string} */
2454
- type: "line/area";
2455
- title: string;
2456
- xAxisLabel: string;
2457
- yAxisLabel: string;
2458
- xAxisDataKey?: string;
2459
- yAxisDataKey?: string;
2460
- dimensionDataKey?: string;
2461
- valueColumns?: string[];
2462
- } | {
2463
- /** @enum {string} */
2464
- type: "scatter";
2465
- title: string;
2466
- xAxisLabel: string;
2467
- yAxisLabel: string;
2468
- xAxisDataKey?: string;
2469
- yAxisDataKey?: string;
2470
- dimensionDataKey?: string;
2471
- valueColumns?: string[];
2472
- } | {
2473
- /** @enum {string} */
2474
- type: "pie";
2475
- title: string;
2476
- nameKey: string;
2477
- dataKey: string;
2478
- };
2479
- bookmarked: boolean;
2480
- data: components["schemas"]["VisualizationData"];
2481
- _metadata?: {
2482
- wasSampled: boolean;
2483
- originalCount: number;
2484
- sampledCount: number;
2485
- };
2486
- } | {
2487
- id: number;
2488
- flow_data_id: number;
2489
- created_at: string;
2490
- configuration: {
2491
- /** @enum {string} */
2492
- type: "bar";
2493
- title: string;
2494
- /** @enum {number} */
2495
- config_version: 2;
2496
- xAxisLabel: string;
2497
- yAxisLabel: string;
2498
- categoryColumn: string;
2499
- secondaryCategoryColumn?: string;
2500
- valueColumn: string;
2501
- } | {
2502
- /** @enum {string} */
2503
- type: "line/area";
2504
- /** @enum {number} */
2505
- config_version: 2;
2506
- title: string;
2507
- xAxisColumn: string;
2508
- valueColumns: string[];
2509
- yAxisLabels: string[];
2510
- } | {
2511
- /** @enum {string} */
2512
- type: "line/area-categorical";
2513
- title: string;
2514
- /** @enum {number} */
2515
- config_version: 2;
2516
- valueColumn: string;
2517
- xAxisColumn: string;
2518
- xAxisLabel: string;
2519
- yAxisLabel: string;
2520
- categoryColumn: string;
2521
- } | {
2522
- /** @enum {string} */
2523
- type: "scatter";
2524
- title: string;
2525
- /** @enum {number} */
2526
- config_version: 2;
2527
- xAxisLabel: string;
2528
- yAxisLabel: string;
2529
- xAxisValueColumn: string;
2530
- yAxisValueColumn: string;
2531
- } | {
2532
- /** @enum {string} */
2533
- type: "pie";
2534
- title: string;
2535
- /** @enum {number} */
2536
- config_version: 2;
2537
- categoryColumn: string;
2538
- valueColumn: string;
2539
- };
2540
- bookmarked: boolean;
2541
- data: components["schemas"]["VisualizationData"];
2542
- _metadata?: {
2543
- wasSampled: boolean;
2544
- originalCount: number;
2545
- sampledCount: number;
2546
- };
2547
- };
2596
+ "application/json": components["schemas"]["VisualizationWithData"];
2548
2597
  };
2549
2598
  };
2550
2599
  /** @description Invalid arguments to fetch visualization */
@@ -2589,7 +2638,6 @@ declare interface operations {
2589
2638
  };
2590
2639
  header: {
2591
2640
  "sp-access-token": string;
2592
- "sp-refresh-token"?: string;
2593
2641
  };
2594
2642
  path: {
2595
2643
  flowId: string;
@@ -2608,6 +2656,7 @@ declare interface operations {
2608
2656
  id: number;
2609
2657
  flow_data_id: number;
2610
2658
  created_at: string;
2659
+ bookmarked: boolean;
2611
2660
  configuration: {
2612
2661
  /** @enum {string} */
2613
2662
  type: "bar";
@@ -2658,7 +2707,6 @@ declare interface operations {
2658
2707
  categoryColumn: string;
2659
2708
  valueColumn: string;
2660
2709
  };
2661
- bookmarked: boolean;
2662
2710
  }[];
2663
2711
  };
2664
2712
  };
@@ -2702,7 +2750,6 @@ declare interface operations {
2702
2750
  query?: never;
2703
2751
  header: {
2704
2752
  "sp-access-token": string;
2705
- "sp-refresh-token"?: string;
2706
2753
  };
2707
2754
  path?: never;
2708
2755
  cookie?: never;
@@ -2776,10 +2823,9 @@ declare interface operations {
2776
2823
  query?: never;
2777
2824
  header: {
2778
2825
  "sp-access-token": string;
2779
- "sp-refresh-token"?: string;
2780
2826
  };
2781
2827
  path: {
2782
- dashboardId: string;
2828
+ dashboard_id: components["schemas"]["DashboardId"];
2783
2829
  };
2784
2830
  cookie?: never;
2785
2831
  };
@@ -2793,6 +2839,7 @@ declare interface operations {
2793
2839
  content: {
2794
2840
  "application/json": {
2795
2841
  description: string | null;
2842
+ /** Format: uuid */
2796
2843
  id: string;
2797
2844
  name: string;
2798
2845
  positions: ({
@@ -2813,6 +2860,7 @@ declare interface operations {
2813
2860
  colSpan: number;
2814
2861
  rowSpan: number;
2815
2862
  })[];
2863
+ is_public: boolean;
2816
2864
  };
2817
2865
  };
2818
2866
  };
@@ -3436,30 +3484,30 @@ declare interface paths {
3436
3484
  patch?: never;
3437
3485
  trace?: never;
3438
3486
  };
3439
- "/api/v1/end2end": {
3487
+ "/api/v1/public/dashboards/{dashboard_id}/visualizations/{visualization_id}": {
3440
3488
  parameters: {
3441
3489
  query?: never;
3442
3490
  header?: never;
3443
3491
  path?: never;
3444
3492
  cookie?: never;
3445
3493
  };
3446
- get?: never;
3494
+ get: operations["PublicDashboardFetchVisualization"];
3447
3495
  put?: never;
3448
- post: operations["runEnd2EndFlow"];
3496
+ post?: never;
3449
3497
  delete?: never;
3450
3498
  options?: never;
3451
3499
  head?: never;
3452
3500
  patch?: never;
3453
3501
  trace?: never;
3454
3502
  };
3455
- "/api/v1/flows/{flowId}": {
3503
+ "/api/v1/public/dashboards/{dashboard_id}": {
3456
3504
  parameters: {
3457
3505
  query?: never;
3458
3506
  header?: never;
3459
3507
  path?: never;
3460
3508
  cookie?: never;
3461
3509
  };
3462
- get: operations["retrieveFlow"];
3510
+ get: operations["retrievePublicDashboard"];
3463
3511
  put?: never;
3464
3512
  post?: never;
3465
3513
  delete?: never;
@@ -3468,14 +3516,78 @@ declare interface paths {
3468
3516
  patch?: never;
3469
3517
  trace?: never;
3470
3518
  };
3471
- "/api/v1/recent-flows": {
3519
+ "/api/v1/public/dashboards/{dashboard_id}/data-reports/{report_id}/columns": {
3472
3520
  parameters: {
3473
3521
  query?: never;
3474
3522
  header?: never;
3475
3523
  path?: never;
3476
3524
  cookie?: never;
3477
3525
  };
3478
- get: operations["retrieveRecentFlows"];
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"];
3479
3591
  put?: never;
3480
3592
  post?: never;
3481
3593
  delete?: never;
@@ -3484,14 +3596,14 @@ declare interface paths {
3484
3596
  patch?: never;
3485
3597
  trace?: never;
3486
3598
  };
3487
- "/api/v1/flows/{flowId}/data-insights": {
3599
+ "/api/v1/recent-flows": {
3488
3600
  parameters: {
3489
3601
  query?: never;
3490
3602
  header?: never;
3491
3603
  path?: never;
3492
3604
  cookie?: never;
3493
3605
  };
3494
- get: operations["retrieveFlowDataInsights"];
3606
+ get: operations["retrieveRecentFlows"];
3495
3607
  put?: never;
3496
3608
  post?: never;
3497
3609
  delete?: never;
@@ -3740,7 +3852,7 @@ declare interface paths {
3740
3852
  patch?: never;
3741
3853
  trace?: never;
3742
3854
  };
3743
- "/api/v1/visualizations/{flowDataVisualizationId}": {
3855
+ "/api/v1/visualizations/{visualization_id}": {
3744
3856
  parameters: {
3745
3857
  query?: never;
3746
3858
  header?: never;
@@ -3788,7 +3900,7 @@ declare interface paths {
3788
3900
  patch?: never;
3789
3901
  trace?: never;
3790
3902
  };
3791
- "/api/v1/dashboard/{dashboardId}": {
3903
+ "/api/v1/dashboard/{dashboard_id}": {
3792
3904
  parameters: {
3793
3905
  query?: never;
3794
3906
  header?: never;
@@ -3968,6 +4080,13 @@ declare interface paths {
3968
4080
 
3969
4081
  declare type PersistenceOptions = "queryParam" | "none";
3970
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
+
3971
4090
  declare type RemoveAuthHeader<PathSchema> = Simplify<{
3972
4091
  [Method in keyof PathSchema]: RemoveParams<PathSchema[Method], ToRemove>;
3973
4092
  }>;
@@ -3990,6 +4109,14 @@ declare type RemoveParamsConfig = Simplify<{
3990
4109
  cookie?: string;
3991
4110
  }>;
3992
4111
 
4112
+ declare type ReportDataFilters = {
4113
+ columns?: string[];
4114
+ limit: number;
4115
+ sorting: SortingState;
4116
+ filters: TableFilters;
4117
+ cursor?: number;
4118
+ };
4119
+
3993
4120
  export declare const StandaloneConversationModal: React.FC<StandaloneConversationModalProps>;
3994
4121
 
3995
4122
  declare type StandaloneConversationModalProps = {
@@ -4011,6 +4138,8 @@ declare type StartOptions = DisplayControlProps & {
4011
4138
  placeholders?: string[];
4012
4139
  };
4013
4140
 
4141
+ declare type TableFilters = Record<string, string | number>;
4142
+
4014
4143
  declare type ToRemove = Simplify<{
4015
4144
  header: "sp-access-token";
4016
4145
  }>;
@@ -4191,6 +4320,8 @@ export declare const useDataReport: (flowDataId: FrontendReport["id"]) => {
4191
4320
  infiniteData: InfiniteData<Record<string, unknown>[], unknown> | undefined;
4192
4321
  };
4193
4322
 
4323
+ export declare const useDataReportColumnValue: (reportId: number, filters: ReportDataFilters) => UseQueryResult<Record<string, unknown>[], Error>;
4324
+
4194
4325
  export declare const useDownloadReportData: (options?: UseMutationOptions<ExportReportDataResult, Error, ExportReportDataParams>) => {
4195
4326
  download: UseMutateFunction<ExportReportDataResult, Error, ExportReportDataParams, unknown>;
4196
4327
  data: undefined;
@@ -4265,82 +4396,6 @@ export declare const useDownloadReportData: (options?: UseMutationOptions<Export
4265
4396
  mutateAsync: UseMutateAsyncFunction<ExportReportDataResult, Error, ExportReportDataParams, unknown>;
4266
4397
  };
4267
4398
 
4268
- export declare const useFlowDataInsights: (flowId: string, enabled?: boolean) => UseQueryResult< {
4269
- count: false;
4270
- data_reports: {
4271
- title: string;
4272
- status: string | null;
4273
- id: number;
4274
- request: string | null;
4275
- created_at: string;
4276
- bookmarked: boolean;
4277
- flow_id: string;
4278
- data_summary: {
4279
- columns: Record<string, objectOutputType< {
4280
- position: ZodOptional<ZodNumber>;
4281
- data_type: ZodString;
4282
- null_count: ZodNullable<ZodNumber>;
4283
- unique_count: ZodNullable<ZodNumber>;
4284
- unique_percentage: ZodNullable<ZodNumber>;
4285
- }, ZodTypeAny, "passthrough">>;
4286
- } & {
4287
- [k: string]: unknown;
4288
- };
4289
- }[];
4290
- visualizations: {
4291
- id: number;
4292
- flow_data_id: number;
4293
- created_at: string;
4294
- configuration: {
4295
- type: "bar";
4296
- title: string;
4297
- xAxisLabel: string;
4298
- yAxisLabel: string;
4299
- config_version: 2;
4300
- categoryColumn: string;
4301
- valueColumn: string;
4302
- secondaryCategoryColumn?: string | undefined;
4303
- } | {
4304
- type: "line/area";
4305
- title: string;
4306
- valueColumns: string[];
4307
- config_version: 2;
4308
- xAxisColumn: string;
4309
- yAxisLabels: string[];
4310
- } | {
4311
- type: "line/area-categorical";
4312
- title: string;
4313
- xAxisLabel: string;
4314
- yAxisLabel: string;
4315
- config_version: 2;
4316
- categoryColumn: string;
4317
- valueColumn: string;
4318
- xAxisColumn: string;
4319
- } | {
4320
- type: "scatter";
4321
- title: string;
4322
- xAxisLabel: string;
4323
- yAxisLabel: string;
4324
- config_version: 2;
4325
- xAxisValueColumn: string;
4326
- yAxisValueColumn: string;
4327
- } | {
4328
- type: "pie";
4329
- title: string;
4330
- config_version: 2;
4331
- categoryColumn: string;
4332
- valueColumn: string;
4333
- };
4334
- bookmarked: boolean;
4335
- }[];
4336
- }, Error>;
4337
-
4338
- export declare const useFlowDataInsightsCount: (flowId: string) => UseQueryResult< {
4339
- count: true;
4340
- data_reports: number;
4341
- visualizations: number;
4342
- }, Error>;
4343
-
4344
4399
  export declare const useGenerateContextualInsight: (options?: UseMutationOptions<ExtractInsightResponse, Error, GenerateInsightParam>) => {
4345
4400
  generateInsight: UseMutateFunction< {
4346
4401
  type: "text";
@@ -4607,6 +4662,12 @@ declare const V1FrontendVisualizationSchema: z.ZodObject<Omit<{
4607
4662
  id: z.ZodNumber;
4608
4663
  flow_data_id: z.ZodNumber;
4609
4664
  created_at: z.ZodString;
4665
+ sql: z.ZodString;
4666
+ bookmarked: z.ZodBoolean;
4667
+ data_sample: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">;
4668
+ is_sample: z.ZodBoolean;
4669
+ data_summary: z.ZodRecord<z.ZodString, z.ZodUnknown>;
4670
+ } & {
4610
4671
  configuration: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
4611
4672
  xAxisLabel: z.ZodString;
4612
4673
  yAxisLabel: z.ZodString;
@@ -4704,12 +4765,11 @@ declare const V1FrontendVisualizationSchema: z.ZodObject<Omit<{
4704
4765
  nameKey: string;
4705
4766
  dataKey: string;
4706
4767
  }>]>;
4707
- sql: z.ZodString;
4708
- bookmarked: z.ZodBoolean;
4709
- }, "sql">, "strip", z.ZodTypeAny, {
4768
+ }, "sql" | "data_sample" | "is_sample" | "data_summary">, "strip", z.ZodTypeAny, {
4710
4769
  id: number;
4711
4770
  flow_data_id: number;
4712
4771
  created_at: string;
4772
+ bookmarked: boolean;
4713
4773
  configuration: {
4714
4774
  type: "bar";
4715
4775
  title: string;
@@ -4743,11 +4803,11 @@ declare const V1FrontendVisualizationSchema: z.ZodObject<Omit<{
4743
4803
  nameKey: string;
4744
4804
  dataKey: string;
4745
4805
  };
4746
- bookmarked: boolean;
4747
4806
  }, {
4748
4807
  id: number;
4749
4808
  flow_data_id: number;
4750
4809
  created_at: string;
4810
+ bookmarked: boolean;
4751
4811
  configuration: {
4752
4812
  type: "bar";
4753
4813
  title: string;
@@ -4781,7 +4841,6 @@ declare const V1FrontendVisualizationSchema: z.ZodObject<Omit<{
4781
4841
  nameKey: string;
4782
4842
  dataKey: string;
4783
4843
  };
4784
- bookmarked: boolean;
4785
4844
  }>;
4786
4845
 
4787
4846
  export declare const Visualization: ForwardRefExoticComponent< {