@databrainhq/plugin 0.14.54 → 0.14.56

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.
Files changed (33) hide show
  1. package/dist/components/ChartSettingsPopup/components/ChartConfigure/ComboChartFormatter.d.ts +8 -0
  2. package/dist/components/GaugeLegend/index.d.ts +10 -0
  3. package/dist/components/Icons/Logos/index.d.ts +2 -0
  4. package/dist/components/MetricList/MetricList.d.ts +1 -0
  5. package/dist/components/MetricList/components/FullScreenView/index.d.ts +4 -1
  6. package/dist/components/MetricList/components/MetricCards/MetricCard.d.ts +4 -1
  7. package/dist/components/PivotTable/PivotTableV2.d.ts +8 -1
  8. package/dist/consts/api.d.ts +2 -0
  9. package/dist/consts/app.d.ts +2 -0
  10. package/dist/consts/metricOptions.d.ts +3 -1
  11. package/dist/helpers/createMetric.d.ts +7 -0
  12. package/dist/helpers/darkColorIdentifier.d.ts +1 -0
  13. package/dist/helpers/generateColorPalette.d.ts +1 -0
  14. package/dist/helpers/getColumnType.d.ts +1 -1
  15. package/dist/helpers/getComboRangeLabel.d.ts +5 -0
  16. package/dist/helpers/getModifiedQuery.d.ts +1 -0
  17. package/dist/helpers/index.d.ts +1 -0
  18. package/dist/helpers/timeseries.d.ts +17 -2
  19. package/dist/helpers/tooltipFormatter.d.ts +1 -1
  20. package/dist/hooks/useGenerateMetric.d.ts +1 -1
  21. package/dist/hooks/useMetricCard.d.ts +4 -1
  22. package/dist/queries/metric.query.d.ts +6 -1
  23. package/dist/types/app.d.ts +20 -2
  24. package/dist/types/metricCreate.d.ts +25 -3
  25. package/dist/usa-c14e93e4.mjs +15112 -0
  26. package/dist/utils/fetcher.d.ts +2 -0
  27. package/dist/utils/getChartAttributes.d.ts +59 -2
  28. package/dist/utils/getChartOptions.d.ts +6 -1
  29. package/dist/utils/getNoAxisChartOptions.d.ts +3 -1
  30. package/dist/webcomponents.es.js +66157 -79682
  31. package/dist/webcomponents.umd.js +228 -226
  32. package/dist/world-8db01cf5.mjs +45896 -0
  33. package/package.json +1 -1
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { ChartSettingsType } from '@/types';
3
+ type Props = {
4
+ chartSettings: ChartSettingsType;
5
+ setChartSettings: React.Dispatch<React.SetStateAction<ChartSettingsType>>;
6
+ };
7
+ declare const ComboChartFormatter: ({ chartSettings, setChartSettings }: Props) => React.JSX.Element;
8
+ export default ComboChartFormatter;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ type Props = {
3
+ data: {
4
+ name: string;
5
+ value: number;
6
+ color: string;
7
+ }[];
8
+ };
9
+ declare const GaugeLegend: ({ data }: Props) => React.JSX.Element;
10
+ export default GaugeLegend;
@@ -12,4 +12,6 @@ export declare const logos: {
12
12
  databricks: string;
13
13
  clickhouse: string;
14
14
  mssql: string;
15
+ duckdb: string;
16
+ awss3: string;
15
17
  };
@@ -40,5 +40,6 @@ export type ExternalMetricListProps = {
40
40
  radius: string;
41
41
  };
42
42
  optionsIcon?: 'kebab-menu-vertical' | 'download';
43
+ token: string;
43
44
  };
44
45
  export declare const ExternalMetricList: React.FC<ExternalMetricListProps>;
@@ -15,6 +15,7 @@ export type FullScreenViewProps = {
15
15
  onMinimize: () => void;
16
16
  onArchive?: (metricId: string) => void;
17
17
  clientId: string;
18
+ encryptedClient?: string;
18
19
  tenancyLevel: string;
19
20
  externalDashboardId: string;
20
21
  userProvidedDashboardId: string;
@@ -31,5 +32,7 @@ export type FullScreenViewProps = {
31
32
  id: string;
32
33
  isInProgress: boolean;
33
34
  }[];
35
+ isFrontendApp: boolean;
36
+ guestToken?: string;
34
37
  };
35
- export declare const FullScreenView: ({ metric, colors, rlsFilters, metricFilterOptions, onMinimize, onArchive, clientId, tenancyLevel, companyId, externalDashboardId, userProvidedDashboardId, isAllowedToUpdateMetrics, sharingSettingsId, appFilters, isInternalApp, isShowChartConfigTab, isHideChartSettings, isHideTablePreview, isAllClient, globalFilters, onDownload, downloadMetrics, }: FullScreenViewProps) => React.JSX.Element;
38
+ export declare const FullScreenView: ({ metric, colors, rlsFilters, metricFilterOptions, onMinimize, onArchive, clientId, tenancyLevel, companyId, externalDashboardId, userProvidedDashboardId, isAllowedToUpdateMetrics, sharingSettingsId, appFilters, isInternalApp, isShowChartConfigTab, isHideChartSettings, isHideTablePreview, isAllClient, globalFilters, onDownload, downloadMetrics, isFrontendApp, guestToken, encryptedClient, }: FullScreenViewProps) => React.JSX.Element;
@@ -10,6 +10,7 @@ export type MetricCardProps = {
10
10
  };
11
11
  metricItem: any;
12
12
  client: ClientType['value'];
13
+ encryptedClient?: ClientType['value'];
13
14
  onMaximize?: (metric: ExternalMetrics, rlsFilters?: {
14
15
  param: any;
15
16
  filterValues: Record<string, string>;
@@ -59,5 +60,7 @@ export type MetricCardProps = {
59
60
  label?: string;
60
61
  };
61
62
  };
63
+ isFrontendApp: boolean;
64
+ guestToken?: string;
62
65
  };
63
- export declare const MetricCard: ({ globalFilters, metricItem, onMaximize, client, colors, param, companyTenancyType, renderHeaderName, isDisableCardClick, onArchive, chartRendererType, isDisableMorePopup, appFilters, isInternalApp, setCrossDashboardFilters, crossDashboardFilters, metricFilterOptions, onDownloadRawCsv, enableDownloadCsv, enableMultiMetricFilters, disableActions, metricFilterPosition, isAllClient, dropdownTheme, optionsIcon, downloadMetrics, onDownload, appearanceOptions, }: MetricCardProps) => React.JSX.Element;
66
+ export declare const MetricCard: ({ globalFilters, metricItem, onMaximize, client, colors, param, companyTenancyType, renderHeaderName, isDisableCardClick, onArchive, chartRendererType, isDisableMorePopup, appFilters, isInternalApp, setCrossDashboardFilters, crossDashboardFilters, metricFilterOptions, onDownloadRawCsv, enableDownloadCsv, enableMultiMetricFilters, disableActions, metricFilterPosition, isAllClient, dropdownTheme, optionsIcon, downloadMetrics, onDownload, appearanceOptions, isFrontendApp, guestToken, encryptedClient, }: MetricCardProps) => React.JSX.Element;
@@ -1,12 +1,19 @@
1
1
  import React from 'react';
2
+ import { Aggregate } from '@/types';
2
3
  type DataRow = Record<string, any>;
3
4
  type PivotTableProps = {
4
5
  data: DataRow[];
5
6
  columns: string[];
6
7
  rows: string[];
7
8
  values: string[];
9
+ headerSettings?: {
10
+ textColor?: string;
11
+ color?: string;
12
+ isEnabled?: boolean;
13
+ };
14
+ measures: Aggregate[];
8
15
  };
9
- export declare const PivotTableV2: ({ props: { data, rows, columns, values }, }: {
16
+ export declare const PivotTableV2: ({ props: { data, rows, columns, values, headerSettings, measures }, }: {
10
17
  props: PivotTableProps;
11
18
  }) => React.JSX.Element;
12
19
  export {};
@@ -1,6 +1,7 @@
1
1
  export declare const API_BASE_URL: any;
2
2
  export declare const DASHBOARD_PATH = "/api/v2/dashboard";
3
3
  export declare const METRIC_PATH = "/api/v2/metric";
4
+ export declare const NEW_METRIC_PATH = "/api/v3/metric";
4
5
  export declare const DASHBOARD_DATA_QUERY = "dashboardData";
5
6
  export declare const DASHBOARD_EMBEDDED_METRIC_PATH: string;
6
7
  export declare const DASHBOARD_EMBEDDED_METRIC_QUERY = "embeddedMetric";
@@ -33,6 +34,7 @@ export declare const DASHBOARD_CHAT_RESPONSE_MUTATION = "getOpenaiChatResponse";
33
34
  export declare const DASHBOARD_THEME_PATH: string;
34
35
  export declare const DASHBOARD_THEME_QUERY = "getTheme";
35
36
  export declare const METRIC_QUERY_PATH: string;
37
+ export declare const NEW_METRIC_QUERY_PATH: string;
36
38
  export declare const METRIC_QUERY_QUERY = "query";
37
39
  export declare const METRIC_RAW_DOWNLOAD_SETTINGS_PATH: string;
38
40
  export declare const METRIC_RAW_DOWNLOAD_SETTINGS_QUERY = "rawDownloadSettings";
@@ -30,6 +30,7 @@ export declare const CHART_TYPES: {
30
30
  geoMap: string;
31
31
  geoBarMap: string;
32
32
  geoScatterMap: string;
33
+ worldMap: string;
33
34
  };
34
35
  export declare const chartOptions: {
35
36
  name: string;
@@ -46,6 +47,7 @@ export declare const timeStamp: {
46
47
  export declare const STATUS_TAB = "STATUS_TAB";
47
48
  export declare const STREAM_TAB = "STREAM_TAB";
48
49
  export declare const CLIENT_NAME_VAR = "client_id_variable";
50
+ export declare const STACK_AXIS = "stack";
49
51
  export declare const RLS_CONDITIONS: Record<string, string>;
50
52
  export declare const CHART_TAB = "CHART_TAB";
51
53
  export declare const TABLE_TAB = "TABLE_TAB";
@@ -123,11 +123,12 @@ export declare const REDSHIFT = "redshift";
123
123
  export declare const SNOWFLAKE = "snowflake";
124
124
  export declare const BIGQUERY = "bigquery";
125
125
  export declare const MYSQL = "mysql";
126
+ export declare const MSSQL = "mssql";
126
127
  export declare const POSTGRES = "postgres";
127
128
  export declare const MONGODB = "mongodb";
128
129
  export declare const DATABRICKS = "databricks";
129
130
  export declare const CLICKHOUSE = "clickhouse";
130
- export declare const MSSQL = "mssql";
131
+ export declare const AWSS3 = "awss3";
131
132
  export declare const DOWNLOAD_DATA_OPTIONS: {
132
133
  RAW_DATA: string;
133
134
  DOWNLOAD_WITHOUT_FILTERS: string;
@@ -141,3 +142,4 @@ export declare const CAST_COLUMN_AS: {
141
142
  label: string;
142
143
  icon: string;
143
144
  }[];
145
+ export declare const arithmeticOperators: FloatingDropDownOption[];
@@ -0,0 +1,7 @@
1
+ import { Aggregate, Dimension, FloatingDropDownOption, SelectedColumn } from '@/types';
2
+ export declare const functionOptions: (col?: SelectedColumn, dataType?: string) => FloatingDropDownOption[];
3
+ export declare const getColumnType: (column: SelectedColumn) => "default" | "custom" | "arithmetic_column";
4
+ export declare const getDimensionsAndAggregates: (columns: SelectedColumn[]) => {
5
+ dimensions: Dimension[];
6
+ aggregates: Aggregate[];
7
+ };
@@ -0,0 +1 @@
1
+ export declare const darkColorIdentifier: (color: string) => boolean;
@@ -0,0 +1 @@
1
+ export declare const generateColorPalette: (originalColors: string[], numberOfRecords: number) => string[];
@@ -1,2 +1,2 @@
1
- declare const getColumnTypes: (data: Record<string, any>[]) => Record<string, string>;
1
+ export declare const getColumnTypes: (data: Record<string, any>[]) => Record<string, string>;
2
2
  export default getColumnTypes;
@@ -0,0 +1,5 @@
1
+ export declare const getComboRangeLabel: (value: any, formatter: {
2
+ upperLimit: number;
3
+ lowerLimit: number;
4
+ label: string;
5
+ }[]) => any;
@@ -54,4 +54,5 @@ export declare const getSqlStatement: ({ query, clientId, rlsConditions, globalF
54
54
  export declare const isAppliedFilter: (filter: RlsCondition) => number | boolean | Date | undefined;
55
55
  export declare const onChangeGlobalFilter: ({ column, setAppliedFilters, value, operator, type, }: OnChangeGlobalFilterParams) => void;
56
56
  export declare const getColumnNameKeyString: (columnName: string, dbName: string) => string;
57
+ export declare const getExecuteSqlResponseData: (data: any) => any;
57
58
  export {};
@@ -8,3 +8,4 @@ export * from './checkIsElementInViewport';
8
8
  export * from './areArraysEqual';
9
9
  export * from './generateTimeRangeWhereClause';
10
10
  export * from './getColumnType';
11
+ export * from './createMetric';
@@ -4,7 +4,7 @@ interface TimeSeriesData {
4
4
  data: Record<string, any>[];
5
5
  values?: string[];
6
6
  }
7
- export declare const getTimeSeriesData: ({ dataArray, timeStampKey, type, valuekeys, groupBy, labelSettings, customSettings, backGroundColor, fillXAxis, isCumulativeBar, customData, yAxisList, }: {
7
+ type GetTimeSeriesData = {
8
8
  dataArray: Record<string, any>[];
9
9
  timeStampKey: string;
10
10
  valuekeys: string[];
@@ -17,7 +17,16 @@ export declare const getTimeSeriesData: ({ dataArray, timeStampKey, type, valuek
17
17
  isCumulativeBar: boolean;
18
18
  customData: any;
19
19
  yAxisList: string[];
20
- }) => ({
20
+ hasPercentSymbol: boolean;
21
+ };
22
+ export declare const groupByMap: {
23
+ yearly: (date: Date) => string;
24
+ monthly: (date: Date) => string;
25
+ weekly: (date: Date) => string;
26
+ daily: (date: Date) => string;
27
+ quarterly: (date: Date) => string;
28
+ };
29
+ export declare const getTimeSeriesData: ({ dataArray, timeStampKey, type, valuekeys, groupBy, labelSettings, customSettings, backGroundColor, fillXAxis, isCumulativeBar, customData, yAxisList, hasPercentSymbol, }: GetTimeSeriesData) => ({
21
30
  stack?: string | undefined;
22
31
  barWidth?: string | undefined;
23
32
  showBackground?: boolean | undefined;
@@ -36,6 +45,9 @@ export declare const getTimeSeriesData: ({ dataArray, timeStampKey, type, valuek
36
45
  label: {
37
46
  show: boolean | undefined;
38
47
  position: string | undefined;
48
+ formatter(d: {
49
+ data: any;
50
+ }): string;
39
51
  };
40
52
  emphasis: {
41
53
  focus: string;
@@ -59,6 +71,9 @@ export declare const getTimeSeriesData: ({ dataArray, timeStampKey, type, valuek
59
71
  label: {
60
72
  show: boolean | undefined;
61
73
  position: string | undefined;
74
+ formatter(d: {
75
+ data: any;
76
+ }): string;
62
77
  };
63
78
  emphasis: {
64
79
  focus: string;
@@ -1 +1 @@
1
- export declare const tooltipFormatter: (params: any, chartOptions: any) => string;
1
+ export declare const tooltipFormatter: (params: any, chartOptions: any, hasPercentSymbol?: boolean) => string;
@@ -45,7 +45,7 @@ declare const useGenerateMetric: (config: ConfigType) => {
45
45
  selectedColumns: SelectedColumn[];
46
46
  setSelectedColumns: import("react").Dispatch<import("react").SetStateAction<SelectedColumn[]>>;
47
47
  functionOptions: (col?: SelectedColumn, colDatatype?: string) => FloatingDropDownOption[];
48
- setChartFields: ({ chartType, chartDimensions, chartMetrics, chartAggregateColumns, }: SetChartFieldParams) => void;
48
+ setChartFields: ({ chartType, chartDimensions, chartMetrics, chartAggregateColumns, configAggregates, }: SetChartFieldParams) => void;
49
49
  onSubmitSearch: () => void;
50
50
  onChangeHelperFunction: ({ column, helperFunction, functionConfiguration, }: OnChangeHelperFunctionParams) => void;
51
51
  onChangeAlias: ({ alias, column }: OnChangeAliasParams) => void;
@@ -4,6 +4,7 @@ import { MetricCardProps } from '@/components';
4
4
  type UseMetricCardProps = {
5
5
  metric: Record<string, any>;
6
6
  clientId: string;
7
+ encryptedClientId?: string;
7
8
  tenancyLevel: string;
8
9
  globalFilters?: MetricCardProps['globalFilters'];
9
10
  rlsFilters?: any;
@@ -15,8 +16,10 @@ type UseMetricCardProps = {
15
16
  crossDashboardFilters?: RlsCondition[];
16
17
  metricFilterOptions?: MetricFilterOptionsType;
17
18
  isAllClient?: boolean;
19
+ isFrontendApp: boolean;
20
+ guestToken?: string;
18
21
  };
19
- export declare const useMetricCard: ({ metric, globalFilters, rlsFilters, clientId, tenancyLevel, isInternalApp, appFilters, setCrossDashboardFilters, crossDashboardFilters, metricFilterOptions, isAllClient, }: UseMetricCardProps) => {
22
+ export declare const useMetricCard: ({ metric, globalFilters, rlsFilters, clientId, tenancyLevel, isInternalApp, appFilters, setCrossDashboardFilters, crossDashboardFilters, metricFilterOptions, isAllClient, isFrontendApp, guestToken, encryptedClientId, }: UseMetricCardProps) => {
20
23
  onDrillLevelClick: (index: number) => void;
21
24
  onDrillDown: (params: any, rowFilters?: {
22
25
  columnName: string;
@@ -1,5 +1,10 @@
1
1
  import { UseMetricQueryQueryInputType } from '@/types/queryTypes';
2
- export declare const useMetricDataQuery: (data: UseMetricQueryQueryInputType) => import("react-query").UseQueryResult<{
2
+ export declare const useMetricDataQuery: ({ clientId, data, token, isFrontendApp, }: {
3
+ data: UseMetricQueryQueryInputType;
4
+ clientId: string;
5
+ token?: string | undefined;
6
+ isFrontendApp: boolean;
7
+ }) => import("react-query").UseQueryResult<{
3
8
  data: unknown;
4
9
  }, unknown>;
5
10
  export declare const useMetricRawDownloadSettingsQuery: (workspaceId: string) => import("react-query").UseQueryResult<{
@@ -1,6 +1,6 @@
1
1
  import type { ReactNode } from 'react';
2
2
  import { ColumnSizingState } from '@tanstack/react-table';
3
- import { TableObjectType } from './metricCreate';
3
+ import { SelectedColumn, TableObjectType, Aggregate } from './metricCreate';
4
4
  import { CHART_TYPES, ICONS_LIST } from '@/consts';
5
5
  export type ChildrenProps = {
6
6
  children: ReactNode;
@@ -75,6 +75,7 @@ export type LegendSettings = {
75
75
  legendShape?: string;
76
76
  customise?: boolean;
77
77
  fixedPosition?: string;
78
+ disableScroll?: boolean;
78
79
  };
79
80
  export type MarginSettings = {
80
81
  marginTop?: number;
@@ -92,6 +93,15 @@ export type CustomSettings = {
92
93
  upperLimit: number;
93
94
  lowerLimit: number;
94
95
  label: string;
96
+ color?: string;
97
+ }[];
98
+ comboLabelFormatter?: {
99
+ axis: string;
100
+ formatter: {
101
+ upperLimit: number;
102
+ lowerLimit: number;
103
+ label: string;
104
+ }[];
95
105
  }[];
96
106
  barWidth?: number;
97
107
  barRadius?: number[];
@@ -184,7 +194,7 @@ export type CustomSettings = {
184
194
  };
185
195
  export type Colors = 'primary' | 'primary-dark' | 'secondary' | 'secondary-dark' | 'alert' | 'alert-dark' | 'alert-light' | 'success' | 'success-dark' | 'success-light' | 'warning' | 'warning-dark' | 'info' | 'info-light' | 'white' | 'gray' | 'gray-dark' | 'light' | 'dark' | 'infoAlert';
186
196
  export type IconType = (typeof ICONS_LIST)[number];
187
- export type LogoType = 'redshift' | 'postgres' | 'mysql' | 'mongodb' | 'bigquery' | 'snowflake' | 'microsoft' | 'google' | 'elasticsearch' | 'redis' | 'databricks' | 'clickhouse' | 'mssql';
197
+ export type LogoType = 'redshift' | 'postgres' | 'mysql' | 'mongodb' | 'bigquery' | 'snowflake' | 'microsoft' | 'google' | 'elasticsearch' | 'redis' | 'databricks' | 'clickhouse' | 'mssql' | 'awss3';
188
198
  export type IconSizes = 'xxs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
189
199
  export type IconConfig = {
190
200
  size: IconSizes;
@@ -240,6 +250,11 @@ export type TableSettings = {
240
250
  listColumns?: string[];
241
251
  listSeparator?: string;
242
252
  stackColAlias?: string;
253
+ customHeaderColor?: {
254
+ isEnabled?: boolean;
255
+ color?: string;
256
+ textColor?: string;
257
+ };
243
258
  };
244
259
  export type BackgroundSettings = {
245
260
  show?: boolean;
@@ -251,6 +266,7 @@ export type LabelSettings = {
251
266
  truncateLabel?: boolean;
252
267
  truncateLabelValue?: number;
253
268
  showLabelLine?: boolean;
269
+ isEnableValueSummation?: boolean;
254
270
  XAxisStyle?: {
255
271
  size?: number;
256
272
  family?: string;
@@ -280,6 +296,7 @@ export type PivotSettingsType2 = {
280
296
  dimensions?: string[];
281
297
  headers?: string[];
282
298
  isDynamicHeaders?: boolean;
299
+ aggregates?: Aggregate[];
283
300
  };
284
301
  export type GaugeSettingsType = {
285
302
  metric?: string;
@@ -402,6 +419,7 @@ export type FloatingDropDownOption = {
402
419
  alias?: string;
403
420
  table?: TableObjectType;
404
421
  isImportEnabled?: boolean;
422
+ column?: SelectedColumn;
405
423
  };
406
424
  export type FilterType = {
407
425
  tableName: string;
@@ -84,6 +84,7 @@ export type SetChartFieldParams = {
84
84
  chartDimensions?: string[];
85
85
  chartAggregateColumns?: string[];
86
86
  chartType?: ChartSettingsType['chartType'];
87
+ configAggregates?: Aggregate[];
87
88
  };
88
89
  export type CastColumn = 'integer' | 'decimal' | 'date';
89
90
  export type SelectedColumn = {
@@ -93,7 +94,7 @@ export type SelectedColumn = {
93
94
  alias: string;
94
95
  parentAlias: string;
95
96
  helperFunction?: string;
96
- type: 'DEFAULT' | 'HELPER_FUNCTION' | 'CUSTOM' | 'PYTHON';
97
+ type: 'DEFAULT' | 'HELPER_FUNCTION' | 'CUSTOM' | 'PYTHON' | 'ARITHMETIC';
97
98
  index: number;
98
99
  configType: 'DIMENSION' | 'AGGREGATE' | 'FILTER';
99
100
  dropType: 'METRIC' | 'DIMENSION' | 'FILTER';
@@ -121,6 +122,11 @@ export type SelectedColumn = {
121
122
  draggableItemData: DraggableMetricItemData;
122
123
  keyword?: string;
123
124
  cast?: FloatingDropDownOption;
125
+ arithmeticConfig?: {
126
+ firstOperand: SelectedColumn;
127
+ secondOperand: SelectedColumn;
128
+ operator: FloatingDropDownOption;
129
+ };
124
130
  };
125
131
  export type SelectedFilter = {
126
132
  method: string;
@@ -340,16 +346,20 @@ export type Aggregate = {
340
346
  columnName: string;
341
347
  alias: string;
342
348
  parentAlias: string;
343
- type: 'custom' | 'default';
344
349
  dataType: string;
345
350
  cast?: CastColumn;
351
+ type: 'custom' | 'default' | 'arithmetic_column';
352
+ arithmeticConfig?: {
353
+ firstOperand: Aggregate;
354
+ secondOperand: Aggregate;
355
+ operator: string;
356
+ };
346
357
  };
347
358
  export type Dimension = {
348
359
  columnName: string;
349
360
  alias: string;
350
361
  parentAlias: string;
351
362
  timeGrain?: string;
352
- type: 'custom' | 'default';
353
363
  dataType: string;
354
364
  helperFunction?: string;
355
365
  labelType?: string;
@@ -357,6 +367,12 @@ export type Dimension = {
357
367
  dateFormat?: string;
358
368
  };
359
369
  cast?: CastColumn;
370
+ type: 'custom' | 'default' | 'arithmetic_column';
371
+ arithmeticConfig?: {
372
+ firstOperand: Dimension;
373
+ secondOperand: Dimension;
374
+ operator: string;
375
+ };
360
376
  };
361
377
  export type Filter = {
362
378
  method: string;
@@ -488,4 +504,10 @@ export type MetricFilterDemoThemeType = {
488
504
  variant: 'static' | 'floating';
489
505
  radius: string;
490
506
  };
507
+ export type MetricConfigType = 'DIMENSION' | 'METRIC';
508
+ export type OnSaveArithmeticColumnParams = {
509
+ column: SelectedColumn['arithmeticConfig'];
510
+ type: MetricConfigType;
511
+ alias: string;
512
+ };
491
513
  export {};