@databrainhq/plugin 0.9.48 → 0.10.1
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/README.md +57 -1
- package/dist/components/Loader/index.d.ts +2 -0
- package/dist/components/MetricList/components/MetricCards/MetricCard.d.ts +4 -2
- package/dist/components/index.d.ts +1 -0
- package/dist/containers/Dashboard/Dashboard.d.ts +10 -5
- package/dist/containers/Dashboard/DashboardProvider.d.ts +2 -1
- package/dist/containers/Metric/EmbeddedMetric.d.ts +8 -0
- package/dist/containers/Metric/index.d.ts +19 -0
- package/dist/containers/PluginProvider.d.ts +7 -0
- package/dist/containers/index.d.ts +2 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/useEmbeddedDashboard.d.ts +5 -1
- package/dist/hooks/useEmbeddedMetric.d.ts +19 -0
- package/dist/hooks/useMetricCard.d.ts +1 -1
- package/dist/index.es.js +15413 -15235
- package/dist/index.umd.js +232 -216
- package/dist/style.css +1 -1
- package/dist/utils/generated/graphql.d.ts +64 -3
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UseQueryOptions, UseMutationOptions } from 'react-query';
|
|
2
2
|
export type Maybe<T> = T | null;
|
|
3
3
|
export type InputMaybe<T> = Maybe<T>;
|
|
4
4
|
export type Exact<T extends {
|
|
@@ -67,12 +67,28 @@ export type EmbeddedDashboardDataOutput = {
|
|
|
67
67
|
rlsSettings?: Maybe<Scalars['json']>;
|
|
68
68
|
workspace?: Maybe<Scalars['json']>;
|
|
69
69
|
};
|
|
70
|
+
export type EmbeddedMetricDataInput = {
|
|
71
|
+
guestToken: Scalars['String'];
|
|
72
|
+
metricId: Scalars['String'];
|
|
73
|
+
};
|
|
74
|
+
export type EmbeddedMetricDataOutput = {
|
|
75
|
+
__typename?: 'EmbeddedMetricDataOutput';
|
|
76
|
+
adminTheme?: Maybe<Scalars['json']>;
|
|
77
|
+
clientId?: Maybe<Scalars['String']>;
|
|
78
|
+
companyId?: Maybe<Scalars['String']>;
|
|
79
|
+
error?: Maybe<Error>;
|
|
80
|
+
externalMetric?: Maybe<Scalars['json']>;
|
|
81
|
+
params?: Maybe<Scalars['json']>;
|
|
82
|
+
sharingSettingsId?: Maybe<Scalars['String']>;
|
|
83
|
+
token?: Maybe<Scalars['String']>;
|
|
84
|
+
};
|
|
70
85
|
export type Error = {
|
|
71
86
|
__typename?: 'Error';
|
|
72
87
|
message: Scalars['String'];
|
|
73
88
|
};
|
|
74
89
|
export type ExternalMetricQueryInput = {
|
|
75
90
|
clientId?: InputMaybe<Scalars['String']>;
|
|
91
|
+
drillFilters?: InputMaybe<Scalars['json']>;
|
|
76
92
|
externalMetricId: Scalars['String'];
|
|
77
93
|
filterValues?: InputMaybe<Scalars['json']>;
|
|
78
94
|
globalFilters?: InputMaybe<Scalars['json']>;
|
|
@@ -1890,6 +1906,16 @@ export declare enum ExternalMetrics_Update_Column {
|
|
|
1890
1906
|
/** column name */
|
|
1891
1907
|
UpdatedAt = "updatedAt"
|
|
1892
1908
|
}
|
|
1909
|
+
export type GenerateDrillQueryInput = {
|
|
1910
|
+
baseQuery: Scalars['String'];
|
|
1911
|
+
database: Scalars['String'];
|
|
1912
|
+
filters: Scalars['json'];
|
|
1913
|
+
};
|
|
1914
|
+
export type GenerateDrillQueryOutput = {
|
|
1915
|
+
__typename?: 'generateDrillQueryOutput';
|
|
1916
|
+
error?: Maybe<Scalars['String']>;
|
|
1917
|
+
modifiedQuery?: Maybe<Scalars['String']>;
|
|
1918
|
+
};
|
|
1893
1919
|
/** columns and relationships of "guestTokens" */
|
|
1894
1920
|
export type GuestTokens = {
|
|
1895
1921
|
__typename?: 'guestTokens';
|
|
@@ -1988,6 +2014,7 @@ export type Mutation_Root = {
|
|
|
1988
2014
|
embeddedMetricQuery?: Maybe<ExternalMetricQueryOutput>;
|
|
1989
2015
|
fetchColumnData?: Maybe<FetchColumnDataOutput>;
|
|
1990
2016
|
generateDatasetMetrics?: Maybe<GenerateDatasetMetricsOutput>;
|
|
2017
|
+
generateDrillQuery?: Maybe<GenerateDrillQueryOutput>;
|
|
1991
2018
|
generateEmbeddedMetic?: Maybe<GenerateEmbeddedMeticOutput>;
|
|
1992
2019
|
generateExternalMetricQuery?: Maybe<GenerateExternalMetricQueryOutput>;
|
|
1993
2020
|
getUnderlyingData?: Maybe<GetUnderlyingDataOutput>;
|
|
@@ -2099,6 +2126,10 @@ export type Mutation_RootGenerateDatasetMetricsArgs = {
|
|
|
2099
2126
|
input: GenerateDatasetMetricsInput;
|
|
2100
2127
|
};
|
|
2101
2128
|
/** mutation root */
|
|
2129
|
+
export type Mutation_RootGenerateDrillQueryArgs = {
|
|
2130
|
+
input: GenerateDrillQueryInput;
|
|
2131
|
+
};
|
|
2132
|
+
/** mutation root */
|
|
2102
2133
|
export type Mutation_RootGenerateEmbeddedMeticArgs = {
|
|
2103
2134
|
input: GenerateEmbeddedMeticInput;
|
|
2104
2135
|
};
|
|
@@ -2379,6 +2410,8 @@ export type Query_Root = {
|
|
|
2379
2410
|
customSqlColumns: Array<CustomSqlColumns>;
|
|
2380
2411
|
/** fetch data from the table: "customSqlColumns" using primary key columns */
|
|
2381
2412
|
customSqlColumns_by_pk?: Maybe<CustomSqlColumns>;
|
|
2413
|
+
/** Gets the required data to embed individual metrics. */
|
|
2414
|
+
embeddedMetricData?: Maybe<EmbeddedMetricDataOutput>;
|
|
2382
2415
|
/** An array relationship */
|
|
2383
2416
|
externalDashboardMetrics: Array<ExternalDashboardMetrics>;
|
|
2384
2417
|
/** fetch data from the table: "externalDashboardMetrics" using primary key columns */
|
|
@@ -2500,6 +2533,9 @@ export type Query_RootCustomSqlColumnsArgs = {
|
|
|
2500
2533
|
export type Query_RootCustomSqlColumns_By_PkArgs = {
|
|
2501
2534
|
id: Scalars['uuid'];
|
|
2502
2535
|
};
|
|
2536
|
+
export type Query_RootEmbeddedMetricDataArgs = {
|
|
2537
|
+
input: EmbeddedMetricDataInput;
|
|
2538
|
+
};
|
|
2503
2539
|
export type Query_RootExternalDashboardMetricsArgs = {
|
|
2504
2540
|
distinct_on?: InputMaybe<Array<ExternalDashboardMetrics_Select_Column>>;
|
|
2505
2541
|
limit?: InputMaybe<Scalars['Int']>;
|
|
@@ -3338,6 +3374,27 @@ export type Uuid_Comparison_Exp = {
|
|
|
3338
3374
|
_neq?: InputMaybe<Scalars['uuid']>;
|
|
3339
3375
|
_nin?: InputMaybe<Array<Scalars['uuid']>>;
|
|
3340
3376
|
};
|
|
3377
|
+
export type GetEmbeddedMetricQueryVariables = Exact<{
|
|
3378
|
+
guestToken: Scalars['String'];
|
|
3379
|
+
metricId: Scalars['String'];
|
|
3380
|
+
}>;
|
|
3381
|
+
export type GetEmbeddedMetricQuery = {
|
|
3382
|
+
__typename?: 'query_root';
|
|
3383
|
+
embeddedMetricData?: {
|
|
3384
|
+
__typename?: 'EmbeddedMetricDataOutput';
|
|
3385
|
+
token?: string | null;
|
|
3386
|
+
params?: any | null;
|
|
3387
|
+
clientId?: string | null;
|
|
3388
|
+
companyId?: string | null;
|
|
3389
|
+
externalMetric?: any | null;
|
|
3390
|
+
adminTheme?: any | null;
|
|
3391
|
+
sharingSettingsId?: string | null;
|
|
3392
|
+
error?: {
|
|
3393
|
+
__typename?: 'Error';
|
|
3394
|
+
message: string;
|
|
3395
|
+
} | null;
|
|
3396
|
+
} | null;
|
|
3397
|
+
};
|
|
3341
3398
|
export type CreateExternalMetricMutationVariables = Exact<{
|
|
3342
3399
|
chartOptions?: InputMaybe<Scalars['jsonb']>;
|
|
3343
3400
|
companyId?: InputMaybe<Scalars['uuid']>;
|
|
@@ -3523,6 +3580,7 @@ export type EmbeddedDashboardMetricsQuery = {
|
|
|
3523
3580
|
rlsConditions: any;
|
|
3524
3581
|
clickActions: any;
|
|
3525
3582
|
drillDownSettings?: any | null;
|
|
3583
|
+
datasetMetricSettings?: any | null;
|
|
3526
3584
|
companyIntegration: {
|
|
3527
3585
|
__typename?: 'companyIntegrations';
|
|
3528
3586
|
name: string;
|
|
@@ -3788,6 +3846,7 @@ export type QueryExternalMetricQueryVariables = Exact<{
|
|
|
3788
3846
|
rlsConditions?: InputMaybe<Scalars['json']>;
|
|
3789
3847
|
filterValues?: InputMaybe<Scalars['json']>;
|
|
3790
3848
|
tenancyLevel?: InputMaybe<Scalars['String']>;
|
|
3849
|
+
drillFilters?: InputMaybe<Scalars['json']>;
|
|
3791
3850
|
}>;
|
|
3792
3851
|
export type QueryExternalMetricQuery = {
|
|
3793
3852
|
__typename?: 'query_root';
|
|
@@ -3937,6 +3996,8 @@ export type UpdateExternalMetricMutation = {
|
|
|
3937
3996
|
id: any;
|
|
3938
3997
|
} | null;
|
|
3939
3998
|
};
|
|
3999
|
+
export declare const GetEmbeddedMetricDocument = "\n query GetEmbeddedMetric($guestToken: String!, $metricId: String!) {\n embeddedMetricData(input: {guestToken: $guestToken, metricId: $metricId}) {\n token\n params\n clientId\n companyId\n externalMetric\n adminTheme\n sharingSettingsId\n error {\n message\n }\n }\n}\n ";
|
|
4000
|
+
export declare const useGetEmbeddedMetricQuery: <TData = GetEmbeddedMetricQuery, TError = unknown>(variables: GetEmbeddedMetricQueryVariables, options?: UseQueryOptions<GetEmbeddedMetricQuery, TError, TData, import("react-query").QueryKey> | undefined) => import("react-query").UseQueryResult<TData, TError>;
|
|
3940
4001
|
export declare const CreateExternalMetricDocument = "\n mutation CreateExternalMetric($chartOptions: jsonb = \"\", $companyId: uuid = \"\", $companyIntegrationId: uuid = \"\", $description: String = \"\", $inputFields: jsonb = \"\", $integrationName: String = \"\", $metricId: String = \"\", $metricQuery: String = \"\", $name: String = \"\", $outputColumns: String = \"\", $query: String = \"\", $isLive: Boolean, $clientId: String = \"\", $isCreatedByClient: Boolean = false, $createdBy: String = \"\", $timeGrain: String = \"\", $externalDashboardIds: [externalDashboardMetrics_insert_input!] = {}, $selectedGroupBy: jsonb = [], $isEnableGroupBy: Boolean = false, $groupBy: jsonb = {}) {\n insert_externalMetrics_one(\n object: {chartOptions: $chartOptions, companyId: $companyId, companyIntegrationId: $companyIntegrationId, description: $description, inputFields: $inputFields, integrationName: $integrationName, metricId: $metricId, metricQuery: $metricQuery, name: $name, outputColumns: $outputColumns, query: $query, isLive: $isLive, clientId: $clientId, isCreatedByClient: $isCreatedByClient, createdBy: $createdBy, timeGrain: $timeGrain, externalDashboardMetrics: {data: $externalDashboardIds}, selectedGroupBy: $selectedGroupBy, isEnableGroupBy: $isEnableGroupBy, groupBy: $groupBy}\n ) {\n id\n externalDashboardMetrics {\n externalDashboardId\n }\n }\n}\n ";
|
|
3941
4002
|
export declare const useCreateExternalMetricMutation: <TError = unknown, TContext = unknown>(options?: UseMutationOptions<CreateExternalMetricMutation, TError, Exact<{
|
|
3942
4003
|
chartOptions?: InputMaybe<Scalars['jsonb']>;
|
|
@@ -4039,7 +4100,7 @@ export declare const useCompanySubsetTableDataMutation: <TError = unknown, TCont
|
|
|
4039
4100
|
companyId?: InputMaybe<string> | undefined;
|
|
4040
4101
|
workspaceId?: InputMaybe<string> | undefined;
|
|
4041
4102
|
}>, TContext>;
|
|
4042
|
-
export declare const EmbeddedDashboardMetricsDocument = "\n query EmbeddedDashboardMetrics($externalDashboardId: String! = \"\", $clientId: String! = \"\") {\n externalDashboardMetrics(\n where: {externalDashboard: {externalDashboardId: {_eq: $externalDashboardId}}, externalMetric: {isArchived: {_eq: false}, isMarkedDeleted: {_eq: false}}, _not: {externalMetric: {clientDeletedMetrics: {clientId: {_eq: $clientId}}}}}\n ) {\n externalMetricId\n externalDashboardId\n externalMetric {\n chartOptions\n clientId\n companyId\n companyIntegrationId\n createdAt\n createdBy\n description\n id\n inputFields\n integrationName\n isCreatedByClient\n isLive\n metricId\n metricQuery\n name\n outputColumns\n query\n timeGrain\n updatedAt\n selectedGroupBy\n isEnableGroupBy\n groupBy\n resizeAttributes\n rlsConditions\n clickActions\n drillDownSettings\n companyIntegration {\n name\n workspaceId\n }\n }\n }\n}\n ";
|
|
4103
|
+
export declare const EmbeddedDashboardMetricsDocument = "\n query EmbeddedDashboardMetrics($externalDashboardId: String! = \"\", $clientId: String! = \"\") {\n externalDashboardMetrics(\n where: {externalDashboard: {externalDashboardId: {_eq: $externalDashboardId}}, externalMetric: {isArchived: {_eq: false}, isMarkedDeleted: {_eq: false}}, _not: {externalMetric: {clientDeletedMetrics: {clientId: {_eq: $clientId}}}}}\n ) {\n externalMetricId\n externalDashboardId\n externalMetric {\n chartOptions\n clientId\n companyId\n companyIntegrationId\n createdAt\n createdBy\n description\n id\n inputFields\n integrationName\n isCreatedByClient\n isLive\n metricId\n metricQuery\n name\n outputColumns\n query\n timeGrain\n updatedAt\n selectedGroupBy\n isEnableGroupBy\n groupBy\n resizeAttributes\n rlsConditions\n clickActions\n drillDownSettings\n companyIntegration {\n name\n workspaceId\n }\n datasetMetricSettings\n }\n }\n}\n ";
|
|
4043
4104
|
export declare const useEmbeddedDashboardMetricsQuery: <TData = EmbeddedDashboardMetricsQuery, TError = unknown>(variables?: EmbeddedDashboardMetricsQueryVariables, options?: UseQueryOptions<EmbeddedDashboardMetricsQuery, TError, TData, import("react-query").QueryKey> | undefined) => import("react-query").UseQueryResult<TData, TError>;
|
|
4044
4105
|
export declare const GetExternalDashboardClientThemeDocument = "\n query GetExternalDashboardClientTheme($companyId: uuid!, $clientId: String!) {\n externalDashboardThemes(\n where: {companyId: {_eq: $companyId}, externalDashboardThemeClients: {clientId: {_eq: $clientId}}}\n limit: 1\n ) {\n colors\n createdAt\n id\n name\n }\n}\n ";
|
|
4045
4106
|
export declare const useGetExternalDashboardClientThemeQuery: <TData = GetExternalDashboardClientThemeQuery, TError = unknown>(variables: GetExternalDashboardClientThemeQueryVariables, options?: UseQueryOptions<GetExternalDashboardClientThemeQuery, TError, TData, import("react-query").QueryKey> | undefined) => import("react-query").UseQueryResult<TData, TError>;
|
|
@@ -4163,7 +4224,7 @@ export declare const usePreviewTableMutation: <TError = unknown, TContext = unkn
|
|
|
4163
4224
|
integrationId?: InputMaybe<string> | undefined;
|
|
4164
4225
|
integrationName?: InputMaybe<string> | undefined;
|
|
4165
4226
|
}>, TContext>;
|
|
4166
|
-
export declare const QueryExternalMetricDocument = "\n query QueryExternalMetric($id: String = \"\", $clientId: String = \"\", $globalFilters: json = \"\", $rlsConditions: json = [], $filterValues: json = \"\", $tenancyLevel: String = \"\") {\n externalMetricQuery(\n input: {externalMetricId: $id, clientId: $clientId, globalFilters: $globalFilters, rlsConditions: $rlsConditions, filterValues: $filterValues, tenancyLevel: $tenancyLevel}\n ) {\n data\n timeTaken\n }\n}\n ";
|
|
4227
|
+
export declare const QueryExternalMetricDocument = "\n query QueryExternalMetric($id: String = \"\", $clientId: String = \"\", $globalFilters: json = \"\", $rlsConditions: json = [], $filterValues: json = \"\", $tenancyLevel: String = \"\", $drillFilters: json = []) {\n externalMetricQuery(\n input: {externalMetricId: $id, clientId: $clientId, globalFilters: $globalFilters, rlsConditions: $rlsConditions, filterValues: $filterValues, tenancyLevel: $tenancyLevel, drillFilters: $drillFilters}\n ) {\n data\n timeTaken\n }\n}\n ";
|
|
4167
4228
|
export declare const useQueryExternalMetricQuery: <TData = QueryExternalMetricQuery, TError = unknown>(variables?: QueryExternalMetricQueryVariables, options?: UseQueryOptions<QueryExternalMetricQuery, TError, TData, import("react-query").QueryKey> | undefined) => import("react-query").UseQueryResult<TData, TError>;
|
|
4168
4229
|
export declare const RawCsvDocument = "\n mutation RawCsv($companyId: String = \"\", $recipientAddress: String = \"\", $sqlQuery: String = \"\", $metricName: String = \"\", $workspaceId: String = \"\") {\n sendRawCsv(\n input: {companyId: $companyId, recipientAddress: $recipientAddress, sqlQuery: $sqlQuery, metricName: $metricName, workspaceId: $workspaceId}\n ) {\n status\n error {\n message\n }\n }\n}\n ";
|
|
4169
4230
|
export declare const useRawCsvMutation: <TError = unknown, TContext = unknown>(options?: UseMutationOptions<RawCsvMutation, TError, Exact<{
|