@dcupl/common 0.0.81-beta.6 → 0.0.81-beta.7
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/lib-cjs/tsconfig-cjs.tsbuildinfo +1 -1
- package/dist/lib-cjs/types/aggregation.types.d.ts +79 -0
- package/dist/lib-cjs/types/aggregation.types.js +3 -0
- package/dist/lib-cjs/types/aggregation.types.js.map +1 -0
- package/dist/lib-cjs/types/facets.types.d.ts +20 -0
- package/dist/lib-cjs/types/facets.types.js +3 -0
- package/dist/lib-cjs/types/facets.types.js.map +1 -0
- package/dist/lib-cjs/types/index.d.ts +3 -1
- package/dist/lib-cjs/types/index.js +3 -1
- package/dist/lib-cjs/types/index.js.map +1 -1
- package/dist/lib-cjs/types/list.types.d.ts +4 -47
- package/dist/lib-cjs/types/section.types.d.ts +1 -1
- package/dist/lib-cjs/types/suggestion.types.d.ts +12 -0
- package/dist/lib-esm/tsconfig.tsbuildinfo +1 -1
- package/dist/lib-esm/types/aggregation.types.d.ts +79 -0
- package/dist/lib-esm/types/aggregation.types.js +2 -0
- package/dist/lib-esm/types/aggregation.types.js.map +1 -0
- package/dist/lib-esm/types/facets.types.d.ts +20 -0
- package/dist/lib-esm/types/facets.types.js +2 -0
- package/dist/lib-esm/types/facets.types.js.map +1 -0
- package/dist/lib-esm/types/index.d.ts +3 -1
- package/dist/lib-esm/types/index.js +3 -1
- package/dist/lib-esm/types/index.js.map +1 -1
- package/dist/lib-esm/types/list.types.d.ts +4 -47
- package/dist/lib-esm/types/section.types.d.ts +1 -1
- package/dist/lib-esm/types/suggestion.types.d.ts +12 -0
- package/package.json +1 -1
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
export type AggregationOptions = {
|
|
2
|
+
attributeKeys: string[];
|
|
3
|
+
};
|
|
4
|
+
export type AggregateType = 'number' | 'reference' | 'string';
|
|
5
|
+
export type AggregateBase = {
|
|
6
|
+
attribute: string;
|
|
7
|
+
type: AggregateType;
|
|
8
|
+
};
|
|
9
|
+
export type NumberAggregation = AggregateBase & {
|
|
10
|
+
attribute: string;
|
|
11
|
+
type: 'number';
|
|
12
|
+
value: NumberAggregationValue;
|
|
13
|
+
};
|
|
14
|
+
export type ReferenceAggregation = AggregateBase & {
|
|
15
|
+
attribute: string;
|
|
16
|
+
type: 'reference';
|
|
17
|
+
value: ReferenceAggregationValue[];
|
|
18
|
+
};
|
|
19
|
+
export type StringAggregation = AggregateBase & {
|
|
20
|
+
attribute: string;
|
|
21
|
+
type: 'string';
|
|
22
|
+
value: StringAggregationValue[];
|
|
23
|
+
};
|
|
24
|
+
export type Aggregation = NumberAggregation | StringAggregation | ReferenceAggregation;
|
|
25
|
+
export type NumberAggregationValue = {
|
|
26
|
+
average: number;
|
|
27
|
+
count: number;
|
|
28
|
+
sum: number;
|
|
29
|
+
};
|
|
30
|
+
export type ReferenceAggregationValue = {
|
|
31
|
+
value: string;
|
|
32
|
+
count: number;
|
|
33
|
+
itemKeys: string[];
|
|
34
|
+
};
|
|
35
|
+
export type StringAggregationValue = {
|
|
36
|
+
value: string;
|
|
37
|
+
count: number;
|
|
38
|
+
};
|
|
39
|
+
export type AggregationTypeNew = 'sum' | 'avg' | 'min' | 'max' | 'distinct' | 'group';
|
|
40
|
+
export type AggregationOptionsNew = {
|
|
41
|
+
attribute: string;
|
|
42
|
+
types: AggregationTypeNew[];
|
|
43
|
+
distinctOptions?: {
|
|
44
|
+
limit?: number;
|
|
45
|
+
};
|
|
46
|
+
groupOptions?: {
|
|
47
|
+
limit?: number;
|
|
48
|
+
calculateNotFound?: boolean;
|
|
49
|
+
groups?: AggregationGroupOption[];
|
|
50
|
+
};
|
|
51
|
+
excludeZeros?: boolean;
|
|
52
|
+
excludeUndefineds?: boolean;
|
|
53
|
+
excludeUnresolved?: boolean;
|
|
54
|
+
};
|
|
55
|
+
export type AggregationGroupOption = {
|
|
56
|
+
from?: any;
|
|
57
|
+
to?: any;
|
|
58
|
+
value?: any[];
|
|
59
|
+
};
|
|
60
|
+
export type AggregationDistinctValue = {
|
|
61
|
+
value: string;
|
|
62
|
+
count: number;
|
|
63
|
+
keys: string[];
|
|
64
|
+
};
|
|
65
|
+
export type AggregationGroupValue = {
|
|
66
|
+
option: AggregationGroupOption;
|
|
67
|
+
count: number;
|
|
68
|
+
keys: string[];
|
|
69
|
+
};
|
|
70
|
+
export type AggregationNew = {
|
|
71
|
+
attribute: string;
|
|
72
|
+
types: AggregationTypeNew[];
|
|
73
|
+
sum?: number;
|
|
74
|
+
avg?: number;
|
|
75
|
+
min?: number;
|
|
76
|
+
max?: number;
|
|
77
|
+
distinct?: AggregationDistinctValue[];
|
|
78
|
+
group?: AggregationGroupValue[];
|
|
79
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aggregation.types.js","sourceRoot":"","sources":["../../../src/types/aggregation.types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ListItem } from './data.types';
|
|
2
|
+
export type DcuplFacetOptions = {
|
|
3
|
+
attributeKey: string;
|
|
4
|
+
filterKey?: string;
|
|
5
|
+
count?: number;
|
|
6
|
+
excludeZeros?: boolean;
|
|
7
|
+
excludeUndefineds?: boolean;
|
|
8
|
+
excludeUnresolved?: boolean;
|
|
9
|
+
calculateResults?: boolean;
|
|
10
|
+
};
|
|
11
|
+
export type DcuplFacet = {
|
|
12
|
+
key: string;
|
|
13
|
+
enabled: boolean;
|
|
14
|
+
selected: boolean;
|
|
15
|
+
size: number;
|
|
16
|
+
value: boolean | string | null | undefined;
|
|
17
|
+
entry: ListItem;
|
|
18
|
+
resultKeys: string[];
|
|
19
|
+
children?: Array<DcuplFacet>;
|
|
20
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"facets.types.js","sourceRoot":"","sources":["../../../src/types/facets.types.ts"],"names":[],"mappings":""}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
export * from './aggregation.types';
|
|
1
2
|
export * from './data.types';
|
|
2
3
|
export * from './dcupl.types';
|
|
4
|
+
export * from './facets.types';
|
|
3
5
|
export * from './filter.types';
|
|
4
6
|
export * from './global.types';
|
|
5
7
|
export * from './internal.types';
|
|
@@ -7,6 +9,6 @@ export * from './list.types';
|
|
|
7
9
|
export * from './model.types';
|
|
8
10
|
export * from './projection.types';
|
|
9
11
|
export * from './query.types';
|
|
10
|
-
export * from './selection.types';
|
|
11
12
|
export * from './section.types';
|
|
13
|
+
export * from './selection.types';
|
|
12
14
|
export * from './suggestion.types';
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
export * from './aggregation.types';
|
|
1
2
|
export * from './data.types';
|
|
2
3
|
export * from './dcupl.types';
|
|
4
|
+
export * from './facets.types';
|
|
3
5
|
export * from './filter.types';
|
|
4
6
|
export * from './global.types';
|
|
5
7
|
export * from './internal.types';
|
|
@@ -7,7 +9,7 @@ export * from './list.types';
|
|
|
7
9
|
export * from './model.types';
|
|
8
10
|
export * from './projection.types';
|
|
9
11
|
export * from './query.types';
|
|
10
|
-
export * from './selection.types';
|
|
11
12
|
export * from './section.types';
|
|
13
|
+
export * from './selection.types';
|
|
12
14
|
export * from './suggestion.types';
|
|
13
15
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC"}
|
|
@@ -11,6 +11,10 @@ export type DcuplItemOptions<T> = {
|
|
|
11
11
|
projection?: Projection<T>;
|
|
12
12
|
itemKey: string;
|
|
13
13
|
};
|
|
14
|
+
export type DcuplManyItemsOptions<T> = {
|
|
15
|
+
projection?: Projection<T>;
|
|
16
|
+
itemKeys: string[];
|
|
17
|
+
};
|
|
14
18
|
export type DcuplSectionItemOption<T> = DcuplItemsOptions<T> & {
|
|
15
19
|
key: string;
|
|
16
20
|
};
|
|
@@ -39,15 +43,6 @@ export type DcuplRangeOptions = {
|
|
|
39
43
|
propertyKey: string;
|
|
40
44
|
filterKey?: string;
|
|
41
45
|
};
|
|
42
|
-
export type DcuplFacetOptions = {
|
|
43
|
-
attributeKey: string;
|
|
44
|
-
filterKey?: string;
|
|
45
|
-
count?: number;
|
|
46
|
-
excludeZeros?: boolean;
|
|
47
|
-
excludeUndefineds?: boolean;
|
|
48
|
-
excludeUnresolved?: boolean;
|
|
49
|
-
calculateFacets?: boolean;
|
|
50
|
-
};
|
|
51
46
|
export type ListMetadata = {
|
|
52
47
|
key: string;
|
|
53
48
|
currentSize: number;
|
|
@@ -61,44 +56,6 @@ export type ViewMetadata = {
|
|
|
61
56
|
currentSize: number;
|
|
62
57
|
initialSize: number;
|
|
63
58
|
};
|
|
64
|
-
export type AggregationOptions = {
|
|
65
|
-
attributeKeys: string[];
|
|
66
|
-
};
|
|
67
|
-
export type AggregateType = 'number' | 'reference' | 'string';
|
|
68
|
-
export type AggregateBase = {
|
|
69
|
-
attribute: string;
|
|
70
|
-
type: AggregateType;
|
|
71
|
-
};
|
|
72
|
-
export type NumberAggregation = AggregateBase & {
|
|
73
|
-
attribute: string;
|
|
74
|
-
type: 'number';
|
|
75
|
-
value: NumberAggregationValue;
|
|
76
|
-
};
|
|
77
|
-
export type ReferenceAggregation = AggregateBase & {
|
|
78
|
-
attribute: string;
|
|
79
|
-
type: 'reference';
|
|
80
|
-
value: ReferenceAggregationValue[];
|
|
81
|
-
};
|
|
82
|
-
export type StringAggregation = AggregateBase & {
|
|
83
|
-
attribute: string;
|
|
84
|
-
type: 'string';
|
|
85
|
-
value: StringAggregationValue[];
|
|
86
|
-
};
|
|
87
|
-
export type Aggregation = NumberAggregation | StringAggregation | ReferenceAggregation;
|
|
88
|
-
export type NumberAggregationValue = {
|
|
89
|
-
average: number;
|
|
90
|
-
count: number;
|
|
91
|
-
sum: number;
|
|
92
|
-
};
|
|
93
|
-
export type ReferenceAggregationValue = {
|
|
94
|
-
value: string;
|
|
95
|
-
count: number;
|
|
96
|
-
itemKeys: string[];
|
|
97
|
-
};
|
|
98
|
-
export type StringAggregationValue = {
|
|
99
|
-
value: string;
|
|
100
|
-
count: number;
|
|
101
|
-
};
|
|
102
59
|
export type CatalogApiOptions = {
|
|
103
60
|
skipProcessing?: boolean;
|
|
104
61
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CatalogApiOptions } from './list.types';
|
|
2
2
|
import { FilterComparisonType } from './model.types';
|
|
3
|
+
import { DcuplQueryTransformOptions } from './query.types';
|
|
3
4
|
export type SuggestionValueEntry = {
|
|
4
5
|
key: string;
|
|
5
6
|
value: string;
|
|
@@ -14,3 +15,14 @@ export type SuggestionOptions = CatalogApiOptions & {
|
|
|
14
15
|
max?: number;
|
|
15
16
|
comparisonType?: FilterComparisonType;
|
|
16
17
|
};
|
|
18
|
+
export type SuggestionOptionsNew = CatalogApiOptions & {
|
|
19
|
+
attribute: string;
|
|
20
|
+
searchTerm: string;
|
|
21
|
+
max?: number;
|
|
22
|
+
calculateResultKeys?: boolean;
|
|
23
|
+
transform?: DcuplQueryTransformOptions;
|
|
24
|
+
};
|
|
25
|
+
export type SuggestionNew = {
|
|
26
|
+
value: string;
|
|
27
|
+
keys: string[];
|
|
28
|
+
};
|