@dcupl/common 0.0.73 → 0.0.75

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 (45) 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.js +2 -1
  5. package/dist/lib-cjs/getFacetEntries.js.map +1 -1
  6. package/dist/lib-cjs/index.d.ts +1 -0
  7. package/dist/lib-cjs/index.js +1 -0
  8. package/dist/lib-cjs/index.js.map +1 -1
  9. package/dist/lib-cjs/performance.d.ts +3 -0
  10. package/dist/lib-cjs/performance.js +9 -0
  11. package/dist/lib-cjs/performance.js.map +1 -0
  12. package/dist/lib-cjs/tsconfig-cjs.tsbuildinfo +1 -1
  13. package/dist/lib-cjs/types/data.types.d.ts +5 -5
  14. package/dist/lib-cjs/types/dcupl.types.d.ts +11 -11
  15. package/dist/lib-cjs/types/filter.types.d.ts +36 -36
  16. package/dist/lib-cjs/types/internal.types.d.ts +4 -4
  17. package/dist/lib-cjs/types/list.types.d.ts +22 -22
  18. package/dist/lib-cjs/types/model.types.d.ts +37 -37
  19. package/dist/lib-cjs/types/projection.types.d.ts +8 -7
  20. package/dist/lib-cjs/types/section.types.d.ts +1 -1
  21. package/dist/lib-cjs/types/selection.types.d.ts +3 -3
  22. package/dist/lib-cjs/types/suggestion.types.d.ts +3 -3
  23. package/dist/lib-esm/changeDetection.d.ts +5 -5
  24. package/dist/lib-esm/changeDetection.js +4 -3
  25. package/dist/lib-esm/changeDetection.js.map +1 -1
  26. package/dist/lib-esm/getFacetEntries.js +2 -1
  27. package/dist/lib-esm/getFacetEntries.js.map +1 -1
  28. package/dist/lib-esm/index.d.ts +1 -0
  29. package/dist/lib-esm/index.js +1 -0
  30. package/dist/lib-esm/index.js.map +1 -1
  31. package/dist/lib-esm/performance.d.ts +3 -0
  32. package/dist/lib-esm/performance.js +6 -0
  33. package/dist/lib-esm/performance.js.map +1 -0
  34. package/dist/lib-esm/tsconfig.tsbuildinfo +1 -1
  35. package/dist/lib-esm/types/data.types.d.ts +5 -5
  36. package/dist/lib-esm/types/dcupl.types.d.ts +11 -11
  37. package/dist/lib-esm/types/filter.types.d.ts +36 -36
  38. package/dist/lib-esm/types/internal.types.d.ts +4 -4
  39. package/dist/lib-esm/types/list.types.d.ts +22 -22
  40. package/dist/lib-esm/types/model.types.d.ts +37 -37
  41. package/dist/lib-esm/types/projection.types.d.ts +8 -7
  42. package/dist/lib-esm/types/section.types.d.ts +1 -1
  43. package/dist/lib-esm/types/selection.types.d.ts +3 -3
  44. package/dist/lib-esm/types/suggestion.types.d.ts +3 -3
  45. 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,44 +1,44 @@
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
25
  excludeUndefineds?: boolean;
26
26
  count?: number;
27
27
  };
28
- export declare type DcuplFiltersOptions = DcuplFilterOptions & {
28
+ export type DcuplFiltersOptions = DcuplFilterOptions & {
29
29
  filterKeys?: string[];
30
30
  };
31
- export declare type DcuplListOptions<ModelNames extends string = string> = {
31
+ export type DcuplListOptions<ModelNames extends string = string> = {
32
32
  listKey: ModelNames;
33
33
  name?: string;
34
34
  listItemKeys?: string[];
35
35
  empty?: boolean;
36
36
  };
37
- export declare type DcuplRangeOptions = {
37
+ export type DcuplRangeOptions = {
38
38
  propertyKey: string;
39
39
  filterKey?: string;
40
40
  };
41
- export declare type DcuplFacetOptions = {
41
+ export type DcuplFacetOptions = {
42
42
  attributeKey: string;
43
43
  filterKey?: string;
44
44
  count?: number;
@@ -46,7 +46,7 @@ export declare type DcuplFacetOptions = {
46
46
  excludeUndefineds?: boolean;
47
47
  calculateFacets?: boolean;
48
48
  };
49
- export declare type ListMetadata = {
49
+ export type ListMetadata = {
50
50
  key: string;
51
51
  currentSize: number;
52
52
  initialSize: number;
@@ -55,49 +55,49 @@ export declare type ListMetadata = {
55
55
  itemOptions: DcuplItemsOptions<any>;
56
56
  views: ViewDefinition[];
57
57
  };
58
- export declare type ViewMetadata = {
58
+ export type ViewMetadata = {
59
59
  key: string;
60
60
  currentSize: number;
61
61
  initialSize: number;
62
62
  };
63
- export declare type AggregationOptions = {
63
+ export type AggregationOptions = {
64
64
  attributeKeys: string[];
65
65
  };
66
- export declare type AggregateType = 'number' | 'reference' | 'string';
67
- export declare type AggregateBase = {
66
+ export type AggregateType = 'number' | 'reference' | 'string';
67
+ export type AggregateBase = {
68
68
  attribute: string;
69
69
  type: AggregateType;
70
70
  };
71
- export declare type NumberAggregation = AggregateBase & {
71
+ export type NumberAggregation = AggregateBase & {
72
72
  attribute: string;
73
73
  type: 'number';
74
74
  value: NumberAggregationValue;
75
75
  };
76
- export declare type ReferenceAggregation = AggregateBase & {
76
+ export type ReferenceAggregation = AggregateBase & {
77
77
  attribute: string;
78
78
  type: 'reference';
79
79
  value: ReferenceAggregationValue[];
80
80
  };
81
- export declare type StringAggregation = AggregateBase & {
81
+ export type StringAggregation = AggregateBase & {
82
82
  attribute: string;
83
83
  type: 'string';
84
84
  value: StringAggregationValue[];
85
85
  };
86
- export declare type Aggregation = NumberAggregation | StringAggregation | ReferenceAggregation;
87
- export declare type NumberAggregationValue = {
86
+ export type Aggregation = NumberAggregation | StringAggregation | ReferenceAggregation;
87
+ export type NumberAggregationValue = {
88
88
  average: number;
89
89
  count: number;
90
90
  sum: number;
91
91
  };
92
- export declare type ReferenceAggregationValue = {
92
+ export type ReferenceAggregationValue = {
93
93
  value: string;
94
94
  count: number;
95
95
  itemKeys: string[];
96
96
  };
97
- export declare type StringAggregationValue = {
97
+ export type StringAggregationValue = {
98
98
  value: string;
99
99
  count: number;
100
100
  };
101
- export declare type CatalogApiOptions = {
101
+ export type CatalogApiOptions = {
102
102
  skipProcessing?: boolean;
103
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
  *
@@ -46,74 +46,74 @@ declare type PropertyBase = {
46
46
  meta?: ModelMetadata;
47
47
  index?: boolean;
48
48
  };
49
- export declare type PropertyInt = PropertyBase & {
49
+ export type PropertyInt = PropertyBase & {
50
50
  type: 'int' | 'Array<int>';
51
51
  aggregate?: boolean;
52
52
  filter?: boolean | FilterNumberArray[];
53
53
  };
54
- export declare type PropertyFloat = PropertyBase & {
54
+ export type PropertyFloat = PropertyBase & {
55
55
  type: 'float' | 'Array<float>';
56
56
  aggregate?: boolean;
57
57
  fractionDigits?: number;
58
58
  filter?: boolean | FilterNumberArray[];
59
59
  };
60
- export declare type FilterNumberArray = {
60
+ export type FilterNumberArray = {
61
61
  key: string;
62
62
  };
63
- export declare type PropertyJson = PropertyBase & {
63
+ export type PropertyJson = PropertyBase & {
64
64
  type: 'json' | 'Array<json>';
65
65
  filter?: boolean;
66
66
  };
67
- export declare type PropertyAny = PropertyBase & {
67
+ export type PropertyAny = PropertyBase & {
68
68
  type: 'any' | 'Array<any>';
69
69
  };
70
- export declare type PropertyDateInputFormat = 'date' | 'ts_seconds' | 'ts_milliseconds' | 'string';
71
- export declare type PropertyDate = PropertyBase & {
70
+ export type PropertyDateInputFormat = 'date' | 'ts_seconds' | 'ts_milliseconds' | 'string';
71
+ export type PropertyDate = PropertyBase & {
72
72
  type: 'date' | 'Array<date>';
73
73
  inputFormat?: PropertyDateInputFormat;
74
74
  filter?: boolean;
75
75
  };
76
- export declare type PropertyString = PropertyBase & {
76
+ export type PropertyString = PropertyBase & {
77
77
  type: 'string' | 'Array<string>';
78
78
  filter?: boolean | FilterStringSingle | FilterStringArray[];
79
79
  };
80
- export declare type PropertyExpression = PropertyBase & {
80
+ export type PropertyExpression = PropertyBase & {
81
81
  type: 'string';
82
82
  expression: string;
83
83
  filter?: boolean | FilterStringSingle | FilterStringArray[];
84
84
  };
85
- export declare type PropertyNumber = PropertyFloat | PropertyInt;
86
- export declare type Property = PropertyExpression | PropertyString | PropertyInt | PropertyFloat | PropertyDate | PropertyJson | PropertyAny;
87
- 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 & {
88
88
  derive: {
89
89
  localReference: string;
90
90
  remoteProperty: string;
91
91
  };
92
92
  };
93
- export declare type PropertyAggregate = (PropertyNumber | PropertyString) & {
93
+ export type PropertyAggregate = (PropertyNumber | PropertyString) & {
94
94
  aggregate: true;
95
95
  };
96
- export declare type FilterStringArray = {
96
+ export type FilterStringArray = {
97
97
  key: string;
98
98
  comparisonType: FilterComparisonType;
99
99
  };
100
- export declare type FilterStringSingle = {
100
+ export type FilterStringSingle = {
101
101
  comparisonType?: FilterComparisonType;
102
102
  };
103
103
  /**
104
104
  * Facet calculation is disabled by default
105
105
  */
106
- export declare type ReferenceFilterDefinition = {
106
+ export type ReferenceFilterDefinition = {
107
107
  calculateFacets?: boolean;
108
108
  excludeZeros?: boolean;
109
109
  excludeUndefineds?: boolean;
110
110
  };
111
- export declare type ReferenceValidity = 'loose' | 'strict';
111
+ export type ReferenceValidity = 'loose' | 'strict';
112
112
  /**
113
113
  * A Reference prepresent a list of elements along a explicite dimension.
114
114
  * @defaultSnippets {"label":"Reference", "properties":["key","model", "type"]}
115
115
  */
116
- export declare type ReferenceBase = {
116
+ export type ReferenceBase = {
117
117
  /**
118
118
  * A key is an unique identifier for all reference in this model.
119
119
  *
@@ -139,10 +139,10 @@ export declare type ReferenceBase = {
139
139
  meta?: ModelMetadata;
140
140
  index?: boolean;
141
141
  };
142
- export declare type AggregatedReference = ReferenceBase & {
142
+ export type AggregatedReference = ReferenceBase & {
143
143
  aggregate: true;
144
144
  };
145
- export declare type ResolvedReference = ReferenceBase & {
145
+ export type ResolvedReference = ReferenceBase & {
146
146
  type: 'multiValued';
147
147
  /**
148
148
  * Resolve a Relationship to an foreign model
@@ -166,7 +166,7 @@ export declare type ResolvedReference = ReferenceBase & {
166
166
  model: string;
167
167
  };
168
168
  };
169
- export declare type DerivedReference = ReferenceBase & {
169
+ export type DerivedReference = ReferenceBase & {
170
170
  type: ReferenceType;
171
171
  /**
172
172
  * Derive a specific value from an other object/entity
@@ -189,7 +189,7 @@ export declare type DerivedReference = ReferenceBase & {
189
189
  remoteReference: string;
190
190
  };
191
191
  };
192
- export declare type GroupedRefeference = ReferenceBase & {
192
+ export type GroupedRefeference = ReferenceBase & {
193
193
  type: ReferenceType;
194
194
  /**
195
195
  * Group by a specific reference
@@ -206,23 +206,23 @@ export declare type GroupedRefeference = ReferenceBase & {
206
206
  includeSelfInGroup?: boolean;
207
207
  };
208
208
  };
209
- export declare type Reference = ResolvedReference | DerivedReference | GroupedRefeference | ReferenceBase;
210
- export declare type ValueMappingValue = string | '$dcupl_falsy';
211
- export declare type ValueMappingValues = {
209
+ export type Reference = ResolvedReference | DerivedReference | GroupedRefeference | ReferenceBase;
210
+ export type ValueMappingValue = string | '$dcupl_falsy';
211
+ export type ValueMappingValues = {
212
212
  from: ValueMappingValue[];
213
213
  to: string;
214
214
  };
215
- export declare type ValueMappingConfig = {
215
+ export type ValueMappingConfig = {
216
216
  attributes: string[];
217
217
  values: ValueMappingValues[];
218
218
  };
219
- export declare type ModelAttribute = Property | Reference;
219
+ export type ModelAttribute = Property | Reference;
220
220
  /**
221
221
  * A model describes a real world object and hols attributes.
222
222
  *
223
223
  * @defaultSnippets {"label":"Model Description", "properties":["key:string", "properties:array", "references:array"]}
224
224
  */
225
- export declare type ModelDefinition<ModelNames extends string = string> = {
225
+ export type ModelDefinition<ModelNames extends string = string> = {
226
226
  /**
227
227
  * The key is an unique identifier overall models in the application.
228
228
  *
@@ -238,13 +238,13 @@ export declare type ModelDefinition<ModelNames extends string = string> = {
238
238
  valueMappings?: ValueMappingConfig[];
239
239
  meta?: ModelMetadata;
240
240
  };
241
- export declare type DcuplViewType = 'section';
241
+ export type DcuplViewType = 'section';
242
242
  /**
243
243
  * A model describes a real world object and hols attributes.
244
244
  *
245
245
  * @defaultSnippets { "label": "Dcupl View", "properties": ["key", "model", "type", "primaryAttribute", "aggregates:array"] }
246
246
  */
247
- export declare type ViewDefinition = {
247
+ export type ViewDefinition = {
248
248
  /**
249
249
  * The key is an unique identifier overall models in the application.
250
250
  *
@@ -270,5 +270,5 @@ export declare type ViewDefinition = {
270
270
  * Container for ModelDescriptions & Views
271
271
  *
272
272
  */
273
- export declare type Model = ViewDefinition | ModelDefinition | Array<ModelDefinition | ViewDefinition>;
273
+ export type Model = ViewDefinition | ModelDefinition | Array<ModelDefinition | ViewDefinition>;
274
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcupl/common",
3
- "version": "0.0.73",
3
+ "version": "0.0.75",
4
4
  "description": "Dcupl Common Code",
5
5
  "main": "dist/lib-cjs/index.js",
6
6
  "module": "dist/lib-esm/index.js",