@databrainhq/plugin 0.14.1 → 0.14.3

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,5 +1,6 @@
1
1
  import React from 'react';
2
2
  import { ExternalMetrics } from '@/types/queryTypes';
3
+ import { RlsCondition } from '@/types';
3
4
  type Props = {
4
5
  onCloseModal: (value: boolean) => void;
5
6
  isShowRawCsvModal: boolean;
@@ -8,7 +9,8 @@ type Props = {
8
9
  companyTenancyType: string;
9
10
  filterValues?: Record<string, string>;
10
11
  sharingSettingsId?: string;
12
+ rlsConditions: RlsCondition[];
11
13
  };
12
- export declare const DownloadRawCsvModal: ({ onCloseModal, isShowRawCsvModal, metricItem, client, companyTenancyType, filterValues, sharingSettingsId, }: Props) => React.JSX.Element;
13
- declare const _default: React.MemoExoticComponent<({ onCloseModal, isShowRawCsvModal, metricItem, client, companyTenancyType, filterValues, sharingSettingsId, }: Props) => React.JSX.Element>;
14
+ export declare const DownloadRawCsvModal: ({ onCloseModal, isShowRawCsvModal, metricItem, client, companyTenancyType, filterValues, sharingSettingsId, rlsConditions, }: Props) => React.JSX.Element;
15
+ declare const _default: React.MemoExoticComponent<({ onCloseModal, isShowRawCsvModal, metricItem, client, companyTenancyType, filterValues, sharingSettingsId, rlsConditions, }: Props) => React.JSX.Element>;
14
16
  export default _default;
@@ -9,6 +9,13 @@ type ReplaceVariable = {
9
9
  };
10
10
  export declare const replaceVariable: ({ query, rlsConditions, tenancyLevel, clientId, values, isAllClient, }: ReplaceVariable) => string;
11
11
  export declare const nameSpaceSpecification: (parentAlias: string, columnName: string, dbName: string) => string;
12
+ export declare const cteQuery: (queryStr: string, groupedConditions: Record<string, RlsCondition[]>, dbName: string) => string;
13
+ export declare const subQuery: (queryStr: string, groupedConditions: Record<string, RlsCondition[]>, dbName: string) => string;
14
+ export declare const getReplacedQuery: (table: {
15
+ tableName: string;
16
+ condition: string;
17
+ }, query: string, dbName: string) => string;
18
+ export declare const replaceWhereClauses: (queryStr: string, groupedConditions: Record<string, RlsCondition[]>, dbName: string) => string;
12
19
  export declare const getModifiedQuery: ({ rlsConditions, dbName, query, }: {
13
20
  rlsConditions: RlsCondition[];
14
21
  dbName: string;
@@ -1,14 +1,16 @@
1
1
  import { FieldValues } from 'react-hook-form';
2
+ import { RlsCondition } from '@/types';
2
3
  declare const useDownloadRawCsv: ({ onCloseModal, sharingSettingsId, filterValues, metricItem, }: {
3
4
  onCloseModal: (value: boolean) => void;
4
5
  metricItem?: Record<string, any> | undefined;
5
6
  filterValues?: Record<string, string> | undefined;
6
7
  sharingSettingsId?: string | undefined;
7
8
  }) => {
8
- onSumbitSendCsvUrl: ({ values, clientName, tenancyType, }: {
9
+ onSumbitSendCsvUrl: ({ values, clientName, tenancyType, rlsConditions, }: {
9
10
  values: FieldValues;
10
11
  clientName?: string | undefined;
11
12
  tenancyType?: string | undefined;
13
+ rlsConditions: RlsCondition[];
12
14
  }) => void;
13
15
  isDisableDownloadSettings: boolean;
14
16
  downloadCsvError: string;