@dcupl/common 0.0.72 → 0.0.74

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 (47) hide show
  1. package/dist/lib-cjs/changeDetection.d.ts +5 -5
  2. package/dist/lib-cjs/changeDetection.js +4 -3
  3. package/dist/lib-cjs/changeDetection.js.map +1 -1
  4. package/dist/lib-cjs/getFacetEntries.d.ts +1 -1
  5. package/dist/lib-cjs/getFacetEntries.js +70 -37
  6. package/dist/lib-cjs/getFacetEntries.js.map +1 -1
  7. package/dist/lib-cjs/index.d.ts +1 -0
  8. package/dist/lib-cjs/index.js +1 -0
  9. package/dist/lib-cjs/index.js.map +1 -1
  10. package/dist/lib-cjs/performance.d.ts +3 -0
  11. package/dist/lib-cjs/performance.js +9 -0
  12. package/dist/lib-cjs/performance.js.map +1 -0
  13. package/dist/lib-cjs/tsconfig-cjs.tsbuildinfo +1 -1
  14. package/dist/lib-cjs/types/data.types.d.ts +5 -5
  15. package/dist/lib-cjs/types/dcupl.types.d.ts +11 -11
  16. package/dist/lib-cjs/types/filter.types.d.ts +36 -36
  17. package/dist/lib-cjs/types/internal.types.d.ts +4 -4
  18. package/dist/lib-cjs/types/list.types.d.ts +24 -22
  19. package/dist/lib-cjs/types/model.types.d.ts +40 -37
  20. package/dist/lib-cjs/types/projection.types.d.ts +8 -7
  21. package/dist/lib-cjs/types/section.types.d.ts +1 -1
  22. package/dist/lib-cjs/types/selection.types.d.ts +3 -3
  23. package/dist/lib-cjs/types/suggestion.types.d.ts +3 -3
  24. package/dist/lib-esm/changeDetection.d.ts +5 -5
  25. package/dist/lib-esm/changeDetection.js +4 -3
  26. package/dist/lib-esm/changeDetection.js.map +1 -1
  27. package/dist/lib-esm/getFacetEntries.d.ts +1 -1
  28. package/dist/lib-esm/getFacetEntries.js +70 -37
  29. package/dist/lib-esm/getFacetEntries.js.map +1 -1
  30. package/dist/lib-esm/index.d.ts +1 -0
  31. package/dist/lib-esm/index.js +1 -0
  32. package/dist/lib-esm/index.js.map +1 -1
  33. package/dist/lib-esm/performance.d.ts +3 -0
  34. package/dist/lib-esm/performance.js +6 -0
  35. package/dist/lib-esm/performance.js.map +1 -0
  36. package/dist/lib-esm/tsconfig.tsbuildinfo +1 -1
  37. package/dist/lib-esm/types/data.types.d.ts +5 -5
  38. package/dist/lib-esm/types/dcupl.types.d.ts +11 -11
  39. package/dist/lib-esm/types/filter.types.d.ts +36 -36
  40. package/dist/lib-esm/types/internal.types.d.ts +4 -4
  41. package/dist/lib-esm/types/list.types.d.ts +24 -22
  42. package/dist/lib-esm/types/model.types.d.ts +40 -37
  43. package/dist/lib-esm/types/projection.types.d.ts +8 -7
  44. package/dist/lib-esm/types/section.types.d.ts +1 -1
  45. package/dist/lib-esm/types/selection.types.d.ts +3 -3
  46. package/dist/lib-esm/types/suggestion.types.d.ts +3 -3
  47. package/package.json +1 -1
@@ -1,14 +1,14 @@
1
- export declare type RawItem = any;
2
- export declare type ListItem = {
1
+ export type RawItem = any;
2
+ export type ListItem = {
3
3
  key: string;
4
4
  [id: string]: any;
5
5
  };
6
- export declare type DataContainer<ListType extends RawItem | ListItem = ListItem, ModelNames extends string = string> = {
6
+ export type DataContainer<ListType extends RawItem | ListItem = ListItem, ModelNames extends string = string> = {
7
7
  model: ModelNames;
8
8
  type?: DataContainerType;
9
9
  data: ListType[];
10
10
  keyProperty?: string;
11
11
  autoGenerateKey?: boolean;
12
12
  };
13
- export declare type DataContainerType = 'upsert' | 'update' | 'set' | 'delete';
14
- export declare type ReferenceDataTypes<ListType extends ListItem = ListItem> = string | string[] | ListType | ListType[];
13
+ export type DataContainerType = 'upsert' | 'update' | 'set' | 'delete';
14
+ export type ReferenceDataTypes<ListType extends ListItem = ListItem> = string | string[] | ListType | ListType[];
@@ -1,31 +1,31 @@
1
1
  import { FilterOptions } from './filter.types';
2
2
  import { DcuplItemOptions, DcuplItemsOptions } from './list.types';
3
- export declare type DcuplInitOptions = {
3
+ export type DcuplInitOptions = {
4
4
  config?: DcuplInitConfig;
5
5
  logs?: DcuplInitLoggingConfig;
6
6
  errorTracking?: DcuplInitErrorTrackingConfig;
7
7
  selection?: DcuplSelectionConfig;
8
8
  };
9
- export declare type DcuplInitErrorTrackingConfig = {
9
+ export type DcuplInitErrorTrackingConfig = {
10
10
  enabled: boolean;
11
11
  };
12
- export declare type DcuplSelectionConfig = {
12
+ export type DcuplSelectionConfig = {
13
13
  baseUrl: string;
14
14
  };
15
- export declare type DcuplInitLoggingConfig = {
15
+ export type DcuplInitLoggingConfig = {
16
16
  enabled: boolean;
17
17
  };
18
- export declare type DcuplInitConfig = {
18
+ export type DcuplInitConfig = {
19
19
  projectId?: string;
20
20
  apiKey?: string;
21
21
  version?: string;
22
22
  };
23
- export declare type DcuplErrorResponse = {
23
+ export type DcuplErrorResponse = {
24
24
  name?: string;
25
25
  message?: string;
26
26
  type?: 'fatal' | 'minor';
27
27
  };
28
- export declare type DcuplMetrics = {
28
+ export type DcuplMetrics = {
29
29
  total?: number;
30
30
  core?: number;
31
31
  };
@@ -33,20 +33,20 @@ export interface DcuplFunction {
33
33
  name: string;
34
34
  args: Array<any>;
35
35
  }
36
- export declare type DcuplResponse<T> = {
36
+ export type DcuplResponse<T> = {
37
37
  id?: string;
38
38
  func: DcuplFunction;
39
39
  result?: T;
40
40
  error?: DcuplErrorResponse;
41
41
  metrics: DcuplMetrics;
42
42
  };
43
- export declare type DcuplGlobalItemsOptions<T> = DcuplItemsOptions<T> & {
43
+ export type DcuplGlobalItemsOptions<T> = DcuplItemsOptions<T> & {
44
44
  listKey: string;
45
45
  };
46
- export declare type DcuplGlobalItemOptions<T> = DcuplItemOptions<T> & {
46
+ export type DcuplGlobalItemOptions<T> = DcuplItemOptions<T> & {
47
47
  listKey: string;
48
48
  };
49
- export declare type DcuplGlobalQueryOptions<T> = DcuplItemsOptions<T> & {
49
+ export type DcuplGlobalQueryOptions<T> = DcuplItemsOptions<T> & {
50
50
  listKey: string;
51
51
  query: FilterOptions[];
52
52
  };
@@ -1,31 +1,31 @@
1
1
  import { ListItem } from '.';
2
2
  import { CatalogApiOptions } from './list.types';
3
3
  import { FilterComparisonType } from './model.types';
4
- export declare type ConstraintTypes = 'referenceConstraint' | 'textConstraint' | 'numberConstraint' | 'dateConstraint';
5
- export declare type ConstraintBase = {
4
+ export type ConstraintTypes = 'referenceConstraint' | 'textConstraint' | 'numberConstraint' | 'dateConstraint';
5
+ export type ConstraintBase = {
6
6
  uid: string;
7
7
  filterKey: string;
8
8
  attributeKey: string;
9
9
  type: ConstraintTypes;
10
10
  };
11
- export declare type ReferenceConstraint = ConstraintBase & {
11
+ export type ReferenceConstraint = ConstraintBase & {
12
12
  type: 'referenceConstraint';
13
13
  value: string;
14
14
  calculateFacets: boolean;
15
15
  };
16
- export declare type TextConstraint = ConstraintBase & {
16
+ export type TextConstraint = ConstraintBase & {
17
17
  type: 'textConstraint';
18
18
  comparisonType: FilterComparisonType;
19
19
  value: string;
20
20
  };
21
- export declare type NumberConstraint = ConstraintBase & NumberConstraintOperators & {
21
+ export type NumberConstraint = ConstraintBase & NumberConstraintOperators & {
22
22
  type: 'numberConstraint';
23
23
  };
24
- export declare type DateConstraint = ConstraintBase & DateConstraintOperators & {
24
+ export type DateConstraint = ConstraintBase & DateConstraintOperators & {
25
25
  type: 'dateConstraint';
26
26
  };
27
- export declare type FilterConstraint = ReferenceConstraint | TextConstraint | NumberConstraint | DateConstraint;
28
- export declare type NumberConstraintOperators = {
27
+ export type FilterConstraint = ReferenceConstraint | TextConstraint | NumberConstraint | DateConstraint;
28
+ export type NumberConstraintOperators = {
29
29
  gt?: number;
30
30
  lt?: number;
31
31
  gte?: number;
@@ -33,7 +33,7 @@ export declare type NumberConstraintOperators = {
33
33
  eq?: number | number[];
34
34
  ne?: number | number[];
35
35
  };
36
- export declare type DateConstraintOperators = {
36
+ export type DateConstraintOperators = {
37
37
  gt?: Date;
38
38
  lt?: Date;
39
39
  gte?: Date;
@@ -41,18 +41,18 @@ export declare type DateConstraintOperators = {
41
41
  eq?: Date | Date[];
42
42
  ne?: Date | Date[];
43
43
  };
44
- export declare type FilterEntryNumberRange = {
44
+ export type FilterEntryNumberRange = {
45
45
  min: number;
46
46
  max: number;
47
47
  };
48
- export declare type FilterEntryDateRange = {
48
+ export type FilterEntryDateRange = {
49
49
  min: Date;
50
50
  max: Date;
51
51
  };
52
- export declare type FilterItemType = 'reference' | 'number' | 'text' | 'date';
53
- export declare type FilterItemPropertyType = 'number' | 'text' | 'date';
54
- export declare type FilterItemReferenceType = 'reference';
55
- export declare type FilterItemBase = {
52
+ export type FilterItemType = 'reference' | 'number' | 'text' | 'date';
53
+ export type FilterItemPropertyType = 'number' | 'text' | 'date';
54
+ export type FilterItemReferenceType = 'reference';
55
+ export type FilterItemBase = {
56
56
  key: string;
57
57
  attributeKey: string;
58
58
  enabled: boolean;
@@ -62,36 +62,36 @@ export declare type FilterItemBase = {
62
62
  range?: FilterItemNumberRangeValue | FilterItemDateRangeValue;
63
63
  entries?: Array<FilterItemEntry>;
64
64
  };
65
- export declare type TextFilterItem = FilterItemBase & {
65
+ export type TextFilterItem = FilterItemBase & {
66
66
  type: 'text';
67
67
  comparisonType: FilterComparisonType;
68
68
  text: string;
69
69
  };
70
- export declare type NumberFilterItem = FilterItemBase & {
70
+ export type NumberFilterItem = FilterItemBase & {
71
71
  type: 'number';
72
72
  range: FilterItemNumberRangeValue;
73
73
  };
74
- export declare type DateFilterItem = FilterItemBase & {
74
+ export type DateFilterItem = FilterItemBase & {
75
75
  type: 'date';
76
76
  range: FilterItemDateRangeValue;
77
77
  };
78
- export declare type FilterItemNumberRangeValue = {
78
+ export type FilterItemNumberRangeValue = {
79
79
  available: FilterEntryNumberRange;
80
80
  initial: FilterEntryNumberRange;
81
81
  selected: NumberConstraintOperators[];
82
82
  };
83
- export declare type FilterItemDateRangeValue = {
83
+ export type FilterItemDateRangeValue = {
84
84
  available: FilterEntryDateRange;
85
85
  initial: FilterEntryDateRange;
86
86
  selected: DateConstraintOperators[];
87
87
  };
88
- export declare type ReferenceFilterItem = FilterItemBase & {
88
+ export type ReferenceFilterItem = FilterItemBase & {
89
89
  type: 'reference';
90
90
  entries: Array<FilterItemEntry>;
91
91
  };
92
- export declare type PropertyFilterItem = TextFilterItem | NumberFilterItem | DateFilterItem;
93
- export declare type FilterItem = PropertyFilterItem | ReferenceFilterItem;
94
- export declare type FilterItemEntry = {
92
+ export type PropertyFilterItem = TextFilterItem | NumberFilterItem | DateFilterItem;
93
+ export type FilterItem = PropertyFilterItem | ReferenceFilterItem;
94
+ export type FilterItemEntry = {
95
95
  key: string;
96
96
  enabled: boolean;
97
97
  selected: boolean;
@@ -101,8 +101,8 @@ export declare type FilterItemEntry = {
101
101
  resultKeys: string[];
102
102
  children?: Array<FilterItemEntry>;
103
103
  };
104
- export declare type FilterMode = 'add' | 'set';
105
- export declare type BaseFilterOptions = {
104
+ export type FilterMode = 'add' | 'set';
105
+ export type BaseFilterOptions = {
106
106
  type: FilterType;
107
107
  filterKey: string;
108
108
  /**
@@ -111,24 +111,24 @@ export declare type BaseFilterOptions = {
111
111
  */
112
112
  mode?: FilterMode;
113
113
  } & CatalogApiOptions;
114
- export declare type FilterType = 'text' | 'number' | 'reference' | 'date';
115
- declare type TextFilterOptionsFull = BaseFilterOptions & {
114
+ export type FilterType = 'text' | 'number' | 'reference' | 'date';
115
+ type TextFilterOptionsFull = BaseFilterOptions & {
116
116
  type: 'text';
117
117
  text: string;
118
118
  };
119
- declare type NumberFilterOptionsFull = BaseFilterOptions & NumberConstraintOperators & {
119
+ type NumberFilterOptionsFull = BaseFilterOptions & NumberConstraintOperators & {
120
120
  type: 'number';
121
121
  };
122
- declare type DateFilterOptionsFull = BaseFilterOptions & DateConstraintOperators & {
122
+ type DateFilterOptionsFull = BaseFilterOptions & DateConstraintOperators & {
123
123
  type: 'date';
124
124
  };
125
- declare type ReferenceFilterOptionsFull = BaseFilterOptions & {
125
+ type ReferenceFilterOptionsFull = BaseFilterOptions & {
126
126
  type: 'reference';
127
127
  itemKeys: string[];
128
128
  };
129
- export declare type FilterOptions = TextFilterOptionsFull | NumberFilterOptionsFull | DateFilterOptionsFull | ReferenceFilterOptionsFull;
130
- export declare type TextFilterOptions = Omit<TextFilterOptionsFull, 'type'>;
131
- export declare type NumberFilterOptions = Omit<NumberFilterOptionsFull, 'type'>;
132
- export declare type DateFilterOptions = Omit<DateFilterOptionsFull, 'type'>;
133
- export declare type ReferenceFilterOptions = Omit<ReferenceFilterOptionsFull, 'type'>;
129
+ export type FilterOptions = TextFilterOptionsFull | NumberFilterOptionsFull | DateFilterOptionsFull | ReferenceFilterOptionsFull;
130
+ export type TextFilterOptions = Omit<TextFilterOptionsFull, 'type'>;
131
+ export type NumberFilterOptions = Omit<NumberFilterOptionsFull, 'type'>;
132
+ export type DateFilterOptions = Omit<DateFilterOptionsFull, 'type'>;
133
+ export type ReferenceFilterOptions = Omit<ReferenceFilterOptionsFull, 'type'>;
134
134
  export {};
@@ -1,5 +1,5 @@
1
1
  import { ListItem } from './data.types';
2
- export declare type InverseIndexReferenceMap = Map<string, InverseIndexValuesMap>;
3
- export declare type InverseIndexValuesMap = Map<string, string[]>;
4
- export declare type InverseIndexDataMap = Map<string, InverseIndexDataValuesMap>;
5
- export declare type InverseIndexDataValuesMap = Map<string, ListItem>;
2
+ export type InverseIndexReferenceMap = Map<string, InverseIndexValuesMap>;
3
+ export type InverseIndexValuesMap = Map<string, string[]>;
4
+ export type InverseIndexDataMap = Map<string, InverseIndexDataValuesMap>;
5
+ export type InverseIndexDataValuesMap = Map<string, ListItem>;
@@ -1,50 +1,52 @@
1
1
  import { FilterConstraint } from './filter.types';
2
2
  import { ViewDefinition, ModelAttribute } from './model.types';
3
3
  import { Projection, SortingProjection } from './projection.types';
4
- export declare type DcuplItemsOptions<T> = {
4
+ export type DcuplItemsOptions<T> = {
5
5
  start?: number;
6
6
  count?: number;
7
7
  projection?: Projection<T>;
8
8
  sort?: SortingProjection<T>;
9
9
  };
10
- export declare type DcuplItemOptions<T> = {
10
+ export type DcuplItemOptions<T> = {
11
11
  projection?: Projection<T>;
12
12
  itemKey: string;
13
13
  };
14
- export declare type DcuplSectionItemOption<T> = DcuplItemsOptions<T> & {
14
+ export type DcuplSectionItemOption<T> = DcuplItemsOptions<T> & {
15
15
  key: string;
16
16
  };
17
- export declare type DcuplSectionOptions<T> = DcuplItemsOptions<T> & {
17
+ export type DcuplSectionOptions<T> = DcuplItemsOptions<T> & {
18
18
  primaryAttribute: string;
19
19
  aggregates?: string[];
20
20
  items?: DcuplSectionItemOption<T>[];
21
21
  };
22
- export declare type DcuplFilterOptions = CatalogApiOptions & {
22
+ export type DcuplFilterOptions = CatalogApiOptions & {
23
23
  calculateFacets?: boolean;
24
24
  excludeZeros?: boolean;
25
+ excludeUndefineds?: boolean;
25
26
  count?: number;
26
27
  };
27
- export declare type DcuplFiltersOptions = DcuplFilterOptions & {
28
+ export type DcuplFiltersOptions = DcuplFilterOptions & {
28
29
  filterKeys?: string[];
29
30
  };
30
- export declare type DcuplListOptions<ModelNames extends string = string> = {
31
+ export type DcuplListOptions<ModelNames extends string = string> = {
31
32
  listKey: ModelNames;
32
33
  name?: string;
33
34
  listItemKeys?: string[];
34
35
  empty?: boolean;
35
36
  };
36
- export declare type DcuplRangeOptions = {
37
+ export type DcuplRangeOptions = {
37
38
  propertyKey: string;
38
39
  filterKey?: string;
39
40
  };
40
- export declare type DcuplFacetOptions = {
41
+ export type DcuplFacetOptions = {
41
42
  attributeKey: string;
42
43
  filterKey?: string;
43
44
  count?: number;
44
45
  excludeZeros?: boolean;
46
+ excludeUndefineds?: boolean;
45
47
  calculateFacets?: boolean;
46
48
  };
47
- export declare type ListMetadata = {
49
+ export type ListMetadata = {
48
50
  key: string;
49
51
  currentSize: number;
50
52
  initialSize: number;
@@ -53,49 +55,49 @@ export declare type ListMetadata = {
53
55
  itemOptions: DcuplItemsOptions<any>;
54
56
  views: ViewDefinition[];
55
57
  };
56
- export declare type ViewMetadata = {
58
+ export type ViewMetadata = {
57
59
  key: string;
58
60
  currentSize: number;
59
61
  initialSize: number;
60
62
  };
61
- export declare type AggregationOptions = {
63
+ export type AggregationOptions = {
62
64
  attributeKeys: string[];
63
65
  };
64
- export declare type AggregateType = 'number' | 'reference' | 'string';
65
- export declare type AggregateBase = {
66
+ export type AggregateType = 'number' | 'reference' | 'string';
67
+ export type AggregateBase = {
66
68
  attribute: string;
67
69
  type: AggregateType;
68
70
  };
69
- export declare type NumberAggregation = AggregateBase & {
71
+ export type NumberAggregation = AggregateBase & {
70
72
  attribute: string;
71
73
  type: 'number';
72
74
  value: NumberAggregationValue;
73
75
  };
74
- export declare type ReferenceAggregation = AggregateBase & {
76
+ export type ReferenceAggregation = AggregateBase & {
75
77
  attribute: string;
76
78
  type: 'reference';
77
79
  value: ReferenceAggregationValue[];
78
80
  };
79
- export declare type StringAggregation = AggregateBase & {
81
+ export type StringAggregation = AggregateBase & {
80
82
  attribute: string;
81
83
  type: 'string';
82
84
  value: StringAggregationValue[];
83
85
  };
84
- export declare type Aggregation = NumberAggregation | StringAggregation | ReferenceAggregation;
85
- export declare type NumberAggregationValue = {
86
+ export type Aggregation = NumberAggregation | StringAggregation | ReferenceAggregation;
87
+ export type NumberAggregationValue = {
86
88
  average: number;
87
89
  count: number;
88
90
  sum: number;
89
91
  };
90
- export declare type ReferenceAggregationValue = {
92
+ export type ReferenceAggregationValue = {
91
93
  value: string;
92
94
  count: number;
93
95
  itemKeys: string[];
94
96
  };
95
- export declare type StringAggregationValue = {
97
+ export type StringAggregationValue = {
96
98
  value: string;
97
99
  count: number;
98
100
  };
99
- export declare type CatalogApiOptions = {
101
+ export type CatalogApiOptions = {
100
102
  skipProcessing?: boolean;
101
103
  };
@@ -1,5 +1,5 @@
1
1
  import { RawItem } from '.';
2
- export declare type PropertyType = 'string' | 'int' | 'float' | 'json' | 'date' | 'any' | 'Array<string>' | 'Array<int>' | 'Array<float>' | 'Array<date>';
2
+ export type PropertyType = 'string' | 'int' | 'float' | 'json' | 'date' | 'any' | 'Array<string>' | 'Array<int>' | 'Array<float>' | 'Array<date>';
3
3
  export declare const NumberPropertyTypes: PropertyType[];
4
4
  export declare const DatePropertyTypes: PropertyType[];
5
5
  /**
@@ -14,20 +14,20 @@ export declare const DatePropertyTypes: PropertyType[];
14
14
  * @ignoreThis 2
15
15
  * @important
16
16
  */
17
- export declare type ReferenceType = 'singleValued' | 'multiValued';
18
- export declare type AttributeType = PropertyType | ReferenceType;
19
- export declare type ModelMetadata = {
17
+ export type ReferenceType = 'singleValued' | 'multiValued';
18
+ export type AttributeType = PropertyType | ReferenceType;
19
+ export type ModelMetadata = {
20
20
  name: string;
21
21
  description?: string;
22
22
  [key: string]: any;
23
23
  };
24
- export declare type FilterComparisonType = 'equal' | 'equalIgnoreCase' | 'contains' | 'containsIgnoreCase' | 'containsIgnoreCaseAndWhitespace';
24
+ export type FilterComparisonType = 'equal' | 'equalIgnoreCase' | 'contains' | 'containsIgnoreCase' | 'containsIgnoreCaseAndWhitespace';
25
25
  /**
26
26
  * A property is a quality or characteristic belonging an object.
27
27
  * @defaultSnippets {"label":"Property", "properties":["key","type"]}
28
28
  *
29
29
  */
30
- declare type PropertyBase = {
30
+ type PropertyBase = {
31
31
  /**
32
32
  * A key is an unique identifier overall properties in this model.
33
33
  *
@@ -44,74 +44,76 @@ declare type PropertyBase = {
44
44
  separator?: string;
45
45
  };
46
46
  meta?: ModelMetadata;
47
+ index?: boolean;
47
48
  };
48
- export declare type PropertyInt = PropertyBase & {
49
+ export type PropertyInt = PropertyBase & {
49
50
  type: 'int' | 'Array<int>';
50
51
  aggregate?: boolean;
51
52
  filter?: boolean | FilterNumberArray[];
52
53
  };
53
- export declare type PropertyFloat = PropertyBase & {
54
+ export type PropertyFloat = PropertyBase & {
54
55
  type: 'float' | 'Array<float>';
55
56
  aggregate?: boolean;
56
57
  fractionDigits?: number;
57
58
  filter?: boolean | FilterNumberArray[];
58
59
  };
59
- export declare type FilterNumberArray = {
60
+ export type FilterNumberArray = {
60
61
  key: string;
61
62
  };
62
- export declare type PropertyJson = PropertyBase & {
63
+ export type PropertyJson = PropertyBase & {
63
64
  type: 'json' | 'Array<json>';
64
65
  filter?: boolean;
65
66
  };
66
- export declare type PropertyAny = PropertyBase & {
67
+ export type PropertyAny = PropertyBase & {
67
68
  type: 'any' | 'Array<any>';
68
69
  };
69
- export declare type PropertyDateInputFormat = 'date' | 'ts_seconds' | 'ts_milliseconds' | 'string';
70
- export declare type PropertyDate = PropertyBase & {
70
+ export type PropertyDateInputFormat = 'date' | 'ts_seconds' | 'ts_milliseconds' | 'string';
71
+ export type PropertyDate = PropertyBase & {
71
72
  type: 'date' | 'Array<date>';
72
73
  inputFormat?: PropertyDateInputFormat;
73
74
  filter?: boolean;
74
75
  };
75
- export declare type PropertyString = PropertyBase & {
76
+ export type PropertyString = PropertyBase & {
76
77
  type: 'string' | 'Array<string>';
77
78
  filter?: boolean | FilterStringSingle | FilterStringArray[];
78
79
  };
79
- export declare type PropertyExpression = PropertyBase & {
80
+ export type PropertyExpression = PropertyBase & {
80
81
  type: 'string';
81
82
  expression: string;
82
83
  filter?: boolean | FilterStringSingle | FilterStringArray[];
83
84
  };
84
- export declare type PropertyNumber = PropertyFloat | PropertyInt;
85
- export declare type Property = PropertyExpression | PropertyString | PropertyInt | PropertyFloat | PropertyDate | PropertyJson | PropertyAny;
86
- export declare type PropertyDerived = Property & {
85
+ export type PropertyNumber = PropertyFloat | PropertyInt;
86
+ export type Property = PropertyExpression | PropertyString | PropertyInt | PropertyFloat | PropertyDate | PropertyJson | PropertyAny;
87
+ export type PropertyDerived = Property & {
87
88
  derive: {
88
89
  localReference: string;
89
90
  remoteProperty: string;
90
91
  };
91
92
  };
92
- export declare type PropertyAggregate = (PropertyNumber | PropertyString) & {
93
+ export type PropertyAggregate = (PropertyNumber | PropertyString) & {
93
94
  aggregate: true;
94
95
  };
95
- export declare type FilterStringArray = {
96
+ export type FilterStringArray = {
96
97
  key: string;
97
98
  comparisonType: FilterComparisonType;
98
99
  };
99
- export declare type FilterStringSingle = {
100
+ export type FilterStringSingle = {
100
101
  comparisonType?: FilterComparisonType;
101
102
  };
102
103
  /**
103
104
  * Facet calculation is disabled by default
104
105
  */
105
- export declare type ReferenceFilterDefinition = {
106
+ export type ReferenceFilterDefinition = {
106
107
  calculateFacets?: boolean;
107
108
  excludeZeros?: boolean;
109
+ excludeUndefineds?: boolean;
108
110
  };
109
- export declare type ReferenceValidity = 'loose' | 'strict';
111
+ export type ReferenceValidity = 'loose' | 'strict';
110
112
  /**
111
113
  * A Reference prepresent a list of elements along a explicite dimension.
112
114
  * @defaultSnippets {"label":"Reference", "properties":["key","model", "type"]}
113
115
  */
114
- export declare type ReferenceBase = {
116
+ export type ReferenceBase = {
115
117
  /**
116
118
  * A key is an unique identifier for all reference in this model.
117
119
  *
@@ -135,11 +137,12 @@ export declare type ReferenceBase = {
135
137
  validity?: ReferenceValidity;
136
138
  aggregate?: boolean;
137
139
  meta?: ModelMetadata;
140
+ index?: boolean;
138
141
  };
139
- export declare type AggregatedReference = ReferenceBase & {
142
+ export type AggregatedReference = ReferenceBase & {
140
143
  aggregate: true;
141
144
  };
142
- export declare type ResolvedReference = ReferenceBase & {
145
+ export type ResolvedReference = ReferenceBase & {
143
146
  type: 'multiValued';
144
147
  /**
145
148
  * Resolve a Relationship to an foreign model
@@ -163,7 +166,7 @@ export declare type ResolvedReference = ReferenceBase & {
163
166
  model: string;
164
167
  };
165
168
  };
166
- export declare type DerivedReference = ReferenceBase & {
169
+ export type DerivedReference = ReferenceBase & {
167
170
  type: ReferenceType;
168
171
  /**
169
172
  * Derive a specific value from an other object/entity
@@ -186,7 +189,7 @@ export declare type DerivedReference = ReferenceBase & {
186
189
  remoteReference: string;
187
190
  };
188
191
  };
189
- export declare type GroupedRefeference = ReferenceBase & {
192
+ export type GroupedRefeference = ReferenceBase & {
190
193
  type: ReferenceType;
191
194
  /**
192
195
  * Group by a specific reference
@@ -203,23 +206,23 @@ export declare type GroupedRefeference = ReferenceBase & {
203
206
  includeSelfInGroup?: boolean;
204
207
  };
205
208
  };
206
- export declare type Reference = ResolvedReference | DerivedReference | GroupedRefeference | ReferenceBase;
207
- export declare type ValueMappingValue = string | '$dcupl_falsy';
208
- export declare type ValueMappingValues = {
209
+ export type Reference = ResolvedReference | DerivedReference | GroupedRefeference | ReferenceBase;
210
+ export type ValueMappingValue = string | '$dcupl_falsy';
211
+ export type ValueMappingValues = {
209
212
  from: ValueMappingValue[];
210
213
  to: string;
211
214
  };
212
- export declare type ValueMappingConfig = {
215
+ export type ValueMappingConfig = {
213
216
  attributes: string[];
214
217
  values: ValueMappingValues[];
215
218
  };
216
- export declare type ModelAttribute = Property | Reference;
219
+ export type ModelAttribute = Property | Reference;
217
220
  /**
218
221
  * A model describes a real world object and hols attributes.
219
222
  *
220
223
  * @defaultSnippets {"label":"Model Description", "properties":["key:string", "properties:array", "references:array"]}
221
224
  */
222
- export declare type ModelDefinition<ModelNames extends string = string> = {
225
+ export type ModelDefinition<ModelNames extends string = string> = {
223
226
  /**
224
227
  * The key is an unique identifier overall models in the application.
225
228
  *
@@ -235,13 +238,13 @@ export declare type ModelDefinition<ModelNames extends string = string> = {
235
238
  valueMappings?: ValueMappingConfig[];
236
239
  meta?: ModelMetadata;
237
240
  };
238
- export declare type DcuplViewType = 'section';
241
+ export type DcuplViewType = 'section';
239
242
  /**
240
243
  * A model describes a real world object and hols attributes.
241
244
  *
242
245
  * @defaultSnippets { "label": "Dcupl View", "properties": ["key", "model", "type", "primaryAttribute", "aggregates:array"] }
243
246
  */
244
- export declare type ViewDefinition = {
247
+ export type ViewDefinition = {
245
248
  /**
246
249
  * The key is an unique identifier overall models in the application.
247
250
  *
@@ -267,5 +270,5 @@ export declare type ViewDefinition = {
267
270
  * Container for ModelDescriptions & Views
268
271
  *
269
272
  */
270
- export declare type Model = ViewDefinition | ModelDefinition | Array<ModelDefinition | ViewDefinition>;
273
+ export type Model = ViewDefinition | ModelDefinition | Array<ModelDefinition | ViewDefinition>;
271
274
  export {};
@@ -1,14 +1,15 @@
1
- declare type ArrayOfProperties<T, P extends keyof T> = Exclude<P, 'filterables'>[];
2
- declare type WildCard = {
1
+ type ArrayOfProperties<T, P extends keyof T> = Exclude<P, 'filterables'>[];
2
+ type WildCard = {
3
3
  $?: boolean;
4
+ $$?: boolean;
4
5
  };
5
- declare type CleanResultItem<T> = Omit<T, 'filterables'>;
6
- export declare type ProjectionAdvanced<T> = {
6
+ type CleanResultItem<T> = Omit<T, 'filterables'>;
7
+ export type ProjectionAdvanced<T> = {
7
8
  [P in keyof CleanResultItem<T>]?: boolean | WildCard | ProjectionAdvanced<T[P]>;
8
9
  };
9
- export declare type Projection<T> = WildCard | ProjectionAdvanced<T>;
10
- export declare type SortDirection = 'ASC' | 'DESC';
11
- export declare type SortingProjection<T> = {
10
+ export type Projection<T> = WildCard | ProjectionAdvanced<T>;
11
+ export type SortDirection = 'ASC' | 'DESC';
12
+ export type SortingProjection<T> = {
12
13
  attributes: ArrayOfProperties<T, keyof T>;
13
14
  order: SortDirection[];
14
15
  };
@@ -1,6 +1,6 @@
1
1
  import { ListItem } from './data.types';
2
2
  import { Aggregation } from './list.types';
3
- export declare type SectionItem = ListItem & {
3
+ export type SectionItem = ListItem & {
4
4
  _meta: {
5
5
  size: number;
6
6
  };
@@ -1,11 +1,11 @@
1
- export declare type DcuplSelectionProperty = {
1
+ export type DcuplSelectionProperty = {
2
2
  [key: string]: any;
3
3
  };
4
- export declare type DcuplSelectionItem = {
4
+ export type DcuplSelectionItem = {
5
5
  key: string;
6
6
  properties: DcuplSelectionProperty;
7
7
  };
8
- export declare type DcuplSelection = {
8
+ export type DcuplSelection = {
9
9
  uid?: string;
10
10
  selectionKey: string;
11
11
  listKey?: string;
@@ -1,14 +1,14 @@
1
1
  import { CatalogApiOptions } from './list.types';
2
2
  import { FilterComparisonType } from './model.types';
3
- export declare type SuggestionValueEntry = {
3
+ export type SuggestionValueEntry = {
4
4
  key: string;
5
5
  value: string;
6
6
  };
7
- export declare type Suggestion<T extends string | SuggestionValueEntry = string> = {
7
+ export type Suggestion<T extends string | SuggestionValueEntry = string> = {
8
8
  value: T;
9
9
  filterKey: string;
10
10
  };
11
- export declare type SuggestionOptions = CatalogApiOptions & {
11
+ export type SuggestionOptions = CatalogApiOptions & {
12
12
  filterKey: string;
13
13
  searchTerm: string;
14
14
  max?: number;