@databrainhq/plugin 0.11.38 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/ExternalMetricForm/index.d.ts +2 -2
- package/dist/components/MetricCreation/MetricCreation.d.ts +1 -1
- package/dist/components/MetricList/MetricList.d.ts +1 -2
- package/dist/components/MetricList/components/DownloadRawCsvModal/index.d.ts +1 -1
- package/dist/components/MetricList/components/FullScreenView/index.d.ts +1 -1
- package/dist/components/MetricList/components/MetricCards/MetricCard.d.ts +1 -1
- package/dist/components/MetricList/components/index.d.ts +0 -1
- package/dist/components/Table/index.d.ts +2 -1
- package/dist/consts/api.d.ts +37 -0
- package/dist/hooks/index.d.ts +0 -2
- package/dist/hooks/useApplyAdminTheme.d.ts +1 -2
- package/dist/hooks/useDashboardContext.d.ts +4 -4
- package/dist/hooks/useDownloadRawCsv.d.ts +6 -44
- package/dist/hooks/useEmbeddedMetric.d.ts +2 -3
- package/dist/hooks/useExternalMetric.d.ts +14 -3
- package/dist/hooks/useGenerateDatasetMetrics.d.ts +9 -11
- package/dist/hooks/useMetricCard.d.ts +1 -2
- package/dist/hooks/useNewEmbeddedDashboard.d.ts +4 -4
- package/dist/hooks/useScheduleEmail.d.ts +2 -11
- package/dist/queries/externalDashboard.mutation.d.ts +43 -0
- package/dist/queries/externalDashboard.query.d.ts +13 -0
- package/dist/queries/metric.mutation.d.ts +13 -0
- package/dist/queries/metric.query.d.ts +7 -0
- package/dist/types/app.d.ts +5 -0
- package/dist/types/metricCreate.d.ts +1 -1
- package/dist/types/queryTypes.d.ts +239 -0
- package/dist/utils/fetcher.d.ts +10 -1
- package/dist/utils/getChartAttributes.d.ts +2 -1
- package/dist/webcomponents.es.js +32083 -32473
- package/dist/webcomponents.umd.js +241 -575
- package/package.json +1 -2
- package/dist/components/MetricList/components/MetricCards/SingleValueCard.d.ts +0 -3
- package/dist/helpers/timesAgo.d.ts +0 -2
- package/dist/hooks/useEmbeddedDashboard.d.ts +0 -67
- package/dist/hooks/useGenerateEmbeddedMetric.d.ts +0 -15
- package/dist/utils/generated/graphql.d.ts +0 -4514
|
@@ -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
|
+
};
|
package/dist/utils/fetcher.d.ts
CHANGED
|
@@ -1 +1,10 @@
|
|
|
1
|
-
|
|
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;
|
|
@@ -9,8 +9,9 @@ type Params = {
|
|
|
9
9
|
isTimeSeries: boolean;
|
|
10
10
|
selectedFormat: string | undefined;
|
|
11
11
|
fillXAxis: boolean;
|
|
12
|
+
isDynamicXaxis: boolean;
|
|
12
13
|
};
|
|
13
|
-
export declare const getChartAttributes: ({ data, measure, singleValue, step, xAxis, yAxisList, seriesField, isTimeSeries, selectedFormat, fillXAxis, }: Params) => {
|
|
14
|
+
export declare const getChartAttributes: ({ data, measure, singleValue, step, xAxis, yAxisList, seriesField, isTimeSeries, selectedFormat, fillXAxis, isDynamicXaxis, }: Params) => {
|
|
14
15
|
labels: string[];
|
|
15
16
|
datasets: {
|
|
16
17
|
label: string;
|