@vizzly/services 0.15.0-dev-c8007c0d91fa66cc8fff6cdeaf34c7e7f49bea17 → 0.15.0-dev-72d049314841ffdcb22fd0d12c8a8448b71010e3
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/dist/index.js +1 -1
- package/dist/results-driver/src/types.d.ts +2 -0
- package/dist/services/src/index.d.ts +2 -0
- package/dist/shared-logic/src/AliasFields/types.d.ts +5 -0
- package/dist/shared-logic/src/CustomField/AliasField/index.d.ts +7 -0
- package/dist/shared-logic/src/CustomField/CustomField.d.ts +2 -1
- package/dist/shared-logic/src/CustomField/types.d.ts +6 -1
- package/dist/shared-logic/src/api/queryEngine/getRunQueriesCallback.d.ts +2 -1
- package/package.json +1 -1
|
@@ -5,6 +5,7 @@ import { loadDataCallback } from '../../shared-logic/src/Callbacks/types';
|
|
|
5
5
|
import { Query } from '../../shared-logic/src/Query/types';
|
|
6
6
|
import { Result } from '../../shared-logic/src/Result/types';
|
|
7
7
|
import { VariableList } from '../../shared-logic/src/Variables/types';
|
|
8
|
+
import { AliasFields } from '../../shared-logic/src/AliasFields/types';
|
|
8
9
|
export declare type VizzlyQueryEngineDriver = {
|
|
9
10
|
type: 'vizzlyQueryEngine';
|
|
10
11
|
queryEngineConfig: QueryEngineConfig;
|
|
@@ -37,4 +38,5 @@ export declare type Params = {
|
|
|
37
38
|
timeRangeOptions: TimeRangeOptions;
|
|
38
39
|
timeZone?: string;
|
|
39
40
|
variables: VariableList;
|
|
41
|
+
aliasFields: AliasFields;
|
|
40
42
|
};
|
|
@@ -21,6 +21,7 @@ export type { FilterConfig } from '../../shared-logic/src/AdditionalFilter/types
|
|
|
21
21
|
export type { ViewConfiguration } from '../../shared-logic/src/ViewConfiguration/types';
|
|
22
22
|
export { VizzlyInstanceNotLoaded } from './errors/VizzlyInstanceNotLoaded';
|
|
23
23
|
import { CustomField } from '../../shared-logic/src/CustomField/types';
|
|
24
|
+
import { AliasFields } from '../../shared-logic/src/AliasFields/types';
|
|
24
25
|
export declare type Options = {
|
|
25
26
|
apiHost: string;
|
|
26
27
|
};
|
|
@@ -177,5 +178,6 @@ export declare type QueryParams = {
|
|
|
177
178
|
queryEngineEndpoint?: QueryEngineEndpoint;
|
|
178
179
|
dateFilterOptions?: DateTimeFilterOptions;
|
|
179
180
|
variables?: VariableList;
|
|
181
|
+
aliasFields?: AliasFields;
|
|
180
182
|
filterConfig?: FilterConfig;
|
|
181
183
|
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Params } from '../../../../results-driver/src/types';
|
|
2
|
+
import { DataSet } from '../../DataSet/types';
|
|
3
|
+
import { Query } from '../../Query/types';
|
|
4
|
+
import { QueryAttributes } from '../../QueryAttributes/types';
|
|
5
|
+
import { QueryEngineConfig } from '../../QueryEngineConfig/types';
|
|
6
|
+
import { AliasFieldType } from '../types';
|
|
7
|
+
export declare const build: (measureAttribute: QueryAttributes.Measure, customField: AliasFieldType, _queryEngineConfig: QueryEngineConfig, dataSet: DataSet, _queryHasDimension: boolean, params: Params) => Query['measure'][number];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DataSet as DataSetType } from '../DataSet/types';
|
|
2
|
-
import { AggregateMathField, ConditionalField, CustomField, DateCalculationField, MetricField, PercentageField, RoundedNumberField, RulesField, SimpleMathField } from '../CustomField/types';
|
|
2
|
+
import { AggregateMathField, AliasFieldType, ConditionalField, CustomField, DateCalculationField, MetricField, PercentageField, RoundedNumberField, RulesField, SimpleMathField } from '../CustomField/types';
|
|
3
3
|
import { QueryAttributes } from '../QueryAttributes/types';
|
|
4
4
|
import { QueryEngineConfig } from '../QueryEngineConfig/types';
|
|
5
5
|
import { Query } from '../Query/types';
|
|
@@ -12,6 +12,7 @@ export declare const isPercentageField: (field: DataSetType.Field) => field is P
|
|
|
12
12
|
export declare const isRules: (field: DataSetType.Field) => field is RulesField;
|
|
13
13
|
export declare const isConditional: (field: DataSetType.Field) => field is ConditionalField;
|
|
14
14
|
export declare const isCustomBuildMetric: (field: DataSetType.Field) => field is MetricField;
|
|
15
|
+
export declare const isAliasField: (field: DataSetType.Field) => field is AliasFieldType;
|
|
15
16
|
export declare const isDateCalculation: (field: DataSetType.Field) => field is DateCalculationField;
|
|
16
17
|
export declare const getCustomFieldCategory: (field: CustomField) => CustomFieldCategory;
|
|
17
18
|
export declare const isCustomField: (field: DataSetType.Field) => field is CustomField;
|
|
@@ -58,6 +58,11 @@ export declare type RoundedNumberField = BaseCustomField & RoundedNumber;
|
|
|
58
58
|
export declare type DateCalculationField = BaseCustomField & DateCalculation;
|
|
59
59
|
export declare type AggregateMathField = BaseCustomField & AggregateMath;
|
|
60
60
|
export declare type ConditionalField = BaseCustomField & Conditional;
|
|
61
|
+
export declare type AliasFieldType = BaseCustomField & {
|
|
62
|
+
allowedFields: Array<{
|
|
63
|
+
id: string;
|
|
64
|
+
}>;
|
|
65
|
+
};
|
|
61
66
|
export declare type MetricField = BaseCustomField & {
|
|
62
67
|
metric: Metric;
|
|
63
68
|
};
|
|
@@ -72,7 +77,7 @@ export declare type CustomBuildMetricField = BaseField & {
|
|
|
72
77
|
metricAttributes: Metric;
|
|
73
78
|
dataType: 'number';
|
|
74
79
|
};
|
|
75
|
-
export declare type CustomField = PercentageField | SimpleMathField | AggregateMathField | RulesField | RoundedNumberField | DateCalculationField | ConditionalField | MetricField | CustomBuildMetricField;
|
|
80
|
+
export declare type CustomField = PercentageField | SimpleMathField | AggregateMathField | RulesField | RoundedNumberField | DateCalculationField | ConditionalField | MetricField | CustomBuildMetricField | AliasFieldType;
|
|
76
81
|
export declare type MathOperator = '*' | '-' | '/' | '+';
|
|
77
82
|
export declare type CustomFieldCategory = 'percentage' | 'math' | 'rules' | 'roundedNumber' | 'dateCalculation' | 'conditional' | 'customBuildMetric';
|
|
78
83
|
export declare enum AcceptedTypes {
|
|
@@ -9,6 +9,7 @@ import { Result } from '../../Result/types';
|
|
|
9
9
|
import { DataSet } from '../../DataSet/types';
|
|
10
10
|
import { IdentityConfig as IdentityConfigType } from '../../IdentityConfig/types';
|
|
11
11
|
import { VariableList } from '../../Variables/types';
|
|
12
|
+
import { AliasFields } from '../../AliasFields/types';
|
|
12
13
|
declare type CallbackError = null;
|
|
13
14
|
export declare type runQueriesCallback = (queries: Component.Attributes | AdditionalFilter | QueryAttributes[] | [PreparedQuery], params: {
|
|
14
15
|
dataSets: DataSet[];
|
|
@@ -16,5 +17,5 @@ export declare type runQueriesCallback = (queries: Component.Attributes | Additi
|
|
|
16
17
|
dataAccessToken?: string;
|
|
17
18
|
filterConfig?: FilterConfig;
|
|
18
19
|
}) => Promise<(Result | null)[] | Array<Result['content'] | null> | CallbackError>;
|
|
19
|
-
declare const getRunQueriesCallback: (identityConfig: IdentityConfigType, queryEngineConfig: QueryEngineConfigType, timeRangeOptions: TimeRangeOptions, variables: VariableList, runQueries?: CustomDriver['runQueries'], data?: loadDataCallback, queryEngineEndpoint?: QueryEngineEndpoint, timeZone?: string) => runQueriesCallback;
|
|
20
|
+
declare const getRunQueriesCallback: (identityConfig: IdentityConfigType, queryEngineConfig: QueryEngineConfigType, timeRangeOptions: TimeRangeOptions, variables: VariableList, aliasFields: AliasFields, runQueries?: CustomDriver['runQueries'], data?: loadDataCallback, queryEngineEndpoint?: QueryEngineEndpoint, timeZone?: string) => runQueriesCallback;
|
|
20
21
|
export default getRunQueriesCallback;
|
package/package.json
CHANGED
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"fix-type-alias": "tsc-alias -p tsconfig.json",
|
|
27
27
|
"prepare": "yarn build"
|
|
28
28
|
},
|
|
29
|
-
"version": "0.15.0-dev-
|
|
29
|
+
"version": "0.15.0-dev-72d049314841ffdcb22fd0d12c8a8448b71010e3",
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@vizzly/api-client": "0.0.57",
|
|
32
32
|
"@vizzly/joi": "^17.11.0",
|