@magemetrics/ai 0.0.49 → 0.0.54-RC1

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,23 +1,26 @@
1
+ import type { Client } from 'openapi-fetch';
1
2
  import { default as default_2 } from 'react';
3
+ import { FetchNextPageOptions } from '@tanstack/react-query';
4
+ import { ForwardRefExoticComponent } from 'react';
5
+ import { InfiniteData } from '@tanstack/react-query';
6
+ import { InfiniteQueryObserverResult } from '@tanstack/react-query';
2
7
  import { JSX } from 'react/jsx-runtime';
8
+ import { objectOutputType } from 'zod';
9
+ import { PropsWithChildren } from 'react';
10
+ import { RefAttributes } from 'react';
11
+ import type { Simplify } from 'type-fest';
3
12
  import { UseMutateAsyncFunction } from '@tanstack/react-query';
4
13
  import { UseMutateFunction } from '@tanstack/react-query';
5
14
  import { UseMutationOptions } from '@tanstack/react-query';
15
+ import { UseQueryResult } from '@tanstack/react-query';
6
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';
7
22
 
8
- export declare class ApiService {
9
- private client;
10
- constructor(baseUrl: string);
11
- getRecentFlows: (params: {
12
- limit?: number;
13
- }) => Promise<{
14
- created_at: string;
15
- id: string;
16
- request: string;
17
- user_id: string | null;
18
- }[]>;
19
- startFlow: (request: StartFlowParam) => Promise<string>;
20
- }
23
+ export declare type AuthState = "initializing" | "ready" | "error";
21
24
 
22
25
  export declare type CellContentProps = {
23
26
  formattedValue: FormattedData | undefined;
@@ -62,6 +65,40 @@ export declare interface Components {
62
65
  };
63
66
  };
64
67
  dataReportTable?: (props: DataReportMessageProps) => default_2.ReactNode;
68
+ messageActions?: (props: {
69
+ type: "data-report";
70
+ report: FrontendReport;
71
+ } | {
72
+ type: "visualization";
73
+ visualization: FrontendVisualization;
74
+ }) => default_2.ReactNode;
75
+ }
76
+
77
+ declare interface components {
78
+ schemas: {
79
+ ReportColumns: {
80
+ name: string;
81
+ data_type: string;
82
+ dataType: string;
83
+ renderType?: string;
84
+ unit?: string;
85
+ }[];
86
+ ReportData: Record<string, unknown>[];
87
+ /** @description Starter recommendations */
88
+ StarterRecommendation: {
89
+ starter: string;
90
+ explanation: string;
91
+ type: string;
92
+ };
93
+ VisualizationData: {
94
+ [key: string]: string | (number | null) | unknown | null;
95
+ }[];
96
+ };
97
+ responses: never;
98
+ parameters: never;
99
+ requestBodies: never;
100
+ headers: never;
101
+ pathItems: never;
65
102
  }
66
103
 
67
104
  declare type ControlledModalProps = {
@@ -69,11 +106,21 @@ declare type ControlledModalProps = {
69
106
  onClose: () => void;
70
107
  };
71
108
 
109
+ export declare const Dashboard: React.FC<React.ComponentProps<typeof Dashboard_2>>;
110
+
111
+ declare const Dashboard_2: React.FC<{
112
+ dashboardId: string;
113
+ }>;
114
+
115
+ export declare const DataReport: React.FC<{
116
+ reportId: number;
117
+ }>;
118
+
72
119
  export declare interface DataReportMessageProps {
73
- report: FrontendFlowData;
120
+ report: FrontendReport;
74
121
  isOpened: boolean;
75
122
  setIsOpened: (opened: boolean) => void;
76
- explainability: FrontendFlowDataExplainability | null | undefined;
123
+ explainability: FrontendReportExplainability | null | undefined;
77
124
  infiniteData: {
78
125
  data?: {
79
126
  pages: Record<string, unknown>[][];
@@ -84,11 +131,11 @@ export declare interface DataReportMessageProps {
84
131
  isFetchingNextPage: boolean;
85
132
  hasNextPage: boolean | undefined;
86
133
  };
87
- columns: FrontendFlowColumns;
134
+ columns: FrontendReportColumns;
88
135
  totalRows: number;
89
136
  }
90
137
 
91
- export declare const DataTable: (props: DataReportMessageProps) => JSX.Element;
138
+ export declare const DataTable: React.FC<DataReportMessageProps>;
92
139
 
93
140
  declare type DisplayControlProps = {
94
141
  showRecommendations?: boolean;
@@ -96,6 +143,23 @@ declare type DisplayControlProps = {
96
143
  showBackdrop?: boolean;
97
144
  };
98
145
 
146
+ export declare const DomWrapper: React.FC<PropsWithChildren<DomWrapperProps>>;
147
+
148
+ declare type DomWrapperProps = {
149
+ display?: string;
150
+ };
151
+
152
+ declare type ExportReportDataParams = {
153
+ reportId: number;
154
+ filename?: string;
155
+ format?: "text" | "blob";
156
+ };
157
+
158
+ declare type ExportReportDataResult = {
159
+ filename: string;
160
+ data: Blob | string;
161
+ };
162
+
99
163
  /**
100
164
  * This module handles the formatting and normalization of table cell values for display and sorting.
101
165
  *
@@ -123,9 +187,11 @@ declare type FormattedData = {
123
187
  sortValue: string | number | Date | null;
124
188
  };
125
189
 
126
- declare type FrontendFlowColumns = z.infer<typeof FrontendFlowColumnsSchema>;
190
+ declare type FrontendReport = z.infer<typeof FrontendReportSchema>;
127
191
 
128
- declare const FrontendFlowColumnsSchema: z.ZodArray<z.ZodObject<{
192
+ declare type FrontendReportColumns = z.infer<typeof FrontendReportColumnsSchema>;
193
+
194
+ declare const FrontendReportColumnsSchema: z.ZodArray<z.ZodObject<{
129
195
  name: z.ZodString;
130
196
  data_type: z.ZodString;
131
197
  } & {
@@ -146,11 +212,9 @@ declare const FrontendFlowColumnsSchema: z.ZodArray<z.ZodObject<{
146
212
  renderType?: string | undefined;
147
213
  }>, "many">;
148
214
 
149
- declare type FrontendFlowData = z.infer<typeof FrontendFlowDataSchema>;
150
-
151
- declare type FrontendFlowDataExplainability = z.infer<typeof FrontendFlowDataExplainabilitySchema>;
215
+ declare type FrontendReportExplainability = z.infer<typeof FrontendReportExplainabilitySchema>;
152
216
 
153
- declare const FrontendFlowDataExplainabilitySchema: z.ZodObject<Omit<{
217
+ declare const FrontendReportExplainabilitySchema: z.ZodObject<Omit<{
154
218
  sql_explanation: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
155
219
  chunk_title: z.ZodString;
156
220
  chunk_explanation: z.ZodString;
@@ -340,7 +404,7 @@ declare const FrontendFlowDataExplainabilitySchema: z.ZodObject<Omit<{
340
404
  friendliness_score_reason?: string | undefined;
341
405
  }>;
342
406
 
343
- declare const FrontendFlowDataSchema: z.ZodObject<Omit<{
407
+ declare const FrontendReportSchema: z.ZodObject<Omit<{
344
408
  created_at: z.ZodString;
345
409
  flow_id: z.ZodString;
346
410
  id: z.ZodNumber;
@@ -413,10 +477,11 @@ declare const FrontendFlowDataSchema: z.ZodObject<Omit<{
413
477
  }, z.ZodTypeAny, "passthrough">>;
414
478
  bookmarked: z.ZodBoolean;
415
479
  status: z.ZodNullable<z.ZodString>;
416
- }, "schema" | "sql" | "table" | "created_at" | "is_sample" | "data_sample">, "strip", z.ZodTypeAny, {
480
+ }, "schema" | "sql" | "table" | "is_sample" | "data_sample">, "strip", z.ZodTypeAny, {
417
481
  status: string | null;
418
482
  title: string;
419
483
  id: number;
484
+ created_at: string;
420
485
  bookmarked: boolean;
421
486
  flow_id: string;
422
487
  data_summary: {
@@ -434,6 +499,7 @@ declare const FrontendFlowDataSchema: z.ZodObject<Omit<{
434
499
  status: string | null;
435
500
  title: string;
436
501
  id: number;
502
+ created_at: string;
437
503
  bookmarked: boolean;
438
504
  flow_id: string;
439
505
  data_summary: {
@@ -449,13 +515,372 @@ declare const FrontendFlowDataSchema: z.ZodObject<Omit<{
449
515
  };
450
516
  }>;
451
517
 
518
+ declare type FrontendVisualization = z.output<typeof FrontendVisualizationSchema>;
519
+
520
+ declare const FrontendVisualizationSchema: z.ZodObject<Omit<{
521
+ id: z.ZodNumber;
522
+ flow_data_id: z.ZodNumber;
523
+ created_at: z.ZodString;
524
+ configuration: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
525
+ xAxisLabel: z.ZodString;
526
+ yAxisLabel: z.ZodString;
527
+ xAxisDataKey: z.ZodOptional<z.ZodString>;
528
+ yAxisDataKey: z.ZodOptional<z.ZodString>;
529
+ dimensionDataKey: z.ZodOptional<z.ZodString>;
530
+ valueColumns: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
531
+ title: z.ZodString;
532
+ type: z.ZodLiteral<"bar">;
533
+ }, "strip", z.ZodTypeAny, {
534
+ type: "bar";
535
+ title: string;
536
+ xAxisLabel: string;
537
+ yAxisLabel: string;
538
+ valueColumns?: string[] | undefined;
539
+ xAxisDataKey?: string | undefined;
540
+ yAxisDataKey?: string | undefined;
541
+ dimensionDataKey?: string | undefined;
542
+ }, {
543
+ type: "bar";
544
+ title: string;
545
+ xAxisLabel: string;
546
+ yAxisLabel: string;
547
+ valueColumns?: string[] | undefined;
548
+ xAxisDataKey?: string | undefined;
549
+ yAxisDataKey?: string | undefined;
550
+ dimensionDataKey?: string | undefined;
551
+ }>, z.ZodObject<{
552
+ xAxisLabel: z.ZodString;
553
+ yAxisLabel: z.ZodString;
554
+ xAxisDataKey: z.ZodOptional<z.ZodString>;
555
+ yAxisDataKey: z.ZodOptional<z.ZodString>;
556
+ dimensionDataKey: z.ZodOptional<z.ZodString>;
557
+ valueColumns: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
558
+ title: z.ZodString;
559
+ type: z.ZodLiteral<"line/area">;
560
+ }, "strip", z.ZodTypeAny, {
561
+ type: "line/area";
562
+ title: string;
563
+ xAxisLabel: string;
564
+ yAxisLabel: string;
565
+ valueColumns?: string[] | undefined;
566
+ xAxisDataKey?: string | undefined;
567
+ yAxisDataKey?: string | undefined;
568
+ dimensionDataKey?: string | undefined;
569
+ }, {
570
+ type: "line/area";
571
+ title: string;
572
+ xAxisLabel: string;
573
+ yAxisLabel: string;
574
+ valueColumns?: string[] | undefined;
575
+ xAxisDataKey?: string | undefined;
576
+ yAxisDataKey?: string | undefined;
577
+ dimensionDataKey?: string | undefined;
578
+ }>, z.ZodObject<{
579
+ xAxisLabel: z.ZodString;
580
+ yAxisLabel: z.ZodString;
581
+ xAxisDataKey: z.ZodOptional<z.ZodString>;
582
+ yAxisDataKey: z.ZodOptional<z.ZodString>;
583
+ dimensionDataKey: z.ZodOptional<z.ZodString>;
584
+ valueColumns: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
585
+ title: z.ZodString;
586
+ type: z.ZodLiteral<"scatter">;
587
+ }, "strip", z.ZodTypeAny, {
588
+ type: "scatter";
589
+ title: string;
590
+ xAxisLabel: string;
591
+ yAxisLabel: string;
592
+ valueColumns?: string[] | undefined;
593
+ xAxisDataKey?: string | undefined;
594
+ yAxisDataKey?: string | undefined;
595
+ dimensionDataKey?: string | undefined;
596
+ }, {
597
+ type: "scatter";
598
+ title: string;
599
+ xAxisLabel: string;
600
+ yAxisLabel: string;
601
+ valueColumns?: string[] | undefined;
602
+ xAxisDataKey?: string | undefined;
603
+ yAxisDataKey?: string | undefined;
604
+ dimensionDataKey?: string | undefined;
605
+ }>, z.ZodObject<{
606
+ nameKey: z.ZodString;
607
+ dataKey: z.ZodString;
608
+ title: z.ZodString;
609
+ type: z.ZodLiteral<"pie">;
610
+ }, "strip", z.ZodTypeAny, {
611
+ type: "pie";
612
+ title: string;
613
+ nameKey: string;
614
+ dataKey: string;
615
+ }, {
616
+ type: "pie";
617
+ title: string;
618
+ nameKey: string;
619
+ dataKey: string;
620
+ }>]>;
621
+ sql: z.ZodString;
622
+ bookmarked: z.ZodBoolean;
623
+ }, "sql">, "strip", z.ZodTypeAny, {
624
+ id: number;
625
+ flow_data_id: number;
626
+ created_at: string;
627
+ configuration: {
628
+ type: "bar";
629
+ title: string;
630
+ xAxisLabel: string;
631
+ yAxisLabel: string;
632
+ valueColumns?: string[] | undefined;
633
+ xAxisDataKey?: string | undefined;
634
+ yAxisDataKey?: string | undefined;
635
+ dimensionDataKey?: string | undefined;
636
+ } | {
637
+ type: "line/area";
638
+ title: string;
639
+ xAxisLabel: string;
640
+ yAxisLabel: string;
641
+ valueColumns?: string[] | undefined;
642
+ xAxisDataKey?: string | undefined;
643
+ yAxisDataKey?: string | undefined;
644
+ dimensionDataKey?: string | undefined;
645
+ } | {
646
+ type: "scatter";
647
+ title: string;
648
+ xAxisLabel: string;
649
+ yAxisLabel: string;
650
+ valueColumns?: string[] | undefined;
651
+ xAxisDataKey?: string | undefined;
652
+ yAxisDataKey?: string | undefined;
653
+ dimensionDataKey?: string | undefined;
654
+ } | {
655
+ type: "pie";
656
+ title: string;
657
+ nameKey: string;
658
+ dataKey: string;
659
+ };
660
+ bookmarked: boolean;
661
+ }, {
662
+ id: number;
663
+ flow_data_id: number;
664
+ created_at: string;
665
+ configuration: {
666
+ type: "bar";
667
+ title: string;
668
+ xAxisLabel: string;
669
+ yAxisLabel: string;
670
+ valueColumns?: string[] | undefined;
671
+ xAxisDataKey?: string | undefined;
672
+ yAxisDataKey?: string | undefined;
673
+ dimensionDataKey?: string | undefined;
674
+ } | {
675
+ type: "line/area";
676
+ title: string;
677
+ xAxisLabel: string;
678
+ yAxisLabel: string;
679
+ valueColumns?: string[] | undefined;
680
+ xAxisDataKey?: string | undefined;
681
+ yAxisDataKey?: string | undefined;
682
+ dimensionDataKey?: string | undefined;
683
+ } | {
684
+ type: "scatter";
685
+ title: string;
686
+ xAxisLabel: string;
687
+ yAxisLabel: string;
688
+ valueColumns?: string[] | undefined;
689
+ xAxisDataKey?: string | undefined;
690
+ yAxisDataKey?: string | undefined;
691
+ dimensionDataKey?: string | undefined;
692
+ } | {
693
+ type: "pie";
694
+ title: string;
695
+ nameKey: string;
696
+ dataKey: string;
697
+ };
698
+ bookmarked: boolean;
699
+ }>;
700
+
701
+ export declare const InfiniteDataTableUI: React.FC<InfiniteDataTableUIProps>;
702
+
703
+ declare type InfiniteDataTableUIProps = {
704
+ flowDataId: number;
705
+ data: Record<string, unknown>[];
706
+ columns: FrontendReportColumns;
707
+ explainability: FrontendReportExplainability | null | undefined;
708
+ isOpened: boolean;
709
+ setIsOpened: (opened: boolean) => void;
710
+ hasNextPage?: boolean;
711
+ fetchNextPage: () => Promise<unknown>;
712
+ isFetchingNextPage: boolean;
713
+ isFetching: boolean;
714
+ totalRows: number;
715
+ };
716
+
717
+ declare type InternalApiClient = Simplify<Client<NoAuthPaths, `${string}/${string}`>>;
718
+
452
719
  export declare const logout: () => Promise<void>;
453
720
 
721
+ /**
722
+ * Core MageMetrics client that handles authentication lifecycle and provides
723
+ * a promise-based API that automatically waits for authentication to complete.
724
+ */
725
+ export declare class MageMetricsClient extends EventTarget {
726
+ private config;
727
+ private authState;
728
+ private supabaseClient;
729
+ private internalApiClient;
730
+ private noAuthApiClient;
731
+ private authApiResponse;
732
+ private authPromise;
733
+ private processedJwt;
734
+ constructor(config: MageMetricsClientConfig);
735
+ waitForAuth(): Promise<void>;
736
+ updateExternalJwt(jwt: string): Promise<void>;
737
+ get state(): AuthState;
738
+ getAuthHeaders(): Promise<Record<string, string>>;
739
+ logout(): Promise<void>;
740
+ /**
741
+ * Public API methods that automatically wait for authentication
742
+ */
743
+ api: {
744
+ getRecentFlows: (params?: {
745
+ limit?: number;
746
+ }) => Promise<{
747
+ created_at: string;
748
+ id: string;
749
+ request: string;
750
+ user_id: string | null;
751
+ }[]>;
752
+ getFlowDataInsights: (flowId: string, { count }: {
753
+ count: boolean;
754
+ }) => Promise<{
755
+ count: false;
756
+ data_reports: {
757
+ status: string | null;
758
+ title: string;
759
+ id: number;
760
+ created_at: string;
761
+ bookmarked: boolean;
762
+ flow_id: string;
763
+ data_summary: {
764
+ columns: Record<string, objectOutputType< {
765
+ position: ZodOptional<ZodNumber>;
766
+ data_type: ZodString;
767
+ null_count: ZodNullable<ZodNumber>;
768
+ unique_count: ZodNullable<ZodNumber>;
769
+ unique_percentage: ZodNullable<ZodNumber>;
770
+ }, ZodTypeAny, "passthrough">>;
771
+ } & {
772
+ [k: string]: unknown;
773
+ };
774
+ }[];
775
+ visualizations: {
776
+ id: number;
777
+ flow_data_id: number;
778
+ created_at: string;
779
+ configuration: {
780
+ type: "bar";
781
+ title: string;
782
+ xAxisLabel: string;
783
+ yAxisLabel: string;
784
+ valueColumns?: string[] | undefined;
785
+ xAxisDataKey?: string | undefined;
786
+ yAxisDataKey?: string | undefined;
787
+ dimensionDataKey?: string | undefined;
788
+ } | {
789
+ type: "line/area";
790
+ title: string;
791
+ xAxisLabel: string;
792
+ yAxisLabel: string;
793
+ valueColumns?: string[] | undefined;
794
+ xAxisDataKey?: string | undefined;
795
+ yAxisDataKey?: string | undefined;
796
+ dimensionDataKey?: string | undefined;
797
+ } | {
798
+ type: "scatter";
799
+ title: string;
800
+ xAxisLabel: string;
801
+ yAxisLabel: string;
802
+ valueColumns?: string[] | undefined;
803
+ xAxisDataKey?: string | undefined;
804
+ yAxisDataKey?: string | undefined;
805
+ dimensionDataKey?: string | undefined;
806
+ } | {
807
+ type: "pie";
808
+ title: string;
809
+ nameKey: string;
810
+ dataKey: string;
811
+ };
812
+ bookmarked: boolean;
813
+ }[];
814
+ } | {
815
+ count: true;
816
+ data_reports: number;
817
+ visualizations: number;
818
+ }>;
819
+ startFlow: (request: StartFlowParam) => Promise<string>;
820
+ getDashboard: (dashboardId: string) => Promise<{
821
+ description: string | null;
822
+ id: string;
823
+ name: string;
824
+ positions: ({
825
+ type: "data-report";
826
+ flowId: string;
827
+ flowDataId: number;
828
+ title: string;
829
+ col: number;
830
+ colSpan: number;
831
+ rowSpan: number;
832
+ } | {
833
+ type: "visualization";
834
+ visualizationId: number;
835
+ title: string;
836
+ col: number;
837
+ colSpan: number;
838
+ rowSpan: number;
839
+ })[];
840
+ }>;
841
+ exportReportData: (reportId: number, format?: "text" | "blob") => Promise<{
842
+ filename: string;
843
+ data: string | Blob;
844
+ }>;
845
+ };
846
+ /**
847
+ * Initialize authentication flow
848
+ */
849
+ private initializeAuth;
850
+ /**
851
+ * Perform the complete authentication flow
852
+ */
853
+ private performAuthFlow;
854
+ private getApiInformation;
855
+ private initializeSupabaseClient;
856
+ client(): Promise<InternalApiClient>;
857
+ /**
858
+ * Initialize the API client with Supabase headers
859
+ */
860
+ private initializeApiClient;
861
+ /**
862
+ * Handle the authentication logic (check session or exchange token)
863
+ */
864
+ private handleAuthentication;
865
+ /**
866
+ * Exchange external JWT for Supabase tokens
867
+ */
868
+ private exchangeExternalToken;
869
+ private createSupabaseHeaderMiddleware;
870
+ private setState;
871
+ }
872
+
873
+ export declare interface MageMetricsClientConfig {
874
+ apiUrl: string;
875
+ apiKey: string;
876
+ externalJwt?: string;
877
+ }
878
+
454
879
  export declare const MageMetricsContextProvider: default_2.FC<MageMetricsContextProviderProps>;
455
880
 
456
881
  export declare interface MageMetricsContextProviderProps {
457
882
  children: default_2.ReactNode;
458
- apiKey?: string;
883
+ apiKey: string;
459
884
  externalJwt?: string;
460
885
  apiUrl: string;
461
886
  experimental_components?: Components;
@@ -477,8 +902,2466 @@ declare interface ModalProps {
477
902
  startOptions?: StartOptions;
478
903
  }
479
904
 
905
+ declare type NoAuthPaths = Simplify<{
906
+ [Path in keyof paths]: RemoveAuthHeader<paths[Path]>;
907
+ }>;
908
+
909
+ declare interface operations {
910
+ exchangeExternalToken: {
911
+ parameters: {
912
+ query?: never;
913
+ header?: never;
914
+ path?: never;
915
+ cookie?: never;
916
+ };
917
+ requestBody: {
918
+ content: {
919
+ "application/json": {
920
+ apiKey: string;
921
+ externalJWT: string;
922
+ };
923
+ };
924
+ };
925
+ responses: {
926
+ /** @description Retrieve a JWT for an external user */
927
+ 200: {
928
+ headers: {
929
+ [name: string]: unknown;
930
+ };
931
+ content: {
932
+ "application/json": {
933
+ accessToken: string;
934
+ refreshToken: string;
935
+ };
936
+ };
937
+ };
938
+ /** @description Invalid input */
939
+ 400: {
940
+ headers: {
941
+ [name: string]: unknown;
942
+ };
943
+ content: {
944
+ "application/json": {
945
+ error: string;
946
+ };
947
+ };
948
+ };
949
+ /** @description Unable to retrieve a JWT for an external user */
950
+ 500: {
951
+ headers: {
952
+ [name: string]: unknown;
953
+ };
954
+ content: {
955
+ "application/json": {
956
+ error: string;
957
+ };
958
+ };
959
+ };
960
+ };
961
+ };
962
+ getApiInformation: {
963
+ parameters: {
964
+ query: {
965
+ apiKey: string;
966
+ };
967
+ header?: never;
968
+ path?: never;
969
+ cookie?: never;
970
+ };
971
+ requestBody?: never;
972
+ responses: {
973
+ /** @description Retrieve the API URL and anon key */
974
+ 200: {
975
+ headers: {
976
+ [name: string]: unknown;
977
+ };
978
+ content: {
979
+ "application/json": {
980
+ apiUrl: string;
981
+ anonKey: string;
982
+ };
983
+ };
984
+ };
985
+ /** @description Invalid input */
986
+ 400: {
987
+ headers: {
988
+ [name: string]: unknown;
989
+ };
990
+ content: {
991
+ "application/json": {
992
+ error: string;
993
+ };
994
+ };
995
+ };
996
+ /** @description Unable to retrieve the API URL and anon key */
997
+ 500: {
998
+ headers: {
999
+ [name: string]: unknown;
1000
+ };
1001
+ content: {
1002
+ "application/json": {
1003
+ error: string;
1004
+ };
1005
+ };
1006
+ };
1007
+ };
1008
+ };
1009
+ getApiInformation: {
1010
+ parameters: {
1011
+ query: {
1012
+ apiKey: string;
1013
+ };
1014
+ header?: never;
1015
+ path?: never;
1016
+ cookie?: never;
1017
+ };
1018
+ requestBody?: never;
1019
+ responses: {
1020
+ /** @description Retrieve the API URL and anon key */
1021
+ 200: {
1022
+ headers: {
1023
+ [name: string]: unknown;
1024
+ };
1025
+ content: {
1026
+ "application/json": {
1027
+ apiUrl: string;
1028
+ anonKey: string;
1029
+ };
1030
+ };
1031
+ };
1032
+ /** @description Invalid input */
1033
+ 400: {
1034
+ headers: {
1035
+ [name: string]: unknown;
1036
+ };
1037
+ content: {
1038
+ "application/json": {
1039
+ error: string;
1040
+ };
1041
+ };
1042
+ };
1043
+ /** @description Unable to retrieve the API URL and anon key */
1044
+ 500: {
1045
+ headers: {
1046
+ [name: string]: unknown;
1047
+ };
1048
+ content: {
1049
+ "application/json": {
1050
+ error: string;
1051
+ };
1052
+ };
1053
+ };
1054
+ };
1055
+ };
1056
+ runEnd2EndFlow: {
1057
+ parameters: {
1058
+ query?: never;
1059
+ header: {
1060
+ "sp-access-token": string;
1061
+ "sp-refresh-token"?: string;
1062
+ };
1063
+ path?: never;
1064
+ cookie?: never;
1065
+ };
1066
+ requestBody: {
1067
+ content: {
1068
+ "application/json": {
1069
+ userQuery: string;
1070
+ /** @default true */
1071
+ isNewAnalysisGoal?: boolean;
1072
+ /**
1073
+ * @default complex
1074
+ * @enum {string}
1075
+ */
1076
+ difficultyLevel?: "simple" | "moderate" | "complex";
1077
+ };
1078
+ };
1079
+ };
1080
+ responses: {
1081
+ /** @description Run the end2end flow */
1082
+ 200: {
1083
+ headers: {
1084
+ [name: string]: unknown;
1085
+ };
1086
+ content: {
1087
+ "application/json": {
1088
+ /** @enum {string} */
1089
+ status: "error";
1090
+ error: string;
1091
+ } | {
1092
+ /** @enum {string} */
1093
+ status: "success";
1094
+ flowId: string;
1095
+ };
1096
+ };
1097
+ };
1098
+ };
1099
+ };
1100
+ retrieveFlow: {
1101
+ parameters: {
1102
+ query?: never;
1103
+ header: {
1104
+ "sp-access-token": string;
1105
+ "sp-refresh-token"?: string;
1106
+ };
1107
+ path: {
1108
+ flowId: string;
1109
+ };
1110
+ cookie?: never;
1111
+ };
1112
+ requestBody?: never;
1113
+ responses: {
1114
+ /** @description The flow with its steps */
1115
+ 200: {
1116
+ headers: {
1117
+ [name: string]: unknown;
1118
+ };
1119
+ content: {
1120
+ "application/json": {
1121
+ created_at: string;
1122
+ id: string;
1123
+ request: string;
1124
+ user_id: string | null;
1125
+ user_friendly_goal?: string;
1126
+ has_chat_messages: boolean;
1127
+ };
1128
+ };
1129
+ };
1130
+ /** @description Unable to retrieve flow with this id */
1131
+ 404: {
1132
+ headers: {
1133
+ [name: string]: unknown;
1134
+ };
1135
+ content: {
1136
+ "application/json": {
1137
+ error: string;
1138
+ };
1139
+ };
1140
+ };
1141
+ /** @description Something wrong happened */
1142
+ 500: {
1143
+ headers: {
1144
+ [name: string]: unknown;
1145
+ };
1146
+ content: {
1147
+ "application/json": {
1148
+ error: string;
1149
+ };
1150
+ };
1151
+ };
1152
+ };
1153
+ };
1154
+ retrieveRecentFlows: {
1155
+ parameters: {
1156
+ query?: {
1157
+ limit?: number;
1158
+ };
1159
+ header: {
1160
+ "sp-access-token": string;
1161
+ "sp-refresh-token"?: string;
1162
+ };
1163
+ path?: never;
1164
+ cookie?: never;
1165
+ };
1166
+ requestBody?: never;
1167
+ responses: {
1168
+ /** @description A list of recent flows */
1169
+ 200: {
1170
+ headers: {
1171
+ [name: string]: unknown;
1172
+ };
1173
+ content: {
1174
+ "application/json": {
1175
+ created_at: string;
1176
+ id: string;
1177
+ request: string;
1178
+ user_id: string | null;
1179
+ }[];
1180
+ };
1181
+ };
1182
+ /** @description Something wrong happened */
1183
+ 500: {
1184
+ headers: {
1185
+ [name: string]: unknown;
1186
+ };
1187
+ content: {
1188
+ "application/json": {
1189
+ error: string;
1190
+ };
1191
+ };
1192
+ };
1193
+ };
1194
+ };
1195
+ retrieveFlowDataInsights: {
1196
+ parameters: {
1197
+ query?: {
1198
+ count?: boolean;
1199
+ };
1200
+ header: {
1201
+ "sp-access-token": string;
1202
+ "sp-refresh-token"?: string;
1203
+ };
1204
+ path: {
1205
+ flowId: string;
1206
+ };
1207
+ cookie?: never;
1208
+ };
1209
+ requestBody?: never;
1210
+ responses: {
1211
+ /** @description Flow data insights (data reports and visualizations) */
1212
+ 200: {
1213
+ headers: {
1214
+ [name: string]: unknown;
1215
+ };
1216
+ content: {
1217
+ "application/json": {
1218
+ /** @enum {boolean} */
1219
+ count: false;
1220
+ data_reports: {
1221
+ created_at: string;
1222
+ flow_id: string;
1223
+ id: number;
1224
+ title: string;
1225
+ data_summary: {
1226
+ columns: {
1227
+ [key: string]: {
1228
+ position?: number;
1229
+ data_type: string;
1230
+ null_count: number | null;
1231
+ unique_count: number | null;
1232
+ unique_percentage: number | null;
1233
+ };
1234
+ };
1235
+ };
1236
+ bookmarked: boolean;
1237
+ status: string | null;
1238
+ }[];
1239
+ visualizations: {
1240
+ id: number;
1241
+ flow_data_id: number;
1242
+ created_at: string;
1243
+ configuration: {
1244
+ /** @enum {string} */
1245
+ type: "bar";
1246
+ title: string;
1247
+ xAxisLabel: string;
1248
+ yAxisLabel: string;
1249
+ xAxisDataKey?: string;
1250
+ yAxisDataKey?: string;
1251
+ dimensionDataKey?: string;
1252
+ valueColumns?: string[];
1253
+ } | {
1254
+ /** @enum {string} */
1255
+ type: "line/area";
1256
+ title: string;
1257
+ xAxisLabel: string;
1258
+ yAxisLabel: string;
1259
+ xAxisDataKey?: string;
1260
+ yAxisDataKey?: string;
1261
+ dimensionDataKey?: string;
1262
+ valueColumns?: string[];
1263
+ } | {
1264
+ /** @enum {string} */
1265
+ type: "scatter";
1266
+ title: string;
1267
+ xAxisLabel: string;
1268
+ yAxisLabel: string;
1269
+ xAxisDataKey?: string;
1270
+ yAxisDataKey?: string;
1271
+ dimensionDataKey?: string;
1272
+ valueColumns?: string[];
1273
+ } | {
1274
+ /** @enum {string} */
1275
+ type: "pie";
1276
+ title: string;
1277
+ nameKey: string;
1278
+ dataKey: string;
1279
+ };
1280
+ bookmarked: boolean;
1281
+ }[];
1282
+ } | {
1283
+ /** @enum {boolean} */
1284
+ count: true;
1285
+ data_reports: number;
1286
+ visualizations: number;
1287
+ };
1288
+ };
1289
+ };
1290
+ /** @description Unable to retrieve flow with this id */
1291
+ 404: {
1292
+ headers: {
1293
+ [name: string]: unknown;
1294
+ };
1295
+ content: {
1296
+ "application/json": {
1297
+ error: string;
1298
+ };
1299
+ };
1300
+ };
1301
+ /** @description Something wrong happened */
1302
+ 500: {
1303
+ headers: {
1304
+ [name: string]: unknown;
1305
+ };
1306
+ content: {
1307
+ "application/json": {
1308
+ error: string;
1309
+ };
1310
+ };
1311
+ };
1312
+ };
1313
+ };
1314
+ retrieveFlowDataReports: {
1315
+ parameters: {
1316
+ query?: never;
1317
+ header: {
1318
+ "sp-access-token": string;
1319
+ "sp-refresh-token"?: string;
1320
+ };
1321
+ path: {
1322
+ flowId: string;
1323
+ };
1324
+ cookie?: never;
1325
+ };
1326
+ requestBody?: never;
1327
+ responses: {
1328
+ /** @description The data reports associated with the flow */
1329
+ 200: {
1330
+ headers: {
1331
+ [name: string]: unknown;
1332
+ };
1333
+ content: {
1334
+ "application/json": {
1335
+ created_at: string;
1336
+ flow_id: string;
1337
+ id: number;
1338
+ title: string;
1339
+ data_summary: {
1340
+ columns: {
1341
+ [key: string]: {
1342
+ position?: number;
1343
+ data_type: string;
1344
+ null_count: number | null;
1345
+ unique_count: number | null;
1346
+ unique_percentage: number | null;
1347
+ };
1348
+ };
1349
+ };
1350
+ bookmarked: boolean;
1351
+ status: string | null;
1352
+ }[];
1353
+ };
1354
+ };
1355
+ /** @description Unable to retrieve flow with this id */
1356
+ 404: {
1357
+ headers: {
1358
+ [name: string]: unknown;
1359
+ };
1360
+ content: {
1361
+ "application/json": {
1362
+ error: string;
1363
+ };
1364
+ };
1365
+ };
1366
+ /** @description Something wrong happened */
1367
+ 500: {
1368
+ headers: {
1369
+ [name: string]: unknown;
1370
+ };
1371
+ content: {
1372
+ "application/json": {
1373
+ error: string;
1374
+ };
1375
+ };
1376
+ };
1377
+ };
1378
+ };
1379
+ getDataReportFeedback: {
1380
+ parameters: {
1381
+ query?: never;
1382
+ header: {
1383
+ "sp-access-token": string;
1384
+ "sp-refresh-token"?: string;
1385
+ };
1386
+ path: {
1387
+ report_id: string;
1388
+ };
1389
+ cookie?: never;
1390
+ };
1391
+ requestBody?: never;
1392
+ responses: {
1393
+ /** @description The feedback for the report */
1394
+ 200: {
1395
+ headers: {
1396
+ [name: string]: unknown;
1397
+ };
1398
+ content: {
1399
+ "application/json": {
1400
+ created_at: string;
1401
+ flow_data_id: number;
1402
+ /** @enum {string} */
1403
+ helpfulness: "helpful" | "partially helpful" | "not helpful" | "incorrect";
1404
+ id: number;
1405
+ } | null;
1406
+ };
1407
+ };
1408
+ /** @description Unable to retrieve feedback */
1409
+ 404: {
1410
+ headers: {
1411
+ [name: string]: unknown;
1412
+ };
1413
+ content: {
1414
+ "application/json": {
1415
+ error: string;
1416
+ };
1417
+ };
1418
+ };
1419
+ /** @description Something wrong happened */
1420
+ 500: {
1421
+ headers: {
1422
+ [name: string]: unknown;
1423
+ };
1424
+ content: {
1425
+ "application/json": {
1426
+ error: string;
1427
+ };
1428
+ };
1429
+ };
1430
+ };
1431
+ };
1432
+ upsertReportFeedback: {
1433
+ parameters: {
1434
+ query?: never;
1435
+ header: {
1436
+ "sp-access-token": string;
1437
+ "sp-refresh-token"?: string;
1438
+ };
1439
+ path: {
1440
+ report_id: string;
1441
+ };
1442
+ cookie?: never;
1443
+ };
1444
+ /** @description The feedback for the flow data */
1445
+ requestBody: {
1446
+ content: {
1447
+ "application/json": {
1448
+ /** @enum {string} */
1449
+ helpfulness: "helpful" | "partially helpful" | "not helpful" | "incorrect";
1450
+ };
1451
+ };
1452
+ };
1453
+ responses: {
1454
+ /** @description Successfully upserted feedback */
1455
+ 200: {
1456
+ headers: {
1457
+ [name: string]: unknown;
1458
+ };
1459
+ content?: never;
1460
+ };
1461
+ /** @description Something wrong happened */
1462
+ 500: {
1463
+ headers: {
1464
+ [name: string]: unknown;
1465
+ };
1466
+ content: {
1467
+ "application/json": {
1468
+ error: string;
1469
+ };
1470
+ };
1471
+ };
1472
+ };
1473
+ };
1474
+ deleteReportFeedback: {
1475
+ parameters: {
1476
+ query?: never;
1477
+ header: {
1478
+ "sp-access-token": string;
1479
+ "sp-refresh-token"?: string;
1480
+ };
1481
+ path: {
1482
+ report_id: string;
1483
+ };
1484
+ cookie?: never;
1485
+ };
1486
+ requestBody?: never;
1487
+ responses: {
1488
+ /** @description Successfully deleted feedback */
1489
+ 200: {
1490
+ headers: {
1491
+ [name: string]: unknown;
1492
+ };
1493
+ content?: never;
1494
+ };
1495
+ /** @description Unable to retrieve feedback */
1496
+ 404: {
1497
+ headers: {
1498
+ [name: string]: unknown;
1499
+ };
1500
+ content: {
1501
+ "application/json": {
1502
+ error: string;
1503
+ };
1504
+ };
1505
+ };
1506
+ /** @description Something wrong happened */
1507
+ 500: {
1508
+ headers: {
1509
+ [name: string]: unknown;
1510
+ };
1511
+ content: {
1512
+ "application/json": {
1513
+ error: string;
1514
+ };
1515
+ };
1516
+ };
1517
+ };
1518
+ };
1519
+ retrieveLatestDataReportStatus: {
1520
+ parameters: {
1521
+ query?: never;
1522
+ header: {
1523
+ "sp-access-token": string;
1524
+ "sp-refresh-token"?: string;
1525
+ };
1526
+ path: {
1527
+ flowId: string;
1528
+ };
1529
+ cookie?: never;
1530
+ };
1531
+ requestBody?: never;
1532
+ responses: {
1533
+ /** @description The status of the latest flow data for a given flow */
1534
+ 200: {
1535
+ headers: {
1536
+ [name: string]: unknown;
1537
+ };
1538
+ content: {
1539
+ "application/json": {
1540
+ status: string | null;
1541
+ };
1542
+ };
1543
+ };
1544
+ /** @description Unable to retrieve status for latest flow data of flow with this id */
1545
+ 404: {
1546
+ headers: {
1547
+ [name: string]: unknown;
1548
+ };
1549
+ content: {
1550
+ "application/json": {
1551
+ error: string;
1552
+ };
1553
+ };
1554
+ };
1555
+ /** @description Something wrong happened */
1556
+ 500: {
1557
+ headers: {
1558
+ [name: string]: unknown;
1559
+ };
1560
+ content: {
1561
+ "application/json": {
1562
+ error: string;
1563
+ };
1564
+ };
1565
+ };
1566
+ };
1567
+ };
1568
+ getDataReportExplainability: {
1569
+ parameters: {
1570
+ query?: never;
1571
+ header: {
1572
+ "sp-access-token": string;
1573
+ "sp-refresh-token"?: string;
1574
+ };
1575
+ path: {
1576
+ report_id: string;
1577
+ };
1578
+ cookie?: never;
1579
+ };
1580
+ requestBody?: never;
1581
+ responses: {
1582
+ /** @description The explainability of the report */
1583
+ 200: {
1584
+ headers: {
1585
+ [name: string]: unknown;
1586
+ };
1587
+ content: {
1588
+ "application/json": {
1589
+ sql_explanation?: {
1590
+ chunk_title: string;
1591
+ chunk_explanation: string;
1592
+ lines: {
1593
+ sql: string;
1594
+ explanation: string;
1595
+ }[];
1596
+ }[] | null;
1597
+ business_explanation?: {
1598
+ summary: string;
1599
+ implementation: string[];
1600
+ assumptions: {
1601
+ /** @enum {string} */
1602
+ type: "grain" | "completeness" | "transformation" | "relationship" | "other";
1603
+ details: string;
1604
+ explanation: string;
1605
+ }[];
1606
+ } | null;
1607
+ columns_lineage?: {
1608
+ [key: string]: {
1609
+ nodes: {
1610
+ id: string;
1611
+ /** @enum {string} */
1612
+ type: "entity" | "attribute" | "filter" | "process" | "combine" | "result";
1613
+ explanation: string;
1614
+ }[];
1615
+ edges: {
1616
+ source: string;
1617
+ target: string;
1618
+ }[];
1619
+ };
1620
+ } | null;
1621
+ confidence_score: number;
1622
+ confidence_score_reason: string;
1623
+ assumptions_score?: number;
1624
+ assumptions_score_reason?: string;
1625
+ friendliness_score?: number;
1626
+ friendliness_score_reason?: string;
1627
+ flow_data_id: number;
1628
+ };
1629
+ };
1630
+ };
1631
+ /** @description Unable to retrieve report with this id */
1632
+ 404: {
1633
+ headers: {
1634
+ [name: string]: unknown;
1635
+ };
1636
+ content: {
1637
+ "application/json": {
1638
+ error: string;
1639
+ };
1640
+ };
1641
+ };
1642
+ /** @description Something wrong happened */
1643
+ 500: {
1644
+ headers: {
1645
+ [name: string]: unknown;
1646
+ };
1647
+ content: {
1648
+ "application/json": {
1649
+ error: string;
1650
+ };
1651
+ };
1652
+ };
1653
+ };
1654
+ };
1655
+ toggleBookmark: {
1656
+ parameters: {
1657
+ query?: never;
1658
+ header: {
1659
+ "sp-access-token": string;
1660
+ "sp-refresh-token"?: string;
1661
+ };
1662
+ path?: never;
1663
+ cookie?: never;
1664
+ };
1665
+ /** @description Toggle bookmark for timeline item */
1666
+ requestBody: {
1667
+ content: {
1668
+ "application/json": {
1669
+ /** @enum {string} */
1670
+ type: "dataReport";
1671
+ flowDataId: number;
1672
+ bookmarked: boolean;
1673
+ } | {
1674
+ /** @enum {string} */
1675
+ type: "visualization";
1676
+ flowDataVisualizationId: number;
1677
+ bookmarked: boolean;
1678
+ };
1679
+ };
1680
+ };
1681
+ responses: {
1682
+ /** @description Successfully toggled bookmark */
1683
+ 200: {
1684
+ headers: {
1685
+ [name: string]: unknown;
1686
+ };
1687
+ content: {
1688
+ "application/json": {
1689
+ success: boolean;
1690
+ bookmarked: boolean;
1691
+ };
1692
+ };
1693
+ };
1694
+ /** @description Timeline item not found */
1695
+ 404: {
1696
+ headers: {
1697
+ [name: string]: unknown;
1698
+ };
1699
+ content: {
1700
+ "application/json": {
1701
+ error: string;
1702
+ };
1703
+ };
1704
+ };
1705
+ /** @description Something wrong happened */
1706
+ 500: {
1707
+ headers: {
1708
+ [name: string]: unknown;
1709
+ };
1710
+ content: {
1711
+ "application/json": {
1712
+ error: string;
1713
+ };
1714
+ };
1715
+ };
1716
+ };
1717
+ };
1718
+ retrieveLatestDataRefresh: {
1719
+ parameters: {
1720
+ query?: never;
1721
+ header: {
1722
+ "sp-access-token": string;
1723
+ "sp-refresh-token"?: string;
1724
+ };
1725
+ path?: never;
1726
+ cookie?: never;
1727
+ };
1728
+ requestBody?: never;
1729
+ responses: {
1730
+ /** @description The latest data refresh */
1731
+ 200: {
1732
+ headers: {
1733
+ [name: string]: unknown;
1734
+ };
1735
+ content: {
1736
+ "application/json": {
1737
+ updated_at: string;
1738
+ };
1739
+ };
1740
+ };
1741
+ /** @description Unable to retrieve latest data refresh */
1742
+ 404: {
1743
+ headers: {
1744
+ [name: string]: unknown;
1745
+ };
1746
+ content: {
1747
+ "application/json": {
1748
+ error: string;
1749
+ };
1750
+ };
1751
+ };
1752
+ /** @description Something wrong happened */
1753
+ 500: {
1754
+ headers: {
1755
+ [name: string]: unknown;
1756
+ };
1757
+ content: {
1758
+ "application/json": {
1759
+ error: string;
1760
+ };
1761
+ };
1762
+ };
1763
+ };
1764
+ };
1765
+ exportReportData: {
1766
+ parameters: {
1767
+ query?: never;
1768
+ header: {
1769
+ "sp-access-token": string;
1770
+ "sp-refresh-token"?: string;
1771
+ };
1772
+ path: {
1773
+ report_id: string;
1774
+ };
1775
+ cookie?: never;
1776
+ };
1777
+ requestBody?: never;
1778
+ responses: {
1779
+ /** @description The report data exported in CSV format */
1780
+ 200: {
1781
+ headers: {
1782
+ [name: string]: unknown;
1783
+ };
1784
+ content: {
1785
+ "text/csv": string;
1786
+ };
1787
+ };
1788
+ /** @description Unable to retrieve flow with this id */
1789
+ 404: {
1790
+ headers: {
1791
+ [name: string]: unknown;
1792
+ };
1793
+ content: {
1794
+ "application/json": {
1795
+ error: string;
1796
+ };
1797
+ };
1798
+ };
1799
+ /** @description Something wrong happened */
1800
+ 500: {
1801
+ headers: {
1802
+ [name: string]: unknown;
1803
+ };
1804
+ content: {
1805
+ "application/json": {
1806
+ error: string;
1807
+ };
1808
+ };
1809
+ };
1810
+ };
1811
+ };
1812
+ getDataReportColumns: {
1813
+ parameters: {
1814
+ query?: never;
1815
+ header: {
1816
+ "sp-access-token": string;
1817
+ "sp-refresh-token"?: string;
1818
+ };
1819
+ path: {
1820
+ report_id: string;
1821
+ };
1822
+ cookie?: never;
1823
+ };
1824
+ requestBody?: never;
1825
+ responses: {
1826
+ /** @description A list containing the columns of the report */
1827
+ 200: {
1828
+ headers: {
1829
+ [name: string]: unknown;
1830
+ };
1831
+ content: {
1832
+ "application/json": components["schemas"]["ReportColumns"];
1833
+ };
1834
+ };
1835
+ /** @description Unable to retrieve report with this id */
1836
+ 404: {
1837
+ headers: {
1838
+ [name: string]: unknown;
1839
+ };
1840
+ content: {
1841
+ "application/json": {
1842
+ error: string;
1843
+ };
1844
+ };
1845
+ };
1846
+ /** @description Something wrong happened */
1847
+ 500: {
1848
+ headers: {
1849
+ [name: string]: unknown;
1850
+ };
1851
+ content: {
1852
+ "application/json": {
1853
+ error: string;
1854
+ };
1855
+ };
1856
+ };
1857
+ };
1858
+ };
1859
+ getDataReportData: {
1860
+ parameters: {
1861
+ query?: {
1862
+ limit?: number;
1863
+ /** @example name:asc,date:desc */
1864
+ order?: string;
1865
+ cursor?: number;
1866
+ /** @example status:active,name:John%20Doe */
1867
+ filter?: string;
1868
+ };
1869
+ header: {
1870
+ "sp-access-token": string;
1871
+ "sp-refresh-token"?: string;
1872
+ };
1873
+ path: {
1874
+ report_id: string;
1875
+ };
1876
+ cookie?: never;
1877
+ };
1878
+ requestBody?: never;
1879
+ responses: {
1880
+ /** @description The content of the report */
1881
+ 200: {
1882
+ headers: {
1883
+ [name: string]: unknown;
1884
+ };
1885
+ content: {
1886
+ "application/json": components["schemas"]["ReportData"];
1887
+ };
1888
+ };
1889
+ /** @description Unable to retrieve report with this id */
1890
+ 404: {
1891
+ headers: {
1892
+ [name: string]: unknown;
1893
+ };
1894
+ content: {
1895
+ "application/json": {
1896
+ error: string;
1897
+ };
1898
+ };
1899
+ };
1900
+ /** @description Something wrong happened */
1901
+ 500: {
1902
+ headers: {
1903
+ [name: string]: unknown;
1904
+ };
1905
+ content: {
1906
+ "application/json": {
1907
+ error: string;
1908
+ };
1909
+ };
1910
+ };
1911
+ };
1912
+ };
1913
+ getDataReportRowCount: {
1914
+ parameters: {
1915
+ query?: never;
1916
+ header: {
1917
+ "sp-access-token": string;
1918
+ "sp-refresh-token"?: string;
1919
+ };
1920
+ path: {
1921
+ report_id: string;
1922
+ };
1923
+ cookie?: never;
1924
+ };
1925
+ requestBody?: never;
1926
+ responses: {
1927
+ /** @description The total count of rows in the report */
1928
+ 200: {
1929
+ headers: {
1930
+ [name: string]: unknown;
1931
+ };
1932
+ content: {
1933
+ "application/json": {
1934
+ /** @description Total number of rows in the report */
1935
+ count: number;
1936
+ };
1937
+ };
1938
+ };
1939
+ /** @description Unable to retrieve report with this id */
1940
+ 404: {
1941
+ headers: {
1942
+ [name: string]: unknown;
1943
+ };
1944
+ content: {
1945
+ "application/json": {
1946
+ error: string;
1947
+ };
1948
+ };
1949
+ };
1950
+ /** @description Something wrong happened */
1951
+ 500: {
1952
+ headers: {
1953
+ [name: string]: unknown;
1954
+ };
1955
+ content: {
1956
+ "application/json": {
1957
+ error: string;
1958
+ };
1959
+ };
1960
+ };
1961
+ };
1962
+ };
1963
+ getDataReportVisualizations: {
1964
+ parameters: {
1965
+ query?: never;
1966
+ header: {
1967
+ "sp-access-token": string;
1968
+ "sp-refresh-token"?: string;
1969
+ };
1970
+ path: {
1971
+ report_id: string;
1972
+ };
1973
+ cookie?: never;
1974
+ };
1975
+ requestBody?: never;
1976
+ responses: {
1977
+ /** @description The visualizations for the report */
1978
+ 200: {
1979
+ headers: {
1980
+ [name: string]: unknown;
1981
+ };
1982
+ content: {
1983
+ "application/json": {
1984
+ created_at: string;
1985
+ flow_id: string;
1986
+ id: number;
1987
+ title: string;
1988
+ data_summary: {
1989
+ columns: {
1990
+ [key: string]: {
1991
+ position?: number;
1992
+ data_type: string;
1993
+ null_count: number | null;
1994
+ unique_count: number | null;
1995
+ unique_percentage: number | null;
1996
+ };
1997
+ };
1998
+ };
1999
+ bookmarked: boolean;
2000
+ status: string | null;
2001
+ visualizations: {
2002
+ id: number;
2003
+ flow_data_id: number;
2004
+ created_at: string;
2005
+ configuration: {
2006
+ /** @enum {string} */
2007
+ type: "bar";
2008
+ title: string;
2009
+ xAxisLabel: string;
2010
+ yAxisLabel: string;
2011
+ xAxisDataKey?: string;
2012
+ yAxisDataKey?: string;
2013
+ dimensionDataKey?: string;
2014
+ valueColumns?: string[];
2015
+ } | {
2016
+ /** @enum {string} */
2017
+ type: "line/area";
2018
+ title: string;
2019
+ xAxisLabel: string;
2020
+ yAxisLabel: string;
2021
+ xAxisDataKey?: string;
2022
+ yAxisDataKey?: string;
2023
+ dimensionDataKey?: string;
2024
+ valueColumns?: string[];
2025
+ } | {
2026
+ /** @enum {string} */
2027
+ type: "scatter";
2028
+ title: string;
2029
+ xAxisLabel: string;
2030
+ yAxisLabel: string;
2031
+ xAxisDataKey?: string;
2032
+ yAxisDataKey?: string;
2033
+ dimensionDataKey?: string;
2034
+ valueColumns?: string[];
2035
+ } | {
2036
+ /** @enum {string} */
2037
+ type: "pie";
2038
+ title: string;
2039
+ nameKey: string;
2040
+ dataKey: string;
2041
+ };
2042
+ bookmarked: boolean;
2043
+ }[];
2044
+ };
2045
+ };
2046
+ };
2047
+ /** @description Unable to retrieve report 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
+ retrieveChatTimeline: {
2072
+ parameters: {
2073
+ query?: never;
2074
+ header: {
2075
+ "sp-access-token": string;
2076
+ "sp-refresh-token"?: string;
2077
+ };
2078
+ path: {
2079
+ flowId: string;
2080
+ };
2081
+ cookie?: never;
2082
+ };
2083
+ requestBody?: never;
2084
+ responses: {
2085
+ /** @description The timeline of generated insights for the flow */
2086
+ 200: {
2087
+ headers: {
2088
+ [name: string]: unknown;
2089
+ };
2090
+ content: {
2091
+ "application/json": ({
2092
+ /** @enum {string} */
2093
+ type: "dataReport";
2094
+ flowDataId: number;
2095
+ flowId: string;
2096
+ title: string;
2097
+ bookmarked: boolean;
2098
+ answer: string | null;
2099
+ } | {
2100
+ /** @enum {string} */
2101
+ type: "visualization";
2102
+ flowId: string;
2103
+ flowDataId: number;
2104
+ flowDataVisualizationId: number;
2105
+ title: string;
2106
+ bookmarked: boolean;
2107
+ } | {
2108
+ /** @enum {string} */
2109
+ type: "message";
2110
+ })[];
2111
+ };
2112
+ };
2113
+ /** @description Unable to retrieve flow with this id */
2114
+ 404: {
2115
+ headers: {
2116
+ [name: string]: unknown;
2117
+ };
2118
+ content: {
2119
+ "application/json": {
2120
+ error: string;
2121
+ };
2122
+ };
2123
+ };
2124
+ /** @description Something wrong happened */
2125
+ 500: {
2126
+ headers: {
2127
+ [name: string]: unknown;
2128
+ };
2129
+ content: {
2130
+ "application/json": {
2131
+ error: string;
2132
+ };
2133
+ };
2134
+ };
2135
+ };
2136
+ };
2137
+ retrieveChatMessages: {
2138
+ parameters: {
2139
+ query?: never;
2140
+ header: {
2141
+ "sp-access-token": string;
2142
+ "sp-refresh-token"?: string;
2143
+ };
2144
+ path: {
2145
+ flowId: string;
2146
+ };
2147
+ cookie?: never;
2148
+ };
2149
+ requestBody?: never;
2150
+ responses: {
2151
+ /** @description The messages from the given flow */
2152
+ 200: {
2153
+ headers: {
2154
+ [name: string]: unknown;
2155
+ };
2156
+ content: {
2157
+ "application/json": {
2158
+ messages: Record<string, unknown>[];
2159
+ };
2160
+ };
2161
+ };
2162
+ /** @description Unable to retrieve flow with this id */
2163
+ 404: {
2164
+ headers: {
2165
+ [name: string]: unknown;
2166
+ };
2167
+ content: {
2168
+ "application/json": {
2169
+ error: string;
2170
+ };
2171
+ };
2172
+ };
2173
+ /** @description Something wrong happened */
2174
+ 500: {
2175
+ headers: {
2176
+ [name: string]: unknown;
2177
+ };
2178
+ content: {
2179
+ "application/json": {
2180
+ error: string;
2181
+ };
2182
+ };
2183
+ };
2184
+ };
2185
+ };
2186
+ getStarterRecommendations: {
2187
+ parameters: {
2188
+ query?: {
2189
+ count?: number;
2190
+ };
2191
+ header: {
2192
+ "sp-access-token": string;
2193
+ "sp-refresh-token"?: string;
2194
+ };
2195
+ path?: never;
2196
+ cookie?: never;
2197
+ };
2198
+ requestBody?: never;
2199
+ responses: {
2200
+ /** @description Get starter recommendations */
2201
+ 200: {
2202
+ headers: {
2203
+ [name: string]: unknown;
2204
+ };
2205
+ content: {
2206
+ "application/json": {
2207
+ recommendations: components["schemas"]["StarterRecommendation"][];
2208
+ };
2209
+ };
2210
+ };
2211
+ /** @description Something wrong happened */
2212
+ 500: {
2213
+ headers: {
2214
+ [name: string]: unknown;
2215
+ };
2216
+ content: {
2217
+ "application/json": {
2218
+ error: string;
2219
+ };
2220
+ };
2221
+ };
2222
+ };
2223
+ };
2224
+ fetchVisualization: {
2225
+ parameters: {
2226
+ query?: never;
2227
+ header: {
2228
+ "sp-access-token": string;
2229
+ "sp-refresh-token"?: string;
2230
+ };
2231
+ path: {
2232
+ flowDataVisualizationId: string;
2233
+ };
2234
+ cookie?: never;
2235
+ };
2236
+ requestBody?: never;
2237
+ responses: {
2238
+ /** @description The content of the visualization */
2239
+ 200: {
2240
+ headers: {
2241
+ [name: string]: unknown;
2242
+ };
2243
+ content: {
2244
+ "application/json": {
2245
+ id: number;
2246
+ flow_data_id: number;
2247
+ created_at: string;
2248
+ configuration: {
2249
+ /** @enum {string} */
2250
+ type: "bar";
2251
+ title: string;
2252
+ xAxisLabel: string;
2253
+ yAxisLabel: string;
2254
+ xAxisDataKey?: string;
2255
+ yAxisDataKey?: string;
2256
+ dimensionDataKey?: string;
2257
+ valueColumns?: string[];
2258
+ } | {
2259
+ /** @enum {string} */
2260
+ type: "line/area";
2261
+ title: string;
2262
+ xAxisLabel: string;
2263
+ yAxisLabel: string;
2264
+ xAxisDataKey?: string;
2265
+ yAxisDataKey?: string;
2266
+ dimensionDataKey?: string;
2267
+ valueColumns?: string[];
2268
+ } | {
2269
+ /** @enum {string} */
2270
+ type: "scatter";
2271
+ title: string;
2272
+ xAxisLabel: string;
2273
+ yAxisLabel: string;
2274
+ xAxisDataKey?: string;
2275
+ yAxisDataKey?: string;
2276
+ dimensionDataKey?: string;
2277
+ valueColumns?: string[];
2278
+ } | {
2279
+ /** @enum {string} */
2280
+ type: "pie";
2281
+ title: string;
2282
+ nameKey: string;
2283
+ dataKey: string;
2284
+ };
2285
+ bookmarked: boolean;
2286
+ data: components["schemas"]["VisualizationData"];
2287
+ _metadata?: {
2288
+ wasSampled: boolean;
2289
+ originalCount: number;
2290
+ sampledCount: number;
2291
+ };
2292
+ };
2293
+ };
2294
+ };
2295
+ /** @description Invalid arguments to fetch visualization */
2296
+ 400: {
2297
+ headers: {
2298
+ [name: string]: unknown;
2299
+ };
2300
+ content: {
2301
+ "application/json": {
2302
+ error: string;
2303
+ };
2304
+ };
2305
+ };
2306
+ /** @description Unable to fetch visualization with this id */
2307
+ 404: {
2308
+ headers: {
2309
+ [name: string]: unknown;
2310
+ };
2311
+ content: {
2312
+ "application/json": {
2313
+ error: string;
2314
+ };
2315
+ };
2316
+ };
2317
+ /** @description Something wrong happened */
2318
+ 500: {
2319
+ headers: {
2320
+ [name: string]: unknown;
2321
+ };
2322
+ content: {
2323
+ "application/json": {
2324
+ error: string;
2325
+ };
2326
+ };
2327
+ };
2328
+ };
2329
+ };
2330
+ listVisualizationsForFlow: {
2331
+ parameters: {
2332
+ query?: {
2333
+ flowDataId?: string;
2334
+ };
2335
+ header: {
2336
+ "sp-access-token": string;
2337
+ "sp-refresh-token"?: string;
2338
+ };
2339
+ path: {
2340
+ flowId: string;
2341
+ };
2342
+ cookie?: never;
2343
+ };
2344
+ requestBody?: never;
2345
+ responses: {
2346
+ /** @description List visualizations for a given flow. Can be filtered by flow data id as well */
2347
+ 200: {
2348
+ headers: {
2349
+ [name: string]: unknown;
2350
+ };
2351
+ content: {
2352
+ "application/json": {
2353
+ id: number;
2354
+ flow_data_id: number;
2355
+ created_at: string;
2356
+ configuration: {
2357
+ /** @enum {string} */
2358
+ type: "bar";
2359
+ title: string;
2360
+ xAxisLabel: string;
2361
+ yAxisLabel: string;
2362
+ xAxisDataKey?: string;
2363
+ yAxisDataKey?: string;
2364
+ dimensionDataKey?: string;
2365
+ valueColumns?: string[];
2366
+ } | {
2367
+ /** @enum {string} */
2368
+ type: "line/area";
2369
+ title: string;
2370
+ xAxisLabel: string;
2371
+ yAxisLabel: string;
2372
+ xAxisDataKey?: string;
2373
+ yAxisDataKey?: string;
2374
+ dimensionDataKey?: string;
2375
+ valueColumns?: string[];
2376
+ } | {
2377
+ /** @enum {string} */
2378
+ type: "scatter";
2379
+ title: string;
2380
+ xAxisLabel: string;
2381
+ yAxisLabel: string;
2382
+ xAxisDataKey?: string;
2383
+ yAxisDataKey?: string;
2384
+ dimensionDataKey?: string;
2385
+ valueColumns?: string[];
2386
+ } | {
2387
+ /** @enum {string} */
2388
+ type: "pie";
2389
+ title: string;
2390
+ nameKey: string;
2391
+ dataKey: string;
2392
+ };
2393
+ bookmarked: boolean;
2394
+ }[];
2395
+ };
2396
+ };
2397
+ /** @description Invalid arguments to fetch visualization */
2398
+ 400: {
2399
+ headers: {
2400
+ [name: string]: unknown;
2401
+ };
2402
+ content: {
2403
+ "application/json": {
2404
+ error: string;
2405
+ };
2406
+ };
2407
+ };
2408
+ /** @description Unable to list visualizations */
2409
+ 404: {
2410
+ headers: {
2411
+ [name: string]: unknown;
2412
+ };
2413
+ content: {
2414
+ "application/json": {
2415
+ error: string;
2416
+ };
2417
+ };
2418
+ };
2419
+ /** @description Something wrong happened */
2420
+ 500: {
2421
+ headers: {
2422
+ [name: string]: unknown;
2423
+ };
2424
+ content: {
2425
+ "application/json": {
2426
+ error: string;
2427
+ };
2428
+ };
2429
+ };
2430
+ };
2431
+ };
2432
+ triggerFlow: {
2433
+ parameters: {
2434
+ query?: never;
2435
+ header: {
2436
+ "sp-access-token": string;
2437
+ "sp-refresh-token"?: string;
2438
+ };
2439
+ path?: never;
2440
+ cookie?: never;
2441
+ };
2442
+ /** @description Trigger flow request body */
2443
+ requestBody: {
2444
+ content: {
2445
+ "application/json": {
2446
+ triggerId: string;
2447
+ variables: {
2448
+ [key: string]: string;
2449
+ };
2450
+ };
2451
+ };
2452
+ };
2453
+ responses: {
2454
+ /** @description Flow id */
2455
+ 200: {
2456
+ headers: {
2457
+ [name: string]: unknown;
2458
+ };
2459
+ content: {
2460
+ "application/json": {
2461
+ /** @enum {string} */
2462
+ status: "error";
2463
+ error: string;
2464
+ } | {
2465
+ /** @enum {string} */
2466
+ status: "success";
2467
+ flowId: string;
2468
+ };
2469
+ };
2470
+ };
2471
+ /** @description Invalid template or variable values */
2472
+ 400: {
2473
+ headers: {
2474
+ [name: string]: unknown;
2475
+ };
2476
+ content: {
2477
+ "application/json": {
2478
+ error: string;
2479
+ };
2480
+ };
2481
+ };
2482
+ /** @description Unable to retrieve trigger with this id */
2483
+ 404: {
2484
+ headers: {
2485
+ [name: string]: unknown;
2486
+ };
2487
+ content: {
2488
+ "application/json": {
2489
+ error: string;
2490
+ };
2491
+ };
2492
+ };
2493
+ /** @description Something wrong happened */
2494
+ 500: {
2495
+ headers: {
2496
+ [name: string]: unknown;
2497
+ };
2498
+ content: {
2499
+ "application/json": {
2500
+ error: string;
2501
+ };
2502
+ };
2503
+ };
2504
+ };
2505
+ };
2506
+ retrieveDashboard: {
2507
+ parameters: {
2508
+ query?: never;
2509
+ header: {
2510
+ "sp-access-token": string;
2511
+ "sp-refresh-token"?: string;
2512
+ };
2513
+ path: {
2514
+ dashboardId: string;
2515
+ };
2516
+ cookie?: never;
2517
+ };
2518
+ requestBody?: never;
2519
+ responses: {
2520
+ /** @description The dashboard with the given id */
2521
+ 200: {
2522
+ headers: {
2523
+ [name: string]: unknown;
2524
+ };
2525
+ content: {
2526
+ "application/json": {
2527
+ description: string | null;
2528
+ id: string;
2529
+ name: string;
2530
+ positions: ({
2531
+ /** @enum {string} */
2532
+ type: "data-report";
2533
+ flowId: string;
2534
+ flowDataId: number;
2535
+ title: string;
2536
+ col: number;
2537
+ colSpan: number;
2538
+ rowSpan: number;
2539
+ } | {
2540
+ /** @enum {string} */
2541
+ type: "visualization";
2542
+ visualizationId: number;
2543
+ title: string;
2544
+ col: number;
2545
+ colSpan: number;
2546
+ rowSpan: number;
2547
+ })[];
2548
+ };
2549
+ };
2550
+ };
2551
+ /** @description Unable to retrieve dashboard with this id */
2552
+ 404: {
2553
+ headers: {
2554
+ [name: string]: unknown;
2555
+ };
2556
+ content: {
2557
+ "application/json": {
2558
+ error: string;
2559
+ };
2560
+ };
2561
+ };
2562
+ /** @description Something wrong happened */
2563
+ 500: {
2564
+ headers: {
2565
+ [name: string]: unknown;
2566
+ };
2567
+ content: {
2568
+ "application/json": {
2569
+ error: string;
2570
+ };
2571
+ };
2572
+ };
2573
+ };
2574
+ };
2575
+ createQueryExample: {
2576
+ parameters: {
2577
+ query?: never;
2578
+ header?: never;
2579
+ path?: never;
2580
+ cookie?: never;
2581
+ };
2582
+ requestBody?: {
2583
+ content: {
2584
+ "application/json": {
2585
+ request: string;
2586
+ sql: string;
2587
+ };
2588
+ };
2589
+ };
2590
+ responses: {
2591
+ /** @description Query example created successfully */
2592
+ 200: {
2593
+ headers: {
2594
+ [name: string]: unknown;
2595
+ };
2596
+ content: {
2597
+ "application/json": {
2598
+ id: number;
2599
+ };
2600
+ };
2601
+ };
2602
+ /** @description Something wrong happened */
2603
+ 500: {
2604
+ headers: {
2605
+ [name: string]: unknown;
2606
+ };
2607
+ content: {
2608
+ "application/json": {
2609
+ error: string;
2610
+ };
2611
+ };
2612
+ };
2613
+ };
2614
+ };
2615
+ updateQueryExample: {
2616
+ parameters: {
2617
+ query?: never;
2618
+ header?: never;
2619
+ path: {
2620
+ id: string;
2621
+ };
2622
+ cookie?: never;
2623
+ };
2624
+ requestBody?: {
2625
+ content: {
2626
+ "application/json": {
2627
+ request?: string;
2628
+ sql?: string;
2629
+ is_active?: boolean;
2630
+ is_removed?: boolean;
2631
+ };
2632
+ };
2633
+ };
2634
+ responses: {
2635
+ /** @description Query example updated successfully */
2636
+ 200: {
2637
+ headers: {
2638
+ [name: string]: unknown;
2639
+ };
2640
+ content: {
2641
+ "application/json": {
2642
+ id: number;
2643
+ };
2644
+ };
2645
+ };
2646
+ /** @description Something wrong happened */
2647
+ 500: {
2648
+ headers: {
2649
+ [name: string]: unknown;
2650
+ };
2651
+ content: {
2652
+ "application/json": {
2653
+ error: string;
2654
+ };
2655
+ };
2656
+ };
2657
+ };
2658
+ };
2659
+ sqlPreview: {
2660
+ parameters: {
2661
+ query?: never;
2662
+ header?: never;
2663
+ path?: never;
2664
+ cookie?: never;
2665
+ };
2666
+ requestBody?: {
2667
+ content: {
2668
+ "application/json": {
2669
+ sql: string;
2670
+ };
2671
+ };
2672
+ };
2673
+ responses: {
2674
+ /** @description SQL query executed successfully */
2675
+ 200: {
2676
+ headers: {
2677
+ [name: string]: unknown;
2678
+ };
2679
+ content: {
2680
+ "application/json": {
2681
+ columns: {
2682
+ id: string;
2683
+ accessorKey: string;
2684
+ header: string;
2685
+ cell?: unknown;
2686
+ meta?: {
2687
+ [key: string]: unknown;
2688
+ };
2689
+ }[];
2690
+ data: {
2691
+ [key: string]: unknown;
2692
+ }[];
2693
+ metadata?: {
2694
+ wasSampled: boolean;
2695
+ originalCount: number;
2696
+ sampledCount: number;
2697
+ };
2698
+ };
2699
+ };
2700
+ };
2701
+ /** @description Invalid SQL query or request */
2702
+ 400: {
2703
+ headers: {
2704
+ [name: string]: unknown;
2705
+ };
2706
+ content: {
2707
+ "application/json": {
2708
+ error: string;
2709
+ };
2710
+ };
2711
+ };
2712
+ /** @description Internal server error */
2713
+ 500: {
2714
+ headers: {
2715
+ [name: string]: unknown;
2716
+ };
2717
+ content: {
2718
+ "application/json": {
2719
+ error: string;
2720
+ };
2721
+ };
2722
+ };
2723
+ };
2724
+ };
2725
+ getSankeyData: {
2726
+ parameters: {
2727
+ query?: never;
2728
+ header?: never;
2729
+ path?: never;
2730
+ cookie?: never;
2731
+ };
2732
+ requestBody?: never;
2733
+ responses: {
2734
+ /** @description Sankey data retrieved successfully */
2735
+ 200: {
2736
+ headers: {
2737
+ [name: string]: unknown;
2738
+ };
2739
+ content: {
2740
+ "application/json": {
2741
+ metadata: {
2742
+ embedding_type: string;
2743
+ approach: string;
2744
+ total_clusters: number;
2745
+ total_noise_points: number;
2746
+ total_requests: number;
2747
+ generation_timestamp: string;
2748
+ };
2749
+ clusters: {
2750
+ cluster_id: number;
2751
+ cluster_name: string;
2752
+ representative_questions: {
2753
+ question: string;
2754
+ count: number;
2755
+ sample_requests: string[];
2756
+ avg_confidence_score?: number | null;
2757
+ avg_assumptions_score?: number | null;
2758
+ avg_friendliness_score?: number | null;
2759
+ }[];
2760
+ count: number;
2761
+ avg_confidence_score?: number | null;
2762
+ avg_assumptions_score?: number | null;
2763
+ avg_friendliness_score?: number | null;
2764
+ }[];
2765
+ };
2766
+ };
2767
+ };
2768
+ /** @description Something wrong happened */
2769
+ 500: {
2770
+ headers: {
2771
+ [name: string]: unknown;
2772
+ };
2773
+ content: {
2774
+ "application/json": {
2775
+ error: string;
2776
+ };
2777
+ };
2778
+ };
2779
+ };
2780
+ };
2781
+ }
2782
+
2783
+ declare type PatchParam<T, Config extends RemoveParamsConfig, P extends keyof Config> = Simplify<T extends {
2784
+ [key in P]: infer H;
2785
+ } ? H extends Partial<Record<string, unknown>> ? Config[P] extends string ? Omit<H, Config[P]> : H : never : never>;
2786
+
2787
+ /**
2788
+ * This file was auto-generated by openapi-typescript.
2789
+ * Do not make direct changes to the file.
2790
+ */
2791
+
2792
+ declare interface paths {
2793
+ "/api/v1/auth/exchangeExternalToken": {
2794
+ parameters: {
2795
+ query?: never;
2796
+ header?: never;
2797
+ path?: never;
2798
+ cookie?: never;
2799
+ };
2800
+ get?: never;
2801
+ put?: never;
2802
+ post: operations["exchangeExternalToken"];
2803
+ delete?: never;
2804
+ options?: never;
2805
+ head?: never;
2806
+ patch?: never;
2807
+ trace?: never;
2808
+ };
2809
+ "/api/v1/auth/apiInformation": {
2810
+ parameters: {
2811
+ query?: never;
2812
+ header?: never;
2813
+ path?: never;
2814
+ cookie?: never;
2815
+ };
2816
+ get: operations["getApiInformation"];
2817
+ put?: never;
2818
+ post?: never;
2819
+ delete?: never;
2820
+ options?: never;
2821
+ head?: never;
2822
+ patch?: never;
2823
+ trace?: never;
2824
+ };
2825
+ "/api/auth/apiInformation": {
2826
+ parameters: {
2827
+ query?: never;
2828
+ header?: never;
2829
+ path?: never;
2830
+ cookie?: never;
2831
+ };
2832
+ get: operations["getApiInformation"];
2833
+ put?: never;
2834
+ post?: never;
2835
+ delete?: never;
2836
+ options?: never;
2837
+ head?: never;
2838
+ patch?: never;
2839
+ trace?: never;
2840
+ };
2841
+ "/api/v1/end2end": {
2842
+ parameters: {
2843
+ query?: never;
2844
+ header?: never;
2845
+ path?: never;
2846
+ cookie?: never;
2847
+ };
2848
+ get?: never;
2849
+ put?: never;
2850
+ post: operations["runEnd2EndFlow"];
2851
+ delete?: never;
2852
+ options?: never;
2853
+ head?: never;
2854
+ patch?: never;
2855
+ trace?: never;
2856
+ };
2857
+ "/api/v1/flows/{flowId}": {
2858
+ parameters: {
2859
+ query?: never;
2860
+ header?: never;
2861
+ path?: never;
2862
+ cookie?: never;
2863
+ };
2864
+ get: operations["retrieveFlow"];
2865
+ put?: never;
2866
+ post?: never;
2867
+ delete?: never;
2868
+ options?: never;
2869
+ head?: never;
2870
+ patch?: never;
2871
+ trace?: never;
2872
+ };
2873
+ "/api/v1/recent-flows": {
2874
+ parameters: {
2875
+ query?: never;
2876
+ header?: never;
2877
+ path?: never;
2878
+ cookie?: never;
2879
+ };
2880
+ get: operations["retrieveRecentFlows"];
2881
+ put?: never;
2882
+ post?: never;
2883
+ delete?: never;
2884
+ options?: never;
2885
+ head?: never;
2886
+ patch?: never;
2887
+ trace?: never;
2888
+ };
2889
+ "/api/v1/flows/{flowId}/data-insights": {
2890
+ parameters: {
2891
+ query?: never;
2892
+ header?: never;
2893
+ path?: never;
2894
+ cookie?: never;
2895
+ };
2896
+ get: operations["retrieveFlowDataInsights"];
2897
+ put?: never;
2898
+ post?: never;
2899
+ delete?: never;
2900
+ options?: never;
2901
+ head?: never;
2902
+ patch?: never;
2903
+ trace?: never;
2904
+ };
2905
+ "/api/v1/flows/{flowId}/data-reports": {
2906
+ parameters: {
2907
+ query?: never;
2908
+ header?: never;
2909
+ path?: never;
2910
+ cookie?: never;
2911
+ };
2912
+ get: operations["retrieveFlowDataReports"];
2913
+ put?: never;
2914
+ post?: never;
2915
+ delete?: never;
2916
+ options?: never;
2917
+ head?: never;
2918
+ patch?: never;
2919
+ trace?: never;
2920
+ };
2921
+ "/api/v1/data-reports/{report_id}/feedback": {
2922
+ parameters: {
2923
+ query?: never;
2924
+ header?: never;
2925
+ path?: never;
2926
+ cookie?: never;
2927
+ };
2928
+ get: operations["getDataReportFeedback"];
2929
+ put?: never;
2930
+ post: operations["upsertReportFeedback"];
2931
+ delete: operations["deleteReportFeedback"];
2932
+ options?: never;
2933
+ head?: never;
2934
+ patch?: never;
2935
+ trace?: never;
2936
+ };
2937
+ "/api/v1/flows/{flowId}/data-reports/last/status": {
2938
+ parameters: {
2939
+ query?: never;
2940
+ header?: never;
2941
+ path?: never;
2942
+ cookie?: never;
2943
+ };
2944
+ get: operations["retrieveLatestDataReportStatus"];
2945
+ put?: never;
2946
+ post?: never;
2947
+ delete?: never;
2948
+ options?: never;
2949
+ head?: never;
2950
+ patch?: never;
2951
+ trace?: never;
2952
+ };
2953
+ "/api/v1/data-reports/{report_id}/explainability": {
2954
+ parameters: {
2955
+ query?: never;
2956
+ header?: never;
2957
+ path?: never;
2958
+ cookie?: never;
2959
+ };
2960
+ get: operations["getDataReportExplainability"];
2961
+ put?: never;
2962
+ post?: never;
2963
+ delete?: never;
2964
+ options?: never;
2965
+ head?: never;
2966
+ patch?: never;
2967
+ trace?: never;
2968
+ };
2969
+ "/api/v1/timeline/bookmark": {
2970
+ parameters: {
2971
+ query?: never;
2972
+ header?: never;
2973
+ path?: never;
2974
+ cookie?: never;
2975
+ };
2976
+ get?: never;
2977
+ put?: never;
2978
+ post: operations["toggleBookmark"];
2979
+ delete?: never;
2980
+ options?: never;
2981
+ head?: never;
2982
+ patch?: never;
2983
+ trace?: never;
2984
+ };
2985
+ "/api/v1/data-tables/latest-refresh": {
2986
+ parameters: {
2987
+ query?: never;
2988
+ header?: never;
2989
+ path?: never;
2990
+ cookie?: never;
2991
+ };
2992
+ get: operations["retrieveLatestDataRefresh"];
2993
+ put?: never;
2994
+ post?: never;
2995
+ delete?: never;
2996
+ options?: never;
2997
+ head?: never;
2998
+ patch?: never;
2999
+ trace?: never;
3000
+ };
3001
+ "/api/v1/data-reports/{report_id}/export": {
3002
+ parameters: {
3003
+ query?: never;
3004
+ header?: never;
3005
+ path?: never;
3006
+ cookie?: never;
3007
+ };
3008
+ get: operations["exportReportData"];
3009
+ put?: never;
3010
+ post?: never;
3011
+ delete?: never;
3012
+ options?: never;
3013
+ head?: never;
3014
+ patch?: never;
3015
+ trace?: never;
3016
+ };
3017
+ "/api/v1/data-reports/{report_id}/columns": {
3018
+ parameters: {
3019
+ query?: never;
3020
+ header?: never;
3021
+ path?: never;
3022
+ cookie?: never;
3023
+ };
3024
+ get: operations["getDataReportColumns"];
3025
+ put?: never;
3026
+ post?: never;
3027
+ delete?: never;
3028
+ options?: never;
3029
+ head?: never;
3030
+ patch?: never;
3031
+ trace?: never;
3032
+ };
3033
+ "/api/v1/data-reports/{report_id}/data": {
3034
+ parameters: {
3035
+ query?: never;
3036
+ header?: never;
3037
+ path?: never;
3038
+ cookie?: never;
3039
+ };
3040
+ get: operations["getDataReportData"];
3041
+ put?: never;
3042
+ post?: never;
3043
+ delete?: never;
3044
+ options?: never;
3045
+ head?: never;
3046
+ patch?: never;
3047
+ trace?: never;
3048
+ };
3049
+ "/api/v1/data-reports/{report_id}/count": {
3050
+ parameters: {
3051
+ query?: never;
3052
+ header?: never;
3053
+ path?: never;
3054
+ cookie?: never;
3055
+ };
3056
+ get: operations["getDataReportRowCount"];
3057
+ put?: never;
3058
+ post?: never;
3059
+ delete?: never;
3060
+ options?: never;
3061
+ head?: never;
3062
+ patch?: never;
3063
+ trace?: never;
3064
+ };
3065
+ "/api/v1/data-reports/{report_id}/visualizations": {
3066
+ parameters: {
3067
+ query?: never;
3068
+ header?: never;
3069
+ path?: never;
3070
+ cookie?: never;
3071
+ };
3072
+ get: operations["getDataReportVisualizations"];
3073
+ put?: never;
3074
+ post?: never;
3075
+ delete?: never;
3076
+ options?: never;
3077
+ head?: never;
3078
+ patch?: never;
3079
+ trace?: never;
3080
+ };
3081
+ "/api/v1/chat/{flowId}/timeline": {
3082
+ parameters: {
3083
+ query?: never;
3084
+ header?: never;
3085
+ path?: never;
3086
+ cookie?: never;
3087
+ };
3088
+ get: operations["retrieveChatTimeline"];
3089
+ put?: never;
3090
+ post?: never;
3091
+ delete?: never;
3092
+ options?: never;
3093
+ head?: never;
3094
+ patch?: never;
3095
+ trace?: never;
3096
+ };
3097
+ "/api/v1/chat/{flowId}/messages": {
3098
+ parameters: {
3099
+ query?: never;
3100
+ header?: never;
3101
+ path?: never;
3102
+ cookie?: never;
3103
+ };
3104
+ get: operations["retrieveChatMessages"];
3105
+ put?: never;
3106
+ post?: never;
3107
+ delete?: never;
3108
+ options?: never;
3109
+ head?: never;
3110
+ patch?: never;
3111
+ trace?: never;
3112
+ };
3113
+ "/api/v1/chat/{flowId}/quick-actions": {
3114
+ parameters: {
3115
+ query?: never;
3116
+ header?: never;
3117
+ path?: never;
3118
+ cookie?: never;
3119
+ };
3120
+ get?: never;
3121
+ put?: never;
3122
+ post: {
3123
+ parameters: {
3124
+ query?: never;
3125
+ header: {
3126
+ "sp-access-token": string;
3127
+ "sp-refresh-token"?: string;
3128
+ };
3129
+ path: {
3130
+ flowId: string;
3131
+ };
3132
+ cookie?: never;
3133
+ };
3134
+ requestBody?: {
3135
+ content: {
3136
+ "application/json": {
3137
+ content: string;
3138
+ };
3139
+ };
3140
+ };
3141
+ responses: {
3142
+ /** @description The quick actions for the given message */
3143
+ 200: {
3144
+ headers: {
3145
+ [name: string]: unknown;
3146
+ };
3147
+ content: {
3148
+ "application/json": {
3149
+ label: string;
3150
+ explanation: string;
3151
+ }[];
3152
+ };
3153
+ };
3154
+ /** @description The provided content is invalid */
3155
+ 400: {
3156
+ headers: {
3157
+ [name: string]: unknown;
3158
+ };
3159
+ content: {
3160
+ "application/json": {
3161
+ error: string;
3162
+ };
3163
+ };
3164
+ };
3165
+ /** @description Unable to retrieve flow with this id */
3166
+ 404: {
3167
+ headers: {
3168
+ [name: string]: unknown;
3169
+ };
3170
+ content: {
3171
+ "application/json": {
3172
+ error: string;
3173
+ };
3174
+ };
3175
+ };
3176
+ /** @description Something wrong happened */
3177
+ 500: {
3178
+ headers: {
3179
+ [name: string]: unknown;
3180
+ };
3181
+ content: {
3182
+ "application/json": {
3183
+ error: string;
3184
+ };
3185
+ };
3186
+ };
3187
+ };
3188
+ };
3189
+ delete?: never;
3190
+ options?: never;
3191
+ head?: never;
3192
+ patch?: never;
3193
+ trace?: never;
3194
+ };
3195
+ "/api/v1/recommendations": {
3196
+ parameters: {
3197
+ query?: never;
3198
+ header?: never;
3199
+ path?: never;
3200
+ cookie?: never;
3201
+ };
3202
+ get: operations["getStarterRecommendations"];
3203
+ put?: never;
3204
+ post?: never;
3205
+ delete?: never;
3206
+ options?: never;
3207
+ head?: never;
3208
+ patch?: never;
3209
+ trace?: never;
3210
+ };
3211
+ "/api/v1/visualizations/{flowDataVisualizationId}": {
3212
+ parameters: {
3213
+ query?: never;
3214
+ header?: never;
3215
+ path?: never;
3216
+ cookie?: never;
3217
+ };
3218
+ get: operations["fetchVisualization"];
3219
+ put?: never;
3220
+ post?: never;
3221
+ delete?: never;
3222
+ options?: never;
3223
+ head?: never;
3224
+ patch?: never;
3225
+ trace?: never;
3226
+ };
3227
+ "/api/v1/flows/{flowId}/visualizations": {
3228
+ parameters: {
3229
+ query?: never;
3230
+ header?: never;
3231
+ path?: never;
3232
+ cookie?: never;
3233
+ };
3234
+ get: operations["listVisualizationsForFlow"];
3235
+ put?: never;
3236
+ post?: never;
3237
+ delete?: never;
3238
+ options?: never;
3239
+ head?: never;
3240
+ patch?: never;
3241
+ trace?: never;
3242
+ };
3243
+ "/api/v1/trigger-flow/": {
3244
+ parameters: {
3245
+ query?: never;
3246
+ header?: never;
3247
+ path?: never;
3248
+ cookie?: never;
3249
+ };
3250
+ get?: never;
3251
+ put?: never;
3252
+ post: operations["triggerFlow"];
3253
+ delete?: never;
3254
+ options?: never;
3255
+ head?: never;
3256
+ patch?: never;
3257
+ trace?: never;
3258
+ };
3259
+ "/api/v1/dashboard/{dashboardId}": {
3260
+ parameters: {
3261
+ query?: never;
3262
+ header?: never;
3263
+ path?: never;
3264
+ cookie?: never;
3265
+ };
3266
+ get: operations["retrieveDashboard"];
3267
+ put?: never;
3268
+ post?: never;
3269
+ delete?: never;
3270
+ options?: never;
3271
+ head?: never;
3272
+ patch?: never;
3273
+ trace?: never;
3274
+ };
3275
+ "/api/v1/admin-console/query-examples": {
3276
+ parameters: {
3277
+ query?: never;
3278
+ header?: never;
3279
+ path?: never;
3280
+ cookie?: never;
3281
+ };
3282
+ get?: never;
3283
+ put?: never;
3284
+ post: operations["createQueryExample"];
3285
+ delete?: never;
3286
+ options?: never;
3287
+ head?: never;
3288
+ patch?: never;
3289
+ trace?: never;
3290
+ };
3291
+ "/api/v1/admin-console/query-examples/{id}": {
3292
+ parameters: {
3293
+ query?: never;
3294
+ header?: never;
3295
+ path?: never;
3296
+ cookie?: never;
3297
+ };
3298
+ get?: never;
3299
+ put?: never;
3300
+ post?: never;
3301
+ delete?: never;
3302
+ options?: never;
3303
+ head?: never;
3304
+ patch: operations["updateQueryExample"];
3305
+ trace?: never;
3306
+ };
3307
+ "/api/v1/admin-console/sql/preview": {
3308
+ parameters: {
3309
+ query?: never;
3310
+ header?: never;
3311
+ path?: never;
3312
+ cookie?: never;
3313
+ };
3314
+ get?: never;
3315
+ put?: never;
3316
+ post: operations["sqlPreview"];
3317
+ delete?: never;
3318
+ options?: never;
3319
+ head?: never;
3320
+ patch?: never;
3321
+ trace?: never;
3322
+ };
3323
+ "/api/v1/admin-console/usage-insights/sankey": {
3324
+ parameters: {
3325
+ query?: never;
3326
+ header?: never;
3327
+ path?: never;
3328
+ cookie?: never;
3329
+ };
3330
+ get: operations["getSankeyData"];
3331
+ put?: never;
3332
+ post?: never;
3333
+ delete?: never;
3334
+ options?: never;
3335
+ head?: never;
3336
+ patch?: never;
3337
+ trace?: never;
3338
+ };
3339
+ }
3340
+
480
3341
  declare type PersistenceOptions = "queryParam" | "none";
481
3342
 
3343
+ declare type RemoveAuthHeader<PathSchema> = Simplify<{
3344
+ [Method in keyof PathSchema]: RemoveParams<PathSchema[Method], ToRemove>;
3345
+ }>;
3346
+
3347
+ declare type RemoveParams<MethodSchema, Config extends RemoveParamsConfig> = Simplify<MethodSchema extends {
3348
+ parameters: infer P;
3349
+ } ? Omit<MethodSchema, "parameters"> & {
3350
+ parameters: {
3351
+ header?: PatchParam<P, Config, "header">;
3352
+ query?: PatchParam<P, Config, "query">;
3353
+ path?: PatchParam<P, Config, "path">;
3354
+ cookie?: PatchParam<P, Config, "cookie">;
3355
+ };
3356
+ } : MethodSchema>;
3357
+
3358
+ declare type RemoveParamsConfig = Simplify<{
3359
+ header?: string;
3360
+ query?: string;
3361
+ path?: string;
3362
+ cookie?: string;
3363
+ }>;
3364
+
482
3365
  export declare const StandaloneConversationModal: React.FC<StandaloneConversationModalProps>;
483
3366
 
484
3367
  declare type StandaloneConversationModalProps = {
@@ -487,7 +3370,7 @@ declare type StandaloneConversationModalProps = {
487
3370
  onOpenChange?: (open: boolean) => void;
488
3371
  };
489
3372
 
490
- declare type StartFlowParam = {
3373
+ export declare type StartFlowParam = {
491
3374
  query: string;
492
3375
  } | {
493
3376
  triggerId: string;
@@ -500,6 +3383,223 @@ declare type StartOptions = DisplayControlProps & {
500
3383
  placeholders?: string[];
501
3384
  };
502
3385
 
3386
+ declare type ToRemove = Simplify<{
3387
+ header: "sp-access-token" | "sp-refresh-token";
3388
+ }>;
3389
+
3390
+ export declare const useDataReport: (flowDataId: FrontendReport["id"]) => {
3391
+ dataColumns: {
3392
+ name: string;
3393
+ data_type: string;
3394
+ dataType: string;
3395
+ renderType?: string;
3396
+ unit?: string;
3397
+ }[] | undefined;
3398
+ isPendingColumns: boolean;
3399
+ isPendingData: boolean;
3400
+ fetchNextPage: (options?: FetchNextPageOptions) => Promise<InfiniteQueryObserverResult<InfiniteData<Record<string, unknown>[], unknown>, Error>>;
3401
+ isFetching: boolean;
3402
+ isFetchingNextPage: boolean;
3403
+ hasNextPage: boolean;
3404
+ allData: Record<string, unknown>[];
3405
+ explainability: {
3406
+ sql_explanation?: {
3407
+ chunk_title: string;
3408
+ chunk_explanation: string;
3409
+ lines: {
3410
+ sql: string;
3411
+ explanation: string;
3412
+ }[];
3413
+ }[] | null;
3414
+ business_explanation?: {
3415
+ summary: string;
3416
+ implementation: string[];
3417
+ assumptions: {
3418
+ type: "grain" | "completeness" | "transformation" | "relationship" | "other";
3419
+ details: string;
3420
+ explanation: string;
3421
+ }[];
3422
+ } | null;
3423
+ columns_lineage?: {
3424
+ [key: string]: {
3425
+ nodes: {
3426
+ id: string;
3427
+ type: "entity" | "attribute" | "filter" | "process" | "combine" | "result";
3428
+ explanation: string;
3429
+ }[];
3430
+ edges: {
3431
+ source: string;
3432
+ target: string;
3433
+ }[];
3434
+ };
3435
+ } | null;
3436
+ confidence_score: number;
3437
+ confidence_score_reason: string;
3438
+ assumptions_score?: number;
3439
+ assumptions_score_reason?: string;
3440
+ friendliness_score?: number;
3441
+ friendliness_score_reason?: string;
3442
+ flow_data_id: number;
3443
+ } | null | undefined;
3444
+ totalRows: number;
3445
+ infiniteData: InfiniteData<Record<string, unknown>[], unknown> | undefined;
3446
+ };
3447
+
3448
+ export declare const useDownloadReportData: (options?: UseMutationOptions<ExportReportDataResult, Error, ExportReportDataParams>) => {
3449
+ download: UseMutateFunction<ExportReportDataResult, Error, ExportReportDataParams, unknown>;
3450
+ data: undefined;
3451
+ variables: undefined;
3452
+ error: null;
3453
+ isError: false;
3454
+ isIdle: true;
3455
+ isPending: false;
3456
+ isSuccess: false;
3457
+ status: "idle";
3458
+ mutate: UseMutateFunction<ExportReportDataResult, Error, ExportReportDataParams, unknown>;
3459
+ reset: () => void;
3460
+ context: unknown;
3461
+ failureCount: number;
3462
+ failureReason: Error | null;
3463
+ isPaused: boolean;
3464
+ submittedAt: number;
3465
+ mutateAsync: UseMutateAsyncFunction<ExportReportDataResult, Error, ExportReportDataParams, unknown>;
3466
+ } | {
3467
+ download: UseMutateFunction<ExportReportDataResult, Error, ExportReportDataParams, unknown>;
3468
+ data: undefined;
3469
+ variables: ExportReportDataParams;
3470
+ error: null;
3471
+ isError: false;
3472
+ isIdle: false;
3473
+ isPending: true;
3474
+ isSuccess: false;
3475
+ status: "pending";
3476
+ mutate: UseMutateFunction<ExportReportDataResult, Error, ExportReportDataParams, unknown>;
3477
+ reset: () => void;
3478
+ context: unknown;
3479
+ failureCount: number;
3480
+ failureReason: Error | null;
3481
+ isPaused: boolean;
3482
+ submittedAt: number;
3483
+ mutateAsync: UseMutateAsyncFunction<ExportReportDataResult, Error, ExportReportDataParams, unknown>;
3484
+ } | {
3485
+ download: UseMutateFunction<ExportReportDataResult, Error, ExportReportDataParams, unknown>;
3486
+ data: undefined;
3487
+ error: Error;
3488
+ variables: ExportReportDataParams;
3489
+ isError: true;
3490
+ isIdle: false;
3491
+ isPending: false;
3492
+ isSuccess: false;
3493
+ status: "error";
3494
+ mutate: UseMutateFunction<ExportReportDataResult, Error, ExportReportDataParams, unknown>;
3495
+ reset: () => void;
3496
+ context: unknown;
3497
+ failureCount: number;
3498
+ failureReason: Error | null;
3499
+ isPaused: boolean;
3500
+ submittedAt: number;
3501
+ mutateAsync: UseMutateAsyncFunction<ExportReportDataResult, Error, ExportReportDataParams, unknown>;
3502
+ } | {
3503
+ download: UseMutateFunction<ExportReportDataResult, Error, ExportReportDataParams, unknown>;
3504
+ data: ExportReportDataResult;
3505
+ error: null;
3506
+ variables: ExportReportDataParams;
3507
+ isError: false;
3508
+ isIdle: false;
3509
+ isPending: false;
3510
+ isSuccess: true;
3511
+ status: "success";
3512
+ mutate: UseMutateFunction<ExportReportDataResult, Error, ExportReportDataParams, unknown>;
3513
+ reset: () => void;
3514
+ context: unknown;
3515
+ failureCount: number;
3516
+ failureReason: Error | null;
3517
+ isPaused: boolean;
3518
+ submittedAt: number;
3519
+ mutateAsync: UseMutateAsyncFunction<ExportReportDataResult, Error, ExportReportDataParams, unknown>;
3520
+ };
3521
+
3522
+ export declare const useFlowDataInsights: (flowId: string, enabled?: boolean) => UseQueryResult< {
3523
+ count: false;
3524
+ data_reports: {
3525
+ status: string | null;
3526
+ title: string;
3527
+ id: number;
3528
+ created_at: string;
3529
+ bookmarked: boolean;
3530
+ flow_id: string;
3531
+ data_summary: {
3532
+ columns: Record<string, objectOutputType< {
3533
+ position: ZodOptional<ZodNumber>;
3534
+ data_type: ZodString;
3535
+ null_count: ZodNullable<ZodNumber>;
3536
+ unique_count: ZodNullable<ZodNumber>;
3537
+ unique_percentage: ZodNullable<ZodNumber>;
3538
+ }, ZodTypeAny, "passthrough">>;
3539
+ } & {
3540
+ [k: string]: unknown;
3541
+ };
3542
+ }[];
3543
+ visualizations: {
3544
+ id: number;
3545
+ flow_data_id: number;
3546
+ created_at: string;
3547
+ configuration: {
3548
+ type: "bar";
3549
+ title: string;
3550
+ xAxisLabel: string;
3551
+ yAxisLabel: string;
3552
+ valueColumns?: string[] | undefined;
3553
+ xAxisDataKey?: string | undefined;
3554
+ yAxisDataKey?: string | undefined;
3555
+ dimensionDataKey?: string | undefined;
3556
+ } | {
3557
+ type: "line/area";
3558
+ title: string;
3559
+ xAxisLabel: string;
3560
+ yAxisLabel: string;
3561
+ valueColumns?: string[] | undefined;
3562
+ xAxisDataKey?: string | undefined;
3563
+ yAxisDataKey?: string | undefined;
3564
+ dimensionDataKey?: string | undefined;
3565
+ } | {
3566
+ type: "scatter";
3567
+ title: string;
3568
+ xAxisLabel: string;
3569
+ yAxisLabel: string;
3570
+ valueColumns?: string[] | undefined;
3571
+ xAxisDataKey?: string | undefined;
3572
+ yAxisDataKey?: string | undefined;
3573
+ dimensionDataKey?: string | undefined;
3574
+ } | {
3575
+ type: "pie";
3576
+ title: string;
3577
+ nameKey: string;
3578
+ dataKey: string;
3579
+ };
3580
+ bookmarked: boolean;
3581
+ }[];
3582
+ }, Error>;
3583
+
3584
+ export declare const useFlowDataInsightsCount: (flowId: string) => UseQueryResult< {
3585
+ count: true;
3586
+ data_reports: number;
3587
+ visualizations: number;
3588
+ }, Error>;
3589
+
3590
+ export declare const useMageMetricsApiUrl: () => string;
3591
+
3592
+ export declare const useMageMetricsClient: () => MageMetricsClient | undefined;
3593
+
3594
+ export declare const useMageMetricsReady: () => false | MageMetricsClient | undefined;
3595
+
3596
+ export declare const useRecentFlows: (limit?: number) => UseQueryResult< {
3597
+ created_at: string;
3598
+ id: string;
3599
+ request: string;
3600
+ user_id: string | null;
3601
+ }[], Error>;
3602
+
503
3603
  export declare const useStartFlow: (options?: UseMutationOptions<string, Error, StartFlowParam>) => {
504
3604
  startFlow: UseMutateFunction<string, Error, StartFlowParam, unknown>;
505
3605
  startFlowAsync: UseMutateAsyncFunction<string, Error, StartFlowParam, unknown>;
@@ -578,6 +3678,12 @@ export declare const useStartFlow: (options?: UseMutationOptions<string, Error,
578
3678
  mutateAsync: UseMutateAsyncFunction<string, Error, StartFlowParam, unknown>;
579
3679
  };
580
3680
 
3681
+ export declare const Visualization: ForwardRefExoticComponent< {
3682
+ visualizationId: number;
3683
+ isFullWidth: boolean;
3684
+ withTitle: boolean;
3685
+ } & RefAttributes<HTMLDivElement>>;
3686
+
581
3687
  export { }
582
3688
 
583
3689