@databrainhq/plugin 0.11.37 → 0.11.39

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.
Files changed (36) hide show
  1. package/README.md +233 -233
  2. package/dist/components/ExternalMetricForm/index.d.ts +2 -2
  3. package/dist/components/MetricCreation/MetricCreation.d.ts +1 -1
  4. package/dist/components/MetricList/MetricList.d.ts +1 -2
  5. package/dist/components/MetricList/components/DownloadRawCsvModal/index.d.ts +1 -1
  6. package/dist/components/MetricList/components/FullScreenView/index.d.ts +1 -1
  7. package/dist/components/MetricList/components/MetricCards/MetricCard.d.ts +1 -1
  8. package/dist/components/MetricList/components/index.d.ts +0 -1
  9. package/dist/consts/api.d.ts +37 -0
  10. package/dist/helpers/groupBy.d.ts +4 -8
  11. package/dist/hooks/index.d.ts +0 -2
  12. package/dist/hooks/useApplyAdminTheme.d.ts +1 -2
  13. package/dist/hooks/useDashboardContext.d.ts +4 -4
  14. package/dist/hooks/useDownloadRawCsv.d.ts +6 -44
  15. package/dist/hooks/useEmbeddedMetric.d.ts +2 -3
  16. package/dist/hooks/useExternalMetric.d.ts +14 -3
  17. package/dist/hooks/useGenerateDatasetMetrics.d.ts +9 -11
  18. package/dist/hooks/useMetricCard.d.ts +1 -2
  19. package/dist/hooks/useNewEmbeddedDashboard.d.ts +4 -4
  20. package/dist/hooks/useScheduleEmail.d.ts +2 -11
  21. package/dist/queries/externalDashboard.mutation.d.ts +43 -0
  22. package/dist/queries/externalDashboard.query.d.ts +13 -0
  23. package/dist/queries/metric.mutation.d.ts +13 -0
  24. package/dist/queries/metric.query.d.ts +7 -0
  25. package/dist/types/metricCreate.d.ts +1 -1
  26. package/dist/types/queryTypes.d.ts +239 -0
  27. package/dist/utils/fetcher.d.ts +10 -1
  28. package/dist/webcomponents.es.js +27968 -28495
  29. package/dist/webcomponents.umd.js +235 -569
  30. package/package.json +107 -108
  31. package/src/index.ts +7 -7
  32. package/dist/components/MetricList/components/MetricCards/SingleValueCard.d.ts +0 -3
  33. package/dist/helpers/timesAgo.d.ts +0 -2
  34. package/dist/hooks/useEmbeddedDashboard.d.ts +0 -67
  35. package/dist/hooks/useGenerateEmbeddedMetric.d.ts +0 -15
  36. package/dist/utils/generated/graphql.d.ts +0 -4514
@@ -1,59 +1,21 @@
1
1
  import { FieldValues } from 'react-hook-form';
2
- import { ExternalMetrics } from '@/utils/generated/graphql';
3
2
  declare const useDownloadRawCsv: ({ onCloseModal, sharingSettingsId, filterValues, metricItem, }: {
4
3
  onCloseModal: (value: boolean) => void;
5
- metricItem?: ExternalMetrics | undefined;
4
+ metricItem?: Record<string, any> | undefined;
6
5
  filterValues?: Record<string, string> | undefined;
7
6
  sharingSettingsId?: string | undefined;
8
7
  }) => {
9
- isLoading: boolean;
10
- downloadCsvError: string;
11
- onSubmitDownloadCsv: ({ companyId, sqlQuery, values, clientName, tenancyType, metricName, workspaceId, }: {
8
+ onSumbitSendCsvUrl: ({ values, clientName, tenancyType, }: {
12
9
  values: FieldValues;
13
- sqlQuery: string;
14
- companyId: string;
15
10
  clientName?: string | undefined;
16
11
  tenancyType?: string | undefined;
17
- metricName?: string | undefined;
18
- workspaceId?: string | undefined;
19
12
  }) => void;
13
+ isDisableDownloadSettings: boolean;
14
+ downloadCsvError: string;
20
15
  handleSubmit: import("react-hook-form").UseFormHandleSubmit<FieldValues>;
16
+ isLoading: boolean;
21
17
  register: import("react-hook-form").UseFormRegister<FieldValues>;
22
- csvDownloadUrls: {
23
- urls: string[];
24
- lastUpdatedAt: string;
25
- isExpired: boolean;
26
- error: string | null | undefined;
27
- expireUrlIn: number;
28
- status: string;
29
- } | {
30
- urls: never[];
31
- lastUpdatedAt: number;
32
- isExpired: boolean;
33
- error: null;
34
- expireUrlIn: number;
35
- status: string;
36
- };
37
- handleDownload: (url: string) => void;
38
- csvDownloadUrlError: string;
39
- saveRawCsvDetails: ({ clientName, tenancyType, expirationMinutes, onSuccess, }: {
40
- onSuccess: () => void;
41
- expirationMinutes: number;
42
- clientName?: string | undefined;
43
- tenancyType?: string | undefined;
44
- }) => void;
45
- onRequestToDownload: ({ clientName, tenancyType, requestStatus, }: {
46
- requestStatus: string;
47
- clientName?: string | undefined;
48
- tenancyType?: string | undefined;
49
- }) => void;
50
- setValue: import("react-hook-form").UseFormSetValue<FieldValues>;
51
18
  control: import("react-hook-form").Control<FieldValues, any>;
52
- onSumbitSendCsvUrl: ({ values, clientName, tenancyType, }: {
53
- values: FieldValues;
54
- clientName?: string | undefined;
55
- tenancyType?: string | undefined;
56
- }) => void;
57
- isDisableDownloadSettings: boolean;
19
+ setValue: import("react-hook-form").UseFormSetValue<FieldValues>;
58
20
  };
59
21
  export default useDownloadRawCsv;
@@ -1,10 +1,9 @@
1
- import { ExternalMetrics } from '@/utils/generated/graphql';
2
1
  export interface UseEmbeddedMetricProps {
3
2
  token: string;
4
3
  metricId: string;
5
4
  }
6
5
  export declare const useEmbeddedMetric: ({ token, metricId, }: UseEmbeddedMetricProps) => {
7
- externalMetric: ExternalMetrics | undefined;
6
+ externalMetric: any;
8
7
  sharingSettingsId: string;
9
8
  adminColors: string[] | null;
10
9
  companyId: string;
@@ -15,5 +14,5 @@ export declare const useEmbeddedMetric: ({ token, metricId, }: UseEmbeddedMetric
15
14
  } | undefined;
16
15
  tenancyLevel: any;
17
16
  isLoading: boolean;
18
- errorMsg: string | undefined;
17
+ errorMsg: any;
19
18
  };
@@ -1,5 +1,4 @@
1
1
  import { FieldValues } from 'react-hook-form';
2
- import { ExternalMetrics } from '@/utils/generated/graphql';
3
2
  import { DashboardType, GroupBy, RlsFilterObjectType, SelectedColumns, ChartSettingsType } from '@/types/app';
4
3
  import { DatasetSettings } from '@/types';
5
4
  type Params = {
@@ -23,13 +22,25 @@ type Params = {
23
22
  isEnableGroupBy: boolean;
24
23
  selectedGroupBy: string[];
25
24
  groupBy: GroupBy | undefined;
26
- metric?: ExternalMetrics;
25
+ metric?: Record<string, any>;
27
26
  datasetMetricSettings?: DatasetSettings;
28
27
  };
29
- export declare const useExternalMetric: ({ onSuccess, companyIntegrationId, selectedColumns, query, metricQuery, integrationName, outputColumns, chartSettings, clientId, companyId, isLiveMode, timeGrain, dashboardIds, isEnableGroupBy, groupBy, selectedGroupBy, userProvidedDashboardId, metric, datasetMetricSettings, }: Params) => {
28
+ export declare const useExternalMetric: ({ onSuccess, companyIntegrationId, selectedColumns, query, metricQuery, integrationName, outputColumns, chartSettings, clientId, companyId, isLiveMode, timeGrain, dashboardIds, isEnableGroupBy, groupBy, selectedGroupBy, metric, datasetMetricSettings, }: Params) => {
30
29
  createExternalMetric: (data: FieldValues) => void;
31
30
  updateExternalMetric: (data: FieldValues) => void;
32
31
  error: string;
33
32
  isLoading: boolean;
33
+ clientSubsetData: any;
34
+ previewTable: import("react-query").UseMutateFunction<{
35
+ data: unknown;
36
+ }, unknown, {
37
+ data: import("../types/queryTypes").UsePreviewTableMutationInputType;
38
+ token: string;
39
+ }, unknown>;
40
+ token: string | undefined;
41
+ dashboardOptions: {
42
+ value: any;
43
+ label: any;
44
+ }[];
34
45
  };
35
46
  export {};
@@ -1,15 +1,13 @@
1
1
  export declare const useGenerateDatasetMetrics: () => {
2
- generateDatasetMetric: import("react-query").UseMutateFunction<import("@/utils/generated/graphql").GenerateDatasetMetricsMutation, unknown, import("@/utils/generated/graphql").Exact<{
3
- userInputs?: any;
4
- integrationName?: import("@/utils/generated/graphql").InputMaybe<string> | undefined;
5
- integrationId?: import("@/utils/generated/graphql").InputMaybe<string> | undefined;
6
- }>, unknown>;
2
+ generateDatasetMetric: import("react-query").UseMutateFunction<{
3
+ data: unknown;
4
+ }, unknown, {
5
+ data: import("../types/queryTypes").UseGenerateMetricMutationInputType;
6
+ token: string;
7
+ }, unknown>;
7
8
  isGeneratingDataset: boolean;
8
9
  generateError: unknown;
9
- fetchColumnValues: import("react-query").UseMutateFunction<import("@/utils/generated/graphql").FetchColumnDataMutation, unknown, import("@/utils/generated/graphql").Exact<{
10
- tableName?: import("@/utils/generated/graphql").InputMaybe<string> | undefined;
11
- columnName?: import("@/utils/generated/graphql").InputMaybe<string> | undefined;
12
- wId?: import("@/utils/generated/graphql").InputMaybe<string> | undefined;
13
- filter?: any;
14
- }>, unknown>;
10
+ fetchColumnValues: import("react-query").UseMutateFunction<{
11
+ data: unknown;
12
+ }, unknown, import("../types/queryTypes").UseMetricColumnMutationInputType, unknown>;
15
13
  };
@@ -1,9 +1,8 @@
1
1
  /// <reference types="react" />
2
2
  import { ChartSettingsType, FloatingDropDownOption, RlsCondition, DatasetSettings } from '@/types';
3
- import { ExternalMetrics } from '@/utils/generated/graphql';
4
3
  import { MetricCardProps } from '@/components';
5
4
  type UseMetricCardProps = {
6
- metric: ExternalMetrics;
5
+ metric: Record<string, any>;
7
6
  chartSettings: ChartSettingsType;
8
7
  setChartSettings: React.Dispatch<React.SetStateAction<ChartSettingsType>>;
9
8
  clientId: string;
@@ -1,4 +1,3 @@
1
- import { ExternalDashboardMetrics, ExternalDashboards, Themes } from '@/utils/generated/graphql';
2
1
  declare const useNewEmbeddedDashboard: ({ token, dashboardId, }: {
3
2
  token: string;
4
3
  dashboardId?: string | undefined;
@@ -6,8 +5,8 @@ declare const useNewEmbeddedDashboard: ({ token, dashboardId, }: {
6
5
  isLoading: boolean;
7
6
  error: string | undefined;
8
7
  data: {
9
- externalDashboard: ExternalDashboards;
10
- externalDashboardMetrics: ExternalDashboardMetrics[];
8
+ externalDashboard: any;
9
+ externalDashboardMetrics: any;
11
10
  isAllowedToChangeLayout: boolean;
12
11
  isAllowedToCreateMetrics: boolean;
13
12
  isAllowedToDeleteMetrics: boolean;
@@ -18,8 +17,9 @@ declare const useNewEmbeddedDashboard: ({ token, dashboardId, }: {
18
17
  rlsSettings: any;
19
18
  appFilters: any;
20
19
  sharingSettingsId: string;
21
- adminTheme: Themes;
20
+ adminTheme: any;
22
21
  companyTenancyType: string;
22
+ clientSubsetData: import("@/types/queryTypes").ClientSubsetData | undefined;
23
23
  };
24
24
  };
25
25
  export default useNewEmbeddedDashboard;
@@ -14,23 +14,14 @@ declare const useScheduleEmail: ({ onCancel }: Params) => {
14
14
  dashboardName: string;
15
15
  chartOptions: {
16
16
  value: any;
17
- label: string;
17
+ label: any;
18
18
  }[];
19
19
  onSave: (e?: import("react").BaseSyntheticEvent<object, any, any> | undefined) => Promise<void>;
20
20
  isLoading: boolean;
21
21
  isSuccess: boolean;
22
22
  error: string;
23
23
  isLoadingData: boolean;
24
- scheduleReportConfig: {
25
- __typename?: "scheduleEmailReports" | undefined;
26
- externalDashboardId: any;
27
- guestToken: any;
28
- nextScheduledAt: string;
29
- sharingSettingsId: any;
30
- subject: string;
31
- timeConfigurations: any;
32
- id: any;
33
- } | undefined;
24
+ scheduleReportConfig: any;
34
25
  onDelete: (e?: import("react").BaseSyntheticEvent<object, any, any> | undefined) => Promise<void>;
35
26
  isDeleted: boolean;
36
27
  };
@@ -0,0 +1,43 @@
1
+ import { UseCreateMetricMutationInputType, UseDeleteDashboardScheduleReportMutationInputType, UseGenerateMetricMutationInputType, UsePreviewTableMutationInputType, UseSaveDashboardLayoutMutationInputType, UseSaveDashboardScheduleReportMutationInputType, UseUpdateAdminMetricMutationInputType, UseUpdateMetricMutationInputType } from '@/types/queryTypes';
2
+ export declare const useSaveDashboardLayoutMutation: () => import("react-query").UseMutationResult<{
3
+ data: unknown;
4
+ }, unknown, UseSaveDashboardLayoutMutationInputType, unknown>;
5
+ export declare const useSaveDashboardScheduleReportMutation: () => import("react-query").UseMutationResult<{
6
+ data: unknown;
7
+ }, unknown, {
8
+ data: UseSaveDashboardScheduleReportMutationInputType;
9
+ token: string;
10
+ }, unknown>;
11
+ export declare const useDeleteDashboardScheduleReportMutation: () => import("react-query").UseMutationResult<{
12
+ data: unknown;
13
+ }, unknown, UseDeleteDashboardScheduleReportMutationInputType, unknown>;
14
+ export declare const useCreateMetricMutation: () => import("react-query").UseMutationResult<{
15
+ data: unknown;
16
+ }, unknown, {
17
+ data: UseCreateMetricMutationInputType;
18
+ token: string;
19
+ }, unknown>;
20
+ export declare const useUpdateMetricMutation: () => import("react-query").UseMutationResult<{
21
+ data: unknown;
22
+ }, unknown, {
23
+ data: UseUpdateMetricMutationInputType;
24
+ token: string;
25
+ }, unknown>;
26
+ export declare const useUpdateAdminMetricMutation: () => import("react-query").UseMutationResult<{
27
+ data: unknown;
28
+ }, unknown, {
29
+ data: UseUpdateAdminMetricMutationInputType;
30
+ token: string;
31
+ }, unknown>;
32
+ export declare const useGenerateMetricMutation: () => import("react-query").UseMutationResult<{
33
+ data: unknown;
34
+ }, unknown, {
35
+ data: UseGenerateMetricMutationInputType;
36
+ token: string;
37
+ }, unknown>;
38
+ export declare const usePreviewTableMutation: () => import("react-query").UseMutationResult<{
39
+ data: unknown;
40
+ }, unknown, {
41
+ data: UsePreviewTableMutationInputType;
42
+ token: string;
43
+ }, unknown>;
@@ -0,0 +1,13 @@
1
+ import { UseDashboardDataQueryInputType } from '@/types/queryTypes';
2
+ export declare const useDashboardDataQuery: ({ token, dashboardId, }: UseDashboardDataQueryInputType) => import("react-query").UseQueryResult<{
3
+ data: unknown;
4
+ }, unknown>;
5
+ export declare const useDashboardLayoutQuery: (dashboardId: string, clientId: string) => import("react-query").UseQueryResult<{
6
+ data: unknown;
7
+ }, unknown>;
8
+ export declare const useDashboardScheduledReportQuery: (token: string) => import("react-query").UseQueryResult<{
9
+ data: unknown;
10
+ }, unknown>;
11
+ export declare const useEmbeddedMetricQuery: (token: string, id: string) => import("react-query").UseQueryResult<{
12
+ data: unknown;
13
+ }, unknown>;
@@ -0,0 +1,13 @@
1
+ import { UseMetricColumnMutationInputType, UseMetricUnderlyingDataMutationInputType, UseMetricShareCsvMutationInputType, UseMarkArchivedMutationInputType } from '@/types/queryTypes';
2
+ export declare const useMetricColumnMutation: () => import("react-query").UseMutationResult<{
3
+ data: unknown;
4
+ }, unknown, UseMetricColumnMutationInputType, unknown>;
5
+ export declare const useMetricUnderlyingDataMutation: () => import("react-query").UseMutationResult<{
6
+ data: unknown;
7
+ }, unknown, UseMetricUnderlyingDataMutationInputType, unknown>;
8
+ export declare const useMetricShareCsvMutation: () => import("react-query").UseMutationResult<{
9
+ data: unknown;
10
+ }, unknown, UseMetricShareCsvMutationInputType, unknown>;
11
+ export declare const useMarkArchivedMutation: () => import("react-query").UseMutationResult<{
12
+ data: unknown;
13
+ }, unknown, UseMarkArchivedMutationInputType, unknown>;
@@ -0,0 +1,7 @@
1
+ import { UseMetricQueryQueryInputType } from '@/types/queryTypes';
2
+ export declare const useMetricDataQuery: (data: UseMetricQueryQueryInputType) => import("react-query").UseQueryResult<{
3
+ data: unknown;
4
+ }, unknown>;
5
+ export declare const useMetricRawDownloadSettingsQuery: (workspaceId: string) => import("react-query").UseQueryResult<{
6
+ data: unknown;
7
+ }, unknown>;
@@ -1,6 +1,6 @@
1
1
  import { Dispatch, SetStateAction } from 'react';
2
2
  import { RlsCondition, FloatingDropDownOption, ChartSettingsType } from './app';
3
- import { ExternalMetrics } from '@/utils/generated/graphql';
3
+ import { ExternalMetrics } from '@/types/queryTypes';
4
4
  type ColumnData = {
5
5
  name: string;
6
6
  datatype: string;
@@ -0,0 +1,239 @@
1
+ export type UseDashboardDataQueryInputType = {
2
+ token: string;
3
+ dashboardId?: string;
4
+ };
5
+ export type ClientSubsetData = {
6
+ companyIntegrationId?: string | null;
7
+ dbName?: string | null;
8
+ error?: {
9
+ message: string;
10
+ } | null;
11
+ tableList?: {
12
+ tableName: string;
13
+ clientColumn?: string | null;
14
+ columns?: {
15
+ datatype: string;
16
+ name: string;
17
+ as: string;
18
+ }[] | null;
19
+ }[] | null;
20
+ } | null;
21
+ export type UseDashboardDataQueryOutputType = {
22
+ externalDashboard?: any | null;
23
+ isAllowedToChangeLayout?: boolean | null;
24
+ isAllowedToCreateMetrics?: boolean | null;
25
+ isAllowedToDeleteMetrics?: boolean | null;
26
+ isAllowedToUpdateMetrics?: boolean | null;
27
+ adminTheme?: any | null;
28
+ clientId?: string | null;
29
+ companyId?: string | null;
30
+ companyTenancyType?: string | null;
31
+ externalMetrics?: (any | null)[] | null;
32
+ rlsSettings?: any | null;
33
+ appFilters?: any | null;
34
+ workspace?: any | null;
35
+ sharingSettingsId?: string | null;
36
+ error?: {
37
+ message: string;
38
+ } | null;
39
+ clientSubsetData?: ClientSubsetData;
40
+ } | null;
41
+ export type UseMetricQueryQueryInputType = {
42
+ id?: string;
43
+ clientId?: string;
44
+ globalFilters?: Record<string, any>;
45
+ rlsConditions?: any[];
46
+ filterValues?: Record<string, any>;
47
+ tenancyLevel?: string;
48
+ drillFilters?: any[];
49
+ limit?: number;
50
+ offset?: number;
51
+ };
52
+ export type UseMetricQueryQueryOutputType = {
53
+ data?: any | null;
54
+ timeTaken?: number | null;
55
+ totalRecords?: number | null;
56
+ metaData?: any | null;
57
+ };
58
+ export type UseMetricColumnMutationInputType = {
59
+ tableName?: string;
60
+ columnName?: string;
61
+ wId?: string;
62
+ filter?: Record<string, any>;
63
+ };
64
+ export type UseMetricUnderlyingDataMutationInputType = {
65
+ columnName?: string;
66
+ companyId?: string;
67
+ query?: string;
68
+ value?: any;
69
+ workspaceId?: string;
70
+ metricId?: string;
71
+ };
72
+ export type UseMetricShareCsvMutationInputType = {
73
+ configurations?: Record<string, any>;
74
+ emails?: string[];
75
+ expireCsvFileAt?: string;
76
+ expireUrlIn?: number;
77
+ externalMetricId?: string;
78
+ integrationId?: string;
79
+ integrationName?: string;
80
+ query?: string;
81
+ sharingSettingsId?: string;
82
+ subject?: string;
83
+ };
84
+ export type UseSaveDashboardLayoutMutationInputType = {
85
+ clientId: string;
86
+ externalDashboardId: string;
87
+ layout: any[];
88
+ isLocked?: boolean;
89
+ };
90
+ export type UseDeleteDashboardScheduleReportMutationInputType = {
91
+ token: string;
92
+ id: string;
93
+ };
94
+ export type UseSaveDashboardScheduleReportMutationInputType = {
95
+ emails?: any;
96
+ externalDashboardId?: string;
97
+ guestToken?: string;
98
+ nextScheduledAt?: string;
99
+ sharingSettingsId?: string;
100
+ subject?: string;
101
+ timeConfigurations?: any;
102
+ data?: any;
103
+ };
104
+ export type UseMarkArchivedMutationInputType = {
105
+ id?: string;
106
+ clientId?: string;
107
+ };
108
+ export type ExternalMetricsInsertInput = {
109
+ chartOptions?: any;
110
+ clientDeletedMetrics?: any;
111
+ clientId?: string;
112
+ companyId?: string;
113
+ companyIntegrationId?: string;
114
+ createdAt?: string;
115
+ createdBy?: string;
116
+ datasetMetricSettings?: any;
117
+ description?: string;
118
+ drillDownSettings?: any;
119
+ externalDashboardMetrics?: any;
120
+ externalMetricRawCsvUrl?: any;
121
+ externalMetricsRlsFilters?: any;
122
+ groupBy?: any;
123
+ inputFields?: any;
124
+ integrationName?: string;
125
+ isCreatedByClient?: boolean;
126
+ isEnableGroupBy?: boolean;
127
+ isLive?: boolean;
128
+ metricId?: string;
129
+ metricQuery?: string;
130
+ name?: string;
131
+ outputColumns?: string;
132
+ query?: string;
133
+ resizeAttributes?: any;
134
+ scheduleEmailReportCharts?: any;
135
+ selectedGroupBy?: any;
136
+ timeGrain?: string;
137
+ updatedAt?: string;
138
+ };
139
+ export type UseUpdateAdminMetricMutationInputType = {
140
+ externalMetricId: string;
141
+ object: ExternalMetricsInsertInput;
142
+ clientId: string;
143
+ };
144
+ export type ExternalMetricsSetInput = {
145
+ chartOptions?: any;
146
+ description?: string;
147
+ metricId?: string;
148
+ name?: string;
149
+ resizeAttributes?: any;
150
+ updatedAt?: any;
151
+ };
152
+ export type UseUpdateMetricMutationInputType = {
153
+ externalMetricId: string;
154
+ set: ExternalMetricsSetInput;
155
+ };
156
+ export type UsePreviewTableMutationInputType = {
157
+ tableName?: string;
158
+ limit?: number;
159
+ integrationId?: string;
160
+ integrationName?: string;
161
+ };
162
+ export type UseGenerateMetricMutationInputType = {
163
+ userInputs?: any;
164
+ integrationName?: string;
165
+ integrationId?: string;
166
+ };
167
+ export type UseCreateMetricMutationInputType = {
168
+ chartOptions?: any;
169
+ companyId?: string;
170
+ companyIntegrationId?: string;
171
+ description?: string;
172
+ inputFields?: any;
173
+ integrationName?: string;
174
+ metricId?: string;
175
+ metricQuery?: string;
176
+ name?: string;
177
+ outputColumns?: string;
178
+ query?: string;
179
+ isLive?: boolean;
180
+ clientId?: string | null;
181
+ isCreatedByClient?: boolean;
182
+ createdBy?: string;
183
+ timeGrain?: string | null;
184
+ externalDashboardIds?: any;
185
+ selectedGroupBy?: any;
186
+ isEnableGroupBy?: boolean;
187
+ datasetMetricSettings?: any;
188
+ groupBy?: any;
189
+ };
190
+ export type CompanyIntegrations = {
191
+ companyId: string;
192
+ companyWorkspace: any;
193
+ customSqlColumns: any;
194
+ externalMetrics: any;
195
+ id: string;
196
+ integrationId: string;
197
+ name: string;
198
+ workspaceId: string;
199
+ };
200
+ export type ExternalMetrics = {
201
+ chartOptions: any;
202
+ clickActions: any;
203
+ clientDeletedMetrics: any;
204
+ clientId?: string;
205
+ companyId: string;
206
+ companyIntegration: CompanyIntegrations;
207
+ companyIntegrationId: string;
208
+ createdAt: string;
209
+ createdBy?: string;
210
+ datasetMetricSettings?: any;
211
+ description: string;
212
+ drillDownSettings?: any;
213
+ /** An array relationship */
214
+ externalDashboardMetrics: any;
215
+ /** An object relationship */
216
+ externalMetricRawCsvUrl?: any;
217
+ /** An array relationship */
218
+ externalMetricsRlsFilters: any;
219
+ groupBy: any;
220
+ id: string;
221
+ inputFields?: any;
222
+ integrationName: string;
223
+ isArchived: boolean;
224
+ isCreatedByClient: boolean;
225
+ isEnableGroupBy: boolean;
226
+ isLive: boolean;
227
+ isMarkedDeleted: boolean;
228
+ metricId: string;
229
+ metricQuery?: string;
230
+ name: string;
231
+ outputColumns?: string;
232
+ query: string;
233
+ resizeAttributes: any;
234
+ rlsConditions: any;
235
+ scheduleEmailReportCharts: any;
236
+ selectedGroupBy: any;
237
+ timeGrain?: string;
238
+ updatedAt: string;
239
+ };
@@ -1 +1,10 @@
1
- export declare const fetcher: <TData, TVariables>(query: string, variables?: TVariables | undefined, options?: RequestInit['headers']) => () => Promise<TData>;
1
+ type ApiResponse<T> = {
2
+ data: T;
3
+ };
4
+ type FetcherOptions = {
5
+ method: 'GET' | 'POST';
6
+ token?: string;
7
+ data?: object;
8
+ };
9
+ declare const fetcher: <T>(url: string, options?: FetcherOptions) => Promise<ApiResponse<T>>;
10
+ export default fetcher;