@enonic-types/lib-node 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/node.d.ts +20 -24
- package/package.json +2 -2
package/node.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ declare type WithRequiredProperty<T, K extends keyof T> = T & {
|
|
|
17
17
|
[P in K]-?: T[P];
|
|
18
18
|
};
|
|
19
19
|
export interface Bucket {
|
|
20
|
-
[subAggregationName: string]:
|
|
20
|
+
[subAggregationName: string]: AggregationsResult | string | number | undefined;
|
|
21
21
|
key: string;
|
|
22
22
|
docCount: number;
|
|
23
23
|
}
|
|
@@ -29,20 +29,20 @@ export interface DateBucket extends Bucket {
|
|
|
29
29
|
from?: string;
|
|
30
30
|
to?: string;
|
|
31
31
|
}
|
|
32
|
-
export interface
|
|
32
|
+
export interface BucketsAggregationResult {
|
|
33
33
|
buckets: (DateBucket | NumericBucket)[];
|
|
34
34
|
}
|
|
35
|
-
export interface
|
|
35
|
+
export interface StatsAggregationResult {
|
|
36
36
|
count: number;
|
|
37
37
|
min: number;
|
|
38
38
|
max: number;
|
|
39
39
|
avg: number;
|
|
40
40
|
sum: number;
|
|
41
41
|
}
|
|
42
|
-
export interface
|
|
42
|
+
export interface SingleValueMetricAggregationResult {
|
|
43
43
|
value: number;
|
|
44
44
|
}
|
|
45
|
-
export declare type AggregationsResult =
|
|
45
|
+
export declare type AggregationsResult = BucketsAggregationResult | StatsAggregationResult | SingleValueMetricAggregationResult;
|
|
46
46
|
export declare type Aggregation = TermsAggregation | HistogramAggregation | DateHistogramAggregation | NumericRangeAggregation | DateRangeAggregation | StatsAggregation | GeoDistanceAggregation | MinAggregation | MaxAggregation | ValueCountAggregation;
|
|
47
47
|
export interface TermsAggregation {
|
|
48
48
|
terms: {
|
|
@@ -181,7 +181,6 @@ export interface BooleanFilter {
|
|
|
181
181
|
};
|
|
182
182
|
}
|
|
183
183
|
export declare type Filter = ExistsFilter | NotExistsFilter | HasValueFilter | IdsFilter | BooleanFilter;
|
|
184
|
-
export declare type Suggestion = TermSuggestion;
|
|
185
184
|
export interface TermSuggestion {
|
|
186
185
|
text: string;
|
|
187
186
|
term: TermSuggestionOptions;
|
|
@@ -200,8 +199,7 @@ export interface TermSuggestionOptions {
|
|
|
200
199
|
minDocFreq?: number | null;
|
|
201
200
|
maxTermFreq?: number | null;
|
|
202
201
|
}
|
|
203
|
-
declare type
|
|
204
|
-
export declare type DslQueryType = LiteralUnion<'dateTime' | 'time'> | number | boolean;
|
|
202
|
+
export declare type DslQueryType = 'dateTime' | 'time';
|
|
205
203
|
export declare type DslOperator = 'OR' | 'AND';
|
|
206
204
|
export interface TermDslExpression {
|
|
207
205
|
field: string;
|
|
@@ -307,24 +305,22 @@ export interface NodeQueryResultHit {
|
|
|
307
305
|
explanation?: Explanation;
|
|
308
306
|
highlight?: HighlightResult;
|
|
309
307
|
}
|
|
310
|
-
export interface
|
|
311
|
-
|
|
308
|
+
export interface SuggestionResult {
|
|
309
|
+
text: string;
|
|
310
|
+
length: number;
|
|
311
|
+
offset: number;
|
|
312
|
+
options: {
|
|
312
313
|
text: string;
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
options: {
|
|
316
|
-
text: string;
|
|
317
|
-
score: number;
|
|
318
|
-
freq?: number;
|
|
319
|
-
}[];
|
|
314
|
+
score: number;
|
|
315
|
+
freq?: number;
|
|
320
316
|
}[];
|
|
321
317
|
}
|
|
322
318
|
export interface NodeQueryResult {
|
|
323
319
|
total: number;
|
|
324
320
|
count: number;
|
|
325
321
|
hits: NodeQueryResultHit[];
|
|
326
|
-
aggregations?: AggregationsResult
|
|
327
|
-
suggestions?:
|
|
322
|
+
aggregations?: Record<string, AggregationsResult>;
|
|
323
|
+
suggestions?: Record<string, SuggestionResult[]>;
|
|
328
324
|
}
|
|
329
325
|
export interface NodeMultiRepoQueryResult {
|
|
330
326
|
total: number;
|
|
@@ -333,13 +329,13 @@ export interface NodeMultiRepoQueryResult {
|
|
|
333
329
|
repoId: string;
|
|
334
330
|
branch: string;
|
|
335
331
|
})[];
|
|
336
|
-
aggregations?: AggregationsResult
|
|
337
|
-
suggestions?:
|
|
332
|
+
aggregations?: Record<string, AggregationsResult>;
|
|
333
|
+
suggestions?: Record<string, SuggestionResult[]>;
|
|
338
334
|
}
|
|
339
335
|
export declare type CreateNodeParams<NodeData = unknown> = {
|
|
340
336
|
_name?: string;
|
|
341
337
|
_parentPath?: string;
|
|
342
|
-
_indexConfig?:
|
|
338
|
+
_indexConfig?: Partial<NodeIndexConfig>;
|
|
343
339
|
_permissions?: AccessControlEntry[];
|
|
344
340
|
_inheritsPermissions?: boolean;
|
|
345
341
|
_manualOrderValue?: number;
|
|
@@ -399,7 +395,7 @@ export interface QueryNodeParams {
|
|
|
399
395
|
sort?: string | SortDsl | SortDsl[];
|
|
400
396
|
filters?: Filter | Filter[];
|
|
401
397
|
aggregations?: Record<string, Aggregation>;
|
|
402
|
-
suggestions?: Record<string,
|
|
398
|
+
suggestions?: Record<string, TermSuggestion>;
|
|
403
399
|
highlight?: Highlight;
|
|
404
400
|
explain?: boolean;
|
|
405
401
|
}
|
|
@@ -462,7 +458,7 @@ export interface SetRootPermissionsParams {
|
|
|
462
458
|
}
|
|
463
459
|
export declare type Permission = 'READ' | 'CREATE' | 'MODIFY' | 'DELETE' | 'PUBLISH' | 'READ_PERMISSIONS' | 'WRITE_PERMISSIONS';
|
|
464
460
|
export interface AccessControlEntry {
|
|
465
|
-
principal:
|
|
461
|
+
principal: PrincipalKey;
|
|
466
462
|
allow?: Permission[];
|
|
467
463
|
deny?: Permission[];
|
|
468
464
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@enonic-types/lib-node",
|
|
3
|
-
"version": "7.11.0-
|
|
3
|
+
"version": "7.11.0-RC4",
|
|
4
4
|
"description": "Type definitions for lib-node.",
|
|
5
5
|
"types": "node.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"
|