@databrainhq/plugin 0.9.48 → 0.10.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/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 +4 -1
- package/dist/hooks/useEmbeddedMetric.d.ts +19 -0
- package/dist/index.es.js +15774 -15604
- package/dist/index.umd.js +159 -144
- package/dist/style.css +1 -1
- package/dist/utils/generated/graphql.d.ts +44 -1
- 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,6 +67,21 @@ 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'];
|
|
@@ -2379,6 +2394,8 @@ export type Query_Root = {
|
|
|
2379
2394
|
customSqlColumns: Array<CustomSqlColumns>;
|
|
2380
2395
|
/** fetch data from the table: "customSqlColumns" using primary key columns */
|
|
2381
2396
|
customSqlColumns_by_pk?: Maybe<CustomSqlColumns>;
|
|
2397
|
+
/** Gets the required data to embed individual metrics. */
|
|
2398
|
+
embeddedMetricData?: Maybe<EmbeddedMetricDataOutput>;
|
|
2382
2399
|
/** An array relationship */
|
|
2383
2400
|
externalDashboardMetrics: Array<ExternalDashboardMetrics>;
|
|
2384
2401
|
/** fetch data from the table: "externalDashboardMetrics" using primary key columns */
|
|
@@ -2500,6 +2517,9 @@ export type Query_RootCustomSqlColumnsArgs = {
|
|
|
2500
2517
|
export type Query_RootCustomSqlColumns_By_PkArgs = {
|
|
2501
2518
|
id: Scalars['uuid'];
|
|
2502
2519
|
};
|
|
2520
|
+
export type Query_RootEmbeddedMetricDataArgs = {
|
|
2521
|
+
input: EmbeddedMetricDataInput;
|
|
2522
|
+
};
|
|
2503
2523
|
export type Query_RootExternalDashboardMetricsArgs = {
|
|
2504
2524
|
distinct_on?: InputMaybe<Array<ExternalDashboardMetrics_Select_Column>>;
|
|
2505
2525
|
limit?: InputMaybe<Scalars['Int']>;
|
|
@@ -3338,6 +3358,27 @@ export type Uuid_Comparison_Exp = {
|
|
|
3338
3358
|
_neq?: InputMaybe<Scalars['uuid']>;
|
|
3339
3359
|
_nin?: InputMaybe<Array<Scalars['uuid']>>;
|
|
3340
3360
|
};
|
|
3361
|
+
export type GetEmbeddedMetricQueryVariables = Exact<{
|
|
3362
|
+
guestToken: Scalars['String'];
|
|
3363
|
+
metricId: Scalars['String'];
|
|
3364
|
+
}>;
|
|
3365
|
+
export type GetEmbeddedMetricQuery = {
|
|
3366
|
+
__typename?: 'query_root';
|
|
3367
|
+
embeddedMetricData?: {
|
|
3368
|
+
__typename?: 'EmbeddedMetricDataOutput';
|
|
3369
|
+
token?: string | null;
|
|
3370
|
+
params?: any | null;
|
|
3371
|
+
clientId?: string | null;
|
|
3372
|
+
companyId?: string | null;
|
|
3373
|
+
externalMetric?: any | null;
|
|
3374
|
+
adminTheme?: any | null;
|
|
3375
|
+
sharingSettingsId?: string | null;
|
|
3376
|
+
error?: {
|
|
3377
|
+
__typename?: 'Error';
|
|
3378
|
+
message: string;
|
|
3379
|
+
} | null;
|
|
3380
|
+
} | null;
|
|
3381
|
+
};
|
|
3341
3382
|
export type CreateExternalMetricMutationVariables = Exact<{
|
|
3342
3383
|
chartOptions?: InputMaybe<Scalars['jsonb']>;
|
|
3343
3384
|
companyId?: InputMaybe<Scalars['uuid']>;
|
|
@@ -3937,6 +3978,8 @@ export type UpdateExternalMetricMutation = {
|
|
|
3937
3978
|
id: any;
|
|
3938
3979
|
} | null;
|
|
3939
3980
|
};
|
|
3981
|
+
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 ";
|
|
3982
|
+
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
3983
|
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
3984
|
export declare const useCreateExternalMetricMutation: <TError = unknown, TContext = unknown>(options?: UseMutationOptions<CreateExternalMetricMutation, TError, Exact<{
|
|
3942
3985
|
chartOptions?: InputMaybe<Scalars['jsonb']>;
|