@databrainhq/plugin 0.9.47 → 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.
@@ -1,4 +1,4 @@
1
- import { UseMutationOptions, UseQueryOptions } from 'react-query';
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'];
@@ -1421,9 +1436,11 @@ export type ExternalMetrics = {
1421
1436
  id: Scalars['uuid'];
1422
1437
  inputFields?: Maybe<Scalars['jsonb']>;
1423
1438
  integrationName: Scalars['String'];
1439
+ isArchived: Scalars['Boolean'];
1424
1440
  isCreatedByClient: Scalars['Boolean'];
1425
1441
  isEnableGroupBy: Scalars['Boolean'];
1426
1442
  isLive: Scalars['Boolean'];
1443
+ isMarkedDeleted: Scalars['Boolean'];
1427
1444
  metricId: Scalars['String'];
1428
1445
  metricQuery?: Maybe<Scalars['String']>;
1429
1446
  name: Scalars['String'];
@@ -1629,9 +1646,11 @@ export type ExternalMetrics_Bool_Exp = {
1629
1646
  id?: InputMaybe<Uuid_Comparison_Exp>;
1630
1647
  inputFields?: InputMaybe<Jsonb_Comparison_Exp>;
1631
1648
  integrationName?: InputMaybe<String_Comparison_Exp>;
1649
+ isArchived?: InputMaybe<Boolean_Comparison_Exp>;
1632
1650
  isCreatedByClient?: InputMaybe<Boolean_Comparison_Exp>;
1633
1651
  isEnableGroupBy?: InputMaybe<Boolean_Comparison_Exp>;
1634
1652
  isLive?: InputMaybe<Boolean_Comparison_Exp>;
1653
+ isMarkedDeleted?: InputMaybe<Boolean_Comparison_Exp>;
1635
1654
  metricId?: InputMaybe<String_Comparison_Exp>;
1636
1655
  metricQuery?: InputMaybe<String_Comparison_Exp>;
1637
1656
  name?: InputMaybe<String_Comparison_Exp>;
@@ -1775,9 +1794,11 @@ export type ExternalMetrics_Order_By = {
1775
1794
  id?: InputMaybe<Order_By>;
1776
1795
  inputFields?: InputMaybe<Order_By>;
1777
1796
  integrationName?: InputMaybe<Order_By>;
1797
+ isArchived?: InputMaybe<Order_By>;
1778
1798
  isCreatedByClient?: InputMaybe<Order_By>;
1779
1799
  isEnableGroupBy?: InputMaybe<Order_By>;
1780
1800
  isLive?: InputMaybe<Order_By>;
1801
+ isMarkedDeleted?: InputMaybe<Order_By>;
1781
1802
  metricId?: InputMaybe<Order_By>;
1782
1803
  metricQuery?: InputMaybe<Order_By>;
1783
1804
  name?: InputMaybe<Order_By>;
@@ -1830,12 +1851,16 @@ export declare enum ExternalMetrics_Select_Column {
1830
1851
  /** column name */
1831
1852
  IntegrationName = "integrationName",
1832
1853
  /** column name */
1854
+ IsArchived = "isArchived",
1855
+ /** column name */
1833
1856
  IsCreatedByClient = "isCreatedByClient",
1834
1857
  /** column name */
1835
1858
  IsEnableGroupBy = "isEnableGroupBy",
1836
1859
  /** column name */
1837
1860
  IsLive = "isLive",
1838
1861
  /** column name */
1862
+ IsMarkedDeleted = "isMarkedDeleted",
1863
+ /** column name */
1839
1864
  MetricId = "metricId",
1840
1865
  /** column name */
1841
1866
  MetricQuery = "metricQuery",
@@ -2369,6 +2394,8 @@ export type Query_Root = {
2369
2394
  customSqlColumns: Array<CustomSqlColumns>;
2370
2395
  /** fetch data from the table: "customSqlColumns" using primary key columns */
2371
2396
  customSqlColumns_by_pk?: Maybe<CustomSqlColumns>;
2397
+ /** Gets the required data to embed individual metrics. */
2398
+ embeddedMetricData?: Maybe<EmbeddedMetricDataOutput>;
2372
2399
  /** An array relationship */
2373
2400
  externalDashboardMetrics: Array<ExternalDashboardMetrics>;
2374
2401
  /** fetch data from the table: "externalDashboardMetrics" using primary key columns */
@@ -2490,6 +2517,9 @@ export type Query_RootCustomSqlColumnsArgs = {
2490
2517
  export type Query_RootCustomSqlColumns_By_PkArgs = {
2491
2518
  id: Scalars['uuid'];
2492
2519
  };
2520
+ export type Query_RootEmbeddedMetricDataArgs = {
2521
+ input: EmbeddedMetricDataInput;
2522
+ };
2493
2523
  export type Query_RootExternalDashboardMetricsArgs = {
2494
2524
  distinct_on?: InputMaybe<Array<ExternalDashboardMetrics_Select_Column>>;
2495
2525
  limit?: InputMaybe<Scalars['Int']>;
@@ -2654,9 +2684,7 @@ export type ScheduleEmailReportCharts_Bool_Exp = {
2654
2684
  /** unique or primary key constraints on table "scheduleEmailReportCharts" */
2655
2685
  export declare enum ScheduleEmailReportCharts_Constraint {
2656
2686
  /** unique or primary key constraint on columns "id" */
2657
- ScheduleEmailReportChartsPkey = "scheduleEmailReportCharts_pkey",
2658
- /** unique or primary key constraint on columns "externalMetricId", "scheduleEmailReportId" */
2659
- ScheduleEmailReportChartsUniqueKey = "scheduleEmailReportCharts_unique_key"
2687
+ ScheduleEmailReportChartsPkey = "scheduleEmailReportCharts_pkey"
2660
2688
  }
2661
2689
  /** input type for inserting data into table "scheduleEmailReportCharts" */
2662
2690
  export type ScheduleEmailReportCharts_Insert_Input = {
@@ -3330,6 +3358,27 @@ export type Uuid_Comparison_Exp = {
3330
3358
  _neq?: InputMaybe<Scalars['uuid']>;
3331
3359
  _nin?: InputMaybe<Array<Scalars['uuid']>>;
3332
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
+ };
3333
3382
  export type CreateExternalMetricMutationVariables = Exact<{
3334
3383
  chartOptions?: InputMaybe<Scalars['jsonb']>;
3335
3384
  companyId?: InputMaybe<Scalars['uuid']>;
@@ -3929,6 +3978,8 @@ export type UpdateExternalMetricMutation = {
3929
3978
  id: any;
3930
3979
  } | null;
3931
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>;
3932
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 ";
3933
3984
  export declare const useCreateExternalMetricMutation: <TError = unknown, TContext = unknown>(options?: UseMutationOptions<CreateExternalMetricMutation, TError, Exact<{
3934
3985
  chartOptions?: InputMaybe<Scalars['jsonb']>;
@@ -4031,13 +4082,13 @@ export declare const useCompanySubsetTableDataMutation: <TError = unknown, TCont
4031
4082
  companyId?: InputMaybe<string> | undefined;
4032
4083
  workspaceId?: InputMaybe<string> | undefined;
4033
4084
  }>, TContext>;
4034
- export declare const EmbeddedDashboardMetricsDocument = "\n query EmbeddedDashboardMetrics($externalDashboardId: String! = \"\", $clientId: String! = \"\") {\n externalDashboardMetrics(\n where: {externalDashboard: {externalDashboardId: {_eq: $externalDashboardId}}, _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 ";
4085
+ 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 ";
4035
4086
  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>;
4036
4087
  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 ";
4037
4088
  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>;
4038
4089
  export declare const GetExternalDashboardIdDocument = "\n query GetExternalDashboardId($externalDashboardId: String = \"\") {\n externalDashboards(where: {externalDashboardId: {_eq: $externalDashboardId}}) {\n id\n filters\n layout\n }\n}\n ";
4039
4090
  export declare const useGetExternalDashboardIdQuery: <TData = GetExternalDashboardIdQuery, TError = unknown>(variables?: GetExternalDashboardIdQueryVariables, options?: UseQueryOptions<GetExternalDashboardIdQuery, TError, TData, import("react-query").QueryKey> | undefined) => import("react-query").UseQueryResult<TData, TError>;
4040
- export declare const GetExternalDashboardLayoutDocument = "\n query getExternalDashboardLayout($clientId: String!, $externalDashboardId: uuid!) {\n clientDashboardLayout_by_pk(\n clientId: $clientId\n externalDashboardId: $externalDashboardId\n ) {\n clientId\n externalDashboardId\n layout\n isLocked\n }\n}\n ";
4091
+ export declare const GetExternalDashboardLayoutDocument = "\n query GetExternalDashboardLayout($clientId: String!, $externalDashboardId: uuid!) {\n clientDashboardLayout_by_pk(\n clientId: $clientId\n externalDashboardId: $externalDashboardId\n ) {\n clientId\n externalDashboardId\n layout\n isLocked\n }\n}\n ";
4041
4092
  export declare const useGetExternalDashboardLayoutQuery: <TData = GetExternalDashboardLayoutQuery, TError = unknown>(variables: GetExternalDashboardLayoutQueryVariables, options?: UseQueryOptions<GetExternalDashboardLayoutQuery, TError, TData, import("react-query").QueryKey> | undefined) => import("react-query").UseQueryResult<TData, TError>;
4042
4093
  export declare const ExternalDashboardListDocument = "\n query ExternalDashboardList($companyId: uuid = \"\") {\n externalDashboards(where: {companyId: {_eq: $companyId}}) {\n externalDashboardId\n name\n id\n }\n}\n ";
4043
4094
  export declare const useExternalDashboardListQuery: <TData = ExternalDashboardListQuery, TError = unknown>(variables?: ExternalDashboardListQueryVariables, options?: UseQueryOptions<ExternalDashboardListQuery, TError, TData, import("react-query").QueryKey> | undefined) => import("react-query").UseQueryResult<TData, TError>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@databrainhq/plugin",
3
- "version": "0.9.47",
3
+ "version": "0.10.0",
4
4
  "description": "Databrain app dashboard ui plugin.",
5
5
  "author": "",
6
6
  "license": "MIT",