@dcupl/common 0.0.72-beta.3 → 0.0.73

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.
@@ -50,6 +50,8 @@ export declare type FilterEntryDateRange = {
50
50
  max: Date;
51
51
  };
52
52
  export declare type FilterItemType = 'reference' | 'number' | 'text' | 'date';
53
+ export declare type FilterItemPropertyType = 'number' | 'text' | 'date';
54
+ export declare type FilterItemReferenceType = 'reference';
53
55
  export declare type FilterItemBase = {
54
56
  key: string;
55
57
  attributeKey: string;
@@ -1,2 +1,5 @@
1
+ import { ListItem } from './data.types';
1
2
  export declare type InverseIndexReferenceMap = Map<string, InverseIndexValuesMap>;
2
3
  export declare type InverseIndexValuesMap = Map<string, string[]>;
4
+ export declare type InverseIndexDataMap = Map<string, InverseIndexDataValuesMap>;
5
+ export declare type InverseIndexDataValuesMap = Map<string, ListItem>;
@@ -22,6 +22,7 @@ export declare type DcuplSectionOptions<T> = DcuplItemsOptions<T> & {
22
22
  export declare type DcuplFilterOptions = CatalogApiOptions & {
23
23
  calculateFacets?: boolean;
24
24
  excludeZeros?: boolean;
25
+ excludeUndefineds?: boolean;
25
26
  count?: number;
26
27
  };
27
28
  export declare type DcuplFiltersOptions = DcuplFilterOptions & {
@@ -33,6 +34,18 @@ export declare type DcuplListOptions<ModelNames extends string = string> = {
33
34
  listItemKeys?: string[];
34
35
  empty?: boolean;
35
36
  };
37
+ export declare type DcuplRangeOptions = {
38
+ propertyKey: string;
39
+ filterKey?: string;
40
+ };
41
+ export declare type DcuplFacetOptions = {
42
+ attributeKey: string;
43
+ filterKey?: string;
44
+ count?: number;
45
+ excludeZeros?: boolean;
46
+ excludeUndefineds?: boolean;
47
+ calculateFacets?: boolean;
48
+ };
36
49
  export declare type ListMetadata = {
37
50
  key: string;
38
51
  currentSize: number;
@@ -1,5 +1,7 @@
1
1
  import { RawItem } from '.';
2
2
  export declare type PropertyType = 'string' | 'int' | 'float' | 'json' | 'date' | 'any' | 'Array<string>' | 'Array<int>' | 'Array<float>' | 'Array<date>';
3
+ export declare const NumberPropertyTypes: PropertyType[];
4
+ export declare const DatePropertyTypes: PropertyType[];
3
5
  /**
4
6
  * must be singleValued or multiValued
5
7
  * singleValued contains only one key to an object
@@ -14,6 +16,11 @@ export declare type PropertyType = 'string' | 'int' | 'float' | 'json' | 'date'
14
16
  */
15
17
  export declare type ReferenceType = 'singleValued' | 'multiValued';
16
18
  export declare type AttributeType = PropertyType | ReferenceType;
19
+ export declare type ModelMetadata = {
20
+ name: string;
21
+ description?: string;
22
+ [key: string]: any;
23
+ };
17
24
  export declare type FilterComparisonType = 'equal' | 'equalIgnoreCase' | 'contains' | 'containsIgnoreCase' | 'containsIgnoreCaseAndWhitespace';
18
25
  /**
19
26
  * A property is a quality or characteristic belonging an object.
@@ -36,6 +43,8 @@ declare type PropertyBase = {
36
43
  remoteProperty: string;
37
44
  separator?: string;
38
45
  };
46
+ meta?: ModelMetadata;
47
+ index?: boolean;
39
48
  };
40
49
  export declare type PropertyInt = PropertyBase & {
41
50
  type: 'int' | 'Array<int>';
@@ -97,6 +106,7 @@ export declare type FilterStringSingle = {
97
106
  export declare type ReferenceFilterDefinition = {
98
107
  calculateFacets?: boolean;
99
108
  excludeZeros?: boolean;
109
+ excludeUndefineds?: boolean;
100
110
  };
101
111
  export declare type ReferenceValidity = 'loose' | 'strict';
102
112
  /**
@@ -126,6 +136,8 @@ export declare type ReferenceBase = {
126
136
  filter?: boolean | ReferenceFilterDefinition;
127
137
  validity?: ReferenceValidity;
128
138
  aggregate?: boolean;
139
+ meta?: ModelMetadata;
140
+ index?: boolean;
129
141
  };
130
142
  export declare type AggregatedReference = ReferenceBase & {
131
143
  aggregate: true;
@@ -224,6 +236,7 @@ export declare type ModelDefinition<ModelNames extends string = string> = {
224
236
  autoGenerateKey?: boolean;
225
237
  keyProperty?: string;
226
238
  valueMappings?: ValueMappingConfig[];
239
+ meta?: ModelMetadata;
227
240
  };
228
241
  export declare type DcuplViewType = 'section';
229
242
  /**
@@ -251,6 +264,7 @@ export declare type ViewDefinition = {
251
264
  */
252
265
  primaryAttribute: string;
253
266
  aggregates: string[];
267
+ meta?: ModelMetadata;
254
268
  };
255
269
  /**
256
270
  * Container for ModelDescriptions & Views
@@ -1,2 +1,3 @@
1
- export {};
1
+ export var NumberPropertyTypes = ['int', 'float', 'Array<int>', 'Array<float>'];
2
+ export var DatePropertyTypes = ['date', 'Array<date>'];
2
3
  //# sourceMappingURL=model.types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"model.types.js","sourceRoot":"","sources":["../../../src/types/model.types.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"model.types.js","sourceRoot":"","sources":["../../../src/types/model.types.ts"],"names":[],"mappings":"AAcA,MAAM,CAAC,IAAM,mBAAmB,GAAmB,CAAC,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,cAAc,CAAC,CAAC;AAClG,MAAM,CAAC,IAAM,iBAAiB,GAAmB,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcupl/common",
3
- "version": "0.0.72-beta.3",
3
+ "version": "0.0.73",
4
4
  "description": "Dcupl Common Code",
5
5
  "main": "dist/lib-cjs/index.js",
6
6
  "module": "dist/lib-esm/index.js",