@enonic-types/lib-content 7.11.0-RC1 → 7.11.0-RC4
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 +12 -25
- package/package.json +2 -2
package/content.d.ts
CHANGED
|
@@ -19,7 +19,6 @@ declare type Attachments = Content['attachments'];
|
|
|
19
19
|
declare type ContentInheritType = Content['inherit'];
|
|
20
20
|
declare type Workflow = Content['workflow'];
|
|
21
21
|
export declare type Schedule = Omit<PublishInfo, 'first'>;
|
|
22
|
-
declare type LiteralUnion<T extends U, U = string> = T | (U & Record<never, never>);
|
|
23
22
|
export declare const ARCHIVE_ROOT_PATH: string;
|
|
24
23
|
export declare const CONTENT_ROOT_PATH: string;
|
|
25
24
|
export interface GetContentParams {
|
|
@@ -27,7 +26,7 @@ export interface GetContentParams {
|
|
|
27
26
|
versionId?: string | null;
|
|
28
27
|
}
|
|
29
28
|
export interface Bucket {
|
|
30
|
-
[subAggregationName: string]:
|
|
29
|
+
[subAggregationName: string]: AggregationsResult | string | number | undefined;
|
|
31
30
|
key: string;
|
|
32
31
|
docCount: number;
|
|
33
32
|
}
|
|
@@ -39,20 +38,20 @@ export interface DateBucket extends Bucket {
|
|
|
39
38
|
from?: string;
|
|
40
39
|
to?: string;
|
|
41
40
|
}
|
|
42
|
-
export interface
|
|
41
|
+
export interface BucketsAggregationResult {
|
|
43
42
|
buckets: (DateBucket | NumericBucket)[];
|
|
44
43
|
}
|
|
45
|
-
export interface
|
|
44
|
+
export interface StatsAggregationResult {
|
|
46
45
|
count: number;
|
|
47
46
|
min: number;
|
|
48
47
|
max: number;
|
|
49
48
|
avg: number;
|
|
50
49
|
sum: number;
|
|
51
50
|
}
|
|
52
|
-
export interface
|
|
51
|
+
export interface SingleValueMetricAggregationResult {
|
|
53
52
|
value: number;
|
|
54
53
|
}
|
|
55
|
-
export declare type AggregationsResult =
|
|
54
|
+
export declare type AggregationsResult = BucketsAggregationResult | StatsAggregationResult | SingleValueMetricAggregationResult;
|
|
56
55
|
export declare type Aggregation = TermsAggregation | HistogramAggregation | DateHistogramAggregation | NumericRangeAggregation | DateRangeAggregation | StatsAggregation | GeoDistanceAggregation | MinAggregation | MaxAggregation | ValueCountAggregation;
|
|
57
56
|
export interface TermsAggregation {
|
|
58
57
|
terms: {
|
|
@@ -61,9 +60,7 @@ export interface TermsAggregation {
|
|
|
61
60
|
size?: number;
|
|
62
61
|
minDocCount?: number;
|
|
63
62
|
};
|
|
64
|
-
aggregations?:
|
|
65
|
-
[subAggregations: string]: Aggregation;
|
|
66
|
-
};
|
|
63
|
+
aggregations?: Record<string, Aggregation>;
|
|
67
64
|
}
|
|
68
65
|
export interface HistogramAggregation {
|
|
69
66
|
histogram: {
|
|
@@ -74,9 +71,7 @@ export interface HistogramAggregation {
|
|
|
74
71
|
extendedBoundMax?: number;
|
|
75
72
|
minDocCount?: number;
|
|
76
73
|
};
|
|
77
|
-
aggregations?:
|
|
78
|
-
[subAggregations: string]: Aggregation;
|
|
79
|
-
};
|
|
74
|
+
aggregations?: Record<string, Aggregation>;
|
|
80
75
|
}
|
|
81
76
|
export interface DateHistogramAggregation {
|
|
82
77
|
dateHistogram: {
|
|
@@ -85,9 +80,7 @@ export interface DateHistogramAggregation {
|
|
|
85
80
|
minDocCount?: number;
|
|
86
81
|
format: string;
|
|
87
82
|
};
|
|
88
|
-
aggregations?:
|
|
89
|
-
[subAggregations: string]: Aggregation;
|
|
90
|
-
};
|
|
83
|
+
aggregations?: Record<string, Aggregation>;
|
|
91
84
|
}
|
|
92
85
|
export interface NumericRange {
|
|
93
86
|
from?: number;
|
|
@@ -99,18 +92,14 @@ export interface NumericRangeAggregation {
|
|
|
99
92
|
field: string;
|
|
100
93
|
ranges?: NumericRange[];
|
|
101
94
|
};
|
|
102
|
-
aggregations?:
|
|
103
|
-
[subAggregations: string]: Aggregation;
|
|
104
|
-
};
|
|
95
|
+
aggregations?: Record<string, Aggregation>;
|
|
105
96
|
}
|
|
106
97
|
export interface NumericRangeAggregation {
|
|
107
98
|
range: {
|
|
108
99
|
field: string;
|
|
109
100
|
ranges?: NumericRange[];
|
|
110
101
|
};
|
|
111
|
-
aggregations?:
|
|
112
|
-
[subAggregations: string]: Aggregation;
|
|
113
|
-
};
|
|
102
|
+
aggregations?: Record<string, Aggregation>;
|
|
114
103
|
}
|
|
115
104
|
export interface DateRange {
|
|
116
105
|
from?: string;
|
|
@@ -123,9 +112,7 @@ export interface DateRangeAggregation {
|
|
|
123
112
|
format: string;
|
|
124
113
|
ranges: DateRange[];
|
|
125
114
|
};
|
|
126
|
-
aggregations?:
|
|
127
|
-
[subAggregations: string]: Aggregation;
|
|
128
|
-
};
|
|
115
|
+
aggregations?: Record<string, Aggregation>;
|
|
129
116
|
}
|
|
130
117
|
export interface StatsAggregation {
|
|
131
118
|
stats: {
|
|
@@ -273,7 +260,7 @@ export interface FormItemOptionSet {
|
|
|
273
260
|
}[];
|
|
274
261
|
}
|
|
275
262
|
export declare type FormItem = FormItemSet | FormItemLayout | FormItemOptionSet | FormItemInput;
|
|
276
|
-
export declare type DslQueryType =
|
|
263
|
+
export declare type DslQueryType = 'dateTime' | 'time';
|
|
277
264
|
export declare type DslOperator = 'OR' | 'AND';
|
|
278
265
|
export interface TermDslExpression {
|
|
279
266
|
field: string;
|
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-RC4",
|
|
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-RC4"
|
|
31
31
|
},
|
|
32
32
|
"publishConfig": {
|
|
33
33
|
"access": "public"
|