@databrainhq/plugin 0.8.0 → 0.8.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.
@@ -150,3 +150,9 @@ export declare type MetricData = {
150
150
  createdBy: string;
151
151
  dateCreated: string;
152
152
  };
153
+ export declare type GetUnderlyingData = ({ columnName, value, setData, setLoading, }: {
154
+ columnName: string;
155
+ value: any;
156
+ setData: React.Dispatch<React.SetStateAction<any[]>>;
157
+ setLoading: React.Dispatch<React.SetStateAction<boolean>>;
158
+ }) => void;
@@ -121,6 +121,26 @@ export declare type GenerateExternalMetricQueryOutput = {
121
121
  __typename?: 'GenerateExternalMetricQueryOutput';
122
122
  query: Scalars['String'];
123
123
  };
124
+ export declare type GetUnderlyingDataInput = {
125
+ columnName: Scalars['String'];
126
+ companyId: Scalars['String'];
127
+ query: Scalars['String'];
128
+ value: Scalars['json'];
129
+ };
130
+ export declare type GetUnderlyingDataOutput = {
131
+ __typename?: 'GetUnderlyingDataOutput';
132
+ data: Array<Maybe<Scalars['json']>>;
133
+ timeTaken: Scalars['Int'];
134
+ };
135
+ export declare type GetUnderlyingSqlQueryInput = {
136
+ columnName: Scalars['String'];
137
+ sqlQuery: Scalars['String'];
138
+ value: Scalars['json'];
139
+ };
140
+ export declare type GetUnderlyingSqlQueryOutput = {
141
+ __typename?: 'GetUnderlyingSqlQueryOutput';
142
+ query: Scalars['String'];
143
+ };
124
144
  export declare type PreviewTableData = {
125
145
  __typename?: 'PreviewTableData';
126
146
  data?: Maybe<Scalars['json']>;
@@ -1037,6 +1057,8 @@ export declare type Mutation_Root = {
1037
1057
  generateDatasetMetrics?: Maybe<GenerateDatasetMetricsOutput>;
1038
1058
  generateEmbeddedMetic?: Maybe<GenerateEmbeddedMeticOutput>;
1039
1059
  generateExternalMetricQuery?: Maybe<GenerateExternalMetricQueryOutput>;
1060
+ getUnderlyingData?: Maybe<GetUnderlyingDataOutput>;
1061
+ getUnderlyingSqlQuery?: Maybe<GetUnderlyingSqlQueryOutput>;
1040
1062
  /** insert data into the table: "externalDashboardMetrics" */
1041
1063
  insert_externalDashboardMetrics?: Maybe<ExternalDashboardMetrics_Mutation_Response>;
1042
1064
  /** insert a single row into the table: "externalDashboardMetrics" */
@@ -1084,6 +1106,14 @@ export declare type Mutation_RootGenerateExternalMetricQueryArgs = {
1084
1106
  input: GenerateExternalMetricQueryInput;
1085
1107
  };
1086
1108
  /** mutation root */
1109
+ export declare type Mutation_RootGetUnderlyingDataArgs = {
1110
+ input: GetUnderlyingDataInput;
1111
+ };
1112
+ /** mutation root */
1113
+ export declare type Mutation_RootGetUnderlyingSqlQueryArgs = {
1114
+ input: GetUnderlyingSqlQueryInput;
1115
+ };
1116
+ /** mutation root */
1087
1117
  export declare type Mutation_RootInsert_ExternalDashboardMetricsArgs = {
1088
1118
  objects: Array<ExternalDashboardMetrics_Insert_Input>;
1089
1119
  on_conflict?: InputMaybe<ExternalDashboardMetrics_On_Conflict>;
@@ -1750,6 +1780,20 @@ export declare type GetThemesQuery = {
1750
1780
  chart: any;
1751
1781
  }>;
1752
1782
  };
1783
+ export declare type UnderlyingDataMutationVariables = Exact<{
1784
+ columnName?: InputMaybe<Scalars['String']>;
1785
+ companyId?: InputMaybe<Scalars['String']>;
1786
+ query?: InputMaybe<Scalars['String']>;
1787
+ value?: InputMaybe<Scalars['json']>;
1788
+ }>;
1789
+ export declare type UnderlyingDataMutation = {
1790
+ __typename?: 'mutation_root';
1791
+ getUnderlyingData?: {
1792
+ __typename?: 'GetUnderlyingDataOutput';
1793
+ data: Array<any | null>;
1794
+ timeTaken: number;
1795
+ } | null;
1796
+ };
1753
1797
  export declare type MarkDeleteMetricMutationVariables = Exact<{
1754
1798
  id?: Scalars['uuid'];
1755
1799
  }>;
@@ -1893,6 +1937,18 @@ export declare const MetricAccessDocument = "\n query MetricAccess($companyId
1893
1937
  export declare const useMetricAccessQuery: <TData = MetricAccessQuery, TError = unknown>(variables?: MetricAccessQueryVariables, options?: UseQueryOptions<MetricAccessQuery, TError, TData, import("react-query").QueryKey> | undefined) => import("react-query").UseQueryResult<TData, TError>;
1894
1938
  export declare const GetThemesDocument = "\n query GetThemes($companyId: uuid! = \"\") {\n themes(where: {companyId: {_eq: $companyId}}) {\n id\n companyId\n general\n dashboard\n cardTitle\n cardDescription\n chart\n }\n}\n ";
1895
1939
  export declare const useGetThemesQuery: <TData = GetThemesQuery, TError = unknown>(variables?: GetThemesQueryVariables, options?: UseQueryOptions<GetThemesQuery, TError, TData, import("react-query").QueryKey> | undefined) => import("react-query").UseQueryResult<TData, TError>;
1940
+ export declare const UnderlyingDataDocument = "\n mutation UnderlyingData($columnName: String = \"\", $companyId: String = \"\", $query: String = \"\", $value: json = \"\") {\n getUnderlyingData(\n input: {columnName: $columnName, companyId: $companyId, query: $query, value: $value}\n ) {\n data\n timeTaken\n }\n}\n ";
1941
+ export declare const useUnderlyingDataMutation: <TError = unknown, TContext = unknown>(options?: UseMutationOptions<UnderlyingDataMutation, TError, Exact<{
1942
+ columnName?: InputMaybe<string> | undefined;
1943
+ companyId?: InputMaybe<string> | undefined;
1944
+ query?: InputMaybe<string> | undefined;
1945
+ value?: InputMaybe<Scalars['json']>;
1946
+ }>, TContext> | undefined) => import("react-query").UseMutationResult<UnderlyingDataMutation, TError, Exact<{
1947
+ columnName?: InputMaybe<string> | undefined;
1948
+ companyId?: InputMaybe<string> | undefined;
1949
+ query?: InputMaybe<string> | undefined;
1950
+ value?: InputMaybe<Scalars['json']>;
1951
+ }>, TContext>;
1896
1952
  export declare const MarkDeleteMetricDocument = "\n mutation MarkDeleteMetric($id: uuid! = \"\") {\n update_externalMetrics_by_pk(\n pk_columns: {id: $id}\n _set: {isMarkedDeleted: true}\n ) {\n id\n }\n}\n ";
1897
1953
  export declare const useMarkDeleteMetricMutation: <TError = unknown, TContext = unknown>(options?: UseMutationOptions<MarkDeleteMetricMutation, TError, Exact<{
1898
1954
  id?: Scalars['uuid'];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@databrainhq/plugin",
3
- "version": "0.8.0",
3
+ "version": "0.8.1",
4
4
  "description": "Databrain app dashboard ui plugin.",
5
5
  "author": "",
6
6
  "license": "MIT",