@enonic-types/lib-node 7.12.0 → 7.12.2
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 +6 -6
- package/package.json +2 -2
package/node.d.ts
CHANGED
|
@@ -55,14 +55,14 @@ export interface SuggestionResult {
|
|
|
55
55
|
freq?: number;
|
|
56
56
|
}[];
|
|
57
57
|
}
|
|
58
|
-
export interface NodeQueryResult<AggregationOutput extends Record<string, AggregationsResult
|
|
58
|
+
export interface NodeQueryResult<AggregationOutput extends Record<string, AggregationsResult> | undefined = undefined> {
|
|
59
59
|
total: number;
|
|
60
60
|
count: number;
|
|
61
61
|
hits: NodeQueryResultHit[];
|
|
62
62
|
aggregations: AggregationOutput;
|
|
63
63
|
suggestions?: Record<string, SuggestionResult[]>;
|
|
64
64
|
}
|
|
65
|
-
export interface NodeMultiRepoQueryResult<AggregationOutput extends Record<string, AggregationsResult
|
|
65
|
+
export interface NodeMultiRepoQueryResult<AggregationOutput extends Record<string, AggregationsResult> | undefined = undefined> {
|
|
66
66
|
total: number;
|
|
67
67
|
count: number;
|
|
68
68
|
hits: (NodeQueryResultHit & {
|
|
@@ -120,7 +120,7 @@ export interface SetChildOrderParams {
|
|
|
120
120
|
key: string;
|
|
121
121
|
childOrder: string;
|
|
122
122
|
}
|
|
123
|
-
export interface QueryNodeParams<AggregationInput extends Aggregations> {
|
|
123
|
+
export interface QueryNodeParams<AggregationInput extends Aggregations = never> {
|
|
124
124
|
start?: number;
|
|
125
125
|
count?: number;
|
|
126
126
|
query?: QueryDsl | string;
|
|
@@ -163,12 +163,12 @@ export interface FindChildrenParams {
|
|
|
163
163
|
countOnly: boolean;
|
|
164
164
|
recursive: boolean;
|
|
165
165
|
}
|
|
166
|
-
export interface DuplicateParams {
|
|
166
|
+
export interface DuplicateParams<NodeData = Record<string, unknown>> {
|
|
167
167
|
nodeId: string;
|
|
168
168
|
name?: string;
|
|
169
169
|
parent?: string;
|
|
170
170
|
includeChildren?: boolean;
|
|
171
|
-
dataProcessor?:
|
|
171
|
+
dataProcessor?: (v: NodeData) => NodeData;
|
|
172
172
|
refresh?: RefreshMode;
|
|
173
173
|
}
|
|
174
174
|
export interface FindNodesByParentResult {
|
|
@@ -279,7 +279,7 @@ export interface RepoConnection {
|
|
|
279
279
|
setRootPermissions<NodeData = Record<string, unknown>>(params: SetRootPermissionsParams): Node<NodeData>;
|
|
280
280
|
commit(params: CommitParams): NodeCommit;
|
|
281
281
|
getCommit(params: GetCommitParams): NodeCommit | null;
|
|
282
|
-
duplicate<NodeData = Record<string, unknown>>(params: DuplicateParams): Node<NodeData>;
|
|
282
|
+
duplicate<NodeData = Record<string, unknown>>(params: DuplicateParams<NodeData>): Node<NodeData>;
|
|
283
283
|
}
|
|
284
284
|
export interface MultiRepoConnection {
|
|
285
285
|
query<AggregationInput extends Aggregations = never>(params: QueryNodeParams<AggregationInput>): NodeMultiRepoQueryResult<AggregationsToAggregationResults<AggregationInput>>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@enonic-types/lib-node",
|
|
3
|
-
"version": "7.12.
|
|
3
|
+
"version": "7.12.2",
|
|
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.12.
|
|
30
|
+
"@enonic-types/core": "7.12.2"
|
|
31
31
|
},
|
|
32
32
|
"publishConfig": {
|
|
33
33
|
"access": "public"
|