@vizzly/services 0.14.4-dev-47fc91342b50ca7729d941cffe1394e9009479e7 → 0.14.4-dev-934a4ca375f8ab62d12af055640bbdcdb3fe5d61

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.
@@ -413,8 +413,9 @@ export declare namespace Component {
413
413
  };
414
414
  export type ValueAliasOptions = {
415
415
  fieldId?: string;
416
- value: string | number;
416
+ value: string | number | null;
417
417
  filter?: AdditionalFilter;
418
+ dataSetId?: string;
418
419
  };
419
420
  export type Parameters = {
420
421
  measure?: ParameterMeasure;
@@ -8,6 +8,7 @@ import { SupportedTimeTruncFunctions } from '@vizzly/semantic-layer-public';
8
8
  import { QueryEngineConfig } from '../QueryEngineConfig/types';
9
9
  import { SupportedTransformationFunctions } from '../Functions/types';
10
10
  import { TextOverride } from '../Translations/types';
11
+ import { ValueAlias as ValueAliasType } from '../ValueAlias/types';
11
12
  export declare const NULL_REPLACEMENT = "No value";
12
13
  export declare const ALL_AGGREGATES: Array<QueryAttributes.Aggregate>;
13
14
  export declare type OldField = {
@@ -98,16 +99,5 @@ export declare const isArrayDataType: (field: {
98
99
  declare const vizzlySupportedTransformationFunctions: SupportedTransformationFunctions;
99
100
  export declare const supportedTransformationFunctions: (keys?: Array<keyof typeof vizzlySupportedTransformationFunctions>) => SupportedTransformationFunctions;
100
101
  export declare const supportedAggregatesFunction: (queryEngineConfig: QueryEngineConfig, dataType: DataType, supportedAggregateOptions?: SupportedAggregateOption[]) => SupportedAggregateOption[];
101
- declare type NullValueAlias = (params: {
102
- dataSetId: string;
103
- fieldId: string;
104
- }) => string | null | undefined;
105
- export declare const nullValue: (dataSetId: string, dimensions: QueryAttributes.Dimension[] | null, timeDimension: QueryAttributes.TimeDimension | null, nullValueAlias?: NullValueAlias, textOverride?: TextOverride, textOverrideKey?: string) => string | undefined;
106
- export declare const nullValueWithFieldId: ({ dataSetId, fieldId, nullValueAlias, textOverride, textOverrideKey, }: {
107
- dataSetId: string;
108
- fieldId: string;
109
- nullValueAlias?: NullValueAlias | undefined;
110
- textOverride?: TextOverride | undefined;
111
- textOverrideKey?: string | undefined;
112
- }) => string | undefined;
102
+ export declare const checkForNullValue: (dataSetId: string, dimensions: QueryAttributes.Dimension[] | null, timeDimension: QueryAttributes.TimeDimension | null, textOverride?: TextOverride, valueAlias?: ValueAliasType, textOverrideKey?: string) => string | undefined;
113
103
  export {};
@@ -0,0 +1,12 @@
1
+ import { AdditionalFilter } from '../AdditionalFilter/types';
2
+ import { Component } from '../Component/types';
3
+ import { ValueAlias } from './types';
4
+ export declare const build: (value: string | number | null, valueAlias?: ValueAlias, options?: {
5
+ fieldId?: string | null;
6
+ filter?: AdditionalFilter;
7
+ dataSetId?: string;
8
+ }) => string | number | null | undefined;
9
+ export declare const upcastValueAlias: (valueAlias: ValueAlias | undefined, options?: Component.ValueAliasOptions, nullValueAlias?: ((params: {
10
+ dataSetId: string;
11
+ fieldId: string;
12
+ }) => string | null | undefined) | undefined) => string | number | undefined;
@@ -0,0 +1,10 @@
1
+ import { Component } from '../Component/types';
2
+ export declare type ValueAlias = {
3
+ [id: string]: string | number;
4
+ } | ValueAliasFunction;
5
+ export declare type ValueAliasFunction = (options?: Component.ValueAliasOptions) => string | number | undefined;
6
+ export declare type ValueAliasFunctionV2 = (params: {
7
+ fieldId: string;
8
+ value: any;
9
+ function: string;
10
+ }) => string | undefined;
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.14.4-dev-47fc91342b50ca7729d941cffe1394e9009479e7",
29
+ "version": "0.14.4-dev-934a4ca375f8ab62d12af055640bbdcdb3fe5d61",
30
30
  "dependencies": {
31
31
  "@vizzly/api-client": "0.0.43",
32
32
  "@vizzly/joi": "^17.11.0",