@enonic-types/lib-content 7.11.0-RC3 → 7.11.0
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/content.d.ts +11 -23
- package/package.json +2 -2
package/content.d.ts
CHANGED
|
@@ -26,7 +26,7 @@ export interface GetContentParams {
|
|
|
26
26
|
versionId?: string | null;
|
|
27
27
|
}
|
|
28
28
|
export interface Bucket {
|
|
29
|
-
[subAggregationName: string]:
|
|
29
|
+
[subAggregationName: string]: AggregationsResult | string | number | undefined;
|
|
30
30
|
key: string;
|
|
31
31
|
docCount: number;
|
|
32
32
|
}
|
|
@@ -38,20 +38,20 @@ export interface DateBucket extends Bucket {
|
|
|
38
38
|
from?: string;
|
|
39
39
|
to?: string;
|
|
40
40
|
}
|
|
41
|
-
export interface
|
|
41
|
+
export interface BucketsAggregationResult {
|
|
42
42
|
buckets: (DateBucket | NumericBucket)[];
|
|
43
43
|
}
|
|
44
|
-
export interface
|
|
44
|
+
export interface StatsAggregationResult {
|
|
45
45
|
count: number;
|
|
46
46
|
min: number;
|
|
47
47
|
max: number;
|
|
48
48
|
avg: number;
|
|
49
49
|
sum: number;
|
|
50
50
|
}
|
|
51
|
-
export interface
|
|
51
|
+
export interface SingleValueMetricAggregationResult {
|
|
52
52
|
value: number;
|
|
53
53
|
}
|
|
54
|
-
export declare type AggregationsResult =
|
|
54
|
+
export declare type AggregationsResult = BucketsAggregationResult | StatsAggregationResult | SingleValueMetricAggregationResult;
|
|
55
55
|
export declare type Aggregation = TermsAggregation | HistogramAggregation | DateHistogramAggregation | NumericRangeAggregation | DateRangeAggregation | StatsAggregation | GeoDistanceAggregation | MinAggregation | MaxAggregation | ValueCountAggregation;
|
|
56
56
|
export interface TermsAggregation {
|
|
57
57
|
terms: {
|
|
@@ -60,9 +60,7 @@ export interface TermsAggregation {
|
|
|
60
60
|
size?: number;
|
|
61
61
|
minDocCount?: number;
|
|
62
62
|
};
|
|
63
|
-
aggregations?:
|
|
64
|
-
[subAggregations: string]: Aggregation;
|
|
65
|
-
};
|
|
63
|
+
aggregations?: Record<string, Aggregation>;
|
|
66
64
|
}
|
|
67
65
|
export interface HistogramAggregation {
|
|
68
66
|
histogram: {
|
|
@@ -73,9 +71,7 @@ export interface HistogramAggregation {
|
|
|
73
71
|
extendedBoundMax?: number;
|
|
74
72
|
minDocCount?: number;
|
|
75
73
|
};
|
|
76
|
-
aggregations?:
|
|
77
|
-
[subAggregations: string]: Aggregation;
|
|
78
|
-
};
|
|
74
|
+
aggregations?: Record<string, Aggregation>;
|
|
79
75
|
}
|
|
80
76
|
export interface DateHistogramAggregation {
|
|
81
77
|
dateHistogram: {
|
|
@@ -84,9 +80,7 @@ export interface DateHistogramAggregation {
|
|
|
84
80
|
minDocCount?: number;
|
|
85
81
|
format: string;
|
|
86
82
|
};
|
|
87
|
-
aggregations?:
|
|
88
|
-
[subAggregations: string]: Aggregation;
|
|
89
|
-
};
|
|
83
|
+
aggregations?: Record<string, Aggregation>;
|
|
90
84
|
}
|
|
91
85
|
export interface NumericRange {
|
|
92
86
|
from?: number;
|
|
@@ -98,18 +92,14 @@ export interface NumericRangeAggregation {
|
|
|
98
92
|
field: string;
|
|
99
93
|
ranges?: NumericRange[];
|
|
100
94
|
};
|
|
101
|
-
aggregations?:
|
|
102
|
-
[subAggregations: string]: Aggregation;
|
|
103
|
-
};
|
|
95
|
+
aggregations?: Record<string, Aggregation>;
|
|
104
96
|
}
|
|
105
97
|
export interface NumericRangeAggregation {
|
|
106
98
|
range: {
|
|
107
99
|
field: string;
|
|
108
100
|
ranges?: NumericRange[];
|
|
109
101
|
};
|
|
110
|
-
aggregations?:
|
|
111
|
-
[subAggregations: string]: Aggregation;
|
|
112
|
-
};
|
|
102
|
+
aggregations?: Record<string, Aggregation>;
|
|
113
103
|
}
|
|
114
104
|
export interface DateRange {
|
|
115
105
|
from?: string;
|
|
@@ -122,9 +112,7 @@ export interface DateRangeAggregation {
|
|
|
122
112
|
format: string;
|
|
123
113
|
ranges: DateRange[];
|
|
124
114
|
};
|
|
125
|
-
aggregations?:
|
|
126
|
-
[subAggregations: string]: Aggregation;
|
|
127
|
-
};
|
|
115
|
+
aggregations?: Record<string, Aggregation>;
|
|
128
116
|
}
|
|
129
117
|
export interface StatsAggregation {
|
|
130
118
|
stats: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@enonic-types/lib-content",
|
|
3
|
-
"version": "7.11.0
|
|
3
|
+
"version": "7.11.0",
|
|
4
4
|
"description": "Type definitions for lib-content.",
|
|
5
5
|
"types": "content.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
},
|
|
28
28
|
"homepage": "https://github.com/enonic/xp/tree/master#readme",
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@enonic-types/core": "7.11.0
|
|
30
|
+
"@enonic-types/core": "7.11.0"
|
|
31
31
|
},
|
|
32
32
|
"publishConfig": {
|
|
33
33
|
"access": "public"
|